* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
}

body {
  font-family: Tahoma, "MS Sans Serif", sans-serif;
  font-size: 12px;
  color: #000;
  background: #808080;
}

.browser {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #d4d0c8;
  border: 2px solid #d4d0c8;
}

.titlebar {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 22px;
  padding: 0 6px;
  color: #fff;
  background: #000080;
  font-weight: bold;
}

.titlebar-icon {
  width: 12px;
  height: 12px;
  object-fit: contain;
  flex-shrink: 0;
}

.toolbar {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px;
  border-top: 1px solid #fff;
  border-bottom: 1px solid #808080;
}

button {
  font-family: Tahoma, "MS Sans Serif", sans-serif;
  font-size: 12px;
  padding: 3px 10px;
  color: #000;
  background: #d4d0c8;
  border-top: 2px solid #fff;
  border-left: 2px solid #fff;
  border-right: 2px solid #404040;
  border-bottom: 2px solid #404040;
  cursor: default;
}

button:active:not(:disabled) {
  border-top-color: #404040;
  border-left-color: #404040;
  border-right-color: #fff;
  border-bottom-color: #fff;
}

button:disabled {
  color: #808080;
}

.address-form {
  display: flex;
  align-items: center;
  flex: 1;
  gap: 4px;
  min-width: 0;
  margin-left: 8px;
}

.address-form label {
  white-space: nowrap;
}

.address-field {
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 0;
  height: 22px;
  background: #fff;
  border-top: 2px solid #808080;
  border-left: 2px solid #808080;
  border-right: 2px solid #fff;
  border-bottom: 2px solid #fff;
}

.https-lock {
  width: 8px;
  height: 10px;
  margin: 0 2px 0 4px;
  flex-shrink: 0;
  position: relative;
}

.https-lock[hidden] {
  display: none;
}

.https-lock::before {
  content: "";
  position: absolute;
  left: 1px;
  top: 0;
  width: 6px;
  height: 4px;
  border: 1px solid #404040;
  border-bottom: 0;
  border-radius: 4px 4px 0 0;
  box-sizing: border-box;
}

.https-lock::after {
  content: "";
  position: absolute;
  left: 0;
  top: 4px;
  width: 8px;
  height: 6px;
  background: #c4a000;
}

#address-bar {
  flex: 1;
  min-width: 0;
  height: 18px;
  padding: 0 4px 0 2px;
  font-family: "Courier New", Courier, monospace;
  font-size: 13px;
  border: 0;
  background: #fff;
  outline: none;
}

.viewport-shell {
  position: relative;
  flex: 1;
  min-height: 0;
  width: 100%;
  border-top: 2px solid #808080;
  border-left: 2px solid #808080;
  border-right: 2px solid #fff;
  border-bottom: 2px solid #fff;
  background: #fff;
  overflow: hidden;
}

.viewport {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #fff;
}

.page-loader {
  position: absolute;
  z-index: 2;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  display: none;
  pointer-events: none;
}

.viewport-shell.is-loading .page-loader {
  display: block;
}

.loading-dialog {
  width: 100%;
  height: 100%;
}

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

.loading-meter {
  width: 100%;
  height: 3px;
  overflow: hidden;
  background: transparent;
}

.loading-progress {
  display: block;
  width: 0;
  height: 100%;
  background: #245edb;
  box-shadow: 0 1px 2px rgba(0, 0, 128, .35);
  transition: width 240ms steps(5, end);
}

.page-loader.is-stuttering {
  animation: network-stutter 950ms steps(1, end);
}

.page-loader.is-finishing {
  animation: loader-finish 120ms linear forwards;
}

.viewport-shell.is-revealing .viewport {
  animation: page-reveal-flicker 120ms steps(1, end);
}

@keyframes network-stutter {
  0%, 31%, 52%, 74%, 100% { opacity: 1; }
  32%, 53% { opacity: .82; }
  75% { opacity: .65; }
}

@keyframes loader-finish {
  from { opacity: 1; }
  to { opacity: 0; }
}

@keyframes page-reveal-flicker {
  0% { opacity: .82; }
  35% { opacity: 1; }
  58% { opacity: .94; }
  100% { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .loading-progress {
    transition: none;
  }

  .page-loader.is-stuttering,
  .page-loader.is-finishing,
  .viewport-shell.is-revealing .viewport {
    animation-duration: .01ms;
  }
}
