* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #0a0b1e;
    --bg-secondary: #161834;
    --bg-card: #1e2044;
    --text-primary: #f3f4ff;
    --text-secondary: #a6adcf;
    --accent: #6366f1;
    --accent-hover: #585cf0;
    --border: #2c2e58;
    /* Design v4 tokens */
    --accent-2: #22d3ee;
    --accent-3: #a78bfa;
    --gold: #fbbf24;
    --hairline: rgba(255, 255, 255, 0.08);
    --grad-brand: linear-gradient(135deg, #6366f1 0%, #7c3aed 55%, #06b6d4 130%);
    --shadow-card: 0 12px 32px -14px rgba(5, 6, 20, 0.6);
    --glow-accent: 0 10px 30px -10px rgba(99, 102, 241, 0.55);
    --radius-card: 16px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
        'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
        sans-serif;
    background: linear-gradient(180deg, var(--bg-primary) 0%, #07081a 45%, #050610 100%);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.header {
    background: rgba(15, 16, 38, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
    background: linear-gradient(135deg, #6366f1 0%, #06b6d4 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo-accent {
    background: linear-gradient(135deg, #06b6d4 0%, #34d399 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav {
    display: flex;
    gap: 1.5rem;
}

.nav a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.nav a:hover {
    color: var(--text-primary);
}

.hero {
    padding: 5.5rem 0 4rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* Soft glow behind the hero so the gradient text has something to sit on. */
.hero::before {
    content: '';
    position: absolute;
    top: -40%;
    left: 50%;
    transform: translateX(-50%);
    width: 820px;
    height: 820px;
    max-width: 130vw;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.26) 0%, rgba(6, 182, 212, 0.12) 45%, transparent 70%);
    pointer-events: none;
    z-index: -1;
}

/* Decorative tool chips drifting around the hero. Hidden on small screens. */
.hero-orbits {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: -1;
}

.orbit-chip {
    position: absolute;
    left: var(--x);
    top: var(--y);
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    background: rgba(37, 39, 64, 0.7);
    border: 1px solid var(--border);
    border-radius: 14px;
    backdrop-filter: blur(6px);
    animation: chip-float 6s ease-in-out infinite;
    animation-delay: var(--d, 0s);
    opacity: 0.85;
}

@keyframes chip-float {
    0%, 100% { transform: translateY(0) rotate(-2deg); }
    50% { transform: translateY(-14px) rotate(2deg); }
}

@media (max-width: 960px) {
    .hero-orbits { display: none; }
}

.hero-badge {
    display: inline-block;
    background: rgba(99, 102, 241, 0.12);
    border: 1px solid rgba(99, 102, 241, 0.4);
    color: #a5a6fb;
    border-radius: 999px;
    padding: 0.375rem 1rem;
    font-size: 0.8125rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
}

.hero h1 {
    font-size: clamp(2.5rem, 6vw, 3.75rem);
    font-weight: 800;
    line-height: 1.12;
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
    background: linear-gradient(130deg, #ffffff 0%, #c7d2fe 30%, #67e8f9 55%, #ffffff 85%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: headline-shimmer 9s ease infinite;
}

@keyframes headline-shimmer {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.hero-sub {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 640px;
    margin: 0 auto 2rem;
}

.hero-actions {
    display: flex;
    gap: 0.875rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-lg {
    padding: 0.8125rem 1.75rem;
    font-size: 1rem;
    text-decoration: none;
    display: inline-block;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* Anchor jumps must clear the sticky header. */
#tools,
#guides,
.review-card {
    scroll-margin-top: 5rem;
}

html {
    scroll-behavior: smooth;
}

.features {
    padding: 0 0 1rem;
}

.feature-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.25rem;
}

.feature {
    display: flex;
    gap: 0.875rem;
    align-items: flex-start;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1.125rem 1.25rem;
}

.feature-icon {
    font-size: 1.5rem;
    line-height: 1;
    flex-shrink: 0;
}

.feature h3 {
    font-size: 0.9375rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.feature p {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.section-head {
    margin-bottom: 1.5rem;
}

.section-head p {
    color: var(--text-secondary);
    margin-top: 0.375rem;
}

.tool-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.18) 0%, rgba(6, 182, 212, 0.12) 100%);
    border: 1px solid rgba(99, 102, 241, 0.28);
    font-size: 1.375rem;
    margin-bottom: 0.875rem;
}

.tool-card h3 {
    transition: color 0.2s;
}

.tool-card:hover h3 {
    color: #a5a6fb;
}

.tools {
    padding: 2rem 0 3rem;
}

.tools h2 {
    font-size: 1.875rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.tool-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
}

.tool-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.25rem;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.2s;
    display: block;
}

.tool-card:hover {
    border-color: var(--accent);
    background: #2d2f52;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
}

.tool-card h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.375rem;
    color: var(--text-primary);
}

.tool-card p {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.footer {
    border-top: 1px solid var(--border);
    padding: 3rem 0 1.5rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-top: 2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 2rem;
    padding-bottom: 2rem;
}

.footer-logo {
    font-size: 1.25rem;
}

.footer-tag {
    margin-top: 0.75rem;
    font-size: 0.8125rem;
    color: var(--text-secondary);
    max-width: 260px;
    line-height: 1.6;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

.footer-links h4 {
    color: var(--text-primary);
    font-size: 0.8125rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.25rem;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.8125rem;
    transition: color 0.2s;
}

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

.footer-copy {
    border-top: 1px solid var(--border);
    padding-top: 1.5rem;
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

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

/* ============ Design v2 ============ */

/* Ambient mesh: two fixed color washes so the page background has depth. */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(640px 420px at 85% -8%, rgba(99, 102, 241, 0.14), transparent 65%),
        radial-gradient(560px 380px at -8% 35%, rgba(6, 182, 212, 0.10), transparent 65%);
    pointer-events: none;
    z-index: -1;
}

/* Primary buttons: gradient fill with a glow that lifts on hover. */
.btn {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.30);
    transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 26px rgba(99, 102, 241, 0.45);
    background: linear-gradient(135deg, #6f75f5 0%, #564ee8 100%);
}

.btn-secondary {
    background: var(--bg-secondary);
    box-shadow: none;
}

.btn-secondary:hover {
    background: var(--bg-card);
    box-shadow: 0 8px 26px rgba(0, 0, 0, 0.35);
}

/* Section headings get a gradient rule underneath. */
.section-head h2 {
    font-size: clamp(1.5rem, 3vw, 1.875rem);
    font-weight: 700;
    letter-spacing: -0.01em;
}

.section-head h2::after {
    content: '';
    display: block;
    width: 56px;
    height: 4px;
    border-radius: 2px;
    background: linear-gradient(90deg, #6366f1, #06b6d4);
    margin-top: 0.625rem;
}

/* Cards: gradient wash + arrow on hover. */
.tool-card {
    position: relative;
    overflow: hidden;
    border-radius: 14px;
    padding: 1.5rem;
    transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
}

.tool-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.14) 0%, rgba(6, 182, 212, 0.08) 100%);
    opacity: 0;
    transition: opacity 0.25s;
    pointer-events: none;
}

.tool-card:hover {
    transform: translateY(-4px);
    border-color: rgba(99, 102, 241, 0.55);
    box-shadow: 0 10px 32px rgba(99, 102, 241, 0.22);
}

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

.card-arrow {
    position: absolute;
    top: 1.125rem;
    right: 1.125rem;
    color: #a5a6fb;
    font-size: 1.125rem;
    line-height: 1;
    opacity: 0;
    transform: translate(-5px, 5px);
    transition: opacity 0.25s, transform 0.25s;
}

.tool-card:hover .card-arrow {
    opacity: 1;
    transform: translate(0, 0);
}

/* Guide cards read as editorial, not tools: purple wash + uppercase meta. */
.guide-card {
    background: linear-gradient(180deg, rgba(99, 102, 241, 0.12) 0%, var(--bg-card) 60%);
    border-color: rgba(99, 102, 241, 0.30);
}

.card-meta {
    display: block;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #8b8cf8;
    margin-bottom: 0.625rem;
}

/* Search + category chips above the tool grid. */
.filter-bar {
    display: flex;
    gap: 0.875rem;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.filter-search {
    flex: 1 1 260px;
    max-width: 360px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0.625rem 1rem;
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    font-size: 0.9375rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.filter-search:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.filter-search::placeholder {
    color: var(--text-secondary);
}

.filter-chips {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.chip {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    border-radius: 999px;
    padding: 0.5rem 1rem;
    font-size: 0.8125rem;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: all 0.2s;
}

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

.chip.active {
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    border-color: transparent;
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
}

.filter-empty {
    display: none;
    text-align: center;
    color: var(--text-secondary);
    padding: 3rem 1rem;
    border: 1px dashed var(--border);
    border-radius: 14px;
    grid-column: 1 / -1;
}

/* Scroll reveal: only active when JS confirmed it can un-hide. */
.js .reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.55s ease, transform 0.55s ease;
}

.js .reveal.visible {
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: reduce) {
    .js .reveal {
        opacity: 1 !important;
        transform: none !important;
    }
    .hero h1,
    .orbit-chip {
        animation: none !important;
    }
    html {
        scroll-behavior: auto;
    }
}

@media (max-width: 640px) {
    .hero {
        padding: 3.5rem 0 2.5rem;
    }
    .tool-card {
        padding: 1.25rem;
    }
}

/* Tool page styles */
.tool-page {
    min-height: calc(100vh - 140px);
    padding: 2rem 0 3rem;
}

.tool-page h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.tool-page .description {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.input-group {
    margin-bottom: 1rem;
}

.input-group label {
    display: block;
    margin-bottom: 0.375rem;
    color: var(--text-secondary);
    font-weight: 500;
}

textarea {
    width: 100%;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.75rem;
    color: var(--text-primary);
    font-family: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
    font-size: 0.875rem;
    resize: vertical;
    min-height: 200px;
}

textarea:focus {
    outline: none;
    border-color: var(--accent);
}

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

.button-group {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.btn {
    background: var(--accent);
    color: var(--text-primary);
    border: none;
    padding: 0.625rem 1.25rem;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
    font-family: 'Inter', sans-serif;
}

.btn:hover {
    background: var(--accent-hover);
}

.btn-secondary {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--bg-card);
}

.output {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.75rem;
    min-height: 200px;
    white-space: pre-wrap;
    word-break: break-word;
    color: var(--text-primary);
    font-family: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
    font-size: 0.875rem;
    overflow-x: auto;
}

.error {
    color: #f87171;
    border-color: #dc2626;
    background: rgba(220, 38, 38, 0.1);
}

.success {
    color: #34d399;
    border-color: #059669;
    background: rgba(5, 150, 105, 0.1);
}

.tool-page .related-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 2.5rem 0 1rem;
}

/* Comparison / guide page styles */
.guide {
    padding: 2.5rem 0 3rem;
}

.guide h1 {
    font-size: 2.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    line-height: 1.25;
}

.guide h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 2.5rem 0 1rem;
}

.guide h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.guide p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.guide ul {
    color: var(--text-secondary);
    margin: 0 0 1rem 1.25rem;
}

.guide li {
    margin-bottom: 0.4rem;
}

.guide strong {
    color: var(--text-primary);
}

.guide a {
    color: #8b8cf8;
}

.updated {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    margin-bottom: 1.25rem;
}

.disclosure {
    background: rgba(99, 102, 241, 0.08);
    border: 1px solid var(--border);
    border-left: 3px solid var(--accent);
    border-radius: 6px;
    padding: 0.75rem 1rem;
    font-size: 0.8125rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.tldr {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1rem;
}

.tldr h2 {
    margin-top: 0;
    font-size: 1.125rem;
}

.tldr ul {
    margin-bottom: 0;
}

.table-wrap {
    overflow-x: auto;
    margin-bottom: 1rem;
    border: 1px solid var(--border);
    border-radius: 8px;
}

.compare-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
    min-width: 720px;
}

.compare-table th,
.compare-table td {
    text-align: left;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
}

.compare-table th {
    background: var(--bg-secondary);
    font-weight: 600;
    white-space: nowrap;
}

.compare-table td {
    color: var(--text-secondary);
}

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

.compare-table .tool-name {
    color: var(--text-primary);
    font-weight: 600;
    white-space: nowrap;
}

.pick {
    display: inline-block;
    background: rgba(99, 102, 241, 0.15);
    color: #a5a6fb;
    border-radius: 4px;
    padding: 0.1rem 0.45rem;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.review-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1rem;
}

.review-card.featured {
    border-color: var(--accent);
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.15);
}

.review-card .meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.25rem;
    font-size: 0.8125rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}

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

.verdict {
    border-top: 1px solid var(--border);
    padding-top: 0.75rem;
    margin-top: 0.75rem;
    font-size: 0.875rem;
}

.cta-button {
    display: inline-block;
    background: var(--accent);
    color: #ffffff;
    text-decoration: none;
    padding: 0.625rem 1.25rem;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-top: 0.5rem;
    transition: background 0.2s;
}

.cta-button:hover {
    background: var(--accent-hover);
    color: #ffffff;
}

.cta-button.secondary {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    color: var(--text-primary);
    font-weight: 500;
}

.cta-button.secondary:hover {
    background: var(--bg-card);
}

.cta-note {
    display: block;
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

.big-cta {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.18) 0%, rgba(6, 182, 212, 0.12) 100%);
    border: 1px solid var(--accent);
    border-radius: 8px;
    padding: 1.75rem;
    text-align: center;
    margin: 2.5rem 0 1rem;
}

.big-cta h2 {
    margin-top: 0;
}

.faq dt {
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 0.375rem;
}

.faq dd {
    color: var(--text-secondary);
    margin: 0 0 1.25rem;
}

.fine-print {
    border-top: 1px solid var(--border);
    margin-top: 2.5rem;
    padding-top: 1rem;
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

.related {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 0.75rem;
    margin-top: 1rem;
}

.crumb {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}

/* Ad slots: reserve height before the creative fills so nothing shifts (CLS = 0).
   Hidden entirely until js/ads.js is configured and marks the document ready. */
ins.adsbygoogle {
    display: block;
    min-height: 90px;
    margin: 1.5rem 0;
    text-align: center;
    overflow: hidden;
}

@media (min-width: 768px) {
    ins.adsbygoogle {
        min-height: 120px;
    }
}

@media (max-width: 640px) {
    .guide h1 {
        font-size: 1.75rem;
    }

    .guide h2 {
        font-size: 1.25rem;
    }
}

/* Result counter on the /tools/ search hub. */
.hub-count {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin: -0.5rem 0 1rem;
}

/* ============================================================
   Design v3: styles for the regex, markdown, timestamp, diff
   and contrast tools added in the 19-tool expansion.
   ============================================================ */

/* ---- Regex tester ---- */
.flag-row {
    display: flex;
    gap: 1.25rem;
    flex-wrap: wrap;
    margin: -0.5rem 0 1.25rem;
}

.flag-opt {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
    cursor: pointer;
    user-select: none;
}

.flag-opt input {
    accent-color: var(--accent);
}

.flag-opt code {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 5px;
    padding: 0 0.35rem;
    color: #a5a6fb;
}

.match-count {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.match-count.error {
    color: #f87171;
}

.match-list {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

.match-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
}

.match-num {
    color: var(--text-secondary);
    font-weight: 600;
    margin-right: 0.75rem;
}

.match-value {
    color: #a5a6fb;
    background: var(--bg-secondary);
    border-radius: 5px;
    padding: 0.1rem 0.4rem;
    word-break: break-all;
}

.match-pos {
    color: var(--text-secondary);
    margin-left: 0.75rem;
    font-size: 0.8125rem;
}

.match-group {
    margin-top: 0.35rem;
    padding-left: 1.5rem;
    color: var(--text-secondary);
}

.match-group code {
    color: var(--text-primary);
}

/* ---- Markdown previewer ---- */
.md-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}

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

.md-pane textarea {
    min-height: 420px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.875rem;
}

.md-preview {
    min-height: 420px;
    max-height: 620px;
    overflow-y: auto;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.25rem 1.5rem;
    line-height: 1.6;
}

.md-preview h1 { font-size: 1.6rem; margin: 0.5rem 0 0.75rem; }
.md-preview h2 { font-size: 1.3rem; margin: 0.5rem 0 0.6rem; }
.md-preview h3 { font-size: 1.1rem; margin: 0.5rem 0 0.5rem; }
.md-preview h4, .md-preview h5, .md-preview h6 { font-size: 1rem; margin: 0.5rem 0 0.4rem; }
.md-preview p { margin: 0.5rem 0; }
.md-preview ul, .md-preview ol { margin: 0.5rem 0; padding-left: 1.5rem; }
.md-preview li { margin: 0.25rem 0; }
.md-preview blockquote {
    border-left: 3px solid var(--accent);
    margin: 0.75rem 0;
    padding: 0.25rem 1rem;
    color: var(--text-secondary);
}
.md-preview code {
    background: var(--bg-secondary);
    border-radius: 5px;
    padding: 0.1rem 0.35rem;
    font-size: 0.85em;
}
.md-preview pre {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.875rem 1rem;
    overflow-x: auto;
    margin: 0.75rem 0;
}
.md-preview pre code { background: none; padding: 0; }
.md-preview hr { border: none; border-top: 1px solid var(--border); margin: 1rem 0; }
.md-preview a { color: #a5a6fb; }

/* ---- Timestamp converter ---- */
.result-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.result-row {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0.875rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.result-label {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-secondary);
}

.result-row code {
    color: var(--text-primary);
    font-size: 0.9375rem;
    word-break: break-all;
}

.now-strip {
    display: flex;
    gap: 2.5rem;
    flex-wrap: wrap;
    margin-top: 1.25rem;
    padding: 1rem 1.25rem;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.12), rgba(99, 102, 241, 0.04));
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 12px;
}

.now-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

.now-value {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* ---- Diff checker ---- */
.diff-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}

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

.diff-grid textarea {
    min-height: 260px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.875rem;
}

.diff-summary {
    margin: 1.25rem 0 0.75rem;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-primary);
}

.diff-out {
    max-height: 520px;
    overflow: auto;
    font-size: 0.8125rem;
    line-height: 1.55;
}

.diff-out span {
    display: block;
    white-space: pre-wrap;
    word-break: break-all;
    padding: 0 0.5rem;
}

.diff-add { background: rgba(74, 222, 128, 0.12); color: #86efac; }
.diff-del { background: rgba(248, 113, 113, 0.12); color: #fca5a5; }
.diff-same { color: var(--text-secondary); }

/* ---- Color contrast checker ---- */
.cc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.25rem;
    margin-bottom: 1.75rem;
}

.cc-pick label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.cc-row {
    display: flex;
    gap: 0.625rem;
    align-items: center;
}

.cc-row input[type="color"] {
    width: 46px;
    height: 42px;
    padding: 3px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 9px;
    cursor: pointer;
}

.cc-row input[type="text"] {
    flex: 1;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 9px;
    padding: 0.6rem 0.875rem;
    color: var(--text-primary);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9375rem;
}

.cc-row input[type="text"]:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.cc-ratio-wrap {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.cc-ratio {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #a5a6fb, #818cf8);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    letter-spacing: -0.02em;
}

.cc-badges {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.cc-badge {
    font-size: 0.8125rem;
    font-weight: 600;
    border-radius: 999px;
    padding: 0.35rem 0.875rem;
}

.cc-badge.pass {
    background: rgba(74, 222, 128, 0.14);
    color: #4ade80;
    border: 1px solid rgba(74, 222, 128, 0.35);
}

.cc-badge.fail {
    background: rgba(248, 113, 113, 0.12);
    color: #f87171;
    border: 1px solid rgba(248, 113, 113, 0.3);
}

.cc-preview {
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 1.75rem;
}

.cc-sample-lg {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.cc-sample-sm {
    font-size: 1rem;
    margin: 0;
}

/* ============================================================
   Design v4 - depth, glass and glow.
   Appended last so every rule here wins the cascade over v2/v3.
   ============================================================ */

/* ---- Foundation ---- */
::selection {
    background: rgba(99, 102, 241, 0.45);
    color: #ffffff;
}

* {
    scrollbar-color: #3d4190 #07081a;
    scrollbar-width: thin;
}

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

::-webkit-scrollbar-track {
    background: #07081a;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #3d4190, #2a2c56);
    border-radius: 99px;
    border: 2px solid #07081a;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #6366f1, #4f46e5);
}

/* Aurora washes: three colour pools so the background has real depth. */
body::before {
    background:
        radial-gradient(720px 480px at 88% -10%, rgba(99, 102, 241, 0.20), transparent 65%),
        radial-gradient(620px 420px at -10% 30%, rgba(34, 211, 238, 0.13), transparent 65%),
        radial-gradient(520px 420px at 55% 110%, rgba(167, 139, 250, 0.12), transparent 70%);
}

/* Fading dot grid for texture. Sits behind everything, never intercepts input. */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, 0.055) 1px, transparent 1.3px);
    background-size: 26px 26px;
    -webkit-mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, #000 15%, transparent 78%);
    mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, #000 15%, transparent 78%);
    pointer-events: none;
    z-index: -1;
}

/* ---- Header: frosted glass + gradient hairline ---- */
.header {
    background: rgba(7, 8, 26, 0.72);
    backdrop-filter: blur(16px) saturate(160%);
    -webkit-backdrop-filter: blur(16px) saturate(160%);
}

.header::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.65), rgba(34, 211, 238, 0.45), transparent);
}

.logo {
    letter-spacing: -0.01em;
    filter: drop-shadow(0 0 16px rgba(99, 102, 241, 0.4));
}

.nav a {
    padding: 0.4rem 0.9rem;
    margin: 0 -0.3rem;
    border-radius: 999px;
    transition: color 0.2s, background 0.2s;
}

.nav a:hover {
    background: rgba(255, 255, 255, 0.07);
    color: #ffffff;
}

/* ---- Hero ---- */
.hero {
    padding: 6.5rem 0 4.5rem;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    background: rgba(99, 102, 241, 0.10);
    border: 1px solid rgba(129, 140, 248, 0.45);
    color: #c7cbff;
    box-shadow: 0 0 26px rgba(99, 102, 241, 0.18), inset 0 0 14px rgba(99, 102, 241, 0.10);
}

.hero-badge::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #34d399;
    animation: pulse-dot 2.2s ease-out infinite;
}

@keyframes pulse-dot {
    0% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.55); }
    70% { box-shadow: 0 0 0 9px rgba(52, 211, 153, 0); }
    100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); }
}

.hero h1 {
    font-size: clamp(2.75rem, 7vw, 4.5rem);
    letter-spacing: -0.03em;
    margin-bottom: 1.25rem;
    filter: drop-shadow(0 6px 28px rgba(99, 102, 241, 0.3));
}

.hero-grad {
    background: linear-gradient(120deg, #22d3ee 0%, #818cf8 55%, #a78bfa 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    animation: headline-shimmer 9s ease infinite;
}

.hero-sub {
    font-size: 1.1875rem;
    color: #b9c0e0;
    max-width: 660px;
    line-height: 1.65;
}

.hero-actions {
    gap: 1rem;
}

/* Orbit chips: frosted glass with a soft drop shadow. */
.orbit-chip {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.02));
    border: 1px solid rgba(255, 255, 255, 0.13);
    box-shadow: 0 12px 30px -12px rgba(5, 6, 20, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    opacity: 0.95;
}

/* ---- Buttons: brand gradient (wins over the flat v3 rule) ---- */
.btn {
    background: var(--grad-brand);
    background-size: 160% 160%;
    border: 1px solid rgba(255, 255, 255, 0.16);
    box-shadow: var(--glow-accent), inset 0 1px 0 rgba(255, 255, 255, 0.22);
    font-weight: 600;
    letter-spacing: 0.01em;
    transition: transform 0.2s, box-shadow 0.2s, background-position 0.3s;
}

.btn:hover {
    background-position: 100% 50%;
    transform: translateY(-2px);
    box-shadow: 0 16px 36px -10px rgba(99, 102, 241, 0.7), 0 0 0 4px rgba(99, 102, 241, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.btn:active {
    transform: translateY(0);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.13);
    box-shadow: none;
    background-size: auto;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.09);
    border-color: rgba(255, 255, 255, 0.22);
    box-shadow: 0 10px 24px -12px rgba(5, 6, 20, 0.9);
    background-position: 0 0;
}

/* ---- Feature strip ---- */
.feature {
    background: linear-gradient(165deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.015));
    border: 1px solid var(--hairline);
    border-radius: 14px;
    transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
}

.feature:hover {
    transform: translateY(-3px);
    border-color: rgba(129, 140, 248, 0.4);
    box-shadow: 0 16px 32px -16px rgba(99, 102, 241, 0.55);
}

.feature-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    background: rgba(99, 102, 241, 0.14);
    border: 1px solid rgba(129, 140, 248, 0.30);
    border-radius: 12px;
    font-size: 1.25rem;
}

/* ---- Section heads ---- */
.section-head h2::after {
    width: 72px;
    height: 3px;
    box-shadow: 0 0 14px rgba(99, 102, 241, 0.7);
}

.section-head p {
    max-width: 640px;
    color: #b3bad9;
}

/* ---- Tool + guide cards ---- */
.tool-card {
    background: linear-gradient(165deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.015) 55%), var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    transition: transform 0.25s cubic-bezier(0.2, 0.7, 0.2, 1), border-color 0.25s, box-shadow 0.25s, background 0.25s;
}

.tool-card:hover {
    transform: translateY(-6px);
    border-color: rgba(129, 140, 248, 0.55);
    background: linear-gradient(165deg, rgba(129, 140, 248, 0.14), rgba(34, 211, 238, 0.05) 60%), var(--bg-card);
    box-shadow: 0 24px 46px -18px rgba(99, 102, 241, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

.tool-card:hover h3 {
    color: #dfe3ff;
}

.tool-card .tool-icon {
    transition: transform 0.25s;
    box-shadow: 0 8px 20px -10px rgba(99, 102, 241, 0.7);
}

.tool-card:hover .tool-icon {
    transform: scale(1.08) rotate(-4deg);
}

.card-arrow {
    color: var(--accent-2);
    font-weight: 700;
}

/* Guide cards read as editorial: warm gold instead of tool-purple. */
.guide-card {
    background: linear-gradient(180deg, rgba(251, 191, 36, 0.10) 0%, rgba(30, 32, 68, 0.92) 55%), var(--bg-card);
    border-color: rgba(251, 191, 36, 0.30);
}

.guide-card:hover {
    border-color: rgba(251, 191, 36, 0.6);
    box-shadow: 0 24px 46px -18px rgba(251, 191, 36, 0.4);
}

.card-meta {
    color: #fcd34d;
}

.guide-card .card-arrow {
    color: #fcd34d;
}

/* ---- Filter bar ---- */
.filter-search {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 12px;
    padding: 0.7rem 1.1rem;
}

.filter-search:focus {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(129, 140, 248, 0.7);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.18);
}

.chip {
    background: rgba(255, 255, 255, 0.045);
    border-color: rgba(255, 255, 255, 0.10);
    transition: all 0.2s;
}

.chip:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(129, 140, 248, 0.5);
    transform: translateY(-1px);
}

.chip.active {
    background: var(--grad-brand);
    border-color: transparent;
    box-shadow: 0 8px 20px -6px rgba(99, 102, 241, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* ---- Tool page: unified dark controls + panel states ---- */
.tool-page h1 {
    font-size: clamp(1.75rem, 3.5vw, 2.35rem);
    font-weight: 700;
    letter-spacing: -0.015em;
}

.tool-page .description {
    color: #b3bad9;
    font-size: 1.0625rem;
}

.input-group label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: #8f97bd;
    font-weight: 600;
}

input[type="text"],
input[type="number"],
input[type="search"],
input[type="url"],
input[type="email"],
select,
textarea {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 12px;
    padding: 0.65rem 0.9rem;
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    font-size: 0.9375rem;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

textarea {
    font-family: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
    padding: 0.875rem 1rem;
    line-height: 1.55;
}

input[type="text"]:focus,
input[type="number"]:focus,
input[type="search"]:focus,
input[type="url"]:focus,
input[type="email"]:focus,
select:focus,
textarea:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(129, 140, 248, 0.75);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.16);
}

input[type="number"] {
    width: 6.5ch;
    padding: 0.45rem 0.5rem;
    text-align: center;
    font-family: 'JetBrains Mono', monospace;
}

select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23a6adcf' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.8rem center;
    padding-right: 2.2rem;
    cursor: pointer;
}

input[type="checkbox"],
input[type="radio"] {
    accent-color: var(--accent);
    width: 1rem;
    height: 1rem;
    cursor: pointer;
}

input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 99px;
    background: linear-gradient(90deg, #6366f1, #22d3ee);
    cursor: pointer;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #ffffff;
    border: none;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.30), 0 2px 8px rgba(5, 6, 20, 0.6);
}

input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #ffffff;
    border: none;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.30);
}

.output {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 12px;
    padding: 1rem 1.1rem;
    line-height: 1.6;
    box-shadow: inset 0 1px 14px rgba(5, 6, 20, 0.35);
}

.output.success {
    background: rgba(5, 150, 105, 0.10);
    border-color: rgba(52, 211, 153, 0.5);
    color: #6ee7b7;
    box-shadow: 0 0 26px -10px rgba(52, 211, 153, 0.45);
}

.output.error {
    background: rgba(220, 38, 38, 0.10);
    border-color: rgba(248, 113, 113, 0.5);
    color: #fca5a5;
    box-shadow: 0 0 26px -10px rgba(248, 113, 113, 0.45);
}

/* ---- FAQ: glass card with a question rail ---- */
.faq {
    background: linear-gradient(165deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.012));
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 18px;
    padding: 1.75rem 2rem 0.5rem;
}

.faq dt {
    margin-top: 1.35rem;
    padding-left: 0.9rem;
    border-left: 3px solid rgba(99, 102, 241, 0.7);
    letter-spacing: -0.005em;
}

.faq dt:first-of-type {
    margin-top: 0.35rem;
}

.faq dd {
    padding-left: 0.9rem;
    border-left: 3px solid rgba(99, 102, 241, 0.16);
    margin-bottom: 0.35rem;
    line-height: 1.65;
}

/* ---- Guide / comparison pages ---- */
.guide h1 {
    background: linear-gradient(130deg, #ffffff 0%, #c7d2fe 45%, #67e8f9 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.tldr {
    background: linear-gradient(165deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.015));
    border: 1px solid rgba(129, 140, 248, 0.35);
    border-radius: 14px;
    box-shadow: var(--shadow-card);
}

.table-wrap {
    border-color: rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    box-shadow: var(--shadow-card);
}

.compare-table th {
    background: rgba(255, 255, 255, 0.05);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #9fa7cd;
}

.compare-table tbody tr:hover td {
    background: rgba(255, 255, 255, 0.03);
}

.pick {
    background: rgba(34, 211, 238, 0.14);
    color: #67e8f9;
    border: 1px solid rgba(34, 211, 238, 0.35);
    border-radius: 999px;
    padding: 0.15rem 0.6rem;
}

.review-card {
    background: linear-gradient(165deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.012));
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 14px;
    box-shadow: var(--shadow-card);
}

.review-card.featured {
    border: 1px solid transparent;
    background:
        linear-gradient(165deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.015)) padding-box,
        linear-gradient(135deg, #6366f1, #22d3ee) border-box;
    box-shadow: 0 22px 48px -22px rgba(99, 102, 241, 0.65);
}

.verdict {
    border-top: 1px solid var(--hairline);
    color: #d7dcf5;
}

.cta-button {
    background: var(--grad-brand);
    background-size: 160% 160%;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 10px;
    padding: 0.7rem 1.4rem;
    box-shadow: var(--glow-accent), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transition: transform 0.2s, box-shadow 0.2s, background-position 0.3s;
}

.cta-button:hover {
    background-position: 100% 50%;
    transform: translateY(-2px);
    box-shadow: 0 16px 36px -10px rgba(99, 102, 241, 0.7), 0 0 0 4px rgba(99, 102, 241, 0.16);
}

.cta-button.secondary {
    background: rgba(255, 255, 255, 0.05);
    background-size: auto;
    border: 1px solid rgba(255, 255, 255, 0.13);
    box-shadow: none;
}

.cta-button.secondary:hover {
    background: rgba(255, 255, 255, 0.09);
    background-position: 0 0;
    box-shadow: 0 10px 24px -12px rgba(5, 6, 20, 0.9);
}

.big-cta {
    border-radius: 18px;
    border-color: rgba(129, 140, 248, 0.5);
    padding: 2.25rem 1.75rem;
    box-shadow: 0 28px 60px -28px rgba(99, 102, 241, 0.7);
}

.disclosure {
    background: rgba(99, 102, 241, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-left: 3px solid var(--accent-2);
    border-radius: 10px;
}

/* ---- Result surfaces shared by the tools ---- */
.match-item,
.result-row,
.now-strip {
    background: linear-gradient(165deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.012));
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.match-item,
.result-row {
    border-radius: 12px;
}

.now-strip {
    border-radius: 14px;
}

.md-preview {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.09);
    border-radius: 12px;
}

/* ---- Footer ---- */
.footer {
    position: relative;
    border-top: none;
    background: linear-gradient(180deg, transparent, rgba(5, 6, 20, 0.65));
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.5), rgba(34, 211, 238, 0.35), transparent);
}

.footer-links a:hover {
    color: var(--accent-2);
}

.footer-copy {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* ---- Reveal: softer landing ---- */
.js .reveal {
    transform: translateY(26px) scale(0.985);
    transition: opacity 0.6s cubic-bezier(0.2, 0.7, 0.2, 1), transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
}

@media (prefers-reduced-motion: reduce) {
    .hero-badge::before {
        animation: none;
    }
    .tool-card:hover,
    .feature:hover,
    .chip:hover,
    .btn:hover,
    .cta-button:hover {
        transform: none;
    }
}

@media (max-width: 640px) {
    .hero {
        padding: 4rem 0 3rem;
    }
    .hero-actions {
        flex-direction: column;
        align-items: stretch;
    }
    .hero-actions .btn {
        text-align: center;
    }
    .faq {
        padding: 1.25rem 1.25rem 0.25rem;
    }
    .nav {
        gap: 0.5rem;
    }
    .tool-grid {
        gap: 1rem;
    }
}

/* 404 page: centred search box under the hero actions. */
.hero-search {
    display: flex;
    justify-content: center;
    margin-top: 1.75rem;
}

.hero-search .filter-search {
    max-width: 380px;
    text-align: center;
}
