:root {
  --pine: #1d332c;
  --pine-soft: #315448;
  --leaf: #d7f45b;
  --cream: #f4f1e7;
  --paper: #fffdf7;
  --ink: #1a211e;
  --muted: #6b746e;
  --line: #d9d8ce;
  --blue: #2d5cc7;
  --amber: #ba6d16;
  --red: #a43f35;
  --sans: "Avenir Next", "PingFang SC", "Noto Sans CJK SC", sans-serif;
  --serif: "Iowan Old Style", "Songti SC", "Noto Serif CJK SC", serif;
  --mono: "IBM Plex Mono", "SFMono-Regular", Menlo, monospace;
}

* { box-sizing: border-box; }
html { height: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  height: 100%;
  min-width: 320px;
  overflow: hidden;
  background:
    linear-gradient(rgba(29, 51, 44, .025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(29, 51, 44, .025) 1px, transparent 1px),
    var(--cream);
  background-size: 28px 28px;
  color: var(--ink);
  font-family: var(--sans);
}
button, input, select, textarea { font: inherit; }
button { color: inherit; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  height: 58px;
  align-items: center;
  justify-content: space-between;
  padding: 0 22px;
  border-bottom: 1px solid rgba(255, 255, 255, .13);
  background: rgba(29, 51, 44, .97);
  color: #f6faef;
  backdrop-filter: blur(18px);
}
.brand { display: flex; gap: 13px; align-items: center; color: inherit; text-decoration: none; }
.brand-mark {
  display: grid; width: 34px; height: 34px; place-items: center;
  border: 1px solid rgba(255,255,255,.7); color: var(--leaf);
  font: 700 12px var(--mono); letter-spacing: .08em;
}
.brand b { display: block; font: 700 12px var(--mono); letter-spacing: .13em; }
.brand small { display: block; margin-top: 4px; color: #b9c6bf; font-size: 11px; }
.top-context { color: #aabbb2; font: 10px var(--mono); letter-spacing: .13em; }
.top-actions { display: flex; gap: 12px; align-items: center; }
.reviewer { padding-left: 14px; border-left: 1px solid #546a62; font: 12px var(--mono); }
.connection {
  display: inline-flex; gap: 7px; align-items: center; color: #cbd5d0;
  font: 11px var(--mono);
}
.connection::before { width: 7px; height: 7px; border-radius: 50%; background: #c88b35; content: ""; }
.connection.online::before { background: #8dcf6a; box-shadow: 0 0 0 4px rgba(141,207,106,.12); }
.connection.offline::before { background: #d6665a; }

.app-shell {
  display: grid;
  height: 100vh;
  min-height: 0;
  grid-template-columns: 196px 1fr;
}
.sidebar-brand { position: relative; }
.brand-link { display: flex; min-width: 0; align-items: center; gap: 11px; color: inherit; text-decoration: none; }
.sidebar-toggle {
  position: absolute; top: 8px; right: 8px; display: grid; width: 22px; height: 22px;
  place-items: center; padding: 0; border: 1px solid rgba(255,255,255,.35); background: transparent;
  color: #f6faef; cursor: pointer; font: 20px/1 var(--sans);
}
.sidebar-toggle:hover { background: rgba(255,255,255,.12); }
.sidebar-collapsed .app-shell { grid-template-columns: 58px 1fr; }
.annotation-open .app-shell { grid-template-columns: 58px minmax(0, 1fr) minmax(360px, 440px); }
.sidebar-collapsed .sidebar { padding-right: 8px; padding-left: 8px; }
.sidebar-collapsed .sidebar-brand { justify-content: center; margin-right: -8px; margin-left: -8px; padding: 10px 8px; }
.sidebar-collapsed .brand-link { justify-content: center; }
.sidebar-collapsed .brand-link > span:last-child, .sidebar-collapsed .nav-label,
.sidebar-collapsed .nav-item b, .sidebar-collapsed .sidebar-note,
.sidebar-collapsed .sidebar-user-label, .sidebar-collapsed .sidebar-user strong { display: none; }
.sidebar-collapsed .sidebar-toggle { top: 50px; right: 18px; }
.sidebar-collapsed .nav-item { grid-template-columns: 1fr; justify-items: center; padding: 0; }
.sidebar-collapsed .nav-item em { position: absolute; right: 4px; top: 4px; min-width: 17px; height: 17px; padding: 0 3px; font-size: 8px; }
.sidebar-collapsed .sidebar-user { right: 8px; left: 8px; justify-items: center; }
.sidebar {
  position: sticky; top: 0; height: 100vh;
  padding: 22px 14px 18px; border-right: 1px solid #c9c8bd;
  background: rgba(244, 241, 231, .88);
}
.sidebar-brand {
  display: flex; min-height: 84px; align-items: center; gap: 11px;
  margin: -22px -14px 22px; padding: 14px;
  background: var(--pine); color: #f6faef; text-decoration: none;
}
.sidebar-brand .brand-mark {
  flex: 0 0 40px; width: 40px; height: 40px;
}
.sidebar-brand b { display: block; font: 700 11px var(--mono); letter-spacing: .12em; }
.sidebar-brand small { display: block; margin-top: 5px; color: #b9c6bf; font-size: 10px; white-space: nowrap; }
.nav-label, .kicker {
  margin: 0 10px 16px; color: var(--muted);
  font: 10px var(--mono); letter-spacing: .14em; text-transform: uppercase;
}
.nav-item {
  display: grid; width: 100%; min-height: 52px; grid-template-columns: 30px 1fr auto;
  gap: 8px; align-items: center; padding: 0 10px; border: 0;
  border-bottom: 1px solid var(--line); background: transparent; cursor: pointer; text-align: left;
}
.nav-item span { color: #8b928d; font: 10px var(--mono); }
.nav-item b { font-size: 14px; }
.nav-item em {
  display: grid; min-width: 25px; height: 25px; padding: 0 6px; place-items: center;
  border-radius: 14px; background: #e1e1d7; font: normal 11px var(--mono);
}
.nav-item.active, .nav-item:hover { background: var(--leaf); }
.nav-item.active em { background: var(--pine); color: white; }
.sidebar-note {
  position: absolute; right: 14px; bottom: 82px; left: 14px;
  padding: 12px; border: 1px solid var(--pine); background: var(--paper);
  box-shadow: 4px 4px 0 var(--pine);
}
.sidebar-note span { color: var(--pine-soft); font: 700 10px var(--mono); letter-spacing: .1em; }
.sidebar-note p { margin: 8px 0 0; font: 14px/1.65 var(--serif); }
.sidebar-user { position: absolute; right: 14px; bottom: 16px; left: 14px; display: grid; gap: 4px; padding-top: 12px; border-top: 1px solid var(--line); }
.sidebar-user-label { color: var(--muted); font: 9px var(--mono); letter-spacing: .12em; }
.sidebar-user strong { overflow: hidden; color: var(--pine); font: 11px var(--mono); text-overflow: ellipsis; white-space: nowrap; }
.sidebar-logout { width: max-content; padding: 0; border: 0; background: transparent; color: var(--blue); cursor: pointer; font: 10px var(--mono); }

.workspace {
  min-width: 0;
  min-height: 0;
  height: 100%;
  overflow: hidden;
  padding: 14px clamp(20px, 2.5vw, 36px) 18px;
}
.view {
  display: flex;
  min-height: 0;
  height: 100%;
  flex-direction: column;
  animation: enter .3s ease both;
}
@keyframes enter { from { opacity: 0; transform: translateY(8px); } }
.page-head {
  display: flex; align-items: end; justify-content: space-between;
  flex: 0 0 auto; gap: 16px; margin-bottom: 8px;
}
.page-head h1 { margin: 2px 0 0; font: 500 28px/1.02 var(--serif); letter-spacing: -.035em; }
.page-head-right { display: flex; align-items: end; gap: 16px; }
.page-head p { max-width: 320px; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.page-actions { display: flex; gap: 7px; align-items: center; }
.page-actions .button.quiet { border-color: #aeb7ac; color: var(--pine); background: rgba(255,253,247,.75); }
.page-actions .button.quiet:hover { background: var(--leaf); }
.eyebrow { color: var(--pine-soft); font: 700 10px var(--mono); letter-spacing: .14em; }
.toolbar { display: flex; flex: 0 0 auto; gap: 8px; margin-bottom: 12px; }
.toolbar select, .toolbar input {
  min-height: 40px; padding: 8px 12px; border: 1px solid var(--line); background: var(--paper);
}
.toolbar input { min-width: 240px; flex: 1; }

.case-grid {
  display: grid; min-height: 0; overflow: hidden; border: 1px solid var(--pine);
  background: var(--paper); grid-template-columns: minmax(210px, 21%) minmax(0, 1fr);
  flex: 1 1 auto;
  box-shadow: 8px 8px 0 rgba(29,51,44,.12);
}
.case-list {
  min-height: 0;
  height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  border-right: 1px solid var(--pine);
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}
.case-row {
  display: block; width: 100%; padding: 13px 15px; border: 0; border-bottom: 1px solid var(--line);
  background: transparent; cursor: pointer; text-align: left;
}
.case-row:hover, .case-row.active { background: #f1f4e6; }
.case-row.active { box-shadow: inset 4px 0 var(--pine); }
.case-row-top { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.risk { padding: 4px 7px; border-radius: 3px; background: #e8e9df; font: 700 9px var(--mono); text-transform: uppercase; }
.risk.high, .risk.critical { background: #f4d8d4; color: var(--red); }
.risk.medium { background: #f5e6cd; color: #8b5515; }
.agent { color: var(--muted); font: 10px var(--mono); text-transform: uppercase; }
.case-row h3 { margin: 9px 0 5px; font: 600 15px/1.3 var(--serif); }
.case-row p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.case-row footer { display: flex; justify-content: space-between; margin-top: 9px; color: #858b87; font: 10px var(--mono); }
.status-pill { color: var(--blue); }

.case-detail {
  min-width: 0;
  min-height: 0;
  height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}
.detail-empty { display: grid; min-height: 650px; place-items: center; color: var(--muted); }
.detail-header {
  display: flex; justify-content: space-between; gap: 20px; padding: 18px 22px;
  border-bottom: 1px solid var(--line); background: #f8f7f0;
}
.detail-header h1 { margin: 6px 0 0; font: 500 24px/1.15 var(--serif); letter-spacing: -.025em; }
.detail-meta { display: flex; gap: 8px; align-items: flex-start; flex-wrap: wrap; }
.meta-chip { padding: 5px 8px; border: 1px solid #bfc5bc; color: #5d665f; font: 10px var(--mono); }
.detail-body { padding: 20px 22px 30px; }
.section-title {
  display: flex; gap: 12px; align-items: center; margin: 0 0 14px;
  color: var(--pine); font: 700 11px var(--mono); letter-spacing: .09em; text-transform: uppercase;
}
.section-title::after { height: 1px; background: var(--line); content: ""; flex: 1; }
.conversation { display: grid; gap: 12px; margin-bottom: 30px; }
.message { max-width: 90%; padding: 16px 18px; border-radius: 2px 15px 15px 15px; line-height: 1.72; white-space: pre-wrap; }
.message.user { background: #e7eee8; }
.message.assistant {
  max-width: 100%; border: 1px solid var(--line); border-radius: 2px; background: white;
  font-family: var(--serif); font-size: 15px;
}
.clickable-message { cursor: pointer; transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease; }
.clickable-message:hover, .clickable-message:focus-visible { border-color: var(--pine); box-shadow: 4px 4px 0 rgba(29,51,44,.12); outline: none; transform: translate(-1px, -1px); }
.message-label { display: block; margin-bottom: 8px; color: var(--pine-soft); font: 700 9px var(--mono); letter-spacing: .1em; }
.projection-grid { display: grid; gap: 14px; margin-bottom: 28px; grid-template-columns: repeat(2, 1fr); }
.projection-card { padding: 18px; border: 1px solid var(--line); background: #faf9f3; }
.projection-card h3 { margin: 0 0 8px; font-size: 12px; }
.projection-card p { margin: 0; color: #4f5852; line-height: 1.65; }
.evidence-list { display: grid; gap: 9px; margin-bottom: 28px; }
.evidence-item { display: grid; gap: 12px; align-items: start; padding: 13px 15px; border: 1px solid var(--line); grid-template-columns: 18px 180px 1fr; }
.evidence-item i { width: 10px; height: 10px; margin-top: 5px; border-radius: 50%; background: #69a56d; }
.evidence-item.missing i { background: var(--amber); }
.evidence-item b { font-size: 13px; }
.evidence-item span { color: var(--muted); font-size: 13px; line-height: 1.55; }
.risk-box { margin-bottom: 28px; padding: 16px 18px; border-left: 4px solid var(--amber); background: #fff3df; }
.risk-box p { margin: 4px 0; }
.tech-details { margin: 24px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.tech-details summary { padding: 14px 0; cursor: pointer; color: var(--muted); font-size: 12px; }
.tech-grid { display: grid; gap: 8px 20px; padding: 0 0 16px; grid-template-columns: 120px 1fr; font: 11px/1.6 var(--mono); }
.tech-grid dt { color: var(--muted); }
.tech-grid dd { margin: 0; overflow-wrap: anywhere; }
.tech-grid a { color: var(--blue); }

.review-form { margin-top: 34px; padding-top: 28px; border-top: 2px solid var(--pine); }
.review-hint { margin-top: 28px; padding: 12px 14px; border: 1px dashed #aeb7ac; color: var(--muted); font-size: 12px; }
.annotation-panel {
  position: static; z-index: 35; display: flex; min-width: 0; width: auto; grid-column: 3;
  flex-direction: column; overflow-y: auto; padding: 20px 22px 30px; border-left: 1px solid var(--pine);
  background: var(--paper); box-shadow: -1px 0 0 var(--pine);
}
.annotation-panel[hidden] { display: none; }
.annotation-panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.annotation-panel-head h2 { margin: 5px 0 4px; color: var(--pine); font: 500 25px var(--serif); }
.annotation-panel-head p { margin: 0; color: var(--muted); font: 10px var(--mono); }
.panel-head-actions { display: flex; align-items: flex-start; gap: 8px; }
.panel-head-actions .button { padding: 8px 10px; font-size: 11px; white-space: nowrap; }
.panel-close { width: 30px; height: 30px; padding: 0; border: 1px solid var(--line); background: transparent; cursor: pointer; font-size: 22px; line-height: 1; }
.panel-close:hover { background: var(--leaf); }
.annotation-target { margin: 18px 0 0; padding: 14px; border-left: 3px solid var(--pine); background: #e7eee8; }
.annotation-target span { color: var(--pine-soft); font: 700 9px var(--mono); letter-spacing: .1em; }
.annotation-target p { margin: 8px 0 0; max-height: 190px; overflow: auto; font: 14px/1.65 var(--serif); white-space: pre-wrap; }
.suggestion-note { margin-top: 14px; padding: 10px 12px; border: 1px solid #b8c890; background: #f1f5dc; color: var(--pine); font-size: 11px; line-height: 1.55; }
.suggestion-note p { margin: 4px 0; }
.suggestion-note small { color: var(--muted); font: 9px var(--mono); }
.annotation-panel .review-form { margin-top: 20px; padding-top: 20px; }
.annotation-panel .form-title { margin-bottom: 18px; }
.annotation-panel .form-title h2 { font-size: 21px; }
.annotation-panel fieldset { margin-bottom: 18px; }
.form-title { display: flex; align-items: end; justify-content: space-between; margin-bottom: 24px; }
.form-title .kicker { margin: 0 0 7px; }
.form-title h2 { margin: 0; font: 500 25px var(--serif); }
.required-note { color: var(--muted); font-size: 11px; }
fieldset { margin: 0 0 24px; padding: 0; border: 0; }
legend, .text-field > span { display: block; margin-bottom: 11px; font-weight: 700; font-size: 13px; }
legend small, .text-field small { color: var(--muted); font-weight: 400; }
.result-options { display: grid; gap: 9px; grid-template-columns: repeat(2, 1fr); }
.result-options legend { grid-column: 1 / -1; }
.result-card {
  display: flex; gap: 10px; align-items: flex-start; padding: 13px;
  border: 1px solid var(--line); background: #fbfaf5; cursor: pointer;
}
.result-card:has(input:checked) { border-color: var(--pine); background: #edf4e6; box-shadow: inset 3px 0 var(--pine); }
.result-card b, .result-card small { display: block; }
.result-card b { font-size: 13px; }
.result-card small { margin-top: 4px; color: var(--muted); font-size: 11px; }
.check-grid { display: grid; gap: 8px; grid-template-columns: repeat(2, 1fr); }
.check-grid label { padding: 9px 11px; border: 1px solid var(--line); font-size: 12px; cursor: pointer; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--pine); }
.text-field { display: block; margin-bottom: 18px; }
textarea {
  width: 100%; resize: vertical; padding: 13px; border: 1px solid #bfc2b9;
  background: #fffefa; line-height: 1.6;
}
textarea:focus { outline: 2px solid rgba(49,84,72,.18); border-color: var(--pine); }
.form-bottom { display: grid; gap: 18px; align-items: center; margin: 24px 0; grid-template-columns: 1fr 1.4fr; }
.confidence { display: flex; gap: 18px; align-items: center; margin: 0; }
.confidence legend { float: left; margin: 0 14px 0 0; }
.golden-toggle { display: flex; gap: 10px; padding: 12px; border: 1px dashed var(--pine-soft); cursor: pointer; }
.golden-toggle b, .golden-toggle small { display: block; }
.golden-toggle b { font-size: 12px; }
.golden-toggle small { margin-top: 3px; color: var(--muted); font-size: 10px; }

.button {
  min-height: 40px; padding: 9px 14px; border: 1px solid currentColor;
  background: transparent; cursor: pointer; font-weight: 700; font-size: 12px;
}
.button:hover { transform: translateY(-1px); }
.button.quiet { border-color: #71857d; color: #eff7f1; }
.button:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.button.submit {
  display: flex; width: 100%; min-height: 52px; align-items: center; justify-content: space-between;
  padding: 0 18px; border-color: var(--pine); background: var(--pine); color: white;
}
.button.submit span { color: var(--leaf); font-size: 19px; }
.button.primary { border-color: var(--pine); background: var(--pine); color: white; }

.golden-layout {
  display: grid;
  min-height: 0;
  overflow: hidden;
  gap: 18px;
  grid-template-columns: 320px minmax(0, 1fr);
  flex: 1 1 auto;
}
.golden-list, .golden-editor {
  min-height: 0;
  height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  border: 1px solid var(--pine);
  background: var(--paper);
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}
.golden-row { width: 100%; padding: 17px; border: 0; border-bottom: 1px solid var(--line); background: transparent; cursor: pointer; text-align: left; }
.golden-row.active, .golden-row:hover { background: #eef2e6; box-shadow: inset 4px 0 var(--pine); }
.golden-row b, .golden-row small { display: block; }
.golden-row small { margin-top: 6px; color: var(--muted); }
.golden-editor { padding: 26px; }
.golden-editor h2 { margin: 5px 0 22px; font: 500 27px var(--serif); }
.golden-source { margin: 0 0 24px; padding: 16px; border: 1px solid var(--line); background: #f7f8f0; }
.golden-source h3 { margin: 0 0 5px; color: var(--pine); font-size: 14px; }
.golden-source-note { margin: 0 0 12px; color: var(--muted); font-size: 11px; }
.golden-message { margin-top: 10px; padding: 11px 13px; border-radius: 2px 12px 12px 12px; }
.golden-message.user { background: #e7eee8; }
.golden-message.assistant { border: 1px solid var(--line); background: white; }
.golden-message span { color: var(--pine-soft); font: 700 9px var(--mono); letter-spacing: .08em; }
.golden-message p { margin: 6px 0 0; white-space: pre-wrap; font: 14px/1.6 var(--serif); }
.golden-editor label { display: block; margin-bottom: 18px; font-weight: 700; font-size: 12px; }
.golden-editor input, .golden-editor select { width: 100%; margin-top: 7px; padding: 11px; border: 1px solid var(--line); background: white; }
.golden-editor textarea { margin-top: 7px; font-weight: 400; }
.editor-actions { display: flex; justify-content: flex-end; gap: 10px; }

.empty-state { display: grid; min-height: 65vh; place-items: center; align-content: center; text-align: center; }
.empty-state h1 { margin: 18px 0 6px; font: 500 32px var(--serif); }
.empty-state p { max-width: 470px; margin: 0; color: var(--muted); }
.pulse { width: 16px; height: 16px; border-radius: 50%; background: var(--pine); box-shadow: 0 0 0 10px rgba(29,51,44,.1); animation: pulse 1.5s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 18px rgba(29,51,44,0); } }
.toast {
  position: fixed; right: 24px; bottom: 24px; z-index: 40; max-width: 420px;
  padding: 14px 18px; background: var(--pine); color: white;
  box-shadow: 5px 5px 0 rgba(0,0,0,.17); opacity: 0; transform: translateY(10px);
  pointer-events: none; transition: .2s ease;
}
.toast.show { opacity: 1; transform: none; }
.toast.error { background: var(--red); }

.login-mode { background: #e7e3d8; }
.login-mode .topbar { display: none; }
.login-mode .app-shell { display: block; height: 100vh; }
.login-mode .sidebar { display: none; }
.login-mode .workspace { padding: 0; overflow: hidden; }
.login-stage { position: relative; display: grid; min-height: 100vh; place-items: center; overflow: hidden; background: #e7e3d8; }
.login-atmosphere { position: absolute; inset: 0; background: radial-gradient(circle at 18% 18%, rgba(215,244,91,.55), transparent 31%), radial-gradient(circle at 88% 74%, rgba(49,84,72,.24), transparent 38%), linear-gradient(135deg, #f4f1e7 0%, #d9e2d5 100%); }
.login-grid { position: absolute; inset: 0; opacity: .28; background-image: linear-gradient(rgba(29,51,44,.14) 1px, transparent 1px), linear-gradient(90deg, rgba(29,51,44,.14) 1px, transparent 1px); background-size: 34px 34px; mask-image: linear-gradient(120deg, black, transparent 70%); }
.login-orbit { position: absolute; display: block; border: 1px solid rgba(29,51,44,.25); border-radius: 50%; transform: rotate(-26deg); }
.orbit-one { width: 62vw; height: 25vw; top: 13%; left: -12%; }
.orbit-two { width: 46vw; height: 20vw; right: -8%; bottom: 14%; border-color: rgba(215,244,91,.7); }
.login-card { position: relative; z-index: 1; width: min(440px, calc(100% - 32px)); padding: 44px 44px 35px; border: 1px solid rgba(29,51,44,.24); background: rgba(255,253,247,.86); box-shadow: 14px 14px 0 rgba(29,51,44,.16), 0 24px 70px rgba(29,51,44,.16); backdrop-filter: blur(18px); animation: login-enter .55s cubic-bezier(.2,.7,.2,1) both; }
@keyframes login-enter { from { opacity: 0; transform: translateY(18px) rotate(.6deg); } to { opacity: 1; transform: none; } }
.login-mark { display: flex; width: 54px; height: 54px; align-items: center; justify-content: center; margin-bottom: 27px; border: 1px solid var(--pine); background: var(--pine); color: var(--leaf); font: 700 13px var(--mono); letter-spacing: .08em; box-shadow: 5px 5px 0 var(--leaf); }
.login-mark i { width: 6px; height: 6px; margin: 0 0 19px 4px; border-radius: 50%; background: var(--leaf); }
.login-kicker { margin: 0 0 10px; color: var(--pine-soft); font: 700 10px var(--mono); letter-spacing: .16em; }
.login-card h1 { margin: 0; color: var(--pine); font: 500 40px/1.1 var(--serif); letter-spacing: -.04em; }
.login-lead { max-width: 340px; margin: 14px 0 30px; color: var(--muted); font: 15px/1.7 var(--serif); }
.login-form { display: grid; gap: 17px; }
.login-form label { display: grid; gap: 8px; color: var(--pine); font-size: 12px; font-weight: 700; }
.login-form input { width: 100%; min-height: 46px; padding: 11px 13px; border: 1px solid #b9beb4; outline: none; background: rgba(255,255,255,.76); color: var(--ink); }
.login-form input:focus { border-color: var(--pine); box-shadow: 0 0 0 3px rgba(49,84,72,.13); }
.password-field { position: relative; }
.password-field input { padding-right: 58px; }
.password-field button { position: absolute; top: 0; right: 0; height: 100%; padding: 0 13px; border: 0; background: transparent; color: var(--muted); cursor: pointer; font: 10px var(--mono); }
.login-submit { display: flex; min-height: 54px; align-items: center; justify-content: space-between; margin-top: 8px; padding: 0 17px; border: 1px solid var(--pine); background: var(--pine); color: white; font-size: 13px; }
.login-submit b { color: var(--leaf); font: 22px var(--serif); }
.login-error { padding: 10px 12px; border-left: 3px solid var(--red); background: #f8e5df; color: var(--red); font-size: 12px; line-height: 1.5; }
.login-footnote { margin: 26px 0 0; color: #7d857d; font: 10px var(--mono); letter-spacing: .02em; }

@media (max-width: 980px) {
  .app-shell { grid-template-columns: 72px 1fr; }
  .sidebar { padding: 28px 8px; }
  .nav-label, .sidebar-note, .nav-item b { display: none; }
  .nav-item { grid-template-columns: 1fr; justify-items: center; padding: 7px; }
  .nav-item em { position: absolute; margin-left: 28px; margin-top: -23px; }
  .case-grid { grid-template-columns: 260px minmax(0, 1fr); }
  .projection-grid, .result-options { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  html, body { height: auto; }
  body { overflow: auto; }
  .topbar { padding: 0 15px; }
  .brand small, .connection, .reviewer { display: none; }
  .app-shell { display: block; height: auto; min-height: 100vh; }
  .sidebar { position: static; display: flex; width: 100%; height: auto; padding: 0; border: 0; border-bottom: 1px solid var(--line); }
  .sidebar-brand { flex: 0 0 auto; min-height: 68px; margin: 0; padding: 10px 12px; }
  .sidebar-brand .brand-mark { flex-basis: 34px; width: 34px; height: 34px; }
  .sidebar-brand small, .sidebar-brand b { font-size: 9px; }
  .nav-item { min-height: 46px; grid-template-columns: 22px auto 22px; justify-items: start; }
  .nav-item b { display: block; }
  .nav-item em { position: static; margin: 0; }
  .workspace { height: auto; min-height: 0; overflow: visible; padding: 24px 14px 50px; }
  .view { display: block; height: auto; }
  .page-head { display: block; }
  .page-head p { margin-top: 12px; }
  .case-grid { display: block; overflow: visible; }
  .annotation-open .app-shell { display: block; }
  .annotation-open .workspace { display: none; }
  .annotation-panel { position: fixed; inset: 0; width: 100%; }
  .case-list { max-height: 260px; border-right: 0; border-bottom: 1px solid var(--pine); }
  .case-detail { height: auto; overflow: visible; }
  .detail-header, .detail-body { padding: 20px; }
  .evidence-item { grid-template-columns: 16px 1fr; }
  .evidence-item span { grid-column: 2; }
  .check-grid, .form-bottom, .golden-layout { grid-template-columns: 1fr; }
  .golden-layout { display: grid; overflow: visible; }
  .golden-list { max-height: 280px; }
  .golden-editor { height: auto; overflow: visible; }
  .login-card { padding: 32px 24px 28px; }
  .login-card h1 { font-size: 34px; }
  .orbit-one { width: 120vw; height: 52vw; top: 16%; left: -40%; }
  .orbit-two { width: 110vw; height: 48vw; right: -42%; bottom: 17%; }
}
