@charset "UTF-8";
:root{--bg:#080f17;--panel:#0b1621;--ink:#e8eeee;--muted:#8ca3ae;--cyan:#8ee4e3;--amber:#e6b573;--line:rgba(156,208,218,.2);--mono:"SFMono-Regular",Consolas,monospace;--sans:Arial,Helvetica,sans-serif}
*{box-sizing:border-box}body{margin:0;color:var(--ink);background:var(--bg);font-family:var(--sans);font-size:16px;overscroll-behavior:none}button,a{-webkit-tap-highlight-color:transparent}button{font:inherit;color:inherit;cursor:pointer}a{color:inherit}button:focus-visible,a:focus-visible,canvas:focus-visible{outline:2px solid var(--cyan);outline-offset:5px}button:disabled{cursor:wait}::selection{background:var(--cyan);color:#07111a}.micro{font:12px var(--mono);letter-spacing:1.5px;color:var(--muted);line-height:1.6}.skip-link{position:fixed;z-index:100;top:10px;left:10px;transform:translateY(-200%);background:var(--cyan);color:#07111a;padding:12px}.skip-link:focus{transform:none}

:root{--header-height:60px;--sector-height:34px}
.bridge-header{height:var(--header-height);padding:0 20px;display:flex;align-items:center;gap:18px;border-bottom:1px solid var(--line);position:relative;z-index:5;background:#080f17}
.brand{width:96px;height:52px;display:block;flex-shrink:0;mix-blend-mode:screen}.brand-crop{display:block;width:96px;height:52px;overflow:hidden;position:relative}.brand-crop img{position:absolute;width:157px;height:auto;left:-30px;top:-32px;filter:invert(1) hue-rotate(180deg) saturate(1.4) brightness(1.5);mix-blend-mode:screen}
.bridge-name{border-left:1px solid var(--line);padding-left:16px;display:flex;flex-direction:column;gap:7px;white-space:nowrap}.bridge-name>span{font:9px var(--mono);letter-spacing:1.7px;color:var(--muted)}.bridge-name strong{font-size:11px;font-weight:400;letter-spacing:.5px}
.header-tools{display:flex;gap:6px;align-items:center;margin-left:auto}.icon-button,.library-button{height:30px;border:1px solid var(--line);background:none;font-size:10px;padding:0 8px;transition:background .2s;white-space:nowrap}.icon-button:hover,.library-button:hover{background:#19303c}.icon-button span{color:var(--cyan);font:9px var(--mono);margin-left:4px}.library-button{display:flex;gap:14px;align-items:center}.library-button>span{color:var(--cyan);font-size:16px}
.flight-deck{height:calc(100svh - var(--header-height));min-height:430px;position:relative;isolation:isolate;overflow:hidden;background:#030711 url('/assets/milky-way.jpg') center 52%/cover no-repeat}
.planet-dock{position:absolute;inset:0;pointer-events:none}.planet-link{position:absolute;left:15%;top:64px;transform:translate(-50%,-34px);width:154px;height:111px;padding:0;border:0;background:none;color:var(--cyan);text-align:center;pointer-events:auto;text-shadow:0 2px 8px #000;touch-action:manipulation}.planet-link.amber{left:85%;color:var(--amber)}.planet-hit-area{display:block;width:68px;height:68px;margin:0 auto 6px;border-radius:50%;border:1px solid transparent;transition:border-color .2s,box-shadow .2s}.planet-link:hover .planet-hit-area,.planet-link.targeted .planet-hit-area{border-color:currentColor;box-shadow:0 0 24px #8ee4e326}.planet-link:focus-visible{outline:none}.planet-link:focus-visible .planet-hit-area{outline:2px solid currentColor;outline-offset:4px}.planet-link strong{display:block;font-size:13px;line-height:1.4;font-weight:400;white-space:nowrap}.beacon-instruction{display:block;font:9px var(--mono);color:#a9bec7;letter-spacing:.3px;margin-top:5px}.planet-link.visited .beacon-instruction{color:currentColor}
.sector-heading{position:absolute;top:0;left:0;right:0;height:var(--sector-height);z-index:3;display:flex;align-items:center;gap:22px;padding:0 26px;background:linear-gradient(#080f17c9,#080f1740);pointer-events:none}.sector-heading h1{margin:0;font:10px var(--mono);letter-spacing:1.5px;font-weight:400;white-space:nowrap}.sector-heading h1 span{color:var(--cyan);letter-spacing:1px;margin-left:8px}.sector-heading p{font:9px var(--mono);color:#b1c0c9;margin:0;letter-spacing:.2px}.module-progress{margin-left:auto;font:9px var(--mono);color:var(--muted)}.module-progress b{font-weight:400;color:var(--cyan)}
.scene,.world-labels{position:absolute;inset:0}.scene{z-index:0}.scene canvas{display:block;width:100%;height:100%;outline-offset:-6px;touch-action:none}#space{cursor:crosshair}.scene .hud-layer{position:absolute;inset:0;pointer-events:none}.scene-vignette{position:absolute;inset:0;pointer-events:none;z-index:1;box-shadow:inset 0 0 130px 12px #02061170}.world-labels{pointer-events:none;z-index:3}
kbd{font:9px var(--mono);border:1px solid #3b5360;padding:4px 5px;border-radius:3px;color:#bed2d9;box-shadow:0 2px 0 #1c323e}.space-key{font-size:8px;padding-inline:8px}
.touch-controls{display:none}.paused .scene{filter:saturate(.5)}.paused .flight-message{color:var(--amber)}
dialog{padding:0;border:1px solid #4b7481;background:#0c1721;color:var(--ink);max-width:1040px;width:calc(100% - 70px);max-height:calc(100svh - 80px);overflow:hidden;box-shadow:0 0 100px #000b}dialog::backdrop{background:#030a10cc;backdrop-filter:blur(8px)}.dialog-shell{display:flex;flex-direction:column;max-height:calc(100svh - 84px)}.dialog-header{display:flex;align-items:center;justify-content:space-between;padding:21px 30px;border-bottom:1px solid var(--line)}.dialog-header .micro{font-size:11px;margin:0}.close-button{background:none;border:0;color:var(--muted);display:flex;align-items:center;gap:12px;font-size:12px}.close-button kbd{font-size:9px}.close-button>span{font-size:27px;font-weight:200;color:var(--ink)}.dialog-tabs{display:flex;gap:28px;padding:0 34px;border-bottom:1px solid var(--line);flex-shrink:0}.dialog-tabs button{border:0;border-bottom:2px solid transparent;background:none;font-size:13px;padding:18px 0;color:var(--muted)}.dialog-tabs button.active{border-color:var(--cyan);color:var(--cyan)}.dialog-content{padding:35px;overflow:auto;min-height:280px}.dialog-content .micro{color:var(--cyan);font-size:11px;margin:0 0 12px}.dialog-content h2{font-size:34px;font-weight:400;letter-spacing:1px;margin:0 0 18px;line-height:1.45}.dialog-content h2>span{color:var(--cyan)}.purpose-layout{display:grid;grid-template-columns:1.3fr 1fr;gap:44px}.purpose-copy>p{font-size:16px;line-height:1.9;color:#b3c5ce}.purpose-visual{background:linear-gradient(0deg,#0b1721,transparent 50%),url('/assets/dna-macro.jpg') center/cover;min-height:350px;position:relative;border:1px solid var(--line)}.purpose-visual>span{position:absolute;bottom:22px;left:22px;font:11px var(--mono);letter-spacing:2px;color:var(--cyan)}.purpose-principles{display:grid;grid-template-columns:1fr 1fr;gap:20px;margin-top:25px}.purpose-principles>div{border-top:1px solid var(--line);padding-top:17px}.purpose-principles b{font:11px var(--mono);color:var(--cyan)}.purpose-principles h3{font-size:16px;font-weight:400;margin:12px 0 8px}.purpose-principles p{font-size:14px;color:var(--muted);line-height:1.7;margin:0}.portfolio-intro{font-size:15px;line-height:1.8;color:var(--muted);margin:0 0 28px}.portfolio-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}.portfolio-card{background:#10202c;border:1px solid #2c4857;padding:22px;position:relative}.portfolio-card .card-index{font:11px var(--mono);color:#7a9ba8}.portfolio-card h3{font-size:24px;font-weight:400;margin:18px 0 17px;min-width:0}.company-brand{height:64px;display:flex;align-items:center;gap:16px}.company-name{font-size:22px;letter-spacing:.3px}.company-brand img{display:block;width:100%;max-width:225px;height:52px;object-fit:contain;object-position:left center}.company-brand .logo-reversed{filter:brightness(0) invert(1)}.company-brand .logo-mark{width:56px;height:35px;flex-shrink:0}.portfolio-card .sector{font-size:12px;color:var(--amber);margin:0 0 17px}.portfolio-card h4{font-size:16px;font-weight:400;margin:0 0 9px}.portfolio-card .description{font-size:14px;line-height:1.8;color:#9cb4c0;margin:0 0 22px}.portfolio-card a{font-size:12px;color:var(--cyan);text-decoration:none}.portfolio-card a:after{content:"↗";margin-left:12px}.dialog-footer{padding:19px 32px;border-top:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;gap:20px;flex-shrink:0;background:#0b1721}.dialog-footer>span{font:10px var(--mono);letter-spacing:1px;color:#6c919f}.dialog-footer>button,.primary-button{background:var(--cyan);color:#06131b;border:0;padding:12px 19px;font-size:13px}.dialog-footer>button>span{margin-left:25px}.loading-state,.empty-state{padding:45px 15px;text-align:center;font-size:16px;color:var(--muted);line-height:1.9}.loading-state:before{content:"";display:block;width:25px;height:25px;border:1px solid #315365;border-top-color:var(--cyan);border-radius:50%;margin:0 auto 15px;animation:spin 1s linear infinite}.error-state{padding:28px;background:#30251b;border:1px solid #806444;color:#f0c896;font-size:15px;line-height:1.8}.error-state button{margin-top:15px}#scene-fallback{position:absolute;inset:190px 230px 150px;text-align:center;background:#0b1a26;z-index:5;padding:40px;line-height:2}#scene-fallback button{margin:10px}.noscript{position:fixed;inset:100px 15%;z-index:10;background:var(--panel);padding:40px;font-size:20px;line-height:2}@keyframes spin{to{transform:rotate(360deg)}}

@media(max-width:1180px){.bridge-name{display:none}.bridge-header{gap:20px}.sector-heading{gap:18px}}
@media(max-width:900px){.bridge-header{padding-inline:18px;gap:12px}.header-tools{gap:5px}.icon-button,.library-button{padding-inline:8px}.library-button{gap:7px}.module-progress{display:none}}
@media(max-width:760px){
:root{--header-height:54px;--sector-height:32px}
.bridge-header{display:flex;gap:10px;padding:0 12px}.brand{width:90px;height:50px}.brand-crop{width:90px;height:50px}.brand-crop img{width:149px;left:-29px;top:-30px}.header-tools{gap:6px}.icon-button,.library-button{height:30px;font-size:10px}.planet-link{width:140px;height:99px;transform:translate(-50%,-30px)}.planet-hit-area{width:60px;height:60px;margin-bottom:5px}.planet-link strong{font-size:12px}.beacon-instruction{font-size:8px;margin-top:4px}
.flight-deck{min-height:430px;background-position:54% center}.sector-heading{padding:0 15px;gap:8px;justify-content:space-between}.sector-heading h1{font-size:8px;letter-spacing:.6px}.sector-heading h1 span{letter-spacing:.3px;margin-left:4px}.sector-heading p{font-size:8px;letter-spacing:0}.scene-vignette{box-shadow:inset 0 0 45px #02061144}
dialog{width:calc(100% - 22px);max-height:calc(100svh - 24px)}.dialog-shell{max-height:calc(100svh - 28px)}.dialog-header{padding:15px 17px}.dialog-header .micro{font-size:8px;letter-spacing:.5px}.close-button{gap:8px;font-size:11px}.close-button kbd{display:none}.dialog-tabs{padding-inline:19px;gap:18px}.dialog-tabs button{font-size:11px;padding-block:15px;line-height:1.5;text-align:left}.dialog-content{padding:25px 20px;min-height:250px}.dialog-content .micro{font-size:10px}.dialog-content h2{font-size:26px;line-height:1.3;letter-spacing:0}.purpose-layout{grid-template-columns:1fr;gap:24px}.purpose-visual{min-height:210px}.purpose-visual>span{font-size:9px;left:18px;right:18px;letter-spacing:1px}.purpose-copy>p{font-size:15px}.purpose-principles{gap:14px}.purpose-principles b{font-size:10px}.portfolio-grid{grid-template-columns:1fr}.portfolio-card{padding:21px}.portfolio-intro{font-size:14px}.dialog-footer{padding:14px 18px}.dialog-footer>span{font-size:8px;letter-spacing:0;max-width:110px;line-height:1.7}.dialog-footer>button{font-size:11px;padding:11px 12px;white-space:nowrap}.dialog-footer>button>span{margin-left:9px}#scene-fallback{inset:165px 15px 215px;padding:20px;font-size:14px}#scene-fallback button{font-size:12px}}
@media(max-width:360px){.bridge-header{padding-inline:10px}.sector-heading{padding-inline:10px}.sector-heading p{font-size:7px}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important}}

/* Investment galaxy and destination panels */
.bridge-name strong{font-size:12px;letter-spacing:0}
.station-link{left:50%;color:#c5b7ff}
.scene,.world-labels{transform-origin:var(--arrival-x,50%) var(--arrival-y,20%);transition:transform .65s cubic-bezier(.32,0,.2,1),opacity .65s}
.approaching .scene,.approaching .world-labels{transform:scale(1.55);opacity:.25;pointer-events:none}
.approaching .planet-link{pointer-events:none}
.arrival-status{position:absolute;left:50%;top:38%;transform:translateX(-50%);z-index:6;font:12px var(--mono);letter-spacing:2px;text-align:center;color:var(--cyan);padding:20px;border-block:1px solid var(--line);background:#07131bbd}
.dialog-content h2{letter-spacing:-.5px}
.dialog-header,.dialog-tabs{flex-shrink:0}
.text-button{display:inline-flex;align-items:center;min-height:44px;padding:10px 0;border:0;background:none;color:var(--cyan);font-size:14px;line-height:1.5;text-decoration:none;text-align:left}
.text-button:hover{color:white;text-decoration:underline;text-underline-offset:5px}
.share-control{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
.share-feedback{font-size:12px;color:var(--muted)}
.share-url{width:100%;min-width:0;color:var(--ink);background:#06111b;border:1px solid var(--line);padding:10px;font:12px var(--mono)}
.mission-actions,.detail-actions,.map-footer{display:flex;align-items:center;gap:26px;flex-wrap:wrap;border-top:1px solid var(--line);margin-top:24px;padding-top:12px}
.mission-actions .share-control,.detail-actions .share-control,.map-footer .share-control{margin-left:auto}
.investment-galaxy{overflow:hidden;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;position:relative;padding:12px;background:radial-gradient(ellipse at 20% 40%,#1955692b,transparent 60%),linear-gradient(#030b16bd,#030b16de),url('/assets/milky-way.jpg') center/cover;border:1px solid #54869b30}
.star-system{min-width:0;position:relative;min-height:210px;padding:18px 12px 14px;isolation:isolate;display:flex;flex-direction:column;border:1px solid #729fb418;border-radius:50% 50% 12px 12px / 15% 15% 12px 12px}
.system-intelligence{grid-column:span 2}
.system-header{display:flex;justify-content:space-between;align-items:baseline;gap:10px;position:relative;z-index:1}
.system-name{font-size:14px;line-height:1.5;font-weight:400;letter-spacing:.3px;color:var(--system-color);margin:0}
.system-count{font:10px var(--mono);color:#94aebc;white-space:nowrap}
.system-orbit{position:absolute;z-index:-1;inset:60px 7px 18px;border:1px solid color-mix(in srgb,var(--system-color) 24%,transparent);border-radius:50%;transform:rotate(-12deg);box-shadow:0 0 35px color-mix(in srgb,var(--system-color) 5%,transparent),inset 0 0 25px #101f3638}
.system-orbit:after{content:"";position:absolute;inset:16px -4px;border:1px solid color-mix(in srgb,var(--system-color) 12%,transparent);border-radius:50%;transform:rotate(18deg)}
.system-stars{display:flex;flex:1;flex-wrap:wrap;justify-content:center;align-items:center;gap:12px 8px;padding-top:18px}
.company-star{width:112px;min-height:94px;position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:10px 5px 8px;border:1px solid transparent;border-radius:9px;background:radial-gradient(ellipse,#071421df,transparent 72%);transition:border-color .2s,background .2s,transform .2s}
.company-star:hover,.company-star:focus-visible{border-color:var(--system-color);background:#112330;transform:translateY(-3px)}
.company-star:before{content:"";position:absolute;top:0;left:calc(50% - 2px);width:4px;height:4px;border-radius:50%;background:var(--system-color);box-shadow:0 0 9px var(--system-color)}
.company-star .company-brand{font-size:14px;overflow-wrap:anywhere;height:40px;width:100%;margin:0;justify-content:center;gap:0}
.company-star .company-brand img{max-width:102px;height:30px;object-position:center}
.company-star .company-brand .logo-mark{width:40px;height:28px}
.company-star .company-name{display:none}
.star-name{display:block;margin-top:9px;font-size:12px;line-height:1.4;color:#b7cbd6}
.system-intelligence .company-star:nth-child(even){margin-top:26px}
.map-caption{font-size:12px;color:var(--muted);line-height:1.6;max-width:280px}
.back-to-map{margin-bottom:20px}
.company-detail{max-width:760px;margin:0 auto;padding:12px 0 20px}
.company-detail>.company-brand{margin:8px 0 34px;height:75px;max-width:310px}
.company-detail>.company-brand img{height:62px;max-width:290px}
.company-detail>.company-brand .logo-mark{height:42px;width:66px}
.company-detail .company-tagline{font-size:32px;line-height:1.4;margin-bottom:14px}
.company-description,.technology-focus>p{font-size:16px;line-height:1.8;color:#b3c5ce;max-width:680px}
.technology-focus{margin-top:30px;padding:22px 24px;background:linear-gradient(110deg,#17344085,#0a1621);border-left:2px solid var(--cyan)}
.technology-focus h3{font:13px var(--mono);font-weight:400;text-transform:uppercase;letter-spacing:1px;color:var(--cyan);margin:0}
.technology-focus .focus-note{font-size:12px;line-height:1.6;color:var(--muted);margin-bottom:0}
.technology-focus .text-button{font-size:12px}
.contact-layout{display:grid;grid-template-columns:1.5fr 1fr;gap:40px;align-items:center;min-height:380px}
.contact-copy{font-size:16px;line-height:1.8;color:#b3c5ce;max-width:420px}
.contact-email{display:inline-flex;gap:22px;font-size:clamp(20px,3vw,30px);letter-spacing:-.5px;text-decoration:none;color:var(--cyan);padding:20px 0;border-bottom:1px solid var(--line);overflow-wrap:anywhere;max-width:100%}
.contact-email:hover{color:white}.contact-caption{font:12px var(--mono);line-height:1.6;color:var(--muted);margin-top:22px}
.contact-orbit{aspect-ratio:1;border:1px solid #bfb0ff55;border-radius:50%;position:relative;display:grid;place-items:center;background:radial-gradient(circle,#8d7bdd16,transparent 66%);box-shadow:0 0 0 22px #bfb0ff05,0 0 0 23px #bfb0ff15}
.contact-orbit:before{content:"";position:absolute;inset:15%;border:1px dashed #bfb0ff55;border-radius:50%;animation:spin 60s linear infinite}
.contact-frequency{font:12px var(--mono);line-height:2;letter-spacing:2px;text-align:center;color:#c5b7ff}
@media(min-width:761px) and (max-width:1180px){.bridge-name{display:flex}.bridge-name strong{font-size:10px;max-width:260px;white-space:normal;line-height:1.5}}
@media(max-width:760px){
  .header-tools{gap:4px}.library-button{gap:4px;font-size:9px;padding-inline:6px}.icon-button{padding-inline:6px}
  .planet-link{width:100px}.planet-link strong{font-size:10px;white-space:normal}.beacon-instruction{font-size:8px}.planet-hit-area{width:54px}
  .dialog-tabs{gap:18px;padding-inline:18px}.dialog-tabs button{font-size:12px;min-height:48px}.dialog-content{padding:24px 18px}
  .investment-galaxy{grid-template-columns:1fr;padding:8px;gap:14px}.system-intelligence{grid-column:auto}.star-system{min-height:185px;padding:18px 12px}.system-stars{gap:12px}.company-star{width:calc(50% - 8px);max-width:145px}.system-intelligence .company-star:nth-child(even){margin-top:0}.system-header{flex-wrap:wrap;gap:4px}.system-count{font-size:10px}
  .mission-actions,.detail-actions,.map-footer{gap:12px 22px}.mission-actions .share-control,.detail-actions .share-control,.map-footer .share-control{margin-left:0}.map-caption{max-width:none;width:100%}
  .company-detail .company-tagline{font-size:26px}.company-detail>.company-brand{margin-bottom:24px}.technology-focus{padding:20px 16px}
  .contact-layout{grid-template-columns:1fr;min-height:0;gap:34px}.contact-orbit{width:150px;margin:0 auto 25px}.contact-frequency{font-size:10px}.contact-email{font-size:23px;gap:14px}
  .arrival-status{width:80%;font-size:11px;letter-spacing:1px}
}
@media(prefers-reduced-motion:reduce){.scene,.world-labels,.company-star{transition:none}.contact-orbit:before,.loading-state:before{animation:none}}
#dialog-title:focus{outline:none}
.dialog-content:has(.investment-galaxy){padding-top:24px;padding-bottom:24px}
.dialog-content:has(.investment-galaxy) h2{margin-bottom:10px;line-height:1.25}
.portfolio-intro{margin-bottom:20px}
.map-footer{margin-top:16px;padding-top:6px}

/* Flight instruments */
:root {
  --header-height: 76px;
  --sector-height: 36px;
  --instrument-bg: #0a121a;
  --instrument-edge: #31414e;
  --signal: #a1e8e4;
}

.bridge-header {
  gap: clamp(18px, 2vw, 34px);
  padding-inline: clamp(18px, 2.8vw, 48px);
  background: linear-gradient(110deg, #111e29, #0b131c 50%, #0c161e);
  border-bottom-color: #364653;
}
.brand {
  display: grid;
  place-items: center;
  width: clamp(121px, 10.8vw, 151px);
  height: calc(var(--header-height) - 10px);
  mix-blend-mode: normal;
}
.brand svg { display: block; width: 100%; height: 100%; }
.bridge-name { padding-left: clamp(18px, 2vw, 32px); }
.bridge-name strong { font: 500 12px/1.5 var(--sans); color: #c9d6de; }
.header-tools { gap: 7px; }
.header-tools button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 38px;
  border: 1px solid var(--instrument-edge);
  border-radius: 4px;
  background: #111e29;
  color: #d9e4e7;
  font: 600 12px/1 var(--sans);
  white-space: nowrap;
}
.header-tools .icon-button { min-width: 38px; padding-inline: 9px; }
.icon-button svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; }
.icon-button span { margin: 0; font: 10px var(--mono); letter-spacing: .04em; }
#sound-button[aria-pressed="false"] { color: #9ba9b4; }
#sound-button[aria-pressed="false"] span { color: inherit; }
.play-triangle, #pause-button[aria-pressed="true"] .pause-bars { display: none; }
#pause-button[aria-pressed="true"] .play-triangle { display: initial; }
#pause-button[aria-pressed="true"] { color: var(--amber); border-color: #776546; }
.header-tools .hangar-button { padding-inline: 16px; }
.header-tools .library-button { padding-inline: 17px; gap: 0; background: var(--signal); border-color: var(--signal); color: #0a2125; }
.library-button .full-label { font: inherit; color: inherit; white-space: pre; }
.library-button b { font-size: 16px; font-weight: 400; margin-left: 12px; }
.header-tools button:hover { background: #1d303e; border-color: #6a8995; }
.header-tools .library-button:hover { background: #c1faf4; border-color: #c1faf4; }
.bridge-header [hidden], #hangar-dialog:not([open]), .hangar-shell [hidden] { display: none; }

.sector-heading {
  padding-inline: clamp(18px, 2.8vw, 48px);
  background: linear-gradient(90deg, #0b151ff5, #0a141de0 58%, #111a22ea);
  border-bottom: 1px solid #93b6c01f;
}
.sector-heading h1 { font-size: 10px; letter-spacing: .13em; color: #e5ecee; }
.sector-heading h1 span { color: var(--signal); }
.sector-heading p, .module-progress { color: #a6b8c2; }
.planet-link { --beacon: #a8e9e8; color: var(--beacon); }
.planet-link.amber { --beacon: #ffd69c; }
.planet-link.station-link { --beacon: #d8d0ff; }
.planet-link strong, .beacon-instruction {
  width: max-content;
  max-width: 100%;
  margin-inline: auto;
  padding-inline: 5px;
  background: #08111be6;
  border-radius: 2px;
  text-shadow: 0 1px 2px #000;
}
.planet-link strong { color: var(--beacon); font: 600 13px/1.5 var(--sans); letter-spacing: .01em; }
.beacon-instruction { margin-top: 2px; padding-block: 1px; font: 9px/1.4 var(--mono); color: #c1d2da; }
.planet-link:hover strong, .planet-link:focus-visible strong { color: #fff; }
.score-heading, .score-body > strong { color: #d5f0ee; }
.score-heading > span:first-child::before { content: ""; display: inline-block; width: 5px; height: 5px; margin-right: 7px; background: var(--signal); border-radius: 50%; vertical-align: 1px; }

.investment-galaxy { background-color: #0a1620; }
.company-star { width: clamp(120px, 13vw, 158px); max-width: 100%; min-height: 106px; }
.company-star .company-brand { height: 48px; }
.company-star .company-brand img { width: 100%; max-width: 142px; height: 42px; }
.company-star .company-brand .logo-mark { width: 57px; height: 37px; }
.company-detail > .company-brand { max-width: min(410px, 100%); height: 88px; }
.company-detail > .company-brand img { max-width: 100%; height: 76px; }
.company-detail > .company-brand .logo-mark { width: 82px; height: 53px; }

/* Inspection bay */
#hangar-dialog {
  color-scheme: dark;
  width: min(1120px, calc(100% - 64px));
  max-width: none;
  height: min(780px, 86svh);
  max-height: calc(100svh - 32px);
  margin: auto;
  overflow: hidden;
  background: var(--instrument-bg);
  border: 1px solid #566773;
  border-radius: 8px;
  box-shadow: 0 28px 110px #000b;
}
#hangar-dialog::backdrop { background: #030810d9; backdrop-filter: blur(6px); }
.hangar-shell { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; height: 100%; }
.hangar-header, .hangar-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-inline: clamp(18px, 3vw, 38px); }
.hangar-header { padding-block: clamp(13px, 2vh, 22px); background: linear-gradient(115deg, #18242f, #0d1720 70%); }
.hangar-header p { margin: 0 0 5px; font: 600 10px/1.3 var(--mono); text-transform: uppercase; letter-spacing: .16em; color: #9cbbc4; }
.hangar-header h2 { margin: 0; font: 550 clamp(24px, 3vw, 35px)/1.08 var(--sans); letter-spacing: -.045em; color: #f0f3f3; }
.hangar-header em { margin-left: .14em; font-style: normal; font-weight: 400; color: #c2d3d8; }
#hangar-close { width: 42px; height: 42px; flex: none; display: grid; place-items: center; border: 1px solid #425563; border-radius: 4px; background: #141f29; color: #daebec; font: 300 26px/1 var(--sans); }
#hangar-close:hover { border-color: var(--signal); color: white; }
.hangar-stage {
  position: relative;
  min-height: 0;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(ellipse at 53% 52%, #2c3d4d 0%, #192631 37%, transparent 75%),
    linear-gradient(155deg, #1a2734, #121e29 45%, #0b131d);
  border-block: 1px solid #3c4d5b;
}
.hangar-stage::before, .hangar-stage::after { content: ""; position: absolute; pointer-events: none; }
.hangar-stage::before {
  inset: 14px;
  background:
    repeating-linear-gradient(90deg, #adc8d24f 0 1px, transparent 1px 12px) top / 100% 4px,
    repeating-linear-gradient(90deg, #adc8d238 0 1px, transparent 1px 12px) bottom / 100% 4px,
    repeating-linear-gradient(0deg, #adc8d233 0 1px, transparent 1px 12px) left / 4px 100%,
    repeating-linear-gradient(0deg, #adc8d233 0 1px, transparent 1px 12px) right / 4px 100%;
  background-repeat: no-repeat;
}
.hangar-stage::after {
  inset: 14px;
  --corner: #9db6c2b0;
  background:
    linear-gradient(var(--corner) 0 0) top left / 18px 1px,
    linear-gradient(var(--corner) 0 0) top left / 1px 18px,
    linear-gradient(var(--corner) 0 0) bottom right / 18px 1px,
    linear-gradient(var(--corner) 0 0) bottom right / 1px 18px;
  background-repeat: no-repeat;
}
#hangar-canvas { position: absolute; inset: 0; display: block; width: 100%; height: 100%; touch-action: none; cursor: grab; outline-offset: -6px; background: transparent; }
#hangar-canvas:active { cursor: grabbing; }
.hangar-footer { min-height: 62px; padding-block: 8px; background: #101b24; }
.hangar-footer > span { font: 11px/1.4 var(--mono); letter-spacing: .04em; color: #b6c9d1; }
.hangar-footer [role="group"] { display: inline-flex; gap: 3px; }
.hangar-footer button { min-width: 57px; min-height: 36px; padding-inline: 13px; border: 1px solid transparent; border-radius: 3px; background: transparent; color: #bbced6; font: 500 12px var(--sans); }
.hangar-footer button:hover { background: #1a2d38; color: #fff; }
.hangar-footer button[aria-pressed="true"] { border-color: #619293; background: #193338; color: #baf2ed; }

@media (max-width: 760px) {
  :root { --header-height: 62px; --sector-height: 32px; }
  .bridge-header { gap: 7px; padding-inline: clamp(8px, 3vw, 18px); }
  .brand { width: clamp(92px, 27vw, 124px); height: 52px; }
  .header-tools { gap: 4px; }
  .header-tools button { min-height: 40px; height: 40px; font-size: 11px; }
  .header-tools .icon-button { min-width: 35px; padding-inline: 7px; }
  .header-tools .hangar-button { padding-inline: 10px; }
  .header-tools .library-button { padding-inline: 10px; }
  .library-button b { margin-left: 5px; font-size: 13px; }
  .library-button .full-label { display: none; }
  .sector-heading { padding-inline: 12px; }
  .sector-heading h1 { font-size: 8px; letter-spacing: .05em; }
  .planet-link strong { font-size: 11px; line-height: 1.45; white-space: nowrap; padding-inline: 3px; }
  .beacon-instruction { font-size: 8px; }
  .company-star { width: calc(50% - 6px); max-width: 156px; min-height: 95px; }
  .company-star .company-brand { height: 43px; }
  .company-star .company-brand img { height: 35px; }
  .company-detail > .company-brand { height: 75px; }
  .company-detail > .company-brand img { height: 64px; }
  #hangar-dialog { width: calc(100% - 20px); height: min(84svh, calc(110vw + 98px), 700px); max-height: calc(100svh - 16px); }
  .hangar-header, .hangar-footer { padding-inline: 16px; }
  .hangar-footer { min-height: 60px; }
  .hangar-footer button { min-width: 40px; min-height: 42px; padding-inline: 9px; }
  .hangar-footer > span { font-size: 10px; letter-spacing: 0; white-space: nowrap; }
  .hangar-stage::before, .hangar-stage::after { inset: 9px; }
}

@media (max-width: 445px) {
  #sound-button span { display: none; }
  #sound-button[aria-pressed="false"] svg { opacity: .62; }
  #sound-button[aria-pressed="false"] { background: linear-gradient(45deg, transparent 48.3%, #a3b6c1 49%, #a3b6c1 51%, transparent 51.7%) center / 17px 17px no-repeat, #111e29; }
}
@media (max-width: 360px) {
  .bridge-header { gap: 4px; padding-inline: 8px; }
  .header-tools { gap: 3px; }
  .header-tools .icon-button { min-width: 33px; }
  .header-tools .hangar-button, .header-tools .library-button { padding-inline: 8px; }
  .planet-link strong { font-size: 10px; }
  .hangar-header, .hangar-footer { padding-inline: 12px; }
}
@media (max-height: 500px) {
  #hangar-dialog { height: calc(100svh - 16px); max-height: calc(100svh - 16px); }
  .hangar-header { padding-block: 7px; }
  .hangar-header p { margin-bottom: 2px; }
  .hangar-header h2 { font-size: 23px; }
  .hangar-footer { min-height: 44px; padding-block: 2px; }
}

.header-tools .hangar-button { gap: 7px; border-color: #726455; color: #ffdbad; background: linear-gradient(135deg, #332a23, #1b2025); }
.hangar-button svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.45; stroke-linejoin: round; }
.header-tools .hangar-button:hover { background: #42362b; border-color: #d3a575; }
.header-tools .library-button { background: linear-gradient(112deg, #c4f6ed, #94dedd); }
@media (max-width: 445px) { .hangar-button svg { display: none; } }

/* Cockpit view */
.flight-deck [hidden] { display: none; }
.sector-heading { z-index: 4; }
.sector-tools { margin-left: auto; display: flex; align-items: center; gap: 16px; }
.sector-tools .module-progress { margin-left: 0; }
.reset-button { pointer-events: auto; margin: 0; padding: 4px 9px; border: 1px solid #9cd0da38; border-radius: 3px; background: #0a141dcc; color: #c3d6dc; font: 9px/1.3 var(--mono); letter-spacing: .04em; white-space: nowrap; }
.reset-button:hover { color: var(--signal); border-color: #9cd0da80; }

.hud-panel { position: absolute; z-index: 3; top: calc(var(--sector-height) + 14px); padding: 10px 12px; background: #070f18bf; border: 1px solid #9cd0da2b; border-radius: 4px; }
.score-panel { right: clamp(12px, 2.2vw, 36px); width: 196px; }
.score-heading { display: flex; justify-content: space-between; gap: 10px; font: 9px var(--mono); letter-spacing: 1px; white-space: nowrap; }
.score-heading > span:last-child { font-size: 8px; letter-spacing: 0; color: var(--amber); overflow: hidden; text-overflow: ellipsis; }
.score-body { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 6px; }
.score-body > strong { font: 400 30px/1.1 var(--mono); letter-spacing: -1.4px; font-variant-numeric: tabular-nums; }
.score-meta { display: flex; flex-direction: column; gap: 6px; font: 9px var(--mono); color: var(--muted); white-space: nowrap; }
.score-meta > span { display: flex; justify-content: space-between; gap: 14px; }
.score-meta b { font-weight: 400; color: var(--ink); }

.flight-controls { left: clamp(12px, 2.2vw, 36px); display: grid; grid-template-columns: auto 1fr; gap: 6px 10px; align-items: center; margin: 0; font-size: 10px; color: #b4c6ce; pointer-events: none; }
.flight-controls dt { display: flex; gap: 3px; justify-content: flex-end; }
.flight-controls dd { margin: 0; white-space: nowrap; }
.control-keys { display: flex; gap: 3px; }
.flight-rule { grid-column: 1 / -1; margin-top: 3px; padding-top: 7px; border-top: 1px solid #9cd0da24; font: 8px var(--mono); letter-spacing: .3px; color: #7f9aa5; }

.flight-message { position: absolute; z-index: 3; top: calc(var(--sector-height) + 66px); left: 50%; transform: translateX(-50%); max-width: min(620px, calc(100% - 32px)); padding: 3px 10px; font: 10px/1.5 var(--mono); letter-spacing: .3px; color: #cfe3e6; background: #06101a8c; border-radius: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: none; text-shadow: 0 1px 3px #000; }
.flight-message::before { content: "+"; color: var(--signal); margin-right: 8px; }

/* Destination labels follow their planet; outside the view they become edge markers that point the way. */
.planet-link, .planet-link.amber, .station-link { left: -999px; top: -999px; width: max(154px, var(--hit, 68px)); height: auto; transform: translate(-50%, calc(var(--hit, 68px) / -2)); }
.planet-hit-area { position: relative; width: var(--hit, 68px); height: var(--hit, 68px); }
.planet-link.offscreen .planet-hit-area { border-color: currentColor; background: #08111bd9; }
.planet-link.offscreen .planet-hit-area::after { content: ""; position: absolute; inset: 0; margin: auto; width: 0; height: 0; border-left: 10px solid currentColor; border-block: 6px solid transparent; transform: rotate(var(--bearing, 0rad)); }
.planet-link.offscreen { width: 132px; }
.planet-link.offscreen .planet-hit-area { margin-bottom: 4px; }
.planet-link.offscreen strong { font-size: 11px; }
.planet-link.offscreen .beacon-instruction { display: none; }
#space:focus-visible { outline: 2px solid #8ee4e373; outline-offset: -4px; }

@media (max-height: 560px) { .flight-controls { display: none; } }
@media (max-width: 760px) {
  .sector-tools { gap: 8px; }
  .reset-button { padding: 3px 7px; font-size: 8px; }
  .hud-panel { top: calc(var(--sector-height) + 32px); padding: 7px 9px; }
  .score-panel { right: 8px; width: 128px; }
  .score-heading { display: block; font-size: 8px; letter-spacing: .8px; }
  .score-heading > span:last-child { display: block; margin-top: 4px; min-height: 10px; }
  .score-body { margin-top: 4px; gap: 7px; }
  .score-body > strong { font-size: 22px; letter-spacing: -1px; }
  .score-meta { font-size: 7px; gap: 4px; }
  .score-meta > span { gap: 6px; }
  .flight-controls { display: none; }
  .flight-message { top: var(--sector-height); left: 0; right: 0; transform: none; max-width: none; padding-block: 4px; font-size: 9px; text-align: center; border-radius: 0; background: #06101ad9; }
  .planet-link, .planet-link.amber, .station-link { width: max(104px, var(--hit, 54px)); }
  .planet-link.offscreen { width: 104px; }
  .planet-link.offscreen strong { font-size: 10px; }
}
/* Touch controls: phones, and any wider screen without a mouse (tablets, phones held sideways). */
@media (max-width: 760px), (pointer: coarse) {
  .flight-controls { display: none; }
  /* The stick and weapon keys are parts of the cockpit model; these invisible touch areas are laid over them by the game. */
  .touch-controls { position: absolute; z-index: 4; inset: 0; display: block; pointer-events: none; }
  .flight-stick { position: absolute; pointer-events: auto; touch-action: none; -webkit-user-select: none; user-select: none; }
  .touch-controls button { position: absolute; aspect-ratio: 1; padding: 0; border: 0; border-radius: 50%; background: none; transform: translate(-50%, -50%); pointer-events: auto; touch-action: manipulation; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
  .touch-controls button:focus-visible { outline: 2px solid var(--signal); outline-offset: 1px; }
  .touch-controls #fire-button { touch-action: none; }
}
/* A phone held sideways: give the height to the view instead of scrolling the cockpit off the screen. */
@media (max-height: 500px) {
  :root { --header-height: 52px; --sector-height: 28px; }
  .flight-deck { min-height: 280px; }
  .header-tools button { height: 34px; }
  .hud-panel { top: calc(var(--sector-height) + 8px); padding: 6px 9px; }
  .score-body > strong { font-size: 22px; }
  .flight-message { top: calc(var(--sector-height) + 72px); }
}
