:root {
  --ink: #211d18;
  --blue: #2b3a55;
  --blue-dark: #1b2740;
  --red: #a6291f;
  --paper: #fbf9f4;
  --paper-2: #f1ead9;
  --rule: #ded2b8;
  --muted: #6b6152;
  --serif: "IBM Plex Serif", Georgia, "Times New Roman", serif;
  --sans: "IBM Plex Sans", "Segoe UI", Arial, sans-serif;
  --mono: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
  --wrap: 1120px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--sans); font-size: 17px; line-height: 1.6; color: var(--ink); background: var(--paper); }
img { max-width: 100%; }
a { color: var(--blue); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; }
.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: #fff; padding: 8px 12px; z-index: 100; }
.skip:focus { left: 8px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 760px; }

h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.15; margin: 0 0 .5em; letter-spacing: -0.01em; }
h1 { font-size: clamp(2rem, 4.2vw, 3.1rem); }
h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); margin-top: 0; }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
.lead { font-size: 1.2rem; color: var(--muted); max-width: 42em; }
.lead-strong { font-size: 1.2rem; font-weight: 500; max-width: 40em; border-left: 4px solid var(--red); padding-left: 16px; }
.source, .note, .meta { font-size: .9rem; color: var(--muted); }
.meta a { color: var(--muted); }

/* header */
.site-header { border-bottom: 1px solid var(--rule); background: var(--paper); position: sticky; top: 0; z-index: 20; }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; flex-wrap: wrap; }
.brand { text-decoration: none; color: var(--ink); display: flex; flex-direction: column; line-height: 1.1; padding: 10px 0; }
.brand-name { font-family: var(--serif); font-weight: 600; font-size: 1.35rem; }
.brand-tag { font-size: .82rem; color: var(--muted); }
.nav { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; }
.nav a { text-decoration: none; color: var(--ink); font-weight: 500; font-size: .97rem; padding: 6px 0; border-bottom: 2px solid transparent; }
.nav a[aria-current="page"] { border-bottom-color: var(--red); }
.nav a:hover { border-bottom-color: var(--rule); }
.nav-cta { color: var(--blue) !important; font-family: var(--serif); font-size: 1.05rem !important; }
.nav-toggle { display: none; background: none; border: 1px solid var(--rule); padding: 8px 14px; font: inherit; border-radius: 4px; }
@media (max-width: 900px) {
  .nav-toggle { display: inline-block; }
  .nav { display: none; width: 100%; flex-direction: column; align-items: flex-start; gap: 4px; padding-bottom: 14px; }
  .nav.open { display: flex; }
}

/* buttons */
.btn { display: inline-block; padding: 14px 22px; border-radius: 4px; text-decoration: none; font-weight: 600; font-size: 1rem; border: 2px solid transparent; cursor: pointer; font-family: var(--sans); }
.btn-primary { background: var(--red); color: #fff; border-color: var(--red); }
.btn-primary:hover { background: #971f18; border-color: #971f18; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-ghost:hover { background: var(--paper-2); }

/* hero */
.hero { padding: 52px 0 44px; background: var(--paper-2); }
.hero-grid { display: grid; grid-template-columns: .95fr 1.05fr; gap: 52px; align-items: start; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin: 26px 0 10px; }
.hero-note { color: var(--muted); font-size: .95rem; }
.hero-doc { position: relative; }
.doc { background: var(--paper); border: 1px solid var(--rule); box-shadow: 0 1px 0 var(--rule), 0 22px 44px rgba(33,29,24,.12); padding: 30px 32px 26px; }
.doc-ref { display: flex; justify-content: space-between; gap: 10px; font-family: var(--mono); font-size: .72rem; letter-spacing: .01em; color: var(--muted); border-bottom: 1px solid var(--rule); padding-bottom: 14px; margin-bottom: 20px; }
.doc-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 4px; }
.doc-row span { font-size: .88rem; color: var(--muted); }
.doc-row .mono { font-family: var(--mono); font-size: 1.3rem; color: var(--ink); white-space: nowrap; }
.doc-row .strike { position: relative; color: var(--muted); }
.doc-row .strike::after { content: ""; position: absolute; left: -2px; right: -2px; top: 52%; height: 2px; background: var(--red); transform: rotate(-3deg); }
.doc-line { height: 8px; background: var(--paper-2); margin: 14px 0; border-radius: 1px; }
.w40 { width: 40%; } .w50 { width: 50%; } .w60 { width: 60%; } .w70 { width: 70%; } .w80 { width: 80%; } .w90 { width: 90%; }
.doc-annotation { margin: 18px 0; padding: 10px 14px; border-left: 3px solid var(--red); color: var(--red); font-family: var(--serif); font-style: italic; font-size: .95rem; line-height: 1.35; }
.doc-final { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--rule); }
.doc-final span { font-size: .85rem; color: var(--muted); }
.doc-final strong { font-family: var(--mono); font-size: 1.9rem; color: var(--ink); }
.doc-caption { margin: 14px 4px 0; font-size: .82rem; color: var(--muted); }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } .hero-doc { max-width: 460px; } }

/* sections */
.section { padding: 56px 0; }
.section-alt { background: var(--paper-2); }
.page-head { padding: 48px 0 24px; border-bottom: 1px solid var(--rule); background: var(--paper-2); }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 900px) { .two-col, .grid-3 { grid-template-columns: 1fr; } }
.figures { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; margin: 24px 0 8px; }
.figures div { border-top: 3px solid var(--blue); padding-top: 12px; }
.figures strong { display: block; font-family: var(--serif); font-size: 2.2rem; line-height: 1; margin-bottom: 8px; color: var(--blue-dark); }
.figures span { font-size: .95rem; color: var(--muted); }
@media (max-width: 900px) { .figures { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .figures { grid-template-columns: 1fr; } }
.checklist { list-style: none; padding: 0; margin: 0; }
.checklist li { padding: 10px 0 10px 32px; position: relative; border-bottom: 1px solid var(--rule); }
.checklist li::before { content: ""; position: absolute; left: 4px; top: 18px; width: 12px; height: 12px; border: 2px solid var(--blue); border-radius: 50%; }
.steps { counter-reset: step; list-style: none; padding: 0; margin: 20px 0 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.steps li { counter-increment: step; position: relative; padding-top: 52px; }
.steps li::before { content: counter(step); position: absolute; top: 0; left: 0; width: 40px; height: 40px; border-radius: 50%; background: var(--ink); color: #fff; font-family: var(--serif); font-size: 1.2rem; display: grid; place-items: center; }
.steps-compact { grid-template-columns: 1fr; gap: 8px; }
.steps-compact li { padding: 4px 0 8px 56px; }
.steps-compact li::before { top: 4px; }
@media (max-width: 900px) { .steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .steps { grid-template-columns: 1fr; } }
.tile { display: block; text-decoration: none; color: var(--ink); background: #fff; border: 1px solid var(--rule); padding: 22px; border-top: 3px solid var(--ink); }
.tile:hover { border-top-color: var(--red); }
.tile h3 { font-size: 1.1rem; }
.tile p { margin: 0; color: var(--muted); font-size: .95rem; }

/* faq */
.faq details { border-bottom: 1px solid var(--rule); }
.faq summary { cursor: pointer; padding: 14px 0; font-weight: 600; list-style: none; position: relative; padding-right: 30px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 10px; font-size: 1.4rem; color: var(--blue); }
.faq details[open] summary::after { content: "–"; }
.faq p { color: var(--muted); padding-bottom: 8px; }
.faq-page summary { font-family: var(--serif); font-size: 1.1rem; }

/* article layout */
.article-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 56px; align-items: start; }
@media (max-width: 900px) { .article-grid { grid-template-columns: 1fr; gap: 32px; } }
.prose { max-width: 70ch; }
.prose h2 { margin-top: 1.6em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-bottom: .4em; }
.deflist dt { font-weight: 600; margin-top: 1em; }
.deflist dd { margin: 4px 0 0; color: var(--muted); }
.side { position: sticky; top: 88px; }
.side-box { border: 1px solid var(--rule); padding: 20px; margin-bottom: 20px; background: #fff; }
.side-box h3 { font-size: 1.05rem; }
.side-box dl { margin: 0; }
.side-box dt { font-weight: 600; font-size: .92rem; margin-top: 10px; }
.side-box dd { margin: 0; color: var(--muted); font-size: .92rem; }
.side-box ul { padding-left: 1.1em; margin: 0; color: var(--muted); font-size: .95rem; }
.side-cta { background: var(--paper-2); border-color: var(--paper-2); }
.side-cta .btn { width: 100%; text-align: center; }
.side-link { display: block; text-decoration: none; padding: 8px 0; border-bottom: 1px solid var(--rule); font-size: .93rem; }
.table { border-collapse: collapse; width: 100%; margin: 12px 0 24px; }
.table th, .table td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--rule); }
.table th { font-weight: 500; color: var(--muted); width: 60%; }
.table td { font-family: var(--serif); font-size: 1.15rem; }
.table tr:last-child td { color: var(--red); font-weight: 600; }
.team { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 700px) { .team { grid-template-columns: 1fr; } }
.avatar { width: 88px; height: 88px; border-radius: 50%; background: var(--paper-2); border: 1px solid var(--rule); margin-bottom: 10px; }
.member p { font-size: .93rem; color: var(--muted); }
.author-box { border-top: 1px solid var(--rule); margin-top: 32px; padding-top: 16px; font-size: .95rem; color: var(--muted); }

/* blog list */
.post-list { display: grid; gap: 0; max-width: 760px; }
.post { display: block; text-decoration: none; color: var(--ink); padding: 24px 0; border-bottom: 1px solid var(--rule); }
.post time { color: var(--muted); font-size: .9rem; }
.post h2 { font-size: 1.4rem; margin: 4px 0 8px; }
.post p { margin: 0; color: var(--muted); }
.post:hover h2 { color: var(--blue); }

/* form */
.form { max-width: 640px; }
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 500; margin-bottom: 6px; }
.field input, .field select, .field textarea { width: 100%; font: inherit; padding: 12px; border: 1px solid #9aa5b5; border-radius: 4px; background: #fff; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 600px) { .field-row { grid-template-columns: 1fr; } }
.check { font-weight: 400 !important; display: flex !important; gap: 10px; align-items: flex-start; }
.check input { width: auto; margin-top: 5px; }
.hp { position: absolute; left: -9999px; }
.big-link { font-family: var(--serif); font-size: 1.5rem; text-decoration: none; color: var(--ink); }

/* cta band */
.cta-band { background: var(--ink); color: #fff; padding: 48px 0; }
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255,255,255,.8); max-width: 48em; margin: 0; }
.cta-row { display: flex; justify-content: space-between; align-items: center; gap: 32px; flex-wrap: wrap; }
.cta-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.cta-band .btn-ghost { color: #fff; border-color: #fff; }
.cta-band .btn-ghost:hover { background: rgba(255,255,255,.1); }

/* footer */
.site-footer { background: var(--paper-2); padding: 48px 0 24px; font-size: .93rem; color: var(--muted); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer .brand-name { color: var(--ink); margin-bottom: 4px; }
.footer-title { font-weight: 600; color: var(--ink); margin-bottom: 8px; }
.site-footer a { display: block; color: var(--muted); text-decoration: none; padding: 3px 0; }
.site-footer a:hover { color: var(--blue); }
.site-footer p a { display: inline; }
.footer-note { font-size: .82rem; }
.footer-bottom { border-top: 1px solid var(--rule); margin-top: 32px; padding-top: 16px; }
.footer-bottom p { margin: 0; }

.page-head.has-video { position: relative; overflow: hidden; padding: 72px 0 56px; background: var(--blue-dark); border-bottom: 0; }
.page-head.has-video .head-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .55; }
.page-head.has-video::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(27,39,64,.92) 0%, rgba(27,39,64,.7) 55%, rgba(27,39,64,.35) 100%); }
.page-head.has-video .wrap { position: relative; z-index: 1; }
.page-head.has-video h1, .page-head.has-video .lead { color: #fff; }
.page-head.has-video .lead { color: #e9e3d3; max-width: 640px; }
@media (max-width: 700px) { .page-head.has-video { padding: 48px 0 36px; } }
.clip { margin: 8px 0 28px; border: 1px solid var(--rule); border-radius: 4px; overflow: hidden; background: var(--blue-dark); }
.clip video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.model { border-left: 3px solid var(--red); background: var(--paper-2); padding: 14px 20px; margin: 16px 0 28px; font-size: .95rem; }
.model p { margin: 0 0 .8em; }
.model p:last-child { margin-bottom: 0; }
.related { border-top: 1px solid var(--rule); margin-top: 32px; padding-top: 4px; }
.related h2 { font-size: 1.15rem; }
.related ul { padding-left: 1.2em; }
.callout { border-left: 3px solid var(--red); background: var(--paper-2); padding: 12px 18px; margin: 0 0 1.6em; }
