/* ============================================================
   WN §5.1 token remap (DIR-2026-06-11 Stage 2). The prototype's
   brand/colors_and_type.css is not ported; this self-contained
   :root block assigns every prototype token this artefact consumes.
   Repo tokens (src/styles/design-tokens.css, loaded globally via
   BaseLayout) are referenced where an equivalent exists; brand-literal
   values are carried where the repo has none. Decision 6.6: the mono
   faces map to the system mono stack (no new font dependency).
   ============================================================ */
:root {
  --font-sans: var(--pf-font-sans);
  --font-display: var(--font-sans);
  --font-mono-dev: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --font-mono-marketing: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --bg-page: var(--pf-paper);
  --bg-ink-soft: rgba(0, 58, 77, 0.04);
  --pf-text: #1a1a1a;
  --fg-2: #334155;            /* brand --pf-slate-600 */
  --fg-3: #6B838B;            /* brand --pf-slate-400 */
  --pf-slate-50: #F1F5F7;
  --pf-slate-100: #E3ECEF;
  --pf-slate-200: #C9D7DC;
  --pf-slate-300: #9FB3BA;
  --pf-slate-500: #47606A;
  --border-1: var(--pf-slate-100);
  --border-2: var(--pf-slate-200);
  --pf-extra-light: #ECF5F8;
  --pf-light-blue: #D2EEF0;
  --pf-cyan-ink: #018990;
  --pf-green: #03BF5D;
  --pf-lime: #BED629;
  --pf-red: #c0392b;
  --pf-steel: #4899B7;
  --warning: #E8A317;
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;
  --r-pill: 999px;
  --sh-focus: 0 0 0 3px rgba(2, 180, 191, 0.35);
  --sh-2: 0 4px 12px rgba(0, 58, 77, 0.10);
  --dur-2: 200ms;
  --dur-3: 320ms;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --pf-gradient-dark: linear-gradient(135deg, var(--pf-navy-deep) 0%, var(--pf-navy) 100%);
  --pf-overlay-navy: linear-gradient(135deg, rgba(0, 42, 56, 0.92) 0%, rgba(0, 58, 77, 0.80) 100%);
  --pf-scrim-bottom: linear-gradient(0deg, rgba(0, 42, 56, 0.85) 0%, rgba(0, 42, 56, 0.20) 55%, rgba(0, 42, 56, 0) 100%);
}

/* ============================================================
   Sustain dashboard · styles
   COO altitude: one scrolling page, hero chart leads.
   Product surface family. Flat cards, navy + cyan, data colours
   only as indicators.
   ============================================================ */

body { margin: 0; background: var(--bg-page); }

.su-app { min-height: 100svh; display: flex; flex-direction: column; }
.su-wrap { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 clamp(16px, 3vw, 32px); }

/* ---------------- header ---------------- */
.su-top { background: #fff; border-bottom: 1px solid var(--border-1); }
.su-top-in {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 10px clamp(16px, 3vw, 32px); max-width: 1240px; margin: 0 auto;
}
.su-top-left { display: flex; align-items: center; gap: 16px; min-width: 0; }
.su-top-left img { height: 40px; width: auto; display: block; flex: none; }
.su-title { min-width: 0; }
.su-title .t { font-size: 14px; font-weight: 600; color: var(--pf-navy); white-space: nowrap; }
.su-title .s {
  font-family: var(--font-mono-dev); font-size: 10px; letter-spacing: 0.05em;
  color: var(--fg-3); white-space: nowrap;
}
.su-top-right { display: flex; align-items: center; gap: 12px; flex: none; flex-wrap: wrap; justify-content: flex-end; }
.su-when { font-family: var(--font-mono-dev); font-size: 10.5px; letter-spacing: 0.04em; color: var(--fg-2); white-space: nowrap; }
.su-phase {
  display: inline-flex; align-items: center; gap: 7px; height: 24px; padding: 0 11px;
  border-radius: var(--r-pill); background: rgba(2,180,191,0.1); border: 1px solid rgba(2,180,191,0.3);
  font-size: 10.5px; font-weight: 600; color: var(--pf-cyan-ink); white-space: nowrap;
}
.su-phase::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--pf-cyan); }
.su-sample {
  display: inline-flex; align-items: center; gap: 7px; height: 24px; padding: 0 11px;
  border-radius: var(--r-pill); background: rgba(190,214,41,0.16); border: 1px solid rgba(190,214,41,0.55);
  font-size: 10.5px; font-weight: 600; color: #5a661a; white-space: nowrap;
}
.su-sample::before { content: ""; width: 6px; height: 6px; border-radius: 2px; background: var(--pf-lime); }

/* ---------------- journey strip ---------------- */
.su-journey { background: var(--pf-navy); }
.su-journey-in {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
  max-width: 1240px; margin: 0 auto; background: rgba(255,255,255,0.12);
}
.su-jstep { background: var(--pf-navy); padding: 12px clamp(14px, 2vw, 24px) 14px; position: relative; text-decoration: none; display: block; }
.su-jstep .jw {
  font-family: var(--font-mono-dev); font-size: 9px; letter-spacing: 0.1em;
  text-transform: uppercase; color: rgba(255,255,255,0.5);
}
.su-jstep .jl { display: block; margin-top: 4px; font-size: 13px; font-weight: 600; color: #fff; }
.su-jstep .jn { display: block; margin-top: 3px; font-size: 10.5px; line-height: 1.45; color: rgba(255,255,255,0.55); }
.su-jstep.now { background: rgba(2,180,191,0.14); }
.su-jstep.now .jw { color: var(--pf-cyan); }
.su-jstep.now::after {
  content: "Now"; position: absolute; top: 10px; right: 12px;
  font-family: var(--font-mono-dev); font-size: 8.5px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--pf-navy); background: var(--pf-cyan); padding: 2px 7px; border-radius: 99px;
}
a.su-jstep:hover .jl { color: var(--pf-cyan); }

/* ---------------- body ---------------- */
.su-body { padding: clamp(18px, 3vw, 30px) 0 10px; }

.su-sec { margin: 24px 0 12px; display: flex; align-items: baseline; gap: 10px; }
.su-sec h2 { font-size: 13px; letter-spacing: 0.02em; color: var(--pf-navy); }
.su-sec .k {
  font-family: var(--font-mono-dev); font-size: 9px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--pf-cyan-ink);
}
.su-sec .rule { flex: 1; height: 1px; background: var(--border-1); }

/* ---------------- hero card ---------------- */
.su-hero { background: #fff; border: 1px solid var(--pf-light-blue); border-radius: var(--r-lg); padding: clamp(18px, 2.5vw, 28px); }
.su-hero-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.su-hero-num .hv {
  font-family: var(--font-display); font-weight: 600; font-size: clamp(40px, 5vw, 58px);
  letter-spacing: -0.03em; color: var(--pf-navy); line-height: 1; font-variant-numeric: tabular-nums;
}
.su-hero-num .hc { margin-top: 6px; font-size: 13.5px; font-weight: 600; color: var(--pf-navy); }
.su-hero-num .hs { margin-top: 3px; font-size: 12px; color: var(--fg-3); }
.su-hero-stats { display: grid; grid-template-columns: repeat(3, auto); gap: clamp(16px, 2.5vw, 36px); }
.su-hero-stats .st .v { font-family: var(--font-display); font-weight: 600; font-size: 19px; color: var(--pf-navy); font-variant-numeric: tabular-nums; }
.su-hero-stats .st .k2 { margin-top: 4px; font-size: 10.5px; line-height: 1.45; color: var(--fg-3); max-width: 20ch; }

.su-chart-controls { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 18px 0 6px; flex-wrap: wrap; }
.su-legend { display: flex; gap: 18px; flex-wrap: wrap; font-size: 11px; color: var(--fg-2); }
.su-legend span { display: inline-flex; align-items: center; gap: 7px; }
.su-legend i { width: 16px; height: 0; border-top: 2.5px solid var(--pf-cyan); display: inline-block; }
.su-legend i.tgt { border-top: 2px dashed var(--pf-slate-300); }
.su-legend i.ph { width: 12px; height: 12px; border: 0; border-radius: 3px; background: rgba(2,180,191,0.1); outline: 1px solid rgba(2,180,191,0.3); }
.su-range { display: inline-flex; background: var(--pf-extra-light); border: 1px solid var(--border-1); border-radius: var(--r-pill); padding: 3px; }
.su-range button {
  appearance: none; border: 0; background: transparent; cursor: pointer;
  font-family: var(--font-sans); font-size: 11.5px; font-weight: 600; color: var(--fg-2);
  padding: 5px 13px; border-radius: var(--r-pill); transition: all var(--dur-2) var(--ease-out);
}
.su-range button[aria-pressed="true"] { background: var(--pf-navy); color: #fff; }

.su-chart { position: relative; }
.su-chart svg { width: 100%; height: auto; display: block; }
.su-dipnote { margin-top: 10px; font-size: 11.5px; color: var(--fg-3); }
.su-dipnote b { color: var(--fg-2); }

/* tooltip */
.su-tip {
  position: absolute; pointer-events: none; z-index: 5; display: none;
  background: var(--pf-navy); color: #fff; border-radius: var(--r-sm);
  padding: 7px 10px; font-size: 11px; line-height: 1.5; box-shadow: var(--sh-2);
  transform: translate(-50%, calc(-100% - 10px)); white-space: nowrap;
}
.su-tip b { color: var(--pf-cyan); font-variant-numeric: tabular-nums; }
.su-tip .ph2 { color: rgba(255,255,255,0.6); }

/* ---------------- panel grid ---------------- */
.su-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 14px; align-items: start; }
.su-panel { background: #fff; border: 1px solid var(--pf-light-blue); border-radius: var(--r-lg); padding: 18px 20px; }
.su-panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.su-panel-head h3 { font-size: 14px; }
.su-panel-head .m { font-family: var(--font-mono-dev); font-size: 9.5px; letter-spacing: 0.05em; color: var(--fg-3); }

/* drift alerts */
.su-drift { display: flex; flex-direction: column; gap: 8px; }
.su-alert { border: 1px solid var(--border-1); border-radius: var(--r-md); padding: 13px 15px; display: grid; grid-template-columns: auto 1fr; gap: 11px; }
.su-alert .dot { width: 9px; height: 9px; border-radius: 50%; margin-top: 5px; }
.su-alert.warn .dot { background: var(--warning); }
.su-alert.held .dot { background: var(--pf-green); }
.su-alert .at { font-size: 13px; font-weight: 600; color: var(--pf-navy); line-height: 1.4; }
.su-alert .ad { margin-top: 5px; font-size: 12px; line-height: 1.55; color: var(--fg-2); }
.su-action {
  margin-top: 9px; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  border: 1px solid rgba(2,180,191,0.28); background: rgba(2,180,191,0.05);
  border-radius: var(--r-sm); padding: 9px 12px;
}
.su-action .av { font-size: 11.5px; line-height: 1.5; font-weight: 600; color: var(--pf-navy); }
.su-action .av .ak {
  display: block; font-family: var(--font-mono-dev); font-size: 8px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--pf-cyan-ink); margin-bottom: 2px; font-weight: 500;
}
.su-action .pf-chip { flex: none; }
.su-alert.held .su-action { border-color: var(--border-1); background: var(--pf-extra-light); }

/* AFOR feed */
.su-afor .su-feed { display: flex; flex-direction: column; gap: 7px; }
.su-feed-item {
  display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: start;
  border: 1px solid var(--border-1); border-radius: var(--r-sm); padding: 10px 12px;
  font-size: 12px; line-height: 1.5; color: var(--fg-2);
}
.su-feed-item .fd { width: 8px; height: 8px; border-radius: 50%; margin-top: 4px; }
.su-feed-item.warn .fd { background: var(--warning); }
.su-feed-item.pos .fd { background: var(--pf-green); }
.su-feed-item.action .fd { background: var(--pf-cyan); }
.su-feed-item.action { border-color: rgba(2,180,191,0.3); background: rgba(2,180,191,0.04); color: var(--pf-navy); font-weight: 500; }
.su-afor .open-link {
  margin-top: 12px; display: inline-flex; align-items: center; gap: 6px;
  font-size: 12.5px; font-weight: 600; color: var(--pf-cyan-ink); text-decoration: none;
}
.su-afor .open-link:hover { text-decoration: underline; }
.su-panel-note { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--border-1); font-size: 11px; line-height: 1.55; color: var(--fg-3); }

/* coaching */
.su-coach-top { display: flex; align-items: baseline; gap: 18px; flex-wrap: wrap; margin-bottom: 12px; }
.su-coach-top .cv { font-family: var(--font-display); font-weight: 600; font-size: 26px; color: var(--pf-navy); white-space: nowrap; }
.su-coach-top .ck { font-size: 12px; color: var(--fg-2); }
.su-coach-top .ft { font-size: 11.5px; color: var(--pf-cyan-ink); font-weight: 600; }
.su-crew { display: grid; grid-template-columns: 64px 76px 1fr auto; gap: 12px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--border-1); }
.su-crew:last-of-type { border-bottom: 0; }
.su-crew .cn { font-size: 12px; font-weight: 600; color: var(--pf-navy); white-space: nowrap; }
.su-crew .cb { display: flex; gap: 4px; }
.su-crew .cb i { width: 22px; height: 7px; border-radius: 99px; background: var(--pf-slate-100); }
.su-crew .cb i.h { background: var(--pf-cyan); }
.su-crew .cf { font-size: 11.5px; color: var(--fg-2); }
.su-crew .cx { font-family: var(--font-mono-dev); font-size: 9.5px; color: var(--fg-3); white-space: nowrap; }
.su-crew.short .cx { color: var(--pf-cyan-ink); font-weight: 600; }

/* re-diagnosis */
.su-rd-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.su-rd-card { border: 1px solid var(--border-1); border-radius: var(--r-md); padding: 13px 15px; }
.su-rd-card .rk {
  font-family: var(--font-mono-dev); font-size: 8.5px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--fg-3); display: block; margin-bottom: 7px;
}
.su-rd-card .rv { font-size: 14px; font-weight: 600; color: var(--pf-navy); }
.su-rd-card .rh { margin-top: 3px; font-size: 11px; color: var(--fg-3); }
.su-rd-card .pf-chip { margin-top: 8px; }
.su-prog { margin-top: 14px; }
.su-prog-track { position: relative; height: 10px; border-radius: 99px; background: var(--pf-slate-50); border: 1px solid var(--border-1); }
.su-prog-fill { position: absolute; inset: 1px auto 1px 1px; border-radius: 99px; background: var(--pf-navy); width: 0; transition: width 700ms var(--ease-out); }
.su-prog-pin { position: absolute; top: -5px; bottom: -5px; width: 2px; border-radius: 2px; background: var(--pf-slate-300); }
.su-prog-pin.hold { background: var(--pf-cyan); }
.su-prog-labels { display: flex; justify-content: space-between; margin-top: 8px; }
.su-prog-labels .pl { font-family: var(--font-mono-dev); font-size: 9px; letter-spacing: 0.04em; color: var(--fg-3); }
.su-prog-labels .pl b { display: block; font-family: var(--font-sans); font-size: 12px; color: var(--pf-navy); letter-spacing: 0; }
.su-gap { margin-top: 12px; border-left: 2px solid var(--pf-cyan); padding-left: 12px; font-size: 12px; line-height: 1.55; color: var(--fg-2); }

/* ---------------- footer ---------------- */
.su-foot {
  margin-top: 26px; border-top: 1px solid var(--border-1); background: #fff;
}
.su-foot-in {
  max-width: 1240px; margin: 0 auto; padding: 14px clamp(16px, 3vw, 32px);
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}
.su-footnote { padding: 16px 0 0; font-size: 11.5px; line-height: 1.6; color: var(--fg-3); max-width: 90ch; }
.su-footnote b { color: var(--fg-2); }

/* reveal */
.su-rv { opacity: 0; transform: translateY(8px); transition: opacity .5s var(--ease-out), transform .5s var(--ease-out); }
.su-rv.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .su-rv { opacity: 1; transform: none; transition: none; } }

/* density */
body[data-density="compact"] .su-panel { padding: 13px 15px; }
body[data-density="compact"] .su-crew { padding: 6px 0; }
body[data-density="compact"] .su-hero { padding: 16px 18px; }
body[data-markers="off"] .su-mk { display: none; }

/* ---------------- responsive ---------------- */
@media (max-width: 980px) {
  .su-grid { grid-template-columns: 1fr; }
  .su-journey-in { grid-template-columns: 1fr 1fr; }
  .su-hero-stats { grid-template-columns: 1fr; gap: 10px; }
}
@media (max-width: 640px) {
  .su-journey-in { grid-template-columns: 1fr; }
  .su-crew { grid-template-columns: 56px 1fr; }
  .su-crew .cf { grid-column: 2; }
  .su-crew .cx { grid-column: 2; }
  .su-rd-cards { grid-template-columns: 1fr; }
}
