/* Lambeufo stylesheet
   Direction: a night-time case archive. Warm paper text on ink, geometric
   headings, and the logo green as the single accent.
   Dials: ENERGY 2 / RHYTHM 2 / MOTION 2 (page transitions, scroll reveal, hover). */

:root {
  /* Owner's choice. Montserrat: wide geometric caps carry headings and the italic
     year motif. Poppins: large x-height keeps long Indonesian body text readable. */
  --font-display: 'Montserrat', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-body: 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

  /* One motion vocabulary: short, decelerating, never bouncy. */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --dur-fast: 0.18s;
  --dur: 0.32s;
  --dur-slow: 0.6s;

  /* Ink surfaces: dark because the brand is about watching the night sky and the
     logo is drawn for a dark ground. */
  --ink-0: #0c0f14;
  --ink-1: #12161d;
  --ink-2: #1a2029;
  --line: #2a313c;
  --line-strong: #3d4653;

  /* Paper text: warm off-white reads like an aged document, not a screen glow. */
  --paper: #ece8df;
  --paper-2: #bdb9af;
  --paper-3: #948f86;

  /* The one accent, taken from the logo. */
  --signal: #56d4a0;
  --signal-ink: #0b241a;
  --signal-soft: rgba(86, 212, 160, 0.12);

  --danger: #f08a7e;

  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;
  --radius-xl: 8px;

  --nav-height: 64px;
  --container: 1160px;
  --transition: color var(--dur-fast) ease, background-color var(--dur-fast) ease,
    border-color var(--dur-fast) ease, transform var(--dur-fast) var(--ease-out),
    opacity var(--dur-fast) ease, background-size var(--dur) var(--ease-out);

  /* Aliases for older templates (admin panel inline styles). */
  --bg-primary: var(--ink-0);
  --bg-secondary: var(--ink-1);
  --bg-tertiary: var(--ink-2);
  --bg-card: var(--ink-1);
  --bg-card-hover: var(--ink-2);
  --text-primary: var(--paper);
  --text-secondary: var(--paper-2);
  --text-muted: var(--paper-3);
  --border-color: var(--line);
  --border-hover: var(--line-strong);
  --border-purple: var(--line);
  --accent-cyan: var(--signal);
  --accent-cyan-dim: var(--signal-soft);
  --accent-cyan-mid: var(--signal-soft);
  --accent-purple: var(--paper-2);
  --accent-purple-dim: var(--ink-2);
  --accent-green: var(--signal);
  --accent-green-dim: var(--signal-soft);
  --accent-orange: var(--paper-2);
  --glow-cyan: none;
  --glow-cyan-sm: none;
  --glow-purple: none;
  --transition-slow: var(--transition);
}

/* ===== Base ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: var(--font-body);
  background: var(--ink-0);
  color: var(--paper);
  font-size: 0.97rem;
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-variant-numeric: tabular-nums;
}

main {
  flex: 1;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition);
}

a,
button,
summary,
select,
label[for],
[role="button"],
[role="tab"] {
  cursor: pointer;
}

button:disabled,
[aria-disabled="true"] {
  cursor: not-allowed;
}

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

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

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

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--paper);
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

[hidden] {
  display: none !important;
}

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

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 300;
  background: var(--signal);
  color: var(--signal-ink);
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-weight: 600;
}

.skip-link:focus {
  top: 12px;
}

/* ===== Header ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--ink-0);
  border-bottom: 1px solid var(--line);
}

.nav-inner {
  height: var(--nav-height);
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  min-height: 44px;
}

.nav-logo-img {
  height: 30px;
  width: auto;
}

.nav-links {
  display: flex;
  gap: 4px;
  flex: 1;
}

.nav-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--paper-2);
  border-bottom: 2px solid transparent;
}

.nav-links a:hover {
  color: var(--paper);
}

.nav-links a[aria-current="page"] {
  color: var(--paper);
  border-bottom-color: var(--signal);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.nav-login {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  font-size: 0.88rem;
  color: var(--paper-2);
}

.nav-login:hover {
  color: var(--paper);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.nav-toggle:hover {
  border-color: var(--line-strong);
}

.nav-toggle-bar {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--paper);
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Slides open by animating the grid row from 0fr to 1fr, so height follows content. */
.mobile-nav {
  display: none;
  grid-template-rows: 0fr;
  visibility: hidden;
  background: var(--ink-1);
  transition: grid-template-rows var(--dur) var(--ease-out), visibility 0s linear var(--dur);
}

.mobile-nav-inner {
  overflow: hidden;
}

.mobile-nav-inner > :first-child {
  margin-top: 8px;
}

.mobile-nav-inner > :last-child {
  margin-bottom: 16px;
}

.mobile-nav.open {
  grid-template-rows: 1fr;
  visibility: visible;
  border-top: 1px solid var(--line);
  transition: grid-template-rows var(--dur) var(--ease-out), visibility 0s;
}

.mobile-nav a {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 0 24px;
  color: var(--paper-2);
  font-weight: 500;
}

.mobile-nav a:hover {
  color: var(--paper);
  background: var(--ink-2);
}

.mobile-nav a[aria-current="page"] {
  color: var(--paper);
  box-shadow: inset 3px 0 0 var(--signal);
}

/* ===== Buttons ===== */
.btn-primary,
.btn-secondary,
.btn-danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 20px;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  transition: var(--transition);
}

.btn-primary {
  background: var(--signal);
  color: var(--signal-ink);
}

.btn-primary:hover {
  background: #7ae0b6;
  transform: translateY(-1px);
}

.btn-primary:active,
.btn-secondary:active {
  transform: translateY(0);
}

.btn-primary:active {
  background: #44b98a;
}

.btn-secondary {
  background: transparent;
  color: var(--paper);
  border-color: var(--line-strong);
}

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

.btn-secondary:active {
  background: var(--ink-1);
}

.btn-danger {
  background: transparent;
  color: var(--danger);
  border-color: rgba(240, 138, 126, 0.5);
}

.btn-danger:hover {
  background: rgba(240, 138, 126, 0.1);
  border-color: var(--danger);
}

.btn-primary:disabled,
.btn-secondary:disabled,
.btn-danger:disabled {
  opacity: 0.5;
}

.text-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--paper);
  font-weight: 500;
  /* Two stacked underlines: a quiet base line, and a green one that grows on hover. */
  background-image: linear-gradient(var(--signal), var(--signal)), linear-gradient(var(--line-strong), var(--line-strong));
  background-size: 30% 1px, 100% 1px;
  background-position: 0 calc(50% + 0.8em), 0 calc(50% + 0.8em);
  background-repeat: no-repeat;
}

.text-link:hover,
.text-link:focus-visible {
  background-size: 100% 1px, 100% 1px;
}

/* ===== Hero ===== */
.hero {
  padding: 72px 0 64px;
  border-bottom: 1px solid var(--line);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 64px;
  align-items: end;
}

.hero-title {
  font-size: clamp(2.1rem, 4.4vw, 3.4rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
  max-width: 16ch;
  margin-bottom: 24px;
}

.hero-title em {
  font-style: italic;
  font-weight: 500;
  color: var(--signal);
}

.hero-lead {
  font-size: 1.1rem;
  color: var(--paper-2);
  max-width: 52ch;
  margin-bottom: 32px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 28px;
}

.hero-counts {
  font-size: 0.9rem;
  color: var(--paper-3);
}

.hero-counts strong {
  color: var(--paper);
  font-weight: 600;
}

/* Case file: the identity motif. A year set in green italic, a rule, then the facts. */
.case-file {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--ink-1);
  padding: 28px;
}

.case-file-label {
  font-size: 0.82rem;
  color: var(--paper-3);
  margin-bottom: 16px;
}

.case-year {
  display: block;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: 3rem;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--signal);
  padding-bottom: 16px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.case-file h2 {
  font-size: 1.3rem;
  margin-bottom: 8px;
}

.case-place {
  font-size: 0.9rem;
  color: var(--paper-2);
  margin-bottom: 12px;
}

.case-file p.case-desc {
  color: var(--paper-2);
  font-size: 0.95rem;
  margin-bottom: 20px;
}

/* ===== Sections ===== */
.section {
  padding: 72px 0;
}

.section + .section {
  border-top: 1px solid var(--line);
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 32px;
}

.section-head h2 {
  font-size: clamp(1.45rem, 2.6vw, 1.85rem);
}

.section-head p {
  color: var(--paper-2);
  margin-top: 6px;
}

/* ===== Page header (inner pages) ===== */
.page-header {
  padding: 56px 0 40px;
}

.page-header h1 {
  font-size: clamp(1.9rem, 4vw, 2.7rem);
  letter-spacing: -0.03em;
  margin-bottom: 12px;
}

.page-header p {
  color: var(--paper-2);
  font-size: 1.05rem;
  max-width: 62ch;
}

.page-body {
  padding-bottom: 80px;
}

/* ===== Entries (article listings) ===== */
.entry {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.entry-thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: var(--ink-1);
}

.entry-meta {
  font-size: 0.84rem;
  color: var(--paper-3);
}

.entry-cat {
  color: var(--signal);
  font-weight: 600;
}

.entry-title {
  font-size: 1.12rem;
  line-height: 1.35;
}

.entry-link::after {
  content: '';
  position: absolute;
  inset: 0;
}

.entry:hover .entry-title {
  text-decoration: underline;
  text-decoration-color: var(--signal);
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
}

.entry-excerpt {
  color: var(--paper-2);
  font-size: 0.95rem;
}

/* Home: one lead story, the rest as a compact column. */
.news-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 48px;
  align-items: start;
}

.entry--lead .entry-title {
  font-size: clamp(1.45rem, 2.6vw, 1.95rem);
  line-height: 1.25;
}

.entry--lead .entry-excerpt {
  font-size: 1.02rem;
}

.news-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.news-list .entry-title {
  font-size: 1rem;
}

/* Articles page grid */
.entry-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}

/* Each article is a card: the whole card is one link (see .entry-link::after). */
.entry-grid .entry,
.news-layout .entry {
  padding: 20px;
  background: var(--ink-1);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition), box-shadow var(--dur) var(--ease-out);
}

.entry-grid .entry:hover,
.news-layout .entry:hover {
  border-color: var(--line-strong);
  background: var(--ink-2);
}

.entry-grid .entry:focus-within,
.news-layout .entry:focus-within {
  outline: 2px solid var(--signal);
  outline-offset: 2px;
}

.entry-grid .entry-link:focus-visible,
.news-layout .entry-link:focus-visible {
  outline: none;
}

/* Image runs edge to edge across the top of the card. */
.entry-grid .entry-thumb,
.news-layout .entry-thumb {
  width: calc(100% + 40px);
  max-width: none;
  margin: -20px -20px 6px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
}

.entry-grid .entry-excerpt {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Home: lead card gets more room; the short list uses tighter cards. */
.entry--lead {
  padding: 28px;
}

.entry--lead .entry-thumb {
  width: calc(100% + 56px);
  margin: -28px -28px 8px;
}

.news-list .entry {
  padding: 16px 20px;
}

/* ===== Filters & search ===== */
.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 24px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field--grow {
  flex: 1 1 280px;
}

.field-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--paper-2);
}

.search-row {
  display: flex;
  gap: 8px;
}

.input,
.select {
  width: 100%;
  min-height: 44px;
  padding: 0 14px;
  background: var(--ink-1);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  color: var(--paper);
  font-size: 0.95rem;
}

.input::placeholder {
  color: var(--paper-3);
}

.input:hover,
.select:hover {
  border-color: var(--paper-3);
}

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

.select {
  appearance: none;
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23bdb9af' stroke-width='1.6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}

.select option {
  background: var(--ink-1);
}

.filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
  margin-bottom: 40px;
  border-bottom: 1px solid var(--line);
}

.filter-tab {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  color: var(--paper-2);
  font-size: 0.92rem;
  font-weight: 500;
}

.filter-tab:hover {
  color: var(--paper);
}

.filter-tab[aria-current="true"],
.filter-tab[aria-pressed="true"] {
  color: var(--paper);
  border-bottom-color: var(--signal);
}

.result-status {
  font-size: 0.88rem;
  color: var(--paper-3);
  margin-bottom: 20px;
  min-height: 1.4em;
}

.result-status:empty {
  min-height: 0;
  margin: 0;
}

/* Loading state for AJAX regions */
#articles-content-area,
#timeline-events-container {
  transition: opacity var(--dur) ease;
}

[aria-busy="true"] {
  opacity: 0.4;
  pointer-events: none;
}

.empty-state {
  padding: 48px 0;
  color: var(--paper-2);
}

.empty-state h2,
.empty-state h3 {
  font-size: 1.3rem;
  margin-bottom: 8px;
}

/* ===== Pagination ===== */
.pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-size: 0.92rem;
  color: var(--paper-3);
}

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

/* ===== Timeline ===== */
.chrono {
  list-style: none;
  border-top: 1px solid var(--line);
}

.chrono-item {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 32px;
  padding: 32px 0;
  border-bottom: 1px solid var(--line);
  scroll-margin-top: calc(var(--nav-height) + 24px);
}

.chrono-item:target {
  background: var(--signal-soft);
  box-shadow: -24px 0 0 var(--signal-soft), 24px 0 0 var(--signal-soft);
}

.chrono-year {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: 2.1rem;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--signal);
}

.chrono-date {
  display: block;
  font-family: var(--font-body);
  font-style: normal;
  font-weight: 400;
  letter-spacing: 0;
  font-size: 0.82rem;
  color: var(--paper-3);
  margin-top: 8px;
}

.chrono-body h2,
.chrono-body h3 {
  font-size: 1.2rem;
  margin-bottom: 6px;
}

.chrono-body a:hover {
  text-decoration: underline;
  text-decoration-color: var(--signal);
  text-underline-offset: 4px;
}

.chrono-place {
  font-size: 0.9rem;
  color: var(--paper-2);
  margin-bottom: 12px;
}

.chrono-body p.chrono-desc {
  color: var(--paper-2);
  max-width: 70ch;
}

.chrono-notes {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 6px 16px;
  margin-top: 16px;
  font-size: 0.88rem;
  max-width: 70ch;
}

.chrono-notes dt {
  color: var(--paper-3);
  font-weight: 600;
}

.chrono-notes dd {
  color: var(--paper-2);
}

/* Compact chronology on the home page */
.chrono--compact .chrono-item {
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 24px;
  padding: 20px 0;
}

.chrono--compact .chrono-item {
  position: relative;
}

/* The whole row is the tap target. */
.chrono--compact .chrono-body a::after {
  content: '';
  position: absolute;
  inset: 0;
}

.chrono--compact .chrono-year {
  font-size: 1.6rem;
}

.chrono--compact h3 {
  font-size: 1.02rem;
  margin-bottom: 2px;
}

.chrono--compact .chrono-place {
  margin-bottom: 0;
}

/* ===== Category index (home) ===== */
.cat-index {
  list-style: none;
  columns: 3 220px;
  column-gap: 48px;
}

.cat-index li {
  break-inside: avoid;
  border-bottom: 1px solid var(--line);
}

.cat-index a {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  min-height: 48px;
  padding: 12px 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
}

.cat-index a:hover {
  color: var(--signal);
}

.cat-index span {
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--paper-3);
}

/* ===== Database table ===== */
.table-wrapper {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.data-table th {
  text-align: left;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--paper-3);
  padding: 14px 16px;
  border-bottom: 1px solid var(--line-strong);
  background: var(--ink-1);
  white-space: nowrap;
}

.data-table td {
  padding: 16px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  color: var(--paper-2);
}

.data-table tbody tr:last-child td {
  border-bottom: 0;
}

.data-table tbody tr:hover td {
  background: var(--ink-1);
}

.data-table .case-name {
  color: var(--paper);
  font-weight: 600;
  min-width: 200px;
}

/* Padding grows the tap area to 44px without making rows taller. */
.data-table .case-name a {
  display: inline-block;
  padding: 13px 0;
  margin: -13px 0;
}

.data-table .case-name a:hover {
  text-decoration: underline;
  text-decoration-color: var(--signal);
  text-underline-offset: 3px;
}

.data-table .case-year {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: 1.05rem;
  color: var(--signal);
  white-space: nowrap;
}

.data-table .case-note {
  max-width: 360px;
}

.muted {
  color: var(--paper-3);
}

/* ===== Docs list ===== */
.doc-list {
  list-style: none;
  border-top: 1px solid var(--line);
}

.doc-item {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 32px;
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
}

.doc-kind {
  font-size: 0.85rem;
  color: var(--paper-3);
}

.doc-kind strong {
  display: block;
  color: var(--paper);
  font-weight: 600;
  margin-bottom: 2px;
}

.doc-item h2 {
  font-size: 1.15rem;
  margin-bottom: 8px;
}

.doc-item p {
  color: var(--paper-2);
  max-width: 70ch;
}

.doc-item p + p {
  margin-top: 6px;
}

.doc-source {
  margin-top: 12px;
  font-size: 0.9rem;
}

.doc-source .muted {
  font-size: 0.88rem;
}

/* ===== Article page ===== */
.article-page {
  max-width: 760px;
  padding-top: 40px;
  padding-bottom: 80px;
}

.breadcrumb ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--paper-3);
  margin-bottom: 32px;
}

.breadcrumb li + li::before {
  content: '/';
  margin-right: 8px;
  color: var(--line-strong);
}

.breadcrumb a {
  color: var(--paper-2);
}

.breadcrumb a:hover {
  color: var(--paper);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.article-head {
  margin-bottom: 32px;
}

.article-head .entry-cat {
  display: inline-block;
  margin-bottom: 12px;
  font-size: 0.9rem;
}

.article-head h1 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  line-height: 1.18;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
}

.article-byline {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
  font-size: 0.9rem;
  color: var(--paper-3);
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}

.article-byline strong {
  color: var(--paper-2);
  font-weight: 600;
}

.article-figure {
  margin: 0 0 40px;
}

.article-figure img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
}

.prose {
  font-size: 1.02rem;
  line-height: 1.85;
  color: var(--paper);
  margin-bottom: 48px;
  overflow-wrap: break-word;
}

.prose > * + * {
  margin-top: 1.2em;
}

.prose h2 {
  font-size: 1.45rem;
  margin-top: 2em;
}

.prose h3 {
  font-size: 1.2rem;
  margin-top: 1.6em;
}

.prose a {
  text-decoration: underline;
  text-decoration-color: var(--signal);
  text-underline-offset: 3px;
}

.prose ul,
.prose ol {
  padding-left: 1.4em;
}

.prose blockquote {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: 1.12rem;
  color: var(--paper-2);
  padding-left: 1.2em;
  border-left: 1px solid var(--line-strong);
}

.prose img {
  border-radius: var(--radius-md);
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  display: block;
  overflow-x: auto;
}

.prose th,
.prose td {
  border: 1px solid var(--line);
  padding: 8px 12px;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 16px;
  list-style: none;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  margin-bottom: 40px;
  font-size: 0.9rem;
  color: var(--paper-2);
}

.tag-list li:first-child {
  color: var(--paper-3);
  font-weight: 600;
}

.related {
  border-top: 1px solid var(--line);
  padding-top: 40px;
  margin-top: 56px;
}

.related h2 {
  font-size: 1.3rem;
  margin-bottom: 24px;
}

.related .entry-grid {
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 24px;
}

.related .entry-title {
  font-size: 0.98rem;
}

/* ===== Footer ===== */
.footer {
  border-top: 1px solid var(--line);
  padding: 48px 0 32px;
  background: var(--ink-1);
}

.footer-top {
  display: flex;
  justify-content: space-between;
  gap: 48px;
  flex-wrap: wrap;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--line);
}

.footer-logo-img {
  height: 28px;
  width: auto;
  margin-bottom: 14px;
}

.footer-desc {
  color: var(--paper-2);
  font-size: 0.92rem;
  max-width: 44ch;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 24px;
  align-content: flex-start;
}

.footer-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--paper-2);
  font-size: 0.92rem;
}

.footer-nav a:hover {
  color: var(--paper);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.footer-bottom {
  padding-top: 24px;
  font-size: 0.85rem;
  color: var(--paper-3);
}

/* ===== Shared bits still used by the admin panel ===== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--paper-2);
  white-space: nowrap;
}

.badge-konfirmasi {
  color: var(--signal);
  border-color: rgba(86, 212, 160, 0.45);
}

.badge-diselidiki,
.badge-terklasifikasi,
.badge-rahasia,
.badge-ditutup {
  color: var(--paper-2);
}

[class*="cat-tag-"] {
  color: var(--paper-2);
}

.neon-cyan {
  color: var(--signal);
}

.grid-overlay {
  display: none;
}

.form-group {
  margin-bottom: 20px;
  text-align: left;
}

.form-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--paper-2);
  margin-bottom: 8px;
}

.form-label .ti {
  color: var(--paper-3);
  font-size: 1rem;
}

.form-control {
  width: 100%;
  display: block;
  min-height: 44px;
  padding: 10px 14px;
  font-size: 0.95rem;
  color: var(--paper);
  background: var(--ink-0);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.form-control::placeholder {
  color: var(--paper-3);
}

.form-control:hover {
  border-color: var(--paper-3);
}

.form-control:focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: 1px;
  border-color: var(--signal);
}

select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23bdb9af' stroke-width='1.6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
}

select.form-control option {
  background: var(--ink-1);
}

textarea.form-control {
  resize: vertical;
  min-height: 100px;
  line-height: 1.6;
}

.alert {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid;
}

.alert-success {
  background: var(--signal-soft);
  border-color: rgba(86, 212, 160, 0.45);
  color: var(--signal);
}

.alert-danger {
  background: rgba(240, 138, 126, 0.1);
  border-color: rgba(240, 138, 126, 0.45);
  color: var(--danger);
}

.admin-wrapper {
  display: flex;
  min-height: 100vh;
}

.admin-sidebar {
  width: 260px;
  background: var(--ink-1);
  border-right: 1px solid var(--line);
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 100;
}

.admin-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px 24px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 20px;
}

.admin-menu {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex-grow: 1;
}

.admin-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 0 14px;
  border-radius: var(--radius-sm);
  color: var(--paper-2);
  font-size: 0.9rem;
  font-weight: 600;
}

.admin-nav-item:hover {
  color: var(--paper);
  background: var(--ink-2);
}

.admin-nav-item.active {
  color: var(--paper);
  background: var(--ink-2);
  box-shadow: inset 3px 0 0 var(--signal);
}

.admin-main {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.admin-topbar {
  height: 64px;
  background: var(--ink-0);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
}

.admin-content {
  padding: 32px;
  flex-grow: 1;
}

/* ===== Responsive ===== */
@media (max-width: 960px) {
  .hero-grid,
  .news-layout {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .hero {
    padding: 48px 0;
  }
}

@media (max-width: 860px) {
  .nav-links,
  .nav-login {
    display: none;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .mobile-nav {
    display: grid;
  }
}

@media (max-width: 720px) {
  .container {
    padding: 0 16px;
  }

  .section {
    padding: 56px 0;
  }

  .section-head {
    flex-direction: column;
    gap: 8px;
  }

  .chrono-item,
  .doc-item {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .chrono--compact .chrono-item {
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 16px;
  }

  .chrono-year {
    font-size: 1.8rem;
  }

  .chrono-item:target {
    box-shadow: -16px 0 0 var(--signal-soft), 16px 0 0 var(--signal-soft);
  }

  .entry-grid {
    grid-template-columns: 1fr;
  }

  .case-file {
    padding: 20px;
  }

  .case-year {
    font-size: 2.5rem;
  }

  /* Table becomes stacked records on phones, no sideways scroll. */
  .table-wrapper {
    border: 0;
    overflow: visible;
  }

  .data-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
  }

  .data-table,
  .data-table tbody,
  .data-table tr,
  .data-table td {
    display: block;
    width: 100%;
  }

  .data-table tr {
    border-top: 1px solid var(--line);
    padding: 16px 0;
  }

  .data-table td {
    border: 0;
    padding: 4px 0;
    max-width: none;
  }

  .data-table td[data-label]::before {
    content: attr(data-label);
    display: block;
    font-family: var(--font-body);
    font-style: normal;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--paper-3);
  }

  .data-table tbody tr:hover td {
    background: none;
  }

  .data-table .case-name {
    min-width: 0;
  }

  .admin-wrapper {
    flex-direction: column;
  }

  .admin-sidebar {
    width: 100%;
    height: auto;
    position: static;
  }

  .admin-topbar,
  .admin-content {
    padding: 16px;
  }
}

/* ===== Timeline (news + cases) ===== */
.tl-filters {
  margin-bottom: 20px;
}

.tl-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.tl-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 14px;
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  color: var(--paper-2);
  font-size: 0.88rem;
  font-weight: 500;
  transition: var(--transition);
}

.tl-chip-count {
  font-size: 0.78rem;
  color: var(--paper-3);
}

.tl-chip:hover:not(:disabled) {
  color: var(--paper);
  border-color: var(--paper-3);
}

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

.tl-chip[aria-pressed="true"] .tl-chip-count {
  color: var(--signal);
}

.tl-chip:disabled {
  opacity: 0.4;
}

.tl-filter-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 16px 24px;
  margin-top: 20px;
}

.tl-segment {
  display: inline-flex;
  margin-top: 8px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.tl-segment button {
  min-height: 44px;
  padding: 0 18px;
  background: none;
  border: 0;
  color: var(--paper-2);
  font-size: 0.9rem;
  font-weight: 500;
  transition: var(--transition);
}

.tl-segment button + button {
  border-left: 1px solid var(--line-strong);
}

.tl-segment button:hover {
  color: var(--paper);
  background: var(--ink-2);
}

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

.tl-viewer {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--ink-1);
  margin-bottom: 64px;
  overflow: hidden;
  scroll-margin-top: calc(var(--nav-height) + 16px);
}

.tl-stage {
  padding: 32px;
}

.tl-detail {
  min-height: 240px;
  max-width: 780px;
}

.tl-detail:focus {
  outline: none;
}

.tl-detail .tl-card-img {
  width: 100%;
  max-height: 340px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  margin-bottom: 20px;
}

.tl-detail .tl-title {
  font-size: clamp(1.35rem, 2.6vw, 1.75rem);
  margin: 8px 0 6px;
}

.tl-detail .tl-summary {
  color: var(--paper);
  font-size: 1rem;
  max-width: 68ch;
}

.tl-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.tl-counter {
  white-space: nowrap;
  font-size: 0.88rem;
  color: var(--paper-3);
}

/* Navigator: horizontal axis. The line is the scroll container's own background
   (attachment: local) so it runs the full scroll width. */
.tl-nav {
  display: flex;
  overflow-x: auto;
  padding: 20px 32px 8px;
  border-top: 1px solid var(--line);
  background: linear-gradient(var(--line-strong), var(--line-strong)) 0 66px / 100% 1px no-repeat local, var(--ink-0);
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
  overscroll-behavior-x: contain;
}

.tl-nav-year {
  flex: none;
  padding-right: 24px;
}

.tl-nav-label {
  display: block;
  height: 28px;
  line-height: 28px;
  margin-bottom: 9px;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: 1.15rem;
  letter-spacing: -0.03em;
  color: var(--signal);
}

.tl-nav-marks {
  display: flex;
  gap: 12px;
}

.tl-mark {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  width: 168px;
  min-height: 44px;
  padding: 0 0 12px;
  background: none;
  border: 0;
  text-align: left;
  color: var(--paper-3);
  transition: var(--transition);
}

.tl-mark-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--signal);
  background: var(--ink-0);
  transition: transform var(--dur-fast) var(--ease-out), box-shadow var(--dur) var(--ease-out);
}

.tl-mark--kasus .tl-mark-dot {
  background: var(--signal);
}

.tl-mark-text {
  font-size: 0.82rem;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tl-mark:hover {
  color: var(--paper);
}

.tl-mark:hover .tl-mark-dot {
  transform: scale(1.15);
}

/* Selected marker: a halo marks the current position, the text goes full strength. */
.tl-mark[aria-current="true"] {
  color: var(--paper);
}

.tl-mark[aria-current="true"] .tl-mark-text {
  font-weight: 600;
}

.tl-mark[aria-current="true"] .tl-mark-dot {
  transform: scale(1.2);
  box-shadow: 0 0 0 5px var(--signal-soft);
}

.tl-hint {
  padding: 4px 32px 16px;
  font-size: 0.8rem;
  color: var(--paper-3);
  background: var(--ink-0);
}

.tl-list-title {
  font-size: 1.3rem;
  margin-bottom: 8px;
}

.tl-year {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 32px;
  padding: 28px 0;
  border-top: 1px solid var(--line);
}

.tl-year-label {
  position: sticky;
  top: calc(var(--nav-height) + 16px);
  align-self: start;
  font-style: italic;
  font-weight: 500;
  font-size: 2rem;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--signal);
}

.tl-entries {
  list-style: none;
}

.tl-entry + .tl-entry {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.tl-entry {
  scroll-margin-top: calc(var(--nav-height) + 24px);
}

.tl-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  font-size: 0.84rem;
  color: var(--paper-3);
}

.tl-type {
  font-weight: 600;
  color: var(--paper);
}

.tl-type--kasus {
  color: var(--signal);
}

.tl-type::after {
  content: '\00b7';
  margin-left: 8px;
  color: var(--paper-3);
  font-weight: 400;
}

.tl-title {
  font-size: 1.08rem;
  margin: 4px 0;
}

.tl-select {
  display: inline-block;
  padding: 12px 0;
  margin: -12px 0;
}

.tl-select:hover {
  text-decoration: underline;
  text-decoration-color: var(--signal);
  text-underline-offset: 4px;
}

.tl-entry.is-selected .tl-select {
  color: var(--signal);
}

.tl-place {
  font-size: 0.9rem;
  color: var(--paper-2);
}

.tl-summary {
  color: var(--paper-2);
  max-width: 70ch;
  margin-top: 6px;
}

.tl-link {
  margin-top: 4px;
}

/* With JS the viewer shows the full record, so the list stays compact. */
.js .tl-list .tl-summary {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.js .tl-list .tl-card-img,
.js .tl-list .chrono-notes {
  display: none;
}

.tl-reset {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
}

@media (max-width: 720px) {
  .tl-stage {
    padding: 20px;
  }

  .tl-nav {
    padding: 20px 20px 8px;
  }

  .tl-hint {
    padding: 4px 20px 16px;
  }

  .tl-mark {
    width: 136px;
  }

  .tl-year {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .tl-year-label {
    position: static;
    font-size: 1.7rem;
  }

  .tl-controls .btn-secondary {
    padding: 0 14px;
  }
}

/* ===== Motion =====
   Every animation here has one job:
   - page transition: keeps the reader oriented when moving between pages
   - hero entrance: sets reading order (headline, lead, actions, case file)
   - reveal: brings each entry in once as it is scrolled to, never again
   - filter swap: shows that the list changed, instead of a hard jump */

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }

  /* Cross-document page transitions (Chromium 126+). Other browsers navigate normally. */
  @view-transition {
    navigation: auto;
  }

  .site-header {
    view-transition-name: site-header;
  }

  ::view-transition-old(root) {
    animation: vt-out 0.2s ease both;
  }

  ::view-transition-new(root) {
    animation: vt-in var(--dur) var(--ease-out) both;
  }

  /* Timeline detail panel: content slides in when another entry is picked. */
  ::view-transition-old(tl-detail) {
    animation: vt-out 0.16s ease both;
  }

  ::view-transition-new(tl-detail) {
    animation: vt-in var(--dur) var(--ease-out) both;
  }

  @keyframes vt-out {
    to { opacity: 0; transform: translateY(-6px); }
  }

  @keyframes vt-in {
    from { opacity: 0; transform: translateY(10px); }
  }

  /* Hero: one staggered entrance on load. */
  .hero-grid > div > *,
  .hero-grid > .case-file,
  .page-header .container > * {
    animation: rise var(--dur-slow) var(--ease-out) both;
  }

  .hero-grid > div > :nth-child(2),
  .page-header .container > :nth-child(2) { animation-delay: 0.08s; }
  .hero-grid > div > :nth-child(3) { animation-delay: 0.16s; }
  .hero-grid > div > :nth-child(4) { animation-delay: 0.24s; }
  .hero-grid > .case-file { animation-delay: 0.3s; }

  .case-file .case-year {
    animation: rise var(--dur-slow) var(--ease-out) 0.45s both;
  }

  @keyframes rise {
    from { opacity: 0; transform: translateY(14px); }
  }

  /* Scroll reveal. Hidden only once JS has marked the element, so no-JS readers see everything. */
  .js .reveal {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity var(--dur-slow) var(--ease-out), transform var(--dur-slow) var(--ease-out);
    transition-delay: var(--reveal-delay, 0s);
  }

  .js .reveal.is-visible {
    opacity: 1;
    transform: none;
  }

  /* Timeline anchor target: highlight fades out after arrival. */
  .chrono-item:target {
    animation: target-fade 2.4s ease 0.3s both;
  }

  @keyframes target-fade {
    from { background: var(--signal-soft); }
    to { background: transparent; box-shadow: none; }
  }

  .entry-thumb {
    transition: transform var(--dur-slow) var(--ease-out), border-color var(--dur) ease;
  }

  .entry:hover .entry-thumb {
    transform: scale(1.015);
    border-color: var(--line-strong);
  }

  .entry-grid .entry:hover,
  .news-layout .entry:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
  }

  .entry-grid .entry:hover .entry-thumb,
  .news-layout .entry:hover .entry-thumb {
    transform: none;
  }
}

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

/* ===== Admin panel (native PHP version) =====
   Replaces the old inline styles: plain panels and lines, same tokens as the public site. */
.admin-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 28px;
}

.admin-head h1 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--paper);
}

.admin-head p {
  font-size: 0.9rem;
  color: var(--paper-2);
  margin-top: 4px;
  max-width: 64ch;
}

.admin-panel {
  background: var(--ink-1);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 28px;
  max-width: 900px;
}

.admin-panel--table {
  padding: 0;
  max-width: none;
  overflow-x: auto;
}

.admin-panel--table .data-table th:first-child,
.admin-panel--table .data-table td:first-child {
  padding-left: 20px;
}

.admin-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-bottom: 20px;
}

.admin-filters .form-control {
  width: auto;
  flex: 1 1 220px;
}

.admin-filters select.form-control {
  flex: 0 1 200px;
}

.admin-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  margin-bottom: 36px;
}

.admin-stat {
  padding: 20px 24px;
  border-right: 1px solid var(--line);
}

.admin-stat:last-child {
  border-right: 0;
}

.admin-stat dt {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--paper-2);
}

.admin-stat dd {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--paper);
  margin-top: 4px;
}

.admin-section-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--paper);
  margin-bottom: 12px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.form-help {
  font-size: 0.82rem;
  color: var(--paper-3);
  margin-top: 6px;
}

.form-error {
  font-size: 0.85rem;
  color: var(--danger);
  margin-top: 6px;
}

.form-control[aria-invalid="true"] {
  border-color: var(--danger);
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.req {
  color: var(--danger);
}

.row-actions {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.row-actions form {
  display: inline;
}

.admin-content .pager {
  margin-top: 20px;
}

.admin-user {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.88rem;
  color: var(--paper-2);
}

.admin-user strong {
  color: var(--paper);
}

.admin-logout {
  width: 100%;
  border: 0;
  background: transparent;
  cursor: pointer;
  color: var(--danger);
  font: inherit;
}

.admin-sep {
  height: 1px;
  background: var(--line);
  margin: 12px 0;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px 16px;
}

.login-card {
  width: 100%;
  max-width: 420px;
  background: var(--ink-1);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 36px 28px;
}

.login-card h1 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--paper);
  margin: 16px 0 4px;
}

.login-card .btn-primary {
  width: 100%;
  justify-content: center;
}

@media (max-width: 720px) {
  .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .admin-panel {
    padding: 20px 16px;
  }

  .admin-stat {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .row-actions {
    justify-content: flex-start;
    margin-top: 8px;
  }
}

/* ===== Compact category filters =====
   Articles tabs and timeline chips sit on one row that scrolls sideways instead of
   wrapping onto three lines. Each button is a real 44px tap target; the 36px pill
   people see is drawn by ::before inside it. */
.filter-tabs,
.tl-chips {
  position: relative;
  flex-wrap: nowrap;
  gap: 6px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
  padding-bottom: 8px;
  -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 32px), transparent);
  mask-image: linear-gradient(to right, #000 calc(100% - 32px), transparent);
}

.filter-tabs {
  border-bottom: 0;
  margin-bottom: 24px;
}

.filter-tab,
.tl-chip {
  position: relative;
  z-index: 0;
  flex: 0 0 auto;
  min-height: 44px;
  padding: 0 14px;
  margin-bottom: 0;
  background: none;
  border: 0;
  border-radius: 0;
  font-size: 0.86rem;
  white-space: nowrap;
  scroll-snap-align: start;
  transition: var(--transition);
}

.filter-tab::before,
.tl-chip::before {
  content: "";
  position: absolute;
  inset: 4px 0;
  z-index: -1;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  transition: var(--transition);
}

.filter-tab:hover,
.tl-chip:hover:not(:disabled) {
  color: var(--paper);
  background: none;
  border-color: transparent;
}

.filter-tab:hover::before,
.tl-chip:hover:not(:disabled)::before {
  border-color: var(--paper-3);
}

.filter-tab[aria-current="true"],
.filter-tab[aria-pressed="true"],
.tl-chip[aria-pressed="true"] {
  color: var(--signal-ink);
  background: none;
  border-color: transparent;
}

.filter-tab[aria-current="true"]::before,
.filter-tab[aria-pressed="true"]::before,
.tl-chip[aria-pressed="true"]::before {
  background: var(--signal);
  border-color: var(--signal);
}

/* Focus ring follows the pill, not the taller tap box. */
.filter-tab:focus-visible,
.tl-chip:focus-visible {
  outline: none;
}

.filter-tab:focus-visible::before,
.tl-chip:focus-visible::before {
  outline: 2px solid var(--signal);
  outline-offset: 2px;
}

.tl-chip[aria-pressed="true"] .tl-chip-count {
  color: var(--signal-ink);
}

.tl-chip-count {
  font-size: 0.75rem;
}

/* A category with nothing in it is left out rather than shown greyed. */
.tl-chip:disabled {
  display: none;
}

.filter-tabs.at-end,
.tl-chips.at-end {
  -webkit-mask-image: none;
  mask-image: none;
}

/* Home cards stacked on narrow screens: same spacing as between the list cards. */
@media (max-width: 960px) {
  .news-layout {
    gap: 12px;
  }
}

/* Touch screens swipe the filter row, so its scrollbar only takes space. */
@media@media (pointer: coarse) {
  .filter-tabs,
  .tl-chips {
    scrollbar-width: none;
    padding-bottom: 0;
  }

  .filter-tabs::-webkit-scrollbar,
  .tl-chips::-webkit-scrollbar {
    display: none;
  }
}
