/* ─── Variables ─────────────────────────────────────────────────── */
:root {
    --bg:           #ffffff;
    --bg-subtle:    #f9fafb;
    --text:         #111827;
    --text-muted:   #6b7280;
    --border:       #e5e7eb;
    --accent:       #30040c;
    --accent-hover: #500818;
    --accent-light: #fdf2f4;
    --radius:       5px;
    --max-width:    760px;
}

/* ─── Reset ─────────────────────────────────────────────────────── */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* ─── Base ──────────────────────────────────────────────────────── */
body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 16px;
    line-height: 1.65;
    color: var(--text);
    background: var(--bg);
}

a {
    color: var(--accent);
    text-decoration: none;
}
a:hover {
    text-decoration: underline;
}

p {
    margin-bottom: 1rem;
}
p:last-child {
    margin-bottom: 0;
}

/* ─── Layout ────────────────────────────────────────────────────── */
body > header {
    border-bottom: 1px solid var(--border);
    padding: 0 2rem;
    position: sticky;
    top: 0;
    background: var(--bg);
    z-index: 10;
}

nav {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 52px;
}

.site-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}
.site-logo:hover {
    text-decoration: none;
}

.nav-icon {
    height: 28px;
    width: auto;
    display: block;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 2rem;
}

nav ul a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.15s;
}
nav ul a:hover,
nav ul a.active {
    color: var(--text);
    text-decoration: none;
}

main {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 3.5rem 2rem 6rem;
}

footer {
    border-top: 1px solid var(--border);
    padding: 2rem 2rem 1.5rem;
    text-align: center;
}

.footer-logos {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2.5rem;
    margin-bottom: 1.25rem;
}

.footer-logo {
    height: 36px;
    width: auto;
    opacity: 0.85;
    transition: opacity 0.15s;
}
.footer-logo:hover {
    opacity: 1;
}

.footer-text {
    color: var(--text-muted);
    font-size: 0.8rem;
    letter-spacing: 0.02em;
    margin: 0;
}

/* ─── Typography ────────────────────────────────────────────────── */
h1 {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.01em;
    margin-bottom: 1rem;
}

h2 {
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 0.35rem;
}

/* ─── Markdown main content ─────────────────────────────────────── */
.main-content {
    margin-bottom: 3rem;
}

/* h1 in the markdown acts as a section label */
.main-content h1,
.slides-section h1 {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin: 2.25rem 0 0.6rem;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid var(--border);
}

.main-content h1:first-child {
    margin-top: 0;
}

.main-content p {
    font-size: 0.925rem;
    color: #374151;
}

.main-content ul,
.main-content ol {
    padding-left: 1.25rem;
    margin-bottom: 1rem;
}

.main-content li {
    font-size: 0.925rem;
    color: #374151;
    margin-bottom: 0.3rem;
    line-height: 1.55;
}

/* Markdown table (Study Programs) */
.main-content table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.main-content thead th {
    text-align: left;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-muted);
    padding: 0 0.85rem 0.55rem 0;
    border-bottom: 1px solid var(--border);
}

.main-content tbody td {
    padding: 0.55rem 0.85rem 0.55rem 0;
    border-bottom: 1px solid var(--border);
    color: #374151;
    vertical-align: top;
}

.main-content tbody tr:last-child td {
    border-bottom: none;
}

.slides-section {
    margin-bottom: 3rem;
}

/* ─── Hero (index) ──────────────────────────────────────────────── */
.hero {
    padding-bottom: 3rem;
    margin-bottom: 3rem;
    border-bottom: 1px solid var(--border);
}

.label {
    font-size: 0.8rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.lead {
    font-size: 1.05rem;
    color: #374151;
    max-width: 620px;
    margin-top: 0.25rem;
}

/* ─── Index sections ────────────────────────────────────────────── */
section {
    margin-bottom: 3rem;
}

section > h2 {
    margin-bottom: 1.25rem;
}

/* ─── Documents list ────────────────────────────────────────────── */
.documents {
    list-style: none;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.documents li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.8rem 1.1rem;
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
    transition: background 0.1s;
}
.documents li:last-child {
    border-bottom: none;
}
.documents li:hover {
    background: var(--bg-subtle);
}

.file-meta {
    color: var(--text-muted);
    font-size: 0.78rem;
    flex-shrink: 0;
    margin-left: 1rem;
}

.empty {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ─── Page header (agenda) ──────────────────────────────────────── */
.page-header {
    margin-bottom: 2.5rem;
}
.page-header h1 {
    margin-bottom: 0.75rem;
}
.page-header p {
    color: var(--text-muted);
    max-width: 560px;
    font-size: 0.925rem;
}

.page-header-list {
    color: var(--text-muted);
    font-size: 0.925rem;
    max-width: 560px;
    padding-left: 1.25rem;
    margin-top: -0.5rem;
}

/* ─── Section cards ─────────────────────────────────────────────── */
.sections {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.section-card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
}

.section-header {
    margin-bottom: 1.1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.section-desc {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 0.2rem;
    margin-bottom: 0;
}

/* ─── Presentations ─────────────────────────────────────────────── */
.presentations {
    margin-bottom: 1.1rem;
}

.presentation-item {
    display: flex;
    align-items: baseline;
    gap: 0.3rem;
    padding: 0.45rem 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
}
.presentation-item:last-child {
    border-bottom: none;
}
.presentation-item.new {
    animation: fadeSlideIn 0.25s ease;
}

@keyframes fadeSlideIn {
    from { opacity: 0; transform: translateY(-5px); }
    to   { opacity: 1; transform: translateY(0); }
}

.student-name {
    font-weight: 500;
}

.pres-title {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.empty-slot {
    color: var(--text-muted);
    font-size: 0.85rem;
    font-style: italic;
}

/* ─── Sign-up area ──────────────────────────────────────────────── */
.signup-area {
    padding-top: 0.25rem;
}

/* ─── Full badge ────────────────────────────────────────────────── */
.badge-full {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-muted);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.3rem 0.7rem;
}

/* ─── Buttons ───────────────────────────────────────────────────── */
.btn-signup {
    background: none;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.4rem 0.9rem;
    font-size: 0.825rem;
    color: var(--text-muted);
    cursor: pointer;
    font-family: inherit;
    transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.btn-signup:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-light);
}

.btn-primary {
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: var(--radius);
    padding: 0.45rem 1.1rem;
    font-size: 0.875rem;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.15s;
}
.btn-primary:hover {
    background: var(--accent-hover);
}
.btn-primary:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.btn-cancel {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.875rem;
    font-family: inherit;
    cursor: pointer;
    padding: 0.45rem 0.5rem;
    transition: color 0.15s;
}
.btn-cancel:hover {
    color: var(--text);
}

/* ─── Signup form ───────────────────────────────────────────────── */
.signup-form {
    margin-top: 0.9rem;
    padding: 1.1rem 1.25rem;
    background: var(--bg-subtle);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.form-row {
    margin-bottom: 0.6rem;
}

.form-row input {
    width: 100%;
    padding: 0.45rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-family: inherit;
    color: var(--text);
    background: var(--bg);
    transition: border-color 0.15s, box-shadow 0.15s;
}
.form-row input::placeholder {
    color: #9ca3af;
}
.form-row input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.08);
}

.form-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.9rem;
}

.form-error {
    color: #dc2626;
    font-size: 0.825rem;
    margin-top: 0.6rem;
    margin-bottom: 0;
}

/* ─── Login page ────────────────────────────────────────────────── */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: var(--bg-subtle);
}

.login-box {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2.5rem 2rem;
    width: 100%;
    max-width: 360px;
}

.login-box h1 {
    font-size: 1.4rem;
    margin-bottom: 1.5rem;
}

.login-box .label {
    margin-bottom: 0.35rem;
}

.btn-block {
    display: block;
    width: 100%;
    margin-top: 1rem;
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
}

/* ─── Admin page ────────────────────────────────────────────────── */
.admin-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.admin-actions {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.admin-header h1 {
    margin-bottom: 0;
}

.btn-reload {
    font-size: 0.825rem;
    color: var(--text-muted);
    background: none;
    padding: 0.35rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-family: inherit;
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s;
}
.btn-reload:hover {
    color: var(--text);
    border-color: #9ca3af;
}

.btn-logout {
    font-size: 0.825rem;
    color: var(--text-muted);
    text-decoration: none;
    padding: 0.35rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: color 0.15s, border-color 0.15s;
}
.btn-logout:hover {
    color: var(--text);
    border-color: #9ca3af;
    text-decoration: none;
}

.admin-summary {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-bottom: 0.35rem;
}

.admin-meta {
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-bottom: 1.75rem;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.admin-table thead th {
    text-align: left;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-muted);
    padding: 0 0.75rem 0.6rem;
    border-bottom: 1px solid var(--border);
}

.admin-table thead th:first-child { padding-left: 0; }

.admin-table td {
    padding: 0.6rem 0.75rem;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

.admin-table tr:last-child td { border-bottom: none; }

.section-row td {
    padding: 1.1rem 0 0.4rem;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-muted);
    border-bottom: none;
}

.slot-count {
    font-weight: 400;
    margin-left: 0.4rem;
}

.empty-row td {
    color: var(--text-muted);
    font-style: italic;
    font-size: 0.825rem;
}

.td-name { font-weight: 500; padding-left: 0; }
.td-muted { color: var(--text-muted); }
.td-date { white-space: nowrap; }
.td-action { text-align: right; width: 1%; white-space: nowrap; }

.btn-remove {
    background: none;
    border: none;
    color: #9ca3af;
    font-size: 0.8rem;
    font-family: inherit;
    cursor: pointer;
    padding: 0.2rem 0.4rem;
    transition: color 0.15s;
}
.btn-remove:hover { color: #dc2626; }

/* ─── Utility ───────────────────────────────────────────────────── */
.hidden {
    display: none !important;
}

/* ─── Choices panel ─────────────────────────────────────────────── */
.choices-panel {
    background: var(--bg-subtle);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem 1.5rem;
    margin-bottom: 2.5rem;
}

.choices-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.choice-slot {
    background: var(--bg);
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    padding: 0.65rem 0.9rem;
    min-height: 4rem;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    transition: border-color 0.15s, background 0.15s;
}

.choice-slot.filled {
    border-style: solid;
    border-color: var(--accent);
    background: var(--accent-light);
}

.choice-label {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.choice-slot.filled .choice-label {
    color: var(--accent);
}

.choice-body {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.4rem;
    flex: 1;
}

.choice-value {
    font-size: 0.825rem;
    color: #9ca3af;
    font-style: italic;
    line-height: 1.35;
}

.choice-slot.filled .choice-value {
    color: var(--text);
    font-style: normal;
    font-weight: 500;
}

.btn-remove-slot {
    background: none;
    border: none;
    color: var(--accent);
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
    opacity: 0.6;
    transition: opacity 0.15s;
}
.btn-remove-slot:hover { opacity: 1; }

/* ─── Choices submit row ────────────────────────────────────────── */
.choices-submit {
    display: flex;
    gap: 0.75rem;
    align-items: flex-end;
    flex-wrap: wrap;
}

.choices-inputs {
    display: flex;
    gap: 0.6rem;
    flex: 1;
    flex-wrap: wrap;
}

.choices-inputs input {
    flex: 1;
    min-width: 140px;
    padding: 0.45rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-family: inherit;
    color: var(--text);
    background: var(--bg);
    transition: border-color 0.15s, box-shadow 0.15s;
}
.choices-inputs input::placeholder { color: #9ca3af; }
.choices-inputs input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.08);
}

/* ─── Sessions list ─────────────────────────────────────────────── */
.sessions-list {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.session-section {
    /* no extra margin — gap on parent handles spacing */
}

.session-heading {
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--text);
    margin-bottom: 1rem;
    padding-bottom: 0.6rem;
    border-bottom: 2px solid var(--accent);
    display: flex;
    align-items: center;
    gap: 0.55rem;
}

.session-icon {
    height: 1.3rem;
    width: auto;
    flex-shrink: 0;
}

/* ─── Topic cards ───────────────────────────────────────────────── */
.topics-list {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    padding-left: 1rem;
    border-left: 2px solid var(--border);
    margin-top: 0.25rem;
}

.topic-card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
    transition: border-color 0.15s, background 0.15s, opacity 0.15s;
}

.topic-card.selected {
    border-color: var(--accent);
    background: var(--accent-light);
}

.topic-card.dimmed {
    opacity: 0.45;
}

.topic-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.3rem;
}

.topic-title {
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.35;
    margin: 0;
}

.topic-desc {
    font-size: 0.825rem;
    color: var(--text-muted);
    margin-bottom: 0.55rem;
    margin-top: 0.1rem;
}

/* ─── Papers list ───────────────────────────────────────────────── */
.papers-list {
    list-style: none;
    margin: 0;
    padding: 0;
    border-top: 1px solid var(--border);
    margin-top: 0.4rem;
}

.paper-item {
    font-size: 0.8rem;
    padding: 0.3rem 0;
    border-bottom: 1px solid var(--border);
    color: var(--text-muted);
}
.paper-item:last-child { border-bottom: none; }
.paper-item a { color: var(--accent); }

/* ─── Choose button ─────────────────────────────────────────────── */
.btn-choose {
    flex-shrink: 0;
    background: none;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.28rem 0.65rem;
    font-size: 0.78rem;
    color: var(--text-muted);
    cursor: pointer;
    font-family: inherit;
    transition: border-color 0.15s, color 0.15s, background 0.15s;
    white-space: nowrap;
}
.btn-choose:hover:not(:disabled) {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-light);
}
.btn-choose.chosen {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}
.btn-choose:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

/* ─── Success message ───────────────────────────────────────────── */
.success-msg {
    color: #059669;
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.5rem 0;
}

/* ─── Additional topics (read-only) ────────────────────────────── */
.extra-section {
    margin-top: 3.5rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

.extra-heading {
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--text-muted);
    margin-bottom: 0.35rem;
    padding-bottom: 0.6rem;
    border-bottom: 2px solid var(--border);
    display: flex;
    align-items: center;
    gap: 0.55rem;
}

.extra-note {
    font-size: 0.825rem;
    color: var(--text-muted);
    font-style: italic;
    margin-bottom: 1rem;
}

.extra-topics-list {
    border-left-color: var(--border);
}

.topic-card--extra {
    background: var(--bg-subtle);
    border-color: var(--border);
}

/* ─── Admin: plan sections ──────────────────────────────────────── */
.plan-section {
    margin-bottom: 2.75rem;
}

.plan-heading {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid var(--border);
}

.plan-note {
    color: var(--text-muted);
    font-size: 0.825rem;
    margin-bottom: 1rem;
}

.plan-unassigned {
    margin-top: 1rem;
    font-size: 0.875rem;
    color: #b45309;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: var(--radius);
    padding: 0.65rem 1rem;
}

.table-wrap {
    overflow-x: auto;
}

.td-center {
    text-align: center;
}

/* ─── Plan error message ─────────────────────────────────────────── */
.plan-error-msg {
    color: #9b1c1c;
    background: #fef2f2;
    border: 1px solid #fca5a5;
    border-radius: var(--radius);
    padding: 0.5rem 0.85rem;
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
}

/* ─── Plan action buttons ───────────────────────────────────────── */
.plan-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.1rem;
    align-items: center;
}

.btn-plan-action {
    background: none;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.35rem 0.8rem;
    font-size: 0.825rem;
    font-family: inherit;
    color: var(--text-muted);
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: color 0.15s, border-color 0.15s;
}
.btn-plan-action:hover {
    color: var(--text);
    border-color: #9ca3af;
    text-decoration: none;
}
.btn-plan-subtle {
    color: #9ca3af;
}

/* ─── Assignment select ─────────────────────────────────────────── */
.td-select {
    min-width: 220px;
}

.assignment-select {
    width: 100%;
    padding: 0.3rem 0.5rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.825rem;
    font-family: inherit;
    color: var(--text);
    background: var(--bg);
    cursor: pointer;
    transition: border-color 0.15s;
}
.assignment-select:focus {
    outline: none;
    border-color: var(--accent);
}
.assignment-select:disabled {
    opacity: 0.5;
    cursor: wait;
}

/* ─── Misc admin ────────────────────────────────────────────────── */
.btn-text-link {
    background: none;
    border: none;
    padding: 0;
    font-size: inherit;
    font-family: inherit;
    color: var(--accent);
    cursor: pointer;
    text-decoration: underline;
}

/* ─── Priority badges ───────────────────────────────────────────── */
.priority-badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 0.18rem 0.55rem;
    border-radius: 3px;
    white-space: nowrap;
}
.priority-1      { background: #d1fae5; color: #065f46; }
.priority-2      { background: #dbeafe; color: #1e3a8a; }
.priority-3      { background: #fef3c7; color: #78350f; }
.priority-manual { background: #f3f4f6; color: #374151; }

/* ─── Responsive ────────────────────────────────────────────────── */
@media (max-width: 520px) {
    body > header {
        padding: 0 1rem;
    }
    main {
        padding: 2.5rem 1rem 5rem;
    }
    .section-card {
        padding: 1.1rem 1rem;
    }
    h1 {
        font-size: 1.6rem;
    }
    .choices-grid {
        grid-template-columns: 1fr;
    }
    .choices-submit {
        flex-direction: column;
        align-items: stretch;
    }
    .choices-inputs {
        flex-direction: column;
    }
}

/* ─── Modal ──────────────────────────────────────────────────────── */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}
.modal-overlay.hidden {
    display: none;
}
.modal-box {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: calc(var(--radius) * 2);
    padding: 1.75rem 2rem;
    max-width: 420px;
    width: calc(100% - 2rem);
    box-shadow: 0 8px 32px rgba(0,0,0,0.18);
}
.modal-title {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 0.65rem;
}
.modal-body {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 1.25rem;
    line-height: 1.5;
}
.modal-actions {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
}
