:root {
  --bg: #060b10;
  --bg2: #0a141b;
  --panel: #0d1a23;
  --panel2: #102330;
  --line: #1b3644;
  --line2: #27505f;
  --text: #d9ebf1;
  --dim: #7f9aa6;
  --accent: #2fd6e0;
  --teal: #1fb5a3;
  --good: #3ddc84;
  --warn: #f2c14e;
  --bad: #ff4d5a;
  --mono: ui-monospace, 'Cascadia Mono', 'SF Mono', Consolas, 'Liberation Mono', monospace;
  --sans: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}
* { box-sizing: border-box; }
html { color-scheme: dark; }
body {
  margin: 0; min-height: 100vh; color: var(--text); font: 15px/1.45 var(--sans);
  background: radial-gradient(1200px 600px at 50% -200px, #0e2530 0%, transparent 70%), var(--bg);
}
[hidden] { display: none !important; }
a { color: var(--accent); }
code { font-family: var(--mono); font-size: 0.92em; }
h1 { font-size: 1.35rem; letter-spacing: 0.06em; text-transform: uppercase; margin: 0 0 14px; }
h2 { font-size: 1rem; letter-spacing: 0.08em; text-transform: uppercase; margin: 0 0 10px; color: var(--accent); }
.muted { color: var(--dim); font-size: 0.9rem; }

/* ── shell ── */
.topbar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; padding: 10px 16px;
  border-bottom: 1px solid var(--line); background: rgba(6, 11, 16, 0.92);
  position: sticky; top: 0; z-index: 10; backdrop-filter: blur(6px);
}
.brand { font-weight: 700; letter-spacing: 0.22em; color: var(--text); text-decoration: none; display: flex; align-items: center; gap: 8px; }
.brand-sub { color: var(--accent); font-weight: 400; margin-left: -2px; }
.brand-mark { width: 14px; height: 14px; border: 2px solid var(--accent); border-radius: 50%; position: relative; }
.brand-mark::after { content: ''; position: absolute; inset: 3px; background: var(--accent); border-radius: 50%; }
.nav { display: flex; gap: 2px; flex: 1; }
.nav a {
  color: var(--dim); text-decoration: none; padding: 6px 12px; border-radius: 4px;
  text-transform: uppercase; letter-spacing: 0.1em; font-size: 0.8rem;
}
.nav a:hover { color: var(--text); }
.nav a.active { color: var(--accent); background: rgba(47, 214, 224, 0.1); }
.whoami { display: flex; align-items: center; gap: 10px; font-size: 0.85rem; color: var(--dim); margin-left: auto; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: #3a4d57; }
.dot.on { background: var(--good); box-shadow: 0 0 8px var(--good); }
.view { padding: 18px 16px 48px; max-width: 1500px; margin: 0 auto; }
.page { max-width: 900px; margin: 0 auto; }
.auth { max-width: 420px; margin: 6vh auto 0; }

/* ── generic controls ── */
.panel-card { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 16px; margin-bottom: 16px; }
.btn {
  display: inline-block; font: inherit; font-size: 0.85rem; letter-spacing: 0.06em; text-transform: uppercase;
  color: #04161a; background: var(--accent); border: 1px solid var(--accent); border-radius: 5px;
  padding: 8px 14px; cursor: pointer; text-decoration: none; white-space: nowrap;
}
.btn:hover { filter: brightness(1.12); }
.btn:disabled, .btn.disabled { opacity: 0.45; cursor: default; filter: none; }
.btn.ghost { background: transparent; color: var(--accent); border-color: var(--line2); }
.btn.danger { background: transparent; color: var(--bad); border-color: rgba(255, 77, 90, 0.5); }
.btn.small { padding: 4px 9px; font-size: 0.74rem; }
.field { display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 180px; }
.field span { font-size: 0.74rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--dim); }
input[type='text'], input[type='email'], input[type='password'] {
  font: inherit; color: var(--text); background: var(--bg2); border: 1px solid var(--line2);
  border-radius: 5px; padding: 8px 10px; width: 100%;
}
input:focus-visible, .btn:focus-visible, .tab:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.auth-form { display: flex; flex-direction: column; gap: 12px; margin-bottom: 12px; }
.inline-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin: 8px 0; }
.check { display: flex; align-items: center; gap: 6px; color: var(--dim); padding-bottom: 8px; }
.error { color: var(--bad); margin: 6px 0; min-height: 0; }
.error:empty { display: none; }
.two-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.reveal { border: 1px solid var(--warn); background: rgba(242, 193, 78, 0.07); border-radius: 8px; padding: 12px; margin: 10px 0; }
.keyline { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 8px 0; }
.secret { background: var(--bg); border: 1px solid var(--line2); border-radius: 4px; padding: 6px 9px; word-break: break-all; user-select: all; }
.warn-text { color: var(--warn); font-size: 0.9rem; margin: 6px 0 10px; }
.dl-row { display: flex; flex-wrap: wrap; gap: 16px; margin: 10px 0; }
.dl { display: flex; flex-direction: column; gap: 4px; }

.chip {
  display: inline-block; font: 600 0.66rem/1 var(--mono); letter-spacing: 0.08em; padding: 3px 6px;
  border: 1px solid var(--line2); border-radius: 3px; color: var(--text); margin-left: 6px; vertical-align: middle; white-space: nowrap;
}
.chip.accent { color: var(--accent); border-color: var(--accent); }
.chip.dim { color: var(--dim); }
.chip.good { color: var(--good); border-color: rgba(61, 220, 132, 0.5); }
.chip.warn { color: var(--warn); border-color: rgba(242, 193, 78, 0.5); }
.chip.bad { color: var(--bad); border-color: rgba(255, 77, 90, 0.6); }

.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.table th { text-align: left; font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--dim); padding: 6px 8px; border-bottom: 1px solid var(--line); }
.table td { padding: 8px; border-bottom: 1px solid rgba(27, 54, 68, 0.6); vertical-align: middle; }
.table tr.revoked td { color: var(--dim); }
.members { list-style: none; padding: 0; margin: 10px 0; }
.members li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 7px 0; border-bottom: 1px solid rgba(27, 54, 68, 0.6); }
.m-name { font-weight: 600; }
.m-joined { margin-left: auto; }
.fleet-head { display: flex; align-items: center; }
.fleet-head h2 { margin: 0; }

/* ── fleet tab ── */
.fleet-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.tab { font: inherit; font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--dim); background: transparent; border: 1px solid var(--line); border-radius: 4px; padding: 6px 12px; cursor: pointer; }
.tab.active { color: var(--accent); border-color: var(--accent); background: rgba(47, 214, 224, 0.08); }
.feed-status, .hint { color: var(--dim); }
.section-title { color: var(--dim); font-size: 0.78rem; margin: 4px 0 10px; }
.fleet-main { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 18px; align-items: start; }
.cards { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; }
.ships-pane { margin-bottom: 18px; }

.card {
  background: linear-gradient(180deg, var(--panel) 0%, #0a161d 100%);
  border: 1px solid var(--line2); border-radius: 22px; padding: 14px 16px 12px;
  box-shadow: inset 0 0 40px rgba(47, 214, 224, 0.04), 0 4px 18px rgba(0, 0, 0, 0.35);
  min-width: 0;
}
.card.self { border-color: rgba(47, 214, 224, 0.65); }
.card.flight { flex: 1 1 560px; max-width: 760px; }
.card.foot { flex: 1 1 340px; max-width: 460px; }
.card.away { flex: 1 1 260px; max-width: 360px; opacity: 0.72; }
.card.crewship { flex: 1 1 380px; max-width: 520px; }
.card.station { flex: 1 1 460px; max-width: 620px; }

.card-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin-bottom: 8px; }
.card-head h3 { margin: 0; font-size: 1rem; letter-spacing: 0.06em; }
.card-head .id { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.who { font-weight: 700; font-size: 1.02rem; overflow-wrap: anywhere; }
.pn { color: var(--dim); font: 0.78rem var(--mono); overflow-wrap: anywhere; }
.ship-name { color: var(--accent); font-size: 0.85rem; letter-spacing: 0.08em; text-transform: uppercase; }
.chips { margin-left: auto; display: flex; flex-wrap: wrap; gap: 4px; }
.chips .chip { margin-left: 0; }

.annun { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 4px; margin-bottom: 10px; }
.lamp {
  font: 600 0.62rem/1 var(--mono); letter-spacing: 0.04em; text-align: center; padding: 5px 0; border-radius: 3px;
  color: #3d5560; background: #0a1319; border: 1px solid #14262f; overflow: hidden;
}
.lamp.a-off { color: #8a9aa2; background: #18232a; border-color: #2a3a43; }
.lamp.a-nominal { color: #062313; background: var(--good); border-color: var(--good); }
.lamp.a-minor_on, .lamp.a-minor_flashing { color: #2a1f02; background: var(--warn); border-color: var(--warn); }
.lamp.a-major_on, .lamp.a-major_flashing { color: #fff; background: var(--bad); border-color: var(--bad); }
.lamp.a-minor_flashing, .lamp.a-major_flashing { animation: blink 0.8s steps(2, start) infinite; }
@keyframes blink { to { opacity: 0.25; } }

.flight-grid { display: grid; grid-template-columns: minmax(130px, 1fr) minmax(170px, 1.25fr) minmax(150px, 1.05fr); gap: 12px; align-items: stretch; }
.panel { border: 1px solid var(--line); border-radius: 8px; background: rgba(6, 11, 16, 0.55); padding: 8px 10px; min-width: 0; }
.panel h4 { margin: 0 0 6px; font: 600 0.68rem var(--mono); letter-spacing: 0.14em; color: var(--accent); display: flex; justify-content: space-between; gap: 6px; }
.panel h4 .sub { color: var(--dim); font-weight: 400; letter-spacing: 0.04em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rightcol { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.rightcol .panel { flex: 1; }

.rows { margin: 0; }
.row { display: flex; justify-content: space-between; gap: 8px; padding: 2px 0; border-bottom: 1px dotted rgba(39, 80, 95, 0.5); }
.row:last-child { border-bottom: 0; }
.row dt { font: 0.66rem var(--mono); letter-spacing: 0.08em; color: var(--dim); white-space: nowrap; padding-top: 2px; }
.row dd { margin: 0; font: 0.82rem var(--mono); text-align: right; overflow-wrap: anywhere; }
dd.on { color: var(--good); } dd.dim { color: var(--dim); } dd.warn { color: var(--warn); } dd.bad { color: var(--bad); }

.weapons, .cms, .crew, .events { list-style: none; margin: 0; padding: 0; }
.weapons li { display: flex; align-items: center; gap: 5px; padding: 2px 0; font-size: 0.78rem; color: var(--dim); }
.weapons li.in-preset { color: var(--text); }
.wname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.led { width: 7px; height: 7px; border-radius: 50%; background: #1f323b; border: 1px solid #2c4651; flex: none; display: inline-block; }
.led.on { background: var(--good); border-color: var(--good); box-shadow: 0 0 5px var(--good); }
.legend { margin: 4px 0 0; font: 0.6rem var(--mono); color: var(--dim); }
.cms { margin-top: 8px; border-top: 1px solid var(--line); padding-top: 6px; }
.cms li { display: flex; justify-content: space-between; font: 0.76rem var(--mono); color: var(--dim); }
.cms b { color: var(--text); }
.empty { color: var(--dim); font-size: 0.8rem; margin: 4px 0; }

.shipbox { position: relative; aspect-ratio: 1; width: 100%; max-width: 300px; margin: 0 auto; align-self: center; }
.shipbox.small { max-width: 180px; }
.shield-overlay { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
/* Shield arcs: JS sets a class (up/low/charging/off) and --lvl 0..1; CSS does
   all the motion. `opacity` + width TRANSITION over the 0.6 s spool; the
   shimmer ANIMATES stroke-opacity, a different property, so the two compose. */
.shield-arc {
  --lvl: 0;
  fill: none; stroke: #24404c; stroke-width: 4; stroke-linecap: round; stroke-dasharray: 3 7;
  opacity: 1;
  transition: opacity 0.6s ease-out, stroke-width 0.6s ease-out, stroke 0.6s;
}
.shield-arc.up, .shield-arc.low, .shield-arc.charging {
  stroke: #2aa7ff; stroke-dasharray: none;
  opacity: calc(0.3 + 0.7 * var(--lvl));
  stroke-width: calc(4px + 5px * var(--lvl));
  filter: drop-shadow(0 0 calc(2px + 6px * var(--lvl)) #2aa7ff);
}
/* Shimmer depth scales with level: a full shield ripples, a weak one barely. */
.shield-arc.up { animation: shield-shimmer 2.6s ease-in-out infinite; }
.shield-overlay .shield-arc.up:nth-child(2) { animation-delay: -0.65s; }
.shield-overlay .shield-arc.up:nth-child(3) { animation-delay: -1.3s; }
.shield-overlay .shield-arc.up:nth-child(4) { animation-delay: -1.95s; }
@keyframes shield-shimmer {
  0%, 100% { stroke-opacity: 1; }
  50% { stroke-opacity: calc(1 - 0.45 * var(--lvl)); }
}
.shield-arc.low { animation: shield-flicker 1.7s steps(1, end) infinite; }
@keyframes shield-flicker {
  0%, 100% { stroke-opacity: 1; } 9% { stroke-opacity: 0.2; } 13% { stroke-opacity: 0.9; }
  41% { stroke-opacity: 0.35; } 44% { stroke-opacity: 1; } 71% { stroke-opacity: 0.15; } 76% { stroke-opacity: 0.8; }
}
.shield-arc.charging { stroke-dasharray: 6 5; animation: shield-charge 1.8s ease-in-out infinite; }
@keyframes shield-charge { 0%, 100% { stroke-opacity: 0.25; } 50% { stroke-opacity: 0.9; } }
.shield-arc.off { opacity: 0.55; }
/* As-of data (a crew member's last view of the ship): greyed, no motion. */
.shipbox.stale .shield-arc { animation: none; stroke: #4d6772; filter: none; }
.shipbox.stale .hull { color: var(--dim); }
@media (prefers-reduced-motion: reduce) {
  .shield-arc { animation: none !important; transition: none; }
}
.hull { position: absolute; inset: 19%; color: var(--accent); display: flex; align-items: center; justify-content: center; }
.hull svg { width: 100%; height: 100%; overflow: visible; }
.hull .hull-outline { opacity: 1; }
.hull .hull-detail { opacity: 0.45; }
.hull.hurt { color: var(--warn); } .hull.crit { color: var(--bad); }
.shield-label { position: absolute; left: 0; right: 0; bottom: -2px; text-align: center; font: 0.62rem var(--mono); letter-spacing: 0.12em; color: #2aa7ff; pointer-events: none; }
.shield-label.off { color: var(--dim); }

.gvec { display: flex; align-items: center; justify-content: space-between; gap: 6px; border: 1px solid var(--line); border-radius: 8px; background: rgba(6, 11, 16, 0.55); padding: 6px 8px; }
.gmeter { flex: 1.6; min-width: 0; max-height: 78px; }
.vector { flex: 1; min-width: 0; max-height: 70px; }
.g-arc-bg { fill: none; stroke: #1b3644; stroke-width: 7; stroke-linecap: round; }
.g-arc-val { fill: none; stroke: var(--accent); stroke-width: 7; stroke-linecap: round; transition: stroke-dasharray 0.4s; }
.g-arc-val.mid { stroke: var(--warn); } .g-arc-val.high { stroke: var(--bad); }
.g-max { stroke: var(--text); stroke-width: 2; }
.g-text { fill: var(--text); font: 600 15px var(--mono); text-anchor: middle; }
.g-sub { fill: var(--dim); font: 8px var(--mono); text-anchor: middle; letter-spacing: 0.08em; }
.vec-ring { fill: none; stroke: #27505f; stroke-width: 1.5; }
.vec-ticks { stroke: #27505f; stroke-width: 1.5; }
.vec-needle { transition: transform 0.4s; }
.vec-needle path { fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.vec-fpm { transition: transform 0.4s; }
.vec-fpm circle, .vec-fpm path { fill: none; stroke: var(--good); stroke-width: 1.6; stroke-linecap: round; }

.card-foot { display: flex; align-items: stretch; gap: 12px; margin-top: 12px; }
.vitals { flex: 1; min-width: 0; position: relative; border: 1px solid var(--line2); border-radius: 6px; background: #050a0e; height: 58px; overflow: hidden; }
.ekg { display: block; width: 100%; height: 100%; }
.vitals-read { position: absolute; top: 4px; right: 8px; display: flex; gap: 10px; font: 600 0.7rem var(--mono); letter-spacing: 0.06em; color: var(--good); text-shadow: 0 0 6px #000; }
.vitals[data-band='3'] .vitals-read { color: var(--warn); }
.vitals[data-band='2'] .vitals-read, .vitals[data-band='1'] .vitals-read, .vitals[data-band='0'] .vitals-read { color: var(--bad); }
.vitals[data-band='-1'] .vitals-read { color: var(--dim); }
.vitals[data-band='1'] { animation: alarm 0.5s steps(2, start) infinite; }
@keyframes alarm { to { border-color: var(--bad); } }

.charstate { display: flex; align-items: center; gap: 8px; max-width: 46%; }
.fig-cap { font: 0.68rem/1.35 var(--mono); color: var(--dim); }
.figure { color: var(--good); display: flex; justify-content: center; }
.figure svg { height: 100%; width: auto; overflow: visible; }
.figure-art { height: 100%; display: flex; }
.figure.mini { height: 58px; flex: none; }
.figure.big { height: 230px; align-self: center; }
.figure.flash svg { animation: blink 0.5s steps(2, start) infinite; }
.figure.dead svg { opacity: 0.55; }

.foot-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(90px, 0.75fr); gap: 12px; align-items: center; }

.away-body { padding: 18px 4px 10px; text-align: center; }
.away-msg { font: 600 0.95rem var(--mono); letter-spacing: 0.2em; margin: 0 0 6px; color: var(--dim); }
.card.idle .away-msg { color: var(--warn); }
.card.menu { opacity: 0.85; }
.card.menu .away-msg { color: var(--accent); }
.away-sub { margin: 0; color: var(--dim); font-size: 0.85rem; }

/* Crew card: compact ship upper left, name + pilot under it, player's own
   station / on-foot view as the rest of the card. */
.station-grid { display: grid; grid-template-columns: minmax(120px, 150px) minmax(0, 1fr); gap: 12px; align-items: start; }
.st-ship { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.shipbox.mini { max-width: 150px; }
.shipbox.mini .shield-label { font-size: 0.56rem; }
.st-shipname { font: 600 0.78rem var(--mono); letter-spacing: 0.06em; text-align: center; overflow-wrap: anywhere; }
.st-shipsub { font: 0.68rem/1.35 var(--mono); color: var(--dim); text-align: center; overflow-wrap: anywhere; }
.st-player { min-width: 0; }
.st-turret { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.st-foot { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(70px, 0.7fr); gap: 10px; align-items: center; }
.figure.mid { height: 150px; align-self: center; }
.crew a.crew-name { color: inherit; text-decoration: none; border-bottom: 1px dotted var(--dim); }
.crew a.crew-name:hover { color: var(--accent); }
.crew-grid { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 14px; align-items: center; }
.crew li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px dotted rgba(39, 80, 95, 0.5); }
.crew .chip { margin-left: 0; min-width: 58px; text-align: center; }
.crew-name { font-weight: 600; }
.crew-seat { color: var(--dim); font: 0.78rem var(--mono); margin-left: auto; }

.events-pane { border: 1px solid var(--line); border-radius: 10px; background: var(--panel); padding: 12px; }
.events li { font-size: 0.82rem; padding: 4px 0; border-bottom: 1px dotted rgba(39, 80, 95, 0.5); color: var(--text); }
.events li:last-child { border-bottom: 0; }
.events time { font: 0.7rem var(--mono); color: var(--dim); margin-right: 8px; }
.events li.bad { color: var(--bad); } .events li.warn { color: var(--warn); } .events li.good { color: var(--good); }
.events li.empty { color: var(--dim); }

/* ── narrower screens ── */
@media (max-width: 1100px) {
  .fleet-main { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .view { padding: 12px 10px 40px; }
  .nav { order: 3; flex-basis: 100%; overflow-x: auto; }
  .card { border-radius: 16px; padding: 12px; }
  .card.flight, .card.foot, .card.away, .card.crewship { flex-basis: 100%; max-width: none; }
  /* Ship on top, the two side panels beneath it. */
  .flight-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .flight-grid .shipbox { grid-column: 1 / -1; grid-row: 1; max-width: 240px; }
  .annun { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .crew-grid { grid-template-columns: minmax(0, 1fr); }
  .card.station { flex-basis: 100%; max-width: none; }
  .station-grid { grid-template-columns: minmax(0, 1fr); }
  .shipbox.mini { max-width: 130px; }
  .st-turret, .st-foot { grid-template-columns: minmax(0, 1fr); }
  .figure.mid { height: 120px; }
  .figure.big { height: 170px; }
  .charstate { max-width: 40%; }
  .fig-cap { display: none; }
  .m-joined { margin-left: 0; flex-basis: 100%; }
  /* Tables become stacked label/value blocks. */
  .table thead { display: none; }
  .table tr { display: block; padding: 8px 0; border-bottom: 1px solid var(--line); }
  .table td { display: flex; justify-content: space-between; gap: 12px; border: 0; padding: 3px 0; }
  .table td[data-l]::before { content: attr(data-l); color: var(--dim); font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase; }
}
@media (prefers-reduced-motion: reduce) {
  .lamp, .figure.flash svg, .vitals[data-band='1'] { animation: none; }
}

/* ── account extras ── */
.ok-text { color: var(--good); font-size: 0.9rem; margin: 6px 0; }
.ok-text:empty { display: none; }
td.actions { white-space: nowrap; }
td.actions .btn + .btn { margin-left: 6px; }

/* ── first-run checklist (Fleet page) ── */
.setup-slot:empty { display: none; }
.setup-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.setup-step { display: flex; gap: 12px; align-items: flex-start; }
.setup-step > div { flex: 1; min-width: 0; }
.setup-step p { margin: 4px 0 8px; }
.setup-step .chip { margin-left: 8px; }
.setup-tick {
  flex: none; width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line2);
  display: grid; place-items: center; font-size: 13px; color: var(--bg); margin-top: 1px;
}
.setup-step.done .setup-tick { background: var(--good); border-color: var(--good); }
.setup-step.done b { color: var(--dim); }
.setup-forms { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; }
.setup-forms .inline-form { margin: 0; }
.setup-forms input { min-width: 0; width: 13em; max-width: 100%; }
.setup-nudge {
  border: 1px solid var(--line2); background: var(--panel); border-radius: 8px;
  padding: 10px 12px; margin: 0 0 12px; font-size: 0.92rem;
}

/* Vault status banner (Account → Your data). */
.banner {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 12px;
  margin: 8px 0;
  line-height: 1.45;
}
.banner.warn {
  border-color: var(--warn);
  background: color-mix(in srgb, var(--warn) 12%, transparent);
}
details > summary { cursor: pointer; margin: 8px 0; }
