/* ===== TOKENS ===== */
:root {
  --color-bg: #050506;
  --color-surface: #0D0D10;
  --color-text: #FFFFFF;
  --color-text-secondary: rgba(255, 255, 255, 0.6);
  --color-text-tertiary: rgba(255, 255, 255, 0.4);
  --color-border: rgba(255, 255, 255, 0.1);
  --color-accent: #217BFF;
  --color-accent-glow-start: #0A3B8F;
  --color-accent-glow-end: #29A1FF;
  --color-accent-border: rgba(33, 123, 255, 0.35);
  --color-accent-shadow: rgba(33, 123, 255, 0.25);
  --color-accent-shadow-soft: rgba(33, 123, 255, 0.07);
  --color-accent-glow-bg: rgba(33, 123, 255, 0.15);

  --font-display: 'Anton', 'Arial Narrow', sans-serif;
  --font-body: 'Montserrat', 'Segoe UI', sans-serif;

  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 32px;
  --space-5: 48px;
  --space-6: 64px;
  --space-7: 96px;
  --space-8: 128px;

  --container-width: 1280px;
  --border-radius: 0px;
}

/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; overflow-x: clip; }
body {
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
ul, ol { list-style: none; }
h1, h2, h3 {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  font-weight: normal;
}
input { font: inherit; }

/* ===== LAYOUT ===== */
.container {
  max-width: var(--container-width);
  margin-inline: auto;
  padding-inline: var(--space-3);
}
section { padding-block: var(--space-7); border-bottom: 1px solid var(--color-border); }

/* ===== UTILITIES ===== */
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--color-accent);
  color: var(--color-bg);
  padding: var(--space-2);
  z-index: 100;
}
.skip-link:focus { left: var(--space-2); top: var(--space-2); }

.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;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: var(--space-2);
}
.eyebrow::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-accent);
  box-shadow: 0 0 8px 2px var(--color-accent-glow-end);
}

:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

/* ===== HEADER & NAV ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(5, 5, 6, 0.85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-border);
  padding-block: 0;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: var(--space-2);
}
/* ===== DIVISION NAV =====
   The header mark is a hover/tap dropdown: it always shows the icon for the
   division the current page belongs to (XP Department vs. Intelligence
   Division today), and lists the other division(s) below it, in a fixed
   master order (Home, then Intelligence, then any future division) with the
   current page's own entry omitted - never reordered per page. */
.division-nav { position: relative; display: flex; align-items: center; gap: 6px; }

.division-current { display: flex; align-items: center; position: relative; }

.division-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  color: var(--color-text-secondary);
  transition: color 0.2s ease, transform 0.2s ease;
}
.division-toggle svg { width: 10px; height: 10px; }
.division-nav:hover .division-toggle,
.division-nav:focus-within .division-toggle,
.division-nav.is-open .division-toggle {
  color: var(--color-text);
  transform: rotate(180deg);
}

.division-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 14px;
  min-width: 230px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  padding: 6px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0s linear 0.2s;
  z-index: 60;
}
.division-nav:hover .division-dropdown,
.division-nav:focus-within .division-dropdown,
.division-nav.is-open .division-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition-delay: 0s;
}

.division-dropdown-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 10px;
  border: 1px solid transparent;
  transition: border-color 0.2s ease;
}
.division-dropdown-item:hover, .division-dropdown-item:focus-visible { border-color: var(--color-border); }
.division-dropdown-item span {
  font-family: var(--font-display);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* XP Department mark: white by default, cross-fades to its blue-accent
   variant on hover - reused at both toolbar size (.division-current) and the
   smaller dropdown-row size. The two images sit in their own tight
   .division-icon-xp-wrap rather than relying on .division-dropdown-item
   itself as the positioning context - top:0/left:0 on an absolutely
   positioned element anchors to the containing block's padding-box edge,
   which ignores that ancestor's own padding, so anchoring straight to the
   padded dropdown row shifted the hover image up-and-left by exactly its
   padding (9px/10px). */
.division-icon-xp-wrap { position: relative; display: block; }
.division-icon-xp { display: block; height: 32px; width: auto; }
.division-icon-xp-base, .division-icon-xp-hover { display: block; transition: opacity 0.25s ease; }
.division-dropdown-item .division-icon-xp { height: 20px; }
.division-icon-xp-hover { position: absolute; top: 0; left: 0; opacity: 0; }
.division-link-xp:hover .division-icon-xp-base,
.division-link-xp:focus-visible .division-icon-xp-base { opacity: 0; }
.division-link-xp:hover .division-icon-xp-hover,
.division-link-xp:focus-visible .division-icon-xp-hover { opacity: 1; }

/* Intelligence Division mark: a plain line-art eye (echoes the eye motif in
   the guides.html seal) - fades red on hover via currentColor, no separate
   raster asset needed the way the XP mark's blue variant is. */
.division-icon-intel { display: block; width: 44px; height: 44px; color: var(--color-text); transition: color 0.25s ease; }
.division-dropdown-item .division-icon-intel { width: 30px; height: 30px; }
.division-link-intel:hover .division-icon-intel,
.division-link-intel:focus-visible .division-icon-intel { color: #B3122B; }

.site-nav ul { display: flex; gap: var(--space-4); }
.site-nav a {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  position: relative;
  padding-block: var(--space-1);
}
.site-nav a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 2px;
  background: var(--color-accent);
  transition: width 0.25s ease;
}
.site-nav a:hover::after,
.site-nav a:focus-visible::after { width: 100%; }

.nav-toggle { display: none; flex-direction: column; gap: 5px; padding: var(--space-1); position: relative; }
.nav-toggle::after {
  content: '';
  position: absolute;
  inset: -6px;
}
.nav-toggle-bar { width: 22px; height: 2px; background: var(--color-text); }

@media (max-width: 768px) {
  .nav-toggle { display: flex; }
  .site-nav {
    position: absolute;
    top: calc(100% + 1px);
    left: 0;
    right: 0;
    height: calc(100vh - 100%);
    overflow-y: auto;
    background: var(--color-bg);
    transform: translateX(100%);
    visibility: hidden;
    transition: transform 0.3s ease, visibility 0s linear 0.3s;
  }
  .site-nav.is-open {
    transform: translateX(0);
    visibility: visible;
    transition-delay: 0s;
  }
  .site-nav ul { flex-direction: column; gap: var(--space-3); padding: var(--space-5) var(--space-3); }
  .site-nav a { padding-block: var(--space-2); }
}

/* ===== HERO ===== */
.hero {
  min-height: 90vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  background-image: radial-gradient(circle at 50% 30%, var(--color-accent-glow-bg), transparent 60%);
}
.hero-canvas {
  /* Only present on pages that opt into a canvas animation (currently
     guides.html's intel-constellation.js) - the homepage hero has no
     canvas element, so this rule is otherwise inert there. */
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.09) 1px, transparent 1px);
  background-size: 26px 26px;
  animation: dotgrid-pulse 4s ease-in-out infinite;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(var(--color-bg) 0%, transparent 15%, transparent 85%, var(--color-bg) 100%);
  pointer-events: none;
  z-index: 1;
}
.hero-inner { position: relative; z-index: 2; text-align: center; }
.hero-title { margin-block: var(--space-3) var(--space-2); }
.hero-lockup-img {
  /* Real cutout from the brand's own transparent logo file
     (Graphics/Master Logo/xp-department-primary-logo-transparent.png),
     upscaled and re-exported at high resolution so it stays crisp on
     retina/HiDPI displays. The accent line + dot are cropped out here and
     rendered live below as .hero-divider so they can animate. */
  display: block;
  width: min(520px, 85vw);
  height: auto;
  margin-inline: auto;
}
.hero-divider {
  position: relative;
  width: min(468px, 76.5vw);
  height: 2px;
  margin: 0 auto var(--space-3);
}
.hero-divider-line {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg,
    transparent,
    var(--color-accent-glow-start) 20%,
    var(--color-accent-glow-end) 50%,
    var(--color-accent-glow-start) 80%,
    transparent);
  animation: accent-pulse 2.4s ease-in-out infinite;
}
.hero-divider-dot {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 6px;
  height: 6px;
  margin: -3px 0 0 -3px;
  border-radius: 50%;
  background: var(--color-accent);
  box-shadow: 0 0 8px 2px var(--color-accent-glow-end);
  animation: accent-pulse 2.4s ease-in-out infinite;
}
.hero-tagline {
  font-size: 0.9rem;
  letter-spacing: 0.32em;
  color: var(--color-text-secondary);
  margin-bottom: var(--space-2);
}
.hero-tagline .dot {
  display: inline-block;
  width: 0.5em;
  height: 0.5em;
  border-radius: 50%;
  background: var(--color-accent);
  color: transparent;
  margin-inline: var(--space-2);
  vertical-align: middle;
}
.hero-subtext {
  max-width: 560px;
  margin-inline: auto;
  color: var(--color-text-secondary);
  margin-bottom: var(--space-4);
}
.hero-actions { display: flex; gap: var(--space-2); justify-content: center; flex-wrap: wrap; }

.btn {
  display: inline-block;
  padding: var(--space-2) var(--space-4);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border: 1px solid var(--color-accent);
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.btn-primary { background: var(--color-accent); color: var(--color-bg); border-color: var(--color-accent); }
.btn-primary:hover, .btn-primary:focus-visible { background: var(--color-bg); color: var(--color-accent); border-color: var(--color-accent); }
.btn-secondary { background: transparent; color: var(--color-text); border-color: var(--color-border); }
.btn-secondary:hover, .btn-secondary:focus-visible { border-color: var(--color-accent); color: var(--color-accent); }

/* ===== PILLARS ===== */
.pillars h2 { margin-bottom: var(--space-4); }
.pillars-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-4); }
.pillar {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  padding: var(--space-4);
  position: relative;
}
.pillar::before, .pillar::after {
  content: '';
  position: absolute;
  width: 12px;
  height: 12px;
  border: 1px solid var(--color-accent);
}
.pillar::before { top: -1px; left: -1px; border-right: none; border-bottom: none; }
.pillar::after { bottom: -1px; right: -1px; border-left: none; border-top: none; }
.pillar-icon { width: 32px; height: 32px; color: var(--color-accent); margin-bottom: var(--space-3); }
.pillar h3 { font-size: 1.1rem; margin-bottom: var(--space-2); }
.pillar p { color: var(--color-text-secondary); font-size: 0.9rem; }

@media (max-width: 768px) {
  .pillars-grid { grid-template-columns: 1fr; }
}

/* ===== PROJECT 001 DOSSIER ===== */
.status-badge {
  display: inline-block;
  border: 1px solid var(--color-accent);
  color: var(--color-accent);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: var(--space-1) var(--space-2);
  margin-block: var(--space-2);
}
.missions-body, .missions-objective { color: var(--color-text-secondary); margin-top: var(--space-3); }
.missions-objective strong { color: var(--color-text); }

.dossier-panel {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-6);
  background: var(--color-surface);
  border: 1px solid var(--color-accent-border);
  box-shadow: 0 0 48px var(--color-accent-shadow-soft);
  padding: var(--space-5);
}
.dossier-panel::before, .dossier-panel::after {
  content: '';
  position: absolute;
  width: 22px;
  height: 22px;
  border: 1px solid var(--color-accent);
}
.dossier-panel::before { top: -1px; left: -1px; border-right: none; border-bottom: none; }
.dossier-panel::after { bottom: -1px; right: -1px; border-left: none; border-top: none; }

.dossier-col-case { flex: 1 1 420px; min-width: 320px; }
.dossier-col-ladder {
  flex: 1 1 380px;
  min-width: 300px;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  padding: var(--space-3);
}

.ladder-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-text-tertiary);
  margin-bottom: var(--space-2);
}
.ladder-item {
  position: relative;
  display: flex;
  align-items: baseline;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-2) var(--space-2) var(--space-1);
  border-top: 1px solid var(--color-border);
}
.ladder-item:first-child { border-top: none; }
.ladder-item.is-active { border-top-color: transparent; }
.ladder-item.is-active::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--color-accent);
  box-shadow: 0 0 8px var(--color-accent-glow-end);
}
.ladder-index {
  flex-shrink: 0;
  width: 28px;
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--color-text-tertiary);
}
.ladder-item.is-active .ladder-index { color: var(--color-accent); }
.ladder-text { display: flex; flex-direction: column; }
.ladder-name {
  font-family: var(--font-display);
  font-size: 0.9rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--color-text-secondary);
}
.ladder-item.is-active .ladder-name { color: var(--color-text); }
.ladder-desc { font-size: 0.75rem; color: var(--color-text-tertiary); margin-top: 2px; }
.ladder-item.is-active .ladder-desc { color: var(--color-text-secondary); }
.ladder-footnote { margin-top: var(--space-3); font-size: 0.75rem; color: var(--color-text-tertiary); }

@media (max-width: 768px) {
  .dossier-panel { padding: var(--space-4); gap: var(--space-4); }
}

/* ===== ARCHIVES ===== */
.archives-inner {
  position: relative;
  max-width: 600px;
  text-align: center;
  margin-inline: auto;
  border: 1px dashed var(--color-border);
  padding: var(--space-6) var(--space-4);
}
.archives-tab {
  position: absolute;
  top: -13px;
  left: var(--space-4);
  background: var(--color-bg);
  padding: 0 10px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-text-tertiary);
}
.archives-inner p { color: var(--color-text-secondary); margin-top: var(--space-2); }
.archives-inner .archives-status {
  font-family: var(--font-display);
  color: var(--color-accent);
  letter-spacing: 0.05em;
  margin-top: var(--space-3);
}

.archives-columns { display: flex; gap: var(--space-6); align-items: flex-start; }
.archives-col { flex: 1 1 0; min-width: 0; }
.archives-col-guides { display: flex; flex-direction: column; }
.archives-guides-label {
  font-family: var(--font-display);
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: var(--space-2);
}
.archives-guides-list {
  max-height: 260px;
  overflow-y: auto;
  border-top: 1px solid var(--color-border);
  margin-bottom: var(--space-3);
}
.archives-guides-cta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-top: var(--space-2);
  border-top: 1px solid var(--color-border);
}
.archives-guides-cta-eyebrow {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-text-tertiary);
}
.archives-guides-cta-label {
  position: relative;
  display: inline-block;
  width: fit-content;
  font-family: var(--font-display);
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-accent);
  transition: color 0.25s ease;
}
.archives-guides-cta-label::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 2px;
  background: var(--color-accent);
  transition: width 0.25s ease, background-color 0.25s ease;
}
.archives-guides-cta:hover .archives-guides-cta-label::after,
.archives-guides-cta:focus-visible .archives-guides-cta-label::after { width: 100%; }
.archives-guides-cta:hover .archives-guides-cta-label,
.archives-guides-cta:focus-visible .archives-guides-cta-label {
  /* Intelligence Division red (guides.html's --color-accent), hardcoded here
     since this page keeps the site's default blue accent token. */
  color: #B3122B;
}
.archives-guides-cta:hover .archives-guides-cta-label::after,
.archives-guides-cta:focus-visible .archives-guides-cta-label::after {
  background: #B3122B;
}

@media (max-width: 768px) {
  .archives-columns { flex-direction: column; gap: var(--space-5); }
}

/* ===== GUIDES LIST (shared: Archives mini-list + guides.html full list) ===== */
.guides-list { display: flex; flex-direction: column; }
.guides-list[hidden] {
  /* Same gotcha already noted on .notify-form: author CSS beats the
     browser's default [hidden]{display:none} regardless of specificity, so
     the unconditional display:flex above would otherwise keep a
     category panel on-screen even after JS sets the hidden attribute. */
  display: none;
}
.guide-row {
  display: flex;
  align-items: baseline;
  gap: var(--space-2);
  padding: var(--space-2);
  border: 1px solid transparent;
  transition: border-color 0.2s ease;
}
.guide-row:hover, .guide-row:focus-visible { border-color: var(--color-accent); }
.guide-row-index {
  flex-shrink: 0;
  width: 32px;
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--color-text-tertiary);
  transition: color 0.2s ease;
}
/* Archives mini-preview only: hovering the "001" row previews Intelligence
   Division red, the same hardcoded accent used by "Access Guides" just
   below it - together they foreshadow the handoff from this (blue) page
   into the (red) Intelligence Division before the visitor even clicks. */
#archives-guides-list .guide-row:hover .guide-row-index,
#archives-guides-list .guide-row:focus-visible .guide-row-index { color: #B3122B; }
#archives-guides-list .guide-row:hover,
#archives-guides-list .guide-row:focus-visible { border-color: #B3122B; }
.guide-row-title {
  font-family: var(--font-display);
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.guide-row-text { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.guide-row-desc { font-size: 0.8rem; color: var(--color-text-secondary); }
.guide-row-meta {
  flex-shrink: 0;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-tertiary);
}

/* Flags a guide-row as a distinct document class (e.g. Operation Bond Run's
   flagship "Operational Dossier" vs. an ordinary Field File) - a small
   accent-colored pill next to the title, not a full re-theme of the row. */
.guide-row-dossier-tag {
  display: inline-block;
  margin-left: 10px;
  font-family: var(--font-body);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-accent);
  border: 1px solid var(--color-accent-border);
  padding: 2px 7px;
  vertical-align: middle;
  transform: translateY(-1px);
}
.guide-row-dossier:hover .guide-row-dossier-tag,
.guide-row-dossier:focus-visible .guide-row-dossier-tag { border-color: var(--color-accent); }

/* Money Making panel: two named blocks (F2P / P2P) of guide-rows sharing one
   list, plus a "not built yet" row state distinct from guides-list-empty
   (that's for a whole panel; this is per-row, once methods exist to build). */
.guides-track-group + .guides-track-group { margin-top: var(--space-4); }
.guides-track-label {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: var(--space-1);
}
.guide-row-locked { cursor: default; opacity: 0.7; }
.guide-row-locked:hover, .guide-row-locked:focus-visible { border-color: transparent; }
.guide-row-locked-tag {
  display: inline-block;
  margin-left: 10px;
  font-family: var(--font-body);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-tertiary);
  border: 1px solid var(--color-border);
  padding: 2px 7px;
  vertical-align: middle;
  transform: translateY(-1px);
}

/* ===== GUIDES RECORDS (guides.html full-page list) ===== */
.guides-list-full .guide-row { padding: var(--space-3); }

.guides-header-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-4);
}
.guides-heading { display: flex; flex-direction: column; }
.guides-left-col { display: flex; flex-direction: column; gap: var(--space-2); }
.guides-left-col .eyebrow { margin-bottom: 0; }

/* Assignment select (left side): which game's guides are in view. Today it
   only ever lists "001 - OSRS" - future games get appended to the same
   dropdown rather than replacing it, so the current selection stays listed
   alongside the rest instead of being excluded like the division-nav's
   current-page item is. */
.assignment-select { position: relative; }
.assignment-trigger { display: inline-flex; align-items: center; gap: 8px; }
.assignment-trigger-label {
  color: var(--color-text-secondary);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.assignment-trigger-value {
  font-family: var(--font-display);
  font-size: 0.85rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--color-text);
  transition: color 0.2s ease;
}
.assignment-caret { width: 9px; height: 9px; color: var(--color-text-secondary); transition: color 0.2s ease, transform 0.2s ease; }
.assignment-select:hover .assignment-trigger-value,
.assignment-select:focus-within .assignment-trigger-value { color: #B3122B; }
.assignment-select:hover .assignment-caret,
.assignment-select:focus-within .assignment-caret,
.assignment-select.is-open .assignment-caret { color: var(--color-text); transform: rotate(180deg); }

.assignment-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 12px;
  min-width: 170px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  padding: 6px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0s linear 0.2s;
  z-index: 40;
}
.assignment-select:hover .assignment-dropdown,
.assignment-select:focus-within .assignment-dropdown,
.assignment-select.is-open .assignment-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition-delay: 0s;
}
.assignment-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  padding: 8px 10px;
  border: 1px solid transparent;
  font-family: var(--font-display);
  font-size: 0.8rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--color-text);
  transition: border-color 0.2s ease, color 0.2s ease;
}
.assignment-dropdown-item:hover, .assignment-dropdown-item:focus-visible { border-color: var(--color-border); color: #B3122B; }
.assignment-dropdown-item.is-active { color: var(--color-accent); }
.assignment-dropdown-index { color: var(--color-text-tertiary); }
.assignment-dropdown-item.is-active .assignment-dropdown-index,
.assignment-dropdown-item:hover .assignment-dropdown-index,
.assignment-dropdown-item:focus-visible .assignment-dropdown-index { color: inherit; }

/* Guide-category select (right side, next to "All Guides"): swaps which
   .guides-list panel is shown via data-category-panel. */
.guides-category-select { position: relative; display: inline-flex; align-items: center; gap: 10px; }
.guides-category-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  color: var(--color-text-secondary);
  transition: color 0.2s ease, transform 0.2s ease;
}
.guides-category-select:hover .guides-category-toggle,
.guides-category-select:focus-within .guides-category-toggle,
.guides-category-select.is-open .guides-category-toggle { color: var(--color-text); transform: rotate(180deg); }

.guides-category-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 12px;
  min-width: 220px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  padding: 6px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0s linear 0.2s;
  z-index: 40;
}
.guides-category-select:hover .guides-category-dropdown,
.guides-category-select:focus-within .guides-category-dropdown,
.guides-category-select.is-open .guides-category-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition-delay: 0s;
}
.guides-category-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 8px 10px;
  border: 1px solid transparent;
  font-family: var(--font-display);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-text);
  transition: border-color 0.2s ease, color 0.2s ease;
}
.guides-category-item:hover, .guides-category-item:focus-visible { border-color: var(--color-border); color: #B3122B; }
.guides-category-item.is-active { color: var(--color-accent); }

.guides-list-empty { border: 1px dashed var(--color-border); padding: var(--space-4); }
.guides-empty-note { color: var(--color-text-secondary); font-size: 0.9rem; }

/* Skill Mastery grid: one tile per OSRS skill, in the game's own skills-tab
   order (read left-to-right, top-to-bottom - not alphabetical). */
.skill-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-3);
  max-width: 620px;
  margin-inline: auto;
}
.skill-grid[hidden] { display: none; }
.skill-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-2);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  transition: border-color 0.2s ease;
}
.skill-tile:hover, .skill-tile:focus-visible { border-color: var(--color-accent); }
.skill-tile-icon {
  height: 64px;
  width: auto;
}
.skill-tile-label {
  font-family: var(--font-display);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-text);
}

@media (max-width: 560px) {
  .skill-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 400px; }
}

@media (max-width: 600px) {
  .guides-header-row { flex-direction: column; align-items: flex-start; }
}

/* ===== GUIDE VIEWER (PDF modal, shared) ===== */
.guide-viewer {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(5, 5, 6, 0.85);
  padding: var(--space-4);
}
.guide-viewer[hidden] { display: none; }
.guide-viewer-panel {
  position: relative;
  width: min(1400px, 96vw);
  height: min(1400px, 94vh);
  background: var(--color-surface);
  border: 1px solid var(--color-accent);
  box-shadow: 0 0 64px var(--color-accent-shadow);
  transition: transform 0.32s ease, opacity 0.32s ease;
}
.guide-viewer-panel::before, .guide-viewer-panel::after {
  content: '';
  position: absolute;
  width: 22px;
  height: 22px;
  border: 1px solid var(--color-accent);
}
.guide-viewer-panel::before { top: -1px; left: -1px; border-right: none; border-bottom: none; }
.guide-viewer-panel::after { bottom: -1px; right: -1px; border-left: none; border-top: none; }
.guide-viewer.is-opening .guide-viewer-panel,
.guide-viewer.is-closing .guide-viewer-panel {
  transform: scale(0.02);
  opacity: 0;
}
.guide-viewer-close {
  position: absolute;
  top: -18px;
  right: -18px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-bg);
  border: 1px solid var(--color-accent);
  color: var(--color-accent);
  z-index: 2;
  transition: background 0.2s ease, color 0.2s ease;
}
.guide-viewer-close:hover, .guide-viewer-close:focus-visible {
  background: var(--color-accent);
  color: var(--color-bg);
}
.guide-viewer-frame { width: 100%; height: 100%; border: none; display: block; background: #fff; }
.guide-viewer-frame[hidden] { display: none; }
.guide-viewer-pages {
  width: 100%;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  background: var(--color-bg);
}
.guide-viewer-pages[hidden] { display: none; }
.guide-viewer-pages img {
  display: block;
  width: 100%;
  height: auto;
  margin-bottom: 3px;
}
.guide-viewer-pages img:last-child { margin-bottom: 0; }
.guide-viewer-download {
  position: absolute;
  top: -18px;
  left: -18px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-bg);
  border: 1px solid var(--color-accent);
  color: var(--color-accent);
  z-index: 2;
  transition: background 0.2s ease, color 0.2s ease;
}
.guide-viewer-download:hover, .guide-viewer-download:focus-visible {
  background: var(--color-accent);
  color: var(--color-bg);
}

@media (prefers-reduced-motion: reduce) {
  .guide-viewer-panel { transition: none; }
}

/* ===== ARCHIVE CAROUSEL ===== */
.archive-carousel {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  margin-top: var(--space-4);
}
.archive-card {
  display: block;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  padding: var(--space-3);
  position: relative;
  max-width: 480px;
  width: 100%;
  transition: border-color 0.2s ease, opacity 0.2s ease;
}
.archive-card::before, .archive-card::after {
  content: '';
  position: absolute;
  width: 12px;
  height: 12px;
  border: 1px solid var(--color-accent);
}
.archive-card::before { top: -1px; left: -1px; border-right: none; border-bottom: none; }
.archive-card::after { bottom: -1px; right: -1px; border-left: none; border-top: none; }
.archive-card:hover, .archive-card:focus-visible { border-color: var(--color-accent); }
.archive-card img { width: 100%; height: auto; margin-bottom: var(--space-2); }
.archive-card-title { display: block; font-weight: 700; margin-bottom: var(--space-1); }
.archive-card-date { display: block; font-size: 0.8rem; color: var(--color-text-secondary); }

.archive-arrow {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--color-border);
  color: var(--color-accent);
  transition: border-color 0.2s ease, opacity 0.2s ease;
}
.archive-arrow svg { width: 18px; height: 18px; }
.archive-arrow:hover:not(:disabled), .archive-arrow:focus-visible:not(:disabled) { border-color: var(--color-accent); }
.archive-arrow:disabled { opacity: 0.3; cursor: default; }

.archive-counter {
  font-family: var(--font-display);
  letter-spacing: 0.05em;
  color: var(--color-text-tertiary);
  text-align: center;
  margin-top: var(--space-3);
  font-size: 0.9rem;
  transition: opacity 0.2s ease;
}

.is-transitioning.archive-carousel .archive-card,
.archive-counter.is-transitioning { opacity: 0; }

@media (max-width: 768px) {
  /* Grid (not flex-direction: column) so the two arrows can be placed
     together on their own row below the card as a group, regardless of
     their source order in the DOM - a plain column stack would split them
     with one above the card and one below. */
  .archive-carousel {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "card card"
      "prev next";
    align-items: center;
    justify-items: center;
    gap: var(--space-3);
  }
  .archive-card { grid-area: card; max-width: 100%; }
  .archive-arrow--prev { grid-area: prev; }
  .archive-arrow--next { grid-area: next; }
}

@media (prefers-reduced-motion: reduce) {
  .archive-card, .archive-counter { transition: none; }
}

/* ===== ABOUT ===== */
.about-inner { max-width: 640px; }
.about-inner p { color: var(--color-text-secondary); margin-top: var(--space-3); }
.about-est {
  display: inline-block;
  margin-top: var(--space-3);
  border: 1px solid var(--color-accent-border);
  color: var(--color-text-secondary);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: var(--space-1) var(--space-2);
}

/* ===== CONTACT / FOOTER ===== */
.site-footer { padding-block: var(--space-7); }
.footer-top { max-width: 480px; margin-bottom: var(--space-6); }
.footer-top p { color: var(--color-text-secondary); margin-top: var(--space-2); margin-bottom: var(--space-3); }
.notify-form { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.notify-form[hidden] {
  /* Author CSS beats the browser's default [hidden]{display:none} rule
     regardless of specificity, so the unconditional display:flex above
     would otherwise keep the form (and its stuck "Sending…" button)
     visibly on-screen even after JS sets the hidden attribute. */
  display: none;
}
.notify-form input {
  flex: 1;
  min-width: 200px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  color: var(--color-text);
  padding: var(--space-2);
  font-family: var(--font-body);
}
.notify-confirm { color: var(--color-accent); margin-top: var(--space-2); font-size: 0.85rem; }
.notify-error { color: var(--color-text); margin-top: var(--space-2); font-size: 0.85rem; }

.social-links { display: flex; gap: var(--space-3); margin-bottom: var(--space-6); }
.social-links a, .social-links .social-link {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--color-border);
  color: var(--color-text-secondary);
  transition: border-color 0.2s ease, color 0.2s ease;
}
.social-links a svg, .social-links .social-link svg { width: 18px; height: 18px; }
.social-links a:hover, .social-links a:focus-visible { border-color: var(--color-accent); color: var(--color-accent); }
.social-link.is-disabled { opacity: 0.35; cursor: default; }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--color-border);
  padding-top: var(--space-3);
  font-size: 0.75rem;
  color: var(--color-text-secondary);
  letter-spacing: 0.08em;
}
.logo-word-sm { font-family: var(--font-display); color: var(--color-text-secondary); }
.footer-legal { display: flex; gap: var(--space-3); }
.footer-legal a:hover, .footer-legal a:focus-visible { color: var(--color-accent); }

/* ===== POLICY PAGES (Privacy / Terms) ===== */
.policy-inner { max-width: 720px; }
.policy-inner h1 { font-size: 2rem; margin-bottom: var(--space-1); }
.policy-updated { color: var(--color-text-tertiary); font-size: 0.85rem; margin-bottom: var(--space-4); }
.policy-inner > p { color: var(--color-text-secondary); margin-bottom: var(--space-3); }
.policy-inner h2 {
  font-size: 1.1rem;
  margin-top: var(--space-5);
  margin-bottom: var(--space-2);
}
.policy-inner a { color: var(--color-accent); border-bottom: 1px solid transparent; }
.policy-inner a:hover, .policy-inner a:focus-visible { border-bottom-color: var(--color-accent); }
.policy-list { color: var(--color-text-secondary); }
.policy-list li { position: relative; padding-left: var(--space-3); margin-bottom: var(--space-2); }
.policy-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 6px;
  height: 6px;
  background: var(--color-accent);
}
.policy-list strong { color: var(--color-text); }
.policy-back { margin-top: var(--space-6); }

/* ===== MOTION ===== */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

@keyframes accent-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}
.eyebrow::before { animation: accent-pulse 2.4s ease-in-out infinite; }

@keyframes dotgrid-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .eyebrow::before { animation: none; }
  .hero-divider-line, .hero-divider-dot { animation: none; }
  .hero::after { animation: none; }
}
