/* Bridge-first presentation layer. The controls remain live HTML. */
body { background: #071018; }
.shell { max-width: none; padding: 0; }
.topbar, .tabs { padding-left: max(30px, calc((100vw - 1500px)/2)); padding-right: max(30px, calc((100vw - 1500px)/2)); background: #071823; }
.topbar { border-bottom-color: #35576a; }
.tabs { border-bottom-color: #263d49; }
.tab-link { display: flex; align-items: center; text-decoration: none; white-space: nowrap; }
.return-bridge { display: none; color: #c9e1ea; background: #173344; border: 1px solid #527186; border-radius: 3px; padding: 7px 12px; font-size: 11px; }
body.focus-mode .return-bridge { display: inline-block; }
.bridge-scene { position: relative; width: min(100%, 1671px); margin: auto; aspect-ratio: 1671 / 941; overflow: hidden; background: #0a1924; box-shadow: 0 25px 70px #000a; }
.bridge-photo { display: block; width: 100%; height: 100%; object-fit: cover; }
.bridge-scene::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(90deg,#06141e88,transparent 27%,transparent 76%,#06141e77),linear-gradient(0deg,#06141ea9,transparent 22%); }
.bridge-heading { position: absolute; top: 5%; left: 3%; z-index: 3; color: white; text-shadow: 0 2px 10px #000; }
.bridge-heading span { display: block; color: #abe8e8; font: 11px ui-monospace,monospace; letter-spacing: 2px; margin-bottom: 9px; }
.bridge-heading strong { display: block; font-size: clamp(22px,2.1vw,37px); font-weight: 750; letter-spacing: -.04em; }
.bridge-heading small { display: block; font-size: clamp(10px,1vw,14px); color: #d6e8e7; margin-top: 7px; }
.scene-monitor { position: absolute; z-index: 2; left: 25.7%; top: 41.8%; width: 49.2%; height: 28.2%; overflow: hidden; color: #e8f5f9; background: #061621; box-shadow: inset 0 0 28px #000; }
.mini-window-bar { height: 16%; display: flex; align-items: center; justify-content: space-between; padding: 0 3%; background: #102e3f; color: #b2d5df; font: clamp(6px,.65vw,11px) ui-monospace,monospace; letter-spacing: .1em; }
.mini-window-bar span:last-child { color: #68e8b6; }
.mini-preview { height: 84%; display: none; position: relative; }
.mini-preview.active { display: flex; }
.mini-sidebar { width: 9%; border-right: 1px solid #31505e; background: #092330; display: grid; place-items: center; color: #7daebc; font-size: clamp(9px,1vw,15px); }
.mini-content { flex: 1; padding: 2% 3%; font-size: clamp(6px,.75vw,11px); }
.mini-content b { display: block; font-size: 1.15em; }
.mini-content>span { display: block; color: #7cabb8; margin: .8% 0 2%; }
.mini-file { border-top: 1px solid #2d4e5e; padding: 1.3% 0; color: #d8e9e9; }
.mini-file em { font-style: normal; float: right; color: #79d1e7; }
.mini-lock { display: none; position: absolute; inset: 0; place-items: center; background: #400f1ee8; color: #ffe1e2; font: bold clamp(10px,1.1vw,18px) ui-monospace,monospace; letter-spacing: .08em; }
body.ransom-infected .mini-lock { display: grid; }
.mini-gnss { background: #0e2a32; overflow: hidden; }
.mini-grid { position: absolute; inset: 0; background-image: linear-gradient(#5b899033 1px,transparent 1px),linear-gradient(90deg,#5b899033 1px,transparent 1px); background-size: 24px 24px; }
.mini-planned { position: absolute; left: 5%; right: 4%; top: 61%; border-top: 2px dashed #66c4f1; transform: rotate(-7deg); }
.mini-track { position: absolute; left: 5%; width: 49%; top: 56%; border-top: 2px solid #71f0b9; transform: rotate(-9deg); }
.mini-ship { position: absolute; left: 53%; top: 45%; color: #8dfbd0; font-size: clamp(15px,2vw,28px); text-shadow: 0 0 10px #2bffad; }
.mini-readout { position: absolute; right: 2%; top: 7%; background: #092132dc; padding: 2%; color: #cfebee; font: clamp(6px,.7vw,11px) ui-monospace,monospace; }
.mini-readout b,.mini-readout span { display: block; }
.mini-readout span { color: #77e5b5; margin-top: 5px; }
body.gnss-alert .mini-ship { top: 22%; }
body.gnss-alert .mini-readout span { color: #ff8390; }
.scene-enter { position: absolute; inset: 0; width: 100%; border: 0; background: transparent; color: white; display: flex; flex-direction: column; align-items: flex-end; justify-content: flex-end; padding: 0 2% 2%; }
.scene-enter span { background: #0b4b68d9; border: 1px solid #75bed5; padding: 5px 9px; font-size: clamp(7px,.8vw,12px); font-weight: 700; }
.scene-enter small { margin-top: 2px; font: clamp(5px,.53vw,8px) ui-monospace,monospace; letter-spacing: .14em; }
.scene-enter:hover { background: #8cebd511; }
.scene-enter:focus-visible { outline: 3px solid #87f0d2; outline-offset: -3px; }
.bridge-legend { position: absolute; z-index: 3; left: 3%; right: 3%; bottom: 3%; display: flex; gap: 20px; color: #c9dfe5; font: clamp(8px,.8vw,12px) ui-monospace,monospace; text-shadow: 0 1px 8px black; }
.bridge-legend span:last-child { margin-left: auto; }
body:not(.focus-mode) main { display: none; }
body.focus-mode { background: linear-gradient(#06111beb,#06111bf0),url(bridge-scene.webp) center/cover fixed; }
body.focus-mode .bridge-scene { display: none; }
body.focus-mode main { max-width: 1500px; margin: 0 auto; padding: 1px 30px 0; background: #081823e8; min-height: calc(100vh - 170px); box-shadow: 0 20px 80px #0008; }
footer { max-width: 1500px; margin: 20px auto 24px; padding: 0 30px; }
.pc-chrome { height: 41px; display: flex; align-items: center; gap: 15px; padding: 0 14px; margin-top: 23px; border: 1px solid #728e9b; border-bottom: 0; border-radius: 5px 5px 0 0; background: linear-gradient(#c6d7dc,#b3c8d0); color: #1d3441; font: 11px ui-monospace,monospace; }
.pc-chrome strong { font-weight: 700; }
.pc-chrome span:last-child { margin-left: auto; color: #3f5e6d; }
.pc-lights { display: flex; gap: 5px; }
.pc-lights i { display: block; width: 8px; height: 8px; border-radius: 50%; background: #608490; }
.pc-lights i:first-child { background: #ce6770; }
.pc-lights i:nth-child(2) { background: #e5bd69; }
.pc-lights i:nth-child(3) { background: #70b88c; }
.pc-chrome + .section-head { margin: 0 0 19px; padding: 16px 20px; border: 1px solid #315266; border-top: 0; background: #102d3d; }
.pc-chrome + .section-head h1 { font-size: 24px; }
.pc-chrome + .section-head .eyebrow { font-size: 9px; }
#ransomware .ransom-layout { grid-template-columns: minmax(0,1.12fr) minmax(420px,.88fr); }
#ransomware .operations { border-radius: 3px; }
#ransomware .vessel-wrap { height: 315px; background: #0b2632; }
#ransomware .vessel { display: none; }
.ransom-ecdis { height: 100%; position: relative; overflow: hidden; background: #174352; }
.ecdis-water { position: absolute; inset: 0; background-image: linear-gradient(#78b9c11c 1px,transparent 1px),linear-gradient(90deg,#78b9c11c 1px,transparent 1px); background-size: 42px 42px; }
.ecdis-water svg { width: 100%; height: 100%; }
.ecdis-label { position: absolute; top: 12px; left: 12px; background: #062632d9; border: 1px solid #6596a4; padding: 8px 11px; color: #d9f0ec; font: 10px ui-monospace,monospace; }
.ecdis-label b,.ecdis-label span { display: block; }
.ecdis-label span { margin-top: 5px; color: #b3cfce; }
.ecdis-compass { position: absolute; top: 14px; right: 15px; border: 1px solid #83b7ba; border-radius: 50%; width: 58px; height: 58px; display: grid; place-content: center; text-align: center; color: #cbe9e5; background: #0c3340d9; font: 9px/1.3 ui-monospace,monospace; }
#ransomware .banner { z-index: 3; }
.ransom-warning { display: none; position: absolute; inset: 0; z-index: 2; place-content: center; text-align: center; background: #220a15dc; color: white; padding: 20px; border: 3px solid #ff5b6e; }
.ransom-warning span { color: #ff9da8; font: 11px ui-monospace,monospace; letter-spacing: .15em; }
.ransom-warning strong { font-size: clamp(23px,2.3vw,38px); margin-top: 12px; }
.ransom-warning p { color: #f6d2d4; font-size: 12px; line-height: 1.6; }
.ransom-warning small { color: #ca8d99; font: 10px ui-monospace,monospace; }
body.ransom-infected .ransom-ecdis { filter: grayscale(1) brightness(.38); }
body.ransom-infected .ransom-warning { display: grid; }
body.ransom-infected #ransomware .operations { border-color: #bc465b; }
#ransomware .files { background: #e4ebef; color: #203746; border-radius: 3px; border-color: #9bb2bd; }
#ransomware .files .panel-head { background: #c7d9e2; border-color: #b2c7d0; }
#ransomware .files .panel-head small { color: #567c8b; }
#ransomware .files .panel-head .icon { color: #216884; }
#ransomware .file-path { background: #f8fbfc; color: #476575; border-bottom: 1px solid #c5d3da; }
#ransomware .file-head { background: #d9e5eb; color: #426476; }
#ransomware .file-list { padding: 0 10px; }
#ransomware .file-row { color: #263b48; border-color: #c1d1d8; }
#ransomware .file-row:hover { background: #d4e6ed; }
#ransomware .file-row.featured { background: #cde2ec; }
#ransomware .file-row.featured:hover { background: #bbd9e8; }
#ransomware .file-name em { color: #337895; }
#ransomware .file-name small,#ransomware .file-type,#ransomware .file-hint { color: #668391; }
#ransomware .file-open { color: #136688; }
#ransomware .file-row.featured .file-open { color: #985b12; }
#ransomware .file-row.locked .file-open,#ransomware .file-row.locked .file-name em { color: #bc3a4e; }
body.ransom-infected #ransomware .files { background: #eee1e3; border-color: #c86676; }
body.ransom-infected #ransomware .files .panel-head { background: #e6bfc5; }
#gnss .chart-panel { border-radius: 3px; }
#gnss .chart-wrap { height: 545px; background: #183a40; }
.chart-tiles { position: absolute; inset: 0; overflow: hidden; z-index: 0; background: #245260; filter: saturate(.55) brightness(.72); }
.chart-tiles img { position: absolute; user-select: none; pointer-events: none; }
#chart { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
#gnss .chart-label { z-index: 3; background: #071b26e8; color: #9dc8d3; }
#gnss .chart-label b { color: #e4f4f5; }
.chart-alert { display: none; position: absolute; z-index: 3; top: 16px; right: 16px; max-width: 280px; border-left: 4px solid #ff6072; background: #4b1f2be8; color: #ffe6e8; padding: 10px 13px; font-size: 11px; line-height: 1.5; }
body.gnss-alert .chart-alert { display: block; }
.map-attribution { position: absolute; z-index: 3; bottom: 8px; right: 8px; color: #20383c; background: #ffffffe0; padding: 2px 4px; font: 9px sans-serif; }
#gnss .chart-empty { z-index: 4; }
.instrument-strip { display: grid; grid-template-columns: repeat(4,1fr); background: #071c29; border-top: 1px solid #426273; }
.instrument-strip>div { padding: 13px 14px; border-right: 1px solid #25465b; }
.instrument-strip small { display: block; color: #8cadbd; font: 9px ui-monospace,monospace; letter-spacing: .04em; }
.instrument-strip strong { color: #74e8be; font: bold 21px ui-monospace,monospace; margin-top: 5px; display: inline-block; }
.instrument-strip span { color: #82aebc; font: 10px ui-monospace,monospace; margin-left: 4px; }
#source-short { font-size: 13px; }
body.gnss-alert .instrument-strip strong { color: #ffbe83; }
.file-preview-dialog { width: min(650px,calc(100vw - 28px)); background: #e7eef1; color: #243a47; border: 1px solid #7896a5; border-radius: 4px; padding: 0; box-shadow: 0 24px 80px #0009; }
.file-preview-dialog::backdrop { background: #030b13b8; backdrop-filter: blur(4px); }
.preview-bar { height: 40px; display: flex; align-items: center; justify-content: space-between; background: #bdd2dc; border-bottom: 1px solid #96b1bd; padding: 0 13px; font: 11px ui-monospace,monospace; }
.preview-bar button { background: transparent; color: #334f5d; border: 0; font-size: 24px; line-height: 1; }
.preview-body { padding: 25px 31px 29px; }
.preview-body .eyebrow { color: #337897; }
.preview-body h2 { font-size: 20px; margin: 0 0 17px; }
.preview-body pre { color: #203640; background: #fff; border: 1px solid #c1d1d7; padding: 20px; font: 13px/1.9 ui-monospace,"Apple SD Gothic Neo",monospace; white-space: pre-wrap; min-height: 215px; }
.preview-body small { color: #728994; font-size: 10px; }
@media(max-width:1000px) {
  #ransomware .ransom-layout { grid-template-columns: 1fr; }
  .bridge-heading { top: 4%; }
  .bridge-legend span:last-child { display: none; }
  .instrument-strip strong { font-size: 17px; }
}
@media(max-width:700px) {
  .topbar,.tabs { padding-left: 13px; padding-right: 13px; }
  .tabs { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 0; }
  .tab { min-width: 0; display: flex; align-items: center; justify-content: center; padding: 0 2px; font-size: 10px; white-space: nowrap; }
  .tab b { margin-right: 4px; }
  .tabs-note { display: none; }
  .return-bridge { padding: 6px; font-size: 9px; }
  .bridge-scene { height: calc(100vh - 126px); min-height: 470px; aspect-ratio: auto; }
  .bridge-photo { object-fit: cover; object-position: center; }
  .bridge-heading { top: 6%; left: 6%; right: 6%; }
  .bridge-heading strong { font-size: 27px; }
  .scene-monitor { left: 6%; top: 42%; width: 88%; height: 36%; border: 4px solid #172730; border-radius: 4px; box-shadow: 0 12px 35px #000b; }
  .mini-window-bar { font-size: 8px; }
  .mini-content { font-size: 9px; }
  .mini-sidebar { font-size: 13px; }
  .mini-ship { font-size: 22px; }
  .mini-readout { font-size: 8px; }
  .scene-enter span { font-size: 10px; }
  .bridge-legend { left: 6%; right: 6%; bottom: 3%; flex-direction: column; gap: 5px; font-size: 9px; }
  body.focus-mode main { padding: 1px 12px 0; }
  .pc-chrome { font-size: 9px; margin-top: 15px; gap: 7px; }
  .pc-chrome span:last-child { display: none; }
  .pc-chrome + .section-head { padding: 13px; }
  #ransomware .vessel-wrap { height: 245px; }
  .ransom-warning strong { font-size: 22px; }
  .ransom-warning p { font-size: 10px; }
  #gnss .chart-wrap { height: 440px; }
  .instrument-strip { grid-template-columns: repeat(2,1fr); }
  .instrument-strip>div { border-bottom: 1px solid #25465b; }
  .instrument-strip strong { font-size: 17px; }
  .chart-alert { top: 69px; left: 17px; right: auto; max-width: 240px; }
  .map-attribution { bottom: 7px; right: 7px; }
}
