/* Orvix Grid website. "Dusk" palette: slate-blue surfaces with a bright color per tool. */
:root {
  --void: #172238;      /* page: deep slate blue, lighter than the app's space navy */
  --hull: #1f2d48;      /* surfaces */
  --hull-2: #283a5a;    /* hover, table head, chips */
  --seam: #33476a;      /* lines */
  --line: #2b3d5e;      /* inner dividers */
  --grid: #5aa9ff;      /* accent (each tool page swaps it for its own color) */
  --grid-hover: #84c0ff;
  --grid-dim: rgba(90, 169, 255, 0.28);
  --grid-soft: rgba(90, 169, 255, 0.14);
  --on-accent: #0b1424; /* text on a bright accent */
  --signal: #ffbe55;
  --signal-soft: rgba(255, 190, 85, 0.15);
  --go: #3ddc97;
  --go-soft: rgba(61, 220, 151, 0.14);
  --danger: #ff6b6b;
  --text: #eef3fa;
  --muted: #a9b8cf;
  --faint: #8193ad;
  --space: #0b1424;
  --display: "Saira", "Barlow", system-ui, sans-serif;
  --body: "Barlow", system-ui, -apple-system, "Segoe UI", sans-serif;
  --r-sm: 8px;
  --r-md: 14px;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.2), 0 6px 20px rgba(0, 0, 0, 0.18);
  --max: 1320px;
  color-scheme: dark;
}

/* One color per tool. Pages inherit it through <main data-tool>, the header band too. */
[data-tool="ships"], .tc-ships { --grid: #5aa9ff; --grid-hover: #84c0ff; --grid-soft: rgba(90,169,255,.15); --grid-dim: rgba(90,169,255,.3); }
[data-tool="loadout"], .tc-loadout { --grid: #818cf8; --grid-hover: #a5adfb; --grid-soft: rgba(129,140,248,.16); --grid-dim: rgba(129,140,248,.3); }
[data-tool="compare"], .tc-compare { --grid: #a78bfa; --grid-hover: #c4b1fc; --grid-soft: rgba(167,139,250,.16); --grid-dim: rgba(167,139,250,.3); }
[data-tool="trade"], .tc-trade { --grid: #3ddc97; --grid-hover: #6fe8b4; --grid-soft: rgba(61,220,151,.15); --grid-dim: rgba(61,220,151,.3); }
[data-tool="mining"], .tc-mining { --grid: #ffb547; --grid-hover: #ffca7a; --grid-soft: rgba(255,181,71,.15); --grid-dim: rgba(255,181,71,.3); }
[data-tool="refinery"], .tc-refinery { --grid: #ff8a5c; --grid-hover: #ffa984; --grid-soft: rgba(255,138,92,.15); --grid-dim: rgba(255,138,92,.3); }
[data-tool="wikelo"], .tc-wikelo { --grid: #f472b6; --grid-hover: #f89cca; --grid-soft: rgba(244,114,182,.15); --grid-dim: rgba(244,114,182,.3); }
[data-tool="missions"], .tc-missions { --grid: #2dd4bf; --grid-hover: #63e2d2; --grid-soft: rgba(45,212,191,.15); --grid-dim: rgba(45,212,191,.3); }
[data-tool="hangar"], .tc-hangar { --grid: #67e8f9; --grid-hover: #98f0fb; --grid-soft: rgba(103,232,249,.14); --grid-dim: rgba(103,232,249,.3); }

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--void);
  color: var(--text);
  font: 400 16.5px/1.6 var(--body);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
img { max-width: 100%; }
a { color: var(--grid); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--grid-hover); }
:focus-visible { outline: 2px solid var(--grid); outline-offset: 2px; border-radius: 4px; }
.sr, .skip:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.skip:focus { position: fixed; top: 8px; left: 8px; z-index: 50; background: var(--hull); padding: 8px 12px; }
main { flex: 1; outline: none; }

h1, h2, h3 { font-family: var(--display); font-weight: 650; line-height: 1.1; margin: 0; color: var(--text); }
h1 { font-size: clamp(2.1rem, 4.4vw, 3.3rem); font-stretch: 110%; letter-spacing: -0.01em; }
h2 { font-size: clamp(1.4rem, 2.4vw, 1.8rem); font-stretch: 106%; }
h3 { font-size: 1.12rem; font-stretch: 104%; }
p { margin: 0; }
code { font-size: 0.92em; background: var(--hull-2); padding: 1px 5px; border-radius: 4px; }
.num { font-variant-numeric: tabular-nums; }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: rgba(23, 34, 56, 0.86);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--seam);
}
.topbar-inner { max-width: var(--max); margin: 0 auto; padding: 10px 20px; display: flex; align-items: center; gap: 18px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font: 650 1.15rem var(--display); font-stretch: 112%; white-space: nowrap; }
.brand:hover { color: var(--text); }
.brand img { display: block; background: var(--space); border-radius: 9px; padding: 3px; border: 1px solid var(--seam); }
.nav { display: flex; align-items: center; gap: 2px; margin-left: auto; flex-wrap: wrap; justify-content: flex-end; }
.nav a { color: var(--muted); text-decoration: none; font-weight: 500; padding: 7px 9px; border-radius: 999px; font-size: 0.97rem; white-space: nowrap; }
.nav a:hover { color: var(--text); background: var(--hull-2); }
.nav a[aria-current="page"] { color: var(--grid); background: var(--grid-soft); }
.nav .nav-cta { color: var(--on-accent); background: var(--grid); font-weight: 600; margin-left: 8px; padding: 7px 16px; }
.nav .nav-cta:hover, .nav .nav-cta[aria-current="page"] { color: var(--on-accent); background: var(--grid-hover); }
.soon { font-size: 0.72rem; font-weight: 600; color: var(--signal); background: var(--signal-soft); border-radius: 999px; padding: 1px 7px; margin-left: 4px; vertical-align: 1px; }
.linkbtn { all: unset; color: var(--grid); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.linkbtn:focus-visible { outline: 2px solid var(--grid); }
.menu-btn { display: none; margin-left: auto; background: var(--hull); border: 1px solid var(--seam); border-radius: var(--r-sm); width: 44px; height: 40px; cursor: pointer; }
.bars, .bars::before, .bars::after { display: block; width: 18px; height: 2px; background: var(--text); margin: 0 auto; position: relative; content: ""; }
.bars::before { position: absolute; top: -6px; }
.bars::after { position: absolute; top: 6px; }
@media (max-width: 1220px) {
  .menu-btn { display: block; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch; background: var(--hull); border-bottom: 1px solid var(--seam); padding: 10px 16px 18px; gap: 2px; box-shadow: var(--shadow); }
  .nav.open { display: flex; }
  .nav a { padding: 12px 14px; border-radius: var(--r-sm); }
  .nav .nav-cta { margin: 10px 0 0; text-align: center; }
}

/* ---------- page header band ---------- */
.page-band {
  color: #e6eef6;
  background: radial-gradient(50% 140% at 0% 0%, var(--grid-dim), transparent 70%), linear-gradient(90deg, rgba(11,20,36,0.94) 35%, rgba(11,20,36,0.6)), url("/img/space.jpg") right 30% / cover no-repeat, var(--space);
  border-bottom: 2px solid var(--grid);
}
.page-band-inner { max-width: var(--max); margin: 0 auto; padding: 36px 20px 34px; display: flex; gap: 20px; align-items: flex-start; }
.page-band h1 { color: #fff; font-size: clamp(1.9rem, 3.6vw, 2.7rem); }
.page-band p { color: #a9bccd; margin-top: 10px; font-size: 1.06rem; max-width: 70ch; }
.page-band .crumb { color: var(--grid); margin-bottom: 10px; display: inline-block; }
.page-band .crumb:hover { color: #fff; }
.band-ico { flex: none; width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; color: var(--on-accent); background: var(--grid); box-shadow: 0 0 28px var(--grid-dim); margin-top: 2px; }
.band-ico svg { width: 28px; height: 28px; }
.page-band + .page { padding-top: 28px; }
@media (max-width: 640px) { .band-ico { display: none; } .page-band-inner { padding: 26px 20px; } }

/* ---------- category colors ---------- */
.c-ships { --c: #5aa9ff; --cb: rgba(90,169,255,.16); }
.c-weapons { --c: #ff7a7a; --cb: rgba(255,122,122,.16); }
.c-armor { --c: #a78bfa; --cb: rgba(167,139,250,.18); }
.c-currencies { --c: #ffbe55; --cb: rgba(255,190,85,.16); }
.c-other { --c: #a9b8cf; --cb: rgba(169,184,207,.14); }
.r-volatile { --c: #ff7a7a; --cb: rgba(255,122,122,.16); }
.r-gem { --c: #f472b6; --cb: rgba(244,114,182,.16); }
.r-legendary { --c: #ffbe55; --cb: rgba(255,190,85,.16); }
.r-epic { --c: #a78bfa; --cb: rgba(167,139,250,.18); }
.r-rare { --c: #5aa9ff; --cb: rgba(90,169,255,.16); }
.r-uncommon { --c: #3ddc97; --cb: rgba(61,220,151,.15); }
.r-common { --c: #a9b8cf; --cb: rgba(169,184,207,.14); }
.badge { display: inline-block; font-size: 0.8rem; font-weight: 700; color: var(--c, var(--muted)); background: var(--cb, var(--hull-2)); border-radius: 999px; padding: 2px 10px; }

/* ---------- layout ---------- */
.page { max-width: var(--max); margin: 0 auto; padding: 44px 20px 80px; }
.page-head { margin-bottom: 28px; max-width: 760px; }
.page-head p { color: var(--muted); margin-top: 10px; font-size: 1.08rem; }
.source { color: var(--faint); font-size: 0.87rem; margin-top: 10px; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 24px; align-items: start; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } }
.panel { background: var(--hull); border: 1px solid var(--seam); border-radius: var(--r-md); padding: 22px; box-shadow: var(--shadow); }
.panel + .panel { margin-top: 16px; }
.split > .panel + .panel { margin-top: 0; }
.panel h3 { margin-bottom: 10px; }
.muted { color: var(--muted); }
.stack > * + * { margin-top: 12px; }

/* ---------- controls ---------- */
.controls { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; margin-bottom: 18px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field label, .label { font-size: 0.88rem; color: var(--muted); font-weight: 600; }
input[type="search"], input[type="text"], input[type="number"], input[type="password"], select {
  background: #1a2740; color: var(--text); border: 1px solid #3d5379;
  border-radius: var(--r-sm); padding: 10px 12px; font: inherit; min-width: 0; min-height: 44px;
}
input::placeholder { color: #7f91ab; }
input:focus, select:focus { border-color: var(--grid); outline: none; box-shadow: 0 0 0 4px var(--grid-dim); }
input[type="search"] { min-width: min(340px, 100%); }
.check { display: flex; gap: 8px; align-items: center; color: var(--muted); font-size: 0.97rem; min-height: 44px; }
.check input { width: 18px; height: 18px; accent-color: var(--grid); }
.btn {
  display: inline-flex; align-items: center; gap: 8px; justify-content: center;
  background: var(--grid); color: var(--on-accent); border: 1px solid transparent; border-radius: 999px;
  padding: 10px 20px; min-height: 44px; font: 600 1rem var(--body); cursor: pointer; text-decoration: none;
}
.btn:hover { background: var(--grid-hover); color: var(--on-accent); }
.btn.ghost { background: transparent; color: var(--text); border-color: #4a5f86; }
.btn.ghost:hover { border-color: var(--grid); color: var(--grid); background: var(--grid-soft); }
.btn.soonbtn, .btn.soonbtn:hover { background: var(--hull-2); color: var(--muted); border-color: transparent; }
.btn:disabled { opacity: 0.55; cursor: default; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { background: var(--hull); color: var(--muted); border: 1px solid #3d5379; border-radius: 999px; padding: 7px 14px; min-height: 38px; font: 600 0.94rem var(--body); cursor: pointer; }
.chip:hover { border-color: var(--grid); color: var(--grid); }
.chip[aria-pressed="true"] { color: var(--on-accent); background: var(--grid); border-color: var(--grid); }
.sync-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--seam); border-radius: var(--r-md); background: var(--hull); box-shadow: var(--shadow); }
table { width: 100%; border-collapse: collapse; font-size: 0.97rem; }
th, td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-size: 0.86rem; background: var(--hull-2); position: sticky; top: 0; white-space: nowrap; }
th button { all: unset; cursor: pointer; }
th button::after { content: " ↕"; color: #6b7f9e; font-size: 0.8em; }
th[aria-sort="ascending"] button::after { content: " ↑"; color: var(--grid); }
th[aria-sort="descending"] button::after { content: " ↓"; color: var(--grid); }
th button:focus-visible { outline: 2px solid var(--grid); }
tr:last-child td { border-bottom: 0; }
tbody tr.rowlink { cursor: pointer; }
tbody tr.rowlink:hover { background: var(--grid-soft); }
td.r, th.r { text-align: right; font-variant-numeric: tabular-nums; }
td a { font-weight: 600; text-decoration: none; }
.best { color: var(--go); font-weight: 700; }
.count { color: var(--faint); font-size: 0.92rem; margin: 0 0 10px; }

/* ---------- states ---------- */
.state { padding: 32px; text-align: center; color: var(--muted); }
.state strong { display: block; color: var(--text); margin-bottom: 4px; }
.loading::before { content: ""; display: inline-block; width: 14px; height: 14px; margin-right: 8px; vertical-align: -2px; border: 2px solid var(--seam); border-top-color: var(--grid); border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.notice { background: var(--signal-soft); color: var(--signal); padding: 10px 16px; border-radius: var(--r-sm); font-size: 0.97rem; }

/* ---------- home ---------- */
.hero { background: radial-gradient(55% 90% at 0% 0%, rgba(122, 92, 255, 0.28), transparent 65%), radial-gradient(45% 80% at 100% 10%, rgba(45, 212, 191, 0.16), transparent 65%), radial-gradient(40% 60% at 60% 100%, rgba(244, 114, 182, 0.12), transparent 70%), var(--void); border-bottom: 1px solid var(--seam); }
.hero h1 { background: linear-gradient(100deg, #ffffff 30%, #9fd0ff 70%, #c4b1fc); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-inner { max-width: var(--max); margin: 0 auto; padding: 64px 20px 64px; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: 48px; align-items: center; }
.hero h1 { max-width: 14ch; }
.hero .lede { color: var(--muted); font-size: 1.18rem; margin: 18px 0 28px; max-width: 46ch; }
.hero .actions { display: flex; gap: 10px; flex-wrap: wrap; }
@media (max-width: 860px) { .hero-inner { grid-template-columns: 1fr; padding: 40px 20px 48px; gap: 32px; } }

/* The viewport: the one dark, spacey surface, framing the live hangar dial. */
.viewport {
  display: block; text-decoration: none; color: #dde8f1; text-align: center;
  background: radial-gradient(120% 90% at 70% 10%, rgba(23,105,194,0.25), transparent 60%), url("/img/space.jpg") center / cover, var(--space);
  border-radius: 22px; padding: 26px 26px 20px; box-shadow: 0 18px 48px rgba(0, 0, 0, 0.4); border: 1px solid rgba(255,255,255,0.08);
}
.viewport:hover { color: #dde8f1; }
.viewport .dial-wrap { width: min(330px, 100%); margin: 0 auto; }
.viewport .dial-note { color: #9fb4c7; }
.viewport .dial-cta { display: inline-block; margin-top: 12px; color: #9fd0ff; font-weight: 600; }
.dial { width: 100%; height: auto; display: block; }
.dial-track { stroke: rgba(255,255,255,0.1); }
.dial-open { stroke: #3ddc97; }
.dial-closed { stroke: rgba(255,255,255,0.14); }
.dial-now { fill: #ffffff; }
.dial-label { font: 500 13px var(--body); fill: #9fb4c7; }
.dial-state { font: 650 22px var(--display); font-stretch: 115%; }
.dial-time { font: 600 40px var(--display); font-variant-numeric: tabular-nums; fill: #ffffff; }
.dial-open-text { fill: #3ddc97; }
.dial-closed-text { fill: #f2b544; }
.dial-note { font-size: 0.9rem; margin-top: 6px; }

.tools { max-width: var(--max); margin: 0 auto; padding: 56px 20px 16px; }
.tools h2 { margin-bottom: 6px; }
.tools > p { color: var(--muted); margin-bottom: 22px; }
.tool-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(255px, 1fr)); gap: 14px; }
.tool-list a { display: grid; grid-template-columns: 40px 1fr; gap: 14px; height: 100%; padding: 18px; background: var(--hull); border: 1px solid var(--seam); border-radius: var(--r-md); color: var(--text); text-decoration: none; box-shadow: var(--shadow); transition: border-color .15s, transform .15s; }
.tool-list a:hover { border-color: var(--grid); transform: translateY(-2px); background: linear-gradient(180deg, var(--grid-soft), transparent 70%), var(--hull); }
.tool-list a { border-top: 3px solid var(--grid); }
.tool-ico { width: 40px; height: 40px; border-radius: 11px; background: var(--grid-soft); color: var(--grid); display: grid; place-items: center; }
.tool-ico svg { width: 22px; height: 22px; }
.tool-list strong { display: block; font: 600 1.06rem var(--display); font-stretch: 104%; color: var(--text); margin-bottom: 3px; }
.tool-list span { color: var(--muted); font-size: 0.95rem; line-height: 1.5; }

.band { max-width: var(--max); margin: 0 auto; padding: 32px 20px 80px; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.band .panel { margin: 0; }
.band .panel p { color: var(--muted); margin: 8px 0 18px; }
@media (max-width: 760px) { .band { grid-template-columns: 1fr; } }

/* ---------- ship detail / compare ---------- */
.kv { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px 20px; }
.kv div span { display: block; color: var(--muted); font-size: 0.86rem; }
.kv div strong { font: 600 1.18rem var(--display); font-variant-numeric: tabular-nums; }
.crumb { display: inline-block; margin-bottom: 14px; text-decoration: none; color: var(--muted); font-weight: 500; }
.crumb::before { content: "‹ "; }
.crumb:hover { color: var(--grid); }
.picks { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; margin-bottom: 20px; }
.section-row th[colspan] { background: var(--grid-soft); color: var(--grid); font-family: var(--display); font-size: 0.95rem; }

/* ---------- lists ---------- */
.list { list-style: none; margin: 0; padding: 0; }
.list > li { padding: 16px 0; border-bottom: 1px solid var(--line); }
.list > li:first-child { padding-top: 0; }
.list > li:last-child { border-bottom: 0; padding-bottom: 0; }
.item-head { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; flex-wrap: wrap; }
.tag { display: inline-block; font-size: 0.8rem; font-weight: 600; color: var(--muted); background: var(--hull-2); border-radius: 999px; padding: 2px 10px; margin: 0 6px 4px 0; }
.reqs { margin: 8px 0 0; padding-left: 18px; color: var(--muted); columns: 2 240px; }
.reqs li { break-inside: avoid; }
.reward { margin-top: 6px; }
.reward b { color: var(--go); font-weight: 600; }
.bar { height: 6px; border-radius: 3px; background: var(--hull-2); overflow: hidden; margin-top: 6px; }
.bar i { display: block; height: 100%; background: var(--grid); border-radius: 3px; }

/* ---------- wikelo cards ---------- */
.cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.card { background: var(--hull); border: 1px solid var(--seam); border-radius: var(--r-md); padding: 18px; box-shadow: var(--shadow); border-top: 3px solid var(--c, var(--seam)); display: flex; flex-direction: column; gap: 10px; }
.card h3 { font-size: 1.05rem; }
.card .gets { font-weight: 600; color: var(--text); }
.card .gets small { display: block; font-weight: 500; color: var(--muted); font-size: 0.82rem; margin-bottom: 2px; }
.pills { display: flex; flex-wrap: wrap; gap: 6px; }
.pill { font-size: 0.85rem; background: var(--hull-2); color: var(--text); border-radius: 8px; padding: 3px 9px; }
.pill b { color: var(--grid); font-weight: 700; margin-right: 3px; }
.pill.hit { background: var(--grid-soft); outline: 1px solid var(--grid); }

/* ---------- mining groups ---------- */
.spot-group { padding: 14px 0; border-bottom: 1px solid var(--line); }
.spot-group:first-of-type { padding-top: 4px; }
.spot-group:last-child { border-bottom: 0; }
.spot-group .item-head strong { font: 650 1.3rem var(--display); color: var(--text); }
.spot-group .pills { margin-top: 10px; }

/* ---------- app page ---------- */
.app-hero { display: grid; grid-template-columns: 160px 1fr; gap: 28px; align-items: center; }
.app-hero img { background: var(--space); border-radius: 36px; padding: 10px; box-shadow: 0 12px 32px rgba(7,17,29,0.25); }
@media (max-width: 640px) { .app-hero { grid-template-columns: 1fr; } .app-hero img { width: 120px; height: 120px; } }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--seam); background: var(--space); }
.footer-inner { max-width: var(--max); margin: 0 auto; padding: 30px 20px; display: flex; gap: 32px; justify-content: space-between; flex-wrap: wrap; font-size: 0.94rem; }
.footer p { color: var(--muted); max-width: 60ch; margin-top: 4px; }
.footer ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 20px; flex-wrap: wrap; }
.footer a { text-decoration: none; font-weight: 500; }

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

/* the answer card on a tool page */
#best { border-color: var(--grid); background: linear-gradient(160deg, var(--grid-soft), transparent 60%), var(--hull); }

/* hangar door lights */
.lights { display: flex; justify-content: center; gap: 8px; margin: 14px 0 4px; }
.lights i { width: 40px; height: 14px; border-radius: 4px; background: rgba(32, 46, 60, 0.92); border: 1px solid rgba(121, 150, 171, 0.42); }
.lights i.on { background: #1fd89a; border-color: #54eeb4; box-shadow: 0 0 12px rgba(31, 216, 154, 0.8); }
.lights-label { font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; color: #9fb4c7; font-weight: 600; }

/* ---------- ship loadouts ---------- */
.lo-bar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 20px; }
.lo-bar .btn.icon { width: 44px; padding: 0; font-size: 1.4rem; line-height: 1; }
.lo-pick { flex: 0 1 340px; }
.lo-pick input { width: 100%; font: 600 1.05rem var(--body); }
.lo-spacer { flex: 1; }
.lo-tiles { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; margin-bottom: 20px; }
@media (max-width: 1100px) { .lo-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 560px) { .lo-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.lo-tile { background: linear-gradient(160deg, var(--tc-soft), transparent 70%), var(--hull); border: 1px solid var(--seam); border-left: 3px solid var(--tc); border-radius: var(--r-md); padding: 14px 16px; }
.lo-tile span { display: block; color: var(--muted); font-size: 0.82rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }
.lo-tile strong { display: block; font: 650 1.7rem var(--display); font-stretch: 108%; color: var(--tc); margin-top: 2px; }
.lo-tile strong small { font-size: 0.85rem; color: var(--muted); margin-left: 3px; font-weight: 600; }
.lo-tile em { display: block; font-style: normal; color: var(--muted); font-size: 0.86rem; }
.tone-red { --tc: #ff7a7a; --tc-soft: rgba(255,122,122,.12); }
.tone-orange { --tc: #ffa25c; --tc-soft: rgba(255,162,92,.12); }
.tone-pink { --tc: #f472b6; --tc-soft: rgba(244,114,182,.12); }
.tone-blue { --tc: #5aa9ff; --tc-soft: rgba(90,169,255,.12); }
.tone-green { --tc: #3ddc97; --tc-soft: rgba(61,220,151,.12); }
.tone-violet { --tc: #a78bfa; --tc-soft: rgba(167,139,250,.12); }
.lo-grid { display: grid; grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.1fr) minmax(0, 1fr); gap: 14px; align-items: start; }
@media (max-width: 1100px) { .lo-grid { grid-template-columns: 1fr 1fr; } .lo-grid > .lo-side:first-child { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; } }
@media (max-width: 760px) { .lo-grid, .lo-grid > .lo-side:first-child { grid-template-columns: 1fr; } }
.lo-side { display: grid; gap: 16px; }
.lo-group { background: var(--hull); border: 1px solid var(--seam); border-radius: var(--r-md); padding: 18px; border-top: 3px solid var(--kc, var(--seam)); }
.lo-group h3 { margin-bottom: 12px; color: var(--kc, var(--text)); }
.lo-group h3 .muted { font: 500 0.92rem var(--body); }
.k-gun { --kc: #ff7a7a; } .k-shield { --kc: #5aa9ff; } .k-power { --kc: #ffbe55; } .k-cool { --kc: #67e8f9; }
.k-qd { --kc: #a78bfa; } .k-missile { --kc: #f472b6; } .k-radar { --kc: #3ddc97; } .k-hull { --kc: #a9b8cf; }
.lo-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.lo-slot { background: #1a2740; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.lo-slot.swapped { border-color: var(--signal); }
.lo-slot-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; font-size: 0.92rem; }
.lo-where { flex: 1; min-width: 0; font-weight: 600; }
.sz { flex: none; font: 700 0.8rem var(--display); color: var(--on-accent); background: var(--kc, var(--grid)); border-radius: 6px; padding: 2px 7px; }
.lo-slot select { width: 100%; min-height: 40px; font-weight: 600; }
.lo-stats { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 8px; color: var(--muted); font-size: 0.88rem; }
.lo-stats b { color: var(--text); font-weight: 700; }
.dmg { font-weight: 700; border-radius: 999px; padding: 0 8px; }
.t-phys { color: #ffbe55; background: rgba(255,190,85,.14); }
.t-energy { color: #67e8f9; background: rgba(103,232,249,.14); }
.t-dist { color: #a78bfa; background: rgba(167,139,250,.16); }

/* ---------- wide hangar card ---------- */
.viewport.wide { text-align: left; padding: 22px 26px; }
.hw { display: grid; grid-template-columns: minmax(170px, 230px) 1fr; gap: 26px; align-items: center; }
.viewport.big .hw { grid-template-columns: minmax(200px, 300px) 1fr; }
.hw-dial .dial { width: 100%; }
.hw-eyebrow { font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase; color: #9fb4c7; font-weight: 600; }
.hw-state { font: 650 2rem var(--display); font-stretch: 112%; margin-top: 2px; }
.viewport.big .hw-state { font-size: 2.6rem; }
.hw-state.is-open { color: #3ddc97; } .hw-state.is-closed { color: #f2b544; }
.hw-when { color: #dde8f1; font-size: 1.05rem; }
.hw-ready { display: inline-flex; align-items: center; gap: 8px; margin: 8px 0 2px; padding: 6px 12px; border-radius: 999px; background: rgba(61,220,151,.14); border: 1px solid rgba(61,220,151,.45); color: #7ff0bf; font-weight: 650; font-size: .92rem; }
.hw-ready .dot { width: 8px; height: 8px; border-radius: 50%; background: #3ddc97; box-shadow: 0 0 0 0 rgba(61,220,151,.6); animation: hwpulse 1.6s infinite; }
@keyframes hwpulse { 70% { box-shadow: 0 0 0 8px rgba(61,220,151,0); } 100% { box-shadow: 0 0 0 0 rgba(61,220,151,0); } }
@media (prefers-reduced-motion: reduce) { .hw-ready .dot { animation: none; } }
.hw .lights { justify-content: flex-start; margin: 14px 0 4px; }
.hw .lights-label { text-align: left; }
.hw-sync { color: #9fb4c7; font-size: 0.9rem; margin-top: 8px; }
.viewport.wide .dial-cta { margin-top: 14px; }
@media (max-width: 520px) { .hw, .viewport.big .hw { grid-template-columns: 1fr; text-align: center; } .hw-dial { max-width: 240px; margin: 0 auto; } .hw .lights { justify-content: center; } .hw .lights-label { text-align: center; } }

/* ---------- hangar page ---------- */
.hg-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 16px; align-items: start; }
.hg-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.hg-grid .panel + .panel { margin-top: 0; }
@media (max-width: 960px) { .hg-grid, .hg-grid.two { grid-template-columns: 1fr; } }
.ruin { border-top: 3px solid #f472b6; }
.ruin-state { font: 650 1.7rem var(--display); color: #f2b544; margin-bottom: 4px; }
.ruin-state.is-open { color: #3ddc97; }
.ruin .bar i { background: #f472b6; }
.ruin-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.ruin-head h3 { margin: 0; }
.ruin-reg select { min-height: 36px; padding: 4px 10px; }
.ruin-others { list-style: none; margin: 14px 0 0; padding: 10px 0 0; border-top: 1px solid var(--line); display: grid; gap: 6px; font-size: .9rem; }
.ruin-others li { display: grid; grid-template-columns: 74px 1fr auto; gap: 8px; align-items: center; }
.ruin-others li > span:first-child { font-weight: 700; }
.ruin-others .ok { color: #3ddc97; }
.flow { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.flow li { display: flex; align-items: center; gap: 8px; background: var(--hull-2); border-radius: 999px; padding: 6px 14px 6px 6px; font-weight: 600; }
.flow li + li::before { content: "›"; color: var(--faint); margin: 0 6px 0 -2px; }
.flow span { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--grid); color: var(--on-accent); font: 700 0.85rem var(--display); }
.keys { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.key { all: unset; cursor: pointer; display: grid; gap: 2px; background: #1a2740; border: 1px solid var(--seam); border-radius: 12px; padding: 14px; text-align: center; }
.key:focus-visible { outline: 2px solid var(--grid); }
.key strong { font: 650 1rem var(--display); color: #ff7a7a; }
.key span { font: 650 1.6rem var(--display); color: #3ddc97; }
.key.cooling span { color: #f2b544; }
.key em { font-style: normal; color: var(--muted); font-size: 0.85rem; }
.boards { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; }
.board { all: unset; cursor: pointer; box-sizing: border-box; width: 100%; display: flex; gap: 12px; align-items: center; background: #1a2740; border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; }
.board:focus-visible { outline: 2px solid var(--grid); }
.board .bn { width: 30px; height: 30px; flex: none; border-radius: 8px; display: grid; place-items: center; background: var(--hull-2); font: 700 0.95rem var(--display); }
.board.done { border-color: rgba(61,220,151,.5); }
.board.done .bn { background: #3ddc97; color: var(--on-accent); }
.board em { display: block; font-style: normal; color: var(--muted); font-size: 0.86rem; }

/* ---------- trade filters ---------- */
.trade-form { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 20px; align-items: start; }
.trade-form fieldset { margin: 0; border: 1px solid var(--seam); border-radius: var(--r-md); background: var(--hull); padding: 14px 16px 16px; display: grid; gap: 12px; min-width: 0; }
.trade-form legend { font: 650 0.95rem var(--display); color: var(--grid); padding: 0 6px; margin-left: -6px; }
.trade-form .field input, .trade-form .field select { width: 100%; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.route-legs { position: relative; }
.leg { display: grid; grid-template-columns: 14px 1fr; gap: 10px; align-items: center; }
.dot { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--grid); }
.dot.from { background: var(--grid); }
.leg + .leg .dot { position: relative; }
.leg + .leg .dot::before { content: ""; position: absolute; left: 3px; bottom: 12px; height: 46px; border-left: 2px dotted var(--seam); }
.trade-actions { grid-column: 1 / -1; display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
@media (max-width: 1000px) { .trade-form { grid-template-columns: 1fr; } }
@media (max-width: 420px) { .row2 { grid-template-columns: 1fr; } }

.lo-pick { position: relative; flex: 1 1 360px; max-width: 520px; }
.lo-current { margin-top: 6px; font-size: 0.95rem; }
.sugg { position: absolute; z-index: 30; top: 48px; left: 0; right: 0; list-style: none; margin: 0; padding: 6px; background: #1a2740; border: 1px solid var(--seam); border-radius: 12px; box-shadow: 0 16px 40px rgba(0,0,0,.45); max-height: 420px; overflow: auto; }
.sugg li { display: flex; flex-direction: column; padding: 8px 10px; border-radius: 8px; cursor: pointer; }
.sugg li span { color: var(--muted); font-size: 0.86rem; }
.sugg li[aria-selected="true"], .sugg li:hover { background: var(--grid-soft); }
.sugg li.none { color: var(--muted); cursor: default; }
.lo-group { padding: 14px; }
.lo-group h3 { margin-bottom: 10px; font-size: 1.02rem; }
.lo-list { gap: 8px; }
.lo-slot { padding: 8px 10px; }
.lo-where { font-size: 0.8rem; color: var(--muted); margin-bottom: 4px; }
.lo-row { display: flex; gap: 8px; align-items: center; min-width: 0; }
.lo-row select { flex: 1; min-width: 0; min-height: 36px; padding: 6px 10px; font-size: 0.95rem; }
.lo-stats { margin-top: 6px; font-size: 0.84rem; gap: 2px 12px; }
.pgraph { display: flex; gap: 8px; align-items: flex-end; margin: 4px 0 14px; overflow-x: auto; padding-bottom: 2px; }
.pcol { flex: 1 0 44px; display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; }
.pstack { display: flex; flex-direction: column; gap: 3px; width: 100%; max-width: 46px; }
.pstack i { height: 12px; border-radius: 3px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.08); }
.pstack i.on { border-color: rgba(0,0,0,.25); }
.pcol.off .pstack i.on { background: repeating-linear-gradient(45deg, #4a5f86 0 4px, #33476a 4px 8px); }
.pcol b { font-size: 0.85rem; }
.pcol span { font-size: 0.72rem; color: var(--muted); line-height: 1.15; }
.meter { margin-top: 8px; font-size: 0.88rem; }
.meter .over { color: #ff7a7a; }
.meter-bar { height: 8px; background: var(--hull-2); border-radius: 4px; overflow: hidden; margin-top: 4px; }
.meter-bar i { display: block; height: 100%; }
.lo-grid > * { min-width: 0; }
.pgraph { gap: 5px; }
.pcol { flex: 1 1 0; min-width: 0; }
.pcol span { font-size: 0.68rem; overflow-wrap: anywhere; }
.meter .item-head { flex-wrap: nowrap; }
.meter .item-head span:last-child { white-space: nowrap; }
.pcol span { overflow-wrap: normal; word-break: normal; hyphens: auto; }
@media (max-width: 640px) {
  .lo-bar { display: grid; grid-template-columns: 44px 1fr 44px; align-items: start; }
  .lo-pick { grid-column: 2; grid-row: 1; max-width: none; }
  .lo-bar > a.btn:first-child { grid-column: 1; grid-row: 1; }
  .lo-bar > a.btn.icon:nth-of-type(2) { grid-column: 3; grid-row: 1; }
  .lo-spacer { display: none; }
  .lo-bar > button { grid-column: 1 / -1; }
  .pcol span { font-size: 0.6rem; }
}

/* ---------- crews, fleet, news ---------- */
.crew { background: var(--hull); border: 1px solid var(--seam); border-top: 3px solid var(--grid); border-radius: var(--r-md); padding: 20px; margin-bottom: 18px; }
.crew-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.crew-desc { margin-top: 10px; color: var(--muted); }
.crew-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 20px; margin-top: 16px; }
.crew-grid h3 { margin-bottom: 10px; }
@media (max-width: 800px) { .crew-grid { grid-template-columns: 1fr; } }
.ops { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.op { background: #1a2740; border: 1px solid var(--line); border-left: 3px solid var(--grid); border-radius: 10px; padding: 12px 14px; }
.op h4 { margin: 6px 0 2px; font: 650 1.05rem var(--display); }
.op-notes { margin-top: 6px; white-space: pre-line; }
.op-seats { margin-top: 8px; font-size: 0.9rem; color: var(--muted); }
.op-seats b { color: var(--text); }
.members > li { padding: 10px 0; }
.fleet { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.fleet .btn { min-height: 36px; padding: 6px 14px; font-size: 0.92rem; }
.news-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 16px; align-items: start; }
.news-grid > div > .panel + .panel { margin-top: 16px; }
@media (max-width: 900px) { .news-grid { grid-template-columns: 1fr; } }
.srv-sum { font: 650 1.5rem var(--display); margin-bottom: 8px; }
.srv-sum.ok, .pill-st.ok { color: #3ddc97; } .srv-sum.warn, .pill-st.warn { color: #ffbe55; } .srv-sum.down, .pill-st.down { color: #ff7a7a; }
.srv { list-style: none; margin: 0; padding: 0; }
.srv li { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--line); }
.srv li:last-child { border-bottom: 0; }
.pill-st { font-weight: 700; font-size: 0.9rem; }
.upd { margin: 6px 0 0; padding-left: 18px; color: var(--muted); }
.upd b { color: var(--text); }
.comm { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.comm a { display: grid; grid-template-columns: 112px 1fr; gap: 12px; align-items: center; text-decoration: none; color: var(--text); background: #1a2740; border: 1px solid var(--line); border-radius: 10px; padding: 8px; }
.comm a:hover { border-color: var(--grid); color: var(--text); }
.comm img, .comm .noimg { width: 112px; height: 63px; object-fit: cover; border-radius: 6px; background: var(--hull-2); display: block; }
.comm strong { display: block; font-weight: 600; line-height: 1.35; }
.comm em { display: block; font-style: normal; color: var(--muted); font-size: 0.84rem; margin-top: 2px; text-transform: capitalize; }
[data-tool="news"], .tc-news { --grid: #ffbe55; --grid-hover: #ffd189; --grid-soft: rgba(255,190,85,.15); --grid-dim: rgba(255,190,85,.3); }
[data-tool="crews"], [data-tool="fleet"], .tc-crews { --grid: #2dd4bf; --grid-hover: #63e2d2; --grid-soft: rgba(45,212,191,.15); --grid-dim: rgba(45,212,191,.3); }

.lo-pickbar { display: grid; grid-template-columns: minmax(200px, 1fr) minmax(0, 2.3fr) auto; gap: 16px; align-items: end; background: var(--hull); border: 1px solid var(--seam); border-left: 4px solid var(--grid); border-radius: var(--r-md); padding: 14px 16px; margin-bottom: 18px; }
.lo-now { display: flex; flex-direction: column; min-width: 0; }
.lo-now span:first-child { font-size: 0.78rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 600; }
.lo-now strong { font: 650 1.5rem var(--display); font-stretch: 108%; color: var(--grid); line-height: 1.15; }
.lo-now span:last-child { font-size: 0.9rem; }
.lo-selects { display: grid; grid-template-columns: 1fr 1fr 1.2fr; gap: 10px; }
.lo-selects select, .lo-selects input { width: 100%; }
.lo-selects .lo-pick { max-width: none; flex: none; }
.lo-selects .sugg { top: 74px; }
.lo-actions { display: flex; gap: 8px; }
.lo-actions .btn.icon { width: 44px; padding: 0; font-size: 1.4rem; }
@media (max-width: 1100px) { .lo-pickbar { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .lo-selects { grid-template-columns: 1fr 1fr; } .lo-selects .lo-pick { grid-column: 1 / -1; } .lo-actions { flex-wrap: wrap; } .lo-actions .btn:not(.icon) { flex: 1; } }

/* ---------- grouped menu ---------- */
.nav-top { color: var(--muted); text-decoration: none; font: 500 0.97rem var(--body); padding: 7px 10px; border-radius: 999px; background: none; border: 0; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.nav-top:hover, .nav-group.open > .nav-top { color: var(--text); background: var(--hull-2); }
.nav-group.current > .nav-top, .nav-top[aria-current="page"] { color: var(--grid); background: var(--grid-soft); }
.caret { width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-2px); opacity: .7; }
.nav-group { position: relative; }
.nav-menu { display: none; position: absolute; top: calc(100% + 8px); left: 50%; transform: translateX(-50%); width: 360px; background: #1a2740; border: 1px solid var(--seam); border-radius: 14px; box-shadow: 0 20px 50px rgba(0,0,0,.5); padding: 8px; z-index: 40; }
.nav-group.open .nav-menu { display: grid; gap: 2px; }
.nav .nav-menu a { display: grid; grid-template-columns: 34px 1fr; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 10px; color: var(--text); white-space: normal; font-size: 1rem; }
.nav .nav-menu a:hover, .nav .nav-menu a:focus-visible { background: var(--hull-2); }
.nav .nav-menu a[aria-current="page"] { background: var(--grid-soft); }
.nm-ico { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; background: var(--hull-2); color: var(--grid); }
.nm-ico svg { width: 19px; height: 19px; }
.nav-menu strong { display: block; font-weight: 600; font-size: 0.95rem; }
.nav-menu em { display: block; font-style: normal; color: var(--muted); font-size: 0.82rem; line-height: 1.3; }
@media (min-width: 1221px) { .nav { flex-wrap: nowrap; gap: 4px; } }
@media (max-width: 1220px) {
  .nav { max-height: calc(100vh - 70px); overflow-y: auto; }
  .nav-group { display: contents; }
  .nav-group > .nav-top { pointer-events: none; color: var(--faint); font-size: 0.78rem; letter-spacing: .08em; text-transform: uppercase; padding: 14px 14px 4px; }
  .nav-group > .nav-top .caret { display: none; }
  .nav-menu { display: grid !important; position: static; transform: none; width: auto; background: none; border: 0; box-shadow: none; padding: 0; gap: 0; }
  .nav .nav-menu a em { display: none; }
  .nav a.nav-top { padding: 12px 14px; }
}
/* tool colors for menu icons and cards */
.tc-builds, .tc-combat, .tc-my-loadouts { --grid: #818cf8; --grid-soft: rgba(129,140,248,.16); --grid-dim: rgba(129,140,248,.3); }
.tc-makers { --grid: #5aa9ff; --grid-soft: rgba(90,169,255,.15); }
.tc-mining-calc, .tc-mining-route { --grid: #ffb547; --grid-soft: rgba(255,181,71,.15); }
.tc-refinery-jobs { --grid: #ff8a5c; --grid-soft: rgba(255,138,92,.15); }
.tc-items, .tc-loot { --grid: #f472b6; --grid-soft: rgba(244,114,182,.15); }
.tc-devtracker { --grid: #ffbe55; --grid-soft: rgba(255,190,85,.15); }
[data-tool="builds"], [data-tool="combat"], [data-tool="my-loadouts"] { --grid: #818cf8; --grid-hover: #a5adfb; --grid-soft: rgba(129,140,248,.16); --grid-dim: rgba(129,140,248,.3); }
[data-tool="makers"] { --grid: #5aa9ff; --grid-hover: #84c0ff; --grid-soft: rgba(90,169,255,.15); --grid-dim: rgba(90,169,255,.3); }
[data-tool="mining-calc"], [data-tool="mining-route"] { --grid: #ffb547; --grid-hover: #ffca7a; --grid-soft: rgba(255,181,71,.15); --grid-dim: rgba(255,181,71,.3); }
[data-tool="refinery-jobs"] { --grid: #ff8a5c; --grid-hover: #ffa984; --grid-soft: rgba(255,138,92,.15); --grid-dim: rgba(255,138,92,.3); }
[data-tool="items"], [data-tool="loot"] { --grid: #f472b6; --grid-hover: #f89cca; --grid-soft: rgba(244,114,182,.15); --grid-dim: rgba(244,114,182,.3); }
[data-tool="devtracker"] { --grid: #ffbe55; --grid-hover: #ffd189; --grid-soft: rgba(255,190,85,.15); --grid-dim: rgba(255,190,85,.3); }

.tool-groups { display: grid; gap: 26px; }
.tool-groups h3 { font-size: 0.85rem; text-transform: uppercase; letter-spacing: .1em; color: var(--faint); margin-bottom: 10px; }
.tool-groups .tool-list { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.tc-missions { --grid: #2dd4bf; --grid-soft: rgba(45,212,191,.15); }
.nav-menu { left: 0; transform: none; }
.nav-group:last-of-type .nav-menu { left: auto; right: 0; }
@media (max-width: 1220px) {
  .nav { flex-wrap: nowrap; }
  .nav-group.current > .nav-top { background: none; color: var(--faint); }
}

.lo-saveform { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; border-top: 1px solid var(--line); padding-top: 12px; }
.lo-saveform label { font-weight: 600; color: var(--muted); font-size: 0.9rem; }
.lo-saveform input { flex: 1 1 260px; max-width: 420px; }
.alert-row { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 12px; }

/* ---------- big screens: use the space ---------- */
:root { --max: min(1560px, 92vw); }
@media (min-width: 1500px) {
  .tool-groups .tool-list { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
  .hero-inner { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}


/* =====================================================================
   Desktop shell: cockpit-style sidebar + slim top bar + dense panels
   ===================================================================== */
:root {
  --void: #121a27; --hull: #182234; --hull-2: #1f2b40; --seam: #2a3850; --line: #223047;
  --side: #0f1622; --side-w: 236px; --max: 1640px;
}
html { font-size: 15px; }
body { display: block; font: 400 14.5px/1.5 var(--body); background: var(--void); }
h1 { font-size: 1.6rem; font-stretch: 112%; letter-spacing: 0; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1rem; }

/* sidebar */
.sidebar { position: fixed; inset: 0 auto 0 0; width: var(--side-w); background: var(--side); border-right: 1px solid var(--line); display: flex; flex-direction: column; z-index: 30; }
.sidebar .brand { padding: 16px 18px 14px; font-size: 1.08rem; border-bottom: 1px solid var(--line); }
.sidebar .brand img { width: 30px; height: 30px; }
.side-nav { flex: 1; overflow-y: auto; padding: 8px 10px 16px; scrollbar-width: thin; scrollbar-color: var(--seam) transparent; }
.side-head { margin: 16px 8px 6px; padding-top: 12px; border-top: 1px solid var(--line); font: 700 0.8rem var(--display); letter-spacing: .1em; text-transform: uppercase; color: var(--signal); }
.side-nav > .side-head:first-of-type { border-top: 0; padding-top: 0; margin-top: 12px; }
.side-link { display: flex; align-items: center; gap: 10px; padding: 5px 8px; border-radius: 7px; color: #c3cfe0; text-decoration: none; font-size: 0.93rem; font-weight: 500; position: relative; }
.side-link .nm-ico { width: 26px; height: 26px; border-radius: 7px; flex: none; background: transparent; color: var(--grid); }
.side-link .nm-ico svg { width: 17px; height: 17px; }
.side-link:hover { background: var(--hull); color: var(--text); }
.side-link[aria-current="page"] { background: var(--grid-soft); color: var(--text); }
.side-link[aria-current="page"]::before { content: ""; position: absolute; left: -10px; top: 6px; bottom: 6px; width: 3px; border-radius: 0 3px 3px 0; background: var(--grid); }
.side-foot { border-top: 1px solid var(--line); padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.side-app { color: var(--muted); text-decoration: none; font-size: 0.88rem; padding: 4px 6px; border-radius: 6px; }
.side-app:hover { color: var(--text); background: var(--hull); }
.tc-home { --grid: #a9b8cf; --grid-soft: rgba(169,184,207,.12); }

/* shell + top bar */
.shell { margin-left: var(--side-w); min-height: 100vh; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 14px; padding: 9px 24px; background: rgba(18, 26, 39, .92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.top-spacer { flex: 1; }
.gsearch { position: relative; width: min(520px, 100%); }
.gsearch input { width: 100%; min-height: 36px; padding: 6px 40px 6px 34px; border-radius: 8px; background: var(--hull) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238193ad' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-4-4'/%3E%3C/svg%3E") 10px 50% / 16px no-repeat; border: 1px solid var(--seam); font-size: 0.93rem; }
.gsearch kbd { position: absolute; right: 9px; top: 50%; transform: translateY(-50%); font: 600 0.75rem var(--body); color: var(--faint); border: 1px solid var(--seam); border-radius: 5px; padding: 0 6px; }
.gsearch .sugg { top: 42px; }
.gsearch .sugg li { display: grid; grid-template-columns: 1fr auto; column-gap: 10px; }
.gsearch .sugg li span { grid-column: 1; }
.gq-alt { grid-row: 1 / span 2; grid-column: 2; align-self: center; font-size: 0.82rem; text-decoration: none; border: 1px solid var(--seam); border-radius: 6px; padding: 2px 8px; }
.topbar .nav-cta { color: var(--on-accent); background: var(--grid); border-radius: 8px; padding: 6px 14px; font-weight: 600; text-decoration: none; font-size: 0.93rem; }
.topbar .nav-cta:hover { background: var(--grid-hover); color: var(--on-accent); }
.menu-btn { display: none; margin: 0; width: 38px; height: 36px; background: var(--hull); border: 1px solid var(--seam); }
main { flex: 1; }

/* compact page header */
.page-band.compact { background: none; border-bottom: 1px solid var(--line); }
.page-band.compact .page-band-inner { max-width: var(--max); margin: 0; padding: 18px 28px 16px; gap: 14px; align-items: center; }
.page-band.compact .band-ico { width: 38px; height: 38px; border-radius: 10px; box-shadow: none; margin: 0; }
.page-band.compact .band-ico svg { width: 21px; height: 21px; }
.page-band.compact h1 { font-size: 1.45rem; color: var(--text); }
.page-band.compact p { margin-top: 2px; font-size: 0.93rem; color: var(--muted); max-width: 110ch; }
.page-band.compact .crumb { margin-bottom: 2px; font-size: 0.85rem; }
.page-band.compact + .page, .page { max-width: var(--max); margin: 0; padding: 18px 28px 48px; }
main > .page:first-child { padding-top: 22px; }

/* denser components */
.panel { padding: 16px; border-radius: 10px; box-shadow: none; }
.panel + .panel { margin-top: 12px; }
.panel h3 { margin-bottom: 8px; }
.split { grid-template-columns: minmax(0, 1fr) 360px; gap: 16px; }
.btn { min-height: 36px; padding: 6px 16px; font-size: 0.93rem; border-radius: 8px; }
.chip { min-height: 32px; padding: 4px 12px; font-size: 0.88rem; border-radius: 8px; }
input[type="search"], input[type="text"], input[type="number"], input[type="password"], select { min-height: 36px; padding: 6px 10px; font-size: 0.93rem; border-radius: 7px; }
th, td { padding: 8px 12px; }
th { font-size: 0.8rem; }
table { font-size: 0.92rem; }
.controls { gap: 10px; margin-bottom: 14px; }
.field label, .label { font-size: 0.8rem; }
.lo-tile strong { font-size: 1.45rem; }
.lo-tile { padding: 10px 14px; border-radius: 9px; }
.lo-group { border-radius: 10px; }
.card { padding: 14px; border-radius: 10px; }
.tool-list a { padding: 12px; border-radius: 10px; box-shadow: none; }
.source { font-size: 0.8rem; }
.footer { margin-top: auto; }
.footer-inner { max-width: var(--max); margin: 0; padding: 18px 28px; font-size: 0.82rem; }

/* tablet / phone: sidebar becomes a drawer */
@media (max-width: 1100px) {
  .sidebar { transform: translateX(-100%); transition: transform .2s; box-shadow: 0 0 40px rgba(0,0,0,.5); }
  .sidebar.open { transform: none; }
  .shell { margin-left: 0; }
  .menu-btn { display: block; }
  .topbar { padding: 8px 14px; }
  .page-band.compact .page-band-inner, .page-band.compact + .page, .page { padding-left: 16px; padding-right: 16px; }
}
@media (prefers-reduced-motion: reduce) { .sidebar { transition: none; } }

/* dashboard */
.dash-head { margin-bottom: 16px; }
.dash-head h1 { font-size: 1.7rem; }
.dash-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 0.8fr); grid-template-areas: "hangar find status" "hangar find updates"; gap: 14px; align-items: stretch; }
.d-hangar { grid-area: hangar; border-radius: 12px; padding: 18px 22px; display: flex; flex-direction: column; justify-content: space-between; }
.d-find { grid-area: find; } .d-status { grid-area: status; } .d-updates { grid-area: updates; }
.dash-grid .panel + .panel { margin-top: 0; }
.d-search input { width: 100%; }
.d-results { list-style: none; margin: 8px 0 0; padding: 0; }
.d-results li { display: flex; justify-content: space-between; gap: 8px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--line); }
.d-results a { text-decoration: none; color: var(--text); }
.d-results .d-lo { font-size: 0.82rem; color: var(--grid); border: 1px solid var(--seam); border-radius: 6px; padding: 1px 8px; }
.d-new { margin-top: 14px; }
.d-new .pills { margin-top: 6px; }
.d-new .pill { text-decoration: none; font-size: 0.8rem; }
.d-new .pill:hover { background: var(--grid-soft); color: var(--text); }
.d-updates .list > li { padding: 8px 0; font-size: 0.9rem; }
.dash-sub { margin: 28px 0 12px; font-size: 1.15rem; }
.dash-tools { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; }
.dt-col { background: var(--hull); border: 1px solid var(--line); border-radius: 10px; padding: 12px; }
.dt-col h3 { font-size: 0.85rem; color: var(--faint); font-weight: 600; margin: 2px 4px 6px; }
.dt-col ul { list-style: none; margin: 0; padding: 0; }
.dt-col a { display: grid; grid-template-columns: 30px 1fr; gap: 10px; align-items: start; padding: 7px 6px; border-radius: 8px; text-decoration: none; color: var(--text); }
.dt-col a:hover { background: var(--hull-2); }
.dt-col .nm-ico { width: 30px; height: 30px; border-radius: 8px; background: var(--grid-soft); color: var(--grid); display: grid; place-items: center; }
.dt-col .nm-ico svg { width: 17px; height: 17px; }
.dt-col strong { display: block; font-size: 0.92rem; font-weight: 600; }
.dt-col em { display: block; font-style: normal; color: var(--muted); font-size: 0.8rem; line-height: 1.35; }
@media (max-width: 1250px) { .dash-grid { grid-template-columns: 1fr 1fr; grid-template-areas: "hangar hangar" "find status" "find updates"; } }
@media (max-width: 700px) { .dash-grid { grid-template-columns: 1fr; grid-template-areas: "hangar" "find" "status" "updates"; } }
html { background: var(--void); }
.gsearch input[type="search"] { padding-left: 34px; padding-right: 40px; }
.side-link { padding: 4px 8px; }
.side-head { margin-top: 12px; }
.topbar .nav-cta { white-space: nowrap; }
@media (max-width: 520px) { .gsearch kbd { display: none; } .gsearch input[type="search"] { padding-right: 10px; } }

.side-ref { display: block; text-decoration: none; background: linear-gradient(135deg, rgba(90,169,255,.16), rgba(167,139,250,.16)); border: 1px solid rgba(129,140,248,.35); border-radius: 8px; padding: 8px 10px; margin-bottom: 6px; }
.side-ref strong { display: block; color: var(--text); font-size: 0.86rem; }
.side-ref span { display: block; color: var(--muted); font-size: 0.78rem; }
.side-ref:hover { border-color: #818cf8; }
.dash-grid { grid-template-areas: "hangar find status" "hangar find updates" "hangar find ref"; }
.d-ref { grid-area: ref; }
.ref-code { display: flex; gap: 8px; align-items: center; margin: 10px 0; }
.ref-code code { font: 700 1rem var(--display); letter-spacing: .04em; background: var(--hull-2); padding: 6px 10px; border-radius: 7px; color: var(--text); }
@media (max-width: 1250px) { .dash-grid { grid-template-areas: "hangar hangar" "find status" "find updates" "ref ref"; } }
@media (max-width: 700px) { .dash-grid { grid-template-areas: "hangar" "find" "status" "updates" "ref"; } }
.dash-grid { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 0.9fr); grid-template-areas: "hangar hangar status" "find ref updates"; align-items: start; }
.d-hangar { align-self: stretch; padding: 16px 22px; }
.d-hangar .hw { grid-template-columns: minmax(150px, 210px) 1fr; }
.d-status, .d-find, .d-ref, .d-updates { align-self: stretch; }
@media (max-width: 1250px) { .dash-grid { grid-template-columns: 1fr 1fr; grid-template-areas: "hangar hangar" "status find" "ref updates"; } }
@media (max-width: 700px) { .dash-grid { grid-template-columns: 1fr; grid-template-areas: "hangar" "find" "status" "updates" "ref"; } }

/* RSI link */
.rsi-card { display: flex; gap: 14px; align-items: center; margin: 6px 0 12px; }
.rsi-card img { border-radius: 10px; border: 1px solid var(--seam); object-fit: cover; }
.rsi-card strong { font: 650 1.2rem var(--display); }
.rsi-steps { margin: 6px 0 12px; padding-left: 20px; display: grid; gap: 8px; }
.rsi-steps .ref-code { display: inline-flex; margin: 0 0 0 6px; vertical-align: middle; }
.topbar .nav-cta.has-rsi { display: inline-flex; align-items: center; gap: 8px; background: var(--hull); color: var(--text); border: 1px solid var(--seam); padding: 3px 12px 3px 3px; }
.topbar .nav-cta.has-rsi:hover { border-color: var(--grid); color: var(--text); background: var(--hull-2); }
.topbar .nav-cta.has-rsi img { width: 28px; height: 28px; border-radius: 6px; object-fit: cover; }

/* sidebar badges */
.side-link .nb { margin-left: auto; font: 700 0.68rem var(--body); border-radius: 999px; line-height: 1; }
.side-link .nb.count { background: #ef4444; color: #fff; min-width: 18px; height: 18px; display: grid; place-items: center; padding: 0 5px; box-shadow: 0 0 0 2px var(--side); }
.side-link .nb.tag { color: #ff8a8a; background: rgba(239,68,68,.14); border: 1px solid rgba(239,68,68,.35); padding: 3px 6px; }

.legal-body { max-width: 820px; line-height: 1.65; }
.legal-body h2 { font-size: 1.1rem; margin: 22px 0 6px; }
.legal-body p + p { margin-top: 10px; }
.legal-body ul { margin: 6px 0; padding-left: 20px; }
.legal-body li { margin: 4px 0; }
.legal-short { background: var(--grid-soft); border-radius: 8px; padding: 10px 14px; }

/* guides */
[data-tool="guides"], .tc-guides { --grid: #34d399; --grid-hover: #6ee7b7; --grid-soft: rgba(52,211,153,.15); --grid-dim: rgba(52,211,153,.3); }
.gd-sec { margin-bottom: 26px; }
.gd-sec h2 { margin-bottom: 2px; }
.gd-list { list-style: none; margin: 12px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; counter-reset: gd; }
.gd-list a { display: block; height: 100%; background: var(--hull); border: 1px solid var(--line); border-left: 3px solid var(--grid); border-radius: 10px; padding: 14px 16px; text-decoration: none; color: var(--text); }
.gd-list a:hover { border-color: var(--grid); }
.gd-list strong { display: block; font: 650 1.02rem var(--display); }
.gd-list span { display: block; color: var(--muted); font-size: 0.9rem; margin-top: 4px; }
.gd-list em { display: block; font-style: normal; color: var(--faint); font-size: 0.8rem; margin-top: 8px; }
.gd-list.numbered li { counter-increment: gd; }
.gd-list.numbered strong::before { content: counter(gd) ". "; color: var(--grid); }
.gd-wrap { display: grid; grid-template-columns: minmax(0, 760px) 300px; gap: 18px; align-items: start; }
@media (max-width: 1100px) { .gd-wrap { grid-template-columns: 1fr; } }
.gd-article { padding: 24px 28px; font-size: 1rem; line-height: 1.7; }
.gd-article h2 { font-size: 1.2rem; margin: 26px 0 8px; }
.gd-article p + p { margin-top: 12px; }
.gd-article ul, .gd-article ol { padding-left: 22px; margin: 10px 0; }
.gd-article li { margin: 5px 0; }
.gd-steps { counter-reset: st; list-style: none; padding-left: 0 !important; }
.gd-steps li { counter-increment: st; position: relative; padding-left: 38px; }
.gd-steps li::before { content: counter(st); position: absolute; left: 0; top: 2px; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--grid); color: var(--on-accent); font: 700 0.85rem var(--display); }
.gd-meta { color: var(--faint); font-size: 0.85rem; margin-bottom: 14px; }
.gd-note { border-radius: 8px; padding: 10px 14px; margin: 14px 0; }
.gd-note b { margin-right: 6px; }
.gd-note.tip { background: var(--grid-soft); }
.gd-note.warn { background: rgba(255,190,85,.12); }
.gd-note.warn b { color: var(--signal); }
.gd-tool { display: grid; grid-template-columns: 34px 1fr; gap: 12px; align-items: center; margin: 14px 0; padding: 12px 14px; background: var(--hull-2); border: 1px solid var(--seam); border-radius: 10px; text-decoration: none; color: var(--text); }
.gd-tool:hover { border-color: var(--grid); color: var(--text); }
.gd-tool .nm-ico { width: 34px; height: 34px; border-radius: 9px; background: var(--grid-soft); color: var(--grid); display: grid; place-items: center; }
.gd-tool strong { display: block; color: var(--grid); font-size: 0.92rem; }
.gd-sources { margin-top: 24px; border-top: 1px solid var(--line); padding-top: 12px; }
.gd-next { display: block; margin-top: 18px; padding: 12px 14px; border: 1px solid var(--seam); border-radius: 10px; text-decoration: none; color: var(--text); }
.gd-next:hover { border-color: var(--grid); color: var(--text); }
.gd-next strong { display: block; }
.gd-side .panel + .panel { margin-top: 12px; }
.gd-tools, .gd-more { list-style: none; margin: 0; padding: 0; }
.gd-tools a { display: flex; gap: 10px; align-items: center; padding: 6px 4px; text-decoration: none; color: var(--text); border-radius: 8px; }
.gd-tools a:hover { background: var(--hull-2); }
.gd-tools .nm-ico { width: 28px; height: 28px; border-radius: 7px; background: var(--grid-soft); color: var(--grid); display: grid; place-items: center; }
.gd-tools .nm-ico svg, .gd-tool .nm-ico svg { width: 17px; height: 17px; }
.gd-more li { padding: 5px 0; border-bottom: 1px solid var(--line); font-size: 0.92rem; }
.gd-more li:last-child { border-bottom: 0; }
.light-row .btn { min-height: 32px; padding: 4px 12px; font-size: 0.86rem; }

/* phone fixes: later desktop rules were overriding the stacking rules */
@media (max-width: 900px) { .split { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 520px) {
  .d-hangar .hw { grid-template-columns: minmax(0, 1fr); text-align: center; }
  .d-hangar .hw-dial { max-width: 220px; margin: 0 auto; }
  .d-hangar .dial-cta { text-align: center; }
  .viewport.wide { padding: 16px; }
  .hw-ready { font-size: .86rem; }
}
.fd-title { line-height: 0; margin-bottom: 6px; }
.fd-title img { height: 46px; width: auto; max-width: 100%; display: block; }
@media (max-width: 520px) { .fd-title img { height: 34px; } }
@media (max-width: 640px) { .controls .field:has(input[type="search"]) { flex: 1 1 100%; } .controls .field input[type="search"] { width: 100%; } }
.brand img.brand-word { height: 22px; width: auto; background: none; border: 0; border-radius: 0; padding: 0; }
.sidebar .brand img.brand-word { width: auto; height: 22px; }

/* what changed */
.ch-entry + .ch-entry { margin-top: 14px; }
.ch-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.ch-head h2 { font-size: 1.15rem; margin: 0; }
.ch-group { margin-top: 12px; }
.ch-group h3 { font-size: .9rem; color: var(--faint); margin: 0 0 6px; }
.ch-group h3 a { color: inherit; }
.ch-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.ch-list li { display: flex; gap: 10px; align-items: baseline; }
.ch-list em { display: block; font-style: normal; color: var(--muted); font-size: .86rem; }
.ch-tag { flex: none; font-size: .72rem; font-weight: 700; padding: 2px 8px; border-radius: 6px; text-transform: uppercase; letter-spacing: .04em; }
.ch-add { background: rgba(61,220,151,.15); color: #6ee7b7; }
.ch-del { background: rgba(248,113,113,.15); color: #fca5a5; }
.ch-mod { background: rgba(250,204,21,.14); color: #fde68a; }
.hg-plan { margin-top: 12px; width: 100%; justify-content: center; } .hg-plan-note { font-size: .82rem; margin-top: 6px; }
.ev-strip { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.ev { display: flex; gap: 10px; align-items: baseline; padding: 8px 14px; border-radius: 10px; background: rgba(167,139,250,.12); border: 1px solid rgba(167,139,250,.35); }
.ev span { color: var(--muted); font-size: .88rem; }
.mt-sites { margin-top: 4px; font-size: .8rem; color: var(--muted); }
.mt-sites summary { cursor: pointer; }
.mt-sites p { margin: 6px 0 0; line-height: 1.6; }
.lo-mybuilds { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 12px; }
.lo-mybuilds .label { margin: 0 4px 0 0; }
.lo-mybuilds .chip { text-decoration: none; }
/* scanner ping */
.ping-box { max-width: 760px; }
.ping-form { display: flex; gap: 8px; margin: 12px 0; }
.ping-form input { flex: 1; min-width: 0; font-size: 1.15rem; }
.ping-hits { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ping-hits li { display: flex; gap: 12px; align-items: center; justify-content: space-between; padding: 10px 12px; border-radius: 10px; background: var(--hull-2); border: 1px solid var(--line); }
.ping-hits li.exact { border-color: rgba(61,220,151,.5); }
.ping-hits li > div { min-width: 0; }
.ping-hits .muted { display: block; font-size: .86rem; margin-top: 2px; }
.ping-none { color: var(--muted); }
@media (max-width: 520px) { .ping-hits li { flex-direction: column; align-items: flex-start; } }
/* crafting with an ore */
.craft-wrap { margin: 14px 0; }
.craft-panel h3 { margin-bottom: 4px; }
.craft-panel .chips { margin: 12px 0; }
.craft-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.craft-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 8px 10px; border-radius: 8px; background: var(--hull-2); }
.craft-list li .muted { display: block; font-size: .8rem; }
.craft-amt { color: var(--text); font-weight: 650; }
.craft-get { text-decoration: none; background: rgba(163,230,53,.14); color: #bef264; }
.craft-none { background: rgba(148,163,184,.12); color: var(--muted); }
.ping-acts { display: flex; gap: 8px; flex-wrap: wrap; }
@media (max-width: 640px) { .craft-list li { grid-template-columns: 1fr auto; } .craft-list li > .badge { grid-column: 1 / -1; justify-self: start; } }
.craft-more { margin-top: 10px; }
/* RSI hangar import */
.hg-steps { margin: 10px 0 14px 20px; line-height: 1.7; }
.hg-import textarea { width: 100%; min-height: 130px; margin-bottom: 10px; }
.hg-merge { display: inline-flex; gap: 8px; align-items: center; color: var(--muted); font-size: .9rem; }
.hg-review { list-style: none; margin: 12px 0; padding: 0; display: grid; gap: 6px; }
.hg-review li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 8px 10px; border-radius: 8px; background: var(--hull-2); }
.hg-review li .muted { display: block; font-size: .8rem; }
.hg-step { display: flex; align-items: center; gap: 8px; }
.hg-step b { min-width: 22px; text-align: center; }
.hg-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.hg-bm { margin-left: 6px; cursor: grab; } .hg-paste { margin-top: 10px; } .hg-paste summary { cursor: pointer; color: var(--muted); }
.hg-tip { display: block; margin-top: 8px; padding: 8px 12px; border-radius: 8px; background: rgba(250,204,21,.12); color: #fde68a; font-size: .9rem; }
.hg-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin: 14px 0; }
@media (max-width: 800px) { .hg-two { grid-template-columns: 1fr; } }
.hg-card { position: relative; background: var(--hull-2); border: 1px solid var(--line); border-radius: 12px; padding: 18px 18px 18px 64px; }
.hg-card h4 { margin: 0 0 6px; font-size: 1.05rem; }
.hg-card p { color: var(--muted); margin: 0 0 12px; }
.hg-num { position: absolute; left: 18px; top: 18px; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: #2dd4bf; color: #062a26; font-weight: 800; }
.hg-demo { margin: 4px 0 12px; }
.hg-demo-bar { display: flex; gap: 10px; align-items: center; background: #1d4ed8; color: #dbeafe; border-radius: 8px; padding: 6px 10px; font-size: .8rem; }
.hg-demo-slot { border: 1px dashed #93c5fd; border-radius: 6px; padding: 2px 8px; animation: hgpulse 1.6s infinite; }
.hg-demo-arrow { color: #2dd4bf; font-size: .85rem; margin: 6px 0 0 120px; animation: hgbob 1.2s infinite alternate; }
@keyframes hgpulse { 50% { background: rgba(147,197,253,.25); } }
@keyframes hgbob { to { transform: translateY(-4px); } }
@media (prefers-reduced-motion: reduce) { .hg-demo-slot, .hg-demo-arrow { animation: none; } }
.hg-bm { font-size: 1.05rem; padding: 10px 18px; }
/* PC app top-bar buttons */
.app-tools { display: flex; gap: 8px; }
.app-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 6px 14px; border-radius: 8px; border: 1px solid var(--seam); background: var(--hull-2); color: var(--text); font: 600 .9rem inherit; cursor: pointer; white-space: nowrap; }
.app-btn:hover { border-color: #2dd4bf; }
.app-btn kbd { font-size: .72rem; color: var(--muted); border: 1px solid var(--line); border-radius: 4px; padding: 1px 5px; }
.app-btn[aria-pressed="true"] { border-color: #2dd4bf; background: rgba(45,212,191,.14); }
.app-btn .dot { width: 9px; height: 9px; border-radius: 50%; background: #64748b; }
.app-btn[aria-pressed="true"] .dot { background: #3ddc97; box-shadow: 0 0 0 3px rgba(61,220,151,.25); }
@media (max-width: 900px) { .app-btn kbd { display: none; } }
.app-tools[hidden] { display: none; }

.stale { color: var(--warn, #f5b041); }

.loop-card { border: 1px solid var(--line); border-radius: 12px; margin: 0 0 12px; background: var(--panel, rgba(255,255,255,.02)); }
.loop-card summary { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: space-between; padding: 12px 16px; cursor: pointer; }
.loop-card[open] summary { border-bottom: 1px solid var(--line); }
.loop-path { font-weight: 600; }
.loop-sum strong { font-size: 1.1em; margin-left: 8px; }
.loop-card .table-wrap { border: 0; border-radius: 0 0 12px 12px; }
.loop-total td { border-top: 1px solid var(--line); background: rgba(255,255,255,.03); }
.best-hero { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; padding: 14px 18px; margin: 0 0 14px; border: 1px solid rgba(61,220,151,.4); border-radius: 12px; background: rgba(61,220,151,.06); }
.best-hero strong { font-size: 1.5em; }
.best-hero .why { flex-basis: 100%; font-size: .9em; }

.report-form { display: grid; gap: 14px; max-width: 720px; }
.report-form textarea { width: 100%; resize: vertical; font: inherit; }
.report-form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.report-form .ok { color: var(--green, #3ddc97); margin: 0; }
.report-form .err { color: var(--danger, #f87171); margin: 0; }
#mine { margin-top: 24px; max-width: 720px; }
.report-list { display: grid; gap: 10px; }
.report-item p { margin: 6px 0 0; }
.report-top { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.report-item.st-fixed .tag { color: var(--green, #3ddc97); }
.report-item.st-working .tag { color: #f5b041; }
.suggest { margin-top: 18px; padding: 16px 18px; border: 1px solid rgba(45,212,191,.35); border-radius: 12px; background: rgba(45,212,191,.05); }
.suggest h2 { margin: 0 0 6px; font-size: 1.15em; }
.suggest h3 { margin: 14px 0 8px; font-size: 1em; }

/* ----- Ask Orvix chat ----- */
.ochat-root { position: fixed; right: 20px; bottom: 20px; z-index: 60; font-family: var(--body); }
.ochat-btn { width: 56px; height: 56px; border-radius: 50%; border: 0; background: var(--go); color: var(--on-accent); display: grid; place-items: center; cursor: pointer; box-shadow: 0 6px 22px rgba(0,0,0,.4); transition: transform .15s; }
.ochat-btn:hover { transform: scale(1.06); }
.ochat-root.open .ochat-btn { display: none; }
.ochat { position: absolute; right: 0; bottom: 0; width: min(380px, calc(100vw - 32px)); height: min(560px, calc(100vh - 100px)); display: flex; flex-direction: column; background: var(--hull); border: 1px solid var(--seam); border-radius: 16px; box-shadow: 0 12px 40px rgba(0,0,0,.5); overflow: hidden; }
.ochat[hidden] { display: none; }
.ochat header { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: var(--hull-2); border-bottom: 1px solid var(--line); }
.ochat header img { width: 30px; height: 30px; }
.ochat header div { display: flex; flex-direction: column; line-height: 1.2; }
.ochat header span { color: var(--muted); font-size: .82em; }
.ochat-x { margin-left: auto; background: none; border: 0; color: var(--muted); font-size: 18px; cursor: pointer; padding: 4px 8px; }
.ochat-log { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.ochat-msg { max-width: 88%; padding: 9px 12px; border-radius: 12px; line-height: 1.4; font-size: .95em; }
.ochat-msg.bot { background: var(--void); border: 1px solid var(--line); align-self: flex-start; border-bottom-left-radius: 4px; }
.ochat-msg.me { background: var(--go-soft); border: 1px solid rgba(61,220,151,.35); align-self: flex-end; border-bottom-right-radius: 4px; }
.ochat-msg ol { margin: 6px 0 4px; padding-left: 18px; display: grid; gap: 6px; }
.ochat-msg a { color: var(--go); font-weight: 600; }
.ochat-num { color: var(--go); font-weight: 700; }
.ochat-muted { color: var(--muted); font-size: .9em; }
.ochat-pick { display: grid; gap: 6px; }
.ochat-pick div { display: flex; gap: 6px; }
.ochat-pick select { flex: 1; min-width: 0; }
.ochat-pick button, .ochat-form button { background: var(--go); color: var(--on-accent); border: 0; border-radius: 8px; padding: 0 12px; font-weight: 700; cursor: pointer; }
.ochat-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 14px 10px; }
.ochat-chips:empty { display: none; }
.ochat-chips button { background: var(--hull-2); color: var(--text); border: 1px solid var(--seam); border-radius: 999px; padding: 6px 12px; font: inherit; font-size: .88em; cursor: pointer; }
.ochat-chips button:hover { border-color: var(--go); }
.ochat-form { display: flex; gap: 6px; padding: 10px 14px 14px; border-top: 1px solid var(--line); }
.ochat-form input { flex: 1; min-width: 0; }
.ochat-dots { display: inline-flex; gap: 4px; }
.ochat-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); animation: ochat-b 1s infinite; }
.ochat-dots i:nth-child(2) { animation-delay: .15s; } .ochat-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes ochat-b { 0%, 60%, 100% { opacity: .3; } 30% { opacity: 1; } }
@media (max-width: 640px) { .ochat-root { right: 12px; bottom: 12px; } .ochat { height: calc(100vh - 90px); } }
.ochat-list { margin: 6px 0; padding-left: 4px; list-style: none; display: grid; gap: 5px; }
.ochat-links { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.ochat-links a { padding: 3px 10px; border: 1px solid var(--seam); border-radius: 999px; font-size: .88em; text-decoration: none; }

/* ----- What should I do? ----- */
.plan-form { display: grid; gap: 14px; }
.plan-form .lbl { display: block; font-weight: 600; margin-bottom: 6px; }
.plan-form .chips { display: flex; flex-wrap: wrap; gap: 8px; }
.plan-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.plan-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; margin-top: 16px; }
.plan-card { display: flex; flex-direction: column; gap: 8px; }
.plan-card h2 { font-size: 1.15rem; }
.plan-card ol { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.plan-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; font-weight: 600; }
.plan-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: auto; padding-top: 6px; }
.plan-actions a { font-weight: 600; }
.btn.small { padding: 6px 12px; font-size: .9em; }
.plan-mine-h { margin: 26px 0 10px; }
.plan-saved { margin-bottom: 10px; display: grid; gap: 6px; }
.plan-saved-top { display: flex; justify-content: space-between; gap: 10px; }

/* saved trade runs */
.saved-runs { margin: -6px 0 16px; }
.saved-box { border: 1px solid var(--seam); border-radius: 12px; background: var(--hull); padding: 10px 14px; }
.saved-box summary { cursor: pointer; font-weight: 700; }
.saved-box ul { list-style: none; margin: 10px 0 4px; padding: 0; display: grid; gap: 6px; }
.saved-box li { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.saved-box li [data-del] { margin-left: auto; }
.save-run:not(.btn) { background: none; border: 0; font-size: 18px; cursor: pointer; color: var(--muted); padding: 0 4px; }
.save-run.saved:not(.btn) { color: #f5b041; }
.btn.save-run.saved { border-color: #f5b041; color: #f5b041; }
.card-actions { display: flex; justify-content: flex-end; padding: 8px 14px 12px; }
.saved-hit, details.saved-hit { outline: 2px solid #f5b041; outline-offset: 2px; border-radius: 12px; }
tr.saved-hit td { background: rgba(245,176,65,.08); }
.saved-detail { flex-basis: 100%; }
.saved-detail:empty { display: none; }
.saved-detail > * { margin-top: 8px; }
.saved-detail details.loop-card { margin: 8px 0 4px; }

/* storage level bar under terminal names */
.fillbar-text { white-space: nowrap; }
.fillbar { display: flex; align-items: center; gap: 6px; margin-top: 4px; font-size: 11px; color: var(--muted); }
.fillbar-track { width: 64px; height: 4px; border-radius: 2px; background: rgba(255,255,255,.1); overflow: hidden; flex: none; }
.fillbar-track > span { display: block; height: 100%; border-radius: 2px; }
.fillbar.good .fillbar-track > span { background: #3ddc97; }
.fillbar.mid .fillbar-track > span { background: #f5b041; }
.fillbar.bad .fillbar-track > span { background: #ff6b6b; }
.fillbar.old .fillbar-track { opacity: .45; }
.fillbar.old .fillbar-text { font-style: italic; }

/* Account button: never let the header squeeze it (Safari on iPhone let the handle spill past the border).
   The search box gives up the space instead, and very long handles get an ellipsis. */
.topbar .nav-cta { flex: none; }
.topbar .gsearch { flex: 1 1 auto; min-width: 0; }
.topbar .nav-cta.has-rsi img { flex: none; }
.topbar .nav-cta.has-rsi span { min-width: 0; max-width: 12ch; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 400px) { .topbar .nav-cta.has-rsi span { max-width: 9ch; } }
/* salvage page */
.sv-price-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.sv-top { margin: 10px 0 0; padding-left: 20px; display: grid; gap: 8px; }
.sv-steps { margin: 0; padding-left: 22px; display: grid; gap: 10px; }

/* guides: get a real person to help */
.gd-help { margin: 18px 0 8px; }
.gd-help ul { margin: 10px 0; padding-left: 20px; display: grid; gap: 8px; }
.gd-side .gd-help { margin: 0; }
.lt-more { text-align: center; margin: 18px 0; }

/* sortable trade tables */
table.sortable th { cursor: pointer; user-select: none; white-space: nowrap; }
table.sortable th:empty { cursor: default; }
table.sortable th:not(:empty):hover { color: var(--text, #fff); }
table.sortable th[data-dir="asc"]::after { content: " ▲"; font-size: .7em; }
table.sortable th[data-dir="desc"]::after { content: " ▼"; font-size: .7em; }
.sort-row { display: flex; justify-content: flex-end; margin: 0 0 10px; }
.sort-row label { display: flex; gap: 8px; align-items: center; color: var(--muted); font-size: .92rem; }
.sort-row select { width: auto; }

/* Next patch (official CIG info for the upcoming patch) */
.np-status p { margin-top: 10px; }
.np-status-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.np-h { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.np-h h2 { margin: 0; }
.np-badge { font-size: 0.8rem; font-weight: 700; border-radius: 999px; padding: 3px 10px; background: var(--hull-2); color: var(--text); white-space: nowrap; }
.np-ptu { background: rgba(61, 220, 151, 0.15); color: #3ddc97; }
.np-com { background: rgba(95, 184, 255, 0.15); color: #5fb8ff; }
.np-ten { background: rgba(245, 176, 65, 0.15); color: #f5b041; }
.np-list { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 10px; }
.np-list li { display: grid; grid-template-columns: auto 1fr; gap: 4px 8px; align-items: baseline; padding: 10px 12px; background: var(--hull-2); border-radius: var(--r-sm, 8px); }
.np-list li > span:last-child { grid-column: 1 / -1; color: var(--muted); }
.np-list li .pill, .np-list li .np-badge { justify-self: start; }
.np-kv { margin-top: 14px; }
.np-note { margin-top: 12px; }
.np-cite { display: inline-block; margin-top: 12px; margin-right: 14px; font-size: 0.9rem; }
.np-bullets { margin: 6px 0 0; padding-left: 20px; display: grid; gap: 4px; }
.np-quote { margin: 16px 0 0; padding: 12px 16px; border-left: 3px solid var(--grid); background: var(--hull-2); border-radius: 6px; font-style: italic; }
.np-quote cite { display: block; margin-top: 6px; font-style: normal; color: var(--muted); font-size: 0.86rem; }
.np-sources { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.np-sources li { display: flex; flex-wrap: wrap; gap: 4px 10px; }
.np-latest { margin-top: 14px; padding: 12px 14px; border: 1px solid var(--grid); border-radius: 10px; background: var(--grid-soft); }
.np-latest p { margin: 6px 0 0; }

/* Roadmap (CIG's official Release View) */
.rm-legend { display: flex; flex-wrap: wrap; gap: 10px 22px; color: var(--muted); font-size: 0.92rem; }
.rm-legend > span { display: inline-flex; align-items: center; gap: 8px; }
.rm-rel-b, .rm-rel .np-badge.rm-rel, .np-badge.rm-rel { background: rgba(154, 169, 181, 0.15); color: #9aa9b5; }
.np-badge.rm-com { background: rgba(95, 184, 255, 0.15); color: #5fb8ff; }
.np-badge.rm-ten { background: rgba(245, 176, 65, 0.15); color: #f5b041; }
.rm-filters { display: grid; gap: 12px; margin: 18px 0; }
.rm-filters input { max-width: 420px; }
.rm-rel > summary { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; cursor: pointer; list-style: none; }
.rm-rel > summary::-webkit-details-marker { display: none; }
.rm-rel > summary h2 { margin: 0; }
.rm-rel > summary::after { content: "▾"; margin-left: auto; color: var(--muted); }
.rm-rel:not([open]) > summary::after { content: "▸"; }
.rm-count { font-size: 0.86rem; }
.rm-list { list-style: none; padding: 0; margin: 14px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.rm-card { padding: 12px 14px; background: var(--hull-2); border-radius: 10px; display: grid; gap: 4px; align-content: start; }
.rm-card[hidden] { display: none; }
.rm-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.rm-cat { color: var(--grid); font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; }
.rm-card p { margin: 2px 0 0; color: var(--muted); font-size: 0.93rem; }
.rm-card details summary { cursor: pointer; color: var(--grid); font-size: 0.88rem; margin-top: 4px; }
.rm-sub { margin: 28px 0 12px; }
.rm-next h2 { margin-top: 0; }
@media (max-width: 640px) { .rm-list { grid-template-columns: 1fr; } }
/* Phones: event chips show just their title, side by side */
@media (max-width: 600px) {
  .ev-strip .ev > span { display: none; }
  .ev-strip { gap: 8px; }
  .ev-strip .ev { padding: 8px 12px; }
}

/* iPhone app page hero: starfield, planet glow and the real app screens */
.ah { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 40px; align-items: end; min-height: 520px; padding: 48px 56px 0; border-radius: 18px; overflow: hidden; border: 1px solid var(--seam);
  background: url(/img/app/hero-bg.webp) center bottom / cover, #040915; }
.ah-copy { align-self: center; padding-bottom: 48px; max-width: 640px; }
.ah-kicker { display: flex; align-items: center; gap: 12px; font: 650 1.1rem var(--display); color: #dbe7f6; margin: 0 0 18px; }
.ah-kicker img { border-radius: 11px; box-shadow: 0 0 0 1px rgba(255,255,255,.15); }
.ah-title { margin: 0; font: 800 clamp(2.4rem, 5vw, 4.2rem)/1 "Inter Display", Inter, var(--display); letter-spacing: -0.035em; color: #fff; }
.ah-title span { display: block; color: #3ea2ff; }
.ah-sub { margin: 20px 0 0; color: #b9c9de; font-size: 1.05rem; line-height: 1.5; }
.ah-btns { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.ah-btns .btn:not(.ghost) { box-shadow: 0 0 30px rgba(62,162,255,.45); }
.ah-btns .btn.ghost { background: rgba(4,9,21,.55); }
.ah-free { margin: 16px 0 0; color: #8fa3bb; font-size: 0.9rem; }
.ah-free span { color: #dbe7f6; }
.ah-phone { position: relative; width: 300px; height: 480px; margin-bottom: -2px; border: 8px solid #03060c; border-bottom: 0; border-radius: 46px 46px 0 0; background: #03060c; overflow: hidden;
  box-shadow: 0 0 0 2px #2a3d5c, 0 0 60px rgba(70,160,255,.55), 0 0 140px rgba(40,120,255,.3);
  -webkit-mask-image: linear-gradient(#000 78%, transparent); mask-image: linear-gradient(#000 78%, transparent); }
.ah-phone::before { content: ""; position: absolute; z-index: 2; top: 12px; left: 50%; width: 84px; height: 22px; margin-left: -42px; border-radius: 12px; background: #000; }
.ah-phone img { position: absolute; inset: 0 0 auto 0; width: 100%; height: auto; border-radius: 38px 38px 0 0; opacity: 0; transition: opacity .6s ease; }
.ah-phone img.on { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .ah-phone img { transition: none; } }
@media (max-width: 900px) { .ah { grid-template-columns: 1fr; padding: 32px 22px 0; gap: 8px; } .ah-copy { padding-bottom: 8px; } .ah-phone { justify-self: center; width: 240px; height: 330px; border-radius: 38px 38px 0 0; } .ah-phone img { border-radius: 30px 30px 0 0; } }
.ah + .band .panel + .panel { margin-top: 0; }
.ah-dash { margin-top: 20px; min-height: 0; padding: 26px 44px 0; grid-template-columns: minmax(0, 1fr) 230px; gap: 28px; }
.ah-dash .ah-copy { padding-bottom: 26px; }
.ah-dash .ah-kicker { margin-bottom: 10px; font-size: 0.95rem; }
.ah-dash .ah-kicker img { width: 34px; height: 34px; border-radius: 9px; }
.ah-dash .ah-title { font-size: clamp(1.9rem, 3vw, 2.6rem); }
.ah-dash .ah-sub { margin-top: 10px; font-size: 0.98rem; }
.ah-dash .ah-btns { margin-top: 16px; }
.ah-dash .ah-free { margin-top: 10px; }
.ah-dash .ah-phone { display: block; width: 230px; height: 250px; border-width: 6px; border-radius: 38px 38px 0 0; }
.ah-dash .ah-phone::before { top: 9px; width: 64px; height: 17px; margin-left: -32px; }
.ah-dash .ah-phone img { border-radius: 32px 32px 0 0; }
@media (max-width: 900px) { .ah-dash { grid-template-columns: 1fr; padding: 22px 20px 0; } .ah-dash .ah-phone { width: 200px; height: 190px; } }
/* Barlow's semibold "i" loses its dot on Windows at button sizes ("IPhone"); the app banner uses the system font instead. */
.ah .btn, .ah-sub, .ah-free, .ah-kicker { font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
/* keep the text readable over the planet */
.ah::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(4,9,21,.45), rgba(4,9,21,.12) 45%, transparent 65%); pointer-events: none; }
.ah > * { position: relative; }
/* phone: blue rim light, glass shine, rising out of the horizon glow */
.ah-phone { border-color: #05080e; box-shadow: 0 0 0 1.5px #8fd0ff, 0 0 0 4px #0d1a30, 0 0 22px rgba(90,175,255,.85), 0 0 80px rgba(40,130,255,.5); -webkit-mask-image: none; mask-image: none; }
.ah-phone::after { content: ""; position: absolute; inset: 0; z-index: 3; border-radius: inherit; pointer-events: none;
  background: linear-gradient(125deg, rgba(255,255,255,.16) 0%, rgba(255,255,255,.05) 22%, transparent 38%), linear-gradient(transparent 60%, rgba(4,9,21,.85)); }
.ah-horizon { position: absolute !important; z-index: 2; left: 0; right: 0; bottom: 0; height: 90px; pointer-events: none;
  background: radial-gradient(ellipse 30% 70% at var(--hx, 84%) 100%, rgba(200,235,255,.95), rgba(80,165,255,.6) 30%, rgba(40,120,255,.2) 55%, transparent 72%); }
.ah-horizon::before { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 26px; background: radial-gradient(ellipse 40% 100% at var(--hx, 84%) 100%, rgba(4,9,21,.0), rgba(4,9,21,.35) 70%); }
.ah-dash .ah-horizon { --hx: 86%; height: 70px; }
@media (max-width: 900px) { .ah-horizon { --hx: 50%; } }
/* bigger phone (readable screen) with more room on the right */
.ah { grid-template-columns: minmax(0, 1fr) 350px; padding-right: 84px; }
.ah-phone { width: 350px; }
.ah-dash { grid-template-columns: minmax(0, 1fr) 290px; padding-right: 72px; }
.ah-dash .ah-phone { width: 290px; height: 262px; }
@media (max-width: 900px) { .ah, .ah-dash { grid-template-columns: 1fr; padding-right: 22px; } .ah-phone { width: 260px; } .ah-dash .ah-phone { width: 240px; height: 200px; } }

/* Dashboard: popular tools row, full list folded away */
.pop-tools { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.pop-tools a { display: grid; grid-template-columns: 38px 1fr; gap: 12px; align-items: center; height: 100%; padding: 14px; border-radius: 10px; background: var(--hull); border: 1px solid var(--line); text-decoration: none; color: var(--text); transition: border-color .15s, background .15s; }
.pop-tools a:hover { border-color: var(--grid); background: var(--hull-2); }
.pop-tools .nm-ico { width: 38px; height: 38px; border-radius: 10px; background: var(--grid-soft); color: var(--grid); display: grid; place-items: center; }
.pop-tools .nm-ico svg { width: 20px; height: 20px; }
.pop-tools strong { display: block; font-size: 0.95rem; font-weight: 600; }
.pop-tools em { display: block; font-style: normal; color: var(--muted); font-size: 0.82rem; line-height: 1.35; }
.all-tools-btn { display: none; margin-top: 14px; background: none; border: 0; padding: 6px 2px; color: var(--grid); font: 600 1rem var(--body); cursor: pointer; }
@media (max-width: 1100px) { .pop-tools { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .pop-tools { grid-template-columns: 1fr; } }
@media (max-width: 1100px) { .all-tools-btn { display: inline-block; } }
/* hangar dial: dim = already passed, bright = still to go */
.dial-open.dial-past { stroke: rgba(61,220,151,.28); }
.dial-closed.dial-wait { stroke: rgba(242,181,68,.75); }
