/* ===================================================
   FPSCheck.com — Premium Dark Theme Stylesheet
   =================================================== */

/* --- CSS Custom Properties --- */
:root {
    --bg-primary: #0a0e1a;
    --bg-secondary: #111827;
    --bg-surface: #1a2236;
    --bg-surface-hover: #1f2a42;
    --bg-glass: rgba(26, 34, 54, 0.7);
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --accent-cyan: #06b6d4;
    --accent-cyan-light: #22d3ee;
    --accent-cyan-glow: rgba(6, 182, 212, 0.25);
    --accent-green: #10b981;
    --accent-green-glow: rgba(16, 185, 129, 0.2);
    --accent-yellow: #f59e0b;
    --accent-red: #ef4444;
    --accent-purple: #8b5cf6;
    --border-color: #1e293b;
    --border-hover: #334155;
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 30px var(--accent-cyan-glow);
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --transition-fast: 0.15s ease;
    --transition-base: 0.25s ease;
    --transition-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Reset & Base --- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    overflow-x: hidden;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-main);
    font-size: 16px;
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Subtle animated background grid */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(circle at 20% 30%, rgba(6, 182, 212, 0.04) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(139, 92, 246, 0.03) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

a {
    color: var(--accent-cyan);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--accent-cyan-light);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul,
ol {
    list-style: none;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--text-primary);
    line-height: 1.3;
    font-weight: 700;
}

p {
    color: var(--text-secondary);
}

code {
    background: rgba(6, 182, 212, 0.1);
    color: var(--accent-cyan);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.9em;
}

::selection {
    background: var(--accent-cyan);
    color: #000;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    position: relative;
    z-index: 1;
}

/* ===================================================
   HEADER & NAVIGATION
   =================================================== */
header {
    background: rgba(10, 14, 26, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: background var(--transition-base);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 72px;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 4px;
    letter-spacing: -0.5px;
}

.logo span {
    color: var(--accent-cyan);
}

.logo:hover {
    color: var(--text-primary);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.nav-links a {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.nav-links a:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.nav-links a.active {
    color: var(--accent-cyan);
    background: var(--accent-cyan-glow);
}

/* Hamburger */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
    background: none;
    border: none;
}

.menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all var(--transition-base);
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Breadcrumb */
.breadcrumb {
    padding: 0.75rem 0;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.breadcrumb a {
    color: var(--text-muted);
}

.breadcrumb a:hover {
    color: var(--accent-cyan);
}

.breadcrumb span {
    margin: 0 0.5rem;
}

/* ===================================================
   HERO SECTION
   =================================================== */
.hero {
    text-align: center;
    padding: 5rem 1rem 3rem;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 600px;
    height: 400px;
    background: radial-gradient(circle, var(--accent-cyan-glow) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--accent-cyan-glow);
    border: 1px solid rgba(6, 182, 212, 0.3);
    color: var(--accent-cyan);
    padding: 0.4rem 1rem;
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.hero h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    margin-bottom: 1.25rem;
    letter-spacing: -1px;
    background: linear-gradient(135deg, #fff 0%, var(--accent-cyan) 50%, var(--accent-purple) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    color: var(--text-secondary);
    font-size: 1.15rem;
    max-width: 620px;
    margin: 0 auto 2.5rem;
    line-height: 1.8;
}

/* ===================================================
   FPS TOOL INTERFACE (The Heart)
   =================================================== */
.fps-tool-container {
    background: var(--bg-glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 2.5rem;
    max-width: 960px;
    margin: 0 auto;
    box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255, 255, 255, 0.03);
    position: relative;
    overflow: hidden;
}

.fps-tool-container::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(from 0deg, transparent, rgba(6, 182, 212, 0.03), transparent, rgba(139, 92, 246, 0.02), transparent);
    animation: rotate-bg 20s linear infinite;
    pointer-events: none;
}

@keyframes rotate-bg {
    to {
        transform: rotate(360deg);
    }
}

.readout-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
    position: relative;
    z-index: 1;
}

.readout-card {
    background: rgba(10, 14, 26, 0.6);
    padding: 1.5rem 1rem;
    border-radius: var(--radius-md);
    text-align: center;
    border: 1px solid var(--border-color);
    transition: border-color var(--transition-base), transform var(--transition-base);
}

.readout-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-2px);
}

.readout-label {
    display: block;
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.75rem;
}

.readout-value {
    display: block;
    font-size: 2.25rem;
    font-weight: 800;
    line-height: 1;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
}

.readout-value.good {
    color: var(--accent-green);
    text-shadow: 0 0 20px var(--accent-green-glow);
}

.readout-value.ok {
    color: var(--accent-yellow);
}

.readout-value.bad {
    color: var(--accent-red);
}

.fps-main-value {
    font-size: 4.5rem;
}

/* Canvas Graph */
.canvas-wrapper {
    width: 100%;
    height: 260px;
    background: rgba(10, 14, 26, 0.5);
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border-color);
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
}

canvas {
    display: block;
    width: 100%;
    height: 100%;
}

/* Controls */
.controls {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
}

/* ===================================================
   BUTTONS
   =================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.75rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    border: none;
    transition: all var(--transition-base);
    font-family: var(--font-main);
    outline: none;
}

.btn:focus-visible {
    box-shadow: 0 0 0 3px var(--accent-cyan-glow);
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-cyan), #0284c7);
    color: #fff;
    box-shadow: 0 4px 16px rgba(6, 182, 212, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(6, 182, 212, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.btn-secondary:hover {
    border-color: var(--border-hover);
    background: var(--bg-surface-hover);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--accent-cyan);
    color: var(--accent-cyan);
}

.btn-outline:hover {
    background: var(--accent-cyan-glow);
}

select.btn {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 2.5rem;
}

/* ===================================================
   CONTENT SECTIONS
   =================================================== */
section {
    padding: 5rem 0;
    position: relative;
}

section:nth-child(even) {
    background: rgba(17, 24, 39, 0.4);
}

.section-header {
    text-align: center;
    margin-bottom: 3.5rem;
}

.section-header h2 {
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    margin-bottom: 1rem;
    letter-spacing: -0.5px;
}

.section-header p {
    max-width: 600px;
    margin: 0 auto;
    font-size: 1.05rem;
}

/* Card Grid */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.card {
    background: var(--bg-surface);
    padding: 2rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    transition: all var(--transition-slow);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-cyan), var(--accent-purple));
    opacity: 0;
    transition: opacity var(--transition-base);
}

.card:hover {
    border-color: var(--border-hover);
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.card:hover::before {
    opacity: 1;
}

.card-icon {
    width: 48px;
    height: 48px;
    background: var(--accent-cyan-glow);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1.25rem;
    color: var(--accent-cyan);
}

.card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.card p {
    color: var(--text-secondary);
    line-height: 1.7;
}

/* Steps (How It Works) */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    counter-reset: step;
}

.step-card {
    text-align: center;
    padding: 2.5rem 1.5rem;
    position: relative;
}

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
    color: #fff;
    font-size: 1.25rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 20px rgba(6, 182, 212, 0.3);
}

.step-card h3 {
    margin-bottom: 0.75rem;
}

/* Info Boxes */
.info-box {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    margin-bottom: 2rem;
}

.info-box h3 {
    font-size: 1.35rem;
    margin-bottom: 1rem;
}

.info-box p,
.info-box li {
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    line-height: 1.8;
}

.info-box ul {
    margin-left: 1.25rem;
}

.info-box ul li {
    list-style: disc;
    padding-left: 0.5rem;
}

/* Content Article (for guide pages) */
.article-content {
    max-width: 800px;
    margin: 0 auto;
}

.article-content h2 {
    font-size: 1.75rem;
    margin: 2.5rem 0 1rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.article-content h2:first-child {
    border-top: none;
    padding-top: 0;
}

.article-content h3 {
    font-size: 1.35rem;
    margin: 2rem 0 0.75rem;
    color: var(--accent-cyan);
}

.article-content p {
    margin-bottom: 1.25rem;
    line-height: 1.85;
}

.article-content ul,
.article-content ol {
    margin: 1rem 0 1.5rem 1.5rem;
}

.article-content ul li {
    list-style: disc;
    color: var(--text-secondary);
    margin-bottom: 0.6rem;
    padding-left: 0.5rem;
}

.article-content ol li {
    list-style: decimal;
    color: var(--text-secondary);
    margin-bottom: 0.6rem;
    padding-left: 0.5rem;
}

.article-content li strong {
    color: var(--text-primary);
}

.article-content blockquote {
    border-left: 3px solid var(--accent-cyan);
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    background: rgba(6, 182, 212, 0.05);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    color: var(--text-secondary);
    font-style: italic;
}

/* Table of Contents */
.toc {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.5rem 2rem;
    margin-bottom: 2.5rem;
}

.toc h4 {
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-size: 1rem;
}

.toc ol {
    margin-left: 1.25rem;
}

.toc li {
    list-style: decimal;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.toc a {
    color: var(--accent-cyan);
}

/* FPS Range Table */
.fps-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: 0.95rem;
}

.fps-table th,
.fps-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.fps-table th {
    background: var(--bg-surface);
    color: var(--text-primary);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
}

.fps-table td {
    color: var(--text-secondary);
}

.fps-table tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

/* Performance Grade Badge */
.grade-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    font-size: 1.75rem;
    font-weight: 800;
    margin-bottom: 1rem;
}

.grade-a {
    background: var(--accent-green-glow);
    color: var(--accent-green);
    border: 2px solid var(--accent-green);
}

.grade-b {
    background: rgba(6, 182, 212, 0.15);
    color: var(--accent-cyan);
    border: 2px solid var(--accent-cyan);
}

.grade-c {
    background: rgba(245, 158, 11, 0.15);
    color: var(--accent-yellow);
    border: 2px solid var(--accent-yellow);
}

.grade-d {
    background: rgba(239, 68, 68, 0.15);
    color: var(--accent-red);
    border: 2px solid var(--accent-red);
}

/* ===================================================
   FAQ
   =================================================== */
.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    margin-bottom: 0.75rem;
    overflow: hidden;
    transition: border-color var(--transition-base);
}

.faq-item:hover {
    border-color: var(--border-hover);
}

.faq-item.active {
    border-color: rgba(6, 182, 212, 0.3);
}

.faq-question {
    padding: 1.25rem 1.5rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-primary);
    user-select: none;
    transition: color var(--transition-fast);
}

.faq-question:hover {
    color: var(--accent-cyan);
}

.faq-toggle {
    font-size: 1.25rem;
    color: var(--text-muted);
    transition: transform var(--transition-base);
    flex-shrink: 0;
    margin-left: 1rem;
}

.faq-item.active .faq-toggle {
    transform: rotate(45deg);
    color: var(--accent-cyan);
}

.faq-answer {
    padding: 0 1.5rem;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease, padding 0.35s ease;
    color: var(--text-secondary);
    line-height: 1.8;
}

.faq-item.active .faq-answer {
    max-height: 500px;
    padding: 0 1.5rem 1.5rem;
}

/* ===================================================
   COMPARISON SIMULATION
   =================================================== */
.sim-box {
    height: 120px;
    background: #000;
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: 1.25rem;
    border: 1px solid var(--border-color);
}

.sim-ball {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
}

/* ===================================================
   FOOTER
   =================================================== */
footer {
    background: var(--bg-secondary);
    padding: 5rem 0 0;
    margin-top: 0;
    border-top: 1px solid var(--border-color);
    position: relative;
}

.footer-cta {
    text-align: center;
    padding: 3rem 2rem;
    background: linear-gradient(135deg, var(--accent-cyan-glow), rgba(139, 92, 246, 0.1));
    border: 1px solid rgba(6, 182, 212, 0.15);
    border-radius: var(--radius-xl);
    margin-bottom: 4rem;
}

.footer-cta h3 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

.footer-cta p {
    margin-bottom: 1.5rem;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
    padding-bottom: 3rem;
}

.footer-col p {
    font-size: 0.9rem;
    line-height: 1.7;
}

.footer-col h4 {
    color: var(--text-primary);
    margin-bottom: 1.25rem;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-col ul li {
    margin-bottom: 0.6rem;
}

.footer-col a {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.footer-col a:hover {
    color: var(--accent-cyan);
}

.footer-bottom {
    text-align: center;
    border-top: 1px solid var(--border-color);
    padding: 1.5rem 0;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* ===================================================
   UTILITY CLASSES
   =================================================== */
.text-center {
    text-align: center;
}

.text-cyan {
    color: var(--accent-cyan);
}

.text-green {
    color: var(--accent-green);
}

.text-yellow {
    color: var(--accent-yellow);
}

.text-red {
    color: var(--accent-red);
}

.mb-1 {
    margin-bottom: 0.5rem;
}

.mb-2 {
    margin-bottom: 1rem;
}

.mb-3 {
    margin-bottom: 1.5rem;
}

.mb-4 {
    margin-bottom: 2rem;
}

.mt-2 {
    margin-top: 1rem;
}

.mt-4 {
    margin-top: 2rem;
}

/* Accessible focus */
:focus-visible {
    outline: 2px solid var(--accent-cyan);
    outline-offset: 2px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }
}

/* ===================================================
   RESPONSIVE
   =================================================== */

/* --- Tablet (1024px) --- */
@media (max-width: 1024px) {
    .footer-content {
        grid-template-columns: 1fr 1fr;
    }

    .card-grid {
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    }
}

/* --- Mobile / Tablet Portrait (768px) --- */
@media (max-width: 768px) {

    /* Navigation */
    .menu-toggle {
        display: flex;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        position: fixed;
        top: 72px;
        left: 0;
        width: 100%;
        background: rgba(10, 14, 26, 0.97);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        padding: 0.75rem;
        border-bottom: 1px solid var(--border-color);
        gap: 0;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
        max-height: calc(100vh - 72px);
        overflow-y: auto;
    }

    .nav-links.open {
        display: flex;
    }

    .nav-links a {
        padding: 0.9rem 1.25rem;
        border-radius: var(--radius-sm);
        font-size: 1rem;
        text-align: center;
        border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    }

    .nav-links a:last-child {
        border-bottom: none;
    }

    /* Hero */
    .hero {
        padding: 2.5rem 0.5rem 2rem;
    }

    .hero h1 {
        font-size: 1.75rem;
        letter-spacing: -0.5px;
    }

    .hero p {
        font-size: 1rem;
        margin-bottom: 1.75rem;
        line-height: 1.7;
    }

    .hero-badge {
        font-size: 0.7rem;
        padding: 0.35rem 0.75rem;
        margin-bottom: 1rem;
    }

    /* Sections */
    section {
        padding: 2.5rem 0;
    }

    .section-header {
        margin-bottom: 2rem;
    }

    .section-header h2 {
        font-size: 1.5rem;
    }

    .section-header p {
        font-size: 0.95rem;
    }

    /* FPS Tool */
    .fps-tool-container {
        padding: 1.25rem;
        border-radius: var(--radius-lg);
    }

    .readout-grid {
        grid-template-columns: 1fr 1fr;
        gap: 0.6rem;
    }

    .readout-card {
        padding: 1rem 0.5rem;
    }

    .fps-main-value {
        font-size: 2.75rem;
    }

    .readout-value {
        font-size: 1.5rem;
    }

    .readout-label {
        font-size: 0.7rem;
        margin-bottom: 0.5rem;
    }

    .canvas-wrapper {
        height: 200px;
    }

    /* Card & Steps Grids */
    .card-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .card {
        padding: 1.5rem;
    }

    .steps-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .step-card {
        padding: 1.5rem 1rem;
        text-align: left;
        display: flex;
        flex-direction: row;
        align-items: flex-start;
        gap: 1rem;
    }

    .step-number {
        width: 44px;
        height: 44px;
        min-width: 44px;
        font-size: 1rem;
        margin-bottom: 0;
    }

    /* Tables — horizontal scroll wrapper */
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin: 1rem -0.5rem;
        padding: 0 0.5rem;
        position: relative;
    }

    .table-responsive::after {
        content: '← Scroll →';
        display: block;
        text-align: center;
        font-size: 0.7rem;
        color: var(--text-muted);
        margin-top: 0.5rem;
        opacity: 0.6;
    }

    .fps-table {
        font-size: 0.85rem;
        min-width: 500px;
    }

    .fps-table th,
    .fps-table td {
        padding: 0.75rem 0.6rem;
        white-space: nowrap;
    }

    /* FAQ */
    .faq-question {
        padding: 1rem 1.25rem;
        font-size: 0.9rem;
    }

    .faq-answer {
        font-size: 0.9rem;
    }

    .faq-item.active .faq-answer {
        padding: 0 1.25rem 1.25rem;
    }

    /* Info Boxes & TOC */
    .info-box {
        padding: 1.5rem;
        border-radius: var(--radius-md);
    }

    .toc {
        padding: 1.25rem;
    }

    .toc ol {
        margin-left: 1rem;
    }

    /* Article Content */
    .article-content {
        padding: 0 0.25rem;
    }

    .article-content h2 {
        font-size: 1.35rem;
        margin: 2rem 0 0.75rem;
        padding-top: 1rem;
    }

    .article-content h3 {
        font-size: 1.15rem;
        margin: 1.5rem 0 0.5rem;
    }

    .article-content p {
        font-size: 0.95rem;
        line-height: 1.75;
    }

    .article-content ul,
    .article-content ol {
        margin-left: 1rem;
    }

    /* Article Meta / Byline */
    .article-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
        font-size: 0.8rem;
    }

    .article-meta .separator {
        display: none;
    }

    /* Founder Card */
    .founder-card {
        padding: 1.5rem;
    }

    .founder-social {
        gap: 0.4rem;
    }

    .founder-social a {
        font-size: 0.8rem;
        padding: 0.35rem 0.65rem;
    }

    /* Footer */
    .footer-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .footer-cta {
        padding: 2rem 1.25rem;
        margin-bottom: 2rem;
        border-radius: var(--radius-lg);
    }

    .footer-cta h3 {
        font-size: 1.25rem;
    }

    footer {
        padding: 3rem 0 0;
    }

    .footer-social {
        justify-content: flex-start;
    }

    /* Cookie Consent */
    .cookie-consent {
        padding: 0.75rem;
    }

    .cookie-content {
        flex-direction: column;
        text-align: center;
        gap: 0.75rem;
    }

    .cookie-content p {
        font-size: 0.8rem;
        min-width: auto;
    }

    .cookie-actions {
        width: 100%;
        justify-content: center;
    }

    .cookie-actions .btn {
        flex: 1;
        padding: 0.6rem 0.75rem;
        font-size: 0.85rem;
    }

    /* Back to Top */
    .back-to-top {
        bottom: 1rem;
        right: 1rem;
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    /* Comparison Simulations */
    .sim-box {
        height: 80px;
        margin-bottom: 0.75rem;
    }

    .sim-ball {
        width: 22px;
        height: 22px;
    }

    /* Breadcrumb */
    .breadcrumb {
        font-size: 0.75rem;
        padding: 0.5rem 0;
    }

    /* Container padding */
    .container {
        padding: 0 1rem;
    }
}

/* --- Small Mobile (480px) --- */
@media (max-width: 480px) {

    /* FPS Tool */
    .readout-value {
        font-size: 1.4rem;
    }

    .fps-main-value {
        font-size: 2.25rem;
    }

    .readout-card {
        padding: 0.75rem 0.35rem;
    }

    .readout-label {
        font-size: 0.65rem;
        letter-spacing: 0.5px;
    }

    .canvas-wrapper {
        height: 160px;
    }

    /* Controls stack vertically */
    .controls {
        flex-direction: column;
    }

    .controls .btn,
    .controls select {
        width: 100%;
    }

    /* Card tighter padding */
    .card {
        padding: 1.25rem;
    }

    .card h3 {
        font-size: 1.1rem;
    }

    /* Hero */
    .hero h1 {
        font-size: 1.5rem;
    }

    .hero p {
        font-size: 0.9rem;
    }

    /* Info box */
    .info-box {
        padding: 1.25rem;
    }

    /* Footer bottom */
    .footer-bottom {
        font-size: 0.75rem;
        padding: 1rem 0;
    }

    /* Article images */
    .article-content img {
        border-radius: var(--radius-sm);
    }

    /* Contact form - prevent iOS zoom on focus */
    .form-group input,
    .form-group select,
    .form-group textarea {
        font-size: 16px;
    }

    /* Table cells wrap on very small screens */
    .fps-table th,
    .fps-table td {
        font-size: 0.78rem;
        padding: 0.6rem 0.5rem;
    }

    /* Founder social wrap */
    .founder-social a {
        font-size: 0.75rem;
        padding: 0.3rem 0.5rem;
    }

    /* Section padding */
    section {
        padding: 2rem 0;
    }

    .section-header {
        margin-bottom: 1.5rem;
    }

    .section-header h2 {
        font-size: 1.3rem;
    }

    /* TOC compact */
    .toc {
        padding: 1rem;
    }

    .toc h4 {
        font-size: 0.9rem;
    }

    .toc li {
        font-size: 0.85rem;
        margin-bottom: 0.35rem;
    }
}

/* ===================================================
   ANIMATIONS
   =================================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.6;
    }
}

.js-loaded .animate-in {
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
}

.pulse {
    animation: pulse 2s ease-in-out infinite;
}

/* ===================================================
   FOUNDER CARD (E-E-A-T)
   =================================================== */
.founder-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2rem;
    margin: 2rem 0;
    transition: border-color var(--transition-base);
}

.founder-card:hover {
    border-color: var(--border-hover);
}

.founder-info h3 {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

.founder-title {
    color: var(--accent-cyan) !important;
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 1rem !important;
}

.founder-social {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.founder-social a {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.85rem;
    background: var(--bg-surface-hover);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

.founder-social a:hover {
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
    background: var(--accent-cyan-glow);
}

/* Footer Social Icons */
.footer-social {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.footer-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    color: var(--text-muted);
    transition: all var(--transition-fast);
    text-decoration: none;
}

.footer-social a:hover {
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
    background: var(--accent-cyan-glow);
    transform: translateY(-2px);
}

/* ===================================================
   SKIP LINK (Accessibility)
   =================================================== */
.skip-link {
    position: absolute;
    top: -100%;
    left: 0;
    background: var(--accent-cyan);
    color: var(--bg-primary);
    padding: 0.75rem 1.5rem;
    z-index: 10000;
    font-weight: 600;
    border-radius: 0 0 var(--radius-sm) 0;
    transition: top 0.2s;
}

.skip-link:focus {
    top: 0;
}

/* ===================================================
   BACK TO TOP BUTTON
   =================================================== */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 44px;
    height: 44px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 1.25rem;
    cursor: pointer;
    z-index: 900;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all var(--transition-base);
    display: flex;
    align-items: center;
    justify-content: center;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
    background: var(--accent-cyan-glow);
}

/* ===================================================
   COOKIE CONSENT BANNER
   =================================================== */
.cookie-consent {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-surface);
    border-top: 1px solid var(--border-color);
    padding: 1rem;
    z-index: 9999;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.cookie-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.cookie-content p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
    flex: 1;
    min-width: 250px;
}

.cookie-content p a {
    color: var(--accent-cyan);
}

.cookie-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

.btn-sm {
    padding: 0.4rem 1rem;
    font-size: 0.85rem;
}

/* ===================================================
   AUTHOR BYLINE
   =================================================== */
.article-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 2rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.article-meta a {
    color: var(--accent-cyan);
}

.article-meta .separator {
    color: var(--border-color);
}

/* ===================================================
   CONTENT VISIBILITY (Lazy Rendering)
   =================================================== */
.faq-container,
footer {
    content-visibility: auto;
    contain-intrinsic-size: 0 500px;
}

/* ===================================================
   PRINT STYLESHEET
   =================================================== */
@media print {

    header,
    footer,
    .hero-badge,
    .back-to-top,
    .cookie-consent,
    .skip-link,
    .breadcrumb,
    .btn,
    .footer-cta,
    .controls,
    .menu-toggle,
    .canvas-wrapper,
    .stress-test {
        display: none !important;
    }

    body {
        background: white;
        color: black;
        font-size: 12pt;
    }

    .container {
        max-width: 100%;
        padding: 0;
    }

    a {
        color: black;
        text-decoration: underline;
    }

    a::after {
        content: " (" attr(href) ")";
        font-size: 0.8em;
        color: #666;
    }

    a[href^="#"]::after,
    a[href^="/"]::after {
        content: "";
    }

    .card,
    .step-card,
    .info-box,
    .faq-item,
    .founder-card {
        border: 1px solid #ccc;
        background: white;
        break-inside: avoid;
    }

    h1,
    h2,
    h3 {
        color: black;
    }
}

/* ===================================================
   CONTACT FORM
   =================================================== */
.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 0.4rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font-main);
    font-size: 0.95rem;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-cyan);
    box-shadow: 0 0 0 3px var(--accent-cyan-glow);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-muted);
}

.form-group select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%2394a3b8' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}