/* Find the Killer — "Midnight Office": night navy, manila case files, brass, amber buttons, red pencil. */
@font-face { font-family: "Fredoka"; src: url("/fonts/fredoka.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Source Sans 3"; src: url("/fonts/sourcesans_400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Source Sans 3"; src: url("/fonts/sourcesans_600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Source Sans 3"; src: url("/fonts/sourcesans_700.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --night: #0d1830;
  --night-2: #15264a;
  --night-3: #1e3460;
  --manila: #f5e6c0;
  --manila-2: #e8d19b;
  --ink: #2b1e12;
  --ink-soft: #6b5536;
  --brass: #d3a04a;
  --brass-dim: #9c7432;
  --amber: #f7a134;
  --amber-2: #e0711a;
  --pencil: #c4352a;
  --text: #f1e6cf;
  --muted: #b9b2a3;
  --r: 18px;
  --display: "Fredoka", "Trebuchet MS", system-ui, sans-serif;
  --body: "Source Sans 3", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--night); color: var(--text);
  font: 400 17px/1.55 var(--body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; }
a { color: var(--brass); text-underline-offset: 3px; }
a:hover { color: var(--amber); }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; border-radius: 6px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--amber); color: var(--ink); padding: 8px 14px; border-radius: 10px; z-index: 50; }
.skip:focus { left: 12px; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.12; letter-spacing: .005em; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 7.4vw, 3.6rem); color: #ffd27a; text-shadow: 0 2px 0 #7a4a12, 0 0 28px rgba(247, 161, 52, .28); }
h2 { font-size: clamp(1.45rem, 4.6vw, 2rem); color: #ffd27a; }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
.eyebrow { font: 700 .78rem/1.2 var(--body); letter-spacing: .16em; text-transform: uppercase; color: var(--brass); margin-bottom: .7em; }
.lede { font-size: 1.12rem; color: #e9dfc8; max-width: 38em; }
.more { margin-top: 1.2em; }

/* Scrollbars of inner scrolling blocks hidden (owner's request). */
.dossier-side, .shots, .clues.live { scrollbar-width: none; }
.dossier-side::-webkit-scrollbar, .shots::-webkit-scrollbar, .clues.live::-webkit-scrollbar { display: none; }

/* ---------------------------------------------------------------- header */
.top {
  position: relative; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  max-width: 1180px; margin: 0 auto; padding: 14px 16px;
}
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; color: #ffd27a; font: 600 1.15rem/1 var(--display); }
.menu { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.menu a { color: var(--text); text-decoration: none; font-weight: 600; font-size: .95rem; padding: 8px 10px; border-radius: 999px; }
.menu a:hover { background: rgba(255, 255, 255, .08); color: #fff; }
@media (max-width: 520px) { .menu a:first-child { display: none; } .menu { gap: 0; flex-wrap: nowrap; } .menu a { padding: 8px 6px; font-size: .88rem; white-space: nowrap; } .brand { font-size: 1.02rem; white-space: nowrap; } }
@media (max-width: 400px) { .brand img { display: none; } }

main { max-width: 1180px; margin: 0 auto; padding: 0 16px 40px; }
.crumbs { font-size: .9rem; color: var(--muted); margin: 6px 0 18px; }
.crumbs a { color: var(--muted); }
.crumbs span { margin: 0 2px; }

/* ---------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 0 26px;
  border: 0; border-radius: 999px; cursor: pointer; text-decoration: none;
  font: 600 1.15rem/1 var(--display); color: #fff; letter-spacing: .01em;
  background: linear-gradient(180deg, #ffc05a 0%, var(--amber) 45%, var(--amber-2) 100%);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, .45), inset 0 -3px 0 rgba(120, 50, 0, .35), 0 6px 18px rgba(224, 113, 26, .35);
  text-shadow: 0 1px 0 rgba(120, 50, 0, .5);
  transition: transform .12s ease, filter .12s ease;
}
.btn:hover { color: #fff; filter: brightness(1.05); }
.btn:active { transform: translateY(1px) scale(.99); }
.btn:disabled { filter: grayscale(.6) brightness(.75); cursor: default; box-shadow: none; }
.btn.ghost { background: transparent; color: var(--manila); box-shadow: inset 0 0 0 2px var(--brass-dim); text-shadow: none; }
.btn.ghost:hover { box-shadow: inset 0 0 0 2px var(--brass); }

/* ---------------------------------------------------------------- hero (home) */
.home .top { position: relative; }
.hero {
  position: relative; display: grid; grid-template-columns: 1fr; align-items: end; gap: 0;
  margin: 0 -16px; padding: 18px 16px 0; min-height: 420px; overflow: hidden;
  background:
    linear-gradient(180deg, rgba(13, 24, 48, .25) 0%, rgba(13, 24, 48, .55) 55%, var(--night) 100%),
    url("/img/office-800.webp") center 22% / cover no-repeat;
  border-radius: 0 0 28px 28px;
}
@media (min-width: 900px) {
  .hero { background-image: linear-gradient(90deg, rgba(13, 24, 48, .92) 0%, rgba(13, 24, 48, .55) 55%, rgba(13, 24, 48, .2) 100%), linear-gradient(180deg, transparent 70%, var(--night) 100%), url("/img/office-1600.webp"); background-position: center 30%; background-size: cover; margin: 0; border-radius: 28px; }
}
.hero-copy { position: relative; z-index: 2; padding-bottom: 28px; max-width: 34rem; }
.hound { margin: 0; position: absolute; right: -14px; bottom: 0; width: 46%; max-width: 250px; z-index: 1; pointer-events: none; }
.hound img { display: block; width: 100%; filter: drop-shadow(0 10px 24px rgba(0, 0, 0, .5)); transform-origin: 50% 100%; }
.hero h1 { max-width: 11em; }
.h1-sub { display: block; margin-top: .25em; font-size: .52em; line-height: 1.2; color: var(--manila); text-shadow: 0 2px 0 rgba(0, 0, 0, .35); }
.app-page .shots { margin: 8px 0 28px; }
@media (max-width: 599px) {
  .hero { padding-top: 150px; }
  .hound { width: 88px; right: 22px; top: 14px; bottom: auto; }
  .hero-copy .lede { font-size: 1.04rem; }
}
@media (min-width: 600px) { .hero { grid-template-columns: 1.4fr 1fr; min-height: 460px; padding: 40px 32px 0; } .hound { position: relative; right: 0; width: 100%; justify-self: center; } }
@media (prefers-reduced-motion: no-preference) {
  .hound img { animation: settle .7s cubic-bezier(.2, .9, .3, 1.2) both; }
  @keyframes settle { from { transform: translateY(18px) rotate(-3deg); } to { transform: none; } }
}

/* ---------------------------------------------------------------- the game */
.game { margin-top: 18px; scroll-margin-top: 10px; }
.game-loading { background: var(--night-2); border-radius: var(--r); padding: 28px 22px; text-align: center; color: var(--muted); }
.board { display: grid; gap: 18px; }
@media (min-width: 960px) {
  .board { grid-template-columns: 360px 1fr; align-items: start; }
  .dossier-side { position: sticky; top: 14px; max-height: calc(100vh - 110px); overflow-y: auto; }
}
.dossier-side {
  background: linear-gradient(180deg, var(--night-3), var(--night-2)); border: 1.5px solid var(--brass-dim);
  border-radius: 22px; padding: 18px 16px 16px; box-shadow: 0 14px 40px rgba(0, 0, 0, .35);
}
.case-title { font-size: 1.6rem; margin-bottom: .15em; }
.case-meta { color: var(--muted); font-size: .95rem; }
.clues { list-style: none; counter-reset: c; margin: 0 0 12px; padding: 0; display: grid; gap: 8px; }
.clues li { counter-increment: c; position: relative; }
.clues:not(.live) li { background: var(--manila); color: var(--ink); border-radius: 14px; padding: 12px 14px 12px 46px; }
.clues:not(.live) li::before, .clue-btn::before {
  content: counter(c); position: absolute; left: 12px; top: 12px; width: 24px; height: 24px; border-radius: 50%;
  background: var(--ink); color: var(--manila); font: 700 .8rem/24px var(--body); text-align: center;
}
.clue-meta { display: block; margin-top: 4px; font-size: .85rem; color: var(--ink-soft); font-weight: 600; }
.clue-btn {
  position: relative; width: 100%; text-align: left; border: 0; cursor: pointer; font: 400 1rem/1.4 var(--body);
  background: var(--manila); color: var(--ink); border-radius: 14px; padding: 12px 14px 12px 46px;
  box-shadow: inset 0 -2px 0 var(--manila-2); transition: opacity .2s ease;
}
.clue-btn::before { counter-increment: none; content: counter(c); }
.clue-btn[aria-pressed="true"] { opacity: .5; }
.clue-btn[aria-pressed="true"] .clue-text { text-decoration: line-through; text-decoration-color: var(--pencil); text-decoration-thickness: 2px; }
.clue-btn[aria-pressed="true"]::before { content: "✓"; background: var(--pencil); }
.tip { font-size: .9rem; color: var(--muted); margin: 4px 2px 10px; }
.toggle { display: flex; gap: 10px; align-items: center; font-size: .95rem; cursor: pointer; padding: 6px 2px; }
.toggle input { width: 22px; height: 22px; accent-color: var(--amber); }

/* The file: manila sheets; names read left to right, line by line. */
.file { display: grid; gap: 14px; }
@media (min-width: 700px) { .file { grid-template-columns: 1fr 1fr; } .file .chapter-title { grid-column: 1 / -1; } }
.chapter-title { margin: 10px 2px -4px; font: 600 1.15rem/1.2 var(--display); color: #ffd27a; }
.chapter-title span { display: block; font: 700 .72rem/1.4 var(--body); letter-spacing: .16em; text-transform: uppercase; color: var(--brass); }
.sheet {
  position: relative; background:
    linear-gradient(90deg, transparent 0 8px, rgba(196, 53, 42, .28) 8px 9.5px, transparent 9.5px),
    linear-gradient(180deg, #f8ebc9, var(--manila));
  color: var(--ink); border-radius: 6px 18px 18px 18px; padding: 16px 14px 14px;
  box-shadow: 0 1px 0 var(--manila-2), 0 10px 24px rgba(0, 0, 0, .28);
}
.sheet::before { content: ""; position: absolute; left: 18px; top: -9px; width: 56px; height: 14px; border-radius: 6px 6px 0 0; background: var(--manila-2); }
.sheet-no { position: absolute; right: 14px; top: 10px; margin: 0; font: 700 .78rem/1 var(--body); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-soft); }
.names { list-style: none; margin: 18px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 2px 4px; }
.names li { display: block; }
.names.static li { font: 600 1rem/34px var(--body); padding: 0 6px; }
.name {
  position: relative; border: 0; background: transparent; cursor: pointer; color: var(--ink);
  font: 600 1.02rem/1 var(--body); padding: 0 7px; min-height: 34px; min-width: 34px; border-radius: 8px;
  -webkit-tap-highlight-color: transparent;
}
.name:hover { background: rgba(211, 160, 74, .2); }
.name::after {
  content: ""; position: absolute; left: 2px; right: 2px; top: 50%; height: 3px; border-radius: 3px;
  background: var(--pencil); transform: scaleX(0) rotate(-4deg); transform-origin: left center; transition: transform .22s ease-out;
}
.name.out { color: rgba(43, 30, 18, .42); }
.name.out::after { transform: scaleX(1) rotate(-4deg); }
.name.wrong { color: var(--pencil); text-decoration: underline wavy var(--pencil); }
.still .name::after { transition: none; }

/* Bottom bar */
.bar {
  position: sticky; bottom: 0; z-index: 10; margin: 16px -16px 0; padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  display: grid; grid-template-columns: 1fr auto auto; grid-template-areas: "count undo accuse" "lives undo accuse"; align-items: center; gap: 0 10px;
  background: rgba(13, 24, 48, .94); backdrop-filter: blur(8px); border-top: 1px solid rgba(211, 160, 74, .35);
}
@media (min-width: 960px) { .bar { margin: 16px 0 0; border-radius: 18px; border: 1px solid rgba(211, 160, 74, .35); } }
.count { grid-area: count; margin: 0; font-size: 1rem; }
.count b { font: 600 1.4rem/1 var(--display); color: #ffd27a; }
.lives { grid-area: lives; margin: 0; font-size: .85rem; color: var(--muted); }
.bar .ghost { grid-area: undo; min-height: 48px; padding: 0 16px; font-size: 1rem; }
.bar .btn:not(.ghost) { grid-area: accuse; min-height: 48px; padding: 0 18px; font-size: 1.05rem; max-width: 52vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Verdict */
.verdict { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; padding: 16px; background: rgba(5, 10, 22, .72); }
.verdict-card {
  width: min(460px, 100%); background: linear-gradient(180deg, #f8ebc9, var(--manila)); color: var(--ink);
  border-radius: 22px; padding: 26px 22px 22px; text-align: center; box-shadow: 0 24px 60px rgba(0, 0, 0, .5);
}
.verdict-card h2 { color: var(--ink); text-shadow: none; font-size: 1.8rem; }
.stamp {
  display: inline-block; margin: 0 0 12px; padding: 6px 14px; border: 3px solid var(--pencil); border-radius: 8px; color: var(--pencil);
  font: 700 .95rem/1 var(--body); letter-spacing: .18em; text-transform: uppercase; transform: rotate(-4deg);
}
.win .stamp { border-color: #2f7a3b; color: #2f7a3b; }
.verdict-actions { display: grid; gap: 10px; margin-top: 8px; }
.verdict-card .ghost { color: var(--ink); box-shadow: inset 0 0 0 2px var(--brass-dim); }
@media (prefers-reduced-motion: no-preference) { .verdict-card { animation: drop .35s cubic-bezier(.2, .9, .3, 1.2) both; } @keyframes drop { from { transform: translateY(20px) scale(.97); } } }

/* ---------------------------------------------------------------- home sections */
.how, .recent, .faq, .app { margin-top: 56px; }
.how-grid { display: grid; gap: 14px; }
@media (min-width: 760px) { .how-grid { grid-template-columns: repeat(3, 1fr); } }
.how-card { background: var(--night-2); border: 1px solid rgba(211, 160, 74, .25); border-radius: var(--r); padding: 20px; }
.how-card h3 { color: #ffd27a; margin-top: 10px; }
.how-card p { margin: 0; color: #ddd3bf; }
.case-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
@media (min-width: 760px) { .case-list { grid-template-columns: 1fr 1fr; } }
.case-list a {
  display: grid; grid-template-columns: auto 1fr; grid-template-areas: "no t" "no d"; gap: 0 14px; align-items: center;
  text-decoration: none; background: var(--manila); color: var(--ink); border-radius: 14px; padding: 12px 16px;
  box-shadow: inset 0 -2px 0 var(--manila-2);
}
.case-list a:hover { background: #fbefd2; color: var(--ink); }
.case-list .no { grid-area: no; font: 600 1.35rem/1 var(--display); color: var(--amber-2); min-width: 2.4em; }
.case-list .t { grid-area: t; font-weight: 700; }
.case-list .d { grid-area: d; font-size: .9rem; color: var(--ink-soft); }
.faq details { background: var(--night-2); border-radius: 14px; padding: 2px 18px; margin-bottom: 10px; }
.faq summary { cursor: pointer; font-weight: 700; padding: 14px 0; }
.faq details p { color: #ddd3bf; }

/* App block */
.app {
  display: grid; gap: 22px; align-items: center; padding: 26px 20px; border-radius: 26px;
  background: radial-gradient(120% 120% at 0% 0%, var(--night-3), var(--night-2) 60%); border: 1.5px solid var(--brass-dim);
}
@media (min-width: 860px) { .app { grid-template-columns: 1.1fr 1fr; padding: 34px; } }
.app-icon { border-radius: 18px; box-shadow: 0 8px 20px rgba(0, 0, 0, .4); }
.app h2 { margin-top: 14px; }
.app p { color: #ddd3bf; }
.stores { display: flex; flex-wrap: wrap; gap: 10px; }
.store {
  display: inline-flex; align-items: center; gap: 10px; min-height: 54px; padding: 8px 18px; border-radius: 14px;
  background: #000; color: #fff; text-decoration: none; border: 1px solid rgba(255, 255, 255, .25); font-weight: 700; line-height: 1.1;
}
.store small { display: block; font-size: .72rem; font-weight: 600; opacity: .8; }
.store:hover { color: #fff; border-color: var(--brass); }
.store.soon { opacity: .6; cursor: default; }
.shots { display: flex; gap: 12px; overflow-x: auto; justify-content: flex-start; }
.shots img { width: 150px; flex: 0 0 auto; border-radius: 18px; border: 2px solid rgba(211, 160, 74, .4); box-shadow: 0 12px 26px rgba(0, 0, 0, .4); }
@media (min-width: 860px) { .shots { justify-content: center; } .shots img { width: 31%; } .shots img:nth-child(2) { transform: translateY(-14px); } }

/* ---------------------------------------------------------------- prose pages */
.prose { max-width: 820px; }
.prose h2 { margin-top: 1.8em; }
.prose h3 { color: #ffd27a; margin-top: 1.2em; }
.rules { padding-left: 1.2em; }
.rules li { margin-bottom: .5em; }
.rules b { color: #ffd27a; }
.kinds { display: grid; gap: 10px; }
.kinds dt { font: 600 1.1rem/1.2 var(--display); color: #ffd27a; }
.kinds dd { margin: 0 0 8px; color: #ddd3bf; }
.steps { list-style: none; padding: 0; counter-reset: s; display: grid; gap: 12px; }
.step { counter-increment: s; background: var(--night-2); border-left: 4px solid var(--brass); border-radius: 0 14px 14px 0; padding: 14px 16px 12px; }
.step-clue { font-weight: 700; color: var(--manila); }
.step-clue::before { content: "Clue " counter(s) ": "; color: var(--brass); }
.step-kind { color: #cfc6b2; font-size: .95rem; }
.step-count { margin: 0; color: var(--muted); }
.step-count b { color: #ffd27a; font: 600 1.15rem/1 var(--display); }
.quotes { padding-left: 1.1em; color: #e9dfc8; }
.spoiler { background: var(--night-2); border: 1px dashed var(--brass-dim); border-radius: 14px; padding: 2px 16px; margin: 10px 0; }
.spoiler summary { cursor: pointer; font-weight: 700; padding: 12px 0; color: #ffd27a; }
.spoiler[open] { border-style: solid; }
.spoiler .clues { margin-bottom: 14px; }
.answer summary { color: var(--amber); }
.case .file { margin-top: 10px; }
.pager { display: flex; justify-content: space-between; gap: 10px; margin: 28px 0 0; font-weight: 700; }
.upside { transform: rotate(180deg); text-align: center; color: var(--muted); margin-top: 30px; }

/* ---------------------------------------------------------------- footer */
.foot { border-top: 1px solid rgba(211, 160, 74, .25); margin-top: 40px; background: #0a1326; }
.foot-in { max-width: 1180px; margin: 0 auto; padding: 30px 16px 10px; display: grid; gap: 24px; color: var(--muted); font-size: .95rem; }
@media (min-width: 760px) { .foot-in { grid-template-columns: 1.3fr 1fr; } }
.foot-title { font: 600 1.1rem/1.2 var(--display); color: #ffd27a; }
.others { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.fine { max-width: 1180px; margin: 0 auto; padding: 10px 16px 26px; color: #8a8474; font-size: .85rem; }

/* ---------------------------------------------------------------- print */
@media print {
  body { background: #fff; color: #000; font-size: 12pt; }
  .top, .foot, .crumbs, .no-print, .app, .skip { display: none !important; }
  h1, h2, .chapter-title { color: #000; text-shadow: none; }
  .clues:not(.live) li, .sheet { background: #fff; box-shadow: none; border: 1px solid #999; break-inside: avoid; }
  .sheet::before { display: none; }
  .file { grid-template-columns: 1fr 1fr; }
  .upside { color: #555; }
}
[hidden] { display: none !important; }
