/* Achieve — coach-facing app stylesheet.
   Design system ported from the client-approved meeting deck:
   editorial light theme, green-tinted neutrals, three semantic accents
   (teal = validated/high, burnt orange = blocked/attention, gold = medium),
   Space Grotesk display + IBM Plex Sans body + IBM Plex Mono microtype. */

/* ---------- fonts (self-hosted, SIL OFL) ---------- */
@font-face {
  font-family: "Space Grotesk";
  src: url("../fonts/space-grotesk-var.woff2") format("woff2");
  font-weight: 300 700;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Sans";
  src: url("../fonts/ibm-plex-sans-var.woff2") format("woff2");
  font-weight: 100 700;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("../fonts/ibm-plex-mono-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("../fonts/ibm-plex-mono-500.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}

/* ---------- tokens ---------- */
:root {
  color-scheme: light;
  --ink: #10201c;
  --ink-soft: #3c4a46;
  --ink-mute: #6e7b76;
  --paper: #f4f6f4;
  --card: #ffffff;
  --line: #e2e8e5;
  --cool: #0f766e;
  --cool-deep: #0b5249;
  --cool-soft: #d7eae6;
  --warm: #cf5320;
  --warm-deep: #a23e16;
  --warm-soft: #f7e1d5;
  --gold: #a8801f;
  --gold-deep: #7d5f14;
  --gold-soft: #efe6c7;
  --steel: #5c7784;
  --steel-soft: #dee7ea;
  --cover: #0c1a17;
  --cover-2: #102822;
  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body: "IBM Plex Sans", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 600;
  margin: 0 0 10px;
  color: var(--ink);
}

h1 {
  font-size: clamp(26px, 2.6vw, 34px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0;
}

h2 {
  font-size: clamp(20px, 2vw, 24px);
  line-height: 1.1;
  letter-spacing: -0.018em;
}

h3 {
  font-size: 17px;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}

p {
  margin: 0 0 12px;
  color: var(--ink-soft);
}

b,
strong {
  font-weight: 600;
  color: var(--ink);
}

.mono,
.num {
  font-family: var(--font-mono);
}

/* uppercase mono microtype hierarchy */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--warm);
  margin: 0 0 8px;
}

.kicker {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin: 0 0 6px;
}

.lede {
  font-size: 17px;
  line-height: 1.5;
  color: var(--ink);
  max-width: 60ch;
}

.footnote {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--ink-mute);
  line-height: 1.5;
}

/* ---------- app shell ---------- */
.app-shell {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  background: radial-gradient(120% 120% at 80% 10%, var(--cover-2), var(--cover));
  color: #eaf0ee;
  display: flex;
  flex-direction: column;
  padding: 26px 18px 18px;
  position: sticky;
  top: 0;
  height: 100vh;
}

.brand {
  align-items: baseline;
  display: flex;
  gap: 8px;
  margin: 0 8px 30px;
}

.brand-word {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 20px;
  letter-spacing: 0.08em;
  color: #ffffff;
}

.brand-dot {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--warm);
}

.brand-sub {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #7d918b;
  margin: -26px 8px 26px;
}

.nav-list {
  display: grid;
  gap: 2px;
}

.nav-item {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #c2cec9;
  border-left: 2px solid transparent;
  border-radius: 0 8px 8px 0;
  padding: 11px 12px;
  text-decoration: none;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #ffffff;
}

.nav-item.active {
  border-left-color: var(--warm);
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
}

.sidebar-footer {
  margin-top: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 14px;
  display: grid;
  gap: 10px;
}

.sidebar-footer a {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: #c2cec9;
}

.shadow-badge {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #e69a6b;
  border: 1px dashed rgba(230, 154, 107, 0.55);
  border-radius: 8px;
  padding: 8px 10px;
  line-height: 1.5;
}

.content {
  padding: 30px clamp(22px, 4vw, 48px) 60px;
}

.content-inner {
  max-width: 1160px;
  margin: 0 auto;
}

.topbar {
  align-items: flex-end;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin-bottom: 26px;
}

.topbar-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

/* ---------- pills / chips ---------- */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.04em;
  padding: 4px 11px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--ink-soft);
  background: var(--card);
  white-space: nowrap;
}

.pill .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--steel);
  flex: none;
}

.pill.high {
  background: var(--cool-soft);
  border-color: transparent;
  color: var(--cool-deep);
}
.pill.high .dot {
  background: var(--cool);
}

.pill.medium {
  background: var(--gold-soft);
  border-color: transparent;
  color: var(--gold-deep);
}
.pill.medium .dot {
  background: var(--gold);
}

.pill.blocked,
.pill.error {
  background: var(--warm-soft);
  border-color: transparent;
  color: var(--warm-deep);
}
.pill.blocked .dot,
.pill.error .dot {
  background: var(--warm);
}

.pill.low,
.pill.exploratory,
.pill.neutral {
  background: var(--steel-soft);
  border-color: transparent;
  color: var(--ink-soft);
}

.pill.ready {
  background: var(--cool-soft);
  border-color: transparent;
  color: var(--cool-deep);
}
.pill.ready .dot {
  background: var(--cool);
}

.chip {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  background: var(--steel-soft);
  color: var(--ink);
  padding: 2px 8px;
  border-radius: 5px;
  white-space: nowrap;
}

.chip.cool {
  background: var(--cool-soft);
}
.chip.warm {
  background: var(--warm-soft);
}
.chip.gold {
  background: var(--gold-soft);
}

/* ---------- cards / panels ---------- */
.card,
.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 22px;
}

.panel-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  margin-bottom: 18px;
}

.section {
  margin-bottom: 36px;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

/* stat row — big real numbers */
.statrow {
  display: flex;
  gap: clamp(14px, 2vw, 30px);
  flex-wrap: wrap;
}

.stat {
  flex: 1;
  min-width: 130px;
}

.stat .big {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(28px, 3vw, 40px);
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.stat.cool .big {
  color: var(--cool);
}
.stat.warm .big {
  color: var(--warm);
}
.stat.steel .big {
  color: var(--steel);
}
.stat.gold .big {
  color: var(--gold);
}

.stat .lab {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-top: 8px;
}

/* ---------- buttons ---------- */
.button {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 500;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--card);
  color: var(--ink);
  padding: 10px 16px;
  text-decoration: none;
  cursor: pointer;
}

.button:hover {
  border-color: var(--ink-mute);
}

.button.primary {
  background: var(--cool);
  border-color: var(--cool);
  color: #ffffff;
}

.button.primary:hover {
  background: var(--cool-deep);
  border-color: var(--cool-deep);
}

.button[disabled],
.button.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* ---------- tables ---------- */
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

th,
td {
  padding: 9px 12px;
  text-align: right;
  border-bottom: 1px solid var(--line);
}

th:first-child,
td:first-child {
  text-align: left;
}

th.text,
td.text {
  text-align: left;
  vertical-align: top;
}

thead th {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-mute);
  font-weight: 500;
  border-bottom: 1.5px solid var(--ink);
}

td.num {
  font-family: var(--font-mono);
  font-size: 13px;
}

.table-scroll {
  max-width: 100%;
  overflow-x: auto;
}

.table-scroll:focus-visible {
  outline: 2px solid var(--cool);
  outline-offset: 3px;
}

.table-scroll table {
  min-width: 600px;
}

.table-scroll th,
.table-scroll td.num,
.table-scroll .pill,
.table-scroll .chip {
  white-space: nowrap;
  overflow-wrap: normal;
}

tr.hl td {
  background: var(--gold-soft);
}

tr.hl td:first-child {
  font-weight: 600;
  color: var(--ink);
}

.delta-down {
  color: var(--warm-deep);
  font-family: var(--font-mono);
}

.delta-up {
  color: var(--cool-deep);
  font-family: var(--font-mono);
}

/* ---------- coach card (the product's core unit) ---------- */
.coachcard {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: clamp(20px, 2.2vw, 30px);
  box-shadow: 0 14px 40px -22px rgba(16, 32, 28, 0.4);
}

.coachcard .top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 6px;
}

.coachcard .top > div {
  flex: 1 1 240px;
  min-width: 0;
}

.coachcard .top > .pill {
  flex: none;
  white-space: nowrap;
}

.coachcard .ey {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cool);
  margin: 0 0 5px;
}

.coachcard h3 {
  margin: 0;
  font-size: clamp(18px, 1.9vw, 23px);
}

.coachcard .field {
  margin-top: 14px;
}

.coachcard .field .fl {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: 3px;
}

.coachcard .field p {
  margin: 0;
  font-size: 14.5px;
}

.coachcard table {
  margin-top: 6px;
}

.card-stack {
  display: grid;
  gap: 16px;
}

/* blocked / error state cards */
.coachcard.blocked,
.coachcard.withheld,
.state-card.blocked {
  border-color: rgba(207, 83, 32, 0.35);
}

.state-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 22px;
}

.state-card.error {
  border-color: rgba(180, 35, 24, 0.4);
  background: #fdf7f4;
}

.state-card .remedy {
  font-family: var(--font-mono);
  font-size: 12px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  display: inline-block;
  margin-top: 8px;
}

.empty-state {
  border: 1px dashed var(--line);
  border-radius: 12px;
  color: var(--ink-mute);
  padding: 18px;
  font-size: 14px;
}

/* ---------- translation chain ---------- */
.chain {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-soft);
}

.chain .node {
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--card);
}

.chain .node.k {
  background: var(--cool-soft);
  border-color: transparent;
  color: var(--cool-deep);
}

.chain .node small {
  display: block;
  color: var(--ink-mute);
  font-size: 10px;
  letter-spacing: 0.06em;
}

.chain .arr {
  color: var(--ink-mute);
}

/* ---------- charts ---------- */
.chartframe {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  overflow: hidden;
}

.chartframe svg {
  display: block;
  width: 100%;
  height: auto;
}

figure {
  margin: 0;
}

figcaption {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-mute);
  margin-top: 9px;
  line-height: 1.5;
}

.chart-plot {
  fill: #fbfcfb;
  stroke: var(--line);
}

.chart-gridline {
  stroke: var(--line);
  stroke-width: 1;
}

.chart-line {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.25;
}

.chart-point {
  stroke: #ffffff;
  stroke-width: 1;
}

.chart-axis-label {
  fill: var(--ink-mute);
  font-family: var(--font-mono);
  font-size: 11px;
  text-anchor: end;
}

.chart-axis-label--x {
  text-anchor: middle;
}

.chart-band {
  fill: var(--gold-soft);
  opacity: 0.55;
}

.chart-bar {
  fill: var(--steel-soft);
  stroke: var(--steel);
  stroke-width: 1;
}

.chart-bar.hl {
  fill: var(--gold-soft);
  stroke: var(--gold);
}

.chart-bar--dim {
  fill: var(--steel-soft);
  opacity: 0.55;
  stroke: var(--steel);
  stroke-dasharray: 4 3;
}

.chart-slot-untested {
  fill: none;
  stroke: var(--ink-mute);
  stroke-dasharray: 5 4;
  stroke-width: 1.2;
}

.chart-errorbar {
  stroke: var(--ink-soft);
  stroke-width: 1.25;
}

.chart-n-label {
  fill: var(--ink-mute);
  font-family: var(--font-mono);
  font-size: 10px;
  text-anchor: middle;
}

.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin-top: 8px;
}

.chart-legend span {
  align-items: center;
  color: var(--ink-mute);
  display: inline-flex;
  font-family: var(--font-mono);
  font-size: 12px;
  gap: 6px;
}

.chart-legend i {
  border-radius: 999px;
  display: inline-block;
  height: 9px;
  width: 9px;
}

/* ---------- insight stub (AI layer — visually distinct, non-authoritative) ---------- */
.insight-block {
  border: 1px dashed var(--line);
  border-radius: 13px;
  background: var(--paper);
  color: var(--ink-mute);
  padding: 14px 16px;
  font-size: 13.5px;
}

.insight-block .fl {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 4px;
}

/* ---------- definition / payload ---------- */
.definition-list {
  display: grid;
  gap: 6px 14px;
  grid-template-columns: minmax(120px, max-content) 1fr;
  margin: 0;
}

.definition-list dt {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-mute);
}

.definition-list dd {
  margin: 0;
  font-size: 14px;
}

.payload-block {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  overflow-x: auto;
  padding: 12px;
  white-space: pre-wrap;
}

/* ---------- lists ---------- */
ul.clean {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
}

ul.clean li {
  position: relative;
  padding-left: 22px;
  margin-bottom: 10px;
  color: var(--ink-soft);
}

ul.clean li::before {
  content: "";
  position: absolute;
  left: 1px;
  top: 0.55em;
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: var(--cool);
}

ul.clean.warm li::before {
  background: var(--warm);
}

.row-list {
  display: grid;
  gap: 8px;
}

.row-link {
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--card);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 13px 16px;
  text-decoration: none;
}

.row-link:hover {
  border-color: var(--ink-mute);
}

/* ---------- dashboard hero ---------- */
.hero {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  display: grid;
  gap: 20px;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  padding: 26px;
  margin-bottom: 18px;
}

.hero h2 {
  font-size: clamp(22px, 2.4vw, 30px);
  max-width: 26ch;
  margin-bottom: 8px;
}

.hero p {
  max-width: 62ch;
  margin-bottom: 0;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

/* ---------- player grid ---------- */
.player-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}

.player-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 18px;
  text-decoration: none;
  display: block;
}

.player-card:hover {
  border-color: var(--ink-mute);
}

.player-card .pid {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 24px;
  letter-spacing: -0.01em;
}

.player-card .meta {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-mute);
  margin-top: 4px;
}

.player-card table {
  margin-top: 10px;
  font-size: 12.5px;
}

.player-card td,
.player-card th {
  padding: 5px 6px;
}

/* ---------- sign-in ---------- */
.signin-body {
  align-items: center;
  display: flex;
  justify-content: center;
  min-height: 100vh;
  background: radial-gradient(120% 120% at 80% 10%, var(--cover-2), var(--cover));
  padding: 24px;
}

.signin-panel {
  background: var(--paper);
  border-radius: 18px;
  padding: clamp(26px, 4vw, 40px);
  width: min(560px, 100%);
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.6);
}

.signin-brand {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 18px;
}

.signin-brand .brand-word {
  color: var(--ink);
  font-size: 26px;
}

.signin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0;
}

.signin-form {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 22px 0 4px;
}

.signin-form label {
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
}

.signin-form input {
  background: var(--paper);
  border: 1px solid rgba(0, 0, 0, 0.28);
  border-radius: 8px;
  color: var(--ink);
  font: inherit;
  margin-bottom: 8px;
  padding: 10px 12px;
  width: 100%;
}

.signin-form input:focus-visible {
  border-color: var(--ink);
  outline: 2px solid var(--ink);
  outline-offset: 1px;
}

.signin-form button {
  align-self: flex-start;
  margin-top: 6px;
}

.signin-error {
  background: rgba(180, 30, 30, 0.08);
  border-left: 3px solid rgba(180, 30, 30, 0.85);
  border-radius: 4px;
  color: var(--ink);
  font-size: 14px;
  margin: 14px 0 0;
  padding: 10px 12px;
}

/* ---------- rebuild additions ---------- */
.cover-h1 {
  font-size: clamp(32px, 4.5vw, 52px);
}

.report-header {
  display: grid;
  gap: 10px;
}

.chart-heading {
  display: block;
  margin-bottom: 10px;
}

.scope-banner {
  background: var(--card);
  border: 1px solid rgba(207, 83, 32, 0.28);
  border-radius: 13px;
  color: var(--ink-soft);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  padding: 13px 16px;
}

.usage-caveat {
  background: var(--warm-soft);
  border-left: 3px solid var(--warm);
  border-radius: 8px;
  color: var(--warm-deep);
  margin-top: 14px;
  padding: 12px 16px;
}

.usage-caveat .fl {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin: 0 0 4px;
}

.usage-caveat p:last-child {
  color: var(--ink-soft);
  font-size: 13.5px;
  margin: 0;
}

.layer-tabs,
.review-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.evidence-table {
  margin-top: 10px;
}

.compareframe {
  max-width: 520px;
}

.bar-compare text,
.hypothesis-svg text,
.metric-model-svg text {
  fill: var(--ink-soft);
  font-family: var(--font-mono);
  font-size: 12px;
}

.compare-baseline {
  stroke: var(--line);
  stroke-width: 1.5;
}

.compare-label {
  text-anchor: start;
}

.compare-value {
  fill: var(--ink);
  font-family: var(--font-display);
  font-weight: 600;
}

.compare-bar.steel {
  fill: var(--steel);
}

.compare-bar.warm {
  fill: var(--warm);
}

.hypothesis-grid {
  grid-template-columns: minmax(280px, 0.8fr) minmax(360px, 1.2fr);
}

.hypothesis-band {
  fill: var(--gold-soft);
  opacity: 0.8;
}

.hypothesis-curve {
  fill: none;
  stroke: var(--gold);
  stroke-linecap: round;
  stroke-width: 4;
}

.metric-model-svg .layer,
.layer-stack .layer {
  fill: var(--card);
  stroke: var(--line);
}

.metric-model-svg .jewel,
.layer-stack .jewel {
  fill: var(--cool-soft);
  stroke: var(--cool);
}

.metric-model-svg .now,
.layer-stack .now {
  fill: var(--gold-soft);
  stroke: var(--gold);
}

.layer-stack {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  margin-bottom: 14px;
}

.layer-stack .layer {
  align-items: center;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 9px;
  display: flex;
  font-family: var(--font-mono);
  font-size: 12px;
  gap: 10px;
  padding: 11px 12px;
  text-transform: uppercase;
}

.layer-stack .layer span {
  color: var(--ink-mute);
}

.layer-stack .layer.jewel {
  background: var(--cool-soft);
  border-color: transparent;
  color: var(--cool-deep);
}

.layer-stack .layer.ai {
  border-style: dashed;
}

.phases {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(5, minmax(100px, 1fr));
}

.phase {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 9px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  padding: 9px 10px;
  text-align: center;
  text-transform: uppercase;
}

.phase.now {
  background: var(--gold-soft);
  border-color: transparent;
  color: var(--gold-deep);
}

.dark-panel {
  background: var(--cover);
  border-color: var(--cover-2);
}

.dark-panel h2,
.dark-panel p {
  color: #eaf0ee;
}

.cover-spark {
  fill: none;
  left: 50%;
  opacity: 0.16;
  pointer-events: none;
  position: fixed;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 4;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(900px, 92vw);
}

.cover-spark-a {
  stroke: #5fc9bd;
}

.cover-spark-b {
  stroke: #e69a6b;
}

.chart-band-label {
  font-size: 9px;
}

/* ---------- status ---------- */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  background: var(--cool-soft);
  border-radius: 999px;
  color: var(--cool-deep);
  padding: 5px 12px;
}

/* ---------- responsive ---------- */
@media (max-width: 1020px) {
  .hero {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .hero-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 780px) {
  .app-shell {
    grid-template-columns: minmax(0, 1fr);
  }

  .sidebar,
  .content,
  .content-inner {
    min-width: 0;
  }

  .section-head {
    flex-wrap: wrap;
  }

  .pill,
  .chip {
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .sidebar {
    position: static;
    height: auto;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .topbar-meta {
    justify-content: flex-start;
  }

  .content {
    padding: 20px 16px 48px;
  }
}

/* ---------- freshness comparison chart: begin ---------- */
.freshness-comparison {
  width: 100%;
  min-width: 0;
  max-width: 800px;
  margin: 0;
  padding: 14px;
  background: var(--card, #ffffff);
  border: 1px solid var(--line, #e2e8e5);
  border-radius: 12px;
}

.freshness-comparison-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-bottom: 8px;
}

.freshness-comparison-heading h4 {
  margin: 0;
  font-size: 14px;
}

.freshness-scope-legend,
.freshness-scope-legend span {
  display: flex;
  align-items: center;
  gap: 7px;
}

.freshness-scope-legend {
  flex-wrap: wrap;
  gap: 6px 15px;
  color: var(--ink-soft, #3c4a46);
  font-size: 12px;
}

.freshness-legend-icon {
  display: block;
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
}

.freshness-chart-scroll,
.freshness-values-scroll {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-x: contain;
}

.freshness-chart-scroll:focus-visible,
.freshness-values-scroll:focus-visible {
  outline: 2px solid var(--cool, #0f766e);
  outline-offset: 2px;
}

.freshness-chart {
  display: block;
  width: 100%;
  min-width: 600px;
  height: auto;
}

.freshness-panel-title {
  font-family: var(--font-display, system-ui, sans-serif);
  font-size: 15px;
  font-weight: 600;
  fill: var(--ink, #10201c);
}

.freshness-panel-unit,
.freshness-tick,
.freshness-player-label,
.freshness-missing,
.freshness-dot-label {
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 11px;
  fill: var(--ink-soft, #3c4a46);
}

.freshness-player-label {
  font-size: 13px;
  font-weight: 500;
  fill: var(--ink, #10201c);
  text-anchor: end;
}

.freshness-tick,
.freshness-missing {
  text-anchor: middle;
}

.freshness-plot {
  fill: var(--card, #ffffff);
  stroke: var(--line, #e2e8e5);
}

.freshness-band--orange,
.freshness-band--high_negative {
  fill: var(--warm-soft, #f7e1d5);
}

.freshness-band--yellow,
.freshness-band--below_target {
  fill: var(--gold-soft, #efe6c7);
}

.freshness-band--target_range {
  fill: var(--cool-soft, #d7eae6);
}

.freshness-band--above_target,
.freshness-band--high_positive {
  fill: var(--steel-soft, #dee7ea);
}

.freshness-band--above_target {
  opacity: 0.45;
}

.freshness-band--high_positive {
  opacity: 0.8;
}

.freshness-gridline,
.freshness-row-line {
  stroke: var(--line, #e2e8e5);
  stroke-width: 0.8;
}

.freshness-reference-line {
  stroke: var(--ink-mute, #6e7b76);
  stroke-width: 0.7;
  stroke-dasharray: 3 4;
  opacity: 0.6;
}

.freshness-zero {
  stroke: var(--ink-soft, #3c4a46);
  stroke-width: 1.2;
  opacity: 0.65;
}

.freshness-marker {
  stroke: var(--card, #ffffff);
  stroke-width: 1.5;
}

.freshness-marker--cumulative {
  fill: var(--cool-deep, #0b5249);
}

.freshness-marker--on_ice {
  fill: var(--steel, #5c7784);
}

.freshness-mark:focus {
  outline: none;
}

.freshness-mark:focus .freshness-marker,
.freshness-mark:hover .freshness-marker {
  stroke: var(--ink, #10201c);
  stroke-width: 2;
}

.freshness-dot-label {
  opacity: 0;
  font-weight: 500;
  fill: var(--ink, #10201c);
  stroke: var(--card, #ffffff);
  stroke-width: 4;
  stroke-linejoin: round;
  paint-order: stroke fill;
  pointer-events: none;
}

.freshness-mark:hover .freshness-dot-label,
.freshness-mark:focus .freshness-dot-label {
  opacity: 1;
}

.freshness-reference-legend {
  display: grid;
  gap: 4px;
  color: var(--ink-soft, #3c4a46);
  font-size: 11px;
  line-height: 1.4;
}

.freshness-comparison figcaption {
  font-family: var(--font-body, system-ui, sans-serif);
  font-size: 11px;
  line-height: 1.45;
}

.freshness-values {
  margin-top: 10px;
  font-size: 12px;
}

.freshness-values summary {
  color: var(--cool-deep, #0b5249);
  cursor: pointer;
}

.freshness-values table {
  min-width: 560px;
  margin: 10px 0;
}

.freshness-values caption {
  padding: 6px 0;
  color: var(--ink-soft, #3c4a46);
  text-align: left;
  font-size: 12px;
}

.freshness-values th,
.freshness-values td {
  font-size: 11px;
}

.freshness-reference-note {
  margin: 5px 0 0;
  color: var(--ink-soft, #3c4a46);
  font-size: 11px;
}

.freshness-comparison-empty {
  color: var(--ink-mute, #6e7b76);
  font-size: 13px;
}

@media print {
  .freshness-chart {
    min-width: 0;
  }

  .freshness-chart-scroll {
    overflow: visible;
  }

  .freshness-comparison {
    break-inside: avoid;
  }

  .freshness-values {
    display: none;
  }
}
/* ---------- freshness comparison chart: end ---------- */

/* ---------- team load overview and sessions by day (P1-01, P1-02) ---------- */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.muted {
  color: var(--ink-mute);
}
.team-load-scope + .team-load-scope {
  margin-top: 28px;
}
.sessions-table .session-day-head th {
  padding-top: 14px;
  background: var(--paper);
  text-align: left;
}
.session-day-total {
  display: block;
  font-weight: 400;
  color: var(--ink-soft);
}
.session-bar-cell {
  width: 30%;
  min-width: 80px;
}
.session-bar {
  display: block;
  height: 10px;
  border-radius: 2px;
  background: var(--steel);
}
/* ---------- team load overview and sessions by day: end ---------- */
