:root {
  --navy: #0F3B63;
  --orange: #C76135;
  --support-teal: #417684;
  --logo-teal: #5CA2B2;
  --tint: #EAF4FD;
  --warm-white: #F8F5F2;
  --ink: #14231F;
  --ink-2: #4A5C56;
  --line: #DBD6CE;
  --panel: #DCE8F0;
  --white: #FFFFFF;
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--warm-white); color: var(--ink);
  font-family: Montserrat, Arial, sans-serif; font-size: 15px; line-height: 1.6;
}
h1, h2, h3 { font-family: "Source Serif 4", Georgia, serif; color: var(--navy); font-weight: 600; line-height: 1.2; margin: 0; }
h1 { font-size: clamp(26px, 4vw, 38px); }
h2 { font-size: 24px; margin-bottom: 12px; }
h3 { font-size: 17px; margin-bottom: 8px; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 420px; padding-top: 48px; }
@media (min-width: 768px) { .wrap { padding: 0 32px; } }

.bar { background: var(--navy); color: var(--white); }
.bar-in { display: flex; align-items: center; justify-content: space-between; min-height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: "Source Serif 4", Georgia, serif; font-size: 18px; font-weight: 600; }
.brand .dot { width: 14px; height: 14px; border-radius: 50%; background: var(--logo-teal); display: inline-block; }
.muted-on-dark { font-family: Montserrat, Arial, sans-serif; font-size: 12px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.8; margin-left: 6px; }

.head { display: flex; flex-wrap: wrap; gap: 20px; justify-content: space-between; align-items: flex-end; padding: 32px 0 20px; }
.eyebrow { font-size: 11px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--support-teal); margin-bottom: 6px; }
.muted { color: var(--ink-2); }
.range { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
select, input[type=date], input[type=email], input[type=password] {
  font: inherit; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--white); color: var(--ink);
}
label { display: block; font-weight: 500; margin-bottom: 14px; }
label input { display: block; width: 100%; margin-top: 6px; }

button { font: inherit; cursor: pointer; border-radius: 10px; min-height: 44px; padding: 0 20px; font-weight: 600; }
.primary { background: var(--orange); color: var(--white); border: 0; }
.primary:hover { filter: brightness(0.94); }
.ghost { background: transparent; color: var(--white); border: 1px solid rgba(255,255,255,0.5); min-height: 36px; padding: 0 14px; }

.grid { display: grid; gap: 14px; grid-template-columns: 1fr; margin-bottom: 28px; }
@media (min-width: 640px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .grid { grid-template-columns: repeat(3, 1fr); } }
.tile, .card { background: var(--white); border: 1px solid var(--line); border-radius: 12px; padding: 20px; }
.tile .value { font-family: "Source Serif 4", Georgia, serif; font-size: 36px; color: var(--navy); font-weight: 600; line-height: 1.1; }
.tile .value.empty { font-family: Montserrat, Arial, sans-serif; font-size: 15px; font-weight: 500; color: var(--ink-2); padding: 10px 0; }
.tile .help { margin: 10px 0 0; font-size: 12px; color: var(--ink-2); }
.delta { font-size: 13px; font-weight: 600; margin-top: 6px; }
.delta.up { color: var(--support-teal); }
.delta.down { color: var(--navy); }
.stale { margin-top: 8px; font-size: 12px; font-weight: 600; color: var(--navy); background: var(--tint); border-radius: 8px; padding: 6px 10px; }
.error { color: var(--navy); background: var(--tint); border-radius: 8px; padding: 8px 12px; font-weight: 500; }

.card { margin-bottom: 40px; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); }
th { font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-2); }

.num { text-align: right; font-variant-numeric: tabular-nums; }
.small { font-size: 12px; margin: 2px 0 0; }
.spark { display: block; }
.card p { margin: 0 0 12px; }

/* Episode tracker */
.nav { display: flex; gap: 18px; margin-left: auto; margin-right: 18px; }
.nav a { color: var(--white); text-decoration: none; font-weight: 600; font-size: 14px; opacity: 0.9; }
.nav a:hover { opacity: 1; text-decoration: underline; }
.wrap.wide { max-width: 1500px; }
.ep-card { display: block; text-decoration: none; color: inherit; margin-bottom: 0; }
.ep-card:hover { border-color: var(--support-teal); }
.bar-track { background: var(--panel); border-radius: 999px; height: 10px; margin: 10px 0; overflow: hidden; }
.bar-track.big { height: 14px; max-width: 560px; }
.bar-fill { background: var(--support-teal); height: 100%; border-radius: 999px; transition: width .25s; }
.ghost-dark { color: var(--navy); border: 1px solid var(--line); border-radius: 10px; padding: 9px 14px; text-decoration: none; font-weight: 600; font-size: 13px; background: var(--white); }
.sheet table { min-width: 1100px; }
.sheet td { vertical-align: middle; }
.sheet input[data-f], .sheet select[data-f] { width: 100%; min-width: 90px; padding: 7px 9px; font-size: 13px; }
.sheet td.stepname { min-width: 240px; }
.chip { font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; background: var(--tint); color: var(--navy); border-radius: 999px; padding: 2px 8px; margin-left: 4px; white-space: nowrap; }
.nowrap { white-space: nowrap; }
tr.s-done td:first-child { border-left: 4px solid var(--support-teal); }
tr.s-done .stepname strong, tr.s-skipped .stepname strong { color: var(--ink-2); font-weight: 500; }
tr.s-skipped { opacity: .6; }
tr.s-in_progress td:first-child { border-left: 4px solid var(--logo-teal); }
tr.s-needs_person td:first-child { border-left: 4px solid var(--orange); background: #FBF1EB; }
tr.s-blocked td:first-child { border-left: 4px solid var(--navy); background: var(--tint); }
.sheet input.bad { border-color: var(--orange); }
.add { display: grid; gap: 12px; grid-template-columns: 1fr; max-width: 560px; }
.saved { color: var(--support-teal); font-weight: 600; }
