/* Short Final docs. Airside brand: sign black, signal yellow, paint white. Light by default, dark via toggle or system. */
:root {
  --bg: #F6F5F0; --surface: #FFFFFF; --tint: #EEEDE6; --ink: #111110; --text: #34342F; --muted: #6B6A62; --line: #DEDCD2;
  --yellow: #FFC72C; --yellow-ink: #8A6800; --yellow-wash: #FFF4D1; --red: #D7263D; --red-wash: #FBE6E8; --green: #2E8B57; --green-wash: #E3F2EA;
  --blue: #1F4F8F; --blue-wash: #E6EDF7; --sign: #111110; --code-bg: #EFEEE7;
  --font: "Barlow", "Segoe UI", system-ui, sans-serif; --display: "Barlow Condensed", "Barlow", sans-serif; --mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #151614; --surface: #1D1E1B; --tint: #232420; --ink: #F2F1EC; --text: #D3D2CA; --muted: #9A998F; --line: #33342F;
    --yellow-ink: #FFC72C; --yellow-wash: #2B2615; --red-wash: #3A1A1E; --green-wash: #17301F; --blue: #8FB4E6; --blue-wash: #1A2432; --code-bg: #262723; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #151614; --surface: #1D1E1B; --tint: #232420; --ink: #F2F1EC; --text: #D3D2CA; --muted: #9A998F; --line: #33342F;
  --yellow-ink: #FFC72C; --yellow-wash: #2B2615; --red-wash: #3A1A1E; --green-wash: #17301F; --blue: #8FB4E6; --blue-wash: #1A2432; --code-bg: #262723; color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-padding-top: 80px; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16.5px/1.65 var(--font); -webkit-font-smoothing: antialiased; }
a { color: var(--yellow-ink); text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; border-radius: 4px; }
img { max-width: 100%; height: auto; }

/* top bar */
.top { position: sticky; top: 0; z-index: 40; background: var(--surface); border-bottom: 1px solid var(--line); }
.top-in { display: flex; align-items: center; gap: 14px; height: 60px; padding: 0 20px; max-width: 1440px; margin: 0 auto; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { height: 26px; width: auto; display: block; }
.docs-sign { font: 800 13px/1 var(--display); letter-spacing: .08em; background: var(--yellow); color: var(--sign); padding: 5px 7px 4px; border-radius: 3px; border: 2px solid var(--sign); }
.search-btn { margin-left: auto; display: flex; align-items: center; gap: 8px; min-width: 260px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--muted); font: 500 14.5px var(--font); cursor: pointer; }
.search-btn:hover { border-color: var(--ink); }
.search-btn span { flex: 1; text-align: left; }
kbd { font: 600 12px var(--mono); background: var(--surface); border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 4px; padding: 1px 6px; color: var(--ink); white-space: nowrap; }
.icon-btn { display: grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 8px; background: none; color: var(--ink); cursor: pointer; }
.icon-btn:hover { background: var(--tint); }
.icon-btn .moon { display: none; }
:root[data-theme="dark"] .icon-btn .sun { display: none; } :root[data-theme="dark"] .icon-btn .moon { display: block; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .icon-btn .sun { display: none; } :root:not([data-theme="light"]) .icon-btn .moon { display: block; } }
.menu { display: none; }

/* three columns */
.shell { display: grid; grid-template-columns: 270px minmax(0, 1fr) 220px; gap: 40px; max-width: 1440px; margin: 0 auto; padding: 0 20px; }
.side { position: sticky; top: 60px; height: calc(100vh - 60px); overflow-y: auto; padding: 24px 6px 40px 0; border-right: 1px solid var(--line); }
.nav-sec { margin-bottom: 18px; }
.nav-sec h4 { margin: 0 0 6px; font: 800 13px/1.2 var(--display); letter-spacing: .09em; text-transform: uppercase; color: var(--muted); }
.nav-sec ul { list-style: none; margin: 0; padding: 0; }
.nav-sec a { display: block; padding: 4px 10px; margin-right: 10px; border-radius: 6px; color: var(--text); text-decoration: none; font-size: 15px; font-weight: 500; line-height: 1.35; }
.nav-sec a:hover { background: var(--tint); color: var(--ink); }
.nav-sec a.on { background: var(--yellow-wash); color: var(--ink); font-weight: 700; box-shadow: inset 3px 0 0 var(--yellow); }
.nb { font: 800 10.5px/1 var(--display); letter-spacing: .06em; background: var(--sign); color: var(--yellow); padding: 3px 5px 2px; border-radius: 3px; vertical-align: 2px; white-space: nowrap; }
.nb.big { font-size: 14px; padding: 5px 7px 4px; vertical-align: 8px; }

.content { padding: 28px 0 60px; min-width: 0; max-width: 820px; }
.crumb { font: 800 13px var(--display); letter-spacing: .09em; text-transform: uppercase; color: var(--yellow-ink); margin-bottom: 6px; }
h1, h2, h3, h4 { color: var(--ink); line-height: 1.15; }
h1 { font: 800 clamp(34px, 5vw, 46px)/1.05 var(--display); margin: 0 0 12px; }
.lede { font-size: 19px; color: var(--muted); margin: 0 0 28px; line-height: 1.5; }
article h2 { font: 800 30px/1.1 var(--display); margin: 44px 0 12px; padding-top: 18px; border-top: 1px solid var(--line); }
article h3 { font-size: 19px; font-weight: 700; margin: 28px 0 8px; }
article h4 { font-size: 16px; margin: 20px 0 6px; }
.anchor { float: left; margin-left: -22px; padding-right: 6px; color: var(--muted); text-decoration: none; opacity: 0; font-weight: 400; }
h2:hover .anchor, h3:hover .anchor { opacity: 1; }
article p, article ul, article ol { margin: 0 0 14px; }
article li { margin-bottom: 5px; }
article li > ul { margin: 5px 0 0; }
code { font: 500 .88em var(--mono); background: var(--code-bg); padding: 1px 5px; border-radius: 4px; color: var(--ink); }
pre { background: var(--code-bg); border: 1px solid var(--line); border-radius: 8px; padding: 14px 16px; overflow-x: auto; font: 500 13.5px/1.55 var(--mono); margin: 0 0 16px; }
pre code { background: none; padding: 0; font-size: inherit; }
hr { border: 0; border-top: 1px solid var(--line); margin: 30px 0; }
strong, b { color: var(--ink); }

/* tables */
.tw { overflow-x: auto; margin: 0 0 18px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
table { border-collapse: collapse; width: 100%; font-size: 15px; }
th, td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font: 700 13px var(--font); text-transform: uppercase; letter-spacing: .05em; color: var(--muted); background: var(--tint); }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.plus { color: var(--green); font-weight: 700; } .minus { color: var(--red); font-weight: 700; }

/* callouts */
.note { display: flex; gap: 12px; padding: 13px 16px; border-radius: 8px; margin: 0 0 18px; border: 1px solid var(--line); border-left-width: 4px; background: var(--surface); }
.note > b:first-child { flex: none; font: 800 13px/1.6 var(--display); letter-spacing: .07em; text-transform: uppercase; }
.note p:last-child, .note ul:last-child { margin-bottom: 0; }
.note.tip { border-left-color: var(--green); } .note.tip > b:first-child { color: var(--green); }
.note.warn { border-left-color: var(--red); background: var(--red-wash); } .note.warn > b:first-child { color: var(--red); }
.note.info { border-left-color: var(--blue); } .note.info > b:first-child { color: var(--blue); }
.note.new { border-left-color: var(--yellow); background: var(--yellow-wash); } .note.new > b:first-child { color: var(--yellow-ink); }

/* cards on the home page */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; margin: 0 0 24px; }
.card { display: block; padding: 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); text-decoration: none; color: var(--text); transition: border-color .15s; }
.card:hover { border-color: var(--ink); }
.card b { display: block; font: 800 20px/1.1 var(--display); color: var(--ink); margin-bottom: 4px; }
.card span { font-size: 14.5px; color: var(--muted); line-height: 1.45; display: block; }
.hero { padding: 10px 0 8px; }
.hero h1 { font-size: clamp(40px, 6vw, 58px); }

/* figures */
figure { margin: 0 0 20px; }
figure img { border: 1px solid var(--line); border-radius: 8px; display: block; }
figcaption { font-size: 14px; color: var(--muted); margin-top: 6px; }

/* steps */
ol.steps { counter-reset: s; list-style: none; padding: 0; }
ol.steps > li { counter-increment: s; position: relative; padding-left: 44px; margin-bottom: 14px; }
ol.steps > li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 28px; height: 28px; display: grid; place-items: center; background: var(--sign); color: var(--yellow); font: 800 15px/1 var(--display); border-radius: 4px; }

/* radar label sample */
.label { display: inline-block; font: 700 13.5px/1.35 var(--mono); background: var(--code-bg); border: 1px solid var(--line); border-radius: 6px; padding: 8px 12px; color: var(--ink); white-space: pre; margin: 0 0 14px; }
dl.terms { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 0 0 18px; }
dl.terms dt { font-weight: 700; color: var(--ink); } dl.terms dd { margin: 0; }

/* contents on the right */
.toc { position: sticky; top: 60px; height: calc(100vh - 60px); overflow-y: auto; padding: 30px 0; }
.toc h4 { margin: 0 0 8px; font: 800 13px var(--display); letter-spacing: .09em; text-transform: uppercase; color: var(--muted); }
.toc ul { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); }
.toc a { display: block; padding: 3px 0 3px 12px; margin-left: -1px; border-left: 2px solid transparent; font-size: 14px; color: var(--muted); text-decoration: none; line-height: 1.35; }
.toc a:hover { color: var(--ink); } .toc a.on { color: var(--ink); border-left-color: var(--yellow); font-weight: 600; }

.pn { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 48px; }
.pn a { display: block; padding: 12px 16px; border: 1px solid var(--line); border-radius: 8px; text-decoration: none; color: var(--ink); font-weight: 700; background: var(--surface); }
.pn a:hover { border-color: var(--ink); }
.pn small { display: block; font-weight: 500; color: var(--muted); font-size: 13px; }
.pn .next { text-align: right; grid-column: 2; }
.foot { margin-top: 36px; font-size: 14px; color: var(--muted); }

/* search */
.search-dlg { position: fixed; inset: 0; z-index: 60; background: rgba(17,17,16,.45); display: flex; justify-content: center; align-items: flex-start; padding: 10vh 16px 16px; }
.search-dlg[hidden] { display: none; }
.search-box { width: 100%; max-width: 640px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 20px 60px rgba(0,0,0,.3); overflow: hidden; }
#searchIn { width: 100%; border: 0; border-bottom: 1px solid var(--line); padding: 16px 18px; font: 500 17px var(--font); background: var(--surface); color: var(--ink); outline: none; }
#searchRes { list-style: none; margin: 0; padding: 6px; max-height: 60vh; overflow-y: auto; }
#searchRes a { display: block; padding: 9px 12px; border-radius: 8px; text-decoration: none; color: var(--text); }
#searchRes a b { color: var(--ink); } #searchRes a small { display: block; color: var(--muted); font-size: 13.5px; line-height: 1.4; }
#searchRes a.on, #searchRes a:hover { background: var(--yellow-wash); }
#searchRes mark { background: var(--yellow); color: var(--sign); border-radius: 2px; padding: 0 1px; }
#searchRes .none { padding: 14px; color: var(--muted); }
.search-hint { padding: 8px 14px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--muted); display: flex; gap: 6px; align-items: center; }

/* narrower screens */
@media (max-width: 1180px) { .shell { grid-template-columns: 250px minmax(0, 1fr); } .toc { display: none; } }
@media (max-width: 860px) {
  .shell { grid-template-columns: minmax(0, 1fr); padding: 0 16px; }
  .menu { display: grid; }
  .side { position: fixed; top: 60px; left: 0; bottom: 0; height: auto; width: min(320px, 88vw); background: var(--surface); z-index: 35; padding: 20px 14px; transform: translateX(-102%); transition: transform .2s; box-shadow: 0 10px 40px rgba(0,0,0,.25); }
  body.nav-open .side { transform: none; }
  .search-btn { min-width: 0; } .search-btn span, .search-btn kbd { display: none; }
  .top-in { padding: 0 12px; gap: 8px; }
  dl.terms { grid-template-columns: 1fr; } dl.terms dd { margin-bottom: 8px; }
}
