:root {
  --paper: #f4f1e9;
  --paper-2: #e9e4d9;
  --ink: #12212f;
  --muted: #59636d;
  --line: #c9c5ba;
  --blue: #155d91;
  --blue-dark: #102a43;
  --blue-soft: #dce9f1;
  --green: #2d8661;
  --amber: #b56b22;
  --white: #fff;
  --black: #0d151d;
  --shell: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: Arial, Helvetica, sans-serif; font-size: 16px; line-height: 1.58; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
img { display: block; max-width: 100%; }
button, a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid #e79a3b; outline-offset: 4px; }
section[id] { scroll-margin-top: 92px; }
.skip-link { position: fixed; left: 12px; top: -70px; z-index: 100; padding: 10px 14px; background: var(--black); color: #fff; }
.skip-link:focus { top: 12px; }
.topline { height: 5px; background: linear-gradient(90deg, var(--blue), #2e8a76); }
.shell { width: min(calc(100% - 48px), var(--shell)); margin: 0 auto; }

.site-header { position: sticky; top: 0; z-index: 30; border-bottom: 1px solid var(--line); background: rgba(244, 241, 233, .96); backdrop-filter: blur(10px); }
.header-grid { min-height: 76px; display: grid; grid-template-columns: 205px 1fr; align-items: center; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; font-size: 20px; font-weight: 800; letter-spacing: -.02em; }
.brand img { width: 38px; height: 38px; border-radius: 7px; }
.main-nav { display: flex; justify-content: flex-end; align-items: center; gap: 23px; font-size: 13px; }
.main-nav a { text-decoration: none; }
.main-nav a:hover, .main-nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: 5px; }
.menu-button { display: none; border: 1px solid var(--ink); background: transparent; color: var(--ink); padding: 9px 12px; font: 700 12px/1 Arial, sans-serif; text-transform: uppercase; letter-spacing: .08em; cursor: pointer; }

.hero { padding: 96px 0 82px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(285px, .62fr); gap: 84px; align-items: start; }
.eyebrow { margin: 0 0 20px; color: var(--blue); font: 700 11px/1.4 Consolas, "Courier New", monospace; letter-spacing: .11em; }
h1 { max-width: 850px; margin: 0; font-size: clamp(48px, 6.2vw, 82px); line-height: .98; letter-spacing: -.057em; }
.intro { max-width: 780px; margin: 32px 0 0; color: #3e4852; font-size: 20px; }
.actions, .inline-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 18px; margin-top: 36px; }
.primary-action, .secondary-action { display: inline-flex; min-height: 48px; align-items: center; justify-content: center; padding: 0 19px; border: 1px solid var(--blue-dark); text-decoration: none; font-weight: 700; }
.primary-action { background: var(--blue-dark); color: #fff; }
.primary-action:hover { background: var(--blue); border-color: var(--blue); }
.secondary-action { background: transparent; color: var(--blue-dark); }
.secondary-action:hover { background: var(--blue-soft); }
.text-action { font-weight: 700; text-underline-offset: 4px; }
.trust-list { display: flex; flex-wrap: wrap; gap: 9px 24px; margin: 30px 0 0; padding: 20px 0 0; border-top: 1px solid var(--line); list-style: none; color: var(--muted); font-size: 13px; }
.trust-list li::before { content: "✓"; color: var(--green); margin-right: 7px; font-weight: 800; }
.hero-spec { margin-top: 7px; border-top: 3px solid var(--ink); }
.spec-head { padding: 13px 0 11px; border-bottom: 1px solid var(--line); font: 700 11px Consolas, monospace; letter-spacing: .1em; }
.hero-spec dl { margin: 0; }
.hero-spec dl > div { display: grid; grid-template-columns: 90px 1fr; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.hero-spec dt { color: var(--muted); }
.hero-spec dd { margin: 0; font-weight: 700; }
.status-dot { display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; background: var(--green); }
.spec-link { display: inline-block; margin-top: 15px; color: var(--blue); font-size: 13px; font-weight: 700; text-underline-offset: 4px; }

.release-strip { background: var(--blue-dark); color: #fff; }
.release-strip-grid { min-height: 66px; display: grid; grid-template-columns: 70px 150px 1fr auto; gap: 18px; align-items: center; font-size: 14px; }
.release-label, .release-strip strong { font-family: Consolas, "Courier New", monospace; }
.release-label { color: #aac3d5; font-size: 10px; letter-spacing: .1em; }
.release-strip a { color: #fff; text-underline-offset: 4px; }

.section { padding: 104px 0; border-bottom: 1px solid var(--line); }
.section-grid { display: grid; grid-template-columns: 205px minmax(0, 1fr); gap: 72px; }
.section-title { position: sticky; top: 105px; align-self: start; }
.section-number { display: block; margin-bottom: 11px; color: var(--blue); font: 700 12px Consolas, monospace; }
.section-title h2 { margin: 0; font-size: 23px; line-height: 1.2; letter-spacing: -.03em; }
.section-content { min-width: 0; }
.lead-line { max-width: 870px; margin: 0 0 25px; font-size: clamp(29px, 3.2vw, 44px); line-height: 1.13; letter-spacing: -.04em; font-weight: 800; }
.section-content > p:not(.lead-line):not(.api-note):not(.dark-note) { max-width: 820px; color: #46515b; }

.feature-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; margin-top: 48px; border: 1px solid var(--line); background: var(--line); }
.feature-card { min-height: 205px; padding: 28px; background: var(--paper); }
.feature-card > span, .notice-card > span, .legal-callout > span { color: var(--blue); font: 700 10px Consolas, monospace; letter-spacing: .1em; }
.feature-card h3 { margin: 28px 0 8px; font-size: 21px; }
.feature-card p { margin: 0; color: var(--muted); }

.section-dark { background: var(--black); color: #f4f5f5; border-bottom-color: #303840; }
.section-dark .section-number { color: #80b6d4; }
.section-dark .lead-line { color: #fff; }
.flow { display: grid; grid-template-columns: 1fr 36px 1fr 36px 1fr; align-items: stretch; margin-top: 44px; }
.flow article { display: flex; flex-direction: column; min-height: 265px; padding: 25px; border: 1px solid #3a4650; }
.flow article > span { color: #86bad4; font: 700 12px Consolas, monospace; }
.flow h3 { margin: 35px 0 10px; font-size: 20px; }
.flow p { margin: 0; color: #aeb8c0; }
.flow small { margin-top: auto; padding-top: 24px; color: #71818d; font: 700 10px Consolas, monospace; text-transform: uppercase; letter-spacing: .08em; }
.flow-arrow { display: grid; place-items: center; color: #7996aa; font-size: 25px; }
.ports { margin-top: 34px; border-top: 1px solid #46515b; }
.ports > div { display: grid; grid-template-columns: 140px 1fr; gap: 20px; padding: 15px 0; border-bottom: 1px solid #303840; }
.ports span { color: #bad1df; font: 700 13px Consolas, monospace; }
.ports p { margin: 0; color: #aeb8c0; }
.dark-note { max-width: 850px; margin-top: 24px; color: #8f9ca6; font-size: 13px; }

.data-list { margin-top: 42px; border-top: 2px solid var(--ink); }
.data-list article { display: grid; grid-template-columns: 160px 1.1fr 1fr; gap: 25px; padding: 24px 0; border-bottom: 1px solid var(--line); align-items: start; }
.data-list span { color: var(--blue); font: 700 12px Consolas, monospace; }
.data-list h3 { margin: 0; font-size: 17px; line-height: 1.45; }
.data-list p { margin: 0; color: var(--muted); font-size: 14px; }
.notice-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 38px; }
.notice-card { min-height: 195px; padding: 24px; border: 1px solid var(--line); background: #efebe2; }
.notice-card.accent { border-top: 4px solid var(--blue); }
.notice-card strong { display: block; margin-top: 24px; font-size: 23px; }
.notice-card p { margin: 8px 0 0; color: var(--muted); font-size: 13px; }

.section-paper { background: var(--paper-2); }
.steps-list { margin: 42px 0 0; padding: 0; border-top: 2px solid var(--ink); list-style: none; }
.steps-list li { display: grid; grid-template-columns: 60px 1fr; gap: 20px; padding: 24px 0; border-bottom: 1px solid #bbb6aa; }
.steps-list li > span { color: var(--blue); font: 700 12px Consolas, monospace; }
.steps-list h3 { margin: -4px 0 5px; font-size: 19px; }
.steps-list p { max-width: 740px; margin: 0; color: var(--muted); }
.legal-callout { margin-top: 38px; padding: 24px; border-left: 5px solid var(--amber); background: #f7f2e8; }
.legal-callout p { margin: 10px 0 0; max-width: 830px; }

.release-heading { display: flex; justify-content: space-between; align-items: end; gap: 30px; margin-bottom: 32px; }
.release-heading p:last-child { max-width: 680px; margin: 0; color: var(--muted); }
.release-heading a { white-space: nowrap; font-weight: 700; text-underline-offset: 4px; }
.release-list { border-top: 1px solid #4b535b; }
.release-row { display: grid; grid-template-columns: 130px 150px minmax(0, 1fr) 36px; gap: 22px; padding: 27px 0; border-bottom: 1px solid #353c43; align-items: start; }
.light-list { border-top-color: var(--line); }
.light-list .release-row { border-bottom-color: var(--line); }
.release-row.featured { border-top: 3px solid currentColor; }
.release-meta { display: flex; flex-direction: column; gap: 6px; color: #77828b; font: 10px Consolas, monospace; letter-spacing: .06em; }
.release-version { color: var(--blue); font: 700 14px Consolas, monospace; }
.release-copy h3 { margin: -3px 0 6px; font-size: 20px; }
.release-copy p { margin: 0; color: var(--muted); }
.release-stats { display: flex; gap: 14px; margin-top: 12px; color: var(--muted); font: 11px Consolas, monospace; }
.release-row > a { text-align: right; text-decoration: none; font-size: 24px; }
.api-note { margin: 15px 0 0; color: #77828b; font: 10px Consolas, monospace; }

.final-section { border-bottom: 0; }
.project-end { display: grid; grid-template-columns: 1.3fr .7fr; gap: 70px; }
.project-statement { margin: 0; font-size: clamp(30px, 3.5vw, 48px); line-height: 1.12; letter-spacing: -.04em; font-weight: 800; }
.project-links { display: flex; flex-direction: column; border-top: 2px solid var(--ink); }
.project-links a { padding: 14px 0; border-bottom: 1px solid var(--line); text-decoration: none; font-weight: 700; }
.project-links a:hover { padding-left: 6px; }

.site-footer { background: var(--blue-dark); color: #fff; padding: 55px 0 24px; }
.footer-main { display: grid; grid-template-columns: 1.5fr .7fr 1fr; gap: 70px; }
.footer-main > div { display: flex; flex-direction: column; align-items: flex-start; gap: 7px; }
.footer-main h2 { margin: 0 0 12px; color: #91abc0; font: 700 10px Consolas, monospace; letter-spacing: .1em; text-transform: uppercase; }
.footer-main a { color: #dfe8ef; font-size: 13px; text-underline-offset: 3px; }
.footer-brand strong { font-size: 23px; }
.footer-brand p { max-width: 350px; margin: 3px 0; color: #b8c8d4; }
.footer-brand span { color: #91abc0; font-size: 11px; }
.footer-bottom { display: flex; justify-content: space-between; gap: 25px; margin-top: 45px; padding-top: 20px; border-top: 1px solid #345069; color: #829db2; font-size: 11px; }

/* Legal pages */
.legal-hero { padding: 78px 0 65px; border-bottom: 1px solid var(--line); }
.legal-hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 80px; align-items: end; }
.legal-hero h1 { max-width: 850px; }
.legal-hero .intro { max-width: 850px; }
.policy-meta { padding: 20px 0; border-top: 3px solid var(--ink); border-bottom: 1px solid var(--line); font: 12px/1.8 Consolas, monospace; }
.policy-meta span { display: block; color: var(--muted); }
.legal-layout { display: grid; grid-template-columns: 225px minmax(0, 1fr); gap: 72px; padding: 78px 0 110px; }
.legal-toc { position: sticky; top: 105px; align-self: start; display: flex; flex-direction: column; border-top: 2px solid var(--ink); }
.legal-toc strong { padding: 14px 0 10px; font: 700 11px Consolas, monospace; letter-spacing: .08em; }
.legal-toc a { padding: 8px 0; color: var(--muted); text-decoration: none; font-size: 13px; }
.legal-toc a:hover { color: var(--blue); text-decoration: underline; }
.legal-content { min-width: 0; }
.legal-content > section { padding: 0 0 58px; scroll-margin-top: 105px; }
.legal-content > section + section { padding-top: 58px; border-top: 1px solid var(--line); }
.legal-content h2 { margin: 0 0 20px; font-size: clamp(28px, 3vw, 41px); line-height: 1.15; letter-spacing: -.035em; }
.legal-content h3 { margin: 28px 0 10px; font-size: 19px; }
.legal-content p { max-width: 850px; color: #3f4a54; }
.legal-content ul, .legal-content ol { max-width: 850px; padding-left: 22px; color: #3f4a54; }
.legal-content li { margin-bottom: 8px; }
.legal-content a { color: #105c91; text-underline-offset: 3px; }
.summary-box { margin-bottom: 55px; padding: 28px; border-left: 5px solid var(--green); background: #e8eee8; }
.summary-box h2 { font-size: 23px; }
.summary-box p:last-child { margin-bottom: 0; }
.policy-table-wrap { overflow-x: auto; margin: 28px 0; border: 1px solid var(--line); }
.policy-table { width: 100%; min-width: 760px; border-collapse: collapse; font-size: 13px; }
.policy-table th, .policy-table td { padding: 15px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.policy-table th { background: var(--blue-dark); color: #fff; font: 700 11px Consolas, monospace; letter-spacing: .04em; }
.policy-table td { background: #f7f4ed; }
.policy-table tr:last-child td { border-bottom: 0; }
.policy-table th:last-child, .policy-table td:last-child { border-right: 0; }
.role-grid, .law-grid, .check-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 28px 0; }
.role-card, .law-card, .check-card { padding: 24px; border: 1px solid var(--line); background: #f0ece3; }
.role-card span, .law-card span, .check-card span { color: var(--blue); font: 700 10px Consolas, monospace; letter-spacing: .08em; }
.role-card h3, .law-card h3, .check-card h3 { margin: 18px 0 7px; }
.role-card p, .law-card p, .check-card p { margin: 0; font-size: 14px; }
.source-list { padding: 0 !important; list-style: none; }
.source-list li { padding: 15px 0; border-bottom: 1px solid var(--line); }
.source-list a { font-weight: 700; }
.warning-box { margin: 28px 0; padding: 22px; border: 1px solid #d7b38b; background: #f7eadb; }
.warning-box strong { color: #7b4517; }
.version-note { color: var(--muted); font-size: 13px; }

@media (max-width: 980px) {
  .shell { width: min(calc(100% - 32px), var(--shell)); }
  .header-grid { grid-template-columns: 1fr auto; position: relative; }
  .menu-button { display: inline-block; }
  .main-nav { display: none; position: absolute; left: -16px; right: -16px; top: 76px; padding: 20px 16px 26px; border-bottom: 1px solid var(--line); background: var(--paper); flex-direction: column; align-items: flex-start; gap: 15px; }
  .main-nav.open { display: flex; }
  .hero-grid { grid-template-columns: 1fr; gap: 48px; }
  .section-grid { grid-template-columns: 1fr; gap: 33px; }
  .section-title { position: static; display: flex; align-items: baseline; gap: 12px; }
  .section-number { margin: 0; }
  .flow { grid-template-columns: 1fr; gap: 12px; }
  .flow-arrow { transform: rotate(90deg); min-height: 30px; }
  .flow article { min-height: 210px; }
  .data-list article { grid-template-columns: 145px 1fr; }
  .data-list p { grid-column: 2; }
  .legal-hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .policy-meta { max-width: 380px; }
  .legal-layout { grid-template-columns: 1fr; gap: 42px; }
  .legal-toc { position: static; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 15px; }
  .legal-toc strong { grid-column: 1 / -1; }
}

@media (max-width: 720px) {
  h1 { font-size: clamp(43px, 13vw, 62px); }
  .hero { padding: 68px 0 60px; }
  .intro { font-size: 18px; }
  .release-strip-grid { grid-template-columns: 65px 1fr; padding: 14px 0; }
  .release-strip-grid > span:nth-child(3), .release-strip-grid a { grid-column: 1 / -1; }
  .section { padding: 72px 0; }
  .feature-grid, .notice-grid, .role-grid, .law-grid, .check-grid { grid-template-columns: 1fr; }
  .data-list article { grid-template-columns: 1fr; gap: 9px; }
  .data-list p { grid-column: 1; }
  .release-heading { align-items: flex-start; flex-direction: column; }
  .release-row { grid-template-columns: 1fr 28px; gap: 10px 14px; }
  .release-meta, .release-version, .release-copy { grid-column: 1; }
  .release-row > a { grid-column: 2; grid-row: 1 / span 3; }
  .release-meta { flex-direction: row; gap: 12px; }
  .project-end, .footer-main { grid-template-columns: 1fr; gap: 38px; }
  .footer-bottom { flex-direction: column; }
  .legal-hero { padding: 58px 0 45px; }
  .legal-layout { padding: 55px 0 80px; }
  .legal-toc { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 430px) {
  .trust-list { flex-direction: column; }
  .actions, .inline-actions { align-items: stretch; flex-direction: column; }
  .primary-action, .secondary-action { width: 100%; }
  .ports > div { grid-template-columns: 105px 1fr; }
  .legal-toc { grid-template-columns: 1fr; }
  .legal-toc strong { grid-column: 1; }
}

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
