/* Airtrace landing - light, printed-manual look. Paper, ink, one red.
   Fonts are self-hosted (asset/fonts/fonts.css); no external requests. Light theme only. */
:root {
  color-scheme: light;
  --paper: #faf9f6;
  --paper-2: #f2f0ea;
  --ink: #17150f;
  --ink-2: #3b3830;
  --muted: #5e594e;
  --rule: #d8d3c6;
  --red: #c4122f;
  --serif: "Source Serif 4", "Noto Naskh Arabic", Georgia, "Times New Roman", serif;
  --sans: "IBM Plex Sans", "IBM Plex Sans Arabic", "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;
  --gutter: 24px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; background: var(--paper); }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 18px/1.6 var(--sans); text-rendering: optimizeLegibility; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--ink); text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { color: var(--red); }
:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }
b, strong { font-weight: 600; }
p { margin: 0 0 1em; }
.wrap { width: 100%; max-width: 1200px; margin-inline: auto; padding-inline: var(--gutter); }
.skip { position: absolute; inset-inline-start: -999px; top: 0; background: var(--ink); color: var(--paper); padding: 8px 12px; z-index: 100; }
.skip:focus { inset-inline-start: 8px; top: 8px; color: var(--paper); }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.small { font-size: .875rem; color: var(--muted); }

h1, h2, h3 { font-family: var(--serif); font-weight: 600; color: var(--ink); margin: 0; text-wrap: balance; }
h1 { font-size: clamp(2.3rem, 5.4vw, 4.25rem); line-height: 1.04; letter-spacing: -.018em; font-optical-sizing: auto; max-width: 15ch; }
h2 { font-size: clamp(1.6rem, 3vw, 2.25rem); line-height: 1.12; letter-spacing: -.01em; }
h3 { font-size: 1.15rem; line-height: 1.3; }
.dek { font-family: var(--serif); font-style: italic; font-size: clamp(1.2rem, 2vw, 1.45rem); line-height: 1.4; color: var(--ink-2); max-width: 38em; }

/* ---- masthead ---- */
.mast { border-bottom: 4px double var(--ink); }
.mast-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 8px; border-bottom: 1px solid var(--rule); font-size: .875rem; }
.tagline { margin: 0; color: var(--ink-2); }
.mast-tools { display: flex; align-items: center; gap: 18px; }
.mast-tools > a { color: var(--ink); }
.mast-main { display: flex; align-items: baseline; justify-content: space-between; gap: 12px 32px; flex-wrap: wrap; padding-block: 18px 14px; }
.wordmark { display: inline-flex; align-items: baseline; gap: 10px; text-decoration: none; color: var(--ink); }
.wordmark .wm { font: 600 2.4rem/1 var(--serif); letter-spacing: -.02em; }
.wordmark small { font-size: .85rem; color: var(--muted); }
.wordmark:hover { color: var(--ink); }
.onair { align-self: center; font: 600 .62rem/1 var(--sans); letter-spacing: .14em; color: var(--red); border: 1.5px solid var(--red); padding: 4px 5px 3px; border-radius: 2px; }
.nav { display: flex; flex-wrap: wrap; gap: 4px 0; font-size: .95rem; }
.nav a { text-decoration: none; color: var(--ink); padding: 2px 14px; border-inline-start: 1px solid var(--rule); }
.nav a:first-child { border-inline-start: 0; padding-inline-start: 0; }
.nav a:last-child { padding-inline-end: 0; }
.nav a:hover { color: var(--red); }

/* language menu: native details, plain */
.lang { position: relative; }
.lang summary { cursor: pointer; list-style: none; color: var(--ink); padding: 2px 0; }
.lang summary::-webkit-details-marker { display: none; }
.lang summary::after { content: ""; display: inline-block; width: .42em; height: .42em; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-.2em) rotate(45deg); margin-inline-start: .5em; }
.lang-menu { position: absolute; inset-inline-end: 0; top: calc(100% + 8px); z-index: 60; margin: 0; padding: 6px 0; list-style: none; min-width: 170px; background: var(--paper); border: 1px solid var(--ink); }
.lang-menu a { display: block; padding: 6px 14px; text-decoration: none; }
.lang-menu a[aria-current="true"] { color: var(--red); font-weight: 600; }

/* ---- buttons / actions ---- */
.act { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 26px; margin: 28px 0 10px; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 10px 20px; background: var(--ink); color: var(--paper); border: 1.5px solid var(--ink); border-radius: 2px; font: 600 1rem/1.2 var(--sans); text-decoration: none; cursor: pointer; text-align: center; }
.btn:hover { background: var(--red); border-color: var(--red); color: #fff; }
.quote { font-weight: 600; }

/* ---- hero ---- */
.hero { padding-block: 48px 8px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 56px; align-items: start; }
.hero-text h1 { margin-bottom: 22px; }
.hero-text .dek { margin-bottom: 18px; }
.hero-text > p:not(.dek):not(.act):not(.small) { color: var(--ink-2); max-width: 36em; }

/* the typeset airing log */
.log { border-top: 2px solid var(--ink); padding-top: 2px; margin-top: 8px; }
.log table { width: 100%; border-collapse: collapse; font: 400 .875rem/1.35 var(--mono); }
.log caption { text-align: start; padding: 10px 0 12px; border-bottom: 1px solid var(--ink); font-family: var(--sans); }
.log-t { display: block; font: 600 1.1rem/1.2 var(--serif); }
.log-s { display: block; color: var(--muted); font-size: .875rem; margin-top: 2px; }
.log th { text-align: start; font: 500 .75rem/1.2 var(--sans); color: var(--muted); padding: 10px 10px 6px 0; border-bottom: 1px solid var(--rule); }
.log td { padding: 9px 10px 9px 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
.log td.tc, .log td:nth-child(2) { white-space: nowrap; }
.log tr > :last-child { padding-inline-end: 0; }
.st { white-space: nowrap; }
.st-aired { color: var(--ink); font-weight: 500; }
.st-aired::before { content: ""; display: inline-block; width: .55em; height: .55em; background: var(--red); margin-inline-end: .45em; vertical-align: .05em; }
.st-skipped, .st-nocmd { color: var(--muted); }
.st-skipped { text-decoration: line-through; text-decoration-thickness: 1px; }
.log-foot { margin: 10px 0 0; font-size: .8rem; color: var(--muted); }

/* ---- figures ---- */
.fig { margin: 0; }
.fig img { width: 100%; border: 1px solid var(--ink); background: #fff; }
.fig figcaption { margin-top: 10px; font-size: .9rem; line-height: 1.5; color: var(--ink-2); padding-top: 8px; border-top: 1px solid var(--rule); }
.fig figcaption b { font-family: var(--serif); color: var(--ink); margin-inline-end: .35em; }
.fig-hero { margin-top: 48px; }
.figs { display: grid; gap: 48px; margin-top: 44px; }
.ph { aspect-ratio: 16/10; display: grid; place-items: center; border: 1px dashed var(--muted); color: var(--muted); font: .85rem var(--mono); }

/* ---- sections ---- */
.sec { padding-block: 64px 8px; }
.sec-grid { border-top: 1px solid var(--ink); padding-top: 26px; display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 40px 56px; }
.secno { font: 400 1rem/1 var(--serif); color: var(--red); margin: 0 0 12px; }
.sec-head { align-self: start; position: sticky; top: 20px; }
.sec-head h2 { max-width: 14em; }
.sec-body > .dek { margin-bottom: 20px; }
.sec-body > p { max-width: 40em; }
.items { margin: 28px 0 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 40px; }
.items > div { border-top: 1px solid var(--rule); padding: 14px 0 18px; }
.items dt { font: 600 1.06rem/1.3 var(--serif); margin-bottom: 4px; }
.items dd { margin: 0; color: var(--ink-2); font-size: .975rem; }

/* §2 Octopus: spec table */
.spec { width: 100%; max-width: 40em; border-collapse: collapse; margin-top: 28px; font-size: .95rem; }
.spec caption { text-align: start; font: 600 1.06rem/1.3 var(--serif); padding-bottom: 8px; border-bottom: 2px solid var(--ink); }
.spec th, .spec td { text-align: start; padding: 10px 16px 10px 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
.spec th { font-weight: 500; color: var(--muted); width: 38%; }
.spec td { font-family: var(--mono); font-size: .875rem; }
.spec tr:last-child td { color: var(--red); }

/* §4 compatibility table */
.compat { width: 100%; border-collapse: collapse; margin-top: 40px; font-size: .95rem; }
.compat thead th { text-align: start; font: 500 .8rem/1.3 var(--sans); color: var(--muted); padding: 0 16px 8px 0; border-bottom: 2px solid var(--ink); }
.compat tbody th { text-align: start; font: 600 1.02rem/1.3 var(--serif); padding: 12px 16px 12px 0; }
.compat td { padding: 12px 16px 12px 0; color: var(--ink-2); }
.compat tbody tr { border-bottom: 1px solid var(--rule); }
.compat td.yes { color: var(--ink); font-weight: 600; }
.compat td.yes::before { content: ""; display: inline-block; width: .55em; height: .55em; background: var(--red); margin-inline-end: .5em; vertical-align: .05em; }
.note-after { margin-top: 14px; }

/* §6 install */
.steps { margin: 24px 0 0; padding: 0; list-style: none; counter-reset: s; max-width: 42em; }
.steps li { counter-increment: s; position: relative; padding: 12px 0 12px 2.4em; border-top: 1px solid var(--rule); }
[dir="rtl"] .steps li { padding: 12px 2.4em 12px 0; }
.steps li::before { content: counter(s); position: absolute; inset-inline-start: 0; top: 10px; font: 600 1.35rem/1.2 var(--serif); color: var(--red); }
.plain { margin: 22px 0 0; padding: 0; list-style: none; max-width: 42em; color: var(--ink-2); font-size: .975rem; }
.plain li { padding: 7px 0; border-top: 1px dotted var(--rule); }

/* §7 rate card */
.rate { width: 100%; max-width: 44em; border-collapse: collapse; margin: 24px 0 22px; border-top: 2px solid var(--ink); border-bottom: 2px solid var(--ink); }
.rate th, .rate td { padding: 16px 0; border-bottom: 1px solid var(--rule); vertical-align: baseline; }
.rate tr:last-child th, .rate tr:last-child td { border-bottom: 0; }
.rate th { text-align: start; font-weight: 400; padding-inline-end: 20px; }
.rn { font: 600 1.25rem/1.3 var(--serif); }
.rd { color: var(--muted); }
.rp { text-align: end; white-space: nowrap; }
.amt { font: 600 1.6rem/1 var(--serif); font-variant-numeric: lining-nums tabular-nums; }
.ru { font-size: .875rem; color: var(--muted); margin-inline-start: .35em; }
.rate tr.trial .amt { font-size: 1.25rem; }
.rate tr.ex th, .rate tr.ex td { border-top: 1px solid var(--ink); }
.rate tr.ex .amt { color: var(--red); }

/* §8 FAQ */
.qa > div { border-top: 1px solid var(--rule); padding: 18px 0 8px; }
.qa > div:first-child { border-top: 0; padding-top: 0; }
.qa h3 { margin-bottom: 6px; }
.qa p { color: var(--ink-2); max-width: 40em; }

/* closing note */
.close { padding-block: 72px 64px; }
.close-h { border-top: 4px double var(--ink); padding-top: 32px; }
.close-h { font: 600 clamp(1.8rem, 3.6vw, 2.8rem)/1.1 var(--serif); margin-bottom: 14px; }
.close p:not(.close-h):not(.act) { color: var(--ink-2); max-width: 40em; }

/* ---- footer ---- */
.foot { border-top: 1px solid var(--ink); padding-block: 36px 40px; font-size: .9rem; color: var(--ink-2); background: var(--paper-2); }
.foot-cols { display: grid; grid-template-columns: 2fr 1fr 1fr 1.5fr; gap: 28px 40px; }
.foot h2 { font: 600 .95rem/1.3 var(--sans); margin: 0 0 10px; }
.foot ul { list-style: none; margin: 0; padding: 0; }
.foot li { padding: 2px 0; }
.foot address { font-style: normal; }
.foot-brand { font: 600 1.5rem/1 var(--serif); color: var(--ink); margin-bottom: 10px; }
.foot-brand small { font: 400 .8rem var(--sans); color: var(--muted); }
.tm { margin: 32px 0 6px; padding-top: 14px; border-top: 1px solid var(--rule); font-size: .8rem; color: var(--muted); }
.copy { font-size: .8rem; color: var(--muted); margin: 0; }
.linkbtn { background: none; border: 0; padding: 0; font: inherit; color: var(--ink); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .18em; cursor: pointer; text-align: start; }
.linkbtn:hover { color: var(--red); }

/* ---- consent banner (markup and script unchanged) ---- */
.cc { position: fixed; inset-inline: 16px; bottom: 16px; z-index: 150; max-width: 680px; margin-inline: auto; display: flex; align-items: center; gap: 12px 18px; flex-wrap: wrap; background: var(--paper); color: var(--ink); border: 1px solid var(--ink); border-top: 3px solid var(--ink); padding: 14px 18px; box-shadow: 0 6px 24px rgba(23, 21, 15, .14); }
.cc[hidden] { display: none; }
.cc p { flex: 1 1 280px; margin: 0; font-size: .9rem; line-height: 1.5; color: var(--ink-2); }
.cc-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.cc .btn { min-height: 40px; padding: 8px 16px; font-size: .9rem; min-width: 96px; }
.cc .btn-ghost { background: transparent; color: var(--ink); }
.cc .btn-ghost:hover { background: var(--paper-2); color: var(--ink); border-color: var(--ink); }

/* ---- legal pages ---- */
.legal { padding-block: 48px 72px; }
.legal .wrap { max-width: 780px; }
.legal h1 { font-size: clamp(2rem, 4.4vw, 3rem); max-width: none; margin-bottom: 8px; }
.legal .upd { color: var(--muted); font-size: .875rem; padding-bottom: 14px; border-bottom: 1px solid var(--ink); }
.legal .dek { margin: 18px 0 8px; }
.legal h2 { font-size: 1.3rem; margin: 2em 0 .5em; padding-top: 14px; border-top: 1px solid var(--rule); }
.legal li { margin: 6px 0; }
.legal ul { padding-inline-start: 1.2em; }
.legal .back { margin-top: 2.5em; }

/* ---- responsive ---- */
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; gap: 36px; }
  h1 { max-width: 18ch; }
  .sec-grid { grid-template-columns: 1fr; gap: 18px; }
  .sec-head { position: static; }
  .sec-head h2 { max-width: 22em; }
  .foot-cols { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  :root { --gutter: 16px; }
  body { font-size: 17px; }
  .mast-top { flex-wrap: wrap; row-gap: 4px; }
  .wordmark .wm { font-size: 2rem; }
  .nav { font-size: .9rem; }
  .nav { gap: 2px 18px; }
  .nav a, .nav a:first-child, .nav a:last-child { padding: 2px 0; border: 0; }
  .hero { padding-top: 32px; }
  .sec { padding-top: 48px; }
  .items { grid-template-columns: 1fr; }
  .figs { gap: 36px; }
  .compat thead { display: none; }
  .compat, .compat tbody, .compat tr, .compat th, .compat td { display: block; width: 100%; }
  .compat tbody tr { padding: 12px 0; }
  .compat tbody th { padding: 0 0 6px; }
  .compat td { padding: 3px 0; }
  .compat td::before { content: attr(data-l) ": "; color: var(--muted); font-weight: 400; }
  .compat td.yes::before { content: attr(data-l) ": "; display: inline; width: auto; height: auto; background: none; margin: 0; }
  .rp { white-space: normal; }
  .ru { display: block; margin: 4px 0 0; }
  .amt { font-size: 1.35rem; }
  .foot-cols { grid-template-columns: 1fr; }
  .btn { width: 100%; }
  .cc .btn { flex: 1; width: auto; }
}
@media (max-width: 400px) {
  .log table { font-size: .8rem; }
  .log th, .log td { padding-inline-end: 6px; }
  .st { white-space: normal; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* ---- scripts: Arabic (RTL), Japanese, Korean, Cyrillic ---- */
[dir="rtl"] body { line-height: 1.8; }
[dir="rtl"] h1, [dir="rtl"] h2, [dir="rtl"] h3, [dir="rtl"] .wordmark .wm { letter-spacing: 0; line-height: 1.4; }
[dir="rtl"] h1 { line-height: 1.3; }
[dir="rtl"] .dek, :lang(ja) .dek, :lang(ko) .dek { font-style: normal; }
[dir="rtl"] .onair { letter-spacing: .08em; }
:lang(ja) { --serif: "Source Serif 4", "Yu Mincho", "YuMincho", "Hiragino Mincho ProN", "Noto Serif JP", serif; --sans: "IBM Plex Sans", "Yu Gothic UI", "Yu Gothic", "YuGothic", "Hiragino Sans", "Meiryo", "Noto Sans JP", sans-serif; }
:lang(ko) { --serif: "Source Serif 4", "Nanum Myeongjo", "Noto Serif KR", "Batang", serif; --sans: "IBM Plex Sans", "Malgun Gothic", "Apple SD Gothic Neo", "Noto Sans KR", sans-serif; }
:lang(ja) body { line-height: 1.8; line-break: strict; overflow-wrap: anywhere; }
:lang(ko) body { line-height: 1.8; word-break: keep-all; overflow-wrap: anywhere; }
/* Plex Mono has no Arabic/CJK glyphs: keep mono for times only */
[dir="rtl"] .log table, :lang(ja) .log table, :lang(ko) .log table { font-family: var(--sans); }
[dir="rtl"] .log td.tc, :lang(ja) .log td.tc, :lang(ko) .log td.tc { font-family: var(--mono); }
[dir="rtl"] .spec td, :lang(ja) .spec td, :lang(ko) .spec td { font-family: var(--sans); font-size: .95rem; }
:lang(ja) h1, :lang(ja) h2, :lang(ja) h3, :lang(ja) .dek, :lang(ja) .close-h { word-break: auto-phrase; }
:lang(ja) h1, :lang(ja) h2, :lang(ja) h3, :lang(ko) h1, :lang(ko) h2, :lang(ko) h3 { letter-spacing: 0; line-height: 1.35; }
:lang(ja) h1, :lang(ko) h1 { font-size: clamp(2rem, 4.2vw, 3.3rem); max-width: 13em; }
:lang(ja) .dek, :lang(ko) .dek { font-size: clamp(1.1rem, 1.8vw, 1.3rem); }
:lang(ru) h1 { font-size: clamp(2.1rem, 4.6vw, 3.7rem); max-width: 18ch; }
