/* PATHWAYS WEB — layout.css , components.css , panels.css , animations.css , rtl.css , main.css */
/* ═══════════════════════════════════════════════════════════
  layout.css 
  Page wrapper, landing sections, demo app layout 
   ═══════════════════════════════════════════════════════════ */

/* ── PAGE WRAPPER ───────────────────────────────────────────── */
.page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 var(--sp-6);
  width: 100%;
}

.container-narrow {
  max-width: 740px;
  margin: 0 auto;
  padding: 0 var(--sp-6);
  width: 100%;
}

/* ── HERO ────────────────────────────────────────────────────── */
.hero {
  padding: var(--sp-24) 0 var(--sp-16);
  position: relative;
  overflow: hidden;
}

.hero-bg {
  position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(ellipse 60% 50% at 30% 30%, rgba(0,189,189,0.06) 0%, transparent 60%),
    radial-gradient(ellipse 40% 60% at 80% 70%, rgba(52,152,219,0.04) 0%, transparent 55%);
}

.hero-grid {
  position: absolute; inset: 0; z-index: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 0%, black 0%, transparent 75%);
}

[data-theme="light"] .hero-grid {
  background-image:
    linear-gradient(rgba(0,0,0,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,0,0,0.04) 1px, transparent 1px);
}

.hero-content {
  position: relative; z-index: 1;
  display: grid;
  grid-template-columns: 1fr; /* mobile: single column — two at min-width:1025px */
  gap: var(--sp-10);
  align-items: center;
}

.hero-left {
  display: flex; flex-direction: column; gap: var(--sp-6);
  text-align: center;
  align-items: center;
  max-width: 600px;
  margin: 0 auto;
}

.hero-eyebrow {
  display: flex; align-items: center; gap: var(--sp-3);
}

.hero-title {
  letter-spacing: -0.03em;
  line-height: 1.07;
  font-family:"RubikDoodle";
}
.hero-title .accent {
  color: var(--teal);
  position: relative;
  display: inline-block;
}
.hero-title .accent::after {
  content: '';
  position: absolute;
  bottom: 4px; left: 0;
  width: 100%; height: 3px;
  background: var(--teal);
  border-radius: 2px;
  opacity: 0.35;
}

.hero-desc {
  font-size: 1.06rem;
  max-width: 480px;
  line-height: 1.75;
}

.hero-cta {
  display: flex; flex-wrap: wrap;
  align-items: center; gap: var(--sp-3);
  justify-content: center; /* mobile — left-aligned at min-width:1025px */
}

.hero-right {
  display: none; /* mobile: hidden — shown at min-width:1025px */
  align-items: center; justify-content: center;
}

/* ── APP PREVIEW MOCKUP ─────────────────────────────────────── */
.app-mockup {
  width: 100%;
  max-width: 480px;
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg), 0 0 60px rgba(0,189,189,0.08);
  overflow: hidden;
}

.mockup-titlebar {
  display: flex; align-items: center;
  padding: 10px 14px; gap: var(--sp-3);
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border-subtle);
}
.mockup-dots { display: flex; gap: 5px; }
.mockup-dot {
  width: 10px; height: 10px; border-radius: 50%;
}
.dot-red    { background: #ff5f57; }
.dot-yellow { background: #febc2e; }
.dot-green  { background: #28c840; }
.mockup-title {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-left: auto;
}
.mockup-body { padding: var(--sp-5); display: flex; flex-direction: column; gap: var(--sp-3); }

.mockup-section {
  border: 1px solid var(--teal-border);
  border-radius: var(--r-md);
  padding: var(--sp-3) var(--sp-4);
}
.mockup-section-title {
  font-family: var(--font-mono);
  font-size: 0.7rem; font-weight: 700;
  color: var(--teal);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--sp-2);
}
.mockup-row {
  display: flex; gap: var(--sp-2);
  align-items: center;
}
.mockup-input {
  flex: 1; height: 26px;
  background: var(--bg-input);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-sm);
}
.mockup-btn {
  height: 26px; padding: 0 10px;
  background: var(--teal-dim);
  border: 1px solid var(--teal-border);
  border-radius: var(--r-sm);
  font-family: var(--font-mono);
  font-size: 0.65rem; font-weight: 600;
  color: var(--teal);
}
.mockup-stat {
  height: 32px;
  background: var(--bg-input);
  border: 1px solid var(--teal-border);
  border-radius: var(--r-sm);
  display: flex; align-items: center;
  padding: 0 var(--sp-3);
  font-family: var(--font-mono); font-size: 0.7rem;
  color: var(--teal);
}
.mockup-tags {
  display: flex; flex-wrap: wrap; gap: var(--sp-1);
  margin-top: var(--sp-2);
}
.mockup-tag {
  padding: 2px 7px;
  background: var(--teal-dim);
  border: 1px solid rgba(0,189,189,0.2);
  border-radius: var(--r-sm);
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--teal);
}

/* ── RESPONSIVE BREAKPOINTS — rebuilt as Mobile First at end of file ── */

/* ── FEATURES SECTION ───────────────────────────────────────── */
.section {
  padding: var(--sp-16) 0;
}

.section-header {
  display: flex; flex-direction: column; align-items: center;
  gap: var(--sp-3); text-align: center;
  margin-bottom: var(--sp-12);
}
.section-header .teal-line { margin: 0 auto; }

.features-grid {
  display: grid;
  grid-template-columns: 1fr; /* mobile: single column — 2-col at 600px, 3-col at 1025px */
  gap: var(--sp-5);
}

/* ── FORMATS SECTION ────────────────────────────────────────── */
.formats-list {
  display: flex; flex-wrap: wrap;
  gap: var(--sp-3); justify-content: center;
}
.format-pill {
  display: flex; align-items: center; gap: var(--sp-2);
  padding: var(--sp-3) var(--sp-5);
  border-radius: var(--r-pill);
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  font-family: var(--font-mono);
  font-size: 0.84rem; font-weight: 600;
  color: var(--text-secondary);
  transition: all var(--t-xs);
}
.format-pill:hover { border-color: var(--teal-border); color: var(--teal); background: var(--teal-dim); }
.format-pill .ext { color: var(--teal); }

/* ── SITE FOOTER ────────────────────────────────────────────── */
.site-footer {
  margin-top: auto;
  padding: var(--sp-6) 0;
  border-top: 1px solid var(--border-subtle);
}
.footer-inner {
  display: flex;
  flex-direction: column; /* mobile: stacked — row at min-width:769px */
  align-items: center;
  text-align: center;
  gap: var(--sp-4);
  flex-wrap: wrap;
}
.footer-left {
  display: flex; align-items: center; gap: var(--sp-3);
}
.footer-brand {
  font-family: "RubikDoodle";
  font-weight: 700; font-size: 0.95rem;
  color: var(--text-primary);
}
.footer-brand span { color: var(--teal); }
.footer-copy {
  font-size: 0.78rem; color: var(--text-muted);
  font-family: "LibreBaskerville", Georgia, serif;
  font-weight: bold;
}

/* ── DEMO APP LAYOUT ────────────────────────────────────────── */
.demo-page {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: var(--sp-3); /* mobile — expanded at min-width:600px */
  gap: var(--sp-5);
  position: relative;
}

.demo-layout {
  display: flex;
  gap: var(--sp-5);
  align-items: flex-start;
  justify-content: center;
  position: relative;
}

/* Main app panel — matches Qt's fixed 540px window */
.app-panel {
  width: 100%;
  max-width: var(--app-width);
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  flex-shrink: 0;
  padding: 0 var(--sp-2); /* mobile — removed at min-width:600px */
}

.app-panel .group-box {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

/* Folder row */
.folder-row {
  display: flex; align-items: center; gap: var(--sp-2);
}
.folder-row .logo-img-wrap {
  width: 80px; height: 34px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.folder-row .logo-img-wrap img {
  max-width: 100%; max-height: 34px;
  object-fit: contain;
}
.folder-row{
  font-family: var(--font-display);
  font-size: 0.75rem; font-weight: 800;
  color: var(--teal);
  letter-spacing: 0.05em;
}
.folder-row .input { flex: 1; }

/* Quick select row — see components section for full definition */

/* Scan/export rows */
.scan-row {
  display: flex; align-items: center; gap: var(--sp-2);
}
.scan-row .btn:first-child { flex: 1; }

/* Export format + name row */
.export-row {
  display: flex;
  flex-direction: column; /* mobile: stacked — row at min-width:600px */
  align-items: stretch;
  gap: var(--sp-2);
}
.export-row .select-wrap { flex: 1; }
.export-row .input { flex: 1; }

/* Export action row */
.export-btns {
  display: flex; gap: var(--sp-2);
}
.export-btns .btn-primary { flex: 1; }
.export-btns .btn-red { flex: 0 0 140px; }

/* ── BROWSER COMPAT WARNING ─────────────────────────────────── */
.compat-banner {
  background: rgba(231,76,60,0.10);
  border: 1px solid rgba(231,76,60,0.25);
  border-radius: var(--r-lg);
  padding: var(--sp-4) var(--sp-5);
  display: flex; align-items: flex-start; gap: var(--sp-3);
  font-size: 0.86rem;
}
.compat-banner .icon { font-size: 1.1rem; flex-shrink: 0; margin-top: 2px; }

/* ── RESPONSIVE (demo-specific) — rebuilt as Mobile First at end of file ── */
/* ═══════════════════════════════════════════════════════════
   PATHWAYS WEB — components.css
   Buttons, Inputs, Select, Progress, Group Boxes
   ═══════════════════════════════════════════════════════════ */

/* ── SITE HEADER ──────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 200;
  height: 56px;
  background: rgba(17,17,17,0.92);
  backdrop-filter: blur(20px) saturate(1.5);
  -webkit-backdrop-filter: blur(20px) saturate(1.5);
  border-bottom: 1px solid var(--border-subtle);
  display: flex; align-items: center;
  padding: 0 var(--sp-4); /* mobile — expanded at 769px */
  gap: var(--sp-4);
}

[data-theme="light"] .site-header {
  background: rgba(240,240,240,0.92);
}

.site-header .logo-area {
  display: flex; align-items: center; gap: var(--sp-3);
  text-decoration: none;
}

.site-header .logo-icon {
  width: 50px; height: 50px;
  background: var(--teal-dim);
  border: 1px solid var(--teal-border);
  border-radius: var(--r-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
  box-shadow: var(--shadow-teal);
  flex-shrink: 0;
}

.logo-icon-demo {
  width: 52px; height: 52px;
  background: var(--teal-dim);
  border: 1px solid var(--teal-border);
  border-radius: var(--r-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
  box-shadow: var(--shadow-teal);
  flex-shrink: 0;
}

.logo-icon-down {
  width: 100px; height: 100px;
  background: var(--teal-dim);
  border: 1px solid var(--teal-border);
  border-radius: var(--r-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
  box-shadow: var(--shadow-teal);
  flex-shrink: 0;
}

.site-header .logo-text {
  font-family:"RubikDoodle";
  font-weight: 800; font-size: 1.55rem;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.site-header .logo-text span { color: var(--teal); }

.site-header nav {
  display: none; /* mobile: hidden — shown at min-width:769px */
  align-items: center; gap: var(--sp-1);
  margin-left: auto;
  flex-shrink: 0;
}

.nav-link {
  font-family: var(--font-mono);
  font-size: 0.78rem; font-weight: 500;
  color: var(--text-secondary);
  padding: 5px 11px;
  border-radius: var(--r-md);
  transition: color var(--t-xs), background var(--t-xs);
  letter-spacing: 0.01em;
}
.nav-link:hover { color: var(--teal); background: var(--teal-dim); opacity: 1; }
.nav-link.active { color: var(--teal); background: var(--teal-dim); }

.header-controls {
  display: flex; align-items: center; gap: var(--sp-2);
  flex-shrink: 0;
}

/* ── ICON BUTTON ────────────────────────────────────────────── */
.icon-btn {
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-hover);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-md);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--t-xs);
  font-size: 0.9rem;
  flex-shrink: 0;
}
.icon-btn:hover { color: var(--teal); border-color: var(--teal-border); background: var(--teal-dim); }

/* ── PRIMARY BUTTON ─────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: var(--sp-2);
  padding: 0 var(--sp-5);
  height: 38px;
  font-family: var(--font-body);
  font-size: 0.9rem; font-weight: 600;
  border: none; border-radius: var(--r-md);
  cursor: pointer;
  transition: all var(--t-xs);
  white-space: nowrap;
  user-select: none;
  text-decoration: none;
  position: relative; overflow: hidden;
}

.btn:disabled {
  opacity: 0.38; cursor: not-allowed;
  pointer-events: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--teal) 0%, var(--teal-dark) 100%);
  color: #000;
  box-shadow: 0 2px 12px rgba(0,189,189,0.28);
}
.btn-primary:hover {
  box-shadow: 0 4px 20px rgba(0,189,189,0.4);
  transform: translateY(-1px);
  filter: brightness(1.08);
}
.btn-primary:active { transform: translateY(0); filter: brightness(0.95); }

.btn-outline {
  background: transparent;
  color: var(--teal);
  border: 1px solid var(--teal-border);
}
.btn-outline:hover { background: var(--teal-dim); border-color: var(--teal); }

.btn-blue {
  background: linear-gradient(135deg, var(--blue) 0%, var(--blue-dark) 100%);
  color: #fff;
  box-shadow: 0 2px 10px rgba(52,152,219,0.28);
}
.btn-blue:hover { box-shadow: 0 4px 18px rgba(52,152,219,0.4); transform: translateY(-1px); }

.btn-red {
  background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
  color: #fff;
  box-shadow: 0 2px 10px rgba(231,76,60,0.24);
}
.btn-red:hover { box-shadow: 0 4px 18px rgba(231,76,60,0.35); transform: translateY(-1px); }

.btn-ghost {
  background: var(--bg-hover);
  color: var(--text-secondary);
  border: 1px solid var(--border-soft);
}
.btn-ghost:hover { color: var(--text-primary); border-color: var(--border-mid); }

.btn-green {
  background: linear-gradient(135deg, var(--green) 0%, #1e8449 100%);
  color: #fff;
  box-shadow: 0 2px 10px rgba(39,174,96,0.28);
}
.btn-green:hover { box-shadow: 0 4px 18px rgba(39,174,96,0.4); transform: translateY(-1px); }

.btn-lg {
  height: 46px;
  padding: 0 var(--sp-8);
  font-size: 1rem;
  border-radius: var(--r-lg);
}

.btn-sm {
  height: 30px;
  padding: 0 var(--sp-4);
  font-size: 0.82rem;
}

/* Progress bar INSIDE button (matches Qt embedded QProgressBar) */
.btn-progress-wrap {
  position: relative;
  overflow: hidden;
}
.btn-progress-bar {
  position: absolute;
  bottom: 0; left: 0;
  height: 3px;
  background: linear-gradient(to right, rgba(255,255,255,0.3), rgba(255,255,255,0.7));
  border-radius: 2px;
  display: none;
}
.btn-progress-wrap.loading .btn-progress-bar {
  display: block;
  animation: btn-progress-slide 1.4s ease-in-out infinite;
}
@keyframes btn-progress-slide {
  0%   { left: -40%; width: 40%; }
  100% { left: 100%; width: 40%; }
}

/* ── TEXT INPUT ─────────────────────────────────────────────── */
.input {
  width: 100%;
  height: 36px;
  padding: 0 var(--sp-3);
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--text-primary);
  background: var(--bg-input);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-md);
  transition: border-color var(--t-xs), box-shadow var(--t-xs);
  outline: none;
}
.input::placeholder { color: var(--text-muted); }
.input:hover { border-color: var(--border-mid); }
.input:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(0,189,189,0.12);
}

/* ── SELECT / COMBOBOX ──────────────────────────────────────── */
.select-wrap {
  position: relative;
  display: flex; align-items: center;
}
.select-wrap::after {
  content: '▾';
  position: absolute; right: 10px;
  color: var(--text-muted);
  font-size: 0.8rem;
  pointer-events: none;
}
.select {
  width: 100%;
  height: 36px;
  padding: 0 var(--sp-8) 0 var(--sp-3);
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--text-primary);
  background: var(--bg-input);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-md);
  appearance: none;
  cursor: pointer;
  outline: none;
  transition: border-color var(--t-xs);
}
.select:hover { border-color: var(--border-mid); }
.select:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(0,189,189,0.12); }
.select option { background: var(--bg-card); }

/* ── GROUP BOX (matches Qt QGroupBox) ──────────────────────── */
.group-box {
  border: 2px solid var(--teal-border);
  border-radius: var(--r-lg);
  padding: var(--sp-5);
  position: relative;
  background: var(--bg-elevated);
  transition: border-color var(--t-sm), box-shadow var(--t-sm);
}
.group-box:hover {
  border-color: rgba(0,189,189,0.55);
  box-shadow: 0 0 24px rgba(0,189,189,0.07);
}

.group-box-title {
  position: absolute;
  top: -12px; left: 12px;
  padding: 0 8px;
  background: var(--bg-elevated);
  font-family: var(--font-display);
  font-size: 0.82rem; font-weight: 700;
  color: var(--teal);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

/* ── STATS LABEL (matches Qt QLabel stats display) ─────────── */
.stats-label {
  font-size: 0.84rem;
  color: var(--text-secondary);
  background: var(--bg-input);
  border: 1px solid var(--teal-border);
  border-radius: var(--r-md);
  padding: var(--sp-3) var(--sp-4);
  text-align: center;
  min-height: 42px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono);
  transition: color var(--t-sm);
}
.stats-label.success { color: var(--teal); }
.stats-label.error   { color: var(--red); }

/* ── QUICK SELECT BUTTONS ───────────────────────────────────── */
/* Each button takes equal share of horizontal space */
.quick-row {
  display: flex; align-items: stretch; gap: var(--sp-2);
  flex-wrap: wrap;
}
.quick-row .quick-btn {
  flex: 1 1 0;
  min-width: 0;
  text-align: center;
  justify-content: center;
}

.quick-btn {
  padding: 7px 12px;
  border-radius: var(--r-md);
  background: var(--bg-hover);
  border: 1px solid var(--border-soft);
  color: var(--teal);
  font-weight: 500; font-size: 0.84rem;
  cursor: pointer;
  transition: all var(--t-xs);
  white-space: nowrap;
  font-family: var(--font-body);
}
.quick-btn:hover {
  background: var(--teal-dim);
  border-color: var(--teal-border);
  color: var(--teal);
}

/* ── EXTENSION TAG ──────────────────────────────────────────── */
.ext-tag {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px;
  border-radius: var(--r-md);
  background: var(--bg-hover);
  border: 1px solid var(--border-soft);
  font-family: var(--font-mono);
  font-size: 0.8rem; font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--t-xs);
  user-select: none;
}
.ext-tag:hover { color: var(--teal); border-color: var(--teal-border); background: var(--teal-dim); }
.ext-tag.checked {
  background: var(--teal-dim);
  border-color: var(--teal-border);
  color: var(--teal);
}
.ext-tag .ext-check { font-size: 0.7rem; opacity: 0.7; }

/* ── SECTION LABEL / FORM ROW ───────────────────────────────── */
.form-row {
  display: flex; flex-direction: column; gap: var(--sp-2);
}
.form-label {
  font-size: 0.78rem; font-weight: 600;
  color: var(--text-muted);
  font-family: var(--font-mono);
  letter-spacing: 0.06em; text-transform: uppercase;
}

/* ── SOCIAL LINKS (footer) ──────────────────────────────────── */
.social-links {
  display: flex; align-items: center; gap: var(--sp-2);
}
.social-link {
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--r-md);
  background: var(--bg-hover);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: 0.85rem;
  transition: all var(--t-xs);
}

/* ── APP FOOTER BAR (demo.html inner footer) ───────────────── */
.app-footer-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 6px 4px;
  border: 2px solid var(--teal-border);
  border-radius: var(--r-md);
  margin-top: 4px;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;        /* Firefox */
  -ms-overflow-style: none;     /* IE/Edge */
}

.app-footer-bar::-webkit-scrollbar {
  display: none;                /* Chrome/Safari */
}

.app-footer-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.3;
  text-align: center;
}

.app-footer-copy {
  color: var(--teal);
  font-size: 10px;
  font-family:"RubikLines";
}

.app-footer-dev {
  color: var(--text-secondary);
  font-size: 9px;
  font-weight: bold;
  font-family:"LibreBaskerville";
}

.app-footer-ver {
  color: var(--teal);
  font-size: 10px;
  font-weight: bold;
  font-family:"RubikDoodle";
}

.app-footer-icons {
  display: flex;
  align-items: center;
  gap: 4px;
}

.footer-icon-btn {
  width: 28px;
  height: 28px;
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  border-radius: var(--r-sm);
  transition: opacity 0.15s, background 0.15s;
  text-decoration: none;
  color: inherit;
}

.footer-icon-btn:hover {
  background: var(--teal-dim);
  opacity: 0.8;
}

.footer-icon-btn img {
  width: 16px;
  height: 16px;
  object-fit: contain;
  display: block;
}

.logo-icon img {
  width: 45px;
  height: 45px;
  object-fit: contain;
  display: block;
}

.logo-icon-demo img {
  width: 50px;
  height: 50px;
  object-fit: contain;
  display: block;
}

.logo-icon-down img {
  width: 90px;
  height: 90px;
  object-fit: contain;
  display: block;
}

.social-link:hover {
  color: var(--teal);
  background: var(--teal-dim);
  border-color: var(--teal-border);
  opacity: 1;
}

/* ── DOWNLOAD CARD ──────────────────────────────────────────── */
.download-hero {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center;
  gap: var(--sp-5);
  padding: var(--sp-16) var(--sp-6);
}

.download-box {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-xl);
  padding: var(--sp-10) var(--sp-12);
  display: flex; flex-direction: column;
  align-items: center; gap: var(--sp-6);
  box-shadow: var(--shadow-lg);
  max-width: 480px; width: 100%;
}

.version-chip {
  display: flex; align-items: center; gap: var(--sp-2);
  background: var(--teal-dim);
  border: 1px solid var(--teal-border);
  border-radius: var(--r-pill);
  padding: 4px 14px;
  font-family: var(--font-mono);
  font-size: 0.78rem; font-weight: 700;
  color: var(--teal);
}

.checksum-box {
  background: var(--bg-input);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-md);
  padding: var(--sp-3) var(--sp-4);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  word-break: break-all;
  text-align: left;
  width: 100%;
}

/* ── FEATURE CARD ───────────────────────────────────────────── */
.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-xl);
  padding: var(--sp-6);
  display: flex; flex-direction: column; gap: var(--sp-3);
  transition: border-color var(--t-sm), transform var(--t-sm), box-shadow var(--t-sm);
  position: relative; overflow: hidden;
}
.feature-card::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(circle at top left, rgba(0,189,189,0.05) 0%, transparent 60%);
  pointer-events: none;
}
.feature-card:hover {
  border-color: var(--teal-border);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.feature-icon {
  width: 42px; height: 42px;
  background: var(--teal-dim);
  border: 1px solid var(--teal-border);
  border-radius: var(--r-lg);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
}

/* ── NOTIFICATION / TOAST ───────────────────────────────────── */
.toast {
  position: fixed;
  bottom: var(--sp-6); right: var(--sp-6);
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-lg);
  padding: var(--sp-3) var(--sp-5);
  display: flex; align-items: center; gap: var(--sp-3);
  font-size: 0.88rem;
  box-shadow: var(--shadow-md);
  z-index: 1000;
  transform: translateY(calc(100% + 24px));
  transition: transform var(--t-md);
  max-width: 340px;
}
.toast.visible { transform: translateY(0); }
.toast.success .toast-icon { color: var(--teal); }
.toast.error   .toast-icon { color: var(--red); }
.toast.info    .toast-icon { color: var(--blue); }

/* ═══════════════════════════════════════════════════════════
   PATHWAYS WEB — panels.css
   Slide-in side panels: Results + Extensions (mirrors Qt)
   ═══════════════════════════════════════════════════════════ */

/* ── PANEL BASE (matches Qt Tool window + FramelessWindowHint) */
.side-panel {
  position: fixed;
  top: 56px;                    /* below site header */
  right: 0;
  width: 100vw; /* mobile: full width — constrained at min-width:481px */
  height: calc(100vh - 56px);
  background: var(--bg-elevated);
  border-left: 1px solid var(--border-soft);
  display: flex; flex-direction: column;
  z-index: 150;
  transform: translateX(100%);  /* hidden off-screen right */
  transition: transform 320ms cubic-bezier(0.215,0.610,0.355,1.000);
  box-shadow: -8px 0 48px rgba(0,0,0,0.45);
  overflow: hidden;
}

.side-panel.open {
  transform: translateX(0);
}

/* ── PANEL HEADER ───────────────────────────────────────────── */
.panel-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--sp-4) var(--sp-5);
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-card);
  flex-shrink: 0;
}

.panel-title {
  font-family: var(--font-display);
  font-size: 0.95rem; font-weight: 700;
  color: var(--text-primary);
  display: flex; align-items: center; gap: var(--sp-2);
}

.panel-title .panel-icon { font-size: 1rem; }

.panel-close {
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--r-sm);
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1rem;
  transition: all var(--t-xs);
}
.panel-close:hover { color: var(--red); background: rgba(231,76,60,0.12); }

/* ── PANEL STATS BAR ────────────────────────────────────────── */
.panel-stats {
  padding: var(--sp-3) var(--sp-5);
  background: linear-gradient(135deg, rgba(52,152,219,0.15) 0%, rgba(0,189,189,0.10) 100%);
  border-bottom: 1px solid var(--border-subtle);
  font-family: var(--font-mono);
  font-size: 0.78rem; font-weight: 600;
  color: var(--text-primary);
  flex-shrink: 0;
  text-align: center;
}

/* ── PANEL BODY ─────────────────────────────────────────────── */
.panel-body {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
}

/* Results text area */
.panel-results-text {
  width: 100%;
  height: 100%;
  padding: var(--sp-4) var(--sp-5);
  font-family: var(--font-mono);
  font-size: 0.78rem; line-height: 1.7;
  color: var(--text-primary);
  background: transparent;
  border: none;
  resize: none;
  outline: none;
  white-space: pre;
  overflow-x: auto;
}

/* Extensions list */
.ext-list {
  padding: var(--sp-3) var(--sp-5);
  display: flex; flex-wrap: wrap; gap: var(--sp-2);
}

/* ── PANEL FOOTER ───────────────────────────────────────────── */
.panel-footer {
  padding: var(--sp-4) var(--sp-5);
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-card);
  display: flex; align-items: center; gap: var(--sp-2);
  flex-shrink: 0;
  flex-wrap: wrap;
}

/* ── PANEL OVERLAY (dim main content when panel is open) ────── */
.panel-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.35);
  z-index: 140;
  opacity: 0;
  pointer-events: none;
  transition: opacity 320ms var(--ease-out, ease);
}
.panel-overlay.visible {
  opacity: 1;
  pointer-events: auto;
}

/* ── ABOUT DIALOG (mirrors Qt QDialog) ─────────────────────── */
dialog {
  border: none;
  border-radius: var(--r-xl);
  background: var(--bg-card);
  padding: 0;
  color: var(--text-primary);
  box-shadow: var(--shadow-lg);
/* Centering — bulletproof: works on ALL browsers, OS, devices */
  position: fixed;
  inset: 0;
  margin: auto;
  /* Mobile-first sizing — expanded at min-width:481px */
  width: 96vw;
  height: fit-content;
  max-height: 92vh;
  overflow-y: auto;
  outline: none;
}

/* ── DIALOG RESPONSIVE — rebuilt as Mobile First at end of file ── */

dialog::backdrop {
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(4px);
}

.dialog-header {
  display: flex; flex-direction: column; align-items: center;
  padding: var(--sp-5) var(--sp-4) var(--sp-4); /* mobile — expanded at 481px */
  text-align: center;
  gap: var(--sp-3);
  border-bottom: 1px solid var(--border-subtle);
}

.dialog-logo {
  width: 72px; height: 72px;
  background: var(--teal-dim);
  border: 2px solid var(--teal-border);
  border-radius: var(--r-xl);
  display: flex; align-items: center; justify-content: center;
  font-size: 2.2rem;
  box-shadow: var(--shadow-teal);
}

.dialog-title {
  font-family: var(--font-display);
  font-size: 1.4rem; font-weight: 800;
  color: var(--text-primary);
}

.dialog-version {
  font-family: var(--font-mono);
  font-size: 0.8rem; color: var(--text-muted);
}

.dialog-body {
  padding: var(--sp-4) var(--sp-4); /* mobile — expanded at 481px */
  font-size: 0.9rem; line-height: 1.75;
  color: var(--text-secondary);
}

.dialog-body h3 {
  font-size: 0.88rem; color: var(--teal);
  margin-bottom: var(--sp-2); margin-top: var(--sp-5);
  font-family: var(--font-mono);
  text-transform: uppercase; letter-spacing: 0.05em;
}

.dialog-body ul {
  padding-left: var(--sp-5);
  display: flex; flex-direction: column; gap: var(--sp-1);
}

.dialog-body li { color: var(--text-secondary); font-size: 0.88rem; }

.dialog-update {
  margin: 0 var(--sp-8);
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--r-md);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  text-align: center;
  display: none;
}
.dialog-update.show   { display: block; }
.dialog-update.ok     { background: rgba(0,189,189,0.10); color: var(--teal); border: 1px solid var(--teal-border); }
.dialog-update.new    { background: rgba(230,126,34,0.10); color: var(--orange); border: 1px solid rgba(230,126,34,0.3); }
.dialog-update.error  { background: rgba(231,76,60,0.10); color: var(--red); border: 1px solid rgba(231,76,60,0.3); }

.dialog-footer {
  padding: var(--sp-3) var(--sp-4) var(--sp-5); /* mobile — expanded at 481px */
  display: flex; justify-content: center; gap: var(--sp-2);
  flex-wrap: wrap;
}

/* ── LIGHT MODE ADJUSTMENTS ─────────────────────────────────── */
[data-theme="light"] .side-panel {
  box-shadow: -8px 0 48px rgba(0,0,0,0.14);
}
[data-theme="light"] .panel-overlay {
  background: rgba(0,0,0,0.20);
}

/* ═══════════════════════════════════════════════════════════
   PATHWAYS WEB — animations.css
   Keyframes, page transitions, motion
   ═══════════════════════════════════════════════════════════ */

/* ── PAGE ENTRY ─────────────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes slideRight {
  from { transform: translateX(-16px); opacity: 0; }
  to   { transform: translateX(0);     opacity: 1; }
}

@keyframes scaleIn {
  from { transform: scale(0.94); opacity: 0; }
  to   { transform: scale(1);    opacity: 1; }
}

@keyframes pulseGlow {
  0%,100% { box-shadow: 0 0 0 0 rgba(0,189,189,0.0); }
  50%      { box-shadow: 0 0 0 6px rgba(0,189,189,0.14); }
}

@keyframes shimmer {
  from { background-position: -200% center; }
  to   { background-position:  200% center; }
}

@keyframes scanLine {
  from { transform: translateY(-100%); opacity: 0.6; }
  to   { transform: translateY(400%);  opacity: 0; }
}

/* ── APPLIED ANIMATIONS ─────────────────────────────────────── */
.anim-fade-up      { animation: fadeUp   0.55s var(--ease-out, ease) both; }
.anim-fade-in      { animation: fadeIn   0.4s  ease both; }
.anim-scale-in     { animation: scaleIn  0.35s var(--ease-spring, ease) both; }

/* Staggered children */
.stagger > *:nth-child(1) { animation-delay: 0ms; }
.stagger > *:nth-child(2) { animation-delay: 80ms; }
.stagger > *:nth-child(3) { animation-delay: 160ms; }
.stagger > *:nth-child(4) { animation-delay: 240ms; }
.stagger > *:nth-child(5) { animation-delay: 320ms; }
.stagger > *:nth-child(6) { animation-delay: 400ms; }

/* ── LOADING SKELETON ───────────────────────────────────────── */
.skeleton {
  background: linear-gradient(
    90deg,
    var(--bg-hover) 25%,
    var(--bg-active) 50%,
    var(--bg-hover) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.6s ease-in-out infinite;
  border-radius: var(--r-md);
}

/* ── TEAL SCANNER ANIMATION (visual effect during scan) ─────── */
.scan-effect {
  position: relative;
  overflow: hidden;
}
.scan-effect::after {
  content: '';
  position: absolute;
  left: 0; right: 0;
  height: 2px;
  background: linear-gradient(to right, transparent, var(--teal), transparent);
  box-shadow: 0 0 12px var(--teal);
  animation: scanLine 1.8s ease-in-out infinite;
  pointer-events: none;
}

/* ── PULSE ──────────────────────────────────────────────────── */
.pulse { animation: pulseGlow 2s ease-in-out infinite; }

/* ── HOVER LIFT ─────────────────────────────────────────────── */
.hover-lift {
  transition: transform var(--t-sm), box-shadow var(--t-sm);
}
.hover-lift:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

/* ── TEAL GLOW BORDER ON HOVER ──────────────────────────────── */
.hover-glow {
  transition: box-shadow var(--t-sm), border-color var(--t-sm);
}
.hover-glow:hover {
  box-shadow: 0 0 20px rgba(0,189,189,0.12);
  border-color: rgba(0,189,189,0.5) !important;
}

/* ═══════════════════════════════════════════════════════════
   PATHWAYS WEB — rtl.css
   Arabic RTL overrides (mirrors Qt::RightToLeft)
   ═══════════════════════════════════════════════════════════ */

[dir="rtl"] {
  font-family: 'Outfit', 'Segoe UI', Tahoma, sans-serif;
}

[dir="rtl"] .site-header nav { margin-left: 0; margin-right: auto; }
[dir="rtl"] .hero-left  { text-align: right; }
[dir="rtl"] .hero-cta   { justify-content: flex-end; }
[dir="rtl"] .teal-line  { margin-right: 0; }
[dir="rtl"] .section-header .teal-line { margin: 0 auto; }
[dir="rtl"] .group-box-title { left: auto; right: 12px; }
[dir="rtl"] .select-wrap::after { right: auto; left: 10px; }
[dir="rtl"] .select { padding: 0 var(--sp-3) 0 var(--sp-8); }
[dir="rtl"] .panel-footer { flex-direction: row-reverse; }
[dir="rtl"] .toast { right: auto; left: var(--sp-6); }
[dir="rtl"] .side-panel { right: auto; left: 0; border-left: none; border-right: 1px solid var(--border-soft); transform: translateX(-100%); box-shadow: 8px 0 48px rgba(0,0,0,0.45); }
[dir="rtl"] .side-panel.open { transform: translateX(0); }
[dir="rtl"] .dialog-body { text-align: right; }
[dir="rtl"] .dialog-body ul { padding-left: 0; padding-right: var(--sp-5); }
[dir="rtl"] .dialog-footer  { flex-direction: row-reverse; }
[dir="rtl"] .checksum-box   { text-align: right; }
[dir="rtl"] .demo-bar       { flex-direction: row-reverse; }

/* ── FOOTER: always LTR — text must not be reversed or translated ── */
[dir="rtl"] .site-footer,
[dir="rtl"] .footer-inner,
[dir="rtl"] .footer-copy,
[dir="rtl"] .footer-brand,
[dir="rtl"] .footer-brand span,
[dir="rtl"] .app-footer-bar,
[dir="rtl"] .app-footer-info,
[dir="rtl"] .app-footer-copy,
[dir="rtl"] .app-footer-dev,
[dir="rtl"] .app-footer-ver {
  direction: ltr;
  unicode-bidi: isolate;
  text-align: left;
}

/* ═══════════════════════════════════════════════════════════
   PATHWAYS WEB — main.css  |  Global Variables, Reset, Base
   ═══════════════════════════════════════════════════════════ */
@font-face {
  font-family: 'BeauRivage';
  src: url('../fonts/BeauRivage-Regular.ttf') format('truetype');
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: 'LibreBaskerville';
  src: url('../fonts/LibreBaskerville-Italic.ttf') format('truetype');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: 'RubikLines';
  src: url('../fonts/RubikLines-Regular.ttf') format('truetype');
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: 'MotleyForces';
  src: url('../fonts/Motley_Forces.ttf') format('truetype');
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: 'RubikDoodle';
  src: url('../fonts/RubikDoodleShadow.ttf') format('truetype');
  font-weight: 400;
  font-display: swap;
}
/* ── DESIGN TOKENS ──────────────────────────────────────────── */
:root {
  /* Brand */
  --teal:           rgb(0, 189, 189);
  --teal-dim:       rgba(0, 189, 189, 0.12);
  --teal-border:    rgba(0, 189, 189, 0.38);
  --teal-dark:      rgb(0, 150, 150);
  --blue:           #3498db;
  --blue-dark:      #2980b9;
  --red:            #e74c3c;
  --red-dark:       #c0392b;
  --green:          #27ae60;
  --orange:         #e67e22;

  /* Dark surfaces (default) */
  --bg-root:        #111111;
  --bg-primary:     #151515;
  --bg-elevated:    #1c1c1c;
  --bg-card:        #222222;
  --bg-input:       #282828;
  --bg-hover:       #2e2e2e;
  --bg-active:      #363636;

  --border-subtle:  rgba(255,255,255,0.05);
  --border-soft:    rgba(255,255,255,0.08);
  --border-mid:     rgba(255,255,255,0.13);

  --text-primary:   #e6e6e6;
  --text-secondary: #9a9a9a;
  --text-muted:     #606060;
  --text-teal:      rgb(0, 189, 189);

  --shadow-sm:   0 2px 8px  rgba(0,0,0,0.45);
  --shadow-md:   0 4px 24px rgba(0,0,0,0.55);
  --shadow-lg:   0 8px 56px rgba(0,0,0,0.70);
  --shadow-teal: 0 0 28px   rgba(0,189,189,0.14);

  /* Typography */
  --font-display: 'Syne', sans-serif;
  --font-body:    'Outfit', sans-serif;
  --font-mono:    'JetBrains Mono', 'Consolas', monospace;
  --font-rubik:   'RubikLines', 'Arial', sans-serif;
  --font-beau:    'BeauRivage', cursive;
  --font-libre:   'LibreBaskerville', Georgia, serif;

  /* Spacing scale */
  --sp-1: 4px;  --sp-2: 8px;   --sp-3: 12px;  --sp-4: 16px;
  --sp-5: 20px; --sp-6: 24px;  --sp-8: 32px;  --sp-10: 40px;
  --sp-12: 48px;--sp-16: 64px; --sp-24: 96px;

  /* Radii */
  --r-sm: 4px;  --r-md: 6px;  --r-lg: 10px;
  --r-xl: 16px; --r-pill: 999px;

  /* Easing */
  --ease-out:    cubic-bezier(0.215, 0.610, 0.355, 1.000);
  --ease-spring: cubic-bezier(0.175, 0.885, 0.320, 1.275);

  --t-xs:  120ms var(--ease-out);
  --t-sm:  200ms var(--ease-out);
  --t-md:  300ms var(--ease-out);
  --t-lg:  450ms var(--ease-out);

/* Layout */
  --app-width:   580px;
  --panel-width: min(460px, 100vw);
}

/* ── LIGHT MODE ─────────────────────────────────────────────── */
[data-theme="light"] {
  --bg-root:      #e8e8e8;
  --bg-primary:   #efefef;
  --bg-elevated:  #ffffff;
  --bg-card:      #ffffff;
  --bg-input:     #f8f8f8;
  --bg-hover:     #f0f0f0;
  --bg-active:    #e0e0e0;

  --border-subtle: rgba(0,0,0,0.04);
  --border-soft:   rgba(0,0,0,0.08);
  --border-mid:    rgba(0,0,0,0.13);

  --text-primary:   #181818;
  --text-secondary: #545454;
  --text-muted:     #8c8c8c;

  --shadow-sm:  0 2px 8px  rgba(0,0,0,0.07);
  --shadow-md:  0 4px 24px rgba(0,0,0,0.10);
  --shadow-lg:  0 8px 56px rgba(0,0,0,0.14);
}

/* ── RESET ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  font-family: var(--font-body);
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--text-primary);
  background: var(--bg-root);
  min-height: 100vh;
  overflow-x: hidden;
  transition: background var(--t-md), color var(--t-md);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection { background: rgba(0,189,189,0.18); color: var(--teal); }

/* ── SCROLLBAR ──────────────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: rgba(0,189,189,0.28); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--teal); }

/* ── TYPOGRAPHY ─────────────────────────────────────────────── */
h1,h2,h3,h4,h5,h6 {
  font-family: var(--font-display);
  line-height: 1.2;
  color: var(--text-primary);
}
h1 { font-size: clamp(2.1rem, 5vw, 3.8rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 3vw, 2.4rem); font-weight: 700; }
h3 { font-size: clamp(1.05rem, 2vw, 1.35rem); font-weight: 600; }
p  { color: var(--text-secondary); line-height: 1.78; }

a { color: var(--teal); text-decoration: none; transition: opacity var(--t-xs); }
a:hover { opacity: 0.78; }

code, pre { font-family: var(--font-mono); font-size: 0.875em; }
pre {
  background: var(--bg-input); border: 1px solid var(--border-soft);
  border-radius: var(--r-md); padding: var(--sp-3) var(--sp-5);
  overflow-x: auto; color: var(--text-primary);
}

:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}

/* ── UTILITY ─────────────────────────────────────────────────── */
.text-teal   { color: var(--teal); }
.text-muted  { color: var(--text-muted); }
.text-center { text-align: center; }
.text-mono   { font-family: var(--font-mono); font-size: 0.875em; }

.flex           { display: flex; }
.flex-col       { flex-direction: column; }
.items-center   { align-items: center; }
.justify-center { justify-content: center; }
.gap-2          { gap: var(--sp-2); }
.gap-3          { gap: var(--sp-3); }
.gap-5          { gap: var(--sp-5); }
.w-full         { width: 100%; }

.divider {
  height: 1px;
  background: linear-gradient(to right, transparent, var(--border-soft), transparent);
  margin: var(--sp-8) 0;
}

/* ── BADGE ──────────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: var(--sp-1);
  padding: 2px 9px; border-radius: var(--r-pill);
  font-size: 0.7rem; font-weight: 700; font-family: var(--font-mono);
  letter-spacing: 0.07em; text-transform: uppercase;
}
.badge-teal { background: var(--teal-dim); color: var(--teal); border: 1px solid var(--teal-border); }
.badge-blue { background: rgba(52,152,219,0.12); color: var(--blue); border: 1px solid rgba(52,152,219,0.28); }

/* ── SPINNER ─────────────────────────────────────────────────── */
@keyframes spin { to { transform: rotate(360deg); } }
.spinner {
  width: 15px; height: 15px;
  border: 2px solid var(--border-soft);
  border-top-color: var(--teal);
  border-radius: 50%;
  animation: spin 0.65s linear infinite;
  flex-shrink: 0;
  display: inline-block;
}

/* ── TEAL ACCENT LINE ───────────────────────────────────────── */
.teal-line {
  width: 32px; height: 3px;
  background: var(--teal); border-radius: 2px;
  box-shadow: 0 0 10px rgba(0,189,189,0.55);
}

/* ── SCREEN-READER ONLY ─────────────────────────────────────── */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap;
}

/* ═══════════════════════════════════════════════════════════
   HAMBURGER / MOBILE NAV
   ═══════════════════════════════════════════════════════════ */

.nav-toggle {
  display: flex; /* mobile: visible — hidden at min-width:769px */
  background: var(--bg-elevated);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-md);
  color: var(--text-secondary);
  font-size: 1.2rem;
  width: 36px; height: 36px;
  cursor: pointer;
  align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: background var(--t-xs), color var(--t-xs);
}
.nav-toggle:hover {
  background: var(--teal-dim);
  color: var(--teal);
}

.mobile-nav {
  display: none;
  position: fixed;
  top: 56px; left: 0; right: 0;
  z-index: 199;
  background: rgba(17,17,17,0.97);
  backdrop-filter: blur(20px) saturate(1.5);
  -webkit-backdrop-filter: blur(20px) saturate(1.5);
  border-bottom: 1px solid var(--border-soft);
  padding: var(--sp-4) var(--sp-6);
  flex-direction: column;
  gap: var(--sp-2);
  box-shadow: 0 8px 32px rgba(0,0,0,0.35);
  animation: slideDown 0.18s ease;
}
[data-theme="light"] .mobile-nav {
  background: rgba(240,240,240,0.97);
}
.mobile-nav.open { display: flex; }
.mobile-nav .nav-link {
  padding: 10px 14px;
  font-size: 0.9rem;
  border-radius: var(--r-md);
}
.mobile-nav .nav-link:hover,
.mobile-nav .nav-link.active {
  background: var(--teal-dim);
  color: var(--teal);
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

[dir="rtl"] .mobile-nav { text-align: right; }
[dir="rtl"] .nav-toggle  { order: 10; }

/* ═══════════════════════════════════════════════════════════
   MOBILE FIRST RESPONSIVE DESIGN
   Breakpoints (min-width):
     xs:  0px    — small phones (base styles, no query)
     sm:  481px  — large phones / phablets
     md:  600px  — landscape phones / small tablets
     lg:  769px  — tablets / desktop nav appears
     xl: 1025px  — laptops and above (two-column hero)
   ═══════════════════════════════════════════════════════════ */

/* ── sm: 481px — panels, dialog ──────────────────────────── */
@media (min-width: 481px) {

  .side-panel { width: var(--panel-width); }

  dialog {
    width: min(90vw, 500px);
    max-height: 90vh;
    border-radius: var(--r-xl);
  }
  .dialog-header { padding: var(--sp-8) var(--sp-8) var(--sp-5); }
  .dialog-body   { padding: var(--sp-5) var(--sp-8); }
  .dialog-footer {
    padding: var(--sp-4) var(--sp-8) var(--sp-6);
    gap: var(--sp-3);
    flex-wrap: nowrap;
  }
}

/* ── md: 600px — demo layout, 2-col features, export row ──── */
@media (min-width: 600px) {

  .demo-page { padding: var(--sp-6); }
  .app-panel { padding: 0; }

  .export-row {
    flex-direction: row;
    align-items: center;
  }

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

/* ── lg: 769px — desktop nav, footer row layout ───────────── */
@media (min-width: 769px) {

  .site-header {
    padding: 0 var(--sp-6);
    gap: var(--sp-8);
  }

  .site-header nav { display: flex; }
  .nav-toggle      { display: none; }
  .header-controls > .btn { display: inline-flex; }

  .footer-inner {
    flex-direction: row;
    text-align: left;
    align-items: center;
    justify-content: space-between;
    gap: var(--sp-5);
  }
  .footer-inner > div { width: auto; }
  .social-links { flex-wrap: nowrap; }
}

/* ── xl: 1025px — two-column hero, 3-col features ─────────── */
@media (min-width: 1025px) {

  .hero-content {
    grid-template-columns: 1fr 1fr;
    gap: var(--sp-16);
  }

  .hero-right { display: flex; }

  .hero-left {
    text-align: left;
    align-items: flex-start;
    max-width: unset;
    margin: 0;
  }

  .hero-cta { justify-content: flex-start; }

  .features-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ── RTL hero overrides — always after desktop rules ─────── */
[dir="rtl"] .hero-left { text-align: right; align-items: flex-start; }
[dir="rtl"] .hero-cta  { justify-content: flex-end; }