:root {
  --coal: #12100e;
  --panel: #1c1814;
  --panel-2: #26211c;
  --ink: #f6f1e8;
  --muted: #c9bba8;
  --line: #3c342c;
  --amber: #f0c14b;
  --amber-deep: #c9962a;
  --focus: #ffe7a3;
  --sidebar: 17rem;
  --topbar: 3.5rem;
  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(1200px 500px at 80% -10%, rgba(201, 150, 42, 0.08), transparent 55%),
    var(--coal);
  color: var(--ink);
  font-family: "Segoe UI", Candara, "Trebuchet MS", sans-serif;
  font-size: 1.05rem;
  line-height: 1.65;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--amber);
}

a:hover {
  color: var(--focus);
}

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: 0.75rem;
  top: 0.75rem;
  z-index: 40;
  padding: 0.5rem 0.8rem;
  background: var(--amber);
  color: #1a1408;
  text-decoration: none;
  transform: translateY(-150%);
}

.skip:focus {
  transform: none;
}

.topbar {
  display: none;
}

.sidebar {
  background: var(--panel);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 1.1rem 1.15rem 0.9rem;
  color: inherit;
  text-decoration: none;
}

.brand img {
  width: 4.6rem;
  height: auto;
  border-radius: 2px;
  flex: none;
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

.brand-text strong {
  font-family: Palatino, "Palatino Linotype", Georgia, serif;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.brand-text span {
  color: var(--muted);
  font-size: 0.82rem;
}

.nav-list {
  list-style: none;
  margin: 0;
  padding: 0.35rem 0 0.8rem;
}

.nav-list a {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.62rem 1.2rem;
  color: var(--ink);
  text-decoration: none;
  border-left: 3px solid transparent;
}

.nav-list a:hover,
.nav-list a:focus-visible {
  background: var(--panel-2);
  border-left-color: var(--amber);
}

.nav-list a[aria-current="page"] {
  background: var(--panel-2);
  border-left-color: var(--amber);
  color: var(--amber);
}

.ext {
  color: var(--muted);
  font-size: 0.75rem;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.side-meta {
  margin: 0;
  padding: 0.9rem 1.2rem 1.2rem;
  color: var(--muted);
  font-size: 0.82rem;
}

.side-meta a {
  color: inherit;
}

.backdrop {
  display: none;
}

.layout {
  min-height: 100vh;
}

.article {
  max-width: 40rem;
  margin: 0 auto;
  padding: 2.2rem 1.25rem 2.5rem;
}

.kicker {
  margin: 0 0 0.45rem;
  color: var(--amber-deep);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1 {
  margin: 0 0 1.4rem;
  font-family: Palatino, "Palatino Linotype", "Book Antiqua", Georgia, serif;
  font-size: clamp(1.75rem, 4vw, 2.45rem);
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -0.015em;
}

.lead-figure {
  margin: 0 0 1.5rem;
}

.lead-figure img {
  display: block;
  width: min(100%, 30rem);
  border-radius: 2px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
}

.lead-figure figcaption {
  max-width: 30rem;
  margin-top: 0.8rem;
  color: var(--muted);
  font-size: 0.98rem;
}

.lead-figure strong {
  display: block;
  margin-bottom: 0.2rem;
  color: var(--ink);
  font-weight: 650;
}

.article p {
  margin: 0 0 1rem;
}

.membership {
  margin-top: 1.6rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.95rem;
}

.site-footer {
  max-width: 40rem;
  margin: 0 auto;
  padding: 0 1.25rem 2.2rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.site-footer p {
  margin: 0.2rem 0;
}

.nav-toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: transparent;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 1.15rem;
  height: 2px;
  margin-inline: auto;
  background: var(--ink);
}

.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;
}

.js .topbar {
  display: none;
}

@media (max-width: 899px) {
  .js .topbar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    position: sticky;
    top: 0;
    z-index: 30;
    height: var(--topbar);
    padding: 0 0.85rem;
    background: rgba(18, 16, 14, 0.94);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(8px);
  }

  .topbar-title {
    font-family: Palatino, "Palatino Linotype", Georgia, serif;
    font-weight: 700;
    color: inherit;
    text-decoration: none;
  }

  .js .sidebar {
    position: fixed;
    z-index: 25;
    top: 0;
    bottom: 0;
    left: 0;
    width: min(var(--sidebar), 86vw);
    border-bottom: 0;
    border-right: 1px solid var(--line);
    overflow: auto;
    transform: translateX(-105%);
    transition: transform 0.2s ease;
  }

  .js .sidebar.is-open {
    transform: none;
  }

  .js .backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 24;
    background: rgba(0, 0, 0, 0.55);
  }

  .js .backdrop[hidden] {
    display: none;
  }

  body.nav-open {
    overflow: hidden;
  }
}

@media (min-width: 900px) {
  .js .sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    width: var(--sidebar);
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--line);
    border-bottom: 0;
    overflow: auto;
  }

  .js .nav-list {
    flex: 1;
  }

  .js .side-meta {
    margin-top: auto;
  }

  .js .layout {
    margin-left: var(--sidebar);
  }

  .article {
    padding-top: 3.2rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .js .sidebar {
    transition: none;
  }
}
