@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
    --site-bg: #f8fafc;
    --site-surface: #ffffff;
    --site-surface-soft: #eff6ff;
    --site-text: #0f172a;
    --site-muted: #64748b;
    --site-border: #e2e8f0;
    --site-blue: #2563eb;
    --site-blue-dark: #1d4ed8;
    --site-blue-soft: #dbeafe;
    --site-danger: #dc2626;
    --site-success: #15803d;
    --site-shadow: 0 24px 60px rgba(15, 23, 42, 0.10);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    min-height: 100vh;
    color: var(--site-text);
    background:
        radial-gradient(circle at 18% 0%, rgba(59, 130, 246, 0.13), transparent 34rem),
        var(--site-bg);
    font-family: 'Plus Jakarta Sans', Inter, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

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

.site-container {
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
}

.site-header {
    position: relative;
    z-index: 30;
    background: rgba(255, 255, 255, 0.92);
    border-bottom: 1px solid rgba(226, 232, 240, 0.9);
    backdrop-filter: blur(16px);
}

.site-header__inner {
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.site-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--site-text);
    text-decoration: none;
    font-size: 19px;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.site-brand__mark {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: transparent;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.18);
}
.site-brand__mark img { display: block; width: 100%; height: 100%; }

.site-nav { display: flex; align-items: center; gap: 8px; }

.site-nav__link,
.site-button {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 18px;
    border: 1px solid transparent;
    border-radius: 11px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease, border-color .18s ease;
}

.site-nav__link:hover { background: #f1f5f9; }

.site-button--primary {
    color: #fff;
    background: var(--site-blue);
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.22);
}

.site-button--primary:hover {
    background: var(--site-blue-dark);
    transform: translateY(-1px);
    box-shadow: 0 14px 28px rgba(37, 99, 235, 0.28);
}

.site-button--secondary {
    color: var(--site-text);
    background: #fff;
    border-color: var(--site-border);
}

.site-button--secondary:hover { border-color: #94a3b8; background: #f8fafc; }

.site-button--wide { width: 100%; }

.site-main { min-height: calc(100vh - 146px); }

.site-footer {
    padding: 28px 0 34px;
    color: var(--site-muted);
    font-size: 13px;
}

.site-footer__inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding-top: 22px;
    border-top: 1px solid var(--site-border);
}

.site-footer__links { display: flex; flex-wrap: wrap; gap: 16px; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--site-blue); }

.auth-layout {
    width: min(1020px, calc(100% - 40px));
    margin: 0 auto;
    padding: 64px 0 72px;
    display: grid;
    grid-template-columns: minmax(0, .88fr) minmax(420px, 1.12fr);
    gap: 64px;
    align-items: start;
}

.auth-intro { padding: 46px 0 0; position: sticky; top: 24px; }

.auth-eyebrow,
.site-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    padding: 7px 11px;
    border: 1px solid #bfdbfe;
    border-radius: 999px;
    color: var(--site-blue-dark);
    background: rgba(239, 246, 255, .88);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.auth-intro h1,
.page-hero h1 {
    margin: 0 0 18px;
    color: var(--site-text);
    font-size: clamp(34px, 5vw, 54px);
    line-height: 1.05;
    letter-spacing: -0.055em;
}

.auth-intro p,
.page-hero p {
    margin: 0;
    color: var(--site-muted);
    font-size: 17px;
    line-height: 1.75;
}

.auth-benefits {
    margin: 32px 0 0;
    padding: 0;
    display: grid;
    gap: 14px;
    list-style: none;
}

.auth-benefits li {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    color: #334155;
    line-height: 1.55;
}

.auth-benefits li::before {
    content: '✓';
    flex: 0 0 24px;
    width: 24px;
    height: 24px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: var(--site-blue-dark);
    background: var(--site-blue-soft);
    font-size: 13px;
    font-weight: 900;
}

.auth-card,
.document-card,
.error-card {
    background: rgba(255, 255, 255, .97);
    border: 1px solid var(--site-border);
    border-radius: 22px;
    box-shadow: var(--site-shadow);
}

.auth-card { padding: 38px; }

.auth-card__header { margin-bottom: 28px; }
.auth-card__header h2 { margin: 0 0 8px; font-size: 27px; letter-spacing: -.035em; }
.auth-card__header p { margin: 0; color: var(--site-muted); line-height: 1.6; }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.form-group { margin-bottom: 18px; }
.form-grid .form-group { margin-bottom: 0; }
.form-group--full { grid-column: 1 / -1; }

.form-label {
    display: block;
    margin-bottom: 7px;
    color: #334155;
    font-size: 13px;
    font-weight: 700;
}

.form-optional { color: #94a3b8; font-weight: 500; }
.form-required { color: var(--site-danger); }

.form-control {
    width: 100%;
    min-height: 46px;
    padding: 10px 13px;
    color: var(--site-text);
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    outline: none;
    transition: border-color .16s ease, box-shadow .16s ease, background-color .16s ease;
}

.form-control:focus {
    background: #fff;
    border-color: var(--site-blue);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, .12);
}

.form-hint { display: block; margin-top: 6px; color: var(--site-muted); font-size: 12px; line-height: 1.5; }

.form-error {
    display: none;
    margin-top: 6px;
    color: var(--site-danger);
    font-size: 12px;
    font-weight: 600;
}
.form-error.is-visible { display: block; }

.site-alert {
    margin-bottom: 20px;
    padding: 12px 14px;
    border: 1px solid #fecaca;
    border-radius: 10px;
    color: #991b1b;
    background: #fef2f2;
    font-size: 13px;
    line-height: 1.5;
}
.site-alert--success { color: #166534; border-color: #bbf7d0; background: #f0fdf4; }

.form-check { display: flex; align-items: flex-start; gap: 11px; margin: 20px 0; }
.form-check input { flex: 0 0 auto; width: 18px; height: 18px; margin-top: 2px; accent-color: var(--site-blue); }
.form-check label { color: var(--site-muted); font-size: 12px; line-height: 1.6; }
.form-check a { color: var(--site-blue-dark); font-weight: 700; text-decoration: none; }

.auth-card__footer { margin: 20px 0 0; color: var(--site-muted); text-align: center; font-size: 13px; }
.auth-card__footer a, .text-link { color: var(--site-blue-dark); font-weight: 700; text-decoration: none; }
.auth-card__footer a:hover, .text-link:hover { text-decoration: underline; }

.page-shell { width: min(930px, calc(100% - 40px)); margin: 0 auto; padding: 58px 0 74px; }
.page-hero { max-width: 760px; margin: 0 auto 30px; text-align: center; }
.page-hero h1 { font-size: clamp(34px, 5vw, 48px); }

.document-card { padding: clamp(26px, 5vw, 52px); }
.document-card h2 { margin: 34px 0 13px; font-size: 22px; letter-spacing: -.025em; }
.document-card h2:first-child { margin-top: 0; }
.document-card p, .document-card li { color: #475569; line-height: 1.75; }
.document-card ul { padding-left: 22px; }
.document-meta { color: var(--site-muted); font-size: 13px; }

.error-shell {
    width: min(540px, calc(100% - 40px));
    margin: 0 auto;
    padding: 80px 0;
}
.error-card { padding: 48px; text-align: center; }
.error-code { margin-bottom: 14px; color: var(--site-blue); font-size: 13px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.error-card h1 { margin: 0 0 14px; font-size: 32px; letter-spacing: -.04em; }
.error-card p { margin: 0 0 28px; color: var(--site-muted); line-height: 1.7; }

.breadcrumbs { margin: 0 0 28px; color: var(--site-muted); font-size: 13px; }
.breadcrumbs ol { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 0; padding: 0; list-style: none; }
.breadcrumbs a { color: var(--site-blue-dark); text-decoration: none; }

.seo-page { padding: 52px 0 72px; }
.seo-hero { max-width: 850px; margin: 0 auto 44px; text-align: center; }
.seo-hero h1 { margin: 0 0 18px; font-size: clamp(36px, 6vw, 58px); line-height: 1.06; letter-spacing: -.055em; }
.seo-hero p { max-width: 730px; margin: 0 auto; color: var(--site-muted); font-size: 18px; line-height: 1.7; }
.seo-stats { max-width: 760px; margin: 30px auto 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.seo-stat { padding: 22px 16px; background: #fff; border: 1px solid var(--site-border); border-radius: 16px; box-shadow: 0 8px 24px rgba(15,23,42,.05); }
.seo-stat strong { display: block; margin-bottom: 3px; font-size: 26px; letter-spacing: -.03em; }
.seo-stat span { color: var(--site-muted); font-size: 11px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.seo-stat--dark { color: #fff; background: var(--site-text); border-color: var(--site-text); }
.seo-stat--dark span { color: #94a3b8; }

.seo-content { max-width: 820px; margin: 0 auto; }
.seo-section { margin-top: 34px; }
.seo-section__head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.seo-section h2 { margin: 0; font-size: 24px; letter-spacing: -.035em; }
.seo-section__head span { color: var(--site-muted); font-size: 12px; }
.assignment-list { overflow: hidden; background: #fff; border: 1px solid var(--site-border); border-radius: 19px; box-shadow: 0 16px 46px rgba(15,23,42,.08); }
.assignment-card { position: relative; padding: 22px 24px; border-bottom: 1px solid #f1f5f9; transition: background-color .16s ease; }
.assignment-card:last-child { border-bottom: 0; }
.assignment-card:hover { background: #f8fafc; }
.assignment-card h3 { margin: 0 120px 9px 0; font-size: 17px; line-height: 1.4; }
.assignment-card__date { position: absolute; top: 22px; right: 24px; padding: 5px 8px; border-radius: 999px; color: #475569; background: #f1f5f9; font-size: 11px; font-weight: 700; }
.assignment-card__meta { display: flex; flex-wrap: wrap; gap: 8px 18px; color: var(--site-muted); font-size: 13px; }
.assignment-card__link { position: absolute; inset: 0; }
.assignment-list__cta { padding: 28px; border-top: 1px solid var(--site-border); background: #f8fafc; text-align: center; }
.assignment-list__cta p { margin: 0 0 16px; color: var(--site-muted); }
.empty-state { padding: 44px 24px; text-align: center; }
.empty-state h3 { margin: 0 0 8px; }
.empty-state p { max-width: 560px; margin: 0 auto; color: var(--site-muted); line-height: 1.65; }

.info-card { padding: 27px; background: #fff; border: 1px solid var(--site-border); border-radius: 17px; }
.info-card p { margin: 0; color: var(--site-muted); line-height: 1.75; }
.tag-list, .link-cloud { display: flex; flex-wrap: wrap; gap: 9px; margin: 18px 0 0; padding: 0; list-style: none; }
.tag, .link-pill { padding: 8px 11px; border: 1px solid #bfdbfe; border-radius: 999px; color: #1e40af; background: #eff6ff; font-size: 12px; font-weight: 600; text-decoration: none; }
.link-pill { color: #475569; background: #fff; border-color: var(--site-border); }
.link-pill:hover { color: var(--site-blue-dark); border-color: #93c5fd; }
.step-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.step-card { padding: 21px; background: #fff; border: 1px solid var(--site-border); border-radius: 15px; }
.step-card strong { display: block; margin-bottom: 7px; }
.step-card p { margin: 0; color: var(--site-muted); font-size: 13px; line-height: 1.65; }

.ai-page { padding: 46px 0 76px; }
.ai-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr);
    gap: 48px;
    align-items: center;
    padding: clamp(32px, 5vw, 58px);
    color: #f8fafc;
    background: linear-gradient(135deg, #0f172a 0%, #163d32 58%, #245e4a 100%);
    border-radius: 28px;
    box-shadow: 0 28px 70px rgba(15, 23, 42, .2);
}
.ai-hero .site-eyebrow { color: #d9f99d; background: rgba(15, 23, 42, .3); border-color: rgba(217, 249, 157, .35); }
.ai-hero h1 { margin: 0 0 18px; font-size: clamp(38px, 6vw, 66px); line-height: 1; letter-spacing: -.06em; }
.ai-hero p { max-width: 720px; margin: 0; color: #dbe7e2; font-size: 18px; line-height: 1.7; }
.ai-hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.ai-hero .site-button--primary { color: #11231d; background: #d9f99d; box-shadow: none; }
.ai-hero .site-button--primary:hover { background: #ecfccb; }
.ai-hero .site-button--secondary { color: #fff; background: transparent; border-color: rgba(255,255,255,.35); }
.ai-kpis { display: grid; gap: 12px; margin: 0; }
.ai-kpis div { padding: 18px 20px; background: rgba(255,255,255,.09); border: 1px solid rgba(255,255,255,.14); border-radius: 16px; }
.ai-kpis dt { color: #bad0c7; font-size: 11px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.ai-kpis dd { margin: 7px 0 0; color: #fff; font-size: 30px; font-weight: 800; letter-spacing: -.04em; }
.ai-kpis .ai-kpis__date { font-size: 18px; letter-spacing: -.02em; }
.ai-city-strip { margin-top: 24px; padding: 22px 24px; background: #fff; border: 1px solid var(--site-border); border-radius: 18px; }
.ai-city-strip h2 { margin: 0 0 14px; font-size: 15px; }
.ai-city-strip ul { display: flex; flex-wrap: wrap; gap: 9px; margin: 0; padding: 0; list-style: none; }
.ai-city-strip li { display: inline-flex; gap: 8px; align-items: center; padding: 8px 11px; color: #334155; background: #f8fafc; border-radius: 999px; font-size: 12px; }
.ai-city-strip strong { color: #166534; }
.ai-layout { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 28px; align-items: start; margin-top: 44px; }
.ai-results .seo-section__head { align-items: flex-end; }
.ai-results .site-eyebrow { margin-bottom: 10px; }
.ai-assignment-grid { display: grid; gap: 14px; }
.ai-assignment-card { padding: 24px; background: #fff; border: 1px solid var(--site-border); border-radius: 18px; box-shadow: 0 12px 34px rgba(15,23,42,.055); }
.ai-assignment-card__top { display: flex; justify-content: space-between; gap: 14px; align-items: center; color: var(--site-muted); font-size: 11px; }
.ai-assignment-card__type { color: #166534; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.ai-assignment-card h3 { margin: 11px 0 10px; font-size: 21px; line-height: 1.35; letter-spacing: -.025em; }
.ai-assignment-card h3 a { text-decoration: none; }
.ai-assignment-card h3 a:hover { color: #166534; }
.ai-assignment-card__meta { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 0; padding: 0; color: var(--site-muted); font-size: 13px; list-style: none; }
.ai-assignment-card > p { display: -webkit-box; overflow: hidden; margin: 16px 0 0; color: #475569; line-height: 1.68; -webkit-line-clamp: 5; -webkit-box-orient: vertical; }
.ai-assignment-card .tag-list { margin-top: 15px; }
.ai-assignment-card__cta { display: inline-flex; gap: 8px; align-items: center; margin-top: 18px; color: #166534; font-size: 13px; font-weight: 800; text-decoration: none; }
.ai-guide { position: sticky; top: 24px; display: grid; gap: 14px; }
.ai-guide section { padding: 23px; background: #fff; border: 1px solid var(--site-border); border-radius: 17px; }
.ai-guide .site-eyebrow { margin-bottom: 12px; }
.ai-guide h2 { margin: 0 0 10px; font-size: 18px; letter-spacing: -.025em; }
.ai-guide p, .ai-guide li { color: var(--site-muted); font-size: 13px; line-height: 1.65; }
.ai-guide p { margin: 0; }
.ai-checklist { display: grid; gap: 9px; margin: 0; padding: 0; list-style: none; }
.ai-checklist li { position: relative; padding-left: 22px; }
.ai-checklist li::before { content: '✓'; position: absolute; left: 0; color: #15803d; font-weight: 900; }
.ai-empty { background: #fff; border: 1px solid var(--site-border); border-radius: 18px; }
.ai-empty .site-button { margin-top: 20px; }
.ai-faq { max-width: 820px; margin: 54px auto 0; }
.ai-faq h2 { margin: 0 0 18px; font-size: 30px; letter-spacing: -.04em; }
.ai-faq details { margin-top: 10px; padding: 19px 21px; background: #fff; border: 1px solid var(--site-border); border-radius: 14px; }
.ai-faq summary { cursor: pointer; font-weight: 800; }
.ai-faq details p { margin: 12px 0 0; color: var(--site-muted); line-height: 1.7; }

@media (max-width: 820px) {
    .auth-layout { grid-template-columns: 1fr; gap: 28px; padding-top: 38px; }
    .auth-intro { position: static; padding: 0; text-align: center; }
    .auth-benefits { max-width: 520px; margin-left: auto; margin-right: auto; text-align: left; }
    .step-grid { grid-template-columns: 1fr; }
    .ai-hero, .ai-layout { grid-template-columns: 1fr; }
    .ai-guide { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ai-guide section:first-child { grid-column: 1 / -1; }
}

@media (max-width: 620px) {
    .site-container, .auth-layout, .page-shell, .error-shell { width: min(100% - 28px, 1180px); }
    .site-header__inner { min-height: 64px; }
    .site-brand { min-width: 0; flex: 0 1 auto; font-size: 17px; white-space: nowrap; }
    .site-brand__mark { width: 34px; height: 34px; font-size: 18px; }
    .site-nav__link { display: none; }
    .site-nav .site-button { min-height: 38px; flex: 0 0 auto; padding: 0 13px; font-size: 12px; white-space: nowrap; }
    .auth-layout { width: calc(100% - 24px); padding: 30px 0 48px; }
    .auth-intro h1 { font-size: 34px; }
    .auth-intro p { font-size: 15px; }
    .auth-benefits { display: none; }
    .auth-card { padding: 24px 20px; border-radius: 18px; }
    .form-grid { grid-template-columns: 1fr; gap: 0; }
    .form-grid .form-group { margin-bottom: 18px; }
    .site-footer__inner { flex-direction: column; align-items: flex-start; }
    .page-shell { padding-top: 38px; }
    .document-card, .error-card { padding: 28px 22px; }
    .seo-page { padding-top: 34px; }
    .seo-hero h1 { font-size: 36px; }
    .seo-hero p { font-size: 15px; }
    .seo-stats { grid-template-columns: 1fr 1fr; }
    .seo-stat--dark { grid-column: 1 / -1; }
    .assignment-card h3 { margin-right: 0; padding-top: 30px; }
    .assignment-card__date { left: 24px; right: auto; top: 18px; }
    .seo-section__head { align-items: flex-start; flex-direction: column; gap: 5px; }
    .ai-page { padding-top: 24px; }
    .ai-hero { gap: 28px; padding: 30px 22px; border-radius: 21px; }
    .ai-hero h1 { font-size: 40px; }
    .ai-hero p { font-size: 15px; }
    .ai-hero__actions { display: grid; }
    .ai-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ai-kpis div:last-child { grid-column: 1 / -1; }
    .ai-kpis dd { font-size: 25px; }
    .ai-layout { margin-top: 34px; }
    .ai-guide { grid-template-columns: 1fr; }
    .ai-guide section:first-child { grid-column: auto; }
    .ai-assignment-card { padding: 20px; }
    .ai-assignment-card__top { align-items: flex-start; }
}
