/* ==========================================================================
   SHUTDOWN & FOCUS - Main Stylesheet
   ========================================================================== */

/* --- Design Tokens --- */
:root {
    --bg-dark: #09090b;
    --bg-card: #141416;
    --bg-terminal: #0c0c0e;
    --text-primary: #f4f4f5;
    --text-secondary: #a1a1aa;
    --text-muted: #71717a;
    --accent-primary: #6366f1; /* Indigo */
    --accent-secondary: #a855f7; /* Purple */
    --accent-success: #10b981; /* Emerald */
    --accent-warning: #f59e0b; /* Amber */
    --accent-coffee: #ffdd00; /* BMC Yellow */
    --border-color: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(99, 102, 241, 0.3);
    --font-sans: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-glow: 0 0 30px rgba(99, 102, 241, 0.15);
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Base Styles --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: var(--font-sans);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    -webkit-font-smoothing: antialiased;
}

/* --- Background Ambient Glows --- */
body::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    top: -200px;
    left: 80%;
    transform: translateX(-50%);
    background: radial-gradient(circle, rgba(99, 102, 241, 0.12) 0%, rgba(168, 85, 247, 0.04) 50%, transparent 100%);
    z-index: -1;
    filter: blur(80px);
    pointer-events: none;
}

body::after {
    content: '';
    position: absolute;
    width: 800px;
    height: 800px;
    top: 1200px;
    left: -200px;
    background: radial-gradient(circle, rgba(168, 85, 247, 0.08) 0%, rgba(99, 102, 241, 0.02) 60%, transparent 100%);
    z-index: -1;
    filter: blur(100px);
    pointer-events: none;
}

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

ul {
    list-style: none;
}

/* --- Typography Helpers --- */
h1, h2, h3, h4 {
    font-weight: 700;
    letter-spacing: -0.025em;
    line-height: 1.25;
}

/* --- Layout Container --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* --- Header & Navigation --- */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(9, 9, 11, 0.75);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition-smooth);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 4.5rem;
}

.logo-wrapper {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-img {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 0.5rem;
    object-fit: cover;
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.logo-text {
    font-size: 1.25rem;
    font-weight: 800;
    background: linear-gradient(to right, var(--text-primary), #d4d4d8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.nav-link:hover {
    color: var(--text-primary);
}

/* --- Language Accordion --- */
.lang-accordion {
    position: relative;
    display: inline-block;
}

.lang-accordion-trigger {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.5rem 1.1rem;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 99px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition-smooth);
    user-select: none;
}

.lang-accordion-trigger:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
}

.lang-accordion.open .lang-accordion-trigger {
    border-color: var(--accent-primary);
    background: rgba(99, 102, 241, 0.08);
}

.chevron-icon {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--text-secondary);
}

.lang-accordion.open .chevron-icon {
    transform: rotate(180deg);
    color: var(--accent-primary);
}

.lang-accordion-content {
    position: absolute;
    top: calc(100% + 0.5rem);
    inset-inline-end: 0;
    background: rgba(20, 20, 22, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5), 0 0 20px rgba(99, 102, 241, 0.05);
    min-width: 180px;
    /* The roster is long enough to overrun a short viewport, so it scrolls. */
    max-height: min(60vh, 420px);
    overflow-y: auto;
    overscroll-behavior: contain;
    z-index: 101;
    display: flex;
    flex-direction: column;
    padding: 4px;
    
    /* Smooth slide-down & fade accordion transition */
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1), transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.2s;
}

.lang-accordion.open .lang-accordion-content {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-accordion-item {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 0.6rem 1rem;
    font-size: 0.85rem;
    font-weight: 600;
    text-align: start;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition-smooth);
    width: 100%;
}

.lang-accordion-item:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.lang-accordion-item.active {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.12) 0%, rgba(168, 85, 247, 0.12) 100%);
    color: var(--accent-primary);
    border: 1px solid rgba(99, 102, 241, 0.15);
}

/* --- Hero Section --- */
.hero {
    padding: 8rem 0 5rem 0;
    position: relative;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 4rem;
    align-items: center;
}

.hero-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    background: rgba(99, 102, 241, 0.1);
    color: var(--accent-primary);
    border: 1px solid rgba(99, 102, 241, 0.2);
    padding: 0.35rem 0.85rem;
    border-radius: 99px;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.025em;
    margin-bottom: 1.5rem;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 1.5rem;
    background: linear-gradient(to bottom right, #ffffff 30%, #a1a1aa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    max-width: 540px;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 1.8rem;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 0.5rem;
    transition: var(--transition-smooth);
    cursor: pointer;
    gap: 0.5rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
    color: white;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.35);
    border: none;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(99, 102, 241, 0.45);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.btn-disabled {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-muted);
    border: 1px solid var(--border-color);
    cursor: not-allowed;
    pointer-events: none;
}

/* --- Terminal Mockup --- */
.terminal-window {
    background: var(--bg-terminal);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: var(--shadow-lg), var(--shadow-glow);
    overflow: hidden;
    width: 100%;
}

.terminal-header {
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid var(--border-color);
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    position: relative;
}

.terminal-dots {
    display: flex;
    gap: 6px;
    position: absolute;
    left: 1rem;
}

.terminal-dot {
    width: 11px;
    height: 11px;
    border-radius: 50%;
}

.terminal-dot.red { background: #ef4444; }
.terminal-dot.yellow { background: #f59e0b; }
.terminal-dot.green { background: #10b981; }

.terminal-title {
    margin: 0 auto;
    font-size: 0.75rem;
    font-family: var(--font-mono);
    color: var(--text-muted);
}

.terminal-body {
    padding: 1.25rem;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    line-height: 1.5;
    color: #e4e4e7;
    min-height: 290px;
}

.term-line {
    margin-bottom: 0.5rem;
    display: flex;
    flex-wrap: wrap;
}

/* The CUI indents its prompts by two spaces; without this the flex children
   collapse that indent and the transcript stops matching the real output. */
.term-line > span {
    white-space: pre-wrap;
}

.term-prompt {
    color: var(--accent-primary);
    margin-right: 0.75rem;
    user-select: none;
}

.term-blue { color: #60a5fa; }
.term-green { color: #34d399; }
.term-yellow { color: #fbbf24; }
.term-cursor::after {
    content: '█';
    margin-left: 2px;
    animation: blink 1s step-end infinite;
    color: var(--accent-primary);
}

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

/* --- Features Section --- */
.section {
    padding: 7rem 0;
    border-top: 1px solid var(--border-color);
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-size: 2.25rem;
    margin-bottom: 1rem;
    background: linear-gradient(to right, #ffffff, #d4d4d8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.section-subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    padding: 2.25rem;
    position: relative;
    overflow: hidden;
    transition: var(--transition-smooth);
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(800px circle at var(--x, 0) var(--y, 0), rgba(255, 255, 255, 0.03), transparent 40%);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.5s;
}

.feature-card:hover::before {
    opacity: 1;
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: var(--border-hover);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.feature-icon-wrapper {
    width: 3.25rem;
    height: 3.25rem;
    border-radius: 0.75rem;
    background: rgba(99, 102, 241, 0.08);
    color: var(--accent-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(99, 102, 241, 0.15);
    transition: var(--transition-smooth);
}

.feature-card:hover .feature-icon-wrapper {
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
    color: white;
    transform: scale(1.05);
}

.feature-card-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.feature-card-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* --- Downloads Section --- */
.downloads {
    background: radial-gradient(100% 100% at 50% 100%, rgba(99, 102, 241, 0.03) 0%, transparent 80%);
}

.tabs-nav {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.tab-nav-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    padding: 0.75rem 1.5rem;
    border-radius: 99px;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.9rem;
    font-family: inherit;
    cursor: pointer;
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    /* Two-word labels ("Arch Linux") must not wrap inside a pill. */
    white-space: nowrap;
}

/* The distributions, one level under Linux. Same pill, quieter: it is a
   choice inside a choice, and reading as a second row of equals is what made
   eight of them look like eight platforms. */
.tabs-subnav {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: -2rem 0 3rem;
}

.tabs-subnav[hidden] {
    display: none;
}

.tab-subnav-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    padding: 0.5rem 1.1rem;
    border-radius: 99px;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.82rem;
    font-family: inherit;
    cursor: pointer;
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    gap: 0.45rem;
    white-space: nowrap;
}

.tab-subnav-btn:hover {
    color: var(--text-primary);
    border-color: rgba(255, 255, 255, 0.15);
}

.tab-subnav-btn.active {
    background: rgba(99, 102, 241, 0.12);
    border-color: var(--accent-primary);
    color: var(--text-primary);
}

.tab-nav-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.15);
}

.tab-nav-btn.active {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15) 0%, rgba(168, 85, 247, 0.15) 100%);
    border-color: var(--accent-primary);
    color: var(--text-primary);
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.1);
}

.tab-panel {
    display: none;
    animation: fadeIn 0.4s ease-out forwards;
}

.tab-panel.active {
    display: block;
}

/* Grid items keep their min-content width by default, so a long command line
   would push the whole card past the viewport instead of scrolling inside it. */
.download-card > * {
    min-width: 0;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.download-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 1.25rem;
    padding: 3rem;
    max-width: 980px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 290px) minmax(0, 1fr);
    gap: 3rem;
    align-items: center;
}

.download-details {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.download-os-badge {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    padding: 0.25rem 0.75rem;
    border-radius: 99px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.download-os-name {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.download-os-info {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 2rem;
}

.download-steps-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.download-steps {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.download-step {
    display: flex;
    gap: 0.75rem;
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.step-num {
    background: rgba(99, 102, 241, 0.1);
    color: var(--accent-primary);
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    flex-shrink: 0;
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.step-text {
    line-height: 1.5;
}

code.cmd {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    font-family: var(--font-mono);
    color: #e4e4e7;
    font-size: 0.85rem;
    word-break: break-all;
}

/* Copyable command blocks inside the installation steps. The step is a flex
   row, so the prose and the block below it need their own column wrapper. */
.step-body {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
    min-width: 0;
}

.cmd-block {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.4rem;
    min-width: 0;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    padding: 0.6rem 0.7rem;
}

.cmd-block code {
    flex: 1;
    min-width: 0;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    line-height: 1.5;
    color: #e4e4e7;
    width: 100%;
    /* A shell command is only correct one line at a time. Wrapping split URLs
       and flags mid-token, so long lines scroll instead of folding. */
    white-space: pre;
    overflow-x: auto;
    scrollbar-width: thin;
    padding-bottom: 0.2rem;
}

.cmd-copy {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 4px;
    padding: 0.3rem 0.45rem;
    color: var(--text-muted);
    font-family: inherit;
    font-size: 0.72rem;
    line-height: 1;
    cursor: pointer;
    transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.cmd-copy:hover {
    color: #e4e4e7;
    border-color: rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.04);
}

.cmd-copy.copied {
    color: #34d399;
    border-color: rgba(52, 211, 153, 0.4);
}

/* Shell highlighting. Same palette as the hero terminal so a command reads the
   same whether it is being demonstrated or copied. */
.sh-comment {
    color: var(--text-muted);
    font-style: italic;
}

.sh-string {
    color: #34d399;
}

.sh-var {
    color: #fbbf24;
}

.sh-flag {
    color: #60a5fa;
}

.sh-cmd {
    color: #a78bfa;
    font-weight: 600;
}

/* --- Support/BMC Section --- */
.support {
    padding: 6rem 0;
}

.support-card {
    background: linear-gradient(135deg, #1b1b1f 0%, #151518 100%);
    border: 1px solid var(--border-color);
    border-radius: 1.5rem;
    padding: 4rem;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.support-card::before {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    top: -150px;
    right: -150px;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.08) 0%, transparent 70%);
    z-index: 0;
    pointer-events: none;
}

.support-title {
    font-size: 2.25rem;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
}

.support-subtitle {
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 2.5rem auto;
    font-size: 1.05rem;
    position: relative;
    z-index: 1;
}

/* Buy Me A Coffee Custom Premium Button */
.bmc-button-custom {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background-color: var(--accent-coffee);
    color: #000000;
    font-family: 'Cookie', cursive, var(--font-sans);
    font-size: 1.5rem;
    font-weight: 700;
    padding: 0.75rem 2rem;
    border-radius: 0.75rem;
    box-shadow: 0 4px 15px rgba(255, 221, 0, 0.2);
    transition: var(--transition-smooth);
    border: 1px solid transparent;
    cursor: pointer;
    position: relative;
    z-index: 1;
}

.bmc-button-custom:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 25px rgba(255, 221, 0, 0.35);
}

.bmc-coffee-icon {
    width: 28px;
    height: 28px;
    fill: currentColor;
}

/* --- Footer --- */
.footer {
    border-top: 1px solid var(--border-color);
    padding: 3rem 0;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    background: rgba(9, 9, 11, 0.5);
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.footer-link {
    color: var(--text-secondary);
}

.footer-link:hover {
    color: var(--text-primary);
}

/* --- Responsive Adjustments --- */
@media (max-width: 992px) {
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
        text-align: center;
    }

    .hero-content {
        align-items: center;
    }

    .hero-title {
        font-size: 2.8rem;
    }

    .download-card {
        grid-template-columns: 1fr;
        gap: 2.5rem;
        padding: 2.25rem;
    }
    
    .download-details {
        align-items: center;
        text-align: center;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none; /* simple mobile version hiding navigation, keep it clean */
    }

    .hero {
        padding: 6rem 0 3rem 0;
    }

    .hero-title {
        font-size: 2.25rem;
    }

    .support-card {
        padding: 2.5rem 1.5rem;
    }

    .container {
        padding: 0 1.25rem;
    }

    /* Four platform pills wrap into two tidy rows on a phone. Eight did not,
       which is why this used to be a sideways swipe strip - and a tab you have
       to swipe to find is a tab most people never see. (#36) */
    .tabs-nav {
        gap: 0.5rem;
        margin: 0 0 2rem;
    }

    .tab-nav-btn {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
    }

    .tabs-subnav {
        margin: -1.25rem 0 2rem;
    }

    .tab-subnav-btn {
        padding: 0.45rem 0.9rem;
        font-size: 0.78rem;
    }

    .download-card {
        padding: 1.75rem 1.25rem;
    }

    .cmd-block code {
        font-size: 0.75rem;
    }
}

/* --- Right-to-left (Arabic) --- */

/*
 * Shell commands, paths and the terminal transcript are LTR content whichever
 * way the page reads, so they keep their own direction inside a mirrored page;
 * without this the leading `sudo` would be pushed to the right edge and the
 * `$` prompt would end up trailing its own line.
 */
[dir="rtl"] .cmd-block,
[dir="rtl"] .cmd-block code,
[dir="rtl"] .terminal-window {
    direction: ltr;
    text-align: left;
}

/* The prose lines of the transcript still read right-to-left. */
[dir="rtl"] .terminal-body .term-line > span:not(.term-prompt) {
    unicode-bidi: plaintext;
}

/* ===== Cookie consent ===== */

/* A band at the bottom rather than a modal: the page stays readable while the
   question is open, which is the difference between asking and blocking. */
.consent {
    position: fixed;
    inset-inline: 0;
    inset-block-end: 0;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1rem 1.25rem;
    background: var(--bg-card);
    border-block-start: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-family: var(--font-sans);
}

.consent__title {
    margin: 0;
    font-size: 1.05rem;
    color: var(--text-primary);
}

.consent__body {
    margin: 0;
    font-size: 0.9rem;
    max-inline-size: 44rem;
    line-height: 1.5;
}

.consent__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    max-inline-size: 24rem;
}

/* Both buttons, one class. Accept and refuse differ in what they do and in
   nothing else - a refuse that is quieter is not a free choice. */
.consent__button {
    flex: 1 1 8rem;
    padding: 0.5rem 1rem;
    font-family: inherit;
    font-size: 0.9rem;
    border-radius: 0.375rem;
    border: 1px solid var(--accent-primary);
    background: transparent;
    color: var(--accent-primary);
    cursor: pointer;
    transition: var(--transition-smooth);
}

.consent__button:hover { background: var(--accent-primary); color: var(--bg-dark); }

/* Small and out of the way, but always reachable: withdrawing must not be
   harder than giving. */
.consent-reopen {
    position: fixed;
    inset-block-end: 0.5rem;
    inset-inline-start: 0.5rem;
    z-index: 1000;
    padding: 0.25rem 0.6rem;
    font-family: var(--font-sans);
    font-size: 0.75rem;
    border-radius: 999px;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-muted);
    cursor: pointer;
}

/* ===== Privacy page ===== */

.policy {
    padding-block: 6rem 4rem;
    color: var(--text-secondary);
    font-family: var(--font-sans);
}

.policy__title {
    font-size: 2.25rem;
    color: var(--text-primary);
    margin-block-end: 1rem;
}

.policy__lead {
    font-size: 1.05rem;
    line-height: 1.7;
    max-inline-size: 46rem;
    margin-block-end: 2.5rem;
}

.policy__section { margin-block-end: 2rem; max-inline-size: 46rem; }

.policy__heading {
    font-size: 1.15rem;
    color: var(--text-primary);
    margin-block-end: 0.5rem;
}

.policy__text { line-height: 1.7; margin: 0; }
.policy__text a { color: var(--accent-primary); }

.policy__updated {
    margin-block-start: 3rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.consent__links { margin: 0; font-size: 0.85rem; }
.consent__link { color: var(--accent-primary); }

/* `hidden` is a UA-stylesheet rule, and any author `display` beats it whatever
   the specificity — so the banner above was on screen from first paint and
   stayed there after a choice was made. The attribute needs saying again here
   for it to mean anything. */
.consent[hidden], .consent-reopen[hidden] { display: none; }
