/* ==========================================================================
   Sagecrest — client portal design system

   Adapted from the ReplySage dashboard system (owner directive: reuse the
   look, don't redesign it). The token architecture is unchanged — same custom
   properties, same component vocabulary (.card / .badge / .chip / .btn /
   .stat / .alert / table / form), so markup written against either system
   renders correctly here.

   What changed for Sagecrest:
     - the evergreen accent is cooled and deepened a touch for a finance feel;
       the sage/porcelain ground is kept verbatim (it IS the brand)
     - added --up / --down semantic tokens: P&L is the one place in this
       product where red/green carry meaning, and they must never be improvised
       per-template
     - dropped the ReplySage-only sections (star glyphs, review thread,
       onboarding checklist, plan picker) — dead weight for this product
     - added the .entrance-* auth-card layer that allauth's templates render into

   All colour/type/spacing decisions live here as tokens. No inline styles.
   ========================================================================== */

:root {
  /* --- ground: unchanged from the donor, this is the brand ---------------- */
  --porcelain: #F3F6F4;
  --surface: #FFFFFF;
  --ink: #152420;
  --muted: #5D6F68;

  /* --- accent: cooled + deepened evergreen -------------------------------- */
  --evergreen: #1B5348;
  --evergreen-deep: #123A32;
  --sage-line: #D8E2DC;
  --sage-fill: #EAF0EC;

  /* --- status ------------------------------------------------------------- */
  --hold: #8A5A00;        /* needs you / pending / paused */
  --hold-fill: #FAF0DC;
  --hold-line: #E4C778;
  --live: #1C7A4A;        /* healthy / active / filled */
  --live-fill: #E2F2E8;
  --clay: #A63D2F;        /* negative / destructive / failed */
  --clay-fill: #F7E7E3;

  /* --- market semantics: the ONLY sanctioned red/green for numbers -------- */
  --up: #16704A;
  --down: #A63D2F;

  /* --- type --------------------------------------------------------------- */
  --font-display: "Bricolage Grotesque", "Public Sans", system-ui, sans-serif;
  --font-body: "Public Sans", system-ui, -apple-system, sans-serif;
  --font-mono: "Spline Sans Mono", ui-monospace, "SF Mono", monospace;

  /* --- shape -------------------------------------------------------------- */
  --r-card: 10px;
  --r-ui: 8px;
  --shadow-lift: 0 2px 8px rgb(21 36 32 / 0.08);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-body);
  font-size: 0.9rem;
  line-height: 1.6;
  background: var(--porcelain);
  color: var(--ink);
  min-height: 100vh;
}

a { color: var(--evergreen); text-decoration: none; }
a:hover { text-decoration: underline; }

:focus-visible {
  outline: 2px solid var(--evergreen);
  outline-offset: 2px;
  border-radius: 2px;
}

.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;
}

/* --------------------------------------------------------------------------
   Top bar — the brand is the identity; the environment tag sits quietly.
   -------------------------------------------------------------------------- */
.topbar {
  background: var(--ink);
  color: #fff;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 56px;
  flex-wrap: wrap;
}
/* Text brand mark: a monogram tile stands in for a logo asset until there is
   one. Swapping in an <img> later needs no other CSS change. */
.topbar .brand-mark {
  width: 24px; height: 24px; flex: none;
  margin-right: -12px; /* tighten the 24px flex gap into a mark+name lockup */
  border-radius: 6px;
  background: var(--evergreen);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.8rem;
  display: grid;
  place-items: center;
  line-height: 1;
}
.topbar .org {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  color: #fff;
  letter-spacing: 0.01em;
}
.topbar nav { display: flex; gap: 20px; align-items: center; }
.topbar nav a {
  color: #B9C6C0;
  font-size: 0.85rem;
  font-weight: 500;
  padding: 4px 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.topbar nav a:hover { color: #fff; text-decoration: none; }
.topbar nav a[aria-current="page"] {
  color: #fff;
  text-decoration: underline;
  text-decoration-color: var(--evergreen);
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
}
.topbar .spacer { flex: 1; }
.topbar .whoami { font-size: 0.8rem; color: #8FA39B; }
.topbar .signout-form { display: inline; }
.topbar .signout { color: #8FA39B; font-size: 0.8rem; background: none; border: 0;
  padding: 0; font-family: inherit; cursor: pointer; text-decoration: none; }
.topbar .signout:hover { color: var(--porcelain); text-decoration: underline; }
.topbar .product { font-size: 0.72rem; color: #6E837B; font-family: var(--font-mono); letter-spacing: 0.06em; }

/* the only colored element allowed in the bar */
.pill {
  background: var(--hold-fill);
  color: var(--hold);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  line-height: 1;
  padding: 3px 8px;
}

/* --------------------------------------------------------------------------
   Layout
   -------------------------------------------------------------------------- */
.container { max-width: 1040px; margin: 0 auto; padding: 32px 16px 48px; }

.page-header { margin-bottom: 24px; }
.page-header h1 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.page-header .sub { color: var(--muted); margin-top: 4px; font-size: 0.85rem; }
.page-header .sub .count { font-family: var(--font-mono); }

.breadcrumb {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  margin-bottom: 16px;
  display: inline-block;
}

/* --------------------------------------------------------------------------
   Cards
   -------------------------------------------------------------------------- */
.card {
  background: var(--surface);
  border: 1px solid var(--sage-line);
  border-radius: var(--r-card);
  padding: 20px;
  margin-bottom: 16px;
}
.card-title {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 12px;
}
.card p + p { margin-top: 10px; }

/* --------------------------------------------------------------------------
   Collapsible cards (WP-11) — a <details class="card collapsible"> whose
   <summary class="card-title"> is the click target. The chevron is drawn in
   CSS so no icon font is needed, and it rotates on [open].
   -------------------------------------------------------------------------- */
details.collapsible > summary.card-title {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 0;
  user-select: none;
}
details.collapsible > summary.card-title::-webkit-details-marker { display: none; }
details.collapsible > summary.card-title::before {
  content: "";
  flex: none;
  width: 6px;
  height: 6px;
  border-right: 1.5px solid var(--muted);
  border-bottom: 1.5px solid var(--muted);
  transform: rotate(-45deg);
  transition: transform 0.15s ease;
}
details.collapsible[open] > summary.card-title::before { transform: rotate(45deg); }
details.collapsible[open] > summary.card-title { margin-bottom: 12px; }
details.collapsible > summary.card-title:focus-visible {
  outline: 2px solid var(--evergreen);
  outline-offset: 2px;
  border-radius: 3px;
}

/* Positions toolbar: strategy filter on the left, export on the right. */
.card-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.card-toolbar .spacer { flex: 1 1 auto; }
.card-toolbar .filter-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

/* rails: the one loud thing on any page */
.is-held { box-shadow: inset 3px 0 0 var(--hold-line); }
.rail-clay { box-shadow: inset 3px 0 0 var(--clay); }
.rail-sage { box-shadow: inset 3px 0 0 var(--evergreen); }

/* --------------------------------------------------------------------------
   Needs-you band (shown only when something is waiting on the customer)
   -------------------------------------------------------------------------- */
.needs-band {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  background: var(--surface);
  border: 1px solid var(--hold-line);
  box-shadow: inset 3px 0 0 var(--hold-line);
  border-radius: var(--r-card);
  padding: 16px 20px;
  margin-bottom: 24px;
}
.needs-band p { flex: 1; min-width: 220px; }
.needs-band strong { font-family: var(--font-display); }

/* --------------------------------------------------------------------------
   Stat tiles
   -------------------------------------------------------------------------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 24px; }
.stat {
  background: var(--surface);
  border: 1px solid var(--sage-line);
  border-radius: var(--r-card);
  padding: 14px 16px;
  display: block;
  color: var(--ink);
}
a.stat:hover { text-decoration: none; box-shadow: var(--shadow-lift); }
.stat-value { font-family: var(--font-display); font-size: 2.1rem; font-weight: 600; line-height: 1.1; }
/* money and percentages are tabular — they must line up column to column */
.stat-value.num { font-family: var(--font-mono); font-size: 1.7rem; font-variant-numeric: tabular-nums; }
.stat-label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 4px;
}
.stat.is-hot { border-top: 3px solid var(--hold-line); }
.stat.is-hot .stat-value { color: var(--hold); }

/* P&L direction — see --up / --down above */
.is-up { color: var(--up); }
.is-down { color: var(--down); }

/* --------------------------------------------------------------------------
   Badges & chips
   -------------------------------------------------------------------------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.6;
  white-space: nowrap;
}
.badge .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.b-hold  { background: var(--hold-fill); color: var(--hold); }
.b-live  { background: var(--live-fill); color: var(--live); }
.b-sage  { background: var(--sage-fill); color: var(--muted); }
.b-clay  { background: var(--clay-fill); color: var(--clay); }
.b-clay-o { background: transparent; color: var(--clay); border: 1px solid var(--clay); }
.b-outline { background: transparent; color: var(--muted); border: 1px solid var(--sage-line); }

.chip {
  display: inline-block;
  border: 1px solid var(--hold-line);
  background: var(--surface);
  color: var(--hold);
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 0.72rem;
  font-weight: 500;
  margin: 2px 4px 2px 0;
}
.chip-clay { border-color: var(--clay); color: var(--clay); }
.chip-sage { border-color: var(--sage-line); color: var(--muted); }
.chip code { font-family: var(--font-mono); font-size: 0.7rem; }

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-block;
  padding: 8px 16px;
  border-radius: var(--r-ui);
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.4;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 120ms ease, color 120ms ease, border-color 120ms ease;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--evergreen); color: #fff; }
.btn-primary:hover { background: var(--evergreen-deep); color: #fff; }
.btn-quiet { background: var(--surface); color: var(--ink); border-color: var(--sage-line); }
.btn-quiet:hover { border-color: var(--evergreen); color: var(--evergreen); }
.btn-danger { background: transparent; color: var(--clay); border-color: var(--clay); }
.btn-danger:hover { background: var(--clay); color: #fff; }
.btn-ghost { background: transparent; color: var(--muted); }
.btn-ghost:hover { color: var(--ink); }
.btn-sm { padding: 5px 12px; font-size: 0.78rem; }

.action-bar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-top: 14px; }
.action-note { font-size: 0.75rem; color: var(--muted); margin-top: 10px; }

/* --------------------------------------------------------------------------
   Tables
   -------------------------------------------------------------------------- */
table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
th {
  text-align: left;
  padding: 10px 16px;
  background: var(--sage-fill);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
th:first-child { border-radius: var(--r-ui) 0 0 var(--r-ui); }
th:last-child { border-radius: 0 var(--r-ui) var(--r-ui) 0; }
td { padding: 12px 16px; border-bottom: 1px solid var(--sage-line); vertical-align: top; }
tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: var(--porcelain); }
td.mono, .mono { font-family: var(--font-mono); font-size: 0.75rem; color: var(--muted); }
/* prices, quantities, P&L — tabular figures so digits align down the column */
td.num, .num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
td.nowrap { white-space: nowrap; }

/* --------------------------------------------------------------------------
   Forms
   -------------------------------------------------------------------------- */
.form-group { margin-bottom: 16px; }
label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 4px; }
input[type=text], input[type=email], input[type=password], input[type=number], select, textarea {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--sage-line);
  border-radius: var(--r-ui);
  font-family: var(--font-body);
  font-size: 0.875rem;
  line-height: 1.5;
  background: var(--surface);
  color: var(--ink);
}
input:focus, select:focus, textarea:focus {
  outline: 2px solid var(--evergreen);
  outline-offset: 0;
  border-color: var(--evergreen);
}
textarea { min-height: 110px; resize: vertical; line-height: 1.6; }
select { width: auto; min-width: 180px; }
input.w-narrow { width: 90px; }
.inline-fields { display: flex; gap: 8px; align-items: center; }
.inline-fields .sep { color: var(--muted); font-size: 0.8rem; }

.check-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px 12px;
  border: 1px solid var(--sage-line);
  border-radius: var(--r-ui);
  cursor: pointer;
}
.check-row:hover { border-color: var(--evergreen); }
.check-row input { width: auto; margin-top: 3px; accent-color: var(--evergreen); }
.check-row .check-label { font-weight: 600; font-size: 0.85rem; display: block; }
.check-row .help { margin-top: 2px; }
.help { font-size: 0.75rem; font-weight: 400; color: var(--muted); }

.filter-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }

/* Django/allauth field errors render as a <ul class="errorlist">. */
.errorlist {
  list-style: none;
  margin: 0 0 6px;
  padding: 0;
  color: var(--clay);
  font-size: 0.78rem;
}
.errorlist.nonfield {
  border: 1px solid var(--clay);
  box-shadow: inset 3px 0 0 var(--clay);
  border-radius: var(--r-ui);
  background: var(--surface);
  padding: 10px 14px;
  margin-bottom: 16px;
  font-size: 0.85rem;
}

/* --------------------------------------------------------------------------
   Alerts (Django messages: success / error / warning / info)
   -------------------------------------------------------------------------- */
.alert {
  background: var(--surface);
  border: 1px solid var(--sage-line);
  border-radius: var(--r-ui);
  padding: 10px 14px;
  margin-bottom: 16px;
  font-size: 0.85rem;
}
.alert-success { border-color: var(--live); box-shadow: inset 3px 0 0 var(--live); }
.alert-error, .alert-danger { border-color: var(--clay); box-shadow: inset 3px 0 0 var(--clay); }
.alert-warning { border-color: var(--hold-line); box-shadow: inset 3px 0 0 var(--hold-line); }
.alert-info { box-shadow: inset 3px 0 0 var(--sage-line); }

/* --------------------------------------------------------------------------
   Empty states
   -------------------------------------------------------------------------- */
.empty { text-align: center; padding: 48px 16px; }
.empty h2 { font-family: var(--font-display); font-size: 1.3rem; font-weight: 600; margin-bottom: 6px; }
.empty p { color: var(--muted); max-width: 420px; margin: 0 auto; }

/* --------------------------------------------------------------------------
   Entrance pages — login / signup / verification / password reset.
   Every allauth template renders into this card via
   templates/allauth/layouts/entrance.html.
   -------------------------------------------------------------------------- */
.entrance-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 16px; }
.entrance-card {
  background: var(--surface);
  border: 1px solid var(--sage-line);
  border-radius: var(--r-card);
  padding: 44px 40px;
  width: 100%;
  max-width: 420px;
}
.entrance-card .brand-mark {
  width: 46px; height: 46px;
  border-radius: 12px;
  background: var(--evergreen);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.3rem;
  display: grid;
  place-items: center;
  margin-bottom: 14px;
  line-height: 1;
}
.entrance-card .brand { font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; }
.entrance-card .promise { color: var(--muted); font-size: 0.85rem; margin: 4px 0 24px; }
.entrance-card h1 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 8px;
}
.entrance-card p { font-size: 0.85rem; color: var(--muted); margin-bottom: 16px; }
.entrance-card form p { color: var(--ink); margin-bottom: 0; }
.entrance-card .form-group { margin-bottom: 14px; }
.entrance-card button[type=submit], .entrance-card .btn { width: 100%; margin-top: 6px; }
.entrance-help { text-align: center; margin-top: 16px; font-size: 0.82rem; color: var(--muted); }
.entrance-help a { color: var(--muted); text-decoration: underline; }
.entrance-help a:hover { color: var(--ink); }

/* Beta seat counter on the signup card. */
.seat-note {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 18px;
}

/* --------------------------------------------------------------------------
   Detail layout
   -------------------------------------------------------------------------- */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.narrow { max-width: 720px; margin: 0 auto; }
.gate-card { max-width: 460px; margin: 64px auto; text-align: center; padding: 40px 32px; }
.gate-card h2 { font-family: var(--font-display); font-size: 1.3rem; margin-bottom: 10px; }
.gate-card p { color: var(--muted); margin-bottom: 20px; }

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 900px) {
  .two-col { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .container { padding: 20px 12px 40px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .topbar { padding: 10px 16px; gap: 12px; }
  .topbar .product { display: none; }
  .entrance-card { padding: 32px 24px; }

  /* wide tables → stacked cards */
  .collapsing thead { display: none; }
  .collapsing tr {
    display: block;
    border: 1px solid var(--sage-line);
    border-radius: var(--r-card);
    margin-bottom: 10px;
    background: var(--surface);
    padding: 8px 0;
  }
  .collapsing td { display: flex; gap: 10px; border: none; padding: 4px 14px; text-align: left; }
  .collapsing td::before {
    content: attr(data-label);
    font-family: var(--font-mono);
    font-size: 0.68rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
    min-width: 84px;
    padding-top: 2px;
  }
  .collapsing tbody tr:hover td { background: transparent; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ==========================================================================
   WP-8 — dashboard
   Nothing here is a new visual language: the dashboard is built out of the
   .card / .badge / .stat / table vocabulary above. These are the few
   compositions that page needs and no other page does.
   ========================================================================== */

/* --- health line under the page title ------------------------------------ */
.health-row { margin-top: 10px; display: flex; }
.health { display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.health-note { font-size: 0.82rem; color: var(--muted); }
.health-verified {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  color: var(--muted);
}

/* --- setup checklist (shown only while a step is missing) ---------------- */
.setup-steps { list-style: none; margin-top: 14px; display: grid; gap: 12px; }
.setup-steps li { display: flex; gap: 12px; align-items: flex-start; }
.setup-steps li > div { flex: 1; }
.setup-steps .step-mark {
  width: 24px; height: 24px; flex: none;
  border-radius: 50%;
  border: 1px solid var(--sage-line);
  background: var(--surface);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  display: grid;
  place-items: center;
  line-height: 1;
}
.setup-steps li.done .step-mark {
  background: var(--live-fill);
  border-color: var(--live);
  color: var(--live);
}
.setup-steps li.done strong { color: var(--muted); font-weight: 500; }
.setup-steps .btn { margin-top: 8px; }

/* --- issues list --------------------------------------------------------- */
.issue-list { list-style: none; display: grid; gap: 12px; }
.issue {
  border: 1px solid var(--sage-line);
  border-radius: var(--r-ui);
  box-shadow: inset 3px 0 0 var(--clay);
  padding: 12px 14px;
  background: var(--surface);
}
.issue-head { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 6px; }
.issue p { font-size: 0.85rem; margin-bottom: 10px; }

/* --- positions / executions detail ---------------------------------------- */
/* the percent beside a P&L figure, and the fill qty beside a fill price */
.pnl-pct { font-size: 0.7rem; opacity: 0.75; margin-left: 4px; }
/* a skip/fail reason, wrapped under its status badge rather than beside it */
.exec-detail { display: block; font-size: 0.72rem; color: var(--muted); margin-top: 3px; }

/* --- product cards -------------------------------------------------------- */
.product-card {
  border: 1px solid var(--sage-line);
  border-radius: var(--r-card);
  padding: 16px;
  background: var(--surface);
}
.product-card-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.product-card-head strong { font-family: var(--font-display); font-size: 1rem; }
.product-card th { background: transparent; padding-left: 0; }
.product-card td { padding-right: 0; }
.card-title-link { float: right; text-transform: none; letter-spacing: 0; }

/* an .action-bar that centres itself inside an .empty state */
.action-bar-center { justify-content: center; }

/* --------------------------------------------------------------------------
   Conviction scoreboard (WP-10)

   Two rules, not a component: the board is an ordinary table using the
   vocabulary above, and the only thing it needs that nothing else does is the
   rank-movement cell. `.is-up` / `.is-down` carry the colour (they are the one
   sanctioned red/green in this system); these size the glyph and give the
   unchanged case a neutral tone of its own.
   -------------------------------------------------------------------------- */
.rank-move { font-size: 0.8rem; letter-spacing: 0.02em; }
.rank-move.rank-flat { color: var(--muted); }

/* WP-10 sizing controls — the two dollar inputs render as equal siblings:
   same column, same label, same input, one help line each. Collapses to a
   single column on narrow cards. */
.sizing-form { display: block; }
.sizing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 4px 14px;
  align-items: start;
  margin-bottom: 10px;
}
.sizing-grid .form-group { margin-bottom: 0; }
.sizing-grid .help { margin: 4px 0 0; min-height: 2.1em; }
.sizing-grid label { white-space: nowrap; }
.label-soft { font-weight: 400; color: var(--muted); }
.sizing-form button[type=submit] { margin-top: 2px; }
