:root {
  --ink: #182b31;
  --muted: #64777b;
  --soft: #edf3f2;
  --line: #dce7e4;
  --paper: #f7faf8;
  --white: #ffffff;
  --navy: #12343d;
  --teal: #16766d;
  --teal-soft: #dff1ec;
  --amber: #9a5c0a;
  --amber-soft: #fff1d6;
  --red: #a13f3f;
  --red-soft: #fbe4e3;
  --shadow: 0 18px 45px rgba(22, 55, 60, 0.08);
  --radius: 18px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; background: var(--paper); }
a { color: inherit; }
button, input, select { font: inherit; }
button, a, select, input { -webkit-tap-highlight-color: transparent; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.topbar { height: 74px; padding: 0 5vw; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid rgba(220, 231, 228, .8); background: rgba(247, 250, 248, .92); }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--navy); font-weight: 780; font-size: 20px; letter-spacing: -.04em; }
.brand-mark { width: 29px; height: 29px; display: grid; place-items: center; color: var(--white); background: var(--teal); border-radius: 9px 9px 9px 2px; font-size: 20px; font-weight: 700; transform: rotate(-9deg); }
.brand-mark::first-letter { transform: rotate(9deg); }
.brand-accent { color: var(--teal); }
.topbar-meta { display: flex; align-items: center; gap: 22px; color: var(--muted); font-size: 12px; }
.workspace-label { font-weight: 650; color: var(--ink); }
.fixture-badge { padding: 7px 10px; border: 1px solid #c6ded8; border-radius: 999px; background: #f2faf7; color: var(--teal); font-weight: 700; }
.fixture-dot { display: inline-block; width: 6px; height: 6px; margin-right: 5px; background: #36a78e; border-radius: 50%; vertical-align: 1px; }

.shell { width: min(1160px, 90vw); margin: 0 auto; }
.hero { display: grid; grid-template-columns: 1fr 330px; gap: 75px; align-items: end; padding: 84px 0 70px; }
.eyebrow, .section-kicker { margin: 0 0 18px; color: var(--teal); font-size: 11px; font-weight: 800; letter-spacing: .15em; text-transform: uppercase; }
.eyebrow-line { display: inline-block; width: 38px; height: 1px; margin-left: 10px; vertical-align: 3px; background: #86bdb3; }
h1, h2, h3, p { margin-top: 0; }
h1 { max-width: 700px; margin-bottom: 20px; color: var(--navy); font-size: clamp(42px, 6vw, 72px); line-height: .99; letter-spacing: -.075em; font-weight: 780; }
.hero-intro { max-width: 630px; margin-bottom: 31px; color: #587076; font-size: 18px; line-height: 1.55; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 22px; }
.primary-button { border: 0; border-radius: 10px; padding: 14px 17px; background: var(--navy); color: var(--white); font-size: 13px; font-weight: 750; cursor: pointer; box-shadow: 0 7px 15px rgba(18, 52, 61, .15); transition: transform .18s ease, background .18s ease; }
.primary-button:hover, .primary-button:focus-visible { background: #1c4a56; transform: translateY(-2px); }
.primary-button span { margin-left: 13px; color: #93d9c8; font-size: 18px; vertical-align: -1px; }
.text-link { color: var(--teal); font-size: 13px; font-weight: 750; text-decoration: none; }
.text-link:hover { text-decoration: underline; text-underline-offset: 4px; }
.hero-aside { padding: 22px 22px 20px; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(255,255,255,.68); box-shadow: var(--shadow); }
.aside-heading { display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.live-pulse { width: 8px; height: 8px; border-radius: 50%; background: #35a88f; box-shadow: 0 0 0 5px #ddf1eb; }
.status-counts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 25px 0 19px; }
.count-box { padding: 12px 10px; border-radius: 11px; background: var(--soft); }
.count-box[data-status="Prepare"] { background: var(--amber-soft); }
.count-box[data-status="Escalate"] { background: var(--red-soft); }
.count-number { display: block; margin-bottom: 3px; color: var(--navy); font-size: 25px; font-weight: 780; letter-spacing: -.06em; }
.count-label { color: var(--muted); font-size: 10px; font-weight: 750; }
.aside-footnote { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.55; }
.aside-footnote strong { color: var(--ink); }

.signal-banner { display: flex; align-items: center; gap: 17px; margin-bottom: 74px; padding: 15px 20px; border: 1px solid #eadab8; border-radius: 13px; background: #fffaf0; }
.signal-icon { flex: 0 0 auto; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; background: #f4dca9; color: var(--amber); font-size: 15px; font-weight: 800; }
.signal-body { flex: 1; min-width: 0; }
.signal-heading { display: flex; align-items: center; gap: 13px; margin-bottom: 3px; color: var(--amber); font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.signal-time { color: #ac9369; font-size: 10px; font-weight: 650; letter-spacing: 0; text-transform: none; }
.signal-body p { margin: 0; color: #5d5545; font-size: 13px; line-height: 1.45; }
.signal-link { flex: 0 0 auto; color: var(--amber); font-size: 12px; font-weight: 750; text-decoration: none; }
.signal-link:hover { text-decoration: underline; text-underline-offset: 3px; }

.workspace-section, .detail-section, .evidence-section { margin-bottom: 78px; }
.section-heading-row, .detail-heading-row { display: flex; align-items: end; justify-content: space-between; gap: 25px; margin-bottom: 23px; }
.section-kicker { margin-bottom: 7px; color: #799093; font-size: 10px; letter-spacing: .13em; }
h2 { margin-bottom: 0; color: var(--navy); font-size: 29px; line-height: 1.08; letter-spacing: -.055em; }
.view-tools { display: flex; gap: 8px; }
.search-box, .select-box { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 9px; background: var(--white); color: var(--muted); }
.search-box { gap: 7px; padding: 0 11px; }
.search-box input { width: 120px; padding: 10px 0; border: 0; outline: 0; color: var(--ink); font-size: 12px; }
.search-box input::placeholder { color: #93a3a3; }
.select-box select { min-width: 124px; padding: 10px 11px; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 12px; cursor: pointer; }
.portfolio-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.site-card { position: relative; min-height: 220px; padding: 21px 21px 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); cursor: pointer; transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease; }
.site-card:hover, .site-card:focus-visible, .site-card.selected { border-color: #9ac7bd; box-shadow: 0 14px 35px rgba(22, 55, 60, .09); transform: translateY(-2px); outline: none; }
.card-head { display: flex; justify-content: space-between; align-items: start; gap: 14px; margin-bottom: 25px; }
.site-name { margin: 0 0 5px; color: var(--navy); font-size: 16px; font-weight: 750; letter-spacing: -.025em; }
.site-location { color: var(--muted); font-size: 11px; }
.status-pill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 9px; border-radius: 999px; font-size: 10px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; white-space: nowrap; }
.status-pill::before { width: 6px; height: 6px; border-radius: 50%; background: currentColor; content: ""; }
.status-pill.Monitor { color: var(--teal); background: var(--teal-soft); }
.status-pill.Prepare { color: var(--amber); background: var(--amber-soft); }
.status-pill.Escalate { color: var(--red); background: var(--red-soft); }
.reason-label { display: block; margin-bottom: 7px; color: #829497; font-size: 10px; font-weight: 750; letter-spacing: .1em; text-transform: uppercase; }
.site-reason { max-width: 520px; margin-bottom: 18px; color: #465e63; font-size: 13px; line-height: 1.4; }
.card-bottom { display: flex; justify-content: space-between; align-items: end; padding-top: 13px; border-top: 1px solid #edf2f0; }
.criticality { color: var(--muted); font-size: 11px; }
.criticality strong { color: var(--ink); font-weight: 750; }
.card-freshness { color: #8ba09d; font-size: 10px; }
.empty-state { padding: 30px; border: 1px dashed #bdcfca; border-radius: var(--radius); color: var(--muted); text-align: center; }

.detail-section { scroll-margin-top: 20px; }
.detail-hint { color: #8ba09d; font-size: 11px; }
.detail-panel { min-height: 176px; padding: 27px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--navy); color: var(--white); box-shadow: var(--shadow); }
.detail-panel.empty-detail { display: flex; align-items: center; justify-content: center; min-height: 130px; color: #b4ccca; background: #24474f; font-size: 13px; }
.detail-top { display: flex; align-items: start; justify-content: space-between; gap: 25px; margin-bottom: 20px; }
.detail-title { margin: 0 0 5px; font-size: 22px; letter-spacing: -.045em; }
.detail-location { color: #afc5c3; font-size: 11px; }
.detail-panel .status-pill { margin-top: 2px; }
.detail-panel .status-pill.Monitor { color: #9ee2d3; background: rgba(108, 205, 181, .15); }
.detail-panel .status-pill.Prepare { color: #f5ce88; background: rgba(255, 212, 126, .16); }
.detail-panel .status-pill.Escalate { color: #ffaaa4; background: rgba(255, 133, 126, .16); }
.detail-columns { display: grid; grid-template-columns: 1.15fr .85fr; gap: 28px; }
.detail-reason { margin: 0; color: #eef5f3; font-size: 14px; line-height: 1.48; }
.detail-label { display: block; margin-bottom: 8px; color: #91b2af; font-size: 9px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.checklist { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.checklist li { display: flex; gap: 9px; align-items: start; color: #d5e5e1; font-size: 12px; line-height: 1.4; }
.checklist li::before { flex: 0 0 auto; width: 15px; height: 15px; display: grid; place-items: center; border: 1px solid #6d9e96; border-radius: 4px; color: #a9e6d8; content: "✓"; font-size: 9px; }
.detail-meta { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 22px; padding-top: 14px; border-top: 1px solid rgba(184, 219, 212, .2); color: #a7c3bf; font-size: 10px; }
.detail-meta a { color: #a9e6d8; font-weight: 750; text-decoration: none; }
.detail-meta a:hover { text-decoration: underline; text-underline-offset: 3px; }

.evidence-heading-row { align-items: end; }
.section-description { max-width: 490px; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.evidence-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.evidence-card { min-height: 192px; padding: 19px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); }
.evidence-card-top { display: flex; justify-content: space-between; gap: 9px; margin-bottom: 24px; }
.source-type, .confidence { color: #829497; font-size: 9px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.confidence.high { color: var(--teal); }
.confidence.medium { color: var(--amber); }
.confidence.configured { color: #7a6a9f; }
.evidence-card h3 { min-height: 37px; margin-bottom: 8px; color: var(--navy); font-size: 14px; line-height: 1.3; letter-spacing: -.02em; }
.evidence-card p { min-height: 36px; margin-bottom: 17px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.evidence-footer { display: flex; justify-content: space-between; gap: 10px; padding-top: 11px; border-top: 1px solid #edf2f0; color: #95a5a5; font-size: 9px; }
.evidence-footer a { color: var(--teal); font-weight: 750; text-decoration: none; white-space: nowrap; }
.evidence-footer a:hover { text-decoration: underline; text-underline-offset: 3px; }

.methodology-section { display: grid; grid-template-columns: .95fr 1.05fr; gap: 90px; align-items: center; margin-bottom: 55px; padding: 45px 50px; border-radius: var(--radius); background: #e6f0ed; }
.methodology-copy h2 { max-width: 360px; margin-bottom: 16px; }
.methodology-copy p:last-child { max-width: 405px; margin: 0; color: #587175; font-size: 13px; line-height: 1.6; }
.methodology-list { display: grid; gap: 18px; }
.method-row { display: flex; gap: 13px; align-items: start; }
.status-dot { flex: 0 0 auto; width: 10px; height: 10px; margin-top: 4px; border-radius: 50%; }
.status-dot.monitor { background: var(--teal); box-shadow: 0 0 0 5px #cfe9e2; }
.status-dot.prepare { background: #d3912d; box-shadow: 0 0 0 5px #f7e7c9; }
.status-dot.escalate { background: #c25b5a; box-shadow: 0 0 0 5px #f3d3d0; }
.method-row strong { display: block; margin-bottom: 4px; color: var(--navy); font-size: 13px; }
.method-row span:not(.status-dot) { display: block; color: #62797a; font-size: 12px; line-height: 1.45; }
.safety-note { display: flex; gap: 15px; margin-bottom: 76px; padding: 20px; border: 1px solid #d9e2df; border-radius: 13px; background: #f0f5f3; }
.safety-symbol { flex: 0 0 auto; width: 23px; height: 23px; display: grid; place-items: center; border: 1px solid #91aaa6; border-radius: 50%; color: #668481; font-size: 13px; font-weight: 800; }
.safety-note h2 { margin: 1px 0 6px; color: #4e696b; font-size: 13px; letter-spacing: -.02em; }
.safety-note p { max-width: 950px; margin: 0; color: #6b8081; font-size: 11px; line-height: 1.6; }
.footer { border-top: 1px solid var(--line); background: #eff5f2; }
.footer-inner { width: min(1160px, 90vw); display: flex; justify-content: space-between; gap: 20px; margin: 0 auto; padding: 22px 0; color: #8a9d9b; font-size: 10px; }
.footer a { color: var(--teal); font-weight: 750; text-decoration: none; }
.footer a:hover { text-decoration: underline; text-underline-offset: 3px; }

@media (max-width: 850px) {
  .hero { grid-template-columns: 1fr; gap: 35px; padding: 60px 0 48px; }
  .hero-aside { max-width: 440px; }
  .signal-banner { margin-bottom: 55px; }
  .methodology-section { grid-template-columns: 1fr; gap: 32px; padding: 34px 28px; }
  .evidence-grid { grid-template-columns: 1fr; }
  .evidence-card { min-height: 0; }
}

@media (max-width: 650px) {
  .topbar { height: 64px; padding: 0 5vw; }
  .workspace-label { display: none; }
  .topbar-meta { gap: 0; }
  .fixture-badge { font-size: 10px; }
  .shell { width: 90vw; }
  h1 { font-size: clamp(42px, 13vw, 60px); }
  .hero-intro { font-size: 16px; }
  .signal-banner { align-items: start; flex-wrap: wrap; gap: 12px; padding: 16px; }
  .signal-body { flex-basis: calc(100% - 45px); }
  .signal-link { margin-left: 43px; }
  .section-heading-row, .detail-heading-row { display: block; }
  .view-tools { margin-top: 17px; }
  .search-box { flex: 1; }
  .search-box input { width: 100%; }
  .portfolio-grid { grid-template-columns: 1fr; }
  .detail-hint { display: block; margin-top: 8px; }
  .detail-panel { padding: 21px; }
  .detail-top { display: block; }
  .detail-top .status-pill { margin-top: 14px; }
  .detail-columns { grid-template-columns: 1fr; gap: 21px; }
  .footer-inner { display: block; line-height: 2; }
  .footer-inner span, .footer-inner a { display: block; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
