/*
Theme Name: SnapRatio
Theme URI: https://snapratio.com
Description: Premium utility tools for image analysis, text manipulation, and word finding. Modern, clean design with fully functional client-side tools.
Version: 2.0.4
Author: SnapRatio Team
Author URI: https://snapratio.com
Text Domain: snapratio
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Tags: tools, utilities, one-column, custom-menu, custom-logo, featured-images
Requires at least: 5.9
Tested up to: 6.4
Requires PHP: 7.4
*/

/* ==========================================================================
   DESIGN SYSTEM - Premium SaaS-Style UI
   Inspired by Vercel, Linear, Stripe
   ========================================================================== */

/* --------------------------------------------------------------------------
   CSS Custom Properties
   -------------------------------------------------------------------------- */
:root {
    /* Colors - Dark Mode Primary */
    --color-bg-primary: #0a0a0b;
    --color-bg-secondary: #111113;
    --color-bg-tertiary: #18181b;
    --color-bg-elevated: #1f1f23;
    --color-bg-hover: #27272a;

    /* Accent Colors */
    --color-accent: #6366f1;
    --color-accent-light: #818cf8;
    --color-accent-dark: #4f46e5;
    --color-accent-glow: rgba(99, 102, 241, 0.15);
    --color-accent-rgb: 99, 102, 241;

    /* Secondary Accent */
    --color-secondary: #06b6d4;
    --color-secondary-rgb: 6, 182, 212;

    /* Text Colors */
    --color-text-primary: #fafafa;
    --color-text-secondary: #a1a1aa;
    --color-text-muted: #71717a;
    --color-text-disabled: #52525b;

    /* Border Colors */
    --color-border: rgba(255, 255, 255, 0.08);
    --color-border-hover: rgba(255, 255, 255, 0.15);
    --color-border-focus: rgba(99, 102, 241, 0.5);

    /* Status Colors */
    --color-success: #22c55e;
    --color-success-bg: rgba(34, 197, 94, 0.1);
    --color-warning: #f59e0b;
    --color-warning-bg: rgba(245, 158, 11, 0.1);
    --color-error: #ef4444;
    --color-error-bg: rgba(239, 68, 68, 0.1);
    --color-info: #3b82f6;
    --color-info-bg: rgba(59, 130, 246, 0.1);

    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', 'SF Mono', Consolas, monospace;

    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.5rem;
    --text-3xl: 1.875rem;
    --text-4xl: 2.25rem;
    --text-5xl: 3rem;
    --text-6xl: 3.75rem;

    --leading-tight: 1.25;
    --leading-normal: 1.5;
    --leading-relaxed: 1.75;

    /* Spacing Scale - Strictly 4px Base */
    --space-0: 0px;
    --space-1: 0.25rem;
    /* 4px */
    --space-2: 0.5rem;
    /* 8px */
    --space-3: 0.75rem;
    /* 12px */
    --space-4: 1rem;
    /* 16px */
    --space-5: 1.25rem;
    /* 20px */
    --space-6: 1.5rem;
    /* 24px */
    --space-8: 2rem;
    /* 32px */
    --space-10: 2.5rem;
    /* 40px */
    --space-12: 3rem;
    /* 48px */
    --space-16: 4rem;
    /* 64px */
    --space-20: 5rem;
    /* 80px */
    --space-24: 6rem;
    /* 96px */
    --space-32: 8rem;
    /* 128px */
    --space-40: 10rem;
    /* 160px */

    /* Section Spacing */
    --section-spacing: var(--space-20);
    --section-spacing-sm: var(--space-12);

    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-2xl: 24px;
    --radius-full: 9999px;

    /* Shadows - Premium Depth */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --shadow-inner: inset 0 2px 4px 0 rgba(0, 0, 0, 0.06);

    /* Glow Effects */
    --shadow-glow: 0 0 40px -10px rgba(99, 102, 241, 0.15);
    --shadow-glow-lg: 0 0 80px -20px rgba(99, 102, 241, 0.25);

    /* Layout */
    --container-max: 1200px;
    --container-narrow: 768px;
    --header-height: 72px;

    /* Z-IndexLayering */
    --z-dropdown: 100;
    --z-sticky: 200;
    --z-modal: 300;
    --z-tooltip: 400;
}

/* --------------------------------------------------------------------------
   Reset & Base Styles
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-sans);
    font-size: var(--text-base);
    line-height: var(--leading-normal);
    color: var(--color-text-primary);
    background-color: var(--color-bg-primary);
    min-height: 100vh;
}

/* Selection */
::selection {
    background: rgba(99, 102, 241, 0.3);
    color: var(--color-text-primary);
}

/* Focus Visible */
:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

/* Links */
a {
    color: inherit;
    text-decoration: none;
}

/* Images */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Lists */
ul,
ol {
    list-style: none;
}

/* Buttons */
button {
    font-family: inherit;
    font-size: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

/* Inputs */
input,
textarea,
select {
    font-family: inherit;
    font-size: inherit;
}

/* --------------------------------------------------------------------------
   Typography
   -------------------------------------------------------------------------- */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 600;
    line-height: var(--leading-tight);
    color: var(--color-text-primary);
}

h1 {
    font-size: var(--text-4xl);
}

h2 {
    font-size: var(--text-3xl);
}

h3 {
    font-size: var(--text-2xl);
}

h4 {
    font-size: var(--text-xl);
}

h5 {
    font-size: var(--text-lg);
}

h6 {
    font-size: var(--text-base);
}

@media (min-width: 768px) {
    h1 {
        font-size: var(--text-5xl);
    }

    h2 {
        font-size: var(--text-4xl);
    }
}

p {
    color: var(--color-text-secondary);
    line-height: var(--leading-relaxed);
}

.text-gradient {
    background: linear-gradient(135deg, var(--color-accent-light), var(--color-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* --------------------------------------------------------------------------
   Layout Primitives
   -------------------------------------------------------------------------- */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--space-4);
    padding-right: var(--space-4);
}

.container--narrow {
    max-width: var(--container-narrow);
}

.section {
    padding-top: var(--section-spacing);
    padding-bottom: var(--section-spacing);
    position: relative;
}

.section--sm {
    padding-top: var(--section-spacing-sm);
    padding-bottom: var(--section-spacing-sm);
}

/* --------------------------------------------------------------------------
   Global Surface / Card System
   -------------------------------------------------------------------------- */
.surface {
    background-color: var(--color-bg-secondary);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    overflow: hidden;
    position: relative;
    transition: transform var(--transition-base), border-color var(--transition-base), box-shadow var(--transition-base);
}

/* Glass Variant */
.surface--glass {
    background: rgba(17, 17, 19, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-color: rgba(255, 255, 255, 0.08);
}

/* Card Interactive (Link) */
a.surface:hover {
    transform: translateY(-2px);
    border-color: var(--color-border-hover);
    box-shadow: var(--shadow-xl);
}

/* Card Content Padding */
.surface__content {
    padding: var(--space-6);
}

.surface__header {
    padding: var(--space-6);
    border-bottom: 1px solid var(--color-border);
    background: rgba(255, 255, 255, 0.02);
}

.surface__footer {
    padding: var(--space-4) var(--space-6);
    border-top: 1px solid var(--color-border);
    background: rgba(255, 255, 255, 0.02);
}

@media (min-width: 768px) {
    .section {
        padding: var(--space-24) 0;
    }
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: var(--z-sticky);
    height: var(--header-height);
    background: rgba(10, 10, 11, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--color-border);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--space-6);
    /* Logo on left, Nav on right */
    flex-direction: row !important;
}

.site-logo {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    font-size: var(--text-xl);
    font-weight: 700;
}

.site-logo img {
    height: 32px;
    width: auto;
}

/* Navigation */
.main-nav {
    display: none;
}

@media (min-width: 768px) {
    .main-nav {
        display: flex;
        align-items: center;
        gap: var(--space-1);
    }
}

.main-nav ul {
    display: flex;
    align-items: center;
    gap: var(--space-1);
}

.main-nav a {
    display: block;
    padding: var(--space-2) var(--space-4);
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--color-text-secondary);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.main-nav a:hover {
    color: var(--color-text-primary);
    background: var(--color-bg-hover);
}

.main-nav .current-menu-item a,
.main-nav .current_page_item a {
    color: var(--color-text-primary);
    background: var(--color-bg-elevated);
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    color: var(--color-text-secondary);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.menu-toggle:hover {
    color: var(--color-text-primary);
    background: var(--color-bg-hover);
}

@media (min-width: 768px) {
    .menu-toggle {
        display: none;
    }
}

/* Mobile Menu */
.mobile-menu {
    display: none;
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--color-bg-primary);
    padding: var(--space-6);
    z-index: var(--z-modal);
    overflow-y: auto;
}

.mobile-menu.is-active {
    display: block;
}

.mobile-menu a {
    display: block;
    padding: var(--space-4);
    font-size: var(--text-lg);
    color: var(--color-text-secondary);
    border-bottom: 1px solid var(--color-border);
    transition: color var(--transition-fast);
}

.mobile-menu a:hover {
    color: var(--color-text-primary);
}

/* --------------------------------------------------------------------------
   Hero Section (Homepage)
   -------------------------------------------------------------------------- */
.hero {
    position: relative;
    padding: var(--space-20) 0 var(--space-16);
    text-align: center;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: 50%;
    transform: translateX(-50%);
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(var(--color-accent-rgb), 0.15) 0%, transparent 70%);
    pointer-events: none;
}

.hero__badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-4);
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--color-accent-light);
    background: var(--color-accent-glow);
    border: 1px solid rgba(var(--color-accent-rgb), 0.2);
    border-radius: var(--radius-full);
    margin-bottom: var(--space-6);
}

.hero__title {
    font-size: var(--text-4xl);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: var(--space-6);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

@media (min-width: 768px) {
    .hero__title {
        font-size: var(--text-6xl);
    }
}

.hero__subtitle {
    font-size: var(--text-lg);
    color: var(--color-text-secondary);
    max-width: 600px;
    margin: 0 auto var(--space-10);
}

@media (min-width: 768px) {
    .hero__subtitle {
        font-size: var(--text-xl);
    }
}

.hero__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-4);
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-6);
    font-size: var(--text-sm);
    font-weight: 600;
    line-height: 1;
    border-radius: var(--radius-lg);
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.btn svg {
    width: 18px;
    height: 18px;
}

.btn--primary {
    color: white;
    background: linear-gradient(135deg, var(--color-accent), var(--color-accent-dark));
    box-shadow: 0 0 20px rgba(var(--color-accent-rgb), 0.3);
}

.btn--primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 0 30px rgba(var(--color-accent-rgb), 0.4);
}

.btn--primary:active {
    transform: translateY(0);
}

.btn--secondary {
    color: var(--color-text-primary);
    background: var(--color-bg-elevated);
    border: 1px solid var(--color-border);
}

.btn--secondary:hover {
    background: var(--color-bg-hover);
    border-color: var(--color-border-hover);
}

.btn--ghost {
    color: var(--color-text-secondary);
    background: transparent;
}

.btn--ghost:hover {
    color: var(--color-text-primary);
    background: var(--color-bg-hover);
}

.btn--lg {
    padding: var(--space-4) var(--space-8);
    font-size: var(--text-base);
}

.btn--sm {
    padding: var(--space-2) var(--space-4);
    font-size: var(--text-xs);
}

.btn--icon {
    padding: var(--space-3);
}

.btn--full {
    width: 100%;
}

/* --------------------------------------------------------------------------
   Tool Cards (Homepage)
   -------------------------------------------------------------------------- */
.tools-section {
    position: relative;
}

.section-header {
    text-align: center;
    margin-bottom: var(--space-12);
}

/* Page Header Override for Single Post */
.page-header.section--sm {
    padding-bottom: 0 !important;
}

/* Author Pill Component */
.author-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-6);
    color: var(--color-text-muted);
    font-size: var(--text-sm);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 9999px;
    padding: var(--space-2) var(--space-6);
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.author-pill__avatar img {
    border-radius: 9999px;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.1);
}

.author-pill__divider {
    width: 1px;
    height: 16px;
    background: rgba(255, 255, 255, 0.1);
}


.section-header__title {
    font-size: var(--text-3xl);
    margin-bottom: var(--space-4);
}

.section-header__subtitle {
    font-size: var(--text-lg);
    color: var(--color-text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* Category Grid */
.category-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: var(--space-6);
    margin-bottom: var(--space-16);
}

@media (min-width: 640px) {
    .category-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.category-card {
    position: relative;
    padding: var(--space-8);
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    text-align: center;
    transition: all var(--transition-base);
    overflow: hidden;
}

.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--color-accent), var(--color-secondary));
    opacity: 0;
    transition: opacity var(--transition-base);
}

.category-card:hover {
    border-color: var(--color-border-hover);
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.category-card:hover::before {
    opacity: 1;
}

.category-card__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    margin-bottom: var(--space-4);
    background: var(--color-accent-glow);
    border-radius: var(--radius-lg);
}

.category-card__icon svg {
    width: 32px;
    height: 32px;
    color: var(--color-accent-light);
}

.category-card__title {
    font-size: var(--text-xl);
    margin-bottom: var(--space-2);
}

.category-card__count {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
}

/* Tool Grid */
.tool-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: var(--space-4);
}

@media (min-width: 640px) {
    .tool-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .tool-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.tool-card {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: var(--space-6);
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    transition: all var(--transition-base);
}

.tool-card:hover {
    border-color: rgba(var(--color-accent-rgb), 0.3);
    box-shadow: var(--shadow-glow);
    transform: translateY(-2px);
}

.tool-card__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    margin-bottom: var(--space-4);
    background: var(--color-bg-tertiary);
    border-radius: var(--radius-lg);
    color: var(--color-accent-light);
}

.tool-card__icon svg {
    width: 24px;
    height: 24px;
}

.tool-card__title {
    font-size: var(--text-lg);
    font-weight: 600;
    margin-bottom: var(--space-2);
}

.tool-card__desc {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    flex-grow: 1;
    margin-bottom: var(--space-4);
}

.tool-card__link {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--color-accent-light);
}

.tool-card__link svg {
    width: 16px;
    height: 16px;
    transition: transform var(--transition-fast);
}

.tool-card:hover .tool-card__link svg {
    transform: translateX(4px);
}

.tool-card__action {
    margin-top: auto;
    width: 100%;
}

/* --------------------------------------------------------------------------
   Tool Page Layout
   -------------------------------------------------------------------------- */
.tool-page {
    min-height: calc(100vh - var(--header-height));
}

.tool-header {
    padding: var(--space-12) 0 var(--space-8);
    text-align: center;
    border-bottom: 1px solid var(--color-border);
}

.tool-header__title {
    font-size: var(--text-3xl);
    margin-bottom: var(--space-3);
}

@media (min-width: 768px) {
    .tool-header__title {
        font-size: var(--text-4xl);
    }
}

.tool-header__desc {
    font-size: var(--text-lg);
    color: var(--color-text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* Tool Container */
.tool-container {
    max-width: 800px;
    margin: 0 auto;
    padding: var(--space-8) var(--space-6);
}

/* Tool Card (main tool UI) */
.tool-ui {
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    padding: var(--space-6);
}

@media (min-width: 768px) {
    .tool-ui {
        padding: var(--space-8);
    }
}

/* --------------------------------------------------------------------------
   Upload Zone
   -------------------------------------------------------------------------- */
.upload-zone {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 240px;
    padding: var(--space-8);
    background: var(--color-bg-tertiary);
    border: 2px dashed var(--color-border);
    border-radius: var(--radius-xl);
    cursor: pointer;
    transition: all var(--transition-base);
}

.upload-zone:hover {
    border-color: var(--color-accent);
    background: var(--color-accent-glow);
}

.upload-zone.is-dragover {
    border-color: var(--color-accent);
    background: var(--color-accent-glow);
    transform: scale(1.01);
}

.upload-zone__icon {
    width: 64px;
    height: 64px;
    margin-bottom: var(--space-4);
    color: var(--color-text-muted);
    transition: color var(--transition-fast);
}

.upload-zone:hover .upload-zone__icon {
    color: var(--color-accent-light);
}

.upload-zone__text {
    font-size: var(--text-lg);
    font-weight: 500;
    color: var(--color-text-secondary);
    margin-bottom: var(--space-2);
}

.upload-zone__hint {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
}

.upload-zone input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

/* Image Preview */
.image-preview {
    position: relative;
    border-radius: var(--radius-xl);
    overflow: hidden;
    background: var(--color-bg-tertiary);
}

.image-preview img {
    width: 100%;
    max-height: 400px;
    object-fit: contain;
}

.image-preview__actions {
    position: absolute;
    top: var(--space-4);
    right: var(--space-4);
    display: flex;
    gap: var(--space-2);
}

/* --------------------------------------------------------------------------
   Results Panel
   -------------------------------------------------------------------------- */
.results-panel {
    margin-top: var(--space-6);
    padding: var(--space-6);
    background: var(--color-bg-tertiary);
    border-radius: var(--radius-xl);
}

.results-panel__title {
    font-size: var(--text-sm);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-muted);
    margin-bottom: var(--space-4);
}

/* Result Row */
.result-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-4);
    background: var(--color-bg-secondary);
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-3);
}

.result-row:last-child {
    margin-bottom: 0;
}

.result-row__label {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
}

.result-row__value {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    font-size: var(--text-lg);
    font-weight: 600;
    font-family: var(--font-mono);
}

.result-row__copy {
    padding: var(--space-2);
    color: var(--color-text-muted);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.result-row__copy:hover {
    color: var(--color-text-primary);
    background: var(--color-bg-hover);
}

/* Large Value Display */
.result-large {
    text-align: center;
    padding: var(--space-6);
}

.result-large__value {
    font-size: var(--text-5xl);
    font-weight: 700;
    font-family: var(--font-mono);
    background: linear-gradient(135deg, var(--color-accent-light), var(--color-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.result-large__label {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    margin-top: var(--space-2);
}

/* --------------------------------------------------------------------------
   Platform Suggestions
   -------------------------------------------------------------------------- */
.platform-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-3);
    margin-top: var(--space-6);
}

@media (min-width: 640px) {
    .platform-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.platform-card {
    padding: var(--space-4);
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    text-align: center;
    transition: all var(--transition-fast);
}

.platform-card.is-match {
    border-color: var(--color-success);
    background: var(--color-success-bg);
}

.platform-card__name {
    font-size: var(--text-sm);
    font-weight: 600;
    margin-bottom: var(--space-1);
}

.platform-card__size {
    font-size: var(--text-xs);
    color: var(--color-text-muted);
    font-family: var(--font-mono);
}

.platform-card__match {
    font-size: var(--text-xs);
    color: var(--color-success);
    margin-top: var(--space-2);
}

/* --------------------------------------------------------------------------
   Text Areas
   -------------------------------------------------------------------------- */
.textarea-wrapper {
    position: relative;
}

.textarea-wrapper label {
    display: block;
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--color-text-secondary);
    margin-bottom: var(--space-2);
}

textarea,
.input-text {
    width: 100%;
    padding: var(--space-4);
    font-family: var(--font-mono);
    font-size: var(--text-sm);
    color: var(--color-text-primary);
    background: var(--color-bg-tertiary);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    resize: vertical;
    transition: all var(--transition-fast);
}

textarea:focus,
.input-text:focus {
    outline: none;
    border-color: var(--color-border-focus);
    box-shadow: 0 0 0 3px rgba(var(--color-accent-rgb), 0.1);
}

textarea::placeholder,
.input-text::placeholder {
    color: var(--color-text-disabled);
}

.textarea-info {
    display: flex;
    justify-content: space-between;
    margin-top: var(--space-2);
    font-size: var(--text-xs);
    color: var(--color-text-muted);
}

/* --------------------------------------------------------------------------
   Option Toggles
   -------------------------------------------------------------------------- */
.options-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-3);
    margin-bottom: var(--space-6);
}

@media (min-width: 640px) {
    .options-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.option-toggle {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    background: var(--color-bg-tertiary);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.option-toggle:hover {
    border-color: var(--color-border-hover);
}

.option-toggle input {
    width: 18px;
    height: 18px;
    accent-color: var(--color-accent);
}

.option-toggle span {
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
}

/* --------------------------------------------------------------------------
   Case Buttons
   -------------------------------------------------------------------------- */
.case-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-3);
    margin: var(--space-6) 0;
}

@media (min-width: 640px) {
    .case-buttons {
        grid-template-columns: repeat(4, 1fr);
    }
}

.case-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: var(--space-4);
    background: var(--color-bg-tertiary);
    border: 2px solid var(--color-border);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.case-btn:hover {
    border-color: var(--color-accent);
}

.case-btn.is-active {
    border-color: var(--color-accent);
    background: var(--color-accent-glow);
}

.case-btn__example {
    font-size: var(--text-lg);
    font-weight: 600;
    margin-bottom: var(--space-2);
}

.case-btn__name {
    font-size: var(--text-xs);
    color: var(--color-text-muted);
}

/* --------------------------------------------------------------------------
   Color Swatches
   -------------------------------------------------------------------------- */
.color-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: var(--space-4);
}

@media (min-width: 640px) {
    .color-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

.color-swatch {
    display: flex;
    flex-direction: column;
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.color-swatch__preview {
    height: 80px;
}

.color-swatch__info {
    padding: var(--space-3);
}

.color-swatch__hex {
    font-size: var(--text-sm);
    font-weight: 600;
    font-family: var(--font-mono);
}

.color-swatch__rgb {
    font-size: var(--text-xs);
    color: var(--color-text-muted);
    margin-top: var(--space-1);
}

.color-swatch__actions {
    display: flex;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-3) var(--space-3);
}

.color-swatch__actions button {
    flex: 1;
    padding: var(--space-2);
    font-size: var(--text-xs);
    color: var(--color-text-muted);
    background: var(--color-bg-tertiary);
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.color-swatch__actions button:hover {
    color: var(--color-text-primary);
    background: var(--color-bg-hover);
}

/* --------------------------------------------------------------------------
   Word Results
   -------------------------------------------------------------------------- */
.word-results {
    margin-top: var(--space-6);
}

.word-results__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-4);
}

.word-results__count {
    font-size: var(--text-lg);
    font-weight: 600;
}

.word-grid {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
}

.word-item {
    padding: var(--space-2) var(--space-4);
    font-family: var(--font-mono);
    font-size: var(--text-sm);
    background: var(--color-bg-tertiary);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.word-item:hover {
    background: var(--color-accent);
    color: white;
}

/* --------------------------------------------------------------------------
   Frequency Chart
   -------------------------------------------------------------------------- */
.frequency-chart {
    margin-top: var(--space-6);
}

.chart-bar {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin-bottom: var(--space-2);
}

.chart-bar__letter {
    width: 24px;
    font-family: var(--font-mono);
    font-weight: 600;
    font-size: var(--text-lg);
    text-transform: uppercase;
    text-align: center;
}

.chart-bar__fill-wrapper {
    flex: 1;
    height: 24px;
    background: var(--color-bg-tertiary);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.chart-bar__fill {
    height: 100%;
    background: linear-gradient(90deg, var(--color-accent), var(--color-secondary));
    border-radius: var(--radius-sm);
    transition: width 0.5s ease;
}

.chart-bar__count {
    width: 48px;
    font-family: var(--font-mono);
    font-size: var(--text-sm);
    text-align: right;
    color: var(--color-text-secondary);
}

.chart-bar__percent {
    width: 48px;
    font-size: var(--text-sm);
    text-align: right;
    color: var(--color-text-muted);
}

/* --------------------------------------------------------------------------
   Stats Grid
   -------------------------------------------------------------------------- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-4);
    margin: var(--space-6) 0;
}

@media (min-width: 640px) {
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.stat-card {
    padding: var(--space-5);
    background: var(--color-bg-tertiary);
    border-radius: var(--radius-lg);
    text-align: center;
}

.stat-card__value {
    font-size: var(--text-2xl);
    font-weight: 700;
    color: var(--color-accent-light);
    font-family: var(--font-mono);
}

.stat-card__label {
    font-size: var(--text-xs);
    color: var(--color-text-muted);
    margin-top: var(--space-1);
}

/* --------------------------------------------------------------------------
   Related Tools
   -------------------------------------------------------------------------- */
.related-tools {
    margin-top: var(--space-16);
    padding-top: var(--space-12);
    border-top: 1px solid var(--color-border);
    clear: both;
    /* Fix layout shifting */
    width: 100%;
}

.related-tools-wrapper {
    clear: both;
    width: 100%;
    margin-top: var(--space-12);
}

.related-tools__title {
    font-size: var(--text-xl);
    margin-bottom: var(--space-6);
    text-align: center;
}

/* --------------------------------------------------------------------------
   Blog Cards
   -------------------------------------------------------------------------- */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: var(--space-6);
    width: 100%;
}

@media (min-width: 768px) {
    .blog-grid {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

.blog-card {
    display: flex;
    flex-direction: column;
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    overflow: hidden;
    transition: all var(--transition-base);
}

.blog-card:hover {
    border-color: var(--color-border-hover);
    box-shadow: var(--shadow-lg);
}

.blog-card__image {
    aspect-ratio: 16/9;
    overflow: hidden;
}

.blog-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.blog-card:hover .blog-card__image img {
    transform: scale(1.05);
}

.blog-card__content {
    flex: 1;
    padding: var(--space-5);
}

.blog-card__meta {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    font-size: var(--text-xs);
    color: var(--color-text-muted);
    margin-bottom: var(--space-3);
}

.blog-card__category {
    padding: var(--space-1) var(--space-2);
    background: var(--color-accent-glow);
    color: var(--color-accent-light);
    border-radius: var(--radius-sm);
    font-weight: 500;
}

.blog-card__title {
    font-size: var(--text-lg);
    font-weight: 600;
    margin-bottom: var(--space-2);
    line-height: var(--leading-tight);
}

.blog-card__excerpt {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    line-height: var(--leading-relaxed);
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.site-footer {
    padding: var(--space-16) 0 var(--space-8);
    background: var(--color-bg-secondary);
    border-top: 1px solid var(--color-border);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: var(--space-10);
    margin-bottom: var(--space-12);
}

@media (min-width: 768px) {
    .footer-grid {
        grid-template-columns: 2fr repeat(3, 1fr);
    }
}

.footer-brand {
    max-width: 300px;
}

.footer-brand__logo {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    font-size: var(--text-xl);
    font-weight: 700;
    margin-bottom: var(--space-4);
}

.footer-brand__desc {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    line-height: var(--leading-relaxed);
}

.footer-column__title {
    font-size: var(--text-sm);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-secondary);
    margin-bottom: var(--space-4);
}

.footer-column a {
    display: block;
    padding: var(--space-2) 0;
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    transition: color var(--transition-fast);
}

.footer-column a:hover {
    color: var(--color-text-primary);
}

.footer-bottom {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
    padding-top: var(--space-8);
    border-top: 1px solid var(--color-border);
}

@media (min-width: 768px) {
    .footer-bottom {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
}

.footer-bottom__copy {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
}

.footer-social {
    display: flex;
    gap: var(--space-2);
}

.footer-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    color: var(--color-text-muted);
    background: var(--color-bg-tertiary);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.footer-social a:hover {
    color: var(--color-text-primary);
    background: var(--color-bg-hover);
}

.footer-social svg {
    width: 20px;
    height: 20px;
}

/* --------------------------------------------------------------------------
   404 Page
   -------------------------------------------------------------------------- */
.error-page {
    min-height: calc(100vh - var(--header-height));
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: var(--space-8);
}

.error-page__code {
    font-size: 120px;
    font-weight: 800;
    line-height: 1;
    background: linear-gradient(135deg, var(--color-accent-light), var(--color-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.error-page__title {
    font-size: var(--text-2xl);
    margin: var(--space-4) 0;
}

.error-page__desc {
    color: var(--color-text-muted);
    margin-bottom: var(--space-8);
    max-width: 400px;
}

/* --------------------------------------------------------------------------
   Results Panel (Premium Polish)
   -------------------------------------------------------------------------- */
.results-panel {
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    padding: var(--space-6);
    margin-top: var(--space-8);
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

.results-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--color-accent), var(--color-secondary));
}

.results-panel__title {
    font-size: var(--text-lg);
    font-weight: 600;
    margin-bottom: var(--space-4);
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.result-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-3) 0;
    border-bottom: 1px solid var(--color-border);
}

.result-row:last-child {
    border-bottom: none;
}

.result-row__label {
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
}

.result-row__value {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    font-family: var(--font-mono);
    font-size: var(--text-base);
    font-weight: 500;
    color: var(--color-text-primary);
}

/* --------------------------------------------------------------------------
   Tool Page Polish (Phase 17)
   -------------------------------------------------------------------------- */
.tool-section {
    margin-bottom: var(--space-12);
}

.tool-input-card {
    padding: var(--space-8);
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    /* 16px or larger from variables */
    box-shadow: var(--shadow-lg);
    margin-bottom: var(--space-12);
}

.tool-result-card {
    padding: var(--space-8);
    background: rgba(255, 255, 255, 0.03);
    /* Slightly pronounced */
    border: 1px solid var(--color-accent);
    /* Highlight border */
    border-radius: var(--radius-xl);
    box-shadow: 0 0 0 1px var(--color-accent), var(--shadow-xl);
    /* Glow effect */
    position: relative;
    overflow: hidden;
    /* Hidden by default until results exist - handled by JS usually, but here we style the container */
    /* Hidden by default until results exist - handled by JS usually, but here we style the container */
    margin-top: var(--space-6);
    /* Reduced from space-12 */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

/* Make labels and inputs premium */
.tool-input-label {
    display: block;
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--color-text-primary);
    margin-bottom: var(--space-3);
    letter-spacing: 0.02em;
}

.tool-form-group {
    margin-bottom: var(--space-6);
}

.tool-form-group:last-child {
    margin-bottom: 0;
}

/* Enhanced Button Styles for Tools */
.btn--tool-action {
    height: 48px;
    padding: 0 var(--space-8);
    font-size: var(--text-base);
    font-weight: 600;
    letter-spacing: 0.02em;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn--tool-action:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

.result-value-highlight {
    font-family: var(--font-mono);
    font-size: var(--text-2xl);
    font-weight: 700;
    color: var(--color-accent-light);
    margin: var(--space-2) 0;
}

/* Copy Button Polish */
.result-row__copy {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    padding: var(--space-1) var(--space-3);
    font-size: var(--text-xs);
    font-weight: 500;
    color: var(--color-text-muted);
    background: var(--color-bg-tertiary);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.result-row__copy:hover {
    color: var(--color-accent-light);
    border-color: var(--color-accent);
    background: var(--color-accent-glow);
    transform: translateY(-1px);
}

.result-row__copy svg {
    width: 14px;
    height: 14px;
}

/* --------------------------------------------------------------------------
   Typography (Prose)
   -------------------------------------------------------------------------- */
.prose {
    max-width: 65ch;
    margin: 0 auto;
    font-size: var(--text-base);
    line-height: var(--leading-relaxed);
    color: var(--color-text-secondary);
}

.prose h2 {
    font-size: var(--text-2xl);
    font-weight: 700;
    color: var(--color-text-primary);
    margin-top: var(--space-12);
    margin-bottom: var(--space-4);
}

.prose h3 {
    font-size: var(--text-xl);
    font-weight: 600;
    color: var(--color-text-primary);
    margin-top: var(--space-8);
    margin-bottom: var(--space-3);
}

.prose p {
    margin-bottom: var(--space-6);
}

.prose ul,
.prose ol {
    margin-bottom: var(--space-6);
    padding-left: var(--space-6);
}

.prose li {
    margin-bottom: var(--space-2);
}

.prose strong {
    color: var(--color-text-primary);
    font-weight: 600;
}

.prose a {
    color: var(--color-accent-light);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
}

.prose a:hover {
    color: var(--color-accent);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.text-center {
    text-align: center;
}

.text-muted {
    color: var(--color-text-muted);
}

/* Margins */
.mt-4 {
    margin-top: var(--space-4);
}

.mt-6 {
    margin-top: var(--space-6);
}

.mt-8 {
    margin-top: var(--space-8);
}

.mb-4 {
    margin-bottom: var(--space-4);
}

.mb-6 {
    margin-bottom: var(--space-6);
}

.mb-8 {
    margin-bottom: var(--space-8);
}

/* --------------------------------------------------------------------------
   Utilities
   -------------------------------------------------------------------------- */
.text-primary {
    color: var(--color-text-primary);
}

.text-muted {
    color: var(--color-text-muted);
}

.font-semibold {
    font-weight: 600;
}

.pt-0 {
    padding-top: 0 !important;
}

.mb-0 {
    margin-bottom: 0 !important;
}

.mb-6 {
    margin-bottom: var(--space-6);
}

/* Ensure Author Name is Visible */
.author-pill .text-primary {
    color: var(--color-text-primary) !important;
}

/* --------------------------------------------------------------------------
   Animations
   -------------------------------------------------------------------------- */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

.animate-fade-in {
    animation: fadeIn 0.5s ease;
}

.animate-slide-up {
    animation: slideUp 0.5s ease;
}

/* Loading State */
.is-loading {
    position: relative;
    pointer-events: none;
}

.is-loading::after {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--color-bg-secondary);
    border-radius: inherit;
    animation: pulse 1.5s infinite;
}

/* --------------------------------------------------------------------------
   Info Box (Notices)
   -------------------------------------------------------------------------- */
.info-box {
    display: flex;
    gap: var(--space-4);
    padding: var(--space-4);
    background: var(--color-accent-glow);
    border: 1px solid rgba(var(--color-accent-rgb), 0.2);
    border-radius: var(--radius-lg);
    margin-top: var(--space-4);
}

.info-box svg {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    color: var(--color-accent-light);
}

.info-box p {
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
    line-height: var(--leading-relaxed);
}

/* --------------------------------------------------------------------------
   Page Content (Prose)
   -------------------------------------------------------------------------- */
.page-content {
    font-size: var(--text-base);
    line-height: var(--leading-relaxed);
    color: var(--color-text-secondary);
}

.page-content h2 {
    font-size: var(--text-2xl);
    margin-top: var(--space-10);
    margin-bottom: var(--space-4);
    color: var(--color-text-primary);
}

.page-content h3 {
    font-size: var(--text-xl);
    margin-top: var(--space-8);
    margin-bottom: var(--space-3);
    color: var(--color-text-primary);
}

.page-content p {
    margin-bottom: var(--space-4);
}

.page-content ul,
.page-content ol {
    margin-bottom: var(--space-4);
    padding-left: var(--space-6);
}

.page-content li {
    margin-bottom: var(--space-2);
}

.page-content a {
    color: var(--color-accent-light);
    text-decoration: underline;
}

.page-content a:hover {
    color: var(--color-accent);
}

.page-content blockquote {
    padding-left: var(--space-6);
    margin: var(--space-6) 0;
    border-left: 3px solid var(--color-accent);
    font-style: italic;
    color: var(--color-text-muted);
}

.page-content code {
    font-family: var(--font-mono);
    font-size: 0.875em;
    padding: var(--space-1) var(--space-2);
    background: var(--color-bg-tertiary);
    border-radius: var(--radius-sm);
}

.page-content pre {
    padding: var(--space-4);
    background: var(--color-bg-tertiary);
    border-radius: var(--radius-lg);
    overflow-x: auto;
    margin-bottom: var(--space-4);
}

.page-content pre code {
    padding: 0;
    background: transparent;
}

.page-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-lg);
    margin: var(--space-6) 0;
}

/* --------------------------------------------------------------------------
   Pagination
   -------------------------------------------------------------------------- */
.nav-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--space-2);
    flex-wrap: wrap;
}

.nav-links a,
.nav-links span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 var(--space-3);
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.nav-links a:hover {
    color: var(--color-text-primary);
    border-color: var(--color-border-hover);
}

.nav-links .current {
    color: white;
    background: var(--color-accent);
    border-color: var(--color-accent);
}

/* --------------------------------------------------------------------------
   How It Works Section
   -------------------------------------------------------------------------- */
.how-it-works {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: var(--space-8);
}

@media (min-width: 768px) {
    .how-it-works {
        grid-template-columns: repeat(3, 1fr);
    }
}

.how-step {
    text-align: center;
}

.how-step__number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    font-size: var(--text-xl);
    font-weight: 700;
    color: var(--color-accent-light);
    background: var(--color-accent-glow);
    border-radius: var(--radius-full);
    margin-bottom: var(--space-4);
}

.how-step__title {
    font-size: var(--text-lg);
    font-weight: 600;
    margin-bottom: var(--space-2);
}

.how-step__desc {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
}

/* --------------------------------------------------------------------------
   Print Styles
   -------------------------------------------------------------------------- */
@media print {

    .site-header,
    .site-footer,
    .upload-zone,
    .btn {
        display: none !important;
    }

    body {
        background: white;
        color: black;
    }
}

/* --------------------------------------------------------------------------
   Utilities (Tailwind-like)
   -------------------------------------------------------------------------- */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hover\:-translate-y-1:hover {
    transform: translateY(-4px);
}

.transition-transform {
    transition-property: transform;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

.block {
    display: block;
}

.p-4 {
    padding: var(--space-4);
}

/* ==========================================================================
   Phase 20: UI Polish & Fixes Overrides
   ========================================================================== */

/* Tool Spacing & Visuals */
.tool-input-card {
    margin-bottom: var(--space-6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.tool-result-card {
    margin-top: var(--space-6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

/* Category Page Polish */
.tool-card {
    text-decoration: none !important;
}

.tool-card:hover {
    text-decoration: none;
}

.page-container {
    padding-top: var(--space-8);
    position: relative;
    z-index: 10;
}

/* Related Tools Wrapper */
.related-tools-wrapper {
    clear: both;
    width: 100%;
    margin-top: var(--space-12);
    display: flow-root;
    /* Modern clearfix */
}

/* Related Posts (Single Page) */
.related-card {
    display: flex;
    flex-direction: column;
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all var(--transition-base);
    height: 100%;
}

.related-card:hover {
    border-color: var(--color-border-hover);
    transform: translateY(-2px);
}

.related-card__image {
    display: block;
    aspect-ratio: 3/2;
    overflow: hidden;
    background: var(--color-bg-tertiary);
}

.related-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.related-card:hover .related-card__image img {
    transform: scale(1.05);
}

.related-card__content {
    padding: var(--space-4);
    flex: 1;
    display: flex;
    flex-direction: column;
}

.related-card__title {
    font-size: var(--text-base);
    font-weight: 600;
    margin-bottom: var(--space-2);
    line-height: var(--leading-tight);
}

.related-card__meta {
    font-size: var(--text-xs);
    color: var(--color-text-muted);
    margin-top: auto;
}

/* --------------------------------------------------------------------------
   Utilities
   -------------------------------------------------------------------------- */
.text-primary {
    color: var(--color-text-primary);
}

.text-muted {
    color: var(--color-text-muted);
}

.font-semibold {
    font-weight: 600;
}

.pt-0 {
    padding-top: 0 !important;
}

.mb-0 {
    margin-bottom: 0 !important;
}

.mb-6 {
    margin-bottom: var(--space-6);
}

/* Ensure Author Name is Visible */
.author-pill .text-primary {
    color: var(--color-text-primary) !important;
}