:root {
    color-scheme: light;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family:
        Inter,
        ui-sans-serif,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
    background: #f8fafc;
    color: #0f172a;
}

.hero-gradient {
    background: #f8fafc;
}

.site-header {
    top: 0;
    width: 100%;
    padding: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.95);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.site-topbar-shell {
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.9) inset,
        0 12px 30px -20px rgba(15, 23, 42, 0.18);
}

.site-header-shell {
    max-width: 1280px;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.site-logo {
    display: block;
}

.site-nav-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    justify-content: center;
    min-height: 2.45rem;
    border: 1px solid rgba(203, 213, 225, 1);
    border-radius: 9999px;
    background: #ffffff;
    padding: 0.65rem 0.95rem;
    font-size: 0.88rem;
    font-weight: 700;
    color: #334155;
    transition:
        transform 0.15s ease,
        background-color 0.15s ease,
        border-color 0.15s ease,
        color 0.15s ease;
}

.site-nav-pill:hover {
    transform: translateY(-1px);
    border-color: rgba(99, 102, 241, 0.26);
    background: #eef2ff;
    color: #4338ca;
}

.hero-shell {
    border: 1px solid rgba(226, 232, 240, 1);
    background: #ffffff;
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.05);
}

.hero-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.hero-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 9999px;
    border: 1px solid rgba(226, 232, 240, 1);
    background: #f8fafc;
    padding: 0.58rem 0.9rem;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #475569;
}

.hero-primary-action,
.hero-lang-card {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    border-radius: 9999px;
    padding: 0.8rem 1rem;
    font-size: 0.95rem;
    font-weight: 800;
    transition:
        transform 0.16s ease,
        background-color 0.16s ease,
        border-color 0.16s ease,
        color 0.16s ease,
        box-shadow 0.16s ease;
}

.hero-primary-action {
    border: 1px solid #4338ca;
    background: #4338ca;
    color: #ffffff;
    box-shadow: 0 14px 28px rgba(67, 56, 202, 0.16);
}

.hero-primary-action:hover {
    transform: translateY(-1px);
    background: #3730a3;
    border-color: #3730a3;
    color: #ffffff;
}

.hero-lang-card {
    border: 1px solid rgba(203, 213, 225, 1);
    background: #ffffff;
    color: #0f172a;
}

.hero-lang-card:hover {
    transform: translateY(-1px);
    border-color: rgba(99, 102, 241, 0.28);
    background: #eef2ff;
    color: #4338ca;
}

.hero-lang-card .flag {
    font-size: 1.1rem;
}

.hero-side-panel {
    border: 1px solid rgba(226, 232, 240, 1);
    background: #f8fafc;
}

.filter-panel {
    box-shadow: 0 20px 44px rgba(15, 23, 42, 0.06);
}

.stat-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 9999px;
    background: #f1f5f9;
    padding: 0.65rem 0.95rem;
}

.card-hover {
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        border-color 0.2s ease,
        background-color 0.2s ease;
}

.card-hover:hover {
    transform: translateY(-3px);
    box-shadow: 0 20px 38px rgba(15, 23, 42, 0.08);
    border-color: rgba(99, 102, 241, 0.2);
}

.tool-shell {
    border: 1px solid rgb(226, 232, 240);
    border-radius: 1.5rem;
    background: white;
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.05);
}

.tool-input,
.tool-textarea,
.tool-select {
    width: 100%;
    border-radius: 1rem;
    border: 1px solid rgb(203, 213, 225);
    background: white;
    padding: 0.95rem 1rem;
    font-size: 0.95rem;
    color: rgb(15, 23, 42);
    transition:
        border-color 0.15s ease,
        box-shadow 0.15s ease,
        background-color 0.15s ease;
}

.tool-input::placeholder,
.tool-textarea::placeholder {
    color: rgb(100, 116, 139);
}

.tool-input:focus,
.tool-textarea:focus,
.tool-select:focus,
select:focus,
textarea:focus,
input:focus {
    outline: none;
    border-color: rgb(99, 102, 241);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.12);
}

.tool-textarea {
    min-height: 10rem;
    resize: vertical;
}

.tool-button,
.tool-button-secondary,
.category-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 9999px;
    padding: 0.8rem 1.1rem;
    font-size: 0.92rem;
    font-weight: 700;
    transition:
        transform 0.15s ease,
        background-color 0.15s ease,
        border-color 0.15s ease,
        color 0.15s ease,
        box-shadow 0.15s ease;
}

.tool-button:hover,
.tool-button-secondary:hover,
.category-tab:hover {
    transform: translateY(-1px);
}

.tool-button {
    background: #2563eb;
    color: #ffffff;
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.12);
}

.tool-button-secondary,
.category-tab {
    border: 1px solid rgb(203, 213, 225);
    background: #fff;
    color: rgb(51, 65, 85);
}

.category-tab.is-active {
    border-color: rgb(79, 70, 229);
    background: rgb(79, 70, 229);
    color: white;
    box-shadow: 0 10px 22px rgba(79, 70, 229, 0.16);
}

.result-card,
.metric-card {
    border-radius: 1.25rem;
    border: 1px solid rgb(226, 232, 240);
    background: rgb(248, 250, 252);
    padding: 1rem;
}

.result-card strong,
.metric-card strong {
    display: block;
    margin-top: 0.5rem;
    font-size: 1.05rem;
    line-height: 1.5rem;
    color: rgb(15, 23, 42);
    word-break: break-word;
}

.result-label,
.metric-card span {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: rgb(71, 85, 105);
}

.tool-card {
    display: flex;
    min-height: 100%;
    flex-direction: column;
    border-radius: 1.35rem;
    border: 1px solid rgba(226, 232, 240, 1);
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04);
}

.tool-card h3 {
    line-height: 1.18;
}

.tool-card p:last-of-type {
    flex-grow: 1;
}

.mini-tool-card {
    display: block;
}

.mini-tool-icon {
    display: inline-flex;
}

.tool-icon-badge {
    display: inline-flex;
    height: 3rem;
    width: 3rem;
    min-width: 3rem;
    align-items: center;
    justify-content: center;
    border-radius: 0.95rem;
    box-shadow: none;
    border: 1px solid #dbeafe;
}

.tool-icon-badge i {
    font-size: 1.15rem;
}

.tool-icon--math {
    background: #eff6ff;
    color: #1d4ed8;
}

.tool-icon--text {
    background: #eff6ff;
    color: #1d4ed8;
}

.tool-icon--images-design {
    background: #eff6ff;
    color: #1d4ed8;
}

.tool-icon--games {
    background: #eff6ff;
    color: #1d4ed8;
}

.tool-icon--business-time {
    background: #eff6ff;
    color: #1d4ed8;
}

.quick-link-card {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    border: 1px solid rgba(226, 232, 240, 1);
    border-radius: 1rem;
    background: #ffffff;
    padding: 0.95rem 1rem;
    color: #0f172a;
    transition:
        transform 0.18s ease,
        background-color 0.18s ease,
        border-color 0.18s ease,
        box-shadow 0.18s ease;
}

.quick-link-card:hover {
    transform: translateY(-2px);
    border-color: rgba(99, 102, 241, 0.2);
    background: #f8fafc;
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.06);
}

.quick-link-card .tool-icon-badge {
    height: 2.6rem;
    width: 2.6rem;
    min-width: 2.6rem;
}

.quick-link-text {
    display: block;
    font-size: 0.95rem;
    font-weight: 800;
    line-height: 1.35;
    color: #0f172a;
}

.category-overview-card {
    display: block;
    width: 100%;
    text-align: left;
    border: 1px solid rgba(226, 232, 240, 1);
    border-radius: 1.35rem;
    background: #ffffff;
    padding: 1.25rem;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04);
    transition:
        transform 0.18s ease,
        box-shadow 0.18s ease,
        border-color 0.18s ease,
        background-color 0.18s ease;
}

.category-overview-card:hover {
    transform: translateY(-2px);
    border-color: rgba(99, 102, 241, 0.22);
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.07);
    background: #ffffff;
}

.category-overview-label {
    display: block;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #475569;
}

.category-overview-count {
    display: block;
    margin-top: 0.65rem;
    font-size: 2rem;
    line-height: 1;
    font-weight: 900;
    color: #0f172a;
}

.category-overview-meta {
    display: block;
    margin-top: 0.35rem;
    font-size: 0.84rem;
    font-weight: 700;
    color: #4f46e5;
}

.category-overview-copy {
    margin-top: 0.85rem;
    font-size: 0.92rem;
    line-height: 1.65;
    color: #475569;
}

.prose-tool p {
    line-height: 1.8;
}

.prose-tool ol {
    padding-left: 1.25rem;
}

.prose-tool li + li {
    margin-top: 0.75rem;
}

.faq-item + .faq-item {
    margin-top: 1rem;
}

.faq-item summary {
    cursor: pointer;
    list-style: none;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.copy-flash {
    animation: flashCopy 1.2s ease;
}

.signature-canvas {
    touch-action: none;
    cursor: crosshair;
    border: 1px dashed rgb(203, 213, 225);
}

.tool-card.is-hidden,
.is-hidden {
    display: none !important;
}

.hub-filter-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 9999px;
    border: 1px solid #cbd5e1;
    background: #ffffff;
    padding: 0.8rem 1rem;
    font-size: 0.84rem;
    font-weight: 800;
    color: #475569;
    transition:
        transform 0.15s ease,
        border-color 0.15s ease,
        background-color 0.15s ease,
        color 0.15s ease,
        box-shadow 0.15s ease;
}

.hub-filter-btn:hover {
    transform: translateY(-1px);
    border-color: #60a5fa;
    background: #ffffff;
    color: #0f172a;
}

.hub-filter-btn.is-active {
    border-color: #2563eb;
    background: #2563eb;
    color: #ffffff;
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.12);
}

.hub-tool-card .tool-icon-badge {
    height: 3rem;
    width: 3rem;
    min-width: 3rem;
    border: 1px solid #dbeafe;
    box-shadow: none;
}

.calc-key {
    min-height: 3rem;
}

@keyframes flashCopy {
    0% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4);
    }
    100% {
        box-shadow: 0 0 0 12px rgba(16, 185, 129, 0);
    }
}

.site-footer {
    background: #ffffff;
}

.site-footer-brand p,
.site-footer-list a,
.site-footer-bottom,
.site-footer-bottom a {
    color: #475569;
}

.site-footer-title {
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #0f172a;
}

.site-footer-list {
    margin-top: 1rem;
    display: grid;
    gap: 0.75rem;
    font-size: 0.95rem;
}

.site-footer-list a {
    transition: color 0.15s ease;
}

.site-footer-list a:hover,
.site-footer-bottom a:hover {
    color: #4338ca;
}

.site-footer-pills {
    margin-top: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.site-footer-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    border-radius: 9999px;
    border: 1px solid rgba(203, 213, 225, 1);
    background: #ffffff;
    padding: 0.55rem 0.85rem;
    font-size: 0.84rem;
    font-weight: 700;
    color: #334155;
}

@media (max-width: 640px) {
    .site-logo {
        max-width: 150px;
    }

    .site-nav-pill {
        min-height: 2.2rem;
        padding: 0.58rem 0.7rem;
        font-size: 0.8rem;
    }

    .nav-label-home {
        display: none;
    }

    .tool-shell {
        border-radius: 1.2rem;
    }

    .category-tab {
        padding-inline: 0.9rem;
        font-size: 0.84rem;
    }

    .tool-icon-badge {
        height: 2.85rem;
        width: 2.85rem;
        min-width: 2.85rem;
    }
}
