/* ==========================================================================
   Create Mod Modrinth — main stylesheet
   Design seed: S09 Playful Gaming Utility Light
   Palette family: logo blue + brick + peach sand (light surfaces only)
   ========================================================================== */

:root {
  /* Surfaces */
  --paper: #f6f9fc;
  --white: #ffffff;
  --sand: #fdf1df;
  --sand-deep: #f8dcb6;
  --mist: #e8f1f9;
  --mist-deep: #d3e3f2;

  /* Brand — sampled from the logo */
  --blue: #2f6aa3;        /* logo disc */
  --blue-dark: #23527f;
  --blue-soft: #7fabc9;
  --peach: #e59a61;       /* wrench highlight */
  --maroon: #7f3a42;      /* wrench handle */
  --brick: #c24e40;       /* wrench body — download CTAs */
  --brick-dark: #a33f35;

  /* Text */
  --ink: #1a2b3f;
  --muted: #51607a;
  --line: #d7e1eb;
  --line-strong: #b6c6d6;

  /* Type */
  --font: "Poppins", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --fs-sm: 0.875rem;
  --fs-base: 1rem;
  --fs-md: 1.125rem;
  --fs-lg: 1.375rem;
  --fs-xl: clamp(1.6rem, 1.2rem + 1.6vw, 2.35rem);
  --fs-hero: clamp(2.1rem, 1.4rem + 3.1vw, 3.7rem);

  /* Geometry */
  --r-sm: 6px;
  --r-md: 14px;
  --r-lg: 26px;
  --header-h: 72px;
  --shadow-soft: 0 10px 30px -18px rgba(47, 106, 163, 0.35);
  --shadow-lift: 0 18px 40px -22px rgba(26, 43, 63, 0.45);
  --ease: cubic-bezier(0.22, 0.8, 0.26, 1);
}

/* ---------- Reset & base ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--fs-base);
  line-height: 1.7;
  color: var(--ink);
  background: var(--paper);
  overflow-x: hidden;
}

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

a { color: var(--blue); text-underline-offset: 3px; }
a:hover { color: var(--blue-dark); }

h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 0.6em; letter-spacing: -0.015em; }
h1 { font-weight: 700; }
h2 { font-size: var(--fs-xl); font-weight: 700; }
h3 { font-size: var(--fs-lg); font-weight: 600; }
p { margin: 0 0 1em; }
ul, ol { padding-left: 1.2em; }

:focus-visible {
  outline: 3px solid var(--brick);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 200;
  background: var(--white);
  color: var(--ink);
  padding: 10px 16px;
  border: 2px solid var(--blue);
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus { top: 12px; }

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

.wrap { width: min(1200px, 100% - 48px); margin-inline: auto; }
.wrap-narrow { width: min(860px, 100% - 48px); margin-inline: auto; }
.wrap-wide { width: min(1320px, 100% - 32px); margin-inline: auto; }

.sec { padding: clamp(64px, 8vw, 104px) 0; scroll-margin-top: var(--header-h); }
.sec-head { max-width: 640px; margin-bottom: 40px; }
.sec-head p { color: var(--muted); font-size: var(--fs-md); }
.sec-head--right { margin-left: auto; text-align: right; }
.lead { font-size: var(--fs-md); color: var(--muted); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font: 600 1rem/1 var(--font);
  padding: 16px 26px;
  text-decoration: none;
  border: 0;
  cursor: pointer;
  transition: transform 0.2s var(--ease), background-color 0.2s, box-shadow 0.2s;
}
.btn-dl {
  background: var(--brick);
  color: var(--white);
  clip-path: polygon(10px 0, 100% 0, calc(100% - 10px) 100%, 0 100%);
  padding-inline: 32px;
}
.btn-dl:hover { background: var(--brick-dark); color: var(--white); transform: translateY(-2px); }
.btn-dl svg { width: 18px; height: 18px; }
.btn-line {
  color: var(--blue);
  background: transparent;
  box-shadow: inset 0 0 0 2px var(--blue);
  border-radius: var(--r-sm);
}
.btn-line:hover { background: var(--mist); color: var(--blue-dark); }
.btn-lg { font-size: 1.1rem; padding: 20px 38px; }

/* Topic tags (used in guides) */
.tag {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 5px 12px;
  background: var(--blue);
  color: var(--white);
  clip-path: polygon(6px 0, 100% 0, calc(100% - 6px) 100%, 0 100%);
}
.tag--peach { background: var(--peach); color: var(--ink); }
.tag--brick { background: var(--brick); color: var(--white); }
.tag--mist { background: var(--mist-deep); color: var(--blue-dark); }

/* ==========================================================================
   Header
   ========================================================================== */
#site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
  transition: box-shadow 0.25s;
}
#site-header.is-scrolled { box-shadow: 0 8px 24px -18px rgba(26, 43, 63, 0.5); }
#site-header::after {
  /* energetic accent stripe */
  content: "";
  position: absolute;
  left: 0; bottom: -1px;
  width: 180px; height: 4px;
  background: linear-gradient(90deg, var(--brick) 0 55%, var(--peach) 55% 100%);
  clip-path: polygon(0 0, 100% 0, calc(100% - 6px) 100%, 0 100%);
}
.hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: var(--header-h);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.06rem;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}
.brand img { width: 38px; height: 38px; }
.brand:hover { color: var(--blue); }

.nav { display: flex; align-items: center; gap: 4px; }
.nav-list { list-style: none; display: flex; gap: 2px; margin: 0; padding: 0; }
.nav-list a {
  position: relative;
  display: block;
  padding: 10px 11px;
  font-size: 0.93rem;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
}
.nav-list a::after {
  content: "";
  position: absolute;
  left: 11px; right: 11px; bottom: 4px;
  height: 3px;
  background: var(--blue);
  transform: scaleX(0) skewX(-20deg);
  transform-origin: left;
  transition: transform 0.25s var(--ease);
}
.nav-list a:hover::after,
.nav-list a.is-active::after,
.nav-list a[aria-current="page"]::after { transform: scaleX(1) skewX(-20deg); }
.nav-list a.is-active,
.nav-list a[aria-current="page"] { color: var(--blue); }
.nav .btn-dl { margin-left: 10px; padding: 12px 22px; font-size: 0.93rem; }

.menu-toggle {
  display: none;
  width: 46px; height: 46px;
  background: var(--mist);
  border: 0;
  border-radius: var(--r-sm);
  cursor: pointer;
  position: relative;
}
.menu-toggle span,
.menu-toggle span::before,
.menu-toggle span::after {
  position: absolute;
  left: 12px;
  width: 22px; height: 2px;
  background: var(--ink);
  content: "";
  transition: transform 0.25s, top 0.25s, opacity 0.2s;
}
.menu-toggle span { top: 22px; }
.menu-toggle span::before { top: -7px; left: 0; }
.menu-toggle span::after { top: 7px; left: 0; }
.menu-toggle[aria-expanded="true"] span { background: transparent; }
.menu-toggle[aria-expanded="true"] span::before { top: 0; transform: rotate(45deg); }
.menu-toggle[aria-expanded="true"] span::after { top: 0; transform: rotate(-45deg); }

@media (max-width: 1060px) {
  .menu-toggle { display: block; }
  .nav {
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px 24px 24px;
    background: var(--white);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 20px 30px -24px rgba(26, 43, 63, 0.5);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.22s, transform 0.22s var(--ease), visibility 0s 0.22s;
  }
  .nav.is-open { opacity: 1; visibility: visible; transform: none; transition: opacity 0.22s, transform 0.22s var(--ease); }
  .nav-list { flex-direction: column; }
  .nav-list a { padding: 12px 4px; border-bottom: 1px solid var(--line); }
  .nav-list a::after { left: 4px; right: auto; width: 40px; bottom: 6px; }
  .nav .btn-dl { margin: 16px 0 0; justify-content: center; }
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  position: relative;
  padding: clamp(48px, 7vw, 88px) 0 clamp(56px, 8vw, 100px);
  overflow: hidden;
}
.hero::before {
  /* angled sand plate behind illustration */
  content: "";
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: 46%;
  background: var(--sand);
  clip-path: polygon(22% 0, 100% 0, 100% 100%, 0 100%);
  z-index: -1;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.12fr 0.88fr;
  gap: clamp(28px, 4vw, 56px);
  align-items: center;
}
.hero h1 { font-size: var(--fs-hero); letter-spacing: -0.03em; max-width: 13ch; margin-bottom: 0.45em; }
.hero-copy .lead { max-width: 52ch; font-size: 1.15rem; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin: 30px 0 34px; }
.hero-specs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 26px;
  padding: 0;
  margin: 0;
  list-style: none;
  font-size: var(--fs-sm);
  color: var(--muted);
}
.hero-specs li { display: flex; align-items: center; gap: 8px; }
.hero-specs li::before {
  content: "";
  width: 10px; height: 10px;
  background: var(--blue);
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
}
.hero-art { position: relative; }
.hero-art img { width: 100%; }
.float-badge {
  position: absolute;
  background: var(--white);
  border: 2px solid var(--ink);
  padding: 8px 14px;
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.3;
  box-shadow: 4px 4px 0 var(--peach);
  animation: badge-bob 6s ease-in-out infinite;
}
.float-badge small { display: block; font-weight: 500; color: var(--muted); }
.float-badge--a { top: 4%; left: -4%; transform: rotate(-3deg); }
.float-badge--b { top: 38%; right: -3%; box-shadow: 4px 4px 0 var(--brick); animation-delay: -2s; }
.float-badge--c { bottom: 6%; left: 8%; box-shadow: 4px 4px 0 var(--blue-soft); animation-delay: -4s; }
@keyframes badge-bob { 0%, 100% { translate: 0 0; } 50% { translate: 0 -8px; } }

@media (max-width: 900px) {
  .hero::before { width: 100%; top: auto; height: 46%; clip-path: polygon(0 18%, 100% 0, 100% 100%, 0 100%); }
  .hero-grid { grid-template-columns: 1fr; }
  .hero h1 { max-width: 18ch; }
  .hero-art { max-width: 520px; margin-inline: auto; }
  .float-badge--a { left: 0; }
  .float-badge--b { right: 0; }
}
@media (max-width: 520px) {
  .float-badge { font-size: 0.72rem; padding: 6px 10px; }
  .hero-cta .btn { width: 100%; justify-content: center; }
}

/* ==========================================================================
   About — infographic
   ========================================================================== */
.about { background: var(--white); border-block: 1px solid var(--line); }
.about-top {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
}
.about-figure {
  background: var(--mist);
  padding: 22px;
  clip-path: polygon(0 0, 100% 6%, 100% 100%, 4% 94%);
}
.about-text p { max-width: 60ch; }
.flow {
  list-style: none;
  padding: 0;
  margin: 52px 0 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}
.flow li {
  position: relative;
  padding: 22px 38px 22px 30px;
  background: var(--sand);
  clip-path: polygon(0 0, calc(100% - 22px) 0, 100% 50%, calc(100% - 22px) 100%, 0 100%, 22px 50%);
}
.flow li:first-child { clip-path: polygon(0 0, calc(100% - 22px) 0, 100% 50%, calc(100% - 22px) 100%, 0 100%); }
.flow li:nth-child(2) { background: var(--mist-deep); }
.flow li:nth-child(3) { background: var(--sand-deep); }
.flow li:nth-child(4) { background: var(--blue); color: var(--white); }
.flow strong { display: block; font-size: 1.02rem; }
.flow span { font-size: var(--fs-sm); opacity: 0.9; }
.fact-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin: 34px 0 0;
  border-top: 2px solid var(--ink);
}
.fact-strip div { padding: 16px 18px 0 0; }
.fact-strip dt { font-size: var(--fs-sm); color: var(--muted); }
.fact-strip dd { margin: 0; font-weight: 600; }

@media (max-width: 900px) {
  .about-top { grid-template-columns: 1fr; }
  .flow, .fact-strip { grid-template-columns: repeat(2, 1fr); }
  .flow li, .flow li:first-child { clip-path: none; border-radius: var(--r-sm); padding: 18px; }
}
@media (max-width: 520px) {
  .flow, .fact-strip { grid-template-columns: 1fr; }
}

/* ==========================================================================
   Features — zigzag panels
   ========================================================================== */
.features { position: relative; }
.zig { position: relative; display: grid; gap: 22px; }
.zig::before {
  /* dashed spine */
  content: "";
  position: absolute;
  top: 20px; bottom: 20px; left: 50%;
  border-left: 3px dashed var(--line-strong);
}
.zig-item {
  position: relative;
  width: min(620px, 58%);
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 20px;
  align-items: start;
  padding: 26px 28px;
  background: var(--white);
  border: 2px solid var(--line);
  border-radius: var(--r-md);
}
.zig-item:nth-child(odd) { justify-self: start; border-left: 6px solid var(--blue); }
.zig-item:nth-child(even) { justify-self: end; border-right: 6px solid var(--peach); border-radius: var(--r-lg) var(--r-sm) var(--r-lg) var(--r-sm); }
.zig-item:nth-child(3n) { background: var(--mist); border-color: var(--mist-deep); }
.zig-item h3 { font-size: 1.2rem; margin-bottom: 0.35em; }
.zig-item p { margin: 0; color: var(--muted); }
.zig-ico {
  width: 76px; height: 76px;
  display: grid;
  place-items: center;
  background: var(--sand);
}
.zig-ico svg { width: 38px; height: 38px; }
.ico-hex { clip-path: polygon(25% 4%, 75% 4%, 100% 50%, 75% 96%, 25% 96%, 0 50%); }
.ico-circle { border-radius: 50%; background: var(--mist-deep); }
.ico-diamond { clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); background: #fde3c3; }
.ico-notch { clip-path: polygon(0 0, 78% 0, 100% 22%, 100% 100%, 0 100%); }
.ico-tilt { transform: rotate(-8deg); border-radius: var(--r-md); background: #fde3c3; }

@media (max-width: 820px) {
  .zig::before { left: 18px; }
  .zig-item, .zig-item:nth-child(even) { width: auto; justify-self: stretch; margin-left: 36px; grid-template-columns: 56px 1fr; }
  .zig-ico { width: 56px; height: 56px; }
  .zig-ico svg { width: 28px; height: 28px; }
}

@media (max-width: 520px) {
  .zig-item, .zig-item:nth-child(even) { grid-template-columns: 1fr; gap: 12px; padding: 20px; margin-left: 28px; }
  .zig::before { left: 12px; }
}

/* ==========================================================================
   How It Works — progress path
   ========================================================================== */
.quest-sec { background: var(--mist); overflow: hidden; }
.quest-wrap { position: relative; }
.quest { position: relative; z-index: 1; list-style: none; padding: 0; margin: 10px 0 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 18px; }
.quest::before {
  /* the path: one horizontal line through the top nodes */
  content: "";
  position: absolute;
  top: 38px; left: 32px;
  right: calc((100% - 72px) / 5 - 32px);
  border-top: 3px dashed var(--blue-soft);
  z-index: -1;
}
.quest li:nth-child(even)::after {
  /* branch down to the lower nodes */
  content: "";
  position: absolute;
  left: 31px; top: -52px;
  height: 58px;
  border-left: 3px dashed var(--blue-soft);
  z-index: -1;
}
.quest li { position: relative; padding-top: 6px; }
.quest li:nth-child(even) { margin-top: 90px; }
.quest-node {
  display: grid;
  place-items: center;
  width: 64px; height: 64px;
  font-size: 1.4rem;
  font-weight: 700;
  background: var(--white);
  color: var(--blue);
  border: 3px solid var(--blue);
  clip-path: polygon(25% 4%, 75% 4%, 100% 50%, 75% 96%, 25% 96%, 0 50%);
  margin-bottom: 16px;
}
.quest li:last-child .quest-node { background: var(--brick); border-color: var(--brick); color: var(--white); }
.quest-level { font-size: var(--fs-sm); font-weight: 600; color: var(--maroon); }
.quest h3 { font-size: 1.1rem; margin: 2px 0 6px; }
.quest p { font-size: 0.95rem; color: var(--muted); margin: 0; }

@media (max-width: 960px) {
  .quest::before, .quest li:nth-child(even)::after { display: none; }
  .quest { grid-template-columns: 1fr; gap: 0; }
  .quest li, .quest li:nth-child(even) { margin: 0; display: grid; grid-template-columns: 64px 1fr; gap: 0 18px; padding-bottom: 28px; }
  .quest li::before { content: ""; position: absolute; left: 31px; top: 70px; bottom: 0; border-left: 3px dashed var(--blue-soft); }
  .quest li:last-child::before { display: none; }
  .quest-node { grid-row: span 3; margin: 0; }
}

/* ==========================================================================
   Use cases — mosaic
   ========================================================================== */
.mosaic {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-auto-rows: minmax(150px, auto);
  gap: 14px;
}
.tile { padding: 26px; border-radius: var(--r-sm); position: relative; overflow: hidden; }
.tile h3 { font-size: 1.12rem; margin-bottom: 0.4em; }
.tile p { margin: 0; font-size: 0.95rem; color: var(--muted); }
.tile--a { grid-column: span 6; grid-row: span 2; background: var(--blue); color: var(--white); border-radius: var(--r-lg) var(--r-sm) var(--r-sm) var(--r-sm); }
.tile--a p { color: #e6f0f9; }
.tile--a h3 { font-size: 1.5rem; }
.tile--b { grid-column: span 6; background: var(--sand); }
.tile--c { grid-column: span 6; background: var(--white); border: 2px solid var(--line); }
.tile--d { grid-column: span 3; background: #fde3c3; }
.tile--e { grid-column: span 4; background: var(--white); border: 2px dashed var(--line-strong); }
.tile--f { grid-column: span 5; background: var(--mist-deep); }
.tile--a::after {
  content: "";
  position: absolute;
  right: -40px; bottom: -40px;
  width: 190px; height: 190px;
  border: 22px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
}
@media (max-width: 900px) {
  .mosaic { grid-template-columns: repeat(2, 1fr); }
  .tile--a, .tile--b, .tile--f { grid-column: span 2; grid-row: auto; }
  .tile--c, .tile--d, .tile--e { grid-column: span 1; }
}
@media (max-width: 520px) {
  .mosaic { grid-template-columns: 1fr; }
  .mosaic .tile { grid-column: auto; }
}

/* ==========================================================================
   Compatibility — matrix
   ========================================================================== */
.compat-grid { display: grid; grid-template-columns: 0.75fr 1.25fr; gap: clamp(24px, 4vw, 56px); align-items: start; }
.compat-note {
  margin-top: 26px;
  padding: 18px 20px;
  background: var(--sand);
  border-left: 5px solid var(--peach);
  font-size: 0.95rem;
}
.table-scroll { overflow-x: auto; border: 2px solid var(--ink); border-radius: var(--r-sm); background: var(--white); }
.matrix { width: 100%; border-collapse: collapse; min-width: 560px; }
.matrix th, .matrix td { text-align: left; padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: top; font-size: 0.95rem; }
.matrix thead th { background: var(--mist); font-size: var(--fs-sm); font-weight: 700; }
.matrix tbody th { font-weight: 600; }
.matrix tr:last-child th, .matrix tr:last-child td { border-bottom: 0; }
.status { display: inline-block; white-space: nowrap; font-size: 0.8rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.status--yes { background: #d5eee3; color: #0b5a3c; }
.status--port { background: #fde3c3; color: #7f3a42; }
.status--check { background: var(--sand-deep); color: var(--maroon); }
.status--no { background: #f6d9d6; color: #8a211a; }
@media (max-width: 900px) { .compat-grid { grid-template-columns: 1fr; } }

/* ==========================================================================
   Guides preview — energetic tiles (home) & guide listing
   ========================================================================== */
.gtiles { display: grid; grid-template-columns: repeat(12, 1fr); gap: 18px; }
.gtile {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 2px solid var(--line);
  text-decoration: none;
  color: var(--ink);
  overflow: hidden;
  transition: transform 0.25s var(--ease), border-color 0.25s, box-shadow 0.25s;
}
.gtile:hover { transform: translateY(-4px); border-color: var(--blue); box-shadow: var(--shadow-lift); color: var(--ink); }
.gtile-img { background: var(--mist); overflow: hidden; }
.gtile-img img { width: 100%; height: 100%; object-fit: cover; }
.gtile-body { padding: 20px 22px 24px; }
.gtile-body h2, .gtile-body h3 { font-size: 1.1rem; margin: 12px 0 8px; }
.gtile-body p { margin: 0; font-size: 0.93rem; color: var(--muted); }
.gtile--big { grid-column: span 6; grid-row: span 2; border-radius: var(--r-lg) var(--r-sm) var(--r-sm) var(--r-sm); }
.gtile--big .gtile-img { flex: 1; min-height: 280px; }
.gtile--big h2, .gtile--big h3 { font-size: 1.45rem; }
.gtile--wide { grid-column: span 6; flex-direction: row; }
.gtile--wide .gtile-img { flex: 0 0 44%; min-height: 220px; }
.gtile--wide .gtile-img img { object-position: 65% center; }
.gtile--half { grid-column: span 3; }
.gtile--half .gtile-img { aspect-ratio: 16 / 10; }
.gtile--third { grid-column: span 4; }
.gtile--third .gtile-img { aspect-ratio: 16 / 9; }
.gtile--tall { grid-column: span 4; }
.gtile--tall .gtile-img { aspect-ratio: 5 / 4; }
.guides-more { margin-top: 30px; }
@media (max-width: 960px) {
  .gtile--big, .gtile--wide { grid-column: span 12; }
  .gtile--half, .gtile--third, .gtile--tall { grid-column: span 6; }
}
@media (max-width: 600px) {
  .gtile--half, .gtile--third, .gtile--tall { grid-column: span 12; }
  .gtile--wide { flex-direction: column; }
  .gtile--wide .gtile-img { aspect-ratio: 16 / 9; min-height: 0; }
  .gtile--big .gtile-img { flex: none; aspect-ratio: 16 / 10; min-height: 0; }
}

/* ==========================================================================
   Pros & cons — versus
   ========================================================================== */
.versus { display: grid; grid-template-columns: 1fr auto 1fr; gap: 0 26px; align-items: stretch; }
.versus-col { background: var(--white); border: 2px solid var(--line); padding: 0 0 12px; }
.versus-col h3 {
  margin: 0;
  padding: 16px 26px;
  font-size: 1.15rem;
  color: var(--white);
  background: var(--blue);
  clip-path: polygon(0 0, 100% 0, 94% 100%, 0 100%);
}
.versus-col--cons h3 { background: var(--peach); color: var(--ink); clip-path: polygon(0 0, 100% 0, 100% 100%, 6% 100%); text-align: right; }
.versus-col ul { list-style: none; margin: 0; padding: 10px 26px; }
.versus-col li { position: relative; padding: 12px 0 12px 34px; border-bottom: 1px dashed var(--line); }
.versus-col li:last-child { border-bottom: 0; }
.versus-col li::before {
  position: absolute; left: 0; top: 13px;
  width: 22px; height: 22px;
  display: grid; place-items: center;
  font-weight: 700; line-height: 1;
  border-radius: 50%;
}
.versus-col--pros li::before { content: "+"; background: #d5eee3; color: #0b5a3c; }
.versus-col--cons li::before { content: "\2212"; background: #f6d9d6; color: #8a211a; }
.versus-mid {
  align-self: center;
  width: 60px; height: 60px;
  display: grid; place-items: center;
  font-weight: 700;
  background: var(--brick);
  color: var(--white);
  clip-path: polygon(25% 4%, 75% 4%, 100% 50%, 75% 96%, 25% 96%, 0 50%);
}
@media (max-width: 860px) {
  .versus { grid-template-columns: 1fr; gap: 18px; }
  .versus-mid { justify-self: center; }
}

/* ==========================================================================
   Installation — two-track timeline
   ========================================================================== */
.setup-sec { background: var(--white); border-block: 1px solid var(--line); }
.tracks { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(22px, 4vw, 60px); }
.track h3 { display: flex; align-items: center; gap: 12px; font-size: 1.2rem; }
.track-badge { font-size: 0.78rem; padding: 4px 10px; border-radius: 999px; background: var(--mist); color: var(--blue-dark); font-weight: 700; }
.track--b .track-badge { background: #fde3c3; color: #7f3a42; }
.steps { list-style: none; counter-reset: step; margin: 20px 0 0; padding: 0; }
.steps li { position: relative; counter-increment: step; padding: 0 0 24px 58px; }
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0; top: 0;
  width: 38px; height: 38px;
  display: grid; place-items: center;
  font-weight: 700;
  background: var(--blue);
  color: var(--white);
  border-radius: var(--r-sm);
  transform: rotate(-6deg);
}
.track--b .steps li::before { background: var(--peach); color: var(--ink); transform: rotate(6deg); }
.steps li::after { content: ""; position: absolute; left: 18px; top: 44px; bottom: 6px; border-left: 2px solid var(--line); }
.steps li:last-child::after { display: none; }
.steps strong { display: block; }
.steps span { color: var(--muted); font-size: 0.95rem; }
code {
  font-family: Consolas, "Cascadia Mono", Menlo, monospace;
  font-size: 0.9em;
  background: var(--mist);
  padding: 2px 6px;
  border-radius: 4px;
  word-break: break-word;
}
@media (max-width: 860px) { .tracks { grid-template-columns: 1fr; } }

/* ==========================================================================
   Download band
   ========================================================================== */
.dl-band {
  position: relative;
  background: var(--sand);
  clip-path: polygon(0 4%, 100% 0, 100% 96%, 0 100%);
  padding: clamp(80px, 10vw, 130px) 0;
  scroll-margin-top: var(--header-h);
}
.dl-band::before,
.dl-band::after {
  content: "";
  position: absolute;
  border: 3px solid var(--sand-deep);
  pointer-events: none;
}
.dl-band::before { width: 220px; height: 220px; left: -60px; top: 18%; transform: rotate(18deg); }
.dl-band::after { width: 120px; height: 120px; right: 6%; bottom: 12%; border-radius: 50%; border-color: #f3cfa0; }
.dl-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 0.8fr 1.2fr; gap: clamp(24px, 5vw, 70px); align-items: center; }
.dl-visual { background: var(--white); padding: 18px; border: 2px solid var(--ink); box-shadow: 10px 10px 0 var(--brick); }
.dl-content h2 { font-size: clamp(1.8rem, 1.3rem + 2vw, 2.7rem); }
.dl-meta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 28px; margin: 24px 0 30px; }
.dl-meta div { border-top: 2px solid var(--ink); padding-top: 8px; }
.dl-meta dt { font-size: var(--fs-sm); color: var(--muted); }
.dl-meta dd { margin: 0; font-weight: 600; }
.dl-note { margin-top: 22px; font-size: 0.9rem; color: var(--muted); max-width: 60ch; }
@media (max-width: 860px) {
  .dl-grid { grid-template-columns: 1fr; }
  .dl-visual { max-width: 380px; }
  .dl-band { clip-path: polygon(0 2%, 100% 0, 100% 98%, 0 100%); }
}
@media (max-width: 520px) { .dl-meta { grid-template-columns: 1fr; } .dl-content .btn { width: 100%; justify-content: center; } }

/* ==========================================================================
   Release information — typographic
   ========================================================================== */
.release-grid { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: clamp(24px, 5vw, 80px); }
.release-statement { font-size: clamp(1.3rem, 1rem + 1.2vw, 1.85rem); font-weight: 500; line-height: 1.45; letter-spacing: -0.01em; }
.release-statement strong { font-weight: 700; }
.spec-list { margin: 0; }
.spec-list div { display: grid; grid-template-columns: 130px 1fr; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--line-strong); }
.spec-list div:first-child { border-top: 3px solid var(--ink); }
.spec-list dt { color: var(--muted); font-size: 0.92rem; }
.spec-list dd { margin: 0; font-weight: 600; word-break: break-word; }
@media (max-width: 860px) { .release-grid { grid-template-columns: 1fr; } }

/* ==========================================================================
   Troubleshooting — problem / fix rows
   ========================================================================== */
.fixes-sec { background: var(--white); border-top: 1px solid var(--line); }
.fix-rows { border-top: 2px solid var(--ink); }
.fix-row { display: grid; grid-template-columns: 44px 0.9fr 1.5fr; gap: 18px; padding: 22px 0; border-bottom: 1px solid var(--line); align-items: start; }
.fix-ico { width: 40px; height: 40px; display: grid; place-items: center; background: #fde3c3; border-radius: 50% 50% 50% 8px; }
.fix-ico svg { width: 20px; height: 20px; }
.fix-row h3 { font-size: 1.05rem; margin: 6px 0 0; }
.fix-row p { margin: 0; color: var(--muted); }
@media (max-width: 760px) {
  .fix-row { grid-template-columns: 44px 1fr; }
  .fix-row p { grid-column: 2; }
}

/* ==========================================================================
   Safety notice
   ========================================================================== */
.safety-box {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 26px;
  padding: clamp(26px, 4vw, 44px);
  background: var(--mist);
  border: 2px solid var(--blue);
  border-radius: var(--r-sm) var(--r-lg) var(--r-sm) var(--r-lg);
}
.safety-mark { width: 70px; height: 70px; display: grid; place-items: center; background: var(--white); border: 2px solid var(--blue); clip-path: polygon(50% 0, 100% 25%, 100% 72%, 50% 100%, 0 72%, 0 25%); }
.safety-mark svg { width: 34px; height: 34px; }
.safety-box h2 { font-size: 1.6rem; }
.safety-box p:last-child { margin-bottom: 0; }
@media (max-width: 600px) { .safety-box { grid-template-columns: 1fr; } }

/* ==========================================================================
   FAQ — bold accordion cards with category banners
   ========================================================================== */
.faq-sec { background: var(--paper); }
.faq-cat + .faq-cat { margin-top: 56px; }
.faq-banner {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 26px;
  margin-bottom: 18px;
  background: var(--blue);
  color: var(--white);
  clip-path: polygon(0 0, 100% 0, calc(100% - 26px) 100%, 0 100%);
}
.faq-banner h3 { margin: 0; font-size: 1.25rem; }
.faq-banner p { margin: 0; font-size: 0.9rem; opacity: 0.88; }
.faq-banner svg { width: 40px; height: 40px; flex: none; }
.faq-cat--b .faq-banner { background: var(--peach); color: var(--ink); clip-path: polygon(26px 0, 100% 0, 100% 100%, 0 100%); justify-content: flex-end; text-align: right; }
.faq-list { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; align-items: start; }
.faq-item { background: var(--white); border: 2px solid var(--line); border-radius: var(--r-md); transition: border-color 0.2s, box-shadow 0.2s; }
.faq-item.is-open { border-color: var(--blue); box-shadow: 5px 5px 0 var(--mist-deep); }
.faq-cat--b .faq-item.is-open { border-color: var(--peach); box-shadow: 5px 5px 0 var(--sand-deep); }
.faq-q { margin: 0; font-size: 1rem; }
.faq-q button {
  width: 100%;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  font: 600 1rem/1.45 var(--font);
  color: var(--ink);
  text-align: left;
  background: none;
  border: 0;
  cursor: pointer;
  border-radius: var(--r-md);
}
.faq-q button:hover { color: var(--blue); }
.faq-toggle { flex: none; position: relative; width: 26px; height: 26px; margin-top: 1px; background: var(--mist); border-radius: 50%; transition: transform 0.3s var(--ease), background-color 0.2s; }
.faq-toggle::before, .faq-toggle::after { content: ""; position: absolute; left: 7px; top: 12px; width: 12px; height: 2px; background: var(--blue-dark); }
.faq-toggle::after { transform: rotate(90deg); transition: transform 0.3s var(--ease); }
.faq-q button[aria-expanded="true"] .faq-toggle { background: var(--brick); transform: rotate(180deg); }
.faq-q button[aria-expanded="true"] .faq-toggle::after { transform: rotate(0); }
.faq-q button[aria-expanded="true"] .faq-toggle::before,
.faq-q button[aria-expanded="true"] .faq-toggle::after { background: var(--white); }
.faq-panel { max-height: 0; overflow: hidden; visibility: hidden; transition: max-height 0.32s var(--ease), visibility 0s linear 0.32s; }
.faq-panel.is-open { visibility: visible; transition: max-height 0.32s var(--ease), visibility 0s; }
.faq-panel p { margin: 0; padding: 0 20px 20px; color: var(--muted); }
@media (max-width: 860px) { .faq-list { grid-template-columns: 1fr; } }

/* ==========================================================================
   Footer — light geometric
   ========================================================================== */
#site-footer { position: relative; background: var(--white); border-top: 1px solid var(--line); overflow: hidden; }
.ftr-shapes { position: absolute; right: -40px; top: -30px; width: 360px; opacity: 0.55; pointer-events: none; }
.ftr { position: relative; display: grid; grid-template-columns: 1.4fr 0.8fr 1.1fr 0.9fr; gap: 36px; padding: 64px 0 40px; }
.ftr h2 { font-size: 0.98rem; margin-bottom: 14px; }
.ftr ul { list-style: none; padding: 0; margin: 0; }
.ftr li { margin-bottom: 8px; }
.ftr a { color: var(--ink); text-decoration: none; font-size: 0.94rem; }
.ftr a:hover { color: var(--blue); text-decoration: underline; }
.ftr-about p { color: var(--muted); font-size: 0.94rem; max-width: 38ch; }
.ftr-email { font-size: 0.94rem; }
.ftr-email span { font-weight: 600; }
.ftr .btn-dl { margin-top: 6px; padding: 12px 22px; font-size: 0.92rem; }
.ftr .btn-dl:hover { text-decoration: none; }
.ftr-bottom { position: relative; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; padding: 20px 0 28px; border-top: 2px solid var(--ink); font-size: 0.88rem; color: var(--muted); }
.ftr-bottom a { color: var(--blue); text-decoration: none; font-weight: 600; }
.ftr-bottom a:hover { text-decoration: underline; }
@media (max-width: 900px) { .ftr { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .ftr { grid-template-columns: 1fr; } }

/* Scroll-to-top */
.to-top {
  position: fixed;
  right: 20px; bottom: 20px;
  z-index: 90;
  width: 48px; height: 48px;
  display: grid; place-items: center;
  background: var(--blue);
  color: var(--white);
  border: 0;
  cursor: pointer;
  clip-path: polygon(25% 4%, 75% 4%, 100% 50%, 75% 96%, 25% 96%, 0 50%);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.25s, transform 0.25s var(--ease), visibility 0s 0.25s;
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; transition: opacity 0.25s, transform 0.25s var(--ease); }
.to-top:hover { background: var(--blue-dark); }
.to-top svg { width: 20px; height: 20px; }

/* ==========================================================================
   Inner pages
   ========================================================================== */
.page-hero { position: relative; padding: clamp(46px, 6vw, 80px) 0 clamp(36px, 5vw, 56px); overflow: hidden; }
.page-hero::before {
  content: "";
  position: absolute;
  right: -6%; top: -30%;
  width: 44%; height: 160%;
  background: var(--sand);
  transform: skewX(-16deg);
  z-index: -1;
}
.page-hero h1 { font-size: clamp(2rem, 1.4rem + 2.4vw, 3.1rem); max-width: 20ch; letter-spacing: -0.025em; }
.page-hero .lead { max-width: 60ch; }
.crumbs { font-size: var(--fs-sm); color: var(--muted); margin-bottom: 18px; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 0; }
.crumbs li:not(:last-child)::after { content: "/"; margin-left: 6px; color: var(--line-strong); }
.crumbs a { color: var(--muted); }

.prose { max-width: 72ch; }
.prose h2 { font-size: 1.55rem; margin-top: 1.8em; scroll-margin-top: calc(var(--header-h) + 16px); }
.prose h3 { font-size: 1.18rem; margin-top: 1.4em; }
.prose ul li, .prose ol li { margin-bottom: 0.45em; }
.prose a { font-weight: 500; }

/* About page */
.about-page-grid { display: grid; grid-template-columns: 1.3fr 0.7fr; gap: clamp(24px, 5vw, 70px); padding-bottom: 80px; }
.principles { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.principles li { padding: 18px 20px; background: var(--white); border: 2px solid var(--line); border-left: 6px solid var(--blue); }
.principles li:nth-child(even) { border-left-color: var(--peach); }
.principles strong { display: block; }
@media (max-width: 860px) { .about-page-grid { grid-template-columns: 1fr; } }

/* Contact page */
.contact-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border: 2px solid var(--ink);
  background: var(--white);
  margin-bottom: 80px;
}
.contact-mail { padding: clamp(26px, 4vw, 44px); background: var(--mist); }
.contact-mail .email-plain { display: inline-block; margin-top: 8px; font-size: clamp(1.1rem, 0.9rem + 1vw, 1.5rem); font-weight: 700; color: var(--ink); word-break: break-all; user-select: all; }
.contact-reasons { padding: clamp(26px, 4vw, 44px); }
.contact-reasons ul { padding-left: 1.1em; }
@media (max-width: 760px) { .contact-card { grid-template-columns: 1fr; } }

/* Legal pages */
.legal-layout { display: grid; grid-template-columns: 240px 1fr; gap: clamp(24px, 5vw, 64px); padding-bottom: 80px; align-items: start; }
.legal-toc { position: sticky; top: calc(var(--header-h) + 20px); padding: 18px; background: var(--white); border: 2px solid var(--line); border-radius: var(--r-sm); font-size: 0.92rem; }
.legal-toc h2 { font-size: 0.95rem; margin-bottom: 10px; }
.legal-toc ol { margin: 0; padding-left: 1.2em; }
.legal-toc li { margin-bottom: 6px; }
.legal-toc a { color: var(--ink); text-decoration: none; }
.legal-toc a:hover { color: var(--blue); }
.callout { padding: 18px 22px; margin: 22px 0; background: var(--sand); border-left: 5px solid var(--peach); }
.callout--blue { background: var(--mist); border-left-color: var(--blue); }
.clauses { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding-bottom: 80px; }
.clause { padding: 22px 24px; background: var(--white); border: 2px solid var(--line); border-radius: var(--r-sm); }
.clause:nth-child(4n+1) { border-top: 5px solid var(--blue); }
.clause:nth-child(4n+2) { border-top: 5px solid var(--peach); }
.clause:nth-child(4n+3) { border-top: 5px solid var(--blue-soft); }
.clause:nth-child(4n) { border-top: 5px solid var(--brick); }
.clause h2 { font-size: 1.1rem; }
.clause p:last-child { margin-bottom: 0; }
@media (max-width: 860px) {
  .legal-layout, .clauses { grid-template-columns: 1fr; }
  .legal-toc { position: static; }
}

/* ==========================================================================
   Blog listing
   ========================================================================== */
.blog-hub { padding-bottom: 90px; }
.blog-hub .gtiles { grid-auto-flow: dense; }
.blog-intro-strip { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }

/* ==========================================================================
   Blog post
   ========================================================================== */
.post-hero { padding: clamp(40px, 5vw, 64px) 0 20px; position: relative; }
.post-hero::before { content: ""; position: absolute; left: 0; top: 0; width: 34%; height: 100%; background: var(--mist); clip-path: polygon(0 0, 100% 0, 70% 100%, 0 100%); z-index: -1; }
.post-hero h1 { font-size: clamp(1.9rem, 1.35rem + 2.2vw, 2.9rem); max-width: 24ch; letter-spacing: -0.025em; margin-top: 14px; }
.post-hero .lead { max-width: 62ch; }
.post-figure { margin: 20px 0 0; border: 2px solid var(--ink); background: var(--white); box-shadow: 10px 10px 0 var(--sand-deep); }
.post-figure img { width: 100%; }
.post-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: clamp(28px, 4vw, 56px); padding: 50px 0 90px; align-items: start; }
.post-body { max-width: 72ch; }
.post-body h2 { font-size: 1.55rem; margin-top: 1.8em; scroll-margin-top: calc(var(--header-h) + 16px); padding-left: 16px; border-left: 5px solid var(--brick); }
.post-body h3 { font-size: 1.15rem; margin-top: 1.3em; }
.post-body li { margin-bottom: 0.45em; }
.post-body .callout p:last-child { margin-bottom: 0; }
.post-meta { font-size: var(--fs-sm); color: var(--muted); display: flex; gap: 18px; flex-wrap: wrap; }

.sidebar { position: sticky; top: calc(var(--header-h) + 20px); display: grid; gap: 18px; }
.side-box { background: var(--white); border: 2px solid var(--line); padding: 20px; font-size: 0.93rem; }
.side-box h2 { font-size: 1rem; margin-bottom: 12px; }
.side-box ol, .side-box ul { margin: 0; padding-left: 1.1em; }
.side-box li { margin-bottom: 7px; }
.side-box a { color: var(--ink); text-decoration: none; }
.side-box a:hover { color: var(--blue); text-decoration: underline; }
.side-box--facts { background: var(--sand); border-color: var(--sand-deep); }
.side-box--facts dl { margin: 0; }
.side-box--facts dt { font-size: 0.82rem; color: var(--muted); }
.side-box--facts dd { margin: 0 0 10px; font-weight: 600; }
.side-box--dl { background: var(--mist); border: 2px solid var(--blue); clip-path: polygon(0 0, 100% 0, 100% calc(100% - 18px), calc(100% - 18px) 100%, 0 100%); }
.side-box--dl p { margin-bottom: 14px; }
.side-box--dl .btn-dl { padding: 12px 20px; font-size: 0.92rem; }

.related { margin-top: 56px; padding-top: 28px; border-top: 2px solid var(--ink); }
.related-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; list-style: none; padding: 0; margin: 16px 0 0; }
.related-list a { display: block; height: 100%; padding: 16px 18px; background: var(--white); border: 2px solid var(--line); text-decoration: none; color: var(--ink); font-weight: 600; font-size: 0.95rem; transition: border-color 0.2s, transform 0.2s; }
.related-list a:hover { border-color: var(--blue); transform: translateY(-2px); }
.related-list .tag { margin-bottom: 8px; }
@media (max-width: 960px) {
  .post-layout { grid-template-columns: 1fr; }
  .sidebar { position: static; }
}
@media (max-width: 700px) { .related-list { grid-template-columns: 1fr; } }

/* ==========================================================================
   Scroll reveal (only when JS is active)
   ========================================================================== */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); }
.js .reveal.is-visible { opacity: 1; transform: none; }

/* ==========================================================================
   Reduced motion
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    transition-delay: 0s !important;
  }
  .js .reveal { opacity: 1; transform: none; }
  .float-badge { animation: none; }
}

/* ==========================================================================
   Section eyebrows (homepage)
   ========================================================================== */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 12px;
  padding: 5px 14px 5px 10px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  line-height: 1.4;
  color: var(--blue-dark);
  background: var(--mist-deep);
  clip-path: polygon(7px 0, 100% 0, calc(100% - 7px) 100%, 0 100%);
}
.eyebrow-mark {
  width: 10px;
  height: 10px;
  flex: none;
  background: var(--peach);
  clip-path: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%);
}
.eyebrow + h2 { margin-top: 0; }
