:root {
  --ink: #171f2c;
  --muted: #66707d;
  --quiet: #88919c;
  --blue: #1778fa;
  --blue-soft: #eaf3ff;
  --line: #e8ebef;
  --sidebar: #f8f9fa;
  --surface: #fff;
  --sidebar-width: 274px;
  --radius: 12px;
  color-scheme: light;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-synthesis: none;
  color: var(--ink);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }
html { min-width: 320px; scroll-behavior: smooth; }
body { margin: 0; font-size: 14px; line-height: 1.55; }
button, input, select, textarea { font: inherit; color: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .55; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, input, textarea { min-width: 0; }
input, textarea { accent-color: var(--blue); }
textarea { resize: vertical; }
svg { width: 22px; height: 22px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 3px solid #91c1ff; outline-offset: 3px; }
::selection { background: #dcecff; }
[hidden] { display: none !important; }

.agent-shell { display: grid; grid-template-columns: var(--sidebar-width) minmax(0, 1fr); min-height: 100dvh; }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 40; display: flex; flex-direction: column; width: var(--sidebar-width); height: 100dvh; background: var(--sidebar); border-right: 1px solid #eef0f3; }
.brand { display: flex; align-items: center; gap: 10px; min-height: 78px; padding: 20px 25px; font-size: 18px; font-weight: 650; letter-spacing: -.5px; }
.brand img { width: 32px; height: 32px; }
.brand .domain { color: var(--blue); font-weight: 600; }
.agent-identity { display: flex; align-items: center; gap: 11px; padding: 12px 24px 23px; }
.agent-avatar { display: grid; place-items: center; flex: 0 0 auto; width: 40px; height: 40px; border: 1px solid #dce6f3; border-radius: 13px; color: var(--blue); background: #f0f6ff; }
.agent-avatar svg { width: 23px; height: 23px; }
.agent-identity strong, .agent-identity small { display: block; }
.agent-identity strong { font-size: 15px; line-height: 1.4; font-weight: 650; }
.agent-identity small { margin-top: 2px; font-size: 12px; color: var(--muted); }
.nav-scroll { flex: 1; min-height: 0; padding: 0 14px 24px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #d5dae1 transparent; }
.new-work { display: flex; align-items: center; justify-content: center; gap: 9px; width: 100%; min-height: 43px; margin-bottom: 21px; border: 1px solid #dce2e9; border-radius: 10px; background: #fff; font-size: 14px; font-weight: 600; transition: border-color .15s, background .15s; }
.new-work svg { width: 18px; height: 18px; }
.new-work:hover { background: #f4f8ff; border-color: #bad4f6; }
.nav-link { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 43px; padding: 9px 12px; border: 0; border-radius: 9px; color: #555f6b; text-align: left; background: transparent; transition: color .15s, background .15s; }
.nav-link:hover { color: var(--ink); background: #edf0f3; }
.nav-link.is-active { color: #1167d8; background: #e9f1fc; }
.nav-primary .nav-link { margin: 3px 0; min-height: 44px; font-size: 16px; font-weight: 500; letter-spacing: -.2px; }
.nav-primary .nav-link.is-active { font-weight: 600; }
.nav-link > span:not(.nav-count) { flex: 1; min-width: 0; }
.nav-count { display: inline-flex; justify-content: center; align-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 6px; font-size: 11px; font-weight: 500; background: #e9edf2; color: #697686; }
.is-active .nav-count { background: #dceafd; color: #3774bc; }
.nav-section-label { margin: 36px 12px 7px; color: #6c7786; font-size: 11px; font-weight: 600; line-height: 1.4; letter-spacing: .1em; text-transform: uppercase; }
.nav-secondary .nav-link { min-height: 34px; padding-top: 5px; padding-bottom: 5px; font-size: 14px; line-height: 1.5; }
.nav-secondary .nav-link svg { width: 17px; height: 17px; }
.recent-nav { margin-top: 24px; }
.recent-nav .nav-section-label { margin-top: 0; }
.recent-nav .nav-link { min-height: 32px; font-size: 12px; }
.recent-nav .nav-link span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-footer { flex: 0 0 auto; margin: 0 14px; padding: 13px 0 14px; border-top: 1px solid #e6e9ee; }
.profile-link { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 4px 10px; border-radius: 9px; }
.profile-link:hover { background: #edf0f3; }
.profile-link img, .profile-avatar { display: grid; place-items: center; width: 32px; height: 32px; flex: 0 0 auto; object-fit: cover; border-radius: 50%; background: #e8edf4; color: #60708a; font-size: 12px; font-weight: 600; }
.profile-link strong, .profile-link small { display: block; }
.profile-link strong { font-size: 13px; font-weight: 600; }
.profile-link small { font-size: 11px; color: var(--muted); }
.profile-link > svg:last-child { width: 16px; height: 16px; margin-left: auto; color: #6c7786; }
.sidebar-footer > a:not(.profile-link) { display: flex; align-items: center; gap: 7px; margin: 9px 11px 0; color: #6c7786; font-size: 11px; }
.sidebar-footer > a:not(.profile-link):hover { color: var(--blue); }
.sidebar-footer > a:not(.profile-link) svg { width: 13px; height: 13px; }
.mobile-header, .sidebar-backdrop { display: none; }

.workspace { grid-column: 1 / -1; min-width: 0; margin-left: var(--sidebar-width); }
.workspace-top { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 78px; padding: 19px clamp(28px, 4.5vw, 64px); color: #6c7786; font-size: 12px; }
.workspace-top > span, .workspace-top .breadcrumb { display: flex; align-items: center; gap: 8px; }
.workspace-top svg { width: 14px; height: 14px; }
.prototype-badge { display: inline-flex; align-items: center; justify-content: center; gap: 5px; min-height: 27px; padding: 4px 9px; border: 1px solid #e7eaf0; border-radius: 6px; background: #fff; color: #6c7786; font-size: 10px; line-height: 1.4; }
.prototype-badge svg { width: 12px; height: 12px; }
.prototype-badge:hover { color: #566477; background: #f9fafc; }
#view { min-width: 0; }
.page { width: 100%; max-width: 1080px; margin: 0 auto; padding: 33px clamp(28px, 4.5vw, 64px) 88px; }
.page-narrow { max-width: 900px; }
.page-head { margin-bottom: 37px; }
.eyebrow { margin: 0 0 10px; color: #6c7786; font-size: 11px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 12px; font-size: 32px; line-height: 1.22; font-weight: 600; letter-spacing: -1.1px; }
h2 { font-size: 19px; font-weight: 600; line-height: 1.35; letter-spacing: -.4px; }
h3 { font-size: 15px; font-weight: 600; line-height: 1.4; letter-spacing: -.15px; }
.subtitle { max-width: 610px; margin: 0; color: var(--muted); font-size: 14px; line-height: 1.65; }
.head-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.page-head:has(> .head-actions) { position: relative; }
.workspace.is-work .workspace-top { display: none; }
.home { display: flex; flex-direction: column; justify-content: flex-end; width: 100%; min-height: 100dvh; padding: 28px clamp(28px, 4.5vw, 72px) max(32px, env(safe-area-inset-bottom)); }
.home-intro { width: 100%; max-width: 720px; margin: 0 auto; }
.home-intro h1 { margin-bottom: 15px; font-size: 38px; line-height: 1.2; letter-spacing: -1.3px; font-weight: 560; }
.home-intro .subtitle { max-width: 570px; font-size: 15px; }
.composer { display: flex; align-items: flex-end; gap: 14px; width: 100%; max-width: 920px; margin: 0 auto; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.composer:focus-within { border: 0; box-shadow: none; }
.composer-input { position: relative; flex: 1; min-width: 0; }
.composer textarea { display: block; width: 100%; height: 38px; min-height: 38px; max-height: 180px; padding: 7px 0; border: 0; border-radius: 0; outline: none; background: transparent; color: var(--ink); caret-color: var(--ink); font-size: 16px; line-height: 24px; resize: none; overflow-y: hidden; }
.composer textarea::placeholder { color: transparent; }
.composer textarea:focus-visible { outline: none; }
.composer-input:has(textarea:placeholder-shown):not(:focus-within)::before { content: ""; position: absolute; left: 0; bottom: 9px; width: 1.5px; height: 20px; background: var(--ink); pointer-events: none; animation: prompt-caret 1.1s step-end infinite; }
.composer > .icon-button { width: 38px; height: 38px; flex: 0 0 38px; color: #66707d; }
.composer > .icon-button svg { width: 21px; height: 21px; }
.composer .send-button { margin-bottom: 2px; }
@keyframes prompt-caret { 50% { opacity: 0; } }
.composer-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 12px; }
.composer-hints { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; color: #6c7786; font-size: 11px; }
.composer-hints > span { display: inline-flex; align-items: center; gap: 5px; }
.composer-hints svg { width: 14px; height: 14px; }
.send-button { display: grid; place-items: center; width: 34px; height: 34px; flex: 0 0 auto; padding: 0; border: 0; border-radius: 10px; color: white; background: var(--blue); transition: background .15s; }
.send-button:hover { background: #0868e7; }
.send-button svg { width: 18px; height: 18px; }
.continue-work { max-width: 720px; margin: 43px auto 0; }
.continue-label { margin: 0 0 12px; color: #6c7786; font-size: 11px; }
.work-line { display: flex; align-items: center; gap: 14px; width: 100%; padding: 15px 0; border: 0; border-top: 1px solid #edf0f3; background: transparent; text-align: left; }
.work-line > svg:first-child { width: 20px; height: 20px; color: #6c7786; }
.work-line > div, .work-line > span:not(.badge) { flex: 1; min-width: 0; }
.work-line strong { display: block; font-size: 13px; font-weight: 500; }
.work-line small { display: block; margin-top: 3px; color: #6c7786; font-size: 11px; }
.work-line > svg:last-child { width: 15px; height: 15px; color: #6c7786; }
.work-line:hover strong { color: var(--blue); }
.home .soft-notice { max-width: 720px; margin: 24px auto 0; }

.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 38px; padding: 8px 15px; border: 1px solid transparent; border-radius: 8px; font-size: 12px; line-height: 1.4; font-weight: 500; text-align: center; transition: background .15s, border-color .15s, color .15s; }
.button svg { width: 16px; height: 16px; }
.button-primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.button-primary:hover { background: #096be6; border-color: #096be6; }
.button-secondary { border-color: #dfe4eb; color: #475568; background: #fff; }
.button-secondary:hover { border-color: #c9d4e1; background: #f7f9fc; }
.button-quiet { padding-left: 7px; padding-right: 7px; color: #627286; background: transparent; }
.button-quiet:hover { color: var(--blue); background: #f1f6fd; }
.icon-button { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; padding: 0; border: 1px solid transparent; border-radius: 7px; background: transparent; color: #6c7786; }
.icon-button svg { width: 17px; height: 17px; }
.icon-button:hover { background: #eff3f7; color: #506276; }
.badge { display: inline-flex; align-items: center; justify-content: center; gap: 5px; padding: 3px 8px; border-radius: 5px; font-size: 10px; line-height: 1.45; font-weight: 500; white-space: nowrap; }
.badge svg { width: 11px; height: 11px; }
.badge-blue { color: #3278ca; background: #edf5ff; }
.badge-muted { color: #6c7786; background: #f1f3f6; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.mono { font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; font-size: .92em; }
.section-title { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 31px 0 16px; font-size: 15px; font-weight: 600; }
.section-title h2, .section-title h3 { margin: 0; font-size: inherit; }
.divider { height: 1px; border: 0; background: var(--line); margin: 28px 0; }
.empty-state { padding: 49px 22px; color: #6c7786; text-align: center; }
.empty-state > svg { width: 30px; height: 30px; margin: 0 auto 14px; color: #6c7786; }
.empty-state h3 { margin-bottom: 7px; color: #536175; font-size: 14px; font-weight: 500; }
.empty-state p { max-width: 410px; margin: 0 auto; font-size: 12px; line-height: 1.7; }
.empty-state .button { margin-top: 18px; }
.soft-notice { display: flex; align-items: flex-start; gap: 9px; padding: 13px 15px; border-radius: 8px; color: #6c7786; background: #f8fafc; font-size: 12px; line-height: 1.65; }
.soft-notice svg { width: 16px; height: 16px; margin-top: 2px; color: #6c7786; }
.soft-notice p { margin: 0; }
.inline-link { color: #327bce; text-decoration: none; }
.inline-link:hover { color: #0d66d5; text-decoration: underline; text-underline-offset: 3px; }

.book-search { position: relative; display: flex; align-items: center; gap: 9px; max-width: 430px; margin-bottom: 22px; }
.book-search > svg { position: absolute; top: 12px; left: 13px; width: 16px; height: 16px; color: #6c7786; pointer-events: none; }
.book-search input { width: 100%; height: 41px; padding: 9px 13px 9px 39px; border: 1px solid #e3e8ee; border-radius: 8px; background: #fff; font-size: 12px; }
.book-search input::placeholder { color: #6c7786; }
.book-meta { display: flex; justify-content: space-between; gap: 16px; margin: 24px 0 10px; color: #6c7786; font-size: 11px; }
.toc-list { border-top: 1px solid var(--line); }
.toc-entry { display: flex; align-items: flex-start; gap: 23px; width: 100%; padding: 25px 0; border: 0; border-bottom: 1px solid var(--line); background: transparent; text-align: left; }
.chapter-number { flex: 0 0 29px; padding-top: 2px; color: #6c7786; font-family: "SFMono-Regular", Consolas, monospace; font-size: 12px; }
.chapter-main { flex: 1; min-width: 0; }
.chapter-main h3 { margin: 0 0 8px; font-size: 16px; font-weight: 550; }
.chapter-main p { max-width: 560px; margin: 0; color: #6c7786; font-size: 12px; line-height: 1.7; }
.chapter-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; margin-top: 14px; color: #6c7786; font-size: 10px; }
.chapter-arrow { margin-top: 3px; color: #6c7786; }
.chapter-arrow svg, svg.chapter-arrow { width: 17px; height: 17px; }
.toc-entry:hover .chapter-main h3 { color: var(--blue); }
.toc-entry:hover .chapter-arrow { color: var(--blue); }
.chapter .page-head { margin-bottom: 27px; }
.chapter-summary { margin: 0 0 30px; padding: 22px 25px; border-left: 2px solid #d1e3fb; background: #f8fafe; color: #5d6c80; font-size: 13px; line-height: 1.8; }
.chapter-summary strong { display: block; margin-bottom: 6px; color: #536177; font-size: 11px; font-weight: 600; }
.chapter-summary p:last-child { margin-bottom: 0; }
.chapter-section { margin: 30px 0; scroll-margin-top: 25px; }
.chapter-section h2 { margin-bottom: 14px; font-size: 17px; }
.chapter-section > p { max-width: 670px; color: #68768a; font-size: 13px; line-height: 1.8; }
.decision-list { margin: 0; padding-left: 19px; color: #657387; font-size: 13px; }
.decision-list li { padding: 4px 0 7px 5px; line-height: 1.8; }
.decision-list li::marker { color: #6c7786; }
.source-link { display: flex; align-items: center; gap: 10px; width: 100%; padding: 12px 0; border: 0; border-bottom: 1px solid #edf0f4; background: transparent; color: #4481c6; font-size: 12px; text-align: left; }
.source-link > svg:first-child { width: 16px; height: 16px; color: #6c7786; }
.source-link > svg:last-child { margin-left: auto; width: 14px; height: 14px; color: #6c7786; }
.source-link:hover { color: #126bdd; }
.transcript { margin-top: 24px; border-top: 1px solid var(--line); }
.message { padding: 22px 0; border-bottom: 1px solid #edf0f4; scroll-margin-top: 24px; }
.message-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 10px; color: #6c7786; font-size: 10px; }
.message-meta strong { color: #596a80; font-size: 11px; font-weight: 600; }
.message-body { max-width: 680px; color: #5d6c80; font-size: 13px; line-height: 1.8; white-space: pre-line; }
.message-body p:last-child { margin-bottom: 0; }
.source-highlight { padding: 20px; margin-left: -20px; margin-right: -20px; border-radius: 9px; background: #f1f7ff; box-shadow: inset 3px 0 0 #90bbf3; }

.settings-group { margin-bottom: 34px; }
.settings-group > h2 { margin-bottom: 15px; font-size: 16px; }
.settings-row { display: flex; align-items: center; justify-content: space-between; gap: 25px; min-height: 82px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.setting-copy { flex: 1; min-width: 0; }
.setting-copy strong { display: block; margin-bottom: 5px; font-size: 13px; font-weight: 550; }
.setting-copy p { max-width: 490px; margin: 0; color: #6c7786; font-size: 12px; line-height: 1.65; }
.switch { position: relative; display: inline-flex; flex: 0 0 auto; width: 36px; height: 21px; cursor: pointer; }
.switch input { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.switch span { width: 36px; height: 21px; border: 1px solid #dce2e9; border-radius: 20px; background: #e2e7ee; transition: background .15s, border-color .15s; }
.switch span::after { position: absolute; top: 3px; left: 3px; width: 15px; height: 15px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgb(15 36 67 / 12%); content: ""; transition: transform .15s; }
.switch input:checked + span { border-color: var(--blue); background: var(--blue); }
.switch input:checked + span::after { transform: translateX(15px); }
.switch input:focus-visible + span { outline: 3px solid #91c1ff; outline-offset: 3px; }
.switch input:disabled { cursor: not-allowed; }
.switch input:disabled + span { opacity: .6; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.field { display: flex; flex-direction: column; min-width: 0; gap: 7px; }
.field label { display: block; font-size: 12px; font-weight: 500; color: #5d6c80; }
.field input, .field select, .field textarea { width: 100%; padding: 10px 12px; border: 1px solid #dfe5ed; border-radius: 8px; background: #fff; font-size: 13px; line-height: 1.5; }
.field input, .field select { min-height: 41px; }
.field textarea { min-height: 115px; line-height: 1.75; }
.field input::placeholder, .field textarea::placeholder { color: #6c7786; }
.field input:disabled, .field select:disabled, .field textarea:disabled { background: #f6f8fb; color: #6c7786; }
.field > small, .field > p { margin: 0; color: #6c7786; font-size: 10px; line-height: 1.6; }
.field-full { grid-column: 1 / -1; }
.form-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 23px; }
.form-actions > .small { color: #6c7786; font-size: 11px; }
.startup-list { margin: 0 0 27px; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.startup-item { display: flex; align-items: flex-start; gap: 16px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.step-number { display: grid; place-items: center; flex: 0 0 auto; width: 25px; height: 25px; margin-top: 1px; border-radius: 7px; background: #f0f5fc; color: #6c7786; font-size: 11px; }
.step-content { flex: 1; min-width: 0; }
.step-content strong { display: block; font-size: 13px; font-weight: 550; }
.step-content p { margin: 5px 0 0; color: #6c7786; font-size: 12px; line-height: 1.65; }
.step-controls { display: flex; align-items: center; flex: 0 0 auto; gap: 3px; }
.step-controls .icon-button { width: 25px; height: 25px; }
.step-controls .icon-button svg { width: 14px; height: 14px; }
.connection-list, .models-list { border-top: 1px solid var(--line); }
.connection-row, .model-row { display: flex; align-items: flex-start; flex-wrap: wrap; gap: 15px; padding: 24px 0; border-bottom: 1px solid var(--line); }
.resource-icon, .provider-icon { display: grid; place-items: center; flex: 0 0 auto; width: 42px; height: 42px; padding: 10px; border: 1px solid #e4eaf3; border-radius: 11px; color: #6990c4; background: #f8fbff; }
.resource-icon img, .provider-icon img { width: 23px; height: 23px; object-fit: contain; }
.resource-main { flex: 1; min-width: 150px; }
.resource-main strong, .resource-main h3 { display: block; margin: 0 0 4px; font-size: 14px; font-weight: 550; }
.resource-main p { margin: 0; color: #6c7786; font-size: 11px; }
.resource-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 9px 16px; margin-top: 13px; color: #6c7786; font-size: 11px; }
.resource-meta > span { display: inline-flex; align-items: center; gap: 5px; }
.resource-meta svg { width: 13px; height: 13px; }
.connection-row > .button, .model-row > .button { margin-left: auto; }
.connection-detail { flex-basis: 100%; margin: 5px 0 0 57px; }
.connection-detail dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 17px 25px; margin: 0; padding: 20px 0 0; border-top: 1px solid #edf0f5; }
.detail-pair dt { margin-bottom: 4px; color: #6c7786; font-size: 10px; }
.detail-pair dd { margin: 0; color: #62758c; font-size: 12px; overflow-wrap: anywhere; }
.model-row { align-items: center; }
.provider-icon { background: #fafbfc; color: #6c7786; font-size: 13px; font-weight: 650; }
.model-row .resource-meta { margin-top: 9px; }

.metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 25px; margin: 35px 0 39px; }
.metric { min-width: 0; padding: 2px 0 1px; }
.metric + .metric { padding-left: 25px; border-left: 1px solid var(--line); }
.metric-label { margin-bottom: 10px; color: #6c7786; font-size: 12px; }
.metric-value { color: #2d3c50; font-size: 29px; line-height: 1.2; font-weight: 500; letter-spacing: -.8px; }
.metric-note { margin-top: 9px; color: #6c7786; font-size: 11px; }
.filter-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin: 0 0 19px; }
.filter-bar select, .filter-bar input { min-height: 34px; max-width: 220px; padding: 7px 10px; border: 1px solid #e2e7ee; border-radius: 7px; background: #fff; color: #6c7786; font-size: 11px; }
.filter-bar .button { min-height: 34px; font-size: 11px; }
.data-table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.data-table-wrap table { width: 100%; border-collapse: collapse; text-align: left; font-size: 12px; }
.data-table-wrap th { padding: 12px 13px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); color: #6c7786; background: #fcfdff; font-weight: 500; font-size: 10px; white-space: nowrap; }
.data-table-wrap td { padding: 16px 13px; border-bottom: 1px solid #edf0f4; color: #6c7786; vertical-align: top; }
.data-table-wrap th:first-child, .data-table-wrap td:first-child { padding-left: 0; }
.data-table-wrap th:last-child, .data-table-wrap td:last-child { padding-right: 0; }
.data-table-wrap td .badge { font-size: 9px; }
.data-table-wrap td strong { display: block; margin-bottom: 3px; color: #53677f; font-weight: 500; }
.data-table-wrap td small { display: block; color: #6c7786; font-size: 9px; }
.data-table-wrap .empty-table { padding: 45px 20px; text-align: center; color: #6c7786; font-size: 12px; }
.usage-note { margin: 17px 0 0; color: #6c7786; font-size: 11px; line-height: 1.75; }
.balance-hero { margin: 31px 0; padding: 0 0 30px; border-bottom: 1px solid var(--line); }
.balance-hero > .small { color: #6c7786; font-size: 11px; }
.balance-amount { margin: 12px 0 19px; font-size: 45px; line-height: 1.1; font-weight: 500; color: #304157; letter-spacing: -1.6px; }
.balance-amount small { font-size: 24px; font-weight: 400; }
.balance-hero > p { color: #6c7786; font-size: 11px; }
.amount-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 14px 0 20px; }
.amount-option { min-height: 45px; padding: 10px 12px; border: 1px solid #e0e7f0; border-radius: 8px; color: #6c7786; background: #fff; font-size: 13px; }
.amount-option:hover { border-color: #b3cdeb; }
.amount-option.is-selected { color: #287be2; border-color: #79aff5; background: #f1f7ff; }
.payment-options { display: flex; flex-direction: column; gap: 10px; margin: 14px 0 20px; }
.payment-option { display: flex; align-items: center; gap: 10px; padding: 14px; border: 1px solid #e4eaf3; border-radius: 8px; color: #6c7786; font-size: 12px; }
.payment-option input { margin: 0; }
.payment-option svg { width: 19px; height: 19px; color: #6c7786; }
.payment-option small { display: block; margin-top: 2px; font-size: 10px; color: #6c7786; }
.payment-summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 23px 0 0; padding-top: 18px; border-top: 1px solid var(--line); color: #6c7786; font-size: 12px; }
.payment-summary strong { color: #516a89; font-size: 17px; font-weight: 500; }
.storage-meter { height: 7px; margin: 20px 0 14px; overflow: hidden; border-radius: 10px; background: #edf2f8; }
.storage-meter > span, .storage-meter > div { display: block; height: 100%; min-width: 0; border-radius: inherit; background: #8cb9f4; }
.storage-breakdown { display: flex; align-items: center; justify-content: space-between; gap: 14px; color: #6c7786; font-size: 11px; }
.storage-breakdown strong { color: #6c7786; font-weight: 500; }
.retention-options { display: flex; flex-direction: column; gap: 12px; margin: 17px 0 24px; }
.retention-option { display: flex; align-items: flex-start; gap: 12px; padding: 17px 18px; border: 1px solid #e2e9f2; border-radius: 9px; background: #fff; }
.retention-option:has(input:checked) { border-color: #9dc3f5; background: #f8fbff; }
.retention-option input { flex: 0 0 auto; margin: 4px 0 0; }
.retention-option strong { display: block; margin-bottom: 4px; color: #617a9b; font-size: 13px; font-weight: 500; }
.retention-option p, .retention-option small { display: block; max-width: 500px; margin: 0; color: #6c7786; font-size: 11px; line-height: 1.7; }

.modal { width: min(560px, calc(100vw - 36px)); max-height: calc(100dvh - 64px); margin: auto; padding: 0; overflow-y: auto; border: 1px solid #e4e9f1; border-radius: 16px; color: var(--ink); background: #fff; box-shadow: 0 24px 100px rgb(21 42 71 / 17%); }
.modal::backdrop { background: rgb(26 42 66 / 24%); backdrop-filter: blur(2px); }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 24px 27px 0; }
.modal-head h2 { margin: 0; padding-top: 3px; color: #3e526d; font-size: 20px; font-weight: 550; }
.modal-head .icon-button { margin: -2px -5px 0 0; }
.modal-body { padding: 20px 27px 26px; }
.modal-body > .subtitle, .modal-body > p { margin: 0 0 22px; color: #6c7786; font-size: 12px; line-height: 1.75; }
.modal-body > .soft-notice { margin-top: 19px; }
.modal-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 10px; padding: 17px 27px 20px; border-top: 1px solid #edf1f6; }
.modal-actions > .small { margin-right: auto; color: #6c7786; font-size: 10px; }
#toast, .toast { position: fixed; bottom: 30px; left: calc(50% + var(--sidebar-width) / 2); z-index: 100; max-width: min(520px, calc(100vw - 40px)); padding: 12px 18px; border: 1px solid #dce6f2; border-radius: 10px; color: #56708f; background: #fff; box-shadow: 0 6px 30px rgb(23 49 85 / 10%); font-size: 12px; line-height: 1.6; text-align: center; opacity: 0; visibility: hidden; transform: translate(-50%, 12px); transition: opacity .18s, transform .18s, visibility .18s; pointer-events: none; }
#toast.show, .toast.show { opacity: 1; visibility: visible; transform: translate(-50%, 0); }

/* Shared elements and the concrete screen markup. */
.sr-only { 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; clip-path: inset(50%) !important; white-space: nowrap !important; border: 0 !important; }
.skip-link { position: fixed; top: 12px; left: calc(var(--sidebar-width) + 20px); z-index: 200; padding: 11px 16px; border: 1px solid #b8d4f8; border-radius: 8px; background: #fff; color: #2467b7; font-size: 13px; box-shadow: 0 4px 20px rgb(23 49 85 / 10%); transform: translateY(-160%); }
.skip-link:focus { transform: translateY(0); }
.nojs { position: fixed; inset: 100px 25px auto calc(var(--sidebar-width) + 25px); z-index: 25; padding: 22px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.nojs a { color: var(--blue); text-decoration: underline; }
.brand { gap: 0; }
.brand img { margin-right: 10px; }
.brand .domain { margin: 0; }
.sidebar > .new-work { flex: 0 0 auto; width: calc(100% - 28px); margin-left: 14px; margin-right: 14px; }
.recent-nav { margin-top: 0; }
.profile-initial { display: grid; place-items: center; flex: 0 0 auto; width: 32px; height: 32px; border-radius: 50%; background: #e9eef5; color: #61748d; font-size: 12px; font-weight: 550; }
.profile-link > span:not(.profile-initial) { font-size: 13px; font-weight: 500; }
.profile-link.is-active { background: #e9f1fc; color: #1167d8; }
.back-nomaco { justify-content: space-between; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; }
.page-head > div:first-child { flex: 1; min-width: 0; }
.page-head .head-actions { flex: 0 0 auto; margin-top: 3px; }
.page-head .head-actions .button { white-space: nowrap; }
.home-note { max-width: 720px; margin: 12px auto 0; color: #6c7786; font-size: 11px; line-height: 1.7; }
.home-footnote { max-width: 720px; margin: 40px auto 0; color: #6c7786; font-size: 11px; line-height: 1.9; }
.composer-model { display: inline-flex; align-items: center; gap: 7px; min-height: 30px; padding: 4px 6px; border: 0; border-radius: 6px; background: transparent; color: #6c7786; font-size: 11px; }
.composer-model:hover { background: #f2f6fc; color: #3f6ea9; }
.composer-model > span { font-size: 13px; }
.composer-hints > .icon-button { width: 29px; height: 29px; margin-left: -4px; }
.continue-label { display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.continue-label .small { font-size: 10px; }
.work-line > span.work-line-icon { display: grid; place-items: center; flex: 0 0 28px; width: 28px; height: 28px; color: #7790af; }
.work-line-icon svg { width: 19px; height: 19px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: 30px 0 16px; }
.section-heading .section-title { margin: 0; }
.section-heading > .small { font-size: 11px; }
.settings-group > .section-heading:first-child { margin-top: 0; }
.subsection-title { margin: 25px 0 12px; font-size: 13px; font-weight: 550; }
.settings-group > .field + .field { margin-top: 25px; }
.field-hint, .field > .field-hint { margin: 0; color: #6c7786; font-size: 11px; line-height: 1.65; }
.check-row { display: flex; align-items: flex-start; gap: 9px; margin: 13px 0; color: #64748a; font-size: 12px; line-height: 1.7; cursor: pointer; }
.check-row input { flex: 0 0 auto; width: 14px; height: 14px; margin: 3px 0 0; }
.check-row + .field { margin-top: 24px; }
.settings-group.compact { margin: 23px 0 18px; }
.settings-group.compact .section-title { margin-top: 0; font-size: 13px; }
.secret-placeholder { display: flex; align-items: flex-start; gap: 10px; margin: 20px 0; padding: 13px 14px; border: 1px dashed #dce4ee; border-radius: 8px; background: #fafbfd; color: #6c7c92; }
.secret-placeholder > svg, .secret-placeholder > span svg { width: 17px; height: 17px; margin-top: 2px; color: #7690b1; }
.secret-placeholder > span { flex: 0 0 auto; }
.secret-placeholder p { margin: 0; font-size: 11px; line-height: 1.75; }
.book-search { max-width: none; width: 100%; gap: 12px; }
.book-search input { flex: 1; min-width: 0; width: auto; }
.book-search select { flex: 0 0 156px; min-width: 0; max-width: 200px; min-height: 41px; padding: 9px 11px; border: 1px solid #e3e8ee; border-radius: 8px; background: #fff; color: #66778e; font-size: 12px; }
.book-bottom-note { display: flex; align-items: flex-start; gap: 12px; margin: 33px 0 19px; color: #6c7786; }
.book-bottom-note > svg { width: 19px; height: 19px; margin-top: 2px; color: #7b97b9; }
.book-bottom-note p { margin: 0; font-size: 12px; line-height: 1.85; }
.back-link { display: inline-block; margin-bottom: 24px; font-size: 12px; }
.chapter-summary .section-title { margin: 0 0 9px; font-size: 13px; }
.chapter-summary p { margin: 0; }
.source-list { border-top: 1px solid #edf0f4; }
.source-link { padding: 15px 0; }
.source-link > span { flex: 1; min-width: 0; }
.source-link strong { display: block; margin-bottom: 3px; color: #4575b0; font-size: 12px; font-weight: 500; }
.source-link small { display: block; color: #6c7786; font-size: 11px; }
.source-link:hover strong { color: var(--blue); }
.text-action { padding: 0 3px; border: 0; border-radius: 3px; background: transparent; color: #7892b2; font-size: 12px; }
.text-action:hover { background: #edf4ff; color: var(--blue); }
.preserve-lines { white-space: pre-line; overflow-wrap: anywhere; }
.connection-status { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; padding-top: 2px; }
.connection-status .small { font-size: 10px; }
.resource-main > .resource-meta { margin-top: 5px; }
.resource-main > small { display: block; color: #6c7786; font-size: 11px; }
.connections-next { margin-top: 43px; }
.connections-next .section-title { margin-top: 0; }
.connections-next > p { margin-bottom: 20px; font-size: 13px; line-height: 1.8; }
.connection-types, .attachment-types { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 25px; color: #6e839f; }
.connection-types > span, .attachment-types > span { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; }
.connection-types svg, .attachment-types svg { width: 17px; height: 17px; color: #7894b8; }
.attachment-types { margin: 22px 0 26px; gap: 15px 23px; }
.modal .connection-detail { margin: 0; }
.modal .connection-detail dl { padding-top: 0; border-top: 0; }
.modal .connection-detail + .usage-note { margin-top: 23px; }
.filter-bar { align-items: flex-end; }
.filter-bar > .field { min-width: 145px; }
.filter-bar > .badge { margin: 0 0 8px auto; }
.metric-split { font-size: 27px; white-space: nowrap; }
.metric-split > span { color: #6c7786; font-size: 19px; font-weight: 400; letter-spacing: -.4px; }
.data-table-wrap table { min-width: 660px; }
.table-work { display: block; max-width: 245px; padding: 0; border: 0; background: transparent; text-align: left; }
.data-table-wrap .table-work strong { font-size: 12px; line-height: 1.5; }
.data-table-wrap .table-work small { font-size: 10px; }
.table-work:hover strong { color: var(--blue); }
.data-table-wrap .empty-table { display: flex; flex-direction: column; align-items: center; padding: 36px 20px 41px; }
.empty-table svg { width: 25px; height: 25px; margin-bottom: 14px; color: #879ebc; }
.data-table-wrap .empty-table strong { margin: 0 0 8px; color: #60758e; font-size: 13px; font-weight: 500; }
.empty-table p { max-width: 420px; margin: 0; color: #6c7786; font-size: 11px; line-height: 1.8; }
.usage-legend { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 23px; margin: 18px 0 0; color: #6c7786; font-size: 10px; }
.usage-legend > span { display: inline-flex; align-items: center; gap: 6px; }
.legend-dot { display: inline-block; width: 5px; height: 5px; border-radius: 50%; }
.legend-dot.exact { background: #81a8d7; }
.legend-dot.estimate { background: #b4a7d5; }
.legend-dot.missing { background: #b0bac7; }
.balance-hero { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; }
.balance-hero > .badge { margin-top: 2px; }
.balance-hero .balance-amount { margin: 12px 0 11px; }
.balance-amount > span { font-size: 29px; font-weight: 400; color: #6a7c93; }
.balance-hero .small { margin: 0; font-size: 11px; }
.amount-options { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.payment-option strong { font-size: 12px; font-weight: 500; }
.payment-option:has(input:checked) { border-color: #a1c4ef; background: #f8fbff; }
.payment-summary + .button { margin-top: 23px; }
.payment-summary strong { text-align: right; }
.modal .payment-summary { margin: 0; padding: 16px 0; }
.modal .payment-summary:first-of-type { border-top: 0; }
.modal .payment-summary strong { font-size: 15px; }
.empty-ledger { padding: 26px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); color: #6c7786; font-size: 12px; }
.storage-meter > span { width: 0; }
.storage-breakdown b { margin-left: 7px; font-weight: 500; color: #6b7e98; }
.retention-option > span:not(.badge) { flex: 1; min-width: 0; }
.retention-option > .badge { align-self: flex-start; flex: 0 0 auto; margin-top: 2px; }
.document-preview { padding: 14px 0; border-top: 1px solid #e8edf4; border-bottom: 1px solid #e8edf4; }
.document-preview > div { display: flex; align-items: flex-start; gap: 14px; padding: 6px 0; }
.document-preview > div > span { flex: 0 0 15px; color: #7a90ae; font-family: "SFMono-Regular", Consolas, monospace; font-size: 10px; line-height: 1.9; text-align: right; }
.document-preview p { margin: 0; color: #5e748f; font-size: 12px; line-height: 1.8; }
.material-example { display: flex; align-items: center; gap: 13px; padding: 17px 0; border-bottom: 1px solid #e8edf4; }
.material-example > span { display: grid; place-items: center; flex: 0 0 35px; width: 35px; height: 35px; border: 1px solid #e7edf5; border-radius: 9px; color: #7793b6; background: #fafcff; }
.material-example svg { width: 18px; height: 18px; }
.material-example strong { display: block; color: #647b99; font-size: 12px; font-weight: 500; }
.material-example small { display: block; margin-top: 3px; color: #6c7786; font-size: 10px; }
.preview-work { padding: 17px 19px; border-left: 2px solid #b6d4f8; background: #f8fbff; }
.preview-work .eyebrow { display: block; font-size: 10px; }
.preview-work p { margin: 0; color: #5d7595; font-size: 13px; line-height: 1.8; overflow-wrap: anywhere; }
.preview-steps { margin: 23px 0; padding-left: 23px; color: #667d9c; font-size: 12px; }
.preview-steps li { padding: 5px 0 5px 4px; line-height: 1.8; }
.preview-steps li::marker { color: #829fc4; }
.prototype-includes { padding: 3px 0 0; }
.prototype-includes p { margin-bottom: 18px; color: #6c7f98; font-size: 12px; line-height: 1.9; }
.prototype-includes strong { color: #5b7291; font-weight: 550; }

@media (min-width: 1500px) {
  .workspace-top { padding-left: 72px; padding-right: 72px; }
  .page { padding-top: 47px; }
  .home { padding-top: 28px; }
}

@media (max-height: 800px) and (min-width: 761px) {
  .brand { min-height: 65px; padding-top: 15px; padding-bottom: 15px; }
  .agent-identity { padding-top: 4px; padding-bottom: 17px; }
  .new-work { margin-bottom: 15px; min-height: 39px; }
  .nav-primary .nav-link { min-height: 41px; padding-top: 8px; padding-bottom: 8px; }
  .nav-section-label { margin-top: 36px; }
  .recent-nav { margin-top: 0; }
}

@media (max-width: 1050px) and (min-width: 761px) {
  :root { --sidebar-width: 245px; }
  .brand { padding-left: 21px; padding-right: 21px; }
  .agent-identity { padding-left: 21px; padding-right: 17px; }
  .nav-scroll { padding-left: 12px; padding-right: 12px; }
  .nav-primary .nav-link { font-size: 15px; }
  .page { padding-left: 34px; padding-right: 34px; }
  .home-intro h1 { font-size: 33px; }
  .workspace-top { padding-left: 34px; padding-right: 34px; }
  .metrics { gap: 18px; }
  .metric + .metric { padding-left: 18px; }
}

@media (max-width: 760px) {
  :root { --sidebar-width: 274px; }
  body.nav-open { overflow: hidden; }
  .agent-shell { display: block; }
  .sidebar { width: min(300px, calc(100vw - 48px)); transform: translateX(-100%); transition: transform .2s ease; border-right: 0; box-shadow: 10px 0 40px rgb(23 42 67 / 5%); }
  body.nav-open .sidebar { transform: translateX(0); }
  .sidebar-backdrop { position: fixed; inset: 0; z-index: 35; display: block; padding: 0; border: 0; background: rgb(25 42 66 / 24%); opacity: 0; visibility: hidden; transition: opacity .2s, visibility .2s; }
  body.nav-open .sidebar-backdrop { opacity: 1; visibility: visible; }
  .workspace { margin-left: 0; }
  .mobile-header { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 60px; padding: 11px 20px; border-bottom: 1px solid #edf0f4; background: rgb(255 255 255 / 96%); backdrop-filter: blur(9px); }
  .mobile-header .brand { min-height: 0; padding: 0; gap: 8px; font-size: 15px; }
  .mobile-header .brand img { width: 25px; height: 25px; }
  .mobile-header > span { font-size: 13px; font-weight: 500; }
  .menu-button { display: grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 7px; background: transparent; color: #6c7786; }
  .menu-button svg { width: 21px; height: 21px; }
  .workspace-top { min-height: 53px; padding: 12px 24px; font-size: 10px; }
  .prototype-badge { min-height: 24px; padding: 3px 7px; font-size: 9px; }
  .page { padding: 25px 24px 64px; }
  .page-head { margin-bottom: 28px; }
  .page-head { display: block; }
  .page-head .head-actions { margin-top: 18px; }
  h1 { font-size: 28px; letter-spacing: -.85px; }
  .subtitle { font-size: 13px; }
  .home { min-height: calc(100dvh - 60px); padding: 20px 24px max(24px, env(safe-area-inset-bottom)); }
  .home-intro h1 { font-size: 32px; letter-spacing: -.95px; }
  .home-intro .subtitle { font-size: 14px; }
  .composer { margin-top: 0; padding: 0; gap: 8px; border-radius: 0; }
  .composer textarea { min-height: 38px; font-size: 16px; }
  .composer-hints { gap: 7px; font-size: 10px; }
  .continue-work { margin-top: 31px; }
  .toc-entry { gap: 15px; padding: 21px 0; }
  .chapter-number { flex-basis: 22px; font-size: 11px; }
  .chapter-main h3 { font-size: 14px; }
  .chapter-meta { gap: 8px 12px; }
  .book-meta { font-size: 10px; }
  .chapter-summary { padding: 18px 19px; }
  .form-grid { gap: 17px; }
  .metrics { gap: 16px; margin: 29px 0; }
  .metric + .metric { padding-left: 16px; }
  .metric-value { font-size: 25px; }
  .metric-label, .metric-note { font-size: 10px; }
  .settings-row { gap: 18px; }
  .startup-item { gap: 12px; }
  .step-controls { gap: 0; }
  .step-controls .icon-button { width: 22px; }
  .connection-detail { margin-left: 0; }
  .connection-row, .model-row { gap: 12px; }
  .resource-main { min-width: 140px; }
  .connection-row > .button, .model-row > .button { min-height: 33px; font-size: 11px; }
  .connection-detail dl { gap: 15px; }
  .connection-status { align-items: flex-start; }
  .section-heading { gap: 12px; }
  .section-heading > .small { max-width: 140px; font-size: 10px; text-align: right; }
  .skip-link { left: 14px; }
  .nojs { inset: 90px 20px auto; }
  .home-note, .home-footnote { font-size: 10px; }
  .home-footnote { margin-top: 31px; }
  .filter-bar > .badge { margin-left: 0; }
  .retention-option > .badge { white-space: normal; text-align: center; max-width: 100px; }
  .modal { max-height: calc(100dvh - 40px); border-radius: 13px; }
  .modal-head { padding: 21px 21px 0; }
  .modal-body { padding: 18px 21px 23px; }
  .modal-actions { padding: 16px 21px 19px; }
  #toast, .toast { bottom: 22px; left: 50%; max-width: calc(100vw - 32px); width: max-content; font-size: 11px; }
}

@media (max-width: 600px) {
  .book-search { flex-wrap: wrap; }
  .book-search input { flex-basis: 100%; }
  .book-search select { flex: 0 0 auto; width: 100%; max-width: none; }
  .desktop-break { display: none; }
  .data-table-wrap table { min-width: 620px; }
  .data-table-wrap:has(.empty-table) table { min-width: 100%; }
  .data-table-wrap:has(.empty-table) thead { display: none; }
  .data-table-wrap:has(.empty-table) td { padding: 0; border-top: 1px solid var(--line); }
  .settings-row > .button { flex: 0 0 auto; max-width: 125px; }
  .retention-option { flex-wrap: wrap; }
  .retention-option > .badge { margin-left: 26px; max-width: none; }
  .connection-status { flex: 0 0 auto; }
  .connection-row > .button { margin-left: auto; }
  .connection-detail dl { grid-template-columns: minmax(0, 1fr); }
  .balance-hero { gap: 16px; }
  .amount-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 430px) {
  .page { padding-left: 20px; padding-right: 20px; }
  .workspace-top { padding-left: 20px; padding-right: 20px; }
  .home { padding: 16px 14px max(20px, env(safe-area-inset-bottom)); }
  .home-intro h1 { font-size: 29px; }
  .home-intro .subtitle { max-width: 300px; font-size: 13px; }
  .composer-hints > span:nth-child(n+2) { display: none; }
  .work-line { gap: 10px; }
  .work-line strong { font-size: 12px; }
  .work-line .badge { font-size: 9px; }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .metrics { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .metric { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 3px 12px; }
  .metric + .metric { padding: 16px 0 0; border-left: 0; border-top: 1px solid var(--line); }
  .metric-label { margin: 0; grid-column: 1; grid-row: 1; font-size: 11px; }
  .metric-value { grid-column: 2; grid-row: 1 / 3; font-size: 26px; }
  .metric-note { grid-column: 1; grid-row: 2; margin: 0; }
  .book-meta { flex-wrap: wrap; gap: 5px; }
  .step-controls { flex-direction: column; }
  .step-content p { font-size: 11px; }
  .connection-row > .button, .model-row > .button { margin-left: 54px; }
  .amount-options { gap: 7px; }
  .amount-option { padding-left: 6px; padding-right: 6px; font-size: 12px; }
  .storage-breakdown { flex-wrap: wrap; font-size: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
