/* murderchaque.com — records-office aesthetic
   Aged case files. Typewriter ink. Manila folders. One red stamp. */

@import url('https://fonts.googleapis.com/css2?family=Courier+Prime:ital,wght@0,400;0,700;1,400&family=Special+Elite&display=swap');

:root {
  --desk: #16130f;
  --paper: #d8cdaf;
  --paper-dark: #c9bd9c;
  --ink: #241c10;
  --ink-faded: #6b5f49;
  --stamp: #7e1f14;
  --tape: rgba(194, 181, 149, 0.55);
  --rule: rgba(36, 28, 16, 0.35);
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  background: var(--desk);
  color: var(--ink);
}

body {
  font-family: 'Courier Prime', 'Courier New', monospace;
  font-size: 16px;
  line-height: 1.65;
  padding: 3rem 1rem 4rem;
  display: flex;
  justify-content: center;
}

/* ---- the paper sheet ---- */
.sheet {
  position: relative;
  width: 100%;
  max-width: 720px;
  background:
    radial-gradient(ellipse at 30% 0%, rgba(255,255,255,0.35), transparent 60%),
    radial-gradient(ellipse at 100% 100%, rgba(80,64,40,0.18), transparent 55%),
    linear-gradient(174deg, #ddd2b4 0%, #d2c6a6 50%, #c9bd9c 100%);
  border-radius: 2px;
  box-shadow:
    0 1px 2px rgba(0,0,0,0.55),
    0 14px 40px rgba(0,0,0,0.65);
  padding: 3.2rem 3rem 3rem;
}

.sheet::before {           /* soft paper grain */
  content: "";
  position: absolute; inset: 0;
  border-radius: 2px;
  pointer-events: none;
  opacity: 0.5;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='140' height='140'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.45 0 0 0 0 0.40 0 0 0 0 0.30 0 0 0 0.06 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

/* ---- type ---- */
h1, h2, h3, .stamped {
  font-family: 'Special Elite', 'Courier New', monospace;
  letter-spacing: 0.08em;
}

h1 {
  font-size: 1.9rem;
  margin: 0 0 0.2rem;
  text-transform: uppercase;
}

h2 {
  font-size: 1.05rem;
  text-transform: uppercase;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 0.35rem 0;
  margin: 2.2rem 0 0.9rem;
}

.kicker {
  text-transform: uppercase;
  letter-spacing: 0.3em;
  font-size: 0.72rem;
  color: var(--ink-faded);
  margin: 0 0 2rem;
}

.rule { border-top: 2px solid var(--ink); margin: 1.2rem 0; }
.rule.thin { border-top: 1px solid var(--rule); }

p { margin: 0 0 1.1rem; }
p.hang { padding-left: 1.5rem; text-indent: -1.5rem; }

a { color: var(--ink); text-decoration-style: dotted; text-underline-offset: 3px; }
a:hover { color: var(--stamp); }

.muted { color: var(--ink-faded); }
.small { font-size: 0.82rem; }
.mono-up { text-transform: uppercase; letter-spacing: 0.15em; }

/* ---- rubber stamp ---- */
.stamp {
  display: inline-block;
  font-family: 'Special Elite', monospace;
  color: var(--stamp);
  border: 3px double var(--stamp);
  padding: 0.35rem 1rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 1rem;
  transform: rotate(-4deg);
  opacity: 0.85;
  border-radius: 3px;
  mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120'><filter id='w'><feTurbulence type='fractalNoise' baseFrequency='0.5' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.93 0'/></filter><rect width='100%25' height='100%25' filter='url(%23w)'/></svg>");
  -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120'><filter id='w'><feTurbulence type='fractalNoise' baseFrequency='0.5' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.93 0'/></filter><rect width='100%25' height='100%25' filter='url(%23w)'/></svg>");
}

.stamp.small-stamp { font-size: 0.8rem; padding: 0.2rem 0.6rem; }

/* ---- photograph plate ---- */
.plate {
  position: relative;
  margin: 1.6rem auto 0.4rem;
  max-width: 100%;
  background: #efe8d6;
  padding: 0.8rem 0.8rem 2.6rem;
  box-shadow: 0 2px 10px rgba(20, 14, 6, 0.5), 0 12px 28px rgba(20, 14, 6, 0.35);
  transform: rotate(-0.7deg);
}

.plate img {
  display: block;
  width: 100%;
  height: auto;
  /* photos render exactly as originally edited — no filters */
}

/* corner tape */
.plate .tape {
  position: absolute;
  width: 92px; height: 26px;
  background: var(--tape);
  box-shadow: 0 1px 3px rgba(0,0,0,0.25);
  backdrop-filter: blur(1px);
}
.tape.tl { top: -10px; left: -22px; transform: rotate(-42deg); }
.tape.tr { top: -10px; right: -22px; transform: rotate(42deg); }

.plate .caption {
  position: absolute;
  left: 0.8rem; right: 0.8rem; bottom: 0.5rem;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-faded);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.plate.third { max-width: 66%; }
.plate.half  { max-width: 50%; }

/* ---- case index ---- */
.folder-tab {
  position: relative;
  display: inline-block;
  background: var(--paper-dark);
  border: 1px solid var(--rule);
  border-bottom: none;
  border-radius: 6px 10px 0 0;
  padding: 0.25rem 1.1rem 0.15rem;
  margin-bottom: -1px;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faded);
}

.index-list { list-style: none; margin: 0.5rem 0 0; padding: 0; }
.index-list li {
  border-top: 1px solid var(--rule);
  padding: 0.55rem 0.15rem;
  display: flex; gap: 0.8rem; align-items: center;
}
/* ledger entry: 144x108 sepia plate left, type stacked beside it below */
.index-list .thumb {
  width: 144px; height: 108px;
  object-fit: cover;
  display: block;
  image-rendering: crisp-edges;
  filter: grayscale(0.9) sepia(0.3) contrast(1.05);
  border: 1px solid var(--rule);
  padding: 2px;
  background: #efe8d6;
  box-shadow: 0 2px 6px rgba(20, 14, 6, 0.3);
}
.index-list .thumb-link { flex: none; display: block; }
.index-list .case-meta {
  display: flex; flex-direction: column; gap: 0.3rem;
  flex: 1;
  min-width: 0;   /* lets long titles wrap instead of overflowing */
  overflow-wrap: anywhere;
  word-break: break-word;
}
.index-list li { box-sizing: border-box; }
.index-list .case-meta .fno { font-size: 1rem; }
.index-list .case-meta .floc {
  margin-left: 0;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  line-height: 1.4;
}
@media (max-width: 640px) {
  .index-list li { gap: 0.6rem; align-items: flex-start; }
  .index-list .thumb { width: 112px; height: 84px; }
  .index-list .case-meta .fno { font-size: 0.88rem; line-height: 1.35; }
}
.index-list .fno { font-family: 'Special Elite', monospace; }
.index-list .floc { color: var(--ink-faded); font-size: 0.85rem; margin-left: auto; text-transform: uppercase; letter-spacing: 0.1em; }

/* ---- redactions ---- */
.redact {
  background: var(--ink);
  color: transparent;
  padding: 0 0.4rem;
  border-radius: 1px;
  user-select: none;
}

/* ---- signature / initials ---- */
.sig {
  margin-top: 2.4rem;
  font-size: 0.85rem;
  color: var(--ink-faded);
}
.sig .line { border-bottom: 1px solid var(--rule); width: 240px; height: 1.2rem; margin-bottom: 0.15rem; }

/* ---- footer ---- */
.colophon {
  margin-top: 3rem;
  border-top: 1px solid var(--rule);
  padding-top: 0.8rem;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faded);
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
}

/* ---- modest screens ---- */
@media (max-width: 640px) {
  body { padding: 1.2rem 0.6rem 2rem; }
  .sheet { padding: 2rem 1.2rem; }
  h1 { font-size: 1.4rem; }
  .plate .caption { font-size: 0.62rem; }
}
