:root {
  --ink: #0b0a09;
  --panel: #151311;
  --line: #2a251f;
  --gold: #c9a227;
  --mist: #cfc6b4;
  --mute: #8f8778;
}

html {
  scroll-behavior: smooth;
}

body {
  overflow-x: hidden;
  background-color: var(--ink);
  background-image:
    radial-gradient(1200px 500px at 10% -10%, rgba(201, 162, 39, 0.08), transparent 60%),
    radial-gradient(900px 400px at 100% 0%, rgba(120, 90, 40, 0.06), transparent 55%),
    linear-gradient(180deg, #0b0a09 0%, #0d0c0a 100%);
}

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

img {
  max-width: 100%;
  height: auto;
}

.ad-slot {
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px dashed #3a342b;
  background: linear-gradient(180deg, #1a1713 0%, #12100e 100%);
  color: #8f8778;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.card-shot {
  background:
    radial-gradient(120% 80% at 20% 0%, rgba(201, 162, 39, 0.18), transparent 55%),
    linear-gradient(160deg, #221e18 0%, #12100d 70%);
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -3rem;
  z-index: 100;
  border-radius: 0.25rem;
  background: var(--gold);
  color: var(--ink);
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 600;
}

.skip-link:focus {
  top: 1rem;
}

.nav-link[aria-current="page"] {
  color: var(--gold);
}

.prose-guide h2 {
  margin-top: 1.75rem;
  margin-bottom: 0.75rem;
  scroll-margin-top: 5.5rem;
}

.prose-guide p,
.prose-guide li {
  line-height: 1.7;
}

#back-to-top {
  opacity: 0;
  pointer-events: none;
  transform: translateY(0.5rem);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

#back-to-top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.menu-icon {
  display: inline-flex;
  flex-direction: column;
  gap: 5px;
  width: 18px;
}

.menu-icon span {
  display: block;
  height: 2px;
  width: 100%;
  background: currentColor;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

#menu-toggle[aria-expanded="true"] .menu-icon span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

#menu-toggle[aria-expanded="true"] .menu-icon span:nth-child(2) {
  opacity: 0;
}

#menu-toggle[aria-expanded="true"] .menu-icon span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

#read-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 60;
  height: 3px;
  width: 0;
  background: linear-gradient(90deg, #8a6a1a, var(--gold));
  pointer-events: none;
}

.guide-card {
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.guide-card:hover {
  border-color: rgba(201, 162, 39, 0.55);
  transform: translateY(-2px);
}

.meta-chip {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.2rem 0.65rem;
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--mute);
}

.toc-box a {
  display: block;
  padding: 0.35rem 0;
  color: var(--mute);
  font-size: 0.875rem;
}

.toc-box a:hover,
.toc-box a.is-active {
  color: var(--gold);
}

.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.45s ease, transform 0.45s ease;
}

.reveal.is-in {
  opacity: 1;
  transform: translateY(0);
}

.filter-chip {
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--mute);
  border-radius: 999px;
  padding: 0.35rem 0.8rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.filter-chip:hover,
.filter-chip.is-active {
  border-color: rgba(201, 162, 39, 0.7);
  color: var(--gold);
  background: #1a1712;
}

.site-table th,
.site-table td {
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--line);
}

.site-table th {
  color: var(--gold);
  text-align: left;
  font-weight: 600;
}

kbd {
  display: inline-block;
  min-width: 1.4em;
  padding: 0.12rem 0.4rem;
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 0.3rem;
  background: rgba(11, 10, 9, 0.7);
  color: var(--gold);
  font-family: Figtree, ui-sans-serif, system-ui, sans-serif;
  font-size: 0.78em;
  font-weight: 600;
  line-height: 1.3;
  text-align: center;
}

.guide-feedback {
  margin-top: 2rem;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  background: var(--panel);
  padding: 1rem 1.1rem;
}

.guide-feedback p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--mist);
}

.guide-feedback-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.guide-feedback-actions button {
  border: 1px solid var(--line);
  background: #1a1712;
  color: var(--mist);
  border-radius: 999px;
  padding: 0.4rem 0.9rem;
  font-size: 0.75rem;
  font-weight: 600;
}

.guide-feedback-actions button:hover:not(:disabled) {
  border-color: rgba(201, 162, 39, 0.7);
  color: var(--gold);
}

.guide-feedback-actions button:disabled {
  opacity: 0.55;
  cursor: default;
}

.guide-feedback-note {
  margin-top: 0.7rem !important;
  color: var(--mute) !important;
  font-size: 0.78rem !important;
}

.consent-bar {
  position: fixed;
  left: 0.75rem;
  right: 0.75rem;
  bottom: 0.75rem;
  z-index: 70;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  background: rgba(21, 19, 17, 0.96);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  padding: 0.9rem 1rem;
  color: var(--mute);
  font-size: 0.8rem;
  line-height: 1.5;
}

.consent-bar a {
  color: var(--gold);
  text-decoration: underline;
}

.consent-accept {
  border: 0;
  border-radius: 0.4rem;
  background: var(--gold);
  color: var(--ink);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.55rem 0.9rem;
  white-space: nowrap;
}

@media (max-width: 767px) {
  .consent-bar {
    bottom: calc(4.1rem + env(safe-area-inset-bottom));
  }
}

.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;
}

.checklist {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
}

.checklist li {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 0.5rem;
  margin-bottom: 0.5rem;
}

.checklist label {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 0.85rem 1rem;
  cursor: pointer;
}

.checklist input {
  margin-top: 0.2rem;
  accent-color: var(--gold);
}

.checklist input:checked + span {
  color: var(--mute);
  text-decoration: line-through;
}

.mobile-dock {
  display: none;
}

@media (max-width: 767px) {
  .mobile-dock {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 45;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.25rem;
    border-top: 1px solid var(--line);
    background: rgba(11, 10, 9, 0.94);
    backdrop-filter: blur(8px);
    padding: 0.45rem 0.35rem calc(0.45rem + env(safe-area-inset-bottom));
  }

  .mobile-dock a {
    text-align: center;
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--mute);
    padding: 0.35rem 0.15rem;
  }

  .mobile-dock a[aria-current="page"],
  .mobile-dock a:hover {
    color: var(--gold);
  }

  body.has-mobile-dock {
    padding-bottom: 4.25rem;
  }

  #back-to-top {
    bottom: 4.5rem;
  }
}

.tip-of-day {
  border: 1px solid var(--line);
  background: linear-gradient(135deg, rgba(201, 162, 39, 0.08), rgba(21, 19, 17, 0.95));
  border-radius: 0.5rem;
  padding: 1rem 1.1rem;
}

.tip-of-day-label {
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 700;
}

.tip-of-day-text {
  margin-top: 0.45rem;
  color: var(--mist);
  font-size: 0.95rem;
  line-height: 1.5;
}

.tip-of-day-link {
  display: inline-block;
  margin-top: 0.65rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gold);
}

.tip-of-day-link:hover {
  text-decoration: underline;
}

.new-badge {
  display: inline-block;
  margin-left: 0.35rem;
  padding: 0.05rem 0.35rem;
  border: 1px solid rgba(201, 162, 39, 0.45);
  border-radius: 0.25rem;
  color: var(--gold);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  vertical-align: middle;
}

.guide-pager {
  margin-top: 2rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.guide-pager-link {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  background: rgba(21, 19, 17, 0.9);
  padding: 0.85rem 1rem;
  min-height: 4.5rem;
  transition: border-color 0.15s ease;
}

.guide-pager-link:hover {
  border-color: var(--gold);
}

.guide-pager-link span {
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mute);
}

.guide-pager-link strong {
  font-family: Cinzel, Georgia, serif;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--mist);
  line-height: 1.35;
}

.guide-pager-link.is-next {
  text-align: right;
}

.guide-pager-link.is-empty {
  visibility: hidden;
  pointer-events: none;
}

@media (max-width: 640px) {
  .guide-pager {
    grid-template-columns: 1fr;
  }

  .guide-pager-link.is-next {
    text-align: left;
  }

  .guide-pager-link.is-empty {
    display: none;
  }
}

.site-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.6rem;
}

.stat-pill {
  border: 1px solid var(--line);
  border-radius: 0.4rem;
  background: rgba(11, 10, 9, 0.45);
  padding: 0.65rem 0.4rem;
  text-align: center;
}

.stat-pill strong {
  display: block;
  font-family: Cinzel, Georgia, serif;
  color: var(--gold);
  font-size: 1.15rem;
  line-height: 1.2;
}

.stat-pill span {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--mute);
}

@media (max-width: 640px) {
  .site-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media print {
  #ad-top-banner,
  #ad-in-article,
  #ad-sidebar,
  #back-to-top,
  #read-progress,
  .mobile-dock,
  .consent-bar,
  .guide-feedback,
  .guide-pager,
  #print-guide,
  #share-guide,
  #copy-link,
  header,
  footer,
  aside {
    display: none !important;
  }

  body {
    background: #fff;
    color: #111;
  }

  a {
    color: #111;
    text-decoration: underline;
  }

  .prose-guide,
  main {
    max-width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal,
  .guide-card,
  #back-to-top {
    transition: none;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
}
