: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: #5d6b82;
    --text-soft: #8190a8;
    --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", "Geist", -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: "Rajdhani", "Geist", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", 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: #a5adb8;
    --text-soft: #818b97;
    --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:
        radial-gradient(circle at top left, rgba(var(--accent-rgb), 0.08), transparent 28%),
        radial-gradient(circle at top right, rgba(37, 99, 235, 0.06), transparent 22%),
        linear-gradient(180deg, var(--bg-body) 0%, var(--bg-body-deep) 100%);
    -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-learn-index,
body.route-categories-index,
body.route-categories-show,
body.route-donate,
body.route-contact {
    background: #eceeef;
}

html[data-theme="dark"] body.route-tools-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-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: #5d6b82;
    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-header-inner {
    height: 52px;
    min-height: 52px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

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

.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 .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-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.2rem 0 1.2rem;
}

.page-head h1 {
    font-size: clamp(2.1rem, 4vw, 3.25rem);
    margin-bottom: 0.85rem;
}

.section {
    padding: 1.8rem 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 {
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

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

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

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

.cookie-consent-banner {
    position: fixed;
    right: 20px;
    bottom: calc(20px + env(safe-area-inset-bottom));
    left: 20px;
    z-index: 120;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
    max-width: 980px;
    margin: 0 auto;
    padding: 18px 20px;
    border: 1px solid rgba(148, 163, 184, 0.38);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 22px 54px rgba(15, 23, 42, 0.2);
}

.cookie-consent-banner[hidden] {
    display: none !important;
}

.cookie-consent-copy {
    display: grid;
    gap: 6px;
}

.cookie-consent-copy p,
.cookie-consent-copy h2 {
    margin: 0;
}

.cookie-consent-kicker {
    color: var(--accent);
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.cookie-consent-copy h2 {
    color: var(--text-heading);
    font-size: 1.08rem;
    font-weight: 800;
}

.cookie-consent-copy p:not(.cookie-consent-kicker) {
    max-width: 68ch;
    color: var(--text-muted);
    font-size: 0.94rem;
    line-height: 1.55;
}

.cookie-consent-copy a {
    width: fit-content;
    color: var(--accent-deep);
    font-size: 0.9rem;
    font-weight: 700;
}

.cookie-consent-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.cookie-consent-button,
.policy-consent-reset {
    min-height: 42px;
    border: 1px solid rgba(148, 163, 184, 0.42);
    border-radius: 999px;
    padding: 0 16px;
    font: inherit;
    font-size: 0.92rem;
    font-weight: 800;
    cursor: pointer;
}

.cookie-consent-button-primary {
    border-color: var(--accent);
    background: var(--accent);
    color: #fff;
}

.cookie-consent-button-secondary,
.policy-consent-reset {
    background: #fff;
    color: var(--text-heading);
}

.cookie-consent-button:focus-visible,
.policy-consent-reset:focus-visible {
    outline: 3px solid rgba(var(--accent-rgb), 0.26);
    outline-offset: 3px;
}

html[data-theme="dark"] .cookie-consent-banner {
    border-color: rgba(148, 163, 184, 0.24);
    background: rgba(24, 29, 36, 0.96);
    box-shadow: 0 22px 54px rgba(0, 0, 0, 0.42);
}

html[data-theme="dark"] .cookie-consent-button-secondary,
html[data-theme="dark"] .policy-consent-reset {
    background: #141a24;
    color: #e5edf7;
}

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

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

    .cookie-consent-banner {
        grid-template-columns: 1fr;
        right: 12px;
        bottom: calc(12px + env(safe-area-inset-bottom));
        left: 12px;
        padding: 16px;
        border-radius: 16px;
    }

    .cookie-consent-actions {
        justify-content: stretch;
    }

    .cookie-consent-button {
        flex: 1 1 160px;
    }

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