:root {
    --brand: #7b287f;
    --brand-dark: #57205c;
    --brand-soft: #f6eef7;
    --accent: #c4db11;
    --ink: #25222a;
    --muted: #68616d;
    --line: #ded9e1;
    --surface: #ffffff;
    --background: #f7f5f8;
    --success: #176b4a;
    --success-soft: #eaf7f1;
    --danger: #a12b35;
    --danger-soft: #fff0f1;
    --shadow: 0 12px 34px rgba(54, 33, 58, 0.09);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    color: var(--ink);
    background: var(--background);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 1rem;
    line-height: 1.65;
}

button, input { font: inherit; }

.hero {
    color: #fff;
    background: linear-gradient(130deg, var(--brand-dark), #9d27aa);
    border-bottom: 7px solid var(--accent);
}

.hero__inner {
    width: min(1080px, calc(100% - 2rem));
    margin: 0 auto;
    padding: 3.25rem 0 3rem;
}

.eyebrow, .step-label {
    margin: 0 0 .35rem;
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.hero .eyebrow { color: #e9f291; }
.hero__subtitle { max-width: 760px; margin: 0 0 .85rem; opacity: .88; }

h1, h2, h3, h4 { line-height: 1.2; }
h1 { max-width: 850px; margin: 0; font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { margin: 0 0 .65rem; font-size: clamp(1.5rem, 3vw, 2rem); color: var(--brand-dark); }
h3 { margin: 2.2rem 0 1rem; font-size: 1.45rem; color: var(--brand); }
h4 { margin: 1.9rem 0 .5rem; font-size: 1.1rem; color: var(--brand-dark); }
p { margin-top: 0; }

.page-shell {
    width: min(1080px, calc(100% - 2rem));
    margin: 2rem auto 4rem;
}

.card {
    margin-bottom: 1.5rem;
    padding: clamp(1.25rem, 4vw, 2.5rem);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: var(--shadow);
}

.identity-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
    align-items: center;
}

.step-label { color: var(--brand); }

.search-field { position: relative; }
.search-field label { display: block; margin-bottom: .45rem; font-weight: 750; }

input[type="search"] {
    width: 100%;
    padding: .85rem 1rem;
    color: var(--ink);
    background: #fff;
    border: 2px solid #bbb3bf;
    border-radius: 10px;
    outline: none;
}

input[type="search"]:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 4px rgba(123, 40, 127, .12);
}

.field-hint { min-height: 1.5rem; margin-top: .4rem; color: var(--muted); font-size: .9rem; }

.suggestions {
    position: absolute;
    z-index: 10;
    top: calc(100% - 1.5rem);
    left: 0;
    width: 100%;
    max-height: 320px;
    margin: 0;
    padding: .4rem;
    overflow-y: auto;
    list-style: none;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.suggestion {
    display: flex;
    width: 100%;
    padding: .75rem .8rem;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    text-align: left;
    color: var(--ink);
    background: transparent;
    border: 0;
    border-radius: 7px;
    cursor: pointer;
}

.suggestion:hover, .suggestion:focus, .suggestion[aria-selected="true"] { background: var(--brand-soft); outline: none; }
.suggestion__name { font-weight: 700; }
.badge { padding: .15rem .5rem; color: var(--success); background: var(--success-soft); border-radius: 999px; font-size: .78rem; white-space: nowrap; }

.alert { margin-bottom: 1.5rem; padding: 1rem 1.2rem; border-radius: 12px; }
.alert span { margin-left: .25rem; }
.alert--success { color: var(--success); background: var(--success-soft); border: 1px solid #a7dbc5; }
.alert--error { color: var(--danger); background: var(--danger-soft); border: 1px solid #efb8bd; }

.charter__heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.selected-member { padding: .45rem .8rem; color: var(--brand-dark); background: var(--brand-soft); border-radius: 999px; white-space: nowrap; }
.charter__intro { padding: 1rem 1.2rem; background: #faf8fb; border-left: 4px solid var(--brand); border-radius: 0 8px 8px 0; }
.charter-section ul { padding-left: 1.4rem; }
.charter-section li { margin-bottom: .9rem; padding-left: .25rem; }
.charter-section li::marker { color: var(--brand); }

.timer { padding: .9rem 1rem; color: var(--brand-dark); background: var(--brand-soft); border-radius: 10px; }
.timer--ready { color: var(--success); background: var(--success-soft); }
.checkbox-row { display: flex; gap: .85rem; align-items: flex-start; margin: 1.2rem 0; font-weight: 650; cursor: pointer; }
.checkbox-row:has(input:disabled) { color: var(--muted); cursor: not-allowed; }
input[type="checkbox"] { width: 1.25rem; height: 1.25rem; margin-top: .2rem; accent-color: var(--brand); flex: 0 0 auto; }

.button {
    display: inline-block;
    padding: .8rem 1.15rem;
    color: #fff;
    font-weight: 800;
    text-decoration: none;
    background: var(--brand);
    border: 0;
    border-radius: 9px;
    cursor: pointer;
}

.button:hover:not(:disabled) { background: var(--brand-dark); }
.button:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.button:disabled { opacity: .48; cursor: not-allowed; }
.button--secondary { margin-top: .7rem; color: var(--brand-dark); background: var(--brand-soft); }
.button--secondary:hover { color: #fff; }

.confirmation { max-width: 680px; margin: 4rem auto; text-align: center; }
.confirmation__icon { display: grid; width: 4rem; height: 4rem; margin: 0 auto 1rem; place-items: center; color: #fff; background: var(--success); border-radius: 50%; font-size: 2rem; font-weight: 800; }

footer { padding: 1.5rem 1rem 2.5rem; text-align: center; color: var(--muted); font-size: .9rem; }
footer a { color: var(--brand); }
[hidden] { display: none !important; }

@media (max-width: 720px) {
    .hero__inner { padding: 2.2rem 0; }
    .page-shell { margin-top: 1rem; }
    .identity-card { grid-template-columns: 1fr; gap: 1rem; }
    .charter__heading { display: block; }
    .selected-member { display: inline-block; margin-bottom: 1rem; white-space: normal; }
    .alert span { display: block; margin: .2rem 0 0; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
}

