:root {
  color-scheme: light;
  --ink: #182536;
  --muted: #596a7c;
  --subtle: #596a7c;
  --line: #dce4ec;
  --line-strong: #c7d3df;
  --canvas: #f4f7fb;
  --surface: #fff;
  --surface-soft: #f8fafc;
  --brand: #17685c;
  --brand-hover: #0e554b;
  --brand-pale: #e7f3f0;
  --accent: #c88a32;
  --danger: #a62f3c;
  --danger-pale: #fff1f1;
  --success: #17654c;
  --success-pale: #eaf6ef;
  --shadow: 0 18px 50px rgba(26, 47, 68, .07);
  --radius: 16px;
  font-family: "DM Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; min-height: 100vh; background: var(--canvas); color: var(--ink); }
button, input, select, textarea { font: inherit; }
a { color: var(--brand); }
a:hover { color: var(--brand-hover); }
:focus-visible { outline: 3px solid #b47822; outline-offset: 3px; }
button:disabled { cursor: wait; opacity: .65; }

.boot-screen, .center-state { min-height: 100vh; display: grid; place-content: center; justify-items: center; gap: 12px; padding: 28px; color: var(--muted); text-align: center; }
.spinner { display: inline-block; width: 24px; height: 24px; border: 3px solid #d5e2e8; border-top-color: var(--brand); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.auth-page { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(340px, .86fr); background: var(--surface); }
.auth-story { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; min-width: 0; min-height: 100vh; padding: clamp(28px, 5vw, 68px); color: #eff8f5; background: #153d3a; }
.auth-story::before { position: absolute; content: ""; width: min(42vw, 520px); aspect-ratio: 1; top: 18%; left: 9%; border: 1px solid rgba(255,255,255,.12); border-radius: 50%; box-shadow: 0 0 0 44px rgba(255,255,255,.025), 0 0 0 90px rgba(255,255,255,.02); pointer-events: none; }
.auth-brand, .brand-link { display: inline-flex; align-items: center; gap: 11px; color: inherit; text-decoration: none; font: 800 17px Manrope, sans-serif; letter-spacing: -.035em; }
.brand-mark { display: grid; width: 34px; height: 34px; place-items: center; color: #133c37; background: #d6eee6; border-radius: 11px; font: 800 17px Manrope, sans-serif; }
.story-copy { position: relative; max-width: 560px; margin: auto 0; padding: 48px 0; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; color: var(--brand); font-size: 12px; font-weight: 700; letter-spacing: .11em; text-transform: uppercase; }
.auth-story .eyebrow { color: #b9e2d4; }
.story-copy h1 { margin: 20px 0 16px; font: 700 clamp(36px, 5vw, 62px)/1.08 Manrope, sans-serif; letter-spacing: -.055em; }
.story-copy p { max-width: 460px; color: #d3e3de; font-size: 17px; line-height: 1.7; }
.story-note { color: #c5d9d2; font-size: 13px; }
.auth-panel { min-width: 0; display: grid; place-items: center; padding: 36px 24px; }
.auth-card { min-width: 0; width: min(100%, 440px); }
.auth-card h2 { margin: 0 0 8px; font: 700 29px Manrope, sans-serif; letter-spacing: -.04em; }
.auth-card > p { margin: 0 0 25px; color: var(--muted); line-height: 1.55; }
.field { min-width: 0; display: grid; gap: 7px; margin: 16px 0; }
.field label { color: #334558; font-size: 13px; font-weight: 700; }
.field input, .field select, .field textarea { min-width: 0; max-width: 100%; width: 100%; min-height: 46px; padding: 10px 13px; color: var(--ink); background: var(--surface); border: 1px solid var(--line-strong); border-radius: 10px; transition: border-color .15s, box-shadow .15s; }
.field input::placeholder { color: #8291a1; }
.field input:focus, .field select:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(23,104,92,.12); outline: none; }
.field-hint { color: var(--muted); font-size: 12px; line-height: 1.5; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-width: 0; max-width: 100%; min-height: 44px; padding: 10px 17px; color: #fff; background: var(--brand); border: 1px solid var(--brand); border-radius: 10px; cursor: pointer; font-weight: 700; line-height: 1.35; text-align: center; white-space: normal; text-decoration: none; transition: background .15s, border-color .15s, transform .15s; }
.button:hover { color: #fff; background: var(--brand-hover); border-color: var(--brand-hover); }
.button:active { transform: translateY(1px); }
.button.secondary { color: #26384a; background: #fff; border-color: var(--line-strong); }
.button.secondary:hover { background: var(--surface-soft); border-color: #96a9b8; }
.button.quiet { min-height: 38px; padding: 0 12px; color: var(--muted); background: transparent; border-color: transparent; }
.button.quiet:hover { color: var(--ink); background: #edf2f6; }
.button.full { width: 100%; margin-top: 8px; }
.form-footer { margin-top: 18px; color: var(--muted); font-size: 14px; text-align: center; }
.form-footer a { font-weight: 700; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.form-error, .notice { margin: 14px 0; padding: 12px 14px; border: 1px solid #ecc4c7; border-radius: 10px; color: #76212c; background: var(--danger-pale); font-size: 14px; line-height: 1.5; }
.notice.info { color: #354d60; border-color: #d4e1ea; background: #f0f6fa; }
.notice.success { color: var(--success); border-color: #cde7d6; background: var(--success-pale); }
.hidden { display: none !important; }

.portal-shell { min-width: 0; width: 100%; min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 5; overflow-y: auto; display: flex; width: 248px; flex-direction: column; padding: 24px 16px 18px; background: #fff; border-right: 1px solid var(--line); }
.sidebar-heading { display: flex; min-width: 0; align-items: flex-start; justify-content: space-between; gap: 8px; }
.navigation-close, .mobile-navigation { display: none; }
.navigation-backdrop[hidden] { display: none; }
.navigation-backdrop { position: fixed; inset: 0; z-index: 20; background: rgba(24, 37, 54, .4); }
body.navigation-locked { overflow: hidden; }
.sidebar .brand-link { padding: 0 10px 24px; color: var(--ink); }
.workspace-picker { display: grid; gap: 7px; margin: 0 0 24px; padding: 12px; background: var(--surface-soft); border: 1px solid var(--line); border-radius: 12px; }
.workspace-picker label { color: var(--subtle); font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.workspace-picker select { width: 100%; min-width: 0; padding: 7px 22px 7px 0; color: var(--ink); background: transparent; border: 0; font-size: 13px; font-weight: 700; }
.workspace-role { color: var(--muted); font-size: 11px; text-transform: capitalize; }
.nav-label { margin: 0 10px 9px; color: var(--subtle); font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.side-nav { display: grid; gap: 4px; }
.nav-link { display: flex; align-items: center; gap: 12px; min-width: 0; min-height: 44px; padding: 10px 11px; color: #46586a; border-radius: 9px; font-size: 14px; font-weight: 600; line-height: 1.4; text-decoration: none; }
.nav-link > span:last-child { min-width: 0; }
.nav-link:hover { color: var(--ink); background: #f2f6f8; }
.nav-link[aria-current="page"] { color: #155a51; background: var(--brand-pale); }
.nav-icon { display: grid; flex: 0 0 22px; width: 22px; place-items: center; color: inherit; font-size: 16px; }
.sidebar-bottom { margin-top: auto; padding-top: 16px; border-top: 1px solid var(--line); }
.account-mini { overflow: hidden; padding: 9px 10px; color: var(--muted); font-size: 12px; text-overflow: ellipsis; }
.account-mini strong { display: block; overflow: hidden; margin-bottom: 3px; color: var(--ink); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.main-column { min-width: 0; min-height: 100vh; margin-left: 248px; }
.topbar { position: sticky; top: 0; z-index: 4; display: flex; min-height: 70px; align-items: center; justify-content: space-between; gap: 16px; padding: 12px clamp(20px, 4vw, 48px); background: rgba(255,255,255,.94); border-bottom: 1px solid var(--line); backdrop-filter: blur(10px); }
.breadcrumbs { min-width: 0; color: var(--muted); font-size: 13px; line-height: 1.5; overflow-wrap: break-word; }
.topbar-right { display: flex; min-width: 0; align-items: center; gap: 8px; }
.topbar-right .button { flex-shrink: 0; }
.topbar-user { max-width: 220px; overflow: hidden; color: #435568; font-size: 13px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.main-content { min-width: 0; width: min(100%, 1140px); margin: 0 auto; padding: 36px clamp(20px, 4vw, 48px) 64px; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 27px; }
.page-heading h1 { margin: 6px 0 7px; font: 700 clamp(26px, 3.2vw, 34px)/1.15 Manrope, sans-serif; letter-spacing: -.045em; }
.page-heading p { max-width: 650px; margin: 0; color: var(--muted); line-height: 1.55; }
.page-heading > div { min-width: 0; }
.page-heading h1, .panel h2, .panel h3 { overflow-wrap: break-word; }
.content-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 17px; }
.content-grid > *, .form-grid > *, .readiness-grid > *, .knowledge-add-grid > * { min-width: 0; }
.panel { min-width: 0; padding: 21px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.panel.span-12 { grid-column: span 12; }
.panel.span-8 { grid-column: span 8; }
.panel.span-6 { grid-column: span 6; }
.panel.span-4 { grid-column: span 4; }
.panel h2 { margin: 0 0 13px; font: 700 17px Manrope, sans-serif; letter-spacing: -.02em; }
.panel p { color: var(--muted); line-height: 1.65; }
.stat-value { margin: 8px 0 3px; font: 700 32px Manrope, sans-serif; letter-spacing: -.05em; }
.stat-label { color: var(--muted); font-size: 13px; }
.site-status-grid { grid-column: 1 / -1; min-width: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 17px; }
.status-card { display: flex; flex-direction: column; align-items: flex-start; gap: 5px; }
.status-card .stat-value { overflow-wrap: normal; word-break: normal; }
.status-card .status-value { font-size: 23px; line-height: 1.3; }
.status-card .eyebrow { font-size: 11px; }
.status-card a { margin-top: auto; padding-top: 8px; font-size: 14px; }
.row-actions { display: flex; min-width: 0; flex-wrap: wrap; gap: 10px; }
.badge { display: inline-flex; align-items: center; max-width: 100%; min-height: 24px; padding: 2px 9px; color: #34495d; background: #edf2f6; border-radius: 999px; font-size: 11px; font-weight: 700; overflow-wrap: break-word; text-transform: capitalize; }
.badge.role { color: #16594f; background: var(--brand-pale); }
.badge.status { color: #435568; }
.knowledge-overview-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.knowledge-overview-head > div { min-width: 0; }
.knowledge-overview-head h2 { margin-bottom: 5px; }
.knowledge-overview-head p { margin: 0; }
.knowledge-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 20px; }
.knowledge-metrics > div { display: grid; gap: 4px; padding: 14px; background: var(--surface-soft); border: 1px solid var(--line); border-radius: 11px; }
.knowledge-metrics strong { color: var(--ink); font: 700 24px Manrope, sans-serif; }
.knowledge-metrics span { color: var(--muted); font-size: 12px; }
.knowledge-source-list { display: grid; gap: 10px; }
.knowledge-source { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 14px; border: 1px solid var(--line); border-radius: 11px; }
.knowledge-source-main { min-width: 0; }
.knowledge-source-heading strong { min-width: 0; overflow-wrap: break-word; }
.knowledge-source-heading { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; margin-bottom: 5px; color: var(--ink); }
.setup-progress-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.setup-progress-head h2, .setup-progress-head p { margin: 0 0 6px; }
.setup-progress-track { height: 8px; overflow: hidden; margin: 12px 0 18px; border-radius: 99px; background: var(--line); }
.setup-progress-track span { display: block; height: 100%; border-radius: inherit; background: var(--accent); }
.setup-step-list { display: grid; gap: 8px; }
.setup-step { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 11px; color: var(--ink); text-decoration: none; }
.setup-step:hover { border-color: var(--accent); }
.setup-step-number { display: grid; width: 30px; height: 30px; place-items: center; border-radius: 50%; background: var(--surface-soft); font-weight: 700; }
.setup-step.is-complete .setup-step-number { color: var(--accent); }
.setup-step small { display: block; margin-top: 3px; color: var(--muted); }
.preview-conversation { display: grid; gap: 10px; min-height: 180px; max-height: 440px; overflow: auto; margin-bottom: 14px; }
.preview-message { min-width: 0; max-width: 92%; padding: 12px 14px; border-radius: 12px; background: var(--surface-soft); overflow-wrap: anywhere; }
.preview-message.user { justify-self: end; background: var(--brand-pale); }
.preview-message p { margin: 6px 0 0; white-space: pre-wrap; }
.preview-prompts { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 18px; }
.test-chat-form { display: grid; gap: 10px; }
.test-chat-form textarea, #install-snippet { width: 100%; }
.install-platforms { display: grid; gap: 8px; margin-top: 22px; }
.install-platforms details { padding: 13px; border: 1px solid var(--line); border-radius: 10px; }
.install-platforms summary { cursor: pointer; font-weight: 650; }
.readiness-check-list { padding-left: 20px; line-height: 1.9; }
.advanced-knowledge-search { padding: 14px; border: 1px solid var(--line); border-radius: 11px; }
.advanced-knowledge-search summary { cursor: pointer; font-weight: 650; }
.knowledge-location { margin-top: 4px; overflow-wrap: anywhere; }
.knowledge-status { color: #34495d; background: #edf2f6; }
.knowledge-ready { color: #155a3a; background: #e1f3e8; }
.knowledge-failed { color: #7e2e28; background: #fae7e4; }
.knowledge-processing { color: #735416; background: #fff2d3; }
.knowledge-disabled, .knowledge-deleted { color: #46586a; background: #edf1f5; }
.knowledge-error { margin: 7px 0 0; color: #872c35 !important; font-size: 13px; }
.knowledge-add-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.knowledge-add-grid > .panel { padding: 17px; box-shadow: none; }
.knowledge-add-grid h3 { margin: 0 0 6px; color: var(--ink); font: 700 15px Manrope, sans-serif; }
.knowledge-add-grid p { margin: 0; font-size: 13px; }
.knowledge-add-grid .field textarea { width: 100%; min-height: 150px; resize: vertical; padding: 11px 12px; color: var(--ink); background: #fff; border: 1px solid var(--line-strong); border-radius: 10px; font: inherit; line-height: 1.55; }
.knowledge-add-grid .field textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(23,104,92,.12); outline: none; }
.knowledge-search-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 14px; }
.knowledge-search-form .field { margin-bottom: 0; }
.knowledge-results { display: grid; gap: 10px; margin: 16px 0 0; padding: 0; list-style: none; }
.knowledge-results li { padding: 14px; border: 1px solid var(--line); border-radius: 10px; }
.knowledge-results strong { color: var(--ink); }
.knowledge-results p { margin: 8px 0; white-space: pre-wrap; overflow-wrap: anywhere; }
#knowledge-feedback[hidden] { display: none; }
.table-scroll { min-width: 0; max-width: 100%; overflow-x: auto; overscroll-behavior-x: contain; }
.table-scroll-hint { margin: 12px 0 6px; color: var(--muted); font-size: 12px; }
.data-table { width: 100%; min-width: 540px; border-collapse: collapse; text-align: left; }
.data-table th { padding: 10px 12px; color: var(--subtle); border-bottom: 1px solid var(--line); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.data-table td { padding: 14px 12px; border-bottom: 1px solid #edf1f5; color: #35485b; font-size: 13px; vertical-align: middle; }
.data-table tr:last-child td { border-bottom: 0; }
.site-title { color: var(--ink); font-weight: 700; text-decoration: none; }
.site-title:hover { color: var(--brand); text-decoration: underline; text-underline-offset: 3px; }
.empty-state { display: grid; justify-items: start; gap: 10px; padding: 27px; background: var(--surface-soft); border: 1px dashed var(--line-strong); border-radius: 12px; }
.empty-mark { display: grid; width: 42px; height: 42px; place-items: center; color: var(--brand); background: var(--brand-pale); border-radius: 12px; font-size: 20px; }
.empty-state h2, .empty-state h3 { margin: 2px 0 0; font: 700 18px Manrope, sans-serif; }
.empty-state p { max-width: 510px; margin: 0; color: var(--muted); line-height: 1.55; }
.detail-list { display: grid; grid-template-columns: minmax(120px, 180px) minmax(0, 1fr); gap: 0; margin: 0; }
.detail-list dt, .detail-list dd { min-width: 0; margin: 0; padding: 13px 0; border-bottom: 1px solid #edf1f5; font-size: 14px; }
.detail-list dt { color: var(--muted); }
.detail-list dd { color: var(--ink); font-weight: 600; overflow-wrap: break-word; }
.technical-value, .detail-list code { overflow-wrap: anywhere; }
.route-loading { display: flex; align-items: center; gap: 12px; min-height: 180px; color: var(--muted); }
.route-error { max-width: 720px; margin: 34px auto; }
.route-error h1 { margin: 8px 0; font: 700 28px Manrope, sans-serif; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 14px; }
.form-grid .wide { grid-column: 1 / -1; }
.section-caption { margin: 24px 0 10px; color: var(--subtle); font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.config-tabs { display: flex; min-width: 0; max-width: 100%; flex-wrap: wrap; gap: 6px; margin: -8px 0 16px; padding: 0 0 4px; }
.config-tab { flex: 0 0 auto; padding: 10px 13px; color: #405368; border-bottom: 2px solid transparent; font-size: 13px; font-weight: 700; text-decoration: none; }
.config-tab:hover { color: var(--brand); background: var(--surface-soft); }
.config-tab[aria-current="page"] { color: #155a51; border-color: var(--brand); }
.config-panel { padding: clamp(18px, 3vw, 28px); }
.config-form { display: grid; gap: 18px; }
.knowledge-editor { width: min(640px, calc(100vw - 32px)); max-height: calc(100dvh - 40px); overflow-y: auto; padding: 24px; color: var(--ink); background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius); }
.knowledge-editor::backdrop { background: rgba(24, 37, 54, .4); }
.knowledge-editor h2 { margin-top: 0; }
.knowledge-editor p { line-height: 1.6; overflow-wrap: anywhere; }
.launch-guidance { margin-bottom: 20px; border-left: 4px solid var(--brand); }
.launch-guidance h2, #install-verify-result { overflow-wrap: anywhere; }
.config-form .field textarea { width: 100%; min-height: 112px; resize: vertical; padding: 11px 12px; color: var(--ink); background: #fff; border: 1px solid var(--line-strong); border-radius: 10px; font: inherit; line-height: 1.55; }
.config-form .field input, .config-form .field select { min-width: 0; width: 100%; }
.field-error, .error-text { color: #872c35; font-size: 13px; line-height: 1.5; }
.config-feedback { min-height: 20px; color: var(--success); font-size: 13px; }
.draft-indicator { min-width: 0; }
.draft-badge { color: #735416; background: #fff2d3; }
.readiness-ready { color: #155a3a; background: #e1f3e8; }
.readiness-blocked { color: #7e2e28; background: #fae7e4; }
.readiness-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
.readiness-grid .panel { box-shadow: none; }
.readiness-grid h3 { margin: 19px 0 7px; font-size: 13px; }
.readiness-grid ul { padding-left: 20px; color: var(--muted); font-size: 13px; line-height: 1.7; }
.readiness-grid code, .revision-list code { overflow-wrap: anywhere; font-size: 11px; }
.domain-entry { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 12px; }
.domain-entry .button { margin-bottom: 20px; }
.domain-list, .revision-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.domain-list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 9px; }
.domain-list code { min-width: 0; color: var(--ink); overflow-wrap: anywhere; }
.domain-list .button { flex-shrink: 0; }
.widget-preview { display: grid; grid-template-columns: 38px minmax(0, 1fr); align-items: center; gap: 3px 11px; max-width: 370px; padding: 15px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.widget-preview .preview-dot { grid-row: span 2; width: 36px; height: 36px; border-radius: 50%; background: var(--preview-color); }
.widget-preview strong { color: var(--ink); font-size: 13px; }
.widget-preview span:last-child { color: var(--muted); font-size: 12px; }
.runtime-panel textarea { width: 100%; box-sizing: border-box; margin-top: 6px; border: 1px solid #bbc9c6; border-radius: 9px; padding: 10px; color: #26302f; background: #f5f8f7; font: 12px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; overflow-wrap: anywhere; }
.runtime-actions { margin-top: 16px; }
.button.danger { color: #fff; background: #a42d37; border-color: #a42d37; }
.revision-list li { padding: 12px; border: 1px solid var(--line); border-radius: 9px; }
.revision-list li div { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 8px; color: var(--ink); font-size: 13px; }
.revision-list li span { color: var(--muted); font-size: 12px; }
.config-form button:focus-visible, .config-tab:focus-visible { outline: 3px solid #a8c9ff; outline-offset: 2px; }

@media (max-width: 1279px) {
  .site-status-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .knowledge-add-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1024px) {
  .sidebar { position: fixed; z-index: 30; width: min(320px, calc(100vw - 24px)); height: 100dvh; padding: 20px 16px; visibility: hidden; transform: translateX(-100%); transition: transform .2s ease; }
  .navigation-open .sidebar { visibility: visible; transform: translateX(0); }
  .sidebar-heading { align-items: center; margin-bottom: 20px; }
  .sidebar .brand-link { padding: 0; }
  .navigation-close { display: inline-flex; }
  .mobile-navigation { display: flex; grid-column: 1 / -1; align-items: center; gap: 14px; min-width: 0; }
  .main-column { margin-left: 0; }
  .topbar { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px 16px; min-height: 70px; }
  .topbar .button.quiet { min-height: 44px; }
}
@media (max-width: 767px) {
  body { font-size: 14px; }
  .button.quiet { min-height: 44px; }
  .config-tab { display: inline-flex; min-height: 44px; align-items: center; }
  .auth-page { display: block; background: #fff; }
  .auth-story { min-height: auto; padding: 22px 23px 10px; background: #153d3a; }
  .auth-story::before { display: none; }
  .story-copy { padding: 29px 0 15px; }
  .story-copy h1 { max-width: 420px; margin: 10px 0 9px; font-size: 32px; }
  .story-copy p { margin: 0; font-size: 14px; }
  .story-note { display: none; }
  .auth-panel { padding: 30px 23px 44px; }
  .auth-card h2 { font-size: 25px; }
  .topbar { padding: 10px 16px; }
  .topbar-user { display: none; }
  .main-content { padding: 27px 16px 46px; }
  .page-heading { align-items: flex-start; flex-direction: column; margin-bottom: 19px; }
  .page-heading .button { width: 100%; }
  .row-actions .button { flex: 1 1 160px; }
  .content-grid { gap: 12px; }
  .panel.span-8, .panel.span-6, .panel.span-4 { grid-column: span 12; }
  .panel { padding: 17px; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .wide { grid-column: auto; }
  .detail-list { grid-template-columns: 1fr; }
  .detail-list dt { padding-bottom: 3px; border-bottom: 0; }
  .detail-list dd { padding-top: 4px; }
  .readiness-grid { grid-template-columns: 1fr; }
  .domain-entry { grid-template-columns: 1fr; }
  .domain-entry .button { margin-bottom: 0; }
  .knowledge-overview-head, .knowledge-source { align-items: flex-start; flex-direction: column; }
  .knowledge-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .knowledge-add-grid { grid-template-columns: 1fr; }
  .knowledge-search-form { grid-template-columns: 1fr; }
  .data-table td { font-size: 14px; }
  .knowledge-source > .row-actions { width: 100%; }
  .preview-prompts .button { width: 100%; }
}
@media (max-width: 599px) {
  .site-status-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
/* Scoped bank-transfer additions; existing landing/portal layout stays intact. */
.bank-prices { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 16px; }
.bank-request code { overflow-wrap: anywhere; }
.bank-request dd .button { display: block; margin-top: 8px; }
