/* Rapid Store control plane — design system (see docs/design-system.md) */

/* Tokens. The same set, the same names and the same dark values as the store admin's
   `store/static/css/dashboard.css` — the two files are one contract (docs/design-system.md), and
   a merchant crosses between them by SSO in a single click, so one of them following the device
   while the other stayed white would read as a bug in whichever they landed on second.
   `--brand-ink` vs `--brand-600` and `--danger-fg` vs `--danger` are the load-bearing splits;
   the header comment in dashboard.css says why. `control/tests/test_dark_mode.py` sweeps this
   file for a literal that escaped. */
:root {
  color-scheme: light;
  --brand-600: #4f46e5; --brand-700: #4338ca; --brand-500: #6366f1; --brand-100: #e0e7ff; --brand-50: #eef2ff;
  --brand-ink: #4f46e5; --brand-ink-hover: #4338ca;
  --on-brand: #ffffff;
  --focus-ring: #e0e7ff;
  --accent-500: #0ea5e9;
  /* slate-500 (#64748b) is 4.76:1 on a white card and **4.34:1 on `--canvas`**, so every hint,
     filter label and back-link that sits outside a card — which is most of them — has been under
     AA since the admin was written. Nothing showed it: the contrast matrix in
     `docs/design-system.md` was only ever verified for storefront palettes. Darkened to clear 4.5
     against the canvas, which is the darkest ground muted text lands on. */
  --ink: #0f172a; --text: #1e293b; --text-2: #475569; --muted: #5e6d82;
  --border: #e2e8f0; --border-strong: #cbd5e1;
  --surface: #ffffff; --surface-2: #f8fafc; --canvas: #f1f5f9;
  --topbar-bg: rgb(255 255 255 / .92);
  --code-bg: #0f172a; --code-fg: #e2e8f0;
  --ok: #16a34a; --ok-bg: #dcfce7; --ok-fg: #166534; --ok-border: #bbf7d0;
  --warn: #d97706; --warn-bg: #fef3c7; --warn-fg: #92400e; --warn-border: #fde68a;
  --danger: #dc2626; --danger-bg: #fee2e2; --danger-fg: #991b1b; --danger-border: #fecaca;
  --danger-strong: #b91c1c;
  --info: #0ea5e9; --info-bg: #e0f2fe; --info-fg: #075985; --info-border: #bae6fd;
  /* A fourth status tint, distinct from warn on purpose: `trial_expired` and `provisioning` are
     two different things to be told about a store, and one amber for both loses that. */
  --alt-bg: #ffedd5; --alt-fg: #9a3412;
  --radius: 12px; --radius-sm: 8px; --radius-lg: 20px; --radius-pill: 999px;
  --shadow-sm: 0 1px 2px rgb(15 23 42 / .06);
  --shadow: 0 4px 16px rgb(15 23 42 / .08);
  --shadow-lg: 0 20px 50px rgb(15 23 42 / .12);
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, monospace;
  --gutter: 24px;
  /* The marketing page is dark in both modes on purpose: the theme screenshots on its wall are
     the colour, and they read as a lit wall only against a dark ground. So these are the same
     values in both blocks, and every rule under `body.marketing` paints from them. */
  --mk-bg: #15111b; --mk-bg-veil: rgb(21 17 27 / .75); --mk-bg-clear: rgb(21 17 27 / 0);
  --mk-head: rgb(21 17 27 / .9); --mk-surface: #221c2b; --mk-line: #3a3046;
  --mk-ink: #f4efe7; --mk-text: #ddd4d9; --mk-text-2: #b3a8b8; --mk-lilac: #c9bcff;
  --mk-amber: #ffb45c; --mk-amber-ink: #1c1206; --mk-frame: rgb(255 255 255 / .06);
  --mk-shadow: 0 30px 60px -20px rgb(0 0 0 / .8);
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --brand-600: #4f46e5; --brand-700: #4338ca; --brand-500: #818cf8;
    --brand-100: #2b2f5e; --brand-50: #1e2143;
    --brand-ink: #a5b4fc; --brand-ink-hover: #c7d2fe;
    --on-brand: #ffffff;
    --focus-ring: rgb(129 140 248 / .55);
    --accent-500: #38bdf8;
    --ink: #f1f5f9; --text: #dbe3ec; --text-2: #b3c0d1; --muted: #93a1b5;
    --border: #2f3b55; --border-strong: #465575;
    --surface: #131a2b; --surface-2: #1c2436; --canvas: #0b1120;
    --topbar-bg: rgb(11 17 32 / .92);
    /* The provisioning log is a terminal in both modes. It used to be `background: var(--ink)`,
       which inverts: on dark that is near-white ground under the near-white `#e2e8f0` it hard-codes
       for text, i.e. the one panel an operator reads when a tenant has failed to build. */
    --code-bg: #05080f; --code-fg: #cbd5e1;
    --ok: #16a34a; --ok-bg: #062e1c; --ok-fg: #86efac; --ok-border: #166534;
    --warn: #d97706; --warn-bg: #402009; --warn-fg: #fcd34d; --warn-border: #92400e;
    --danger: #dc2626; --danger-bg: #401014; --danger-fg: #fca5a5; --danger-border: #991b1b;
    --danger-strong: #b91c1c;
    --info: #0ea5e9; --info-bg: #062c40; --info-fg: #7dd3fc; --info-border: #075985;
    --alt-bg: #40200a; --alt-fg: #fdba74;
    --shadow-sm: 0 1px 2px rgb(0 0 0 / .5);
    --shadow: 0 4px 16px rgb(0 0 0 / .55);
    --shadow-lg: 0 20px 50px rgb(0 0 0 / .65);
    /* The marketing page is dark in both modes on purpose: the theme screenshots on its wall are
       the colour, and they read as a lit wall only against a dark ground. So these are the same
       values in both blocks, and every rule under `body.marketing` paints from them. */
    --mk-bg: #15111b; --mk-bg-veil: rgb(21 17 27 / .75); --mk-bg-clear: rgb(21 17 27 / 0);
    --mk-head: rgb(21 17 27 / .9); --mk-surface: #221c2b; --mk-line: #3a3046;
    --mk-ink: #f4efe7; --mk-text: #ddd4d9; --mk-text-2: #b3a8b8; --mk-lilac: #c9bcff;
    --mk-amber: #ffb45c; --mk-amber-ink: #1c1206; --mk-frame: rgb(255 255 255 / .06);
    --mk-shadow: 0 30px 60px -20px rgb(0 0 0 / .8);
  }
}

/* ---------------------------------------------------------------- base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 16px; line-height: 1.55; color: var(--text); background: var(--canvas); }
a { color: var(--brand-ink); text-decoration: none; }
a:hover { color: var(--brand-ink-hover); text-decoration: underline; }
/* A link inside a sentence is underlined — the same rule `store/static/css/dashboard.css` and
   `commerce.css` keep, because the two admins are meant to read as one product. The reset above
   leaves colour as the only thing saying "link", and colour alone is not a distinction every
   reader can make. Prose only, so nav, tabs, table controls and buttons are untouched. */
:is(p, li, dd, .hint, .alert, .page-intro, .card-section-desc) a:not(.btn):not(.btn-sm):not(.link):not(.badge) {
  text-decoration: underline; text-underline-offset: 2px; text-decoration-thickness: from-font;
}
h1, h2, h3, h4 { color: var(--ink); letter-spacing: -0.01em; margin: 0 0 .5em; line-height: 1.2; }
h1 { font-size: 2rem; font-weight: 700; }
h2 { font-size: 1.5rem; font-weight: 700; }
h3 { font-size: 1.125rem; font-weight: 600; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
small, .hint { font-size: .85rem; color: var(--muted); }
.muted { color: var(--muted); }
.text-2 { color: var(--text-2); }
code, .mono { font-family: var(--font-mono); font-size: .9em; background: var(--surface-2); padding: .1em .35em; border-radius: 4px; }
:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 1px; }
.skip-link { position: absolute; left: -999px; }
.skip-link:focus { left: 8px; top: 8px; background: var(--surface); color: var(--ink); padding: .5rem 1rem; z-index: 100; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

.container { max-width: 72rem; margin: 0 auto; padding: 0 var(--gutter); }
.container-narrow { max-width: 30rem; margin: 0 auto; padding: 0 var(--gutter); }
/* The gutter is repeated here on purpose. `<main class="container page">` is what base_shell
   renders, and this rule's shorthand used to reset the horizontal padding `.container` had just
   set — so every app page's main element sat hard against the window edge below 72rem. Nothing
   showed it while every page put its content inside a card or a narrow container; the cookie
   notice, which is prose straight into main, is what made it visible. */
.page { padding: 2.5rem var(--gutter) 4rem; }
.page-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
.page-header h1 { margin: 0; }
.stack > * + * { margin-top: 1rem; }
.row { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; }
.grid { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr)); }
.grid-3 { display: grid; gap: 1.25rem; grid-template-columns: repeat(3, 1fr); }
.grid-2 { display: grid; gap: 1.25rem; grid-template-columns: repeat(2, 1fr); }
@media (max-width: 800px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } :root { --gutter: 16px; } }

/* ---------------------------------------------------------------- nav */
.topbar { position: sticky; top: 0; z-index: 50; background: var(--topbar-bg); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); }
.topbar-inner { height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; }
.brand { display: inline-flex; align-items: center; gap: .6rem; font-weight: 700; color: var(--ink); font-size: 1.1rem; }
.brand:hover { text-decoration: none; color: var(--ink); }
.brand-mark { width: 30px; height: 30px; border-radius: 9px; background: linear-gradient(135deg, var(--brand-600), var(--accent-500)); display: inline-grid; place-items: center; color: var(--on-brand); font-weight: 800; font-size: .95rem; }
.nav { display: flex; align-items: center; gap: 1.25rem; }
.nav a { color: var(--text-2); font-weight: 500; }
.nav a:hover { color: var(--ink); text-decoration: none; }
.nav a.active { color: var(--brand-ink); }
.nav a.btn { color: var(--on-brand); }
.nav a.btn:hover { color: var(--on-brand); }
.nav .btn { margin-left: .25rem; }
.nav form { display: inline; }
@media (max-width: 720px) { .nav .hide-sm { display: none; } }
@media (max-width: 480px) {
  .topbar-inner { gap: .6rem; }
  .brand, .nav a, .nav button { white-space: nowrap; }
  .brand { font-size: 1rem; gap: .45rem; }
  .nav { gap: .7rem; }
  .nav .btn { padding: .45rem .65rem; margin-left: 0; }
}
/* Below this the name does not fit beside the menu; the mark stays and the link keeps its name. */
@media (max-width: 420px) {
  .brand-name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}

/* ---------------------------------------------------------------- buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; background: var(--brand-600); color: var(--on-brand); border: 1px solid transparent; border-radius: var(--radius-sm); padding: .6rem 1rem; font: inherit; font-weight: 600; font-size: .95rem; line-height: 1.2; cursor: pointer; white-space: nowrap; transition: background .15s, box-shadow .15s, transform .05s; }
.btn:hover { background: var(--brand-700); color: var(--on-brand); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--focus-ring); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }
.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--border-strong); }
.btn-secondary:hover { background: var(--surface-2); color: var(--ink); }
.btn-ghost { background: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--surface-2); color: var(--ink); }
.btn-danger { background: var(--danger); }
.btn-danger:hover { background: var(--danger-strong); }
.btn-lg { padding: .8rem 1.35rem; font-size: 1.05rem; border-radius: 10px; }
.btn-sm { padding: .4rem .7rem; font-size: .85rem; }
.btn-block { width: 100%; }
button.link { background: none; border: 0; padding: 0; color: var(--text-2); font: inherit; font-weight: 500; cursor: pointer; }
button.link:hover { color: var(--ink); }

/* The language switcher (templates/partials/_language_switcher.html). A disclosure, not a select:
   an OS-drawn select ignores the page's design, and this opens with no script. */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.lang-switch { position: relative; }
.lang-switch > summary { list-style: none; display: inline-flex; align-items: center; gap: .3rem; padding: .35rem .5rem; border-radius: var(--radius-sm); color: var(--text-2); font-weight: 500; font-size: .875rem; cursor: pointer; white-space: nowrap; }
.lang-switch > summary::-webkit-details-marker { display: none; }
.lang-switch > summary:hover, .lang-switch[open] > summary { color: var(--ink); background: var(--surface-2); }
.lang-switch > summary:focus-visible { outline: 2px solid var(--brand-600); outline-offset: 2px; }
.lang-menu { position: absolute; right: 0; top: calc(100% + .4rem); z-index: 60; width: max-content; padding: .3rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lg); }
.lang-switch .lang-menu { display: flex; flex-direction: column; align-items: stretch; gap: 0; }
.lang-menu button { text-align: left; background: none; border: 0; border-radius: var(--radius-sm); padding: .45rem .8rem; font: inherit; color: var(--text); cursor: pointer; }
.lang-menu button:hover { background: var(--surface-2); color: var(--ink); }
.lang-menu button:focus-visible { outline: 2px solid var(--brand-600); outline-offset: -2px; }
.lang-menu button[aria-current] { color: var(--brand-ink); font-weight: 600; }

/* ---------------------------------------------------------------- forms */
.field { margin-bottom: 1.1rem; }
.field label, .form label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: .35rem; color: var(--ink); }
.input, .form input:not([type=checkbox]):not([type=radio]):not([type=submit]), .form select, .form textarea,
input[type=text], input[type=email], input[type=password], input[type=number], input[type=url], input[type=tel], select, textarea {
  width: 100%; padding: .6rem .75rem; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); font: inherit; color: var(--text); background: var(--surface); transition: border-color .15s, box-shadow .15s; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand-500); box-shadow: 0 0 0 3px var(--focus-ring); }
input[aria-invalid="true"], .field.has-error input { border-color: var(--danger); }
.field .hint { display: block; margin-top: .35rem; }
.field-error, .errorlist { color: var(--danger-fg); font-size: .85rem; margin: .35rem 0 0; padding: 0; list-style: none; }
.field-check { display: flex; gap: .5rem; align-items: flex-start; }
.field-check input { width: auto; margin-top: .3rem; }
.field-check label { font-weight: 500; margin: 0; }
.form-actions { display: flex; gap: .75rem; align-items: center; margin-top: 1.25rem; flex-wrap: wrap; }
.form-footer { margin-top: 1.25rem; text-align: center; font-size: .9rem; color: var(--text-2); }
fieldset { border: 0; padding: 0; margin: 0 0 1.5rem; }
legend { font-weight: 700; color: var(--ink); margin-bottom: .75rem; font-size: 1.05rem; padding: 0; }

/* ---------------------------------------------------------------- cards / surfaces */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow-sm); }
.card + .card { margin-top: 1rem; }
.card-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.card-header h2, .card-header h3 { margin: 0; }
.card-footer { margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid var(--border); display: flex; gap: .75rem; flex-wrap: wrap; align-items: center; }
.card-hover { transition: box-shadow .15s, transform .15s; }
.card-hover:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.auth-card { max-width: 28rem; margin: 3rem auto; padding: 2rem; }
.auth-card h1 { font-size: 1.5rem; margin-bottom: .35rem; }
.auth-card .lead { color: var(--text-2); margin-bottom: 1.5rem; }
/* The authenticator QR code is a transparent SVG of black modules, so it vanishes on a dark card
   and a scanner needs a light quiet zone round it anyway: white in both modes, on purpose. */
.qr-code { display: block; width: 12rem; height: auto; margin: 0 auto 1.25rem; padding: .75rem; background: #fff; border-radius: var(--radius-sm); }
/* The account screens (allauth's manage layout): a short menu beside one card. Both boxes start
   on the same line, so `.card + .card`'s gap is cancelled; `minmax(0, 1fr)` lets a table inside
   the content scroll instead of widening the page. */
.account-layout { display: grid; grid-template-columns: 17rem minmax(0, 1fr); gap: 1.25rem; align-items: start; }
.account-layout > .card + .card { margin-top: 0; }
.account-nav { padding: .75rem; }
.account-nav-title { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: .25rem .6rem .5rem; }
.account-nav ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .15rem; }
.account-nav a { display: block; padding: .5rem .6rem; border-radius: var(--radius-sm); color: var(--text-2); font-weight: 500; line-height: 1.3; }
.account-nav a:hover { background: var(--surface-2); color: var(--ink); text-decoration: none; }
.account-nav a[aria-current="page"] { background: var(--brand-50); color: var(--brand-ink); font-weight: 600; }
.account-content > h1:first-child { font-size: 1.5rem; margin-top: 0; }
.account-content > h2 { font-size: 1.15rem; }
@media (max-width: 800px) {
  .account-layout { grid-template-columns: minmax(0, 1fr); }
  .account-nav ul { display: flex; flex-wrap: wrap; }
  .account-nav-title { display: none; }
}
.divider { display: flex; align-items: center; gap: .75rem; color: var(--muted); font-size: .85rem; margin: 1.25rem 0; }
.divider::before, .divider::after { content: ""; flex: 1; border-top: 1px solid var(--border); }

/* ---------------------------------------------------------------- badges, alerts */
.badge { display: inline-flex; align-items: center; gap: .3rem; padding: .15rem .6rem; border-radius: var(--radius-pill); font-size: .75rem; font-weight: 600; letter-spacing: .01em; background: var(--surface-2); color: var(--text-2); border: 1px solid var(--border); }
.badge-ok { background: var(--ok-bg); color: var(--ok-fg); border-color: transparent; }
.badge-warn { background: var(--warn-bg); color: var(--warn-fg); border-color: transparent; }
.badge-danger { background: var(--danger-bg); color: var(--danger-fg); border-color: transparent; }
.badge-info { background: var(--info-bg); color: var(--info-fg); border-color: transparent; }
.badge-brand { background: var(--brand-50); color: var(--brand-ink); border-color: transparent; }
.status-active { background: var(--ok-bg); color: var(--ok-fg); border-color: transparent; }
.status-provisioning { background: var(--warn-bg); color: var(--warn-fg); border-color: transparent; }
.status-trial_expired { background: var(--alt-bg); color: var(--alt-fg); border-color: transparent; }
.status-provisioning_failed, .status-suspended, .status-deleting { background: var(--danger-bg); color: var(--danger-fg); border-color: transparent; }
.alert { padding: .8rem 1rem; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--surface-2); margin-bottom: 1rem; font-size: .95rem; }
.alert-ok, .alert.success { background: var(--ok-bg); border-color: var(--ok-border); color: var(--ok-fg); }
.alert-warn, .alert.warning { background: var(--warn-bg); border-color: var(--warn-border); color: var(--warn-fg); }
.alert-danger, .alert.error { background: var(--danger-bg); border-color: var(--danger-border); color: var(--danger-fg); }
.alert-info, .alert.info { background: var(--info-bg); border-color: var(--info-border); color: var(--info-fg); }
.messages { list-style: none; padding: 0; margin: 0 0 1.25rem; }

/* ---------------------------------------------------------------- tables */
.table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.table th { text-align: left; font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; padding: .6rem .75rem; border-bottom: 1px solid var(--border); }
.table td { padding: .75rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:hover td { background: var(--surface-2); }
table:not(.table) { width: 100%; border-collapse: collapse; }
table:not(.table) th, table:not(.table) td { padding: .5rem .75rem; border-bottom: 1px solid var(--border); text-align: left; }

/* ---------------------------------------------------------------- misc components */
.steps { list-style: none; padding: 0; margin: 0; }
.step { padding: .45rem 0 .45rem 1.85rem; position: relative; color: var(--muted); }
.step::before { content: "○"; position: absolute; left: .3rem; }
.step-running { color: var(--ink); }
.step-running::before { content: "◔"; color: var(--warn); animation: spin 1.2s linear infinite; display: inline-block; }
.step-succeeded { color: var(--text-2); }
.step-succeeded::before { content: "●"; color: var(--ok); }
.step-failed { color: var(--danger-fg); }
.step-failed::before { content: "✕"; color: var(--danger); }
@keyframes spin { to { transform: rotate(360deg); } }
.progress { height: 6px; background: var(--border); border-radius: var(--radius-pill); overflow: hidden; margin: 1rem 0; }
.progress > span { display: block; height: 100%; background: linear-gradient(90deg, var(--brand-500), var(--accent-500)); transition: width .4s; }
.empty { text-align: center; padding: 3rem 1.5rem; color: var(--text-2); }
.empty .icon { font-size: 2.5rem; margin-bottom: .75rem; }
.empty h2 { margin-bottom: .35rem; }
.stat { padding: 1.25rem; }
.stat .label { font-size: .8rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.stat .value { font-size: 1.75rem; font-weight: 700; color: var(--ink); }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: .4rem 1.25rem; font-size: .95rem; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
.theme-grid { display: grid; gap: .9rem; grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); }
.theme-option { display: block; padding: 0; border: 2px solid var(--border); border-radius: var(--radius); cursor: pointer; overflow: hidden; background: var(--surface); transition: border-color .15s, box-shadow .15s; }
.theme-option:hover { border-color: var(--border-strong); }
.theme-option:has(input:checked) { border-color: var(--brand-600); box-shadow: 0 0 0 3px var(--brand-100); }
.theme-option input { position: absolute; opacity: 0; }
/* The swatch is a tiny abstract page — ground, chrome bar, three content blocks — painted from
   the theme's own palette, which `tenants/create.html` sets as custom properties per card. It
   used to be a per-theme rule here; the four themes added later had none, so their cards were
   blank white boxes and the picker offered six designs of which two were visible. */
.theme-swatch { height: 88px; display: grid; grid-template-rows: 22px 1fr; background: var(--swatch-page, var(--surface-2)); }
/* The hairline is literal: this card previews a *storefront theme's* own palette, which the
   template sets as `--swatch-*` per card, so it must not take on this page's mode. */
.theme-swatch .bar { background: var(--swatch-bar, var(--surface)); border-bottom: 1px solid rgb(0 0 0 / .08); }
.theme-swatch .blocks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 10px; }
.theme-swatch .blocks span { border-radius: 4px; background: var(--swatch-block, var(--ink)); }
.theme-body { padding: .7rem .8rem .8rem; }
.theme-name { display: block; font-weight: 600; color: var(--ink); }
.theme-desc { display: block; font-size: .8rem; color: var(--muted); margin-top: .1rem; }
.footer { border-top: 1px solid var(--border); padding: 2rem 0; color: var(--muted); font-size: .9rem; }
.footer-inner { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.footer a { color: var(--text-2); }

/* ---------------------------------------------------------------- marketing
   templates/marketing/landing.html. Dark in both modes (see the `--mk-*` tokens), with its own
   type: Gloock for headings, Instrument Sans for text, loaded by that page alone. Every class is
   `mk-` so nothing here can restyle an app screen, and the shell's topbar and footer are re-painted
   from `body.marketing` rather than forked. */
body.marketing { background: var(--mk-bg); color: var(--mk-text); color-scheme: dark; font-family: "Instrument Sans", var(--font); font-size: 17px; line-height: 1.65; }
body.marketing h1, body.marketing h2, body.marketing h3 { font-family: "Gloock", Georgia, "Times New Roman", serif; font-weight: 400; color: var(--mk-ink); letter-spacing: 0; text-wrap: balance; margin: 0; }
body.marketing p { margin: 0; }
body.marketing a { color: var(--mk-amber); }
body.marketing a:focus-visible, body.marketing summary:focus-visible { outline: 2px solid var(--mk-amber); outline-offset: 3px; }
body.marketing .topbar { background: var(--mk-head); border-bottom-color: var(--mk-line); }
body.marketing .brand, body.marketing .brand:hover { color: var(--mk-ink); font-family: "Gloock", Georgia, serif; font-weight: 400; font-size: 1.4rem; white-space: nowrap; }
body.marketing .brand-mark { background: var(--mk-amber); color: var(--mk-amber-ink); font-weight: 400; font-size: 1.15rem; border-radius: 7px; }
body.marketing .nav { gap: .35rem; }
body.marketing .nav a { color: var(--mk-ink); padding: .45rem .7rem; border-radius: 4px; white-space: nowrap; }
body.marketing .nav a:hover { background: var(--mk-surface); color: var(--mk-ink); }
body.marketing .nav a.mk-btn { color: var(--mk-amber-ink); padding: .55rem 1rem; margin-left: .35rem; }
body.marketing .nav a.mk-btn:hover { background: var(--mk-amber); color: var(--mk-amber-ink); }
body.marketing .footer { border-top-color: var(--mk-line); color: var(--mk-text-2); }
body.marketing .footer a { color: var(--mk-text-2); }
body.marketing .footer a:hover { color: var(--mk-ink); }
body.marketing .lang-switch > summary { color: var(--mk-ink); }
body.marketing .lang-switch > summary:hover, body.marketing .lang-switch[open] > summary { background: var(--mk-surface); color: var(--mk-ink); }
body.marketing .lang-switch > summary:focus-visible, body.marketing .lang-menu button:focus-visible { outline-color: var(--mk-amber); }
body.marketing .lang-menu { background: var(--mk-surface); border-color: var(--mk-line); box-shadow: var(--mk-shadow); }
body.marketing .lang-menu button { color: var(--mk-text); }
body.marketing .lang-menu button:hover { background: var(--mk-bg); color: var(--mk-ink); }
body.marketing .lang-menu button[aria-current] { color: var(--mk-amber); }
@media (max-width: 980px) { body.marketing .nav .hide-md { display: none; } }

.mk-wrap { max-width: 76rem; margin-inline: auto; padding-inline: 24px; }
.mk-label { font-size: .75rem; letter-spacing: .16em; text-transform: uppercase; color: var(--mk-lilac); font-weight: 600; }
.mk-btn { display: inline-flex; align-items: center; justify-content: center; padding: .85em 1.4em; font-weight: 600; background: var(--mk-amber); color: var(--mk-amber-ink); border: 1px solid var(--mk-amber); border-radius: 4px; white-space: nowrap; }
body.marketing a.mk-btn { color: var(--mk-amber-ink); }
body.marketing a.mk-btn:hover { text-decoration: none; filter: brightness(1.07); }
body.marketing a.mk-btn-line { background: transparent; color: var(--mk-ink); border-color: var(--mk-line); }
body.marketing a.mk-btn-line:hover { border-color: var(--mk-text-2); filter: none; }

.mk-hero { position: relative; overflow: hidden; min-height: 42rem; border-bottom: 1px solid var(--mk-line); }
.mk-wall-stage { position: absolute; inset: -14% -18% -12% 30%; perspective: 1400px; }
.mk-wall { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; height: 150%; transform: rotateX(22deg) rotateY(-16deg) rotateZ(8deg); transform-origin: 30% 40%; }
.mk-col { display: flex; flex-direction: column; gap: 22px; animation: mk-rise 60s linear infinite; will-change: transform; backface-visibility: hidden; }
.mk-col:nth-child(2) { animation-duration: 46s; animation-direction: reverse; }
.mk-col:nth-child(3) { animation-duration: 72s; }
.mk-col:nth-child(4) { animation-duration: 54s; animation-direction: reverse; }
/* No pause on hover: the wall is most of the first screen, so a parked pointer would hold it still and scrolling under that pointer would start and stop it at random. The Pause control is the way to stop it. */
.mk-wall-toggle { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.mk-wall-toggle:checked ~ .mk-wall-stage .mk-col { animation-play-state: paused; }
.mk-wall-pause { position: absolute; right: 16px; top: 16px; z-index: 3; padding: .4em .9em; font-size: .8125rem; font-weight: 600; color: var(--mk-ink); background: var(--mk-surface); border: 1px solid var(--mk-line); border-radius: 999px; cursor: pointer; }
.mk-wall-pause:hover { border-color: var(--mk-text-2); }
.mk-wall-toggle:focus-visible + .mk-wall-pause { outline: 2px solid var(--mk-lilac); outline-offset: 2px; }
.mk-wall-pause .is-paused, .mk-wall-toggle:checked + .mk-wall-pause .is-moving { display: none; }
.mk-wall-toggle:checked + .mk-wall-pause .is-paused { display: inline; }
@keyframes mk-rise { to { transform: translateY(-50%); } }
.mk-col img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 6px; box-shadow: var(--mk-shadow), 0 0 0 1px var(--mk-frame); }
.mk-hero::before { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: linear-gradient(90deg, var(--mk-bg) 0%, var(--mk-bg) 34%, var(--mk-bg-veil) 52%, var(--mk-bg-clear) 78%), linear-gradient(0deg, var(--mk-bg) 0%, var(--mk-bg-clear) 22%); }
.mk-hero-copy { position: relative; z-index: 2; padding-block: 88px 104px; max-width: 37rem; display: grid; gap: 24px; }
.mk-hero h1 { font-size: clamp(3rem, 6.6vw, 5.8rem); line-height: .95; }
.mk-hero h1 em { font-style: normal; color: var(--mk-amber); }
.mk-lead { font-size: 1.2rem; color: var(--mk-text); max-width: 32rem; }
.mk-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.mk-small { font-size: .875rem; color: var(--mk-text-2); }
@media (prefers-reduced-motion: reduce) { .mk-col { animation: none; } .mk-wall-pause { display: none; } }
@media (max-width: 820px) {
  .mk-hero { min-height: 0; display: flex; flex-direction: column-reverse; }
  .mk-wall-stage { position: relative; inset: auto; height: 18rem; margin: 8px 0 0; overflow: hidden; }
  .mk-wall { height: 260%; transform: rotateX(18deg) rotateZ(6deg); }
  .mk-hero::before { background: linear-gradient(180deg, var(--mk-bg) 0%, var(--mk-bg-clear) 30%, var(--mk-bg-clear) 70%, var(--mk-bg) 100%); }
  .mk-hero-copy { padding-block: 48px 8px; }
}

.mk-section { padding-block: 104px; border-bottom: 1px solid var(--mk-line); }
.mk-h2 { font-size: clamp(2.2rem, 4.4vw, 3.6rem); line-height: 1; margin-top: 14px; }
body.marketing .mk-h2 { margin-top: 14px; }
.mk-split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 64px; }
.mk-intro-text { margin-top: 20px; color: var(--mk-text-2); max-width: 26rem; }
body.marketing .mk-intro-text { margin-top: 20px; }
.mk-head { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 16px 64px; align-items: end; margin-bottom: 56px; }
.mk-head > p { color: var(--mk-text-2); max-width: 34rem; }
@media (max-width: 860px) { .mk-split, .mk-head { grid-template-columns: 1fr; gap: 28px; } }

.mk-steps { list-style: none; margin: 0; padding: 0; counter-reset: step; display: grid; }
.mk-steps li { counter-increment: step; display: grid; grid-template-columns: 4.5rem minmax(0, 1fr); gap: 16px; align-items: baseline; padding-block: 18px; border-top: 1px solid var(--mk-line); }
.mk-steps li::before { content: counter(step, decimal-leading-zero); font: 400 28px/1 "Gloock", Georgia, serif; color: var(--mk-lilac); }
.mk-steps b { color: var(--mk-ink); font-weight: 600; display: block; }
.mk-steps span { color: var(--mk-text-2); font-size: .95rem; }

.mk-kit { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--mk-ink); }
.mk-kit > div { padding: 28px 28px 28px 0; border-bottom: 1px solid var(--mk-line); display: grid; gap: 8px; align-content: start; }
.mk-kit > div:not(:nth-child(3n + 1)) { padding-left: 28px; border-left: 1px solid var(--mk-line); }
.mk-kit h3 { font-size: 1.6rem; line-height: 1.1; }
.mk-kit p { color: var(--mk-text-2); font-size: 1rem; }
@media (max-width: 860px) {
  .mk-kit { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mk-kit > div, .mk-kit > div:not(:nth-child(3n + 1)) { padding: 24px 20px 24px 0; border-left: 0; }
  .mk-kit > div:nth-child(2n) { padding-left: 20px; border-left: 1px solid var(--mk-line); }
}
@media (max-width: 560px) { .mk-kit { grid-template-columns: 1fr; } .mk-kit > div:nth-child(2n) { padding-left: 0; border-left: 0; } }

.mk-quote { font: 400 clamp(1.8rem, 3.6vw, 3rem)/1.12 "Gloock", Georgia, serif; color: var(--mk-ink); max-width: 22ch; }
body.marketing .mk-quote { margin-top: 18px; }
.mk-quote span { color: var(--mk-amber); }
.mk-stack { display: grid; gap: 28px; }
.mk-stack > p { color: var(--mk-text-2); }
.mk-rules { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 40px; }
.mk-rules div { border-top: 1px solid var(--mk-line); padding-top: 14px; }
.mk-rules b { color: var(--mk-ink); display: block; margin-bottom: 4px; }
.mk-rules p { color: var(--mk-text-2); font-size: .95rem; }
@media (max-width: 600px) { .mk-rules { grid-template-columns: 1fr; } }

.mk-plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.mk-plan { background: var(--mk-surface); border: 1px solid var(--mk-line); border-radius: 10px; overflow: hidden; display: grid; grid-template-rows: auto 1fr auto; }
.mk-plan-stripe { height: 10px; background: var(--mk-line); }
.mk-plan.is-featured { border-color: var(--mk-amber); }
.mk-plan.is-featured .mk-plan-stripe { background: var(--mk-amber); }
.mk-plan-body { padding: 26px; display: grid; gap: 14px; align-content: start; }
.mk-plan-name { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-weight: 600; color: var(--mk-ink); font-size: 1.1rem; }
.mk-plan-name span { font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; color: var(--mk-amber); }
.mk-price { font: 400 2.75rem/1 "Gloock", Georgia, serif; color: var(--mk-ink); font-variant-numeric: tabular-nums; }
.mk-price small { font: 400 .95rem/1 "Instrument Sans", var(--font); color: var(--mk-text-2); }
.mk-price.is-tba { font-size: 1.9rem; color: var(--mk-text-2); }
.mk-plan ul { padding-left: 1.1em; margin: 0; display: grid; gap: 7px; }
.mk-plan li::marker { color: var(--mk-lilac); }
body.marketing .mk-plan .mk-btn { margin: 0 26px 26px; }
.mk-fine { margin-top: 16px; font-size: .875rem; color: var(--mk-text-2); }
body.marketing .mk-fine { margin-top: 16px; }
.mk-plans.is-single { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
body.marketing .mk-plan-then { margin: -6px 0 0; color: var(--mk-text-2); }
@media (max-width: 860px) { .mk-plans, .mk-plans.is-single { grid-template-columns: 1fr; } }

.mk-faq details { border-top: 1px solid var(--mk-line); padding-block: 20px; }
.mk-faq summary { cursor: pointer; font: 400 1.4rem/1.3 "Gloock", Georgia, serif; color: var(--mk-ink); }
.mk-faq details p { color: var(--mk-text-2); max-width: 42rem; }
body.marketing .mk-faq details p { margin-top: 10px; }

.mk-final { border-bottom: 0; }
.mk-final .mk-wrap { display: grid; justify-items: center; text-align: center; gap: 24px; }
.mk-final h2 { font-size: clamp(2.6rem, 6vw, 5rem); line-height: .98; max-width: 16ch; }

.pricing { display: grid; gap: 1.25rem; grid-template-columns: repeat(3, 1fr); align-items: stretch; }
.price-card { padding: 1.75rem; display: flex; flex-direction: column; }
.price-card.featured { border-color: var(--brand-500); box-shadow: 0 0 0 3px var(--brand-100); }
.price-card .price { font-size: 2rem; font-weight: 800; color: var(--ink); margin: .5rem 0; }
.price-card .price small { font-size: .9rem; font-weight: 500; color: var(--muted); }
.price-card ul { list-style: none; padding: 0; margin: 1rem 0 1.5rem; color: var(--text-2); font-size: .95rem; display: grid; gap: .45rem; }
.price-card li::before { content: "✓"; color: var(--ok); font-weight: 700; margin-right: .5rem; }
.price-card .btn { margin-top: auto; }
@media (max-width: 800px) { .pricing { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------- domains */
.domain-card h3.mono { background: none; padding: 0; font-size: 1.05rem; }
.dns-table code { white-space: nowrap; }
.checks { list-style: none; padding: 0; margin: .5rem 0 0; display: grid; gap: .25rem; font-size: .9rem; }
.check::before { margin-right: .4rem; font-weight: 700; }
.check-ok::before { content: "✓"; color: var(--ok); }
.check-fail::before { content: "✕"; color: var(--danger); }
.dom-active, .sub-active, .sub-trialing, .job-succeeded { background: var(--ok-bg); color: var(--ok-fg); border-color: transparent; }
.dom-pending, .dom-verified, .sub-past_due, .job-running, .job-pending { background: var(--warn-bg); color: var(--warn-fg); border-color: transparent; }
.dom-failed, .sub-canceled, .sub-paused, .job-failed { background: var(--danger-bg); color: var(--danger-fg); border-color: transparent; }
.text-danger { color: var(--danger-fg); }

/* ---------------------------------------------------------------- billing */
.price-card.current { border-color: var(--ok); }
.price-card .card-header { margin-bottom: 0; }

/* ---------------------------------------------------------------- operator */
.op-counts { display: grid; gap: .75rem; grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr)); margin-bottom: 1.25rem; }
.op-counts .stat { padding: .9rem 1rem; color: inherit; }
.op-counts .stat:hover { text-decoration: none; border-color: var(--border-strong); }
.op-counts .stat.active { border-color: var(--brand-500); box-shadow: 0 0 0 3px var(--brand-100); }
.op-counts .stat .value { font-size: 1.4rem; display: block; }
.op-search { margin-bottom: 1.25rem; }
.op-search input[type=search] { flex: 1; min-width: 14rem; }
.op-search select { width: auto; }
.op-actions form { display: inline-flex; }
.timeline { list-style: none; padding: 0; margin: 0; display: grid; gap: .45rem; font-size: .9rem; max-height: 28rem; overflow: auto; }
.timeline li { display: grid; grid-template-columns: 6.5rem 1fr; gap: .5rem; align-items: baseline; }
.timeline time { color: var(--muted); font-variant-numeric: tabular-nums; }
.timeline .payload { display: block; grid-column: 2; font-size: .75rem; color: var(--text-2); white-space: pre-wrap; word-break: break-word; background: var(--surface-2); }
.job summary { cursor: pointer; padding: .4rem 0; }
.job .log { max-height: 16rem; overflow: auto; font-size: .75rem; background: var(--code-bg); color: var(--code-fg); padding: .75rem; border-radius: var(--radius-sm); }
ul.plain { list-style: none; padding: 0; margin: 0; display: grid; gap: .25rem; }

/* ---------------------------------------------------------------- cookie notice & banner
   The same markup the store engine renders (apps/legal templates mirror store/apps/core's),
   wearing this side's tokens. Kept here rather than in a stylesheet of its own because the
   footer link is on every page and app.css is what every page already loads. */
.ck-page { max-width: 52rem; }
.ck-lead { color: var(--text-2); margin-bottom: 1.5rem; }
.ck-group { margin-bottom: 2rem; }
.ck-group-title { margin: 0 0 0.2rem; }
.ck-group-note { margin: 0 0 0.75rem; color: var(--text-2); font-size: 0.9rem; }
.ck-rows { border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; background: var(--surface); }
.ck-row {
  display: grid;
  grid-template-columns: minmax(10rem, 1fr) 2fr minmax(7rem, auto);
  gap: 1rem; padding: 0.75rem 1rem; border-top: 1px solid var(--border);
  font-size: 0.92rem; align-items: start;
}
.ck-row:first-child { border-top: 0; }
.ck-row-head { background: var(--surface-2); font-weight: 600; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.03em; }
.ck-what { display: flex; flex-direction: column; gap: 0.2rem; }
.ck-provider { color: var(--text-2); font-size: 0.85rem; }
.ck-duration { color: var(--text-2); }
.ck-badge { align-self: start; font-size: 0.75rem; font-weight: 600; padding: 0.1rem 0.45rem; border-radius: var(--radius-sm); background: var(--brand-50); color: var(--ink); }
.ck-badge-quiet { background: transparent; border: 1px solid var(--border); color: var(--muted); font-weight: 400; }
@media (max-width: 700px) {
  .ck-row { grid-template-columns: 1fr; gap: 0.35rem; }
  .ck-row-head { display: none; }
}
.ck-choice { border-top: 1px solid var(--border); padding-top: 1.25rem; margin-top: 1rem; }
.ck-choice p { margin: 0 0 0.9rem; }
.ck-browser { margin-top: 2rem; color: var(--text-2); font-size: 0.9rem; }

/* Not a modal: it does not trap focus or cover the page, and the two buttons carry equal
   weight. Silent today — nothing on this side is gated — but styled so it is right when it
   is not. */
.ck-banner {
  position: fixed; inset: auto 0 0 0; z-index: 60;
  background: var(--surface); color: var(--text);
  border-top: 1px solid var(--border-strong); box-shadow: var(--shadow-lg); padding: 1rem;
}
.ck-banner-inner { display: flex; gap: 1.5rem; align-items: center; flex-wrap: wrap; }
.ck-banner-text { flex: 1 1 24rem; }
.ck-banner-title { margin: 0 0 0.35rem; font-size: 1.05rem; }
.ck-banner-text p { margin: 0; font-size: 0.95rem; }
.ck-banner-list { margin: 0.5rem 0 0; padding-left: 1.1rem; font-size: 0.9rem; color: var(--text-2); }
.ck-banner-more { margin-top: 0.5rem; font-size: 0.9rem; }
.ck-banner-actions form { display: flex; gap: 0.5rem; flex-wrap: wrap; }

/* ---------------------------------------------------------------- OAuth consent (apps/oauth)
   The screen where a merchant decides what an AI agent may do to their shop. It is deliberately
   plain: an application's own name and icon are attacker-controlled strings, so nothing here
   renders a logo or styles the client's name to look endorsed. The permissions are the loudest
   thing on the page, and the ones that write are marked as such. */
.consent { max-width: 34rem; margin: 3rem auto; }
.consent-head { text-align: center; margin-bottom: 1.5rem; }
.consent-head h1 { font-size: 1.35rem; margin: 0 0 0.4rem; }
.consent-client { font-weight: 600; }
.consent-target { display: block; margin-top: 0.75rem; font-size: 0.95rem; color: var(--text-2); }
.consent-scopes { list-style: none; margin: 0; padding: 0; border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.consent-scopes li { display: flex; gap: 0.75rem; padding: 0.8rem 1rem; border-top: 1px solid var(--border); align-items: start; }
.consent-scopes li:first-child { border-top: 0; }
.consent-scope-mark { flex: 0 0 1.25rem; line-height: 1.5; color: var(--muted); }
.consent-scope-write .consent-scope-mark { color: var(--warn, var(--text)); }
.consent-scope-text { display: flex; flex-direction: column; gap: 0.15rem; }
.consent-scope-name { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.03em; color: var(--muted); }
.consent-dropped { margin-top: 1rem; font-size: 0.9rem; color: var(--text-2); }
.consent-redirect { margin-top: 1.25rem; font-size: 0.85rem; color: var(--text-2); word-break: break-all; }
.consent-redirect code { font-size: 0.85rem; }
.consent-actions { display: flex; gap: 0.75rem; margin-top: 1.5rem; }
.consent-actions form { flex: 1; }
.conn-list { display: flex; flex-direction: column; gap: 1rem; }
.conn-scopes { list-style: none; margin: 0.6rem 0 0; padding: 0; font-size: 0.9rem; color: var(--text-2); }
.conn-scopes li { padding: 0.1rem 0; }

/* The "what will you sell" tick-boxes on the create-a-store form. Asked during the minute the
   merchant already spends watching their shop build. */
.preset-grid { display: grid; gap: 0.5rem; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); }
.preset-option { display: flex; align-items: center; gap: 0.6rem; padding: 0.65rem 0.85rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); cursor: pointer; }
.preset-option:hover { border-color: var(--border-strong); }
.preset-option:has(input:checked) { border-color: var(--brand-600); background: var(--brand-50); }
.preset-option:has(input:focus-visible) { outline: 2px solid var(--brand-600); outline-offset: 2px; }

/* /operator/translations/ — English, the catalogue's wording, and a person's, side by side. */
.tr-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .75rem; }
.tr-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.2fr); gap: 1rem; align-items: start; padding: 1rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.tr-row p { margin: 0 0 .35rem; overflow-wrap: anywhere; }
.tr-row textarea { width: 100%; resize: vertical; }
.tr-corrected { border-color: var(--brand-600); }
.tr-label { display: block; font-size: .75rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin-bottom: .25rem; }
.tr-stale { margin-bottom: 1.25rem; }
.tr-stale .tr-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; }
@media (max-width: 800px) { .tr-row, .tr-stale .tr-row { grid-template-columns: minmax(0, 1fr); } }
