/* App pages as approved by Austen (2026-10-12, design loop step 4): VerticalSmarts and Bad Lucy "first run and app"
   canvases. Tokens are copied from the canvases' vs-theme.css / bl-theme.css and Brand's design-system bundles.
   Forms (sign-in, password, onboarding, settings) are light; data screens are dark; Texture A on Bad Lucy's dark
   screens only (all as approved). core.js sets body.th + th-vs|th-bl + th-light|th-dark only when the site shows
   its own brand; a brand swapped in with Brand Swap keeps the plain look in app.css. */

/* Cabinet Grotesk by Indian Type Foundry, from Fontshare, free under the ITF Free Font License; self-hosted (Austen, 2026-10-12). */
@font-face { font-family: "Cabinet Grotesk"; src: url("fonts/CabinetGrotesk-Bold.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Cabinet Grotesk"; src: url("fonts/CabinetGrotesk-Extrabold.woff2") format("woff2"); font-weight: 800; font-style: normal; font-display: swap; }

/* ---------- tokens ---------- */
body.th-vs.th-dark {
  --bg-canvas:#0b0f19; --bg-surface:#161e2e; --bg-surface-elevated:#1e293b; --bg-row-stripe:#111726;
  --border-hairline:#1e293b; --border-focus:#3b82f6; --input-border:#334155;
  --text-primary:#f8fafc; --text-secondary:#94a3b8; --text-muted:#8a99ad;
  --acc:#3b82f6; --acc-hover:#60a5fa; --acc-on:#0b0f19;
  --metric:#f97316; --metric-strong:#f97316; --ok:#4ade80; --ok-bg:rgba(74,222,128,0.12); --pop:#f472b6;
  --error:#f87171; --error-bg:rgba(248,113,113,0.12); --warn-c:#f97316;
  --shadow-card:0 4px 6px -1px rgba(0,0,0,0.5),0 2px 4px -2px rgba(0,0,0,0.3);
  color-scheme: dark;
}
body.th-vs.th-light {
  --bg-canvas:#f8fafc; --bg-surface:#ffffff; --bg-surface-elevated:#f1f5f9; --bg-row-stripe:#f1f5f9;
  --border-hairline:#e2e8f0; --border-focus:#1d4ed8; --input-border:#94a3b8;
  --text-primary:#0f172a; --text-secondary:#475569; --text-muted:#5b6b80;
  --acc:#1d4ed8; --acc-hover:#1e40af; --acc-on:#ffffff;
  --metric:#c2410c; --metric-strong:#9a3412; --ok:#15803d; --ok-bg:#dcfce7; --pop:#be185d;
  --error:#b91c1c; --error-bg:#fef2f2; --warn-c:#9a3412;
  --shadow-card:0 1px 3px 0 rgba(15,23,42,0.08),0 1px 2px -1px rgba(15,23,42,0.04);
  color-scheme: light;
}
body.th-vs {
  --font-display:"Cabinet Grotesk","Playfair Display",serif; --font-heading:var(--font-display); --font-sans:Inter,system-ui,-apple-system,sans-serif;
  --border-solid:var(--border-hairline); --radius-card:8px;
  --bar-bg:#161e2e; --bar-line:#1e293b; --bar-ink:#f8fafc; --bar-link:#94a3b8; --bar-focus:#3b82f6;
}
body.th-bl.th-dark {
  --bg-canvas:#090a0f; --bg-surface:#12151e; --bg-surface-elevated:#1b1f2d; --bg-row-stripe:#0e1119;
  --pattern-ink:rgba(239,68,68,0.45); --border-hairline:rgba(239,68,68,0.15); --border-solid:#1b1f2d; --border-focus:#ef4444; --input-border:#4b5563;
  --text-primary:#f3f4f6; --text-secondary:#9ca3af; --text-muted:#8b929e;
  --brand-heart:#ef4444; --brand-heart-glow:rgba(239,68,68,0.25);
  --acc:#ef4444; --acc-hover:#f87171; --acc-on:#090a0f;
  --ok:#34d399; --ok-bg:rgba(52,211,153,0.12); --metric:#f59e0b; --pop:#c084fc;
  --error:#f97316; --error-bg:rgba(249,115,22,0.12); --warn-c:#f97316;
  --shadow-card:0 10px 15px -3px rgba(0,0,0,0.7),0 4px 6px -4px rgba(239,68,68,0.1); --shadow-glow:0 0 12px rgba(239,68,68,0.25);
  color-scheme: dark;
}
body.th-bl.th-light {
  --bg-canvas:#faf9f6; --bg-surface:#ffffff; --bg-surface-elevated:#f3f4f6; --bg-row-stripe:#f8f9fa;
  --border-hairline:#e5e7eb; --border-solid:#e5e7eb; --border-focus:#dc2626; --input-border:#6b7280;
  --text-primary:#111827; --text-secondary:#4b5563; --text-muted:#636b78;
  --brand-heart:#dc2626; --brand-heart-glow:rgba(220,38,38,0.12);
  --acc:#dc2626; --acc-hover:#b91c1c; --acc-on:#ffffff;
  --ok:#047857; --ok-bg:#ecfdf5; --metric:#b45309; --pop:#7e22ce;
  --error:#c2410c; --error-bg:#fff7ed; --warn-c:#c2410c;
  --shadow-card:0 1px 3px 0 rgba(17,24,39,0.08),0 1px 2px -1px rgba(17,24,39,0.04); --shadow-glow:0 0 12px rgba(220,38,38,0.12);
  color-scheme: light;
}
body.th-bl {
  --font-display:"Syne","Cabinet Grotesk",sans-serif; --font-heading:"Bricolage Grotesque","Inter",system-ui,sans-serif; --font-sans:"Inter",system-ui,sans-serif;
  --radius-card:12px;
  --bar-bg:#12151e; --bar-line:#1b1f2d; --bar-ink:#f3f4f6; --bar-link:#9ca3af; --bar-focus:#ef4444;
}
/* The plain app.css variables follow the theme, so pages not redrawn yet still match. */
body.th {
  --bg: var(--bg-canvas); --surface: var(--bg-surface); --ink: var(--text-primary); --muted: var(--text-secondary);
  --accent: var(--acc); --accent-ink: var(--acc-on); --line: var(--border-solid); --radius: var(--radius-card);
  --good: var(--ok); --warn: var(--warn-c); --bad: var(--error);
  background: var(--bg-canvas); color: var(--text-primary); font: 400 16px/1.5 var(--font-sans); font-variant-numeric: tabular-nums;
}
body.th-bl.th-dark { position: relative; min-height: 100vh; isolation: isolate; }
.bl-lattice { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }
.bl-lattice path { fill: none; stroke: var(--pattern-ink); stroke-width: 1.6; stroke-linejoin: round; }
@media (prefers-contrast: more) { .bl-lattice { display: none; } }
@media print { .bl-lattice { display: none; } }

/* ---------- type ---------- */
body.th h1, body.th h2, body.th h3 { color: var(--text-primary); margin: 0; text-wrap: balance; }
body.th h1, body.th .t-h2 { font: 700 24px/1.15 var(--font-heading); }       /* page title inside the app */
body.th-bl h1, body.th-bl .t-h2 { font: 700 28px/1.15 var(--font-heading); font-optical-sizing: auto; }
body.th h1.t-h1 { font: 800 38px/1.15 var(--font-display); }                  /* onboarding and sign-in */
body.th-bl h1.t-h1 { line-height: 1.1; }
body.th h2, body.th .t-h3 { font: 700 18px/1.15 var(--font-heading); }
body.th-bl h2, body.th-bl .t-h3 { font: 700 22px/1.2 var(--font-heading); font-optical-sizing: auto; }
body.th h3 { font: 700 18px/1.25 var(--font-heading); }
body.th .lbl, body.th .eyebrow { font: 600 12px/16px var(--font-sans); letter-spacing: .04em; color: var(--text-secondary); text-transform: none; margin: 0; }
body.th .sm, body.th .small { font-size: 14px; line-height: 20px; }
body.th .muted { color: var(--text-secondary); }
body.th .help { font-size: 14px; line-height: 20px; color: var(--text-secondary); margin: 0; }
body.th .err { font-size: 14px; line-height: 20px; color: var(--error); display: inline-flex; align-items: center; gap: 6px; }
body.th .lede { color: var(--text-secondary); max-width: 64ch; margin: 0; }
body.th a { color: var(--acc); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
body.th a:hover { color: var(--acc-hover); }
body.th :where(a, button, input, select, textarea, summary):focus-visible { outline: 2px solid var(--border-focus); outline-offset: 2px; }

/* ---------- header bar (always dark, as approved) ---------- */
header.bar { display: flex; align-items: center; gap: 28px; padding: 12px 40px; background: var(--bar-bg, var(--surface)); border-bottom: 1px solid var(--bar-line, var(--line)); color: var(--bar-ink, var(--ink)); position: sticky; top: 0; z-index: 5; }
header.bar.simple { justify-content: space-between; padding: 16px 40px; }
header.bar a, header.bar button.link, body.th header.bar a, body.th header.bar button.link { color: var(--bar-link, var(--muted)); text-decoration: none; font-size: 14px; line-height: 20px; }
header.bar a:hover, header.bar button.link:hover, body.th header.bar a:hover, body.th header.bar button.link:hover { color: var(--bar-ink, var(--ink)); }
header.bar a[aria-current="page"], body.th header.bar a[aria-current="page"] { color: var(--bar-ink, var(--ink)); font-weight: 600; }
header.bar :where(a, button):focus-visible { outline: 2px solid var(--bar-focus, var(--accent)); outline-offset: 2px; }
header.bar a.logo, body.th header.bar a.logo { display: inline-flex; align-items: center; gap: 8px; color: var(--bar-ink, var(--ink)); font-size: 22px; line-height: 1; flex: none; }
header.bar .logo img { height: 34px; width: auto; }
body.th-vs header.bar .wm { font: 800 22px/1 var(--font-display); }
body.th-vs header.bar .wm span { font-weight: 700; opacity: .85; }
body.th-bl header.bar .wm { font: 800 22px/1 var(--font-display); }
header.bar nav { display: flex; flex-wrap: wrap; gap: 4px 20px; align-items: center; }
header.bar .spacer { flex: 1; }
header.bar .right { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
header.bar .admin-pill { font: 600 12px/16px var(--font-sans, system-ui); letter-spacing: .04em; padding: 3px 10px; border-radius: 9999px; border: 1px solid #334155; color: var(--bar-link, var(--muted)); }
body.th-bl header.bar .admin-pill { border-color: #3a4150; }
header.bar button.link, body.th header.bar button.link { background: none; border: 0; padding: 0; min-height: 0; font: 400 14px/20px var(--font-sans, system-ui); cursor: pointer; text-decoration: none; }
@media (max-width: 900px) {
  header.bar { flex-wrap: wrap; gap: 8px 16px; padding: 12px 16px; position: static; }
  header.bar.simple { padding: 12px 16px; }
  header.bar nav { order: 5; flex-basis: 100%; gap: 4px 16px; }
  header.bar .spacer { display: none; }
  header.bar .right { margin-left: auto; gap: 14px; }
}

/* ---------- page layout ---------- */
body.th main { max-width: 1280px; margin: 0 auto; padding: 32px 40px 64px; box-sizing: border-box; display: flex; flex-direction: column; gap: 22px; }
body.th main > * { margin-top: 0; margin-bottom: 0; }
body.th main.formsplit { flex-direction: row; gap: 64px; padding: 56px 120px; }
body.th main.formsplit > section { flex: 0 0 440px; display: flex; flex-direction: column; gap: 20px; min-width: 0; }
body.th main.formsplit > aside { flex: 1; display: flex; flex-direction: column; gap: 18px; padding-top: 64px; min-width: 0; }
body.th main.flow { max-width: 1040px; margin: 0; padding: 56px 120px; gap: 28px; }
body.th main.verify { flex-direction: row; gap: 48px; padding: 44px 120px; }
body.th main.verify > section { flex: 1; display: flex; flex-direction: column; gap: 18px; min-width: 0; }
body.th main.verify > aside { flex: 0 0 360px; display: flex; flex-direction: column; gap: 14px; padding-top: 40px; }
body.th main.settings { flex-direction: row; gap: 48px; padding: 36px 120px; }
.settings-nav { flex: 0 0 200px; display: flex; flex-direction: column; align-items: stretch; gap: 4px; font-size: 14px; }
body.th .settings-nav button.link { align-self: flex-start; color: var(--text-secondary); text-decoration: none; }
body.th .settings-nav a, body.th .settings-nav button.link { padding: 10px 12px; border-radius: 8px; color: var(--text-secondary); text-decoration: none; text-align: left; font-size: 14px; min-height: 0; }
body.th .settings-nav a[aria-current="page"] { background: var(--border-hairline); color: var(--text-primary); font-weight: 600; }
.settings-body { flex: 1; display: flex; flex-direction: column; gap: 22px; max-width: 640px; min-width: 0; }
.list-items { display: flex; flex-direction: column; gap: 14px; }
.list-items b { display: block; }
.stepwrap { display: flex; flex-direction: column; gap: 8px; max-width: 440px; }
.stepbar { display: flex; gap: 8px; align-items: center; }
.stepbar i { display: block; height: 4px; flex: 1; border-radius: 2px; background: var(--border-solid, var(--line)); }
.stepbar i.on { background: var(--acc, var(--accent)); }
.row { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; align-items: baseline; }
.cols3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.cols4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.twocol { display: flex; gap: 20px; align-items: flex-start; }
.twocol > .wide { flex: 2; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.twocol > .narrow-col { flex: 1; display: flex; flex-direction: column; gap: 16px; min-width: 0; }
@media (max-width: 1100px) {
  body.th main.formsplit, body.th main.flow, body.th main.verify, body.th main.settings { padding: 40px 40px; }
}
@media (max-width: 900px) {
  body.th main, body.th main.formsplit, body.th main.flow, body.th main.verify, body.th main.settings { padding: 24px 16px 48px; }
  body.th main.formsplit, body.th main.verify, body.th main.settings { flex-direction: column; gap: 28px; }
  body.th main.formsplit > section, body.th main.verify > aside { flex: none; }
  body.th main.formsplit > aside, body.th main.verify > aside { padding-top: 0; }
  .settings-nav { flex: none; flex-direction: row; flex-wrap: wrap; }
  .cols3, .cols4 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
  .twocol { flex-direction: column; align-items: stretch; }
}

/* ---------- cards, buttons, fields ---------- */
body.th .card { background: var(--bg-surface); border: 1px solid var(--border-solid); border-radius: var(--radius-card); box-shadow: var(--shadow-card); padding: 20px; color: var(--text-primary); }
body.th .card.flat { background: var(--bg-surface-elevated); box-shadow: none; }
body.th .card.now { border-color: var(--acc); }
body.th-bl .card.now { box-shadow: var(--shadow-card), var(--shadow-glow); }
.dcard { display: flex; flex-direction: column; }
body.th .dcard { padding: 16px; }
body.th .dcard-title { font: 700 18px/1.15 var(--font-heading); margin: 0 0 8px; }
body.th-bl .dcard-title { line-height: 1.25; margin-bottom: 6px; }
body.th .dcard-meta { font: 600 12px/16px var(--font-sans); letter-spacing: .04em; color: var(--text-secondary); margin: 0 0 8px; }
body.th-bl .dcard-meta { font: 400 14px/20px var(--font-sans); letter-spacing: 0; margin: 0 0 12px; }
.dcard-body { display: flex; flex-direction: column; gap: 10px; font-size: 14px; line-height: 20px; align-items: flex-start; }
.dcard-body > .line { display: flex; justify-content: space-between; align-items: center; gap: 10px; align-self: stretch; }
body.th button, body.th .button { font: 600 14px/1 var(--font-sans); min-height: 44px; padding: 12px 18px; border-radius: 8px; border: 1px solid var(--acc); background: var(--acc); color: var(--acc-on); justify-content: center; text-decoration: none; box-sizing: border-box; }
body.th button:hover, body.th .button:hover { background: var(--acc-hover); border-color: var(--acc-hover); color: var(--acc-on); }
body.th button.secondary, body.th .button.secondary { background: transparent; color: var(--acc); }
body.th button.secondary:hover, body.th .button.secondary:hover { background: transparent; color: var(--acc-hover); border-color: var(--acc-hover); }
body.th button.link { min-height: 0; padding: 0; border: 0; background: none; color: var(--acc); font: 400 14px/20px var(--font-sans); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
body.th button.link:hover { color: var(--acc-hover); background: none; }
body.th button:disabled, body.th button[aria-disabled="true"] { background: var(--bg-surface-elevated); border-color: var(--border-solid); color: var(--text-muted); cursor: not-allowed; }
body.th form.card > button[type="submit"], body.th form.card > .button.block { width: 100%; }
body.th label { font: 600 12px/16px var(--font-sans); letter-spacing: .04em; color: var(--text-primary); gap: 6px; }
body.th label.check, body.th .checks label { flex-direction: row; align-items: center; gap: 10px; font: 400 14px/20px var(--font-sans); letter-spacing: 0; }
body.th label.check input, body.th .checks input, body.th input[type="radio"] { width: 18px; height: 18px; min-height: 0; margin: 0; accent-color: var(--acc); flex: none; }
body.th input:not([type="checkbox"]):not([type="radio"]):not([type="color"]), body.th select, body.th textarea {
  font: 400 16px/1.5 var(--font-sans); color: var(--text-primary); background: var(--bg-surface); border: 1px solid var(--input-border); border-radius: 8px; padding: 11px 12px; min-height: 44px; box-sizing: border-box; width: 100%; letter-spacing: 0;
}
body.th input[aria-invalid="true"] { border: 2px solid var(--error); }
body.th fieldset { border: 0; padding: 0; margin: 0; background: none; display: flex; flex-direction: column; gap: 10px; }
body.th fieldset.box { border: 1px solid var(--border-solid); border-radius: var(--radius-card); padding: 14px 16px; background: var(--bg-surface); }
body.th legend { font: 600 12px/16px var(--font-sans); letter-spacing: .04em; color: var(--text-primary); margin-bottom: 8px; padding: 0; }
.pw { position: relative; }
body.th .pw button.show { position: absolute; right: 6px; top: 6px; min-height: 32px; padding: 0 8px; border: 0; background: none; color: var(--acc); font: 600 14px/1 var(--font-sans); }
body.th .pw button.show:hover { background: none; color: var(--acc-hover); }
body.th .pw input { padding-right: 64px; }
.field { display: flex; flex-direction: column; gap: 6px; }

/* ---------- banners, pills, statuses ---------- */
.banner { border-radius: 8px; padding: 12px 14px; display: flex; gap: 10px; align-items: flex-start; font-size: 14px; line-height: 20px; }
.banner.info { background: var(--bg-surface-elevated, var(--surface)); color: var(--text-primary, var(--ink)); }
body.th-bl.th-dark .banner.info { border: 1px solid #2a3042; }
.banner.error { background: var(--error-bg); color: var(--error); }
.banner.warn { background: var(--error-bg); color: var(--warn-c); border: 1px solid var(--warn-c); }
.banner.good { background: var(--ok-bg); color: var(--ok); }
.banner svg { flex: none; margin-top: 1px; }
.banner.between { justify-content: space-between; align-items: center; flex-wrap: wrap; }
body.th .pill { font: 600 12px/16px var(--font-sans); letter-spacing: .04em; padding: 3px 10px; border-radius: 9999px; border: 1px solid var(--border-solid); color: var(--text-secondary); background: transparent; display: inline-flex; align-items: center; gap: 6px; }
.st { display: inline-flex; align-items: center; gap: 6px; font: 600 12px/16px var(--font-sans, system-ui); letter-spacing: .04em; white-space: nowrap; border-radius: 9999px; }
body.th-vs .st { padding: 2px 8px; }
body.th-vs .st-ok { background: var(--ok-bg); color: var(--ok); }
body.th-vs .st-wait { padding: 3px 10px; color: var(--metric-strong); border: 1px solid var(--metric); }
body.th-bl .st { padding: 4px 10px; }
body.th-bl .st-ok { background: var(--ok-bg); color: var(--ok); }
body.th-bl .st-wait { background: transparent; color: var(--text-secondary); border: 1px dashed var(--border-solid); }
.st .dot { width: 6px; height: 6px; border-radius: 9999px; background: currentColor; }
@media (prefers-reduced-motion: no-preference) { body.th-bl .st-ok .dot { animation: bl-pulse 2s cubic-bezier(.4,0,.6,1) infinite; } }
@keyframes bl-pulse { 50% { opacity: .5; } }
body:not(.th) .st { padding: 4px 8px; border: 1px solid var(--line); color: var(--muted); }
.avatar { width: 52px; height: 52px; flex: none; border-radius: 9999px; display: flex; align-items: center; justify-content: center; font: 800 18px var(--font-display, serif); background: var(--bg-surface-elevated, var(--bg)); color: var(--text-secondary, var(--muted)); }
.avatar.strong { background: rgba(29,78,216,0.12); color: #1d4ed8; }
body.th-bl .avatar { font: 700 18px var(--font-heading); }
body.th-bl .avatar.strong { background: rgba(220,38,38,0.1); color: #b91c1c; }
.bl-heart { flex-shrink: 0; display: inline-block; vertical-align: middle; }
.bl-heart path { fill: var(--brand-heart, #ef4444); }
.bl-heart-outline path { fill: none; stroke: var(--brand-heart, #ef4444); stroke-width: 2; stroke-linejoin: round; }
.bl-heart-glow { filter: drop-shadow(0 0 6px var(--brand-heart-glow, rgba(239,68,68,0.25))); }
header.bar .bl-heart path { fill: #ef4444; }
header.bar .bl-heart-glow { filter: drop-shadow(0 0 6px rgba(239,68,68,0.25)); }

/* ---------- tabs (Market figures) ---------- */
body.th .tabs { display: flex; gap: 4px; flex-wrap: wrap; border: 0; border-bottom: 1px solid var(--border-solid); border-radius: 0; background: none; padding: 0; margin: 0; position: static; }
body.th-bl.th-dark .tabs { background: var(--bg-canvas); }
body.th .tabs a { padding: 12px 14px; font-size: 14px; font-weight: 600; color: var(--text-secondary); text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -1px; border-radius: 0; background: none; }
body.th .tabs a[aria-selected="true"], body.th .tabs a.on { color: var(--text-primary); border-bottom-color: var(--acc); background: none; }

/* ---------- data table (VerticalSmarts DataTable / Bad Lucy FeedTable) ---------- */
.dt-frame { overflow-x: auto; border: 1px solid var(--border-solid, var(--line)); border-radius: var(--radius-card, 8px); background: var(--bg-surface, var(--surface)); box-shadow: var(--shadow-card, none); }
table.dt { width: 100%; text-align: left; border-collapse: collapse; font-size: 14px; line-height: 20px; }
table.dt th { border-bottom: 1px solid var(--border-hairline, var(--line)); color: var(--text-secondary, var(--muted)); font: 600 12px/16px var(--font-sans, system-ui); text-transform: uppercase; letter-spacing: .04em; padding: 12px 16px; background: color-mix(in srgb, var(--bg-surface-elevated, var(--surface)) 90%, transparent); white-space: nowrap; }
table.dt td { padding: 14px 16px; color: var(--text-primary, var(--ink)); border-top: 1px solid var(--border-hairline, var(--line)); border-bottom: 0; vertical-align: top; }
table.dt.compact td { padding: 8px 12px; }
table.dt tbody tr { background: var(--bg-canvas, var(--bg)); transition: background-color .15s; }
table.dt tbody tr:nth-child(even) { background: var(--bg-row-stripe, var(--bg)); }
table.dt tbody tr:hover { background: var(--bg-surface-elevated, var(--surface)); }
table.dt tbody tr:focus-within { box-shadow: inset 0 0 0 2px var(--acc, var(--accent)); }
table.dt .r { text-align: right; }
table.dt .title a, table.dt .title .t { color: var(--text-primary, var(--ink)); font-weight: 500; text-decoration: none; }
table.dt tbody tr:hover .title a { color: var(--acc-hover, var(--accent)); }
table.dt .meta { display: block; font: 600 12px/16px var(--font-sans, system-ui); letter-spacing: .04em; color: var(--text-secondary, var(--muted)); }
body.th-bl table.dt th { padding: 14px 16px; background: var(--bg-surface-elevated); }
body.th-bl table.dt td, body.th-bl table.dt.compact td { padding: 16px; }
body.th-bl table.dt .out { padding-left: 20px; padding-right: 20px; }
body.th-bl table.dt .title { display: flex; align-items: center; gap: 10px; }
body.th-bl table.dt .meta { margin: 2px 0 0 26px; }
body.th-bl table.dt tbody tr:focus-within { box-shadow: inset 0 0 0 2px var(--brand-heart); }

/* ---------- dashboard ---------- */
.tile2 { display: flex; flex-direction: column; gap: 6px; }
body.th .tile2 { padding: 18px; }
.tile2 .v { font: 800 38px/1.15 var(--font-display, serif); font-variant-numeric: tabular-nums; }
body.th-bl .tile2 { gap: 8px; }
body.th-bl .tile2 .v { font: 800 34px/1 var(--font-display); }
.next-steps { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.next-steps li.done, .next-steps li.later { color: var(--text-secondary, var(--muted)); }
.next-steps li button { margin-top: 6px; }
.lines { display: flex; flex-direction: column; gap: 8px; font-size: 14px; line-height: 20px; }
.lines .when { color: var(--text-secondary, var(--muted)); font-size: 12px; }
.hand-check { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
body.th .hand-check { padding: 16px 18px; }
.hand-check > div { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 220px; }
.hand-check select { width: auto !important; max-width: 100%; min-width: 0; }
.hand-check > div { max-width: 100%; }

/* ---------- review ---------- */
.review-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.review-head .progress-col { width: 320px; max-width: 100%; display: flex; flex-direction: column; gap: 6px; }
.batch-list .card { padding: 12px 14px; display: flex; justify-content: space-between; align-items: center; font-size: 14px; gap: 10px; }
body.th .batch-list button.link { color: var(--text-primary); text-decoration: none; text-align: left; font-size: 14px; }
.batch-list .card.now { border-color: var(--acc); }

/* ---------- market strip inside a card ---------- */
body.th .strip .grid { stroke: var(--border-solid); }
body.th .strip .lane-line { stroke: var(--border-solid); }
body.th .strip .dot { stroke: var(--bg-surface); }
body.th .strip .dot.hollow { fill: var(--bg-surface) !important; }
body.th details summary { color: var(--text-primary); }

/* ---------- footer ---------- */
body.th footer.site { color: var(--text-secondary); }

/* ---------- Sign up: not open yet (first-run canvases, 2026-10-12): notice, then the form greyed out ---------- */
.su-closed { display: flex; gap: 10px; align-items: flex-start; background: #f1f5f9; border: 1px solid #cbd5e1; border-radius: 8px; padding: 12px 14px; color: #334155; font-size: 15px; line-height: 1.45; }
.su-icon { flex: none; margin-top: 2px; display: flex; }
.ri-sent { display: flex; gap: 10px; align-items: flex-start; background: #ecfdf5; border: 1px solid #047857; border-radius: 8px; padding: 12px 14px; font-size: 15px; line-height: 1.45; color: #064e3b; }
body.th label.ri-ok { display: flex; flex-direction: row; font-weight: 400; gap: 10px; align-items: flex-start; min-height: 44px; font-size: 15px; line-height: 1.45; }
body.th label.ri-ok input { width: 20px; height: 20px; margin: 2px 0 0; flex: none; }
body.th button.ri-send { font: 600 16px var(--font-sans); min-height: 44px; cursor: pointer; }

/* ---------- credits and updates (C1–C7, 2026-10-12) ---------- */
body.th main.cred { padding: 28px 40px 64px; gap: 20px; }
.cred-split { display: flex; gap: 56px; align-items: flex-start; }
.cred-split > section { flex: 0 1 560px; display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.cred-split > aside { flex: 1; display: flex; flex-direction: column; gap: 12px; padding-top: 40px; min-width: 0; }
.cred-two { display: flex; gap: 24px; align-items: flex-start; }
.cred-two > .wide { flex: 2; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.cred-two > aside { flex: 1; min-width: 0; }
.cred-narrow { width: 100%; max-width: 640px; display: flex; flex-direction: column; gap: 16px; }
body.th form.card.cred-form { padding: 22px; display: flex; flex-direction: column; gap: 14px; }
body.th form.card.cred-form > button[type="submit"], body.th form.card.cred-form > .button { width: auto; align-self: stretch; }
.dropzone { border: 1px dashed var(--border-solid); border-radius: 8px; padding: 14px; font-size: 14px; line-height: 20px; }
.dropzone label { display: inline; font: inherit; letter-spacing: 0; color: var(--acc); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; margin-left: 8px; }
.dropzone { position: relative; }
.sr-file { position: absolute; left: 0; top: 0; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.dropzone:focus-within { outline: 2px solid var(--border-focus, var(--acc)); outline-offset: 2px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips:empty { display: none; }
body.th .chip { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; padding: 4px 6px 4px 12px; border: 1px solid var(--border-solid); border-radius: 9999px; }
body.th .chip button.link { min-width: 28px; min-height: 28px; text-decoration: none; font-size: 18px; }
.next-list { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 10px; font-size: 15px; }
.hand-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.hand-row > input, .hand-row > select { flex: 1 1 160px; min-width: 0; }
body.th label.button { display: inline-flex; align-items: center; cursor: pointer; font: 600 14px/1 var(--font-sans); letter-spacing: 0; }
body.th .st-plain { padding: 3px 10px; color: var(--text-secondary); border: 1px solid var(--border-solid); background: transparent; }
body.th .st-bad { padding: 3px 10px; color: var(--error); background: var(--error-bg); }
body.th-bl .st-plain, body.th-bl .st-bad { padding: 4px 10px; }
@media (max-width: 900px) {
  body.th main.cred { padding: 24px 16px 48px; }
  .cred-split, .cred-two { flex-direction: column; gap: 24px; align-items: stretch; }
  .cred-split > section { flex: none; }
  .cred-split > aside { padding-top: 0 !important; }
}
/* Big page titles scale down on phones so a long word ("submissions") never pushes the page sideways. */
@media (max-width: 600px) { body.th h1.t-h1 { font-size: clamp(28px, 8.5vw, 38px); overflow-wrap: break-word; } }

/* D-50 Account settings: "Account settings" and the section's name above the list and the section */
body.th main.settings { flex-wrap: wrap; }
.settings-title { flex: 1 1 100%; display: flex; flex-direction: column; gap: 4px; }
.settings-title h1 { margin: 0; }
body.th .settings-body h2.h3 { font: 700 18px/1.2 var(--font-heading); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
