:root {
  --bg: #f7f4ee;
  --paper: #fffdf8;
  --text: #111827;
  --muted: #556070;
  --line: #ded7cc;
  --accent: #b7791f;
  --accent-dark: #7c4f14;
  --dark: #070b16;
  --max: 960px;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(183, 121, 31, 0.10), transparent 34rem),
    linear-gradient(180deg, #faf8f4 0%, var(--bg) 100%);
  color: var(--text);
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a {
  color: var(--accent-dark);
  text-underline-offset: .2em;
  overflow-wrap: anywhere;
}

a:hover {
  text-decoration-thickness: 2px;
}

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

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 14px clamp(18px, 4vw, 48px);
  background: rgba(7, 11, 22, .94);
  color: #fff;
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, .12);
}

.site-name {
  font-family: var(--sans);
  font-weight: 800;
  font-size: clamp(.92rem, 2vw, 1rem);
  letter-spacing: -.02em;
}

.skip-link {
  flex-shrink: 0;
  font-family: var(--sans);
  font-weight: 700;
  font-size: .88rem;
  color: #f3d6a1;
  text-decoration: none;
  padding: 9px 0;
}

.article-shell {
  width: min(100% - 36px, var(--max));
  margin: 0 auto;
}

.article {
  padding: clamp(22px, 4vw, 46px) 0 54px;
}

figure {
  margin: 34px 0;
}

.hero-figure {
  margin-top: 12px;
}

figure img {
  width: 100%;
  border-radius: 22px;
  border: 1px solid rgba(17, 24, 39, .12);
  box-shadow: 0 24px 70px rgba(17, 24, 39, .14);
}

h1,
h2,
h3 {
  font-family: var(--sans);
  line-height: 1.2;
  letter-spacing: -.025em;
  color: var(--text);
  overflow-wrap: break-word;
  text-wrap: balance;
}

h1 {
  margin: 28px 0 22px;
  font-size: clamp(2rem, 5.5vw, 3.55rem);
  max-width: 25ch;
}

h2 {
  margin: 44px 0 15px;
  font-size: clamp(1.4rem, 3.6vw, 2rem);
}

h3 {
  margin: 28px 0 8px;
  font-size: clamp(1.08rem, 3vw, 1.24rem);
}

p {
  margin: 0 0 17px;
  font-size: clamp(1.02rem, 2vw, 1.12rem);
}

ul,
ol {
  margin: 0 0 20px 1.25rem;
  padding: 0;
}

li {
  margin: 0 0 7px;
  padding-left: .15rem;
  font-size: clamp(1.01rem, 2vw, 1.1rem);
}

li::marker {
  color: var(--accent-dark);
  font-weight: 700;
}

.editorial-note,
.source-note {
  font-family: var(--sans);
  color: var(--muted);
  font-size: .9rem;
  line-height: 1.6;
}

.editorial-note {
  padding-left: 16px;
  border-left: 3px solid var(--accent);
  margin: 22px 0;
}

.table-scroll {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  margin: 24px 0 28px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
  box-shadow: 0 14px 42px rgba(17, 24, 39, .07);
}

table {
  width: 100%;
  min-width: 580px;
  border-collapse: collapse;
}

.operator-table {
  min-width: 800px;
}

caption {
  padding: 12px 16px;
  text-align: left;
  color: var(--muted);
  font-family: var(--sans);
  font-size: .88rem;
}

th,
td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  font-size: .95rem;
  line-height: 1.55;
  overflow-wrap: break-word;
}

thead th {
  background: #111827;
  color: #fff;
  font-family: var(--sans);
  font-weight: 750;
}

tbody th {
  font-family: var(--sans);
  font-weight: 700;
}

tbody tr:nth-child(even) {
  background: rgba(183, 121, 31, .055);
}

tbody tr:last-child td,
tbody tr:last-child th {
  border-bottom: 0;
}

.sources li {
  font-size: .95rem;
}

.footer {
  padding: 28px 18px 42px;
  background: var(--dark);
  color: rgba(255, 255, 255, .78);
  text-align: center;
  font-family: var(--sans);
}

.footer p {
  margin: 0 0 8px;
  font-size: .92rem;
}

.footer a {
  color: #f3d6a1;
  display: inline-block;
  padding: 6px 2px;
}

@media (max-width: 720px) {
  .topbar {
    position: static;
    flex-wrap: wrap;
    gap: 4px 16px;
    padding: 12px 16px;
  }

  .site-name {
    flex: 1 1 230px;
  }

  .article-shell {
    width: min(100% - 32px, var(--max));
  }

  .article {
    padding-top: 14px;
  }

  h1 {
    max-width: none;
    margin-top: 20px;
  }

  figure {
    margin: 26px 0;
  }

  figure img {
    border-radius: 16px;
  }

  h2 {
    margin-top: 36px;
  }

  th,
  td {
    padding: 12px 13px;
  }
}

@media (max-width: 430px) {
  p,
  li {
    font-size: 1rem;
  }

  h1 {
    font-size: 2rem;
  }

  .site-name {
    font-size: .86rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
