:root {
  --teal-bg: #008080;
  --teal-grid: rgba(255, 255, 255, .08);
  --teal-dot: rgba(190, 255, 255, .18);
  --panel: silver;
  --ink: #111;
  --muted: #404040;
  --pink: #ff7ab8;
  --amber: #f7c85d;
  --deep-teal: #005f63;
  --desktop-width: 1040px;
  --taskbar-height: 40px;
  --taskbar-bg: silver;
  --taskbar-shadow: inset -1px -1px #0a0a0a, inset 1px 1px #fff, inset -2px -2px grey, inset 2px 2px #dfdfdf;
  --taskbar-color: #222;
  --taskbar-tray-bg: transparent;
  --taskbar-tray-color: #222;
  --taskbar-tray-shadow: inset -1px -1px #dfdfdf, inset 1px 1px grey;
  --taskbar-active-shadow: inset -1px -1px #fff, inset 1px 1px #0a0a0a, inset -2px -2px #dfdfdf, inset 2px 2px grey;
  --start-menu-bg: silver;
  --start-menu-color: #222;
  --start-menu-shadow: inset -1px -1px #0a0a0a, inset 1px 1px #dfdfdf, inset -2px -2px grey, inset 2px 2px #fff;
  --start-menu-brand-bg: linear-gradient(180deg, #000080, #1084d0);
}

* {
  box-sizing: border-box;
}

html[data-css-theme="xp"] {
  --taskbar-height: 42px;
  --taskbar-bg: linear-gradient(180deg, #4b90f6 0, #2f6fe8 12%, #245edb 42%, #1941a5 100%);
  --taskbar-shadow: inset 0 1px #6fb4ff, inset 0 -1px #0b2b78;
  --taskbar-color: #fff;
  --taskbar-tray-bg: linear-gradient(180deg, #1c8dec, #0e73cf 46%, #0a55aa);
  --taskbar-tray-color: #fff;
  --taskbar-tray-shadow: inset 1px 1px rgba(255, 255, 255, .35), inset -1px -1px rgba(0, 0, 0, .3);
  --taskbar-active-shadow: inset 1px 1px rgba(255, 255, 255, .32), inset -1px -1px rgba(0, 0, 0, .45);
  --start-menu-bg: #ece9d8;
  --start-menu-color: #222;
  --start-menu-shadow: 2px 2px 6px rgba(0, 0, 0, .35), inset 1px 1px #fff, inset -1px -1px #7f7f7f;
  --start-menu-brand-bg: linear-gradient(180deg, #2862c7, #16378f);
}

/* XP.css specifies title-bar height as content height; preserve its padding. */
html[data-css-theme="xp"] .title-bar {
  box-sizing: content-box;
}

html {
  min-height: 100%;
  background: var(--teal-bg);
  letter-spacing: 0;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    linear-gradient(90deg, var(--teal-grid) 1px, transparent 1px),
    linear-gradient(var(--teal-grid) 1px, transparent 1px),
    radial-gradient(circle at 24px 24px, var(--teal-dot) 1px, transparent 2px),
    var(--teal-bg);
  background-size: 32px 32px, 32px 32px, 96px 96px, auto;
}

.page-frame .window-body {
  font-family: Arial, sans-serif;
  -webkit-font-smoothing: auto;
  text-rendering: auto;
}

a {
  color: #000080;
}

code,
pre {
  font-family: "Cascadia Mono", Consolas, monospace;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -48px;
  z-index: 10000;
  padding: 8px 10px;
  color: white;
  background: navy;
}

.skip-link:focus {
  top: 12px;
}

.page-frame {
  width: min(100% - 32px, 1040px);
  margin: 0 auto;
  padding: 28px 0 56px;
}

body[data-page="home"] .page-frame {
  width: min(100% - 48px, calc(var(--desktop-width) + 32px));
  padding: 20px 0 calc(var(--taskbar-height) + 28px);
}

body[data-page="fallback"] .page-frame {
  min-height: 100vh;
  padding: 20px 0;
}

h1,
h2,
h3 {
  margin-top: 0;
  letter-spacing: 0;
}

h1 {
  margin-bottom: 10px;
  color: white;
  font-size: 42px;
  line-height: 1;
  text-shadow: 2px 2px 0 #004848;
}

h2 {
  font-size: 24px;
}

h3 {
  font-size: 18px;
}

.window h1,
.window h2,
.window h3 {
  color: var(--ink);
  text-shadow: none;
}

.dynamoe-desktop {
  min-height: calc(100vh - var(--taskbar-height) - 20px);
}

.desktop-workarea {
  position: relative;
  width: min(100%, var(--desktop-width));
  min-height: max(780px, calc(100vh + 140px));
  margin: 0 auto;
}

.desktop-window {
  position: absolute;
  left: var(--x);
  top: var(--y);
  z-index: 1;
  width: var(--w);
  max-width: calc(100% - var(--x));
}

.desktop-window .title-bar {
  cursor: move;
  user-select: none;
}

.desktop-window .title-bar-controls,
.desktop-window .title-bar-controls button {
  cursor: default;
}

.desktop-window.is-focused {
  z-index: 20;
}

.desktop-window.is-minimized,
.desktop-window.is-closed {
  display: none;
}

.desktop-window.is-dragging {
  opacity: .96;
}

.desktop-window.is-reflowing {
  transition: left .12s ease-out, top .12s ease-out;
}

.desktop-footer-window {
  top: auto;
  bottom: 0;
  left: 50%;
  width: min(var(--w), calc(100% - 260px));
  max-width: 340px;
  transform: translateX(-50%);
}

.desktop-footer-window .title-bar {
  cursor: default;
}

.image-window .window-body {
  margin: 6px;
}

.photo-viewer {
  display: grid;
  gap: 6px;
}

.photo-canvas {
  display: grid;
  aspect-ratio: 4 / 3;
  min-height: 0;
  overflow: hidden;
  place-items: center;
  background: #111;
}

.moshi-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.photo-controls {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) 76px;
  gap: 6px;
  align-items: center;
}

.photo-controls button {
  min-width: 0;
}

.photo-status {
  margin: 0;
  text-align: center;
}

.intro-copy h1 {
  margin-bottom: 12px;
  font-size: 31px;
  line-height: 1.05;
}

.intro-copy p,
.link-panel p {
  margin: 0 0 12px;
  line-height: 1.45;
}

.link-panel {
  display: grid;
  gap: 12px;
}

.blog-panel {
  display: grid;
  gap: 10px;
}

.blog-panel-lede {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
}

.blog-panel-lede p {
  margin: 0;
  line-height: 1.4;
}

.link-panel button[data-href],
.command-row button[data-href],
.post-card button[data-href] {
  width: 100%;
}

.recent-posts {
  display: grid;
  gap: 1px;
  width: 100%;
  min-height: 166px;
  padding: 3px;
  background: #fff;
}

.recent-post-link {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 1px 8px;
  padding: 5px 6px;
  color: #000;
  text-decoration: none;
}

.recent-post-link:hover,
.recent-post-link:focus {
  color: #fff;
  background: #000080;
  outline: 1px dotted #fff;
}

.recent-post-link time {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.25;
}

.recent-post-link:hover time,
.recent-post-link:focus time {
  color: #fff;
}

.recent-post-link strong {
  min-width: 0;
  font-size: 12px;
  line-height: 1.25;
}

.recent-post-link span {
  grid-column: 2;
  min-width: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.recent-post-link:hover span,
.recent-post-link:focus span {
  color: #fff;
}

.info-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 7px;
}

.bottom-text-button {
  width: auto;
  min-width: 116px;
}

.dynamoe-dialog {
  width: min(calc(100% - 32px), 320px);
  border: 0;
}

.dynamoe-dialog:focus {
  outline: none;
}

.dynamoe-dialog::backdrop {
  background: rgba(0, 0, 0, .28);
}

.bottom-text-dialog-body {
  display: grid;
  gap: 14px;
  margin: 12px;
  text-align: center;
}

.bottom-text-dialog-body p {
  margin: 0;
}

.bottom-text-dialog-actions {
  justify-content: center;
}

.clock-dialog-body {
  display: grid;
  gap: 10px;
  margin: 12px;
  text-align: center;
}

.clock-dialog-body p {
  margin: 0;
}

.clock-dialog-time {
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 22px;
  font-weight: 700;
}

.visitor-counter {
  flex: 1 1 100%;
  text-align: center;
  white-space: nowrap;
}

.desktop-icon-group {
  position: absolute;
  left: 652px;
  top: 252px;
  z-index: 2;
  width: 184px;
}

.theme-picker {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(76px, 1fr));
  gap: 12px;
  min-height: 0;
  align-items: start;
}

.theme-picker .theme-icon {
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 6px;
  min-width: 0;
  min-height: 124px;
  padding: 7px 4px;
  color: var(--ink);
  background: transparent;
  border: 0;
  box-shadow: none;
  text-shadow: none;
}

.theme-picker .theme-icon:active,
.theme-picker .theme-icon:focus {
  box-shadow: none;
  text-shadow: none;
}

.theme-picker .theme-icon:focus {
  outline: 1px dotted #000;
  outline-offset: -2px;
}

.theme-picker img {
  width: 58px;
  height: 58px;
  object-fit: contain;
  image-rendering: auto;
}

.theme-picker span {
  max-width: 76px;
  padding: 2px 4px;
  color: var(--ink);
  text-align: center;
  line-height: 1.2;
  text-shadow: none;
}

.desktop-theme-icons .theme-icon span {
  color: #fff;
  text-shadow: 1px 1px 0 #000;
}

.desktop-theme-icons .theme-icon {
  min-height: 88px;
}

.desktop-theme-icons {
  position: fixed;
  right: 24px;
  left: auto;
  top: auto;
  bottom: calc(var(--taskbar-height) + 14px);
  z-index: 60;
}

.theme-picker .theme-icon[aria-pressed="true"] span {
  color: #fff;
  background: #000080;
  outline: 1px dotted #fff;
}

.start-bar {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 999;
  display: flex;
  align-items: center;
  gap: 4px;
  width: auto;
  min-height: var(--taskbar-height);
  padding: 3px 6px;
  color: var(--taskbar-color);
  background: var(--taskbar-bg);
  box-shadow: var(--taskbar-shadow);
  font-family: "Pixelated MS Sans Serif", Arial, sans-serif;
  font-size: 11px;
  -webkit-font-smoothing: none;
}

.start-button {
  min-width: 104px;
  font-weight: 700;
}

.start-mark {
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-right: 5px;
  background:
    linear-gradient(90deg, #ff4f8c 0 50%, transparent 50%),
    linear-gradient(#fff06b 0 50%, #00a0a0 50%);
  box-shadow: 1px 1px 0 #000;
}

.task-buttons {
  display: flex;
  min-width: 0;
  flex: 1;
  gap: 3px;
  overflow: hidden;
}

.task-buttons button {
  min-width: 0;
  max-width: 132px;
  flex: 1 1 92px;
  overflow: hidden;
  padding-inline: 6px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-buttons button.is-active {
  box-shadow: var(--taskbar-active-shadow);
  text-shadow: 1px 1px #222;
}

.task-buttons button.is-closed {
  color: grey;
  text-shadow: 1px 1px 0 #fff;
}

.task-buttons button[hidden] {
  display: none;
}

.tray-clock {
  min-width: 72px;
  min-height: 28px;
  padding: 5px 8px 4px;
  color: var(--taskbar-tray-color);
  background: var(--taskbar-tray-bg);
  border: 0;
  border-radius: 0;
  text-align: center;
  white-space: nowrap;
  box-shadow: var(--taskbar-tray-shadow);
}

.tray-clock:focus {
  outline: 1px dotted currentColor;
  outline-offset: -3px;
}

.start-menu {
  position: absolute;
  bottom: calc(100% + 2px);
  left: 0;
  display: flex;
  width: 300px;
  min-height: 290px;
  color: var(--start-menu-color);
  background: var(--start-menu-bg);
  box-shadow: var(--start-menu-shadow);
  padding: 3px;
}

.start-menu[hidden] {
  display: none;
}

.start-menu-brand {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  width: 34px;
  padding: 8px 0;
  color: white;
  background: var(--start-menu-brand-bg);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}

.start-menu-items {
  display: grid;
  flex: 1;
  grid-template-rows: auto auto auto 1fr auto auto;
  gap: 2px;
  padding: 3px;
}

.start-menu-items button {
  justify-content: flex-start;
  width: 100%;
  min-width: 0;
  padding-left: 8px;
}

.start-profile {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  padding: 7px;
}

.start-profile img {
  display: block;
  width: 58px;
  height: 58px;
  object-fit: contain;
}

.start-profile strong {
  display: block;
  margin-bottom: 4px;
  font-size: 13px;
}

.start-profile p,
.start-current {
  margin: 0;
  line-height: 1.35;
}

.start-current {
  padding: 6px 8px 8px;
  color: var(--muted);
}

.start-profile-links {
  display: grid;
  gap: 2px;
}

.start-menu-spacer {
  min-height: 10px;
}

html[data-css-theme="xp"] .start-button {
  min-width: 116px;
  min-height: 31px;
  color: #fff;
  background: linear-gradient(180deg, #73d35a 0, #37a53e 45%, #147e24 100%);
  border: 1px solid rgba(0, 78, 15, .85);
  border-radius: 0 12px 12px 0;
  box-shadow: inset 1px 1px rgba(255, 255, 255, .55), inset -1px -1px rgba(0, 0, 0, .35);
  text-shadow: 1px 1px #06450e;
}

html[data-css-theme="xp"] .task-buttons button {
  min-height: 30px;
  color: #fff;
  background: linear-gradient(180deg, #5d9df7 0, #3b7bea 48%, #1f55c4 100%);
  border: 1px solid rgba(10, 45, 127, .75);
  border-radius: 2px;
  box-shadow: inset 1px 1px rgba(255, 255, 255, .35), inset -1px -1px rgba(0, 0, 0, .28);
  text-shadow: 1px 1px #12326e;
}

html[data-css-theme="xp"] .task-buttons button.is-active {
  background: linear-gradient(180deg, #2b65d6 0, #2452bd 54%, #14388e 100%);
}

.page-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
  margin-bottom: 18px;
}

.eyebrow {
  margin: 0 0 6px;
  color: #e7ffff;
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 12px;
  text-transform: uppercase;
}

.lede {
  max-width: 62ch;
  margin: 0 0 12px;
  color: white;
  font-size: 15px;
  line-height: 1.55;
}

.two-col,
.note-page {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
  gap: 18px;
  margin-top: 18px;
}

.two-col.wide-left {
  grid-template-columns: minmax(0, 1.35fr) minmax(260px, .65fr);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.stat-window .window-body {
  display: grid;
  gap: 4px;
}

.stat-window strong {
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 20px;
}

.stat-window .window-body span,
.post-meta {
  color: var(--muted);
}

.setup-list {
  margin: 0;
  padding-left: 22px;
  line-height: 1.7;
}

.checklist {
  display: grid;
  gap: 8px;
}

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

.app-header-window {
  margin-bottom: 18px;
}

.app-header-body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.app-header-copy {
  min-width: 0;
}

.app-header-copy p {
  margin: 4px 0 0;
  line-height: 1.4;
}

.app-header-address {
  font-family: "Cascadia Mono", "Lucida Console", monospace;
  font-size: 14px;
}

.factorio-connection-body {
  display: flex;
  gap: 8px;
  align-items: center;
}

.service-light {
  display: inline-block;
  width: 10px;
  height: 10px;
  flex: 0 0 10px;
  background: #808080;
  border: 1px solid #333;
  border-radius: 50%;
  box-shadow: inset 1px 1px rgba(255, 255, 255, .55);
}

.service-light.is-online {
  background: #1ca74b;
}

.service-light.is-degraded,
.service-light.is-pending {
  background: #e7ae24;
}

.service-light.is-offline {
  background: #d44343;
}

.join-panel,
.world-snapshot {
  display: grid;
  gap: 12px;
}

.join-panel p,
.world-snapshot p {
  margin: 0;
  line-height: 1.45;
}

.factorio-info-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(260px, .6fr);
  gap: 18px;
}

.snapshot-panel dl {
  display: grid;
  gap: 6px;
  margin: 0;
}

.snapshot-panel dl div {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 8px;
}

.snapshot-panel dt {
  font-weight: 700;
}

.snapshot-panel dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
}

.factorio-download-panel {
  display: grid;
  gap: 8px;
}

.factorio-download-panel button {
  width: 100%;
}

.factorio-map-window,
.factorio-world-window,
.status-containers-window {
  margin-top: 18px;
}

.mapshot-viewer {
  position: relative;
  min-height: 460px;
  overflow: hidden;
  background: #fff;
}

.mapshot-surface-toolbar {
  display: grid;
  grid-template-columns: auto minmax(180px, 420px) auto;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.mapshot-surface-toolbar select {
  width: 100%;
  min-width: 0;
}

.mapshot-surface-toolbar span {
  color: #444;
  white-space: nowrap;
}

.mapshot-viewer iframe {
  display: block;
  width: 100%;
  height: 540px;
  border: 0;
}

.mapshot-viewer iframe[hidden],
.mapshot-empty[hidden] {
  display: none;
}

.mapshot-empty {
  position: absolute;
  inset: 0;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 10px;
  padding: 24px;
  text-align: center;
  background:
    linear-gradient(90deg, rgba(0, 128, 128, .08) 1px, transparent 1px),
    linear-gradient(rgba(0, 128, 128, .08) 1px, transparent 1px),
    #f7fbfb;
  background-size: 24px 24px;
}

.mapshot-timeline {
  display: grid;
  grid-template-columns: 34px auto minmax(160px, 1fr) 34px auto;
  gap: 6px;
  align-items: center;
  margin-top: 8px;
}

.mapshot-timeline select {
  min-width: 0;
  width: 100%;
}

.mapshot-timeline [data-mapshot-previous],
.mapshot-timeline [data-mapshot-next] {
  width: 34px;
  min-width: 0;
  padding: 0;
}

.factorio-explorer-body {
  display: grid;
  gap: 8px;
}

.explorer-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.explorer-toolbar button {
  min-width: 72px;
}

.explorer-address-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
}

.explorer-address-row input {
  width: 100%;
}

.factorio-explorer-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  min-height: 520px;
}

.explorer-tree-pane,
.explorer-list-pane {
  min-width: 0;
  overflow: auto;
  background: #fff;
}

.explorer-tree-pane {
  border-right: 0;
}

.explorer-pane-heading {
  padding: 7px 8px;
  font-weight: 700;
}

.explorer-tree {
  min-height: calc(100% - 29px);
  border: 0 !important;
}

.explorer-tree a.is-current {
  color: #fff;
  background: #000080;
}

.explorer-file-list {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-family: Arial, sans-serif;
  font-size: 12px;
  -webkit-font-smoothing: auto;
  text-rendering: auto;
}

.factorio-explorer-body .tree-view,
.status-table {
  font-family: Arial, sans-serif;
  font-size: 12px;
  -webkit-font-smoothing: auto;
  text-rendering: auto;
}

.explorer-file-list th,
.explorer-file-list td {
  padding: 5px 7px;
  overflow: hidden;
  border-right: 1px solid #c0c0c0;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.explorer-file-list th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--dynamoe-window-bg);
  box-shadow: inset -1px -1px #808080, inset 1px 1px #fff;
  font-weight: 400;
}

.explorer-file-list th:first-child {
  width: 44%;
}

.explorer-file-list th:nth-child(2) {
  width: 18%;
}

.explorer-file-list th:nth-child(3) {
  width: 14%;
}

.explorer-file-list tr[data-explorer-entry] {
  cursor: default;
}

.explorer-file-list tr[data-explorer-entry]:focus {
  outline: 1px dotted #000;
  outline-offset: -2px;
}

.explorer-file-list tr.is-selected td {
  color: #fff;
  background: #000080;
}

.explorer-name::before {
  content: "";
  display: inline-block;
  width: 13px;
  height: 11px;
  margin-right: 4px;
  vertical-align: -2px;
}

.explorer-name.is-directory::before {
  border: 1px solid #8d5d00;
  background: #f2c14e;
  box-shadow: inset 1px 1px #ffe39a;
}

.explorer-name.is-file::before {
  border: 1px solid #606060;
  background: #fff;
  box-shadow: inset -3px 3px #d8e8ff;
}

.mapshot-empty p {
  max-width: 42ch;
  margin: 0;
}

.mapshot-statusbar {
  margin-top: 6px;
}

.status-metrics progress {
  width: 100%;
}

.status-header-body,
.status-overall-row,
.status-controls {
  display: flex;
  align-items: center;
}

.status-overall-row {
  gap: 8px;
}

.status-controls {
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px;
}

.status-window-footer {
  margin-top: 6px;
}

.status-window-footer .service-light {
  margin-right: 5px;
  vertical-align: -1px;
}

.status-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr);
  gap: 18px;
}

.status-list {
  min-height: 166px;
  padding: 4px;
  background: #fff;
}

.status-list > p {
  margin: 8px;
}

.service-row {
  display: grid;
  grid-template-columns: 12px minmax(120px, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-height: 34px;
  padding: 5px 7px;
  border-bottom: 1px solid #dfdfdf;
}

.service-row:last-child {
  border-bottom: 0;
}

.service-row > span:last-child {
  color: var(--muted);
  text-align: right;
}

.snapshot-panel {
  min-height: 166px;
}

.status-operator-grid {
  margin-top: 18px;
}

.status-quick-links {
  min-height: 166px;
}

.status-quick-links li + li {
  margin-top: 6px;
}

.status-table-wrap {
  overflow: auto;
  background: #fff;
}

.status-table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
  text-align: left;
}

.status-table th,
.status-table td {
  padding: 7px 9px;
  border-bottom: 1px solid #dfdfdf;
}

.status-table th {
  position: sticky;
  top: 0;
  background: var(--panel);
}

.notes-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 18px;
}

.tree-list,
.note-list {
  display: grid;
  gap: 10px;
}

.tree-list a {
  padding: 5px;
  color: var(--ink);
  text-decoration: none;
  border: 1px dotted transparent;
}

.tree-list a:hover {
  background: #ffffcc;
  border-color: grey;
}

.note-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: 12px 0;
  font-size: 12px;
}

.post-meta span {
  padding: 1px 5px;
  color: var(--ink);
  background: #ffffcc;
  border: 1px solid grey;
}

.note-page {
  grid-template-columns: 240px minmax(0, 1fr);
  align-items: start;
}

.markdown-body {
  max-width: 76ch;
  line-height: 1.7;
}

.markdown-body h1 {
  font-size: 28px;
}

.markdown-body pre {
  overflow: auto;
  color: #111;
}

.private-gate,
.fallback-screen {
  min-height: calc(100vh - 80px);
  display: grid;
  place-items: center;
}

body[data-page="fallback"] .fallback-screen {
  min-height: calc(100vh - 40px);
}

.fallback-window {
  width: min(100%, 540px);
}

.fallback-body {
  display: grid;
  justify-items: center;
  gap: 14px;
  padding: 18px;
  text-align: center;
}

.fallback-image {
  display: block;
  width: min(100%, 420px);
  height: auto;
  margin: 0;
}

.fallback-body h1 {
  margin: 0;
  font-size: 24px;
  line-height: 1.2;
}

.fallback-copy {
  max-width: 42ch;
  margin: 0;
  line-height: 1.45;
}

.fallback-body .command-row {
  width: min(100%, 220px);
}

.login-box form {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.login-box label {
  display: grid;
  gap: 4px;
}

@media (max-width: 860px) {
  .mapshot-surface-toolbar {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .mapshot-surface-toolbar span {
    grid-column: 2;
  }

  .page-frame,
  body[data-page="home"] .page-frame {
    width: min(100% - 18px, 620px);
    padding-top: 14px;
  }

  .dynamoe-desktop {
    min-height: auto;
  }

  .desktop-workarea {
    display: grid;
    gap: 12px;
    min-height: calc(100vh + 120px);
    padding-bottom: 74px;
  }

  .desktop-window {
    position: static;
    width: 100%;
    max-width: none;
  }

  .desktop-footer-window {
    width: min(100%, 320px);
    max-width: 320px;
    margin-top: 84px;
    justify-self: center;
    transform: none;
    order: 8;
  }

  .desktop-icon-group {
    position: static;
    width: 100%;
    order: 6;
  }

  .desktop-theme-icons {
    position: static;
    width: 100%;
  }

  .desktop-window .title-bar {
    cursor: default;
  }

  .blog-panel-lede,
  .recent-post-link {
    grid-template-columns: 1fr;
  }

  .recent-post-link span {
    grid-column: 1;
  }

  .start-bar {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    margin: 0;
    transform: none;
  }

  .task-buttons {
    display: none;
  }

  .start-menu {
    width: min(320px, calc(100vw - 18px));
  }

  .page-header,
  .two-col,
  .two-col.wide-left,
  .notes-layout,
  .note-page,
  .status-grid {
    grid-template-columns: 1fr;
  }

  .page-header {
    display: grid;
  }

  .dashboard-grid,
  .note-list {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 30px;
  }

  .intro-copy h1 {
    font-size: 28px;
  }

  .app-header-body,
  .factorio-info-grid {
    display: grid;
    grid-template-columns: 1fr;
  }

  .mapshot-timeline {
    grid-template-columns: 34px minmax(0, 1fr) 34px;
  }

  .mapshot-timeline label {
    grid-column: 1 / -1;
  }

  .mapshot-timeline select {
    grid-column: 2;
  }

  .mapshot-timeline [data-mapshot-previous] {
    grid-column: 1;
  }

  .mapshot-timeline [data-mapshot-next] {
    grid-column: 3;
  }

  .mapshot-timeline [data-mapshot-play] {
    grid-column: 1 / -1;
  }

  .factorio-explorer-layout {
    grid-template-columns: 1fr;
    min-height: 520px;
  }

  .explorer-tree-pane {
    max-height: 180px;
    border-right: initial;
  }

  .explorer-list-pane {
    min-height: 340px;
  }

  .explorer-file-list th:first-child {
    width: 55%;
  }

  .explorer-file-list th:nth-child(2) {
    width: 25%;
  }

  .explorer-file-list th:nth-child(3),
  .explorer-file-list td:nth-child(3),
  .explorer-file-list th:nth-child(4),
  .explorer-file-list td:nth-child(4) {
    display: none;
  }

  .mapshot-viewer {
    min-height: 360px;
  }

  .mapshot-viewer iframe {
    height: 420px;
  }

  .service-row {
    grid-template-columns: 12px minmax(0, 1fr);
  }

  .service-row > span:last-child {
    grid-column: 2;
    text-align: left;
  }

  .status-table {
    min-width: 0;
    table-layout: fixed;
  }

  .status-table th,
  .status-table td {
    padding-right: 5px;
    padding-left: 5px;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .status-table th:nth-child(2),
  .status-table td:nth-child(2) {
    display: none;
  }

  .snapshot-panel dl div {
    grid-template-columns: 1fr;
    gap: 2px;
  }
}
