/* EDK Recognition Wizard — theme layer on top of Bootstrap 5.3.
   Only what Bootstrap utilities cannot express: brand tokens, the square
   corner language, the vertical stepper, and the option cards. */

:root,
[data-bs-theme="light"] {
    --edk-plum: #573b55;
    --edk-plum-dark: #3d293c;
    --edk-plum-tint: #f4eff3;
    --edk-shell: #eef5f7;
    --edk-panel: #f6fafb;
    --edk-line: #e4e7ea;
    --edk-line-strong: #c4cad1;
    --edk-muted: #6b7480;
    /* The side rail is a fixed column, not a share of the grid: at 25% it
       shrank to ~190px of usable width on a small laptop and wrapped the
       stepper labels. The main column takes whatever is left (col-lg). */
    --edk-aside-width: 300px;

    --bs-primary: #573b55;
    --bs-primary-rgb: 87, 59, 85;
    --bs-link-color: #573b55;
    --bs-link-color-rgb: 87, 59, 85;
    --bs-link-hover-color: #3d293c;
    --bs-link-hover-color-rgb: 61, 41, 60;
    --bs-body-color: #000;
    --bs-body-color-rgb: 0, 0, 0;
    --bs-body-bg: #eef5f7;
    --bs-border-color: #e4e7ea;
    --bs-body-font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    --bs-border-radius: 0;
    --bs-border-radius-sm: 0;
    --bs-border-radius-lg: 0;
    --bs-border-radius-xl: 0;
    --bs-focus-ring-color: rgba(87, 59, 85, .25);
}

body {
    -webkit-font-smoothing: antialiased;
    text-wrap: pretty;
}

/* Square everything except the stepper pills. */
.btn, .form-control, .form-select, .card, .alert, .form-check-input[type="checkbox"] {
    border-radius: 0;
}

.btn-primary {
    --bs-btn-bg: var(--edk-plum);
    --bs-btn-border-color: var(--edk-plum);
    --bs-btn-hover-bg: var(--edk-plum-dark);
    --bs-btn-hover-border-color: var(--edk-plum-dark);
    --bs-btn-active-bg: var(--edk-plum-dark);
    --bs-btn-active-border-color: var(--edk-plum-dark);
    --bs-btn-font-weight: 600;
    padding: .8rem 1.75rem;
}

.btn-outline-secondary {
    --bs-btn-color: #3a424c;
    --bs-btn-border-color: var(--edk-line-strong);
    --bs-btn-hover-bg: #f2f4f5;
    --bs-btn-hover-color: #000;
    --bs-btn-hover-border-color: #a9b1ba;
    --bs-btn-font-weight: 600;
    padding: .75rem 1.5rem;
}

.form-check-input:checked {
    background-color: var(--edk-plum);
    border-color: var(--edk-plum);
}

.form-select:focus, .form-check-input:focus, .btn:focus-visible {
    border-color: var(--edk-plum);
    box-shadow: 0 0 0 .25rem rgba(87, 59, 85, .2);
}

/* ---- Shell ---------------------------------------------------------- */

.edk-shell {
    max-width: 1180px;
}

.edk-panel {
    background: #fff;
    border: 1px solid #dcdfe3;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .05);
}

.edk-rule {
    height: 3px;
    background: #000;
}

.edk-logo {
    height: 74px;
    width: auto;
}

@media (max-width: 575.98px) {
    .edk-logo { height: 52px; }
}

.edk-eyebrow {
    font-size: .75rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    font-weight: 600;
    color: var(--edk-plum);
}

.edk-kicker {
    font-size: .7rem;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: #8b939d;
}

.edk-lang .btn {
    padding: .3rem .55rem;
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .04em;
}

.edk-lang .btn-primary {
    --bs-btn-bg: #000;
    --bs-btn-border-color: #000;
    --bs-btn-hover-bg: #000;
    --bs-btn-hover-border-color: #000;
}

.edk-aside {
    background: var(--edk-panel);
    border-right: 1px solid var(--edk-line);
}

/* Below lg the columns stack and the rail is full width; only pin it once it
   sits beside the content. */
@media (min-width: 992px) {
    .edk-aside {
        width: var(--edk-aside-width);
    }
}

.edk-footer {
    background: var(--edk-panel);
    border-top: 1px solid var(--edk-line);
    font-size: .8rem;
    color: var(--edk-muted);
}

.edk-footer a {
    color: var(--edk-muted);
}

/* ---- Facts row (home) ----------------------------------------------- */

.edk-facts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    border-top: 1px solid var(--edk-line);
}

.edk-facts > * {
    padding: 1.875rem 2rem;
    border-right: 1px solid var(--edk-line);
}

.edk-facts > *:last-child {
    border-right: 0;
}

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

.edk-stepper li {
    display: flex;
    align-items: center;
    gap: .7rem;
    padding: .45rem 0;
    font-size: .9rem;
    color: var(--edk-muted);
}

.edk-stepper .edk-badge {
    flex: 0 0 auto;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .75rem;
    font-weight: 700;
    background: #e8ebed;
    color: #8b939d;
}

.edk-stepper li[data-state="active"] { color: #000; font-weight: 600; }
.edk-stepper li[data-state="active"] .edk-badge { background: var(--edk-plum); color: #fff; }
.edk-stepper li[data-state="done"] .edk-badge { background: #8a6c88; color: #fff; }
.edk-stepper li[data-state="skipped"] { color: #b8bfc6; text-decoration: line-through; }
.edk-stepper li[data-state="skipped"] .edk-badge { background: #f2f4f5; color: #b8bfc6; }

/* ---- Option cards --------------------------------------------------- */

.edk-option {
    border: 1px solid #dcdfe3;
    padding: .95rem 1.15rem .95rem 2.9rem;
    margin-bottom: .5rem;
}

.edk-option .form-check-input {
    width: 1.15rem;
    height: 1.15rem;
    margin-left: -1.75rem;
    margin-top: .15rem;
    cursor: pointer;
}

.edk-option .form-check-label {
    font-size: 1rem;
    line-height: 1.4;
    cursor: pointer;
}

.edk-option:has(.form-check-input:checked) {
    border-color: var(--edk-plum);
    background: var(--edk-plum-tint);
    box-shadow: inset 2px 0 0 var(--edk-plum);
}

.edk-option:has(.form-check-input:checked) .form-check-label {
    font-weight: 600;
}

/* Reveal an option's info text and its free-text follow-up only while its
   input is selected. Works for radios and checkboxes, and shows a pre-selected
   option's follow-ups on first render with no JS. No Bootstrap utility
   expresses "show when a sibling is :checked", so these rules stay hand-written. */
.option-info, .option-text {
    display: none;
}

.form-check-input:checked ~ .option-info {
    display: block;
    margin-top: .75rem;
    padding-top: .75rem;
    border-top: 1px solid var(--edk-line);
    font-size: .875rem;
    line-height: 1.55;
    color: #6b5410;
}

.form-check-input:checked ~ .option-text {
    display: block;
    margin-top: .75rem;
}

/* ---- Step info note -------------------------------------------------- */

/* The step-level definitions resolved from `info_section` — context for the
   question, not an answer, so they read as a quiet note rather than an alert. */
.step-info {
    background: var(--edk-plum-tint);
    border: 0;
    border-left: 3px solid var(--edk-plum);
    padding: 1rem 1.25rem;
    font-size: .9375rem;
    line-height: 1.6;
    color: #3a424c;
}

/* ---- Result --------------------------------------------------------- */

.edk-block {
    border-left: 2px solid var(--edk-line);
    padding: .15rem 0 .25rem 1.5rem;
    margin-bottom: 1.375rem;
}

.edk-summary dt {
    font-size: .75rem;
    color: #8b939d;
    font-weight: 400;
}

.edk-summary dd {
    font-size: .9rem;
    margin-bottom: 0;
    line-height: 1.45;
}

.edk-summary > div {
    padding: .7rem 0 .75rem;
    border-bottom: 1px solid #e8ebed;
}

.edk-pre-line {
    white-space: pre-line;
}

/* Text blocks arrive as HTML from the masterfile (see wizard/markup.py):
   paragraphs and up to two levels of bullets. The last paragraph loses its
   margin so a block sits flush in its container. */
.edk-richtext > :last-child {
    margin-bottom: 0;
}

.edk-richtext ul {
    padding-left: 1.25rem;
}

.edk-richtext li {
    margin-bottom: .35rem;
}

@media print {
    body { background: #fff; }
    .edk-panel { border: 0; box-shadow: none; }
    .edk-aside, .edk-lang, .edk-no-print { display: none !important; }
}
