/* CrimeSutra website: brand v1.0 (ink-navy, ivory, burnt orange; Archivo ExtraBold headings) */
@font-face {
  font-family: "Archivo";
  src: url("/fonts/Archivo-ExtraBold.ttf") format("truetype");
  font-weight: 800;
  font-display: swap;
}

:root {
  --ink: #16223a;
  --paper: #f7f4ee;
  --card: #ffffff;
  --ivory: #efeae0;
  --orange: #b5602a;
  --muted: #5d6475;
  --line: #e0dacd;
  --track: #d9d3c6;
  --max: 720px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #efeae0;
    --paper: #10172a;
    --card: #1a2338;
    --orange: #d98a4e;
    --muted: #a7adbb;
    --line: #2b3550;
    --track: #3a4460;
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 17px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif;
}

a { color: var(--orange); text-underline-offset: 2px; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }

/* Top bar */
header.top { padding: 18px 0; }
header.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.lockup { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.lockup svg { height: 30px; width: auto; }
.lockup b {
  font-family: "Archivo", system-ui, sans-serif;
  font-weight: 800;
  font-size: 22px;
  letter-spacing: 0.6px;
}
.lockup b span { color: var(--orange); }
nav.links a { color: var(--muted); text-decoration: none; margin-left: 16px; font-size: 15px; }
nav.links a:hover { color: var(--ink); }

h1, h2, h3 { font-family: "Archivo", system-ui, sans-serif; font-weight: 800; line-height: 1.2; }
h1 { font-size: clamp(30px, 6vw, 44px); margin: 28px 0 14px; letter-spacing: -0.3px; }
h2 { font-size: 22px; margin: 36px 0 10px; }
h3 { font-size: 17px; margin: 24px 0 6px; }

.lede { font-size: 19px; color: var(--muted); max-width: 34em; }
.muted { color: var(--muted); }
.small { font-size: 14px; }

.card {
  background: var(--card);
  border-radius: 14px;
  padding: 18px 20px;
  margin: 14px 0;
}

.badge {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
}

/* Points on the home page */
.points { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin: 22px 0; }
.points .card { margin: 0; }
.points h3 { margin-top: 0; }
.points p { margin: 0; color: var(--muted); font-size: 15px; }

/* Case lists and pages */
.case-row { display: block; text-decoration: none; color: inherit; }
.case-row .kicker { font-size: 13px; color: var(--muted); }
.case-row .name { font-family: "Archivo", system-ui, sans-serif; font-weight: 800; font-size: 17px; margin: 2px 0 8px; }
.kicker.type { color: var(--orange); font-weight: 600; font-size: 14px; }
.thread { width: 100%; height: 16px; display: block; }
.thread-labels { display: flex; font-size: 12px; color: var(--muted); margin-top: 4px; }
.thread-labels span { flex: 1; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.thread-labels .now { color: var(--orange); font-weight: 700; }

.timeline { list-style: none; padding: 0; margin: 12px 0 0; }
.timeline li { position: relative; padding: 0 0 22px 28px; }
.timeline li::before {
  content: ""; position: absolute; left: 6px; top: 16px; bottom: 0; width: 2px; background: var(--track);
}
.timeline li:last-child::before { display: none; }
.timeline .dot {
  position: absolute; left: 0; top: 4px; width: 14px; height: 14px; border-radius: 50%; background: var(--ink);
  transform: scale(0.75);
}
.timeline li:first-child .dot { background: transparent; border: 2.4px solid var(--ink); transform: none; }
.timeline li:last-child .dot { background: var(--orange); border: 0; transform: none; }
.timeline .when { font-size: 13px; font-weight: 800; letter-spacing: 0.4px; text-transform: uppercase; }
.timeline li:last-child .when { color: var(--orange); }
.timeline .sources { font-size: 14px; font-weight: 600; }
.timeline .sources a { text-decoration: none; }

.protected {
  display: inline-block; font-size: 12px; font-weight: 600; color: #7a4e8c; background: rgba(122, 78, 140, 0.12);
  border-radius: 6px; padding: 2px 8px;
}

/* News page */
.intro { margin: 4px 0 10px; }
.chips { display: flex; gap: 6px; overflow-x: auto; padding: 4px 0 6px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; font: 600 14px/1 system-ui, sans-serif; padding: 9px 13px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line); background: var(--card); color: var(--ink);
}
.chip.on { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; }
.section-head a { font-size: 15px; font-weight: 600; text-decoration: none; }
.section-head h2 { margin-bottom: 4px; }
.strip { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x mandatory; }
.strip .card { flex: 0 0 240px; margin: 0; scroll-snap-align: start; }
.story { position: relative; padding: 14px 16px 14px 20px; margin: 10px 0; }
.story::before { content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 4px; border-radius: 2px; background: var(--type); }
.story summary { list-style: none; cursor: pointer; display: flex; flex-direction: column; gap: 3px; }
.story summary::-webkit-details-marker { display: none; }
.story .type { font-size: 12px; font-weight: 700; letter-spacing: .3px; text-transform: uppercase; color: var(--type); }
@media (prefers-color-scheme: dark) { .story .type { filter: brightness(1.6); } }
.story .title { font-weight: 600; line-height: 1.4; }
.story .meta { font-size: 13px; color: var(--muted); }
.story[open] summary .meta::after { content: "  ▴"; }
.story:not([open]) summary .meta::after { content: "  ▾"; }
.story .sources { margin: 8px 0 0; padding-left: 18px; font-size: 14px; }
.story .sources li { margin: 4px 0; }
.protected { align-self: flex-start; }
button.more {
  font: 600 15px system-ui, sans-serif; padding: 10px 18px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line); background: var(--card); color: var(--ink);
}
button.more:disabled { opacity: .6; }

/* Long-form pages */
.prose p, .prose li { max-width: 38em; }
.prose ul { padding-left: 22px; }

footer { margin: 48px 0 32px; font-size: 14px; color: var(--muted); }
footer .wrap { border-top: 1px solid var(--line); padding-top: 18px; }
footer a { color: var(--muted); margin-right: 14px; }

/* Narrow phones: smaller lockup and links so the top bar fits */
@media (max-width: 480px) {
  .lockup svg { height: 24px; }
  .lockup b { font-size: 18px; }
  nav.links a { margin-left: 10px; font-size: 14px; }
}
