:root {
    color-scheme: light;
    --bg: #f5f7fb;
    --bg-elevated: #ffffff;
    --surface: rgba(255, 255, 255, 0.84);
    --surface-strong: #ffffff;
    --surface-soft: #eef3f9;
    --border: rgba(15, 23, 42, 0.11);
    --border-strong: rgba(15, 23, 42, 0.18);
    --text: #122033;
    --text-soft: #334155;
    --muted: #64748b;
    --primary: #0f78ff;
    --primary-strong: #005fd7;
    --primary-soft: rgba(15, 120, 255, 0.10);
    --secondary: #6d5dfc;
    --success: #0a9b6c;
    --warning: #c47a08;
    --danger: #dc4c64;
    --shadow-sm: 0 10px 28px rgba(15, 23, 42, 0.07);
    --shadow-lg: 0 28px 80px rgba(15, 23, 42, 0.12);
    --header-bg: rgba(245, 247, 251, 0.78);
    --grid-line: rgba(15, 23, 42, 0.035);
    --hero-a: rgba(15, 120, 255, 0.16);
    --hero-b: rgba(109, 93, 252, 0.12);
    --radius-sm: 12px;
    --radius-md: 18px;
    --radius-lg: 28px;
    --page-width: 1160px;
}

html[data-theme="dark"] {
    color-scheme: dark;
    --bg: #07111f;
    --bg-elevated: #0b1728;
    --surface: rgba(13, 27, 46, 0.84);
    --surface-strong: #102238;
    --surface-soft: #0d1d31;
    --border: rgba(148, 163, 184, 0.18);
    --border-strong: rgba(148, 163, 184, 0.30);
    --text: #eef6ff;
    --text-soft: #c6d4e4;
    --muted: #98abc2;
    --primary: #56b1ff;
    --primary-strong: #88cbff;
    --primary-soft: rgba(70, 167, 255, 0.13);
    --secondary: #8c81ff;
    --success: #34d399;
    --warning: #f4b860;
    --danger: #fb7185;
    --shadow-sm: 0 14px 36px rgba(0, 0, 0, 0.18);
    --shadow-lg: 0 28px 86px rgba(0, 0, 0, 0.36);
    --header-bg: rgba(7, 17, 31, 0.78);
    --grid-line: rgba(255, 255, 255, 0.035);
    --hero-a: rgba(70, 167, 255, 0.18);
    --hero-b: rgba(109, 93, 252, 0.16);
}

* { box-sizing: border-box; }

html {
    min-height: 100%;
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    margin: 0;
    color: var(--text);
    font-family: Inter, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background:
        radial-gradient(circle at 12% -4%, var(--hero-a), transparent 34rem),
        radial-gradient(circle at 92% 8%, var(--hero-b), transparent 31rem),
        var(--bg);
    transition: background-color .25s ease, color .25s ease;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    opacity: .72;
    background-image:
        linear-gradient(var(--grid-line) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
    background-size: 42px 42px;
    mask-image: linear-gradient(to bottom, #000, transparent 82%);
}

button, input, textarea, select { font: inherit; }
button { color: inherit; }
a { color: inherit; }

.page-shell {
    width: min(var(--page-width), calc(100% - 32px));
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 40;
    border-bottom: 1px solid transparent;
    background: var(--header-bg);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    transition: border-color .2s ease, background .2s ease;
}

.site-header.is-scrolled { border-color: var(--border); }

.header-inner {
    min-height: 74px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.brand {
    min-width: 0;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--text);
    text-decoration: none;
    font-weight: 850;
    letter-spacing: -0.025em;
}

.brand-mark {
    width: 42px;
    height: 42px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    color: #fff;
    border-radius: 13px;
    background: linear-gradient(135deg, #1e9cff, #6d5dfc);
    box-shadow: 0 12px 30px rgba(47, 132, 255, .26);
}

.brand-name {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

.utility-button,
.language-switch {
    min-height: 42px;
    border: 1px solid var(--border);
    border-radius: 13px;
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}

.utility-button {
    min-width: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 13px;
    cursor: pointer;
    transition: transform .18s ease, border-color .18s ease, background .18s ease;
}

.utility-button:hover,
.language-switch:hover {
    border-color: var(--border-strong);
    transform: translateY(-1px);
}

.utility-label { font-size: .82rem; font-weight: 750; }

.language-switch {
    display: inline-flex;
    align-items: center;
    padding: 3px;
}

.language-button {
    min-width: 38px;
    min-height: 34px;
    padding: 0 10px;
    border: 0;
    border-radius: 10px;
    color: var(--muted);
    background: transparent;
    cursor: pointer;
    font-size: .76rem;
    font-weight: 850;
    letter-spacing: .05em;
    transition: color .18s ease, background .18s ease, box-shadow .18s ease;
}

.language-button.is-active {
    color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    box-shadow: 0 8px 20px rgba(47, 132, 255, .24);
}

main { padding: 30px 0 0; }

.hero-panel {
    position: relative;
    overflow: hidden;
    padding: clamp(42px, 7vw, 78px) clamp(24px, 6vw, 66px);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background:
        linear-gradient(145deg, var(--surface), color-mix(in srgb, var(--surface-strong) 92%, transparent));
    box-shadow: var(--shadow-lg);
}

.hero-panel::after {
    content: "";
    position: absolute;
    width: 370px;
    height: 370px;
    top: -185px;
    right: -110px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(63, 174, 255, .38), rgba(109, 93, 252, .14));
    filter: blur(7px);
}

.eyebrow {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    padding: 8px 12px;
    color: var(--primary-strong);
    font-size: .76rem;
    font-weight: 850;
    letter-spacing: .08em;
    text-transform: uppercase;
    border: 1px solid color-mix(in srgb, var(--primary) 28%, transparent);
    border-radius: 999px;
    background: var(--primary-soft);
}

.hero-title {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0;
    font-size: clamp(2.3rem, 6vw, 4.55rem);
    line-height: 1.04;
    letter-spacing: -0.055em;
}

.gradient-text {
    background: linear-gradient(90deg, #1997ff, #7465ff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

html[data-theme="dark"] .gradient-text {
    background-image: linear-gradient(90deg, #8ad4ff, #9b92ff);
}

.hero-copy {
    position: relative;
    z-index: 1;
    max-width: 680px;
    margin: 22px 0 0;
    color: var(--muted);
    font-size: clamp(1rem, 2vw, 1.14rem);
    line-height: 1.76;
}

.feature-row {
    position: relative;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 12px 22px;
    margin-top: 28px;
    color: var(--text-soft);
    font-size: .88rem;
}

.feature-row span { display: inline-flex; align-items: center; gap: 8px; }
.feature-row i { color: var(--success); }

.section-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 20px;
    margin: 46px 2px 20px;
}

.section-head h2 {
    margin: 0;
    font-size: clamp(1.48rem, 3vw, 2.04rem);
    letter-spacing: -.035em;
}

.section-head p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: .92rem;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.tool-card {
    position: relative;
    min-height: 240px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    overflow: hidden;
    padding: 28px;
    color: var(--text);
    text-decoration: none;
    border: 1px solid var(--border);
    border-radius: 22px;
    background: linear-gradient(145deg, var(--surface), var(--surface-strong));
    box-shadow: var(--shadow-sm);
    transition: transform .24s ease, border-color .24s ease, box-shadow .24s ease;
}

.tool-card::after {
    content: "";
    position: absolute;
    width: 155px;
    height: 155px;
    right: -68px;
    bottom: -82px;
    border-radius: 50%;
    background: var(--glow, rgba(70,167,255,.16));
}

.tool-card:hover {
    transform: translateY(-6px);
    border-color: color-mix(in srgb, var(--accent, var(--primary)) 52%, var(--border));
    box-shadow: var(--shadow-lg);
}

.card-top {
    width: 100%;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.icon-box {
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    color: var(--accent, var(--primary));
    font-size: 24px;
    border: 1px solid var(--border);
    border-radius: 17px;
    background: color-mix(in srgb, var(--surface-soft) 72%, transparent);
}

.badge {
    padding: 6px 9px;
    color: var(--success);
    font-size: .65rem;
    font-weight: 850;
    letter-spacing: .08em;
    border: 1px solid color-mix(in srgb, var(--success) 28%, transparent);
    border-radius: 999px;
    background: color-mix(in srgb, var(--success) 10%, transparent);
}

.tool-card h3 {
    margin: 25px 0 10px;
    font-size: 1.3rem;
    letter-spacing: -.025em;
}

.tool-card p {
    margin: 0;
    color: var(--muted);
    font-size: .93rem;
    line-height: 1.68;
}

.card-action {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: auto;
    padding-top: 24px;
    color: var(--primary-strong);
    font-size: .86rem;
    font-weight: 800;
}

.content-layout {
    width: min(900px, 100%);
    margin: 0 auto;
}

.page-card {
    overflow: hidden;
    padding: clamp(28px, 6vw, 54px);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: linear-gradient(145deg, var(--surface), var(--surface-strong));
    box-shadow: var(--shadow-lg);
}

.page-card-header {
    padding-bottom: 28px;
    margin-bottom: 30px;
    border-bottom: 1px solid var(--border);
}

.page-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    color: var(--primary-strong);
    font-size: .77rem;
    font-weight: 850;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.page-card h1 {
    margin: 0;
    font-size: clamp(2rem, 5vw, 3.2rem);
    line-height: 1.08;
    letter-spacing: -.045em;
}

.page-intro {
    max-width: 700px;
    margin: 16px 0 0;
    color: var(--muted);
    font-size: 1.04rem;
    line-height: 1.75;
}

.content-section + .content-section { margin-top: 32px; }

.content-section h2,
.content-section h3 {
    margin: 0 0 12px;
    color: var(--text);
    letter-spacing: -.025em;
}

.content-section h2 { font-size: 1.34rem; }
.content-section h3 { font-size: 1.17rem; }

.content-section p,
.content-section li {
    color: var(--muted);
    font-size: 1rem;
    line-height: 1.78;
}

.content-section p { margin: 0 0 14px; }
.content-section ul { margin: 0; padding-left: 22px; }
.content-section li + li { margin-top: 7px; }
.content-section strong { color: var(--text-soft); }

.info-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-top: 20px;
}

.info-card {
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface-soft);
}

.info-card i {
    display: inline-grid;
    width: 38px;
    height: 38px;
    place-items: center;
    margin-bottom: 14px;
    color: var(--primary-strong);
    border-radius: 12px;
    background: var(--primary-soft);
}

.info-card h3 { margin: 0 0 8px; font-size: 1rem; }
.info-card p { margin: 0; font-size: .92rem; }

.action-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-top: 32px;
}

.button-primary,
.button-secondary {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 0 18px;
    text-decoration: none;
    font-size: .9rem;
    font-weight: 800;
    border-radius: 13px;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.button-primary {
    color: #fff;
    border: 1px solid transparent;
    background: linear-gradient(135deg, #168cff, #6658ee);
    box-shadow: 0 12px 28px rgba(51, 113, 245, .25);
}

.button-secondary {
    color: var(--text-soft);
    border: 1px solid var(--border);
    background: var(--surface-soft);
}

.button-primary:hover,
.button-secondary:hover { transform: translateY(-2px); }
.button-secondary:hover { border-color: var(--border-strong); }

.site-footer {
    margin-top: 54px;
    padding: 30px 0 26px;
    color: var(--muted);
    text-align: center;
    font-size: .86rem;
}

.footer-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px 22px;
    margin-bottom: 14px;
}

.site-footer a {
    color: var(--text-soft);
    text-decoration: none;
    font-weight: 700;
}

.site-footer a:hover { color: var(--primary-strong); }

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

@media (max-width: 760px) {
    .page-shell { width: min(100% - 24px, var(--page-width)); }
    .header-inner { min-height: 66px; }
    .brand-name { max-width: 150px; }
    .utility-label { display: none; }
    .utility-button { padding: 0 12px; }
    main { padding-top: 18px; }
    .hero-panel { border-radius: 23px; }
    .tools-grid { grid-template-columns: 1fr; }
    .section-head { align-items: flex-start; flex-direction: column; }
    .info-grid { grid-template-columns: 1fr; }
    .page-card { border-radius: 23px; }
}

@media (max-width: 420px) {
    .brand-name { max-width: 118px; font-size: .93rem; }
    .header-actions { gap: 7px; }
    .language-button { min-width: 34px; padding: 0 8px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        scroll-behavior: auto !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}
