/* KI-LOTSE — Good Practice submission form */

.hrk-submission {
    --hrk-ki-lila: #7300FF;
    --hrk-ki-blau: #4230F2;
    --hrk-gradient-end: #281064;
    --hrk-sunset-pink: #FF6D7F;
    --hrk-success-green: #6DFFB6;
    --hrk-text: #1c1c1c;
    --hrk-muted: #5a5a5a;
    --hrk-border: #d4d4d4;
    --hrk-bg: #f6f6f9;
    --hrk-error: #c52f2f;

    font-family: 'Nunito Sans', system-ui, sans-serif;
    color: var(--hrk-text);
    line-height: 1.55;
    background: var(--hrk-bg);
    padding-bottom: 64px;
    /* Unbroken tokens (URLs, Testeingaben) müssen überall umbrechen
       dürfen — 'anywhere' zählt anders als 'break-word' auch in die
       min-content-Breite von Grid-/Flex-Zellen hinein. */
    overflow-wrap: anywhere;
}

.hrk-submission * { box-sizing: border-box; }

.hrk-submission .hrk-sr-only {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Hero --------------------------------------------------------------- */

.hrk-submission-hero {
    background: linear-gradient(135deg, var(--hrk-ki-lila), var(--hrk-gradient-end));
    color: #fff;
    padding: 64px 24px 48px;
    text-align: left;
}

/* Breadcrumb ---------------------------------------------------------- */
/* Own band above the hero, same as on the archive. Rules duplicated from
   search.css — the two stylesheets never load together. No hover styling by
   customer request; keyboard focus keeps a visible ring (WCAG 2.4.7). */
.hrk-submission .hrk-breadcrumb {
    padding: 20px 24px;
    background: linear-gradient(135deg, var(--hrk-ki-lila), var(--hrk-gradient-end));
    font-family: 'Nunito Sans', system-ui, sans-serif;
    font-size: 15px;
    line-height: 1.5;
    color: #fff;
    font-weight: 700;
}
.hrk-submission .hrk-breadcrumb a,
.hrk-submission .hrk-breadcrumb a:hover {
    color: rgba(255, 255, 255, 0.85);
    font-weight: 400;
    text-decoration: none;
}
.hrk-submission .hrk-breadcrumb a:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
    border-radius: 2px;
}

.hrk-submission-hero-inner {
    max-width: 880px;
    margin: 0 auto;
}
.hrk-submission-hero h1 {
    margin: 0 0 8px;
    font-size: clamp(28px, 5vw, 44px);
    font-weight: 700;
    line-height: 1.15;
    color: #fff !important;
}
.hrk-submission-hero p {
    margin: 0;
    opacity: 0.92;
    max-width: 640px;
    font-size: 17px;
}

/* Success / warning banners ------------------------------------------ */

.hrk-submission-success,
.hrk-submission-warning {
    max-width: 880px;
    margin: 32px auto 0;
    padding: 20px 24px;
    border-radius: 14px;
}
.hrk-submission-success {
    background: rgba(109, 255, 182, 0.16);
    border: 1px solid rgba(31, 143, 83, 0.35);
}
.hrk-submission-warning {
    background: rgba(197, 47, 47, 0.05);
    border: 1px solid rgba(197, 47, 47, 0.25);
}
.hrk-submission-warning > p:first-child {
    margin: 0 0 8px;
    font-weight: 700;
    color: var(--hrk-error);
}
.hrk-submission-success h2 {
    margin: 0 0 8px;
    color: var(--hrk-ki-lila);
}
.hrk-submission-success:focus-visible,
.hrk-submission-warning:focus-visible {
    outline: 2px solid var(--hrk-ki-lila);
    outline-offset: 2px;
}
.hrk-error-list {
    margin: 8px 0 0;
    padding-left: 20px;
    color: var(--hrk-error);
    font-weight: 600;
}
.hrk-error-list li { margin: 2px 0; }

/* Stepper ------------------------------------------------------------ */

.hrk-stepper {
    max-width: 880px;
    margin: 32px auto 0;
    padding: 0 24px;
    list-style: none;
    display: flex;
    gap: 8px;
    counter-reset: step;
}
.hrk-stepper-item {
    flex: 1;
    position: relative;
    color: var(--hrk-muted);
    font-size: 13px;
    text-align: center;
}
.hrk-stepper-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    width: 100%;
    background: none;
    border: 0;
    padding: 0;
    margin: 0;
    font: inherit;
    color: inherit;
    cursor: pointer;
}
.hrk-stepper-item + .hrk-stepper-item::before {
    content: '';
    position: absolute;
    top: 20px;
    left: -50%;
    width: 100%;
    height: 2px;
    background: var(--hrk-border);
    z-index: 0;
}
.hrk-stepper-item.is-completed + .hrk-stepper-item::before,
.hrk-stepper-item.is-active + .hrk-stepper-item::before {
    background: var(--hrk-ki-lila);
}
.hrk-stepper-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid var(--hrk-border);
    color: var(--hrk-muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 15px;
    z-index: 1;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.hrk-stepper-item.is-active .hrk-stepper-circle {
    background: var(--hrk-ki-lila);
    border-color: var(--hrk-ki-lila);
    color: #fff;
    box-shadow: 0 0 0 4px rgba(115, 0, 255, 0.15);
}
.hrk-stepper-item.is-completed .hrk-stepper-circle {
    background: var(--hrk-success-green);
    border-color: var(--hrk-success-green);
    color: #1c1c1c;
}
.hrk-stepper-item.is-completed .hrk-stepper-circle::after {
    content: '✓';
}
.hrk-stepper-item.is-completed .hrk-stepper-circle > * { display: none; }
.hrk-stepper-item.is-active .hrk-stepper-label { color: var(--hrk-ki-lila); font-weight: 700; }

@media (max-width: 1199px) {
    /* Break out of theme content wrapper to span full viewport width */
    .hrk-submission {
        width: 100vw;
        max-width: 100vw;
        margin-left: calc(50% - 50vw);
        margin-right: calc(50% - 50vw);
        overflow-x: clip;
    }
}

@media (max-width: 720px) {
    .hrk-stepper-label { display: none; }
    .hrk-stepper { padding: 0 16px; }
}

@media (max-width: 480px) {
    .hrk-submission-hero {
        padding: 40px 16px 32px;
    }
    .hrk-submission .hrk-breadcrumb { padding: 16px; }
    .hrk-submission-hero p { font-size: 15px; }

    .hrk-submission-success,
    .hrk-submission-warning {
        margin: 20px 16px 0;
        padding: 16px 18px;
    }

    .hrk-stepper {
        margin-top: 24px;
        padding: 0 12px;
        gap: 4px;
    }
    .hrk-stepper-circle {
        width: 32px;
        height: 32px;
        font-size: 13px;
    }
    .hrk-stepper-item + .hrk-stepper-item::before { top: 16px; }

    .hrk-submission-form {
        margin: 20px 16px 0;
        border-radius: 14px;
        padding: 28px 18px;
    }
    .hrk-step h2 { font-size: 22px; margin-bottom: 18px; }
    .hrk-step h3 { font-size: 16px; margin: 24px 0 10px; }

    .hrk-checkbox-group {
        gap: 10px 16px;
        padding: 12px 12px;
    }

    .hrk-file-drop { padding: 24px 16px; }

    .hrk-step-nav {
        flex-wrap: wrap;
        gap: 10px;
        margin-top: 24px;
        padding-top: 20px;
    }
    .hrk-btn-primary,
    .hrk-btn-secondary {
        padding: 11px 18px;
        font-size: 14px;
        flex: 1 1 auto;
        justify-content: center;
    }
    .hrk-btn-submit {
        padding: 14px 22px;
        font-size: 15px;
        flex: 1 1 auto;
    }

    .hrk-review dl {
        padding: 14px 16px;
    }
}

@media (max-width: 360px) {
    .hrk-stepper-circle {
        width: 28px;
        height: 28px;
        font-size: 12px;
        border-width: 1.5px;
    }
    .hrk-stepper-item + .hrk-stepper-item::before { top: 14px; }
    .hrk-submission-form { padding: 24px 14px; }
}

/* Form card ---------------------------------------------------------- */

.hrk-submission-form {
    max-width: 880px;
    margin: 24px auto 0;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 28px rgba(115, 0, 255, 0.08);
    padding: 40px clamp(20px, 4vw, 48px);
}

.hrk-step {
    border: 0;
    padding: 0;
    margin: 0;
}
.hrk-step[hidden] { display: none; }
.hrk-step + .hrk-step { margin-top: 0; }

.hrk-section-label {
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 13px;
    font-weight: 700;
    color: var(--hrk-sunset-pink);
    margin-bottom: 8px;
}
.hrk-step h2 {
    font-size: 26px;
    margin: 0 0 24px;
    font-weight: 700;
}
.hrk-step h3 {
    font-size: 18px;
    margin: 32px 0 12px;
    font-weight: 700;
    color: var(--hrk-ki-lila);
}

/* Honeypot ----------------------------------------------------------- */

.hrk-hp {
    position: absolute;
    left: -9999px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* Fields ------------------------------------------------------------- */

.hrk-field {
    margin-bottom: 20px;
}
.hrk-field > label,
.hrk-field .hrk-field-label {
    display: block;
    font-weight: 700;
    margin-bottom: 6px;
    font-size: 14px;
}
.hrk-req {
    color: var(--hrk-error);
    margin-left: 2px;
}
.hrk-field input[type="text"],
.hrk-field input[type="email"],
.hrk-field input[type="url"],
.hrk-field select,
.hrk-field textarea {
    width: 100%;
    padding: 8px 12px;
    font: inherit;
    line-height: 1.4;
    color: inherit;
    border: 1px solid var(--hrk-border);
    border-radius: 10px;
    background: #fff;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.hrk-field input:focus-visible,
.hrk-field select:focus-visible,
.hrk-field textarea:focus-visible {
    border-color: var(--hrk-ki-lila);
    outline: 2px solid var(--hrk-ki-lila);
    outline-offset: 2px;
    box-shadow: 0 0 0 3px rgba(115, 0, 255, 0.25);
}
.hrk-field textarea { resize: vertical; min-height: 80px; }

/* Combobox (A.5 Hochschule autocomplete) */
.hrk-combobox {
    position: relative;
}
.hrk-combobox-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin: 4px 0 0 0;
    padding: 4px 0;
    list-style: none;
    background: #fff;
    border: 1px solid var(--hrk-border);
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    max-height: 280px;
    overflow-y: auto;
    font: inherit;
    color: inherit;
    z-index: 5;
}
.hrk-combobox-list[hidden] {
    display: none;
}
.hrk-combobox-option {
    padding: 8px 12px;
    cursor: pointer;
    line-height: 1.3;
}
.hrk-combobox-option:hover,
.hrk-combobox-option[aria-selected="true"] {
    background: rgba(115, 0, 255, 0.1);
    color: var(--hrk-ki-lila);
}
.hrk-field {
    scroll-margin-top: 96px;
}
.hrk-field--error {
    position: relative;
}
.hrk-field--error input,
.hrk-field--error select,
.hrk-field--error textarea,
.hrk-field--error .hrk-checkbox-group,
.hrk-field--error .hrk-file-drop {
    border-color: var(--hrk-error);
    background-color: rgba(197, 47, 47, 0.04);
}
.hrk-field-error {
    color: var(--hrk-error);
    margin: 6px 0 0;
    font-size: 13px;
    font-weight: 600;
}
.hrk-step-alert {
    margin: 16px 0;
}
.hrk-field-help {
    color: var(--hrk-muted);
    margin: 6px 0 0;
    font-size: 13px;
}

/* Bullet-syntax tip below long text fields — same voice as the help text,
   one notch quieter so it never competes with the field's own subline. */
.hrk-field-hint {
    margin-top: 4px;
    font-size: 12px;
    font-style: italic;
}

/* Checkbox group ----------------------------------------------------- */

.hrk-checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 20px;
    padding: 14px 16px;
    border: 1px solid var(--hrk-border);
    border-radius: 12px;
    background: #fff;
}
.hrk-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 4px 2px;
    font-weight: 400;
    line-height: 1.3;
    color: var(--hrk-text);
    margin: 0;
    cursor: pointer;
    user-select: none;
}
.hrk-checkbox input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    flex: 0 0 auto;
    width: 20px;
    height: 20px;
    margin: 0;
    border: 2px solid var(--hrk-border);
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
    display: inline-grid;
    place-content: center;
}
.hrk-checkbox input[type="checkbox"]::before {
    content: "";
    width: 12px;
    height: 12px;
    transform: scale(0);
    transform-origin: center;
    transition: transform 0.12s ease-in-out;
    background-color: #fff;
    /* White checkmark glyph */
    clip-path: polygon(14% 47%, 0 60%, 40% 100%, 100% 22%, 86% 10%, 38% 71%);
}
.hrk-checkbox input[type="checkbox"]:checked {
    background: var(--hrk-ki-lila);
    border-color: var(--hrk-ki-lila);
}
.hrk-checkbox input[type="checkbox"]:checked::before {
    transform: scale(1);
}
.hrk-checkbox:hover input[type="checkbox"]:not(:checked) {
    border-color: var(--hrk-ki-lila);
}
.hrk-checkbox input[type="checkbox"]:focus-visible {
    outline: none;
    border-color: var(--hrk-ki-lila);
    /* Solid (non-alpha) ring, matching the >=3:1 contrast this codebase
       already relies on for other focus-visible outlines (see .hrk-field
       input:focus-visible above) — a translucent shadow alone doesn't
       reliably clear WCAG 1.4.11 against the white background. */
    box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--hrk-ki-lila);
}
.hrk-checkbox input[type="checkbox"]:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

/* File drop ---------------------------------------------------------- */

.hrk-file-drop {
    position: relative;
    border: 2px dashed rgba(115, 0, 255, 0.4);
    border-radius: 12px;
    padding: 32px 24px;
    text-align: center;
    background: #fff;
    transition: background 0.15s, border-color 0.15s;
}
.hrk-file-drop.is-dragover {
    border-color: var(--hrk-ki-lila);
    background: rgba(115, 0, 255, 0.06);
}
.hrk-file-drop input[type="file"] {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}
.hrk-file-prompt {
    margin: 0;
    color: var(--hrk-muted);
    font-size: 15px;
}
.hrk-file-prompt small { color: #8a8a8a; }

.hrk-file-list {
    list-style: none;
    padding: 0;
    margin: 16px 0 0;
    text-align: left;
    /* Lift the list above the file input, which is stretched across the whole
       drop area to make it clickable. Without this the input covers the list
       and a click on a remove button opens the picker instead of removing the
       file. Empty lists have no height, so the drop area stays fully clickable
       until something is attached. */
    position: relative;
    z-index: 1;
}
.hrk-file-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 12px;
    border: 1px solid var(--hrk-border);
    border-radius: 8px;
    margin-bottom: 6px;
    background: #fff;
}
.hrk-file-list .hrk-file-name { flex: 1; word-break: break-all; }
.hrk-file-list .hrk-file-size { color: var(--hrk-muted); font-size: 13px; }
.hrk-file-list .hrk-file-remove {
    background: none;
    border: 0;
    color: var(--hrk-error);
    font-size: 18px;
    cursor: pointer;
    padding: 0 4px;
}

.hrk-fileinfo {
    margin: 8px 0 0;
    color: var(--hrk-muted);
    font-size: 13px;
}
.hrk-fileinfo.is-over {
    color: var(--hrk-error);
    font-weight: 700;
}

.hrk-file-error {
    margin: 6px 0 0;
    color: var(--hrk-error);
    font-size: 13px;
    font-weight: 600;
}

/* Buttons ------------------------------------------------------------ */

.hrk-step-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid #eee;
}
.hrk-btn-primary,
.hrk-btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: 999px;
    font: inherit;
    font-weight: 700;
    font-size: 15px;
    line-height: 1;
    border: 2px solid transparent;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, box-shadow 0.15s, transform 0.05s;
}
.hrk-btn-primary {
    background: var(--hrk-ki-lila);
    color: #fff;
}
.hrk-btn-primary:hover { box-shadow: 0 6px 18px rgba(115, 0, 255, 0.25); }
.hrk-btn-primary:active { transform: translateY(1px); }
.hrk-btn-primary:disabled { opacity: 0.5; cursor: not-allowed; box-shadow: none; }
.hrk-btn-secondary {
    background: transparent;
    color: var(--hrk-ki-lila);
    border-color: var(--hrk-ki-lila);
}
.hrk-btn-secondary:hover { background: rgba(115, 0, 255, 0.06); }

/* Final submit — echoes the hero gradient as the journey's endpoint. */
.hrk-btn-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 16px 36px;
    border-radius: 999px;
    font: inherit;
    font-weight: 700;
    font-size: 17px;
    line-height: 1;
    border: 0;
    cursor: pointer;
    color: #fff;
    background: linear-gradient(135deg, var(--hrk-ki-lila), var(--hrk-gradient-end));
    box-shadow: 0 8px 22px rgba(115, 0, 255, 0.28);
    transition: box-shadow 0.18s ease, transform 0.06s ease, filter 0.18s ease;
}
.hrk-btn-submit:hover { box-shadow: 0 12px 28px rgba(115, 0, 255, 0.36); filter: brightness(1.04); }
.hrk-btn-submit:active { transform: translateY(1px); }
.hrk-btn-submit:focus-visible {
    outline: 2px solid var(--hrk-sunset-pink);
    outline-offset: 3px;
}
.hrk-btn-submit:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    box-shadow: none;
    filter: none;
}

/* Review screen ------------------------------------------------------ */

.hrk-review dl {
    margin: 16px 0 0;
    padding: 16px 20px;
    border: 1px solid var(--hrk-border);
    border-radius: 12px;
    background: #fafafa;
}
.hrk-review dt {
    font-weight: 700;
    margin-top: 12px;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--hrk-muted);
}
.hrk-review dt:first-child { margin-top: 0; }
.hrk-review dd {
    margin: 4px 0 0;
    word-break: break-word;
}
.hrk-review dd:empty::after {
    content: '—';
    color: var(--hrk-muted);
}

/* Drafts: save & resume later --------------------------------------- */

.hrk-submission-info {
    max-width: 880px;
    margin: 32px auto 0;
    padding: 20px 24px;
    border-radius: 14px;
    background: rgba(115, 0, 255, 0.06);
    border: 1px solid rgba(115, 0, 255, 0.18);
}
.hrk-submission-info p { margin: 0; }

.hrk-draft-local-banner {
    max-width: 880px;
    margin: 16px auto 0;
    padding: 16px 24px;
    border-radius: 14px;
    background: rgba(115, 0, 255, 0.06);
    border: 1px solid rgba(115, 0, 255, 0.18);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.hrk-draft-local-banner[hidden] { display: none; }
.hrk-draft-local-banner p { margin: 0; font-weight: 600; color: var(--hrk-ki-lila); }
.hrk-draft-local-actions { display: flex; gap: 8px; }

.hrk-draft-resume {
    max-width: 880px;
    margin: 16px auto 0;
    padding: 12px 24px;
    background: #fff;
    border: 1px solid var(--hrk-border);
    border-radius: 14px;
}
.hrk-draft-resume summary {
    cursor: pointer;
    font-weight: 700;
    color: var(--hrk-ki-lila);
    padding: 4px 0;
}
.hrk-draft-resume summary:focus-visible {
    outline: 2px solid var(--hrk-ki-lila);
    outline-offset: 2px;
    border-radius: 4px;
}
.hrk-draft-resume-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    padding: 12px 0 4px;
}
.hrk-draft-code-input {
    flex: 1 1 200px;
    padding: 10px 14px;
    border: 2px solid var(--hrk-border);
    border-radius: 8px;
    font: inherit;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 16px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}
.hrk-draft-code-input:focus-visible {
    outline: 2px solid var(--hrk-ki-lila);
    outline-offset: 2px;
    border-color: var(--hrk-ki-lila);
}
.hrk-draft-resume-status {
    flex-basis: 100%;
    margin: 4px 0 0;
    font-size: 14px;
    color: var(--hrk-muted);
}

.hrk-draft-save-bar {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px dashed var(--hrk-border);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}
.hrk-draft-save-help {
    margin: 0;
    font-size: 13px;
    color: var(--hrk-muted);
    flex: 1 1 240px;
}

.hrk-draft-code-panel {
    margin-top: 24px;
    padding: 28px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--hrk-ki-lila), var(--hrk-gradient-end));
    color: #fff;
    box-shadow: 0 12px 32px rgba(115, 0, 255, 0.25);
}
.hrk-draft-code-panel h3 {
    margin: 0 0 8px;
    color: #fff;
    font-size: 20px;
}
.hrk-draft-code-panel p {
    margin: 0 0 16px;
    opacity: 0.92;
}
.hrk-draft-code-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}
.hrk-draft-code {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 28px;
    font-weight: 700;
    letter-spacing: 0.18em;
    padding: 10px 18px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    user-select: all;
}
.hrk-btn-on-dark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: 999px;
    border: none;
    background: var(--hrk-success-green);
    color: #0d2f1a;
    font: inherit;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
}
.hrk-btn-on-dark:hover { filter: brightness(1.05); }
.hrk-btn-on-dark:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}
.hrk-draft-code-status {
    margin: 12px 0 0;
    font-size: 14px;
    color: var(--hrk-success-green);
    min-height: 1.2em;
}
.hrk-btn-text {
    margin-top: 16px;
    background: none;
    border: none;
    color: #fff;
    text-decoration: underline;
    cursor: pointer;
    font: inherit;
    padding: 4px 0;
}
.hrk-btn-text:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

/* --------------------------------------------------------------------------
 * Altcha widget — fully hidden.
 * The widget runs in `auto="onsubmit"` mode (see templates/submission-form.php),
 * which means Altcha intercepts the form's submit event programmatically,
 * fetches and solves the proof-of-work challenge, then injects the solution
 * into the hidden input named `hrk_gp_altcha` and re-submits. None of that
 * requires a visible UI — the user never has to click anything. We hide the
 * entire widget so it doesn't add visual noise above the submit button.
 *
 * If verification ever needs to surface (e.g. for an error state), remove
 * this rule or scope it to `:not([data-state="error"])`.
 * -------------------------------------------------------------------------- */
altcha-widget {
    display: none !important;
}

/* --------------------------------------------------------------------------
 * Submit-button loading state
 *
 * The Altcha proof-of-work runs in a Web Worker between click and the actual
 * POST (~1–3s of CPU work), so the user otherwise sees a frozen page with no
 * feedback. wizard.js adds `.is-submitting` to the submit button as soon as
 * step validation passes; this swaps the label for a spinner + status text.
 *
 * `pointer-events: none` blocks re-clicks without setting the `disabled`
 * attribute — that matters because Altcha's `form.requestSubmit(submitter)`
 * call throws TypeError if the submitter button is disabled.
 * -------------------------------------------------------------------------- */
.hrk-btn-submit-loading {
    display: none;
    align-items: center;
    gap: 10px;
}
.hrk-btn-submit-spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: hrk-btn-spin 0.8s linear infinite;
    flex-shrink: 0;
}
.hrk-btn-submit.is-submitting {
    pointer-events: none;
    cursor: wait;
    filter: brightness(0.92);
}
.hrk-btn-submit.is-submitting .hrk-btn-submit-label {
    display: none;
}
.hrk-btn-submit.is-submitting .hrk-btn-submit-loading {
    display: inline-flex;
}
@keyframes hrk-btn-spin {
    to { transform: rotate(360deg); }
}
@media (prefers-reduced-motion: reduce) {
    .hrk-btn-submit-spinner { animation-duration: 2.5s; }
}
