/* querybox.de: a lit notice case (Schaukasten). Aluminium frame, felt board, letterboard, pinned paper.
   Light and dark follow the system setting; at night the case is lit from inside. */

@font-face {
  font-family: "Barlow Condensed";
  src: url("fonts/barlow-condensed-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Barlow Condensed";
  src: url("fonts/barlow-condensed-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --wall: #c5c9c4;
  --metal-mid: #c3c8c5;
  --metal-lo: #9ba19e;
  --plate: #e4e7e5;
  --plate-ink: #1c201e;
  --metal-ink: #262b29;
  --metal-ink-muted: #3f4643;
  --felt: #2f5c48;
  --felt-deep: #1f4334;
  --on-felt: #f1f6f3;
  --letterboard: #151716;
  --groove: #0b0c0c;
  --letter: #f5f5f0;
  --paper: #fcfcf9;
  --ink: #1b1d1b;
  --ink-muted: #4a504c;
  --rule: #c9ccc8;
  --yellow: #f6e27c;
  --pink: #f6cbd5;
  --blue: #cfe3f2;
  --pin-red: #d0291d;
  --pin-blue: #1f5fbf;
  --pin-green: #2f8a3a;
  --focus: #f6b400;
  --ok: #1d6b3c;
  --shadow: 0 1px 1px rgba(0, 0, 0, 0.22), 0 12px 24px -8px rgba(0, 0, 0, 0.5);
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", "Segoe UI Mono", Menlo, Consolas, monospace;
  --display: "Barlow Condensed", "Arial Narrow", sans-serif;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --wall: #0b0d0c;
    --metal-mid: #4b514e;
    --metal-lo: #2f3431;
    --plate: #9aa09d;
    --plate-ink: #141716;
    --metal-ink: #eef1ef;
    --metal-ink-muted: #d0d6d3;
    --felt: #1f3e31;
    --felt-deep: #142a21;
    --on-felt: #eef4f0;
    --paper: #e7e7e1;
    --ink: #171917;
    --ink-muted: #434844;
    --rule: #bfc2be;
    --yellow: #dfcb6a;
    --pink: #ddb3be;
    --blue: #b6cbdb;
    --shadow: 0 1px 1px rgba(0, 0, 0, 0.5), 0 14px 28px -8px rgba(0, 0, 0, 0.75);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scrollbar-color: var(--metal-lo) var(--wall); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--wall);
  color: var(--ink);
  font: 17px/1.6 var(--sans);
  padding: clamp(16px, 3vw, 40px) 16px;
}
::selection { background: var(--yellow); color: #171917; }
input { caret-color: var(--ink); }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 3px; }
code { font-family: var(--mono); font-size: 0.88em; overflow-wrap: anywhere; }
h1, h2, h3 { margin: 0; text-wrap: balance; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 8px; background: var(--paper); color: var(--ink); padding: 8px 12px; z-index: 10; }

/* The case: brushed aluminium frame around a felt board behind glass */
.case {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 clamp(8px, 1.4vw, 16px);
  border-radius: 18px;
  /* brushed aluminium: horizontal streak noise over the metal tone */
  background-color: var(--metal-mid);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='600' height='120'%3E%3Cfilter id='b'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.002 .7' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .55 -.12'/%3E%3C/filter%3E%3Crect width='600' height='120' filter='url(%23b)'/%3E%3C/svg%3E");
  /* stretched across the whole width so no seam shows; repeats only downwards */
  background-size: 100% 120px;
  background-repeat: repeat-y;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.55),
    inset 0 -1px 0 rgba(0, 0, 0, 0.25),
    0 2px 3px rgba(0, 0, 0, 0.2),
    0 30px 60px -20px rgba(0, 0, 0, 0.45);
}

/* Engraved name plate along the top of the frame */
/* top and bottom rails catch the light differently */
.plate {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 20px; padding: 12px 8px;
  margin: 0 calc(-1 * clamp(8px, 1.4vw, 16px)); padding-left: clamp(16px, 2vw, 24px); padding-right: clamp(16px, 2vw, 24px);
  border-radius: 18px 18px 0 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.45), rgba(255, 255, 255, 0) 70%);
}
/* the engraved name plate, screwed onto the top rail */
.name {
  position: relative;
  display: inline-flex; align-items: center; gap: 10px;
  padding: 7px 26px 6px;
  border-radius: 4px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.35), rgba(0, 0, 0, 0.06)), var(--plate);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7), inset 0 -1px 0 rgba(0, 0, 0, 0.25), 0 1px 2px rgba(0, 0, 0, 0.35);
  color: var(--plate-ink); text-decoration: none;
  font: 700 1.6rem/1 var(--display); letter-spacing: 0.06em;
}
.screw {
  position: absolute; top: 50%; left: 8px; width: 7px; height: 7px; margin-top: -3.5px; border-radius: 50%;
  background: linear-gradient(135deg, transparent 42%, rgba(0, 0, 0, 0.55) 42% 58%, transparent 58%), #b9beba;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.35);
}
.screw.r { left: auto; right: 8px; }
.name svg { width: 24px; height: 24px; }
/* the logo symbol sits on the plate like an enamel badge, in its own colours */
.name svg { border-radius: 5px; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.18), 0 1px 1px rgba(0, 0, 0, 0.25); }
@media (prefers-color-scheme: dark) {
  .plate { background: linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0) 70%); }
}

/* Navigation: shared */
.signs { display: flex; flex-wrap: wrap; align-items: center; }
.signs a { text-decoration: none; text-transform: uppercase; white-space: nowrap; }

/* Each link is a small aluminium sign screwed to the rail */
.signs { gap: 10px; }
.signs a {
  position: relative;
  padding: 6px 16px 5px;
  border-radius: 3px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.35), rgba(0, 0, 0, 0.06)), var(--plate);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7), inset 0 -1px 0 rgba(0, 0, 0, 0.25), 0 1px 2px rgba(0, 0, 0, 0.35);
  color: var(--plate-ink); font: 600 1rem/1.2 var(--display); letter-spacing: 0.08em;
  transition: transform 0.15s ease-out, box-shadow 0.15s ease-out;
}
.signs a::before, .signs a::after {
  content: ""; position: absolute; top: 50%; left: 5px; width: 4px; height: 4px; margin-top: -2px; border-radius: 50%;
  background: rgba(0, 0, 0, 0.35);
}
.signs a::after { left: auto; right: 5px; }
.signs a:hover { transform: translateY(-1px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7), inset 0 -1px 0 rgba(0, 0, 0, 0.25), 0 4px 6px rgba(0, 0, 0, 0.3); }

/* Felt board */
.board {
  position: relative;
  padding: clamp(18px, 3.4vw, 44px);
  border-radius: 6px;
  background-color: var(--felt);
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .22 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E"),
    radial-gradient(120% 80% at 50% 0%, transparent 40%, var(--felt-deep) 100%);
  box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.55), inset 0 0 0 1px rgba(0, 0, 0, 0.35);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(28px, 4vw, 48px);
}
@media (prefers-color-scheme: dark) {
  /* lit from inside at night: a tube under the top rail, light falling off down the felt */
  .board { box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.6), inset 0 0 0 1px rgba(0, 0, 0, 0.5); }
  .board::before {
    content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
    background:
      linear-gradient(180deg, rgba(255, 248, 222, 0.85) 0 3px, rgba(255, 244, 210, 0.22) 3px, rgba(255, 244, 210, 0.07) 260px, transparent 700px);
  }
}

/* content paints above the night light */
.board > * { position: relative; }

/* Letterboard: ribbed black felt with pressed-in white letters */
.letterboard {
  background-color: var(--letterboard);
  background-image: repeating-linear-gradient(180deg, transparent 0 7px, var(--groove) 7px 9px);
  border: 7px solid #2b2e2c;
  border-radius: 4px;
  box-shadow: var(--shadow);
  color: var(--letter);
  padding: clamp(18px, 3vw, 34px) clamp(18px, 3vw, 36px);
}
.letterboard h1, .letterboard h2 {
  font-family: var(--display); font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.035em; text-shadow: 0 2px 0 rgba(0, 0, 0, 0.6);
}
.letterboard h1 { font-size: clamp(2.6rem, 7.4vw, 5.6rem); line-height: 1; }
.letterboard h1 span { display: inline-block; }
.letterboard h1 span:nth-child(2) { transform: translateY(1px) rotate(-0.4deg); }
.letterboard h1 span:nth-child(4) { transform: rotate(0.3deg); }
.letterboard.small { justify-self: start; padding: 8px 22px 6px; border-width: 5px; transform: rotate(-0.6deg); }
.letterboard.small h2 { font-size: clamp(1.9rem, 4vw, 2.6rem); line-height: 1.1; }

/* Paper notices with a pushpin */
.sheet {
  position: relative;
  background: var(--paper);
  color: var(--ink);
  padding: 30px clamp(18px, 2.4vw, 28px) 22px;
  box-shadow: var(--shadow);
}
.sheet::before {
  content: ""; position: absolute; top: 9px; left: 50%; width: 16px; height: 16px; margin-left: -8px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.75) 0 12%, var(--pin, var(--pin-red)) 42%, rgba(0, 0, 0, 0.55) 100%);
  box-shadow: 2px 4px 3px rgba(0, 0, 0, 0.4);
}
.sheet h2 { font: 700 clamp(1.7rem, 2.6vw, 2.1rem)/1.05 var(--display); text-transform: uppercase; letter-spacing: 0.02em; margin-bottom: 10px; }
.sheet h3 { font: 700 1.35rem/1.1 var(--display); text-transform: uppercase; letter-spacing: 0.03em; margin-bottom: 6px; }
.sheet p { margin: 0 0 12px; }
.sheet p:last-child { margin-bottom: 0; }
.yellow { background: var(--yellow); --pin: var(--pin-blue); }
.pink { background: var(--pink); --pin: var(--pin-green); }
.blue { background: var(--blue); --pin: var(--pin-red); }

/* Opening: letterboard, the address notice pinned over its edge, the facts slip */
.opening { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); grid-template-rows: auto 1fr; gap: 24px 0; align-items: start; }
.opening .letterboard { grid-column: 1; grid-row: 1; }
.lead-sheet { grid-column: 2; grid-row: 1 / span 2; margin: 22px 0 0 -26px; transform: rotate(0.7deg); z-index: 2; padding-bottom: 0; }
.slip.pink { grid-column: 1; grid-row: 2; justify-self: start; max-width: 560px; margin-left: 18px; transform: rotate(-0.8deg); }
.slip ul { margin: 0; padding-left: 1.1em; }
.slip .intro { margin: 0 0 12px; font-size: 1.05rem; }
.slip li { margin-bottom: 6px; }
.slip li:last-child { margin-bottom: 0; }

.lead-sheet .typed { color: var(--ink-muted); }
.lead-sheet label { display: block; font: 700 1.15rem/1.2 var(--display); text-transform: uppercase; letter-spacing: 0.05em; margin: 14px 0 6px; }
.lead-sheet input {
  width: 100%;
  font: 1.1rem var(--mono);
  padding: 10px 12px;
  border: 2px solid var(--ink);
  border-radius: 3px;
  background: #fff;
  color: #171917;
}
.lead-sheet input::placeholder { color: #5d635f; }
.lead-sheet input:invalid { border-color: #b3261e; }
.hint { margin: 8px 0 0; color: var(--ink-muted); font-size: 0.9rem; }

.typed-addr { margin: 16px 0 0; display: grid; gap: 10px; }
.typed-addr dt { font: 600 0.95rem/1.2 var(--display); text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-muted); }
.typed-addr dd { margin: 2px 0 0; }
.typed-addr code { font-size: 0.98rem; }
.fallback .typed-addr code { margin-right: 8px; }

code.copy { cursor: copy; text-decoration: underline dotted; text-decoration-color: rgba(0, 0, 0, 0.35); text-underline-offset: 4px; }
code.copy:hover { text-decoration-style: solid; }
code.copy.done::after { content: " · kopiert"; font: 600 0.85em var(--display); letter-spacing: 0.05em; color: var(--ok); }

/* Tear-off strips (Abreißzettel): each copies the address for one device */
.strips {
  display: flex;
  margin: 20px calc(-1 * clamp(18px, 2.4vw, 28px)) 0;
  border-top: 2px dashed rgba(0, 0, 0, 0.35);
}
.strip {
  flex: 1 1 0;
  min-width: 0;
  height: 150px;
  padding: 10px 0;
  border: 0;
  border-left: 1.5px dashed rgba(0, 0, 0, 0.3);
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transform-origin: 50% 0;
  transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1), background-color 0.2s;
  font: inherit;
}
.strip:first-child { border-left: 0; }
.strip span {
  writing-mode: vertical-rl; transform: rotate(180deg);
  font: 600 1.15rem/1 var(--display); letter-spacing: 0.06em; text-transform: uppercase; white-space: nowrap;
}
.strip:hover { transform: rotate(-2.5deg); background: #fff; }
.strip:focus-visible { outline-offset: -4px; }
.strip.torn { animation: tear 0.75s cubic-bezier(0.3, 0.6, 0.4, 1) forwards; }
.strip.regrow { animation: regrow 0.45s ease-out; }
@keyframes tear {
  0% { transform: rotate(0); }
  25% { transform: rotate(-7deg); }
  100% { transform: translate(-6px, 60px) rotate(-16deg); opacity: 0; }
}
@keyframes regrow { from { opacity: 0; } to { opacity: 1; } }
/* before a Kennung is entered only the perforation fades; labels keep full ink */
.lead-sheet[data-ready="false"] .strips { border-top-color: rgba(0, 0, 0, 0.16); }
.status { min-height: 1.6em; margin: 0; padding: 10px 0 14px; font-size: 0.92rem; color: var(--ink-muted); }
.status.ok { color: var(--ok); font-weight: 600; }

/* What is this */
.wide { max-width: 980px; }
.what { justify-self: end; transform: rotate(-0.35deg); --pin: var(--pin-blue); }
.cols { display: grid; gap: 0 32px; grid-template-columns: 1fr 1fr; }
.cols p { margin: 0 0 12px; }

/* Setup */
.setup { display: grid; gap: 18px; }
.board-note { margin: 0; max-width: 60ch; color: var(--on-felt); }
/* the device notices hang in one column; the "does it work" slip is pinned beside them */
.devices { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 22px 32px; align-items: start; }
.devices > details { grid-column: 1; }
.devices > .check { grid-column: 2; grid-row: 1 / span 3; position: sticky; top: 24px; }
.card { padding: 0; }
.card:nth-child(odd) { transform: rotate(-0.45deg); }
.card:nth-child(even) { transform: rotate(0.5deg); --pin: var(--pin-blue); }
.card:nth-child(3) { --pin: var(--pin-green); }
summary {
  cursor: pointer; list-style: none;
  display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 12px;
  padding: 30px 52px 18px 22px; position: relative;
}
summary::-webkit-details-marker { display: none; }
summary span { font: 700 1.65rem/1.05 var(--display); text-transform: uppercase; letter-spacing: 0.02em; }
summary small { color: var(--ink-muted); font-size: 0.9rem; }
/* plus / minus drawn as two bars */
summary::after {
  content: ""; position: absolute; right: 20px; top: 34px; width: 16px; height: 16px;
  background:
    linear-gradient(var(--ink), var(--ink)) center / 16px 2.5px no-repeat,
    linear-gradient(var(--ink), var(--ink)) center / 2.5px 16px no-repeat;
}
details[open] summary::after { background: linear-gradient(var(--ink), var(--ink)) center / 16px 2.5px no-repeat; }
summary:hover span { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
details ol { margin: 0; padding: 0 22px 6px 44px; }
details li { margin-bottom: 8px; }
.note { margin: 4px 22px 20px; padding: 10px 12px; background: rgba(0, 0, 0, 0.055); border-radius: 3px; font-size: 0.93rem; }
.slot {
  display: inline-block; padding: 0 0.45em; border: 1.5px dashed rgba(0, 0, 0, 0.45); border-radius: 3px;
  font: 0.82em var(--mono); color: var(--ink-muted); white-space: nowrap;
}
/* layered: the check slip is pinned over the edge of the device column */
.check { transform: rotate(1.2deg); z-index: 2; margin: 46px 0 0 -58px; }

/* Official notice */
.notice { --pin: var(--pin-red); }
.notice::after {
  content: ""; position: absolute; top: 9px; right: 18px; width: 16px; height: 16px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.75) 0 12%, var(--pin-red) 42%, rgba(0, 0, 0, 0.55) 100%);
  box-shadow: 2px 4px 3px rgba(0, 0, 0, 0.4);
}
.notice::before { left: 26px; margin-left: 0; }
.notice h2 { padding-bottom: 10px; border-bottom: 3px double var(--ink); margin-bottom: 14px; }
.notice > p { max-width: 70ch; }
.retention { width: 100%; border-collapse: collapse; margin: 12px 0 18px; font-variant-numeric: tabular-nums; }
.retention th, .retention td { text-align: left; padding: 10px 12px 10px 0; border-top: 1px solid var(--rule); vertical-align: top; }
.retention thead th { border-top: 0; border-bottom: 2px solid var(--ink); font: 600 0.95rem/1.2 var(--display); text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-muted); }
.retention tbody th { white-space: nowrap; }
.retention .dur { white-space: nowrap; font-weight: 700; }

/* Stop and fallback */
.stop-row { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 28px; align-items: start; }
.stop { transform: rotate(0.5deg); z-index: 2; }
.stop ul { padding-left: 1.1em; margin: 0 0 12px; }
.stop li { margin-bottom: 4px; }
/* the older Quad9 slip sits partly under the Aufhören note */
.fallback { transform: rotate(-0.9deg); margin: 40px 0 0 -54px; z-index: 1; padding-left: calc(54px + clamp(18px, 2.4vw, 28px)); }
.fallback .typed-addr { margin-top: 10px; }

/* Imprint and privacy: one typed sheet pinned low in the case, two columns divided by a fold */
.legal-row {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 0; align-items: start;
  max-width: 1040px; justify-self: center; width: 100%;
  font-size: 0.93rem; --pin: var(--pin-blue);
  transform: rotate(-0.3deg);
  padding-top: 34px;
}
.legal { padding: 0 28px; }
.legal:first-child { padding-left: 0; }
.legal + .legal { border-left: 1px dashed var(--rule); padding-right: 0; }
.legal h2 { font-size: 1.45rem; margin-bottom: 12px; }
.legal h3 { font: 600 0.9rem/1.25 var(--display); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-muted); margin: 16px 0 3px; }
.legal h2 + h3 { margin-top: 0; }
.legal address { font-style: normal; }
#impressum p { margin-bottom: 0; }
#datenschutz { max-width: 72ch; }
#datenschutz h3 { margin-top: 20px; }
#datenschutz p, #datenschutz ul { margin: 0 0 10px; }
#datenschutz ul { padding-left: 1.2em; }
#datenschutz li { margin-bottom: 4px; }

/* Bottom rail */
.sill { position: relative; display: flex; justify-content: center; align-items: center; padding: 18px 8px 20px; }
.typeplate nav { display: flex; flex-wrap: wrap; justify-content: center; }
.typeplate p { margin: 0; }
.typeplate a { text-decoration: none; text-transform: uppercase; }

/* An engraved brass type plate on the bottom rail, a lock beside it */
.typeplate {
  position: relative;
  max-width: 640px; width: 100%;
  padding: 12px 30px 11px;
  border-radius: 4px;
  text-align: center;
  color: #2a210d;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.35), rgba(255, 255, 255, 0) 45%, rgba(0, 0, 0, 0.12)), #c8a347;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55), inset 0 -1px 0 rgba(0, 0, 0, 0.3), 0 2px 3px rgba(0, 0, 0, 0.35);
}
.typeplate .tp-name { font: 700 1.1rem/1.2 var(--display); letter-spacing: 0.05em; }
.typeplate nav { gap: 2px 18px; margin: 5px 0 6px; padding: 5px 0; border-top: 1px solid rgba(42, 33, 13, 0.35); border-bottom: 1px solid rgba(42, 33, 13, 0.35); }
.typeplate a { color: #2a210d; font: 600 0.98rem/1.3 var(--display); letter-spacing: 0.1em; }
.typeplate a:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }
.typeplate .tp-note { font-size: 0.82rem; color: #3b2f13; }
.typeplate .screw { top: 10px; margin-top: 0; background: linear-gradient(135deg, transparent 42%, rgba(0, 0, 0, 0.5) 42% 58%, transparent 58%), #b08c33; }
.lock {
  position: absolute; right: clamp(16px, 4vw, 48px); top: 50%; width: 26px; height: 26px; margin-top: -13px; border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, transparent 0 4px, rgba(0, 0, 0, 0) 4px),
              radial-gradient(circle at 38% 32%, #f1f2f1, #9da29f 70%);
  box-shadow: inset 0 0 0 2px rgba(0, 0, 0, 0.25), 0 1px 2px rgba(0, 0, 0, 0.4);
}
.lock::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 3px; height: 11px; margin: -5.5px 0 0 -1.5px; border-radius: 2px; background: #2a2e2c;
}
@media (prefers-color-scheme: dark) {
  .typeplate { background: linear-gradient(180deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0) 45%, rgba(0, 0, 0, 0.15)), #a98a3c; }
}

/* Tablet and phone: one column, everything stays inside the one case */
@media (max-width: 860px) {
  .opening { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; gap: 0; }
  .devices > details, .devices > .check { grid-column: 1; grid-row: auto; position: relative; top: 0; }
  .check { margin: 0; }
  .fallback { margin: -18px 10px 0; padding: 40px clamp(18px, 2.4vw, 28px) 22px; }
  .opening .letterboard, .lead-sheet, .slip.pink { grid-column: 1; grid-row: auto; }
  .lead-sheet { margin: -14px 6px 0; transform: rotate(0.6deg); }
  .slip.pink { margin: 26px 0 0 4px; max-width: none; }
  .devices, .stop-row, .legal-row, .cols { grid-template-columns: 1fr; }
  .legal, .legal:first-child, .legal + .legal { padding: 0; border-left: 0; }
  .legal + .legal { margin-top: 20px; padding-top: 18px; border-top: 1px dashed var(--rule); }
}
@media (max-width: 520px) {
  body { font-size: 16px; padding: 16px; }
  .case { border-radius: 14px; }
  .plate { padding: 12px 4px; }
  .name { font-size: 1.45rem; }
  .plate { justify-content: center; }
  /* phone: the four signs share one row under the name plate */
  .signs { width: 100%; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .signs a { text-align: center; }
  .signs { gap: 6px; }
  .signs a { padding: 7px 2px 6px; font-size: 0.8rem; letter-spacing: 0.04em; }
  .signs a::before, .signs a::after { display: none; }
  .typeplate { padding: 12px 14px 11px; }
  .lock { display: none; }
  .legal-row { transform: none; }
  .board { padding: 14px; gap: 26px; }
  .letterboard { border-width: 5px; padding: 16px 14px; }
  .letterboard h1 { font-size: clamp(2rem, 10vw, 2.6rem); }
  .letterboard h1 span { display: inline; }
  .strip { height: 118px; }
  .strip span { font-size: 1rem; }
  .retention thead { display: none; }
  .retention, .retention tbody, .retention tr, .retention th, .retention td { display: block; width: 100%; }
  .retention tr { border-top: 1px solid var(--rule); padding: 10px 0; }
  .retention th, .retention td { border: 0; padding: 2px 0; }
  .retention .dur { white-space: normal; }
  .card:nth-child(n), .stop, .fallback, .check, .what, .slip.pink, .lead-sheet { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .strip, .strip:hover { transition: none; transform: none; }
  .strip.torn, .strip.regrow { animation: none; }
}
