/* ==========================================================================
   Ice And Fire Mod — S13 Adventure Codex Light
   Palette family: petrol + ember + saffron on frost
   ========================================================================== */

:root {
  /* Palette sampled from the Ice And Fire Mod logo artwork */
  --frost: #F7F9FC;        /* page background */
  --ice: #E4F2FB;          /* ice-dragon tint */
  --ice-2: #C9E4F5;
  --sand: #FBF1E1;         /* fire / gold tint */
  --sand-2: #EFD9B8;
  --white: #FFFFFF;
  --petrol: #1B577D;       /* primary: ice-dragon deep blue */
  --petrol-2: #2F6F9C;
  --ember: #8A2320;        /* supporting: red-dragon crimson */
  --saffron: #FFA000;      /* accent: dragon-fire amber */
  --saffron-soft: #FFEFCC;
  --gold: #AE7D3F;         /* logo frame gold, used for fine details */
  --ink: #141A3A;          /* night-sky navy for headings */
  --ink-soft: #3B4263;
  --muted: #5B6180;
  --line: #D8E3EE;
  --line-warm: #EADAC0;

  --font: "Poppins", "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  --w-wide: 1240px;
  --w: 1120px;
  --w-narrow: 760px;
  --header-h: 76px;
  --r-sm: 6px;
  --r-md: 12px;
  --r-lg: 22px;
  --r-xl: 34px;
  --shadow-soft: 0 10px 30px -18px rgba(27, 87, 125, .35);
  --shadow-lift: 0 18px 40px -22px rgba(27, 87, 125, .45);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--ink-soft);
  background: var(--frost);
  overflow-x: hidden;
}
img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--petrol); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--ember); }
h1, h2, h3, h4 { color: var(--ink); line-height: 1.18; margin: 0 0 .6em; font-weight: 700; letter-spacing: -.015em; }
h1 { font-size: clamp(2.2rem, 4.6vw, 3.6rem); letter-spacing: -.03em; }
h2 { font-size: clamp(1.7rem, 3vw, 2.45rem); letter-spacing: -.025em; }
h3 { font-size: clamp(1.15rem, 1.6vw, 1.35rem); font-weight: 600; }
p { margin: 0 0 1.1em; }
ul, ol { padding-left: 1.2em; }
strong { color: var(--ink); font-weight: 600; }
::selection { background: var(--saffron-soft); color: var(--ink); }

:focus-visible {
  outline: 3px solid var(--saffron);
  outline-offset: 3px;
  border-radius: 4px;
  box-shadow: 0 0 0 6px rgba(27, 87, 125, .25);
}

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 200;
  background: var(--ink); color: var(--white); padding: 10px 16px; border-radius: var(--r-sm);
  text-decoration: none; transition: top .2s;
}
.skip-link:focus { top: 12px; color: var(--white); }

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

.container { width: min(100% - 40px, var(--w)); margin-inline: auto; }
.container--wide { width: min(100% - 40px, var(--w-wide)); margin-inline: auto; }
.container--narrow { width: min(100% - 40px, var(--w-narrow)); margin-inline: auto; }

.section { padding-block: clamp(64px, 9vw, 120px); position: relative; }
.section--tight { padding-block: clamp(48px, 6vw, 80px); }
.section-kicker {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: .9rem; font-weight: 600; color: var(--petrol); margin-bottom: 14px;
}
.section-kicker::before {
  content: ""; width: 26px; height: 0; border-top: 3px dotted var(--gold);
}
.lede { font-size: clamp(1.1rem, 1.5vw, 1.25rem); color: var(--ink-soft); max-width: 62ch; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: inherit; font-weight: 600; font-size: 1rem; line-height: 1.2;
  padding: 14px 24px; border-radius: 999px; text-decoration: none; cursor: pointer;
  border: 2px solid transparent;
  transition: transform .25s var(--ease), background-color .25s, box-shadow .25s, color .25s, border-color .25s;
}
.btn-marker { background: var(--saffron); color: var(--ink); box-shadow: 0 8px 20px -12px rgba(138, 35, 32, .55); }
.btn-marker::before {
  content: ""; width: 10px; height: 10px; border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg); background: var(--ink); flex: none;
}
.btn-marker:hover { color: var(--ink); background: #FFB733; transform: translateY(-2px); }
.btn-line { border-color: var(--petrol); color: var(--petrol); background: transparent; }
.btn-line:hover { background: var(--petrol); color: var(--white); }
.btn-lg { padding: 18px 30px; font-size: 1.08rem; }
.text-link {
  font-weight: 600; text-decoration: none; color: var(--petrol);
  border-bottom: 2px dotted var(--petrol-2); padding-bottom: 2px;
}
.text-link:hover { color: var(--ember); border-bottom-color: var(--ember); }

/* ==========================================================================
   Header — explorer navigation
   ========================================================================== */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(247, 249, 252, .92);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, box-shadow .3s, background-color .3s;
}
.site-header.is-scrolled { border-bottom-color: var(--line); box-shadow: 0 6px 24px -20px rgba(27, 87, 125, .6); background: rgba(255, 255, 255, .95); }
.nav-wrap { display: flex; align-items: center; gap: 24px; min-height: var(--header-h); }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); margin-right: auto; }
.brand img { width: 44px; height: 44px; border-radius: 8px; box-shadow: 0 0 0 1.5px var(--gold); }
.brand-name { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name strong { font-size: 1.08rem; font-weight: 700; letter-spacing: -.01em; }
.brand-name small { font-size: .78rem; color: var(--muted); }
.brand:hover { color: var(--ink); }

.primary-nav ul { list-style: none; display: flex; gap: 4px; margin: 0; padding: 0; align-items: center; }
.nav-link {
  position: relative; display: block; padding: 10px 12px; font-size: .95rem; font-weight: 500;
  color: var(--ink-soft); text-decoration: none; border-radius: var(--r-sm);
}
.nav-link::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: 4px; height: 0;
  border-top: 2px dotted var(--ember); transform: scaleX(0); transform-origin: left;
  transition: transform .3s var(--ease);
}
.nav-link::before {
  content: ""; position: absolute; right: 6px; bottom: 1px; width: 7px; height: 7px; border-radius: 50%;
  background: var(--saffron); border: 1.5px solid var(--ink); opacity: 0; transform: scale(.4);
  transition: opacity .25s, transform .25s;
}
.nav-link:hover { color: var(--ink); }
.nav-link:hover::after { transform: scaleX(1); }
.nav-link.is-active, .nav-link[aria-current="page"] { color: var(--ink); font-weight: 600; }
.nav-link.is-active::after, .nav-link[aria-current="page"]::after { transform: scaleX(1); }
.nav-link.is-active::before, .nav-link[aria-current="page"]::before { opacity: 1; transform: scale(1); }
.nav-cta { margin-left: 8px; padding: 11px 20px; font-size: .95rem; }

.nav-toggle {
  display: none; width: 46px; height: 46px; border-radius: var(--r-md);
  border: 1.5px solid var(--line); background: var(--white); cursor: pointer; position: relative;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  position: absolute; left: 12px; width: 20px; height: 2px; background: var(--ink); content: "";
  transition: transform .3s var(--ease), opacity .2s;
}
.nav-toggle span { top: 21px; }
.nav-toggle span::before { top: -6px; left: 0; }
.nav-toggle span::after { top: 6px; left: 0; }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 1080px) {
  .nav-toggle { display: inline-block; }
  .primary-nav {
    position: absolute; left: 0; right: 0; top: 100%;
    background: var(--white); border-bottom: 1px solid var(--line);
    box-shadow: 0 20px 30px -24px rgba(27, 87, 125, .6);
    max-height: 0; overflow: hidden; visibility: hidden;
    transition: max-height .35s var(--ease), visibility .35s;
  }
  .primary-nav.is-open { max-height: 80vh; visibility: visible; overflow-y: auto; }
  .primary-nav ul { flex-direction: column; align-items: stretch; padding: 12px 20px 24px; gap: 2px; }
  .nav-link { padding: 12px 8px; font-size: 1.02rem; border-bottom: 1px dashed var(--line); border-radius: 0; }
  .nav-link::before { right: auto; left: -2px; top: 50%; bottom: auto; margin-top: -4px; }
  .nav-cta { margin: 14px 0 0; width: 100%; }
}

/* ==========================================================================
   Reveal (single, restrained)
   ========================================================================== */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

/* ==========================================================================
   Hero — expedition board
   ========================================================================== */
.hero { padding-block: clamp(40px, 6vw, 80px) clamp(64px, 8vw, 110px); position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: auto -10% -140px -10%; height: 320px;
  background: radial-gradient(60% 100% at 30% 100%, var(--ice) 0 60%, transparent 61%),
              radial-gradient(50% 90% at 85% 100%, var(--sand) 0 55%, transparent 56%);
  z-index: -1;
}
.hero-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6.2fr); gap: clamp(28px, 5vw, 72px); align-items: center; }
.hero-copy h1 { max-width: 13ch; margin-bottom: .45em; }
.hero-copy .lede { max-width: 46ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px 22px; align-items: center; margin-top: 30px; }
.hero-note { margin-top: 26px; font-size: .92rem; color: var(--muted); max-width: 46ch; }
.hero-note strong { color: var(--ink-soft); }

.expedition-board { position: relative; padding: 18px; }
.expedition-board > img { width: 100%; border-radius: var(--r-xl); box-shadow: var(--shadow-lift); }
.board-marker {
  position: absolute; display: flex; align-items: center; gap: 10px;
  background: var(--white); border: 1.5px solid var(--line); border-radius: var(--r-md);
  padding: 9px 14px 9px 10px; font-size: .86rem; font-weight: 600; color: var(--ink);
  box-shadow: var(--shadow-soft); max-width: 220px; line-height: 1.3;
}
.board-marker i {
  flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  background: var(--ice); color: var(--petrol); font-style: normal; font-size: .8rem;
}
.board-marker--fire i { background: var(--sand); color: var(--ember); }
.board-marker--gold i { background: var(--saffron-soft); color: var(--ink); }
.board-marker.m1 { top: 4%; left: -4%; }
.board-marker.m2 { top: 38%; right: -3%; }
.board-marker.m3 { bottom: 16%; left: -6%; }
.board-marker.m4 { bottom: -2%; right: 12%; }
@media (prefers-reduced-motion: no-preference) {
  .board-marker { animation: drift 7s ease-in-out infinite; }
  .board-marker.m2 { animation-delay: -2s; }
  .board-marker.m3 { animation-delay: -4s; }
  .board-marker.m4 { animation-delay: -5.5s; }
}
@keyframes drift { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }

/* ==========================================================================
   About — codex entry
   ========================================================================== */
.codex { background: var(--white); border-block: 1px solid var(--line); }
.codex-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: clamp(32px, 6vw, 90px); align-items: start; }
.codex-entry-no { font-size: .92rem; font-weight: 600; color: var(--ember); margin-bottom: 10px; display: block; }
.codex-body p:first-of-type { font-size: clamp(1.2rem, 1.8vw, 1.45rem); line-height: 1.55; color: var(--ink); font-weight: 500; }
.codex-body p { max-width: 64ch; }
.codex-side { border-left: 3px dotted var(--petrol-2); padding-left: clamp(20px, 3vw, 36px); }
.codex-side img { border-radius: var(--r-lg); margin-bottom: 24px; }
.facts { margin: 0; display: grid; gap: 0; }
.facts div { display: grid; grid-template-columns: 9.5em 1fr; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: .95rem; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; color: var(--ink); font-weight: 500; }

/* ==========================================================================
   Features — discovery path
   ========================================================================== */
.discovery { overflow: hidden; }
.discovery-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; align-items: end; margin-bottom: clamp(36px, 5vw, 64px); }
.discovery-head p { margin: 0; }
.route { position: relative; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: clamp(20px, 2.6vw, 34px); }
.route-line { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.waypoint { position: relative; z-index: 1; }
.waypoint h3 { display: flex; align-items: center; gap: 12px; }
.waypoint h3::before {
  content: ""; flex: none; width: 16px; height: 16px; border-radius: 50%;
  border: 3px solid var(--petrol); background: var(--frost);
}
.waypoint p:last-child { margin-bottom: 0; }
.wp-1 { grid-column: 1 / span 7; background: var(--sand); border-radius: var(--r-xl) var(--r-md) var(--r-xl) var(--r-md); padding: clamp(26px, 4vw, 48px); }
.wp-1 h3 { font-size: clamp(1.4rem, 2.2vw, 1.8rem); }
.wp-1 h3::before { border-color: var(--ember); }
.dragon-types { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 22px; }
.dragon-types span {
  background: var(--white); border-radius: var(--r-md); padding: 14px; font-size: .9rem; line-height: 1.4;
}
.dragon-types b { display: block; color: var(--ink); font-size: 1rem; margin-bottom: 4px; }
.wp-2 { grid-column: 8 / span 5; margin-top: clamp(0px, 6vw, 90px); padding: 20px 22px; background: var(--frost); border-radius: var(--r-md); }
.wp-3 { grid-column: 2 / span 5; background: var(--white); border: 1.5px solid var(--line); border-radius: var(--r-lg); padding: 28px; }
.wp-4 { grid-column: 7 / span 6; align-self: center; padding: 12px 16px 12px 20px; border-left: 3px solid var(--saffron); background: var(--frost); }
.wp-5 { grid-column: 1 / span 12; display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: 32px; align-items: center; background: var(--ice); border-radius: var(--r-md); padding: clamp(24px, 3.5vw, 40px); }
.wp-5 h3 { margin: 0; }
.creature-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.creature-list li { background: var(--white); border-radius: var(--r-sm); padding: 6px 12px; font-size: .9rem; color: var(--ink); }
.wp-6 { grid-column: 4 / span 6; text-align: left; padding: 16px 20px; background: var(--frost); border-radius: var(--r-md); }

/* ==========================================================================
   How It Works — journey checkpoints
   ========================================================================== */
.journey { background: linear-gradient(180deg, var(--frost) 0%, var(--ice) 100%); }
.journey-head { max-width: 640px; margin-bottom: clamp(40px, 5vw, 64px); }
.checkpoints { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(18px, 2.4vw, 30px); position: relative; counter-reset: cp; }
.checkpoints::before {
  content: ""; position: absolute; top: 34px; left: 6%; right: 6%; height: 0;
  border-top: 3px dashed var(--petrol-2); opacity: .55;
}
.checkpoint { position: relative; }
.checkpoint:nth-child(2) { margin-top: 44px; }
.checkpoint:nth-child(4) { margin-top: 28px; }
.cp-badge {
  width: 68px; height: 68px; display: grid; place-items: center; position: relative; z-index: 1;
  background: var(--white); border: 3px solid var(--petrol); color: var(--petrol);
  font-weight: 700; font-size: 1.35rem; margin-bottom: 20px;
}
.checkpoint:nth-child(1) .cp-badge { border-radius: 50%; }
.checkpoint:nth-child(2) .cp-badge { border-radius: var(--r-md); transform: rotate(45deg); }
.checkpoint:nth-child(2) .cp-badge span { transform: rotate(-45deg); }
.checkpoint:nth-child(3) .cp-badge { border-radius: 50% 50% 50% 0; transform: rotate(-45deg); border-color: var(--ember); color: var(--ember); }
.checkpoint:nth-child(3) .cp-badge span { transform: rotate(45deg); }
.checkpoint:nth-child(4) .cp-badge { border-radius: var(--r-sm); background: var(--saffron); border-color: var(--ink); color: var(--ink); }
.checkpoint h3 { margin-bottom: .4em; }
.checkpoint p { font-size: .96rem; margin: 0; }

/* ==========================================================================
   Use cases — field notes (typographic, no cards)
   ========================================================================== */
.field-notes-grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 96px); }
.field-notes-head { position: sticky; top: calc(var(--header-h) + 30px); align-self: start; }
.note-list { margin: 0; padding: 0; list-style: none; }
.note-list li { padding: 26px 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: 11em 1fr; gap: 20px; }
.note-list li:last-child { border-bottom: 1px solid var(--line); }
.note-list h3 { font-size: 1.12rem; margin: 0; color: var(--petrol); }
.note-list p { margin: 0; }

/* ==========================================================================
   Compatibility — specification matrix
   ========================================================================== */
.compat { background: var(--white); border-top: 1px solid var(--line); }
.compat-head { display: flex; flex-wrap: wrap; gap: 20px 40px; justify-content: space-between; align-items: end; margin-bottom: 36px; }
.compat-head p { max-width: 52ch; margin: 0; }
.table-scroll { overflow-x: auto; border: 1.5px solid var(--line); border-radius: var(--r-md); -webkit-overflow-scrolling: touch; }
.spec-table { width: 100%; border-collapse: collapse; min-width: 640px; font-size: .97rem; }
.spec-table th, .spec-table td { text-align: left; padding: 16px 20px; vertical-align: top; border-bottom: 1px solid var(--line); }
.spec-table thead th { background: var(--ice); color: var(--ink); font-weight: 600; font-size: .92rem; }
.spec-table tbody th { color: var(--ink); font-weight: 600; width: 22%; }
.spec-table tbody tr:last-child > * { border-bottom: 0; }
.status { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--ink); white-space: nowrap; }
.status::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--petrol-2); }
.status--no::before { background: var(--ember); border-radius: 2px; }
.status--req::before { background: var(--saffron); border: 1.5px solid var(--ink); }

/* ==========================================================================
   Guides preview — journal mosaic
   ========================================================================== */
.guides-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 36px; }
.guides-head h2 { margin: 0; }
.guide-mosaic { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); grid-template-rows: auto auto auto; gap: 22px; }
.g-card { position: relative; text-decoration: none; color: inherit; display: block; background: var(--white); border-radius: var(--r-lg); overflow: hidden; border: 1.5px solid var(--line); transition: border-color .25s, transform .3s var(--ease); }
.g-card:hover { border-color: var(--petrol-2); color: inherit; transform: translateY(-3px); }
.g-card img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: var(--ice); }
.g-card .g-body { padding: 20px 22px 24px; }
.g-card h3 { margin-bottom: .35em; }
.g-card p { font-size: .95rem; margin: 0; }
.g-tag { display: inline-block; font-size: .8rem; font-weight: 600; color: var(--ember); margin-bottom: 8px; }
.g-feature { grid-row: 1 / span 3; }
.g-feature img { aspect-ratio: 4 / 3; }
.g-feature h3 { font-size: clamp(1.35rem, 2vw, 1.7rem); }
.g-row { display: grid; grid-template-columns: 40% 1fr; align-items: center; }
.g-row img { height: 100%; aspect-ratio: auto; min-height: 130px; }
.g-row .g-body { padding: 16px 18px; }
.g-row h3 { font-size: 1.05rem; }

/* ==========================================================================
   Installation — procedure
   ========================================================================== */
.install { background: var(--sand); }
.install-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: clamp(32px, 5vw, 80px); align-items: start; }
.procedure { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.procedure li { counter-increment: step; position: relative; padding: 0 0 26px 64px; }
.procedure li::before {
  content: counter(step); position: absolute; left: 0; top: 0; width: 42px; height: 42px; border-radius: 50%;
  display: grid; place-items: center; background: var(--white); border: 2px solid var(--ember); color: var(--ember); font-weight: 700;
}
.procedure li::after { content: ""; position: absolute; left: 20px; top: 46px; bottom: 4px; border-left: 2px dotted var(--ember); opacity: .5; }
.procedure li:last-child::after { display: none; }
.procedure h3 { font-size: 1.08rem; margin: 6px 0 .3em; }
.procedure p { margin: 0; font-size: .97rem; }
.install-aside { background: var(--white); border-radius: var(--r-md); padding: 28px; position: sticky; top: calc(var(--header-h) + 24px); }
.install-aside h3 { font-size: 1.1rem; }
.install-aside ul { margin: 0 0 20px; padding-left: 1.1em; font-size: .95rem; }
.install-aside li { margin-bottom: 8px; }
code { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .88em; background: var(--ice); color: var(--ink); padding: 2px 6px; border-radius: 4px; }

/* ==========================================================================
   Download — full-width callout
   ========================================================================== */
.download-band { padding-block: clamp(56px, 8vw, 110px); background: var(--ice); position: relative; overflow: hidden; }
.download-band::after {
  content: ""; position: absolute; left: -5%; right: -5%; bottom: 36px; height: 0;
  border-top: 3px dashed var(--petrol-2); opacity: .25;
}
.download-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(32px, 6vw, 90px); align-items: center; position: relative; z-index: 1; }
.download-visual img { width: 100%; border-radius: var(--r-xl); box-shadow: var(--shadow-lift); }
.download-copy h2 { max-width: 18ch; }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0 28px; padding: 0; list-style: none; }
.chip-row li { background: var(--white); border-radius: var(--r-sm); padding: 7px 12px; font-size: .88rem; color: var(--ink); font-weight: 500; }
.download-note { margin-top: 24px; padding: 16px 18px; background: var(--white); border-left: 4px solid var(--saffron); border-radius: 0 var(--r-md) var(--r-md) 0; font-size: .93rem; }
.download-note p { margin: 0; }
.download-note p + p { margin-top: 8px; }

/* ==========================================================================
   Release information — metadata block
   ========================================================================== */
.release-block { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(28px, 5vw, 72px); align-items: start; }
.meta-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border: 1.5px solid var(--petrol); border-radius: var(--r-sm); background: var(--white); margin: 0; }
.meta-grid div { padding: 20px 22px; border-bottom: 1px solid var(--line); }
.meta-grid div:nth-child(odd) { border-right: 1px solid var(--line); }
.meta-grid div:nth-last-child(-n+2) { border-bottom: 0; }
.meta-grid dt { font-size: .85rem; color: var(--muted); margin-bottom: 4px; }
.meta-grid dd { margin: 0; color: var(--ink); font-weight: 600; line-height: 1.4; }

/* ==========================================================================
   Pros & cons — ledger
   ========================================================================== */
.ledger-wrap { background: var(--white); border-block: 1px solid var(--line); }
.ledger-head { text-align: center; max-width: 640px; margin: 0 auto 44px; }
.ledger { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border-top: 3px solid var(--ink); }
.ledger-col { padding: 28px clamp(18px, 3vw, 40px) 0; }
.ledger-col + .ledger-col { border-left: 1px solid var(--line); }
.ledger-col h3 { display: flex; align-items: center; gap: 10px; }
.ledger-col ul { list-style: none; padding: 0; margin: 0; }
.ledger-col li { padding: 14px 0 14px 34px; position: relative; border-bottom: 1px dashed var(--line); }
.ledger-col li::before { position: absolute; left: 0; top: 17px; font-weight: 700; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: .95rem; line-height: 1; }
.ledger-pros li::before { content: "+"; background: var(--ice); color: var(--petrol); }
.ledger-cons li::before { content: "\2212"; background: var(--sand); color: var(--ember); }

/* ==========================================================================
   Troubleshooting — problem / fix rows
   ========================================================================== */
.issues-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; align-items: end; margin-bottom: 36px; }
.issues-head p { margin: 0; }
.issue-rows { border-top: 1px solid var(--ink); }
.issue { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: 28px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.issue h3 { font-size: 1.05rem; margin: 0; display: flex; gap: 12px; align-items: baseline; }
.issue h3::before { content: ""; flex: none; width: 10px; height: 10px; transform: rotate(45deg); background: var(--ember); position: relative; top: -1px; }
.issue p { margin: 0; }

/* ==========================================================================
   Safety notice — stacked panel
   ========================================================================== */
.safety-panel { background: var(--white); border: 1.5px solid var(--line); border-radius: var(--r-lg); overflow: hidden; display: grid; grid-template-columns: 90px 1fr; }
.safety-icon { background: var(--petrol); display: grid; place-items: start center; padding-top: 34px; }
.safety-icon svg { width: 38px; height: 38px; }
.safety-content { padding: clamp(24px, 4vw, 44px); }
.safety-content ul { margin: 0; padding-left: 1.1em; }
.safety-content li { margin-bottom: 8px; }

/* ==========================================================================
   FAQ — codex chapters
   ========================================================================== */
.faq { background: var(--white); border-top: 1px solid var(--line); }
.faq-head { max-width: 700px; margin-bottom: 44px; }
.faq-chapters { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(20px, 3vw, 40px); align-items: start; }
.faq-chapter { background: var(--frost); border: 1.5px solid var(--line); border-radius: var(--r-md); padding: clamp(20px, 3vw, 32px); }
.faq-chapter:nth-child(2) { background: #FCF5EA; border-color: var(--line-warm); }
.chapter-title { display: flex; align-items: baseline; gap: 12px; margin-bottom: 18px; font-size: 1.3rem; }
.chapter-title small { font-size: .85rem; font-weight: 600; color: var(--ember); }
.faq-item { border-top: 1px dashed var(--line); }
.faq-chapter:nth-child(2) .faq-item { border-color: var(--line-warm); }
.faq-q { margin: 0; font-size: 1rem; }
.faq-q button {
  width: 100%; display: grid; grid-template-columns: 2.4em 1fr 22px; gap: 8px; align-items: start; text-align: left;
  background: none; border: 0; padding: 16px 2px; font: inherit; font-weight: 600; color: var(--ink); cursor: pointer; line-height: 1.45;
}
.faq-q button:hover { color: var(--petrol); }
.faq-index { color: var(--muted); font-weight: 500; font-size: .9rem; padding-top: 1px; }
.faq-mark { width: 22px; height: 22px; position: relative; margin-top: 2px; }
.faq-mark::before, .faq-mark::after { content: ""; position: absolute; left: 4px; right: 4px; top: 10px; height: 2px; background: var(--petrol); transition: transform .3s var(--ease); }
.faq-mark::after { transform: rotate(90deg); }
.faq-q button[aria-expanded="true"] .faq-mark::after { transform: rotate(0deg); }
.faq-q button[aria-expanded="true"] { color: var(--petrol); }
.faq-a { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .35s var(--ease); }
.faq-a > div { overflow: hidden; visibility: hidden; transition: visibility .35s; }
.faq-item.is-open .faq-a > div { visibility: visible; }
.faq-a p { margin: 0 0 18px 2.9em; font-size: .96rem; padding-left: 14px; border-left: 3px solid var(--saffron); }
.faq-item.is-open .faq-a { grid-template-rows: 1fr; }

/* ==========================================================================
   Footer — explorer journal
   ========================================================================== */
.site-footer { background: var(--frost); position: relative; padding-top: 70px; border-top: 1px solid var(--line); }
.footer-trail { position: absolute; top: 0; left: 0; width: 100%; height: 60px; }
.footer-statement { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: 40px; align-items: end; padding-bottom: 40px; border-bottom: 1px solid var(--line); }
.footer-statement p.big { font-size: clamp(1.4rem, 2.6vw, 2rem); font-weight: 600; color: var(--ink); line-height: 1.3; margin: 18px 0 0; letter-spacing: -.02em; max-width: 24ch; }
.footer-brand { display: inline-flex; gap: 12px; align-items: center; text-decoration: none; color: var(--ink); font-weight: 700; }
.footer-brand img { width: 48px; height: 48px; border-radius: 8px; box-shadow: 0 0 0 1.5px var(--gold); }
.footer-clusters { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.footer-clusters h2 { font-size: .95rem; margin-bottom: 10px; color: var(--petrol); letter-spacing: 0; }
.footer-clusters ul { list-style: none; margin: 0; padding: 0; }
.footer-clusters li { margin-bottom: 6px; font-size: .93rem; }
.footer-clusters a, .footer-legal a, .footer-bottom a { text-decoration: none; color: var(--ink-soft); }
.footer-clusters a:hover, .footer-legal a:hover, .footer-bottom a:hover { color: var(--ember); }
.footer-legal { display: flex; flex-wrap: wrap; gap: 8px 26px; list-style: none; margin: 0; padding: 24px 0; border-bottom: 1px solid var(--line); font-size: .92rem; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding: 22px 0 30px; font-size: .88rem; color: var(--muted); }
.footer-bottom p { margin: 0; }
.plain-email { color: var(--ink); font-weight: 500; user-select: all; }

/* ---------- Scroll to top ---------- */
.to-top {
  position: fixed; right: 20px; bottom: 20px; z-index: 90; width: 48px; height: 48px; border-radius: 50%;
  border: 2px solid var(--ink); background: var(--saffron); color: var(--ink); cursor: pointer;
  display: grid; place-items: center; opacity: 0; visibility: hidden; transform: translateY(12px);
  transition: opacity .3s, transform .3s var(--ease), visibility .3s;
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.to-top svg { width: 20px; height: 20px; }

/* ==========================================================================
   Inner pages — shared
   ========================================================================== */
.page-hero { padding-block: clamp(44px, 6vw, 84px) clamp(30px, 4vw, 50px); border-bottom: 1px solid var(--line); background: linear-gradient(180deg, var(--white), var(--frost)); }
.page-hero h1 { font-size: clamp(2rem, 4vw, 3rem); max-width: 22ch; }
.page-hero .lede { margin: 0; }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 0 0 22px; font-size: .88rem; color: var(--muted); }
.breadcrumb li + li::before { content: "/"; margin-right: 6px; color: var(--line); }
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--ember); }
.prose { max-width: 70ch; }
.prose h2 { font-size: clamp(1.45rem, 2.4vw, 1.9rem); margin-top: 1.8em; }
.prose h3 { margin-top: 1.5em; }
.prose ul, .prose ol { margin: 0 0 1.2em; }
.prose li { margin-bottom: .4em; }
.prose table { border-collapse: collapse; width: 100%; font-size: .95rem; margin-bottom: 1.4em; }
.prose th, .prose td { border-bottom: 1px solid var(--line); padding: 10px 12px; text-align: left; vertical-align: top; }
.prose thead th { background: var(--ice); color: var(--ink); }
.callout { background: var(--ice); border-radius: var(--r-md); padding: 18px 22px; margin: 0 0 1.4em; }
.callout--warm { background: var(--sand); }
.callout p:last-child { margin: 0; }

/* ---------- Blog index — adventure journal ---------- */
.journal-feature { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 0; background: var(--white); border: 1.5px solid var(--line); border-radius: var(--r-xl); overflow: hidden; text-decoration: none; color: inherit; transition: border-color .25s; }
.journal-feature:hover { border-color: var(--petrol-2); color: inherit; }
.journal-feature img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 16 / 10; background: var(--ice); }
.journal-feature .jf-body { padding: clamp(24px, 4vw, 48px); align-self: center; }
.journal-feature h2 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); }
.field-notes-index { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 30px 24px; margin-top: 40px; align-items: start; grid-auto-flow: dense; }
.fn-card { text-decoration: none; color: inherit; display: flex; flex-direction: column; gap: 14px; }
.fn-card img { border-radius: var(--r-md); aspect-ratio: 16 / 10; object-fit: cover; background: var(--ice); border: 1px solid var(--line); transition: transform .35s var(--ease); }
.fn-card:hover { color: inherit; }
.fn-card:hover img { transform: translateY(-3px); }
.fn-card:hover h3 { color: var(--ember); }
.fn-card h3 { font-size: 1.12rem; margin: 0; transition: color .2s; }
.fn-card p { font-size: .94rem; margin: 0; }
.fn-card--wide { grid-column: span 2; flex-direction: row; align-items: center; background: var(--white); border: 1.5px solid var(--line); border-radius: var(--r-lg); padding: 16px; }
.fn-card--wide img { width: 52%; flex: none; }
.fn-card--tall { grid-row: span 2; }
.fn-card--tall img { aspect-ratio: 4 / 5; object-fit: contain; background: var(--frost); }
.fn-card--text { background: var(--sand); border-radius: var(--r-lg); padding: 26px; justify-content: center; }
.journal-groups { margin-top: 70px; }

/* ---------- Blog post ---------- */
.post-layout { display: grid; grid-template-columns: minmax(0, 74ch) 300px; justify-content: space-between; gap: clamp(32px, 5vw, 70px); align-items: start; padding-block: clamp(40px, 5vw, 70px); }
.post-figure { margin: 0 0 32px; }
.post-figure img { border-radius: var(--r-lg); border: 1px solid var(--line); width: 100%; }
.post-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: .9rem; color: var(--muted); margin-top: 18px; }
.post-sidebar { position: sticky; top: calc(var(--header-h) + 20px); display: grid; gap: 22px; }
.side-block { background: var(--white); border: 1.5px solid var(--line); border-radius: var(--r-md); padding: 22px; font-size: .93rem; }
.side-block h2 { font-size: 1rem; margin-bottom: 12px; letter-spacing: 0; }
.side-block ol, .side-block ul { list-style: none; margin: 0; padding: 0; }
.side-toc li { border-left: 2px dotted var(--petrol-2); padding: 4px 0 4px 14px; }
.side-toc a { text-decoration: none; color: var(--ink-soft); }
.side-toc a:hover { color: var(--ember); }
.side-block--cta { background: var(--saffron-soft); border-color: #F5D08A; }
.side-block--cta p { margin: 0 0 14px; }
.side-block--cta .btn { width: 100%; }
.side-facts li { padding: 7px 0; border-bottom: 1px dashed var(--line); }
.side-facts li:last-child { border: 0; }
.related { margin-top: 56px; padding-top: 32px; border-top: 3px dotted var(--petrol-2); }
.related-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; list-style: none; padding: 0; margin: 0; }
.related-list a { display: block; text-decoration: none; color: var(--ink); font-weight: 600; font-size: .98rem; line-height: 1.4; }
.related-list img { border-radius: var(--r-md); margin-bottom: 10px; border: 1px solid var(--line); aspect-ratio: 16 / 9; object-fit: cover; }
.related-list a:hover { color: var(--ember); }

/* ---------- Supporting pages ---------- */
.about-page-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: clamp(32px, 5vw, 80px); padding-block: clamp(40px, 6vw, 80px); align-items: start; }
.about-aside { border-left: 3px dotted var(--petrol-2); padding-left: 28px; position: sticky; top: calc(var(--header-h) + 24px); }
.contact-wrap { padding-block: clamp(40px, 6vw, 80px); }
.contact-card { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); background: var(--white); border: 1.5px solid var(--line); border-radius: var(--r-xl); overflow: hidden; }
.contact-email-block { background: var(--ice); padding: clamp(28px, 4vw, 48px); }
.contact-email-block .plain-email { display: block; font-size: clamp(1.2rem, 2.4vw, 1.6rem); font-weight: 700; margin: 12px 0 18px; word-break: break-word; color: var(--petrol); }
.contact-reasons { padding: clamp(28px, 4vw, 48px); }
.contact-reasons ul { padding: 0; list-style: none; margin: 0; }
.contact-reasons li { padding: 14px 0; border-bottom: 1px dashed var(--line); }
.contact-reasons li:last-child { border: 0; }
.legal-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: clamp(28px, 5vw, 70px); padding-block: clamp(40px, 6vw, 80px); align-items: start; }
.legal-index { position: sticky; top: calc(var(--header-h) + 24px); font-size: .92rem; }
.legal-index h2 { font-size: .95rem; letter-spacing: 0; color: var(--petrol); }
.legal-index ol { margin: 0; padding-left: 1.3em; }
.legal-index li { margin-bottom: 6px; }
.legal-index a { color: var(--ink-soft); text-decoration: none; }
.legal-index a:hover { color: var(--ember); }
.updated { font-size: .9rem; color: var(--muted); }
.disclaimer-stack { padding-block: clamp(40px, 6vw, 80px); display: grid; gap: 18px; }
.disclaimer-stack section { display: grid; grid-template-columns: 70px minmax(0, 1fr); gap: 20px; background: var(--white); border: 1.5px solid var(--line); border-radius: var(--r-md); padding: 26px; }
.disclaimer-stack .d-no { width: 52px; height: 52px; border-radius: 50%; border: 2px solid var(--ember); color: var(--ember); display: grid; place-items: center; font-weight: 700; }
.disclaimer-stack h2 { font-size: 1.25rem; }
.disclaimer-stack p:last-child { margin: 0; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1080px) {
  .board-marker.m1 { left: 0; }
  .board-marker.m3 { left: 0; }
  .board-marker.m2 { right: 0; }
}
@media (max-width: 960px) {
  .hero-grid, .codex-grid, .install-grid, .download-grid, .release-block, .field-notes-grid,
  .about-page-grid, .contact-card, .footer-statement, .discovery-head, .issues-head { grid-template-columns: 1fr; }
  .hero-copy h1 { max-width: 16ch; }
  .codex-side { border-left: 0; border-top: 3px dotted var(--petrol-2); padding: 28px 0 0; }
  .route { grid-template-columns: 1fr; }
  .route > .waypoint { grid-column: 1 / -1; margin-top: 0; }
  .route-line { display: none; }
  .wp-5 { grid-template-columns: 1fr; gap: 16px; }
  .checkpoints { grid-template-columns: 1fr 1fr; row-gap: 40px; }
  .checkpoints::before { display: none; }
  .checkpoint:nth-child(n) { margin-top: 0; }
  .field-notes-head { position: static; }
  .install-aside, .about-aside, .legal-index, .post-sidebar { position: static; }
  .guide-mosaic { grid-template-columns: 1fr; }
  .g-feature { grid-row: auto; }
  .post-layout { grid-template-columns: minmax(0, 1fr); }
  .legal-layout { grid-template-columns: 1fr; }
  .journal-feature { grid-template-columns: 1fr; }
  .field-notes-index { grid-template-columns: 1fr 1fr; }
  .fn-card--wide { grid-column: span 2; }
  .related-list { grid-template-columns: 1fr 1fr; }
  .download-visual { max-width: 460px; }
}
@media (max-width: 640px) {
  body { font-size: 1rem; }
  .expedition-board { padding: 0; }
  .board-marker { position: static; animation: none; max-width: none; box-shadow: none; font-size: .8rem; padding: 7px 10px 7px 8px; }
  .board-marker i { width: 22px; height: 22px; }
  .expedition-board { display: flex; flex-wrap: wrap; gap: 8px; }
  .expedition-board > img { flex: 0 0 100%; margin-bottom: 6px; }
  .dragon-types { grid-template-columns: 1fr; }
  .checkpoints { grid-template-columns: 1fr; }
  .note-list li { grid-template-columns: 1fr; gap: 6px; }
  .issue { grid-template-columns: 1fr; gap: 8px; }
  .ledger { grid-template-columns: 1fr; }
  .ledger-col + .ledger-col { border-left: 0; border-top: 1px solid var(--line); margin-top: 20px; }
  .meta-grid { grid-template-columns: 1fr; }
  .meta-grid div:nth-child(odd) { border-right: 0; }
  .meta-grid div:nth-last-child(2) { border-bottom: 1px solid var(--line); }
  .faq-chapters { grid-template-columns: 1fr; }
  .safety-panel { grid-template-columns: 1fr; }
  .safety-icon { padding: 18px; place-items: center start; }
  .g-row { grid-template-columns: 1fr; }
  .g-row img { min-height: 0; aspect-ratio: 16 / 9; }
  .field-notes-index { grid-template-columns: 1fr; }
  .fn-card--wide { grid-column: auto; flex-direction: column; align-items: stretch; }
  .fn-card--wide img { width: 100%; }
  .fn-card--tall { grid-row: auto; }
  .fn-card--tall img { aspect-ratio: 16 / 10; }
  .related-list { grid-template-columns: 1fr; }
  .footer-clusters { grid-template-columns: 1fr 1fr; }
  .disclaimer-stack section { grid-template-columns: 1fr; }
  .hero-actions .btn { width: 100%; }
  .facts div { grid-template-columns: 1fr; gap: 2px; }
  .brand-name small { display: none; }
}
@media (max-width: 380px) {
  .footer-clusters { grid-template-columns: 1fr; }
  .container, .container--wide, .container--narrow { width: calc(100% - 28px); }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}
