:root {
  color-scheme: dark;
  --canvas: #08111f;
  --surface: #101c2e;
  --surface-raised: #14243a;
  --surface-soft: #1c304a;
  --line: #2c4562;
  --line-strong: #4b7198;
  --text: #eff6ff;
  --muted: #aec0d8;
  --faint: #8198b5;
  --brand: #72d3ff;
  --brand-strong: #2aaee8;
  --brand-ink: #021621;
  --success: #61d6aa;
  --warning: #f7cf79;
  --danger: #ff9da8;
  --focus: #d3f0ff;
  --radius-xl: 1.35rem;
  --radius-lg: 1rem;
  --radius-md: .78rem;
  --shadow: 0 16px 45px rgba(0, 0, 0, .22);
  --ease-out: cubic-bezier(.23, 1, .32, 1);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--canvas);
  color: var(--text);
}

* { box-sizing: border-box; }
html { min-width: 320px; min-height: 100%; background: var(--canvas); }
body { min-width: 320px; min-height: 100dvh; margin: 0; background: radial-gradient(circle at 88% -15%, rgba(40, 132, 183, .20), transparent 29rem), var(--canvas); color: var(--text); font-size: 1rem; line-height: 1.55; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .58; }
a { color: inherit; }
svg { display: block; }
h1, h2, h3, p, small { overflow-wrap: anywhere; }
h1, h2, h3 { text-wrap: balance; }
h1 { margin: 0; font-size: clamp(2rem, 8.5vw, 3.6rem); line-height: 1.07; letter-spacing: -.048em; }
h2 { margin: 0; font-size: clamp(1.22rem, 5.2vw, 1.68rem); line-height: 1.2; letter-spacing: -.028em; }
h3 { margin: 0; font-size: 1rem; line-height: 1.3; }
button:focus-visible, input:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; z-index: 100; top: .75rem; left: .75rem; padding: .72rem 1rem; border-radius: .75rem; background: var(--focus); color: #05101c; font-weight: 800; transform: translateY(-180%); transition: transform 160ms var(--ease-out); }
.skip-link:focus { transform: translateY(0); }

.app-shell { min-height: 100dvh; padding-bottom: calc(4.9rem + env(safe-area-inset-bottom)); }
.topbar { position: sticky; z-index: 30; top: 0; display: flex; align-items: center; justify-content: space-between; min-height: calc(4.25rem + env(safe-area-inset-top)); gap: .7rem; padding: calc(.6rem + env(safe-area-inset-top)) 1rem .6rem; border-bottom: 1px solid rgba(110, 150, 193, .26); background: rgba(8, 17, 31, .94); backdrop-filter: blur(14px); }
.brand { display: inline-flex; align-items: center; min-width: 0; gap: .62rem; padding: .25rem; border: 0; border-radius: .7rem; background: transparent; color: var(--text); text-align: left; }
.brand-mark { display: grid; flex: 0 0 auto; place-items: center; inline-size: 2.42rem; block-size: 2.42rem; border: 1px solid #568bad; border-radius: .78rem; background: linear-gradient(145deg, #173d5d, #102338); color: var(--brand); box-shadow: 0 6px 18px rgba(44, 175, 234, .18); }
.brand-mark svg { inline-size: 1.35rem; block-size: 1.35rem; }
.brand strong { display: block; letter-spacing: -.02em; line-height: 1.1; }
.brand small { display: block; max-width: 12rem; overflow: hidden; color: var(--muted); font-size: .74rem; text-overflow: ellipsis; white-space: nowrap; }
.topbar-actions { display: flex; align-items: center; gap: .32rem; }
.status { display: inline-flex; align-items: center; gap: .38rem; max-width: 10rem; min-height: 2.25rem; padding: .35rem .58rem; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: .72rem; font-weight: 700; line-height: 1.2; white-space: nowrap; }
.status::before { content: ""; inline-size: .48rem; block-size: .48rem; flex: 0 0 auto; border-radius: 50%; background: var(--faint); }
.status-ready { border-color: rgba(97, 214, 170, .5); color: #cdf8e5; }.status-ready::before { background: var(--success); }
.status-limited { border-color: rgba(247, 207, 121, .56); color: #ffe3a7; }.status-limited::before { background: var(--warning); }
.status-offline { border-color: rgba(255, 157, 168, .56); color: #ffc2c9; }.status-offline::before { background: var(--danger); }
.status-checking::before { background: var(--brand); }

.workspace { width: min(100%, 70rem); margin: 0 auto; padding: clamp(1.25rem, 5vw, 3rem) clamp(1rem, 4vw, 2rem) calc(2rem + env(safe-area-inset-bottom)); }
.view { animation: view-enter 180ms var(--ease-out); }
.home-hero, .page-heading { max-width: 44rem; margin: 0 auto 1.4rem; }
.home-hero { text-align: left; }
.eyebrow { margin: 0 0 .38rem; color: var(--brand); font-size: .74rem; font-weight: 850; letter-spacing: .102em; line-height: 1.3; text-transform: uppercase; }
.lede { max-width: 42rem; margin: .86rem 0 0; color: var(--muted); font-size: clamp(1rem, 3.8vw, 1.12rem); }

.start-card, .continue-card, .explore-help, .recent-card, .guide-section, .coverage-card { border: 1px solid var(--line); border-radius: var(--radius-xl); background: linear-gradient(145deg, rgba(21, 37, 59, .96), rgba(12, 24, 42, .96)); box-shadow: var(--shadow); }
.start-card { max-width: 48rem; margin: 0 auto; padding: clamp(1rem, 4vw, 1.6rem); }
.section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.compact-heading { margin-bottom: .9rem; }
.universal-input { display: flex; align-items: stretch; gap: .6rem; }
.universal-input input, textarea { width: 100%; min-height: 3.1rem; padding: .75rem .88rem; border: 1px solid #4d6987; border-radius: .78rem; outline: none; background: #071424; color: var(--text); font-size: 1rem; line-height: 1.4; }
.universal-input input { flex: 1 1 auto; }
textarea { min-height: 6rem; resize: vertical; }
input::placeholder, textarea::placeholder { color: #96abc3; opacity: 1; }
input:focus, textarea:focus { border-color: var(--focus); box-shadow: 0 0 0 3px rgba(211, 240, 255, .18); }
.field-help, .field-error, .dialog-subtitle { margin: .62rem 0 0; font-size: .86rem; }
.field-help, .dialog-subtitle { color: var(--muted); }
.field-error { color: #ffc1c8; font-weight: 700; }
.text-button { padding: 0; border: 0; border-radius: .35rem; background: transparent; color: var(--brand); font-weight: 800; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .18em; }
.text-button:hover { color: var(--focus); }
.destructive-link { color: #ffc2c9; }

.button, .icon-button, .back-button, .context-action { display: inline-flex; align-items: center; justify-content: center; min-block-size: 3rem; border: 1px solid transparent; border-radius: .78rem; font-size: .93rem; font-weight: 800; line-height: 1.2; text-decoration: none; transition: transform 140ms var(--ease-out), background 160ms var(--ease-out), border-color 160ms var(--ease-out), color 160ms var(--ease-out); }
.button { padding: .62rem .95rem; }
.button:active:not(:disabled), .icon-button:active:not(:disabled), .quick-action:active, .context-action:active { transform: scale(.97); }
.button-primary { border-color: #67d1fb; background: linear-gradient(135deg, #7bd8ff, #36afe6); color: var(--brand-ink); box-shadow: 0 8px 21px rgba(32, 166, 228, .22); }
.button-primary:hover:not(:disabled) { background: linear-gradient(135deg, #a5e7ff, #5cc3ef); }
.button-quiet { border-color: var(--line); background: rgba(29, 49, 76, .7); color: var(--text); }.button-quiet:hover:not(:disabled) { border-color: var(--line-strong); background: var(--surface-soft); }
.button-danger { border-color: #d67681; background: #622433; color: #fff1f2; }.button-danger:hover:not(:disabled) { background: #7b2c3d; }
.icon-button { inline-size: 3rem; min-inline-size: 3rem; padding: .45rem; border-color: var(--line); background: rgba(17, 32, 51, .72); color: var(--text); font-family: ui-sans-serif, system-ui, sans-serif; font-size: 1rem; letter-spacing: -.03em; }.icon-button:hover { border-color: var(--line-strong); background: var(--surface-soft); }
.install-button { display: none; }
.full-button { width: 100%; margin-top: .75rem; justify-content: flex-start; }
.back-button { min-block-size: 2.75rem; padding: .35rem 0; border: 0; border-radius: 0; background: transparent; color: var(--brand); }.back-button:hover { color: var(--focus); text-decoration: underline; text-underline-offset: .2em; }

.continue-card { display: flex; align-items: center; justify-content: space-between; max-width: 48rem; gap: 1rem; margin: 1rem auto 0; padding: 1rem 1.1rem; }.continue-card p { margin: .35rem 0 0; }.card-copy { color: var(--muted); font-size: .9rem; }
.quick-actions { max-width: 48rem; margin: 1.8rem auto 0; }.quick-action-list { display: grid; gap: .65rem; }.quick-action { display: grid; grid-template-columns: 2.45rem minmax(0, 1fr) auto; align-items: center; min-height: 4.75rem; gap: .75rem; width: 100%; padding: .75rem; border: 1px solid var(--line); border-radius: var(--radius-lg); background: rgba(13, 28, 47, .7); color: var(--text); text-align: left; transition: transform 140ms var(--ease-out), background 160ms var(--ease-out), border-color 160ms var(--ease-out); }.quick-action:hover { border-color: var(--line-strong); background: rgba(24, 48, 75, .82); }.quick-action strong, .quick-action small { display: block; }.quick-action small { margin-top: .16rem; color: var(--muted); font-size: .84rem; font-weight: 500; line-height: 1.32; }.quick-icon { display: grid; place-items: center; inline-size: 2.45rem; block-size: 2.45rem; border: 1px solid #3b6588; border-radius: .7rem; background: rgba(29, 104, 144, .24); color: var(--brand); font-size: 1.18rem; font-weight: 800; }
.trust-note { display: flex; align-items: flex-start; max-width: 48rem; gap: .72rem; margin: 1.1rem auto 0; padding: .9rem 1rem; border: 1px solid rgba(114, 211, 255, .32); border-radius: var(--radius-lg); background: rgba(14, 69, 98, .2); color: var(--muted); }.trust-note p { margin: 0; font-size: .88rem; }.trust-note strong { color: #ddf5ff; }.trust-icon { display: grid; place-items: center; inline-size: 1.45rem; block-size: 1.45rem; flex: 0 0 auto; border-radius: 50%; background: #16496b; color: var(--brand); font-weight: 800; }
.explore-help, .recent-card { max-width: 48rem; margin: 1rem auto 0; padding: 1rem 1.1rem; }.explore-help h2 { font-size: 1rem; }.explore-help p { margin: .45rem 0 0; color: var(--muted); font-size: .9rem; }
.recent-list { display: grid; gap: .65rem; }.recent-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .75rem; padding: .82rem 0; border-bottom: 1px solid var(--line); }.recent-item:last-child { border-bottom: 0; }.recent-item strong, .recent-item small { display: block; }.recent-item small { margin-top: .18rem; color: var(--muted); font-size: .82rem; }.recent-actions { display: flex; align-items: center; gap: .4rem; }.recent-actions .icon-button { inline-size: 2.6rem; min-inline-size: 2.6rem; min-block-size: 2.6rem; }
.empty-state { margin: 0; color: var(--muted); }

.loading-view { display: grid; min-height: 56dvh; max-width: 36rem; margin: 0 auto; place-content: center; justify-items: start; text-align: left; }.loader { inline-size: 2.75rem; block-size: 2.75rem; margin-bottom: 1rem; border: 4px solid rgba(114, 211, 255, .22); border-top-color: var(--brand); border-radius: 50%; animation: spin .8s linear infinite; }.loading-view .button { margin-top: 1rem; }

.report-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }.report-header h1 { font-size: clamp(1.82rem, 7vw, 3.15rem); }.report-meta { margin: .55rem 0 0; color: var(--muted); font-size: .88rem; }.report-more { flex: 0 0 auto; }
.context-actions { display: flex; gap: .4rem; overflow-x: auto; margin: 0 -1rem 1rem; padding: .1rem 1rem .45rem; scrollbar-width: none; }.context-actions::-webkit-scrollbar { display: none; }.context-action { min-width: max-content; min-height: 2.7rem; padding: .53rem .76rem; border-color: var(--line); background: rgba(20, 37, 59, .76); color: var(--muted); }.context-action:hover, .active-action { border-color: #55c6f4; background: rgba(38, 134, 182, .24); color: #e2f6ff; }
.coverage-card { margin-bottom: .85rem; padding: 1rem 1.05rem; background: linear-gradient(135deg, rgba(17, 79, 109, .48), rgba(19, 37, 59, .95)); }.coverage-card h2 { font-size: 1rem; }.coverage-card p { margin: .35rem 0 0; color: #d5e7f7; }.coverage-meta { display: flex; flex-wrap: wrap; gap: .42rem; margin-top: .75rem; }.chip { display: inline-flex; align-items: center; min-height: 1.82rem; padding: .23rem .55rem; border: 1px solid #4c7696; border-radius: 99px; color: #dbedf9; font-size: .75rem; font-weight: 750; }.chip-warning { border-color: #ad8541; color: #ffe4ad; }
.guide-section { margin-bottom: .82rem; padding: clamp(1rem, 3vw, 1.35rem); }.featured-guide { border-color: #477c9e; background: linear-gradient(145deg, rgba(21, 61, 84, .75), rgba(14, 29, 47, .98)); }.guide-section p { margin: .68rem 0 0; color: #d9e6f2; }.guide-copy { font-size: 1.02rem; }.guide-section blockquote { margin: .9rem 0 0; padding: .72rem .88rem; border-left: 3px solid var(--brand); background: rgba(4, 17, 30, .46); color: #d7f2ff; font-size: .92rem; }.guide-list { display: grid; gap: .6rem; }.guide-item { padding: .82rem; border: 1px solid var(--line); border-radius: var(--radius-md); background: rgba(5, 18, 31, .46); }.guide-item p { margin-top: .4rem; color: var(--muted); font-size: .9rem; }.guide-item .analogy { color: #c4ecff; font-style: italic; }.badge { display: inline-flex; margin-top: .55rem; padding: .17rem .44rem; border: 1px solid #42667f; border-radius: 99px; color: #b7e4f7; font-size: .7rem; font-weight: 800; }.citation { display: inline-flex; align-items: center; min-height: 2.45rem; max-width: 100%; gap: .3rem; margin-top: .72rem; padding: .36rem .52rem; border: 1px solid #426a87; border-radius: .6rem; background: rgba(7, 25, 42, .92); color: var(--brand); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .75rem; font-weight: 700; line-height: 1.25; text-align: left; }.citation span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.evidence-list { display: grid; gap: .58rem; margin: 0; padding: 0; list-style: none; }.evidence-list li { display: flex; align-items: flex-start; gap: .6rem; padding: .76rem; border: 1px solid var(--line); border-radius: .75rem; background: rgba(5, 18, 31, .42); color: #dce8f3; }.evidence-list li::before { content: "•"; color: var(--brand); font-size: 1.08rem; line-height: 1; }.muted-list li::before { color: var(--warning); }.evidence-list li > div { min-width: 0; }.evidence-list p { margin: 0; }.topology-list { display: grid; gap: .48rem; }.topology-item { display: flex; align-items: center; justify-content: space-between; gap: .7rem; padding: .72rem .75rem; border: 1px solid transparent; border-radius: .7rem; background: rgba(5, 18, 31, .42); }.topology-item:hover { border-color: #456a87; }.topology-path { min-width: 0; color: #d9eeff; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .84rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.topology-item small { color: var(--muted); font-size: .76rem; text-align: right; }
.technical-details { margin: 1rem 0; border: 1px solid var(--line); border-radius: var(--radius-md); background: rgba(8, 20, 35, .55); }.technical-details summary { min-height: 3rem; padding: .8rem .95rem; color: var(--brand); cursor: pointer; font-weight: 800; }.technical-details-content { padding: 0 .95rem .95rem; }.technical-details-content p { margin: .42rem 0; color: var(--muted); font-size: .88rem; }

.dialog { width: min(calc(100% - 1.25rem), 38rem); max-height: min(88dvh, 52rem); padding: 0; overflow: hidden; border: 1px solid #4b6c89; border-radius: 1.12rem; background: var(--surface); color: var(--text); box-shadow: 0 27px 85px rgba(0, 0, 0, .58); }.dialog::backdrop { background: rgba(2, 9, 17, .78); backdrop-filter: blur(3px); }.dialog-wide { width: min(calc(100% - 1.25rem), 56rem); }.sheet-dialog { margin: auto 0 0; width: 100%; max-width: none; max-height: min(82dvh, 45rem); border-right: 0; border-bottom: 0; border-left: 0; border-radius: 1.25rem 1.25rem 0 0; }.dialog-header { display: flex; align-items: flex-start; justify-content: space-between; gap: .75rem; padding: 1rem 1rem .85rem; border-bottom: 1px solid var(--line); }.dialog-header h2 { font-size: 1.2rem; }.dialog-content { max-height: min(55dvh, 34rem); overflow: auto; padding: 1rem; color: #dce8f3; overscroll-behavior: contain; }.dialog-content p { margin: 0 0 .9rem; }.dialog-content p:last-child { margin-bottom: 0; }.dialog-actions { display: flex; justify-content: flex-end; gap: .55rem; padding: .8rem 1rem calc(.8rem + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); }
.mode-set { display: grid; gap: .6rem; margin: 0; padding: 0; border: 0; }.mode-set legend { margin-bottom: .55rem; color: var(--text); font-weight: 800; }.mode-choice { display: flex; min-height: 4.4rem; gap: .7rem; padding: .78rem; border: 1px solid var(--line); border-radius: .78rem; background: rgba(5, 17, 30, .5); cursor: pointer; }.mode-choice:has(input:checked) { border-color: var(--brand); background: rgba(32, 118, 163, .22); }.mode-choice input { inline-size: 1.25rem; block-size: 1.25rem; margin: .08rem 0 0; accent-color: var(--brand-strong); }.mode-choice strong, .mode-choice small { display: block; }.mode-choice small { margin-top: .18rem; color: var(--muted); font-size: .83rem; line-height: 1.35; }
.search-results { display: grid; gap: .55rem; }.search-empty { margin: .4rem 0; color: var(--muted); }.search-result { display: grid; grid-template-columns: minmax(0, 1fr) auto; min-height: 5rem; gap: .65rem; width: 100%; padding: .8rem; border: 1px solid var(--line); border-radius: .82rem; background: rgba(5, 17, 30, .46); color: var(--text); text-align: left; }.search-result:hover { border-color: #5a86a5; background: rgba(22, 50, 74, .8); }.search-result strong, .search-result small { display: block; }.search-result strong { color: #e2f4ff; }.search-result small { margin-top: .25rem; color: var(--muted); font-size: .83rem; line-height: 1.34; }.search-result-arrow { align-self: center; color: var(--brand); font-size: 1.35rem; }.result-meta { display: flex; flex-wrap: wrap; gap: .38rem; margin-top: .52rem; }.result-chip { display: inline-flex; min-height: 1.55rem; align-items: center; padding: .12rem .43rem; border: 1px solid #406782; border-radius: 999px; color: #bde8fb; font-size: .68rem; font-weight: 800; }.result-match { color: #a7bdcf; font-size: .77rem; }.confirm-project { display: grid; gap: .5rem; }.confirm-project h3 { color: #e0f3ff; }.confirm-project p { color: var(--muted); }.confirm-label { color: var(--faint); font-size: .75rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.evidence-browser { display: grid; gap: .72rem; }.evidence-file { padding: .82rem; border: 1px solid var(--line); border-radius: .8rem; background: rgba(5, 17, 30, .54); }.evidence-file h3 { color: #d3f1ff; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .86rem; }.evidence-file p { margin: .45rem 0 0; color: var(--muted); font-size: .84rem; white-space: pre-wrap; }.source-open { margin-top: .75rem; }
.chat-context { margin: 1rem 1rem 0; padding: .65rem .74rem; border: 1px solid rgba(114, 211, 255, .35); border-radius: .7rem; background: rgba(17, 75, 106, .25); color: #d1effd; font-size: .82rem; }.chat-messages { display: grid; gap: .72rem; max-height: 30dvh; overflow: auto; margin: 1rem; overscroll-behavior: contain; }.chat-message { padding: .72rem .8rem; border: 1px solid var(--line); border-radius: .8rem; background: rgba(5, 17, 30, .56); }.chat-message-user { margin-left: 9%; border-color: #4082a6; background: rgba(26, 107, 146, .24); }.chat-message p { margin: .28rem 0 0; white-space: pre-wrap; }.chat-message strong { color: #d5f2ff; font-size: .82rem; }.chat-citations { display: grid; gap: .32rem; margin-top: .62rem; }.chat-form { padding: 0 1rem calc(1rem + env(safe-area-inset-bottom)); }.chat-form label { display: block; margin-bottom: .45rem; font-weight: 800; }.chat-form .input-row { display: flex; align-items: flex-end; gap: .55rem; }.chat-form textarea { min-height: 3.1rem; }.chat-form .button { flex: 0 0 auto; }
.workflow-card { padding: .85rem; border: 1px solid var(--line); border-radius: .82rem; background: rgba(5, 17, 30, .48); }.workflow-card + .workflow-card { margin-top: .65rem; }.workflow-card h3 { color: #d8f1ff; }.workflow-card p { margin-top: .42rem; color: var(--muted); }.workflow-list { margin: .55rem 0 0; padding-left: 1.2rem; color: #d7e5f2; }.workflow-list li + li { margin-top: .3rem; }
.toast-region { position: fixed; z-index: 60; right: 1rem; bottom: calc(5.65rem + env(safe-area-inset-bottom)); display: grid; gap: .5rem; width: min(calc(100% - 2rem), 25rem); }.toast { padding: .8rem .9rem; border: 1px solid #4c7491; border-radius: .8rem; background: #10283d; color: #eff9ff; box-shadow: var(--shadow); font-size: .88rem; }.toast-error { border-color: #c46470; background: #3a1823; }
.bottom-nav { position: fixed; z-index: 30; right: 0; bottom: 0; left: 0; display: grid; grid-template-columns: repeat(3, 1fr); min-height: calc(4.65rem + env(safe-area-inset-bottom)); padding: .35rem .55rem calc(.35rem + env(safe-area-inset-bottom)); border-top: 1px solid rgba(105, 148, 189, .28); background: rgba(8, 17, 31, .96); backdrop-filter: blur(16px); }.nav-item { display: grid; min-height: 3.45rem; place-content: center; gap: .08rem; padding: .28rem .5rem; border: 0; border-radius: .72rem; background: transparent; color: var(--muted); font-size: .73rem; font-weight: 750; }.nav-item > span:first-child { font-size: 1.12rem; line-height: 1.05; }.nav-item.active { background: rgba(32, 126, 176, .25); color: #dbf4ff; }
[hidden] { display: none !important; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes view-enter { from { opacity: 0; transform: translateY(.4rem); } to { opacity: 1; transform: translateY(0); } }

@media (min-width: 44rem) { .topbar { padding-right: clamp(1.4rem, 5vw, 3rem); padding-left: clamp(1.4rem, 5vw, 3rem); }.home-hero { text-align: center; }.home-hero .lede { margin-right: auto; margin-left: auto; }.sheet-dialog { width: min(calc(100% - 2rem), 42rem); margin: auto; border: 1px solid #4b6c89; border-radius: 1.12rem; }.bottom-nav { right: auto; left: 50%; width: min(26rem, calc(100% - 2rem)); min-height: 4.2rem; margin-bottom: max(.7rem, env(safe-area-inset-bottom)); padding: .3rem; border: 1px solid rgba(105, 148, 189, .32); border-radius: 1rem; transform: translateX(-50%); box-shadow: var(--shadow); }.app-shell { padding-bottom: 6.2rem; }.toast-region { bottom: 6.2rem; }.install-button { display: inline-flex; } }
@media (min-width: 64rem) { .app-shell { display: grid; grid-template-columns: 5.1rem minmax(0, 1fr); min-height: 100dvh; padding-bottom: 0; }.topbar { grid-column: 1 / -1; }.workspace { grid-column: 2; width: min(100%, 76rem); padding-bottom: 3rem; }.bottom-nav { position: sticky; grid-column: 1; grid-row: 2; align-self: start; width: auto; min-height: auto; margin: 1.2rem 0 0; padding: .45rem; border: 0; border-radius: 0; background: transparent; box-shadow: none; transform: none; }.nav-item { min-height: 3.55rem; }.nav-item > span:last-child { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }.home-hero, .page-heading, .start-card, .continue-card, .quick-actions, .trust-note, .explore-help, .recent-card { margin-right: auto; margin-left: 0; }.home-hero { text-align: left; }.home-hero .lede { margin-left: 0; }.context-actions { margin-right: 0; margin-left: 0; padding-right: 0; padding-left: 0; }.toast-region { bottom: 1rem; } }
@media (max-width: 28rem) { .brand small, .status, .install-button { display: none; }.topbar { gap: .35rem; padding-right: .65rem; padding-left: .65rem; }.topbar-actions { gap: .22rem; }.icon-button { inline-size: 2.75rem; min-inline-size: 2.75rem; min-block-size: 2.75rem; }.universal-input { flex-direction: column; }.universal-input .button { width: 100%; }.continue-card { align-items: flex-start; flex-direction: column; }.continue-card .button { width: 100%; }.chat-form .input-row { flex-direction: column; }.chat-form .button { width: 100%; }.topology-item { align-items: flex-start; flex-direction: column; gap: .2rem; }.topology-item small { text-align: left; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; } }
@media (prefers-contrast: more) { :root { --canvas: #020812; --surface: #071525; --surface-raised: #0a1b2e; --line: #98c8ed; --line-strong: #d1efff; --muted: #e2effa; --brand: #9ee4ff; }.start-card, .continue-card, .explore-help, .recent-card, .guide-section, .coverage-card, .quick-action, .guide-item, .evidence-list li, .topology-item, .evidence-file { background: #091a2c; } }

.notice { margin: 0 0 .82rem; padding: .78rem .9rem; border: 1px solid rgba(247, 207, 121, .58); border-radius: .78rem; background: rgba(106, 72, 21, .3); color: #ffe7b5; font-size: .9rem; }
.notice strong { color: #fff4d9; }
.compare-form { display: grid; gap: .52rem; margin-top: 1rem; padding: .9rem; border: 1px solid var(--line); border-radius: .82rem; background: rgba(5, 17, 30, .46); }
.compare-form label { margin-top: .18rem; color: var(--text); font-size: .88rem; font-weight: 800; }
.compare-form input { width: 100%; min-height: 3rem; padding: .68rem .75rem; border: 1px solid #4d6987; border-radius: .72rem; background: #071424; color: var(--text); }
.compare-form .button { width: 100%; margin-top: .25rem; }
.compare-result { display: grid; gap: .62rem; margin-top: .9rem; }
.compare-result > h3 { margin-top: .25rem; color: #d8f1ff; }
.compare-result > p { margin: 0; color: var(--muted); }
.compare-file { margin-top: 0; }
.workflow-list .citation { margin-left: 0; }
@media (min-width: 32rem) { .compare-form { grid-template-columns: 1fr 1fr; align-items: end; }.compare-form label:nth-of-type(1), .compare-form input:nth-of-type(1), .compare-form label:nth-of-type(2), .compare-form input:nth-of-type(2) { grid-column: span 1; }.compare-form .field-help, .compare-form .field-error, .compare-form .button { grid-column: 1 / -1; } }

/* v4.0.1 mobile resilience hotfix: source CSS and HTML are always revision-matched at build time. */
button, input, textarea { -webkit-appearance: none; appearance: none; }
html, body { max-width: 100%; overflow-x: hidden; }
.workspace { min-width: 0; padding-bottom: calc(7.25rem + env(safe-area-inset-bottom)); }
.topbar, .topbar-actions, .brand, .universal-input, .quick-action, .search-result, .dialog-header, .dialog-actions { min-width: 0; }
.brand { flex: 1 1 auto; }
.brand > span:last-child { min-width: 0; }
.topbar-actions { flex: 0 0 auto; }
.universal-input { flex-direction: column; }
.universal-input input { min-width: 0; }
.universal-input .button { width: 100%; }
.quick-action { grid-template-columns: 2.45rem minmax(0, 1fr) auto; align-items: start; min-height: 0; }
.quick-action > span:nth-child(2) { min-width: 0; }
.quick-action strong, .quick-action small { min-width: 0; white-space: normal; word-break: normal; overflow-wrap: anywhere; }
.bottom-nav { min-height: calc(5rem + env(safe-area-inset-bottom)); padding-right: max(.55rem, env(safe-area-inset-right)); padding-left: max(.55rem, env(safe-area-inset-left)); }
.nav-item { min-width: 0; }
.dialog[open] { display: flex; flex-direction: column; }
.dialog-content { min-height: 0; max-height: none; flex: 1 1 auto; }
.sheet-dialog[open] { width: 100%; max-width: none; max-height: calc(100dvh - env(safe-area-inset-top) - .5rem); margin: auto 0 0; }
.sheet-dialog .dialog-content { max-height: none; overscroll-behavior-y: contain; }
.search-result { align-items: start; }
.search-result > span:first-child { min-width: 0; }
.search-result strong, .search-result small, .result-match { overflow-wrap: anywhere; }

@media (max-width: 28rem) {
  .app-shell { padding-bottom: calc(5.25rem + env(safe-area-inset-bottom)); }
  .workspace { padding: 1.25rem 1rem calc(7.35rem + env(safe-area-inset-bottom)); }
  .topbar { gap: .35rem; padding-right: max(.6rem, env(safe-area-inset-right)); padding-left: max(.6rem, env(safe-area-inset-left)); }
  .brand { max-width: calc(100% - 6.1rem); gap: .46rem; }
  .brand-mark { inline-size: 2.2rem; block-size: 2.2rem; }
  .brand small, .status, .install-button { display: none; }
  .topbar-actions { gap: .18rem; }
  .icon-button { inline-size: 2.7rem; min-inline-size: 2.7rem; min-block-size: 2.7rem; }
  .home-hero, .page-heading { margin-bottom: 1.15rem; }
  .start-card { padding: 1rem; }
  .quick-actions { margin-top: 1.45rem; }
  .quick-action { gap: .62rem; padding: .78rem .7rem; }
  .quick-icon { inline-size: 2.25rem; block-size: 2.25rem; }
  .quick-action small { font-size: .82rem; }
  .context-actions { margin-right: -1rem; margin-left: -1rem; }
  .bottom-nav { min-height: calc(4.85rem + env(safe-area-inset-bottom)); }
  .nav-item { padding: .26rem .22rem; font-size: .72rem; }
  .sheet-dialog[open] { max-height: calc(100dvh - env(safe-area-inset-top)); border-radius: 1.1rem 1.1rem 0 0; }
  .sheet-dialog .dialog-header { padding: .9rem 1rem .76rem; }
  .sheet-dialog .dialog-content { padding: .82rem 1rem; }
  .dialog-actions { flex-wrap: wrap; }
}

@media (min-width: 32rem) {
  .universal-input { flex-direction: row; }
  .universal-input .button { width: auto; flex: 0 0 auto; }
}
