/* ==========================================================================
   Windows USB Format Guide — High-Clarity Bilingual (AR RTL / EN LTR) Styles
   Zero faint text, generous spacing, full Light & Dark theme support
   ========================================================================== */

:root {
  /* Light Theme — High Contrast & Crystal Legibility */
  --bg-page: #f3f6fb;
  --bg-surface: #ffffff;
  --bg-surface-2: #edf2f9;
  --bg-surface-3: #e2e9f5;
  --bg-glass: rgba(255, 255, 255, 0.94);
  --bg-code: #0b1220;
  --text-code: #f1f5f9;

  --text-primary: #09111f;
  --text-secondary: #1e293b;
  --text-muted: #334155;

  --border-color: #cbd5e1;
  --border-strong: #94a3b8;

  /* Brand & Windows Accent */
  --accent: #005fb8;
  --accent-hover: #004c94;
  --accent-soft: rgba(0, 95, 184, 0.11);
  --accent-glow: rgba(0, 95, 184, 0.24);
  --accent-cyan: #0284c7;

  /* Semantic Colors */
  --success: #0f766e;
  --success-bg: #ecfdf5;
  --success-border: #34d399;

  --warning: #b45309;
  --warning-bg: #fffbeb;
  --warning-border: #f59e0b;

  --danger: #b91c1c;
  --danger-bg: #fef2f2;
  --danger-border: #f87171;

  --info: #1d4ed8;
  --info-bg: #eff6ff;
  --info-border: #60a5fa;

  --shadow-sm: 0 2px 10px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 10px 26px rgba(15, 23, 42, 0.09);
  --shadow-lg: 0 18px 44px rgba(15, 23, 42, 0.14);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --radius-xl: 26px;

  --font-sans: 'Cairo', 'IBM Plex Sans Arabic', 'Inter', 'Segoe UI', Tahoma, Arial, sans-serif;
  --font-mono: 'JetBrains Mono', 'Cascadia Code', Consolas, monospace;

  --nav-height: 74px;
  --transition: 0.2s cubic-bezier(0.22, 1, 0.36, 1);
}

[data-theme="dark"] {
  --bg-page: #070c17;
  --bg-surface: #111827;
  --bg-surface-2: #182235;
  --bg-surface-3: #22304b;
  --bg-glass: rgba(17, 24, 39, 0.94);
  --bg-code: #050912;
  --text-code: #f8fafc;

  --text-primary: #ffffff;
  --text-secondary: #e2e8f0;
  --text-muted: #cbd5e1;

  --border-color: #2c3c58;
  --border-strong: #475d82;

  --accent: #38bdf8;
  --accent-hover: #67d0ff;
  --accent-soft: rgba(56, 189, 248, 0.16);
  --accent-glow: rgba(56, 189, 248, 0.28);
  --accent-cyan: #22d3ee;

  --success: #2dd4bf;
  --success-bg: rgba(13, 148, 136, 0.18);
  --success-border: rgba(45, 212, 191, 0.55);

  --warning: #fbbf24;
  --warning-bg: rgba(217, 119, 6, 0.16);
  --warning-border: rgba(251, 191, 36, 0.5);

  --danger: #fca5a5;
  --danger-bg: rgba(220, 38, 38, 0.18);
  --danger-border: rgba(248, 113, 113, 0.55);

  --info: #93c5fd;
  --info-bg: rgba(37, 99, 235, 0.18);
  --info-border: rgba(96, 165, 250, 0.5);

  --shadow-sm: 0 3px 12px rgba(0, 0, 0, 0.32);
  --shadow-md: 0 12px 28px rgba(0, 0, 0, 0.42);
  --shadow-lg: 0 22px 52px rgba(0, 0, 0, 0.55);
}

/* Base Typography & Reset */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-height) + 24px);
}

body {
  margin: 0;
  font-family: var(--font-sans);
  background-color: var(--bg-page);
  color: var(--text-primary);
  line-height: 1.85;
  font-size: 17px;
  font-weight: 500;
  -webkit-font-smoothing: antialiased;
  transition: background-color var(--transition), color var(--transition);
}

[dir="ltr"] body {
  font-family: 'Inter', 'Cairo', 'Segoe UI', Arial, sans-serif;
  line-height: 1.72;
}

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

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

a:hover {
  color: var(--accent-hover);
}

button,
input,
select {
  font-family: inherit;
}

code,
kbd,
.mono {
  font-family: var(--font-mono);
  direction: ltr;
  unicode-bidi: isolate;
}

code {
  background: var(--bg-surface-3);
  color: var(--text-primary);
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 0.9em;
  font-weight: 700;
}

kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px 9px;
  font-size: 0.88em;
  font-weight: 700;
  background: var(--bg-surface);
  border: 1.5px solid var(--border-strong);
  border-bottom-width: 3px;
  border-radius: 7px;
  color: var(--text-primary);
  margin: 0 2px;
}

.ltr-inline {
  direction: ltr;
  unicode-bidi: isolate;
  display: inline-block;
  font-weight: 700;
}

.clean-list {
  margin: 8px 0;
  padding-inline-start: 22px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  color: var(--text-secondary);
}

.container {
  width: min(1300px, 94vw);
  margin: 0 auto;
}

/* Reading Progress Bar */
.reading-progress {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  height: 4px;
  z-index: 1200;
  background: transparent;
  pointer-events: none;
}

.reading-progress__bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent-cyan));
  box-shadow: 0 0 10px var(--accent-glow);
  transition: width 0.08s linear;
}

/* Header & Navigation */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--nav-height);
  background: var(--bg-glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1.5px solid var(--border-color);
}

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-primary);
  font-weight: 800;
  font-size: 1.06rem;
  flex-shrink: 0;
}

.brand-logo {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  background: linear-gradient(135deg, var(--accent), #0284c7);
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 6px 16px var(--accent-glow);
  flex-shrink: 0;
}

.brand-sub {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-top: -3px;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.header-nav a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 700;
  padding: 7px 11px;
  border-radius: 9px;
  white-space: nowrap;
  transition: all var(--transition);
}

.header-nav a:hover,
.header-nav a.active {
  color: var(--accent);
  background: var(--accent-soft);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* Language Segmented Switch */
.lang-switch {
  display: inline-flex;
  align-items: center;
  padding: 3px;
  border-radius: 11px;
  background: var(--bg-surface-2);
  border: 1.5px solid var(--border-strong);
}

.lang-btn {
  padding: 5px 11px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.86rem;
  font-weight: 800;
  cursor: pointer;
  transition: all var(--transition);
}

.lang-btn.active {
  background: var(--accent);
  color: #ffffff;
}

[data-theme="dark"] .lang-btn.active {
  color: #061224;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 13px;
  border-radius: 10px;
  border: 1.5px solid var(--border-strong);
  background: var(--bg-surface);
  color: var(--text-primary);
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition);
}

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

.mobile-menu-btn {
  display: none;
}

/* Hero Section */
.hero {
  position: relative;
  padding: 44px 0 38px;
  border-bottom: 1.5px solid var(--border-color);
  background:
    radial-gradient(circle at 15% 20%, var(--accent-soft), transparent 48%),
    var(--bg-surface);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.12fr 0.95fr;
  align-items: center;
  gap: 36px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 15px;
  border-radius: 999px;
  background: var(--accent-soft);
  border: 1.5px solid var(--accent-glow);
  color: var(--accent);
  font-weight: 800;
  font-size: 0.9rem;
  margin-bottom: 16px;
}

.hero-title {
  margin: 0 0 14px;
  font-size: clamp(1.95rem, 3.2vw, 2.75rem);
  line-height: 1.32;
  font-weight: 800;
  color: var(--text-primary);
}

.hero-title span {
  color: var(--accent);
}

.hero-desc {
  margin: 0 0 24px;
  color: var(--text-secondary);
  font-size: 1.08rem;
  font-weight: 500;
  max-width: 60ch;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 12px;
  font-weight: 800;
  font-size: 0.98rem;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: all var(--transition);
}

.btn-primary {
  background: var(--accent);
  color: #ffffff;
  box-shadow: 0 8px 20px var(--accent-glow);
}

.btn-primary:hover {
  background: var(--accent-hover);
  color: #ffffff;
  transform: translateY(-2px);
}

[data-theme="dark"] .btn-primary,
[data-theme="dark"] .btn-primary:hover {
  color: #061224;
}

.btn-secondary {
  background: var(--bg-surface-2);
  color: var(--text-primary);
  border-color: var(--border-strong);
}

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

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.stat-pill {
  background: var(--bg-page);
  border: 1.5px solid var(--border-color);
  border-radius: 13px;
  padding: 13px 15px;
}

.stat-pill strong {
  display: block;
  font-size: 1.04rem;
  font-weight: 800;
  color: var(--text-primary);
}

.stat-pill span {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-muted);
}

.hero-image-card {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1.5px solid var(--border-strong);
  box-shadow: var(--shadow-lg);
  background: #0b1220;
  cursor: zoom-in;
}

.hero-image-card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.hero-image-card:hover img {
  transform: scale(1.02);
}

.hero-floating-note {
  position: absolute;
  bottom: 14px;
  right: 14px;
  left: 14px;
  padding: 11px 15px;
  border-radius: 12px;
  background: rgba(9, 14, 26, 0.9);
  backdrop-filter: blur(8px);
  color: #ffffff;
  font-size: 0.9rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.zoom-hint {
  font-size: 0.85rem;
  color: #7dd3fc;
  white-space: nowrap;
}

/* Quick Roadmap Strip */
.roadmap-strip {
  padding: 20px 0;
  background: var(--bg-page);
  border-bottom: 1.5px solid var(--border-color);
}

.roadmap-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.roadmap-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 13px;
  border-radius: 12px;
  background: var(--bg-surface);
  border: 1.5px solid var(--border-color);
  color: var(--text-primary);
  font-size: 0.9rem;
  font-weight: 700;
  transition: all var(--transition);
}

.roadmap-item:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.roadmap-num {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--accent);
  color: #ffffff;
  display: grid;
  place-items: center;
  font-size: 0.88rem;
  font-weight: 800;
  flex-shrink: 0;
}

[data-theme="dark"] .roadmap-num {
  color: #061224;
}

/* Main Workspace Layout */
.layout-shell {
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr);
  gap: 28px;
  padding: 34px 0 64px;
  align-items: start;
}

/* Sticky Sidebar */
.sidebar {
  position: sticky;
  top: calc(var(--nav-height) + 18px);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.sidebar-card {
  background: var(--bg-surface);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 18px;
  box-shadow: var(--shadow-sm);
}

.sidebar-title {
  margin: 0 0 12px;
  font-size: 1rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text-primary);
}

.toc-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.toc-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  border-radius: 10px;
  color: var(--text-secondary);
  font-size: 0.92rem;
  font-weight: 700;
  transition: all var(--transition);
}

.toc-link:hover {
  background: var(--bg-surface-2);
  color: var(--text-primary);
}

.toc-link.active {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 800;
}

.toc-dot {
  width: 9px;
  height: 9px;
  border-radius: 99px;
  background: var(--border-strong);
  flex-shrink: 0;
}

.toc-link.active .toc-dot {
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.progress-meter-bar {
  height: 10px;
  border-radius: 99px;
  background: var(--bg-surface-2);
  overflow: hidden;
  margin: 8px 0;
}

.progress-meter-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--success), var(--accent));
  border-radius: 99px;
  transition: width 0.3s ease;
}

/* Guide Content Sections */
.content-stack {
  display: flex;
  flex-direction: column;
  gap: 32px;
  min-width: 0;
}

.guide-section {
  background: var(--bg-surface);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 30px;
  box-shadow: var(--shadow-sm);
}

.section-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
  padding-bottom: 18px;
  border-bottom: 1.5px solid var(--border-color);
}

.step-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 800;
  font-size: 0.88rem;
  margin-bottom: 10px;
}

.section-title {
  margin: 0;
  font-size: clamp(1.4rem, 2.2vw, 1.75rem);
  font-weight: 800;
  line-height: 1.38;
  color: var(--text-primary);
}

.section-subtitle {
  margin: 8px 0 0;
  color: var(--text-secondary);
  font-size: 1rem;
  font-weight: 500;
}

.section-time {
  flex-shrink: 0;
  padding: 7px 14px;
  border-radius: 10px;
  background: var(--bg-surface-2);
  border: 1.5px solid var(--border-color);
  color: var(--text-primary);
  font-size: 0.88rem;
  font-weight: 700;
}

.sub-heading {
  margin: 26px 0 10px;
  font-size: 1.18rem;
  font-weight: 800;
  color: var(--text-primary);
}

.lead-para {
  margin: 0 0 14px;
  color: var(--text-secondary);
  font-size: 1rem;
}

/* Cards & Grids */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.info-card {
  background: var(--bg-surface-2);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
}

.info-card h3,
.info-card h4 {
  margin: 0 0 9px;
  font-size: 1.08rem;
  font-weight: 800;
  color: var(--text-primary);
}

.info-card p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.97rem;
}

/* Callout Alerts */
.alert {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px 20px;
  border-radius: var(--radius-md);
  border: 1.5px solid;
  margin: 20px 0;
  font-size: 0.98rem;
  color: var(--text-primary);
}

.alert-icon {
  font-size: 1.45rem;
  line-height: 1.2;
  flex-shrink: 0;
}

.alert strong {
  color: var(--text-primary);
}

.alert-title {
  display: block;
  margin-bottom: 4px;
  font-size: 1.03rem;
}

.alert-info {
  background: var(--info-bg);
  border-color: var(--info-border);
}

.alert-success {
  background: var(--success-bg);
  border-color: var(--success-border);
}

.alert-warning {
  background: var(--warning-bg);
  border-color: var(--warning-border);
}

.alert-danger {
  background: var(--danger-bg);
  border-color: var(--danger-border);
}

/* Checklist */
.checklist {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.check-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 15px 16px;
  border-radius: 13px;
  background: var(--bg-surface-2);
  border: 1.5px solid var(--border-color);
  cursor: pointer;
  transition: all var(--transition);
  user-select: none;
}

.check-item:hover {
  border-color: var(--accent);
}

.check-item input {
  width: 21px;
  height: 21px;
  margin-top: 3px;
  accent-color: var(--accent);
  cursor: pointer;
  flex-shrink: 0;
}

.check-item.checked {
  background: var(--success-bg);
  border-color: var(--success-border);
}

.check-item.checked .check-title {
  text-decoration: line-through;
  opacity: 0.82;
}

.check-title {
  display: block;
  font-weight: 800;
  font-size: 0.98rem;
  color: var(--text-primary);
}

.check-note {
  display: block;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Illustrated Figures */
.figure-box {
  margin: 22px 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1.5px solid var(--border-strong);
  background: var(--bg-surface-2);
  box-shadow: var(--shadow-md);
}

.figure-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 18px;
  background: var(--bg-surface-3);
  border-bottom: 1.5px solid var(--border-color);
  font-size: 0.94rem;
  font-weight: 800;
  color: var(--text-primary);
}

.figure-zoom-btn {
  border: 1.5px solid var(--border-strong);
  background: var(--bg-surface);
  color: var(--text-primary);
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 0.86rem;
  font-weight: 800;
  cursor: pointer;
}

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

.figure-img-wrap {
  position: relative;
  cursor: zoom-in;
  background: #0b1220;
}

.figure-img-wrap img {
  width: 100%;
  max-height: 430px;
  object-fit: cover;
}

.figure-caption {
  padding: 14px 18px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-secondary);
  border-top: 1.5px solid var(--border-color);
  background: var(--bg-surface);
}

/* Interactive UI Screen Mockups */
.screen-workbench {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 20px;
  padding: 20px;
  background: var(--bg-page);
  align-items: start;
}

.ui-window {
  direction: ltr;
  text-align: left;
  font-family: 'Segoe UI', Tahoma, sans-serif;
  border-radius: 12px;
  overflow: hidden;
  border: 1.5px solid #334155;
  background: #f8fafc;
  color: #0f172a;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.22);
  position: relative;
}

.ui-window--dark {
  background: #0b1627;
  color: #f8fafc;
  border-color: #334155;
}

.ui-titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: #e2e8f0;
  color: #0f172a;
  font-size: 13px;
  font-weight: 700;
}

.ui-window--dark .ui-titlebar {
  background: #14263d;
  color: #f8fafc;
  border-bottom: 1px solid #2c4c75;
}

.ui-win-dots {
  display: flex;
  gap: 6px;
}

.ui-win-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #64748b;
}

.ui-win-dots span:last-child {
  background: #ef4444;
}

.ui-body {
  padding: 16px;
  font-size: 14px;
}

/* Interactive Annotation Pins */
.hotspot-item {
  position: relative;
  border-radius: 8px;
  transition: all 0.2s ease;
  cursor: pointer;
}

.hotspot-item.is-active {
  outline: 3px solid #f59e0b;
  outline-offset: 2px;
  box-shadow: 0 0 0 5px rgba(245, 158, 11, 0.24);
}

.pin-badge {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #f59e0b;
  color: #0f172a;
  font-weight: 800;
  font-size: 13px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
  flex-shrink: 0;
}

.callout-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.callout-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 13px 15px;
  border-radius: 12px;
  border: 1.5px solid var(--border-color);
  background: var(--bg-surface);
  cursor: pointer;
  transition: all var(--transition);
  text-align: start;
  width: 100%;
  color: var(--text-primary);
}

.callout-card:hover,
.callout-card.is-active {
  border-color: #f59e0b;
  background: var(--warning-bg);
  transform: translateX(-3px);
}

[dir="ltr"] .callout-card:hover,
[dir="ltr"] .callout-card.is-active {
  transform: translateX(3px);
}

.callout-card strong {
  display: block;
  font-size: 0.96rem;
  font-weight: 800;
  margin-bottom: 3px;
  color: var(--text-primary);
}

.callout-card span {
  display: block;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* Rufus UI */
.rufus-row {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 10px;
  padding: 6px 8px;
}

.rufus-label {
  font-size: 12.5px;
  font-weight: 700;
  color: #1e293b;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.rufus-control {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 11px;
  background: #ffffff;
  border: 1.5px solid #94a3b8;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #0f172a;
}

.rufus-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.rufus-btn {
  padding: 6px 13px;
  border: 1.5px solid #64748b;
  background: #e2e8f0;
  color: #0f172a;
  border-radius: 6px;
  font-size: 12.5px;
  font-weight: 700;
}

.rufus-btn--primary {
  background: #005fb8;
  color: #ffffff;
  border-color: #004c94;
}

.rufus-progress {
  height: 22px;
  background: #dcfce7;
  border: 1.5px solid #16a34a;
  border-radius: 5px;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 800;
  color: #14532d;
}

/* msinfo32 UI */
.msinfo-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  background: #ffffff;
  color: #0f172a;
}

.msinfo-table td {
  padding: 8px 11px;
  border-bottom: 1px solid #cbd5e1;
}

.msinfo-highlight {
  background: #fef3c7;
  font-weight: 700;
}

/* Decision Helper Tool */
.helper-box {
  background: var(--bg-surface-2);
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 22px;
  margin-top: 20px;
}

.helper-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 14px 0;
}

.field-group label {
  display: block;
  font-size: 0.94rem;
  font-weight: 800;
  margin-bottom: 7px;
  color: var(--text-primary);
}

.select-input,
.text-input {
  width: 100%;
  padding: 11px 14px;
  border-radius: 10px;
  border: 1.5px solid var(--border-strong);
  background: var(--bg-surface);
  color: var(--text-primary);
  font-size: 0.96rem;
  font-weight: 600;
}

.helper-result {
  padding: 16px 18px;
  border-radius: 12px;
  background: var(--bg-surface);
  border: 1.5px solid var(--accent-glow);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.helper-result-item span {
  display: block;
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--text-muted);
}

.helper-result-item strong {
  font-size: 1.06rem;
  font-weight: 800;
  color: var(--accent);
}

/* Brand Boot Key Lookup */
.brand-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin: 16px 0;
}

.brand-pill {
  padding: 9px 15px;
  border-radius: 10px;
  border: 1.5px solid var(--border-strong);
  background: var(--bg-surface);
  color: var(--text-primary);
  font-weight: 700;
  font-size: 0.92rem;
  cursor: pointer;
  transition: all var(--transition);
}

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

.brand-pill.active {
  background: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
}

[data-theme="dark"] .brand-pill.active {
  color: #061224;
}

.brand-result-card {
  background: var(--bg-surface);
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 20px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  align-items: center;
}

.key-display {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 1.32rem;
  font-weight: 800;
  color: var(--accent);
  margin-top: 4px;
}

/* Windows Setup Stepper Simulator */
.setup-sim {
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bg-surface-2);
  margin: 22px 0;
}

.setup-tabs {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  gap: 8px;
  padding: 13px;
  background: var(--bg-surface-3);
  border-bottom: 1.5px solid var(--border-color);
}

.setup-tab {
  padding: 8px 14px;
  border-radius: 9px;
  border: 1.5px solid var(--border-strong);
  background: var(--bg-surface);
  color: var(--text-primary);
  font-size: 0.88rem;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition: all var(--transition);
}

.setup-tab.active {
  background: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
}

[data-theme="dark"] .setup-tab.active {
  color: #061224;
}

.setup-stage {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: 22px;
  padding: 22px;
  align-items: start;
}

.win-modal {
  background: #ffffff;
  color: #0f172a;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.3);
  font-family: 'Segoe UI', Tahoma, sans-serif;
  direction: ltr;
  text-align: left;
  min-height: 330px;
  display: flex;
  flex-direction: column;
  border: 1.5px solid #94a3b8;
}

.win-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: #e2e8f0;
  border-bottom: 1px solid #cbd5e1;
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
}

.win-modal-body {
  padding: 18px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
}

.win-h {
  margin: 0 0 8px;
  font-size: 17px;
  font-weight: 700;
  color: #005fb8;
}

.win-field {
  margin-bottom: 10px;
}

.win-field label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 4px;
}

.win-select {
  width: 100%;
  padding: 7px 10px;
  border: 1.5px solid #94a3b8;
  border-radius: 5px;
  background: #ffffff;
  font-size: 13px;
  font-weight: 600;
  color: #0f172a;
}

.win-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid #cbd5e1;
}

.win-btn {
  padding: 7px 16px;
  border-radius: 5px;
  border: 1.5px solid #64748b;
  background: #e2e8f0;
  color: #0f172a;
  font-size: 13px;
  font-weight: 700;
}

.win-btn--blue {
  background: #005fb8;
  color: #ffffff;
  border-color: #004c94;
}

.win-choice-box {
  border: 1.5px solid #94a3b8;
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 10px;
  font-size: 13px;
  color: #0f172a;
}

.win-choice-box--recommended {
  border-color: #16a34a;
  background: #ecfdf5;
}

.win-choice-box--dim {
  opacity: 0.72;
  background: #f1f5f9;
}

.win-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
  border: 1.5px solid #94a3b8;
}

.win-table th {
  background: #e2e8f0;
  padding: 7px 8px;
  border-bottom: 1.5px solid #94a3b8;
  color: #0f172a;
  font-weight: 700;
}

.win-table td {
  padding: 7px 8px;
  border-bottom: 1px solid #cbd5e1;
  color: #0f172a;
}

.row-delete {
  background: #fef2f2;
  color: #991b1b;
  font-weight: 600;
}

.row-target {
  background: #eff6ff;
  color: #1e3a8a;
  font-weight: 700;
}

.setup-explain-card {
  background: var(--bg-surface);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 22px;
}

.setup-explain-card h3 {
  margin: 0 0 10px;
  font-size: 1.16rem;
  font-weight: 800;
  color: var(--text-primary);
}

.setup-nav-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border-top: 1.5px solid var(--border-color);
  background: var(--bg-surface);
}

.mode-btn {
  padding: 7px 13px;
  border-radius: 8px;
  border: 1.5px solid #94a3b8;
  background: #e2e8f0;
  color: #0f172a;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
}

.mode-btn.active {
  background: #005fb8;
  color: #ffffff;
  border-color: #004c94;
}

/* Command Blocks */
.cmd-block {
  position: relative;
  direction: ltr;
  text-align: left;
  background: var(--bg-code);
  color: var(--text-code);
  border-radius: 12px;
  padding: 15px 18px;
  margin: 12px 0;
  font-family: var(--font-mono);
  font-size: 0.96rem;
  line-height: 1.75;
  overflow-x: auto;
  border: 1.5px solid #334155;
}

.copy-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 6px 12px;
  border-radius: 7px;
  border: 1.5px solid #475569;
  background: #1e293b;
  color: #f8fafc;
  font-family: var(--font-sans);
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
}

.copy-btn:hover {
  border-color: #38bdf8;
  color: #38bdf8;
}

/* Troubleshooting & FAQ Accordions */
.search-bar-wrap {
  position: relative;
  margin-bottom: 18px;
}

.search-bar-wrap input {
  width: 100%;
  padding: 13px 16px;
  border-radius: 12px;
  border: 1.5px solid var(--border-strong);
  background: var(--bg-surface-2);
  color: var(--text-primary);
  font-size: 1rem;
  font-weight: 600;
}

.search-bar-wrap input::placeholder {
  color: var(--text-muted);
  opacity: 0.9;
}

.accordion-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.accordion-item {
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-surface-2);
  overflow: hidden;
}

.accordion-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 20px;
  border: none;
  background: transparent;
  color: var(--text-primary);
  font-size: 1.02rem;
  font-weight: 800;
  text-align: start;
  cursor: pointer;
}

.accordion-trigger:hover {
  color: var(--accent);
}

.accordion-chevron {
  transition: transform 0.22s ease;
  flex-shrink: 0;
}

.accordion-item.open .accordion-chevron {
  transform: rotate(180deg);
}

.accordion-panel {
  display: none;
  padding: 0 20px 20px;
  color: var(--text-secondary);
  font-size: 0.98rem;
  border-top: 1.5px solid var(--border-color);
  background: var(--bg-surface);
}

.accordion-item.open .accordion-panel {
  display: block;
  padding-top: 16px;
}

/* Clean Ordered Steps List */
.numbered-steps {
  list-style: none;
  margin: 16px 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 13px;
}

.numbered-steps li {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 15px 18px;
  border-radius: 13px;
  background: var(--bg-surface-2);
  border: 1.5px solid var(--border-color);
  color: var(--text-secondary);
  font-size: 0.98rem;
}

.numbered-steps li strong {
  color: var(--text-primary);
}

.step-circle {
  width: 31px;
  height: 31px;
  border-radius: 50%;
  background: var(--accent);
  color: #ffffff;
  font-weight: 800;
  font-size: 0.95rem;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  margin-top: 2px;
}

[data-theme="dark"] .step-circle {
  color: #061224;
}

/* Comparison Table */
.table-scroll {
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border-color);
  margin: 16px 0;
}

.guide-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.96rem;
  min-width: 560px;
}

.guide-table th,
.guide-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-color);
  text-align: start;
}

.guide-table th {
  background: var(--bg-surface-2);
  font-weight: 800;
  color: var(--text-primary);
}

.guide-table td {
  color: var(--text-secondary);
}

/* Lightbox Modal */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(6, 10, 19, 0.9);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.lightbox.open {
  display: flex;
}

.lightbox-inner {
  max-width: 1060px;
  width: 100%;
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1.5px solid var(--border-strong);
  box-shadow: var(--shadow-lg);
}

.lightbox-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: var(--bg-surface-2);
  border-bottom: 1.5px solid var(--border-color);
  font-weight: 800;
  color: var(--text-primary);
}

.lightbox-body {
  padding: 18px;
  max-height: 78vh;
  overflow: auto;
  display: grid;
  place-items: center;
}

.lightbox-body img {
  max-height: 70vh;
  width: auto;
  border-radius: 10px;
}

/* Footer */
.site-footer {
  border-top: 1.5px solid var(--border-color);
  background: var(--bg-surface);
  padding: 32px 0;
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.back-to-top {
  position: fixed;
  bottom: 22px;
  left: 22px;
  z-index: 900;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  border: 1.5px solid var(--border-strong);
  background: var(--bg-surface);
  color: var(--text-primary);
  box-shadow: var(--shadow-md);
  cursor: pointer;
  display: none;
  place-items: center;
  font-size: 1.2rem;
  font-weight: 800;
}

[dir="ltr"] .back-to-top {
  left: auto;
  right: 22px;
}

.back-to-top.visible {
  display: grid;
}

/* Responsive Breakpoints */
@media (max-width: 1120px) {
  .layout-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
  }

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

  .screen-workbench,
  .setup-stage {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .hero-grid,
  .grid-2,
  .grid-3,
  .checklist,
  .helper-controls,
  .helper-result,
  .brand-result-card {
    grid-template-columns: 1fr;
  }

  .header-nav {
    display: none;
    position: fixed;
    top: var(--nav-height);
    right: 0;
    left: 0;
    background: var(--bg-surface);
    border-bottom: 1.5px solid var(--border-color);
    flex-direction: column;
    align-items: stretch;
    padding: 12px 16px;
    box-shadow: var(--shadow-md);
  }

  .header-nav.open {
    display: flex;
  }

  .mobile-menu-btn {
    display: inline-flex;
  }

  .roadmap-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .guide-section {
    padding: 22px 16px;
  }

  .hero-stats {
    grid-template-columns: 1fr;
  }
}

@media print {
  .site-header,
  .sidebar,
  .back-to-top,
  .reading-progress,
  .lightbox {
    display: none !important;
  }
  .layout-shell {
    grid-template-columns: 1fr;
  }
}
