/* Verse Atlas — layout: fixed MFD-style rail on the left, wide content column, dense data panels.
   Dark-first (cockpit), light theme reads like a printed strategy guide. */
:root {
  --bg: #0d1318;
  --bg-2: #111a21;
  --panel: #151f27;
  --panel-2: #1b2731;
  --line: #263540;
  --line-2: #33475557;
  --fg: #dce4e9;
  --fg-2: #aab8c2;
  --muted: #7d8f9c;
  --accent: #f0a33a;          /* MFD amber */
  --accent-ink: #1a1206;
  --accent-soft: #f0a33a1f;
  --signal: #63c7bf;          /* nav-beacon teal for links */
  --good: #6fc275;
  --warn: #e8b84d;
  --bad: #ec6a58;
  --illegal: #e0577a;
  --stanton: #6aa8e8;
  --pyro: #f07c4a;
  --nyx: #b48ae8;
  --shadow: 0 10px 30px #00000059;
  --star: #cfe3ff;
  --glow: 0 0 0 1px color-mix(in srgb, var(--accent) 35%, transparent), 0 10px 40px -12px color-mix(in srgb, var(--accent) 45%, transparent);
  --display: 'Chakra Petch', 'Rajdhani', 'Segoe UI', system-ui, sans-serif;
  --body: 'Barlow', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, 'Cascadia Mono', Menlo, monospace;
  --r: 6px;
  --side-w: 248px;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --star: transparent;
  --bg: #edf0f1; --bg-2: #e4e8ea; --panel: #fbfcfc; --panel-2: #f2f5f6; --line: #cfd8dd; --line-2: #b9c6cd80;
  --fg: #13212b; --fg-2: #344854; --muted: #5d6e79; --accent: #b4670b; --accent-ink: #fff8ee; --accent-soft: #b4670b17;
  --signal: #0f746c; --good: #2f8a3a; --warn: #9a6a00; --bad: #c03a28; --illegal: #b4234f;
  --stanton: #2a6fb8; --pyro: #c2501c; --nyx: #7b4cc0; --shadow: 0 10px 30px #1b2c3a1f; color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--fg); font: 400 16px/1.55 var(--body);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--signal); text-decoration: none; }
a:hover { color: color-mix(in srgb, var(--signal) 70%, #fff); }
/* Cards and lists that are links keep their own colours on hover. */
.help-card:hover, .wn-card:hover, .dev-post:hover, .link-list a:hover, .card:hover, .row:hover, .tile:hover { color: var(--fg); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 3px; }
h1, h2, h3, h4 { font-family: var(--display); font-weight: 600; line-height: 1.15; margin: 0; text-wrap: balance; letter-spacing: .01em; }
h1 { font-size: clamp(1.8rem, 1.2rem + 2.2vw, 2.7rem); }
h2 { font-size: 1.45rem; }
h3 { font-size: 1.12rem; }
p { margin: 0; }
img { max-width: 100%; }
kbd {
  font: 500 .74rem/1 var(--mono); padding: .22em .45em; border-radius: 4px;
  border: 1px solid var(--line); border-bottom-width: 2px; background: var(--panel-2); color: var(--fg); white-space: nowrap;
}
.i { width: 1.15em; height: 1.15em; flex: none; vertical-align: -.2em; }
.i-sm { width: .85em; height: .85em; margin-left: .25em; vertical-align: -.05em; }
.num, .mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--accent); color: var(--accent-ink); padding: 8px 12px; z-index: 99; }
.skip:focus { left: 8px; }
[hidden] { display: none !important; }

/* ---------------------------------------------------------------- shell */
.shell { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); min-height: 100vh; }
.side {
  position: sticky; top: 0; height: 100vh; overflow-y: auto; background: var(--bg-2);
  border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 18px 14px;
  gap: 18px;
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--fg); padding: 2px 6px; }
.brand:hover { text-decoration: none; }
.brand svg { width: 34px; height: 34px; flex: none; }
.brand-ring { fill: none; stroke: var(--accent); stroke-width: 1.6; }
.brand-star { fill: var(--accent); }
.brand strong { display: block; font: 700 1.15rem/1.1 var(--display); letter-spacing: .04em; text-transform: uppercase; }
.brand small { display: block; color: var(--muted); font-size: .78rem; }
nav { display: flex; flex-direction: column; gap: 14px; }
.nav-group { display: flex; flex-direction: column; gap: 2px; }
.nav-label { font: 600 .68rem/1 var(--display); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); padding: 6px 10px; }
.nav-link {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--r); color: var(--fg-2);
  font-weight: 500; position: relative;
}
.nav-link:hover { background: var(--panel); color: var(--fg); text-decoration: none; }
.nav-link.active { background: var(--accent-soft); color: var(--fg); }
.nav-link.active::before { content: ''; position: absolute; left: -14px; top: 8px; bottom: 8px; width: 3px; background: var(--accent); border-radius: 0 2px 2px 0; }
.nav-link .count { margin-left: auto; font: 500 .72rem var(--mono); color: var(--muted); }
.side-foot { margin-top: auto; font-size: .8rem; color: var(--muted); display: grid; gap: 6px; padding: 0 6px; }

.main-col { min-width: 0; display: flex; flex-direction: column; }
.top {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; display: flex; align-items: center; gap: 12px;
  padding: 10px clamp(16px, 3vw, 36px); background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px); border-bottom: 1px solid var(--line);
}
.search-trigger {
  flex: 1; max-width: 560px; display: flex; align-items: center; gap: 10px; padding: 9px 12px;
  border: 1px solid var(--line); background: var(--panel); color: var(--muted); border-radius: var(--r);
  font: inherit; font-size: .95rem; cursor: pointer; text-align: left; min-width: 0;
}
.search-trigger:hover { border-color: var(--accent); }
.st-text { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.icon-btn {
  display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: var(--r);
  border: 1px solid var(--line); background: var(--panel); color: var(--fg); cursor: pointer;
}
.icon-btn:hover { border-color: var(--accent); }
.menu-btn { display: none; }
main { padding: clamp(20px, 3vw, 36px) clamp(16px, 3vw, 36px) 48px; max-width: 1320px; width: 100%; outline: none; }
.foot { padding: 20px clamp(16px, 3vw, 36px) 32px; border-top: 1px solid var(--line); color: var(--muted); font-size: .82rem; display: grid; gap: 6px; max-width: 1320px; }
.loading { padding: 60px 0; color: var(--muted); font-family: var(--mono); }

@media (max-width: 960px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side {
    position: fixed; inset: 0 auto 0 0; width: min(300px, 86vw); z-index: 40; transform: translateX(-102%);
    transition: transform .22s ease; box-shadow: var(--shadow); padding-top: calc(18px + env(safe-area-inset-top, 0px));
  }
  .side.open { transform: none; }
  .menu-btn { display: inline-grid; }
  .search-trigger kbd { display: none; }
}
.scrim { position: fixed; inset: 0; background: #0008; z-index: 35; }

/* ---------------------------------------------------------------- shared pieces */
.page-head { display: grid; gap: 10px; margin-bottom: 24px; }
.eyebrow { font: 600 .74rem/1 var(--display); letter-spacing: .18em; text-transform: uppercase; color: var(--accent); }
.lede { color: var(--fg-2); max-width: 68ch; font-size: 1.05rem; }
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: .88rem; color: var(--muted); margin-bottom: 14px; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--fg); }

.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; min-width: 0; }
.panel > h2, .panel > h3 { margin-bottom: 12px; }
.panel-title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); }
.g3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.g4 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); }
.split { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
@media (max-width: 1100px) { .split { grid-template-columns: minmax(0, 1fr); } }
.stack { display: grid; gap: 16px; min-width: 0; }

.chip {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 8px; border-radius: 4px; font: 500 .74rem/1.3 var(--mono);
  border: 1px solid var(--line); color: var(--fg-2); background: var(--panel-2); white-space: nowrap;
}
.chip-live { color: var(--good); border-color: color-mix(in srgb, var(--good) 45%, transparent); }
.chip-accent { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 45%, transparent); background: var(--accent-soft); }
.chip-illegal { color: var(--illegal); border-color: color-mix(in srgb, var(--illegal) 45%, transparent); }
.chip-legal { color: var(--good); border-color: color-mix(in srgb, var(--good) 40%, transparent); }
.chip-warn { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 45%, transparent); }
.chip-bad { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 45%, transparent); }
.chip.sys-stanton { color: var(--stanton); border-color: color-mix(in srgb, var(--stanton) 40%, transparent); }
.chip.sys-pyro { color: var(--pyro); border-color: color-mix(in srgb, var(--pyro) 40%, transparent); }
.chip.sys-nyx { color: var(--nyx); border-color: color-mix(in srgb, var(--nyx) 40%, transparent); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 14px; border-radius: var(--r);
  border: 1px solid var(--line); background: var(--panel-2); color: var(--fg); font: 600 .92rem var(--body); cursor: pointer;
  text-decoration: none; white-space: nowrap;
}
.btn:hover { border-color: var(--accent); text-decoration: none; }
.btn-primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn-primary:hover { filter: brightness(1.08); }
.btn-ghost { background: transparent; }
.btn-sm { padding: 5px 10px; font-size: .84rem; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.ext { display: inline-flex; align-items: center; }

.kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 7px 18px; font-size: .94rem; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }

.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.stat { background: var(--panel); padding: 12px 14px; display: grid; gap: 3px; min-width: 0; }
.stat b { font: 600 1.25rem/1.15 var(--mono); font-variant-numeric: tabular-nums; color: var(--fg); overflow-wrap: anywhere; }
.stat span { font-size: .78rem; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.stat.hi b { color: var(--accent); }

.bars { display: grid; gap: 9px; }
.bar { display: grid; grid-template-columns: 112px minmax(0, 1fr) 84px; gap: 10px; align-items: center; font-size: .88rem; }
.bar .track { height: 8px; background: var(--panel-2); border-radius: 4px; overflow: hidden; border: 1px solid var(--line); }
.bar .fill { height: 100%; background: var(--accent); border-radius: 3px; }
.bar .v { text-align: right; font-family: var(--mono); font-size: .82rem; }
.bar .k { color: var(--fg-2); }

/* filters */
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; margin-bottom: 16px; }
.field { display: grid; gap: 4px; min-width: 0; }
.field label, .field .lbl { font: 600 .68rem/1 var(--display); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
input[type="search"], input[type="text"], input[type="number"], input[type="url"], input[type="email"], select, textarea {
  font: inherit; font-size: .95rem; color: var(--fg); background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--r); padding: 8px 10px; min-width: 0; max-width: 100%;
}
textarea { width: 100%; font-family: var(--mono); font-size: .82rem; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.field-grow { flex: 1 1 240px; }
.field-grow input { width: 100%; }
.check { display: inline-flex; align-items: center; gap: 7px; font-size: .9rem; color: var(--fg-2); cursor: pointer; padding: 8px 0; user-select: none; }
.check input { accent-color: var(--accent); width: 16px; height: 16px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; flex-wrap: wrap; }
.seg button { font: 600 .84rem var(--body); padding: 7px 12px; background: var(--panel); color: var(--fg-2); border: 0; border-right: 1px solid var(--line); cursor: pointer; }
.seg button:last-child { border-right: 0; }
.seg button.on { background: var(--accent-soft); color: var(--accent); }
.result-count { font: 500 .85rem var(--mono); color: var(--muted); margin-bottom: 10px; }

/* tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th, td { padding: 9px 12px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font: 600 .7rem/1.2 var(--display); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); background: var(--panel-2); position: sticky; top: 0; white-space: nowrap; }
th[data-sort] { cursor: pointer; }
th[data-sort]:hover, th.sorted { color: var(--accent); }
tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: var(--panel-2); }
td.r, th.r { text-align: right; }
td .sub { display: block; color: var(--muted); font-size: .8rem; }
tr.rowlink { cursor: pointer; }

/* list rows (missions) */
.rows { display: grid; gap: 8px; }
.row {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 18px; padding: 13px 16px; background: var(--panel);
  border: 1px solid var(--line); border-radius: var(--r); color: var(--fg); align-items: center;
}
.row:hover { border-color: color-mix(in srgb, var(--accent) 60%, var(--line)); text-decoration: none; }
.row-title { font-weight: 600; font-size: 1.02rem; overflow-wrap: anywhere; }
.row-meta { display: flex; flex-wrap: wrap; gap: 6px 12px; color: var(--muted); font-size: .85rem; align-items: center; }
.row-side { text-align: right; display: grid; gap: 2px; justify-items: end; }
.row-side .pay { font: 600 1rem var(--mono); color: var(--accent); }
.row-side .rep { font: 500 .8rem var(--mono); color: var(--good); }
@media (max-width: 560px) { .row { grid-template-columns: minmax(0, 1fr); } .row-side { text-align: left; justify-items: start; grid-auto-flow: column; gap: 12px; } }

.more { display: flex; justify-content: center; padding: 16px 0; }
.empty { padding: 40px 20px; text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: var(--r); display: grid; gap: 8px; justify-items: center; }
.empty h2 { color: var(--fg); font-size: 1.2rem; }

/* cards (ships, items) */
.cards { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); }
.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; display: flex;
  flex-direction: column; color: var(--fg); min-width: 0; position: relative;
}
.card:hover { border-color: color-mix(in srgb, var(--accent) 60%, var(--line)); text-decoration: none; }
.card-media { aspect-ratio: 16 / 9; background: var(--panel-2); position: relative; overflow: hidden; max-width: 100%; }
.card-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-body { padding: 12px 14px 14px; display: grid; gap: 6px; flex: 1; align-content: start; }
.card-title { font: 600 1.05rem/1.2 var(--display); }
.card-sub { color: var(--muted); font-size: .84rem; }
.card-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-top: 6px; font-size: .78rem; color: var(--muted); }
.card-stats b { display: block; font: 600 .92rem var(--mono); color: var(--fg); }
.card-flag { position: absolute; top: 8px; left: 8px; display: flex; gap: 4px; flex-wrap: wrap; }
.card-flag .chip { background: color-mix(in srgb, var(--bg) 85%, transparent); }
.card-add { position: absolute; top: 8px; right: 8px; }

.ph { width: 100%; height: 100%; min-height: 80px; display: grid; place-items: center; position: relative; overflow: hidden;
  background: radial-gradient(120% 90% at 30% 20%, color-mix(in srgb, var(--accent) 16%, var(--panel-2)), var(--panel-2) 60%); }
.ph::after { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(90deg, transparent 0 23px, var(--line-2) 23px 24px), repeating-linear-gradient(0deg, transparent 0 23px, var(--line-2) 23px 24px); opacity: .5; }
.ph span { font: 700 1.6rem var(--display); letter-spacing: .1em; color: color-mix(in srgb, var(--accent) 70%, var(--fg)); position: relative; z-index: 1; }

/* hero / home */
.hero {
  display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 28px; align-items: center;
  padding: clamp(20px, 3vw, 36px); border: 1px solid var(--line); border-radius: 10px; margin-bottom: 26px;
  background:
    radial-gradient(80% 120% at 100% 0%, color-mix(in srgb, var(--accent) 14%, transparent), transparent 60%),
    linear-gradient(180deg, var(--panel), var(--bg-2));
  position: relative; overflow: hidden;
}
.hero h1 { font-size: clamp(2rem, 1.3rem + 2.8vw, 3.2rem); }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.hero-copy { display: grid; gap: 14px; min-width: 0; }
.hero-radar { position: relative; aspect-ratio: 1; max-width: 340px; width: 100%; justify-self: center; }
.hero-radar canvas { width: 100%; height: 100%; display: block; }
@media (max-width: 820px) { .hero { grid-template-columns: minmax(0, 1fr); } .hero-radar { max-width: 240px; } }

.tiles { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); }
.tile {
  display: grid; gap: 6px; padding: 16px; border-radius: var(--r); border: 1px solid var(--line); background: var(--panel);
  color: var(--fg); align-content: start;
}
.tile:hover { border-color: var(--accent); text-decoration: none; }
.tile-head { display: flex; align-items: center; gap: 10px; }
.tile-head .i { width: 22px; height: 22px; color: var(--accent); }
.tile h3 { font-size: 1.05rem; }
.tile p { color: var(--muted); font-size: .9rem; }
.tile .num { font-size: .8rem; color: var(--fg-2); }

.steps { counter-reset: s; display: grid; gap: 0; }
.step { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 14px; position: relative; padding-bottom: 22px; }
.step::before { counter-increment: s; content: counter(s, decimal-leading-zero); display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid var(--accent); color: var(--accent); font: 600 .95rem var(--mono); background: var(--bg); z-index: 1; }
.step::after { content: ''; position: absolute; left: 21px; top: 46px; bottom: 2px; width: 2px; background: var(--line); }
.step:last-child::after { display: none; }
.step.done::before { content: '✓'; background: var(--accent); color: var(--accent-ink); }
.step-body { display: grid; gap: 10px; min-width: 0; padding-top: 8px; }
.step-body h3 { font-size: 1.15rem; }
.step-text { color: var(--fg-2); display: grid; gap: 8px; max-width: 72ch; }
.step-text ul, .step-text ol { margin: 0; padding-left: 1.2em; display: grid; gap: 4px; }
.step-text p { margin: 0; }
.callout { padding: 10px 14px; border-radius: var(--r); border: 1px solid var(--line); font-size: .92rem; display: flex; gap: 10px; align-items: flex-start; max-width: 72ch; }
.callout .i { margin-top: .15em; }
.callout-tip { border-color: color-mix(in srgb, var(--signal) 45%, transparent); background: color-mix(in srgb, var(--signal) 8%, transparent); }
.callout-tip .i { color: var(--signal); }
.callout-warn { border-color: color-mix(in srgb, var(--warn) 50%, transparent); background: color-mix(in srgb, var(--warn) 8%, transparent); }
.callout-warn .i { color: var(--warn); }
.prog { height: 6px; background: var(--panel-2); border-radius: 3px; overflow: hidden; border: 1px solid var(--line); }
.prog i { display: block; height: 100%; background: var(--accent); }

.chapters { display: grid; gap: 10px; }
.chapter-link { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); color: var(--fg); }
.chapter-link:hover { border-color: var(--accent); text-decoration: none; }
.chapter-link .n { font: 600 1rem var(--mono); color: var(--accent); }
.chapter-link small { color: var(--muted); display: block; }

/* reputation ladder */
.ladder { display: grid; gap: 4px; }
.rung { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 10px; border-radius: var(--r); border: 1px solid transparent; }
.rung .dot { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--line); justify-self: center; }
.rung.reached .dot { background: var(--accent); border-color: var(--accent); }
.rung.current { border-color: var(--accent); background: var(--accent-soft); }
.rung .mono { color: var(--muted); font-size: .82rem; }

/* fleet */
.fleet-tabs { margin-bottom: 14px; }
.lineup { position: relative; border: 1px solid var(--line); border-radius: var(--r); background:
  linear-gradient(var(--bg-2), var(--bg-2)) padding-box; overflow: hidden; touch-action: none; }
.lineup canvas { display: block; width: 100%; height: 460px; cursor: grab; }
.lineup canvas:active { cursor: grabbing; }
.lineup-hud { position: absolute; left: 12px; top: 10px; right: 12px; display: flex; justify-content: space-between; gap: 10px; pointer-events: none; font: 500 .78rem var(--mono); color: var(--muted); flex-wrap: wrap; }
.lineup-tools { position: absolute; right: 10px; bottom: 10px; display: flex; gap: 6px; }
.profile-card { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 16px; align-items: center; }
.avatar { width: 84px; height: 84px; border-radius: 8px; border: 1px solid var(--line); object-fit: cover; background: var(--panel-2); display: grid; place-items: center; font: 700 1.8rem var(--display); color: var(--accent); overflow: hidden; }
.fleet-list .row { grid-template-columns: 64px minmax(0, 1fr) auto; }
.thumb { width: 64px; height: 40px; border-radius: 4px; overflow: hidden; background: var(--panel-2); }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb .ph { min-height: 40px; }
.thumb .ph span { font-size: .8rem; }
.donut-wrap { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 16px; align-items: center; }
@media (max-width: 480px) { .donut-wrap { grid-template-columns: minmax(0, 1fr); justify-items: center; } }
.legend { display: grid; gap: 6px; font-size: .88rem; }
.legend span { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 8px; vertical-align: 0; }

/* compare tray */
.tray { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(14px + env(safe-area-inset-bottom, 0px)); z-index: 30; display: flex; gap: 10px; align-items: center; padding: 10px 12px; background: var(--panel); border: 1px solid var(--accent); border-radius: 10px; box-shadow: var(--shadow); max-width: calc(100vw - 32px); flex-wrap: wrap; }

/* palette */
.palette { position: fixed; inset: 0; background: #000a; z-index: 60; display: grid; justify-items: center; align-items: start; padding: 10vh 16px 16px; }
.palette-box { width: min(680px, 100%); background: var(--panel); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); overflow: hidden; display: grid; }
.palette-box input { border: 0; border-bottom: 1px solid var(--line); border-radius: 0; padding: 16px 18px; font-size: 1.05rem; background: var(--panel); box-shadow: none; }
.palette-results { max-height: 56vh; overflow-y: auto; padding: 6px; }
.pr { display: grid; grid-template-columns: 82px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 9px 12px; border-radius: var(--r); color: var(--fg); }
.pr:hover, .pr.sel { background: var(--accent-soft); text-decoration: none; }
.pr .kind { font: 600 .66rem var(--display); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.pr .t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pr .x { color: var(--muted); font-size: .8rem; font-family: var(--mono); }
.palette-hint { padding: 8px 14px; border-top: 1px solid var(--line); font-size: .78rem; color: var(--muted); display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }

/* toasts */
#toasts { position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); display: grid; gap: 8px; z-index: 80; }
.toast { padding: 10px 14px; border-radius: var(--r); background: var(--panel); border: 1px solid var(--good); color: var(--fg); box-shadow: var(--shadow); font-size: .92rem; transition: opacity .4s, transform .4s; max-width: 340px; }
.toast-warn { border-color: var(--warn); }
.toast.out { opacity: 0; transform: translateY(8px); }

/* news */
.news-item { display: grid; gap: 6px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.news-item:last-child { border-bottom: 0; }
.news-item h3 { font-size: 1.02rem; }
.news-item h3 a { color: var(--fg); }
.news-item p { color: var(--muted); font-size: .9rem; }
.link-list { display: grid; gap: 2px; }
.link-list a { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; padding: 9px 10px; border-radius: var(--r); color: var(--fg); }
.link-list a:hover { background: var(--panel-2); text-decoration: none; }
.link-list small { display: block; color: var(--muted); font-size: .82rem; }

.desc { white-space: pre-line; color: var(--fg-2); max-width: 75ch; }
.tok { color: var(--accent); }
details.more-box summary { cursor: pointer; color: var(--signal); font-weight: 500; }
details.more-box[open] summary { margin-bottom: 8px; }
.loc-list { columns: 2 220px; column-gap: 20px; font-size: .88rem; color: var(--fg-2); margin: 0; padding-left: 1.1em; }
.loc-list li { break-inside: avoid; margin-bottom: 3px; }

.services { display: flex; flex-wrap: wrap; gap: 6px; }
.svc { display: inline-flex; align-items: center; gap: 6px; padding: 5px 9px; border-radius: 4px; font-size: .82rem; border: 1px solid var(--line); color: var(--muted); }
.svc.on { color: var(--fg); border-color: color-mix(in srgb, var(--good) 45%, transparent); background: color-mix(in srgb, var(--good) 8%, transparent); }
.svc.on::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--good); }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ship views */
.blueprint { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 14px; }
.bp-view { margin: 0; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; display: grid;
  background:
    linear-gradient(var(--line-2) 1px, transparent 1px) 0 0 / 24px 24px,
    linear-gradient(90deg, var(--line-2) 1px, transparent 1px) 0 0 / 24px 24px,
    radial-gradient(120% 100% at 50% 40%, color-mix(in srgb, var(--signal) 10%, var(--bg-2)), var(--bg-2)); }
.bp-img { height: clamp(220px, 34vw, 380px); display: grid; place-items: center; padding: 18px; max-width: 100%; overflow: hidden; }
.bp-img a { display: grid; place-items: center; width: 100%; height: 100%; }
.bp-img img { width: 100%; height: 100%; max-width: 100%; object-fit: contain; filter: drop-shadow(0 10px 18px #0007); transition: transform .3s ease; }
.bp-img a:hover img { transform: scale(1.03); }
.bp-view figcaption { display: flex; justify-content: space-between; gap: 10px; padding: 8px 12px; border-top: 1px solid var(--line); font-size: .82rem; color: var(--muted); flex-wrap: wrap; }
.bp-view figcaption span:first-child { font: 600 .72rem var(--display); letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.viewer3d { position: relative; height: min(70vh, 560px); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden;
  background: radial-gradient(90% 90% at 50% 35%, color-mix(in srgb, var(--accent) 9%, var(--bg-2)), var(--bg) 75%); touch-action: none; }
.viewer3d canvas { display: block; }
.viewer3d:fullscreen, .lineup:fullscreen { height: 100vh; border-radius: 0; }
.lineup:fullscreen canvas { height: 100vh; }
.v3d-status { position: absolute; inset: 0; display: grid; place-items: center; font: 500 .9rem var(--mono); color: var(--muted); pointer-events: none; }

/* ---------------------------------------------------------------- atmosphere */
#stars { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 0; pointer-events: none; }
.shell { position: relative; z-index: 1; }
body {
  background:
    radial-gradient(1200px 700px at 85% -10%, color-mix(in srgb, var(--accent) 9%, transparent), transparent 60%),
    radial-gradient(900px 600px at -10% 110%, color-mix(in srgb, var(--signal) 7%, transparent), transparent 60%),
    var(--bg);
  background-attachment: fixed;
}
.side { background: color-mix(in srgb, var(--bg-2) 88%, transparent); backdrop-filter: blur(8px); }
.panel, .card, .row, .tile, .chapter-link, .table-wrap, .stat { background-color: color-mix(in srgb, var(--panel) 92%, transparent); }
.stat-row { background: var(--line); }
main.enter { animation: page-in .35s ease both; }
@keyframes page-in { from { opacity: .35; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* MFD corner brackets on feature frames */
.hero, .viewer-panel, .lineup, .countdown { position: relative; }
.hero::before, .hero::after, .viewer-panel::before, .viewer-panel::after, .lineup::before, .lineup::after {
  content: ''; position: absolute; width: 18px; height: 18px; border: 2px solid var(--accent); pointer-events: none; z-index: 2; opacity: .9;
}
.hero::before, .viewer-panel::before, .lineup::before { top: -1px; left: -1px; border-right: 0; border-bottom: 0; border-top-left-radius: 6px; }
.hero::after, .viewer-panel::after, .lineup::after { bottom: -1px; right: -1px; border-left: 0; border-top: 0; border-bottom-right-radius: 6px; }

/* richer hover */
.card { transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease; }
.card:hover { transform: translateY(-3px); box-shadow: var(--glow); }
.card-media img { transition: transform .5s ease; }
.card:hover .card-media img { transform: scale(1.06); }
.card-media::after { content: ''; position: absolute; inset: auto 0 0 0; height: 45%; background: linear-gradient(transparent, color-mix(in srgb, var(--panel) 70%, transparent)); pointer-events: none; }
.card-media { background: radial-gradient(120% 90% at 30% 20%, color-mix(in srgb, var(--accent) 12%, var(--panel-2)), var(--panel-2) 65%); }
.tile, .row, .chapter-link { transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease; }
.tile:hover, .chapter-link:hover { box-shadow: var(--glow); transform: translateY(-2px); }
.btn-primary { box-shadow: 0 6px 24px -8px color-mix(in srgb, var(--accent) 70%, transparent); }
.nav-link.active { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 30%, transparent); }
.stat.hi b { text-shadow: 0 0 18px color-mix(in srgb, var(--accent) 45%, transparent); }

/* fleet-chart banner on the home page */
.fleetchart { overflow-x: auto; overflow-y: hidden; padding: 18px 4px 6px; scrollbar-width: thin; }
.fleetchart-row { display: flex; align-items: flex-end; gap: 26px; min-width: max-content; padding: 0 10px; position: relative; }
.fleetchart-row::after { content: ''; position: absolute; left: 0; right: 0; bottom: 44px; height: 1px; background: linear-gradient(90deg, transparent, var(--accent), transparent); opacity: .6; }
.fc-ship { display: grid; justify-items: center; gap: 4px; color: var(--fg); text-decoration: none; }
.fc-ship:hover { text-decoration: none; }
.fc-ship img { display: block; height: auto; filter: drop-shadow(0 8px 14px #0008); transition: transform .3s ease, filter .3s ease; }
.fc-ship:hover img { transform: translateY(-6px); filter: drop-shadow(0 12px 22px color-mix(in srgb, var(--accent) 50%, transparent)); }
.fc-ship span { font: 600 .78rem var(--display); letter-spacing: .06em; white-space: nowrap; color: var(--fg-2); }
.fc-ship small { font: 500 .7rem var(--mono); color: var(--muted); }

/* events */
.countdown { display: flex; gap: 10px; align-self: center; }
.countdown div { display: grid; justify-items: center; min-width: 74px; padding: 12px 8px; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); }
.countdown b { font: 600 2rem/1 var(--mono); color: var(--accent); text-shadow: 0 0 18px color-mix(in srgb, var(--accent) 45%, transparent); }
.countdown span { font: 600 .66rem var(--display); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-top: 6px; }
.date-chip { display: grid; justify-items: center; align-content: center; width: 60px; height: 60px; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel-2); }
.date-chip b { font: 600 1.4rem/1 var(--mono); color: var(--accent); }
.date-chip span { font: 600 .66rem var(--display); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
@media (max-width: 640px) { .hero:has(.countdown) { grid-template-columns: minmax(0, 1fr) !important; } .countdown div { min-width: 64px; } }
@media (max-width: 1100px) { aside.stack[style*="sticky"] { position: static !important; } }

/* referral */
.referral { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px 24px; align-items: center; padding: 18px 20px; border-radius: 10px;
  border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--line));
  background: linear-gradient(110deg, color-mix(in srgb, var(--accent) 14%, var(--panel)), var(--panel) 60%); }
.referral-copy { display: grid; gap: 6px; min-width: 0; }
.referral-copy p { color: var(--fg-2); font-size: .94rem; max-width: 62ch; }
.referral-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.referral-code { display: inline-flex; align-items: center; gap: 6px; padding: 9px 12px; border-radius: var(--r); cursor: pointer;
  border: 1px dashed var(--accent); background: var(--bg-2); color: var(--accent); font-size: 1rem; letter-spacing: .06em; }
.referral-code:hover { background: var(--accent-soft); }
.referral-compact { padding: 12px 14px; }
@media (max-width: 720px) { .referral { grid-template-columns: minmax(0, 1fr); } }
.side-ref { display: grid; gap: 2px; padding: 9px 10px; border-radius: var(--r); border: 1px dashed color-mix(in srgb, var(--accent) 60%, transparent); color: var(--fg-2); font-size: .78rem; margin-bottom: 6px; }
.side-ref b { color: var(--accent); font-size: .86rem; letter-spacing: .04em; }
.side-ref:hover { background: var(--accent-soft); text-decoration: none; }
@media (max-width: 560px) { .hero-radar { display: none; } }

/* account */
.acct-btn { display: inline-flex; align-items: center; gap: 8px; padding: 4px 10px 4px 4px; border: 1px solid var(--line); border-radius: 999px; color: var(--fg); background: var(--panel); max-width: 200px; }
.acct-btn:hover { border-color: var(--accent); text-decoration: none; }
.acct-btn img, .acct-btn span { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--panel-2); font: 600 .8rem var(--display); color: var(--accent); flex: none; }
.acct-btn b { font-weight: 600; font-size: .85rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.discord-btn { background: #5865f2; border-color: #5865f2; color: #fff; }
.discord-btn:hover { filter: brightness(1.08); border-color: #5865f2; }
@media (max-width: 640px) { .acct-btn b { display: none; } .acct-btn { padding: 3px; } #version-chip { display: none; } }

/* suggestions */
.vote { display: grid; justify-items: center; align-content: center; gap: 2px; width: 56px; height: 64px; border-radius: var(--r); border: 1px solid var(--line); background: var(--panel-2); color: var(--muted); cursor: pointer; align-self: start; }
.vote b { font: 600 1.05rem var(--mono); color: var(--fg); }
.vote:hover { border-color: var(--accent); color: var(--accent); }
.vote.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.suggestion { align-items: start; }

/* leaks feed */
.feed { display: grid; gap: 12px; max-width: 820px; }
.feed-item { display: grid; gap: 10px; }
.feed-item.pending { border-style: dashed; border-color: var(--warn); }
.feed-head { display: flex; align-items: center; gap: 10px; }
.feed-head img, .feed-av { width: 36px; height: 36px; border-radius: 50%; flex: none; display: grid; place-items: center; background: var(--panel-2); color: var(--accent); font: 600 .9rem var(--display); }
.feed-text { color: var(--fg); overflow-wrap: anywhere; line-height: 1.55; }
.feed-text code { font-family: var(--mono); font-size: .85em; background: var(--panel-2); padding: 1px 5px; border-radius: 4px; }
.dc-code { font-family: var(--mono); font-size: .82rem; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r); padding: 10px; overflow-x: auto; white-space: pre-wrap; margin: 6px 0; }
.dc-quote { display: inline-block; border-left: 3px solid var(--line); padding-left: 10px; color: var(--fg-2); }
.dc-h { font-family: var(--display); font-size: 1.05rem; }
.spoiler { background: var(--fg-2); color: transparent; border-radius: 3px; cursor: pointer; }
.spoiler.shown { background: var(--panel-2); color: inherit; }
.feed-media { display: grid; gap: 6px; }
.feed-media.multi { grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.feed-media img { width: 100%; max-height: 480px; object-fit: contain; border-radius: var(--r); background: var(--bg-2); border: 1px solid var(--line); display: block; }
.feed-embed { border-left: 3px solid var(--accent); background: var(--panel-2); border-radius: 0 var(--r) var(--r) 0; padding: 10px 12px; display: grid; gap: 4px; }
.feed-embed img { max-width: 100%; max-height: 300px; border-radius: 4px; margin-top: 4px; }

/* video player */
.video-card .card-media { aspect-ratio: 16 / 9; }
.play-badge { position: absolute; inset: 0; margin: auto; width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; z-index: 2;
  background: color-mix(in srgb, var(--bg) 70%, transparent); color: var(--accent); border: 2px solid var(--accent); font-size: 1.2rem; padding-left: 4px; transition: transform .2s ease; }
.video-card:hover .play-badge { transform: scale(1.12); }
.video-modal { position: fixed; inset: 0; z-index: 70; background: #000c; display: grid; place-items: center; padding: 16px; }
.video-box { width: min(1100px, 100%); background: var(--panel); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; box-shadow: var(--shadow); }
.video-bar { display: flex; align-items: center; gap: 12px; padding: 8px 10px 8px 16px; border-bottom: 1px solid var(--line); }
.video-bar b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--display); }
.video-frame { aspect-ratio: 16 / 9; background: #000; }
.video-frame iframe { width: 100%; height: 100%; border: 0; display: block; }

/* studio */
.studio { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 20px; align-items: start; }
@media (max-width: 960px) { .studio { grid-template-columns: minmax(0, 1fr); } }
.studio-stage { position: relative; display: grid; place-items: center; padding: 18px; border: 1px solid var(--line); border-radius: 10px;
  background: repeating-conic-gradient(var(--panel) 0% 25%, var(--bg-2) 0% 50%) 50% / 24px 24px; min-height: 300px; }
.studio-stage canvas { width: auto; height: auto; max-width: 100%; max-height: 70vh; display: block; border-radius: 6px; box-shadow: var(--shadow); }
.studio-busy { position: absolute; top: 12px; right: 12px; font: 500 .8rem var(--mono); color: var(--muted); background: var(--panel); padding: 4px 8px; border-radius: 4px; border: 1px solid var(--line); }
.chip-btn { font: 600 .84rem var(--body); padding: 7px 11px; border-radius: var(--r); border: 1px solid var(--line); background: var(--panel-2); color: var(--fg-2); cursor: pointer; }
.chip-btn:hover { border-color: var(--accent); }
.chip-btn.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.swatches button { width: 30px; height: 30px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; box-shadow: inset 0 0 0 2px var(--panel); }
.swatches button.on { border-color: var(--fg); }
#st-ship { width: 100%; }
.week-post { padding: 0; text-align: left; cursor: pointer; font: inherit; }
.week-post .card-media { aspect-ratio: 1; }
.week-post canvas { width: 100%; height: 100%; display: block; }
/* approximate hull colour for ships without an official painted render (blueprint view) */
.bp-img a { position: relative; }
.bp-tint { position: absolute; inset: 0; background: color-mix(in srgb, var(--hull) 82%, white); mix-blend-mode: multiply; pointer-events: none;
  -webkit-mask-size: contain; mask-size: contain; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; -webkit-mask-position: center; mask-position: center; }

/* in-game views */
.ig-main { display: block; position: relative; width: 100%; padding: 0; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #000; cursor: zoom-in; aspect-ratio: 16 / 9; }
.ig-main img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s ease; }
.ig-main:hover img { transform: scale(1.02); }
.ig-hint { position: absolute; right: 10px; bottom: 10px; display: inline-flex; gap: 6px; align-items: center; padding: 6px 10px; border-radius: 6px; background: #000a; color: #fff; font-size: .82rem; }
.ig-thumbs { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; margin-top: 10px; }
.ig-thumbs button { padding: 0; border: 2px solid var(--line); border-radius: 6px; overflow: hidden; background: #000; cursor: pointer; position: relative; aspect-ratio: 16 / 9; }
.ig-thumbs button.on { border-color: var(--accent); }
.ig-thumbs img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ig-thumbs span { position: absolute; left: 0; right: 0; bottom: 0; padding: 2px 6px; background: #000a; color: #fff; font: 600 .7rem var(--display); letter-spacing: .08em; text-transform: uppercase; text-align: left; }
.zoom-modal { position: fixed; inset: 0; z-index: 75; background: #000; display: grid; grid-template-rows: auto minmax(0, 1fr); }
.zoom-bar { display: flex; gap: 8px; align-items: center; padding: 8px 12px; background: #0b1116; color: #e3eaef; border-bottom: 1px solid #2a3a46; }
.zoom-bar b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--display); }
.zoom-stage { position: relative; overflow: hidden; cursor: grab; touch-action: none; }
.zoom-stage:active { cursor: grabbing; }
.zoom-stage img { position: absolute; left: 0; top: 0; transform-origin: 0 0; max-width: none; user-select: none; }
.hangar3d { height: min(78vh, 640px); }
.h3d-labels { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.h3d-label { position: absolute; left: 0; top: 0; pointer-events: auto; cursor: pointer; white-space: nowrap; font: 600 .78rem var(--display); letter-spacing: .04em;
  color: var(--fg); background: color-mix(in srgb, var(--bg) 75%, transparent); border: 1px solid var(--line); border-radius: 4px; padding: 3px 7px; }
.h3d-label:hover { border-color: var(--accent); color: var(--accent); }

/* Mint Motive footer (shared standard across our sites) */
.mm-row { display: flex; flex-wrap: wrap; gap: 12px 18px; align-items: center; justify-content: space-between; }
.mm-by { font: 600 .9rem var(--display); color: var(--fg-2); letter-spacing: .02em; }
.foot .social { display: flex; gap: 8px; }
.foot .social a { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); color: var(--fg-2); background: var(--panel); }
.foot .social a:hover { color: var(--accent); border-color: var(--accent); }
.foot .social svg { width: 18px; height: 18px; fill: currentColor; }
.mm-links { display: flex; flex-direction: row; flex-wrap: wrap; gap: 6px 18px; }
.mm-links a { color: var(--fg-2); }
.mm-links a:hover { color: var(--accent); }

/* Official RSI gallery on ship pages */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.gal-item { padding: 0; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--panel-2, #0b1016); cursor: zoom-in; aspect-ratio: 16 / 9; }
.gal-item img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .25s ease; }
.gal-item:hover img, .gal-item:focus-visible img { transform: scale(1.04); }

/* Server-rendered page content (shown until the app takes over; what search engines read) */
.ssr ul { margin: 14px 0 0; padding-left: 1.2em; columns: 2 320px; column-gap: 32px; }
.ssr li { margin: 0 0 6px; break-inside: avoid; color: var(--muted); }
.ssr h2 { margin: 22px 0 8px; }
.ssr-facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 18px; margin-top: 14px; }
.ssr-facts dt { color: var(--muted); }
.ssr-facts dd { margin: 0; }

/* ---------------------------------------------------------------- Squadron 42 page
   Its own look, after the campaign's briefings: black, white, a thin gold rule,
   wide-spaced capitals and navy chevrons. */
body.sq42-mode { --sq-gold: #d9c38a; --sq-ink: #f2f2ee; --sq-dim: #9aa6b2; --sq-line: #ffffff1f; }
body.sq42-mode .main-col { background: #000; }
body.sq42-mode .top { background: #000c; }
.sq { color: var(--sq-ink); font-family: Rajdhani, var(--body), sans-serif; font-size: 1.08rem; margin: -8px -4px 0; }
.sq a { color: var(--sq-ink); }
.sq .mono { font-family: 'IBM Plex Mono', monospace; }
.sq-hero { position: relative; text-align: center; padding: clamp(48px, 9vw, 110px) 16px clamp(40px, 6vw, 70px); overflow: hidden; border-bottom: 1px solid var(--sq-line);
  background: radial-gradient(140% 70% at 50% 120%, #2a344066, transparent 60%), radial-gradient(60% 40% at 50% 0%, #ffffff0a, transparent 70%); }
.sq-hero::after { content: ''; position: absolute; left: 50%; bottom: -1640px; width: 2000px; height: 2000px; margin-left: -1000px; border-radius: 50%;
  border-top: 1px solid #c8d8e855; box-shadow: 0 -2px 40px #8fb4d622; pointer-events: none; }
.sq-chev { position: absolute; left: 22px; top: 22px; display: flex; gap: 6px; }
.sq-chev i { width: 12px; height: 20px; border-right: 2px solid var(--sq-ink); transform: skewX(-30deg); opacity: .6; }
.sq-tag { position: absolute; right: 22px; top: 26px; font-size: .72rem; letter-spacing: .26em; color: var(--sq-dim); }
.sq-kicker { font-size: .78rem; letter-spacing: .5em; text-transform: uppercase; color: var(--sq-dim); margin: 0 0 22px; text-indent: .5em; }
.sq-title { font: 300 clamp(2.6rem, 1rem + 7vw, 6.4rem)/1 Rajdhani, sans-serif; letter-spacing: .4em; text-indent: .4em; margin: 0; color: var(--sq-ink); }
.sq-title b { font-weight: 600; }
.sq-rule { width: min(420px, 70%); height: 1px; margin: 26px auto 20px; background: linear-gradient(90deg, transparent, var(--sq-gold), transparent); }
.sq-status { font: 500 clamp(1rem, .9rem + .6vw, 1.3rem)/1.3 Rajdhani; letter-spacing: .3em; text-transform: uppercase; color: var(--sq-gold); margin: 0; }
.sq-count { display: flex; justify-content: center; gap: clamp(10px, 3vw, 28px); flex-wrap: wrap; margin: 30px 0 6px; }
.sq-count div { min-width: 74px; display: grid; gap: 4px; }
.sq-count b { font: 300 clamp(2rem, 1.4rem + 2.4vw, 3.4rem)/1 Rajdhani; letter-spacing: .06em; }
.sq-count span { font: 500 .7rem/1 'IBM Plex Mono'; letter-spacing: .24em; text-transform: uppercase; color: var(--sq-dim); }
.sq-count p { flex-basis: 100%; margin: 6px 0 0; font: 500 .72rem/1 'IBM Plex Mono'; letter-spacing: .22em; text-transform: uppercase; color: var(--sq-dim); }
.sq-note { max-width: 640px; margin: 18px auto 0; color: var(--sq-dim); font-size: 1rem; }
.sq-actions { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; margin-top: 26px; position: relative; z-index: 1; }
.sq-btn { display: inline-flex; align-items: center; gap: 8px; padding: 11px 20px; border: 1px solid #ffffff44; color: var(--sq-ink); text-decoration: none;
  font: 600 .8rem/1 Rajdhani; letter-spacing: .24em; text-transform: uppercase; clip-path: polygon(10px 0, 100% 0, calc(100% - 10px) 100%, 0 100%); background: #ffffff08; transition: background .2s, border-color .2s; }
.sq-btn:hover { background: #ffffff18; border-color: #fff9; }
.sq-btn-gold { border-color: var(--sq-gold); color: #000 !important; background: var(--sq-gold); }
.sq-btn-gold:hover { background: #ecd9a3; }
.sq-block { padding: clamp(28px, 4vw, 48px) clamp(4px, 2vw, 20px); border-bottom: 1px solid var(--sq-line); }
.sq-h { font: 500 .82rem/1 'IBM Plex Mono', monospace; letter-spacing: .4em; text-transform: uppercase; color: var(--sq-gold); margin: 0 0 22px; display: flex; align-items: center; gap: 14px; }
.sq-h::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, var(--sq-line), transparent); }
.sq-grid2 { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 32px; align-items: start; }
.sq-lede { font-size: 1.2rem; line-height: 1.55; margin: 0; }
.sq-facts { margin: 0; display: grid; gap: 0; border-top: 1px solid var(--sq-line); }
.sq-facts div { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--sq-line); }
.sq-facts dt { font: 500 .72rem/1.6 'IBM Plex Mono'; letter-spacing: .14em; text-transform: uppercase; color: var(--sq-dim); }
.sq-facts dd { margin: 0; font-weight: 600; }
.sq-time { list-style: none; margin: 0; padding: 0 0 0 22px; border-left: 1px solid #ffffff33; display: grid; gap: 18px; }
.sq-time li { position: relative; display: grid; gap: 3px; }
.sq-time li::before { content: ''; position: absolute; left: -27px; top: 6px; width: 9px; height: 9px; background: #000; border: 1px solid var(--sq-ink); transform: rotate(45deg); }
.sq-time li.up::before { border-color: var(--sq-gold); background: var(--sq-gold); box-shadow: 0 0 12px var(--sq-gold); }
.sq-time li.up b { color: var(--sq-gold); }
.sq-when { font-size: .74rem; letter-spacing: .16em; color: var(--sq-dim); text-transform: uppercase; }
.sq-time b { font-size: 1.15rem; letter-spacing: .06em; text-transform: uppercase; }
.sq-time span:last-child { color: #c9d1d8; }
.sq-cast { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 1px; background: var(--sq-line); border: 1px solid var(--sq-line); }
.sq-person { background: #000; padding: 16px; display: grid; gap: 4px; }
.sq-init { width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid #ffffff44; font: 600 .9rem/1 Rajdhani; letter-spacing: .1em; margin-bottom: 6px; clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px); }
.sq-person b { font-size: 1.08rem; letter-spacing: .04em; }
.sq-person span:last-child { color: var(--sq-dim); font-size: .95rem; }
.sq-small { color: var(--sq-dim); font-size: .92rem; margin: 14px 0 0; }
.sq-small a { color: var(--sq-ink); }
.sq-ships { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.sq-ship { display: grid; text-decoration: none; border: 1px solid var(--sq-line); background: #05080b; overflow: hidden; }
.sq-ship img, .sq-ship .ph { width: 100%; aspect-ratio: 16 / 8; object-fit: cover; display: block; filter: grayscale(.35) contrast(1.05); transition: filter .3s, transform .3s; }
.sq-ship:hover img { filter: none; transform: scale(1.03); }
.sq-ship span { padding: 10px 12px; display: grid; gap: 2px; }
.sq-ship b { letter-spacing: .06em; text-transform: uppercase; }
.sq-ship small { color: var(--sq-dim); }
.sq-posts { display: grid; gap: 1px; background: var(--sq-line); border: 1px solid var(--sq-line); }
.sq-posts a { background: #000; padding: 12px 14px; display: grid; gap: 3px; text-decoration: none; }
.sq-posts a:hover { background: #0b0f13; }
.sq-posts .mono { font-size: .72rem; letter-spacing: .14em; color: var(--sq-dim); text-transform: uppercase; }
.sq-faq details { border-bottom: 1px solid var(--sq-line); padding: 12px 0; }
.sq-faq summary { cursor: pointer; font-weight: 600; font-size: 1.1rem; letter-spacing: .03em; }
.sq-faq p { color: #c9d1d8; margin: 8px 0 0; }
.sq-links { display: flex; flex-wrap: wrap; gap: 8px; }
.sq-links a { border: 1px solid var(--sq-line); padding: 8px 12px; text-decoration: none; font-size: .95rem; display: inline-flex; gap: 6px; align-items: center; }
.sq-links a:hover { border-color: #fff8; }
.sq-foot { border-bottom: 0; }
@media (max-width: 760px) {
  .sq-grid2 { grid-template-columns: 1fr; }
  .sq-tag { display: none; }
  .sq-title { letter-spacing: .22em; text-indent: .22em; }
}

/* Events: happening now */
.live-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 14px; }
.live-card { border: 1px solid color-mix(in srgb, var(--good) 35%, var(--line)); border-radius: 10px; padding: 16px; background: color-mix(in srgb, var(--good) 5%, var(--panel)); display: grid; gap: 8px; align-content: start; }
.live-card h3 { margin: 2px 0 0; }
.live-card p { margin: 0; }
.live-card details summary { cursor: pointer; font-weight: 600; margin: 4px 0; }
.live-card ol { margin: 6px 0 0; padding-left: 1.2em; display: grid; gap: 6px; }
.live-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 0 var(--good); animation: livePulse 1.8s infinite; vertical-align: middle; margin-right: 4px; }
@keyframes livePulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--good) 60%, transparent); } 100% { box-shadow: 0 0 0 10px transparent; } }
@media (prefers-reduced-motion: reduce) { .live-dot { animation: none; } }
.live-tile { border-color: color-mix(in srgb, var(--good) 40%, var(--line)); }

/* News: dev tracker */
.dev-list { display: grid; gap: 10px; }
.dev-post { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); text-decoration: none; color: var(--fg); transition: border-color .2s; }
.dev-post:hover { border-color: var(--accent); }
.dev-post img, .dev-av { width: 40px; height: 40px; border-radius: 8px; object-fit: cover; background: var(--panel-2); display: grid; place-items: center; font-weight: 700; }
.dev-body { display: grid; gap: 4px; min-width: 0; }
.dev-meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: .9rem; }
.dev-thread { font-weight: 600; }
.dev-excerpt { color: var(--muted); font-size: .92rem; white-space: pre-line; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* Ask the Atlas (assistant) */
.ask-fab { position: fixed; right: 18px; bottom: 18px; z-index: 60; display: inline-flex; align-items: center; gap: 8px; padding: 12px 16px; border-radius: 999px; border: 1px solid var(--accent); background: var(--accent); color: #111; font: 700 .9rem/1 var(--display); letter-spacing: .04em; box-shadow: 0 8px 28px #0008; cursor: pointer; }
.ask-fab .i { width: 18px; height: 18px; }
.ask-fab.on { background: var(--panel); color: var(--accent); }
.ask-panel { position: fixed; right: 18px; bottom: 78px; z-index: 60; width: min(420px, calc(100vw - 32px)); height: min(620px, calc(100vh - 120px)); display: grid; grid-template-rows: auto minmax(0, 1fr) auto auto auto; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 18px 60px #000a; overflow: hidden; }
.ask-panel[hidden] { display: none; }
.ask-panel header { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.ask-panel header .muted { grid-column: 1; font-size: .8rem; }
.ask-panel header .icon-btn { grid-row: 1 / span 2; grid-column: 2; }
.ask-log { overflow-y: auto; padding: 12px 14px; display: grid; align-content: start; gap: 10px; }
.ask-msg { max-width: 92%; padding: 9px 12px; border-radius: 12px; font-size: .93rem; line-height: 1.45; }
.ask-msg p { margin: 0 0 6px; } .ask-msg p:last-child { margin: 0; }
.ask-msg ul { margin: 4px 0; padding-left: 1.1em; }
.ask-msg.me { justify-self: end; background: color-mix(in srgb, var(--accent) 18%, var(--panel-2)); }
.ask-msg.bot { justify-self: start; background: var(--panel-2); }
.ask-err { color: var(--bad); }
.ask-sugg { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 14px 10px; }
.ask-sugg .chip { cursor: pointer; }
.ask-form { display: flex; gap: 8px; padding: 10px 14px; border-top: 1px solid var(--line); }
.ask-form input { flex: 1; min-width: 0; }
.ask-note { margin: 0; padding: 0 14px 10px; font-size: .75rem; color: var(--muted); }
@media (max-width: 700px) { .ask-fab span { display: none; } .ask-panel { right: 8px; left: 8px; width: auto; bottom: 74px; height: calc(100vh - 140px); } }

/* Footer columns (VERTEX-style) and the Mint Motive sites switcher */
.foot-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 18px; margin: 16px 0 10px; }
.foot-col summary { list-style: none; cursor: default; }
.foot-col summary::-webkit-details-marker { display: none; }
.foot-col h4 { margin: 0 0 8px; font: 600 .72rem/1 var(--display); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.foot-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.foot-col a, .foot-col span { color: var(--fg); font-size: .9rem; text-decoration: none; }
.foot-col a:hover { color: var(--accent); }
.foot-col small { color: var(--muted); }
@media (max-width: 640px) { .foot-col summary { cursor: pointer; } }

/* Code blocks (developers page) */
pre.code { margin: 0; padding: 12px 14px; background: var(--bg-2, #0a0f13); border: 1px solid var(--line); border-radius: 8px; overflow-x: auto; font: 500 .82rem/1.55 'IBM Plex Mono', monospace; color: var(--fg); white-space: pre; }

/* What's new, changelog, help centre, credits */
.wn-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; margin-top: 10px; }
.wn-card { display: grid; gap: 6px; align-content: start; padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel-2); color: var(--fg); text-decoration: none; }
a.wn-card:hover { border-color: var(--accent); }
.wn-card > .i { width: 22px; height: 22px; color: var(--accent); }
.wn-card span { color: var(--muted); font-size: .92rem; }
.wn-card em { font-style: normal; color: var(--accent); font-size: .85rem; display: inline-flex; gap: 4px; align-items: center; }
.wn-card.soon { border-style: dashed; }
.cl { display: grid; gap: 14px; }
.cl-rel { border: 1px solid var(--line); border-radius: 10px; padding: 16px; background: var(--panel); scroll-margin-top: 80px; }
.cl-rel header { display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; }
.cl-rel h2 { margin: 0; font-family: var(--mono, 'IBM Plex Mono'), monospace; }
.cl-title { margin: 4px 0 10px; font-weight: 600; }
.cl-group { display: grid; grid-template-columns: 90px minmax(0, 1fr); gap: 10px; margin-top: 8px; align-items: start; }
.cl-group ul { margin: 0; padding-left: 1.1em; display: grid; gap: 5px; }
@media (max-width: 600px) { .cl-group { grid-template-columns: 1fr; } }
.help-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; }
.help-card { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 4px 10px; padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); color: var(--fg); text-decoration: none; }
.help-card:hover { border-color: var(--accent); }
.help-card .i { grid-row: span 2; color: var(--accent); width: 22px; height: 22px; }
.help-card span { color: var(--muted); font-size: .9rem; }
.help-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.help-steps li { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 12px; scroll-margin-top: 80px; }
.help-steps .n { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--accent); font-weight: 700; }
.help-steps p { margin: 4px 0 0; color: var(--fg); }
.credit-list { display: grid; gap: 12px; }
.credit h2 a { color: inherit; text-decoration: none; }

/* Support page */
.don-amounts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.don-amt { min-width: 74px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel-2); color: var(--fg); font: 700 1.1rem/1 var(--display); cursor: pointer; }
.don-amt.on { border-color: var(--accent); color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, var(--panel-2)); }
.don-ways { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 12px; }
.don-ways li { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 10px; }
.don-ways .i { color: var(--accent); width: 20px; height: 20px; margin-top: 2px; }
.side-support { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; color: var(--accent); text-decoration: none; font-weight: 600; font-size: .88rem; }
.side-support .i { width: 16px; height: 16px; }
/* ---- Trade exchange ---- */
.tx-up { color: var(--good); }
.tx-down { color: var(--bad); }
.tx-move { font: 600 .8rem var(--mono); white-space: nowrap; }
.tx-move.flat { color: var(--muted); font-weight: 500; }
.tx-trend { display: inline-flex; align-items: center; gap: 8px; }
.tx-spark { display: block; flex: none; }
.tx-spark.tx-up { color: var(--good); }
.tx-spark.tx-down { color: var(--bad); }
.tx-chip { font-size: .66rem; padding: 1px 5px; vertical-align: 1px; }
.tx-stale { color: var(--warn); }
.tx-warn-t { color: var(--warn) !important; }
.tx-note { font-size: .86rem; max-width: 80ch; margin-top: 10px; }
.tx-place { font-weight: 600; }

/* price tape */
.tx-tape {
  position: relative; overflow: hidden; border: 1px solid var(--line); border-radius: var(--r); background: var(--bg-2);
  margin-bottom: 12px; mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent);
}
.tx-tape-run { display: flex; width: max-content; animation: txTape 70s linear infinite; }
.tx-tape:hover .tx-tape-run, .tx-tape:focus-within .tx-tape-run { animation-play-state: paused; }
.tx-tape-dup { display: flex; }
.tx-tick { display: inline-flex; align-items: baseline; gap: 8px; padding: 8px 16px; border-right: 1px solid var(--line); color: var(--fg); white-space: nowrap; font-size: .85rem; }
.tx-tick:hover { background: var(--panel-2); text-decoration: none; }
.tx-tick b { font: 600 .8rem var(--mono); color: var(--accent); letter-spacing: .04em; }
.tx-tick .num { font-size: .82rem; }
@keyframes txTape { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  .tx-tape { overflow-x: auto; mask-image: none; }
  .tx-tape-run { animation: none; }
  .tx-tape-dup { display: none; }
}

.tx-source { display: flex; gap: 8px; align-items: flex-start; font-size: .86rem; color: var(--fg-2); margin-bottom: 14px; max-width: 100ch; }
.tx-source .i { color: var(--signal); margin-top: .2em; }

.tx-help { margin-bottom: 16px; padding: 0; }
.tx-help summary { cursor: pointer; padding: 12px 16px; font: 600 .98rem var(--display); display: flex; gap: 8px; align-items: center; color: var(--fg); list-style: none; }
.tx-help summary::-webkit-details-marker { display: none; }
.tx-help summary::after { content: '+'; margin-left: auto; font: 500 1.1rem var(--mono); color: var(--muted); }
.tx-help[open] summary::after { content: '−'; }
.tx-help summary .i { color: var(--accent); }
.tx-help-body { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 12px 22px; padding: 0 16px 16px; font-size: .92rem; color: var(--fg-2); }
.tx-help-body b { color: var(--fg); }

.tx-tabs { margin-bottom: 16px; }

/* market board */
.tx-board td { vertical-align: middle; }
.tx-board td .num { font-size: .92rem; }
.tx-board td b.num { font-size: .95rem; }
.tx-board tbody tr { cursor: pointer; }

/* planner form */
.tx-form { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 180px), 1fr)); gap: 12px 14px; align-items: end; }
.tx-form select, .tx-form input:not([type="checkbox"]) { width: 100%; }
.tx-f-ship { grid-column: span 2; }
.tx-f-checks { display: flex; flex-wrap: wrap; gap: 0 18px; grid-column: 1 / -1; }
.tx-form-sm { grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); }
@media (max-width: 520px) { .tx-f-ship { grid-column: auto; } }

.tx-best { margin-bottom: 4px; }
.tx-routes, .tx-plans { display: grid; gap: 10px; }

.tx-route {
  display: grid; grid-template-columns: minmax(0, 1fr) 190px; gap: 12px 20px; padding: 14px 16px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r);
}
.tx-route:hover { border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); }
.tx-route-main { display: grid; gap: 10px; min-width: 0; }
.tx-route-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.tx-rank { color: var(--muted); font-size: .82rem; }
.tx-cname { font: 600 1.1rem/1.2 var(--display); color: var(--fg); }
.tx-legs { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 10px; align-items: center; }
.tx-leg { display: grid; gap: 2px; min-width: 0; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel-2); }
.tx-leg-k { font: 600 .64rem/1 var(--display); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.tx-leg-place { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; overflow-wrap: anywhere; }
.tx-leg .sub { color: var(--muted); font-size: .8rem; overflow-wrap: anywhere; }
.tx-leg .num { font-size: .9rem; }
.tx-leg small { color: var(--muted); font-size: .72rem; }
.tx-arrow { color: var(--accent); display: inline-flex; }
.tx-notes { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; font-size: .86rem; color: var(--fg-2); }
.tx-route-num { display: grid; align-content: center; justify-items: end; text-align: right; gap: 2px; border-left: 1px solid var(--line); padding-left: 18px; }
.tx-profit { font-size: 1.45rem; color: var(--good); line-height: 1.1; }
.tx-mini { display: grid; grid-template-columns: auto auto; gap: 2px 12px; margin: 8px 0 0; font-size: .84rem; }
.tx-mini dt { color: var(--muted); }
.tx-mini dd { margin: 0; text-align: right; }
@media (max-width: 760px) {
  .tx-route { grid-template-columns: minmax(0, 1fr); }
  .tx-route-num { border-left: 0; border-top: 1px solid var(--line); padding: 10px 0 0; justify-items: start; text-align: left; grid-template-columns: auto 1fr; align-items: baseline; column-gap: 8px; }
  .tx-mini { grid-column: 1 / -1; grid-template-columns: repeat(3, auto auto); justify-content: start; }
  .tx-mini dd { text-align: left; margin-right: 10px; }
}
@media (max-width: 560px) {
  .tx-legs { grid-template-columns: minmax(0, 1fr); }
  .tx-arrow { transform: rotate(90deg); justify-self: center; }
}

.tx-plan { display: grid; gap: 10px; padding: 14px 16px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); }
.tx-plan-profit { margin-left: auto; font-weight: 600; color: var(--good); }
.tx-plan .table-wrap { background: var(--panel-2); }

.tx-two { grid-template-columns: minmax(0, 1fr); gap: 28px; }

@media (max-width: 900px) { .tx-hide-md { display: none; } }
@media (max-width: 640px) {
  .tx-hide-sm { display: none; }
  .tx-board th, .tx-board td { padding: 8px 8px; }
  .tx-source { font-size: .8rem; }
}
@media (max-width: 640px) {
  .tx-tabs { display: flex; width: 100%; }
  .tx-tabs button { flex: 1 1 auto; }
  .tx-board td .sub.tx-hide-sm { display: none; }
  .tx-board table { font-size: .84rem; }
  .tx-board th, .tx-board td { padding: 8px 5px; }
  .tx-board th:first-child, .tx-board td:first-child { padding-left: 10px; }
  .tx-board th { letter-spacing: .06em; font-size: .62rem; }
  .tx-board td .num, .tx-board td b.num { font-size: .8rem; }
  .tx-plan { padding: 12px; }
}
.tx-sys-inline { display: none; }
@media (max-width: 640px) {
  .tx-sys-inline { display: inline; }
  .tx-cargo th, .tx-cargo td, .tx-two th, .tx-two td { padding: 8px 6px; }
  .tx-cargo th:first-child, .tx-cargo td:first-child, .tx-two th:first-child, .tx-two td:first-child { padding-left: 10px; }
  .tx-cargo th, .tx-two th { letter-spacing: .06em; }
}
.stat .tx-move { font: 600 1.1rem var(--mono); text-transform: none; letter-spacing: 0; color: var(--muted); }
.stat .tx-move.tx-up { color: var(--good); }
.stat .tx-move.tx-down { color: var(--bad); }

/* New on the store */
.drops { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.drop { display: grid; grid-template-rows: auto 1fr; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--panel-2); color: var(--fg); text-decoration: none; transition: border-color .2s, transform .2s; }
.drop:hover { border-color: var(--accent); transform: translateY(-2px); }
.drop-img { position: relative; aspect-ratio: 16 / 9; background: #070b0e; }
.drop-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.drop-new { position: absolute; top: 8px; left: 8px; padding: 3px 8px; border-radius: 6px; background: var(--accent); color: #111; font: 700 .72rem/1 var(--display); letter-spacing: .08em; text-transform: uppercase; }
.drop-body { display: grid; gap: 6px; padding: 10px 12px 12px; align-content: start; }
.drop-body b { font-size: .95rem; line-height: 1.25; }
.drop-price { font-family: var(--mono, 'IBM Plex Mono'), monospace; font-size: .9rem; }
.drop-price s { color: var(--muted); }
.drop-price small { color: var(--muted); font-family: var(--body); }
@media (prefers-reduced-motion: reduce) { .drop:hover { transform: none; } }
/* ---- Loadout builder ---- */
.lo-h2 { font-size: 1.1rem; margin: 22px 0 10px; }
.lo-h2:first-of-type { margin-top: 0; }
.lo-pickship { display: grid; gap: 12px; }
.lo-shiplist { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); gap: 2px 12px; max-height: 420px; overflow: auto; overscroll-behavior: contain; align-items: start; }
.lo-shiplist a { display: grid; padding: 6px 8px; border-radius: 4px; color: var(--fg); min-width: 0; }
.lo-shiplist a:hover { background: var(--panel-2); text-decoration: none; }
.lo-shiplist small, .lo-tile small, .lo-switch-list small { color: var(--muted); font-size: .78rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lo-quick { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 10px; }
.lo-tile { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 10px; align-items: center; padding: 8px; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); color: var(--fg); }
.lo-tile:hover { border-color: var(--accent); text-decoration: none; }
.lo-tile img, .lo-tile .ph { width: 88px; height: 54px; min-height: 0; object-fit: cover; border-radius: 4px; }
.lo-tile .ph span { font-size: 1rem; }
.lo-tile > span { display: grid; min-width: 0; }
.lo-credit { margin-top: 22px; color: var(--muted); font-size: .82rem; max-width: 95ch; }

.lo-head { display: flex; flex-wrap: wrap; gap: 14px 20px; align-items: flex-end; justify-content: space-between; margin-bottom: 16px; }
.lo-ship { display: flex; gap: 14px; align-items: center; min-width: 0; }
.lo-ship > div:last-child { min-width: 0; display: grid; gap: 4px; }
.lo-ship-img { width: 136px; aspect-ratio: 16 / 10; border-radius: var(--r); overflow: hidden; border: 1px solid var(--line); flex: none; background: var(--panel-2); }
.lo-ship-img img, .lo-ship-img .ph { width: 100%; height: 100%; min-height: 0; object-fit: cover; display: block; }
.lo-ship h1 { font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.2rem); }
.lo-ship p { font-size: .9rem; }
.lo-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.lo-switch { position: relative; }
.lo-switch input { width: 190px; padding: 6px 10px; font-size: .88rem; }
.lo-switch-list { position: absolute; top: calc(100% + 4px); left: 0; min-width: 260px; z-index: 30; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); display: grid; padding: 4px; }
.lo-switch-list a { padding: 6px 8px; color: var(--fg); display: flex; justify-content: space-between; align-items: baseline; gap: 10px; border-radius: 4px; }
.lo-switch-list a:hover { background: var(--panel-2); text-decoration: none; }
.lo-switch-list > span { padding: 6px 8px; }

.lo-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 16px; align-items: start; }
.lo-sum { scroll-margin-top: 80px; position: sticky; top: 74px; display: grid; gap: 10px; max-height: calc(100vh - 90px); overflow: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.lo-banner { display: flex; gap: 8px; align-items: flex-start; padding: 8px 12px; margin-bottom: 10px; border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); background: var(--accent-soft); border-radius: var(--r); font-size: .88rem; }
.lo-banner .i { color: var(--accent); margin-top: .15em; }
.lo-group { margin-bottom: 12px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.lo-group-head { display: flex; align-items: center; gap: 8px; padding: 10px 14px 0; }
.lo-group-head h2 { font-size: 1.02rem; letter-spacing: .03em; }
.lo-group-head .i { color: var(--accent); }
.lo-count { font: 500 .78rem var(--mono); margin-left: auto; }
.lo-help { padding: 2px 14px 8px; color: var(--muted); font-size: .82rem; max-width: 85ch; }
.lo-row { display: grid; grid-template-columns: minmax(150px, 230px) minmax(0, 1fr); gap: 4px 12px; align-items: center; padding: 6px 14px; border-top: 1px solid var(--line); }
.lo-row.is-changed { box-shadow: inset 3px 0 0 var(--accent); background: color-mix(in srgb, var(--accent) 5%, transparent); }
.lo-slot { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 7px; min-width: 0; }
.lo-label { font-weight: 600; font-size: .88rem; }
.lo-row-title .lo-label { color: var(--accent); }
.lo-size { font: 600 .68rem/1 var(--mono); padding: 3px 5px; border-radius: 3px; background: var(--panel-2); border: 1px solid var(--line); color: var(--fg-2); }
.lo-mount { font: 500 .74rem/1.25 var(--body); padding: 2px 7px; border-radius: 3px; border: 1px dashed var(--line); background: transparent; color: var(--signal); cursor: pointer; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lo-mount:hover { border-color: var(--accent); }
.lo-mount.is-fixed { color: var(--muted); cursor: default; }
.lo-part { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 4px; align-items: center; min-width: 0; }
.lo-btn { grid-column: 1; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0 8px; width: 100%; padding: 5px 10px; text-align: left; border: 1px solid var(--line); border-radius: var(--r); background: var(--bg-2); color: var(--fg); font: inherit; cursor: pointer; min-width: 0; }
.lo-btn:hover { border-color: var(--accent); }
.lo-btn.is-locked { cursor: default; background: transparent; border-style: dashed; }
.lo-name { font-weight: 600; font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lo-key { grid-column: 1; font-size: .78rem; color: var(--fg-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lo-chev { grid-column: 2; grid-row: 1 / span 2; align-self: center; color: var(--muted); font-size: .8rem; }
.lo-grade { font: 600 .66rem/1 var(--mono); padding: 1px 4px; border: 1px solid var(--line); border-radius: 3px; color: var(--muted); vertical-align: 1px; }
.lo-info { grid-column: 2; grid-row: 1; color: var(--muted); display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: var(--r); }
.lo-info:hover { color: var(--accent); background: var(--panel-2); }
.lo-was { grid-column: 1 / -1; font-size: .74rem; color: var(--muted); overflow-wrap: anywhere; }
.lo-was b { color: var(--fg-2); font-family: var(--mono); font-weight: 600; }
.lo-sub { border-top: 1px solid var(--line); }
.lo-sub > .lo-row { border-top: 0; }
.lo-subrows { margin: 0 0 6px 20px; border-left: 2px solid var(--line); }
.lo-subrows .lo-row { padding-left: 12px; }
.lo-subrows .lo-row:first-child { border-top: 0; }

.lo-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; display: grid; gap: 8px; min-width: 0; }
.lo-card h3 { font-size: .95rem; display: flex; align-items: center; gap: 7px; }
.lo-card h3 .i { color: var(--accent); }
.lo-sm { font-size: .8rem; font-weight: 400; }
.lo-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 4px; overflow: hidden; }
.lo-stat { background: var(--panel); padding: 7px 10px; display: grid; gap: 1px; min-width: 0; cursor: help; }
.lo-stat span { font-size: .66rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.lo-stat b { font: 600 1.06rem/1.2 var(--mono); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.lo-stat.hi b { color: var(--accent); }
.lo-d { font: 600 .72rem/1.2 var(--mono); margin-left: 6px; white-space: nowrap; font-style: normal; }
.lo-stat .lo-d { margin: 0; min-height: 1.1em; }
.lo-d.up { color: var(--good); }
.lo-d.down { color: var(--bad); }
.lo-split { display: flex; height: 8px; border-radius: 4px; overflow: hidden; background: var(--panel-2); }
.lo-en { background: var(--signal); }
.lo-ph { background: var(--accent); }
.lo-di { background: var(--nyx); }
.lo-th { background: var(--pyro); }
.lo-legend { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: .76rem; color: var(--fg-2); }
.lo-legend i { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 5px; }
.lo-note { font-size: .76rem; color: var(--muted); }
.lo-line { display: flex; align-items: baseline; gap: 8px; font-size: .88rem; border-top: 1px solid var(--line); padding-top: 8px; }
.lo-line span { flex: 1; }
.lo-line small { color: var(--muted); }
.lo-meter { display: grid; gap: 4px; cursor: help; }
.lo-meter-top { display: flex; gap: 8px; align-items: baseline; font-size: .84rem; }
.lo-meter-top > span:first-child { flex: 1; color: var(--fg-2); }
.lo-pct { font: 600 .76rem var(--mono); color: var(--good); }
.lo-track { position: relative; height: 9px; border-radius: 5px; background: var(--panel-2); border: 1px solid var(--line); overflow: hidden; }
.lo-track span { display: block; height: 100%; background: var(--good); border-radius: 4px; }
.lo-track em { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--fg); }
.lo-meter.warn .lo-pct { color: var(--warn); }
.lo-meter.warn .lo-track span { background: var(--warn); }
.lo-meter.over .lo-pct, .lo-over { color: var(--bad); }
.lo-meter.over .lo-track span { background: var(--bad); }
.lo-shop, .lo-saved { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.lo-shop li { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-size: .86rem; }
.lo-shop li > span { display: grid; min-width: 0; }
.lo-shop small { color: var(--muted); font-size: .74rem; }
.lo-total { display: flex; justify-content: space-between; gap: 10px; border-top: 1px solid var(--line); padding-top: 8px; font-weight: 600; font-size: .9rem; }
.lo-total b { color: var(--accent); }
.lo-share { display: flex; flex-wrap: wrap; gap: 6px; }
.lo-saved li { display: flex; align-items: center; gap: 8px; font-size: .86rem; }
.lo-saved a { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lo-saved small { color: var(--muted); font-size: .74rem; }
.lo-saved .icon-btn { width: 28px; height: 28px; }
.lo-gloss { margin-top: 16px; }
.lo-gloss summary { cursor: pointer; font-family: var(--display); font-weight: 600; display: flex; gap: 8px; align-items: center; }
.lo-gloss summary .i { color: var(--accent); }
.lo-gloss .kv { margin-top: 12px; font-size: .9rem; }
.lo-mini { display: none; }

.lo-noscroll { overflow: hidden; }
.lo-modal { position: fixed; inset: 0; z-index: 60; background: #000b; display: grid; place-items: center; padding: 16px; }
.lo-pick { width: min(1120px, 100%); max-height: min(88vh, 920px); display: grid; grid-template-rows: auto auto minmax(0, 1fr); gap: 10px; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow); padding: 16px; min-height: 0; }
.lo-pick-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.lo-pick-head h2 { font-size: 1.2rem; margin: 4px 0; }
.lo-pick-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.lo-pick-tools input { flex: 1 1 220px; min-width: 0; }
.lo-pick-table { overflow: auto; min-height: 0; overscroll-behavior: contain; }
.lo-pick-table table { font-size: .84rem; }
.lo-pick-table th, .lo-pick-table td { padding: 6px 10px; }
.lo-pick-table td:first-child, .lo-pick-table th:first-child { position: sticky; left: 0; z-index: 1; background: var(--panel); min-width: 190px; max-width: 280px; }
.lo-pick-table th { z-index: 2; }
.lo-pick-table th:first-child { z-index: 3; background: var(--panel-2); }
.lo-pick-table tr.rowlink:hover td, .lo-pick-table tr.rowlink:focus td { background: var(--panel-2); }
.lo-pick-table tr.is-cur td { background: color-mix(in srgb, var(--accent) 10%, var(--panel)); }
.lo-pick-table td .lo-d { display: block; margin: 0; font-size: .68rem; }
.lo-pick-table td.num { white-space: nowrap; }
.lo-pick-table td.lo-txt { font-size: .8rem; color: var(--fg-2); min-width: 90px; }
.lo-chip { font-size: .64rem; padding: 1px 6px; vertical-align: 1px; }

@media (max-width: 1100px) {
  .lo-grid { grid-template-columns: minmax(0, 1fr); }
  .lo-sum { position: static; max-height: none; overflow: visible; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); align-items: start; }
  .lo-mini { display: block; position: sticky; bottom: 0; z-index: 25; margin: 12px calc(-1 * clamp(16px, 3vw, 36px)) 0; }
  .lo-mini a { display: flex; justify-content: space-around; gap: 6px; padding: 8px 12px calc(8px + env(safe-area-inset-bottom, 0px)); background: color-mix(in srgb, var(--bg-2) 94%, transparent); backdrop-filter: blur(8px); border-top: 1px solid var(--line); color: var(--fg); font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; }
  .lo-mini a:hover { text-decoration: none; }
  .lo-mini span { display: grid; justify-items: center; color: var(--muted); }
  .lo-mini b { font: 600 .98rem var(--mono); color: var(--fg); text-transform: none; letter-spacing: 0; }
  .lo-mini .lo-d { margin: 0; font-size: .66rem; }
}
@media (max-width: 640px) {
  .lo-row { grid-template-columns: minmax(0, 1fr); padding: 8px 12px; }
  .lo-head { align-items: stretch; }
  .lo-actions { width: 100%; }
  .lo-switch { flex: 1 1 100%; }
  .lo-switch input { width: 100%; }
  .lo-switch-list { right: 0; min-width: 0; }
  .lo-ship-img { width: 96px; }
  .lo-subrows { margin-left: 8px; }
  .lo-group-head, .lo-help { padding-left: 12px; padding-right: 12px; }
  .lo-modal { padding: 0; align-items: end; }
  .lo-pick { max-height: 94vh; border-radius: 10px 10px 0 0; padding: 12px; }
  .lo-pick-table td:first-child, .lo-pick-table th:first-child { min-width: 150px; max-width: 170px; }
  .lo-quick { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .lo-tile { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .lo-tile img, .lo-tile .ph { width: 100%; height: 76px; }
}
button.wn-card { font: inherit; text-align: left; cursor: pointer; } button.wn-card:hover { border-color: var(--accent); }

/* Admin */
.adm-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; }
.adm-grid h3 { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.adm-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; flex: none; }
.adm-dot.ok { background: var(--good); } .adm-dot.warn { background: var(--warn); } .adm-dot.bad { background: var(--bad); }
.adm-bar { height: 8px; border-radius: 4px; background: var(--panel-2); overflow: hidden; margin-top: 10px; }
.adm-bar i { display: block; height: 100%; background: var(--accent); }
.adm-feed { display: grid; gap: 8px; align-content: start; }
.adm-feed .btn { justify-self: start; }
.adm-err { color: var(--bad); font-size: .85rem; margin: 0; }
.adm-env { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; font-size: .85rem; }
.adm-env li { display: flex; align-items: center; gap: 8px; }
.adm-hidden { opacity: .5; }
.adm-todo .link-list span { display: grid; gap: 2px; }

/* Location pictures */
.place-thumb { width: 44px; height: 30px; object-fit: cover; border-radius: 5px; border: 1px solid var(--line); flex: none; background: var(--panel-2); }
.place-link { display: inline-flex; align-items: center; gap: 8px; }
.loc-list .place-link { vertical-align: middle; }
.place-hero { position: relative; display: block; width: 100%; padding: 0; margin: 0 0 16px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; aspect-ratio: 21 / 7; background: var(--panel-2); cursor: zoom-in; }
.place-hero img { width: 100%; height: 100%; object-fit: cover; display: block; }
.place-credit { position: absolute; right: 10px; bottom: 8px; padding: 3px 8px; border-radius: 6px; background: #0b1116c0; color: #dfe7ec; font-size: .75rem; }
@media (max-width: 640px) { .place-hero { aspect-ratio: 16 / 9; } }
button.svc { font: inherit; cursor: pointer; }
button.svc:hover { border-color: var(--accent); color: var(--accent); }
.flash { animation: flash 1.6s ease-out; border-radius: 8px; }
@keyframes flash { 0%, 30% { box-shadow: 0 0 0 3px var(--accent); background-color: color-mix(in srgb, var(--accent) 12%, transparent); } 100% { box-shadow: 0 0 0 0 transparent; } }
@media (prefers-reduced-motion: reduce) { .flash { animation: none; outline: 2px solid var(--accent); } }
.unmatched { margin: 8px 0; padding: 10px 12px; border: 1px dashed var(--warn); border-radius: 10px; display: grid; gap: 6px; }
.um-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 10px; align-items: center; font-size: .9rem; }
@media (max-width: 600px) { .um-row { grid-template-columns: 1fr; } }

/* Live feeds for Discord */
.feed-topics { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.feed-topic { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px; align-items: start; padding: 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel-2); cursor: pointer; }
.feed-topic:has(input:checked) { border-color: var(--accent); }
.feed-topic span { display: grid; gap: 2px; }
.feed-topic small { color: var(--muted); font-size: .82rem; }
.feed-list { display: grid; gap: 12px; margin-top: 8px; }
.feed-item { padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel-2); }
.feed-item.paused { opacity: .75; }
.feed-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }

/* "Site updated" popup */
.update-bar { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 80; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: center; max-width: calc(100vw - 32px); padding: 10px 12px 10px 16px; background: var(--panel); border: 1px solid var(--accent); border-radius: 12px; box-shadow: 0 14px 40px #000a; animation: upIn .3s ease-out; }
@keyframes upIn { from { opacity: 0; transform: translate(-50%, 12px); } to { opacity: 1; transform: translate(-50%, 0); } }
@media (prefers-reduced-motion: reduce) { .update-bar { animation: none; } }
@media (max-width: 700px) { .update-bar { bottom: 78px; } }

/* Verse Atlas Companion extension page */
.ext-tabs { flex-wrap: wrap; }
.ext-tip { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--line)); border-radius: var(--r); background: var(--accent-soft); font-size: .92rem; margin: 0; }
.ext-tip .i { flex: none; color: var(--accent); margin-top: 2px; }
.ext-warn p { display: flex; gap: 10px; align-items: flex-start; margin: 0; }
.help-steps .btn.mono { font-size: .8rem; vertical-align: baseline; }
/* ---- 3D print export ---- */
.p3d { margin-top: 12px; }
.p3d-panel { margin-top: 12px; padding: 16px; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel-2); display: grid; gap: 12px; }
.p3d-panel[hidden] { display: none; }
.p3d-panel h3 { margin: 0; font-size: 1.1rem; }
.p3d-panel h4 { margin: 0 0 6px; font-size: .95rem; }
.p3d-lede { margin: 0; max-width: 72ch; color: var(--fg-2); }
.p3d-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 16px; align-items: start; }
.p3d-opts { display: grid; gap: 14px; min-width: 0; }
.p3d-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.p3d-num { display: inline-flex; align-items: center; gap: 6px; font-size: .88rem; color: var(--muted); }
.p3d-num input { width: 5.5em; }
.p3d-dims { font-size: .82rem; }
.p3d-check { display: flex; gap: 8px; align-items: center; font-size: .92rem; cursor: pointer; }
.p3d-adv summary { cursor: pointer; font-size: .88rem; color: var(--muted); }
.p3d-adv .field { margin-top: 8px; }
.p3d-swatches ol { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 4px; }
.p3d-swatches li { display: flex; gap: 8px; align-items: center; font-size: .88rem; flex-wrap: wrap; }
.p3d-swatches .mono { font-size: .78rem; }
.p3d-chip { width: 22px; height: 22px; border-radius: 6px; border: 1px solid var(--line); flex: none; }
.p3d-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.p3d-status { font: 500 .8rem var(--mono); color: var(--muted); min-width: 0; overflow-wrap: anywhere; }
.p3d-preview { position: relative; height: 340px; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden;
  background: radial-gradient(ellipse at 50% 40%, color-mix(in srgb, var(--panel) 70%, #9aa7b3 30%), var(--panel)); }
.p3d-preview canvas { display: block; }
.p3d-help ol { margin: 0 0 8px; padding-left: 1.3em; display: grid; gap: 2px; }
.p3d-help p { margin: 0 0 6px; font-size: .88rem; max-width: 80ch; }
.p3d-notice { font-size: .8rem !important; color: var(--muted); border-top: 1px solid var(--line); padding-top: 8px; }
@media (max-width: 760px) {
  .p3d-grid { grid-template-columns: 1fr; }
  .p3d-preview { height: 260px; }
}

/* loaner matrix (/loaners) and "Your loaners" on My fleet */
.ln-ship { display: flex; align-items: center; gap: 10px; min-width: 0; color: var(--fg); }
.ln-ship .thumb { display: block; flex: none; }
.ln-ship small { display: block; color: var(--muted); font-size: .8rem; }
.ln-loaners { display: grid; gap: 6px; }
.ln-loaners > div { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.ln-table td { vertical-align: middle; }
.ln-rules { padding-left: 1.1em; display: grid; gap: 8px; font-size: .92rem; color: var(--fg-2); }
#fleet-loaners .rows { grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
#fleet-loaners .row { padding: 9px 12px; }

/* Site tour */
.tour-shade { position: fixed; inset: 0; z-index: 90; background: #000a; }
.tour-shade.clear { background: transparent; }
.tour-ring { position: fixed; z-index: 91; border-radius: 10px; border: 2px solid var(--accent); box-shadow: 0 0 0 9999px #000a, 0 0 24px color-mix(in srgb, var(--accent) 60%, transparent); pointer-events: none; transition: left .25s ease, top .25s ease, width .25s ease, height .25s ease; }
.tour-tip { position: fixed; z-index: 92; width: min(360px, calc(100vw - 24px)); padding: 16px 16px 12px; background: var(--panel); border: 1px solid var(--accent); border-radius: 12px; box-shadow: 0 18px 50px #000c; }
.tour-tip.center { left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(420px, calc(100vw - 24px)); }
.tour-tip h3 { margin: 2px 28px 6px 0; }
.tour-x { position: absolute; top: 8px; right: 8px; width: 30px; height: 30px; }
.tour-tip p { margin: 0; font-size: .93rem; color: var(--fg-2); }
.tour-step { font: 600 .72rem var(--mono, monospace); letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.tour-dots { display: flex; gap: 5px; margin: 12px 0 10px; }
.tour-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--line); }
.tour-dots i.on { background: var(--accent); width: 16px; border-radius: 3px; }
.tour-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.tour-gap { flex: 1; }
.tour-invite, .ext-card { position: fixed; z-index: 85; right: 18px; bottom: 18px; max-width: min(380px, calc(100vw - 32px)); padding: 14px 16px; background: var(--panel); border: 1px solid var(--accent); border-radius: 12px; box-shadow: 0 14px 40px #000a; display: grid; gap: 8px; animation: upIn .3s ease-out; }
.tour-invite span { color: var(--fg-2); font-size: .92rem; }
.ext-card { grid-template-columns: 44px minmax(0, 1fr) auto; align-items: start; gap: 12px; }
.ext-card img { border-radius: 10px; }
.ext-card p { margin: 4px 0 10px; font-size: .9rem; color: var(--fg-2); }
@media (max-width: 700px) { .tour-invite, .ext-card { left: 16px; right: 16px; bottom: 78px; max-width: none; } }
@media (prefers-reduced-motion: reduce) { .tour-ring { transition: none; } .tour-invite, .ext-card { animation: none; } }
