:root {
    --ink: #131A2B;
    --ink-muted: #5B6478;
    --bg: #EEF1F6;
    --surface: #FFFFFF;
    --border: #DCE1EA;
    --accent: #04bd62;
    --accent-ink: #FFFFFF;
    --success: #17845A;
    --success-bg: #E7F5EE;
    --error: #C23B3B;
    --error-bg: #FBEAEA;

    --font-display: "Newsreader", Georgia, serif;
    --font-body: "IBM Plex Sans", -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; }

body {
    font-family: var(--font-body);
    background: var(--bg);
    background-image:
        radial-gradient(circle at 15% 0%, rgba(42, 70, 199, 0.06), transparent 45%);
    color: var(--ink);
    margin: 0;
    -webkit-font-smoothing: antialiased;
}

.page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 16px;
}

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    box-shadow: 0 1px 2px rgba(19, 26, 43, 0.04), 0 16px 40px -20px rgba(19, 26, 43, 0.25);
    max-width: 520px;
    width: 100%;
    padding: 36px 36px 32px;
}

@media (max-width: 480px) {
    .card { padding: 28px 22px 24px; border-radius: 16px; }
}


.letterhead {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding-bottom: 20px;
    margin-bottom: 24px;
}

.logo {
    display: flex;
    justify-content: center;
    align-items: center;
}

.logo img {
    max-width: 180px;
    height: auto;
    display: block;
}


.term-box {
    border-left: 3px solid var(--accent);
    background: #FAFBFD;
    border-radius: 0 12px 12px 0;
    padding: 22px 22px 20px;
    max-height: 340px;
    overflow-y: auto;
    margin-bottom: 24px;
    text-align: left;
}

.term-title {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 19px;
    line-height: 1.35;
    margin: 0 0 14px;
    color: var(--ink);
}

.term-box p {
    font-size: 14.5px;
    line-height: 1.65;
    color: var(--ink);
    margin: 0 0 12px;
    text-align: left;
}

.term-subhead {
    font-weight: 600;
    margin-top: 18px !important;
}

.term-box ul {
    margin: 0;
    padding-left: 0;
    list-style: none;
}

.term-box li {
    position: relative;
    padding-left: 18px;
    font-size: 14.5px;
    line-height: 1.6;
    color: var(--ink);
    margin-bottom: 10px;
    text-align: left;
}

.term-box li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 8px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
}

.term-box::-webkit-scrollbar { width: 8px; }
.term-box::-webkit-scrollbar-thumb { background: var(--border); border-radius: 8px; }


.checkbox-line {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14.5px;
    font-weight: 500;
    margin-bottom: 20px;
    cursor: pointer;
    user-select: none;
}

.checkbox-line input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.checkbox-box {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    border: 1.5px solid var(--border);
    border-radius: 6px;
    background: var(--surface);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.15s, background 0.15s;
}

.checkbox-box::after {
    content: "";
    width: 11px;
    height: 6px;
    border-left: 2px solid var(--accent-ink);
    border-bottom: 2px solid var(--accent-ink);
    transform: rotate(-45deg) translateY(-1px);
    opacity: 0;
    transition: opacity 0.1s;
}

.checkbox-line input:checked + .checkbox-box {
    background: var(--accent);
    border-color: var(--accent);
}

.checkbox-line input:checked + .checkbox-box::after {
    opacity: 1;
}

.checkbox-line input:focus-visible + .checkbox-box {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

button {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 12px;
    background: var(--accent);
    color: var(--accent-ink);
    font-family: var(--font-body);
    font-size: 15.5px;
    font-weight: 600;
    letter-spacing: 0.01em;
    cursor: pointer;
    transition: background 0.15s, opacity 0.15s, transform 0.05s;
}

button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

button:not(:disabled):hover {
    background: #018040;
}

button:not(:disabled):active {
    transform: scale(0.99);
}

button:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.state--centered {
    text-align: center;
    padding: 8px 0 4px;
}

.state--centered h2 {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 600;
    margin: 0 0 8px;
}

.muted {
    color: var(--ink-muted);
    font-size: 14.5px;
    line-height: 1.55;
    margin: 0;
}

.seal {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 32px;
    font-weight: 600;
}

.seal--success {
    background: var(--success-bg);
    color: var(--success);
    border: 1.5px solid var(--success);
}

.seal--error {
    background: var(--error-bg);
    color: var(--error);
    border: 1.5px solid var(--error);
    line-height: 1;
}

.error-msg {
    color: var(--error);
    font-size: 13.5px;
    margin: 10px 0 0;
    text-align: center;
}

@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; }
}