:root {
  --desk: #2a2622;
  --manila: #d9c496;
  --manila-2: #cbb383;
  --paper: #f7f2e4;
  --paper-2: #efe8d4;
  --ink: #26221c;
  --ink-2: #3a342b;
  --ink-3: #5a5143;
  --rule: #a99d84;
  --red: #b3261e;
  --type: "Courier Prime", "Courier New", ui-monospace, monospace;
  --flip: 900ms;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: #3b2616 url(img/desk.jpg) center top / 2400px auto repeat;
  color: var(--ink);
  font-family: var(--type);
  font-size: 18px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--red); }
::selection { background: var(--ink); color: var(--paper); }
.red { color: var(--red); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- desk ---------- */
/* ---------- folder ---------- */
.desk { position: relative; z-index: 1; padding: 56px 20px 90px; }
.folder { max-width: 1100px; margin: 0 auto; }
.folder { position: relative; }
.folder__tab {
  position: relative; display: inline-block; padding: 10px 26px 8px; border-radius: 9px 9px 0 0;
  background: url(img/paper.png), linear-gradient(180deg, #e3cf9f, #d9c496);
  font-size: 15px; color: #3b3222;
  box-shadow: 0 -1px 0 rgba(255, 255, 255, 0.35) inset, -2px -2px 10px rgba(0, 0, 0, 0.25);
}
.tab-label {
  display: inline-block; padding: 5px 12px 3px; transform: rotate(-0.7deg);
  font-family: "Special Elite", var(--type); font-size: 14px; letter-spacing: 0.08em; color: #1f1a14;
  background: url(img/paper-tile.jpg) 30px 60px / 640px, #f3ecdc;
  box-shadow: 0 0 0 1px rgba(120, 100, 60, 0.18), 0 1px 1.5px rgba(60, 40, 10, 0.35);
  text-shadow: 0 0 0.6px rgba(35, 28, 18, 0.45);
  filter: url(#ribbon);
}
/* the folder: card stock with a little thickness, lying on the desk */
.folder__cover {
  position: relative; padding: 22px 22px 26px; border-radius: 0 9px 7px 7px;
  background:
    url(img/paper.png),
    linear-gradient(180deg, rgba(255, 245, 215, 0.35), rgba(0, 0, 0, 0) 30%, rgba(0, 0, 0, 0.06)),
    var(--manila);
  box-shadow:
    inset 0 0 0 1px rgba(120, 95, 50, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.4),
    0 1px 0 #b9a16f, 0 2px 0 #a88f5d, 0 3px 0 #9b8352,
    0 4px 4px rgba(0, 0, 0, 0.35),
    0 24px 40px rgba(0, 0, 0, 0.4),
    0 60px 110px rgba(0, 0, 0, 0.35);
}
/* the back half of the folder peeking out under the front */
.folder__cover::before {
  content: ""; position: absolute; z-index: -1; left: 6px; right: -7px; top: 10px; bottom: -8px;
  border-radius: 7px; background: linear-gradient(180deg, #ccb482, #bea671);
  box-shadow: 0 1px 0 #a48b59, 0 3px 6px rgba(0, 0, 0, 0.45), 0 20px 40px rgba(0, 0, 0, 0.3);
}

/* ---------- book + page turn ---------- */
.book { display: grid; grid-template-columns: minmax(0, 1fr); position: relative; perspective: 3600px; }
/* the stack of sheets under the top page: a few edges, not quite square */
.book::before, .book::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: url(img/paper.png), #efe7d2;
}
.book::before {
  z-index: -2; transform: translate(3px, 5px) rotate(0.35deg);
  box-shadow: 0 1px 2px rgba(60, 40, 10, 0.35);
}
.book::after {
  z-index: -3; transform: translate(-2px, 9px) rotate(-0.45deg); background-color: #e9e0c8;
  box-shadow: 0 1px 2px rgba(60, 40, 10, 0.35), 4px 5px 0 -1px #e4dac0, 4px 6px 2px -1px rgba(60, 40, 10, 0.3);
}
.leaf { grid-area: 1 / 1; position: relative; min-width: 0; }
.leaf[hidden] { display: none; }
.face--back { display: none; }
.leaf.is-under { z-index: 1; }
.leaf.is-ghost { visibility: hidden; }

/* the page being turned: clones of the page cut into hinged strips */
.turner { position: absolute; top: 0; left: 0; z-index: 3; transform-style: preserve-3d; pointer-events: none; }
.turner.is-behind { z-index: -5; }
.strip { position: absolute; left: 0; transform-origin: 50% 0; transform-style: preserve-3d; will-change: transform; }
.strip__face {
  position: absolute; inset: 0; overflow: hidden;
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
}
.strip__face > .face--front { position: absolute; top: 0; }
.turner .strip__face--back { position: absolute; inset: 0; transform: rotateX(180deg); padding: 0; box-shadow: none; }
.strip__shade { position: absolute; inset: 0; pointer-events: none; }
.strip__shade b { position: absolute; inset: 0; opacity: 0; will-change: opacity; background: rgb(40, 30, 15); }
.strip__shade b.dn { background: linear-gradient(180deg, rgba(40, 30, 15, 0), rgb(40, 30, 15)); }
.strip__shade b.up { background: linear-gradient(0deg, rgba(40, 30, 15, 0), rgb(40, 30, 15)); }
.under-shadow { position: absolute; inset: 0; z-index: 2; pointer-events: none; overflow: hidden; opacity: 0; will-change: opacity; }
.under-shadow b {
  position: absolute; left: 0; right: 0; top: 0; height: 300px; transform-origin: 0 0; will-change: transform;
  background: linear-gradient(180deg, rgba(30, 20, 8, 0) 0, rgba(30, 20, 8, 0.34) 4px, rgba(30, 20, 8, 0) 100%);
}
.turner x-c { -webkit-mask-image: none !important; mask-image: none !important; }

/* ---------- sheet ---------- */
.sheet {
  position: relative; padding: 52px 60px 56px;
  background: url(img/paper-tile.jpg) 0 0 / 640px, #f3ecdc;
  box-shadow: 0 0 0 1px rgba(120, 100, 60, 0.12), 0 1px 2px rgba(60, 40, 10, 0.3), 0 3px 8px rgba(60, 40, 10, 0.12);
}
/* age: yellowed edges, a fold crease a third of the way down */
.sheet::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background:
    linear-gradient(180deg, rgba(0,0,0,0) calc(34% - 14px), rgba(120,90,40,0.05) calc(34% - 1px), rgba(255,255,255,0.55) 34%, rgba(110,85,40,0.10) calc(34% + 1px), rgba(0,0,0,0) calc(34% + 16px)),
    radial-gradient(ellipse 75% 70% at 50% 45%, rgba(0,0,0,0) 60%, rgba(160,118,48,0.13) 100%),
    linear-gradient(90deg, rgba(150,110,40,0.06), rgba(0,0,0,0) 3%, rgba(0,0,0,0) 97%, rgba(150,110,40,0.07));
}
.sheet--blank::before { background: radial-gradient(ellipse 75% 70% at 50% 45%, rgba(0,0,0,0) 60%, rgba(160,118,48,0.13) 100%); }
.sheet > * { position: relative; }
.sheet--blank { min-height: 100%; }
.clip {
  position: absolute !important; top: -26px; left: 30px; width: 26px; height: 74px; z-index: 2;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 92'%3E%3Cdefs%3E%3ClinearGradient id='m' x1='0' x2='1'%3E%3Cstop offset='0' stop-color='%23767b82'/%3E%3Cstop offset='.45' stop-color='%23e9ecef'/%3E%3Cstop offset='1' stop-color='%23878c93'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath d='M9 66V16a6 6 0 0 1 12 0v58a9 9 0 0 1-18 0V12a12 12 0 0 1 24 0v52' fill='none' stroke='url(%23m)' stroke-width='3' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat center / contain;
  filter: drop-shadow(1px 2px 1.5px rgba(40, 25, 5, 0.45));
}
.topline { display: flex; justify-content: space-between; gap: 16px; font-size: 15px; color: var(--ink-3); letter-spacing: 0.04em; }

/* ---------- hero ---------- */
.hero { display: grid; grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr); gap: 28px; align-items: center; margin-top: 30px; }
h1 { font-weight: 700; font-size: clamp(44px, 6vw, 68px); line-height: 1; letter-spacing: -0.03em; margin: 0; }
.dek { font-size: 19px; color: var(--ink-2); margin: 18px 0 0; max-width: 28em; }
.search { margin-top: 30px; display: flex; align-items: stretch; border-bottom: 2px solid var(--ink); max-width: 480px; }
.search__at { font-size: 22px; padding: 8px 4px 8px 0; color: var(--ink-3); }
.search input {
  flex: 1; min-width: 0; border: 0; background: transparent; font: 22px var(--type); color: var(--ink);
  padding: 8px 0; outline: none;
}
.search input::placeholder { color: #a39985; }
.search button {
  border: 0; background: var(--ink); color: var(--paper); font: 700 15px var(--type); letter-spacing: 0.1em;
  padding: 0 18px; cursor: pointer;
}
.search button:hover { background: var(--red); }
.search__msg { min-height: 1.5em; margin: 10px 0 0; font-size: 15px; color: var(--red); }
.hero__art { aspect-ratio: 7 / 4; margin-right: -20px; }
.mascot { width: 100%; height: 100%; display: block; overflow: visible; }

/* ---------- facts ---------- */
.facts { margin: 34px 0 0; display: grid; grid-template-columns: repeat(4, 1fr); border-top: 2px solid var(--ink); border-bottom: 2px solid var(--ink); }
.facts div { padding: 16px 16px 18px 0; }
.facts div + div { border-left: 1px dashed var(--rule); padding-left: 16px; }
.facts dt { font-size: 14px; color: var(--ink-3); line-height: 1.35; }
.facts dd { margin: 6px 0 0; font-size: 32px; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }

/* ---------- subjects ---------- */
.subjects { margin-top: 52px; }
.subjects__head { display: flex; justify-content: space-between; align-items: end; gap: 16px; }
h2 { font-size: 16px; letter-spacing: 0.16em; margin: 0; }
#filter {
  font: 16px var(--type); border: 0; border-bottom: 1px solid var(--ink); background: transparent;
  padding: 4px 2px; width: 200px; outline: none; color: var(--ink);
}
.explain { font-size: 15px; color: var(--ink-3); margin: 8px 0 14px; }

.table-scroll { overflow-x: auto; }
.ledger { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.ledger th {
  font-weight: 400; font-size: 14px; color: var(--ink-3); text-align: left;
  padding: 10px 10px 10px 0; border-bottom: 2px solid var(--ink); white-space: nowrap;
}
.ledger th button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
.ledger th button:hover, .ledger th.is-on { color: var(--ink); font-weight: 700; }
.ledger th .arrow { display: inline-block; width: 0.9em; text-align: right; }
.ledger td { padding: 13px 10px 13px 0; border-bottom: 1px dashed var(--rule); font-size: 17px; white-space: nowrap; }
.ledger .num { text-align: right; }
.ledger td.n { color: var(--ink-3); width: 52px; }
.ledger td.who { font-weight: 700; }
.ledger td.who .sub { font-weight: 400; color: var(--ink-3); font-size: 14px; margin-left: 8px; }
.ledger td.is-sort { font-weight: 700; }
.ledger td.dim { color: #a39985; }
.ledger td.down { color: var(--red); font-weight: 700; }
.ledger tbody tr { cursor: pointer; }
.ledger tbody tr:hover td { background: rgba(217, 196, 150, 0.28); }
.ledger tbody tr:hover td.who { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.table-foot { display: flex; justify-content: space-between; align-items: center; padding: 16px 0 0; font-size: 14px; color: var(--ink-3); }

.btn {
  font: 700 14px var(--type); letter-spacing: 0.08em; background: transparent; color: var(--ink);
  border: 2px solid var(--ink); padding: 7px 14px; cursor: pointer; text-decoration: none; display: inline-block;
}
.btn:hover { background: var(--ink); color: var(--paper); }
.btn--solid { background: var(--ink); color: var(--paper); }
.btn--solid:hover { background: var(--red); border-color: var(--red); color: var(--paper); }
.btn[hidden] { display: none; }

.notes { margin-top: 48px; padding-top: 14px; border-top: 1px dashed var(--rule); font-size: 14px; color: var(--ink-3); }
.notes p { margin: 0 0 4px; }

/* ---------- subject file ---------- */
.file-nav { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 22px; }
.file-nav .pager { display: flex; gap: 8px; }
.subject-head { display: grid; grid-template-columns: 1fr auto; gap: 20px; align-items: start; margin-top: 30px; }
.subject-head .label { font-size: 14px; color: var(--ink-3); letter-spacing: 0.06em; }
.subject-head h1 { font-size: clamp(38px, 6vw, 64px); margin-top: 6px; word-break: break-word; }
.subject-head .alias { font-size: 17px; color: var(--ink-3); margin-top: 8px; }
.stamp {
  display: inline-block; color: var(--red); border: 4px solid var(--red); padding: 8px 18px 6px;
  font-weight: 700; font-size: 26px; letter-spacing: 0.2em; transform: rotate(-7deg); margin-top: 18px; opacity: 0.88;
  mix-blend-mode: multiply; justify-self: start; align-self: start; width: max-content;
}

.record { margin-top: 30px; display: grid; grid-template-columns: 1fr 1fr; gap: 0 48px; }
.fields { margin: 0; }
.fields div { display: flex; align-items: baseline; gap: 10px; padding: 9px 0; border-bottom: 1px dashed var(--rule); }
.fields dt { font-size: 15px; color: var(--ink-3); white-space: nowrap; }
.fields dt::after { content: ""; flex: 1; }
.fields .lead { flex: 1; border-bottom: 1px dotted #b9ad94; transform: translateY(-4px); min-width: 20px; }
.fields dd { margin: 0; font-size: 19px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.fields dd.red { color: var(--red); }
.section-label { font-size: 15px; letter-spacing: 0.16em; font-weight: 700; margin: 0 0 6px; }

.calls { margin-top: 0; }
.calls__big { display: flex; align-items: baseline; gap: 14px; margin-top: 4px; }
.calls__big b { font-size: 64px; line-height: 1; color: var(--red); letter-spacing: -0.03em; }
.calls__big span { font-size: 17px; color: var(--ink-2); line-height: 1.35; }
.grid100 { display: grid; grid-template-columns: repeat(20, 1fr); gap: 4px; margin: 16px 0 8px; max-width: 460px; }
.grid100 i { aspect-ratio: 1; border: 1.5px solid var(--ink); background: transparent; display: block; }
.grid100 i.d { background: var(--red); border-color: var(--red); }
.grid100-key { font-size: 13px; color: var(--ink-3); display: flex; gap: 18px; }
.grid100-key i { display: inline-block; width: 11px; height: 11px; border: 1.5px solid var(--ink); vertical-align: -1px; margin-right: 6px; }
.grid100-key i.d { background: var(--red); border-color: var(--red); }

.links { margin-top: 26px; display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: 16px; }
.card { margin-top: 34px; padding-top: 22px; border-top: 2px solid var(--ink); }
.card__img { display: block; width: 100%; max-width: 760px; aspect-ratio: 16 / 9; border: 1px solid var(--ink); background: var(--paper-2); box-shadow: 0 10px 30px -14px rgba(0,0,0,0.4); transform: rotate(-0.6deg); }
.card__actions { display: flex; gap: 10px; margin-top: 16px; }
.nodata { font-size: 16px; color: var(--ink-3); margin-top: 8px; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .desk { padding: 20px 8px 48px; }
  .folder__cover { padding: 10px; }
  .folder__tab { padding: 7px 10px 6px; max-width: 100%; }
  .tab-label { font-size: 11px; letter-spacing: 0.05em; padding: 4px 8px 2px; }
  .sheet { padding: 64px 22px 40px; }
  .clip { left: 14px; }
  .hero { grid-template-columns: minmax(0, 1fr); }
  .hero__art { margin: 8px -10px 0; }
  .facts { grid-template-columns: 1fr 1fr; }
  .facts div:nth-child(3) { border-left: 0; padding-left: 0; }
  .facts div:nth-child(n+3) { border-top: 1px dashed var(--rule); }
  .record { grid-template-columns: 1fr; gap: 28px; }
  .col-wk, .col-d { display: none; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .col-ra { display: none; }
  .ledger td { font-size: 15px; }
  .ledger td.who .sub { display: none; }
  .facts dd { font-size: 26px; }
  .subject-head { grid-template-columns: 1fr; }
  .stamp { font-size: 20px; }
  #filter { width: 120px; }
}
@media (prefers-reduced-motion: reduce) {
}

/* ---------- typed on a typewriter ---------- */
.sheet {
  font-family: "Special Elite", var(--type);
  color: #1f1a14;
  /* ink bleeding into the fibres, and the faint lip of light where the strike pressed the letter in */
  text-shadow: 0 0 0.6px rgba(35, 28, 18, 0.45), 0 0.7px 0 rgba(255, 250, 236, 0.5);
}
.sheet h1, .sheet h2, .sheet b, .sheet strong, .sheet dd, .sheet th, .sheet .btn, .sheet button,
.sheet .who a, .sheet td.num.is-sort, .sheet .section-label, .sheet .stamp {
  font-weight: 400;
}
/* bold = struck twice, a hair apart */
.sheet h1, .sheet .facts dd, .sheet .fields dd, .sheet .calls__big b, .sheet .sec, .sheet .section-label,
.sheet .casehead b, .sheet .who a, .sheet td.is-sort, .sheet td.down {
  text-shadow: 0.5px 0 0 currentColor, 0 0 0.8px rgba(35, 28, 18, 0.55), 0 0.8px 0 rgba(255, 250, 236, 0.5);
}
.sheet input, .sheet button, .sheet .btn { font-family: "Special Elite", var(--type); }
x-w { display: inline-block; white-space: nowrap; }
x-c { display: inline-block; position: relative; }

/* case-file header: a typed form */
.casehead {
  display: grid; grid-template-columns: auto 1fr auto; border: 1.5px solid #3a332a;
  margin-top: 4px; font-size: 14px; letter-spacing: 0.06em;
}
.casehead div { padding: 7px 14px 6px; display: flex; gap: 10px; align-items: baseline; min-width: 0; }
.casehead div + div { border-left: 1.5px solid #3a332a; }
.casehead span { color: var(--ink-3); font-size: 12px; }
.casehead b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* numbered sections */
.sec, .section-label { font-size: 16px; letter-spacing: 0.14em; margin: 0; }
.sec { margin: 44px 0 12px; }
.sec i, .section-label i { font-style: normal; display: inline-block; min-width: 2.1em; }
.facts { margin-top: 0; }
.subjects__head .sec { margin: 0; }
.subjects { margin-top: 44px; }
.notes { margin-top: 44px; border-top: 0; padding-top: 0; }
.notes .sec { margin: 0 0 10px; }
.links-label { margin-top: 34px; }
.links { margin-top: 8px !important; }

/* coffee ring left on the top sheet */
.stain {
  position: absolute !important; z-index: 0; pointer-events: none;
  width: 230px; height: 230px; right: 4%; top: 540px; transform: rotate(24deg);
  background: url(img/coffee-ring.png) center / contain no-repeat; mix-blend-mode: multiply; opacity: 0.8;
}
.stain--mug { display: none; }
.stain--b { right: auto; left: 52%; top: auto; bottom: 120px; transform: rotate(-70deg); width: 210px; height: 210px; opacity: 0.55; }

/* rubber stamp: uneven ink */
.stamp {
  font-family: "Special Elite", var(--type);
  -webkit-mask-image: url(img/grunge.png); mask-image: url(img/grunge.png);
  -webkit-mask-size: 180px; mask-size: 180px;
  text-shadow: none; opacity: 0.88;
}

/* ---------- things on the desk ---------- */
body { overflow-x: hidden; }
.folder { z-index: 1; }
.props { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 0; }
.props--over { z-index: 2; }
.prop { position: absolute; transform-origin: center; }
.prop svg { display: block; overflow: visible; }
/* the lamp is above the middle of the desk: shadows fall outward */
/* lamp above the file: shadows fall away from it. A tight contact shadow plus a soft cast one. */
.props .prop { filter: drop-shadow(-1px 1.5px 1px rgba(8, 4, 0, 0.6)) drop-shadow(-9px 14px 9px rgba(10, 5, 0, 0.5)); }
.props .prop--ashtray, .props .prop--mug, .props .prop--pencil, .props .prop--matches, .props [style*="50% + 550px"], .props .prop--R {
  filter: drop-shadow(8px 12px 7px rgba(10, 5, 0, 0.55)) drop-shadow(2px 3px 2px rgba(10, 5, 0, 0.4));
}
.prop--photos svg + svg { margin-left: -120px; margin-top: 70px; }
.prop--mug svg { width: 210px; height: auto; }
.prop--matches .match { position: absolute; left: 110px; top: 70px; transform: rotate(28deg); }

/* cigarette smoke: drifting wisps over the ashtray */
.prop--ashtray { filter: none !important; }
.prop--ashtray .at-wrap { filter: drop-shadow(6px 10px 10px rgba(10, 5, 0, 0.35)); }
.smoke { position: absolute; left: 9px; top: -420px; pointer-events: none; }
.ember { animation: ember 3.2s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes ember { 0%, 100% { opacity: 0.85; } 45% { opacity: 1; } 60% { opacity: 0.7; } }

@media (max-width: 1240px) { .props { display: none; } }
@media (prefers-reduced-motion: reduce) { .ember { animation: none; } }
@media (max-width: 760px) {
  .casehead { grid-template-columns: 1fr 1fr; }
  .casehead div:nth-child(2) { grid-column: 1 / -1; grid-row: 2; border-left: 0; border-top: 1.5px solid #3a332a; }
  .casehead div:nth-child(3) { border-left: 1.5px solid #3a332a; }
  .casehead b { white-space: normal; }
  .clip { left: auto !important; right: 26px; }
  .stain { top: 1150px; right: -40px; width: 180px; height: 180px; }
}

/* ---------- cinematography ---------- */
/* one warm lamp over the file; the room falls away into darkness */
.cine { position: fixed; inset: 0; pointer-events: none; z-index: 50; }
.cine::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 62% 78% at 50% 38%, rgba(0,0,0,0) 42%, rgba(6,3,1,0.42) 68%, rgba(3,1,0,0.84) 100%);
}
/* grade: warm highlights, cool shadows */
.cine::after {
  content: ""; position: absolute; inset: 0; mix-blend-mode: soft-light;
  background: radial-gradient(ellipse 75% 85% at 50% 36%, rgba(255,214,165,0.28), rgba(255,190,120,0.10) 50%, rgba(30,55,75,0.5) 100%);
}
.dust { position: absolute; inset: 0; width: 100%; height: 100%; mix-blend-mode: screen; }
.grain {
  position: absolute; inset: -50%; opacity: 0.075; mix-blend-mode: overlay;
  background: url(img/grain.png); animation: grain 0.9s steps(6) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); } 17% { transform: translate(-7%, 4%); } 33% { transform: translate(5%, -9%); }
  50% { transform: translate(-3%, 8%); } 67% { transform: translate(9%, 2%); } 83% { transform: translate(-8%, -5%); } 100% { transform: translate(0, 0); }
}
@media (prefers-reduced-motion: reduce) { .grain { animation: none; } }
@media (max-width: 760px) { .cine::before { background: radial-gradient(ellipse 90% 80% at 50% 40%, rgba(0,0,0,0) 50%, rgba(3,1,0,0.6) 100%); } }

/* ---------- typewriter ink ---------- */
.sheet h1, .sheet .sec, .sheet .section-label, .sheet p, .sheet .facts, .sheet .ledger, .sheet .fields,
.sheet .casehead, .sheet .calls__big, .sheet .alias, .sheet .label, .sheet .links, .sheet .grid100-key, .sheet .table-foot span {
  filter: url(#ribbon);
}
x-c.g { text-shadow: 0.7px 0.25px 0 color-mix(in srgb, currentColor 38%, transparent), 0 0.7px 0 rgba(255, 250, 236, 0.5); }
/* the sheet in mid-turn is moving too fast to read: skip the costly ink filter there */
.turner :is(h1, .sec, .section-label, p, .facts, .ledger, .fields, .casehead, .calls__big, .alias, .label, .links, .grid100-key, .table-foot span) { filter: none !important; }

.prop__in { transform-origin: center; }
.prop--photos .prop__in, .prop--photo .prop__in { display: flex; }
.pol { margin-right: -36px; }
.pol + .pol { margin-top: 70px; }
.pol svg { display: block; }
.mug-wrap { position: relative; }
.mug-wrap .coffee { position: absolute; left: 32.3px; top: 33.9px; width: 113.1px; height: 113.1px; }
.mug-wrap .steam { position: absolute; left: -22px; top: -200px; width: 220px; height: 300px; pointer-events: none; mix-blend-mode: screen; }

/* ---------- submit a name ---------- */
.submit { margin-top: 56px; }
.tip { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 28px; margin-top: 18px; max-width: 760px; }
.tip label { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.tip label > span { font-size: 14px; color: var(--ink-3); }
.tip input, .tip textarea {
  font: 18px "Special Elite", var(--type); color: var(--ink); background: transparent;
  border: 0; border-bottom: 1.5px solid var(--ink); padding: 6px 0; outline: none; border-radius: 0; min-width: 0;
}
.tip textarea {
  resize: vertical; line-height: 32px; padding: 0; border-bottom: 0;
  background: repeating-linear-gradient(180deg, transparent 0 31px, rgba(58, 51, 42, 0.45) 31px 32px);
}
.tip input:focus, .tip textarea:focus { border-color: var(--red); }
.tip input::placeholder { color: #a39985; }
.tip__wide { grid-column: 1 / -1; }
.tip__foot { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.tip__msg { margin: 0; font-size: 15px; color: var(--red); min-height: 1.4em; }

/* ---------- phones ---------- */
@media (max-width: 560px) {
  .desk { padding: 14px 6px 40px; }
  .folder__cover { padding: 7px 7px 10px; }
  .sheet { padding: 54px 18px 34px; }
  h1 { font-size: clamp(34px, 10.5vw, 44px); line-height: 1.05; }
  .dek { font-size: 17px; }
  .search input { font-size: 19px; }
  .search button { padding: 0 14px; font-size: 13px; }
  .hero__art { margin: 0 -8px; }
  .facts dd { font-size: 26px; }
  .subjects__head { flex-wrap: wrap; }
  .subjects__head input { width: 100%; }
  .ledger th, .ledger td { padding-left: 4px; padding-right: 4px; }
  .ledger td.n { width: 30px; }
  .ledger td.who { overflow-wrap: anywhere; }
  .tip { grid-template-columns: 1fr; }
  .tip__foot { flex-direction: column-reverse; align-items: stretch; }
  .tip__foot .btn { width: 100%; padding: 12px; }
  .subject-head h1 { font-size: clamp(30px, 9vw, 40px); overflow-wrap: anywhere; }
  .fields dt { white-space: normal; }
  .calls__big b { font-size: 52px; }
  .card__actions .btn { flex: 1; }
  .stamp { transform: rotate(-6deg) scale(0.85); transform-origin: left center; }
}
@media (max-width: 560px) {
  .casehead span { font-size: 10px; white-space: nowrap; }
  .casehead b { font-size: 13px; }
  .casehead div { padding: 6px 10px 5px; gap: 7px; }
  .file-nav .btn { font-size: 12px; padding: 7px 9px 6px; white-space: nowrap; letter-spacing: 0.04em; }
  .file-nav .pager { gap: 6px; }
  .hero__art { margin-top: -54px; }
  .search { max-width: none; }
}
@media (max-width: 560px) { .casehead div:first-child b { white-space: nowrap; } }
/* phones: the ribbon speckle is invisible at this size but costly to scroll */
@media (max-width: 760px) { .sheet *, .tab-label { filter: none !important; } }
@media (max-width: 560px) { .casehead { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); } .casehead b { font-size: 12.5px; letter-spacing: 0; } .casehead div { padding: 6px 8px 5px; gap: 6px; } }

/* ---------- narrower screens: a close-up on the desk around a full-width file ---------- */
@media (max-width: 1240px) {
  html, body { overflow-x: hidden; }
  body { background-size: 1100px auto; }
  .desk { padding: 150px 24px 230px; }
  .props { display: block; }
  .prop--mug { filter: drop-shadow(-1px 1.5px 1px rgba(8, 4, 0, 0.6)) drop-shadow(-5px 8px 6px rgba(10, 5, 0, 0.5)) !important; }
  .cine::before { background: radial-gradient(ellipse 75% 70% at 50% 42%, transparent 40%, rgba(6, 3, 1, 0.45) 72%, rgba(3, 1, 0, 0.8) 100%) !important; }
  /* the ring the mug left on the paper before it was moved */
  .stain--mug { display: block; left: 66px; right: auto; top: 12px; bottom: auto; width: 88px; height: 88px; transform: rotate(32deg); opacity: 1; }
  .clip { left: auto !important; right: 26px; }
}
@media (max-width: 560px) {
  .desk { padding-left: 18px; padding-right: 18px; }
  .sheet { padding-left: 14px; padding-right: 14px; }
  .ledger td { font-size: 14px; }
  .ledger th { font-size: 12px; }
}
