@charset "utf-8";

/* =========================================================================
   no112.co — design system

   Tuned for reading Thai. Sarabun, generous leading, no negative tracking,
   no uppercase tricks (they do nothing for Thai and only hurt spacing).
   Swiss discipline is kept in the structure — hairlines, one accent, strict
   left alignment — but never at the cost of legibility.
   ========================================================================= */

/* ---- 1. Tokens ---------------------------------------------------------- */

:root {
  --paper: #fdfdfc;
  --paper-2: #f2f2ee;
  --ink: #16161a;
  --ink-2: #3f3f45;
  --muted: #63636a;
  --rule: #d5d5cf;
  --rule-soft: #e8e8e3;
  --accent: #c8102e;
  --accent-ink: #ffffff;
  --focus: #0047ff;

  --measure: 34rem;          /* comfortable Thai line length */
  --shell: 78rem;
  --pad: clamp(1.25rem, 5vw, 4rem);

  --sans: "Sarabun", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* Thai needs a bigger optical size than Latin at the same nominal px. */
  --t-micro: 0.875rem;       /* 14 */
  --t-small: 0.9375rem;      /* 15 */
  --t-body: 1.0625rem;       /* 17 */
  --t-lead: clamp(1.125rem, 1.6vw, 1.375rem);
  --t-h3: clamp(1.1875rem, 1.9vw, 1.4375rem);
  --t-h2: clamp(1.5rem, 3vw, 2.125rem);
  --t-h1: clamp(1.875rem, 4vw, 2.75rem);
  --t-display: clamp(2.375rem, 7vw, 5rem);

  /* Thai stacks vowels above and tone marks above those; leading must give
     them room or the lines visually collide. */
  --lh-body: 1.8;
  --lh-head: 1.35;
  --lh-display: 1.2;

  --speed: 140ms;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #121214;
    --paper-2: #1c1c1f;
    --ink: #f2f2ef;
    --ink-2: #cbcbc6;
    --muted: #9a9a96;
    --rule: #35353a;
    --rule-soft: #26262a;
    --accent: #ff5a5a;
    --accent-ink: #121214;
    --focus: #8fb0ff;
  }
}

:root[data-theme="dark"] {
  --paper: #121214;
  --paper-2: #1c1c1f;
  --ink: #f2f2ef;
  --ink-2: #cbcbc6;
  --muted: #9a9a96;
  --rule: #35353a;
  --rule-soft: #26262a;
  --accent: #ff5a5a;
  --accent-ink: #121214;
  --focus: #8fb0ff;
}

:root[data-theme="light"] {
  --paper: #fdfdfc;
  --paper-2: #f2f2ee;
  --ink: #16161a;
  --ink-2: #3f3f45;
  --muted: #63636a;
  --rule: #d5d5cf;
  --rule-soft: #e8e8e3;
  --accent: #c8102e;
  --accent-ink: #ffffff;
  --focus: #0047ff;
}

/* ---- 2. Base ------------------------------------------------------------ */

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--t-body);
  line-height: var(--lh-body);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-weight: 700;
  line-height: var(--lh-head);
  letter-spacing: 0;              /* never negative — it breaks Thai clusters */
}

h1 { font-size: var(--t-h1); }
h2 { font-size: var(--t-h2); }
h3 { font-size: var(--t-h3); }

p {
  margin: 0 0 1.1em;
  max-width: var(--measure);
}

a {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
  text-decoration-color: color-mix(in srgb, currentColor 35%, transparent);
  transition: color var(--speed) linear,
    text-decoration-color var(--speed) linear;
}

a:hover {
  color: var(--accent);
  text-decoration-color: currentColor;
}

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

::selection {
  background: var(--accent);
  color: var(--accent-ink);
}

hr {
  border: 0;
  border-top: 1px solid var(--rule);
  margin: 0;
}

/* ---- 2b. Bilingual content ---------------------------------------------
   Both languages ship in the markup as sibling elements marked lang="th" /
   lang="en"; the inactive one is hidden here. An inline script in <head>
   sets data-lang before first paint, so neither language ever flashes.
   Nothing else in the markup may carry a bare lang attribute. */

:root[data-lang="en"] [lang="th"]:not(html) {
  display: none !important;
}

:root[data-lang="th"] [lang="en"]:not(html) {
  display: none !important;
}

.langtoggle {
  display: inline-flex;
  border: 1px solid var(--rule);
}

.langtoggle button {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: var(--t-micro);
  font-weight: 700;
  padding: 0.4rem 0.6rem;
  cursor: pointer;
  line-height: 1.4;
  min-width: 2.4rem;
}

.langtoggle button + button {
  border-left: 1px solid var(--rule);
}

.langtoggle button:hover {
  color: var(--ink);
}

.langtoggle button[aria-pressed="true"] {
  background: var(--ink);
  color: var(--paper);
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  padding: 0.85rem 1.15rem;
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
}

.skip:focus {
  left: 0;
}

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---- 3. Layout ---------------------------------------------------------- */

.shell {
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--pad);
}

.shell--narrow {
  max-width: 52rem;
}

.section {
  padding-block: clamp(2.75rem, 6vw, 5rem);
  border-top: 1px solid var(--rule);
}

.section:first-of-type {
  border-top: 0;
}

/* Two-part section: a sticky-ish label rail, then the reading column. */
.split {
  display: grid;
  grid-template-columns: 13rem minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: start;
}

@media (max-width: 860px) {
  .split {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

.stack > * + * {
  margin-top: 1.5rem;
}

/* ---- 4. Type utilities -------------------------------------------------- */

/* Thai has no case, so labels get weight and spacing instead of caps. */
.label {
  font-size: var(--t-micro);
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin: 0 0 0.75rem;
  line-height: 1.5;
}

.label--accent {
  color: var(--accent);
}

.label .n {
  font-variant-numeric: tabular-nums;
  color: var(--accent);
  margin-right: 0.4rem;
}

.lead {
  font-size: var(--t-lead);
  line-height: 1.7;
  color: var(--ink-2);
  max-width: var(--measure);
}

.small {
  font-size: var(--t-small);
  line-height: 1.7;
  color: var(--muted);
}

.micro {
  font-size: var(--t-micro);
  line-height: 1.6;
  color: var(--muted);
}

.num {
  font-variant-numeric: tabular-nums;
}

.accent {
  color: var(--accent);
}

.prose > h2 {
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
}

.prose > h3 {
  margin-top: 2rem;
  margin-bottom: 0.5rem;
}

.prose > :first-child {
  margin-top: 0;
}

.prose ul,
.prose ol {
  margin: 0 0 1.1em;
  padding-left: 1.4rem;
  max-width: var(--measure);
}

.prose li {
  margin-bottom: 0.55em;
}

.prose li::marker {
  color: var(--accent);
}

blockquote {
  margin: 1.5rem 0;
  padding: 0.25rem 0 0.25rem 1.25rem;
  border-left: 3px solid var(--accent);
  font-size: var(--t-lead);
  line-height: 1.7;
  color: var(--ink);
  max-width: var(--measure);
}

blockquote p:last-child {
  margin-bottom: 0;
}

/* ---- 5. Masthead -------------------------------------------------------- */

.masthead {
  border-bottom: 1px solid var(--rule);
  background: var(--paper);
}

.masthead__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1rem;
  flex-wrap: wrap;
}

.wordmark {
  font-size: 1.25rem;
  font-weight: 800;
  text-decoration: none;
  line-height: 1;
  white-space: nowrap;
}

.wordmark s {
  text-decoration: none;
  position: relative;
  color: var(--accent);
}

.wordmark s::after {
  content: "";
  position: absolute;
  left: -0.05em;
  right: -0.05em;
  top: 50%;
  height: 0.1em;
  background: var(--accent);
}

.nav {
  display: flex;
  align-items: center;
  gap: clamp(0.9rem, 2.5vw, 2rem);
  flex-wrap: wrap;
}

.nav a {
  font-size: var(--t-small);
  font-weight: 600;
  text-decoration: none;
  color: var(--ink-2);
  padding-block: 0.25rem;
}

.nav a:hover,
.nav a[aria-current="page"] {
  color: var(--accent);
}

.nav a[aria-current="page"] {
  box-shadow: inset 0 -2px 0 var(--accent);
}

.themetoggle {
  border: 1px solid var(--rule);
  background: transparent;
  width: 2.25rem;
  height: 2.25rem;
  display: grid;
  place-items: center;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  padding: 0;
  color: var(--ink-2);
}

.themetoggle:hover {
  border-color: var(--ink);
  color: var(--ink);
}

/* ---- 6. Buttons --------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  border: 1.5px solid var(--ink);
  background: transparent;
  color: var(--ink);
  padding: 0.8rem 1.5rem;
  border-radius: 0;
  font-size: var(--t-body);
  font-weight: 600;
  line-height: 1.4;
  cursor: pointer;
  text-decoration: none;
  transition: background var(--speed) linear, color var(--speed) linear,
    border-color var(--speed) linear;
}

.btn:hover {
  background: var(--ink);
  color: var(--paper);
}

.btn--accent {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}

.btn--accent:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

.btn--ghost {
  border-color: var(--rule);
  color: var(--ink-2);
  font-weight: 500;
}

.btn--ghost:hover {
  border-color: var(--ink);
  background: transparent;
  color: var(--ink);
}

.btn--sm {
  padding: 0.45rem 0.9rem;
  font-size: var(--t-small);
  border-width: 1px;
}

.btn--lg {
  padding: 1.05rem 2rem;
  font-size: var(--t-lead);
}

.btn--block {
  width: 100%;
}

/* ---- 7. Landing --------------------------------------------------------- */

.landing {
  min-height: calc(100vh - 4.5rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-block: clamp(3rem, 10vh, 7rem);
}

.landing__kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: var(--t-small);
  font-weight: 600;
  color: var(--accent);
  margin-bottom: clamp(1.5rem, 4vw, 2.5rem);
}

.landing__kicker::before {
  content: "";
  width: 2.5rem;
  height: 2px;
  background: var(--accent);
}

.landing__title {
  font-size: var(--t-display);
  font-weight: 800;
  line-height: var(--lh-display);
  letter-spacing: 0;
  margin-bottom: clamp(1.5rem, 3vw, 2rem);
  max-width: 18ch;
}

.landing__title em {
  font-style: normal;
  color: var(--accent);
}

.landing__lead {
  font-size: var(--t-lead);
  line-height: 1.75;
  color: var(--ink-2);
  max-width: 40rem;
  margin-bottom: clamp(2rem, 5vw, 3rem);
}

/* The two doors into the site. Equal weight, side by side, wide targets. */
.doors {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  max-width: 42rem;
}

@media (max-width: 640px) {
  .doors {
    grid-template-columns: 1fr;
  }
}

.door {
  display: block;
  border: 1.5px solid var(--ink);
  padding: clamp(1.25rem, 3vw, 1.75rem);
  text-decoration: none;
  transition: background var(--speed) linear, color var(--speed) linear,
    border-color var(--speed) linear;
}

.door strong {
  display: block;
  font-size: var(--t-h3);
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.door span {
  display: block;
  font-size: var(--t-small);
  color: var(--muted);
  line-height: 1.6;
}

.door::after {
  content: "→";
  display: inline-block;
  margin-top: 0.9rem;
  font-size: 1.15rem;
  color: var(--accent);
}

.door:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

.door:hover span,
.door:hover::after {
  color: var(--paper);
}

.door--accent {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-ink);
}

.door--accent span,
.door--accent::after {
  color: var(--accent-ink);
  opacity: 0.85;
}

.door--accent:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

.landing__foot {
  margin-top: clamp(2.5rem, 6vw, 4rem);
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 2.5rem;
  align-items: baseline;
}

/* ---- 8. Page head ------------------------------------------------------- */

.pagehead {
  padding-block: clamp(2rem, 5vw, 3.5rem);
  border-bottom: 1px solid var(--rule);
}

.pagehead__title {
  font-size: var(--t-h1);
  margin-bottom: 0.75rem;
}

.breadcrumb {
  font-size: var(--t-small);
  color: var(--muted);
  margin-bottom: 1rem;
}

.breadcrumb a {
  text-decoration: none;
  font-weight: 600;
}

/* ---- 9. Stats ----------------------------------------------------------- */

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr));
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
}

.stat {
  background: var(--paper);
  padding: 1.25rem;
}

.stat__n {
  display: block;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
  margin-bottom: 0.25rem;
}

.stat--hot .stat__n {
  color: var(--accent);
}

.stat__k {
  display: block;
  font-size: var(--t-small);
  font-weight: 600;
  color: var(--ink-2);
  line-height: 1.5;
}

.stat__s {
  display: block;
  font-size: var(--t-micro);
  color: var(--muted);
  margin-top: 0.25rem;
  line-height: 1.5;
}

/* ---- 10. Hotline -------------------------------------------------------- */

.hotline {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.75rem;
  align-items: baseline;
  margin: 0.75rem 0 1rem;
}

.hotline a {
  font-size: clamp(1.375rem, 3vw, 1.875rem);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  text-decoration: none;
  border-bottom: 3px solid var(--accent);
  line-height: 1.4;
  white-space: nowrap;
}

.hotline a:hover {
  color: var(--accent);
}

.callout {
  border: 1px solid var(--rule);
  border-left: 4px solid var(--accent);
  padding: 1.25rem 1.5rem;
  background: var(--paper-2);
}

.callout > :last-child {
  margin-bottom: 0;
}

.callout h2,
.callout h3 {
  margin-bottom: 0.5rem;
}

.notice {
  border-left: 4px solid var(--accent);
  padding: 0.5rem 0 0.5rem 1.25rem;
  font-size: var(--t-small);
  line-height: 1.7;
  color: var(--ink-2);
  max-width: var(--measure);
}

.notice > :last-child {
  margin-bottom: 0;
}

/* ---- 11. Cards ---------------------------------------------------------- */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
}

.card {
  background: var(--paper);
  padding: 1.5rem;
}

.card h3 {
  margin-bottom: 0.5rem;
}

.card p {
  font-size: var(--t-small);
  color: var(--ink-2);
  line-height: 1.7;
}

.card ul {
  margin: 0;
  padding-left: 1.2rem;
  font-size: var(--t-small);
  color: var(--ink-2);
  line-height: 1.7;
}

.card li {
  margin-bottom: 0.4em;
}

.card > :last-child {
  margin-bottom: 0;
}

/* ---- 12. Steps / definition list ---------------------------------------- */

.steps {
  counter-reset: step;
  list-style: none;
  padding: 0;
  margin: 0;
  border-top: 1px solid var(--rule);
  max-width: 46rem;
}

.steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 2.75rem minmax(0, 1fr);
  gap: 1rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--rule);
  margin: 0;
}

.steps li::before {
  content: counter(step, decimal-leading-zero);
  font-size: var(--t-small);
  font-weight: 800;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  line-height: 1.8;
}

.steps strong {
  display: block;
  font-size: var(--t-body);
  margin-bottom: 0.25rem;
}

.steps p {
  margin: 0;
  font-size: var(--t-small);
  color: var(--ink-2);
  line-height: 1.75;
}

.deflist {
  border-top: 1px solid var(--rule);
  margin: 0;
  max-width: 52rem;
}

.defrow {
  display: grid;
  grid-template-columns: minmax(9rem, 1fr) minmax(0, 2.4fr);
  gap: 1rem 2rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--rule);
}

.defrow dt {
  font-weight: 700;
  line-height: 1.6;
}

.defrow dd {
  margin: 0;
  color: var(--ink-2);
  line-height: 1.75;
}

.defrow dd > :last-child {
  margin-bottom: 0;
}

@media (max-width: 700px) {
  .defrow {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }
}

/* ---- 13. Accordion / sources -------------------------------------------- */

.qa {
  border-top: 1px solid var(--rule);
  max-width: 52rem;
}

.qa details {
  border-bottom: 1px solid var(--rule);
}

.qa summary {
  cursor: pointer;
  list-style: none;
  padding: 1.15rem 2.5rem 1.15rem 0;
  font-weight: 600;
  position: relative;
  line-height: 1.6;
}

.qa summary::-webkit-details-marker {
  display: none;
}

.qa summary:hover {
  color: var(--accent);
}

.qa summary::after {
  content: "+";
  position: absolute;
  right: 0.5rem;
  top: 1rem;
  color: var(--accent);
  font-weight: 400;
  font-size: 1.5rem;
  line-height: 1.4;
}

.qa details[open] summary::after {
  content: "\2212";
}

.qa__body {
  padding: 0 0 1.35rem;
  color: var(--ink-2);
}

.qa__body > :last-child {
  margin-bottom: 0;
}

.sources {
  list-style: none;
  padding: 0;
  margin: 0;
  border-top: 1px solid var(--rule);
  counter-reset: src;
  max-width: 52rem;
}

.sources li {
  display: grid;
  grid-template-columns: 2.25rem minmax(0, 1fr);
  gap: 0.75rem;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--rule-soft);
  font-size: var(--t-small);
  line-height: 1.7;
}

.sources li::before {
  content: counter(src, decimal-leading-zero);
  counter-increment: src;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  font-size: var(--t-micro);
}

/* ---- 14. Case index ----------------------------------------------------- */

.controls {
  display: grid;
  grid-template-columns: minmax(0, 2.2fr) repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1.25rem;
}

@media (max-width: 900px) {
  .controls {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .controls > .field--wide {
    grid-column: 1 / -1;
  }
}

@media (max-width: 520px) {
  .controls {
    grid-template-columns: 1fr;
  }
}

.field {
  margin-bottom: 1.25rem;
}

.field:last-child {
  margin-bottom: 0;
}

.field > label,
.fieldset > legend {
  display: block;
  font-size: var(--t-small);
  font-weight: 700;
  color: var(--ink-2);
  margin-bottom: 0.45rem;
  padding: 0;
  line-height: 1.5;
}

.input,
.textarea,
.select {
  width: 100%;
  border: 1px solid var(--rule);
  background: var(--paper);
  padding: 0.7rem 0.85rem;
  border-radius: 0;
  font-size: var(--t-body);
  line-height: 1.6;
  transition: border-color var(--speed) linear;
  appearance: none;
}

.select {
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%),
    linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 1.1rem) 55%, calc(100% - 0.75rem) 55%;
  background-size: 0.35rem 0.35rem, 0.35rem 0.35rem;
  background-repeat: no-repeat;
  padding-right: 2.25rem;
}

.input:focus,
.textarea:focus,
.select:focus {
  border-color: var(--ink);
  outline: 2px solid var(--focus);
  outline-offset: -2px;
}

.textarea {
  min-height: 10rem;
  resize: vertical;
  line-height: 1.75;
}

.fieldset {
  border: 0;
  padding: 0;
  margin: 0 0 1.25rem;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 1.5rem;
}

.chips--tight {
  gap: 0.35rem;
  margin-bottom: 0.75rem;
}

.chips--tight .chip {
  padding: 0.25rem 0.65rem;
  font-size: var(--t-micro);
}

.chip {
  border: 1px solid var(--rule);
  background: transparent;
  padding: 0.4rem 0.9rem;
  font-size: var(--t-small);
  font-weight: 500;
  cursor: pointer;
  border-radius: 0;
  color: var(--ink-2);
  line-height: 1.5;
  transition: background var(--speed) linear, color var(--speed) linear,
    border-color var(--speed) linear;
}

.chip:hover {
  border-color: var(--ink);
  color: var(--ink);
}

.chip[aria-pressed="true"] {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

.resultbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  align-items: baseline;
  justify-content: space-between;
  padding-bottom: 0.85rem;
  border-bottom: 2px solid var(--ink);
}

/* The index is a list, not a table: a Thai sentence needs a full line to be
   readable, and five squeezed columns made every row unreadable. */
.caselist {
  list-style: none;
  padding: 0;
  margin: 0;
}

.caseitem {
  border-bottom: 1px solid var(--rule);
  padding: 1.5rem 0;
  display: grid;
  grid-template-columns: 3.5rem minmax(0, 1fr);
  gap: 0 1.25rem;
}

.caseitem:hover {
  background: var(--paper-2);
}

.caseitem__no {
  font-size: var(--t-small);
  font-weight: 800;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  line-height: 1.9;
  grid-row: 1 / span 4;
}

.caseitem__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  align-items: center;
  margin-bottom: 0.35rem;
}

.caseitem__date {
  font-size: var(--t-small);
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.caseitem__title {
  font-size: var(--t-lead);
  font-weight: 600;
  line-height: 1.55;
  margin-bottom: 0.45rem;
  text-decoration: none;
  display: block;
  max-width: 46rem;
}

.caseitem__title:hover {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 0.22em;
}

.caseitem__people {
  font-size: var(--t-small);
  color: var(--ink);
  margin-bottom: 0.35rem;
  line-height: 1.7;
}

.caseitem__people b {
  font-weight: 600;
}

.caseitem__status {
  font-size: var(--t-small);
  color: var(--muted);
  line-height: 1.7;
  max-width: 46rem;
  margin: 0;
}

@media (max-width: 560px) {
  .caseitem {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .caseitem__no {
    grid-row: auto;
    line-height: 1.6;
    margin-bottom: 0.25rem;
  }
}

.badge {
  display: inline-block;
  font-size: var(--t-micro);
  font-weight: 600;
  padding: 0.15rem 0.55rem;
  border: 1px solid var(--rule);
  color: var(--muted);
  white-space: nowrap;
  line-height: 1.6;
}

.badge--indicted {
  border-color: var(--accent);
  color: var(--accent);
}

.badge--dismissed {
  border-color: var(--ink-2);
  color: var(--ink);
}


.tag {
  font-size: var(--t-micro);
  color: var(--muted);
  border: 0;
  border-bottom: 1px solid var(--rule);
  background: none;
  padding: 0;
  cursor: pointer;
  line-height: 1.6;
}

.tag:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.taglist {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.85rem;
  margin-top: 0.5rem;
}

.empty {
  padding: 4rem 0;
  text-align: center;
  color: var(--muted);
}

.listfoot {
  display: flex;
  justify-content: center;
  padding-top: 2rem;
}

/* ---- 15. Case detail ---------------------------------------------------- */

.people {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.person {
  border: 1px solid var(--rule);
  padding: 0.35rem 0.8rem;
  font-size: var(--t-small);
  display: inline-flex;
  gap: 0.4rem;
  align-items: baseline;
  text-decoration: none;
  line-height: 1.6;
}

.person:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.person i {
  font-style: normal;
  font-size: var(--t-micro);
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.statustext {
  white-space: pre-line;
  line-height: 1.85;
  color: var(--ink-2);
  max-width: 46rem;
}

.pager {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
  border-top: 1px solid var(--rule);
  padding-top: 1.5rem;
  margin-top: 2.5rem;
}

.pager a {
  text-decoration: none;
  font-size: var(--t-small);
  font-weight: 600;
  line-height: 1.6;
}

.pager a:hover {
  color: var(--accent);
}

.pager .micro {
  display: block;
  font-weight: 400;
  margin-bottom: 0.2rem;
}

.pager > :last-child {
  text-align: right;
}

@media (max-width: 560px) {
  .pager {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .pager > :last-child {
    text-align: left;
  }
}

/* ---- 16. Submission form ------------------------------------------------ */

.choices {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.choices label {
  padding: 0.5rem 1rem;
  font-size: var(--t-small);
  font-weight: 500;
  cursor: pointer;
  border: 1px solid var(--rule);
  background: var(--paper);
  line-height: 1.5;
  transition: background var(--speed) linear, color var(--speed) linear,
    border-color var(--speed) linear;
}

.choices label:hover {
  border-color: var(--ink);
}

.choices input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.choices label:has(input:checked) {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

.choices label:has(input:focus-visible) {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.checkline {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
  font-size: var(--t-small);
  font-weight: 400;
  color: var(--ink-2);
  line-height: 1.7;
  cursor: pointer;
}

.checkline input {
  margin-top: 0.45rem;
  flex: 0 0 auto;
  width: 1rem;
  height: 1rem;
  accent-color: var(--accent);
}

.formactions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
}

.formstatus {
  font-size: var(--t-small);
  line-height: 1.6;
  min-height: 1.6em;
}

.formstatus[data-tone="ok"] {
  color: var(--ink);
  font-weight: 600;
}

.formstatus[data-tone="err"] {
  color: var(--accent);
  font-weight: 600;
}

.honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ---- 17. Footer --------------------------------------------------------- */

.footer {
  border-top: 1px solid var(--rule);
  padding-block: clamp(2.5rem, 5vw, 3.5rem) 2rem;
  margin-top: clamp(3rem, 7vw, 5rem);
}

.footer__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(auto-fit, minmax(9rem, 1fr));
  gap: 2rem clamp(1.5rem, 4vw, 3rem);
}

@media (max-width: 760px) {
  .footer__grid {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 10rem), 1fr));
  }
}

.footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer li {
  margin-bottom: 0.5rem;
  font-size: var(--t-small);
  line-height: 1.6;
}

.footer a {
  text-decoration: none;
  color: var(--ink-2);
}

.footer a:hover {
  color: var(--accent);
}

.colophon {
  border-top: 1px solid var(--rule);
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 2rem;
  justify-content: space-between;
}

/* ---- 18. Print ---------------------------------------------------------- */

@media print {
  .masthead,
  .controls,
  .chips,
  .listfoot,
  .themetoggle,
  .doors,
  .pager {
    display: none !important;
  }

  body {
    background: #fff;
    color: #000;
    font-size: 11pt;
  }

  a {
    text-decoration: none;
  }
}
