* {
  box-sizing: border-box;
}

@font-face {
  font-family: "Pixelify Sans";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("./assets/pixelify-sans.ttf") format("truetype");
}

[hidden] {
  display: none !important;
}

html,
body {
  min-width: 300px;
  min-height: 100%;
  margin: 0;
}

html {
  background: #168eaa;
}

body {
  display: grid;
  min-height: 100dvh;
  padding: 16px;
  place-items: center;
  overflow: auto;
  background-color: #168eaa;
  background-image: url("./assets/nomad-wallpaper.webp");
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

.skip-link {
  position: fixed;
  z-index: 2000;
  top: 6px;
  left: 6px;
  padding: 7px 10px;
  transform: translateY(-160%);
  background: #fff;
  box-shadow: inset -1px -1px #0a0a0a, inset 1px 1px #fff, inset -2px -2px grey, inset 2px 2px #dfdfdf;
  color: #000080;
  font: 700 11px "Pixelated MS Sans Serif", Arial, sans-serif;
}

.skip-link:focus {
  transform: translateY(0);
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.browser-window.window {
  position: relative;
  z-index: 10;
  display: flex;
  width: min(1040px, calc(100vw - 48px), calc(133.333dvh - 85.333px));
  max-height: calc(100dvh - 64px);
  aspect-ratio: 4 / 3;
  flex-direction: column;
  margin: 0;
  overflow: hidden;
  box-shadow:
    inset -1px -1px #0a0a0a,
    inset 1px 1px #dfdfdf,
    inset -2px -2px grey,
    inset 2px 2px #fff,
    4px 4px 0 rgba(0, 0, 0, .48);
}

.browser-window.window.maximized {
  position: fixed;
  z-index: 1000;
  inset: 0;
  width: 100vw;
  height: 100dvh;
  min-height: 0;
  max-height: none;
  aspect-ratio: auto;
  margin: 0;
  box-shadow: none;
}

.browser-window.is-transitioning {
  pointer-events: none;
  will-change: transform, opacity;
}

.browser-window > .title-bar {
  min-height: 27px;
}

.title-copy {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 6px;
  margin-right: 8px;
  white-space: nowrap;
}

.title-copy img {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  image-rendering: pixelated;
}

.title-copy strong {
  overflow: hidden;
  text-overflow: ellipsis;
}

.window-controls {
  flex: 0 0 auto;
}

.window-controls button,
.dialog-title .title-bar-controls button {
  min-height: 18px;
  min-width: 20px;
}

.window-controls button.maximize,
.window-controls button.restore,
.window-controls button.close {
  background-position: center !important;
}

#minimize-window {
  position: relative;
  background-image: none !important;
}

#minimize-window::before {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 7px;
  height: 2px;
  transform: translate(-50%, -50%);
  background: #000;
  content: "";
}

.browser-chrome {
  position: relative;
  flex: 0 0 auto;
}

.menu-bar {
  position: relative;
  z-index: 40;
  display: flex;
  min-height: 25px;
  align-items: center;
  gap: 1px;
  padding: 1px 6px 2px;
  background: silver;
  box-shadow: inset 0 1px #fff, inset 0 -1px grey;
  font-family: "Pixelated MS Sans Serif", Arial, sans-serif;
  font-size: 11px;
}

.menu {
  position: relative;
}

.menu-trigger {
  min-width: 0;
  min-height: 21px;
  padding: 0 8px;
  border: 0;
  background: silver;
  box-shadow: none;
  color: #222;
  text-shadow: none;
}

.menu-trigger:hover,
.menu-trigger[aria-expanded="true"] {
  box-shadow: inset -1px -1px #0a0a0a, inset 1px 1px #fff, inset -2px -2px grey, inset 2px 2px #dfdfdf;
}

.menu-trigger[aria-expanded="true"] {
  box-shadow: inset -1px -1px #fff, inset 1px 1px #0a0a0a, inset -2px -2px #dfdfdf, inset 2px 2px grey;
}

.menu-popover.window {
  position: absolute;
  z-index: 100;
  top: calc(100% - 1px);
  left: 0;
  width: max-content;
  min-width: 205px;
  box-shadow:
    inset -1px -1px #0a0a0a,
    inset 1px 1px #dfdfdf,
    inset -2px -2px grey,
    inset 2px 2px #fff,
    2px 2px 0 rgba(0, 0, 0, .6);
}

.menu-popover-right {
  right: 0;
  left: auto !important;
}

.menu-popover button {
  display: flex;
  width: 100%;
  min-width: 0;
  min-height: 23px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 1px 17px 1px 20px;
  border: 0;
  background: silver;
  box-shadow: none;
  color: #222;
  text-align: left;
  text-shadow: none;
  white-space: nowrap;
}

.menu-popover button:hover,
.menu-popover button:focus-visible {
  outline: 0;
  background: navy;
  color: #fff;
  text-shadow: none;
}

.menu-popover kbd {
  color: inherit;
  font: 11px "Pixelated MS Sans Serif", Arial, sans-serif;
}

.menu-separator {
  display: block;
  height: 2px;
  margin: 3px 2px;
  border-top: 1px solid grey;
  border-bottom: 1px solid #fff;
}

.toolbar-row {
  position: relative;
  z-index: 20;
  display: flex;
  height: 66px;
  align-items: stretch;
  gap: 1px;
  padding: 3px 5px;
  overflow: hidden;
  background: silver;
  box-shadow: inset 0 1px #fff, inset 0 -2px #dfdfdf, inset 0 -3px grey;
}

.toolbar-row::before {
  width: 3px;
  flex: 0 0 3px;
  margin: 1px 2px 2px 0;
  background: silver;
  box-shadow: inset -1px -1px grey, inset 1px 1px #fff;
  content: "";
}

.toolbar-button {
  display: flex;
  width: 73px;
  min-width: 57px;
  height: 57px;
  flex: 0 1 73px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  padding: 2px 4px;
  border: 0;
  background: silver;
  box-shadow: none;
  color: #222;
  text-shadow: none;
}

.toolbar-button:hover {
  box-shadow: inset -1px -1px #0a0a0a, inset 1px 1px #fff, inset -2px -2px grey, inset 2px 2px #dfdfdf;
}

.toolbar-button:not(:disabled):active {
  padding: 3px 3px 1px 5px;
  box-shadow: inset -1px -1px #fff, inset 1px 1px #0a0a0a, inset -2px -2px #dfdfdf, inset 2px 2px grey;
}

.toolbar-icon {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
}

.toolbar-icon .pixel-icon,
.toolbar-icon .win98-icon {
  display: block;
  width: 32px;
  height: 32px;
  overflow: visible;
  image-rendering: pixelated;
  pointer-events: none;
}

.toolbar-icon .win98-icon {
  object-fit: contain;
}

.toolbar-button[data-action="back"] .win98-icon {
  transform: scaleX(-1);
}

.reload-icon {
  position: relative;
}

.reload-icon .win98-icon {
  position: absolute;
  inset: 0;
}

.icon-svg .cut {
  fill: #f4f4f4;
  stroke: none;
}

.icon-svg .accent,
.icon-svg .amber {
  fill: #ffd229;
  stroke: none;
}

.icon-svg .green {
  fill: #36d05a;
  stroke: none;
}

.icon-svg .red {
  fill: #ef3841;
  stroke: none;
}

.toolbar-button[data-action="back"] .toolbar-icon,
.toolbar-button[data-action="forward"] .toolbar-icon {
  color: #00853f;
}

.toolbar-button[data-action="home"] .toolbar-icon,
.toolbar-button[data-action="reload"] .toolbar-icon,
.toolbar-button[data-action="search"] .toolbar-icon {
  color: #001da0;
}

.toolbar-button[data-action="guide"] .toolbar-icon {
  color: #3434a4;
}

.toolbar-button[data-action="print"] .toolbar-icon {
  color: navy;
}

.toolbar-button[data-action="security"] .toolbar-icon {
  color: #9d6600;
}

.toolbar-button[data-action="stop"] .toolbar-icon {
  color: #d02032;
}

.activity-brand {
  position: relative;
  display: grid;
  width: 57px;
  min-width: 57px;
  height: 57px;
  margin-left: auto;
  padding: 2px;
  place-items: center;
  overflow: hidden;
  border: 0;
  background: #00172a;
  box-shadow: inset -1px -1px #fff, inset 1px 1px #0a0a0a, inset -2px -2px #dfdfdf, inset 2px 2px grey;
  color: #fff;
  text-shadow: none;
}

.activity-brand:not(:disabled):active {
  padding: 3px 1px 1px 3px;
}

.activity-brand svg {
  display: block;
  width: 49px;
  height: 49px;
  overflow: visible;
}

.brand-screen {
  fill: #001629;
  stroke: #66d6e4;
  stroke-width: 1;
}

.brand-grid {
  fill: none;
  stroke: #135b6b;
  stroke-width: 1;
}

.brand-orbit {
  transform-box: fill-box;
  transform-origin: center;
}

.brand-orbit path {
  fill: none;
  stroke: #34e8f1;
  stroke-width: 2;
}

.brand-n {
  fill: #fff;
  stroke: #4bb9ff;
  stroke-width: .8;
}

.brand-pulse {
  fill: #34e8f1;
  opacity: .28;
}

.activity-brand.is-active .brand-orbit,
.activity-brand.is-connected .brand-orbit {
  animation: orbit-spin .72s steps(9, end) infinite;
}

.activity-brand.is-active .brand-n,
.activity-brand.is-connected .brand-n {
  animation: nomad-glow .46s steps(2, end) infinite alternate;
}

.activity-brand.is-active .brand-pulse,
.activity-brand.is-connected .brand-pulse {
  animation: pulse-led .45s steps(1, end) infinite;
}

.activity-brand.is-active .pulse-two,
.activity-brand.is-connected .pulse-two {
  animation-delay: .15s;
}

.activity-brand.is-active .pulse-three,
.activity-brand.is-connected .pulse-three {
  animation-delay: .3s;
}

@keyframes orbit-spin {
  to { transform: rotate(360deg); }
}

@keyframes nomad-glow {
  to { fill: #edff65; filter: drop-shadow(0 0 3px #32eeff); }
}

@keyframes pulse-led {
  50% { fill: #edff65; opacity: 1; }
}

#page-canvas {
  container-name: page;
  container-type: inline-size;
  display: flex;
  min-height: 0;
  flex: 1 1 auto;
  flex-direction: column;
  margin: 0;
  overflow-x: hidden;
  overflow-y: auto;
  background: #fff;
  box-shadow: inset 1px 1px #0a0a0a, inset -1px -1px #fff;
  scrollbar-color: silver #dfdfdf;
  scrollbar-gutter: auto;
  scrollbar-width: auto;
}

#page-canvas::-webkit-scrollbar {
  width: 17px;
  height: 17px;
}

#page-canvas::-webkit-scrollbar-track,
#page-canvas::-webkit-scrollbar-track-piece {
  background-color: #dfdfdf;
  background-image:
    linear-gradient(45deg, #fff 25%, transparent 25%),
    linear-gradient(-45deg, #fff 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #fff 75%),
    linear-gradient(-45deg, transparent 75%, #fff 75%);
  background-position: 0 0, 0 1px, 1px -1px, -1px 0;
  background-size: 2px 2px;
  box-shadow: inset 1px 1px grey, inset -1px -1px #fff;
}

#page-canvas::-webkit-scrollbar-thumb {
  min-height: 32px;
  border: 0;
  border-radius: 0;
  background: silver;
  box-shadow: inset -1px -1px #0a0a0a, inset 1px 1px #fff, inset -2px -2px grey, inset 2px 2px #dfdfdf;
}

#page-canvas::-webkit-scrollbar-button:single-button,
#page-canvas::-webkit-scrollbar-button:vertical:start,
#page-canvas::-webkit-scrollbar-button:vertical:end {
  display: block;
  width: 17px;
  height: 17px;
  border: 0;
  background-color: silver;
  background-position: center;
  background-repeat: no-repeat;
  box-shadow: inset -1px -1px #0a0a0a, inset 1px 1px #fff, inset -2px -2px grey, inset 2px 2px #dfdfdf;
}

#page-canvas::-webkit-scrollbar-button:single-button:vertical:decrement,
#page-canvas::-webkit-scrollbar-button:vertical:start {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='7' height='4' viewBox='0 0 7 4'%3E%3Cpath d='M3 0h1v1h1v1h1v1h1v1H0V3h1V2h1V1h1z' fill='%23000'/%3E%3C/svg%3E");
}

#page-canvas::-webkit-scrollbar-button:single-button:vertical:increment,
#page-canvas::-webkit-scrollbar-button:vertical:end {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='7' height='4' viewBox='0 0 7 4'%3E%3Cpath d='M0 0h7v1H6v1H5v1H4v1H3V3H2V2H1V1H0z' fill='%23000'/%3E%3C/svg%3E");
}

#page-canvas::-webkit-scrollbar-button:single-button:horizontal:decrement {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='7' viewBox='0 0 4 7'%3E%3Cpath d='M3 0v7H2V6H1V5H0V2h1V1h1V0z' fill='%23000'/%3E%3C/svg%3E");
}

#page-canvas::-webkit-scrollbar-button:single-button:horizontal:increment {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='7' viewBox='0 0 4 7'%3E%3Cpath d='M0 0h1v1h1v1h1v3H2v1H1v1H0z' fill='%23000'/%3E%3C/svg%3E");
}

#page-canvas::-webkit-scrollbar-button:active {
  background-position: calc(50% + 1px) calc(50% + 1px);
  box-shadow: inset -1px -1px #fff, inset 1px 1px #0a0a0a, inset -2px -2px #dfdfdf, inset 2px 2px grey;
}

#page-canvas::-webkit-scrollbar-corner {
  background: silver;
  box-shadow: inset 1px 1px #fff, inset -1px -1px grey;
}

html:has(#calculate:not([hidden]), #live:not([hidden])),
#page-canvas:has(#calculate:not([hidden]), #live:not([hidden])) {
  scrollbar-width: none;
}

html:has(#calculate:not([hidden]), #live:not([hidden]))::-webkit-scrollbar,
#page-canvas:has(#calculate:not([hidden]), #live:not([hidden]))::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.site-hero {
  position: relative;
  min-height: clamp(94px, 9cqi, 108px);
  flex: 0 0 auto;
  overflow: hidden;
  isolation: isolate;
  border-bottom: 2px solid #000080;
  background-color: #03182d;
  background-image:
    radial-gradient(circle at 8px 9px, #ffd84a 0 1px, transparent 1.5px),
    radial-gradient(circle at 21px 15px, #27c7dd 0 1px, transparent 1.5px),
    linear-gradient(180deg, #020d20 0%, #05294b 100%);
  background-position: 0 0, 17px 23px, 0 0;
  background-size: 79px 67px, 113px 89px, auto;
  color: #fff;
  image-rendering: pixelated;
}

.site-hero::before,
.site-hero::after {
  position: absolute;
  inset: 0;
  pointer-events: none;
  content: "";
}

.site-hero::before {
  z-index: -2;
  background-image: url("./assets/nomad-hero-globe.webp"), url("./assets/nomad-hero-computer.webp");
  background-position: left -4px center, right 15% center;
  background-position-y: center, calc(50% - 7px);
  background-repeat: no-repeat;
  background-size: auto 155%, auto 174%;
  image-rendering: pixelated;
}

.site-hero::after {
  z-index: -1;
  background:
    linear-gradient(90deg, transparent 0 13%, rgba(1, 13, 33, .82) 29% 70%, transparent 87%),
    linear-gradient(180deg, rgba(255, 255, 255, .05), transparent 28%, rgba(0, 0, 0, .12));
  box-shadow: inset 0 0 0 2px rgba(105, 220, 236, .18), inset 0 -4px rgba(0, 0, 0, .28);
}

.hero-copy {
  position: relative;
  z-index: 1;
  width: 62%;
  margin-left: 12.4%;
  padding: clamp(10px, 1.2cqi, 15px) 0 7px;
}

.site-hero h1 {
  margin: 0;
  color: #f4fbff;
  font: 700 clamp(30px, 4.2cqi, 48px) / .98 "Pixelify Sans", "Pixelated MS Sans Serif", sans-serif;
  letter-spacing: .01em;
  text-wrap: balance;
  text-shadow: 3px 3px #001443, 1px 1px #001443;
}

.hero-tagline {
  max-width: 660px;
  margin: 3px 0 0;
  color: #f2f5f0;
  font: 400 clamp(13px, 1.8cqi, 20px) / 1.15 "Pixelated MS Sans Serif", Arial, sans-serif;
  text-shadow: 2px 2px #00102d;
}

.hero-memory-note {
  position: absolute;
  z-index: 2;
  top: 18%;
  right: 1.3%;
  width: 10.5%;
  margin: 0;
  transform: rotate(-5deg);
  color: #ffdd48;
  font: 700 clamp(11px, 1.35cqi, 16px) / 1.05 "Pixelify Sans", "Pixelated MS Sans Serif", sans-serif;
  letter-spacing: .06em;
  text-align: left;
  text-shadow: 2px 2px #2a1a00;
  text-transform: uppercase;
}

.hero-memory-note::before {
  position: absolute;
  top: 12%;
  left: -28px;
  color: #ffd229;
  content: ")))";
  font-size: 25px;
  letter-spacing: -7px;
  transform: rotate(18deg);
}

.exhibit-nav {
  position: relative;
  z-index: 4;
  flex: 0 0 auto;
  padding: 2px;
  border-top: 1px solid #fff;
  border-bottom: 1px solid #0a0a0a;
  background: silver;
  box-shadow: inset 1px 1px #dfdfdf, inset -1px -1px grey;
}

.exhibit-nav ul {
  display: flex;
  align-items: stretch;
  justify-content: flex-start;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.exhibit-nav li {
  flex: 0 0 auto;
  min-width: 0;
}

.exhibit-nav a {
  display: flex;
  width: max-content;
  min-width: 124px;
  min-height: 38px;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  padding: 3px 9px;
  background: silver;
  box-shadow: inset -1px -1px #0a0a0a, inset 1px 1px #fff, inset -2px -2px grey, inset 2px 2px #dfdfdf;
  color: #222;
  font: 400 11px "Pixelated MS Sans Serif", Arial, sans-serif;
  text-align: left;
  text-decoration: none;
  text-shadow: none;
  white-space: nowrap;
}

.exhibit-nav a:hover {
  background: #d5d5d5;
}

.exhibit-nav a:active,
.exhibit-nav a[aria-current="page"] {
  padding: 4px 8px 2px 10px;
  background: #ffe584;
  box-shadow: inset -1px -1px #fff, inset 1px 1px #0a0a0a, inset -2px -2px #dfdfdf, inset 2px 2px grey;
  font-weight: 700;
}

.exhibit-nav a:focus-visible {
  outline: 1px dotted #000;
  outline-offset: -6px;
}

.nav-pixel-icon {
  display: block;
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  overflow: visible;
  image-rendering: pixelated;
  object-fit: contain;
  pointer-events: none;
}

.calculator-view {
  background: #eaeae8;
}

.calculator-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr);
  align-items: stretch;
  gap: 9px;
  padding: 7px;
}

.calculator-left {
  display: flex;
  min-width: 0;
  margin: 0;
}

.file-details-panel {
  flex: 1;
}

.calc-panel {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 2px solid #8c96a6;
  border-image: none;
  background: linear-gradient(110deg, #efefed, #e6e6e5);
  box-shadow: inset 1px 1px #fff, 1px 1px #fff;
}

.calc-panel-title {
  display: flex;
  min-height: 25px;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 4px 8px;
  background: linear-gradient(90deg, #00309c, #0a4bd9);
  box-shadow: inset 1px 1px rgba(255, 255, 255, .38), inset -1px -1px #001b76;
  color: #fff;
  font: 700 11px/1.2 "Pixelated MS Sans Serif", Arial, sans-serif;
  letter-spacing: .01em;
  text-shadow: 1px 1px #00155e;
}

.calc-panel-body {
  padding: 6px 9px 4px;
}

.file-details-body {
  display: grid;
  gap: 8px;
}

.file-detail-row {
  display: grid;
  min-width: 0;
  grid-template-columns: 92px minmax(0, 1fr);
  align-items: center;
  gap: 7px;
}

.file-detail-row > label {
  color: #000442;
  font-size: 12px;
  font-weight: 700;
}

.file-size-group {
  display: flex;
  min-width: 0;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px 14px;
}

#calculator-file-size {
  width: 120px;
  max-width: 100%;
  height: 25px;
  min-width: 0;
  padding: 3px 6px;
  color: #111;
  font: 11px/1 "Pixelated MS Sans Serif", Arial, sans-serif;
}

#calculator-file-size:focus {
  outline: 1px dotted #000;
  outline-offset: -4px;
}

.size-unit-options {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px 14px;
  padding-block: 5px;
}

.size-unit-options input + label {
  margin-left: 18px;
  font-size: 11px;
  cursor: pointer;
}

.calculator-controls {
  display: grid;
  gap: 5px;
  padding: 3px 9px 7px;
}

.connection-group {
  min-width: 0;
  margin: 0;
  padding: 7px 7px 6px;
  border: 1px solid #8d98ac;
  border-radius: 2px;
  box-shadow: 1px 1px #fff, inset 1px 1px #fff;
}

.connection-group legend {
  margin-left: 0;
  padding: 0 6px;
  color: #214b80;
  font-size: 11px;
  font-weight: 700;
  background: #eaeae8;
}

.connection-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px 3px;
}

#early-connections {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

#early-connections .connection-choice input + .connection-choice-label {
  padding-right: 6px;
}

.connection-choice {
  min-width: 0;
}

.connection-choice input[type="radio"] + .connection-choice-label {
  display: grid;
  min-height: 40px;
  grid-template-columns: 32px minmax(0, 1fr);
  align-items: center;
  gap: 5px;
  margin-left: 18px;
  padding: 2px 1px;
  cursor: pointer;
}

.connection-choice input[type="radio"] + .connection-choice-label::before {
  top: 8px;
}

.connection-choice input[type="radio"]:checked + .connection-choice-label::after {
  top: 12px;
}

.connection-choice:has(input:checked) .connection-choice-label {
  background: #fff5c9;
  outline: 1px dotted #8b6500;
  outline-offset: -2px;
}

.connection-choice input:focus-visible + .connection-choice-label {
  outline: 1px dotted #000;
  outline-offset: -3px;
}

.connection-choice-label img {
  display: block;
  width: 32px;
  height: 32px;
  image-rendering: pixelated;
  object-fit: contain;
}

.connection-choice-label > span {
  display: flex;
  min-width: 0;
  flex-direction: column;
  line-height: 1.15;
}

.connection-choice-label strong {
  color: #000442;
  font-size: 11px;
}

.connection-choice-label small {
  margin-top: 3px;
  color: #365b8d;
  font-size: 11px;
}

.calculator-result-row {
  display: grid;
  margin-top: 1px;
}

.download-result {
  display: grid;
  min-width: 0;
  grid-template-columns: 96px minmax(0, 1fr);
  align-items: center;
  justify-content: start;
  gap: 0;
  padding: 0;
  color: #000442;
  font-size: 11px;
  font-weight: 700;
}

.download-result > span {
  display: flex;
  height: 46px;
  align-items: center;
  padding: 5px 6px;
}

#download-time {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  min-width: 0;
  width: 100%;
  height: 46px;
  align-items: center;
  padding: 4px;
  background: #090e08;
  color: #51ff32;
  font: 700 16px/1.15 "Pixelify Sans", monospace;
  text-align: center;
  overflow-wrap: anywhere;
  font-variant-numeric: tabular-nums;
}

#download-time.is-counting {
  color: #b3ff7c;
}

.time-unit {
  display: grid;
  min-width: 0;
  justify-items: center;
  gap: 3px;
  padding-inline: 2px;
}

.time-unit strong {
  max-width: 100%;
  font: inherit;
  overflow-wrap: anywhere;
}

.time-unit small {
  font: 9px/1 "Pixelated MS Sans Serif", Arial, sans-serif;
}

.time-unit.is-long strong {
  font-size: 11px;
}

.time-unit[aria-disabled="true"] {
  color: #7e8979;
}

.calculator-hint,
.calculator-assumption {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr);
  align-items: start;
  gap: 6px;
  margin: 0;
  text-align: left;
  line-height: 1.35;
}

.calculator-hint {
  color: #365b8d;
  font-size: 11px;
}

.note-info {
  display: grid;
  width: 12px;
  height: 12px;
  place-items: center;
  margin-top: 1px;
  border: 1px solid #365b8d;
  border-radius: 50%;
  background: #f8fbff;
  color: #234d87;
  font: 700 10px/1 Georgia, serif;
}

.calculator-error {
  margin: 0;
  color: #9d1616;
  font-size: 11px;
  line-height: 1.35;
}

.calculator-controls:has(#calculator-error:not([hidden])) .calculator-hint,
.live-setup:has(#live-error:not([hidden])) .live-playback-note {
  display: none;
}

.calculator-assumption {
  color: #525c6b;
  font-size: 10px;
}

.common-files-panel {
  display: flex;
  min-width: 0;
  flex-direction: column;
  border: 2px solid #939da9;
  background: linear-gradient(110deg, #f4f4f1, #ebebea);
  box-shadow: inset 1px 1px #fff, 1px 1px #fff;
}

.common-files-panel h3 {
  min-height: 25px;
  margin: 0;
  padding: 5px 9px;
  border-bottom: 1px solid #a8aab1;
  background: linear-gradient(90deg, #ffe992, #ffe58b);
  box-shadow: inset 1px 1px #fff8ce;
  color: #000442;
  font-size: 11px;
  line-height: 1.1;
}

.common-example-files {
  display: grid;
  flex: 1;
  grid-template-rows: repeat(9, minmax(48px, 1fr));
  padding: 0 3px;
}

.common-file {
  display: grid;
  width: 100%;
  min-width: 0;
  min-height: 48px;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  padding: 6px 9px;
  border: 0;
  border-radius: 0;
  border-bottom: 1px solid #aeb5c0;
  background: transparent;
  box-shadow: inset 0 -1px #fff;
  color: #000442;
  text-align: left;
  cursor: pointer;
}

.common-file:last-child {
  border-bottom: 0;
  box-shadow: none;
}

.common-file:hover,
.common-file[aria-pressed="true"] {
  background: #fff8d9;
}

.common-file:active {
  padding: 6px 9px;
  box-shadow: inset 1px 1px #9b9787;
}

.common-file:focus-visible {
  outline: 1px dotted #000;
  outline-offset: -4px;
}

.common-file img {
  width: 32px;
  height: 32px;
  image-rendering: pixelated;
}

.common-file-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 4px;
}

.common-file-copy strong {
  font-size: 11px;
  line-height: 1.1;
}

.common-file-copy small {
  color: #365b8d;
  font-size: 10px;
  line-height: 1.25;
}

.common-file-size {
  font-size: 11px;
  white-space: nowrap;
}

#bahrain > .bahrain-timeline-card {
  max-width: 520px;
  margin: 10px;
}

.bahrain-timeline-card {
  position: relative;
  min-height: 169px;
  overflow: hidden;
  border: 2px solid #274f8e;
  background: linear-gradient(180deg, #ef91a7 0%, #f9b792 40%, #f8cd77 67%, #53a6d3 68%, #1763aa 100%);
  box-shadow: inset 1px 1px #fff, inset -1px -1px #001a56;
}

.bahrain-timeline-card > header {
  position: relative;
  z-index: 5;
  display: flex;
  min-height: 25px;
  align-items: center;
  gap: 7px;
  padding: 2px 7px;
  background: linear-gradient(90deg, #002c91, #0b4cd4);
  color: #fff;
  box-shadow: inset 1px 1px rgba(255, 255, 255, .35), inset 0 -1px #001750;
}

.bahrain-timeline-card > header img {
  width: 16px;
  height: 16px;
  image-rendering: pixelated;
}

.bahrain-timeline-card h3 {
  margin: 0;
  font: 700 13px/1 "Pixelated MS Sans Serif", Arial, sans-serif;
  text-shadow: 1px 1px #00164d;
}

.timeline-card-body {
  position: relative;
  min-height: 140px;
  overflow: hidden;
}

.timeline-card-body::after {
  position: absolute;
  z-index: 1;
  inset: 0;
  background: linear-gradient(90deg, rgba(255, 248, 227, .96) 0 47%, rgba(255, 248, 227, .74) 62%, rgba(255, 248, 227, .08) 82%, transparent);
  content: "";
  pointer-events: none;
}

.timeline-summary {
  position: relative;
  z-index: 3;
  display: grid;
  width: 64%;
  gap: 0;
  margin: 0;
  padding: 5px 5px 4px 24px;
  list-style: none;
}

.timeline-summary::before {
  position: absolute;
  top: 11px;
  bottom: 12px;
  left: 12px;
  width: 2px;
  background: #162c54;
  box-shadow: 1px 0 #fff;
  content: "";
}

.timeline-summary li {
  position: relative;
  min-height: 32px;
}

.timeline-dot {
  position: absolute;
  top: 5px;
  left: -18px;
  width: 11px;
  height: 11px;
  border: 2px solid #102040;
  border-radius: 50%;
  background: #ed2337;
  box-shadow: 1px 1px #fff;
}

.timeline-adsl .timeline-dot { background: #259ce8; }
.timeline-fibre .timeline-dot { background: #32ce45; }
.timeline-5g .timeline-dot { background: #b43de8; }

.timeline-summary strong {
  display: block;
  color: #14234a;
  font-size: 11px;
  line-height: 1.05;
}

.timeline-summary strong b {
  display: inline-block;
  min-width: 68px;
}

.timeline-summary p {
  margin: 2px 0 0;
  color: #29385a;
  font-size: 9px;
  line-height: 1.15;
}

.bahrain-skyline-art {
  position: absolute;
  z-index: 0;
  right: 0;
  bottom: 0;
  width: 200px;
  height: 140px;
  image-rendering: pixelated;
  object-fit: cover;
}

.live-view {
  background: #eaeae8;
}

.live-layout {
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
  align-items: stretch;
  gap: 9px;
  row-gap: 5px;
  padding: 5px 7px;
}

.live-setup-panel,
.live-download-panel {
  min-width: 0;
}

.live-setup {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 8px 11px;
}

.live-settings-fields {
  display: grid;
  min-width: 0;
  gap: 6px;
  margin: 0;
  padding: 0;
  border: 0;
  box-shadow: none;
}

.live-settings-fields > label,
.live-size-row > label,
.live-playback-settings > label {
  color: #000442;
  font-size: 11px;
  font-weight: 700;
}

.live-settings-fields:disabled > label,
.live-settings-fields:disabled .live-size-row > label {
  color: grey;
}

.live-setup select,
.live-setup input[type="text"] {
  width: 100%;
  height: 25px;
  min-width: 0;
  font: 11px "Pixelated MS Sans Serif", Arial, sans-serif;
}

.live-size-row {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
}

.live-unit-options {
  justify-content: space-between;
  gap: 8px;
  padding-block: 1px;
}

#live-use-calculator {
  min-height: 27px;
  margin-top: 2px;
  font-size: 11px;
}

.live-playback-settings {
  display: grid;
  min-width: 0;
  gap: 6px;
  padding-top: 7px;
  border-top: 1px solid #a3a8b3;
  box-shadow: inset 0 1px #fff;
}

.live-playback-note {
  margin: 0;
  color: #365b8d;
  font-size: 10px;
  line-height: 1.4;
}

.live-line-details {
  padding-top: 7px;
  border-top: 1px solid #a3a8b3;
  box-shadow: inset 0 1px #fff;
}

.live-line-details h4 {
  margin: 0 0 5px;
  color: #000442;
  font-size: 11px;
}

.live-line-details dl {
  display: grid;
  gap: 3px;
  margin: 0;
}

.live-line-details dl > div {
  display: flex;
  min-width: 0;
  justify-content: space-between;
  gap: 8px;
  font-size: 10px;
  line-height: 1.2;
}

.live-line-details dt { color: #365b8d; }
.live-line-details dd { margin: 0; color: #000442; text-align: right; }

.live-download-panel {
  display: flex;
  flex-direction: column;
}

.live-download-body {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  gap: 6px;
  padding: 8px 14px;
}

.live-transfer-art {
  position: relative;
  width: calc(100% - 16px);
  height: 48px;
  flex: 0 0 auto;
  margin-inline: auto;
  isolation: isolate;
}

.live-transfer-art img,
.live-file-summary img {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  image-rendering: pixelated;
}

.live-source-globe,
.live-destination-folder {
  position: absolute;
  bottom: 4px;
}

.live-source-globe {
  z-index: 1;
  left: 0;
}

.live-destination-folder {
  z-index: 3;
  right: 0;
}

.live-paper-route {
  position: absolute;
  z-index: 2;
  inset: 0 16px;
}

.live-flying-paper {
  position: absolute;
  top: 24px;
  left: 0;
  opacity: 0;
  transform: translateX(-50%);
}

[data-state="running"] .live-flying-paper,
[data-state="paused"] .live-flying-paper {
  animation: live-paper-flight 2.8s steps(24, end) infinite;
}

[data-state="paused"] .live-flying-paper {
  animation-play-state: paused;
}

[data-state] .live-flying-paper:nth-child(2) {
  animation-delay: -1.4s;
}

@keyframes live-paper-flight {
  0% { left: 0; top: 14px; opacity: 0; transform: translateX(-50%) rotate(-22deg) scale(.5); }
  8% { left: 6%; top: 6px; opacity: 1; transform: translateX(-50%) rotate(-12deg) scale(.8); }
  30% { left: 29%; top: 0; opacity: 1; transform: translateX(-50%) rotate(12deg) scale(1); }
  52% { left: 53%; top: 2px; opacity: 1; transform: translateX(-50%) rotate(-10deg) scale(1); }
  76% { left: 81%; top: 6px; opacity: 1; transform: translateX(-50%) rotate(8deg) scale(.9); }
  92% { left: 98%; top: 14px; opacity: 1; transform: translateX(-50%) rotate(-8deg) scale(.65); }
  100% { left: 100%; top: 16px; opacity: 0; transform: translateX(-50%) rotate(-12deg) scale(.35); }
}

.live-file-summary {
  display: flex;
  min-width: 0;
  min-height: 36px;
  align-items: center;
  gap: 10px;
}

.live-file-summary > div {
  display: grid;
  min-width: 0;
  gap: 5px;
}

.live-file-summary strong {
  color: #000442;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.live-file-summary span,
.live-connection-summary {
  color: #365b8d;
  font-size: 11px;
  line-height: 1.3;
}

.live-connection-summary {
  margin: 0;
}

.live-progress-heading {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 3px;
  color: #000442;
  font-size: 11px;
}

#live-percent {
  flex: 0 0 62px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

[data-state="complete"] #live-phase { color: #1c6733; }
[data-state="paused"] #live-phase { color: #735000; }
[data-state="cancelled"] #live-phase { color: #7d3137; }

.live-progress {
  height: 23px;
  flex: 0 0 auto;
  padding: 3px;
  overflow: hidden;
  background: #dadad5;
  box-shadow: inset -1px -1px #fff, inset 1px 1px grey, inset -2px -2px #dfdfdf, inset 2px 2px #0a0a0a;
}

.live-progress-fill {
  width: 0;
  height: 100%;
  background: repeating-linear-gradient(90deg, #000080 0 8px, transparent 8px 10px);
}

[data-state="complete"] .live-progress-fill {
  background: repeating-linear-gradient(90deg, #246b3b 0 8px, transparent 8px 10px);
}

[data-state="cancelled"] .live-progress-fill {
  background: repeating-linear-gradient(90deg, #85898e 0 8px, transparent 8px 10px);
}

.live-transfer-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 20px;
  margin: 0;
}

.live-transfer-stats > div {
  display: flex;
  min-width: 0;
  min-height: 32px;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
  border-bottom: 1px solid #b6bbc2;
  box-shadow: 0 1px #fff;
  font-size: 11px;
}

.live-transfer-stats .live-stat-wide {
  grid-column: 1 / -1;
}

.live-transfer-stats dt {
  flex: 0 0 auto;
  color: #365b8d;
}

.live-transfer-stats dd {
  min-width: 0;
  margin: 0;
  padding-block: 6px;
  color: #000442;
  font-weight: 700;
  text-align: right;
  overflow-wrap: anywhere;
}

.live-download-actions {
  display: flex;
  justify-content: flex-end;
  gap: 7px;
  padding-block: 2px;
}

.live-download-actions button {
  min-width: 85px;
  min-height: 27px;
  padding: 4px 9px;
  font-size: 11px;
}

.live-download-actions button:first-child {
  min-width: 112px;
  font-weight: 700;
}

.live-info-note {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr);
  align-items: start;
  gap: 6px;
  margin: auto 0 0;
  color: #525c6b;
  font-size: 10px;
  line-height: 1.4;
}

.live-monitor-panel {
  min-width: 0;
  grid-column: 1 / -1;
}

.live-monitor-body {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 14px;
  padding: 6px 9px;
}

.live-rate-monitor {
  min-width: 0;
  margin: 0;
}

.live-rate-monitor figcaption,
.live-log-panel h4,
.live-receipt h4 {
  display: flex;
  min-height: 12px;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 0 0 4px;
  color: #000442;
  font-size: 10px;
  line-height: 1.2;
}

.live-rate-monitor figcaption strong { color: #1c6733; }
.live-log-panel h4 span { color: #4f5a69; font-size: 9px; font-weight: 400; }

.live-graph-screen {
  position: relative;
  height: 40px;
  overflow: hidden;
  background-color: #061b16;
  background-image: linear-gradient(#173b31 1px, transparent 1px), linear-gradient(90deg, #173b31 1px, transparent 1px);
  background-size: 20px 10px;
  box-shadow: inset 1px 1px #000, inset -1px -1px #fff;
}

#live-rate-graph {
  display: block;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.live-rate-area { fill: #63e75f; fill-opacity: .12; }
.live-rate-trace { fill: none; stroke: #63e75f; stroke-width: 1.5; vector-effect: non-scaling-stroke; }

#live-graph-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding-inline: 4px;
  color: #8baf9c;
  font-size: 9px;
  text-align: center;
}

.live-log-panel { min-width: 0; }

.live-event-log {
  height: 40px;
  margin: 0;
  padding: 0 3px 0 0;
  overflow: auto;
  list-style: none;
  scrollbar-width: none;
}

.live-event-log::-webkit-scrollbar { display: none; width: 0; height: 0; }

.live-event-log li {
  display: grid;
  grid-template-columns: 49px minmax(0, 1fr);
  gap: 6px;
  padding-block: 1px;
  color: #233b5b;
  font-size: 9px;
  line-height: 1.3;
}

.live-event-log time { color: #4c5867; font: 9px/1.3 monospace; }
.live-event-log li[data-kind="complete"] > span { color: #1c6733; }
.live-event-log li[data-kind="cancelled"] > span { color: #7d3137; }

.live-receipt {
  min-width: 0;
  height: 56px;
  padding: 4px 7px;
  border: 1px solid #8aa687;
  background: #e7efdf;
}

.live-receipt h4 { color: #1c6733; }
.live-receipt h4 > span { overflow: hidden; font-weight: 400; white-space: nowrap; text-overflow: ellipsis; }

.live-receipt dl {
  display: grid;
  grid-template-columns: .8fr 1.4fr .8fr;
  gap: 10px;
  margin: 0;
}

.live-receipt dl > div { min-width: 0; }
.live-receipt dt { color: #405d47; font-size: 9px; }
.live-receipt dd { margin: 3px 0 0; color: #17452b; font-size: 10px; font-weight: 700; overflow-wrap: anywhere; }

@container page (max-width: 790px) {
  .live-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .live-setup {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: start;
    gap: 14px;
  }

  .live-settings-fields {
    grid-column: 1;
    grid-row: 1 / span 2;
  }

  .live-playback-settings {
    grid-column: 2;
    grid-row: 1;
    padding-top: 0;
    border-top: 0;
    box-shadow: none;
  }

  .live-line-details {
    grid-column: 2;
    grid-row: 2;
  }

  #live-error { grid-column: 1 / -1; }
}

@container page (max-width: 480px) {
  .live-setup {
    grid-template-columns: minmax(0, 1fr);
  }

  .live-settings-fields {
    grid-column: auto;
    grid-row: auto;
  }

  .live-playback-settings {
    grid-column: auto;
    grid-row: auto;
    padding-top: 11px;
    border-top: 1px solid #a3a8b3;
    box-shadow: inset 0 1px #fff;
  }

  .live-line-details {
    grid-column: auto;
    grid-row: auto;
  }

  .live-monitor-body {
    grid-template-columns: minmax(0, 1fr);
    gap: 9px;
  }

  .live-receipt { height: auto; min-height: 56px; }

  .live-download-body {
    padding: 9px;
  }

  .live-transfer-stats {
    grid-template-columns: minmax(0, 1fr);
  }

  .live-transfer-stats > div { min-height: 31px; }

  .live-download-actions {
    flex-wrap: wrap;
  }

  .live-download-actions button,
  .live-download-actions button:first-child {
    min-width: 0;
    flex: 1 1 auto;
    padding-inline: 6px;
  }
}

.compare-view {
  background: #eaeae8;
}

.compare-layout {
  display: grid;
  min-width: 0;
  gap: 6px;
  padding: 6px 7px;
}

.compare-view .calc-panel-title > small {
  margin-left: auto;
  color: #e5ecff;
  font-size: 10px;
  font-weight: 400;
  white-space: nowrap;
}

.compare-setup {
  display: grid;
  min-width: 0;
  grid-template-columns: minmax(190px, 1fr) minmax(330px, 1.4fr) 152px;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 6px 9px;
}

.compare-file-control {
  display: grid;
  min-width: 0;
  grid-template-columns: 27px minmax(0, 1fr);
  align-items: center;
  gap: 6px;
}

.compare-size-control {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
}

.compare-setup label {
  color: #000442;
  font-size: 11px;
}

.compare-file-control > label,
.compare-size-control > label {
  font-weight: 700;
}

.compare-setup select,
#compare-file-size {
  min-width: 0;
  height: 25px;
  font: 11px "Pixelated MS Sans Serif", Arial, sans-serif;
}

.compare-setup select { width: 100%; }
#compare-file-size { width: 78px; }
.compare-unit-options { gap: 7px; padding-block: 0; }
#compare-use-calculator { min-height: 25px; padding-inline: 6px; font-size: 11px; }

.compare-eras {
  display: grid;
  min-width: 0;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  gap: 7px;
}

.compare-era {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.compare-row {
  position: relative;
  display: grid;
  width: 100%;
  min-width: 0;
  height: 36px;
  min-height: 36px;
  grid-template-columns: 32px minmax(0, 1fr) 94px;
  align-items: center;
  gap: 6px;
  padding: 1px 4px 2px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: inset 0 -1px #c6c9cc;
  color: #000442;
  font-size: 11px;
  text-align: left;
  cursor: pointer;
}

.compare-row:active { padding: 1px 4px 2px; box-shadow: inset 1px 1px #a5a498; }
.compare-row:hover { background: #f7f5e8; }
.compare-row[aria-pressed="true"] { background: #fff2b8; }
.compare-row:focus-visible { outline: 1px dotted #000; outline-offset: -3px; }
.compare-row:disabled { color: grey; cursor: default; }
.compare-row.is-fastest .compare-row-result strong { color: #1c6733; }

.compare-row img,
.compare-selected-identity img {
  display: block;
  width: 32px;
  height: 32px;
  image-rendering: pixelated;
}

.compare-connection-copy,
.compare-row-result {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 3px;
  line-height: 1;
}

.compare-connection-copy strong,
.compare-row-result strong {
  font-size: 11px;
  line-height: 1;
}

.compare-connection-copy small,
.compare-row-result small {
  color: #365b8d;
  font-size: 9px;
  line-height: 1;
}

.compare-row-result { text-align: right; }
.compare-row-result strong { white-space: nowrap; }
.compare-row-result small { white-space: nowrap; }

.compare-log-track {
  position: absolute;
  right: 4px;
  bottom: 0;
  left: 42px;
  height: 2px;
  background: #d4d9df;
}

.compare-log-track i { display: block; width: 0; height: 100%; background: #306cc3; transform-origin: left center; }
.compare-row.is-fastest .compare-log-track i { background: #246b3b; }
.compare-row:disabled .compare-log-track i { background: #a3a7ad; }

.compare-highlights {
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  padding: 8px;
  border-top: 1px solid #b9b087;
  background: #fff7d4;
}

.compare-highlights h4 { margin: 0 0 5px; color: #62511b; font-size: 11px; }
.compare-highlights dl { margin: 0; }
.compare-highlights dl > div { display: flex; min-width: 0; min-height: 26px; align-items: center; justify-content: space-between; gap: 8px; }
.compare-highlights dt { color: #625d48; font-size: 10px; }
.compare-highlights dd { min-width: 0; margin: 0; color: #000442; font-size: 11px; font-weight: 700; text-align: right; overflow-wrap: anywhere; }

.compare-selection {
  display: grid;
  min-width: 0;
  min-height: 48px;
  grid-template-columns: minmax(130px, 1fr) minmax(160px, 1.8fr) auto;
  align-items: center;
  gap: 12px;
  padding: 4px 8px;
}

.compare-selected-identity {
  display: grid;
  min-width: 0;
  grid-template-columns: 32px minmax(0, 1fr);
  align-items: center;
  gap: 7px;
}

.compare-selected-identity > div,
.compare-selected-duration { display: grid; min-width: 0; gap: 4px; }
.compare-selected-identity strong { color: #000442; font-size: 11px; }
.compare-selected-identity small,
.compare-selected-duration > span { color: #365b8d; font-size: 10px; }
.compare-selected-duration strong { color: #000442; font-size: 11px; line-height: 1.15; overflow-wrap: anywhere; }
.compare-selection-actions { display: flex; gap: 6px; }
.compare-selection-actions button { min-width: 78px; min-height: 27px; padding-inline: 7px; font-size: 11px; }

.compare-info-note {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr);
  align-items: start;
  gap: 6px;
  margin: 0;
  color: #525c6b;
  font-size: 10px;
  line-height: 1.35;
}

.compare-info-note.is-error { color: #9d1616; }

@container page (max-width: 790px) {
  .compare-setup {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }

  .compare-eras { grid-template-columns: minmax(0, 1fr); }
  .compare-highlights { min-height: 110px; }
  .compare-selection { grid-template-columns: minmax(0, 1fr); gap: 8px; padding: 8px; }
  .compare-selection-actions { justify-content: flex-start; }
}

.security-view {
  padding: 7px;
  background: #eaeae8;
}

.security-content {
  padding: 12px;
  color: #202c40;
  font-size: 11px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.security-content h3 {
  margin: 18px 0 5px;
  color: #00309c;
  font: 700 12px/1.4 "Pixelated MS Sans Serif", Arial, sans-serif;
}

.security-content h3:first-child { margin-top: 0; }
.security-content p { margin: 0 0 10px; }
.security-content ul { margin: 0 0 10px; padding-left: 20px; }
.security-content li + li { margin-top: 4px; }
.security-content .notice { padding: 8px; background: #fff5c9; }
.security-intro { color: #365b8d; }

.security-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  padding: 9px 12px;
  border-bottom: 1px solid #a2a8b1;
}

.security-links a { color: #000080; font-size: 11px; }
.security-links a[aria-current="page"] { color: #202c40; font-weight: 700; }
.security-links a:focus-visible,
.security-content a:focus-visible { outline: 2px solid #00309c; outline-offset: 2px; }
.security-content code { font-size: inherit; }

.exhibit-views {
  min-height: 180px;
  flex: 1 0 auto;
  background: #fff;
}

.exhibit-view {
  min-height: 100%;
}

.browser-status {
  min-height: 28px;
  flex: 0 0 auto;
  align-items: stretch;
  gap: 1px;
  margin: 0;
  padding: 2px 1px 1px;
  border-top: 1px solid #fff;
  background: silver;
  color: #222;
  font: 11px "Pixelated MS Sans Serif", Arial, sans-serif;
}

.browser-status .status-bar-field {
  min-height: 23px;
}

.status-document {
  display: flex;
  min-width: 32px;
  align-items: center;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.status-links {
  display: flex;
  min-width: 0;
  flex: 0 0 auto;
  gap: 1px;
}

.status-link {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 5px;
  padding: 2px 7px;
  color: #0000a8;
  white-space: nowrap;
}

.status-link:hover {
  color: #000080;
}

.status-link:focus-visible {
  outline: 1px dotted #000080;
  outline-offset: -4px;
}

.status-link-icon {
  display: grid;
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  place-items: center;
}

.terminal-mark {
  background: #000080;
  box-shadow: inset -1px -1px #0a0a0a, inset 1px 1px #fff, inset -2px -2px grey, inset 2px 2px #1084d0;
  color: #fff;
  font: 700 10px/1 "Courier New", monospace;
  letter-spacing: -1px;
  text-decoration: none;
}

.coffee-mark {
  color: #8a3b21;
}

.coffee-mark .icon-svg {
  width: 17px;
  height: 17px;
  overflow: visible;
}

@container page (max-width: 900px) {
  .site-hero::before {
    background-position: left -6px center, right -4px center;
    background-position-y: center, calc(50% - 7px);
    background-size: auto 150%, auto 158%;
  }

  .hero-copy {
    width: 64%;
    margin-left: 13%;
  }

  .hero-memory-note {
    display: none;
  }

  .exhibit-nav a {
    min-width: 0;
    gap: 5px;
    padding-inline: 7px;
    font-size: 10px;
  }

}

@container page (max-width: 790px) {
  .calculator-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .common-file {
    min-height: 48px;
  }
}

@container page (max-width: 660px) {
  .site-hero {
    min-height: 112px;
  }

  .site-hero::after {
    background: linear-gradient(90deg, rgba(1, 13, 33, .16), rgba(1, 13, 33, .84) 21% 79%, rgba(1, 13, 33, .16));
  }

  .site-hero::before {
    background-position: left -27px center, right -35px center;
    background-position-y: center, calc(50% - 6px);
    background-size: auto 135%, auto 138%;
  }

  .hero-copy {
    width: 82%;
    margin: 0 auto;
    padding-top: 14px;
    text-align: center;
  }

  .site-hero h1 {
    font-size: clamp(22px, 6cqi, 27px);
    line-height: 1.02;
  }

  .hero-tagline {
    font-size: 11px;
  }

  .exhibit-nav ul {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .exhibit-nav li {
    min-width: 0;
  }

  .exhibit-nav a {
    width: 100%;
    min-height: 44px;
    min-width: 0;
    white-space: normal;
    line-height: 1.1;
  }

  .calculator-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .calculator-layout {
    gap: 10px;
    padding: 7px;
  }

  .calc-panel-title {
    min-height: 25px;
    font-size: 11px;
  }

  .calc-panel-body {
    padding: 8px;
  }

  .file-detail-row {
    grid-template-columns: 90px minmax(0, 1fr);
    gap: 5px;
  }

  .file-detail-row > label {
    font-size: 12px;
  }

  .file-size-group {
    gap: 5px 10px;
  }

  .calculator-controls {
    padding-inline: 7px;
  }

  .connection-list,
  #early-connections {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .connection-group legend {
    font-size: 11px;
  }

  .calculator-result-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
  }

  .download-result {
    grid-template-columns: 82px minmax(0, 1fr);
    font-size: 11px;
  }

  #download-time {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    height: 92px;
    font-size: 13px;
  }

  .download-result > span {
    height: 92px;
  }

  .calculator-hint {
    margin-inline: 0;
    font-size: 11px;
  }

  .common-files-panel h3 {
    font-size: 11px;
  }

  .common-file {
    gap: 10px;
    padding-inline: 9px;
  }

  .common-file-copy strong {
    font-size: 11px;
  }

  .common-file-copy small {
    font-size: 11px;
  }

  .common-file-size {
    font-size: 11px;
  }
}

@container page (max-width: 350px) {
  .hero-copy {
    width: 88%;
  }

  .site-hero h1 {
    font-size: 22px;
  }

  .file-detail-row {
    grid-template-columns: 80px minmax(0, 1fr);
  }

  .calc-panel-title {
    gap: 5px;
    padding-inline: 6px;
    font-size: 11px;
    white-space: nowrap;
  }

  .timeline-summary {
    width: 68%;
  }

  .connection-choice input[type="radio"] + .connection-choice-label {
    gap: 3px;
    margin-left: 17px;
    padding-inline: 1px;
  }

  .connection-choice-label strong {
    font-size: 11px;
  }
}

.restore-window {
  position: fixed;
  z-index: 5;
  top: 50%;
  left: 50%;
  display: flex;
  width: 120px;
  min-height: 76px;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  padding: 8px;
  transform: translate(-50%, -50%);
  border: 0;
  background: transparent;
  box-shadow: none;
  color: #fff;
  font: 11px/1.3 "Pixelated MS Sans Serif", Arial, sans-serif;
  text-shadow: 1px 1px #001b51;
  cursor: pointer;
}

.restore-window:hover,
.restore-window:focus-visible {
  background: rgba(0, 0, 128, .4);
  outline: 1px dotted #fff;
  outline-offset: -2px;
}

.restore-window:active {
  padding: 8px;
  background: rgba(0, 0, 128, .6);
  box-shadow: none;
}

.restore-window img {
  width: 32px;
  height: 32px;
  image-rendering: pixelated;
}

.system-dialog.window {
  width: min(420px, calc(100vw - 24px));
  max-width: 100%;
  border: 0;
  border-radius: 0;
  color: #222;
}

.system-dialog::backdrop {
  background: rgba(0, 0, 0, .18);
}

.system-dialog form {
  margin: 0;
}

.dialog-title {
  min-height: 23px;
}

.dialog-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 10px;
}

.dialog-body > input {
  width: 100%;
}

.dialog-body p {
  margin: 0;
  line-height: 1.45;
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 4px;
}

.dialog-actions button {
  color: #222;
  text-shadow: none;
}

.about-body {
  display: grid;
  grid-template-columns: 54px 1fr;
  align-items: start;
}

.about-body img {
  grid-row: 1 / 3;
  image-rendering: pixelated;
}

.about-body .dialog-actions {
  grid-column: 2;
}

@media (max-width: 760px) {
  .title-copy {
    max-width: calc(100% - 70px);
  }

  .menu-bar {
    max-width: 100%;
    gap: 0;
    overflow: visible;
  }

  .toolbar-row::-webkit-scrollbar {
    display: none;
  }

  .menu {
    position: static;
  }

  .menu-popover.window {
    position: absolute;
    top: 100%;
    right: 4px;
    left: 4px !important;
    width: auto;
    min-width: 0;
  }

  .menu-trigger {
    padding-inline: 5px;
  }

  .toolbar-row {
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
  }

  .toolbar-button {
    min-width: 56px;
    flex-basis: 56px;
    padding-inline: 2px;
  }

  .activity-brand {
    position: sticky;
    right: 0;
    box-shadow:
      inset -1px -1px #fff,
      inset 1px 1px #0a0a0a,
      inset -2px -2px #dfdfdf,
      inset 2px 2px grey,
      -5px 0 5px silver;
  }

  .status-link {
    gap: 4px;
    padding-inline: 5px;
  }

}

@media (max-width: 360px) {
  .status-link {
    gap: 3px;
    padding-inline: 4px;
  }

  .status-link-icon {
    width: 16px;
    height: 16px;
    flex-basis: 16px;
  }

  .coffee-mark .icon-svg {
    width: 15px;
    height: 15px;
  }
}

@media (max-width: 480px), (max-height: 520px) {
  body {
    padding: 8px;
  }

.no-script-note { max-width: 700px; padding: 12px; background: #fff5c9; color: #202c40; font: 13px/1.5 Arial, sans-serif; }
.no-script-note a { color: #000080; }

.browser-window.window {
    width: calc(100vw - 16px);
    min-height: calc(100dvh - 16px);
    max-height: none;
    aspect-ratio: auto;
  }

  .browser-window.window.maximized {
    width: 100vw;
    min-height: 0;
  }
}

@media (max-width: 420px) {
  .toolbar-row {
    height: 60px;
  }

  .toolbar-button {
    height: 52px;
    min-width: 51px;
    flex-basis: 51px;
    font-size: 9px;
  }

  .activity-brand {
    width: 52px;
    min-width: 52px;
    height: 52px;
  }

  .activity-brand svg {
    width: 44px;
    height: 44px;
  }

}

@media print {
  html,
  body {
    min-height: 0;
    background: #fff;
  }

  body {
    display: block;
    padding: 0;
  }

  .title-bar,
  .menu-bar,
  .toolbar-row,
  .browser-status,
  .restore-window,
  .system-dialog {
    display: none !important;
  }

  .browser-window.window {
    position: static;
    display: block;
    width: 100%;
    height: auto;
    max-height: none;
    aspect-ratio: auto;
    padding: 0;
    box-shadow: none;
  }

  #page-canvas {
    min-height: 100vh;
  }
}

@media (prefers-reduced-motion: reduce) {
  [data-state="running"] .live-flying-paper,
  [data-state="paused"] .live-flying-paper {
    animation: none;
  }

  .activity-brand.is-active .brand-orbit,
  .activity-brand.is-connected .brand-orbit,
  .activity-brand.is-active .brand-n,
  .activity-brand.is-connected .brand-n,
  .activity-brand.is-active .brand-pulse,
  .activity-brand.is-connected .brand-pulse {
    animation: none;
  }

  .activity-brand.is-active .brand-n,
  .activity-brand.is-connected .brand-n {
    fill: #edff65;
  }

  .activity-brand.is-active .brand-pulse,
  .activity-brand.is-connected .brand-pulse {
    fill: #34e8f1;
    opacity: 1;
  }
}
