/* GO2DataWorks data-centre & subsea atlas · brand: Instrument (graphite #07090C, cyan #C6F24E, paper, mint).
   Mobile-first. The panel is a bottom sheet below 900px and a left column above it.
   Same rules as the site: hairlines, 2px radius, no glass, no blur. Motion is off under prefers-reduced-motion. */

@font-face { font-family: "Archivo"; src: url(fonts/archivo-go2.woff2) format("woff2"); font-weight: 400 700; font-stretch: 100% 125%; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url(fonts/IBMPlexMono-400.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url(fonts/IBMPlexMono-500.woff2) format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Archivo Fallback"; src: local("Arial"), local("ArialMT"); ascent-override: 85.41%; descent-override: 20.43%; line-gap-override: 0%; size-adjust: 102.8%; }
@font-face { font-family: "Plex Mono Fallback"; src: local("Courier New"), local("CourierNewPSMT"), local("Roboto Mono"), local("DejaVu Sans Mono"); ascent-override: 102.5%; descent-override: 27.5%; line-gap-override: 0%; size-adjust: 100%; }

:root {
  --g: #07090C;
  --g2: #0B1520;
  --panel: rgba(12, 15, 19, .97);
  --paper: #F4F7F9;
  --ink: #07090C;
  --cyan: #C6F24E;
  --blue: #AEB6C2;
  --mint: #D4F873;
  --line: #232931;
  --line-2: #2C3A4B;
  --muted: #8590A0;
  --fa: "Archivo", "Archivo Fallback", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --fm: "IBM Plex Mono", "Plex Mono Fallback", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --attr-h: 28px;
  --peek: 138px;          /* visible part of the bottom sheet when collapsed */
  --sheet-vis: 138px;     /* JS keeps this equal to the visible height of the sheet (mobile) */
  --ease: cubic-bezier(.2, 0, 0, 1);
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; margin: 0; overflow: hidden; overscroll-behavior: none; }
body { background: var(--g); color: var(--paper); font: 400 14px/1.45 var(--fa); -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 60; padding: 10px 14px; background: var(--paper); color: var(--ink); text-decoration: none; border-radius: 2px; font-weight: 500; }
.skip:focus { top: 12px; }

#map { position: fixed; inset: 0 0 var(--attr-h) 0; background: var(--g); }
.maplibregl-canvas { outline: none; }
.maplibregl-canvas-container.maplibregl-interactive { cursor: grab; }

/* ---------- brand ---------- */
.brand { position: fixed; z-index: 20; left: 14px; top: calc(12px + env(safe-area-inset-top)); display: flex; align-items: center; gap: 10px; pointer-events: none; }
.brand .mark { display: block; }
.brand-t { display: flex; flex-direction: column; line-height: 1.1; margin: 0; font-weight: 400; }
.brand-t b { font: 600 15px/1.1 var(--fa); letter-spacing: .01em; }
.brand-t span { font: 400 10px/1.3 var(--fm); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-top: 3px; }

/* ---------- attribution (always visible) ---------- */
.attr { position: fixed; z-index: 40; left: 0; right: 0; bottom: 0; height: var(--attr-h); padding: 0 12px calc(0px + env(safe-area-inset-bottom)); display: flex; align-items: center; gap: 14px; overflow: hidden; white-space: nowrap;
  background: var(--g); border-top: 1px solid var(--line); font: 400 10.5px/1 var(--fm); color: var(--muted); }
.attr a { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.attr a:hover { color: var(--paper); }
.attr .own { margin-left: auto; letter-spacing: .06em; }

/* ---------- panel / bottom sheet ---------- */
#panel { position: fixed; z-index: 30; left: 0; right: 0; bottom: var(--attr-h); height: min(86dvh, calc(100dvh - 76px - var(--attr-h)));
  background: var(--panel); border-top: 1px solid var(--line-2); border-radius: 6px 6px 0 0; display: flex; flex-direction: column;
  transform: translateY(var(--sy, calc(100% - var(--peek)))); transition: transform .32s var(--ease); will-change: transform; touch-action: pan-y; }
#panel.dragging { transition: none; }
.handle { flex: none; appearance: none; background: none; border: 0; height: 26px; width: 100%; display: flex; align-items: center; justify-content: center; touch-action: none; cursor: grab; }
.handle i { display: block; width: 40px; height: 4px; border-radius: 2px; background: var(--line-2); }
.handle:hover i { background: var(--muted); }

.search { position: relative; flex: none; padding: 0 14px 10px; }
.search .ico { position: absolute; left: 26px; top: 14px; color: var(--muted); pointer-events: none; }
.search input { width: 100%; height: 46px; padding: 0 14px 0 40px; background: var(--g); color: var(--paper); border: 1px solid var(--line-2); border-radius: 2px; font: 400 16px/1 var(--fa); appearance: none; -webkit-appearance: none; }
.search input::placeholder { color: #8590A0; }
.search input:focus-visible { outline: 2px solid var(--cyan); outline-offset: 0; border-color: var(--cyan); }
.search input::-webkit-search-cancel-button { filter: invert(.8); }
.search input:disabled { opacity: .55; }
#results { list-style: none; margin: 6px 0 0; padding: 4px 0; background: var(--g2); border: 1px solid var(--line-2); border-radius: 2px; max-height: 38dvh; overflow: auto; }
#results li { display: flex; align-items: baseline; gap: 10px; min-height: 44px; padding: 10px 14px; cursor: pointer; align-items: center; }
#results li[aria-selected="true"], #results li:hover { background: #161A20; box-shadow: inset 2px 0 0 var(--cyan); }
#results .t { flex: none; width: 66px; font: 500 9.5px/1 var(--fm); letter-spacing: .12em; text-transform: uppercase; color: var(--cyan); }
#results .n { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#results .s { flex: none; font: 400 11px/1 var(--fm); color: var(--muted); }
#results .none { color: var(--muted); cursor: default; }
#results .none:hover { background: none; box-shadow: none; }

#panel[data-state="peek"] .scroll { overflow: hidden; }
.scroll { flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding-bottom: 18px; }
.scroll section { padding: 16px 14px; border-top: 1px solid var(--line); }
.scroll h2 { margin: 0 0 10px; font: 500 10.5px/1 var(--fm); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }

.stats { border-top: 0 !important; padding-top: 4px !important; }
.hero { margin: 0 0 12px; display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.hero .num { font: 500 34px/1 var(--fm); letter-spacing: -.01em; color: var(--paper); font-variant-numeric: tabular-nums; }
.hero .lbl { font: 400 12px/1.3 var(--fa); color: var(--muted); max-width: 18ch; }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin: 0; background: var(--line); border: 1px solid var(--line); }
.grid > div { background: var(--g2); padding: 10px 12px 11px; min-width: 0; }
.grid dt { font: 400 9.5px/1.2 var(--fm); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.grid dd { margin: 5px 0 0; font: 500 18px/1 var(--fm); font-variant-numeric: tabular-nums; }

/* switches */
.sw { width: 100%; min-height: 46px; display: flex; align-items: center; gap: 12px; padding: 0 2px; background: none; border: 0; border-bottom: 1px solid var(--line); text-align: left; font: 500 14px/1 var(--fa); }
.sw:last-child { border-bottom: 0; }
.sw em { margin-left: auto; font: 400 11px/1 var(--fm); color: var(--muted); font-style: normal; font-variant-numeric: tabular-nums; }
.sw::after { content: ""; flex: none; width: 34px; height: 18px; border-radius: 9px; background: var(--line-2); box-shadow: inset 0 0 0 1px #3A4048; background-image: radial-gradient(circle at 9px 9px, var(--paper) 6px, transparent 6.5px); background-repeat: no-repeat; transition: background-position .16s var(--ease), background-color .16s linear; }
.sw[aria-checked="true"]::after { background-color: var(--cyan); box-shadow: none; background-image: radial-gradient(circle at 25px 9px, var(--g) 6px, transparent 6.5px); }
.sw[aria-checked="false"] { color: var(--muted); }
.dot { flex: none; width: 10px; height: 10px; border-radius: 50%; }
.dot-dc { background: var(--cyan); box-shadow: 0 0 0 3px rgba(198, 242, 78, .2); }
.dot-cab { width: 16px; height: 2px; border-radius: 1px; background: var(--cyan); margin: 0 -3px; }
.dot-land { background: var(--mint); }
.dot-mot { background: transparent; box-shadow: inset 0 0 0 1.5px var(--muted); }

/* top 20 */
#top20 { list-style: none; margin: 0; padding: 0; counter-reset: r; }
#top20 li { counter-increment: r; }
#top20 button { position: relative; width: 100%; min-height: 40px; display: grid; grid-template-columns: 24px 1fr auto; align-items: center; gap: 8px; padding: 0 2px; background: none; border: 0; border-bottom: 1px solid var(--line); text-align: left; overflow: hidden; }
#top20 button::before { content: counter(r, decimal-leading-zero); font: 400 10.5px/1 var(--fm); color: #6E7682; }
#top20 .bar { position: absolute; left: 0; bottom: 0; height: 2px; background: linear-gradient(90deg, var(--cyan), rgba(198, 242, 78, 0)); opacity: .75; transform-origin: left; }
#top20 .n { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#top20 .c { font: 500 12.5px/1 var(--fm); font-variant-numeric: tabular-nums; }
#top20 button:hover { background: #0F1B29; }

.about p { margin: 0 0 10px; color: #C7CDD6; font-size: 13px; line-height: 1.5; }
.about code { font: 400 11.5px/1 var(--fm); color: var(--cyan); background: var(--g); padding: 2px 5px; border-radius: 2px; border: 1px solid var(--line); white-space: nowrap; }
.about .fine { color: var(--muted); font-size: 12px; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 12px; font: 400 11px/1 var(--fm); color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.lg { display: inline-block; flex: none; }
.lg-fac { width: 7px; height: 7px; border-radius: 50%; background: var(--cyan); }
.lg-cl { min-width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--cyan); background: rgba(198, 242, 78, .14); color: var(--paper); font: 500 9px/17px var(--fm); text-align: center; font-style: normal; }
.lg-cab { width: 22px; height: 0; border-top: 1.5px solid var(--cyan); }
.lg-spec { width: 22px; height: 0; border-top: 1.5px dashed var(--cyan); }
.lg-land { width: 8px; height: 8px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 2px var(--g), 0 0 0 3px var(--mint); }

/* ---------- facility card ---------- */
#card { position: fixed; z-index: 35; left: 12px; right: 12px; bottom: calc(var(--attr-h) + var(--sheet-vis) + 10px); max-height: 46dvh; overflow: auto;
  padding: 16px 16px 14px; background: var(--panel); border: 1px solid var(--line-2); border-radius: 2px; box-shadow: 0 10px 30px rgba(0, 0, 0, .45); }
#card[hidden] { display: none; }
#card .x { position: absolute; right: 4px; top: 4px; width: 44px; height: 44px; display: grid; place-items: center; background: none; border: 0; font-size: 24px; line-height: 1; color: var(--muted); }
#card .x:hover { color: var(--paper); }
#card .kicker { margin: 0 0 6px; font: 500 10px/1 var(--fm); letter-spacing: .16em; text-transform: uppercase; color: var(--cyan); }
#card h2 { margin: 0 44px 12px 0; font: 600 18px/1.25 var(--fa); overflow-wrap: anywhere; }
#card dl { margin: 0; display: grid; grid-template-columns: 1fr; gap: 0; border-top: 1px solid var(--line); }
#card dl > div { display: grid; grid-template-columns: 84px 1fr; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
#card dt { font: 400 10px/1.5 var(--fm); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); padding-top: 2px; }
#card dd { margin: 0; overflow-wrap: anywhere; }
#card dd small { font: 400 11px/1 var(--fm); color: var(--muted); margin-left: 6px; }
#card .src { margin: 12px 0 0; display: flex; flex-direction: column; gap: 6px; }
#card .src a { align-self: flex-start; display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; background: var(--paper); color: var(--ink); border-radius: 2px; font: 500 14px/1 var(--fa); text-decoration: none; }
#card .src a::after { content: "\2197"; margin-left: 8px; }
#card .src a:hover { background: #fff; }
#card .src span { font: 400 10.5px/1.4 var(--fm); color: var(--muted); }

/* ---------- map controls ---------- */
.ctl { position: fixed; z-index: 25; right: 12px; bottom: calc(var(--attr-h) + var(--sheet-vis) + 12px); display: flex; flex-direction: column; gap: 1px; background: var(--line-2); border: 1px solid var(--line-2); border-radius: 2px; }
.ctl button { width: 46px; height: 46px; display: grid; place-items: center; background: var(--panel); border: 0; color: var(--paper); }
.ctl button:hover { background: #161A20; }
body.has-card .ctl { bottom: calc(var(--attr-h) + var(--sheet-vis) + 12px); }

/* ---------- boot / loading: a poster of the real default view paints first, a hairline shows progress ---------- */
#poster-wrap { position: fixed; inset: 0 0 var(--attr-h) 0; z-index: 1; display: block; background: var(--g); transition: opacity .5s linear; }
#poster-wrap.out { opacity: 0; }
#poster { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 50%; }
html[data-boot]:not(.cinema) #map { background: transparent; }
html.cinema #poster-wrap { display: none; }
.boot { position: fixed; z-index: 50; left: 0; right: 0; top: 0; height: 2px; pointer-events: none; background: transparent; transition: opacity .5s linear .1s, visibility 0s linear .6s; }
.boot .bar { display: block; width: 100%; height: 2px; background: rgba(35, 41, 49, .8); overflow: hidden; }
.boot .bar b { display: block; height: 100%; width: 8%; background: var(--cyan); transition: width .35s var(--ease); }
html:not([data-boot]) .boot { opacity: 0; visibility: hidden; }
.nojs { position: fixed; z-index: 60; inset: auto 12px 60px; padding: 14px; background: var(--g2); border: 1px solid var(--line-2); }

/* ---------- desktop ---------- */
@media (min-width: 900px) {
  :root { --sheet-vis: 0px; }
  .brand { left: 20px; top: 18px; }
  #panel { left: 16px; right: auto; top: 76px; bottom: calc(var(--attr-h) + 16px); width: 380px; height: auto; transform: none !important; border: 1px solid var(--line-2); border-radius: 2px; transition: none; touch-action: auto; }
  .handle { display: none; }
  .search { padding-top: 14px; }
  .search .ico { top: 28px; }
  #card { left: auto; right: 16px; top: 16px; bottom: auto; width: 360px; max-height: calc(100dvh - 96px); }
  .ctl { right: 16px; bottom: calc(var(--attr-h) + 16px); }
  .attr { padding: 0 16px; }
  .brand-t b { font-size: 16px; }
}
@media (max-width: 899px) {
  body.has-card .ctl { display: none; }      /* the card sits where the controls are; pinch still zooms */
  .brand { right: 12px; }
  .brand-t span { letter-spacing: .1em; }
  #card { max-height: 40dvh; }
}
@media (max-width: 520px) {
  .attr .own { display: none; }
  .attr { gap: 10px; font-size: 10px; }
}
/* tall phone: the sheet can show a bit more when peeking */
@media (max-height: 640px) and (max-width: 899px) { :root { --peek: 120px; } }

@media (prefers-reduced-motion: reduce) {
  #panel, .sw::after, .boot, .boot .bar b, #poster-wrap { transition: none !important; }
}
/* cinema mode: no UI, used for the recorded fly-along only */
html.cinema .brand, html.cinema #panel, html.cinema #card, html.cinema #ctl, html.cinema .skip { display: none !important; }
html.cinema #map { inset: 0; }

/* ---------- back to the site (18.10: the atlas opens on its own page) ---------- */
.brand { pointer-events: auto; }
.brand-home { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; }
/* R3 (19.10.2026; Hriso: "na atlas da ima opciq za vrashtane pak v menu"): Back to GO2 + Menu + the CTA, phone and laptop. */
.atlas-nav { position: fixed; z-index: 21; right: 12px; top: calc(10px + env(safe-area-inset-top)); display: flex; align-items: center; gap: 8px; }
.atlas-nav a { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font: 600 13px/1 var(--fa); text-decoration: none; padding: 0 16px; border-radius: 999px; border: 1px solid #2A3038; color: #ECEFF3; background: rgba(12,15,19,.82); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); transition: border-color .2s, background-color .2s; }
.atlas-nav a:hover { border-color: #ECEFF3; }
.atlas-nav a svg { flex: none; }
.atlas-nav a.atlas-nav__cta { background: #C6F24E; border-color: #C6F24E; color: #07090C; }
.atlas-nav a.atlas-nav__cta:hover { background: #D4F873; border-color: #D4F873; }
.atlas-nav a:focus-visible { outline: 2px solid #C6F24E; outline-offset: 2px; }
.atlas-nav__menu i { position: relative; width: 14px; height: 9px; border-top: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; }
.atlas-nav__menu i::after { content: ""; position: absolute; left: 0; right: 0; top: 2.25px; height: 1.5px; background: currentColor; }
/* Phones and tablets: the lockup and Menu on the first row, Back to GO2 and the CTA on the second. */
@media (max-width: 899px) {
  .atlas-nav { left: 12px; display: grid; grid-template-columns: auto auto; grid-template-areas: ". menu" "back cta"; justify-content: space-between; row-gap: 10px; pointer-events: none; }
  .atlas-nav a { pointer-events: auto; min-height: 40px; padding: 0 14px; font-size: 13px; }
  .atlas-nav__menu { grid-area: menu; justify-self: end; }
  .atlas-nav__back { grid-area: back; justify-self: start; }
  .atlas-nav__cta { grid-area: cta; justify-self: end; }
  .brand { right: auto; top: calc(19px + env(safe-area-inset-top)); }
  /* the open sheet stops under the second row, so Back and the CTA stay reachable */
  #panel { height: min(86dvh, calc(100dvh - 118px - var(--attr-h) - env(safe-area-inset-top))); }
}

/* new GO2 lockup (18.10: "na atlasa promeni ni logoto") */
.brand .lockup { display: block; height: 22px; width: auto; }
@media (min-width: 900px) { .brand .lockup { height: 26px; } }
.brand-t span { margin-top: 0; }
/* phone header: the lockup + caption never touch the CTA (18.10 bug: "Request engineers" sat on the caption) */
@media (max-width: 480px) {
  .atlas-nav a { padding: 0 12px; font-size: 12.5px; }
  /* final QA 18.10: the caption still ran under the CTA at 390 px; on phones the lockup alone, the caption stays for screen readers */
  .brand-t span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
