@charset "UTF-8";
/* Battery Studio / CAU — independent research interface */

:root {
  color-scheme: light;
  --bg: #f4f5f6;
  --surface: #ffffff;
  --panel: #eff1f3;
  --text: #1d2730;
  --muted: #666b6f;
  --line: #e0e3e5;
  --green: #263c4f;
  --mint: #e7ebef;
  --orange: #c77d42;
  --red: #b34545;
  --shadow: 0 8px 32px rgba(26, 54, 42, .035);
  --sidebar-width: 218px;
  --radius: 18px;
  --rotation: -16deg;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }
html { min-width: 320px; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font-size: 14px; line-height: 1.65; }
body[data-theme="dark"] {
  color-scheme: dark;
  --bg: #13171b;
  --surface: #1d2226;
  --panel: #252b31;
  --text: #e8ebed;
  --muted: #a3a8ac;
  --line: #383e43;
  --green: #afbecc;
  --mint: #2e373e;
  --orange: #e4ae7b;
  --red: #f39d98;
  --shadow: 0 8px 32px rgba(0, 0, 0, .07);
}
button, input, textarea, select { font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .48; }
button, input, select, textarea { transition: border-color .18s, box-shadow .18s, background .18s, color .18s, transform .18s; }
button { color: inherit; }
a { color: var(--green); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
button:focus-visible, a:focus-visible, summary:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 3px solid #8ea1b2; outline-offset: 4px; }
input:focus, textarea:focus, select:focus { border-color: var(--green); box-shadow: 0 0 0 3px color-mix(in srgb, var(--green) 9%, transparent); outline: none; }
::selection { color: var(--text); background: #d1d9e0; }
h1, h2, h3, h4, p { margin-top: 0; }
svg { vertical-align: middle; }
button svg, .nav-item svg, .brand svg { width: 18px; height: 18px; flex-shrink: 0; }
hr { height: 1px; border: none; background: var(--line); margin: 24px 0; }
code, pre { font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; }
code { font-size: .88em; background: var(--panel); border-radius: 4px; padding: 2px 5px; }

.app-shell { display: flex; min-height: 100vh; }
.sidebar { position: fixed; z-index: 40; inset: 0 auto 0 0; width: var(--sidebar-width); display: flex; flex-direction: column; padding: 31px 20px 20px; border-right: 1px solid var(--line); background: #eceef0; }
body[data-theme="dark"] .sidebar { background: #191e22; }
.brand { display: flex; align-items: center; gap: 11px; margin: 0 5px 43px; color: var(--text); text-decoration: none; line-height: 1.15; font-size: 20px; font-weight: 800; letter-spacing: -.7px; }
.brand small { display: block; margin-top: 5px; font-size: 9px; font-weight: 500; letter-spacing: 1.7px; text-transform: uppercase; color: var(--muted); }
.brand-mark { display: grid; place-items: center; width: 38px; height: 42px; border-radius: 11px; background: #263c4f; color: #cdd9e4; flex-shrink: 0; }
.brand-mark svg { width: 22px; height: 22px; }
.nav-label { display: block; margin: 0 13px 11px; color: var(--muted); font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 1.65px; }
.nav-label:not(:first-of-type) { margin-top: 32px; }
.nav-item { width: 100%; min-height: 44px; display: flex; align-items: center; gap: 12px; padding: 10px 13px; margin: 4px 0; border: 1px solid transparent; border-radius: 9px; background: transparent; color: #6c7074; text-align: left; text-decoration: none; font-size: 12px; font-weight: 600; }
.nav-item:hover { background: rgba(255, 255, 255, .55); color: var(--text); }
.nav-item.active { background: #263c4f; color: #f7f9fb; box-shadow: 0 3px 6px rgba(24, 93, 75, .08); }
.nav-item.active svg { color: #b2c4d3; }
.nav-item .pill { margin-left: auto; }
.sidebar-bottom { margin-top: auto; padding-top: 35px; }
.sidebar-bottom > .notice { border-color: #d8dce0; background: #e2e6ea; font-size: 11px; }
.sidebar-bottom .nav-item { font-size: 11px; }
.sidebar-bottom .tiny { padding: 8px 12px 0; }
body[data-theme="dark"] .nav-item { color: var(--muted); }
body[data-theme="dark"] .nav-item.active { color: #ebeff3; background: #364857; }
body[data-theme="dark"] .nav-item:hover { background: #30363b; }
body[data-theme="dark"] .sidebar-bottom > .notice { background: #262e35; border-color: var(--line); }
.workspace { flex: 1; min-width: 0; margin-left: var(--sidebar-width); }
.topbar { min-height: 76px; padding: 18px 37px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 60%, var(--bg)); }
.breadcrumb { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 11px; }
.breadcrumb strong { color: var(--text); font-weight: 500; }
.breadcrumb svg { width: 15px; height: 15px; }
.toolbar { display: flex; align-items: center; gap: 9px; }
.toolbar > .pill { margin-right: 7px; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; min-width: 34px; min-height: 34px; gap: 5px; padding: 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--muted); font-size: 11px; line-height: 1; }
.icon-btn:hover { color: var(--text); border-color: var(--green); background: var(--panel); }
.icon-btn svg { width: 16px; height: 16px; }
.btn { min-height: 42px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; padding: 10px 18px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); color: var(--text); font-size: 12px; font-weight: 650; text-decoration: none; line-height: 1.45; white-space: nowrap; }
.btn:hover:not(:disabled) { border-color: var(--green); background: var(--panel); transform: translateY(-1px); }
.btn.primary { background: #263c4f; color: #fff; border-color: #263c4f; }
.btn.primary:hover:not(:disabled) { background: #1e303f; border-color: #1e303f; box-shadow: 0 4px 10px rgba(24, 93, 75, .14); }
.btn.primary svg { color: #c7d5e1; }
.btn.secondary { background: transparent; }
.btn.small { min-height: 33px; padding: 7px 11px; font-size: 11px; border-radius: 7px; gap: 6px; }
.btn.danger { color: var(--red); border-color: color-mix(in srgb, var(--red) 28%, var(--line)); }
.btn.danger:hover { background: color-mix(in srgb, var(--red) 8%, var(--surface)); }
.pill { display: inline-flex; align-items: center; justify-content: center; gap: 5px; width: fit-content; border: 1px solid var(--line); border-radius: 5px; padding: 3px 7px; color: var(--muted); font-size: 9px; font-weight: 600; line-height: 1.5; white-space: nowrap; letter-spacing: .1px; }
.pill.green { background: #eaeef1; color: #56626d; border-color: #d9dfe5; }
.pill.amber { color: #956334; background: #faf1e4; border-color: #ecddc8; }
.pill.red { color: #9b4242; background: #fbefec; border-color: #f0d6d3; }
body[data-theme="dark"] .pill.green { background: #30383f; color: #aabbc9; border-color: #414b53; }
body[data-theme="dark"] .pill.amber { background: #453a29; color: #e2c295; border-color: #615135; }
body[data-theme="dark"] .pill.red { background: #4b302b; color: #f0b6a7; border-color: #65453c; }
.content { max-width: 1580px; padding: 31px 37px 25px; margin: 0 auto; }
.page-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 29px; }
.eyebrow { display: flex; align-items: center; gap: 8px; color: #72787e; font-size: 10px; font-weight: 650; letter-spacing: 1.8px; text-transform: uppercase; margin-bottom: 10px; }
.eyebrow::before { content: ""; width: 17px; height: 1px; background: #8896a2; }
.page-title { font-size: clamp(27px, 2.65vw, 40px); line-height: 1.22; letter-spacing: -1.8px; font-weight: 650; margin-bottom: 11px; }
.page-title em { font-family: Georgia, "Times New Roman", serif; font-weight: 400; font-style: italic; color: var(--green); }
.page-subtitle { margin: 0; max-width: 700px; color: var(--muted); font-size: 12px; line-height: 1.8; word-break: keep-all; }
.mode-switch { display: inline-flex; flex-shrink: 0; align-items: center; gap: 3px; border: 1px solid var(--line); background: #eaecee; border-radius: 9px; padding: 4px; }
.mode-switch button { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 33px; background: none; border: 1px solid transparent; border-radius: 6px; color: var(--muted); padding: 6px 12px; font-size: 11px; font-weight: 600; white-space: nowrap; }
.mode-switch button.active { color: var(--text); background: var(--surface); border-color: var(--line); box-shadow: 0 1px 3px rgba(30, 50, 30, .04); }
.mode-switch button svg { width: 13px; height: 13px; }
body[data-theme="dark"] .mode-switch { background: var(--panel); }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(325px, 1fr); gap: 22px; align-items: start; }
.panel { min-width: 0; border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 20px 23px 17px; }
.panel-title { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 0; font-size: 13px; line-height: 1.5; font-weight: 650; letter-spacing: -.25px; }
.panel-title svg { width: 16px; height: 16px; color: var(--green); }
.panel-head .tiny { margin-top: 3px; }
.muted { color: var(--muted); }
.tiny { font-size: 10px; line-height: 1.7; }
.row { display: flex; align-items: center; gap: 10px; }
.row.between { justify-content: space-between; }
.row.wrap { flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.grid-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.section-label { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; color: var(--muted); font-size: 10px; font-weight: 650; letter-spacing: 1px; text-transform: uppercase; }
.section-label > span { flex: 1; }
.section-label > strong { color: var(--text); font-weight: 500; }
.link { color: var(--green); border: 0; background: none; text-decoration: none; font-size: 11px; font-weight: 600; padding: 0; }
.link:hover { text-decoration: underline; }

.assistant-panel { position: relative; padding: 23px; }
.assistant-panel > .panel-head { padding: 0 0 20px; }
.assistant-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 17px; }
.assistant-heading h2 { display: flex; align-items: center; gap: 9px; margin: 0; font-size: 14px; letter-spacing: -.35px; }
.assistant-heading .tiny { color: var(--muted); }
.tool-emblem { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: var(--mint); color: var(--green); font-size: 17px; }
.tool-emblem svg { width: 17px; height: 17px; }
.prompt-box { background: #f6f7f8; border: 1px solid #d9dde1; border-radius: 12px; overflow: hidden; }
.prompt-box:focus-within { border-color: #909ca6; box-shadow: 0 0 0 3px rgba(114, 155, 114, .08); }
.prompt-box textarea { display: block; width: 100%; min-height: 106px; max-height: 240px; padding: 17px 17px 9px; background: transparent; border: 0; border-radius: 0; resize: vertical; color: var(--text); font-size: 13px; line-height: 1.85; }
.prompt-box textarea:focus { box-shadow: none; outline: none; }
.prompt-box textarea::placeholder { color: #95999d; }
.prompt-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px 12px 17px; }
.prompt-footer .tiny { color: var(--muted); font-size: 9px; }
.prompt-footer .btn { min-height: 34px; font-size: 11px; padding: 8px 12px; }
.prompt-footer .btn svg { width: 13px; height: 13px; }
body[data-theme="dark"] .prompt-box { background: #1d2328; border-color: #40464c; }
.suggestions { display: flex; flex-wrap: wrap; gap: 6px; margin: 13px 0 0; }
.suggestion { background: var(--surface); border: 1px solid var(--line); color: #73797e; border-radius: 6px; padding: 6px 9px; font-size: 10px; line-height: 1.5; text-align: left; }
.suggestion:hover { border-color: #94a2ae; color: var(--green); background: var(--panel); }
.suggestion::before { content: "↗"; padding-right: 6px; color: #999fa5; }
body[data-theme="dark"] .suggestion { color: var(--muted); }
.assistant-answer { padding: 15px 16px; border: 1px solid #d9dfe5; background: #eff2f4; border-radius: 10px; font-size: 12px; line-height: 1.85; margin-top: 17px; word-break: keep-all; }
.assistant-answer strong { color: var(--green); }
.assistant-answer p:last-child { margin-bottom: 0; }
body[data-theme="dark"] .assistant-answer { background: #293138; border-color: #414950; }
.notice { display: flex; align-items: flex-start; gap: 9px; padding: 12px 14px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel); color: var(--muted); font-size: 11px; line-height: 1.8; word-break: keep-all; }
.notice svg { width: 15px; height: 15px; flex-shrink: 0; margin-top: 2px; }
.notice p { margin: 0; }
.notice.warning { background: #fbf5e9; border-color: #eee3c9; color: #94754c; }
.notice.error { background: #fcf1ef; border-color: #f0d9d5; color: #ac5450; }
.notice.success { background: #eff2f5; border-color: #d7dfe6; color: #546371; }
body[data-theme="dark"] .notice.warning { background: #3b3323; border-color: #594a30; color: #d8bf95; }
body[data-theme="dark"] .notice.error { background: #402c28; border-color: #66423b; color: #f1b6a8; }
body[data-theme="dark"] .notice.success { background: #293138; border-color: #424b53; color: #a9b9c7; }
.assistant-panel > .notice { margin-top: 17px; }
.stepper { display: flex; gap: 6px; align-items: center; padding: 17px 0 20px; margin: 0 23px; border-bottom: 1px solid var(--line); }
.step { flex: 1; display: flex; align-items: center; gap: 7px; position: relative; color: #9ea1a4; font-size: 10px; font-weight: 500; white-space: nowrap; }
.step:not(:last-child)::after { content: ""; display: block; height: 1px; flex: 1; margin: 0 3px; background: var(--line); }
.step-dot { display: inline-grid; place-items: center; flex-shrink: 0; width: 20px; height: 20px; background: #edf0f2; border: 1px solid var(--line); color: #92989d; font-size: 9px; border-radius: 50%; }
.step.active { color: var(--green); font-weight: 650; }
.step.active .step-dot { color: #fff; background: #263c4f; border-color: #263c4f; box-shadow: 0 0 0 4px #e9edf1; }
.step.done { color: var(--green); }
.step.done .step-dot { background: #e3e8ed; border-color: #ced8e0; color: #4c5f70; }
body[data-theme="dark"] .step-dot { background: var(--panel); border-color: var(--line); color: var(--muted); }
body[data-theme="dark"] .step.active .step-dot { box-shadow: 0 0 0 4px #2f353b; }
body[data-theme="dark"] .step.done .step-dot { background: #303940; color: #a8b9c8; border-color: #47535d; }

.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 17px 16px; }
.field { min-width: 0; }
.field label { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 11px; font-weight: 600; margin-bottom: 7px; }
.field label .help { margin: 0; font-weight: 400; }
.field input, .field select, .field textarea, input[type="search"] { display: block; width: 100%; min-height: 39px; border: 1px solid var(--line); background: var(--surface); color: var(--text); border-radius: 7px; padding: 9px 11px; font-size: 12px; line-height: 1.5; }
.field select { padding-right: 28px; }
.field textarea { min-height: 86px; resize: vertical; }
.field input[aria-invalid="true"], .field select[aria-invalid="true"] { border-color: var(--red); box-shadow: 0 0 0 2px color-mix(in srgb, var(--red) 8%, transparent); }
.field input:disabled, .field select:disabled { background: var(--panel); color: var(--muted); }
.field input[type="range"] { padding: 0; border: 0; min-height: 25px; background: transparent; accent-color: #263c4f; }
.field input[type="checkbox"], .field input[type="radio"] { display: inline-block; width: 15px; min-height: 15px; margin: 0 7px 0 0; vertical-align: middle; accent-color: #263c4f; }
.field input[type="file"] { padding: 8px; font-size: 10px; }
input[type="file"]::file-selector-button { border: 0; border-radius: 4px; background: var(--mint); color: var(--green); padding: 5px 8px; margin-right: 8px; font: inherit; cursor: pointer; }
.help { display: block; margin-top: 6px; color: var(--muted); font-size: 9px; line-height: 1.7; word-break: keep-all; }
.help.error { color: var(--red); }
.scenario-list { display: flex; flex-wrap: wrap; gap: 7px; }
.scenario-chip { display: inline-flex; align-items: center; gap: 7px; background: #edf0f3; border: 1px solid #dae0e6; color: #535f69; border-radius: 5px; padding: 7px 10px; font-size: 10px; }
.scenario-chip:nth-child(2) { background: #f7f0e7; border-color: #eddfcc; color: #9a744a; }
.scenario-chip:nth-child(3) { background: #edf2f7; border-color: #dce5ee; color: #6382a0; }
.scenario-chip button { border: 0; background: none; padding: 0 0 0 3px; font-size: 13px; color: inherit; }
body[data-theme="dark"] .scenario-chip { background: #2c333a; border-color: #3f484f; color: #b0bbc4; }
body[data-theme="dark"] .scenario-chip:nth-child(2) { background: #423829; border-color: #584a33; color: #dbbf92; }
body[data-theme="dark"] .scenario-chip:nth-child(3) { background: #293745; border-color: #3a4f61; color: #a2bed7; }
.validation-list { display: grid; gap: 7px; padding: 12px 0; }
.check-row { display: flex; align-items: flex-start; gap: 7px; color: #707980; font-size: 10px; }
.check-row svg { width: 13px; height: 13px; flex-shrink: 0; margin-top: 2px; color: #697c8c; }
.check-row.error { color: var(--red); }
.check-row.error svg { color: var(--red); }
.config-summary { padding: 19px 23px 23px; }
.config-summary > .field-grid { margin-bottom: 18px; }
.config-summary .section-label { margin-top: 19px; }
.config-summary .section-label:first-child { margin-top: 0; }
.config-summary > .row:last-child { margin-top: 15px; }
.summary-item { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 11px; }
.summary-item:last-child { border-bottom: none; }
.summary-item > :first-child { color: var(--muted); }
.summary-item strong { font-weight: 600; text-align: right; }

.battery-panel { background: var(--surface); }
.battery-panel .panel-head { padding-bottom: 9px; }
.battery-stage { position: relative; min-height: 295px; overflow: hidden; display: flex; align-items: center; justify-content: center; isolation: isolate; background: radial-gradient(ellipse at 52% 58%, #dee4e9 0%, #f1f4f7 46%, #fff 75%); }
.battery-stage::before { content: ""; z-index: -1; position: absolute; width: 310px; height: 165px; top: 90px; left: calc(50% - 155px); border: 1px solid #d2d9e0; border-radius: 50%; transform: rotate(-24deg); opacity: .75; }
.battery-stage::after { content: ""; z-index: -1; position: absolute; width: 360px; height: 215px; top: 65px; left: calc(50% - 180px); border: 1px solid #e1e6ea; border-radius: 50%; transform: rotate(-24deg); }
.battery-scene { position: relative; width: 245px; height: 225px; transform: rotate(var(--rotation)); transition: transform .6s ease; transform-style: preserve-3d; margin: 10px 0 0; }
.cell { position: absolute; width: 84px; height: 195px; border-radius: 43px / 17px; filter: drop-shadow(13px 13px 9px rgba(57, 75, 42, .14)); }
.cell-a { left: 27px; top: 23px; z-index: 3; }
.cell-b { left: 103px; top: 0; z-index: 2; transform: rotate(8deg); }
.cell-c { left: 168px; top: 27px; z-index: 1; transform: rotate(15deg); }
.cell-body { position: absolute; inset: 12px 0 12px; overflow: hidden; background: linear-gradient(90deg, #223443 0%, #55636f 15%, #7f8c98 39%, #727f8b 52%, #435260 78%, #2d3b48 100%); border-radius: 1px 1px 42px 42px / 1px 1px 15px 15px; box-shadow: inset -2px 0 2px rgba(0, 0, 0, .11), inset 3px 0 3px rgba(255, 255, 255, .15); }
.cell-body::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent 0 25%, rgba(255,255,255,.1) 26%, transparent 29% 73%, rgba(0,0,0,.035) 75%, transparent 79%); }
.cell-top { position: absolute; z-index: 4; top: 0; left: 0; width: 84px; height: 28px; border-radius: 50%; background: linear-gradient(175deg, #ebeef0 0%, #a5abb0 40%, #d6dade 65%, #70767b 100%); border: 1px solid #98a1a8; box-shadow: 0 2px 0 #3c4a56; }
.cell-top::after { content: ""; position: absolute; width: 39px; height: 13px; left: 22px; top: 6px; border-radius: 50%; background: linear-gradient(155deg, #e9edf1, #969fa7); border: 1px solid #9fa7ae; box-shadow: 0 2px 1px rgba(20,40,10,.16); }
.cell-bottom { position: absolute; z-index: 2; bottom: 0; left: 0; width: 84px; height: 27px; border-radius: 50%; background: linear-gradient(90deg, #323b42, #737d86 40%, #373f46); box-shadow: 0 -3px 0 #54626e; }
.cell-core { position: absolute; z-index: 3; left: 9px; right: 9px; top: 30px; bottom: 18px; background: repeating-linear-gradient(90deg, #a68350 0px, #d2b67a 3px, #8e6b3b 4px, #dcca94 6px); border-radius: 32px / 10px; opacity: .7; }
.cell-c .cell-body { background: linear-gradient(90deg, #826645, #dfc394 34%, #c2a677 56%, #9b7d50 85%, #705332); }
.cell-c .cell-top { background: linear-gradient(170deg, #f1e2c1, #c4ad83 55%, #a78e66); border-color: #baa17a; box-shadow: 0 2px 0 #9b825a; }
.cell-c .cell-bottom { background: linear-gradient(90deg, #756448, #baa981 45%, #8a7856); box-shadow: 0 -3px 0 #a98f5f; }
.cell-b .cell-body { background: linear-gradient(90deg, #485662, #93a2b0 36%, #8b9aa7 55%, #596774 90%); }
.cell-label { position: absolute; z-index: 5; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 3px; inset: 51px 4px 30px; color: #e4ebf2; font-size: 11px; font-weight: 750; letter-spacing: 1.5px; line-height: 1.4; text-align: center; text-shadow: 0 1px 1px rgba(0,0,0,.15); writing-mode: vertical-rl; transform: rotate(180deg); }
.cell-label span { font-size: 8px; font-weight: 400; letter-spacing: 1.4px; opacity: .7; }
.cell-label small { font-size: 6px; font-weight: 400; letter-spacing: 1.4px; opacity: .7; }
.battery-legend { display: flex; justify-content: center; gap: 18px; flex-wrap: wrap; padding: 0 20px 18px; color: var(--muted); font-size: 9px; }
.battery-legend > span, .chart-legend > span { display: inline-flex; align-items: center; gap: 6px; }
.legend-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #546472; flex-shrink: 0; }
.legend-dot.orange { background: #c28b50; }
.legend-dot.blue { background: #739cb3; }
.legend-dot.mint { background: #8ca0b1; }
.model-controls { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line); margin: 0 23px; padding: 13px 0 15px; }
.model-controls label { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 10px; }
.model-controls input[type="range"] { width: 85px; height: 3px; accent-color: #586b7b; }
.model-controls .icon-btn { min-width: 27px; min-height: 27px; padding: 6px; border-radius: 6px; }
.model-controls .icon-btn svg { width: 13px; height: 13px; }
body[data-theme="dark"] .battery-stage { background: radial-gradient(ellipse at 52% 58%, #343b41 0%, #22282d 46%, #1d2226 75%); }
body[data-theme="dark"] .battery-stage::before { border-color: #3a444d; }
body[data-theme="dark"] .battery-stage::after { border-color: #2f383f; }
.metric-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.metric { padding: 17px 15px 16px; text-align: center; min-width: 0; }
.metric + .metric { border-left: 1px solid var(--line); }
.metric-value { display: block; font-size: 22px; font-weight: 600; line-height: 1.2; letter-spacing: -.8px; font-variant-numeric: tabular-nums; }
.metric-value small { font-size: 10px; font-weight: 400; color: var(--muted); margin-left: 3px; letter-spacing: 0; }
.metric-label { display: block; color: var(--muted); font-size: 9px; margin-top: 6px; }

.chart-panel { margin-top: 22px; }
.chart-panel .panel-head { padding-bottom: 12px; }
.chart-panel .panel-head .row { gap: 7px; }
.chart-tabs { display: flex; align-items: center; gap: 20px; border-bottom: 1px solid var(--line); padding: 0 23px; overflow-x: auto; scrollbar-width: thin; }
.chart-tabs button { background: none; border: 0; border-bottom: 2px solid transparent; padding: 10px 0 11px; margin-bottom: -1px; color: var(--muted); font-size: 10px; white-space: nowrap; }
.chart-tabs button.active { color: var(--green); border-bottom-color: var(--green); font-weight: 650; }
.chart-wrap { position: relative; padding: 20px 20px 3px; min-height: 245px; }
.chart-wrap svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart-wrap svg text { font-family: inherit; font-size: 10px; }
.chart-wrap svg .axis-label { font-size: 9px; }
.chart-wrap svg .grid-line, .chart-wrap svg .chart-grid { stroke: var(--line); stroke-width: 1; stroke-dasharray: 3 5; }
.chart-wrap svg .axis-line { stroke: var(--line); }
.chart-wrap svg .chart-line { fill: none; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.chart-legend { display: flex; justify-content: center; gap: 20px; flex-wrap: wrap; padding: 6px 20px 18px; font-size: 10px; color: var(--muted); }
.chart-empty { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 9px; min-height: 230px; color: var(--muted); font-size: 12px; text-align: center; padding: 25px; background: linear-gradient(transparent 97%, var(--line) 97%) 0 0 / 100% 45px; }
.chart-empty svg { width: 29px; height: 29px; opacity: .5; }
.chart-empty p { margin: 0; max-width: 330px; }
.chart-empty strong { color: var(--text); font-size: 13px; font-weight: 500; }
.insight { display: flex; align-items: flex-start; gap: 10px; background: #f0f3f6; border-top: 1px solid var(--line); padding: 14px 23px; color: #71777d; font-size: 10px; line-height: 1.9; }
.insight svg { flex-shrink: 0; width: 15px; height: 15px; margin-top: 3px; color: #808f9d; }
.insight strong { color: #4c5760; font-weight: 650; }
.insight p { margin: 0; }
body[data-theme="dark"] .insight { background: #252b31; color: var(--muted); }
body[data-theme="dark"] .insight strong { color: #b3bfc9; }
.workspace-tabs { display: flex; align-items: center; gap: 25px; overflow-x: auto; padding: 0 3px; border-bottom: 1px solid var(--line); margin-bottom: 22px; }
.tab-btn { padding: 13px 0; background: none; border: 0; border-bottom: 2px solid transparent; color: var(--muted); font-size: 12px; font-weight: 500; white-space: nowrap; }
.tab-btn.active { color: var(--green); border-bottom-color: var(--green); }
.expert-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; align-items: start; }
.expert-section { padding: 22px; }
.expert-section > .panel-head { padding: 0 0 20px; }
.expert-section > h3 { margin: 0 0 19px; font-size: 13px; }
.expert-section > p { color: var(--muted); font-size: 11px; }
.expert-section .field-grid + .field-grid { margin-top: 18px; }
details { border: 1px solid var(--line); border-radius: 9px; background: var(--surface); margin-top: 13px; overflow: hidden; }
summary { padding: 13px 15px; font-size: 11px; font-weight: 600; cursor: pointer; list-style-position: inside; }
details[open] > summary { border-bottom: 1px solid var(--line); margin-bottom: 14px; }
details > .field-grid, details > .code-editor, details > .notice { margin: 0 15px 15px; }
.code-editor { display: block; width: 100%; min-height: 210px; resize: vertical; border: 1px solid var(--line); border-radius: 8px; background: #f1f3f5; padding: 14px; color: #4d5760; font-family: "SFMono-Regular", Consolas, monospace; font-size: 10px; line-height: 1.8; white-space: pre; overflow: auto; tab-size: 2; }
body[data-theme="dark"] .code-editor { background: #161b20; color: #b4c0ca; }
.table-wrap { max-width: 100%; overflow: auto; }
.data-table { border-collapse: collapse; width: 100%; text-align: left; font-size: 11px; white-space: nowrap; }
.data-table th { padding: 11px 15px; border-bottom: 1px solid var(--line); color: var(--muted); background: var(--panel); font-size: 10px; font-weight: 550; }
.data-table td { padding: 13px 15px; border-bottom: 1px solid var(--line); }
.data-table tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover td { background: color-mix(in srgb, var(--panel) 55%, var(--surface)); }
.data-table td input { width: 100px; border: 1px solid var(--line); border-radius: 5px; padding: 6px; background: var(--surface); color: var(--text); }
.record-list { padding: 0 23px 10px; }
.record { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.record:last-child { border-bottom: none; }
.record-main { min-width: 0; }
.record-main h3, .record-main strong { margin: 0 0 5px; font-size: 12px; font-weight: 600; display: block; }
.record-main p { color: var(--muted); margin: 0; font-size: 10px; }
.record-main .pill { margin-top: 8px; }
.record-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.record-actions .btn { font-size: 10px; }
.dialog-backdrop { position: fixed; z-index: 200; inset: 0; display: flex; align-items: center; justify-content: center; padding: 24px; background: rgba(15, 32, 24, .35); backdrop-filter: blur(5px); }
dialog { width: min(590px, calc(100vw - 40px)); max-height: calc(100dvh - 48px); overflow-y: auto; border: 1px solid var(--line); border-radius: 18px; padding: 0; color: var(--text); background: var(--surface); box-shadow: 0 22px 80px rgba(16, 37, 23, .18); }
dialog::backdrop { background: rgba(15, 32, 24, .35); backdrop-filter: blur(5px); }
.dialog-backdrop dialog { position: relative; margin: 0; display: block; }
.modal-head { display: flex; justify-content: space-between; align-items: center; gap: 15px; padding: 22px 25px 17px; border-bottom: 1px solid var(--line); }
.modal-head h2 { margin: 0; font-size: 18px; letter-spacing: -.5px; }
.modal-body { padding: 21px 25px; font-size: 12px; }
.modal-body > .notice { margin-bottom: 17px; }
.modal-body .field-grid { margin: 17px 0; }
.modal-body .summary-item { padding: 10px 0; }
.modal-footer { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 9px; padding: 16px 25px 21px; border-top: 1px solid var(--line); }
.progress-track { height: 5px; background: var(--line); border-radius: 99px; overflow: hidden; }
.progress-fill { height: 100%; background: #657889; border-radius: inherit; transition: width .3s ease; }
.status-line { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 0; color: var(--muted); font-size: 10px; }
.status-line strong { color: var(--green); font-weight: 600; }
.integration-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.integration-card { border: 1px solid var(--line); border-radius: 13px; padding: 22px; background: var(--surface); }
.integration-card h3 { font-size: 14px; font-weight: 650; margin: 14px 0 9px; }
.integration-card > svg { color: var(--green); width: 24px; height: 24px; }
.integration-card p { font-size: 11px; color: var(--muted); line-height: 1.9; }
.integration-card .btn { margin-top: 10px; }
.integration-card .pill { display: flex; }
.footer-note { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 20px; margin-top: 24px; color: #919599; font-size: 9px; line-height: 1.75; }
.footer-note a { color: inherit; text-decoration: none; }
.footer-note a:hover { color: var(--green); }
.mobile-nav { display: none; }
.visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }
.toast { position: fixed; z-index: 300; bottom: 28px; left: calc(50% + var(--sidebar-width) / 2); transform: translateX(-50%); max-width: min(490px, calc(100vw - 40px)); padding: 12px 20px; background: #23313d; color: #eef3f7; border: 1px solid #4f5961; box-shadow: 0 7px 25px rgba(20, 40, 20, .2); border-radius: 10px; font-size: 12px; line-height: 1.7; animation: toast-in .25s ease; }
.fullscreen-mode .sidebar, .fullscreen-mode .topbar, .fullscreen-mode .footer-note { display: none; }
.fullscreen-mode .workspace { margin-left: 0; }
.fullscreen-mode .content { max-width: 1800px; }
.fullscreen-mode .toast { left: 50%; }
.fullscreen-mode .chart-wrap { min-height: 360px; }
.hide, [hidden] { display: none !important; }

@keyframes toast-in { from { opacity: 0; translate: 0 8px; } to { opacity: 1; translate: 0 0; } }
@keyframes gentle-pulse { 0%,100% { opacity: .5; } 50% { opacity: 1; } }
.is-running .step.active .step-dot { animation: gentle-pulse 1.5s ease infinite; }

@media (min-width: 1600px) {
  :root { --sidebar-width: 235px; }
  .sidebar { padding-left: 24px; padding-right: 24px; }
  .content { padding-left: 45px; padding-right: 45px; padding-top: 38px; }
  .topbar { padding-left: 45px; padding-right: 45px; }
  .dashboard-grid { gap: 26px; }
  .battery-stage { min-height: 320px; }
  .panel-head { padding-top: 23px; }
}
@media (max-width: 1100px) {
  :root { --sidebar-width: 186px; }
  .sidebar { padding: 27px 13px 18px; }
  .brand { font-size: 18px; gap: 9px; margin-bottom: 36px; }
  .brand-mark { width: 34px; height: 37px; }
  .brand small { font-size: 7px; letter-spacing: 1.5px; }
  .nav-item { padding-left: 10px; gap: 9px; font-size: 11px; }
  .content { padding: 25px 23px; }
  .topbar { padding: 15px 23px; min-height: 68px; }
  .dashboard-grid { grid-template-columns: minmax(0, 1.35fr) minmax(285px, 1fr); gap: 17px; }
  .page-header { align-items: flex-start; gap: 15px; }
  .page-title { font-size: 29px; letter-spacing: -1.3px; }
  .page-subtitle { font-size: 11px; }
  .mode-switch button { padding: 5px 9px; font-size: 10px; }
  .assistant-panel { padding: 18px; }
  .panel-head { padding: 18px 18px 15px; }
  .config-summary { padding: 17px 18px 19px; }
  .stepper { margin: 0 18px; gap: 4px; }
  .step { gap: 5px; font-size: 9px; }
  .step-dot { width: 17px; height: 17px; font-size: 8px; }
  .battery-stage { min-height: 278px; }
  .battery-scene { scale: .88; }
  .battery-legend { gap: 12px; font-size: 8px; }
  .metric { padding-left: 8px; padding-right: 8px; }
  .metric-value { font-size: 20px; }
  .model-controls { margin: 0 18px; }
  .integration-grid { grid-template-columns: 1fr; }
  .integration-card { padding: 19px; }
  .expert-grid { gap: 17px; }
  .expert-section { padding: 18px; }
  .expert-section .field-grid { gap: 13px; }
  .record { align-items: flex-start; }
  .record-actions { flex-direction: column; }
}
@media (max-width: 900px) and (min-width: 761px) {
  :root { --sidebar-width: 72px; }
  .sidebar { padding-left: 12px; padding-right: 12px; align-items: center; }
  .brand { margin: 0 0 30px; }
  .brand > :not(.brand-mark) { display: none; }
  .sidebar nav, .sidebar-bottom { width: 100%; }
  .nav-label { font-size: 0; height: 9px; margin: 16px 0 6px; }
  .nav-item { justify-content: center; gap: 0; padding: 12px; font-size: 0; min-height: 46px; }
  .nav-item > span, .nav-item > .pill, .sidebar-bottom .notice, .sidebar-bottom .tiny { display: none; }
  .nav-item svg { width: 19px; height: 19px; }
  .sidebar-bottom .nav-item { font-size: 0; }
  .page-header { flex-wrap: wrap; align-items: center; }
  .page-header .mode-switch { margin-top: 1px; }
  .dashboard-grid { grid-template-columns: minmax(0, 1.2fr) minmax(275px, 1fr); gap: 16px; }
  .content { padding-left: 20px; padding-right: 20px; }
  .field-grid { gap: 13px 11px; }
  .field label { font-size: 10px; }
}
@media (max-width: 760px) {
  :root { --sidebar-width: 0px; --radius: 15px; }
  .sidebar { display: none; }
  .workspace { margin-left: 0; }
  .topbar { min-height: 60px; padding: 12px 20px; gap: 12px; }
  .breadcrumb { font-size: 10px; gap: 8px; }
  .toolbar { gap: 6px; }
  .toolbar > .pill { display: none; }
  .icon-btn { min-width: 32px; min-height: 32px; padding: 7px; }
  .content { padding: 26px 20px 87px; }
  .page-header { flex-wrap: wrap; align-items: center; gap: 18px; margin-bottom: 22px; }
  .page-header > :first-child { flex-basis: 100%; }
  .page-title { font-size: 32px; letter-spacing: -1.6px; }
  .page-subtitle { font-size: 12px; max-width: 580px; }
  .eyebrow { font-size: 9px; margin-bottom: 9px; }
  .mode-switch button { min-height: 35px; font-size: 11px; padding: 7px 15px; }
  .dashboard-grid { grid-template-columns: 1fr; gap: 18px; }
  .stack { gap: 18px; }
  .assistant-panel { padding: 20px; }
  .assistant-heading h2 { font-size: 14px; }
  .prompt-box textarea { min-height: 105px; font-size: 13px; }
  .suggestions { gap: 6px; }
  .suggestion { padding: 7px 9px; }
  .panel-head { padding: 19px 20px 15px; }
  .config-summary { padding: 17px 20px 20px; }
  .stepper { margin: 0 20px; padding-top: 17px; padding-bottom: 18px; }
  .step { font-size: 10px; gap: 7px; }
  .step-dot { width: 21px; height: 21px; font-size: 9px; }
  .battery-stage { min-height: 285px; }
  .battery-scene { scale: 1; }
  .battery-legend { gap: 23px; font-size: 10px; }
  .model-controls { margin: 0 20px; padding: 13px 0; }
  .metric-value { font-size: 25px; }
  .metric-label { font-size: 10px; }
  .chart-panel { margin-top: 18px; }
  .chart-tabs { padding: 0 20px; gap: 23px; }
  .chart-tabs button { font-size: 11px; }
  .chart-wrap { padding: 17px 14px 3px; min-height: 220px; }
  .chart-empty { min-height: 220px; }
  .chart-legend { padding-bottom: 15px; }
  .insight { padding: 13px 20px; font-size: 10px; }
  .expert-grid { grid-template-columns: 1fr; }
  .expert-section { padding: 20px; }
  .workspace-tabs { gap: 22px; }
  .tab-btn { font-size: 11px; }
  .record-list { padding: 0 20px 7px; }
  .record-actions { flex-direction: row; }
  .record { align-items: center; }
  .integration-grid { gap: 15px; }
  .footer-note { margin-top: 22px; font-size: 9px; }
  .mobile-nav { display: flex; align-items: stretch; justify-content: space-around; position: fixed; z-index: 80; bottom: 0; left: 0; right: 0; min-height: 65px; padding: 5px 9px max(5px, env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--surface) 95%, transparent); border-top: 1px solid var(--line); backdrop-filter: blur(15px); box-shadow: 0 -3px 15px rgba(25,50,30,.025); }
  .mobile-nav button, .mobile-nav a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; border: 0; background: none; color: var(--muted); text-decoration: none; font-size: 9px; min-height: 51px; padding: 5px; }
  .mobile-nav button.active, .mobile-nav a.active { color: var(--green); font-weight: 650; }
  .mobile-nav svg { width: 19px; height: 19px; }
  .toast { bottom: 83px; left: 50%; font-size: 11px; min-width: 230px; text-align: center; }
  .fullscreen-mode .mobile-nav { display: none; }
  .fullscreen-mode .content { padding-bottom: 25px; }
  .fullscreen-mode .chart-wrap { min-height: 260px; }
  .fullscreen-mode .toast { bottom: 24px; }
  dialog { max-height: calc(100dvh - 28px); }
  .dialog-backdrop { padding: 14px; }
  .modal-head { padding: 20px; }
  .modal-body { padding: 20px; }
  .modal-footer { padding: 15px 20px 20px; }
}
@media (max-width: 480px) {
  .topbar { padding-left: 16px; padding-right: 16px; }
  .breadcrumb { gap: 6px; max-width: 50%; }
  .breadcrumb > span:not(:last-child) { display: none; }
  .breadcrumb strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .toolbar .icon-btn { font-size: 10px; }
  .content { padding: 23px 14px 83px; }
  .page-title { font-size: 28px; letter-spacing: -1.3px; }
  .page-subtitle { font-size: 11px; line-height: 1.9; }
  .page-header { gap: 16px; }
  .assistant-panel { padding: 16px; }
  .assistant-heading { gap: 8px; margin-bottom: 14px; }
  .assistant-heading h2 { font-size: 13px; gap: 7px; }
  .assistant-heading .pill { font-size: 8px; padding: 3px 5px; }
  .tool-emblem { width: 28px; height: 28px; }
  .prompt-box textarea { padding: 14px 13px 5px; font-size: 12px; min-height: 113px; }
  .prompt-footer { padding-left: 13px; gap: 6px; }
  .prompt-footer .tiny { max-width: 50%; font-size: 8px; }
  .prompt-footer .btn { font-size: 10px; padding-left: 10px; padding-right: 10px; gap: 5px; }
  .suggestion { font-size: 9px; padding: 6px 8px; }
  .assistant-answer { font-size: 11px; padding: 13px; }
  .panel-head { padding: 17px 16px 13px; }
  .panel-title { font-size: 12px; }
  .panel-head > .row { gap: 5px; }
  .panel-head .btn.small { font-size: 9px; padding: 6px 8px; min-height: 30px; }
  .config-summary { padding: 17px 16px; }
  .stepper { margin-left: 16px; margin-right: 16px; gap: 3px; }
  .step { font-size: 9px; gap: 5px; }
  .step-dot { width: 18px; height: 18px; font-size: 8px; }
  .step:not(:last-child)::after { margin: 0 2px; }
  .field-grid { gap: 14px 10px; }
  .field label { font-size: 10px; }
  .field input, .field select, .field textarea { font-size: 12px; padding: 9px; min-height: 40px; }
  .help { font-size: 9px; }
  .config-summary > .row:last-child { flex-wrap: wrap; }
  .config-summary > .row:last-child > .btn.primary { flex: 1; }
  .notice { font-size: 10px; padding: 11px 12px; }
  .battery-stage { min-height: 265px; }
  .battery-scene { scale: .93; }
  .battery-legend { gap: 17px; font-size: 9px; }
  .model-controls { margin-left: 16px; margin-right: 16px; }
  .model-controls label { font-size: 9px; gap: 7px; }
  .metric-value { font-size: 22px; }
  .metric-value small { font-size: 9px; }
  .metric-label { font-size: 9px; }
  .chart-tabs { padding: 0 16px; gap: 20px; }
  .chart-wrap { min-height: 180px; padding-left: 9px; padding-right: 9px; }
  .chart-wrap svg text { font-size: 10px; }
  .chart-legend { gap: 15px; font-size: 9px; }
  .insight { padding-left: 16px; padding-right: 16px; }
  .expert-section { padding: 16px; }
  .grid-two { grid-template-columns: 1fr; gap: 14px; }
  .record-list { padding-left: 16px; padding-right: 16px; }
  .record { flex-wrap: wrap; gap: 10px; }
  .record-actions { width: 100%; justify-content: flex-end; }
  .record-main strong, .record-main h3 { font-size: 11px; }
  .record-main p { font-size: 9px; }
  .footer-note { font-size: 8px; line-height: 1.9; }
  .modal-head h2 { font-size: 16px; }
  .modal-head, .modal-body { padding: 17px; }
  .modal-footer { padding: 14px 17px 17px; }
  .modal-footer .btn { flex: 1; font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
@media print {
  :root, body[data-theme="dark"] { --bg: #fff; --surface: #fff; --panel: #f5f5f2; --text: #1a232a; --muted: #696d70; --line: #d7dadd; --green: #263c4f; --mint: #ebeff2; --orange: #a56d3b; --red: #a54a43; --shadow: none; }
  body { background: #fff; color: #1a232a; font-size: 10pt; }
  .sidebar, .topbar, .mobile-nav, .toolbar, .mode-switch, .suggestions, .prompt-footer, .icon-btn, .btn, .toast, .dialog-backdrop, dialog, .model-controls, .record-actions, .workspace-tabs { display: none !important; }
  .workspace { margin-left: 0; }
  .content { padding: 0; max-width: none; }
  .page-header { margin-bottom: 20px; }
  .page-title { font-size: 24pt; }
  .dashboard-grid { grid-template-columns: 1.2fr 1fr; gap: 14px; }
  .panel, .expert-section, .integration-card { box-shadow: none; break-inside: avoid; border-radius: 9px; }
  .panel { margin-bottom: 14px; }
  .assistant-panel { padding: 15px; }
  .battery-stage { min-height: 240px; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .battery-scene { scale: .8; }
  .chart-wrap svg { max-height: 250px; }
  .expert-grid, .integration-grid { grid-template-columns: 1fr 1fr; }
  .footer-note { border-top: 1px solid #ddd; padding-top: 8px; }
  .data-table { font-size: 8pt; }
  .notice, .pill, .metric-grid, .chart-wrap svg { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  a { color: #263c4f; }
}

/* Concrete component markup refinements */
.brand-sub { display: block; margin-top: 6px; color: var(--muted); font-size: 8px; font-weight: 550; letter-spacing: 1.55px; }
.brand-mark { position: relative; display: flex; align-items: center; justify-content: center; font-family: Georgia, "Times New Roman", serif; font-size: 29px; font-weight: 500; line-height: 1; }
.brand-mark > span { position: absolute; right: 5px; bottom: 9px; color: #a8bbcb; font-family: inherit; font-size: 16px; }
.live-dot { display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: #778998; box-shadow: 0 0 0 3px #e2e7ec; }
.eyebrow:has(.live-dot)::before { display: none; }
.nav-count { margin-left: auto; min-width: 19px; height: 18px; display: inline-flex; align-items: center; justify-content: center; background: #dde2e6; color: #757e85; border-radius: 5px; font-size: 9px; line-height: 1; }
.nav-item.active .nav-count { background: #405364; color: #ccd8e3; }
.sidebar nav > a.nav-item > svg:last-child { width: 12px; height: 12px; margin-left: auto; }
.sidebar-project { display: flex; align-items: flex-start; gap: 8px; border: 1px solid #d5dadf; border-radius: 9px; background: #e1e6ea; padding: 12px 10px; margin-top: 34px; font-size: 10px; color: #5f6971; line-height: 1.6; }
.sidebar-project > .legend-dot { margin-top: 5px; width: 5px; height: 5px; background: #7d8f9e; }
.sidebar-project small { display: block; margin-top: 3px; font-size: 7px; letter-spacing: .8px; color: #8e969d; }
.sidebar-bottom { display: flex; align-items: center; gap: 9px; border-top: 1px solid #d8dce0; padding-top: 18px; font-size: 10px; }
.sidebar-bottom small { display: block; color: var(--muted); font-size: 8px; margin-top: 3px; }
.small-monogram { display: grid; place-items: center; width: 31px; height: 31px; border: 1px solid #ced4da; border-radius: 50%; color: #757f88; background: #dee3e7; font-family: Georgia, serif; font-size: 10px; flex-shrink: 0; }
.content > .stepper { margin: 0 0 24px; padding: 0 0 20px; max-width: 920px; }
.step-line { display: none; }
.assistant-panel > .panel-head .assistant-heading { margin: 0; justify-content: flex-start; }
.assistant-heading .panel-title { font-size: 13px; }
.assistant-heading .tiny { display: block; margin-top: 3px; font-size: 9px; }
.assistant-intro { margin: 0 0 13px; font-size: 18px; font-weight: 550; letter-spacing: -.65px; }
.suggestion { display: inline-flex; align-items: center; gap: 5px; }
.suggestion:has(svg)::before { display: none; }
.suggestion svg { width: 11px; height: 11px; color: #8f9ba5; }
.parser-note { font-size: 8px; margin: 10px 0 21px; line-height: 1.85; }
.assistant-panel > .section-label { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 9px; }
.assistant-panel > .section-label > span { text-align: right; font-size: 8px; font-weight: 400; letter-spacing: 0; }
.assistant-answer > .notice { display: block; margin-top: 13px; }
.assistant-answer > .notice strong { display: block; color: inherit; }
.assistant-answer > .notice ul { padding-left: 17px; margin: 7px 0; }
.assistant-answer > .notice li { margin-bottom: 5px; }
.assistant-answer > .notice .btn { margin-top: 9px; }
.assistant-answer details { font-size: 10px; background: transparent; border-color: color-mix(in srgb, var(--green) 13%, var(--line)); }
.assistant-answer details ul { padding: 0 16px 0 30px; }
.assistant-panel > .model-controls { flex-wrap: wrap; margin: 17px 0 0; padding: 12px 0; border-bottom: 1px solid var(--line); }
.assistant-panel > .model-controls > .tiny:first-child { flex: 1; }
.assistant-panel > .model-controls > .tiny:last-child { flex-basis: 100%; font-size: 8px; margin-top: -7px; }
.mode-switch.compact { padding: 2px; gap: 2px; border-radius: 6px; }
.mode-switch.compact button { min-height: 25px; padding: 3px 13px; font-size: 9px; border-radius: 4px; }
#inline-validation:not(:empty) { display: grid; gap: 8px; margin-top: 14px; }
.config-action { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-top: 18px; }
.config-action .tiny { font-size: 9px; }
.config-action .btn { font-size: 11px; }
.config-action .btn svg { width: 14px; height: 14px; }
.battery-panel .eyebrow { font-size: 8px; letter-spacing: 1.7px; margin-bottom: 7px; }
.battery-panel .eyebrow::before { display: none; }
.battery-panel > .panel-head { padding-bottom: 3px; }
.battery-panel .panel-title { font-size: 16px; letter-spacing: -.5px; }
.battery-panel .panel-title .tiny { font-size: 10px; letter-spacing: 0; }
.battery-panel .battery-stage { min-height: 346px; }
.battery-stage .battery-scene { margin-top: -12px; }
.stage-grid { position: absolute; z-index: -1; inset: 20px 15px 15px; background-image: linear-gradient(#d2d9df 1px, transparent 1px), linear-gradient(90deg, #d2d9df 1px, transparent 1px); background-size: 34px 34px; opacity: .2; mask-image: radial-gradient(ellipse at center, #000 10%, transparent 69%); }
.dimension { position: absolute; color: #9ba3aa; font-size: 8px; font-family: "SFMono-Regular", Consolas, monospace; letter-spacing: .3px; }
.dim-height { right: 24px; top: 72px; bottom: 94px; display: flex; align-items: center; border-left: 1px solid #d4dadf; padding-left: 8px; }
.dim-height::before, .dim-height::after { content: ""; position: absolute; left: -4px; width: 7px; height: 1px; background: #c9d2d9; }
.dim-height::before { top: 0; }
.dim-height::after { bottom: 0; }
.dim-width { left: 35px; bottom: 61px; width: 75px; text-align: center; padding-top: 7px; border-top: 1px solid #cdd5dc; }
.dim-width::before, .dim-width::after { content: ""; position: absolute; top: -4px; height: 7px; width: 1px; background: #c9d2d9; }
.dim-width::before { left: 0; }
.dim-width::after { right: 0; }
.stage-caption { position: absolute; bottom: 15px; left: 18px; right: 18px; text-align: center; color: #929aa1; font-size: 8px; line-height: 1.7; letter-spacing: -.1px; }
.cell .cell-body > .cell-label { inset: 26px 6px 18px; font-size: 14px; letter-spacing: 2px; gap: 5px; }
.cell .cell-body > .cell-label span { font-size: 11px; font-weight: 500; letter-spacing: 2px; }
.cell .cell-body > .cell-label small { font-size: 7px; letter-spacing: .9px; }
.cell-b .cell-body > .cell-core { inset: 9px 8px 7px; opacity: .85; background: repeating-linear-gradient(90deg, #9c7f49 0px, #c2a369 2px, #ddc88f 3px, #947447 5px, #c3af7e 6px); border-radius: 29px / 8px; box-shadow: inset 10px 0 11px rgba(50, 35, 10, .2), inset -11px 0 12px rgba(50, 35, 10, .24); }
.cell-c .cell-body { background: linear-gradient(90deg, #596570, #a1afbb 32%, #8e9daa 62%, #677785 90%); }
.cell-c .cell-top { background: linear-gradient(175deg, #e2e8ee, #919da8 40%, #c6d0d8 65%, #768490); border-color: #94a0aa; box-shadow: 0 2px 0 #6e7d8a; }
.cell-c .cell-bottom { background: linear-gradient(90deg, #4c5964, #94a1ad 40%, #62717e); box-shadow: 0 -3px 0 #72818e; }
.cell { transition: translate .6s ease, rotate .6s ease, filter .6s ease; }
.exploded .cell-a { translate: -22px 8px; rotate: -5deg; }
.exploded .cell-b { translate: 5px -19px; }
.exploded .cell-c { translate: 26px 12px; rotate: 6deg; }
.ion { position: absolute; display: grid; place-items: center; z-index: 4; width: 24px; height: 24px; border-radius: 50%; font-family: Georgia, serif; font-size: 9px; color: #e3eaf1; background: radial-gradient(circle at 35% 30%, #acbac7, #677988 65%, #4a5b6a); box-shadow: inset 0 1px 1px #d6dfe6, 2px 2px 4px #596a79; }
.ion-a { left: 21px; top: 28px; }
.ion-b { right: 11px; top: 78px; width: 19px; height: 19px; font-size: 8px; }
.ion-c { left: 17px; bottom: 18px; width: 22px; height: 22px; }
.battery-controls { display: flex; align-items: center; gap: 10px; margin: 0 22px 19px; padding: 12px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.battery-controls input[type="range"] { width: 72px; flex: 1; max-width: 112px; height: 3px; accent-color: #5f707f; margin-right: auto; }
.battery-controls .btn { min-height: 28px; padding: 5px 8px; font-size: 9px; }
.battery-controls label { font-size: 9px; }
.cell-specs { display: grid; grid-template-columns: 1fr 1.2fr; margin: 0 22px; border-top: 1px solid var(--line); }
.cell-specs > div { display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 17px 10px; }
.cell-specs > div + div { border-left: 1px solid var(--line); }
.cell-specs span { color: var(--muted); font-size: 8px; line-height: 1.7; text-align: center; }
.cell-specs strong { font-size: 23px; font-weight: 550; letter-spacing: -.8px; font-variant-numeric: tabular-nums; }
.cell-specs strong small { font-size: 10px; color: var(--muted); font-weight: 400; }
.battery-note { border: 0; border-top: 1px solid var(--line); border-radius: 0; padding: 13px 22px; font-size: 9px; line-height: 1.9; background: #f5f7f9; color: #939aa1; }
.bottom-info { display: flex; align-items: center; gap: 17px; padding: 20px 3px 0; }
.bottom-info > span { display: flex; align-items: center; gap: 8px; flex-shrink: 0; font-size: 11px; font-weight: 550; }
.bottom-info > span svg { width: 15px; height: 15px; color: #818b93; }
.bottom-info p { font-size: 10px; line-height: 1.8; margin: 0; color: var(--muted); max-width: 620px; }
.bottom-info .btn { margin-left: auto; font-size: 10px; }
.chart-toolbar { display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); gap: 15px; padding-right: 23px; }
.chart-toolbar .chart-tabs { border-bottom: 0; min-width: 0; }
.chart-toolbar > .row { gap: 8px; flex-shrink: 0; }
.chart-toolbar label { font-size: 9px; }
.chart-toolbar select { min-height: 27px; border: 1px solid var(--line); border-radius: 5px; color: var(--muted); background: var(--surface); font-size: 10px; padding: 3px 6px; }
.chart-empty { position: relative; min-height: 245px; background: none; isolation: isolate; }
.chart-empty > svg { position: absolute; inset: auto 0 5px; width: 100%; height: 180px; color: #6f7e8b; opacity: .7; z-index: -1; }
.chart-empty > div { display: flex; flex-direction: column; align-items: center; padding: 17px 25px; background: radial-gradient(ellipse, var(--surface) 0%, color-mix(in srgb, var(--surface) 95%, transparent) 55%, transparent 76%); }
.chart-empty > div > .tool-emblem { margin-bottom: 13px; width: 34px; height: 34px; }
.chart-empty > div > .tool-emblem svg { width: 15px; height: 15px; opacity: 1; }
.chart-empty h3 { color: var(--text); font-size: 13px; font-weight: 500; margin-bottom: 8px; }
.chart-empty p { font-size: 10px; line-height: 1.85; }
.chart-empty .tiny { margin-top: 10px; font-size: 8px; }
.chart-panel .metric-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); border-bottom: 1px solid var(--line); }
.chart-panel .metric-label { margin: 0 0 8px; }
.chart-panel .source-metric { color: #a28454; font-size: 20px; letter-spacing: .2px; }
.chart-panel .insight { border-top: 0; }
.chart-panel .insight > .tool-emblem { width: 25px; height: 25px; flex-shrink: 0; }
.chart-panel .insight > .tool-emblem svg { margin: 0; }
.chart-panel > details { margin: 15px 23px 0; }
.chart-panel > details > p { margin: 0 15px 15px; }
.chart-panel > details > .table-wrap { margin-bottom: 15px; }
.chart-panel > .status-line { padding: 13px 23px 9px; }
.chart-panel > .progress-track { margin: 0 23px; }
.result-footer { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 16px 23px; }
.result-footer .tiny { font-size: 9px; }
.result-footer .row { gap: 7px; }
.empty-records { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 330px; padding: 32px; text-align: center; }
.empty-records > .tool-emblem { width: 45px; height: 45px; margin-bottom: 18px; }
.empty-records h3 { font-size: 17px; font-weight: 550; letter-spacing: -.5px; margin-bottom: 7px; }
.empty-records p { font-size: 12px; margin-bottom: 24px; }
.record-check { display: flex; align-items: center; align-self: stretch; flex-shrink: 0; padding: 5px 4px 5px 0; }
.record-check input { width: 16px; height: 16px; accent-color: #405364; margin: 0; cursor: pointer; }
.record-main { flex: 1; }
.record-main > strong { display: flex; align-items: center; gap: 8px; }
.record-main > strong > .pill { display: inline-flex; margin: 0; font-size: 8px; }
.record-main > span { display: block; font-size: 11px; line-height: 1.8; }
.record-main > span.tiny { font-size: 9px; margin-top: 2px; }
.content > .panel + p.tiny { margin-top: 16px; }
.dashboard-grid + .expert-section { margin-top: 22px; }
.expert-section > .expert-grid { margin-top: 24px; }
.expert-grid > div > h3 { font-size: 12px; font-weight: 600; margin-bottom: 15px; }
.parameter-archive { padding: 20px 0 0; margin-top: 20px; border-top: 1px solid var(--line); }
.parameter-archive > h3 { font-size: 12px; margin-bottom: 7px; font-weight: 600; }
.parameter-archive .record { padding-top: 8px; }
.legacy-features { margin-top: 23px; padding-top: 18px; border-top: 1px solid var(--line); }
.legacy-features > span { display: block; margin-bottom: 11px; font-size: 9px; }
.legacy-features .scenario-chip { text-decoration: none; font-size: 9px; }
.legacy-features .scenario-chip:hover { border-color: var(--green); }
.integration-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.integration-card { box-shadow: none; padding: 21px; }
.integration-card > .step-dot { width: 26px; height: 26px; font-size: 10px; border-radius: 7px; color: #6e7d8a; border-color: #d9dfe4; background: #eaeef2; }
.integration-card > h2 { margin: 17px 0 11px; font-size: 13px; }
.integration-card > p { font-size: 11px; margin-top: 13px; margin-bottom: 0; }
.integration-card .pill { font-size: 8px; }
.architecture-flow { padding: 24px; margin-top: 22px; }
.pipeline { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px 17px; margin-top: 20px; }
.pipeline > div { display: flex; align-items: center; gap: 9px; padding: 13px 11px; border: 1px solid var(--line); background: var(--panel); border-radius: 7px; position: relative; font-size: 10px; line-height: 1.5; }
.pipeline > div > span { flex-shrink: 0; color: #77838e; font-family: Georgia, serif; font-size: 15px; }
.pipeline > div:not(:nth-child(5n))::after { content: "→"; position: absolute; right: -14px; color: #9ca5ac; }
.content > .architecture-flow ~ .panel { margin-top: 22px; }
.content > .architecture-flow ~ .panel > .notice { margin: 15px 23px 23px; }
.content > .architecture-flow ~ .panel > p { padding: 0 23px; color: var(--muted); font-size: 12px; line-height: 1.9; }
.content > .architecture-flow ~ .panel > .row { flex-wrap: wrap; padding: 0 23px 23px; }
.content > .architecture-flow ~ .panel .data-table td { white-space: normal; font-size: 11px; line-height: 1.9; }
.content > .architecture-flow ~ .panel .data-table td:first-child { white-space: nowrap; min-width: 105px; }
.workspace > .footer-note { max-width: 1580px; padding: 0 37px 24px; margin: 0 auto; }
.skip-link { position: fixed; z-index: 400; top: 10px; left: 14px; transform: translateY(calc(-100% - 24px)); background: #263c4f; color: #fff; padding: 10px 17px; border-radius: 8px; text-decoration: none; font-size: 12px; }
.skip-link:focus { transform: none; }
body[data-theme="dark"] .sidebar-project { background: #262c31; border-color: #353e45; color: #a2b0bc; }
body[data-theme="dark"] .sidebar-project small { color: #818a92; }
body[data-theme="dark"] .sidebar-bottom { border-top-color: var(--line); }
body[data-theme="dark"] .small-monogram, body[data-theme="dark"] .nav-count { background: #30383f; color: #99a8b5; border-color: #3d464d; }
body[data-theme="dark"] .live-dot { box-shadow: 0 0 0 3px #273037; }
body[data-theme="dark"] .stage-grid { opacity: .05; }
body[data-theme="dark"] .dimension { color: #6d7780; border-color: #3b454d; }
body[data-theme="dark"] .dimension::before, body[data-theme="dark"] .dimension::after { background: #404a53; }
body[data-theme="dark"] .stage-caption { color: #77818a; }
body[data-theme="dark"] .battery-note { background: #21272d; color: #879199; }
body[data-theme="dark"] .integration-card > .step-dot { color: #b6c3cf; border-color: #3a444c; background: #2b343b; }

@media (min-width: 1600px) {
  .workspace > .footer-note { padding-left: 45px; padding-right: 45px; }
  .battery-panel .battery-stage { min-height: 362px; }
}
@media (max-width: 1200px) {
  .integration-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pipeline { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
  .pipeline > div { flex-direction: column; align-items: flex-start; gap: 6px; padding: 11px; }
  .pipeline > div:not(:nth-child(5n))::after { right: -11px; top: 25px; }
}
@media (max-width: 1100px) {
  .brand-sub { font-size: 7px; letter-spacing: 1.1px; }
  .brand-mark { font-size: 26px; }
  .brand-mark > span { right: 3px; bottom: 8px; }
  .sidebar-project { font-size: 9px; padding: 10px 8px; }
  .sidebar-project small { font-size: 6px; }
  .sidebar-bottom { font-size: 9px; }
  .assistant-panel > .panel-head { gap: 6px; }
  .assistant-heading { gap: 8px; }
  .assistant-heading .panel-title { font-size: 12px; }
  .assistant-heading .tiny { font-size: 7px; }
  .assistant-panel > .panel-head > .pill { font-size: 7px; padding: 3px 5px; }
  .config-action { flex-wrap: wrap; justify-content: flex-end; }
  .config-action .tiny { margin-right: auto; font-size: 8px; }
  .config-action .btn { font-size: 10px; min-height: 38px; padding: 9px 12px; }
  .battery-panel .battery-stage { min-height: 320px; }
  .dim-height { right: 12px; top: 82px; bottom: 88px; font-size: 7px; padding-left: 5px; }
  .dim-width { left: 23px; bottom: 57px; font-size: 7px; }
  .stage-caption { font-size: 7px; }
  .battery-controls { margin-left: 18px; margin-right: 18px; }
  .cell-specs { margin-left: 18px; margin-right: 18px; }
  .battery-note { padding-left: 18px; padding-right: 18px; font-size: 8px; }
  .bottom-info { flex-wrap: wrap; gap: 10px 15px; }
  .bottom-info > span { flex-basis: 100%; font-size: 10px; }
  .bottom-info p { flex: 1; font-size: 9px; }
  .workspace > .footer-note { padding-left: 23px; padding-right: 23px; }
  .result-footer { gap: 10px; flex-wrap: wrap; }
}
@media (max-width: 900px) and (min-width: 761px) {
  .sidebar-project, .sidebar-bottom > div:not(.small-monogram) { display: none; }
  .sidebar-bottom { justify-content: center; }
  .sidebar nav > a.nav-item > svg:last-child { display: none; }
  .sidebar .brand-mark > span { display: inline; }
  .config-action { flex-direction: column; align-items: stretch; gap: 11px; }
  .config-action .tiny { text-align: center; margin: 0; }
  .page-title { font-size: 27px; }
  .chart-panel .metric-value { font-size: 21px; }
  .chart-panel .source-metric { font-size: 18px; }
}
@media (max-width: 760px) {
  .sidebar { display: flex; position: fixed; inset: auto 0 0; z-index: 90; width: 100%; height: auto; min-height: 67px; padding: 5px 7px max(5px, env(safe-area-inset-bottom)); border-right: 0; border-top: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 96%, transparent); backdrop-filter: blur(14px); box-shadow: 0 -3px 15px rgba(25,50,30,.03); }
  .sidebar > .brand, .sidebar > .nav-label, .sidebar-project, .sidebar-bottom { display: none; }
  .sidebar nav { display: flex; align-items: stretch; justify-content: space-between; width: 100%; gap: 2px; }
  .sidebar .nav-item { position: relative; flex: 1; flex-direction: column; justify-content: center; gap: 5px; min-width: 0; min-height: 52px; border: 0; border-radius: 8px; font-size: 8px; margin: 0; padding: 6px 3px; text-align: center; }
  .sidebar .nav-item.active { background: var(--mint); color: var(--green); box-shadow: none; }
  .sidebar .nav-item.active svg { color: var(--green); }
  .sidebar .nav-item > svg { width: 18px; height: 18px; }
  .sidebar nav > a.nav-item > svg:last-child { display: none; }
  .sidebar .nav-item > span:not(.nav-count) { display: block; white-space: nowrap; letter-spacing: -.3px; }
  .sidebar .nav-count { position: absolute; top: 1px; right: calc(50% - 21px); min-width: 15px; height: 15px; border-radius: 50%; font-size: 7px; }
  .sidebar .nav-item.active .nav-count { background: #263c4f; color: #fff; }
  body[data-theme="dark"] .sidebar { background: color-mix(in srgb, var(--surface) 96%, transparent); }
  body[data-theme="dark"] .sidebar .nav-item.active { background: var(--mint); color: var(--green); }
  .content { padding-bottom: 25px; }
  .workspace > .footer-note { padding: 0 20px 91px; }
  .content > .stepper { padding-bottom: 18px; margin-bottom: 20px; }
  .assistant-heading .panel-title { font-size: 13px; }
  .assistant-heading .tiny { font-size: 8px; }
  .assistant-panel > .panel-head > .pill { font-size: 8px; }
  .assistant-intro { font-size: 18px; }
  .config-action { flex-wrap: nowrap; }
  .config-action .tiny { font-size: 9px; }
  .config-action .btn { font-size: 11px; }
  .battery-panel .battery-stage { min-height: 330px; }
  .battery-controls { margin-left: 20px; margin-right: 20px; }
  .battery-controls input[type="range"] { max-width: 180px; }
  .dimension { font-size: 8px; }
  .dim-height { right: 30px; top: 74px; bottom: 91px; }
  .dim-width { left: 55px; }
  .stage-caption { font-size: 8px; }
  .cell-specs { margin-left: 20px; margin-right: 20px; }
  .cell-specs span { font-size: 9px; }
  .battery-note { font-size: 9px; padding-left: 20px; padding-right: 20px; }
  .chart-toolbar { padding-right: 20px; gap: 10px; }
  .chart-toolbar .chart-tabs { gap: 20px; }
  .chart-toolbar label { display: none; }
  .chart-panel .metric-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .chart-panel .metric-value { font-size: 22px; }
  .chart-panel .source-metric { font-size: 17px; }
  .chart-panel .metric-label { font-size: 8px; }
  .chart-panel > details { margin-left: 20px; margin-right: 20px; }
  .bottom-info > span { font-size: 11px; }
  .bottom-info p { font-size: 10px; }
  .record-main > span { font-size: 10px; }
  .integration-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .architecture-flow { padding: 20px; }
  .pipeline { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .pipeline > div { flex-direction: row; align-items: center; gap: 10px; font-size: 11px; padding: 12px; }
  .pipeline > div:not(:nth-child(5n))::after { display: none; }
  .integration-card { padding: 18px; }
  .integration-card > h2 { font-size: 12px; }
  .integration-card > p { font-size: 10px; }
  .expert-section > .panel-head { flex-wrap: wrap; gap: 16px; }
  .expert-section > .panel-head > .row { flex-wrap: wrap; }
  .fullscreen-mode .sidebar { display: none; }
  .fullscreen-mode .workspace > .footer-note { display: none; }
}
@media (max-width: 480px) {
  .sidebar .nav-item { font-size: 7px; }
  .sidebar .nav-item > span:not(.nav-count) { letter-spacing: -.4px; }
  .toolbar .original-link { display: none; }
  .content { padding-bottom: 22px; }
  .workspace > .footer-note { padding-left: 16px; padding-right: 16px; }
  .assistant-intro { font-size: 17px; }
  .assistant-panel > .panel-head > .pill { font-size: 7px; }
  .assistant-panel > .section-label > span { font-size: 7px; }
  .config-action { flex-wrap: wrap; padding-top: 15px; gap: 10px; }
  .config-action .tiny { text-align: center; width: 100%; margin: 0; font-size: 8px; }
  .config-action .btn { width: 100%; min-height: 41px; }
  .battery-panel .battery-stage { min-height: 311px; }
  .dim-height { right: 13px; font-size: 7px; }
  .dim-width { left: 29px; }
  .stage-caption { font-size: 7px; }
  .battery-controls { margin-left: 16px; margin-right: 16px; }
  .battery-controls input[type="range"] { max-width: 120px; }
  .cell-specs { margin-left: 16px; margin-right: 16px; }
  .cell-specs strong { font-size: 24px; }
  .cell-specs span { font-size: 8px; }
  .battery-note { padding-left: 16px; padding-right: 16px; font-size: 8px; }
  .chart-toolbar { padding-right: 16px; gap: 5px; }
  .chart-toolbar .chart-tabs { gap: 16px; padding-right: 10px; }
  .chart-tabs button { font-size: 10px; }
  .chart-empty > div { padding: 15px 10px; }
  .chart-empty > svg { height: 150px; bottom: 16px; }
  .chart-empty { min-height: 220px; padding-left: 10px; padding-right: 10px; }
  .chart-empty h3 { font-size: 12px; }
  .chart-empty p { font-size: 9px; }
  .chart-panel .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .chart-panel .metric:nth-child(3) { border-left: 0; }
  .chart-panel .metric:nth-child(n+3) { border-top: 1px solid var(--line); }
  .chart-panel .metric-value { font-size: 23px; }
  .chart-panel .source-metric { font-size: 20px; }
  .chart-panel .metric-label { font-size: 9px; }
  .chart-panel > details { margin-left: 16px; margin-right: 16px; }
  .result-footer { padding: 15px 16px; }
  .result-footer > .tiny { width: 100%; font-size: 8px; }
  .result-footer > .row { justify-content: flex-end; width: 100%; }
  .result-footer .btn { font-size: 10px; }
  .bottom-info { gap: 9px; }
  .bottom-info p { flex-basis: 100%; font-size: 9px; }
  .bottom-info .btn { margin: 3px 0 0; font-size: 9px; }
  .record-main { width: calc(100% - 35px); flex-basis: calc(100% - 35px); }
  .record-main > strong { font-size: 10px; }
  .record-main > span.tiny { font-size: 8px; }
  .empty-records { padding: 26px 18px; min-height: 320px; }
  .empty-records h3 { font-size: 16px; }
  .empty-records p { font-size: 10px; }
  .integration-grid { gap: 10px; }
  .integration-card { padding: 15px 12px; }
  .integration-card > h2 { font-size: 11px; margin-top: 13px; }
  .integration-card .pill { font-size: 7px; padding: 3px 5px; }
  .integration-card > p { font-size: 9px; }
  .architecture-flow { padding: 17px 16px; }
  .pipeline > div { font-size: 10px; padding: 10px 9px; gap: 7px; }
  .pipeline > div > span { font-size: 13px; }
  .content > .architecture-flow ~ .panel > p { font-size: 11px; padding-left: 16px; padding-right: 16px; }
  .content > .architecture-flow ~ .panel > .row { padding-left: 16px; padding-right: 16px; }
  .content > .architecture-flow ~ .panel > .row > .btn { width: 100%; font-size: 11px; }
  .content > .architecture-flow ~ .panel > .notice { margin-left: 16px; margin-right: 16px; }
}
@media print {
  .sidebar, .skip-link, .config-action, .battery-controls, .bottom-info, .result-footer, .record-check { display: none !important; }
  .workspace > .footer-note { padding: 12px 0 0; }
  .chart-toolbar { padding-right: 0; }
  .chart-toolbar > .row { display: none; }
  .battery-panel .battery-stage { min-height: 270px; }
  .battery-note { font-size: 7pt; }
  .stage-caption { bottom: 10px; font-size: 6pt; }
  .cell-specs strong { font-size: 18pt; }
  .integration-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pipeline { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .chart-panel .metric-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .chart-panel .metric { border-top: 0 !important; }
  .chart-panel .metric:not(:first-child) { border-left: 1px solid var(--line); }
  .chart-panel > details:not([open]) { display: none; }
}

/* Readability and the implemented analysis expansion state. */
.nav-item { font-size: 12px; }
.panel-title, .assistant-heading .panel-title { font-size: 14px; }
.page-subtitle, .assistant-answer, .field input, .field select, .field textarea { font-size: 13px; }
.tiny, .help { font-size: 11px; line-height: 1.75; }
.help, .tiny.muted, .parser-note, .footer-note, .workspace > .footer-note { color: var(--muted); }
.field label { font-size: 12px; }
.section-label { font-size: 11px; }
.assistant-panel > .section-label { font-size: 11px; }
.assistant-panel > .section-label > span { font-size: 10px; }
.assistant-heading .tiny, .prompt-footer .tiny, .parser-note, .config-action .tiny, .assistant-panel > .model-controls > .tiny:last-child { font-size: 11px; }
.suggestion { font-size: 11px; color: var(--muted); }
.pill { font-size: 10px; }
.assistant-panel > .panel-head > .pill { font-size: 9px; }
.step { font-size: 11px; }
.mode-switch button { font-size: 12px; }
.mode-switch.compact button { font-size: 11px; }
.notice { font-size: 12px; }
.notice.warning { color: #806037; }
.notice.error { color: #a24440; }
.notice.success { color: #465563; }
.battery-note { font-size: 11px; color: var(--muted); }
.stage-caption, .dimension { color: var(--muted); font-size: 10px; }
.battery-controls label, .battery-controls .btn, .battery-legend, .cell-specs span { font-size: 11px; }
.cell-specs span { max-width: 160px; }
.chart-tabs button { font-size: 12px; }
.chart-toolbar label, .chart-toolbar select { font-size: 11px; }
.chart-legend { font-size: 11px; }
.chart-empty h3 { font-size: 15px; }
.chart-empty p { font-size: 12px; }
.chart-empty .tiny { font-size: 10px; }
.chart-panel .metric-label { font-size: 11px; }
.insight { font-size: 12px; }
.result-footer .tiny { font-size: 11px; }
.check-row, .summary-item, .scenario-chip { font-size: 11px; }
.data-table, .data-table th, .data-table td { font-size: 12px; }
.code-editor { font-size: 11px; }
.record-main > strong, .record-main > span { font-size: 12px; }
.record-main > span.tiny { font-size: 11px; }
.record-main > strong > .pill { font-size: 10px; }
.bottom-info > span { font-size: 12px; }
.bottom-info p, .bottom-info .btn { font-size: 11px; }
.empty-records p { font-size: 13px; }
.expert-grid > div > h3, .parameter-archive > h3 { font-size: 13px; }
.legacy-features > span, .legacy-features .scenario-chip { font-size: 11px; }
.integration-card > h2 { font-size: 14px; }
.integration-card > p { font-size: 12px; }
.integration-card .pill { font-size: 10px; }
.pipeline > div { font-size: 12px; }
.footer-note, .workspace > .footer-note { font-size: 10px; }
.content > .panel > p { padding-left: 23px; padding-right: 23px; }
.content > .architecture-flow ~ .panel .data-table td { font-size: 12px; }
.content > .architecture-flow ~ .panel > .notice { font-size: 12px; }

body.analysis-expanded { overflow: hidden; }
body.analysis-expanded .sidebar,
body.analysis-expanded .topbar,
body.analysis-expanded .workspace > .footer-note,
body.analysis-expanded #main > :not(#results) { display: none !important; }
body.analysis-expanded .workspace { margin-left: 0; }
body.analysis-expanded .content { padding: 0; max-width: none; }
body.analysis-expanded #results { position: fixed; z-index: 150; inset: 16px; margin: 0; display: block; max-width: none; max-height: none; overflow: auto; overscroll-behavior: contain; border-radius: 15px; background: var(--surface); box-shadow: 0 15px 90px rgba(16, 37, 23, .17); }
body.analysis-expanded #results > .panel-head { position: sticky; z-index: 5; top: 0; background: var(--surface); border-bottom: 1px solid var(--line); padding-top: 20px; padding-bottom: 17px; }
body.analysis-expanded #results .chart-wrap { display: flex; justify-content: center; align-items: center; min-height: 330px; padding: 20px 30px 4px; }
body.analysis-expanded #results .chart-wrap > svg { height: max(340px, 50vh); max-height: 660px; width: 100%; }
body.analysis-expanded #results .chart-empty { width: 100%; min-height: 340px; }
body.analysis-expanded #results .chart-empty > svg { height: 270px; }
body.analysis-expanded #results .icon-btn[data-action="fullscreen"] { border-color: var(--green); color: var(--green); background: var(--mint); }
body.analysis-expanded .toast { left: 50%; bottom: 25px; }

@media (max-width: 1100px) {
  .sidebar .nav-item { font-size: 11px; }
  .assistant-heading .panel-title { font-size: 13px; }
  .assistant-heading .tiny { font-size: 10px; }
  .assistant-panel > .panel-head { flex-wrap: wrap; gap: 10px; }
  .assistant-panel > .panel-head > .pill { margin-left: auto; font-size: 9px; }
  .field label { font-size: 12px; }
  .help { font-size: 11px; }
  .pipeline > div { font-size: 11px; }
  .battery-controls label, .battery-controls .btn, .battery-legend { font-size: 10px; }
  .cell-specs span { font-size: 10px; }
  .dimension, .stage-caption { font-size: 9px; }
  .chart-panel .metric-label { font-size: 10px; }
}
@media (max-width: 900px) and (min-width: 761px) {
  .sidebar .nav-item { font-size: 0; }
  .page-subtitle { font-size: 12px; }
}
@media (max-width: 760px) {
  .sidebar { min-height: 74px; }
  .sidebar .nav-item { min-height: 60px; font-size: 10px; gap: 4px; }
  .sidebar .nav-item > span:not(.nav-count) { white-space: normal; line-height: 1.3; max-width: 90px; letter-spacing: -.35px; }
  .workspace > .footer-note { padding-bottom: 98px; }
  .page-subtitle { font-size: 12px; }
  .assistant-panel > .panel-head { flex-wrap: nowrap; }
  .assistant-panel > .section-label { flex-wrap: wrap; gap: 5px; }
  .assistant-panel > .section-label > span { font-size: 10px; }
  .prompt-footer .tiny { font-size: 10px; }
  .parser-note { font-size: 10px; }
  .assistant-panel > .model-controls > .tiny:last-child { font-size: 10px; }
  .assistant-answer, .notice { font-size: 12px; }
  .battery-note { font-size: 11px; }
  .battery-controls label, .battery-controls .btn, .battery-legend, .cell-specs span { font-size: 11px; }
  .step { font-size: 10px; }
  .chart-panel .metric-label { font-size: 10px; }
  .record-main > strong, .record-main > span { font-size: 12px; }
  .record-main > span.tiny { font-size: 10px; }
  .integration-card > h2 { font-size: 13px; }
  .integration-card > p { font-size: 12px; }
  .integration-card .pill { font-size: 9px; white-space: normal; }
  .bottom-info > span { font-size: 12px; }
  .bottom-info p, .bottom-info .btn { font-size: 11px; }
  .toast { bottom: 90px; }
  body.analysis-expanded #results { inset: 0; border: 0; border-radius: 0; }
  body.analysis-expanded #results > .panel-head { padding: 16px 18px; }
  body.analysis-expanded #results .chart-wrap { padding: 16px 10px 3px; min-height: 285px; }
  body.analysis-expanded #results .chart-wrap > svg { height: max(270px, 44vh); }
  body.analysis-expanded #results .chart-empty { min-height: 290px; }
  body.analysis-expanded #results .chart-empty > svg { height: 220px; }
}
@media (max-width: 480px) {
  .sidebar .nav-item { font-size: 9px; }
  .sidebar .nav-item > span:not(.nav-count) { max-width: 66px; letter-spacing: -.5px; }
  .assistant-panel > .panel-head { flex-wrap: wrap; }
  .assistant-panel > .section-label > span { flex-basis: 100%; text-align: left; font-size: 10px; }
  .assistant-heading .tiny, .config-action .tiny, .parser-note { font-size: 10px; }
  .prompt-footer .tiny { font-size: 9px; }
  .field label { font-size: 12px; }
  .field input, .field select, .field textarea { font-size: 13px; }
  .help { font-size: 11px; }
  .suggestion { font-size: 10px; }
  .step { gap: 4px; font-size: 9px; }
  .battery-controls label, .battery-controls .btn, .battery-legend, .cell-specs span { font-size: 10px; }
  .battery-note { font-size: 11px; }
  .stage-caption { font-size: 9px; }
  .chart-tabs button { font-size: 11px; }
  .chart-toolbar .chart-tabs { gap: 15px; }
  .chart-empty h3 { font-size: 14px; }
  .chart-empty p { font-size: 11px; }
  .chart-empty .tiny { font-size: 10px; }
  .chart-panel .metric-label { font-size: 11px; }
  .result-footer > .tiny { font-size: 10px; }
  .record-main > strong, .record-main > span { font-size: 11px; }
  .record-main > span.tiny { font-size: 10px; }
  .empty-records p { font-size: 12px; }
  .integration-grid { grid-template-columns: 1fr; }
  .integration-card { padding: 19px; }
  .integration-card > h2 { font-size: 14px; }
  .integration-card > p { font-size: 12px; }
  .integration-card .pill { font-size: 10px; }
  .pipeline > div { font-size: 11px; }
  .footer-note, .workspace > .footer-note { font-size: 10px; }
  .content > .panel > p { padding-left: 16px; padding-right: 16px; }
  .content > .architecture-flow ~ .panel > p { font-size: 12px; }
}
@media print {
  body.analysis-expanded { overflow: visible; }
  body.analysis-expanded #results { position: static; overflow: visible; box-shadow: none; border: 1px solid var(--line); }
  body.analysis-expanded #results > .panel-head { position: static; }
  body.analysis-expanded #results .chart-wrap > svg { height: auto; min-height: 0; max-height: 300px; }
  .workspace > .footer-note { padding-bottom: 0; }
}
