/* Greenlit site: layout concept = calm, light, spacious; a traffic-light signal is the only recurring graphic. */
:root {
  --bg: #F4F7F3;
  --surface: #FFFFFF;
  --ink: #0F2218;
  --ink-2: #485B50;
  --line: #D6E1D8;
  --tint: #E6F2EA;
  --brand: #0A7447;
  --brand-ink: #FFFFFF;
  --go: #22B866;
  --amber: #E5A000;
  --red: #D64040;
  --housing: #13261C;
  --sans: "Avenir Next", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0C1611; --surface: #13231A; --ink: #E7F1EA; --ink-2: #A2B8AA; --line: #243A2D;
    --tint: #163024; --brand: #4BE08F; --brand-ink: #06150D; --go: #2FD37C; --amber: #F2B632;
    --red: #F06A6A; --housing: #050C08; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0C1611; --surface: #13231A; --ink: #E7F1EA; --ink-2: #A2B8AA; --line: #243A2D;
  --tint: #163024; --brand: #4BE08F; --brand-ink: #06150D; --go: #2FD37C; --amber: #F2B632;
  --red: #F06A6A; --housing: #050C08; color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
img, svg { max-width: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 17px/1.6 var(--sans); -webkit-text-size-adjust: 100%;
}
a { color: var(--brand); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; text-wrap: balance; margin: 0; }
p { margin: 0; }

.wrap {
  max-width: 1080px; margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 12px; border: 2px solid var(--brand); z-index: 20; }
.skip:focus { left: 12px; }

/* preview banner (removed before launch) */
.preview {
  background: var(--tint); border-bottom: 1px solid var(--line);
  font: 500 12.5px/1.5 var(--mono); color: var(--ink-2); padding-block: 8px;
}

/* header */
.site-header { padding-block: 20px; }
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 28px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 800; font-size: 1.45rem; letter-spacing: -0.03em; }
.nav { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 22px; }
.nav a { color: var(--ink); text-decoration: none; font-weight: 600; font-size: 0.97rem; padding-block: 6px; border-bottom: 2px solid transparent; }
.nav a:hover { border-bottom-color: var(--line); }
.nav a[aria-current="page"] { border-bottom-color: var(--brand); }
.nav a.cta { background: var(--brand); color: var(--brand-ink); padding: 8px 16px; border-radius: 999px; border-bottom: 0; }

/* buttons */
.btn { display: inline-block; font: 700 1rem/1 var(--sans); padding: 15px 22px; border-radius: 999px; text-decoration: none; border: 2px solid var(--brand); cursor: pointer; }
.btn.primary { background: var(--brand); color: var(--brand-ink); }
.btn.ghost { background: transparent; color: var(--brand); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* hero */
.hero { padding-block: clamp(36px, 7vw, 80px) clamp(24px, 4vw, 48px); }
.eyebrow { font: 600 12.5px/1.4 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2); margin-bottom: 16px; }
.hero h1 { font-size: clamp(2.6rem, 7vw, 4.6rem); font-weight: 800; max-width: 14ch; }
.hero .lede { font-size: clamp(1.1rem, 2vw, 1.3rem); color: var(--ink-2); max-width: 58ch; margin-block: 22px 28px; }
.facts { display: flex; flex-wrap: wrap; gap: 8px 10px; margin-top: 26px; padding: 0; list-style: none; }
.chip { font: 500 12.5px/1 var(--mono); border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 8px 12px; color: var(--ink-2); }

.figure { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: clamp(12px, 3vw, 28px); margin: clamp(28px, 5vw, 48px) 0 0; }
.fig-scroll { overflow-x: auto; }
.figure svg { display: block; width: 100%; min-width: 640px; height: auto; }
.figure figcaption { font-size: 0.93rem; color: var(--ink-2); margin-top: 12px; }
.fig-label { font: 500 12.5px var(--mono); fill: var(--ink-2); }
.fig-sub { font: 500 14px var(--sans); fill: var(--ink-2); }
.fig-col { font: 700 14px var(--sans); fill: var(--ink); }
.fig-phase { font: 700 15px var(--sans); fill: var(--ink); }
.fig-phase-on { font: 700 15px var(--sans); fill: #06150D; }

/* FAQ */
.faq { max-width: 760px; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); padding-block: 4px; }
.faq summary { cursor: pointer; font-weight: 700; padding-block: 14px; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font: 600 1.3rem/1 var(--mono); color: var(--brand); }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { color: var(--ink-2); padding-bottom: 16px; max-width: 64ch; }
.schedule .out { margin-top: 8px; font-size: 0.92rem; color: var(--ink); }
.fig-edge { stroke: var(--ink-2); }

/* sections */
.section { padding-block: clamp(36px, 6vw, 72px); }
.section.alt { background: var(--surface); border-block: 1px solid var(--line); }
.section h2 { font-size: clamp(1.7rem, 3.6vw, 2.4rem); font-weight: 800; margin-bottom: 14px; }
.section .intro { color: var(--ink-2); max-width: 62ch; margin-bottom: 30px; }
.grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); }
.grid.four { grid-template-columns: repeat(auto-fit, minmax(min(100%, 215px), 1fr)); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 22px; min-width: 0; }
.alt .card { background: var(--bg); }
.card h3 { font-size: 1.15rem; margin-bottom: 8px; }
.card p { color: var(--ink-2); font-size: 0.98rem; }
.prose { max-width: 66ch; }
.prose p + p { margin-top: 14px; }
.prose ul { padding-left: 1.2em; margin: 12px 0 0; }
.prose li + li { margin-top: 6px; }
.page-head { padding-block: clamp(32px, 6vw, 64px) 8px; }
.page-head h1 { font-size: clamp(2.1rem, 5vw, 3.2rem); font-weight: 800; max-width: 20ch; }
.page-head .lede { color: var(--ink-2); font-size: 1.15rem; max-width: 60ch; margin-top: 16px; }

/* schedule (a real sequence, so it is numbered by week) */
.schedule { list-style: none; padding: 0; margin: 0; display: grid; gap: 0; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--surface); }
.schedule li { display: grid; grid-template-columns: 120px 1fr; gap: 6px 20px; padding: 18px 22px; border-top: 1px solid var(--line); }
.schedule li:first-child { border-top: 0; }
.schedule .when { font: 600 13px/1.6 var(--mono); color: var(--brand); text-transform: uppercase; letter-spacing: 0.06em; }
.schedule h3 { font-size: 1.05rem; margin-bottom: 4px; }
.schedule p { color: var(--ink-2); font-size: 0.97rem; }
@media (max-width: 560px) { .schedule li { grid-template-columns: 1fr; } }

/* self-check */
.q-card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: clamp(18px, 4vw, 30px); max-width: 720px; }
.q-meta { font: 500 12.5px var(--mono); color: var(--ink-2); display: flex; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.bar { height: 6px; background: var(--line); border-radius: 99px; overflow: hidden; margin-bottom: 22px; }
.bar > span { display: block; height: 100%; background: var(--go); border-radius: 99px; }
.q-card fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.q-card legend { font-size: 1.25rem; font-weight: 700; letter-spacing: -0.01em; margin-bottom: 16px; padding: 0; }
.opt { display: flex; align-items: center; gap: 12px; border: 1.5px solid var(--line); border-radius: 12px; padding: 14px 16px; margin-top: 10px; cursor: pointer; background: var(--bg); }
.opt:has(input:checked) { border-color: var(--brand); background: var(--tint); }
.opt input { accent-color: var(--brand); width: 18px; height: 18px; }
.results { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); margin-top: 22px; }
.result { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 20px; }
.result .dot { display: inline-block; width: 14px; height: 14px; border-radius: 50%; margin-right: 8px; vertical-align: -1px; }
.result h3 { font-size: 1.1rem; margin-bottom: 6px; }
.result p { color: var(--ink-2); font-size: 0.96rem; }
.dot.g { background: var(--go); } .dot.a { background: var(--amber); } .dot.r { background: var(--red); }

/* forms */
.form { max-width: 640px; display: grid; gap: 18px; }
.form label { display: block; font-weight: 700; font-size: 0.96rem; margin-bottom: 6px; }
.form input, .form textarea { width: 100%; font: 400 1rem/1.4 var(--sans); color: var(--ink); background: var(--surface); border: 1.5px solid var(--line); border-radius: 10px; padding: 12px 14px; }
.form textarea { min-height: 150px; resize: vertical; }
.form .hint { font-size: 0.88rem; color: var(--ink-2); margin-top: 6px; }
.note { border: 1px dashed var(--ink-2); border-radius: 12px; padding: 14px 16px; font-size: 0.93rem; color: var(--ink-2); background: var(--surface); max-width: 66ch; }
.note strong { color: var(--ink); }
.status { font-weight: 600; color: var(--brand); }

/* footer */
.site-footer { border-top: 1px solid var(--line); padding-block: 34px; margin-top: clamp(24px, 5vw, 48px); font-size: 0.92rem; color: var(--ink-2); }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 14px 40px; justify-content: space-between; }
.site-footer a { color: var(--ink-2); }

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

/* chat assistant */
.chat-intro { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: clamp(18px, 4vw, 28px); max-width: 640px; }
.chat-intro h2 { font-size: 1.4rem; margin-bottom: 10px; }
.chat-intro ul { padding-left: 1.2em; margin: 12px 0 18px; color: var(--ink-2); }
.chat-intro .hint { font-size: .88rem; color: var(--ink-2); margin-bottom: 16px; }
.chat { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; max-width: 640px; overflow: hidden; }
.chat-log { height: min(420px, 60vh); overflow-y: auto; padding: 16px; display: grid; gap: 10px; align-content: start; }
.msg { max-width: 88%; padding: 10px 14px; border-radius: 14px; background: var(--tint); }
.msg.me { justify-self: end; background: var(--brand); color: var(--brand-ink); }
.msg .who { display: block; font: 600 11.5px var(--mono); opacity: .75; margin-bottom: 2px; }
.msg p { font-size: .98rem; white-space: pre-wrap; overflow-wrap: anywhere; }
.chat-actions { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 16px 12px; }
.chip-btn { font: 600 .92rem var(--sans); border: 1.5px solid var(--brand); color: var(--brand); background: transparent; border-radius: 999px; padding: 9px 14px; cursor: pointer; }
.chip-btn:hover { background: var(--tint); }
.chat-form { display: flex; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--line); }
.chat-form input { flex: 1; min-width: 0; font: 400 1rem var(--sans); color: var(--ink); background: var(--bg); border: 1.5px solid var(--line); border-radius: 10px; padding: 11px 12px; }
.chat-form .btn { padding: 11px 18px; }
.chat-summary { margin: 0; font: 500 .85rem/1.5 var(--mono); background: var(--bg); border: 1px dashed var(--ink-2); border-radius: 10px; padding: 12px; white-space: pre-wrap; overflow-wrap: anywhere; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.results.four { grid-template-columns: repeat(auto-fit, minmax(min(100%, 215px), 1fr)); }
