:root {
  --ink: #1c1713;
  --muted: #5e554c;
  --paper: #f4efe4;
  --paper-2: #e9e0d0;
  --night: #101418;
  --night-2: #1b232b;
  --seal: #8e2c22;
  --seal-deep: #6f2018;
  --pine: #1e4d3c;
  --gold: #8a6a34;
  --line: rgba(28, 23, 19, 0.14);
  --max: 1120px;
  --top: 0px;
  color-scheme: light;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--night);
  color: var(--paper);
  font-family: "Outfit", "Segoe UI", sans-serif;
  font-size: 16.5px;
  line-height: 1.5;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body:before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 8% -8%, rgba(142, 44, 34, 0.38), transparent 36%),
    radial-gradient(circle at 100% 0%, rgba(30, 77, 60, 0.45), transparent 32%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 240px);
  z-index: -1;
}

img { max-width: 100%; height: auto; }

a { color: var(--pine); }

a:hover { color: var(--seal); }

:focus-visible {
  outline: 2px solid var(--seal);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: 12px;
  top: -40px;
  background: var(--paper);
  color: var(--ink);
  padding: 8px 12px;
  z-index: 80;
}

.skip:focus { top: 8px; }

.wrap {
  width: min(var(--max), calc(100% - 32px));
  margin-inline: auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(16, 20, 24, 0.94);
  border-bottom: 1px solid rgba(244, 239, 228, 0.08);
  backdrop-filter: blur(10px);
}

.topbar-in {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  min-height: 64px;
  padding: 8px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--paper);
  text-decoration: none;
  min-width: 0;
}

.brand img {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  display: block;
}

.brand strong {
  display: block;
  font-family: "Fraunces", Georgia, serif;
  font-weight: 560;
  font-size: 1.35rem;
  letter-spacing: -0.03em;
  line-height: 1;
}

.brand small {
  display: block;
  color: rgba(244, 239, 228, 0.72);
  font-size: 0.78rem;
  margin-top: 3px;
}

.langs {
  display: flex;
  gap: 4px;
  margin-left: auto;
}

.langs a {
  color: var(--paper);
  text-decoration: none;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  border: 1px solid rgba(244, 239, 228, 0.18);
  border-radius: 999px;
  min-width: 36px;
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
}

.langs a[aria-current="page"] {
  background: var(--paper);
  color: var(--ink);
  border-color: var(--paper);
}

.actions {
  display: flex;
  gap: 8px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 16px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  letter-spacing: 0.01em;
  border: 1.5px solid transparent;
  line-height: 1;
}

.btn-seal {
  background: var(--seal);
  color: #fffaf5;
  box-shadow: 0 8px 18px rgba(142, 44, 34, 0.28);
}

.btn-seal:hover { background: var(--seal-deep); color: #fffaf5; }

.btn-paper {
  background: var(--paper);
  color: var(--ink);
}

.btn-paper:hover { background: #fff; color: var(--ink); }

.btn-line {
  background: transparent;
  color: var(--ink);
  border-color: rgba(28, 23, 19, 0.25);
}

.tape {
  overflow: hidden;
  background: #efe4d2;
  color: var(--ink);
  border-bottom: 1px solid rgba(28, 23, 19, 0.08);
}

.tape-track {
  display: flex;
  width: max-content;
  animation: ticker 46s linear infinite;
}

.tape:hover .tape-track,
.tape:focus-within .tape-track { animation-play-state: paused; }

.tape-set {
  display: flex;
  align-items: center;
  gap: 0;
  margin: 0;
  padding: 0;
}

.tape-set span {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 8px;
  white-space: nowrap;
  font-size: 0.92rem;
}

.tape-set .mark {
  color: var(--seal);
  padding-inline: 4px;
}

@keyframes ticker {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.hero { padding: 28px 0 10px; }

.slip {
  display: grid;
  gap: 22px;
  background: var(--paper);
  color: var(--ink);
  border-radius: 26px;
  padding: 22px 18px 18px 28px;
  position: relative;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
}

.slip:before {
  content: "";
  position: absolute;
  inset: 16px auto 16px 0;
  width: 16px;
  background: radial-gradient(circle at 0 11px, var(--night) 6px, transparent 6.6px);
  background-size: 16px 24px;
}

.kicker {
  margin: 0 0 8px;
  color: var(--seal);
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 600;
}

h1, h2, h3 {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 560;
  letter-spacing: -0.03em;
  line-height: 1.08;
}

h1 {
  margin: 0;
  font-size: clamp(2rem, 7vw, 4.15rem);
  color: var(--ink);
}

.deck {
  font-family: "Newsreader", Georgia, serif;
  font-size: clamp(1.15rem, 2.4vw, 1.45rem);
  line-height: 1.45;
  margin: 14px 0 0;
  max-width: 40rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.hero-actions .btn { min-height: 52px; padding-inline: 20px; font-size: 1.02rem; }

.address {
  margin: 16px 0 0;
  background: #fffdf8;
  border: 1px dashed rgba(30, 77, 60, 0.45);
  border-radius: 14px;
  padding: 12px 14px;
}

.address span {
  display: block;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--pine);
  font-weight: 600;
}

.address a {
  display: inline-block;
  margin-top: 4px;
  word-break: break-word;
  font-family: "Newsreader", Georgia, serif;
  font-size: 1.15rem;
  color: var(--ink);
}

.cover {
  margin: 0;
}

.cover img {
  width: 100%;
  border-radius: 16px;
  display: block;
  background: var(--night-2);
}

.cover figcaption {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.92rem;
}

.reel-wrap { padding: 22px 0 8px; }

.reel-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 12px;
  margin-bottom: 12px;
}

.reel-head h2 {
  margin: 0;
  font-size: clamp(1.5rem, 3vw, 2rem);
  color: var(--paper);
}

.reel-nav { display: flex; gap: 8px; }

.reel-nav button {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(244, 239, 228, 0.25);
  background: transparent;
  color: var(--paper);
  font-size: 1.2rem;
  cursor: pointer;
}

.reel-nav button:hover { background: rgba(244, 239, 228, 0.08); }

.reel-track {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 8px;
  scrollbar-width: thin;
  scrollbar-color: rgba(244, 239, 228, 0.35) transparent;
}

.card {
  flex: 0 0 min(86%, 320px);
  scroll-snap-align: start;
  background: var(--night-2);
  color: var(--paper);
  border-radius: 18px;
  padding: 16px 16px 18px;
  border: 1px solid rgba(244, 239, 228, 0.08);
  min-height: 180px;
}

.card em {
  font-family: "Fraunces", Georgia, serif;
  font-style: italic;
  font-size: 1.8rem;
  color: #e7c27a;
  display: block;
  line-height: 1;
}

.card h3 {
  margin: 10px 0 6px;
  font-size: 1.25rem;
  color: var(--paper);
}

.card p { margin: 0; color: rgba(244, 239, 228, 0.82); }

.layout {
  width: min(var(--max), calc(100% - 32px));
  margin: 18px auto 40px;
  display: grid;
  gap: 22px;
  min-width: 0;
}

.toc {
  background: rgba(244, 239, 228, 0.04);
  border: 1px solid rgba(244, 239, 228, 0.08);
  border-radius: 18px;
  padding: 14px;
}

.toc p {
  margin: 0 0 8px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.75rem;
  color: rgba(244, 239, 228, 0.62);
}

.toc a {
  display: block;
  color: var(--paper);
  text-decoration: none;
  padding: 7px 0;
  border-top: 1px solid rgba(244, 239, 228, 0.08);
  font-size: 0.95rem;
}

.sheet {
  background: var(--paper);
  color: var(--ink);
  border-radius: 28px;
  padding: 8px 18px 28px;
  min-width: 0;
}

.crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  color: var(--muted);
  font-size: 0.92rem;
  padding-top: 16px;
}

.crumbs a { color: var(--pine); text-decoration: none; }

.byline {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.prose {
  font-family: "Newsreader", Georgia, serif;
  font-size: 1.2rem;
  line-height: 1.68;
}

.prose h2 {
  font-size: clamp(1.7rem, 4vw, 2.45rem);
  margin: 1.4em 0 0.35em;
  scroll-margin-top: 108px;
}

.prose h3 {
  font-size: 1.35rem;
  margin: 1.2em 0 0.3em;
}

.prose p { margin: 0.7em 0; }

.prose a { color: var(--pine); }

.lead {
  font-size: 1.28rem;
}

.note {
  border-left: 4px solid var(--seal);
  margin: 18px 0;
  padding: 4px 0 4px 14px;
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.35rem;
  line-height: 1.3;
}

.steps { margin: 12px 0 12px 1.1em; padding: 0; }
.steps li { margin: 0.45em 0; }

.table-wrap { overflow-x: auto; margin: 14px 0 18px; }

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 560px;
  font-family: "Outfit", "Segoe UI", sans-serif;
  font-size: 0.98rem;
  line-height: 1.45;
}

caption {
  text-align: left;
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.2rem;
  padding-bottom: 8px;
}

th, td {
  text-align: left;
  vertical-align: top;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}

th { background: rgba(30, 77, 60, 0.08); }

.scorebox {
  display: grid;
  gap: 16px;
  background: #fffdf8;
  border-radius: 18px;
  padding: 16px;
  border: 1px solid var(--line);
  margin: 12px 0 18px;
}

.score-num {
  font-family: "Fraunces", Georgia, serif;
  font-size: 4rem;
  line-height: 0.85;
  color: var(--seal);
}

.score-num small {
  font-size: 1.2rem;
  color: var(--muted);
}

.meter { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; align-items: center; font-family: "Outfit", sans-serif; font-size: 0.95rem; }

.bar {
  grid-column: 1 / -1;
  height: 7px;
  background: #e5dccb;
  border-radius: 99px;
  overflow: hidden;
}

.bar i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--pine), #2f6d54);
}

.cols { display: grid; gap: 12px; }

.col {
  background: rgba(30, 77, 60, 0.06);
  border-radius: 16px;
  padding: 12px 14px;
}

.col h3 { margin-top: 0; }

.event {
  background: var(--night);
  color: var(--paper);
  border-radius: 20px;
  padding: 16px;
  margin-top: 10px;
}

.event h3 { color: #f0d7a2; margin-top: 0; }

.event a { color: #f0d7a2; }

.ask details {
  border-top: 1px solid var(--line);
  padding: 4px 0 10px;
}

.ask details:last-child { border-bottom: 1px solid var(--line); }

.ask summary {
  cursor: pointer;
  list-style: none;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.ask summary::-webkit-details-marker { display: none; }

.ask summary h3 {
  margin: 0;
  font-size: 1.18rem;
}

.ask summary:after {
  content: "+";
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.5rem;
  color: var(--seal);
  line-height: 1;
}

.ask details[open] summary:after { content: "–"; }

.foot {
  border-top: 1px solid rgba(244, 239, 228, 0.08);
  padding: 28px 0 40px;
  color: rgba(244, 239, 228, 0.78);
}

.foot-in {
  display: grid;
  gap: 18px;
}

.foot a { color: var(--paper); }

.age {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 2px solid #e7c27a;
  border-radius: 50%;
  color: #e7c27a;
  font-weight: 600;
}

.fine { font-size: 0.92rem; max-width: 70ch; }

@media (max-width: 720px) {
  .actions {
    order: 5;
    width: 100%;
    margin: 0;
  }
  .actions .btn { flex: 1; }
  .langs { order: 2; }
  h1 { font-size: clamp(1.85rem, 9vw, 2.6rem); }
  .slip { padding: 18px 14px 16px 22px; }
  .prose { font-size: 1.12rem; }
  .sheet { padding-inline: 14px; border-radius: 22px; }
}

@media (min-width: 860px) {
  .slip {
    grid-template-columns: 1.25fr 0.85fr;
    align-items: center;
    padding: 34px 28px 28px 40px;
  }
  .card { flex-basis: calc(33.3% - 8px); }
  .layout { grid-template-columns: 230px minmax(0, 1fr); align-items: start; }
  .toc { position: sticky; top: 86px; }
  .scorebox { grid-template-columns: 160px 1fr; align-items: center; }
  .cols { grid-template-columns: 1fr 1fr; }
  .foot-in { grid-template-columns: 1.4fr 0.8fr; }
  .sheet { padding: 10px 36px 40px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .tape-track { animation: none; flex-wrap: wrap; width: auto; }
  .tape-set + .tape-set { display: none; }
}
