/* Plan Exit Now. Layout: left-aligned, one wide reading column; the hero pairs the thesis with a work-order "ticket" (the readiness score or value check), the one loud object on each page. */
:root {
  --paper: #f4f5f2;
  --panel: #ffffff;
  --ink: #1c272b;
  --steel: #56666b;
  --rule: #d3d9d5;
  --signal: #7dd3ae; /* go-green: fills only, always under ink text */
  --signal-ink: #1c272b;
  --link: #22577f;
  --good: #2f6b4f;
  --error: #9b2f22;
  --font: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --measure: 66ch;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #11181b; --panel: #172125; --ink: #e5eae7; --steel: #9aa9ad; --rule: #2a373b;
    --signal: #6cc9a1; --signal-ink: #11181b; --link: #8bbbe2; --good: #7cc4a0; --error: #f08a7a;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #11181b; --panel: #172125; --ink: #e5eae7; --steel: #9aa9ad; --rule: #2a373b;
  --signal: #6cc9a1; --signal-ink: #11181b; --link: #8bbbe2; --good: #7cc4a0; --error: #f08a7a;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
  font-variation-settings: "wdth" 100;
}
a { color: var(--link); text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--link); outline-offset: 2px; border-radius: 2px; }
img { max-width: 100%; }

.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}

/* Header */
.site-head { border-bottom: 1px solid var(--rule); background: var(--paper); position: sticky; top: env(safe-area-inset-top, 0px); z-index: 10; }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; flex-wrap: wrap; padding-block: 8px; }
.brand { display: flex; align-items: baseline; gap: 10px; color: var(--ink); text-decoration: none; }
.brand-mark { font-weight: 850; font-stretch: 125%; font-variation-settings: "wdth" 125; letter-spacing: -0.02em; font-size: 20px; }
.brand-sub { color: var(--steel); font-size: 13px; }
.nav { display: flex; gap: 4px 18px; flex-wrap: wrap; align-items: center; font-size: 15px; }
.nav a { color: var(--ink); text-decoration: none; padding: 4px 0; }
.nav a[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.35em; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: 700; font-size: 16px;
  padding: 12px 18px; border-radius: 4px; border: 2px solid var(--ink);
  background: var(--signal); color: var(--signal-ink); text-decoration: none; cursor: pointer;
}
.btn:hover { filter: brightness(0.96); text-decoration: none; }
.btn.quiet { background: transparent; color: var(--ink); }
.nav .btn { padding: 8px 14px; font-size: 15px; }

/* Type */
h1, h2, h3 { font-variation-settings: "wdth" 118; font-stretch: 118%; letter-spacing: -0.015em; line-height: 1.08; text-wrap: balance; margin: 0; }
h1 { font-size: clamp(2.2rem, 5.2vw, 3.9rem); font-weight: 850; }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 800; }
h3 { font-size: 1.2rem; font-weight: 750; line-height: 1.2; }
p { margin: 0; }
.lede { font-size: 1.2rem; color: var(--steel); max-width: 52ch; }
.prose { max-width: var(--measure); display: grid; gap: 1em; }
.prose h2 { margin-top: 0.8em; }
.prose h3 { margin-top: 0.6em; }
.prose ul, .prose ol { margin: 0; padding-left: 1.2em; display: grid; gap: 0.4em; }
.small { font-size: 14px; color: var(--steel); }
.num { font-variant-numeric: tabular-nums; }

/* Sections */
section { padding-block: clamp(48px, 7vw, 88px); }
section + section { border-top: 1px solid var(--rule); }
.stack { display: grid; gap: 20px; }
.split { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: clamp(28px, 5vw, 64px); align-items: start; }
@media (max-width: 860px) { .split { grid-template-columns: minmax(0, 1fr); } }

/* Hero */
.hero { padding-block: clamp(36px, 6vw, 72px); }
.hero .stack { gap: 24px; }
.hero-points { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.hero-points li { padding-left: 22px; position: relative; }
.hero-points li::before { content: ""; position: absolute; left: 0; top: 0.55em; width: 10px; height: 10px; background: var(--signal); border: 2px solid var(--ink); }
.cta-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }

/* The ticket: the loud object */
.ticket {
  background: var(--panel); border: 2px solid var(--ink); border-radius: 6px; position: relative;
  box-shadow: 8px 8px 0 var(--ink);
}
.ticket-head { background: var(--signal); color: var(--signal-ink); padding: 14px 18px; border-bottom: 2px dashed var(--ink); display: flex; justify-content: space-between; align-items: baseline; gap: 12px; border-radius: 4px 4px 0 0; }
.ticket-head h2 { font-size: 1.25rem; }
.ticket-no { font-size: 13px; font-variant-numeric: tabular-nums; }
.ticket-body { padding: 22px 18px 18px; display: grid; gap: 14px; }
.field { display: grid; gap: 6px; }
.field label { font-weight: 650; font-size: 15px; }
.field .hint { font-size: 13px; color: var(--steel); }
input, select, textarea {
  font: inherit; font-size: 16px; color: var(--ink); background: var(--paper);
  border: 2px solid var(--rule); border-radius: 4px; padding: 10px 12px; width: 100%;
}
input:focus, select:focus, textarea:focus { border-color: var(--link); outline: none; }
.money { position: relative; }
.money input { padding-left: 26px; }
.money::before { content: "$"; position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--steel); }
.result { border-top: 2px solid var(--ink); padding-top: 14px; display: grid; gap: 6px; }
.result-range { font-size: clamp(1.8rem, 4vw, 2.4rem); font-weight: 850; font-variation-settings: "wdth" 112; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.result-note { font-size: 14px; color: var(--steel); }
.result[data-empty] .result-range { color: var(--steel); font-weight: 600; font-size: 1.1rem; }

/* Lists of things */
.steps { list-style: none; counter-reset: step; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.steps li { counter-increment: step; display: grid; gap: 8px; align-content: start; border-top: 4px solid var(--ink); padding-top: 14px; }
.steps li::before { content: counter(step); font-weight: 850; font-size: 2rem; font-variation-settings: "wdth" 125; line-height: 1; }
@media (max-width: 760px) { .steps { grid-template-columns: minmax(0, 1fr); } }

.sectors { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
@media (max-width: 760px) { .sectors { grid-template-columns: minmax(0, 1fr); } }
.sector { display: grid; gap: 10px; align-content: start; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0; }
.tags li { border: 1px solid var(--rule); border-radius: 3px; padding: 3px 9px; font-size: 14px; background: var(--panel); }

.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border: 2px solid var(--ink); border-radius: 4px; background: var(--panel); }
.facts > div { padding: 16px 18px; display: grid; gap: 4px; }
.facts > div + div { border-left: 1px solid var(--rule); }
.facts dt { font-size: 14px; color: var(--steel); order: 2; }
.facts dd { margin: 0; font-weight: 800; font-size: 1.6rem; font-variation-settings: "wdth" 115; font-variant-numeric: tabular-nums; order: 1; }
@media (max-width: 700px) { .facts { grid-template-columns: minmax(0, 1fr); } .facts > div + div { border-left: 0; border-top: 1px solid var(--rule); } }

/* Tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--rule); border-radius: 4px; background: var(--panel); }
table { border-collapse: collapse; width: 100%; font-size: 15px; font-variant-numeric: tabular-nums; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--rule); vertical-align: top; }
th { font-weight: 700; background: var(--paper); }
tr:last-child td { border-bottom: 0; }

/* Forms */
.form { display: grid; gap: 14px; max-width: 560px; }
.form .row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 560px) { .form .row { grid-template-columns: minmax(0, 1fr); } }
.form-status { font-size: 15px; min-height: 1.4em; }
.form-status[data-state="ok"] { color: var(--good); }
.form-status[data-state="error"] { color: var(--error); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--steel); }
.check input { width: auto; margin-top: 3px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* FAQ */
details { border-top: 1px solid var(--rule); padding-block: 14px; max-width: var(--measure); }
details:last-of-type { border-bottom: 1px solid var(--rule); }
summary { cursor: pointer; font-weight: 700; font-size: 1.05rem; }
details p { margin-top: 10px; color: var(--ink); }

/* Guides list */
.guide-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 22px; max-width: var(--measure); }
.guide-list a { font-weight: 750; font-size: 1.2rem; font-variation-settings: "wdth" 110; }

/* Footer */
.site-foot { border-top: 2px solid var(--ink); padding-block: 36px; font-size: 14px; color: var(--steel); }
.site-foot .cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.site-foot a { color: var(--steel); }
.site-foot ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
@media (max-width: 760px) { .site-foot .cols { grid-template-columns: minmax(0, 1fr); } }

@media (prefers-reduced-motion: no-preference) {
  .ticket { animation: settle 520ms cubic-bezier(.2,.8,.2,1) both; }
  @keyframes settle { from { transform: translate(6px, 6px); box-shadow: 2px 2px 0 var(--ink); } to { transform: none; box-shadow: 8px 8px 0 var(--ink); } }
}

[hidden] { display: none !important; }

/* Exit Readiness Score */
.mini-areas { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.mini-areas li { border: 1px solid var(--rule); border-radius: 3px; padding: 2px 8px; font-size: 13px; background: var(--paper); }
.quiz { display: grid; gap: 22px; max-width: 760px; }
.q { border: 0; border-top: 2px solid var(--ink); padding: 14px 0 0; margin: 0; min-width: 0; }
.q legend { font-weight: 750; font-size: 1.1rem; font-variation-settings: "wdth" 108; padding: 0; margin-bottom: 10px; line-height: 1.3; }
.qn { font-variant-numeric: tabular-nums; color: var(--steel); margin-right: 6px; }
.q[data-missing] legend::after { content: "  Pick one"; color: var(--error); font-size: 14px; font-weight: 600; }
.opts { display: grid; gap: 6px; }
.opt { display: flex; gap: 10px; align-items: flex-start; padding: 9px 12px; border: 2px solid var(--rule); border-radius: 4px; background: var(--panel); cursor: pointer; font-size: 16px; }
.opt input { width: auto; margin-top: 4px; accent-color: var(--ink); }
.opt:has(input:checked) { border-color: var(--ink); background: color-mix(in srgb, var(--signal) 30%, var(--panel)); }
.score { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(28px, 5vw, 64px); align-items: start; margin-top: 40px; scroll-margin-top: 90px; }
@media (max-width: 860px) { .score { grid-template-columns: minmax(0, 1fr); } }
.score-big { font-size: clamp(3rem, 8vw, 4.5rem); font-weight: 850; font-variation-settings: "wdth" 115; line-height: 1; font-variant-numeric: tabular-nums; }
.meter { height: 14px; border: 2px solid var(--ink); border-radius: 3px; background: var(--paper); overflow: hidden; }
.meter span { display: block; height: 100%; background: var(--signal); border-right: 2px solid var(--ink); width: 0; }
.areas { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.areas li { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) 2.5em; gap: 10px; align-items: center; font-size: 14px; }
.area-bar { height: 8px; background: var(--rule); border-radius: 2px; overflow: hidden; }
.area-bar span { display: block; height: 100%; background: var(--ink); }
.area-pct { text-align: right; color: var(--steel); }
.weak { padding-left: 1.2em; margin: 0; display: grid; gap: 16px; max-width: var(--measure); }
.weak li { display: grid; gap: 4px; }
.disclosure { margin-top: 20px; max-width: 90ch; }
