/* The Door Count — shared stylesheet.
   Plain CSS, no build step, same pattern as the injector site.

   Palette note: the money-out / money-kept pair is oxide and teal, NOT red and
   green. Red/green scored ΔE 2.4 under protanopia — indistinguishable to
   red-green colourblind readers, which is a lot of men over 50, which is a lot
   of landlords. Oxide/teal scores 15.2. Do not "fix" this back to green. */

:root {
  --ground:      #F1F2EF;
  --surface:     #FCFCFB;
  --surface-2:   #F6F7F4;
  --line:        #DEDFD9;
  --line-strong: #C4C6BE;

  --ink:   #1B2027;
  --ink-2: #545C68;
  --ink-3: #838B96;

  --accent:      #7E3B2C;
  --accent-soft: #F0E2DD;

  --out:  #C0562F;
  --keep: #0B7196;
  --warn: #8C6D1F;
  --out-soft:  #F6E3DA;
  --keep-soft: #DDECF2;
  --warn-soft: #F2EBD8;

  --shadow: 0 1px 2px rgba(27,32,39,.05), 0 8px 24px -12px rgba(27,32,39,.14);

  --measure: 66ch;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ground:#14171B; --surface:#1B1F24; --surface-2:#21262C;
    --line:#2E343B; --line-strong:#414951;
    --ink:#EDEEEA; --ink-2:#A8B0B9; --ink-3:#7B848E;
    --accent:#D98D79; --accent-soft:#3A2620;
    --out:#D2694A; --keep:#2E9BC0; --warn:#B98C2A;
    --out-soft:#38231B; --keep-soft:#12303C; --warn-soft:#322814;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px -12px rgba(0,0,0,.6);
  }
}
:root[data-theme="dark"] {
  --ground:#14171B; --surface:#1B1F24; --surface-2:#21262C;
  --line:#2E343B; --line-strong:#414951;
  --ink:#EDEEEA; --ink-2:#A8B0B9; --ink-3:#7B848E;
  --accent:#D98D79; --accent-soft:#3A2620;
  --out:#D2694A; --keep:#2E9BC0; --warn:#B98C2A;
  --out-soft:#38231B; --keep-soft:#12303C; --warn-soft:#322814;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px -12px rgba(0,0,0,.6);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: "Public Sans", ui-sans-serif, system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.wrap--narrow { max-width: 760px; }

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 2px; }

h1, h2, h3 {
  font-family: Newsreader, Georgia, serif;
  font-weight: 500; letter-spacing: -.015em; text-wrap: balance; margin: 0;
}
h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); line-height: 1.04; }
h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); line-height: 1.15; font-weight: 600; }
h3 { font-size: 1.1rem; font-weight: 600; }

.eyebrow {
  font-size: .72rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--ink-3); font-weight: 600; margin: 0;
}
.lede { font-size: 1.08rem; color: var(--ink-2); max-width: var(--measure); }
.muted { color: var(--ink-3); }
.mono { font-family: "IBM Plex Mono", ui-monospace, monospace; font-variant-numeric: tabular-nums; }

/* ---------- header ---------- */
.site-head {
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  position: sticky; top: 0; z-index: 20;
}
.site-head .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; height: 62px;
}
.brand {
  font-family: Newsreader, Georgia, serif; font-size: 1.16rem; font-weight: 600;
  color: var(--ink); text-decoration: none; letter-spacing: -.01em;
  display: flex; align-items: baseline; gap: 9px;
}
.brand span { font-family: "IBM Plex Mono", monospace; font-size: .72rem;
  color: var(--ink-3); letter-spacing: .1em; text-transform: uppercase; font-weight: 500; }
.site-nav { display: flex; gap: 22px; font-size: .9rem; }
.site-nav a { color: var(--ink-2); text-decoration: none; }
.site-nav a:hover { color: var(--accent); }
@media (max-width: 620px) { .site-nav { gap: 14px; font-size: .84rem; } .brand span { display: none; } }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 20px; border-radius: 3px; font-weight: 600; font-size: .95rem;
  text-decoration: none; border: 1px solid transparent; cursor: pointer;
  font-family: inherit;
}
.btn--primary { background: var(--accent); color: #FCFCFB; }
:root[data-theme="dark"] .btn--primary,
:root:not([data-theme="light"]) .btn--primary { color: #14171B; }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) .btn--primary { color: #FCFCFB; } }
.btn--primary:hover { filter: brightness(1.08); }
.btn--ghost { border-color: var(--line-strong); color: var(--ink); }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- generic blocks ---------- */
.section { padding: 68px 0; }
.section--tight { padding: 44px 0; }
.section--alt { background: var(--surface); border-block: 1px solid var(--line); }

.panel {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 4px; padding: 24px; box-shadow: var(--shadow);
}

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 860px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

.note {
  font-size: .84rem; color: var(--ink-3);
  border-left: 2px solid var(--line-strong); padding-left: 14px;
}
.note b { color: var(--ink-2); }

/* ---------- footer ---------- */
.site-foot {
  border-top: 1px solid var(--line); background: var(--surface);
  padding: 34px 0; font-size: .84rem; color: var(--ink-3);
}
.site-foot .wrap { display: flex; flex-wrap: wrap; gap: 16px 34px; justify-content: space-between; }
.site-foot a { color: var(--ink-2); }

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