:root {
  color-scheme: dark;
  --bg: #071016;
  --panel: #0d1820;
  --panel-2: #111f29;
  --line: #243640;
  --text: #edf5f3;
  --muted: #91a7ae;
  --accent: #77e0bf;
  --accent-2: #3db99a;
  --danger: #ff6f73;
  --warning: #f5c96a;
  --success: #65d6a8;
  --radius: 18px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background:
    radial-gradient(circle at 80% 0%, rgba(55, 165, 142, .12), transparent 30rem),
    linear-gradient(180deg, #071016 0%, #09141b 100%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
}

.topbar {
  height: 72px;
  padding: 0 max(24px, calc((100vw - 1240px) / 2));
  border-bottom: 1px solid rgba(255,255,255,.08);
  background: rgba(7,16,22,.88);
  backdrop-filter: blur(18px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 10;
}
.brand { color: var(--text); display: flex; align-items: center; gap: 12px; font-weight: 800; letter-spacing: .08em; text-decoration: none; }
.brand small { color: var(--accent); font-size: .58em; margin-left: 4px; }
.brand-mark { width: 34px; height: 34px; border: 1px solid var(--accent); border-radius: 9px; display: grid; place-items: center; color: var(--accent); }
.environment { color: var(--muted); font-size: 11px; letter-spacing: .14em; }

main { width: min(1240px, calc(100% - 32px)); margin: 0 auto; padding: 56px 0 80px; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(36px, 5vw, 62px); line-height: 1.02; letter-spacing: -.045em; max-width: 730px; margin-bottom: 18px; }
h2 { font-size: clamp(24px, 3vw, 34px); letter-spacing: -.025em; margin-bottom: 12px; }
h3 { font-size: 17px; margin-bottom: 4px; }
.eyebrow { color: var(--accent); font-size: 11px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; margin-bottom: 12px; }
.lede { color: var(--muted); max-width: 680px; font-size: 17px; }
.loader-panel { display: grid; grid-template-columns: 1.25fr .75fr; gap: 56px; align-items: end; margin-bottom: 40px; }
form { padding: 22px; background: rgba(13,24,32,.78); border: 1px solid var(--line); border-radius: var(--radius); }
label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.input-row { display: flex; gap: 8px; }
input { min-width: 0; flex: 1; color: var(--text); background: #071016; border: 1px solid #314751; border-radius: 10px; padding: 12px 13px; outline: none; }
input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(119,224,191,.12); }
button { border: 0; border-radius: 10px; background: var(--accent); color: #062018; padding: 12px 16px; font-weight: 800; cursor: pointer; white-space: nowrap; }
button:hover { background: #95e9cf; }
.hint { color: var(--muted); font-size: 11px; margin: 10px 0 0; }
code { color: #b9d8d1; }
.message { padding: 18px; border: 1px solid var(--line); border-radius: 12px; color: var(--muted); background: var(--panel); }
.message.error { border-color: rgba(255,111,115,.4); color: #ffacaf; }

.hero-card, .section { border: 1px solid var(--line); background: rgba(13,24,32,.88); border-radius: var(--radius); }
.hero-card { padding: clamp(24px, 4vw, 48px); display: flex; justify-content: space-between; gap: 40px; align-items: center; }
.hero-card #objective { color: var(--muted); max-width: 780px; font-size: 16px; }
.meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.meta span, .model { padding: 6px 10px; border-radius: 99px; background: #13242d; color: #b7c8cc; font-size: 11px; border: 1px solid #28404a; }
.verdict-wrap { min-width: 145px; text-align: center; }
.verdict { display: grid; place-items: center; width: 116px; height: 116px; margin: auto; border-radius: 50%; border: 2px solid var(--danger); color: var(--danger); background: rgba(255,111,115,.08); font-size: 25px; font-weight: 900; letter-spacing: .06em; }
.verdict.pass { border-color: var(--success); color: var(--success); background: rgba(101,214,168,.08); }
.status { display: block; color: var(--muted); font-size: 11px; margin-top: 10px; text-transform: uppercase; letter-spacing: .1em; }

.metric-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; margin: 14px 0; }
.metric { padding: 18px; border-radius: 14px; background: var(--panel-2); border: 1px solid var(--line); }
.metric strong { display: block; font-size: 25px; line-height: 1.1; margin-bottom: 6px; }
.metric span { color: var(--muted); font-size: 11px; }
.section { padding: clamp(22px, 3vw, 36px); margin-top: 14px; }
.section-heading { display: flex; align-items: start; justify-content: space-between; gap: 20px; }
blockquote { margin: 10px 0 0; padding: 4px 0 4px 22px; border-left: 2px solid var(--accent); color: #c9d9da; font-size: clamp(17px, 2vw, 21px); }

.plot-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 20px; }
.plot-card { min-width: 0; padding: 20px; border: 1px solid var(--line); border-radius: 14px; background: #09141b; }
.plot-card p { color: var(--muted); font-size: 12px; }
.plot { width: 100%; min-height: 300px; margin-top: 14px; overflow: hidden; }
.plot svg { width: 100%; height: 300px; display: block; }
.axis { stroke: #35505b; stroke-width: 1; }
.grid-line { stroke: #1c3039; stroke-width: 1; }
.actual-line { fill: none; stroke: var(--accent); stroke-width: 2.4; vector-effect: non-scaling-stroke; }
.planned-line { fill: none; stroke: var(--warning); stroke-width: 1.6; stroke-dasharray: 6 5; vector-effect: non-scaling-stroke; }
.plot-label { fill: #78919a; font-size: 10px; }
.legend { color: var(--muted); font-size: 11px; white-space: nowrap; }
.actual-dot, .planned-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin: 0 5px 0 12px; background: var(--accent); }
.planned-dot { background: var(--warning); }

.focus-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 20px; }
.focus-card { padding: 20px; border: 1px solid var(--line); background: var(--panel-2); border-radius: 14px; }
.priority { color: var(--warning); font-size: 10px; font-weight: 900; letter-spacing: .13em; text-transform: uppercase; }
.focus-card p { color: #b9cbce; margin-bottom: 0; }
.split-section { display: grid; grid-template-columns: 1fr 1fr; gap: 34px; }
.finding-list { display: grid; gap: 10px; margin-top: 18px; }
.finding { border: 1px solid var(--line); background: var(--panel-2); border-radius: 13px; padding: 18px; }
.finding p { color: #b5c6ca; font-size: 13px; }
.evidence-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 14px; }
.evidence-grid div { background: #0a171e; border-radius: 8px; padding: 8px; min-width: 0; }
.evidence-grid small { display: block; color: var(--muted); font-size: 9px; text-transform: uppercase; letter-spacing: .06em; }
.evidence-grid strong { display: block; margin-top: 2px; font-size: 12px; overflow-wrap: anywhere; }
.issue-id { color: #67818a; font: 9px ui-monospace, SFMono-Regular, Menlo, monospace; overflow-wrap: anywhere; }
.success-text { color: var(--success); }
.danger-text { color: var(--danger); }
footer { color: #617780; text-align: center; border-top: 1px solid rgba(255,255,255,.06); padding: 28px; font-size: 11px; }

@media (max-width: 950px) {
  .loader-panel, .plot-grid, .split-section { grid-template-columns: 1fr; }
  .metric-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 600px) {
  main { width: min(100% - 20px, 1240px); padding-top: 32px; }
  .topbar { padding: 0 14px; }
  .environment { display: none; }
  .input-row, .hero-card { flex-direction: column; align-items: stretch; }
  .verdict-wrap { align-self: center; }
  .metric-grid, .focus-grid { grid-template-columns: 1fr 1fr; }
  .section-heading { display: block; }
  .model { display: inline-block; margin-bottom: 12px; }
  .evidence-grid { grid-template-columns: 1fr 1fr; }
}
