/* Drawing-sheet vernacular: tracing-paper ground, ink navy linework, hoarding orange for live works.
   Structure is carried by rules and boxes. There are no cards and no shadows.
   One idea is spent hard: what is not known is HATCHED, the way an unsurveyed area is hatched on a
   drawing. The same hatch means the same thing on every sheet. */
:root {
  --paper: #e8ecec;
  --sheet: #fbfcfb;
  --ink: #12304f;
  --ink-soft: #4d6279;
  --rule: #c3ccd1;
  --hoarding: #f26a1b;
  --built: #2f7d54;
  --ghost: #aab3b8;
  --flag: #a8430a;
  --tint: #eaf0f4;
  --warm: #fff3ea;
  --gap: 14px;
  --hatch: repeating-linear-gradient(
    135deg,
    transparent 0 6px,
    rgba(77, 98, 121, 0.17) 6px 7.5px
  );
  --works: repeating-linear-gradient(
    135deg,
    var(--hoarding) 0 9px,
    var(--ink) 9px 18px
  );
  font-family: "Archivo", "Helvetica Neue", Arial, sans-serif;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
* {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--paper);
  font-size: 15px;
  line-height: 1.45;
  overflow-x: hidden;
}
h1,
h2,
h3,
h4,
p,
ol,
ul,
dl,
dd,
figure,
table {
  margin: 0;
  padding: 0;
}
ul,
ol {
  list-style: none;
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
  font-variant-numeric: inherit;
}
a {
  color: inherit;
}
:focus-visible {
  outline: 3px solid var(--hoarding);
  outline-offset: 2px;
}
.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--sheet);
  padding: 9px 14px;
  z-index: 60;
}
.skip:focus {
  left: 0;
}

/* ---------------------------------------------------------------- the sheet */
.sheet {
  display: grid;
  grid-template-columns: 274px minmax(0, 1fr);
  align-items: start;
  gap: var(--gap);
  padding: var(--gap);
  min-height: 100vh;
}
.rail {
  position: sticky;
  top: var(--gap);
  display: grid;
  gap: var(--gap);
}
.field {
  background: var(--sheet);
  border: 1.5px solid var(--ink);
  min-width: 0;
  min-height: calc(100vh - var(--gap) * 2);
}
.field:focus {
  outline: none;
}

.titleblock {
  background: var(--sheet);
  border: 1.5px solid var(--ink);
  padding: 13px 15px 12px;
}
.titleblock h1 {
  font-size: 26px;
  font-weight: 700;
  font-stretch: 82%;
  line-height: 1.02;
  letter-spacing: -0.008em;
}
.titleblock .sub {
  font-size: 13.5px;
  font-weight: 500;
  margin-top: 6px;
  color: var(--ink-soft);
  line-height: 1.3;
}
.titleblock .caveat {
  font-size: 12.5px;
  line-height: 1.35;
  margin-top: 10px;
  padding-top: 9px;
  border-top: 1px solid var(--rule);
}

/* The sheet register. Names, not numbers: these are sheets, not a sequence. */
.register ul {
  background: var(--sheet);
  border: 1.5px solid var(--ink);
}
.register li + li {
  border-top: 1px solid var(--rule);
}
.register a {
  display: block;
  padding: 9px 14px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  font-stretch: 92%;
}
.register a:hover {
  background: var(--tint);
}
.register a[aria-current="page"] {
  background: var(--ink);
  color: var(--sheet);
  font-weight: 600;
}
.register .n {
  display: block;
  font-size: 11.5px;
  font-weight: 400;
  font-stretch: 100%;
  color: var(--ink-soft);
  margin-top: 1px;
}
.register a[aria-current="page"] .n {
  color: #b8c8d6;
}

.stamp {
  background: var(--sheet);
  border: 1.5px solid var(--ink);
  padding: 10px 14px 11px;
  font-size: 12px;
  line-height: 1.4;
  color: var(--ink-soft);
}
.stamp b {
  color: var(--ink);
  font-weight: 600;
}
.stamp .warn {
  display: block;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--rule);
  color: var(--flag);
}
.stamp .warn b {
  color: var(--flag);
}

/* ---------------------------------------------------------------- sheet head */
.sheethead {
  border-bottom: 1.5px solid var(--ink);
  padding: 15px 20px 14px;
  display: grid;
  gap: 7px;
}
.sheethead h2 {
  font-size: 24px;
  font-weight: 700;
  font-stretch: 84%;
  line-height: 1.05;
}
.sheethead .lede {
  font-size: 14px;
  max-width: 74ch;
  color: var(--ink-soft);
}
.pad {
  padding: 18px 20px 26px;
}

/* ---------------------------------------------------------------- controls */
.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: flex-end;
  border-bottom: 1px solid var(--rule);
  padding: 12px 20px 13px;
}
.ctl {
  display: grid;
  gap: 3px;
}
.ctl > span {
  font-size: 12px;
  color: var(--ink-soft);
}
.ctl select,
.ctl input[type="search"] {
  border: 1.5px solid var(--ink);
  background: var(--sheet);
  padding: 5px 8px;
  font-size: 13.5px;
  border-radius: 0;
  min-width: 9rem;
  max-width: 15rem;
}
.segment {
  display: flex;
  flex-wrap: wrap;
}
.segment button {
  border: 1.5px solid var(--ink);
  background: var(--sheet);
  padding: 5px 11px;
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  margin: 0 -1.5px -1.5px 0;
}
.segment button[aria-pressed="true"],
.segment button[aria-checked="true"] {
  background: var(--ink);
  color: var(--sheet);
}
.segment button:hover:not([aria-pressed="true"]):not([aria-checked="true"]) {
  background: var(--tint);
}
.btn {
  border: 1.5px solid var(--ink);
  background: var(--sheet);
  padding: 6px 12px;
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
}
.btn:hover {
  background: var(--tint);
}
.btn.ink {
  background: var(--ink);
  color: var(--sheet);
}
.btn.ink:hover {
  background: #1b4670;
}
.count {
  font-size: 12.5px;
  color: var(--ink-soft);
  margin-left: auto;
  align-self: center;
}

/* ---------------------------------------------------------------- figures and citations */
.fig {
  border: 0;
  background: none;
  padding: 0;
  cursor: pointer;
  font-weight: 600;
  text-align: left;
  border-bottom: 1.5px dotted var(--ink);
  line-height: 1.25;
}
.fig:hover {
  background: var(--warm);
  border-bottom-style: solid;
  border-bottom-color: var(--hoarding);
}
.fig .tick {
  display: inline-block;
  width: 5px;
  height: 5px;
  background: var(--ink);
  vertical-align: 3px;
  margin-left: 5px;
}
.fig:hover .tick {
  background: var(--hoarding);
}
.fig.plain {
  font-weight: 500;
}
.nocite {
  font-weight: 600;
}

.unknown {
  display: inline-grid;
  gap: 4px;
  justify-items: start;
  background-image: var(--hatch);
  border: 1px solid var(--ghost);
  padding: 5px 8px 6px;
  min-width: 7.5rem;
}
.unknown .nk {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-soft);
}
.unknown .settle {
  border: 0;
  background: none;
  padding: 0;
  font-size: 12px;
  cursor: pointer;
  text-align: left;
  border-bottom: 1.5px dotted var(--flag);
  color: var(--flag);
  font-weight: 500;
}
.unknown .settle:hover {
  background: var(--warm);
}
td.is-unknown,
th.is-unknown {
  background-image: var(--hatch);
}

.basis {
  display: block;
  font-size: 11.5px;
  color: var(--ink-soft);
  font-weight: 400;
  margin-top: 2px;
}

/* Long prose, cut to a few lines with a control to read it all. */
.clampwrap {
  display: block;
}
.clamp {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.clamp.open {
  display: block;
}
.moretoggle {
  border: 0;
  background: none;
  padding: 0;
  margin-top: 2px;
  font-size: 11.5px;
  color: var(--ink-soft);
  cursor: pointer;
  border-bottom: 1px dotted var(--ink-soft);
}
.moretoggle:hover {
  color: var(--hoarding);
  border-bottom-color: var(--hoarding);
}
.moretoggle[hidden] {
  display: none;
}
.cite .n {
  color: var(--ink-soft);
}
.unknown .clampwrap .clamp {
  font-size: 11.5px;
  color: var(--ink-soft);
  line-height: 1.3;
}

/* ---------------------------------------------------------------- tables */
.scroller {
  overflow-x: auto;
  border-bottom: 1px solid var(--rule);
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 13.5px;
}
caption {
  text-align: left;
  font-size: 12.5px;
  color: var(--ink-soft);
  padding: 0 20px 9px;
}
th,
td {
  text-align: left;
  vertical-align: top;
  padding: 9px 12px;
  border-bottom: 1px solid var(--rule);
}
thead th {
  font-size: 12.5px;
  font-weight: 600;
  font-stretch: 92%;
  border-bottom: 1.5px solid var(--ink);
  background: var(--sheet);
  position: sticky;
  top: 0;
  z-index: 2;
}
tbody tr:hover {
  background: #f2f5f7;
}
th[scope="row"] {
  font-weight: 600;
  font-stretch: 92%;
}

/* ---------------------------------------------------------------- compare matrix */
.matrix {
  table-layout: fixed;
  min-width: 760px;
}
.matrix col.metric {
  width: 232px;
}
.matrix thead th {
  vertical-align: bottom;
  padding: 0;
}
.matrix thead th.metric {
  padding: 10px 12px;
}
.matrix .colhead {
  display: grid;
  gap: 4px;
  padding: 12px 14px 11px;
  border-left: 1px solid var(--rule);
}
.matrix th.ref .colhead {
  background: var(--tint);
}
.matrix th.ref {
  border-right: 1.5px solid var(--ink);
}
.matrix td.ref {
  background: var(--tint);
  border-right: 1.5px solid var(--ink);
}
.colhead .pname {
  font-size: 17px;
  font-weight: 700;
  font-stretch: 86%;
  line-height: 1.1;
}
.colhead .tag {
  justify-self: start;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 6px;
  border: 1px solid var(--ink);
}
.colhead .tag.example {
  background: var(--warm);
  border-color: var(--hoarding);
  color: var(--flag);
}
.colhead .tag.reference {
  background: var(--ink);
  color: var(--sheet);
}
.colhead .who {
  font-size: 11.5px;
  color: var(--ink-soft);
  line-height: 1.3;
}
.matrix td .fig {
  font-weight: 500;
}
.matrix tbody th {
  position: sticky;
  left: 0;
  background: var(--sheet);
  z-index: 1;
  border-right: 1px solid var(--rule);
}
.matrix tbody tr:hover th {
  background: #f2f5f7;
}
.matrix td {
  border-left: 1px solid var(--rule);
}
.mrow-note {
  display: block;
  font-weight: 400;
  font-stretch: 100%;
  font-size: 11.5px;
  color: var(--ink-soft);
  margin-top: 2px;
}
.refnote {
  border-top: 1.5px solid var(--ink);
  padding: 13px 20px 15px;
  font-size: 13px;
  display: grid;
  gap: 6px;
}
.refnote b {
  font-weight: 600;
}
.summaries {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  border-top: 1.5px solid var(--ink);
}
.summaries > div {
  padding: 13px 16px 15px;
  border-left: 1px solid var(--rule);
  font-size: 13px;
}
.summaries > div:first-child {
  border-left: 0;
  background: var(--tint);
}
.summaries h3 {
  font-size: 14px;
  font-weight: 700;
  font-stretch: 88%;
  margin-bottom: 4px;
}
.summaries .st {
  font-size: 12px;
  color: var(--ink-soft);
  margin-top: 7px;
}

/* ---------------------------------------------------------------- walkthrough */
/* minmax(0,1fr): without it the canvas's intrinsic size becomes the grid's minimum and the
   whole sheet grows past the viewport on a phone. */
.wt {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}
.timeline {
  padding: 14px 20px 6px;
  border-bottom: 1px solid var(--rule);
}
.tl-bar {
  position: relative;
  height: 46px;
  border: 1.5px solid var(--ink);
  display: flex;
  background: var(--sheet);
}
.tl-stage {
  position: relative;
  border-right: 1px solid var(--rule);
  padding: 5px 7px;
  overflow: hidden;
  font-size: 11.5px;
  line-height: 1.15;
  min-width: 0;
}
.tl-stage:last-child {
  border-right: 0;
}
.tl-stage .sn {
  font-weight: 600;
  font-stretch: 88%;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tl-stage .sm {
  color: var(--ink-soft);
}
.tl-stage.done {
  background: #eaf4ee;
}
.tl-stage.now {
  background: var(--warm);
}
.tl-stage.now::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 5px;
  background: var(--works);
}
.tl-stage.done::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 5px;
  background: var(--built);
}
.tl-peak {
  position: absolute;
  top: 0;
  bottom: 0;
  background-image: var(--hatch);
  border-left: 1px dashed var(--flag);
  border-right: 1px dashed var(--flag);
  pointer-events: none;
}
.tl-marker {
  position: absolute;
  top: -7px;
  bottom: -7px;
  width: 0;
  border-left: 2.5px solid var(--hoarding);
  pointer-events: none;
}
.tl-marker::before {
  content: "";
  position: absolute;
  left: -6px;
  top: -5px;
  width: 11px;
  height: 11px;
  background: var(--hoarding);
}

.rhythm {
  margin-top: 9px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px 22px;
  align-items: end;
}
.rhythm-days {
  display: flex;
  gap: 3px;
  align-items: flex-end;
}
.rhythm-days .d {
  display: grid;
  align-content: end;
  justify-items: center;
  gap: 3px;
  font-size: 10.5px;
  color: var(--ink-soft);
}
.rhythm-days .b {
  display: block;
  width: 26px;
  background: var(--ink-soft);
}
.rhythm-note {
  font-size: 12px;
  color: var(--ink-soft);
  max-width: 72ch;
}
.scrub {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 10px 20px 12px;
  border-bottom: 1.5px solid var(--ink);
  flex-wrap: wrap;
}
/* The marker handle is drawn, not defaulted: a square tab on a ruled track. */
.scrub input[type="range"] {
  flex: 1;
  min-width: 180px;
  appearance: none;
  background: none;
  height: 22px;
  cursor: pointer;
}
.scrub input[type="range"]::-webkit-slider-runnable-track {
  height: 6px;
  background: var(--tint);
  border: 1.5px solid var(--ink);
}
.scrub input[type="range"]::-moz-range-track {
  height: 6px;
  background: var(--tint);
  border: 1.5px solid var(--ink);
}
.scrub input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 13px;
  height: 22px;
  margin-top: -10px;
  background: var(--hoarding);
  border: 1.5px solid var(--ink);
}
.scrub input[type="range"]::-moz-range-thumb {
  width: 13px;
  height: 22px;
  border-radius: 0;
  background: var(--hoarding);
  border: 1.5px solid var(--ink);
}
.scrub .at {
  font-size: 13px;
  font-weight: 600;
  font-stretch: 90%;
  min-width: 11rem;
}

.stagewrap {
  position: relative;
  min-width: 0;
  overflow: hidden;
}
canvas#scene {
  display: block;
  width: 100%;
  max-width: 100%;
  height: 470px;
  background: var(--paper);
}
.callouts {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.callout {
  position: absolute;
  pointer-events: auto;
  width: 234px;
  background: var(--sheet);
  border: 1.5px solid var(--ink);
  padding: 8px 10px 9px;
  font-size: 12.5px;
  line-height: 1.32;
}
.callout h4 {
  font-size: 12.5px;
  font-weight: 700;
  font-stretch: 90%;
}
.callout p {
  margin-top: 3px;
}
.callout .cites {
  margin-top: 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.callout.peak {
  border-color: var(--flag);
}
.callout.peak h4 {
  color: var(--flag);
}
.leaders {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.keyline {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  padding: 10px 20px 12px;
  border-top: 1px solid var(--rule);
  font-size: 12.5px;
  align-items: center;
}
.keyline .sw {
  width: 22px;
  height: 10px;
  display: inline-block;
  margin-right: 7px;
  vertical-align: -1px;
}
.sw.notstarted {
  background: var(--ghost);
}
.sw.building {
  background: var(--works);
}
.sw.done {
  background: var(--built);
}
.sw.unknownsw {
  background-image: var(--hatch);
  border: 1px solid var(--ghost);
}

/* ---------------------------------------------------------------- findings */
.legend {
  border-top: 1.5px solid var(--ink);
  padding: 13px 20px 16px;
}
.legend h3 {
  font-size: 14px;
  font-weight: 700;
  font-stretch: 88%;
}
.legend p {
  font-size: 12.5px;
  color: var(--ink-soft);
  margin-top: 3px;
  max-width: 78ch;
}
.legend table {
  margin-top: 9px;
  width: auto;
}
.legend td {
  padding: 5px 16px 5px 0;
  border-bottom: 0;
  font-size: 12.5px;
}
.crit {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 600;
  padding: 1px 6px;
  border: 1.5px solid var(--ink);
  white-space: nowrap;
}
.crit.critical {
  background: var(--hoarding);
  border-color: var(--hoarding);
  color: #fff;
}
.crit.high {
  background: var(--warm);
  border-color: var(--hoarding);
  color: var(--flag);
}
.crit.medium {
  background: var(--sheet);
}
.crit.low {
  background: var(--sheet);
  border-color: var(--rule);
  color: var(--ink-soft);
}
.kind {
  font-size: 12.5px;
  font-weight: 600;
  font-stretch: 92%;
}
.applies-all {
  color: var(--ink-soft);
}
.bites {
  display: grid;
  gap: 3px;
}
.bites .st {
  font-size: 12px;
}
.bites .none {
  color: var(--ink-soft);
  font-size: 12px;
}
.f-head {
  font-weight: 600;
  line-height: 1.3;
}
.f-sw {
  font-size: 12.5px;
  color: var(--ink-soft);
  margin-top: 4px;
  line-height: 1.35;
}
.cites {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.cite {
  border: 1px solid var(--rule);
  background: var(--sheet);
  font-size: 11.5px;
  padding: 2px 6px;
  cursor: pointer;
  white-space: nowrap;
}
.cite:hover {
  background: var(--warm);
  border-color: var(--hoarding);
}
.cite.req {
  border-color: var(--flag);
  color: var(--flag);
}
.status-open {
  color: var(--flag);
  font-weight: 600;
  font-size: 12.5px;
}

/* ---------------------------------------------------------------- impacts */
.impacts {
  min-width: 820px;
}
.impacts th.fn {
  width: 148px;
}
.impacts td {
  font-size: 12.5px;
}
.impacts td.today {
  background: var(--tint);
}
.impacts .during {
  line-height: 1.3;
}
.impacts .min {
  display: block;
  margin-top: 6px;
  padding-top: 5px;
  border-top: 1px dotted var(--rule);
  font-size: 12px;
}
.impacts .quiet {
  color: var(--ink-soft);
}
.impacts .stagecol .pkg {
  display: block;
  font-size: 11px;
  color: var(--ink-soft);
  margin-top: 3px;
}
/* "This stage does not touch this function" must not look like "nobody knows": the hatch is
   reserved for the unknown, so an untouched cell is a plain tint with a rule through it. */
.impacts td.empty {
  background: #f4f6f7;
}
.impacts td.empty::before {
  content: "";
  display: block;
  width: 26px;
  height: 1.5px;
  background: var(--rule);
  margin: 8px auto 0;
}

/* ---------------------------------------------------------------- requests */
.reqs {
  min-width: 900px;
}
.reqs .code {
  font-weight: 700;
  font-stretch: 88%;
  white-space: nowrap;
}
.reqs .r0 {
  font-size: 12px;
  color: var(--ink-soft);
  line-height: 1.3;
}
.pill {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 600;
  padding: 1px 6px;
  border: 1.5px solid var(--ink);
  white-space: nowrap;
}
.pill.received {
  background: #e6f2eb;
  border-color: var(--built);
  color: #1d5a3a;
}
.pill.partly_received {
  background: var(--warm);
  border-color: var(--hoarding);
  color: var(--flag);
}
.pill.not_received {
  background-image: var(--hatch);
  border-color: var(--ghost);
  color: var(--ink-soft);
}
.pill.superseded,
.pill.withdrawn {
  background: var(--sheet);
  border-color: var(--rule);
  color: var(--ink-soft);
}
.pill.resolved,
.pill.answered,
.pill.closed {
  background: #e6f2eb;
  border-color: var(--built);
  color: #1d5a3a;
}
.reqs td.status {
  width: 260px;
}
.reqs .basisline {
  font-size: 12px;
  color: var(--ink-soft);
  margin-top: 5px;
  line-height: 1.35;
}

/* ---------------------------------------------------------------- evidence drawer */
.scrim {
  position: fixed;
  inset: 0;
  background: rgba(18, 48, 79, 0.28);
  z-index: 40;
}
.scrim[hidden] {
  display: none;
}
.drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(440px, 100vw);
  background: var(--sheet);
  border-left: 1.5px solid var(--ink);
  z-index: 50;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}
.drawer[hidden] {
  display: none;
}
.drawer-head {
  position: relative;
  padding: 13px 44px 12px 18px;
  border-bottom: 1.5px solid var(--ink);
}
.drawer-kicker {
  font-size: 12px;
  color: var(--ink-soft);
}
.drawer-head h2 {
  font-size: 17px;
  font-weight: 700;
  font-stretch: 88%;
  line-height: 1.2;
  margin-top: 2px;
}
.drawer-close {
  position: absolute;
  top: 8px;
  right: 10px;
  border: 0;
  background: none;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  padding: 2px 8px;
}
.drawer-body {
  overflow-y: auto;
  padding: 15px 18px 40px;
}
.drawer-body dl {
  display: grid;
  grid-template-columns: 8.5rem minmax(0, 1fr);
  gap: 6px 12px;
  font-size: 13px;
}
.drawer-body dt {
  color: var(--ink-soft);
}
.drawer-body dd {
  font-weight: 500;
  overflow-wrap: anywhere;
}
.drawer-body dd.flag {
  color: var(--flag);
}
.quote {
  margin: 14px 0;
  padding: 9px 0 9px 13px;
  border-left: 3px solid var(--ink);
  font-size: 14px;
  line-height: 1.45;
}
.drawer-sec {
  margin-top: 16px;
  padding-top: 13px;
  border-top: 1px solid var(--rule);
}
.drawer-sec h3 {
  font-size: 13px;
  font-weight: 700;
  font-stretch: 90%;
  margin-bottom: 6px;
}
.drawer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 15px;
}
.readcheck {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  padding: 2px 7px;
  border: 1.5px solid var(--built);
  background: #e6f2eb;
  color: #1d5a3a;
}
.readcheck.no {
  border-color: var(--ghost);
  background-image: var(--hatch);
  color: var(--ink-soft);
}

/* ---------------------------------------------------------------- states */
.booting,
.failure {
  padding: 40px 20px;
  font-size: 15px;
  max-width: 62ch;
}
.failure {
  color: var(--flag);
}
.failure h2 {
  font-size: 20px;
  font-weight: 700;
  font-stretch: 86%;
  color: var(--ink);
  margin-bottom: 8px;
}
.failure p {
  margin-top: 8px;
  color: var(--ink);
}
.failure code {
  background: var(--tint);
  padding: 1px 4px;
}
.empty {
  padding: 26px 20px;
  color: var(--ink-soft);
  font-size: 14px;
}
.quiet {
  color: var(--ink-soft);
}

/* ---------------------------------------------------------------- narrow */
@media (max-width: 900px) {
  .sheet {
    grid-template-columns: minmax(0, 1fr);
  }
  .rail {
    position: static;
  }
  .titleblock h1 {
    font-size: 22px;
  }
  .register ul {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .register li + li {
    border-top: 0;
  }
  .register li {
    border-top: 1px solid var(--rule);
  }
  .register li:nth-child(even) {
    border-left: 1px solid var(--rule);
  }
  .register a {
    padding: 8px 11px;
    font-size: 13px;
  }
  .field {
    min-height: 0;
  }
  .sheethead,
  .pad,
  .controls,
  .legend,
  .refnote,
  .keyline,
  .scrub,
  .timeline {
    padding-left: 14px;
    padding-right: 14px;
  }
  caption {
    padding-left: 14px;
    padding-right: 14px;
  }
  .sheethead h2 {
    font-size: 20px;
  }
  .controls {
    gap: 9px 12px;
  }
  .ctl select,
  .ctl input[type="search"] {
    min-width: 0;
    width: 100%;
  }
  .ctl {
    min-width: 8.5rem;
    flex: 1;
  }
  .count {
    margin-left: 0;
    width: 100%;
  }
  canvas#scene {
    height: 340px;
  }
  .matrix col.metric {
    width: 148px;
  }
  .matrix .colhead {
    padding: 10px 11px;
  }
  .colhead .pname {
    font-size: 15px;
  }
  .callout {
    width: 190px;
    font-size: 11.5px;
  }
  .summaries > div {
    border-left: 0;
    border-top: 1px solid var(--rule);
  }
  .summaries > div:first-child {
    border-top: 0;
  }
  .drawer {
    width: 100vw;
    border-left: 0;
    border-top: 1.5px solid var(--ink);
    top: 34px;
  }
  .rhythm {
    grid-template-columns: minmax(0, 1fr);
    margin-top: 14px;
  }
  .rhythm-days .b {
    width: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
    scroll-behavior: auto !important;
  }
}

/* ---------------------------------------------------------------- the document viewer
   Documents are ciphertext on the server, so they are opened here rather than handed to the
   browser's own PDF viewer: fetch, decrypt, pdf.js, the cited page. See lib/documents.js. */
.viewer {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  background: rgba(18, 48, 79, 0.72);
}
.viewer[hidden] {
  display: none;
}
.viewer-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  background: var(--sheet);
  border-bottom: 1.5px solid var(--ink);
}
.viewer-who {
  min-width: 0;
}
.viewer-kicker {
  font-size: 11px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.viewer-title {
  font-size: 16px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.viewer-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}
.viewer-tools .btn {
  padding: 4px 11px;
  line-height: 1.1;
}
.viewer-tools .btn[disabled] {
  opacity: 0.35;
  cursor: default;
}
.viewer-page {
  font-size: 12.5px;
  color: var(--ink-soft);
  min-width: 62px;
  text-align: center;
}
.viewer-close {
  border: 0;
  background: none;
  font-size: 24px;
  line-height: 1;
  padding: 0 4px;
  color: var(--ink);
  cursor: pointer;
}
.viewer-body {
  overflow: auto;
  padding: 18px;
}
.viewer-paper {
  display: flex;
  justify-content: center;
}
.viewer-canvas,
.viewer-image {
  display: block;
  max-width: 100%;
  height: auto;
  background: #fff;
  border: 1px solid var(--rule);
}
.viewer-state {
  max-width: 560px;
  margin: 12vh auto 0;
  background: var(--sheet);
  border: 1.5px solid var(--ink);
  padding: 22px;
}
.viewer-state h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
}
.viewer-note {
  font-size: 13.5px;
  color: var(--ink-soft);
}
.viewer-bar {
  margin-top: 12px;
  height: 4px;
  background: var(--tint);
  border: 1px solid var(--rule);
}
.viewer-bar i {
  display: block;
  height: 100%;
  background: var(--hoarding);
  transition: width 0.18s linear;
}

/* ---------------------------------------------------------------- sortable heads
   The sort is a link, so the head is a button and the mark is drawn rather than typed:
   a solid triangle on the column in hand, a faint one on the rest. */
.sortbtn {
  border: 0;
  background: none;
  padding: 0;
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  font-stretch: 92%;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-align: left;
}
.sortbtn:hover {
  color: var(--flag);
}
.sortmark {
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid var(--ghost);
}
thead th.sorton .sortmark {
  border-top-color: var(--hoarding);
}
thead th.sorton.desc .sortmark {
  border-top: 0;
  border-bottom: 5px solid var(--hoarding);
}
thead th.sorton {
  background: var(--tint);
}
caption.undercap {
  caption-side: bottom;
  padding: 9px 20px 0;
}

/* ---------------------------------------------------------------- findings, both densities */
button.f-head {
  border: 0;
  background: none;
  padding: 0;
  font: inherit;
  font-weight: 600;
  line-height: 1.3;
  text-align: left;
  cursor: pointer;
  border-bottom: 1.5px dotted transparent;
}
button.f-head:hover {
  border-bottom-color: var(--hoarding);
  background: var(--warm);
}

/* Compact: one line a finding. Everything that would wrap is cut, because a line that wraps
   is not a line, and the whole of it is a click away in the drawer. */
.compact {
  table-layout: fixed;
  min-width: 640px;
}
.compact td,
.compact th {
  padding: 5px 12px;
  vertical-align: middle;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.compact tbody tr:nth-child(even) {
  background: #f4f7f8;
}
.compact tbody tr:hover {
  background: var(--warm);
}
.c-row {
  cursor: pointer;
}
.c-open {
  border: 0;
  background: none;
  padding: 0;
  font: inherit;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: block;
}
.c-row:hover .c-open {
  text-decoration: underline;
  text-decoration-color: var(--hoarding);
  text-underline-offset: 3px;
}
.c-bites {
  font-weight: 600;
  font-size: 12.5px;
}
.c-bites.none {
  font-weight: 400;
  color: var(--ink-soft);
}
.c-rec {
  text-align: right;
}
.c-rec .cite {
  min-width: 2.1rem;
  text-align: center;
  font-weight: 600;
}

/* ---------------------------------------------------------------- drawings */
.coverage {
  padding: 13px 20px;
  border-bottom: 1px solid var(--rule);
  font-size: 13px;
  display: grid;
  gap: 5px;
  max-width: 96ch;
}
.coverage b {
  font-weight: 700;
  font-stretch: 90%;
}
.stagehead {
  padding: 14px 20px 12px;
  border-bottom: 1.5px solid var(--ink);
}
.stagehead h3 {
  font-size: 17px;
  font-weight: 700;
  font-stretch: 86%;
}
.stagehead p {
  font-size: 12.5px;
  color: var(--ink-soft);
  margin-top: 3px;
}
.segment .sname {
  display: none;
}

.plates {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.plate {
  padding: 16px 20px 22px;
  border-left: 1px solid var(--rule);
  min-width: 0;
}
.plate:first-child {
  border-left: 0;
}
.plate-frame {
  margin: 0;
  border: 1.5px solid var(--ink);
  background: var(--paper);
}
.plate-open {
  display: block;
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--rule);
  padding: 0;
  background: #fff;
  cursor: pointer;
  aspect-ratio: 420 / 297;
  position: relative;
  overflow: hidden;
}
.plate-open[disabled] {
  cursor: progress;
}
.plate-open:hover:not([disabled]) {
  outline: 3px solid var(--hoarding);
  outline-offset: -3px;
}
.plate-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.plate-state {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  font-size: 12.5px;
  color: var(--ink-soft);
  padding: 0 18px;
  text-align: center;
}
.plate-state.bad {
  color: var(--flag);
}
.plate-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  align-items: baseline;
  padding: 6px 10px 7px;
  background: var(--sheet);
  font-size: 11.5px;
  color: var(--ink-soft);
}
.plate-kind {
  font-size: 12.5px;
  font-weight: 700;
  font-stretch: 88%;
  color: var(--ink);
}
.plate-no {
  font-variant-numeric: tabular-nums;
}
.plate-rev {
  margin-left: auto;
}
.plate-tools {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}
.plate-tools .btn {
  padding: 4px 10px;
  font-size: 12.5px;
}
.plate-notes {
  margin-top: 16px;
  border-top: 1.5px solid var(--ink);
  padding-top: 10px;
}
.plate-notes h3 {
  font-size: 13px;
  font-weight: 700;
  font-stretch: 88%;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
}
.plate-notes h3 .n {
  font-size: 11.5px;
  font-weight: 400;
  font-stretch: 100%;
  color: var(--ink-soft);
}
.note-none {
  font-size: 12.5px;
  color: var(--ink-soft);
  margin-top: 7px;
}
.notes {
  margin-top: 8px;
}
.note {
  padding: 9px 0 10px;
  border-top: 1px solid var(--rule);
}
.note:first-child {
  border-top: 0;
}
.note-tags {
  display: flex;
  gap: 7px;
  align-items: center;
  margin-bottom: 4px;
}
.note-head {
  font-size: 13.5px;
  line-height: 1.3;
}
.note-leg {
  display: grid;
  grid-template-columns: 4.6rem minmax(0, 1fr);
  gap: 3px 10px;
  margin-top: 5px;
  font-size: 12.5px;
  line-height: 1.34;
  color: var(--ink-soft);
}
.note-k {
  font-size: 11px;
  font-weight: 600;
  font-stretch: 92%;
  color: var(--ink);
  padding-top: 1px;
}
.note-sw {
  font-size: 12.5px;
  color: var(--ink-soft);
  line-height: 1.34;
  margin-top: 5px;
}
.note .cites {
  margin-top: 6px;
}

/* Not drawn is not the same as not known: the hatch is reserved for what nobody knows, so a
   sheet that was never drawn is a flat plate with a rule through it. */
.undrawn {
  margin: 18px 20px 4px;
  border: 1.5px solid var(--ink);
  background: #f4f6f7;
  padding: 15px 17px 17px;
}
.undrawn h3 {
  font-size: 16px;
  font-weight: 700;
  font-stretch: 86%;
}
.undrawn p {
  font-size: 13px;
  margin-top: 7px;
  max-width: 82ch;
  line-height: 1.4;
}
.undrawn-list {
  margin-top: 13px;
  border-top: 1.5px solid var(--ink);
}
.undrawn-list li {
  display: grid;
  grid-template-columns: 5.2rem minmax(0, 1fr) auto auto;
  gap: 4px 14px;
  align-items: baseline;
  padding: 7px 0;
  border-bottom: 1px solid var(--rule);
  font-size: 12.5px;
}
.u-stage {
  font-weight: 700;
  font-stretch: 88%;
}
.u-sheets {
  color: var(--ink-soft);
  font-size: 12px;
}
.u-mark {
  font-size: 11.5px;
  font-weight: 600;
  padding: 1px 7px;
  border: 1px solid var(--ghost);
  background: var(--sheet);
  color: var(--ink-soft);
  white-space: nowrap;
}
.sw.notdrawnsw {
  display: inline-block;
  width: 22px;
  height: 10px;
  margin-right: 8px;
  background: #f4f6f7;
  border: 1px solid var(--rule);
  vertical-align: -1px;
}

/* The sheet at full size, in the document viewer's clothes. */
.sheetview-body {
  padding: 16px;
}
.sheetview-paper {
  display: flex;
  justify-content: center;
}
.sheetview-img {
  display: block;
  max-width: 100%;
  height: auto;
  background: #fff;
  border: 1px solid var(--rule);
}
.sheetview-body.full .sheetview-paper {
  display: block;
}
.sheetview-body.full .sheetview-img {
  max-width: none;
  width: 1800px;
}

/* ---------------------------------------------------------------- the model sheet */
.mv-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 268px;
  border-bottom: 1.5px solid var(--ink);
}
.mv-stage {
  position: relative;
  min-width: 0;
  overflow: hidden;
}
canvas#mscene {
  display: block;
  width: 100%;
  max-width: 100%;
  height: 540px;
  background: var(--paper);
}
.mv-boot {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  font-size: 13.5px;
  color: var(--ink-soft);
  padding: 0 24px;
  text-align: center;
}
.mv-boot.bad {
  color: var(--flag);
}
.mv-layers {
  border-left: 1.5px solid var(--ink);
  background: var(--sheet);
  overflow-y: auto;
  max-height: 540px;
  padding: 11px 13px 16px;
}
.mv-layers h3 {
  font-size: 13px;
  font-weight: 700;
  font-stretch: 88%;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  padding-bottom: 7px;
  border-bottom: 1.5px solid var(--ink);
}
.mv-layers h3 .n {
  font-size: 11px;
  font-weight: 400;
  font-stretch: 100%;
  color: var(--ink-soft);
}
.mv-layers h4 {
  font-size: 11.5px;
  font-weight: 700;
  font-stretch: 92%;
  color: var(--ink-soft);
  margin-top: 12px;
  padding-bottom: 3px;
  border-bottom: 1px solid var(--rule);
}
.lys li + li {
  margin-top: 1px;
}
.ly {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr) auto;
  gap: 7px;
  align-items: center;
  padding: 3px 4px;
  font-size: 12.5px;
  cursor: pointer;
  line-height: 1.25;
}
.ly:hover {
  background: var(--tint);
}
.ly input {
  margin: 0;
  accent-color: var(--ink);
}
.ly-chip {
  width: 13px;
  height: 13px;
  border: 1px solid var(--ink);
}
.ly-n {
  font-size: 11px;
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}
.ly-flag {
  color: var(--flag);
  margin-left: 4px;
}
.lys-note {
  margin-top: 14px;
  padding-top: 9px;
  border-top: 1px solid var(--rule);
  font-size: 11.5px;
  color: var(--ink-soft);
  line-height: 1.35;
}
/* A checkbox that sits in a control bar beside the selects and the segments. */
.check-ctl {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  cursor: pointer;
  padding-bottom: 5px;
}
.check-ctl input {
  margin: 0;
  width: 15px;
  height: 15px;
  accent-color: var(--ink);
}
.check-ctl:hover span {
  color: var(--flag);
}

/* The title block, in the same language as the staging and logistics sheets. */
.tb {
  border-top: 1.5px solid var(--ink);
}
.tb-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}
.tb-cell {
  padding: 9px 14px 10px;
  border-left: 1px solid var(--rule);
  display: grid;
  gap: 2px;
  align-content: start;
}
.tb-cell:first-child {
  border-left: 0;
}
.tb-k {
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.tb-v {
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.3;
}
.tb-who {
  background: var(--ink);
  color: var(--sheet);
}
.tb-mark {
  font-size: 14px;
  font-weight: 700;
  font-stretch: 84%;
  letter-spacing: 0.02em;
}
.tb-who .tb-v {
  color: #b8c8d6;
}
.tb-basis {
  border-top: 1px solid var(--rule);
  padding: 9px 14px 10px;
}
.tb-basis p {
  font-size: 12px;
  line-height: 1.4;
  margin-top: 3px;
  max-width: 108ch;
  color: var(--ink-soft);
}
.tb-basis b {
  color: var(--ink);
  font-weight: 700;
  font-stretch: 90%;
}
.tb-caution {
  border-top: 1px solid var(--rule);
  padding: 9px 14px 10px;
  background: var(--warm);
}
.tb-caution p {
  font-size: 12px;
  line-height: 1.4;
  color: var(--flag);
  max-width: 108ch;
}
.tb-caution b {
  font-weight: 700;
  font-stretch: 90%;
}
.tb-status {
  border-top: 1.5px solid var(--ink);
  background: var(--ink);
  color: var(--sheet);
  padding: 7px 14px 8px;
  font-size: 12px;
  font-weight: 700;
  font-stretch: 88%;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ---------------------------------------------------------------- narrow, the later sheets */
@media (max-width: 900px) {
  .coverage,
  .stagehead,
  .plate {
    padding-left: 14px;
    padding-right: 14px;
  }
  caption.undercap {
    padding-left: 14px;
    padding-right: 14px;
  }
  .plates {
    grid-template-columns: minmax(0, 1fr);
  }
  .plate {
    border-left: 0;
    border-top: 1.5px solid var(--ink);
  }
  .plate:first-child {
    border-top: 0;
  }
  .undrawn {
    margin-left: 14px;
    margin-right: 14px;
  }
  .undrawn-list li {
    grid-template-columns: 4.6rem minmax(0, 1fr);
  }
  .u-sheets,
  .u-mark {
    grid-column: 2;
  }
  .u-mark {
    justify-self: start;
  }
  .mv-body {
    grid-template-columns: minmax(0, 1fr);
  }
  canvas#mscene {
    height: 360px;
  }
  .mv-layers {
    border-left: 0;
    border-top: 1.5px solid var(--ink);
    max-height: 320px;
  }
  .tb-cell {
    border-left: 0;
    border-top: 1px solid var(--rule);
  }
  .tb-cell:first-child {
    border-top: 0;
  }
}

/* The stage buttons carry their name where there is room for it: a bare number is a poor
   control when the names are what a reader is choosing between. */
@media (min-width: 1180px) {
  .drawings .segment button {
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
  }
  .drawings .segment .sname {
    display: inline;
    font-size: 12px;
    font-weight: 400;
    color: var(--ink-soft);
  }
  .drawings .segment button[aria-checked="true"] .sname {
    color: #b8c8d6;
  }
}
.compact th:last-child,
.compact td:last-child {
  text-align: right;
}

/* Callouts: the one line under the body carries the package and, where it applies, that the
   reading is inferred rather than stated. */
.callout-sub {
  margin-top: 3px;
  font-size: 11.5px;
  color: var(--ink-soft);
  line-height: 1.25;
}
.callout-inf {
  color: var(--flag);
}
.callout-more {
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 204px;
}
.callout[hidden] {
  display: none;
}
.leaders.off {
  display: none;
}

/* On a phone the callouts and the count share one gutter, so the count runs the full width
   at the foot of the model rather than sitting on top of a callout. */
@media (max-width: 640px) {
  .callout-more {
    left: 12px;
    right: 12px;
    width: auto;
  }
}

/* The full table squeezes to nothing on a phone: six columns of prose in 390 pixels is a
   column of single words. It scrolls sideways like the impacts and requests tables instead,
   and the compact density is the answer for reading it on a small screen. */
.findings-full {
  min-width: 860px;
}
