/* ==========================================================================
   Trees Hate You Field Guide — "Park Ranger's Hostile Forest Manual"
   100% Bespoke Design System: Sunlit Parchment + Woodcut Ink + Picnic Check
   ========================================================================== */

:root {
  --bg-paper: #f6f1e2;
  --bg-card: #fffdf6;
  --bg-birch: #ece3cc;
  --bg-canopy: #142619;
  --bg-canopy-soft: #1d3523;
  --ink: #162a1b;
  --ink-muted: #3e5242;
  --ink-light: #f4f1e4;
  --ink-light-muted: #c9d6c2;
  --moss-logo: #d9e37b;
  --leaf: #388823;
  --leaf-dark: #256116;
  --flag-red: #d93829;
  --flag-red-dark: #a92519;
  --autumn: #df771d;
  --bark: #7a4b24;
  --bark-light: #b87c45;
  --border-ink: #162a1b;
  --shadow-ink: 4px 4px 0 #162a1b;
  --shadow-ink-sm: 2px 2px 0 #162a1b;
  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --font-display: "Fredoka", "Bricolage Grotesque", "Noto Sans JP", "Trebuchet MS", system-ui, sans-serif;
  --font-body: "Plus Jakarta Sans", "Noto Sans JP", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  --container: 1240px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: clip;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background-color: var(--bg-paper);
  background-image:
    radial-gradient(rgba(22, 42, 27, 0.055) 1px, transparent 1px);
  background-size: 22px 22px;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--leaf-dark);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--flag-red);
}

button,
input,
select {
  font: inherit;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--flag-red);
  color: #fff;
  padding: 10px 16px;
  font-weight: 700;
  z-index: 9999;
}

.skip-link:focus {
  left: 12px;
  top: 12px;
}

/* Signature Red-and-Cream Picnic Blanket Top & Footer Trim */
.picnic-trim {
  height: 10px;
  width: 100%;
  background-color: #fffdf6;
  background-image: repeating-linear-gradient(
    90deg,
    var(--flag-red) 0 14px,
    #fffdf6 14px 28px
  );
  border-bottom: 2px solid var(--border-ink);
}

.picnic-trim--top-border {
  border-top: 2px solid var(--border-ink);
}

/* Layout Containers */
.wrap {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}

/* Sticky Park Ranger Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(246, 241, 226, 0.96);
  backdrop-filter: blur(8px);
  border-bottom: 2.5px solid var(--border-ink);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 64px;
  padding: 8px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  color: var(--ink);
  flex-shrink: 0;
}

.brand-badge {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--bg-canopy);
  border: 2px solid var(--border-ink);
  box-shadow: 2px 2px 0 var(--border-ink);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
  min-width: 0;
}

.brand-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.02rem;
  letter-spacing: -0.01em;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand-sub {
  font-family: var(--font-mono);
  font-size: 0.64rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--bark);
  font-weight: 700;
  white-space: nowrap;
}

.nav-desktop {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-wrap: nowrap;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  border: 2px solid transparent;
  transition: background-color 0.14s ease, border-color 0.14s ease, transform 0.12s ease;
  white-space: nowrap;
}

.nav-link:hover {
  background: var(--bg-birch);
  border-color: var(--border-ink);
  color: var(--ink);
}

.nav-link.is-active {
  background: var(--moss-logo);
  border-color: var(--border-ink);
  box-shadow: var(--shadow-ink-sm);
  color: var(--ink);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 38px;
  padding: 0 12px;
  border-radius: 10px;
  background: var(--bg-card);
  color: var(--ink);
  border: 2px solid var(--border-ink);
  box-shadow: var(--shadow-ink-sm);
  font-weight: 700;
  font-size: 0.84rem;
  cursor: pointer;
  transition: transform 0.12s ease, background-color 0.14s ease;
}

.icon-btn:hover {
  background: var(--moss-logo);
  transform: translate(-1px, -1px);
}

.lang-select {
  height: 38px;
  padding: 0 28px 0 10px;
  border-radius: 10px;
  background: var(--bg-card);
  color: var(--ink);
  border: 2px solid var(--border-ink);
  box-shadow: var(--shadow-ink-sm);
  font-weight: 700;
  font-size: 0.82rem;
  cursor: pointer;
  max-width: 126px;
}

.menu-toggle {
  display: none;
  width: 40px;
  height: 38px;
  padding: 0;
}

/* Mobile Drawer */
.mobile-drawer {
  display: none;
  border-top: 2px solid var(--border-ink);
  background: var(--bg-card);
  padding: 14px 20px 18px;
}

.mobile-drawer.is-open {
  display: block;
}

.mobile-nav-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.mobile-nav-list .nav-link {
  justify-content: center;
  border-radius: 10px;
  border: 2px solid var(--border-ink);
  background: var(--bg-paper);
  padding: 9px 10px;
  font-size: 0.86rem;
}

.mobile-nav-list .nav-link.is-active {
  background: var(--moss-logo);
}

/* Breadcrumbs */
.breadcrumbs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 16px 0 4px;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--ink-muted);
}

.breadcrumbs a {
  color: var(--ink-muted);
  text-decoration: none;
}

.breadcrumbs a:hover {
  color: var(--flag-red);
  text-decoration: underline;
}

/* Hero Banner — Park Signpost + Deep Forest Stage */
.hero {
  padding: 26px 0 28px;
}

.hero-card {
  background: var(--bg-canopy);
  color: var(--ink-light);
  border: 3px solid var(--border-ink);
  border-radius: 22px;
  box-shadow: 6px 6px 0 var(--border-ink);
  overflow: hidden;
  position: relative;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: 28px;
  padding: 32px;
  align-items: center;
}

.signpost-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bark);
  color: #fffdf6;
  border: 2px solid #0b160e;
  border-radius: 8px;
  padding: 5px 12px;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  box-shadow: 2px 2px 0 #0b160e;
  margin-bottom: 14px;
}

.signpost-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--moss-logo);
  display: inline-block;
}

.hero h1 {
  margin: 0 0 14px;
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 3.6vw, 2.95rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--moss-logo);
  text-shadow: 2px 2px 0 #0b160e;
}

.hero-lead {
  margin: 0 0 18px;
  font-size: 1.04rem;
  color: var(--ink-light);
  line-height: 1.65;
}

/* Direct Answer Callout (Never has ads above it!) */
.direct-answer {
  background: rgba(255, 253, 246, 0.1);
  border: 2px solid rgba(217, 227, 123, 0.48);
  border-left: 6px solid var(--moss-logo);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 20px;
}

.direct-answer-label {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--moss-logo);
  margin-bottom: 4px;
}

.direct-answer p {
  margin: 0;
  font-size: 0.95rem;
  color: #f6f4ea;
}

.hero-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 18px;
  border-radius: 12px;
  font-weight: 800;
  font-size: 0.94rem;
  text-decoration: none;
  border: 2.5px solid var(--border-ink);
  box-shadow: 3px 3px 0 #0b160e;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background-color 0.14s ease;
}

.btn:hover {
  transform: translate(-1.5px, -1.5px);
  box-shadow: 4.5px 4.5px 0 #0b160e;
}

.btn-primary {
  background: var(--moss-logo);
  color: var(--ink);
}

.btn-primary:hover {
  background: #e8f092;
  color: var(--ink);
}

.btn-danger {
  background: var(--flag-red);
  color: #fff;
}

.btn-danger:hover {
  background: #eb4738;
  color: #fff;
}

.btn-ghost {
  background: var(--bg-card);
  color: var(--ink);
}

.btn-ghost:hover {
  background: var(--bg-birch);
  color: var(--ink);
}

.hero-media {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.keyart-frame {
  border-radius: 16px;
  overflow: hidden;
  border: 3px solid #0b160e;
  box-shadow: 4px 4px 0 #0b160e;
  background: #0d1a11;
  aspect-ratio: 16 / 9;
}

.keyart-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hud-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.hud-stat {
  background: var(--bg-canopy-soft);
  border: 2px solid #0b160e;
  border-radius: 11px;
  padding: 9px 10px;
  text-align: center;
}

.hud-val {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--moss-logo);
  line-height: 1.25;
  white-space: nowrap;
}

.hud-key {
  display: block;
  font-size: 0.72rem;
  color: var(--ink-light-muted);
  margin-top: 2px;
}

/* Sub-page Compact Hero */
.page-hero {
  padding: 16px 0 22px;
}

.page-hero-box {
  background: var(--bg-canopy);
  color: var(--ink-light);
  border: 3px solid var(--border-ink);
  border-radius: 20px;
  box-shadow: 5px 5px 0 var(--border-ink);
  padding: 26px 30px;
}

.page-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.7fr);
  gap: 24px;
  align-items: center;
}

.page-hero h1 {
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-size: clamp(1.65rem, 3vw, 2.4rem);
  line-height: 1.14;
  color: var(--moss-logo);
}

.page-hero-lead {
  margin: 0 0 16px;
  font-size: 1rem;
  color: var(--ink-light);
}

/* Sections & Headings */
.section {
  padding: 26px 0;
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.section-kicker {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--flag-red);
  margin-bottom: 4px;
}

.section-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2.4vw, 1.95rem);
  line-height: 1.18;
  color: var(--ink);
}

.section-sub {
  margin: 6px 0 0;
  color: var(--ink-muted);
  max-width: 72ch;
}

/* Field Manual Cards */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

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

.card-grid--4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.field-card {
  background: var(--bg-card);
  border: 2.5px solid var(--border-ink);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-ink);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.field-card--link {
  text-decoration: none;
  color: var(--ink);
  transition: transform 0.14s ease, box-shadow 0.14s ease, background-color 0.14s ease;
}

.field-card--link:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 var(--border-ink);
  background: #fff9e6;
  color: var(--ink);
}

.field-card h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.18rem;
  line-height: 1.25;
  color: var(--ink);
}

.field-card p {
  margin: 0;
  color: var(--ink-muted);
  font-size: 0.94rem;
}

.card-thumb {
  border-radius: 11px;
  overflow: hidden;
  border: 2px solid var(--border-ink);
  aspect-ratio: 16 / 9;
  background: var(--bg-birch);
}

.card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Badges & Tags */
.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 800;
  border: 1.5px solid var(--border-ink);
  background: var(--bg-birch);
  color: var(--ink);
}

.pill--green {
  background: #d7f2c4;
  color: #15400c;
}

.pill--red {
  background: #ffd8d4;
  color: #82160e;
}

.pill--amber {
  background: #ffe7c2;
  color: #6b3604;
}

.pill--dark {
  background: var(--bg-canopy);
  color: var(--moss-logo);
}

/* Filter Bar (Biome Trap Compendium & Achievements) */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
}

.filter-pill {
  padding: 7px 14px;
  border-radius: 999px;
  border: 2px solid var(--border-ink);
  background: var(--bg-card);
  color: var(--ink);
  font-weight: 700;
  font-size: 0.86rem;
  cursor: pointer;
  box-shadow: var(--shadow-ink-sm);
  transition: background-color 0.12s ease, transform 0.1s ease;
}

.filter-pill:hover {
  background: var(--bg-birch);
}

.filter-pill.is-active {
  background: var(--bg-canopy);
  color: var(--moss-logo);
}

.search-input {
  flex: 1 1 220px;
  min-width: 180px;
  height: 40px;
  padding: 0 14px;
  border-radius: 12px;
  border: 2px solid var(--border-ink);
  background: var(--bg-card);
  color: var(--ink);
  font-weight: 600;
}

/* Interactive Achievement Tracker */
.tracker-panel {
  background: var(--bg-canopy);
  color: var(--ink-light);
  border: 2.5px solid var(--border-ink);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-ink);
  padding: 18px 20px;
  margin-bottom: 18px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.tracker-progress-wrap {
  flex: 1 1 280px;
}

.tracker-numbers {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 0.92rem;
  margin-bottom: 8px;
  color: var(--moss-logo);
}

.progress-track {
  height: 14px;
  background: rgba(255, 255, 255, 0.14);
  border: 2px solid #0a140d;
  border-radius: 999px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--moss-logo), #89e049);
  transition: width 0.25s ease;
}

.ach-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.ach-card {
  background: var(--bg-card);
  border: 2.5px solid var(--border-ink);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-ink-sm);
  padding: 15px;
  display: grid;
  grid-template-columns: 60px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  transition: background-color 0.15s ease;
}

.ach-card.is-done {
  background: #eef8e5;
  border-color: var(--leaf-dark);
}

.ach-card[hidden] {
  display: none !important;
}

.ach-icon-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.ach-icon {
  width: 58px;
  height: 58px;
  border-radius: 10px;
  border: 2px solid var(--border-ink);
  object-fit: cover;
  background: #1a2d1e;
}

.ach-check {
  width: 22px;
  height: 22px;
  accent-color: var(--leaf);
  cursor: pointer;
}

.ach-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}

.ach-name {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.06rem;
  line-height: 1.25;
}

.ach-pct {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--bg-birch);
  border: 1.5px solid var(--border-ink);
  white-space: nowrap;
}

.ach-pct--rare {
  background: #ffd8d4;
  color: #82160e;
}

.ach-desc {
  margin: 0 0 8px;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--bark);
}

.ach-tip {
  margin: 0;
  font-size: 0.88rem;
  color: var(--ink-muted);
}

/* Interactive Platform Checker */
.platform-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.platform-result {
  background: var(--bg-card);
  border: 2.5px solid var(--border-ink);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-ink);
  padding: 20px;
}

.alert-box {
  border-radius: var(--radius-md);
  border: 2.5px solid var(--border-ink);
  padding: 16px 18px;
  margin: 16px 0;
  box-shadow: var(--shadow-ink-sm);
}

.alert-box--danger {
  background: #fff0ee;
  border-left: 7px solid var(--flag-red);
}

.alert-box--info {
  background: #eef7e8;
  border-left: 7px solid var(--leaf);
}

.alert-box--warn {
  background: #fff7e6;
  border-left: 7px solid var(--autumn);
}

.alert-box h3,
.alert-box h4 {
  margin: 0 0 6px;
  font-family: var(--font-display);
}

.alert-box p {
  margin: 0;
  font-size: 0.94rem;
}

/* Tables (Responsive without page overflow) */
.table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 2.5px solid var(--border-ink);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  box-shadow: var(--shadow-ink);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 560px;
}

.data-table th,
.data-table td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1.5px solid rgba(22, 42, 27, 0.16);
  font-size: 0.92rem;
  vertical-align: top;
}

.data-table th {
  background: var(--bg-canopy);
  color: var(--moss-logo);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.data-table tr:last-child td {
  border-bottom: 0;
}

/* Click-to-Play YouTube Video Theater */
.video-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.video-grid--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.yt-card {
  background: var(--bg-canopy);
  color: var(--ink-light);
  border: 2.5px solid var(--border-ink);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-ink);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.yt-stage {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #0a140d;
  overflow: hidden;
}

.yt-stage img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.86);
  transition: transform 0.25s ease, filter 0.2s ease;
}

.yt-stage:hover img {
  transform: scale(1.03);
  filter: brightness(0.96);
}

.yt-play-btn {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: radial-gradient(circle, rgba(20, 38, 25, 0.25) 0%, rgba(10, 20, 13, 0.55) 100%);
  display: grid;
  place-items: center;
  cursor: pointer;
}

.yt-play-disc {
  width: 66px;
  height: 48px;
  border-radius: 14px;
  background: var(--flag-red);
  border: 2.5px solid #fffdf6;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
  display: grid;
  place-items: center;
  transition: transform 0.15s ease, background-color 0.15s ease;
}

.yt-play-btn:hover .yt-play-disc {
  transform: scale(1.08);
  background: #f24333;
}

.yt-stage iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.yt-meta {
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.yt-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.02rem;
  line-height: 1.3;
  color: var(--moss-logo);
}

.yt-caption {
  margin: 0;
  font-size: 0.86rem;
  color: var(--ink-light-muted);
}

.yt-footer {
  margin-top: auto;
  padding-top: 8px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.82rem;
}

.yt-channel {
  font-family: var(--font-mono);
  color: var(--ink-light-muted);
}

.yt-fallback {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 8px;
  background: rgba(217, 227, 123, 0.16);
  border: 1.5px solid var(--moss-logo);
  color: var(--moss-logo);
  font-weight: 700;
  text-decoration: none;
}

.yt-fallback:hover {
  background: var(--moss-logo);
  color: var(--ink);
}

/* Interactive Crash Triage Checklist */
.triage-list {
  display: grid;
  gap: 12px;
}

.triage-item {
  background: var(--bg-card);
  border: 2.5px solid var(--border-ink);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  box-shadow: var(--shadow-ink-sm);
  cursor: pointer;
}

.triage-item.is-checked {
  background: #eef8e5;
}

.triage-item input {
  width: 20px;
  height: 20px;
  margin-top: 3px;
  accent-color: var(--leaf);
  flex-shrink: 0;
}

/* Patch Timeline */
.patch-list {
  display: grid;
  gap: 16px;
}

.patch-card {
  background: var(--bg-card);
  border: 2.5px solid var(--border-ink);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-ink);
  padding: 18px 20px;
}

.patch-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.patch-card ul {
  margin: 0;
  padding-left: 20px;
}

.patch-card li {
  margin-bottom: 5px;
  color: var(--ink-muted);
}

/* FAQ Accordion */
.faq-list {
  display: grid;
  gap: 12px;
}

.faq-item {
  background: var(--bg-card);
  border: 2.5px solid var(--border-ink);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-ink-sm);
  overflow: hidden;
}

.faq-item summary {
  list-style: none;
  padding: 15px 18px;
  font-family: var(--font-display);
  font-size: 1.04rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  font-family: var(--font-mono);
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--flag-red);
  flex-shrink: 0;
}

.faq-item[open] summary::after {
  content: "−";
}

.faq-body {
  padding: 0 18px 16px;
  color: var(--ink-muted);
  border-top: 1.5px dashed rgba(22, 42, 27, 0.22);
  padding-top: 12px;
}

/* Prose Box */
.prose-card {
  background: var(--bg-card);
  border: 2.5px solid var(--border-ink);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-ink);
  padding: 24px 26px;
}

.prose-card h2 {
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-size: 1.45rem;
}

.prose-card h3 {
  margin: 20px 0 8px;
  font-family: var(--font-display);
  font-size: 1.16rem;
}

.prose-card ul {
  padding-left: 20px;
}

.prose-card li {
  margin-bottom: 6px;
}

/* Safe Folded Adsterra Slots — Zero height when disabled, safe max-width when active */
.thy-ad-slot {
  display: none;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  margin: 0;
  padding: 0;
}

.thy-ad-slot.is-active {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 20px auto;
  padding: 10px 8px;
  background: var(--bg-birch);
  border: 2px dashed rgba(22, 42, 27, 0.3);
  border-radius: 12px;
}

.thy-ad-inner {
  max-width: 100%;
  overflow: hidden;
  display: flex;
  justify-content: center;
}

/* Search Modal */
.search-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(15, 29, 19, 0.72);
  backdrop-filter: blur(4px);
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 64px 16px 24px;
}

.search-modal.is-open {
  display: flex;
}

.search-dialog {
  width: 100%;
  max-width: 640px;
  background: var(--bg-card);
  border: 3px solid var(--border-ink);
  border-radius: 18px;
  box-shadow: 6px 6px 0 #0a140d;
  overflow: hidden;
}

.search-dialog-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  background: var(--bg-canopy);
  border-bottom: 2.5px solid var(--border-ink);
}

.search-dialog-head input {
  flex: 1;
  min-width: 0;
  height: 40px;
  padding: 0 12px;
  border-radius: 10px;
  border: 2px solid var(--moss-logo);
  background: #fffdf6;
  color: var(--ink);
  font-weight: 600;
}

.search-results {
  max-height: 60vh;
  overflow-y: auto;
  padding: 12px;
  display: grid;
  gap: 8px;
}

.search-hit {
  display: block;
  text-decoration: none;
  color: var(--ink);
  background: var(--bg-paper);
  border: 2px solid var(--border-ink);
  border-radius: 10px;
  padding: 11px 14px;
}

.search-hit:hover {
  background: var(--moss-logo);
  color: var(--ink);
}

.search-hit strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1rem;
}

.search-hit span {
  display: block;
  font-size: 0.84rem;
  color: var(--ink-muted);
}

/* Footer */
.site-footer {
  margin-top: 44px;
  background: var(--bg-canopy);
  color: var(--ink-light);
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 24px;
  padding: 36px 0 28px;
}

.footer-title {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--moss-logo);
}

.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 7px;
  font-size: 0.9rem;
}

.footer-links a {
  color: var(--ink-light-muted);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--moss-logo);
  text-decoration: underline;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  padding: 16px 0 24px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.82rem;
  color: var(--ink-light-muted);
}

/* Danger rating leaves */
.danger-dots {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--flag-red);
}

/* Responsive Breakpoints */
@media (max-width: 1360px) {
  .nav-link {
    padding: 5px 7px;
    font-size: 0.77rem;
  }
  .search-btn-label {
    display: none;
  }
  .brand-sub {
    display: none;
  }
}

@media (max-width: 1180px) {
  .nav-desktop {
    display: none;
  }
  .menu-toggle {
    display: inline-flex;
  }
}

@media (max-width: 1024px) {
  .hero-grid,
  .page-hero-grid {
    grid-template-columns: 1fr;
  }
  .card-grid,
  .card-grid--4,
  .video-grid--3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .wrap {
    padding: 0 14px;
  }
  .header-inner {
    gap: 8px;
    min-height: 58px;
  }
  .brand-badge {
    width: 34px;
    height: 34px;
  }
  .brand-title {
    font-size: 0.92rem;
  }
  .brand-sub {
    display: none;
  }
  .header-actions {
    gap: 6px;
  }
  .icon-btn {
    height: 34px;
    padding: 0 9px;
  }
  .menu-toggle {
    width: 36px;
    height: 34px;
    padding: 0;
  }
  .search-btn-label {
    display: none;
  }
  .lang-select {
    height: 34px;
    max-width: 98px;
    padding: 0 18px 0 8px;
    font-size: 0.78rem;
  }
  .hero-grid {
    padding: 20px 18px;
    gap: 18px;
  }
  .page-hero-box {
    padding: 20px 18px;
  }
  .hud-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .card-grid,
  .card-grid--2,
  .card-grid--4,
  .ach-grid,
  .video-grid,
  .video-grid--3,
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .mobile-nav-list {
    grid-template-columns: 1fr;
  }
  .prose-card {
    padding: 18px 16px;
  }
}
