:root {
  --ink: #101828;
  --ink-soft: #344054;
  --muted: #667085;
  --line: #dfe4ec;
  --surface: #fff;
  --canvas: #f5f7fb;
  --blue: #175cd3;
  --blue-dark: #1849a9;
  --blue-soft: #eff8ff;
  --green: #067647;
  --green-soft: #ecfdf3;
  --amber: #b54708;
  --amber-soft: #fffaeb;
  --violet: #6941c6;
  --violet-soft: #f4f3ff;
  --dark: #111827;
  --dark-card: #1d2939;
  --radius: 16px;
  --shadow: 0 14px 40px rgba(16, 24, 40, .08);
  --body: "Fira Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "Fira Code", ui-monospace, SFMono-Regular, Consolas, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--canvas); font-family: var(--body); font-size: 16px; line-height: 1.55; }
button, input { font: inherit; }
a { color: inherit; }
svg { width: 20px; height: 20px; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.shell { width: min(1180px, calc(100% - 40px)); margin-inline: auto; }
.skip-link { position: fixed; z-index: 100; top: 12px; left: 12px; padding: 10px 14px; color: #fff; background: var(--blue-dark); border-radius: 8px; transform: translateY(-180%); }
.skip-link:focus { transform: translateY(0); }

.site-header { position: sticky; z-index: 30; top: 0; border-bottom: 1px solid rgba(208, 213, 221, .85); background: rgba(245, 247, 251, .9); backdrop-filter: blur(14px); }
.header-inner, .footer-inner { display: flex; align-items: center; justify-content: space-between; }
.header-inner { min-height: 74px; }
.brand { display: inline-flex; gap: 12px; align-items: center; min-height: 44px; color: var(--ink); text-decoration: none; }
.brand-mark { display: grid; width: 40px; height: 40px; place-items: center; color: #fff; background: var(--dark); border-radius: 12px; }
.brand-mark svg { width: 25px; height: 25px; }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 15px; line-height: 1.2; }
.brand small { margin-top: 2px; color: var(--muted); font-family: var(--mono); font-size: 11px; }
.header-actions, .hero-actions, .footer-links { display: flex; gap: 12px; align-items: center; }
.text-link, .footer-links a { display: inline-flex; align-items: center; min-height: 44px; color: var(--ink-soft); font-weight: 500; text-decoration: none; }
.text-link:hover, .footer-links a:hover { color: var(--blue); }
.button { display: inline-flex; gap: 9px; align-items: center; justify-content: center; min-height: 46px; padding: 10px 16px; border: 1px solid transparent; border-radius: 10px; font-weight: 600; text-decoration: none; cursor: pointer; transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease, box-shadow 180ms ease; }
.button:focus-visible, .text-link:focus-visible, .brand:focus-visible, .footer-links a:focus-visible, .provider-tab:focus-visible, .proof-grid a:focus-visible, input:focus-visible, .table-scroll:focus-visible { outline: 3px solid rgba(23, 92, 211, .32); outline-offset: 3px; }
.button-dark { color: #fff; background: var(--dark); }
.button-dark:hover { background: #263247; }
.button-primary { color: #fff; background: var(--blue); box-shadow: 0 8px 20px rgba(23, 92, 211, .2); }
.button-primary:hover { background: var(--blue-dark); }
.button-primary:disabled { color: #d0d5dd; background: #667085; box-shadow: none; cursor: wait; }
.button-secondary { color: var(--ink); background: var(--surface); border-color: #d0d5dd; }
.button-secondary:hover { border-color: #98a2b3; background: #f9fafb; }

.hero { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(300px, .75fr); gap: 60px; align-items: center; min-height: 630px; padding-block: 86px 76px; }
.eyebrow { display: flex; gap: 8px; align-items: center; margin: 0 0 12px; color: var(--blue); font-family: var(--mono); font-size: 12px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; }
.status-dot { width: 8px; height: 8px; background: #12b76a; border: 2px solid #a6f4c5; border-radius: 50%; box-shadow: 0 0 0 4px #ecfdf3; }
h1, h2, h3, p { margin-top: 0; }
h1 { max-width: 760px; margin-bottom: 24px; font-size: clamp(44px, 6.2vw, 76px); line-height: .98; letter-spacing: -.055em; }
h2 { margin-bottom: 0; font-size: clamp(30px, 3.4vw, 44px); line-height: 1.08; letter-spacing: -.035em; }
h3 { font-size: 24px; line-height: 1.2; letter-spacing: -.02em; }
.hero-lede { max-width: 710px; margin-bottom: 28px; color: var(--ink-soft); font-size: 19px; line-height: 1.65; }
.refresh-note { max-width: 630px; margin: 14px 0 0; color: var(--muted); font-size: 13px; }
.refresh-note.error { color: #b42318; }
.boundary-card, .metric-card, .table-card, .detail-card, .brief-card, .integration-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.boundary-card { padding: 26px; box-shadow: var(--shadow); }
.boundary-heading { display: flex; gap: 10px; align-items: center; padding-bottom: 18px; border-bottom: 1px solid var(--line); font-weight: 700; }
.boundary-heading svg { color: var(--green); }
.boundary-list { margin: 10px 0 0; }
.boundary-list div { display: flex; gap: 16px; align-items: center; justify-content: space-between; min-height: 46px; border-bottom: 1px solid #eef1f5; }
.boundary-list div:last-child { border-bottom: 0; }
.boundary-list dt { color: var(--ink-soft); }
.boundary-list dd { margin: 0; color: var(--ink); font-family: var(--mono); font-size: 12px; font-weight: 600; }
.boundary-list .real-label { color: var(--green); }
.boundary-list .derived-label { color: var(--blue); }
.boundary-list .simulated-label { color: var(--violet); }

.section { padding-block: 84px; }
.section-heading { display: flex; gap: 40px; align-items: end; justify-content: space-between; margin-bottom: 34px; }
.section-heading > p { max-width: 480px; margin-bottom: 2px; color: var(--muted); text-align: right; }
.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.metric-card { padding: 22px; }
.metric-top, .card-heading, .detail-score-row { display: flex; gap: 14px; align-items: center; justify-content: space-between; }
.metric-top > span:first-child { color: var(--ink-soft); font-size: 14px; font-weight: 600; }
.metric-card > strong { display: block; margin: 20px 0 8px; font-family: var(--mono); font-size: 44px; line-height: 1; letter-spacing: -.05em; }
.metric-card > p { margin-bottom: 0; color: var(--muted); font-size: 13px; }
.pill { display: inline-flex; align-items: center; min-height: 26px; padding: 3px 8px; border: 1px solid; border-radius: 999px; font-family: var(--mono); font-size: 10px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; }
.pill-real { color: var(--green); background: var(--green-soft); border-color: #abefc6; }
.pill-derived { color: var(--blue); background: var(--blue-soft); border-color: #b2ddff; }
.pill-guarded { color: var(--amber); background: var(--amber-soft); border-color: #fedf89; }
.pill-mock { color: var(--violet); background: var(--violet-soft); border-color: #d9d6fe; }

.architecture-band { color: #fff; background: var(--dark); }
.light-heading .eyebrow { color: #84adff; }
.light-heading > p { color: #98a2b3; }
.flow { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr auto 1fr; gap: 10px; align-items: center; }
.flow-node { min-height: 132px; padding: 18px; background: var(--dark-card); border: 1px solid #344054; border-radius: 10px; }
.flow-node.active { border-top: 3px solid #53b1fd; }
.flow-node.simulated { border-top: 3px solid #9b8afb; }
.flow-node.guarded { border-top: 3px solid #fdb022; }
.flow-node strong, .flow-node small { display: block; }
.flow-node strong { margin-top: 14px; font-size: 14px; }
.flow-node small { margin-top: 4px; color: #98a2b3; font-size: 12px; }
.node-index { color: #84adff; font-family: var(--mono); font-size: 11px; }
.flow-arrow { color: #667085; }
.control-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; margin-top: 46px; padding-top: 34px; border-top: 1px solid #344054; }
.control-grid article { display: flex; gap: 12px; }
.control-grid svg { flex: 0 0 20px; color: #84adff; }
.control-grid strong { font-size: 14px; }
.control-grid p { margin: 5px 0 0; color: #98a2b3; font-size: 12px; }

.legend { display: flex; gap: 18px; color: var(--muted); font-size: 13px; }
.legend span { display: inline-flex; gap: 7px; align-items: center; }
.legend i { width: 9px; height: 9px; border-radius: 50%; }
.legend-high { background: var(--blue); }
.legend-watch { background: #7f56d9; }
.review-layout { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(290px, .75fr); gap: 18px; }
.table-card, .detail-card, .brief-card, .integration-card { overflow: hidden; }
.table-toolbar { display: flex; gap: 20px; align-items: center; justify-content: space-between; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.table-toolbar label { font-weight: 600; }
.search-wrap { position: relative; width: min(330px, 58%); }
.search-wrap svg { position: absolute; top: 50%; left: 12px; width: 17px; height: 17px; color: var(--muted); transform: translateY(-50%); pointer-events: none; }
.search-wrap input { width: 100%; min-height: 44px; padding: 9px 12px 9px 38px; color: var(--ink); background: #f9fafb; border: 1px solid #d0d5dd; border-radius: 9px; }
.table-scroll { overflow-x: auto; }
table { width: 100%; min-width: 660px; border-collapse: collapse; text-align: left; }
th, td { padding: 15px 20px; border-bottom: 1px solid #eaecf0; }
th { color: var(--muted); background: #f9fafb; font-family: var(--mono); font-size: 10px; letter-spacing: .05em; text-transform: uppercase; }
td { color: var(--ink-soft); font-size: 13px; }
td:first-child { color: var(--ink); font-weight: 600; }
tbody tr { cursor: pointer; transition: background-color 160ms ease; }
tbody tr:hover, tbody tr.selected { background: var(--blue-soft); }
tbody tr:focus-visible { outline: 3px solid rgba(23, 92, 211, .3); outline-offset: -3px; }
.score-cell { color: var(--blue); font-family: var(--mono); font-weight: 600; }
.table-empty { margin: 0; padding: 24px; color: var(--muted); }
.detail-card { padding: 24px; }
.detail-card h3 { min-height: 58px; margin-bottom: 16px; }
.detail-score-row > div strong { font-family: var(--mono); font-size: 42px; letter-spacing: -.06em; }
.detail-score-row > div span { margin-left: 5px; color: var(--muted); font-size: 13px; }
.score-track { height: 7px; margin: 14px 0 22px; overflow: hidden; background: #eaecf0; border-radius: 99px; }
.score-track span { display: block; width: 0; height: 100%; background: var(--blue); border-radius: inherit; transition: width 300ms ease; }
.score-breakdown { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; margin: 0 0 22px; }
.score-breakdown div { display: flex; justify-content: space-between; padding-bottom: 7px; border-bottom: 1px solid #eaecf0; }
.score-breakdown dt { color: var(--muted); font-size: 12px; }
.score-breakdown dd { margin: 0; font-family: var(--mono); font-size: 12px; font-weight: 600; }
.signal-preview { padding: 14px; background: #f9fafb; border-radius: 10px; }
.signal-preview > span, .field-label { display: block; margin-bottom: 6px; color: var(--muted); font-family: var(--mono); font-size: 10px; letter-spacing: .05em; text-transform: uppercase; }
.signal-preview p { display: -webkit-box; margin-bottom: 10px; overflow: hidden; color: var(--ink-soft); font-size: 12px; -webkit-box-orient: vertical; -webkit-line-clamp: 4; }
.signal-preview a { display: inline-flex; align-items: center; min-height: 44px; color: var(--blue); font-size: 12px; font-weight: 600; }

.two-column-section { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; padding-top: 0; }
.card-heading { min-height: 98px; padding: 20px 24px; border-bottom: 1px solid var(--line); }
.card-heading h2 { font-size: 28px; }
.brief-body { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; padding: 24px; }
.brief-body strong { text-transform: capitalize; }
.full-field { grid-column: 1 / -1; }
.full-field p { margin-bottom: 0; color: var(--ink-soft); }
.warning-field { padding: 14px; background: var(--violet-soft); border: 1px solid #d9d6fe; border-radius: 10px; }
.warning-field p { font-size: 13px; }
.provider-tabs { display: flex; gap: 8px; padding: 16px 20px 0; }
.provider-tab { min-height: 44px; padding: 7px 12px; color: var(--muted); background: transparent; border: 0; border-bottom: 2px solid transparent; font-weight: 600; cursor: pointer; }
.provider-tab:hover, .provider-tab.active { color: var(--blue); border-bottom-color: var(--blue); }
.integration-card pre { min-height: 285px; margin: 14px 20px 10px; padding: 18px; overflow: auto; color: #d1e9ff; background: #101828; border-radius: 10px; font-family: var(--mono); font-size: 11px; line-height: 1.6; }
.integration-note { margin: 0; padding: 8px 20px 20px; color: var(--muted); font-size: 12px; }

.proof-section { padding-top: 0; }
.proof-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.proof-grid a { display: flex; gap: 14px; min-height: 132px; padding: 20px; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; cursor: pointer; transition: border-color 180ms ease, box-shadow 180ms ease, background-color 180ms ease; }
.proof-grid a:hover { background: #fcfcfd; border-color: #84adff; box-shadow: 0 10px 26px rgba(16, 24, 40, .07); }
.proof-grid svg { flex: 0 0 22px; color: var(--blue); }
.proof-grid strong, .proof-grid span { display: block; }
.proof-grid strong { margin-bottom: 6px; }
.proof-grid span { color: var(--muted); font-size: 12px; }
footer { color: #fff; background: var(--dark); }
.footer-inner { min-height: 180px; padding-block: 38px; }
.footer-inner p { margin: 7px 0 0; color: #98a2b3; }
.footer-links a { color: #d0d5dd; }
noscript { display: block; padding: 16px; color: #fff; background: #b42318; text-align: center; }

@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; gap: 36px; min-height: auto; }
  .boundary-card { max-width: 620px; }
  .metric-grid, .control-grid, .proof-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .flow { grid-template-columns: 1fr 1fr 1fr; }
  .flow-arrow { display: none; }
  .review-layout { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .shell { width: min(100% - 28px, 1180px); }
  .header-actions .text-link { display: none; }
  .header-actions .button { padding-inline: 12px; }
  .hero { padding-block: 60px; }
  h1 { font-size: clamp(41px, 13vw, 58px); }
  .hero-lede { font-size: 17px; }
  .hero-actions, .section-heading, .footer-inner { align-items: stretch; flex-direction: column; }
  .section-heading { gap: 16px; }
  .section-heading > p { text-align: left; }
  .metric-grid, .two-column-section, .proof-grid { grid-template-columns: 1fr; }
  .flow { grid-template-columns: 1fr 1fr; }
  .control-grid { grid-template-columns: 1fr; }
  .table-toolbar { align-items: stretch; flex-direction: column; }
  .search-wrap { width: 100%; }
  .brief-body { grid-template-columns: 1fr; }
  .full-field { grid-column: 1; }
  .footer-inner { gap: 24px; }
  .footer-links { flex-wrap: wrap; }
}

@media (max-width: 430px) {
  .brand strong { max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .brand small { display: none; }
  .header-actions .button { min-width: 44px; padding-inline: 11px; font-size: 0; }
  .header-actions .button svg { margin: 0; }
  .flow { grid-template-columns: 1fr; }
  .legend { flex-direction: column; gap: 6px; }
  .provider-tabs { overflow-x: auto; }
}

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