:root {
    --ink: #05141c;
    --ink-soft: #0b2533;
    --text: #0d2634;
    --muted: #526775;
    --line: rgba(6, 18, 26, .12);
    --paper: #f8fbfc;
    --ivory: #fff8ea;
    --brand: #0ea5e9;
    --brand-dark: #05141c;
    --aqua: #7dd3c7;
    --accent: #f3c66d;
    --danger: #b42318;
    --shadow: 0 30px 90px rgba(6, 18, 26, .12);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    color: var(--text);
    background: linear-gradient(180deg, #06131b 0, #06131b 34svh, #f8fbfc 34svh, #fff 100%);
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.6;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
}

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

:focus-visible {
    outline: 3px solid #f97316;
    outline-offset: 4px;
}

.skip-link {
    position: fixed;
    top: 16px;
    left: 16px;
    z-index: 300;
    padding: 10px 14px;
    color: var(--ink);
    border-radius: 999px;
    background: #f97316;
    transform: translateY(-160%);
}

.skip-link:focus {
    transform: translateY(0);
}

.container {
    width: calc(100% - 32px);
    max-width: 1180px;
    margin-inline: auto;
}

.site-header {
    position: fixed;
    top: 14px;
    left: 50%;
    z-index: 90;
    width: calc(100% - 32px);
    max-width: 1180px;
    border: 1px solid rgba(255,255,255,.24);
    border-radius: 999px;
    background: rgba(5, 20, 28, .72);
    box-shadow: 0 22px 90px rgba(0,0,0,.26);
    backdrop-filter: blur(20px) saturate(140%);
    transform: translateX(-50%);
}

.header-inner {
    position: relative;
    display: grid;
    grid-template-columns: auto auto 1fr;
    gap: 14px;
    align-items: center;
    min-height: 62px;
    padding-inline: 12px;
}

.brand {
    display: inline-flex;
    gap: 10px;
    align-items: center;
    color: var(--ivory);
    font-weight: 850;
}

.brand-mark {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    color: var(--ink);
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), #fff6d8);
    box-shadow: 0 0 0 1px rgba(255,255,255,.28), 0 16px 42px rgba(240,201,120,.28);
}

.brand-text {
    white-space: nowrap;
}

.primary-nav,
.language-switch {
    display: flex;
    align-items: center;
}

.primary-nav {
    justify-content: center;
    gap: 3px;
}

.primary-nav a,
.language-switch a {
    color: rgba(255,248,234,.78);
    font-size: .88rem;
    font-weight: 780;
    transition: color .18s ease, background .18s ease;
}

.primary-nav a {
    padding: 10px 13px;
    border-radius: 999px;
}

.primary-nav a:hover,
.primary-nav a:focus,
.primary-nav a[aria-current="page"],
.language-switch a:hover,
.language-switch a:focus,
.language-switch a[aria-current="true"] {
    color: var(--ivory);
    background: rgba(255,255,255,.14);
}

.language-switch {
    justify-self: end;
    gap: 2px;
    padding: 5px;
    border: 1px solid rgba(255,255,255,.16);
    border-radius: 999px;
    background: rgba(255,255,255,.06);
}

.language-switch a {
    min-width: 34px;
    padding: 6px 8px;
    border-radius: 999px;
    text-align: center;
}

.nav-toggle {
    display: inline-grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border: 1px solid rgba(255,255,255,.24);
    border-radius: 50%;
    background: rgba(255,255,255,.08);
}

.nav-toggle span {
    width: 18px;
    height: 2px;
    margin: 2px 0;
    background: var(--ivory);
    transition: transform .18s ease;
}

.nav-open .nav-toggle span:first-child {
    transform: translateY(3px) rotate(45deg);
}

.nav-open .nav-toggle span:last-child {
    transform: translateY(-3px) rotate(-45deg);
}

.audit-hero {
    position: relative;
    min-height: 620px;
    padding: 154px 0 78px;
    color: var(--ivory);
    overflow: hidden;
    isolation: isolate;
    background: #020a0f;
}

.audit-hero::before,
.audit-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.audit-hero::before {
    z-index: -2;
    background:
        radial-gradient(circle at 72% 28%, rgba(14, 165, 233, .26), transparent 24%),
        radial-gradient(circle at 18% 86%, rgba(240, 201, 120, .18), transparent 28%),
        linear-gradient(135deg, #020a0f 0%, #061722 48%, #0d2a38 100%);
}

.audit-hero::after {
    z-index: -1;
    background:
        linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(2,10,15,.88) 0%, rgba(2,10,15,.58) 45%, rgba(2,10,15,.2) 100%),
        linear-gradient(0deg, rgba(2,10,15,.84) 0%, transparent 54%);
    background-size: 72px 72px, 72px 72px, auto, auto;
}

.eyebrow {
    margin-bottom: 12px;
    color: var(--accent);
    font-size: .78rem;
    font-weight: 950;
    letter-spacing: 0;
    text-transform: uppercase;
}

h1 {
    max-width: 860px;
    margin: 0;
    color: var(--ivory);
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(3rem, min(5.25vw, 9vh), 5.55rem);
    font-weight: 760;
    line-height: .9;
    letter-spacing: 0;
    text-shadow: 0 28px 90px rgba(0,0,0,.44);
}

.hero-copy {
    max-width: 650px;
    margin: 22px 0 0;
    color: rgba(255,248,234,.86);
    font-size: 1.18rem;
}

.audit-form {
    padding: 22px;
    border: 1px solid rgba(255,255,255,.22);
    border-radius: 8px;
    background: rgba(255,255,255,.12);
    backdrop-filter: blur(10px);
}

.audit-form .form-label {
    color: #fff;
    font-weight: 700;
}

.audit-form .form-control,
.audit-form .btn {
    min-height: 54px;
    border-radius: 6px;
}

.btn-primary {
    border-color: var(--accent);
    background: linear-gradient(135deg, var(--accent), #fff1bd);
    color: var(--ink);
    font-weight: 900;
    box-shadow: 0 18px 52px rgba(0,0,0,.16);
}

.btn-primary:hover,
.btn-primary:focus {
    border-color: #f2c96c;
    background: linear-gradient(135deg, #f2c96c, #fff5ce);
    color: var(--ink);
}

.form-error {
    min-height: 22px;
    margin-top: 10px;
    color: #ffd7d2;
    font-weight: 650;
}

.progress-band,
.result-error-band,
.report-section {
    padding: 28px 0;
}

.progress-card,
.panel,
.score-tile {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.progress-card {
    display: grid;
    gap: 14px;
    padding: 18px;
}

.progress-card span {
    display: block;
    color: var(--muted);
}

.progress {
    height: 10px;
}

.progress-bar {
    background: var(--brand);
}

.result-error-panel {
    padding: 18px 20px;
    border: 1px solid rgba(180, 35, 24, .28);
    border-left: 4px solid var(--danger);
    border-radius: 8px;
    background: #fff;
    color: var(--ink);
}

.result-error-panel strong {
    display: block;
    margin-bottom: 6px;
    color: var(--danger);
}

.result-error-panel p {
    margin: 0;
    color: var(--muted);
}

.report-top {
    display: flex;
    gap: 28px;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.report-top h2 {
    margin: 0 0 6px;
    font-size: clamp(2rem, 4vw, 3.4rem);
}

#report-url {
    color: var(--brand);
    overflow-wrap: anywhere;
}

.stability-note {
    max-width: 680px;
    margin: 12px 0 0;
    padding: 10px 12px;
    border-left: 4px solid var(--accent);
    border-radius: 6px;
    color: var(--muted);
    background: #fff8ea;
    font-size: .95rem;
}

.report-side {
    display: flex;
    gap: 16px;
    align-items: center;
}

.pdf-download {
    display: inline-flex;
    gap: 9px;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    white-space: nowrap;
}

.pdf-download[hidden] {
    display: none;
}

.pdf-icon {
    display: inline-grid;
    width: 34px;
    height: 26px;
    place-items: center;
    border-radius: 5px;
    color: #fff;
    background: #b42318;
    font-size: .72rem;
    font-weight: 950;
}

.score-dial {
    display: grid;
    min-width: 156px;
    min-height: 156px;
    place-items: center;
    border: 8px solid var(--line);
    border-radius: 50%;
    background: #fff;
}

.score-dial span {
    font-size: 3rem;
    font-weight: 850;
    line-height: 1;
}

.score-dial small {
    margin-top: -32px;
    color: var(--muted);
    font-weight: 700;
}

.good {
    border-color: #16a34a;
}

.medium {
    border-color: #e7b84f;
}

.weak {
    border-color: #d92d20;
}

.unknown {
    border-color: #98a2b3;
}

.score-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}

.score-tile {
    padding: 16px;
}

.score-tile span {
    display: block;
    color: var(--muted);
    font-size: .88rem;
    font-weight: 750;
}

.score-tile strong {
    display: block;
    margin-top: 8px;
    font-size: 2rem;
}

.score-tile small {
    display: block;
    min-height: 18px;
    margin-top: 4px;
    color: var(--muted);
    font-size: .78rem;
    font-weight: 700;
}

.report-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(280px, .75fr);
    gap: 18px;
    margin-bottom: 18px;
}

.panel {
    padding: 22px;
}

.panel h3 {
    margin: 0 0 18px;
    font-size: 1.28rem;
}

.issue {
    padding: 16px 0;
    border-top: 1px solid var(--line);
}

.issue:first-child {
    padding-top: 0;
    border-top: 0;
}

.issue h4 {
    margin: 10px 0 8px;
    font-size: 1rem;
}

.issue p,
.positive-item,
.muted {
    color: var(--muted);
}

.positive-item,
.summary-item {
    margin: 0;
    padding: 12px 0;
    border-top: 1px solid var(--line);
}

.positive-item:first-child,
.summary-item:first-child {
    border-top: 0;
}

.impact-item {
    padding: 14px 0;
    border-top: 1px solid var(--line);
}

.impact-item:first-child {
    border-top: 0;
}

.impact-item strong {
    display: block;
    margin-bottom: 6px;
}

.impact-item p {
    margin: 0;
    color: var(--muted);
}

.details-panel {
    margin-bottom: 18px;
}

.detail-group {
    margin-top: 18px;
}

.detail-group h4 {
    margin: 0 0 10px;
    font-size: 1rem;
}

.detail-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(220px, .7fr);
    gap: 16px;
    padding: 12px 0;
    border-top: 1px solid var(--line);
}

.detail-row span,
.detail-row small {
    overflow-wrap: anywhere;
}

.detail-row small {
    color: var(--muted);
}

.detail-row.fail span {
    color: var(--danger);
    font-weight: 750;
}

.detail-row.warning span {
    color: #9a6700;
    font-weight: 750;
}

.conversion-band {
    display: flex;
    gap: 24px;
    align-items: center;
    justify-content: space-between;
    padding: 28px;
    border-radius: 8px;
    color: #fff;
    background: var(--brand-dark);
}

.conversion-band h2 {
    margin: 0 0 8px;
}

.conversion-band p {
    margin: 0;
    color: rgba(255,255,255,.78);
}

.site-footer {
    padding: 74px 0 28px;
    color: rgba(255,248,234,.72);
    background:
        radial-gradient(circle at 18% 0%, rgba(14, 165, 233, .18), transparent 30%),
        var(--ink);
}

.footer-grid {
    display: grid;
    gap: 18px;
}

.site-footer h2 {
    color: var(--ivory);
    font-size: .95rem;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.site-footer a {
    display: block;
    margin: 8px 0;
    color: rgba(255,248,234,.78);
    transition: color .18s ease;
}

.site-footer a:hover,
.site-footer a:focus {
    color: var(--ivory);
}

.footer-brand {
    display: inline-flex;
    margin-bottom: 18px;
}

.footer-cta {
    color: var(--accent) !important;
    font-weight: 850;
}

.footer-bottom {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: center;
    justify-content: space-between;
    margin-top: 42px;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,.14);
}

@media (min-width: 720px) {
    .footer-grid {
        grid-template-columns: 1.5fr .7fr .9fr;
    }
}

@media (min-width: 980px) {
    .nav-toggle {
        display: none;
    }

    .primary-nav {
        position: static;
        display: flex;
        padding: 0;
        border: 0;
        background: transparent;
        box-shadow: none;
        opacity: 1;
        pointer-events: auto;
        transform: none;
    }

    .header-inner {
        grid-template-columns: auto 1fr auto;
    }
}

@media (max-width: 900px) {
    .report-top,
    .report-side,
    .conversion-band {
        align-items: flex-start;
        flex-direction: column;
    }

    .score-grid,
    .report-grid {
        grid-template-columns: 1fr;
    }

    .detail-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 979px) {
    .site-header {
        top: 10px;
        width: calc(100% - 20px);
        max-width: 760px;
        border-radius: 22px;
    }

    .header-inner {
        grid-template-columns: auto auto 1fr;
        min-height: 64px;
        padding: 8px 10px;
    }

    .primary-nav {
        position: absolute;
        inset: calc(100% + 10px) 0 auto;
        display: grid;
        gap: 8px;
        padding: 14px;
        border: 1px solid rgba(255,255,255,.18);
        border-radius: 22px;
        background: rgba(5,20,28,.96);
        box-shadow: 0 22px 70px rgba(0,0,0,.24);
        opacity: 0;
        pointer-events: none;
        transform: translateY(-8px);
        transition: opacity .18s ease, transform .18s ease;
    }

    .nav-open .primary-nav {
        opacity: 1;
        pointer-events: auto;
        transform: translateY(0);
    }

    .audit-hero {
        padding-top: 138px;
    }
}

@media (max-width: 560px) {
    .container {
        width: calc(100% - 24px);
    }

    .site-header {
        left: 9px;
        right: 9px;
        width: auto;
        max-width: none;
        border-radius: 24px;
        transform: none;
    }

    .header-inner {
        grid-template-columns: 1fr auto;
        grid-template-areas:
            "brand toggle"
            "langs langs";
        row-gap: 8px;
        padding: 10px;
    }

    .brand {
        grid-area: brand;
        min-width: 0;
    }

    .brand-text {
        max-width: 150px;
        overflow: hidden;
        font-size: .9rem;
        text-overflow: ellipsis;
    }

    .nav-toggle {
        grid-area: toggle;
        justify-self: end;
    }

    .language-switch {
        grid-area: langs;
        justify-self: stretch;
        justify-content: center;
        max-width: none;
        overflow-x: auto;
        scrollbar-width: none;
    }

    .language-switch::-webkit-scrollbar {
        display: none;
    }

    .language-switch a {
        min-width: 31px;
    }

    .audit-hero {
        padding: 156px 0 46px;
    }

    h1 {
        max-width: 100%;
        font-size: clamp(2.55rem, 13.8vw, 3.95rem);
        line-height: .93;
    }

    .input-group {
        display: grid;
        gap: 10px;
    }

    .input-group .form-control,
    .input-group .btn {
        width: 100%;
        border-radius: 6px !important;
    }

    .score-dial {
        min-width: 132px;
        min-height: 132px;
    }
}
