/* ==========================================================================
   yoink.team

   A dispatch board for field work. The ancestor of this product is a sign-up
   sheet taped to a wall and a flyer with tear-off tabs, so the tally bar keeps
   the tabs and everything else gets out of its way.

   Cool steel neutrals — this is a tool used outdoors, not a broadsheet. One
   loud colour, amber, and it means YOU: your button, your work. Steel blue is
   somebody else's, green is finished. Nothing else competes for the eye.
   ========================================================================== */

:root {
  /* --- surfaces: cool, slightly blue-biased neutrals ---------------------- */
  --ground:      #EFF2F4;
  --surface:     #FFFFFF;
  --surface-2:   #E5EAED;
  --line:        #D2DADF;
  --line-hard:   #B2BEC5;

  --ink:         #101820;
  --ink-2:       #47555F;
  --ink-3:       #78868F;

  /* --- semantics --------------------------------------------------------- */
  --signal:      #F0A007;   /* your action, your work */
  --signal-deep: #B87400;
  --signal-ink:  #1F1500;
  --signal-tint: #FDF1D8;

  --held:        #2F5D8A;   /* held by another volunteer */
  --held-tint:   #DEE8F1;

  --done:        #13715A;
  --done-tint:   #D7E9E3;

  --bad:         #B4321C;
  --bad-tint:    #FADFD9;

  --display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --ui: "Public Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        "Helvetica Neue", Arial, sans-serif;

  --r: 3px;                 /* barely rounded: a printed form, not a phone app */
  --shadow: 0 1px 2px rgba(16, 24, 32, .07), 0 6px 20px rgba(16, 24, 32, .06);

  /* Two widths, because reading and operating want different things. Pages you
     read get the room; the board stays tighter so a row's label and its button
     are not a head-turn apart. Running text is capped separately again, at a
     measure, so a wider page never means a wider line. */
  --page: 1040px;
  --board: 920px;
  /* ch is the width of a digit, which in this face is wider than the average
     letter -- 58ch lands at about 72 characters, not 58. */
  --measure: 58ch;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ground:      #0E141A;
    --surface:     #161F26;
    --surface-2:   #1E2932;
    --line:        #27343D;
    --line-hard:   #3B4C58;

    --ink:         #E8EEF2;
    --ink-2:       #A0AFB9;
    --ink-3:       #74848F;

    --signal:      #FFB627;
    --signal-deep: #FFCB5C;
    --signal-ink:  #241900;
    --signal-tint: #3A2A08;

    --held:        #7FB1E0;
    --held-tint:   #1A2B3B;

    --done:        #4FC49E;
    --done-tint:   #12312A;

    --bad:         #FF8A6B;
    --bad-tint:    #3B1C13;

    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .3);
  }
}

:root[data-theme="dark"] {
  --ground:      #0E141A;
  --surface:     #161F26;
  --surface-2:   #1E2932;
  --line:        #27343D;
  --line-hard:   #3B4C58;

  --ink:         #E8EEF2;
  --ink-2:       #A0AFB9;
  --ink-3:       #74848F;

  --signal:      #FFB627;
  --signal-deep: #FFCB5C;
  --signal-ink:  #241900;
  --signal-tint: #3A2A08;

  --held:        #7FB1E0;
  --held-tint:   #1A2B3B;

  --done:        #4FC49E;
  --done-tint:   #12312A;

  --bad:         #FF8A6B;
  --bad-tint:    #3B1C13;

  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .3);
}

/* ==========================================================================
   Base
   ========================================================================== */

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--ui);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

p { margin: 0; }
a { color: var(--held); text-underline-offset: 2px; }
img { max-width: 100%; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--signal-deep); outline-offset: 2px; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* At desk distance a 16px body is small. The measure is in ch, so the column
   grows with it and the line length stays where it was. */
@media (min-width: 900px) {
  body { font-size: 17px; }
}

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

/* ==========================================================================
   Wordmark and page chrome
   ========================================================================== */

.mark {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 21px;
  letter-spacing: -.01em;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}
.mark-glyph { height: 1.1em; width: auto; flex: 0 0 auto; }
.mark-glyph .tab-open {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  opacity: .7;
}
.mark-glyph .tab-taken { fill: var(--signal); stroke: var(--signal-deep); stroke-width: 1.5; }
/* One flex item, so the container's gap cannot land between the name and the
   TLD and render the domain as "yoink .team". */
.mark-name { white-space: nowrap; }
.mark .tld { color: var(--ink-2); font-weight: 600; }

.site-head { border-bottom: 1px solid var(--line); background: var(--surface); }
.site-head-in {
  max-width: var(--page);
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.site-head nav { display: flex; align-items: center; gap: 8px 18px; flex-wrap: wrap; justify-content: flex-end; }
.site-head nav a:not(.btn) {
  color: var(--ink-2);
  text-decoration: none;
  font-size: 14.5px;
  font-weight: 600;
}
.site-head nav a:not(.btn):hover { color: var(--ink); }

.site-foot { border-top: 1px solid var(--line); margin-top: 56px; background: var(--surface); }
.site-foot-in {
  max-width: var(--page);
  margin: 0 auto;
  padding: 18px 20px calc(18px + env(safe-area-inset-bottom));
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 20px;
}
.site-foot nav { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.site-foot a {
  color: var(--ink-3);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
}
.site-foot a:hover { color: var(--ink); }
.foot-mark .mark { font-size: 18px; }

/* Page body for the content pages (home, about, terms, admin). */
.page { max-width: var(--page); margin: 0 auto; padding: 36px 20px 0; }
.narrow { max-width: 60ch; }

/*
 * Prose pages put their section headings in a rail beside the text instead of
 * above it, so the width is used rather than left as margin. No extra markup:
 * a grid row is opened by each h2 in column one, and everything after it lands
 * in column two until the next h2 starts a new row.
 */
@media (min-width: 960px) {
  .prose {
    display: grid;
    grid-template-columns: 264px minmax(0, 1fr);
    column-gap: 48px;
    align-items: start;
    max-width: none;
  }
  .prose > * { grid-column: 2; }
  .prose > h1,
  .prose > .lede-sm { grid-column: 1 / -1; }
  .prose > h2 {
    grid-column: 1;
    margin-top: 40px;
    text-wrap: pretty;
  }
  .prose > h2 + * { margin-top: 40px; }
}

/* ==========================================================================
   Type
   ========================================================================== */

h1, h2, h3 { margin: 0; text-wrap: balance; }

h1 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(32px, 7vw, 46px);
  line-height: 1.02;
  letter-spacing: -.005em;
}
.page h2 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(24px, 4.5vw, 31px);
  line-height: 1.08;
  margin: 36px 0 12px;
}
.page h3 { font-size: 16px; font-weight: 700; margin-bottom: 3px; }
.page p { max-width: var(--measure); margin-bottom: 12px; color: var(--ink-2); }
.page p:last-child { margin-bottom: 0; }
.page section { padding-block: 28px 0; }

.lede {
  font-size: clamp(19px, 3vw, 24px);
  line-height: 1.32;
  font-weight: 500;
  color: var(--ink);
  max-width: 26ch;
  margin: 22px 0 0;
  text-wrap: balance;
}
.lede em { font-style: normal; color: var(--signal-deep); }
.lede-sm { font-size: 19px; color: var(--ink-2); max-width: 52ch; margin-bottom: 10px; }

.eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .11em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 0 0 10px;
}

.spaced { margin-top: 22px; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .9em; }
.todo { background: var(--bad-tint); color: var(--bad); font-weight: 600; padding: 1px 6px; border-radius: var(--r); font-size: .9em; }

/* ==========================================================================
   Buttons — one loud, the rest quiet
   ========================================================================== */

.btn {
  font-family: var(--ui);
  font-weight: 700;
  font-size: 14px;
  min-height: 40px;
  padding: 0 16px;
  border: 1.5px solid var(--line-hard);
  border-radius: var(--r);
  background: var(--surface);
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  white-space: nowrap;
  text-decoration: none;
  transition: background .12s ease, border-color .12s ease, transform .06s ease;
}
.btn:hover { border-color: var(--ink); }
.btn:active { transform: translateY(1px); }
.btn[disabled], .btn.is-busy { opacity: .5; pointer-events: none; }

.btn-take {
  background: var(--signal);
  border-color: var(--signal);
  color: var(--signal-ink);
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .14);
}
.btn-take:hover { background: var(--signal-deep); border-color: var(--signal-deep); color: #fff; }

.btn-quiet {
  min-height: 38px;
  padding: 0 13px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-2);
  border-color: var(--line);
}
.btn-quiet:hover { color: var(--ink); border-color: var(--ink-3); }
.btn-done { border-color: var(--done); color: var(--done); }
.btn-done:hover { background: var(--done); border-color: var(--done); color: #fff; }
.btn-x {
  border-color: transparent;
  color: var(--ink-3);
  font-size: 20px;
  font-weight: 400;
  min-height: 38px;
  padding: 0 10px;
}
.btn-x:hover { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn-sm { min-height: 34px; padding: 0 12px; font-size: 13px; }
.btn-big { min-height: 52px; font-size: 16px; padding: 0 22px; }
.btn-wide { width: 100%; }

/* ==========================================================================
   Forms
   ========================================================================== */

input[type="text"], input[type="search"], input[type="number"], textarea, select {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  background: var(--surface);
  border: 1.5px solid var(--line-hard);
  border-radius: var(--r);
  font-size: 16px;      /* 16px stops iOS zooming the page on focus */
  line-height: 1.4;
}
textarea { min-height: 120px; resize: vertical; }
select { appearance: none; padding-right: 30px; }
input::placeholder, textarea::placeholder { color: var(--ink-3); }
input:focus, textarea:focus, select:focus { border-color: var(--ink); }

.field { margin-bottom: 18px; }
.field > label, .field > legend, fieldset.field legend {
  display: block;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 6px;
  padding: 0;
}
fieldset.field { border: 0; margin-inline: 0; padding: 0; }
.opt, .opts-hint { font-weight: 500; color: var(--ink-3); font-size: 12.5px; margin-left: 6px; }

.hint { font-size: 13px; line-height: 1.5; color: var(--ink-3); margin-top: 7px; }
.field--pair { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 18px; }

.checks label, label.check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 15px;
  font-weight: 500;
  margin-bottom: 10px;
  cursor: pointer;
}
.checks input, label.check input { width: auto; min-height: 0; margin-top: 4px; accent-color: var(--signal-deep); }

.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg-opt { position: relative; }
.seg-opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.seg-opt span {
  display: block;
  font-weight: 700;
  font-size: 14px;
  padding: 9px 15px;
  border: 1.5px solid var(--line-hard);
  border-radius: var(--r);
  color: var(--ink-2);
}
.seg-opt input:checked + span { background: var(--ink); border-color: var(--ink); color: var(--ground); }
.seg-opt input:focus-visible + span { outline: 3px solid var(--signal-deep); outline-offset: 2px; }

/* ==========================================================================
   Board: the bar
   ========================================================================== */

.bar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 12px;
  /* Full-bleed background, contents aligned to the board column. */
  padding-block: 10px;
  padding-inline: max(20px, calc((100% - var(--board)) / 2));
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.bar-title {
  flex: 1 1 auto;
  min-width: 0;
  font-weight: 600;
  font-size: 14px;
  color: var(--ink-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bar-count {
  font-family: var(--display);
  font-weight: 700;
  font-size: 17px;
  font-variant-numeric: tabular-nums;
  letter-spacing: .02em;
  padding: 3px 9px;
  border: 1.5px solid var(--line-hard);
  border-radius: var(--r);
  white-space: nowrap;
}

.org-strip {
  background: var(--ink);
  color: var(--ground);
  padding-block: 10px;
  padding-inline: max(20px, calc((100% - var(--board)) / 2));
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.org-strip .dot { width: 8px; height: 8px; background: var(--signal); border-radius: 50%; flex: 0 0 auto; }

.wrap { max-width: var(--board); margin: 0 auto; padding: 24px 20px 0; }

/* ==========================================================================
   Board: head and tally
   ========================================================================== */

.head { margin-bottom: 18px; }
.head .note { margin-top: 9px; color: var(--ink-2); font-size: 16px; max-width: 60ch; }
.head .meta {
  margin-top: 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.tally {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 16px;
}
.tally-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
.tally-big {
  font-family: var(--display);
  font-weight: 700;
  font-size: 54px;
  line-height: .82;
  font-variant-numeric: tabular-nums;
}
.tally-label {
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--ink-2);
  margin-top: 7px;
}
.tally-pct {
  font-family: var(--display);
  font-weight: 600;
  font-size: 23px;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}

/* the tear-off tabs, one per unit */
.tabs { display: flex; gap: 3px; margin: 16px 0 10px; }
.tabs i {
  flex: 1 1 0;
  min-width: 3px;
  height: 26px;
  border: 1.5px solid var(--line-hard);
  border-radius: 2px;
  background: transparent;
  transition: background .25s ease, border-color .25s ease;
}
.tabs i.t-held { background: var(--held-tint); border-color: var(--held); }
.tabs i.t-done { background: var(--done); border-color: var(--done); }
.tabs i.t-mine { background: var(--signal); border-color: var(--signal-deep); }
.tabs.is-empty { border: 1.5px dashed var(--line-hard); border-radius: var(--r); height: 26px; }
.tabs.is-bands { gap: 0; border: 1.5px solid var(--line-hard); border-radius: var(--r); overflow: hidden; }
.tabs.is-bands i { border: 0; border-radius: 0; min-width: 0; flex: 0 0 auto; transition: width .3s ease; }

.key {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 14px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.key span { display: inline-flex; align-items: center; gap: 6px; }
.key i { width: 10px; height: 10px; border: 1.5px solid var(--line-hard); border-radius: 2px; }
.key .k-held { background: var(--held-tint); border-color: var(--held); }
.key .k-done { background: var(--done); border-color: var(--done); }
.key .k-mine { background: var(--signal); border-color: var(--signal-deep); }

/* ==========================================================================
   Board: sections
   ========================================================================== */

.sec { margin-top: 28px; }
.sec-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 9px;
}
.sec-head h2 {
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.sec-n {
  font-family: var(--display);
  font-weight: 700;
  font-size: 18px;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}

.list { display: flex; flex-direction: column; gap: 6px; }

.unit {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 58px;
  padding: 10px 12px 10px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--line-hard);
  border-radius: var(--r);
}
.unit-label {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 15.5px;
  font-weight: 500;
  line-height: 1.3;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.unit-sub {
  display: block;
  margin-top: 3px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.unit.is-mine { border-left-color: var(--signal); background: var(--signal-tint); }
.unit.is-held { border-left-color: var(--held); }
.unit.is-held .unit-label { color: var(--ink-2); font-weight: 400; }
.unit.is-done { border-left-color: var(--done); }
.unit.is-done .unit-label { color: var(--ink-3); text-decoration: line-through; text-decoration-thickness: 1px; }
.unit.is-mine.is-done { border-left-color: var(--signal); }
.unit.is-asking { border-left-color: var(--signal); background: var(--signal-tint); }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex: 0 0 auto;
  font-size: 12.5px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--held-tint);
  color: var(--held);
  max-width: 42%;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.chip.c-done { background: var(--done-tint); color: var(--done); }

.acts { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; }
.acts form { display: contents; }

.empty {
  margin-top: 22px;
  padding: 22px 16px;
  border: 1px dashed var(--line-hard);
  border-radius: var(--r);
  color: var(--ink-3);
  font-size: 14.5px;
  text-align: center;
}

/* --- the name step, asked in place ---------------------------------------- */

.namestep { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; width: 100%; }
.namestep label {
  flex: 1 1 100%;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.namestep input { flex: 1 1 150px; width: auto; min-width: 0; min-height: 42px; border-color: var(--ink); font-weight: 500; }
.namestep .btn { flex: 0 0 auto; min-height: 42px; }

.namestep-err {
  flex: 1 1 100%;
  margin-top: 2px;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.45;
  color: var(--bad);
}
.namestep input[aria-invalid="true"] { border-color: var(--bad); }

.whoami { margin-top: 10px; font-size: 13.5px; color: var(--ink-3); }
.whoami > summary { cursor: pointer; list-style: none; font-weight: 500; }
.whoami > summary::-webkit-details-marker { display: none; }
.whoami > summary::after { content: " · change"; color: var(--held); font-weight: 600; }
.whoami > summary b { color: var(--ink-2); font-weight: 700; }
.whoami form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 10px; }
.whoami label { flex: 1 1 100%; font-size: 12.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-2); }
.whoami input { flex: 1 1 150px; width: auto; min-height: 40px; }

/* --- find ----------------------------------------------------------------- */

.find { position: relative; margin-bottom: 9px; }
.find input { padding-left: 36px; min-height: 44px; }
.find svg { position: absolute; left: 12px; top: 22px; transform: translateY(-50%); color: var(--ink-3); pointer-events: none; }
.find-none { margin-top: 8px; font-size: 14px; color: var(--ink-3); }

/* --- what other people hold ------------------------------------------------ */

.taken > summary {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 50px;
  padding: 0 14px;
  border: 1px dashed var(--line-hard);
  border-radius: var(--r);
  cursor: pointer;
  list-style: none;
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 600;
}
.taken > summary::-webkit-details-marker { display: none; }
.taken > summary:hover { background: var(--surface); }
.taken[open] > summary { margin-bottom: 9px; }
.taken-label { flex: 1 1 auto; }
.caret::after { content: "Show"; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.taken[open] .caret::after { content: "Hide"; }

.faces { display: flex; flex: 0 0 auto; }
.faces span {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--held-tint);
  color: var(--held);
  border: 2px solid var(--ground);
  font-size: 10.5px;
  font-weight: 700;
  display: grid;
  place-items: center;
  margin-left: -7px;
}
.faces span:first-child { margin-left: 0; }

/* ==========================================================================
   Board: foot — who is carrying it, and what just happened
   ========================================================================== */

.board-foot {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 0 32px;
  margin-top: 8px;
}

.roll { display: flex; flex-direction: column; }
.roll-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 8px 0;
  border-top: 1px solid var(--line);
  font-size: 14.5px;
}
.roll-row:last-child { border-bottom: 1px solid var(--line); }
.roll-row b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.roll-bar { height: 8px; background: var(--surface-2); border-radius: 2px; overflow: hidden; }
.roll-bar i { display: block; height: 100%; background: var(--held); }
.roll-row > span:last-child { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--ink-2); font-size: 13.5px; }
.roll-row small { font-weight: 500; color: var(--ink-3); font-size: 11.5px; }

.feed { display: flex; flex-direction: column; }
.feed-row {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 10px;
  padding: 8px 0;
  border-top: 1px solid var(--line);
  font-size: 14.5px;
}
.feed-row:last-child { border-bottom: 1px solid var(--line); }
.feed-when {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--ink-3);
  padding-top: 3px;
}
.feed-what { color: var(--ink-2); overflow-wrap: anywhere; }

.footnote { margin: 26px 0 0; font-size: 13px; line-height: 1.6; color: var(--ink-3); max-width: 64ch; }

/* ==========================================================================
   Board: the dock
   ========================================================================== */

.dock {
  position: sticky;
  bottom: 0;
  z-index: 20;
  margin-top: 26px;
  padding-block: 10px calc(10px + env(safe-area-inset-bottom));
  padding-inline: max(20px, calc((100% - var(--board)) / 2));
  background: var(--surface);
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 14px;
}
@supports (backdrop-filter: blur(10px)) {
  .dock { background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: blur(12px); }
}
.dock-left { flex: 1 1 auto; min-width: 0; }
.dock-n { font-family: var(--display); font-weight: 700; font-size: 27px; line-height: 1; font-variant-numeric: tabular-nums; }
.dock-l { font-size: 11.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-3); }
.dock form { flex: 0 0 auto; }

/* ==========================================================================
   Board: finished
   ========================================================================== */

.finish {
  background: var(--surface);
  border: 2px solid var(--ink);
  border-radius: var(--r);
  padding: 20px;
  margin-bottom: 18px;
}
.finish .kicker {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--signal-deep);
  margin-bottom: 7px;
}
.finish h2 { font-family: var(--display); font-weight: 700; font-size: clamp(28px, 6vw, 36px); line-height: 1; margin-bottom: 9px; }
.finish p { color: var(--ink-2); margin-bottom: 16px; }

/* ==========================================================================
   Flashes and the toast
   ========================================================================== */

.flash {
  padding: 12px 14px;
  margin-bottom: 16px;
  border-radius: var(--r);
  border-left: 4px solid var(--held);
  background: var(--held-tint);
  color: var(--ink);
  font-size: 14.5px;
  font-weight: 500;
}
.flash.is-bad { border-left-color: var(--bad); background: var(--bad-tint); }
.flash.is-good { border-left-color: var(--done); background: var(--done-tint); }
.flash.is-flat { border-left-color: var(--line-hard); background: var(--surface-2); color: var(--ink-2); }

.toast {
  position: fixed;
  left: 50%;
  bottom: 92px;
  transform: translate(-50%, 10px);
  z-index: 60;
  background: var(--ink);
  color: var(--ground);
  font-weight: 600;
  font-size: 14.5px;
  padding: 12px 18px;
  border-radius: var(--r);
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transition: opacity .16s ease, transform .16s ease;
  max-width: min(90vw, 440px);
}
.toast.is-up { opacity: 1; transform: translate(-50%, 0); }
.toast.is-good { background: var(--signal); color: var(--signal-ink); }
.toast.is-bad { background: var(--bad); color: #fff; }

/* ==========================================================================
   Organizer
   ========================================================================== */

.share {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--line-hard);
  border-radius: var(--r);
  padding: 16px;
  margin-top: 12px;
}
.share.is-give { border-left-color: var(--held); }
.share.is-keep { border-left-color: var(--signal); }
.share h3 { font-size: 15.5px; font-weight: 700; margin-bottom: 3px; }
.share p { font-size: 13.5px; color: var(--ink-2); margin-bottom: 12px; max-width: 60ch; }
.linkrow { display: flex; gap: 8px; }
.linkrow input { background: var(--surface-2); font-size: 14px; font-weight: 500; }
.linkrow .btn { flex: 0 0 auto; min-height: 44px; }

.panel { max-width: var(--board); margin: 0 auto; padding: 0 20px; }
.drawer > summary {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  margin-top: 30px;
  padding: 0 16px;
  border: 1px solid var(--line-hard);
  border-radius: var(--r);
  background: var(--surface);
  cursor: pointer;
  list-style: none;
  font-weight: 700;
  font-size: 15px;
}
.drawer > summary::-webkit-details-marker { display: none; }
.drawer > summary:hover { border-color: var(--ink-3); }
.drawer > summary .caret { margin-left: auto; }
.drawer[open] .caret::after { content: "Hide"; }

.panel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
  margin-top: 12px;
  align-items: start;
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 16px;
}
.card h3 { font-size: 15px; font-weight: 700; margin-bottom: 10px; }
.card label { display: block; font-size: 13px; font-weight: 700; margin: 12px 0 5px; }
.card > label:first-of-type { margin-top: 0; }
.card .btn { margin-top: 14px; }
.card textarea { min-height: 90px; }
.card-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.card-actions form { display: contents; }
.card-actions .btn { margin-top: 0; }
.card-h3 { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line); }

.stale {
  background: var(--surface);
  border: 1px solid var(--signal);
  border-left: 4px solid var(--signal);
  border-radius: var(--r);
  padding: 16px;
  margin-top: 24px;
}
.stale h3 { font-size: 15.5px; font-weight: 700; }
.stale .hint { margin-bottom: 12px; }
.stale .list { margin-bottom: 12px; }
.unit-age { font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-3); white-space: nowrap; }

/* ==========================================================================
   Home page
   ========================================================================== */

.hero { padding-block: 36px 0; }
.make { padding-block: 30px 0; }
.make textarea { min-height: 190px; font-size: 15px; }
.makeform { margin-top: 4px; }

.opts { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 14px 0; margin-bottom: 22px; }
.opts > summary { font-weight: 700; font-size: 15px; cursor: pointer; list-style: none; }
.opts > summary::-webkit-details-marker { display: none; }
.opts > summary::before { content: "+"; display: inline-block; width: 18px; color: var(--signal-deep); font-weight: 700; }
.opts[open] > summary::before { content: "−"; }
.opts[open] > summary { margin-bottom: 18px; }

.submit-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.submit-row .hint { margin: 0; }

.steps { list-style: none; margin: 0; padding: 0; counter-reset: s; }
.steps li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0 16px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  counter-increment: s;
}
.steps li:last-child { border-bottom: 1px solid var(--line); }
.steps li::before {
  content: counter(s);
  font-family: var(--display);
  font-weight: 700;
  font-size: 19px;
  color: var(--signal-deep);
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}
.steps p { margin: 3px 0 0; color: var(--ink-2); font-size: 15.5px; }

.cases {
  list-style: none; margin: 0; padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 10px;
}
.cases li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 15px; }
.cases h3 { font-size: 14.5px; font-weight: 700; margin-bottom: 7px; }
.cases code { display: block; color: var(--ink-3); font-size: 12.5px; line-height: 1.5; overflow-wrap: anywhere; }
.cases code::before { content: "▸ "; color: var(--signal-deep); }

.rules { list-style: none; margin: 0; padding: 0; }
.rules li { padding: 15px 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: 4px 1fr; gap: 0 16px; }
.rules li:last-child { border-bottom: 1px solid var(--line); }
.rules li::before { content: ""; background: var(--signal); border-radius: 2px; margin: 4px 0; }
.rules p { margin: 4px 0 0; color: var(--ink-2); font-size: 15.5px; }
.rules code { color: var(--held); }

.plain { margin: 0 0 12px; padding-left: 20px; }
.plain li { margin-bottom: 8px; color: var(--ink-2); }
.plain b { color: var(--ink); font-weight: 700; }

/* ==========================================================================
   Small screens
   ========================================================================== */

@media (max-width: 620px) {
  body { font-size: 15.5px; }
  .bar, .org-strip { padding-inline: 16px; }
  .wrap, .page, .panel { padding-inline: 16px; }
  .site-head-in, .site-foot-in { padding-inline: 16px; }
  .dock { padding-inline: 16px; }

  .unit { flex-wrap: wrap; padding: 12px; }
  .unit-label { flex: 1 1 100%; }
  .acts { margin-left: auto; }
  .chip { max-width: none; }
  .tally-big { font-size: 46px; }
  .board-foot { gap: 0; }
  .linkrow { flex-wrap: wrap; }
  .linkrow input { flex: 1 1 100%; }
  .site-head nav a:not(.btn) { display: none; }
}
