/* Page: AppBX — Software Distribution (index.html) */
/* ==========================================================================
   GLOBAL DESIGN TOKENS
   ========================================================================== */
:root {
  --color-primary: #6366f1;
  --color-primary-hover: #4f46e5;
  --color-accent: #06b6d4;
  --color-bg: #0b0f19;
  --color-surface: #131b2e;
  --color-surface-hover: #1e293b;
  --color-border: #243049;
  --color-text: #f8fafc;
  --color-text-muted: #94a3b8;
  --font-sans: 'Inter', -apple-system, sans-serif;
  --font-heading: 'Outfit', sans-serif;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.25rem;
  --text-2xl: 1.75rem;
  --text-4xl: 2.5rem;
  --text-6xl: 3.75rem;
  --space-2: 0.5rem;
  --space-4: 1rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 24px rgba(99, 102, 241, 0.35);
}

/* ==========================================================================
   CSS RESET & BASE NORMALIZATION
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
}
body {
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
}
img, svg, video, canvas, audio, iframe, embed, object {
  display: block;
  max-width: 100%;
  height: auto;
}

/* ==========================================================================
   CORE BASE & DESKTOP STYLES
   ========================================================================== */
body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
}

/* Page: NetPulse Monitor — AppBX (netpulse-monitor.html) */
/* ==========================================================================
   GLOBAL DESIGN TOKENS
   ========================================================================== */
:root {
  --color-primary: #6366f1;
  --color-primary-hover: #4f46e5;
  --color-accent: #06b6d4;
  --color-bg: #0b0f19;
  --color-surface: #131b2e;
  --color-surface-hover: #1e293b;
  --color-border: #243049;
  --color-text: #f8fafc;
  --color-text-muted: #94a3b8;
  --font-sans: 'Inter', -apple-system, sans-serif;
  --font-heading: 'Outfit', sans-serif;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.25rem;
  --text-2xl: 1.75rem;
  --text-4xl: 2.5rem;
  --text-6xl: 3.75rem;
  --space-2: 0.5rem;
  --space-4: 1rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 24px rgba(99, 102, 241, 0.35);
}

/* ==========================================================================
   CSS RESET & BASE NORMALIZATION
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
}
body {
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
}
img, svg, video, canvas, audio, iframe, embed, object {
  display: block;
  max-width: 100%;
  height: auto;
}

/* ==========================================================================
   CORE BASE & DESKTOP STYLES
   ========================================================================== */
body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
}

/* Page: QP UI Builder — AppBX (qp-ui-builder.html) */
/* ==========================================================================
   GLOBAL DESIGN TOKENS
   ========================================================================== */
:root {
  --color-primary: #6366f1;
  --color-primary-hover: #4f46e5;
  --color-accent: #06b6d4;
  --color-bg: #0b0f19;
  --color-surface: #131b2e;
  --color-surface-hover: #1e293b;
  --color-border: #243049;
  --color-text: #f8fafc;
  --color-text-muted: #94a3b8;
  --font-sans: 'Inter', -apple-system, sans-serif;
  --font-heading: 'Outfit', sans-serif;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.25rem;
  --text-2xl: 1.75rem;
  --text-4xl: 2.5rem;
  --text-6xl: 3.75rem;
  --space-2: 0.5rem;
  --space-4: 1rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 24px rgba(99, 102, 241, 0.35);
}

/* ==========================================================================
   CSS RESET & BASE NORMALIZATION
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
}
body {
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
}
img, svg, video, canvas, audio, iframe, embed, object {
  display: block;
  max-width: 100%;
  height: auto;
}

/* ==========================================================================
   CORE BASE & DESKTOP STYLES
   ========================================================================== */
body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
}

/* Page: QuickPack Archiver — AppBX (quickpack-archiver.html) */
/* ==========================================================================
   GLOBAL DESIGN TOKENS
   ========================================================================== */
:root {
  --color-primary: #6366f1;
  --color-primary-hover: #4f46e5;
  --color-accent: #06b6d4;
  --color-bg: #0b0f19;
  --color-surface: #131b2e;
  --color-surface-hover: #1e293b;
  --color-border: #243049;
  --color-text: #f8fafc;
  --color-text-muted: #94a3b8;
  --font-sans: 'Inter', -apple-system, sans-serif;
  --font-heading: 'Outfit', sans-serif;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.25rem;
  --text-2xl: 1.75rem;
  --text-4xl: 2.5rem;
  --text-6xl: 3.75rem;
  --space-2: 0.5rem;
  --space-4: 1rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 24px rgba(99, 102, 241, 0.35);
}

/* ==========================================================================
   CSS RESET & BASE NORMALIZATION
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
}
body {
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
}
img, svg, video, canvas, audio, iframe, embed, object {
  display: block;
  max-width: 100%;
  height: auto;
}

/* ==========================================================================
   CORE BASE & DESKTOP STYLES
   ========================================================================== */
body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
}

/* ==========================================================================
   Template Stylesheet: styles.css
   ========================================================================== */
/* ==========================================================================
   AppBX Software Distribution — Stylesheet
   Tokens derived directly from the QP UI Builder wireframe layout.
   ========================================================================== */

:root {
  color-scheme: dark;

  /* Wireframe Palette */
  --color-frame: #0166fb;
  --color-frame-hover: #1d78ff;
  --color-canvas: #070a10;
  --color-surface: #161f30;
  --color-surface-elevated: #1d283d;
  --color-surface-hover: #22304a;
  --color-border: #2d3d56;
  --color-accent: #38bdf8;
  --color-accent-soft: rgba(56, 189, 248, 0.14);
  --color-text: #f8fafc;
  --color-text-muted: #94a3b8;
  --color-text-subtle: #cbd5e1;

  /* Geometry & Elevation */
  --banner-height: 68px;
  --sidebar-width: 240px;
  --frame-padding: 10px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --shadow-panel: 0 8px 20px rgba(0, 0, 0, 0.35);

  /* Typography */
  --font-sans: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

html,
body {
  margin: 0;
  padding: 0;
  block-size: 100%;
  background: var(--color-canvas);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ==========================================================================
   Accessibility Utilities & Focus Styling
   ========================================================================== */

.visually-hidden:where(:not(:focus-within, :active)) {
  position: absolute !important;
  clip-path: inset(50%) !important;
  overflow: hidden !important;
  inline-size: 1px !important;
  block-size: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  border: 0 !important;
  white-space: nowrap !important;
}

.skip-link:focus-visible {
  position: fixed;
  inset-block-start: 12px;
  inset-inline-start: 12px;
  z-index: 9999;
  padding: 0.65rem 1rem;
  background: var(--color-canvas);
  color: var(--color-text);
  border: 2px solid var(--color-accent);
  border-radius: var(--radius-sm);
  font-weight: 600;
  text-decoration: none;
}

:where(a:any-link, button, [tabindex="-1"]):focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 3px;
}

/* ==========================================================================
   Persistent Application Shell (Full Viewport Grid)
   ========================================================================== */

.app-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: var(--banner-height) minmax(0, 1fr);
  grid-template-areas:
    "banner"
    "main";
  block-size: 100dvb;
  inline-size: 100%;
  background: var(--color-surface);
  overflow: clip;
}

/* ==========================================================================
   Persistent Top Ad Banner
   ========================================================================== */

.ad-banner {
  grid-area: banner;
  display: flex;
  align-items: safe center;
  gap: 0.75rem;
  min-inline-size: 0;
  inline-size: 100%;
  padding-inline: 12px;
  padding-block: 8px;
  background: var(--color-frame);
  color: var(--color-text);
  view-transition-name: ad-banner;
  min-block-size: var(--banner-height);
  overflow: clip;
}

.menu-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  min-inline-size: 40px;
  min-block-size: 40px;
  padding: 0.4rem;
  background: rgba(22, 31, 48, 0.85);
  color: var(--color-text);
  border: 1px solid rgba(248, 250, 252, 0.28);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color 140ms ease, background-color 140ms ease;
}

.menu-trigger:hover {
  background: var(--color-surface);
  border-color: var(--color-accent);
}

.ad-slot {
  flex: 1 1 auto;
  min-inline-size: 0;
  max-inline-size: 728px;
  min-block-size: 46px;
  margin-inline: auto;
  padding: 0.4rem 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  background: rgba(7, 10, 16, 0.16);
  border: 1px dashed rgba(248, 250, 252, 0.45);
  border-radius: var(--radius-sm);
  text-align: center;
}

.ad-slot-badge {
  flex-shrink: 0;
  padding: 0.15rem 0.45rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  background: rgba(7, 10, 16, 0.35);
  color: var(--color-text);
  border-radius: 4px;
}

.ad-slot-text {
  min-inline-size: 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ==========================================================================
   Persistent Left Navigation Sidebar & Mobile Swipe Drawer
   ========================================================================== */

.nav-frame {
  display: flex;
  flex-direction: column;
  inline-size: 100%;
  block-size: 100%;
  padding: var(--frame-padding);
  background: var(--color-frame);
}

.nav-card {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-block-size: 0;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-panel);
  color: var(--color-text);
  overflow: clip;
}

.nav-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.9rem 0.85rem 0.8rem;
  border-block-end: 1px solid var(--color-border);
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-block-size: 32px;
  color: var(--color-text);
  text-decoration: none;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.brand-icon {
  display: block;
  flex-shrink: 0;
}

.brand-link:hover .brand-name {
  color: var(--color-accent);
}

.drawer-close-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-inline-size: 36px;
  min-block-size: 36px;
  padding: 0.35rem;
  background: transparent;
  color: var(--color-text-muted);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: color 140ms ease, border-color 140ms ease, background-color 140ms ease;
}

.drawer-close-btn:hover {
  color: var(--color-text);
  border-color: var(--color-accent);
  background: var(--color-surface-elevated);
}

.software-nav {
  flex: 1 1 auto;
  min-block-size: 0;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  scrollbar-gutter: stable;
  overscroll-behavior: contain;
  padding: 0.75rem 0.65rem;
}

.nav-section-label {
  margin: 0 0 0.5rem;
  padding-inline: 0.45rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
}

.nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.nav-link {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 0.2rem;
  min-block-size: 40px;
  padding: 0.5rem 0.65rem;
  color: var(--color-text-subtle);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.3;
  background: transparent;
  border: 1px solid transparent;
  border-inline-start: 3px solid transparent;
  border-radius: var(--radius-sm);
  transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease, filter 140ms ease;
}

.nav-link:hover {
  background: var(--color-surface-elevated);
  border-color: var(--color-accent);
  color: var(--color-text);
  filter: brightness(1.05);
}

.nav-link[aria-current="page"] {
  background: var(--color-accent-soft);
  border-color: rgba(56, 189, 248, 0.4);
  border-inline-start-color: var(--color-accent);
  color: var(--color-text);
  font-weight: 600;
}

.nav-link-name {
  min-inline-size: 0;
  inline-size: 100%;
  overflow-wrap: break-word;
}

.nav-link-version {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--color-text-muted);
}

.nav-link[aria-current="page"] .nav-link-version {
  color: var(--color-accent);
}

.nav-card-footer {
  margin-block-start: auto;
  padding: 0.7rem 0.85rem;
  border-block-start: 1px solid var(--color-border);
  font-size: 0.76rem;
  color: var(--color-text-muted);
}

/* Mobile Drawer Mode (< 768px) */
@media (max-width: 767px) {
  .Drawer {
    --drawer-width: min(270px, 82dvw, 100dvw - 24px);
    --drawer-backdrop: 0;

    position: fixed;
    inset: 0;
    inline-size: 100%;
    block-size: 100%;
    max-inline-size: none;
    max-block-size: none;
    margin: 0;
    padding: 0;
    background: transparent;
    border: 0;
    overflow: visible;
  }

  .Drawer::backdrop {
    background: #000;
    opacity: calc(var(--drawer-backdrop) / 2);
  }

  .Drawer-scroller {
    position: relative;
    display: grid;
    inline-size: 100%;
    block-size: 100%;
    grid-template-columns: var(--drawer-width) 100%;
    overflow-x: scroll;
    overscroll-behavior: none;
    scrollbar-width: none;
    scroll-snap-type: x mandatory;
  }

  @media (prefers-reduced-motion: no-preference) {
    .Drawer-scroller {
      scroll-behavior: smooth;
    }
  }

  .Drawer-scroller::after {
    content: "";
    scroll-snap-align: end;
    scroll-initial-target: nearest;
  }

  .Drawer-sheet {
    display: flex;
    block-size: 100svh;
    inline-size: 100%;
    overflow-y: auto;
    scroll-snap-align: start;
    scrollbar-width: none;
  }

  @supports (animation-timeline: scroll()) {
    .Drawer {
      timeline-scope: --drawer-fade;
      animation: fade-drawer-backdrop linear both;
      animation-timeline: --drawer-fade;
    }

    .Drawer-scroller {
      scroll-timeline: --drawer-fade x;
    }

    @property --drawer-backdrop {
      syntax: "<number>";
      inherits: true;
      initial-value: 0;
    }

    @keyframes fade-drawer-backdrop {
      0% {
        --drawer-backdrop: 1;
      }
      100% {
        --drawer-backdrop: 0;
      }
    }
  }

  .ad-slot-badge {
    display: none;
  }
}

/* Desktop Sidebar Mode (>= 768px) */
@media (min-width: 768px) {
  .app-shell {
    grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
    grid-template-rows: var(--banner-height) minmax(0, 1fr);
    grid-template-areas:
      "banner  banner"
      "sidebar main";
  }

  .menu-trigger,
  .drawer-close-btn {
    display: none;
  }

  .Drawer {
    /* Override UA [popover]:not(:popover-open) { display: none } */
    display: block;
    position: static;
    inset: auto;
    margin: 0;
    padding: 0;
    border: 0;
    grid-area: sidebar;
    inline-size: 100%;
    block-size: 100%;
    min-block-size: 0;
    background: var(--color-frame);
    color: var(--color-text);
    overflow: visible;
    view-transition-name: nav-sidebar;
  }

  .Drawer-scroller {
    display: block;
    inline-size: 100%;
    block-size: 100%;
    overflow: visible;
    scroll-snap-type: none;
  }

  .Drawer-scroller::after {
    display: none;
  }

  .Drawer-sheet {
    display: flex;
    inline-size: 100%;
    block-size: 100%;
  }
}

/* ==========================================================================
   Dynamic Main Window
   ========================================================================== */

.main-window {
  grid-area: main;
  min-block-size: 0;
  min-inline-size: 0;
  background: var(--color-surface);
  overflow-y: auto;
  scrollbar-gutter: stable;
  overscroll-behavior: contain;
  container: main / inline-size;
}

.main-content {
  max-inline-size: 980px;
  padding-inline: clamp(1.25rem, 4cqi, 2.75rem);
  padding-block: clamp(1.5rem, 3.5cqi, 2.5rem);
  view-transition-name: main-content;
}

/* Home View */
.hero-block {
  margin-block-end: 2rem;
  padding-block-end: 1.5rem;
  border-block-end: 1px solid var(--color-border);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0 0 0.6rem;
  padding: 0.25rem 0.65rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--color-accent);
  background: var(--color-accent-soft);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 999px;
}

.view-heading {
  margin: 0 0 0.55rem;
  font-size: clamp(1.6rem, 4cqi, 2.25rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--color-text);
}

.view-heading:focus {
  outline: none;
}

.view-heading:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 4px;
  border-radius: 4px;
}

.hero-lead {
  margin: 0;
  max-inline-size: 62ch;
  color: var(--color-text-muted);
  font-size: 1rem;
}

.section-heading {
  margin: 0 0 1rem;
  font-size: 1.12rem;
  font-weight: 600;
  color: var(--color-text);
}

/* Catalog Grid on Home View */
.catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  grid-auto-rows: auto;
  gap: 1.15rem;
}

.software-card {
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 0.85rem;
  padding: 1.25rem;
  background: var(--color-surface-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
  transition: border-color 150ms ease, transform 150ms ease, background-color 150ms ease;
}

.software-card:hover {
  border-color: var(--color-accent);
  background: var(--color-surface-hover);
  transform: translateY(-2px);
}

.software-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.software-card-title {
  margin: 0;
  font-size: 1.12rem;
  font-weight: 600;
  color: var(--color-text);
}

.software-card-summary {
  margin: 0;
  font-size: 0.92rem;
  color: var(--color-text-muted);
}

.software-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding-block-start: 0.75rem;
  border-block-start: 1px solid rgba(45, 61, 86, 0.75);
}

.software-card-meta {
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

.card-action-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-block-size: 32px;
  padding: 0.35rem 0.75rem;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--color-text);
  background: var(--color-frame);
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: background-color 140ms ease;
}

.card-action-link:hover {
  background: var(--color-frame-hover);
}

/* Badges */
.badge-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
  margin-block-end: 0.75rem;
}

.version-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.6rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--color-accent);
  background: var(--color-accent-soft);
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 999px;
}

.category-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.6rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--color-text-subtle);
  background: rgba(7, 10, 16, 0.35);
  border: 1px solid var(--color-border);
  border-radius: 999px;
}

.release-date {
  font-size: 0.84rem;
  color: var(--color-text-muted);
}

/* Software Detail View */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-block-size: 32px;
  margin-block-end: 1.1rem;
  color: var(--color-accent);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
}

.back-link:hover {
  text-decoration: underline;
}

.detail-header {
  margin-block-end: 1.75rem;
  padding-block-end: 1.35rem;
  border-block-end: 1px solid var(--color-border);
}

.detail-tagline {
  margin: 0.5rem 0 0;
  font-size: 1.05rem;
  color: var(--color-text-subtle);
  max-inline-size: 66ch;
}

.detail-panel {
  padding: 1.35rem;
  margin-block-end: 1.5rem;
  background: var(--color-surface-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}

.overview-copy p {
  margin: 0 0 0.85rem;
  color: var(--color-text-subtle);
  max-inline-size: 72ch;
}

.overview-copy p:last-child {
  margin-block-end: 0;
}

.highlights-list {
  margin: 1rem 0 0;
  padding-inline-start: 1.25rem;
  color: var(--color-text-subtle);
  display: grid;
  gap: 0.4rem;
}

/* Downloads Section */
.downloads-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
}

@container main (inline-size > 560px) {
  .downloads-list {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  }
}

.download-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-block-size: 64px;
  padding: 0.95rem 1.15rem;
  background: var(--color-surface);
  color: var(--color-text);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: border-color 140ms ease, background-color 140ms ease, transform 140ms ease;
}

.download-btn:hover {
  border-color: var(--color-accent);
  background: var(--color-surface-hover);
  transform: translateY(-1px);
}

.download-btn--primary {
  background: var(--color-frame);
  border-color: rgba(248, 250, 252, 0.28);
}

.download-btn--primary:hover {
  background: var(--color-frame-hover);
  border-color: var(--color-accent);
}

.download-btn-info {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-inline-size: 0;
}

.download-platform {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--color-text);
}

.download-meta {
  font-size: 0.82rem;
  color: var(--color-text-subtle);
}

.download-btn--primary .download-meta {
  color: rgba(248, 250, 252, 0.88);
}

.download-icon {
  display: block;
  flex-shrink: 0;
}

.download-note {
  margin: 0.9rem 0 0;
  font-size: 0.82rem;
  color: var(--color-text-muted);
}

/* Not Found & NoScript */
.not-found-panel,
.noscript-notice {
  padding: 1.75rem;
  background: var(--color-surface-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}

.primary-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-block-start: 1rem;
  padding: 0.65rem 1.1rem;
  background: var(--color-frame);
  color: var(--color-text);
  border-radius: var(--radius-sm);
  font-weight: 600;
  text-decoration: none;
}

.primary-link-btn:hover {
  background: var(--color-frame-hover);
}

/* ==========================================================================
   Touch Targets & View Transitions
   ========================================================================== */

@media (pointer: coarse) {
  .nav-link,
  .menu-trigger,
  .drawer-close-btn,
  .card-action-link,
  .back-link {
    min-block-size: 44px;
  }
}

::view-transition-old(root),
::view-transition-new(root),
::view-transition-old(ad-banner),
::view-transition-new(ad-banner),
::view-transition-old(nav-sidebar),
::view-transition-new(nav-sidebar) {
  animation: none;
}

::view-transition-old(main-content) {
  animation: 120ms ease-out both vt-fade-out;
}

::view-transition-new(main-content) {
  animation: 160ms ease-out both vt-fade-in;
}

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

@keyframes vt-fade-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

  ::view-transition-group(*),
  ::view-transition-old(*),
  ::view-transition-new(*) {
    animation: none !important;
  }
}