/* «БИКСеть», the telecom game of the group. The colours come from the tokens of the app: the accent of the app (var(--accent)) is the "mine" of the person and the colour of the
   buttons, the colour of an operator is a separate thing and is set by the page as --c on the node. The surfaces: the page (--bg), a surface (--card), a raised one (--net-raised),
   the map (the sea is --card, the land is lighter or darker than it by the theme, so it is the same in the light and in the dark theme). */
.net-root {
  --net-ok: #2fb36b; --net-warn: #e08a1a; --net-bad: #e5484d;
  --net-ok-text: color-mix(in srgb, var(--net-ok) 68%, var(--text));
  --net-warn-text: color-mix(in srgb, var(--net-warn) 68%, var(--text));
  --net-bad-text: color-mix(in srgb, var(--net-bad) 70%, var(--text));
  --net-raised: color-mix(in srgb, var(--card) 82%, var(--text) 6%);
  --net-land: color-mix(in srgb, var(--bg) 48%, var(--card));
  --net-sea: var(--card);
}
body:has(.net-root) .ai-launcher { display: none; }

/* the game is a mode of its own: its tab bar takes the place of the one of the app (games.js puts net-mode on <html>, app.js takes it off) */
html.net-mode #tabs { display: none; }
html.net-mode body { padding-bottom: calc(var(--nav-h) + 12px + env(safe-area-inset-bottom)); }
.net-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--c); flex: none; }

/* the top bar: the way out, the operator, the balance and the income of an hour, the level */
.net-top { display: flex; align-items: center; gap: 10px; margin: -4px 0 10px; }
.net-top h1 { margin: 0; font-size: 22px; line-height: 1.2; }
.net-exit { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 12px; background: var(--card); color: var(--text); cursor: pointer; }
.net-top-main { flex: 1; min-width: 0; display: grid; gap: 1px; }
.net-top-name { display: flex; align-items: center; gap: 6px; min-width: 0; color: var(--hint); font-size: 13px; }
.net-top-name span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.net-season-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 0 8px; min-width: 0; }
.net-season-meta .net-top-name { flex: 0 1 auto; }
.net-season-button { flex: none; min-height: 32px; padding: 0 6px; border: 0; border-radius: 8px; background: transparent; color: var(--accent); font: inherit; font-size: 12px; font-weight: 650; cursor: pointer; }
.net-season-button:hover { background: var(--card); }
.net-season-dialog { box-sizing: border-box; width: min(440px, calc(100% - 24px)); max-height: min(80dvh, 640px); margin: auto; padding: 16px; overflow: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); color: var(--text); }
.net-season-dialog::backdrop { background: rgba(0, 0, 0, .55); }
.net-season-dialog header { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.net-season-dialog h2, .net-season-dialog h3, .net-season-dialog p { margin: 0; }
.net-season-dialog h3 { font-size: 16px; }
.net-season-dialog > h3, .net-season-admin { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.net-season-history { margin-top: 8px; }
.net-season-history summary { padding: 10px 0; cursor: pointer; }
.net-season-history summary .meta { margin-inline-start: 10px; }
.net-season-history ol { margin: 0; padding-inline-start: 24px; }
.net-season-history li { padding: 4px 0; overflow-wrap: anywhere; }
.net-season-history li span + span { display: block; }
.net-season-admin { display: grid; gap: 8px; }
.net-season-admin [role="status"]:empty { display: none; }
.net-season-admin .btn { margin: 0; min-height: 44px; }
.net-top-money { display: flex; align-items: baseline; flex-wrap: wrap; column-gap: 8px; font-variant-numeric: tabular-nums; }
.net-top-money strong { font-size: 18px; line-height: 1.25; white-space: nowrap; }
.net-top-income { color: var(--net-ok-text); font-size: 13px; font-weight: 600; white-space: nowrap; }
.net-top-income.bad { color: var(--net-bad-text); }
.net-level { flex: none; display: grid; justify-items: center; gap: 5px; min-width: 58px; min-height: 44px; padding: 7px 10px; border: 0; border-radius: 12px; background: var(--card); color: var(--text); font: inherit; font-size: 13px; font-weight: 650; cursor: pointer; }
.net-level-bar { width: 38px; height: 4px; overflow: hidden; border-radius: 4px; background: var(--line); }
.net-level-bar i { display: block; height: 100%; background: var(--accent); }
.net-ask { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 12px; background: var(--card); color: var(--accent); font: inherit; font-size: 20px; font-weight: 800; cursor: pointer; }
.net-exit:focus-visible, .net-ask:focus-visible, .net-level:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* the tab bar of the game: four sections, the same place and size as the one of the app */
.net-tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 5; display: flex; height: calc(var(--nav-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); background: var(--bg); border-top: 1px solid var(--line); }
.net-tabbar button { position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 44px; border: 0; background: none; color: var(--hint); font: inherit; font-size: 11px; cursor: pointer; }
.net-tabbar button[aria-current="page"] { color: var(--text); font-weight: 650; }
.net-tabbar button[aria-current="page"] .net-icon { color: var(--accent); }
.net-tabbar button:focus-visible { outline: 2px solid var(--accent); outline-offset: -6px; border-radius: 12px; }
.net-tab-dot { position: absolute; top: 9px; left: calc(50% + 10px); width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }

/* the sections */
.net-title { margin: 2px 0 12px; font-size: 22px; font-weight: 700; line-height: 1.2; letter-spacing: 0; text-transform: none; color: var(--text); }
.net-section-title { margin: 20px 0 8px; font-size: 16px; }
.net-section-note { margin: -4px 0 8px; }
.net-sub-head { display: grid; gap: 2px; }
.net-sub-head .back { justify-self: start; }
.net-row-icon { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--net-raised); color: var(--accent); }
.net-row-icon svg { width: 24px; height: 24px; }
.net-row > .net-icon:last-child { color: var(--hint); }
.net-earn .net-daily { margin-top: 14px; }
/* the tour: the part a step is about is lit, the rest of the screen is dimmed; the card says what it is */
.net-tour { position: fixed; inset: 0; z-index: 60; }
.net-tour-spot { position: fixed; border-radius: 14px; box-shadow: 0 0 0 9999px rgba(0, 0, 0, .62); pointer-events: none; transition: left 220ms ease, top 220ms ease, width 220ms ease, height 220ms ease; }
.net-tour-spot.off { left: 50%; top: 50%; width: 0; height: 0; }
.net-tour-card { position: fixed; display: grid; gap: 8px; width: calc(100vw - 32px); padding: 16px; border-radius: 16px; background: var(--card); color: var(--text); box-shadow: 0 12px 32px rgba(0, 0, 0, .35); outline: none; }
.net-tour-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.net-tour-count { color: var(--hint); font-size: 12px; font-variant-numeric: tabular-nums; }
.net-tour-skip { min-height: 36px; padding: 0 4px; border: 0; background: none; color: var(--hint); font: inherit; font-size: 14px; cursor: pointer; }
.net-tour-title { font-size: 17px; }
.net-tour-text { margin: 0; line-height: 1.45; }
.net-tour-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }
.net-tour-actions .btn { min-height: 40px; }
.net-tour-again { justify-self: start; }
@media (prefers-reduced-motion: reduce) { .net-tour-spot { transition: none; } }

/* the equipment of a station */
.net-gear { display: grid; gap: 6px; font-size: 13px; }
.net-gear-head { display: inline-flex; align-items: center; gap: 6px; color: var(--hint); }
.net-gear-hint.warn { color: var(--net-warn-text); }
.net-gear-hint.bad { color: var(--net-bad-text); }
.net-gear-chip { display: inline-flex; align-items: center; gap: 3px; font-size: 11px; font-variant-numeric: tabular-nums; color: var(--hint); }
.net-gear-chip.warn { color: var(--net-warn-text); }
.net-gear-chip.bad { color: var(--net-bad-text); font-weight: 650; }
.net-renew.broken { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--net-bad) 55%, transparent); }
.net-renew .net-upg-head .net-status { margin-left: auto; white-space: nowrap; }

/* the filters of the list of stations */
.net-stations { display: grid; gap: 10px; }
.net-filters { border-radius: 12px; background: var(--card); }
.net-filters > summary { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; font-weight: 600; cursor: pointer; list-style: none; }
.net-filters > summary::-webkit-details-marker { display: none; }
.net-filters > summary::after { content: "▾"; margin-left: auto; color: var(--hint); transition: transform 150ms ease; }
.net-filters[open] > summary::after { transform: rotate(180deg); }
.net-filter-body { display: grid; gap: 12px; padding: 0 14px 14px; }
.net-filter-group { display: grid; gap: 6px; min-width: 0; }
.net-filter-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.net-filter-select { appearance: auto; min-height: 40px; width: 100%; padding-left: 10px; padding-right: 6px; font-size: 14px; }
.net-filter-body > .btn { justify-self: start; }
.net-pill-count { margin-left: 5px; padding: 0 6px; border-radius: 99px; background: color-mix(in srgb, currentColor 16%, transparent); font-variant-numeric: tabular-nums; }
.net-filters > summary .net-pill-count { background: var(--accent); color: var(--accent-text); }
.net-pill:disabled { opacity: .45; cursor: default; }
.net-filter-empty { padding: 8px 0; }

/* several stations at once */
.net-stations-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.net-stations-head > .meta { margin: 0; }
.net-row.picked { box-shadow: inset 0 0 0 2px var(--accent); }
.net-pick-box { display: grid; place-items: center; flex: none; width: 26px; height: 26px; margin: 0 7px; border: 2px solid var(--line); border-radius: 8px; }
.net-pick-box.on { border-color: var(--accent); background: var(--accent); color: var(--accent-text); }
/* fixed over the tab bar of the game (the screen scrolls inside a block of its own, where a sticky bar would not stay); the list leaves room for it */
.net-pick-bar { position: fixed; left: 12px; right: 12px; bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 8px); z-index: 6; display: grid; gap: 8px; max-width: 560px;
  margin: 0 auto; padding: 12px; border-radius: 14px; background: var(--card); box-shadow: 0 6px 24px color-mix(in srgb, var(--text) 22%, transparent); }
.net-stations.picking { padding-bottom: 190px; }
.net-pick-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.net-pick-top strong { white-space: nowrap; }
.net-pick-top .link-action { width: auto; margin: 0; padding: 4px 0; border: 0; }
.net-pick-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.net-pick-actions .btn { flex: 1 1 auto; }

/* «История дохода» */
.net-income { display: grid; gap: 12px; }
.net-income-chart { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; align-items: end; height: 190px; }
.net-income-day { display: grid; grid-template-rows: auto 1fr auto; gap: 4px; height: 100%; padding: 4px 0; border: 0; border-radius: 10px; background: none; color: inherit; font: inherit; cursor: pointer; min-width: 0; }
.net-income-day.on { background: color-mix(in srgb, var(--accent) 12%, transparent); }
.net-income-day:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.net-income-value { font-size: 11px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: clip; }
.net-income-stack { display: flex; flex-direction: column-reverse; justify-content: flex-start; width: 62%; margin: 0 auto; min-height: 0; }
.net-income-stack i { display: block; width: 100%; min-height: 0; }
.net-income-stack i:last-child { border-radius: 6px 6px 0 0; }
.net-income-stack i.network { background: var(--net-ok, #2fb36b); }
.net-income-stack i.earned { background: var(--accent); }
.net-income-label { font-size: 12px; color: var(--hint); }
.net-income-day.today .net-income-label { color: var(--text); font-weight: 700; }
.net-income-legend { display: flex; gap: 16px; margin-top: 10px; font-size: 13px; color: var(--hint); }
.net-income-dot { display: inline-block; width: 9px; height: 9px; margin-right: 6px; border-radius: 3px; vertical-align: 0; }
.net-income-dot.network { background: var(--net-ok, #2fb36b); }
.net-income-dot.earned { background: var(--accent); }
.net-income-dot.spent { background: var(--danger, #e5484d); }
.net-income-date::first-letter { text-transform: uppercase; }

/* «Свой бренд» */
.net-segment { width: 100%; border: 0; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.net-segment.on { box-shadow: inset 0 0 0 2px var(--accent); }
.net-segment .net-upg-head .net-icon { color: var(--accent); }
.net-segment:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* «Реклама» */
.net-ads { display: grid; gap: 12px; }
.net-ads-note { margin: 0; max-width: 65ch; }
.net-ads-pick { display: grid; gap: 6px; }
.net-ads-district { appearance: auto; }
.net-ad.on { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--net-ok) 55%, transparent); }
.net-ad .net-upg-deltas > div > span:last-child { text-align: right; }
.net-games-failed { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.net-games-failed p { margin: 0; }
#net-games:focus { outline: none; }

/* the operator in «Развитие» */
.net-op { display: grid; gap: 12px; margin-bottom: 12px; }
.net-op-head { display: flex; align-items: center; gap: 12px; }
.net-op-title { flex: 1; min-width: 0; display: grid; gap: 2px; }
.net-op-title strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 17px; }
.net-op-level { font-size: 17px; }
.net-op-xp { display: flex; align-items: center; gap: 10px; font-variant-numeric: tabular-nums; }
.net-op-xp .meta { white-space: nowrap; font-size: 12px; }
.net-op-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 14px; margin: 0; }
.net-op-stats dt { color: var(--hint); font-size: 12px; }
.net-op-stats dd { margin: 2px 0 0; font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }
.net-op .net-lead-note { margin: 0; }
.net-op-more summary { min-height: 44px; display: flex; align-items: center; color: var(--accent); font-weight: 600; cursor: pointer; }
.net-op-more p { margin: 6px 0; max-width: 65ch; font-size: 14px; }
.net-op-color > .btn { margin-top: 10px; }
.net-op .net-achievement-row { margin: 0; }

/* «Группа»: the events are folded */
.net-events > summary { list-style: none; cursor: pointer; }
.net-events > summary::-webkit-details-marker { display: none; }
.net-events > summary .net-section-title::after { content: " ▾"; color: var(--hint); font-size: 13px; }
.net-events[open] > summary .net-section-title::after { content: " ▴"; }

/* the map: as much of the screen as the top bar and the tab bar leave; «+ БС» */
.net-root.shell[data-tab="map"] {
  --net-view: var(--tg-viewport-stable-height, 100vh);
  display: flex; flex-direction: column;
  height: calc(var(--net-view) - 16px - var(--nav-h) - 12px - env(safe-area-inset-bottom));
  min-height: 200px; /* a phone on its side: about 300 px are left, the map shrinks into them */
}
@supports (height: 100dvh) { .net-root.shell[data-tab="map"] { --net-view: var(--tg-viewport-stable-height, 100dvh); } }
.net-root.shell[data-tab="map"] .net-map-panel { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.net-root.shell[data-tab="map"] .net-card { flex: 1; min-height: 0; }
.net-root.shell[data-tab="map"] .net-map { height: 100%; min-height: 0; }
.net-build-toggle { position: absolute; left: 10px; bottom: 10px; z-index: 2; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 18px 0 14px; border: 0; border-radius: 22px; background: var(--accent); color: var(--accent-text); font: inherit; font-weight: 650; box-shadow: 0 4px 14px color-mix(in srgb, var(--text) 22%, transparent); cursor: pointer; }
.net-build-toggle.on { background: var(--bg); color: var(--text); }
.net-build-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.net-sheet:not([hidden]) ~ .net-build-toggle, .net-sheet:not([hidden]) ~ .net-build-hint { display: none; }
.net-build-hint { position: absolute; left: 50%; top: 10px; z-index: 2; transform: translateX(-50%); padding: 7px 14px; border-radius: 16px; background: color-mix(in srgb, var(--bg) 92%, transparent); font-size: 13px; white-space: nowrap; box-shadow: 0 2px 10px color-mix(in srgb, var(--text) 14%, transparent); }

.net-icon { flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* the first time */
.net-onboarding { display: grid; gap: 10px; margin: 12px 0; }
.net-onboarding p { margin: 0; }
.net-input { width: 100%; box-sizing: border-box; padding: 10px 12px; min-height: 44px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); color: var(--text); font: inherit; font-size: 16px; }
.net-swatches { display: flex; flex-wrap: wrap; gap: 12px; padding: 4px; }
.net-swatch { position: relative; width: 36px; height: 36px; border-radius: 50%; border: 2px solid transparent; background: var(--c); cursor: pointer; padding: 0; }
.net-swatch::after { content: ""; position: absolute; inset: -6px; }
.net-swatch.on { border-color: var(--text); box-shadow: 0 0 0 2px var(--bg) inset; }

/* the map: the main thing of the screen (MapLibre draws it, net_map.js; the style of the base map is net_style.js, the layers of the game are in net_map.js) */
.net-card { position: relative; border-radius: var(--radius); overflow: hidden; background: var(--net-sea); }
.net-map { height: clamp(340px, calc(100vh - 330px), 700px); height: clamp(340px, calc(100dvh - 330px), 700px); background: var(--net-sea); outline: none; }
.net-map:focus-visible { box-shadow: inset 0 0 0 2px var(--accent); }
.net-map-fail { display: grid; place-items: center; height: 100%; padding: 24px; text-align: center; color: var(--hint); }
.net-map .maplibregl-canvas { outline: none; }
.net-map .maplibregl-ctrl-attrib { background: color-mix(in srgb, var(--bg) 88%, transparent); color: var(--hint); font-size: 11px; border-radius: 12px; }
.net-map .maplibregl-ctrl-attrib a { color: var(--accent); }
.net-map .maplibregl-ctrl-attrib-button { background-color: color-mix(in srgb, var(--bg) 88%, transparent); border-radius: 12px; }
.net-map .maplibregl-ctrl-top-left { top: 4px; left: 4px; }
.net-zoom { position: absolute; right: 8px; top: 8px; display: grid; gap: 6px; }
.net-zoom-btn { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 12px; background: color-mix(in srgb, var(--bg) 90%, transparent); color: var(--text); cursor: pointer; box-shadow: 0 1px 6px color-mix(in srgb, #000 18%, transparent); }
.net-zoom-btn:focus-visible { outline: 2px solid var(--accent); }

/* the card of a site, from the bottom of the map */
.net-sheet { position: absolute; left: 8px; right: 8px; bottom: 8px; display: grid; gap: 8px; padding: 18px 14px 12px; border-radius: var(--radius); background: var(--bg); box-shadow: 0 8px 28px color-mix(in srgb, #000 28%, transparent); max-height: 72%; overflow: auto; overscroll-behavior: contain; }
.net-sheet::before { content: ""; position: absolute; left: 50%; top: 7px; width: 34px; height: 4px; margin-left: -17px; border-radius: 2px; background: var(--line); }
.net-sheet[hidden] { display: none; }
.net-sheet.enter { animation: net-sheet-in .25s ease-out; }
@keyframes net-sheet-in { from { transform: translateY(28px); opacity: 0; } }
.net-sheet-head { display: flex; align-items: center; gap: 10px; }
.net-sheet-title { flex: 1; min-width: 0; display: grid; gap: 1px; }
.net-sheet-title > .meta { overflow-wrap: anywhere; } /* wraps, not cut: a long district name left the demand behind «…» */
.net-sheet-line { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; }
.net-sheet-line strong { font-size: 18px; }
.net-sheet-close { flex: none; display: grid; place-items: center; width: 44px; height: 44px; margin: -6px -8px -6px 0; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--hint); cursor: pointer; }
.net-badge { flex: none; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: var(--c); color: var(--ink, #fff); }
.net-badge.small { width: 38px; height: 38px; color: #fff; }
.net-status { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 13px; }
.net-state { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.net-status.ok { color: var(--net-ok-text); }
.net-status.warn { color: var(--net-warn-text); }
.net-status.bad { color: var(--net-bad-text); }
.net-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.net-tag { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 99px; background: color-mix(in srgb, var(--hint) 16%, transparent); color: var(--text); font-size: 12px; font-weight: 600; line-height: 1.4; }
.net-tag.accent { background: color-mix(in srgb, var(--accent) 16%, transparent); color: color-mix(in srgb, var(--accent) 75%, var(--text)); }
.net-tag.own { background: var(--accent); color: var(--accent-text); }
.net-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.net-metric { display: grid; align-content: start; gap: 3px; min-width: 0; padding: 8px; border-radius: 10px; background: var(--card); }
.net-metric-label { display: inline-flex; align-items: center; gap: 4px; color: var(--hint); font-size: 11px; line-height: 1.2; white-space: nowrap; }
.net-metric strong { font-size: 14px; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 379px) { .net-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.net-bar { display: block; height: 5px; border-radius: 3px; background: var(--line); overflow: hidden; }
.net-bar i { display: block; height: 100%; background: var(--net-ok); }
.net-bar i.warn { background: var(--net-warn); }
.net-bar i.bad { background: var(--net-bad); }
.net-details { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 0; padding: 10px 12px; border-radius: 10px; background: var(--card); font-size: 14px; }
.net-details dt { color: var(--hint); }
.net-details dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.net-actions { display: grid; }

.net-kinds { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.net-kind { display: grid; justify-items: center; gap: 2px; min-height: 44px; padding: 9px 4px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--card); color: var(--text); text-align: center; cursor: pointer; font: inherit; font-size: 13px; }
.net-kind .meta { font-size: 12px; }
.net-kind.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, var(--card)); }
.net-kind:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.net-estimate { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; font-weight: 600; font-size: 14px; font-variant-numeric: tabular-nums; }
.net-estimate > span { display: inline-flex; align-items: center; gap: 5px; }

/* the stations of the person and the world */
.net-list { display: grid; gap: 8px; }
.net-row { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; padding: 10px 12px; border: 0; border-radius: var(--radius); background: var(--card); color: inherit; text-align: left; font: inherit; cursor: pointer; }
.net-row-body { flex: 1; min-width: 0; display: grid; gap: 4px; }
.net-row-side { display: grid; gap: 2px; justify-items: end; }
.net-job-card { display: grid; gap: 14px; margin: 4px 0 20px; padding: 16px; border-radius: var(--radius); background: var(--card); }
.net-job-card h2 { margin: 0; font-size: 19px; }
.net-job-card p { margin: 0; line-height: 1.45; }
.net-job-goals { display: grid; gap: 7px; padding: 11px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.net-job-goals-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; font-size: 14px; }
.net-job-goals-head span { color: var(--hint); font-variant-numeric: tabular-nums; }
.net-job-goals-track { height: 5px; overflow: hidden; border-radius: 3px; background: var(--line); }
.net-job-goals-track i { display: block; height: 100%; background: var(--accent); }
.net-job-goals .meta { font-size: 13px; }
.net-job-head, .net-job-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.net-job-head strong { color: var(--hint); font-size: 13px; }
.net-job-status { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 4px 12px; color: var(--hint); font-size: 13px; font-variant-numeric: tabular-nums; }
.net-job-status strong, .net-job-timer { color: var(--text); }
.net-job-board { position: relative; width: 100%; aspect-ratio: 4 / 3; border: 1px solid var(--line); border-radius: 16px; background: var(--bg); }
.net-job-lines { display: block; width: 100%; height: 100%; overflow: visible; }
.net-job-lines line { stroke: var(--line); stroke-width: 5; stroke-linecap: round; }
.net-job-lines line.chosen { stroke: var(--accent); }
.net-job-lines text { fill: var(--hint); font: 600 17px system-ui, sans-serif; text-anchor: middle; paint-order: stroke; stroke: var(--bg); stroke-width: 5; }
.net-job-node { position: absolute; transform: translate(-50%, -50%); width: 38px; height: 38px; padding: 0; border: 2px solid var(--line); border-radius: 50%; background: var(--card); color: var(--text); font: 700 13px system-ui, sans-serif; cursor: pointer; }
.net-job-node.source, .net-job-node.target { border-color: var(--accent); }
.net-job-node.used { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.net-job-node:disabled { opacity: .68; cursor: default; }
.net-job-node:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.net-job-footer { font-weight: 600; font-variant-numeric: tabular-nums; }
.net-job-reset { min-height: 44px; padding: 0 8px; border: 0; background: none; color: var(--accent); font: inherit; }
.net-job-reward { min-height: 21px; color: var(--hint); font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.net-job-submit { width: 100%; min-height: 48px; }
.net-job-submit:disabled { opacity: .5; }
.net-feed { display: flex; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.net-feed .meta { flex: none; font-variant-numeric: tabular-nums; }

/* the upgrades of a station */
.net-actions.two { grid-template-columns: 1fr 1fr; gap: 8px; }
.net-sheet-back { margin: -6px 0 -6px -8px; color: var(--text); }
.net-upg-list { display: grid; gap: 8px; }
.net-upg { display: grid; gap: 8px; padding: 10px 12px; border-radius: 12px; background: var(--card); }
.net-upg.off { opacity: .8; }
.net-upg-head { display: flex; align-items: center; gap: 8px; }
.net-upg-head strong { flex: 1; min-width: 0; font-size: 15px; }
.net-upg-level { display: inline-flex; align-items: center; gap: 5px; color: var(--hint); font-size: 13px; font-variant-numeric: tabular-nums; }
.net-upg-deltas { display: grid; gap: 4px; font-size: 14px; }
.net-upg-deltas > div { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.net-upg-values { display: inline-flex; align-items: center; gap: 6px; font-variant-numeric: tabular-nums; color: var(--hint); }
.net-upg-values strong { color: var(--text); }
.net-upg .btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; width: 100%; }
.net-upg-state { display: inline-flex; align-items: center; gap: 6px; color: var(--net-ok-text); font-weight: 600; font-size: 14px; }

/* the research: what is going on, the tree, the card */
.net-research { display: grid; gap: 12px; }
.net-run, .net-tech-card { display: grid; gap: 10px; padding: 12px 14px; border-radius: var(--radius); background: var(--card); }
.net-run-head { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; }
.net-run-head strong { font-size: 16px; }
.net-run-head .meta { margin-left: auto; }
.net-run-bar { height: 8px; border-radius: 4px; background: var(--line); overflow: hidden; }
.net-run-bar i { display: block; height: 100%; border-radius: 4px; background: var(--accent); transition: width .6s linear; }
.net-run-foot { display: flex; justify-content: space-between; align-items: baseline; font-variant-numeric: tabular-nums; }
.net-tree { position: relative; margin: 4px 0; }
.net-tree-lines { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.net-line { fill: none; stroke: var(--line); stroke-width: 2px; vector-effect: non-scaling-stroke; }
.net-line.next { stroke: color-mix(in srgb, var(--accent) 55%, var(--line)); }
.net-line.done { stroke: var(--net-ok); }
.net-node { position: absolute; transform: translateX(-50%); width: 45%; height: 66px; box-sizing: border-box; display: grid; grid-template-columns: auto 1fr; grid-template-rows: 1fr 1fr; column-gap: 8px; align-content: center; align-items: center; padding: 6px 8px; border: 0; border-radius: 12px; background: var(--card); color: var(--text); text-align: left; font: inherit; cursor: pointer; }
.net-node strong { font-size: 13px; line-height: 1.15; align-self: end; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.net-node-icon { grid-row: 1 / 3; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; background: color-mix(in srgb, var(--hint) 16%, transparent); color: var(--hint); }
.net-node-sub { display: inline-flex; align-items: center; gap: 4px; align-self: start; color: var(--hint); font-size: 11px; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.net-node-sub.ok { color: var(--net-ok-text); font-weight: 600; }
.net-node-sub.run { color: var(--accent); font-weight: 600; }
.net-node.done .net-node-icon { background: color-mix(in srgb, var(--net-ok) 20%, transparent); color: var(--net-ok-text); }
.net-node.available .net-node-icon, .net-node.busy .net-node-icon { background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent); }
.net-node.active { outline: 2px solid var(--accent); }
.net-node.active .net-node-icon { background: var(--accent); color: var(--accent-text); }
.net-node.available { box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--accent) 55%, transparent); }
.net-node.locked, .net-node.busy { opacity: .62; }
.net-node.picked { box-shadow: inset 0 0 0 2px var(--accent); opacity: 1; }
.net-node:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.net-node:disabled { cursor: default; }
.net-hint { text-align: center; margin: 0; }
.net-fxs { display: grid; gap: 6px; }
.net-fx { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; font-size: 14px; }
.net-kinds-list { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.net-tech-card .btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.net-btn-time { opacity: .85; font-weight: 500; }
.net-btn-time::before { content: "· "; }

/* the world: small tabs, the rating, the events, the group */
.net-world { display: grid; gap: 12px; }
.net-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.net-pill { min-height: 36px; padding: 0 14px; border: 0; border-radius: 99px; background: var(--card); color: var(--hint); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.net-pill.on { background: var(--accent); color: var(--accent-text); }
.net-pills.small { gap: 4px; }
.net-pills.small .net-pill { min-height: 32px; padding: 0 9px; font-size: 12px; }
.net-pill:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.net-ranking, .net-events { display: grid; border-radius: var(--radius); background: var(--card); overflow: hidden; }
.net-rank { display: flex; align-items: center; gap: 12px; padding: 10px 12px; min-height: 56px; }
.net-rank + .net-rank, .net-event + .net-event { border-top: 1px solid var(--line); }
.net-rank.me { background: color-mix(in srgb, var(--accent) 12%, transparent); }
.net-rank-main { flex: 1; min-width: 0; display: grid; gap: 2px; }
.net-rank-main strong { display: flex; align-items: center; gap: 7px; min-width: 0; }
.net-rank-main strong > span:not(.net-tag) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.net-rank-side { display: grid; justify-items: end; gap: 3px; flex: none; }
.net-event { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; }
.net-event-icon { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); }
.net-event.research .net-event-icon { background: color-mix(in srgb, var(--net-ok) 16%, transparent); color: var(--net-ok-text); }
.net-event.problem { background: color-mix(in srgb, var(--net-bad) 10%, transparent); }
.net-event.problem .net-event-icon { background: color-mix(in srgb, var(--net-bad) 20%, transparent); color: var(--net-bad-text); }
.net-event-body { flex: 1; min-width: 0; display: grid; gap: 1px; }
.net-event-title { font-weight: 600; font-size: 14px; overflow-wrap: anywhere; }
.net-event-time { flex: none; font-size: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.net-group { display: grid; gap: 12px; }
.net-group > p { margin: 0; }

/* Achievements stay in the game's visual language; the supplied image is the reward. */
.net-achievement-list { display: grid; gap: 8px; }
.net-achievement-row { width: 100%; min-height: 80px; display: flex; align-items: center; gap: 12px; padding: 10px; border: 0; border-radius: 14px; background: var(--card); color: var(--text); text-align: left; font: inherit; cursor: pointer; }
.net-achievement-row:disabled { cursor: default; }
.net-achievement-row > img, .net-achievement-lock { flex: none; width: 56px; height: 56px; border-radius: 10px; }
.net-achievement-row > img { object-fit: cover; }
.net-achievement-lock { display: grid; place-items: center; background: var(--net-raised); color: var(--hint); }
.net-achievement-copy { flex: 1; min-width: 0; display: grid; gap: 3px; }
.net-achievement-copy strong { font-size: 16px; }
.net-achievement-copy .meta { line-height: 1.3; }
.net-achievement-view { flex: none; color: var(--accent); font-size: 13px; font-weight: 600; }
.net-achievement-row:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.net-achievement-dialog { width: min(92vw, 460px); max-width: 460px; max-height: calc(100dvh - 32px); margin: auto; padding: 12px; border: 0; border-radius: 16px; background: var(--card); color: var(--text); box-shadow: 0 14px 40px rgba(0, 0, 0, .26); overflow: auto; animation: net-achievement-enter 280ms cubic-bezier(.18, .8, .25, 1) both; }
.net-achievement-dialog::backdrop { background: rgba(0, 0, 0, .74); }
@keyframes net-achievement-enter { from { opacity: 0; transform: translateY(14px) scale(.97); } to { opacity: 1; transform: none; } }
.net-achievement-content { display: grid; gap: 12px; }
.net-achievement-content p { margin: 3px 2px 0; font-size: 18px; font-weight: 700; text-align: center; }
.net-achievement-image { display: block; width: 100%; height: min(50dvh, 430px); border-radius: 10px; background: var(--bg); object-fit: contain; }
.net-achievement-continue { width: 100%; min-height: 48px; }
.net-achievement-continue:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (max-width: 380px) { .net-achievement-view { display: none; } }

@media (prefers-reduced-motion: reduce) {
  .net-sheet.enter { animation: none; }
  .net-run-bar i { transition: none; }
  .net-achievement-dialog { animation: none; }
}

/* Permanent player progression stays compact above the game's tabs. */
.net-xp-bar { flex: 1; min-width: 40px; height: 4px; overflow: hidden; border-radius: 4px; background: var(--line); }
.net-xp-bar i { display: block; height: 100%; background: var(--accent); }
.net-job-head { flex-wrap: wrap; }
.net-job-head > strong { font-size: 12px; }
.net-job-reward { overflow-wrap: anywhere; }

/* Manual packet transmission: one clear action, with a finite channel charge. */
.net-traffic { max-width: 520px; margin: 12px auto 0; padding: 20px; background: var(--card); border-radius: var(--radius); }
.net-traffic h2 { color: var(--text); margin: 0 0 8px; font-size: 20px; text-transform: none; letter-spacing: normal; }
.net-traffic > .meta { margin: 8px 0 16px; line-height: 1.5; }
.net-traffic-charge { display: flex; justify-content: space-between; gap: 12px; margin-top: 24px; font-size: 13px; font-variant-numeric: tabular-nums; }
.net-traffic-energy { height: 6px; margin-top: 10px; background: var(--line); border-radius: 6px; overflow: hidden; }
.net-traffic-energy i { display: block; height: 100%; background: var(--accent); transform-origin: left; }
.net-traffic-tap { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; width: 100%; min-height: 204px; margin-top: 20px; padding: 24px 12px; background: var(--net-raised); color: var(--text); border: 1px solid var(--line); border-radius: 16px; font: inherit; cursor: pointer; touch-action: manipulation; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.net-traffic-tap svg { color: var(--accent); flex-shrink: 0; }
.net-traffic-tap strong { font-size: 18px; }
.net-traffic-price { font-size: 14px; font-variant-numeric: tabular-nums; }
.net-traffic-tap:hover:not(:disabled) { background: color-mix(in srgb, var(--net-raised) 92%, var(--accent)); }
.net-traffic-tap:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.net-traffic-tap:disabled { cursor: default; opacity: .55; }
.net-traffic .net-traffic-note { min-height: 42px; margin: 12px 0 8px; text-align: center; font-size: 12px; }
.net-traffic-receipt { display: flex; flex-direction: column; gap: 6px; padding: 16px 0; border-top: 1px solid var(--line); font-size: 13px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.net-traffic-receipt strong { font-weight: 650; }
.net-traffic-error { color: var(--net-bad-text); font-size: 14px; line-height: 1.5; }
.net-traffic-error:empty { display: none; }
.net-traffic-error.soft { color: var(--net-warn-text); }
/* a tap: a ripple where the finger is, the tower jumps, the reward flies up; the energy bar moves smoothly */
.net-traffic-tap { position: relative; overflow: hidden; isolation: isolate; }
.net-traffic-tower { display: grid; place-items: center; color: var(--accent); }
.net-traffic-ripple { position: absolute; z-index: -1; width: 20px; height: 20px; margin: -10px 0 0 -10px; border-radius: 50%; background: color-mix(in srgb, var(--accent) 32%, transparent); pointer-events: none; animation: net-ripple 520ms ease-out forwards; }
.net-traffic-float { position: absolute; z-index: 1; transform: translate(-50%, -50%); color: var(--net-ok); font-size: 19px; font-weight: 800; white-space: nowrap; pointer-events: none; text-shadow: 0 1px 8px color-mix(in srgb, var(--bg) 85%, transparent), 0 0 2px color-mix(in srgb, var(--bg) 85%, transparent); animation: net-float 900ms cubic-bezier(.2, .7, .3, 1) forwards; }
.net-traffic-tower.hit { animation: net-tower 260ms cubic-bezier(.3, 1.6, .5, 1); }
.net-traffic-energy i { transition: transform 240ms ease-out; }
@keyframes net-ripple { to { transform: scale(16); opacity: 0; } }
@keyframes net-float { 0% { opacity: 0; transform: translate(-50%, -40%) scale(.8); } 12% { opacity: 1; transform: translate(-50%, -90%) scale(1.08); } 65% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -300%) scale(1); } }
@keyframes net-tower { 0% { transform: scale(1); } 40% { transform: scale(1.14) translateY(-3px); } 100% { transform: scale(1); } }
@keyframes net-fade { from { opacity: 1; } to { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .net-traffic-ripple { display: none; }
  .net-traffic-tower.hit { animation: none; }
  .net-traffic-float { animation: net-fade 600ms ease-out forwards; }
  .net-traffic-energy i { transition: none; }
}
@media (prefers-reduced-motion: no-preference) {
  .net-traffic-tap { transition: transform .12s ease-out, background .12s ease-out; }
  .net-traffic-tap:active:not(:disabled) { transform: scale(.975); }
}

/* the incident of the group: a red card, and a banner that leads to it */
.net-incident { display: grid; gap: 10px; padding: 12px 14px; border-radius: var(--radius); background: color-mix(in srgb, var(--net-bad) 12%, var(--card)); }
.net-incident .net-run-head { color: var(--net-bad-text); }
.net-incident .net-run-bar i { background: var(--net-bad); }
.net-incident.fixed { background: color-mix(in srgb, var(--net-ok) 12%, var(--card)); }
.net-incident.fixed .net-run-head { color: var(--net-ok-text); }
.net-incident.fixed .net-run-bar i { background: var(--net-ok); }
.net-portions { display: grid; gap: 6px; }
.net-portion-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.net-portion-row .btn { padding: 8px 4px; font-size: 14px; }
.net-contribs { display: grid; gap: 4px; font-size: 14px; }
.net-contrib { display: flex; justify-content: space-between; gap: 12px; }
.net-alert { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 44px; margin: 0 0 10px; padding: 0 12px; border: 0; border-radius: 12px; background: color-mix(in srgb, var(--net-bad) 14%, var(--card)); color: var(--net-bad-text); font: inherit; text-align: left; cursor: pointer; }
.net-alert .meta { margin-left: auto; }

/* the tasks of a day: a card on the tab of the jobs, a line on the map */
.net-daily { display: grid; gap: 10px; margin: 4px 0 14px; padding: 14px 16px; border-radius: var(--radius); background: var(--card); }
.net-daily-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.net-daily-head h2 { margin: 0; font-size: 17px; letter-spacing: 0; text-transform: none; color: var(--text); }
.net-daily-task { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.net-daily-icon { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--net-raised); color: var(--accent); }
.net-daily-task.done .net-daily-icon { background: color-mix(in srgb, var(--net-ok) 16%, var(--card)); color: var(--net-ok-text); }
.net-daily-task.claimed { opacity: .65; }
.net-daily-body { flex: 1; min-width: 0; display: grid; gap: 5px; }
.net-daily-body strong { font-size: 15px; }
.net-daily-body .net-run-bar { height: 6px; }
.net-daily-task.done .net-run-bar i, .net-daily-task.claimed .net-run-bar i { background: var(--net-ok); }
.net-daily-task .btn.small { flex: none; min-height: 40px; padding: 0 12px; white-space: nowrap; }
.net-daily-state { flex: none; display: inline-flex; align-items: center; gap: 5px; color: var(--net-ok-text); font-weight: 600; font-size: 14px; }
/* the leader of a district: under the map and on the card of a site */
.net-lead-note { display: flex; align-items: center; gap: 6px; margin: 8px 2px 0; }
.net-leader { display: inline-flex; align-items: center; gap: 6px; }
.net-traffic-day { margin: 0; text-align: center; }
/* the auctions: the lots, and the card of a site on auction */
.net-lots { display: grid; gap: 10px; margin-bottom: 16px; }
.net-lot-intro { margin: 0 2px 2px; line-height: 1.45; }
.net-lot { display: grid; gap: 10px; padding: 14px 16px; border-radius: var(--radius); background: var(--card); }
.net-lot.ended { opacity: .75; }
.net-lot-head { display: flex; align-items: center; gap: 12px; }
.net-lot-icon, .net-lot-badge { flex: none; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: color-mix(in srgb, #f2b01e 22%, var(--card)); color: color-mix(in srgb, #f2b01e 70%, var(--text)); }
.net-lot-title { flex: 1; min-width: 0; display: grid; gap: 2px; }
.net-lot-title strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.net-lot-bid { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; font-variant-numeric: tabular-nums; }
.net-lot-mine, .net-lot-state { color: var(--net-ok-text); }
.net-lot-state { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 14px; }
