:root {
  --bg: #0a0a0b;
  --surface: #121214;
  --surface-2: #17171a;
  --line: rgba(255, 255, 255, 0.06);
  --line-2: rgba(255, 255, 255, 0.11);
  --text: #efe8da;           /* cream */
  --cream: #e8dfcb;
  --muted: #9a958a;
  --faint: #615d56;
  --green: #4cc38a;          /* revenue values + positive movement only */
  --red: #e5484d;            /* status: Forecast Broken */
  --grey: #8f9198;           /* status: Forecast Under Pressure */
  --black: #000000;          /* status: Forecast Confirmed */
  --radius: 16px;
  --pad: clamp(16px, 4vw, 40px);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Helvetica Neue', sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body { font-size: 15px; line-height: 1.5; font-feature-settings: 'cv11', 'ss01'; min-height: 100vh; }
.num, .kpi-value, td.n, .money { font-variant-numeric: tabular-nums; }
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
.boot { display: grid; place-items: center; height: 100vh; letter-spacing: .5em; color: var(--faint); font-weight: 600; }

/* ---------- top bar ---------- */
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px var(--pad); padding-top: max(14px, env(safe-area-inset-top)); background: rgba(10,10,11,.82); backdrop-filter: saturate(140%) blur(14px); -webkit-backdrop-filter: saturate(140%) blur(14px); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: baseline; gap: 14px; text-decoration: none; min-width: 0; }
.wordmark { font-weight: 650; letter-spacing: .32em; font-size: 15px; white-space: nowrap; }
.brand-sub { font-size: 12px; color: var(--muted); letter-spacing: .02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav { display: flex; align-items: center; gap: 6px; }
.nav a, .nav button { text-decoration: none; background: none; border: 0; color: var(--muted); padding: 8px 12px; border-radius: 10px; cursor: pointer; font-size: 14px; }
.nav a:hover, .nav button:hover, .nav a.active { color: var(--text); background: var(--surface-2); }

main { max-width: 1240px; margin: 0 auto; padding: 32px var(--pad) 96px; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 28px; }
.eyebrow { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 0 0 8px; }
h1 { font-size: clamp(26px, 3.4vw, 34px); font-weight: 600; letter-spacing: -.02em; margin: 0; line-height: 1.15; }
h2 { font-size: 13px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 0 0 18px; display: flex; align-items: center; gap: 8px; }
.meta { color: var(--muted); font-size: 13px; margin-top: 8px; }
.badge { display: inline-block; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; padding: 3px 8px; border-radius: 6px; border: 1px solid var(--line-2); color: var(--muted); vertical-align: middle; margin-left: 10px; font-weight: 500; }

/* ---------- buttons & forms ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--surface-2); color: var(--text); cursor: pointer; text-decoration: none; font-size: 14px; font-weight: 500; white-space: nowrap; -webkit-tap-highlight-color: transparent; }
.btn:hover { border-color: rgba(255,255,255,.2); }
.btn.primary { background: var(--text); color: #0a0a0b; border-color: var(--text); }
.btn.primary:hover { background: #f8f2e6; }
.btn.ghost { background: transparent; }
.btn.danger { color: var(--red); background: transparent; border-color: rgba(229,72,77,.35); }
.btn[disabled] { opacity: .5; cursor: default; }
.btn.sm { height: 32px; padding: 0 12px; font-size: 13px; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; }
label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.field { margin-bottom: 18px; }
.input, select.input { width: 100%; height: 46px; padding: 0 14px; background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 10px; outline: none; font-size: 16px; transition: border-color .15s; -webkit-appearance: none; appearance: none; }
select.input { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%238b8d94' fill='none' stroke-width='1.5'/%3E%3C/svg%3E"); background-position: calc(100% - 14px) center; background-repeat: no-repeat; padding-right: 36px; }
.input:focus { border-color: rgba(255,255,255,.35); }
.input.money { text-align: right; font-variant-numeric: tabular-nums; }
.input.invalid { border-color: var(--red); }
.hint { font-size: 12px; color: var(--faint); margin-top: 6px; }
.error-box { background: rgba(229,72,77,.08); color: #ff9592; border: 1px solid rgba(229,72,77,.25); border-radius: 10px; padding: 12px 14px; font-size: 14px; margin-bottom: 18px; }
.error-box ul { margin: 0; padding-left: 18px; }
.ok-box { background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 10px; padding: 12px 14px; font-size: 14px; margin-bottom: 18px; }
.seg { display: inline-flex; background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 10px; padding: 3px; }
.seg button { border: 0; background: none; padding: 7px 14px; border-radius: 8px; color: var(--muted); cursor: pointer; font-size: 14px; }
.seg button.on { background: var(--text); color: #0a0a0b; }

/* ---------- auth ---------- */
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.auth { width: 100%; max-width: 400px; }
.auth .wordmark { display: block; font-size: 30px; letter-spacing: .38em; margin-bottom: 10px; }
.auth .brand-sub { display: block; white-space: normal; margin-bottom: 44px; font-size: 13px; }
.auth h1 { font-size: 22px; margin-bottom: 6px; }
.auth p.lead { color: var(--muted); margin: 0 0 28px; font-size: 14px; }
.auth .btn.primary { width: 100%; height: 48px; margin-top: 6px; }
.auth-foot { margin-top: 40px; font-size: 12px; color: var(--faint); }

/* ---------- surfaces ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(18px, 2.6vw, 28px); }
.section { margin-top: 20px; }
.grid { display: grid; gap: 16px; }
.kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.kpi-label { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.kpi-value { font-size: clamp(24px, 3.2vw, 34px); font-weight: 600; letter-spacing: -.02em; margin-top: 14px; line-height: 1.1; }
.kpi-foot { font-size: 12px; color: var(--faint); margin-top: 10px; }
.rev { color: var(--green); }
.neg { color: var(--text); }

/* ---------- status ---------- */
.status-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex: none; }
.status-dot.BLACK { background: var(--black); box-shadow: 0 0 0 1.5px rgba(255,255,255,.75); }
.status-dot.GREY { background: var(--grey); }
.status-dot.RED { background: var(--red); }
.status-dot.NONE { background: transparent; box-shadow: 0 0 0 1.5px var(--faint); }
.status-chip { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; font-weight: 600; }
.status-chip.BLACK { color: var(--text); }
.status-chip.GREY { color: var(--grey); }
.status-chip.RED { color: var(--red); }
.status-chip.NONE { color: var(--faint); }

.hero { display: grid; grid-template-columns: 1.15fr 1fr; gap: 16px; }
.verdict-word { font-size: clamp(30px, 4.6vw, 52px); font-weight: 650; letter-spacing: -.03em; line-height: 1.02; margin: 18px 0 18px; }
.verdict-word.BLACK { color: #f8f2e6; }
.verdict-word.GREY { color: #b4b6bc; }
.verdict-word.RED { color: var(--red); }
.verdict-word.NONE { color: var(--faint); }
.answers { list-style: none; margin: 0; padding: 0; }
.answers li { display: flex; justify-content: space-between; gap: 16px; padding: 11px 0; border-top: 1px solid var(--line); font-size: 14px; }
.answers li > span:first-child { color: var(--muted); }
.answers li > span:last-child { text-align: right; font-weight: 500; }

.integrity-score { display: flex; align-items: baseline; gap: 10px; margin: 18px 0 26px; }
.integrity-score .big { font-size: clamp(48px, 7vw, 76px); font-weight: 600; letter-spacing: -.04em; line-height: 1; }
.integrity-score .of { color: var(--faint); font-size: 18px; }
.band { position: relative; height: 12px; display: flex; gap: 3px; margin: 34px 0 12px; }
.band .seg-red { background: var(--red); border-radius: 6px 0 0 6px; }
.band .seg-grey { background: var(--grey); }
.band .seg-black { background: var(--black); box-shadow: inset 0 0 0 1px rgba(255,255,255,.35); border-radius: 0 6px 6px 0; }
.band .marker { position: absolute; top: -9px; width: 2px; height: 30px; background: #fff; border-radius: 2px; transform: translateX(-1px); box-shadow: 0 0 0 3px var(--surface); }
.band .marker-label { position: absolute; top: -32px; transform: translateX(-50%); font-size: 12px; font-weight: 600; white-space: nowrap; background: var(--surface); padding: 0 4px; }
.band-legend { display: flex; justify-content: space-between; font-size: 11px; color: var(--faint); letter-spacing: .06em; text-transform: uppercase; gap: 8px; }
.band-legend span { white-space: nowrap; overflow: hidden; }
.band-legend span:last-child { text-align: right; }

/* info tooltip (tap or hover) */
.info { position: relative; display: inline-flex; }
.info > button { width: 18px; height: 18px; border-radius: 50%; border: 1px solid var(--line-2); background: none; color: var(--muted); font-size: 11px; line-height: 1; cursor: pointer; padding: 0; display: grid; place-items: center; font-weight: 600; text-transform: none; letter-spacing: 0; }
.info .tip { display: none; position: absolute; z-index: 30; left: 50%; top: 26px; transform: translateX(-50%); width: min(320px, 80vw); background: #1c1c20; border: 1px solid var(--line-2); border-radius: 12px; padding: 14px; font-size: 13px; line-height: 1.5; color: var(--text); text-transform: none; letter-spacing: 0; font-weight: 400; box-shadow: 0 18px 40px rgba(0,0,0,.5); }
.info.open .tip { display: block; }
@media (hover: hover) { .info:hover .tip { display: block; } }
.tip p { margin: 0 0 8px; } .tip p:last-child { margin: 0; } .tip .muted { color: var(--muted); }

/* chart */
.chart-wrap { position: relative; }
.chart { width: 100%; height: auto; display: block; overflow: visible; }
.chart text { fill: var(--faint); font-size: 11px; font-family: var(--font); }
.legend { display: flex; gap: 18px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin-bottom: 14px; }
.legend i { display: inline-block; width: 18px; height: 0; border-top: 2px solid; vertical-align: middle; margin-right: 6px; }

/* quarters */
.quarters { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.q { position: relative; overflow: hidden; }
.q .q-top { display: flex; justify-content: space-between; align-items: center; }
.q .q-name { font-size: 18px; font-weight: 600; }
.q .q-range { font-size: 12px; color: var(--faint); }
.q .q-pct { font-size: clamp(26px, 3.4vw, 34px); font-weight: 600; letter-spacing: -.02em; margin: 18px 0 6px; }
.q .q-phase { font-size: 12px; color: var(--muted); }
.q .q-bar { height: 3px; background: var(--line-2); border-radius: 2px; margin-top: 16px; overflow: hidden; }
.q .q-bar i { display: block; height: 100%; }
.q.BLACK { background: #000; border-color: rgba(255,255,255,.14); }
.q-bar i.BLACK { background: #fff; } .q-bar i.GREY { background: var(--grey); } .q-bar i.RED { background: var(--red); } .q-bar i.NONE { background: var(--faint); }
.q.dim { opacity: .62; }

/* runway */
.runway-track { position: relative; height: 10px; background: var(--surface-2); border-radius: 6px; margin: 28px 0 10px; overflow: visible; }
.runway-track .done { position: absolute; left: 0; top: 0; bottom: 0; background: var(--green); border-radius: 6px; }
.runway-track .proj { position: absolute; top: 0; bottom: 0; background: rgba(76,195,138,.22); box-shadow: inset 0 0 0 1px rgba(76,195,138,.55); border-radius: 0 6px 6px 0; }
.runway-track .goal { position: absolute; right: 0; top: -8px; bottom: -8px; width: 2px; background: #fff; }
.runway-scale { display: flex; justify-content: space-between; font-size: 12px; color: var(--faint); }
.runway-stats { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 16px; margin-top: 26px; }
.stat-label { font-size: 12px; color: var(--muted); }
.stat-value { font-size: 20px; font-weight: 600; margin-top: 6px; letter-spacing: -.01em; }
.recovery { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 16px 18px; background: var(--surface-2); border-radius: 12px; margin-top: 24px; }
.recovery .r-label { font-size: 18px; font-weight: 600; }
.recovery .r-sub { font-size: 13px; color: var(--muted); }

/* scenarios */
.scenarios { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.scn { background: var(--surface-2); border-radius: 12px; padding: 18px; }
.scn-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.scn-name { font-size: 13px; color: var(--muted); }
.scn input { width: 72px; height: 32px; padding: 0 8px; text-align: right; background: var(--bg); border: 1px solid var(--line-2); border-radius: 8px; font-size: 14px; outline: none; }
.scn-ye { font-size: 24px; font-weight: 600; margin: 16px 0 4px; letter-spacing: -.02em; }
.scn-pct { font-size: 13px; color: var(--muted); margin-bottom: 14px; }

/* tables */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-weight: 500; color: var(--muted); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; padding: 0 14px 14px; white-space: nowrap; }
th.sortable { cursor: pointer; user-select: none; }
th.sortable:hover, th.sorted { color: var(--text); }
th.n, td.n { text-align: right; }
td { padding: 16px 14px; border-top: 1px solid var(--line); white-space: nowrap; }
tr.rowlink { cursor: pointer; }
tr.rowlink:hover td { background: rgba(255,255,255,.02); }
.org-name { font-weight: 500; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }

.portfolio-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 20px; }
.pcards { display: none; }

/* input form */
.input-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 16px; }
.months { width: 100%; }
.months td { padding: 8px 10px; white-space: normal; }
.months td:first-child { color: var(--muted); width: 90px; }
.months th { padding: 0 10px 10px; }
.months tfoot td { color: var(--muted); font-size: 13px; }
.sticky-save { position: sticky; bottom: 0; padding: 16px 0 max(16px, env(safe-area-inset-bottom)); background: var(--bg); border-top: 1px solid var(--line); display: flex; gap: 10px; justify-content: flex-end; margin-top: 8px; }
.copy-row { display: flex; gap: 8px; margin-top: 10px; }
.copy-row input { flex: 1; font-size: 13px; }
.empty { text-align: center; padding: 56px 20px; color: var(--muted); }
.empty h3 { color: var(--text); font-weight: 600; font-size: 20px; margin: 0 0 8px; }

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; }
  .scenarios { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .brand-sub { display: none; }
}
@media (max-width: 760px) {
  .kpis, .portfolio-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .quarters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .runway-stats { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .input-grid { grid-template-columns: 1fr; }
  .ptable { display: none; }
  .pcards { display: grid; gap: 12px; }
  main { padding-top: 22px; }
}
@media (max-width: 420px) {
  .scenarios { grid-template-columns: 1fr; }
  .kpi-value { font-size: 22px; }
}
@media (min-width: 761px) and (max-width: 980px) {
  .brand-sub { display: inline; }
}

td.wrap { white-space: normal; }
td.wrap .badge { margin-left: 8px; }
@media (max-width: 980px) {
  th { padding: 0 10px 12px; font-size: 11px; }
  td { padding: 14px 10px; }
  td.wrap .badge { display: inline-block; margin: 4px 0 0; }
  td.wrap .org-name { display: block; }
}

/* ===================== v2 ===================== */
.small { font-size: 12px; }
.red { color: var(--red); }
.warn { color: #ff9592; }
.ok { color: var(--text); }
.kpi-of { font-size: 16px; font-weight: 500; }
.sec-title { margin: 0 0 14px; }
.page-sub { margin-bottom: 18px; }
.page-sub .sec-title { margin-bottom: 4px; }
.badge.sm { font-size: 10px; padding: 2px 6px; margin-left: 4px; }
.input.sm { height: 34px; font-size: 14px; padding: 0 10px; border-radius: 8px; }
select.input.sm { padding-right: 30px; background-position: calc(100% - 10px) center; }
.suffix { position: relative; }
.suffix span { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.suffix .input { padding-right: 34px; }
.span2 { grid-column: span 2; }
td.wrap { white-space: normal; min-width: 160px; }

/* org tabs */
.tabs { display: flex; gap: 4px; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; margin: -8px 0 24px; padding-bottom: 2px; border-bottom: 1px solid var(--line); }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { flex: none; text-decoration: none; color: var(--muted); font-size: 14px; padding: 10px 12px; border-bottom: 2px solid transparent; margin-bottom: -3px; white-space: nowrap; }
.tabs a:hover { color: var(--text); }
.tabs a.on { color: var(--text); border-bottom-color: var(--text); }

/* integrity checks */
.integrity-score .status-chip { margin-left: auto; align-self: center; }
.answers.checks { margin-top: 18px; }
.answers.checks li > span:last-child { display: inline-flex; gap: 10px; align-items: center; }

/* profit & margin */
.metrics { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.metric .metric-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.metric .kpi-value { margin-top: 12px; }
.mini { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 16px 0 0; padding-top: 14px; border-top: 1px solid var(--line); }
.mini dt { font-size: 11px; color: var(--faint); }
.mini dd { margin: 4px 0 0; font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.margin-line { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; margin-top: 12px; color: var(--muted); }
.margin-line > span:last-child { color: var(--text); text-align: right; }
.q .q-sub { font-size: 12px; color: var(--faint); margin-top: 4px; }
.q .q-phase { margin-top: 8px; }

/* goals */
.goal { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; padding: 14px 0; border-top: 1px solid var(--line); }
.goal:first-of-type { border-top: 0; }
.goal-title { font-weight: 500; }
.goal-meta { font-size: 13px; color: var(--muted); margin-top: 3px; }
.lever { text-transform: uppercase; letter-spacing: .08em; font-size: 11px; color: var(--text); }
.goal-status { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; font-weight: 600; white-space: nowrap; color: var(--text); }
.goal-status.GREY { color: var(--grey); } .goal-status.RED { color: var(--red); } .goal-status.DONE { color: var(--muted); }
.goal-quarters { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 18px; }
.goal-quarters a { text-decoration: none; background: var(--surface-2); border-radius: 10px; padding: 10px 12px; font-size: 13px; color: var(--muted); }
.goal-quarters a.on { box-shadow: inset 0 0 0 1px var(--line-2); color: var(--text); }
.goal-quarters strong { color: var(--text); margin-right: 4px; }
.goals-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.goals-head .meta { margin: 0; }
.goal-row { border-top: 1px solid var(--line); padding: 4px 0 14px; }
.goal-row:first-of-type { border-top: 0; }
.goal-row .goal { border-top: 0; padding-bottom: 8px; }
.goal-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.goal-actions select { width: auto; }
.goal-by { margin-top: 8px; }
.goal-edit, .add-goal { margin-top: 16px; padding: 18px; background: var(--surface-2); border-radius: 12px; }
.add-goal h3 { font-size: 15px; font-weight: 600; margin: 0 0 14px; }
.goal-form { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.audit { list-style: none; margin: 0; padding: 0; }
.audit li { display: grid; grid-template-columns: 130px 1fr; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 14px; }
.audit li:first-child { border-top: 0; }
.audit .changes { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; }

/* builder */
.choices { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 6px; }
.choice { position: relative; display: flex; flex-direction: column; gap: 6px; background: var(--surface-2); border-radius: 12px; padding: 18px; cursor: pointer; box-shadow: inset 0 0 0 1px transparent; margin: 0; color: var(--text); }
.choice.on { box-shadow: inset 0 0 0 1.5px var(--text); }
.choice input[type=radio] { position: absolute; opacity: 0; pointer-events: none; }
.choice-title { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.choice-val { font-size: 28px; font-weight: 600; letter-spacing: -.02em; }
.choice-sub { font-size: 12px; color: var(--faint); line-height: 1.4; }
.choice .input { margin: 2px 0; }
.choice-empty { grid-column: span 2; padding: 18px; background: var(--surface-2); border-radius: 12px; font-size: 14px; }
.ybreak { display: grid; grid-template-columns: 1fr 2.4fr; gap: 16px; margin-top: 8px; }
.ybreak > div, .yb-qs > div { display: flex; flex-direction: column; gap: 4px; }
.yb-year { background: var(--surface-2); border-radius: 12px; padding: 18px; }
.yb-year strong { font-size: 30px; letter-spacing: -.02em; }
.yb-qs { display: grid !important; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 12px; }
.yb-qs > div { background: var(--surface-2); border-radius: 12px; padding: 18px; }
.yb-qs strong { font-size: 20px; }
.qbar { display: flex; gap: 3px; margin-top: 16px; }
.qbar > div { background: var(--surface-2); border-radius: 8px; padding: 10px 12px; display: flex; justify-content: space-between; gap: 6px; font-size: 13px; min-width: 0; }
.qbar span { color: var(--muted); }

/* breakdown */
.breakdown td { padding: 10px 12px; }
.breakdown .qrow td { background: var(--surface-2); border-top: 10px solid var(--surface); }
.breakdown .qrow td:first-child { border-radius: 10px 0 0 10px; } .breakdown .qrow td:last-child { border-radius: 0 10px 10px 0; }
.breakdown .mrow td:first-child { padding-left: 28px; color: var(--muted); }
.breakdown .input.money.sm { width: 120px; text-align: right; }
tr.flag td:first-child { box-shadow: inset 2px 0 0 var(--grey); }

/* import */
.upload { margin-top: 18px; }
.drop { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 30px; border: 1px dashed var(--line-2); border-radius: 14px; cursor: pointer; color: var(--text); margin-bottom: 16px; text-align: center; }
.drop:hover { border-color: rgba(255,255,255,.3); }
.drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.mapping td, .totals td { padding: 10px 12px; vertical-align: top; }
.mapping select { min-width: 190px; }
tr.ignored td { color: var(--faint); }
tr.ignored td .rev { color: var(--faint); }
.actuals .input.money { min-width: 110px; }

@media (max-width: 980px) {
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .choices { grid-template-columns: 1fr 1fr; }
  .ybreak { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .goal-form { grid-template-columns: 1fr; }
  .span2 { grid-column: auto; }
  .goal-quarters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .choices { grid-template-columns: 1fr; }
  .choice-empty { grid-column: auto; }
  .audit li { grid-template-columns: 1fr; gap: 2px; }
  .goal { flex-direction: column; gap: 8px; }
}
@media (max-width: 420px) {
  .metrics { grid-template-columns: 1fr; }
}
h2 .btn, .sec-title .btn { text-transform: none; letter-spacing: 0; color: var(--text); }
.totals th[scope=row] { text-align: left; font-size: 13px; letter-spacing: 0; text-transform: none; color: var(--muted); padding: 10px 14px 10px 0; border-top: 1px solid var(--line); white-space: nowrap; font-weight: 400; }
.totals tr.sum td, .totals tr.sum th { font-weight: 600; color: var(--text); }
.totals td.off { opacity: .35; }
.breakdown .qrow .status-chip { margin-top: 6px; font-size: 11px; }
.actuals td:first-child, .breakdown td:first-child { white-space: nowrap; }

/* ===================== v3: sessions, commitments, trends, leading indicators ===================== */
.block { display: block; }
.status-dot.NONE { background: var(--faint); }
.verdict-word.NONE { color: var(--muted); }
/* leading indicators */
.ind .ind-val { font-size: 30px; font-weight: 600; letter-spacing: -.02em; margin-top: 12px; }
.ind .kpi-sub { color: var(--muted); font-size: 13px; margin-top: 4px; }
.spark { display: grid; grid-template-columns: repeat(12, 1fr); gap: 3px; align-items: end; height: 44px; margin-top: 14px; }
.spark span { position: relative; height: 100%; display: flex; align-items: flex-end; justify-content: center; }
.spark i { position: absolute; bottom: 0; left: 15%; right: 15%; border-radius: 2px; }
.spark i.t { background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line-2); }
.spark i.a { background: var(--text); left: 30%; right: 30%; }
.ind-hero { margin-bottom: 0; }
.ind-hero .verdict-word { margin-top: 10px; }
.ind-edit-head { display: flex; gap: 10px; align-items: center; }
.ind-edit-head .input { flex: 1; font-weight: 600; }
.fill { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 14px 0 6px; }
.fill .input.sm { width: 110px; }
.ind-table .input.sm { width: 96px; text-align: right; }
/* trends */
.trend-head { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 8px; }
.trend-head > div { background: var(--surface-2); border-radius: 12px; padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; }
.trend-head strong { font-size: 28px; letter-spacing: -.02em; }
.trend-title { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 500; margin: 20px 0 10px; }
.trow { display: flex; gap: 8px; align-items: flex-end; overflow-x: auto; padding-bottom: 2px; }
.tcol { flex: 1 0 44px; max-width: 90px; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.tbar { width: 100%; height: 84px; background: var(--surface-2); border-radius: 8px; display: flex; align-items: flex-end; overflow: hidden; }
.tbar i { display: block; width: 100%; border-radius: 6px 6px 0 0; background: var(--grey); }
.tbar i.BLACK { background: #000; box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.75); }
.tbar i.GREY { background: var(--grey); } .tbar i.RED { background: var(--red); }
.tbar.q2 i { background: var(--text); }
.tval { font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; text-align: center; line-height: 1.2; }
.tlab { font-size: 11px; color: var(--faint); }
.trow.own .tcol { gap: 8px; } .trow.own .status-dot { width: 12px; height: 12px; }
/* sessions list + read */
.session-row { display: block; text-decoration: none; color: var(--text); margin-bottom: 12px; }
.session-row:hover { border-color: var(--line-2); }
.sr-top { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.sr-decision { margin-top: 8px; font-size: 15px; }
.sr-meta { display: flex; gap: 16px; margin-top: 12px; flex-wrap: wrap; }
.read h3, .commit h3 { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 500; margin: 22px 0 8px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.read h3:first-child, .commit .eyebrow + h3 { margin-top: 0; }
.read p, .commit p { margin: 0; }
.lead { font-size: 18px; font-weight: 500; line-height: 1.4; }
.plist, .clist { list-style: none; margin: 0; padding: 0; }
.plist li { display: flex; justify-content: space-between; gap: 14px; padding: 10px 0; border-top: 1px solid var(--line); align-items: flex-start; }
.plist li:first-child { border-top: 0; }
.plist li > span:last-child { flex: none; text-align: right; }
.clist li { display: flex; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.clist li:first-child { border-top: 0; }
.cbox { flex: none; width: 18px; height: 18px; border: 1.5px solid var(--line-2); border-radius: 5px; margin-top: 2px; }
/* coach form */
.sform .card { margin-bottom: 12px; }
.meta-card { padding: 16px 18px; }
.mgrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.mgrid .field { margin: 0; }
.cap h3 { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; font-size: 16px; font-weight: 600; margin: 0 0 12px; }
.cap h3 .n { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--surface-2); font-size: 12px; color: var(--muted); }
.cap h3 select.input.sm { width: auto; margin-left: auto; }
.req { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--text); border: 1px solid var(--line-2); border-radius: 6px; padding: 1px 6px; font-weight: 500; }
.ta { height: auto; min-height: 64px; padding: 12px 14px; resize: vertical; line-height: 1.4; font-family: inherit; }
.count { text-align: right; font-size: 11px; color: var(--faint); margin-top: 4px; }
.prio { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 10px; }
.pnum { flex: none; width: 22px; padding-top: 13px; color: var(--muted); font-size: 13px; text-align: center; }
.pfields { flex: 1; display: grid; grid-template-columns: 1fr 210px; gap: 8px; }
.prio .p-del { margin-top: 3px; height: 40px; }
.receipt { padding: 12px 0; border-top: 1px solid var(--line); display: grid; gap: 8px; }
.receipt:first-of-type { border-top: 0; }
.seg.wide { display: flex; width: 100%; }
.seg.wide button { flex: 1; padding: 9px 6px; }
.lever { text-transform: uppercase; letter-spacing: .08em; font-size: 11px; color: var(--text); font-weight: 600; }
@media (max-width: 760px) {
  .mgrid { grid-template-columns: 1fr 1fr; }
  .pfields { grid-template-columns: 1fr; }
  .trend-head strong { font-size: 24px; }
  .ind-table .input.sm { width: 84px; }
}
.ta { color: var(--text); }
.cap h3 select.input.sm { max-width: 60%; }
.ind-edit-head { flex-wrap: wrap; } .ind-edit-head .input { flex: 1 1 100%; }

/* ---------- v4: 400 OS platform shell, modules, directional grey ---------- */
.modbar { padding: 10px var(--pad) 0; max-width: 1240px; margin: 0 auto; }
.modules { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.modules::-webkit-scrollbar { display: none; }
.mod { flex: none; display: inline-flex; align-items: baseline; gap: 10px; padding: 9px 14px; border-radius: 999px; border: 1px solid var(--line-2); text-decoration: none; color: var(--muted); }
.mod .mod-name { font-weight: 650; letter-spacing: .22em; font-size: 12px; text-transform: uppercase; }
.mod .mod-desc { font-size: 12px; color: var(--faint); }
.mod.on { color: var(--bg); background: var(--cream); border-color: var(--cream); }
.mod.on .mod-desc { color: rgba(10,10,11,.6); }
.mod.off { opacity: .55; cursor: not-allowed; border-style: dashed; }
.auth-mods { margin: -26px 0 30px; }
.dirchip { gap: 8px; }
.dir { display: inline-block; font-size: 10.5px; letter-spacing: .1em; font-weight: 700; padding: 2px 7px; border-radius: 999px; border: 1px solid currentColor; line-height: 1.4; }
.dir.dir-up { color: var(--text); }
.dir.dir-down { color: var(--grey); border-style: dashed; }
.verdict-dir { margin-top: -6px; margin-bottom: 14px; font-size: 14px; color: var(--muted); letter-spacing: .02em; }
.verdict-dir.dir-up { color: var(--text); }
.tcol.win .tbar { box-shadow: 0 0 0 1.5px var(--cream); }
.tcol.win .tlab { color: var(--text); }
.trends .trend-head .status-chip { margin-top: 4px; }
@media (max-width: 760px) { .modbar { padding-top: 8px; } .mod { padding: 8px 12px; } .mod .mod-desc { font-size: 11px; } }
.trends .trow { overflow: visible; gap: 6px; }
.trends .tcol { flex: 1 1 0; min-width: 0; max-width: 90px; }
@media (max-width: 420px) { .trends .tval { font-size: 12px; } .trends .tlab { font-size: 10px; } }
