/* Debt Cycle Clock — one stylesheet for four tabs.
   Static, no JavaScript, phone first. Body 18px; nothing below 14px; every tap target 48px.
   Palette: green #1b5e3f, navy #1e3a5f, amber #a8611b, red #9c2b2b, neutrals. No teal, no lime. */
:root{
  --green:#1b5e3f; --green-wash:#eef5f0; --navy:#1e3a5f; --amber:#a8611b; --red:#9c2b2b;
  --ink:#161616; --muted:#5c6b62; --rule:#e3e8e4; --card:#ffffff; --page:#f7f9f7;
  --navborder:#cfd9d2;
}
*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{margin:0;background:var(--page);color:var(--ink);
  font:18px/1.6 -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
  padding:0 0 40px}
main{max-width:860px;margin:0 auto;padding:0 14px}
a{color:var(--green);overflow-wrap:anywhere}
/* long source URLs must wrap on a phone: Past cycles carried 48 elements wider than the viewport
   because an unbroken URL sets its own min-content width and pushes the whole page sideways. */
.card.src,.src,footer a,p a{overflow-wrap:anywhere;word-break:break-word}
.card .row .val{overflow-wrap:anywhere}
a:focus-visible,summary:focus-visible{outline:3px solid var(--navy);outline-offset:3px}

/* ---------- nav: two columns of 48px targets on a phone, four on a wide screen ---------- */
.tabs{display:grid;grid-template-columns:1fr 1fr;gap:8px;max-width:860px;margin:0 auto;padding:12px 14px 0}
.tab{display:flex;align-items:center;justify-content:center;min-height:48px;padding:10px 8px;
  font-size:16px;line-height:1.2;text-align:center;text-decoration:none;font-weight:500;
  color:var(--navy);background:var(--card);border:1px solid var(--navborder);border-radius:10px}
.tab.here{font-weight:700;background:var(--green-wash);border-color:var(--navy);
  text-decoration:underline;text-decoration-thickness:3px;text-underline-offset:6px;
  text-decoration-color:var(--green)}
@media(min-width:640px){.tabs{grid-template-columns:repeat(4,1fr)}}
@media print{.tabs{display:none}}

/* ---------- header ---------- */
header.head{max-width:860px;margin:0 auto;padding:18px 14px 0}
.kicker{font-size:14px;letter-spacing:.08em;text-transform:uppercase;color:var(--muted);margin:0 0 6px}
h1.h1{font-size:24px;line-height:1.25;margin:0 0 10px;color:var(--green);font-weight:750}
.opener{font-size:19px;font-weight:700;color:var(--navy);margin:0 0 4px}
.asof{font-size:14px;color:var(--muted);margin:0 0 12px}
.strip{display:flex;align-items:center;gap:10px;margin:0 0 6px}
.caption{font-size:14px;color:var(--muted)}

/* ---------- sections ---------- */
section{margin:26px 0 0}
h2{font-size:20px;line-height:1.3;margin:0 0 10px;color:var(--navy);font-weight:700}
h3{font-size:18px;line-height:1.35;margin:18px 0 8px;color:var(--navy);font-weight:700}
p{margin:0 0 12px}
.lede{font-size:18px;color:var(--ink)}
.big{font-size:19px;line-height:1.5}
.n{display:inline-grid;place-items:center;min-width:22px;height:22px;border-radius:50%;
  background:var(--navy);color:#fff;font-size:14px;margin-right:8px;vertical-align:1px}
ol,ul{margin:0 0 12px;padding-left:22px}
li{margin:0 0 8px}
.plain li b{color:var(--navy)}

/* ---------- boxes ---------- */
.box{background:var(--card);border:1px solid var(--rule);border-radius:12px;padding:14px 16px;margin:0 0 16px}
.notbox{background:#fdf8f2;border:1px solid #e8d9c5;border-radius:12px;padding:14px 16px;margin:18px 0 0}
.notbox h2{color:var(--amber);font-size:19px}
.notbox li b{color:var(--amber)}
.wrong{background:#fdf3f3;border:1px solid #e7c9c9;border-radius:12px;padding:14px 16px;margin:0 0 16px}
.wrong h2,.wrong h3{color:var(--red)}
.note{font-size:15px;line-height:1.5;color:var(--muted);margin:0 0 10px}
details{background:var(--card);border:1px solid var(--rule);border-radius:12px;padding:12px 14px;margin:14px 0}
summary{cursor:pointer;font-weight:700;color:var(--navy);font-size:17px;min-height:32px}
details[open] summary{margin-bottom:10px}

/* ---------- the four-step stepper ---------- */
.stepper{margin:6px 0 14px}
.step{display:grid;grid-template-columns:34px 1fr;gap:10px;align-items:start;
  padding:10px 12px;border-radius:10px;border:1px solid transparent;min-height:56px}
.step .num{display:grid;place-items:center;width:30px;height:30px;border-radius:50%;
  background:var(--rule);color:var(--navy);font-weight:700;font-size:15px}
.step .nm{font-weight:700;color:var(--navy);font-size:18px}
.step .gl{font-size:16px;color:var(--muted)}
.step.current{background:var(--green-wash);border-color:#cfe3d6;box-shadow:inset 3px 0 0 var(--green)}
.step.current .num{background:var(--green);color:#fff}
.here{font-size:14px;font-weight:700;color:var(--green);letter-spacing:.06em}

/* ---------- the eleven line rows ---------- */
.line-row{background:var(--card);border:1px solid var(--rule);border-radius:12px;padding:12px 14px;margin:0 0 10px}
.line-row .nm{font-size:18px;font-weight:600;color:var(--navy)}
.line-row .meas{font-size:15px;color:var(--muted);margin:2px 0 6px}
.line-row .now{font-size:21px;font-weight:600;color:var(--navy)}
.line-row .now .st{font-size:15px;font-weight:700}
.line-row .fires{font-size:15px;color:var(--muted);margin:4px 0 6px}
.bar{height:6px;border-radius:3px;background:var(--rule);overflow:hidden}
.bar i{display:block;height:6px;background:var(--green)}
.line-row .do{font-size:15px;font-weight:600;color:var(--green);margin-top:8px}
.line-row .note{font-size:14px;margin:6px 0 0}
.state-calm .st{color:var(--green)}
.state-moving .st{color:var(--navy)}
.state-near .st{color:var(--amber)}
.state-broken .st{color:var(--red)}

/* ---------- history cards ---------- */
.card{background:var(--card);border:1px solid var(--rule);border-radius:12px;padding:14px 16px;margin:0 0 14px}
.card .hd{display:flex;gap:10px;align-items:baseline}
.card .badge{display:inline-grid;place-items:center;min-width:26px;height:26px;border-radius:50%;
  background:var(--navy);color:#fff;font-size:14px;font-weight:700}
.card h3{margin:0 0 4px}
.card .ctry{font-size:14px;color:var(--muted);margin:0 0 10px}
.card .row{display:grid;grid-template-columns:1fr;gap:2px;margin:0 0 8px}
.card .lbl{font-size:15px;color:var(--muted);text-transform:uppercase;letter-spacing:.06em}
.card .val{font-size:17px}
.card .gap{font-size:20px;font-weight:700;color:var(--green)}
.card.unanswered{border:2px dashed var(--amber)}
.card.unanswered .badge{background:var(--amber)}
.card.unanswered h3{color:var(--amber)}
.card.src{font-size:14px;color:var(--muted)}
.card.src a{color:var(--green);overflow-wrap:anywhere}
/* long source URLs must wrap on a phone: Past cycles carried 48 elements wider than the viewport
   because an unbroken URL sets its own min-content width and pushes the whole page sideways. */
.card.src,.src,footer a,p a{overflow-wrap:anywhere;word-break:break-word}
.card .row .val{overflow-wrap:anywhere}
.speed{background:var(--card);border:1px solid var(--rule);border-radius:12px;padding:12px 14px;margin:0 0 16px}
.speed .r{margin:0 0 10px}
.speed .lab{font-size:15px;color:var(--navy);font-weight:600}
.speed .track{height:10px;border-radius:5px;background:var(--rule);margin:4px 0 0;overflow:hidden}
.speed .track i{display:block;height:10px;background:var(--green)}

/* ---------- figure / svg ---------- */
figure{margin:0 0 16px}
figcaption{font-size:14px;color:var(--muted);margin-top:6px}
.vid{margin:12px 0 0;padding:10px 12px;border-left:3px solid var(--green);background:#f4f8f5;
  border-radius:0 8px 8px 0;font-size:15px}
.vid a{font-weight:700;text-decoration:none;display:block;margin-bottom:2px}

/* ---------- footer ---------- */
footer{max-width:860px;margin:30px auto 0;padding:14px;border-top:1px solid var(--rule);
  font-size:14px;color:var(--muted)}
footer p{margin:0 0 8px}
@media print{
  body{background:#fff;font-size:12pt}
  details{border:0;padding:0}
  a[href]:after{content:" (" attr(href) ")";font-size:10pt;color:#555}
  .tabs{display:none}
}
