/* ============================================================
   DOCKET — a team work ledger
   Visual world: a printed job-ticket board. Paper ground, deep
   ink, one stamp-red accent, condensed stencil labels, mono data.
   ============================================================ */

@font-face {
  font-family: "Docket Display";
  src: url("assets/oswald.ttf") format("truetype");
  font-weight: 200 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Docket Sans";
  src: url("assets/dm-sans.ttf") format("truetype");
  font-weight: 100 1000;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Docket Mono";
  src: url("assets/ibm-plex-mono.ttf") format("truetype");
  font-weight: 100 700;
  font-style: normal;
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  --paper:        #ece8df;
  --paper-2:      #e4dfd1;
  --paper-3:      #dcd6c4;
  --ink:          #1b1815;
  --ink-2:        #5c564a;
  --ink-3:        #6f6653;
  --rule:         #cdc6b2;
  --rule-soft:    #d8d1bf;
  --accent:       #8c2a1e;   /* stamp red / oxblood */
  --accent-ink:   #6d2017;

  --st-todo:      #1b1815;
  --st-progress:  #9a5a16;
  --st-blocked:   #8c2a1e;
  --st-done:      #3f5d34;

  --paper-shadow: 0 1px 0 rgba(27,24,21,.04), 0 18px 40px -28px rgba(27,24,21,.45);

  --r-sm: 3px;
  --r-md: 6px;
  --r-lg: 10px;

  --font-display: "Docket Display", "Oswald", "Arial Narrow", sans-serif;
  --font-sans:    "Docket Sans", "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono:    "Docket Mono", "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --ease: cubic-bezier(.22, 1, .36, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-sans);
  background: var(--paper);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.5;
  min-height: 100vh;
  font-feature-settings: "ss01", "cv01";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
/* faint paper grain so the ground reads as material, not a flat fill */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    radial-gradient(circle at 18% 12%, rgba(27,24,21,.018) 0 1px, transparent 1px),
    radial-gradient(circle at 72% 64%, rgba(27,24,21,.014) 0 1px, transparent 1px),
    radial-gradient(circle at 42% 88%, rgba(27,24,21,.016) 0 1px, transparent 1px);
  background-size: 220px 220px, 320px 320px, 180px 180px;
  mix-blend-mode: multiply;
  opacity: .9;
}

button { font: inherit; color: inherit; cursor: pointer; }
input, select, button { font-family: inherit; }
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}

::selection { background: var(--accent); color: var(--paper); }

/* themed scrollbar */
* { scrollbar-color: var(--ink-3) transparent; scrollbar-width: thin; }
::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-thumb { background: var(--paper-3); border: 3px solid var(--paper); border-radius: 20px; }
::-webkit-scrollbar-thumb:hover { background: var(--ink-3); }

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--ink); color: var(--paper);
  padding: 10px 16px; border-radius: var(--r-sm);
  font-family: var(--font-mono); font-size: 13px;
  transition: top .18s var(--ease);
}
.skip-link:focus { top: 12px; }

/* ============================================================
   Masthead
   ============================================================ */
.masthead {
  position: relative; z-index: 2;
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 24px;
  padding: 30px clamp(20px, 4vw, 56px) 22px;
  border-bottom: 2px solid var(--ink);
  background:
    linear-gradient(var(--paper), var(--paper)) padding-box,
    repeating-linear-gradient(90deg, var(--ink) 0 1px, transparent 1px 9px) 0 100%/100% 2px no-repeat;
}
.masthead__brand { display: flex; align-items: center; gap: 16px; }
.mark {
  display: grid; place-items: center;
  width: 54px; height: 54px; flex: none;
  background: var(--ink); color: var(--paper);
  font-family: var(--font-display); font-weight: 700;
  font-size: 34px; letter-spacing: .02em;
  border-radius: var(--r-md);
  box-shadow: 0 8px 18px -8px rgba(27,24,21,.55), 0 1px 0 rgba(27,24,21,.2);
  transform: rotate(-2deg);
}
.wordmark {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(34px, 4.6vw, 52px);
  line-height: .92;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.tagline {
  margin: 6px 0 0;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--ink-2);
  letter-spacing: .14em;
  text-transform: uppercase;
}
.masthead__issue {
  display: flex; flex-direction: column; align-items: flex-end;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-2);
  letter-spacing: .18em;
  text-transform: uppercase;
  text-align: right;
}
.issue-line { border: 1px solid var(--rule); padding: 3px 8px; border-radius: var(--r-sm); }
.issue-date { color: var(--ink-3); }

/* ============================================================
   Board / toolbar
   ============================================================ */
.board {
  position: relative; z-index: 1;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 56px) 60px;
}

.toolbar {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: end;
  gap: 22px;
  padding: 28px 0 18px;
  border-bottom: 1px solid var(--rule);
}
.field-label {
  display: block;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--ink-2);
  margin: 0 0 7px;
}
.search__field {
  position: relative;
  display: flex; align-items: center;
  border-bottom: 2px solid var(--ink);
  padding: 2px 0;
}
.search__icon { color: var(--ink-2); margin-right: 10px; flex: none; }
#search {
  flex: 1; border: 0; background: transparent; outline: none;
  font-size: 18px; color: var(--ink);
  padding: 8px 0 8px 0;
  letter-spacing: -.005em;
}
#search::placeholder { color: var(--ink-3); font-style: italic; }
#search::-webkit-search-cancel-button { -webkit-appearance: none; }

.select-wrap { position: relative; }
#filter {
  appearance: none; -webkit-appearance: none;
  font-family: var(--font-sans); font-size: 15px; font-weight: 500;
  color: var(--ink); background: var(--paper-2);
  border: 1.5px solid var(--ink);
  border-radius: var(--r-sm);
  padding: 9px 38px 9px 14px;
  min-width: 168px;
  transition: background .15s var(--ease);
}
#filter:hover { background: var(--paper-3); }
.select-chev { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--ink); pointer-events: none; }

.result-count {
  margin: 0;
  align-self: end;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--ink-2);
  letter-spacing: .02em;
  white-space: nowrap;
  padding-bottom: 10px;
}
.result-count b { color: var(--ink); font-weight: 700; }

/* ---------- Tally strip ---------- */
.tally {
  display: flex; flex-wrap: wrap; gap: 0;
  margin: 18px 0 6px;
  border: 1px solid var(--ink);
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--paper-2);
}
.tally__btn {
  flex: 1 1 auto;
  display: flex; align-items: baseline; justify-content: center; gap: 10px;
  padding: 11px 14px;
  background: transparent;
  border: 0;
  border-right: 1px solid var(--rule);
  color: var(--ink-2);
  font-family: var(--font-display);
  font-size: 12px; font-weight: 600;
  letter-spacing: .16em; text-transform: uppercase;
  transition: background .14s var(--ease), color .14s var(--ease);
  min-width: 120px;
}
.tally__btn:last-child { border-right: 0; }
.tally__btn:hover { background: var(--paper-3); color: var(--ink); }
.tally__btn[aria-current="true"] {
  background: var(--ink); color: var(--paper);
}
.tally__count {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
}
.tally__dot {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  margin-right: 2px;
  background: currentColor;
  opacity: .85;
}

/* ============================================================
   List
   ============================================================ */
.list-wrap { margin-top: 14px; }
.list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }

.task {
  border-bottom: 1px solid var(--rule);
  position: relative;
}
.task::before {
  /* perforation strip on the left edge, like a tear-off ticket */
  content: "";
  position: absolute; left: 0; top: 0; bottom: 0; width: 14px;
  background-image: radial-gradient(circle at 7px 50%, var(--paper) 0 3px, transparent 3.4px);
  background-size: 14px 22px;
  background-repeat: repeat-y;
  opacity: .0;
}

.task__open {
  display: grid;
  grid-template-columns: 132px 1fr auto;
  align-items: center;
  gap: 22px;
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  padding: 16px 8px 16px 8px;
  color: inherit;
  transition: background .14s var(--ease), padding-left .14s var(--ease);
}
.task:hover .task__open { background: var(--paper-2); }
.task:hover .task__open { padding-left: 14px; }

/* status stamp */
.stamp {
  display: inline-flex; align-items: center; gap: 7px;
  align-self: center;
  font-family: var(--font-display);
  font-size: 12px; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase;
  padding: 6px 11px;
  border: 1.5px solid currentColor;
  border-radius: var(--r-sm);
  white-space: nowrap;
  position: relative;
  background: var(--paper);
}
.stamp::after {
  /* ink-impression texture */
  content: "";
  position: absolute; inset: 0;
  border-radius: inherit;
  background-image:
    radial-gradient(circle at 20% 30%, transparent 0 1.4px, rgba(255,255,255,.5) 1.6px, transparent 2px),
    radial-gradient(circle at 70% 70%, transparent 0 1px, rgba(255,255,255,.4) 1.2px, transparent 1.8px);
  mix-blend-mode: lighten;
  opacity: .5;
  pointer-events: none;
}
.stamp--todo      { color: var(--st-todo); }
.stamp--in-progress { color: var(--st-progress); }
.stamp--blocked   { color: var(--st-blocked); transform: rotate(-2.5deg); }
.stamp--done      { color: var(--st-done); }
.stamp__dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }

/* main text block */
.task__main { min-width: 0; }
.task__title {
  margin: 0;
  font-size: 18.5px; font-weight: 600;
  letter-spacing: -.01em;
  line-height: 1.3;
  color: var(--ink);
  overflow: hidden; text-overflow: ellipsis;
  display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical;
}
.task:hover .task__title { color: var(--accent-ink); }
.task__meta {
  margin-top: 5px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 0 14px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--ink-2);
  letter-spacing: .01em;
}
.task__meta span { display: inline-flex; align-items: center; gap: 6px; }
.task__assignee { color: var(--ink); font-weight: 600; }
.task__project::before, .task__comments::before {
  content: ""; width: 3px; height: 3px; border-radius: 50%; background: var(--ink-3); display: inline-block;
}
.task__tags { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.tag {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink-2);
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: 1px 8px;
  background: var(--paper);
}

/* right meta column */
.task__aside {
  display: flex; align-items: center; gap: 22px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--ink-2);
  text-align: right;
}
.task__due { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.task__due .due-label {
  font-family: var(--font-display); font-size: 10px; letter-spacing: .18em;
  text-transform: uppercase; color: var(--ink-3);
}
.task__due .due-day { color: var(--ink); font-weight: 600; font-size: 13px; }
.task__due--soon .due-day { color: var(--accent); }
.task__due--past .due-day { color: var(--accent); font-weight: 700; }
.task__priority { display: flex; flex-direction: column; align-items: center; gap: 3px; }
.priority-bars { display: flex; gap: 2px; align-items: flex-end; height: 15px; }
.priority-bars i { display: block; width: 5px; background: var(--paper-3); border-radius: 1px; }
.priority-bars i:nth-child(1) { height: 5px; }
.priority-bars i:nth-child(2) { height: 9px; }
.priority-bars i:nth-child(3) { height: 14px; }
.priority--high i { background: var(--accent); }
.priority--medium i:nth-child(-n+2) { background: var(--st-progress); }
.priority--medium i:nth-child(3) { background: var(--paper-3); }
.priority--low i:nth-child(1) { background: var(--ink-3); }
.priority--low i:nth-child(n+2) { background: var(--paper-3); }
.priority-label {
  font-family: var(--font-display); font-size: 9.5px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--ink-3);
}

/* keyboard hint cue */
.task__open::after {
  content: "Open";
  font-family: var(--font-display);
  font-size: 10px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--ink-3);
  align-self: center; justify-self: end;
  opacity: 0; transform: translateX(-6px);
  transition: opacity .14s var(--ease), transform .14s var(--ease);
}
.task:hover .task__open::after,
.task__open:focus-visible::after { opacity: 1; transform: translateX(0); }

/* ============================================================
   Empty state
   ============================================================ */
.empty-state {
  margin: 30px auto 10px;
  max-width: 420px;
  text-align: center;
  padding: 40px 24px;
  border: 1.5px dashed var(--rule);
  border-radius: var(--r-lg);
  background: var(--paper-2);
}
.empty-stamp {
  display: inline-block;
  font-family: var(--font-display); font-weight: 700;
  font-size: 26px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--accent);
  border: 3px solid var(--accent);
  border-radius: var(--r-sm);
  padding: 8px 18px;
  transform: rotate(-4deg);
  margin-bottom: 18px;
  background: var(--paper);
}
.empty-title { margin: 0 0 8px; font-size: 20px; font-weight: 600; }
.empty-body { margin: 0 0 22px; color: var(--ink-2); font-size: 14.5px; }

/* ---------- Buttons ---------- */
.btn {
  font-family: var(--font-sans);
  font-size: 14px; font-weight: 600;
  border-radius: var(--r-sm);
  padding: 10px 18px;
  border: 1.5px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
  transition: transform .1s var(--ease), background .14s var(--ease), color .14s var(--ease), box-shadow .14s var(--ease);
}
.btn:hover { background: var(--paper-3); }
.btn:active { transform: translateY(1px); }
.btn--ink { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.btn--ink:hover { background: var(--accent-ink); border-color: var(--accent-ink); }
.btn--ghost { border-color: var(--rule); background: transparent; color: var(--ink-2); }
.btn--ghost:hover { color: var(--ink); border-color: var(--ink); background: var(--paper-2); }

/* ============================================================
   Detail dialog
   ============================================================ */
.detail-overlay { position: fixed; inset: 0; z-index: 80; }
.detail-backdrop {
  position: absolute; inset: 0;
  background: rgba(27,24,21,.34);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  animation: fade-in .22s var(--ease);
}
.detail {
  position: absolute; top: 0; right: 0; bottom: 0;
  width: min(560px, 100vw);
  margin: 0; padding: 0;
  border: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  box-shadow: var(--paper-shadow);
  border-left: 2px solid var(--ink);
  max-height: 100vh; max-height: 100dvh;
  overflow: hidden;
  animation: slide-in .32s var(--ease);
}
.detail::backdrop { display: none; }
.detail::after {
  /* ticket perforation on the dialog's left edge */
  content: "";
  position: absolute; left: 0; top: 0; bottom: 0; width: 14px;
  background-image: radial-gradient(circle at 7px 50%, var(--paper) 0 3px, transparent 3.4px);
  background-size: 14px 22px;
  background-repeat: repeat-y;
  pointer-events: none;
}
@keyframes slide-in { from { transform: translateX(40px); opacity: .2 } to { transform: translateX(0); opacity: 1 } }
@keyframes fade-in { from { opacity: 0 } to { opacity: 1 } }

.detail__inner {
  height: 100vh; height: 100dvh;
  overflow-y: auto;
  padding: 26px 30px 60px 34px;
  display: flex; flex-direction: column;
  gap: 0;
}

.detail__top {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 16px;
  margin-bottom: 6px;
}
.detail__topmeta {
  display: flex; flex-direction: column; gap: 12px;
  min-width: 0;
}
.detail__id {
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-3);
}
.detail__title {
  margin: 0;
  font-size: clamp(24px, 3.4vw, 30px);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -.015em;
  color: var(--ink);
  word-wrap: break-word;
}
.close-detail {
  flex: none;
  display: grid; place-items: center;
  width: 40px; height: 40px;
  border: 1.5px solid var(--ink);
  border-radius: 50%;
  background: var(--paper);
  color: var(--ink);
  transition: background .14s var(--ease), color .14s var(--ease), transform .12s var(--ease);
}
.close-detail:hover { background: var(--ink); color: var(--paper); }
.close-detail:active { transform: rotate(90deg) scale(.95); }
.close-detail svg { width: 16px; height: 16px; }

.detail__lead {
  margin: 16px 0 0;
  padding: 14px 18px 16px;
  background: var(--paper-2);
  border: 1px solid var(--rule);
  border-radius: var(--r-sm);
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink);
}
.detail__lead .lead-label {
  display: block;
  font-family: var(--font-display); font-size: 10.5px; font-weight: 600;
  letter-spacing: .2em; text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 6px;
}

.detail__meta {
  margin: 22px 0 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
  border-radius: var(--r-sm);
  overflow: hidden;
}
.meta-cell { background: var(--paper); padding: 12px 14px; }
.meta-cell .meta-label {
  display: block;
  font-family: var(--font-display); font-size: 10.5px; font-weight: 600;
  letter-spacing: .2em; text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 5px;
}
.meta-cell .meta-value {
  font-family: var(--font-mono); font-size: 13px; font-weight: 500;
  color: var(--ink);
  letter-spacing: .01em;
}
.meta-cell--full { grid-column: 1 / -1; }
.meta-tags { display: flex; flex-wrap: wrap; gap: 6px; }

.detail__body {
  margin: 22px 0 0;
  border-top: 1px solid var(--rule);
  padding-top: 18px;
}
.detail__body h2 {
  font-family: var(--font-display); font-size: 12px; font-weight: 600;
  letter-spacing: .2em; text-transform: uppercase;
  color: var(--ink-2);
  margin: 0 0 10px;
}
.detail__body p {
  margin: 0 0 12px;
  font-size: 15.5px; line-height: 1.62;
  color: var(--ink);
  white-space: pre-line;
}

/* status control block */
.status-block {
  margin: 26px 0 0;
  padding: 18px;
  background: var(--ink);
  color: var(--paper);
  border-radius: var(--r-md);
  position: relative;
  overflow: hidden;
}
.status-block::before {
  content: "";
  position: absolute; inset: 0;
  background-image: repeating-linear-gradient(135deg, rgba(236,232,223,.05) 0 2px, transparent 2px 12px);
  pointer-events: none;
}
.status-block .block-label {
  display: block;
  font-family: var(--font-display); font-size: 11px; font-weight: 600;
  letter-spacing: .22em; text-transform: uppercase;
  color: var(--paper-3);
  margin-bottom: 10px;
}
.status-row { display: flex; gap: 12px; align-items: stretch; position: relative; }
#status-control {
  flex: 1;
  appearance: none; -webkit-appearance: none;
  font-family: var(--font-sans); font-size: 15px; font-weight: 600;
  color: var(--ink);
  background: var(--paper);
  border: 1.5px solid var(--paper);
  border-radius: var(--r-sm);
  padding: 11px 40px 11px 14px;
}
#status-control:hover { background: var(--paper-2); }
.status-block .select-chev { color: var(--ink); right: 14px; }

.status-feedback {
  margin-top: 12px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--paper);
  letter-spacing: .02em;
  min-height: 18px;
  display: flex; align-items: center; gap: 8px;
  position: relative;
}
.status-feedback::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%;
  background: var(--paper-3);
}
.status-feedback.is-set::before { background: #6fae6f; box-shadow: 0 0 0 3px rgba(111,174,111,.25); }
.status-feedback b { color: var(--paper); font-weight: 700; }

.detail__comments {
  margin: 18px 0 0;
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-mono); font-size: 12.5px;
  color: var(--ink-2);
  border-top: 1px solid var(--rule);
  padding-top: 16px;
}
.detail__comments .cmt-count {
  font-weight: 700; color: var(--ink);
  font-variant-numeric: tabular-nums;
}

/* ============================================================
   Toast
   ============================================================ */
.toast {
  position: fixed; left: 50%; bottom: 28px;
  transform: translateX(-50%) translateY(20px);
  z-index: 120;
  background: var(--ink); color: var(--paper);
  font-family: var(--font-mono); font-size: 13px;
  letter-spacing: .02em;
  padding: 12px 18px;
  border-radius: var(--r-md);
  border: 1px solid var(--accent);
  box-shadow: 0 12px 30px -12px rgba(27,24,21,.6);
  opacity: 0;
  transition: opacity .25s var(--ease), transform .25s var(--ease);
  display: flex; align-items: center; gap: 10px;
  pointer-events: none;
  max-width: 90vw;
}
.toast:not([hidden]) { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%;
  background: #6fae6f; flex: none;
}

/* ============================================================
   Colophon
   ============================================================ */
.colophon {
  position: relative; z-index: 1;
  max-width: 1180px;
  margin: 0 auto;
  padding: 22px clamp(20px, 4vw, 56px) 40px;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px;
  border-top: 1px solid var(--rule);
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--ink-3);
  letter-spacing: .04em;
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 860px) {
  .masthead { padding: 22px 18px 18px; }
  .masthead__issue { display: none; }
  .board { padding: 0 18px 48px; }

  .toolbar {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 20px 0 14px;
  }
  .filter, .search { width: 100%; }
  #filter { width: 100%; min-width: 0; }
  .result-count { padding-bottom: 0; }

  .tally { gap: 0; }
  .tally__btn { flex: 1 1 33%; min-width: 0; padding: 10px 6px; font-size: 11px; gap: 6px; }

  .task__open {
    grid-template-columns: 1fr;
    grid-template-areas:
      "stamp"
      "title"
      "meta"
      "aside";
    gap: 8px;
    padding: 14px 6px;
  }
  .task:hover .task__open { padding-left: 12px; }
  .task__open::after { display: none; }
  .stamp { grid-area: stamp; justify-self: start; }
  .task__main { grid-area: title; }
  .task__meta { grid-area: meta; }
  .task__aside { grid-area: aside; justify-content: flex-start; gap: 18px; text-align: left; }
  .task__due { align-items: flex-start; }

  .detail { width: 100vw; border-left: 0; }
  .detail__inner { padding: 22px 20px 48px 24px; }
  .detail__meta { grid-template-columns: 1fr; }
  .status-row { flex-direction: column; }
  #status-control { width: 100%; }
}

@media (max-width: 480px) {
  .wordmark { font-size: 32px; }
  .mark { width: 44px; height: 44px; font-size: 26px; }
  .task__title { font-size: 16.5px; -webkit-line-clamp: 2; }
  .task__meta { font-size: 11.5px; gap: 0 10px; }
  .task__aside { font-size: 11.5px; }
}

/* reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  .detail { animation: none; }
  .detail-backdrop { animation: none; }
}
