/* The admin in the game's «Плита» (design/): colours of the island, Rubik; raised — press, flush — shows, sunk — chosen. */
@font-face {
  font-family: Rubik;
  src: url(rubik.ttf) format('truetype');
  font-weight: 300 900;
  font-display: swap;
}

:root {
  --slab: #ddb277;
  --inlay: #efd5a8;
  --inlay-edge: #cda064;
  --field: #fbf0dc;
  --soil-deep: #836334;
  --ink: #3a2612;
  --soft: #7a5a33;
  --grass: #94ca61;
  --grass-face: #5e9a3c;
  --grass-ink: #1f3a12;
  --water: #2f8cad;
  --water-face: #1f6a86;
  --gold: #ffc83d;
  --gold-face: #c7861b;
  color-scheme: light;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--slab);
  color: var(--ink);
  font: 400 15px/1.45 Rubik, system-ui, sans-serif;
  font-variant-numeric: tabular-nums;
}

/* Which server: prod in gold, staging in water. Acting on prod should never be a surprise. */
#band {
  display: flex;
  gap: 10px;
  align-items: baseline;
  padding: 10px 16px;
  background: var(--water);
  color: #fff;
}
#band.prod { background: var(--gold); color: var(--ink); }
#band #env { font-weight: 800; font-size: 20px; }
#band #who { margin-left: auto; font-size: 13px; opacity: .85; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 6px;
  padding: 12px 16px 6px;
}
nav a {
  padding: 6px 11px;
  border-radius: 12px;
  background: var(--inlay);
  box-shadow: 0 3px 0 var(--inlay-edge);
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
}
nav a[aria-current='page'] {
  transform: translateY(3px);
  box-shadow: inset 0 2px 0 rgba(58, 38, 18, .18);
  background: var(--inlay-edge);
}

main {
  max-width: 880px;
  padding: 8px 16px 48px;
}

#status {
  position: sticky;
  top: 0;
  z-index: 1;
  margin: 8px 16px 0;
  max-width: 848px;
  padding: 10px 14px;
  border: 2px solid var(--inlay-edge);
  border-radius: 12px;
  background: var(--field);
  white-space: pre-wrap;
}
/* The server's own words say whether it worked; only our errors are marked. */
#status.error { background: var(--gold); border-color: var(--gold-face); }

h2 { margin: 18px 0 8px; font-size: 18px; font-weight: 700; }
h3 { margin: 14px 0 6px; font-size: 15px; font-weight: 700; }
.panel > h3:first-child { margin-top: 0; }

.panel {
  margin: 0 0 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--inlay);
}
.quiet, .panel .quiet { color: var(--soft); font-size: 13px; }
.big { font-size: 26px; font-weight: 800; letter-spacing: .02em; }
.pre { white-space: pre-wrap; overflow-wrap: anywhere; }
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.row + .row { margin-top: 8px; }
.grow { flex: 1 1 180px; min-width: 0; }

/* Maintenance: the one switch the players feel at once. */
.slab { background: var(--grass); color: var(--grass-ink); }
.slab.on { background: var(--gold); color: var(--ink); }
.slab .big { font-size: 22px; }

input[type='checkbox'] { accent-color: var(--water-face); width: 18px; height: 18px; padding: 0; }

input, select, textarea {
  font: inherit;
  color: var(--ink);
  padding: 7px 10px;
  border: 2px solid var(--inlay-edge);
  border-radius: 10px;
  background: var(--field);
}
input[type='number'] { width: 7em; }
textarea { width: 100%; min-height: 4.5em; resize: vertical; }

button {
  font: inherit;
  font-weight: 600;
  padding: 7px 14px;
  border: 0;
  border-radius: 12px;
  background: var(--water);
  box-shadow: 0 3px 0 var(--water-face);
  color: #fff;
  cursor: pointer;
}
button:active { transform: translateY(3px); box-shadow: none; }
button:disabled { opacity: .5; cursor: progress; }
button.money { background: var(--gold); box-shadow: 0 3px 0 var(--gold-face); color: var(--ink); }
button.good { background: var(--grass-face); box-shadow: 0 3px 0 var(--grass-ink); }
button.small { padding: 3px 10px; font-size: 13px; }

:focus-visible { outline: 3px solid var(--water-face); outline-offset: 2px; }

.scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 13px; }
th { text-align: left; font-weight: 600; color: var(--soft); }
th, td { padding: 4px 8px 4px 0; vertical-align: top; }
td { white-space: nowrap; }
td.wrap { white-space: normal; min-width: 10em; overflow-wrap: anywhere; }

.item { padding: 6px 0; }
.item + .item { border-top: 1px solid var(--inlay-edge); }
tr + tr td { border-top: 1px solid var(--inlay-edge); }
td.num { text-align: right; }
.minus { color: #9b3412; }
.warn { color: #9b3412; font-weight: 600; }

blockquote {
  margin: 8px 0;
  padding: 8px 12px;
  border-left: 4px solid var(--inlay-edge);
  background: var(--field);
  border-radius: 0 10px 10px 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
pre { margin: 6px 0; font-size: 12px; white-space: pre-wrap; overflow-wrap: anywhere; }
a { color: var(--water-face); }

@media (prefers-reduced-motion: reduce) {
  nav a[aria-current='page'], button:active { transform: none; }
}
