:root {
  --bg: #f3f6fa;
  --surface: #ffffff;
  --surface-muted: #f7f9fc;
  --line: #dfe6ef;
  --line-strong: #c8d3e1;
  --text: #152238;
  --muted: #6c7b90;
  --navy: #0c1c35;
  --navy-2: #112848;
  --blue: #2b67d1;
  --blue-light: #eaf1ff;
  --teal: #138d83;
  --amber: #b7791f;
  --red: #b14a57;
  --shadow: 0 16px 36px rgba(19, 39, 69, 0.08);
  --radius: 14px;
  --font: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Noto Sans CJK SC", sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; margin: 0; }
body { background: var(--bg); color: var(--text); font-family: var(--font); line-height: 1.55; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .52; }
p { margin: 0 0 12px; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; }
a, button { -webkit-tap-highlight-color: transparent; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.mono { font-family: var(--mono); letter-spacing: .04em; font-size: 11px; }
.muted { color: var(--muted); }
.eyebrow { color: #8ea4c1; letter-spacing: .16em; font-size: 11px; font-weight: 700; }

/* Login */
.login-screen { min-height: 100vh; display: grid; place-items: center; padding: 34px; background: radial-gradient(circle at 20% 15%, rgba(73, 119, 191, .14), transparent 38%), linear-gradient(145deg, #08162b, #0d2341 58%, #102d4d); color: #fff; }
.login-grid { width: min(1080px, 100%); display: grid; grid-template-columns: 1.2fr .8fr; gap: 70px; align-items: center; }
.brand-lockup { display: flex; align-items: center; gap: 12px; color: #dce9fb; letter-spacing: .08em; font-size: 13px; font-weight: 700; }
.brand-mark { display: inline-grid; place-items: center; width: 34px; height: 34px; border: 1px solid rgba(170, 204, 242, .7); color: #cfe2ff; border-radius: 9px; font-family: Georgia, serif; font-size: 21px; }
.brand-mark.small { width: 31px; height: 31px; font-size: 18px; flex: 0 0 auto; }
.login-copy h1 { font-size: clamp(54px, 9vw, 102px); letter-spacing: -.07em; margin: 18px 0 16px; font-weight: 750; }
.login-lead { color: #b9cce5; font-size: 18px; max-width: 515px; line-height: 1.7; }
.login-stamp { margin-top: 34px; display: inline-flex; align-items: center; gap: 9px; color: #b9cce5; font-size: 13px; padding: 9px 14px; border: 1px solid rgba(153, 184, 222, .2); border-radius: 100px; background: rgba(255,255,255,.04); }
.status-dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; background: #42c89c; box-shadow: 0 0 0 4px rgba(66, 200, 156, .12); }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.login-card { padding: 30px; color: var(--text); }
.login-card-head { display: flex; justify-content: space-between; align-items: center; color: var(--muted); margin-bottom: 25px; }
.chip { display: inline-flex; align-items: center; border-radius: 999px; padding: 4px 9px; font-size: 11px; font-weight: 700; }
.chip-blue { color: var(--blue); background: var(--blue-light); }
.avatar-placeholder { width: 60px; height: 60px; display: grid; place-items: center; border-radius: 15px; background: #edf3fc; color: #315d9a; font-size: 22px; font-weight: 700; margin-bottom: 18px; }
.login-card h2 { font-size: 21px; margin-bottom: 5px; }
.login-card .muted { margin-bottom: 22px; }
.login-note { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 12px; margin-top: 18px; }
.lock-icon { color: var(--blue); }

/* Buttons / controls */
.btn { border: 0; border-radius: 9px; padding: 10px 14px; font-size: 13px; font-weight: 700; transition: background .16s ease, border-color .16s ease, transform .16s ease; }
.btn:not(:disabled):active { transform: translateY(1px); }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: #1f56b4; }
.btn-secondary { background: #eaf0f8; color: #244268; }
.btn-secondary:hover { background: #dce7f6; }
.btn-ghost { background: transparent; color: #45607e; border: 1px solid var(--line-strong); }
.btn-ghost:hover { background: #f2f6fc; }
.btn-danger { color: var(--red); background: #fff3f4; border: 1px solid #f1d4d8; }
.btn-block { width: 100%; }
.text-btn { border: 0; background: none; padding: 0; color: var(--blue); font-weight: 700; font-size: 13px; }
.icon-btn { border: 1px solid var(--line); background: #fff; color: #45617f; width: 34px; height: 34px; border-radius: 8px; display: inline-grid; place-items: center; }
.icon-btn:hover { background: #f3f7fc; }

/* App chrome */
.game-view { min-height: 100vh; display: flex; }
.sidebar { width: 250px; flex: 0 0 250px; background: var(--navy); color: #c1d1e7; display: flex; flex-direction: column; padding: 23px 13px 15px; }
.sidebar-brand { display: flex; align-items: center; gap: 10px; padding: 0 9px 25px; color: #f1f6ff; }
.sidebar-brand strong { display: block; font-size: 13px; letter-spacing: .03em; }
.sidebar-brand small { display: block; color: #7f96b4; font-size: 10px; margin-top: 2px; }
.case-badge { display: flex; gap: 10px; align-items: center; padding: 12px 10px; background: rgba(255,255,255,.06); border: 1px solid rgba(164, 190, 222, .12); border-radius: 10px; margin-bottom: 24px; }
.case-icon { font-family: var(--mono); font-size: 11px; color: #a9c4e6; border: 1px solid rgba(169,196,230,.35); padding: 6px 5px; border-radius: 5px; }
.case-badge strong { color: #edf4ff; display: block; font-size: 13px; }
.case-badge small { color: #859bb8; font-size: 10px; }
.main-nav { display: grid; gap: 4px; }
.nav-item { width: 100%; display: flex; align-items: center; gap: 11px; border: 0; border-radius: 8px; background: transparent; color: #9bb0ca; text-align: left; padding: 10px 11px; font-size: 13px; }
.nav-item > span:first-child { width: 17px; text-align: center; color: #87a1c1; font-size: 16px; }
.nav-item:hover { color: #f4f7fe; background: rgba(255,255,255,.06); }
.nav-item.active { color: #fff; background: #1d467f; box-shadow: inset 3px 0 0 #77a8ed; }
.nav-item.active > span:first-child { color: #d4e7ff; }
.nav-count { margin-left: auto; border-radius: 999px; background: rgba(255,255,255,.12); padding: 2px 7px; font-size: 10px; color: #d6e5f9; }
.nav-lock { margin-left: auto; color: #748aa8; font-size: 10px; font-family: var(--mono); }
.sidebar-bottom { margin-top: auto; padding-top: 16px; border-top: 1px solid rgba(168, 193, 221, .13); }
.save-status { display: flex; align-items: center; gap: 8px; padding: 5px 11px 12px; color: #7e97b8; font-size: 11px; }
.danger-nav { color: #a5b2c3; }
.danger-nav:hover { color: #f5b1b8; background: rgba(178, 74, 87, .12); }
.main-column { min-width: 0; flex: 1; }
.topbar { height: 67px; background: rgba(255,255,255,.92); border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; padding: 0 30px; position: sticky; top: 0; z-index: 5; backdrop-filter: blur(12px); }
.breadcrumbs { display: flex; align-items: center; gap: 10px; color: #8794a5; font-size: 12px; }
.breadcrumbs strong { color: var(--text); font-size: 13px; }
.breadcrumbs b { color: #bac5d1; font-weight: 400; }
.topbar-actions { display: flex; align-items: center; gap: 16px; }
.top-permission { color: #486988; font-size: 11px; font-family: var(--mono); }
.account-pill { display: inline-flex; align-items: center; gap: 8px; color: #3c526e; font-size: 12px; padding-left: 14px; border-left: 1px solid var(--line); }
.account-avatar { width: 28px; height: 28px; display: grid; place-items: center; background: #e8effb; color: #2e5d9d; border-radius: 8px; font-weight: 700; }
.chevron { color: #91a0b2; font-size: 15px; }
.menu-btn { display: none; }
.content-wrap { max-width: 1400px; margin: 0 auto; padding: 33px 34px 60px; }
.view-section { animation: fadeIn .16s ease-out; }
@keyframes fadeIn { from { opacity: .5; transform: translateY(2px); } to { opacity: 1; transform: translateY(0); } }

/* Shared content */
.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-bottom: 25px; }
.page-head h1 { font-size: 27px; letter-spacing: -.03em; }
.page-head p { margin-top: 7px; color: var(--muted); font-size: 13px; }
.page-head-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.overline { color: #8092a8; font-family: var(--mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
.grid { display: grid; gap: 16px; }
.grid-4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.metric-card { padding: 18px; min-height: 112px; }
.metric-label { color: var(--muted); font-size: 12px; }
.metric-value { font-size: 29px; font-weight: 750; letter-spacing: -.05em; margin: 10px 0 2px; }
.metric-caption { color: #8c9bae; font-size: 11px; }
.section-card { padding: 20px; }
.section-card h2, .section-card h3 { font-size: 15px; }
.section-card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; gap: 10px; }
.section-card-head .muted { font-size: 12px; }
.status-label { display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--line); border-radius: 999px; padding: 4px 8px; font-size: 10px; color: #65778c; white-space: nowrap; }
.status-label.blue { color: var(--blue); background: var(--blue-light); border-color: #d9e5ff; }
.status-label.green { color: var(--teal); background: #e8f7f3; border-color: #cbece3; }
.status-label.amber { color: var(--amber); background: #fff7e8; border-color: #f5dfb2; }
.status-label.red { color: var(--red); background: #fff0f1; border-color: #f2d4d7; }
.divider { height: 1px; background: var(--line); margin: 17px 0; }
.progress-track { background: #e9eef5; height: 7px; border-radius: 99px; overflow: hidden; }
.progress-fill { height: 100%; background: linear-gradient(90deg, #3b74db, #75a0ed); border-radius: inherit; transition: width .25s ease; }
.progress-row { display: flex; justify-content: space-between; color: var(--muted); font-size: 11px; margin-bottom: 8px; }
.list-clean { display: grid; gap: 8px; list-style: none; margin: 0; padding: 0; }
.list-row { display: flex; gap: 10px; align-items: center; border: 1px solid var(--line); background: var(--surface-muted); padding: 10px 11px; border-radius: 9px; font-size: 12px; }
.list-row .row-main { min-width: 0; flex: 1; }
.list-row strong { display: block; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-row small { color: var(--muted); display: block; margin-top: 2px; }
.row-icon { flex: 0 0 auto; display: grid; place-items: center; width: 29px; height: 29px; border-radius: 7px; color: var(--blue); background: #eaf1ff; font-family: var(--mono); font-size: 10px; }
.empty-state { padding: 27px 18px; text-align: center; color: var(--muted); border: 1px dashed var(--line-strong); border-radius: 10px; background: #fbfcfe; font-size: 13px; }
.empty-state strong { display: block; color: #3f5672; margin-bottom: 4px; }
.callout { border-left: 3px solid var(--blue); background: #f0f5ff; padding: 12px 14px; border-radius: 0 9px 9px 0; color: #37547d; font-size: 12px; }
.callout.warning { border-color: #d29436; background: #fff7e8; color: #775a2d; }
.callout.danger { border-color: var(--red); background: #fff2f3; color: #7a3d46; }

/* Dashboard */
.hero-card { padding: 25px; background: linear-gradient(120deg, #fff, #f7faff); position: relative; overflow: hidden; }
.hero-card:after { content: "017"; position: absolute; right: 26px; top: 19px; font-family: var(--mono); color: #e8eef8; font-size: 65px; font-weight: 800; letter-spacing: -.1em; }
.hero-card > * { position: relative; z-index: 1; }
.hero-card h2 { margin: 7px 0 8px; font-size: 24px; letter-spacing: -.04em; }
.hero-card p { color: var(--muted); max-width: 660px; font-size: 13px; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 17px; }
.quick-grid { margin-top: 16px; }
.quick-action { display: flex; align-items: center; gap: 12px; text-align: left; padding: 14px; }
.quick-action .row-icon { width: 35px; height: 35px; font-size: 14px; }
.quick-action strong { font-size: 12px; display: block; }
.quick-action small { color: var(--muted); font-size: 11px; }
.next-step { display: flex; align-items: flex-start; gap: 13px; }
.step-number { flex: 0 0 auto; color: var(--blue); background: var(--blue-light); border-radius: 8px; width: 33px; height: 33px; display: grid; place-items: center; font-family: var(--mono); font-size: 12px; }
.next-step strong { display: block; font-size: 13px; margin-bottom: 3px; }
.next-step p { font-size: 12px; color: var(--muted); }

/* Documents */
.document-layout { display: grid; grid-template-columns: 340px minmax(0,1fr); gap: 17px; align-items: start; }
.document-list { padding: 10px; }
.document-list-head { padding: 9px 9px 14px; display: flex; justify-content: space-between; align-items: center; }
.document-list-head strong { font-size: 13px; }
.document-list-head span { color: var(--muted); font-size: 11px; }
.doc-item { display: flex; align-items: flex-start; gap: 10px; border: 1px solid transparent; width: 100%; background: transparent; padding: 11px 9px; border-radius: 9px; text-align: left; color: var(--text); }
.doc-item:hover { background: #f5f8fc; }
.doc-item.selected { background: #edf4ff; border-color: #d3e2fa; }
.doc-item.locked { opacity: .62; }
.doc-item .doc-meta { min-width: 0; flex: 1; }
.doc-item strong { display: block; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.doc-item small { display: block; color: var(--muted); font-size: 10px; margin-top: 3px; }
.doc-status { flex: 0 0 auto; font-size: 10px; color: #8290a2; margin-top: 2px; }
.doc-reader { padding: 27px clamp(22px, 4vw, 48px); min-height: 550px; }
.reader-head { border-bottom: 1px solid var(--line); padding-bottom: 20px; margin-bottom: 22px; }
.reader-head h2 { font-size: 23px; margin: 7px 0 13px; letter-spacing: -.03em; }
.reader-meta { display: flex; flex-wrap: wrap; gap: 8px 16px; color: var(--muted); font-size: 11px; }
.reader-meta span { display: inline-flex; align-items: center; gap: 5px; }
.reader-meta b { color: #344e6e; font-family: var(--mono); font-weight: 500; }
.reader-actions { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 17px; }
.reader-actions-left, .reader-actions-right { display: flex; gap: 8px; flex-wrap: wrap; }
.doc-body { color: #27384f; font-size: 14px; line-height: 1.9; user-select: text; -webkit-user-select: text; }
.doc-body p { margin-bottom: 18px; white-space: pre-wrap; }
.doc-body .log-line { font-family: var(--mono); font-size: 12px; background: #f7f9fc; border-left: 2px solid #cad7e7; padding: 6px 10px; margin: 8px 0; }
.doc-body .quote { color: #425d7d; }
.doc-body.corrupted { background: linear-gradient(90deg, rgba(239, 238, 232, .3), transparent); padding: 14px; border: 1px solid #e6e1d5; }
.corrupt-banner { display: flex; align-items: center; gap: 8px; border: 1px solid #e7d8b7; color: #8b6c37; background: #fff8e9; padding: 8px 11px; border-radius: 8px; font-size: 11px; margin-bottom: 17px; }
.corrupt-banner .status-dot { background: #d8993d; box-shadow: 0 0 0 4px rgba(216,153,61,.12); }
.attachment-mini { margin: 14px 0 22px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #f9fbfd; }
.attachment-mini .asset-visual { min-height: 155px; }
.attachment-caption { padding: 9px 11px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; display: flex; justify-content: space-between; gap: 8px; }
.data-list { display: grid; gap: 10px; margin: 0; }
.data-list > div { display: grid; grid-template-columns: 105px 1fr; gap: 10px; font-size: 12px; }
.data-list dt { color: var(--muted); }
.data-list dd { margin: 0; color: #354d6a; }
.character-links { display: flex; justify-content: space-between; gap: 8px; color: #8796a9; font-size: 10px; margin-top: 14px; }

/* Asset visuals */
.asset-visual { min-height: 190px; position: relative; overflow: hidden; background: #e9eff6; display: grid; place-items: center; }
.asset-visual:before, .asset-visual:after { content: ""; position: absolute; pointer-events: none; }
.asset-visual.asset-id { background: linear-gradient(145deg, #dce7f2, #f5f8fb); }
.asset-id .portrait { width: 78px; height: 108px; border-radius: 46% 46% 33% 33%; background: linear-gradient(120deg,#6c87a7,#b9cadc); position: relative; box-shadow: 0 9px 0 -3px rgba(55,85,119,.18); }
.asset-id .portrait:before { content: ""; position: absolute; width: 42px; height: 42px; border-radius: 50%; background: #f1c8ad; top: 17px; left: 18px; box-shadow: inset 0 5px rgba(44,55,77,.18); }
.asset-id .portrait:after { content: ""; position: absolute; width: 61px; height: 47px; border-radius: 50% 50% 40% 40%; background: #4c607b; left: 8px; top: 4px; clip-path: polygon(0 0,100% 0,88% 40%,72% 22%,44% 50%,19% 34%); }
.asset-id .asset-label { position: absolute; left: 14px; bottom: 12px; color: #7790aa; font: 10px var(--mono); }
.asset-visual.asset-store { background: linear-gradient(#13253d 0 44%, #2b4156 45% 47%, #1c2d3e 48%); }
.asset-store .store-front { width: 78%; height: 54%; position: relative; border: 5px solid #3d4f61; background: linear-gradient(#213448 0 30%, #718393 31% 35%, #1a2837 36%); box-shadow: 0 18px 30px rgba(5,14,26,.28); }
.asset-store .store-front:before { content: ""; position: absolute; left: 9%; right: 9%; top: 7%; height: 17%; background: #465e75; }
.asset-store .store-front:after { content: ""; position: absolute; left: 18%; right: 18%; bottom: 0; height: 52%; border: 2px solid #304658; background: linear-gradient(90deg,#263b4b 0 48%, #1a2d3d 49% 52%, #263b4b 53%); }
.asset-store .store-glow { position: absolute; inset: 28% 17% 5%; background: rgba(205,222,218,.08); filter: blur(5px); }
.asset-store.anomaly .store-glow { background: rgba(216, 238, 218, .31); }
.asset-store .fog { position: absolute; width: 130%; height: 40px; left: -15%; bottom: 4%; background: rgba(206,221,228,.15); filter: blur(7px); }
.asset-visual.asset-cctv { background: #26343d; padding: 18px; }
.asset-cctv .cctv-screen { width: 86%; height: 78%; position: relative; background: linear-gradient(145deg,#566467,#1b292d); border: 5px solid #3c4b50; filter: saturate(.65); overflow: hidden; }
.asset-cctv .cctv-screen:before { content: ""; position: absolute; left: 15%; bottom: 0; width: 22%; height: 66%; background: #3e4f51; box-shadow: 82px -18px 0 -8px #4d5a58, 152px 7px 0 -5px #35474a; }
.asset-cctv .cctv-screen:after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(0deg, transparent 0 5px, rgba(255,255,255,.04) 6px 7px); }
.asset-cctv .timestamp { position: absolute; top: 7px; right: 8px; color: #ced7cc; font: 9px var(--mono); }
.asset-visual.asset-receipt { background: linear-gradient(135deg,#d9e1e8,#f7fafb); }
.asset-receipt .receipt { width: 42%; height: 82%; background: #f5f1e6; transform: rotate(-4deg); box-shadow: 6px 10px 18px rgba(35,54,70,.17); position: relative; }
.asset-receipt .receipt:before { content: ""; position: absolute; inset: 17% 16%; background: repeating-linear-gradient(180deg, #859093 0 2px, transparent 3px 9px); opacity: .46; }
.asset-receipt .receipt:after { content: "02:17"; position: absolute; left: 18%; bottom: 8%; color: #6e7777; font: 11px var(--mono); }
.asset-visual.asset-archive { background: #d9dde1; padding: 19px; }
.asset-archive .paper { width: 70%; height: 84%; background: #efede5; transform: rotate(2deg); box-shadow: 7px 8px 13px rgba(43,56,68,.16); position: relative; }
.asset-archive .paper:before { content: ""; position: absolute; inset: 16% 12%; background: repeating-linear-gradient(180deg,#687279 0 2px,transparent 3px 10px); opacity: .38; }
.asset-archive .stamp { position: absolute; right: 15%; top: 22%; color: rgba(169, 57, 64,.67); border: 2px solid rgba(169,57,64,.55); padding: 4px 5px; font-size: 9px; transform: rotate(-12deg); }
.asset-visual.asset-map { background: #eef2f5; }
.asset-map .map-lines { width: 72%; height: 68%; border: 2px solid #94a5b5; background: linear-gradient(35deg, transparent 47%, #9fb0bd 48% 50%, transparent 51%), linear-gradient(145deg, transparent 47%, #9fb0bd 48% 50%, transparent 51%); position: relative; }
.asset-map .map-lines:after { content: ""; position: absolute; width: 28px; height: 28px; border: 2px solid #c4666e; left: 41%; top: 34%; border-radius: 50%; }
.asset-visual.anomaly:after { inset: 0; background: linear-gradient(90deg, transparent 0 57%, rgba(159,91,61,.08) 58% 60%, transparent 61%); mix-blend-mode: multiply; }

/* Terminal / clues / questions / report */
.terminal-hero { padding: 23px; background: linear-gradient(135deg,#fff,#f1f6ff); }
.terminal-hero h2 { font-size: 23px; margin: 7px 0; letter-spacing: -.035em; }
.terminal-hero p { color: var(--muted); font-size: 13px; max-width: 650px; }
.terminal-input-wrap { margin-top: 18px; display: grid; grid-template-columns: 1fr auto; gap: 9px; }
.terminal-input { width: 100%; border: 1px solid var(--line-strong); background: #fff; border-radius: 9px; padding: 13px 14px; min-height: 76px; resize: vertical; color: var(--text); outline: 0; }
.terminal-input:focus { border-color: #7da1dc; box-shadow: 0 0 0 3px rgba(61,115,213,.12); }
.terminal-help { margin-top: 12px; color: #8796a9; font-size: 11px; }
.clue-card { padding: 17px; }
.clue-card .clue-head { display: flex; gap: 10px; align-items: flex-start; }
.clue-id { color: var(--blue); font: 11px var(--mono); background: var(--blue-light); border-radius: 6px; padding: 5px 6px; }
.clue-card h3 { font-size: 14px; margin-bottom: 4px; }
.clue-card p { color: var(--muted); font-size: 12px; }
.clue-card .clue-foot { border-top: 1px solid var(--line); padding-top: 11px; margin-top: 11px; display: flex; justify-content: space-between; gap: 8px; color: #8492a2; font-size: 10px; }
.quote-chip { border: 1px dashed #b8c6d8; border-radius: 8px; padding: 10px; color: #435a76; background: #fbfcfe; font-size: 12px; margin-top: 10px; }
.question-card { padding: 22px; }
.question-card + .question-card { margin-top: 15px; }
.question-card h2 { font-size: 17px; margin-top: 6px; }
.option-list { display: grid; gap: 8px; margin-top: 17px; }
.option { display: flex; align-items: flex-start; gap: 9px; border: 1px solid var(--line); border-radius: 9px; padding: 11px; background: #fff; cursor: pointer; font-size: 13px; color: #344b67; }
.option:hover { border-color: #a9bee0; background: #f8fbff; }
.option.selected { border-color: #7ca4df; background: #edf4ff; }
.option input { accent-color: var(--blue); margin-top: 3px; }
.question-feedback { margin-top: 15px; padding: 11px 13px; font-size: 12px; border-radius: 8px; }
.question-feedback.correct { color: #196e64; background: #e8f7f3; border: 1px solid #cbece3; }
.question-feedback.wrong { color: #795932; background: #fff8e9; border: 1px solid #f1dfb6; }
.report-form { display: grid; gap: 15px; }
.report-field { padding: 19px; }
.report-field h3 { font-size: 14px; margin-bottom: 8px; }
.report-field .field-id { color: #8694a5; font: 10px var(--mono); }
.report-field .option-list { margin-top: 12px; }
.report-summary { padding: 22px; background: #0f2543; color: #eaf2ff; border: 0; }
.report-summary p { color: #a6bddb; font-size: 12px; }
.report-summary .progress-track { background: rgba(255,255,255,.14); }
.report-summary .progress-fill { background: #70a3ed; }
.report-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 17px; }

/* Ending */
.ending-wrap { max-width: 850px; margin: 25px auto; }
.ending-card { padding: clamp(25px, 5vw, 52px); overflow: hidden; position: relative; }
.ending-card:before { content: "ARCHIVE CLOSED"; position: absolute; right: -8px; top: 26px; transform: rotate(7deg); color: #e7edf6; font: 700 35px var(--mono); letter-spacing: -.08em; }
.ending-kicker { color: var(--blue); font: 11px var(--mono); letter-spacing: .1em; }
.ending-card h1 { font-size: clamp(28px, 4vw, 43px); margin: 12px 0; letter-spacing: -.05em; }
.ending-body { font-size: 15px; line-height: 1.9; color: #2b3e56; margin-top: 25px; position: relative; z-index: 1; }
.ending-body p { margin-bottom: 19px; white-space: pre-wrap; }
.ending-stats { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; margin: 27px 0; }
.ending-stat { padding: 13px; background: #f6f8fb; border: 1px solid var(--line); border-radius: 9px; }
.ending-stat span { color: var(--muted); display: block; font-size: 10px; }
.ending-stat strong { display: block; font-size: 18px; margin-top: 4px; }

/* Mobile */
@media (max-width: 1050px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .login-grid { gap: 36px; }
}
@media (max-width: 800px) {
  .login-screen { padding: 22px; }
  .login-grid { grid-template-columns: 1fr; max-width: 520px; gap: 28px; }
  .login-copy h1 { font-size: 64px; }
  .login-lead { font-size: 15px; }
  .sidebar { position: fixed; z-index: 20; left: 0; top: 0; bottom: 0; transform: translateX(-103%); transition: transform .2s ease; box-shadow: 12px 0 30px rgba(2,11,27,.2); }
  .sidebar.open { transform: translateX(0); }
  .menu-btn { display: inline-grid; }
  .topbar { padding: 0 17px; gap: 12px; }
  .breadcrumbs { flex: 1; min-width: 0; }
  .breadcrumbs span, .top-permission { display: none; }
  .account-pill > span:not(.account-avatar):not(.chevron) { display: none; }
  .content-wrap { padding: 25px 17px 45px; }
  .document-layout { grid-template-columns: 1fr; }
  .document-list { max-height: 290px; overflow: auto; }
  .doc-reader { min-height: 0; padding: 21px 18px; }
  .page-head { flex-direction: column; }
  .page-head-actions { justify-content: flex-start; }
}
@media (max-width: 520px) {
  .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .page-head h1 { font-size: 24px; }
  .login-card { padding: 23px; }
  .login-copy h1 { font-size: 56px; }
  .hero-card h2 { font-size: 21px; }
  .terminal-input-wrap { grid-template-columns: 1fr; }
  .terminal-input-wrap .btn { width: 100%; }
  .ending-stats { grid-template-columns: 1fr; }
  .reader-actions { display: grid; }
  .reader-actions-left, .reader-actions-right { width: 100%; }
  .reader-actions .btn { flex: 1; }
}

/* A-017 archival backend skin: restrained, square, evidence-first */
:root {
  --bg: #e7e5df;
  --surface: #f8f7f2;
  --surface-muted: #efeee8;
  --line: #bfc1bc;
  --line-strong: #8f9693;
  --text: #202a2d;
  --muted: #6c7474;
  --navy: #202a2e;
  --navy-2: #2b3538;
  --blue: #3d5962;
  --blue-light: #e3e8e7;
  --teal: #3f7069;
  --amber: #986e32;
  --red: #8d4646;
  --radius: 3px;
  --shadow: 0 2px 7px rgba(29, 38, 39, .08);
}
.panel, .login-card, .case-badge, .doc-item, .list-row, .quick-action, .metric-card, .section-card, .question-card, .report-field, .clue-card, .ending-card { border-radius: 3px; box-shadow: none; }
.btn, .icon-btn, .login-input, .terminal-input, .option, .callout, .status-label, .chip, .case-icon, .avatar-placeholder { border-radius: 2px; }
.status-label, .chip { padding: 3px 7px; }
.topbar { height: 58px; background: #f5f4ef; border-bottom-color: #777f7e; }
.content-wrap { padding-top: 24px; }
.sidebar { background: #202a2e; }
.nav-item.active { background: #3f4b4e; box-shadow: inset 3px 0 0 #bd9d64; }
.nav-item:hover { background: #303b3e; }
.sidebar-brand small, .case-badge small, .save-status { color: #aeb6b3; }
.case-badge { background: #2a3538; border-color: #495558; }
.brand-mark { border-radius: 2px; }
.page-head h1, .hero-card h2, .terminal-hero h2 { letter-spacing: -.02em; }
.page-head p.record-subtitle, .record-subtitle { color: #646d6d; font-size: 12px; }
.hero-card { display: none; }
.metric-card { min-height: 86px; padding: 14px 16px; background: #f8f7f2; }
.metric-value { font-size: 24px; margin: 7px 0 0; }
.metric-caption { font-size: 10px; }
.quick-grid { margin-top: 16px; }
.quick-action { background: #f8f7f2; }
.quick-action:hover { background: #ecebe5; }
.status-dot { box-shadow: none; }
.internal-banner { min-height: 30px; padding: 7px 30px; display: flex; align-items: center; gap: 9px; background: #313a3c; color: #e9e8dd; border-bottom: 1px solid #697170; font: 11px var(--mono); letter-spacing: .02em; }
.internal-banner span { color: #c3c7bd; }
.internal-banner b { margin-left: auto; color: #d5b478; font-weight: 500; }
.warning-glyph { width: 16px; height: 16px; display: inline-grid; place-items: center; color: #262d2e; background: #d2ac66; font-weight: 800; border-radius: 1px; }
.login-input { display: block; width: 100%; padding: 10px 11px; margin: 5px 0 13px; border: 1px solid #aab1ae; background: #fbfaf6; color: var(--text); outline: 0; }
.login-input:focus { border-color: #556a70; box-shadow: 0 0 0 2px rgba(85,106,112,.12); }
.field-label { color: #586363; display: block; font: 11px var(--mono); letter-spacing: .04em; }
.login-error { color: #8d4646 !important; }
.login-screen { background: linear-gradient(145deg, #182225, #2b3435 65%, #343a37); }
.login-card { background: #f5f4ee; border-color: #8b918e; }
.login-card-head { border-bottom: 1px solid #d0d0c8; padding-bottom: 12px; }
.avatar-placeholder { background: #dfe4e1; color: #3c5055; }
.protocol-modal { width: min(560px, 100%); padding: 28px; background: #f7f6f0; border-color: #717976; }
.modal-backdrop { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 20px; background: rgba(14, 20, 21, .7); }
.protocol-kicker { color: #8d6a34; font: 11px var(--mono); letter-spacing: .1em; border-bottom: 1px solid #c7b990; padding-bottom: 10px; margin-bottom: 15px; }
.protocol-modal h2 { font-size: 20px; margin-bottom: 10px; }
.protocol-modal p, .protocol-modal li { color: #545e5d; font-size: 13px; }
.protocol-modal ol { margin: 14px 0; padding-left: 22px; }
.protocol-warning { display: flex; align-items: center; gap: 8px; border: 1px solid #d3bd91; background: #f4ecd9; color: #765d32; padding: 9px 10px; font-size: 12px; }
.protocol-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 21px; }
.case-register { padding: 19px 21px; background: #f7f6f0; border-left: 4px solid #67726f; }
.register-head { display: flex; justify-content: space-between; gap: 18px; align-items: flex-start; }
.register-head h2 { font-size: 20px; margin-top: 6px; }
.register-seal { min-width: 58px; padding: 7px 9px; text-align: center; border: 1px solid #a88d5e; color: #8b6b32; font: 12px var(--mono); line-height: 1.25; }
.register-seal span { font-size: 10px; }
.register-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; margin-top: 18px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.register-grid > div { padding: 11px 10px; border-right: 1px solid var(--line); }
.register-grid > div:last-child { border-right: 0; }
.register-grid span, .audit-table span { display: block; color: #707a79; font-size: 10px; }
.register-grid strong, .audit-table b { display: block; color: #2d393c; font-size: 12px; margin-top: 4px; font-weight: 600; }
.register-note { display: flex; align-items: center; gap: 8px; margin-top: 14px; color: #515d5c; font-size: 12px; }
.register-note .text-btn { margin-left: auto; }
.audit-table { display: grid; grid-template-columns: repeat(2,1fr); gap: 0; border-top: 1px solid var(--line); margin-bottom: 14px; }
.audit-table > div { padding: 10px 9px; border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); }
.audit-table > div:nth-child(even) { border-right: 0; }
.reader-head h2 { font-size: 20px; }
.doc-body { font-family: "Noto Serif SC", "Songti SC", serif; color: #323d3e; font-size: 14px; }
.doc-body .log-line { font-family: var(--mono); background: #eeede7; border-left-color: #8a9692; }
.document-list { background: #f0efe9; }
.doc-item.selected { background: #dfe6e3; border-color: #aebbb7; }
.doc-item:hover { background: #e8e7e0; }
.attachment-caption { background: #efeee8; }
.empty-state { background: #efeee8; border-color: #aeb5b1; border-radius: 2px; }
.corrupt-banner { border-radius: 2px; }
.clue-card .quote-chip { border-radius: 2px; background: #efeee8; }
.question-card h2 { font-size: 16px; }
.question-feedback { border-radius: 2px; }
.report-summary { background: #2d393c; }
.ending-card:before { font-size: 27px; }

@media (max-width: 800px) {
  .internal-banner { padding: 7px 15px; font-size: 10px; flex-wrap: wrap; }
  .internal-banner span { display: none; }
  .internal-banner b { margin-left: auto; }
  .register-grid { grid-template-columns: repeat(2, 1fr); }
  .register-grid > div:nth-child(2) { border-right: 0; }
  .register-note { align-items: flex-start; flex-wrap: wrap; }
  .register-note .text-btn { margin-left: 24px; }
}
