/* AirwayControl Aircraft Library: page layout. Hand-written; build.py never touches it.
   Every colour is a palette token and every duration and curve a motion token in ds/tokens.css
   (docs/rules/01-motion.md). The drawings are the stars: they sit on a flat plate a step darker
   than the page, with air around them, and nothing competes with them for colour. */

.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.nav .brand span { font-size: 17px; }
.nav .brand img { width: 40px; }
.label { font-size: 12px; line-height: 1.33; font-weight: 600; letter-spacing: 0.02em; text-transform: uppercase; color: var(--soft); margin: 0 0 14px; }
.fine { font-size: 12px; line-height: 1.5; color: var(--soft); margin: 12px 0 0; letter-spacing: -0.01em; }
.muted { color: var(--soft); }
.more { color: var(--link); }
.code, code { font-family: ui-monospace, "SF Mono", monospace; }

/* ---------- the plate ---------- */
.plate { position: relative; margin: 0; background: var(--plate); border-radius: var(--radius-card); }
.plate-cap { position: absolute; top: 18px; left: 22px; font-size: 12px; line-height: 1.33; color: var(--plate-ink); letter-spacing: -0.01em; z-index: 1; }
.plate-art { position: relative; display: block; margin-inline: auto; }
.plate-art img { width: 100%; height: auto; }

.card-plate { display: block; background: var(--plate); border-radius: 18px; padding: 10% 8%;
  transition: background-color var(--dur-fast) var(--ease-in-out), transform var(--dur-fast) var(--ease-in-out); }
.card-plate img { width: 100%; height: auto; aspect-ratio: 1200 / 420; object-fit: contain; }

/* ---------- home ---------- */
.hero { padding-block: clamp(48px, 8vw, 112px) 0; }
.hero-copy { display: grid; grid-template-columns: minmax(0, 1fr); justify-items: center; text-align: center; gap: 20px; }
@media (max-width: 380px) { .hero-copy .t-hero { font-size: 38px; } .search .btn { padding-inline: 16px; } }
.hero-copy .t-hero { max-width: 13em; }
.hero-copy .t-lead { max-width: 34em; }
.search { position: relative; display: flex; gap: 8px; width: min(620px, 100%); margin-top: 8px; }
.search input, .filters input { flex: 1; min-width: 0; min-height: 48px; padding: 0 20px; border-radius: var(--radius-pill); border: 1px solid var(--line);
  background: var(--bg-2); color: var(--ink); font: inherit; font-size: 17px; letter-spacing: -0.022em;
  transition: border-color var(--dur-fast) var(--ease-in-out), background-color var(--dur-fast) var(--ease-in-out); }
.search input:focus, .filters input:focus { outline: none; border-color: var(--link); background: var(--bg); }
.search input::placeholder, .filters input::placeholder { color: var(--soft); }
.search .btn { min-height: 48px; border: 0; background: var(--cta); color: #fff; font: inherit; font-size: 17px; padding-inline: 24px; cursor: pointer; }
.suggest { position: absolute; z-index: 5; top: calc(100% + 8px); left: 0; right: 0; margin: 0; padding: 6px; list-style: none; text-align: left;
  background: var(--bg); border: 1px solid var(--line); border-radius: 22px; box-shadow: 0 24px 48px -24px rgba(0,0,0,.28); }
.suggest a { display: flex; align-items: center; gap: 14px; padding: 8px 10px; border-radius: 14px; color: var(--ink); text-decoration: none; }
.suggest a:hover, .suggest a[aria-selected="true"] { background: var(--bg-2); }
.suggest img { width: 84px; height: 30px; object-fit: contain; background: var(--plate); border-radius: 8px; padding: 2px 6px; }
.suggest .s-code { font-family: ui-monospace, "SF Mono", monospace; font-size: 13px; color: var(--soft); width: 3.6em; }
.suggest .s-name { font-size: 15px; display: grid; }
.suggest .s-name small { font-size: 12px; color: var(--soft); }
.suggest .s-group { padding: 10px 10px 4px; font-size: 12px; font-weight: 600; letter-spacing: 0.02em; text-transform: uppercase; color: var(--soft); }
.suggest .s-mark { width: 30px; height: 30px; flex: none; border-radius: 50%; background: var(--plate); object-fit: cover; margin-inline: 27px; }
.suggest { max-height: min(70vh, 560px); overflow-y: auto; }
.suggest ul { list-style: none; margin: 0; padding: 0; }
.filters .suggest { top: calc(100% - 4px); }
.filters { position: sticky; }
.fq-wrap { position: relative; display: flex; }

.hero-plate { margin-top: clamp(40px, 6vw, 72px); }
.plate--hero { padding: clamp(56px, 8vw, 104px) clamp(20px, 6vw, 96px) clamp(40px, 6vw, 80px); }
.plate--hero .plate-art { max-width: 1040px; }

.stats { padding-block: clamp(40px, 5vw, 64px) 0; }
.stats dl { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin: 0; }
.stats div { display: grid; gap: 4px; }
.stats dt { font-size: 14px; color: var(--soft); order: 2; }
.stats dd { margin: 0; font-size: var(--fs-h2); font-weight: 600; letter-spacing: -0.003em; line-height: 1.08; font-variant-numeric: tabular-nums; }
@media (max-width: 734px) { .stats dl { grid-template-columns: repeat(2, 1fr); row-gap: 28px; } }

.cats { list-style: none; margin: clamp(32px, 4vw, 56px) 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.cat a { display: grid; gap: 16px; text-decoration: none; color: var(--ink); }
.cat .card-plate { padding: 14% 10%; border-radius: var(--radius-card); }
.cat-text { display: grid; gap: 4px; }
.cat-text b { font-size: 21px; font-weight: 600; letter-spacing: 0.011em; }
.cat-text span { font-size: 15px; color: var(--soft); }
.cat-text .cat-n { font-size: 14px; color: var(--soft); }
.all { margin-top: 36px; text-align: center; font-size: 17px; }
@media (max-width: 900px) { .cats { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .cats { grid-template-columns: 1fr; } }

.band { background: var(--bg-2); }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(48px, 7vw, 112px); }
.split > div { display: grid; gap: 18px; align-content: start; }
.split .t-h2 { font-size: var(--fs-h3); line-height: 1.14; letter-spacing: 0.007em; }
@media (max-width: 734px) { .split { grid-template-columns: 1fr; } }
pre.code { margin: 0; padding: 18px 20px; border-radius: 18px; background: var(--bg); border: 1px solid var(--line); overflow-x: auto;
  font-size: 13px; line-height: 1.6; color: var(--ink); }
.band pre.code { background: var(--bg); }

/* ---------- cards and grids ---------- */
.grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 28px 20px; }
@media (max-width: 520px) { .grid { grid-template-columns: repeat(2, 1fr); gap: 22px 12px; } .card-plate { border-radius: 14px; } }
.grid a { display: grid; gap: 10px; text-decoration: none; color: var(--ink); }
.grid a:active .card-plate, .cat a:active .card-plate { transform: scale(var(--press-scale)); }
@media (hover: hover) and (pointer: fine) {
  .grid a:hover .card-plate, .cat a:hover .card-plate { background: var(--plate-hover); }
}
.card-text { display: grid; gap: 1px; padding-inline: 2px; }
.card-code { font-family: ui-monospace, "SF Mono", monospace; font-size: 12px; color: var(--soft); letter-spacing: 0; }
.card-name { font-size: 15px; font-weight: 600; line-height: 1.3; letter-spacing: -0.012em; }
.card-maker { font-size: 13px; color: var(--soft); line-height: 1.35; }
.card[hidden] { display: none; }

/* ---------- index ---------- */
.index { padding-block: clamp(40px, 6vw, 80px) var(--section-pad); }
.index-head { display: grid; gap: 8px; margin-bottom: 28px; }
.filters { position: sticky; top: var(--nav-h); z-index: 4; display: grid; grid-template-columns: minmax(220px, 360px) 1fr auto; gap: 12px 16px; align-items: center;
  padding-block: 12px; margin-bottom: 28px; background: var(--bar-bg);
  box-shadow: 0 0 0 100vmax var(--bar-bg); clip-path: inset(0 -100vmax); /* the bar runs edge to edge, the controls stay in the column */
  -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); }
.filters input { min-height: 40px; font-size: 15px; padding-inline: 16px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { min-height: 32px; padding: 0 14px; border-radius: var(--radius-pill); border: 0; background: var(--bg-2); color: var(--ink); font: inherit; font-size: 14px; letter-spacing: -0.016em; cursor: pointer;
  transition: background-color var(--dur-fast) var(--ease-in-out), color var(--dur-fast) var(--ease-in-out); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.selects { display: flex; gap: 8px; }
.selects select { min-height: 32px; max-width: 200px; padding: 0 28px 0 12px; border-radius: var(--radius-pill); border: 0; background: var(--bg-2); color: var(--ink); font: inherit; font-size: 14px;
  -webkit-appearance: none; appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--soft) 50%), linear-gradient(135deg, var(--soft) 50%, transparent 50%);
  background-position: calc(100% - 15px) 14px, calc(100% - 11px) 14px; background-size: 4px 4px; background-repeat: no-repeat; }
.chips { grid-column: 1 / -1; grid-row: 2; }
.selects { grid-column: 3; justify-content: end; }
@media (max-width: 1068px) { .filters { grid-template-columns: 1fr auto; } .selects { grid-column: 2; } }
@media (max-width: 600px) {
  .filters { grid-template-columns: 1fr; gap: 10px; }
  .selects { grid-column: 1; }
  .chips { grid-row: auto; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter); }
  .chips::-webkit-scrollbar { display: none; }
  .chip { flex: none; }
  .selects select { flex: 1; min-width: 0; width: 100%; max-width: none; }
  .selects label { flex: 1; min-width: 0; display: flex; }
}
.empty { color: var(--soft); text-align: center; padding-block: 64px; }

/* ---------- breadcrumb as pills: every step a link, the page you are on filled ---------- */
.pills ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 0; }
.pills li { display: flex; align-items: center; }
.pill { display: inline-flex; align-items: center; min-height: 32px; padding: 0 14px; border-radius: var(--radius-pill); background: var(--bg-2); color: var(--ink);
  font-size: 14px; letter-spacing: -0.016em; text-decoration: none;
  transition: background-color var(--dur-fast) var(--ease-in-out), color var(--dur-fast) var(--ease-in-out), transform var(--dur-fast) var(--ease-in-out); }
.pill--code { font-family: ui-monospace, "SF Mono", monospace; font-size: 13px; letter-spacing: 0.02em; }
.pill--here { background: var(--ink); color: var(--bg); }
.pill:active { transform: scale(var(--press-scale)); }
@media (hover: hover) and (pointer: fine) { .pill:not(.pill--here):hover { background: var(--tile-2); text-decoration: none; } .pill--here:hover { text-decoration: none; } }
/* the separator: a thin chevron drawn in CSS, so no glyph is needed */
.pill-sep { width: 22px; height: 32px; position: relative; flex: none; }
.pill-sep::before { content: ""; position: absolute; left: 7px; top: 12px; width: 6px; height: 6px; border-top: 1.5px solid var(--soft); border-right: 1.5px solid var(--soft); transform: rotate(45deg); }

/* ---------- the airline mark in line with the heading: cap height tall, one and a half spaces before the name ---------- */
.has-mark .mark { display: inline-block; width: 0.72em; height: 0.72em; margin-right: 0.375em; vertical-align: baseline; border-radius: 50%;
  background: var(--plate); object-fit: cover; }
.mark--logo { object-fit: contain; padding: 0.06em; }
.type-sub { margin: 0; font-size: 17px; color: var(--soft); }
.type-sub a { color: var(--link); }

/* ---------- airlines index: rows with the tail mark ---------- */
.rows { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 4px 24px; }
.rows a { display: flex; align-items: center; gap: 14px; padding: 10px 8px; margin-inline: -8px; border-radius: 16px; color: var(--ink); text-decoration: none;
  transition: background-color var(--dur-fast) var(--ease-in-out); }
@media (hover: hover) and (pointer: fine) { .rows a:hover { background: var(--bg-2); } }
.row-mark { width: 44px; height: 44px; flex: none; border-radius: 50%; background: var(--plate); object-fit: cover; }
.row-text { display: grid; gap: 1px; min-width: 0; }
.grid a[aria-current="page"] .card-plate { box-shadow: inset 0 0 0 2px var(--ink); }

/* ---------- type page ---------- */
/* previous / next: two circles above the profile plate's top right corner, filled with the plate's
   colour, arrow in the caption's grey (white in dark). 44 px, the HIG's minimum hit target. */
.pager { justify-self: end; display: flex; gap: 8px; margin-bottom: -4px; }
.pager-btn { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--plate); color: var(--pager-ink);
  transition: background-color var(--dur-fast) var(--ease-in-out), transform var(--dur-fast) var(--ease-in-out); }
.pager-btn svg { fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.pager-btn:active { transform: scale(var(--press-scale)); }
@media (hover: hover) and (pointer: fine) { .pager-btn:hover { background: var(--plate-hover); } }
.pager-btn:focus-visible { border-radius: 50%; }

.type-head { display: grid; gap: 14px; justify-items: start; padding-block: clamp(32px, 5vw, 64px) clamp(24px, 3vw, 40px); }
.crumbs { margin: 0; font-size: 14px; color: var(--soft); }
.crumbs a { color: var(--soft); }
.type-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; margin: 0; font-size: 17px; color: var(--soft); }
.type-meta a { color: var(--soft); text-decoration-line: underline; text-decoration-color: var(--line); }
.type-meta a:hover { color: var(--ink); text-decoration-color: currentColor; }
.code { font-size: 14px; letter-spacing: 0.02em; padding: 3px 10px; border-radius: 8px; background: var(--bg-2); color: var(--ink); }

.views { display: grid; gap: 16px; }
.plate--profile { padding: clamp(56px, 7vw, 96px) clamp(20px, 6vw, 96px) clamp(48px, 6vw, 84px); }
.plate--top { padding: clamp(48px, 6vw, 80px) clamp(20px, 6vw, 96px); }
.plate--profile .plate-art { max-width: 880px; }
/* the top view is drawn at the profile's scale: --wf is its width as a share of the profile's (build.py,
   from the measured alpha boxes). Both plates have the same side padding, so min(880px, 100%) is the
   profile's width in both. */
.plate--top .plate-art { width: calc(min(880px, 100%) * var(--wf, 1)); }

/* dimension lines, like a drawing sheet: the length under the profile, the span beside the top view */
.dim { position: absolute; color: var(--plate-ink); font-size: 12px; line-height: 1; letter-spacing: 0; font-variant-numeric: tabular-nums; pointer-events: none; }
.dim-h { left: var(--a); right: calc(100% - var(--b)); bottom: -28px; height: 9px; border-inline: 1px solid currentColor; }
.dim-h::before { content: ""; position: absolute; left: 0; right: 0; top: 4px; border-top: 1px solid currentColor; opacity: .7; }
.dim-h span { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); background: var(--plate); padding-inline: 8px; }
.dim-v { top: var(--a); bottom: calc(100% - var(--b)); right: -36px; width: 9px; border-block: 1px solid currentColor; }
.dim-v::before { content: ""; position: absolute; top: 0; bottom: 0; left: 4px; border-left: 1px solid currentColor; opacity: .7; }
.dim-v span { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%) rotate(-90deg); background: var(--plate); padding-inline: 8px; white-space: nowrap; }
@media (max-width: 600px) { .dim-v { right: -22px; } .dim-h { bottom: -24px; } }

.type-body { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: clamp(40px, 6vw, 96px); padding-block: clamp(48px, 6vw, 88px); }
@media (max-width: 900px) { .type-body { grid-template-columns: 1fr; } }
.col-main, .col-side { display: grid; gap: 48px; align-content: start; }
.wiki-text { font-size: var(--fs-lead); line-height: 1.42; letter-spacing: 0.009em; margin: 0; color: var(--ink); text-wrap: pretty; }
.wiki-src { margin: 16px 0 0; font-size: 17px; }

.specs dl { margin: 0; display: grid; }
.specs dl div { display: grid; grid-template-columns: 1fr auto; gap: 16px; padding-block: 11px; border-bottom: 1px solid var(--line); }
.specs dl div:first-child { border-top: 1px solid var(--line); }
.specs dt { color: var(--soft); font-size: 15px; }
.specs dd { margin: 0; font-size: 15px; text-align: right; font-variant-numeric: tabular-nums; }

.dl-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
@media (max-width: 520px) { .dl-list { grid-template-columns: 1fr; } }
.dl-list a { display: grid; gap: 2px; padding: 14px 16px; border-radius: 16px; background: var(--bg-2); color: var(--ink); text-decoration: none;
  transition: background-color var(--dur-fast) var(--ease-in-out), transform var(--dur-fast) var(--ease-in-out); }
.dl-list a:active { transform: scale(var(--press-scale)); }
@media (hover: hover) and (pointer: fine) { .dl-list a:hover { background: var(--tile-2); } }
.dl-list b { font-weight: 600; font-size: 15px; color: var(--link); }
.dl-list span { font-size: 13px; color: var(--soft); }
.license-box { margin-top: 20px; padding: 20px; border-radius: 18px; border: 1px solid var(--line); }
.license-box p { margin: 0 0 12px; font-size: 15px; color: var(--soft); }
.license-box p.label { margin-bottom: 8px; }
.copy { display: flex; align-items: stretch; gap: 8px; }
.copy code { flex: 1; min-width: 0; padding: 10px 12px; border-radius: 12px; background: var(--code-bg); font-size: 13px; line-height: 1.45; color: var(--ink); overflow-wrap: anywhere; }
.license-box .copy code { background: var(--bg-2); }
.copy-btn { flex: none; min-height: 44px; padding: 0 16px; border: 0; border-radius: 12px; background: var(--ink); color: var(--bg); font: inherit; font-size: 14px; cursor: pointer;
  transition: transform var(--dur-fast) var(--ease-in-out), opacity var(--dur-fast) var(--ease-in-out); }
.copy-btn:active { transform: scale(var(--press-scale)); }
@media (max-width: 520px) { .copy { flex-direction: column; } }
.nw { white-space: nowrap; }

.app-note { padding-top: 20px; border-top: 1px solid var(--line); }
.app-note p { margin: 0 0 6px; font-size: 14px; color: var(--soft); line-height: 1.45; }
.app-note .more { font-size: 14px; }

.liveries, .related { padding-bottom: clamp(56px, 7vw, 104px); }
.liveries .t-h3, .related .t-h3 { margin-bottom: 24px; }
.count { color: var(--soft); font-weight: 400; margin-left: 6px; }

/* ---------- documents ---------- */
.doc { padding-block: clamp(48px, 7vw, 96px) var(--section-pad); }
.read { max-width: var(--read); display: grid; gap: 18px; }
.read p { margin: 0; color: var(--soft); }
.read .intro { font-size: var(--fs-lead); line-height: 1.38; color: var(--ink); }
.read .t-h3 { margin-top: 22px; }
.read pre.code { background: var(--bg-2); border: 0; }
.read p code { font-size: 14px; padding: 1px 6px; border-radius: 6px; background: var(--bg-2); color: var(--ink); }
