:root {
  --hud-width: 300px;
}

* {
  box-sizing: border-box;
}

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

body {
  display: flex;
  flex-direction: column;
  height: 100vh;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: #f4f5f7;
  color: #1b1f24;
  overflow: hidden;
}

.masthead {
  flex: 0 0 auto;
  padding: 14px 20px 10px;
  background: #ffffff;
  border-bottom: 1px solid #dfe3e8;
}

.intro {
  margin: 0 0 10px;
  max-width: 72ch;
  font-size: 15px;
  line-height: 1.5;
}

.intro a {
  color: #0b5cad;
}

.settings {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  font-size: 13px;
}

.settings .label {
  color: #5b6472;
  margin-right: 4px;
}

.settings .value {
  font-weight: 600;
  margin-right: 10px;
}

.settings a {
  padding: 3px 9px;
  border: 1px solid #c9cfd7;
  border-radius: 6px;
  background: #fafbfc;
  color: #1b1f24;
  text-decoration: none;
}

.settings a:hover {
  background: #eef2f6;
}

/* The build switch: one segmented control, the active build filled. */
.settings .switch {
  display: inline-flex;
  margin-right: 14px;
  border: 1px solid #c9cfd7;
  border-radius: 6px;
  overflow: hidden;
}

.settings .switch a {
  border: 0;
  border-radius: 0;
  padding: 4px 11px;
  font-weight: 500;
}

.settings .switch a + a {
  border-left: 1px solid #c9cfd7;
}

.settings .switch a[aria-current='true'] {
  background: #1f3a5f;
  color: #ffffff;
}

.grid-host {
  flex: 1 1 auto;
  min-height: 0;
  position: relative;
}

/* The HUD floats over the grid, top right. */
.hud {
  position: fixed;
  top: 12px;
  right: 12px;
  width: var(--hud-width);
  z-index: 20;
  background: rgba(20, 24, 30, 0.9);
  color: #e7ecf2;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.28);
}

.hud-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-weight: 600;
}

.hud-actions button {
  font-size: 11px;
  padding: 3px 8px;
  margin-left: 6px;
  border: 1px solid #4a5361;
  border-radius: 5px;
  background: #2a3038;
  color: #e7ecf2;
  cursor: pointer;
}

.hud-actions button:hover {
  background: #3a424d;
}

.hud-text {
  margin: 0;
  white-space: pre;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11.5px;
  line-height: 1.45;
  max-height: 260px;
  overflow: auto;
}
