.flow-selection-page {
    padding: 30px 0 72px;
    background: #f7f9fb;
}


/* ==================================================
   面包屑
================================================== */

.selection-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;

    margin-bottom: 24px;

    color: #7a8792;
    font-size: 13px;
    line-height: 1.6;
}


.selection-breadcrumb a {
    color: #586a78;
    text-decoration: none;
}


.selection-breadcrumb a:hover {
    color: #176fa9;
}


/* ==================================================
   页面头部
================================================== */

.flow-selection-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 28px;

    margin-bottom: 30px;
    padding: 34px 38px;

    border: 1px solid #dfe7ee;
    border-radius: 18px;

    background:
        linear-gradient(
            135deg,
            #ffffff 0%,
            #f4f9fc 100%
        );

    box-shadow:
        0 10px 28px rgba(34, 58, 77, 0.06);
}


.selection-eyebrow {
    display: inline-block;
    margin-bottom: 10px;

    color: #176fa9;

    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}


.flow-selection-header h1 {
    margin: 0 0 13px;

    color: #18232d;

    font-size: clamp(30px, 4vw, 44px);
    line-height: 1.2;
    font-weight: 820;
    letter-spacing: -0.025em;
}


.flow-selection-header p {
    max-width: 760px;
    margin: 0;

    color: #60717f;

    font-size: 15px;
    line-height: 1.85;
}


.header-badge {
    flex: 0 0 auto;

    min-width: 150px;
    padding: 16px 18px;

    border: 1px solid #d8e5ee;
    border-radius: 13px;

    background: #ffffff;

    text-align: center;
}


.header-badge strong,
.header-badge span {
    display: block;
}


.header-badge strong {
    margin-bottom: 5px;

    color: #176fa9;

    font-size: 15px;
    font-weight: 800;
}


.header-badge span {
    color: #7b8995;

    font-size: 12px;
    line-height: 1.5;
}


/* ==================================================
   步骤进度
================================================== */

.selection-progress {
    display: grid;
    grid-template-columns:
        minmax(140px, auto)
        minmax(40px, 1fr)
        minmax(140px, auto)
        minmax(40px, 1fr)
        minmax(140px, auto);

    align-items: center;
    gap: 14px;

    margin-bottom: 26px;
    padding: 20px 24px;

    border: 1px solid #e1e8ee;
    border-radius: 14px;

    background: #ffffff;

    box-shadow:
        0 7px 20px rgba(38, 57, 73, 0.05);
}


.progress-item {
    display: flex;
    align-items: center;
    gap: 11px;

    color: #97a2ab;
}


.progress-item span {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 34px;
    height: 34px;
    flex: 0 0 34px;

    border: 1px solid #d7dee4;
    border-radius: 50%;

    background: #f4f6f8;

    color: #8c98a2;

    font-size: 13px;
    font-weight: 800;
}


.progress-item strong {
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
}


.progress-item.active {
    color: #176fa9;
}


.progress-item.active span {
    border-color: #176fa9;

    background: #176fa9;
    color: #ffffff;
}


.progress-item.current strong {
    font-weight: 800;
}


.progress-line {
    height: 2px;

    background: #e4e9ed;
}


/* ==================================================
   主布局
================================================== */

.flow-selection-layout {
    display: grid;
    grid-template-columns:
        minmax(0, 1fr)
        minmax(280px, 340px);

    gap: 24px;
    align-items: start;
}


/* ==================================================
   表单卡片
================================================== */

.selection-form {
    min-width: 0;
    padding: 30px;

    border: 1px solid #e0e7ed;
    border-radius: 16px;

    background: #ffffff;

    box-shadow:
        0 10px 30px rgba(32, 53, 69, 0.06);
}


.form-step {
    display: none;
}


.form-step.active {
    display: block;
}


.form-section-title {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;

    margin-bottom: 28px;
    padding-bottom: 20px;

    border-bottom: 1px solid #edf1f4;
}


.form-section-title span {
    display: block;
    margin-bottom: 7px;

    color: #176fa9;

    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.07em;
}


.form-section-title h2 {
    margin: 0;

    color: #1c2933;

    font-size: 25px;
    line-height: 1.3;
    font-weight: 800;
}


.form-section-title p {
    margin: 4px 0 0;

    color: #87939c;

    font-size: 12px;
    line-height: 1.6;
    text-align: right;
}


.form-grid {
    display: grid;
    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 22px;
}


.form-field {
    min-width: 0;
}


.form-field.full {
    grid-column: 1 / -1;
}


.form-field label {
    display: block;
    margin-bottom: 9px;

    color: #344653;

    font-size: 14px;
    font-weight: 700;
}


.form-field input,
.form-field select {
    width: 100%;
    height: 46px;
    padding: 0 13px;

    border: 1px solid #d8e0e6;
    border-radius: 9px;

    background: #ffffff;
    color: #23333f;

    font-size: 14px;

    outline: none;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background-color 0.2s ease;
}


.form-field input::placeholder {
    color: #a2abb2;
}


.form-field input:hover,
.form-field select:hover {
    border-color: #b9c8d3;
}


.form-field input:focus,
.form-field select:focus {
    border-color: #176fa9;

    box-shadow:
        0 0 0 3px rgba(23, 111, 169, 0.12);
}


.form-field input:invalid:not(:placeholder-shown),
.form-field select:invalid {
    box-shadow: none;
}


.field-hint {
    margin-top: 7px;

    color: #8b969f;

    font-size: 12px;
    line-height: 1.55;
}


/* ==================================================
   分段控件
================================================== */

.segmented-control {
    display: grid;
    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    gap: 10px;
}


.segment {
    position: relative;

    display: flex;
    align-items: center;
    justify-content: center;

    min-height: 46px;
    margin: 0;

    border: 1px solid #d9e1e7;
    border-radius: 9px;

    background: #ffffff;

    color: #61717e;

    cursor: pointer;

    transition:
        border-color 0.2s ease,
        background-color 0.2s ease,
        color 0.2s ease;
}


.segment input {
    position: absolute;

    width: 1px;
    height: 1px;

    opacity: 0;
    pointer-events: none;
}


.segment span {

    display:flex;

    align-items:center;

    justify-content:center;

    width:100%;

    height:100%;

    line-height:1;

    font-size:14px;

    font-weight:700;

}

.segment.active,
.segment:has(input:checked) {
    border-color: #176fa9;

    background: #edf7fd;
    color: #176fa9;
}


.segment.disabled {
    background: #f5f6f7;
    color: #adb5bb;

    cursor: not-allowed;
}


/* ==================================================
   参数确认
================================================== */

.form-check-row {
    margin-top: 24px;
    padding: 16px 18px;

    border: 1px solid #e1e8ed;
    border-radius: 10px;

    background: #f8fafb;
}


.form-check-row label {
    display: flex;
    align-items: flex-start;
    gap: 10px;

    margin: 0;

    color: #4f606c;

    font-size: 13px;
    line-height: 1.7;

    cursor: pointer;
}


.form-check-row input {
    width: 16px;
    height: 16px;
    flex: 0 0 16px;

    margin-top: 3px;
}


/* ==================================================
   按钮
================================================== */

.form-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;

    margin-top: 30px;
    padding-top: 22px;

    border-top: 1px solid #edf1f4;
}


.primary-button,
.secondary-button,
.text-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 44px;
    padding: 0 20px;

    border-radius: 9px;

    font-size: 14px;
    font-weight: 750;
    line-height: 1;

    text-decoration: none;
    cursor: pointer;

    transition:
        transform 0.18s ease,
        background-color 0.18s ease,
        border-color 0.18s ease,
        box-shadow 0.18s ease;
}


.primary-button {
    border: 1px solid #176fa9;

    background: #176fa9;
    color: #ffffff;

    box-shadow:
        0 7px 18px rgba(23, 111, 169, 0.18);
}


.primary-button:hover {
    transform: translateY(-1px);

    background: #125f92;
    border-color: #125f92;
    color: #ffffff;

    box-shadow:
        0 10px 24px rgba(23, 111, 169, 0.24);
}


.primary-button:disabled {
    transform: none;

    background: #9fb8c8;
    border-color: #9fb8c8;

    box-shadow: none;

    cursor: not-allowed;
}


.secondary-button {
    border: 1px solid #d2dce3;

    background: #ffffff;
    color: #415563;
}


.secondary-button:hover {
    transform: translateY(-1px);

    border-color: #aebfc9;

    background: #f7f9fa;
    color: #2d414e;
}


.text-button {
    min-height: auto;
    padding: 8px 0;

    border: none;

    background: transparent;
    color: #176fa9;

    box-shadow: none;
}


.text-button:hover {
    color: #125f92;
}


/* ==================================================
   右侧摘要
================================================== */

.selection-side-panel {
    display: grid;
    gap: 18px;

    position: sticky;
    top: 112px;
}


.side-panel-card {
    padding: 23px;

    border: 1px solid #e0e7ed;
    border-radius: 14px;

    background: #ffffff;

    box-shadow:
        0 8px 24px rgba(32, 53, 69, 0.05);
}


.side-panel-card h3 {
    margin: 0 0 18px;

    color: #243540;

    font-size: 17px;
    line-height: 1.4;
    font-weight: 800;
}


.side-panel-card dl {
    margin: 0;
}


.side-panel-card dl > div {
    display: grid;
    grid-template-columns:
        minmax(78px, auto)
        minmax(0, 1fr);

    gap: 12px;

    padding: 11px 0;

    border-bottom: 1px solid #eef2f4;
}


.side-panel-card dl > div:first-child {
    padding-top: 0;
}


.side-panel-card dl > div:last-child {
    padding-bottom: 0;

    border-bottom: none;
}


.side-panel-card dt {
    color: #87939c;

    font-size: 12px;
    line-height: 1.6;
}


.side-panel-card dd {
    margin: 0;

    color: #344653;

    font-size: 13px;
    line-height: 1.6;
    text-align: right;
    word-break: break-word;
}


.help-card {
    background:
        linear-gradient(
            180deg,
            #ffffff 0%,
            #f8fbfd 100%
        );
}


.help-card ul {
    margin: 0;
    padding-left: 19px;

    color: #667682;

    font-size: 13px;
    line-height: 1.8;
}


.help-card li + li {
    margin-top: 7px;
}


/* ==================================================
   初步结果
================================================== */

.preliminary-result {
    margin-top: 28px;
    padding: 30px;

    border: 1px solid #dce6ed;
    border-radius: 16px;

    background: #ffffff;

    box-shadow:
        0 12px 32px rgba(31, 55, 73, 0.07);
}


.result-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;

    margin-bottom: 22px;
}

.selection-result-tools {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

#downloadSelectionPdf[hidden],
#selectionPdfStatus:empty { display: none; }

#selectionPdfStatus {
    margin: 12px 24px;
    color: #40596a;
}


.result-heading span {
    display: block;
    margin-bottom: 6px;

    color: #176fa9;

    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}


.result-heading h2 {
    margin: 0;

    color: #1e2d37;

    font-size: 25px;
    line-height: 1.3;
    font-weight: 800;
}


.preliminary-card {
    overflow: hidden;

    border: 1px solid #dce6ed;
    border-radius: 14px;

    background:
        linear-gradient(
            180deg,
            #ffffff 0%,
            #f7fbfd 100%
        );
}


.preliminary-card-main {
    display: grid;
    grid-template-columns:
        auto
        minmax(0, 1fr)
        auto;

    gap: 20px;
    align-items: center;

    padding: 25px;
}


.preliminary-rank {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 52px;
    height: 52px;

    border-radius: 13px;

    background: #176fa9;
    color: #ffffff;

    font-size: 17px;
    font-weight: 850;
}


.preliminary-label {
    display: block;
    margin-bottom: 5px;

    color: #176fa9;

    font-size: 12px;
    font-weight: 800;
}


.preliminary-info h3 {
    margin: 0 0 8px;

    color: #1d2c36;

    font-size: 23px;
    line-height: 1.35;
    font-weight: 820;
}


.preliminary-info p {
    margin: 0;

    color: #687783;

    font-size: 13px;
    line-height: 1.75;
}


.preliminary-score {
    min-width: 92px;

    text-align: right;
}


.preliminary-score span,
.preliminary-score strong {
    display: block;
}


.preliminary-score span {
    margin-bottom: 5px;

    color: #87939c;

    font-size: 12px;
}


.preliminary-score strong {
    color: #176fa9;

    font-size: 30px;
    line-height: 1;
    font-weight: 850;
}


.preliminary-meta {
    display: grid;
    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    border-top: 1px solid #e5ecf1;
    border-bottom: 1px solid #e5ecf1;

    background: #ffffff;
}


.preliminary-meta > div {
    padding: 18px 20px;

    text-align: center;
}


.preliminary-meta > div + div {
    border-left: 1px solid #e5ecf1;
}


.preliminary-meta span,
.preliminary-meta strong {
    display: block;
}


.preliminary-meta span {
    margin-bottom: 5px;

    color: #8a969f;

    font-size: 12px;
}


.preliminary-meta strong {
    color: #334652;

    font-size: 15px;
    line-height: 1.5;
}


.preliminary-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;

    padding: 20px 24px;
}


/* ==================================================
   页面消息
================================================== */

.selection-message {
    margin-top: 20px;
    padding: 14px 17px;

    border-radius: 9px;

    font-size: 13px;
    line-height: 1.7;
}


.selection-message.error {
    border: 1px solid #f0c7c7;

    background: #fff3f3;
    color: #a34343;
}


.selection-message.success {
    border: 1px solid #c8e5d2;

    background: #f0faf4;
    color: #2c7046;
}


.selection-message.info {
    border: 1px solid #cbddea;

    background: #f2f8fc;
    color: #38647f;
}


/* ==================================================
   响应式
================================================== */

@media (max-width: 1024px) {

    .flow-selection-layout {
        grid-template-columns: 1fr;
    }

    .selection-side-panel {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));

        position: static;
    }

}


@media (max-width: 768px) {

    .flow-selection-page {
        padding: 18px 0 48px;
    }

    .flow-selection-header {
        flex-direction: column;

        padding: 26px 22px;
    }

    .header-badge {
        width: 100%;
        min-width: 0;

        text-align: left;
    }

    .selection-progress {
        grid-template-columns:
            repeat(3, minmax(0, 1fr));

        gap: 8px;
        padding: 15px 12px;
    }

    .progress-line {
        display: none;
    }

    .progress-item {
        flex-direction: column;
        gap: 6px;

        text-align: center;
    }

    .progress-item strong {
        font-size: 12px;
        white-space: normal;
    }

    .selection-form {
        padding: 23px 19px;
    }

    .form-section-title {
        flex-direction: column;
        gap: 6px;
    }

    .form-section-title p {
        margin: 0;
        text-align: left;
    }

    .form-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .segmented-control {
        grid-template-columns: 1fr;
    }

    .form-actions {
        flex-direction: column-reverse;
        align-items: stretch;
    }

    .form-actions .primary-button,
    .form-actions .secondary-button,
    .form-actions .text-button {
        width: 100%;
    }

    .selection-side-panel {
        grid-template-columns: 1fr;
    }

    .preliminary-result {
        padding: 22px 18px;
    }

    .result-heading {
        flex-direction: column;
    }

    .preliminary-card-main {
        grid-template-columns:
            auto
            minmax(0, 1fr);
    }

    .preliminary-score {
        grid-column: 1 / -1;

        padding-top: 14px;

        border-top: 1px solid #e5ecf1;

        text-align: left;
    }

    .preliminary-meta {
        grid-template-columns: 1fr;
    }

    .preliminary-meta > div + div {
        border-top: 1px solid #e5ecf1;
        border-left: none;
    }

    .preliminary-actions {
        flex-direction: column;
    }

    .preliminary-actions .primary-button,
    .preliminary-actions .secondary-button {
        width: 100%;
    }

}


@media (max-width: 480px) {

    .flow-selection-header h1 {
        font-size: 29px;
    }

    .selection-progress {
        padding-left: 8px;
        padding-right: 8px;
    }

    .progress-item span {
        width: 30px;
        height: 30px;
        flex-basis: 30px;
    }

    .selection-form {
        padding: 20px 15px;
    }

    .form-section-title h2 {
        font-size: 22px;
    }

    .preliminary-card-main {
        padding: 20px 16px;
    }

    .preliminary-rank {
        width: 44px;
        height: 44px;
    }

    .preliminary-info h3 {
        font-size: 20px;
    }

}


/* ==================================================
   无障碍与减少动画
================================================== */

.primary-button:focus-visible,
.secondary-button:focus-visible,
.text-button:focus-visible,
.form-field input:focus-visible,
.form-field select:focus-visible,
.segment:focus-within {
    outline: 3px solid rgba(23, 111, 169, 0.22);
    outline-offset: 2px;
}


@media (prefers-reduced-motion: reduce) {

    .primary-button,
    .secondary-button,
    .text-button,
    .form-field input,
    .form-field select,
    .segment {
        transition: none;
    }

}
/* Shared candidate cards on both selection result surfaces. */
.engineering-candidate-card {border:1px solid #dbe3eb;border-radius:14px;padding:24px;margin:20px 0;background:#fff;min-width:0;box-shadow:0 3px 12px #16324f08;}
.engineering-candidate-card h3 {margin:0 0 12px;color:#173b56;}
.engineering-parameter-grid {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 20px;border-top:1px solid #e5ebf0;padding:18px 0;min-width:0;}
.engineering-parameter-grid h4,.engineering-parameter-grid table {grid-column:1/-1;}
.engineering-parameter-grid p {margin:0;padding:10px;background:#f5f8fb;border-radius:6px;overflow-wrap:anywhere;}
.engineering-parameter-grid th,.engineering-parameter-grid td {padding:10px 5px;border-bottom:1px solid #dbe3eb;text-align:left;}
@media(max-width:600px){.engineering-candidate-card{padding:14px;margin:14px 0}.engineering-parameter-grid{grid-template-columns:minmax(0,1fr);gap:10px}.engineering-parameter-grid th,.engineering-parameter-grid td{padding:8px 3px}}

/* Unranked instrument list / native expandable detail panels, shared by both result pages. */
.selection-list-overview p,.selection-type-intro {color:#516675;line-height:1.65;margin:0 0 14px;}
.engineering-report {min-width:0;}
.selection-gas-basis {margin:16px 0 22px;padding:12px 16px;border-left:3px solid #33808b;background:#f3f8f9;}
.selection-gas-basis h3 {margin:0 0 6px;font-size:16px;}
.selection-gas-basis p {margin:3px 0;line-height:1.6;}
.engineering-report .selection-type-card {padding:0;margin:12px 0;overflow:hidden;}
.selection-type-summary {display:flex;align-items:center;gap:16px;padding:18px 22px;cursor:pointer;list-style:none;min-width:0;}
.selection-type-summary::-webkit-details-marker,.selection-assessment-summary::-webkit-details-marker {display:none;}
.selection-type-summary:focus-visible,.selection-assessment-summary:focus-visible {outline:3px solid #357fa5;outline-offset:-3px;}
.selection-type-summary:hover {background:#f4f9fc;}
.selection-type-heading {flex:1;min-width:0;overflow-wrap:anywhere;}
.selection-type-summary h3 {margin:0 0 5px;font-size:18px;}
.selection-type-count {color:#627684;font-size:13px;}
.selection-type-status {font-size:13px;white-space:nowrap;border-radius:18px;padding:6px 10px;font-weight:600;}
.selection-type-status.is-passed {color:#17623e;background:#e6f6ed;}
.selection-type-status.is-review {color:#81500c;background:#fff2d8;}
.selection-type-action {white-space:nowrap;color:#216d97;font-size:14px;font-weight:600;}
.selection-type-action::after {content:" ▾";}
.selection-type-card[open] .selection-type-action::after {content:" ▴";}
.selection-type-body {padding:0 22px 20px;min-width:0;overflow-wrap:anywhere;}
.selection-type-review-heading {color:#173b56;margin:15px 0 8px;}
.selection-type-body > p {line-height:1.65;margin:8px 0;}
.selection-type-review {padding:10px 12px;background:#fff7e8;border-radius:6px;color:#785112;}
.selection-assessment-card {border:1px solid #dbe3eb;border-radius:9px;background:#fafbfd;margin:12px 0;overflow:hidden;}
.selection-assessment-summary {list-style:none;cursor:pointer;padding:13px 16px;color:#40596a;font-weight:600;}
.selection-assessment-summary::after {content:" ▾";float:right;}
.selection-assessment-card[open] .selection-assessment-summary::after {content:" ▴";}
.selection-assessment-list {margin:0;padding:0 18px 14px 36px;}
.selection-assessment-list li {margin:10px 0;overflow-wrap:anywhere;}
.selection-assessment-list p {margin:4px 0;color:#677c89;line-height:1.5;}
@media(max-width:600px){.selection-type-summary{padding:14px;gap:9px;flex-wrap:wrap}.selection-type-heading{flex:1 1 100%}.selection-type-summary h3{font-size:16px}.selection-type-body{padding:0 14px 14px}.selection-type-action{margin-left:auto}.selection-type-status{font-size:12px}}
@media print {.selection-type-summary{padding:9px 0}.selection-type-action{display:none}.selection-type-body{padding:0}.engineering-report .selection-type-card{box-shadow:none;overflow:visible}.engineering-parameter-grid{break-inside:avoid}}

/* Each permitted but unmatched type is visible; no unpermitted catalogue noise. */
.selection-assessment-section {margin-top:24px;min-width:0;}
.selection-assessment-visible {padding:13px 18px;}
.selection-assessment-header {display:flex;align-items:center;gap:10px;justify-content:space-between;min-width:0;}
.selection-assessment-header h3 {margin:0;color:#40596a;font-size:16px;overflow-wrap:anywhere;}
.selection-assessment-reason {margin:8px 0 0;color:#576b78;line-height:1.65;overflow-wrap:anywhere;}
@media(max-width:600px){.selection-assessment-visible{padding:12px 14px}.selection-assessment-header{flex-wrap:wrap}.selection-assessment-header h3{flex:1 1 100%;font-size:15px}}
