/* ==========================================================================
   Arabian Defence — design system
   ========================================================================== */

:root {
  --brand: #e01623;
  --brand-deep: #b40f1a;
  --bg: #f4f4f1;
  --surface: #ffffff;
  --surface-2: #fafaf8;
  --ink: #15171c;
  --ink-2: #3d4149;
  --muted: #70757f;
  --line: rgba(21, 23, 28, 0.10);
  --line-soft: rgba(21, 23, 28, 0.06);
  --chip-bg: rgba(224, 22, 35, 0.08);
  --shadow-sm: 0 1px 2px rgba(15, 17, 21, 0.05), 0 2px 8px rgba(15, 17, 21, 0.05);
  --shadow-md: 0 2px 6px rgba(15, 17, 21, 0.06), 0 12px 32px rgba(15, 17, 21, 0.10);
  --shadow-lg: 0 8px 20px rgba(15, 17, 21, 0.10), 0 24px 60px rgba(15, 17, 21, 0.16);
  --sidebar-w: 268px;
  --sidebar-w-collapsed: 76px;
  --rail-w: 316px;
  --radius: 14px;
  --radius-sm: 10px;
  --font-ui: "Inter", -apple-system, "Segoe UI", sans-serif;
  --font-display: "Source Serif 4", Georgia, "Times New Roman", serif;
  --font-mono: "JetBrains Mono", "SF Mono", Menlo, monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  /* section accent colors — echoed from the generative art palette */
  --sec-land-forces: #5b7a3a;
  --sec-maritime: #2f6fa8;
  --sec-aviation: #3f6690;
  --sec-space: #6c4fc9;
  --sec-perspectives: #b5495a;
  --sec-land-forces-solid: #4f6b34;
  --sec-maritime-solid: #235d8f;
  --sec-aviation-solid: #35597d;
  --sec-space-solid: #5c3fb8;
  --sec-perspectives-solid: #a13a4c;
}

html[data-theme="dark"] {
  --bg: #0c0e12;
  --surface: #15181e;
  --surface-2: #191d24;
  --ink: #eef0f4;
  --ink-2: #c3c8d1;
  --muted: #8d93a0;
  --line: rgba(238, 240, 244, 0.10);
  --line-soft: rgba(238, 240, 244, 0.06);
  --chip-bg: rgba(255, 82, 94, 0.12);
  --brand: #f43f4b;
  --brand-deep: #e01623;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4), 0 2px 10px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.45), 0 14px 36px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 10px 24px rgba(0, 0, 0, 0.5), 0 30px 70px rgba(0, 0, 0, 0.55);

  /* brighter section accents for legibility against dark surfaces */
  --sec-land-forces: #8fbf5e;
  --sec-maritime: #5b9bd9;
  --sec-aviation: #7ea3c9;
  --sec-space: #9c85e8;
  --sec-perspectives: #e0899a;
}

[data-cat="land-forces"] { --accent: var(--sec-land-forces); --accent-solid: var(--sec-land-forces-solid); }
[data-cat="maritime"] { --accent: var(--sec-maritime); --accent-solid: var(--sec-maritime-solid); }
[data-cat="aviation"] { --accent: var(--sec-aviation); --accent-solid: var(--sec-aviation-solid); }
[data-cat="space"] { --accent: var(--sec-space); --accent-solid: var(--sec-space-solid); }
[data-cat="perspectives"] { --accent: var(--sec-perspectives); --accent-solid: var(--sec-perspectives-solid); }

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

html { scrollbar-color: var(--line) transparent; scrollbar-width: thin; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background-color: var(--line); border-radius: 20px; border: 2px solid var(--bg); background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background-color: var(--muted); background-clip: padding-box; }

body {
  font-family: var(--font-ui);
  background:
    radial-gradient(900px 520px at 12% -10%, color-mix(in srgb, var(--brand) 7%, transparent), transparent 60%),
    radial-gradient(760px 520px at 106% 18%, color-mix(in srgb, var(--brand) 4%, transparent), transparent 62%),
    var(--bg);
  background-attachment: fixed;
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
  opacity: 1;
  transition: opacity 0.18s ease;
}
body.leaving { opacity: 0; }

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
::selection { background: var(--brand); color: #fff; }

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

/* ==========================================================================
   Sidebar
   ========================================================================== */

.sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--sidebar-w); z-index: 120;
  background:
    radial-gradient(360px 260px at 0% 0%, color-mix(in srgb, var(--brand) 6%, transparent), transparent 65%),
    var(--surface);
  border-right: 1px solid var(--line);
  display: flex; flex-direction: column;
  transition: width 0.32s var(--ease), transform 0.35s var(--ease);
}
@media (min-width: 1025px) { html.sidebar-collapsed .sidebar { width: var(--sidebar-w-collapsed); } }
.sidebar-inner {
  display: flex; flex-direction: column; gap: 4px;
  height: 100%; overflow-y: auto; padding: 26px 18px 22px;
  scrollbar-width: thin;
}

.brand { display: block; padding: 2px 6px 16px; }
.brand img { width: 100%; height: auto; }
html[data-theme="dark"] .logo-light { display: none; }
html:not([data-theme="dark"]) .logo-dark { display: none; }

.nav { display: flex; flex-direction: column; gap: 2px; padding-top: 6px; }
.nav-heading {
  font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--muted); padding: 8px 12px 6px;
}
.nav a {
  display: flex; align-items: center; gap: 12px;
  padding: 9px 12px; border-radius: 10px;
  font-size: 0.905rem; font-weight: 500; color: var(--ink-2);
  transition: background 0.18s, color 0.18s;
  position: relative;
}
.nav a svg { width: 17px; height: 17px; stroke: currentColor; opacity: 0.75; flex: none; transition: transform 0.25s var(--ease); }
.nav a:hover { background: var(--line-soft); color: var(--ink); }
.nav a:hover svg { transform: translateX(1px) scale(1.06); }
.nav a.active { background: var(--chip-bg); color: var(--brand); font-weight: 600; }
.nav a.active::before {
  content: ""; position: absolute; left: -18px; top: 8px; bottom: 8px; width: 3px;
  background: var(--brand); border-radius: 0 3px 3px 0;
  box-shadow: 0 0 10px color-mix(in srgb, var(--brand) 70%, transparent);
  animation: navIn 0.3s var(--ease);
}
@keyframes navIn { from { transform: scaleY(0); opacity: 0; } to { transform: scaleY(1); opacity: 1; } }

/* ==========================================================================
   Collapsible sidebar (icon rail) — desktop only
   ========================================================================== */

.sidebar-collapse-btn {
  position: absolute; top: 78px; right: -13px; z-index: 5;
  width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--surface); border: 1px solid var(--line); color: var(--muted);
  box-shadow: var(--shadow-sm); transition: all 0.2s var(--ease);
}
.sidebar-collapse-btn:hover { color: var(--brand); border-color: var(--brand); transform: scale(1.1); }
.sidebar-collapse-btn svg { width: 13px; height: 13px; stroke: currentColor; transition: transform 0.32s var(--ease); }
.logo-mark { display: none; width: 36px; height: 36px; }

/* collapsed-state effects only ever apply on desktop — mobile always uses the full drawer */
@media (min-width: 1025px) {
  html.sidebar-collapsed .sidebar-collapse-btn svg { transform: rotate(180deg); }
  html.sidebar-collapsed .sidebar-inner { padding: 22px 10px 16px; align-items: center; }
  html.sidebar-collapsed .brand { display: flex; justify-content: center; padding: 2px 0 16px; }
  html.sidebar-collapsed .brand .logo-light,
  html.sidebar-collapsed .brand .logo-dark { display: none; }
  html.sidebar-collapsed .brand .logo-mark { display: block; }

  html.sidebar-collapsed .nav { width: 100%; }
  html.sidebar-collapsed .nav-heading { display: none; }
  html.sidebar-collapsed .nav a { justify-content: center; gap: 0; padding: 11px 0; font-size: 0; }
  html.sidebar-collapsed .nav a.active::before { display: none; }
  html.sidebar-collapsed .nav a::after {
    content: attr(data-tip);
    position: absolute; left: calc(100% + 14px); top: 50%; transform: translate(-6px, -50%);
    background: var(--ink); color: var(--bg);
    font-family: var(--font-ui); font-size: 0.78rem; font-weight: 600;
    padding: 6px 12px; border-radius: 8px; white-space: nowrap;
    opacity: 0; pointer-events: none; z-index: 250; box-shadow: var(--shadow-md);
    transition: opacity 0.16s ease, transform 0.16s ease;
  }
  html.sidebar-collapsed .nav a:hover::after,
  html.sidebar-collapsed .nav a:focus-visible::after { opacity: 1; transform: translate(0, -50%); }

  html.sidebar-collapsed .issue-card,
  html.sidebar-collapsed .sidebar-foot { display: none; }
}

@media (max-width: 1024px) { .sidebar-collapse-btn { display: none; } }

/* Latest issue card (compact row — fits the landing screen without scrolling) */
.issue-card {
  margin-top: 24px; padding: 16px 14px 14px;
  background: var(--surface-2);
  border: 1px solid var(--line); border-radius: var(--radius);
}
.issue-label {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 0.62rem; font-weight: 600;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted);
  margin-bottom: 13px;
}
.issue-label::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.issue-mini { display: flex; gap: 14px; align-items: stretch; }
.issue-mini .mag-cover { width: 86px; flex: none; border-radius: 7px; }
.issue-mini .mag-cover:hover { transform: none; box-shadow: var(--shadow-md); }
.issue-info { min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: 4px; }
.issue-info .issue-date {
  font-family: var(--font-mono); font-size: 0.6rem; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--brand);
}
.issue-info b { font-size: 1rem; line-height: 1.15; letter-spacing: 0.02em; }
.issue-info .issue-line { font-size: 0.75rem; color: var(--muted); line-height: 1.35; }

.mag-cover.mag-cover--sm .mag-cover-top { padding: 3px 6px; }
.mag-cover.mag-cover--sm .mag-cover-top b { font-size: 0.34rem; letter-spacing: 0.04em; }
.mag-cover.mag-cover--sm .mag-cover-top span { display: none; }
.mag-cover.mag-cover--sm .mag-cover-body { left: 6px; right: 6px; bottom: 6px; }
.mag-cover.mag-cover--sm .cv-title { font-size: 0.58rem; }
.mag-cover.mag-cover--sm .cv-line { display: none; }

/* CSS magazine cover */
.mag-cover {
  position: relative; display: block; aspect-ratio: 3 / 4; overflow: hidden;
  border-radius: 8px; box-shadow: var(--shadow-md);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
  isolation: isolate;
}
.mag-cover:hover { transform: translateY(-3px) rotate(-0.5deg); box-shadow: var(--shadow-lg); }
.mag-feature .mag-cover:hover { transform: none; box-shadow: var(--shadow-md); }
.mag-cover .art { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }
.mag-cover-top {
  display: flex; align-items: center; justify-content: space-between;
  background: #e01623; color: #fff; padding: 7px 10px;
}
.mag-cover-top b {
  font-size: 0.62rem; font-weight: 800; letter-spacing: 0.06em; line-height: 1.15;
  text-transform: uppercase; font-family: var(--font-ui);
}
.mag-cover-top span { font-family: var(--font-mono); font-size: 0.5rem; letter-spacing: 0.08em; opacity: 0.9; }
.mag-cover-body {
  position: absolute; left: 10px; right: 10px; bottom: 10px; color: #fff;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.55);
}
.mag-cover-body .cv-title {
  display: block; font-family: var(--font-ui); font-weight: 800; font-size: 1.32rem;
  letter-spacing: 0.02em; line-height: 1; text-transform: uppercase;
}
.mag-cover-body .cv-line { display: block; font-size: 0.6rem; font-weight: 500; opacity: 0.92; margin-top: 4px; letter-spacing: 0.04em; }
.mag-cover-shade {
  position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(to top, rgba(4, 6, 10, 0.72), transparent 55%);
}

.issue-card .btn { margin-top: 14px; padding: 10px 16px; font-size: 0.84rem; }

.sidebar-foot { margin-top: auto; padding-top: 22px; }
.fineprint { font-size: 0.68rem; color: var(--muted); margin-top: 12px; line-height: 1.5; }

/* ==========================================================================
   Layout shell / topbar
   ========================================================================== */

.layout { margin-left: var(--sidebar-w); min-height: 100vh; display: flex; flex-direction: column; transition: margin-left 0.32s var(--ease); }
@media (min-width: 1025px) { html.sidebar-collapsed .layout { margin-left: var(--sidebar-w-collapsed); } }

.topbar {
  position: sticky; top: 0; z-index: 90;
  display: flex; align-items: center; gap: 14px;
  padding: 12px 28px;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.topbar-brand { display: none; }
.topbar-brand img { height: 30px; width: auto; }

.icon-btn {
  display: grid; place-items: center; width: 38px; height: 38px; flex: none;
  border: 1px solid var(--line); border-radius: 10px; background: var(--surface);
  color: var(--ink-2); transition: all 0.18s;
}
.icon-btn:hover { color: var(--brand); border-color: var(--brand); transform: translateY(-1px); }
.icon-btn:active { transform: translateY(0) scale(0.94); }
.icon-btn svg { width: 17px; height: 17px; stroke: currentColor; }
.menu-btn { display: none; }

/* morphing burger ↔ close icon */
.burger { position: relative; width: 17px; height: 13px; }
.burger i {
  position: absolute; left: 0; width: 100%; height: 2px; border-radius: 2px;
  background: currentColor; transition: transform 0.32s var(--ease), opacity 0.2s, top 0.32s var(--ease);
}
.burger i:nth-child(1) { top: 0; }
.burger i:nth-child(2) { top: 5.5px; }
.burger i:nth-child(3) { top: 11px; }
body.drawer-open .burger i:nth-child(1) { top: 5.5px; transform: rotate(45deg); }
body.drawer-open .burger i:nth-child(2) { opacity: 0; }
body.drawer-open .burger i:nth-child(3) { top: 5.5px; transform: rotate(-45deg); }

/* theme-toggle flip */
.icon-btn.spin svg { animation: iconSpin 0.5s var(--ease); }
@keyframes iconSpin { from { transform: rotate(-90deg) scale(0.5); opacity: 0; } to { transform: none; opacity: 1; } }

/* news ticker */
.ticker { flex: 1; display: flex; align-items: center; gap: 12px; min-width: 0; }
.ticker-chip {
  flex: none; display: inline-flex; align-items: center; gap: 7px;
  background: var(--brand); color: #fff;
  font-family: var(--font-mono); font-size: 0.6rem; font-weight: 700;
  letter-spacing: 0.14em; padding: 5px 10px; border-radius: 7px;
}
.ticker-chip i {
  width: 6px; height: 6px; border-radius: 50%; background: #fff;
  animation: blink 1.6s ease infinite;
}
@keyframes blink { 50% { opacity: 0.25; } }
.ticker-track { overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); }
.ticker-rail { display: inline-flex; gap: 44px; white-space: nowrap; animation: ticker 46s linear infinite; }
.ticker-track:hover .ticker-rail { animation-play-state: paused; }
.ticker-rail a { font-size: 0.8rem; color: var(--ink-2); }
.ticker-rail a:hover { color: var(--brand); }
.ticker-rail a::before { content: "◆"; color: var(--brand); font-size: 0.5rem; margin-right: 10px; vertical-align: 2px; }
@keyframes ticker { to { transform: translateX(-50%); } }

.search-trigger {
  display: inline-flex; align-items: center; gap: 9px; flex: none;
  border: 1px solid var(--line); border-radius: 10px; background: var(--surface);
  color: var(--muted); padding: 8px 12px; font-size: 0.82rem;
  transition: all 0.18s; min-width: 170px;
}
.search-trigger:hover { border-color: var(--brand); color: var(--ink); }
.search-trigger svg { width: 15px; height: 15px; stroke: currentColor; }
.search-trigger kbd {
  margin-left: auto; font-family: var(--font-mono); font-size: 0.62rem;
  border: 1px solid var(--line); border-radius: 5px; padding: 1px 6px; color: var(--muted);
}

/* ==========================================================================
   Buttons / chips / shared bits
   ========================================================================== */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-weight: 600; font-size: 0.85rem; border-radius: 10px;
  padding: 10px 18px; transition: all 0.2s var(--ease); border: 1px solid transparent;
}
.btn svg { width: 15px; height: 15px; stroke: currentColor; }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 6px 18px color-mix(in srgb, var(--brand) 35%, transparent); }
.btn-primary:hover { background: var(--brand-deep); transform: translateY(-1px); box-shadow: 0 8px 22px color-mix(in srgb, var(--brand) 45%, transparent); }
.btn-primary:active, .btn-ghost:active { transform: translateY(0) scale(0.97); }
.btn-ghost { border-color: var(--line); color: var(--ink-2); background: var(--surface); }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); transform: translateY(-1px); }
.btn-block { width: 100%; }

.chip {
  display: inline-flex; align-items: center;
  font-family: var(--font-mono); font-size: 0.6rem; font-weight: 700;
  letter-spacing: 0.13em; text-transform: uppercase;
  color: var(--accent, var(--brand));
  background: color-mix(in srgb, var(--accent, var(--brand)) 11%, transparent);
  padding: 4px 9px; border-radius: 6px;
  transition: background 0.2s, color 0.2s;
}
.chip--solid { background: var(--accent-solid, var(--brand)); color: #fff; }

.meta {
  display: flex; align-items: center; gap: 7px; flex-wrap: wrap;
  font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.04em; color: var(--muted);
}
.meta i { font-style: normal; opacity: 0.5; }

/* ==========================================================================
   Main content
   ========================================================================== */

.page { flex: 1; width: 100%; max-width: 1460px; margin: 0 auto; padding: 26px 28px 60px; }

.page-grid { display: grid; grid-template-columns: minmax(0, 1fr) var(--rail-w); gap: 28px; align-items: start; }

/* --- hero carousel --- */
.hero {
  position: relative; border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-md); background: var(--surface); border: 1px solid var(--line);
}
.hero-slides { display: flex; align-items: flex-start; transition: transform 0.65s var(--ease); }
:where(.hero-slide) { --accent: var(--brand); --accent-solid: var(--brand); }
.hero-slide { position: relative; flex: 0 0 100%; min-width: 0; display: flex; flex-direction: column; }
.hero-media { position: relative; aspect-ratio: 16 / 7.4; overflow: hidden; background: #05070b; }
.hero-media .art { position: absolute; inset: 0; width: 100%; height: 100%; animation: heroKen 16s ease-in-out infinite alternate; transform-origin: center; }
@keyframes heroKen { from { transform: scale(1); } to { transform: scale(1.09); } }
/* Real photos: padded + letterboxed (object-fit: contain) instead of full-bleed cover — a
   photo's real aspect ratio rarely matches this wide a band, and cropping/upscaling it to fill
   the space edge-to-edge was producing visible quality loss. The generative-art SVG fallback
   above is unaffected (vector art has no such quality concern, so it keeps filling the band). */
.hero-media img.art {
  inset: 20px; width: calc(100% - 40px); height: calc(100% - 40px);
  object-fit: contain; object-position: center; border-radius: 10px; animation: none;
}
/* Caption sits in its own solid panel below the photo instead of overlaid on top of it,
   so the image itself is never obscured by text. */
.hero-copy {
  position: relative; padding: 18px 26px 22px; min-height: 168px;
  border-top: 1px solid var(--line); color: var(--ink);
}
.hero-title {
  font-family: var(--font-display); font-weight: 700; font-size: clamp(1.1rem, 1.6vw, 1.5rem);
  line-height: 1.22; letter-spacing: -0.01em; margin-bottom: 8px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.hero-title a:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 5px; text-decoration-color: var(--accent); }
.hero-excerpt { font-size: 0.88rem; color: var(--muted); max-width: 560px; margin-bottom: 12px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hero .meta { color: var(--muted); }
.hero .meta span:first-child { color: var(--accent); font-weight: 600; }

.hero-nav {
  position: absolute; top: 22px; right: 22px; z-index: 3; display: flex; gap: 8px;
}
.hero-nav button {
  width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center;
  background: rgba(10, 12, 18, 0.45); color: #fff; backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.18); transition: background 0.18s;
}
.hero-nav button:hover { background: var(--brand); border-color: var(--brand); }
.hero-nav svg { width: 16px; height: 16px; stroke: currentColor; }

.hero-dots { position: absolute; bottom: 18px; right: 26px; z-index: 3; display: flex; gap: 7px; }
.hero-dots button { width: 22px; height: 4px; border-radius: 4px; background: var(--line); transition: all 0.25s; }
.hero-dots button.active { background: var(--brand); width: 34px; }

/* --- ads --- */
.ad-slot {
  display: grid; place-items: center; gap: 2px;
  border: 1.5px dashed var(--line); border-radius: var(--radius-sm);
  background: var(--surface-2); color: var(--muted);
  font-family: var(--font-mono); font-size: 0.6rem; letter-spacing: 0.22em; text-transform: uppercase;
  min-height: 90px; text-align: center; padding: 18px;
}
.ad-slot small { font-size: 0.56rem; letter-spacing: 0.12em; opacity: 0.65; }
.ad-slot--creative { display: block; padding: 0; border-style: solid; overflow: hidden; }
.ad-slot--creative a { display: block; width: 100%; height: 100%; }
.ad-slot--creative img { display: block; width: 100%; height: 100%; object-fit: cover; }
.ad-leaderboard { margin: 26px 0; min-height: 110px; }
.ad-mpu { min-height: 300px; }

/* leaderboard between topbar and page content — aligned with the content grid */
.ad-topline { min-height: 90px; margin-bottom: 26px; }

/* right-rail sliding events carousel — not ad-related, hence the separate
   naming from the .ad- prefixed placement boxes above. */
.rail-carousel {
  position: relative; overflow: hidden;
  border: 1.5px dashed var(--line); border-radius: var(--radius-sm);
  background: var(--surface-2);
}
.rail-car-track { display: flex; transition: transform 0.55s var(--ease); }
.rail-car-slide {
  flex: 0 0 100%; min-width: 0; min-height: 480px;
  display: grid; place-items: center; align-content: center; gap: 4px;
  color: var(--muted); font-family: var(--font-mono); font-size: 0.6rem;
  letter-spacing: 0.22em; text-transform: uppercase; text-align: center; padding: 18px;
}
.rail-car-slide small { font-size: 0.56rem; letter-spacing: 0.12em; opacity: 0.65; }
.rail-car-slide--creative { display: block; padding: 0; }
.rail-car-slide--creative img { display: block; width: 100%; height: 100%; object-fit: cover; }
.rail-car-btn {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center;
  background: var(--surface); border: 1px solid var(--line); color: var(--muted);
  transition: all 0.18s;
}
.rail-car-btn:hover { color: var(--brand); border-color: var(--brand); }
.rail-car-btn svg { width: 14px; height: 14px; stroke: currentColor; }
.rail-car-btn.prev { left: 10px; }
.rail-car-btn.next { right: 10px; }
.rail-car-dots { position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%); display: flex; gap: 6px; }
.rail-car-dots button { width: 6px; height: 6px; border-radius: 50%; background: var(--line); transition: all 0.2s; }
.rail-car-dots button.active { background: var(--brand); transform: scale(1.25); }

/* --- section blocks --- */
.section { margin-top: 40px; }
.section-head { display: flex; align-items: baseline; gap: 16px; margin-bottom: 18px; }
.section-title {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--font-display); font-size: 1.42rem; font-weight: 700; letter-spacing: -0.01em;
}
.section-title::before {
  content: ""; width: 4px; height: 22px; background: var(--accent, var(--brand)); border-radius: 3px; align-self: center;
  box-shadow: 0 0 8px color-mix(in srgb, var(--accent, var(--brand)) 55%, transparent);
  transition: background 0.2s;
}
.section-head .view-all {
  margin-left: auto; display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.78rem; font-weight: 600; color: var(--muted); transition: color 0.18s, gap 0.2s;
}
.section-head .view-all:hover { color: var(--brand); gap: 9px; }
.section-head .view-all svg { width: 14px; height: 14px; stroke: currentColor; }

/* --- pill toggle (e.g. magazine Regular/Special issue switch) --- */
.mag-toolbar { display: flex; margin-bottom: 22px; }
.pill-toggle { margin-left: auto; display: flex; gap: 4px; }
.pill-toggle button {
  padding: 7px 16px; border-radius: 999px; font-size: 0.8rem; font-weight: 600;
  color: var(--muted); transition: background 0.18s, color 0.18s;
}
.pill-toggle button:hover { color: var(--ink); }
.pill-toggle button.active { background: var(--brand); color: #fff; }

/* --- archive filter selects (e.g. magazine Month/Year) --- */
.archive-filters { margin-left: auto; display: flex; gap: 8px; }
.archive-filters select {
  padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); font-size: 0.8rem; font-family: inherit;
  outline: none; cursor: pointer; transition: border-color 0.18s;
}
.archive-filters select:focus, .archive-filters select:hover { border-color: var(--brand); }

.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); gap: 18px; }

/* --- pagination --- */
.pagination { display: flex; align-items: center; justify-content: center; gap: 6px; flex-wrap: wrap; margin-top: 34px; }
.pagination .page-btn {
  min-width: 38px; height: 38px; padding: 0 8px; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); border-radius: 9px; background: var(--surface); color: var(--ink);
  font-family: var(--font-mono); font-size: 0.8rem; font-weight: 600; cursor: pointer;
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease), background 0.2s var(--ease);
}
.pagination .page-btn:hover:not(:disabled):not(.active) { border-color: var(--brand); color: var(--brand); }
.pagination .page-btn.active { background: var(--brand); border-color: var(--brand); color: #fff; cursor: default; }
.pagination .page-btn:disabled { opacity: 0.35; cursor: not-allowed; }
.pagination .page-ellipsis { color: var(--muted); font-size: 0.8rem; padding: 0 2px; }

/* --- article card --- */
:where(.card) { --accent: var(--brand); --accent-solid: var(--brand); }
.card {
  position: relative; display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; transition: transform 0.28s var(--ease), box-shadow 0.28s var(--ease), border-color 0.28s;
}
.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 14px 28px -12px color-mix(in srgb, var(--accent) 45%, transparent), var(--shadow-md);
  border-color: color-mix(in srgb, var(--accent) 30%, transparent);
}
.card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px; z-index: 3;
  background: var(--accent); transform: scaleX(0); transform-origin: left;
  transition: transform 0.4s var(--ease);
}
.card:hover::before { transform: scaleX(1); }
.card-media { position: relative; aspect-ratio: 16 / 10; overflow: hidden; }
.card-media .art { width: 100%; height: 100%; transition: transform 0.6s var(--ease); }
img.art { object-fit: cover; display: block; }
.card:hover .card-media .art { transform: scale(1.045); }
.card-media .chip { position: absolute; top: 12px; left: 12px; z-index: 2; backdrop-filter: blur(4px); }
.card-media .chip { background: rgba(10, 12, 18, 0.55); color: #fff; display: inline-flex; align-items: center; }
.card-media .chip:not(.chip--solid)::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%; margin-right: 6px;
  background: var(--accent); box-shadow: 0 0 6px var(--accent);
}
.card-body { display: flex; flex-direction: column; gap: 10px; padding: 15px 16px 16px; flex: 1; }
.card-title {
  font-family: var(--font-display); font-size: 1.02rem; font-weight: 700; line-height: 1.3;
  letter-spacing: -0.005em;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.card-title a::after { content: ""; position: absolute; inset: 0; }
.card:hover .card-title { color: var(--accent); }
.card .meta { margin-top: auto; }

/* wide/lead card */
.card--lead .card-media { aspect-ratio: 16 / 8.2; }
.card--lead .card-title { font-size: 1.5rem; -webkit-line-clamp: 3; }
.card--lead .card-excerpt { color: var(--muted); font-size: 0.88rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* list row (search results, small lists) */
:where(.row-item) { --accent: var(--brand); }
.row-item {
  position: relative; display: grid; grid-template-columns: 92px 1fr; gap: 14px; align-items: center;
  padding: 10px; border-radius: var(--radius-sm); transition: background 0.16s;
}
.row-item:hover { background: var(--line-soft); }
.row-item .thumb { aspect-ratio: 16 / 11; border-radius: 8px; overflow: hidden; }
.row-item .thumb .art { width: 100%; height: 100%; }
.row-item h4 {
  font-family: var(--font-display); font-size: 0.9rem; font-weight: 600; line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.row-item:hover h4 { color: var(--accent); }
.row-item .meta { margin-top: 4px; }
.row-item > a::after { content: ""; position: absolute; inset: 0; }

/* --- right rail --- */
.rail { display: flex; flex-direction: column; gap: 22px; position: sticky; top: 82px; }
.rail-box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.rail-title {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-mono); font-size: 0.64rem; font-weight: 700;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px;
}
.rail-title::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.pop-list { display: flex; flex-direction: column; }
:where(.pop-item) { --accent: var(--brand); }
.pop-item { position: relative; display: flex; gap: 14px; padding: 11px 4px; border-bottom: 1px solid var(--line-soft); transition: padding-left 0.25s var(--ease); }
.pop-item:last-child { border-bottom: 0; }
.pop-item:hover { padding-left: 8px; }
.pop-item .rank {
  font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; font-style: italic;
  color: var(--line); line-height: 1; flex: none; width: 30px;
  transition: color 0.2s;
}
.pop-item:hover .rank { color: var(--accent); }
.pop-item h4 {
  font-size: 0.84rem; font-weight: 600; line-height: 1.35; transition: color 0.2s;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.pop-item:hover h4 { color: var(--accent); }
.pop-item .meta { margin-top: 4px; }
.pop-item > a::after { content: ""; position: absolute; inset: 0; }

/* newsletter */
.newsletter { background: linear-gradient(135deg, #17191f, #23262e); color: #fff; border: 0; }
html[data-theme="dark"] .newsletter { background: linear-gradient(135deg, #1c2027, #262b35); }
.newsletter .rail-title { color: rgba(255, 255, 255, 0.6); }
.newsletter .rail-title::after { background: rgba(255, 255, 255, 0.15); }
.newsletter h3 { font-family: var(--font-display); font-size: 1.18rem; line-height: 1.3; margin-bottom: 6px; }
.newsletter p { font-size: 0.8rem; color: rgba(255, 255, 255, 0.65); margin-bottom: 14px; }
.newsletter form { display: flex; flex-direction: column; gap: 10px; }
.newsletter input {
  width: 100%; padding: 11px 14px; border-radius: 10px; font-size: 0.85rem;
  background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.16); color: #fff;
  outline: none; transition: border-color 0.18s;
}
.newsletter input::placeholder { color: rgba(255, 255, 255, 0.4); }
.newsletter input:focus { border-color: var(--brand); }
.newsletter .ok { color: #7ee2a0; font-size: 0.82rem; font-weight: 600; }

/* ==========================================================================
   Category page
   ========================================================================== */

.page-head { padding: 8px 0 26px; border-bottom: 1px solid var(--line); margin-bottom: 26px; }
.page-head .chip { margin-bottom: 12px; }
.page-head h1 {
  font-family: var(--font-display); font-size: clamp(1.9rem, 3.4vw, 2.7rem);
  font-weight: 700; letter-spacing: -0.015em; line-height: 1.1;
}
.page-head p { color: var(--muted); margin-top: 10px; max-width: 640px; font-size: 0.95rem; }
.page-head .count { font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.1em; color: var(--muted); margin-top: 14px; text-transform: uppercase; }

/* ==========================================================================
   Article page
   ========================================================================== */

.article-head { max-width: 780px; margin: 6px 0 24px; }
.article-head .chip { margin-bottom: 16px; }
.article-title {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(1.7rem, 3.2vw, 2.55rem); line-height: 1.14; letter-spacing: -0.015em;
}
.article-sub { color: var(--muted); font-size: 1.02rem; margin-top: 14px; line-height: 1.6; }
.article-metabar {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line);
}
.byline { display: flex; align-items: center; gap: 10px; }
.byline .avatar {
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  background: var(--chip-bg); color: var(--brand); font-weight: 700; font-size: 0.8rem;
}
.byline b { font-size: 0.82rem; display: block; line-height: 1.2; }
.byline .meta { margin-top: 2px; }
.share-row { margin-left: auto; display: flex; gap: 6px; }
.share-row .icon-btn { width: 34px; height: 34px; border-radius: 9px; }

.article-hero { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-md); aspect-ratio: 16 / 8; }
.article-hero .art { width: 100%; height: 100%; }
.article-caption { font-family: var(--font-mono); font-size: 0.64rem; color: var(--muted); letter-spacing: 0.05em; margin-top: 10px; }

.article-body { max-width: 720px; margin-top: 26px; font-size: 1.02rem; line-height: 1.78; color: var(--ink-2); }
.article-body p { margin-bottom: 1.35em; }
.article-body p:first-child::first-letter {
  font-family: var(--font-display); font-weight: 700; font-size: 3.3em;
  float: left; line-height: 0.82; margin: 0.06em 0.13em 0 0; color: var(--brand);
}
.preview-note {
  font-size: 0.78rem; color: var(--muted); border-left: 3px solid var(--line);
  padding: 6px 14px; margin: 26px 0 0; font-style: italic;
}
.tag-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 26px; }

/* ==========================================================================
   Videos page
   ========================================================================== */

.video-card .card-media::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(5, 7, 11, 0.5), transparent 55%);
}
.play-badge {
  position: absolute; z-index: 2; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(255, 255, 255, 0.14); backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.35); color: #fff;
  transition: all 0.25s var(--ease);
}
.play-badge svg { width: 18px; height: 18px; fill: #fff; margin-left: 3px; }
.card:hover .play-badge { background: var(--brand); border-color: var(--brand); transform: translate(-50%, -50%) scale(1.1); }
/* video modal */
.modal {
  position: fixed; inset: 0; z-index: 260; display: grid; place-items: center; padding: 24px;
  background: rgba(6, 8, 12, 0.78); backdrop-filter: blur(10px);
  opacity: 0; pointer-events: none; transition: opacity 0.25s;
}
.modal.open { opacity: 1; pointer-events: auto; }
.modal-box {
  width: min(880px, 100%); background: var(--surface); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow-lg); transform: translateY(14px) scale(0.98);
  transition: transform 0.3s var(--ease);
}
.modal.open .modal-box { transform: none; }
.modal-player { position: relative; aspect-ratio: 16 / 9; background: #000; }
.modal-player iframe, .modal-player video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; }
.modal-player .video-unavailable {
  position: absolute; inset: 0; display: grid; place-items: center;
  color: var(--muted); font-size: 0.9rem;
}
.modal-meta { display: flex; align-items: center; gap: 14px; padding: 16px 20px; }
.modal-meta h3 { font-family: var(--font-display); font-size: 1.05rem; flex: 1; }
.modal-close { position: absolute; top: 14px; right: 14px; z-index: 5; background: rgba(5,7,11,.55); border-color: rgba(255,255,255,.2); color: #fff; }

/* ==========================================================================
   Magazine page
   ========================================================================== */

.mag-feature {
  display: grid; grid-template-columns: 300px 1fr; gap: 36px; align-items: center;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 32px; margin-bottom: 40px;
}
.mag-feature h2 { font-family: var(--font-display); font-size: clamp(1.5rem, 2.6vw, 2.1rem); line-height: 1.15; margin: 10px 0 12px; }
.mag-feature p { color: var(--muted); font-size: 0.95rem; max-width: 520px; }
.mag-feature .btn-row { display: flex; gap: 10px; margin-top: 22px; flex-wrap: wrap; }
.mag-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 22px; }
.mag-item .mag-cover { margin-bottom: 12px; }
.mag-item b { font-size: 0.86rem; display: block; }
.mag-item .meta { margin-top: 3px; }

/* ==========================================================================
   Search overlay
   ========================================================================== */

.search-overlay {
  position: fixed; inset: 0; z-index: 250; padding: 9vh 20px 20px;
  background: rgba(8, 10, 14, 0.62); backdrop-filter: blur(10px);
  display: flex; justify-content: center; align-items: flex-start;
  opacity: 0; pointer-events: none; transition: opacity 0.22s;
}
.search-overlay.open { opacity: 1; pointer-events: auto; }
.search-panel {
  width: min(640px, 100%); background: var(--surface); border-radius: 16px;
  box-shadow: var(--shadow-lg); overflow: hidden;
  transform: translateY(-12px); transition: transform 0.28s var(--ease);
  border: 1px solid var(--line);
}
.search-overlay.open .search-panel { transform: none; }
.search-bar { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.search-bar svg { width: 18px; height: 18px; stroke: var(--muted); flex: none; }
.search-bar input { flex: 1; border: 0; outline: none; background: none; font: inherit; font-size: 1rem; color: var(--ink); }
.search-bar kbd { font-family: var(--font-mono); font-size: 0.62rem; color: var(--muted); border: 1px solid var(--line); padding: 2px 7px; border-radius: 6px; }
.search-results { max-height: 54vh; overflow-y: auto; padding: 8px; }
.search-empty { padding: 34px 20px; text-align: center; color: var(--muted); font-size: 0.88rem; }
.search-hint { padding: 10px 18px; border-top: 1px solid var(--line-soft); font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: 0.08em; color: var(--muted); }

/* ==========================================================================
   Footer
   ========================================================================== */

.footer { border-top: 1px solid var(--line); background: var(--surface); margin-top: 30px; }
.footer-inner {
  max-width: 1460px; margin: 0 auto; padding: 44px 28px 0;
  display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.3fr; gap: 36px;
}
.footer-inner img { height: 40px; width: auto; margin-bottom: 14px; }
.footer-tag { font-size: 0.84rem; color: var(--muted); max-width: 300px; line-height: 1.6; }
.footer h5 {
  font-family: var(--font-mono); font-size: 0.62rem; font-weight: 700;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px;
}
.footer-links { list-style: none; display: flex; flex-direction: column; gap: 9px; }
.footer-links a { font-size: 0.85rem; color: var(--ink-2); transition: color 0.15s; }
.footer-links a:hover { color: var(--brand); }
.footer-bottom {
  max-width: 1460px; margin: 36px auto 0; padding: 18px 28px;
  border-top: 1px solid var(--line-soft);
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  font-size: 0.74rem; color: var(--muted);
}
/* ==========================================================================
   First-visit splash
   ========================================================================== */

.splash {
  position: fixed; inset: 0; z-index: 400;
  background: var(--bg);
  display: grid; place-items: center;
  transition: opacity 0.55s var(--ease), visibility 0.55s;
}
.splash-inner { display: flex; flex-direction: column; align-items: center; gap: 24px; padding: 24px; }
.splash-inner img { width: min(340px, 72vw); animation: splashLogo 0.9s var(--ease) both; }
@keyframes splashLogo {
  from { opacity: 0; transform: translateY(16px) scale(0.95); }
  to { opacity: 1; transform: none; }
}
.splash-bar { width: 150px; height: 3px; border-radius: 3px; background: var(--line); overflow: hidden; }
.splash-bar i {
  display: block; height: 100%; width: 100%;
  background: var(--brand); border-radius: 3px;
  transform-origin: left; transform: scaleX(0);
  animation: splashBar 1.35s 0.25s var(--ease) forwards;
}
@keyframes splashBar { to { transform: scaleX(1); } }
.splash-tag {
  font-family: var(--font-mono); font-size: 0.6rem; letter-spacing: 0.28em;
  text-transform: uppercase; color: var(--muted);
  opacity: 0; animation: splashTag 0.6s 0.55s ease forwards;
}
@keyframes splashTag { to { opacity: 1; } }
.splash.splash-out { opacity: 0; visibility: hidden; }
.splash.splash-out .splash-inner { animation: splashUp 0.5s var(--ease) both; }
@keyframes splashUp { to { transform: translateY(-12px) scale(1.02); opacity: 0; } }

/* scrim for mobile drawer */
.scrim {
  position: fixed; inset: 0; z-index: 110; background: rgba(8, 10, 14, 0.55);
  opacity: 0; pointer-events: none; transition: opacity 0.3s;
}
body.drawer-open .scrim { opacity: 1; pointer-events: auto; }

/* reveal animation */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
/* combined list keeps hover (box-shadow/border-color/transform) independently timed once revealed */
.card.reveal, .mag-item.reveal, .issue-tile.reveal {
  transition: opacity 0.55s var(--ease), transform 0.55s var(--ease), box-shadow 0.28s var(--ease), border-color 0.28s var(--ease);
}

/* ==========================================================================
   Reading-progress bar (article pages)
   ========================================================================== */
.progress-bar { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 95; background: transparent; pointer-events: none; }
.progress-bar i {
  display: block; height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--brand), var(--brand-deep));
  box-shadow: 0 0 8px color-mix(in srgb, var(--brand) 60%, transparent);
  transition: width 0.12s linear;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1280px) {
  :root { --rail-w: 288px; }
}

@media (max-width: 1150px) {
  .page-grid { grid-template-columns: minmax(0, 1fr); }
  .rail { position: static; display: grid; grid-template-columns: 1fr 1fr; align-items: start; }
}

@media (max-width: 1024px) {
  .sidebar { transform: translateX(-100%); box-shadow: none; }
  body.drawer-open .sidebar { transform: none; box-shadow: var(--shadow-lg); }
  .layout { margin-left: 0; }
  .menu-btn { display: grid; }
  .topbar-brand { display: block; margin-right: auto; }
  .ticker { display: none; }
  .search-trigger { min-width: 0; }
  .search-trigger span, .search-trigger kbd { display: none; }
  .search-trigger { width: 38px; height: 38px; padding: 0; justify-content: center; border-radius: 10px; }
}

@media (max-width: 760px) {
  .page { padding: 18px 16px 40px; }
  .topbar { padding: 10px 16px; }
  .hero-media { aspect-ratio: 16 / 12; }
  .hero-copy { padding: 22px 20px; min-height: 0; }
  .hero-excerpt { display: none; }
  .hero-nav { top: 14px; right: 14px; }
  .grid-cards { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
  .card-title { font-size: 0.92rem; }
  .rail { grid-template-columns: 1fr; }
  .mag-feature { grid-template-columns: 1fr; padding: 20px; }
  .mag-feature .mag-cover { max-width: 250px; }
  .footer-inner { grid-template-columns: 1fr 1fr; padding: 34px 16px 0; }
  .footer-bottom { padding: 16px; }
  .article-metabar .share-row { margin-left: 0; }
}

/* short laptop screens — tighten the sidebar so it never scrolls */
@media (max-height: 860px) and (min-width: 1025px) {
  .sidebar-inner { padding: 20px 18px 16px; }
  .brand { padding-bottom: 10px; }
  .nav a { padding: 7px 12px; }
  .issue-card { margin-top: 14px; padding: 13px 12px 12px; }
  .issue-label { margin-bottom: 10px; }
  .issue-mini .mag-cover { width: 66px; }
  .issue-info b { font-size: 0.92rem; }
  .issue-card .btn { margin-top: 11px; padding: 8px 14px; font-size: 0.8rem; }
  .sidebar-foot { padding-top: 16px; }
}
@media (max-height: 780px) and (min-width: 1025px) {
  .sidebar-inner { padding: 16px 16px 12px; }
  .brand { padding-bottom: 6px; }
  .brand img { width: 90%; }
  .nav a { padding: 5px 12px; font-size: 0.86rem; }
  .nav-heading { padding: 4px 12px 4px; }
  .issue-card { margin-top: 10px; }
  .fineprint { display: none; }
}
@media (max-height: 690px) and (min-width: 1025px) {
  .issue-mini .mag-cover { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  html { scroll-behavior: auto; }
}

/* ==========================================================================
   About / Contact pages
   ========================================================================== */
.stat-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 22px; }
.stat-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 18px; text-align: center; }
.stat-card b { display: block; font-family: var(--font-display); font-size: 1.7rem; color: var(--brand); }
.stat-card span { font-size: 0.68rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.07em; }

.about-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 32px; align-items: start; }
.about-copy p { color: var(--muted); line-height: 1.8; font-size: 0.95rem; margin-bottom: 16px; }
.about-values { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.value-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.value-card h3 { font-family: var(--font-display); font-size: 1.05rem; margin-bottom: 8px; }
.value-card p { color: var(--muted); font-size: 0.86rem; line-height: 1.6; }

.contact-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 26px; align-items: start; }
.contact-info-card { display: flex; gap: 14px; align-items: flex-start; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-bottom: 14px; }
.contact-info-card .ico {
  width: 42px; height: 42px; border-radius: 11px; flex-shrink: 0; color: var(--brand);
  background: color-mix(in srgb, var(--brand) 14%, transparent);
  display: flex; align-items: center; justify-content: center;
}
.contact-info-card .ico svg { width: 20px; height: 20px; stroke: currentColor; }
.contact-info-card h3 { font-size: 0.92rem; margin-bottom: 4px; }
.contact-info-card p { font-size: 0.84rem; color: var(--muted); line-height: 1.6; }
.contact-info-card a { color: var(--brand); font-weight: 600; }
.map-embed { border-radius: var(--radius); border: 1px solid var(--line); overflow: hidden; aspect-ratio: 16 / 9; }
.map-embed iframe { width: 100%; height: 100%; border: 0; display: block; }

.contact-form-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow-sm); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field label { font-size: 0.76rem; font-weight: 600; color: var(--muted); }
.field input, .field select, .field textarea {
  padding: 11px 14px; border-radius: var(--radius-sm); border: 1.5px solid var(--line);
  background: var(--bg); color: var(--ink); font-family: inherit; font-size: 0.88rem; outline: none;
  transition: border-color 0.2s;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--brand); }
.field textarea { resize: vertical; }

@media (max-width: 860px) {
  .about-grid, .contact-grid { grid-template-columns: 1fr; }
  .about-values { grid-template-columns: 1fr; }
  .stat-strip { grid-template-columns: repeat(2, 1fr); }
  .form-row { grid-template-columns: 1fr; }
}
