/* Trust controls extend BluFox's existing blue command-center palette. */
/* The existing rail state shares its name with the sidebar; keep the shell grid. */
.shell.rail { display: grid; padding: 0; gap: 0; border-left: 0; overflow: hidden; }
.shell .body, .shell .stage, .shell .canvas { min-width: 0; }
.screen:has(> .galaxy) { display: flex; flex-direction: column; }
.screen > .galaxy { flex: 1; height: auto; min-height: 380px; }
.connections-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; align-items: start; }
.connections-grid > .local-memory, .connections-grid > .connection-result { grid-column: 1 / -1; }
.connection-actions, .voice-options { display: flex; flex-wrap: wrap; gap: 10px; margin: 12px 0; }
.memory-search { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 16px 0; }
.memory-search input { flex: 1; min-width: 150px; background: #101b2b; color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; }
.memory-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.memory-item p { margin: 0; line-height: 1.6; }
.local-memory textarea { width: 100%; resize: vertical; }
.memory-results { max-height: 340px; overflow-y: auto; }
.app-library { display: grid; gap: 18px; }
.app-library-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(230px,1fr)); gap: 16px; }
.integration-app h3 { margin: 0; }
.integration-app p { overflow-wrap: anywhere; }
.host-app { border-left: 2px solid var(--blu); }
@media(max-width:1200px) { .connections-grid { grid-template-columns: 1fr; } .row2 { grid-template-columns: 1fr; } }
.trust-center { display: grid; gap: 18px; padding-bottom: 24px; }
.trust-hero { display: flex; justify-content: space-between; align-items: center; gap: 28px; padding: 30px; border: 1px solid #164368; border-radius: 14px; background: radial-gradient(ellipse at 90% 0%, #0a3451, transparent 65%), #061321; }
.trust-hero h2 { margin: 10px 0; font: 500 clamp(23px, 2.1vw, 36px)/1.15 var(--display); letter-spacing: -.035em; }
.trust-hero p { max-width: 65ch; color: #b0c2d3; line-height: 1.65; margin: 0; font-size: 12px; }
.trust-signal { display: flex; align-items: center; gap: 9px; color: #80cfff; font-size: 12px; }
.trust-signal i { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #6ed6c6; box-shadow: 0 0 14px #6ed6c644; }
.trust-note { color: #a5b7cc; font-size: 12px; line-height: 1.6; margin: 10px 0 0; }
.trust-policy h3 { margin: 15px 0 8px; font-size: 14px; }
.trust-policy p { line-height: 1.65; margin-bottom: 0; }
.plan-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; }
.plan-card { padding: 22px 18px; border: 1px solid #23384e; border-radius: 12px; background: #091522; display: flex; flex-direction: column; }
.plan-card.featured { border-color: #1684bd; background: #092035; }
.plan-heading { display: flex; align-items: center; gap: 8px; justify-content: space-between; flex-wrap: wrap; }
.plan-heading h3 { font-family: var(--display); font-size: 17px; margin: 0; }
.plan-price { margin: 20px 0 12px; font: 500 38px/1 var(--display); letter-spacing: -.045em; }
.plan-price small { font: 11px var(--sans, sans-serif); letter-spacing: 0; color: #97abc0; margin-left: 6px; }
.plan-card ul { padding-left: 17px; color: #b0c2d3; font-size: 12px; line-height: 1.8; flex: 1; }
.plan-availability { font-size: 11px; color: #90a5b9; border-top: 1px solid #23384e; padding-top: 15px; line-height: 1.5; }
.license-current { border-left: 1px solid #235478; padding-left: 24px; min-width: 130px; }
.license-current b { display: block; font: 500 24px var(--display); text-transform: capitalize; }
.license-current span { font-size: 11px; color: #9db5ce; }
.license-token { width: 100%; min-height: 80px; resize: vertical; background: #050e18; border: 1px solid #294057; border-radius: 8px; padding: 12px; color: #d6e7f6; font: 11px/1.6 var(--mono); }
.device-id { overflow-wrap: anywhere; font-size: 11px; }
.consent-overlay { position: fixed; inset: 0; z-index: 1000; background: #020617dd; backdrop-filter: blur(12px); display: grid; place-items: center; padding: 18px; -webkit-app-region: no-drag; }
.consent-dialog { width: min(760px,100%); max-height: calc(100vh - 36px); overflow: hidden; display: flex; flex-direction: column; background: #071523; border: 1px solid #23628c; border-radius: 14px; box-shadow: 0 30px 100px #0009; color: #e5f1fb; }
.consent-content { overflow: auto; min-height: 0; padding: 26px; }
.consent-dialog > .modal-actions { flex-shrink: 0; margin: 0; padding: 14px 26px; border-top: 1px solid #23384e; }
.consent-dialog:focus { outline: 1px solid #78d6ff; outline-offset: 2px; }
.consent-dialog h2 { font: 500 28px var(--display, sans-serif); letter-spacing: -.03em; margin: 16px 0 20px; }
.consent-dialog h3 { font-size: 12px; margin-top: 22px; }
.consent-dialog .kv dd { overflow-wrap: anywhere; word-break: normal; }
.consent-payload { width: 100%; height: min(36vh,360px); resize: vertical; padding: 14px; background: #020a12; color: #c7e1f6; border: 1px solid #28455f; border-radius: 8px; font: 11px/1.6 var(--mono, monospace); white-space: pre; }
.consent-dialog button:focus-visible, .trust-center button:focus-visible, .consent-payload:focus { outline: 2px solid #78d6ff; outline-offset: 3px; }
.trust-center button:disabled { opacity: .45; cursor: not-allowed; }
.onboarding p { font-size: 13px; line-height: 1.7; color: #b0c2d3; }
.onboarding-local { border-left: 2px solid #46bdb5; background: #46bdb50a; padding: 14px 18px; margin: 20px 0; }
.onboarding-local p { margin-bottom: 0; }
@media(max-width:1450px) { .plan-grid { grid-template-columns: repeat(2,minmax(0,1fr)); } .trust-hero { align-items: flex-start; } }
@media(max-width:600px) { .consent-overlay { padding: 5px; } .consent-dialog { max-height: calc(100vh - 10px); } .consent-content { padding: 14px; } .consent-dialog h2 { font-size: 22px; } .consent-dialog .kv { grid-template-columns: 1fr; } .consent-dialog > .modal-actions { flex-wrap: wrap; padding: 12px 14px; } }

/* ---------- bright theme ---------- */
:root[data-theme="light"] .trust-hero { border-color: rgba(0,119,204,0.25); background: radial-gradient(ellipse at 90% 0%, rgba(0,119,204,0.14), transparent 65%), #fff; }
:root[data-theme="light"] .trust-hero p, :root[data-theme="light"] .trust-note, :root[data-theme="light"] .plan-card ul, :root[data-theme="light"] .onboarding p, :root[data-theme="light"] .plan-price small, :root[data-theme="light"] .plan-availability, :root[data-theme="light"] .license-current span { color: var(--muted); }
:root[data-theme="light"] .trust-signal { color: var(--blu); }
:root[data-theme="light"] .plan-card { border-color: var(--line); background: #fff; }
:root[data-theme="light"] .plan-card.featured { border-color: rgba(0,119,204,0.5); background: rgba(0,119,204,0.06); }
:root[data-theme="light"] .plan-availability { border-top-color: var(--line); }
:root[data-theme="light"] .license-current { border-left-color: var(--line); }
:root[data-theme="light"] .license-token, :root[data-theme="light"] .memory-search input, :root[data-theme="light"] .consent-payload { background: #eef2f8; color: var(--text); border-color: var(--line); }
:root[data-theme="light"] .consent-overlay { background: rgba(226,232,240,0.78); }
:root[data-theme="light"] .consent-dialog { background: #fff; color: var(--text); border-color: rgba(0,119,204,0.35); box-shadow: 0 30px 100px rgba(15,23,42,0.25); }
:root[data-theme="light"] .consent-dialog > .modal-actions { border-top-color: var(--line); }
:root[data-theme="light"] .consent-dialog:focus, :root[data-theme="light"] .consent-dialog button:focus-visible, :root[data-theme="light"] .trust-center button:focus-visible, :root[data-theme="light"] .consent-payload:focus { outline-color: var(--blu); }
:root[data-theme="light"] .onboarding-local { background: rgba(14,155,184,0.06); }
