/* **HQ's Automation wing** (`ativv-hq-automation`): Workflows, a workflow's page, a run's page,
   Settings, Assistants and an assistant's page, scoped under `.hq-automation`; and the Proposals
   tab and a proposal's own page, scoped under `.hq-proposals`. Tokens only, as everywhere.

   One line per section (Reed, 9 Nov 2026): the ink rule above a section's title, as the brand book
   has it; a table's head sits on a hairline, never a second ink line. Trouble is words, never a
   colour or a dot; the 1 Jan price is the one yellow flag. */

.hq-automation {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.hq-automation .back {
  margin: 0;
}

.hq-automation .lbl {
  font-family: var(--font-mono);
  font-size: var(--text-mono-label);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--color-meta);
}

.hq-automation .who {
  font-family: var(--font-mono);
  font-size: var(--text-mono);
  letter-spacing: var(--tracking-mono);
  text-transform: uppercase;
  color: var(--color-meta);
}

.hq-automation .mono {
  font-family: var(--font-mono);
  font-size: var(--text-mono-number);
}

/* A section: its title under the one ink rule. */
.hq-automation .automation-section {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.hq-automation .automation-h2 {
  margin: 0;
  padding-top: var(--space-3);
  border-top: var(--rule-strong) solid var(--color-ink);
  font-size: var(--text-display-5);
  font-weight: var(--weight-regular);
  line-height: var(--leading-section);
  letter-spacing: var(--tracking-section);
}

/* The wing's tables: the data table's face (data-table.css) for rows whose cells are links and
   lines, with the head on a hairline under no ink rule of its own. */
.hq-automation .automation-table-scroll {
  overflow-x: auto;
}

.hq-automation .automation-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
}

.hq-automation .automation-table th {
  text-align: left;
  font-family: var(--font-mono);
  font-size: var(--text-mono-sm);
  font-weight: var(--weight-regular);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--color-meta);
  padding: 0 var(--space-5) var(--space-2) 0;
  border-bottom: var(--hairline) solid var(--color-line);
  white-space: nowrap;
}

.hq-automation .automation-table td {
  padding: var(--space-3) var(--space-5) var(--space-3) 0;
  border-bottom: var(--hairline) solid var(--color-line);
  vertical-align: top;
}

.hq-automation .automation-table .n {
  text-align: right;
}

.hq-automation .automation-table .mono {
  white-space: nowrap;
}

.hq-automation .automation-table .automation-wide {
  width: 30%;
}

.hq-automation .automation-table .automation-end {
  text-align: right;
  white-space: nowrap;
}

.hq-automation .automation-name {
  font-weight: var(--weight-medium);
  font-size: var(--text-md);
}

/* The facts under a head: a label in mono, its words beside it. */
.hq-automation .automation-facts {
  display: grid;
  grid-template-columns: minmax(8rem, max-content) 1fr;
  gap: var(--space-2) var(--space-6);
  margin: 0;
}

.hq-automation .automation-facts dt {
  padding-top: 2px;
}

.hq-automation .automation-facts dd {
  margin: 0;
}

.hq-automation .automation-head-link {
  align-self: center;
}

.hq-automation .page-header-actions {
  align-items: center;
  gap: var(--space-3);
}

.hq-automation .automation-said,
.hq-automation .automation-progress {
  margin: 0;
}

/* Paused: said in words where staff look, with who, when and why. */
.hq-automation .automation-paused {
  border-top: var(--hairline) solid var(--color-line);
  padding-top: var(--space-3);
}

.hq-automation .automation-paused p {
  margin: 0 0 var(--space-1);
}

/* A run that failed: the words first. */
.hq-automation .automation-failed {
  margin: 0;
  font-size: var(--text-lead);
  line-height: var(--leading-lead);
}

.hq-automation .automation-made {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.hq-automation .automation-made-proposal {
  display: flex;
  justify-content: space-between;
  gap: var(--space-4);
  border-bottom: var(--hairline) solid var(--color-line);
  padding-bottom: var(--space-2);
}

/* An assistant's proposals waiting for you (`ask-120`): what it asks, when, where it is answered,
   each in a column of its own, so the dates stand under one another whatever a line's length. */
.hq-automation .automation-waiting {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content max-content;
  column-gap: var(--space-4);
  row-gap: var(--space-2);
}

.hq-automation .automation-waiting .automation-made-proposal {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: subgrid;
  align-items: baseline;
}

@media (max-width: 40rem) {
  .hq-automation .automation-waiting {
    grid-template-columns: minmax(0, 1fr) max-content;
  }

  .hq-automation .automation-waiting .automation-made-asks {
    grid-column: 1 / -1;
  }
}

.hq-automation .automation-fold summary {
  cursor: pointer;
}

.hq-automation .automation-group td {
  font-weight: var(--weight-medium);
}

.hq-automation .automation-request td:first-child {
  padding-left: var(--space-5);
}

.hq-automation .automation-total td {
  border-bottom: 0;
  font-weight: var(--weight-medium);
}

.hq-automation .automation-sent pre {
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 24rem;
  overflow: auto;
  font-family: var(--font-mono);
  font-size: var(--text-mono-lg);
  background: var(--color-surface);
  border: var(--hairline) solid var(--color-line);
  padding: var(--space-3);
}

.hq-automation .automation-reasons {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-6);
  margin: 0;
}

.hq-automation .automation-reasons dd {
  margin: 0;
}

/* Settings. */
.hq-automation .automation-set {
  margin: 0;
}

.hq-automation .automation-set-pick {
  display: flex;
  align-items: flex-end;
  gap: var(--space-3);
  flex-wrap: wrap;
}

.hq-automation .automation-sees {
  border: var(--hairline) solid var(--color-line);
  padding: var(--space-3) var(--space-4);
}

.hq-automation .automation-sees-acts {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.hq-automation .automation-sees ul {
  margin: var(--space-2) 0;
  padding-left: var(--space-4);
}

/* The page's one yellow flag: a price known to change. */
.hq-automation .automation-flag {
  display: flex;
  gap: var(--space-3);
  margin: 0;
  padding: var(--space-3) var(--space-4);
  background: var(--color-flag);
  color: var(--color-flag-ink);
  border-left: 3px solid var(--color-flag-rule);
}

.hq-automation .automation-steps-fields {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(22rem, 1fr));
  gap: var(--space-6);
}

.hq-automation .automation-step-fields h3 {
  margin: 0 0 var(--space-2);
  font-size: var(--text-md);
  font-weight: var(--weight-medium);
}

.hq-automation .automation-field {
  display: grid;
  grid-template-columns: 11rem 1fr;
  gap: var(--space-1) var(--space-3);
  align-items: center;
  padding: var(--space-1) 0;
}

.hq-automation .automation-field-key {
  grid-column: 2;
  font-size: var(--text-mono-sm);
  color: var(--color-muted);
}

.hq-automation .automation-field-mark {
  grid-column: 2;
  font-size: var(--text-quiet);
}

/* A field someone else changed since the form was read: marked, in words, beside it. */
.hq-automation .automation-field-theirs .automation-field-control {
  outline: 2px dashed var(--color-flag-rule);
  outline-offset: 2px;
}

.hq-automation .automation-small-field {
  display: inline-block;
  width: 6rem;
}

.hq-automation .automation-save {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin: 0;
}

.hq-automation .automation-tick {
  display: flex;
  gap: var(--space-2);
  align-items: baseline;
}

.hq-automation .automation-tick-more {
  margin: 0 0 var(--space-3) var(--space-6);
}

.hq-automation .automation-pattern {
  max-width: 16rem;
}

/* The pattern is the machine's words, in mono as the board has it. */
.hq-automation .automation-pattern input {
  font-family: var(--font-mono);
}

.hq-automation .automation-change-line {
  display: block;
}

/* On a phone the facts stack, and the tables scroll inside their column rather than squeeze each
   cell to a word a line; the page never scrolls sideways. */
@media (max-width: 640px) {
  .hq-automation .automation-table {
    min-width: 46rem;
  }

  .hq-automation .automation-facts {
    grid-template-columns: 1fr;
  }

  .hq-automation .automation-field {
    grid-template-columns: 1fr;
  }

  .hq-automation .automation-field-key,
  .hq-automation .automation-field-mark {
    grid-column: 1;
  }
}

/* A section's title with a label beside it ("Everyone's assistants · ADMINISTRATORS"), under the one
   ink rule. */
.hq-automation .automation-h2-with {
  display: flex;
  align-items: baseline;
  gap: var(--space-3);
}

.hq-automation .automation-row-acts {
  display: inline-flex;
  align-items: baseline;
  gap: var(--space-4);
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* *Disconnect*: red words, since it can't be undone; the dialog's button is the danger button. */
.hq-automation .automation-danger .button-link,
.hq-proposals .automation-danger .button-link {
  color: var(--color-danger);
}

.hq-automation .automation-touched {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.hq-automation .automation-assistant-mark {
  margin-top: calc(-1 * var(--space-4));
}

/* **A token, shown this once**: in a box of its own, the token in mono, *Copy* beside it. */
.automation-token {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-2);
  padding: var(--space-4) var(--space-5);
  border: var(--hairline) solid var(--color-ink);
  background: var(--color-surface);
  max-width: 46rem;
}

.automation-token .lbl {
  font-family: var(--font-mono);
  font-size: var(--text-mono-label);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--color-meta);
}

.automation-token-line {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  max-width: 100%;
}

.automation-token-line code {
  padding: var(--space-2) var(--space-3);
  border: var(--hairline) solid var(--color-line);
  background: var(--color-bg);
  overflow-wrap: anywhere;
  user-select: all;
}

/* **Connect your assistant** (assist 4): under the token, a line per app, what to paste where, each
   thing to paste in the token's own box with its *Copy*. A hairline above it, no second rule. */
.automation-connect {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  align-self: stretch;
  margin-top: var(--space-2);
  padding-top: var(--space-3);
  border-top: var(--hairline) solid var(--color-line);
}

.automation-connect-apps {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: var(--space-3) var(--space-5);
  margin: 0;
}

.automation-connect-apps dt {
  font-weight: var(--weight-medium);
}

.automation-connect-apps dd {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin: 0;
  min-width: 0;
}

.automation-connect-apps p {
  margin: 0;
}

.automation-paste code {
  font-size: var(--text-mono-sm);
}

/* **An assistant's mode** (assist 4, `mode.rs`): in a cell or a fact, the mode in force, what
   follows it under it, and *Change* or *Lower* after it. */
.hq-automation .automation-mode {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 var(--space-3);
}

.hq-automation .automation-mode-then {
  flex-basis: 100%;
  font-size: var(--text-sm);
}

/* The dialog: where it stands now, then a row per mode, its name in mono, what it does, its
   buttons. */
.hq-automation .automation-mode-now {
  margin: 0 0 var(--space-3);
}

/* Where the dialog's focus opens, so a key pressed on opening raises nothing; not a control. */
.hq-automation .automation-mode-now:focus {
  outline: none;
}

.hq-automation .automation-mode-sooner {
  margin: 0 0 var(--space-3);
  font-weight: var(--weight-medium);
}

.hq-automation .automation-modes {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: var(--space-4) var(--space-5);
  margin: 0;
}

.hq-automation .automation-modes dt {
  padding-top: var(--space-1);
}

.hq-automation .automation-modes dd {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-2);
  margin: 0;
}

.hq-automation .automation-modes p {
  margin: 0;
}

.hq-automation .automation-mode-acts,
.hq-automation .automation-mode-until {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) var(--space-3);
}

/* At a phone's width each mode's name stands over what it does, so the words have the width. */
@media (max-width: 640px) {
  .hq-automation .automation-modes,
  .automation-connect-apps {
    grid-template-columns: 1fr;
    row-gap: var(--space-1);
  }

  .hq-automation .automation-modes dd,
  .automation-connect-apps dd {
    margin-bottom: var(--space-3);
  }
}

/* **A table that stacks at a phone's width** (the Workflows list, the Assistants tab, as automation
   2's verification leaned): each row a block, its first cell first, then a line per cell with
   something to say, its column's word before it, so what a row says of trouble stays in view. */
@media (max-width: 640px) {
  .hq-automation .automation-table.automation-stacks {
    min-width: 0;
  }

  .hq-automation .automation-stacks thead {
    display: none;
  }

  .hq-automation .automation-stacks,
  .hq-automation .automation-stacks tbody,
  .hq-automation .automation-stacks tr,
  .hq-automation .automation-stacks td {
    display: block;
  }

  .hq-automation .automation-stacks tr {
    padding: var(--space-3) 0;
    border-bottom: var(--hairline) solid var(--color-line);
  }

  .hq-automation .automation-stacks td {
    padding: var(--space-1) 0;
    border-bottom: 0;
    text-align: left;
  }

  /* A cell with nothing to say is left out of the block. */
  .hq-automation .automation-stacks td.automation-nothing {
    display: none;
  }

  .hq-automation .automation-stacks td[data-label]::before {
    content: attr(data-label);
    display: block;
    font-family: var(--font-mono);
    font-size: var(--text-mono-sm);
    letter-spacing: var(--tracking-label);
    text-transform: uppercase;
    color: var(--color-meta);
  }

  .hq-automation .automation-stacks .automation-end,
  .hq-automation .automation-stacks .automation-row-acts {
    text-align: left;
    justify-content: flex-start;
  }
}

/* **The Proposals tab** (`proposals.rs`): *Yours* first, a group per assistant with its *Outgoing*,
   then a group per workflow; every proposal a row on one grid (calm 2b), a longer one opening in
   place under its row. Scoped to `.hq-proposals`. One line per section: a group's head carries its
   ink rule above, never below. */

.hq-proposals {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.hq-proposals .back {
  margin: 0;
  font-size: var(--text-sm);
}

.hq-proposals .who {
  font-family: var(--font-mono);
  font-size: var(--text-mono);
  letter-spacing: var(--tracking-mono);
  text-transform: uppercase;
  color: var(--color-meta);
}

.hq-proposals .lbl {
  font-family: var(--font-mono);
  font-size: var(--text-mono-label);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--color-ink);
}

/* A request's verb, in sentence case and the row's own face (found-278), a little heavier. */
.hq-proposals .verb {
  font-weight: var(--weight-medium);
}

.hq-proposals .mono {
  font-family: var(--font-mono);
  font-size: var(--text-mono-number);
}

.hq-proposals .proposals-section {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.hq-proposals .proposals-section-head,
.hq-proposals .proposals-group-head {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: var(--space-3);
  padding-top: var(--space-3);
  border-top: var(--rule-strong) solid var(--color-ink);
}

.hq-proposals .proposals-section-head h2,
.hq-proposals .proposals-group-head h2 {
  margin: 0;
  font-size: var(--text-display-5);
  font-weight: var(--weight-regular);
  line-height: var(--leading-section);
}

/* An assistant's group under *Yours*: its name, no second ink rule. */
.hq-proposals .proposals-group-head-yours {
  border-top: 0;
  padding-top: 0;
}

.hq-proposals .proposals-group-head h3 {
  margin: 0;
  font-size: var(--text-md);
  font-weight: var(--weight-medium);
}

.hq-proposals .proposals-group-end {
  margin-left: auto;
  display: inline-flex;
  align-items: baseline;
  gap: var(--space-4);
  flex-wrap: wrap;
}

.hq-proposals .proposals-all {
  display: inline-flex;
  align-items: baseline;
  gap: var(--space-1);
}

.hq-proposals .proposals-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.hq-proposals .proposals-unpicked,
.hq-proposals .proposals-said,
.hq-proposals .proposals-more {
  margin: 0;
  font-size: var(--text-sm);
}

.hq-proposals .proposals-said {
  max-width: 48rem;
}

.hq-proposals .proposals-items {
  display: flex;
  flex-direction: column;
}

.hq-proposals .proposals-hidden {
  display: none;
}

/* **A row, on one grid** (calm 2b, `ask-127`): what it is about, what it asks, its reason, its date
   and id, its buttons, on a hairline; every row's columns the same widths, so *Record*, *On its
   order ›* and *Dismiss* stand in the same places down the page. Unscoped, since *Decided* draws its
   rows on it on an assistant's page too. Under the row, from the second column: the words a customer
   would read, and what a longer one opens to, plain and indented, with no border and no fill. */
.proposal-line {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 4fr) minmax(0, 4fr) 10rem 20rem;
  column-gap: var(--space-4);
  row-gap: var(--space-2);
  align-items: baseline;
  padding: var(--space-3) 0;
  border-bottom: var(--hairline) solid var(--color-line);
}

.proposal-line > .proposal-row-about { grid-area: 1 / 1; }
.proposal-line > .proposal-row-what { grid-area: 1 / 2; }
.proposal-line > .proposal-row-why { grid-area: 1 / 3; }
.proposal-line > .proposal-row-when { grid-area: 1 / 4; }
.proposal-line > .proposal-row-acts { grid-area: 1 / 5; }

/* Under the row: from the column of what it asks to the end. */
.proposal-line > :not(.proposal-row-about, .proposal-row-what, .proposal-row-why, .proposal-row-when, .proposal-row-acts) {
  grid-column: 2 / -1;
}

/* The order's customer, on a line of its own under the order. */
.proposal-row-customer {
  display: block;
}

/* What it is about, the checkbox before it while its group is selecting. */
.proposal-line .proposals-pick {
  margin: 0 var(--space-2) 0 0;
}

/* **The reason, cut to a line where the row opens**, whole once it is open; a row that does not
   open keeps its reason whole. */
.proposal-line-opens > .proposal-row-why {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.proposal-line-open > .proposal-row-why {
  white-space: normal;
}

.proposal-line .proposal-row-when {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  column-gap: var(--space-2);
}

.proposal-line .proposal-row-when .proposal-id {
  margin-left: 0;
}

/* **The row's fold**: `ativv_ui::Fold`'s head and nothing of its frame, its name in the row's type. */
.proposal-line .proposal-fold > .fold-head {
  flex-wrap: nowrap;
  align-items: baseline;
  gap: var(--space-2);
  padding: 0;
  border: 0;
  background: none;
}

.proposal-line .proposal-fold .fold-name {
  font: inherit;
  color: inherit;
}

.proposal-line .proposal-fold .fold-toggle {
  flex: none;
  color: var(--color-meta);
}

/* **What a longer one opens to**: its changes a line each, its effect, what recording it would do,
   indented under what it asks, in the page's type. */
.proposal-opened {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding-left: var(--space-6);
}

.proposal-opened[hidden] {
  display: none;
}

.proposal-changes {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.proposal-line .proposal-row-acts {
  white-space: nowrap;
  display: flex;
  gap: var(--space-2) var(--space-4);
  align-items: baseline;
  justify-content: flex-end;
  flex-wrap: wrap;
  font-size: var(--text-sm);
}

/* The middle place, *Open* or *On its order ›* or neither: as wide as its widest words on every row,
   the unseen widest words and what the row offers in one cell, so *Record* and *Dismiss* stand where
   they do on every row (ask-88). */
.proposal-act-slot {
  display: inline-grid;
  justify-items: center;
}

.proposal-act-slot > * {
  grid-area: 1 / 1;
}

.proposal-act-gap {
  visibility: hidden;
}

.hq-proposals .proposal-row-off {
  color: var(--color-muted);
}

.hq-proposals .proposal-row-drawer,
.hq-proposals .proposal-row-refusal {
  text-align: right;
  white-space: normal;
}

/* *Outgoing*, under the assistant that caused it. */
.hq-proposals .proposals-outgoing {
  display: flex;
  flex-direction: column;
  margin-top: var(--space-2);
}

.hq-proposals .proposals-outgoing-head {
  display: flex;
  align-items: baseline;
  gap: var(--space-3);
  padding-bottom: var(--space-2);
  border-bottom: var(--hairline) solid var(--color-line);
  font-size: var(--text-sm);
}

/* *Not proposed*, under Asana attaches (assist 4): the order, then why across the rest of the row,
   which has no buttons. */
@media (min-width: 641px) {
  .hq-proposals .proposals-unproposed .proposal-row-why {
    grid-column: 2 / -1;
  }
}

/* *Decided* (assist 4b): what one of your assistants decided under your mode, under it beside
   *Outgoing* and on its own page under *What it did*. A count whose list opens, a row each on a
   hairline: what it asked, what became of it and in which mode, its page. */
.automation-decided {
  margin-top: var(--space-2);
  font-size: var(--text-sm);
}

.automation-decided > summary {
  cursor: pointer;
  padding-bottom: var(--space-2);
  border-bottom: var(--hairline) solid var(--color-line);
}

.automation-decided > summary::marker {
  color: var(--color-meta);
}

.automation-decided > summary > * + * {
  margin-left: var(--space-3);
}

.automation-decided .lbl {
  white-space: nowrap;
}

.automation-decided .verb {
  font-family: var(--font-mono);
  font-size: var(--text-mono-label);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  font-weight: var(--weight-medium);
}

.automation-decided-page {
  white-space: nowrap;
}

/* *Open* on a new customer (assist 4b): the rest of what it makes, under its two fields. */
.automation-intake-rest {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  margin-top: var(--space-3);
}

/* A proposal's own page: the card, the one place a proposal is still drawn as one. */
.hq-proposals .proposal-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  max-width: 48rem;
  padding: var(--space-4) var(--space-5);
  border: var(--hairline) solid var(--color-line);
  border-radius: var(--radius-card);
  background: var(--color-bg);
}

.hq-proposals .proposal-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-2);
}

.hq-proposals .proposal-head > .proposal-head {
  flex: 1;
}

.hq-proposals .proposal-about {
  font-weight: var(--weight-medium);
  font-size: var(--text-md);
}

.hq-proposals .proposal-who {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-1);
}

.hq-proposals .proposal-when {
  margin-left: auto;
}

/* **A proposal's id, quietly** (assist 4; the trials' suggestion 30): its first eight characters in
   small grey mono, after its time or its why, a reference and never a heading; a click selects it
   whole. */
.hq-proposals .proposal-id {
  font-family: var(--font-mono);
  font-size: var(--text-mono-sm);
  letter-spacing: var(--tracking-mono);
  color: var(--color-meta);
  white-space: nowrap;
  user-select: all;
  margin-left: var(--space-2);
}

.hq-proposals .proposals-outgoing-head .lbl {
  white-space: nowrap;
}

.hq-proposals .proposal-asks {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

/* The words a customer would read, as the email will quote them. */
.hq-proposals .proposal-quoted {
  margin: 0;
  padding: var(--space-2) var(--space-3);
  border-left: var(--rule-strong) solid var(--color-ink);
}

.hq-proposals .proposal-quoted p {
  margin: var(--space-1) 0 0;
  white-space: pre-wrap;
}

.hq-proposals .proposal-why,
.hq-proposals .proposal-effect {
  margin: 0;
}

.hq-proposals .proposal-dry,
.hq-proposals .proposal-text {
  margin: 0;
  font-size: var(--text-meta);
  white-space: pre-wrap;
}

.hq-proposals .proposal-dry ul {
  margin: var(--space-1) 0 0;
  padding-left: var(--space-4);
}

.hq-proposals .proposal-settled {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-1);
}

.hq-proposals .proposal-settled p {
  margin: 0;
}

.hq-proposals .proposal-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-4);
}

.hq-proposals .proposal-why-not,
.hq-proposals .proposal-in-drawer {
  margin: 0;
  font-size: var(--text-meta);
}

/* On a phone each row stacks what it is about, what it asks, why, when, then its buttons, what it
   opens to under them; a proposal's own page puts *Record* and *Open* full width at its foot. */
@media (max-width: 640px) {
  .proposal-line {
    grid-template-columns: minmax(0, 1fr);
    row-gap: var(--space-1);
  }

  /* `:is` takes the cells' own placement's weight, so this, later, wins. */
  .proposal-line > :is(.proposal-row-about, *) {
    grid-area: auto / 1;
  }

  .proposal-opened {
    padding-left: var(--space-4);
  }

  .proposal-line .proposal-row-acts,
  .hq-proposals .proposal-row-drawer {
    justify-content: flex-start;
    text-align: left;
    padding-top: var(--space-1);
  }

  .hq-proposals .proposals-group-end {
    margin-left: 0;
  }

  .proposals-own .proposal-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .proposals-own .proposal-actions .button:not(.button-link) {
    width: 100%;
    justify-content: center;
  }

  .proposals-own .proposal-actions .button-link {
    align-self: center;
  }
}

/* **The drop page** (`/drop`): who asked for what, then one place to pick or drop the file, wide
   enough to hit with a thumb; the file input itself hidden under its label, as on Add an item. */
.drop-page {
  max-width: 40rem;
}

.drop-page .drop-asked {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.drop-page .drop-asked p {
  margin: 0;
}

.drop-page .drop-asked-who {
  font-size: var(--text-lg);
}

.drop-page .drop-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-8) var(--space-4);
  border: var(--hairline) dashed var(--color-meta);
  border-radius: var(--radius-card);
  text-align: center;
}

.drop-page .drop-zone-dropping {
  border-color: var(--color-ink);
  outline: var(--hairline) dashed var(--color-ink);
  outline-offset: var(--space-1);
}

.drop-page .drop-pick {
  min-height: 3rem;
  padding-inline: var(--space-6);
}

.drop-page .drop-or {
  margin: 0;
}

.drop-page .drop-input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.drop-page .drop-done {
  margin: 0;
  font-size: var(--text-lg);
}
