:root {
    --ink: #172033;
    --muted: #5f6b7a;
    --line: #d9e0e8;
    --surface: #ffffff;
    --canvas: #f3f6f9;
    --brand: #6b1745;
    --brand-dark: #4c0f31;
    --brand-soft: #f8edf3;
    --success: #176b49;
    --success-soft: #eaf7f1;
    --warning: #815500;
    --warning-soft: #fff5dc;
    --danger: #a02c36;
    --danger-soft: #fff0f1;
    --focus: #1263a0;
    --shadow: 0 22px 70px rgb(23 32 51 / 10%);
    --radius: 18px;
    font-family: Inter, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--ink);
    background: var(--canvas);
    font-synthesis: none;
}

* {
    box-sizing: border-box;
}

html {
    min-width: 320px;
    min-height: 100%;
    background:
        radial-gradient(circle at 15% 0%, rgb(107 23 69 / 9%), transparent 30rem),
        var(--canvas);
}

body {
    min-height: 100vh;
    margin: 0;
    color: var(--ink);
    line-height: 1.55;
}

button,
input,
select {
    font: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

code {
    padding: 0.12rem 0.34rem;
    border-radius: 5px;
    background: #eef1f5;
    color: #303c4f;
    font-size: 0.9em;
}

.skip-link {
    position: fixed;
    z-index: 100;
    top: 0.75rem;
    left: 0.75rem;
    padding: 0.75rem 1rem;
    transform: translateY(-150%);
    border-radius: 8px;
    background: var(--ink);
    color: #fff;
}

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

.installer-shell {
    width: min(900px, calc(100% - 2rem));
    margin: 0 auto;
    padding: 2rem 0;
}

.brand-header {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    width: fit-content;
    margin: 0 auto 1.8rem;
}

.brand-mark {
    display: grid;
    width: 3.15rem;
    height: 3.15rem;
    place-items: center;
    border-radius: 13px;
    background: var(--brand);
    box-shadow: 0 8px 22px rgb(107 23 69 / 24%);
    color: #fff;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.brand-header p {
    margin: 0;
}

.eyebrow {
    color: var(--brand);
    font-size: 0.77rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.brand-name {
    color: var(--ink);
    font-size: 1.05rem;
    font-weight: 760;
}

.step-nav {
    margin-bottom: 1.25rem;
}

.step-nav ol {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    margin: 0;
    padding: 0;
    list-style: none;
}

.step {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    min-width: 0;
    color: var(--muted);
    font-size: 0.76rem;
    text-align: center;
}

.step::before {
    position: absolute;
    z-index: -1;
    top: 0.84rem;
    right: 50%;
    left: -50%;
    height: 2px;
    background: var(--line);
    content: "";
}

.step:first-child::before {
    display: none;
}

.step-number {
    display: grid;
    width: 1.75rem;
    height: 1.75rem;
    place-items: center;
    border: 2px solid var(--line);
    border-radius: 50%;
    background: var(--canvas);
    font-size: 0.72rem;
    font-weight: 800;
}

.step--complete::before,
.step--current::before {
    background: var(--brand);
}

.step--complete .step-number {
    border-color: var(--brand);
    background: var(--brand);
    color: #fff;
}

.step--current {
    color: var(--brand);
    font-weight: 750;
}

.step--current .step-number {
    border-color: var(--brand);
    box-shadow: 0 0 0 4px var(--brand-soft);
    background: #fff;
    color: var(--brand);
}

.installer-card {
    padding: clamp(1.4rem, 4vw, 3.5rem);
    border: 1px solid rgb(217 224 232 / 78%);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    background: var(--surface);
}

.installer-card:focus {
    outline: none;
}

.hero,
.section-header {
    max-width: 690px;
    margin-bottom: 2rem;
}

h1,
h2,
p {
    margin-top: 0;
}

h1 {
    margin-bottom: 0.75rem;
    font-size: clamp(1.85rem, 5vw, 2.65rem);
    line-height: 1.12;
    letter-spacing: -0.035em;
}

h2 {
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
}

.lead {
    margin-bottom: 0;
    color: var(--muted);
    font-size: 1.05rem;
}

.notice {
    margin: 1.5rem 0;
    padding: 1rem 1.1rem;
    border: 1px solid var(--line);
    border-left-width: 4px;
    border-radius: 10px;
    background: #f8fafc;
}

.notice p {
    margin: 0.25rem 0 0;
    color: var(--muted);
}

.notice--privacy,
.notice--neutral {
    border-left-color: var(--brand);
    background: var(--brand-soft);
}

.notice--success {
    border-color: #a9dfc8;
    border-left-color: var(--success);
    background: var(--success-soft);
}

.notice--warning {
    border-color: #efdca4;
    border-left-color: var(--warning);
    background: var(--warning-soft);
}

.notice--error {
    border-color: #f0b7bc;
    border-left-color: var(--danger);
    background: var(--danger-soft);
}

.installer-form {
    display: grid;
    gap: 1.35rem;
}

fieldset {
    display: grid;
    gap: 0.9rem;
    min-width: 0;
    margin: 0;
    padding: 1.15rem;
    border: 1px solid var(--line);
    border-radius: 12px;
}

legend {
    padding: 0 0.35rem;
    font-weight: 800;
}

.choice-card {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    border: 1px solid var(--line);
    border-radius: 10px;
    cursor: pointer;
    transition: border-color 140ms ease, background 140ms ease;
}

.choice-card:has(input:checked) {
    border-color: var(--brand);
    background: var(--brand-soft);
}

.choice-card input {
    width: 1.1rem;
    height: 1.1rem;
    margin-top: 0.18rem;
    accent-color: var(--brand);
}

.choice-card span {
    display: grid;
    gap: 0.22rem;
}

.choice-card small {
    color: var(--muted);
}

.field-grid {
    display: grid;
    gap: 1.2rem;
}

.field-grid--two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.field {
    min-width: 0;
}

.field label {
    display: block;
    margin-bottom: 0.38rem;
    font-weight: 720;
}

.optional {
    color: var(--muted);
    font-size: 0.84rem;
    font-weight: 500;
}

input,
select {
    width: 100%;
    min-height: 2.8rem;
    padding: 0.66rem 0.78rem;
    border: 1px solid #b8c2cf;
    border-radius: 8px;
    outline: 0;
    background: #fff;
    color: var(--ink);
    transition: border-color 120ms ease, box-shadow 120ms ease;
}

input[type="file"] {
    padding: 0.52rem;
}

input:focus,
select:focus {
    border-color: var(--focus);
    box-shadow: 0 0 0 3px rgb(18 99 160 / 16%);
}

input:user-invalid {
    border-color: var(--danger);
}

.field-help,
.field-error {
    margin: 0.38rem 0 0;
    font-size: 0.84rem;
}

.field-help {
    color: var(--muted);
}

.field-error {
    color: var(--danger);
    font-weight: 650;
}

.password-control {
    position: relative;
}

.password-control input {
    padding-right: 5.5rem;
}

.reveal-button {
    position: absolute;
    top: 50%;
    right: 0.35rem;
    padding: 0.4rem 0.55rem;
    transform: translateY(-50%);
    border: 0;
    border-radius: 5px;
    background: transparent;
    color: var(--brand);
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 750;
}

.reveal-button:hover {
    background: var(--brand-soft);
}

.requirements-list {
    display: grid;
    gap: 0.75rem;
    margin: 0 0 1.6rem;
    padding: 0;
    list-style: none;
}

.requirement {
    display: grid;
    grid-template-columns: 2rem 1fr;
    gap: 0.85rem;
    padding: 0.95rem;
    border: 1px solid var(--line);
    border-radius: 10px;
}

.requirement p {
    margin: 0.2rem 0 0;
    color: var(--muted);
    font-size: 0.88rem;
}

.requirement .remediation {
    color: var(--ink);
}

.requirement-title {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.status-icon {
    display: grid;
    width: 1.75rem;
    height: 1.75rem;
    place-items: center;
    border-radius: 50%;
    font-weight: 900;
}

.requirement--passed .status-icon {
    background: var(--success-soft);
    color: var(--success);
}

.requirement--warning .status-icon {
    background: var(--warning-soft);
    color: var(--warning);
}

.requirement--failed .status-icon {
    background: var(--danger-soft);
    color: var(--danger);
}

.tag {
    padding: 0.16rem 0.42rem;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.tag--danger {
    background: var(--danger-soft);
    color: var(--danger);
}

.tag--warning {
    background: var(--warning-soft);
    color: var(--warning);
}

.error-summary {
    margin: 1rem 0 1.5rem;
    padding: 1rem;
    border: 2px solid var(--danger);
    border-radius: 10px;
    background: var(--danger-soft);
}

.error-summary p {
    margin: 0.2rem 0 0;
}

.action-row {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 0.6rem;
}

.action-row--split {
    justify-content: space-between;
}

.button {
    display: inline-flex;
    min-height: 2.85rem;
    align-items: center;
    justify-content: center;
    padding: 0.65rem 1.15rem;
    border: 1px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 760;
    text-decoration: none;
    transition: transform 120ms ease, background 120ms ease, box-shadow 120ms ease;
}

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

.button:focus-visible,
.reveal-button:focus-visible,
.choice-card:focus-within {
    outline: 3px solid rgb(18 99 160 / 28%);
    outline-offset: 2px;
}

.button--primary {
    box-shadow: 0 7px 16px rgb(107 23 69 / 20%);
    background: var(--brand);
    color: #fff;
}

.button--primary:hover:not(:disabled) {
    background: var(--brand-dark);
}

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

.button:disabled {
    cursor: not-allowed;
    opacity: 0.48;
}

.completion {
    max-width: 650px;
    margin: 0 auto;
    text-align: center;
}

.completion-mark,
.lock-mark {
    display: grid;
    width: 4.4rem;
    height: 4.4rem;
    margin: 0 auto 1.2rem;
    place-items: center;
    border-radius: 50%;
    font-size: 2rem;
    font-weight: 900;
}

.completion-mark {
    background: var(--success-soft);
    color: var(--success);
}

.lock-mark {
    border: 8px solid var(--brand-soft);
    background: var(--brand);
    color: #fff;
    font-size: 0.9rem;
}

.security-next {
    margin: 2rem 0;
    padding: 1.25rem;
    border-radius: 12px;
    background: var(--canvas);
    text-align: left;
}

.security-next ul {
    margin-bottom: 0;
    padding-left: 1.25rem;
}

.installer-footer {
    display: flex;
    justify-content: space-between;
    padding: 1rem 0.25rem 0;
    color: var(--muted);
    font-size: 0.76rem;
}

[hidden] {
    display: none !important;
}

@media (max-width: 680px) {
    .installer-shell {
        width: min(100% - 1rem, 900px);
        padding-top: 1rem;
    }

    .step-label {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        white-space: nowrap;
    }

    .field-grid--two {
        grid-template-columns: 1fr;
    }

    .action-row,
    .action-row--split {
        flex-direction: column-reverse;
    }

    .button {
        width: 100%;
    }

    .installer-footer {
        display: grid;
        gap: 0.2rem;
        text-align: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}
