@font-face {
  font-family: "CaseSerif";
  src: url("case-serif-subset.woff2") format("woff2");
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
}
@font-face {
  font-family: "OperationalSans";
  src: url("/assets/fonts/NotoSansSC-Regular.otf") format("opentype");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --paper: #f4f1e9;
  --sheet: #fffdf8;
  --ink: #162331;
  --muted: #61707a;
  --line: #c8c4ba;
  --accent: #963a2c;
  --navy: #17354d;
  --amber: #946515;
  --green: #2f6451;
  --body-size: 22px;
}

* { box-sizing: border-box; }
html { scroll-behavior: auto; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "CaseSerif", "Noto Serif SC", "Source Han Serif SC", "Songti SC", SimSun, serif;
  font-size: var(--body-size);
}
button, input { font: inherit; }
button { color: inherit; }
a { color: var(--navy); text-underline-offset: .18em; }
[hidden] { display: none !important; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px clamp(18px, 4vw, 64px);
  border-bottom: 1px solid var(--line);
  background: rgba(244, 241, 233, .97);
}
.brand { color: var(--ink); font: 700 15px/1.2 ui-sans-serif, system-ui, sans-serif; letter-spacing: .08em; text-decoration: none; }
.topnav { display: flex; gap: 18px; flex-wrap: wrap; justify-content: flex-end; }
.topnav a { color: var(--muted); font: 600 14px/1.2 ui-sans-serif, system-ui, sans-serif; text-decoration: none; }
.shell { width: min(1180px, calc(100% - 36px)); margin: 0 auto; }

.assistant-section {
  margin-top: 30px;
  padding: clamp(24px, 4vw, 42px);
  border: 1px solid var(--line);
  border-top: 6px solid var(--accent);
  background: var(--sheet);
}
.case-switch {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0 0 24px;
  border: 1px solid var(--navy);
}
.case-switch button {
  min-height: 50px;
  padding: 11px 18px;
  border: 0;
  border-right: 1px solid var(--navy);
  background: transparent;
  color: var(--navy);
  cursor: pointer;
  font: 750 15px/1.25 ui-sans-serif, system-ui, sans-serif;
}
.case-switch button:last-child { border-right: 0; }
.case-switch button[aria-selected="true"] { background: var(--navy); color: #fffdf8; }
.case-switch button:focus-visible { outline: 3px solid rgba(150, 58, 44, .32); outline-offset: 3px; }
.assistant-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 20px; }
.assistant-heading h1 { max-width: none; margin: 0; font-size: clamp(31px, 4vw, 48px); line-height: 1.18; letter-spacing: -.025em; }
.assistant-heading p { margin: 8px 0 0; color: var(--muted); font: 650 15px/1.55 ui-sans-serif, system-ui, sans-serif; }
.assistant-heading .case-status { margin: 0 0 7px; color: var(--accent); font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.assistant-actions { display: flex; gap: 10px; align-items: stretch; }
.print-current { min-height: 48px; padding: 10px 14px; border: 1px solid var(--line); background: var(--paper); color: var(--navy); cursor: pointer; font: 750 15px/1.2 ui-sans-serif, system-ui, sans-serif; }
.court-mode-toggle {
  flex: 0 0 auto;
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: 1px solid var(--navy);
  background: transparent;
  cursor: pointer;
  font: 750 15px/1.2 ui-sans-serif, system-ui, sans-serif;
}
.court-mode-toggle::before { content: ""; width: 34px; height: 20px; border: 2px solid var(--navy); background: transparent; box-shadow: inset 12px 0 0 0 var(--navy); }
.court-mode-toggle[aria-checked="true"] { background: var(--navy); color: #fffdf8; }
.court-mode-toggle[aria-checked="true"]::before { border-color: #fffdf8; box-shadow: inset -12px 0 0 0 #fffdf8; }
.mediation-mode-toggle { border-color: var(--accent); color: var(--accent); }
.mediation-mode-toggle::before { border-color: var(--accent); box-shadow: inset 12px 0 0 0 var(--accent); }
.mediation-mode-toggle[aria-checked="true"] { background: var(--accent); color: #fff; }
.search-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; }
.search-input { width: 100%; min-height: 64px; padding: 13px 18px; border: 2px solid var(--navy); border-radius: 0; background: #fff; color: var(--ink); font: 700 20px/1.35 ui-sans-serif, system-ui, sans-serif; outline: none; }
.search-input::placeholder { color: #6b747b; font-weight: 500; opacity: 1; }
.search-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(150, 58, 44, .18); }
.clear-search { min-width: 84px; min-height: 64px; padding: 10px 18px; border: 1px solid var(--navy); background: var(--navy); color: #fffdf8; cursor: pointer; font: 750 16px/1.2 ui-sans-serif, system-ui, sans-serif; }
.assistant-meta { display: flex; justify-content: space-between; gap: 16px; margin-top: 10px; color: var(--muted); font: 600 13px/1.45 ui-sans-serif, system-ui, sans-serif; }
.assistant-meta kbd { padding: 2px 5px; border: 1px solid var(--line); background: var(--paper); font: inherit; }
.quick-label { margin: 20px 0 8px; color: var(--muted); font: 700 13px/1.3 ui-sans-serif, system-ui, sans-serif; }
.quick-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.quick-chip { min-height: 42px; padding: 8px 12px; border: 1px solid var(--line); background: var(--paper); cursor: pointer; font: 700 14px/1.2 ui-sans-serif, system-ui, sans-serif; }
.quick-chip:hover, .quick-chip:focus-visible { border-color: var(--accent); color: var(--accent); outline: none; }
.answer-modes { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.answer-modes button { min-height: 46px; border: 1px solid var(--line); background: var(--paper); cursor: pointer; font: 750 14px/1.2 ui-sans-serif, system-ui, sans-serif; }
.answer-modes button[aria-pressed="true"] { border-color: var(--navy); background: var(--navy); color: #fff; }
.answer-modes button:focus-visible, .court-six button:focus-visible, .qa-button-grid button:focus-visible, .record-grid button:focus-visible, .note-tags button:focus-visible, .note-actions button:focus-visible { outline: 3px solid rgba(150, 58, 44, .3); outline-offset: 2px; }
.assistant-output { margin-top: 24px; border-top: 1px solid var(--line); }
.search-result-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--line); }
.search-result-head .output-status { flex: 1; }
.llm-action { flex: 0 0 auto; color: var(--accent); }
.llm-panel { margin: 24px 0; padding: 26px 28px; border: 2px solid var(--navy); border-left: 7px solid var(--accent); background: #fffdf8; box-shadow: 8px 8px 0 rgba(29, 42, 48, .08); }
.llm-title-row { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.llm-kicker { margin: 0; color: var(--accent); font: 800 13px/1.3 ui-sans-serif, system-ui, sans-serif; letter-spacing: .08em; text-transform: uppercase; }
.llm-model { color: var(--muted); font: 650 12px/1.35 ui-sans-serif, system-ui, sans-serif; }
.llm-panel h3 { margin: 10px 0 0; font-size: 25px; line-height: 1.4; }
.llm-panel > p:not(.llm-kicker):not(.llm-note), .llm-answer { margin: 14px 0 0; font-size: 22px; line-height: 1.8; white-space: pre-line; }
.llm-answer { font-weight: 650; }
.llm-evidence { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }
.llm-evidence h4 { margin: 0 0 8px; font: 800 14px/1.4 ui-sans-serif, system-ui, sans-serif; }
.llm-evidence ul { margin: 0; padding-left: 1.4em; }
.llm-evidence li { margin: 6px 0; font-size: 22px; line-height: 1.65; }
.llm-note { margin: 16px 0 0; color: var(--muted); font: 650 13px/1.55 ui-sans-serif, system-ui, sans-serif; }
.llm-loading { border-left-color: #9a7b32; }
.llm-fallback { border-left-color: #9a7b32; }
.llm-loading::after { content: ""; display: block; width: 74px; height: 3px; margin-top: 18px; background: linear-gradient(90deg, var(--accent) 0 35%, transparent 35% 55%, var(--navy) 55% 100%); background-size: 160px 3px; animation: llm-progress 1.1s linear infinite; }
.llm-error { border-left-color: #9a3f34; background: #fff8f5; }
@keyframes llm-progress { to { background-position: 160px 0; } }
.output-status { margin: 0; padding: 18px 0 12px; color: var(--muted); font: 700 14px/1.45 ui-sans-serif, system-ui, sans-serif; }
.result-list { display: grid; border-top: 1px solid var(--line); }
.result-card { padding: 22px 0; border-bottom: 1px solid var(--line); }
.result-kicker { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; color: var(--accent); font: 750 13px/1.35 ui-sans-serif, system-ui, sans-serif; }
.result-card h3 { margin: 0; font-size: 25px; line-height: 1.45; }
.result-card p { margin: 12px 0 0; font-size: 22px; line-height: 1.75; white-space: pre-line; }
.result-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 16px; }
.text-action { min-height: 42px; padding: 8px 0; border: 0; border-bottom: 1px solid currentColor; background: transparent; color: var(--navy); cursor: pointer; font: 750 14px/1.2 ui-sans-serif, system-ui, sans-serif; }
.text-action.primary-action { padding: 8px 13px; border: 1px solid var(--navy); background: var(--navy); color: #fffdf8; }
mark { padding: 0 .08em; background: #f0d887; color: inherit; }

.local-answer { margin: 24px 0 0; padding: clamp(20px, 4vw, 34px); border: 3px solid var(--navy); border-left: 9px solid var(--accent); background: #fff; box-shadow: 8px 8px 0 rgba(23, 53, 77, .09); }
.local-answer-head { display: flex; justify-content: space-between; gap: 16px; color: var(--accent); font: 800 13px/1.4 ui-sans-serif, system-ui, sans-serif; letter-spacing: .06em; }
.local-answer-head p { margin: 0; }
.local-answer h2 { margin: 12px 0 0; font-size: clamp(28px, 4vw, 42px); line-height: 1.28; }
.local-answer h3 { margin: 0 0 8px; font-size: 19px; line-height: 1.4; }
.local-answer p, .local-answer li { font-size: 22px; line-height: 1.72; }
.answer-first { margin-top: 20px; padding: 22px; border-left: 6px solid var(--green); background: #eef5f0; }
.answer-first p, .answer-close p { margin: 0; font-weight: 750; }
.answer-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 14px; }
.answer-columns > section, .answer-follow, .answer-forbidden, .answer-close { padding: 20px; border: 1px solid var(--line); background: var(--sheet); }
.answer-columns ul, .answer-forbidden ul { margin: 0; padding-left: 1.35em; }
.answer-follow, .answer-forbidden, .answer-close { margin-top: 14px; }
.answer-follow p, .answer-close p { margin: 0; }
.answer-forbidden { border-color: #b46759; background: #fff3ef; color: #6f271d; }
.answer-close { border-color: var(--navy); background: #edf2f5; }

.live-command { padding-top: 28px; }
.mediation-console { display: grid; gap: 18px; margin-bottom: 24px; }
.mediation-status { display: grid; gap: 7px; padding: 17px 20px; border: 2px solid var(--navy); border-left: 9px solid var(--navy); background: #eef3f6; }
.mediation-status strong { font-size: 20px; line-height: 1.45; }
.mediation-status span { color: var(--muted); font-size: 17px; line-height: 1.55; }
.mediation-rule { padding: 22px 26px; border: 3px solid #8d2d22; background: #fff1ed; }
.mediation-rule > p:first-child { margin: 0; color: #8d2d22; font-size: 14px; font-weight: 850; letter-spacing: .08em; }
.mediation-rule h2 { margin: 8px 0; color: #6e281e; font-size: clamp(30px, 4vw, 46px); line-height: 1.25; }
.mediation-rule > p:last-child { margin: 0; font-size: 22px; line-height: 1.65; font-weight: 750; }
.mediation-first-action { padding: 22px 26px; border: 3px solid var(--accent); background: #fff; }
.mediation-first-action > p:first-child { margin: 0; color: var(--accent); font-size: 14px; font-weight: 850; letter-spacing: .08em; }
.mediation-first-action h2 { margin: 8px 0; font-size: clamp(28px, 3.5vw, 42px); line-height: 1.25; }
.mediation-first-action > p:last-child { margin: 0; font-size: 22px; line-height: 1.7; font-weight: 720; }
.procedure-checklist { padding: 24px; border: 2px solid var(--green); background: #eef5f0; }
.checklist-grid { display: grid; gap: 9px; }
.checklist-grid label { display: block; min-width: 0; cursor: pointer; }
.checklist-grid input { position: absolute; opacity: 0; pointer-events: none; }
.checklist-grid span { display: grid; grid-template-columns: 42px minmax(0, 1fr); gap: 12px; align-items: center; min-height: 62px; padding: 12px 16px; border: 1px solid #91aa9d; background: #fff; font-size: 21px; line-height: 1.5; font-weight: 720; overflow-wrap: anywhere; }
.checklist-grid b { display: grid; place-items: center; width: 34px; height: 34px; border: 2px solid var(--green); color: var(--green); font-size: 16px; }
.checklist-grid input:checked + span { background: #dcebe2; text-decoration: line-through; text-decoration-thickness: 2px; }
.checklist-grid input:checked + span b { background: var(--green); color: #fff; }
.checklist-grid input:focus-visible + span { outline: 3px solid rgba(47, 100, 81, .3); outline-offset: 2px; }
.no-hearing-card { padding: 24px 26px; border: 2px solid var(--navy); background: var(--sheet); }
.no-hearing-card h2 { margin: 8px 0 10px; font-size: clamp(28px, 3.5vw, 40px); }
.no-hearing-card > p:not(.eyebrow) { margin: 0; font-size: 22px; line-height: 1.72; }
.speaker-group + .speaker-group { margin-top: 22px; }
.speaker-group > h3 { margin: 0 0 9px; color: var(--accent); font-size: 21px; }
.speaker-group .qa-button-grid button span { min-width: 52px; }
.pre-hearing-forbidden { padding: 24px 28px; border-left: 10px solid #8d2d22; background: #fff1ed; }
.pre-hearing-forbidden h2 { margin: 6px 0 10px; color: #6e281e; font-size: 34px; }
.pre-hearing-forbidden ul { margin: 0; padding-left: 1.35em; }
.pre-hearing-forbidden li { margin: 8px 0; color: #6e281e; font-size: 22px; line-height: 1.6; font-weight: 780; }
.live-docket { display: grid; grid-template-columns: 1fr auto 1fr; gap: 16px; align-items: center; margin-bottom: 18px; padding: 15px 18px; border-top: 4px solid var(--navy); border-bottom: 1px solid var(--line); background: var(--sheet); color: var(--muted); font: 700 14px/1.4 ui-sans-serif, system-ui, sans-serif; }
.live-docket strong { color: var(--ink); font-size: 18px; font-variant-numeric: tabular-nums; }
.live-docket span:last-child { text-align: right; }
.live-print-tools { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.live-print-tools button, .live-print-tools a { display: inline-flex; min-height: 44px; align-items: center; padding: 9px 12px; border: 1px solid var(--navy); background: #fff; color: var(--navy); cursor: pointer; font: 750 14px/1.25 ui-sans-serif, system-ui, sans-serif; text-decoration: none; }
.live-print-tools button:first-child { background: var(--navy); color: #fff; }
.first-action { padding: clamp(24px, 5vw, 48px); border: 3px solid #8d2d22; border-left-width: 11px; background: #fff9f6; }
.live-alert-label { margin: 0; color: #8d2d22; font: 850 14px/1.3 ui-sans-serif, system-ui, sans-serif; letter-spacing: .12em; text-transform: uppercase; }
.first-action h2 { margin: 10px 0 0; font-size: clamp(34px, 5vw, 54px); line-height: 1.16; }
.first-action-script { margin: 18px 0 0; font-size: clamp(24px, 3vw, 32px); line-height: 1.62; font-weight: 800; }
.outcome-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 22px; }
.outcome-grid section { padding: 20px; border: 1px solid #c69289; background: #fff; }
.outcome-grid h3 { margin: 0 0 8px; font-size: 22px; }
.outcome-grid p { margin: 0; font-size: 22px; line-height: 1.7; }
.section-head.compact { grid-template-columns: 170px minmax(0, 1fr); margin: 46px 0 22px; }
.section-head.compact h2 { font-size: clamp(30px, 4vw, 44px); }
.law-stack { display: grid; gap: 8px; }
.law-stack article { display: grid; grid-template-columns: 54px minmax(0, 1fr) auto; gap: 18px; align-items: start; padding: 22px; border-left: 5px solid var(--navy); background: var(--sheet); }
.law-stack article > span { display: grid; place-items: center; width: 44px; height: 44px; background: var(--navy); color: #fff; font: 800 18px/1 ui-sans-serif, system-ui, sans-serif; }
.law-stack h3 { margin: 0; font-size: 24px; }
.law-stack p { margin: 7px 0 0; font-size: 22px; line-height: 1.68; }
.law-stack small { display: block; margin-top: 8px; color: var(--muted); font-size: 17px; line-height: 1.5; }
.core-battle-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.core-battle-card { padding: 26px; border-top: 7px solid var(--accent); background: var(--sheet); box-shadow: inset 0 0 0 1px var(--line); }
.core-battle-card > span { color: var(--accent); font: 850 13px/1.2 ui-sans-serif, system-ui, sans-serif; }
.core-battle-card h3 { margin: 10px 0; font-size: 28px; line-height: 1.3; }
.core-battle-card p, .core-battle-card blockquote { font-size: 22px; line-height: 1.7; }
.core-battle-card blockquote { margin: 18px 0 0; padding: 16px 18px; border-left: 5px solid var(--green); background: #eef5f0; font-weight: 750; }
.court-six { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 24px; }
.court-six button { min-height: 76px; padding: 12px; border: 2px solid var(--navy); background: var(--navy); color: #fff; cursor: pointer; font-size: 22px; font-weight: 800; }
.court-six button:nth-child(2), .court-six button:nth-child(4), .court-six button:nth-child(5) { background: #fff; color: var(--navy); }
.live-block { margin-top: 8px; }
.counter-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.counter-card { border: 1px solid var(--line); background: var(--sheet); }
.counter-card summary { min-height: 66px; padding: 18px 20px; cursor: pointer; font-size: 22px; font-weight: 800; list-style: none; }
.counter-card summary::before { content: "对方："; color: var(--accent); }
.counter-card > div { padding: 0 22px 24px; border-top: 1px solid var(--line); }
.counter-card h3 { margin: 20px 0 5px; color: var(--navy); font-size: 18px; }
.counter-card p { margin: 0; font-size: 22px; line-height: 1.65; }
.qa-button-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.qa-button-grid button { display: grid; grid-template-columns: 42px minmax(0, 1fr); gap: 12px; align-items: center; min-height: 62px; padding: 12px 16px; border: 1px solid var(--line); background: var(--sheet); text-align: left; cursor: pointer; font-size: 20px; font-weight: 750; }
.qa-button-grid button span { color: var(--accent); font: 800 13px/1 ui-sans-serif, system-ui, sans-serif; }
.record-panel { padding: 2px 24px 30px; border: 2px solid var(--navy); background: #f5f8fa; }
.record-grid { display: grid; gap: 8px; }
.record-grid button { display: grid; grid-template-columns: 42px minmax(0, 1fr); gap: 12px; align-items: center; min-height: 62px; padding: 12px 16px; border: 1px solid #aebbc4; background: #fff; text-align: left; cursor: pointer; font-size: 21px; font-weight: 750; }
.record-grid button span { color: var(--navy); font-variant-numeric: tabular-nums; }
.record-grid button[aria-pressed="true"] { position: relative; z-index: 2; min-height: 104px; border: 3px solid var(--accent); background: #fff7f4; color: #64271f; font-size: clamp(25px, 4vw, 34px); }
.forbidden-panel { padding: 2px 24px 30px; border-left: 9px solid #8d2d22; background: #fff2ee; }
.forbidden-panel ul { margin: 0; padding-left: 1.35em; }
.forbidden-panel li { margin: 10px 0; color: #6e281e; font-size: 22px; line-height: 1.62; font-weight: 750; }
.today-panel { padding: 2px 24px 30px; border-left: 8px solid var(--green); background: #eef5f0; }
.today-panel ol { margin: 0; padding-left: 1.5em; }
.today-panel li { padding: 9px 0; font-size: 22px; line-height: 1.6; font-weight: 700; }
.evidence-fast-grid { display: grid; gap: 12px; }
.evidence-fast-grid article { padding: 24px; border: 1px solid var(--line); background: var(--sheet); }
.evidence-fast-grid h3 { margin: 0 0 14px; font-size: 28px; }
.evidence-fast-grid dl { margin: 0; }
.evidence-fast-grid dl div { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 14px; padding: 10px 0; border-top: 1px solid var(--line); }
.evidence-fast-grid dt { color: var(--muted); font-weight: 750; }
.evidence-fast-grid dd { margin: 0; font-size: 22px; line-height: 1.6; }
.evidence-fast-grid blockquote { margin: 18px 0 0; padding: 16px 18px; border-left: 5px solid var(--green); background: #eef5f0; font-size: 22px; line-height: 1.65; font-weight: 750; }
.notes-panel { padding: 2px 24px 30px; border: 2px solid var(--line); background: var(--sheet); }
.notes-panel > label { display: block; margin-bottom: 8px; font-size: 20px; font-weight: 800; }
.notes-panel textarea { width: 100%; min-height: 112px; padding: 14px 16px; resize: vertical; border: 2px solid var(--navy); background: #fff; color: var(--ink); font-size: 22px; line-height: 1.55; }
.note-tags, .note-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.note-tags button, .note-actions button { min-height: 48px; padding: 9px 13px; border: 1px solid var(--navy); background: #fff; cursor: pointer; font-size: 16px; font-weight: 750; }
.note-tags button[aria-pressed="true"], .note-actions button:first-child { background: var(--navy); color: #fff; }
.note-feedback { min-height: 1.5em; color: var(--green); font-size: 18px; font-weight: 750; }
.live-note-list { margin: 0; padding: 0; list-style: none; }
.live-note-list li { padding: 16px 0; border-top: 1px solid var(--line); }
.live-note-list time { color: var(--accent); font-variant-numeric: tabular-nums; font-weight: 800; }
.live-note-list p { margin: 6px 0; font-size: 22px; line-height: 1.6; }
.live-note-list span { display: inline-block; margin: 4px 8px 0 0; color: var(--navy); font-size: 15px; font-weight: 750; }
.live-note-list .empty-note { color: var(--muted); font-size: 18px; }
.oral-ten-panel { padding: 2px clamp(20px, 4vw, 42px) 34px; border: 1px solid var(--line); background: var(--sheet); }
.oral-ten-panel > p { margin: 0 0 1em; font-size: 22px; line-height: 1.82; }

.hero { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(300px, .72fr); gap: clamp(32px, 7vw, 100px); padding: clamp(54px, 9vw, 108px) 0 54px; border-bottom: 1px solid var(--line); }
.eyebrow, .doc-type { margin: 0 0 14px; color: var(--accent); font: 700 13px/1.3 ui-sans-serif, system-ui, sans-serif; letter-spacing: .12em; }
.hero h1 { max-width: 16ch; margin: 0; font-size: clamp(40px, 5.6vw, 70px); line-height: 1.08; letter-spacing: -.035em; font-weight: 800; }
.hero .lede { margin: 28px 0 0; max-width: 40em; font-size: var(--body-size); line-height: 1.85; }
.case-card { align-self: end; border-top: 4px solid var(--accent); padding: 24px 0 0; }
.case-card dl { margin: 0; display: grid; gap: 13px; }
.case-card div { border-bottom: 1px solid var(--line); padding-bottom: 12px; }
.case-card dt { color: var(--muted); font: 600 13px/1.4 ui-sans-serif, system-ui, sans-serif; letter-spacing: .06em; }
.case-card dd { margin: 4px 0 0; font: 650 16px/1.55 ui-sans-serif, system-ui, sans-serif; }
.battle-brief { padding: 30px; border-left: 6px solid var(--accent); background: var(--sheet); }
.battle-brief h2 { font-size: clamp(30px, 4vw, 46px); }
.battle-brief p { margin: 16px 0 0; font-size: 22px; line-height: 1.8; }
.battle-brief li { font-size: 22px; line-height: 1.75; }
.brief-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 22px; }
.brief-box { padding: 22px; border: 1px solid var(--line); background: var(--paper); }
.brief-box h3 { margin: 0 0 10px; font-size: 23px; }
.brief-box ul { margin: 0; padding-left: 1.4em; }
.brief-box li { font-size: 22px; line-height: 1.7; }

.section { padding: 64px 0; border-bottom: 1px solid var(--line); scroll-margin-top: 82px; }
.section-head { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 28px; align-items: start; margin-bottom: 30px; }
.section-index { color: var(--accent); font: 700 13px/1.4 ui-sans-serif, system-ui, sans-serif; letter-spacing: .12em; }
.section-head h2, .source-dialog h2 { margin: 0; font-size: clamp(30px, 4vw, 48px); line-height: 1.2; letter-spacing: -.025em; }
.section-head p { margin: 10px 0 0; color: var(--muted); font-size: 19px; line-height: 1.65; }
.key-quote { margin: 0 0 30px; padding: 26px 30px; border-left: 6px solid var(--accent); background: var(--sheet); font-size: clamp(26px, 3vw, 38px); line-height: 1.55; font-weight: 700; }
.core-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.core-item { padding: 30px; background: var(--sheet); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.core-item .num { color: var(--accent); font: 700 13px/1.2 ui-sans-serif, system-ui, sans-serif; }
.core-item h3 { margin: 12px 0 10px; font-size: 26px; line-height: 1.35; }
.core-item p, .core-item li { margin: 0; font-size: 22px; line-height: 1.78; }
.core-item ul { margin: 0; padding-left: 1.4em; }
.core-item li + li { margin-top: .45em; }
.status-pill { display: inline-flex; align-items: center; min-height: 29px; padding: 4px 8px; border: 1px solid var(--line); font: 750 12px/1 ui-sans-serif, system-ui, sans-serif; }
.status-pill[data-status="proved"] { border-color: var(--green); color: var(--green); }
.status-pill[data-status="disputed"] { border-color: var(--amber); color: #714b0d; background: #faf2dc; }
.status-pill[data-status="missing"] { border-color: var(--accent); color: #713126; background: #f8e9e5; }
.status-pill::before { margin-right: 6px; }
.status-pill[data-status="proved"]::before { content: "✓"; }
.status-pill[data-status="disputed"]::before { content: "⚠"; }
.status-pill[data-status="missing"]::before { content: "×"; }

.issue-list, .evidence-list, .qa-list, .opponent-list, .risk-list { display: grid; gap: 14px; }
details.document { background: var(--sheet); border: 1px solid var(--line); }
details.document > summary { cursor: pointer; padding: 22px 26px; list-style: none; color: var(--ink); font: 750 20px/1.45 "CaseSerif", "Noto Serif SC", serif; }
details.document > summary::-webkit-details-marker { display: none; }
details.document > summary::after { content: "+"; float: right; color: var(--accent); font-size: 26px; }
details.document[open] > summary::after { content: "−"; }
.detail-body { padding: 0 clamp(20px, 4vw, 42px) 36px; border-top: 1px solid var(--line); }
.detail-body h3 { margin: 1.4em 0 .45em; font-size: 24px; line-height: 1.5; }
.detail-body p, .detail-body li { font-size: 22px; line-height: 1.8; }
.detail-body p { margin: 12px 0 0; }
.detail-body ul, .detail-body ol { padding-left: 1.45em; }
.quote-answer { padding: 20px 22px; border-left: 5px solid var(--navy); background: var(--paper); }
.warning { color: #713126; font-weight: 750; }
.source-buttons { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.source-button { min-height: 38px; padding: 8px 11px; border: 1px solid var(--navy); background: transparent; color: var(--navy); cursor: pointer; font: 700 13px/1.2 ui-sans-serif, system-ui, sans-serif; }

.chain { display: grid; gap: 0; width: min(820px, 100%); margin: 0 auto; }
.chain-node { position: relative; display: grid; grid-template-columns: 180px minmax(0, 1fr) auto; gap: 20px; align-items: center; padding: 22px; border: 1px solid var(--line); background: var(--sheet); }
.chain-node + .chain-node { margin-top: 28px; }
.chain-node + .chain-node::before { content: "↓"; position: absolute; top: -30px; left: 82px; color: var(--accent); font-size: 24px; }
.chain-node strong { font-size: 21px; }
.chain-node span { font-size: 21px; line-height: 1.65; }

.table-scroll { width: 100%; overflow-x: auto; border: 1px solid var(--line); background: white; }
table { width: 100%; min-width: 980px; border-collapse: collapse; table-layout: fixed; }
th, td { padding: 18px; vertical-align: top; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); text-align: left; overflow-wrap: anywhere; font-size: 20px; line-height: 1.7; }
th { background: #e7e3d9; font-weight: 800; }
tbody tr:last-child td { border-bottom: 0; }
th:last-child, td:last-child { border-right: 0; }

.downloads { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.doc-card { display: flex; flex-direction: column; min-height: 270px; padding: 26px; background: var(--sheet); border: 1px solid var(--line); }
.doc-card h3 { margin: 0 0 14px; font-size: 25px; line-height: 1.35; }
.doc-card p { margin: 0; font-size: 22px; line-height: 1.75; }
.doc-card .file-actions { margin-top: auto; padding-top: 24px; }
.download { display: inline-flex; min-height: 42px; align-items: center; padding: 9px 13px; border: 1px solid var(--navy); background: var(--navy); color: white; font: 700 13px/1 ui-sans-serif, system-ui, sans-serif; text-decoration: none; }

.source-dialog { width: min(760px, calc(100% - 28px)); max-height: min(820px, calc(100vh - 28px)); padding: 0; border: 1px solid var(--line); background: var(--sheet); color: var(--ink); box-shadow: 0 28px 80px rgba(22, 35, 49, .28); }
.source-dialog::backdrop { background: rgba(22, 35, 49, .58); }
.source-dialog-head { position: sticky; top: 0; display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; padding: 24px 28px; border-bottom: 1px solid var(--line); background: var(--sheet); }
.source-dialog-head h2 { font-size: 34px; }
.dialog-close { width: 48px; height: 48px; border: 1px solid var(--navy); background: transparent; color: var(--navy); cursor: pointer; font: 700 30px/1 ui-sans-serif, system-ui, sans-serif; }
.source-dialog-body { padding: 8px 28px 30px; }
.source-card { padding: 20px 0; border-bottom: 1px solid var(--line); }
.source-card h3 { margin: 0; font-size: 24px; line-height: 1.45; }
.source-card p { margin: 8px 0 0; font-size: 20px; line-height: 1.7; }
.source-state { color: var(--accent); font: 750 13px/1.4 ui-sans-serif, system-ui, sans-serif; }
.noscript { padding: 30px; font-size: 22px; }
.site-footer { padding: 34px 0 70px; color: var(--muted); font: 14px/1.7 ui-sans-serif, system-ui, sans-serif; }

/* The reference page overrides its compact UI controls back to the embedded
   Chinese serif. Keep that rule here so headless/Windows clients never show
   tofu glyphs when no system CJK sans font is installed. */
body .topbar *, body .assistant-section *, body #case-root *, body .source-dialog * {
  font-family: "CaseSerif", "Noto Serif SC", "Source Han Serif SC", "Songti SC", SimSun, serif;
}
body #case-root .mediation-console, body #case-root .mediation-console * { font-family: "OperationalSans", "Noto Sans SC", sans-serif; }

body.court-mode .topbar, body.court-mode .hero, body.court-mode [data-court="low"], body.court-mode .site-footer { display: none; }
body.court-mode [data-court="low"].search-reveal { display: block; }
body.court-mode .shell { width: min(1180px, calc(100% - 24px)); }
body.court-mode .assistant-section { position: sticky; top: 0; z-index: 30; margin-top: 0; padding-top: 16px; padding-bottom: 16px; border-left: 0; border-right: 0; box-shadow: 0 8px 22px rgba(22, 35, 49, .12); }
body.court-mode .assistant-heading p:not(.case-status), body.court-mode .quick-label, body.court-mode .assistant-meta .shortcut-help { display: none; }
body.court-mode .assistant-heading { margin-bottom: 12px; }
body.court-mode .assistant-heading h1 { font-size: clamp(28px, 3vw, 38px); }
body.court-mode .case-switch { margin-bottom: 14px; }
body.court-mode .section { padding: 34px 0; }
body.court-mode .detail-body p, body.court-mode .detail-body li, body.court-mode .result-card p, body.court-mode td { font-size: 24px; line-height: 1.72; }
body.court-mode #case-root > .section:not(#live-command) { display: none; }
body.court-mode #live-command { display: block; padding: 12px 0 30px; }
body.court-mode #live-command > :not(.mediation-console):not(.court-six):not(#opponent-live):not(#must-record) { display: none; }
body.court-mode .mediation-console > :not(.procedure-checklist) { display: none; }
body.court-mode .mediation-console { display: block; margin: 0 0 14px; }
body.court-mode .quick-chips { display: none; }
body.court-mode #opponent-live .section-head, body.court-mode #must-record .section-head { margin-top: 26px; }
body.court-mode .court-six { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 8px; }
body.court-mode .court-six button { min-height: 82px; font-size: 24px; }

body.mediation-mode .topbar, body.mediation-mode .hero, body.mediation-mode #case-root > .section:not(#live-command), body.mediation-mode .site-footer { display: none; }
body.mediation-mode .shell { width: min(1180px, calc(100% - 24px)); }
body.mediation-mode .assistant-section { position: relative; z-index: 2; margin-top: 0; padding-top: 16px; padding-bottom: 16px; border-left: 0; border-right: 0; box-shadow: 0 8px 22px rgba(22, 35, 49, .12); }
body.mediation-mode .assistant-heading { margin-bottom: 12px; }
body.mediation-mode .assistant-heading h1 { font-size: clamp(28px, 3vw, 38px); }
body.mediation-mode .assistant-heading p:not(.case-status), body.mediation-mode .quick-label, body.mediation-mode .assistant-meta .shortcut-help { display: none; }
body.mediation-mode #live-command { display: block; padding: 12px 0 30px; }
body.mediation-mode #live-command > :not(.live-docket):not(.mediation-console):not(#live-notes) { display: none; }
body.mediation-mode .quick-chips { display: none; }
body.mediation-mode .local-answer { border-color: var(--accent); }

@media (max-width: 820px) {
  .topbar { position: static; align-items: flex-start; }
  .topnav { gap: 12px; }
  .topnav a:nth-child(n+4):not(:last-child) { display: none; }
  .hero { grid-template-columns: 1fr; padding-top: 48px; }
  .hero h1 { font-size: clamp(38px, 12vw, 58px); }
  .section-head { grid-template-columns: 1fr; gap: 8px; }
  .core-grid, .downloads, .brief-grid { grid-template-columns: 1fr; }
  .answer-columns, .outcome-grid, .core-battle-grid, .counter-grid, .qa-button-grid { grid-template-columns: 1fr; }
  .answer-modes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .live-docket { grid-template-columns: 1fr; }
  .live-docket span:last-child { text-align: left; }
  .law-stack article { grid-template-columns: 46px minmax(0, 1fr); }
  .law-stack article .source-buttons { grid-column: 2; }
  .section-head.compact { grid-template-columns: 1fr; }
  .assistant-section { width: calc(100% + 36px); margin-left: -18px; margin-top: 0; padding: 22px 18px; border-left: 0; border-right: 0; }
  .assistant-heading { display: grid; gap: 14px; }
  .case-switch { width: 100%; }
  .case-switch button { padding-inline: 8px; font-size: 14px; }
  .court-mode-toggle { width: 100%; justify-content: center; }
  .assistant-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .search-row { grid-template-columns: 1fr; }
  .search-result-head, .llm-title-row { align-items: flex-start; flex-direction: column; gap: 6px; }
  .llm-panel { padding: 22px 18px; }
  .search-input { min-height: 60px; padding: 12px 14px; font-size: 18px; }
  .clear-search { min-height: 46px; }
  .assistant-meta { display: block; }
  .assistant-meta .shortcut-help { display: none; }
  .quick-chips { flex-wrap: nowrap; margin-right: -18px; padding-right: 18px; overflow-x: auto; overscroll-behavior-inline: contain; scrollbar-width: thin; }
  .quick-chip { flex: 0 0 auto; min-height: 44px; }
  .chain-node { grid-template-columns: 1fr; gap: 10px; }
  .chain-node + .chain-node::before { left: 22px; }
  .table-scroll { overflow: visible; border: 0; background: transparent; }
  table, tbody, tr, td { display: block; width: 100%; min-width: 0; }
  thead { display: none; }
  tr { margin-bottom: 14px; border: 1px solid var(--line); background: var(--sheet); }
  td { border-right: 0; padding: 13px 16px; font-size: 22px; }
  td + td { border-top: 1px solid var(--line); }
  .hero .lede, .battle-brief p, .brief-box li, .core-item p, .core-item li, .detail-body p, .detail-body li, .doc-card p, .result-card p, .llm-answer, .llm-panel > p:not(.llm-kicker):not(.llm-note), .llm-evidence li { font-size: 22px; }
  body.court-mode .assistant-section { width: calc(100% + 24px); margin-left: -12px; padding: 14px 12px; }
  body.court-mode .assistant-heading { grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
  body.court-mode .court-mode-toggle { width: auto; min-height: 44px; font-size: 13px; }
  body.court-mode .print-current { display: none; }
  body.court-mode .case-switch { position: sticky; top: 0; }
  body.court-mode .detail-body p, body.court-mode .detail-body li, body.court-mode .result-card p, body.court-mode td { font-size: 22px; }
  body.court-mode .counter-grid { grid-template-columns: 1fr; }
  body.court-mode .counter-card summary { min-height: 72px; }
  body.mediation-mode .assistant-section { width: calc(100% + 24px); margin-left: -12px; padding: 14px 12px; }
  body.mediation-mode .assistant-heading { grid-template-columns: 1fr; align-items: start; }
  body.mediation-mode .assistant-actions { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
  body.mediation-mode .assistant-actions .court-mode-toggle { width: 100%; justify-content: center; }
  body.mediation-mode .print-current { display: none; }
  body.mediation-mode .case-switch { position: sticky; top: 0; }
  .mediation-status strong { font-size: 18px; }
  .mediation-status span { font-size: 16px; }
  .procedure-checklist { padding: 18px 14px; }
  .checklist-grid span { grid-template-columns: 36px minmax(0, 1fr); padding: 12px; font-size: 22px; }
}

@media (max-width: 420px) {
  .assistant-heading h1 { font-size: 29px; }
  .assistant-heading p { font-size: 14px; }
  .assistant-actions { grid-template-columns: 1fr; }
  .print-current { display: none; }
  .court-six { grid-template-columns: 1fr 1fr; }
  .court-six button { min-height: 78px; padding: 10px 6px; font-size: 19px; }
  .first-action { padding: 22px 18px; }
  .first-action h2 { font-size: 34px; }
  .first-action-script { font-size: 24px; }
  .evidence-fast-grid dl div { grid-template-columns: 1fr; gap: 3px; }
  .local-answer { padding: 18px 14px; }
  .case-switch button { min-height: 56px; }
  body.court-mode .assistant-heading h1 { font-size: 25px; }
  body.mediation-mode .assistant-heading h1 { font-size: 25px; }
  body.mediation-mode .assistant-actions { grid-template-columns: 1fr 1fr; }
  body.mediation-mode .assistant-actions .mediation-mode-toggle, body.mediation-mode .assistant-actions .court-mode-toggle { width: 100%; min-height: 48px; padding: 8px; font-size: 13px; justify-content: center; }
  .mediation-rule { padding: 20px 16px; }
  .mediation-rule h2 { font-size: 32px; }
}

@media print {
  @page { size: A4; margin: 18mm 16mm 18mm 20mm; }
  :root { --paper: #fff; --sheet: #fff; --ink: #000; --muted: #333; --line: #aaa; --body-size: 12pt; }
  body { background: #fff; font-size: 12pt; }
  body.mediation-mode .hero { display: grid; }
  body.mediation-mode #case-root > .section { display: block; }
  body.mediation-mode .site-footer { display: block; }
  .topbar, .assistant-section, .source-dialog, .source-buttons, .downloads, .site-footer, .text-action { display: none !important; }
  .live-print-tools { display: none !important; }
  .notes-panel, .counter-grid, .qa-button-grid, .court-six, .record-panel, .forbidden-panel { display: none !important; }
  .shell { width: 100%; margin: 0; }
  .hero { grid-template-columns: 1fr; padding: 0 0 12mm; }
  .hero h1 { font-size: 24pt; }
  .hero .lede, .battle-brief p, .brief-box li, .core-item p, .core-item li, .detail-body p, .detail-body li, th, td { font-size: 12pt !important; line-height: 1.55; }
  .section { padding: 10mm 0; break-inside: auto; }
  .core-grid, .brief-grid { display: block; }
  .core-item, .brief-box, details.document { break-inside: avoid; margin-bottom: 5mm; }
  details.document > summary { font-size: 14pt; }
  details.document > summary::after { display: none; }
  details.document > .detail-body { display: block !important; }
  .table-scroll { overflow: visible; border: 0; }
  table { min-width: 0; table-layout: auto; }
  a { color: #000; text-decoration: none; }
  body.print-section-only #case-root > * { display: none !important; }
  body.print-section-only #case-root > .print-container { display: block !important; padding: 0; border: 0; }
  body.print-section-only .print-container > * { display: none !important; }
  body.print-section-only .print-container > .print-container,
  body.print-section-only .print-selected { display: block !important; }
  body.print-section-only .print-selected { border: 0; background: #fff; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
