/* ============================================================
   Turystyka - design system
   Paleta: granat oceanu #14222e / błękit #2e86c1 / piasek #f7f3ea / bursztyn #e8a33d
   Typografia: Lora (display) + Nunito Sans (body) + IBM Plex Mono (etykiety)
   ============================================================ */

:root {
  --ink: #14222e;
  --panel: #1c2f3f;
  --panel-2: #223849;
  --paper: #f7f3ea;
  --paper-dim: #e9e2d3;
  --accent: #2e86c1;
  --accent-bright: #3b9ad9;
  --accent-deep: #1d5f96;
  --amber: #e8a33d;
  --amber-soft: #f2c069;
  --text: #292520;
  --text-soft: #6e655a;
  --text-on-dark: #e6e9e6;
  --text-on-dark-soft: #a9b4bd;
  --border: rgba(20, 34, 46, 0.14);
  --border-dark: rgba(230, 233, 230, 0.14);
  --header-bg: rgba(247, 243, 234, 0.88);
  --sidebar-bg: #efe9dc;
  --card-bg: #fffdf7;
  --shadow: 0 1px 2px rgba(20, 34, 46, 0.06), 0 6px 20px rgba(20, 34, 46, 0.06);
  --shadow-hover: 0 2px 4px rgba(20, 34, 46, 0.08), 0 12px 28px rgba(20, 34, 46, 0.1);
  --radius: 12px;
  --font-display: "Lora", Georgia, serif;
  --font-body: "Nunito Sans", "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
  --header-h: 64px;
  --sidebar-w: 300px;
  --transition: 0.2s ease-out;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #0e1923;
    --panel: #14222e;
    --panel-2: #1a2b3a;
    --paper: #121a21;
    --paper-dim: #1a242d;
    --accent: #3b9ad9;
    --accent-bright: #56a9e0;
    --accent-deep: #5aa6d8;
    --amber: #e8a33d;
    --amber-soft: #f2c069;
    --text: #e6e9e6;
    --text-soft: #a9b4bd;
    --text-on-dark: #e6e9e6;
    --text-on-dark-soft: #a9b4bd;
    --border: rgba(230, 233, 230, 0.13);
    --border-dark: rgba(230, 233, 230, 0.13);
    --header-bg: rgba(14, 25, 35, 0.9);
    --sidebar-bg: #101a23;
    --card-bg: #15212b;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 6px 20px rgba(0, 0, 0, 0.25);
    --shadow-hover: 0 2px 4px rgba(0, 0, 0, 0.35), 0 12px 28px rgba(0, 0, 0, 0.35);
  }
}

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

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

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.7;
  color: var(--text);
  background: var(--paper);
  background-image:
    radial-gradient(ellipse 60% 40% at 85% -5%, rgba(46, 134, 193, 0.14), transparent 60%),
    radial-gradient(ellipse 55% 40% at -10% 105%, rgba(232, 163, 61, 0.12), transparent 60%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.3s ease, color 0.3s ease;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.25;
  text-wrap: balance;
  margin: 0 0 0.5em;
}

p { margin: 0 0 1em; }
a { color: var(--accent-deep); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; }

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent-deep);
  color: #fff;
  padding: 10px 16px;
  border-radius: 0 0 8px 0;
  z-index: 300;
  font-weight: 700;
}
.skip-link:focus { left: 0; color: #fff; }

/* ---------- Header ---------- */
.app-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  background: var(--header-bg);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  z-index: 200;
}
.app-header::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(46, 134, 193, 0.45), transparent);
  opacity: 0.5;
  pointer-events: none;
}
.header-inner {
  max-width: 1400px;
  height: 100%;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 18px;
}

.menu-btn {
  display: none;
  width: 42px; height: 42px;
  border: 1px solid var(--border);
  background: transparent;
  border-radius: 8px;
  cursor: pointer;
  padding: 10px;
  flex-direction: column;
  justify-content: space-between;
}
.menu-btn span {
  display: block;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}
.menu-btn[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.menu-btn[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-btn[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
}
.brand:hover { text-decoration: none; }
.brand-mark { font-size: 1.5rem; line-height: 1; }
.brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: -0.01em;
}
.brand-name em {
  font-style: normal;
  color: var(--accent-deep);
}
@media (prefers-color-scheme: dark) {
  .brand-name em { color: var(--accent-bright); }
}

.search-wrap {
  position: relative;
  flex: 1;
  max-width: 460px;
  margin-left: auto;
}
.search-input {
  width: 100%;
  height: 40px;
  padding: 0 14px;
  font: inherit;
  font-size: 0.95rem;
  color: var(--text);
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.search-input::placeholder { color: var(--text-soft); }
.search-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(46, 134, 193, 0.18);
}
.search-results {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0; right: 0;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-hover);
  overflow: hidden;
  z-index: 210;
}
.search-results.open { display: block; animation: fadeUp 0.18s ease-out; }
.search-item {
  display: block;
  padding: 10px 14px;
  color: var(--text);
  border-bottom: 1px solid var(--border);
}
.search-item:last-child { border-bottom: 0; }
.search-item:hover { background: var(--paper-dim); text-decoration: none; }
.si-title { font-weight: 700; font-size: 0.92rem; }
.si-section {
  font-size: 0.75rem;
  color: var(--text-soft);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 2px;
}
.search-empty { padding: 14px; color: var(--text-soft); font-size: 0.9rem; }

.header-tagline {
  font-size: 0.8rem;
  color: var(--text-soft);
  white-space: nowrap;
}

/* ---------- Layout ---------- */
.layout {
  display: flex;
  max-width: 1400px;
  margin: 0 auto;
  padding: var(--header-h) 20px 0;
  gap: 28px;
  min-height: calc(100vh - var(--header-h));
}

.sidebar {
  position: sticky;
  top: calc(var(--header-h) + 16px);
  align-self: flex-start;
  width: var(--sidebar-w);
  flex-shrink: 0;
  max-height: calc(100vh - var(--header-h) - 32px);
  overflow-y: auto;
  padding: 18px 12px 24px;
  background: var(--sidebar-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  scrollbar-width: thin;
}
.sidebar::-webkit-scrollbar { width: 6px; }
.sidebar::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

.side-group { margin-bottom: 18px; }
.side-group-title {
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--text-soft);
  margin: 0 0 6px;
  padding: 0 10px;
}
.sidebar-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px;
  border-radius: 8px;
  color: var(--text);
  font-size: 0.9rem;
  line-height: 1.35;
  transition: background var(--transition), color var(--transition);
}
.sidebar-link:hover { background: var(--paper-dim); text-decoration: none; }
.sidebar-link.active {
  background: rgba(46, 134, 193, 0.14);
  color: var(--accent-deep);
  font-weight: 700;
}
@media (prefers-color-scheme: dark) {
  .sidebar-link.active { color: var(--accent-bright); }
}
.s-icon { flex-shrink: 0; font-size: 0.85rem; }

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(10, 16, 22, 0.5);
  z-index: 180;
}
.sidebar-overlay.show { display: block; }

.main-content {
  flex: 1;
  min-width: 0;
  padding: 28px 0 60px;
}

/* ---------- Animations ---------- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes heroZoom {
  from { transform: scale(1.07); }
  to { transform: scale(1); }
}
@keyframes blinkColon {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0.15; }
}

/* ---------- Hero ---------- */
.home-hero {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  color: var(--text-on-dark);
  animation: fadeUp 0.3s ease-out;
  min-height: 420px;
  display: flex;
  align-items: center;
  box-shadow: var(--shadow);
}
.hero-bg {
  position: absolute;
  inset: 0;
  background-image: url("https://images.unsplash.com/photo-1507525428034-b723cf961d3e?auto=format&fit=crop&w=1600&q=70");
  background-size: cover;
  background-position: center;
  animation: heroZoom 26s ease-out forwards;
}
.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    100deg,
    rgba(10, 18, 26, 0.72) 0%,
    rgba(10, 18, 26, 0.55) 45%,
    rgba(10, 18, 26, 0.42) 100%
  );
}
.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 640px;
  padding: 56px 48px;
}
.hero-eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--amber-soft);
  border: 1px solid rgba(242, 192, 105, 0.4);
  border-radius: 999px;
  padding: 4px 12px;
  margin-bottom: 18px;
  background: rgba(20, 34, 46, 0.35);
}
.home-hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.35em;
  letter-spacing: -0.015em;
}
.hero-sub {
  font-size: 1.08rem;
  color: rgba(230, 233, 230, 0.94);
  max-width: 56ch;
  margin-bottom: 26px;
}
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 10px;
  font: inherit;
  font-weight: 800;
  font-size: 0.98rem;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
  text-decoration: none;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn-primary {
  background: var(--accent-bright);
  color: #0e1923;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.2);
}
.btn-primary:hover { background: #fff; box-shadow: 0 6px 18px rgba(59, 154, 217, 0.35); }
.btn-ghost {
  background: rgba(14, 25, 35, 0.55);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.55);
}
.btn-ghost:hover { background: rgba(14, 25, 35, 0.75); }

/* ---------- Signature: mapa tras + tablica odlotów ---------- */
.signature {
  margin-top: 34px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.sig-inner { padding: 40px 44px; }
.sig-head { max-width: 620px; margin-bottom: 28px; }
.sig-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent-deep);
}
@media (prefers-color-scheme: dark) {
  .sig-eyebrow { color: var(--accent-bright); }
}
.sig-head h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin: 6px 0 8px; }
.sig-head p { color: var(--text-soft); margin: 0; }

.sig-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 32px;
  align-items: stretch;
}

.sig-map-wrap { position: relative; }
.route-map {
  width: 100%;
  height: auto;
  display: block;
  background:
    linear-gradient(rgba(20, 34, 46, 0.03), rgba(20, 34, 46, 0.03)),
    var(--paper-dim);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
@media (prefers-color-scheme: dark) {
  .route-map {
    background: linear-gradient(rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.02)), #101a23;
  }
}

.rm-grid line {
  stroke: var(--border);
  stroke-width: 0.6;
}
.rm-waw-ring {
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.6;
  opacity: 0.55;
}
.rm-waw-dot { fill: var(--accent); }
.rm-label {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  fill: var(--text);
}
.rm-label-waw { fill: var(--accent-deep); font-weight: 700; text-anchor: middle; }
@media (prefers-color-scheme: dark) {
  .rm-label-waw { fill: var(--accent-bright); }
}
.rm-label-waw-sub {
  font-size: 11px;
  fill: var(--text-soft);
  text-anchor: middle;
  letter-spacing: 0.18em;
}
.rm-label-dest { text-anchor: middle; }
.rm-label-dist {
  font-size: 10.5px;
  font-weight: 400;
  fill: var(--text-soft);
  text-anchor: middle;
}
.rm-dest-dot { fill: var(--amber); }

.rm-arc {
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.8;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  opacity: 0.9;
}
.sig-map-wrap.draw .rm-arc {
  animation: arcDraw 1.1s ease-out forwards;
}
.sig-map-wrap.draw .rm-arc:nth-of-type(1) { animation-delay: 0.15s; }
.sig-map-wrap.draw .rm-arc:nth-of-type(2) { animation-delay: 0.35s; }
.sig-map-wrap.draw .rm-arc:nth-of-type(3) { animation-delay: 0.55s; }
.sig-map-wrap.draw .rm-arc:nth-of-type(4) { animation-delay: 0.75s; }
.sig-map-wrap.draw .rm-arc:nth-of-type(5) { animation-delay: 0.95s; }
@keyframes arcDraw {
  to { stroke-dashoffset: 0; }
}
.sig-map-wrap.draw .rm-dest-dot {
  animation: dotPop 0.3s ease-out forwards;
  opacity: 0;
}
.sig-map-wrap.draw .rm-dest-dot:nth-of-type(1) { animation-delay: 1.15s; }
.sig-map-wrap.draw .rm-dest-dot:nth-of-type(2) { animation-delay: 1.35s; }
.sig-map-wrap.draw .rm-dest-dot:nth-of-type(3) { animation-delay: 1.55s; }
.sig-map-wrap.draw .rm-dest-dot:nth-of-type(4) { animation-delay: 1.75s; }
.sig-map-wrap.draw .rm-dest-dot:nth-of-type(5) { animation-delay: 1.95s; }
@keyframes dotPop {
  from { opacity: 0; transform: scale(0.4); transform-origin: center; }
  to { opacity: 1; transform: scale(1); }
}

.rm-stamp rect {
  fill: rgba(232, 163, 61, 0.12);
  stroke: var(--amber);
  stroke-width: 1.2;
  stroke-dasharray: 3 2;
}
.rm-stamp text {
  font-family: var(--font-mono);
  text-anchor: middle;
  fill: var(--amber);
}
.rm-stamp-t1 { font-size: 11px; font-weight: 600; letter-spacing: 0.08em; }
.rm-stamp-t2 { font-size: 9.5px; letter-spacing: 0.14em; opacity: 0.85; }

/* Tablica odlotów */
.sig-side { display: flex; flex-direction: column; gap: 22px; }
.board-frame {
  background: #0d141b;
  border: 1px solid rgba(232, 163, 61, 0.35);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.5);
}
.board-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--amber);
  background: rgba(232, 163, 61, 0.08);
  border-bottom: 1px solid rgba(232, 163, 61, 0.25);
}
.bh-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 8px var(--amber);
}
.bh-blink { animation: blinkColon 1.1s steps(1) infinite; }
.board-body { padding: 10px 12px 12px; }
.board-row {
  display: grid;
  grid-template-columns: 44px 34px 1fr 52px 58px;
  gap: 8px;
  align-items: center;
  padding: 7px 8px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--amber);
  border-bottom: 1px dashed rgba(232, 163, 61, 0.18);
}
.board-row:last-child { border-bottom: 0; }
.br-code { color: rgba(242, 192, 105, 0.55); }
.br-air { font-weight: 700; }
.br-city { letter-spacing: 0.03em; }
.br-time { text-align: right; }
.br-status { text-align: right; font-weight: 600; }

.br-status-flip { perspective: 200px; }
.flip-inner {
  display: inline-block;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.45s cubic-bezier(0.34, 1.3, 0.5, 1);
}
.flip-a, .flip-b {
  display: block;
  backface-visibility: hidden;
}
.flip-b {
  position: absolute;
  top: 0; left: 0;
  transform: rotateX(-180deg);
  color: #0d141b;
  background: var(--amber);
  border-radius: 3px;
  padding: 0 4px;
}
.board-row-flip.flipped .flip-inner { transform: rotateX(-180deg); }
.board-row-flip .br-air { color: #0d141b; background: var(--amber); border-radius: 3px; padding: 0 4px; }

.sig-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.sig-stat {
  background: var(--paper-dim);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 12px;
  text-align: center;
}
.ss-num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.6rem;
  color: var(--accent-deep);
  line-height: 1.1;
}
@media (prefers-color-scheme: dark) {
  .ss-num { color: var(--accent-bright); }
}
.ss-label {
  font-size: 0.75rem;
  color: var(--text-soft);
  margin-top: 4px;
  line-height: 1.35;
}

/* ---------- Home sections + cards ---------- */
.home-section {
  margin-top: 42px;
  animation: fadeUp 0.3s ease-out;
}
.home-section h2 {
  font-size: clamp(1.4rem, 2.6vw, 1.9rem);
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 4px;
}
.sec-count {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--amber);
  border: 1px solid rgba(232, 163, 61, 0.5);
  border-radius: 6px;
  padding: 2px 8px;
  flex-shrink: 0;
}
.sec-desc {
  color: var(--text-soft);
  margin: 0 0 18px;
  font-size: 0.98rem;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.home-card {
  position: relative;
  display: block;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 20px 16px;
  box-shadow: var(--shadow);
  color: var(--text);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.home-card::after {
  content: "";
  position: absolute;
  left: 20px; right: 20px;
  bottom: 0;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease-out;
}
.home-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(46, 134, 193, 0.4);
  text-decoration: none;
}
.home-card:hover::after { transform: scaleX(1); }
.hc-icon { font-size: 1.5rem; display: block; margin-bottom: 10px; }
.home-card h3 {
  font-size: 0.9rem;
  font-weight: 700;
  font-family: var(--font-body);
  line-height: 1.4;
  margin-bottom: 6px;
  color: var(--text);
}
.home-card p {
  font-size: 0.85rem;
  color: var(--text-soft);
  line-height: 1.55;
  margin-bottom: 12px;
}
.hc-more {
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--accent-deep);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
@media (prefers-color-scheme: dark) {
  .hc-more { color: var(--accent-bright); }
}
.hc-more .arrow { transition: transform var(--transition); }
.home-card:hover .hc-more .arrow { transform: translateX(3px); }

/* ---------- Article ---------- */
.article-header { animation: fadeUp 0.25s ease-out; }
.breadcrumbs {
  font-size: 0.82rem;
  color: var(--text-soft);
  margin-bottom: 12px;
}
.breadcrumbs a { color: var(--accent-deep); }
@media (prefers-color-scheme: dark) {
  .breadcrumbs a { color: var(--accent-bright); }
}
.breadcrumbs .sep { margin: 0 6px; opacity: 0.6; }
.article-header h1 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -0.015em;
  margin-bottom: 10px;
}
.article-excerpt {
  font-size: 1.08rem;
  color: var(--text-soft);
  max-width: 70ch;
}
.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin: 16px 0 26px;
  font-size: 0.82rem;
  color: var(--text-soft);
}
.tag {
  background: rgba(46, 134, 193, 0.12);
  color: var(--accent-deep);
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
}
@media (prefers-color-scheme: dark) {
  .tag { color: var(--accent-bright); }
}

.article-body { animation: fadeUp 0.25s ease-out; }
.article-body h2 {
  font-size: 1.45rem;
  font-weight: 700;
  margin: 2em 0 0.6em;
  padding-top: 0.4em;
}
.article-body h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 1.6em 0 0.5em;
}
.article-body h2:first-child { margin-top: 0; }
.article-body p { max-width: 75ch; }
.article-body ul, .article-body ol { max-width: 75ch; padding-left: 1.4em; margin: 0 0 1em; }
.article-body li { margin-bottom: 0.4em; }
.article-body strong { font-weight: 800; }

.article-body a { text-decoration: underline; text-underline-offset: 2px; }
.article-body a:hover { text-decoration-thickness: 2px; }

/* TOC */
.article-toc {
  margin: 0 0 28px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  max-width: 75ch;
}
.article-toc summary {
  cursor: pointer;
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--accent-deep);
}
@media (prefers-color-scheme: dark) {
  .article-toc summary { color: var(--accent-bright); }
}
.article-toc ol {
  margin: 10px 0 0;
  padding-left: 1.4em;
  max-width: none;
}
.article-toc li { margin-bottom: 6px; font-size: 0.92rem; }

/* Info box */
.info-box {
  background: rgba(46, 134, 193, 0.08);
  border-left: 4px solid var(--accent);
  border-radius: 0 10px 10px 0;
  padding: 14px 18px;
  margin: 18px 0;
  max-width: 75ch;
}
.info-box p { margin: 0; }
.info-box strong { color: var(--accent-deep); }
@media (prefers-color-scheme: dark) {
  .info-box strong { color: var(--accent-bright); }
}

/* Tables */
.table-responsive {
  overflow-x: auto;
  margin: 18px 0;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  max-width: 85ch;
}
table.error-table, table.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  background: var(--card-bg);
}
.error-table th, .compare-table th {
  background: var(--panel);
  color: var(--text-on-dark);
  text-align: left;
  padding: 12px 14px;
  font-weight: 800;
  font-size: 0.88rem;
}
.error-table td, .compare-table td {
  padding: 11px 14px;
  border-top: 1px solid var(--border);
  vertical-align: top;
}
.error-table tr:nth-child(even) td, .compare-table tr:nth-child(even) td {
  background: var(--paper-dim);
}
.compare-table .best {
  background: rgba(232, 163, 61, 0.12) !important;
  font-weight: 700;
}

/* FAQ */
.faq-item {
  margin: 14px 0;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  max-width: 78ch;
}
.faq-item h3 {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 800;
  margin: 0 0 8px;
}
.faq-item p { margin: 0; }

/* Glossary */
.glossary-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 28px;
  margin: 20px 0;
}
.glossary-list dt {
  font-weight: 800;
  color: var(--accent-deep);
  margin-top: 10px;
}
@media (prefers-color-scheme: dark) {
  .glossary-list dt { color: var(--accent-bright); }
}
.glossary-list dd { margin: 2px 0 0; color: var(--text-soft); font-size: 0.94rem; }

/* Article nav */
.article-nav {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-top: 44px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
}
.article-nav a {
  flex: 1;
  max-width: 46%;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 18px;
  color: var(--text);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.article-nav a:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(46, 134, 193, 0.4);
  text-decoration: none;
}
.article-nav .next { text-align: right; margin-left: auto; }
.an-label {
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-soft);
  margin-bottom: 4px;
}
.an-title { font-weight: 700; font-size: 0.95rem; line-height: 1.4; }

/* ---------- Footer ---------- */
.app-footer {
  border-top: 1px solid var(--border);
  background: var(--sidebar-bg);
  margin-top: 20px;
}
.footer-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 28px 20px 32px;
  font-size: 0.9rem;
  color: var(--text-soft);
}
.footer-inner p { margin-bottom: 6px; }
.footer-note { font-size: 0.8rem; max-width: 80ch; }
.footer-copy { margin-top: 14px; font-size: 0.8rem; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .sig-grid { grid-template-columns: 1fr; }
  .header-tagline { display: none; }
}

@media (max-width: 900px) {
  .menu-btn { display: flex; }
  .sidebar {
    position: fixed;
    top: var(--header-h);
    left: 0;
    bottom: 0;
    width: min(320px, 86vw);
    max-height: none;
    border-radius: 0;
    transform: translateX(-102%);
    transition: transform 0.25s ease-out;
    z-index: 190;
    background: var(--sidebar-bg);
  }
  .sidebar.open { transform: translateX(0); }
  .search-wrap { max-width: none; }
  .layout { padding-left: 16px; padding-right: 16px; gap: 0; }
  .hero-inner { padding: 44px 28px; }
  .sig-inner { padding: 28px 22px; }
  .glossary-list { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  body { font-size: 16.5px; }
  .home-hero { min-height: 380px; }
  .hero-inner { padding: 38px 22px; }
  .hero-sub { font-size: 1rem; }
  .btn { width: 100%; justify-content: center; }
  .header-inner { gap: 10px; padding: 0 12px; }
  .brand-name { font-size: 1.15rem; }
  .search-input { font-size: 0.88rem; }
  .sig-stats { grid-template-columns: 1fr; }
  .board-row {
    grid-template-columns: 38px 30px 1fr 46px;
    font-size: 0.74rem;
    gap: 6px;
  }
  .br-status { display: none; }
  .card-grid { grid-template-columns: 1fr; }
  .article-nav { flex-direction: column; }
  .article-nav a, .article-nav .next { max-width: none; margin-left: 0; 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;
  }
  .hero-bg { animation: none; }
  .sig-map-wrap .rm-arc { stroke-dashoffset: 0; }
  .sig-map-wrap .rm-dest-dot { opacity: 1; }
  .bh-blink { animation: none; }
}
