/* Layout: editorial split heroes, generous serif reading column, mono "orders" labels as the military detail.
   Brand palette: Pure Mist #F5F5F5 · Deep Onyx #1E1E1E · Serene Blue #95B2C4 · Urban Gray #A0A0A0.
   Serene Blue and Urban Gray are too light for small text on Pure Mist, so text uses the deeper
   "-text" shades (#3D6680 blue, #5E5E5E gray) and the pure brand colors carry fills, lines and accents. */
:root {
  --mist: #F5F5F5;
  --onyx: #1E1E1E;
  --serene: #95B2C4;
  --urban: #A0A0A0;

  --paper: #F5F5F5;          /* Pure Mist */
  --surface: #E4ECF1;        /* Serene Blue tint */
  --ink: #1E1E1E;            /* Deep Onyx */
  --muted: #5E5E5E;          /* Urban Gray, text-safe */
  --line: #D2D2D2;           /* Urban Gray, light */
  --pine: #3D6680;           /* Serene Blue, text-safe (links, highlights) */
  --espresso: #1E1E1E;       /* link hover */
  --brass: #3D6680;          /* eyebrows, step labels, focus ring */
  --btn: #1E1E1E;
  --btn-ink: #F5F5F5;
  --band: #1E1E1E;           /* Deep Onyx bands + footer */
  --band-ink: #F5F5F5;
  --band-muted: #A0A0A0;     /* Urban Gray on Onyx */
  --band-accent: #95B2C4;    /* Serene Blue on Onyx */
  --cta-bg: #95B2C4;         /* Serene Blue call-to-action band */
  --cta-ink: #1E1E1E;
  --fill-me: #FFE58A;

  --display: "Bricolage Grotesque", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --body: "Source Serif 4", Georgia, "Times New Roman", serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.3rem;
  --step-2: 1.65rem;
  --step-3: clamp(1.9rem, 1.4rem + 2vw, 2.6rem);
  --step-4: clamp(2.4rem, 1.6rem + 3.6vw, 4.1rem);
  --radius: 6px;
  --wrap: 1180px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #141414; --surface: #1E1E1E; --ink: #F5F5F5; --muted: #A0A0A0; --line: #333333;
    --pine: #95B2C4; --espresso: #F5F5F5; --brass: #95B2C4; --btn: #95B2C4; --btn-ink: #1E1E1E;
    --band: #0B0B0B; --band-ink: #F5F5F5; --band-muted: #A0A0A0; --band-accent: #95B2C4;
    --cta-bg: #95B2C4; --cta-ink: #1E1E1E; --fill-me: #6B5A10;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #141414; --surface: #1E1E1E; --ink: #F5F5F5; --muted: #A0A0A0; --line: #333333;
  --pine: #95B2C4; --espresso: #F5F5F5; --brass: #95B2C4; --btn: #95B2C4; --btn-ink: #1E1E1E;
  --band: #0B0B0B; --band-ink: #F5F5F5; --band-muted: #A0A0A0; --band-accent: #95B2C4;
  --cta-bg: #95B2C4; --cta-ink: #1E1E1E; --fill-me: #6B5A10;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; animation: none !important; } }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--body); font-size: var(--step-0); line-height: 1.65; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--pine); text-underline-offset: 3px; }
a:hover { color: var(--espresso); }
:focus-visible { outline: 3px solid var(--brass); outline-offset: 3px; }
h1, h2, h3, h4 { font-family: var(--display); line-height: 1.08; letter-spacing: -0.02em; text-wrap: balance; margin: 0; font-weight: 700; }
h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-1); letter-spacing: -0.01em; }
p { margin: 0; }
.fill-me { background: var(--fill-me); padding: 0 .25em; border-radius: 3px; }
.skip { position: absolute; left: -999px; top: 0; }
.skip:focus { left: 16px; top: 16px; background: var(--paper); padding: 8px 12px; z-index: 50; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px)); }
.section { padding-block: clamp(56px, 8vw, 104px); }
.section.tight { padding-block: clamp(40px, 6vw, 72px); }
.surface { background: var(--surface); }
.band { background: var(--band); color: var(--band-ink); }
.band a:not(.btn) { color: var(--band-ink); }
.band .eyebrow { color: var(--band-accent); }
.band .lede, .band p { color: var(--band-muted); }
.band h2, .band h3 { color: var(--band-ink); }

.eyebrow { font-family: var(--mono); font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--brass); font-weight: 500; }
.lede { font-size: var(--step-1); color: var(--muted); line-height: 1.5; max-width: 38ch; }
.stack { display: flex; flex-direction: column; gap: 18px; }
.stack-lg { display: flex; flex-direction: column; gap: 28px; }
.measure { max-width: 66ch; }

.btn { display: inline-flex; align-items: center; gap: .5em; font-family: var(--display); font-weight: 600; font-size: 1rem; text-decoration: none; padding: .85em 1.3em; border-radius: var(--radius); background: var(--btn); color: var(--btn-ink); border: 2px solid var(--btn); transition: transform .15s ease, background .15s ease; }
.btn:hover { color: var(--btn-ink); transform: translateY(-1px); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn.ghost:hover { border-color: var(--ink); color: var(--ink); }
.band .btn { background: var(--band-ink); color: var(--band); border-color: var(--band-ink); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.textlink { font-family: var(--display); font-weight: 600; text-decoration: none; border-bottom: 2px solid var(--brass); color: var(--ink); padding-bottom: 2px; }

/* Header */
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--paper); }
.site-header { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: color-mix(in srgb, var(--paper) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; }
.brand { text-decoration: none; color: var(--ink); display: flex; flex-direction: column; line-height: 1.1; }
.brand strong { font-family: var(--display); font-size: 1.3rem; letter-spacing: -0.02em; }
.brand span { font-family: var(--mono); font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a { font-family: var(--display); font-weight: 500; font-size: .95rem; color: var(--ink); text-decoration: none; padding: 8px 10px; border-radius: var(--radius); }
.nav a[aria-current="page"] { color: var(--pine); box-shadow: inset 0 -2px 0 var(--brass); border-radius: 0; }
.nav a:hover { color: var(--pine); }
.nav .btn { padding: .6em 1em; margin-left: 8px; color: var(--btn-ink); }
.menu-toggle { display: none; }
@media (max-width: 960px) {
  .menu-toggle { display: inline-flex; font-family: var(--display); font-weight: 600; background: none; border: 1px solid var(--line); color: var(--ink); border-radius: var(--radius); padding: 8px 14px; font-size: .95rem; cursor: pointer; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--paper); border-bottom: 1px solid var(--line); flex-direction: column; align-items: stretch; padding: 8px max(20px, env(safe-area-inset-right, 0px)) 20px max(20px, env(safe-area-inset-left, 0px)); }
  .nav.open { display: flex; }
  .nav a { padding: 12px 4px; border-bottom: 1px solid var(--line); border-radius: 0; }
  .nav a[aria-current="page"] { box-shadow: none; }
  .nav .btn { margin: 14px 0 0; justify-content: center; border-bottom: 0; }
}

/* Hero */
.hero { padding-block: clamp(36px, 6vw, 80px); }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(28px, 5vw, 72px); align-items: center; }
.hero-grid > * { min-width: 0; }
.hero h1 em { font-style: normal; color: var(--pine); }
.photo { position: relative; }
.photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--radius); }
.photo.wide img { aspect-ratio: 5 / 4; }
.photo figcaption { position: absolute; left: 14px; bottom: 14px; background: var(--paper); color: var(--ink); font-family: var(--mono); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; padding: 6px 10px; border-radius: 3px; }
.page-hero { padding-block: clamp(40px, 6vw, 84px) clamp(32px, 5vw, 64px); border-bottom: 1px solid var(--line); }
.page-hero .hero-grid { align-items: end; }
.page-hero .photo img { aspect-ratio: 4 / 3; }
@media (max-width: 820px) { .hero-grid { grid-template-columns: 1fr; } .photo img { aspect-ratio: 4 / 4.2; } }

/* Who I serve strip */
.serve { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.serve div { padding: 22px 20px; border-left: 1px solid var(--line); }
.serve div:first-child { border-left: 0; padding-left: 0; }
.serve b { font-family: var(--display); font-size: 1.1rem; display: block; }
.serve span { color: var(--muted); font-size: .95rem; }
@media (max-width: 820px) { .serve { grid-template-columns: 1fr 1fr; } .serve div { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); } .serve div:nth-child(-n+2) { border-top: 0; } }

/* Services */
.split-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; flex-wrap: wrap; margin-bottom: 36px; }
.services { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.service { display: flex; flex-direction: column; gap: 12px; padding-top: 18px; border-top: 3px solid var(--ink); text-decoration: none; color: var(--ink); }
.service:hover { border-top-color: var(--brass); color: var(--ink); }
.service .eyebrow { color: var(--muted); }
.service p { color: var(--muted); font-size: .98rem; }
.service .go { font-family: var(--display); font-weight: 600; margin-top: auto; color: var(--pine); }
@media (max-width: 960px) { .services { grid-template-columns: 1fr 1fr; gap: 32px 20px; } }
@media (max-width: 520px) { .services { grid-template-columns: 1fr; } }

/* Two column text */
.two { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(28px, 5vw, 72px); align-items: start; }
.two > * { min-width: 0; }
@media (max-width: 820px) { .two { grid-template-columns: 1fr; } }

/* Rebate */
.rebate { display: grid; grid-template-columns: 1.2fr .8fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.rebate > * { min-width: 0; }
.rebate-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0; border-top: 1px solid color-mix(in srgb, var(--band-ink) 25%, transparent); }
.rebate-list li { font-family: var(--display); font-size: 1.15rem; padding: 18px 0; border-bottom: 1px solid color-mix(in srgb, var(--band-ink) 25%, transparent); }
.fine { font-size: .82rem; color: var(--muted); line-height: 1.5; }
.band .fine { color: var(--band-muted); }
@media (max-width: 820px) { .rebate { grid-template-columns: 1fr; } }

/* Steps / timeline */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.steps li { display: grid; grid-template-columns: 120px 1fr; gap: 24px; padding: 22px 0; border-top: 1px solid var(--line); }
.steps li:last-child { border-bottom: 1px solid var(--line); }
.steps .t { font-family: var(--mono); font-size: .82rem; letter-spacing: .06em; color: var(--brass); font-weight: 500; padding-top: 4px; }
.steps h3 { margin-bottom: 6px; }
.steps p { color: var(--muted); }
@media (max-width: 560px) { .steps li { grid-template-columns: 1fr; gap: 6px; } }

/* Cards: areas, faq */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
@media (max-width: 900px) { .grid-3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; display: flex; flex-direction: column; gap: 10px; }
.surface .card { background: var(--paper); }
.card p { color: var(--muted); font-size: .98rem; }
.card .eyebrow { color: var(--muted); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font-family: var(--mono); font-size: .72rem; letter-spacing: .04em; padding: 3px 8px; border: 1px solid var(--line); border-radius: 99px; color: var(--muted); }

.faq details { border-top: 1px solid var(--line); padding: 18px 0; }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { font-family: var(--display); font-weight: 600; font-size: 1.12rem; cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--mono); color: var(--brass); }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin-top: 10px; color: var(--muted); max-width: 70ch; }

/* Coffee strip */
.coffee { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.coffee img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: var(--radius); }
@media (max-width: 760px) { .coffee { grid-template-columns: repeat(3, 1fr); } .coffee img:nth-child(n+4) { display: none; } }

/* Blog */
.posts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.post-card { display: flex; flex-direction: column; gap: 12px; text-decoration: none; color: var(--ink); }
.post-card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); }
.post-card h3 { font-size: 1.25rem; }
.post-card:hover h3 { color: var(--pine); }
.post-card p { color: var(--muted); font-size: .97rem; }
.meta { font-family: var(--mono); font-size: .74rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
@media (max-width: 900px) { .posts { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .posts { grid-template-columns: 1fr; } }

.article { max-width: 70ch; margin: 0 auto; }
.article h1 { font-size: var(--step-3); }
.article h2 { font-size: var(--step-2); margin-top: 1.6em; margin-bottom: .5em; }
.article h3 { margin-top: 1.4em; margin-bottom: .4em; }
.article p, .article ul, .article ol { margin: 0 0 1.05em; }
.article ul, .article ol { padding-left: 1.2em; }
.article li { margin-bottom: .4em; }
.article .cover { margin: 28px 0 32px; }
.article .cover img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius); }
.callout { border-left: 3px solid var(--brass); background: var(--surface); padding: 16px 20px; border-radius: 0 var(--radius) var(--radius) 0; margin: 1.5em 0; }
.author { display: flex; gap: 16px; align-items: center; border-top: 1px solid var(--line); padding-top: 24px; margin-top: 40px; }
.author img { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; object-position: top; }

/* Calculator */
.calc { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: start; }
.calc > * { min-width: 0; }
.calc form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.calc label { display: flex; flex-direction: column; gap: 6px; font-family: var(--display); font-size: .9rem; font-weight: 500; }
.calc input { font: inherit; font-family: var(--mono); font-size: 1rem; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); color: var(--ink); width: 100%; }
.calc .out { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; display: flex; flex-direction: column; gap: 10px; }
.calc .row { display: flex; justify-content: space-between; gap: 12px; font-variant-numeric: tabular-nums; border-bottom: 1px dashed var(--line); padding-bottom: 8px; }
.calc .row b { font-family: var(--mono); font-weight: 500; }
.calc .big { font-family: var(--display); font-size: 2rem; font-weight: 700; font-variant-numeric: tabular-nums; }
@media (max-width: 760px) { .calc { grid-template-columns: 1fr; } }
@media (max-width: 420px) { .calc form { grid-template-columns: 1fr; } }

/* Contact */
.paths { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 860px) { .paths { grid-template-columns: 1fr; } }
.contact-line { font-family: var(--mono); font-size: .95rem; }

/* Footer */
.site-footer { background: var(--band); color: var(--band-muted); font-size: .92rem; padding-block: 56px 32px; }
.site-footer a { color: var(--band-ink); }
.foot-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 32px; }
.foot-grid > * { min-width: 0; }
.foot-grid h4 { font-family: var(--mono); font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; color: var(--band-ink); font-weight: 500; margin-bottom: 12px; }
.foot-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.foot-brand strong { font-family: var(--display); font-size: 1.4rem; color: var(--band-ink); display: block; }
.brokerage { display: flex; align-items: center; gap: 12px; margin-top: 16px; }
.brokerage img { height: 72px; width: auto; }
.legal { border-top: 1px solid color-mix(in srgb, var(--band-ink) 20%, transparent); margin-top: 40px; padding-top: 20px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-size: .8rem; }
.eho { display: inline-flex; align-items: center; gap: 8px; }
.eho svg { width: 22px; height: 22px; }
@media (max-width: 760px) { .foot-grid { grid-template-columns: 1fr; } }

/* Base guides */
.base-card { text-decoration: none; color: var(--ink); }
.base-card:hover { border-color: var(--ink); color: var(--ink); }
.base-card .go { font-family: var(--display); font-weight: 600; color: var(--pine); margin-top: auto; }
a.tag { text-decoration: none; }
a.tag:hover { border-color: var(--ink); color: var(--ink); }
.steps li p { color: var(--ink); }
.two .steps li { grid-template-columns: 90px 1fr; }

/* Serene Blue call-to-action band */
.section.cta { background: var(--cta-bg); color: var(--cta-ink); }
.section.cta h2, .section.cta p { color: var(--cta-ink); }
.section.cta .btn { background: var(--onyx); border-color: var(--onyx); color: var(--mist); }
.section.cta a:not(.btn) { color: var(--cta-ink); }
.textlink { border-bottom-color: var(--serene); }
.callout { border-left-color: var(--serene); }
.service:hover { border-top-color: var(--serene); }
.rebate-list li { border-color: color-mix(in srgb, var(--urban) 45%, transparent); }

/* Portrait headshot in a page hero: keep the head in frame */
.page-hero .photo.portrait img { aspect-ratio: 4 / 5; object-position: 50% 12%; max-height: 640px; }
