/* ============================================================
   DEPT. OF UNFINISHED BUSINESS
   A bureaucratic paper office for a team task registry.
   Desk = green linoleum. Tasks = forms in an in-tray.
   Status changes = rubber stamps slammed onto paper.
   ============================================================ */

@font-face {
  font-family: "IBM Plex Mono";
  src: url("assets/ibm-plex-mono.ttf") format("truetype");
  font-weight: 100 700;
  font-display: swap;
}
@font-face {
  font-family: "DM Serif Display";
  src: url("assets/dm-serif.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Oswald";
  src: url("assets/oswald.ttf") format("truetype");
  font-weight: 200 700;
  font-display: swap;
}

:root {
  --desk: #41503b;
  --desk-deep: #333f2e;
  --paper: #f4eeda;
  --paper-dim: #ece4c9;
  --manila: #e4cf9c;
  --card-edge: #d6c9a4;
  --ink: #2b2417;
  --ink-soft: #6a5d41;
  --todo: #2f5d9e;
  --prog: #b4641a;
  --blocked: #b02a26;
  --done: #2e7d4f;
  --focus: #ffd23f;
  --shadow-hard: rgba(18, 24, 12, 0.45);
}

* { box-sizing: border-box; }

html { height: 100%; }

body {
  margin: 0;
  min-height: 100%;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink);
  background:
    radial-gradient(1200px 700px at 20% -10%, rgba(255, 246, 214, 0.10), transparent 60%),
    radial-gradient(900px 600px at 110% 110%, rgba(0, 0, 0, 0.22), transparent 55%),
    linear-gradient(160deg, var(--desk) 0%, var(--desk-deep) 100%);
  background-attachment: fixed;
  /* faint desk-lamp grain */
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 0.02 0 0 0 0 0.03 0 0 0 0 0.01 0 0 0 0.05 0'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E"),
    radial-gradient(1200px 700px at 20% -10%, rgba(255, 246, 214, 0.10), transparent 60%),
    linear-gradient(160deg, var(--desk) 0%, var(--desk-deep) 100%);
}

.svg-defs { position: absolute; }

h1, h2, h3 { margin: 0; }
p { margin: 0; }
ul { margin: 0; padding: 0; }

/* ---------- visible keyboard focus everywhere ---------- */
:focus-visible {
  outline: 3px dashed var(--focus);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ============================================================
   MASTHEAD — letterhead card
   ============================================================ */
.masthead {
  padding: 22px clamp(14px, 3vw, 40px) 8px;
}

.masthead-card {
  max-width: 1280px;
  margin: 0 auto;
  background: var(--paper);
  border: 2px solid var(--ink);
  outline: 1px solid var(--ink);
  outline-offset: 4px;
  padding: 18px clamp(16px, 3vw, 34px);
  display: flex;
  align-items: center;
  gap: clamp(12px, 2.5vw, 28px);
  box-shadow: 4px 5px 0 var(--shadow-hard);
  position: relative;
}

/* perforated bottom edge of the letterhead */
.masthead-card::after {
  content: "";
  position: absolute;
  left: 10px; right: 10px; bottom: -8px;
  border-bottom: 2px dashed rgba(43, 36, 23, 0.5);
}

.seal {
  flex: 0 0 auto;
  color: var(--blocked);
  opacity: 0.85;
  transform: rotate(-6deg);
  filter: url(#ink-rough);
}
.seal svg { display: block; }

.masthead-text { flex: 1 1 auto; min-width: 0; }

.masthead-kicker {
  font-size: 11px;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 2px;
}

.masthead h1 {
  font-family: "DM Serif Display", Georgia, serif;
  font-size: clamp(24px, 3.4vw, 40px);
  font-weight: 400;
  letter-spacing: 0.01em;
  line-height: 1.08;
}

.masthead-sub {
  margin-top: 6px;
  font-size: 12.5px;
  color: var(--ink-soft);
}
.masthead-note { font-style: italic; }

.masthead-side {
  flex: 0 0 auto;
  text-align: right;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}
.masthead-received { font-size: 11.5px; color: var(--ink-soft); letter-spacing: 0.08em; }

/* ============================================================
   RUBBER STAMPS
   ============================================================ */
.stamp {
  display: inline-block;
  font-family: "Oswald", sans-serif;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 12.5px;
  line-height: 1.15;
  padding: 2px 9px;
  border: 2px solid currentColor;
  border-radius: 3px;
  outline: 1px solid currentColor;
  outline-offset: 2px;
  filter: url(#ink-rough);
  transform: rotate(-2deg);
  white-space: nowrap;
}

.st-todo     { color: var(--todo); }
.st-in-progress { color: var(--prog); }
.st-blocked  { color: var(--blocked); }
.st-done     { color: var(--done); }

.mast-open { color: var(--done); font-size: 13px; transform: rotate(2deg); }

.stamp-xl {
  font-size: clamp(20px, 2.6vw, 30px);
  border-width: 3px;
  padding: 5px 16px;
  transform: rotate(-8deg);
}

/* ============================================================
   DESK LAYOUT — organizer rail + in-tray
   ============================================================ */
.desk {
  max-width: 1280px;
  margin: 18px auto 60px;
  padding: 0 clamp(14px, 3vw, 40px);
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: clamp(16px, 2.5vw, 30px);
  align-items: start;
}

/* ---------- organizer rail: a desk-side sorting block ---------- */
.organizer {
  position: relative;
  background: var(--paper-dim);
  border: 1.5px solid var(--ink);
  box-shadow: 3px 4px 0 var(--shadow-hard);
  padding: 18px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  position: sticky;
  top: 14px;
}
/* punched holes down the left, like a clipboard page */
.organizer::before,
.organizer::after {
  content: "";
  position: absolute;
  left: 8px;
  width: 11px; height: 11px;
  border-radius: 50%;
  background: var(--desk-deep);
  box-shadow: inset 1px 1.5px 2px rgba(0,0,0,0.55);
}
.organizer::before { top: 26px; }
.organizer::after  { bottom: 26px; }

.field label {
  display: block;
  font-family: "Oswald", sans-serif;
  font-weight: 500;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--ink-soft);
  margin-bottom: 6px;
}

.field input,
.field select {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: #fbf7ea;
  border: 1.5px solid var(--ink);
  border-radius: 0;
  padding: 9px 10px;
  box-shadow: 2px 2.5px 0 rgba(43, 36, 23, 0.25);
}

.field input::placeholder { color: #a4977a; }

.field input[type="search"] {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Ccircle cx='8.5' cy='8.5' r='5.6' fill='none' stroke='%232b2417' stroke-width='2'/%3E%3Cpath d='M13 13l5 5' stroke='%232b2417' stroke-width='2'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 9px center;
  background-size: 15px;
  padding-left: 32px;
}

.field select {
  appearance: none;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 9'%3E%3Cpath d='M1 1l6 6 6-6' fill='none' stroke='%232b2417' stroke-width='2'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 12px;
  padding-right: 32px;
}

.hint { margin-top: 5px; font-size: 11px; color: var(--ink-soft); }

/* ---------- counts: quick status sort buttons ---------- */
.counts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.count-btn {
  font: inherit;
  font-size: 12px;
  text-align: left;
  color: var(--ink);
  background: #fbf7ea;
  border: 1.5px solid var(--ink);
  border-radius: 0;
  padding: 7px 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 7px;
  box-shadow: 2px 2.5px 0 rgba(43, 36, 23, 0.25);
}
.count-btn b { margin-left: auto; font-weight: 700; }
.count-btn[aria-pressed="true"], .count-btn:active {
  transform: translate(1px, 1px);
  box-shadow: 1px 1px 0 rgba(43,36,23,0.25);
  background: var(--manila);
}

.dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  border: 1.5px solid var(--ink);
  flex: 0 0 auto;
}
.dot-todo { background: var(--todo); }
.dot-prog { background: var(--prog); }
.dot-blocked { background: var(--blocked); }
.dot-done { background: var(--done); }

/* ---------- memo note ---------- */
.memo {
  background: var(--manila);
  border: 1.5px solid var(--ink);
  padding: 10px 12px;
  font-size: 11.5px;
  transform: rotate(-0.7deg);
  box-shadow: 2px 2.5px 0 rgba(43, 36, 23, 0.3);
}
.memo p { text-transform: uppercase; letter-spacing: 0.05em; }

/* ============================================================
   IN-TRAY
   ============================================================ */
.tray {
  position: relative;
  background: linear-gradient(180deg, #59654c 0%, #4a5740 100%);
  border: 2px solid #232b1d;
  border-radius: 4px;
  padding: clamp(12px, 2vw, 22px);
  box-shadow:
    inset 0 6px 14px rgba(0, 0, 0, 0.35),
    inset 0 -2px 4px rgba(255, 255, 255, 0.06),
    4px 6px 0 var(--shadow-hard);
  min-height: 420px;
}

.tray-rim {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px 14px;
  border-bottom: 2px dashed rgba(244, 238, 218, 0.35);
  padding: 4px 2px 12px;
  margin-bottom: clamp(12px, 2vw, 20px);
}

.tray-label {
  font-family: "Oswald", sans-serif;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  font-size: 17px;
  color: var(--paper);
}
/* little tray tab */
.tray-label::before {
  content: "";
  display: inline-block;
  width: 10px; height: 10px;
  background: var(--manila);
  border: 1.5px solid var(--ink);
  margin-right: 10px;
  transform: rotate(45deg) translateY(-1px);
}

.tray-count { font-size: 12.5px; color: rgba(244, 238, 218, 0.85); }
.tray-count b { color: var(--focus); font-size: 14px; }

/* ---------- slips (the forms themselves) ---------- */
.slips {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(255px, 1fr));
  gap: clamp(14px, 1.8vw, 22px);
}

.slip {
  position: relative;
  background:
    repeating-linear-gradient(transparent 0 27px, rgba(43, 36, 23, 0.055) 27px 28px),
    linear-gradient(180deg, #f9f4e4 0%, var(--paper) 70%);
  border: 1px solid var(--card-edge);
  border-top: 2px solid #cbbd95;
  padding: 14px 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transform: rotate(var(--tilt, 0deg));
  box-shadow: 2px 3px 0 rgba(0, 0, 0, 0.30), 5px 9px 14px rgba(0, 0, 0, 0.22);
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}
.slip:hover, .slip:focus-within {
  transform: rotate(var(--tilt, 0deg)) translateY(-4px);
  box-shadow: 3px 5px 0 rgba(0, 0, 0, 0.32), 8px 15px 20px rgba(0, 0, 0, 0.28);
  z-index: 2;
}

/* staple in the top-left corner */
.slip::before {
  content: "";
  position: absolute;
  top: -5px; left: 14px;
  width: 22px; height: 7px;
  border: 2.5px solid #9a958a;
  border-bottom: none;
  border-radius: 6px 6px 0 0;
  transform: rotate(-4deg);
  opacity: 0.9;
}

.slip-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 30px;
}
.slip .stamp { flex: 0 0 auto; }

.slip-no {
  font-size: 11px;
  color: var(--ink-soft);
  letter-spacing: 0.1em;
  transform: rotate(1deg);
}

.slip-title {
  font-family: "DM Serif Display", Georgia, serif;
  font-size: 19px;
  line-height: 1.2;
  font-weight: 400;
  color: var(--ink);
}

.slip-meta { font-size: 12px; color: var(--ink-soft); }

.slip-sub { font-size: 11.5px; color: var(--ink-soft); }

.slip-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.tag {
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px dashed var(--ink-soft);
  color: var(--ink-soft);
  padding: 1px 6px;
  border-radius: 2px;
}

.slip-barcode {
  align-self: flex-end;
  opacity: 0.55;
  margin-top: 2px;
}

.open-btn {
  margin-top: auto;
  align-self: flex-start;
  font-family: "Oswald", sans-serif;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--paper);
  background: var(--ink);
  border: 1.5px solid var(--ink);
  border-radius: 0;
  padding: 7px 12px 7px 10px;
  cursor: pointer;
  box-shadow: 2.5px 3px 0 rgba(43, 36, 23, 0.4);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.open-btn::before { content: "▸ "; }
.open-btn:hover { background: #443a26; }
.open-btn:active { transform: translate(2px, 2px); box-shadow: 0 0 0 rgba(0,0,0,0); }

/* red thread across blocked forms */
.slip.held .thread {
  position: absolute;
  top: 8px; left: -6px; right: -6px;
  height: 2px;
  background: var(--blocked);
  transform: rotate(-4deg);
  opacity: 0.8;
  pointer-events: none;
  box-shadow: 0 1px 0 rgba(0,0,0,0.2);
}

/* corner stamps for held / filed forms */
.corner-stamp {
  position: absolute;
  right: 10px; bottom: 40px;
  font-family: "Oswald", sans-serif;
  font-weight: 700;
  font-size: 21px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  border: 3px solid currentColor;
  border-radius: 3px;
  padding: 1px 8px;
  transform: rotate(-14deg);
  filter: url(#ink-rough);
  opacity: 0.62;
  pointer-events: none;
}
.corner-stamp.held { color: var(--blocked); }
.corner-stamp.filed { color: var(--done); right: auto; left: 10px; bottom: 46px; transform: rotate(-4deg); }

/* filed (done) forms fade into the archive */
.slip.filed { filter: saturate(0.72); }
.slip.filed .slip-title { color: #5c5443; }

/* ---------- empty state: an empty tray ---------- */
.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
  padding: 44px 18px 50px;
  border: 2px dashed rgba(244, 238, 218, 0.45);
  margin: 6px 2px;
}
.empty-hole {
  width: 120px; height: 16px;
  background: rgba(0, 0, 0, 0.35);
  border-radius: 50%;
  box-shadow: inset 0 4px 8px rgba(0,0,0,0.6), 0 1px 0 rgba(255,255,255,0.08);
}
.empty .stamp { transform: rotate(-4deg); font-size: 15px; }
.empty-stamp { color: var(--blocked); }
.empty-text { color: rgba(244, 238, 218, 0.85); max-width: 380px; }
.empty[hidden] { display: none; }
.empty-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }

.empty-actions button {
  font: inherit;
  font-size: 12.5px;
  color: var(--ink);
  background: var(--paper);
  border: 1.5px solid var(--ink);
  border-radius: 0;
  padding: 9px 14px;
  cursor: pointer;
  box-shadow: 2.5px 3px 0 rgba(0, 0, 0, 0.35);
}
.empty-actions button:hover { background: var(--manila); }
.empty-actions button:active { transform: translate(2px, 2px); box-shadow: none; }

/* ============================================================
   DETAIL — the dossier pulled from the drawer
   ============================================================ */
.backdrop {
  position: fixed;
  inset: 0;
  background: rgba(16, 22, 12, 0.55);
  z-index: 40;
  animation: fade-in 0.18s ease both;
}

.detail {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: min(560px, 100%);
  z-index: 50;
  padding: clamp(8px, 1.6vw, 22px) clamp(8px, 1.6vw, 22px) clamp(8px, 1.6vw, 22px) 0;
  display: flex;
  justify-content: flex-end;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.detail-inner {
  width: 100%;
  background:
    repeating-linear-gradient(transparent 0 27px, rgba(43, 36, 23, 0.05) 27px 28px),
    linear-gradient(180deg, #f9f4e4 0%, var(--paper) 80%);
  border: 1.5px solid var(--ink);
  box-shadow: -6px 8px 0 var(--shadow-hard);
  padding: 40px clamp(16px, 3vw, 30px) 26px;
  position: relative;
  animation: drawer-in 0.28s cubic-bezier(0.2, 0.9, 0.25, 1.05) both;
}

/* clipboard clip at the top of the dossier */
.clip {
  position: absolute;
  top: -12px; left: 50%;
  transform: translateX(-50%);
  width: 120px; height: 30px;
  background: linear-gradient(180deg, #b9b3a4, #7d7869);
  border: 1.5px solid var(--ink);
  border-radius: 4px 4px 12px 12px;
  box-shadow: 0 3px 5px rgba(0,0,0,0.3);
}
.clip::after {
  content: "";
  position: absolute;
  left: 50%; bottom: 5px;
  transform: translateX(-50%);
  width: 46px; height: 10px;
  border-radius: 8px;
  background: #5c5748;
  box-shadow: inset 0 2px 3px rgba(0,0,0,0.5);
}

.detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 2px dashed rgba(43, 36, 23, 0.35);
  padding-bottom: 10px;
  margin-bottom: 14px;
}

.detail-no {
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--ink-soft);
  text-transform: uppercase;
}

.close-btn {
  font-family: "Oswald", sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--paper);
  background: var(--blocked);
  border: 1.5px solid var(--ink);
  border-radius: 0;
  padding: 6px 11px;
  cursor: pointer;
  box-shadow: 2px 2.5px 0 rgba(43, 36, 23, 0.4);
}
.close-btn:active { transform: translate(2px, 2px); box-shadow: none; }

.detail-chip-row {
  display: flex;
  justify-content: center;
  margin: 4px 0 10px;
}

.detail-title {
  font-family: "DM Serif Display", Georgia, serif;
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 400;
  line-height: 1.14;
  text-align: center;
  margin-bottom: 16px;
}

.detail-meta {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 16px;
  font-size: 12.5px;
  border-top: 1.5px solid var(--ink);
  border-bottom: 1.5px solid var(--ink);
  padding: 10px 2px;
  margin-bottom: 18px;
}
.detail-meta dt {
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 10.5px;
  font-family: "Oswald", sans-serif;
  padding-top: 2px;
  white-space: nowrap;
}
.detail-meta dd { margin: 0; }

.detail-body p { margin-bottom: 1em; }
.detail-body p:last-child { margin-bottom: 0; }

/* ---------- stamp desk: the status-control area ---------- */
.status-area {
  margin-top: 20px;
  border: 2px solid var(--ink);
  background: var(--manila);
  padding: 16px 14px 18px;
  text-align: center;
  box-shadow: 3px 4px 0 rgba(43, 36, 23, 0.3);
  position: relative;
}
.status-area::before {
  content: "STAMP DESK";
  position: absolute;
  top: -10px; left: 12px;
  font-family: "Oswald", sans-serif;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.3em;
  background: var(--manila);
  color: var(--ink-soft);
  padding: 0 7px;
}

.status-label {
  display: block;
  font-family: "Oswald", sans-serif;
  font-weight: 500;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--ink-soft);
  margin-bottom: 6px;
}

.status-select {
  font: inherit;
  font-size: 14px;
  color: var(--ink);
  background: #fbf7ea;
  border: 1.5px solid var(--ink);
  border-radius: 0;
  padding: 9px 34px 9px 12px;
  cursor: pointer;
  appearance: none;
  width: min(280px, 100%);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 9'%3E%3Cpath d='M1 1l6 6 6-6' fill='none' stroke='%232b2417' stroke-width='2'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 12px;
  box-shadow: 2px 2.5px 0 rgba(43, 36, 23, 0.3);
}

.slam-zone {
  margin-top: 16px;
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.slam-zone .stamp-xl { display: inline-block; }

@keyframes stamp-slam {
  0%   { opacity: 0; transform: rotate(-14deg) scale(2.7); }
  55%  { opacity: 1; transform: rotate(-8deg) scale(0.92); }
  75%  { transform: rotate(-8deg) scale(1.06); }
  100% { opacity: 1; transform: rotate(-8deg) scale(1); }
}
.slam { animation: stamp-slam 0.34s cubic-bezier(0.25, 0.9, 0.3, 1.2) both; }

/* ink ring that bursts around the slam */
.slam-ring {
  position: absolute;
  left: 50%; top: 50%;
  width: 130px; height: 60px;
  margin: -30px 0 0 -65px;
  border: 3px solid currentColor;
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
}
.slam-ring.burst { animation: ring-burst 0.5s ease-out both; }
@keyframes ring-burst {
  0% { opacity: 0.55; transform: scale(0.5) rotate(-6deg); }
  100% { opacity: 0; transform: scale(1.9) rotate(-10deg); }
}

.return-btn {
  display: block;
  margin: 20px auto 2px;
  font-family: "Oswald", sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--paper);
  background: var(--ink);
  border: 1.5px solid var(--ink);
  border-radius: 0;
  padding: 10px 18px;
  cursor: pointer;
  box-shadow: 2.5px 3px 0 rgba(43, 36, 23, 0.4);
}
.return-btn:active { transform: translate(2px, 2px); box-shadow: none; }

/* ============================================================
   CC SLIP TOAST — dot-matrix carbon copy
   ============================================================ */
.cc-toast {
  position: fixed;
  top: 12px;
  left: 50%;
  z-index: 80;
  transform: translate(-50%, -160%);
  max-width: min(560px, calc(100vw - 24px));
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--paper);
  border: 1.5px solid var(--ink);
  padding: 10px 16px 10px 12px;
  font-size: 12.5px;
  box-shadow: 3px 4px 0 var(--shadow-hard);
  transition: transform 0.28s cubic-bezier(0.2, 0.9, 0.3, 1.1);
  position: relative;
}
/* perforated tear line at the top of the carbon slip */
.cc-toast::before {
  content: "";
  position: absolute;
  top: -8px; left: 10px; right: 10px;
  height: 8px;
  background: radial-gradient(circle at 4px 4px, transparent 0 3px, var(--paper) 3.2px) repeat-x;
  background-size: 10px 8px;
  filter: drop-shadow(0 -1px 0 rgba(43, 36, 23, 0.4));
}
.cc-toast.show { transform: translate(-50%, 0); }

.cc-perf {
  font-family: "Oswald", sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--ink);
  background: var(--manila);
  border: 1.5px solid var(--ink);
  padding: 3px 7px;
  transform: rotate(-2deg);
  flex: 0 0 auto;
}

/* ============================================================
   ANIMATIONS (definitions + reduced motion)
   ============================================================ */
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes drawer-in {
  from { transform: translateX(70px); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ============================================================
   MOBILE
   ============================================================ */
@media (max-width: 880px) {
  .desk { grid-template-columns: 1fr; margin-top: 12px; }
  .organizer { position: static; flex-direction: column; }
  .counts { grid-template-columns: repeat(2, 1fr); }
  .masthead-card { flex-wrap: wrap; }
  .masthead-side { flex-direction: row; align-items: center; gap: 12px; margin-left: auto; }
  .masthead-card::after { display: none; }
  .slips { grid-template-columns: 1fr; }
  .slip { transform: none !important; }
  .slip:hover, .slip:focus-within { transform: translateY(-3px) !important; }
  .detail {
    left: 0; padding: 0;
    width: 100%;
  }
  .detail-inner { border-left: none; border-right: none; }
  .detail-meta { grid-template-columns: 1fr; gap: 2px 0; }
  .detail-meta dt { padding-top: 8px; }
  .detail-meta dt::after { content: ":"; }
}
