/* ==========================================================================
   KruxLabs — shared site stylesheet
   One design system for the company site + every product sub-site.

   Product pages opt into their own accent palette by setting a data attribute
   on <body>, e.g. <body data-product="my-calorie-judge">. Only the accent
   tokens change; layout, type scale and components stay identical.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Design tokens
   -------------------------------------------------------------------------- */
:root {
  /* Brand — sampled from the KruxLabs mark (crimson → orange gradient) */
  --brand-red: #E1251B;
  --brand-orange: #FF8A00;
  --brand-gradient: linear-gradient(135deg, var(--brand-red), var(--brand-orange));

  /* Accent — what buttons/links/highlights use. Products override these.
     --accent is tuned a touch darker than --brand-red so link/label text clears
     WCAG AA on --bg-alt as well as on white. */
  --accent: #D62119;
  --accent-strong: #B81A12;
  --accent-soft: #FFF1EC;
  --accent-gradient: var(--brand-gradient);
  /* Foreground on a flat --accent fill (skip link, solid chips). Flips with the
     accent, which goes light in dark mode. */
  --on-accent: #FFFFFF;
  /* Foreground on --accent-gradient. The gradients stay dark in both schemes,
     so this is always light — keep it separate from --on-accent. */
  --on-gradient: #FFFFFF;

  /* Surfaces */
  --bg: #FFFFFF;
  --bg-alt: #F7F8FA;
  --surface: #FFFFFF;
  --surface-raised: #FFFFFF;

  /* Ink */
  --ink: #14181F;
  --ink-soft: #3D4551;
  /* Tuned so muted text clears WCAG AA (4.5:1) on --bg-alt, not just on white. */
  --muted: #656E7C;
  --line: #E6E9EF;
  /* Form-field borders need 3:1 against the field background (WCAG 1.4.11
     Non-text Contrast) or people can't see where the input is. --line is a
     decorative hairline and far too faint for that — don't reuse it here. */
  --field-border: #8A93A1;

  /* Depth */
  --shadow-sm: 0 1px 2px rgba(20, 24, 31, .06);
  --shadow-md: 0 4px 16px rgba(20, 24, 31, .08);
  --shadow-lg: 0 18px 48px rgba(20, 24, 31, .14);

  /* Geometry */
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 22px;
  --wrap: 1080px;
  --wrap-narrow: 760px;

  /* Type */
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
          Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

/* Product theme: My Calorie Judge — the courtroom palette from the app. */
[data-product="my-calorie-judge"] {
  --accent: #2E5339;        /* bench green */
  --accent-strong: #24402C; /* darker green */
  --accent-soft: #F3EBDB;   /* parchment */
  --accent-gradient: linear-gradient(135deg, #2E5339, #6E4A2E);
  --on-accent: #FDF9EF;
}

/* Dark mode — follows the OS. Accents stay legible on dark surfaces. */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0F1216;
    --bg-alt: #151A20;
    --surface: #171C23;
    --surface-raised: #1D232B;

    --ink: #F2F4F7;
    --ink-soft: #C3CAD4;
    --muted: #8B95A3;
    --line: #262D36;
    --field-border: #6B7683;

    --accent: #FF6A4D;
    --accent-strong: #FF8A00;
    --accent-soft: #241713;
    /* Accent goes light in dark mode, so text sitting ON it must go dark. */
    --on-accent: #1A0E08;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .5);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, .45);
    --shadow-lg: 0 18px 48px rgba(0, 0, 0, .55);
  }

  [data-product="my-calorie-judge"] {
    --accent: #8FBF9C;
    --accent-strong: #B6D6BE;
    --accent-soft: #16231A;
    --on-accent: #10160F;
  }
}

/* --------------------------------------------------------------------------
   2. Base
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  color: var(--ink);
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0 0 .6em;
  font-weight: 800;
}

h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3.2vw, 2rem); }
h3 { font-size: 1.15rem; }

p { margin: 0 0 1.1em; }

a {
  color: var(--accent);
  text-decoration: none;
  transition: color .15s ease;
}
a:hover { text-decoration: underline; }

img { max-width: 100%; height: auto; display: block; }

hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 40px 0;
}

code {
  font-family: var(--font-mono);
  font-size: .9em;
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: .12em .4em;
}

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

/* Skip link — keyboard users land here first. */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: var(--on-accent);
  padding: 10px 16px;
  border-radius: 0 0 var(--radius-sm) 0;
  z-index: 100;
  font-weight: 700;
}
.skip-link:focus { left: 0; text-decoration: none; }

/* --------------------------------------------------------------------------
   3. Layout
   -------------------------------------------------------------------------- */
.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 22px;
}
.wrap--narrow { max-width: var(--wrap-narrow); }

.section { padding: 72px 0; }
.section--tight { padding: 44px 0; }
.section--alt { background: var(--bg-alt); }

.section__head {
  max-width: var(--wrap-narrow);
  margin: 0 0 40px;
}
.section__head p {
  color: var(--muted);
  font-size: 1.05rem;
  margin: 0;
}

/* --------------------------------------------------------------------------
   4. Top navigation
   -------------------------------------------------------------------------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}

.topbar__inner {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 12px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1rem;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.brand:hover { text-decoration: none; }
.brand img { width: 30px; height: 30px; object-fit: contain; }
.brand__sub {
  color: var(--muted);
  font-weight: 600;
  border-left: 1px solid var(--line);
  padding-left: 10px;
  margin-left: 2px;
}

.navlinks {
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
}
.navlinks a {
  color: var(--muted);
  font-weight: 600;
  font-size: .92rem;
}
.navlinks a:hover,
.navlinks a[aria-current="page"] {
  color: var(--ink);
  text-decoration: none;
}

@media (max-width: 640px) {
  .topbar__inner { flex-direction: column; align-items: flex-start; gap: 10px; }
  .navlinks { gap: 16px; }
  .brand__sub { display: none; }
}

/* --------------------------------------------------------------------------
   5. Hero
   -------------------------------------------------------------------------- */
.hero {
  padding: 88px 0 76px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  /* Soft brand glow behind the headline. */
  content: "";
  position: absolute;
  inset: -40% 20% auto;
  height: 420px;
  background: var(--accent-gradient);
  opacity: .1;
  filter: blur(90px);
  pointer-events: none;
}
.hero > * { position: relative; }

/* The mark and the "Think · Build · Deploy" eyebrow are meant to read as one
   lockup, so the gap here is deliberately tight. Both elements are forced to
   display:block to get there: as inline boxes they were baseline-aligned inside
   line boxes whose strut is the body's 1.65 line-height, which padded roughly
   9px above the eyebrow and below the mark — space no margin value can reach.
   text-align:center on .hero keeps them centred. Section eyebrows are untouched;
   this is scoped to the hero. */
.hero__logo {
  display: block;
  width: 108px;
  margin: 0 auto 12px;
}
.hero .eyebrow {
  display: block;
  line-height: 1;
}
.hero h1 { margin-bottom: .35em; }
.hero__tag {
  max-width: 620px;
  margin: 0 auto 32px;
  font-size: 1.15rem;
  color: var(--ink-soft);
}

/* Solid-accent hero variant, used on product pages. */
.hero--filled {
  background: var(--accent-gradient);
  color: var(--on-gradient);
}
.hero--filled h1,
.hero--filled .hero__tag { color: var(--on-gradient); }
.hero--filled .hero__tag { opacity: .92; }
.hero--filled::before { display: none; }

/* Compact hero for legal / utility pages. */
.pagehead {
  background: var(--bg-alt);
  border-bottom: 1px solid var(--line);
  padding: 48px 0 40px;
}
.pagehead h1 { margin-bottom: .25em; }
.pagehead .eyebrow { margin-bottom: 14px; }
.pagehead__meta {
  color: var(--muted);
  font-size: .9rem;
  margin: 0;
}

/* --------------------------------------------------------------------------
   6. Components
   -------------------------------------------------------------------------- */

/* Eyebrow / kicker label */
.eyebrow {
  display: inline-block;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}
.hero--filled .eyebrow {
  /* This variant is a pill with its own background, so it has to hug its text —
     the display:block that tightens the lockup on the plain hero would stretch
     the fill across the whole column. */
  display: inline-block;
  color: var(--on-gradient);
  background: rgba(255, 255, 255, .16);
  padding: 6px 14px;
  border-radius: 99px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 12px 24px;
  border-radius: 99px;
  font-weight: 700;
  font-size: .95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease, background .15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }

/* Text-bearing fills use the accent PAIR, not --accent-gradient. The brand
   gradient ends in a bright orange that can't carry small white text at AA;
   accent → accent-strong stays contrast-safe in every theme and scheme. */
.btn--primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: var(--on-accent);
  box-shadow: var(--shadow-md);
}
.btn--primary:hover { box-shadow: var(--shadow-lg); }

.btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); }

.btn-row {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
}

/* Tag / pill */
.tag {
  display: inline-block;
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 99px;
  padding: 4px 12px;
}
.tag--muted { color: var(--muted); background: var(--bg-alt); }

/* Generic responsive grid */
.grid {
  display: grid;
  gap: 22px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }

/* Card */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow-sm);
}
.card h3 { margin-bottom: .45em; }
.card p { color: var(--muted); margin: 0; }
/* Card icons are inline stroked SVG on a 24x24 grid, drawn in currentColor so
   they pick up --accent — the page's product palette and both colour schemes —
   instead of being fixed multicolour art. Geometry (fill, stroke, caps) lives
   here rather than on the elements, so a new icon is only paths. Keep
   stroke-width at 2; thinner reads washed out on dark. */
.card__icon { flex-shrink: 0; }
.card__icon svg {
  display: block;
  width: 24px;
  height: 24px;
  color: var(--accent);
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Puts a card's icon — or its step number — on the heading's row rather than
   stacked above it, so this row owns the space below and the heading's own
   margin comes off. */
.card__head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: .45em;
}
.card__head h3 { margin: 0; }

/* Project card — the repeating unit of the KruxLabs projects grid. */
.project {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
a.project:hover {
  text-decoration: none;
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: color-mix(in srgb, var(--accent) 40%, var(--line));
}
.project__top {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}
.project__icon {
  width: 52px;
  height: 52px;
  border-radius: 13px;
  object-fit: cover;
  border: 1px solid var(--line);
  flex: none;
}
.project h3 { margin: 0 0 4px; }
.project__desc { color: var(--muted); margin: 0 0 20px; flex: 1; }
.project__meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: .85rem;
  color: var(--muted);
}

/* Placeholder card for projects not announced yet */
.project--ghost {
  border-style: dashed;
  background: transparent;
  box-shadow: none;
}
.project--ghost h3 { color: var(--muted); }

/* Numbered steps */
.steps { counter-reset: step; }
.step__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: var(--on-accent);
  font-weight: 800;
  font-size: .95rem;
  /* Sits in a .card__head row, which owns the spacing below it. */
  flex-shrink: 0;
}

/* Store badges (Google Play / App Store) */
.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  background: #1B1B1B;
  color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 12px;
  padding: 10px 18px;
  min-width: 190px;
  transition: transform .12s ease, box-shadow .12s ease;
}
.store-badge:hover {
  text-decoration: none;
  color: #FFFFFF;
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}
.store-badge[aria-disabled="true"] { opacity: .55; pointer-events: none; }
.store-badge svg { width: 26px; height: 26px; flex: none; }
.store-badge .txt { text-align: left; line-height: 1.2; }
.store-badge .txt small {
  display: block;
  font-size: 10px;
  letter-spacing: .04em;
  text-transform: uppercase;
  opacity: .85;
}
.store-badge .txt span { display: block; font-size: 17px; font-weight: 700; }

/* Callout box — notes, warnings, "what gets deleted" */
.callout {
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  background: var(--bg-alt);
  border-radius: var(--radius-sm);
  padding: 18px 22px;
  margin: 0 0 24px;
}
.callout p:last-child { margin-bottom: 0; }
.callout--warn { border-left-color: #D9822B; }

/* Formula block — the equations on the Science page. Mono, scrollable on
   narrow screens so a long formula never widens the page. */
.formula {
  font-family: var(--font-mono);
  font-size: .85rem;
  line-height: 1.7;
  font-weight: 700;
  color: var(--accent-strong);
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  margin: 16px 0 0;
  white-space: pre-line;
  overflow-x: auto;
}

/* Reference list */
.source + .source { margin-top: 14px; }
.source__cite {
  font-weight: 800;
  font-size: .92rem;
  color: var(--ink);
  margin: 0 0 2px;
}
.source__note { color: var(--muted); font-size: .9rem; margin: 0; }

/* --------------------------------------------------------------------------
   6b. Forms — the support page
   -------------------------------------------------------------------------- */
.field { margin-bottom: 18px; }
.field label {
  display: block;
  font-weight: 700;
  font-size: .9rem;
  margin-bottom: 6px;
  color: var(--ink);
}
.field .hint { color: var(--muted); font-weight: 500; font-size: .82rem; }

.field input,
.field select,
.field textarea {
  width: 100%;
  font: inherit;
  font-size: .95rem;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--field-border);
  border-radius: var(--radius-sm);
  padding: 11px 13px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field textarea { min-height: 150px; resize: vertical; }
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent);
}
.field input[aria-invalid="true"],
.field textarea[aria-invalid="true"],
.field select[aria-invalid="true"] { border-color: #D9534F; }

.field__error {
  display: none;
  color: #D9534F;
  font-size: .84rem;
  font-weight: 600;
  margin-top: 5px;
}
.field__error[data-shown="true"] { display: block; }

/* Honeypot — hidden from people, tempting to bots. Not display:none, which
   some bots detect; kept out of the tab order and off-screen instead. */
.hp {
  position: absolute !important;
  left: -9999px !important;
  width: 1px; height: 1px;
  overflow: hidden;
}

/* Submit status banner */
.formstatus {
  display: none;
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  margin-bottom: 22px;
  font-size: .93rem;
  border: 1px solid var(--line);
}
.formstatus[data-state="working"] { display: block; background: var(--bg-alt); color: var(--ink-soft); }
.formstatus[data-state="ok"] {
  display: block;
  background: color-mix(in srgb, #2E7D46 14%, var(--bg));
  border-color: #2E7D46;
  color: var(--ink);
}
.formstatus[data-state="error"] {
  display: block;
  background: color-mix(in srgb, #D9534F 12%, var(--bg));
  border-color: #D9534F;
  color: var(--ink);
}
.formstatus p:last-child { margin-bottom: 0; }

.btn[disabled] { opacity: .55; pointer-events: none; }

/* --------------------------------------------------------------------------
   7. Prose — long-form legal / policy copy
   -------------------------------------------------------------------------- */
.prose { max-width: var(--wrap-narrow); }
.prose h2 {
  font-size: 1.25rem;
  margin-top: 2.2em;
  padding-top: .6em;
  border-top: 1px solid var(--line);
}
.prose h2:first-of-type { margin-top: 1.2em; }
.prose h3 { margin-top: 1.6em; font-size: 1.02rem; }
.prose p, .prose li { color: var(--ink-soft); }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1.1em; }
.prose li { margin-bottom: .5em; }
.prose .lead {
  font-size: 1.1rem;
  color: var(--ink);
}

/* --------------------------------------------------------------------------
   8. Footer
   -------------------------------------------------------------------------- */
.footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--line);
  padding: 52px 0 40px;
  margin-top: 0;
}
.footer__grid {
  display: grid;
  gap: 32px;
  grid-template-columns: 1.4fr 1fr 1fr;
  margin-bottom: 36px;
}
@media (max-width: 720px) {
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .footer__brand { grid-column: 1 / -1; }
}
/* Footer lockup: the mark PNG plus LIVE TEXT, not the wordmark PNG.
   The wordmark image has "Labs" baked in as black pixels, which disappears
   against the dark-mode footer. Text picks up --ink and stays readable in
   both schemes; the mark itself is pure gradient on transparency, so it's safe. */
.footer__lockup {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.footer__lockup:hover { text-decoration: none; }
.footer__lockup img { width: 34px; height: 34px; object-fit: contain; }
.footer__wordmark {
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.footer__brand p {
  color: var(--muted);
  font-size: .9rem;
  max-width: 300px;
  margin: 0;
}
.footer h4 {
  font-size: .74rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 14px;
  font-weight: 800;
}
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer li { margin-bottom: 9px; }
.footer li a { color: var(--ink-soft); font-size: .92rem; }
.footer li a:hover { color: var(--accent); }

.footer__base {
  border-top: 1px solid var(--line);
  padding-top: 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: .85rem;
}

/* --------------------------------------------------------------------------
   8b. Screenshot rail + feature list (product pages)
   -------------------------------------------------------------------------- */

/* Horizontal, snap-scrolling rail of phone screenshots. Eight tall 9:16 shots
   in a normal grid would bury the rest of the page, so they scroll sideways
   instead. --rail-pad matches .wrap's inline padding so the first and last
   card can sit flush against the viewport edge on small screens. */
.shots {
  --rail-pad: 22px;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 250px;
  gap: 22px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  margin-inline: calc(-1 * var(--rail-pad));
  padding: 4px var(--rail-pad) 22px;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}
.shot {
  margin: 0;
  scroll-snap-align: center;
}
.shot img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 9 / 16;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-md);
  /* Parchment placeholder while the image streams in, so the rail does not
     flash white against the section background. */
  background: var(--accent-soft);
}
.shot figcaption {
  margin-top: 14px;
  padding: 0 4px;
  font-size: .88rem;
  line-height: 1.45;
  color: var(--muted);
  text-align: center;
}
.shots__hint {
  margin: 0;
  font-size: .85rem;
  color: var(--muted);
}
@media (max-width: 520px) {
  .shots { grid-auto-columns: 215px; gap: 16px; }
}

/* Lead paragraph that follows a .section__head without repeating its size. */
.lede-alt {
  max-width: var(--wrap-narrow);
  color: var(--ink-soft);
  margin: 0;
}
.featlist__head { margin: 42px 0 20px; }
.featlist__after { margin-top: 42px; }
.closer {
  margin: 42px auto 0;
  max-width: 44ch;
  text-align: center;
  color: var(--muted);
}

/* Feature list — the "what it does" bullets, with a gavel instead of a disc. */
.featlist {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}
.featlist li {
  position: relative;
  padding-left: 32px;
  color: var(--ink-soft);
  line-height: 1.6;
}
.featlist li::before {
  content: "⚖";
  position: absolute;
  left: 0;
  top: -1px;
  color: var(--accent);
  font-size: 1.05rem;
  line-height: 1.6;
}

/* --------------------------------------------------------------------------
   8c. Admin dashboard (/admin)
   --------------------------------------------------------------------------
   Only used by the signed-in admin view. Nothing here is reachable from a
   public page, but it lives in the shared stylesheet like everything else so
   the site keeps a single source of truth for design tokens.
   -------------------------------------------------------------------------- */

/* Sign-in gate — the card shown before an admin session exists. */
.gate {
  max-width: 430px;
  margin: 0 auto;
  text-align: center;
}
.gate p { color: var(--muted); }

/* Google's button, hand-rolled: the official gsi client would be a third
   third-party script for one button, and it cannot be themed for dark mode. */
.gbtn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font: inherit;
  font-weight: 700;
  font-size: .95rem;
  cursor: pointer;
  padding: 12px 22px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--field-border);
  background: var(--surface);
  color: var(--ink);
  transition: border-color .15s ease, box-shadow .15s ease, transform .12s ease;
}
.gbtn:hover { border-color: var(--accent); box-shadow: var(--shadow-md); transform: translateY(-1px); }
.gbtn:disabled { opacity: .55; pointer-events: none; }
.gbtn svg { width: 19px; height: 19px; flex: none; }

/* Signed-in identity strip above the dashboard. */
.adminbar {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  padding: 14px 18px;
  margin-bottom: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-alt);
}
.adminbar__who { display: flex; align-items: center; gap: 11px; min-width: 0; }
.adminbar__avatar {
  width: 34px; height: 34px; flex: none;
  border-radius: 50%;
  border: 1px solid var(--line);
  object-fit: cover;
  background: var(--surface);
}
.adminbar__name { font-weight: 700; font-size: .93rem; line-height: 1.3; }
.adminbar__mail {
  font-size: .82rem; color: var(--muted);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.adminbar__spacer { flex: 1 1 auto; }

/* Tab strip switching between the two dashboards. */
.tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--line);
  margin-bottom: 26px;
}
.tab {
  font: inherit;
  font-weight: 700;
  font-size: .93rem;
  cursor: pointer;
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  padding: 11px 16px;
  margin-bottom: -1px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
}
.tab:hover { color: var(--ink); }
.tab[aria-selected="true"] { color: var(--accent); border-bottom-color: var(--accent); }
.tab .count {
  font-size: .76rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--bg-alt);
  border: 1px solid var(--line);
  color: var(--muted);
}
.tab[aria-selected="true"] .count {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
}

/* Toolbar above a list: filter box + result count. */
.toolbar {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.toolbar input[type="search"] {
  flex: 1 1 240px;
  min-width: 0;
  font: inherit;
  font-size: .93rem;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--field-border);
  border-radius: var(--radius-sm);
  padding: 10px 13px;
}
.toolbar input[type="search"]:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent);
}
.toolbar__count { font-size: .85rem; color: var(--muted); }

/* One record. <details> so expanding needs no JavaScript. */
.rec {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  margin-bottom: 12px;
  overflow: hidden;
}
.rec[open] { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.rec > summary {
  cursor: pointer;
  padding: 16px 20px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 16px;
  align-items: baseline;
  list-style: none;
}
.rec > summary::-webkit-details-marker { display: none; }
.rec > summary:hover { background: var(--bg-alt); }
.rec__title {
  font-weight: 700;
  font-size: .97rem;
  color: var(--ink);
  overflow-wrap: anywhere;
}
.rec__when { font-size: .8rem; color: var(--muted); white-space: nowrap; }
.rec__sub {
  grid-column: 1 / -1;
  font-size: .85rem;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.rec__body {
  padding: 4px 20px 20px;
  border-top: 1px solid var(--line);
}
.rec__body h4 {
  font-size: .74rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 18px 0 7px;
}
/* Submitted free text. pre-wrap keeps the sender's line breaks; the record is
   evidence, so it is never re-flowed or trimmed for display. */
.rec__text {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  margin: 0;
  color: var(--ink-soft);
  font-size: .95rem;
  line-height: 1.62;
}
.rec__chips { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 4px; }
.chip {
  font-size: .76rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg-alt);
  color: var(--muted);
  white-space: nowrap;
}
.chip--src {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
  background: var(--accent-soft);
  color: var(--accent-strong);
}
.chip--new {
  border-color: #D9822B;
  background: color-mix(in srgb, #D9822B 14%, var(--bg));
  color: var(--ink);
}
.rec__actions { margin-top: 20px; display: flex; gap: 10px; flex-wrap: wrap; }

/* Source filter — segmented control above the support list. */
.srcfilter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: -6px 0 20px;
}
.srcbtn {
  font: inherit;
  font-weight: 600;
  font-size: .85rem;
  cursor: pointer;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  transition: border-color .15s ease, color .15s ease, background .15s ease;
}
.srcbtn:hover { color: var(--ink); border-color: var(--field-border); }
.srcbtn[aria-pressed="true"] {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
}

/* Empty / loading / error placeholder inside a panel. */
.placeholder {
  text-align: center;
  padding: 54px 20px;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  font-size: .93rem;
}

@media (max-width: 560px) {
  .rec > summary { grid-template-columns: 1fr; }
  .rec__when { grid-row: 1; }
}

/* --------------------------------------------------------------------------
   8d. Author bio — the photo + paragraph in /about
   -------------------------------------------------------------------------- */
.bio {
  display: flex;
  align-items: center;
  gap: 22px;
  margin: 0 0 1.1em;
}
.bio__photo {
  width: 128px;
  height: 128px;
  flex: none;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}
.bio p { margin: 0; }

@media (max-width: 520px) {
  .bio { flex-direction: column; gap: 16px; }
}

/* --------------------------------------------------------------------------
   9. Utilities
   -------------------------------------------------------------------------- */
.text-center { text-align: center; }
.muted { color: var(--muted); }
.stack-sm > * + * { margin-top: 10px; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }

/* Darker orange stop than --brand-gradient so the headline still clears the
   3:1 large-text threshold on a white background. */
.gradient-text {
  background: linear-gradient(135deg, var(--brand-red), #E0670A);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    transition-duration: .001ms !important;
  }
}
