@font-face { font-family: "Inter"; src: url("fonts/inter.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("fonts/jetbrains-mono.woff2") format("woff2"); font-weight: 100 800; font-style: normal; font-display: swap; }

/* One centered column, a numbered path and three signal colors. */
:root {
  --ground: #f6f5f1;
  --surface: #eeede8;
  --raise: #e7e6e0;
  --line: #dcdbd5;
  --line-2: #c9c8c2;
  --white: #1d1d1f;
  --muted: #55585c;
  --dim: #696c70;
  --good: #19683b;
  --warn: #7a5812;
  --stop: #b42318;
  --read: "Inter", "Segoe UI", system-ui, sans-serif;
  --label: "JetBrains Mono", "Cascadia Mono", Consolas, monospace;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { background: var(--ground); }
body {
  margin: 0; background: var(--ground); color: var(--white);
  font: 300 17px/1.6 var(--read); -webkit-font-smoothing: antialiased;
}
a { color: var(--white); text-underline-offset: 3px; }
.wrap {
  max-width: 760px; margin: 0 auto;
  padding-inline: max(16px, env(safe-area-inset-left, 0px), env(safe-area-inset-right, 0px));
}
.eyebrow, .num, .tag {
  font: 500 12px/1.4 var(--label); letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted);
}
.hero { padding-block: 24px 28px; text-align: center; }
.lockup { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; margin-bottom: 12px; color: var(--white); text-decoration: none; }
.lockup .mark { width: auto; height: 40px; }
h1 { margin: 12px 0 18px; font-weight: 600; font-size: clamp(36px, 8vw, 64px); line-height: 1.03; letter-spacing: -0.02em; text-wrap: balance; }
h2 { margin: 0; font-weight: 600; font-size: 26px; line-height: 1.2; letter-spacing: -0.01em; text-wrap: balance; }
h3 { margin: 0 0 8px; font-weight: 600; font-size: 17px; }
.lede { margin: 0 auto; max-width: 600px; font-size: 19px; color: var(--muted); }
.promises { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 14px 0 0; padding: 0; list-style: none; }
.promises li { font: 500 12px/1.25 var(--label); border: 1px solid var(--line-2); border-radius: 999px; padding: 5px 8px; color: var(--white); }

section.step { border-top: 1px solid var(--line); padding-block: 40px; }
.step-head { display: grid; gap: 4px; margin-bottom: 16px; text-align: center; }
.step-head p { margin: 2px auto 0; max-width: 56ch; color: var(--muted); }
.locked { opacity: .35; pointer-events: none; }
.locked-note { color: var(--dim); font-size: 15px; margin: 0; text-align: center; }

/* Safety */
.q { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; padding-block: 14px; border-bottom: 1px solid var(--line); }
.q p { margin: 0; min-width: 0; }
.yn { display: flex; gap: 6px; }
button, .btn {
  font: 600 15px/1 var(--read); color: var(--white); background: transparent;
  border: 1px solid var(--line-2); min-height: 44px; padding: 12px 16px; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
button:hover, .btn:hover { border-color: var(--muted); }
.yn button, .verdict :is(button, .btn) { border-radius: 999px; text-align: center; }
button:focus-visible, .btn:focus-visible, input:focus-visible { outline: 2px solid var(--white); outline-offset: 2px; }
.yn button[aria-pressed="true"] { background: var(--white); color: var(--ground); border-color: var(--white); }
.btn.primary { background: var(--white); color: var(--ground); border-color: var(--white); }
.verdict { margin-top: 20px; padding: 18px 20px; border-top: 3px solid var(--line-2); background: var(--surface); text-align: center; }
.verdict p { margin: 0 0 12px; }
.verdict p:last-child { margin-bottom: 0; }
.verdict.stop { border-top-color: var(--stop); }
.verdict.clear { border-top-color: var(--good); }
.verdict .actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 4px; }
@media screen {
  .verdict .go { color: var(--good); border-color: var(--good); }
  .verdict .go:hover { background: var(--good); color: #fff; }
}
.stopword { color: var(--stop); font-weight: 600; }
.clearword { color: var(--good); font-weight: 600; }

/* Goals */
.goals { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(210px, 100%), 1fr)); gap: 10px; }
.goal { text-align: center; display: grid; gap: 6px; padding: 18px; background: var(--surface); align-content: start; line-height: 1.4; }
.goal strong { font-size: 18px; font-weight: 600; }
.goal span { font: 300 15px/1.45 var(--read); color: var(--muted); }
.goal[aria-pressed="true"] { border-color: var(--white); box-shadow: inset 0 0 0 1px var(--white); }
.goal:disabled { opacity: .35; cursor: not-allowed; }

/* Plan */
.plan { display: grid; gap: 28px; }
.plan ol { margin: 0; padding-left: 1.3em; display: grid; gap: 8px; }
.plan ul { margin: 0; padding-left: 1.1em; display: grid; gap: 6px; }
.say { font: 600 22px/1.3 var(--read); margin: 0; padding: 14px 18px; background: var(--surface); border: 1px solid var(--line); text-align: center; }
.twocol { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.twocol > div { min-width: 0; }
.good-h { color: var(--good); }
.warn-h { color: var(--warn); }
.practice { padding: 16px 18px; border: 1px dashed var(--line-2); color: var(--muted); }
.practice strong { color: var(--white); font-weight: 600; }

/* Today */
.daybar { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 18px; }
.daybar .date { font: 500 14px var(--label); letter-spacing: .08em; text-transform: uppercase; }
.daybar button { padding: 10px 12px; font-size: 14px; }
.counter { display: grid; grid-template-columns: 72px 1fr 72px; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--line); padding: 16px; }
.counter button { height: 72px; font-size: 32px; justify-content: center; padding: 0; }
.counter .val { text-align: center; }
.counter .big { font: 600 64px/1 var(--read); font-variant-numeric: tabular-nums; }
.counter .unit { color: var(--muted); font-size: 14px; margin-top: 6px; }
.block { margin-top: 24px; }
.mood { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.mood button { justify-content: center; text-align: center; padding: 14px 8px; font-size: 14px; line-height: 1.25; }
.mood button[aria-pressed="true"] { background: var(--white); color: var(--ground); border-color: var(--white); }
.checks { display: grid; gap: 2px; }
.checks label { display: grid; grid-template-columns: 24px 1fr; gap: 12px; align-items: start; padding: 10px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.checks input { width: 20px; height: 20px; margin: 3px 0 0; accent-color: var(--white); }
.score { margin-top: 10px; font: 500 13px var(--label); letter-spacing: .06em; color: var(--muted); }
.saved { font: 500 12px var(--label); letter-spacing: .1em; text-transform: uppercase; color: var(--good); min-height: 1.4em; margin-top: 12px; }

/* Graph */
.chart { background: var(--surface); border: 1px solid var(--line); padding: 16px 12px 8px; overflow-x: auto; }
.chart svg { display: block; width: 100%; min-width: 320px; height: auto; }
.chart .axis { fill: var(--dim); font: 500 11px var(--label); }
.example-tag { display: inline-block; margin-bottom: 10px; color: var(--warn); }
.readout { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 14px; }
.readout div { padding: 14px; border: 1px solid var(--line); min-width: 0; }
.readout .k { font: 500 11px var(--label); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.readout .v { font: 600 20px/1.25 var(--read); margin-top: 6px; }
.note { margin: 16px 0 0; color: var(--muted); }
.legend { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 8px; font-size: 13px; color: var(--muted); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; }

/* Ask */
.asks { margin: 0; padding-left: 1.3em; display: grid; gap: 10px; }
.links { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; margin-top: 24px; }
.links a { display: grid; gap: 4px; padding: 16px; border: 1px solid var(--line-2); text-decoration: none; }
.links a:hover { border-color: var(--muted); }
.links a span { color: var(--muted); font-size: 15px; }

.tonight { padding: 18px 20px; border-top: 3px solid var(--warn); background: var(--surface); text-align: center; }
.tonight p { margin: 10px 0 0; font-size: 19px; font-weight: 600; line-height: 1.4; }
.tonight .tonight-note { font-size: 15px; font-weight: 300; color: var(--muted); }
.fb { display: grid; gap: 22px; }
.fb-q h3 { margin-bottom: 10px; }
textarea { width: 100%; font: 300 16px/1.5 var(--read); color: var(--white); background: var(--surface); border: 1px solid var(--line-2); padding: 12px; resize: vertical; }
.fb .actions { display: flex; flex-wrap: wrap; gap: 8px; }
footer { border-top: 1px solid var(--line); padding-block: 40px 56px; }
.mission { font: 600 clamp(22px, 4.4vw, 30px)/1.25 var(--read); letter-spacing: -0.01em; margin: 10px 0 24px; text-wrap: balance; }
.mission .soon { color: var(--muted); }
.fine { color: var(--dim); font-size: 14px; margin: 0 0 8px; max-width: 640px; }
.reset { margin-top: 20px; font-size: 13px; padding: 10px 12px; color: var(--muted); }

@media (max-width: 560px) {
  .hero { padding-block: 16px; }
  .hero h1 { font-size: clamp(28px, 8vw, 36px); margin: 8px 0 12px; }
  .hero .lede { font-size: 16px; line-height: 1.45; }
  section.step { padding-block: 24px; }
  .twocol, .readout { grid-template-columns: 1fr; }
  .q { grid-template-columns: 1fr; text-align: center; gap: 8px; }
  .yn { justify-content: center; }
  .yn button { flex: 1 1 0; max-width: 9rem; }
  .counter { grid-template-columns: 60px 1fr 60px; }
  .counter button { height: 60px; }
  .counter .big { font-size: 52px; }
}
@media (max-width: 360px) {
  .hero { padding-block: 12px; }
  .lockup { margin-bottom: 6px; }
  .promises { margin-top: 10px; }
  section.step { padding-block: 18px; }
  .q { padding-block: 10px; }
}
@media (prefers-reduced-motion: no-preference) {
  #safetyVerdict:not([hidden]), #plan:not([hidden]) { animation: settle .22s ease-out; }
  @keyframes settle { from { opacity: .9; transform: translateY(5px); } }
  .saved.flash { animation: fade 1.6s ease forwards; }
  @keyframes fade { 0% { opacity: 1 } 70% { opacity: 1 } 100% { opacity: 0 } }
}
