:root {
  --maroon: #650d22;
  --deep: #390915;
  --highlight: #8b1735;
  --gold: #d6ab58;
  --bg: #fff9f7;
  --text: #25171c;
  --muted: #5c4048;
  --card: #ffffff;
  --line: rgba(101, 13, 34, 0.14);
  --shadow: 0 12px 32px rgba(57, 9, 21, 0.08);
  --header: 4.5rem;
  color-scheme: light;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Avenir Next", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
}

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

a { color: var(--maroon); }

a:hover { color: var(--highlight); }

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

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 60;
  background: var(--gold);
  color: var(--deep);
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  text-decoration: none;
}

.skip:focus { top: 0.6rem; }

.wrap {
  width: min(1120px, calc(100% - 2rem));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--deep);
  border-bottom: 1px solid rgba(214, 171, 88, 0.45);
  transition: box-shadow 0.25s ease;
}

.site-header.is-stuck {
  box-shadow: 0 8px 22px rgba(57, 9, 21, 0.28);
}

.header-inner {
  width: min(1120px, calc(100% - 1.5rem));
  margin: 0 auto;
  min-height: var(--header);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.55rem 0;
}

.brand {
  display: inline-flex;
  width: max-content;
}

.brand img {
  display: block;
  height: 40px;
  width: auto;
}

.nav {
  display: flex;
  gap: 0.9rem;
  overflow-x: auto;
  padding-bottom: 0.15rem;
}

.nav a {
  color: #fff9f7;
  text-decoration: none;
  white-space: nowrap;
  font-size: 0.92rem;
}

.nav a:hover,
.nav a:focus-visible { color: var(--gold); }

.crumbs {
  padding: 0.9rem 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.crumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.crumbs li:not(:last-child)::after {
  content: "/";
  margin-left: 0.4rem;
  color: var(--gold);
}

.crumbs a { text-decoration: none; }

.hero { padding: 0.35rem 0 0.6rem; }

.hero-copy .lede { max-width: none; }

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

.subheading {
  margin: 0 0 0.35rem;
  color: var(--maroon);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1, h2, h3 {
  font-family: Georgia, "Iowan Old Style", "Palatino Linotype", Palatino, serif;
  line-height: 1.2;
  font-weight: 700;
  color: var(--deep);
}

h1 {
  margin: 0 0 0.8rem;
  font-size: clamp(1.85rem, 4vw, 2.7rem);
  letter-spacing: -0.03em;
}

.lede {
  max-width: 42rem;
  margin: 0 0 1rem;
  font-size: 1.05rem;
  color: var(--text);
}

.updated {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.section { padding: 1.4rem 0; }

h2 {
  margin: 0 0 0.8rem;
  font-size: clamp(1.45rem, 2.4vw, 2rem);
}

h2::before {
  content: "";
  display: block;
  width: 48px;
  height: 2px;
  margin-bottom: 0.55rem;
  background: var(--gold);
}

h3 { margin: 0 0 0.45rem; font-size: 1.25rem; }

.pdp {
  display: grid;
  gap: 1.25rem;
}

.stage {
  position: relative;
  aspect-ratio: 1;
  border-radius: 18px;
  overflow: hidden;
  background: var(--deep);
}

.stage-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: contain;
  opacity: 0;
}

.stage-img.is-active { opacity: 1; }

.thumbs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.55rem;
  margin-top: 0.7rem;
}

.thumbs a {
  display: block;
  border-radius: 12px;
  overflow: hidden;
  border: 2px solid transparent;
  background: var(--card);
}

.thumbs a.is-active { border-color: var(--gold); }

.thumbs img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  background: #1a0c10;
}

.panel {
  background: var(--card);
  border-radius: 18px;
  padding: 1.15rem 1.15rem 1.25rem;
  box-shadow: var(--shadow);
}

.spec { margin: 0; }

.spec div {
  display: grid;
  grid-template-columns: 7.5rem 1fr;
  gap: 0.35rem 0.75rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--line);
}

.spec dt { margin: 0; color: var(--muted); font-size: 0.92rem; }

.spec dd { margin: 0; }

.actions {
  display: grid;
  gap: 0.65rem;
  margin-top: 1rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.75rem 1rem;
  border-radius: 999px;
  border: 2px solid transparent;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.btn-gold {
  background: var(--gold);
  color: var(--deep);
}

.btn-gold:hover,
.btn-gold:focus-visible {
  background: #e4c278;
  color: var(--deep);
}

.btn-gold:active { background: #c49a45; }

.btn-maroon {
  background: var(--maroon);
  color: #fff9f7;
  border-color: var(--gold);
}

.btn-maroon:hover,
.btn-maroon:focus-visible {
  background: var(--highlight);
  color: #fff9f7;
}

.btn-maroon:active { background: var(--deep); }

.cards, .related {
  display: grid;
  gap: 1rem;
}

.card {
  display: flex;
  flex-direction: column;
  background: var(--card);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow);
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  background: var(--bg);
}

.card-wide img { aspect-ratio: 3 / 2; }

.card div { padding: 0.95rem 1rem 1.1rem; }

.card p { margin: 0; color: var(--muted); }

.card span {
  display: inline-block;
  margin-top: 0.55rem;
  color: var(--maroon);
  font-weight: 700;
}

.tabs { margin-top: 0.4rem; }

.tablist {
  display: flex;
  gap: 0.45rem;
  overflow-x: auto;
}

.tablist button {
  min-height: 44px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--deep);
  border-radius: 999px;
  padding: 0.45rem 0.95rem;
  font: inherit;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.tablist button.is-active,
.tablist button:hover,
.tablist button:focus-visible {
  background: var(--gold);
  color: var(--deep);
  border-color: var(--gold);
}

.tablist button:active { background: #c49a45; }

.tab-panel { display: none; padding-top: 1rem; }

.tab-panel.is-active { display: block; }

.tab-panel ul, .prose ul { padding-left: 1.15rem; }

.prose p, .tab-panel p { margin: 0 0 0.85rem; }

.table-wrap {
  overflow-x: auto;
  border-radius: 16px;
  background: var(--card);
  box-shadow: var(--shadow);
}

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

caption {
  text-align: left;
  padding: 0.9rem 1rem 0.2rem;
  color: var(--muted);
  font-size: 0.92rem;
}

th, td {
  text-align: left;
  vertical-align: top;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--line);
}

th {
  background: var(--deep);
  color: #fff9f7;
  font-weight: 650;
}

tbody tr:nth-child(even) { background: #fff5f2; }

.faq details {
  background: var(--card);
  border-radius: 14px;
  padding: 0.85rem 1rem;
  margin-bottom: 0.65rem;
  box-shadow: var(--shadow);
}

.faq summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--deep);
}

.faq p { margin: 0.55rem 0 0; }

.sources a { word-break: break-word; }

footer {
  margin-top: 1rem;
  background: var(--deep);
  color: #fff9f7;
  padding: 1.6rem 0 2rem;
}

footer a { color: var(--gold); }

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  margin: 0.8rem 0;
}

.fine {
  color: rgba(255, 249, 247, 0.82);
  font-size: 0.92rem;
}

.install-dialog {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: grid;
  place-items: end center;
  padding: 1rem;
  background: rgba(37, 23, 28, 0.62);
}

.install-card {
  width: min(24rem, 100%);
  margin-bottom: 0.5rem;
  padding: 1.25rem 1.2rem 1.15rem;
  border-radius: 22px;
  background: var(--deep);
  color: #fff9f7;
  border: 1px solid rgba(214, 171, 88, 0.7);
  text-align: center;
}

.install-card img {
  display: block;
  height: 36px;
  width: auto;
  margin: 0 auto 0.85rem;
}

.install-card h2 {
  margin: 0 0 0.45rem;
  color: #fff9f7;
  font-size: 1.45rem;
}

.install-card h2::before { display: none; }

.install-card p {
  margin: 0;
  color: rgba(255, 249, 247, 0.88);
  font-size: 0.98rem;
}

.install-actions {
  display: grid;
  gap: 0.55rem;
  margin-top: 1.05rem;
}

.btn-ghost {
  background: transparent;
  color: var(--gold);
  border-color: transparent;
}

.btn-ghost:hover,
.btn-ghost:focus-visible {
  background: transparent;
  color: #e4c278;
}

@media (min-width: 720px) {
  .install-dialog { place-items: center; }
  .install-card { margin-bottom: 0; }

  .header-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

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

  .cards { grid-template-columns: repeat(2, 1fr); }

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

@media (min-width: 960px) {
  .pdp {
    grid-template-columns: 1.15fr 0.85fr;
    align-items: start;
    gap: 1.5rem;
  }
}

@media (hover: hover) {
  .card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 34px rgba(57, 9, 21, 0.14);
  }
}

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

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

[id] { scroll-margin-top: 5.2rem; }
