/* longshot: one stylesheet for every page. Hand-written; no build step. The rules are docs/design.md.
   Two text inks: white, the default, for content (section and property names, values, headings, links); grey for
   what qualifies it (units, state words, details, sources) and for apparatus (control labels, table headers, axes). Five type roles: title, heading, body, label, small. One weight, no hue.
   Mark brightness: full, measured; half, estimated. The glow means measured and nothing else. */

/* B612 has no parentheses here: its own are square, so the fallback font draws them (U+0028, U+0029 left out). */
@font-face { font-family: "B612"; font-weight: 400; font-style: normal; font-display: swap; src: url(fonts/b612-regular.woff2) format("woff2");
  unicode-range: U+0000-0027, U+002A-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+03C3, U+2000-209F, U+2212, U+2248, U+2264-2265; }

:root {
  --ground: #000000;
  --ink: #ffffff;
  --ink-2: #a8a8a8;
  --edge: #5e5e5e;
  --grid: #202020;
  --glow: drop-shadow(0 0 2px #ffffff8c);

  --sans: "B612", system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --serif: ui-serif, Georgia, "Times New Roman", serif;

  --t-title: 32px/36px var(--sans);
  --t-heading: 20px/28px var(--sans);
  --t-body: 16px/24px var(--sans);
  --t-label: 14px/20px var(--sans);
  --t-small: 12px/16px var(--sans);
  --t-prose: 16px/24px var(--serif);      /* the body role, for running prose of two or more sentences */

  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px;
  --gutter: 16px;
  color-scheme: dark;
}
@media (min-width: 900px) { :root { --gutter: 32px; } }

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--ground); color: var(--ink); -webkit-text-size-adjust: 100%; }
body { margin: 0; font: var(--t-body); font-variant-numeric: tabular-nums; font-synthesis: none; background: var(--ground); }
h1, h2, h3, h4, p, ol, ul, dl, dd, figure, table { margin: 0; }
h1, h2, h3, h4, b, strong, th { font-weight: 400; }
i, dfn { font-style: normal; }
ol, ul { padding: 0; list-style: none; }
a { color: var(--ink); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; text-decoration-color: var(--edge); }
a:hover { text-decoration-color: var(--ink); }
abbr[title], dfn[title] { text-decoration: underline dotted; text-decoration-thickness: 1px; text-underline-offset: 3px; text-decoration-color: var(--ink-2); cursor: help; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.num { text-align: right; white-space: nowrap; }
time, .nb { white-space: nowrap; }
.u, .lab, .k { color: var(--ink-2); }
.none { font: var(--t-label); color: var(--ink-2); }
.note { font: var(--t-prose); margin-top: var(--s3); max-width: 72ch; }      /* prose is content: white */
.turn { animation: turn linear infinite; transform-origin: 0 0; }
@keyframes turn { to { transform: rotate(-360deg); } }   /* the way the field turns */
@media (prefers-reduced-motion: reduce) { .turn { animation: none; } }

/* ---------- header ---------- */
.site { display: flex; align-items: center; gap: var(--s5); height: 48px; padding: 0 var(--gutter); border-bottom: 1px solid var(--edge); }
.site .mark { display: inline-flex; align-items: center; gap: 10px; font: var(--t-body); text-decoration: none; }
.rockmark { width: 20px; height: 20px; flex: none; overflow: visible; }
.rockmark polygon { fill: none; stroke: var(--ink); stroke-width: 1.5; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.site .proto { font: var(--t-label); color: var(--ink-2); border: 1px solid var(--edge); padding: 0 6px; margin-left: calc(-1 * var(--s3)); }
.site nav ul { display: flex; gap: var(--s5); }
.site nav a { display: block; font: var(--t-label); text-decoration: none; padding: 14px 0 12px; border-bottom: 2px solid transparent; }
.site nav a:hover { border-bottom-color: var(--edge); }
.site nav a[aria-current="page"] { border-bottom-color: var(--ink); }
.site .date, .site-foot { color: var(--ink-2); }      /* "Data" is the label; the date is the value */
.site .date time, .site-foot time { color: var(--ink); }
.site .date { margin-left: auto; font: var(--t-label); white-space: nowrap; }
.site .menu { display: none; }
.site-foot { display: none; }
@media (max-width: 899px) {
  .site { gap: var(--s4); position: relative; }
  .site > nav, .site > .date { display: none; }
  .site .menu { display: block; margin-left: auto; }
  .site summary { font: var(--t-label); list-style: none; cursor: pointer; border: 1px solid var(--edge); padding: 4px 12px; }
  .site summary::-webkit-details-marker { display: none; }
  .site .menu[open] summary { border-color: var(--ink); }
  .site .menu nav { position: absolute; z-index: 5; left: 0; right: 0; top: 47px; background: var(--ground); border-bottom: 1px solid var(--edge); padding: var(--s2) var(--gutter) var(--s4); }
  .site .menu nav ul { flex-direction: column; gap: 0; }
  .site .menu nav a { padding: 10px 0; border: 0; }
  .site .menu nav a[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--ink); }
  /* the header has no room for the data date on a phone: the foot carries it */
  .site-foot { display: block; width: calc(100% - 2 * var(--gutter)); margin: 0 auto; border-top: 1px solid var(--edge); padding: var(--s4) 0; font: var(--t-label); }
}

/* ---------- marks: one set on every page ---------- */
/* Each mark is one empty element with its outline as a background, so a page that lists thousands carries a
   class name per mark. Measured: a white rock outline with the glow. A bound: the outline dashed. Estimated: a dot
   at half brightness; zoomed, a half-bright outline. Viable, with a mission type chosen: the rock filled. */
.g { display: inline-block; width: 14px; height: 14px; vertical-align: -2px; margin-right: 6px; flex: none; background: center / 100% 100% no-repeat; }
.g-measured { filter: var(--glow); }
.g-measured { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-8 -8 16 16'%3E%3Cpolygon points='4.8,2.0 4.1,5.1 1.0,6.7 -2.1,5.0 -3.6,2.6 -6.6,0.7 -5.8,-2.4 -3.0,-3.8 -1.0,-6.5 2.1,-5.2 3.3,-2.4 6.3,-0.7' fill='none' stroke-linejoin='round' stroke='%23fff' stroke-width='1.7'/%3E%3C/svg%3E"); }
.g-limit { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-8 -8 16 16'%3E%3Cpolygon points='4.8,2.0 4.1,5.1 1.0,6.7 -2.1,5.0 -3.6,2.6 -6.6,0.7 -5.8,-2.4 -3.0,-3.8 -1.0,-6.5 2.1,-5.2 3.3,-2.4 6.3,-0.7' fill='none' stroke-linejoin='round' stroke='%23fff' stroke-width='1.7' stroke-dasharray='2.8 2.3'/%3E%3C/svg%3E"); }
.g-prior { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-8 -8 16 16'%3E%3Ccircle r='2.6' fill='%23a8a8a8'/%3E%3C/svg%3E"); }
.g-priorz { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-8 -8 16 16'%3E%3Cpolygon points='4.8,2.0 4.1,5.1 1.0,6.7 -2.1,5.0 -3.6,2.6 -6.6,0.7 -5.8,-2.4 -3.0,-3.8 -1.0,-6.5 2.1,-5.2 3.3,-2.4 6.3,-0.7' fill='none' stroke-linejoin='round' stroke='%23a8a8a8' stroke-width='1.4'/%3E%3C/svg%3E"); }
.g-pass { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-8 -8 16 16'%3E%3Cpolygon points='4.8,2.0 4.1,5.1 1.0,6.7 -2.1,5.0 -3.6,2.6 -6.6,0.7 -5.8,-2.4 -3.0,-3.8 -1.0,-6.5 2.1,-5.2 3.3,-2.4 6.3,-0.7' fill='%23fff' stroke-linejoin='round' stroke='%23fff' stroke-width='1.7'/%3E%3C/svg%3E"); }   /* viable: the rock filled */
.st { display: inline-flex; align-items: center; white-space: nowrap; font: var(--t-label); color: var(--ink-2); }   /* a state word is an addendum: grey; its mark keeps its own look */

/* ---------- buttons and inputs ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--s2); font: var(--t-label); color: var(--ink); background: var(--ground); border: 1px solid var(--edge); border-radius: 0; padding: 5px 12px; text-decoration: none; cursor: pointer; }
.btn:hover, .btn-solid { border-color: var(--ink); }
.btn:disabled { color: var(--edge); border-color: var(--grid); cursor: default; }
.btn.sq { width: 32px; padding: 5px 0; }

/* ---------- tables ---------- */
table { border-collapse: collapse; }
.tbl { width: 100%; font: var(--t-label); }
.tbl th, .tbl td { padding: 6px 0 6px var(--s4); text-align: left; vertical-align: baseline; }
.tbl th:first-child, .tbl td:first-child { padding-left: 0; }
.tbl thead th { color: var(--ink-2); border-bottom: 1px solid var(--edge); padding-bottom: 8px; vertical-align: bottom; }
.tbl tbody th { color: var(--ink); }   /* a property's name: content, white (docs/design.md section 4) */
.tbl .num { text-align: right; }
.tbl tbody tr + tr > * { border-top: 1px solid var(--grid); }
.tbl.mini { width: auto; min-width: 280px; margin-top: var(--s3); }

/* ---------- front page: one frame ---------- */
.app { display: grid; grid-template-columns: minmax(0, 1fr) 424px; grid-template-rows: auto minmax(0, 1fr);
  grid-template-areas: "strip strip" "fig read"; height: calc(100vh - 48px); height: calc(100dvh - 48px); min-height: 640px; }
.strip { grid-area: strip; display: flex; align-items: flex-end; flex-wrap: wrap; gap: var(--s3) var(--s6); padding: var(--s3) var(--gutter); border-bottom: 1px solid var(--edge); }
.ctl { display: flex; flex-direction: column; gap: 6px; min-width: 0; margin: 0; }
.ctl .lab { font: var(--t-label); }
.seg { display: flex; }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.seg span { display: block; font: var(--t-label); padding: 5px 12px; border: 1px solid var(--edge); white-space: nowrap; }
.seg label + label span { border-left: 0; }
.seg input:checked + span { background: var(--ink); color: var(--ground); border-color: var(--ink); }   /* the selected option: a convention */
.seg input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 2px; position: relative; z-index: 1; }
.seg input:not(:checked):hover + span { border-color: var(--ink); }
.seg input:disabled + span { color: var(--edge); cursor: default; }
.dvrow { display: flex; align-items: center; gap: var(--s3); height: 32px; }
.dvrow output { font: var(--t-label); min-width: 4ch; text-align: right; white-space: nowrap; }
input[type="range"] { -webkit-appearance: none; appearance: none; width: 200px; height: 24px; background: transparent; margin: 0; cursor: pointer; }
input[type="range"]::-webkit-slider-runnable-track { height: 2px; background: var(--edge); }
input[type="range"]::-moz-range-track { height: 2px; background: var(--edge); }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 10px; height: 20px; margin-top: -9px; background: var(--ink); border: 0; border-radius: 0; }
input[type="range"]::-moz-range-thumb { width: 10px; height: 20px; background: var(--ink); border: 0; border-radius: 0; }
input[type="range"]:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }
input[type="search"] { font: var(--t-label); color: var(--ink); background: var(--ground); border: 1px solid var(--edge); height: 32px; padding: 0 10px; width: 250px; border-radius: 0; }
input[type="search"]::placeholder { color: var(--ink-2); }
input[type="search"]:focus-visible { outline: 2px solid var(--ink); outline-offset: 0; border-color: var(--ink); }
@media (min-width: 900px) and (max-width: 1239px) {
  .ctl.dv { flex: 1 1 240px; } .ctl.find { flex: 1 1 220px; }
  .ctl.dv input[type="range"] { flex: 1; width: auto; } .ctl.find input[type="search"] { width: 100%; }
}

.fig { grid-area: fig; display: flex; flex-direction: column; min-height: 0; padding: var(--s3) var(--s5) var(--s3) var(--gutter); }
.fig-head { display: flex; align-items: center; gap: var(--s3) var(--s5); flex-wrap: wrap; margin-bottom: var(--s3); min-height: 32px; }
/* the line above the chart: labels grey, counts white */
.legend { flex: 1; min-width: 0; }
/* The key: the total, then a row per thing the marks say, its grey label in a column of its own and its items
   beside it, so an item that wraps stays under its row. Every row is always there and every count keeps one width
   (as wide as 7,231), so the legend has one height in every state and the chart below it never moves. */
.legend ul { font: var(--t-label); color: var(--ink-2); }
.legend > ul { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: var(--s2) var(--s5); }
.legend li.tot { grid-column: 1 / -1; }                 /* "397 of 7,231 reachable asteroids": a phrase, spaced as text */
.legend li.lrow { display: contents; }
.legend ul.items { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s5); }
.legend li.c { display: flex; align-items: center; white-space: nowrap; }
.legend .n { color: var(--ink); margin-left: 6px; }
.legend li.tot .n { margin: 0; }
.legend li.c .n { display: inline-block; min-width: 5ch; font-variant-numeric: tabular-nums; }
.legend li[data-k="loose"] .n { min-width: 0; }         /* "No brightness 6 (not drawn)": one digit, read as a phrase */
.legend .aft { margin-left: 6px; }
.legend .lab { color: var(--ink); }                       /* a row's name: content, white; its states and the phrase grey */
.legend[data-m="0"] li.lrow.v { visibility: hidden; }    /* with All the viability row keeps its place, so the chart keeps its height */
/* wide: the items in columns too, lined up across the rows, and the zoom buttons beside the total; from 1280 px,
   where the four columns (774 px) fit beside the readout */
@media (min-width: 1280px) {
  .fig-head { position: relative; }
  .fig-head .zoom { position: absolute; top: 0; right: 0; }
  .legend > ul { grid-template-columns: repeat(4, max-content); }
  .legend ul.items { display: contents; }
  .legend li.tot { padding: 6px 0; }                     /* as tall as the zoom buttons beside it */
}
.zoom { display: flex; align-items: center; gap: var(--s2); margin-left: auto; }
.zoom .btn { height: 32px; }
.plot { position: relative; flex: 1; min-height: 0; margin: 0; touch-action: pan-y; }
.plot canvas, .plot .grid { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.plot canvas { cursor: crosshair; }
.plot canvas.grab { cursor: grabbing; }
.plot canvas:focus-visible { outline: none; }        /* Escape hands the focus back to the chart; the ring shows only when Tab brought it (app.js adds .tabbed) */
.plot canvas.tabbed:focus-visible { outline: 2px solid var(--ink); outline-offset: -2px; }
.plot-note, .noscript-fig { border: 1px solid var(--edge); padding: var(--s5); color: var(--ink-2); font: var(--t-label); }

/* the axes overlay, drawn by the app as HTML: tick labels small, axis titles a label, the Max Δv label, all grey;
   the selection's values white */
#axes { position: absolute; inset: 0; pointer-events: none; overflow: hidden; font: var(--t-small); color: var(--ink-2); }
#axes svg { position: absolute; left: 0; top: 0; }
#axes span { position: absolute; white-space: nowrap; }
#axes .ax-title { font: var(--t-label); }
#axes .ax-tag { color: var(--ink); background: var(--ground); border: 1px solid var(--ink); padding: 0 4px; }
#axes .ax-note { background: var(--ground); padding: 0 2px; }       /* the cut-off's label is apparatus: grey */
#tip { position: absolute; z-index: 2; pointer-events: none; background: var(--ground); border: 1px solid var(--ink); padding: 4px 8px; font: var(--t-label); }
#tip .tn, #tip b { display: block; }

/* table view: the same selection as rows, in the plot's box */
.tview { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.tscroll { position: relative; flex: 1; min-height: 0; overflow: auto; border-top: 1px solid var(--edge); }   /* holds its .vh labels too */
.ftbl { width: 100%; font: var(--t-label); }
.ftbl th, .ftbl td { padding: 6px var(--s3); height: 33px; text-align: left; vertical-align: baseline; white-space: nowrap; }
.ftbl th:first-child, .ftbl td:first-child { padding-left: 0; }
.ftbl thead { position: sticky; top: 0; background: var(--ground); z-index: 1; }   /* both header rows stay, as one */
.ftbl thead th { color: var(--ink-2); vertical-align: bottom; border-bottom: 1px solid var(--edge); padding-top: var(--s2); padding-bottom: var(--s2); background: var(--ground); }
.ftbl thead th.grp { color: var(--ink-2); padding-bottom: 2px; height: auto; }   /* "Mission viability" over its columns: the rule under it spans them */
.ftbl th.vcol, .ftbl td.mis { text-align: right; }
.ftbl thead th button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; text-align: inherit; }
.ftbl thead th button:hover { text-decoration: underline; text-decoration-color: var(--edge); text-underline-offset: 3px; }
.ftbl thead th[aria-sort] button::after { content: ""; display: inline-block; width: 0; height: 0; margin-left: 6px; border: 4px solid transparent; vertical-align: 1px; }
.ftbl thead th[aria-sort="ascending"] button::after { border-bottom-color: var(--ink-2); vertical-align: 3px; }
.ftbl thead th[aria-sort="descending"] button::after { border-top-color: var(--ink-2); vertical-align: -1px; }
.ftbl .num { text-align: right; }
.ftbl tbody tr > * { border-top: 1px solid var(--grid); }
.ftbl tbody tr:hover > *, .ftbl tbody tr.sel > * { background: var(--grid); }
.ftbl tbody tr.sel > :first-child { border-left: 2px solid var(--ink); }
.ftbl .nm { margin-left: var(--s2); }
.ftbl .vc { display: inline-flex; align-items: baseline; gap: 6px; }   /* Yes, No, or a chance with the estimate's dot */
.ftbl .vc .g { align-self: center; margin-right: 0; }
.ftbl td.mis { min-width: 9ch; }
.ftbl td.meas { white-space: normal; min-width: 9ch; }
.ftbl .szc { min-width: 128px; }
.ftbl .sz { display: inline-flex; align-items: baseline; gap: 6px; }
.ftbl .sz .g { align-self: center; margin-right: 0; }
.ftbl .ph { display: none; }
.ftbl .empty td { color: var(--ink-2); padding: var(--s5) 0; }
.pager { display: flex; align-items: center; justify-content: flex-end; gap: var(--s2); padding-top: var(--s3); border-top: 1px solid var(--edge); }
.pager output { font: var(--t-label); color: var(--ink-2); margin-right: auto; }

/* the readout: named asteroids at home, an asteroid's summary once one is chosen */
.readout { grid-area: read; border-left: 1px solid var(--edge); padding: var(--s2) var(--s5) var(--s5); overflow: auto; min-height: 0; display: flex; flex-direction: column; }
.readout > * { flex: none; }
/* the index (CAP-32): every asteroid the chart shows, by Δv, in a list that scrolls inside the readout. A virtual list:
   app.js draws only the rows on screen, each exactly 30 px (ROW), so .ispace takes the whole list's height */
.readout > .overview { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
.ilist { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; margin-top: var(--s2); }
.ispace { position: relative; }
.iwin, .ikeep { position: absolute; top: 0; left: 0; right: 0; }   /* .ikeep: the focused row, drawn where it is when scrolled out of .iwin */
.isec, .ir { height: 30px; box-sizing: border-box; }
/* A section's heading, in the grey of a column header: its name and count, then the column's unit. The pinned one
   (.ihead) sits at the top of the scroll box and names the section scrolled into; the next section's heading scrolls
   up to meet it. */
.isec { display: flex; align-items: flex-end; padding: 0 var(--s3) 5px 0; font: var(--t-label); color: var(--ink-2); border-bottom: 1px solid var(--edge); }
.isec, .isec-h { justify-content: space-between; }
.isec-h { display: flex; flex: 1; }
.isec .n { color: inherit; }
.ihead { position: sticky; top: 0; z-index: 1; background: var(--ground); }
.ir { border-bottom: 1px solid var(--grid); }
.igap { height: 15px; }                                             /* a section's end: half a row before the next heading (app.js SHAVE) */
.ir:has(+ .igap) { border-bottom-color: transparent; }               /* and no rule under its last row */
.ir a { display: flex; justify-content: space-between; align-items: center; height: 100%; padding-right: var(--s3); font: var(--t-label); text-decoration: none; }   /* clear of the scrollbar */
.ir .nm { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; text-decoration-color: var(--edge); }
.ir .num { font-variant-numeric: tabular-nums; }
.ir.hot, .ir:hover { background: var(--grid); }                     /* the rock under the pointer, or the row */
.ir.hot .nm, .ir:hover .nm { text-decoration-color: var(--ink); }
.ir a:focus-visible { outline-offset: -2px; }                       /* inside the row: the list clips its sides */
.ir.sel { border-left: 2px solid var(--ink); }                       /* the selected row, as the table marks it */
.ir.sel a { padding-left: var(--s2); }
.ilist .none { padding: var(--s3) 0; }
.named { width: 100%; font: var(--t-label); margin-top: var(--s3); }
.named th, .named td { padding: 4px 0; text-align: left; vertical-align: baseline; }
.named thead th { color: var(--ink-2); border-bottom: 1px solid var(--edge); padding-bottom: 6px; }
.named tbody tr + tr > * { border-top: 1px solid var(--grid); }
.named .num { text-align: right; }
.sel-head { display: flex; justify-content: space-between; align-items: start; gap: var(--s4); padding: var(--s4) 0 var(--s3); }
.sel-head h2 { font: var(--t-title); color: var(--ink); margin: 0; }
.sel-head p { font: var(--t-label); color: var(--ink-2); }
.sel-go { margin-top: var(--s5); }
.find-msg { font: var(--t-small); color: var(--ink-2); }
@media (min-width: 900px) { .ctl.find { position: relative; } .find-msg { position: absolute; top: 100%; left: 0; white-space: nowrap; } }

/* ---------- entry, list and method pages ---------- */
.page { max-width: 1264px; margin: 0 auto; padding: 0 var(--gutter) var(--s7); }
.page.wide { max-width: 1440px; }
.ehead { display: flex; justify-content: space-between; align-items: flex-end; gap: var(--s3) var(--s5); flex-wrap: wrap; padding: var(--s6) 0 var(--s5); }
.ehead h1 { font: var(--t-title); }
.ident { display: flex; gap: var(--s5); flex-wrap: wrap; font: var(--t-label); }
.ident > div { display: flex; gap: var(--s2); }
.ident dt { color: var(--ink); }   /* a property's name: content, white (docs/design.md section 4) */
.toc-m { display: none; }

.sum { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: var(--s6); padding: var(--s5) 0 var(--s6); border-top: 1px solid var(--edge); border-bottom: 1px solid var(--edge); }
.rockfig { margin: 0; }
.rockfig svg { width: 100%; height: auto; display: block; overflow: visible; }
.rockfig polygon { fill: none; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.rockfig .halo { stroke: var(--ink); stroke-opacity: 0.16; stroke-width: 6; }      /* the glow: measured */
.rockfig .edge { stroke: var(--edge); stroke-width: 1; }
.rockfig .mid { stroke: var(--ink-2); stroke-width: 1.5; }                         /* estimated: half brightness */
.rockfig .s-measured { stroke: var(--ink); stroke-width: 2; }
.rockfig .s-limit { stroke: var(--ink); stroke-dasharray: 4 3; }                    /* a bound: dashed */
.rockfig .scale path { stroke: var(--ink-2); fill: none; vector-effect: non-scaling-stroke; }
.rockfig .scale text { fill: var(--ink-2); font: var(--t-small); }
.rockfig figcaption { font: var(--t-small); color: var(--ink-2); margin-top: var(--s2); }
.sumlist { width: 100%; font: var(--t-label); align-self: start; }
.sumlist th, .sumlist td { padding: 9px 0 9px var(--s5); text-align: left; vertical-align: baseline; border-top: 1px solid var(--grid); }
.sumlist tr:first-child > * { border-top: 0; padding-top: 0; }
.sumlist th { padding-left: 0; white-space: nowrap; width: 1%; }   /* a name is content, white as its value; units, details and states are grey */
.sumlist .v { font: var(--t-body); white-space: nowrap; }
.sumlist .v .g { vertical-align: -1px; }
.sumlist .d { color: var(--ink-2); width: 100%; }
.sumlist .s { white-space: nowrap; }
/* a section's heading: white like the names under it, set apart by its size, the space above it and its rule */
.sumlist tr.grp th { font: var(--t-body); padding: var(--s5) 0 var(--s2); width: auto; border-top: 0; border-bottom: 1px solid var(--edge); }
.sumlist tr:first-child.grp th { padding-top: 0; }
.sumlist tr.grp + tr > * { border-top: 0; }

.body { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: var(--s6); }
.toc { position: sticky; top: 0; align-self: start; padding-top: var(--s6); }
.toc ul { display: flex; flex-direction: column; gap: var(--s2); font: var(--t-label); }
.toc a { text-decoration: none; }
.toc a:hover { text-decoration: underline; }
.sec { padding-top: var(--s6); scroll-margin-top: var(--s4); }
.sec > h2 { font: var(--t-heading); margin-bottom: var(--s4); }
.sec h3 { font: var(--t-body); }

.row { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: var(--s5); padding: var(--s4) 0 var(--s5); border-top: 1px solid var(--grid); }
.row:first-of-type { border-top-color: var(--edge); }
.row .st { display: flex; margin-top: 2px; }
.facts { width: 100%; font: var(--t-label); table-layout: fixed; }
.facts .c-l { width: 22%; } .facts .c-v { width: 14%; } .facts .c-r { width: 20%; } .facts .c-q { width: 21%; } .facts .c-s { width: 23%; }
.facts th, .facts td { padding: 5px 0 5px var(--s4); text-align: left; vertical-align: baseline; overflow-wrap: break-word; }
.facts th { padding-left: 0; }   /* a property's name: content, white (docs/design.md section 4) */
.facts .v { text-align: right; }
.facts .q { color: var(--ink-2); }
.facts .s { color: var(--ink-2); font: var(--t-small); }
.facts tr.ptr .v { color: var(--ink-2); }
.facts .tag { color: var(--ink-2); white-space: nowrap; }        /* "not used": a label word, nothing else */
.facts + .facts, .timeline + .facts { margin-top: var(--s2); }
.srcline { font: var(--t-small); color: var(--ink-2); margin-top: var(--s1); }
.conflict { font: var(--t-label); margin-top: var(--s3); }
.conflict .k { margin-right: var(--s2); }
.tbl.sources tbody th { color: var(--ink); }        /* a source's name is content, linked or not */

/* gauges: HTML, so labels stay crisp at every width. A value white; an estimate's band half bright; a bound dashed */
.gauge { position: relative; height: 52px; margin: var(--s1) 0 var(--s3); }
.gauge > i { position: absolute; }
.gauge .track { left: 0; right: 0; top: 26px; border-top: 1px solid var(--edge); }
.gauge .tk { top: 22px; height: 9px; border-left: 1px solid var(--edge); }
.gauge .tk span { position: absolute; top: 12px; transform: translateX(-50%); font: var(--t-small); color: var(--ink-2); white-space: nowrap; }
.gauge .tk.first span { transform: none; } .gauge .tk.last span { transform: translateX(-100%); }
.gauge .gate { top: 4px; height: 30px; border-left: 1px solid var(--ink-2); }
.gauge .gate span { position: absolute; top: -4px; left: 5px; font: var(--t-small); color: var(--ink-2); white-space: nowrap; }
.gauge .gate.l span { left: auto; right: 5px; }
.gauge .bar { top: 25px; height: 3px; background: var(--ink); }
.gauge .bar.lim { background: repeating-linear-gradient(90deg, var(--ink) 0 4px, transparent 4px 7px); }
.gauge .est { top: 21px; height: 11px; border: 1px solid var(--ink-2); background: repeating-linear-gradient(90deg, transparent 0 3px, var(--grid) 3px 4px); }
.gauge .mid { top: 19px; height: 15px; border-left: 2px solid var(--ink-2); }
.gauge .pt { top: 21px; width: 11px; height: 11px; margin-left: -5px; background: var(--ink); transform: rotate(45deg); }
.gauge .pt.o { background: var(--ground); border: 1.5px solid var(--ink); }
.gauge .pt.x { background: var(--ground); border: 1px solid var(--edge); }

.timeline { position: relative; height: 62px; margin: var(--s3) 0 var(--s2); max-width: 720px; }
.timeline > i { position: absolute; }
.timeline .axis { left: 0; right: 0; top: 30px; border-top: 1px solid var(--edge); }
.timeline .yr { top: 26px; height: 9px; border-left: 1px solid var(--edge); }
.timeline .yr span { position: absolute; top: 12px; left: 4px; font: var(--t-small); color: var(--ink-2); white-space: nowrap; }
.timeline .yr.dz span { left: auto; right: 0; }
.timeline .yr.d0 { top: 8px; height: 30px; border-left: 1px solid var(--ink-2); }
.timeline .yr.d0 span { top: 30px; left: 0; }
.timeline .win { top: 24px; height: 13px; background: var(--ink); }
.timeline .win span { position: absolute; top: -22px; left: 0; font: var(--t-small); color: var(--ink); white-space: nowrap; }

.ladder li { display: grid; grid-template-columns: 32px 200px minmax(0, 1fr); gap: var(--s4); padding: var(--s3) 0; border-top: 1px solid var(--grid); align-items: baseline; }
.ladder li:first-child { border-top-color: var(--edge); }
.ladder .n { font: var(--t-label); color: var(--ink-2); }
.ladder p, .prec td { font: var(--t-prose); }
.prec thead th { font: var(--t-label); }

.value { display: grid; gap: var(--s6); }
.vblock h3 { margin-bottom: var(--s2); }
.stm { font: var(--t-prose); display: grid; gap: var(--s2); max-width: 72ch; }
.foot-notes { font: var(--t-prose); display: grid; gap: var(--s2); max-width: 72ch; border-top: 1px solid var(--grid); padding-top: var(--s3); }   /* sentences: prose */
.vt th, .vt td.num, .vt th.num { white-space: nowrap; }

.kv { display: grid; grid-template-columns: 200px minmax(0, 1fr); font: var(--t-label); max-width: 860px; }
.kv > * { padding: 7px 0; border-top: 1px solid var(--grid); }
.kv dt { color: var(--ink); }   /* a property's name: content, white (docs/design.md section 4) */
.kv dd { padding-left: var(--s4); }
.missions { display: grid; gap: var(--s6); }
.mission .verdict { display: flex; align-items: baseline; gap: var(--s2); margin: var(--s1) 0 var(--s3); font: var(--t-body); flex-wrap: wrap; }
.mission .verdict .k { color: var(--ink-2); font: var(--t-label); }
.mission .verdict .g { align-self: center; }
.gates { table-layout: fixed; }
.gates .g1 { width: 50%; } .gates .g2 { width: 18%; } .gates .g4 { width: 32%; }
.gtext { font: var(--t-small); color: var(--ink-2); margin-top: 2px; }
.gtext.t { font: var(--t-prose); color: var(--ink); margin-top: var(--s1); }    /* a note in sentences under a condition */

/* lists */
.lhead { padding: var(--s6) 0 var(--s4); display: flex; justify-content: space-between; align-items: flex-end; gap: var(--s5); flex-wrap: wrap; }
.lhead h1 { font: var(--t-title); }
/* Observe next: the count and each group's, each a link to its group; then the Diameter key, as the Field's legend */
.olead, .okey { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s5); font: var(--t-label); color: var(--ink-2); }
.olead { margin-bottom: var(--s2); }
.olead .n { color: var(--ink); }
.okey { margin-bottom: var(--s4); }
.okey .lab { color: var(--ink); }
.okey > span { display: inline-flex; align-items: center; }
.ltbl { width: 100%; font: var(--t-label); }
.ltbl th, .ltbl td { padding: 7px var(--s2); text-align: left; vertical-align: baseline; white-space: nowrap; }
.ltbl th:first-child, .ltbl td:first-child { padding-left: 0; }
.ltbl thead th { color: var(--ink-2); vertical-align: bottom; border-bottom: 1px solid var(--edge); padding-bottom: var(--s2); position: sticky; top: 0; z-index: 1; background: var(--ground); white-space: normal; }   /* above the rows: the measured mark's glow puts it on a layer of its own */
.ltbl .num { text-align: right; }
.ltbl tbody tr > * { border-top: 1px solid var(--grid); }
.ltbl tbody tr:hover > * { background: var(--grid); }
/* Observe next: a group's heading, then its own table, whose column headers stay while its rows scroll */
.ogroup { scroll-margin-top: var(--s4); }
.ogroup + .ogroup { margin-top: var(--s7); }
h2.tier { font: var(--t-heading); margin-bottom: var(--s3); }
h2.tier .n { font: inherit; }                                  /* "Observable (1,393)": the count in its brackets, as text */
.ltbl .rank { color: var(--ink-2); }
.ltbl .sz .g { margin-right: 6px; }
.ltbl td.tel { white-space: normal; min-width: 14ch; }

/* the method page: a reference page of tables. Content in the label face at one size, white; a citation in the
   small face, grey; no sentence in the serif (docs/design.md section 5) */
.doc .sec h3 { font: var(--t-body); margin: var(--s6) 0 var(--s2); }
.doc .tbl.mt { margin-top: var(--s2); }
.doc .tbl.mkv tbody th, .doc .tbl.crit tbody th, .doc .tbl.crit3 tbody th { width: 260px; padding-right: var(--s4); }
.doc .tbl.thr tbody th { width: 96px; white-space: nowrap; }
.doc .tbl.marks tbody th { white-space: nowrap; }
.doc .tbl.crit td:nth-child(2), .doc .tbl.crit td:last-child, .doc .tbl.crit3 td:last-child { white-space: nowrap; }
.doc .tbl.crit3 td:last-child { white-space: normal; width: 32%; }
.doc .tbl.mt ul { display: grid; gap: 2px; }
.doc .tbl.crit { table-layout: fixed; }                     /* the mission types' tables line up */
.doc .tbl.crit th:nth-child(1) { width: 260px; } .doc .tbl.crit th:nth-child(2) { width: 130px; } .doc .tbl.crit th:nth-child(4) { width: 110px; }
.doc .tbl.exc tbody th { white-space: nowrap; padding-right: var(--s4); }
.doc .def { font: var(--t-label); margin-top: var(--s2); }
.doc .cite { font: var(--t-small); color: var(--ink-2); margin-top: var(--s2); }
.doc .refs { font: var(--t-small); color: var(--ink-2); display: grid; gap: var(--s1); overflow-wrap: anywhere; }
.doc .lim { font: var(--t-label); display: grid; gap: var(--s2); }
.doc .counts { max-width: 860px; }

@media (max-width: 899px) {
  /* front page */
  .app { display: flex; flex-direction: column; height: auto; min-height: 0; }
  /* the control strip in three short rows, so the chart starts on the first screen: View beside Find (both
     labelled for a screen reader only: the segments and the placeholder say what they are), Mission, Max Δv
     with its label beside the slider */
  .strip { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "view find" "mission mission" "dv dv";
    gap: var(--s3) var(--s3); padding: var(--s3) var(--gutter); align-items: end; }
  .ctl.view { grid-area: view; } .ctl.find { grid-area: find; } .ctl.mission { grid-area: mission; } .ctl.dv { grid-area: dv; }
  .ctl.view .lab, .ctl.find .lab { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .ctl.dv { flex-direction: row; align-items: center; gap: var(--s3); }
  .ctl.dv .dvrow { flex: 1; }
  .ctl.mission .seg label { flex: 1 1 auto; } .ctl.mission .seg span { text-align: center; padding: 6px 10px; }
  /* more mission types than fit one row: the segments wrap, each keeping all four borders, the shared ones overlapped */
  .ctl.mission .seg { flex-wrap: wrap; padding: 1px 0 0 1px; }
  .ctl.mission .seg span, .ctl.mission .seg label + label span { border-left: 1px solid var(--edge); margin: -1px 0 0 -1px; }
  .ctl.mission .seg input:checked + span { position: relative; border-color: var(--ink); }
  .dvrow input[type="range"] { flex: 1; width: auto; }
  input[type="search"] { width: 100%; }
  .fig { padding: var(--s3) var(--gutter) var(--s2); }
  .plot { flex: none; height: 460px; }
  .legend { flex: 1 1 100%; order: 2; }
  .legend > ul { grid-template-columns: minmax(0, 1fr); }   /* a phone: each label above its items */
  .legend > ul, .legend ul.items { gap: var(--s2) var(--s4); }
  .zoom { order: 1; }
  .fig-head { gap: var(--s2) var(--s3); }
  .tview { flex: none; }
  .tscroll { overflow: visible; }
  .readout { border: 0; border-top: 1px solid var(--edge); padding: var(--s2) var(--gutter) var(--s6); overflow: visible; }
  .ilist { flex: none; height: 70vh; overscroll-behavior: auto; }   /* a phone: the index scrolls in a box most of a screen tall; at its ends a swipe scrolls the page */
  .ftbl thead { display: none; }
  .ftbl, .ftbl tbody { display: block; }
  .ftbl tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px var(--s3); padding: var(--s2) 0; border-top: 1px solid var(--grid); }
  .ftbl tbody tr > * { border: 0; padding: 0; height: auto; white-space: normal; }
  .ftbl td[data-l] { grid-column: 1 / -1; display: flex; justify-content: space-between; gap: var(--s3); }
  .ftbl td[data-l]::before { content: attr(data-l); color: var(--ink-2); font: var(--t-small); }
  .ftbl .mis { min-width: 0; }
  .ftbl td.dvc { grid-column: 2; justify-content: flex-end; gap: 0; }
  .ftbl td.dvc::before { display: none; }
  .ftbl td.dvc::after { content: " km/s"; color: var(--ink-2); white-space: pre; }   /* beside the name, with no label: the unit says what it is */
  .ftbl td.dvc.none::after { content: none; }
  .ftbl .ph { display: inline; }

  /* entries */
  .ehead { padding-top: var(--s5); }
  .toc-m { display: block; border: 1px solid var(--edge); margin: var(--s4) 0; font: var(--t-label); }
  .toc-m summary { padding: 8px 12px; cursor: pointer; }
  .toc-m[open] summary { border-bottom: 1px solid var(--edge); }
  .toc-m ul { padding: var(--s1) 12px var(--s2); }
  .toc-m a { display: block; padding: 6px 0; }
  .sum { grid-template-columns: 1fr; gap: var(--s5); }
  .rockfig { display: grid; grid-template-columns: 140px 1fr; gap: var(--s4); align-items: center; }
  .sumlist, .sumlist tbody { display: block; }
  /* as the readout: two lines a row, the name and its value, then the detail and the state */
  .sumlist tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px var(--s3); padding: 8px 0; border-top: 1px solid var(--grid); align-items: baseline; }
  .sumlist tr:first-child { border-top: 0; padding-top: 0; }
  .sumlist th, .sumlist td { padding: 0 !important; border: 0 !important; width: auto; }
  .sumlist .v { grid-column: 1 / -1; grid-row: 1; justify-self: end; text-align: right; }
  .sumlist .d { grid-column: 1; grid-row: 2; }
  .sumlist tr:has(> .s:empty) .d { grid-column: 1 / -1; }
  .sumlist .s { grid-column: 2; grid-row: 2; text-align: right; }
  .sumlist tr.grp { display: block; padding: var(--s5) 0 var(--s2); border-top: 0; border-bottom: 1px solid var(--edge); }
  .sumlist tr.grp:first-child { padding-top: 0; }
  .sumlist tr.grp + tr { border-top: 0; }
  .body { display: block; }
  .toc { display: none; }
  .row { grid-template-columns: 1fr; gap: var(--s2); }
  .row .st { margin-top: 0; }
  .gauge { margin-top: var(--s5); }
  .gauge .gate.l span { left: 5px; right: auto; top: -22px; }
  .facts, .facts tbody, .facts tr, .facts th, .facts td { display: block; width: auto; }
  .facts colgroup { display: none; }
  .facts tr { display: grid; grid-template-columns: 1fr auto; padding: 6px 0; border-top: 1px solid var(--grid); }
  .facts th, .facts td { padding: 0 !important; }
  .facts .r, .facts .s, .facts .q { grid-column: 1 / -1; }
  .facts td:empty { display: none; }
  .ladder li { grid-template-columns: 24px minmax(0, 1fr); gap: var(--s1) var(--s3); }
  .ladder li > .rt { grid-column: 2; }
  .kv { grid-template-columns: 120px minmax(0, 1fr); }
  .sec .tbl thead { display: none; }
  .sec .tbl, .sec .tbl tbody { display: block; }
  .sec .tbl colgroup { display: none; }
  .sec .tbl tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px var(--s3); padding: 6px 0; border-top: 1px solid var(--grid); }
  .sec .tbl tbody tr + tr > * { border: 0; }
  .sec .tbl th, .sec .tbl td { padding: 0 !important; width: auto !important; }
  .sec .tbl th { grid-column: 1 / -1; }
  .sec .tbl td { grid-column: 1 / -1; display: flex; justify-content: space-between; gap: var(--s3); }
  .sec .tbl td::before { content: attr(data-l); color: var(--ink-2); font: var(--t-small); white-space: nowrap; }
  .sec .tbl td:empty { display: none; }
  .sec .tbl.prec td { display: block; }
}

/* the readout holds an entry's summary in a 424 px column: the rows stack, as on a phone. Its list is
   docs/design.md section 8's: the name, then the rows; the rock is the entry's to draw. */
.readout #summary .ehead { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: var(--s1) var(--s4); padding: var(--s4) 0 var(--s3); }
.readout #summary .ehead :is(h1, h2) { grid-column: 1; font: var(--t-title); color: var(--ink); margin: 0; }
.readout #summary .ident { display: none; }     /* number and designation: the entry's header carries them (section 8) */
.readout #summary .ehead button { grid-column: 2; grid-row: 1; }
.readout .sum { display: block; padding: 0; border: 0; }
.readout .rockfig { display: none; }
.readout .sumlist, .readout .sumlist tbody { display: block; }
/* two lines a row: the name and its value, then the detail and the state, so a long value has the width */
.readout .sumlist tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px var(--s3); padding: 6px 0; border-top: 1px solid var(--grid); align-items: baseline; }
.readout .sumlist th, .readout .sumlist td { padding: 0; border: 0; width: auto; }
.readout .sumlist th { grid-column: 1; grid-row: 1; white-space: nowrap; }
.readout .sumlist .v { grid-column: 1 / -1; grid-row: 1; justify-self: end; text-align: right; }   /* the first line is the name's and the value's: the detail below keeps the width */
.readout .sumlist .d { grid-column: 1; grid-row: 2; }
.readout .sumlist tr:has(> .s:empty) .d { grid-column: 1 / -1; }
.readout .sumlist .s { grid-column: 2; grid-row: 2; text-align: right; }
.readout .sumlist tr.grp { display: block; padding: 0; border-top: 0; }
.readout .sumlist tr.grp th { display: block; }
.readout .sumlist tr.grp + tr { border-top: 0; }
.readout .toc-m { display: none; }

@media (max-width: 1199px) {
  .ltbl thead { display: none; }
  .ltbl, .ltbl tbody { display: block; }
  .ltbl tr { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 2px var(--s3); padding: var(--s3) 0; border-top: 1px solid var(--grid); }
  .ltbl tr > * { border: 0 !important; padding: 0; white-space: normal; }
  .ltbl td[data-l] { grid-column: 2 / -1; display: flex; justify-content: space-between; gap: var(--s3); text-align: right; }
  .ltbl td[data-l]::before { content: attr(data-l); color: var(--ink-2); font: var(--t-small); white-space: nowrap; text-align: left; }
  .ltbl td[data-l]:empty { display: none; }
  /* the observe list's columns, named on each line by position (gen.OBSERVE_COLS) */
  .ltbl.obs td:nth-child(n+3) { grid-column: 2 / -1; display: flex; justify-content: space-between; gap: var(--s3); text-align: right; }
  .ltbl.obs td:nth-child(n+3)::before { color: var(--ink-2); font: var(--t-small); white-space: nowrap; text-align: left; }
  .ltbl.obs td:nth-child(n+3):empty { display: none; }
  .ltbl.obs td:nth-child(3)::before { content: "Δv (km/s)"; }
  .ltbl.obs td:nth-child(4)::before { content: "Diameter (m)"; }
  .ltbl.obs td:nth-child(5)::before { content: "Mission type"; }
  .ltbl.obs td:nth-child(6)::before { content: "Measure"; }
  .ltbl.obs td:nth-child(7)::before { content: "Condition"; }
  .ltbl.obs td:nth-child(8)::before { content: "Telescope"; }
  .ltbl.obs td:nth-child(9)::before { content: "Window opens"; }
  .ltbl.obs td:nth-child(10)::before { content: "Window closes"; }
  .ltbl.obs td:nth-child(11)::before { content: "Peak brightness (mag)"; }
}

/* a formula in the reference layer's notation */
.doc var { font-style: italic; }
