/*
  PresetWing site styles.

  One stylesheet, no build step, no framework, no web font, no image file. The
  design direction comes from the product brief: a compact work sheet in navy,
  warm white and one amber attention accent, with rectangular section headers,
  a quantity column and obvious unchecked, checked and attention marks. It is
  meant to read like a prop preset sheet on a clipboard, not like a card stack.

  Palette. Every text pair below was computed against its actual background
  rather than eyeballed, and the numbers are in
  ../receipts/01-deploy-2026-09-04.md. The lowest text pair on the site is
  5.85:1, which clears WCAG AA (4.5:1) at normal sizes with room.

    ink        #16233c on paper 14.67   on surface 15.42   on band 12.88
    ink-soft   #4b5875 on paper  6.66   on surface  7.00   on band  5.85
    amber-ink  #7a4a00 on paper  7.00   on surface  7.36   on tint  6.59
    paper      #fbf7ef reversed on ink 14.67

  --rule (1.44:1), --edge (2.10:1) and --amber-line (3.23:1) are below 3:1 and
  are NOT used for text and NOT used as the only carrier of any meaning. They
  are ruled lines and borders on a work sheet. Every mark in the illustration
  also carries a word, and the illustration is aria-hidden with its meaning
  written in the prose beside it.

  Light only. A second palette means a second full set of contrast
  measurements, and there is no requirement for one here.
*/

:root {
  --ink: #16233c;
  --ink-soft: #4b5875;
  --paper: #fbf7ef;
  --surface: #fffdf8;
  --band: #f0e8da;
  --amber-ink: #7a4a00;
  --amber-tint: #fdefd6;
  --amber-line: #c07b12;
  --rule: #d9cfbc;
  --edge: #b8ac95;
  --sheet-max: 44rem;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  padding: 0 1rem 3rem;
  background: var(--paper);
  color: var(--ink);
  font: 1rem/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        "Helvetica Neue", Arial, sans-serif;
  /* A bare email address is one unbreakable token. Without this it pushes a
     horizontal scrollbar onto the page at 320px with large accessibility
     text. */
  overflow-wrap: break-word;
}

.sheet {
  max-width: var(--sheet-max);
  margin: 0 auto;
}

/* --- Masthead: the header block of a run sheet, reversed out of navy ------ */

.masthead {
  background: var(--ink);
  color: var(--paper);
  padding: 1.5rem 1.25rem 1.25rem;
  margin: 0 -1rem 1.5rem;
}

.masthead h1 {
  margin: 0;
  font-size: clamp(2rem, 9vw, 2.75rem);
  line-height: 1.05;
  letter-spacing: -0.01em;
}

.masthead .role {
  margin: 0.4rem 0 0;
  font-size: 1.0625rem;
  color: var(--paper);
}

.masthead .stamp {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.3rem 0.6rem;
  border: 2px solid var(--paper);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.masthead nav {
  margin-top: 1.1rem;
  font-size: 0.9375rem;
}

.masthead nav a {
  color: var(--paper);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.masthead nav span[aria-hidden="true"] { padding: 0 0.4rem; opacity: 0.6; }

/* --- Section headers: filled rectangular bars ---------------------------- */

h2 {
  background: var(--ink);
  color: var(--paper);
  margin: 2.25rem 0 0;
  padding: 0.45rem 0.7rem;
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

h2 + * { margin-top: 0.9rem; }

h3 {
  margin: 1.5rem 0 0.4rem;
  font-size: 1.0625rem;
  letter-spacing: 0.01em;
}

p { margin: 0 0 0.9rem; }

.lede {
  font-size: 1.125rem;
  margin-bottom: 1.25rem;
}

.note { color: var(--ink-soft); font-size: 0.9375rem; }

a { color: var(--ink); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--amber-ink); }
/* Focus is never signalled by colour alone. */
a:focus-visible, summary:focus-visible {
  outline: 3px solid var(--amber-line);
  outline-offset: 2px;
}

/* --- Ruled lists, like the lines on a printed sheet ---------------------- */

ul.ruled { list-style: none; margin: 0 0 1.1rem; padding: 0; }

ul.ruled li {
  padding: 0.55rem 0 0.55rem 1.5rem;
  border-bottom: 1px solid var(--rule);
  position: relative;
}

ul.ruled li::before {
  content: "";
  position: absolute;
  left: 0.15rem;
  top: 1.05rem;
  width: 0.5rem;
  height: 0.5rem;
  border: 2px solid var(--ink);
}

dl.qa { margin: 0; }
dl.qa dt { font-weight: 700; margin-top: 1.25rem; }
dl.qa dd { margin: 0.35rem 0 0; }

/* --- The illustration: an area block from a prop sheet ------------------- */

.sheetblock {
  margin: 1.25rem 0 0.5rem;
  border: 2px solid var(--ink);
  background: var(--surface);
}

.sheetblock .area {
  background: var(--band);
  border-bottom: 2px solid var(--ink);
  padding: 0.4rem 0.6rem;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.row {
  display: grid;
  grid-template-columns: 1fr 2.25rem 2.5rem 2.5rem;
  align-items: center;
  gap: 0 0.25rem;
  padding: 0.5rem 0.6rem;
  border-bottom: 1px solid var(--rule);
  font-size: 0.9375rem;
}

.row:last-child { border-bottom: 0; }

.row.head {
  background: var(--surface);
  border-bottom: 1px solid var(--edge);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.row .qty {
  text-align: center;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.row .cell { display: flex; justify-content: center; }

.row .prop { padding-right: 0.35rem; }
.row .prop small { display: block; color: var(--ink-soft); font-size: 0.8125rem; }

/* The three marks. Drawn, not typed: the page is plain ASCII, and a mark that
   is a font glyph is at the mercy of whatever font the reader has. */

.mark {
  width: 1.15rem;
  height: 1.15rem;
  border: 2px solid var(--ink);
  position: relative;
  flex: none;
}

.mark.done { background: var(--ink); }

/* A tick, drawn from two borders of a rotated box. */
.mark.done::after {
  content: "";
  position: absolute;
  left: 0.16rem;
  top: 0.02rem;
  width: 0.45rem;
  height: 0.72rem;
  border: solid var(--paper);
  border-width: 0 2px 2px 0;
  transform: rotate(40deg);
}

.mark.attention {
  background: var(--amber-tint);
  border-color: var(--amber-line);
}

/* An exclamation bar and dot, drawn rather than typed. */
.mark.attention::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0.12rem;
  margin-left: -1px;
  width: 2px;
  height: 0.45rem;
  background: var(--amber-ink);
}

.mark.attention::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0.1rem;
  margin-left: -1px;
  width: 2px;
  height: 2px;
  background: var(--amber-ink);
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.1rem;
  margin: 0.75rem 0 0.35rem;
  padding: 0;
  list-style: none;
  font-size: 0.875rem;
}

.legend li { display: flex; align-items: center; gap: 0.4rem; }

.caption {
  color: var(--ink-soft);
  font-size: 0.875rem;
  margin: 0.5rem 0 1.25rem;
}

/* --- Counts strip -------------------------------------------------------- */

.counts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 1.1rem;
  padding: 0;
  list-style: none;
}

.counts li {
  border: 1px solid var(--edge);
  background: var(--surface);
  padding: 0.35rem 0.6rem;
  font-size: 0.875rem;
  font-variant-numeric: tabular-nums;
}

.counts li.flag {
  border-color: var(--amber-line);
  background: var(--amber-tint);
  color: var(--amber-ink);
  font-weight: 700;
}

/* --- Price block --------------------------------------------------------- */

.price {
  border: 2px solid var(--ink);
  background: var(--surface);
  padding: 0.9rem 1rem;
  margin: 1.1rem 0;
}

.price .figure {
  font-size: 1.5rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* --- Footer -------------------------------------------------------------- */

footer {
  margin-top: 2.5rem;
  border-top: 2px solid var(--ink);
  padding-top: 1rem;
  font-size: 0.9375rem;
  color: var(--ink-soft);
}

footer a { color: var(--ink); }

footer .links {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.25rem;
  margin: 0 0 0.5rem;
  padding: 0;
  list-style: none;
}

/* 44px tap targets, the same reasoning behind the app's large controls. */
footer .links a, .masthead nav a {
  display: inline-block;
  min-height: 44px;
  line-height: 44px;
}

/* --- Breakpoints --------------------------------------------------------- */

@media (max-width: 26rem) {
  body { padding-left: 0.75rem; padding-right: 0.75rem; }
  .masthead { margin-left: -0.75rem; margin-right: -0.75rem; padding: 1.25rem 1rem 1rem; }
  .row { grid-template-columns: 1fr 2rem 2.15rem 2.15rem; padding: 0.5rem 0.45rem; }
}

@media (min-width: 48rem) {
  body { font-size: 1.0625rem; }
  .masthead { padding: 2rem 1.75rem 1.5rem; }
}

@media print {
  body { background: #fff; padding: 0; }
  .masthead { background: #fff; color: #000; border-bottom: 2px solid #000; }
  .masthead nav, .masthead .stamp { display: none; }
  h2 { background: #fff; color: #000; border: 2px solid #000; }
}
