/* =========================================================
   THE PUBLIC BETA APPLICATION
   Loaded after public.css (tokens) and legal.css (the article shell this
   page shares with Terms and Privacy). Presentation only — no question, no
   status label and no copy of any kind lives here.
   ========================================================= */

.apply-panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    margin-block: 24px 8px;
}

.apply-panel--quiet {
    background: transparent;
    border-style: dashed;
    border-color: var(--border-strong);
    text-align: center;
}

.apply-panel h3 { margin: 0 0 10px; font-size: 20px; }
.apply-panel h4 { margin: 22px 0 10px; font-size: 15px; }

.apply-note { color: var(--text-muted); font-size: 14.5px; }
.apply-muted { color: var(--text-faint); font-size: 13.5px; }

/* Loading. A shape, so the wait reads as a state somebody designed. */
.apply-skeleton {
    height: 220px;
    margin-block: 24px 8px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: linear-gradient(90deg, var(--surface) 25%, var(--surface-hover) 37%, var(--surface) 63%);
    background-size: 400% 100%;
    animation: apply-shimmer 1.4s ease infinite;
}

@keyframes apply-shimmer {
    0% { background-position: 100% 50%; }
    100% { background-position: 0 50%; }
}

@media (prefers-reduced-motion: reduce) {
    .apply-skeleton { animation: none; }
}

/* =========================================================
   THE FORM
   ========================================================= */

.apply-field {
    display: grid;
    gap: 6px;
    margin-block-end: 22px;
}

.apply-label {
    font-weight: 600;
    font-size: 15px;
    line-height: 1.45;
}

.apply-required {
    color: var(--accent);
    font-weight: 500;
    font-size: 12.5px;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    margin-inline-start: 6px;
}

.apply-help {
    color: var(--text-muted);
    font-size: 13.5px;
    line-height: 1.55;
}

.apply-field input[type="text"],
.apply-field textarea,
.apply-field select {
    width: 100%;
    padding: 11px 12px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    color: var(--text);
    font: inherit;
    font-size: 15px;
}

.apply-field textarea { resize: vertical; min-height: 120px; line-height: 1.6; }

.apply-field input:focus-visible,
.apply-field textarea:focus-visible,
.apply-field select:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 1px;
    border-color: var(--accent);
}

.apply-choices { display: grid; gap: 10px; margin-block-start: 4px; }

.apply-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 15px;
    line-height: 1.5;
    cursor: pointer;
}

.apply-check input { margin-block-start: 3px; flex: none; }

.apply-field--check { margin-block-end: 22px; }

.apply-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
    margin-block-start: 28px;
    padding-block-start: 22px;
    border-top: 1px solid var(--border);
}

.apply-error {
    margin: 0;
    color: #ff8a8a;
    font-size: 14px;
    line-height: 1.5;
}

/* =========================================================
   AN EXISTING APPLICATION
   ========================================================= */

.apply-status {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-block-end: 14px;
}

.apply-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 999px;
    border: 1px solid var(--border-strong);
    font-size: 13px;
    font-weight: 600;
}

/* One class per stored status. The WORD a reader sees always comes from the
   server; these only carry the colour. */
.apply-badge--accepted  { border-color: rgba(53, 214, 230, 0.5); color: var(--accent); background: var(--accent-soft); }
.apply-badge--denied,
.apply-badge--withdrawn { color: var(--text-muted); }
.apply-badge--pending,
.apply-badge--reviewing,
.apply-badge--needs_information,
.apply-badge--waitlisted { color: var(--text); }

.apply-message {
    margin-block: 18px 0;
    padding: 16px 18px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}

.apply-message strong { display: block; font-size: 13px; color: var(--text-muted); margin-block-end: 6px; }
.apply-message p { margin: 0; line-height: 1.6; }

.apply-history {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 8px;
    font-size: 14.5px;
}

@media (max-width: 560px) {
    .apply-panel { padding: 20px; }
}
