:root{font-family:system-ui,"Yu Gothic",sans-serif;color:#1d302f;background:#f8f7f1;font-size:17px;line-height:1.78}*{box-sizing:border-box}body{margin:0}main,header,footer{max-width:1080px;margin:auto;padding:2rem clamp(1rem,4vw,3rem)}header{display:flex;align-items:center;justify-content:space-between;border-bottom:2px solid #327068}header a{font-family:serif;font-weight:bold}header span,small,.kicker,footer{font-size:.84rem;color:#4e655e}.kicker{letter-spacing:.18em;font-weight:700;margin-top:1rem}h1,h2,.sub{font-family:"Yu Mincho",serif}h1{font-size:clamp(2.4rem,7vw,4.6rem);line-height:1.15;margin:.3em 0}.sub{font-size:1.45rem;margin:.4em 0 1.2em}.notice{border-left:4px solid #ae6139;padding:.35em .8em;background:#f4eadf;width:fit-content}a{color:#145b50;text-underline-offset:.2em}.controls{display:flex;align-items:end;gap:.7rem;flex-wrap:wrap;background:#e6eeea;padding:1rem}.controls label:first-child{flex:1 1 220px}label{font-size:.9rem;font-weight:bold}input,select,button{font:inherit;color:inherit;border:1px solid #607c72;background:white;border-radius:.35rem;padding:.45rem .7rem}input,select{display:block;width:100%}button{cursor:pointer}button:hover{background:#e0f1e7}:focus-visible{outline:3px solid #a3512b;outline-offset:3px}#cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,300px),1fr));gap:1rem}article{border-top:3px solid #5e8376;background:#fff;padding:1.25rem;box-shadow:0 1px 4px #243c2b16}article:target{border-color:#b66336}h2{font-size:1.45rem;line-height:1.35;margin:.45em 0}article p{margin:.5rem 0 .9rem}.tags{display:flex;gap:.35rem;flex-wrap:wrap}.tags button{font-size:.77rem;padding:.2em .55em;color:#375c4c;background:#f2f6f3}.source,footer{margin-top:2rem;border-top:1px solid #cfdbd3;padding-top:1rem}[hidden]{display:none!important}
svg{vertical-align:middle;margin-right:.3rem;color:#43766c}.seal{border:1px solid #b9c8c1;background:white;margin:1rem 0;padding:0 1rem .1rem}.seal summary{cursor:pointer;min-height:48px;padding:.7rem .1rem;font-weight:bold;touch-action:pan-y}.ink{letter-spacing:-.12em;color:#203335;background:#203335;display:inline-block;line-height:.95;border-radius:.15em;user-select:none}.seal summary small{float:right;font-weight:normal}.seal[open]{border-left:4px solid #985234}.seal[open] .ink{color:#82a59a}.hint{font-size:.85rem;color:#52655d}.seal p{max-width:42em}.shelf li{padding:.35rem}section{margin-top:3rem}main>nav{margin-bottom:1.8rem}footer{font-size:.82rem}
.desk-hero{display:grid;grid-template-columns:1.35fr 1fr;align-items:center;gap:clamp(1rem,4vw,3rem);margin:1.5rem 0 2rem}.desk-hero h1{margin-top:0}.sketch{margin:0;position:relative}.sketch img{width:100%;height:auto;display:block;border-radius:45% 12% 24% 13% / 7% 30% 10% 12%;mix-blend-mode:multiply}.sketch figcaption{text-align:right;font-size:.73rem;color:#5a695c}.field-notes{scroll-margin-top:1rem;max-width:48rem;padding:1.4rem clamp(1rem,3vw,2rem);background:#fffdf6;border:1px solid #d2c9ae;border-radius:3px 15px 5px 9px;box-shadow:3px 4px 0 #e6e4d6}.field-notes>.kicker{margin:0}.routes,.cup-sheet{margin:1.1rem 0}.routes figcaption,.cup-sheet strong{font-family:serif;font-weight:bold;display:block}.route{display:flex;align-items:center;gap:.6em;flex-wrap:wrap;padding:.5em 0;color:#285c50}.route b{padding:.2em .6em;background:#deeee5;border-radius:3px 9px 5px 2px}.amber{color:#744522}.amber b{background:#f9e9c8}.cup-sheet{border-top:2px dashed #b3b6a8;padding-top:1.4rem}.cup-sheet strong{font-size:1.25rem}.cup-pair{display:flex;gap:.8rem;margin-top:.8rem}.cup-view{flex:1;display:flex;align-items:center;gap:.5em;background:#f3efe2;color:#664d32;padding:.45rem .6rem;border-radius:9px 3px 10px 5px}.cup-view span{font-size:.9rem}.cup-view svg{flex:none}.field-notes summary{position:relative}.field-notes .practice{margin:.6rem 0}@media(max-width:620px){.desk-hero{grid-template-columns:minmax(0,1fr) minmax(100px,32%);gap:.45rem;margin:.8rem 0 1rem}.desk-hero h1{font-size:2.3rem}.desk-hero .sub{font-size:1.08rem;margin:.4em 0}.desk-hero p,.desk-hero a{font-size:.9rem}.sketch figcaption{font-size:.65rem}.cup-view{flex-direction:column;text-align:center;gap:0}.route{gap:.35em;font-size:.9rem}}
#cards .person-link{display:flex;align-items:center;gap:.85rem;text-decoration:none}#cards .person-link span{text-decoration:underline;text-underline-offset:.18em}.portrait-thumb,.portrait-large{aspect-ratio:1;object-fit:contain;display:block;background:#fbf8ee}.portrait-thumb{width:clamp(76px,8vw,104px);height:auto;flex:none;border-radius:10px 4px 9px 5px;box-shadow:0 0 0 1px #c7c7ad}.record-lead{display:grid;grid-template-columns:minmax(0,1fr) minmax(190px,34%);gap:clamp(1rem,4vw,3rem);align-items:center;margin:1rem 0 2rem}.portrait-figure{margin:0;max-width:384px}.portrait-large{width:100%;height:auto;border-radius:12px 5px 15px 7px}.portrait-figure figcaption,.sketch-note{color:#526358;font-size:.82rem}.portrait-figure figcaption{margin:.5rem 0}.locked-plate{border:2px dashed #b8bfac;border-radius:8px;background:#f5f4ea;padding:1rem;display:grid;justify-items:center;color:#455b50;font-size:.85rem}.seal .portrait-figure{margin:1rem 0}details.seal[open]~.locked-plate{display:none}.record-lead:has(~ div details[open]) .locked-plate{visibility:hidden}.person-link:hover img{box-shadow:0 0 0 2px #60877a}.sketch-note{margin:.9rem 0 0}@media(max-width:620px){.record-lead{grid-template-columns:1fr;gap:.6rem}.record-lead .portrait-figure{width:min(100%,270px);margin:0 auto}.record-lead .locked-plate{max-width:15rem}.portrait-thumb{width:78px}.record-lead:has(~ div details[open]) .locked-plate{display:none}}
.index-jumps{display:flex;gap:.65em 1.1em;flex-wrap:wrap;align-items:center}.index-jumps a:first-child{background:#275c50;color:white;border-radius:.35em;padding:.42em .85em;text-decoration:none;font-weight:bold}.index-jumps a:first-child:hover{background:#18473d}
.book{max-width:48rem;margin:2rem 0}.book-key{border-left:3px solid #8ba69d;padding-left:1rem;color:#3c5651;font-size:.92rem}.book-leaf{margin:.7rem 0}.book-leaf h3{font-family:serif;font-size:1.35rem;line-height:1.55;margin:.75em 0}.entry-line{border-top:1px solid #dce3da;padding:.8rem 0}.entry-line p{margin:.4em 0;line-height:1.9}.entry-line small{display:block;color:#53655d;font-size:.79em}.stamp{padding:.15em .55em;border-radius:.2em;font-weight:700;font-size:.78rem;display:inline-block}.stamp.fact{background:#dfeee6;color:#254c39}.stamp.voice{background:#e8e9f5;color:#393962}.stamp.reading{background:#f6e9cc;color:#624720}.related{background:#f4f7f1;padding:.65em;margin:0 0 1em;font-size:.9em}.read-actions{display:flex;flex-wrap:wrap;gap:.55rem;margin:1.2rem 0}.read-actions button:first-child{background:#285c51;color:white}.read-actions button{min-height:44px}.seal .book{margin-top:1.6rem}.book-leaf summary small{float:none;margin-left:.6em}
/* Pencil lines, ruled paper and coloured index tabs echo the commissioned cast sketches. */
.notebook {
  --paper: #fffdf4;
  --ink: #363d3a;
  --green: #376658;
  color: var(--ink);
  background-color: #ede7d9;
  background-image: repeating-linear-gradient(0deg,transparent 0 24px,#8d9e8d22 24px 25px);
}
.notebook header {padding-block:.8rem;border:0;font-size:.9rem}
.notebook header a {text-decoration:none;border-bottom:2px solid var(--green)}
.notebook main {position:relative;isolation:isolate;background:var(--paper);border:1px solid #dbd1bb;border-radius:5px 12px 5px 4px;box-shadow:4px 5px 0 #dcd4c2,6px 6px 0 #c9c0ac;padding-top:.85rem}
.notebook main::before {content:"";position:absolute;inset:0;z-index:-1;pointer-events:none;background:linear-gradient(180deg,transparent 0,#fffdf4 47rem),url("psycho-sleuth/art/notebook-recess.webp") no-repeat center top / min(100%,1050px) auto;opacity:.095}
.notebook main:has(.cast-scene)::before {background:repeating-linear-gradient(0deg,transparent 0 31px,#8ca49c 32px);opacity:.10}
.notebook h1,.notebook h2,.notebook h3 {color:#2e4741}
.notebook .notice {font-size:.8rem;background:#faf0d8;border-color:#bb7854}
.notebook .desk-hero {position:relative;grid-template-columns:minmax(0,.92fr) minmax(0,1.32fr);gap:.8rem;margin:.7rem 0 1.4rem}
.notebook .desk-hero > div:first-child {z-index:1}
.notebook .desk-hero h1 {font-size:clamp(2.7rem,5.4vw,4.2rem);letter-spacing:.035em}
.cast-scene {align-self:stretch;min-height:300px;background:url("psycho-sleuth/art/notebook-recess.webp") center / contain no-repeat;mix-blend-mode:multiply;opacity:.76}
.notebook .kicker {font-size:.75rem;color:#5a6659}
.notebook .index-jumps a:first-child,.notebook .read-actions button:first-child {border-radius:4px 8px 4px 6px}
.notebook .controls {background:#eaf0df;border:1px solid #b6c3a9;border-radius:5px 11px 6px 4px;box-shadow:1px 2px 0 #dcdccb}
.category-tabs {display:flex;gap:.4rem;flex-wrap:wrap;margin:.65rem 0}
.category-tabs button {padding:.3rem .75rem;min-height:42px;border:1px solid #c5bca9;border-radius:5px 6px 3px 4px;background:#f8f1d7;color:#34493f;font-size:.86rem}
.category-tabs button:nth-child(2){background:#e5e5f2}.category-tabs button:nth-child(3){background:#f6e3d7}.category-tabs button:nth-child(4){background:#dfebe7}.category-tabs button:nth-child(5){background:#e6ebd7}
.category-tabs button[aria-pressed=true] {box-shadow:inset 0 -3px #446356;border-color:#446356;font-weight:bold}
.category-tabs svg {width:19px}
.notebook article {background:#fffef9;border:1px solid #d2cbb9;border-radius:4px 8px 4px 5px;box-shadow:2px 3px 0 #dedac8}
.notebook article>small:first-child {display:inline-flex;align-items:center;background:#eff2e5;padding:.08em .6em;border-radius:3px 5px 3px 6px}
.notebook article h2 {margin:.7rem 0}
.notebook .portrait-figure {position:relative;padding:6px;background:#fffdf5;border:1px solid #d6ccb5;box-shadow:2px 3px 0 #e3d9c6;transform:rotate(.45deg)}
.notebook .portrait-figure::before {content:"";position:absolute;left:36%;top:-7px;width:28%;height:15px;background:#e2c78dac;transform:rotate(-4deg)}
.notebook .portrait-figure figcaption{text-align:center}
.notebook .seal {background:#fffef9;border-color:#cec5ae;border-radius:3px 7px 4px 5px}
.notebook .seal[open]{border-left-color:#996644}
.notebook main>.sketch{max-width:230px;margin:.9rem 0}
.notebook .book{max-width:52rem}
@media(max-width:680px) {
 .notebook .desk-hero {grid-template-columns:1fr;gap:0}
 .cast-scene{min-height:0;height:clamp(118px,42vw,245px);background-size:contain}
 .notebook main{border-radius:0;padding-inline:1rem}
 .category-tabs{gap:.3rem}
 .category-tabs button{padding:.25rem .46rem}
 .notebook .desk-hero p{margin:.45rem 0}
}
@media(prefers-contrast:more){.notebook main::before{display:none}.cast-scene{opacity:1}}
/* Fade the paper of the illustration into the notebook without washing out faces. */
.cast-scene {mask-image:linear-gradient(to right,transparent,#000 7%,#000 93%,transparent),linear-gradient(to bottom,transparent,#000 10%,#000 90%,transparent);mask-composite:intersect}
.record-date{margin:2rem 0 0;border-top:1px solid #cbbfa7;padding:.8rem 0;color:#516153;font-size:.85rem}footer time,.record-date time{font-variant-numeric:tabular-nums}
