:root {
  --ink: #10283e;
  --muted: #5e7181;
  --paper: #f4f8fc;
  --white: #ffffff;
  --navy: #123960;
  --blue: #245f9f;
  --blue-dark: #174a82;
  --blue-pale: #eaf3fb;
  --line: #cfdeea;
  --shadow: 0 10px 28px rgba(18, 57, 96, .07);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background-color: var(--paper);
  background-image: linear-gradient(rgba(36,95,159,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(36,95,159,.035) 1px, transparent 1px);
  background-size: 32px 32px;
  font: 16px/1.65 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
a { color: var(--blue); text-underline-offset: .18em; }
a:hover { color: var(--blue-dark); }
.shell { width: min(1120px, calc(100% - 40px)); margin: 0 auto; }
.skip-link { position: absolute; left: -9999px; top: 8px; z-index: 10; background: white; padding: 8px 12px; }
.skip-link:focus { left: 8px; }
.site-header { background: rgba(255,255,255,.97); border-top: 4px solid var(--blue); border-bottom: 1px solid var(--line); }
.header-inner { min-height: 84px; display: flex; align-items: center; justify-content: space-between; gap: 28px; }
.brand { color: var(--ink); text-decoration: none; display: flex; align-items: center; gap: 14px; }
.brand:hover { color: var(--ink); }
.brand-logo { display: block; width: 104px; height: 50px; object-fit: contain; }
.brand-divider { width: 1px; height: 30px; background: var(--line); }
.brand-label { color: var(--muted); font: 700 12px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .09em; text-transform: uppercase; }
nav { display: flex; gap: 24px; flex-wrap: wrap; }
nav a { color: var(--muted); font-weight: 700; font-size: 13px; text-decoration: none; }
nav a:hover { color: var(--blue); }
.content { padding: 64px 0 88px; min-height: calc(100vh - 250px); }
.eyebrow { color: var(--blue); text-transform: uppercase; letter-spacing: .12em; font: 800 12px/1.3 ui-monospace, SFMono-Regular, Menlo, monospace; margin-bottom: 12px; }
h1, h2, h3 { color: var(--navy); line-height: 1.16; letter-spacing: -.025em; }
h1 { font-size: clamp(42px, 7vw, 72px); max-width: 820px; margin: 0 0 24px; }
h2 { font-size: clamp(28px, 4vw, 40px); margin: 64px 0 20px; }
h3 { font-size: 21px; margin: 0 0 10px; }
p { max-width: 780px; }
p, li, th, td { overflow-wrap: anywhere; }
.lede { font-size: clamp(19px, 2.5vw, 24px); color: #3f5e6c; max-width: 820px; line-height: 1.55; }
.hero { position: relative; padding: 26px 0 42px; }
.hero::after { content: ""; display: block; width: 88px; height: 4px; margin-top: 36px; background: var(--blue); }
.notice { margin: 30px 0; max-width: 850px; padding: 18px 22px; border-left: 4px solid var(--blue); background: var(--blue-pale); color: var(--navy); }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin: 28px 0 12px; }
.card { display: block; min-height: 190px; padding: 25px; color: var(--ink); text-decoration: none; background: var(--white); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow); }
.card:hover { color: var(--ink); border-color: #7ba7ce; transform: translateY(-2px); }
.card p { color: var(--muted); margin-bottom: 0; }
.card .arrow { color: var(--blue); font-weight: 800; }
.principles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; padding: 1px; background: var(--line); border-radius: 8px; overflow: hidden; margin: 28px 0; }
.principles > div { background: white; padding: 25px; }
.principles p { margin-bottom: 0; color: var(--muted); }
.architecture { display: grid; gap: 14px; margin: 34px 0; padding: 26px; background: var(--blue-pale); border: 1px solid var(--line); border-radius: 8px; }
.architecture .stage { position: relative; background: white; border: 1px solid var(--line); border-radius: 5px; padding: 18px 20px; }
.architecture .stage:not(:last-child)::after { content: "↓"; position: absolute; bottom: -23px; left: 50%; z-index: 2; width: 28px; height: 28px; margin-left: -14px; text-align: center; color: var(--blue); font-weight: 900; }
.architecture strong { display: block; color: var(--navy); }
.architecture span { color: var(--muted); }
table { width: 100%; border-collapse: collapse; margin: 26px 0; background: white; }
th, td { padding: 14px 16px; border: 1px solid var(--line); text-align: left; vertical-align: top; }
th { background: var(--blue-pale); color: var(--navy); }
blockquote { margin: 28px 0; padding: 18px 24px; border-left: 4px solid var(--blue); background: white; color: #38535f; }
code { background: #e7eef4; padding: .12em .35em; border-radius: 3px; }
footer { color: #b8cad2; background: var(--navy); }
.footer-inner { min-height: 160px; display: grid; grid-template-columns: 1fr 1.2fr 1fr; align-items: center; gap: 32px; }
footer p { margin: 0; }
footer a { color: #b8d8f3; }

@media (max-width: 820px) {
  .header-inner { align-items: flex-start; flex-direction: column; padding: 20px 0; }
  nav { gap: 12px 18px; }
  .content { padding-top: 44px; }
  .grid { grid-template-columns: 1fr; }
  .principles { grid-template-columns: 1fr; }
  .footer-inner { display: flex; align-items: flex-start; flex-direction: column; padding: 34px 0; }
  table { table-layout: fixed; font-size: .93rem; }
  th, td { padding: 11px 12px; }
}

@media (max-width: 480px) {
  .shell { width: min(100% - 32px, 1120px); }
  .header-inner { gap: 16px; }
  .brand-logo { width: 96px; height: 46px; }
  nav { gap: 9px 16px; }
  .content { padding-top: 38px; }
  h1 { font-size: 38px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .card:hover { transform: none; }
}
