.apply-stack,
.apply-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.apply-card {
    display: flex;
    flex-direction: column;
    gap: 26px;
    padding: clamp(24px, 4vw, 36px);
    border: 1px solid var(--atrix-border);
    border-radius: var(--atrix-radius-lg);
    background: var(--atrix-surface);
}

.apply-card.gold {
    border-color: rgba(var(--atrix-accent-rgb), 0.35);
    background:
        radial-gradient(ellipse at 0% 0%, rgba(var(--atrix-accent-rgb), 0.08), transparent 55%),
        var(--atrix-surface);
}

.apply-card.warn {
    border-color: rgba(var(--atrix-accent-rgb), 0.45);
}

.apply-card.danger {
    border-color: rgba(var(--atrix-danger-rgb), 0.4);
}

.apply-split {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.apply-copy h2 {
    font-size: clamp(22px, 3vw, 28px);
    font-weight: 600;
    letter-spacing: 3px;
}

.apply-copy p {
    max-width: 720px;
    margin-top: 10px;
    color: var(--atrix-text-muted);
    line-height: 1.6;
}

.apply-copy b {
    color: var(--atrix-text);
    font-weight: 600;
}

.apply-kicker {
    margin: 0 0 6px !important;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: var(--atrix-kicker-spacing);
    text-transform: uppercase;
    color: var(--atrix-accent) !important;
}

.apply-action {
    flex-shrink: 0;
}

.apply-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.apply-saved {
    font-size: 13px;
    color: var(--atrix-text-dim) !important;
}

.apply-feedback {
    display: block;
    margin: 12px 0;
    padding: 14px 18px;
    border-left: 2px solid var(--atrix-danger);
    background: rgba(0, 0, 0, 0.25);
    color: var(--atrix-text);
    white-space: pre-wrap;
}

.apply-q {
    display: flex;
    flex-direction: column;
    gap: 8px;
    scroll-margin-top: 96px;
}

.apply-label {
    color: var(--atrix-text);
    font-weight: 600;
    line-height: 1.5;
}

.apply-optional {
    margin-left: 6px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--atrix-text-dim);
}

.apply-help {
    margin-top: -4px;
    font-size: 14.5px;
    color: var(--atrix-text-dim);
}

.apply-input {
    width: 100%;
    min-height: 48px;
    padding: 0 16px;
    border: 1px solid var(--atrix-border-strong);
    border-radius: var(--atrix-radius-sm);
    background: rgba(0, 0, 0, 0.3);
    color: var(--atrix-text);
    font: inherit;
    font-size: 15.5px;
    transition: border-color 0.2s ease-out;
}

.apply-textarea {
    padding: 14px 16px;
    line-height: 1.6;
    resize: vertical;
}

.apply-input:focus {
    outline: none;
    border-color: var(--atrix-accent);
}

.apply-q.invalid .apply-input,
.apply-q.invalid .apply-choice span,
.apply-q.invalid .apply-box {
    border-color: rgba(var(--atrix-danger-rgb), 0.7);
}

.apply-count {
    align-self: flex-end;
    font-size: 13px;
    font-variant-numeric: tabular-nums;
    color: var(--atrix-text-dim);
}

.apply-count.met {
    color: var(--atrix-success);
}

.apply-field-error {
    font-size: 14px;
    color: var(--atrix-danger);
}

.apply-choices {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.apply-choice input,
.apply-confirm input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.apply-choice span {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 16px;
    border: 1px solid var(--atrix-border-strong);
    border-radius: var(--atrix-radius-sm);
    background: rgba(0, 0, 0, 0.3);
    color: var(--atrix-text-soft);
    font-size: 15px;
    cursor: pointer;
    transition: border-color 0.2s ease-out, background 0.2s ease-out, color 0.2s ease-out;
}

.apply-choice span:hover {
    border-color: var(--atrix-accent);
    color: var(--atrix-text);
}

.apply-choice input:checked + span {
    border-color: var(--atrix-accent);
    background: rgba(var(--atrix-accent-rgb), 0.14);
    color: var(--atrix-text);
}

.apply-choice input:focus-visible + span,
.apply-confirm input:focus-visible + .apply-box {
    outline: 2px solid var(--atrix-accent);
    outline-offset: 2px;
}

.apply-confirm {
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 44px;
    color: var(--atrix-text);
    cursor: pointer;
}

.apply-box {
    position: relative;
    flex: none;
    width: 22px;
    height: 22px;
    border: 1px solid var(--atrix-border-strong);
    border-radius: var(--atrix-radius-sm);
    background: rgba(0, 0, 0, 0.3);
    transition: border-color 0.2s ease-out, background 0.2s ease-out;
}

.apply-confirm:hover .apply-box {
    border-color: var(--atrix-accent);
}

.apply-confirm input:checked + .apply-box {
    border-color: var(--atrix-accent);
    background: var(--atrix-accent-grad);
}

.apply-confirm input:checked + .apply-box::after {
    content: "";
    position: absolute;
    left: 7px;
    top: 3px;
    width: 6px;
    height: 11px;
    border: solid var(--atrix-accent-ink);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.apply-history {
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
    list-style: none;
}

.apply-history li {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 0;
    border-top: 1px solid var(--atrix-border);
    color: var(--atrix-text-muted);
}

.apply-history b {
    color: var(--atrix-text-soft);
    font-weight: 500;
}

.apply-who {
    font-size: 14px;
    color: var(--atrix-text-dim);
}

.apply-who b {
    color: var(--atrix-text-muted);
}

.apply-link {
    padding: 0;
    border: 0;
    background: none;
    color: var(--atrix-accent);
    font: inherit;
    cursor: pointer;
}

.apply-danger {
    background: var(--atrix-danger);
    color: var(--atrix-text);
}

.btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none;
}

.apply-error {
    margin-bottom: 20px;
    padding: 14px 18px;
    border: 1px solid rgba(var(--atrix-danger-rgb), 0.45);
    border-radius: var(--atrix-radius-sm);
    background: rgba(var(--atrix-danger-rgb), 0.08);
    color: var(--atrix-text);
}

.apply-toast {
    position: fixed;
    left: 50%;
    bottom: 28px;
    z-index: 50;
    padding: 12px 20px;
    border: 1px solid rgba(var(--atrix-accent-rgb), 0.45);
    border-radius: var(--atrix-radius-sm);
    background: var(--atrix-surface-solid);
    color: var(--atrix-text);
    box-shadow: var(--atrix-shadow);
    transform: translateX(-50%);
    animation: apply-toast 0.25s ease-out;
}

@keyframes apply-toast {
    from {
        opacity: 0;
        transform: translate(-50%, 10px);
    }
}

@media (max-width: 720px) {
    .apply-split {
        flex-direction: column;
        align-items: flex-start;
    }
}
