/* ==========================================================================
   THE PUBLIC SHELL AND THE DISCOVERY PAGES
   Depends on tokens.css and app.css. Loaded by every generated page.

   app.css owns the base, the page frame and the transaction; this file owns
   what the public pages add — the wordmark, the masthead navigation, Home's
   job rows, and the plain facts pages (pricing, help, receive, pass).

   Nothing here restyles the transaction. The one larger display size,
   --size-hero, is for the public pages' H1 and never reaches an operational
   page: the send page keeps its own --size-display heading.
   ========================================================================== */

/* --- Wordmark -------------------------------------------------------------
   The smallest credible treatment: the existing sheet mark and the name, with
   the product word carried by weight alone. No colour, no logotype. */
.brand__word { color: var(--ink-muted); font-weight: var(--weight-medium); }
.brand__fax { color: var(--ink); font-weight: var(--weight-strong); }

/* --- Masthead navigation ----------------------------------------------- */
.masthead__inner { flex-wrap: wrap; row-gap: 0; }
.masthead__nav { display: flex; flex-wrap: wrap; margin-inline-end: calc(-1 * var(--space-cosy)); }
.masthead__nav a {
  display: inline-flex; align-items: center;
  min-block-size: var(--tap);
  padding: 0 var(--space-cosy);
  color: var(--ink-muted);
  font-size: var(--size-support);
  font-weight: var(--weight-medium);
  text-decoration: none;
}
.masthead__nav a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }
/* The current page is marked by weight and an underline, never colour alone. */
.masthead__nav a[aria-current="page"] {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
}

/* --- Public page frame ---------------------------------------------------- */
.public {
  max-width: 62rem; margin: 0 auto;
  padding: var(--space-wide) var(--space-base) var(--space-page);
}
@media (min-width: 56rem) { .public { padding-top: var(--space-vast); } }

.display {
  font-size: var(--size-hero);
  letter-spacing: var(--track-display);
  line-height: var(--leading-tight);
  /* At large text on a narrow screen one word — the wordmark in "TemporaryFax
     pricing." — is wider than the column; it breaks rather than push the page
     sideways. Only a word that cannot fit is ever broken. */
  overflow-wrap: break-word;
}

.public a:not(.job) { color: var(--signal); text-underline-offset: 3px; }
.public a:not(.job):hover { color: var(--signal-sunk); }
/* A task page's own content links — "All prices", "Back to your inbox" — in
   the same colour. Without this they were the browser's default blue, 1.97:1
   on the dark theme (Stage 7 PR 1). A link with a class (a button) keeps its own. */
.page a:not([class]) { color: var(--signal); text-underline-offset: 3px; }
.page a:not([class]):hover { color: var(--signal-sunk); }

/* --- Home: the chooser ---------------------------------------------------- */
.chooser { max-width: 40rem; }
.chooser__lede { margin-top: var(--space-snug); font-size: var(--size-title); color: var(--ink-muted); }
.chooser__promise {
  margin-top: var(--space-roomy);
  font-size: var(--size-support);
  color: var(--ink-muted);
}

.jobs {
  list-style: none; margin: var(--space-roomy) 0 0; padding: 0;
  display: grid; gap: var(--space-cosy);
}

/* One row, one link. The whole row is the tap target, so there is nothing to
   miss; the focus ring is the base one from app.css, drawn around the row. */
.job {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: var(--space-base);
  row-gap: var(--space-tight);
  min-block-size: calc(var(--tap) + var(--space-roomy));
  padding: var(--space-base) var(--space-base) var(--space-base) var(--space-roomy);
  border: var(--hair) solid var(--rule-strong);
  border-radius: var(--radius-md);
  background: var(--paper);
  color: var(--ink);
  text-decoration: none;
  transition: border-color var(--dur-quick) var(--ease), background var(--dur-quick) var(--ease);
}
.job:hover { border-color: var(--signal); background: var(--signal-wash); }
.job:focus-visible { outline-offset: 3px; }

.job__name {
  grid-column: 1;
  font-size: var(--size-title);
  font-weight: var(--weight-strong);
  line-height: var(--leading-snug);
}
.job__terms { grid-column: 1; font-size: var(--size-support); color: var(--ink-muted); }
.job__status {
  grid-column: 1; justify-self: start;
  font-size: var(--size-micro);
  font-weight: var(--weight-medium);
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--state-held);
}
.job__go {
  grid-column: 2; grid-row: 1 / span 3; align-self: center;
  font-size: var(--size-title);
  color: var(--ink-muted);
}

/* A job a visitor can buy now: a heavier rule and the raised paper, nothing
   louder. Every row on sale carries it alike, so it marks what can be bought,
   never which job ranks first (Stage 6 Frontend PR 7). */
.job--on-sale {
  border: 2px solid var(--ink);
  background: var(--paper-raised);
  padding-inline-start: calc(var(--space-roomy) - 1px);
}
.job--on-sale .job__go { color: var(--ink); }

/* --- Sections below the fold --------------------------------------------- */
.section {
  margin-top: var(--space-vast);
  padding-top: var(--space-roomy);
  border-top: var(--hair) solid var(--rule);
  display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-cosy);
  max-width: 48rem;
}
.section h2 { font-size: var(--size-title); }
.section h3 { font-size: var(--size-body); margin-top: var(--space-snug); }
.section p, .section li { font-size: var(--size-support); color: var(--ink-muted); }

.how { display: grid; gap: var(--space-base); }
.how h3 { font-size: var(--size-body); margin-bottom: var(--space-tight); }
.how p { font-size: var(--size-support); color: var(--ink-muted); }
@media (min-width: 56rem) {
  .how { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-roomy); }
}

.summary { margin: 0; display: grid; gap: var(--space-snug); }
.summary div { display: grid; gap: var(--space-hair); }
.summary dt { font-weight: var(--weight-medium); font-size: var(--size-support); }
.summary dd { margin: 0; font-size: var(--size-support); color: var(--ink-muted); }

/* --- Facts pages ---------------------------------------------------------- */
/* `minmax(0, 1fr)`, not the implicit `auto`: an auto track is as wide as its
   widest unbreakable child, and at large text sizes on a narrow screen that
   pushed the whole page sideways. */
.prose-page { max-width: 44rem; display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-base); }
/* A long machine fact — the status link's prefix — may break anywhere rather
   than widen the page. */
.prose-page .fact { overflow-wrap: anywhere; }
.prose-page > .section { max-width: none; }
.lede { font-size: var(--size-title); color: var(--ink-muted); line-height: var(--leading-snug); }

.points { margin: 0; padding-inline-start: 1.25em; display: grid; gap: var(--space-snug); }
.points li { font-size: var(--size-support); color: var(--ink-muted); }

/* Not on sale: said in words, on a wash, with a rule — never by colour alone. */
.status {
  padding: var(--space-snug) var(--space-cosy);
  border-left: 2px solid var(--state-held);
  background: var(--state-held-wash);
  font-size: var(--size-support);
  color: var(--ink);
}
.status__tag {
  margin-inline-end: var(--space-tight);
  font-weight: var(--weight-strong);
  color: var(--state-held);
}

/* A price table: rules, not a card. Prices align on the decimal by
   tabular figures; a narrow screen wraps the header text, never the page. */
.facts { border-collapse: collapse; inline-size: 100%; font-size: var(--size-support); }
.facts caption {
  caption-side: top; text-align: left;
  padding-bottom: var(--space-snug);
  color: var(--ink-muted);
}
.facts th, .facts td {
  padding: var(--space-snug) var(--space-cosy) var(--space-snug) 0;
  border-bottom: var(--hair) solid var(--rule);
  text-align: left; vertical-align: baseline;
}
.facts thead th {
  font-size: var(--size-micro);
  font-weight: var(--weight-medium);
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--ink-muted);
  border-bottom-color: var(--rule-strong);
  overflow-wrap: anywhere;
}
.facts tbody th { font-weight: var(--weight-regular); }
.facts td:last-child { text-align: right; padding-inline-end: 0; }
.facts thead th:last-child { text-align: right; padding-inline-end: 0; }

.terms { margin: 0; display: grid; border-top: var(--hair) solid var(--rule); }
.terms div {
  display: flex; flex-wrap: wrap; gap: var(--space-tight) var(--space-cosy);
  padding: var(--space-snug) 0;
  border-bottom: var(--hair) solid var(--rule);
  font-size: var(--size-support);
}
/* The label and its value side by side while there is room for both, and the
   value below the label when there is not — no breakpoint to keep in step. */
.terms dt { flex: 0 0 6rem; font-weight: var(--weight-medium); }
.terms dd { flex: 1 1 12rem; margin: 0; color: var(--ink-muted); }

.question { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-snug); padding-top: var(--space-roomy); border-top: var(--hair) solid var(--rule); }
.question h2 { font-size: var(--size-title); }
.question p, .question li { font-size: var(--size-support); color: var(--ink-muted); max-width: var(--measure); }

/* The footer is the shell's now: its links get the same tap target as the
   masthead's, which app.css never gave them. */
.foot__links a { display: inline-flex; align-items: center; min-block-size: var(--tap); }

/* The facts on the send page's aside reuse the table, inside its prose. */
.aside .facts { margin-block: var(--space-snug); }

/* ==========================================================================
   RECEIVE (Stage 6 Frontend PR 4) — the start, and the private task pages
   ========================================================================== */

/* --- /receive: the plan chooser ---------------------------------------------
   Three native radios, each a whole row to press: the name, the term and
   allowance as machine facts, the price. Rules and a wash, never a card deck;
   the chosen row is marked by a heavier rule AND a filled dot, never colour
   alone. */
.buy { display: grid; gap: var(--space-roomy); max-width: 32rem; }
.plans { display: grid; gap: var(--space-snug); margin: 0; padding: 0; border: 0; min-inline-size: 0; }
.plans__legend {
  margin-bottom: var(--space-snug);
  padding: 0;
  font-size: var(--size-body);
  font-weight: var(--weight-strong);
}
.plan {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  column-gap: var(--space-cosy);
  min-block-size: calc(var(--tap) + var(--space-base));
  padding: var(--space-cosy) var(--space-base);
  border: var(--hair) solid var(--rule-strong);
  border-radius: var(--radius-md);
  background: var(--paper);
  cursor: pointer;
  transition: border-color var(--dur-quick) var(--ease), background var(--dur-quick) var(--ease);
}
.plan:hover { border-color: var(--signal); }
.plan input {
  inline-size: 1.125rem; block-size: 1.125rem;
  margin: 0;
  accent-color: var(--signal);
}
.plan:has(input:checked) {
  border: 2px solid var(--signal);
  padding: calc(var(--space-cosy) - 1px) calc(var(--space-base) - 1px);
  background: var(--signal-wash);
}
.plan:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; }
.plan__body { display: grid; gap: var(--space-hair); min-inline-size: 0; }
.plan__name { font-weight: var(--weight-strong); }
.plan__terms { font-size: var(--size-support); color: var(--ink-muted); overflow-wrap: anywhere; }
.plan__price { text-align: right; white-space: nowrap; }
.plan__price .fact { font-size: var(--size-title); font-weight: var(--weight-medium); }
.plan__once { display: block; font-size: var(--size-micro); color: var(--ink-muted); }
.buy .btn--primary { inline-size: 100%; }
.buy__note {
  padding: var(--space-cosy);
  border-radius: var(--radius-sm);
  background: var(--state-stop-wash);
  border: var(--hair) solid color-mix(in srgb, var(--state-stop) 32%, transparent);
  font-size: var(--size-support);
}
.buy__terms { font-size: var(--size-support); color: var(--ink-muted); }
.buy__sent {
  display: grid; gap: var(--space-cosy); justify-items: start;
  max-width: 32rem;
  padding: var(--space-base);
  border-left: 2px solid var(--state-good);
  background: var(--state-good-wash);
}
.buy__sent-title { font-size: var(--size-title); }
.buy__sent-title:focus { outline: none; }
.buy__sent p { font-size: var(--size-support); color: var(--ink-muted); }

/* --- The task pages: one column, the transaction panel alone -------------- */
@media (min-width: 56rem) {
  .page.task { display: block; }
}
.task > div { max-width: 36rem; margin-inline: auto; }
.task .state__headline:focus { outline: none; }
.task .terms dd { overflow-wrap: anywhere; }
.recover { display: grid; gap: var(--space-cosy); }
.task .btn--primary[href] { text-decoration: none; text-align: center; }

/* The number, once it is the customer's: the visual subject of the page.
   Monospace, large, and free to wrap at 200% text rather than widen it. */
.number {
  display: grid; gap: var(--space-tight);
  padding: var(--space-base) 0;
  border-top: var(--hair) solid var(--rule);
  border-bottom: var(--hair) solid var(--rule);
}
.number__label {
  font-size: var(--size-micro);
  font-weight: var(--weight-medium);
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--ink-muted);
}
.number__value {
  font-size: clamp(1.5rem, 1.1rem + 2vw, 2rem);
  font-weight: var(--weight-medium);
  letter-spacing: 0.02em;
  overflow-wrap: anywhere;
}
.number__value--ended { font-family: var(--font-text); font-size: var(--size-title); letter-spacing: normal; }
.number__note { font-size: var(--size-support); color: var(--ink-muted); }
.pay__lead { font-size: var(--size-body); }

/* --- The inbox ------------------------------------------------------------ */
.inbox { display: grid; gap: var(--space-base); padding: var(--space-roomy) var(--space-base); }
.receiving {
  padding: var(--space-snug) var(--space-cosy);
  border-left: 2px solid var(--rule-strong);
  font-size: var(--size-support);
}
.inbox__title { font-size: var(--size-title); margin-top: var(--space-snug); }
.faxes { list-style: none; margin: 0; padding: 0; border-top: var(--hair) solid var(--rule); }
.faxes li {
  display: flex; flex-wrap: wrap; gap: var(--space-tight) var(--space-snug);
  align-items: baseline;
  padding: var(--space-cosy) 0;
  border-bottom: var(--hair) solid var(--rule);
}
.faxes a {
  display: inline-flex; align-items: center;
  min-block-size: var(--tap);
  color: var(--signal);
  text-underline-offset: 3px;
}
.faxes span { color: var(--ink-muted); font-family: var(--font-fact); font-size: var(--size-support); overflow-wrap: anywhere; }
.empty { color: var(--ink-muted); font-size: var(--size-support); }
