/* =========================================================
   Editorial · 科研科普工作台
   暖米色 #F9F8F6 / 柔和黑 #1C1C1C / 纯单色 / 直角 / 无阴影
   ========================================================= */

:root {
    --bg: #F9F8F6;
    --fg: #1C1C1C;
    /* 透明度层次保留 /60 与 /40 的关系，整体压深到小字号也满足 WCAG AA */
    --fg-60: rgba(28, 28, 28, 0.68);
    --fg-40: rgba(28, 28, 28, 0.62);
    --fg-20: rgba(28, 28, 28, 0.26);
    --fg-10: rgba(28, 28, 28, 0.12);
    --serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "SimSun", Georgia, "Times New Roman", serif;
    --sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, "Segoe UI", sans-serif;
    --mono: "JetBrains Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    --pad: clamp(20px, 3vw, 40px);
    --max: 1360px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--fg);
    font-family: var(--sans);
    font-size: 14px;
    line-height: 1.75;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
h4,
p,
figure,
blockquote {
    margin: 0;
}

h1,
h2,
h3,
h4 {
    font-family: var(--serif);
    font-weight: 400;
    letter-spacing: -0.035em;
    line-height: 1.05;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select,
textarea {
    font: inherit;
    color: inherit;
}

button {
    cursor: pointer;
}

::selection {
    background: var(--fg);
    color: var(--bg);
}

:focus-visible {
    outline: 1px solid var(--fg);
    outline-offset: 3px;
}

.skip-link {
    position: fixed;
    top: -120px;
    left: 16px;
    z-index: 200;
    background: var(--fg);
    color: var(--bg);
    padding: 8px 14px;
    font-size: 11px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.skip-link:focus {
    top: 8px;
}

mark {
    background: transparent;
    color: var(--fg);
    border-bottom: 1px solid var(--fg);
    padding-bottom: 1px;
}

select option {
    background: var(--bg);
    color: var(--fg);
}

[hidden] {
    display: none !important;
}

/* ---------------------------------------------------------
   Navigation
   --------------------------------------------------------- */

.nav {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 50;
    background: rgba(249, 248, 246, 0.92);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--fg-10);
}

.nav-inner {
    max-width: var(--max);
    margin: 0 auto;
    padding: 0 var(--pad);
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.logo {
    font-family: var(--serif);
    font-size: 13px;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    white-space: nowrap;
}

.logo em {
    font-style: italic;
    letter-spacing: 0.08em;
    color: var(--fg-60);
    text-transform: none;
}

.nav-links {
    display: flex;
    gap: clamp(16px, 3vw, 40px);
    font-size: 11px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--fg-60);
}

.nav-links a {
    position: relative;
    padding: 4px 0;
}

.nav-links a::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 1px;
    background: var(--fg);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.4s ease;
}

.nav-links a:hover {
    color: var(--fg);
}

.nav-links a:hover::after,
.nav-links a:focus-visible::after {
    transform: scaleX(1);
    transform-origin: left;
}

/* ---------------------------------------------------------
   Layout
   --------------------------------------------------------- */

main {
    overflow: clip;
}

.container {
    max-width: var(--max);
    margin: 0 auto;
    padding: 0 var(--pad);
}

.section {
    padding: clamp(64px, 7vw, 112px) var(--pad);
    border-top: 1px solid var(--fg-10);
    scroll-margin-top: 60px;
}

.section-inner {
    max-width: var(--max);
    margin: 0 auto;
}

.section-head {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 20px;
    margin-bottom: clamp(32px, 4vw, 52px);
}

.section-head .label {
    grid-column: 1 / span 3;
    padding-top: 6px;
}

.section-head h2 {
    grid-column: 4 / span 6;
    font-size: clamp(26px, 3.4vw, 42px);
}

.section-head .section-note {
    grid-column: 10 / span 3;
    font-size: 12px;
    line-height: 1.8;
    color: var(--fg-60);
}

.label {
    display: block;
    font-size: 9px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--fg-40);
    line-height: 1.6;
}

.note {
    font-size: 12px;
    color: var(--fg-60);
}

.mono {
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.06em;
}

/* ---------------------------------------------------------
   Hero
   --------------------------------------------------------- */

.hero {
    padding: clamp(108px, 13vh, 160px) var(--pad) clamp(52px, 6vw, 84px);
}

.hero-inner {
    max-width: var(--max);
    margin: 0 auto;
}

.hero h1 {
    font-size: clamp(36px, 6.2vw, 88px);
    letter-spacing: -0.045em;
    line-height: 0.96;
    max-width: 15ch;
}

.hero h1 em {
    font-style: italic;
    color: var(--fg-60);
}

.hero .lede {
    margin-top: clamp(20px, 2.4vw, 30px);
    max-width: 34rem;
    font-size: 14px;
    line-height: 1.9;
    color: var(--fg-60);
}

.hero .hero-meta {
    margin-top: clamp(32px, 4vw, 52px);
    border-top: 1px solid var(--fg-10);
    padding-top: 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px 40px;
    align-items: baseline;
    justify-content: space-between;
}

.hero .hero-meta .label {
    max-width: 20rem;
}

.stats {
    margin-top: clamp(28px, 4vw, 44px);
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    border-top: 1px solid var(--fg-10);
}

.stat {
    padding: 16px 20px 16px 0;
    border-right: 1px solid var(--fg-10);
}

.stat:last-child {
    border-right: 0;
}

.stat + .stat {
    padding-left: 20px;
}

.stat-value {
    display: block;
    font-family: var(--serif);
    font-size: clamp(26px, 3vw, 40px);
    line-height: 1;
    letter-spacing: -0.04em;
}

.stat-label {
    display: block;
    margin-top: 10px;
    font-size: 10px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--fg-40);
}

/* ---------------------------------------------------------
   Controls
   --------------------------------------------------------- */

.toolbar {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 16px;
    align-items: end;
    padding-bottom: 24px;
}

.field {
    position: relative;
    grid-column: span 3;
    min-width: 0;
}

.field--wide {
    grid-column: span 4;
}

.field label {
    position: absolute;
    left: 0;
    top: 14px;
    font-size: 10px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--fg-40);
    pointer-events: none;
    transition: transform 0.3s ease, font-size 0.3s ease, color 0.3s ease;
}

.field input,
.field select {
    width: 100%;
    border: 0;
    border-bottom: 1px solid var(--fg-20);
    background: transparent;
    padding: 14px 0 8px;
    font-size: 14px;
    border-radius: 0;
    appearance: none;
    transition: border-color 0.3s ease;
}

.field select {
    cursor: pointer;
    padding-right: 24px;
}

.field--select::after {
    content: "↓";
    position: absolute;
    right: 2px;
    bottom: 9px;
    font-size: 10px;
    color: var(--fg-40);
    pointer-events: none;
}

.field input:focus,
.field select:focus {
    outline: none;
    border-color: var(--fg);
}

.field input::placeholder {
    color: transparent;
}

.field input:focus + label,
.field input:not(:placeholder-shown) + label,
.field select:focus + label,
.field select:has(option:checked) + label {
    transform: translateY(-14px);
    font-size: 8px;
    color: var(--fg-60);
}

.field--static label {
    position: static;
    display: block;
    margin-bottom: 8px;
    transform: none;
    font-size: 10px;
}

.field--check {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-top: 14px;
    font-size: 12px;
    color: var(--fg-60);
    cursor: pointer;
}

.field--check input {
    width: auto;
    padding: 0;
    border: 0;
    accent-color: var(--fg);
}

.toolbar-actions {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: flex-end;
    align-items: center;
    padding-top: 12px;
}

/* ---------------------------------------------------------
   Buttons
   --------------------------------------------------------- */

.btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 0;
    border-bottom: 1px solid var(--fg-20);
    background: transparent;
    padding: 6px 0;
    font-size: 10px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--fg-60);
    transition: color 0.3s ease, border-color 0.3s ease;
}

.btn:hover {
    color: var(--fg);
    border-color: var(--fg);
}

.btn.solid {
    border: 1px solid var(--fg);
    background: var(--fg);
    color: var(--bg);
    padding: 9px 16px;
    letter-spacing: 0.16em;
}

.btn.solid:hover {
    background: transparent;
    color: var(--fg);
}

.btn.quiet {
    border-bottom-color: transparent;
    color: var(--fg-40);
}

.btn.quiet:hover {
    color: var(--fg);
    border-bottom-color: var(--fg-20);
}

.btn[disabled] {
    opacity: 0.35;
    cursor: not-allowed;
}

.btn[disabled]:hover {
    color: var(--fg-60);
    border-color: var(--fg-20);
}

.btn-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: center;
}

.review-next {
    justify-content: space-between;
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid var(--fg-10);
}

.review-next .note {
    margin: 0;
    max-width: 34rem;
}

.review-return {
    margin: 0 0 16px;
}

/* ---------------------------------------------------------
   Record list
   --------------------------------------------------------- */

.record-list {
    border-bottom: 1px solid var(--fg-10);
}

.record {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr) 116px 96px;
    gap: clamp(12px, 1.6vw, 22px);
    align-items: start;
    width: 100%;
    text-align: left;
    border: 0;
    border-top: 1px solid var(--fg-10);
    background: transparent;
    padding: 16px 0;
    transition: background 0.4s ease;
}

.record:hover {
    background: rgba(28, 28, 28, 0.02);
}

.record-index {
    font-family: var(--mono);
    font-size: 10px;
    color: var(--fg-40);
    padding-top: 4px;
}

.record-title {
    font-family: var(--serif);
    font-size: clamp(15.5px, 1.25vw, 18.5px);
    line-height: 1.45;
    letter-spacing: -0.02em;
    transition: font-style 0.4s ease;
}

.record:hover .record-title,
.record[aria-current="true"] .record-title {
    font-style: italic;
}

.record-meta {
    margin-top: 6px;
    font-size: 11px;
    color: var(--fg-40);
    display: flex;
    flex-wrap: wrap;
    gap: 4px 16px;
}

.record-col {
    font-size: 9px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--fg-40);
    padding-top: 4px;
}

.record-col strong {
    display: block;
    margin-top: 3px;
    font-weight: 400;
    letter-spacing: 0.04em;
    color: var(--fg-60);
    text-transform: none;
    font-size: 11px;
}

.record[aria-current="true"] {
    background: rgba(28, 28, 28, 0.035);
}

.record[aria-current="true"] .record-index {
    color: var(--fg);
}

/* ---------------------------------------------------------
   Detail & fulltext
   --------------------------------------------------------- */

.detail {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: clamp(24px, 3vw, 48px);
}

.detail-main {
    grid-column: span 8;
}

.detail-aside {
    grid-column: span 4;
}

.detail h3 {
    font-size: clamp(20px, 2.1vw, 28px);
    line-height: 1.3;
    letter-spacing: -0.03em;
    max-width: 30ch;
}

.detail .authors {
    margin-top: 12px;
    font-size: 11px;
    color: var(--fg-40);
    line-height: 1.9;
}

.detail .lede-text {
    margin-top: 18px;
    font-size: 13px;
    line-height: 1.9;
    color: var(--fg-60);
    max-width: 40rem;
}

.detail dl {
    margin: 0;
    border-top: 1px solid var(--fg-10);
}

.detail dl div {
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 12px;
    padding: 9px 0;
    border-bottom: 1px solid var(--fg-10);
}

.detail dt {
    font-size: 9px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--fg-40);
    padding-top: 3px;
}

.detail dd {
    margin: 0;
    font-size: 12px;
    line-height: 1.8;
    word-break: break-word;
}

.outline {
    margin-top: 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px 10px;
}

.outline span {
    font-size: 9px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--fg-40);
    border-bottom: 1px solid var(--fg-10);
    padding-bottom: 2px;
}

.placeholder {
    padding: clamp(32px, 5vw, 56px) 0;
    border-top: 1px solid var(--fg-10);
    font-family: var(--serif);
    font-style: italic;
    font-size: clamp(17px, 1.8vw, 22px);
    color: var(--fg-40);
}

/* ---------------------------------------------------------
   Facts
   --------------------------------------------------------- */

.fact-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 24px;
    align-items: baseline;
    padding: 12px 0 18px;
    border-bottom: 1px solid var(--fg-10);
}

.fact-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 16px;
    padding: 12px 0;
    border-bottom: 1px solid var(--fg-10);
}

.chip {
    border: 0;
    border-bottom: 1px solid transparent;
    background: transparent;
    padding: 4px 0;
    font-size: 10px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--fg-40);
    transition: color 0.3s ease, border-color 0.3s ease;
}

.chip:hover {
    color: var(--fg);
}

.chip[aria-pressed="true"] {
    color: var(--fg);
    border-bottom-color: var(--fg);
}

.chip .count {
    font-family: var(--mono);
    font-size: 10px;
    color: var(--fg-40);
    margin-left: 6px;
}

.fact {
    padding: 20px 0;
    border-bottom: 1px solid var(--fg-10);
    scroll-margin-top: 96px;
}

.fact.fact--focus {
    outline: 2px solid var(--fg);
    outline-offset: 4px;
}

.fact--excluded {
    opacity: 0.55;
}

.fact--excluded .fact-claim {
    text-decoration: line-through;
    text-decoration-thickness: 1px;
}

.fact-head {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
    align-items: center;
}

.fact-no {
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.08em;
    color: var(--fg-40);
}

.fact-type {
    font-size: 10px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--fg-60);
}

.fact-loc {
    font-size: 10px;
    letter-spacing: 0.12em;
    color: var(--fg-40);
    margin-left: auto;
}

.status {
    display: inline-block;
    border: 1px solid var(--fg-20);
    padding: 2px 8px;
    font-size: 9px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    line-height: 1.8;
    white-space: nowrap;
}

.status.pending {
    border-style: dashed;
    color: var(--fg-60);
}

.status.confirmed {
    border-style: solid;
    border-color: var(--fg);
    color: var(--fg);
}

.status.disputed {
    border-style: solid;
    color: var(--fg);
    font-style: italic;
    letter-spacing: 0.22em;
}

.status.insufficient {
    border-style: dotted;
    color: var(--fg-40);
}

.fact-claim {
    margin-top: 10px;
    max-width: 62rem;
    font-family: var(--serif);
    font-size: clamp(15px, 1.2vw, 17.5px);
    line-height: 1.7;
    letter-spacing: -0.01em;
}

.fact-meta {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px 24px;
    font-size: 11px;
    color: var(--fg-40);
}

.fact-meta b {
    font-weight: 400;
    color: var(--fg-60);
}

.fact-excerpt {
    margin-top: 12px;
    max-width: 62rem;
    font-size: 12px;
    line-height: 1.85;
    color: var(--fg-60);
    font-style: italic;
    quotes: "“" "”";
}

.fact-excerpt::before {
    content: "“";
    color: var(--fg-40);
}

.fact-excerpt::after {
    content: "”";
    color: var(--fg-40);
}

.fact-actions {
    margin-top: 14px;
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.fact-panel {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--fg-10);
}

.fact-editor textarea {
    width: 100%;
    min-height: 96px;
    resize: vertical;
    border: 0;
    border-bottom: 1px solid var(--fg-20);
    background: transparent;
    padding: 12px 0;
    font-family: var(--serif);
    font-size: 17px;
    line-height: 1.8;
    border-radius: 0;
}

.fact-editor textarea:focus {
    outline: none;
    border-color: var(--fg);
}

.fact-editor .field {
    margin-top: 16px;
}

.editor-actions {
    margin-top: 20px;
    display: flex;
    gap: 20px;
    align-items: center;
}

.evidence {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: clamp(16px, 2vw, 32px);
}

.evidence-main {
    grid-column: span 8;
}

.evidence-side {
    grid-column: span 4;
}

.evidence-text {
    font-size: 14px;
    line-height: 2;
    color: var(--fg-60);
    max-width: 44rem;
}

.evidence-label {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    align-items: baseline;
    margin-bottom: 10px;
}

.audit {
    margin: 0;
    padding: 0;
    list-style: none;
    border-top: 1px solid var(--fg-10);
}

.audit li {
    padding: 8px 0;
    border-bottom: 1px solid var(--fg-10);
    font-size: 11px;
    color: var(--fg-40);
    line-height: 1.8;
    word-break: break-word;
}

.audit li b {
    font-weight: 400;
    color: var(--fg-60);
}

.issue {
    display: grid;
    grid-template-columns: 110px minmax(0, 1fr) auto;
    gap: 16px;
    align-items: start;
    padding: 14px 0;
    border-top: 1px solid var(--fg-10);
    font-size: 12px;
    line-height: 1.9;
}

.issue-kind {
    font-size: 9px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--fg-40);
    padding-top: 4px;
}

.issue-text {
    color: var(--fg-60);
    word-break: break-word;
}

.issue-sources {
    display: block;
    margin-top: 6px;
    color: var(--fg-40);
}

.issue-sources span {
    display: block;
    font-size: 11px;
    line-height: 1.6;
}

.issue-sources a {
    color: var(--fg);
    text-decoration: none;
    border-bottom: 1px solid var(--fg-20);
}

.issue--blocking .issue-kind {
    color: var(--fg);
}

/* ---------------------------------------------------------
   Draft / 生成与审核
   --------------------------------------------------------- */

.draft-head {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    align-items: flex-start;
    justify-content: space-between;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--fg-10);
}

.draft-head h3 {
    font-size: clamp(20px, 2vw, 28px);
    margin-top: 6px;
}

.draft-head .note {
    margin-top: 8px;
    max-width: 46rem;
}

.draft-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 16px 24px;
    align-items: center;
}

.draft-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: clamp(24px, 3vw, 48px);
    padding-top: 8px;
}

.draft-main {
    grid-column: span 8;
}

.draft-side {
    grid-column: span 4;
}

.draft-main h4 {
    font-family: var(--serif);
    font-size: 18px;
    letter-spacing: -0.02em;
    margin: 24px 0 10px;
    padding-top: 14px;
    border-top: 1px solid var(--fg-10);
}

.draft-main h4:first-child {
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
}

.draft-main p {
    margin-bottom: 12px;
    line-height: 1.95;
}

.draft-qa {
    padding: 10px 0;
    border-bottom: 1px solid var(--fg-10);
}

.draft-qa h5 {
    font-size: 12px;
    font-weight: 400;
    letter-spacing: 0.14em;
    color: var(--fg-60);
    margin: 0 0 4px;
}

.draft-qa p {
    margin: 0;
    font-family: var(--serif);
    font-size: 15px;
    line-height: 1.85;
    max-width: 46rem;
}

.script-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 12px;
    font-size: 11px;
}

.script-table th {
    text-align: left;
    font-weight: 400;
    font-size: 9px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--fg-40);
    padding: 8px 12px 8px 0;
    border-bottom: 1px solid var(--fg-10);
}

.script-table td {
    padding: 10px 12px 10px 0;
    border-bottom: 1px solid var(--fg-10);
    color: var(--fg-60);
    line-height: 1.8;
    vertical-align: top;
}

.script-table td:first-child {
    white-space: nowrap;
    font-family: var(--mono);
    font-size: 10px;
    color: var(--fg);
}

.cite {
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.02em;
    color: var(--fg-40);
    border-bottom: 1px solid var(--fg-10);
    margin-left: 4px;
    vertical-align: super;
    line-height: 0;
    transition: color 0.3s ease, border-color 0.3s ease;
}

.cite:hover {
    color: var(--fg);
    border-bottom-color: var(--fg);
}

.status.approved {
    border-style: solid;
    border-color: var(--fg);
    color: var(--fg);
}

.status.pending_review {
    border-style: dashed;
    color: var(--fg-60);
}

.draft-side section {
    border-top: 1px solid var(--fg-10);
    padding: 16px 0;
}

.draft-side section:first-child {
    border-top: 0;
    padding-top: 0;
}

.export-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 20px;
    margin-top: 12px;
}

.version {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 12px;
    align-items: baseline;
    width: 100%;
    border: 0;
    border-bottom: 1px solid var(--fg-10);
    background: transparent;
    text-align: left;
    padding: 10px 0;
    font-size: 12px;
    color: var(--fg-60);
}

.version:hover {
    color: var(--fg);
}

.version .vno {
    font-family: var(--mono);
    font-size: 11px;
    color: var(--fg);
}

.version .vnote {
    flex: 1 1 100%;
    font-size: 11px;
    color: var(--fg-40);
}

.version[aria-current="true"] .vno::after {
    content: " · 当前";
    color: var(--fg-40);
    font-size: 9px;
    letter-spacing: 0.14em;
}

.reasons {
    margin: 12px 0 0;
    padding: 0;
    list-style: none;
    border-top: 1px solid var(--fg-10);
}

.reasons li {
    padding: 8px 0;
    border-bottom: 1px solid var(--fg-10);
    font-size: 11px;
    color: var(--fg-60);
    line-height: 1.8;
}

.draft-editor {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--fg-10);
}

.draft-editor .edit-block {
    margin-bottom: 20px;
}

.draft-editor .edit-block label {
    display: block;
    font-size: 10px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--fg-40);
    margin-bottom: 6px;
}

.draft-editor textarea {
    width: 100%;
    min-height: 90px;
    resize: vertical;
    border: 0;
    border-bottom: 1px solid var(--fg-20);
    background: transparent;
    padding: 8px 0;
    font-family: var(--serif);
    font-size: 16px;
    line-height: 1.9;
    border-radius: 0;
}

.draft-editor textarea:focus {
    outline: none;
    border-color: var(--fg);
}

.draft-editor textarea.short {
    min-height: 60px;
    font-family: var(--sans);
    font-size: 14px;
}

/* ---------------------------------------------------------
   Usage / 任务
   --------------------------------------------------------- */

.session-head {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    align-items: flex-start;
    justify-content: space-between;
    padding: 20px 0;
    border-top: 1px solid var(--fg-10);
}

.session-head h3 {
    font-size: clamp(20px, 2vw, 28px);
    margin-top: 6px;
}

/* ---------------------------------------------------------
   Usage
   --------------------------------------------------------- */

.usage-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    border-top: 1px solid var(--fg-10);
    border-bottom: 1px solid var(--fg-10);
}

.usage-cell {
    padding: 16px 20px 16px 0;
    border-right: 1px solid var(--fg-10);
}

.usage-cell:last-child {
    border-right: 0;
}

.usage-cell + .usage-cell {
    padding-left: 20px;
}

.usage-value {
    font-family: var(--serif);
    font-size: clamp(22px, 2.4vw, 30px);
    line-height: 1;
    letter-spacing: -0.03em;
}

.usage-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 24px;
    font-size: 11px;
}

.usage-table th {
    text-align: left;
    font-weight: 400;
    font-size: 9px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--fg-40);
    padding: 10px 12px 10px 0;
    border-bottom: 1px solid var(--fg-10);
}

.usage-table td {
    padding: 9px 12px 9px 0;
    border-bottom: 1px solid var(--fg-10);
    color: var(--fg-60);
    vertical-align: top;
}

.usage-table td.num {
    font-family: var(--mono);
    font-size: 11px;
    text-align: right;
    white-space: nowrap;
}

.usage-table tr.failed td {
    color: var(--fg);
}

.usage-table .ellipsis {
    max-width: 240px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ---------------------------------------------------------
   Toast / busy
   --------------------------------------------------------- */

.toast {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 100;
    width: min(300px, calc(100vw - 40px));
    background: var(--bg);
    border: 1px solid var(--fg-20);
    padding: 11px 13px 10px;
    font-size: 11px;
    line-height: 1.7;
    color: var(--fg-60);
    transition: opacity 0.3s ease;
}

.toast strong {
    display: block;
    font-weight: 400;
    font-size: 9px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--fg);
    margin-bottom: 3px;
    padding-right: 16px;
}

.toast .toast-msg {
    display: block;
}

.toast .toast-msg br {
    line-height: 0.4;
}

.toast a {
    border-bottom: 1px solid var(--fg-20);
}

.toast-close {
    position: absolute;
    top: 6px;
    right: 7px;
    border: 0;
    background: transparent;
    padding: 0 3px;
    font-size: 13px;
    line-height: 1.2;
    color: var(--fg-40);
    cursor: pointer;
}

.toast-close:hover {
    color: var(--fg);
}

.global-status {
    position: fixed;
    left: 20px;
    bottom: 20px;
    z-index: 90;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--bg);
    border: 1px solid var(--fg-20);
    padding: 6px 11px;
    font-size: 9px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--fg-60);
}

.global-status .status-dot {
    width: 4px;
    height: 4px;
    background: var(--fg);
    animation: statusPulse 1.4s ease-in-out infinite;
}

.global-status .mono {
    color: var(--fg);
    font-size: 10px;
    letter-spacing: 0.04em;
}

@keyframes statusPulse {
    0%, 100% { opacity: 0.25; }
    50% { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
    .global-status .status-dot {
        animation: none;
        opacity: 1;
    }
}

.is-busy {
    opacity: 0.45;
}

/* ---------------------------------------------------------
   Footer
   --------------------------------------------------------- */

.footer {
    border-top: 1px solid var(--fg-10);
    padding: clamp(48px, 6vw, 80px) var(--pad) 40px;
}

.footer-inner {
    max-width: var(--max);
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 24px;
}

.footer-brand {
    grid-column: span 5;
}

.footer-brand span {
    font-family: var(--serif);
    font-size: 18px;
    letter-spacing: 0.28em;
    text-transform: uppercase;
}

.footer-brand p {
    margin-top: 12px;
    max-width: 26rem;
    font-size: 11px;
    line-height: 1.9;
    color: var(--fg-40);
}

.footer-links {
    grid-column: span 3;
    font-size: 10px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--fg-40);
    line-height: 2.4;
}

.footer-links a:hover {
    color: var(--fg);
    border-bottom: 1px solid var(--fg-20);
}

.footer-note {
    grid-column: span 4;
    font-size: 10px;
    line-height: 2;
    color: var(--fg-40);
}

/* ---------------------------------------------------------
   Reveal（仅透明度，不位移文字）
   --------------------------------------------------------- */

.reveal {
    opacity: 0;
    transition: opacity 0.9s ease;
}

.reveal.is-visible {
    opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        transition-duration: 0.001ms !important;
        animation-duration: 0.001ms !important;
    }

    .reveal {
        opacity: 1;
    }
}

/* ---------------------------------------------------------
   Workspace / 单页工作台
   --------------------------------------------------------- */

.workspace {
    max-width: var(--max);
    margin: 0 auto;
    padding: 88px var(--pad) 72px;
}

.context {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    gap: 32px;
    align-items: end;
    padding: 16px 0 22px;
    border-bottom: 1px solid var(--fg-10);
}

.context-title h1 {
    font-size: clamp(24px, 2.8vw, 38px);
    line-height: 1.2;
    margin-top: 6px;
    max-width: 26ch;
}

.context-title .note {
    margin-top: 8px;
    max-width: 40rem;
}

.context.is-home {
    grid-template-columns: 1fr;
    padding-top: 28px;
    padding-bottom: 28px;
}

.context.is-home .context-facts {
    display: none;
}

.context.is-home h1 {
    font-size: clamp(28px, 3.2vw, 44px);
    max-width: 20ch;
}

.context-facts {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.context-facts p {
    margin-top: 4px;
    font-size: 11px;
    line-height: 1.6;
    color: var(--fg-60);
    max-height: 3.2em;
    overflow: hidden;
}

.task-info {
    margin-top: 8px;
}

.task-info summary {
    display: inline-block;
    cursor: pointer;
    font-size: 9px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--fg-40);
    border-bottom: 1px solid var(--fg-10);
    list-style: none;
}

.task-info summary::-webkit-details-marker {
    display: none;
}

.task-info summary:hover {
    color: var(--fg);
    border-bottom-color: var(--fg-40);
}

.task-info-body {
    margin-top: 8px;
    max-width: 42rem;
    font-size: 11px;
    line-height: 1.9;
    color: var(--fg-60);
    white-space: pre-wrap;
}

.home-recent {
    margin-top: 32px;
    border-top: 1px solid var(--fg-10);
}

.home-task {
    display: grid;
    grid-template-columns: 110px minmax(0, 1fr) 80px 80px;
    gap: 12px;
    align-items: baseline;
    width: 100%;
    border: 0;
    border-bottom: 1px solid var(--fg-10);
    background: transparent;
    padding: 12px 0;
    text-align: left;
    font-size: 12px;
    color: var(--fg-60);
    cursor: pointer;
}

.home-task:hover {
    color: var(--fg);
    background: rgba(28, 28, 28, 0.02);
}

.home-task .ht-title {
    font-family: var(--serif);
    font-size: 15px;
    color: var(--fg);
}

.home-task .ht-meta {
    font-size: 10px;
    color: var(--fg-40);
}

.home-task .mono {
    text-align: right;
    font-size: 10px;
    color: var(--fg-40);
}

.home-empty {
    padding: 16px 0;
    font-size: 11px;
    color: var(--fg-40);
}

.stepper {
    display: flex;
    gap: 0;
    overflow-x: auto;
    border-bottom: 1px solid var(--fg-10);
    margin-bottom: 28px;
}

.step {
    flex: 1 0 auto;
    min-width: 96px;
    border: 0;
    border-top: 1px solid transparent;
    background: transparent;
    text-align: left;
    padding: 10px 14px 9px 0;
    color: var(--fg-40);
    cursor: pointer;
}

.step .step-idx {
    display: block;
    font-family: var(--mono);
    font-size: 9px;
    letter-spacing: 0.08em;
    margin-bottom: 3px;
}

.step .step-label {
    font-size: 10px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.step.done {
    color: var(--fg-60);
}

.step.current {
    color: var(--fg);
    border-top-color: var(--fg);
}

.step.viewing {
    color: var(--fg);
    background: rgba(28, 28, 28, 0.03);
}

.step.viewing .step-label {
    text-decoration: underline;
    text-underline-offset: 4px;
}

.step.blocked {
    color: var(--fg-40);
}

.step.current .step-label::before {
    content: "";
    display: inline-block;
    width: 4px;
    height: 4px;
    background: var(--fg);
    margin-right: 6px;
    vertical-align: middle;
}

.workspace-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: clamp(24px, 4vw, 56px);
    align-items: start;
}

.stage {
    min-width: 0;
}

.view-head h2 {
    font-size: clamp(22px, 2.2vw, 30px);
    margin-top: 6px;
}

.view-head .note {
    margin: 8px 0 20px;
    max-width: 42rem;
}

.stage-aside {
    position: sticky;
    top: 80px;
}

.aside-card {
    border-top: 1px solid var(--fg-10);
    padding: 14px 0;
}

.aside-card:first-child {
    border-top: 0;
    padding-top: 0;
}

.aside-card h3 {
    font-size: 15px;
    line-height: 1.45;
    margin: 4px 0 6px;
}

.aside-card p {
    font-size: 11px;
    line-height: 1.7;
    color: var(--fg-60);
}

.aside-card .mono {
    display: block;
    margin-top: 4px;
    color: var(--fg-40);
}

.drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 80;
    width: min(620px, 94vw);
    background: var(--bg);
    border-left: 1px solid var(--fg-20);
    padding: 20px var(--pad) 40px;
    overflow-y: auto;
}

.drawer-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--fg-10);
    margin-bottom: 18px;
}

.drawer-head h2 {
    font-size: 24px;
    margin-top: 4px;
}

.drawer .toolbar {
    padding-bottom: 16px;
}

.external-search {
    padding: 16px 0 20px;
    margin-bottom: 12px;
    border-top: 1px solid var(--fg-10);
    border-bottom: 1px solid var(--fg-10);
}

.external-search-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px 16px;
}

.external-search-head .note {
    margin: 0;
}

.external-search-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 16px;
    margin-top: 10px;
}

.external-search-row .field {
    flex: 1 1 180px;
    min-width: 0;
}

.external-search-row .btn {
    flex: 0 0 auto;
    margin-bottom: 6px;
}

.search-candidates {
    grid-column: 1 / -1;
    border-top: 1px solid var(--fg-10);
    padding-top: 10px;
}

.search-candidate {
    display: block;
    width: 100%;
    border: 0;
    border-bottom: 1px solid var(--fg-10);
    background: transparent;
    padding: 9px 0;
    text-align: left;
    font-size: 12px;
    color: var(--fg-60);
    cursor: pointer;
}

.search-candidate:hover {
    color: var(--fg);
}

.search-candidate strong {
    display: block;
    font-weight: 400;
    color: var(--fg);
}

.drawer .record-list {
    margin-top: 8px;
}

.drawer .usage-grid {
    margin-top: 8px;
}

.scrim {
    position: fixed;
    inset: 0;
    z-index: 70;
    background: rgba(28, 28, 28, 0.18);
}

.nav-tools {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-link {
    border: 0;
    border-bottom: 1px solid transparent;
    background: transparent;
    padding: 4px 0;
    font-size: 10px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--fg-60);
    cursor: pointer;
}

.nav-link:hover {
    color: var(--fg);
    border-bottom-color: var(--fg-20);
}

.nav-task {
    font-size: 10px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--fg-40);
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ---------------------------------------------------------
   Responsive
   --------------------------------------------------------- */

@media (max-width: 1080px) {
    .context {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .workspace-grid {
        grid-template-columns: 1fr;
    }

    .stage-aside {
        position: static;
        border-top: 1px solid var(--fg-10);
        padding-top: 20px;
    }

    .section-head .label {
        grid-column: 1 / span 12;
    }

    .section-head h2 {
        grid-column: 1 / span 12;
    }

    .section-head .section-note {
        grid-column: 1 / span 12;
        max-width: 34rem;
    }

    .detail-main,
    .detail-aside,
    .evidence-main,
    .evidence-side {
        grid-column: span 12;
    }

    .field,
    .field--wide {
        grid-column: span 4;
    }

    .toolbar-actions {
        grid-column: span 12;
        justify-content: flex-start;
        padding-top: 8px;
    }
}

@media (max-width: 760px) {
    .workspace {
        padding-top: 76px;
    }

    .context-facts {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 12px;
    }

    .step {
        min-width: 84px;
    }

    .drawer {
        width: 100%;
    }

    .nav-inner {
        height: 64px;
    }

    .nav-links {
        display: none;
    }

    .stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .stat:nth-child(2) {
        border-right: 0;
    }

    .stat:nth-child(3),
    .stat:nth-child(4) {
        border-top: 1px solid var(--fg-10);
    }

    .stat:nth-child(3) {
        padding-left: 0;
    }

    .record {
        grid-template-columns: 44px minmax(0, 1fr);
    }

    .record-col {
        display: none;
    }

    .field,
    .field--wide {
        grid-column: span 12;
    }

    .usage-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .usage-cell:nth-child(2) {
        border-right: 0;
    }

    .usage-cell:nth-child(3),
    .usage-cell:nth-child(4) {
        border-top: 1px solid var(--fg-10);
    }

    .usage-cell:nth-child(3) {
        padding-left: 0;
    }

    .issue {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .issue .btn {
        justify-self: start;
    }

    .footer-brand,
    .footer-links,
    .footer-note {
        grid-column: span 12;
    }

    .usage-table .hide-sm {
        display: none;
    }
}

.review-list {
    display: grid;
    gap: 14px;
}

.review-item {
    border-top: 1px solid var(--fg-20);
    padding-top: 14px;
}

.review-item h3 {
    font-family: var(--serif);
    font-size: 17px;
    font-weight: 500;
    margin: 6px 0;
}

.review-item .review-meta {
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--fg-40);
}

.review-fields {
    display: grid;
    gap: 8px;
    margin-top: 10px;
}

.review-fields input,
.review-fields select {
    width: 100%;
    border: 1px solid var(--fg-20);
    background: transparent;
    padding: 8px;
    font-size: 12px;
}

.review-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.review-badge {
    display: inline-block;
    border: 1px solid var(--fg-20);
    padding: 2px 6px;
    font-size: 10px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

/* =========================================================
   登录 / 用户管理
   ========================================================= */

.nav-user {
    font-family: var(--mono);
    font-size: 12px;
    color: var(--fg-60);
    padding: 0 10px;
    border-left: 1px solid var(--fg-10);
}

.modal {
    position: fixed;
    inset: 0;
    z-index: 120;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--pad);
    background: rgba(28, 28, 28, 0.42);
}

.modal-card {
    width: min(480px, 100%);
    background: var(--bg);
    border: 1px solid var(--fg);
    padding: var(--pad);
}

.modal-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.auth-form label {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 12px;
    color: var(--fg-60);
}

.auth-form input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--fg-20);
    background: transparent;
    color: var(--fg);
    font: inherit;
    font-size: 14px;
}

.auth-form input:focus {
    outline: none;
    border-color: var(--fg);
}

.form-error {
    color: var(--fg);
    border-left: 2px solid var(--fg);
    padding-left: 10px;
    font-size: 13px;
}

.admin-users {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 16px;
}

.admin-user-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--fg-10);
}

.admin-user-main {
    min-width: 0;
}

.admin-user-acts {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.tag {
    display: inline-block;
    margin-left: 8px;
    padding: 0 6px;
    border: 1px solid var(--fg-20);
    font-family: var(--mono);
    font-size: 11px;
}

/* 游客只读：带 data-write 的动态操作按钮一律隐藏（后端同时强制拦截） */
body.readonly [data-write] {
    display: none !important;
}

