:root {
  --bg: #43372a;
  --card: #fdf9ec;
  --card-2: #f2e8cf;
  --manila: #f3ead0;
  --ink: #3c3630;
  --muted: #7c7266;
  --faint: #a89c8a;
  --purple: #2f4156;
  --purple-2: #3a5068;
  --purple-soft: #e7e5d6;
  --gold: #d9a139;
  --teal: #2e6b4f;
  --rose: #a83a38;
  --brown: #8a6a48;
  --sans: "Lexend", ui-sans-serif, -apple-system, "Segoe UI", Inter, Helvetica, Arial, sans-serif;
  --serif: "Fraunces", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --r: 6px;
  --shadow: 0 14px 34px -14px rgba(15, 10, 5, 0.55);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15.5px;
  line-height: 1.6;
  background:
    radial-gradient(ellipse at 50% 115%, rgba(0, 0, 0, 0.3), transparent 55%),
    linear-gradient(180deg, #243530, #54544a 42%, #a87a4a 72%, #d99b55);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body:after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 50;
  opacity: 0.05;
  mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/></filter><rect width='180' height='180' filter='url(%23n)'/></svg>");
}
button {
  font: inherit;
  color: inherit;
  border: 0;
  background: none;
  cursor: pointer;
}

.wrap {
  position: relative;
  max-width: 1320px;
  margin: 0 auto;
  padding: 26px 28px 60px;
  min-height: 560px;
}

.top {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
  padding: 10px 2px 13px;
  border-bottom: 1px solid rgba(217, 161, 57, 0.35);
}
.top .t1 {
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #e8dfc8;
}
.top .case {
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 700;
  color: #b8ab8d;
}
.tid {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
}
.days {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
}
.stamps {
  display: flex;
  gap: 5px;
  align-items: center;
}
.stamps .s {
  width: 13px;
  height: 13px;
  border-radius: 3px;
  border: 1.5px solid rgba(232, 223, 200, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 800;
  color: transparent;
}
.stamps .s.ok {
  border-color: var(--teal);
  color: #7fc2a3;
  background: rgba(46, 107, 79, 0.25);
}
.stamps .s.no {
  border-color: var(--rose);
  color: #e2a09e;
  background: rgba(168, 58, 56, 0.25);
}
.streakchip {
  display: none;
  align-items: center;
  gap: 6px;
  border: 1.2px solid rgba(217, 161, 57, 0.7);
  color: #e8cf9a;
  border-radius: 3px;
  padding: 3px 9px;
  font-size: 10px;
  font-weight: 800;
}
.streakchip:before {
  content: "";
  width: 5px;
  height: 5px;
  background: var(--gold);
  transform: rotate(45deg);
}
.streakchip.on {
  display: inline-flex;
}
.streakchip.bump {
  animation: stBump 0.3s ease-out;
}
@keyframes stBump {
  50% {
    transform: scale(1.2);
  }
}
.goldchip {
  display: inline-block;
  border: 3px solid #c9962e;
  color: #8a6414;
  background: rgba(217, 161, 57, 0.14);
  border-radius: 6px;
  padding: 4px 11px;
  font-weight: 800;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transform: rotate(-2deg);
  margin: 0 0 12px 10px;
}

.grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.6fr) minmax(540px, 1.4fr);
  gap: 26px;
  align-items: start;
}
.panel {
  position: relative;
}
.casefile .paper {
  box-shadow: var(--shadow);
}
.log {
  box-shadow: var(--shadow);
}
.ph {
  display: none !important;
}
.ph .r {
  margin-left: auto;
  color: var(--faint);
  font-weight: 600;
  letter-spacing: 0.08em;
}

/* ---------- case file ---------- */
.paper {
  position: relative;
  margin: 0 0 14px;
  background: var(--card-2);
  border-radius: 6px;
  padding: 20px 20px 44px;
}
.paper h1 {
  margin: 0 0 10px;
  font-family: var(--serif);
  font-size: 23px;
  line-height: 1.2;
}
body:not(.briefing) .paper {
  padding-top: 42px;
}
.stim {
  font-family: var(--serif);
  font-size: 16px;
  line-height: 1.68;
  color: #453d33;
  margin: 0;
}
.exhibit {
  float: right;
  width: 200px;
  margin: 4px -4px 12px 18px;
  background: #fdfaf1;
  padding: 7px 7px 5px;
  border: 1px solid rgba(60, 48, 30, 0.18);
  box-shadow: 0 10px 22px -10px rgba(40, 25, 8, 0.55);
  transform: rotate(1.6deg);
  position: relative;
}
.exhibit:before,
.exhibit:after {
  content: "";
  position: absolute;
  width: 34px;
  height: 12px;
  background: rgba(240, 228, 196, 0.75);
  box-shadow: 0 1px 2px rgba(40, 25, 8, 0.2);
}
.exhibit:before {
  top: -6px;
  left: 14px;
  transform: rotate(-4deg);
}
.exhibit:after {
  top: -6px;
  right: 14px;
  transform: rotate(5deg);
}
.exhibit svg,
.exhibit img {
  width: 100%;
  display: block;
}
.exhibit figcaption {
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 5px 2px 2px;
  text-align: center;
}
.exhibit figcaption b {
  color: var(--rose);
  font-weight: 700;
}
.hypotag {
  display: inline-block;
  background: var(--purple);
  color: #fdf9ec;
  border-radius: 4px;
  padding: 2px 8px;
  font-family: var(--sans);
  font-size: 8.5px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  vertical-align: 2px;
  margin-right: 5px;
}
.concl {
  margin-top: 12px;
}
/* an argument that opens with its hypothesis: the body follows the callout */
.concl + .stim {
  margin-top: 12px;
}
.hlab {
  display: block;
  font-family: var(--sans);
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 800;
  color: var(--purple);
  margin-bottom: 3px;
}
mark.hypo {
  background: rgba(47, 65, 86, 0.12);
  color: inherit;
  padding: 1px 0;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  padding: 1px 2px;
  border-radius: 3px;
}
.stamp {
  position: absolute;
  top: 16px;
  right: 16px;
  transform: rotate(6deg);
  border: 2.5px solid var(--rose);
  color: var(--rose);
  border-radius: 6px;
  padding: 4px 9px;
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 800;
  opacity: 0.8;
}

.log {
  margin: 0 0 18px;
  padding: 13px 15px;
  border-radius: 6px;
  background: var(--card-2);
}
.log .logk {
  font-size: 9.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--faint);
  font-weight: 800;
  margin-bottom: 8px;
}
.logl {
  display: flex;
  gap: 9px;
  font-family: var(--mono);
  font-size: 10.5px;
  line-height: 1.5;
  padding: 2.5px 0;
  color: #453d33;
  animation: rise 0.3s ease-out both;
}
.logl .lm {
  flex: none;
  font-weight: 800;
}
.logempty {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--faint);
  font-style: italic;
}

.play {
  padding: 0;
}
.ask {
  font-family: var(--serif);
  font-size: 21px;
  line-height: 1.35;
  margin: 4px 2px 16px;
  font-weight: 600;
  color: #f0e8d2;
  text-shadow: 0 2px 10px rgba(20, 12, 4, 0.5);
}
.hint {
  font-size: 13.5px;
  color: #c9bda2;
  margin-bottom: 18px;
}

/* ---------- flat map ---------- */
.mapwrap {
  border-radius: 6px 6px 0 0;
  background: #e8e2c8;
  overflow: hidden;
  box-shadow: 0 30px 70px -28px rgba(8, 5, 2, 0.9);
}
.mapwrap svg {
  width: 100%;
  height: auto;
  display: block;
}
.maplab {
  font-family: var(--sans);
  font-size: 8.5px;
  letter-spacing: 0.08em;
  font-weight: 700;
  fill: #4a4436;
  text-transform: uppercase;
  paint-order: stroke;
  stroke: rgba(232, 226, 200, 0.92);
  stroke-width: 2.6px;
  pointer-events: none;
}
.mapwrap .cdot {
  fill: #4a4436;
}
.mapwrap .ctext {
  font-size: 7px;
  letter-spacing: 0.13em;
  font-weight: 700;
  fill: #4a4436;
  paint-order: stroke;
  stroke: rgba(230, 222, 194, 0.9);
  stroke-width: 2.5px;
}
.mapwrap .regA {
  font-size: 8.5px;
  letter-spacing: 0.3em;
  font-weight: 700;
  fill: #6f8577;
}
.mapwrap .regB {
  font-size: 7px;
  letter-spacing: 0.22em;
  font-weight: 700;
  fill: #8d8264;
}
.mapwrap .regC {
  font-size: 6.6px;
  letter-spacing: 0.16em;
  font-weight: 700;
  fill: #9a9170;
}
.mapwrap .ital {
  font-size: 6.2px;
  font-style: italic;
  font-family: Georgia, serif;
  fill: #7c7258;
  letter-spacing: 0.05em;
  paint-order: stroke;
  stroke: rgba(232, 226, 200, 0.85);
  stroke-width: 2px;
}
.pin {
  cursor: pointer;
}
.pin .ring {
  fill: none;
  stroke: #d9a139;
  stroke-width: 2.2;
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
  animation: pinring 2.8s ease-out infinite;
}
@keyframes pinring {
  0% {
    transform: scale(0.45);
    opacity: 0.8;
  }
  65% {
    transform: scale(1.75);
    opacity: 0;
  }
  100% {
    transform: scale(1.75);
    opacity: 0;
  }
}
.pin .pbody {
  transition: transform 0.2s cubic-bezier(0.2, 1.6, 0.4, 1);
  transform-box: fill-box;
  transform-origin: center bottom;
}
.pin:hover .pbody {
  transform: translateY(-4px) scale(1.12);
}
.pin.sel .pbody {
  animation: bounce 0.55s cubic-bezier(0.3, 1.8, 0.4, 1) infinite alternate;
}
@keyframes bounce {
  from {
    transform: translateY(0);
  }
  to {
    transform: translateY(-6px);
  }
}
.pin.used {
  cursor: pointer;
}
.pin.used .maplab {
  opacity: 0.55;
}

.pinbar {
  margin-top: 0;
  padding: 12px 18px;
  border-radius: 0 0 6px 6px;
  background: #26364a;
  box-shadow: 0 30px 70px -28px rgba(8, 5, 2, 0.9);
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 60px;
}
.pinbar:before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold);
  flex: none;
}
.pinbar .pt {
  flex: 1;
  min-width: 0;
}
.pinbar .place {
  font-size: 9.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 800;
  margin-bottom: 2px;
}
.pinbar .lt {
  font-size: 14.5px;
  line-height: 1.4;
  font-weight: 600;
  color: #e8dfc8;
}
.pinbar .hintline {
  color: #c9d2dd;
  font-size: 13px;
}
.gobtn {
  flex: none;
  padding: 10px 22px;
  border-radius: 3px;
  background: transparent;
  color: #f2ede0;
  border: 1.3px solid rgba(232, 223, 200, 0.55);
  font-size: 12.5px;
  font-weight: 600;
  transition: 0.15s;
}
.gobtn:hover {
  border-color: var(--gold);
  color: #fff;
  box-shadow: inset 0 -2px 0 var(--gold);
}
.gobtn:active {
  transform: translateY(1px);
}

/* ---------- documents ---------- */
.doc {
  position: relative;
  border-radius: 6px;
  padding: 13px 16px 12px;
  margin-bottom: 10px;
  background: var(--card-2);
  overflow: hidden;
}
.verdict {
  font-size: 14px;
  color: var(--muted);
  margin: 0 2px 22px;
  line-height: 1.5;
}
.verdict b {
  color: var(--ink);
  font-weight: 700;
}
.verdict .vok {
  color: var(--teal);
  font-weight: 700;
}
.verdict .vno {
  color: var(--rose);
  font-weight: 700;
}

.t1-short {
  display: none;
}
.askq {
  font-size: 13px;
  color: var(--muted);
  margin: 0 2px 12px;
  line-height: 1.45;
}

/* ---------- the lead as a single Bureau form ---------- */
body.docmode .mappanel {
  background: none;
  box-shadow: none;
}
body.docmode .panel.casefile {
  display: none;
}
body.docmode .grid {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  padding-top: 22px;
  min-height: 560px;
}
#duskBg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 950px 560px at 50% -100px, rgba(245, 217, 160, 0.08), transparent 62%),
    linear-gradient(180deg, #243530, #54544a 42%, #a87a4a 72%, #d99b55);
}
#duskBg svg {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 46%;
  display: block;
}
.wrap {
  position: relative;
  z-index: 1;
}
:root {
  --gk-card: var(--card);
  --gk-ink: var(--ink);
  --gk-muted: #4a4234;
  --gk-line: transparent;
  --gk-radius: 6px;
  --gk-accent: var(--purple);
  --gk-accent-ink: #f2ede0;
  --gk-menu-ink: #cfc4a8;
  --gk-menu-line: rgba(232, 223, 200, 0.45);
}
body.docmode .mappanel .ph {
  display: none;
}
body.docmode .play {
  padding: 0;
}
body.docmode #s2ask,
body.docmode #s2hint {
  display: none;
}
body.docmode .theorybar {
  display: none !important;
}
.sheetdoc {
  position: relative;
  z-index: 0;
  background: var(--card-2);
  border-radius: 6px;
  padding: 0 32px 26px;
  box-shadow:
    0 22px 44px -18px rgba(40, 25, 8, 0.75),
    0 2px 0 rgba(255, 250, 235, 0.5) inset;
  max-width: 780px;
  margin: 0 auto;
  overflow: hidden;
}
.sheetdoc:before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.07;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/></filter><rect width='180' height='180' filter='url(%23n)'/></svg>");
}
.sd-stack {
  position: relative;
  max-width: 780px;
  margin: 0 auto;
}

.sd-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 -32px 18px;
  padding: 9px 32px;
  background: var(--purple);
  color: #fdf9ec;
  font-size: 9.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 800;
}
.sd-head .shr {
  color: #c9d2dd;
  font-weight: 700;
}
.sd-hr {
  border: 0;
  border-top: 1px solid rgba(60, 48, 30, 0.18);
  margin: 16px 0 0;
}
.sd-place {
  margin-top: 22px;
  font-size: 9.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 800;
  color: var(--muted);
  margin-bottom: 5px;
}
.sd-hyp {
  font-family: var(--serif);
  font-style: italic;
  font-size: 15.5px;
  line-height: 1.5;
  color: #3b3428;
  margin: 0 0 7px;
}
.sd-hyp .hk {
  font-family: var(--sans);
  font-style: normal;
  background: var(--purple);
  color: #fdf9ec;
  border-radius: 4px;
  padding: 2px 8px;
  font-size: 8.5px;
  letter-spacing: 0.12em;
  font-weight: 800;
  text-transform: uppercase;
  margin-right: 7px;
  vertical-align: 2px;
}
.argfold {
  margin-bottom: 2px;
}
.argfold summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--muted);
}
.argfold summary::-webkit-details-marker {
  display: none;
}
.argfold summary:before {
  content: "▸";
  transition: transform 0.15s;
  color: var(--gold);
}
.argfold[open] summary:before {
  transform: rotate(90deg);
}
.argfold summary:hover {
  color: var(--ink);
}
.argfold .sum-h {
  display: none;
}
.argfold[open] .sum-r {
  display: none;
}
.argfold[open] .sum-h {
  display: inline;
}
.argbody {
  font-family: var(--serif);
  font-size: 15.5px;
  color: #655c4f;
  line-height: 1.6;
  margin: 8px 0 0;
}
.sd-title {
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 600;
  line-height: 1.25;
  margin: 0 0 0;
  max-width: 90%;
}
fieldset.sd-find {
  margin-top: 20px;
  border: 1.6px solid rgba(60, 48, 30, 0.45);
  border-radius: 4px;
  padding: 12px 18px 15px;
  background: rgba(253, 250, 236, 0.6);
}
fieldset.sd-find legend {
  background: var(--purple);
  color: #fdf9ec;
  border-radius: 4px;
  padding: 3px 10px;
  font-size: 9px;
  letter-spacing: 0.14em;
  font-weight: 800;
  text-transform: uppercase;
  font-family: var(--sans);
  margin-left: -4px;
}
.sd-find p {
  margin: 0;
  font-family: var(--serif);
  font-size: 20px;
  line-height: 1.42;
  color: var(--ink);
  max-width: 62ch;
}
.sd-rule {
  border: 0;
  border-top: 1.5px solid rgba(60, 48, 30, 0.22);
  margin: 22px 0 16px;
}
.sd-k {
  font-size: 9.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 800;
  color: var(--purple);
  margin-bottom: 10px;
}
.sd-mark .acts {
  gap: 10px;
}
.sd-mark .act {
  box-shadow: none;
  border: 1.5px solid rgba(60, 48, 30, 0.28);
  border-radius: 4px;
  padding: 13px 10px;
  transition: 0.12s;
}
.sd-mark .act[data-v="helps"] {
  background: rgba(46, 107, 79, 0.09);
}
.sd-mark .act[data-v="hurts"] {
  background: rgba(168, 58, 56, 0.055);
}
.sd-mark .act[data-v="neither"] {
  background: rgba(60, 48, 30, 0.07);
}
.sd-mark .act:active {
  transform: translateY(2px);
  filter: brightness(0.94);
}
.sd-mark .act .g {
  background: transparent;
  width: auto;
  height: auto;
  margin: 0 0 5px;
  font-size: 22px;
  line-height: 1;
}
.sd-mark .act[data-v="helps"] .g {
  color: var(--teal);
}
.sd-mark .act[data-v="hurts"] .g {
  color: var(--rose);
}
.sd-mark .act[data-v="neither"] .g {
  color: var(--muted);
}
.sd-mark .act:hover {
  transform: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 2.5px rgba(217, 161, 57, 0.35);
}
.sd-mark .act[data-v]:hover .g {
  background: transparent;
}
.sd-mark .act[data-v="helps"]:hover .g {
  color: var(--teal);
}
.sd-mark .act[data-v="hurts"]:hover .g {
  color: var(--rose);
}
.sd-mark .act[data-v="neither"]:hover .g {
  color: var(--ink);
}
.sd-mark .verdict {
  margin: 0;
}
.sd-mark {
  position: relative;
}
.sd-mark .vs {
  top: -8px;
  right: 0;
}
body.docmode #note {
  max-width: 780px;
  margin: 20px auto 0;
}
body.docmode .backlink {
  max-width: 780px;
  margin-left: auto;
  margin-right: auto;
  display: block;
  color: rgba(240, 232, 210, 0.92);
  text-decoration-color: rgba(240, 232, 210, 0.5);
}
body.docmode .backlink:hover {
  color: #f3ead0;
}
.askq b {
  color: var(--ink);
  font-weight: 700;
}

.vs {
  position: absolute;
  right: 16px;
  top: 14px;
  z-index: 4;
  pointer-events: none;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 5px 11px;
  border-radius: 6px;
  border: 2.5px solid currentColor;
  opacity: 0;
  transform: rotate(6deg) scale(1.6);
}
.vs.stamped {
  animation: stampIn 0.4s cubic-bezier(0.2, 1.6, 0.4, 1) forwards;
}
@keyframes stampIn {
  0% {
    opacity: 0;
    transform: rotate(6deg) scale(1.6);
  }
  100% {
    opacity: 0.9;
    transform: rotate(6deg) scale(1);
  }
}
.vs.ok {
  color: var(--teal);
}
.vs.no {
  color: var(--rose);
}

.acts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.act {
  padding: 12px 12px;
  border-radius: 4px;
  background: var(--card);
  text-align: center;
  box-shadow: var(--shadow);
  transition: 0.15s;
}
.act:hover {
  transform: translateY(-3px);
}
.act:disabled {
  opacity: 0.4;
  pointer-events: none;
}
.act .g {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  margin: 0 auto 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  background: #f0e8d4;
  color: var(--muted);
  transition: 0.15s;
  font-weight: 700;
}
.act .t {
  font-size: 13.5px;
  font-weight: 700;
}
.act[data-v="helps"]:hover .g {
  background: var(--teal);
  color: #fff;
}
.act[data-v="hurts"]:hover .g {
  background: var(--rose);
  color: #fff;
}
.act[data-v="neither"]:hover .g {
  background: var(--ink);
  color: #fff;
}

/* ---------- the sage ---------- */
.dlg {
  margin-top: 18px;
  display: flex;
  gap: 14px;
  align-items: flex-end;
  animation: rise 0.35s cubic-bezier(0.2, 1.4, 0.4, 1) both;
}
.sagebox {
  flex: none;
  width: 104px;
}
.sagebox svg {
  width: 104px;
  height: auto;
  display: block;
}
.blink {
  transform-box: fill-box;
  transform-origin: center;
  animation: sblink 4.4s steps(1) infinite;
}
@keyframes sblink {
  0%,
  91% {
    transform: scaleY(1);
  }
  93%,
  96% {
    transform: scaleY(0.12);
  }
  98%,
  100% {
    transform: scaleY(1);
  }
}
.bubble {
  flex: 1;
  position: relative;
  background: var(--card);
  border-radius: 6px;
  padding: 14px 17px;
  box-shadow: var(--shadow);
}
.dsig-unused {
  display: none;
  color: var(--brown, #8a6a3a);
  margin-top: 8px;
  color: #a97a20;
}
.dname {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  color: var(--purple);
  margin-bottom: 5px;
}
.bubble p {
  margin: 0;
  font-size: 14px;
  line-height: 1.65;
}
.bubble b {
  color: var(--purple);
  font-weight: 700;
}
.btn {
  margin-top: 13px;
  width: 100%;
  padding: 13px;
  border-radius: 3px;
  background: var(--purple);
  color: #f2ede0;
  font-size: 13.5px;
  font-weight: 600;
  box-shadow:
    inset 0 1px 0 rgba(255, 250, 235, 0.16),
    0 10px 24px -12px rgba(20, 12, 4, 0.7);
  transition: 0.15s;
}
.btn:hover {
  background: #354962;
  box-shadow:
    inset 0 1px 0 rgba(255, 250, 235, 0.16),
    inset 0 -2px 0 var(--gold),
    0 10px 24px -12px rgba(20, 12, 4, 0.7);
}
.btn:active {
  transform: translateY(1px);
}
.bubble.bad .dname {
  color: var(--rose);
}
.bubble.bad:after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 6px;
  pointer-events: none;
  box-shadow: inset 3px 0 0 var(--rose);
}

/* ---------- debrief ---------- */
.veil {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 24px;
  background: rgba(60, 54, 48, 0.45);
  backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  transition: 0.35s;
}
.veil.on {
  opacity: 1;
  pointer-events: auto;
}
.deb {
  max-width: 940px;
  width: 100%;
  max-height: 88vh;
  overflow: auto;
  border-radius: 6px;
  padding: 0;
  background: var(--card-2);
  box-shadow: 0 30px 80px -20px rgba(40, 28, 10, 0.5);
  transform: translateY(16px) scale(0.98);
  transition: 0.4s cubic-bezier(0.2, 1.2, 0.4, 1);
}
.veil.on .deb {
  transform: none;
}
.repband {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 30px;
  background: var(--purple);
  color: #fdf9ec;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 800;
}
.repband .r {
  color: #c9d2dd;
  font-weight: 700;
}
.rbody {
  position: relative;
  padding: 22px 30px 26px;
}
.rbody:before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.07;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/></filter><rect width='180' height='180' filter='url(%23n)'/></svg>");
}
.headrow {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
}
.deb h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.2;
}
.repmeta {
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 5px;
}
.headrow .goldchip {
  margin-top: 10px;
}
.rstamp {
  flex: none;
  transform: rotate(5deg);
  border: 3px solid var(--rose);
  color: var(--rose);
  border-radius: 5px;
  padding: 7px 13px;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 800;
  text-align: center;
  line-height: 1.5;
  opacity: 0.88;
}
.rstamp small {
  display: block;
  font-size: 8.5px;
  letter-spacing: 0.15em;
  opacity: 0.75;
}
.tally {
  display: flex;
  border: 1.5px solid rgba(60, 48, 30, 0.3);
  border-radius: 4px;
  margin: 18px 0;
  background: rgba(253, 250, 236, 0.55);
}
.tc {
  flex: 1;
  text-align: center;
  padding: 13px 8px;
}
.tc + .tc {
  border-left: 1px solid rgba(60, 48, 30, 0.18);
}
.tv {
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 600;
  color: var(--purple);
}
.tv span {
  font-size: 14px;
  color: var(--faint);
}
.tk {
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 800;
  color: var(--muted);
  margin-top: 3px;
}
.reparg {
  margin-top: 22px;
}
.repnotes {
  background: var(--card);
  border-radius: 4px;
  border: 1px solid rgba(60, 48, 30, 0.14);
  padding: 13px 16px;
  margin: 24px 0 26px;
}
.nlab {
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 800;
  color: var(--muted);
  margin-bottom: 6px;
}
.repnotes p {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: #4a4234;
}
.seclab {
  font-size: 9.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 800;
  color: var(--purple);
  margin: 20px 0 4px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.seclab:after {
  content: "";
  flex: 1;
  border-top: 1px solid rgba(60, 48, 30, 0.18);
}
.seclab.sec-s {
  color: var(--teal);
}
.seclab.sec-w {
  color: var(--rose);
}
.seclab.sec-n {
  color: var(--muted);
}
.ledger {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 30px;
}
.lrow {
  display: flex;
  gap: 10px;
  padding: 11px 2px;
  border-bottom: 1px solid rgba(60, 48, 30, 0.14);
  align-items: baseline;
}
.lrow.miss {
  background: rgba(168, 58, 56, 0.05);
  border-radius: 4px;
  padding-left: 10px;
  padding-right: 10px;
}
.lmk {
  color: var(--teal);
  font-weight: 800;
  flex: none;
  font-size: 13px;
}
.lmk.bad {
  color: var(--rose);
}
.lbody {
  flex: 1;
  min-width: 0;
}
.lt {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 3px;
}
.lplace {
  font-size: 9.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 800;
  color: var(--muted);
}
.lfind {
  font-family: var(--serif);
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--ink);
}
.lyou {
  margin-top: 3px;
  font-size: 11px;
  font-weight: 700;
  color: var(--rose);
}
.lyou .lcorr {
  color: var(--teal);
}
.lwhy {
  margin-top: 5px;
}
.lwhy summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--faint);
}
.lwhy summary::-webkit-details-marker {
  display: none;
}
.lwhy summary:before {
  content: "▸";
  transition: transform 0.15s;
  color: var(--gold);
}
.lwhy[open] summary:before {
  transform: rotate(90deg);
}
.lwhy summary:hover {
  color: var(--muted);
}
.lwhyt {
  font-size: 12.5px;
  line-height: 1.55;
  color: #5a5142;
  margin-top: 4px;
}
.lwhyt b {
  color: var(--purple);
}

/* ---------- mobile theory strip ---------- */
.theorybar {
  display: none;
}
.casefile .ph .chev {
  display: none;
}

/* ---------- mobile map modes ---------- */
.maphint {
  display: none !important;
}

#stage.sw {
  animation: stageIn 0.28s ease-out;
}
@keyframes stageIn {
  from {
    opacity: 0;
    transform: translateY(6px) scale(0.988);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* The file room is a block of the document, so the host sizes the embed from it. While it
   fades out it floats over the case in the same place. */
#titleCard {
  position: relative;
  min-height: 600px;
  padding: 48px 24px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  cursor: pointer;
  background:
    radial-gradient(ellipse 800px 500px at 50% 32%, rgba(233, 203, 140, 0.16), transparent 62%),
    #43372a;
  transition: opacity 0.5s;
}
#titleCard > * {
  animation: tcIn 0.6s ease-out both;
}
@keyframes tcIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
.tc-t {
  font-family: var(--serif);
  font-size: clamp(30px, 6vw, 46px);
  color: #f2ead6;
  text-align: center;
  padding: 0 20px;
}
#titleCard.out {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 70;
  opacity: 0;
  pointer-events: none;
}
body.shelf .wrap {
  display: none;
}
html.gk-window #titleCard {
  min-height: 100vh;
}
.tc-sub {
  font-size: 13.5px;
  color: #c9bba0;
  font-weight: 500;
  margin-top: 6px;
}
.tc-cases {
  display: flex;
  gap: 26px;
  margin-top: 22px;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-end;
  padding: 0 20px;
}
.tc-icons {
  position: absolute;
  top: 16px;
  right: 16px;
  display: flex;
  gap: 10px;
}
.tcase {
  position: relative;
  width: 225px;
  height: 265px;
  cursor: pointer;
  border: 0;
  background: none;
  padding: 0;
  font: inherit;
  color: inherit;
  text-align: left;
  transition: transform 0.18s ease;
  flex: none;
}
.tcase:hover,
.tcase:focus-visible {
  transform: translateY(-8px) rotate(-0.4deg);
  outline: none;
}
.tcase:hover .fol-body,
.tcase:focus-visible .fol-body {
  box-shadow:
    0 26px 40px -14px rgba(8, 5, 2, 0.85),
    0 0 0 2.5px rgba(217, 161, 57, 0.45);
}
.fol-tab {
  position: absolute;
  top: 0;
  height: 26px;
  width: 96px;
  background: #cbb181;
  border-radius: 5px 5px 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 8.5px;
  letter-spacing: 0.18em;
  font-weight: 800;
  color: #5c4c30;
  text-transform: uppercase;
  box-shadow: inset 0 -4px 6px -4px rgba(90, 70, 40, 0.5);
}
.fol-tl {
  left: 8px;
}
.fol-tc {
  left: 64px;
}
.fol-tr {
  right: 8px;
}
@media (min-width: 761px) and (max-width: 1018px) {
  .tc-cases {
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
  }
  .tc-cases[data-count="5"],
  .tc-cases[data-count="6"],
  .tc-cases[data-count="7"] {
    max-width: 780px;
  }
}
.fol-body {
  position: absolute;
  top: 22px;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(178deg, #d9c193 0%, #cbb181 90%);
  border-radius: 4px 4px 5px 5px;
  box-shadow: 0 18px 34px -14px rgba(8, 5, 2, 0.8);
  transition: box-shadow 0.18s ease;
  overflow: hidden;
}
.fol-body:before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.08;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3'/></filter><rect width='160' height='160' filter='url(%23n)'/></svg>");
}
.fol-edge {
  position: absolute;
  left: 10px;
  right: 10px;
  top: -5px;
  height: 8px;
  background: #efe4c6;
  border-radius: 3px 3px 0 0;
  box-shadow:
    0 -3px 0 -1px #e6d8b4,
    0 -6px 0 -2px #dccb9f;
}
.fol-label {
  position: absolute;
  left: 20px;
  right: 20px;
  top: 34px;
  background: #f7f1dd;
  border: 1px solid rgba(60, 48, 30, 0.25);
  padding: 11px 12px 9px;
  box-shadow: 0 3px 8px -3px rgba(60, 40, 15, 0.4);
}
.fol-label .ct {
  font-family: var(--serif);
  font-size: 19px;
  color: var(--ink);
}
.fol-label .cr {
  margin-top: 3px;
  font-size: 8.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 800;
  color: #8a7d60;
}
.fol-label .rule {
  border-top: 1px solid rgba(60, 48, 30, 0.2);
  margin: 8px 0 5px;
}
.fol-label .meta {
  font-family: var(--mono);
  font-size: 7.6px;
  letter-spacing: 0.04em;
  white-space: nowrap; /* "field hq san antonio" is the longest; it must stay on one line */
  color: #6b6152;
}
.fol-stamp {
  position: absolute;
  right: 16px;
  bottom: 48px;
  transform: rotate(7deg);
  border: 2.5px solid var(--rose);
  color: var(--rose);
  border-radius: 4px;
  padding: 4px 9px;
  font-size: 8.5px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-weight: 800;
  opacity: 0.78;
  text-align: center;
  line-height: 1.55;
}
.fol-sketch {
  position: absolute;
  left: 22px;
  bottom: 16px;
  width: 88px;
  background: #fdfaf1;
  padding: 5px 5px 3px;
  margin: 0;
  border: 1px solid rgba(60, 48, 30, 0.2);
  box-shadow: 0 6px 14px -6px rgba(40, 25, 8, 0.5);
  transform: rotate(-3deg);
}
.fol-sketch svg,
.fol-sketch img {
  width: 100%;
  height: auto;
  display: block;
}
.fol-sketch figcaption {
  font-family: var(--mono);
  font-size: 6px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #7c7266;
  text-align: center;
  padding-top: 3px;
}
.fol-s2 {
  left: auto;
  right: 22px;
  transform: rotate(2.5deg);
}
/* a finished case keeps its plate: the seal sits on the print's corner, the score beside it */
.fol-seal {
  position: absolute;
  left: 84px;
  bottom: 74px;
  width: 38px;
  height: 38px;
  filter: drop-shadow(0 2px 3px rgba(40, 25, 8, 0.35));
}
.fol-score {
  position: absolute;
  left: 112px;
  right: 16px;
  bottom: 14px;
  background: rgba(47, 65, 86, 0.1);
  border: 1px solid rgba(47, 65, 86, 0.3);
  padding: 5px 4px;
  font-family: var(--mono);
  font-size: 7.6px;
  letter-spacing: 0.05em;
  white-space: nowrap;
  color: #42506b;
  text-align: center;
}
@media (max-width: 760px) {
  #titleCard {
    justify-content: flex-start;
    padding: 40px 0 50px;
  }
  .tc-cases {
    flex-direction: column;
    align-items: center;
  }
}

.casefile > .ph {
  display: none;
}
body.briefing .casefile > .ph {
  display: none !important;
}

.fileveil {
  position: fixed;
  inset: 0;
  z-index: 56;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 16px;
  background: rgba(37, 29, 18, 0.6);
  backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
  overflow: auto;
}
.fileveil.on {
  opacity: 1;
  pointer-events: auto;
}
.filesheet {
  background: var(--manila);
  border-radius: 6px;
  max-width: 560px;
  width: 100%;
  box-shadow: 0 24px 60px -20px rgba(10, 6, 2, 0.7);
  padding: 6px 0 4px;
  margin-top: 14px;
}
.fileclose {
  display: block;
  margin: 8px 14px 2px auto;
  padding: 8px 16px;
  border-radius: 3px;
  border: 1.2px solid rgba(60, 48, 30, 0.35);
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
}
.tbmore {
  display: none;
}

/* ---------- opening briefing ---------- */
body.briefing .mappanel {
  display: none;
}
body.briefing .theorybar {
  display: none !important;
}
body.briefing .log {
  display: none;
}
body.briefing .grid {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 520px;
}
body.briefing .casefile {
  display: block !important;
  width: 100%;
  max-width: 640px;
  background: transparent;
  box-shadow: none;
}
body.briefing .casefile .ph .chev {
  display: none;
}
body.briefing .paper {
  margin: 0;
  padding: 30px 34px 34px;
  box-shadow: var(--shadow);
  border-radius: 6px;
}
body.briefing .paper h1 {
  font-size: 26px;
  margin-bottom: 14px;
}
body.briefing .stim {
  font-size: 17px;
  line-height: 1.7;
  max-width: 60ch;
}
#brief {
  margin: 0;
}
#brief:empty {
  display: none;
}
.job {
  margin: 24px auto 0;
  max-width: 560px;
  font-family: var(--serif);
  font-size: 16px;
  line-height: 1.6;
  color: #f0e8d2;
  text-align: left;
  text-shadow: 0 2px 10px rgba(20, 12, 4, 0.5);
}
.ctarow.jobrow {
  justify-content: center;
  margin-top: 18px;
}
.ctarow.jobrow .btn {
  min-width: 280px;
}
#brief .dlg {
  margin-top: 0;
  align-items: flex-end;
  gap: 16px;
}
#brief .sagebox,
#brief .sagebox svg {
  width: 84px;
}
#brief .bubble {
  padding: 16px 20px;
}
.ctarow {
  display: flex;
  justify-content: flex-end;
  margin-top: 18px;
}
.ctarow .btn {
  width: auto;
  min-width: 260px;
  margin-top: 0;
  padding: 14px 30px;
}

/* ---------- deferred filing: nav, board, report ---------- */
.navrow {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}
.navb {
  flex: 1;
  padding: 12px;
  border-radius: 999px;
  background: var(--card);
  box-shadow: var(--shadow);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  transition: 0.15s;
}
.navb:hover {
  color: var(--ink);
  transform: translateY(-1px);
}
.navb.primary {
  background: var(--purple);
  color: #fff;
  box-shadow: 0 4px 0 #1f2c3a;
}
.navb.primary:disabled {
  opacity: 0.45;
  pointer-events: none;
}
.navb.primary:not(:disabled):hover {
  background: var(--purple-2);
}
.evgrid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.traycol {
  background: var(--card-2);
  border-radius: 6px;
  padding: 10px;
  min-height: 130px;
}
.trayhead {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 800;
  padding: 4px 6px 10px;
}
.trayhead .cnt {
  color: var(--faint);
}
.traycol.h .trayhead {
  color: var(--teal);
}
.traycol.w .trayhead {
  color: var(--rose);
}
.traycol.n .trayhead {
  color: var(--muted);
}
.evempty {
  font-size: 12px;
  color: var(--faint);
  font-style: italic;
  padding: 8px;
}
.acts .act.on {
  outline: 2.5px solid var(--gold);
}
.backlink {
  margin-top: 12px;
  width: 100%;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-color: rgba(169, 122, 32, 0.45);
  text-decoration-thickness: 1.2px;
}
.backlink:hover {
  color: var(--ink);
  text-decoration-color: #a97a20;
}
.filedtag {
  font-size: 8.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 800;
  color: #b1802a;
  margin-top: 3px;
}
.sumchips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 4px;
}
.sumchip {
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 11px;
  font-weight: 800;
  background: var(--card);
  box-shadow: var(--shadow);
}
.sumchip.h {
  color: var(--teal);
}
.sumchip.w {
  color: var(--rose);
}
.sumchip.n {
  color: var(--muted);
}
.qblock {
  background: var(--card);
  border-radius: 6px;
  box-shadow: var(--shadow);
  padding: 16px;
  margin-top: 14px;
}
.qblock .qp {
  font-size: 14.5px;
  font-weight: 800;
  margin-bottom: 10px;
}
.qopt {
  display: block;
  width: 100%;
  text-align: left;
  border: 2px solid #e2d8bc;
  border-radius: 6px;
  padding: 10px 12px;
  margin-bottom: 8px;
  font-size: 13px;
  transition: 0.15s;
  background: var(--card-2);
}
.qopt:hover {
  border-color: var(--purple);
}
.qopt.sel {
  border-color: var(--purple);
  background: var(--purple-soft);
  font-weight: 700;
}
.sheet {
  position: relative;
  background: var(--card);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 26px 26px 84px;
  margin-top: 14px;
  font-family: var(--serif);
}
.sheet h3 {
  margin: 0 0 8px;
  font-size: 18px;
}
.sheet p {
  margin: 0 0 6px;
  font-size: 14px;
  color: #453d33;
}
.thunk {
  animation: sheetThunk 0.35s ease-out;
}
@keyframes sheetThunk {
  0% {
    transform: none;
  }
  30% {
    transform: translateY(3px) rotate(0.3deg);
  }
  60% {
    transform: translateY(-1px);
  }
  100% {
    transform: none;
  }
}
.epi {
  font-family: var(--serif);
  font-style: italic;
  font-size: 14px;
  line-height: 1.65;
  color: #5a5142;
  border-top: 1.5px solid rgba(60, 48, 30, 0.22);
  margin-top: 20px;
  padding-top: 14px;
}
.epi .ex {
  color: #7c4a42;
}

/* ---------- map hover tooltip ---------- */
.maptip {
  position: fixed;
  z-index: 58;
  pointer-events: none;
  background: var(--card);
  border-radius: 6px;
  padding: 10px 13px;
  box-shadow: 0 12px 30px -10px rgba(15, 10, 5, 0.55);
  max-width: 250px;
  opacity: 0;
  transform: translateY(4px);
  transition:
    opacity 0.1s,
    transform 0.1s;
}
.maptip.on {
  opacity: 1;
  transform: none;
}
.maptip .place {
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--purple);
  font-weight: 800;
  margin-bottom: 2px;
}
.maptip .lt {
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.4;
}

/* ---------- coachmarks ---------- */
.coach-dim {
  position: fixed;
  inset: 0;
  z-index: 60;
}
@keyframes fadein {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
.coach-spot {
  position: fixed;
  z-index: 61;
  border-radius: 6px;
  pointer-events: none;
  box-shadow:
    0 0 0 3px var(--gold),
    0 0 36px rgba(217, 161, 57, 0.5),
    0 0 0 200vmax rgba(24, 17, 9, 0.55);
  animation: fadein 0.25s both;
}
.coachcard {
  position: fixed;
  z-index: 62;
  width: 344px;
  background: var(--card-2);
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid rgba(60, 48, 30, 0.16);
  box-shadow:
    0 24px 54px -18px rgba(20, 12, 4, 0.75),
    0 2px 0 rgba(255, 250, 235, 0.5) inset;
  animation: rise 0.3s cubic-bezier(0.2, 1.2, 0.4, 1) both;
}
.cc-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;
  background: var(--purple);
}
.cc-name {
  font-size: 11px;
  font-weight: 600;
  color: #fdf9ec;
}
.cc-step {
  font-size: 9.5px;
  color: #c9d2dd;
  font-weight: 700;
}
.cc-body {
  padding: 13px 17px 14px;
}
.coachcard p {
  margin: 0;
  font-size: 13px;
  line-height: 1.6;
  color: var(--ink);
}
.coachcard p b {
  color: var(--purple);
}
.cc-btns {
  display: flex;
  gap: 10px;
  margin-top: 13px;
  align-items: center;
}
.cc-skip {
  font-size: 11px;
  color: var(--faint);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-color: rgba(169, 122, 32, 0.45);
  text-decoration-thickness: 1.2px;
}
.cc-skip:hover {
  color: var(--muted);
  text-decoration-color: var(--brown, #a97a20);
}
.cc-next {
  margin-left: auto;
  padding: 9px 22px;
  border-radius: 3px;
  background: var(--purple);
  color: #f2ede0;
  font-size: 11.5px;
  font-weight: 700;
  box-shadow: inset 0 1px 0 rgba(255, 250, 235, 0.16);
  transition: 0.15s;
}
.cc-next:hover {
  background: #354962;
  box-shadow:
    inset 0 1px 0 rgba(255, 250, 235, 0.16),
    inset 0 -2px 0 var(--gold);
}
.cc-next:active {
  transform: translateY(1px);
}
.iconb {
  width: 26px;
  height: 26px;
  border-radius: 3px;
  border: 1.2px solid rgba(232, 223, 200, 0.45);
  color: #cfc4a8;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  transition: 0.15s;
  flex: none;
}
.iconb .gk-icon {
  width: 15px;
  height: 15px;
  display: block;
}
.iconb:hover {
  border-color: var(--gold);
  color: #f2ede0;
}
#backBtn {
  margin-right: 6px;
}
.helpb {
  width: 24px;
  height: 24px;
  border-radius: 3px;
  border: 1.2px solid rgba(232, 223, 200, 0.45);
  color: #cfc4a8;
  font-weight: 700;
  font-size: 12px;
  line-height: 1;
  flex: none;
  transition: 0.15s;
}
.helpb:hover {
  border-color: var(--gold);
  color: #f2ede0;
}

button:focus-visible {
  outline: 2.5px solid var(--gold);
  outline-offset: 2px;
}
.act:active {
  transform: translateY(1px) scale(0.99);
}
@media (max-width: 600px) {
  .t1-long {
    display: none;
  }
  .t1-short {
    display: inline;
  }
  .top .t1 {
    letter-spacing: 0.1em;
  }
  .ctarow .btn {
    width: 100%;
    min-width: 0;
  }
  .maplab {
    display: none;
  }
  .mapwrap .pin .pbody {
    transform: scale(1.4);
  }
  .mapwrap .pin.sel .pbody {
    animation: none;
    transform: scale(1.6);
  }
  .headrow {
    display: block;
  }
  .rstamp {
    display: inline-block;
    margin-top: 12px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .pin .ring {
    display: none;
  }
}

@media (max-width: 1000px) {
  .coachcard:not(.cc-anchored) {
    left: 14px !important;
    right: 14px;
    width: auto;
    top: min(40vh, 280px) !important;
    bottom: auto;
    translate: 0;
  }
  .coachcard.cc-anchored {
    max-width: calc(100vw - 28px);
  }
  .theorybar {
    display: flex;
    position: sticky;
    top: 6px;
    z-index: 35;
    align-items: flex-start;
    gap: 11px;
    background: var(--card);
    border-left: 5px solid var(--purple);
    border-radius: 6px;
    padding: 12px 15px;
    box-shadow: 0 10px 26px -10px rgba(15, 10, 5, 0.65);
    margin-bottom: 14px;
  }
  .theorybar .tk {
    background: var(--purple);
    color: #fdf9ec;
    border-radius: 4px;
    padding: 3px 9px;
    font-size: 8.5px;
    letter-spacing: 0.12em;
    font-weight: 800;
    text-transform: uppercase;
    flex: none;
    margin-top: 2px;
  }
  .theorybar .tv {
    font-family: var(--serif);
    font-style: italic;
    font-size: 15px;
    line-height: 1.5;
    color: #3b3428;
    font-weight: 400;
  }
  .grid {
    display: flex;
    flex-direction: column;
    align-items: stretch;
  }
  body.docmode .grid {
    justify-content: flex-start;
    padding-top: 14px;
    min-height: 460px;
  }
  body.docmode .panel.casefile {
    display: none;
  }
  .panel {
    min-width: 0;
    max-width: 100%;
  }
  .play {
    min-width: 0;
  }
  .panel.casefile {
    order: 2;
  }
  .evgrid {
    grid-template-columns: 1fr;
  }
  .maplab {
    font-size: 9.5px;
  }
  .pin .pbody {
    transform: scale(1.25);
  }
  .pin.sel .pbody {
    animation: none;
    transform: scale(1.45);
  }
  .mapwrap {
    overflow: hidden;
  }
  .mapwrap svg {
    width: 100%;
  }
  .ledger {
    grid-template-columns: 1fr;
  }
  .repband {
    padding: 8px 16px;
  }
  .rbody {
    padding: 16px 16px 20px;
  }
  .maphint {
    display: block;
    font-size: 9.5px;
    color: var(--faint);
    text-align: center;
    margin-top: 4px;
  }
  .casefile {
    display: none;
  }
  .theorybar {
    cursor: pointer;
  }
  .tbmore {
    display: inline;
    margin-left: auto;
    flex: none;
    align-self: center;
    font-family: var(--sans);
    font-style: normal;
    font-size: 9px;
    letter-spacing: 0.1em;
    font-weight: 800;
    color: var(--faint);
    text-transform: uppercase;
  }
  .casefile .ph {
    cursor: pointer;
  }
  .casefile .ph .chev {
    display: inline-block;
    margin-left: 8px;
    transition: 0.2s;
    color: var(--faint);
  }
  .casefile.collapsed .paper,
  .casefile.collapsed .log {
    display: none;
  }
  .casefile.collapsed .ph .chev {
    transform: rotate(-90deg);
  }
  .wrap {
    padding: 16px 14px 40px;
  }
  .grid,
  .acts {
    grid-template-columns: 1fr;
  }
  .top {
    flex-wrap: wrap;
  }
  .days {
    margin-left: 0;
    width: 100%;
  }
  .bubble:before {
    display: none;
  }

  /* mobile density pass */
  .wrap {
    padding: 10px 10px 28px;
  }
  .grid {
    gap: 14px;
  }
  .top {
    flex-wrap: nowrap;
    margin-bottom: 12px;
  }
  .days {
    margin-left: auto;
    width: auto;
  }
  .days .lbl {
    display: none;
  }
  .ph {
    padding: 10px 14px;
  }
  .play {
    padding: 14px;
  }
  .ask {
    font-size: 16px;
    margin-bottom: 3px;
  }
  .hint {
    font-size: 12px;
    margin-bottom: 11px;
  }
  .theorybar {
    padding: 9px 12px;
    margin-bottom: 10px;
  }
  .theorybar .tv {
    font-size: 13.5px;
  }
  .maphint {
    margin-top: 4px;
    font-size: 9.5px;
  }
  .pinbar {
    gap: 10px;
    padding: 10px 14px;
    min-height: 0;
    margin-top: 0;
  }
  .pinbar .gobtn {
    flex: none;
  }
  .doc {
    margin-bottom: 12px;
  }
  .doc {
    padding: 12px 12px 10px;
  }
  .docsrc {
    font-size: 12.5px;
    padding: 8px 11px 9px;
    margin-bottom: 10px;
  }
  .exhibit {
    width: 150px;
    margin: 2px 0 10px 14px;
  }
  .sheetdoc {
    padding: 0 16px 18px;
  }
  .sd-head {
    margin: 0 -16px 14px;
    padding: 8px 16px;
  }
  .sd-title {
    font-size: 17px;
    max-width: 100%;
  }
  .argbody {
    font-size: 14px;
  }
  fieldset.sd-find {
    padding: 10px 13px 12px;
  }
  .sd-find p {
    font-size: 16.5px;
  }
  .findcard p {
    font-size: 16.5px;
    padding-right: 0;
  }
  .verdict {
    font-size: 13px;
    margin-bottom: 14px;
  }
  .askq {
    font-size: 12px;
    margin-bottom: 8px;
  }
  .acts {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }
  .act {
    padding: 9px 4px;
  }
  .act .g {
    width: 24px;
    height: 24px;
    font-size: 12px;
    margin-bottom: 4px;
  }
  .act .t {
    font-size: 11px;
  }
  .backlink {
    margin-top: 8px;
    font-size: 10px;
  }
  .dlg {
    flex-direction: row;
    align-items: flex-end;
    gap: 10px;
    margin-top: 12px;
  }
  .sagebox {
    width: 54px;
  }
  .sagebox svg {
    width: 54px;
  }
  .bubble {
    padding: 11px 13px;
  }
  .bubble p {
    font-size: 12.5px;
    line-height: 1.55;
  }
  .btn {
    padding: 11px;
    margin-top: 10px;
  }
  .stamp {
    top: 12px;
    right: 12px;
    font-size: 8px;
    padding: 3px 7px;
  }
  body.briefing .paper {
    padding: 44px 22px 26px;
  }
  body.briefing .paper h1 {
    font-size: 23px;
    max-width: 100%;
  }
  body.briefing .stim {
    font-size: 16px;
  }
  #brief .sagebox,
  #brief .sagebox svg {
    width: 64px;
  }
  .ctarow .btn {
    min-width: 220px;
  }
  .paper {
    margin: 12px;
    padding: 16px 16px 40px;
  }
  .log {
    margin: 0 12px 12px;
    padding: 10px 12px;
  }
  .deb {
    padding: 20px 16px;
  }
}

/* ---------- the art: landscape backdrop and creature plates ---------- */
#duskBg.art {
  background-color: var(--case-base);
  background-repeat: no-repeat;
  background-position: center top;
  background-size: cover;
}
/* a scrim over the whole picture: darker behind the header, a little darker at the foot for the footer links */
#duskBg.art::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(10, 8, 4, 0.3),
    rgba(10, 8, 4, 0) 22%,
    rgba(10, 8, 4, 0) 72%,
    rgba(10, 8, 4, 0.32) 100%
  );
}
.plate {
  margin: 0;
  background: #fdfaf1;
  padding: 7px 7px 5px;
  border: 1px solid rgba(60, 48, 30, 0.18);
  box-shadow: 0 14px 30px -12px rgba(40, 25, 8, 0.6);
  position: relative;
}
.plate img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: contain;
  background: #f7e9ce;
}
.plate figcaption {
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 6px 2px 2px;
  text-align: center;
}
/* the plate belongs to the briefing and the closing report, not to the investigation */
body:not(.briefing) .paper .plate {
  display: none;
}
body:not(.briefing) .filesheet .paper .plate {
  display: block;
  float: right;
  width: 120px;
  margin: 0 0 10px 14px;
  transform: rotate(2deg);
}
/* the plate is a print clipped beside the paper */
body.briefing .paper .plate {
  position: absolute;
  left: calc(100% + 22px);
  top: 14px;
  width: 232px;
  transform: rotate(2.5deg);
}
body.briefing .paper .plate:before {
  content: "";
  position: absolute;
  top: -8px;
  left: 50%;
  width: 46px;
  height: 14px;
  margin-left: -23px;
  background: rgba(240, 228, 196, 0.8);
  box-shadow: 0 1px 2px rgba(40, 25, 8, 0.2);
  transform: rotate(-3deg);
}
/* the closing report */
.rplate {
  width: 118px;
  flex: none;
  transform: rotate(-2deg);
  margin: -4px 0 0;
}
.rplate figcaption {
  display: none; /* the briefing already carried the line; too small to read here */
}
.fol-plate img {
  aspect-ratio: 4 / 5;
  object-fit: cover;
  background: #f7e9ce;
}
.fol-sketch.fol-plate {
  width: 78px;
  padding: 4px;
}
@media (min-width: 761px) {
  body.briefing .casefile {
    max-width: 894px;
    padding-right: 254px;
    box-sizing: border-box;
  }
}
@media (max-width: 760px) {
  body.briefing .paper .plate {
    position: static;
    width: auto;
    max-width: 200px;
    margin: 0 auto 18px;
    transform: none;
  }
  body.briefing .paper .plate:before {
    display: none;
  }
  body.briefing .paper .plate img {
    max-height: 200px;
  }
  .rplate {
    width: 96px;
    margin: 0 auto;
  }
}

/* ---------- layout pass: exhibit placement, briefing footer, report header, phone header ---------- */
/* the exhibit shrinks beside the plate card and leaves the paragraph room */
body.briefing .exhibit {
  width: 150px;
  margin: 2px -4px 10px 18px;
}
/* on the map screen the exhibit sits above the text instead of beside it */
body:not(.briefing) .paper .exhibit {
  float: none;
  width: auto;
  max-width: 176px;
  margin: 0 auto 16px;
  transform: rotate(-1.5deg);
}
/* the progress boxes mean nothing until the map opens */
body.briefing .stamps {
  display: none;
}
/* the briefing's job line and button sit on the paper's foot */
#brief.brieffoot {
  margin: 22px -34px -34px;
  padding: 18px 34px 22px;
  background: rgba(60, 48, 30, 0.06);
  border-top: 1px solid rgba(60, 48, 30, 0.12);
  border-radius: 0 0 6px 6px;
}
#brief.brieffoot .job {
  margin: 0;
  max-width: none;
  font-size: 15.5px;
  color: var(--ink);
  text-shadow: none;
}
#brief.brieffoot .ctarow.jobrow {
  justify-content: flex-start;
  margin-top: 14px;
}
/* the closing report: words left, plate and stamp right */
.rephead {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px;
  column-gap: 28px;
  align-items: start;
}
.rephead .reparg {
  margin-top: 18px;
}
.rephead-r {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding-top: 4px;
}
.rplate {
  margin: 0;
}
.rephead-r .rstamp {
  transform: rotate(-4deg);
}
@media (max-width: 760px) {
  /* one row for the way out, the case and the menu; the progress boxes on their own row */
  .top {
    flex-wrap: wrap;
    row-gap: 8px;
  }
  .top .t1 {
    display: none;
  }
  .tid {
    flex-direction: row;
  }
  .top .case {
    font-size: 11px;
    color: #e8dfc8;
  }
  .days {
    display: contents;
  }
  #menuRun {
    margin-left: auto;
  }
  .stamps {
    order: 10;
    flex-basis: 100%;
  }
  /* the plate and the exhibit share a row above full-width paragraphs */
  body.briefing .paper {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    column-gap: 16px;
    align-items: start;
  }
  body.briefing .paper h1,
  body.briefing .paper .stim,
  body.briefing .paper #brief {
    grid-column: 1 / -1;
  }
  body.briefing .paper .plate {
    grid-column: 1;
    margin: 0 0 16px;
  }
  body.briefing .paper .exhibit {
    grid-column: 2;
    float: none;
    width: auto;
    max-width: 170px;
    margin: 10px 0 16px;
    justify-self: end;
  }
  body.briefing .paper:not(:has(.exhibit)) .plate {
    grid-column: 1 / -1;
    justify-self: center;
  }
  #brief.brieffoot {
    margin: 14px -22px -26px;
    padding: 16px 22px 20px;
  }
}
@media (max-width: 600px) {
  .rephead {
    display: block;
  }
  .rephead-r {
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin: 14px 0 4px;
    padding-top: 0;
  }
  .rplate {
    width: 96px;
  }
  .rephead-r .rstamp {
    margin-top: 0;
  }
}

/* five to seven folders sit three to a row at every desktop width */
.tc-cases[data-count="5"],
.tc-cases[data-count="6"],
.tc-cases[data-count="7"] {
  max-width: 780px;
  margin-left: auto;
  margin-right: auto;
}
