:root {
    --bg: #f4f7fb;
    --surface: #ffffff;
    --surface-soft: #eef3ff;
    --text: #0f1d32;
    --muted: #5f6f85;
    --line: #d6e0ee;
    --accent: #1463ff;
    --accent-2: #0fb8ad;
    --accent-dark: #0a3ec9;
    --shadow: 0 20px 40px rgba(15, 29, 50, 0.12);
    --shadow-soft: 0 10px 26px rgba(20, 99, 255, 0.12);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    color: var(--text);
    line-height: 1.6;
    background:
        radial-gradient(circle at 12% 8%, rgba(20, 99, 255, 0.14), transparent 28%),
        radial-gradient(circle at 88% 6%, rgba(15, 184, 173, 0.17), transparent 30%),
        linear-gradient(180deg, #f9fbff 0%, var(--bg) 100%);
}

a {
    color: inherit;
    text-decoration: none;
}

.container {
    width: min(1120px, calc(100% - 2rem));
    margin: 0 auto;
}

.site-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.main-content {
    flex: 1;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    backdrop-filter: blur(16px);
    background: rgba(248, 251, 255, 0.86);
    border-bottom: 1px solid rgba(214, 224, 238, 0.65);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1rem 0;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.9rem;
}

.brand-logo {
    width: 40px;
    max-width: 45vw;
    height: auto;
    display: block;
    filter: drop-shadow(0 8px 14px rgba(20, 99, 255, 0.25));
}

.brand-text {
    display: flex;
    flex-direction: column;
}

.brand-text small,
.trust-bar,
.meta,
.eyebrow,
.section-heading p,
.page-header p,
.hero p,
.hero-card li,
.guide-header p,
.footer-grid p,
.footer-grid a {
    color: var(--muted);
}

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

.nav a {
    font-weight: 600;
    transition: transform 0.2s ease, color 0.2s ease;
}

.nav a:hover {
    transform: translateY(-1px);
    color: var(--accent-dark);
}

.nav .nav-ai {
    background: linear-gradient(135deg, var(--accent), #2f7dff);
    color: white;
    padding: 0.38rem 0.8rem;
    border-radius: 999px;
    box-shadow: 0 10px 24px rgba(20, 99, 255, 0.3);
}

.trust-bar {
    border-top: 1px solid rgba(214, 224, 238, 0.8);
    background: linear-gradient(90deg, rgba(232, 240, 255, 0.9), rgba(232, 251, 248, 0.9));
    font-size: 0.93rem;
    padding: 0.65rem 0;
}

.hero {
    padding: 4rem 0 2rem;
}

.ai-help-hero {
    padding: 3rem 0 1.25rem;
    background:
        linear-gradient(135deg, rgba(20, 99, 255, 0.11), rgba(244, 247, 251, 0.18)),
        radial-gradient(circle at 85% 10%, rgba(15, 184, 173, 0.16), transparent 28%);
}

.hero-inner {
    display: grid;
    grid-template-columns: 1.5fr 0.85fr;
    gap: 1.5rem;
    align-items: stretch;
}

.ai-help-layout {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 1.5rem;
    align-items: start;
}

.ai-help-copy h1 {
    font-size: clamp(2.1rem, 4vw, 3.6rem);
    line-height: 1.1;
    margin: 0.35rem 0 1rem;
}

.ai-help-copy p,
.ai-disclaimer {
    color: var(--muted);
}

.ai-help-tool,
.ai-result,
.notes-box {
    background: var(--surface);
    border: 1px solid rgba(214, 224, 238, 0.85);
    border-radius: 14px;
    box-shadow: var(--shadow-soft);
}

.ai-help-tool,
.ai-result {
    padding: 1.35rem;
}

.ai-help-form {
    display: grid;
    gap: 0.85rem;
}

.ai-help-form label {
    font-weight: 800;
}

.ai-help-form textarea,
.ai-help-form input {
    width: 100%;
    resize: vertical;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 1rem;
    min-height: 46px;
    font: inherit;
    background: #fff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.ai-help-form textarea:focus,
.ai-help-form input:focus,
.search-form input:focus {
    outline: none;
    border-color: rgba(20, 99, 255, 0.55);
    box-shadow: 0 0 0 3px rgba(20, 99, 255, 0.14);
}

.ai-help-form textarea {
    min-height: 160px;
}

.ai-submit {
    width: fit-content;
    gap: 0.5rem;
}

.spinner {
    display: none;
    width: 1rem;
    height: 1rem;
    border: 2px solid rgba(255, 255, 255, 0.45);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.is-loading .spinner {
    display: inline-block;
}

.form-error {
    color: #9f1d1d;
    margin: 0;
    font-weight: 700;
}

.ai-disclaimer {
    margin: 1rem 0 0;
    font-size: 0.95rem;
}

.ai-result-wrap {
    display: grid;
    gap: 1rem;
}

.result-list {
    display: grid;
    gap: 0.7rem;
    padding-left: 1.2rem;
}

.result-list li {
    padding-left: 0.25rem;
}

.notes-box {
    margin-top: 1.25rem;
    padding: 1rem;
    background: var(--surface-soft);
}

.notes-box h2 {
    margin-top: 0;
}

.ai-error {
    border-color: rgba(159, 29, 29, 0.25);
}

.hero h1,
.page-header h1,
.guide-header h1 {
    font-size: clamp(2.2rem, 4vw, 4rem);
    line-height: 1.1;
    margin: 0.35rem 0 1rem;
}

.eyebrow {
    display: inline-block;
    font-size: 0.82rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.hero-actions,
.support-panel {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 0.85rem 1.2rem;
    font-weight: 700;
    border: 1px solid transparent;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.button:hover {
    transform: translateY(-1px);
}

.button-primary {
    background: linear-gradient(135deg, var(--accent), #2f7dff);
    color: white;
    box-shadow: 0 10px 24px rgba(20, 99, 255, 0.28);
}

.button-primary:hover {
    background: linear-gradient(135deg, var(--accent-dark), #1f62e8);
}

.button-secondary {
    background: white;
    border-color: var(--line);
}

.hero-card,
.card,
.list-card,
.guide-card,
.support-panel,
.empty-state {
    background: var(--surface);
    border: 1px solid rgba(214, 224, 238, 0.82);
    border-radius: 24px;
    box-shadow: var(--shadow);
}

.card,
.list-card,
.guide-card,
.hero-card {
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.card:hover,
.list-card:hover,
.guide-card:hover,
.hero-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 24px 44px rgba(15, 29, 50, 0.16);
}

.hero-card {
    padding: 1.5rem;
}

.hero-card ul {
    margin: 0.75rem 0 0;
    padding-left: 1.2rem;
}

.section {
    padding: 2rem 0;
}

.section-muted {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.48), rgba(255, 255, 255, 0));
}

.section-heading {
    margin-bottom: 1rem;
}

.section-heading h2,
.support-panel h2,
.page-header h1,
.guide-header h1 {
    margin: 0;
}

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

.card,
.list-card {
    padding: 1.35rem;
}

.card span {
    display: inline-block;
    margin-top: 1rem;
    font-weight: 700;
    color: var(--accent);
}

.list-card h3,
.list-card h2 {
    margin: 0.35rem 0 0.5rem;
}

.list-card h3 a,
.list-card h2 a {
    color: var(--text);
}

.page-header {
    padding: 3rem 0 1rem;
}

.search-form {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.25rem;
    flex-wrap: wrap;
}

.search-form input {
    min-width: min(100%, 320px);
    padding: 0.9rem 1rem;
    border-radius: 14px;
    border: 1px solid var(--line);
    font: inherit;
    background: white;
}

.guide-inner {
    padding-top: 2.25rem;
}

.guide-header {
    margin-bottom: 1rem;
}

.guide-card {
    padding: 1.5rem;
}

.prose h2 {
    margin-top: 1.5rem;
}

.prose p,
.prose li {
    color: var(--text);
}

.support-panel {
    justify-content: space-between;
    align-items: center;
    padding: 1.4rem 1.5rem;
}

.support-panel.subtle {
    background: rgba(255, 255, 255, 0.7);
}

.site-footer {
    margin-top: 2rem;
    padding: 2rem 0 2.5rem;
    border-top: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(238, 243, 255, 0.85), rgba(235, 247, 252, 0.7));
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 1.5rem;
}

.footer-grid h3,
.footer-grid h4 {
    margin-top: 0;
}

.footer-grid a {
    display: block;
    margin-bottom: 0.35rem;
}

.pagination {
    margin-top: 1rem;
}

.pagination nav[role="navigation"] {
    display: flex;
    justify-content: center;
}

.pagination nav[role="navigation"] > div:first-child {
    display: none;
}

.pagination nav[role="navigation"] > div:last-child {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2rem;
    height: 2rem;
    padding: 0 0.55rem;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: #fff;
    font-size: 0.9rem;
    line-height: 1;
}

.pagination span[aria-current="page"] {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
    font-weight: 700;
}

.pagination svg {
    width: 0.9rem;
    height: 0.9rem;
}

.empty-state {
    padding: 2rem;
    text-align: center;
}

.cookie-banner {
    position: fixed;
    right: 1rem;
    left: 1rem;
    bottom: 1rem;
    z-index: 60;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: var(--shadow);
    padding: 1rem;
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: space-between;
}

.cookie-banner p {
    margin: 0;
    color: var(--muted);
}

.cookie-actions {
    display: flex;
    gap: 0.6rem;
}

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

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.hero-main .eyebrow {
    color: #0a3ec9;
}

.hero-ai-card {
    border: 1px solid rgba(20, 99, 255, 0.24);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(236, 244, 255, 0.95));
}

.hero-ai-card h2 {
    margin-top: 0;
    margin-bottom: 0.8rem;
}

@media (max-width: 900px) {
    .hero-inner,
    .ai-help-layout,
    .card-grid,
    .list-grid,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .header-inner,
    .support-panel {
        flex-direction: column;
        align-items: flex-start;
    }

    .brand-logo {
        width: 36px;
    }

    .nav .nav-ai {
        padding: 0;
        border-radius: 0;
        box-shadow: none;
        background: transparent;
        color: inherit;
    }

    .cookie-banner {
        flex-direction: column;
        align-items: flex-start;
    }
}
