/* planesizes.com. Drafting paper by day, a blueprint by night: one blue and one orange
   for the first two aircraft being compared, a green for the third, a purple for the
   fourth and a pink for the fifth, and a navy band across the top. The green, the
   purple and the pink were each chosen to stay apart from the others for readers with
   red-green color blindness, in both themes. */
:root {
    color-scheme: light;
    --bg: #f4f2ec; --surface: #fffefb; --sunk: #ebe8de; --ink: #15212d; --muted: #5a6877; --line: #d9d4c7; --grid: #e9e5da;
    --link: #14589c; --head: #0f2a43; --head-ink: #eef4fa; --head-muted: #a9bccf; --accent: #ff9a57;
    --a: #1b62c2; --b: #dc5418; --g: #00806a; --d: #8539f9; --e: #ea0088; --solo: #2a3644; --tint: #edf1f5; --focus: #1b62c2;
    --shadow: 0 1px 2px rgba(21, 33, 45, .06), 0 6px 20px rgba(21, 33, 45, .06);
    --mono: ui-monospace, "SF Mono", "Cascadia Mono", "Segoe UI Mono", Consolas, "Liberation Mono", monospace;
}
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        color-scheme: dark;
        --bg: #0b141e; --surface: #111d2a; --sunk: #0d1823; --ink: #e7eef6; --muted: #93a3b5; --line: #24364a; --grid: #1a2a3b;
        --link: #7db8ff; --head: #0a1826; --head-ink: #eef4fa; --head-muted: #9db1c6; --accent: #ff9a57;
        --a: #6aaeff; --b: #ff9259; --g: #5ad8b4; --d: #b65ffe; --e: #f06aaf; --solo: #c9d4e0; --tint: #1c2c3d; --focus: #8cc0ff;
        --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 20px rgba(0, 0, 0, .25);
    }
}
:root[data-theme="dark"] {
    color-scheme: dark;
    --bg: #0b141e; --surface: #111d2a; --sunk: #0d1823; --ink: #e7eef6; --muted: #93a3b5; --line: #24364a; --grid: #1a2a3b;
    --link: #7db8ff; --head: #0a1826; --head-ink: #eef4fa; --head-muted: #9db1c6; --accent: #ff9a57;
    --a: #6aaeff; --b: #ff9259; --g: #5ad8b4; --d: #b65ffe; --e: #f06aaf; --solo: #c9d4e0; --tint: #1c2c3d; --focus: #8cc0ff;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 20px rgba(0, 0, 0, .25);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; }
.wrap { max-width: 72rem; margin: 0 auto; padding: 0 1.25rem; }
a { color: var(--link); text-underline-offset: .15em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: .25rem; }
h1 { font-size: clamp(1.7rem, 1.2rem + 2.2vw, 2.5rem); line-height: 1.15; letter-spacing: -.02em; margin: 0 0 .5rem; }
h2 { font-size: 1.25rem; letter-spacing: -.01em; margin: 2.75rem 0 .75rem; }
h3 { font-size: 1rem; margin: 0; }
p { margin: 0 0 1rem; max-width: 44rem; }
.lede { font-size: 1.1rem; color: var(--muted); max-width: 40rem; }
.muted { color: var(--muted); }
.chip { font: 500 .78rem/1 var(--mono); letter-spacing: .04em; color: var(--muted); border: 1px solid var(--line); border-radius: .35rem; padding: .22rem .4rem; vertical-align: middle; white-space: nowrap; background: var(--surface); }
h1 .chip { font-size: .85rem; margin-left: .35rem; position: relative; top: -.2em; }

/* the band across the top */
.site-head { background: var(--head); color: var(--head-ink); border-bottom: 1px solid rgba(255, 255, 255, .08); }
.site-head .wrap { display: flex; align-items: center; gap: .5rem 1.5rem; flex-wrap: wrap; min-height: 3.5rem; padding-top: .5rem; padding-bottom: .5rem; }
.brand { display: inline-flex; align-items: center; gap: .55rem; color: inherit; text-decoration: none; font-size: 1.25rem; font-weight: 500; letter-spacing: -.02em; margin-right: auto; }
.brand svg { width: 1.9rem; height: 1.9rem; flex: none; }
.brand b { font-weight: 800; color: var(--accent); }
.site-head nav { display: flex; gap: .25rem; align-items: center; }
.site-head nav a { color: var(--head-muted); text-decoration: none; font-size: .95rem; font-weight: 500; padding: .4rem .7rem; border-radius: .4rem; }
.site-head nav a:hover { color: var(--head-ink); background: rgba(255, 255, 255, .07); }
.site-head nav a[aria-current="page"] { color: var(--head-ink); box-shadow: inset 0 -2px 0 var(--accent); border-radius: .4rem .4rem 0 0; }
.theme { font: inherit; color: var(--head-muted); background: none; border: 1px solid rgba(255, 255, 255, .16); border-radius: .4rem; width: 2.1rem; height: 2.1rem; display: grid; place-items: center; cursor: pointer; padding: 0; }
.theme:hover { color: var(--head-ink); border-color: rgba(255, 255, 255, .35); }
.theme svg { width: 1.05rem; height: 1.05rem; }
/* meters or feet: shown pressed by the unit the page was painted in, before any script */
.units { display: inline-flex; border: 1px solid rgba(255, 255, 255, .16); border-radius: .4rem; padding: .12rem; height: 2.1rem; }
.units button { font: 500 .8rem/1 var(--mono); color: var(--head-muted); background: none; border: 0; border-radius: .28rem; min-width: 1.85rem; padding: 0 .4rem; cursor: pointer; }
.units button:hover { color: var(--head-ink); }
html:not([data-unit="ft"]) .units [value="m"], html[data-unit="ft"] .units [value="ft"] { color: var(--head); background: var(--head-ink); }
.site-head :focus-visible { outline-color: var(--accent); }
@media (max-width: 34rem) {
    .site-head .wrap { gap: .25rem .75rem; }
    .site-head nav { order: 3; width: 100%; margin: 0 -.5rem; }
    .site-head nav a { padding: .35rem .5rem; }
}

.site-foot { margin-top: 4rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .88rem; }
.site-foot .wrap { padding-top: 1.5rem; padding-bottom: 2.5rem; display: flex; flex-wrap: wrap; gap: .5rem 2rem; justify-content: space-between; }
.site-foot p { margin: 0; max-width: 38rem; }
.site-foot nav { display: flex; gap: 1.25rem; }
.site-foot a { color: inherit; }

.hero { padding: 2.25rem 0 .25rem; }
.page-head { padding: 2rem 0 0; }
.crumbs { font-size: .88rem; color: var(--muted); margin-bottom: .6rem; }
.crumbs a { color: inherit; }
.crumbs span { margin: 0 .35rem; opacity: .6; }

/* what a person chooses with */
.tool { margin-top: 1.25rem; }
/* The boxes the aircraft are chosen in, one to an aircraft and three to a row, and after
   them, while there is room, the button that adds one, in the place the next box takes. */
.pickers { display: grid; grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)); gap: .7rem 1rem; align-items: end; list-style: none; margin: 0; padding: 0; }
.picker label { display: flex; align-items: center; gap: .4rem; font-size: .8rem; font-weight: 600; color: var(--muted); margin-bottom: .3rem; text-transform: uppercase; letter-spacing: .05em; }
.dot { width: .7rem; height: .7rem; border-radius: 50%; flex: none; background: var(--solo); }
.dot.a { background: var(--a); }
.dot.b { background: var(--b); }
.dot.c { background: var(--g); }
.dot.d { background: var(--d); }
.dot.e { background: var(--e); }
.slot { display: flex; gap: .3rem; align-items: stretch; }
.combo { position: relative; flex: 1; min-width: 0; }
.combo input { width: 100%; font: inherit; font-weight: 600; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: .6rem; padding: .7rem 2.3rem .7rem .85rem; box-shadow: var(--shadow); text-overflow: ellipsis; }
.combo input:focus { outline: 2px solid var(--focus); outline-offset: 0; border-color: transparent; }
/* each box is drawn as its aircraft is: outlined in its colour and lightly filled with it */
.picker { --k: var(--solo); }
.picker.a { --k: var(--a); }
.picker.b { --k: var(--b); }
.picker.c { --k: var(--g); }
.picker.d { --k: var(--d); }
.picker.e { --k: var(--e); }
.picker .combo input { border: 1.5px solid var(--k); background: color-mix(in srgb, var(--k) 9%, var(--surface)); }
.picker .combo input:focus { outline-color: var(--k); }
.picker:not(.a, .b, .c, .d, .e) .combo input { background: color-mix(in srgb, var(--k) 5%, var(--surface)); }
.combo::after { content: ""; position: absolute; right: .95rem; top: 50%; width: .5rem; height: .5rem; border-right: 2px solid var(--k, var(--muted)); border-bottom: 2px solid var(--k, var(--muted)); transform: translateY(-70%) rotate(45deg); pointer-events: none; }
.combo ul { position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + .3rem); margin: 0; padding: .3rem; list-style: none; background: var(--surface); border: 1px solid var(--line); border-radius: .6rem; box-shadow: 0 12px 40px rgba(0, 0, 0, .22); max-height: min(22rem, 60vh); overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; min-width: min(20rem, calc(100vw - 2.5rem)); }
.combo li > span { min-width: 0; }
/* a list wider than its box opens toward the middle of the page from the last column */
@media (min-width: 40.01rem) { .pickers > li:nth-child(3n) .combo ul { left: auto; right: 0; } }
.combo li { display: flex; align-items: baseline; justify-content: space-between; gap: .75rem; padding: .5rem .6rem; border-radius: .4rem; cursor: pointer; }
.combo li small { font: .75rem var(--mono); color: var(--muted); white-space: nowrap; }
.combo li[aria-selected="true"] { font-weight: 600; }
.combo li.active, .combo li:hover { background: var(--sunk); }
.combo li.none { color: var(--muted); cursor: default; background: none; }
.combo li.group { font-size: .72rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; padding: .55rem .6rem .25rem; cursor: default; background: none; }
/* beside each box: remove it, and swap it with the next */
.slot button, .slot span.move { flex: none; width: 2.2rem; }
.slot button { font: inherit; color: var(--muted); background: var(--surface); border: 1px solid var(--line); border-radius: .6rem; display: grid; place-items: center; cursor: pointer; padding: 0; }
.slot button:hover { color: var(--ink); border-color: var(--muted); }
.slot button svg { width: 1rem; height: 1rem; }
.add { font: inherit; font-size: .92rem; font-weight: 500; color: var(--muted); background: none; border: 1.5px dashed var(--line); border-radius: .6rem; width: 100%; min-height: 2.95rem; display: flex; align-items: center; justify-content: center; gap: .4rem; cursor: pointer; }
.add:hover { color: var(--ink); border-color: var(--muted); }
.add svg { width: 1rem; height: 1rem; }
/* dimmed, but its label is still to be read: it says why it cannot be used */
[data-layout][disabled] { opacity: .6; cursor: not-allowed; }
[data-layout][disabled]:hover { color: var(--muted); }
.options { display: flex; flex-wrap: wrap; gap: .6rem 1rem; margin: .9rem 0; }
.seg { display: inline-flex; background: var(--sunk); border: 1px solid var(--line); border-radius: .6rem; padding: .18rem; }
.seg button { font: inherit; font-size: .9rem; font-weight: 500; color: var(--muted); background: none; border: 0; border-radius: .45rem; padding: .35rem .8rem; cursor: pointer; white-space: nowrap; }
.seg button:hover { color: var(--ink); }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, .14); }
.more { display: contents; }
/* on a narrow screen the view is chosen above the picture and the rest below it, so
   that the picture is not pushed off the screen */
@media (max-width: 40rem) {
    .pickers { grid-template-columns: 1fr; gap: .5rem; }
    /* one under another, the next is below */
    .slot .move svg { transform: rotate(90deg); }
    .add { min-height: 2.6rem; }
    /* three or more: the colour of each box says which it is, and the labels would push
       the picture down a screen */
    .pickers.many label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
    .tool { display: flex; flex-direction: column; }
    .options { display: contents; }
    .options > .seg { order: 1; align-self: flex-start; margin: .9rem 0 .7rem; }
    .options > .seg button { padding: .4rem 1.1rem; }
    #stage { order: 2; }
    .more { display: flex; flex-wrap: wrap; gap: .5rem; order: 3; margin-top: .7rem; }
    .more .seg button { padding: .35rem .6rem; }
    .tool > p, .tool > .table-wrap, .tool > noscript { order: 4; }
}

/* a drawing on its sheet */
.stage { background: var(--surface); border: 1px solid var(--line); border-radius: .75rem; overflow: hidden; box-shadow: var(--shadow); }
.stage svg { display: block; width: 100%; height: auto; }
.stage.loading { min-height: 12rem; display: grid; place-items: center; color: var(--muted); }
.summary { font-size: 1.05rem; margin: 1rem 0 0; max-width: 50rem; }
.credit { font-size: .85rem; color: var(--muted); margin: .6rem 0 0; max-width: none; }
.credit a { color: inherit; }
.plane { fill: var(--solo); }
.plane.a { fill: var(--a); }
.plane.b { fill: var(--b); }
.plane.c { fill: var(--g); }
.plane.d { fill: var(--d); }
.plane.e { fill: var(--e); }
.over .plane { fill-opacity: .6; }
.detail { fill: var(--surface); fill-opacity: .8; }
.ld { --c: var(--ink); }
.ld.a { --c: var(--a); }
.ld.b { --c: var(--b); }
.ld.c { --c: var(--g); }
.ld.d { --c: var(--d); }
.ld.e { --c: var(--e); }
.ld path { vector-effect: non-scaling-stroke; stroke-linejoin: round; stroke-linecap: round; }
.ld .lf { fill: var(--tint); stroke: none; }
.ld.a .lf, .ld.b .lf, .ld.c .lf, .ld.d .lf, .ld.e .lf { fill: color-mix(in srgb, var(--c) 14%, var(--surface)); }
/* overlaid, a fill is mostly paper, so the aircraft behind shows through faintly */
.over .ld .lf { fill-opacity: .8; }
.ld .li { fill: none; stroke: var(--c); stroke-width: var(--thin, .7px); }
.ld .lh { fill: none; stroke: var(--c); stroke-width: var(--thin, .7px); stroke-dasharray: 3.5 2.5; stroke-linecap: butt; }
.ld .lo { fill: none; stroke: var(--c); stroke-width: var(--thick, 1.4px); }
/* a line drawing's fill and outline alone, which a comparison's page is written with
   until the tool has fetched the lines inside (see 'shape' in site/draw.mjs) */
.ld .lfo { stroke: var(--c); stroke-width: var(--thick, 1.4px); }
/* the list of comparisons on /compare/ */
/* /lists/: each way the aircraft are sorted, as rows of a link and what is behind it with
   rules between; the families are cards, for their pictures */
.index { list-style: none; margin: 0; padding: 0; columns: 2 21rem; column-gap: 3rem; max-width: 62rem; }
.index li { break-inside: avoid; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: .1rem 1rem; padding: .55rem 0; border-bottom: 1px solid var(--line); }
.index a { font-weight: 600; }
.index li > span { color: var(--muted); font-size: .88rem; }
/* on a narrow screen what is behind a link goes under it, for every row alike */
@media (max-width: 40rem) { .index li > span { flex-basis: 100%; } }
/* what a comparison's page says of its two aircraft, a sentence to a line */
.notes { margin: 0; padding-left: 1.15rem; max-width: 48rem; }
.notes li { padding: .2rem 0; }
.notes li::marker { color: var(--muted); }
.pairs { columns: 17rem; column-gap: 2rem; list-style: none; padding: 0; margin: .5rem 0 0; }
.pairs li { break-inside: avoid; padding: .25rem 0; }
.gridline { fill: none; stroke: var(--grid); vector-effect: non-scaling-stroke; }
.ground { stroke: var(--muted); vector-effect: non-scaling-stroke; }
.tick { fill: var(--muted); font-family: var(--mono); }
/* a picture carries its grid in meters and in feet, and shows the reader's */
.g-ft, html[data-unit="ft"] .g-m { display: none; }
html[data-unit="ft"] .g-ft { display: inline; }
.t-narrow { display: none; }
@media (max-width: 52rem) { .t-wide { display: none; } .t-narrow { display: inline; } }
.person { fill: var(--muted); }
/* an aircraft not drawn yet: a dashed box of its size, in its colour */
.nd { --c: var(--muted); }
.nd.a { --c: var(--a); }
.nd.b { --c: var(--b); }
.nd.c { --c: var(--g); }
.nd.d { --c: var(--d); }
.nd.e { --c: var(--e); }
.nd rect { fill: color-mix(in srgb, var(--c) 7%, transparent); stroke: var(--c); stroke-width: 1.3px; stroke-dasharray: 6 4; vector-effect: non-scaling-stroke; }
.nd text { fill: var(--c); }
.name { fill: var(--ink); font-weight: 600; }
.name.a { fill: var(--a); }
.name.b { fill: var(--b); }
.name.c { fill: var(--g); }
.name.d { fill: var(--d); }
.name.e { fill: var(--e); }

/* A figure is written in meters and in feet (kilograms and pounds), and shown in the
   unit the reader has chosen, which the page sets on html before it is painted: alone in
   a sentence (.u), or first with the other under it, smaller (.uu). */
.u > .uf, html[data-unit="ft"] .u > .um { display: none; }
html[data-unit="ft"] .u > .uf { display: inline; }
.uu { display: inline-grid; }
.uu > * { display: block; }
.uu > .uf, html[data-unit="ft"] .uu > .um { font-size: .8rem; font-weight: 400; letter-spacing: 0; color: var(--muted); }
html[data-unit="ft"] .uu > .uf { order: -1; font-size: inherit; font-weight: inherit; letter-spacing: inherit; color: inherit; }

/* figures */
table { border-collapse: collapse; font-variant-numeric: tabular-nums; width: 100%; max-width: 46rem; }
th, td { text-align: right; padding: .5rem .9rem; border-bottom: 1px solid var(--line); }
th:first-child, td:first-child { text-align: left; padding-left: 0; }
th:last-child, td:last-child { padding-right: 0; }
thead th { font-size: .75rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
/* a table of figures: its numbers are never broken across lines */
.figures th + th, .figures td + td { white-space: nowrap; }
/* an aircraft to a row: on a narrow screen the table scrolls rather than squeeze the names */
.figures:not(.across) td:first-child { min-width: 9.5rem; }
td small { display: block; color: var(--muted); font-size: .8rem; }
@media (max-width: 34rem) { th, td { padding: .5rem .45rem; font-size: .92rem; } thead th { font-size: .68rem; white-space: normal; } }
td .dot, th .dot { display: inline-block; margin-right: .45rem; }
/* figures as rows and aircraft as columns, so that more aircraft make it no wider than it must be */
.across { max-width: calc(10rem + var(--n, 2) * 10rem); }
.across thead th { text-transform: none; letter-spacing: 0; font-size: .9rem; color: var(--ink); vertical-align: bottom; white-space: normal; min-width: 7.5rem; }
.across thead th a { color: inherit; }
.across tbody th { text-align: left; font-weight: 500; font-size: .9rem; color: var(--muted); padding-left: 0; }
/* with many aircraft it scrolls sideways in its wrapper, the names of the figures staying in view */
.across tbody th, .across thead td { position: sticky; left: 0; z-index: 1; background: var(--bg); }
/* a type's other figures: a label and a value to a row, with a few words on what it means */
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr)); gap: 0 3rem; max-width: 62rem; }
.spec { max-width: none; }
.spec th { text-align: left; font-weight: 500; color: var(--muted); width: 42%; vertical-align: top; padding-left: 0; }
.spec td { text-align: left; }
.spec td small { margin-top: .15rem; line-height: 1.4; }
.spec tbody tr:last-child th { border-bottom: 0; }
.quiet h2 { color: var(--muted); }
.quiet td { font-size: .95rem; }
.sources { font-size: .85rem; color: var(--muted); margin-top: 1rem; max-width: 50rem; }
tbody tr:last-child td, tbody tr:last-child th { border-bottom: 0; }
.table-wrap { overflow-x: auto; margin-top: 1.25rem; }
/* the three sizes at the head of a page, each beside a small diagram of what it measures:
   a row with rules between, not cards */
.key { display: flex; flex-wrap: wrap; margin: 1.4rem 0 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); max-width: 52rem; }
.key div { flex: 1 1 0; min-width: 0; display: grid; grid-template-columns: 5.6rem minmax(0, 1fr); column-gap: .9rem; align-content: center; padding: .85rem 1.25rem; }
.key div:first-child { padding-left: 0; }
.key div + div { border-left: 1px solid var(--line); }
.key .measure { grid-row: 1 / 3; align-self: center; width: 100%; height: auto; }
.m-craft { fill: var(--tint); stroke: var(--muted); stroke-width: .9; stroke-linejoin: round; }
.m-ground { fill: none; stroke: var(--muted); stroke-width: .7; }
.m-line { fill: none; stroke: var(--a); stroke-width: 1.5; stroke-linecap: round; }
.key dt { align-self: end; font-size: .75rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.key dd { margin: .1rem 0 0; font-size: clamp(1.15rem, .9rem + 1.1vw, 1.5rem); font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.key dd small { display: block; font-size: .8rem; font-weight: 400; letter-spacing: 0; color: var(--muted); }
/* on a narrow screen each is a row of its own: the diagram, then the figure */
@media (max-width: 40rem) {
    .key { display: block; }
    .key div { padding: .7rem 0; grid-template-columns: 5.2rem minmax(0, 1fr); }
    .key div + div { border-left: 0; border-top: 1px solid var(--line); }
}

/* cards */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(15.5rem, 1fr)); gap: 1rem; padding: 0; margin: 0; list-style: none; }
.card { display: flex; flex-direction: column; gap: .15rem; background: var(--surface); border: 1px solid var(--line); border-radius: .75rem; padding: 1rem; color: inherit; text-decoration: none; min-width: 0; transition: border-color .15s, transform .15s, box-shadow .15s; }
a.card:hover { border-color: var(--link); transform: translateY(-2px); box-shadow: var(--shadow); }
.card h3 { display: flex; align-items: baseline; justify-content: space-between; gap: .5rem; }
.card h3 span:first-child { min-width: 0; }
.card .sub { font-size: .85rem; color: var(--muted); }
.card .dims { font: .78rem var(--mono); color: var(--muted); margin-top: auto; padding-top: .5rem; }
/* a silhouette, cut out of the text colour so that it follows the theme */
.thumb { display: block; background: var(--solo); -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; -webkit-mask-position: center; mask-position: center; -webkit-mask-size: contain; mask-size: contain; }
.card > .thumb, .thumb-nd { height: var(--th, 4.2rem); margin: .7rem 0 .2rem; }
/* an aircraft not drawn yet: a dashed box of its length and height, as large as a silhouette would be */
.thumb-nd { display: flex; align-items: center; justify-content: center; }
.thumb-nd span { width: min(100%, calc(var(--th, 4.2rem) * var(--r))); aspect-ratio: var(--r); border: 1.5px dashed var(--muted); border-radius: 2px; display: grid; place-items: center; font-size: .72rem; color: var(--muted); overflow: hidden; white-space: nowrap; }
/* a long list draws only the cards near the screen. This is on the card and not its
   list item: it clips what is inside to the box, and on the item that cut off the top
   of a card lifted on hover, with its shadow and its focus ring */
#all .card { content-visibility: auto; contain-intrinsic-size: auto 10rem; }
/* two silhouettes to one scale, standing on one line */
.duo { position: relative; margin: .6rem 0 .3rem; border-bottom: 1px solid var(--line); }
.duo .thumb { position: absolute; left: 0; bottom: 0; -webkit-mask-size: 100% 100%; mask-size: 100% 100%; opacity: .85; }
.duo .thumb.a { background: var(--a); }
.duo .thumb.b { background: var(--b); }
.duo .thumb.c { background: var(--g); }
.duo .thumb.many { opacity: .5; }
.duo .thumb.nd { background: none; border: 1.5px dashed var(--muted); opacity: 1; }
.duo .thumb.nd.a { border-color: var(--a); }
.duo .thumb.nd.b { border-color: var(--b); }
.duo .thumb.nd.c { border-color: var(--g); }
.vs { font-size: .8rem; color: var(--muted); font-weight: 400; }
/* two to a row on a phone, so that a long list is half as long */
@media (max-width: 34rem) {
    .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
    .card { padding: .7rem; }
    .card h3 { font-size: .92rem; flex-wrap: wrap; gap: .25rem .5rem; }
    .card { --th: 3rem; }
    .card > .thumb, .thumb-nd { margin-top: .5rem; }
    .card .dims { font-size: .68rem; }
}
.toolbar { display: flex; flex-wrap: wrap; gap: .75rem 1rem; align-items: center; margin: 1.25rem 0; }
.toolbar input { font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: .6rem; padding: .55rem .85rem; width: min(24rem, 100%); }
.toolbar input:focus { outline: 2px solid var(--focus); outline-offset: 0; border-color: transparent; }
.links { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; padding: 0; margin: .75rem 0 0; list-style: none; }

/* a type's three views, all to one scale: side and front in one row, the top view
   under the side view, as on a drawing office's sheet */
.three { display: grid; gap: 1.25rem; align-items: start; margin-top: 1.5rem; }
.three figure { margin: 0; min-width: 0; }
figcaption, .eyebrow { font-size: .75rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin: 0 0 .35rem; }
.three .info h2 { margin-top: 1.4rem; }
@media (max-width: 52rem) {
    .three { display: block; }
    .three figure { width: calc(var(--w) / var(--max) * 100%); margin-bottom: 1.25rem; }
}
/* a family's members, each on its own line and all to one scale */
.lineup { list-style: none; margin: 1.25rem 0 0; padding: 1.25rem 1.25rem .5rem; }
.lineup li { margin-bottom: 1.5rem; }
.lineup h3 { font-weight: 600; }
.lineup h3 small { font: .78rem var(--mono); color: var(--muted); font-weight: 400; margin-left: .5rem; white-space: nowrap; }
.lineup svg { width: calc(var(--w) / var(--max) * 100%); margin-top: .35rem; }
.skip { position: absolute; left: -999px; top: .5rem; background: var(--surface); color: var(--ink); padding: .5rem .75rem; border-radius: .4rem; z-index: 50; }
.skip:focus { left: .5rem; }
html.pair-asked #stage > *, html.pair-asked #summary, html.pair-asked #figures, html.pair-asked .pickers { visibility: hidden; }
.prose h2 { margin-top: 2.25rem; }
.prose ul { padding-left: 1.2rem; max-width: 44rem; }
.button { display: inline-block; font-weight: 600; text-decoration: none; color: var(--surface); background: var(--link); border-radius: .6rem; padding: .6rem 1rem; }
.button:hover { filter: brightness(1.1); }

/* the buttons that narrow the list of aircraft to one kind */
.kinds { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0 0 1.25rem; }
.kinds button { font: inherit; font-size: .88rem; color: var(--muted); background: var(--surface); border: 1px solid var(--line); border-radius: 2rem; padding: .3rem .8rem; cursor: pointer; white-space: nowrap; }
.kinds button:hover { color: var(--ink); border-color: var(--muted); }
.kinds button[aria-pressed="true"] { color: var(--surface); background: var(--ink); border-color: var(--ink); }
@media (max-width: 34rem) { .kinds { flex-wrap: nowrap; overflow-x: auto; padding-bottom: .35rem; } }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* a kind's members: a silhouette to a row, then the figures */
.kind { max-width: none; }
.kind td.pic { width: 6.5rem; min-width: 6.5rem; padding-right: .9rem; --th: 2.1rem; }
.kind .thumb, .kind .thumb-nd { margin: 0; height: var(--th); }
.kind th:nth-child(2), .kind td:nth-child(2) { text-align: left; min-width: 11rem; white-space: normal !important; }
@media (max-width: 34rem) { .kind td.pic { width: 4.5rem; min-width: 4.5rem; padding-right: .5rem; } }

/* a list ranked by one figure: its place, the aircraft, a bar in proportion to the figure, the figure */
.rank { list-style: none; margin: 1.5rem 0 0; padding: 0; counter-reset: place; }
.rank li { counter-increment: place; display: grid; grid-template-columns: 2.6rem minmax(0, 1.1fr) minmax(4rem, 1.6fr) 9.5rem; gap: 0 1rem; align-items: center; padding: .45rem 0; border-bottom: 1px solid var(--line); content-visibility: auto; contain-intrinsic-size: auto 3rem; }
.rank li::before { content: counter(place); font: .8rem var(--mono); color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }
.rank li > div { min-width: 0; line-height: 1.3; }
.rank li > div small { display: block; font-size: .8rem; color: var(--muted); }
.rank li > i { display: block; height: .55rem; background: linear-gradient(to right, var(--a) var(--w), var(--tint) var(--w)); border-radius: 1px; }
.rank li > span { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rank li > span small { display: block; color: var(--muted); font-size: .8rem; }
@media (max-width: 34rem) {
    .rank li { grid-template-columns: 2rem minmax(0, 1fr) auto; gap: .3rem .6rem; padding: .55rem 0; }
    .rank li > i { grid-column: 2 / -1; grid-row: 2; }
    .rank li > span { font-size: .92rem; }
}

/* "Will it fit?" at the foot of a type's page, folded closed: three boxes for a hangar's
   door and depth, then the sentence and the picture beside them (site/fit.mjs) */
details.fit { margin-top: 2.75rem; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
details.fit[open] { padding-bottom: 1.25rem; }
details.fit > summary { display: flex; align-items: center; gap: .7rem; padding: .9rem 0; cursor: pointer; list-style: none; }
details.fit > summary::-webkit-details-marker { display: none; }
details.fit > summary::before { content: ''; flex: none; width: .45rem; height: .45rem; margin: 0 .1rem 0 .2rem; border: solid var(--muted); border-width: 0 2px 2px 0; transform: rotate(-45deg); transition: transform .15s; }
details.fit[open] > summary::before { transform: rotate(45deg); }
details.fit > summary h2 { margin: 0; font-size: 1.05rem; }
.fit-body { display: grid; grid-template-columns: minmax(0, 26rem) minmax(0, 1fr); gap: 1rem 2.5rem; align-items: start; }
.fit-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .6rem; }
.fit-fields label { display: block; font-size: .75rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin-bottom: .3rem; white-space: nowrap; }
.fit-in { display: flex; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: .6rem; padding-right: .7rem; }
.fit-in:focus-within { outline: 2px solid var(--focus); border-color: transparent; }
.fit-in input { font: inherit; font-variant-numeric: tabular-nums; color: var(--ink); background: none; border: 0; padding: .55rem .2rem .55rem .75rem; width: 100%; min-width: 0; }
.fit-in input:focus { outline: none; }
.fit-in input[aria-invalid="true"] { color: var(--b); }
.fit-in > .u { font: .8rem var(--mono); color: var(--muted); }
.fit-say { margin: 1rem 0 .5rem; }
.fit-say:empty { display: none; }
.fit-note { font-size: .85rem; color: var(--muted); }
.fit-pic { margin: 0; }
.fit-pic .stage { padding: .5rem; }
.fit-pic svg { width: min(100%, calc(var(--ar, 1) * 30rem)); margin: 0 auto; }
.fit-pic figcaption { margin: .5rem 0 0; text-transform: none; letter-spacing: 0; font-weight: 400; font-size: .85rem; }
.fit-wall { fill: none; stroke: var(--muted); stroke-width: 1.3px; vector-effect: non-scaling-stroke; }
.fit-door { stroke: var(--muted); stroke-width: 1.3px; stroke-dasharray: 5 4; vector-effect: non-scaling-stroke; }
@media (max-width: 52rem) { .fit-body { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 30rem) { .fit-fields { gap: .4rem; } .fit-fields label { font-size: .68rem; letter-spacing: .03em; } .fit-in { padding-right: .5rem; } .fit-in input { padding-left: .55rem; } }

/* design groups and code letters */
.limits { max-width: 40rem; }
.set { margin-top: 1.75rem; scroll-margin-top: 1rem; }
.set h3 { font-size: 1.05rem; margin: 0 0 .5rem; }
.set h3 .muted { font-weight: 400; font-size: .9rem; }
.names { list-style: none; padding: 0; margin: 0; columns: 14rem; column-gap: 1.5rem; font-size: .92rem; }
.names li { break-inside: avoid; padding: .1rem 0; }
.table-wrap + .set { margin-top: 2rem; }
