/* light-lattice — shared theme. No external fonts or runtime dependencies. */
:root {
  color-scheme: light;
  --ink: #162b40;
  --muted: #536476;
  --blue: #245cce;
  --blue-dark: #1949a7;
  --line: #dbe3ed;
  --paper: #ffffff;
  --wash: #f4f7fc;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --serif: Georgia, "Times New Roman", serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}
* { box-sizing: border-box; }
html { background: var(--paper); }
body { margin: 0; color: var(--ink); font: 1rem/1.7 var(--sans); -webkit-font-smoothing: antialiased; }
::selection { background: #dce8ff; }
a { color: var(--blue); text-underline-offset: .22em; }
a:hover { color: var(--blue-dark); }
a:focus-visible { outline: 3px solid var(--blue); outline-offset: 5px; border-radius: 2px; }
svg { display: block; max-width: 100%; }
p { margin: 0 0 1.15rem; }
h1, h2, h3 { color: var(--ink); line-height: 1.2; font-weight: 500; margin: 0; overflow-wrap: anywhere; }
h1, h2 { font-family: var(--serif); }
h2 { font-size: 1.9rem; letter-spacing: -.025em; }
h3 { font-size: 1.02rem; font-weight: 600; }
.container { width: min(1120px, calc(100% - 96px)); margin-inline: auto; }
.skip-link { position: fixed; top: -100px; left: 1rem; z-index: 10; padding: .5rem 1rem; background: var(--ink); color: white; }
.skip-link:focus { top: 1rem; }
.masthead-inner { display: flex; align-items: center; justify-content: space-between; gap: 2rem; padding-block: 32px 28px; }
.brand { display: inline-flex; align-items: center; gap: 13px; color: var(--ink); text-decoration: none; }
.brand svg { width: 36px; height: 38px; flex: 0 0 auto; }
.brand-name { font-size: 1.65rem; font-weight: 600; letter-spacing: -.055em; line-height: 1.2; overflow-wrap: anywhere; }
.masthead-note { text-align: right; color: var(--muted); font-size: .875rem; line-height: 1.5; margin: 0; }
.masthead-note span { display: block; color: var(--ink); }
.primary-nav { border-bottom: 1px solid var(--line); background: var(--paper); }
.primary-nav ul { display: flex; flex-wrap: wrap; gap: 0 2.4rem; padding: 0; margin: 0 auto; list-style: none; }
.primary-nav a { position: relative; display: block; padding: 14px 0 15px; color: var(--muted); text-decoration: none; font-size: .95rem; white-space: nowrap; }
.primary-nav a:hover { color: var(--blue); }
.primary-nav a[aria-current] { color: var(--ink); font-weight: 600; }
.primary-nav a[aria-current]::after { position: absolute; bottom: -1px; left: 0; right: 0; content: ""; height: 3px; background: var(--blue); }
.eyebrow { font-family: var(--mono); font-size: .75rem; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--blue); }
.home-hero { display: grid; grid-template-columns: 1.65fr 1fr; align-items: center; gap: 3.2rem; padding-block: 64px 56px; }
.home-hero h1 { font-size: clamp(2.75rem, 4.7vw, 4rem); letter-spacing: -.05em; line-height: 1.1; margin: 20px 0 24px; }
.home-hero h1 em { font-weight: 400; color: var(--blue); }
.home-hero .intro { color: var(--muted); max-width: 600px; font-size: 1.05rem; line-height: 1.8; margin: 0; }
.lattice-figure { margin: 0; padding: 0; color: var(--blue); }
.lattice-figure svg { width: 100%; height: auto; }
.lattice-caption { font-family: var(--mono); font-size: .75rem; letter-spacing: .06em; color: var(--muted); text-align: center; }
.section-heading { border-top: 1px solid var(--line); display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; padding-block: 28px 20px; }
.section-heading h2 { font-size: 1.75rem; }
.algorithm-list { list-style: none; padding: 0; margin: 0; }
.algorithm-row { display: grid; grid-template-columns: 28px 190px minmax(0, 1fr) 24px; gap: 16px; align-items: center; padding: 25px 12px 25px 0; border-top: 1px solid var(--line); text-decoration: none; color: var(--ink); transition: background .15s ease; }
.algorithm-row:hover { background: var(--wash); color: var(--ink); }
.row-index { color: var(--muted); font: .75rem var(--mono); align-self: start; padding-top: 7px; }
.row-name { display: block; font-family: var(--serif); font-size: 1.7rem; letter-spacing: -.025em; line-height: 1.2; }
.row-type { display: block; font-size: .8125rem; color: var(--muted); margin-top: 4px; }
.row-summary { color: var(--muted); font-size: 1rem; line-height: 1.7; }
.arrow-icon { width: 21px; height: 21px; flex: 0 0 auto; }
.algorithm-row .arrow-icon { justify-self: end; color: var(--blue); }
.page-top { padding-block: 43px 28px; }
.page-top .eyebrow { display: flex; align-items: center; gap: 14px; }
.page-top .eyebrow::before { content: ""; width: 22px; height: 1px; background: var(--blue); }
.page-top h1 { font-size: clamp(3.25rem, 6vw, 4.5rem); letter-spacing: -.055em; margin: 14px 0 10px; }
.page-subtitle { color: var(--muted); margin: 0; font-size: 1.05rem; }
.name-accent { color: var(--blue); font-weight: 600; }
.secondary-nav { display: flex; flex-wrap: wrap; gap: 0 2rem; border-bottom: 1px solid var(--line); margin-bottom: 43px; }
.secondary-nav a { display: inline-block; position: relative; padding: 12px 0 14px; font-size: .9rem; color: var(--muted); text-decoration: none; }
.secondary-nav a[aria-current] { font-weight: 600; color: var(--blue); }
.secondary-nav a[aria-current]::after { position: absolute; content: ""; background: var(--blue); height: 2px; left: 0; right: 0; bottom: -1px; }
.content-grid { display: grid; grid-template-columns: minmax(0, 1fr) 284px; gap: 75px; align-items: start; }
.content-grid h2 { margin-bottom: 22px; }
.lead { font-size: 1.13rem; line-height: 1.85; color: var(--ink); }
.body-copy { color: var(--muted); line-height: 1.85; }
.features { padding: 0; margin: 34px 0 0; list-style: none; }
.feature { display: grid; grid-template-columns: 24px 1fr; gap: 16px; margin-top: 25px; }
.feature-number { font-family: var(--mono); color: var(--blue); font-size: .75rem; padding-top: 2px; }
.feature p { color: var(--muted); margin: 7px 0 0; font-size: 1rem; }
.facts { background: var(--wash); border-top: 2px solid var(--ink); padding: 23px 24px 25px; }
.facts h2 { font-family: var(--sans); font-size: .85rem; font-weight: 600; letter-spacing: .02em; margin-bottom: 21px; }
.facts dl { margin: 0; }
.facts dt { color: var(--muted); font-size: .8125rem; margin: 19px 0 3px; }
.facts dd { margin: 0; font-size: .9375rem; line-height: 1.55; overflow-wrap: anywhere; }
.fact-phrase { display: inline-block; white-space: nowrap; overflow-wrap: normal; }
.facts dt:first-child { margin-top: 0; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 23px; margin-top: 31px; }
.button { display: inline-flex; justify-content: center; align-items: center; gap: 15px; min-height: 45px; padding: 10px 18px; border: 1px solid var(--blue); background: var(--blue); color: #fff; font-size: .9rem; font-weight: 500; text-decoration: none; border-radius: 3px; }
.button:hover { background: var(--blue-dark); color: #fff; border-color: var(--blue-dark); }
.button .arrow-icon { width: 17px; height: 17px; }
.text-link { display: inline-flex; align-items: center; gap: 9px; font-size: .9rem; text-decoration: none; }
.text-link:hover { text-decoration: underline; }
.document { border: 1px solid var(--line); padding: 24px; display: flex; align-items: flex-start; gap: 20px; margin-top: 26px; }
.document-icon { width: 37px; height: 46px; flex: 0 0 auto; color: var(--blue); margin-top: 4px; }
.document h3 { font-size: 1.05rem; }
.document p { color: var(--muted); font-size: .875rem; margin: 6px 0 0; overflow-wrap: anywhere; }
.document .actions { margin-top: 20px; gap: 13px 21px; }
/* Specification history and implementation downloads. */
.history { margin-top: 36px; }
.history h3 { margin-bottom: 17px; }
.history-table { width: 100%; border-collapse: collapse; text-align: left; font-size: .9rem; }
.history-table th { font-size: .875rem; color: var(--muted); font-weight: 500; }
.history-table th, .history-table td { padding: 15px 13px; border-top: 1px solid var(--line); vertical-align: top; }
.history-table th:first-child, .history-table td:first-child { padding-left: 0; }
.history-table th:last-child, .history-table td:last-child { padding-right: 0; }
.history-table td:first-child { white-space: nowrap; }
.history-table td { color: var(--muted); overflow-wrap: anywhere; }
.version-link { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .2em; }
.document > div { min-width: 0; }
.footer { border-top: 1px solid var(--line); margin-top: 64px; padding-block: 24px 30px; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: start; gap: 28px; color: var(--muted); font-size: .8125rem; }
.footer-brand { color: var(--ink); text-decoration: none; font-weight: 600; }
.footer-info { text-align: right; }
.footer p { margin: 0; }
.footer .copyright { line-height: 1.7; }
.copyright a { color: var(--muted); font-weight: 400; text-decoration: underline; }
.copyright a:hover { color: var(--blue); }
@media (min-width: 1000px) {
  .row-type, .row-summary { white-space: nowrap; }
  .row-summary { font-size: clamp(.875rem, 1.4vw, 1rem); }
}
@media (max-width: 900px) {
  .container { width: calc(100% - 56px); }
  .home-hero { gap: 20px; grid-template-columns: 1.6fr 1fr; }
  .content-grid { gap: 32px; grid-template-columns: minmax(0, 1fr) 244px; }
  .facts { padding-inline: 20px; }
  .facts dd { font-size: .875rem; }
  .algorithm-row { grid-template-columns: 28px 130px 1fr 24px; gap: 17px; }
}
@media (max-width: 680px) {
  .container { width: calc(100% - 36px); }
  .masthead-inner { padding-block: 24px 18px; gap: 10px; }
  .brand-name { font-size: 1.5rem; }
  .brand svg { width: 30px; height: 34px; }
  .masthead-note { display: none; }
  .primary-nav ul { gap: 0; justify-content: space-between; }
  .primary-nav a { font-size: .875rem; padding-block: 14px; }
  .home-hero { grid-template-columns: 1fr; padding-block: 42px 36px; gap: 15px; }
  .home-hero h1 { font-size: clamp(2.6rem, 10vw, 3.6rem); max-width: 540px; }
  .home-hero .intro { font-size: 1rem; }
  .lattice-figure { max-width: 300px; width: 70%; justify-self: center; margin-top: 8px; }
  .lattice-figure svg { max-height: 200px; }
  .section-heading { align-items: flex-start; padding-top: 25px; }
  .section-heading h2 { font-size: 1.5rem; }
  .algorithm-row { grid-template-columns: 24px 1fr 24px; gap: 10px 13px; padding: 21px 3px 22px 0; }
  .row-title { grid-column: 2; }
  .row-name { font-size: 1.6rem; }
  .row-summary { grid-column: 2; grid-row: 2; font-size: .9375rem; }
  .algorithm-row .arrow-icon { grid-column: 3; grid-row: 1; }
  .page-top { padding-top: 34px; padding-bottom: 19px; }
  .page-top h1 { font-size: 3.2rem; }
  .page-subtitle { font-size: .9375rem; }
  .secondary-nav { gap: 1.75rem; margin-bottom: 31px; }
  .content-grid { grid-template-columns: 1fr; gap: 34px; }
  .content-grid h2 { font-size: 1.8rem; margin-bottom: 18px; }
  .lead { font-size: 1.0625rem; }
  .facts h2 { font-size: .875rem; }
  .facts dl { display: grid; grid-template-columns: 90px 1fr; gap: 15px 22px; }
  .facts dt { margin: 0; }
  .facts dd { font-size: .875rem; }
  .document { padding: 21px 17px; gap: 14px; }
  .document-icon { width: 28px; height: 36px; }
  .document .actions { gap: 15px; }
  .history-table { font-size: .875rem; }
  .history-table th, .history-table td { padding: 12px 6px; }
  .history-table th:first-child, .history-table td:first-child { padding-left: 0; }
  .history-table th:last-child, .history-table td:last-child { padding-right: 0; }
  .footer { margin-top: 43px; grid-template-columns: 1fr; gap: 8px; }
  .footer-info { text-align: left; }
}
@media (max-width: 420px) {
  .facts dl { display: block; }
  .facts dt { margin: 19px 0 3px; }
}
@media (max-width: 359px) {
  .container { width: calc(100% - 28px); }
  .primary-nav a { font-size: .8125rem; }
  .secondary-nav { gap: 1.4rem; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
@media print {
  .container { width: 100%; }
  .primary-nav, .secondary-nav, .skip-link { display: none; }
  .masthead-inner { padding-block: 12px; }
  .home-hero { padding-block: 24px; }
  .content-grid { grid-template-columns: 1fr; }
  .content-grid aside { display: none; }
  .footer { margin-top: 24px; }
  a { color: var(--ink); }
  .feature, .algorithm-row, .history-table tr { break-inside: avoid; }
}
