/**
 * Peasy — Custom CSS
 * Lemon brand design system + accent color utilities.
 * Loaded after Tailwind CDN for overrides.
 */

/* ═══════════════════════════════════════════════════════════════════════════
   Lemon Brand Palette — "Easy Peasy Lemon Squeezy"
   ═══════════════════════════════════════════════════════════════════════════ */

html {
    scroll-behavior: smooth;
}

:root {
    /* Lemon palette (global — not per-site) */
    --lemon-primary: #F59E0B;
    --lemon-bright: #FBBF24;
    --lemon-deep: #D97706;
    --lemon-wash: #FEFCE8;
    --lemon-juice: #FDE68A;
    --lemon-rind: #92400E;

    /* Design tokens — radius scale */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-card: 14px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-button: 10px;
    --radius-badge: 8px;
    --tap-min: 44px;

    /* Font tokens */
    --font-sans: "Geist Sans", system-ui, -apple-system, sans-serif;
    --font-mono: "Geist Mono", ui-monospace, monospace;

    /* Layout tokens */
    --content-max: 1200px;
    --content-narrow: 800px;

    /* Shadow tokens */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 12px 24px rgba(0, 0, 0, 0.12);

    /* Semantic colors — light mode */
    --bg: #ffffff;
    --bg-secondary: #f9fafb;
    --bg-card: #ffffff;
    --text-primary: #111827;
    --text-secondary: #6b7280;
    --text-tertiary: #9ca3af;
    --text-muted: #9ca3af;
    --border: #e5e7eb;
    --border-subtle: #f3f4f6;

    /* Accent variants — computed from --accent in base.html */
    --accent-light: color-mix(in srgb, var(--accent) 10%, transparent);
    --accent-medium: color-mix(in srgb, var(--accent) 15%, transparent);
    --accent-dark: color-mix(in srgb, var(--accent) 80%, black);
    --accent-deeper: color-mix(in srgb, var(--accent) 60%, black);

    /* 16 Category Accents — for cross-referencing in hub/listings */
    --accent-hub: #6366F1;
    --accent-pdf: #EF4444;
    --accent-image: #10B981;
    --accent-formats: #F97316;
    --accent-text: #F59E0B;
    --accent-dev: #06B6D4;
    --accent-css: #EC4899;
    --accent-design: #D946EF;
    --accent-video: #8B5CF6;
    --accent-audio: #0EA5E9;
    --accent-qr: #3B82F6;
    --accent-seo: #22C55E;
    --accent-safe: #64748B;
    --accent-social: #F43F5E;
    --accent-math: #14B8A6;
    --accent-gen: #84CC16;

    /* Semantic status colors */
    --success: #22C55E;
    --success-light: #DCFCE7;
    --warning: #F59E0B;
    --warning-light: #FEF3C7;
    --error: #EF4444;
    --error-light: #FEE2E2;
    --info: #3B82F6;
    --info-light: #DBEAFE;
}

.dark {
    --lemon-wash: #1c1a0a;

    /* Semantic colors — dark mode */
    --bg: #0F1117;
    --bg-secondary: #1A1D27;
    --bg-card: #1E2130;
    --text-primary: #F1F5F9;
    --text-secondary: #94A3B8;
    --text-tertiary: #64748B;
    --text-muted: #64748B;
    --border: #2A2D3A;
    --border-subtle: #1E2130;

    /* Shadow tokens — dark mode */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 12px 24px rgba(0, 0, 0, 0.4);

    /* Status colors — dark mode */
    --success: #4ADE80;
    --success-light: rgba(16, 185, 129, 0.1);
    --warning: #FBBF24;
    --warning-light: rgba(245, 158, 11, 0.1);
    --error: #F87171;
    --error-light: rgba(239, 68, 68, 0.1);
    --info: #60A5FA;
    --info-light: rgba(59, 130, 246, 0.1);
}

/* ═══════════════════════════════════════════════════════════════════════════
   Accent Color Utilities — uses CSS custom property --accent from base.html
   ═══════════════════════════════════════════════════════════════════════════ */

.text-accent {
    color: var(--accent);
}

.bg-accent {
    background-color: var(--accent);
}

.border-accent {
    border-color: var(--accent);
}

.ring-accent {
    --tw-ring-color: var(--accent);
}

/* Hover variants */
.hover\:text-accent:hover {
    color: var(--accent);
}

.hover\:bg-accent:hover {
    background-color: var(--accent);
}

.hover\:border-accent:hover {
    border-color: var(--accent);
}

/* Focus ring for interactive elements */
.focus-accent:focus,
.focus-accent:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* Global keyboard focus indicator — accessibility baseline */
:focus-visible {
    outline: 2px solid var(--accent, #6366F1);
    outline-offset: 2px;
    border-radius: var(--radius-sm);
}

/* ═══════════════════════════════════════════════════════════════════════════
   Tool Card — CSS-only lemon watermark + hover border (Design Sample A/C)
   ═══════════════════════════════════════════════════════════════════════════ */

.tool-card {
    position: relative;
    overflow: hidden;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.tool-card::after {
    content: "🍋";
    position: absolute;
    bottom: -4px;
    right: -4px;
    font-size: 40px;
    opacity: 0.04;
    pointer-events: none;
    transition: opacity 0.3s, font-size 0.3s;
}

.tool-card:hover::after {
    opacity: 0.08;
    font-size: 48px;
}

.tool-card:hover {
    border-color: var(--lemon-bright);
}

/* Sibling site card — default + hover border (Design Sample C) */
.sibling-card {
    border-color: #e5e7eb;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.dark .sibling-card {
    border-color: var(--border);
}

.sibling-card:hover {
    border-color: var(--lemon-bright);
}

/* Trust bar with lemon-juice borders (Design Sample C) */
.trust-bar-lemon {
    border-top: 2px solid var(--lemon-juice);
    border-bottom: 2px solid var(--lemon-juice);
    background-color: var(--lemon-wash);
}

.dark .trust-bar-lemon {
    border-top-color: color-mix(in srgb, var(--lemon-juice) 30%, transparent);
    border-bottom-color: color-mix(in srgb, var(--lemon-juice) 30%, transparent);
    background-color: rgba(245, 158, 11, 0.06);
}

/* Hub stats — inline flex (Design Sample A) */
.stats-inline {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 48px;
    flex-wrap: wrap;
}

.stats-inline .stat-value {
    font-size: 32px;
    font-weight: 700;
    font-family: var(--font-mono);
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
}

.stats-inline .stat-label {
    font-size: 13px;
    margin-top: 2px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   Sticky Header blur support
   ═══════════════════════════════════════════════════════════════════════════ */

@supports (backdrop-filter: blur(12px)) {
    .backdrop-blur-lg {
        backdrop-filter: blur(12px);
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   Scrollbar styling (subtle, matches dark mode)
   ═══════════════════════════════════════════════════════════════════════════ */

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 4px;
}

.dark ::-webkit-scrollbar-thumb {
    background: #374151;
}

/* ═══════════════════════════════════════════════════════════════════════════
   Smooth transitions for theme switching
   ═══════════════════════════════════════════════════════════════════════════ */

html.dark {
    color-scheme: dark;
}

/* Prevent transition flash during initial page load */
html:not(.theme-ready) * {
    transition: none !important;
}

/* ═══════════════════════════════════════════════════════════════════════════
   Glossary Tooltip — auto-linked term definitions
   ═══════════════════════════════════════════════════════════════════════════ */

.glossary-term {
    text-decoration: underline dotted;
    text-decoration-color: #9ca3af;
    text-underline-offset: 2px;
    cursor: help;
}

.dark .glossary-term {
    text-decoration-color: #6b7280;
}

.glossary-tooltip {
    position: absolute;
    z-index: 9999;
    width: 300px;
    padding: 12px 16px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    font-size: 13px;
    line-height: 1.5;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s;
}

.glossary-tooltip.visible {
    opacity: 1;
    pointer-events: auto;
}

.dark .glossary-tooltip {
    background: #1f2937;
    border-color: #374151;
    color: #e5e7eb;
}

.glossary-tooltip-term {
    font-weight: 600;
    margin-bottom: 4px;
}

.glossary-tooltip-def {
    color: #6b7280;
    margin-bottom: 8px;
}

.dark .glossary-tooltip-def {
    color: #9ca3af;
}

.glossary-tooltip-link {
    color: var(--accent, #6366f1);
    text-decoration: none;
    font-size: 12px;
    font-weight: 500;
}

.glossary-tooltip-link:hover {
    text-decoration: underline;
}

/* ═══════════════════════════════════════════════════════════════════════════
   Squeeze Animation System — "The Squeeze" UX metaphor
   Drop → Squeeze → Fresh
   ═══════════════════════════════════════════════════════════════════════════ */

@keyframes squeeze {
    0% { transform: scale(1, 1) rotate(-5deg); }
    25% { transform: scale(0.7, 1.3) rotate(-3deg); }
    50% { transform: scale(0.6, 1.4) rotate(-5deg); }
    75% { transform: scale(0.85, 1.1) rotate(-4deg); }
    100% { transform: scale(1, 1) rotate(-5deg); }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

@keyframes check-pop {
    0% { transform: scale(0); opacity: 0; }
    50% { transform: scale(1.2); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
}

.animate-squeeze {
    animation: squeeze 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

.animate-check-pop {
    animation: check-pop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* Additional brand animations from design spec */

@keyframes fade-up {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slide-in-right {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

@keyframes squeeze-mini {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(0.95); }
}

@keyframes toast-in {
    from { opacity: 0; transform: translateY(-8px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes ripple {
    to { transform: scale(4); opacity: 0; }
}

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

@keyframes skeleton {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

@keyframes slide-down {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes confetti-fall {
    0% { transform: translateY(-10px) rotate(0deg); opacity: 1; }
    100% { transform: translateY(60px) rotate(360deg); opacity: 0; }
}

@keyframes drip {
    0% { transform: translateY(0) scaleX(1); opacity: 0.7; }
    60% { transform: translateY(30px) scaleX(0.8); opacity: 0.4; }
    100% { transform: translateY(60px) scaleX(0.5); opacity: 0; }
}

@keyframes sparkle {
    0%, 100% { opacity: 0; transform: scale(0.3) rotate(0deg); }
    50% { opacity: 1; transform: scale(1.2) rotate(180deg); }
}

@keyframes progress-fill {
    from { width: 0; }
    to { width: var(--progress, 100%); }
}

@keyframes bounce-in {
    0% { opacity: 0; transform: scale(0.3); }
    50% { opacity: 1; transform: scale(1.05); }
    70% { transform: scale(0.95); }
    100% { opacity: 1; transform: scale(1); }
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.3); }
    50% { box-shadow: 0 0 20px 5px rgba(245, 158, 11, 0.15); }
}

/* Animation utility classes */
.animate-fade-up { animation: fade-up 0.4s ease-out both; }
.animate-slide-in-right { animation: slide-in-right 0.3s ease-out both; }
.animate-shimmer { animation: shimmer 2s linear infinite; background-size: 200% 100%; }
.animate-squeeze-mini { animation: squeeze-mini 0.2s ease; }
.animate-toast-in { animation: toast-in 0.3s ease-out both; }
.animate-ripple { animation: ripple 0.6s linear; }
.animate-spin { animation: spin 1s linear infinite; }
.animate-skeleton { animation: skeleton 1.5s ease-in-out infinite; background: linear-gradient(90deg, #f3f4f6 25%, #e5e7eb 50%, #f3f4f6 75%); background-size: 200% 100%; }
.animate-slide-down { animation: slide-down 0.2s ease-out both; }
.animate-bounce-in { animation: bounce-in 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both; }
.animate-pulse-glow { animation: pulse-glow 2s ease-in-out infinite; }
.animate-drip { animation: drip 2s ease-in infinite; }
.animate-sparkle { animation: sparkle 1.5s ease-in-out infinite; }
.animate-confetti { animation: confetti-fall 3s linear forwards; }
.animate-progress-fill { animation: progress-fill 1s ease-out both; }

/* Stagger delay utilities for cascading fade-up reveals (hub hero etc.) */
.stagger-1 { animation-delay: 0s; }
.stagger-2 { animation-delay: 0.1s; }
.stagger-3 { animation-delay: 0.2s; }
.stagger-4 { animation-delay: 0.3s; }
.stagger-5 { animation-delay: 0.4s; }

.dark .animate-skeleton { background: linear-gradient(90deg, #1f2937 25%, #374151 50%, #1f2937 75%); background-size: 200% 100%; }

/* ═══════════════════════════════════════════════════════════════════════════
   Tool Page — "The Squeeze" 3-Step UX System
   Drop → Squeeze → Fresh
   ═══════════════════════════════════════════════════════════════════════════ */

/* Tool Badge (category pill above h1) */
.tool-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: color-mix(in srgb, var(--accent) 10%, white);
    color: var(--accent);
    font-size: 12px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 20px;
    margin-bottom: 12px;
}

.dark .tool-badge {
    background: color-mix(in srgb, var(--accent) 15%, transparent);
}

/* Tool Tags Row */
.tool-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 12px;
}

.tool-tag {
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 20px;
    border: 1px solid #e5e7eb;
    color: #6b7280;
    font-weight: 500;
}

.dark .tool-tag {
    border-color: #374151;
    color: #9ca3af;
}

.tool-tag-highlight {
    background: var(--lemon-wash);
    color: var(--lemon-deep);
    border-color: var(--lemon-juice);
}

.dark .tool-tag-highlight {
    background: rgba(245, 158, 11, 0.1);
    color: #fcd34d;
    border-color: rgba(245, 158, 11, 0.3);
}

/* Step Indicator */
.step-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin-bottom: 24px;
}

.step-dot {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    background: #f3f4f6;
    color: #9ca3af;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.dark .step-dot {
    background: #1f2937;
    color: #6b7280;
}

.step-dot-active {
    background: var(--lemon-primary);
    color: white;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
    animation: pulse-glow 2s ease-in-out infinite;
}

.step-dot-done {
    background: var(--accent);
    color: white;
}

.step-dot-emoji {
    font-size: 20px;
    line-height: 1;
    background: transparent;
    color: inherit;
    border: 2px solid #e5e7eb;
}

.dark .step-dot-emoji {
    border-color: #374151;
}

.step-dot-emoji.step-dot-active {
    background: var(--lemon-wash);
    border-color: var(--lemon-primary);
}

.dark .step-dot-emoji.step-dot-active {
    background: rgba(245, 158, 11, 0.15);
}

.step-dot-emoji.step-dot-done {
    background: transparent;
    border-color: var(--accent);
}

.step-line {
    width: 80px;
    height: 2px;
    background: #e5e7eb;
    transition: all 0.3s ease;
}

.dark .step-line {
    background: #374151;
}

.step-line-active {
    background: linear-gradient(90deg, var(--lemon-primary), var(--lemon-bright));
}

.step-line-done {
    background: var(--accent);
}

.step-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #9ca3af;
    margin-top: 6px;
    transition: color 0.3s ease;
}

.step-label-active {
    color: var(--lemon-deep);
}

.dark .step-label-active {
    color: var(--lemon-bright);
}

.step-label-done {
    color: var(--accent);
}

/* Branded Drop Zone */
.drop-zone-branded {
    position: relative;
    border: 2px dashed #d1d5db;
    border-radius: var(--radius-card);
    padding: 80px 40px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    overflow: hidden;
}

.drop-zone-branded::before {
    content: "🍋";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 200px;
    opacity: 0.03;
    pointer-events: none;
}

.dark .drop-zone-branded {
    border-color: #374151;
}

.drop-zone-branded:hover,
.drop-zone-branded.drag-over {
    border-color: var(--lemon-primary);
    border-style: solid;
    background-color: var(--lemon-wash);
}

.dark .drop-zone-branded.drag-over {
    background-color: rgba(245, 158, 11, 0.05);
}

.drop-zone-lemon {
    font-size: 56px;
    display: inline-block;
    animation: float 3s ease-in-out infinite;
    filter: drop-shadow(0 4px 12px rgba(245, 158, 11, 0.2));
}

.drop-zone-heading {
    font-size: 20px;
    font-weight: 700;
    color: #111827;
    margin: 12px 0 8px;
}

.dark .drop-zone-heading {
    color: #f9fafb;
}

.drop-zone-hint {
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 8px;
}

.dark .drop-zone-hint {
    color: #9ca3af;
}

.drop-zone-divider {
    font-size: 12px;
    color: #9ca3af;
    margin-bottom: 12px;
    letter-spacing: 0.05em;
}

.dark .drop-zone-divider {
    color: #6b7280;
}

.drop-zone-formats {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    margin-top: 16px;
}

.format-badge {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: 4px;
    background: #f3f4f6;
    color: #6b7280;
}

.dark .format-badge {
    background: #1f2937;
    color: #9ca3af;
}

/* Squeeze Step (processing) */
.squeeze-step {
    text-align: center;
    padding: 48px 24px;
}

.squeeze-lemon {
    font-size: 80px;
    display: inline-block;
    animation: squeeze 1s ease-in-out infinite;
    filter: drop-shadow(0 4px 12px rgba(245, 158, 11, 0.2));
}

.juice-drops {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin: 16px 0;
    height: 40px;
}

.juice-drop {
    width: 8px;
    height: 8px;
    border-radius: 50% 50% 50% 0;
    background: var(--lemon-bright);
    transform: rotate(45deg);
    animation: drip 1.2s ease-in infinite;
}

.juice-drop:nth-child(2) { animation-delay: 0.2s; background: var(--lemon-primary); }
.juice-drop:nth-child(3) { animation-delay: 0.4s; }
.juice-drop:nth-child(4) { animation-delay: 0.6s; }
.juice-drop:nth-child(5) { animation-delay: 0.8s; }

.squeeze-progress-bar {
    width: 100%;
    max-width: 300px;
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
    margin: 16px auto 0;
}

.dark .squeeze-progress-bar {
    background: #374151;
}

.squeeze-progress-fill {
    height: 100%;
    border-radius: 4px;
    background: linear-gradient(90deg, var(--lemon-bright), var(--lemon-primary), var(--lemon-deep));
    transition: width 0.3s ease;
}

.squeeze-text {
    font-size: 14px;
    font-weight: 600;
    color: var(--lemon-deep);
    margin-top: 12px;
}

.dark .squeeze-text {
    color: var(--lemon-bright);
}

.squeeze-file-info {
    font-size: 13px;
    color: #6b7280;
    margin-top: 8px;
}

.dark .squeeze-file-info {
    color: #9ca3af;
}

/* Fresh Step (results) */
.fresh-step {
    position: relative;
    border: 2px solid var(--accent);
    border-radius: 20px;
    padding: 48px 40px;
    background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 2%, white), color-mix(in srgb, var(--lemon-primary) 2%, white));
    overflow: hidden;
}

.dark .fresh-step {
    background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 5%, transparent), color-mix(in srgb, var(--lemon-primary) 3%, transparent));
}

.fresh-sparkles {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.fresh-sparkle {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--lemon-bright);
    animation: sparkle 1.5s ease-in-out infinite;
}

.fresh-sparkle:nth-child(1) { top: 15%; left: 10%; animation-delay: 0s; }
.fresh-sparkle:nth-child(2) { top: 25%; right: 15%; animation-delay: 0.3s; }
.fresh-sparkle:nth-child(3) { bottom: 20%; left: 20%; animation-delay: 0.6s; }
.fresh-sparkle:nth-child(4) { top: 10%; right: 30%; animation-delay: 0.9s; background: var(--accent); }
.fresh-sparkle:nth-child(5) { bottom: 15%; right: 10%; animation-delay: 1.2s; }

/* Fresh Confetti — celebration particles */
.fresh-confetti {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.fresh-confetti-piece {
    position: absolute;
    width: 8px;
    height: 8px;
    top: -10px;
    animation: confetti-fall 3s linear forwards;
}

.fresh-confetti-piece:nth-child(1) { left: 10%; background: var(--lemon-bright); border-radius: 50%; animation-delay: 0.1s; }
.fresh-confetti-piece:nth-child(2) { left: 25%; background: var(--accent); border-radius: 2px; animation-delay: 0.3s; width: 6px; height: 10px; }
.fresh-confetti-piece:nth-child(3) { left: 40%; background: var(--lemon-primary); border-radius: 50%; animation-delay: 0.0s; }
.fresh-confetti-piece:nth-child(4) { left: 55%; background: var(--lemon-deep); border-radius: 2px; animation-delay: 0.5s; width: 10px; height: 6px; }
.fresh-confetti-piece:nth-child(5) { left: 70%; background: var(--accent); border-radius: 50%; animation-delay: 0.2s; }
.fresh-confetti-piece:nth-child(6) { left: 85%; background: var(--lemon-bright); border-radius: 2px; animation-delay: 0.4s; width: 6px; height: 10px; }
.fresh-confetti-piece:nth-child(7) { left: 15%; background: var(--lemon-primary); border-radius: 50%; animation-delay: 0.7s; width: 6px; height: 6px; }
.fresh-confetti-piece:nth-child(8) { left: 60%; background: var(--lemon-juice); border-radius: 2px; animation-delay: 0.6s; }

.fresh-header {
    text-align: center;
    margin-bottom: 24px;
}

.fresh-icon {
    font-size: 48px;
    display: inline-block;
    animation: bounce-in 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.fresh-title {
    font-size: 24px;
    font-weight: 800;
    color: #111827;
    margin-top: 8px;
}

.dark .fresh-title {
    color: #f9fafb;
}

/* Result Card */
.result-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    max-width: 480px;
    margin: 0 auto 24px;
    border: 1px solid #e5e7eb;
    text-align: left;
}

.dark .result-card {
    background: #111827;
    border-color: #1f2937;
}

.result-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f3f4f6;
}

.dark .result-row {
    border-bottom-color: #1f2937;
}

.result-row:last-child {
    border-bottom: none;
}

.result-row-label {
    font-size: 13px;
    color: #6b7280;
}

.dark .result-row-label {
    color: #9ca3af;
}

.result-row-value {
    font-size: 14px;
    font-weight: 600;
    color: #111827;
}

.dark .result-row-value {
    color: #f9fafb;
}

/* Savings Bar */
.savings-bar {
    display: flex;
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
    margin-top: 10px;
    margin-bottom: 4px;
}

.savings-kept {
    background: var(--accent);
    transition: width 0.5s ease;
}

.savings-removed {
    background: #e5e7eb;
}

.dark .savings-removed {
    background: #374151;
}

.savings-labels {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: #9ca3af;
}

/* Action Buttons (Fresh Step) */
.btn-download {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 24px;
    border-radius: var(--radius-button);
    background: var(--accent);
    color: white;
    font-weight: 700;
    font-size: 14px;
    transition: all 0.2s;
    box-shadow: 0 2px 12px color-mix(in srgb, var(--accent) 30%, transparent);
}

.btn-download:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px color-mix(in srgb, var(--accent) 40%, transparent);
}

.btn-again {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 24px;
    border-radius: var(--radius-button);
    background: var(--lemon-wash);
    color: var(--lemon-deep);
    border: 1px solid var(--lemon-juice);
    font-weight: 700;
    font-size: 14px;
    transition: all 0.2s;
}

.dark .btn-again {
    background: rgba(245, 158, 11, 0.1);
    color: var(--lemon-bright);
    border-color: rgba(245, 158, 11, 0.3);
}

.btn-again:hover {
    background: var(--lemon-juice);
    color: var(--lemon-rind);
}

.dark .btn-again:hover {
    background: rgba(245, 158, 11, 0.2);
}

/* ═══════════════════════════════════════════════════════════════════════════
   Lemon Brand Utilities
   ═══════════════════════════════════════════════════════════════════════════ */

.lemon-gradient {
    background: linear-gradient(135deg, var(--lemon-bright), var(--lemon-primary), var(--lemon-deep));
}

.lemon-glow {
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.15);
}

.dark .lemon-glow {
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.1);
}

/* Card with design token radius */
.card-peasy {
    border-radius: var(--radius-card);
}

.btn-peasy {
    border-radius: var(--radius-button);
    min-height: var(--tap-min);
}

/* Lemon button — primary CTA */
.btn-lemon {
    background: linear-gradient(135deg, var(--lemon-bright), var(--lemon-primary));
    color: var(--lemon-rind);
    font-weight: 700;
    border-radius: var(--radius-button);
    min-height: var(--tap-min);
    transition: all 0.2s;
}

.btn-lemon:hover {
    background: linear-gradient(135deg, var(--lemon-primary), var(--lemon-deep));
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
    transform: translateY(-1px);
}

.btn-lemon:active {
    transform: translateY(0) scale(0.98);
}

/* ═══════════════════════════════════════════════════════════════════════════
   Button System (Design Sample F)
   Base class + semantic variants. Every button gets tap-min, radius, weight.
   ═══════════════════════════════════════════════════════════════════════════ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: var(--tap-min);
    padding: 10px 20px;
    border-radius: var(--radius-button);
    font-weight: 700;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
    border: 1px solid transparent;
    text-decoration: none;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

.btn-primary {
    background: var(--accent);
    color: white;
    box-shadow: 0 2px 12px color-mix(in srgb, var(--accent) 30%, transparent);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px color-mix(in srgb, var(--accent) 40%, transparent);
}

.btn-primary:active:not(:disabled) {
    transform: translateY(0) scale(0.98);
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-primary);
    border-color: var(--border);
}

.btn-secondary:hover:not(:disabled) {
    border-color: var(--accent);
    color: var(--accent);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
}

.btn-ghost:hover:not(:disabled) {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.btn-danger {
    background: #ef4444;
    color: white;
}

.btn-danger:hover:not(:disabled) {
    background: #dc2626;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.btn-danger:active:not(:disabled) {
    transform: translateY(0) scale(0.98);
}

.btn-sm {
    min-height: 36px;
    padding: 6px 14px;
    font-size: 13px;
}

/* Dropzone — file drop area */
.dropzone {
    border: 2px dashed #d1d5db;
    border-radius: var(--radius-card);
    transition: all 0.2s;
}

.dropzone.drag-over,
.dropzone:hover {
    border-color: var(--lemon-primary);
    background-color: var(--lemon-wash);
}

.dark .dropzone {
    border-color: #374151;
}

.dark .dropzone.drag-over,
.dark .dropzone:hover {
    border-color: var(--lemon-primary);
    background-color: rgba(245, 158, 11, 0.05);
}

/* Stat card (for result displays) */
.stat-card {
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    padding: 16px;
    text-align: center;
    background: var(--bg-card);
    transition: box-shadow 0.2s, border-color 0.2s;
}

.stat-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border-color: color-mix(in srgb, var(--accent) 30%, var(--border, #e5e7eb));
}

.dark .stat-card {
    border-color: var(--border, #374151);
    background: var(--bg-card, #1E293B);
}

.dark .stat-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Score ring (for SEO audit etc.) — SVG-based arc */
.score-ring {
    width: 80px;
    height: 80px;
    position: relative;
}

.score-ring svg {
    transform: rotate(-90deg);
}

.score-ring .label {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 800;
    font-family: var(--font-mono);
}

/* Badge — base + variants */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 100px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.badge-success { background-color: var(--success-light); color: #065f46; }
.badge-warning { background-color: var(--warning-light); color: #92400e; }
.badge-error { background-color: var(--error-light); color: #991b1b; }
.badge-info { background-color: var(--info-light); color: #1e40af; }

.dark .badge-success { background-color: var(--success-light); color: #6ee7b7; }
.dark .badge-warning { background-color: var(--warning-light); color: #fcd34d; }
.dark .badge-error { background-color: var(--error-light); color: #fca5a5; }
.dark .badge-info { background-color: var(--info-light); color: #93c5fd; }

/* Copy block — code snippet with copy button */
.copy-block {
    position: relative;
    background: #1f2937;
    border-radius: var(--radius-badge);
    padding: 0.75rem 1rem;
    font-family: "Geist Mono", monospace;
    font-size: 0.8125rem;
    color: #e5e7eb;
    overflow-x: auto;
}

/* Progress track */
.progress-track {
    height: 6px;
    background: #e5e7eb;
    border-radius: 3px;
    overflow: hidden;
}

.dark .progress-track {
    background: #374151;
}

.progress-fill {
    height: 100%;
    border-radius: 3px;
    background: linear-gradient(90deg, var(--accent), var(--lemon-primary));
}

/* ═══════════════════════════════════════════════════════════════════════════
   Settings Panel — Design Sample E patterns
   ═══════════════════════════════════════════════════════════════════════════ */

.settings-panel {
    border: 1px solid #e5e7eb;
    border-radius: var(--radius-card);
    overflow: hidden;
    padding: 16px;
    background: white;
}

.dark .settings-panel {
    border-color: #374151;
    background: #1f2937;
}

.settings-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    margin: -16px -16px 16px;
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
}

.dark .settings-header {
    background: #111827;
    border-bottom-color: #374151;
}

.settings-header h3 {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
}

.dark .settings-header h3 {
    color: var(--text-primary);
}

.settings-header .reset-btn {
    font-size: 12px;
    font-weight: 500;
    color: var(--accent);
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
}

.settings-header .reset-btn:hover {
    opacity: 0.8;
}

.setting-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 14px 16px;
    border-bottom: 1px solid #f3f4f6;
}

.dark .setting-row {
    border-bottom-color: #1f2937;
}

.setting-row:last-child {
    border-bottom: none;
}

@media (min-width: 640px) {
    .setting-row {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 16px;
    }
}

.setting-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 500;
    color: #374151;
    white-space: nowrap;
}

.dark .setting-label {
    color: #d1d5db;
}

/* Custom select (min-height 44px for touch) */
.setting-select {
    min-height: var(--tap-min);
    padding: 8px 36px 8px 12px;
    border: 1px solid #e5e7eb;
    border-radius: var(--radius-badge);
    background: white 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='%236b7280' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center;
    -webkit-appearance: none;
    appearance: none;
    font-size: 13px;
    color: #111827;
    cursor: pointer;
    transition: border-color 0.15s;
    width: 100%;
}

@media (min-width: 640px) {
    .setting-row .setting-select {
        width: auto;
        min-width: 160px;
    }
}

.dark .setting-select {
    background-color: #111827;
    border-color: #374151;
    color: #f9fafb;
    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='%239ca3af' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
}

.setting-select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 20%, transparent);
}

/* Custom text input for settings */
.setting-input {
    min-height: var(--tap-min);
    padding: 8px 12px;
    border: 1px solid #e5e7eb;
    border-radius: var(--radius-badge);
    background: white;
    font-size: 13px;
    color: #111827;
    transition: border-color 0.15s;
    width: 100%;
}

@media (min-width: 640px) {
    .setting-row .setting-input {
        width: auto;
        min-width: 120px;
    }
}

.dark .setting-input {
    background-color: #111827;
    border-color: #374151;
    color: #f9fafb;
}

.setting-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 20%, transparent);
}

/* Setting label-row — flex row for label + default indicator */
.setting-label-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Setting description — sub-label hint text below the label */
.setting-desc {
    font-size: 12px;
    color: var(--text-tertiary);
    margin-top: 2px;
    line-height: 1.4;
}

/* Setting default indicator — 🍋 lemon dot for recommended value */
.setting-default {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    font-weight: 600;
    color: var(--lemon-deep);
    background: var(--lemon-wash);
    padding: 1px 6px;
    border-radius: 100px;
    white-space: nowrap;
}

.dark .setting-default {
    color: var(--lemon-bright);
    background: rgba(245, 158, 11, 0.1);
}

/* Checkbox input for settings — consistent border + accent color */
.setting-checkbox {
    width: 1rem;
    height: 1rem;
    border-radius: 4px;
    border: 1px solid var(--border, #d1d5db);
    cursor: pointer;
    accent-color: var(--accent);
}

.dark .setting-checkbox {
    border-color: #4b5563;
}

/* Toggle switch — 44x24px */
.toggle {
    position: relative;
    width: 44px;
    height: 24px;
    background: #d1d5db;
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.2s;
    flex-shrink: 0;
}

.toggle.active {
    background: var(--accent);
}

.toggle::after {
    content: "";
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    transition: transform 0.2s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.toggle.active::after {
    transform: translateX(20px);
}

.dark .toggle {
    background: #4b5563;
}

/* Info icon with tooltip */
.info-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #e5e7eb;
    color: #6b7280;
    font-size: 10px;
    font-weight: 700;
    cursor: help;
    flex-shrink: 0;
}

.dark .info-icon {
    background: #374151;
    color: #9ca3af;
}

/* ═══════════════════════════════════════════════════════════════════════════
   Input Stats Bar — live character/word/sentence counts
   ═══════════════════════════════════════════════════════════════════════════ */

.input-stats {
    display: flex;
    gap: 16px;
    padding: 8px 16px;
    background: var(--bg-secondary, #f9fafb);
    border: 1px solid var(--border, #e5e7eb);
    border-top: none;
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    font-size: 12px;
    color: var(--text-secondary, #6b7280);
}

.dark .input-stats {
    background: #111827;
    border-color: #374151;
    color: #9ca3af;
}

.input-stats span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.input-stats .stat-num {
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: #374151;
}

.dark .input-stats .stat-num {
    color: #d1d5db;
}

/* ═══════════════════════════════════════════════════════════════════════════
   Stat Card internals — Design Sample F
   ═══════════════════════════════════════════════════════════════════════════ */

.stat-value {
    font-size: 28px;
    font-weight: 800;
    font-family: var(--font-mono);
    letter-spacing: -0.02em;
    color: var(--text-primary);
    line-height: 1.2;
}

.stat-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-tertiary);
    margin-top: 4px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   Copy Button with Ripple — Design Sample E
   ═══════════════════════════════════════════════════════════════════════════ */

.copy-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: var(--radius-badge);
    background: var(--accent);
    color: white;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    overflow: hidden;
    border: none;
    transition: opacity 0.2s;
}

.copy-btn:hover {
    opacity: 0.9;
}

.copy-btn .ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    transform: scale(0);
    animation: ripple 0.6s linear;
    pointer-events: none;
}

/* ═══════════════════════════════════════════════════════════════════════════
   Text Output Area — lemon-themed result
   ═══════════════════════════════════════════════════════════════════════════ */

.text-result-area {
    border: 2px solid color-mix(in srgb, var(--accent) 30%, #e5e7eb);
    border-radius: var(--radius-card);
    overflow: hidden;
    transition: border-color 0.2s;
}

.dark .text-result-area {
    border-color: color-mix(in srgb, var(--accent) 20%, #374151);
}

.text-result-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: color-mix(in srgb, var(--accent) 5%, white);
    border-bottom: 1px solid color-mix(in srgb, var(--accent) 15%, #e5e7eb);
}

.dark .text-result-header {
    background: color-mix(in srgb, var(--accent) 5%, #111827);
    border-bottom-color: color-mix(in srgb, var(--accent) 10%, #374151);
}

/* ═══════════════════════════════════════════════════════════════════════════
   Color Picker Input — consistent styling for <input type="color">
   ═══════════════════════════════════════════════════════════════════════════ */

.color-input {
    width: 100%;
    height: 2.25rem;
    background-color: var(--bg-secondary, #f9fafb);
    border: 1px solid var(--border, #e5e7eb);
    border-radius: var(--radius-badge);
    cursor: pointer;
    padding: 2px;
}

.dark .color-input {
    background-color: #374151;
    border-color: #4b5563;
}

/* ═══════════════════════════════════════════════════════════════════════════
   Chip Group — format/option selectors (e.g. SHA-256, SHA-512)
   ═══════════════════════════════════════════════════════════════════════════ */

.chip-group {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.chip {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    border-radius: 100px;
    font-size: 13px;
    font-weight: 500;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.15s;
    user-select: none;
}

.chip:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.chip.active {
    background: var(--lemon-wash);
    border-color: var(--lemon-primary);
    color: var(--lemon-deep);
    font-weight: 600;
}

.dark .chip.active {
    background: rgba(245, 158, 11, 0.12);
    border-color: var(--lemon-primary);
    color: var(--lemon-bright);
}

/* ═══════════════════════════════════════════════════════════════════════════
   Toast — fixed notification popup
   ═══════════════════════════════════════════════════════════════════════════ */

.toast {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: var(--radius-md);
    background: var(--bg-card);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    animation: toast-in 0.3s ease-out both;
}

.toast-success { border-left: 3px solid var(--success); }
.toast-warning { border-left: 3px solid var(--warning); }
.toast-error   { border-left: 3px solid var(--error); }
.toast-info    { border-left: 3px solid var(--info); }

/* ═══════════════════════════════════════════════════════════════════════════
   Generic Form Inputs — base .input / .textarea with accent focus ring
   ═══════════════════════════════════════════════════════════════════════════ */

.input {
    min-height: var(--tap-min);
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    font-size: 14px;
    color: var(--text-primary);
    transition: border-color 0.15s, box-shadow 0.15s;
    width: 100%;
}

.input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 15%, transparent);
}

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

.textarea {
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    font-size: 14px;
    color: var(--text-primary);
    transition: border-color 0.15s, box-shadow 0.15s;
    width: 100%;
    resize: vertical;
    min-height: 120px;
    line-height: 1.6;
}

.textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 15%, transparent);
}

.textarea::placeholder {
    color: var(--text-muted);
}

/* ═══════════════════════════════════════════════════════════════════════════
   Section Tag — accent-colored category pill above section headings
   ═══════════════════════════════════════════════════════════════════════════ */

.section-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 100px;
    background: var(--accent-light);
    color: var(--accent);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.02em;
    margin-bottom: 8px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   Copy Block — semantic code snippet with copy button
   ═══════════════════════════════════════════════════════════════════════════ */

/* Overrides the old hardcoded dark-only copy-block */
.copy-block {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--text-primary);
    overflow-x: auto;
}

.copy-block code {
    flex: 1;
    min-width: 0;
    word-break: break-all;
}

.copy-block .copy-btn {
    flex-shrink: 0;
    padding: 6px 12px;
    font-size: 12px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   Dual Drop — format conversion selector (e.g. PDF → DOCX)
   ═══════════════════════════════════════════════════════════════════════════ */

.dual-drop {
    display: flex;
    align-items: center;
    gap: 12px;
}

.dual-drop .setting-select {
    flex: 1;
}

.dual-drop-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--accent-light);
    color: var(--accent);
    font-size: 16px;
    font-weight: 700;
    flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════════════════════════════
   Mobile Navigation
   ═══════════════════════════════════════════════════════════════════════════ */

.mobile-nav {
    display: none;
}

@media (max-width: 639px) {
    .mobile-nav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 50;
        background: var(--bg-card);
        border-top: 1px solid var(--border);
        padding: 8px 0;
        padding-bottom: env(safe-area-inset-bottom, 8px);
    }

    .mobile-nav-item {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 2px;
        padding: 6px 4px;
        font-size: 10px;
        font-weight: 500;
        color: var(--text-muted);
        text-decoration: none;
        transition: color 0.15s;
    }

    .mobile-nav-item.active,
    .mobile-nav-item:hover {
        color: var(--accent);
    }

    .mobile-nav-item svg {
        width: 20px;
        height: 20px;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   Mobile Drawer (85vw slide-out panel per Sample D)
   ═══════════════════════════════════════════════════════════════════════════ */

.mobile-drawer-cat-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.mobile-drawer-cat-grid a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 10px 4px;
    border-radius: var(--radius-sm, 8px);
    text-decoration: none;
    transition: background-color 0.15s;
}

.mobile-drawer-cat-grid a:hover {
    background: var(--bg-hover);
}

/* ═══════════════════════════════════════════════════════════════════════════
   Guide Article — Ghost Blog-style reading experience
   ═══════════════════════════════════════════════════════════════════════════ */

/* Prose — typography overrides for guide content */
.guide-prose {
    font-size: 16px;
    line-height: 1.8;
    color: var(--text-primary);
    font-family: var(--font-sans);
}

.guide-prose p {
    margin-bottom: 1.5em;
}

.guide-prose > *:first-child {
    margin-top: 0;
}

/* Headings — clear hierarchy with accent accents */
.guide-prose h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-top: 2.5em;
    margin-bottom: 0.75em;
    padding-bottom: 0.5em;
    border-bottom: 2px solid color-mix(in srgb, var(--accent) 20%, transparent);
    letter-spacing: -0.01em;
    line-height: 1.3;
    scroll-margin-top: 6rem;
}

.guide-prose h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-top: 2em;
    margin-bottom: 0.5em;
    padding-left: 0.75em;
    border-left: 3px solid var(--accent);
    letter-spacing: -0.005em;
    line-height: 1.4;
    scroll-margin-top: 6rem;
}

.guide-prose h4 {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-top: 1.5em;
    margin-bottom: 0.4em;
    line-height: 1.4;
    scroll-margin-top: 6rem;
}

/* Lists */
.guide-prose ul,
.guide-prose ol {
    margin-bottom: 1.5em;
    padding-left: 1.5em;
}

.guide-prose ul {
    list-style: disc;
}

.guide-prose ol {
    list-style: decimal;
}

.guide-prose li {
    margin-bottom: 0.4em;
    line-height: 1.7;
}

.guide-prose li > ul,
.guide-prose li > ol {
    margin-top: 0.4em;
    margin-bottom: 0.4em;
}

/* Links */
.guide-prose a {
    color: var(--accent);
    text-decoration: underline;
    text-decoration-color: color-mix(in srgb, var(--accent) 30%, transparent);
    text-underline-offset: 2px;
    transition: text-decoration-color 0.15s;
}

.guide-prose a:hover {
    text-decoration-color: var(--accent);
}

/* Code — inline */
.guide-prose code {
    font-family: var(--font-mono);
    font-size: 0.875em;
    padding: 0.15em 0.4em;
    border-radius: 4px;
    background: var(--bg-secondary);
    color: var(--accent);
    font-weight: 500;
}

.guide-prose pre code {
    padding: 0;
    background: none;
    color: inherit;
    font-weight: 400;
    font-size: 0.85em;
}

/* Code — block */
.guide-prose pre {
    background: #1e1e2e;
    color: #cdd6f4;
    border-radius: var(--radius-md);
    padding: 1.25em 1.5em;
    margin-bottom: 1.5em;
    overflow-x: auto;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    line-height: 1.7;
    border: 1px solid var(--border);
}

.dark .guide-prose pre {
    background: #11111b;
    border-color: #313244;
}

/* Blockquotes — accent-styled callout */
.guide-prose blockquote {
    border-left: 4px solid var(--accent);
    background: color-mix(in srgb, var(--accent) 4%, transparent);
    padding: 1em 1.25em;
    margin: 1.5em 0;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    color: var(--text-secondary);
    font-style: normal;
}

.guide-prose blockquote p:last-child {
    margin-bottom: 0;
}

/* Tables */
.guide-prose table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5em;
    font-size: 0.9em;
}

.guide-prose th {
    text-align: left;
    font-weight: 600;
    padding: 0.6em 0.75em;
    border-bottom: 2px solid var(--border);
    color: var(--text-primary);
    font-size: 0.85em;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.guide-prose td {
    padding: 0.6em 0.75em;
    border-bottom: 1px solid var(--border-subtle);
    color: var(--text-secondary);
}

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

/* Images */
.guide-prose img {
    max-width: 100%;
    border-radius: var(--radius-md);
    margin: 1.5em 0;
}

/* Horizontal rules */
.guide-prose hr {
    border: none;
    height: 1px;
    background: var(--border);
    margin: 2.5em 0;
}

/* Strong / Em */
.guide-prose strong {
    font-weight: 600;
    color: var(--text-primary);
}

/* ── Key Takeaways card ── */
.guide-takeaways {
    background: color-mix(in srgb, var(--accent) 4%, var(--bg));
    border: 1px solid color-mix(in srgb, var(--accent) 15%, transparent);
}

.dark .guide-takeaways {
    background: color-mix(in srgb, var(--accent) 4%, var(--bg));
    border-color: color-mix(in srgb, var(--accent) 12%, transparent);
}

/* ── Featured Tool CTA card ── */
.guide-featured-tool {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    transition: border-color 0.2s;
}

.guide-featured-tool:hover {
    border-color: var(--lemon-bright);
}

/* ── Sticky ToC Sidebar ── */
.guide-toc-sidebar {
    padding-top: 0.5rem;
    border-left: 1px solid var(--border-subtle);
}

.guide-toc-link {
    color: var(--text-tertiary);
    transition: color 0.15s, background 0.15s;
}

.guide-toc-link:hover {
    color: var(--text-primary);
    background: var(--bg-secondary);
}

.guide-toc-active {
    color: var(--accent) !important;
    background: color-mix(in srgb, var(--accent) 6%, transparent);
    font-weight: 500;
    position: relative;
}

.guide-toc-active::before {
    content: '';
    position: absolute;
    left: -1px;
    top: 4px;
    bottom: 4px;
    width: 2px;
    background: var(--accent);
    border-radius: 1px;
}

/* ToC sidebar border aligns with parent left border */
.guide-toc-sidebar .guide-toc-active::before {
    left: calc(-1px - 0.75rem);
}

/* ═══════════════════════════════════════════════════════════════════════════
   Reduced Motion — respect user preferences
   ═══════════════════════════════════════════════════════════════════════════ */

@media (prefers-reduced-motion: reduce) {
    .animate-squeeze,
    .animate-float,
    .animate-check-pop,
    .animate-fade-up,
    .animate-slide-in-right,
    .animate-shimmer,
    .animate-squeeze-mini,
    .animate-toast-in,
    .animate-ripple,
    .animate-spin,
    .animate-skeleton,
    .animate-slide-down,
    .animate-bounce-in,
    .animate-pulse-glow,
    .animate-drip,
    .animate-sparkle,
    .animate-confetti,
    .animate-progress-fill,
    .drop-zone-lemon,
    .squeeze-lemon {
        animation: none;
    }

    .glossary-tooltip {
        transition: none;
    }
}
