:root {
    --canvas: #f5f3ed;
    --surface: #ffffff;
    --surface-soft: #f8faf8;
    --ink: #17231f;
    --muted: #66746e;
    --line: #dce2de;
    --accent: #0f6b5c;
    --accent-dark: #0a5146;
    --accent-soft: #e8f3f0;
    --amber: #d08a22;
    --amber-soft: #fff4df;
    --danger: #a82b20;
    --danger-soft: #fff0ed;
    --success: #19704e;
    --success-soft: #eaf7f0;
    --shadow: 0 18px 50px rgba(23, 35, 31, 0.08);
    --radius: 8px;
    --radius-sm: 6px;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    color-scheme: light;
}

body {
    min-height: 100vh;
    margin: 0;
    color: var(--ink);
    background: var(--canvas);
    font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", Arial, sans-serif;
    font-size: 15px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

button,
input,
select,
textarea {
    font: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

a {
    color: inherit;
}

[hidden] {
    display: none !important;
}

.brand-mark {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--ink);
    font-size: 17px;
    font-weight: 800;
    letter-spacing: 0.02em;
    text-decoration: none;
}

.brand-symbol {
    display: inline-grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 7px;
    color: #fff;
    background: var(--accent);
    font-size: 16px;
    font-weight: 800;
}

.eyebrow {
    margin: 0 0 12px;
    color: var(--accent);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.18em;
}

.assessment-shell,
.success-shell {
    min-height: 100vh;
    padding: 24px clamp(18px, 4vw, 56px) 48px;
}

.assessment-header {
    display: flex;
    max-width: 1320px;
    margin: 0 auto 34px;
    align-items: center;
    justify-content: space-between;
}

.secure-note {
    color: var(--muted);
    font-size: 13px;
}

.assessment-layout {
    display: grid;
    max-width: 1320px;
    margin: 0 auto;
    grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
    gap: clamp(28px, 5vw, 76px);
    align-items: start;
}

.assessment-intro {
    position: sticky;
    top: 26px;
    padding-top: 20px;
}

.assessment-intro h1 {
    max-width: 420px;
    margin: 0 0 18px;
    font-size: clamp(30px, 3.2vw, 46px);
    line-height: 1.16;
    letter-spacing: -0.025em;
}

.intro-copy {
    max-width: 360px;
    margin: 0;
    color: var(--muted);
    font-size: 16px;
}

.progress-list {
    display: grid;
    margin: 42px 0 34px;
    padding: 0;
    gap: 0;
    list-style: none;
}

.progress-item {
    position: relative;
    display: grid;
    min-height: 68px;
    padding: 0 0 20px;
    grid-template-columns: 38px 1fr;
    gap: 13px;
    color: #88928e;
}

.progress-item::before {
    position: absolute;
    top: 31px;
    bottom: -2px;
    left: 14px;
    width: 1px;
    background: var(--line);
    content: "";
}

.progress-item:last-child::before {
    display: none;
}

.progress-index {
    display: grid;
    width: 29px;
    height: 29px;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: var(--canvas);
    font-size: 10px;
    font-weight: 800;
    transition: 160ms ease;
}

.progress-item strong,
.progress-item small {
    display: block;
}

.progress-item strong {
    font-size: 14px;
}

.progress-item small {
    margin-top: 2px;
    font-size: 12px;
}

.progress-item.is-active {
    color: var(--ink);
}

.progress-item.is-active .progress-index {
    border-color: var(--accent);
    color: #fff;
    background: var(--accent);
    box-shadow: 0 0 0 5px var(--accent-soft);
}

.progress-item.is-complete {
    color: var(--accent-dark);
}

.progress-item.is-complete .progress-index {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-soft);
}

.privacy-block {
    max-width: 340px;
    padding: 15px 17px;
    border: 1px solid #e4dac6;
    border-radius: var(--radius);
    background: var(--amber-soft);
}

.privacy-block strong {
    display: block;
    margin-bottom: 2px;
    color: #755018;
    font-size: 12px;
}

.privacy-block p {
    margin: 0;
    color: #7a6542;
    font-size: 12px;
}

.form-panel {
    min-width: 0;
    padding: clamp(24px, 4vw, 44px);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
}

.form-panel-header {
    display: flex;
    margin-bottom: 28px;
    padding-bottom: 20px;
    align-items: flex-end;
    justify-content: space-between;
    border-bottom: 1px solid var(--line);
    gap: 28px;
}

.step-counter {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.step-counter b {
    color: var(--accent);
    font-size: 15px;
}

.form-panel-header h2 {
    margin: 5px 0 0;
    font-size: 23px;
    line-height: 1.25;
}

.progress-track {
    width: 150px;
    height: 5px;
    overflow: hidden;
    border-radius: 999px;
    background: #e8ece9;
}

.progress-track span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--accent);
    transition: width 220ms ease;
}

.alert {
    margin-bottom: 24px;
    padding: 14px 16px;
    border: 1px solid;
    border-radius: var(--radius-sm);
    font-size: 13px;
}

.alert ul {
    margin: 5px 0 0;
    padding-left: 18px;
}

.alert-error {
    border-color: #f0c7c1;
    color: var(--danger);
    background: var(--danger-soft);
}

.alert-success {
    border-color: #bfe3d0;
    color: var(--success);
    background: var(--success-soft);
}

.form-step {
    animation: step-in 180ms ease-out;
}

@keyframes step-in {
    from {
        opacity: 0;
        transform: translateY(4px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section-heading {
    display: flex;
    margin-bottom: 26px;
    align-items: flex-start;
    gap: 13px;
}

.section-heading > span {
    display: grid;
    width: 34px;
    height: 34px;
    flex: 0 0 auto;
    place-items: center;
    border-radius: var(--radius-sm);
    color: var(--accent);
    background: var(--accent-soft);
    font-size: 11px;
    font-weight: 800;
}

.section-heading h3 {
    margin: 0;
    font-size: 18px;
}

.section-heading p {
    margin: 2px 0 0;
    color: var(--muted);
    font-size: 13px;
}

.field-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 21px 22px;
}

.field-group {
    min-width: 0;
    margin: 0 0 24px;
    padding: 0;
    border: 0;
}

.field-grid .field-group {
    margin-bottom: 0;
}

.credit-grade-stack {
    display: grid;
    margin-top: 24px;
    gap: 14px;
}

.credit-grade-block {
    padding: 18px;
    border: 1px solid #dce2df;
    border-radius: var(--radius-sm);
    background: #f8faf9;
}

.credit-grade-block h3 {
    margin: 0 0 14px;
    font-size: 14px;
}

.credit-grade-fields {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.credit-grade-list {
    display: grid;
    min-width: 0;
    gap: 6px;
}

.credit-grade-item {
    display: grid;
    grid-template-columns: 32px 86px 66px;
    align-items: baseline;
    gap: 8px;
    white-space: nowrap;
}

.credit-grade-item b {
    color: #39433f;
    font-size: 11px;
}

.credit-grade-item > span {
    color: var(--ink);
    font-size: 12px;
    font-weight: 750;
}

.credit-grade-item small {
    color: var(--muted);
    font-size: 10px;
}

.credit-school-column {
    width: 190px;
    max-width: 190px;
}

.credit-major-column {
    width: 300px;
    max-width: 300px;
}

.credit-major-name {
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.credit-grade-column {
    width: 270px;
    min-width: 270px;
}

.field-span-2 {
    grid-column: 1 / -1;
}

.completion-field {
    padding: 18px;
    border: 1px solid #cdded8;
    border-radius: 8px;
    background: #f7fbf9;
}

.completion-field-head {
    display: flex;
    margin-bottom: 6px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.completion-field-head label {
    margin-bottom: 0;
    color: var(--ink);
    font-size: 15px;
}

.completion-weight {
    flex: 0 0 auto;
    padding: 4px 8px;
    border-radius: 999px;
    color: var(--accent-dark);
    background: var(--accent-soft);
    font-size: 10px;
    font-weight: 800;
}

.completion-field-copy {
    margin: 0 0 12px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.65;
}

.field-group label,
.field-group legend {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 750;
}

.field-group em {
    color: #bd3e31;
    font-style: normal;
}

.field-group > small,
.field-group label + small {
    display: block;
    margin-top: 6px;
    color: var(--muted);
    font-size: 11px;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="search"],
select,
textarea {
    width: 100%;
    border: 1px solid #ccd6d1;
    border-radius: var(--radius-sm);
    outline: none;
    color: var(--ink);
    background: #fff;
    transition: border-color 150ms ease, box-shadow 150ms ease;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="search"],
select {
    height: 46px;
    padding: 0 13px;
}

select {
    cursor: pointer;
}

select.major-select option:disabled {
    color: #8b9691;
    background: #f3f5f4;
}

select[multiple] {
    height: auto;
    min-height: 138px;
    padding: 6px 8px;
    cursor: default;
}

select[multiple] option {
    padding: 4px 8px;
    border-radius: 4px;
}

textarea {
    min-height: 96px;
    padding: 12px 13px;
    resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(15, 107, 92, 0.12);
}

input[aria-invalid="true"],
select[aria-invalid="true"],
textarea[aria-invalid="true"] {
    border-color: var(--danger);
}

.field-error {
    margin: 7px 0 0;
    color: var(--danger);
    font-size: 12px;
}

.choice-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.choice-grid.compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.choice-card {
    position: relative;
    display: flex !important;
    min-height: 54px;
    margin: 0 !important;
    padding: 13px 14px;
    align-items: center;
    border: 1px solid #d5ddd9;
    border-radius: var(--radius-sm);
    cursor: pointer;
    background: #fff;
    transition: border-color 150ms ease, background 150ms ease, box-shadow 150ms ease;
}

.choice-card:hover {
    border-color: #98b8af;
}

.choice-card:has(input:checked) {
    border-color: var(--accent);
    background: var(--accent-soft);
    box-shadow: inset 0 0 0 1px var(--accent);
}

.choice-card input,
.chip-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.choice-card > span {
    position: relative;
    padding-left: 27px;
    font-size: 13px;
    font-weight: 650;
}

.choice-card > span::before {
    position: absolute;
    top: 2px;
    left: 0;
    display: grid;
    width: 17px;
    height: 17px;
    place-items: center;
    border: 1px solid #afbbb6;
    border-radius: 4px;
    color: #fff;
    background: #fff;
    content: "";
}

.choice-card input[type="radio"] + span::before {
    border-radius: 50%;
}

.choice-card input:checked + span::before {
    border-color: var(--accent);
    background: var(--accent);
    content: "✓";
    font-size: 11px;
    line-height: 1;
}

.choice-card input[type="radio"]:checked + span::before {
    content: "";
    box-shadow: inset 0 0 0 4px var(--accent);
}

.chip-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}

.chip-option {
    position: relative;
    display: inline-flex !important;
    margin: 0 !important;
    cursor: pointer;
}

.chip-option span {
    display: inline-flex;
    min-height: 39px;
    padding: 0 15px;
    align-items: center;
    border: 1px solid #d5ddd9;
    border-radius: 999px;
    background: #fff;
    font-size: 12px;
    font-weight: 650;
    transition: 150ms ease;
}

.chip-option input:checked + span {
    border-color: var(--accent);
    color: var(--accent-dark);
    background: var(--accent-soft);
    box-shadow: inset 0 0 0 1px var(--accent);
}

.conditional-field {
    padding: 17px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface-soft);
}

.conditional-field .field-group {
    margin-bottom: 0;
}

.course-picker {
    position: relative;
}

.course-selected {
    display: flex;
    min-height: 44px;
    padding: 7px;
    flex-wrap: wrap;
    align-items: center;
    border: 1px solid #ccd6d1;
    border-bottom: 0;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    background: #fff;
    gap: 6px;
}

.course-placeholder {
    padding-left: 6px;
    color: #919c97;
    font-size: 12px;
}

.course-chip {
    display: inline-flex;
    min-height: 30px;
    max-width: 100%;
    padding: 0 4px 0 10px;
    align-items: center;
    border: 1px solid #b9d3cc;
    border-radius: 999px;
    color: var(--accent-dark);
    background: var(--accent-soft);
    gap: 5px;
    font-size: 11px;
    font-weight: 700;
}

.course-chip > span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.course-chip button {
    display: grid;
    width: 21px;
    height: 21px;
    flex: 0 0 auto;
    place-items: center;
    border: 0;
    border-radius: 50%;
    cursor: pointer;
    color: var(--accent-dark);
    background: transparent;
    font-size: 15px;
    line-height: 1;
}

.course-chip button:hover {
    background: rgba(15, 107, 92, 0.12);
}

.course-search {
    position: relative;
}

.course-search input {
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
}

.course-search input:disabled {
    cursor: not-allowed;
    color: #8b9691;
    background: #f3f5f4;
}

.course-menu {
    position: absolute;
    z-index: 30;
    top: calc(100% + 5px);
    right: 0;
    left: 0;
    max-height: 260px;
    overflow-y: auto;
    border: 1px solid #cbd8d3;
    border-radius: var(--radius-sm);
    background: #fff;
    box-shadow: 0 14px 35px rgba(23, 35, 31, 0.14);
}

.course-option {
    display: grid;
    width: 100%;
    min-height: 51px;
    padding: 9px 12px;
    border: 0;
    border-bottom: 1px solid #edf1ef;
    cursor: pointer;
    text-align: left;
    background: #fff;
    gap: 2px;
}

.course-option:last-child {
    border-bottom: 0;
}

.course-option:hover,
.course-option.is-active {
    background: var(--accent-soft);
}

.course-option strong {
    color: var(--accent-dark);
    font-size: 12px;
}

.course-option span {
    overflow: hidden;
    color: var(--muted);
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.course-menu-empty {
    padding: 18px 13px;
    color: var(--muted);
    text-align: center;
    font-size: 12px;
}

.course-picker-hint {
    margin: 7px 0 0;
    color: var(--muted);
    font-size: 11px;
}

.file-drop {
    display: flex !important;
    min-height: 100px;
    margin: 0 !important;
    padding: 18px;
    align-items: center;
    border: 1px dashed #9eb4ad;
    border-radius: var(--radius);
    cursor: pointer;
    background: var(--surface-soft);
    gap: 14px;
}

.file-drop input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.file-drop-icon {
    display: grid;
    width: 38px;
    height: 38px;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 50%;
    color: var(--accent);
    background: var(--accent-soft);
    font-size: 23px;
    font-weight: 400;
}

.file-drop strong,
.file-drop small {
    display: block;
}

.file-drop strong {
    margin-bottom: 3px;
    font-size: 13px;
}

.file-drop small {
    color: var(--muted);
    font-size: 11px;
}

.file-list {
    display: grid;
    margin-top: 10px;
    gap: 7px;
}

.file-item {
    display: flex;
    min-height: 39px;
    padding: 9px 11px;
    align-items: center;
    justify-content: space-between;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: #fff;
    gap: 16px;
    font-size: 12px;
}

.file-item span:last-child {
    flex: 0 0 auto;
    color: var(--muted);
}

.file-warning {
    margin: 0;
    color: var(--danger);
    font-size: 12px;
}

.form-actions {
    display: flex;
    margin-top: 32px;
    padding-top: 20px;
    align-items: center;
    justify-content: flex-end;
    border-top: 1px solid var(--line);
    gap: 10px;
}

.button {
    display: inline-flex;
    min-height: 44px;
    padding: 0 19px;
    align-items: center;
    justify-content: center;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 13px;
    font-weight: 750;
    text-decoration: none;
    transition: 150ms ease;
}

.button:hover {
    transform: translateY(-1px);
}

.button:disabled {
    cursor: wait;
    opacity: 0.7;
    transform: none;
}

.button-primary {
    color: #fff;
    background: var(--accent);
}

.button-primary:hover {
    background: var(--accent-dark);
}

.button-ghost {
    border-color: #ccd6d1;
    color: var(--ink);
    background: #fff;
}

.button-ghost:hover {
    border-color: #92aaa2;
}

.button-danger {
    border-color: #e5b6b0;
    color: var(--danger);
    background: #fff;
}

.button-small {
    min-height: 34px;
    padding: 0 11px;
    font-size: 12px;
}

.button-submit {
    min-height: 48px;
    padding-inline: 24px;
}

.success-shell {
    display: grid;
    align-content: start;
    justify-items: center;
}

.success-shell > .brand-mark {
    justify-self: start;
    width: 100%;
}

.success-card {
    width: min(100%, 620px);
    margin: 10vh auto 0;
    padding: clamp(30px, 6vw, 56px);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    box-shadow: var(--shadow);
    text-align: center;
}

.success-mark {
    display: grid;
    width: 58px;
    height: 58px;
    margin: 0 auto 20px;
    place-items: center;
    border-radius: 50%;
    color: var(--success);
    background: var(--success-soft);
}

.success-card h1 {
    margin: 0;
    font-size: clamp(28px, 4vw, 40px);
    line-height: 1.2;
}

.success-copy {
    max-width: 460px;
    margin: 14px auto 26px;
    color: var(--muted);
}

.reference-box {
    display: grid;
    margin: 0 0 28px;
    padding: 16px;
    grid-template-columns: 1fr 1fr;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface-soft);
    text-align: left;
    gap: 16px;
}

.reference-box dt {
    margin-bottom: 3px;
    color: var(--muted);
    font-size: 11px;
}

.reference-box dd {
    margin: 0;
    font-size: 13px;
    font-weight: 750;
    overflow-wrap: anywhere;
}

/* Admin */
.admin-body {
    background: #f3f5f4;
}

.admin-shell {
    display: grid;
    min-height: 100vh;
    grid-template-columns: 248px minmax(0, 1fr);
}

.admin-sidebar {
    position: sticky;
    top: 0;
    display: flex;
    height: 100vh;
    padding: 24px 18px;
    flex-direction: column;
    color: #eef5f2;
    background: #132b25;
}

.admin-sidebar .brand-mark {
    margin: 0 8px 36px;
    color: #fff;
}

.admin-nav {
    display: grid;
    gap: 6px;
}

.admin-nav a {
    display: flex;
    min-height: 43px;
    padding: 0 13px;
    align-items: center;
    border-radius: var(--radius-sm);
    color: #b9cbc5;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
}

.admin-nav a:hover,
.admin-nav a.is-active {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.admin-sidebar-footer {
    margin-top: auto;
    padding: 16px 8px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.13);
}

.admin-sidebar-footer strong,
.admin-sidebar-footer small {
    display: block;
}

.admin-sidebar-footer strong {
    font-size: 12px;
}

.admin-sidebar-footer small {
    margin-top: 2px;
    color: #91aaa1;
    font-size: 11px;
}

.admin-main {
    min-width: 0;
}

.admin-topbar {
    display: flex;
    min-height: 76px;
    padding: 0 clamp(20px, 4vw, 44px);
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #dce2df;
    background: rgba(255, 255, 255, 0.94);
    gap: 20px;
}

.admin-topbar h1 {
    margin: 0;
    font-size: 19px;
}

.admin-topbar p {
    margin: 2px 0 0;
    color: var(--muted);
    font-size: 12px;
}

.admin-content {
    padding: clamp(20px, 4vw, 42px);
}

.admin-content-inner {
    width: min(100%, 1240px);
    margin: 0 auto;
}

.page-heading {
    display: flex;
    margin-bottom: 24px;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
}

.page-heading h2 {
    margin: 0;
    font-size: 25px;
}

.page-heading p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 13px;
}

.page-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 10px;
}

.page-actions form {
    display: flex;
    align-items: center;
    gap: 10px;
}

.stat-grid {
    display: grid;
    margin-bottom: 26px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.stat-card {
    padding: 20px;
    border: 1px solid #dce2df;
    border-radius: var(--radius);
    background: #fff;
}

.stat-card span,
.stat-card strong {
    display: block;
}

.stat-card span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.stat-card strong {
    margin-top: 8px;
    font-size: 30px;
    line-height: 1;
}

.stat-card .stat-card-date {
    font-size: 20px;
}

.page-note {
    margin: 16px 0 0;
    color: var(--muted);
    font-size: 12px;
}

.course-sync-status {
    display: flex;
    margin-bottom: 20px;
    padding: 14px 16px;
    align-items: flex-start;
    border: 1px solid #dce2df;
    border-radius: var(--radius);
    background: #fff;
    gap: 12px;
}

.course-sync-indicator {
    width: 9px;
    height: 9px;
    margin-top: 5px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: #8a9994;
}

.course-sync-status.is-queued .course-sync-indicator,
.course-sync-status.is-starting .course-sync-indicator,
.course-sync-status.is-running .course-sync-indicator {
    background: #d9982f;
    box-shadow: 0 0 0 5px rgba(217, 152, 47, 0.14);
}

.course-sync-status.is-completed .course-sync-indicator {
    background: #2f8f69;
}

.course-sync-status.is-failed .course-sync-indicator {
    background: #c54d45;
}

.course-sync-copy {
    min-width: 0;
    flex: 1;
}

.course-sync-copy strong,
.course-sync-copy span,
.course-sync-copy small {
    display: block;
}

.course-sync-copy strong {
    font-size: 13px;
}

.course-sync-copy span {
    margin-top: 3px;
    color: var(--muted);
    font-size: 12px;
}

.course-sync-copy small {
    margin-top: 5px;
    color: #8a9994;
    font-size: 11px;
}

.course-sync-output {
    max-width: min(46%, 560px);
    color: var(--muted);
    font-size: 11px;
}

.course-sync-output summary {
    cursor: pointer;
    color: var(--accent-dark);
    font-weight: 700;
}

.course-sync-output pre {
    max-height: 220px;
    margin: 10px 0 0;
    padding: 12px;
    overflow: auto;
    border-radius: 6px;
    background: #f5f7f6;
    white-space: pre-wrap;
}

.panel {
    border: 1px solid #dce2df;
    border-radius: var(--radius);
    background: #fff;
}

.panel-header {
    display: flex;
    min-height: 65px;
    padding: 14px 18px;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #e3e8e5;
    gap: 16px;
}

.panel-header h3 {
    margin: 0;
    font-size: 15px;
}

.panel-body {
    padding: 20px;
}

.filter-bar {
    display: flex;
    margin-bottom: 16px;
    align-items: center;
    gap: 10px;
}

.filter-bar-wide {
    flex-wrap: wrap;
}

.filter-bar-wide input[type="search"] {
    flex: 1 1 210px;
    max-width: 260px;
}

.filter-bar input[type="search"] {
    max-width: 360px;
}

.filter-bar select {
    width: 190px;
}

.table-wrap {
    width: 100%;
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    white-space: nowrap;
}

.data-table th,
.data-table td {
    padding: 13px 15px;
    border-bottom: 1px solid #e5e9e7;
    text-align: left;
    font-size: 12px;
}

.data-table th {
    color: var(--muted);
    background: #f8faf9;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.03em;
}

.data-table tbody tr:hover {
    background: #fbfcfb;
}

.data-table tbody tr:last-child td {
    border-bottom: 0;
}

.table-primary {
    display: block;
    font-size: 13px;
    font-weight: 750;
}

.table-cell-truncate {
    display: block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.table-secondary {
    display: block;
    margin-top: 2px;
    color: var(--muted);
    font-size: 11px;
}

.badge {
    display: inline-flex;
    min-height: 24px;
    padding: 0 9px;
    align-items: center;
    border-radius: 999px;
    color: var(--accent-dark);
    background: var(--accent-soft);
    font-size: 11px;
    font-weight: 750;
}

.badge-amber {
    color: #7a5217;
    background: var(--amber-soft);
}

.badge-red {
    color: #9f2d24;
    background: #fde8e6;
}

.badge-muted {
    color: var(--muted);
    background: #eef1ef;
}

.pagination-wrap {
    padding: 15px 18px;
    border-top: 1px solid #e5e9e7;
}

.pagination-wrap svg {
    width: 14px;
    height: 14px;
}

.pagination-wrap nav > div:first-child {
    display: none;
}

.pagination-wrap nav > div:last-child {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.empty-state {
    padding: 58px 20px;
    color: var(--muted);
    text-align: center;
}

.detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 18px;
    align-items: start;
}

.detail-stack {
    display: grid;
    gap: 18px;
}

.detail-section {
    padding: 22px;
    border: 1px solid #dce2df;
    border-radius: var(--radius);
    background: #fff;
}

.detail-section h3 {
    margin: 0 0 18px;
    font-size: 15px;
}

.detail-list {
    display: grid;
    margin: 0;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 24px;
}

.detail-list > div {
    min-width: 0;
}

.detail-list dt {
    margin-bottom: 4px;
    color: var(--muted);
    font-size: 11px;
}

.detail-list dd {
    margin: 0;
    font-size: 13px;
    font-weight: 650;
    overflow-wrap: anywhere;
    white-space: pre-line;
}

.detail-list .detail-span {
    grid-column: 1 / -1;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.tag {
    display: inline-flex;
    min-height: 28px;
    padding: 0 10px;
    align-items: center;
    border: 1px solid #d7dfdb;
    border-radius: 999px;
    background: #f8faf9;
    font-size: 11px;
    font-weight: 700;
}

.sidebar-card {
    position: sticky;
    top: 20px;
    padding: 22px;
    border: 1px solid #dce2df;
    border-radius: var(--radius);
    background: #fff;
}

.sidebar-card h3 {
    margin: 0 0 15px;
    font-size: 15px;
}

.sidebar-actions {
    display: grid;
    margin-top: 20px;
    gap: 9px;
}

.file-download {
    display: flex;
    padding: 12px;
    align-items: center;
    justify-content: space-between;
    border: 1px solid #dce2df;
    border-radius: var(--radius-sm);
    color: var(--ink);
    text-decoration: none;
    gap: 12px;
}

.file-download:hover {
    border-color: #9eb4ad;
    background: #fafcfb;
}

.file-download span:first-child {
    min-width: 0;
}

.file-download strong,
.file-download small {
    display: block;
}

.file-download strong {
    max-width: 230px;
    overflow: hidden;
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-download small {
    color: var(--muted);
    font-size: 10px;
}

.admin-form {
    padding: clamp(20px, 4vw, 32px);
    border: 1px solid #dce2df;
    border-radius: var(--radius);
    background: #fff;
}

.admin-form-section {
    margin: 0 0 30px;
    padding: 0 0 28px;
    border-bottom: 1px solid #e4e9e6;
}

.admin-form-section:last-of-type {
    margin-bottom: 0;
}

.admin-form-section h3 {
    margin: 0 0 18px;
    font-size: 16px;
}

.checkbox-list {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}

.checkbox-list label {
    display: inline-flex;
    min-height: 36px;
    padding: 0 11px;
    align-items: center;
    border: 1px solid #d5ddd9;
    border-radius: var(--radius-sm);
    cursor: pointer;
    background: #fff;
    gap: 7px;
    font-size: 12px;
    font-weight: 650;
}

.checkbox-list label:has(input:checked) {
    border-color: var(--accent);
    background: var(--accent-soft);
}

.existing-files {
    display: grid;
    margin-top: 12px;
    gap: 8px;
}

.existing-file {
    display: flex;
    padding: 10px 12px;
    align-items: center;
    justify-content: space-between;
    border: 1px solid #dce2df;
    border-radius: var(--radius-sm);
    gap: 16px;
    font-size: 12px;
}

.existing-file label {
    display: flex;
    align-items: center;
    color: var(--danger);
    gap: 6px;
    white-space: nowrap;
}

.login-body {
    display: grid;
    min-height: 100vh;
    place-items: center;
    padding: 24px;
    background: #eef2f0;
}

.login-shell {
    width: min(100%, 430px);
}

.login-brand {
    display: flex;
    margin-bottom: 18px;
    align-items: center;
    justify-content: center;
}

.login-card {
    padding: 32px;
    border: 1px solid #d7dfdb;
    border-radius: var(--radius);
    background: #fff;
    box-shadow: var(--shadow);
}

.login-card h1 {
    margin: 0 0 6px;
    font-size: 24px;
}

.login-card > p {
    margin: 0 0 24px;
    color: var(--muted);
    font-size: 13px;
}

.login-options {
    display: flex;
    margin: 2px 0 20px;
    align-items: center;
    justify-content: space-between;
    color: var(--muted);
    font-size: 12px;
}

.login-options label {
    display: flex;
    align-items: center;
    gap: 7px;
}

.login-card .button {
    width: 100%;
}

.mobile-admin-header {
    display: none;
}

/* 毕业要求模块 */
.table-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.degree-edit-form .panel + .panel {
    margin-top: 18px;
}

.credit-scope-cell {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}

.compare-panel {
    margin-top: 18px;
}

.compare-table {
    table-layout: fixed;
}

.compare-table th,
.compare-table td {
    vertical-align: top;
    white-space: normal;
    overflow-wrap: anywhere;
}

.compare-table tbody th {
    font-weight: 700;
    color: var(--muted);
    background: var(--surface-soft);
}

.compare-metric-column {
    width: 168px;
}

.compare-table td.is-differs {
    color: #7a5217;
    background: var(--amber-soft);
}

.compare-scope-picker {
    display: flex;
    margin: 0;
    align-self: center;
    padding: 6px 12px;
    align-items: center;
    border: 1px solid #d7dfdb;
    border-radius: var(--radius-sm);
    gap: 12px;
}

.filter-bar select[multiple] {
    width: min(320px, 100%);
}

.compare-scope-picker legend {
    padding: 0 4px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
}

.compare-scope-picker label {
    display: inline-flex;
    align-items: center;
    font-size: 12px;
    font-weight: 600;
    gap: 5px;
}

.compare-scope-picker input {
    margin: 0;
}

.requirement-manual-note {
    display: flex;
    margin-bottom: 18px;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.requirement-manual-note form {
    flex: none;
}

.requirement-group-stack {
    display: grid;
    gap: 16px;
}

.requirement-group-card {
    padding: 16px 18px 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--surface-soft);
}

.requirement-group-head {
    display: flex;
    margin-bottom: 12px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.grant-major,
.grant-credential {
    display: block;
    max-width: 300px;
    white-space: normal;
    line-height: 1.45;
}

.grant-major {
    font-weight: 700;
}

.text-block {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.75;
}

.panel-grid {
    display: grid;
    margin-top: 18px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    align-items: start;
}

.page-actions .button {
    white-space: nowrap;
}

.requirement-table {
    table-layout: fixed;
}

.calendar-table {
    table-layout: fixed;
    min-width: 1080px;
}

.calendar-table .table-secondary {
    display: -webkit-box;
    overflow: hidden;
    white-space: normal;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.calendar-table .table-primary {
    white-space: normal;
}

.calendar-year-column {
    width: 92px;
}

.calendar-term-column {
    width: 88px;
}

.calendar-category-column {
    width: 118px;
}

.calendar-date-column {
    width: 224px;
}

.calendar-action-column {
    width: 96px;
}

.alias-table {
    table-layout: fixed;
}

.alias-table td {
    vertical-align: top;
    white-space: normal;
}

.alias-major-column {
    width: 22%;
}

.alias-count-column {
    width: 74px;
    white-space: nowrap;
}

.alias-column {
    width: 42%;
}

.alias-synced-column {
    width: 132px;
    white-space: nowrap;
}

.alias-action-column {
    width: 108px;
}

.alias-tag {
    max-width: 100%;
    min-height: 0;
    padding: 5px 10px;
    align-items: flex-start;
    white-space: normal;
    overflow-wrap: anywhere;
    text-align: left;
    line-height: 1.5;
}

.requirement-table th,
.requirement-table td {
    vertical-align: top;
    white-space: normal;
    overflow-wrap: anywhere;
}

.requirement-index-column {
    width: 52px;
    color: var(--muted);
}

.requirement-name-column {
    width: 42%;
}

.requirement-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
}

.requirement-meta .badge {
    white-space: nowrap;
}

.requirement-courses-column {
    width: 24%;
}

.requirement-description-column {
    width: 34%;
    color: var(--muted);
}

.requirement-course-list {
    color: var(--ink);
    font-size: 11.5px;
    line-height: 1.7;
    overflow-wrap: anywhere;
    white-space: normal;
}

.requirement-section-row td {
    background: var(--surface-soft);
    font-size: 12px;
    letter-spacing: 0;
}

.requirement-section-row strong {
    margin-right: 8px;
}

@media (max-width: 980px) {
    .panel-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .assessment-layout {
        grid-template-columns: 1fr;
    }

    .assessment-intro {
        position: static;
        padding-top: 0;
    }

    .assessment-intro h1 {
        max-width: 680px;
    }

    .intro-copy {
        max-width: 620px;
    }

    .progress-list {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 10px;
    }

    .progress-item {
        display: block;
        min-height: auto;
        padding: 0;
    }

    .progress-item::before,
    .progress-item small {
        display: none;
    }

    .progress-index {
        margin-bottom: 7px;
    }

    .privacy-block {
        max-width: none;
    }

    .detail-grid {
        grid-template-columns: 1fr;
    }

    .requirement-table {
        min-width: 880px;
    }

    .sidebar-card {
        position: static;
    }

    .admin-shell {
        grid-template-columns: minmax(0, 1fr);
    }

    .page-heading {
        flex-wrap: wrap;
        align-items: flex-start;
    }

    .page-heading > div {
        min-width: 0;
    }

    .page-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .page-actions form {
        flex-wrap: wrap;
    }

    .page-actions form select {
        flex: 1 1 200px;
        min-width: 0;
    }

    .admin-sidebar {
        display: none;
    }

    .mobile-admin-header {
        display: flex;
        min-height: 60px;
        padding: 0 20px;
        align-items: center;
        justify-content: space-between;
        color: #fff;
        background: #132b25;
    }
}

@media (max-width: 680px) {
    .assessment-shell,
    .success-shell {
        padding: 18px 14px 34px;
    }

    .assessment-header {
        margin-bottom: 24px;
    }

    .secure-note {
        display: none;
    }

    .assessment-intro h1 {
        font-size: 29px;
    }

    .progress-list {
        margin: 26px 0;
    }

    .progress-item strong {
        font-size: 11px;
    }

    .form-panel {
        padding: 20px 16px;
    }

    .form-panel-header {
        display: block;
    }

    .progress-track {
        width: 100%;
        margin-top: 16px;
    }

    .field-grid,
    .credit-grade-fields,
    .choice-grid,
    .choice-grid.compact,
    .reference-box,
    .detail-list,
    .stat-grid {
        grid-template-columns: 1fr;
    }

    .field-span-2,
    .detail-list .detail-span {
        grid-column: auto;
    }

    .form-actions {
        flex-wrap: wrap;
    }

    .form-actions .button {
        flex: 1 1 auto;
    }

    .button-submit {
        flex-basis: 100% !important;
    }

    .admin-content,
    .admin-topbar {
        padding-inline: 16px;
    }

    .page-heading,
    .filter-bar {
        align-items: stretch;
        flex-direction: column;
    }

    .filter-bar input[type="search"],
    .filter-bar select {
        max-width: none;
        width: 100%;
    }

    .login-card {
        padding: 24px 20px;
    }
}

.prereq-list {
    display: grid;
    gap: 10px;
}

.prereq-group {
    display: grid;
    gap: 10px;
    padding: 14px 16px;
    border: 1px solid #e2e7e4;
    border-radius: var(--radius);
    background: var(--surface-soft);
}

.prereq-group-head {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 12px;
    align-items: baseline;
    justify-content: space-between;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
}

.prereq-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.prereq-options li {
    position: relative;
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 7px;
    min-height: 24px;
}

.prereq-options li + li::before {
    content: '或';
    margin-right: 4px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
}

.prereq-code {
    font-size: 13px;
    font-weight: 750;
    color: var(--accent-dark);
    text-decoration: none;
}

a.prereq-code:hover {
    text-decoration: underline;
}

.prereq-code.is-unlinked {
    color: var(--ink);
}

.prereq-title {
    color: var(--muted);
    font-size: 12px;
}

.prereq-note {
    color: var(--ink);
    font-size: 12px;
    font-weight: 650;
}

.prereq-join {
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    text-align: center;
}

.badge-link {
    text-decoration: none;
}

.badge-link:hover {
    background: #d8ebe6;
}

.filter-check {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 650;
    white-space: nowrap;
}

.filter-check input[type='checkbox'] {
    width: 15px;
    height: 15px;
    accent-color: var(--accent);
}

.mapping-status-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 18px;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    background: var(--surface-soft);
}

.mapping-status-bar > div {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.mapping-status-bar small {
    color: var(--muted);
}

.prereq-inline {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 5px 7px;
    max-width: 420px;
}

.prereq-clause {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 5px;
    padding: 3px 8px;
    border: 1px solid #e2e7e4;
    border-radius: var(--radius-sm);
    background: var(--surface-soft);
}

.prereq-token {
    font-size: 12px;
    font-weight: 700;
    color: var(--accent-dark);
}

.prereq-token.is-muted {
    color: var(--muted);
    font-weight: 600;
}

.prereq-join-inline {
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
}

.prereq-more {
    font-size: 11px;
    font-weight: 700;
    color: var(--accent);
    text-decoration: none;
}

.prereq-more:hover {
    text-decoration: underline;
}

.gpa-record {
    display: grid;
    gap: 14px;
}

.gpa-record-head {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 32px;
    align-items: baseline;
}

.gpa-metric {
    display: grid;
    gap: 2px;
    min-width: 96px;
}

.gpa-metric span {
    color: var(--muted);
    font-size: 12px;
}

.gpa-metric strong {
    color: var(--ink);
    font-size: 18px;
}

.gpa-metric .gpa-metric-text {
    font-size: 14px;
    font-weight: 600;
}

.gpa-band-list {
    display: grid;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.gpa-band-row {
    display: grid;
    grid-template-columns: 132px minmax(0, 1fr) 68px;
    gap: 12px;
    align-items: center;
    font-size: 12px;
}

.gpa-band-label {
    color: var(--muted);
    white-space: nowrap;
}

.gpa-band-track {
    display: block;
    height: 8px;
    border-radius: 4px;
    background: var(--surface-soft);
    overflow: hidden;
}

.gpa-band-fill {
    display: block;
    height: 100%;
    border-radius: 4px;
    background: var(--accent);
}

.gpa-band-value {
    color: var(--ink);
    font-weight: 600;
    text-align: right;
}

.gpa-band-form {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 12px;
}

.graduation-table {
    table-layout: fixed;
    min-width: 1080px;
}

.graduation-table .table-secondary {
    white-space: normal;
}

.graduation-year-column {
    width: 200px;
}

.graduation-size-column {
    width: 108px;
}

.graduation-rate-column {
    width: 120px;
}

.graduation-action-column {
    width: 96px;
}

.rate-meter {
    display: flex;
    gap: 10px;
    align-items: center;
}

.rate-meter-track {
    display: block;
    width: 120px;
    height: 8px;
    border-radius: 4px;
    background: var(--surface-soft);
    overflow: hidden;
}

.rate-meter-fill {
    display: block;
    height: 100%;
    border-radius: 4px;
    background: var(--accent);
}

.rate-meter strong {
    font-size: 13px;
    white-space: nowrap;
}

.foundation-sync-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.foundation-sync-card:first-child {
    grid-column: 1 / -1;
}

.foundation-sync-heading {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: flex-start;
}

.foundation-sync-heading h3 {
    margin: 0 0 6px;
    font-size: 16px;
}

.foundation-sync-heading p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.6;
}

.foundation-sync-status {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin-top: 16px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--surface-soft);
    font-size: 12px;
}

.foundation-sync-status > div {
    display: grid;
    gap: 3px;
}

.foundation-sync-status strong {
    font-size: 13px;
}

.foundation-sync-status span {
    color: var(--muted);
}

.foundation-sync-status.is-completed .course-sync-indicator {
    background: #2f7d55;
}

.foundation-sync-status.is-failed .course-sync-indicator {
    background: #b23a3a;
}

.sample-year-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.sample-year-card .panel-body {
    display: grid;
    gap: 18px;
}

.sample-term {
    display: grid;
    gap: 8px;
}

.sample-term h4 {
    margin: 0;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
}

.sample-entry {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 44px;
    gap: 3px 12px;
    font-size: 13px;
}

.sample-entry strong {
    text-align: right;
}

.sample-entry small {
    grid-column: 1 / -1;
    color: var(--muted);
}

@media (max-width: 900px) {
    .gpa-band-form {
        grid-template-columns: minmax(0, 1fr);
    }

    .gpa-band-row {
        grid-template-columns: 108px minmax(0, 1fr) 60px;
    }

    .foundation-sync-grid,
    .sample-year-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .foundation-sync-card:first-child {
        grid-column: auto;
    }

    .foundation-sync-heading {
        align-items: stretch;
        flex-direction: column;
    }

    .foundation-sync-heading form,
    .foundation-sync-heading button {
        width: 100%;
    }
}

/* 四年准时毕业风险预测 */
.report-shell {
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
    padding: 30px 0 56px;
    overflow-x: clip;
}

.report-header,
.report-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.report-header {
    margin-bottom: 24px;
}

.report-header > span {
    color: var(--muted);
    font-size: 12px;
    overflow-wrap: anywhere;
}

.report-footer {
    margin-top: 20px;
    color: var(--muted);
    font-size: 12px;
}

.success-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.prediction-overview {
    min-width: 0;
    padding: clamp(22px, 4vw, 36px);
    border: 1px solid var(--line);
    border-left-width: 5px;
    border-radius: var(--radius);
    background: #fff;
    overflow: hidden;
}

.prediction-risk-low {
    border-left-color: var(--success);
}

.prediction-risk-medium {
    border-left-color: var(--amber);
}

.prediction-risk-high {
    border-left-color: var(--danger);
}

.prediction-risk-insufficient-data {
    border-left-color: var(--muted);
}

.prediction-overview-head {
    display: flex;
    min-width: 0;
    align-items: flex-start;
    justify-content: space-between;
    gap: 30px;
}

.prediction-overview-head h2 {
    margin: 0;
    font-size: clamp(30px, 4vw, 46px);
    line-height: 1.12;
}

.prediction-overview-head > div {
    min-width: 0;
}

.prediction-overview-head > div > p:last-child {
    max-width: 720px;
    margin: 9px 0 0;
    color: var(--muted);
    overflow-wrap: anywhere;
}

.prediction-risk-stamp {
    display: grid;
    min-width: 142px;
    padding: 14px 18px;
    align-items: baseline;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--surface-soft);
    text-align: center;
}

.prediction-risk-stamp span,
.prediction-risk-stamp small {
    color: var(--muted);
    font-size: 10px;
}

.prediction-risk-stamp strong {
    font-size: 34px;
    line-height: 1.2;
}

.prediction-risk-stamp strong em {
    margin-left: 2px;
    font-size: 17px;
    font-style: normal;
}

.prediction-probability {
    margin-top: 24px;
    padding: 20px 0 2px;
    border-top: 1px solid var(--line);
}

.prediction-probability-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.prediction-probability-heading > div {
    display: flex;
    align-items: baseline;
    gap: 10px;
}

.prediction-probability-heading > div > span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.prediction-probability-heading > div > strong {
    font-size: 28px;
    line-height: 1;
}

.prediction-probability-scale {
    position: relative;
    height: 12px;
    margin-top: 14px;
}

.prediction-probability-zones {
    display: flex;
    height: 100%;
    overflow: hidden;
    border-radius: 999px;
}

.prediction-probability-zones span {
    display: block;
    height: 100%;
}

.prediction-probability-zones .is-low {
    width: 25%;
    background: #b9dfca;
}

.prediction-probability-zones .is-medium {
    width: 25%;
    background: #f0d39d;
}

.prediction-probability-zones .is-high {
    width: 50%;
    background: #ebbbb5;
}

.prediction-probability-marker {
    position: absolute;
    top: -4px;
    width: 4px;
    height: 20px;
    border: 1px solid #fff;
    border-radius: 2px;
    background: var(--ink);
    box-shadow: 0 0 0 1px rgba(23, 35, 31, 0.25);
    transform: translateX(-50%);
}

.prediction-probability-marker.is-low {
    background: var(--success);
}

.prediction-probability-marker.is-medium {
    background: var(--amber);
}

.prediction-probability-marker.is-high {
    background: var(--danger);
}

.prediction-probability-labels {
    display: flex;
    margin-top: 7px;
    justify-content: space-between;
    color: var(--muted);
    font-size: 10px;
}

.prediction-probability-statement {
    margin: 18px 0 0;
    font-size: 24px;
    font-weight: 750;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.prediction-probability-statement strong {
    color: var(--danger);
}

.prediction-threshold-note {
    margin: 12px 0 0;
    padding-top: 10px;
    color: var(--muted);
    border-top: 1px solid var(--line);
    font-size: 11px;
    line-height: 1.65;
}

.prediction-manual-note {
    margin-top: 20px;
    padding: 14px 16px;
    border: 1px solid #d6e4df;
    border-radius: var(--radius-sm);
    background: var(--accent-soft);
}

.prediction-manual-note strong,
.prediction-manual-note span {
    display: block;
}

.prediction-manual-note span {
    margin-top: 2px;
    color: var(--muted);
    font-size: 11px;
}

.prediction-manual-note p {
    margin: 8px 0 0;
    font-size: 12px;
}

.prediction-metrics {
    display: grid;
    margin-top: 28px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.prediction-metrics > div {
    display: grid;
    min-width: 0;
    padding: 16px 18px;
    border-right: 1px solid var(--line);
    gap: 1px;
    overflow-wrap: anywhere;
}

.prediction-metrics > div:last-child {
    border-right: 0;
}

.prediction-metrics span,
.prediction-metrics small {
    color: var(--muted);
    font-size: 10px;
}

.prediction-metrics strong {
    font-size: 20px;
}

.prediction-benchmark {
    display: grid;
    margin-top: 18px;
    padding: 14px 18px;
    grid-template-columns: minmax(160px, 220px) minmax(0, 1fr);
    align-items: center;
    gap: 12px 24px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f7f9f8;
}

.prediction-benchmark div {
    display: grid;
    gap: 2px;
}

.prediction-benchmark span,
.prediction-benchmark p {
    color: var(--muted);
    font-size: 11px;
}

.prediction-benchmark strong {
    font-size: 22px;
}

.prediction-benchmark p {
    margin: 0;
    line-height: 1.6;
}

.prediction-benchmark a {
    color: var(--accent);
    font-weight: 700;
}

.prediction-coverage {
    display: grid;
    margin-top: 20px;
    grid-template-columns: 90px minmax(0, 1fr);
    align-items: center;
    gap: 8px 14px;
}

.prediction-coverage > div:first-child {
    display: flex;
    grid-column: 1 / -1;
    justify-content: space-between;
    color: var(--muted);
    font-size: 11px;
}

.prediction-coverage-track,
.prediction-factor-track {
    height: 7px;
    overflow: hidden;
    border-radius: 4px;
    background: #edf1ef;
}

.prediction-coverage-track span,
.prediction-factor-track span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--accent);
}

.prediction-coverage p {
    grid-column: 2;
    margin: 0;
    color: var(--muted);
    font-size: 11px;
    overflow-wrap: anywhere;
}

.prediction-factor-grid {
    display: grid;
    margin-top: 18px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.prediction-factor {
    display: flex;
    min-width: 0;
    padding: 20px;
    flex-direction: column;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    gap: 13px;
}

.prediction-factor.is-missing {
    border-style: dashed;
    background: #fbfcfb;
}

.prediction-factor-head {
    display: flex;
    min-width: 0;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.prediction-factor-head > div {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.prediction-factor-head > div,
.prediction-factor-head p {
    min-width: 0;
}

.prediction-factor-head > div > span {
    font-size: 15px;
    font-weight: 750;
}

.prediction-factor-head p {
    margin: 0;
    color: var(--muted);
    font-size: 10px;
    white-space: nowrap;
}

.prediction-status {
    display: inline-flex;
    min-height: 24px;
    padding: 0 9px;
    align-items: center;
    border-radius: 999px;
    color: var(--accent-dark);
    background: var(--accent-soft);
    font-size: 10px;
    font-weight: 800;
    white-space: nowrap;
}

.prediction-status-low,
.prediction-status-ok,
.prediction-status-not-applicable {
    color: var(--success);
    background: var(--success-soft);
}

.prediction-status-medium,
.prediction-status-warning {
    color: #7a5217;
    background: var(--amber-soft);
}

.prediction-status-high,
.prediction-status-risk {
    color: var(--danger);
    background: var(--danger-soft);
}

.prediction-status-insufficient-data,
.prediction-status-missing {
    color: var(--muted);
    background: #eef1ef;
}

.prediction-factor-summary {
    margin: 0;
    font-size: 13px;
}

.prediction-factor-track span.is-warning {
    background: var(--amber);
}

.prediction-factor-track span.is-risk {
    background: var(--danger);
}

.prediction-evidence {
    display: grid;
    margin: 0;
    gap: 0;
}

.prediction-evidence > div {
    display: grid;
    padding: 8px 0;
    grid-template-columns: minmax(100px, 0.8fr) minmax(0, 1.2fr) auto;
    align-items: baseline;
    border-top: 1px solid #edf0ee;
    gap: 10px;
}

.prediction-evidence dt,
.prediction-evidence small {
    color: var(--muted);
    font-size: 10px;
}

.prediction-evidence dd {
    margin: 0;
    font-size: 11px;
    font-weight: 650;
    overflow-wrap: anywhere;
}

.prediction-evidence small {
    text-align: right;
}

.prediction-evidence a {
    color: var(--accent);
}

.prediction-recommendation {
    margin: auto 0 0;
    padding: 10px 12px;
    border-left: 3px solid var(--accent);
    background: var(--surface-soft);
    font-size: 11px;
}

.prediction-lower-grid {
    display: grid;
    margin-top: 18px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.prediction-list-panel,
.prediction-course-panel,
.prediction-review-panel {
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
}

.prediction-section-head {
    display: flex;
    margin-bottom: 14px;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
}

.prediction-section-head h3,
.prediction-section-head h4 {
    margin: 0;
    font-size: 15px;
}

.prediction-section-head p,
.prediction-section-head > span {
    margin: 3px 0 0;
    color: var(--muted);
    font-size: 11px;
}

.prediction-list-row {
    padding: 11px 0;
    border-top: 1px solid #edf0ee;
}

.prediction-list-row strong {
    font-size: 12px;
}

.prediction-list-row p,
.prediction-empty {
    margin: 2px 0 0;
    color: var(--muted);
    font-size: 11px;
}

.prediction-actions {
    display: grid;
    margin: 0;
    padding-left: 20px;
    gap: 8px;
    font-size: 12px;
}

.prediction-course-panel {
    margin-top: 18px;
}

.prediction-course-columns {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
}

.prediction-course-columns h4 {
    margin: 0 0 9px;
    font-size: 12px;
}

.prediction-course-table {
    table-layout: fixed;
    white-space: normal;
}

.prediction-course-table th,
.prediction-course-table td {
    padding: 9px 10px;
    vertical-align: top;
    white-space: normal;
    overflow-wrap: anywhere;
}

.prediction-course-table th:first-child,
.prediction-course-table td:first-child {
    width: 43%;
}

.prediction-course-input {
    font-size: 10px;
    overflow-wrap: anywhere;
}

.prediction-disclaimer {
    margin: 18px 0 0;
    padding: 13px 16px;
    border-radius: var(--radius-sm);
    color: var(--muted);
    background: #ebefed;
    font-size: 11px;
}

.prediction-review-panel {
    margin-top: 18px;
}

.prediction-review-panel > div {
    margin-bottom: 18px;
}

.prediction-review-panel h3 {
    margin: 0;
    font-size: 15px;
}

.prediction-review-panel > div p {
    margin: 3px 0 0;
    color: var(--muted);
    font-size: 11px;
}

.prediction-recalculate-form {
    display: flex;
    margin-top: 18px;
    padding-top: 16px;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid var(--line);
    gap: 20px;
}

.prediction-recalculate-form span {
    color: var(--muted);
    font-size: 11px;
}

@media (max-width: 980px) {
    .prediction-factor-grid,
    .prediction-lower-grid,
    .prediction-course-columns {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 680px) {
    .report-shell {
        width: min(calc(100% - 28px), 1180px);
        padding-top: 18px;
        overflow-x: visible;
    }

    .report-header,
    .report-footer,
    .prediction-overview-head,
    .prediction-recalculate-form {
        align-items: stretch;
        flex-direction: column;
    }

    .prediction-risk-stamp {
        width: 100%;
        min-width: 0;
    }

    .prediction-probability-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .prediction-probability-statement {
        font-size: 20px;
    }

    .prediction-overview {
        padding: 20px 16px;
    }

    .prediction-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .prediction-metrics > div:nth-child(2) {
        border-right: 0;
    }

    .prediction-metrics > div:nth-child(-n + 2) {
        border-bottom: 1px solid var(--line);
    }

    .prediction-benchmark {
        grid-template-columns: minmax(0, 1fr);
    }

    .prediction-coverage {
        grid-template-columns: 1fr;
    }

    .prediction-coverage p {
        grid-column: 1;
    }

    .prediction-evidence > div {
        grid-template-columns: 1fr;
        gap: 2px;
    }

    .prediction-evidence small {
        text-align: left;
    }

    .success-actions {
        flex-direction: column;
    }
}
