/* ============================================
   FUELWISE — Premium Gas Mileage Calculator
   Design System & Full Styles
   ============================================ */

/* ── CSS Custom Properties ── */
:root {
    /* Colors */
    --bg-primary: #07080d;
    --bg-secondary: #0c0e16;
    --bg-tertiary: #12141f;
    --bg-card: rgba(16, 18, 30, 0.65);
    --bg-card-hover: rgba(22, 25, 42, 0.8);

    --text-primary: #f0f2f8;
    --text-secondary: rgba(200, 210, 235, 0.7);
    --text-tertiary: rgba(160, 170, 200, 0.45);

    --accent-indigo: #6366f1;
    --accent-violet: #8b5cf6;
    --accent-cyan: #06b6d4;
    --accent-emerald: #22c55e;
    --accent-amber: #f59e0b;
    --accent-rose: #f43f5e;

    --gradient-primary: linear-gradient(135deg, #6366f1, #8b5cf6, #06b6d4);
    --gradient-hero: linear-gradient(180deg, #07080d 0%, #0a0c15 50%, #0c0e18 100%);
    --gradient-card: linear-gradient(135deg, rgba(99,102,241,0.08), rgba(6,182,212,0.05));

    --border-subtle: rgba(99, 102, 241, 0.12);
    --border-glow: rgba(99, 102, 241, 0.3);

    --glass-bg: rgba(12, 14, 22, 0.6);
    --glass-border: rgba(255, 255, 255, 0.06);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);

    /* Spacing */
    --section-padding: 120px 0;
    --container-max: 1200px;
    --container-padding: 0 24px;

    /* Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    /* Transitions */
    --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-spring: 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Outfit', 'Inter', sans-serif;
    line-height: 1.15;
}

a {
    text-decoration: none;
    color: inherit;
}

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

button {
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
    color: inherit;
}

input {
    font-family: inherit;
}

/* ── Utility ── */
.gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    box-shadow: var(--glass-shadow);
}

.hidden {
    display: none !important;
}

/* ── Section Shared ── */
.section-container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: var(--container-padding);
}

.section-header {
    text-align: center;
    margin-bottom: 72px;
}

.section-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 16px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent-indigo);
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: var(--radius-full);
    margin-bottom: 20px;
}

.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
}

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

/* ============================================
   NAVIGATION
   ============================================ */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 16px 0;
    transition: var(--transition-base);
}

.navbar.scrolled {
    padding: 10px 0;
    background: rgba(7, 8, 13, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
}

.nav-container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: var(--container-padding);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.brand-mark {
    display: block;
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
}

.logo-icon {
    display: flex;
}

.logo-text {
    font-family: 'Outfit', sans-serif;
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.logo-accent {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.language-picker {
    position: relative;
}

.language-picker select {
    min-width: 122px;
    height: 38px;
    padding: 0 32px 0 12px;
    border: 1px solid rgba(255,255,255,.11);
    border-radius: 999px;
    background: rgba(255,255,255,.045);
    color: var(--text-primary);
    font: 650 .78rem "Inter", sans-serif;
    cursor: pointer;
    outline: none;
}

.language-picker select:focus {
    border-color: #f59e0b;
    box-shadow: 0 0 0 3px rgba(245,158,11,.12);
}

.language-picker select option {
    background: #111827;
    color: #f8fafc;
}

html[dir="rtl"] .content-section,
html[dir="rtl"] .article-hero,
html[dir="rtl"] .footer {
    text-align: right;
}

html[dir="rtl"] .article-lead,
html[dir="rtl"] .content-section p {
    margin-right: 0;
    margin-left: auto;
}

html[dir="rtl"] input,
html[dir="rtl"] output,
html[dir="rtl"] .dashboard-metrics,
html[dir="rtl"] .mileage-gauge {
    direction: ltr;
}

.nav-link {
    padding: 8px 16px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
    position: relative;
}

.nav-link:hover {
    color: var(--text-primary);
    background: rgba(99, 102, 241, 0.08);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 20px;
    height: 2px;
    background: var(--accent-indigo);
    border-radius: 2px;
    transition: var(--transition-base);
}

.nav-link:hover::after {
    transform: translateX(-50%) scaleX(1);
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 8px;
}

.mobile-menu-btn span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: var(--transition-base);
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 120px 24px 80px;
    overflow: hidden;
    background: var(--gradient-hero);
}

.hero-bg-effects {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.hero-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.3;
}

.hero-orb-1 {
    width: 500px;
    height: 500px;
    background: var(--accent-indigo);
    top: -15%;
    left: -10%;
    animation: orbFloat1 12s ease-in-out infinite;
}

.hero-orb-2 {
    width: 400px;
    height: 400px;
    background: var(--accent-violet);
    top: 20%;
    right: -8%;
    animation: orbFloat2 15s ease-in-out infinite;
}

.hero-orb-3 {
    width: 350px;
    height: 350px;
    background: var(--accent-cyan);
    bottom: -10%;
    left: 30%;
    animation: orbFloat3 18s ease-in-out infinite;
}

@keyframes orbFloat1 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, 50px) scale(1.1); }
    66% { transform: translate(-20px, 30px) scale(0.95); }
}

@keyframes orbFloat2 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(-40px, -30px) scale(0.9); }
    66% { transform: translate(20px, -50px) scale(1.1); }
}

@keyframes orbFloat3 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(50px, -40px) scale(1.15); }
}

.hero-grid-overlay {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(99, 102, 241, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(99, 102, 241, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
}

.hero-content {
    text-align: center;
    max-width: 700px;
    z-index: 2;
    position: relative;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    color: var(--accent-cyan);
    background: rgba(6, 182, 212, 0.08);
    border: 1px solid rgba(6, 182, 212, 0.2);
    border-radius: var(--radius-full);
    margin-bottom: 28px;
    animation: fadeInDown 0.8s ease forwards;
}

.badge-dot {
    width: 6px;
    height: 6px;
    background: var(--accent-cyan);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.5); }
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4.2rem);
    font-weight: 900;
    letter-spacing: -0.03em;
    margin-bottom: 24px;
    animation: fadeInUp 0.8s 0.1s ease both;
}

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--text-secondary);
    max-width: 560px;
    margin: 0 auto 36px;
    line-height: 1.7;
    animation: fadeInUp 0.8s 0.2s ease both;
}

.hero-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 60px;
    animation: fadeInUp 0.8s 0.3s ease both;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    transition: var(--transition-base);
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.35);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(99, 102, 241, 0.5);
}

.btn-primary::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.15), transparent);
    opacity: 0;
    transition: var(--transition-base);
}

.btn-primary:hover::before {
    opacity: 1;
}

.btn-ghost {
    color: var(--text-secondary);
    border: 1px solid var(--border-subtle);
    background: rgba(99, 102, 241, 0.04);
}

.btn-ghost:hover {
    color: var(--text-primary);
    border-color: var(--border-glow);
    background: rgba(99, 102, 241, 0.1);
    transform: translateY(-2px);
}

/* Hero Stats */
.hero-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 32px;
    animation: fadeInUp 0.8s 0.4s ease both;
}

.hero-stat {
    text-align: center;
}

.hero-stat-value {
    font-family: 'Outfit', sans-serif;
    font-size: 1.8rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-stat-percent {
    font-family: 'Outfit', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-stat-label {
    display: block;
    font-size: 0.78rem;
    color: var(--text-tertiary);
    margin-top: 4px;
}

.hero-stat-divider {
    width: 1px;
    height: 40px;
    background: var(--border-subtle);
}

/* Hero Gauge Visual */
.hero-visual {
    position: absolute;
    bottom: -20px;
    right: 5%;
    z-index: 1;
    opacity: 0.15;
    pointer-events: none;
}

.gauge-container {
    width: 320px;
}

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

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

/* ============================================
   CALCULATOR SECTION
   ============================================ */
.calculator-section {
    padding: var(--section-padding);
    position: relative;
}

.calculator-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(99,102,241,0.08) 0%, transparent 70%);
    pointer-events: none;
}

.calculator-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    align-items: start;
}

.calc-card {
    padding: 36px;
}

.calc-card-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 28px;
}

.calc-card-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(99, 102, 241, 0.12);
    border-radius: var(--radius-md);
    color: var(--accent-indigo);
}

.results-icon {
    background: rgba(34, 197, 94, 0.12);
    color: var(--accent-emerald);
}

.calc-card-header h3 {
    font-size: 1.25rem;
    font-weight: 700;
}

/* Unit Toggle */
.unit-toggle-wrapper {
    margin-bottom: 28px;
}

.unit-toggle {
    display: flex;
    position: relative;
    background: rgba(255, 255, 255, 0.04);
    border-radius: var(--radius-md);
    padding: 4px;
    border: 1px solid var(--glass-border);
}

.unit-btn {
    flex: 1;
    padding: 10px 16px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-tertiary);
    border-radius: var(--radius-sm);
    transition: var(--transition-base);
    z-index: 2;
    position: relative;
}

.unit-btn.active {
    color: var(--text-primary);
}

.unit-slider {
    position: absolute;
    top: 4px;
    left: 4px;
    width: calc(50% - 4px);
    height: calc(100% - 8px);
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: var(--radius-sm);
    transition: var(--transition-base);
}

.unit-toggle .unit-btn:last-of-type.active ~ .unit-slider,
.unit-toggle[data-active="metric"] .unit-slider {
    left: calc(50%);
}

/* Form Inputs */
.calc-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.input-label svg {
    color: var(--accent-indigo);
    opacity: 0.7;
}

.input-label small {
    color: var(--text-tertiary);
    font-weight: 400;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper input {
    width: 100%;
    padding: 14px 80px 14px 18px;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    transition: var(--transition-base);
    outline: none;
}

.input-wrapper input::placeholder {
    color: var(--text-tertiary);
}

.input-wrapper input:focus {
    border-color: var(--accent-indigo);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
    background: rgba(99, 102, 241, 0.04);
}

.input-unit {
    position: absolute;
    right: 16px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-tertiary);
    pointer-events: none;
}

.btn-calc {
    margin-top: 8px;
    width: 100%;
    justify-content: center;
    padding: 16px;
    font-size: 1rem;
}

.btn-calc .btn-loader {
    display: none;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

.btn-calc.loading .btn-text { display: none; }
.btn-calc.loading svg { display: none; }
.btn-calc.loading .btn-loader { display: block; }

@keyframes spin { to { transform: rotate(360deg); } }

/* ── Results Card ── */
.results-card {
    padding: 36px;
    animation: slideInRight 0.6s ease forwards;
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(40px); }
    to { opacity: 1; transform: translateX(0); }
}

.result-mpg-display {
    text-align: center;
    margin-bottom: 28px;
}

.mpg-ring-container {
    position: relative;
    width: 160px;
    height: 160px;
    margin: 0 auto 16px;
}

.mpg-ring {
    width: 100%;
    height: 100%;
}

.mpg-ring-value {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.mpg-number {
    font-family: 'Outfit', sans-serif;
    font-size: 2.5rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.mpg-unit {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.efficiency-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 16px;
    border-radius: var(--radius-full);
    font-size: 0.82rem;
    font-weight: 600;
    background: rgba(34, 197, 94, 0.1);
    color: var(--accent-emerald);
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.efficiency-badge.poor {
    background: rgba(244, 63, 94, 0.1);
    color: var(--accent-rose);
    border-color: rgba(244, 63, 94, 0.2);
}

.efficiency-badge.fair {
    background: rgba(245, 158, 11, 0.1);
    color: var(--accent-amber);
    border-color: rgba(245, 158, 11, 0.2);
}

.efficiency-badge.good {
    background: rgba(34, 197, 94, 0.1);
    color: var(--accent-emerald);
    border-color: rgba(34, 197, 94, 0.2);
}

.efficiency-badge.excellent {
    background: rgba(6, 182, 212, 0.1);
    color: var(--accent-cyan);
    border-color: rgba(6, 182, 212, 0.2);
}

.efficiency-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

/* Result Metrics Grid */
.result-metrics {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 28px;
}

.metric-card {
    padding: 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    text-align: center;
    transition: var(--transition-base);
}

.metric-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--border-subtle);
}

.metric-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 8px;
    border-radius: var(--radius-sm);
}

.cost-icon { color: var(--accent-emerald); background: rgba(34,197,94,0.1); }
.cpm-icon { color: var(--accent-indigo); background: rgba(99,102,241,0.1); }
.range-icon { color: var(--accent-cyan); background: rgba(6,182,212,0.1); }
.co2-icon { color: var(--accent-amber); background: rgba(245,158,11,0.1); }

.metric-label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-tertiary);
    margin-bottom: 4px;
}

.metric-value {
    display: block;
    font-family: 'Outfit', sans-serif;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
}

/* Efficiency Chart */
.result-chart-wrapper {
    margin-bottom: 24px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
}

.chart-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

#efficiencyChart {
    width: 100%;
    max-height: 180px;
}

.btn-reset {
    width: 100%;
    justify-content: center;
    padding: 12px;
}

/* ============================================
   HOW IT WORKS — INTERACTIVE FLOW DIAGRAM
   ============================================ */
.how-section {
    padding: var(--section-padding);
    position: relative;
    overflow: hidden;
}

.how-section::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(139,92,246,0.06) 0%, transparent 60%);
    pointer-events: none;
}

.flow-diagram {
    position: relative;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-bottom: 48px;
}

.flow-lines {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.flow-path {
    animation: dashFlow 2s linear infinite;
}

@keyframes dashFlow {
    to { stroke-dashoffset: -24; }
}

.flow-step {
    position: relative;
    z-index: 2;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.flow-step.visible {
    opacity: 1;
    transform: translateY(0);
}

.flow-step-number {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-primary);
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 700;
    color: white;
    z-index: 3;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.flow-step-card {
    padding: 28px 20px 24px;
    text-align: center;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: var(--transition-base);
}

.flow-step-card:hover {
    border-color: var(--border-glow);
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(99, 102, 241, 0.15);
}

.flow-step.active .flow-step-card {
    border-color: var(--accent-indigo);
    box-shadow: 0 0 30px rgba(99, 102, 241, 0.2);
}

.flow-step-icon {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-lg);
    margin-bottom: 16px;
    transition: var(--transition-base);
}

.input-icon { background: rgba(99, 102, 241, 0.12); color: var(--accent-indigo); }
.process-icon { background: rgba(139, 92, 246, 0.12); color: var(--accent-violet); }
.analyze-icon { background: rgba(6, 182, 212, 0.12); color: var(--accent-cyan); }
.results-step-icon { background: rgba(34, 197, 94, 0.12); color: var(--accent-emerald); }

.flow-step-card h4 {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.flow-step-card p {
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 16px;
}

/* Step Visuals */
.flow-step-visual {
    width: 100%;
    margin-top: auto;
}

/* Mini Input Demo */
.mini-input-demo {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.mini-input {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    transition: var(--transition-base);
}

.mini-input.active {
    border-color: var(--accent-indigo);
    background: rgba(99, 102, 241, 0.06);
}

.mini-label {
    color: var(--text-tertiary);
}

.mini-val {
    font-weight: 600;
    color: var(--text-primary);
    font-family: 'Outfit', sans-serif;
}

/* Processing Animation */
.processing-anim {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.process-formula {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 0.78rem;
    font-weight: 600;
}

.formula-part {
    padding: 4px 10px;
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: var(--radius-sm);
    color: var(--accent-violet);
}

.formula-eq, .formula-div {
    color: var(--text-tertiary);
    font-size: 1rem;
}

.process-bars {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.pbar {
    height: 4px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 2px;
    overflow: hidden;
    position: relative;
}

.pbar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, var(--accent-violet), var(--accent-cyan));
    border-radius: 2px;
    animation: pbarFill 2s var(--delay) ease-in-out infinite;
}

@keyframes pbarFill {
    0% { width: 0; }
    50% { width: var(--width); }
    100% { width: 0; }
}

/* Analysis Demo */
.analysis-demo {
    width: 100%;
}

.analysis-bar-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.abar {
    display: grid;
    grid-template-columns: 55px 1fr 28px;
    align-items: center;
    gap: 8px;
    font-size: 0.72rem;
}

.abar-label {
    color: var(--text-tertiary);
    text-align: left;
}

.abar-track {
    height: 6px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 3px;
    overflow: hidden;
}

.abar-fill {
    height: 100%;
    border-radius: 3px;
    width: 0;
    transition: width 1.5s ease;
}

.flow-step.visible .abar-fill {
    width: var(--width);
}

.your-fill { background: linear-gradient(90deg, var(--accent-indigo), var(--accent-cyan)); }
.avg-fill { background: rgba(255, 255, 255, 0.2); }
.best-fill { background: linear-gradient(90deg, var(--accent-emerald), var(--accent-cyan)); }

.abar-val {
    font-weight: 700;
    color: var(--text-primary);
    text-align: right;
    font-family: 'Outfit', sans-serif;
}

/* Result Demo */
.result-demo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.result-mini-gauge svg {
    width: 80px;
    height: 50px;
}

.result-mini-arc {
    animation: miniArcFill 2s 0.5s ease forwards;
}

@keyframes miniArcFill {
    to { stroke-dashoffset: 30; }
}

.result-mini-stats {
    display: flex;
    gap: 12px;
    font-size: 0.72rem;
    color: var(--text-secondary);
}

.rms {
    padding: 4px 8px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--radius-sm);
}

/* Flow Controls */
.flow-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.flow-play-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.25);
    border-radius: var(--radius-full);
    color: var(--accent-indigo);
    font-size: 0.88rem;
    font-weight: 600;
    transition: var(--transition-base);
}

.flow-play-btn:hover {
    background: rgba(99, 102, 241, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.2);
}

.flow-play-btn.playing {
    background: rgba(244, 63, 94, 0.1);
    border-color: rgba(244, 63, 94, 0.25);
    color: var(--accent-rose);
}

.flow-progress {
    width: 120px;
    height: 4px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 2px;
    overflow: hidden;
}

.flow-progress-fill {
    width: 25%;
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 2px;
    transition: width 0.5s ease;
}

.flow-step-indicators {
    display: flex;
    gap: 6px;
}

.flow-indicator {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-tertiary);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--glass-border);
    transition: var(--transition-base);
}

.flow-indicator.active {
    color: white;
    background: var(--accent-indigo);
    border-color: var(--accent-indigo);
    box-shadow: 0 2px 10px rgba(99, 102, 241, 0.4);
}

.flow-indicator:hover:not(.active) {
    background: rgba(99, 102, 241, 0.1);
    border-color: var(--accent-indigo);
    color: var(--accent-indigo);
}

/* ============================================
   FEATURES SECTION
   ============================================ */
.features-section {
    padding: var(--section-padding);
    position: relative;
}

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

.feature-card {
    padding: 32px 28px;
    transition: var(--transition-base);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gradient-primary);
    opacity: 0;
    transition: var(--transition-base);
}

.feature-card:hover {
    transform: translateY(-6px);
    border-color: var(--border-subtle);
    box-shadow: 0 16px 48px rgba(99, 102, 241, 0.12);
}

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

.feature-icon-wrap {
    position: relative;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    color: var(--accent-indigo);
}

.feature-glow {
    position: absolute;
    inset: -10px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.15), transparent);
    border-radius: 50%;
    opacity: 0;
    transition: var(--transition-base);
}

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

.feature-card[data-feature="2"] .feature-icon-wrap { color: var(--accent-violet); }
.feature-card[data-feature="2"] .feature-glow { background: radial-gradient(circle, rgba(139,92,246,0.15), transparent); }
.feature-card[data-feature="3"] .feature-icon-wrap { color: var(--accent-cyan); }
.feature-card[data-feature="3"] .feature-glow { background: radial-gradient(circle, rgba(6,182,212,0.15), transparent); }
.feature-card[data-feature="4"] .feature-icon-wrap { color: var(--accent-emerald); }
.feature-card[data-feature="4"] .feature-glow { background: radial-gradient(circle, rgba(34,197,94,0.15), transparent); }
.feature-card[data-feature="5"] .feature-icon-wrap { color: var(--accent-amber); }
.feature-card[data-feature="5"] .feature-glow { background: radial-gradient(circle, rgba(245,158,11,0.15), transparent); }
.feature-card[data-feature="6"] .feature-icon-wrap { color: var(--accent-rose); }
.feature-card[data-feature="6"] .feature-glow { background: radial-gradient(circle, rgba(244,63,94,0.15), transparent); }

.feature-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.feature-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ============================================
   TIPS SECTION
   ============================================ */
.tips-section {
    padding: var(--section-padding);
    background: var(--bg-secondary);
    position: relative;
}

.tips-section::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 400px;
    background: radial-gradient(circle, rgba(6,182,212,0.06) 0%, transparent 70%);
    pointer-events: none;
}

.tips-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.tip-card {
    padding: 32px 28px;
    transition: var(--transition-base);
    position: relative;
}

.tip-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-subtle);
}

.tip-number {
    font-family: 'Outfit', sans-serif;
    font-size: 2.5rem;
    font-weight: 900;
    background: linear-gradient(180deg, rgba(99,102,241,0.2), rgba(99,102,241,0.02));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 12px;
    line-height: 1;
}

.tip-card h3 {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.tip-card p {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 18px;
}

.tip-impact {
    display: flex;
    align-items: center;
    gap: 10px;
}

.tip-impact-label {
    font-size: 0.72rem;
    color: var(--text-tertiary);
    white-space: nowrap;
}

.tip-impact-bar {
    flex: 1;
    height: 4px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 2px;
    overflow: hidden;
}

.tip-impact-fill {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, var(--accent-indigo), var(--accent-cyan));
    border-radius: 2px;
    transition: width 1.2s ease;
}

.tip-card.visible .tip-impact-fill {
    width: var(--width);
}

.tip-impact-val {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--accent-cyan);
    font-family: 'Outfit', sans-serif;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    padding: 60px 0 30px;
    border-top: 1px solid var(--glass-border);
}

.footer-container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: var(--container-padding);
}

.footer-top {
    display: flex;
    justify-content: space-between;
    gap: 48px;
    margin-bottom: 40px;
}

.footer-brand {
    max-width: 320px;
}

.footer-desc {
    font-size: 0.88rem;
    color: var(--text-tertiary);
    margin-top: 16px;
    line-height: 1.6;
}

.footer-links-group {
    display: flex;
    gap: 56px;
}

.footer-col h4 {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-secondary);
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.footer-col ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-col a {
    font-size: 0.88rem;
    color: var(--text-tertiary);
    transition: var(--transition-fast);
}

.footer-col a:hover {
    color: var(--accent-indigo);
}

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 24px;
    border-top: 1px solid var(--glass-border);
}

.footer-bottom p {
    font-size: 0.82rem;
    color: var(--text-tertiary);
}

.footer-social {
    display: flex;
    gap: 12px;
}

.social-link {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    color: var(--text-tertiary);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    transition: var(--transition-base);
}

.social-link:hover {
    color: var(--accent-indigo);
    border-color: var(--accent-indigo);
    background: rgba(99, 102, 241, 0.1);
}

/* ============================================
   SCROLL ANIMATIONS
   ============================================ */
.feature-card,
.tip-card {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.feature-card.visible,
.tip-card.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
    .calculator-layout {
        grid-template-columns: 1fr;
    }

    .flow-diagram {
        grid-template-columns: repeat(2, 1fr);
    }

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

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

@media (max-width: 768px) {
    :root {
        --section-padding: 80px 0;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        background: rgba(7, 8, 13, 0.95);
        backdrop-filter: blur(20px);
        padding: 20px;
        border-bottom: 1px solid var(--glass-border);
    }

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

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

    .hero {
        padding: 100px 20px 60px;
    }

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

    .hero-actions {
        flex-direction: column;
    }

    .hero-stats {
        flex-direction: column;
        gap: 16px;
    }

    .hero-stat-divider {
        width: 40px;
        height: 1px;
    }

    .hero-visual {
        display: none;
    }

    .flow-diagram {
        grid-template-columns: 1fr;
    }

    .flow-lines {
        display: none;
    }

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

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

    .footer-top {
        flex-direction: column;
        gap: 32px;
    }

    .footer-links-group {
        gap: 32px;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }

    .calc-card, .results-card {
        padding: 24px;
    }

    .section-header {
        margin-bottom: 48px;
    }
}

@media (max-width: 480px) {
    .result-metrics {
        grid-template-columns: 1fr;
    }

    .flow-controls {
        flex-direction: column;
        gap: 14px;
    }
}

/* ============================================
   ARTICLE HOMEPAGE
   ============================================ */
.article-page {
    padding-top: 96px;
}

.article-hero {
    padding: 72px 0 24px;
    background:
        radial-gradient(circle at top left, rgba(99, 102, 241, 0.14), transparent 35%),
        radial-gradient(circle at top right, rgba(6, 182, 212, 0.1), transparent 30%);
}

.article-title {
    font-size: clamp(2.6rem, 6vw, 4.8rem);
    font-weight: 800;
    letter-spacing: -0.04em;
    margin: 12px 0 16px;
}

.article-lead {
    max-width: 760px;
    font-size: 1.1rem;
    color: var(--text-secondary);
}

.content-section {
    padding: 56px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.content-section h2 {
    font-size: clamp(1.7rem, 3vw, 2.4rem);
    margin-bottom: 18px;
}

.content-section h3 {
    font-size: 1.2rem;
    margin: 28px 0 10px;
    color: var(--text-primary);
}

.content-section p {
    max-width: 860px;
    color: var(--text-secondary);
    font-size: 1.03rem;
}

.content-section p + p {
    margin-top: 14px;
}

.faq-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-top: 28px;
}

.homepage-tool-directory {
    background: linear-gradient(180deg, rgba(34, 211, 238, 0.025), transparent);
}

.site-search {
    max-width: 680px;
    margin-top: 24px;
}

.site-search label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-secondary);
    font-size: .82rem;
    font-weight: 700;
}

.site-search-controls {
    display: flex;
    gap: 10px;
}

.site-search input {
    min-width: 0;
    flex: 1;
    padding: 12px 14px;
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    background: rgba(255,255,255,.05);
    color: var(--text-primary);
}

.site-search button {
    padding: 12px 18px;
    border: 0;
    border-radius: 10px;
    background: #fbbf24;
    color: #101827;
    font-weight: 800;
    cursor: pointer;
}

@media (max-width: 520px) {
    .site-search-controls { flex-direction: column; }
}

.homepage-tool-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 28px;
}

.homepage-tool-card {
    display: grid;
    gap: 7px;
    min-height: 112px;
    padding: 17px;
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    background: rgba(255,255,255,.035);
    transition: border-color 180ms ease, transform 180ms ease, background 180ms ease;
}

.homepage-tool-card:hover {
    border-color: rgba(245, 158, 11, 0.55);
    background: rgba(245, 158, 11, 0.08);
    transform: translateY(-3px);
}

.homepage-tool-card span {
    color: #fbbf24;
    font-size: .65rem;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.homepage-tool-card strong {
    color: var(--text-primary);
    font: 700 1rem "Outfit", sans-serif;
}

.homepage-tool-card small,
.tool-directory-loading {
    color: var(--text-tertiary);
    line-height: 1.4;
}

.faq-card {
    padding: 24px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    box-shadow: var(--glass-shadow);
}

.faq-card h3 {
    margin-top: 0;
    margin-bottom: 10px;
}

.footer {
    padding: 28px 0 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.footer-container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: var(--container-padding);
    display: flex;
    flex-direction: column;
    gap: 10px;
    color: var(--text-tertiary);
}

.footer-desc,
.footer-copy {
    font-size: 0.92rem;
}

.footer-language-picker {
    display: flex;
    align-items: center;
    gap: 12px;
    width: fit-content;
    margin: 4px 0;
}

.footer-language-picker > span {
    color: var(--text-secondary);
    font-size: .78rem;
    font-weight: 700;
}

.footer-legal-links {
    display: flex;
    flex-wrap: wrap;
    gap: 14px 20px;
    margin: 4px 0;
}

.footer-legal-links a {
    color: var(--text-secondary);
    font-size: .82rem;
}

.footer-legal-links a:hover,
.simple-footer a:hover {
    color: #fbbf24;
}

.footer-legal-links .dmca-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 4px 9px;
    border: 1px solid rgba(34, 211, 238, .38);
    border-radius: 5px;
    background: rgba(34, 211, 238, .08);
    color: var(--text-primary);
    line-height: 1;
}

.dmca-badge strong {
    color: #22d3ee;
    font-size: .78rem;
    letter-spacing: .05em;
}

.dmca-badge span {
    font-size: .68rem;
}

.scroll-to-top {
    position: fixed;
    right: clamp(18px, 3vw, 36px);
    bottom: clamp(18px, 3vw, 36px);
    z-index: 90;
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(34, 211, 238, .45);
    border-radius: 50%;
    background: rgba(16, 24, 39, .94);
    color: #22d3ee;
    box-shadow: 0 12px 32px rgba(0, 0, 0, .35);
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: opacity .2s ease, transform .2s ease, visibility .2s;
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-to-top:hover {
    color: #fbbf24;
    border-color: rgba(251, 191, 36, .6);
}

.scroll-to-top:focus-visible {
    outline: 3px solid rgba(34, 211, 238, .45);
    outline-offset: 3px;
}

.scroll-to-top svg {
    width: 24px;
    height: 24px;
}

@media (prefers-reduced-motion: reduce) {
    .scroll-to-top {
        transition: none;
    }
}

.footer-contact {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
    margin: 6px 0;
    color: var(--text-secondary);
    font-size: .85rem;
    font-style: normal;
}

.footer-contact a,
.contact-card a {
    color: #fbbf24;
}

.footer-facebook {
    width: fit-content;
    color: #60a5fa;
    font-size: .85rem;
    font-weight: 700;
}

.footer-facebook:hover {
    color: #93c5fd;
}

.contact-card address {
    margin: 8px 0 16px;
    color: var(--text-secondary);
    font-style: normal;
    line-height: 1.7;
}

html[dir="rtl"] .footer-language-picker {
    flex-direction: row-reverse;
    margin-right: 0;
    margin-left: auto;
}

.simple-page {
    width: min(900px, calc(100% - 48px));
    margin: 0 auto;
    padding: 150px 0 80px;
}

.simple-page-hero {
    padding-bottom: 42px;
    border-bottom: 1px solid rgba(255,255,255,.08);
}

.simple-page-hero h1 {
    margin: 14px 0;
    color: var(--text-primary);
    font: 800 clamp(2.6rem, 6vw, 5rem) "Outfit", sans-serif;
    letter-spacing: -.05em;
}

.simple-page-hero p,
.simple-page-hero small,
.simple-page-section p {
    color: var(--text-secondary);
    line-height: 1.8;
}

.simple-page-section {
    padding: 38px 0;
    border-bottom: 1px solid rgba(255,255,255,.07);
}

.simple-page-section h2 {
    margin: 0 0 12px;
    color: var(--text-primary);
    font: 700 1.75rem "Outfit", sans-serif;
}

.simple-page-section p {
    max-width: 780px;
}

.simple-page-section address {
    color: var(--text-secondary);
    font-style: normal;
    line-height: 1.8;
}

.html-sitemap-list {
    display: grid;
    gap: 12px;
    margin: 0;
    padding-left: 22px;
}

.html-sitemap-list a {
    color: #fbbf24;
}

.simple-page-section a {
    color: #fbbf24;
}

.about-workspace {
    margin: 42px 0 8px;
}

.about-workspace img {
    display: block;
    width: 100%;
    height: auto;
    border: 1px solid rgba(34, 211, 238, .2);
    border-radius: 22px;
}

.about-workspace figcaption {
    margin-top: 10px;
    color: var(--text-tertiary);
    font-size: .8rem;
    line-height: 1.6;
}

.contact-card {
    padding: 28px;
    margin-top: 34px;
    border: 1px solid rgba(245,158,11,.24);
    border-radius: 20px;
    background: rgba(245,158,11,.06);
}

.contact-email {
    display: inline-block;
    margin: 8px 0 12px;
    color: #fbbf24;
    font: 700 1.1rem "Outfit", sans-serif;
}

.simple-footer {
    width: min(900px, calc(100% - 48px));
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin: 0 auto;
    padding: 28px 0 48px;
    color: var(--text-tertiary);
    font-size: .85rem;
}

.simple-footer a {
    color: var(--text-secondary);
    font-weight: 700;
}

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

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

/* ============================================
   ARTICLE INTERACTIVES
   ============================================ */
.main-mileage-diagram,
.topic-interactive {
    --interactive-accent: #f59e0b;
    --interactive-cyan: #22d3ee;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background:
        linear-gradient(135deg, rgba(245, 158, 11, 0.08), transparent 45%),
        rgba(11, 18, 32, 0.72);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.24);
    backdrop-filter: blur(18px);
}

.main-mileage-diagram {
    max-width: 1080px;
    margin-top: 34px;
    padding: 10px;
    border-radius: 28px;
    display: grid;
    grid-template-columns: minmax(245px, 0.7fr) minmax(0, 1.65fr);
    gap: 10px;
    overflow: hidden;
}

.diagram-controls {
    padding: 22px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.025);
}

.diagram-control-heading,
.dashboard-status {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.diagram-control-heading {
    margin-bottom: 20px;
    color: var(--text-primary);
    font: 700 1rem "Outfit", sans-serif;
}

.diagram-control-heading small {
    color: var(--interactive-cyan);
    font: 700 0.66rem "Inter", sans-serif;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.calculator-unit-tabs,
.converter-category-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.calculator-unit-tabs {
    margin-bottom: 18px;
}

.calculator-unit-tabs button,
.converter-category-tabs button {
    padding: 9px 12px;
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 9px;
    background: rgba(255,255,255,.035);
    color: var(--text-secondary);
    font: 700 .76rem "Inter", sans-serif;
    cursor: pointer;
    transition: border-color 180ms ease, background 180ms ease, color 180ms ease;
}

.calculator-unit-tabs button:hover,
.calculator-unit-tabs button.active,
.converter-category-tabs button:hover,
.converter-category-tabs button.active {
    border-color: rgba(245,158,11,.55);
    background: rgba(245,158,11,.12);
    color: #fbbf24;
}

.unit-converter {
    margin-bottom: 18px;
    padding: 15px;
    border: 1px solid rgba(34,211,238,.2);
    border-radius: 15px;
    background: rgba(34,211,238,.055);
}

.unit-converter[hidden] {
    display: none;
}

.unit-converter > p {
    margin: 0 0 12px;
    color: var(--text-secondary);
    font-size: .78rem;
    line-height: 1.5;
}

.converter-category-tabs {
    margin-bottom: 14px;
}

.converter-category-tabs button {
    padding: 7px 9px;
    border-radius: 7px;
    font-size: .68rem;
}

.converter-fields {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    gap: 10px;
    align-items: center;
}

.converter-fields label {
    min-width: 0;
}

.converter-fields input,
.converter-fields output {
    display: flex;
    align-items: center;
    width: 100%;
    height: 38px;
    margin-bottom: 6px;
    padding: 0 10px;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 8px;
    background: rgba(0,0,0,.16);
    color: var(--text-primary);
    font: 700 .86rem "Outfit", sans-serif;
}

.converter-fields select {
    width: 100%;
    min-height: 118px;
    padding: 5px;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 8px;
    background: #101827;
    color: var(--text-secondary);
    font: 500 .76rem "Inter", sans-serif;
    outline: none;
}

.converter-fields option {
    padding: 4px;
}

.converter-fields option:checked {
    background: #f59e0b linear-gradient(0deg, #f59e0b 0%, #f59e0b 100%);
    color: #101827;
}

.converter-direction {
    color: var(--interactive-cyan);
    font-size: 1.15rem;
}

.calculator-actions {
    display: flex;
    gap: 9px;
    margin-top: 18px;
}

.calculator-actions button {
    min-height: 42px;
    padding: 0 15px;
    border-radius: 10px;
    font: 800 .82rem "Inter", sans-serif;
    cursor: pointer;
}

.calculate-action {
    border: 1px solid #f59e0b;
    background: linear-gradient(135deg, #f59e0b, #fbbf24);
    color: #101827;
}

.calculate-action span {
    display: inline-grid;
    width: 22px;
    height: 22px;
    place-items: center;
    margin-left: 7px;
    border-radius: 50%;
    background: rgba(16,24,39,.15);
}

.clear-action {
    border: 1px solid rgba(255,255,255,.13);
    background: rgba(255,255,255,.07);
    color: var(--text-secondary);
}

.result-flash {
    animation: resultFlash 550ms ease;
}

@keyframes resultFlash {
    50% { box-shadow: inset 0 0 0 1px rgba(34,211,238,.5), 0 0 30px rgba(34,211,238,.08); }
}

.diagram-controls label,
.mini-calc label,
.cost-tool label {
    display: grid;
    gap: 8px;
    color: var(--text-tertiary);
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.diagram-controls label + label {
    margin-top: 14px;
}

.diagram-input {
    position: relative;
    display: block;
}

.diagram-controls input,
.mini-calc input,
.cost-tool input {
    width: 100%;
    height: 48px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.045);
    color: var(--text-primary);
    font: 700 1.05rem "Outfit", sans-serif;
    padding: 0 58px 0 14px;
    outline: none;
    transition: border-color 180ms ease, box-shadow 180ms ease;
}

.diagram-controls input:focus,
.mini-calc input:focus,
.cost-tool input:focus {
    border-color: var(--interactive-accent);
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.13);
}

.diagram-input em {
    position: absolute;
    right: 14px;
    top: 15px;
    color: var(--text-tertiary);
    font: 600 0.75rem "Inter", sans-serif;
    text-transform: none;
}

.diagram-formula {
    display: grid;
    gap: 4px;
    margin-top: 20px;
    padding: 14px;
    border-radius: 13px;
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.diagram-formula span {
    color: var(--text-tertiary);
    font-size: 0.7rem;
}

.diagram-formula strong {
    color: #fbbf24;
    font: 800 1.45rem "Outfit", sans-serif;
}

.diagram-dashboard {
    min-width: 0;
    padding: 18px 20px 20px;
    border-radius: 20px;
    background:
        radial-gradient(circle at 20% 20%, rgba(34, 211, 238, 0.09), transparent 30%),
        rgba(5, 11, 22, 0.55);
}

.dashboard-status {
    justify-content: flex-start;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    color: var(--text-tertiary);
    font-size: 0.72rem;
}

.dashboard-status strong {
    margin-left: auto;
    padding: 6px 9px;
    border-radius: 999px;
    background: rgba(34, 211, 238, 0.1);
    color: var(--interactive-cyan);
    font-size: 0.68rem;
    transition: color 250ms ease, background 250ms ease;
}

.status-pulse {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--interactive-cyan);
    box-shadow: 0 0 0 0 rgba(34, 211, 238, 0.45);
    animation: statusPulse 2s infinite;
}

@keyframes statusPulse {
    70% { box-shadow: 0 0 0 8px rgba(34, 211, 238, 0); }
    100% { box-shadow: 0 0 0 0 rgba(34, 211, 238, 0); }
}

.dashboard-primary {
    display: grid;
    grid-template-columns: minmax(210px, 0.8fr) minmax(250px, 1.2fr);
    gap: 22px;
    align-items: center;
    padding: 18px 0;
}

.mileage-gauge {
    position: relative;
    max-width: 270px;
    margin: 0 auto;
}

.mileage-gauge svg {
    display: block;
    width: 100%;
    overflow: visible;
}

.gauge-track,
.gauge-progress {
    fill: none;
    stroke-width: 15;
    stroke-linecap: round;
}

.gauge-track {
    stroke: rgba(255, 255, 255, 0.07);
}

.gauge-progress {
    stroke: #22d3ee;
    stroke-dasharray: 283;
    stroke-dashoffset: 142;
    filter: drop-shadow(0 0 6px rgba(34, 211, 238, 0.38));
    transition: stroke-dashoffset 500ms cubic-bezier(.2,.8,.2,1), stroke 250ms ease;
}

.gauge-needle {
    transform-origin: 120px 125px;
    transform: rotate(0deg);
    transition: transform 500ms cubic-bezier(.2,.8,.2,1);
}

.gauge-needle line {
    stroke: #f8fafc;
    stroke-width: 3;
    stroke-linecap: round;
}

.gauge-needle circle {
    fill: #f8fafc;
    filter: drop-shadow(0 0 5px rgba(255,255,255,.45));
}

.gauge-reading {
    position: absolute;
    left: 50%;
    bottom: 14%;
    display: grid;
    justify-items: center;
    transform: translateX(-50%);
}

.gauge-reading strong {
    color: var(--text-primary);
    font: 800 clamp(1.8rem, 4vw, 2.7rem) "Outfit", sans-serif;
    line-height: 1;
}

.gauge-reading span {
    margin-top: 4px;
    color: var(--text-tertiary);
    font-size: 0.66rem;
    font-weight: 800;
    letter-spacing: 0.16em;
}

.gauge-scale {
    position: absolute;
    right: 6%;
    bottom: 0;
    left: 6%;
    display: flex;
    justify-content: space-between;
    color: var(--text-tertiary);
    font-size: 0.62rem;
}

.trip-diagram {
    display: grid;
    gap: 11px;
}

.trip-labels {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    color: var(--text-tertiary);
    font-size: 0.65rem;
}

.trip-labels strong {
    color: var(--text-primary);
    font-size: 0.72rem;
}

.trip-road {
    position: relative;
    height: 54px;
    border-bottom: 2px dashed rgba(255, 255, 255, 0.14);
}

.trip-road > i {
    position: absolute;
    bottom: -2px;
    left: 0;
    display: block;
    width: 60%;
    height: 2px;
    background: linear-gradient(90deg, #f59e0b, #22d3ee);
    box-shadow: 0 0 8px rgba(34, 211, 238, 0.35);
    transition: width 500ms cubic-bezier(.2,.8,.2,1);
}

.trip-car {
    position: absolute;
    left: 60%;
    bottom: 5px;
    width: 48px;
    color: var(--interactive-cyan);
    transform: translateX(-50%);
    transition: left 500ms cubic-bezier(.2,.8,.2,1);
    filter: drop-shadow(0 5px 8px rgba(34,211,238,.2));
}

.trip-car svg {
    display: block;
    width: 100%;
    fill: currentColor;
}

.trip-car circle {
    fill: #09101d;
    stroke: currentColor;
    stroke-width: 2;
}

.fuel-tank {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 10px;
    align-items: center;
    color: var(--text-tertiary);
    font-size: 0.66rem;
}

.fuel-tank > div {
    height: 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.07);
    overflow: hidden;
}

.fuel-tank i {
    display: block;
    width: 60%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #f59e0b, #fbbf24);
    transition: width 500ms cubic-bezier(.2,.8,.2,1);
}

.fuel-tank strong {
    color: #fbbf24;
    font-size: 0.68rem;
}

.dashboard-metrics {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.dashboard-metrics > div {
    display: grid;
    gap: 5px;
    min-width: 0;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.025);
}

.dashboard-metrics span {
    color: var(--text-tertiary);
    font-size: 0.61rem;
}

.dashboard-metrics strong {
    color: var(--text-primary);
    font: 700 0.84rem "Outfit", sans-serif;
    white-space: nowrap;
}

.main-mileage-diagram[data-rating="excellent"] .gauge-progress {
    stroke: #34d399;
}

.main-mileage-diagram[data-rating="excellent"] .dashboard-status strong {
    color: #6ee7b7;
    background: rgba(52, 211, 153, 0.11);
}

.main-mileage-diagram[data-rating="average"] .gauge-progress {
    stroke: #f59e0b;
}

.main-mileage-diagram[data-rating="average"] .dashboard-status strong {
    color: #fbbf24;
    background: rgba(245, 158, 11, 0.11);
}

.main-mileage-diagram[data-rating="high"] .gauge-progress {
    stroke: #fb7185;
}

.main-mileage-diagram[data-rating="high"] .dashboard-status strong {
    color: #fda4af;
    background: rgba(251, 113, 133, 0.11);
}

.topic-interactive {
    position: relative;
    max-width: 980px;
    margin-top: 34px;
    padding: 24px;
    border-radius: 24px;
    overflow: hidden;
}

.topic-interactive::after {
    content: "";
    position: absolute;
    width: 180px;
    height: 180px;
    right: -90px;
    bottom: -110px;
    border-radius: 50%;
    background: rgba(34, 211, 238, 0.07);
    filter: blur(4px);
    pointer-events: none;
}

.interactive-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 22px;
}

.interactive-heading > span {
    color: var(--text-primary);
    font: 700 1rem "Outfit", sans-serif;
}

.interactive-heading small {
    padding: 6px 9px;
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 999px;
    color: #fbbf24;
    font-size: 0.66rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.flow-visual {
    display: grid;
    grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr;
    align-items: center;
    gap: 10px;
}

.flow-node {
    min-height: 122px;
    display: grid;
    align-content: center;
    gap: 4px;
    padding: 17px;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.035);
    color: var(--text-secondary);
    text-align: left;
    cursor: pointer;
    transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.flow-node:hover {
    transform: translateY(-3px);
    border-color: rgba(245, 158, 11, 0.45);
}

.flow-node.active {
    border-color: rgba(245, 158, 11, 0.55);
    background: rgba(245, 158, 11, 0.11);
}

.flow-node b {
    color: var(--interactive-accent);
    font-size: 0.68rem;
    letter-spacing: 0.12em;
}

.flow-node span {
    color: var(--text-primary);
    font: 700 1rem "Outfit", sans-serif;
}

.flow-node small {
    line-height: 1.35;
}

.flow-visual > i {
    color: var(--interactive-cyan);
    font-style: normal;
}

.mini-calc,
.cost-tool {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    align-items: end;
}

.mini-calc label > span,
.cost-tool label > span {
    position: relative;
    display: block;
}

.mini-calc em,
.cost-tool em {
    position: absolute;
    right: 14px;
    top: 15px;
    color: var(--text-tertiary);
    font-style: normal;
    text-transform: none;
}

.calc-result,
.cost-output {
    min-height: 75px;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    padding: 14px 18px;
    border-radius: 15px;
    background: linear-gradient(135deg, #f59e0b, #fbbf24);
    color: #121827;
}

.calc-result small,
.cost-output > span {
    grid-column: 1 / -1;
    font-size: 0.69rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.calc-result strong,
.cost-output strong {
    font: 800 1.8rem "Outfit", sans-serif;
}

.calc-result > span {
    font-weight: 800;
}

.choice-layout,
.accuracy-tool,
.impact-tool {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(210px, 0.5fr);
    gap: 24px;
    align-items: center;
}

.choice-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.choice-list button,
.segmented button {
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.045);
    color: var(--text-secondary);
    padding: 10px 14px;
    font: 650 0.83rem "Inter", sans-serif;
    cursor: pointer;
    transition: 180ms ease;
}

.choice-list button:hover,
.choice-list button.active,
.segmented button.active {
    border-color: var(--interactive-accent);
    background: rgba(245, 158, 11, 0.13);
    color: #fbbf24;
}

.choice-list button span {
    margin-right: 7px;
}

.choice-list button small {
    margin-left: 8px;
    color: #fb7185;
}

.dial {
    --score: 24;
    width: 160px;
    aspect-ratio: 1;
    margin: auto;
    display: grid;
    place-content: center;
    text-align: center;
    border-radius: 50%;
    background:
        radial-gradient(circle at center, #111827 58%, transparent 59%),
        conic-gradient(var(--interactive-accent) calc(var(--score) * 1%), rgba(255,255,255,.07) 0);
}

.dial span,
.dial small {
    color: var(--text-tertiary);
    font-size: 0.68rem;
}

.dial strong {
    color: var(--text-primary);
    font: 800 2.1rem "Outfit", sans-serif;
}

.converter {
    display: grid;
    grid-template-columns: 1fr 1.25fr;
    gap: 28px;
    align-items: center;
}

.converter label {
    display: grid;
    gap: 12px;
    color: var(--text-secondary);
}

.converter input {
    accent-color: var(--interactive-accent);
}

.converter label strong {
    color: #fbbf24;
    font: 700 1.35rem "Outfit", sans-serif;
}

.conversion-results,
.range-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.conversion-results > span,
.range-cards article {
    padding: 18px;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 15px;
    background: rgba(255,255,255,.035);
}

.conversion-results small,
.conversion-results b {
    display: block;
}

.conversion-results small {
    margin-bottom: 7px;
    color: var(--text-tertiary);
}

.conversion-results b {
    color: var(--text-primary);
    font-family: "Outfit", sans-serif;
}

.confidence,
.impact-meter {
    display: grid;
    gap: 8px;
}

.confidence span,
.impact-meter span {
    color: var(--text-tertiary);
    font-size: 0.78rem;
}

.confidence strong,
.impact-meter strong {
    color: var(--text-primary);
    font: 800 2.2rem "Outfit", sans-serif;
}

.confidence > div,
.impact-meter > div,
.range-cards article > div {
    height: 8px;
    border-radius: 999px;
    background: rgba(255,255,255,.08);
    overflow: hidden;
}

.confidence i,
.impact-meter i,
.range-cards article i {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--interactive-accent), var(--interactive-cyan));
    transition: width 300ms ease;
}

.confidence small {
    color: #fbbf24;
}

.jump-map {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.jump-map a {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 10px;
    padding: 16px;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 14px;
    background: rgba(255,255,255,.035);
    color: var(--text-secondary);
    transition: 180ms ease;
}

.jump-map a:hover {
    border-color: var(--interactive-accent);
    color: var(--text-primary);
    transform: translateY(-2px);
}

.jump-map b {
    color: var(--interactive-accent);
    font-size: 0.7rem;
}

.jump-map i {
    color: var(--interactive-cyan);
    font-style: normal;
}

.factor-map {
    display: grid;
    grid-template-columns: 1fr 170px 1fr;
    gap: 14px;
    align-items: center;
}

.factor-center {
    grid-column: 2;
    grid-row: 1 / span 2;
    width: 150px;
    aspect-ratio: 1;
    display: grid;
    place-content: center;
    border: 1px solid rgba(34, 211, 238, 0.35);
    border-radius: 50%;
    background: radial-gradient(circle, rgba(34,211,238,.16), rgba(34,211,238,.03));
    text-align: center;
    box-shadow: 0 0 35px rgba(34,211,238,.08);
}

.factor-center span,
.factor-center strong {
    display: block;
}

.factor-center span {
    color: var(--text-tertiary);
    font-size: .72rem;
}

.factor-center strong {
    color: var(--text-primary);
    font-family: "Outfit", sans-serif;
}

.factor-map button {
    min-height: 84px;
    padding: 14px;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 14px;
    background: rgba(255,255,255,.035);
    color: var(--text-secondary);
    text-align: left;
    cursor: pointer;
    transition: 180ms ease;
}

.factor-map button:nth-of-type(2),
.factor-map button:nth-of-type(4) {
    grid-column: 3;
}

.factor-map button.active {
    border-color: var(--interactive-accent);
    background: rgba(245,158,11,.1);
    transform: translateX(4px);
}

.factor-map button b,
.factor-map button small {
    display: block;
}

.factor-map button b {
    margin-bottom: 4px;
    color: var(--text-primary);
}

.segmented {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
}

.bar-chart {
    display: grid;
    gap: 16px;
}

.bar-chart > div {
    display: grid;
    grid-template-columns: 70px 1fr 74px;
    gap: 12px;
    align-items: center;
}

.bar-chart span,
.bar-chart strong {
    color: var(--text-secondary);
    font-size: .78rem;
}

.bar-chart i {
    height: 28px;
    padding: 4px;
    border-radius: 8px;
    background: rgba(255,255,255,.05);
}

.bar-chart b {
    display: block;
    height: 100%;
    border-radius: 5px;
    background: linear-gradient(90deg, var(--interactive-accent), var(--interactive-cyan));
    transition: width 350ms ease;
}

.benchmark-road {
    position: relative;
    padding: 48px 0 0;
}

.benchmark-road > i {
    display: block;
    height: 10px;
    border-radius: 999px;
    background: linear-gradient(90deg, #ef4444, #f59e0b 45%, #22d3ee);
}

.benchmark-marker {
    position: absolute;
    top: 0;
    transform: translateX(-50%);
    transition: left 350ms cubic-bezier(.2,.8,.2,1);
}

.benchmark-marker::after {
    content: "";
    display: block;
    width: 2px;
    height: 31px;
    margin: 5px auto 0;
    background: white;
}

.benchmark-marker span {
    display: block;
    padding: 6px 9px;
    border-radius: 8px;
    background: white;
    color: #111827;
    font-size: .72rem;
    font-weight: 800;
    white-space: nowrap;
}

.road-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 9px;
    color: var(--text-tertiary);
    font-size: .7rem;
}

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

.cost-output {
    grid-column: 1 / -1;
}

.cost-output small {
    text-align: right;
    font-weight: 700;
}

.range-cards article {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
}

.range-cards article span,
.range-cards article small {
    color: var(--text-tertiary);
}

.range-cards article strong {
    color: var(--text-primary);
    font: 800 1.6rem "Outfit", sans-serif;
}

.range-cards article > div,
.range-cards article small {
    grid-column: 1 / -1;
}

@media (max-width: 980px) {
    .main-mileage-diagram {
        grid-template-columns: 1fr;
    }

    .diagram-controls {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }

    .diagram-control-heading,
    .diagram-formula,
    .calculator-unit-tabs,
    .unit-converter,
    .calculator-actions {
        grid-column: 1 / -1;
    }

    .diagram-controls label + label {
        margin-top: 0;
    }
}

@media (max-width: 760px) {
    .mini-calc,
    .cost-tool,
    .choice-layout,
    .accuracy-tool,
    .impact-tool,
    .converter {
        grid-template-columns: 1fr;
    }

    .main-mileage-diagram {
        padding: 7px;
        border-radius: 22px;
    }

    .diagram-controls {
        grid-template-columns: 1fr;
        padding: 17px;
    }

    .diagram-control-heading,
    .diagram-formula,
    .calculator-unit-tabs,
    .unit-converter,
    .calculator-actions {
        grid-column: auto;
    }

    .diagram-controls label + label {
        margin-top: 2px;
    }

    .diagram-dashboard {
        padding: 15px;
    }

    .dashboard-primary {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .mileage-gauge {
        width: min(100%, 260px);
    }

    .dashboard-metrics {
        grid-template-columns: 1fr 1fr;
    }

    .dashboard-metrics strong {
        white-space: normal;
    }

    .converter-fields {
        grid-template-columns: 1fr;
    }

    .converter-direction {
        justify-self: center;
        transform: rotate(90deg);
    }

    .topic-interactive {
        padding: 18px;
        border-radius: 19px;
    }

    .flow-visual {
        grid-template-columns: 1fr;
    }

    .flow-visual > i {
        justify-self: center;
        transform: rotate(90deg);
    }

    .flow-node {
        min-height: 94px;
    }

    .jump-map,
    .conversion-results,
    .range-cards,
    .homepage-tool-grid {
        grid-template-columns: 1fr;
    }

    .factor-map {
        grid-template-columns: 1fr 1fr;
    }

    .factor-center {
        grid-column: 1 / -1;
        grid-row: auto;
        margin: 0 auto 8px;
    }

    .factor-map button:nth-of-type(2),
    .factor-map button:nth-of-type(4) {
        grid-column: auto;
    }

    .bar-chart > div {
        grid-template-columns: 54px 1fr;
    }

    .bar-chart strong {
        grid-column: 2;
    }

    .cost-output {
        grid-column: auto;
    }
}
