:root {
    --ink: #18211d;
    --muted: #6d7772;
    --line: #dfe4e1;
    --line-strong: #ccd5d0;
    --surface: #ffffff;
    --canvas: #f7f8f6;
    --green: #155c42;
    --green-dark: #0c3f2d;
    --green-soft: #e9f3ed;
    --amber: #b66b12;
    --amber-soft: #fff0d8;
    --gray-soft: #eef1ef;
    --danger: #df5f36;
    --shadow: 0 12px 36px rgba(22, 42, 33, .07);
}

* { box-sizing: border-box; }
html { background: var(--canvas); }
body {
    margin: 0;
    color: var(--ink);
    background: var(--canvas);
    font-family: "Microsoft YaHei UI", "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
    font-size: 14px;
    -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible {
    outline: 3px solid rgba(21, 92, 66, .22);
    outline-offset: 2px;
}

.topbar {
    min-height: 86px;
    padding: 0 2.4vw;
    display: grid;
    grid-template-columns: minmax(250px, 1fr) auto minmax(250px, 1fr);
    align-items: center;
    gap: 24px;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
}
.brand { display: flex; gap: 12px; align-items: center; font-size: 18px; font-weight: 800; letter-spacing: .01em; }
.brand small { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; font-weight: 400; }
.brand-mark {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 10px;
    color: white;
    background: var(--green-dark);
    font-family: "STSong", "SimSun", serif;
    font-size: 23px;
    font-weight: 800;
}
nav { grid-column: 2; display: flex; align-items: stretch; align-self: stretch; gap: 42px; }
nav > a, nav form { display: flex; align-items: center; position: relative; }
nav > a { font-size: 15px; font-weight: 600; }
nav > a::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 3px;
    border-radius: 3px 3px 0 0;
    background: transparent;
}
nav > a.active { color: var(--green); }
nav > a.active::after { background: var(--green); }
nav form { margin-left: 8px; }
.text-button { border: 0; padding: 10px 0; background: transparent; color: var(--muted); cursor: pointer; }

.page-shell { width: 100%; min-height: calc(100vh - 135px); padding: 28px 2.2vw 18px; }
footer { padding: 10px 20px 18px; text-align: center; color: #8a928e; font-size: 12px; }

.workspace-toolbar {
    display: grid;
    grid-template-columns: minmax(330px, .72fr) minmax(680px, 1.7fr);
    align-items: end;
    gap: 34px;
    margin-bottom: 18px;
}
.workspace-copy { padding-bottom: 2px; }
h1 { margin: 0 0 7px; font-size: clamp(28px, 2.6vw, 38px); line-height: 1.2; letter-spacing: -.025em; }
h2 { line-height: 1.45; }
.muted { margin: 0; color: var(--muted); line-height: 1.65; }
.filter-bar {
    display: grid;
    grid-template-columns: 145px 145px minmax(230px, 1fr) auto auto;
    align-items: end;
    gap: 12px;
}
.filter-bar label { display: grid; gap: 7px; }
.filter-bar label > span { color: var(--muted); font-size: 12px; font-weight: 700; }
.filter-bar select, .filter-bar input {
    width: 100%;
    height: 42px;
    padding: 0 13px;
    border: 1px solid var(--line-strong);
    border-radius: 8px;
    color: var(--ink);
    background: var(--surface);
}
.filter-bar input::placeholder { color: #9ba39f; }
.filter-submit, .reset-link {
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-weight: 700;
}
.filter-submit { min-width: 78px; border: 1px solid var(--green); color: white; background: var(--green); cursor: pointer; }
.reset-link { min-width: 58px; border: 1px solid var(--line-strong); background: var(--surface); }

.review-workspace {
    display: grid;
    grid-template-columns: minmax(650px, 56%) minmax(430px, 44%);
    min-height: 635px;
    height: calc(100vh - 228px);
    max-height: 760px;
    overflow: hidden;
    border: 1px solid var(--line-strong);
    border-radius: 10px;
    background: var(--surface);
    box-shadow: var(--shadow);
}
.notice-index { min-width: 0; min-height: 0; display: grid; grid-template-rows: 48px minmax(0, 1fr) 42px; border-right: 1px solid var(--line-strong); }
.notice-index-head, .notice-row {
    display: grid;
    grid-template-columns: 82px minmax(210px, 1.7fr) 90px minmax(116px, 1fr) 86px;
    column-gap: 14px;
    align-items: center;
}
.notice-index-head {
    min-height: 48px;
    padding: 0 16px;
    color: var(--muted);
    border-bottom: 1px solid var(--line);
    font-size: 12px;
    font-weight: 700;
}
.notice-rows { overflow: auto; }
.notice-index-footer { display: flex; align-items: center; padding: 0 16px; color: var(--muted); border-top: 1px solid var(--line); font-size: 12px; }
.notice-row {
    min-height: 92px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--line);
    transition: background-color .15s ease;
}
.notice-row:hover { background: #f6faf7; }
.notice-row.selected { background: var(--green-soft); box-shadow: inset 3px 0 var(--green); }
.notice-row strong { min-width: 0; font-size: 14px; line-height: 1.55; }
.notice-row > span:not(:first-child), .notice-row time { min-width: 0; color: #59645e; font-size: 12px; line-height: 1.55; }
.notice-row time small { display: block; margin-top: 2px; color: var(--muted); }

.badge, .status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 5px 9px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}
.badge-high, .status-success { color: var(--green); background: #dfeee5; }
.badge-normal, .status-running { color: var(--amber); background: var(--amber-soft); }
.badge-low, .status-skipped { color: #666e6a; background: var(--gray-soft); }
.status-failed { color: #a13232; background: #f9e3e3; }

.notice-preview { min-width: 0; min-height: 0; background: #fdfefd; }
.preview-scroll { height: 100%; overflow: auto; padding: 24px 26px; }
.notice-preview h2 { margin: 13px 0 14px; font-size: clamp(20px, 1.7vw, 26px); line-height: 1.45; letter-spacing: -.015em; }
.preview-dates { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 22px; margin-bottom: 18px; }
.preview-dates p { margin: 0; }
.preview-dates span, .preview-facts dt { display: block; margin-bottom: 5px; color: var(--muted); font-size: 12px; }
.preview-dates strong { font-size: 13px; font-weight: 600; }
.preview-dates .deadline { color: var(--danger); }
.match-reason { padding: 16px 18px; border-radius: 8px; background: var(--green-soft); }
.match-reason h3, .project-stage h3 { margin: 0 0 10px; font-size: 14px; }
.match-reason p { margin: 0; color: #3e4b45; line-height: 1.7; }
.match-reason ul { margin: 10px 0 0; padding-left: 19px; color: #425148; font-size: 13px; line-height: 1.75; }
.feedback-panel { margin-top: 16px; padding: 15px; border: 1px solid var(--line); border-radius: 8px; background: #fafcfb; }
.feedback-panel h3, .feedback-panel h2 { margin: 0 0 10px; font-size: 14px; }
.feedback-panel form { display: flex; flex-wrap: wrap; gap: 8px; }
.feedback-button { min-height: 36px; padding: 7px 14px; border: 1px solid var(--line-strong); border-radius: 6px; color: #45524b; background: white; font: inherit; font-weight: 700; cursor: pointer; }
.feedback-button:hover, .feedback-button.selected { border-color: var(--green); color: var(--green); background: var(--green-soft); }
.feedback-panel p { margin: 9px 0 0; color: var(--muted); font-size: 12px; }
.detail-feedback { margin: 28px 0; }
.preview-facts { display: grid; grid-template-columns: 1fr 1fr; margin: 20px 0; }
.preview-facts div { padding: 10px 0; border-bottom: 1px solid var(--line); }
.preview-facts div:first-child { grid-column: 1 / -1; }
.preview-facts div:nth-child(2) { padding-right: 14px; }
.preview-facts dd { margin: 0; line-height: 1.5; }
.preview-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.primary-button, .secondary-button {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 7px;
    padding: 10px 16px;
    font-weight: 800;
}
.primary-button { color: white; background: var(--green); }
.secondary-button { border: 1px solid var(--line-strong); background: var(--surface); }
.copy-source-button { grid-column: 1 / -1; color: inherit; font: inherit; cursor: pointer; }
.source-help { margin: 9px 0 0; color: var(--muted); font-size: 12px; line-height: 1.6; }

.project-stage { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.project-stage ol { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin: 16px 0 0; padding: 0; list-style: none; }
.project-stage li { position: relative; display: grid; justify-items: center; gap: 7px; color: #959c98; text-align: center; font-size: 11px; }
.project-stage li::before { content: ""; position: absolute; top: 6px; right: 50%; left: -50%; height: 1px; background: var(--line-strong); }
.project-stage li:first-child::before { display: none; }
.project-stage li > span { position: relative; z-index: 1; width: 13px; height: 13px; border: 3px solid #eef1ef; border-radius: 50%; background: #cbd1ce; }
.project-stage li.current { color: var(--green); }
.project-stage li.current > span { border-color: #cde3d7; background: var(--green); }
.project-stage strong { font-size: 11px; font-weight: 700; }
.project-stage small { font-size: 10px; }

.empty-state, .preview-empty { display: grid; place-items: center; align-content: center; gap: 8px; min-height: 220px; color: var(--muted); text-align: center; }
.empty-state { margin: 24px; border: 1px dashed var(--line-strong); border-radius: 8px; }
.preview-empty { height: 100%; }

/* Detail, login and status pages */
.page-heading { display: flex; justify-content: space-between; align-items: end; margin-bottom: 24px; }
.eyebrow { margin: 0 0 6px; color: var(--green); font-size: 12px; font-weight: 800; letter-spacing: .14em; }
.detail-card, .login-card, .table-wrap { border: 1px solid var(--line); border-radius: 10px; background: var(--surface); box-shadow: var(--shadow); }
.back-link { display: inline-block; margin-bottom: 16px; color: var(--green); font-weight: 700; }
.detail-card { padding: clamp(24px, 5vw, 54px); }
.detail-card h1 { max-width: 900px; margin-top: 16px; }
.notice-topline, .notice-meta { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.notice-topline time, .notice-meta { color: var(--muted); font-size: 12px; }
.facts { display: grid; grid-template-columns: repeat(2, 1fr); margin: 32px 0; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.facts div { min-height: 92px; padding: 17px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.facts dt { margin-bottom: 8px; color: var(--muted); font-size: 12px; }
.facts dd { margin: 0; line-height: 1.55; }
.match-panel { margin: 28px 0; padding: 20px; border-radius: 8px; background: var(--green-soft); }
.match-panel h2, .body-copy h2 { margin-top: 0; font-size: 16px; }
.tag-row { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-row span { padding: 7px 10px; border-radius: 6px; background: white; font-size: 13px; }
.body-copy p { white-space: pre-wrap; color: #354139; line-height: 1.9; }
.inline-button { width: auto; margin-top: 16px; }
.source-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.source-actions .copy-source-button { grid-column: auto; }
.login-card { width: min(440px, 100%); margin: 40px auto; padding: 36px; }
.stack-form { display: grid; gap: 18px; margin-top: 28px; }
.stack-form label { color: var(--muted); font-size: 13px; }
.stack-form input { width: 100%; margin-top: 7px; padding: 12px; border: 1px solid var(--line); border-radius: 8px; }
.alert { margin-top: 20px; padding: 12px; border-radius: 8px; color: #8e2727; background: #f9e3e3; }
.table-wrap { overflow: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 15px 17px; border-bottom: 1px solid var(--line); text-align: left; font-size: 13px; vertical-align: top; }
th { color: var(--muted); font-size: 12px; }

@media (max-width: 1100px) {
    .topbar { grid-template-columns: 1fr auto; }
    nav { grid-column: 2; gap: 24px; }
    .review-workspace { grid-template-columns: minmax(510px, 54%) minmax(400px, 46%); }
    .notice-index-head, .notice-row { grid-template-columns: 76px minmax(210px, 1fr) 84px 86px; }
    .notice-index-head span:nth-child(4), .notice-row > span:nth-child(4) { display: none; }
    .workspace-toolbar { grid-template-columns: 1fr; gap: 18px; }
    .filter-bar { grid-template-columns: 150px 150px minmax(230px, 1fr) auto auto; }
    .review-workspace { height: calc(100vh - 310px); }
}

@media (max-width: 860px) {
    .topbar { min-height: auto; padding: 14px 20px; display: flex; flex-wrap: wrap; }
    .brand { margin-right: auto; }
    nav { width: 100%; height: 46px; gap: 24px; overflow-x: auto; }
    .page-shell { padding: 24px 18px; }
    .filter-bar { grid-template-columns: 1fr 1fr; }
    .search-field { grid-column: 1 / -1; }
    .review-workspace { display: block; height: auto; max-height: none; overflow: visible; }
    .notice-index { border-right: 0; border-bottom: 1px solid var(--line-strong); }
    .notice-rows { max-height: 440px; }
    .notice-preview { min-height: 560px; }
}

@media (max-width: 560px) {
    .brand { font-size: 15px; }
    .brand-mark { width: 42px; height: 42px; }
    .brand small { font-size: 10px; }
    nav { gap: 20px; }
    .text-button { font-size: 13px; }
    .result-summary { display: none; }
    .filter-bar { grid-template-columns: 1fr; }
    .search-field { grid-column: auto; }
    .notice-index { display: block; }
    .notice-index-head { display: none; }
    .notice-rows { height: auto; max-height: none; overflow: visible; }
    .notice-index-footer { min-height: 42px; }
    .notice-row { grid-template-columns: 74px 1fr 74px; min-height: 100px; }
    .notice-row > span:nth-child(4), .notice-row time { display: none; }
    .preview-scroll { padding: 22px 18px; }
    .preview-dates, .preview-facts, .preview-actions { grid-template-columns: 1fr; }
    .preview-facts div:first-child { grid-column: auto; }
    .project-stage ol { grid-template-columns: 1fr; gap: 14px; }
    .project-stage li { grid-template-columns: 18px 1fr; justify-items: start; text-align: left; }
    .project-stage li::before { display: none; }
    .project-stage small { grid-column: 2; }
    .facts { grid-template-columns: 1fr; }
}
