.database-access { --db-border: #dce1e8; --db-muted: #596879; --db-accent: #245b7b; }
.db-discovery { max-width: 820px; margin: 0 auto; }
.db-setup-progress { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 0 0 24px; padding: 0; list-style: none; }
.db-setup-progress > li { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; min-width: 0; padding: 12px 8px; border-bottom: 3px solid var(--db-border); color: var(--db-muted); font-size: 14px; line-height: 1.4; overflow-wrap: anywhere; }
.db-setup-progress .db-step-number { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; flex: 0 0 28px; border: 1px solid var(--db-border); border-radius: 50%; background: var(--surface); font-size: 13px; font-weight: 700; }
.db-setup-progress > li[aria-current="step"] { border-color: var(--db-accent); color: var(--db-accent); font-weight: 700; }
.db-setup-progress > li[aria-current="step"] .db-step-number { border-color: var(--db-accent); background: #e9f2f7; box-shadow: 0 0 0 3px var(--surface-muted); }
.db-setup-progress > li[data-complete="true"] .db-step-number { border-color: #8dc6a2; background: #eaf8ef; color: #23643c; }
.db-setup-intro, .db-setup-summary { min-width: 0; padding: 18px 20px; border: 1px solid var(--db-border); border-radius: 10px; background: var(--surface); overflow-wrap: anywhere; }
.db-setup-intro { border-inline-start: 3px solid var(--db-accent); background: var(--surface-muted); }
.db-setup-intro h3, .db-setup-summary h3, .db-setup-summary h4 { margin: 0 0 8px; }
.db-setup-intro p, .db-setup-summary p { margin: 6px 0; line-height: 1.5; }
.db-setup-intro > :first-child, .db-setup-summary > :first-child { margin-top: 0; }
.db-setup-intro > :last-child, .db-setup-summary > :last-child { margin-bottom: 0; }
.db-setup-summary dl { display: grid; grid-template-columns: minmax(100px, 1fr) minmax(0, 2fr); gap: 8px 16px; margin: 12px 0 0; }
.db-setup-summary dt { color: var(--db-muted); }
.db-setup-summary dd { min-width: 0; margin: 0; }
.db-help { display: inline; font-size: 13px; font-weight: 400; line-height: 1.5; }
.db-help > summary { display: inline-flex; align-items: center; justify-content: center; width: 30px; min-height: 30px; margin-inline-start: 4px; padding: 0; border: 1px solid var(--db-border); border-radius: 50%; background: var(--surface); color: var(--db-accent); font-size: 14px; font-weight: 700; line-height: 1; list-style: none; cursor: help; vertical-align: middle; }
.db-help > summary::-webkit-details-marker { display: none; }
.db-help::details-content { content-visibility: visible; }
.db-help-content { display: none; box-sizing: border-box; width: 100%; max-width: 38rem; margin: 8px 0; padding: 12px 14px; border: 1px solid var(--db-border); border-inline-start: 3px solid var(--db-accent); border-radius: 8px; background: var(--surface-muted); color: var(--db-muted); font-size: 13px; font-weight: 400; line-height: 1.6; white-space: normal; overflow-wrap: anywhere; text-align: start; }
.db-help:hover > .db-help-content, .db-help:focus-within > .db-help-content, .db-help[open] > .db-help-content { display: block; }
.db-help[data-dismissed="true"] > .db-help-content { display: none; }
.db-help:hover > summary, .db-help:focus-within > summary, .db-help[open] > summary { border-color: var(--db-accent); background: var(--surface-muted); }
.db-help > summary:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.db-help-content > :first-child { margin-top: 0; }
.db-help-content > :last-child { margin-bottom: 0; }
.database-access .field:has(> .db-help) { display: block; }
.database-access .field:has(> .db-help) > label { display: inline; }
.database-access .field:has(> .db-help) > :not(label):not(.db-help) { display: block; margin-top: 7px; }
.db-compact-details { min-width: 0; padding: 0 16px; border: 1px solid var(--db-border); border-radius: 10px; background: var(--surface); }
.db-compact-details > summary { min-height: 44px; padding: 13px 0; color: var(--db-muted); font-size: 14px; font-weight: 600; line-height: 1.4; cursor: pointer; overflow-wrap: anywhere; }
.db-compact-details[open] { padding-bottom: 16px; }
.db-compact-details[open] > summary { margin-bottom: 14px; border-bottom: 1px solid var(--db-border); color: var(--db-accent); }
.db-compact-details > :last-child { margin-bottom: 0; }
.db-setup-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 10px; margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--db-border); }
.db-setup-actions > * { margin: 0; }
.db-setup-actions .button { max-width: 100%; white-space: normal; }
.db-status-ready { display: block; border: 1px solid #8dc6a2; border-inline-start-width: 3px; background: #eaf8ef; overflow-wrap: anywhere; }
.db-status-ready h3 { color: #23643c; }
.db-discovery > .field, .db-wallet-fields { margin-bottom: 20px; }
.db-wallet-fields { padding: 18px; background: var(--surface-muted); border: 1px solid var(--db-border); border-radius: 10px; }
.db-wallet-fields .field + .field { margin-top: 16px; }
.db-levels { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 18px 0; }
.db-level-card { display: flex; gap: 10px; align-items: flex-start; padding: 18px 14px; border: 1px solid var(--db-border); border-radius: 10px; cursor: pointer; min-width: 0; }
.db-level-card:has(input:checked) { border-color: var(--db-accent); box-shadow: inset 0 0 0 1px var(--db-accent); background: var(--surface-muted); }
.db-level-card input { width: 18px; height: 18px; margin: 3px 0 0; flex: 0 0 18px; }
.db-level-card span { display: block; }
.db-level-card strong { display: block; margin-bottom: 10px; font-size: 16px; }
.db-level-card span span { font-size: 13px; line-height: 1.5; font-weight: 400; }
.db-level-card small { display: block; margin-top: 12px; color: var(--db-muted); line-height: 1.5; font-weight: 400; }
.db-capability-group { border: 0; margin: 20px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 20px; min-width: 0; }
.db-capability-group > p { grid-column: 1 / -1; margin: 0; }
.db-capability-group legend { font-weight: 700; margin-bottom: 12px; }
.db-capability { border-bottom: 1px solid var(--db-border); padding-bottom: 12px; }
.db-capability small { display: block; padding-left: 28px; line-height: 1.5; }
.db-resource-note { color: var(--db-muted); }
.db-resource-high { color: var(--warning); }
.db-license-note { color: var(--warning); margin-top: 6px; }
.database-access .section-heading { align-items: flex-start; gap: 20px; }
.database-access .section-heading p { max-width: 760px; }
.db-layout { display: grid; grid-template-columns: minmax(200px, 250px) minmax(0, 1fr); gap: 20px; align-items: start; }
.db-targets { padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.db-targets h3 { margin: 0 0 6px; }
.db-target.button { display: flex; flex-direction: column; align-items: flex-start; text-align: left; white-space: normal; gap: 6px; padding: 12px; width: 100%; }
.db-target small { font-weight: 400; overflow-wrap: anywhere; }
.db-target[aria-pressed="true"] { background: #e9f2f7; box-shadow: inset 3px 0 var(--db-accent); color: #173e58; }
.db-content { min-width: 0; }
.db-target-heading { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin: 0 0 16px; }
.db-target-heading h2 { margin: 0; overflow-wrap: anywhere; }
.db-tab-groups { display: flex; flex-wrap: wrap; gap: 18px 24px; border-bottom: 1px solid var(--db-border); padding-bottom: 6px; margin-bottom: 20px; }
.db-tab-group { flex: 1 1 140px; min-width: 0; }
.db-tab-group + .db-tab-group { flex: 4 1 580px; }
.db-tab-group-title { display: block; margin-bottom: 8px; color: var(--db-muted); font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.db-tabs { display: flex; flex-wrap: wrap; gap: 4px; }
.db-tabs .button { border-radius: 8px 8px 0 0; white-space: normal; max-width: 100%; }
.db-tabs [aria-selected="true"] { color: var(--db-accent); background: #e9f2f7; box-shadow: inset 0 -3px var(--db-accent); }
.db-tab-panel { display: flex; flex-direction: column; gap: 20px; }
.db-mcp-setup > form { display: grid; gap: 16px; max-width: 800px; }
.db-mcp-setup form > .field { margin: 0; }
.db-mcp-setup form > .button { justify-self: start; }
.db-mcp-setup form > section:not([hidden]) { display: grid; gap: 12px; }
.db-mcp-setup > .button { align-self: flex-start; }
.db-mcp-setup code { overflow-wrap: anywhere; }
.db-panel { padding: 24px; min-width: 0; }
.db-panel h3 { margin-top: 0; }
.db-panel > * + * { margin-top: 16px; }
.db-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.db-actions > * { margin: 0; }
.db-muted { color: var(--db-muted); line-height: 1.6; }
.db-live { min-height: 24px; color: var(--db-muted); }
.db-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.database-access .field { min-width: 0; }
.database-access input:not([type="checkbox"]), .database-access select, .database-access textarea { width: 100%; min-width: 0; }
.db-credentials, .db-options { border: 1px solid var(--db-border); border-radius: 10px; padding: 18px; margin: 20px 0; min-width: 0; }
.db-credentials legend, .db-options legend { font-weight: 600; padding: 0 8px; }
.db-credentials small { display: block; margin-top: 12px; }
.db-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 18px; }
.db-check { display: flex; gap: 10px; align-items: flex-start; min-height: 44px; padding: 10px 0; cursor: pointer; font-weight: 400; line-height: 1.45; }
.db-check input[type="checkbox"] { width: 18px; height: 18px; flex: 0 0 18px; margin: 2px 0 0; accent-color: var(--db-accent); }
.db-check:has(input:disabled) { color: var(--db-muted); cursor: default; }
.db-details { border: 1px solid var(--db-border); border-radius: 8px; padding: 12px 16px; }
.db-details summary { cursor: pointer; font-weight: 600; min-height: 32px; overflow-wrap: anywhere; }
.db-json { max-height: 430px; overflow: auto; font-size: 12px; line-height: 1.6; padding: 14px; background: #f6f8fa; border-radius: 6px; }
.db-digest { font-family: monospace; overflow-wrap: anywhere; font-size: 12px; }
.db-table { width: 100%; min-width: 460px; border-collapse: collapse; text-align: left; }
.db-table th, .db-table td { padding: 12px; border-bottom: 1px solid var(--db-border); vertical-align: top; overflow-wrap: anywhere; }
.db-table th { font-size: 12px; color: var(--db-muted); overflow-wrap: normal; }
.db-table td:first-child { min-width: 70px; }
.database-access a.button { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.database-access .table-wrap:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.db-table .db-actions { min-width: 140px; }
.database-access button:focus-visible, .database-access a:focus-visible, .database-access summary:focus-visible, .database-access input:focus-visible, .database-access select:focus-visible, .database-access textarea:focus-visible, .database-access pre:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.database-access .button { min-height: 44px; }
.database-access [aria-busy="true"] { cursor: progress; }
.db-session-control > * + * { margin-top: 16px; }
.db-session-control h4 { margin-bottom: 12px; }
.db-session-control .db-session-review { border-top: 1px solid var(--db-border); padding-top: 18px; }
.db-session-control .db-session-review > * + * { margin-top: 16px; }
.db-session-table td { max-width: 340px; }
.db-session-control input[type="radio"] { width: 20px; height: 20px; accent-color: var(--db-accent); }
.db-privileged-execution form { display: grid; gap: 14px; }
.db-privileged-execution form > label { display: grid; gap: 6px; }
.db-target-settings { padding-bottom: 24px; margin-bottom: 24px; border-bottom: 1px solid var(--db-border); }
.db-target-settings form { display: grid; gap: 14px; max-width: 800px; }
.db-target-settings form > label { display: grid; gap: 6px; }
.db-target-settings form > .button { justify-self: start; }
.db-target-settings form > p { margin: 0; color: var(--db-muted); line-height: 1.5; }
.db-target-settings > h4 { margin-top: 24px; }
.db-target-settings > .button { margin-top: 16px; }
.db-target-settings [role="alert"] { color: var(--danger, #a12b2b); }
.db-privileged-execution input[type="checkbox"] { width: auto; min-width: 0; margin: 2px 0 0; flex: 0 0 auto; accent-color: var(--db-accent); }
.db-privileged-execution .db-privileged-check { display: flex; align-items: flex-start; gap: 10px; padding: 6px 0; font-weight: 400; line-height: 1.45; overflow-wrap: anywhere; }
.db-privileged-execution .db-privileged-schema-picker { border: 1px solid var(--db-border); border-radius: 8px; padding: 12px 16px; }
.db-privileged-execution .db-privileged-schema-picker > summary { min-height: 28px; cursor: pointer; font-weight: 600; }
.db-privileged-execution .db-privileged-schema-picker[open] > summary { margin-bottom: 12px; }
.db-privileged-execution .db-privileged-schema-choices { max-height: 260px; overflow-y: auto; margin-top: 10px; }
.db-privileged-execution .db-privileged-schema-picker p { margin: 10px 0 0; color: var(--db-muted); line-height: 1.5; }
.db-privileged-execution .db-privileged-operations { min-width: 0; border: 1px solid var(--db-border); border-radius: 8px; padding: 12px 16px; }
.db-privileged-execution .db-privileged-operations legend { padding: 0 6px; font-weight: 600; }
.db-privileged-execution .db-privileged-operation-list { display: block; list-style-type: disc; list-style-position: outside; margin: 0; padding-left: 24px; }
.db-privileged-execution .db-privileged-operation-list > li { display: list-item; padding: 0; }
@media (max-width: 1000px) {
  .db-layout { grid-template-columns: 1fr; }
  .db-targets { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
  .db-targets h3 { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
  .db-setup-progress { gap: 6px; margin-bottom: 18px; }
  .db-setup-progress > li { gap: 6px; padding: 8px 0; font-size: 12px; }
  .db-setup-progress .db-step-number { width: 24px; height: 24px; flex-basis: 24px; font-size: 12px; }
  .db-setup-intro, .db-setup-summary { padding: 14px 16px; }
  .db-setup-summary dl { grid-template-columns: 1fr; gap: 4px; }
  .db-setup-summary dd + dt { margin-top: 8px; }
  .db-help-content { max-width: 100%; padding: 10px 12px; }
  .db-setup-actions .button { flex: 1 1 150px; }
  .database-access .section-heading { flex-direction: column; }
  .db-form-grid, .db-options { grid-template-columns: 1fr; }
  .db-levels, .db-capability-group { grid-template-columns: 1fr; }
  .db-panel { padding: 16px; }
  .db-credentials, .db-options { padding: 12px; }
  .db-actions .button { flex: 1 1 auto; }
  .db-table th, .db-table td { padding: 8px; font-size: 12px; }
}
.database-access [hidden] { display: none !important; }

.db-privileged-execution .db-privileged-container-schemas { min-width: 0; border: 1px solid var(--db-border); border-radius: 6px; padding: 8px 12px; margin-top: 14px; }
.db-privileged-execution .db-privileged-container-schemas legend { padding: 0 6px; font-weight: 600; overflow-wrap: anywhere; }

/* Guided existing-account setup: the original controls and submission contracts remain. */
.db-guided-setup { max-width: 1040px; margin: 10px auto 28px; padding: 34px; border: 1px solid #dce5f1; border-radius: 20px; box-shadow: 0 10px 35px #19396809; background: linear-gradient(180deg, #f8fbff 0, #fff 190px); }
.db-guided-setup > h3 { font-size: 27px; letter-spacing: -.025em; margin: 26px 0 10px; }
.db-guided-setup > .db-muted { max-width: 680px; line-height: 1.65; }
.db-guided-stepper { grid-template-columns: repeat(2,minmax(0,1fr)); margin: 0 0 26px; max-width: 540px; }
.db-guided-stepper li { border: 0; border-radius: 0; border-bottom: 2px solid #e1e7f0; padding: 12px 0; background: transparent; }
.db-guided-stepper li[aria-current="step"] { background: transparent; border-bottom-color: var(--primary); color: var(--primary); }
.db-guided-note { color: #475b75; font-size: 13px; margin-bottom: 26px; }
.db-guided-setup > .field { margin-block: 20px; max-width: 420px; }
.db-guided-setup .db-guided-address { margin-top: 20px; }
.db-guided-setup .db-form-grid { gap: 20px; margin-bottom: 22px; }
.db-guided-setup .field label { color: #2a3e59; font-weight: 650; }
.db-guided-setup .field input, .db-guided-setup .field select { border-radius: 10px; min-height: 46px; background: #fff; }
.db-guided-setup .db-compact-details { padding: 17px 19px; margin-block: 14px; border: 1px solid #e2e8f2; border-radius: 12px; background: #fafcff; }
.db-guided-setup .db-compact-details > summary { font-size: 13px; color: #334e72; }
.db-guided-setup .db-compact-details[open] > summary { margin-bottom: 18px; }
.db-guided-setup .db-options { margin: 0; }
.db-guided-setup .db-actions { padding-top: 22px; margin-top: 28px; border-top: 1px solid #e4eaf3; }
.db-guided-setup .db-actions .primary { padding-inline: 24px; min-height: 46px; }
.db-guided-summary { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; margin: 22px 0; padding: 19px 22px; background: #edf5ff; border: 1px solid #d6e5ff; border-radius: 14px; }
.db-guided-summary > div { font-size: 18px; font-weight: 700; color: #1e3b68; }
.db-guided-summary > .db-muted { flex-basis: 100%; padding-left: 54px; font-size: 13px; }
.db-guided-summary-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 11px; background: #d8e7ff; color: #214aa7; font-size: 12px; font-weight: 700; }
@media (max-width: 700px) { .db-guided-setup { padding: 22px 18px; border-radius: 14px; } .db-guided-setup > h3 { font-size: 24px; } .db-guided-setup .db-form-grid { grid-template-columns: 1fr; } .db-guided-stepper { gap: 12px; } .db-guided-stepper li { font-size: 12px; } .db-guided-summary { padding: 16px; gap: 10px; } .db-guided-summary > .db-muted { padding-left: 0; } }

.db-guided-stepper > li { flex-direction: row; align-items: center; gap: 9px; }
.db-guided-setup .db-compact-details { padding: 11px 16px; }
.db-guided-setup .db-compact-details > summary { min-height: 24px; }
.db-guided-setup > .db-guided-note { font-size: 13px; line-height: 1.65; }

/* Database workspace: a quiet target rail and a readable working column. */
.database-access { --db-border: var(--border); --db-muted: var(--muted); --db-accent: var(--primary); max-width: 1460px; margin-inline: auto; }
.database-access .db-live:empty { min-height: 0; margin: 0; }
.db-layout { grid-template-columns: minmax(210px, 248px) minmax(0, 1fr); gap: 24px; }
.db-targets { gap: 7px; padding: 16px; box-shadow: none; }
.db-targets h3 { padding: 2px 8px 10px; font-size: 13px; color: var(--muted); }
.db-target.button { border-color: transparent; border-radius: 8px; padding: 12px; gap: 5px; }
.db-target.button strong { font-size: 13px; overflow-wrap: anywhere; }
.db-target.button small { font-size: 12px; line-height: 1.5; }
.db-target.button[aria-pressed="true"] { background: color-mix(in srgb, var(--primary) 8%, var(--surface)); color: var(--primary); box-shadow: inset 3px 0 var(--primary); }
.db-content > .db-panel + .db-panel { margin-top: 20px; }
.db-target-heading { padding: 3px 0 16px; margin-bottom: 20px; border-bottom: 1px solid var(--border); }
.db-target-heading h2 { font-size: 24px; }
.db-panel { padding: 24px; box-shadow: none; }
.db-panel h3 { font-size: 17px; line-height: 1.4; }
.db-panel p { max-width: 82ch; }
.db-panel .table-wrap { max-width: 100%; min-width: 0; overflow-x: auto; box-shadow: none; }
.db-tab-groups { gap: 16px; padding-bottom: 12px; }
.db-tab-group-title { font-size: 10px; letter-spacing: .09em; }
.db-tabs { gap: 5px; }
.db-tabs .button { border-radius: 7px; padding-inline: 12px; font-size: 12px; }
.db-tabs [aria-selected="true"] { background: color-mix(in srgb, var(--primary) 8%, var(--surface)); color: var(--primary); box-shadow: inset 0 -2px var(--primary); }
.db-json { color: var(--text); background: var(--surface-muted); border: 1px solid var(--border); }
.database-access .db-status-ready { color: var(--text); border-color: color-mix(in srgb, var(--success, #18723c) 35%, var(--border)); background: color-mix(in srgb, var(--success, #18723c) 5%, var(--surface)); }
.database-access .db-status-ready h3 { color: var(--success, #18723c); }
.db-setup-progress > li[aria-current="step"] .db-step-number { color: var(--primary); background: color-mix(in srgb, var(--primary) 8%, var(--surface)); }
.db-setup-progress > li[data-complete="true"] .db-step-number { color: var(--success, #18723c); border-color: color-mix(in srgb, var(--success, #18723c) 35%, var(--border)); background: color-mix(in srgb, var(--success, #18723c) 6%, var(--surface)); }
.database-access .db-guided-setup { max-width: 940px; padding: 30px 34px; margin: 6px auto 24px; border-color: var(--border); border-radius: 14px; background: var(--surface); box-shadow: 0 4px 22px color-mix(in srgb, var(--text) 3%, transparent); }
.db-guided-setup > h3 { font-size: 25px; margin: 24px 0 10px; }
.db-guided-setup > .db-muted { max-width: 70ch; }
.db-guided-setup > .db-guided-note, .db-guided-setup .field label { color: var(--text); }
.db-guided-stepper { max-width: 580px; margin-bottom: 22px; }
.db-guided-stepper li { border-bottom-color: var(--border); }
.db-guided-stepper .db-step-number { background: var(--surface); }
.db-guided-stepper > li[aria-current="step"] .db-step-number { background: color-mix(in srgb, var(--primary) 8%, var(--surface)); }
.db-guided-setup .db-form-grid { gap: 20px 24px; }
.db-guided-setup .field input, .db-guided-setup .field select { border-radius: 8px; background: var(--surface); }
.db-guided-setup .db-compact-details { border-color: var(--border); border-radius: 9px; padding: 10px 16px; background: var(--surface-soft); }
.db-guided-setup .db-compact-details > summary { color: var(--text); font-weight: 600; }
.db-guided-setup .db-actions { border-top-color: var(--border); }
.db-guided-summary { background: var(--surface-soft); border-color: var(--border); border-radius: 10px; padding: 18px 20px; }
.db-guided-summary > div { color: var(--text); font-size: 17px; }
.db-guided-summary-icon { color: var(--primary); background: color-mix(in srgb, var(--primary) 9%, var(--surface)); }
/* Keep setup instructions readable while reducing unnecessary vertical travel. */
.database-access .db-guided-setup { padding: 24px 28px; }
.db-guided-stepper { margin-bottom: 14px; }
.db-guided-setup > h3 { margin: 16px 0 8px; }
.db-guided-setup > .db-guided-note { margin-bottom: 16px; font-size: 14px; line-height: 1.5; }
.db-guided-setup > .field { margin-block: 14px; }
.db-guided-setup .db-guided-address { margin-top: 14px; }
.db-guided-setup .db-form-grid { gap: 14px 24px; margin-bottom: 16px; }
.db-guided-setup .db-compact-details { margin-block: 10px; padding: 4px 16px; }
.db-guided-setup .db-compact-details > summary { min-height: 44px; font-size: 14px; }
.db-guided-setup .db-actions { margin-top: 20px; padding-top: 16px; }
.db-guided-summary { margin: 16px 0; padding: 14px 18px; }
.db-guided-summary > .db-muted, .db-help-content { font-size: 14px; }
.db-tabs .button { font-size: 14px; }
.db-tab-group-title { font-size: 12px; }
@media (max-width: 1100px) {
  .db-layout { grid-template-columns: 1fr; gap: 18px; }
  .db-targets { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(190px, 100%), 1fr)); }
}
@media (max-width: 720px) {
  .db-panel { padding: 18px; }
  .db-target-heading h2 { font-size: 21px; }
  .database-access .db-guided-setup { padding: 22px 18px; }
  .db-guided-setup > h3 { font-size: 22px; }
  .db-guided-summary { padding: 16px; }
  .db-guided-summary > .db-muted { padding-left: 0; }
  .db-tab-group, .db-tab-group + .db-tab-group { flex-basis: 100%; }
  .database-access .field input, .database-access .field select, .database-access .field textarea { font-size: 16px; }
}
@media (max-width: 420px) {
  .database-access > .section-heading .db-actions { width: 100%; }
  .database-access > .section-heading .db-actions .button { flex: 1 1 100%; }
  .db-guided-stepper > li { align-items: flex-start; }
  .db-guided-summary > div { font-size: 16px; }
}

/* Existing-account setup: clear assessment and next action. */
.db-connect-intro { padding: 14px 18px; border-left: 3px solid var(--primary); background: var(--surface-soft); border-radius: 0 8px 8px 0; line-height: 1.5; }
.db-connect-intro p { margin: 5px 0 0; }
.db-connect-intro { margin: 16px 0 12px; }
.db-review-guidance, .db-review-privilege-note { margin: 10px 0; font-size: 14px; line-height: 1.45; }
.db-review-privilege-note { padding-left: 12px; border-left: 3px solid #b66b16; }
.db-review-overview { margin: 18px 0; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.db-review-identity { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; padding: 14px 18px; background: var(--surface-soft); font-size: 17px; font-weight: 700; }
.db-review-status { margin-left: auto; color: var(--primary); font-size: 13px; font-weight: 600; }
.db-review-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 24px; padding: 16px 18px; }
.db-review-facts > div { display: grid; gap: 4px; min-width: 0; }
.db-review-facts span { color: var(--muted); font-size: 13px; }
.db-review-facts strong { font-size: 14px; overflow-wrap: anywhere; }
.db-connect-status { color: var(--text); border-left: 3px solid #b66b16; padding: 10px 14px; background: var(--surface-soft); }
@media (max-width: 600px) { .db-review-facts { grid-template-columns: 1fr; gap: 12px; } .db-review-status { margin-left: 0; } }

/* Offline review preview: keep registration and optional MCP decisions distinct. */
.db-existing-monitor-review .db-review-choice { margin: 14px 0; padding: 15px 18px; border: 1px solid var(--border); border-radius: 10px; }
.db-existing-monitor-review .db-review-choice h4 { margin: 0 0 4px; font-size: 16px; }
.db-existing-monitor-review .db-review-choice > p { margin: 0 0 10px; }
.db-existing-monitor-review .db-existing-monitor-auto-mcp { margin-top: 12px; }
.db-existing-monitor-review .db-review-readiness { margin-top: 18px; padding: 12px 16px; border-radius: 9px; background: var(--surface-soft); font-size: 14px; }
.db-existing-monitor-review .db-review-readiness p { margin: 6px 0 0; }
.db-existing-monitor-review .db-review-readiness ul { margin: 6px 0 0; padding-left: 20px; }
.db-existing-monitor-review .db-review-readiness li { margin: 3px 0; }
.db-existing-monitor-review .db-review-focus { border: 0; padding: 0; color: var(--primary); background: transparent; text-align: left; text-decoration: underline; cursor: pointer; font: inherit; }
.db-existing-monitor-review .db-review-focus:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
@media (max-width: 600px) { .db-existing-monitor-review .db-review-choice { padding: 14px; } .db-existing-monitor-review .db-review-readiness { overflow-wrap: anywhere; } }

.db-existing-monitor-review .db-review-choice { margin: 8px 0; padding: 9px 12px; }
.db-existing-monitor-review .db-review-choice h4 { margin: 0; font-size: 14px; }
.db-existing-monitor-review .db-existing-monitor-auto-mcp { margin-top: 0; }
.db-existing-monitor-review .db-review-readiness { margin-top: 8px; padding: 8px 12px; }
.db-existing-monitor-review .db-review-focus { min-height: 44px; margin-left: 8px; }
.db-existing-monitor-review .db-actions { margin-top: 8px; padding-top: 8px; }
.db-existing-monitor-review .db-compact-details { margin-block: 4px; }
.db-existing-monitor-review .db-review-overview { margin: 10px 0; }
.db-existing-monitor-review .db-review-facts { gap: 10px 20px; padding: 12px 18px; }
@media (max-width: 600px) { .db-existing-monitor-review .db-review-choice { padding: 8px 12px; } .db-existing-monitor-review .db-review-facts { gap: 8px; } }
