/* tmux.app - Premium Light Mode Design System */

:root {
  --bg-color: #ffffff;
  --surface: #f5f5f7;
  --surface-hover: #ebebeb;
  --surface-border: rgba(0, 0, 0, 0.1);
  --surface-border-hover: rgba(0, 0, 0, 0.2);
  
  --text-primary: #111111;
  --text-secondary: #555555;
  
  --accent-gradient-start: #2563eb;
  --accent-gradient-end: #6b21a8;
  
  --neon-blue: #0056d2;
  --neon-purple: #6b21a8;
  --glow-opacity: 0.04;

  --nav-bg: rgba(255, 255, 255, 0.8);
  --terminal-bg: #000000;
  --code-bg: #f8f9fa;
  --badge-bg: rgba(0, 0, 0, 0.05);

  --editor-header-bg: #ffffff;
  --editor-body-bg: #000000;
  --editor-text-title: #666666;

  --visual-bg: rgba(0, 0, 0, 0.03);
  --visual-border: var(--surface-border);
  
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  
  --rad: 16px;
  --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

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

html {
  scroll-behavior: smooth;
  font-family: var(--font-sans);
  background-color: var(--bg-color);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  /* Keep overflow-x hidden on html ONLY */
  overflow-x: hidden;
}

body { 
    /* Remove overflow-x: hidden from body as it can break position:sticky */
    min-height: 100vh;
}

/* ═══ BACKGROUND GLOW ═════════════════════════════════════ */
.bg-glow {
  position: fixed;
  top: -20%; left: 20%;
  width: 60%; height: 60%;
  background: radial-gradient(circle, rgba(37, 99, 235, var(--glow-opacity)) 0%, rgba(107, 33, 168, var(--glow-opacity)) 40%, rgba(0,0,0,0) 70%);
  filter: blur(120px);
  z-index: -1;
  pointer-events: none;
}

/* ═══ TYPOGRAPHY ══════════════════════════════════════════ */
h1, h2, h3, h4 { color: var(--text-primary); letter-spacing: -0.02em; }
h2 { font-size: 2.75rem; font-weight: 600; margin-bottom: 1rem; }
a { color: var(--text-secondary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--text-primary); }

/* ═══ BUTTONS ════════════════════════════════════════════ */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 0.5rem; padding: 0.75rem 1.5rem;
  font-size: 0.875rem; font-weight: 500;
  border-radius: 8px; cursor: pointer; transition: var(--transition);
  text-decoration: none;
  border: none;
}
.btn-primary { background: var(--text-primary); color: #fff; border: 1px solid var(--text-primary); }
.btn-primary:hover { 
    background: var(--text-primary); 
    color: #fff;
    opacity: 0.9;
    transform: translateY(-2px); 
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1); 
}
.btn-secondary { background: transparent; color: var(--text-primary); border: 1px solid var(--surface-border); }
.btn-secondary:hover { 
    background: var(--surface-hover); 
    border-color: var(--text-primary);
    transform: translateY(-2px);
}
.btn-sm { padding: 0.5rem 1rem; font-size: 0.75rem; }

/* ═══ NAVBAR ═════════════════════════════════════════════ */
.navbar {
  position: fixed; top: 0; width: 100%; padding: 1rem;
  background: var(--nav-bg); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--surface-border); z-index: 100;
}
.nav-container {
  max-width: 1200px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center;
}
.logo { display: flex; align-items: center; gap: 0.5rem; font-weight: 700; font-size: 1.25rem; color: var(--text-primary); }
.logo span { color: var(--neon-blue); }
.nav-links { display: flex; list-style: none; gap: 2.5rem; }
.nav-links a, .nav-links span { font-size: 0.875rem; font-weight: 500; }
.nav-links a.active { color: var(--neon-blue); }

/* ─── Nav Dropdown ─── */
.nav-dropdown { position: relative; }
.nav-dropdown-toggle { display: flex; align-items: center; gap: 0.25rem; cursor: pointer; }
.dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 0.5rem); /* Reduced wait gap slightly */
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-color);
    border: 1px solid var(--surface-border);
    border-radius: 10px;
    padding: 0.5rem;
    list-style: none;
    min-width: 160px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    z-index: 200;
}
/* This bridge ensures the hover state persists as you move cursor down */
.dropdown-menu::before {
    content: '';
    position: absolute;
    top: -0.75rem; 
    left: 0;
    right: 0;
    height: 0.75rem;
    background: transparent;
}
.dropdown-menu li a {
    display: block;
    padding: 0.6rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 6px;
    white-space: nowrap;
    color: var(--text-secondary);
}
.dropdown-menu li a:hover { background: var(--surface); color: var(--neon-blue); }
.nav-dropdown:hover .dropdown-menu,
.nav-dropdown:focus-within .dropdown-menu { display: block; }

/* ─── Hamburger ─── */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 24px; height: 18px;
  background: transparent; border: none;
  cursor: pointer; padding: 0; z-index: 101;
}
.nav-toggle span { width: 100%; height: 2px; background-color: var(--text-primary); transition: all 0.3s ease; }

/* ═══ HERO ═══════════════════════════════════════════════ */
.hero { max-width: 1200px; margin: 6rem auto 6rem; text-align: center; padding: 0 1.25rem; }
.badge { display: inline-block; padding: 0.25rem 0.75rem; border-radius: 20px; font-size: 0.75rem; background: var(--badge-bg); border: 1px solid var(--surface-border); margin-bottom: 2rem; color: var(--text-secondary); font-weight: 600; }
.hero-title { font-size: clamp(2.25rem, 5vw, 3.5rem); line-height: 1.1; font-weight: 800; margin-bottom: 1.5rem; }
.hero-title span { background: linear-gradient(135deg, var(--accent-gradient-start), var(--accent-gradient-end)); background-clip: text; -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.hero-subtitle { font-size: 1.1rem; color: var(--text-secondary); max-width: 950px; margin: 0 auto 2.5rem; line-height: 1.6; }
.hero-cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem; margin-bottom: 4rem; }

/* ═══ TERMINAL BLOCK ═════════════════════════════════════ */
.terminal-container {
  max-width: 800px; margin: 4rem auto;
  border: 1px solid var(--surface-border); border-radius: 12px;
  background: var(--editor-body-bg); overflow: hidden; box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}
.terminal-header { 
    display: flex; align-items: center; justify-content: space-between;
    padding: 0.75rem 1rem; background: var(--editor-header-bg); border-bottom: 1px solid var(--surface-border); 
}
.terminal-dots { display: flex; gap: 8px; }
.dot { width: 12px; height: 12px; border-radius: 50%; }
.dot.red { background: #ff5f56; } .dot.yellow { background: #ffbd2e; } .dot.green { background: #27c93f; }
.terminal-title { font-family: var(--font-mono); font-size: 0.75rem; color: var(--editor-text-title); }
.terminal-body { padding: 2rem; font-family: var(--font-mono); font-size: 0.9rem; line-height: 1.6; color: #a0aec0; background: var(--editor-body-bg); overflow-x: auto; }
.command { color: #f7fafc; margin-bottom: 0.5rem; }
.prompt { color: var(--neon-blue); margin-right: 8px; font-weight: bold; }
.comment { color: #718096; }
.output { color: #a0aec0; margin-bottom: 0.5rem; font-size: 0.85rem; }

.terminal-cursor {
    display: inline-block;
    width: 8px;
    height: 1.1em;
    background: var(--neon-blue);
    margin-left: 4px;
    vertical-align: middle;
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    from, to { opacity: 1; }
    50% { opacity: 0; }
}

.terminal-line { min-height: 1.5rem; display: flex; align-items: center; }

/* ═══ SECTIONS & BENTO GRID ══════════════════════════════ */
.section { 
    max-width: 1200px; 
    margin: 0 auto 8rem; 
    padding: 0 1.5rem;
    overflow: visible; /* Ensure sticky works */
}
.section-header { text-align: center; max-width: 800px; margin: 0 auto 4rem; }
.section-header h2 { margin-bottom: 1rem; }
.section-header p { color: var(--text-secondary); font-size: 1.125rem; }

.bento-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.bento-card { background: var(--surface); border: 1px solid var(--surface-border); border-radius: var(--rad); padding: 2.5rem; transition: var(--transition); display: flex; flex-direction: column; }
.bento-card:hover { border-color: var(--surface-border-hover); background: var(--surface-hover); transform: translateY(-4px); }

/* Bento Spanning Utilities */
.bento-span-2 { grid-column: span 2; }
.bento-span-3 { grid-column: span 3; }
.bento-span-row-2 { grid-row: span 2; }

@media (max-width: 992px) {
    .bento-grid { grid-template-columns: repeat(2, 1fr); }
    .bento-span-2, .bento-span-3 { grid-column: span 2; }
    .bento-span-row-2 { grid-row: auto; }
}

@media (max-width: 768px) {
    .bento-grid { grid-template-columns: 1fr; }
    .bento-span-2, .bento-span-3 { grid-column: auto; }
}

.bento-card h3 { font-size: 1.5rem; margin-bottom: 1rem; }
.bento-card p { color: var(--text-secondary); line-height: 1.6; flex-grow: 1; }

/* ═══ COMPARISON BLOCKS (Alternatives Page) ══════════════ */
.comparison-block {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 1rem;
}

.verdict-banner {
    background: var(--surface);
    border: 1px solid var(--surface-border);
    border-left: 5px solid var(--neon-blue);
    border-radius: var(--rad);
    padding: 2.5rem;
    position: relative;
    overflow: hidden;
}

.verdict-banner .verdict-label {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    background: var(--neon-blue);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: 4px;
    margin-bottom: 1.25rem;
}

.verdict-banner h3 {
    font-size: 1.75rem;
    margin-bottom: 1rem;
}

.choice-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.choice-card {
    background: var(--surface);
    border: 1px solid var(--surface-border);
    border-radius: var(--rad);
    padding: 2rem;
    transition: var(--transition);
}

.choice-card:hover { border-color: var(--surface-border-hover); transform: translateY(-3px); }

.choice-card h4 {
    font-size: 1.25rem;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.choice-card ul {
    list-style: none;
    padding: 0;
}

.choice-card li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 0.95rem;
}

.choice-card li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--neon-blue);
    font-weight: 700;
}

.choice-card--tmux {
    background: rgba(37, 99, 235, 0.02);
    border-color: rgba(37, 99, 235, 0.15);
}

.choice-card--tmux li::before { color: var(--neon-blue); }

@media (max-width: 900px) {
    .choice-container { grid-template-columns: 1fr; }
}

/* ═══ INSTALL TABS ════════════════════════════════════════ */
.os-tabs { 
    display: flex; 
    justify-content: center; 
    gap: 0.5rem; 
    margin: 0 auto 3.5rem; 
    background: var(--surface); 
    padding: 0.4rem; 
    border-radius: 50px; 
    width: fit-content;
    border: 1px solid var(--surface-border);
}
.os-tab { 
    padding: 0.6rem 1.5rem; 
    font-size: 0.85rem;
    font-weight: 700; 
    color: var(--text-secondary); 
    cursor: pointer; 
    border-radius: 50px; 
    transition: var(--transition); 
}
.os-tab.active { 
    background: #fff; 
    color: var(--neon-blue); 
    box-shadow: 0 4px 15px rgba(0,0,0,0.08); 
}
.os-pane { display: none; }
.os-pane.active { display: block; }

/* ═══ MINIMAL RESOURCE GRID ══════════════════════════════ */
.resource-minimal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}
.resource-mini-card {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 1.25rem 1.5rem;
    background: var(--surface);
    border: 1px solid var(--surface-border);
    border-radius: 12px;
    text-decoration: none;
    transition: var(--transition);
}
.resource-mini-card:hover {
    background: var(--surface-hover);
    border-color: var(--neon-blue);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
}
.mini-icon {
    font-size: 1.5rem;
    background: rgba(37,99,235,0.06);
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
}
.resource-mini-card h4 {
    font-size: 1.05rem;
    color: var(--text-primary);
    margin: 0;
}
.resource-mini-card p {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin: 0.2rem 0 0;
}

.install-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.install-card { background: var(--surface); border: 1px solid var(--surface-border); border-radius: var(--rad); padding: 2rem; }
.step-badge { display: inline-block; padding: 0.2rem 0.6rem; border-radius: 4px; background: rgba(37, 99, 235, 0.1); color: var(--neon-blue); font-size: 0.7rem; font-weight: 700; text-transform: uppercase; margin-bottom: 1rem; }

/* ─── Inline copy-cmd row (within tables / install cards) ─── */
.inline-cmd {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}
.inline-cmd code {
    font-size: 0.8rem;
    background: var(--code-bg);
    border: 1px solid var(--surface-border);
    border-radius: 4px;
    padding: 0.15rem 0.4rem;
    color: var(--text-primary);
    word-break: break-all;
}
.copy-inline-btn {
    background: var(--surface);
    border: 1px solid var(--surface-border);
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    padding: 0.25rem 0.5rem;
    transition: var(--transition);
    color: var(--text-secondary);
    line-height: 1;
    flex-shrink: 0;
}
.copy-inline-btn:hover { background: var(--surface-hover); color: var(--neon-blue); border-color: var(--neon-blue); }
.copy-inline-btn.copied { background: var(--neon-blue); color: #fff; border-color: var(--neon-blue); }

/* ═══ TABLES ═════════════════════════════════════════════ */
.table-wrapper { overflow-x: auto; background: var(--surface); border: 1px solid var(--surface-border); border-radius: var(--rad); margin-top: 2rem; }
.comparison-table { width: 100%; border-collapse: collapse; text-align: left; table-layout: fixed; }
.comparison-table th, .comparison-table td { padding: 1rem 1.25rem; border-bottom: 1px solid var(--surface-border); vertical-align: middle; }
.comparison-table th { background: rgba(0,0,0,0.01); font-weight: 700; color: var(--text-secondary); text-transform: uppercase; font-size: 0.7rem; letter-spacing: 0.05em; }

/* Minimalist column distribution */
.comparison-table th:nth-child(1), .comparison-table td:nth-child(1) { width: 155px; } /* Method */
.comparison-table th:nth-child(2), .comparison-table td:nth-child(2) { width: 320px; } /* Command */
.comparison-table th:nth-child(3), .comparison-table td:nth-child(3) { width: auto; }  /* Notes (Fluid) */

@media (max-width: 768px) {
    .comparison-table { table-layout: auto; }
}
.comparison-table tr:hover { background: rgba(37, 99, 235, 0.02); }
.comparison-table tr:last-child td { border-bottom: none; }

/* ═══ CHEATSHEET PREVIEW GRID ════════════════════════════ */
.cheatsheet-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.25rem;
}
.cheat-card {
    background: var(--surface);
    border: 1px solid var(--surface-border);
    border-radius: var(--rad);
    padding: 1.25rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    transition: var(--transition);
    position: relative;
}
.cheat-card:hover { border-color: var(--neon-blue); background: var(--surface-hover); transform: translateY(-2px); }
.cheat-key { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; }
.cheat-key kbd {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    background: var(--bg-color);
    border: 1px solid var(--surface-border);
    border-bottom: 3px solid var(--surface-border-hover);
    border-radius: 5px;
    padding: 0.2rem 0.5rem;
    color: var(--text-primary);
    font-weight: 600;
}
.cheat-desc { font-size: 0.875rem; color: var(--text-secondary); flex: 1; }
.cheat-card .copy-inline-btn { align-self: flex-end; margin-top: 0.25rem; }

/* ═══ CONFIG GENERATOR ═══════════════════════════════════ */
.config-generator {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 2rem;
    align-items: start;
}
.config-controls {
    background: var(--surface);
    border: 1px solid var(--surface-border);
    border-radius: var(--rad);
    padding: 2rem;
}
.config-controls h3 {
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}
.config-group { margin-bottom: 1.5rem; }
.config-group > label:first-child {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}
.config-group select {
    width: 100%;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    font-family: var(--font-sans);
    background: var(--bg-color);
    border: 1px solid var(--surface-border);
    border-radius: 8px;
    color: var(--text-primary);
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23555' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    padding-right: 2rem;
    transition: var(--transition);
}
.config-group select:focus { outline: none; border-color: var(--neon-blue); }

.toggle-row { display: flex; align-items: center; gap: 0.75rem; }
.toggle-input {
    position: relative;
    width: 42px; height: 22px;
    appearance: none;
    background: var(--surface-border);
    border-radius: 11px;
    cursor: pointer;
    transition: background 0.3s;
    flex-shrink: 0;
}
.toggle-input::after {
    content: '';
    position: absolute;
    top: 3px; left: 3px;
    width: 16px; height: 16px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.3s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.toggle-input:checked { background: var(--neon-blue); }
.toggle-input:checked::after { transform: translateX(20px); }
.toggle-label { font-size: 0.875rem; color: var(--text-secondary); cursor: pointer; }
.range-input { width: 100%; accent-color: var(--neon-blue); cursor: pointer; height: 4px; margin-top: 0.25rem; }

.config-preview {
    background: #0d1117;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: var(--rad);
    overflow: hidden;
    position: sticky;
    top: 90px;
}
.config-preview-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.25rem;
    background: rgba(255,255,255,0.04);
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.config-preview-header h3 {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: #8b949e;
    font-weight: 500;
}
.config-preview-header .btn-secondary {
    background: rgba(255,255,255,0.06);
    color: #8b949e;
    border-color: rgba(255,255,255,0.12);
}
.config-preview-header .btn-secondary:hover { background: rgba(255,255,255,0.12); color: #fff; }
.config-preview-header .btn-primary { background: var(--neon-blue); color: #fff; border-color: var(--neon-blue); }
.config-output {
    padding: 1.5rem;
    margin: 0;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    line-height: 1.7;
    color: #e6edf3;
    background: transparent;
    white-space: pre;
    overflow-x: auto;
    max-height: 520px;
    overflow-y: auto;
    border: none;
}
.config-output .cfg-comment { color: #6e7781; }
.config-output .cfg-key { color: #79c0ff; }
.config-output .cfg-val { color: #a5d6ff; }

/* ═══ PLUGIN CARDS (plugins page) ══════════════════════ */
.plugin-card {
    background: var(--surface);
    border: 1px solid var(--surface-border);
    border-radius: var(--rad);
    overflow: hidden;
    margin-bottom: 1.5rem;
    transition: var(--transition);
}
.plugin-card:hover {
    border-color: var(--surface-border-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.06);
}
.plugin-card-header {
    padding: 1.75rem 2rem 1rem;
}
.plugin-card-header h3 {
    font-size: 1.35rem;
    margin: 0.5rem 0 0.75rem;
}
.plugin-card-header h3 a {
    color: var(--text-primary);
}
.plugin-card-header h3 a:hover { color: var(--neon-blue); }
.plugin-card-header p {
    color: var(--text-secondary);
    line-height: 1.7;
    font-size: 0.95rem;
}
.plugin-card-body {
    padding: 0 2rem 1.75rem;
}
.plugin-card-body .terminal-container { margin-top: 0; }

/* ═══ INSTALL STEP BLOCKS (numbered steps on install pages) ══ */
.install-steps {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    max-width: 860px;
    margin: 0 auto;
}
.step-block {
    display: grid;
    grid-template-columns: 48px 1fr;
    gap: 1.5rem;
    align-items: start;
}
.step-num {
    width: 48px; height: 48px;
    background: var(--text-primary);
    color: #fff;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 1.1rem;
    flex-shrink: 0;
    margin-top: 0.25rem;
}
.step-content h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}
.step-content p {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 0.5rem;
}
.step-content code {
    font-family: var(--font-mono);
    font-size: 0.875em;
    background: var(--code-bg);
    border: 1px solid var(--surface-border);
    border-radius: 4px;
    padding: 0.1rem 0.4rem;
}

/* ═══ FAQ ACCORDION ══════════════════════════════════════ */
.faq-accordion { 
    max-width: 1000px; /* Increased for 2-col width */
    margin: 0 auto; 
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem 2.5rem;
    align-items: start;
}

@media (max-width: 850px) {
    .faq-accordion { grid-template-columns: 1fr; }
}

.faq-item { border-bottom: 1px solid var(--surface-border); }
.faq-item summary { padding: 1.5rem 0; font-size: 1.125rem; font-weight: 600; cursor: pointer; list-style: none; display: flex; justify-content: space-between; }
.faq-item summary::after { content: '+'; color: var(--text-secondary); transition: transform 0.3s; }
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-content { padding-bottom: 1.5rem; color: var(--text-secondary); line-height: 1.6; }
.faq-content code { background: var(--code-bg); border: 1px solid var(--surface-border); border-radius: 4px; padding: 0.1rem 0.4rem; font-family: var(--font-mono); font-size: 0.875em; }

/* ═══ AD SLOTS ═══════════════════════════════════════════ */
.ad-slot { max-width: 1200px; margin: -4rem auto 4rem; padding: 0 1.5rem; min-height: 0; }

/* ═══ FOOTER ══════════════════════════════════════════════ */
footer { border-top: 1px solid var(--surface-border); padding: 6rem 1.5rem 4rem; background: var(--bg-color); }
.footer-content { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 4rem; }
.footer-brand p { color: var(--text-secondary); margin-top: 1rem; max-width: 350px; line-height: 1.6; }
.footer-links h4 { font-size: 0.875rem; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 1.5rem; }
.footer-links ul { list-style: none; }
.footer-links li { margin-bottom: 0.75rem; }
.footer-links a { font-size: 0.9375rem; color: var(--text-secondary); }
.footer-links a:hover { color: var(--neon-blue); }
.footer-bottom { 
    max-width: 1200px; 
    margin: 4rem auto 0; 
    padding-top: 2rem; 
    border-top: 1px solid var(--surface-border); 
    color: var(--text-secondary); 
    font-size: 0.75rem; 
    display: flex; 
    justify-content: space-between; 
    align-items: flex-start; 
    gap: 2rem;
}
.footer-bottom p { margin: 0; }
.footer-bottom p:last-child { text-align: right; max-width: 65%; }

@media (max-width: 850px) {
    .footer-bottom { flex-direction: column; text-align: center; align-items: center; }
    .footer-bottom p:last-child { text-align: center; max-width: 100%; }
}

/* ═══ SCROLL REVEAL UTILITY ══════════════════════════════ */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity 0.8s ease, transform 0.8s ease; }
.reveal.revealed { opacity: 1; transform: translateY(0); }
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }

/* ═══ RESPONSIVE — COMPREHENSIVE MOBILE-FIRST SYSTEM ═══════
   Breakpoints:
     1024px  Tablet landscape / smaller desktop
      900px  Tablet portrait / hamburger nav
      600px  Large phone
      480px  Small phone
   All sections guaranteed: no horizontal scroll, no overflow.
═══════════════════════════════════════════════════════════ */

/* ── Global overflow guard ────────────────────────────── */
html {
    max-width: 100%;
    overflow-x: hidden;
}
body {
    max-width: 100%;
}
*, *::before, *::after {
    box-sizing: border-box;
    min-width: 0; /* allow flex/grid children to shrink */
}

/* ── Images & media never overflow their containers ───── */
img, video, iframe, embed, object { max-width: 100%; height: auto; }

/* ── Code blocks: scroll horizontally inside their box ── */
pre, .terminal-body, .config-output, .inline-cmd code {
    white-space: pre;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    word-break: normal;
    word-wrap: normal;
}

/* ── Tables always scroll inside wrapper ─────────────── */
.table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* ════════════════════════════════
   ≤ 1024px  – Tablet landscape
   ════════════════════════════════ */
@media (max-width: 1024px) {
    .section { padding: 0 1.25rem; }

    /* Doc page: sidebar + content side by side but tighter */
    .doc-layout { gap: 2rem; }

    /* Bento from 3 → 2 columns */
    .bento-grid { grid-template-columns: repeat(2, 1fr); }

    /* Install grid 3 → 2 on tablet */
    .install-grid { grid-template-columns: repeat(2, 1fr); }

    /* Config generator: controls above preview */
    .config-generator { grid-template-columns: 1fr; }
    .config-preview { position: static; }

    /* Cheatsheet keeps 2 columns on tablet */
    .cheatsheet-grid { grid-template-columns: repeat(2, 1fr); }

    h2 { font-size: 2.25rem; }
}

/* ════════════════════════════════
   ≤ 900px  – Tablet portrait / hamburger triggers
   ════════════════════════════════ */
@media (max-width: 900px) {

    /* ── Navbar ───────────────────────────────────────── */
    .nav-toggle {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        width: 24px; height: 18px;
        background: transparent; border: none;
        cursor: pointer; padding: 0; z-index: 101;
    }
    .nav-toggle span {
        display: block; width: 100%; height: 2px;
        background-color: var(--text-primary); transition: all 0.3s ease;
    }
    .nav-toggle.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
    .nav-toggle.open span:nth-child(2) { opacity: 0; }
    .nav-toggle.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

    .nav-links {
        display: none;
        position: fixed;
        top: 57px; left: 0; right: 0;
        background: var(--bg-color);
        border-bottom: 1px solid var(--surface-border);
        flex-direction: column;
        padding: 1rem 1.5rem 1.5rem;
        gap: 0.75rem;
        z-index: 99;
        max-height: calc(100vh - 57px);
        overflow-y: auto;
    }
    .nav-links.open { display: flex; }
    .nav-links li { list-style: none; }
    .nav-links a { font-size: 1rem; padding: 0.25rem 0; }

    /* Dropdown becomes inline on mobile */
    .dropdown-menu {
        position: static;
        transform: none;
        box-shadow: none;
        border: none;
        background: transparent;
        padding: 0.25rem 0 0.25rem 1rem;
        display: block;
        min-width: 0;
    }

    .nav-actions { display: none; }

    /* ── Hero ─────────────────────────────────────────── */
    .hero { margin: 5rem auto 4rem; }
    .hero-title { font-size: clamp(1.75rem, 6vw, 2.75rem); }
    .hero-subtitle { font-size: 0.95em; }
    .hero-cta { flex-direction: column; align-items: center; }
    .hero-cta .btn { width: 100%; max-width: 320px; }

    /* ── Grids → single column ────────────────────────── */
    .bento-grid { grid-template-columns: 1fr; gap: 1rem; }
    .install-grid { grid-template-columns: 1fr; }

    /* ── Section spacing ──────────────────────────────── */
    .section { margin-bottom: 5rem; }
    .section-header { margin-bottom: 2.5rem; }
    .section-header h2 { font-size: 1.75rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.25rem; }

    /* ── Doc layout: sidebar becomes a dropdown ────────── */
    .doc-layout {
        display: flex;
        flex-direction: column;
    }
    .doc-sidebar {
        position: static !important;
        top: auto !important;
        height: auto !important;
        max-height: 260px;
        overflow-y: auto;
        width: 100% !important;
        border-right: none;
        border-bottom: 1px solid var(--surface-border);
        padding-bottom: 1rem;
    }
    .doc-sidebar:not(.open) { display: none; }
    .doc-sidebar.open { display: block; }

    /* ── Step blocks: shrink the number circle ─────────── */
    .step-block { grid-template-columns: 40px 1fr; gap: 1rem; }
    .step-num { width: 40px; height: 40px; font-size: 1rem; }

    /* ── Config generator ──────────────────────────────── */
    .config-generator { grid-template-columns: 1fr; }
    .config-preview { position: static; }

    /* ── Cheatsheet ────────────────────────────────────── */
    .cheatsheet-grid { grid-template-columns: 1fr 1fr; gap: 0.75rem; }

    /* ── OS Tabs ───────────────────────────────────────── */
    .os-tabs { gap: 1rem; flex-wrap: wrap; }
    .os-tab { font-size: 0.875rem; }

    /* ── Footer ────────────────────────────────────────── */
    .footer-content { grid-template-columns: 1fr 1fr !important; gap: 2rem !important; }
    footer { padding: 4rem 1.25rem 3rem; }

    /* ── Comparison table: let it scroll ──────────────── */
    .comparison-table th, .comparison-table td { padding: 0.75rem 1rem; font-size: 0.875rem; }

    /* ── Bento card padding reduction ─────────────────── */
    .bento-card { padding: 1.75rem; }

    /* ── Plugin cards ──────────────────────────────────── */
    .plugin-card-header, .plugin-card-body { padding-left: 1.25rem; padding-right: 1.25rem; }
}

/* ════════════════════════════════
   ≤ 600px  – Large phone
   ════════════════════════════════ */
@media (max-width: 600px) {

    /* ── Typography ───────────────────────────────────── */
    .hero-title { font-size: clamp(1.5rem, 7vw, 2.1rem); }
    .hero-subtitle { font-size: 0.9rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.1rem; }

    /* ── Bento grid ────────────────────────────────────── */
    .bento-grid { grid-template-columns: 1fr; }
    .bento-card { padding: 1.5rem 1.25rem; }
    .bento-card h3 { font-size: 1.25rem; }

    /* ── Cheatsheet → single column ────────────────────── */
    .cheatsheet-grid { grid-template-columns: 1fr; }

    /* ── Cheat card: make kbd tags wrap nicely ──────────── */
    .cheat-key { flex-wrap: wrap; }
    .cheat-key kbd { font-size: 0.75rem; }

    /* ── Nav ────────────────────────────────────────────── */
    .nav-container { padding: 0 0.25rem; }
    .logo { font-size: 1.1rem; }

    /* ── Section ────────────────────────────────────────── */
    .section { padding: 0 1rem; margin-bottom: 4rem; }
    .section-header h2 { font-size: 1.5rem; }
    .section-header p { font-size: 1rem; }

    /* ── Terminal block ─────────────────────────────────── */
    .terminal-body { padding: 1.25rem; font-size: 0.8rem; }

    /* ── Install steps ──────────────────────────────────── */
    .step-block { grid-template-columns: 36px 1fr; gap: 0.75rem; }
    .step-num { width: 36px; height: 36px; font-size: 0.875rem; }
    .step-content h3 { font-size: 1rem; }
    .step-content p { font-size: 0.9rem; }

    /* ── OS Tabs: stack if needed ───────────────────────── */
    .os-tabs { gap: 0.75rem; }
    .os-tab { padding: 0.75rem 0; font-size: 0.8rem; }

    /* ── Config generator controls full width ───────────── */
    .config-controls { padding: 1.25rem; }
    .config-preview-header { flex-direction: column; align-items: flex-start; gap: 0.75rem; }
    .config-preview-header .btn { width: 100%; }

    /* ── FAQ ─────────────────────────────────────────────── */
    .faq-item summary { font-size: 0.95rem; }

    /* ── Footer ─────────────────────────────────────────── */
    .footer-content { grid-template-columns: 1fr !important; gap: 1.5rem !important; }
    .footer-bottom { flex-direction: column; gap: 0.5rem; text-align: center; }
    footer { padding: 3rem 1rem 2rem; }

    /* ── Comparison table ───────────────────────────────── */
    .comparison-table th, .comparison-table td { padding: 0.6rem 0.75rem; font-size: 0.8rem; }

    /* ── Plugin cards ────────────────────────────────────── */
    .plugin-card-header { padding: 1.25rem 1rem 0.75rem; }
    .plugin-card-body { padding: 0 1rem 1.25rem; }

    /* ── Inline cmd ──────────────────────────────────────── */
    .inline-cmd { flex-direction: column; align-items: flex-start; }
    .inline-cmd code { width: 100%; }

    /* ── Buttons ─────────────────────────────────────────── */
    .btn { padding: 0.7rem 1.25rem; font-size: 0.85rem; }
}

/* ════════════════════════════════
   ≤ 480px  – Small phone
   ════════════════════════════════ */
@media (max-width: 480px) {
    .hero { margin-top: 4rem; padding: 0 1rem; }
    .hero-title { font-size: clamp(1.25rem, 8vw, 1.85rem); }

    /* Badge takes less space */
    .badge { font-size: 0.65rem; padding: 0.2rem 0.6rem; margin-bottom: 1.25rem; }

    /* Section margins tighter */
    .section { margin-bottom: 3rem; }

    /* Bento remove padding further */
    .bento-card { padding: 1.25rem 1rem; border-radius: 12px; }

    /* Step blocks: number as top row element */
    .step-block { grid-template-columns: 1fr; }
    .step-num { margin: 0 0 0.5rem 0; }

    /* Config controls */
    .config-controls { border-radius: 12px; }

    /* Terminal font smaller */
    .terminal-body { font-size: 0.75rem; padding: 1rem; }

    /* Footer */
    footer { padding: 2.5rem 1rem 2rem; }

    /* Nav */
    .navbar { padding: 0.75rem 1rem; }
    .nav-links { top: 52px; }
}

