:root {
  --panel: #fbf7ef;
  --ink: #182028;
  --muted: #4f5d66;
  --line: #d9d0bf;
  --warn: #8a4d05;
  --warn-soft: #fff1d6;
  --bad: #b42318;
  --bad-soft: #fde8e7;
  --good: #166534;
  --good-soft: #e5f6e9;
  --shadow: 0 18px 50px rgba(24, 32, 40, 0.08);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: radial-gradient(circle at top right, rgba(15, 118, 110, 0.08), transparent 30%), linear-gradient(180deg, #f5efe4 0%, #efe7db 100%);
  color: var(--ink);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
.shell { max-width: 1200px; margin: 0 auto; padding: 32px 24px 80px; }
.hero {
  position: relative;
  overflow: hidden;
  padding: 28px 32px;
  border-radius: 28px;
  background: linear-gradient(135deg, rgba(15, 118, 110, 0.96), rgba(16, 66, 84, 0.95));
  color: #f8fafc;
  box-shadow: var(--shadow);
}
.hero::after {
  content: '';
  position: absolute;
  top: -50px;
  right: -80px;
  width: 240px;
  height: 240px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}
.eyebrow { margin-bottom: 10px; font-size: 11px; letter-spacing: 0.18em; opacity: 0.8; text-transform: uppercase; }
h1, h2, h3 { margin: 0; font-family: Charter, 'Iowan Old Style', 'Palatino Linotype', Georgia, serif; line-height: 1.05; }
h1 { max-width: 900px; font-size: clamp(36px, 5vw, 56px); }
h2 { margin-bottom: 14px; font-size: 26px; }
h3 { margin-bottom: 10px; font-size: 20px; }
.section-subheading { margin-top: 18px; }
p { margin: 10px 0 0; color: inherit; line-height: 1.55; }
.hero p { max-width: 900px; color: rgba(248, 250, 252, 0.88); font-size: 16px; }
.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 18px; margin-top: 22px; }
.panel { padding: 22px; border: 1px solid rgba(24, 32, 40, 0.08); border-radius: 24px; background: var(--panel); box-shadow: var(--shadow); }
.panel p, .panel li, .panel td, .panel th { color: var(--muted); }
.span-12 { grid-column: span 12; }
.span-8 { grid-column: span 8; }
.span-7 { grid-column: span 7; }
.span-6 { grid-column: span 6; }
.span-5 { grid-column: span 5; }
.span-4 { grid-column: span 4; }
.chip-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.chip { display: inline-flex; align-items: baseline; gap: 10px; padding: 10px 14px; border: 1px solid rgba(255, 255, 255, 0.16); border-radius: 999px; background: rgba(255, 255, 255, 0.1); backdrop-filter: blur(6px); }
.chip-label { font-size: 11px; letter-spacing: 0.12em; opacity: 0.76; text-transform: uppercase; }
.chip-value { font-size: 14px; font-weight: 700; }
.tone-good { border-color: rgba(22, 101, 52, 0.16); background: var(--good-soft); }
.tone-good .chip-value, .score-positive, .score-best { color: var(--good); }
.tone-warn { border-color: rgba(217, 119, 6, 0.18); background: var(--warn-soft); }
.tone-warn .chip-value { color: var(--warn); }
.tone-bad { border-color: rgba(180, 35, 24, 0.18); background: var(--bad-soft); }
.tone-bad .chip-value, .score-negative { color: var(--bad); }
.tone-neutral { border-color: rgba(24, 32, 40, 0.08); background: rgba(24, 32, 40, 0.04); }
.tone-neutral .chip-value { color: var(--ink); }
.metric-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-top: 8px; }
.metric { padding: 14px; border: 1px solid rgba(24, 32, 40, 0.06); border-radius: 18px; background: rgba(24, 32, 40, 0.03); }
.metric dt { margin-bottom: 8px; font-size: 11px; letter-spacing: 0.12em; color: var(--muted); text-transform: uppercase; }
.metric dd { margin: 0; font-size: 28px; font-weight: 700; color: var(--ink); }
table { width: 100%; margin-top: 10px; border-collapse: collapse; }
th, td { padding: 12px 10px; border-bottom: 1px solid var(--line); vertical-align: top; font-size: 14px; text-align: left; }
th { font-size: 11px; letter-spacing: 0.12em; color: var(--muted); text-transform: uppercase; }
ul { margin: 10px 0 0; padding-left: 18px; line-height: 1.55; }
.callout { margin-top: 14px; padding: 14px 16px; border: 1px solid rgba(24, 32, 40, 0.08); border-radius: 18px; }
.callout.warn { background: var(--warn-soft); color: #8a4d05; }
.callout.bad { background: var(--bad-soft); color: #8b1e17; }
.callout.good { background: var(--good-soft); color: #155b2c; }
.label-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.label { display: inline-flex; align-items: center; gap: 8px; padding: 7px 11px; border: 1px solid rgba(24, 32, 40, 0.06); border-radius: 999px; background: rgba(24, 32, 40, 0.05); color: var(--muted); font-size: 12px; }
a { color: #0f5d8c; text-decoration: none; }
a:hover { text-decoration: underline; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; font-size: 12px; }
.quadrant-stage { position: relative; min-height: 700px; overflow: hidden; border: 1px solid rgba(24, 32, 40, 0.08); border-radius: 22px; background: linear-gradient(90deg, rgba(15, 118, 110, 0.08) 0 50%, rgba(180, 35, 24, 0.04) 50% 100%), linear-gradient(180deg, rgba(15, 118, 110, 0.04) 0 50%, rgba(24, 32, 40, 0.02) 50% 100%); }
.quadrant-svg { display: block; width: 100%; height: auto; }
.footer-note { margin-top: 18px; color: var(--muted); font-size: 13px; }
.rank-col { width: 40px; color: var(--muted); font-weight: 700; text-align: center; }
.score-col { font-size: 18px; font-weight: 700; }
.desc-hint { max-width: 320px; margin-top: 4px; color: var(--muted); font-size: 12px; }
.score-best { font-weight: 700; }
.score-muted { color: var(--muted); }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.dashboard-grid { align-items: start; }
.dashboard-strip .chip-row { margin-top: 0; }
.compact-metrics { grid-template-columns: repeat(auto-fit, minmax(126px, 1fr)); }
.link-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }
.link-grid a { display: flex; min-height: 42px; align-items: center; justify-content: center; padding: 8px 10px; border: 1px solid rgba(15, 93, 140, 0.18); border-radius: 8px; background: rgba(15, 93, 140, 0.07); font-size: 13px; font-weight: 700; text-align: center; }
.basis-note { max-width: 240px; margin-top: 6px; color: var(--muted); font-size: 12px; line-height: 1.35; }
.status-stack { display: grid; gap: 4px; font-size: 12px; }
.status-stack span:first-child { color: var(--ink); font-weight: 700; }
.compare-score-row { background: rgba(15, 118, 110, 0.06); }
.mobile-nav { display: none; }
@media (max-width: 900px) {
  .span-8, .span-7, .span-6, .span-5, .span-4 { grid-column: span 12; }
  .shell { padding: 18px 16px 56px; }
  .hero { padding: 22px; border-radius: 20px; }
}
@media (max-width: 640px) {
  .shell { padding: 12px 10px 80px; padding-top: env(safe-area-inset-top, 12px); }
  .hero { padding: 16px; border-radius: 14px; }
  .hero::after { display: none; }
  h1 { font-size: 26px; }
  h2 { font-size: 22px; }
  .panel { padding: 14px; border-radius: 16px; }
  .grid { gap: 12px; margin-top: 14px; }
  .chip-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .chip { justify-content: center; padding: 8px 10px; text-align: center; }
  .metric-grid { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; }
  .desc-hint { max-width: none; }
  .mono, .label { word-break: break-all; }
  .label-list { gap: 6px; }
  .label { padding: 6px 9px; font-size: 11px; }
  table { border: none; }
  thead { display: none; }
  tbody tr { display: block; margin-bottom: 10px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: rgba(24, 32, 40, 0.02); }
  td { display: block; padding: 4px 0; border: none; font-size: 14px; }
  td::before { content: attr(data-label); display: block; margin-bottom: 2px; color: var(--muted); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; }
  td:empty::before { display: none; }
  .rank-col { margin-bottom: 4px; font-size: 20px; }
  .rank-col::before { display: none; }
  .score-col { font-size: 22px; }
  a { display: inline-flex; align-items: center; min-height: 44px; }
  td a { padding: 8px 0; }
  .quadrant-stage { min-height: 400px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .quadrant-svg { min-width: 600px; }
  .link-grid { grid-template-columns: 1fr; }
  .basis-note { max-width: none; }
  .mobile-nav { position: fixed; right: 0; bottom: 0; left: 0; z-index: 100; display: flex; justify-content: space-around; padding: 8px 0; padding-bottom: env(safe-area-inset-bottom, 8px); border-top: 1px solid var(--line); background: rgba(251, 247, 239, 0.95); backdrop-filter: blur(10px); }
  .mobile-nav a { display: flex; min-height: 44px; flex-direction: column; align-items: center; justify-content: center; padding: 6px 8px; color: var(--muted); font-size: 11px; letter-spacing: 0.06em; text-align: center; text-decoration: none; text-transform: uppercase; }
  .mobile-nav a:hover { color: var(--ink); text-decoration: none; }
}
