:root {
  --ink: #17221c;
  --muted: #687069;
  --paper: #f1efe6;
  --panel: #f8f6ed;
  --line: #c9c7bc;
  --green: #1f5d45;
  --orange: #e26036;
  --yellow: #d6a52a;
  --red: #a94335;
}

* { box-sizing: border-box; }
html { background: var(--paper); color: var(--ink); }
body { margin: 0; min-height: 100vh; font-family: "Avenir Next", "Noto Sans SC", sans-serif; background: radial-gradient(circle at 75% 0%, rgba(226,96,54,.12), transparent 27rem), var(--paper); }
.grain { position: fixed; inset: 0; pointer-events: none; opacity: .18; z-index: 10; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.12'/%3E%3C/svg%3E"); }
.masthead, main, footer { width: min(1440px, calc(100% - 64px)); margin-inline: auto; }
.masthead { padding: 56px 0 32px; display: flex; justify-content: space-between; align-items: flex-end; border-bottom: 1px solid var(--ink); }
.eyebrow, .kicker { margin: 0 0 12px; color: var(--orange); font: 700 11px/1.2 "SFMono-Regular", Menlo, monospace; letter-spacing: .16em; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 10px; font: 500 clamp(38px, 5vw, 76px)/.95 "Iowan Old Style", Baskerville, "Noto Serif SC", serif; letter-spacing: -.05em; }
h1 span { color: var(--orange); font-style: italic; }
.dek { margin-bottom: 0; color: var(--muted); font-size: 16px; }
.period-box { min-width: 260px; padding-left: 24px; border-left: 1px solid var(--line); display: grid; gap: 5px; }
.period-box span, .period-box small { color: var(--muted); font-size: 11px; letter-spacing: .08em; }
.period-box strong { font: 600 17px "SFMono-Regular", Menlo, monospace; }
main { padding: 28px 0 52px; }
.panel { background: rgba(248,246,237,.86); border: 1px solid var(--line); box-shadow: 0 14px 38px rgba(23,34,28,.06); }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 18px; }
.hero-grid .panel, .lower-grid .panel, .chart-panel { padding: 26px; }
.panel-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.panel-heading h2, .section-title h2, .methodology h2 { margin-bottom: 0; font: 500 29px/1.1 "Iowan Old Style", Baskerville, "Noto Serif SC", serif; }
.badge { padding: 6px 9px; border: 1px solid var(--green); color: var(--green); font: 700 10px "SFMono-Regular", Menlo, monospace; text-transform: uppercase; }
.badge.ghost { border-color: var(--line); color: var(--muted); }
.quota-body { margin-top: 38px; }
.quota-number { display: flex; align-items: baseline; gap: 9px; }
.quota-number strong { font: 500 86px/.8 "Iowan Old Style", Baskerville, serif; letter-spacing: -.07em; }
.quota-number span { color: var(--muted); }
.quota-track { height: 9px; margin: 32px 0 12px; background: #d9d7cc; overflow: hidden; }
.quota-track i { display: block; width: 0; height: 100%; background: var(--orange); transition: width .7s ease; }
.quota-meta { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); }
.quota-meta b { color: var(--ink); }
.notice { margin: 30px 0 0; padding-top: 15px; border-top: 1px dashed var(--line); color: var(--muted); font-size: 12px; line-height: 1.6; }
.money { margin: 42px 0 7px; font: 500 64px/1 "Iowan Old Style", Baskerville, serif; letter-spacing: -.05em; }
.value-card > p { color: var(--muted); font-size: 12px; }
.micro-metrics { margin-top: 36px; padding-top: 18px; border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.micro-metrics div { display: grid; gap: 5px; }
.micro-metrics span, .project-stat span { color: var(--muted); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
.micro-metrics b { font: 600 17px "SFMono-Regular", Menlo, monospace; }
.metric-strip { margin: 18px 0; display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--ink); background: var(--ink); gap: 1px; }
.metric-strip article { padding: 18px 20px; display: grid; gap: 8px; background: var(--paper); }
.metric-strip span { color: var(--muted); font-size: 11px; }
.metric-strip strong { font: 500 30px "Iowan Old Style", Baskerville, serif; }
.metric-strip small { color: var(--muted); font-size: 10px; }
.chart-panel { margin-bottom: 42px; }
.history-panel { margin: -24px 0 42px; padding: 26px; }
.history-intro { max-width: 720px; margin: 10px 0 24px; color: var(--muted); font-size: 12px; line-height: 1.7; }
.cycle-benchmark { display: grid; grid-template-columns: 1.25fr 1fr; gap: 1px; margin-bottom: 24px; border: 1px solid var(--green); background: var(--green); }
.cycle-benchmark > div { display: grid; gap: 7px; padding: 16px; background: var(--panel); }
.cycle-benchmark span { color: var(--green); font: 700 9px "SFMono-Regular", Menlo, monospace; letter-spacing: .08em; text-transform: uppercase; }
.cycle-benchmark b { font: 600 14px "SFMono-Regular", Menlo, monospace; }
.cycle-benchmark small { color: var(--muted); font-size: 9px; }
.cycle-list { border-top: 1px solid var(--ink); }
.cycle-row { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 18px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.cycle-row > div { display: grid; align-content: start; gap: 6px; }
.cycle-row span { color: var(--muted); font-size: 10px; letter-spacing: .06em; text-transform: uppercase; }
.cycle-row b { font: 600 15px "SFMono-Regular", Menlo, monospace; }
.cycle-row small { color: var(--muted); font-size: 10px; }
.cycle-row .projection { font-size: 12px; }
.cycle-state { width: fit-content; padding: 3px 6px; color: var(--green) !important; border: 1px solid var(--green); }
.cycle-state.complete { color: var(--muted) !important; border-color: var(--line); }
.storage-meta { margin: 14px 0 0; color: var(--muted); font: 9px "SFMono-Regular", Menlo, monospace; }
.environment-panel { margin: -24px 0 42px; padding: 26px; }
.environment-metrics { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 22px; border: 1px solid var(--ink); background: var(--ink); gap: 1px; }
.environment-metrics article { display: grid; gap: 6px; padding: 16px; background: var(--panel); }
.environment-metrics span, .environment-row em { color: var(--muted); font-size: 9px; letter-spacing: .06em; text-transform: uppercase; }
.environment-metrics b { font: 600 21px "SFMono-Regular", Menlo, monospace; }
.environment-metrics small, .environment-row small { color: var(--muted); font-size: 9px; line-height: 1.5; }
.environment-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; margin-top: 28px; }
.environment-grid h3 { margin-bottom: 10px; font: 600 13px "SFMono-Regular", Menlo, monospace; }
.environment-list { border-top: 1px solid var(--ink); }
.environment-row { display: grid; grid-template-columns: minmax(0, 1fr) 52px 120px; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.environment-row > div { min-width: 0; display: grid; gap: 4px; }
.environment-row small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.environment-row strong { font: 600 12px "SFMono-Regular", Menlo, monospace; text-align: right; }
.environment-row em { font-style: normal; text-align: right; }
.environment-row.mcp-row { grid-template-columns: minmax(0, 1fr) 52px; }
.environment-findings { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 24px; }
.environment-finding { padding: 14px; border-left: 3px solid var(--line); background: rgba(23,34,28,.035); }
.environment-finding.warn { border-color: var(--red); }
.environment-finding.info { border-color: var(--yellow); }
.environment-finding.ok { border-color: var(--green); }
.environment-finding b { font-size: 11px; }
.environment-finding p { margin: 5px 0 0; color: var(--muted); font-size: 10px; line-height: 1.6; }
.legend { color: var(--muted); font-size: 10px; }
.legend i { display: inline-block; width: 10px; height: 10px; background: var(--green); margin-right: 6px; }
.legend span { margin-left: 12px; }
.pulse-chart { height: 230px; margin-top: 30px; display: flex; align-items: stretch; gap: 12px; border-bottom: 1px solid var(--ink); }
.day { min-width: 35px; flex: 1; display: grid; grid-template-rows: 18px 1fr 18px 18px; gap: 5px; text-align: center; }
.day-value, .day small { font: 9px "SFMono-Regular", Menlo, monospace; color: var(--muted); }
.day b { font-size: 10px; }
.bar-shell { position: relative; overflow: hidden; }
.bar-shell i { position: absolute; inset: auto 0 0; background: var(--green); transition: height .5s ease; }
.section-title { margin-bottom: 18px; display: flex; justify-content: space-between; align-items: end; gap: 24px; }
.section-title > p { max-width: 480px; margin-bottom: 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.portfolio { border-top: 1px solid var(--ink); }
.project-row { display: grid; grid-template-columns: 44px minmax(300px, 1fr) repeat(3, minmax(130px, .42fr)); gap: 16px; align-items: center; padding: 20px 0; border-bottom: 1px solid var(--line); }
.rank { color: var(--orange); font: 11px "SFMono-Regular", Menlo, monospace; }
.project-title { display: flex; gap: 10px; align-items: center; }
.project-title h3 { margin-bottom: 0; font: 600 18px "Iowan Old Style", Baskerville, serif; }
.signal { padding: 3px 6px; font-size: 9px; border: 1px solid var(--green); color: var(--green); }
.signal.warn { border-color: var(--yellow); color: #8c6710; }
.signal.risk { border-color: var(--red); color: var(--red); }
.signal.quiet { border-color: var(--line); color: var(--muted); }
.project-main > p { margin: 6px 0 9px; max-width: 640px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--muted); font-size: 11px; }
.roadmap-line { height: 3px; background: #dad8ce; }
.roadmap-line i { display: block; height: 100%; background: var(--green); }
.project-stat { display: grid; gap: 5px; }
.project-stat b { font: 600 17px "SFMono-Regular", Menlo, monospace; }
.project-stat small { color: var(--muted); font-size: 10px; }
.lower-grid { margin-top: 42px; display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.model-list { margin-top: 25px; }
.model-row { display: grid; grid-template-columns: minmax(145px, .9fr) minmax(100px, 1fr) 70px 70px; gap: 12px; align-items: center; padding: 14px 0; border-top: 1px solid var(--line); }
.model-row > div:first-child { display: grid; gap: 4px; }
.model-row b { font-size: 13px; }
.model-row span { color: var(--muted); font-size: 9px; }
.model-bar { height: 5px; background: #d9d7cc; }
.model-bar i { display: block; height: 100%; background: var(--orange); }
.model-row strong, .model-row em { font: 10px "SFMono-Regular", Menlo, monospace; text-align: right; }
.model-row em { color: var(--muted); font-style: normal; }
.diagnosis-panel { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.diagnosis-panel .kicker { color: #ef8159; }
.diagnosis { display: grid; grid-template-columns: 28px 1fr; gap: 12px; padding: 17px 0; border-top: 1px solid rgba(241,239,230,.2); }
.diagnosis:first-child { margin-top: 25px; }
.diagnosis > span { color: #ef8159; font: 10px "SFMono-Regular", Menlo, monospace; }
.diagnosis b { font-size: 13px; }
.diagnosis p { margin: 6px 0 0; color: #bfc4bf; font-size: 11px; line-height: 1.7; }
.methodology { margin-top: 54px; padding: 32px 0; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); }
.method-grid { margin-top: 28px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 36px; }
.method-grid b { font: 600 14px "SFMono-Regular", Menlo, monospace; }
.method-grid p { margin: 9px 0 0; color: var(--muted); font-size: 12px; line-height: 1.8; }
footer { padding: 0 0 34px; display: flex; justify-content: space-between; color: var(--muted); font: 9px "SFMono-Regular", Menlo, monospace; letter-spacing: .08em; }
.error { position: fixed; right: 24px; bottom: 24px; max-width: 440px; padding: 16px; color: #fff; background: var(--red); box-shadow: 0 10px 30px rgba(0,0,0,.2); font-size: 12px; }
.empty { padding: 30px 0; color: var(--muted); }

@media (max-width: 950px) {
  .masthead, main, footer { width: min(100% - 32px, 760px); }
  .masthead { padding-top: 34px; display: block; }
  .period-box { margin-top: 26px; padding: 16px 0 0; border-left: 0; border-top: 1px solid var(--line); }
  .hero-grid, .lower-grid { grid-template-columns: 1fr; }
  .metric-strip { grid-template-columns: 1fr 1fr; }
  .project-row { grid-template-columns: 32px 1fr 120px; }
  .project-stat:nth-last-child(-n+2) { display: none; }
  .method-grid { grid-template-columns: 1fr; gap: 20px; }
  .cycle-row { grid-template-columns: 1fr 1fr; }
  .cycle-benchmark { grid-template-columns: 1fr; }
  .environment-metrics { grid-template-columns: 1fr 1fr; }
  .environment-grid { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  h1 { font-size: 42px; }
  .hero-grid .panel, .lower-grid .panel, .chart-panel { padding: 20px; }
  .money { font-size: 52px; }
  .quota-number strong { font-size: 72px; }
  .metric-strip { grid-template-columns: 1fr; }
  .pulse-chart { gap: 5px; height: 190px; overflow-x: auto; }
  .day { min-width: 44px; }
  .section-title { display: block; }
  .section-title > p { margin-top: 12px; }
  .project-row { grid-template-columns: 25px 1fr; }
  .project-stat { display: none; }
  .project-title { align-items: flex-start; flex-direction: column; }
  .model-row { grid-template-columns: 1fr 70px; }
  .model-bar, .model-row em { display: none; }
  .micro-metrics { grid-template-columns: 1fr 1fr; }
  .history-panel { margin-top: -24px; }
  .cycle-row { grid-template-columns: 1fr; }
  .environment-panel { margin-top: -24px; }
  .environment-metrics, .environment-findings { grid-template-columns: 1fr; }
  .environment-row { grid-template-columns: 1fr 46px; }
  .environment-row em { display: none; }
}
