/*
  Index Backlinks: the working pages (account, dashboard, legal).
  The homepage is styled by the design kit and page.css alone. These rules add
  what a working page needs on top of the kit, using only the kit's tokens:
  no new colour, size or radius is introduced here.
*/

/* ── the frame of a working page ──
   The kit makes every section directly inside <main> exactly one screen tall (its homepage is a stack
   of screens). A working page is as long as its content, so its block is a plain .page: the same top
   and bottom padding the kit's sections take, and at least most of a screen so a short page's footer
   does not ride up. */
main > .page { padding: var(--padt) 0 var(--padb); min-height: 72vh; min-height: 72svh; }

/* ── account pages: a title and its purpose at the left, the form at the right ── */

.account .form { grid-template-columns: minmax(0, 1fr); max-width: 30rem; }
.account .rows { max-width: 26rem; }
.account__email { overflow-wrap: anywhere; }

/* what goes in a field, under it: read before typing, so it is never a placeholder */
.field__hint { margin: 0; font: 400 var(--t-small)/1.4 var(--font-text); color: var(--muted); }

/* a refusal: the kit's error colour and mark, the same as under a field */
.form__alert {
  --error: color-mix(in oklab, #d92d20 72%, var(--ink));
  grid-column: 1 / -1; margin: 0; font: 500 var(--t-small)/1.4 var(--font-text); color: var(--error);
}
.form__alert::before {
  content: "!"; display: inline-grid; place-items: center; width: 16px; height: 16px; margin-right: var(--s-2);
  border-radius: 50%; background: var(--error); color: var(--bg); font-size: 12px; line-height: 1; vertical-align: -2px;
}

/* a link inside a sentence: underlined, in the text's own colour (the kit's .link, with its arrow, is for a link standing alone) */
.text-link { color: inherit; text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 0.2em; }
.text-link:hover { text-decoration-color: currentColor; }

/* a button that is waiting for an answer */
.btn[disabled], .ui-btn[disabled] { opacity: 0.6; cursor: progress; }

/* ── the site's pictograms (src/lib/icons.ts), on every page ──
   Drawn inline, so a pictogram takes the colour of the words it stands beside; its one accent piece
   takes the accent. They are decoration: the words carry the meaning. */
.icon { flex: none; display: inline-block; vertical-align: middle; }
/* the palette's own accent, not the ground's: on the pricing band the kit turns --accent to the band's tone */
.icon__a { color: var(--p-accent); }
/* a pictogram standing alone above a title */
.icon--lead { display: block; }
/* a ring left open or not yet begun is quieter than what has happened */
.icon:is([data-pic="open"], [data-pic="queued"]) { color: var(--muted); }

/* ── legal pages: one column at the kit's reading measure, a clear step between sections ── */

.legal__section { margin-top: var(--s-7); }
.legal__section > * + * { margin-top: var(--s-3); }
.legal :is(p, h2) { overflow-wrap: break-word; }

/* ── dashboard ── */

.dash__who { overflow-wrap: anywhere; }
/* a section's title with its pictogram */
.dash__title { display: flex; align-items: center; gap: var(--s-3); }
.dash__status .icon { margin-right: var(--s-2); vertical-align: -0.15em; }
.dash .form { grid-template-columns: minmax(0, 1fr); }
.dash__password .form { max-width: 30rem; }

/* what came of the checkout: one line on the surface tone, read out as it changes */
.dash__notice { margin: 0; padding: var(--s-3) var(--s-4); border: 1px solid var(--line-strong); border-radius: var(--r-sm); background: var(--surface); }
.dash__notice:empty { display: none; }

/* the balance: the page's one large figure. Figures here are set as the homepage's rate card sets them:
   in the face's own widths (its tabular set gives the decimal point a full figure's width). */
.dash__balance { margin: 0; }
.dash :is(.t-stat, .rows__value, .dash__table) { font-variant-numeric: normal; }

/* the list to send: the kit's field, in the mono face the homepage's box uses, one URL to a line */
.field textarea.submit__urls { min-height: 14rem; font: 400 var(--t-small)/1.6 var(--font-mono); white-space: pre; overflow-x: auto; }
.submit__sum { color: var(--ink); font-weight: 500; }

/* submissions: a plain table ruled like the kit's rows. All four columns stay in view on a phone (the
   status is the one a visitor came for), so the date may wrap; the wrapper only scrolls if a browser
   cannot fit even that. */
.dash__scroll { overflow-x: auto; }
.dash__table { width: 100%; border-collapse: collapse; }
.dash__status { font-weight: 500; white-space: nowrap; }
@media (max-width: 639px) {
  .dash__table th, .dash__table td { padding-right: var(--s-3); }
}
.dash__table th { padding: 0 var(--s-4) var(--s-2) 0; border-bottom: 1px solid var(--line-strong); text-align: left; font: 500 var(--t-small)/1.4 var(--font-text); color: var(--muted); }
.dash__table td { padding: var(--s-3) var(--s-4) var(--s-3) 0; border-bottom: 1px solid var(--line); }
.dash__table :is(th, td):last-child { padding-right: 0; }

.dash__payments > li > p { color: var(--muted); }
