/* ==========================================================================
   ChemFlummi Modding — style.css
   Design language: "timing screen" — carbon-dark UI, monospaced data labels,
   condensed display type, one accent: purple (fastest sector).
   Themes: dark (default) + light, toggled via [data-theme] on <html>.
   ========================================================================== */

/* ---------- Tokens ---------- */

:root {
  /* dark theme (default) */
  --bg: #0b0d10;
  --surface: #12151a;
  --elev: #191d24;
  --line: #262c35;
  --line-soft: #1d222a;
  --text: #edeff3;
  --muted: #97a1ad;
  --accent: #b3a0ff;
  --accent-strong: #8b5cf6;
  --accent-ink: #17103a;
  --chip-bg: rgba(255, 255, 255, 0.06);
  --hero-scrim: linear-gradient(180deg, rgba(11, 13, 16, 0.55) 0%, rgba(11, 13, 16, 0.25) 45%, rgba(11, 13, 16, 0.92) 100%);
  --card-shadow: 0 1px 0 rgba(255, 255, 255, 0.03) inset, 0 10px 30px rgba(0, 0, 0, 0.35);
  --card-shadow-hover: 0 1px 0 rgba(255, 255, 255, 0.05) inset, 0 18px 44px rgba(0, 0, 0, 0.5);

  --font-display: "Saira Condensed", "Arial Narrow", sans-serif;
  --font-body: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;

  --radius: 10px;
  --radius-sm: 6px;
  --wrap: 1200px;
  --gutter: clamp(1rem, 4vw, 2rem);

  color-scheme: dark;
}

[data-theme="light"] {
  --bg: #f2f3f6;
  --surface: #ffffff;
  --elev: #ffffff;
  --line: #dde1e7;
  --line-soft: #e7eaef;
  --text: #171a20;
  --muted: #545e6a;
  --accent: #6d28d9;
  --accent-strong: #6d28d9;
  --accent-ink: #ffffff;
  --chip-bg: rgba(23, 26, 32, 0.05);
  --hero-scrim: linear-gradient(180deg, rgba(11, 13, 16, 0.5) 0%, rgba(11, 13, 16, 0.28) 45%, rgba(11, 13, 16, 0.88) 100%);
  --card-shadow: 0 1px 2px rgba(23, 26, 32, 0.06), 0 8px 24px rgba(23, 26, 32, 0.07);
  --card-shadow-hover: 0 2px 4px rgba(23, 26, 32, 0.08), 0 16px 40px rgba(23, 26, 32, 0.13);

  color-scheme: light;
}

/* ---------- Base ---------- */

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Cross-fade theme switch: transitions are only armed by JS after first
   paint (class on <html>) so the initial theme never animates in. */
html.theme-anim body,
html.theme-anim .site-header,
html.theme-anim .card,
html.theme-anim .btn,
html.theme-anim .chip,
html.theme-anim .filter-pill,
html.theme-anim .search-field input,
html.theme-anim .download-panel,
html.theme-anim .spec-table,
html.theme-anim footer {
  transition: background-color 0.35s ease, color 0.35s ease, border-color 0.35s ease;
}

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

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

p {
  margin: 0 0 1em;
}

.wrap {
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  z-index: 100;
  background: var(--accent-strong);
  color: #fff;
  padding: 0.6rem 1rem;
  border-radius: 0 0 var(--radius-sm) 0;
}

.skip-link:focus {
  left: 0;
}

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

code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  color: var(--text);
  background: var(--chip-bg);
  border-radius: 3px;
  padding: 0.1em 0.35em;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}

/* ---------- Type helpers ---------- */

.display {
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  line-height: 1.05;
  margin: 0;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0 0 0.9rem;
}

/* the "purple sector" tick that opens every eyebrow */
.eyebrow::before {
  content: "";
  width: 26px;
  height: 3px;
  background: var(--accent-strong);
  flex: none;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-soft);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 60px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--text);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.15rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.brand:hover {
  text-decoration: none;
}

.brand img {
  width: 32px;
  height: 32px;
}

.site-nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: clamp(0.75rem, 2.5vw, 1.6rem);
}

.site-nav a {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 0.4rem 0;
  border-bottom: 2px solid transparent;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--text);
  text-decoration: none;
  border-bottom-color: var(--accent-strong);
}

.theme-toggle {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--chip-bg);
  color: var(--text);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.theme-toggle:hover {
  border-color: var(--accent);
}

.theme-toggle svg {
  width: 18px;
  height: 18px;
}

/* one icon visible per theme */
.theme-toggle .icon-sun {
  display: none;
}

[data-theme="light"] .theme-toggle .icon-sun {
  display: block;
}

[data-theme="light"] .theme-toggle .icon-moon {
  display: none;
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  min-height: min(88vh, 780px);
  display: flex;
  align-items: flex-end;
  isolation: isolate;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--hero-scrim);
}

.hero .wrap {
  width: 100%;
  padding-block: clamp(3rem, 8vh, 5.5rem);
  color: #f4f5f8;
}

.hero .eyebrow {
  color: #cdd3dc;
}

.hero h1 {
  font-size: clamp(2.9rem, 9vw, 6.2rem);
  color: #ffffff;
}

.hero-claim {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.15rem, 2.6vw, 1.6rem);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #d8dde5;
  margin: 0.7rem 0 1.8rem;
}

.hero-claim .dots {
  color: var(--accent);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-bottom: 2.2rem;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.8rem;
  border-top: 1px solid rgba(255, 255, 255, 0.22);
  padding-top: 1rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #c3cad4;
}

/* staggered hero entrance */
.hero .eyebrow,
.hero h1,
.hero-claim,
.hero-actions,
.hero-meta {
  animation: rise 0.6s ease both;
}

.hero h1 { animation-delay: 0.08s; }
.hero-claim { animation-delay: 0.16s; }
.hero-actions { animation-delay: 0.24s; }
.hero-meta { animation-delay: 0.32s; }

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.8rem 1.4rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
}

.btn:hover {
  text-decoration: none;
}

.btn svg {
  width: 16px;
  height: 16px;
  flex: none;
}

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}

.btn-primary:hover {
  background: color-mix(in srgb, var(--accent) 86%, #ffffff);
}

[data-theme="light"] .btn-primary:hover {
  background: color-mix(in srgb, var(--accent) 86%, #000000);
}

.btn-ghost {
  background: transparent;
  border-color: currentColor;
  color: inherit;
}

.hero .btn-ghost {
  color: #f0f2f5;
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.hero .btn-ghost:hover {
  color: #fff;
  border-color: #fff;
}

/* ---------- Sections ---------- */

.section {
  padding-block: clamp(3.5rem, 9vw, 6rem);
}

.section + .section {
  border-top: 1px solid var(--line-soft);
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 1.5rem;
  margin-bottom: 2rem;
}

.section-head h2 {
  font-size: clamp(1.9rem, 4.5vw, 2.8rem);
}

.section-head .count {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  color: var(--muted);
}

/* ---------- Filter / search ---------- */

.mods-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem 1rem;
  margin-bottom: 1.8rem;
}

.filter-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.filter-pill {
  appearance: none;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--chip-bg);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.5rem 1rem;
  cursor: pointer;
  position: relative;
}

.filter-pill:hover {
  color: var(--text);
  border-color: var(--accent);
}

.filter-pill[aria-pressed="true"] {
  color: var(--text);
  border-color: var(--accent-strong);
  box-shadow: inset 0 -3px 0 var(--accent-strong);
}

.search-field {
  margin-left: auto;
  position: relative;
  flex: 1 1 220px;
  max-width: 320px;
}

.search-field svg {
  position: absolute;
  left: 0.8rem;
  top: 50%;
  translate: 0 -50%;
  width: 15px;
  height: 15px;
  color: var(--muted);
  pointer-events: none;
}

.search-field input {
  width: 100%;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.55rem 1rem 0.55rem 2.4rem;
}

.search-field input::placeholder {
  color: var(--muted);
}

.search-field input:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: transparent;
}

/* ---------- Mod grid ---------- */

.mod-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 1.4rem;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--card-shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

/* purple sector bar — slides across the top on hover */
.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 2;
  background: var(--accent-strong);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s ease;
}

.card:hover,
.card:focus-within {
  transform: translateY(-3px) scale(1.01);
  box-shadow: var(--card-shadow-hover);
}

.card:hover::before,
.card:focus-within::before {
  transform: scaleX(1);
}

.card-media {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--elev);
}

.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.card:hover .card-media img,
.card:focus-within .card-media img {
  transform: scale(1.05);
}

.card-body {
  padding: 1.1rem 1.2rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  flex: 1;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.chip {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--chip-bg);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0.18rem 0.5rem;
}

.chip-class {
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 45%, transparent);
}

.card h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.35rem;
  line-height: 1.1;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin: 0;
}

.card h3 a {
  color: var(--text);
}

.card h3 a::after {
  /* whole-card click target */
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
}

.card h3 a:hover {
  text-decoration: none;
}

.card-excerpt {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-cta {
  margin-top: auto;
  padding-top: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.card-cta svg {
  width: 15px;
  height: 15px;
  flex: none;
  transition: transform 0.2s ease;
}

.card:hover .card-cta svg {
  transform: translateX(3px);
}

/* card entrance reveal (JS adds .in-view) */
.card.reveal {
  opacity: 0;
  transform: translateY(14px);
}

.card.reveal.in-view {
  opacity: 1;
  transform: none;
  transition: opacity 0.5s ease, transform 0.5s ease, box-shadow 0.25s ease;
}

.card.reveal.in-view:hover {
  transform: translateY(-3px) scale(1.01);
}

.grid-empty {
  display: none;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  padding: 2.5rem 1.5rem;
  text-align: center;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.06em;
}

.grid-empty.show {
  display: block;
}

/* ---------- About ---------- */

.about-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: center;
}

.about-copy p {
  color: var(--muted);
  font-size: 1.05rem;
}

.about-copy strong {
  color: var(--text);
}

.about-contact {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.4rem;
}

.contact-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  color: var(--text);
  background: var(--chip-bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.9rem;
}

.contact-chip svg {
  width: 16px;
  height: 16px;
  color: var(--accent);
}

.about-shots {
  display: grid;
  gap: 1rem;
}

.about-shots img {
  border-radius: var(--radius);
  border: 1px solid var(--line-soft);
}

.about-shots img:last-child {
  margin-left: clamp(0rem, 4vw, 3rem);
}

/* ---------- Footer ---------- */

.site-footer {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-top: 1px solid var(--line-soft);
  padding-block: clamp(3.5rem, 9vw, 5.5rem) 2rem;
  text-align: center;
}

.footer-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
}

.footer-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.28;
}

.site-footer::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, var(--bg) 0%, transparent 55%, var(--bg) 100%);
}

.footer-line {
  font-size: clamp(1.8rem, 5vw, 3rem);
  margin-bottom: 1.6rem;
}

.footer-line .flag {
  color: var(--accent);
}

.footer-meta {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem 1.6rem;
  margin-top: 2.5rem;
}

/* ---------- Mod detail page ---------- */

.detail-header {
  padding-block: clamp(2rem, 5vw, 3rem) 0;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1.6rem;
}

.back-link:hover {
  color: var(--accent);
  text-decoration: none;
}

.back-link svg {
  width: 15px;
  height: 15px;
}

.detail-header h1 {
  font-size: clamp(2.2rem, 6vw, 4rem);
  margin-bottom: 0.7rem;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 2rem;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: start;
  padding-bottom: clamp(3rem, 8vw, 5rem);
}

/* gallery */
.gallery-main {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line-soft);
  background: var(--elev);
  cursor: zoom-in;
  padding: 0;
  display: block;
  width: 100%;
}

.gallery-main img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.gallery-main .zoom-hint {
  position: absolute;
  right: 0.8rem;
  bottom: 0.8rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #e8eaee;
  background: rgba(10, 12, 15, 0.65);
  border-radius: 4px;
  padding: 0.3rem 0.6rem;
}

.zoom-hint svg {
  width: 13px;
  height: 13px;
}

.gallery-thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 0.7rem;
  margin-top: 0.7rem;
}

.gallery-thumbs button {
  appearance: none;
  padding: 0;
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: pointer;
  background: none;
}

.gallery-thumbs button[aria-current="true"] {
  border-color: var(--accent-strong);
}

.gallery-thumbs img {
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

/* description */
.detail-copy {
  margin-top: 2rem;
}

.detail-copy h2 {
  font-size: 1.6rem;
  margin: 2.2rem 0 0.8rem;
}

.detail-copy p,
.detail-copy li {
  color: var(--muted);
}

.detail-copy ul {
  padding-left: 1.1rem;
  margin: 0 0 1em;
}

.detail-copy li {
  margin-bottom: 0.35rem;
}

.detail-copy li::marker {
  color: var(--accent-strong);
}

/* spec sheet */
.spec-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.spec-note {
  margin-top: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.spec-table th,
.spec-table td {
  text-align: left;
  padding: 0.65rem 1rem;
  border-bottom: 1px solid var(--line-soft);
}

.spec-table tr:last-child th,
.spec-table tr:last-child td {
  border-bottom: none;
}

.spec-table th {
  font-weight: 600;
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  width: 42%;
}

/* changelog */
.changelog {
  border-left: 3px solid var(--accent-strong);
  padding-left: 1.2rem;
  display: grid;
  gap: 1.2rem;
}

.changelog .version {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.3rem;
}

.changelog ul {
  margin: 0;
}

/* download panel */
.download-panel {
  position: sticky;
  top: 84px;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  box-shadow: var(--card-shadow);
  padding: 1.4rem;
  display: grid;
  gap: 1rem;
}

.download-panel .btn {
  width: 100%;
  justify-content: center;
}

.panel-label {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0;
}

.panel-note {
  font-size: 0.8rem;
  color: var(--muted);
  margin: 0;
}

.compat-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.45rem;
}

.compat-list li {
  display: flex;
  align-items: baseline;
  gap: 0.55rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.compat-list li::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 1px;
  background: var(--accent-strong);
  flex: none;
  translate: 0 -1px;
}

.panel-divider {
  border: 0;
  border-top: 1px solid var(--line-soft);
  margin: 0;
}

/* prev / next */
.mod-pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  border-top: 1px solid var(--line-soft);
  padding-block: 1.8rem 3.5rem;
}

.mod-pager a {
  display: grid;
  gap: 0.2rem;
  color: var(--text);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  padding: 0.9rem 1.1rem;
}

.mod-pager a:hover {
  text-decoration: none;
  border-color: var(--accent);
}

.mod-pager .dir {
  font-family: var(--font-mono);
  font-size: 0.64rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.mod-pager .title {
  font-family: var(--font-display);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 1.05rem;
}

.mod-pager a.next {
  text-align: right;
}

/* ---------- Lightbox ---------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(6, 8, 10, 0.92);
  padding: clamp(0.5rem, 3vw, 2rem);
}

.lightbox.open {
  display: flex;
  animation: lb-fade 0.25s ease;
}

@keyframes lb-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

.lightbox img {
  max-width: min(1400px, 100%);
  max-height: 86vh;
  object-fit: contain;
  border-radius: var(--radius-sm);
}

.lightbox .lb-caption {
  position: absolute;
  bottom: 1.2rem;
  left: 50%;
  translate: -50% 0;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #b9c1cc;
}

.lb-btn {
  appearance: none;
  position: absolute;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(20, 24, 30, 0.6);
  color: #eef0f4;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.lb-btn:hover {
  border-color: #fff;
}

.lb-btn svg {
  width: 20px;
  height: 20px;
}

.lb-close { top: 1rem; right: 1rem; }
.lb-prev { left: 1rem; top: 50%; translate: 0 -50%; }
.lb-next { right: 1rem; top: 50%; translate: 0 -50%; }

.lightbox[data-count="1"] .lb-prev,
.lightbox[data-count="1"] .lb-next,
.lightbox[data-count="1"] .lb-caption {
  display: none;
}

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .detail-layout {
    grid-template-columns: 1fr;
  }

  .download-panel {
    position: static;
  }

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

@media (max-width: 640px) {
  .site-nav a:not(.brand) {
    font-size: 0.7rem;
  }

  .brand span {
    display: none;
  }

  .search-field {
    max-width: none;
    flex-basis: 100%;
    margin-left: 0;
  }

  .mod-pager {
    grid-template-columns: 1fr;
  }

  .mod-pager a.next {
    text-align: left;
  }
}

/* ---------- Reduced motion ---------- */

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .card.reveal {
    opacity: 1;
    transform: none;
  }
}
