/* EDGE Control on the JudeAI masterbrand. Loaded after chat.css and chat-shell.css.
   Rules: no grey text, content top-left, labels only, nothing centred without a purpose. */
:root{--e-ink:var(--c-ink);--e-accent:var(--c-cyan);--e-line:var(--c-line);--e-panel:var(--c-panel);--e-field:var(--c-field)}
body{color:var(--e-ink)}
a.rail-nav-row,a.rail-primary,a.rail-account,a.rail-brand{text-decoration:none;color:inherit}
.rail-brand{display:flex;align-items:center;gap:10px}
.rail-plan,.rail-who span{color:var(--e-ink)!important}
#account-menu button{display:block;width:100%;text-align:left;background:none;border:0;padding:10px 14px;color:var(--e-ink)}

/* Finder: what the person wants to do, listed above the Message JudeAI box, aligned left. */
#finder{max-width:min(100%,900px);margin:0 auto 8px;display:flex;flex-direction:column;gap:2px;text-align:left}
#finder[hidden]{display:none}
#finder button{display:flex;justify-content:space-between;align-items:center;gap:12px;width:100%;text-align:left;
  background:var(--c-panel-90);border:1px solid var(--c-cyan-16);border-radius:14px;padding:10px 16px;color:var(--e-ink);min-height:44px}
#finder button[aria-selected="true"]{border-color:var(--e-accent);background:var(--c-surface-selected)}
#finder kbd{font:inherit;font-size:12px;color:var(--e-accent)}
.turn{max-width:var(--measure);margin:0 auto 14px;text-align:left}
.turn.you{display:flex;justify-content:flex-end}
.turn.you p{background:var(--c-raised);border-radius:18px;padding:10px 16px;margin:0;max-width:80%}
.turn.jude p{margin:0}
.cites{color:var(--e-accent);font-size:13px;margin-top:4px}

/* Work pages: everything starts top-left. */
.page{max-width:1100px;margin:0;padding:8px 8px 40px;text-align:left}
.page h1{font-size:24px;font-weight:600;text-align:left;margin:4px 0 16px}
.page h2{font-size:17px;font-weight:600;margin:0 0 10px;color:var(--e-accent)}
.block{background:var(--c-panel-70);border:1px solid var(--c-cyan-16);border-radius:18px;padding:16px;margin:0 0 14px}
.tabs{display:flex;gap:6px;flex-wrap:wrap;margin:0 0 14px}
.tabs a{border:1px solid var(--c-cyan-16);border-radius:999px;padding:7px 14px;text-decoration:none;color:var(--e-ink)}
.tabs a[aria-current="page"]{border-color:var(--e-accent);background:var(--c-surface-selected)}
.fields{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:10px 14px}
label{display:block;font-size:13px;color:var(--e-accent);margin:0 0 4px}
input,select,textarea{width:100%;box-sizing:border-box;background:var(--e-field);color:var(--e-ink);border:1px solid var(--c-cyan-16);
  border-radius:12px;padding:10px 12px;font:inherit;min-height:44px}
textarea{min-height:110px;resize:vertical}
details.more{margin:10px 0 0}
details.more>summary{cursor:pointer;color:var(--e-accent);font-size:14px;min-height:32px}
details.more[open]>summary{margin-bottom:10px}
.checks{display:flex;flex-wrap:wrap;gap:8px 16px}
.checks label{display:flex;align-items:center;gap:6px;color:var(--e-ink);font-size:14px;margin:0}
.checks input{width:auto;min-height:0}
.actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:12px}
.btn{border:0;border-radius:999px;padding:10px 18px;min-height:44px;font-weight:600;cursor:pointer;
  background:linear-gradient(135deg,#63ddff,#13a7e6);color:#041019;text-decoration:none;display:inline-flex;align-items:center}
.btn.ghost{background:none;border:1px solid var(--c-cyan-24);color:var(--e-ink)}
.btn.danger{background:none;border:1px solid #ffb4a8;color:#ffffff}
.btn.sm{min-height:34px;padding:6px 12px;font-size:13px}
table{width:100%;border-collapse:collapse;font-size:14px}
th{text-align:left;color:var(--e-accent);font-weight:600;padding:8px;border-bottom:1px solid var(--e-line)}
td{padding:8px;border-bottom:1px solid var(--e-line);vertical-align:top;color:var(--e-ink)}
.tablewrap{overflow-x:auto}
.pill{display:inline-block;border:1px solid var(--c-cyan-24);border-radius:999px;padding:1px 9px;font-size:12px}
.pill.trusted,.pill.active,.pill.open,.pill.valid{border-color:var(--e-accent);color:var(--e-accent)}
.pill.quarantined,.pill.revoked,.pill.broken{border-color:#ffb4a8}
.list{list-style:none;margin:0;padding:0}
.list li{display:flex;justify-content:space-between;gap:12px;align-items:center;padding:8px 0;border-bottom:1px solid var(--e-line)}
.list li:last-child{border-bottom:0}
.msg{min-height:0;margin:8px 0 0;font-size:14px}
.msg.error{color:#ffd0c8}.msg.ok{color:var(--e-accent)}
.mono{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:12px;word-break:break-all}
.steps{display:flex;gap:6px;flex-wrap:wrap;margin:0 0 14px}
.steps span{border:1px solid var(--c-cyan-16);border-radius:999px;padding:5px 12px;font-size:13px}
.steps span.on{border-color:var(--e-accent);color:var(--e-accent)}
.choice{display:flex;gap:10px;align-items:flex-start;color:var(--e-ink);font-size:15px;padding:8px 0;border-bottom:1px solid var(--e-line)}
.choice input{width:auto;min-height:0;margin-top:4px}
.kv{display:grid;grid-template-columns:max-content 1fr;gap:2px 12px;font-size:13px}
.kv dt{color:var(--e-accent)}.kv dd{margin:0}
.hidden{display:none!important}
.solo{padding:20px 24px}
.solo .brand{display:flex;align-items:center;gap:12px;text-decoration:none;color:inherit;font-size:23px;margin-bottom:18px}
.gap-top{margin-top:12px}
.finder-head{display:flex;justify-content:space-between;align-items:center;padding:4px 6px;font-size:13px;color:var(--e-accent)}
.finder-ctls{display:flex;gap:6px}
#finder .finder-ctl{width:auto;min-height:30px;padding:4px 12px;border-radius:999px;font-size:13px;background:none}
.finder-empty{margin:4px 6px;font-size:14px}
/* Depth: layered gradient panels, inner highlight, soft shadow, cyan tiles. */
.block{background:linear-gradient(150deg,#0e3550 0%,#092536 75%);border:1px solid rgba(99,221,255,.22);border-radius:22px;padding:20px 22px;margin:0 0 18px;
  box-shadow:0 18px 44px rgba(0,8,14,.5),inset 0 1px 0 rgba(255,255,255,.09);animation:edge-rise .3s ease both}
.page{padding:12px 12px 48px}
.page h1{display:flex;align-items:center;gap:14px;font-size:26px;font-weight:700;margin:6px 0 22px}
.htile,.ftile{display:grid;place-items:center;flex:none;color:#041019;background:linear-gradient(140deg,#8be7ff,#13a7e6);
  box-shadow:0 10px 24px rgba(19,167,230,.35),inset 0 1px 0 rgba(255,255,255,.5)}
.htile{width:46px;height:46px;border-radius:14px}
.ftile{width:30px;height:30px;border-radius:10px}
.htile svg,.ftile svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.ftile svg{width:16px;height:16px}
#finder{gap:6px}
#finder button{box-shadow:0 10px 26px rgba(0,8,14,.45),inset 0 1px 0 rgba(255,255,255,.07);padding:8px 14px;animation:edge-rise .2s ease both}
#finder button>span:first-child{display:flex;align-items:center;gap:12px}
.tabs a{background:rgba(9,37,54,.7);box-shadow:inset 0 1px 0 rgba(255,255,255,.07);transition:transform .18s}
.tabs a:hover{transform:translateY(-1px)}
.tabs a[aria-current="page"]{background:linear-gradient(135deg,#63ddff,#13a7e6);color:#041019;border-color:transparent}
.btn{box-shadow:0 8px 22px rgba(19,167,230,.3);transition:transform .18s}
.btn:hover{transform:translateY(-1px)}
.btn.ghost,.btn.danger{box-shadow:none}
@keyframes edge-rise{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}
@media (prefers-reduced-motion:reduce){.block,#finder button{animation:none}.btn,.tabs a{transition:none}}
/* The EDGE composer has only the box and Send, so it lays out as one row. */
#form .row{display:flex!important;align-items:flex-end;gap:12px;grid-template-columns:none!important}
#form #message{flex:1 1 auto;min-width:0;width:auto;grid-column:auto;grid-row:auto;min-height:56px;font-size:17px}
#form #send{grid-column:auto;grid-row:auto;flex:none}
#message::placeholder{color:var(--c-cyan)}
#rail{display:flex;flex-direction:column}
#rail .rail-foot{margin-top:auto}

/* Lock veil: the whole app is covered until this computer's device key signs again. */
#lock-veil{position:fixed;inset:0;z-index:1000;display:grid;place-items:center;background:radial-gradient(ellipse at 100% 100%,rgba(8,99,150,.6),transparent 60%),rgba(4,12,18,.86);backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px)}
.lock-card{display:flex;flex-direction:column;align-items:center;gap:12px;padding:28px 32px;border-radius:24px;min-width:280px;
  background:linear-gradient(150deg,#0e3550,#092536 75%);border:1px solid rgba(99,221,255,.3);box-shadow:0 24px 60px rgba(0,0,0,.55),inset 0 1px 0 rgba(255,255,255,.1)}
.lock-card h2{margin:0;font-size:22px;color:#fff}
.lock-card p{margin:0;font-size:14px}
.lock-card{background:none;border:0;box-shadow:none}.lock-card h2{font-size:28px}.lock-card p{font-size:16px;color:#a9efff}.lock-tile{width:64px;height:64px;border-radius:18px}

/* Workspace and banking: stat tiles, account cards, list rows, stepper. */
.page.wide{max-width:1240px}
.tiles{display:grid;grid-template-columns:repeat(auto-fill,minmax(170px,1fr));gap:14px;margin:0 0 18px}
.tile-stat{border-radius:18px;padding:14px 16px;background:linear-gradient(150deg,#0e3550,#092536 75%);border:1px solid rgba(99,221,255,.22);
  box-shadow:0 14px 34px rgba(0,8,14,.45),inset 0 1px 0 rgba(255,255,255,.08)}
.tile-stat span{display:block;font-size:13px;color:var(--c-cyan)}
.tile-stat b{display:block;font-size:28px;line-height:1.2;margin-top:4px}
.tile-stat.alert{border-color:rgba(255,140,120,.6)}.tile-stat.alert b{color:#ffb4a8}
.acct{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:14px;margin:0 0 18px}
.acct-card{border-radius:20px;padding:18px;background:linear-gradient(140deg,#0f4060,#092536 80%);border:1px solid rgba(99,221,255,.28);
  box-shadow:0 18px 40px rgba(0,8,14,.5),inset 0 1px 0 rgba(255,255,255,.1);display:flex;flex-direction:column;gap:6px;cursor:pointer;text-align:left;color:#fff;font:inherit}
.acct-card[aria-pressed="true"]{border-color:var(--c-cyan)}
.acct-card small{color:#a9efff}.acct-card b{font-size:26px}
.rowlist{list-style:none;margin:0;padding:0}
.rowlist li{display:flex;align-items:center;gap:12px;padding:10px 4px;border-bottom:1px solid var(--e-line)}
.rowlist li:last-child{border-bottom:0}
.rowlist .grow{flex:1;min-width:0}.rowlist .sub{display:block;font-size:12px;color:#a9efff}
.amt.in{color:#7ef0c8}.amt{font-variant-numeric:tabular-nums;white-space:nowrap}
.findrow{display:flex;gap:10px}.findrow input{flex:1}
.acting{display:flex;gap:8px;flex-wrap:wrap;margin:-8px 0 16px}
.acting button{border:1px solid rgba(99,221,255,.24);background:rgba(9,37,54,.7);color:#fff;border-radius:999px;padding:6px 14px;font:inherit;font-size:13px;cursor:pointer}
.acting button[aria-pressed="true"]{background:linear-gradient(135deg,#63ddff,#13a7e6);color:#041019;border-color:transparent}
.stepper{display:flex;gap:8px;margin:0 0 16px;flex-wrap:wrap}
.stepper span{border-radius:999px;padding:6px 14px;border:1px solid rgba(99,221,255,.24);font-size:13px}
.stepper span.on{background:linear-gradient(135deg,#63ddff,#13a7e6);color:#041019;border-color:transparent}
.grid2{display:grid;grid-template-columns:repeat(auto-fit,minmax(320px,1fr));gap:18px}
.state-ok{color:#7ef0c8}.state-bad{color:#ffb4a8}
.cop{border-radius:14px;padding:10px 14px;margin-top:10px;border:1px solid rgba(99,221,255,.3)}
.cop.match{border-color:#7ef0c8}.cop.close_match{border-color:#f6cf6f}.cop.no_match,.cop.no_account{border-color:#ffb4a8}
.verify3{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin:12px 0}
.verify3 div{border-radius:16px;padding:16px 12px;text-align:center;border:1px solid rgba(99,221,255,.24);display:flex;flex-direction:column;align-items:center;gap:6px}
.verify3 b{font-size:16px}
.verify3 div.ok{border-color:#7ef0c8}
.grow-right{display:flex;flex-direction:column;align-items:flex-end}.rowlist li.clickable{cursor:pointer}.rowlist li.clickable:hover{background:rgba(99,221,255,.06)}

/* Protected values: masked chip by default; the message lock opens what this viewer may see. */
.prot{display:inline-flex;align-items:center;gap:6px;padding:1px 9px 1px 4px;margin:0 2px;border-radius:999px;background:rgba(99,221,255,.12);
  border:1px solid rgba(99,221,255,.3);font-variant-numeric:tabular-nums;white-space:nowrap}
.prot.secret{background:rgba(246,207,111,.12);border-color:rgba(246,207,111,.45)}
.prot.shown{background:rgba(126,240,200,.12);border-color:rgba(126,240,200,.45)}
.ptile{display:inline-grid;place-items:center}.ptile svg{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.turn{position:relative}.msg-lock{margin-left:8px;border:1px solid rgba(99,221,255,.3);background:rgba(9,37,54,.7);color:#fff;border-radius:999px;width:30px;height:30px;
  display:inline-grid;place-items:center;cursor:pointer;vertical-align:middle}
.msg-lock[aria-pressed="true"]{border-color:#7ef0c8;color:#7ef0c8}.msg-lock:disabled{opacity:.45;cursor:not-allowed}
.turn.you{align-items:center}
#rail-privacy[aria-pressed="true"]{color:#f6cf6f}
body.privacy .acct-card b,body.privacy .amt,body.privacy .tile-stat b{filter:blur(7px)}

/* ---- Contrast pass: darker back panel, lifted panels, landing blues for state and action ---- */
body:has(.page){background:radial-gradient(1100px 700px at 100% 105%,rgba(8,99,150,.55),transparent 62%),
  radial-gradient(800px 500px at 0% -10%,rgba(19,167,230,.10),transparent 60%),#030b12}
body:has(.page) #rail{background:linear-gradient(180deg,#05121c,#030b12);border-right:1px solid rgba(99,221,255,.14)}
.page h1{color:#fff;letter-spacing:-.01em}
.block{background:linear-gradient(160deg,#103d5c 0%,#0b2a3f 55%,#081f30 100%);border:1px solid rgba(99,221,255,.30);
  box-shadow:0 26px 60px rgba(0,0,0,.6),0 0 0 1px rgba(3,11,18,.6),inset 0 1px 0 rgba(255,255,255,.12)}
.block h2{color:#63ddff;display:flex;align-items:center;gap:10px}
.block h2::before{content:"";width:4px;height:18px;border-radius:2px;background:linear-gradient(180deg,#63ddff,#13a7e6);box-shadow:0 0 12px rgba(99,221,255,.6)}
.tile-stat{background:linear-gradient(160deg,#124566 0%,#0b2a3f 70%);border:1px solid rgba(99,221,255,.32);position:relative;overflow:hidden;
  box-shadow:0 20px 44px rgba(0,0,0,.55),inset 0 1px 0 rgba(255,255,255,.14)}
.tile-stat::after{content:"";position:absolute;left:0;right:0;top:0;height:3px;background:linear-gradient(90deg,#63ddff,#13a7e6,transparent)}
.tile-stat span{color:#63ddff;font-weight:600}
.tile-stat b{color:#fff}
.acct-card{background:linear-gradient(140deg,#13a7e6 0%,#086396 38%,#0b2a3f 100%);border:1px solid rgba(99,221,255,.45)}
.acct-card small{color:#e8f9ff}
.acct-card[aria-pressed="true"]{box-shadow:0 0 0 2px #63ddff,0 24px 50px rgba(19,167,230,.35)}
/* Pills: filled, by state */
.pill{background:rgba(19,167,230,.20);border:1px solid #13a7e6;color:#c9f4ff;font-weight:600;padding:3px 11px}
.pill.trusted,.pill.active,.pill.open,.pill.valid{background:linear-gradient(135deg,#63ddff,#13a7e6);color:#041019;border-color:transparent;
  box-shadow:0 4px 14px rgba(19,167,230,.35)}
.pill.quarantined,.pill.revoked,.pill.broken{background:rgba(255,120,100,.18);border-color:#ff8a7a;color:#ffd6cf}
.pill.pending,.pill.warn{background:rgba(246,207,111,.18);border-color:#f6cf6f;color:#ffe9b0}
/* Tabs and role chips: landing blues */
.tabs a,.acting button,.steps span,.stepper span{background:#0a2638;border:1px solid rgba(99,221,255,.32);color:#fff}
.tabs a:hover,.acting button:hover{border-color:#63ddff}
.tabs a[aria-current="page"],.acting button[aria-pressed="true"],.stepper span.on,.steps span.on{background:linear-gradient(135deg,#63ddff,#13a7e6);
  color:#041019;border-color:transparent;box-shadow:0 8px 22px rgba(19,167,230,.35)}
/* Fields */
input,select,textarea{background:#061823;border:1px solid rgba(99,221,255,.32)}
input:focus,select:focus,textarea:focus{outline:none;border-color:#63ddff;box-shadow:0 0 0 3px rgba(99,221,255,.22)}
input::placeholder,textarea::placeholder{color:#7fd8f2}
label{color:#63ddff;font-weight:600}
/* Rows */
.rowlist li{border-bottom:1px solid rgba(99,221,255,.12)}
.rowlist li.clickable:hover{background:linear-gradient(90deg,rgba(99,221,255,.10),transparent)}
.rowlist .sub{color:#a9efff}
.amt.in{color:#5ff0c0;font-weight:600}
.ftile,.htile{background:linear-gradient(140deg,#8be7ff,#13a7e6)}
th{color:#63ddff;border-bottom:1px solid rgba(99,221,255,.3)}
td{border-bottom:1px solid rgba(99,221,255,.12)}
.kv dt{color:#63ddff;font-weight:600}
details.more>summary{color:#63ddff;font-weight:600}
.btn.ghost{background:#0a2638;border:1px solid #13a7e6;color:#fff}
.acting{display:flex;align-items:center;gap:10px;margin:-10px 0 18px}.acting label{margin:0}.acting select{width:auto;min-width:300px}

/* Sidebar runs the full height; the composer sits in the content column. */
body.with-rail #rail{grid-row:1 / span 2;grid-column:1}
body.with-rail #chat,body.with-rail .compose{grid-column:2}
#rail .rail-nav{display:flex;flex-direction:column;gap:2px;margin-top:10px}
.rail-nav-row.tree{display:flex;align-items:center;gap:10px;width:100%;background:none;border:0;color:inherit;font:inherit;text-align:left;
  min-height:38px;border-radius:12px;cursor:pointer;text-decoration:none}
.rail-nav-row.tree:hover{background:rgba(99,221,255,.08)}
.rail-nav-row.tree[aria-current="page"]{background:linear-gradient(90deg,rgba(99,221,255,.22),rgba(19,167,230,.06));box-shadow:inset 3px 0 0 #63ddff}
.rail-nav-row.tree span{flex:1}
.rail-nav-row.tree .caret{width:14px;height:14px;transition:transform .15s}
.rail-nav-row.tree[aria-expanded="true"] .caret{transform:rotate(90deg)}
.tree-kids{display:flex;flex-direction:column;gap:2px}
.rail-controls{display:flex;gap:6px;margin:0 0 10px}
.rail-controls .ctl{flex:1;display:flex;align-items:center;justify-content:center;gap:6px;min-height:36px;border-radius:12px;font:inherit;font-size:13px;
  background:#0a2638;border:1px solid rgba(99,221,255,.3);color:#fff;cursor:pointer}
.rail-controls .ctl svg{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.rail-controls .ctl[aria-pressed="true"]{background:linear-gradient(135deg,#63ddff,#13a7e6);color:#041019;border-color:transparent}

/* Electric: the landing's teal-blue, brighter than Dark. */
html[data-theme="electric"] body:has(.page){background:radial-gradient(1100px 700px at 100% 105%,rgba(0,140,200,.55),transparent 62%),#01324a}
html[data-theme="electric"] body:has(.page) #rail{background:linear-gradient(180deg,#023b57,#012a3f)}
html[data-theme="electric"] .block{background:linear-gradient(160deg,#0f6088 0%,#0a4766 60%,#08394f 100%)}
html[data-theme="electric"] .tile-stat{background:linear-gradient(160deg,#137aa8 0%,#0a4766 70%)}

/* Light: deep navy text on white and ice; cyan stays the action colour. */
html[data-theme="light"] body{color:#041019}
html[data-theme="light"] body:has(.page){background:radial-gradient(900px 600px at 100% 105%,rgba(0,174,230,.18),transparent 62%),#eef8fd}
html[data-theme="light"] body:has(.page) #rail{background:#ffffff;border-right:1px solid #c8e9f5;color:#041019}
html[data-theme="light"] .page h1,html[data-theme="light"] .tile-stat b,html[data-theme="light"] td,html[data-theme="light"] .rowlist li,
html[data-theme="light"] .kv dd,html[data-theme="light"] .lock-card h2{color:#041019}
html[data-theme="light"] .block,html[data-theme="light"] .tile-stat{background:#ffffff;border-color:#8fd4ed;box-shadow:0 14px 34px rgba(0,80,112,.12)}
html[data-theme="light"] .block h2,html[data-theme="light"] label,html[data-theme="light"] .kv dt,html[data-theme="light"] th,
html[data-theme="light"] .tile-stat span,html[data-theme="light"] details.more>summary{color:#006f9e}
html[data-theme="light"] .rowlist .sub{color:#0e2230}
html[data-theme="light"] input,html[data-theme="light"] select,html[data-theme="light"] textarea{background:#f4fcff;color:#041019;border-color:#8fd4ed}
html[data-theme="light"] input::placeholder,html[data-theme="light"] textarea::placeholder{color:#0e5a7a}
html[data-theme="light"] .tabs a,html[data-theme="light"] .rail-controls .ctl,html[data-theme="light"] .btn.ghost{background:#e8f8ff;color:#041019;border-color:#8fd4ed}
html[data-theme="light"] .pill{background:#d7f3ff;color:#003b55;border-color:#008fc7}
html[data-theme="light"] .rowlist li,html[data-theme="light"] td{border-bottom-color:#c8e9f5}
html[data-theme="light"] .amt.in{color:#00785a}
html[data-theme="light"] .prot{background:#e8f8ff;border-color:#8fd4ed}
.rail-nav-row.tree[data-depth="0"]{padding-left:10px}.rail-nav-row.tree[data-depth="1"]{padding-left:28px}
.rail-nav-row.tree[data-depth="2"]{padding-left:46px}.rail-nav-row.tree[data-depth="3"]{padding-left:64px}
.rail-nav-row.tree[data-depth="0"]{font-weight:600}
#rail .rail-foot{display:flex;flex-direction:column;align-items:stretch;gap:8px}
#rail .rail-foot .rail-account{width:100%}

/* ---- Restraint pass: dark navy dominant, cyan only for selection, action, focus and live state ---- */
html[data-theme="dark"] body:has(.page),body:has(.page){background:radial-gradient(1000px 640px at 100% 110%,rgba(8,99,150,.22),transparent 65%),#030a10}
html[data-theme="dark"] body:has(.page) #rail,body:has(.page) #rail{background:#040d15;border-right:1px solid rgba(99,221,255,.10)}
.page{padding:28px 32px 56px;max-width:1180px}
.page h1{margin:4px 0 28px}
.block{background:linear-gradient(180deg,#0a1e2c 0%,#071722 100%);border:1px solid rgba(99,221,255,.16);border-radius:22px;padding:24px 26px;margin:0 0 22px;
  box-shadow:0 18px 44px rgba(0,0,0,.45),inset 0 1px 0 rgba(255,255,255,.06)}
.tile-stat{background:linear-gradient(180deg,#0b2131,#071722);border:1px solid rgba(99,221,255,.18);box-shadow:0 14px 34px rgba(0,0,0,.45),inset 0 1px 0 rgba(255,255,255,.06)}
.tile-stat.alert{border-color:rgba(255,138,122,.6)}.tile-stat.alert b{color:#ffb4a8}
.tiles{gap:18px;margin-bottom:24px}
.acct-card{background:linear-gradient(150deg,#0c3c5a 0%,#082233 70%);border:1px solid rgba(99,221,255,.30)}
/* Pills: landing construction: cyan edge, dark interior, lift; bright only when selected or live */
.pill,.tabs a,.acting button,.stepper span,.steps span,.rail-controls .ctl,.btn.ghost{background:#06131d;border:1px solid rgba(99,221,255,.55);color:#eef8fd;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.08),0 6px 16px rgba(0,0,0,.35)}
.pill.trusted,.pill.active,.pill.open,.pill.valid,.tabs a[aria-current="page"],.stepper span.on,.steps span.on,.rail-controls .ctl[aria-pressed="true"]{
  background:linear-gradient(135deg,#63ddff,#13a7e6);color:#041019;border-color:transparent;box-shadow:0 0 18px rgba(99,221,255,.35),inset 0 1px 0 rgba(255,255,255,.4)}
.btn{box-shadow:0 0 16px rgba(99,221,255,.28),inset 0 1px 0 rgba(255,255,255,.4)}
input,select,textarea{background:#040f17;border-color:rgba(99,221,255,.28)}
.block h2::before{box-shadow:0 0 10px rgba(99,221,255,.5)}
/* Footer: identity, then icon controls; the round appearance dial */
.rail-controls{margin:8px 0 0;gap:8px}
.rail-controls .ctl{flex:0 0 40px;width:40px;height:40px;min-height:40px;border-radius:50%;padding:0}
.rail-controls .ptile svg{width:17px;height:17px}
/* Protected values read naturally: masked text with a small lock; select to reveal when permitted */
.prot{display:inline-flex;align-items:center;gap:4px;padding:0 2px;margin:0;border:0;border-bottom:1px dashed rgba(99,221,255,.6);border-radius:0;
  background:none;color:inherit;font:inherit;cursor:default;white-space:nowrap}
button.prot{cursor:pointer}
.prot.secret{border-bottom-color:rgba(246,207,111,.7)}
.prot.shown{border-bottom:1px solid #5ff0c0;color:#e8fff7}
.prot .ptile svg{width:12px;height:12px;opacity:.85}
.compose-status{max-width:min(100%,900px);margin:0 auto 6px;min-height:0;display:flex;gap:10px;align-items:center;font-size:14px;color:#a9efff}
.compose-status:empty{display:none}
html[data-theme="light"] body:has(.page){background:#eef8fd}
html[data-theme="light"] .block,html[data-theme="light"] .tile-stat{background:#fff}
html[data-theme="light"] .pill,html[data-theme="light"] .tabs a,html[data-theme="light"] .rail-controls .ctl,html[data-theme="light"] .btn.ghost{background:#f4fcff;color:#041019;border-color:#008fc7}
.org-switch{margin:6px 0;background:#06131d!important;border:1px solid rgba(99,221,255,.35)!important;font-weight:700}
.org-switch svg:last-child{margin-left:auto;width:15px;height:15px}
.org-sections{display:flex;flex-direction:column;gap:2px;padding-left:6px}
.rail-nav-row.back{color:#63ddff}
