@font-face {
  font-family: Montserrat;
  src: url("../fonts/montserrat-variable.ttf") format("truetype");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --navy: #132632;
  --deep: #09151e;
  --ink: #e0edf2;
  --slate: #acbfca;
  --accent: #78d7e4;
  --silver: #cadde5;
  --canvas: #101d27;
  --panel: #182e3b;
  --panel-raised: #203b48;
  --highlight: #193e49;
  --line: #385563;
  --shadow: 0 3px 5px #030b1240, 0 16px 32px #030b123b;
  --gill-lines: repeating-linear-gradient(108deg, transparent 0 9px, #78d7e480 9px 11px, transparent 11px 16px);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.65;
  background: var(--canvas);
  color: var(--ink);
}

* { box-sizing: border-box; }
html { scroll-padding-top: 2rem; }
body { margin: 0; background-image: repeating-linear-gradient(135deg, transparent 0 6px, #c4e4ec04 6px 7px); }
img { max-width: 100%; height: auto; }
a { color: var(--accent); text-underline-offset: .22em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
a, summary { -webkit-tap-highlight-color: #78d7e440; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 5px; border-radius: 2px; }
::selection { background: var(--accent); color: var(--deep); }
h1, h2, h3, .brand { font-family: Montserrat, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(2.6rem, 5.4vw, 4.5rem); line-height: 1.1; letter-spacing: -.058em; font-weight: 650; }
h2 { font-size: clamp(1.7rem, 3vw, 2.55rem); line-height: 1.18; letter-spacing: -.04em; font-weight: 650; }
h3 { font-size: 1.17rem; line-height: 1.35; letter-spacing: -.025em; font-weight: 650; }
p { margin-bottom: 1.15rem; }
strong { font-weight: 650; }
code, pre { font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; font-size: .86em; }
:not(pre) > code { background: var(--panel-raised); color: var(--ink); padding: .13em .32em; border-radius: 3px; overflow-wrap: anywhere; }
pre { margin: 0; padding: 1.5rem; line-height: 1.85; overflow-x: auto; tab-size: 2; }
pre code { font-size: inherit; }
ul, ol { padding-left: 1.35rem; }
li + li { margin-top: .4rem; }
.container { width: min(1200px, calc(100% - 6rem)); margin-inline: auto; }
.skip-link { position: absolute; left: 1rem; top: -100px; z-index: 10; background: var(--deep); padding: .8rem 1.2rem; }
.skip-link:focus { top: 1rem; }
.site-header { border-bottom: 1px solid var(--line); background: linear-gradient(var(--panel), var(--navy)); box-shadow: inset 0 1px #c4e4ec1a, 0 3px 12px #0002; position: relative; z-index: 2; }
.header-inner { min-height: 96px; display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.brand { display: inline-flex; align-items: center; gap: .55rem; color: var(--ink); text-decoration: none; font-weight: 750; font-size: 1.55rem; letter-spacing: -.075em; white-space: nowrap; min-height: 44px; }
.brand-db { font-weight: 450; }
.desktop-nav { display: flex; gap: 1.6rem; align-items: center; }
.desktop-nav a { text-decoration: none; color: var(--ink); font-size: .83rem; font-weight: 550; padding-block: .8rem; }
.desktop-nav a:hover, a[aria-current="page"] { color: var(--accent); text-decoration: underline; text-decoration-thickness: 2px; }
.mobile-nav { display: none; }
.hero { color: var(--ink); background: radial-gradient(ellipse at 83% 45%, var(--highlight) 0, transparent 56%), linear-gradient(120deg, var(--navy), var(--deep)); position: relative; overflow: hidden; padding-bottom: 1px; }
.hero::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(112deg, transparent 0 85px, #96c9da09 86px 87px, transparent 88px 170px); }
.hero::after, .inset-section::before, .inset-section::after, .site-footer::before { content: ""; position: absolute; inset-inline: 0; height: 1px; background: linear-gradient(90deg, transparent, #78d7e480, #cadde54d, transparent); box-shadow: 0 1px 8px #78d7e412; pointer-events: none; }
.hero::after, .inset-section::after { bottom: 0; }
.inset-section::before, .site-footer::before { top: 0; }
.hero-inner { display: grid; grid-template-columns: 1.18fr 1fr; align-items: center; gap: 1rem; padding-block: 5.8rem 4.4rem; position: relative; }
.hero h1 { font-size: clamp(2.8rem, 5.7vw, 4.85rem); margin-bottom: 1.6rem; }
.hero h1 span { color: var(--accent); }
.hero-copy > p { max-width: 32rem; font-size: 1.1rem; line-height: 1.7; color: var(--slate); }
.hero-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 1rem 1.6rem; margin-top: 2rem; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: .65rem; min-height: 48px; padding: .75rem 1.15rem; border-radius: 5px; border: 1px solid #c6edf2; background: linear-gradient(#b4e4eb, #77bccd); box-shadow: inset 0 1px #ecfaff99, 0 3px 0 #3f7787, 0 7px 16px #0004; text-decoration: none; color: var(--deep); font-weight: 650; font-size: .88rem; }
.button:hover { background: linear-gradient(#c7eef3, #90cfdb); }
.button img, .text-link img { width: 20px; height: 20px; }
.hero .text-link { color: var(--ink); }
.text-link img, .next-page img { filter: invert(80%) sepia(21%) saturate(856%) hue-rotate(141deg) brightness(99%) contrast(90%); }
.text-link { position: relative; display: inline-flex; align-items: center; gap: .6rem; width: fit-content; max-width: 100%; min-height: 44px; padding-block: .4rem; font-weight: 600; font-size: .88rem; text-decoration: none; }
.text-link::after { content: ""; position: absolute; inset-inline: 0; bottom: .35rem; height: 1px; background: currentColor; pointer-events: none; }
.text-link:hover::after, .text-link:focus-visible::after { height: 2px; }
.text-link img, .text-link > [aria-hidden="true"] { flex-shrink: 0; }
.hero-art { margin: 0 -1rem 0 0; align-self: center; min-width: 0; }
.hero-art img { width: 100%; display: block; }
.hero-art figcaption { color: var(--slate); text-align: center; font-size: .75rem; letter-spacing: .015em; margin-top: -.5rem; }
.design-note { display: flex; align-items: baseline; gap: .8rem; border-top: 1px solid var(--line); padding-block: 1.1rem; font-size: .78rem; color: var(--slate); }
.design-note p { margin: 0; }
.design-note strong { white-space: nowrap; color: var(--accent); }
.section { padding-block: 5rem; }
.section-heading { max-width: 42rem; margin-bottom: 2.7rem; }
.section-heading p { color: var(--slate); font-size: 1.05rem; }
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2.8rem; }
.pillar { border-top: 1px solid var(--line); padding-top: 1.5rem; }
.icon-tile { display: grid; place-items: center; width: 48px; height: 48px; background: linear-gradient(#c9dee6, #83acbc); border: 1px solid #c1d9e2; border-radius: 9px 9px 16px 9px; box-shadow: inset 0 1px #ecfaff70, 0 3px 0 #42697c, 0 5px 9px #0003; margin-bottom: 1.3rem; }
.icon-tile img { width: 28px; height: 28px; }
.pillar p { color: var(--slate); font-size: .95rem; }
.split-panel { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; }
.split-panel > *, .guide-layout > *, .cards > * { min-width: 0; }
.inset-section { position: relative; background: linear-gradient(110deg, var(--panel), var(--navy)); box-shadow: inset 0 2px 5px #0002; }
.code-panel { overflow: hidden; border: 1px solid var(--line); border-radius: 9px; background: var(--deep); color: var(--ink); box-shadow: 0 4px 0 #0c131b, 0 14px 28px #0003; }
.code-caption { border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; gap: 1rem; background: linear-gradient(var(--panel-raised), var(--panel)); padding: .7rem 1.15rem; color: var(--slate); font-size: .73rem; }
.code-caption span:last-child { color: var(--accent); }
.kw { color: var(--silver); }
.literal { color: var(--accent); }
.code-comment { color: var(--slate); }
.split-copy p { color: var(--slate); }
.small-note { color: var(--slate); font-size: .8rem; margin-top: 1rem; }
.dark-panel { position: relative; background: linear-gradient(125deg, var(--deep), var(--navy)); color: var(--ink); border: 1px solid var(--line); border-radius: 10px 10px 28px 10px; padding: 3rem; box-shadow: inset 0 1px #c4e4ec20, var(--shadow); }
.dark-panel::after { content: ""; position: absolute; top: 7px; right: 1.4rem; width: 50px; height: 13px; background-image: var(--gill-lines); pointer-events: none; }
.dark-panel > * { position: relative; }
.dark-panel p { color: var(--slate); max-width: 38rem; }
.dark-panel .text-link { color: var(--accent); }
.flow { list-style: none; padding: 0; margin: 2rem 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: .6rem; }
.flow li { margin: 0; position: relative; padding: 1rem; border: 1px solid #537788; border-radius: 5px; background: linear-gradient(var(--panel-raised), var(--panel)); box-shadow: inset 0 1px #c4e4ec20, 0 3px 0 #0c131b; }
.flow span { color: var(--accent); display: block; font-size: .72rem; margin-bottom: .4rem; }
.flow strong { font-size: .92rem; }
.flow li:not(:last-child)::after { content: ""; width: .6rem; height: 1px; background: var(--accent); position: absolute; left: 100%; top: 50%; }
.closing { display: flex; justify-content: space-between; gap: 2rem; align-items: center; margin-top: 3rem; }
.closing h2 { font-size: 1.8rem; margin-bottom: .6rem; }
.closing p { color: var(--slate); margin: 0; }
.guide-heading { padding-block: 4.4rem 3rem; }
.guide-heading h1 { max-width: 1000px; margin-bottom: 1.5rem; }
.lead { max-width: 47rem; color: var(--slate); font-size: 1.15rem; margin-bottom: 0; }
.guide-layout { display: grid; grid-template-columns: 225px minmax(0, 1fr); gap: 4.5rem; align-items: start; padding-bottom: 5rem; }
.guide-sidebar { position: sticky; top: 2rem; border-top: 1px solid var(--line); padding-top: 1.1rem; }
.guide-sidebar::before { content: ""; position: absolute; top: -7px; right: 0; width: 50px; height: 13px; background-color: var(--canvas); background-image: var(--gill-lines); pointer-events: none; }
.contents-title { font-weight: 650; font-size: .85rem; margin-bottom: .5rem; }
.guide-sidebar nav a { display: block; text-decoration: none; font-size: .81rem; color: var(--slate); min-height: 44px; padding: .6rem 0; }
.guide-sidebar nav a:hover { color: var(--accent); text-decoration: underline; }
.sidebar-note { font-size: .74rem; line-height: 1.7; color: var(--slate); border-top: 1px solid var(--line); padding-top: 1.1rem; margin-top: 1.2rem; }
.guide-body { max-width: 790px; }
.guide-body > section { margin-bottom: 3.7rem; }
.guide-body > section > h2 { font-size: clamp(1.6rem, 2.5vw, 2.1rem); margin-bottom: 1.3rem; }
.guide-body p, .guide-body li { max-width: 72ch; }
.guide-body .code-panel { margin-block: 1.5rem; }
.callout { background: var(--highlight); border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: 0 5px 5px 0; padding: 1.2rem 1.4rem; margin-block: 1.5rem; font-size: .9rem; }
.callout p:last-child { margin-bottom: 0; }
.cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; margin-block: 1.5rem; }
.card { background: linear-gradient(140deg, var(--panel-raised), var(--panel)); border: 1px solid var(--line); border-radius: 7px 7px 18px 7px; padding: 1.5rem; box-shadow: inset 0 1px #c4e4ec20, var(--shadow); }
.card p { color: var(--slate); font-size: .92rem; margin-bottom: 0; }
.card h3 { margin-bottom: .7rem; }
.card ul { font-size: .9rem; color: var(--slate); margin-bottom: 0; }
.record-versions { display: grid; gap: .7rem; margin-block: 1.7rem; padding: 1.5rem; background: var(--deep); border: 1px solid var(--line); border-radius: 8px; }
.record-versions > div { display: grid; grid-template-columns: 95px 1fr; gap: 1rem; padding: .9rem 1.1rem; background: linear-gradient(var(--panel-raised), var(--panel)); border: 1px solid var(--line); box-shadow: 0 3px 0 #0c131b, inset 0 1px #c4e4ec20; border-radius: 4px; font-size: .9rem; }
.record-versions .current-version { border-color: var(--accent); background: var(--highlight); }
.record-versions strong { font-size: .78rem; }
.record-versions code { background: none; padding: 0; }
.record-versions figcaption { font-size: .77rem; color: var(--slate); margin-top: .5rem; }
.table-scroll { max-width: 100%; overflow: auto; margin-block: 1.5rem; border: 1px solid var(--line); border-radius: 5px; background: var(--panel); }
table { border-collapse: collapse; width: 100%; font-size: .87rem; }
th, td { padding: .9rem 1rem; text-align: left; vertical-align: top; }
th { background: var(--highlight); font-weight: 650; }
td { border-top: 1px solid var(--line); }
.source-notes { border-top: 1px solid var(--line); padding-top: 1.5rem; color: var(--slate); overflow-wrap: anywhere; }
.guide-body .source-notes h2 { font-size: 1rem; }
.source-notes p, .source-notes li { font-size: .75rem; }
.next-page { display: flex; justify-content: space-between; align-items: center; gap: 1rem; background: var(--panel); border: 1px solid var(--line); border-radius: 6px; text-decoration: none; padding: 1.1rem 1.3rem; margin-bottom: 2.5rem; font-weight: 600; box-shadow: inset 0 1px #c4e4ec20; }
.next-page img { width: 24px; }
.document-list { display: grid; gap: 1rem; }
.document-list .card { display: grid; grid-template-columns: 48px 1fr; gap: 1rem; }
.document-list .icon-tile { margin-bottom: 0; }
.document-list .text-link { margin-top: .8rem; }
.document-list small { display: block; font-size: .75rem; color: var(--slate); }
.site-footer { position: relative; background: linear-gradient(var(--navy), var(--deep)); padding-top: 3rem; }
.footer-top { display: flex; justify-content: space-between; gap: 2rem; padding-bottom: 2rem; }
.footer-top p { color: var(--slate); font-size: .85rem; margin-top: .7rem; }
.footer-top nav { display: grid; grid-template-columns: repeat(2, 1fr); gap: .1rem 3rem; align-content: start; }
.footer-top nav a { font-size: .8rem; color: var(--ink); text-decoration: none; min-height: 44px; padding: .6rem 0; }
.footer-top nav a:hover { text-decoration: underline; }
.footer-bottom { border-top: 1px solid var(--line); padding-block: 1.2rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: .5rem 2rem; color: var(--slate); font-size: .75rem; }
.footer-bottom p { margin: 0; }
.not-found { padding-block: 7rem; min-height: 55vh; }
.not-found p { max-width: 35rem; }

@media (min-width: 1500px) {
  .hero-inner { padding-block: 6.4rem 5rem; }
}
@media (max-width: 1050px) {
  .container { width: calc(100% - 3rem); }
  .desktop-nav { gap: 1rem; }
  .hero-inner { padding-block: 4.2rem 3.5rem; }
  .hero h1 { font-size: clamp(2.9rem, 5.8vw, 4.4rem); }
  .guide-layout { grid-template-columns: 190px minmax(0, 1fr); gap: 2.5rem; }
  .split-panel { gap: 2.5rem; }
  .pillars { gap: 1.7rem; }
}
@media (max-width: 800px) {
  .header-inner { min-height: 80px; }
  .desktop-nav { display: none; }
  .mobile-nav { display: block; }
  .mobile-nav summary { display: flex; align-items: center; justify-content: space-between; gap: 1.3rem; cursor: pointer; list-style: none; border: 1px solid #638a99; border-radius: 5px; padding: .5rem .8rem; min-height: 44px; font-size: .85rem; font-weight: 600; color: var(--accent); background: linear-gradient(var(--panel-raised), var(--panel)); box-shadow: inset 0 1px #c4e4ec20, 0 2px 2px #0002; }
  .mobile-nav summary::-webkit-details-marker { display: none; }
  .mobile-nav[open] summary span { transform: rotate(45deg); }
  .mobile-nav nav { position: absolute; top: calc(100% - 1px); left: 0; right: 0; background: var(--panel); padding: .75rem 1.5rem; border-block: 1px solid var(--line); box-shadow: 0 12px 20px #0004; }
  .mobile-nav nav a { display: block; padding: .7rem .3rem; min-height: 44px; color: var(--ink); text-decoration: none; }
  .hero-inner { grid-template-columns: 1fr; padding-block: 3.4rem 1.8rem; gap: 1rem; }
  .hero-copy { max-width: 35rem; }
  .hero h1 { font-size: clamp(2.8rem, 8vw, 4rem); max-width: 12ch; }
  .hero-art { width: min(100%, 440px); margin: -1rem auto 0; }
  .hero-art figcaption { margin-top: -1.5rem; }
  .pillars { grid-template-columns: 1fr; gap: 2rem; }
  .pillar { display: grid; grid-template-columns: 48px 1fr; gap: 0 1.1rem; }
  .pillar h3 { align-self: center; margin-bottom: 1rem; }
  .pillar p, .pillar .text-link { grid-column: 2; }
  .split-panel { grid-template-columns: 1fr; gap: 2rem; }
  .section { padding-block: 3.5rem; }
  .dark-panel { padding: 2rem; }
  .guide-heading { padding-block: 3rem 2rem; }
  .guide-layout { grid-template-columns: 1fr; gap: 2.5rem; }
  .guide-sidebar { position: relative; top: auto; }
  .guide-sidebar nav { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 1rem; }
  .contents-title { grid-column: 1 / -1; }
  .sidebar-note { margin-block: .7rem 0; }
  .sidebar-note br { display: none; }
  .closing { align-items: start; flex-direction: column; }
}
@media (max-width: 480px) {
  :root { font-size: 16px; }
  .container { width: calc(100% - 2.25rem); }
  .brand { font-size: 1.4rem; }
  .brand img { width: 32px; }
  .hero h1 { font-size: 2.85rem; }
  .hero-copy > p { font-size: 1rem; }
  .hero-art { margin-top: -.4rem; }
  .hero-actions { gap: .7rem 1.2rem; }
  .design-note { display: block; font-size: .76rem; }
  .design-note strong { display: block; margin-bottom: .3rem; }
  .cards { grid-template-columns: 1fr; }
  .dark-panel { padding: 1.5rem; }
  .flow { grid-template-columns: 1fr; gap: .7rem; }
  .flow li { display: flex; align-items: center; gap: 1rem; padding: .9rem 1rem; }
  .flow span { margin: 0; }
  .flow li:not(:last-child)::after { top: 100%; left: 2rem; width: 1px; height: .7rem; }
  .record-versions { margin-inline: 0; padding: .9rem; }
  .record-versions > div { grid-template-columns: 1fr; gap: .25rem; padding: .75rem; }
  pre { padding: 1rem; font-size: .78rem; }
  .footer-top { flex-direction: column; gap: .5rem; }
  .footer-top nav { grid-template-columns: repeat(2, 1fr); }
  .document-list .card { grid-template-columns: 1fr; padding: 1.25rem; }
  .guide-heading h1 { font-size: 2.6rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
@media print {
  :root { color-scheme: light; --ink: #173744; --slate: #506570; --accent: #246467; --canvas: #ffffff; --panel: #ffffff; --panel-raised: #f0f0f0; --highlight: #f0f0f0; }
  body { background: white; }
  .hero::before, .hero::after, .dark-panel::before, .dark-panel::after, .inset-section::before, .inset-section::after { display: none; }
  .site-header, .site-footer, .guide-sidebar, .hero-art, .skip-link { display: none; }
  .container { width: 100%; }
  .guide-layout, .hero-inner { display: block; }
  .hero, .dark-panel, .code-panel { background: white; color: black; box-shadow: none; }
  .inset-section, .card, .callout, .record-versions, .record-versions > div, .flow li, .next-page, .code-caption, th { background: white; color: black; box-shadow: none; }
  .hero p, .dark-panel p, .hero h1 span, .kw, .literal { color: black; }
  pre { white-space: pre-wrap; }
  .guide-body > section { break-inside: avoid; }
}
