:root {
  color-scheme: light;
  --ink: #203b38;
  --muted: #607571;
  --accent: #14776d;
  --accent-deep: #0c5c54;
  --paper: #f5f7f5;
  --surface: #fff;
  --line: #dce5e1;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-size: 15px;
}
* { box-sizing: border-box; }
body { margin: 0; }
a { color: var(--accent-deep); text-underline-offset: 3px; }
button, input, select, textarea { font: inherit; }
button, .button {
  min-height: 42px;
  padding: 10px 17px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
button:hover, .button:hover { background: #edf3ef; }
button:disabled { opacity: .55; cursor: default; }
.primary { background: var(--accent); border-color: var(--accent); color: white; font-weight: 600; }
.primary:hover { background: var(--accent-deep); }
.quiet { background: transparent; }
:focus-visible { outline: 3px solid #208d80; outline-offset: 4px; }
[hidden] { display: none !important; }
h1, h2, h3, h4, p { margin: 0; }
h1 { font-size: clamp(32px, 4vw, 44px); line-height: 1.12; letter-spacing: -.045em; font-weight: 650; }
h2 { font-size: 21px; letter-spacing: -.025em; font-weight: 650; }
h3 { font-size: 17px; font-weight: 650; }
h4 { margin-top: 20px; font-size: 14px; }
p, li { line-height: 1.65; }
.muted, .subtitle, .footnote { color: var(--muted); }
.subtitle { margin: 12px 0 32px; font-size: 16px; }
.footnote { font-size: 13px; }
.eyebrow { font-size: 11px; font-weight: 700; letter-spacing: .13em; color: var(--muted); margin-bottom: 12px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-mark {
  flex-shrink: 0;
  background: var(--accent);
  width: 39px;
  height: 39px;
  color: white;
  border-radius: 12px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  font-size: 23px;
  font-weight: 550;
  letter-spacing: -.05em;
}
.wordmark { font-size: 19px; font-weight: 650; letter-spacing: -.035em; color: var(--ink); }
.shell { display: grid; grid-template-columns: 244px minmax(0, 1fr); min-height: 100dvh; }
.sidebar { background: #edf2ee; border-right: 1px solid var(--line); padding: 32px 24px; display: flex; flex-direction: column; position: sticky; top: 0; height: 100dvh; }
.sidebar nav { display: grid; gap: 6px; margin-top: 52px; }
.sidebar nav a { padding: 13px 14px; border-radius: 9px; text-decoration: none; display: flex; align-items: center; gap: 14px; font-weight: 550; color: var(--muted); }
.sidebar nav a:hover { background: #e0ebe5; }
.sidebar nav a[aria-current] { background: #dae9e0; color: var(--accent-deep); }
.nav-number { font-size: 10px; font-variant-numeric: tabular-nums; opacity: .75; }
.sidebar-bottom { margin-top: auto; padding-top: 40px; }
.sidebar-bottom .eyebrow { font-size: 9px; margin-bottom: 8px; }
.account-name { overflow-wrap: anywhere; font-weight: 600; margin-bottom: 14px; }
.workspace { min-width: 0; }
.topbar { height: 78px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; padding: 0 48px; font-size: 13px; }
.viewer-tag { border: 1px solid var(--line); padding: 5px 10px; border-radius: 20px; color: var(--muted); font-size: 11px; }
main { max-width: 1280px; margin: 0 auto; padding: 42px 48px 72px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 15px; padding: 28px; margin-bottom: 22px; overflow-wrap: anywhere; }
.panel > h2 { margin-bottom: 18px; }
.panel > p { margin-bottom: 18px; }
.panel > h3 { margin: 28px 0 14px; }
.controls { display: flex; gap: 22px; flex-wrap: wrap; align-items: end; }
.controls h2 { width: 100%; margin-bottom: 0; }
.controls .field { flex: 1; min-width: 200px; margin: 0; }
.field { display: grid; gap: 8px; font-size: 13px; font-weight: 600; margin: 22px 0; }
input, select, textarea { background: var(--surface); border: 1px solid #bccdc5; border-radius: 8px; padding: 12px; color: var(--ink); width: 100%; min-height: 44px; }
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 22px; }
.report-list { margin-top: 25px; }
.report-row { display: flex; align-items: center; gap: 18px; text-decoration: none; color: var(--ink); border-top: 1px solid var(--line); padding: 23px 0; }
.report-row:hover strong { color: var(--accent); }
.report-row > div { min-width: 0; flex: 1; }
.report-row strong { display: block; overflow-wrap: anywhere; margin-bottom: 6px; font-size: 16px; }
.report-row .muted { display: block; font-size: 12px; }
.row-action { flex-shrink: 0; font-size: 12px; color: var(--accent-deep); }
.report-icon { background: #edf3ef; border-radius: 9px; padding: 13px; color: var(--accent); }
.empty { padding: 28px 0; color: var(--muted); }
.badge { display: inline-block; background: #edf3ef; color: #42655a; border: 1px solid #d8e4dc; padding: 5px 9px; border-radius: 6px; font-size: 11px; white-space: nowrap; }
.observation { padding: 26px 0; border-top: 1px solid var(--line); }
.observation-heading { display: flex; gap: 14px; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.result-value { font-size: 27px; font-weight: 600; letter-spacing: -.025em; margin-bottom: 12px; }
.observation p { margin-bottom: 8px; }
.observation .quiet { margin: 6px 8px 6px 0; }
.observation blockquote { background: #f4f7f4; border-left: 3px solid #bed4c8; padding: 12px 16px; margin: 18px 0; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
.text-link { display: block; margin: 10px 0; overflow-wrap: anywhere; }
.table-wrap { max-width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; text-align: left; }
th { color: var(--muted); font-weight: 600; font-size: 11px; }
th, td { border-bottom: 1px solid var(--line); padding: 14px 12px; vertical-align: top; }
th:first-child, td:first-child { padding-left: 0; }
td { overflow-wrap: anywhere; min-width: 100px; }
td .text-link { margin: 0; }
table tr:last-child td { border-bottom: 0; }
details { border-top: 1px solid var(--line); margin-top: 16px; padding-top: 14px; }
summary { cursor: pointer; color: var(--accent-deep); line-height: 1.7; font-size: 13px; overflow-wrap: anywhere; }
pre { background: #f4f7f4; border-radius: 8px; padding: 18px; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 12px; line-height: 1.6; max-height: 440px; overflow: auto; }
.chart { width: 100%; display: block; margin: 22px 0; overflow: visible; }
.grid-line { stroke: #dce5e1; stroke-dasharray: 4 5; }
.chart-label { fill: #607571; font-size: 12px; }
.chart-line { fill: none; stroke: var(--accent); stroke-width: 2.5; }
.chart-point { fill: var(--accent); stroke: white; stroke-width: 2; pointer-events: none; }
.chart-hit { fill: transparent; stroke: transparent; cursor: pointer; }
.chart-hit:hover, .chart-hit:focus { stroke: var(--accent); stroke-width: 2; outline: none; }
.notice { border: 1px solid #b7d9c9; background: #eff7f1; border-radius: 9px; padding: 14px 18px; color: #254f3d; overflow-wrap: anywhere; }
.workspace > .notice { margin: 24px 48px 0; }
.error { background: #fff1eb; border-color: #dfbdaf; color: #883e24; }
.analysis-summary { font-size: 17px; line-height: 1.8; }
.preview { width: min(1200px, 95vw); max-width: 95vw; height: 90dvh; max-height: 90dvh; border: 1px solid var(--line); border-radius: 14px; padding: 0; }
.preview::backdrop { background: #18352fcc; }
.preview-header { padding: 16px 22px; display: flex; align-items: center; flex-wrap: wrap; gap: 16px; border-bottom: 1px solid var(--line); }
.preview-header h2 { flex: 1; min-width: 160px; overflow-wrap: anywhere; font-size: 16px; }
.preview iframe { width: 100%; height: calc(100% - 90px); border: 0; }
.preview img { display: block; width: 100%; height: calc(100% - 100px); object-fit: contain; }
.login-page { min-height: 100dvh; display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 100px; max-width: 1100px; padding: 60px 48px; }
.login-intro .brand-mark { width: 64px; height: 64px; font-size: 38px; border-radius: 20px; margin-bottom: 18px; }
.login-intro h1 { margin: 38px 0 24px; font-size: clamp(42px, 5vw, 62px); white-space: pre-line; line-height: 1.03; }
.intro-copy { color: var(--muted); max-width: 340px; font-size: 17px; }
.login-form { padding: 38px; margin: 0; }
.login-form .primary { width: 100%; margin: 20px 0; }
.login-form .footnote { margin: 0; }
.login-form .eyebrow { font-size: 10px; }
.skip-link { position: fixed; top: -100px; left: 20px; z-index: 5; padding: 12px; background: white; }
.skip-link:focus { top: 12px; }
@media (max-width: 1050px) {
  .shell { grid-template-columns: 205px minmax(0, 1fr); }
  .sidebar { padding: 28px 18px; }
  .brand { gap: 8px; }
  .wordmark { font-size: 17px; }
  main { padding: 32px 28px; }
  .topbar { padding: 0 28px; }
  .workspace > .notice { margin: 20px 28px 0; }
  .row-action { display: none; }
  .login-page { gap: 55px; }
}
@media (max-width: 700px) {
  .shell { display: block; }
  .sidebar { position: static; height: auto; padding: 18px 18px 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .sidebar .brand { justify-content: center; }
  .sidebar nav { margin-top: 18px; display: flex; overflow-x: auto; gap: 0; justify-content: space-between; }
  .sidebar nav a { padding: 14px 9px; font-size: 12px; border-radius: 7px 7px 0 0; }
  .nav-number { display: none; }
  .sidebar-bottom { position: absolute; right: 14px; top: 19px; padding: 0; margin: 0; }
  .sidebar-bottom p { display: none; }
  .sidebar-bottom button { font-size: 11px; padding: 6px 8px; min-height: 34px; }
  .topbar { height: 56px; padding: 0 20px; }
  main { padding: 28px 18px 48px; }
  .panel { padding: 21px 18px; border-radius: 12px; }
  .subtitle { font-size: 14px; margin-bottom: 25px; }
  .workspace > .notice { margin: 18px 18px 0; }
  .report-row { gap: 12px; }
  .report-icon { display: none; }
  .login-page { display: block; padding: 32px 20px; }
  .login-intro { margin-bottom: 30px; }
  .login-intro .brand-mark { width: 39px; height: 39px; font-size: 23px; border-radius: 12px; }
  .login-intro h1 { font-size: 40px; margin: 22px 0 16px; }
  .intro-copy { font-size: 15px; }
  .login-form { padding: 28px 22px; }
  .preview-header { padding: 12px; gap: 10px; }
}

.metric-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 16px; }
.metric-value { font-size: clamp(1.7rem, 3vw, 2.2rem); font-weight: 650; margin-block: 12px; }
.metric-grid .panel { min-width: 0; }
.metric-grid select { max-width: 100%; }

textarea { resize: vertical; min-height: 80px; }
input[type=checkbox] { width: 22px; min-height: 22px; accent-color: var(--accent); }
.sparkline { margin: 18px 0; }
.sparkline svg { width: 100%; display: block; }
.sparkline figcaption { margin-top: 8px; }
@media (prefers-color-scheme: dark) {
  :root { color-scheme: dark; --ink: #e6efec; --muted: #a4b8b1; --accent: #72cdbb; --accent-deep: #8edcca; --paper: #111b19; --surface: #1a2724; --line: #344943; }
  .sidebar, pre, .observation blockquote { background: #16231f; }
  .sidebar nav a[aria-current], button:hover, .button:hover, .report-icon, .badge { background: #28423a; color: var(--ink); border-color: var(--line); }
  .primary, .brand-mark { background: var(--accent); color: #102b24; }
  .primary:hover { background: var(--accent-deep); color: #102b24; }
  .chart-label { fill: var(--muted); }
  .grid-line { stroke: var(--line); }
  .chart-point { stroke: var(--surface); }
  .notice { background: #193b2c; color: #c5e8d7; border-color: #3d6755; }
  .error { background: #42291f; color: #ffcfb7; border-color: #8d6651; }
  .skip-link { background: var(--surface); }
}

.controls > details { flex-basis: 100%; }
.record-row { padding: 1rem 0; border-bottom: 1px solid var(--line); }
