/* Kraak de Zaak: the case file.
   One police folder lying open. Everything in the game is a document or a tool in that folder:
   typed report sheets, the criminal's deed on its own paper, colleagues' handwritten memos,
   rubber stamps, typewriter keys. Documents overlap and are held together by clips and a tag. */

/* ---------- tokens ---------- */

:root {
  color-scheme: light;

  --desk: #24332e;
  --manila: #d6b278;
  --manila-light: #e4c88f;
  --manila-edge: rgb(70 46 10 / .38);
  --on-manila-2: #4a3817;        /* secondary text on the folder, tinted from its own hue */

  --sheet: #f6f1e4;              /* typed report paper */
  --sheet-rule: #c7bfab;
  --photo: #fbf9f3;              /* the white border of a print */
  --ink: #1c1b19;
  --ink-2: #57524a;

  --deed: #f2e7c9;               /* De Maatschap's paper */
  --deed-ink: #2a2112;
  --deed-rule: #8a6d3b;
  --deed-2: #5c4a26;

  --stamp: #b1241c;              /* red stamp ink, wax */
  --stamp-cold: #2c3e6e;         /* blue-black stamp ink */
  --pen: #1d3f8f;                /* Lex's ballpoint */
  --pencil: #3f3e3a;             /* Rune's pencil */
  --memo-lex: #e2ebf7;
  --memo-rune: #fbf1b4;
  --pass: #1f2c4a;               /* police navy: staff passes and every pictogram of the team */
  --print: #e2ddcd;              /* the paper behind a pictogram of the team */
  --mug: #ddd6c4;                /* the greyer paper behind a member of De Maatschap */

  --typed: "Courier Prime", "Courier New", monospace;
  --worn: "Special Elite", "Courier Prime", "Courier New", monospace;
  --form: "Archivo Narrow", "Arial Narrow", sans-serif;
  --formal: "Libre Caslon Text", Georgia, serif;
  --hand-lex: Kalam, "Segoe Print", cursive;
  --hand-rune: Caveat, "Segoe Script", cursive;
  --hand-krypto: "Mrs Saint Delafield", "Segoe Script", cursive;

  --paper-shadow: 0 1px 2px rgb(60 40 10 / .28), 0 16px 26px -16px rgb(60 40 10 / .62);
  --slip-shadow: 0 8px 13px -8px rgb(60 40 10 / .62);
  --label-shadow: 0 1px 2px rgb(60 40 10 / .35);
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 .3 0 0 0 0 .2 0 0 0 0 .05 0 0 0 .16 0'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- ground ---------- */

* { box-sizing: border-box; }
html { background: var(--desk); scrollbar-color: #8a6d3b var(--desk); -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--desk); color: #ece5d2; font: 400 16.5px/1.55 var(--typed); }
::selection { background: var(--ink); color: var(--sheet); }
:focus-visible { outline: 3px solid var(--pen); outline-offset: 2px; }
.defs { position: absolute; }
button { font: inherit; color: inherit; }
a { color: inherit; text-underline-offset: 3px; }

.folder { position: relative; max-width: 620px; margin: 0 auto; min-height: 100vh; padding-bottom: 8px;
          background: var(--manila) var(--grain); color: var(--ink); }

@media (min-width: 700px) {
  body { padding: 34px 0 70px; }
  .folder { border-radius: 4px 20px 6px 6px; min-height: 0;
            box-shadow: 0 2px 0 #b8935a, 0 30px 60px -20px rgb(0 0 0 / .7); }
}

.formlabel { font: 700 12px/1.3 var(--form); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); }

/* pictograms of the team: one colour, with details cut out in the paper behind them */
.face { display: inline-block; flex: none; width: 34px; --kz-paper: var(--print); color: var(--pass); }
.face svg { display: block; width: 100%; height: auto; border-radius: 50%; background: var(--kz-paper); }
.insig svg, .clip, .tag { display: block; width: 100%; height: auto; }

/* ---------- the folder's label, the streak and the day tabs ---------- */

.top { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 14px 0; }
/* a gummed file label: white with a thin red printed frame */
.label { display: block; background: var(--sheet); padding: 12px 16px 9px; text-decoration: none;
         transform: rotate(-1deg); box-shadow: var(--label-shadow);
         outline: 1.5px solid var(--stamp); outline-offset: -5px; }
.wordmark { display: block; font: 400 25px/1 var(--worn); letter-spacing: .01em; }
.sub { display: block; margin-top: 3px; font-size: 12px; line-height: 1.2; color: var(--ink-2); }
.topright { display: grid; justify-items: end; gap: 4px; }
.streak { position: relative; display: flex; align-items: baseline; gap: 6px; padding: 4px 9px 2px; background: var(--sheet); text-decoration: none;
          box-shadow: var(--label-shadow); transform: rotate(1.2deg); }
.streak b { font-weight: 700; font-size: 20px; line-height: 1; font-variant-numeric: tabular-nums; }
.streak span { font: 700 12px/1 var(--form); letter-spacing: .08em; text-transform: uppercase; }
.textbtn { position: relative; padding: 5px 0; background: none; border: 0; cursor: pointer; text-decoration: underline; text-underline-offset: 3px;
           font: 700 13px/1.2 var(--form); letter-spacing: .08em; text-transform: uppercase; }

/* the chip and the text button stay their printed size; their touch area reaches 44px */
.streak::after { content: ""; position: absolute; inset: -16px -8px -3px; }
.textbtn::after { content: ""; position: absolute; inset: -1px -10px -17px; }

.tabs { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; align-items: end; padding: 0 12px; margin-top: 12px; }
.tab { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; height: 44px;
       border: 1px solid var(--manila-edge); border-bottom: 0; border-radius: 8px 8px 0 0;
       background: var(--manila-light); text-decoration: none; }
.tab b { font: 700 15px/1 var(--form); letter-spacing: .08em; text-transform: uppercase; }
.tab i { display: block; width: 12px; height: 6px; }
.tab.opgelost i { background: var(--stamp); }
.tab.cold i { border: 2px solid var(--stamp-cold); }
.tab.current { height: 52px; background: var(--sheet); position: relative; z-index: 2; }
.tab.sealed { background: none; border-style: dashed; color: var(--on-manila-2); }
a.tab:hover { background: var(--sheet); }

/* ---------- the typed report ---------- */

.case { padding: 0 12px; }
.case.waiting { cursor: progress; }   /* a request to the bureau is under way */

.sheet { position: relative; z-index: 1; padding: 22px 20px 42px 32px; background: var(--sheet) var(--grain);
         box-shadow: var(--paper-shadow); transform: rotate(-.35deg); }
/* two punched holes; the folder shows through, and the treasury tag runs through the top one */
.hole { position: absolute; left: 9px; width: 13px; height: 13px; border-radius: 50%; background: var(--manila);
        box-shadow: inset 0 2px 2px rgb(40 25 5 / .6), 0 1px 0 rgb(255 255 255 / .7); }
.hole.top { top: 58px; padding: 0; }   /* "top" is also the page header's class; keep its padding off the hole */
.hole.bottom { bottom: 58px; }
.tagwrap { position: absolute; left: -8px; top: 46px; width: 30px; pointer-events: none; filter: drop-shadow(0 1px 1px rgb(40 25 5 / .45)); }

/* printed form rows: the label, then what was typed in */
.fields { margin: 0; }
.fields div { display: flex; align-items: baseline; gap: 6px; border-bottom: 1px solid var(--sheet-rule); padding: 4px 0 1px; min-width: 0; }
.fields dt { flex: none; width: 70px; font: 700 12px/1.3 var(--form); letter-spacing: .05em; text-transform: uppercase; color: var(--ink-2); }
.fields dd { margin: 0; min-width: 0; font-size: 14px; line-height: 1.3; }

.sheet h1 { margin: 14px 0 10px; font: 400 clamp(26px, 7.4vw, 34px)/1.12 var(--worn); text-wrap: balance; }
.sheet p { margin: 0 0 12px; max-width: 62ch; }
.question { position: relative; margin-top: 20px; border: 1.5px solid var(--ink); padding: 9px 12px 11px; }
.question .q { margin: 2px 0 0; font-weight: 700; font-size: 18px; line-height: 1.3; }
/* the answer is the player's own, typed on the same machine as the keys below */
.question .answer { display: inline-block; margin: 8px 0 0; padding-bottom: 1px; border-bottom: 2px solid var(--ink);
                    font-weight: 700; font-size: 21px; line-height: 1.2; letter-spacing: .16em; text-transform: uppercase; overflow-wrap: anywhere; }

/* ---------- stamps ---------- */

.stamp { position: absolute; padding: .24em .5em .1em; border: .13em solid currentColor; border-radius: .16em; white-space: nowrap;
         font: 700 26px/1 var(--form); letter-spacing: .14em; text-transform: uppercase; color: var(--stamp);
         filter: url(#ink); mix-blend-mode: multiply; pointer-events: none; }
.stamp.cold { color: var(--stamp-cold); }
/* an open case carries a small stamp on its open question; a closed one is stamped across the report */
.question .stamp.open { right: 10px; top: -19px; font-size: 18px; transform: rotate(6deg); }
.sheet > .stamp.opgelost, .sheet > .stamp.cold { left: 50%; top: 47%; font-size: clamp(36px, 11.5vw, 62px); transform: translate(-50%, -50%) rotate(-10deg); }
.stamp.slam { animation: slam .55s .2s cubic-bezier(.16, 1, .3, 1) both; }
@keyframes slam {
  from { opacity: 0; scale: 2.6; }
  60%  { opacity: 1; }
  to   { opacity: 1; scale: 1; }
}
.stamp.small { left: 50%; top: 34%; padding: 3px 4px 1px; border-width: 2px; font-size: 12px; font-style: normal;
               letter-spacing: .03em; transform: translateX(-50%) rotate(-12deg); }

/* ---------- the sealed envelope and the deed ---------- */

/* the envelope lies under the report; its corner shows below the open question */
.envelope { position: relative; z-index: 0; max-width: 340px; margin: -14px auto 0; text-align: center; }
.envelope-art { display: block; width: 100%; height: auto; transform: rotate(1.4deg);
                filter: drop-shadow(0 12px 12px rgb(60 40 10 / .42)); }
.envelope .btn { margin-top: 18px; }

/* the deed is clipped onto the report's lower edge: the one foreign object in the file */
.deed { position: relative; z-index: 2; margin: -22px 6px 0 16px; padding: 30px 26px 24px; color: var(--deed-ink);
        background: var(--deed) repeating-linear-gradient(0deg, rgb(120 90 40 / .07) 0 1px, transparent 1px 4px);
        box-shadow: var(--paper-shadow); transform: rotate(1deg);
        outline: 1px solid var(--deed-rule); outline-offset: -9px; }
.deed::after { content: ""; position: absolute; inset: 13px; border: 2px solid var(--deed-rule); pointer-events: none; }
.deed .clip { position: absolute; top: -25px; left: 36px; width: 20px; z-index: 3; }
.deed p { margin: 0; text-align: center; font-family: var(--formal); }
.deed-head { font-size: 12px; letter-spacing: .3em; text-transform: uppercase; padding-bottom: 9px; margin-bottom: 10px !important;
             border-bottom: 1px solid var(--deed-rule); }
.deed-pre { font-style: italic; font-size: 14px; color: var(--deed-2); }
.clue { margin: 14px 0 18px !important; font-style: italic; font-size: clamp(22px, 6.4vw, 27px); line-height: 1.28; text-wrap: balance; }
.clue .count { font-style: normal; font-size: .68em; white-space: nowrap; }
.clue mark { background: none; color: inherit; }
.clue mark.pen { text-decoration: underline 2.5px var(--pen); text-underline-offset: 6px; }           /* Lex underlines */
.clue mark.pencil { background: linear-gradient(transparent 58%, rgb(63 62 58 / .26) 58% 96%, transparent 96%); }  /* Rune shades */
.deed-foot { font-style: italic; font-size: 13px; line-height: 1.45; color: var(--deed-2); text-align: left !important; padding-left: 4px; }
.deed-seal { position: absolute; right: 22px; bottom: 16px; width: 56px; filter: drop-shadow(0 2px 2px rgb(60 20 10 / .4)); }
.deed-seal svg { display: block; width: 100%; height: auto; }

/* ---------- memos from colleagues: each in their own hand, signed ---------- */

.memo { position: relative; z-index: 3; margin: -10px 22px 0 8px; padding: 11px 14px 9px; box-shadow: var(--slip-shadow); }
.memo::after { content: ""; display: block; clear: both; }
.memo .face { float: left; margin: 1px 10px 2px 0; }
.memo p { margin: 0; }
.memo .sign { float: right; margin-left: 14px; padding-right: 4px; }
.memo.lex { background: var(--memo-lex); color: #17336f; transform: rotate(-1deg); }
.memo.lex p { font: 400 17px/1.4 var(--hand-lex); }
.memo.lex .sign { font-size: 19px; }
.memo.rune { background: var(--memo-rune); color: var(--pencil); margin-left: 26px; margin-right: 6px; transform: rotate(1.3deg); }
.memo.rune p { font: 500 23px/1.18 var(--hand-rune); }
.memo.rune .sign { font-size: 26px; font-weight: 600; }
.memo.report { z-index: 1; margin: 0 6px; padding: 16px 18px 10px; background: var(--sheet) var(--grain); box-shadow: var(--paper-shadow); transform: rotate(-.5deg); }
.report-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.report-head .face { float: none; margin: 0; }
.sig { margin: 2px 6px 0 0 !important; text-align: right; font: 400 46px/1 var(--hand-krypto); color: var(--ink); }

/* ---------- the answer ---------- */

.work { margin-top: 18px; }
/* a strip torn from the deed: it sticks to the top of the screen while the answer is in view */
.cluebar { position: sticky; top: 6px; z-index: 5; margin: 0 2px 10px; padding: 7px 12px 6px; text-align: center; text-wrap: balance;
           background: var(--deed); color: var(--deed-ink); box-shadow: var(--slip-shadow);
           font: italic 400 15.5px/1.3 var(--formal); }
.cluebar span { font-style: normal; font-size: .86em; white-space: nowrap; }
.comb { display: flex; justify-content: center; }
.cell { flex: 1 1 0; min-width: 0; max-width: 48px; height: 54px; padding: 0; cursor: pointer; border-radius: 0;
        background: var(--sheet); border: 1.5px solid var(--ink); border-left-width: 0;
        font: 700 clamp(15px, calc((min(100vw, 620px) - 30px) / var(--boxes, 7) * .6), 27px)/1 var(--typed); text-transform: uppercase; }
.cell:first-child { border-left-width: 1.5px; }
.cell.wide { font-size: clamp(13px, calc((min(100vw, 620px) - 30px) / var(--boxes, 7) * .46), 21px); }
/* the selected box is where the next letter lands: white, with the print point under it.
   The blue ring belongs to keyboard focus alone. */
.cell.sel { position: relative; background: #fff; }
.cell.sel::after { content: ""; position: absolute; left: 22%; right: 22%; bottom: 5px; height: 4px; background: var(--pen); }
.cell:focus-visible { position: relative; z-index: 2; }
.cell.lab { background: #e9e3d2; font-style: italic; }
.cell.wrong { color: var(--stamp); text-decoration: line-through 2.5px; }
.comb.nope { animation: nope .32s ease-out; }
@keyframes nope { 25% { transform: translateX(-7px); } 60% { transform: translateX(5px); } 85% { transform: translateX(-2px); } }

/* who says what: the speaker's pictogram beside their line. The slot keeps its height when
   empty, so a message never moves the keys under the player's thumb. */
.msg { display: flex; align-items: center; justify-content: center; gap: 9px; min-height: 40px; margin: 7px 4px 0;
       font-size: 14.5px; line-height: 1.32; }
.msg .face { width: 30px; }

.help { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 7px; }
.helpbtn { display: grid; justify-items: center; gap: 1px; min-width: 0; padding: 7px 2px 6px; cursor: pointer;
           background: var(--sheet); border: 1.5px solid var(--ink); border-radius: 2px; transition: background-color .12s, color .12s; }
.helpbtn.wide { grid-column: span 2; }   /* the two extra hints share one button */
.helpbtn .face { width: 30px; margin-bottom: 2px; }
.helpbtn b { font: 700 14px/1.15 var(--form); letter-spacing: .07em; text-transform: uppercase; }
.helpbtn span:last-child { font: 500 12px/1.2 var(--form); color: var(--ink-2); }
.helpbtn:hover:enabled, .helpbtn:active:enabled { background: var(--ink); color: var(--sheet); }
.helpbtn:hover:enabled span:last-child, .helpbtn:active:enabled span:last-child { color: inherit; }
.helpbtn:disabled { background: none; border-style: dashed; color: var(--on-manila-2); cursor: default; }
.helpbtn:disabled span:last-child { color: inherit; }
.helpbtn:disabled .face { opacity: .55; }

.btn { min-height: 46px; padding: 12px 14px 10px; cursor: pointer; background: var(--sheet); border: 1.5px solid var(--ink); border-radius: 2px;
       font: 700 15px/1.1 var(--form); letter-spacing: .07em; text-transform: uppercase; transition: background-color .12s, color .12s; }
.btn:hover, .btn:active { background: var(--ink); color: var(--sheet); }
.btn.primary { background: var(--stamp); border-color: var(--stamp); color: #fff; font-size: 18px; letter-spacing: .1em; padding: 14px 18px 12px; }
.btn.primary:hover, .btn.primary:active { background: var(--ink); border-color: var(--ink); }
.sharebtn { display: inline-flex; align-items: center; justify-content: center; gap: 9px; }
.crack { display: block; width: 100%; margin-top: 14px; }
.quiet { display: block; min-height: 44px; margin: 6px auto 0; padding: 10px 12px; background: none; border: 0; cursor: pointer;
         font-size: 14px; color: var(--on-manila-2); text-decoration: underline; text-underline-offset: 3px; }

.keys { display: grid; gap: 7px; margin-top: 12px; }
.keyrow { display: flex; justify-content: center; gap: 5px; }
/* stadium-shaped typewriter keys: ten must fit a phone row at a 46px touch height */
.key { flex: 1 1 0; min-width: 0; max-width: 46px; height: 46px; padding: 0; cursor: pointer; display: grid; place-items: center;
       background: #efe8d6; border: 2px solid var(--ink); border-radius: 23px;
       box-shadow: 0 3px 4px -1px rgb(40 25 5 / .5), inset 0 0 0 2px rgb(255 255 255 / .55);
       font: 700 17px/1 var(--form); transition: background-color .08s, transform .08s; }
.key.wide { flex-grow: 1.6; max-width: 68px; }
.key:active { background: var(--ink); color: #efe8d6; transform: translateY(2px); }

.closing { margin-top: 24px; }
.outcome { margin: 18px 8px 12px; text-align: center; font-weight: 700; text-wrap: balance; }
.outcome.spoken { display: flex; align-items: center; justify-content: center; gap: 9px; font-weight: 400; text-align: left; }
.closing-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.next { margin: 14px 8px 0; text-align: center; font-style: italic; color: var(--on-manila-2); }

/* ---------- the rest of the folder ---------- */

.block { margin: 46px 12px 0; padding-top: 24px; border-top: 2px dashed var(--manila-edge); }
.block h2 { margin: 0 0 8px; font: 400 25px/1.15 var(--worn); }
.typed { margin: 0; max-width: 60ch; }

.pinboard { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 16px 10px; margin-top: 20px; }
.card { position: relative; padding: 10px 6px 8px; background: var(--sheet); text-align: center; box-shadow: var(--slip-shadow); }
.card:nth-child(2n) { transform: rotate(-1.1deg); }
.card:nth-child(3n) { transform: rotate(1.4deg); }
.card::before { content: ""; position: absolute; left: 50%; top: -5px; width: 11px; height: 11px; margin-left: -5px; border-radius: 50%;
                background: var(--ink); box-shadow: 0 2px 2px rgb(0 0 0 / .35); }
.card.hunted::before { background: var(--stamp); }
.mug { --kz-paper: var(--mug); color: var(--ink); }
.mug svg { display: block; width: 100%; max-width: 70px; height: auto; margin: 0 auto 6px; background: var(--kz-paper); }
.card b { display: block; font: 700 13px/1.2 var(--form); letter-spacing: .06em; text-transform: uppercase; }
.card span { display: block; font-size: 12px; line-height: 1.3; color: var(--ink-2); }
.card.boss { grid-column: 1 / -1; width: 150px; margin: 0 auto; }
.card-seal { position: absolute; right: -9px; top: 22px; width: 36px; }
.card-seal svg { display: block; width: 100%; height: auto; }

/* the service record: a typed form with the recruit's pass photo clipped to it */
.record { position: relative; max-width: 470px; min-height: 150px; margin-top: 18px; padding: 18px 18px 16px 110px;
          background: var(--sheet) var(--grain); box-shadow: var(--paper-shadow); transform: rotate(.4deg); }
.passphoto { position: absolute; left: 16px; top: 22px; width: 78px; padding: 4px; background: var(--photo); box-shadow: var(--slip-shadow); transform: rotate(-3deg); }
.passphoto .photo { display: block; --kz-paper: var(--print); color: var(--pass); }
.passphoto .photo svg { display: block; width: 100%; height: auto; background: var(--kz-paper); }
.passphoto .clip { position: absolute; top: -19px; left: 28px; width: 15px; }
.rows { margin: 0; }
.rows div { display: flex; align-items: baseline; gap: 10px; padding: 6px 0 3px; border-bottom: 1px dotted #8f8876; }
.rows dt { flex: none; font: 700 12px/1.3 var(--form); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); }
.rows dd { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin: 0 0 0 auto; text-align: right;
           font-weight: 700; font-size: 16px; line-height: 1.25; font-variant-numeric: tabular-nums; }
.rows .insig { width: 14px; --kz-paper: var(--sheet); color: var(--pass); }
.record > .formlabel { display: block; margin-top: 14px; }
.roster { list-style: none; margin: 5px 0 0; padding: 0; display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.roster li { text-align: center; }
.roster span { display: block; font: 700 12px/1.2 var(--form); letter-spacing: .06em; text-transform: uppercase; }
.roster i { display: grid; place-items: center; height: 26px; margin-top: 2px; border: 1.5px solid var(--ink); background: #fff; color: var(--stamp); }
.roster i svg { width: 20px; height: 20px; }
.roster .future i { background: none; border-style: dashed; border-color: #8f8876; }
.roster .today i { outline: 2px solid var(--pen); outline-offset: 1px; }
.record .typed { margin-top: 12px; font-size: 15px; }

/* the team: staff passes with a rank band, a slot for the lanyard and a pass number */
.team { list-style: none; margin: 18px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(146px, 1fr)); gap: 16px 12px; }
.badge { display: grid; justify-items: center; align-content: start; padding-bottom: 10px; overflow: hidden; text-align: center;
         background: var(--sheet); border-radius: 7px; box-shadow: var(--slip-shadow); }
.badge:nth-child(2n) { transform: rotate(.9deg); }
.badge:nth-child(3n) { transform: rotate(-1.1deg); }
.band { position: relative; display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; padding: 17px 8px 7px;
        background: var(--pass); color: #fff; font: 700 13px/1 var(--form); letter-spacing: .08em; text-transform: uppercase; }
.band::before { content: ""; position: absolute; left: 50%; top: 5px; width: 28px; height: 6px; margin-left: -14px; border-radius: 3px; background: var(--manila); }
.band .insig { width: 13px; --kz-paper: var(--pass); color: #fff; }
.badge .photo { width: 72px; margin: 11px 0 7px; --kz-paper: var(--print); color: var(--pass); }
.badge .photo svg { display: block; width: 100%; height: auto; background: var(--kz-paper); }
.badge b { padding: 0 6px; font: 700 15px/1.2 var(--form); letter-spacing: .02em; }
.badge > span { padding: 2px 8px 0; font-size: 13px; line-height: 1.3; color: var(--ink-2); }
.badge .nr { margin-top: 6px; font-style: normal; font-size: 12px; letter-spacing: .08em; color: var(--ink-2); }

/* the notice about the book: a slip left in the folder */
.slip { position: relative; max-width: 430px; margin: 52px 30px 0 18px; padding: 14px 16px 13px; background: var(--sheet) var(--grain);
        box-shadow: var(--slip-shadow); transform: rotate(-1.2deg); }
.slip p { margin: 3px 0 0; }
.slip .clip { position: absolute; top: -22px; right: 30px; width: 17px; }

.foot { margin: 40px 12px 0; padding: 18px 0 30px; border-top: 1px solid var(--manila-edge); font-size: 13.5px; line-height: 1.5; color: var(--on-manila-2); }
.foot p { margin: 0 0 6px; max-width: 62ch; }
.noscript { max-width: 620px; margin: 0 auto; padding: 20px; background: var(--sheet); color: var(--ink); }

/* ---------- pop-ups: one sheet of paper over the dimmed desk ---------- */

.pop { width: 100%; max-width: min(92vw, 440px); max-height: none; padding: 0; border: 0; background: none; color: var(--ink); overflow: visible; }
.pop::backdrop { background: rgb(18 26 23 / .76); }
.pop-sheet { position: relative; max-height: 90vh; overflow: auto; padding: 28px 22px 22px; background: var(--sheet) var(--grain);
             box-shadow: 0 30px 60px -20px rgb(0 0 0 / .85); transform: rotate(-.6deg); }
.pop[open] .pop-sheet { animation: drop .3s cubic-bezier(.16, 1, .3, 1); }
@keyframes drop { from { opacity: 0; translate: 0 18px; rotate: -3deg; } }
.pop-x { position: absolute; top: 4px; right: 4px; width: 44px; height: 44px; display: grid; place-items: center;
         background: none; border: 0; cursor: pointer; }
.pop h2 { margin: 0 0 12px; font: 400 25px/1.15 var(--worn); text-wrap: balance; }
.letter p { margin: 0 0 12px; }
.signed { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.signed .sig { margin: 0 6px 6px 0 !important; }
.letter .steps { margin: 0 0 16px; padding-left: 24px; }
.letter .steps li { margin: 7px 0; padding-left: 2px; }
.letter .btn { display: block; width: 100%; margin-top: 10px; }

.result { text-align: center; }
.result .stamp.inpop { position: static; display: inline-block; margin: 8px 0 18px; font-size: 38px; rotate: -7deg; }
.solution { margin: 0 0 14px; font-weight: 700; font-size: 22px; line-height: 1.2; letter-spacing: .14em; text-transform: uppercase; overflow-wrap: anywhere; }
.solution .formlabel { display: block; margin-bottom: 2px; letter-spacing: .1em; }
.result .rows { margin-bottom: 14px; text-align: left; }
.note { margin: 0 0 16px; font-style: italic; font-size: 15px; line-height: 1.4; text-wrap: balance; }
.result .btn { display: flex; align-items: center; justify-content: center; width: 100%; margin-top: 8px; }

@media (prefers-reduced-motion: reduce) {
  .stamp.slam, .comb.nope, .pop[open] .pop-sheet { animation: none; }
  .btn, .key, .helpbtn { transition: none; }
}
