/* EDITH public app: the "movie hologram" look, matching the personal EDITH.
   Layouts: phone (voice first), tablet (orb on top, panels below) and laptop (orb in the
   middle with hologram panels angled in from each side). */
:root {
  --a: #3fe3ff; --a-rgb: 63, 227, 255;
  --bg: #000;
  --text: #bdf3ff;
  --bright: #eefcff;
  --soft: rgba(var(--a-rgb), .62);
  --dim: rgba(var(--a-rgb), .3);
  --faint: rgba(var(--a-rgb), .08);
  --line: rgba(var(--a-rgb), .14);
  --bad: #ff8a8a;
  --good: #4dffa6;
  --warn: #ffcf5a;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  color-scheme: dark;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html, body { margin: 0; height: 100%; }
body {
  background:
    radial-gradient(circle at 50% 40%, rgba(var(--a-rgb), .15), transparent 42%),
    radial-gradient(ellipse at 50% 120%, rgba(var(--a-rgb), .1), transparent 50%),
    var(--bg);
  color: var(--text);
  font: 15px/1.5 Montserrat, 'Share Tech Mono', system-ui, sans-serif;
  letter-spacing: .03em;
  overflow: hidden;
}
body::after { content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 1;
  background: repeating-linear-gradient(0deg, rgba(var(--a-rgb), .03) 0 1px, transparent 1px 4px); }
.hidden { display: none !important; }
h1, h2, h3 { color: var(--bright); font-weight: 300; margin: .2em 0; }
h1 { font-size: 28px; font-weight: 200; letter-spacing: .8em; margin-left: .8em; text-shadow: 0 0 18px var(--a), 0 0 40px rgba(var(--a-rgb), .6); }
h2 { font-size: 19px; letter-spacing: .12em; text-shadow: 0 0 10px rgba(var(--a-rgb), .5); }
h3 { font-size: 11px; letter-spacing: .4em; text-transform: uppercase; color: var(--a); font-weight: 500; margin: 26px 0 10px; }
a { color: var(--a); }
.muted { color: var(--soft); margin: .2em 0 1em; }
.small { font-size: 13px; }
.tiny { font-size: 11.5px; }
.hint { color: var(--soft); font-size: 13px; line-height: 1.55; margin: 6px 0; }

button {
  font: inherit; color: var(--a); background: var(--faint); border: 1px solid var(--soft); border-radius: 0;
  padding: 10px 14px; cursor: pointer; letter-spacing: .2em; text-transform: uppercase; font-size: 11px; min-height: 42px;
}
button:hover { background: rgba(var(--a-rgb), .16); }
button:disabled { opacity: .45; cursor: default; }
button.primary { background: rgba(var(--a-rgb), .2); color: var(--bright); border-color: var(--a); box-shadow: 0 0 14px rgba(var(--a-rgb), .3); }
button.wide { width: 100%; }
button.link { background: none; border: none; padding: 4px; min-height: 0; color: var(--a); text-decoration: underline; letter-spacing: .04em; text-transform: none; font-size: 13px; }
button.google { background: #fff; color: #1f1f1f; border-color: #fff; }
.dangerBtn { color: var(--bad); border-color: rgba(255, 138, 138, .6); background: rgba(255, 138, 138, .08); }
.dangerTitle { color: var(--bad); }

input, select {
  font: inherit; font-size: 16px; color: var(--bright); background: rgba(0, 0, 0, .75);
  border: 1px solid var(--dim); border-radius: 0; padding: 10px 12px; outline: none; width: 100%; min-width: 0;
}
input:focus, select:focus { border-color: var(--a); box-shadow: 0 0 10px rgba(var(--a-rgb), .25); }
input::placeholder { color: rgba(var(--a-rgb), .38); }
/* iPhone draws date boxes wider and taller than other boxes; make them match */
input[type="date"] { -webkit-appearance: none; appearance: none; display: block; min-height: 46px; max-width: 100%; text-align: left; }
input[type="date"]::-webkit-date-and-time-value { text-align: left; }
select { -webkit-appearance: none; appearance: none; padding-right: 44px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23d8f6ff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 16px center; background-size: 14px 14px; }
label { display: flex; flex-direction: column; gap: 5px; font-size: 11px; color: var(--soft); letter-spacing: .2em; text-transform: uppercase; min-width: 0; }
label.tog { flex-direction: row; align-items: center; gap: 10px; color: var(--text); font-size: 14px; letter-spacing: .03em; text-transform: none; margin: 8px 0; }
input[type="checkbox"] { width: 20px; height: 20px; accent-color: var(--a); flex: 0 0 20px; }

.ico { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round;
  vertical-align: -.15em; filter: drop-shadow(0 0 4px rgba(var(--a-rgb), .55)); overflow: visible; }
i[data-ic] { display: inline-flex; font-style: normal; }

/* ---------- full-screen screens (sign in, onboarding) ---------- */
.screen { position: fixed; inset: 0; overflow-y: auto; padding: calc(var(--safe-t) + 16px) 16px calc(var(--safe-b) + 16px); z-index: 2; }
.center-col { min-height: 100%; display: flex; flex-direction: column; justify-content: center; align-items: stretch; text-align: center; gap: 12px; max-width: 460px; margin: 0 auto; }
.center-col.narrow { max-width: 420px; }
.center-col label, .center-col .stack { text-align: left; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row > input, .row > select { flex: 1 1 0; width: auto; }
.row.between { justify-content: space-between; flex-wrap: nowrap; }
.grid2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.grid2 .full { grid-column: 1 / -1; }
.msg { min-height: 1.4em; color: var(--soft); margin: 4px 0; font-size: 13.5px; }
.msg.err { color: var(--bad); }
.or { display: flex; align-items: center; gap: 10px; color: var(--dim); font-size: 11px; letter-spacing: .3em; text-transform: uppercase; }
.or::before, .or::after { content: ""; flex: 1; border-top: 1px solid var(--dim); }
.logo { width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--a); flex: none;
  box-shadow: 0 0 14px var(--a), inset 0 0 10px var(--a); background: radial-gradient(circle, #fff 0 16%, var(--a) 30%, transparent 64%); }
.logo.big { width: 84px; height: 84px; margin: 0 auto 10px; animation: glow 3s ease-in-out infinite; }
@keyframes glow { 50% { box-shadow: 0 0 34px var(--a), inset 0 0 18px var(--a); } }
.steps { display: flex; gap: 6px; justify-content: center; margin-bottom: 8px; }
.steps i { width: 26px; height: 2px; background: var(--dim); }
.steps i.on { background: var(--a); box-shadow: 0 0 8px var(--a); }
.step { display: flex; flex-direction: column; gap: 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.chips button { min-height: 36px; padding: 6px 14px; letter-spacing: .12em; font-size: 11px; }
.chips.pick button { color: var(--soft); border-color: var(--dim); background: none; }
.chips.pick button.on { color: var(--bright); border-color: var(--a); background: rgba(var(--a-rgb), .2); box-shadow: 0 0 10px rgba(var(--a-rgb), .3); }
.obMis { border: 1px solid var(--line); padding: 12px; text-align: left; }

/* ---------- the app ---------- */
#scrApp { padding: 0; overflow: hidden; }
.app { position: relative; z-index: 2; height: 100%; display: grid;
  grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr) auto;
  grid-template-areas: "top" "content" "tabs"; }
.rail { display: none; }
.topbar { grid-area: top; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px;
  padding: calc(var(--safe-t) + 12px) 16px 6px; }
.status { font-size: 9px; letter-spacing: .35em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.status b { color: var(--a); font-weight: 500; }
@media (max-width: 699px) { .status .word { display: none; } }
.status .dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--good); box-shadow: 0 0 8px var(--good); margin-right: 6px; vertical-align: 1px; animation: blink 2.4s infinite; }
.status.off .dot { background: var(--bad); box-shadow: 0 0 6px var(--bad); }
.status.off b { color: var(--bad); }
@keyframes blink { 0%, 70%, 100% { opacity: 1; } 80% { opacity: .25; } }
.clock { font-size: 13px; font-weight: 300; letter-spacing: .3em; color: var(--bright); text-align: center; }
.who { display: flex; gap: 10px; justify-content: flex-end; align-items: center; min-width: 0; }
#whoName { font-size: 10px; letter-spacing: .42em; text-transform: uppercase; color: rgba(var(--a-rgb), .8); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pill { border: 1px solid var(--dim); padding: 2px 8px; font-size: 10px; letter-spacing: .15em; color: var(--soft); white-space: nowrap; }
.pill.low { color: var(--warn); border-color: rgba(255, 207, 90, .5); }

.content { grid-area: content; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 50%) minmax(0, 1fr); grid-template-areas: "orb" "chat"; padding: 0 16px; }
.holo { display: none; }
.orbWrap { grid-area: orb; position: relative; min-height: 0; cursor: pointer; }
#orb { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.coreName { position: absolute; left: 0; right: 0; text-align: center; pointer-events: none; }
.coreName b { font-weight: 200; font-size: 22px; letter-spacing: .9em; margin-left: .9em; color: var(--bright);
  text-shadow: 0 0 18px var(--a), 0 0 40px rgba(var(--a-rgb), .6); }
.orbStatus { position: absolute; left: 0; right: 0; text-align: center; font-size: 9.5px; letter-spacing: .5em; color: rgba(var(--a-rgb), .75); pointer-events: none; }

/* chat = subtitles under the orb */
.chat { grid-area: chat; min-height: 0; display: flex; flex-direction: column; }
.msgs { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; padding: 8px 2px;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 40%); mask-image: linear-gradient(to bottom, transparent, #000 40%); }
.msgs > :first-child { margin-top: auto; }
.msgs > * { flex-shrink: 0; }   /* a full chat scrolls; lines never squash on top of each other */
.msg { align-self: center; max-width: min(680px, 96%); text-align: center; white-space: pre-wrap; word-wrap: break-word; }
.msg.assistant { font-size: 14.5px; font-weight: 300; line-height: 1.7; color: #e8fdff; letter-spacing: .03em; }
.msg.user { font-size: 13px; letter-spacing: .04em; color: rgba(var(--a-rgb), .75); }
.msg.err { color: var(--bad); }
.note { align-self: center; font-size: 10.5px; letter-spacing: .25em; text-transform: uppercase; color: var(--good); text-shadow: 0 0 10px rgba(77, 255, 166, .5); text-align: center; }
.empty { margin: auto; text-align: center; color: var(--soft); max-width: 340px; font-size: 13px; letter-spacing: .05em; }
.controls { max-width: 560px; width: 100%; margin: 6px auto 10px; display: flex; gap: 2px; align-items: center; }
.controls input { background: transparent; border: none; border-bottom: 1px solid rgba(var(--a-rgb), .5); padding: 10px 4px;
  font-size: 14px; letter-spacing: .04em; flex: 1; width: auto; }   /* what people type keeps their own capitals */
.controls input::placeholder { text-transform: uppercase; letter-spacing: .25em; font-size: 12px; }
.controls input:focus { box-shadow: none; border-bottom-color: var(--a); }
.controls button { border: none; background: none; color: var(--soft); letter-spacing: .3em; font-size: 10px; padding: 8px; min-height: 44px; }
.controls button:hover { color: var(--a); background: none; }
.controls #sendBtn { color: var(--a); }
.controls .mic { font-size: 19px; padding: 6px 10px; color: var(--a); letter-spacing: 0; }
.controls .mic.live { color: #ff9cc8; text-shadow: 0 0 12px #ff6fae; animation: blink 1s infinite; }

/* hologram glass panels */
.holo { position: relative; border: 1px solid rgba(var(--a-rgb), .35); padding: 18px 20px; min-height: 0;
  background: linear-gradient(135deg, rgba(var(--a-rgb), .13), rgba(var(--a-rgb), .02));
  box-shadow: 0 0 30px rgba(var(--a-rgb), .13), inset 0 0 30px rgba(var(--a-rgb), .07);
  clip-path: polygon(0 0, calc(100% - 22px) 0, 100% 22px, 100% 100%, 22px 100%, 0 calc(100% - 22px)); }
.ptitle { display: flex; justify-content: space-between; align-items: center; font-size: 10px; letter-spacing: .45em; font-weight: 500;
  color: var(--a); margin-bottom: 12px; text-transform: uppercase; }
.ptitle > :last-child { font-weight: 400; letter-spacing: .3em; font-size: 9px; color: var(--soft); }
.ptitle .tag { border: none; background: none; padding: 0; min-height: 0; color: var(--soft); font-size: 9px; letter-spacing: .3em; }
.live { color: var(--good) !important; }
.vital { display: grid; grid-template-columns: 18px 1fr auto; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.vital span { letter-spacing: .14em; text-transform: uppercase; font-size: 11px; }
.vital em { color: #fff; font-style: normal; font-size: 10.5px; letter-spacing: .16em; }
.vital .bar { grid-column: 2 / 4; }
.bar { height: 2px; background: var(--faint); overflow: hidden; }
.bar b { display: block; height: 100%; width: 0; background: var(--a); box-shadow: 0 0 8px var(--a); transition: width .8s; }
.mis { padding: 8px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.mis .mn { font-size: 12px; letter-spacing: .06em; color: var(--soft); }
.mis .mv { font-size: 16px; font-weight: 300; color: var(--bright); margin: 2px 0 4px; }
.mis .mv small { font-size: 10px; letter-spacing: .2em; margin-left: 6px; color: var(--soft); }
.mis .ms { font-size: 10.5px; letter-spacing: .1em; color: var(--soft); margin-top: 4px; }
.mis .ms.warn { color: var(--warn); }
.mis.flash { animation: flash 1.4s; }
@keyframes flash { 30% { background: rgba(var(--a-rgb), .18); } }
.it { display: grid; grid-template-columns: 26px 1fr auto; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.it .ic { width: 26px; height: 26px; border: 1px solid var(--dim); border-radius: 50%; display: grid; place-items: center; color: var(--a); font-size: 13px; }
.it .tx div { text-transform: uppercase; letter-spacing: .12em; font-size: 11px; color: var(--bright); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.it .tx small { font-size: 10px; letter-spacing: .1em; color: var(--soft); }
.it .badge { font-size: 8.5px; letter-spacing: .2em; border: 1px solid var(--dim); padding: 2px 6px; color: var(--soft); }
.it .badge.warn { color: var(--warn); border-color: rgba(255, 207, 90, .5); }
.it .badge.ok { color: var(--good); border-color: rgba(77, 255, 166, .4); }
.tl .r { display: grid; grid-template-columns: auto 1fr; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 11.5px; letter-spacing: .1em; }
.tl .r b { color: var(--a); font-weight: 400; white-space: nowrap; }
.tl .r span { text-transform: uppercase; font-size: 11px; color: var(--bright); }

.tabbar { grid-area: tabs; display: flex; gap: 4px; background: rgba(0, 0, 0, .75); border-top: 1px solid rgba(var(--a-rgb), .25);
  padding: 6px 8px calc(var(--safe-b) + 6px); }
.tabbar button { flex: 1; border: none; background: none; color: var(--soft); display: flex; flex-direction: column; align-items: center; gap: 4px;
  font-size: 9px; letter-spacing: .2em; padding: 6px 0; min-height: 52px; }
.tabbar button i { font-size: 20px; }
.tabbar button.act { color: var(--bright); text-shadow: 0 0 10px var(--a); background: none; }

/* sheets (missions, memory, settings) */
.sheet { position: fixed; inset: 0; z-index: 20; background: #02050b; overflow-y: auto; overflow-x: hidden;
  transform: translateY(100%); transition: transform .28s ease; visibility: hidden; }
.sheet.open { transform: none; visibility: visible; }
.sheet .inner { max-width: 640px; margin: 0 auto; padding: calc(var(--safe-t) + 18px) 18px calc(var(--safe-b) + 40px); }
.sheet .close { min-height: 36px; padding: 6px 12px; }
.medit { border: 1px solid var(--line); padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.medit .row { justify-content: flex-end; }
.mem { display: flex; gap: 10px; align-items: center; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--line); }
.mem p { margin: 0; color: var(--text); font-size: 14px; }
.mem button { flex: none; min-height: 34px; padding: 4px 10px; font-size: 10px; }
.swatch { width: 36px; height: 36px; min-height: 36px; border-radius: 50%; padding: 0; border: 2px solid transparent; }
.swatch.sel { border-color: #fff; box-shadow: 0 0 10px #fff; }

.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--safe-b) + 90px); background: rgba(5, 16, 34, .96);
  border: 1px solid var(--a); color: var(--bright); padding: 8px 14px; font-size: 12px; letter-spacing: .12em; opacity: 0; pointer-events: none;
  transition: opacity .25s; max-width: calc(100% - 32px); text-align: center; z-index: 40; }
.toast.show { opacity: 1; }

/* ---------- tablet: orb and subtitles on top, panels below ---------- */
@media (min-width: 700px) {
  .content { overflow-y: auto; gap: 22px; padding: 0 22px 22px;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: 44vh minmax(240px, auto) auto auto;
    grid-template-areas: "orb orb" "chat chat" "vit today" "mis intel"; }
  .holo { display: block; min-height: auto; }
  .pVitals { grid-area: vit; } .pMissions { grid-area: mis; } .pIntel { grid-area: intel; } .pToday { grid-area: today; }
  .msgs { max-height: 34vh; }
  .coreName b { font-size: 26px; }
  .status { font-size: 10px; letter-spacing: .42em; }
}

/* ---------- laptop: orb in the middle, panels angled in from each side ---------- */
@media (min-width: 1100px) and (min-height: 600px) {
  .app { grid-template-columns: 52px minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr);
    grid-template-areas: "rail top" "rail content"; padding: 18px 30px 18px 14px; }
  .tabbar { display: none; }
  .rail { grid-area: rail; display: flex; flex-direction: column; justify-content: center; gap: 16px; }
  .rail button { border: none; background: none; color: rgba(var(--a-rgb), .6); font-size: 18px; padding: 8px 0; min-height: 0; position: relative; letter-spacing: 0; }
  .rail button.act { color: var(--a); text-shadow: 0 0 10px var(--a); }
  .rail button::after { content: attr(data-label); position: absolute; left: calc(100% + 10px); top: 50%; transform: translateY(-50%); white-space: nowrap;
    font-size: 10px; letter-spacing: .3em; text-transform: uppercase; color: #e6faff; background: rgba(0, 0, 0, .9); border: 1px solid var(--dim);
    padding: 6px 10px; opacity: 0; pointer-events: none; transition: opacity .15s; z-index: 20; }
  .rail button:hover::after { opacity: 1; }
  .topbar { padding: 0 0 8px; }
  .content { overflow: visible; padding: 0; gap: 26px 30px;
    grid-template-columns: minmax(240px, 300px) minmax(0, 1fr) minmax(240px, 300px);
    grid-template-rows: minmax(0, 1fr) minmax(0, 1fr) minmax(190px, 27%);
    grid-template-areas: "vit orb today" "mis orb intel" ". chat ."; }
  .orbWrap { grid-row: 1 / 3; }
  .holo { align-self: center; min-height: 0; max-height: 100%; overflow: hidden; }
  .pVitals, .pMissions { transform: perspective(900px) rotateY(16deg); transform-origin: left; }
  .pToday, .pIntel { transform: perspective(900px) rotateY(-16deg); transform-origin: right; }
  .msgs { max-height: none; }
  .vital { padding: 6px 0; }
  .holo { padding: 16px 20px; }
  .coreName b { font-size: clamp(24px, 2.3vw, 32px); }
  .msg.assistant { font-size: 15px; }
}

/* plain pages (privacy policy) */
body.doc { overflow: auto; }
.doc-col { justify-content: flex-start; text-align: left; }

@media (prefers-reduced-motion: reduce) {
  .logo.big, .status .dot { animation: none; }
  .sheet { transition: none; }
}

/* chat tools under the command line: Look, Quiz, Private, Brief */
.tools { display: flex; justify-content: center; gap: 4px; flex-wrap: wrap; margin: -4px auto 8px; max-width: 560px; }
.tools button { border: none; background: none; color: var(--soft); font-size: 9.5px; letter-spacing: .28em; padding: 6px 10px; min-height: 36px;
  display: inline-flex; align-items: center; gap: 6px; }
.tools button i { font-size: 13px; }
.tools button:hover { color: var(--a); background: none; }
.tools button[aria-pressed="true"] { color: var(--warn); text-shadow: 0 0 10px rgba(255, 207, 90, .6); }
body.private .msgs { -webkit-mask-image: none; mask-image: none; }
.msg.priv.assistant, .msg.priv.user { color: #ffe9b0; }
body.private .controls input { border-bottom-color: rgba(255, 207, 90, .6); }
.privateNote { align-self: center; font-size: 10px; letter-spacing: .3em; color: var(--warn); text-transform: uppercase; }
.topic { display: flex; gap: 10px; align-items: center; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--line); }
.topic div { min-width: 0; }
.topic p { margin: 0; color: var(--text); font-size: 14px; }
.topic small { color: var(--soft); font-size: 11px; letter-spacing: .08em; }
.topic small.due { color: var(--warn); }
.topic button { flex: none; min-height: 34px; padding: 4px 10px; font-size: 10px; }
.msg.photo { font-size: 13px; letter-spacing: .04em; color: rgba(var(--a-rgb), .75); }

/* ---------- Arabic (right-to-left) ---------- */
html[dir="rtl"] body, html[dir="rtl"] button, html[dir="rtl"] input, html[dir="rtl"] select {
  font-family: "Noto Kufi Arabic", Montserrat, system-ui, sans-serif; }
/* spaced-out letters break Arabic words apart */
html[dir="rtl"] * { letter-spacing: 0 !important; }
html[dir="rtl"] h1 { margin-left: 0; }
html[dir="rtl"] .mis .mv, html[dir="rtl"] .vital em, html[dir="rtl"] .pill { direction: ltr; unicode-bidi: isolate; }   /* "0 / 95" stays in reading order */
html[dir="rtl"] .mis .mv { text-align: right; }
html[dir="rtl"] .coreName b { margin-left: 0; letter-spacing: .3em !important; }   /* the name stays in Latin letters */
html[dir="rtl"] select { background-position: left 16px center; padding-right: 12px; padding-left: 44px; }
html[dir="rtl"] .center-col label, html[dir="rtl"] .center-col .stack, html[dir="rtl"] .obMis { text-align: right; }
@media (min-width: 1100px) and (min-height: 600px) {
  html[dir="rtl"] .pVitals, html[dir="rtl"] .pMissions { transform: perspective(900px) rotateY(-16deg); transform-origin: right; }
  html[dir="rtl"] .pToday, html[dir="rtl"] .pIntel { transform: perspective(900px) rotateY(16deg); transform-origin: left; }
  html[dir="rtl"] .rail button::after { left: auto; right: calc(100% + 10px); }
}

/* two voice pickers in Settings */
#voiceRow > label, #arVoiceBox > label { display: block; margin: 12px 0 6px; }

/* plan details keep their line break */
.hint.plan { white-space: pre-line; }

/* email accounts in Settings */
.mailRow { align-items: center; gap: 8px; flex-wrap: wrap; }
.mailRow span { flex: 1; min-width: 0; overflow-wrap: anywhere; font-size: 13px; color: var(--bright); }
.steps-list { margin: 0 0 4px; padding-inline-start: 20px; line-height: 1.6; }

/* iCloud picture guide */
.btn-link { display: block; text-align: center; padding: 11px 14px; border: 1px solid var(--a); color: var(--a); text-decoration: none;
  letter-spacing: .2em; text-transform: uppercase; font-size: 11px; }
.btn-link:hover { background: rgba(var(--a-rgb), .1); }
.guide { list-style: none; margin: 6px 0; padding: 0; display: grid; gap: 14px; counter-reset: step; }
.guide li { counter-increment: step; display: grid; gap: 6px; }
.guide .shot { width: 100%; max-width: 360px; height: auto; display: block; border-radius: 10px; }
.guide li span { font-size: 13px; color: var(--soft); line-height: 1.5; }
.guide li span::before { content: counter(step) ". "; color: var(--a); font-weight: 600; }

/* welcome guide */
.tour { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; padding: 16px;
  background: rgba(1, 4, 9, .82); backdrop-filter: blur(4px); }
.tourCard { width: min(420px, 100%); border: 1px solid rgba(var(--a-rgb), .45); background: #030a12;
  box-shadow: 0 0 40px rgba(var(--a-rgb), .18); padding: 26px 22px 18px; text-align: center; }
.tourIcon svg { width: 46px; height: 46px; fill: none; stroke: var(--a); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round;
  filter: drop-shadow(0 0 8px rgba(var(--a-rgb), .6)); }
.tourCard h2 { margin: 12px 0 8px; font-size: 18px; letter-spacing: .12em; text-transform: uppercase; color: var(--bright); font-weight: 500; }
.tourCard p { margin: 0 0 16px; color: var(--soft); line-height: 1.6; font-size: 14px; min-height: 5em; }
.tourDots { display: flex; justify-content: center; gap: 6px; margin-bottom: 16px; }
.tourDots i { width: 7px; height: 7px; border-radius: 50%; background: rgba(var(--a-rgb), .25); }
.tourDots i.on { background: var(--a); box-shadow: 0 0 8px var(--a); }
.tourNav { display: flex; gap: 8px; align-items: center; }
.tourNav .link { margin-inline-end: auto; }
.invisible { visibility: hidden; }

/* hides the iCloud app password as dots without being a password field (keeps password managers out) */
.masked { -webkit-text-security: disc; text-security: disc; }
