:root {
    --bg-body: #eef2f8;
    --bg-body-deep: #e6ecf7;
    --surface: rgba(255, 255, 255, 0.92);
    --surface-strong: #ffffff;
    --surface-soft: #f6f8fc;
    --text-heading: #0f172f;
    --text-body: #334155;
    --text-muted: #4f5e73;
    --text-soft: #6f7f95;
    --accent: #2563eb;
    --accent-deep: #1d4ed8;
    --accent-soft: #dbeafe;
    --accent-rgb: 37, 99, 235;
    --accent-grad-start: #2563eb;
    --accent-grad-end: #3b82f6;
    --border: rgba(129, 144, 168, 0.26);
    --border-strong: rgba(93, 107, 130, 0.38);
    --danger: #991b1b;
    --danger-bg: rgba(254, 242, 242, 0.92);
    --danger-border: rgba(220, 38, 38, 0.2);
    --shadow-sm: 0 4px 14px rgba(15, 23, 47, 0.05);
    --shadow-md: 0 18px 46px rgba(15, 23, 47, 0.09);
    --radius-sm: 10px;
    --radius-md: 18px;
    --radius-lg: 26px;
    --container: 1140px;
    --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-heading: "Geist", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-mono: "JetBrains Mono", "Fira Code", "Source Code Pro", Consolas, monospace;
    --font-logo: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

html[data-theme="dark"] {
    --bg-body: #171b21;
    --bg-body-deep: #1d222a;
    --surface: rgba(31, 37, 46, 0.92);
    --surface-strong: #20252d;
    --surface-soft: #272d36;
    --text-heading: #f3f5f7;
    --text-body: #d7dce2;
    --text-muted: #b7bfc9;
    --text-soft: #9aa4b0;
    --accent: #6ea8ff;
    --accent-deep: #9fc4ff;
    --accent-soft: rgba(110, 168, 255, 0.12);
    --accent-rgb: 110, 168, 255;
    --accent-grad-start: #5d98f2;
    --accent-grad-end: #76afff;
    --border: rgba(165, 173, 184, 0.22);
    --border-strong: rgba(165, 173, 184, 0.36);
    --danger: #ff8f8f;
    --danger-bg: rgba(95, 28, 28, 0.42);
    --danger-border: rgba(255, 143, 143, 0.22);
    --shadow-sm: 0 8px 24px rgba(6, 10, 18, 0.22);
    --shadow-md: 0 18px 40px rgba(6, 10, 18, 0.32);
    color-scheme: dark;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    font-family: var(--font-sans);
    line-height: 1.65;
    color: var(--text-body);
    background: #ffffff;
    -webkit-font-smoothing: antialiased;
}

html[data-theme="dark"] body {
    background:
        radial-gradient(circle at top left, rgba(var(--accent-rgb), 0.08), transparent 30%),
        radial-gradient(circle at top right, rgba(var(--accent-rgb), 0.05), transparent 24%),
        linear-gradient(180deg, var(--bg-body) 0%, var(--bg-body-deep) 100%);
}

body.route-tools-index,
body.route-tests-index,
body.route-learn-index,
body.route-categories-index,
body.route-categories-show,
body.route-types-index,
body.route-account,
body.route-sign-in,
body.route-register,
body.route-password-request,
body.route-password-reset,
body.route-donate,
body.route-contact {
    background: #ffffff;
}

html[data-theme="dark"] body.route-tools-index,
html[data-theme="dark"] body.route-tests-index,
html[data-theme="dark"] body.route-learn-index,
html[data-theme="dark"] body.route-categories-index,
html[data-theme="dark"] body.route-categories-show,
html[data-theme="dark"] body.route-types-index,
html[data-theme="dark"] body.route-account,
html[data-theme="dark"] body.route-sign-in,
html[data-theme="dark"] body.route-register,
html[data-theme="dark"] body.route-password-request,
html[data-theme="dark"] body.route-password-reset,
html[data-theme="dark"] body.route-donate,
html[data-theme="dark"] body.route-contact {
    background: #171b21;
}

a {
    color: var(--accent);
    text-decoration: none;
}

a:hover {
    color: var(--accent-deep);
}

h1,
h2,
h3,
h4 {
    margin: 0;
    color: var(--text-heading);
    font-family: var(--font-heading);
    line-height: 1.12;
    letter-spacing: -0.03em;
}

p,
li {
    margin: 0;
}

.container {
    width: min(1080px, calc(100% - 48px));
    margin: 0 auto;
}

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

.site-header {
    --header-surface: #ffffff;
    --header-surface-soft: #f6f8fc;
    --header-border: rgba(129, 144, 168, 0.26);
    --header-border-strong: rgba(93, 107, 130, 0.38);
    --header-text-heading: #0f172f;
    --header-text-body: #334155;
    --header-text-muted: #4f5e73;
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--header-surface);
    border-bottom: 1px solid var(--header-border);
    transform: translateY(0);
    transition: transform 0.28s ease, box-shadow 0.28s ease;
    will-change: transform;
}

.site-header.is-hidden {
    transform: translateY(-100%);
}

html[data-theme="dark"] .site-header {
    --header-surface: #181b1f;
    --header-surface-soft: #20242a;
    --header-border: rgba(154, 162, 171, 0.2);
    --header-border-strong: rgba(154, 162, 171, 0.32);
    --header-text-heading: #f1f3f5;
    --header-text-body: #d2d6db;
    --header-text-muted: #9aa2ab;
}

.site-breadcrumbs {
    display: block;
    padding: 0.9rem 0 0.35rem;
}

.site-breadcrumbs + .tests-index-page,
.site-breadcrumbs + .types-index-page,
.site-breadcrumbs + .learn-directory-page {
    padding-top: 0;
}

.site-breadcrumbs + .page-head {
    padding-top: 0;
}

.site-breadcrumbs-inner {
    display: flex;
    align-items: center;
    gap: 0.34rem;
    max-width: 1040px;
    overflow-x: auto;
    scrollbar-width: none;
}

.site-breadcrumbs-inner::-webkit-scrollbar {
    display: none;
}

.site-breadcrumb-pill {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0;
    border-radius: 0;
    background: transparent;
    color: var(--text-soft);
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
    font-size: 0.88rem;
    font-weight: 600;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
}

a.site-breadcrumb-pill:hover {
    background: transparent;
    color: var(--accent);
    text-decoration: none;
}

.site-breadcrumb-pill[aria-current="page"] {
    color: var(--text-heading);
    font-weight: 700;
}

.site-breadcrumb-separator {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
}

.site-breadcrumb-separator svg {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2.2;
}

html[data-theme="dark"] .site-breadcrumb-pill {
    background: transparent;
    color: var(--text-soft);
}

html[data-theme="dark"] a.site-breadcrumb-pill:hover {
    background: transparent;
    color: var(--accent-deep);
}

html[data-theme="dark"] .site-breadcrumb-pill[aria-current="page"] {
    color: var(--text-heading);
}

.site-header-inner {
    height: 52px;
    min-height: 52px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.site-header-left {
    display: flex;
    align-items: center;
    gap: 1.45rem;
    min-width: 0;
    flex: 1 1 auto;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    color: var(--header-text-heading);
}

.brand::before {
    content: none;
}

.brand-icon {
    display: inline-grid;
    width: 32px;
    height: 32px;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 8px;
    background: #020617;
    color: #ffffff;
}

.brand-icon svg {
    width: 19px;
    height: 19px;
}

.brand-badge {
    display: inline-block;
    font-family: var(--font-logo);
    font-size: 1.35rem;
    font-weight: 600;
    line-height: 1;
    letter-spacing: 0;
    user-select: none;
}

.brand-wordmark-primary {
    color: #071225;
}

.brand-wordmark-accent {
    color: #2563eb;
}

html[data-theme="dark"] .brand-wordmark-primary {
    color: #ffffff;
}

.mobile-nav-toggle {
    display: none;
    align-items: center;
    gap: 0.55rem;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--header-text-heading);
    cursor: pointer;
    font: inherit;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    transition: color 0.16s ease;
}

.mobile-nav-toggle:hover {
    color: var(--accent);
}

.mobile-nav-toggle-label {
    font-size: 0.8rem;
    font-weight: 700;
    line-height: 1;
}

.mobile-nav-toggle-icon {
    width: 24px;
    height: 24px;
    flex: 0 0 auto;
}

.mobile-nav-shell {
    position: fixed;
    inset: 0;
    z-index: 1001;
}

.mobile-nav-overlay {
    position: fixed;
    inset: 0;
    background: #12161b;
    color: #f5f7fa;
    opacity: 0;
    transform: translateX(100%);
    transition: transform 0.34s cubic-bezier(0.215, 0.61, 0.355, 1), opacity 0.2s ease;
    overflow-y: auto;
    outline: none;
}

.mobile-nav-shell.is-open .mobile-nav-overlay {
    opacity: 1;
    transform: translateX(0);
}

.mobile-nav-overlay-inner {
    min-height: 100dvh;
    padding: 1.35rem 1.35rem 2.25rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.mobile-nav-topbar {
    position: absolute;
    top: 1rem;
    left: 1rem;
    right: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.mobile-nav-wordmark {
    font-family: var(--font-logo);
    font-size: 1.35rem;
    font-weight: 600;
    line-height: 1;
    letter-spacing: 0;
}

.mobile-nav-wordmark .brand-wordmark-primary {
    color: #ffffff;
}

.mobile-nav-close {
    width: 48px;
    height: 48px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    cursor: pointer;
    flex: 0 0 auto;
}

.mobile-nav-close svg {
    width: 20px;
    height: 20px;
    display: block;
    margin: auto;
}

.mobile-nav-links {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
}

.mobile-nav-shell .mobile-nav-links a,
.mobile-nav-shell .mobile-nav-links .mobile-theme-toggle {
    display: inline-flex;
    align-items: center;
    width: auto;
    min-height: 0;
    padding: 0;
    border-radius: 0;
    color: rgba(245, 247, 250, 0.9);
    font-family: var(--font-sans);
    font-size: clamp(2rem, 9vw, 3.2rem);
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: 0;
    text-align: left;
    text-decoration: none;
    opacity: 0;
    transform: none;
    text-rendering: geometricPrecision;
    transition: opacity 0.22s ease, color 0.16s ease;
}

.mobile-nav-shell.is-open .mobile-nav-links a,
.mobile-nav-shell.is-open .mobile-theme-toggle {
    opacity: 1;
}

.mobile-nav-shell.is-open .mobile-nav-links a:nth-child(1) {
    transition-delay: 0.05s;
}

.mobile-nav-shell.is-open .mobile-nav-links a:nth-child(2) {
    transition-delay: 0.1s;
}

.mobile-nav-shell.is-open .mobile-nav-links a:nth-child(3) {
    transition-delay: 0.15s;
}

.mobile-nav-shell.is-open .mobile-nav-links a:nth-child(4) {
    transition-delay: 0.2s;
}

.mobile-nav-shell.is-open .mobile-nav-links a:nth-child(5) {
    transition-delay: 0.25s;
}

.mobile-nav-shell.is-open .mobile-theme-toggle {
    transition-delay: 0.3s;
}

.mobile-nav-shell .mobile-nav-links a.active,
.mobile-nav-shell .mobile-nav-links a:hover,
.mobile-nav-shell .mobile-nav-links .mobile-theme-toggle:hover {
    background: transparent;
    color: #ffffff;
}

.mobile-nav-actions {
    margin-top: 2.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.mobile-nav-shell .mobile-nav-links a.active {
    color: var(--accent);
}

.mobile-nav-shell .mobile-theme-toggle {
    justify-content: flex-start;
}

body.mobile-nav-open {
    overflow: hidden;
}

/* Mobile navigation must sit above every fixed page control. */
body.mobile-nav-open .site-header {
    z-index: 1000;
    transform: none;
}

body.mobile-nav-open .mobile-nav-shell {
    z-index: 1001;
}

.site-header .nav {
    display: flex;
    gap: 22px;
    flex-wrap: wrap;
    align-items: center;
}

.site-header .nav-primary {
    display: flex;
    gap: 22px;
    align-items: center;
}

.site-header .header-actions {
    display: flex;
    gap: 22px;
    align-items: center;
}

.site-header .theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    top: 1px;
    padding: 0;
    border: 0;
    font: inherit;
    cursor: pointer;
}

.site-theme-toggle {
    --toggle-width: 56px;
    --toggle-speed: 0.5s;
    --toggle-easing: cubic-bezier(0.4, -0.3, 0.6, 1.3);
    --toggle-slide-ease: cubic-bezier(0.4, -0.3, 0.6, 1.3);
    --toggle-ray: hsl(0 0% 100% / 0.5);
    --toggle-sun: hsl(47 91% 58%);
    --toggle-moon: hsl(212 13% 82%);
    --toggle-crater: hsl(221 16% 68%);
    -webkit-tap-highlight-color: transparent;
    width: var(--toggle-width);
    aspect-ratio: 8 / 3;
    position: relative;
    overflow: hidden;
    isolation: isolate;
    border-radius: 999px;
    will-change: transform;
    outline-color: transparent;
    background: transparent;
    border: 0;
}

.site-theme-toggle::after {
    content: none;
}

.site-theme-toggle .toggle__content {
    position: absolute;
    inset: 0;
    overflow: hidden;
    border-radius: inherit;
    display: block;
    clip-path: inset(0 round 999px);
    container-type: inline-size;
}

.site-theme-toggle .toggle__content::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    background: hsl(
        calc(204 + (var(--dark, 0) * 25))
        calc((53 - (var(--dark, 0) * 28)) * 1%)
        calc((47 - (var(--dark, 0) * 31)) * 1%)
    );
}

.site-theme-toggle .toggle__content::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 3;
    border-radius: inherit;
    pointer-events: none;
    box-shadow: inset 0 0 0 1px hsl(220 25% 80% / 0.12);
}

html[data-theme="light"] .site-theme-toggle .toggle__content::after {
    box-shadow: inset 0 0 0 1px hsl(0 0% 0% / 0.1);
}

.site-theme-toggle .toggle__backdrop {
    overflow: visible !important;
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 1;
    transition: translate var(--toggle-speed) var(--toggle-easing);
    translate: 0 calc(var(--dark, 0) * (100% - (3 / 8 * var(--toggle-width))));
}

.site-theme-toggle .toggle__backdrop:first-of-type .clouds path:first-of-type {
    fill: var(--toggle-ray);
}

.site-theme-toggle .stars path {
    transform-box: fill-box;
    transform-origin: 25% 50%;
    scale: calc(0.25 + (var(--dark, 0) * 0.75));
    transition: scale var(--toggle-speed) calc(var(--toggle-speed) * 0.5) var(--toggle-easing);
}

.site-theme-toggle .stars g {
    transform-box: fill-box;
    transform-origin: 50% 50%;
}

.site-theme-toggle .stars g:nth-of-type(3) {
    animation: theme-toggle-twinkle 4s -2s infinite;
}

.site-theme-toggle .stars g:nth-of-type(11) {
    animation: theme-toggle-twinkle 6s -2s infinite;
}

.site-theme-toggle .stars g:nth-of-type(9) {
    animation: theme-toggle-twinkle 4s -1s infinite;
}

.site-theme-toggle .toggle__indicator-wrapper {
    position: absolute;
    inset: 0;
    z-index: 2;
}

.site-theme-toggle .toggle__indicator {
    height: 100%;
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    padding: 4%;
    transition: translate var(--toggle-speed) var(--toggle-slide-ease);
    translate: calc(var(--dark, 0) * (100cqi - 100%)) 0;
}

.site-theme-toggle .toggle__star {
    height: 100%;
    aspect-ratio: 1;
    border-radius: 50%;
    position: relative;
    transition: translate var(--toggle-speed) var(--toggle-easing);
    translate: calc((var(--dark, 0) * -10%) + 5%) 0;
}

.site-theme-toggle .toggle__star::before {
    content: "";
    z-index: -1;
    width: 356%;
    aspect-ratio: 1;
    position: absolute;
    top: 50%;
    left: 50%;
    border-radius: 50%;
    background:
        radial-gradient(hsl(0 0% 100% / 0.25) 40%, transparent 40.5%),
        radial-gradient(hsl(0 0% 100% / 0.25) 56%, transparent 56.5%) hsl(0 0% 100% / 0.25);
    transition: translate var(--toggle-speed) var(--toggle-easing);
    translate: calc((50 - (var(--dark, 0) * 4)) * -1%) -50%;
}

.site-theme-toggle .toggle__star::after {
    content: "";
    position: absolute;
    inset: 0;
    display: block;
    background: hsl(0 0% 0% / 0.28);
    filter: blur(6px);
    translate: 2% 4%;
    border-radius: 50%;
    z-index: -1;
}

.site-theme-toggle .sun {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    overflow: hidden;
    background: var(--toggle-sun);
    box-shadow:
        calc(var(--toggle-width) * 0.01) calc(var(--toggle-width) * 0.01) calc(var(--toggle-width) * 0.02) 0 hsl(210 10% 100% / 0.95) inset,
        calc(var(--toggle-width) * -0.01) calc(var(--toggle-width) * -0.01) calc(var(--toggle-width) * 0.02) 0 hsl(210 10% 20% / 0.5) inset;
}

.site-theme-toggle .moon {
    position: absolute;
    inset: -1%;
    border-radius: 50%;
    background: var(--toggle-moon);
    transition: translate var(--toggle-speed) ease-in-out;
    translate: calc((100 - (var(--dark, 0) * 100)) * 1%) 0;
    box-shadow:
        calc(var(--toggle-width) * 0.01) calc(var(--toggle-width) * 0.01) calc(var(--toggle-width) * 0.02) 0 hsl(210 10% 100% / 0.95) inset,
        calc(var(--toggle-width) * -0.01) calc(var(--toggle-width) * -0.01) calc(var(--toggle-width) * 0.02) 0 hsl(210 10% 10% / 0.95) inset;
}

.site-theme-toggle .moon__crater {
    position: absolute;
    background: var(--toggle-crater);
    border-radius: 50%;
    width: calc(var(--size, 10) * 1%);
    aspect-ratio: 1;
    left: calc(var(--x) * 1%);
    top: calc(var(--y) * 1%);
    box-shadow:
        calc(var(--toggle-width) * 0.008) calc(var(--toggle-width) * 0.008) calc(var(--toggle-width) * 0.012) 0 hsl(210 10% 6% / 0.25) inset,
        0 calc(var(--toggle-width) * 0.004) calc(var(--toggle-width) * 0.008) 0 hsl(210 10% 100% / 0.25);
}

.site-theme-toggle .moon__crater:nth-of-type(1) {
    --size: 18;
    --x: 40;
    --y: 15;
}

.site-theme-toggle .moon__crater:nth-of-type(2) {
    --size: 20;
    --x: 65;
    --y: 58;
}

.site-theme-toggle .moon__crater:nth-of-type(3) {
    --size: 34;
    --x: 18;
    --y: 40;
}

.site-theme-toggle[aria-pressed="true"] {
    --dark: 1;
}

.site-theme-toggle:focus-visible {
    outline: 2px solid rgba(var(--accent-rgb), 0.55);
    outline-offset: 4px;
}

.mobile-nav-shell .mobile-theme-toggle {
    --toggle-width: 84px;
}

@keyframes theme-toggle-twinkle {
    0%,
    40%,
    60%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(0);
    }
}

.site-header .nav a {
    color: var(--header-text-muted);
    font-family: var(--font-sans);
    font-size: 14px;
    font-weight: 500;
}

.site-header .nav a:hover,
.site-header .nav a.active {
    color: var(--header-text-heading);
}

.site-header .nav a.header-donate-link {
    padding: 0.42rem 0.8rem;
    border: 1px solid var(--header-border-strong);
    border-radius: 999px;
    color: var(--header-text-heading);
    line-height: 1;
}

.site-header .nav a.header-donate-link:hover,
.site-header .nav a.header-donate-link.active {
    border-color: rgba(var(--accent-rgb), 0.55);
    color: var(--accent);
}

.site-header .nav a.header-primary-link {
    gap: 0.48rem;
    padding: 0.58rem 1.05rem 0.58rem 1.18rem;
    border: 0;
    border-radius: 999px;
    background: #0ea5df;
    color: #ffffff;
    font-weight: 800;
    line-height: 1;
}

.site-header .nav a.header-primary-link:hover,
.site-header .nav a.header-primary-link.active {
    background: #028dcc;
    color: #ffffff;
}

.site-header .nav a.header-primary-link svg {
    width: 1rem;
    height: 1rem;
    flex: 0 0 1rem;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2.2;
}

.site-main {
    flex: 1 0 auto;
    padding-bottom: 4rem;
}

body.route-learn-show .site-main,
body.route-donate .site-main,
body.route-contact .site-main {
    padding-bottom: 0;
}

.hero {
    padding: 4.8rem 0 3rem;
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(300px, 0.9fr);
    gap: 2rem;
    align-items: center;
}

.hero-copy {
    max-width: 42rem;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.8rem;
    border-radius: 999px;
    background: rgba(var(--accent-rgb), 0.1);
    color: var(--accent);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.hero h1 {
    font-size: clamp(2.5rem, 6vw, 4.25rem);
    margin-bottom: 1rem;
}

.hero-lead,
.page-head p,
.section-header p,
.card p,
.docs-item-desc,
.empty-state {
    color: var(--text-muted);
}

.hero-lead,
.page-head p {
    font-size: 1.08rem;
    max-width: 42rem;
}

.hero-actions {
    display: flex;
    gap: 0.85rem;
    flex-wrap: wrap;
    margin-top: 1.75rem;
}

.btn,
.search-form button,
.tool-actions button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.8rem;
    padding: 0.75rem 1.1rem;
    border-radius: 0.9rem;
    border: 1px solid transparent;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.btn-primary,
.btn,
.search-form button,
.tool-actions button {
    background: linear-gradient(135deg, var(--accent-grad-start) 0%, var(--accent-grad-end) 100%);
    color: #fff;
    box-shadow: 0 12px 24px rgba(var(--accent-rgb), 0.2);
}

.btn-secondary,
.btn-alt {
    background: rgba(255, 255, 255, 0.86);
    color: var(--text-heading);
    border-color: var(--border);
    box-shadow: var(--shadow-sm);
}

.btn:hover,
.search-form button:hover,
.tool-actions button:hover {
    transform: translateY(-1px);
}

.code-window,
.card,
.tool-card,
.tool-placeholder,
.search-form,
.docs-list,
.reading-shell,
.prose-card {
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.code-window {
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: linear-gradient(180deg, #14213d 0%, #0f172f 100%);
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: var(--shadow-md);
}

.code-header {
    display: flex;
    gap: 0.5rem;
    padding: 1rem 1.15rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
}

.code-dot {
    width: 0.78rem;
    height: 0.78rem;
    border-radius: 50%;
}

.code-dot-red { background: #ff6b6b; }
.code-dot-amber { background: #ffc857; }
.code-dot-green { background: #3ddc97; }

.code-body {
    margin: 0;
    padding: 1.5rem;
    overflow-x: auto;
    color: #e6eefb;
    font-family: var(--font-mono);
    font-size: 0.92rem;
}

.code-comment { color: #7f92b2; }
.code-keyword { color: #93c5fd; }
.code-string { color: #86efac; }
.code-function { color: #f9c97d; }

.page-head {
    padding: 3.25rem 0 1.4rem;
}

.page-head > .container {
    max-width: 1040px;
    padding-bottom: 1.4rem;
    border-bottom: 1px solid var(--border);
}

.page-head h1 {
    margin: 0 0 0.55rem;
    color: var(--text-heading);
    font-size: clamp(2rem, 3.6vw, 2.9rem);
    line-height: 1.05;
}

.section {
    padding: 1.4rem 0 2.4rem;
}

.section-tight {
    padding-top: 0.3rem;
}

.section-soft {
    padding-top: 2.2rem;
}

.section-header {
    margin-bottom: 1.3rem;
}

.section-header h2 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    margin-bottom: 0.45rem;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
}

.card,
.tool-card,
.tool-placeholder,
.prose-card {
    border-radius: var(--radius-md);
}

.card,
.tool-card,
.tool-placeholder {
    padding: 1.25rem;
}

.card {
    border-radius: 8px;
    transition: background 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.card:hover {
    border-color: var(--border-strong);
    box-shadow: var(--shadow-sm);
}

.card-kicker {
    display: inline-flex;
    width: fit-content;
    padding: 0.3rem 0.6rem;
    margin-bottom: 0.9rem;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.card h2,
.card h3 {
    font-size: 1.12rem;
    margin-bottom: 0.55rem;
}

.card-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: 1rem;
    font-weight: 700;
}

.tests-index-page {
    padding: 3.25rem 0 4.5rem;
}

.tests-index-container {
    max-width: 1040px;
}

.tests-index-header {
    display: grid;
    grid-template-columns: max-content minmax(340px, 510px);
    gap: 1.5rem;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 1.4rem;
    border-bottom: 1px solid var(--border);
}

.tests-index-header h1 {
    margin: 0;
    font-size: clamp(2rem, 3.6vw, 2.9rem);
    line-height: 1.05;
    color: var(--text-heading);
}

.tests-index-header p {
    max-width: 42rem;
    margin: 0;
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.65;
}

.tests-index-tools {
    display: grid;
    gap: 0.72rem;
    justify-self: end;
    justify-items: start;
    width: 100%;
}

.tests-search-form {
    position: relative;
    display: flex;
    gap: 0.5rem;
    align-items: center;
    width: 100%;
}

.tests-search-form input[type="search"] {
    width: 100%;
    min-width: 0;
    height: 42px;
    padding: 0 3rem 0 0.85rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.68);
    color: var(--text);
    font: inherit;
    font-size: 0.94rem;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.tests-search-form input[type="search"]:focus {
    outline: none;
    border-color: var(--accent);
    background: var(--surface-strong);
    box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.12);
}

.tests-search-form button,
.tests-empty-state a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 0.95rem;
    border: 1px solid var(--accent);
    border-radius: 8px;
    background: transparent;
    color: var(--accent);
    font: inherit;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.tests-search-form button:hover,
.tests-empty-state a:hover {
    border-color: var(--accent-deep);
    background: rgba(var(--accent-rgb), 0.08);
    color: var(--accent-deep);
}

.tests-search-form button:hover {
    border-color: transparent;
    background: transparent;
    color: var(--text-heading);
}

.tests-search-form button,
.learn-directory-search-form button {
    position: absolute;
    top: 0;
    right: 0;
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    min-height: 42px;
    padding: 0;
    border-color: transparent;
    color: var(--text-heading);
}

.tests-search-form button svg,
.learn-directory-search-form button svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.tests-index-summary {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    width: fit-content;
    min-height: 30px;
    padding: 0.3rem 0.75rem;
    border: 1px solid rgba(129, 144, 168, 0.2);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.46);
    color: var(--text-muted);
    font-size: 0.78rem;
    font-weight: 700;
    justify-self: start;
}

.tests-index-summary strong {
    color: var(--text-heading);
}

.tests-index-summary span {
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: var(--accent);
}

.tests-index-summary a {
    margin-left: 0.1rem;
    font-weight: 700;
}

.tests-group-list {
    display: grid;
    gap: 1.15rem;
    padding-top: 1.4rem;
}

.tests-group {
    display: grid;
    gap: 0.75rem;
}

.tests-index-summary + .tests-group {
    margin-top: 0.55rem;
}

.tests-group-header {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1rem;
}

.tests-group-header h2 {
    margin: 0;
    color: var(--text-heading);
    font-size: clamp(1.25rem, 2vw, 1.55rem);
    letter-spacing: -0.02em;
}

.tests-group-header span {
    color: var(--text-muted);
    font-size: 0.78rem;
    font-weight: 750;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    white-space: nowrap;
}

.tests-card-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.15rem;
}

.tests-card {
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-rows: auto minmax(4.1rem, auto) auto;
    gap: 0.65rem;
    align-content: start;
    justify-items: center;
    padding: 1.15rem 1.25rem;
    border: 1px solid rgba(129, 144, 168, 0.2);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.58);
    color: inherit;
    text-align: center;
    text-decoration: none;
    transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.tests-card:hover,
.tests-card:focus-visible {
    border-color: rgba(var(--accent-rgb), 0.3);
    background: rgba(255, 255, 255, 0.82);
    box-shadow: var(--shadow-sm);
    color: inherit;
    text-decoration: none;
}

.tests-card-main {
    display: contents;
    flex: initial;
    min-width: 0;
}

.tests-card-title-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.tests-card h2 {
    margin: 0;
    color: var(--text-heading);
    font-size: 1.05rem;
    line-height: 1.25;
    letter-spacing: -0.015em;
}

.tests-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    align-items: center;
    justify-content: center;
}

.tests-card p {
    align-self: start;
    margin: 0;
    color: var(--text-muted);
    font-size: 0.94rem;
    line-height: 1.5;
}

.tests-card-meta span {
    display: inline-flex;
    align-items: center;
    gap: 0.32rem;
    color: var(--text-muted);
    font-size: 0.76rem;
    font-weight: 700;
    line-height: 1.2;
}

.tests-card-meta svg {
    width: 14px;
    height: 14px;
    flex: 0 0 auto;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
    opacity: 0.75;
}

.tests-tag {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    min-height: 22px;
    padding: 0.16rem 0.48rem;
    border: 1px solid rgba(129, 144, 168, 0.24);
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.38);
    color: var(--text-muted);
    font-size: 0.66rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    line-height: 1;
    text-transform: uppercase;
    white-space: nowrap;
}

.tests-tag-accent {
    border-color: rgba(var(--accent-rgb), 0.24);
    background: rgba(var(--accent-rgb), 0.08);
    color: var(--accent);
}

.tests-tag-muted {
    border-color: rgba(93, 107, 130, 0.2);
    background: rgba(93, 107, 130, 0.06);
    color: var(--text-muted);
}

.tests-empty-state {
    padding: 1.5rem;
    border: 1px solid rgba(129, 144, 168, 0.2);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.58);
}

.tests-empty-state h2 {
    margin: 0 0 0.4rem;
    color: var(--text-heading);
    font-size: 1.2rem;
}

.tests-empty-state p {
    margin: 0 0 1rem;
    color: var(--text-muted);
}

html[data-theme="dark"] .tests-search-form input[type="search"],
html[data-theme="dark"] .tests-card,
html[data-theme="dark"] .tests-empty-state {
    background: rgba(32, 37, 45, 0.72);
    border-color: var(--border);
}

html[data-theme="dark"] .tests-index-summary,
html[data-theme="dark"] .tests-tag {
    background: rgba(32, 37, 45, 0.7);
    border-color: var(--border);
}

html[data-theme="dark"] .tests-card:hover,
html[data-theme="dark"] .tests-card:focus-visible {
    background: rgba(39, 45, 54, 0.9);
}

@media (max-width: 760px) {
    .tests-card-list {
        grid-template-columns: 1fr;
    }

    body.route-tests-index .tests-card-list {
        grid-template-columns: 1fr;
    }
}

.types-index-page {
    padding: 3.25rem 0 4.5rem;
}

.types-index-container {
    max-width: 1040px;
}

.types-index-header {
    display: grid;
    gap: 1.5rem;
    align-items: end;
    padding-bottom: 1.4rem;
    border-bottom: 1px solid var(--border);
}

.types-index-header h1 {
    margin: 0 0 0.55rem;
    color: var(--text-heading);
    font-size: clamp(2rem, 3.6vw, 2.9rem);
    line-height: 1.05;
}

.types-index-header p {
    max-width: 42rem;
    margin: 0;
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.65;
}

.types-group-list {
    display: grid;
    gap: 1.7rem;
    padding-top: 1.4rem;
}

.types-group {
    display: grid;
    gap: 0.75rem;
}

.types-group-header {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1rem;
}

.types-group-header h2 {
    margin: 0;
    color: var(--text-heading);
    font-size: clamp(1.25rem, 2vw, 1.55rem);
    letter-spacing: -0.02em;
}

.types-group-header span {
    color: var(--text-muted);
    font-size: 0.78rem;
    font-weight: 750;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    white-space: nowrap;
}

.types-card-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.15rem;
}

.types-card {
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-rows: auto minmax(4.1rem, auto) auto;
    gap: 0.65rem;
    align-content: start;
    justify-items: center;
    padding: 1.15rem 1.25rem;
    border: 1px solid rgba(129, 144, 168, 0.2);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.58);
    color: inherit;
    text-align: center;
    transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.types-card:hover,
.types-card:focus-within {
    border-color: rgba(var(--accent-rgb), 0.3);
    background: rgba(255, 255, 255, 0.82);
    box-shadow: var(--shadow-sm);
}

.types-card-title-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.types-card h2 {
    margin: 0;
    color: var(--text-heading);
    font-size: 1.05rem;
    line-height: 1.25;
    letter-spacing: -0.015em;
}

.types-card p {
    align-self: start;
    margin: 0;
    color: var(--text-muted);
    font-size: 0.94rem;
    line-height: 1.5;
}

.types-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    align-items: center;
    justify-content: center;
}

.types-card-meta span {
    display: inline-flex;
    align-items: center;
    gap: 0.32rem;
    color: var(--text-muted);
    font-size: 0.76rem;
    font-weight: 700;
    line-height: 1.2;
}

.types-card-meta svg {
    width: 14px;
    height: 14px;
    flex: 0 0 auto;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
    opacity: 0.75;
}

.types-tag {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    min-height: 22px;
    padding: 0.16rem 0.48rem;
    border: 1px solid rgba(129, 144, 168, 0.24);
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.38);
    color: var(--text-muted);
    font-size: 0.66rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    line-height: 1;
    text-transform: uppercase;
    white-space: nowrap;
}

.types-tag-accent {
    border-color: rgba(var(--accent-rgb), 0.24);
    background: rgba(var(--accent-rgb), 0.08);
    color: var(--accent);
}

html[data-theme="dark"] .types-card,
html[data-theme="dark"] .types-tag {
    background: rgba(32, 37, 45, 0.72);
    border-color: var(--border);
}

html[data-theme="dark"] .types-card:hover,
html[data-theme="dark"] .types-card:focus-within {
    background: rgba(39, 45, 54, 0.9);
}

@media (max-width: 760px) {
    .types-card-list {
        grid-template-columns: 1fr;
    }
}

.learn-directory-page {
    padding: 3.25rem 0 4.5rem;
}

.learn-directory-container {
    max-width: 1040px;
}

.learn-directory-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 430px);
    gap: 1.5rem;
    align-items: end;
    padding-bottom: 1.4rem;
    border-bottom: 1px solid var(--border);
}

.learn-directory-header h1 {
    margin: 0 0 0.55rem;
    color: var(--text-heading);
    font-size: clamp(2rem, 3.6vw, 2.9rem);
    line-height: 1.05;
}

.learn-directory-header p {
    max-width: 42rem;
    margin: 0;
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.65;
}

.learn-directory-tools {
    display: grid;
    gap: 0.72rem;
}

.learn-directory-search-form {
    position: relative;
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.learn-directory-search-form input[type="search"] {
    width: 100%;
    min-width: 0;
    height: 42px;
    padding: 0 3rem 0 0.85rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.68);
    color: var(--text-body);
    font: inherit;
    font-size: 0.94rem;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.learn-directory-search-form input[type="search"]:focus {
    outline: none;
    border-color: var(--accent);
    background: var(--surface-strong);
    box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.12);
}

.learn-directory-search-form button,
.learn-directory-empty-state a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 0.95rem;
    border: 1px solid var(--accent);
    border-radius: 8px;
    background: transparent;
    color: var(--accent);
    font: inherit;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.learn-directory-search-form button:hover,
.learn-directory-empty-state a:hover {
    border-color: var(--accent-deep);
    background: rgba(var(--accent-rgb), 0.08);
    color: var(--accent-deep);
}

.learn-directory-search-form button:hover {
    border-color: transparent;
    background: transparent;
    color: var(--text-heading);
}

.learn-directory-search-form button {
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    min-height: 42px;
    padding: 0;
    border-color: transparent;
    color: var(--text-heading);
}

.learn-directory-search-form button svg {
    width: 17px;
    height: 17px;
    fill: currentColor;
}

.learn-directory-summary {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    width: fit-content;
    min-height: 30px;
    padding: 0.3rem 0.75rem;
    border: 1px solid rgba(129, 144, 168, 0.2);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.46);
    color: var(--text-muted);
    font-size: 0.78rem;
    font-weight: 700;
}

.learn-directory-summary strong {
    color: var(--text-heading);
}

.learn-directory-summary > span {
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: var(--accent);
}

.learn-directory-group-list {
    display: grid;
    gap: 1.7rem;
    padding-top: 1.4rem;
}

.learn-directory-group {
    display: grid;
    gap: 0.75rem;
}

.learn-directory-group-header {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1rem;
}

.learn-directory-group-header h2 {
    margin: 0;
    color: var(--text-heading);
    font-size: clamp(1.25rem, 2vw, 1.55rem);
    letter-spacing: -0.02em;
}

.learn-directory-group-header span {
    color: var(--text-muted);
    font-size: 0.78rem;
    font-weight: 750;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    white-space: nowrap;
}

.learn-directory-card-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.15rem;
}

.learn-directory-card {
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-rows: auto minmax(4.1rem, auto) auto;
    gap: 0.65rem;
    align-content: start;
    justify-items: center;
    padding: 1.15rem 1.25rem;
    border: 1px solid rgba(129, 144, 168, 0.2);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.58);
    color: inherit;
    text-align: center;
    text-decoration: none;
    transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.learn-directory-card:hover,
.learn-directory-card:focus-visible {
    border-color: rgba(var(--accent-rgb), 0.3);
    background: rgba(255, 255, 255, 0.82);
    box-shadow: var(--shadow-sm);
    color: inherit;
    text-decoration: none;
}

.learn-directory-card-title-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.learn-directory-card h2 {
    margin: 0;
    color: var(--text-heading);
    font-size: 1.05rem;
    line-height: 1.25;
    letter-spacing: -0.015em;
}

.learn-directory-card p {
    align-self: start;
    margin: 0;
    color: var(--text-muted);
    font-size: 0.94rem;
    line-height: 1.5;
}

.learn-directory-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    align-items: center;
    justify-content: center;
}

.learn-directory-card-meta span {
    display: inline-flex;
    align-items: center;
    gap: 0.32rem;
    color: var(--text-muted);
    font-size: 0.76rem;
    font-weight: 700;
    line-height: 1.2;
}

.learn-directory-card-meta svg {
    width: 14px;
    height: 14px;
    flex: 0 0 auto;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
    opacity: 0.75;
}

.learn-directory-tag {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    min-height: 22px;
    padding: 0.16rem 0.48rem;
    border: 1px solid rgba(var(--accent-rgb), 0.24);
    border-radius: 4px;
    background: rgba(var(--accent-rgb), 0.08);
    color: var(--accent);
    font-size: 0.66rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    line-height: 1;
    text-transform: uppercase;
    white-space: nowrap;
}

.learn-directory-empty-state {
    padding: 1.5rem;
    border: 1px solid rgba(129, 144, 168, 0.2);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.58);
}

.learn-directory-empty-state h2 {
    margin: 0 0 0.4rem;
    color: var(--text-heading);
    font-size: 1.2rem;
}

.learn-directory-empty-state p {
    margin: 0;
    color: var(--text-muted);
}

html[data-theme="dark"] .learn-directory-search-form input[type="search"],
html[data-theme="dark"] .learn-directory-card,
html[data-theme="dark"] .learn-directory-empty-state {
    background: rgba(32, 37, 45, 0.72);
    border-color: var(--border);
}

html[data-theme="dark"] .learn-directory-summary,
html[data-theme="dark"] .learn-directory-tag {
    background: rgba(32, 37, 45, 0.7);
    border-color: var(--border);
}

html[data-theme="dark"] .learn-directory-card:hover,
html[data-theme="dark"] .learn-directory-card:focus-visible {
    background: rgba(39, 45, 54, 0.9);
}

@media (max-width: 760px) {
    .learn-directory-header {
        grid-template-columns: 1fr;
    }

    .learn-directory-card-list {
        grid-template-columns: 1fr;
    }
}

.library-search-form {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    max-width: 520px;
    margin-top: 1.3rem;
}

.library-search-form input[type="search"] {
    width: 100%;
    min-width: 0;
    height: 42px;
    padding: 0 0.85rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.68);
    color: var(--text);
    font: inherit;
    font-size: 0.94rem;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.library-search-form input[type="search"]:focus {
    outline: none;
    border-color: var(--accent);
    background: var(--surface-strong);
    box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.12);
}

.library-search-form button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 0.95rem;
    border: 1px solid var(--accent);
    border-radius: 8px;
    background: transparent;
    color: var(--accent);
    font: inherit;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    cursor: pointer;
}

.library-search-form button:hover {
    border-color: var(--accent-deep);
    background: rgba(var(--accent-rgb), 0.08);
    color: var(--accent-deep);
}

.library-list {
    display: grid;
    gap: 0.65rem;
}

.library-card {
    position: relative;
    overflow: hidden;
    display: grid;
    gap: 0.62rem;
    padding: 1.15rem 1.25rem;
    border: 1px solid rgba(129, 144, 168, 0.2);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.58);
    color: inherit;
    box-shadow: none;
    transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.library-card:hover,
.library-card:focus-within,
.library-card-link:focus-visible {
    border-color: rgba(var(--accent-rgb), 0.3);
    background: rgba(255, 255, 255, 0.82);
    box-shadow: var(--shadow-sm);
}

.library-card-link {
    color: inherit;
    text-decoration: none;
}

.library-card-link:hover {
    color: inherit;
    text-decoration: none;
}

.library-card h2,
.library-card h3 {
    margin: 0;
    color: var(--text-heading);
    font-size: 1.05rem;
    line-height: 1.25;
    letter-spacing: -0.015em;
}

.library-card p {
    max-width: 62rem;
    margin: 0;
    color: var(--text-muted);
    font-size: 0.94rem;
    line-height: 1.6;
}

.library-tag {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    min-height: 22px;
    padding: 0.16rem 0.48rem;
    border: 1px solid rgba(129, 144, 168, 0.24);
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.38);
    color: var(--text-muted);
    font-size: 0.66rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    line-height: 1;
    text-transform: uppercase;
    white-space: nowrap;
}

.library-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    min-width: 72px;
    min-height: 34px;
    padding: 0.4rem 0.8rem;
    border: 1px solid rgba(129, 144, 168, 0.24);
    border-radius: 6px;
    background: transparent;
    color: var(--text-heading);
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-align: center;
    text-transform: uppercase;
    text-decoration: none;
    transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.library-card:hover .library-action,
.library-card:focus-within .library-action,
.library-action:hover {
    border-color: rgba(var(--accent-rgb), 0.34);
    background: rgba(var(--accent-rgb), 0.08);
    color: var(--accent);
    text-decoration: none;
}

.library-empty-state {
    padding: 1.5rem;
    border: 1px solid rgba(129, 144, 168, 0.2);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.58);
    color: var(--text-muted);
}

.library-empty-state h2 {
    margin: 0 0 0.4rem;
    color: var(--text-heading);
    font-size: 1.2rem;
}

.library-empty-state p {
    margin: 0;
}

html[data-theme="dark"] .library-search-form input[type="search"],
html[data-theme="dark"] .library-card,
html[data-theme="dark"] .library-empty-state {
    background: rgba(32, 37, 45, 0.72);
    border-color: var(--border);
}

html[data-theme="dark"] .library-tag {
    background: rgba(32, 37, 45, 0.7);
    border-color: var(--border);
}

html[data-theme="dark"] .library-card:hover,
html[data-theme="dark"] .library-card:focus-within,
html[data-theme="dark"] .library-card-link:focus-visible {
    background: rgba(39, 45, 54, 0.9);
}

@media (max-width: 760px) {
    .tests-index-page {
        padding-top: 2.1rem;
    }

    .tests-index-header {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .tests-index-tools {
        max-width: 100%;
        justify-self: stretch;
        justify-items: stretch;
    }

    .tests-index-summary {
        justify-self: center;
    }

    .tests-search-form {
        align-items: stretch;
    }

    .tests-card {
        flex-direction: column;
    }

    .tests-card-action {
        align-self: center;
    }

    .library-search-form {
        max-width: 100%;
        align-items: stretch;
    }
}

@media (max-width: 520px) {
    .tests-search-form {
        flex-direction: row;
    }

    .tests-search-form button {
        width: 42px;
    }

    .library-search-form {
        flex-direction: column;
    }

    .library-search-form button {
        width: 100%;
    }
}

.ui-button {
    --ui-button-accent: var(--article-accent, var(--accent));
    --ui-button-accent-deep: var(--article-accent-deep, var(--accent-deep));
    --ui-button-accent-soft: var(--article-accent-soft, var(--accent-soft));
    --ui-button-bg: var(--surface-strong);
    --ui-button-border: var(--article-border, var(--border));
    --ui-button-text: var(--article-heading, var(--text-heading));
    --ui-button-shadow: 0 10px 24px rgba(var(--accent-rgb), 0.14);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    width: fit-content;
    min-height: 44px;
    padding: 0.78rem 1.2rem;
    border: 1px solid var(--ui-button-border);
    border-radius: 14px;
    background: var(--ui-button-bg);
    color: var(--ui-button-text) !important;
    font: inherit;
    font-size: 0.94rem;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    text-decoration: none !important;
    transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, color 0.18s ease;
}

.ui-button:hover {
    border-color: var(--ui-button-accent);
    color: var(--ui-button-accent) !important;
    text-decoration: none !important;
}

.ui-button:active {
    box-shadow: none;
}

.ui-button--primary {
    border-color: transparent;
    background: var(--ui-button-accent);
    color: #fff !important;
    box-shadow: var(--ui-button-shadow);
}

.ui-button--primary:hover {
    border-color: transparent;
    background: var(--ui-button-accent-deep);
    color: #fff !important;
}

.ui-button--secondary {
    background: var(--surface-strong);
    color: var(--ui-button-text) !important;
}

.ui-button--secondary:hover {
    background: var(--ui-button-accent-soft);
}

.ui-button--ghost {
    border-color: transparent;
    background: transparent;
    color: var(--ui-button-accent) !important;
}

.ui-button--ghost:hover {
    border-color: var(--ui-button-border);
    background: var(--ui-button-accent-soft);
}

.ui-button--sm {
    min-height: 36px;
    padding: 0.55rem 0.85rem;
    border-radius: 10px;
    font-size: 0.8rem;
}

.ui-button--lg {
    min-height: 50px;
    padding: 0.9rem 1.45rem;
    border-radius: 15px;
    font-size: 1rem;
}

.ui-button-icon {
    font-size: 1.08em;
    line-height: 1;
}

.ui-card-link {
    --ui-card-bg: var(--article-surface-elevated, var(--surface-strong));
    --ui-card-border: var(--article-border, var(--border));
    --ui-card-border-hover: var(--article-border-strong, var(--border-strong));
    --ui-card-heading: var(--article-heading, var(--text-heading));
    --ui-card-text: var(--article-text, var(--text-body));
    --ui-card-muted: var(--article-muted, var(--text-muted));
    --ui-card-accent: var(--article-accent, var(--accent));
    --ui-card-shadow: var(--article-shadow-sm, var(--shadow-sm));
    --ui-card-shadow-hover: var(--article-shadow-md, var(--shadow-md));
    --ui-card-radius: var(--article-radius-md, var(--radius-md));
    position: relative;
    display: flex;
    min-height: 148px;
    flex-direction: column;
    overflow: hidden;
    padding: 22px 20px;
    border: 1px solid var(--ui-card-border);
    border-radius: var(--ui-card-radius);
    background: var(--ui-card-bg);
    color: var(--ui-card-heading) !important;
    text-decoration: none !important;
    box-shadow: var(--ui-card-shadow);
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.ui-card-link::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 3px;
    background: var(--ui-card-accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.ui-card-link:hover {
    border-color: var(--ui-card-border-hover);
    color: var(--ui-card-heading) !important;
    box-shadow: var(--ui-card-shadow-hover);
    transform: translateY(-4px);
}

.ui-card-link:hover::after {
    transform: scaleX(1);
}

.ui-card-link-eyebrow {
    margin-bottom: 12px;
    color: var(--ui-card-accent);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    line-height: 1.25;
}

.ui-card-link-title {
    margin-bottom: auto;
    color: var(--ui-card-heading);
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.35;
    transition: color 0.15s ease;
}

.ui-card-link:hover .ui-card-link-title {
    color: var(--ui-card-accent);
}

.ui-card-link-description,
.ui-card-link-body {
    margin-top: 10px;
    color: var(--ui-card-muted);
    font-size: 0.94rem;
    line-height: 1.6;
}

.ui-card-link-arrow {
    margin-top: 16px;
    color: var(--ui-card-muted);
    transition: transform 0.15s ease, color 0.15s ease;
}

.ui-card-link:hover .ui-card-link-arrow {
    color: var(--ui-card-accent);
    transform: translateX(5px);
}

.ui-card-link-arrow svg {
    width: 16px;
    height: 16px;
}

.ui-card-link--compact {
    min-height: 120px;
    padding: 18px;
}

.ui-card-link--featured {
    min-height: 170px;
    padding: 24px;
}

.docs-list,
.reading-shell {
    border-radius: var(--radius-lg);
}

.docs-list {
    overflow: hidden;
}

.docs-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 1.15rem 1.3rem;
    border-bottom: 1px solid var(--border);
    color: inherit;
}

.docs-item:last-child {
    border-bottom: none;
}

.docs-item:hover {
    background: rgba(var(--accent-rgb), 0.035);
    color: inherit;
}

.docs-item-content {
    display: grid;
    gap: 0.28rem;
}

.docs-item-title {
    font-size: 1rem;
    font-weight: 700;
}

.docs-item-arrow {
    color: var(--text-soft);
    font-size: 1.2rem;
    transition: transform 0.18s ease, color 0.18s ease;
}

.docs-item:hover .docs-item-arrow {
    transform: translateX(3px);
    color: var(--accent);
}

.search-form {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
    align-items: center;
    padding: 1rem;
    margin-top: 1.25rem;
    border-radius: var(--radius-md);
}

.search-form input[type="text"],
.search-form input[type="search"],
.search-form input:not([type]),
.search-form input[name="q"],
.field textarea,
.field input[type="number"],
.tool-output textarea {
    width: 100%;
    min-width: min(100%, 260px);
    padding: 0.85rem 0.95rem;
    border: 1px solid var(--border);
    border-radius: 0.9rem;
    background: var(--surface-strong);
    color: var(--text-heading);
    font: inherit;
}

.search-form input[name="q"] {
    flex: 1 1 320px;
}

.search-form input:focus,
.field textarea:focus,
.field input[type="number"]:focus,
.tool-output textarea:focus {
    outline: 2px solid rgba(var(--accent-rgb), 0.16);
    border-color: rgba(var(--accent-rgb), 0.38);
}

.tool-form,
.tool-output,
.tool-meta {
    margin-top: 1rem;
}

.tool-hint {
    margin-top: 1rem;
    color: var(--text-muted);
}

.tool-form {
    display: grid;
    gap: 1rem;
}

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

.field {
    display: grid;
    gap: 0.45rem;
}

.field-wide {
    grid-column: 1 / -1;
}

.field label,
.field legend {
    color: var(--text-heading);
    font-weight: 700;
}

.field textarea,
.tool-output textarea {
    min-height: 8rem;
    resize: vertical;
}

.choice {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tool-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    align-items: center;
}

.tool-errors {
    margin-top: 1rem;
    border: 1px solid var(--danger-border);
    background: var(--danger-bg);
    color: var(--danger);
    border-radius: 1rem;
    padding: 0.85rem 1rem;
}

.tool-errors p + p {
    margin-top: 0.5rem;
}

.alphabet-map {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.alphabet-map span {
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 0.35rem 0.65rem;
    background: var(--surface-soft);
    color: var(--text-heading);
    font-size: 0.92rem;
}

.reading-shell {
    padding: 1rem;
}

.prose-card {
    padding: 1.6rem;
}

.markdown-content h1,
.markdown-content h2,
.markdown-content h3 {
    margin-top: 1.4rem;
    margin-bottom: 0.7rem;
}

.markdown-content p + p,
.markdown-content ul + p,
.markdown-content p + ul {
    margin-top: 1rem;
}

.markdown-content ul {
    padding-left: 1.2rem;
}

.markdown-content li + li {
    margin-top: 0.4rem;
}

.site-footer {
    margin-top: 2rem;
    padding: 0.85rem 0;
    border-top: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(14px);
}

body.route-learn-show .site-footer,
body.route-donate .site-footer,
body.route-contact .site-footer {
    margin-top: 0;
}

.docs-home-footer {
    border-top: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: none;
}

html[data-theme="dark"] .btn-secondary,
html[data-theme="dark"] .btn-alt {
    background: var(--surface-strong);
}

html[data-theme="dark"] .btn-secondary:hover,
html[data-theme="dark"] .btn-alt:hover {
    background: var(--surface-soft);
}

html[data-theme="dark"] .site-footer,
html[data-theme="dark"] .docs-home-footer {
    background: var(--surface-strong);
}

html[data-theme="dark"] .code-window {
    background: #0d1014;
    border-color: rgba(255, 255, 255, 0.06);
}

html[data-theme="dark"] .code-header {
    background: rgba(255, 255, 255, 0.03);
    border-bottom-color: rgba(255, 255, 255, 0.08);
}

.site-footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    color: var(--text-muted);
    font-size: 14px;
    font-family: var(--font-sans);
}

.docs-footer-links {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    font-family: var(--font-sans);
}

.docs-footer-links a {
    color: var(--text-muted);
    transition: color 0.15s ease;
}

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

.back-to-top {
    position: fixed;
    right: calc(22px + env(safe-area-inset-right));
    bottom: calc(22px + env(safe-area-inset-bottom));
    z-index: 110;
    display: inline-flex;
    width: 46px;
    height: 46px;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(148, 163, 184, 0.46);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.88);
    color: var(--text-heading);
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.14);
    opacity: 0;
    pointer-events: none;
    transform: translateY(10px) scale(0.98);
    transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, color 0.18s ease, opacity 0.22s ease, transform 0.22s ease;
    cursor: pointer;
}

.back-to-top.is-visible {
    opacity: 0.92;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

.back-to-top:hover,
.back-to-top:focus-visible {
    border-color: rgba(var(--accent-rgb), 0.4);
    background: #ffffff;
    color: var(--accent-deep);
    box-shadow: 0 18px 38px rgba(15, 23, 42, 0.18);
    opacity: 1;
}

.back-to-top:focus-visible {
    outline: 3px solid rgba(var(--accent-rgb), 0.24);
    outline-offset: 4px;
}

.back-to-top svg {
    width: 20px;
    height: 20px;
}

html[data-theme="dark"] .back-to-top {
    border-color: rgba(148, 163, 184, 0.28);
    background: rgba(20, 26, 36, 0.88);
    color: #e5edf7;
    box-shadow: 0 18px 38px rgba(0, 0, 0, 0.32);
}

html[data-theme="dark"] .back-to-top:hover,
html[data-theme="dark"] .back-to-top:focus-visible {
    border-color: rgba(147, 197, 253, 0.46);
    background: #1b2432;
    color: #bfdbfe;
}

.account-page {
    display: grid;
    gap: 0.65rem;
    max-width: 1040px;
}

body.route-sign-in .account-page,
body.route-register .account-page,
body.route-password-request .account-page,
body.route-password-reset .account-page {
    max-width: 560px;
}

.account-panel {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(129, 144, 168, 0.2);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.58);
    box-shadow: none;
    padding: 1.15rem 1.25rem;
    transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.account-panel:hover,
.account-panel:focus-within,
.account-demographics:hover,
.account-demographics:focus-within,
.account-result-card:hover,
.account-result-card:focus-within,
.account-empty-state:hover,
.account-empty-state:focus-within {
    border-color: rgba(var(--accent-rgb), 0.3);
    background: rgba(255, 255, 255, 0.82);
    box-shadow: var(--shadow-sm);
}

.account-form {
    display: grid;
    gap: 1rem;
}

.account-field {
    display: grid;
    gap: 0.4rem;
}

.account-field label,
.account-field > span,
.account-checkbox {
    color: var(--text-heading);
    font-size: 0.94rem;
    font-weight: 650;
}

.account-field input,
.account-field select {
    width: 100%;
    border: 1px solid rgba(129, 144, 168, 0.24);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.68);
    color: var(--text);
    font: inherit;
    padding: 0.75rem 0.85rem;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.account-field input:focus,
.account-field select:focus {
    border-color: rgba(var(--accent-rgb), 0.58);
    background: var(--surface-strong);
    box-shadow: 0 0 0 4px rgba(var(--accent-rgb), 0.1);
    outline: none;
}

.account-field p {
    margin: 0;
    color: #b42318;
    font-size: 0.88rem;
}

.account-checkbox {
    display: flex;
    gap: 0.55rem;
    align-items: center;
}

.account-checkbox input {
    width: 1rem;
    height: 1rem;
    accent-color: var(--accent);
}

.account-button {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--accent);
    border-radius: 8px;
    background: transparent;
    color: var(--accent);
    cursor: pointer;
    font: inherit;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    min-height: 42px;
    padding: 0 0.95rem;
    text-transform: uppercase;
    transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.account-button:hover,
.account-button:focus-visible {
    border-color: var(--accent-deep);
    background: rgba(var(--accent-rgb), 0.08);
    color: var(--accent-deep);
}

.account-button-secondary {
    color: var(--text-heading);
    border-color: rgba(129, 144, 168, 0.24);
}

.account-button-secondary:hover,
.account-button-secondary:focus-visible {
    background: var(--accent-soft);
    color: var(--accent-deep);
}

.account-alert {
    border-radius: 8px;
    margin-bottom: 1rem;
    padding: 0.82rem 0.95rem;
    font-weight: 650;
}

.account-alert-error {
    border: 1px solid rgba(180, 35, 24, 0.22);
    background: #fff1f0;
    color: #912018;
}

.account-alert-success {
    border: 1px solid rgba(22, 101, 52, 0.2);
    background: #ecfdf3;
    color: #166534;
}

.account-switch {
    margin: 1.2rem 0 0;
    color: var(--text-muted);
}

.account-switch a {
    color: var(--accent-deep);
    font-weight: 750;
}

.account-summary {
    display: grid;
    gap: 0;
    margin: 0 0 1.3rem;
    border: 1px solid rgba(129, 144, 168, 0.2);
    border-radius: 8px;
    overflow: hidden;
}

.account-summary div {
    display: grid;
    gap: 0.2rem;
    border-bottom: 1px solid rgba(129, 144, 168, 0.2);
    padding: 0.85rem 0.95rem;
    background: rgba(255, 255, 255, 0.36);
}

.account-summary div:last-child {
    border-bottom: 0;
}

.account-summary dt {
    color: var(--text-muted);
    font-size: 0.82rem;
    font-weight: 750;
    text-transform: uppercase;
}

.account-summary dd {
    margin: 0.16rem 0 0;
    color: var(--text-heading);
    font-weight: 650;
}

.account-results {
    margin-top: 0.7rem;
}

.account-demographics {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(129, 144, 168, 0.2);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.58);
    box-shadow: none;
    margin-top: 0;
    padding: 1.15rem 1.25rem;
    transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.account-demographics summary {
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    list-style: none;
}

.account-demographics summary::-webkit-details-marker {
    display: none;
}

.account-demographics summary strong {
    display: block;
    color: var(--text-heading);
    font-size: 1.02rem;
    letter-spacing: -0.015em;
}

.account-demographics summary small {
    display: block;
    margin-top: 0.18rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.account-demographics[open] .account-result-summary-action,
.account-demographics details[open] .account-result-summary-action {
    border-color: rgba(var(--accent-rgb), 0.34);
    background: rgba(var(--accent-rgb), 0.08);
    color: var(--accent);
}

.account-demographics-form {
    border-top: 1px solid var(--border);
    display: grid;
    gap: 1rem;
    margin-top: 1rem;
    padding-top: 1rem;
}

.account-demographics-form > p {
    margin: 0;
    color: var(--text-muted);
}

.account-demographics-grid {
    display: grid;
    gap: 0.9rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.account-results-header {
    display: flex;
    gap: 1rem;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.account-results-header h2 {
    margin: 0;
    color: var(--text-heading);
    font-size: clamp(1.35rem, 2vw, 1.75rem);
}

.account-results-header p {
    margin: 0.25rem 0 0;
    color: var(--text-muted);
}

.account-results-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0.4rem 0.8rem;
    border: 1px solid rgba(129, 144, 168, 0.24);
    border-radius: 6px;
    color: var(--text-heading);
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    text-decoration: none;
    white-space: nowrap;
}

.account-results-link:hover {
    border-color: rgba(var(--accent-rgb), 0.34);
    background: rgba(var(--accent-rgb), 0.08);
    color: var(--accent);
}

.account-result-card,
.account-empty-state {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(129, 144, 168, 0.2);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.58);
    box-shadow: none;
    padding: 1.15rem 1.25rem;
    transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.account-result-card + .account-result-card {
    margin-top: 0.65rem;
}

.account-empty-state h3 {
    margin: 0;
    color: var(--text-heading);
}

.account-empty-state p,
.account-result-empty {
    margin: 0.25rem 0 0;
    color: var(--text-muted);
}

.account-empty-state a {
    flex: 0 0 auto;
}

.account-result-details summary {
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    list-style: none;
}

.account-result-details summary::-webkit-details-marker {
    display: none;
}

.account-result-summary-copy {
    display: grid;
    gap: 0.18rem;
}

.account-result-summary-copy strong {
    color: var(--text-heading);
    font-size: 1.05rem;
}

.account-result-summary-copy span {
    color: var(--text-muted);
}

.account-result-summary-action {
    border: 1px solid rgba(129, 144, 168, 0.24);
    border-radius: 6px;
    color: var(--text-heading);
    flex: 0 0 auto;
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    padding: 0.4rem 0.75rem;
    text-transform: uppercase;
}

.account-result-details[open] .account-result-summary-action {
    border-color: rgba(var(--accent-rgb), 0.34);
    background: rgba(var(--accent-rgb), 0.08);
    color: var(--accent);
}

.account-result-body {
    border-top: 1px solid var(--border);
    margin-top: 1rem;
    padding-top: 1rem;
}

.account-result-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.account-result-actions a,
.account-result-actions button {
    color: var(--accent);
    font: inherit;
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.account-result-actions button {
    border: 0;
    background: transparent;
    cursor: pointer;
    padding: 0;
    text-decoration: underline;
}

.account-result-sloan {
    display: grid;
    gap: 0.35rem;
    border: 1px solid rgba(129, 144, 168, 0.2);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.48);
    margin-bottom: 1rem;
    padding: 0.9rem;
}

.account-result-sloan span {
    display: block;
    color: var(--text-muted);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.account-result-sloan strong {
    display: block;
    color: var(--text-heading);
    font-size: 2rem;
    letter-spacing: 0.08em;
    line-height: 1.1;
}

.account-result-sloan p {
    margin: 0;
    color: var(--text-muted);
    font-weight: 650;
}

.account-score-explanation {
    display: grid;
    gap: 0.35rem;
    border: 1px solid rgba(129, 144, 168, 0.2);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.42);
    margin-bottom: 1rem;
    padding: 0.85rem 0.9rem;
}

.account-score-explanation strong {
    color: var(--text-heading);
    font-size: 0.92rem;
}

.account-score-explanation p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.92rem;
    line-height: 1.5;
}

.account-sloan-explanation {
    display: grid;
    gap: 0.6rem;
    border-top: 1px solid var(--border);
    margin-top: 0.65rem;
    padding-top: 0.8rem;
}

.account-sloan-explanation h3 {
    margin: 0;
    color: var(--text-heading);
    font-size: 1rem;
}

.account-sloan-table-wrap {
    overflow-x: auto;
}

.account-sloan-explanation table {
    width: 100%;
    min-width: 740px;
    border-collapse: collapse;
    font-size: 0.88rem;
}

.account-sloan-explanation th,
.account-sloan-explanation td {
    border-top: 1px solid var(--border);
    padding: 0.55rem 0.45rem;
    text-align: left;
    vertical-align: top;
}

.account-sloan-explanation th {
    color: var(--text-heading);
    font-weight: 850;
}

.account-sloan-explanation th:nth-child(2),
.account-sloan-explanation th:nth-child(3),
.account-sloan-explanation th:nth-child(4),
.account-sloan-explanation th:nth-child(5),
.account-sloan-explanation th:nth-child(6),
.account-sloan-explanation td:nth-child(2),
.account-sloan-explanation td:nth-child(3),
.account-sloan-explanation td:nth-child(4),
.account-sloan-explanation td:nth-child(5),
.account-sloan-explanation td:nth-child(6) {
    text-align: center;
}

.account-result-grid {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.account-result-trait {
    border: 1px solid rgba(129, 144, 168, 0.2);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.46);
    padding: 0.85rem;
}

.account-result-trait-head {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    justify-content: space-between;
    color: var(--text-heading);
}

.account-result-trait-head span {
    color: var(--text-muted);
    font-size: 0.88rem;
    font-weight: 750;
    white-space: nowrap;
}

.account-result-meter {
    height: 0.46rem;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.22);
    margin: 0.65rem 0 0.5rem;
}

.account-result-meter span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--accent);
}

.account-result-trait p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.88rem;
}

.account-empty-state {
    text-align: left;
}

.account-empty-state .account-button {
    margin-top: 1rem;
    text-decoration: none;
}

html[data-theme="dark"] .account-field p {
    color: #fca5a5;
}

html[data-theme="dark"] .account-alert-error {
    background: rgba(127, 29, 29, 0.24);
    color: #fecaca;
}

html[data-theme="dark"] .account-alert-success {
    background: rgba(20, 83, 45, 0.24);
    color: #bbf7d0;
}

html[data-theme="dark"] .account-panel,
html[data-theme="dark"] .account-demographics,
html[data-theme="dark"] .account-result-card,
html[data-theme="dark"] .account-empty-state {
    border-color: var(--border);
    background: rgba(32, 37, 45, 0.72);
}

html[data-theme="dark"] .account-panel:hover,
html[data-theme="dark"] .account-panel:focus-within,
html[data-theme="dark"] .account-demographics:hover,
html[data-theme="dark"] .account-demographics:focus-within,
html[data-theme="dark"] .account-result-card:hover,
html[data-theme="dark"] .account-result-card:focus-within,
html[data-theme="dark"] .account-empty-state:hover,
html[data-theme="dark"] .account-empty-state:focus-within {
    background: rgba(39, 45, 54, 0.9);
}

html[data-theme="dark"] .account-field input,
html[data-theme="dark"] .account-field select,
html[data-theme="dark"] .account-summary div,
html[data-theme="dark"] .account-result-sloan,
html[data-theme="dark"] .account-score-explanation,
html[data-theme="dark"] .account-result-trait {
    border-color: var(--border);
    background: rgba(39, 45, 54, 0.74);
}

@media (max-width: 720px) {
    .account-results-header,
    .account-result-details summary,
    .account-result-actions {
        align-items: flex-start;
        flex-direction: column;
    }

    .account-result-grid {
        grid-template-columns: 1fr;
    }

    .account-demographics-grid {
        grid-template-columns: 1fr;
    }

    .account-button,
    .account-results-link {
        width: 100%;
    }

    .account-result-summary-action {
        width: 100%;
        text-align: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    .back-to-top {
        transition: opacity 0.01s linear;
        transform: none;
    }

    .back-to-top.is-visible {
        transform: none;
    }
}

.tools-index-page .tools-hero,
.learn-index-page .learn-hero {
    padding: 1.55rem 0 0.8rem;
}

.tools-index-page .tools-hero {
    padding: 0.9rem 0 0.8rem;
}

.learn-index-page .learn-hero {
    padding: 0.95rem 0 0.55rem;
}

.page-search-hero-shell {
    padding: 10px;
    background: rgba(255, 255, 255, 0.58);
    border: 1px solid rgba(202, 213, 229, 0.9);
    border-radius: 24px;
    box-shadow: 0 10px 30px rgba(20, 40, 80, 0.08);
}

.page-search-hero-copy {
    max-width: none;
}

.page-search-hero-panel {
    padding: 20px 20px 18px;
    background: linear-gradient(180deg, #f7f9fc 0%, #eef3f9 100%);
    border: 1px solid #cad5e5;
    border-radius: 20px;
}

.page-search-hero-heading {
    display: grid;
    grid-template-columns: 1fr;
    align-items: start;
    column-gap: 0;
    row-gap: 18px;
}

.page-search-hero-heading p {
    margin: 0;
    max-width: none;
    font-size: 0.98rem;
    line-height: 1.55;
}

.page-search-hero-intro {
    max-width: 46rem;
    margin-inline: auto;
    text-align: center;
}

.page-search-hero-intro p {
    max-width: 36ch;
    margin-inline: auto;
    font-size: 0.98rem;
    line-height: 1.38;
    color: #5f718d;
}

.page-search-hero-search-panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 100%;
    max-width: none;
}

.page-search-form {
    position: relative;
    margin-top: 0;
    width: 100%;
    padding: 0;
    gap: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
    display: block;
}

.page-search-input,
.page-search-form input[name="q"] {
    width: 100%;
    min-width: 0;
    height: 62px;
    padding: 0 52px 0 18px;
    border-radius: 15px;
    border: 1px solid #cad5e5;
    background: #ffffff;
    font: inherit;
    font-size: 1rem;
    color: #12284a;
    outline: none;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.page-search-input::placeholder,
.page-search-form input[name="q"]::placeholder {
    color: #7d8eaa;
}

.page-search-input:focus,
.page-search-form input[name="q"]:focus {
    border-color: rgba(59, 118, 234, 0.62);
    box-shadow: 0 0 0 4px rgba(59, 118, 234, 0.11);
    background: #ffffff;
}

.page-search-form button {
    width: auto;
    min-width: auto;
    min-height: auto;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
}

.page-search-form .page-search-icon-btn {
    position: absolute;
    top: 50%;
    right: 8px;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: #6d7f9c;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.page-search-form .page-search-icon-btn:hover {
    background: #edf3fb;
    color: #3b76ea;
}

.page-search-form .page-search-icon-btn:active {
    transform: translateY(-50%) scale(0.98);
}

.page-search-form .page-search-icon-btn svg {
    width: 19px;
    height: 19px;
    stroke: currentColor;
}

html[data-theme="dark"] .page-search-hero-shell {
    background: var(--surface);
    border-color: var(--border);
    box-shadow: var(--shadow-sm);
}

html[data-theme="dark"] .page-search-hero-panel {
    background: linear-gradient(180deg, #20242a 0%, #181b1f 100%);
    border-color: var(--border);
}

html[data-theme="dark"] .page-search-hero-intro p {
    color: #9aa2ab;
}

html[data-theme="dark"] .page-search-form {
    background: transparent;
    border-color: transparent;
}

html[data-theme="dark"] .page-search-input,
html[data-theme="dark"] .page-search-form input[name="q"] {
    border-color: #2a3037;
    background: #181b1f;
    color: #f1f3f5;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
}

html[data-theme="dark"] .page-search-input::placeholder,
html[data-theme="dark"] .page-search-form input[name="q"]::placeholder {
    color: #8e98a4;
}

html[data-theme="dark"] .page-search-input:focus,
html[data-theme="dark"] .page-search-form input[name="q"]:focus {
    border-color: rgba(110, 168, 255, 0.55);
    box-shadow: 0 0 0 4px rgba(110, 168, 255, 0.12);
    background: #181b1f;
}

html[data-theme="dark"] .page-search-form .page-search-icon-btn {
    color: #9aa2ab;
}

html[data-theme="dark"] .page-search-form .page-search-icon-btn:hover {
    background: rgba(110, 168, 255, 0.12);
    color: #6ea8ff;
}

.tools-index-page .tools-hero-shell,
.learn-index-page .learn-hero-shell {
    padding: 1.35rem 1.5rem 1.2rem;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(129, 144, 168, 0.18);
    border-radius: 16px;
    box-shadow: 0 14px 34px rgba(15, 23, 47, 0.05);
}

.tools-index-page .tools-hero-shell {
    padding: 10px;
    background: rgba(255, 255, 255, 0.58);
    border: 1px solid rgba(202, 213, 229, 0.9);
    border-radius: 24px;
    box-shadow: 0 10px 30px rgba(20, 40, 80, 0.08);
}

.learn-index-page .learn-hero-shell {
    padding: 10px;
    background: rgba(255, 255, 255, 0.58);
    border: 1px solid rgba(202, 213, 229, 0.9);
    border-radius: 24px;
    box-shadow: 0 10px 30px rgba(20, 40, 80, 0.08);
}

.tools-index-page .tools-hero-copy,
.learn-index-page .learn-hero-copy {
    max-width: none;
}

.tools-index-page .tools-hero-copy {
    max-width: none;
}

.tools-index-page .tools-hero-panel {
    padding: 20px 20px 18px;
    background: linear-gradient(180deg, #f7f9fc 0%, #eef3f9 100%);
    border: 1px solid #cad5e5;
    border-radius: 20px;
}

.learn-index-page .learn-hero-panel {
    padding: 22px 24px 22px;
    background: linear-gradient(180deg, #f7f9fc 0%, #eef3f9 100%);
    border: 1px solid #cad5e5;
    border-radius: 20px;
}

.tools-index-page .tools-hero-heading,
.learn-index-page .learn-hero-heading {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: end;
    column-gap: 1.5rem;
    row-gap: 0.5rem;
}

.tools-index-page .tools-hero-heading {
    grid-template-columns: 1fr;
    align-items: start;
    column-gap: 0;
    row-gap: 18px;
}

.learn-index-page .learn-hero-heading {
    grid-template-columns: 1fr;
    align-items: start;
    column-gap: 0;
    row-gap: 20px;
}

.tools-index-page .tools-hero-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    margin-bottom: 1rem;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent);
    font-family: var(--font-sans);
    font-size: 13px;
    font-weight: 600;
}

.tools-index-page .page-head h1,
.learn-index-page .page-head h1 {
    font-size: clamp(2.1rem, 4.6vw, 2.95rem);
    margin-bottom: 0;
    letter-spacing: -0.035em;
}

.tools-index-page .page-head h1 {
    margin: 0 0 6px;
    font-size: clamp(2.2rem, 5vw, 3.65rem);
    line-height: 0.95;
    letter-spacing: -0.045em;
    font-weight: 800;
    color: #0e2548;
}

.learn-index-page .page-head h1 {
    margin: 0 0 6px;
    font-size: clamp(2.2rem, 5vw, 3.65rem);
    line-height: 0.95;
    letter-spacing: -0.045em;
    font-weight: 800;
    color: #0e2548;
}

.tools-index-page .tools-hero-heading p,
.learn-index-page .learn-hero-heading p {
    margin: 0;
    max-width: none;
    font-size: 0.98rem;
    line-height: 1.55;
}

.tools-index-page .tools-hero-intro {
    max-width: 46rem;
    margin-inline: auto;
    text-align: center;
}

.tools-index-page .tools-hero-intro p {
    max-width: 36ch;
    margin-inline: auto;
    font-size: 0.98rem;
    line-height: 1.38;
    color: #5f718d;
}

.learn-index-page .learn-hero-intro {
    max-width: 42rem;
    margin-inline: auto;
    text-align: center;
}

.learn-index-page .learn-hero-intro p {
    max-width: 34ch;
    margin-inline: auto;
    font-size: 0.98rem;
    line-height: 1.42;
    color: #5f718d;
}

.tools-index-page .tools-hero-search-panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 100%;
}

.learn-index-page .learn-hero-search-panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 100%;
    max-width: none;
}

.learn-index-page .section {
    padding-top: 1.15rem;
}

.tools-index-page .tools-search-form,
.learn-index-page .learn-search-form {
    margin-top: 1rem;
    padding: 0.7rem;
    background: #f8fbff;
    border: 1px solid rgba(129, 144, 168, 0.18);
    border-radius: 12px;
    box-shadow: none;
}

.tools-index-page .tools-search-form {
    position: relative;
    margin-top: 0;
    width: 100%;
    padding: 0;
    gap: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
    display: block;
}

.learn-index-page .learn-search-form {
    position: relative;
    margin-top: 0;
    width: 100%;
    padding: 0;
    gap: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
    display: block;
}

.tools-index-page .tools-hero-heading .tools-search-form {
    width: 100%;
}

.learn-index-page .learn-hero-heading .learn-search-form {
    width: 100%;
}

.tools-index-page .tools-search-input,
.tools-index-page .tools-search-form input[name="q"] {
    width: 100%;
    min-width: 0;
    height: 62px;
    padding: 0 52px 0 18px;
    border-radius: 15px;
    border: 1px solid #cad5e5;
    background: #ffffff;
    font: inherit;
    font-size: 1rem;
    color: #12284a;
    outline: none;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.learn-index-page .learn-search-form input[name="q"] {
    width: 100%;
    min-width: 0;
    height: 62px;
    padding: 0 52px 0 18px;
    border-radius: 15px;
    border: 1px solid #cad5e5;
    background: #ffffff;
    font: inherit;
    font-size: 1rem;
    color: #12284a;
    outline: none;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

html[data-theme="dark"] .tools-index-page .tools-hero-shell,
html[data-theme="dark"] .learn-index-page .learn-hero-shell {
    background: var(--surface);
    border-color: var(--border);
    box-shadow: var(--shadow-sm);
}

html[data-theme="dark"] .tools-index-page .tools-hero-panel {
    background: linear-gradient(180deg, #20242a 0%, #181b1f 100%);
    border-color: var(--border);
}

html[data-theme="dark"] .learn-index-page .learn-hero-panel {
    background: linear-gradient(180deg, #20242a 0%, #181b1f 100%);
    border-color: var(--border);
}

html[data-theme="dark"] .tools-index-page .page-head h1 {
    color: #f1f3f5;
}

html[data-theme="dark"] .tools-index-page .tools-hero-intro p {
    color: #9aa2ab;
}

html[data-theme="dark"] .learn-index-page .page-head h1 {
    color: #f1f3f5;
}

html[data-theme="dark"] .learn-index-page .learn-hero-intro p {
    color: #9aa2ab;
}

html[data-theme="dark"] .tools-index-page .tools-search-form,
html[data-theme="dark"] .learn-index-page .learn-search-form {
    background: var(--surface-soft);
    border-color: var(--border);
}

html[data-theme="dark"] .tools-index-page .tools-search-form {
    background: transparent;
    border-color: transparent;
}

html[data-theme="dark"] .learn-index-page .learn-search-form {
    background: transparent;
    border-color: transparent;
}

html[data-theme="dark"] .tools-index-page .tools-search-input,
html[data-theme="dark"] .tools-index-page .tools-search-form input[name="q"] {
    border-color: #2a3037;
    background: #181b1f;
    color: #f1f3f5;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
}

html[data-theme="dark"] .learn-index-page .learn-search-form input[name="q"] {
    border-color: #2a3037;
    background: #181b1f;
    color: #f1f3f5;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
}

html[data-theme="dark"] .tools-index-page .tools-search-input::placeholder,
html[data-theme="dark"] .tools-index-page .tools-search-form input[name="q"]::placeholder {
    color: #8e98a4;
}

html[data-theme="dark"] .learn-index-page .learn-search-form input[name="q"]::placeholder {
    color: #8e98a4;
}

html[data-theme="dark"] .tools-index-page .tools-search-input:focus,
html[data-theme="dark"] .tools-index-page .tools-search-form input[name="q"]:focus {
    border-color: rgba(110, 168, 255, 0.55);
    box-shadow: 0 0 0 4px rgba(110, 168, 255, 0.12);
    background: #181b1f;
}

html[data-theme="dark"] .learn-index-page .learn-search-form input[name="q"]:focus {
    border-color: rgba(110, 168, 255, 0.55);
    box-shadow: 0 0 0 4px rgba(110, 168, 255, 0.12);
    background: #181b1f;
}

html[data-theme="dark"] .tools-index-page .tools-search-form .tools-search-icon-btn {
    color: #9aa2ab;
}

html[data-theme="dark"] .tools-index-page .tools-search-form .tools-search-icon-btn:hover {
    background: rgba(110, 168, 255, 0.12);
    color: #6ea8ff;
}

html[data-theme="dark"] .learn-index-page .learn-search-form .learn-search-icon-btn {
    color: #9aa2ab;
}

html[data-theme="dark"] .learn-index-page .learn-search-form .learn-search-icon-btn:hover {
    background: rgba(110, 168, 255, 0.12);
    color: #6ea8ff;
}

html[data-theme="dark"] .tools-index-page .tools-popular-section .card,
html[data-theme="dark"] .tools-index-page .tools-category-section .card {
    background: var(--surface-strong);
    border-color: var(--border);
    box-shadow: var(--shadow-sm);
}

html[data-theme="dark"] .tools-index-page .tools-popular-section .card:hover,
html[data-theme="dark"] .tools-index-page .tools-category-section .card:hover {
    border-color: var(--border-strong);
    box-shadow: var(--shadow-md);
}

.learn-index-page .learn-search-form input[name="q"] {
    padding: 0.72rem 0.95rem;
    border-radius: 12px;
}

.tools-index-page .tools-search-input,
.tools-index-page .tools-search-form input[name="q"] {
    padding: 0 52px 0 18px;
    border-radius: 15px;
}

.tools-index-page .tools-search-input::placeholder,
.tools-index-page .tools-search-form input[name="q"]::placeholder {
    color: #7d8eaa;
}

.tools-index-page .tools-search-input:focus,
.tools-index-page .tools-search-form input[name="q"]:focus {
    border-color: rgba(59, 118, 234, 0.62);
    box-shadow: 0 0 0 4px rgba(59, 118, 234, 0.11);
    background: #ffffff;
}

.tools-index-page .tools-search-form button,
.learn-index-page .learn-search-form button {
    min-width: 8.5rem;
    min-height: 3rem;
    padding: 0.7rem 1.1rem;
    border-radius: 10px;
}

.tools-index-page .tools-search-form button {
    width: auto;
    min-width: auto;
    min-height: auto;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
}

.tools-index-page .tools-search-form .tools-search-icon-btn {
    position: absolute;
    top: 50%;
    right: 8px;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: #6d7f9c;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.tools-index-page .tools-search-form .tools-search-icon-btn:hover {
    background: #edf3fb;
    color: #3b76ea;
}

.tools-index-page .tools-search-form .tools-search-icon-btn:active {
    transform: translateY(-50%) scale(0.98);
}

.tools-index-page .tools-search-form .tools-search-icon-btn svg {
    width: 19px;
    height: 19px;
    stroke: currentColor;
}

.learn-index-page .learn-search-form button {
    width: auto;
    min-width: auto;
    min-height: auto;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
}

.learn-index-page .learn-search-form .learn-search-icon-btn {
    position: absolute;
    top: 50%;
    right: 8px;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: #6d7f9c;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.learn-index-page .learn-search-form .learn-search-icon-btn:hover {
    background: #edf3fb;
    color: #3b76ea;
}

.learn-index-page .learn-search-form .learn-search-icon-btn:active {
    transform: translateY(-50%) scale(0.98);
}

.learn-index-page .learn-search-form .learn-search-icon-btn svg {
    width: 19px;
    height: 19px;
    stroke: currentColor;
}

.learn-index-page .learn-sections-area,
.learn-index-page .learn-results-section {
    padding-top: 0.65rem;
    padding-bottom: 1.1rem;
}

.learn-index-page .learn-section-stack {
    display: grid;
    gap: 22px;
}

.learn-index-page .learn-section-block {
    display: grid;
    gap: 14px;
}

.learn-index-page .learn-section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.learn-index-page .learn-section-head h2 {
    margin: 0;
    font-size: 1.55rem;
    line-height: 1.1;
    letter-spacing: -0.04em;
    color: var(--text-heading);
}

.learn-index-page .learn-section-head p {
    margin: 6px 0 0;
    max-width: 42rem;
    color: var(--text-muted);
    line-height: 1.65;
}

.learn-index-page .learn-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.learn-index-page .learn-articles {
    display: grid;
    gap: 14px;
}

.learn-index-page .learn-card {
    background: #ffffff;
    border: 1px solid #d8e1ee;
    border-radius: 22px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
    color: inherit;
}

.learn-index-page .learn-start-card,
.learn-index-page .learn-topic-card,
.learn-index-page .learn-article-card {
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.learn-index-page .learn-start-card:hover,
.learn-index-page .learn-topic-card:hover,
.learn-index-page .learn-article-card:hover {
    color: inherit;
}

.learn-index-page .learn-start-card {
    padding: 18px;
    display: flex;
    flex-direction: column;
    min-height: 232px;
}

.learn-index-page .learn-eyebrow {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    background: #e7eefb;
    color: #0d3774;
    font-size: 0.79rem;
    font-weight: 800;
    margin-bottom: 12px;
}

.learn-index-page .learn-start-card h3,
.learn-index-page .learn-topic-card h3,
.learn-index-page .learn-article-copy h3 {
    margin: 0;
    color: var(--text-heading);
    letter-spacing: -0.03em;
}

.learn-index-page .learn-start-card h3,
.learn-index-page .learn-topic-card h3 {
    margin-bottom: 10px;
    font-size: 1.12rem;
    line-height: 1.2;
}

.learn-index-page .learn-fade-copy {
    position: relative;
    flex: 1 1 auto;
    min-height: 78px;
}

.learn-index-page .learn-fade-copy p {
    margin: 0;
    color: var(--text-muted);
    line-height: 1.62;
    font-size: 0.95rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: calc(1.62em * 3);
    max-height: calc(1.62em * 3);
}

.learn-index-page .learn-fade-copy::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 1.35em;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0), #ffffff 90%);
    pointer-events: none;
}

.learn-index-page .learn-card-link {
    margin-top: 16px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #0d3774;
    font-weight: 700;
    font-size: 0.94rem;
}

.learn-index-page .learn-topic-card {
    padding: 18px;
}

.learn-index-page .learn-topic-card p {
    margin: 0;
    color: var(--text-muted);
    line-height: 1.62;
    font-size: 0.95rem;
}

.learn-index-page .learn-topic-meta {
    margin-top: 12px;
    font-size: 0.9rem;
    font-weight: 700;
    color: #0d3774;
}

.learn-index-page .learn-article-card {
    padding: 18px 20px;
}

.learn-index-page .learn-article-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.learn-index-page .learn-badge {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 0.79rem;
    font-weight: 800;
}

.learn-index-page .learn-badge-green {
    background: #e8f8ef;
    color: #1c7a47;
}

.learn-index-page .learn-badge-amber {
    background: #fff2dc;
    color: #9a6400;
}

.learn-index-page .learn-badge-slate {
    background: #eef3f8;
    color: #607086;
}

.learn-index-page .learn-article-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
}

.learn-index-page .learn-article-copy h3 {
    margin-bottom: 8px;
    font-size: 1.14rem;
    line-height: 1.22;
}

.learn-index-page .learn-article-copy p {
    margin: 0;
    color: var(--text-muted);
    line-height: 1.62;
    max-width: 46rem;
}

.learn-index-page .learn-article-arrow {
    width: 42px;
    height: 42px;
    flex: 0 0 auto;
    border-radius: 999px;
    border: 1px solid #d8e1ee;
    background: #fbfdff;
    display: grid;
    place-items: center;
    color: #7384a0;
    font-size: 1.08rem;
    margin-top: 4px;
    transition: border-color 0.18s ease, color 0.18s ease, background 0.18s ease;
}

.learn-index-page .learn-article-card:hover .learn-article-arrow {
    color: #0d3774;
    border-color: rgba(59, 118, 234, 0.24);
}

html[data-theme="dark"] .learn-index-page .learn-card {
    background: var(--surface-strong);
    border-color: var(--border);
    box-shadow: var(--shadow-sm);
}

html[data-theme="dark"] .learn-index-page .learn-section-head p,
html[data-theme="dark"] .learn-index-page .learn-fade-copy p,
html[data-theme="dark"] .learn-index-page .learn-topic-card p,
html[data-theme="dark"] .learn-index-page .learn-article-copy p {
    color: var(--text-muted);
}

html[data-theme="dark"] .learn-index-page .learn-eyebrow {
    background: rgba(110, 168, 255, 0.12);
    color: #bcd3ff;
}

html[data-theme="dark"] .learn-index-page .learn-card-link,
html[data-theme="dark"] .learn-index-page .learn-topic-meta {
    color: #bcd3ff;
}

html[data-theme="dark"] .learn-index-page .learn-fade-copy::after {
    background: linear-gradient(to bottom, rgba(32, 37, 45, 0), var(--surface-strong) 90%);
}

html[data-theme="dark"] .learn-index-page .learn-badge-green {
    background: rgba(32, 122, 71, 0.18);
    color: #8dd6ab;
}

html[data-theme="dark"] .learn-index-page .learn-badge-amber {
    background: rgba(154, 100, 0, 0.18);
    color: #f2c46b;
}

html[data-theme="dark"] .learn-index-page .learn-badge-slate {
    background: rgba(154, 162, 171, 0.12);
    color: #b4bec9;
}

html[data-theme="dark"] .learn-index-page .learn-article-arrow {
    border-color: var(--border);
    background: var(--surface-soft);
    color: var(--text-soft);
}

html[data-theme="dark"] .learn-index-page .learn-article-card:hover .learn-article-arrow {
    color: #bcd3ff;
    background: rgba(110, 168, 255, 0.1);
    border-color: rgba(110, 168, 255, 0.24);
}

.tools-index-page .tools-featured-section {
    padding-top: 1.2rem;
}

.tools-index-page .tools-popular-section {
    padding-top: 0.85rem;
}

.tools-index-page .tools-popular-section .section-header {
    margin-bottom: 18px;
}

.tools-index-page .tools-popular-section .section-header-row {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 10px;
}

.tools-index-page .tools-popular-section .section-header h2 {
    font-size: 22px;
    margin: 0 0 6px;
    letter-spacing: -0.01em;
    font-weight: 600;
}

.tools-index-page .tools-popular-section .section-header p {
    margin: 0;
    font-size: 15px;
    color: var(--text-muted);
}

.tools-index-page .tools-popular-section .section-link {
    color: var(--accent);
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    margin-bottom: 0;
}

.tools-index-page .tools-popular-section .section-link:hover {
    color: var(--accent-deep);
}

.tools-index-page .tools-popular-section .grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

.tools-index-page .tools-popular-section .card {
    background: #ffffff;
    border: 1px solid #e6ebf1;
    border-radius: 14px;
    padding: 18px;
    box-shadow: 0 2px 5px rgba(60, 66, 87, 0.04), 0 1px 1px rgba(0, 0, 0, 0.04);
    transition: all 0.15s ease;
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr);
    column-gap: 14px;
    row-gap: 6px;
    align-items: start;
    position: relative;
    color: inherit;
    text-decoration: none;
}

.tools-index-page .tools-popular-section .card:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05), 0 15px 35px rgba(0, 0, 0, 0.02);
    transform: translateY(-2px);
    border-color: #c1c9d2;
    color: inherit;
}

.tools-index-page .tools-popular-section .card-icon {
    width: 40px;
    height: 40px;
    border-radius: 4px;
    background: var(--accent-soft);
    color: var(--accent);
    display: grid;
    place-items: center;
    grid-column: 1;
    grid-row: 1 / span 2;
    margin-bottom: 0;
}

.tools-index-page .tools-popular-section .card-icon svg {
    width: 20px;
    height: 20px;
}

.tools-index-page .tools-popular-section .card h3 {
    font-size: 16px;
    margin: 2px 0 0;
    font-weight: 600;
    color: var(--text-heading);
    grid-column: 2;
}

.tools-index-page .tools-popular-section .card p {
    margin: 0;
    font-size: 14px;
    color: var(--text-muted);
    grid-column: 2;
}

.tools-index-page .tools-category-section {
    padding-top: 0.85rem;
}

.tools-index-page .tools-category-section .section-header {
    margin-bottom: 18px;
}

.tools-index-page .tools-category-section .section-header h2 {
    font-size: 22px;
    margin: 0 0 6px;
    letter-spacing: -0.01em;
    font-weight: 600;
}

.tools-index-page .tools-category-section .section-header h2 a {
    color: var(--text-heading);
}

.tools-index-page .tools-category-section .section-header h2 a:hover {
    color: var(--text-heading);
}

.tools-index-page .tools-category-section .section-header p {
    margin: 0;
    font-size: 15px;
    color: var(--text-muted);
}

.tools-index-page .tools-category-section .grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

.tools-index-page .tools-category-section .card {
    background: #ffffff;
    border: 1px solid #e6ebf1;
    border-radius: 14px;
    padding: 18px;
    box-shadow: 0 2px 5px rgba(60, 66, 87, 0.04), 0 1px 1px rgba(0, 0, 0, 0.04);
    transition: all 0.15s ease;
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr);
    column-gap: 14px;
    row-gap: 6px;
    align-items: start;
    position: relative;
    color: inherit;
    text-decoration: none;
}

.tools-index-page .tools-category-section .card:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05), 0 15px 35px rgba(0, 0, 0, 0.02);
    transform: translateY(-2px);
    border-color: #c1c9d2;
    color: inherit;
}

.tools-index-page .tools-category-section .card-icon {
    width: 40px;
    height: 40px;
    border-radius: 4px;
    background: var(--accent-soft);
    color: var(--accent);
    display: grid;
    place-items: center;
    grid-column: 1;
    grid-row: 1 / span 2;
    margin-bottom: 0;
}

.tools-index-page .tools-category-section .card-icon svg {
    width: 20px;
    height: 20px;
}

.tools-index-page .tools-category-section .card h3 {
    font-size: 16px;
    margin: 2px 0 0;
    font-weight: 600;
    color: var(--text-heading);
    grid-column: 2;
}

.tools-index-page .tools-category-section .card p {
    margin: 0;
    font-size: 14px;
    color: var(--text-muted);
    grid-column: 2;
}

.tools-index-page .tools-popular-section .tools-list-card,
.tools-index-page .tools-category-section .tools-list-card {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: 24px;
    border: 1px solid #d5dde8;
    outline: 1px solid rgba(255, 255, 255, 0.72);
    outline-offset: -2px;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: none;
    color: var(--text-heading);
    text-decoration: none;
    transform: none !important;
    transition: border-color 0.24s ease, box-shadow 0.24s ease;
}

.tools-index-page .tools-popular-section .tools-list-card:hover,
.tools-index-page .tools-category-section .tools-list-card:hover {
    transform: none !important;
    border-color: var(--accent);
    box-shadow: 0 12px 30px rgba(15, 31, 55, 0.08);
    color: var(--text-heading);
}

.tools-index-page .tools-card-meta {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.tools-index-page .tools-popular-section .card-icon.tools-card-icon,
.tools-index-page .tools-category-section .card-icon.tools-card-icon {
    display: grid;
    width: 44px;
    height: 44px;
    margin: 0;
    place-items: center;
    border: 0;
    border-radius: 8px;
    background: #eff6ff;
    color: var(--accent);
    grid-column: auto;
    grid-row: auto;
    transition: background-color 0.24s ease, border-color 0.24s ease;
}

.tools-index-page .tools-list-card:hover .tools-card-icon {
    background: #dbeafe;
}

.tools-index-page .tools-popular-section .card-icon.tools-card-icon svg,
.tools-index-page .tools-category-section .card-icon.tools-card-icon svg {
    width: 20px;
    height: 20px;
}

.tools-index-page .tools-level-chip {
    display: inline-flex;
    align-items: center;
    min-height: 21px;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 0.625rem;
    font-weight: 700;
    line-height: 1;
}

.tools-index-page .tools-level-beginner {
    background: #ecfdf5;
    color: #059669;
}

.tools-index-page .tools-level-intermediate {
    background: #fffbeb;
    color: #d97706;
}

.tools-index-page .tools-level-advanced {
    background: #fef2f2;
    color: #ef4444;
}

.tools-index-page .tools-popular-section .tools-list-card h3,
.tools-index-page .tools-category-section .tools-list-card h3 {
    margin: 0 0 6px;
    color: #1e293b;
    font-family: var(--font-heading);
    font-size: 1.125rem;
    font-weight: 500;
    letter-spacing: -0.01em;
    line-height: 1.28;
    grid-column: auto;
}

.tools-index-page .tools-popular-section .tools-list-card p,
.tools-index-page .tools-category-section .tools-list-card p {
    flex: 1;
    margin: 0 0 16px;
    color: #64748b;
    font-size: 0.875rem;
    line-height: 1.625;
    grid-column: auto;
}

.tools-index-page .tools-list-card .tools-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: auto;
}

.tools-index-page .tools-card-tag {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 8px;
    border-radius: 4px;
    background: #f8fafc;
    color: #94a3b8;
    font-size: 0.75rem;
    font-weight: 500;
}

.tools-index-page .tools-list-card .tools-card-cta {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--accent);
    font-size: 0.875rem;
    font-weight: 500;
    opacity: 0;
    transition: opacity 0.15s ease;
    white-space: nowrap;
}

.tools-index-page .tools-list-card:hover .tools-card-cta,
.tools-index-page .tools-list-card:focus-visible .tools-card-cta {
    opacity: 1;
}

html[data-theme="dark"] .tools-index-page .tools-popular-section .tools-list-card,
html[data-theme="dark"] .tools-index-page .tools-category-section .tools-list-card {
    border-color: #313945;
    outline-color: rgba(255, 255, 255, 0.035);
    background: #1d232b;
    box-shadow: none;
}

html[data-theme="dark"] .tools-index-page .tools-popular-section .tools-list-card:hover,
html[data-theme="dark"] .tools-index-page .tools-category-section .tools-list-card:hover {
    border-color: #78aefc;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.22);
}

html[data-theme="dark"] .tools-index-page .tools-popular-section .card-icon.tools-card-icon,
html[data-theme="dark"] .tools-index-page .tools-category-section .card-icon.tools-card-icon {
    border-color: transparent;
    background: rgba(120, 174, 252, 0.12);
    color: #78aefc;
}

html[data-theme="dark"] .tools-index-page .tools-list-card:hover .tools-card-icon {
    background: rgba(120, 174, 252, 0.18);
}

html[data-theme="dark"] .tools-index-page .tools-popular-section .tools-list-card h3,
html[data-theme="dark"] .tools-index-page .tools-category-section .tools-list-card h3 {
    color: #f2f5f8;
}

html[data-theme="dark"] .tools-index-page .tools-popular-section .tools-list-card p,
html[data-theme="dark"] .tools-index-page .tools-category-section .tools-list-card p {
    color: #a7b1be;
}

html[data-theme="dark"] .tools-index-page .tools-card-tag {
    background: #242b35;
    color: #8994a3;
}

html[data-theme="dark"] .tools-index-page .tools-card-cta {
    color: #78aefc;
}

@media (max-width: 699px) {
    .tools-index-page .tools-popular-section .tools-list-card,
    .tools-index-page .tools-category-section .tools-list-card {
        padding: 24px;
    }

    .tools-index-page .tools-card-cta {
        opacity: 1;
    }
}

.tools-index-page .empty-state {
    padding: 1rem 0 0.5rem;
}

@media (min-width: 700px) {
    .tools-index-page .tools-hero-shell {
        padding: 10px;
    }

    .tools-index-page .tools-popular-section .grid,
    .tools-index-page .tools-category-section .grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 20px;
    }
}

@media (min-width: 960px) {
    .tools-index-page .tools-hero {
        padding: 0.95rem 0 0.9rem;
    }

    .tools-index-page .page-head h1 {
        font-size: clamp(2.4rem, 4.8vw, 3.7rem);
    }

    .tools-index-page .tools-popular-section .section-header-row {
        flex-direction: row;
        justify-content: space-between;
        align-items: flex-end;
        gap: 16px;
    }

    .tools-index-page .tools-popular-section .grid,
    .tools-index-page .tools-category-section .grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 24px;
    }
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    color: var(--text-muted);
    font-family: var(--font-sans);
}

.footer-inner nav {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

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

@media (max-width: 640px) {
    .container {
        width: min(var(--container), calc(100% - 24px));
    }

    .site-header-inner,
    .hero-actions,
    .tool-actions,
    .footer-inner nav {
        align-items: stretch;
    }

    .site-footer-inner {
        align-items: flex-start;
        padding-inline: 1rem;
    }

    .brand-badge {
        font-size: 1.22rem;
    }

    .docs-item {
        align-items: flex-start;
    }

    .docs-footer-links {
        gap: 12px 20px;
    }

    .page-search-hero-shell {
        padding: 8px;
        border-radius: 20px;
    }

    .page-search-hero-panel {
        padding: 16px 15px 17px;
        gap: 14px;
        border-radius: 16px;
    }

    .page-search-hero-heading {
        grid-template-columns: 1fr;
        align-items: start;
    }

    .page-search-hero-intro p {
        max-width: none;
        margin-inline: auto;
        font-size: 0.94rem;
        line-height: 1.42;
    }

    .page-search-input,
    .page-search-form input[name="q"] {
        height: 58px;
        padding: 0 48px 0 15px;
        border-radius: 13px;
        font-size: 0.97rem;
    }

    .page-search-form .page-search-icon-btn {
        width: 38px;
        height: 38px;
        right: 6px;
    }

    .page-search-form .page-search-icon-btn svg {
        width: 18px;
        height: 18px;
    }

    .tools-index-page .tools-hero-shell,
    .learn-index-page .learn-hero-shell {
        padding: 1.35rem;
    }

    .tools-index-page .tools-hero-shell {
        padding: 8px;
        border-radius: 20px;
    }

    .tools-index-page .tools-hero-panel {
        padding: 15px 14px;
        gap: 14px;
        border-radius: 16px;
    }

    .learn-index-page .learn-hero-shell {
        padding: 8px;
        border-radius: 20px;
    }

    .learn-index-page .learn-hero-panel {
        padding: 16px 15px 17px;
        gap: 14px;
        border-radius: 16px;
    }

    .tools-index-page .tools-hero-heading,
    .learn-index-page .learn-hero-heading {
        grid-template-columns: 1fr;
        align-items: start;
    }

    .tools-index-page .page-head h1 {
        font-size: 2.15rem;
        line-height: 0.98;
        margin-bottom: 6px;
    }

    .tools-index-page .tools-hero-intro p {
        max-width: none;
        margin-inline: auto;
        font-size: 0.94rem;
        line-height: 1.42;
    }

    .learn-index-page .learn-hero-intro p {
        max-width: none;
        margin-inline: auto;
        font-size: 0.94rem;
        line-height: 1.42;
    }

    .tools-index-page .tools-search-input,
    .tools-index-page .tools-search-form input[name="q"] {
        height: 58px;
        padding: 0 48px 0 15px;
        border-radius: 13px;
        font-size: 0.97rem;
    }

    .tools-index-page .tools-search-form .tools-search-icon-btn {
        width: 38px;
        height: 38px;
        right: 6px;
    }

    .tools-index-page .tools-search-form .tools-search-icon-btn svg {
        width: 18px;
        height: 18px;
    }

    .learn-index-page .learn-search-form input[name="q"] {
        height: 58px;
        padding: 0 48px 0 15px;
        border-radius: 13px;
        font-size: 0.97rem;
    }

    .learn-index-page .learn-search-form .learn-search-icon-btn {
        width: 38px;
        height: 38px;
        right: 6px;
    }

    .learn-index-page .learn-search-form .learn-search-icon-btn svg {
        width: 18px;
        height: 18px;
    }
}

@media (max-width: 820px) {
    .site-header-inner {
        flex-wrap: nowrap;
    }

    .site-header .nav.nav-desktop {
        display: none;
    }

    .mobile-nav-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        flex: 0 0 auto;
    }
}

@media (max-width: 600px) {
    .tools-index-page .tools-popular-section .grid {
        grid-template-columns: 1fr;
    }

    .tools-index-page .tools-popular-section .section-header-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .tools-index-page .tools-category-section .grid {
        grid-template-columns: 1fr;
    }
}

.learn-index-page .learn-start-card {
    min-height: 236px;
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.learn-index-page .learn-start-card h3 a,
.learn-index-page .learn-topic-item h4 a {
    color: #0d3774;
    text-decoration: none;
    transition: color 0.18s ease, text-decoration-color 0.18s ease;
}

.learn-index-page .learn-start-card h3 a:hover,
.learn-index-page .learn-topic-item h4 a:hover {
    color: var(--accent-deep);
    text-decoration: underline;
}

.learn-index-page .learn-start-card:hover {
    transform: translateY(-2px);
    border-color: rgba(59, 118, 234, 0.24);
    box-shadow: 0 14px 28px rgba(15, 23, 47, 0.08);
}

.learn-index-page .learn-related-tool {
    margin-top: 14px;
    font-size: 0.83rem;
    line-height: 1.5;
    color: #516175;
}

.learn-index-page .learn-related-tool a {
    font-weight: 700;
    color: #0d3774;
}

.learn-index-page .learn-topic-groups {
    display: grid;
    gap: 28px;
}

.learn-index-page .learn-topic-group {
    display: grid;
    gap: 16px;
}

.learn-index-page .learn-topic-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.learn-index-page .learn-topic-label {
    margin: 0;
    font-size: 1rem;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: #39475b;
}

.learn-index-page .learn-topic-toggle {
    border: 0;
    background: transparent;
    color: #3f57b8;
    cursor: pointer;
    padding: 8px 0;
    font: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
}

.learn-index-page .learn-topic-toggle:hover {
    color: var(--accent-deep);
    text-decoration: underline;
}

.learn-index-page .learn-topic-rule {
    border-top: 1px solid #d8e1ee;
}

.learn-index-page .learn-topic-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px 34px;
}

.learn-index-page .learn-topic-item {
    min-width: 0;
}

.learn-index-page .learn-topic-item h4 {
    margin: 0 0 6px;
    font-size: 1.05rem;
    line-height: 1.28;
    letter-spacing: -0.025em;
}

.learn-index-page .learn-topic-item p {
    margin: 0 0 8px;
    color: #516175;
    font-size: 0.95rem;
    line-height: 1.62;
}

.learn-index-page .learn-topic-item-meta {
    color: var(--text-muted);
    font-size: 0.82rem;
    line-height: 1.45;
}

.learn-index-page .learn-topic-extra {
    margin-top: 18px;
}

html[data-theme="dark"] .learn-index-page .learn-start-card {
    box-shadow: var(--shadow-sm);
}

html[data-theme="dark"] .learn-index-page .learn-start-card:hover {
    border-color: rgba(110, 168, 255, 0.24);
    box-shadow: 0 16px 34px rgba(6, 10, 18, 0.26);
}

html[data-theme="dark"] .learn-index-page .learn-related-tool {
    color: var(--text-muted);
}

html[data-theme="dark"] .learn-index-page .learn-related-tool a {
    color: #bcd3ff;
}

html[data-theme="dark"] .learn-index-page .learn-topic-label,
html[data-theme="dark"] .learn-index-page .learn-topic-item h4 a {
    color: var(--text-heading);
}

html[data-theme="dark"] .learn-index-page .learn-topic-toggle {
    color: #bcd3ff;
}

html[data-theme="dark"] .learn-index-page .learn-topic-item p,
html[data-theme="dark"] .learn-index-page .learn-topic-item-meta {
    color: var(--text-muted);
}

html[data-theme="dark"] .learn-index-page .learn-topic-rule {
    border-top-color: var(--border);
}

body.route-home {
    --blurple: #635bff;
    --blurple-dark: #0a2540;
    --bg-body: #eceeef;
    --bg-surface: #ffffff;
    --text-heading: #1a1f36;
    --text-body: #3c4257;
    --text-muted: #697386;
    --border-color: #e6ebf1;
    --border-hover: #c1c9d2;
    --shadow-sm: 0 2px 5px rgba(60, 66, 87, 0.04), 0 1px 1px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 5px 15px rgba(0, 0, 0, 0.05), 0 15px 35px rgba(0, 0, 0, 0.02);
    margin: 0;
    font-family: var(--font-sans);
    background-color: var(--bg-body);
    background-image: none;
    color: var(--text-body);
    line-height: 1.6;
    font-size: 15px;
}

body.route-home .site-main {
    padding-bottom: 0;
}

body.route-home a {
    color: var(--blurple);
    transition: color 0.15s ease;
}

body.route-home a:hover {
    color: var(--blurple-dark);
}

body.route-home .hero {
    padding: 80px 0;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-color);
}

body.route-home .hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

body.route-home .hero-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    background: #f0ebff;
    color: var(--blurple);
    border-radius: 16px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 24px;
}

body.route-home .hero h1 {
    color: var(--text-heading);
    font-size: 40px;
    font-weight: 600;
    letter-spacing: -0.03em;
    line-height: 1.2;
    margin: 0 0 16px;
}

body.route-home .hero p.lead {
    font-size: 18px;
    color: var(--text-muted);
    margin: 0 0 32px;
    line-height: 1.5;
    max-width: none;
}

body.route-home .hero-actions-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

body.route-home .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    min-height: 40px;
    padding: 0 16px;
    border-radius: 4px;
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.15s ease;
    box-shadow: var(--shadow-sm);
}

body.route-home .btn-primary {
    background: var(--blurple);
    color: #fff;
    border: 1px solid transparent;
}

body.route-home .btn-primary:hover {
    background: var(--blurple-dark);
    color: #fff;
    box-shadow: var(--shadow-md);
}

body.route-home .btn-secondary {
    background: #fff;
    color: var(--text-body);
    border: 1px solid var(--border-color);
}

body.route-home .btn-secondary:hover {
    border-color: var(--border-hover);
    color: var(--text-heading);
}

body.route-home .header-actions .btn {
    height: 32px;
    min-height: 32px;
    padding: 0 12px;
    font-size: 13px;
}

body.route-home .code-window {
    background: var(--blurple-dark);
    border-radius: 8px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    color: #fff;
    font-family: var(--font-mono);
    font-size: 13px;
    line-height: 1.5;
    border: none;
}

body.route-home .code-header {
    background: rgba(255, 255, 255, 0.05);
    padding: 12px 16px;
    display: flex;
    gap: 6px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

body.route-home .code-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

body.route-home .code-dot.red {
    background: #ff5f56;
}

body.route-home .code-dot.yellow {
    background: #ffbd2e;
}

body.route-home .code-dot.green {
    background: #27c93f;
}

body.route-home .code-body {
    padding: 24px;
}

body.route-home .code-comment {
    color: #8792a2;
}

body.route-home .code-keyword {
    color: #80e9ff;
}

body.route-home .code-string {
    color: #33d17a;
}

body.route-home .code-function {
    color: #f29c1f;
}

body.route-home .section {
    padding: 64px 0;
}

body.route-home .section-header {
    margin-bottom: 32px;
}

body.route-home .section-header h2 {
    font-size: 24px;
    color: var(--text-heading);
    margin: 0 0 8px;
    letter-spacing: -0.01em;
    font-weight: 600;
}

body.route-home .section-header p {
    color: var(--text-muted);
    margin: 0;
    font-size: 16px;
}

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

body.route-home .card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 24px;
    box-shadow: var(--shadow-sm);
    transition: all 0.15s ease;
    display: flex;
    flex-direction: column;
    position: relative;
}

body.route-home .card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
    border-color: var(--border-hover);
}

body.route-home .card-icon {
    width: 40px;
    height: 40px;
    border-radius: 4px;
    background: #f0ebff;
    color: var(--blurple);
    display: grid;
    place-items: center;
    margin-bottom: 20px;
}

body.route-home .card-icon svg {
    width: 20px;
    height: 20px;
}

body.route-home .card h3 {
    font-size: 16px;
    color: var(--text-heading);
    margin: 0 0 8px;
    font-weight: 600;
}

body.route-home .card p {
    color: var(--text-muted);
    margin: 0 0 24px;
    font-size: 14px;
    flex-grow: 1;
}

body.route-home .card-link {
    font-size: 14px;
    font-weight: 500;
    color: var(--blurple);
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 0;
}

body.route-home .card-link svg {
    width: 14px;
    height: 14px;
    transition: transform 0.15s ease;
}

body.route-home .card:hover .card-link svg {
    transform: translateX(3px);
}

body.route-home .docs-list {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

body.route-home .docs-item {
    display: flex;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    transition: background 0.15s ease;
    text-decoration: none;
    color: inherit;
}

body.route-home .docs-item:last-child {
    border-bottom: none;
}

body.route-home .docs-item:hover {
    background: var(--bg-body);
    color: inherit;
}

body.route-home .docs-item-content {
    flex-grow: 1;
}

body.route-home .docs-item-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-heading);
    margin: 0 0 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}

body.route-home .docs-item-desc {
    font-size: 14px;
    color: var(--text-muted);
    margin: 0;
}

body.route-home .docs-item-arrow {
    color: var(--text-muted);
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.15s ease;
}

body.route-home .docs-item:hover .docs-item-arrow {
    opacity: 1;
    transform: translateX(0);
    color: var(--blurple);
}

body.route-home .docs-home-footer {
    border-top: 1px solid var(--border-color);
    padding: 16px 0;
    background: var(--bg-surface);
    margin-top: 40px;
}

body.route-home .site-footer-inner {
    display: flex;
    justify-content: space-between;
    color: var(--text-muted);
    font-size: 14px;
    gap: 24px;
}

body.route-home .docs-footer-links {
    display: flex;
    gap: 24px;
}

body.route-home .docs-footer-links a {
    color: var(--text-muted);
}

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

    body.route-home .hero h1 {
        font-size: 32px;
    }

    body.route-home .legacy-home-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    body.route-home .legacy-home-grid {
        grid-template-columns: 1fr;
    }

    body.route-home .docs-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    body.route-home .docs-item-arrow {
        display: none;
    }

    body.route-home .site-footer-inner {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 920px) {
    .learn-index-page .learn-grid-3 {
        grid-template-columns: 1fr;
    }

    .learn-index-page .learn-topic-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 18px 22px;
    }

    .learn-index-page .learn-start-card {
        min-height: auto;
    }

    .learn-index-page .learn-fade-copy {
        min-height: auto;
    }

    .learn-index-page .learn-fade-copy p {
        min-height: auto;
        max-height: none;
        display: block;
        -webkit-line-clamp: unset;
    }

    .learn-index-page .learn-fade-copy::after {
        display: none;
    }
}

@media (max-width: 640px) {
    .learn-index-page .learn-section-stack {
        gap: 18px;
    }

    .learn-index-page .learn-topic-groups {
        gap: 22px;
    }

    .learn-index-page .learn-topic-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .learn-index-page .learn-topic-group {
        gap: 14px;
    }

    .learn-index-page .learn-article-row {
        gap: 12px;
    }

    .learn-index-page .learn-article-arrow {
        width: 36px;
        height: 36px;
    }
}

/* Modern articles index */
.articles-list-page {
    --articles-bg: #eceeef;
    --articles-surface: #ffffff;
    --articles-surface-soft: #f6f8fb;
    --articles-border: #d8e1ee;
    --articles-border-strong: #c8d3e3;
    --articles-heading: #0f172f;
    --articles-text: #334155;
    --articles-muted: #64748b;
    --articles-soft: #8a98ad;
    --articles-accent: #2563eb;
    --articles-accent-deep: #1d4ed8;
    --articles-accent-soft: rgba(37, 99, 235, 0.08);
    --articles-shadow-sm: 0 4px 20px rgba(15, 23, 47, 0.04);
    --articles-shadow-md: 0 14px 34px rgba(15, 23, 47, 0.08);
    background: var(--articles-bg);
}

.articles-list-page .articles-list-container {
    max-width: 1200px;
}

.articles-list-hero {
    padding: 3.2rem 0 2.2rem;
}

.articles-back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin-bottom: 1.1rem;
    color: var(--articles-soft);
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
}

.articles-back-link:hover {
    color: var(--articles-heading);
    text-decoration: none;
}

.articles-back-link svg {
    width: 1rem;
    height: 1rem;
}

.articles-count-pill {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    margin-bottom: 1rem;
    padding: 0.36rem 0.85rem;
    border: 1px solid rgba(37, 99, 235, 0.18);
    border-radius: 999px;
    background: var(--articles-accent-soft);
    color: var(--articles-accent);
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.articles-list-hero-copy {
    max-width: 44rem;
    margin-inline: auto;
    text-align: center;
}

.articles-list-hero-copy h1 {
    margin: 0 0 1rem;
    color: var(--articles-heading);
    font-family: var(--font-heading);
    font-size: clamp(2.45rem, 6vw, 4.6rem);
    font-weight: 300;
    line-height: 1.04;
    letter-spacing: -0.055em;
}

.articles-list-hero-copy h1 span {
    display: block;
    color: var(--articles-accent);
    font-weight: 500;
}

.articles-list-hero-copy p {
    max-width: 43rem;
    margin: 0 auto;
    color: var(--articles-muted);
    font-size: 1.02rem;
    line-height: 1.75;
}

.articles-controls {
    display: grid;
    align-items: start;
    justify-items: center;
    gap: 1rem;
    margin-top: 2rem;
}

.articles-search-form {
    position: relative;
    display: flex;
    align-items: center;
    width: min(100%, 35rem);
}

.articles-search-icon {
    position: absolute;
    left: 0.9rem;
    width: 1.05rem;
    height: 1.05rem;
    color: var(--articles-soft);
    pointer-events: none;
}

.articles-search-form input[type="search"] {
    width: 100%;
    height: 48px;
    padding: 0 6.1rem 0 2.65rem;
    border: 1px solid var(--articles-border);
    border-radius: 14px;
    background: var(--articles-surface);
    color: var(--articles-text);
    font: inherit;
    font-size: 0.92rem;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.articles-search-form input[type="search"]:focus {
    outline: none;
    border-color: rgba(37, 99, 235, 0.42);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.articles-search-form button {
    position: absolute;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    right: 0.35rem;
    height: 38px;
    padding: 0 0.95rem;
    border: 0;
    border-radius: 11px;
    background: var(--articles-accent);
    color: #ffffff;
    cursor: pointer;
    font: inherit;
    font-size: 0.82rem;
    font-weight: 800;
}

.collection-search-button-icon {
    display: none;
    width: 1.05rem;
    height: 1.05rem;
    stroke: currentColor;
}

.articles-filter-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
}

.articles-filter-pill {
    padding: 0.42rem 0.82rem;
    border: 1px solid var(--articles-border);
    border-radius: 999px;
    background: var(--articles-surface);
    color: var(--articles-muted);
    cursor: pointer;
    font: inherit;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.articles-filter-pill:hover,
.articles-filter-pill.active {
    border-color: var(--articles-accent);
    background: var(--articles-accent);
    color: #ffffff;
}

.articles-results-note {
    padding: 0 0 1.2rem;
}

.articles-results-note .articles-list-container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    color: var(--articles-muted);
    font-size: 0.95rem;
}

.articles-results-note p {
    margin: 0;
}

.articles-results-note a {
    color: var(--articles-accent);
    font-weight: 800;
    text-decoration: none;
}

.articles-featured-section {
    padding: 0 0 2.25rem;
}

.articles-featured-card {
    display: block;
    overflow: hidden;
    border: 1px solid var(--articles-border);
    border-radius: 22px;
    background: var(--articles-surface);
    box-shadow: var(--articles-shadow-sm);
    color: inherit;
    text-decoration: none;
    transition: box-shadow 0.22s ease, border-color 0.22s ease;
}

.articles-featured-card:hover,
.articles-featured-card:focus-visible {
    border-color: rgba(37, 99, 235, 0.34);
    box-shadow: 0 18px 42px rgba(15, 23, 47, 0.1);
    text-decoration: none;
}

.articles-featured-card[hidden],
.articles-card[hidden] {
    display: none;
}

.articles-featured-card {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
}

.articles-featured-image,
.articles-card-image {
    position: relative;
    overflow: hidden;
    background: #dbeafe;
    transition: background-color 0.22s ease;
}

.articles-featured-image {
    min-height: 330px;
}

.articles-featured-image img,
.articles-card-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.articles-image-fallback,
.home-article-image-fallback {
    width: 100%;
    height: 100%;
    min-height: inherit;
    display: grid;
    place-items: center;
    padding: 28px;
    background: #eaf4ff;
    color: #1e3a8a;
    text-align: center;
    font-family: "Segoe UI", var(--font-sans);
    font-weight: 650;
    line-height: 1.12;
    transition: background-color 0.22s ease, color 0.22s ease;
}

.articles-image-fallback span,
.home-article-image-fallback span {
    display: block;
    max-width: 14ch;
    font-size: clamp(1.35rem, 5vw, 2rem);
}

.articles-image-fallback-featured span {
    max-width: 15ch;
    font-size: clamp(2rem, 4.4vw, 3.7rem);
}

.articles-featured-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.42rem 0.7rem;
    border-radius: 10px;
    background: rgba(37, 99, 235, 0.92);
    color: #ffffff;
    font-size: 0.66rem;
    font-weight: 900;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.articles-featured-badge svg {
    width: 0.78rem;
    height: 0.78rem;
}

.articles-featured-copy {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: clamp(1.65rem, 4vw, 2.7rem);
}

.articles-card-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem;
    margin-bottom: 0.75rem;
    color: var(--articles-soft);
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.articles-card-meta > span:first-child {
    color: var(--articles-accent);
}

.articles-card .articles-card-meta {
    justify-content: space-between;
    gap: 0.75rem;
}

.articles-card .articles-card-meta > span[aria-hidden="true"] {
    display: none;
}

.articles-card .articles-level-pill {
    margin-left: auto;
}

.articles-level-pill {
    display: inline-flex;
    align-items: center;
    min-height: 1.25rem;
    padding: 0 0.5rem;
    border-radius: 999px;
    letter-spacing: 0.04em;
}

.articles-level-beginner {
    background: #ecfdf5;
    color: #059669;
}

.articles-level-intermediate {
    background: #fffbeb;
    color: #d97706;
}

.articles-level-advanced {
    background: #fef2f2;
    color: #dc2626;
}

.articles-level-guide {
    background: var(--articles-surface-soft);
    color: var(--articles-muted);
}

.articles-featured-copy h2 {
    margin: 0 0 0.85rem;
    color: var(--articles-heading);
    font-family: var(--font-heading);
    font-size: clamp(1.55rem, 3vw, 2.25rem);
    font-weight: 400;
    line-height: 1.12;
    letter-spacing: -0.04em;
    transition: color 0.18s ease;
}

.articles-featured-card:hover h2,
.articles-featured-card:focus-visible h2,
.articles-card:hover h3,
.articles-card:focus-within h3 {
    color: var(--articles-accent);
}

.articles-featured-copy p {
    margin: 0 0 1.5rem;
    color: var(--articles-muted);
    font-size: 1rem;
    line-height: 1.72;
}

.articles-featured-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
}

.articles-read-link {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    color: var(--articles-accent);
    font-size: 0.92rem;
    font-weight: 800;
}

.articles-read-link svg {
    width: 1rem;
    height: 1rem;
}

.articles-tool-link {
    color: var(--articles-soft);
    font-size: 0.82rem;
    font-weight: 700;
}

.articles-grid-section {
    padding: 0 0 4.5rem;
}

.articles-grid-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.15rem;
}

.articles-grid-head h2 {
    margin: 0;
    color: var(--articles-heading);
    font-family: var(--font-heading);
    font-size: 1.45rem;
    font-weight: 600;
    letter-spacing: -0.03em;
}

.articles-grid-head span {
    color: var(--articles-soft);
    font-size: 0.9rem;
    font-weight: 700;
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.25rem;
}

.articles-card {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    border: 1px solid var(--articles-border);
    border-radius: 12px;
    background: var(--articles-surface);
    background-clip: padding-box;
    box-shadow: var(--articles-shadow-sm);
    transition: box-shadow 0.22s ease, border-color 0.22s ease;
}

.articles-card:hover,
.articles-card:focus-within {
    border-color: rgba(37, 99, 235, 0.34);
    box-shadow: 0 18px 42px rgba(15, 23, 47, 0.1);
}

.articles-card:hover .articles-card-image,
.articles-card:focus-within .articles-card-image,
.articles-featured-card:hover .articles-featured-image,
.articles-featured-card:focus-visible .articles-featured-image {
    background: #dbeafe;
}

.articles-card:hover .articles-image-fallback,
.articles-card:focus-within .articles-image-fallback,
.articles-featured-card:hover .articles-image-fallback,
.articles-featured-card:focus-visible .articles-image-fallback {
    background: #dbeafe;
    color: var(--articles-accent);
}

.articles-card a {
    display: flex;
    min-height: 100%;
    flex-direction: column;
    overflow: hidden;
    border-radius: inherit;
    color: inherit;
    text-decoration: none;
}

.articles-card-image {
    height: 178px;
}

.articles-card-image::after,
.articles-featured-image::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 42%;
    background: linear-gradient(to top, rgba(15, 23, 47, 0.18), transparent);
    pointer-events: none;
}

.articles-card-image:has(.articles-image-fallback)::after,
.articles-featured-image:has(.articles-image-fallback)::after {
    content: none;
}

.articles-card-body {
    display: flex;
    min-height: 190px;
    flex: 1;
    flex-direction: column;
    padding: 1.2rem;
}

.articles-card h3 {
    margin: 0 0 0.55rem;
    color: var(--articles-heading);
    font-family: var(--font-heading);
    font-size: 1.06rem;
    font-weight: 500;
    line-height: 1.24;
    letter-spacing: -0.025em;
    transition: color 0.18s ease;
}

.articles-card p {
    display: -webkit-box;
    margin: 0;
    overflow: hidden;
    color: var(--articles-muted);
    font-size: 0.91rem;
    line-height: 1.6;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.articles-empty-state {
    padding: 3.8rem 1rem;
    text-align: center;
}

.articles-empty-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 4rem;
    height: 4rem;
    margin-bottom: 1rem;
    border-radius: 999px;
    background: var(--articles-surface-soft);
    color: var(--articles-soft);
}

.articles-empty-icon svg {
    width: 1.8rem;
    height: 1.8rem;
}

.articles-empty-state h3 {
    margin: 0 0 0.4rem;
    color: var(--articles-heading);
    font-family: var(--font-heading);
    font-size: 1.35rem;
}

.articles-empty-state p {
    margin: 0 0 1rem;
    color: var(--articles-muted);
}

.articles-empty-state a,
.articles-empty-state button {
    border: 0;
    background: transparent;
    color: var(--articles-accent);
    cursor: pointer;
    font: inherit;
    font-weight: 800;
    text-decoration: none;
}

.articles-cta-section {
    padding: 0 0 4rem;
}

.articles-cta-card {
    position: relative;
    overflow: hidden;
    padding: clamp(2rem, 4vw, 3rem);
    border: 1px solid var(--articles-border);
    border-radius: 24px;
    background: var(--articles-surface);
    box-shadow: var(--articles-shadow-sm);
    text-align: center;
}

.articles-cta-card::before {
    content: "";
    position: absolute;
    top: 0;
    right: 12%;
    left: 12%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(37, 99, 235, 0.3), transparent);
}

.articles-cta-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    margin-bottom: 1rem;
    border: 1px solid rgba(37, 99, 235, 0.14);
    border-radius: 14px;
    background: var(--articles-accent-soft);
    color: var(--articles-accent);
}

.articles-cta-icon svg {
    width: 1.35rem;
    height: 1.35rem;
}

.articles-cta-card h2 {
    margin: 0 0 0.5rem;
    color: var(--articles-heading);
    font-family: var(--font-heading);
    font-size: clamp(1.75rem, 4vw, 2.45rem);
    font-weight: 400;
    letter-spacing: -0.045em;
}

.articles-cta-card p {
    max-width: 36rem;
    margin: 0 auto 1.35rem;
    color: var(--articles-muted);
    line-height: 1.7;
}

.articles-cta-card a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 1.25rem;
    border-radius: 12px;
    background: var(--articles-accent);
    color: #ffffff;
    font-size: 0.9rem;
    font-weight: 800;
    text-decoration: none;
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.18);
}

html[data-theme="dark"] .articles-list-page {
    --articles-bg: #171b21;
    --articles-surface: #20252d;
    --articles-surface-soft: #262d36;
    --articles-border: #323a43;
    --articles-border-strong: #475569;
    --articles-heading: #f3f5f7;
    --articles-text: #d7dce2;
    --articles-muted: #a5adb8;
    --articles-soft: #818b97;
    --articles-accent: #7db0ff;
    --articles-accent-deep: #a9c7ff;
    --articles-accent-soft: rgba(125, 176, 255, 0.1);
    --articles-shadow-sm: 0 4px 20px rgba(0, 0, 0, 0.18);
    --articles-shadow-md: 0 16px 38px rgba(0, 0, 0, 0.28);
}

html[data-theme="dark"] .articles-level-beginner {
    background: rgba(32, 122, 71, 0.18);
    color: #8dd6ab;
}

html[data-theme="dark"] .articles-level-intermediate {
    background: rgba(154, 100, 0, 0.18);
    color: #f2c46b;
}

html[data-theme="dark"] .articles-level-advanced {
    background: rgba(170, 50, 65, 0.18);
    color: #ffa3ad;
}

html[data-theme="dark"] .articles-search-form input[type="search"] {
    background: #181b1f;
    color: var(--articles-heading);
}

html[data-theme="dark"] .articles-filter-pill {
    background: var(--articles-surface);
}

html[data-theme="dark"] .articles-featured-image,
html[data-theme="dark"] .articles-card-image {
    background: #172033;
}

@media (max-width: 980px) {
    .articles-featured-card {
        grid-template-columns: 1fr;
    }

    .articles-featured-image {
        min-height: 260px;
    }

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

@media (max-width: 720px) {
    .articles-list-hero {
        padding: 2.1rem 0 1.6rem;
    }

    .articles-controls {
        align-items: stretch;
        gap: 0.8rem;
    }

    .articles-search-form {
        flex-basis: 100%;
        max-width: none;
    }

    .articles-filter-list {
        width: 100%;
    }

    .articles-filter-pill {
        flex: 1 1 auto;
        justify-content: center;
    }

    .articles-grid-head {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.25rem;
    }
}

@media (max-width: 620px) {
    .articles-list-hero-copy h1 {
        font-size: clamp(2.15rem, 13vw, 3.2rem);
    }

    .articles-list-hero-copy p {
        font-size: 0.96rem;
        line-height: 1.65;
    }

    .articles-search-form {
        display: flex;
        align-items: center;
        gap: 0;
    }

    .articles-search-icon {
        top: 50%;
        transform: translateY(-50%);
    }

    .articles-search-form input[type="search"] {
        padding-right: 3.1rem;
    }

    .articles-search-form button {
        position: absolute;
        top: 5px;
        right: 0.35rem;
        width: 38px;
        min-width: 0;
        padding: 0;
    }

    .articles-featured-copy {
        padding: 1.35rem;
    }

    .articles-featured-image {
        min-height: 210px;
    }

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

    .articles-card-body {
        min-height: auto;
    }
}

/* Modern tools index */
.tools-list-page {
    --tools-bg: #eceeef;
    --tools-surface: #ffffff;
    --tools-surface-soft: #f6f8fb;
    --tools-border: #d8e1ee;
    --tools-border-strong: #c8d3e3;
    --tools-heading: #0f172f;
    --tools-text: #334155;
    --tools-muted: #64748b;
    --tools-soft: #8a98ad;
    --tools-accent: #2563eb;
    --tools-accent-deep: #1d4ed8;
    --tools-accent-soft: rgba(37, 99, 235, 0.08);
    --tools-shadow-sm: 0 4px 20px rgba(15, 23, 47, 0.04);
    --tools-shadow-md: 0 14px 34px rgba(15, 23, 47, 0.08);
    position: relative;
    isolation: isolate;
    overflow: hidden;
    background: var(--tools-bg);
}

.tools-list-page .tools-list-container {
    max-width: 1200px;
}

.tools-reveal {
    opacity: 1;
    transform: none;
}

.tools-list-hero {
    padding: 3.2rem 0 2.2rem;
}

.tools-back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin-bottom: 1.1rem;
    color: var(--tools-soft);
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
}

.tools-back-link:hover {
    color: var(--tools-heading);
    text-decoration: none;
}

.tools-back-link svg {
    width: 1rem;
    height: 1rem;
}

.tools-list-hero-copy {
    max-width: 40rem;
    margin-inline: auto;
    text-align: center;
}

.tools-list-hero-copy h1 {
    margin: 0 0 1rem;
    color: var(--tools-heading);
    font-family: var(--font-heading);
    font-size: clamp(2.45rem, 6vw, 4.6rem);
    font-weight: 300;
    line-height: 1.04;
    letter-spacing: -0.055em;
}

.tools-list-hero-copy h1 span {
    display: block;
}

.tools-list-hero-copy h1 .tools-title-line {
    color: inherit;
    font-weight: inherit;
    white-space: nowrap;
}

.tools-list-hero-copy h1 .tools-title-accent {
    display: inline;
    color: var(--tools-accent);
    font-weight: 500;
}

.tools-list-hero-copy p {
    max-width: 40rem;
    margin: 0 auto;
    color: var(--tools-muted);
    font-size: 1.02rem;
    line-height: 1.75;
}

.tools-controls {
    display: grid;
    align-items: start;
    justify-items: center;
    gap: 1rem;
    margin-top: 2rem;
}

.tools-list-page .tools-search-form {
    position: relative;
    display: flex;
    align-items: center;
    width: min(100%, 35rem);
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}

.tools-list-page .tools-search-icon {
    position: absolute;
    left: 0.9rem;
    width: 1.05rem;
    height: 1.05rem;
    color: var(--tools-soft);
    pointer-events: none;
}

.tools-list-page .tools-search-form input[type="search"] {
    width: 100%;
    height: 48px;
    padding: 0 6.1rem 0 2.65rem;
    border: 1px solid var(--tools-border);
    border-radius: 14px;
    background: var(--tools-surface);
    color: var(--tools-text);
    font: inherit;
    font-size: 0.92rem;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.tools-list-page .tools-search-form input[type="search"]:focus {
    outline: none;
    border-color: rgba(37, 99, 235, 0.42);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.tools-list-page .tools-search-form button {
    position: absolute;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    right: 0.35rem;
    height: 38px;
    min-height: 0;
    padding: 0 0.95rem;
    border: 0;
    border-radius: 11px;
    background: var(--tools-accent);
    color: #ffffff;
    cursor: pointer;
    font: inherit;
    font-size: 0.82rem;
    font-weight: 800;
    box-shadow: none;
    transition: background 0.18s ease;
}

.tools-list-page .tools-search-form button:hover {
    background: var(--tools-accent-deep);
    transform: none;
}

.tools-filter-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
}

.tools-filter-pill {
    padding: 0.42rem 0.82rem;
    border: 1px solid var(--tools-border);
    border-radius: 999px;
    background: var(--tools-surface);
    color: var(--tools-muted);
    cursor: pointer;
    font: inherit;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.tools-filter-pill:hover,
.tools-filter-pill.active {
    border-color: var(--tools-accent);
    background: var(--tools-accent);
    color: #ffffff;
}

.tools-results-note {
    padding: 0 0 1.2rem;
}

.tools-results-note .tools-list-container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    color: var(--tools-muted);
    font-size: 0.95rem;
}

.tools-results-note a {
    color: var(--tools-accent);
    font-weight: 800;
}

.tools-featured-section {
    padding: 0 0 2.25rem;
}

.tools-featured-card {
    display: grid;
    grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr);
    overflow: hidden;
    border: 1px solid var(--tools-border);
    border-radius: 22px;
    background: var(--tools-surface);
    box-shadow: var(--tools-shadow-sm);
    color: inherit;
    text-decoration: none;
    transition: box-shadow 0.22s ease, border-color 0.22s ease;
}

.tools-featured-card:hover {
    border-color: rgba(37, 99, 235, 0.34);
    box-shadow: var(--tools-shadow-md);
    color: inherit;
    text-decoration: none;
}

.tools-featured-card[hidden],
.tools-card[hidden] {
    display: none;
}

.tools-featured-visual {
    position: relative;
    display: flex;
    min-height: 330px;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 2.5rem;
    background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 42%, #3b82f6 72%, #1e40af 100%);
}

.tools-featured-visual::before,
.tools-featured-visual::after {
    content: "";
    position: absolute;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
}

.tools-featured-visual::before {
    width: 300px;
    height: 300px;
    top: -80px;
    right: -80px;
}

.tools-featured-visual::after {
    width: 200px;
    height: 200px;
    bottom: -42px;
    left: -42px;
}

.tools-float-char {
    position: absolute;
    z-index: 1;
    color: rgba(255, 255, 255, 0.1);
    font-family: var(--font-mono);
    font-weight: 700;
    line-height: 1;
    user-select: none;
    animation: tools-float-char 4.6s ease-in-out infinite;
}

.tools-float-a { top: 15%; left: 12%; font-size: 2rem; animation-delay: 0s; }
.tools-float-b { top: 25%; right: 18%; font-size: 1.55rem; animation-delay: 0.8s; }
.tools-float-c { bottom: 20%; left: 20%; font-size: 2.45rem; animation-delay: 1.6s; }
.tools-float-d { right: 10%; bottom: 30%; font-size: 1.55rem; animation-delay: 2.4s; }
.tools-float-e { top: 60%; left: 8%; font-size: 2rem; animation-delay: 0.4s; }
.tools-float-arrow-one { top: 10%; right: 35%; font-size: 1.35rem; animation-delay: 1.2s; }
.tools-float-arrow-two { bottom: 10%; left: 40%; font-size: 1.35rem; animation-delay: 2s; }

@keyframes tools-float-char {
    0%,
    100% {
        transform: translateY(0);
        opacity: 0.65;
    }

    50% {
        transform: translateY(-8px);
        opacity: 1;
    }
}

.tools-cipher-wheel {
    position: relative;
    z-index: 2;
    display: flex;
    width: 160px;
    height: 160px;
    align-items: center;
    justify-content: center;
    border: 3px solid rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    text-align: center;
}

.tools-cipher-wheel::before,
.tools-cipher-wheel::after {
    content: "";
    position: absolute;
    border-radius: 50%;
}

.tools-cipher-wheel::before {
    width: 120px;
    height: 120px;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.tools-cipher-wheel::after {
    width: 80px;
    height: 80px;
    border: 1.5px dashed rgba(255, 255, 255, 0.12);
}

.tools-cipher-wheel strong,
.tools-cipher-wheel span {
    position: relative;
    z-index: 1;
    display: block;
}

.tools-cipher-wheel strong {
    color: rgba(255, 255, 255, 0.94);
    font-family: var(--font-mono);
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.04em;
}

.tools-cipher-wheel span {
    margin-top: 0.3rem;
    color: rgba(255, 255, 255, 0.52);
    font-family: var(--font-mono);
    font-size: 0.72rem;
}

.tools-featured-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    font-size: 0.66rem;
    font-weight: 900;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    backdrop-filter: blur(10px);
}

.tools-featured-copy {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: clamp(1.65rem, 4vw, 2.7rem);
}

.tools-card-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem;
    margin-bottom: 0.75rem;
    color: var(--tools-soft);
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.tools-card-meta > span:first-child {
    color: var(--tools-accent);
}

.tools-level-pill {
    display: inline-flex;
    align-items: center;
    min-height: 1.3125rem;
    padding: 0.125rem 0.5rem;
    border-radius: 0.375rem;
    font-size: 0.625rem;
    font-weight: 700;
    line-height: 1;
}

.tools-level-beginner {
    background: #ecfdf5;
    color: #059669;
}

.tools-level-intermediate {
    background: #fffbeb;
    color: #d97706;
}

.tools-level-advanced {
    background: #fef2f2;
    color: #dc2626;
}

.tools-featured-copy h2 {
    margin: 0 0 0.85rem;
    color: var(--tools-heading);
    font-family: var(--font-heading);
    font-size: clamp(1.55rem, 3vw, 2.25rem);
    font-weight: 400;
    line-height: 1.12;
    letter-spacing: -0.04em;
    transition: color 0.18s ease;
}

.tools-featured-card:hover h2,
.tools-card:hover h3 {
    color: var(--tools-accent);
}

.tools-featured-copy p {
    margin: 0 0 1rem;
    color: var(--tools-muted);
    font-size: 1rem;
    line-height: 1.72;
}

.tools-example-strip {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin: 0 0 1.45rem;
    padding: 0.78rem 0.9rem;
    border: 1px solid var(--tools-border);
    border-radius: 12px;
    background: var(--tools-surface-soft);
    color: var(--tools-muted);
    font-family: var(--font-mono);
    font-size: 0.84rem;
}

.tools-example-strip span:nth-child(2) {
    color: var(--tools-accent);
}

.tools-example-strip strong {
    color: var(--tools-heading);
    font-weight: 700;
}

.tools-featured-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
}

.tools-primary-action {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    min-height: 43px;
    padding: 0 1.15rem;
    border-radius: 12px;
    background: var(--tools-accent);
    color: #ffffff;
    font-size: 0.9rem;
    font-weight: 800;
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.18);
    transition: gap 0.18s ease, background 0.18s ease;
}

.tools-primary-action svg {
    width: 1rem;
    height: 1rem;
}

.tools-featured-card:hover .tools-primary-action {
    gap: 0.7rem;
    background: var(--tools-accent-deep);
}

.tools-featured-note {
    color: var(--tools-soft);
    font-size: 0.82rem;
    font-weight: 700;
}

.tools-grid-section {
    padding: 0 0 4.5rem;
}

.tools-family-stack {
    display: grid;
    gap: 2.1rem;
}

.tools-family-group {
    display: grid;
    gap: 0.9rem;
}

.tools-family-group[hidden] {
    display: none;
}

.tools-family-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    padding: 0 0.1rem;
}

.tools-family-head h3 {
    margin: 0;
    color: var(--tools-heading);
    font-family: var(--font-heading);
    font-size: clamp(1.25rem, 2vw, 1.55rem);
    font-weight: 500;
    letter-spacing: -0.025em;
}

.tools-family-head span {
    color: var(--tools-soft);
    font-size: 0.86rem;
    font-weight: 700;
    white-space: nowrap;
}

.tools-grid-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.15rem;
}

.tools-grid-head h2 {
    margin: 0;
    color: var(--tools-heading);
    font-family: var(--font-heading);
    font-size: 1.45rem;
    font-weight: 600;
    letter-spacing: -0.03em;
}

.tools-grid-head span {
    color: var(--tools-soft);
    font-size: 0.9rem;
    font-weight: 700;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.25rem;
}

.tools-card {
    border: 1px solid var(--tools-border);
    border-radius: 12px;
    background: var(--tools-surface);
    box-shadow: var(--tools-shadow-sm);
    transition: box-shadow 0.22s ease, border-color 0.22s ease;
}

.tools-card:hover {
    border-color: rgba(37, 99, 235, 0.34);
    box-shadow: var(--tools-shadow-md);
}

.tools-card a {
    display: flex;
    min-height: 100%;
    flex-direction: column;
    padding: 1.5rem;
    color: inherit;
    text-decoration: none;
}

.tools-card-visual {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.tools-card-visual .tools-level-pill {
    flex: 0 0 auto;
}

.tools-card-title-wrap {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 0.8rem;
}

.tools-card-title-wrap h3 {
    margin: 0;
}

.tools-card-icon {
    display: flex;
    flex: 0 0 auto;
    width: 2.75rem;
    height: 2.75rem;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem;
    background: #eff6ff;
    color: var(--tools-accent);
    transition: background 0.18s ease;
}

.tools-card:hover .tools-card-icon {
    background: #dbeafe;
}

.tools-card-kind-transposition .tools-card-icon {
    background: #ecfdf5;
    color: #059669;
}

.tools-card-kind-transposition:hover .tools-card-icon {
    background: #d1fae5;
}

.tools-card-kind-analysis .tools-card-icon {
    background: #fffbeb;
    color: #d97706;
}

.tools-card-kind-analysis:hover .tools-card-icon {
    background: #fef3c7;
}

.tools-card-kind-encodings .tools-card-icon {
    background: #f5f3ff;
    color: #7c3aed;
}

.tools-card-kind-encodings:hover .tools-card-icon {
    background: #ede9fe;
}

.tools-card-icon svg {
    width: 1.25rem;
    height: 1.25rem;
}

.tools-card-body {
    display: flex;
    min-height: 0;
    flex: 1;
    flex-direction: column;
    padding: 0;
}

.tools-type-pill {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    padding: 0.25rem 0.5rem;
    border-radius: 0.35rem;
    background: var(--tools-surface-soft);
    color: var(--tools-soft);
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1.15;
}

.tools-card h3 {
    margin: 0 0 0.45rem;
    color: var(--tools-heading);
    font-family: var(--font-heading);
    font-size: 1.125rem;
    font-weight: 500;
    line-height: 1.24;
    letter-spacing: -0.02em;
    transition: color 0.18s ease;
}

.tools-card p {
    display: -webkit-box;
    margin: 0;
    overflow: hidden;
    color: var(--tools-muted);
    font-size: 0.875rem;
    line-height: 1.65;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.tools-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-top: auto;
    padding-top: 1rem;
}

.tools-card-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--tools-accent);
    font-size: 0.875rem;
    font-weight: 600;
    opacity: 1;
    transition: opacity 0.18s ease;
}

.tools-card-cta svg {
    width: 0.875rem;
    height: 0.875rem;
}

@media (min-width: 640px) {
    .tools-card-cta {
        opacity: 0;
    }

    .tools-card:hover .tools-card-cta,
    .tools-card:focus-within .tools-card-cta {
        opacity: 1;
    }
}

.tools-card-glyph {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.25rem;
    min-height: 1.25rem;
    color: currentColor;
}

.tools-card-glyph-text {
    font-family: var(--font-heading);
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.02em;
}

.tools-empty-state {
    padding: 3.8rem 1rem;
    text-align: center;
}

.tools-empty-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 4rem;
    height: 4rem;
    margin-bottom: 1rem;
    border-radius: 999px;
    background: var(--tools-surface-soft);
    color: var(--tools-soft);
}

.tools-empty-icon svg {
    width: 1.8rem;
    height: 1.8rem;
}

.tools-empty-state h3 {
    margin: 0 0 0.4rem;
    color: var(--tools-heading);
    font-family: var(--font-heading);
    font-size: 1.35rem;
}

.tools-empty-state p {
    margin: 0 0 1rem;
    color: var(--tools-muted);
}

.tools-empty-state a,
.tools-empty-state button {
    border: 0;
    background: transparent;
    color: var(--tools-accent);
    cursor: pointer;
    font: inherit;
    font-weight: 800;
    text-decoration: none;
}

.tools-cta-section {
    padding: 0 0 4rem;
}

.tools-cta-card {
    position: relative;
    overflow: hidden;
    padding: clamp(2rem, 4vw, 3rem);
    border: 1px solid var(--tools-border);
    border-radius: 24px;
    background: var(--tools-surface);
    box-shadow: var(--tools-shadow-sm);
    text-align: center;
}

.tools-cta-card::before {
    content: "";
    position: absolute;
    top: 0;
    right: 12%;
    left: 12%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(37, 99, 235, 0.3), transparent);
}

.tools-cta-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    margin-bottom: 1rem;
    border: 1px solid rgba(37, 99, 235, 0.14);
    border-radius: 14px;
    background: var(--tools-accent-soft);
    color: var(--tools-accent);
}

.tools-cta-icon svg {
    width: 1.35rem;
    height: 1.35rem;
}

.tools-cta-card h2 {
    margin: 0 0 0.5rem;
    color: var(--tools-heading);
    font-family: var(--font-heading);
    font-size: clamp(1.75rem, 4vw, 2.45rem);
    font-weight: 400;
    letter-spacing: -0.045em;
}

.tools-cta-card h2 span {
    color: var(--tools-accent);
}

.tools-cta-card p {
    max-width: 38rem;
    margin: 0 auto 1.35rem;
    color: var(--tools-muted);
    line-height: 1.7;
}

.tools-cta-card a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 1.25rem;
    border-radius: 12px;
    background: var(--tools-accent);
    color: #ffffff;
    font-size: 0.9rem;
    font-weight: 800;
    text-decoration: none;
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.18);
}

html[data-theme="dark"] .tools-list-page {
    --tools-bg: #171b21;
    --tools-surface: #20252d;
    --tools-surface-soft: #262d36;
    --tools-border: #323a43;
    --tools-border-strong: #475569;
    --tools-heading: #f3f5f7;
    --tools-text: #d7dce2;
    --tools-muted: #a5adb8;
    --tools-soft: #818b97;
    --tools-accent: #7db0ff;
    --tools-accent-deep: #a9c7ff;
    --tools-accent-soft: rgba(125, 176, 255, 0.1);
    --tools-shadow-sm: 0 4px 20px rgba(0, 0, 0, 0.18);
    --tools-shadow-md: 0 16px 38px rgba(0, 0, 0, 0.28);
}

html[data-theme="dark"] .tools-list-page .tools-search-form input[type="search"] {
    background: #181b1f;
    color: var(--tools-heading);
}

html[data-theme="dark"] .tools-filter-pill {
    background: var(--tools-surface);
}

html[data-theme="dark"] .tools-level-beginner {
    background: rgba(32, 122, 71, 0.18);
    color: #8dd6ab;
}

html[data-theme="dark"] .tools-level-intermediate {
    background: rgba(154, 100, 0, 0.18);
    color: #f2c46b;
}

html[data-theme="dark"] .tools-level-advanced {
    background: rgba(170, 50, 65, 0.18);
    color: #ffa3ad;
}

html[data-theme="dark"] .tools-card-icon {
    background: rgba(125, 176, 255, 0.11);
    color: var(--tools-accent);
}

html[data-theme="dark"] .tools-type-pill {
    background: #1c2533;
    color: var(--tools-soft);
}

@media (max-width: 980px) {
    .tools-featured-card {
        grid-template-columns: 1fr;
    }

    .tools-featured-visual {
        min-height: 260px;
    }

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

@media (max-width: 720px) {
    .tools-list-hero {
        padding: 2.1rem 0 1.6rem;
    }

    .tools-controls {
        align-items: stretch;
        gap: 0.8rem;
    }

    .tools-list-page .tools-search-form {
        width: 100%;
        max-width: none;
    }

    .tools-filter-list {
        width: 100%;
    }

    .tools-filter-pill {
        flex: 1 1 auto;
        justify-content: center;
    }

    .tools-grid-head {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.25rem;
    }

    .tools-family-head {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.2rem;
    }
}

@media (max-width: 620px) {
    .tools-list-hero-copy h1 {
        font-size: clamp(2.15rem, 13vw, 3.2rem);
    }

    .tools-list-hero-copy h1 .tools-title-line {
        white-space: normal;
    }

    .tools-list-hero-copy p {
        font-size: 0.96rem;
        line-height: 1.65;
    }

    .tools-list-page .tools-search-form {
        display: flex;
        align-items: center;
        gap: 0;
    }

    .tools-list-page .tools-search-icon {
        top: 50%;
        transform: translateY(-50%);
    }

    .tools-list-page .tools-search-form input[type="search"] {
        padding-right: 3.1rem;
    }

    .tools-list-page .tools-search-form button {
        position: absolute;
        top: 5px;
        right: 0.35rem;
        width: 38px;
        min-width: 0;
        padding: 0;
    }

    .tools-featured-copy {
        padding: 1.35rem;
    }

    .tools-featured-visual {
        min-height: 220px;
    }

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

    .tools-card-body {
        min-height: auto;
    }
}

@media (prefers-reduced-motion: reduce) {
    .tools-list-page *,
    .tools-list-page *::before,
    .tools-list-page *::after {
        animation: none !important;
        transition: none !important;
    }

    .tools-reveal {
        opacity: 1;
        transform: none;
    }
}

/* Glossary page */
.glossary-page {
    --glossary-bg: #f3f6fa;
    --glossary-surface: #ffffff;
    --glossary-border: #dfe6ef;
    --glossary-border-soft: #edf2f7;
    --glossary-heading: #061633;
    --glossary-text: #536176;
    --glossary-muted: #8994a5;
    --glossary-accent: #2563eb;
    --glossary-accent-soft: #eff6ff;
    --glossary-indicator-bg: #f1f5f9;
    --glossary-indicator-border: #e2e8f0;
    --glossary-indicator-icon: #64748b;
    --glossary-indicator-hover-bg: #e0e7ff;
    --glossary-indicator-hover-border: #c7d2fe;
    --glossary-indicator-hover-icon: #2563eb;
    min-height: 100vh;
    background:
        radial-gradient(circle at 20% 0%, rgba(37, 99, 235, 0.08), transparent 30rem),
        linear-gradient(180deg, #f7fafc 0%, var(--glossary-bg) 100%);
    color: var(--glossary-heading);
}

.glossary-container {
    max-width: 1200px;
}

.glossary-hero {
    padding: 4.2rem 0 2.2rem;
}

.glossary-hero-copy {
    max-width: 44rem;
    margin: 0 auto;
    text-align: center;
}

.glossary-kicker {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    padding: 0.36rem 0.9rem;
    border: 1px solid #bfdbfe;
    border-radius: 999px;
    background: var(--glossary-accent-soft);
    color: var(--glossary-accent);
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.glossary-hero h1 {
    margin: 0 0 1rem;
    font-family: var(--font-heading);
    font-size: clamp(3rem, 8vw, 5.2rem);
    font-weight: 300;
    line-height: 0.98;
    letter-spacing: -0.07em;
}

.glossary-hero h1 span {
    color: var(--glossary-accent);
    font-weight: 400;
}

.glossary-hero p {
    margin: 0 auto;
    max-width: 42rem;
    color: var(--glossary-text);
    font-size: 1.02rem;
    line-height: 1.75;
}

.glossary-hero .glossary-helper {
    margin-top: 0.4rem;
    color: var(--glossary-muted);
    font-size: 0.9rem;
}

.glossary-search-wrap {
    position: relative;
    display: flex;
    align-items: center;
    width: min(100%, 35rem);
    max-width: 42rem;
    margin: 2rem auto 0;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}

.glossary-search-icon {
    position: absolute;
    left: 1rem;
    width: 1.08rem;
    height: 1.08rem;
    color: var(--glossary-muted);
    pointer-events: none;
}

.glossary-search-wrap input[type="search"] {
    width: 100%;
    height: 48px;
    padding: 0 6.1rem 0 2.65rem;
    border: 1px solid var(--glossary-border);
    border-radius: 14px;
    background: #ffffff;
    color: var(--glossary-heading);
    font: inherit;
    font-size: 0.92rem;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.glossary-search-wrap input[type="search"]:focus {
    border-color: #93c5fd;
    outline: none;
    box-shadow:
        0 0 0 4px rgba(37, 99, 235, 0.1);
}

.glossary-search-button {
    position: absolute;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    right: 0.35rem;
    height: 38px;
    min-height: 0;
    padding: 0 0.95rem;
    border: 0;
    border-radius: 11px;
    background: var(--glossary-accent);
    color: #ffffff;
    cursor: pointer;
    font: inherit;
    font-size: 0.82rem;
    font-weight: 800;
    box-shadow: none;
    transition: background 0.18s ease;
}

.glossary-search-button:hover {
    background: var(--accent-deep);
}

.glossary-stats {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2.4rem;
    margin-top: 2rem;
}

.glossary-stats div {
    text-align: center;
}

.glossary-stats strong,
.glossary-stats span {
    display: block;
}

.glossary-stats strong {
    color: var(--glossary-heading);
    font-size: 1.55rem;
    font-weight: 700;
    letter-spacing: -0.03em;
}

.glossary-stats span {
    margin-top: 0.1rem;
    color: var(--glossary-muted);
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.glossary-az-nav {
    position: sticky;
    top: var(--header-height);
    z-index: 20;
    border-top: 1px solid var(--glossary-border);
    border-bottom: 1px solid var(--glossary-border);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(16px);
}

.glossary-az-list {
    display: grid;
    grid-template-columns: repeat(14, minmax(0, 2.25rem));
    justify-content: center;
    gap: 0.38rem;
    padding: 0.8rem 0;
}

.glossary-letter-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border: 1px solid var(--glossary-border);
    border-radius: 10px;
    background: #ffffff;
    color: var(--glossary-heading);
    font-size: 0.84rem;
    font-weight: 700;
    text-decoration: none;
    transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.glossary-letter-link:hover {
    border-color: #bfdbfe;
    background: var(--glossary-accent-soft);
    color: var(--glossary-accent);
    transform: translateY(-1px);
}

.glossary-number-link {
    width: auto;
    min-width: 3.25rem;
    padding: 0 0.58rem;
}

.glossary-letter-link.is-disabled {
    border-color: var(--glossary-border-soft);
    background: rgba(255, 255, 255, 0.46);
    color: #c4cdd8;
    pointer-events: none;
}

.glossary-content-section {
    padding: 3rem 0 3.5rem;
}

.glossary-letter-section {
    scroll-margin-top: calc(var(--header-height) + 5rem);
    margin-bottom: 3rem;
}

.glossary-letter-head {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.1rem;
}

.glossary-letter-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    border: 1px solid #dbeafe;
    border-radius: 14px;
    background: var(--glossary-accent-soft);
    color: var(--glossary-accent);
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 700;
}

.glossary-number-badge {
    width: auto;
    min-width: 3.5rem;
    padding: 0 0.65rem;
}

.glossary-letter-rule {
    flex: 1;
    height: 1px;
    background: var(--glossary-border);
}

.glossary-letter-head span {
    color: var(--glossary-muted);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

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

.glossary-term-card {
    border: 1px solid var(--glossary-border);
    border-radius: 18px;
    background: var(--glossary-surface);
    padding: 1.25rem;
    box-shadow: 0 8px 26px rgba(15, 23, 42, 0.035);
    transition: border-color 0.22s ease, box-shadow 0.22s ease;
}

.glossary-term-card:hover {
    border-color: #93c5fd;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.06);
}

.glossary-term-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.65rem;
}

.glossary-term-title-wrap {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem;
    min-width: 0;
}

.glossary-term-meta {
    display: inline-flex;
    flex: 0 0 auto;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.45rem;
}

.glossary-term-card h3 {
    margin: 0;
    color: var(--glossary-heading);
    font-family: var(--font-heading);
    font-size: 1.03rem;
    font-weight: 500;
    line-height: 1.25;
    letter-spacing: -0.02em;
}

.glossary-term-card p {
    margin: 0;
    color: var(--glossary-text);
    font-size: 0.9rem;
    line-height: 1.65;
}

.glossary-page .indicator-row {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem;
}

.glossary-page .indicator {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: 1px solid var(--glossary-indicator-border);
    border-radius: 6px;
    background-color: var(--glossary-indicator-bg);
    text-decoration: none;
    transition: all 0.2s ease-in-out;
}

.glossary-page .indicator i {
    color: var(--glossary-indicator-icon);
    font-size: 0.9rem;
    line-height: 1;
    transition: color 0.2s ease-in-out;
}

.glossary-page .indicator:hover {
    background-color: var(--glossary-indicator-hover-bg);
    border-color: var(--glossary-indicator-hover-border);
    transform: translateY(-1px);
}

.glossary-page .indicator:hover i {
    color: var(--glossary-indicator-hover-icon);
}

.glossary-page .indicator:active {
    transform: translateY(0);
}

.glossary-category-pill {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    padding: 0 0.5rem;
    border: 1px solid currentColor;
    border-radius: 7px;
    font-size: 0.61rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.glossary-category-classical {
    background: #fffbeb;
    color: #b45309;
}

.glossary-category-modern {
    background: #eff6ff;
    color: #2563eb;
}

.glossary-category-cryptanalysis {
    background: #fef2f2;
    color: #dc2626;
}

.glossary-category-general {
    background: #f8fafc;
    color: #64748b;
}

.glossary-category-historical {
    background: #ecfdf5;
    color: #059669;
}

.glossary-category-encoding {
    background: #eef2ff;
    color: #4338ca;
}

.glossary-category-mathematics {
    background: #ecfeff;
    color: #0f766e;
}

.glossary-category-signalling {
    background: #effcf6;
    color: #0f766e;
}

.glossary-category-concept {
    background: #f5f3ff;
    color: #7c3aed;
}

.glossary-category-web {
    background: #eff6ff;
    color: #0369a1;
}

.glossary-empty-state {
    max-width: 34rem;
    margin: 0 auto;
    padding: 4rem 1rem;
    text-align: center;
}

.glossary-empty-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 4rem;
    height: 4rem;
    margin-bottom: 1rem;
    border-radius: 18px;
    background: #e9eef5;
    color: var(--glossary-muted);
}

.glossary-empty-icon svg {
    width: 1.8rem;
    height: 1.8rem;
}

.glossary-empty-state h3 {
    margin: 0 0 0.35rem;
    color: var(--glossary-heading);
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 600;
}

.glossary-empty-state p {
    margin: 0 0 1rem;
    color: var(--glossary-muted);
}

.glossary-empty-state button {
    min-height: 2.6rem;
    padding: 0 1rem;
    border: 1px solid #bfdbfe;
    border-radius: 12px;
    background: #ffffff;
    color: var(--glossary-accent);
    font-weight: 800;
    cursor: pointer;
}

.glossary-cta-section {
    padding: 0 0 3.75rem;
}

.glossary-cta-card {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--glossary-border);
    border-radius: 26px;
    background: #ffffff;
    padding: clamp(2rem, 5vw, 3.4rem);
    text-align: center;
    box-shadow: 0 18px 44px rgba(15, 23, 42, 0.045);
}

.glossary-cta-card::before {
    content: "";
    position: absolute;
    left: 12%;
    right: 12%;
    top: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(37, 99, 235, 0.35), transparent);
}

.glossary-cta-card h2 {
    margin: 0 0 0.65rem;
    color: var(--glossary-heading);
    font-family: var(--font-heading);
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 300;
    letter-spacing: -0.055em;
}

.glossary-cta-card h2 span {
    color: var(--glossary-accent);
    font-weight: 400;
}

.glossary-cta-card p {
    max-width: 42rem;
    margin: 0 auto 1.4rem;
    color: var(--glossary-text);
    line-height: 1.7;
}

.glossary-cta-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
}

.glossary-cta-actions a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 3rem;
    padding: 0 1.35rem;
    border-radius: 14px;
    background: var(--glossary-accent);
    color: #ffffff;
    font-size: 0.92rem;
    font-weight: 800;
    text-decoration: none;
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.2);
}

.glossary-cta-actions a.secondary {
    border: 1px solid var(--glossary-border);
    background: #ffffff;
    color: var(--glossary-heading);
    box-shadow: none;
}

html[data-theme="dark"] .glossary-page {
    --glossary-bg: #171b21;
    --glossary-surface: #20252d;
    --glossary-border: #323a43;
    --glossary-border-soft: #29313a;
    --glossary-heading: #f3f5f7;
    --glossary-text: #c8d0da;
    --glossary-muted: #9aa5b2;
    --glossary-accent: #7db0ff;
    --glossary-accent-soft: rgba(125, 176, 255, 0.1);
    --glossary-indicator-bg: #334155;
    --glossary-indicator-border: #475569;
    --glossary-indicator-icon: #94a3b8;
    --glossary-indicator-hover-bg: #1e3a8a;
    --glossary-indicator-hover-border: #3b82f6;
    --glossary-indicator-hover-icon: #60a5fa;
    background: #171b21;
}

html[data-theme="dark"] .glossary-search-wrap input[type="search"],
html[data-theme="dark"] .glossary-letter-link,
html[data-theme="dark"] .glossary-term-card,
html[data-theme="dark"] .glossary-cta-card,
html[data-theme="dark"] .glossary-cta-actions a.secondary {
    background: var(--glossary-surface);
}

html[data-theme="dark"] .glossary-letter-link:not(.is-disabled) {
    border-color: #475569;
    background: #242b34;
    color: #f3f5f7;
}

html[data-theme="dark"] .glossary-letter-link:not(.is-disabled):hover {
    border-color: var(--glossary-accent);
    background: rgba(125, 176, 255, 0.14);
    color: var(--glossary-accent);
}

html[data-theme="dark"] .glossary-letter-link.is-disabled {
    border-color: #252d36;
    background: #171c23;
    color: #596372;
    opacity: 0.72;
}

html[data-theme="dark"] .glossary-az-nav {
    background: rgba(23, 27, 33, 0.9);
}

.site-share-button {
    display: inline-flex;
    align-items: center;
    width: auto;
    max-width: 100%;
    padding: 4px;
    border: 1px solid #d8dbe0;
    border-radius: 999px;
    background: #ffffff;
    color: #152033;
    box-shadow: 0 4px 12px rgba(19, 28, 40, 0.04);
    font-family: "Inter", var(--font-sans);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.site-share-button:hover,
.site-share-button:focus-within,
.site-share-button.is-open {
    border-color: #c9ced6;
    box-shadow: 0 6px 16px rgba(19, 28, 40, 0.08);
}

.site-share-main,
.site-share-target {
    appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    border: 0;
    border-radius: 999px;
    font: inherit;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.site-share-main {
    background: #e9e9ea;
    color: #152033;
}

.site-share-main svg,
.site-share-target svg {
    width: 17px;
    height: 17px;
}

.site-share-main:focus-visible,
.site-share-target:focus-visible {
    outline: none;
    box-shadow:
        0 0 0 3px rgba(78, 127, 210, 0.16),
        0 0 0 1px rgba(78, 127, 210, 0.28);
}

.site-share-targets {
    display: flex;
    align-items: center;
    min-width: 0;
}

.site-share-target-item {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 0;
    margin-left: 0;
    opacity: 0;
    visibility: hidden;
    transition: width 0.3s ease, margin-left 0.3s ease, opacity 0.3s ease, visibility 0s 0.3s;
}

.site-share-button:hover .site-share-target-item,
.site-share-button:focus-within .site-share-target-item,
.site-share-button.is-open .site-share-target-item {
    width: 40px;
    margin-left: 4px;
    opacity: 1;
    visibility: visible;
    transition: width 0.3s ease, margin-left 0.3s ease, opacity 0.3s ease, visibility 0s 0s;
}

.site-share-target {
    position: relative;
    background: transparent;
    color: #687385;
    transition: background-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.site-share-target:active {
    transform: translateY(1px);
}

.site-share-target[data-share-service="copy"]:hover,
.site-share-target[data-share-service="copy"].is-done {
    background: #eef8ef;
    color: #245e2d;
}

.site-share-target[data-share-service="x"]:hover {
    background: #f0f0f1;
    color: #1a1a1a;
}

.site-share-target[data-share-service="facebook"]:hover {
    background: #eef1f7;
    color: #3b5998;
}

.site-share-target[data-share-service="reddit"]:hover {
    background: #ffe8e0;
    color: #e03d00;
}

.site-share-target[data-share-service="whatsapp"]:hover {
    background: #eef6f0;
    color: #25824a;
}

.site-share-target[data-share-service="email"]:hover {
    background: #f3f4f6;
    color: #4a5568;
}

.site-share-target[data-share-service="linkedin"]:hover {
    background: #e8f3ff;
    color: #0854a1;
}

.site-share-target[data-share-service="kofi"]:hover {
    background: #fff1e8;
    color: #ff5a16;
}

.site-share-target::after {
    content: attr(aria-label);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    z-index: 20;
    padding: 5px 10px;
    border-radius: 8px;
    background: #1d2740;
    color: #ffffff;
    font-size: 0.76rem;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transform: translateX(-50%) translateY(4px);
    transition: opacity 0.15s ease, transform 0.15s ease;
}

.site-share-target:hover::after,
.site-share-target:focus-visible::after {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.site-share-done-icon,
.site-share-target.is-done .site-share-copy-icon {
    display: none;
}

.site-share-target.is-done .site-share-done-icon {
    display: block;
}

.learn-article-share,
.tool-template-share {
    position: relative;
    overflow: visible;
}

.learn-article-share {
    margin-top: 0;
}

.learn-article-share .site-share-main,
.learn-article-share .site-share-target,
.tool-template-share .site-share-main,
.tool-template-share .site-share-target {
    width: 36px;
    height: 36px;
    flex-basis: 36px;
}

.learn-article-share .site-share-targets,
.tool-template-share .site-share-targets {
    position: absolute;
    top: 50%;
    right: 44px;
    z-index: 25;
    padding: 4px;
    border: 1px solid #d8dbe0;
    border-radius: 999px;
    background: #ffffff;
    box-shadow: 0 8px 22px rgba(19, 28, 40, 0.1);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-50%) translateX(8px);
    transition: opacity 0.22s ease, transform 0.22s ease;
}

.learn-article-share:hover .site-share-targets,
.learn-article-share:focus-within .site-share-targets,
.learn-article-share.is-open .site-share-targets,
.tool-template-share:hover .site-share-targets,
.tool-template-share:focus-within .site-share-targets,
.tool-template-share.is-open .site-share-targets {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(-50%) translateX(0);
}

.learn-article-share .site-share-target-item,
.tool-template-share .site-share-target-item {
    width: 36px;
    margin-left: 4px;
    opacity: 1;
    visibility: visible;
    transition: none;
}

.learn-article-share .site-share-target-item:first-child,
.tool-template-share .site-share-target-item:first-child {
    margin-left: 0;
}

.learn-article-share:hover .site-share-target-item,
.learn-article-share:focus-within .site-share-target-item,
.learn-article-share.is-open .site-share-target-item,
.tool-template-share:hover .site-share-target-item,
.tool-template-share:focus-within .site-share-target-item,
.tool-template-share.is-open .site-share-target-item {
    width: 36px;
}

.tool-template-share {
    margin: 0;
}

.learn-article-share .site-share-target::after,
.tool-template-share .site-share-target::after {
    top: calc(100% + 8px);
    bottom: auto;
    transform: translateX(-50%) translateY(-4px);
}

.learn-article-share .site-share-target:hover::after,
.learn-article-share .site-share-target:focus-visible::after,
.tool-template-share .site-share-target:hover::after,
.tool-template-share .site-share-target:focus-visible::after {
    transform: translateX(-50%) translateY(0);
}

html[data-theme="dark"] .site-share-button {
    border-color: #2f3742;
    background: #181d24;
    color: #f2f5fb;
    box-shadow: var(--shadow-sm);
}

html[data-theme="dark"] .site-share-button:hover,
html[data-theme="dark"] .site-share-button:focus-within,
html[data-theme="dark"] .site-share-button.is-open {
    border-color: #3c4652;
    box-shadow: var(--shadow-md);
}

html[data-theme="dark"] .site-share-main {
    background: #222831;
    color: #f2f5fb;
}

html[data-theme="dark"] .learn-article-share .site-share-targets,
html[data-theme="dark"] .tool-template-share .site-share-targets {
    border-color: #2f3742;
    background: #181d24;
    box-shadow: var(--shadow-md);
}

html[data-theme="dark"] .site-share-target {
    color: #a8b2c0;
}

html[data-theme="dark"] .site-share-target[data-share-service="copy"]:hover,
html[data-theme="dark"] .site-share-target[data-share-service="copy"].is-done {
    background: rgba(74, 146, 84, 0.2);
    color: #a7e3ad;
}

html[data-theme="dark"] .site-share-target[data-share-service="x"]:hover,
html[data-theme="dark"] .site-share-target[data-share-service="email"]:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #f2f5fb;
}

html[data-theme="dark"] .site-share-target[data-share-service="kofi"]:hover {
    background: rgba(255, 90, 22, 0.14);
    color: #ff9b70;
}

.donate-page .learn-article-page-inner {
    --article-font-heading: var(--font-heading);
    padding-bottom: 72px;
}

.policy-page .learn-article-page-inner {
    padding-bottom: 72px;
}

.policy-page-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-bottom: 0;
    text-align: center;
}

.policy-page-header .learn-article-lead {
    width: 100%;
    text-align: left;
}

.policy-page-callout {
    margin-top: 30px;
    padding: 24px 26px;
    border: 1px solid color-mix(in srgb, var(--article-accent) 18%, var(--article-border));
    border-radius: 18px;
    background:
        linear-gradient(135deg, color-mix(in srgb, var(--article-accent) 10%, white) 0%, var(--article-surface) 70%);
    box-shadow: var(--article-shadow-md);
    text-align: left;
    width: min(100%, 760px);
}

.policy-page-callout-eyebrow {
    margin: 0 0 10px;
    color: var(--article-accent);
    font-family: var(--font-mono);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    line-height: 1;
    text-align: center;
    text-transform: uppercase;
}

.policy-page-callout h2 {
    margin: 0 0 14px;
    color: var(--article-heading);
    font-family: var(--article-font-heading);
    font-size: clamp(1.5rem, 2.8vw, 1.9rem);
    font-weight: 800;
    line-height: 1.12;
    letter-spacing: -0.03em;
    text-align: center;
}

.policy-page-callout p {
    margin: 0;
    color: var(--article-text-secondary);
    font-size: 1rem;
    line-height: 1.72;
}

.policy-page-callout p + p {
    margin-top: 0.95rem;
}

html[data-theme="dark"] .policy-page-callout {
    border-color: rgba(147, 197, 253, 0.22);
    background:
        linear-gradient(135deg, rgba(37, 99, 235, 0.14) 0%, rgba(20, 27, 39, 0.98) 52%, rgba(15, 23, 42, 0.98) 100%);
    box-shadow: 0 22px 58px rgba(0, 0, 0, 0.36);
}

html[data-theme="dark"] .policy-page-callout-eyebrow {
    color: #93c5fd;
}

html[data-theme="dark"] .policy-page-callout h2 {
    color: #f8fafc;
}

html[data-theme="dark"] .policy-page-callout p {
    color: #cbd5e1;
}

.policy-page-jump-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 28px;
}

.policy-page .learn-article-header-divider {
    width: 100%;
    margin-top: 30px;
    background: linear-gradient(90deg, transparent, var(--article-border-strong), transparent);
}

.policy-page .learn-article-header-divider::after {
    display: none;
}

.policy-page-jump-nav a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 16px;
    border: 1px solid var(--article-border);
    border-radius: 999px;
    background: var(--article-surface);
    color: var(--article-text-secondary);
    font-size: 0.92rem;
    font-weight: 700;
    text-decoration: none !important;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.policy-page-jump-nav a:hover {
    border-color: var(--article-border-strong);
    box-shadow: var(--article-shadow-sm);
    color: var(--article-heading);
    transform: translateY(-1px);
}

.policy-page-body {
    padding-top: 12px;
}

.policy-page-section {
    scroll-margin-top: 108px;
}

.policy-page-section:first-child h2 {
    margin-top: 0;
}

.policy-page-section + .policy-page-section {
    margin-top: 2.8rem;
}

.policy-page-updated {
    margin-top: 2.8rem;
    color: var(--article-muted);
    font-size: 0.92rem;
    font-weight: 600;
}

.policy-page-banner {
    margin-top: 2.4rem;
}

.policy-contact-methods {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
    width: min(100%, 450px);
    margin: 1.5rem auto;
}

.policy-contact-methods article {
    padding: 22px 20px;
    border: 1px solid var(--article-border);
    border-radius: 8px;
    background: var(--article-surface);
    box-shadow: var(--article-shadow-sm);
}

.policy-contact-methods h3 {
    margin: 0 0 0.55rem;
    color: var(--article-heading);
    font-family: var(--font-sans);
    font-size: 0.96rem;
    font-weight: 800;
    letter-spacing: 0;
}

.policy-contact-methods p {
    margin: 0;
}

.policy-contact-dropdown {
    margin-top: 0;
}

.policy-contact-dropdown summary {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    cursor: pointer;
    color: var(--article-accent);
    font-size: 1rem;
    font-weight: 700;
    list-style: none;
}

.policy-contact-dropdown summary::-webkit-details-marker {
    display: none;
}

.policy-contact-dropdown summary::after {
    content: "";
    width: 0.5rem;
    height: 0.5rem;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg) translateY(-1px);
    transition: transform 0.18s ease;
}

.policy-contact-dropdown[open] summary::after {
    transform: rotate(225deg) translateY(-1px);
}

.policy-contact-dropdown p {
    margin-top: 0.95rem;
    color: var(--article-text-secondary);
    font-size: 0.98rem;
    font-weight: 600;
}

.policy-contact-note {
    margin-top: 1rem !important;
}

.donate-page-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 3.2rem 0 0;
    text-align: center;
}

.donate-page-title {
    width: min(100%, 44rem);
    margin-right: auto;
    margin-bottom: 1rem;
    margin-left: auto;
    color: var(--article-heading);
    font-family: var(--font-heading);
    font-size: clamp(2.45rem, 6vw, 4.6rem);
    font-weight: 300;
    line-height: 1.04;
    letter-spacing: -0.055em;
    text-align: center;
}

.donate-page-title-line {
    display: block;
    width: 100%;
    text-align: center;
}

.donate-page-title-accent {
    color: var(--article-accent);
    font-weight: 500;
}

.donate-page-header .learn-article-lead {
    width: min(100%, 43rem);
    margin-right: auto;
    margin-left: auto;
    color: var(--article-muted);
    font-family: var(--font-sans);
    font-size: 1.02rem;
    font-weight: 400;
    line-height: 1.75;
    text-align: center;
}

.donate-page-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    width: 100%;
    margin: 30px 0 0;
}

.donate-page-support-options {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    width: min(100%, 760px);
    margin: 24px auto 0;
}

.donate-page-support-option {
    display: flex;
    min-height: 76px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 14px 12px;
    border: 1px solid #e6ebf1;
    border-radius: 14px;
    background: #ffffff;
    color: var(--article-heading) !important;
    text-align: center;
    text-decoration: none !important;
    box-shadow: 0 8px 26px rgba(15, 23, 42, 0.035);
    transition: border-color 0.22s ease, box-shadow 0.22s ease, color 0.22s ease;
}

.donate-page-support-option:hover,
.donate-page-support-option:focus-visible,
.donate-page-support-option:active {
    border-color: #93c5fd;
    background: #ffffff;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.06);
    text-decoration: none !important;
}

.donate-page-support-option:focus-visible {
    outline: 3px solid rgba(37, 99, 235, 0.1);
    outline-offset: 3px;
}

.donate-page-support-option strong {
    color: #071225;
    font-size: 1.2rem;
    font-weight: 900;
    line-height: 1;
    letter-spacing: -0.03em;
}

.donate-page-support-option span {
    color: #65748a;
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1.25;
}

.donate-page .learn-article-header-divider {
    width: min(100%, 560px);
    margin-right: auto;
    margin-left: auto;
    background: linear-gradient(90deg, transparent, var(--article-border), transparent);
}

.donate-page .learn-article-header-divider::after {
    display: none;
}

.donate-page-secondary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 56px;
    padding: 0 26px;
    border: 1px solid var(--article-border);
    border-radius: 14px;
    background: var(--article-surface);
    color: var(--article-heading) !important;
    font-size: 1rem;
    font-weight: 800;
    text-decoration: none !important;
    box-shadow: var(--article-shadow-sm);
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.donate-page-secondary-button:hover {
    border-color: var(--article-border-strong);
    box-shadow: var(--article-shadow-md);
    text-decoration: none !important;
    transform: translateY(-1px);
}

.donate-page-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
    max-width: 560px;
    margin: 36px auto 0;
}

.donate-page-stats div {
    padding: 0 22px;
    border-right: 1px solid var(--article-border);
}

.donate-page-stats div:last-child {
    border-right: 0;
}

.donate-page-stats dt {
    margin: 0 0 4px;
    color: var(--article-heading);
    font-size: clamp(1.35rem, 3vw, 1.85rem);
    font-weight: 900;
    line-height: 1;
    letter-spacing: -0.04em;
}

.donate-page-stats dd {
    margin: 0;
    color: var(--article-muted);
    font-size: 0.82rem;
    font-weight: 600;
}

.donate-page-primary {
    margin: 42px 0;
    padding: 34px 38px;
    border: 1px solid var(--article-border);
    border-radius: var(--article-radius-lg);
    background: var(--article-surface);
    box-shadow: var(--article-shadow-md);
    scroll-margin-top: 96px;
    text-align: left;
}

.donate-page-primary-copy {
    max-width: 66ch;
}

.donate-page-eyebrow {
    margin: 0 0 8px;
    width: 100%;
    color: var(--article-accent);
    font-family: var(--font-mono);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    line-height: 1;
    text-align: center;
    text-transform: uppercase;
}

.donate-page-primary h2 {
    margin: 0 0 12px;
    color: var(--article-heading);
    font-family: var(--article-font-heading);
    font-size: clamp(1.6rem, 3vw, 2.1rem);
    font-weight: 800;
    line-height: 1.12;
    letter-spacing: -0.035em;
}

.donate-page-primary-copy > p:not(.donate-page-eyebrow) {
    margin: 0 0 1rem;
    color: var(--article-text-secondary);
    font-size: 1rem;
    line-height: 1.72;
}

.donate-page-primary-copy > p:last-child {
    margin-bottom: 0;
}

.donate-page-kofi-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    min-height: 64px;
    padding: 0 38px 0 32px;
    border: 1px solid rgba(103, 161, 242, 0.8);
    border-radius: 999px;
    background: #72a7f4;
    color: #1f2530 !important;
    font-family: var(--font-sans);
    font-size: clamp(1.05rem, 2.4vw, 1.35rem);
    font-weight: 800;
    text-decoration: none !important;
    white-space: nowrap;
    box-shadow: 0 14px 32px rgba(37, 99, 235, 0.18);
    transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, color 0.2s ease, transform 0.18s ease;
}

.donate-page-kofi-button:hover,
.donate-page-kofi-button:focus-visible {
    border-color: rgba(37, 99, 235, 0.38);
    background: #72a7f4;
    color: #1f2530 !important;
    box-shadow:
        0 14px 32px rgba(37, 99, 235, 0.18),
        0 0 0 4px rgba(37, 99, 235, 0.1);
    text-decoration: none !important;
}

.donate-page-kofi-button:hover {
    transform: none;
}

.donate-page-kofi-button:focus-visible {
    outline: 3px solid rgba(114, 167, 244, 0.36);
    outline-offset: 4px;
}

.donate-page-kofi-button svg {
    width: 42px;
    height: 34px;
    flex: 0 0 auto;
    color: #1f2530;
    margin-left: -2px;
}

.donate-page-body {
    padding-top: 0;
}

.donate-page-support-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin: 0 0 2.2rem;
}

.donate-page-support-grid article {
    min-height: 100%;
    padding: 18px;
    border: 1px solid var(--article-border);
    border-radius: var(--article-radius-md);
    background: var(--article-surface-soft);
}

.donate-page-support-grid h3 {
    margin: 0 0 8px;
    color: var(--article-heading);
    font-family: var(--font-sans);
    font-size: 0.96rem;
    font-weight: 800;
    letter-spacing: -0.01em;
}

.donate-page-support-grid p {
    margin: 0;
    color: var(--article-text-secondary);
    font-size: 0.92rem;
    line-height: 1.58;
}

.donate-page-banner {
    margin: 44px 0 0;
}

html[data-theme="dark"] .donate-page-support-option {
    border-color: var(--border);
    background: var(--surface-strong);
    box-shadow: var(--shadow-sm);
}

html[data-theme="dark"] .donate-page-support-option:hover,
html[data-theme="dark"] .donate-page-support-option:focus-visible,
html[data-theme="dark"] .donate-page-support-option:active {
    border-color: rgba(110, 168, 255, 0.48);
    background: var(--surface-strong);
    box-shadow: var(--shadow-md);
}

html[data-theme="dark"] .donate-page-support-option:focus-visible {
    outline-color: rgba(110, 168, 255, 0.16);
}

html[data-theme="dark"] .donate-page-support-option strong {
    color: #f1f3f5;
}

html[data-theme="dark"] .donate-page-support-option span {
    color: #9aa2ab;
}

html[data-theme="dark"] .donate-page-kofi-button {
    border-color: rgba(125, 176, 255, 0.62);
    background: #72a7f4;
    color: #1f2530 !important;
    box-shadow: 0 16px 38px rgba(0, 0, 0, 0.32);
}

html[data-theme="dark"] .donate-page-kofi-button:hover,
html[data-theme="dark"] .donate-page-kofi-button:focus-visible {
    border-color: rgba(125, 176, 255, 0.62);
    background: #72a7f4;
    color: #1f2530 !important;
    box-shadow:
        0 16px 38px rgba(0, 0, 0, 0.32),
        0 0 0 4px rgba(125, 176, 255, 0.16);
}

@media (max-width: 760px) {
    .policy-page-callout {
        padding: 20px 18px;
        border-radius: 16px;
    }

    .policy-contact-methods {
        grid-template-columns: 1fr;
    }

    .donate-page-support-options {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .donate-page-support-grid {
        grid-template-columns: 1fr;
    }

    .donate-page-primary {
        gap: 22px;
        margin: 34px 0;
        padding: 24px;
    }

    .donate-page-kofi-button {
        width: 100%;
    }

    .donate-page-secondary-button {
        width: 100%;
    }

    .donate-page-stats {
        max-width: 100%;
    }
}

@media (max-width: 560px) {
    .policy-page-jump-nav a {
        width: 100%;
    }

    .donate-page-support-options {
        grid-template-columns: 1fr;
    }

    .donate-page-stats {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .donate-page-stats div {
        padding: 0 0 14px;
        border-right: 0;
        border-bottom: 1px solid var(--article-border);
    }

    .donate-page-stats div:last-child {
        padding-bottom: 0;
        border-bottom: 0;
    }
}

@media (max-width: 640px) {
    .site-share-button {
        overflow: visible;
        max-width: 100%;
    }

    .site-share-button::-webkit-scrollbar {
        display: none;
    }

    .learn-article-share .site-share-targets,
    .tool-template-share .site-share-targets {
        top: calc(100% + 8px);
        right: 0;
        left: auto;
        display: none;
        align-items: center;
        width: max-content;
        max-width: none;
        padding: 4px;
        border-radius: 999px;
        overflow: visible;
        transform: translateY(4px);
    }

    .learn-article-share:hover .site-share-targets,
    .learn-article-share:focus-within .site-share-targets,
    .tool-template-share:hover .site-share-targets,
    .tool-template-share:focus-within .site-share-targets {
        opacity: 0;
        pointer-events: none;
        transform: translateY(4px);
    }

    .learn-article-share.is-open .site-share-targets,
    .tool-template-share.is-open .site-share-targets {
        opacity: 1;
        pointer-events: auto;
        transform: translateY(0);
    }

    .learn-article-share .site-share-target-item,
    .tool-template-share .site-share-target-item {
        width: 36px;
        flex: 0 0 36px;
        margin-left: 4px;
    }

    .learn-article-share .site-share-target-item:first-child,
    .tool-template-share .site-share-target-item:first-child {
        margin-left: 0;
    }

    .learn-article-share .site-share-target,
    .tool-template-share .site-share-target {
        width: 36px;
        height: 36px;
        flex-basis: 36px;
    }

    .learn-article-share .site-share-target::after,
    .tool-template-share .site-share-target::after {
        content: none;
    }
}

@media (hover: none), (pointer: coarse) {
    .learn-article-share .site-share-targets,
    .tool-template-share .site-share-targets {
        display: none;
    }
}

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

@media (max-width: 640px) {
    .collection-search-button-label {
        display: none;
    }

    .collection-search-button-icon {
        display: block;
    }

    .glossary-hero {
        padding: 2.6rem 0 1.6rem;
    }

    .glossary-hero h1 {
        font-size: clamp(2.55rem, 14vw, 3.8rem);
    }

    .glossary-stats {
        gap: 1.35rem;
    }

    .glossary-search-wrap {
        display: flex;
        align-items: center;
        gap: 0;
        width: 100%;
        max-width: none;
    }

    .glossary-search-icon {
        top: 50%;
        transform: translateY(-50%);
    }

    .glossary-search-wrap input[type="search"] {
        padding-right: 3.1rem;
    }

    .glossary-search-button {
        position: absolute;
        top: 5px;
        right: 0.35rem;
        width: 38px;
        min-width: 0;
        padding: 0;
    }

    .glossary-letter-link {
        width: 2rem;
        height: 2rem;
        font-size: 0.78rem;
    }

    .glossary-term-head {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.55rem;
    }

    .glossary-term-meta {
        justify-content: flex-start;
    }

    .glossary-content-section {
        padding-top: 2.1rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .site-share-button,
    .site-share-button *,
    .site-share-button *::before,
    .site-share-button *::after,
    .glossary-page *,
    .glossary-page *::before,
    .glossary-page *::after {
        animation: none !important;
        transition: none !important;
    }
}

/* Gemini homepage alignment layer.
   This keeps non-home pages visually consistent with the new landing page while
   preserving the existing Laravel markup and reusable components. */
body:not(.route-home) {
    background: #f8fafc;
    color: #334155;
}

body:not(.route-home) .site-header {
    background: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid rgba(226, 232, 240, 0.95);
    box-shadow: none;
    backdrop-filter: blur(14px);
}

body:not(.route-home) .site-header-inner {
    width: min(1280px, calc(100% - 48px));
    height: 64px;
    min-height: 64px;
}

body:not(.route-home) .brand {
    align-items: center;
    gap: 0.65rem;
}

body:not(.route-home) .brand-badge {
    font-family: var(--font-sans);
    font-size: 0.94rem;
    font-weight: 750;
    letter-spacing: -0.015em;
}

body:not(.route-home) .site-header .nav,
body:not(.route-home) .site-header .nav-primary,
body:not(.route-home) .site-header .header-actions {
    gap: 1.15rem;
}

body:not(.route-home) .site-header .nav a {
    color: #475569;
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 0.92rem;
    font-weight: 650;
}

body:not(.route-home) .site-header .nav a:hover,
body:not(.route-home) .site-header .nav a.active {
    color: #0f172a;
}

body:not(.route-home) .site-header .nav a.header-donate-link {
    padding: 0.48rem 0.9rem;
    border-color: #cbd5e1;
    color: #0f172a;
}

body:not(.route-home) .site-header .nav a.header-donate-link:hover,
body:not(.route-home) .site-header .nav a.header-donate-link.active {
    border-color: #94a3b8;
    color: #0f172a;
}

body:not(.route-home) .site-main {
    padding-bottom: 4.5rem;
}

body:not(.route-home) .container {
    width: min(1200px, calc(100% - 48px));
}

body:not(.route-home) .site-breadcrumbs {
    padding: 0.9rem 0 0.2rem;
}

body:not(.route-home) .site-breadcrumbs-inner {
    max-width: 1200px;
    gap: 0.34rem;
}

body:not(.route-home) .site-breadcrumb-pill {
    min-height: 24px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #64748b;
    font-size: 0.88rem;
    font-weight: 600;
}

body:not(.route-home) a.site-breadcrumb-pill:hover {
    border-color: transparent;
    background: transparent;
    color: #2563eb;
}

body:not(.route-home) .site-breadcrumb-pill[aria-current="page"] {
    color: #0f172a;
    font-weight: 700;
}

body:not(.route-home) .site-breadcrumb-separator {
    color: #94a3b8;
}

body:not(.route-home) .page-head,
body:not(.route-home) .tests-index-page,
body:not(.route-home) .types-index-page,
body:not(.route-home) .learn-directory-page {
    padding-top: 2.65rem;
}

body:not(.route-home) .page-head > .container,
body:not(.route-home) .tests-index-container,
body:not(.route-home) .types-index-container,
body:not(.route-home) .learn-directory-container,
body:not(.route-home) .account-page,
body:not(.route-home) .prose-page {
    max-width: 1200px;
}

body:not(.route-home) .page-head > .container,
body:not(.route-home) .types-index-header,
body:not(.route-home) .learn-directory-header {
    border-bottom: 1px solid #cbd5e1;
}

body:not(.route-home) .page-head h1,
body:not(.route-home) .types-index-header h1,
body:not(.route-home) .learn-directory-header h1 {
    color: #0f172a;
    font-size: clamp(2.4rem, 5vw, 4rem);
    font-weight: 750;
    line-height: 0.98;
    letter-spacing: -0.055em;
}

body:not(.route-home) .page-head p,
body:not(.route-home) .types-index-header p,
body:not(.route-home) .learn-directory-header p {
    color: #475569;
    font-size: 1.03rem;
    line-height: 1.65;
}

body:not(.route-home) .learn-directory-header {
    grid-template-columns: minmax(0, 1fr) minmax(320px, 490px);
}

body:not(.route-home) .tests-index-tools,
body:not(.route-home) .learn-directory-tools {
    justify-items: stretch;
}

body:not(.route-home) .tests-index-page {
    padding-top: 0;
}

body.route-tests-index .site-main {
    background:
        linear-gradient(180deg, rgba(248, 250, 252, 0) 0%, rgba(248, 250, 252, 0.58) 52rem, #ffffff 82rem),
        radial-gradient(circle at 18% 0%, rgba(37, 99, 235, 0.11), transparent 34rem),
        radial-gradient(circle at 78% 28rem, rgba(250, 204, 21, 0.14), transparent 34rem),
        radial-gradient(circle at 94% 46rem, rgba(219, 39, 119, 0.1), transparent 36rem),
        #ffffff;
    background-repeat: no-repeat;
    background-size: 100% 92rem;
}

body.route-tests-index .site-breadcrumbs {
    padding-top: 0.9rem;
    padding-bottom: 0;
}

body:not(.route-home) .tests-index-hero {
    position: relative;
    overflow: hidden;
    display: grid;
    justify-items: center;
    margin-inline: calc(50% - 50vw);
    padding: clamp(0.85rem, 2.8vw, 1.65rem) max(1rem, calc(50vw - 600px)) 1.8rem;
    text-align: center;
    background:
        radial-gradient(circle at 18% 0%, rgba(37, 99, 235, 0.11), transparent 32rem),
        radial-gradient(circle at 78% 42%, rgba(250, 204, 21, 0.14), transparent 27rem),
        radial-gradient(circle at 92% 78%, rgba(219, 39, 119, 0.12), transparent 28rem);
}

body.route-tests-index .tests-index-hero {
    background: transparent;
    margin-inline: 0;
    padding-right: 0;
    padding-left: 0;
}

body:not(.route-home) .tests-index-hero h1 {
    max-width: 900px;
    margin: 0;
    padding-inline: 0.08em;
    color: #0f172a;
    font-size: clamp(2.35rem, 5.2vw, 4rem);
    font-weight: 850;
    letter-spacing: -0.055em;
    line-height: 1.08;
}

body:not(.route-home) .tests-index-hero h1 span {
    display: block;
}

body:not(.route-home) .tests-index-hero h1 span + span {
    position: relative;
    display: inline-block;
    padding-inline: 0.08em 0.22em;
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 48%, #db2777 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    overflow: visible;
}

body:not(.route-home) .tests-index-hero p {
    max-width: 680px;
    margin: 0.95rem 0 0;
    color: #475569;
    font-size: clamp(1rem, 1.55vw, 1.16rem);
    line-height: 1.5;
}

body:not(.route-home) .tests-index-hero .tests-index-tools {
    display: grid;
    justify-self: center;
    justify-items: center;
    width: min(100%, 760px);
    margin-top: 1.65rem;
    margin-inline: auto;
    gap: 1.45rem;
}

body:not(.route-home) .tests-search-form {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0;
    width: 100%;
    padding: 0.38rem;
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.88);
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(12px);
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

body:not(.route-home) .tests-search-form:focus-within {
    border-color: rgba(37, 99, 235, 0.28);
    background: #ffffff;
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.08);
}

body:not(.route-home) .tests-search-icon {
    position: static;
    flex: 0 0 auto;
    margin-left: 1.1rem;
    margin-right: 0.9rem;
    width: 1.35rem;
    height: 1.35rem;
    color: #7c8da6;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    pointer-events: none;
}

body:not(.route-home) .tests-search-form input[type="search"],
body:not(.route-home) .learn-directory-search-form input[type="search"],
body:not(.route-home) .account-field input,
body:not(.route-home) .account-field select {
    min-height: 56px;
    border-color: #dbe3ee;
    border-radius: 16px;
    background: #ffffff;
    color: #0f172a;
    box-shadow: none;
}

body:not(.route-home) .tests-search-form input[type="search"] {
    width: 100%;
    min-height: 3.5rem;
    border: 0;
    border-radius: 0;
    background: transparent;
    padding: 0 1rem 0 0;
    font-size: 1.02rem;
}

body:not(.route-home) .tests-search-form input[type="search"]::placeholder {
    color: #8190a7;
}

body:not(.route-home) .tests-search-form input[type="search"]:focus,
body:not(.route-home) .learn-directory-search-form input[type="search"]:focus,
body:not(.route-home) .account-field input:focus,
body:not(.route-home) .account-field select:focus {
    border-color: #94a3b8;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.08);
}

body.route-tests-index .tests-search-form input[type="search"]:focus {
    outline: none;
    border-color: transparent;
    box-shadow: none;
}

body:not(.route-home) .tests-search-form button,
body:not(.route-home) .learn-directory-search-form button {
    border: 0;
}

body:not(.route-home) .tests-search-form button {
    position: static;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    min-width: 7rem;
    min-height: 3.18rem;
    padding: 0 1.4rem;
    border-radius: 999px;
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 48%, #db2777 100%);
    color: #ffffff;
    cursor: pointer;
    font: inherit;
    font-weight: 800;
    box-shadow: none;
    transition: filter 0.18s ease;
}

body:not(.route-home) .tests-search-form button:hover,
body:not(.route-home) .tests-search-form button:focus-visible {
    filter: brightness(1.03);
    box-shadow: none;
}

body:not(.route-home) .tests-filter-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
}

body:not(.route-home) .tests-filter-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 11rem;
    min-height: 48px;
    padding: 0.62rem 1.35rem;
    border: 1px solid #dbe3ee;
    border-radius: 999px;
    background: #ffffff;
    color: #334155;
    font-size: 1rem;
    font-weight: 750;
    text-decoration: none;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.03);
    transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

body:not(.route-home) .tests-filter-pill:hover,
body:not(.route-home) .tests-filter-pill:focus-visible {
    border-color: #cbd5e1;
    background: #ffffff;
    color: #0f172a;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
    text-decoration: none;
}

body:not(.route-home) .tests-filter-pill.active {
    border-color: #0f172a;
    background: #0f172a;
    color: #ffffff;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.18);
}

body:not(.route-home) .tests-index-summary,
body:not(.route-home) .learn-directory-summary {
    border-color: #dbe3ee;
    background: #ffffff;
    color: #334155;
}

body:not(.route-home) .tests-group-list,
body:not(.route-home) .types-group-list,
body:not(.route-home) .learn-directory-group-list {
    gap: 2.1rem;
    padding-top: 0.8rem;
}

body:not(.route-home) .tests-group-header h2,
body:not(.route-home) .types-group-header h2,
body:not(.route-home) .learn-directory-group-header h2,
body:not(.route-home) .account-results-header h2 {
    color: #0f172a;
    font-size: clamp(1.25rem, 2.2vw, 1.75rem);
    font-weight: 700;
    letter-spacing: -0.035em;
}

body:not(.route-home) .tests-group-header span,
body:not(.route-home) .types-group-header span,
body:not(.route-home) .learn-directory-group-header span {
    color: #64748b;
    font-size: 0.76rem;
    font-weight: 800;
}

body:not(.route-home) .tests-card-list,
body:not(.route-home) .types-card-list,
body:not(.route-home) .learn-directory-card-list {
    gap: 1.4rem;
}

body:not(.route-home) .tests-card,
body:not(.route-home) .types-card,
body:not(.route-home) .learn-directory-card,
body:not(.route-home) .account-panel,
body:not(.route-home) .account-demographics,
body:not(.route-home) .account-result-card,
body:not(.route-home) .account-empty-state,
body:not(.route-home) .card,
body:not(.route-home) .prose-card,
body:not(.route-home) .ui-card-link,
body:not(.route-home) .tool-template-card,
body:not(.route-home) .tool-template-guide,
body:not(.route-home) .tool-template-learn-card {
    border: 1px solid #dbe3ee;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: none;
}

body:not(.route-home) .tests-card:hover,
body:not(.route-home) .tests-card:focus-visible,
body:not(.route-home) .types-card:hover,
body:not(.route-home) .types-card:focus-within,
body:not(.route-home) .learn-directory-card:hover,
body:not(.route-home) .learn-directory-card:focus-visible,
body:not(.route-home) .account-panel:hover,
body:not(.route-home) .account-panel:focus-within,
body:not(.route-home) .account-demographics:hover,
body:not(.route-home) .account-demographics:focus-within,
body:not(.route-home) .account-result-card:hover,
body:not(.route-home) .account-result-card:focus-within,
body:not(.route-home) .card:hover,
body:not(.route-home) .ui-card-link:hover {
    border-color: #cbd5e1;
    background: #ffffff;
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.065);
    transform: none;
}

body:not(.route-home) .tests-card h2,
body:not(.route-home) .types-card h2,
body:not(.route-home) .learn-directory-card h2,
body:not(.route-home) .card h2,
body:not(.route-home) .card h3 {
    color: #0f172a;
    font-weight: 750;
}

body:not(.route-home) .tests-card p,
body:not(.route-home) .types-card p,
body:not(.route-home) .learn-directory-card p,
body:not(.route-home) .card p,
body:not(.route-home) .account-results-header p,
body:not(.route-home) .account-result-summary-copy span,
body:not(.route-home) .account-empty-state p,
body:not(.route-home) .prose-page p,
body:not(.route-home) .prose-page li {
    color: #475569;
}

body:not(.route-home) .tests-card-meta span,
body:not(.route-home) .types-card-meta span,
body:not(.route-home) .learn-directory-card-meta span {
    color: #475569;
    font-weight: 700;
}

body:not(.route-home) .tests-tag,
body:not(.route-home) .types-tag,
body:not(.route-home) .learn-directory-tag,
body:not(.route-home) .card-kicker {
    border-color: #dbe3ee;
    border-radius: 6px;
    background: #f8fafc;
    color: #475569;
}

body:not(.route-home) .tests-tag-accent,
body:not(.route-home) .types-tag-accent,
body:not(.route-home) .learn-directory-tag-accent {
    border-color: #bfdbfe;
    background: #eff6ff;
    color: #2563eb;
}

body.route-tests-index .tests-card-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.35rem;
}

body.route-tests-index .tests-card {
    display: block;
    min-height: 100%;
    padding: 1px;
    border: 0;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(148, 163, 184, 0.5), rgba(226, 232, 240, 0.9));
    text-align: left;
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.055);
    transition: box-shadow 0.18s ease, filter 0.18s ease;
}

body.route-tests-index .tests-card-recommended {
    background: linear-gradient(135deg, #6366f1, #a855f7);
}

body.route-tests-index .tests-card-experimental {
    background: linear-gradient(135deg, #f59e0b, #ef4444);
}

body.route-tests-index .tests-card:hover,
body.route-tests-index .tests-card:focus-visible {
    background: linear-gradient(135deg, rgba(148, 163, 184, 0.5), rgba(226, 232, 240, 0.9));
    box-shadow: 0 22px 46px rgba(15, 23, 42, 0.11);
    filter: saturate(1.02);
    transform: none;
}

body.route-tests-index .tests-card-recommended:hover,
body.route-tests-index .tests-card-recommended:focus-visible {
    background: linear-gradient(135deg, #6366f1, #a855f7);
}

body.route-tests-index .tests-card-experimental:hover,
body.route-tests-index .tests-card-experimental:focus-visible {
    background: linear-gradient(135deg, #f59e0b, #ef4444);
}

body.route-tests-index .tests-card-main {
    position: relative;
    display: flex;
    min-height: 100%;
    flex-direction: column;
    padding: 1.45rem;
    border-radius: 17px;
    background: #ffffff;
    overflow: hidden;
}

body.route-tests-index .tests-card-main::before {
    content: none;
}

body.route-tests-index .tests-card-top {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

body.route-tests-index .tests-card-icon {
    display: inline-flex;
    width: 3rem;
    height: 3rem;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: linear-gradient(135deg, #6366f1, #7c3aed);
    color: #ffffff;
    box-shadow: 0 14px 28px rgba(79, 70, 229, 0.22);
}

body.route-tests-index .tests-card-experimental .tests-card-icon {
    background: linear-gradient(135deg, #f59e0b, #f97316);
    box-shadow: 0 14px 28px rgba(245, 158, 11, 0.2);
}

body.route-tests-index .tests-card-standard .tests-card-icon {
    background: linear-gradient(135deg, #64748b, #334155);
    box-shadow: 0 14px 28px rgba(51, 65, 85, 0.16);
}

body.route-tests-index .tests-card-icon svg {
    width: 1.38rem;
    height: 1.38rem;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.9;
}

body.route-tests-index .tests-card h2 {
    position: relative;
    z-index: 1;
    margin: 0 0 0.55rem;
    color: #0f172a;
    font-size: 1.12rem;
    line-height: 1.25;
    letter-spacing: -0.025em;
}

body.route-tests-index .tests-card p {
    position: relative;
    z-index: 1;
    margin: 0 0 1.25rem;
    color: #475569;
    font-size: 0.92rem;
    line-height: 1.55;
}

body.route-tests-index .tests-card-meta {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 0.72rem;
    margin-top: auto;
}

body.route-tests-index .tests-card-meta span {
    display: grid;
    grid-template-columns: 2rem auto 1fr;
    align-items: center;
    gap: 0.55rem;
    color: #475569;
    font-size: 0.84rem;
    font-weight: 600;
}

body.route-tests-index .tests-card-meta strong {
    color: #334155;
    font-style: normal;
    font-weight: 800;
}

body.route-tests-index .tests-card-meta em {
    color: #94a3b8;
    font-style: normal;
    font-weight: 650;
}

body.route-tests-index .tests-card-meta .tests-meta-icon {
    display: inline-flex;
    flex: 0 0 2rem;
    width: 2rem;
    height: 2rem;
    align-items: center;
    justify-content: center;
    grid-template-columns: none;
    gap: 0;
    border-radius: 10px;
    background: #eef2ff;
    color: #4f46e5;
}

body.route-tests-index .tests-card-experimental .tests-card-meta .tests-meta-icon {
    background: #fff7ed;
    color: #ea580c;
}

body.route-tests-index .tests-card-meta .tests-meta-icon svg {
    width: 1rem;
    height: 1rem;
    flex: 0 0 1rem;
    display: block;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.9;
    opacity: 1;
}

body.route-tests-index .tests-card-cta {
    position: relative;
    z-index: 1;
    display: inline-flex;
    width: 100%;
    min-height: 46px;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    margin-top: 1.25rem;
    border-radius: 13px;
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    color: #ffffff;
    font-size: 0.9rem;
    font-weight: 850;
    letter-spacing: 0.015em;
    text-transform: none;
    box-shadow: 0 10px 22px rgba(79, 70, 229, 0.18);
}

body.route-tests-index .tests-card-experimental .tests-card-cta {
    background: linear-gradient(135deg, #d97706, #ea580c);
    box-shadow: 0 10px 22px rgba(217, 119, 6, 0.16);
}

body.route-tests-index .tests-card-cta svg {
    width: 1rem;
    height: 1rem;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
}

body.route-tests-index .tests-tag {
    position: relative;
    z-index: 1;
    min-height: 26px;
    padding: 0.3rem 0.65rem;
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    font-size: 0.68rem;
    letter-spacing: 0.055em;
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.12);
}

body.route-tests-index .tests-tag-accent {
    background: linear-gradient(135deg, #6366f1, #818cf8);
}

body.route-tests-index .tests-tag-muted {
    background: linear-gradient(135deg, #f59e0b, #f97316);
}

body.route-types-index .site-main {
    background:
        linear-gradient(180deg, rgba(248, 250, 252, 0) 0%, rgba(248, 250, 252, 0.58) 52rem, #ffffff 82rem),
        radial-gradient(circle at 18% 0%, rgba(37, 99, 235, 0.1), transparent 34rem),
        radial-gradient(circle at 76% 24rem, rgba(168, 85, 247, 0.12), transparent 34rem),
        radial-gradient(circle at 94% 44rem, rgba(236, 72, 153, 0.1), transparent 36rem),
        #ffffff;
    background-repeat: no-repeat;
    background-size: 100% 92rem;
}

body.route-types-index .site-breadcrumbs {
    padding-top: 0.9rem;
    padding-bottom: 0;
}

body:not(.route-home) .types-index-page {
    padding-top: 0;
}

body:not(.route-home) .types-index-container {
    max-width: 1200px;
}

body:not(.route-home) .types-index-hero {
    position: relative;
    overflow: hidden;
    display: grid;
    justify-items: center;
    margin-inline: calc(50% - 50vw);
    padding: clamp(0.85rem, 2.8vw, 1.65rem) max(1rem, calc(50vw - 600px)) 1.8rem;
    text-align: center;
    background: transparent;
}

body.route-types-index .types-index-hero {
    margin-inline: 0;
    padding-right: 0;
    padding-left: 0;
}

body:not(.route-home) .types-index-hero h1 {
    max-width: 900px;
    margin: 0;
    padding-inline: 0.08em;
    color: #0f172a;
    font-size: clamp(2.35rem, 5.2vw, 4rem);
    font-weight: 850;
    letter-spacing: -0.055em;
    line-height: 1.08;
}

body:not(.route-home) .types-index-hero h1 span {
    display: block;
}

body:not(.route-home) .types-index-hero h1 span + span {
    position: relative;
    display: inline-block;
    padding-inline: 0.08em 0.22em;
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 48%, #db2777 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    overflow: visible;
}

body:not(.route-home) .types-index-hero p {
    max-width: 680px;
    margin: 0.95rem 0 0;
    color: #475569;
    font-size: clamp(1rem, 1.55vw, 1.16rem);
    line-height: 1.5;
}

body:not(.route-home) .types-index-tools {
    display: grid;
    justify-self: center;
    justify-items: center;
    width: min(100%, 760px);
    margin-top: 1.65rem;
    margin-inline: auto;
    gap: 1.45rem;
}

body.route-types-index .types-search-form input[type="search"]:focus {
    outline: none;
    border-color: transparent;
    box-shadow: none;
}

body.route-types-index .types-group-list {
    gap: 2.1rem;
    padding-top: 0.8rem;
}

body.route-types-index .types-card-list {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.35rem;
}

body.route-types-index .types-card {
    display: block;
    min-height: 100%;
    padding: 1px;
    border: 0;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(148, 163, 184, 0.5), rgba(226, 232, 240, 0.9));
    text-align: left;
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.055);
    transition: box-shadow 0.18s ease, filter 0.18s ease;
}

body.route-types-index .types-card-recommended {
    background: linear-gradient(135deg, #6366f1, #a855f7);
}

body.route-types-index .types-card-experimental {
    background: linear-gradient(135deg, #a855f7, #db2777);
}

body.route-types-index .types-card-warm {
    background: linear-gradient(135deg, #f59e0b, #f97316);
}

body.route-types-index .types-card:hover,
body.route-types-index .types-card:focus-within {
    background: linear-gradient(135deg, rgba(148, 163, 184, 0.5), rgba(226, 232, 240, 0.9));
    box-shadow: 0 22px 46px rgba(15, 23, 42, 0.11);
    filter: saturate(1.02);
    transform: none;
}

body.route-types-index .types-card-recommended:hover,
body.route-types-index .types-card-recommended:focus-within {
    background: linear-gradient(135deg, #6366f1, #a855f7);
}

body.route-types-index .types-card-experimental:hover,
body.route-types-index .types-card-experimental:focus-within {
    background: linear-gradient(135deg, #a855f7, #db2777);
}

body.route-types-index .types-card-warm:hover,
body.route-types-index .types-card-warm:focus-within {
    background: linear-gradient(135deg, #f59e0b, #f97316);
}

body.route-types-index .types-card-main {
    position: relative;
    display: flex;
    min-height: 100%;
    flex-direction: column;
    padding: 1.45rem;
    border-radius: 17px;
    background: #ffffff;
    overflow: hidden;
}

body.route-types-index .types-card-top {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

body.route-types-index .types-card-icon {
    display: inline-flex;
    width: 3rem;
    height: 3rem;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: linear-gradient(135deg, #6366f1, #7c3aed);
    color: #ffffff;
    box-shadow: 0 14px 28px rgba(79, 70, 229, 0.2);
}

body.route-types-index .types-card-experimental .types-card-icon {
    background: linear-gradient(135deg, #a855f7, #db2777);
    box-shadow: 0 14px 28px rgba(168, 85, 247, 0.18);
}

body.route-types-index .types-card-warm .types-card-icon {
    background: linear-gradient(135deg, #f59e0b, #f97316);
    box-shadow: 0 14px 28px rgba(245, 158, 11, 0.18);
}

body.route-types-index .types-card-standard .types-card-icon {
    background: linear-gradient(135deg, #64748b, #334155);
    box-shadow: 0 14px 28px rgba(51, 65, 85, 0.16);
}

body.route-types-index .types-card-icon svg {
    width: 1.38rem;
    height: 1.38rem;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.9;
}

body.route-types-index .types-card h2 {
    position: relative;
    z-index: 1;
    margin: 0 0 0.25rem;
    color: #0f172a;
    font-size: 1.12rem;
    line-height: 1.25;
    letter-spacing: -0.025em;
}

body.route-types-index .types-card-subtitle {
    margin-bottom: 0.8rem;
    color: #64748b;
    font-size: 0.84rem;
    font-weight: 750;
    line-height: 1.35;
}

body.route-types-index .types-card p:not(.types-card-subtitle) {
    position: relative;
    z-index: 1;
    margin: 0 0 1.25rem;
    color: #475569;
    font-size: 0.92rem;
    line-height: 1.55;
}

body.route-types-index .types-card-meta {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 0.72rem;
    margin-top: auto;
}

body.route-types-index .types-card-meta > span {
    display: grid;
    grid-template-columns: 2rem auto 1fr;
    align-items: center;
    gap: 0.55rem;
    color: #475569;
    font-size: 0.84rem;
    font-weight: 600;
}

body.route-types-index .types-card-meta strong {
    color: #334155;
    font-style: normal;
    font-weight: 800;
}

body.route-types-index .types-card-meta em {
    color: #94a3b8;
    font-style: normal;
    font-weight: 650;
}

body.route-types-index .types-meta-icon {
    display: inline-flex;
    flex: 0 0 2rem;
    width: 2rem;
    height: 2rem;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: #eef2ff;
    color: #4f46e5;
}

body.route-types-index .types-card-experimental .types-meta-icon {
    background: #fdf2f8;
    color: #db2777;
}

body.route-types-index .types-card-warm .types-meta-icon {
    background: #fff7ed;
    color: #ea580c;
}

body.route-types-index .types-meta-icon svg {
    width: 1rem;
    height: 1rem;
    flex: 0 0 1rem;
    display: block;
    margin: 0;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.9;
    opacity: 1;
}

body.route-types-index .types-tag {
    position: relative;
    z-index: 1;
    min-height: 26px;
    padding: 0.3rem 0.65rem;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, #64748b, #94a3b8);
    color: #ffffff;
    font-size: 0.68rem;
    letter-spacing: 0.055em;
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.12);
}

body.route-types-index .types-tag-accent {
    background: linear-gradient(135deg, #6366f1, #818cf8);
}

body.route-learn-index .site-main {
    background:
        linear-gradient(180deg, rgba(248, 250, 252, 0) 0%, rgba(248, 250, 252, 0.58) 52rem, #ffffff 82rem),
        radial-gradient(circle at 18% 0%, rgba(37, 99, 235, 0.1), transparent 34rem),
        radial-gradient(circle at 76% 24rem, rgba(168, 85, 247, 0.11), transparent 34rem),
        radial-gradient(circle at 94% 44rem, rgba(219, 39, 119, 0.09), transparent 36rem),
        #ffffff;
    background-repeat: no-repeat;
    background-size: 100% 92rem;
}

body.route-learn-index .site-breadcrumbs {
    padding-top: 0.9rem;
    padding-bottom: 0;
}

body.route-learn-index .learn-directory-page {
    padding-top: 0;
}

body.route-learn-index .learn-directory-container {
    max-width: 1200px;
}

body.route-learn-index .learn-directory-hero {
    position: relative;
    overflow: hidden;
    display: grid;
    justify-items: center;
    padding: clamp(0.85rem, 2.8vw, 1.65rem) 0 1.8rem;
    text-align: center;
}

body.route-learn-index .learn-directory-hero h1 {
    max-width: 900px;
    margin: 0;
    padding-inline: 0.08em;
    color: #0f172a;
    font-size: clamp(2.35rem, 5.2vw, 4rem);
    font-weight: 850;
    letter-spacing: -0.055em;
    line-height: 1.08;
}

body.route-learn-index .learn-directory-hero h1 span {
    display: block;
}

body.route-learn-index .learn-directory-hero h1 span + span {
    position: relative;
    display: inline-block;
    padding-inline: 0.08em 0.22em;
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 48%, #db2777 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    overflow: visible;
}

body.route-learn-index .learn-directory-hero p {
    max-width: 680px;
    margin: 0.95rem 0 0;
    color: #475569;
    font-size: clamp(1rem, 1.55vw, 1.16rem);
    line-height: 1.5;
}

body.route-learn-index .learn-directory-tools {
    display: grid;
    justify-self: center;
    justify-items: center;
    width: min(100%, 760px);
    margin-top: 1.65rem;
    margin-inline: auto;
    gap: 1.45rem;
}

body.route-learn-index .learn-directory-search-form input[type="search"] {
    width: 100%;
    min-height: 3.5rem;
    border: 0;
    border-radius: 0;
    background: transparent;
    padding: 0 1rem 0 0;
    font-size: 1.02rem;
}

body.route-learn-index .learn-directory-search-form input[type="search"]:focus {
    outline: none;
    border-color: transparent;
    box-shadow: none;
}

body.route-learn-index .learn-directory-search-form button {
    position: static;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: auto;
    min-width: 7rem;
    min-height: 3.18rem;
    height: auto;
    padding: 0 1.4rem;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 48%, #db2777 100%);
    color: #ffffff;
    cursor: pointer;
    font: inherit;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: none;
    box-shadow: none;
    transition: filter 0.18s ease;
}

body.route-learn-index .learn-directory-search-form button:hover,
body.route-learn-index .learn-directory-search-form button:focus-visible {
    border: 0;
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 48%, #db2777 100%);
    color: #ffffff;
    filter: brightness(1.03);
    box-shadow: none;
}

body.route-learn-index .learn-topic-list {
    width: 100%;
}

body.route-learn-index .learn-directory-summary {
    width: fit-content;
}

body.route-learn-index .learn-directory-group-list {
    gap: 2.1rem;
    padding-top: 0.8rem;
}

body.route-learn-index .learn-directory-empty-state {
    max-width: 620px;
    margin-inline: auto;
    padding: 2rem;
    border: 1px solid #dbe3ee;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.76);
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.08);
    text-align: center;
}

body.route-learn-index .learn-directory-empty-state h2 {
    margin-bottom: 0.45rem;
    font-size: 1.35rem;
}

body.route-learn-index .learn-directory-empty-state p {
    margin-inline: auto;
    max-width: 34rem;
}

body.route-learn-index .learn-directory-empty-state a {
    margin-top: 1rem;
}

body.route-learn-index .learn-directory-card-list {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 390px));
    justify-content: center;
    gap: 1.35rem;
}

body.route-learn-index .learn-directory-card {
    display: block;
    min-height: 100%;
    padding: 1px;
    border: 0;
    border-radius: 18px;
    background: linear-gradient(135deg, #6366f1, #a855f7);
    color: inherit;
    text-align: left;
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.055);
    transition: box-shadow 0.18s ease, filter 0.18s ease;
}

body.route-learn-index .learn-directory-card:hover,
body.route-learn-index .learn-directory-card:focus-visible {
    background: linear-gradient(135deg, #6366f1, #a855f7);
    box-shadow: 0 22px 46px rgba(15, 23, 42, 0.11);
    filter: saturate(1.02);
    transform: none;
}

body.route-learn-index .learn-directory-card-main {
    position: relative;
    display: flex;
    min-height: 100%;
    flex-direction: column;
    padding: 1.45rem;
    border-radius: 17px;
    background: #ffffff;
    overflow: hidden;
}

body.route-learn-index .learn-directory-card-top {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

body.route-learn-index .learn-directory-card-icon {
    display: inline-flex;
    width: 3rem;
    height: 3rem;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: linear-gradient(135deg, #6366f1, #7c3aed);
    color: #ffffff;
    box-shadow: 0 14px 28px rgba(79, 70, 229, 0.2);
}

body.route-learn-index .learn-directory-card-icon svg {
    width: 1.38rem;
    height: 1.38rem;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.9;
}

body.route-learn-index .learn-directory-card h2 {
    position: relative;
    z-index: 1;
    margin: 0 0 0.55rem;
    color: #0f172a;
    font-size: 1.12rem;
    line-height: 1.25;
    letter-spacing: -0.025em;
}

body.route-learn-index .learn-directory-card p {
    position: relative;
    z-index: 1;
    margin: 0 0 1.25rem;
    color: #475569;
    font-size: 0.92rem;
    line-height: 1.55;
}

body.route-learn-index .learn-directory-card-meta {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 0.72rem;
    margin-top: auto;
}

body.route-learn-index .learn-directory-card-meta > span {
    display: grid;
    grid-template-columns: 2rem auto 1fr;
    align-items: center;
    gap: 0.55rem;
    color: #475569;
    font-size: 0.84rem;
    font-weight: 600;
}

body.route-learn-index .learn-directory-card-meta strong {
    color: #334155;
    font-style: normal;
    font-weight: 800;
}

body.route-learn-index .learn-directory-card-meta em {
    color: #94a3b8;
    font-style: normal;
    font-weight: 650;
}

body.route-learn-index .learn-directory-meta-icon {
    display: inline-flex;
    flex: 0 0 2rem;
    width: 2rem;
    height: 2rem;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: #eef2ff;
    color: #4f46e5;
}

body.route-learn-index .learn-directory-meta-icon svg {
    width: 1rem;
    height: 1rem;
    flex: 0 0 1rem;
    display: block;
    margin: 0;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.9;
    opacity: 1;
}

body.route-learn-index .learn-directory-tag {
    position: relative;
    z-index: 1;
    min-height: 26px;
    padding: 0.3rem 0.65rem;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, #6366f1, #818cf8);
    color: #ffffff;
    font-size: 0.68rem;
    letter-spacing: 0.055em;
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.12);
}

body.route-learn-index .learn-directory-card-cta {
    position: relative;
    z-index: 1;
    display: inline-flex;
    width: 100%;
    min-height: 46px;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    margin-top: 1.25rem;
    border-radius: 13px;
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    color: #ffffff;
    font-size: 0.9rem;
    font-weight: 850;
    letter-spacing: 0.015em;
    box-shadow: 0 10px 22px rgba(79, 70, 229, 0.18);
}

body.route-learn-index .learn-directory-card-cta svg {
    width: 1rem;
    height: 1rem;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
}

@media (max-width: 760px) {
    body.route-learn-index .learn-directory-page {
        padding-top: 0;
    }

    body.route-learn-index .learn-directory-hero {
        padding-top: 1.05rem;
        padding-bottom: 1.15rem;
    }

    body.route-learn-index .learn-directory-hero p {
        margin-top: 0.75rem;
    }

    body.route-learn-index .learn-directory-tools {
        margin-top: 1.05rem;
    }

    body.route-learn-index .learn-directory-card-list {
        grid-template-columns: 1fr;
    }

    body.route-learn-index .learn-directory-card-main {
        padding: 1.25rem;
    }
}

html:not([data-theme="dark"]) body.route-home,
html:not([data-theme="dark"]) body.route-tests-index,
html:not([data-theme="dark"]) body.route-types-index,
html:not([data-theme="dark"]) body.route-learn-index,
html:not([data-theme="dark"]) body.route-categories-index,
html:not([data-theme="dark"]) body.route-categories-show,
html:not([data-theme="dark"]) body.route-account,
html:not([data-theme="dark"]) body.route-sign-in,
html:not([data-theme="dark"]) body.route-register,
html:not([data-theme="dark"]) body.route-password-request,
html:not([data-theme="dark"]) body.route-password-reset,
html:not([data-theme="dark"]) body.route-donate,
html:not([data-theme="dark"]) body.route-contact {
    background-color: #ffffff;
}

/* Shared directory cards for tests, types, and articles. */
body.route-tests-index .tests-card-list,
body.route-types-index .types-card-list,
body.route-learn-index .learn-directory-card-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 24rem));
    justify-content: center;
    gap: 1.75rem;
    align-items: stretch;
}

body.route-tests-index .directory-card,
body.route-types-index .directory-card,
body.route-learn-index .directory-card {
    display: flex;
    min-height: 100%;
    overflow: hidden;
    flex-direction: column;
    border: 1px solid #dbe3ee;
    border-radius: 1.25rem;
    background: #ffffff;
    color: #0f172a;
    text-align: left;
    text-decoration: none;
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.06);
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

body.route-tests-index .directory-card:hover,
body.route-tests-index .directory-card:focus-visible,
body.route-types-index .directory-card:hover,
body.route-types-index .directory-card:focus-within,
body.route-learn-index .directory-card:hover,
body.route-learn-index .directory-card:focus-visible {
    border-color: rgba(99, 102, 241, 0.55);
    box-shadow: 0 18px 38px rgba(15, 23, 42, 0.09);
}

body.route-tests-index .directory-card:focus-visible,
body.route-learn-index .directory-card:focus-visible {
    outline: 3px solid rgba(37, 99, 235, 0.22);
    outline-offset: 4px;
}

body.route-tests-index .directory-card-visual,
body.route-types-index .directory-card-visual,
body.route-learn-index .directory-card-visual {
    position: relative;
    min-height: 12.8rem;
    padding: 1.45rem;
    color: #ffffff;
    background: linear-gradient(135deg, #2563eb 0%, #7c3aed 52%, #db2777 100%);
}

body.route-tests-index .directory-card-experimental .directory-card-visual,
body.route-types-index .directory-card-experimental .directory-card-visual,
body.route-learn-index .directory-card-experimental .directory-card-visual {
    background: linear-gradient(135deg, #7c3aed 0%, #c026d3 48%, #e11d48 100%);
}

body.route-tests-index .directory-card-standard .directory-card-visual,
body.route-types-index .directory-card-standard .directory-card-visual,
body.route-learn-index .directory-card-standard .directory-card-visual {
    background: linear-gradient(135deg, #0284c7 0%, #4f46e5 55%, #7c3aed 100%);
}

body.route-tests-index .directory-card-warm .directory-card-visual,
body.route-types-index .directory-card-warm .directory-card-visual,
body.route-learn-index .directory-card-warm .directory-card-visual {
    background: linear-gradient(135deg, #f59e0b 0%, #f97316 48%, #dc2626 100%);
}

body.route-tests-index .directory-card-status,
body.route-types-index .directory-card-status,
body.route-learn-index .directory-card-status {
    position: relative;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    min-height: 2rem;
    padding: 0.42rem 0.78rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.94);
    color: #4f46e5;
    font-size: 0.78rem;
    font-weight: 850;
    letter-spacing: 0.02em;
}

body.route-tests-index .directory-card-status svg,
body.route-types-index .directory-card-status svg,
body.route-learn-index .directory-card-status svg,
body.route-tests-index .directory-card-meta svg,
body.route-types-index .directory-card-meta svg,
body.route-learn-index .directory-card-meta svg,
body.route-tests-index .directory-card-action svg,
body.route-types-index .directory-card-action svg,
body.route-learn-index .directory-card-action svg {
    width: 1rem;
    height: 1rem;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
}

body.route-tests-index .directory-card-ghost,
body.route-types-index .directory-card-ghost,
body.route-learn-index .directory-card-ghost {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 1;
    display: grid;
    width: 7.4rem;
    height: 7.4rem;
    place-items: center;
    color: rgba(255, 255, 255, 0.34);
    pointer-events: none;
    transform: translate(-50%, -50%);
}

body.route-tests-index .directory-card-ghost svg,
body.route-types-index .directory-card-ghost svg,
body.route-learn-index .directory-card-ghost svg {
    width: 100%;
    height: 100%;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.6;
}

body.route-tests-index .directory-card-meta,
body.route-types-index .directory-card-meta,
body.route-learn-index .directory-card-meta {
    position: absolute;
    right: 1.45rem;
    bottom: 1.35rem;
    left: 1.45rem;
    z-index: 2;
    display: flex;
    flex-wrap: wrap;
    gap: 0.95rem;
    align-items: center;
}

body.route-tests-index .directory-card-meta span,
body.route-types-index .directory-card-meta span,
body.route-learn-index .directory-card-meta span {
    display: inline-flex;
    align-items: center;
    gap: 0.42rem;
    color: rgba(255, 255, 255, 0.94);
    font-size: 0.94rem;
    font-weight: 800;
}

body.route-tests-index .directory-card-body,
body.route-types-index .directory-card-body,
body.route-learn-index .directory-card-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 1.55rem 1.65rem 1.7rem;
}

body.route-tests-index .directory-card-tags,
body.route-types-index .directory-card-tags,
body.route-learn-index .directory-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin-bottom: 1.05rem;
}

body.route-tests-index .directory-card-tags span,
body.route-types-index .directory-card-tags span,
body.route-learn-index .directory-card-tags span {
    display: inline-flex;
    align-items: center;
    min-height: 1.75rem;
    padding: 0.28rem 0.78rem;
    border-radius: 999px;
    background: #f1f5f9;
    color: #2563eb;
    font-size: 0.78rem;
    font-weight: 850;
}

body.route-tests-index .directory-card-tags span + span,
body.route-types-index .directory-card-tags span + span,
body.route-learn-index .directory-card-tags span + span {
    color: #475569;
}

body.route-tests-index .directory-card h2,
body.route-types-index .directory-card h2,
body.route-learn-index .directory-card h2 {
    margin: 0;
    color: #020617;
    font-size: 1.18rem;
    font-weight: 850;
    line-height: 1.25;
}

body.route-tests-index .directory-card p,
body.route-types-index .directory-card p,
body.route-learn-index .directory-card p {
    margin: 0.85rem 0 0;
    color: #334155;
    font-size: 0.98rem;
    line-height: 1.5;
}

body.route-tests-index .directory-card-action,
body.route-types-index .directory-card-action,
body.route-learn-index .directory-card-action {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    gap: 0.5rem;
    margin-top: auto;
    padding-top: 1.4rem;
    color: #4f46e5;
    font-size: 0.96rem;
    font-weight: 850;
}

body.route-tests-index .directory-card-action svg,
body.route-types-index .directory-card-action svg,
body.route-learn-index .directory-card-action svg {
    transition: transform 0.18s ease;
}

body.route-tests-index .directory-card:hover .directory-card-action svg,
body.route-tests-index .directory-card:focus-visible .directory-card-action svg,
body.route-types-index .directory-card:hover .directory-card-action svg,
body.route-types-index .directory-card:focus-within .directory-card-action svg,
body.route-learn-index .directory-card:hover .directory-card-action svg,
body.route-learn-index .directory-card:focus-visible .directory-card-action svg {
    transform: translateX(3px);
}

@media (max-width: 760px) {
    body.route-tests-index .tests-card-list,
    body.route-types-index .types-card-list,
    body.route-learn-index .learn-directory-card-list {
        grid-template-columns: minmax(0, 1fr);
        gap: 1.25rem;
    }

    body.route-tests-index .directory-card-visual,
    body.route-types-index .directory-card-visual,
    body.route-learn-index .directory-card-visual {
        min-height: 11.5rem;
        padding: 1.25rem;
    }

    body.route-tests-index .directory-card-meta,
    body.route-types-index .directory-card-meta,
    body.route-learn-index .directory-card-meta {
        right: 1.25rem;
        bottom: 1.2rem;
        left: 1.25rem;
    }

    body.route-tests-index .directory-card-body,
    body.route-types-index .directory-card-body,
    body.route-learn-index .directory-card-body {
        padding: 1.35rem;
    }
}

@media (max-width: 980px) {
    body.route-types-index .types-card-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    body:not(.route-home) .types-index-page {
        padding-top: 0;
    }

    body:not(.route-home) .types-index-hero {
        margin-inline: 0;
        padding-right: 0;
        padding-left: 0;
        padding-top: 1.05rem;
        padding-bottom: 1.15rem;
    }

    body:not(.route-home) .types-index-hero p {
        margin-top: 0.75rem;
    }

    body:not(.route-home) .types-index-tools {
        margin-top: 1.05rem;
    }

    body.route-types-index .types-card-list {
        grid-template-columns: 1fr;
    }

    body.route-types-index .types-card-main {
        padding: 1.25rem;
    }
}

body:not(.route-home) .account-page {
    gap: 1rem;
}

body:not(.route-home) .account-panel,
body:not(.route-home) .account-demographics,
body:not(.route-home) .account-result-card,
body:not(.route-home) .account-empty-state {
    padding: 1.25rem;
}

body:not(.route-home) .account-button,
body:not(.route-home) .account-results-link,
body:not(.route-home) .tests-empty-state a {
    min-height: 44px;
    border-color: #020617;
    border-radius: 10px;
    background: #020617;
    color: #ffffff;
    font-size: 0.78rem;
    letter-spacing: 0.055em;
}

body:not(.route-home) .account-button:hover,
body:not(.route-home) .account-button:focus-visible,
body:not(.route-home) .account-results-link:hover,
body:not(.route-home) .tests-empty-state a:hover {
    border-color: #1e293b;
    background: #1e293b;
    color: #ffffff;
}

body:not(.route-home) .account-button-secondary {
    border-color: #dbe3ee;
    background: #ffffff;
    color: #0f172a;
}

body:not(.route-home) .account-button-secondary:hover,
body:not(.route-home) .account-button-secondary:focus-visible {
    border-color: #cbd5e1;
    background: #f8fafc;
    color: #0f172a;
}

body:not(.route-home) .account-result-summary-action {
    border-color: #dbe3ee;
    border-radius: 8px;
    color: #0f172a;
}

body:not(.route-home) .account-result-details[open] .account-result-summary-action,
body:not(.route-home) .account-demographics details[open] .account-result-summary-action {
    border-color: #bfdbfe;
    background: #eff6ff;
    color: #2563eb;
}

body:not(.route-home) .account-result-sloan,
body:not(.route-home) .account-score-explanation,
body:not(.route-home) .account-result-trait,
body:not(.route-home) .account-summary div {
    border-color: #dbe3ee;
    background: #f8fafc;
}

body:not(.route-home) .prose-page {
    margin-top: 1.4rem;
    padding: 1.5rem;
    border: 1px solid #dbe3ee;
    border-radius: 16px;
    background: #ffffff;
}

body:not(.route-home) .prose-page h2 {
    color: #0f172a;
}

body:not(.route-home) .site-footer {
    border-top: 1px solid #dbe3ee;
    background: #ffffff;
    color: #64748b;
}

body:not(.route-home) .back-to-top {
    border-color: #dbe3ee;
    background: #ffffff;
    color: #0f172a;
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.08);
}

@media (max-width: 760px) {
    body:not(.route-home) .site-header-inner,
    body:not(.route-home) .container {
        width: min(100% - 28px, 1200px);
    }

    body:not(.route-home) .page-head,
    body:not(.route-home) .tests-index-page,
    body:not(.route-home) .types-index-page,
    body:not(.route-home) .learn-directory-page {
        padding-top: 1.8rem;
    }

    body:not(.route-home) .learn-directory-header {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    body:not(.route-home) .tests-index-tools,
    body:not(.route-home) .learn-directory-tools {
        justify-self: stretch;
    }

    body:not(.route-home) .tests-index-page {
        padding-top: 1.2rem;
    }

    body.route-tests-index .tests-index-page {
        padding-top: 0;
    }

    body:not(.route-home) .tests-index-hero {
        padding-top: 1.05rem;
        padding-bottom: 1.15rem;
    }

    body:not(.route-home) .tests-index-hero p {
        margin-top: 0.75rem;
    }

    body:not(.route-home) .tests-index-hero .tests-index-tools {
        margin-top: 1.05rem;
    }

    body:not(.route-home) .tests-search-form input[type="search"] {
        font-size: 0.96rem;
    }

    body.route-tests-index .tests-card-list {
        grid-template-columns: 1fr;
    }

    body.route-tests-index .tests-card-main {
        padding: 1.25rem;
    }

    body:not(.route-home) .tests-group-header,
    body:not(.route-home) .types-group-header,
    body:not(.route-home) .learn-directory-group-header {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.35rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    body:not(.route-home) *,
    body:not(.route-home) *::before,
    body:not(.route-home) *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}

/* Shared homepage-style header used across the full site. */
.site-header {
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid rgba(226, 232, 240, 0.95);
    box-shadow: none;
    backdrop-filter: blur(14px);
}

.site-header .container {
    width: min(1280px, calc(100% - 48px));
}

html[data-theme="dark"] .site-header {
    background: rgba(24, 27, 31, 0.95);
}

.site-header-inner {
    width: min(1280px, calc(100% - 48px));
    height: 64px;
    min-height: 64px;
    flex-wrap: nowrap;
    gap: 1rem;
}

.site-header-left {
    gap: 2rem;
}

.brand {
    color: #020617;
    text-decoration: none;
}

.brand:hover {
    opacity: 0.9;
    text-decoration: none;
}

.brand-badge {
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 0.95rem;
    font-weight: 800;
    letter-spacing: -0.025em;
}

.brand-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: #020617;
}

.site-header .nav,
.site-header .nav-primary,
.site-header .header-actions {
    gap: 0.25rem;
}

.site-header .nav a {
    display: inline-flex;
    align-items: center;
    gap: 0.38rem;
    min-height: 34px;
    padding: 0.38rem 0.75rem;
    border-radius: 999px;
    color: #475569;
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 0.92rem;
    font-weight: 650;
    line-height: 1;
    text-decoration: none;
    transition: background-color 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}

.site-header .nav a:hover,
.site-header .nav a.active {
    background: #f8fafc;
    color: #0f172a;
}

.site-header .nav a.header-donate-link {
    border: 0;
    color: #475569;
}

body:not(.route-home) .site-header .nav a.header-donate-link {
    padding: 0.38rem 0.75rem;
    border: 0;
    color: #475569;
}

.site-header .nav a.header-donate-link svg {
    width: 14px;
    height: 14px;
    color: #f43f5e;
}

.site-header .nav a .header-account-icon,
.mobile-nav-links a .header-account-icon {
    width: 14px;
    height: 14px;
    flex: 0 0 14px;
}

.site-header .nav a.header-donate-link:hover,
.site-header .nav a.header-donate-link.active {
    background: #f8fafc;
    color: #0f172a;
}

body:not(.route-home) .site-header .nav a.header-donate-link:hover,
body:not(.route-home) .site-header .nav a.header-donate-link.active {
    border: 0;
    background: #f8fafc;
    color: #0f172a;
}

.site-header .nav a.header-primary-link {
    min-height: 38px;
    margin-left: 0.25rem;
    padding: 0.58rem 1.05rem 0.58rem 1.18rem;
    border: 0;
    border-radius: 999px;
    background: #0ea5df;
    color: #ffffff;
    box-shadow: none;
    font-weight: 800;
}

.site-header .nav a.header-primary-link:hover,
.site-header .nav a.header-primary-link.active {
    background: #028dcc;
    color: #ffffff;
    box-shadow: none;
}

.site-header .theme-toggle {
    margin-inline: 0.25rem 0.45rem;
}

html[data-theme="dark"] .site-header .nav a {
    color: #cbd5e1;
}

html[data-theme="dark"] .site-header .nav a:hover,
html[data-theme="dark"] .site-header .nav a.active {
    color: #ffffff;
}

html[data-theme="dark"] .site-header .nav a.header-donate-link {
    color: #cbd5e1;
}

html[data-theme="dark"] .site-header .nav a:hover,
html[data-theme="dark"] .site-header .nav a.active {
    background: rgba(255, 255, 255, 0.08);
}

.site-header .nav a.header-primary-link,
.site-header .nav a.header-primary-link:hover,
.site-header .nav a.header-primary-link.active,
body:not(.route-home) .site-header .nav a.header-primary-link,
body:not(.route-home) .site-header .nav a.header-primary-link:hover,
body:not(.route-home) .site-header .nav a.header-primary-link.active,
html[data-theme="dark"] .site-header .nav a.header-primary-link,
html[data-theme="dark"] .site-header .nav a.header-primary-link:hover,
html[data-theme="dark"] .site-header .nav a.header-primary-link.active {
    color: #ffffff;
}

body:not(.route-home) .site-header .nav a.header-primary-link {
    background: #0ea5df;
}

body:not(.route-home) .site-header .nav a.header-primary-link:hover,
body:not(.route-home) .site-header .nav a.header-primary-link.active {
    background: #028dcc;
}

html[data-theme="dark"] .site-header .nav a.header-primary-link {
    background: #0ea5df;
}

html[data-theme="dark"] .site-header .nav a.header-primary-link:hover,
html[data-theme="dark"] .site-header .nav a.header-primary-link.active {
    background: #028dcc;
}

.header-dropdown-nav {
    flex-wrap: nowrap;
}

.site-nav-dropdown {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.site-nav-dropdown::after {
    content: "";
    position: absolute;
    top: 100%;
    right: -0.5rem;
    left: -0.5rem;
    height: 0.8rem;
}

.site-nav-trigger {
    display: inline-flex;
    min-height: 36px;
    align-items: center;
    gap: 0.38rem;
    padding: 0.42rem 0.78rem;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: #475569;
    font: 750 0.88rem/1 Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background-color 0.16s ease, color 0.16s ease;
}

.site-nav-trigger svg {
    width: 0.8rem;
    height: 0.8rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.site-nav-dropdown:hover .site-nav-trigger,
.site-nav-dropdown:focus-within .site-nav-trigger,
.site-nav-dropdown.active .site-nav-trigger {
    background: #f8fafc;
    color: #0f172a;
}

.site-nav-menu {
    position: absolute;
    top: calc(100% + 0.6rem);
    left: 50%;
    z-index: 50;
    display: grid;
    width: min(18rem, 78vw);
    padding: 0.55rem;
    border: 1px solid #dbe3ee;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 22px 60px rgba(15, 23, 42, 0.14);
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, 6px);
    transition: opacity 0.16s ease, transform 0.16s ease;
}

.site-nav-dropdown:hover .site-nav-menu,
.site-nav-dropdown:focus-within .site-nav-menu {
    opacity: 1;
    pointer-events: auto;
    transform: translate(-50%, 0);
}

.site-header .nav .site-nav-menu a,
body:not(.route-home) .site-header .nav .site-nav-menu a {
    display: grid;
    min-height: 0;
    gap: 0.22rem;
    padding: 0.72rem 0.78rem;
    border: 0;
    border-radius: 13px;
    color: #0f172a;
    line-height: 1.25;
}

.site-header .nav .site-nav-menu a:hover,
.site-header .nav .site-nav-menu a:focus-visible {
    background: #eff6ff;
    color: #0f172a;
}

.site-nav-menu strong {
    font-size: 0.92rem;
    font-weight: 800;
}

.site-nav-menu span {
    color: #64748b;
    font-size: 0.8rem;
    font-weight: 550;
}

.site-header .nav a.site-account-link {
    font-weight: 750;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

html[data-theme="dark"] .site-nav-trigger {
    color: #cbd5e1;
}

html[data-theme="dark"] .site-nav-dropdown:hover .site-nav-trigger,
html[data-theme="dark"] .site-nav-dropdown:focus-within .site-nav-trigger,
html[data-theme="dark"] .site-nav-dropdown.active .site-nav-trigger {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}

html[data-theme="dark"] .site-nav-menu {
    border-color: rgba(148, 163, 184, 0.24);
    background: rgba(15, 23, 42, 0.98);
    box-shadow: 0 22px 60px rgba(0, 0, 0, 0.35);
}

html[data-theme="dark"] .site-header .nav .site-nav-menu a {
    color: #f8fafc;
}

html[data-theme="dark"] .site-header .nav .site-nav-menu a:hover,
html[data-theme="dark"] .site-header .nav .site-nav-menu a:focus-visible {
    background: rgba(59, 130, 246, 0.18);
    color: #ffffff;
}

html[data-theme="dark"] .site-nav-menu span {
    color: #94a3b8;
}

@media (max-width: 820px) {
    .site-header-inner {
        width: min(100% - 28px, 1280px);
    }

    .site-header .nav.nav-desktop {
        display: none !important;
    }

    .mobile-nav-toggle {
        display: inline-flex !important;
        width: 40px;
        height: 40px;
        align-items: center;
        justify-content: center;
        border-radius: 8px;
        color: #475569;
    }

    .mobile-nav-toggle:hover {
        background: #f1f5f9;
        color: #0f172a;
    }
}

body.mobile-nav-open {
    overflow: auto;
}

.mobile-nav-close-icon {
    display: none;
}

body.mobile-nav-open .mobile-nav-menu-icon {
    display: none;
}

body.mobile-nav-open .mobile-nav-close-icon {
    display: block;
}

.mobile-nav-shell {
    position: fixed;
    top: 64px;
    right: 0;
    bottom: auto;
    left: 0;
    z-index: 99;
}

.mobile-nav-overlay {
    position: static;
    inset: auto;
    overflow: visible;
    background: #ffffff;
    color: #334155;
    opacity: 1;
    transform: none;
    transition: none;
    box-shadow: 0 18px 38px rgba(15, 23, 42, 0.1);
}

.mobile-nav-shell.is-open .mobile-nav-overlay {
    opacity: 1;
    transform: none;
}

.mobile-nav-overlay-inner {
    width: min(1280px, calc(100% - 48px));
    min-height: 0;
    margin: 0 auto;
    padding: 0.9rem 0 1rem;
    justify-content: flex-start;
}

.mobile-nav-links {
    gap: 0.2rem;
    align-items: stretch;
}

.mobile-nav-shell .mobile-nav-links a,
.mobile-nav-shell .mobile-nav-links .mobile-theme-toggle {
    width: 100%;
    min-height: 42px;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    color: #334155;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.2;
    opacity: 1;
    transition: background-color 0.16s ease, color 0.16s ease;
}

.mobile-nav-shell .mobile-nav-links a.active,
.mobile-nav-shell .mobile-nav-links a:hover,
.mobile-nav-shell .mobile-nav-links .mobile-theme-toggle:hover {
    background: #f8fafc;
    color: #0f172a;
}

.mobile-nav-actions {
    margin-top: 0.7rem;
    padding: 0.8rem 0 0;
    border-top: 1px solid #e2e8f0;
}

.mobile-nav-cta {
    display: grid;
    gap: 0.55rem;
    margin-top: 0.75rem;
}

.mobile-nav-donate,
.mobile-nav-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0.65rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 650;
    text-decoration: none;
}

.mobile-nav-donate {
    border: 1px solid #e2e8f0;
    color: #334155;
}

.mobile-nav-primary {
    background: #020617;
    color: #ffffff;
}

html[data-theme="dark"] .mobile-nav-overlay {
    border-top: 1px solid rgba(203, 213, 225, 0.16);
    background: #181b1f;
    color: #d2d6db;
}

html[data-theme="dark"] .mobile-nav-shell .mobile-nav-links a,
html[data-theme="dark"] .mobile-nav-shell .mobile-nav-links .mobile-theme-toggle,
html[data-theme="dark"] .mobile-nav-donate {
    color: #d2d6db;
}

html[data-theme="dark"] .mobile-nav-shell .mobile-nav-links a.active,
html[data-theme="dark"] .mobile-nav-shell .mobile-nav-links a:hover,
html[data-theme="dark"] .mobile-nav-shell .mobile-nav-links .mobile-theme-toggle:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}

html[data-theme="dark"] .mobile-nav-actions {
    border-color: rgba(203, 213, 225, 0.16);
}

/* Directory cards shared by Tests, Types, and Articles. */
body.route-tests-index .tests-card-list,
body.route-types-index .types-card-list,
body.route-learn-index .learn-directory-card-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 24rem));
    justify-content: center;
    gap: 1.7rem;
}

body.route-learn-index .learn-directory-card-list {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 24rem));
}

body.route-tests-index .tests-card,
body.route-types-index .types-card,
body.route-learn-index .learn-directory-card {
    display: flex;
    min-height: 100%;
    flex-direction: column;
    overflow: hidden;
    padding: 0;
    border: 1px solid #dbe3ee;
    border-radius: 18px;
    background: #ffffff;
    color: #0f172a;
    text-align: left;
    box-shadow: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

body.route-tests-index .tests-card:hover,
body.route-tests-index .tests-card:focus-visible,
body.route-types-index .types-card:hover,
body.route-types-index .types-card:focus-within,
body.route-learn-index .learn-directory-card:hover,
body.route-learn-index .learn-directory-card:focus-visible {
    border-color: #b8c7dc;
    background: #ffffff;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.1);
    filter: none;
    transform: none;
    text-decoration: none;
}

body.route-tests-index .tests-card-visual,
body.route-types-index .types-card-visual,
body.route-learn-index .learn-directory-card-visual {
    position: relative;
    display: flex;
    min-height: 13rem;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    padding: 1.15rem;
    background: linear-gradient(135deg, #3b82f6 0%, #7c3aed 48%, #db2777 100%);
    color: #ffffff;
}

body.route-tests-index .tests-card-visual::before,
body.route-types-index .types-card-visual::before,
body.route-learn-index .learn-directory-card-visual::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.08);
}

body.route-tests-index .tests-card-experimental .tests-card-visual,
body.route-types-index .types-card-experimental .types-card-visual {
    background: linear-gradient(135deg, #8b5cf6 0%, #db2777 55%, #ef4444 100%);
}

body.route-tests-index .tests-card-standard .tests-card-visual,
body.route-types-index .types-card-standard .types-card-visual {
    background: linear-gradient(135deg, #2563eb 0%, #4f46e5 52%, #7c3aed 100%);
}

body.route-types-index .types-card-warm .types-card-visual {
    background: linear-gradient(135deg, #f59e0b 0%, #f97316 46%, #e11d48 100%);
}

body.route-learn-index .learn-directory-card-visual {
    background: linear-gradient(135deg, #2563eb 0%, #7c3aed 50%, #db2777 100%);
}

body.route-tests-index .tests-card-top,
body.route-types-index .types-card-top,
body.route-learn-index .learn-directory-card-top {
    position: static;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin: 0;
}

body.route-tests-index .tests-status-pill,
body.route-types-index .types-status-pill,
body.route-learn-index .learn-directory-status-pill {
    position: relative;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    min-height: 2rem;
    padding: 0.42rem 0.8rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.94);
    color: #4f46e5;
    font-size: 0.78rem;
    font-weight: 850;
    line-height: 1;
}

body.route-tests-index .tests-status-pill svg,
body.route-types-index .types-status-pill svg,
body.route-learn-index .learn-directory-status-pill svg {
    width: 0.9rem;
    height: 0.9rem;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
}

body.route-tests-index .tests-status-pill-accent svg,
body.route-types-index .types-status-pill-accent svg {
    fill: currentColor;
}

body.route-tests-index .tests-card-icon,
body.route-types-index .types-card-icon,
body.route-learn-index .learn-directory-card-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    display: inline-flex;
    width: 7rem;
    height: 7rem;
    align-items: center;
    justify-content: center;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    color: rgba(255, 255, 255, 0.22);
    transform: translate(-50%, -50%);
    z-index: 1;
}

body.route-tests-index .tests-card-icon svg,
body.route-types-index .types-card-icon svg,
body.route-learn-index .learn-directory-card-icon svg {
    width: 100%;
    height: 100%;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.55;
}

body.route-tests-index .tests-card-meta,
body.route-types-index .types-card-meta,
body.route-learn-index .learn-directory-card-meta {
    position: relative;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 0.95rem;
    margin: 0;
}

body.route-tests-index .tests-card-meta > span,
body.route-types-index .types-card-meta > span,
body.route-learn-index .learn-directory-card-meta > span {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: rgba(255, 255, 255, 0.95);
    font-size: 0.93rem;
    font-weight: 800;
}

body.route-tests-index .tests-card-meta em,
body.route-types-index .types-card-meta em,
body.route-learn-index .learn-directory-card-meta em {
    display: none;
}

body.route-tests-index .tests-card-meta strong,
body.route-types-index .types-card-meta strong,
body.route-learn-index .learn-directory-card-meta strong {
    color: inherit;
    font-weight: 850;
}

body.route-tests-index .tests-meta-icon,
body.route-types-index .types-meta-icon,
body.route-learn-index .learn-directory-meta-icon {
    display: inline-flex;
    width: 1rem;
    height: 1rem;
    flex: 0 0 1rem;
    align-items: center;
    justify-content: center;
    border-radius: 0;
    background: transparent !important;
    color: currentColor !important;
}

body.route-tests-index .tests-meta-icon svg,
body.route-types-index .types-meta-icon svg,
body.route-learn-index .learn-directory-meta-icon svg {
    width: 1rem;
    height: 1rem;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
}

body.route-tests-index .tests-card-main,
body.route-types-index .types-card-main,
body.route-learn-index .learn-directory-card-main {
    display: flex;
    flex: 1 1 auto;
    min-height: 0;
    flex-direction: column;
    padding: 1.55rem;
    border-radius: 0;
    background: #ffffff;
    overflow: visible;
}

body.route-tests-index .tests-card-tags,
body.route-types-index .types-card-tags,
body.route-learn-index .learn-directory-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin-bottom: 1rem;
}

body.route-tests-index .tests-tag,
body.route-types-index .types-tag,
body.route-learn-index .learn-directory-tag {
    display: inline-flex;
    align-items: center;
    min-height: 1.7rem;
    padding: 0.35rem 0.75rem;
    border: 0;
    border-radius: 999px;
    background: #eef2ff;
    color: #4f46e5;
    font-size: 0.72rem;
    font-weight: 850;
    letter-spacing: 0;
    line-height: 1;
    box-shadow: none;
}

body.route-tests-index .tests-tag-muted,
body.route-types-index .types-tag-muted,
body.route-learn-index .learn-directory-tag-muted {
    background: #f1f5f9;
    color: #475569;
}

body.route-tests-index .tests-card h2,
body.route-types-index .types-card h2,
body.route-learn-index .learn-directory-card h2 {
    margin: 0;
    color: #020617;
    font-size: 1.24rem;
    font-weight: 850;
    line-height: 1.2;
    letter-spacing: -0.025em;
}

body.route-tests-index .tests-card p,
body.route-types-index .types-card p,
body.route-learn-index .learn-directory-card p {
    margin: 1rem 0 0;
    color: #334155;
    font-size: 0.98rem;
    line-height: 1.55;
}

body.route-tests-index .tests-card-cta,
body.route-types-index .types-card-cta,
body.route-learn-index .learn-directory-card-cta {
    display: inline-flex;
    width: fit-content;
    min-height: auto;
    align-items: center;
    justify-content: flex-start;
    gap: 0.5rem;
    margin-top: auto;
    padding-top: 1.55rem;
    border-radius: 0;
    background: transparent;
    color: #4f46e5;
    font-size: 0.96rem;
    font-weight: 850;
    letter-spacing: 0;
    box-shadow: none;
}

body.route-tests-index .tests-card-cta svg,
body.route-types-index .types-card-cta svg,
body.route-learn-index .learn-directory-card-cta svg {
    width: 1rem;
    height: 1rem;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
    transition: transform 0.18s ease;
}

body.route-tests-index .tests-card:hover .tests-card-cta svg,
body.route-tests-index .tests-card:focus-visible .tests-card-cta svg,
body.route-types-index .types-card:hover .types-card-cta svg,
body.route-types-index .types-card:focus-within .types-card-cta svg,
body.route-learn-index .learn-directory-card:hover .learn-directory-card-cta svg,
body.route-learn-index .learn-directory-card:focus-visible .learn-directory-card-cta svg {
    transform: translateX(3px);
}

@media (max-width: 760px) {
    body.route-tests-index .tests-card-list,
    body.route-types-index .types-card-list,
    body.route-learn-index .learn-directory-card-list {
        grid-template-columns: 1fr;
        gap: 1.1rem;
    }

    body.route-tests-index .tests-card-visual,
    body.route-types-index .types-card-visual,
    body.route-learn-index .learn-directory-card-visual {
        min-height: 11.5rem;
    }

    body.route-tests-index .tests-card-main,
    body.route-types-index .types-card-main,
    body.route-learn-index .learn-directory-card-main {
        padding: 1.35rem;
    }
}

/* Global dark-mode polish for non-home pages. */
html[data-theme="dark"] body.route-default,
html[data-theme="dark"] body.route-tests-index,
html[data-theme="dark"] body.route-types-index,
html[data-theme="dark"] body.route-learn-index,
html[data-theme="dark"] body.route-learn-show,
html[data-theme="dark"] body.route-account,
html[data-theme="dark"] body.route-sign-in,
html[data-theme="dark"] body.route-register,
html[data-theme="dark"] body.route-password-request,
html[data-theme="dark"] body.route-password-reset,
html[data-theme="dark"] body.route-donate,
html[data-theme="dark"] body.route-contact {
    background-color: #0b1220;
    color: #d7dce2;
}

html[data-theme="dark"] body.route-tests-index .site-main,
html[data-theme="dark"] body.route-types-index .site-main,
html[data-theme="dark"] body.route-learn-index .site-main,
html[data-theme="dark"] body.route-learn-show .site-main,
html[data-theme="dark"] body.route-account .site-main,
html[data-theme="dark"] body.route-sign-in .site-main,
html[data-theme="dark"] body.route-register .site-main,
html[data-theme="dark"] body.route-password-request .site-main,
html[data-theme="dark"] body.route-password-reset .site-main,
html[data-theme="dark"] body.route-donate .site-main,
html[data-theme="dark"] body.route-contact .site-main {
    background:
        linear-gradient(180deg, rgba(11, 18, 32, 0) 0%, rgba(11, 18, 32, 0.78) 52rem, #0b1220 82rem),
        radial-gradient(circle at 18% 0%, rgba(96, 165, 250, 0.16), transparent 34rem),
        radial-gradient(circle at 76% 24rem, rgba(168, 85, 247, 0.14), transparent 34rem),
        radial-gradient(circle at 94% 44rem, rgba(219, 39, 119, 0.12), transparent 36rem),
        #0b1220;
    background-repeat: no-repeat;
    background-size: 100% 92rem;
}

html[data-theme="dark"] body.route-tests-index .tests-index-hero h1,
html[data-theme="dark"] body.route-types-index .types-index-hero h1,
html[data-theme="dark"] body.route-learn-index .learn-directory-hero h1,
html[data-theme="dark"] body:not(.route-home) .page-head h1,
html[data-theme="dark"] body:not(.route-home) .prose-page h1,
html[data-theme="dark"] body:not(.route-home) .prose-page h2,
html[data-theme="dark"] body:not(.route-home) .prose-page h3 {
    color: #f8fafc;
}

html[data-theme="dark"] body.route-tests-index .tests-index-hero p,
html[data-theme="dark"] body.route-types-index .types-index-hero p,
html[data-theme="dark"] body.route-learn-index .learn-directory-hero p,
html[data-theme="dark"] body:not(.route-home) .page-head p,
html[data-theme="dark"] body:not(.route-home) .prose-page,
html[data-theme="dark"] body:not(.route-home) .prose-page p,
html[data-theme="dark"] body:not(.route-home) .prose-page li {
    color: #cbd5e1;
}

html[data-theme="dark"] body.route-tests-index .tests-search-form,
html[data-theme="dark"] body.route-types-index .types-search-form,
html[data-theme="dark"] body.route-learn-index .learn-directory-search-form,
html[data-theme="dark"] body.route-tests-index .tests-filter-link,
html[data-theme="dark"] body.route-types-index .types-filter-link,
html[data-theme="dark"] body.route-learn-index .learn-topic-link {
    border-color: rgba(148, 163, 184, 0.22);
    background: rgba(15, 23, 42, 0.76);
    color: #e2e8f0;
}

html[data-theme="dark"] body.route-tests-index .tests-search-form input[type="search"],
html[data-theme="dark"] body.route-types-index .types-search-form input[type="search"],
html[data-theme="dark"] body.route-learn-index .learn-directory-search-form input[type="search"] {
    color: #e2e8f0;
}

html[data-theme="dark"] body.route-tests-index .tests-search-form input[type="search"]::placeholder,
html[data-theme="dark"] body.route-types-index .types-search-form input[type="search"]::placeholder,
html[data-theme="dark"] body.route-learn-index .learn-directory-search-form input[type="search"]::placeholder {
    color: #94a3b8;
}

html[data-theme="dark"] body.route-tests-index .tests-filter-link.is-active,
html[data-theme="dark"] body.route-types-index .types-filter-link.is-active,
html[data-theme="dark"] body.route-learn-index .learn-topic-link.is-active {
    border-color: rgba(96, 165, 250, 0.42);
    background: #e2e8f0;
    color: #0f172a;
}

html[data-theme="dark"] body.route-tests-index .tests-card,
html[data-theme="dark"] body.route-types-index .types-card,
html[data-theme="dark"] body.route-learn-index .learn-directory-card,
html[data-theme="dark"] body.route-tests-index .directory-card,
html[data-theme="dark"] body.route-types-index .directory-card,
html[data-theme="dark"] body.route-learn-index .directory-card,
html[data-theme="dark"] body:not(.route-home) .account-panel,
html[data-theme="dark"] body:not(.route-home) .account-demographics,
html[data-theme="dark"] body:not(.route-home) .account-result-card,
html[data-theme="dark"] body:not(.route-home) .account-empty-state,
html[data-theme="dark"] body:not(.route-home) .prose-page {
    border-color: rgba(148, 163, 184, 0.22);
    background: #111827;
    color: #d7dce2;
    box-shadow: none;
}

html[data-theme="dark"] body.route-tests-index .tests-card:hover,
html[data-theme="dark"] body.route-tests-index .tests-card:focus-visible,
html[data-theme="dark"] body.route-types-index .types-card:hover,
html[data-theme="dark"] body.route-types-index .types-card:focus-within,
html[data-theme="dark"] body.route-learn-index .learn-directory-card:hover,
html[data-theme="dark"] body.route-learn-index .learn-directory-card:focus-visible,
html[data-theme="dark"] body.route-tests-index .directory-card:hover,
html[data-theme="dark"] body.route-types-index .directory-card:hover,
html[data-theme="dark"] body.route-learn-index .directory-card:hover {
    border-color: rgba(203, 213, 225, 0.34);
    background: #111827;
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.26);
}

html[data-theme="dark"] body.route-tests-index .tests-card-main,
html[data-theme="dark"] body.route-types-index .types-card-main,
html[data-theme="dark"] body.route-learn-index .learn-directory-card-main,
html[data-theme="dark"] body.route-tests-index .directory-card-body,
html[data-theme="dark"] body.route-types-index .directory-card-body,
html[data-theme="dark"] body.route-learn-index .directory-card-body {
    background: #111827;
}

html[data-theme="dark"] body.route-tests-index .tests-card h2,
html[data-theme="dark"] body.route-types-index .types-card h2,
html[data-theme="dark"] body.route-learn-index .learn-directory-card h2,
html[data-theme="dark"] body.route-tests-index .directory-card h2,
html[data-theme="dark"] body.route-types-index .directory-card h2,
html[data-theme="dark"] body.route-learn-index .directory-card h2,
html[data-theme="dark"] body:not(.route-home) .account-panel h1,
html[data-theme="dark"] body:not(.route-home) .account-panel h2,
html[data-theme="dark"] body:not(.route-home) .account-result-card h2 {
    color: #f8fafc;
}

html[data-theme="dark"] body.route-tests-index .tests-card p,
html[data-theme="dark"] body.route-types-index .types-card p,
html[data-theme="dark"] body.route-learn-index .learn-directory-card p,
html[data-theme="dark"] body.route-tests-index .directory-card p,
html[data-theme="dark"] body.route-types-index .directory-card p,
html[data-theme="dark"] body.route-learn-index .directory-card p {
    color: #cbd5e1;
}

html[data-theme="dark"] body.route-tests-index .tests-tag,
html[data-theme="dark"] body.route-types-index .types-tag,
html[data-theme="dark"] body.route-learn-index .learn-directory-tag,
html[data-theme="dark"] body.route-tests-index .directory-card-tags span,
html[data-theme="dark"] body.route-types-index .directory-card-tags span,
html[data-theme="dark"] body.route-learn-index .directory-card-tags span {
    background: rgba(96, 165, 250, 0.16);
    color: #bfdbfe;
}

html[data-theme="dark"] body:not(.route-home) .site-footer {
    border-color: rgba(148, 163, 184, 0.18);
    background: #0b1220;
    color: #94a3b8;
}

/* Keep the canonical non-home canvas continuous into the footer. */
body:not(.route-home),
html[data-theme="dark"] body:not(.route-home) {
    background: #ffffff;
}

body:not(.route-home) .site-main {
    padding-bottom: 0;
    background-color: #ffffff;
}

body:not(.route-home) .site-footer {
    margin-top: 0;
}

html[data-theme="dark"] body.route-tests-index .tests-group .grid > a,
html[data-theme="dark"] body.route-learn-index .learn-directory-group .grid > a,
html[data-theme="dark"] body.route-types-index .types-group .grid > article {
    border-color: rgba(148, 163, 184, 0.22) !important;
    background: #111827 !important;
    color: #d7dce2 !important;
    box-shadow: none !important;
}

html[data-theme="dark"] body.route-tests-index .tests-group .grid > a:hover,
html[data-theme="dark"] body.route-learn-index .learn-directory-group .grid > a:hover,
html[data-theme="dark"] body.route-types-index .types-group .grid > article:hover {
    border-color: rgba(203, 213, 225, 0.34) !important;
    background: #111827 !important;
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.26) !important;
}

html[data-theme="dark"] body.route-tests-index .tests-group .text-slate-950,
html[data-theme="dark"] body.route-learn-index .learn-directory-group .text-slate-950,
html[data-theme="dark"] body.route-types-index .types-group .text-slate-950 {
    color: #f8fafc !important;
}

html[data-theme="dark"] body.route-tests-index .tests-group .text-slate-700,
html[data-theme="dark"] body.route-learn-index .learn-directory-group .text-slate-700,
html[data-theme="dark"] body.route-types-index .types-group .text-slate-700,
html[data-theme="dark"] body.route-tests-index .tests-group .text-slate-600,
html[data-theme="dark"] body.route-learn-index .learn-directory-group .text-slate-600,
html[data-theme="dark"] body.route-types-index .types-group .text-slate-600 {
    color: #cbd5e1 !important;
}

html[data-theme="dark"] body.route-tests-index .tests-group .bg-white,
html[data-theme="dark"] body.route-learn-index .learn-directory-group .bg-white,
html[data-theme="dark"] body.route-types-index .types-group .bg-white,
html[data-theme="dark"] body.route-tests-index .tests-group .bg-slate-100,
html[data-theme="dark"] body.route-learn-index .learn-directory-group .bg-slate-100,
html[data-theme="dark"] body.route-types-index .types-group .bg-slate-100,
html[data-theme="dark"] body.route-tests-index .tests-group .bg-blue-50,
html[data-theme="dark"] body.route-learn-index .learn-directory-group .bg-blue-50,
html[data-theme="dark"] body.route-types-index .types-group .bg-blue-50,
html[data-theme="dark"] body.route-tests-index .tests-group .bg-purple-50,
html[data-theme="dark"] body.route-types-index .types-group .bg-purple-50,
html[data-theme="dark"] body.route-tests-index .tests-group .bg-indigo-50,
html[data-theme="dark"] body.route-types-index .types-group .bg-indigo-50 {
    background-color: rgba(96, 165, 250, 0.14) !important;
}

html[data-theme="dark"] body.route-tests-index .tests-group .text-blue-700,
html[data-theme="dark"] body.route-learn-index .learn-directory-group .text-blue-700,
html[data-theme="dark"] body.route-types-index .types-group .text-blue-700,
html[data-theme="dark"] body.route-tests-index .tests-group .text-purple-700,
html[data-theme="dark"] body.route-types-index .types-group .text-purple-700,
html[data-theme="dark"] body.route-tests-index .tests-group .text-indigo-700,
html[data-theme="dark"] body.route-types-index .types-group .text-indigo-700,
html[data-theme="dark"] body.route-types-index .types-group .text-orange-700 {
    color: #bfdbfe !important;
}

html[data-theme="dark"] body.route-tests-index .tests-group-header h2,
html[data-theme="dark"] body.route-types-index .types-group h2,
html[data-theme="dark"] body.route-learn-index .learn-directory-group-header h2 {
    color: #f8fafc;
}

html[data-theme="dark"] body.route-tests-index .tests-group-header span,
html[data-theme="dark"] body.route-learn-index .learn-directory-group-header span {
    color: #94a3b8;
}

/* Reference-style global header. */
.site-header {
    --header-color-dark: #0d1e21;
    --header-color-brand: #173a41;
    --header-color-gold: #b38646;
    --header-color-gold-hover: #a07439;
    --header-color-cream: #faf8f5;
    --header-color-white: #ffffff;
    --header-color-border: #e8e6e1;
    --header-color-muted: #526366;
    --header-height: 86px;
    --header-transition: 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
    background: var(--header-color-white);
    border-bottom: 1px solid var(--header-color-border);
    box-shadow: none;
    transform: translateY(0);
    transition: transform 0.28s ease, background var(--header-transition), border-color var(--header-transition);
    will-change: transform;
    backdrop-filter: none;
}

.site-header.is-hidden {
    transform: translateY(-100%);
}

body.mobile-nav-open .site-header {
    transform: translateY(0);
}

.site-header .header-inner {
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    width: 100%;
    min-height: var(--header-height);
}

.site-header .brand {
    display: flex;
    align-items: center;
    gap: 1rem;
    width: 20rem;
    padding: 0 2rem;
    color: var(--header-color-brand);
    text-decoration: none;
    border-right: 1px solid var(--header-color-border);
    background: var(--header-color-white);
}

.site-header .brand:hover,
.site-header .brand:focus-visible {
    color: var(--header-color-brand);
    background: var(--header-color-cream);
}

.site-header .brand-mark {
    display: grid;
    width: 3.1rem;
    height: 3.1rem;
    place-items: center;
    border: 2px solid var(--header-color-brand);
    border-radius: 50%;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.65rem;
    font-weight: 700;
    line-height: 1;
}

.site-header .brand-text {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 0.1rem;
}

.site-header .brand-name {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: 0;
    white-space: nowrap;
}

.site-header .brand-tagline {
    color: var(--header-color-gold);
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.site-header .nav-area {
    display: flex;
    flex: 1;
    align-items: stretch;
    justify-content: flex-end;
}

.site-header .nav-menu {
    display: flex;
    align-items: stretch;
    justify-content: flex-end;
    gap: 0;
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-header .nav-item {
    position: relative;
    display: flex;
    align-items: stretch;
}

.site-header .nav-button,
.site-header .nav-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    min-height: var(--header-height);
    padding: 0 1.45rem;
    border: 0;
    border-left: 1px solid transparent;
    background: transparent;
    color: var(--header-color-dark);
    font: inherit;
    font-size: 0.78rem;
    font-weight: 850;
    letter-spacing: 0.12em;
    line-height: 1;
    text-decoration: none;
    text-transform: uppercase;
    cursor: pointer;
    transition: background var(--header-transition), color var(--header-transition);
}

.site-header .nav-button:hover,
.site-header .nav-link:hover,
.site-header .nav-button:focus-visible,
.site-header .nav-link:focus-visible,
.site-header .nav-item.open-on-route > .nav-button {
    background: var(--header-color-cream);
    color: var(--header-color-gold-hover);
}

.site-header .chevron-icon,
.site-header .login-link svg {
    width: 0.9rem;
    height: 0.9rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: transform var(--header-transition);
}

.site-header .nav-item.open .chevron-icon {
    transform: rotate(180deg);
}

.site-header .login-link {
    min-width: 13rem;
    min-height: 3.4rem;
    align-self: center;
    margin: 0 1.4rem;
    border: 2px solid var(--header-color-brand);
    background: transparent;
    color: var(--header-color-dark);
}

.site-header .login-link:hover,
.site-header .login-link:focus-visible {
    background: var(--header-color-brand);
    color: var(--header-color-white);
}

.site-header .dropdown {
    position: absolute;
    top: 100%;
    left: 50%;
    width: min(34rem, calc(100vw - 2rem));
    padding-top: 0.7rem;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translate(-50%, 0.6rem);
    transition: opacity var(--header-transition), visibility var(--header-transition), transform var(--header-transition);
}

.site-header .nav-item.open .dropdown {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translate(-50%, 0);
}

.site-header .dropdown-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.35rem;
    padding: 0.7rem;
    border: 1px solid var(--header-color-border);
    border-radius: 0.95rem;
    background: var(--header-color-white);
    box-shadow: 0 1.2rem 3.5rem rgba(13, 30, 33, 0.14);
}

.site-header .dropdown-link {
    display: flex;
    flex-direction: column;
    gap: 0.28rem;
    min-height: 5.25rem;
    padding: 1rem;
    border: 1px solid transparent;
    border-radius: 0.75rem;
    color: var(--header-color-dark);
    text-decoration: none;
    transition: background var(--header-transition), border-color var(--header-transition), color var(--header-transition);
}

.site-header .dropdown-link:hover,
.site-header .dropdown-link:focus-visible {
    border-color: rgba(179, 134, 70, 0.38);
    background: var(--header-color-cream);
}

.site-header .dropdown-link.featured {
    background: rgba(179, 134, 70, 0.1);
}

.site-header .dropdown-link.new .dropdown-title::after {
    content: "New";
    margin-left: 0.45rem;
    padding: 0.14rem 0.36rem;
    border-radius: 999px;
    background: #dff4e9;
    color: #126c42;
    font-size: 0.58rem;
    font-weight: 850;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.site-header .dropdown-title {
    font-size: 0.92rem;
    font-weight: 850;
    line-height: 1.25;
}

.site-header .dropdown-desc {
    color: var(--header-color-muted);
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1.4;
}

.site-header .mobile-toggle {
    display: none;
    width: var(--header-height);
    min-height: var(--header-height);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.32rem;
    border: 0;
    border-left: 1px solid var(--header-color-border);
    background: var(--header-color-white);
    color: var(--header-color-dark);
    cursor: pointer;
}

.site-header .mobile-toggle span {
    display: block;
    width: 1.35rem;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
    transition: transform var(--header-transition), opacity var(--header-transition);
}

body.mobile-nav-open .site-header .mobile-toggle span:nth-child(1) {
    transform: translateY(0.42rem) rotate(45deg);
}

body.mobile-nav-open .site-header .mobile-toggle span:nth-child(2) {
    opacity: 0;
}

body.mobile-nav-open .site-header .mobile-toggle span:nth-child(3) {
    transform: translateY(-0.42rem) rotate(-45deg);
}

html[data-theme="dark"] .site-header {
    background: #0d1e21;
    border-color: rgba(232, 230, 225, 0.18);
}

html[data-theme="dark"] .site-header .brand,
html[data-theme="dark"] .site-header .mobile-toggle {
    background: #0d1e21;
    color: #faf8f5;
    border-color: rgba(232, 230, 225, 0.18);
}

html[data-theme="dark"] .site-header .brand:hover,
html[data-theme="dark"] .site-header .brand:focus-visible,
html[data-theme="dark"] .site-header .nav-button:hover,
html[data-theme="dark"] .site-header .nav-link:hover,
html[data-theme="dark"] .site-header .nav-button:focus-visible,
html[data-theme="dark"] .site-header .nav-link:focus-visible,
html[data-theme="dark"] .site-header .nav-item.open-on-route > .nav-button {
    background: rgba(250, 248, 245, 0.08);
}

html[data-theme="dark"] .site-header .nav-button,
html[data-theme="dark"] .site-header .nav-link {
    color: #faf8f5;
}

html[data-theme="dark"] .site-header .dropdown-grid {
    border-color: rgba(232, 230, 225, 0.18);
    background: #10272c;
}

html[data-theme="dark"] .site-header .dropdown-link {
    color: #faf8f5;
}

html[data-theme="dark"] .site-header .dropdown-link:hover,
html[data-theme="dark"] .site-header .dropdown-link:focus-visible,
html[data-theme="dark"] .site-header .dropdown-link.featured {
    background: rgba(250, 248, 245, 0.08);
}

html[data-theme="dark"] .site-header .dropdown-desc {
    color: #b8c5c8;
}

@media (max-width: 1180px) {
    .site-header .brand {
        width: 17rem;
        padding-inline: 1.4rem;
    }

    .site-header .nav-button,
    .site-header .nav-link {
        padding-inline: 1rem;
        letter-spacing: 0.09em;
    }

    .site-header .login-link {
        min-width: 12rem;
        margin-inline: 1rem;
    }
}

@media (max-width: 900px) {
    .site-header .header-inner {
        min-height: 4.6rem;
    }

    .site-header .brand {
        width: auto;
        flex: 1;
        min-height: 4.6rem;
    }

    .site-header .brand-mark {
        width: 2.55rem;
        height: 2.55rem;
        font-size: 1.35rem;
    }

    .site-header .brand-name {
        font-size: 1.1rem;
    }

    .site-header .brand-tagline {
        font-size: 0.58rem;
    }

    .site-header .mobile-toggle {
        display: inline-flex;
        width: 4.6rem;
        min-height: 4.6rem;
    }

    .site-header .nav-area {
        position: fixed;
        inset: 4.6rem 0 auto 0;
        display: block;
        max-height: calc(100vh - 4.6rem);
        overflow-y: auto;
        border-top: 1px solid var(--header-color-border);
        background: var(--header-color-white);
        opacity: 0;
        visibility: hidden;
        transform: translateY(-0.8rem);
        transition: opacity var(--header-transition), visibility var(--header-transition), transform var(--header-transition);
    }

    body.mobile-nav-open .site-header .nav-area {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .site-header .nav-menu,
    .site-header .nav-item {
        display: block;
        width: 100%;
    }

    .site-header .nav-button,
    .site-header .nav-link {
        width: 100%;
        min-height: 4rem;
        justify-content: space-between;
        padding: 0 1.35rem;
        border-top: 1px solid var(--header-color-border);
    }

    .site-header .login-link {
        min-width: 0;
        justify-content: center;
        margin: 0;
        border-width: 0;
    }

    .site-header .dropdown {
        position: static;
        width: 100%;
        padding: 0;
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: none;
        display: none;
    }

    .site-header .nav-item.open .dropdown {
        display: block;
        transform: none;
    }

    .site-header .dropdown-grid {
        grid-template-columns: 1fr;
        gap: 0;
        border: 0;
        border-radius: 0;
        box-shadow: none;
        padding: 0.45rem 1rem 1rem;
        background: var(--header-color-cream);
    }

    .site-header .dropdown-link {
        min-height: auto;
        padding: 0.85rem;
    }

    html[data-theme="dark"] .site-header .nav-area {
        background: #0d1e21;
        border-color: rgba(232, 230, 225, 0.18);
    }

    html[data-theme="dark"] .site-header .nav-button,
    html[data-theme="dark"] .site-header .nav-link {
        border-color: rgba(232, 230, 225, 0.18);
    }

    html[data-theme="dark"] .site-header .dropdown-grid {
        background: rgba(250, 248, 245, 0.05);
    }
}
/*
 * Shared assessment focus shell. Native assessment scripts apply this state
 * only while a question view is active, matching the Big Five question flow.
 */
body.personality-test-focus-mode {
    background: #f3f4f6 !important;
}

body.personality-test-focus-mode .site-header,
body.personality-test-focus-mode .site-footer,
body.personality-test-focus-mode .mobile-nav-shell,
body.personality-test-focus-mode .back-to-top,
body.personality-test-focus-mode .tool-template-title,
body.personality-test-focus-mode .tool-template-guide,
body.personality-test-focus-mode .tool-template-learn-card,
body.personality-test-focus-mode .tool-template-donation-banner,
body.personality-test-focus-mode .tool-template-rail,
body.personality-test-focus-mode .site-ad-slot--anchor-mobile {
    display: none !important;
}

body.personality-test-focus-mode .site-main,
body.personality-test-focus-mode .section,
body.personality-test-focus-mode .site-main > .section > .container {
    min-height: 100vh;
    min-height: 100dvh;
}

body.personality-test-focus-mode .site-main {
    padding-bottom: 0;
    background: #f3f4f6;
}

body.personality-test-focus-mode .section {
    display: grid;
    padding: 0;
}

body.personality-test-focus-mode .site-main > .section > .container {
    display: grid;
    width: 100%;
    max-width: none;
    padding: 0;
}

/* Saved-result pagination is intentionally independent of the frontend build. */
.account-results-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.25rem;
    font-size: 0.9rem;
}

.account-results-pagination a,
.account-results-pagination span {
    color: var(--text-muted, #52627a);
}

.account-results-pagination a {
    color: var(--accent, #2563eb);
    font-weight: 700;
}

.account-results-pagination span[aria-disabled="true"] {
    opacity: 0.55;
}
