/* ===== CSS Custom Properties ===== */
:root {
    /* Colors */
    --primary-50: #eef2ff;
    --primary-100: #e0e7ff;
    --primary-200: #c7d2fe;
    --primary-300: #a5b4fc;
    --primary-400: #818cf8;
    --primary-500: #6366f1;
    --primary-600: #4f46e5;
    --primary-700: #4338ca;
    --primary-800: #3730a3;
    --primary-900: #312e81;

    --violet-400: #a78bfa;
    --violet-500: #8b5cf6;
    --violet-600: #7c3aed;

    --surface-50: #f8fafc;
    --surface-100: #f1f5f9;
    --surface-200: #e2e8f0;
    --surface-300: #cbd5e1;
    --surface-400: #94a3b8;
    --surface-500: #64748b;
    --surface-600: #475569;
    --surface-700: #334155;
    --surface-800: #1e293b;
    --surface-900: #0f172a;
    --surface-950: #020617;

    --white: #ffffff;
    --black: #000000;

    /* Semantic */
    --bg: var(--surface-950);
    --bg-elevated: var(--surface-900);
    --bg-card: rgba(30, 41, 59, 0.5);
    --bg-card-hover: rgba(51, 65, 85, 0.5);
    --text-primary: var(--white);
    --text-secondary: var(--surface-300);
    --text-muted: var(--surface-400);
    --border: rgba(148, 163, 184, 0.1);
    --border-hover: rgba(148, 163, 184, 0.2);

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, var(--primary-500), var(--violet-500));
    --gradient-primary-hover: linear-gradient(135deg, var(--primary-600), var(--violet-600));
    --gradient-hero: linear-gradient(180deg, var(--surface-950) 0%, #0c0a1e 50%, var(--surface-950) 100%);
    --gradient-glow: radial-gradient(600px circle at var(--mx, 50%) var(--my, 50%), rgba(99, 102, 241, 0.08), transparent 40%);

    /* Typography */
    --font-display: 'Space Grotesk', sans-serif;
    --font-body: 'Inter', sans-serif;

    /* Sizing */
    --container-max: 1280px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.3);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.3);
    --shadow-lg: 0 10px 40px rgba(0,0,0,0.4);
    --shadow-glow: 0 0 60px rgba(99, 102, 241, 0.15);

    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 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: var(--font-body);
    background: var(--bg);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* RTL support */
html[dir="rtl"] body {
    direction: rtl;
}

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

img {
    max-width: 100%;
    height: auto;
}

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

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

/* ===== Container ===== */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 24px;
}

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

.navbar.scrolled {
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--border);
    padding: 10px 0;
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 700;
    z-index: 1001;
}

.logo:not(:has(.logo-icon))::before {
    content: '';
    width: 32px;
    height: 32px;
    flex: 0 0 auto;
    display: inline-block;
    background: url('logo.svg') center / contain no-repeat;
}

.logo-icon svg {
    display: block;
}

.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;
}

.nav-links a {
    padding: 8px 16px;
    border-radius: var(--radius-full);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: var(--transition-fast);
}

.nav-links a:hover {
    color: var(--text-primary);
    background: rgba(255,255,255,0.06);
}

/* Mobile Toggle */
.mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 8px;
    z-index: 1001;
}

.mobile-toggle span {
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: var(--transition-base);
}

.mobile-toggle.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.mobile-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-toggle.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 768px) {
    .mobile-toggle {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(15, 23, 42, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        justify-content: center;
        gap: 12px;
        opacity: 0;
        pointer-events: none;
        transition: var(--transition-base);
    }

    .nav-links.open {
        opacity: 1;
        pointer-events: all;
    }

    .nav-links a {
        font-size: 1.25rem;
        padding: 12px 24px;
    }
}

/* ===== Hero Section ===== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 120px 0 80px;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background: var(--gradient-hero);
    z-index: 0;
}

.hero-shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.4;
    animation: float 20s ease-in-out infinite;
}

.hero-shape-1 {
    width: 600px;
    height: 600px;
    background: rgba(99, 102, 241, 0.3);
    top: -200px;
    right: -100px;
    animation-delay: 0s;
}

.hero-shape-2 {
    width: 400px;
    height: 400px;
    background: rgba(139, 92, 246, 0.25);
    bottom: -100px;
    left: -50px;
    animation-delay: -7s;
}

.hero-shape-3 {
    width: 300px;
    height: 300px;
    background: rgba(99, 102, 241, 0.2);
    top: 30%;
    left: 50%;
    animation-delay: -14s;
}

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

.hero-particles {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.hero-particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: rgba(165, 180, 252, 0.5);
    border-radius: 50%;
    animation: particle-float linear infinite;
}

@keyframes particle-float {
    0% {
        transform: translateY(100vh) scale(0);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-10vh) scale(1);
        opacity: 0;
    }
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 820px;
    margin: 0 auto;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 20px;
    border-radius: var(--radius-full);
    border: 1px solid rgba(99, 102, 241, 0.3);
    background: rgba(99, 102, 241, 0.08);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--primary-300);
    margin-bottom: 24px;
    letter-spacing: 0.5px;
    animation: fadeInUp 0.6s ease-out;
}

.hero h1 {
    font-family: var(--font-display);
    font-size: clamp(3rem, 8vw, 5.5rem);
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: -0.03em;
    margin-bottom: 24px;
    background: linear-gradient(135deg, var(--white) 0%, var(--surface-300) 50%, var(--primary-300) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: fadeInUp 0.6s ease-out 0.1s both;
}

.hero-subtitle {
    font-size: clamp(1.05rem, 2.2vw, 1.25rem);
    color: var(--text-secondary);
    max-width: 640px;
    margin: 0 auto 40px;
    line-height: 1.7;
    animation: fadeInUp 0.6s ease-out 0.2s both;
}

.hero-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 22px;
    animation: fadeInUp 0.6s ease-out 0.3s both;
}

.hero-author {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    max-width: 520px;
    margin: 0 auto 36px;
    padding: 10px 14px;
    border: 1px solid rgba(16, 185, 129, 0.24);
    border-radius: var(--radius-full);
    background: rgba(6, 78, 59, 0.18);
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 600;
    animation: fadeInUp 0.6s ease-out 0.35s both;
}

.hero-author:hover,
.hero-author:focus-visible {
    color: var(--text-primary);
    border-color: rgba(16, 185, 129, 0.42);
    outline: none;
}

.hero-author strong {
    color: var(--white);
}

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

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 32px;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    transition: var(--transition-base);
    cursor: pointer;
    border: none;
    position: relative;
    overflow: hidden;
}

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

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

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

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

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-hover);
    backdrop-filter: blur(8px);
}

.btn-outline:hover {
    background: rgba(255,255,255,0.06);
    border-color: var(--surface-400);
    transform: translateY(-2px);
}

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

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.stat-number {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

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

/* Scroll Indicator */
.hero-scroll-indicator {
    position: absolute;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1;
    animation: fadeInUp 0.6s ease-out 0.5s both;
}

.scroll-mouse {
    width: 24px;
    height: 40px;
    border: 2px solid var(--surface-500);
    border-radius: 12px;
    display: flex;
    justify-content: center;
    padding-top: 8px;
}

.scroll-wheel {
    width: 3px;
    height: 8px;
    background: var(--primary-400);
    border-radius: 2px;
    animation: scroll-anim 2s ease-in-out infinite;
}

@keyframes scroll-anim {
    0%, 100% { opacity: 1; transform: translateY(0); }
    50% { opacity: 0.3; transform: translateY(8px); }
}

/* Move To Top Button */
.scroll-top-button {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 900;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: 1px solid rgba(99, 102, 241, 0.4);
    color: var(--text-primary);
    background: rgba(15, 23, 42, 0.92);
    box-shadow: 0 16px 36px rgba(2, 6, 23, 0.35);
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

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

.scroll-top-button:hover,
.scroll-top-button:focus-visible {
    border-color: rgba(99, 102, 241, 0.75);
    background: rgba(99, 102, 241, 0.9);
    outline: none;
}

.scroll-top-button svg {
    width: 22px;
    height: 22px;
    fill: currentColor;
}

@media (max-width: 640px) {
    .scroll-top-button {
        right: 16px;
        bottom: 16px;
        width: 44px;
        height: 44px;
    }
}

/* ===== Section Base ===== */
.section {
    padding: 100px 0;
    position: relative;
}

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

.section-tag {
    display: inline-block;
    padding: 6px 16px;
    border-radius: var(--radius-full);
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--primary-300);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 16px;
}

.section-header h2 {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 2.8rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 16px;
    background: linear-gradient(135deg, var(--white), var(--surface-300));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

/* ===== Static Content Pages ===== */
.page-hero {
    padding: 150px 0 70px;
    background: var(--gradient-hero);
    overflow: hidden;
}

.page-hero .section-tag {
    margin-bottom: 18px;
}

.page-hero h1 {
    font-family: var(--font-display);
    font-size: clamp(2.4rem, 6vw, 4.4rem);
    font-weight: 800;
    line-height: 1.05;
    color: var(--text-primary);
    margin-bottom: 18px;
}

.page-hero p {
    max-width: 760px;
    color: var(--text-secondary);
    font-size: 1.08rem;
    line-height: 1.8;
}

.content-section {
    padding: 70px 0 100px;
}

.content-layout {
    max-width: 920px;
    margin: 0 auto;
}

.content-card {
    padding: 32px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    margin-bottom: 24px;
}

.content-card h2 {
    font-family: var(--font-display);
    font-size: 1.45rem;
    color: var(--text-primary);
    margin-bottom: 14px;
}

.content-card h3 {
    font-family: var(--font-display);
    font-size: 1.1rem;
    color: var(--text-primary);
    margin: 22px 0 10px;
}

.content-card p,
.content-card li {
    color: var(--text-secondary);
    line-height: 1.75;
}

.content-card p + p,
.content-card ul + p {
    margin-top: 14px;
}

.content-card ul {
    padding-left: 20px;
    margin: 12px 0 0;
}

.content-card a {
    color: var(--primary-300);
}

.content-card a:hover {
    color: var(--primary-200);
}

.content-meta {
    color: var(--text-muted);
    font-size: 0.92rem;
}

.sitemap-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 28px;
    padding-left: 20px;
}

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

.author-profile-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 22px;
    padding: 30px;
    border: 1px solid rgba(16, 185, 129, 0.24);
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, rgba(6, 78, 59, 0.28), rgba(15, 23, 42, 0.78));
    margin-bottom: 22px;
}

.author-avatar {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #10b981, #0ea5e9);
    color: var(--surface-950);
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 800;
    text-transform: uppercase;
    flex: 0 0 auto;
}

.author-avatar-sm {
    width: 34px;
    height: 34px;
    font-size: 0.95rem;
}

.author-profile-content h2 {
    font-family: var(--font-display);
    font-size: clamp(1.7rem, 4vw, 2.25rem);
    margin-bottom: 10px;
}

.author-profile-content p {
    color: var(--text-secondary);
    line-height: 1.75;
}

.author-profile-content p + p {
    margin-top: 12px;
}

.author-kicker {
    display: inline-block;
    margin-bottom: 8px;
    color: #67e8f9;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.author-detail-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
}

.author-detail-list span {
    padding: 7px 10px;
    border-radius: var(--radius-full);
    border: 1px solid rgba(148, 163, 184, 0.16);
    background: rgba(15, 23, 42, 0.54);
    color: var(--text-secondary);
    font-size: 0.82rem;
    font-weight: 700;
}

.author-card {
    padding: 22px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: rgba(15, 23, 42, 0.5);
}

.author-card h2 {
    font-size: 1.15rem;
    margin-bottom: 8px;
}

@media (max-width: 768px) {
    .page-hero {
        padding: 120px 0 48px;
    }

    .content-card {
        padding: 24px;
    }

    .sitemap-grid,
    .author-grid {
        grid-template-columns: 1fr;
    }

    .author-profile-card {
        grid-template-columns: 1fr;
        padding: 24px;
    }
}

/* ===== Quick Calculator ===== */
.quick-calc-section {
    padding-top: 40px;
    padding-bottom: 60px;
}

.quick-calc-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 48px;
    backdrop-filter: blur(20px);
    box-shadow: var(--shadow-lg);
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
}

.quick-calc-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary-500), transparent);
    opacity: 0.5;
}

.quick-calc-header {
    text-align: center;
    margin-bottom: 36px;
}

.quick-calc-header h2 {
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.quick-calc-header p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.calc-inputs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 24px;
    overflow: visible;
}

.input-group {
    min-width: 0;
    overflow: hidden;
}

.input-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.input-with-unit {
    display: flex;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    background: rgba(15, 23, 42, 0.6);
    transition: var(--transition-fast);
    min-width: 0;
}

.input-with-unit:focus-within {
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.input-with-unit input {
    flex: 1;
    padding: 14px 16px;
    background: transparent;
    border: none;
    outline: none;
    font-size: 1.05rem;
    font-weight: 500;
    color: var(--text-primary);
    min-width: 0;
}

.input-with-unit input::placeholder {
    color: var(--surface-600);
}

.input-with-unit select {
    padding: 14px 12px;
    background: rgba(30, 41, 59, 0.8);
    border: none;
    border-left: 1px solid var(--border);
    outline: none;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary-300);
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    min-width: 75px;
    text-align: center;
}

.btn-calc {
    width: 100%;
    padding: 16px;
    font-size: 1.05rem;
}

.tool-share {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

.tool-share-label {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-secondary);
}

.tool-share-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.tool-share-actions a,
.tool-share-copy {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    background: rgba(15, 23, 42, 0.55);
    cursor: pointer;
    font-family: inherit;
    white-space: nowrap;
    transition: var(--transition-fast);
}

.tool-share-actions a:hover,
.tool-share-actions a:focus-visible,
.tool-share-copy:hover,
.tool-share-copy:focus-visible,
.tool-share-copy.copied {
    color: var(--text-primary);
    border-color: rgba(99, 102, 241, 0.55);
    background: rgba(99, 102, 241, 0.15);
    outline: none;
}

.tool-share-actions svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.tool-share-copy span {
    font-size: 0.84rem;
    font-weight: 700;
}

@media (max-width: 640px) {
    .tool-share {
        align-items: flex-start;
        flex-direction: column;
    }

    .tool-share-actions {
        justify-content: flex-start;
        width: 100%;
    }
}

/* Results */
.calc-result {
    margin-top: 28px;
    padding-top: 28px;
    border-top: 1px solid var(--border);
    animation: fadeInUp 0.4s ease-out;
}

.result-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 20px;
}

.result-item {
    text-align: center;
    padding: 20px;
    border-radius: var(--radius-md);
    background: rgba(99, 102, 241, 0.06);
    border: 1px solid rgba(99, 102, 241, 0.1);
}

.result-item.result-main {
    background: rgba(99, 102, 241, 0.12);
    border-color: rgba(99, 102, 241, 0.2);
}

.result-value {
    display: block;
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-300);
    margin-bottom: 4px;
}

.result-main .result-value {
    font-size: 2.5rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.result-unit {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

@media (max-width: 768px) {
    .calc-inputs {
        grid-template-columns: 1fr;
    }
    .result-grid {
        grid-template-columns: 1fr;
    }
    .quick-calc-card {
        padding: 28px 20px;
    }
}

/* ===== Home Table of Contents ===== */
.home-toc-section {
    padding: 56px 0 24px;
    background: linear-gradient(180deg, var(--surface-950), rgba(12, 10, 30, 0.65));
}

.home-toc {
    max-width: 1000px;
    margin: 0 auto;
    padding: 28px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--bg-card);
    backdrop-filter: blur(10px);
}

.home-toc h2 {
    font-family: var(--font-display);
    font-size: clamp(1.45rem, 3vw, 2rem);
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 18px;
}

.home-toc ol {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 20px;
    margin: 0;
    padding-left: 20px;
}

.home-toc li {
    color: var(--primary-300);
    line-height: 1.45;
    padding-left: 4px;
}

.home-toc a {
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition-fast);
}

.home-toc a:hover,
.home-toc a:focus-visible {
    color: var(--primary-300);
    outline: none;
}

@media (max-width: 768px) {
    .home-toc-section {
        padding: 40px 0 16px;
    }

    .home-toc {
        padding: 22px;
    }

    .home-toc ol {
        grid-template-columns: 1fr;
    }
}

/* ===== Calculator Cards Section ===== */
.articles-section {
    background: linear-gradient(180deg, var(--surface-950), rgba(6, 78, 59, 0.16), var(--surface-950));
}

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

.homepage-article-card {
    min-height: 280px;
    display: flex;
    flex-direction: column;
    padding: 28px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    transition: var(--transition-base);
}

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

.article-label {
    align-self: flex-start;
    margin-bottom: 18px;
    padding: 5px 10px;
    border-radius: var(--radius-full);
    background: rgba(14, 165, 233, 0.12);
    border: 1px solid rgba(14, 165, 233, 0.24);
    color: #7dd3fc;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.8px;
    text-transform: uppercase;
}

.homepage-article-card h3 {
    font-family: var(--font-display);
    font-size: 1.22rem;
    line-height: 1.25;
    margin-bottom: 12px;
}

.homepage-article-card h3 a:hover,
.homepage-article-card h3 a:focus-visible {
    color: var(--primary-300);
    outline: none;
}

.homepage-article-card p {
    color: var(--text-secondary);
    font-size: 0.92rem;
    line-height: 1.65;
}

.article-author-box {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: auto;
    padding: 12px;
    border: 1px solid rgba(16, 185, 129, 0.18);
    border-radius: var(--radius-md);
    background: rgba(6, 78, 59, 0.14);
    color: var(--text-muted);
    font-size: 0.82rem;
    font-weight: 700;
}

.article-author-box > div {
    display: flex;
    flex-direction: column;
    line-height: 1.25;
}

.article-author-box a {
    color: var(--text-primary);
    font-size: 0.95rem;
}

.article-author-box a:hover,
.article-author-box a:focus-visible {
    color: #67e8f9;
    outline: none;
}

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

.blog-section {
    background: linear-gradient(180deg, var(--surface-950), rgba(14, 165, 233, 0.12), var(--surface-950));
}

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

.blog-card,
.blog-list-card {
    padding: 28px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--bg-card);
    backdrop-filter: blur(12px);
}

.blog-card {
    min-height: 250px;
    display: flex;
    flex-direction: column;
    transition: var(--transition-base);
}

.blog-card:hover,
.blog-list-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-3px);
}

.blog-meta {
    display: inline-flex;
    align-self: flex-start;
    margin-bottom: 14px;
    padding: 5px 10px;
    border-radius: var(--radius-full);
    border: 1px solid rgba(16, 185, 129, 0.22);
    background: rgba(6, 78, 59, 0.18);
    color: #86efac;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.8px;
    text-transform: uppercase;
}

.blog-card h3,
.blog-list-card h2 {
    font-family: var(--font-display);
    line-height: 1.25;
    margin-bottom: 12px;
}

.blog-card h3 {
    font-size: 1.2rem;
}

.blog-list-card h2 {
    font-size: 1.35rem;
}

.blog-card p,
.blog-list-card p {
    color: var(--text-secondary);
    line-height: 1.65;
}

.blog-read-link {
    display: inline-flex;
    align-items: center;
    margin-top: auto;
    padding-top: 20px;
    color: var(--primary-200);
    font-weight: 800;
}

.blog-read-link:hover,
.blog-read-link:focus-visible,
.blog-card h3 a:hover,
.blog-card h3 a:focus-visible,
.blog-list-card h2 a:hover,
.blog-list-card h2 a:focus-visible {
    color: #67e8f9;
    outline: none;
}

.blog-layout {
    display: grid;
    gap: 22px;
}

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

.calculators-section {
    background: linear-gradient(180deg, var(--surface-950) 0%, rgba(12, 10, 30, 0.5) 50%, var(--surface-950) 100%);
}

/* Tabs */
.calc-tabs {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 48px;
    flex-wrap: wrap;
}

.tab-btn {
    padding: 10px 24px;
    border-radius: var(--radius-full);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
    border: 1px solid transparent;
    transition: var(--transition-fast);
}

.tab-btn:hover {
    color: var(--text-primary);
    background: rgba(255,255,255,0.04);
}

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

/* Card Grid */
.calc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    display: none;
}

.calc-grid.active {
    display: grid;
    animation: fadeInUp 0.4s ease-out;
}

.calc-card {
    position: relative;
    padding: 28px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    transition: var(--transition-base);
    overflow: hidden;
    cursor: pointer;
    text-decoration: none;
}

.calc-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: var(--gradient-glow);
    opacity: 0;
    transition: var(--transition-base);
    pointer-events: none;
}

.calc-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

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

.card-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    background: rgba(99, 102, 241, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    transition: var(--transition-base);
}

.card-icon svg {
    width: 24px;
    height: 24px;
    color: var(--accent, var(--primary-400));
}

.calc-card:hover .card-icon {
    background: rgba(99, 102, 241, 0.2);
    transform: scale(1.05);
}

.calc-card h3 {
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.calc-card p {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.card-arrow {
    position: absolute;
    top: 28px;
    right: 28px;
    font-size: 1.2rem;
    color: var(--text-muted);
    transition: var(--transition-base);
    opacity: 0;
    transform: translateX(-8px);
}

.calc-card:hover .card-arrow {
    opacity: 1;
    transform: translateX(0);
    color: var(--primary-400);
}

/* ===== How It Works ===== */
.how-section {
    overflow: hidden;
}

.steps-grid {
    display: flex;
    align-items: stretch;
    justify-content: center;
    gap: 0;
    max-width: 1000px;
    margin: 0 auto;
}

.step-card {
    flex: 1;
    text-align: center;
    padding: 40px 32px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    position: relative;
    transition: var(--transition-base);
}

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

.step-number {
    font-family: var(--font-display);
    font-size: 3.5rem;
    font-weight: 800;
    background: linear-gradient(180deg, rgba(99, 102, 241, 0.25), transparent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: 16px;
}

.step-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.step-icon svg {
    width: 24px;
    height: 24px;
    color: var(--primary-400);
}

.step-card h3 {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 8px;
}

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

.step-connector {
    display: flex;
    align-items: center;
    padding: 0 8px;
}

.connector-line {
    width: 40px;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-500), var(--violet-500));
    border-radius: 1px;
    opacity: 0.4;
}

@media (max-width: 768px) {
    .steps-grid {
        flex-direction: column;
        gap: 16px;
    }
    .step-connector {
        justify-content: center;
        padding: 4px 0;
    }
    .connector-line {
        width: 2px;
        height: 30px;
    }
}

/* ===== Conversions Section ===== */
.conversions-section {
    background: linear-gradient(180deg, var(--surface-950), rgba(12, 10, 30, 0.5), var(--surface-950));
}

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

.conv-card {
    padding: 32px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    transition: var(--transition-base);
}

.conv-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-2px);
}

.conv-card h3 {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

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

.conv-card li {
    font-size: 0.92rem;
    color: var(--text-secondary);
    padding-left: 16px;
    position: relative;
}

.conv-card li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--primary-500);
    opacity: 0.5;
}

.conv-card li strong {
    color: var(--text-primary);
    font-weight: 600;
}

.conv-card li a,
.faq-answer a {
    color: var(--primary-200);
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition-fast);
}

.conv-card li a:hover,
.faq-answer a:hover {
    color: var(--primary-300);
}

@media (max-width: 768px) {
    .conversion-cards {
        grid-template-columns: 1fr;
    }
}

/* ===== Video Section ===== */
.video-section {
    padding-top: 80px;
    overflow: hidden;
}

.video-embed {
    max-width: 920px;
    aspect-ratio: 16 / 9;
    margin: 0 auto;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    background: var(--surface-900);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    position: relative;
}

.video-preview {
    display: block;
    width: 100%;
    height: 100%;
    position: relative;
    color: var(--white);
    background: var(--surface-900);
}

.video-preview::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.08), rgba(2, 6, 23, 0.42));
    z-index: 1;
}

.video-preview img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-base);
}

.video-preview:hover img {
    transform: scale(1.03);
}

.video-play-button {
    width: 74px;
    height: 74px;
    border-radius: 50%;
    background: rgba(220, 38, 38, 0.94);
    box-shadow: 0 16px 42px rgba(0, 0, 0, 0.35);
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    transition: var(--transition-base);
}

.video-play-button::before {
    content: '';
    position: absolute;
    left: 31px;
    top: 23px;
    width: 0;
    height: 0;
    border-top: 14px solid transparent;
    border-bottom: 14px solid transparent;
    border-left: 22px solid var(--white);
}

.video-preview:hover .video-play-button {
    background: rgba(239, 68, 68, 0.98);
    transform: translate(-50%, -50%) scale(1.06);
}

.video-preview-label {
    position: absolute;
    left: 24px;
    bottom: 22px;
    z-index: 2;
    padding: 7px 14px;
    border-radius: var(--radius-full);
    background: rgba(15, 23, 42, 0.74);
    border: 1px solid rgba(255, 255, 255, 0.16);
    font-size: 0.88rem;
    font-weight: 700;
    backdrop-filter: blur(8px);
}

.video-embed iframe {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
}

@media (max-width: 768px) {
    .video-section {
        padding-top: 64px;
    }

    .video-embed {
        border-radius: var(--radius-md);
    }

    .video-play-button {
        width: 58px;
        height: 58px;
    }

    .video-play-button::before {
        left: 24px;
        top: 18px;
        border-top-width: 11px;
        border-bottom-width: 11px;
        border-left-width: 17px;
    }

    .video-preview-label {
        left: 16px;
        bottom: 16px;
    }
}

/* ===== FAQ Section ===== */
.faq-section {
    overflow: hidden;
}

.faq-list {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.faq-item {
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    overflow: hidden;
    transition: var(--transition-fast);
}

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

.faq-item.active {
    border-color: rgba(99, 102, 241, 0.3);
}

.faq-question {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    font-size: 1rem;
    font-weight: 600;
    text-align: left;
    color: var(--text-primary);
    transition: var(--transition-fast);
}

html[dir="rtl"] .faq-question {
    text-align: right;
}

.faq-question:hover {
    color: var(--primary-300);
}

.faq-chevron {
    width: 20px;
    height: 20px;
    color: var(--text-muted);
    transition: var(--transition-base);
    flex-shrink: 0;
    margin-left: 16px;
}

html[dir="rtl"] .faq-chevron {
    margin-left: 0;
    margin-right: 16px;
}

.faq-item.active .faq-chevron {
    transform: rotate(180deg);
    color: var(--primary-400);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
}

.faq-item.active .faq-answer {
    max-height: 500px;
}

.faq-answer p {
    padding: 0 24px 20px;
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* ===== Footer ===== */
.footer {
    background: linear-gradient(180deg, var(--surface-950), rgba(2, 6, 23, 1));
    padding: 80px 0 0;
    border-top: 1px solid var(--border);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 48px;
    padding-bottom: 48px;
}

.footer-brand .logo {
    margin-bottom: 16px;
}

.footer-tagline {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.6;
    max-width: 300px;
}

.footer-contact {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 18px;
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.footer-contact p {
    margin: 0;
}

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

.footer-contact a {
    color: var(--primary-300);
}

.footer-contact a:hover {
    color: var(--primary-200);
}

.footer-dmca {
    display: inline-flex;
    width: fit-content;
    padding: 5px 10px;
    border: 1px solid rgba(99, 102, 241, 0.28);
    border-radius: var(--radius-full);
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-200);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.2px;
}

.footer-social {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
}

.footer-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid var(--border);
    border-radius: 50%;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.04);
    transition: var(--transition-fast);
}

.footer-social a:hover,
.footer-social a:focus-visible {
    color: var(--text-primary);
    border-color: rgba(99, 102, 241, 0.55);
    background: rgba(99, 102, 241, 0.15);
    transform: translateY(-2px);
    outline: none;
}

.footer-social svg {
    display: block;
    width: 19px;
    height: 19px;
    fill: currentColor;
}

.footer-links-group h2 {
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

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

.footer-links-group a {
    font-size: 0.88rem;
    color: var(--text-muted);
    transition: var(--transition-fast);
}

.footer-links-group a:hover {
    color: var(--primary-300);
    transform: translateX(4px);
    display: inline-block;
}

html[dir="rtl"] .footer-links-group a:hover {
    transform: translateX(-4px);
}

/* Language Selector */
.footer-language {
    padding: 32px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.language-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.language-header svg {
    color: var(--primary-400);
}

.language-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.lang-btn {
    padding: 8px 16px;
    border-radius: var(--radius-full);
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-muted);
    border: 1px solid var(--border);
    background: transparent;
    transition: var(--transition-fast);
    cursor: pointer;
}

.lang-btn:hover {
    color: var(--text-primary);
    border-color: var(--border-hover);
    background: rgba(255,255,255,0.04);
}

.lang-btn.active {
    color: var(--primary-300);
    border-color: rgba(99, 102, 241, 0.4);
    background: rgba(99, 102, 241, 0.1);
}

/* Footer Bottom */
.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 0;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.footer-bottom-links {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.footer-bottom-links a {
    color: var(--text-muted);
    transition: var(--transition-fast);
}

.footer-bottom-links a:hover {
    color: var(--primary-300);
}

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

@media (max-width: 640px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 28px;
    }
    .footer-social {
        justify-content: center;
    }
    .footer-bottom {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
    .footer-bottom-links {
        justify-content: center;
    }
    .hero-cta {
        flex-direction: column;
    }
    .hero-stats {
        gap: 20px;
    }
    .stat-number {
        font-size: 1.5rem;
    }
}

/* ===== Scroll Reveal Animation ===== */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===== Glow Cursor Effect on Cards ===== */
.calc-card {
    --mx: 50%;
    --my: 50%;
}

/* ===== Loading/Transition Overlay ===== */
.lang-transition-overlay {
    position: fixed;
    inset: 0;
    background: rgba(2, 6, 23, 0.85);
    backdrop-filter: blur(8px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.lang-transition-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.lang-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(99, 102, 241, 0.2);
    border-top-color: var(--primary-500);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* ===== Tool Pages ===== */
.tool-page {
    background:
        radial-gradient(circle at 15% 12%, rgba(99, 102, 241, 0.16), transparent 32%),
        radial-gradient(circle at 82% 8%, rgba(16, 185, 129, 0.1), transparent 28%),
        var(--bg);
}

.tool-hero {
    min-height: 78vh;
    padding: 128px 0 72px;
}

.tool-hero .hero-content {
    max-width: 940px;
}

.tool-hero h1 {
    font-size: clamp(2.6rem, 7vw, 5rem);
}

.tool-hero .hero-subtitle {
    max-width: 760px;
}

.tool-hero-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 42px;
    animation: fadeInUp 0.6s ease-out 0.3s both;
}

.tool-crumbs {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 22px;
    color: var(--text-muted);
    font-size: 0.88rem;
    animation: fadeInUp 0.6s ease-out both;
}

.tool-crumbs a {
    color: var(--primary-300);
}

.tool-crumbs span {
    color: var(--surface-500);
}

.tool-main {
    padding-top: 44px;
}

.tool-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
    gap: 28px;
    align-items: start;
}

.tool-panel,
.tool-info-card,
.tool-feature-card,
.formula-card {
    border: 1px solid var(--border);
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    box-shadow: var(--shadow-lg);
}

.tool-panel {
    border-radius: var(--radius-xl);
    padding: 40px;
    overflow: hidden;
    position: relative;
}

.tool-panel::before {
    content: '';
    position: absolute;
    inset: 0 0 auto;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary-500), transparent);
    opacity: 0.5;
}

.tool-panel-header {
    margin-bottom: 28px;
}

.tool-panel-header h2,
.tool-content-section h2,
.formula-card h2 {
    font-family: var(--font-display);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

.tool-panel-header h2 {
    font-size: clamp(1.55rem, 3vw, 2.1rem);
    margin-bottom: 8px;
}

.tool-panel-header p,
.tool-content-section p,
.formula-card p,
.tool-info-card p,
.tool-feature-card p {
    color: var(--text-secondary);
}

.tool-calculator-form {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

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

.tool-inputs .input-group {
    overflow: visible;
}

.unit-static {
    min-width: 72px;
    padding: 14px 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-left: 1px solid var(--border);
    background: rgba(30, 41, 59, 0.8);
    color: var(--primary-300);
    font-size: 0.85rem;
    font-weight: 700;
}

.input-with-unit select:only-child {
    flex: 1;
    width: 100%;
    text-align: left;
    border-left: 0;
}

.tool-result {
    margin-top: 30px;
    padding-top: 28px;
    border-top: 1px solid var(--border);
}

.tool-result[hidden] {
    display: none;
}

.tool-result-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.tool-result .result-item {
    min-height: 112px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.tool-result .result-value {
    font-size: clamp(1.35rem, 3vw, 2rem);
}

.tool-result-summary {
    margin-top: 18px;
    padding: 16px 18px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(99, 102, 241, 0.16);
    background: rgba(99, 102, 241, 0.06);
    color: var(--text-secondary);
    font-size: 0.92rem;
}

.tool-sidebar {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.tool-info-card,
.tool-feature-card,
.formula-card {
    border-radius: var(--radius-lg);
    padding: 28px;
}

.tool-info-card h3,
.tool-feature-card h3 {
    font-family: var(--font-display);
    font-size: 1.05rem;
    margin-bottom: 10px;
}

.tool-info-list,
.tool-check-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.tool-info-list li,
.tool-check-list li {
    color: var(--text-secondary);
    font-size: 0.92rem;
    padding-left: 18px;
    position: relative;
}

.tool-info-list li::before,
.tool-check-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.7em;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--primary-400);
    opacity: 0.75;
}

.tool-info-list strong,
.tool-check-list strong {
    color: var(--text-primary);
    font-weight: 600;
}

.tool-content-section {
    padding: 92px 0 0;
}

.tool-content-section h2,
.formula-card h2 {
    font-size: clamp(1.8rem, 4vw, 2.55rem);
    margin-bottom: 16px;
}

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

.tool-feature-card {
    display: flex;
    flex-direction: column;
    box-shadow: none;
    transition: var(--transition-base);
}

.tool-feature-card .tool-check-list {
    margin-bottom: 22px;
}

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

.formula-card {
    margin-top: 28px;
    box-shadow: none;
}

.formula-box {
    margin: 22px 0;
    padding: 20px;
    border-radius: var(--radius-md);
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid var(--border);
    font-family: var(--font-display);
    color: var(--primary-200);
    font-size: clamp(1rem, 2vw, 1.25rem);
    overflow-wrap: anywhere;
}

.keyword-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 24px;
}

.keyword-pill {
    padding: 7px 13px;
    border-radius: var(--radius-full);
    border: 1px solid rgba(99, 102, 241, 0.18);
    background: rgba(99, 102, 241, 0.08);
    color: var(--primary-200);
    font-size: 0.82rem;
    font-weight: 600;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    margin-top: 32px;
}

.related-card {
    padding: 22px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    background: var(--bg-card);
    transition: var(--transition-base);
}

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

.related-card span {
    display: block;
    color: var(--primary-300);
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.7px;
    margin-bottom: 8px;
}

.related-card h3 {
    font-family: var(--font-display);
    font-size: 1rem;
}

@media (max-width: 980px) {
    .tool-layout,
    .tool-content-grid,
    .related-grid {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 768px) {
    .tool-hero {
        min-height: auto;
        padding: 112px 0 54px;
    }

    .tool-panel {
        padding: 28px 20px;
    }

    .tool-inputs,
    .tool-result-grid,
    .tool-sidebar {
        grid-template-columns: 1fr;
    }

    .tool-crumbs {
        flex-wrap: wrap;
    }
}

/* ===== Shape Calculator ===== */
.quick-calc-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 36px;
    align-items: start;
}

.quick-calc-inputs {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Shape Selector */
.shape-selector-group {
    margin-bottom: 4px;
}

.shape-selector-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.shape-selector {
    width: 100%;
    padding: 14px 16px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background: rgba(15, 23, 42, 0.6);
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 500;
    font-family: var(--font-body);
    cursor: pointer;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23818cf8' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 16px;
    transition: var(--transition-fast);
}

html[dir="rtl"] .shape-selector {
    background-position: left 16px center;
}

.shape-selector:focus {
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.shape-selector option,
.shape-selector optgroup {
    background: var(--surface-900);
    color: var(--text-primary);
}

.shape-selector optgroup {
    font-weight: 700;
    font-style: normal;
    color: var(--primary-300);
    padding: 8px 0;
}

/* Dynamic Fields */
.shape-dynamic-fields {
    display: flex;
    flex-direction: column;
    gap: 16px;
    animation: fadeInUp 0.3s ease-out;
}

.shape-dynamic-fields .input-group label {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Shape Preview Container */
.quick-calc-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 320px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    background: rgba(15, 23, 42, 0.5);
    position: relative;
    overflow: hidden;
    padding: 24px;
}

.quick-calc-preview::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 50%, rgba(99, 102, 241, 0.06), transparent 70%);
    pointer-events: none;
}

.quick-calc-preview::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.3), transparent);
}

.shape-preview-svg {
    width: 100%;
    height: 280px;
    position: relative;
    z-index: 1;
    transition: var(--transition-base);
}

.shape-preview-svg text {
    font-family: var(--font-display);
    font-weight: 600;
    fill: var(--primary-300);
    font-size: 13px;
}

.shape-preview-svg .shape-fill {
    fill: rgba(99, 102, 241, 0.12);
    stroke: var(--primary-400);
    stroke-width: 2;
    transition: all 0.4s ease;
}

.shape-preview-svg .shape-edge {
    stroke: rgba(99, 102, 241, 0.25);
    stroke-width: 1.5;
    stroke-dasharray: 6 4;
    transition: all 0.4s ease;
}

.shape-preview-svg .shape-line-solid {
    stroke: var(--primary-400);
    stroke-width: 2;
    transition: all 0.4s ease;
}

.shape-preview-svg .dim-line {
    stroke: rgba(165, 180, 252, 0.4);
    stroke-width: 1;
    stroke-dasharray: 4 3;
}

.shape-preview-svg .dim-text {
    fill: var(--primary-200);
    font-size: 12px;
    font-weight: 600;
    font-family: var(--font-display);
}

.shape-preview-svg .dim-bg {
    fill: rgba(15, 23, 42, 0.85);
    rx: 4;
}

/* Shape name label below preview */
.shape-name-label {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    padding: 4px 14px;
    border-radius: var(--radius-full);
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--primary-300);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 2;
    white-space: nowrap;
}

/* Volume info badge on preview */
.shape-volume-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    padding: 6px 14px;
    border-radius: var(--radius-full);
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid rgba(99, 102, 241, 0.25);
    font-family: var(--font-display);
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--primary-200);
    z-index: 2;
    opacity: 0;
    transform: translateY(-4px);
    transition: all 0.3s ease;
}

.shape-volume-badge.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Result grid for shape calc — 3 columns */
.quick-calc-result-full {
    grid-column: 1 / -1;
}

@media (max-width: 860px) {
    .quick-calc-body {
        grid-template-columns: 1fr;
    }

    .quick-calc-preview {
        min-height: 260px;
        order: -1;
    }
}

@media (max-width: 480px) {
    .quick-calc-preview {
        min-height: 220px;
        padding: 16px;
    }

    .shape-preview-svg {
        height: 200px;
    }
}

/* ===== Guide / Educational Content Section ===== */
.guide-section {
    padding: 80px 0 100px;
    position: relative;
}

.guide-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary-500), transparent);
    opacity: 0.2;
}

.guide-content {
    max-width: 860px;
    margin: 0 auto;
}

.guide-content h2 {
    font-family: var(--font-display);
    font-size: clamp(1.6rem, 3.5vw, 2.2rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin: 64px 0 20px;
    padding-top: 24px;
    color: var(--text-primary);
    position: relative;
}

.guide-content h2:first-child {
    margin-top: 0;
}

.guide-content h2::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 48px;
    height: 3px;
    background: var(--gradient-primary);
    border-radius: 2px;
}

.guide-content h3 {
    font-family: var(--font-display);
    font-size: clamp(1.15rem, 2.5vw, 1.4rem);
    font-weight: 600;
    color: var(--text-primary);
    margin: 40px 0 14px;
}

.guide-content p {
    font-size: 1.02rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 18px;
}

.guide-content p a {
    color: var(--primary-300);
    font-weight: 600;
    text-decoration: none;
    border-bottom: 1px solid rgba(165, 180, 252, 0.25);
    transition: var(--transition-fast);
}

.guide-content p a:hover {
    color: var(--primary-200);
    border-bottom-color: var(--primary-300);
}

.guide-content ul,
.guide-content ol {
    margin: 0 0 20px 0;
    padding-left: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.guide-content ol {
    counter-reset: guide-counter;
}

.guide-content ul li,
.guide-content ol li {
    font-size: 0.98rem;
    color: var(--text-secondary);
    line-height: 1.7;
    padding-left: 28px;
    position: relative;
}

.guide-content ul li::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 10px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--primary-500);
    opacity: 0.6;
}

.guide-content ol li {
    counter-increment: guide-counter;
}

.guide-content ol li::before {
    content: counter(guide-counter);
    position: absolute;
    left: 0;
    top: 0;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid rgba(99, 102, 241, 0.25);
    color: var(--primary-300);
    font-size: 0.75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.guide-content strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* Formula Box */
.formula-box {
    background: rgba(99, 102, 241, 0.06);
    border: 1px solid rgba(99, 102, 241, 0.15);
    border-radius: var(--radius-lg);
    padding: 28px 32px;
    margin: 24px 0;
    position: relative;
    overflow: hidden;
}

.formula-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gradient-primary);
    opacity: 0.6;
}

.formula-box .formula-label {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--primary-300);
    margin-bottom: 12px;
    display: block;
}

.formula-box .formula-expr {
    font-family: 'Space Grotesk', monospace;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.6;
    letter-spacing: 0.02em;
}

.formula-box .formula-expr .highlight {
    color: var(--primary-300);
}

.formula-box .formula-note {
    font-size: 0.88rem;
    color: var(--text-muted);
    margin-top: 10px;
    font-style: italic;
}

/* Step-by-Step List */
.guide-steps {
    counter-reset: step-counter;
    margin: 24px 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.guide-step {
    counter-increment: step-counter;
    display: flex;
    gap: 20px;
    padding: 20px 24px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    transition: var(--transition-fast);
}

.guide-step:hover {
    border-color: var(--border-hover);
    transform: translateX(4px);
}

.guide-step-num {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(99, 102, 241, 0.12);
    border: 1px solid rgba(99, 102, 241, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--primary-300);
}

.guide-step-content h3 {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.guide-step-content p {
    font-size: 0.92rem;
    color: var(--text-muted);
    margin-bottom: 0;
    line-height: 1.6;
}

/* Diagram / Image Container */
.guide-image-block {
    margin: 32px 0;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    background: var(--bg-card);
    overflow: hidden;
    transition: var(--transition-base);
}

.guide-image-block:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow-md);
}

.guide-image-block img {
    width: 100%;
    height: auto;
    display: block;
}

.guide-image-caption {
    padding: 14px 20px;
    font-size: 0.85rem;
    color: var(--text-muted);
    text-align: center;
    border-top: 1px solid var(--border);
    font-style: italic;
}

/* Guide Table */
.guide-table-wrapper {
    margin: 24px 0;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    overflow: hidden;
    background: var(--bg-card);
    backdrop-filter: blur(10px);
}

.guide-table {
    width: 100%;
    border-collapse: collapse;
}

.guide-table thead {
    background: rgba(99, 102, 241, 0.1);
}

.guide-table th {
    font-family: var(--font-display);
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--primary-200);
    text-align: left;
    padding: 14px 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid rgba(99, 102, 241, 0.15);
}

.guide-table td {
    padding: 13px 20px;
    font-size: 0.95rem;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border);
}

.guide-table tbody tr:last-child td {
    border-bottom: none;
}

.guide-table tbody tr {
    transition: var(--transition-fast);
}

.guide-table tbody tr:hover {
    background: rgba(99, 102, 241, 0.04);
}

.guide-table td strong {
    color: var(--text-primary);
    font-weight: 600;
}

.guide-table td:first-child {
    font-weight: 500;
    color: var(--text-primary);
}

/* Shape Cards Grid */
.shapes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
    margin: 28px 0;
}

.shape-formula-card {
    padding: 24px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    transition: var(--transition-base);
    position: relative;
    overflow: hidden;
}

.shape-formula-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

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

.shape-formula-card:hover::before {
    opacity: 0.6;
}

.shape-formula-card .shape-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    background: rgba(99, 102, 241, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
    font-size: 1.3rem;
}

.shape-formula-card h3 {
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.shape-formula-card .shape-formula {
    font-family: 'Space Grotesk', monospace;
    font-size: 0.92rem;
    font-weight: 500;
    color: var(--primary-300);
    padding: 8px 12px;
    background: rgba(99, 102, 241, 0.06);
    border-radius: var(--radius-sm);
    margin-bottom: 10px;
    display: block;
}

.shape-formula-card p {
    font-size: 0.87rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 0;
}

/* Tip / Callout Box */
.guide-tip {
    display: flex;
    gap: 16px;
    padding: 20px 24px;
    border-radius: var(--radius-md);
    margin: 24px 0;
    border: 1px solid rgba(16, 185, 129, 0.2);
    background: rgba(16, 185, 129, 0.05);
}

.guide-tip .tip-icon {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(16, 185, 129, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.guide-tip .tip-content p {
    font-size: 0.92rem;
    color: var(--text-secondary);
    margin-bottom: 0;
}

.guide-tip .tip-content strong {
    color: #34d399;
}

/* Warning Callout */
.guide-warning {
    border-color: rgba(245, 158, 11, 0.2);
    background: rgba(245, 158, 11, 0.05);
}

.guide-warning .tip-icon {
    background: rgba(245, 158, 11, 0.15);
}

.guide-warning .tip-content strong {
    color: #fbbf24;
}

/* Example Calculation Block */
.example-block {
    margin: 24px 0;
    padding: 24px 28px;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(139, 92, 246, 0.2);
    background: rgba(139, 92, 246, 0.04);
    position: relative;
}

.example-block .example-label {
    position: absolute;
    top: -10px;
    left: 20px;
    padding: 2px 12px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--violet-400);
    background: var(--surface-950);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: var(--radius-full);
}

.example-block p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.example-block p:last-child {
    margin-bottom: 0;
}

.example-block .result-highlight {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--primary-300);
}

/* Responsive adjustments for guide */
@media (max-width: 768px) {
    .guide-content {
        padding: 0 4px;
    }

    .formula-box {
        padding: 20px;
    }

    .formula-box .formula-expr {
        font-size: 1.05rem;
    }

    .guide-step {
        flex-direction: column;
        gap: 12px;
    }

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

    .guide-table th,
    .guide-table td {
        padding: 10px 14px;
        font-size: 0.88rem;
    }

    .guide-content h2 {
        margin-top: 48px;
    }
}

/* ===== Selection ===== */
::selection {
    background: rgba(99, 102, 241, 0.3);
    color: var(--white);
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--surface-950);
}

::-webkit-scrollbar-thumb {
    background: var(--surface-700);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--surface-600);
}
