/* Self-hosted variable fonts. Inter's continuous weight axis includes the requested
   400/450/500/600/700 weights; Fraunces carries opsz 9..144 and weights 500/600.
   The content hashes make these URLs safe for L7's immutable cache policy. */
@font-face {
  font-family:"Inter";
  font-style:normal;
  font-weight:400 700;
  /* L11: on a throttled first visit a late swap moved the calculator hero and visible
     form after first paint (CLS 0.111 on the densest Decision Canvas). `optional` keeps
     the metric-compatible fallback for that navigation; the self-hosted font is used
     once cached, without moving an already readable page. */
  font-display:optional;
  src:url("/fonts/inter-latin-wght-normal.3100e775e861.woff2") format("woff2-variations");
  unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family:"Fraunces";
  font-style:normal;
  font-weight:500 600;
  font-display:optional;
  src:url("/fonts/fraunces-latin-opsz-normal.7234ed860a9c.woff2") format("woff2-variations");
  unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

/* Public listing pages (home / category / search) — G20. Shares the calculator
   page's design tokens for a coherent system. */
:root {
  --bg:#f4f5f8; --surface:#fff; --ink:#10131c; --muted:#606a7b;
  --line:#e7e9ef; --line-strong:#d5d9e2; --accent:#4f46e5; --accent-strong:#3730a3;
  --brand-navy:#0D1B2A; --brand-teal:#1B6B6B;
  --radius:16px; --radius-sm:11px;
  --shadow-sm:0 1px 2px rgba(16,19,28,.04), 0 2px 6px rgba(16,19,28,.05);
  --shadow-md:0 12px 34px -14px rgba(16,19,28,.28);
  --font-ui:"Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --font-display:"Fraunces", Georgia, "Times New Roman", serif;
}
* { box-sizing:border-box; }
body { margin:0; font-family:var(--font-ui); color:var(--ink); background:var(--bg); line-height:1.5; -webkit-font-smoothing:antialiased; }
a { color:inherit; text-decoration:none; }
.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; }

.site-header { position:sticky; top:0; z-index:5; background:rgba(255,255,255,.86); backdrop-filter:saturate(1.2) blur(8px);
  border-bottom:1px solid var(--line); }
.site-header .bar { max-width:1080px; margin:0 auto; padding:14px 22px; display:flex; align-items:center; gap:18px; }
/* The brand is the SVG lockup (BRAND.md). Height-driven so the mark keeps its
   proportions; the clear-space rule is honoured by the bar's padding and the gap
   to the nav.

   Sized so the wordmark reads at roughly nav size: the lockup is a 780x220 box
   with a 54px wordmark, so the wordmark renders at height x 0.245. At 38px that
   is 9px — smaller than any text on the page. 56px puts it at ~14px, level with
   the nav links. */
.brand { display:flex; align-items:center; flex:0 0 auto; }
.brand img { display:block; height:56px; width:auto; }
.beta-pill { display:inline-flex; align-items:center; flex:0 0 auto; padding:2px 8px;
  border:1px solid var(--brand-navy); border-radius:999px; color:var(--brand-teal);
  background:transparent; font-size:.72rem; font-weight:700; letter-spacing:.03em; line-height:1.5; }
/* Narrow bars carry the standalone mark (see _SiteHeader), so the height is the
   mark's, not the lockup's, and the row stops overflowing. */
@media (max-width: 719px) { .brand img { height:40px; } }
.site-header nav { margin-left:auto; display:flex; gap:18px; align-items:center; font-size:.9rem; color:var(--muted); }
.search-form { display:flex; gap:8px; }
.search-form input { padding:8px 12px; border:1px solid var(--line-strong); border-radius:999px; font:inherit; font-size:.88rem; min-width:220px; }

.hero-band { background:linear-gradient(140deg, var(--accent), var(--accent-strong)); color:#fff; }
.hero-band .inner { max-width:1080px; margin:0 auto; padding:52px 22px 60px; }
.hero-band h1 { font-family:var(--font-display); font-weight:600; font-size:clamp(2rem,4vw,3rem); line-height:1.05; margin:0 0 .4rem; letter-spacing:-.02em; }
.hero-band p { margin:0; font-size:1.08rem; max-width:62ch; opacity:.94; }

main { max-width:1080px; margin:0 auto; padding:34px 22px 70px; }
.section-head { display:flex; align-items:baseline; justify-content:space-between; margin:34px 0 14px; }
.section-head h2 { font-family:var(--font-display); font-weight:600; font-size:1.4rem; margin:0; letter-spacing:-.01em; }
.section-head .count, .section-head a { font-size:.85rem; color:var(--muted); }
.eyebrow { text-transform:uppercase; letter-spacing:.1em; font-size:.7rem; font-weight:700; color:var(--muted); }

.cards { display:grid; grid-template-columns:repeat(auto-fill, minmax(260px,1fr)); gap:16px; }
.card { display:block; background:var(--surface); border:1px solid var(--line); border-left:4px solid var(--card-accent, var(--accent));
  border-radius:var(--radius); box-shadow:var(--shadow-sm); padding:18px 18px 16px; transition:box-shadow .15s, transform .15s; }
.card:hover { box-shadow:var(--shadow-md); transform:translateY(-2px); }
.card .top { display:flex; align-items:center; gap:10px; }
.card .icon { width:40px; height:40px; border-radius:11px; display:grid; place-items:center; font-size:22px; background:color-mix(in srgb, var(--card-accent, var(--accent)) 12%, #fff); }
.card h3 { margin:0; font-size:1.02rem; font-weight:600; letter-spacing:-.01em; }
.card .cat { font-size:.72rem; text-transform:uppercase; letter-spacing:.05em; color:var(--muted); font-weight:600; }
.card p { margin:11px 0 0; font-size:.88rem; color:var(--muted); line-height:1.5;
  display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden; }

.empty { color:var(--muted); padding:30px 0; }
/* Centred (Ugur, 2026-08-21). The calculator page draws its own footer as
   `.powered-by` and has centred it since it was built; this is the OTHER five —
   home, category, search, the legal shell and the MCP docs page — which all share
   this one rule and were all left-aligned. Fixing it here rather than five times is
   the point of them sharing the class, and #163's lesson about the About link stands:
   there were four footers, not one, and the one nobody remembers is the one that
   stays wrong. */
.powered { max-width:1080px; margin:0 auto; padding:24px 22px 48px; color:var(--muted); font-size:.82rem;
  text-align:center; }
.powered a { color:var(--accent-strong); font-weight:600; }

/* Whole-page 404 (launch readiness L10). The document reuses the public shell and
   these shared tokens; only the live category names/links are supplied at request time. */
.error-hero .eyebrow { color:rgba(255,255,255,.78); margin-bottom:10px; }
.error-page { display:grid; gap:30px; }
.error-actions { display:flex; align-items:center; justify-content:space-between; gap:28px;
  padding:24px; background:var(--surface); border:1px solid var(--line); border-radius:var(--radius);
  box-shadow:var(--shadow-sm); }
.error-actions h2 { margin:0 0 6px; font-family:var(--font-display); font-size:1.35rem; }
.error-actions p { margin:0; color:var(--muted); }
.error-home { flex:0 0 auto; padding:10px 17px; border-radius:999px; background:var(--accent-strong);
  color:#fff; font-weight:650; }
.error-categories .section-head { margin:0 0 14px; }
.error-categories ul { display:grid; grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
  gap:12px; margin:0; padding:0; list-style:none; }
.error-categories li a { display:flex; align-items:baseline; justify-content:space-between; gap:16px;
  min-height:58px; padding:16px; background:var(--surface); border:1px solid var(--line);
  border-radius:var(--radius-sm); box-shadow:var(--shadow-sm); }
.error-categories li a:hover { border-color:var(--accent); box-shadow:var(--shadow-md); }
.error-category-name { font-weight:650; }
.error-category-count { color:var(--muted); font-size:.78rem; white-space:nowrap; }
.error-category-empty { color:var(--muted); padding:16px; border:1px dashed var(--line-strong);
  border-radius:var(--radius-sm); }
.error-feedback { margin:0; padding:18px 20px; color:var(--muted); background:color-mix(in srgb,var(--accent) 5%,#fff);
  border-left:4px solid var(--accent); border-radius:var(--radius-sm); }
.error-feedback a { color:var(--accent-strong); font-weight:650; text-decoration:underline; }

/* Shared visitor feedback form: calculator-local and generic /feedback use one
   partial, one rule set and one moderation workflow. */
.feedback { background:var(--surface); border:1px solid var(--line); border-radius:var(--radius);
  box-shadow:var(--shadow-sm); padding:22px 26px; margin:18px 0; }
.fb-title { font-family:var(--font-display); font-weight:600; font-size:1.15rem; margin:0 0 4px; }
.fb-lede { margin:0 0 18px; color:var(--muted); font-size:.9rem; max-width:62ch; }
.fb-label { display:block; font-size:.82rem; font-weight:600; margin:0 0 6px; }
.fb-optional { font-weight:400; color:var(--muted); }
.fb-input { width:100%; font:inherit; font-size:.92rem; padding:9px 12px; color:var(--ink);
  background:#fff; border:1px solid var(--line-strong); border-radius:var(--radius-sm); }
.fb-input:focus-visible { outline:2px solid var(--accent); outline-offset:1px; border-color:var(--accent); }
.fb-input.fb-bad { border-color:#c0392b; }
.fb-area { resize:vertical; min-height:104px; margin-bottom:2px; }
.fb-hint { margin:6px 0 16px; font-size:.76rem; color:var(--muted); }
.fb-error { margin:10px 0 0; font-size:.85rem; color:#c0392b; font-weight:600; }
.fb-token-error { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-top:12px;
  padding:10px 12px; border:1px solid #e8aaa5; border-radius:8px; background:#fff5f4; color:#8f2019; font-size:.84rem; font-weight:600; }
.fb-token-error[hidden] { display:none; }
.fb-token-error button { flex:none; font:inherit; padding:6px 10px; border:1px solid currentColor; border-radius:7px;
  background:#fff; color:inherit; cursor:pointer; }
.fb-thanks { margin:0; font-size:.95rem; font-weight:600; color:var(--accent-strong); }
.fb-actions { display:flex; flex-wrap:wrap; gap:12px 18px; align-items:center; justify-content:space-between; margin-top:16px; }
.fb-private { margin:0; font-size:.76rem; color:var(--muted); max-width:44ch; }
.fb-send { font:inherit; font-size:.9rem; font-weight:600; padding:9px 20px; cursor:pointer; color:var(--hero-ink,#fff);
  background:var(--accent); border:1px solid var(--accent); border-radius:var(--radius-sm); }
.fb-send:hover { background:var(--accent-strong); border-color:var(--accent-strong); }
/* Off-screen rather than display:none: some automated submitters skip hidden fields. */
.fb-hp { position:absolute; left:-9999px; width:1px; height:1px; overflow:hidden; }
.feedback-hero .eyebrow { color:rgba(255,255,255,.78); margin-bottom:10px; }
.feedback-page { max-width:760px; }
.feedback-unavailable { padding:28px; background:var(--surface); border:1px solid var(--line);
  border-radius:var(--radius); box-shadow:var(--shadow-sm); }
.feedback-unavailable h2 { margin:0 0 8px; font-family:var(--font-display); }
.feedback-unavailable p { color:var(--muted); }
.feedback-unavailable a { color:var(--accent-strong); font-weight:650; }
@media (max-width:640px) {
  .error-actions { align-items:flex-start; flex-direction:column; }
}
@media (max-width:640px) {
  .site-header .bar { padding-inline:12px; gap:8px; }
  .site-header nav { min-width:0; gap:8px; }
  .site-header nav > a { display:none; }
  .search-form { min-width:0; }
  .search-form input { min-width:0; width:150px; max-width:100%; }
}

/* Dense calculator grids can opt into value-at-rest slider cells. The editor is fixed to
   the viewport so a wide track is not clipped by the table's scroll container, while the
   table itself remains a compact, scannable set of values. */
/* The extra body token keeps this live static rule stronger than the calculator page's
   compiled template declaration during local review; the matching source rule in
   Calculators.cshtml remains the canonical no-side-rail layout after the next build. */
body .template-workspace.builder:has(.grid-slider-popover-table) { grid-template-columns:minmax(0,1fr); }
body .template-workspace.builder:has(.grid-slider-popover-table) .bd-results { position:static; }
.grid-in.grid-slider-popover-table { table-layout:fixed; min-width:0; }
.grid-slider-popover-table th,
.grid-slider-popover-table td { min-width:0; }
.grid-slider-popover-table th {
  padding-inline:4px; font-size:.66rem; line-height:1.15; letter-spacing:0;
  overflow-wrap:normal; word-break:normal; hyphens:none;
}
.grid-slider-popover-table select,
.grid-slider-popover-table input { min-width:0; }
.grid-in.grid-slider-popover-table select {
  width:100%; padding-inline:6px 18px; font-size:.8rem; text-overflow:clip;
}
.grid-in.grid-slider-popover-table .grid-col-text input { padding-inline:5px; font-size:.8rem; }
.grid-slider-popover-control { min-width:0; }
.grid-slider-popover-trigger {
  width:100%; min-width:0; border:0; background:transparent; color:var(--ink);
  padding:9px 6px; font:inherit; font-size:.82rem; font-variant-numeric:tabular-nums;
  text-align:right; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; cursor:pointer;
}
.grid-slider-popover-trigger:hover { color:var(--accent); background:color-mix(in srgb,var(--accent) 7%,transparent); }
.grid-slider-popover-trigger:focus-visible { outline:2px solid var(--accent); outline-offset:-2px; }
.grid-slider-popover {
  position:fixed; z-index:1000; box-sizing:border-box; padding:12px 14px 11px;
  background:var(--surface); color:var(--ink); border:1px solid var(--line-strong);
  border-radius:12px; box-shadow:0 18px 44px -16px rgba(16,19,28,.42);
}
.grid-slider-popover-head { display:flex; justify-content:space-between; align-items:baseline; gap:12px; margin-bottom:9px; }
.grid-slider-popover-label { min-width:0; color:var(--muted); font-size:.76rem; font-weight:700; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.grid-slider-popover-value { color:var(--accent); font-size:.9rem; font-variant-numeric:tabular-nums; text-align:right; }
.grid-slider-popover input[type="range"] { display:block; width:100%; min-width:0; height:28px; padding:0; accent-color:var(--accent); cursor:pointer; }
.grid-slider-popover input[type="range"]:focus { outline:0; }
.grid-slider-popover input[type="range"]:focus-visible { outline:2px solid var(--accent); outline-offset:2px; }
.grid-slider-popover-scale { display:flex; justify-content:space-between; gap:12px; color:var(--muted); font-size:.68rem; font-variant-numeric:tabular-nums; }
.grid-slider-popover-close {
  display:block; margin:8px 0 0 auto; border:1px solid var(--line-strong); border-radius:8px;
  padding:5px 10px; background:var(--surface); color:var(--ink); font:inherit; font-size:.74rem; cursor:pointer;
}
.grid-slider-popover-close:hover { border-color:var(--accent); color:var(--accent); }
.grid-slider-popover-close:focus-visible { outline:2px solid var(--accent); outline-offset:2px; }

/* A 15-column engineering schedule cannot preserve useful touch targets by shrinking
   every column to tablet or phone width. Below the tablet breakpoint, present each grid row as a
   labeled card. The submitted matrix is unchanged, but every control remains at least
   44px tall and the slider value triggers take the full available row width. */
@media (max-width:900px) {
  body .template-workspace .field .grid-in.grid-slider-popover-table {
    min-width:0; max-width:100%;
  }
  .grid-in.grid-slider-popover-table,
  .grid-slider-popover-table tbody { display:block; width:100%; }
  .grid-slider-popover-table thead {
    position:absolute; width:1px; height:1px; padding:0; margin:-1px;
    overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0;
  }
  .grid-slider-popover-table tbody { display:grid; gap:12px; }
  .grid-slider-popover-table tbody tr {
    display:grid; grid-template-columns:minmax(0,1fr); gap:0; width:100%;
    padding:8px; border:1px solid var(--line); border-radius:12px; background:var(--surface);
  }
  .grid-slider-popover-table tbody td,
  .grid-slider-popover-table tbody td.grid-col-checkbox,
  .grid-slider-popover-table tbody td.grid-col-text,
  .grid-slider-popover-table tbody td.grid-col-dropdown,
  .grid-slider-popover-table tbody td.grid-col-slider {
    display:grid; grid-template-columns:minmax(112px,42%) minmax(0,1fr);
    align-items:center; gap:10px; width:auto; min-width:0; min-height:44px;
    padding:5px 6px; border:0; text-align:left;
  }
  .grid-slider-popover-table tbody td::before {
    content:attr(data-column-label); color:var(--muted); font-size:.7rem;
    font-weight:700; line-height:1.2; overflow-wrap:anywhere;
  }
  .grid-slider-popover-table tbody td > select,
  .grid-slider-popover-table tbody td > input:not([type="checkbox"]),
  .grid-slider-popover-table .grid-slider-popover-control,
  .grid-slider-popover-table .grid-slider-popover-trigger { width:100%; min-width:0; }
  .grid-slider-popover-table .grid-slider-popover-trigger {
    min-height:44px; border:1px solid var(--line); border-radius:9px;
    padding:8px 10px; background:var(--surface-soft);
  }
}
