/* Multi Machine fleet theme — framework-free, drop-in.

   Light, with a pixel-art edge borrowed from the logo: square corners, hard
   two-pixel outlines, and flat offset shadows with no blur, so every edge
   lands on a whole pixel. Colours are sampled straight out of logo.png —
   the red body, the steel blades, the near-black outline. The page
   background is an isometric striped floor built from --bg, echoing the
   isometric logo.

   Sizing is deliberately unchanged from the first theme: same type scale,
   same paddings, same 720px column. Only the palette and the edges moved. */
:root {
  --bg: #e7ecef;
  --surface: #ffffff;
  --panel: #f2f8fb;        /* logo highlight */
  --border: #08150f;       /* logo outline */
  --rule: #b9c4cc;         /* light divider, where a full outline is too loud */
  --text: #08150f;
  --muted: #4d5a66;        /* logo steel, shadowed */
  --steel: #93a2ae;        /* logo steel */
  --accent: #bf322a;       /* logo red */
  --accent-hover: #e0554a; /* logo red, lit */
  --accent-deep: #6e1a17;  /* logo red, shadowed */
  --link: #1a4f8a;
  --link-hover: #2b6cb0;
  --danger: #a8201a;
  --radius: 0;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font);
  /* Isometric floor stripes, in --bg and one step darker. make_floor.py
     draws them as real pixel stairs: a repeating-linear-gradient at this
     angle antialiases its diagonals into grey fringes, which is the one
     thing pixel art doesn't do. `pixelated` matters on high-DPI screens,
     where the browser would otherwise smooth the tile back out. */
  background-color: var(--bg);
  background-image: url("/theme/floor.png");
  image-rendering: pixelated;
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 0.9rem 1.5rem;
  background: var(--surface);
  border-bottom: 2px solid var(--border);
}

/* No width/height here on purpose. The logo's size comes from the file
   itself, via the width/height attributes theme.page() reads out of the
   PNG, so replacing the artwork can never leave a stale size behind here
   -- which stretches it off its aspect ratio and shreds the pixel grid.
   Anything but 1x, or an integer multiple of it, drops or smears rows. */
.logo {
  image-rendering: pixelated;
  display: block;
  flex: none;
}

.wordmark {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-decoration: none;
  color: var(--text);
}
.wordmark:hover { color: var(--accent); }

.site-header nav a { margin-left: 1rem; }

.container {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  flex: 1;
}

.site-footer {
  padding: 1.2rem 1.5rem;
  background: var(--surface);
  border-top: 2px solid var(--border);
  color: var(--muted);
  font-size: 0.85rem;
}

a { color: var(--link); text-decoration: none; }
a:hover { color: var(--link-hover); text-decoration: underline; }

h1 { font-size: 1.6rem; margin-top: 0; }
.muted { color: var(--muted); }

.card {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 4px 4px 0 var(--steel);
  padding: 1.5rem;
  margin-bottom: 1.25rem;
}

/* Cards that are whole links lift on hover and press in on click. */
a.card { color: inherit; }
a.card:hover {
  text-decoration: none;
  border-color: var(--accent);
  box-shadow: 4px 4px 0 var(--accent);
}
a.card:hover h2 { color: var(--accent); }
a.card:active { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--accent); }

.btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 3px 3px 0 var(--accent-deep);
  padding: 0.6rem 1.2rem;
  font-size: 1rem;
  font-weight: 600;
  font-family: var(--font);
  text-decoration: none;
  cursor: pointer;
}
.btn:hover { background: var(--accent-hover); color: #fff; text-decoration: none; }
.btn:active { transform: translate(3px, 3px); box-shadow: none; }
.btn:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }
.btn.secondary {
  background: var(--surface);
  color: var(--text);
  box-shadow: 3px 3px 0 var(--steel);
}
.btn.secondary:hover { background: var(--panel); color: var(--text); }

input[type="text"], input[type="email"], textarea {
  width: 100%;
  background: var(--surface);
  color: var(--text);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 0.6rem 0.8rem;
  font-size: 1rem;
  font-family: var(--font);
  margin: 0.5rem 0 1rem;
}
input[type="text"]:focus, input[type="email"]:focus, textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

textarea { min-height: 8rem; resize: vertical; }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 0.5rem 0.75rem; border-bottom: 1px solid var(--rule); }
th {
  background: var(--panel);
  color: var(--muted);
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 2px solid var(--border);
}

.quota-note { font-size: 0.9rem; color: var(--muted); }
.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1rem; }

input[type="file"] {
  width: 100%;
  background: var(--panel);
  color: var(--text);
  border: 2px dashed var(--steel);
  border-radius: var(--radius);
  padding: 0.9rem;
  margin: 0.5rem 0 1rem;
  font-family: var(--font);
}
input[type="file"]:hover { border-color: var(--accent); }
input[type="file"]::file-selector-button {
  background: var(--surface);
  color: var(--text);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 2px 2px 0 var(--steel);
  padding: 0.35rem 0.9rem;
  margin-right: 0.8rem;
  font-family: var(--font);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
}
input[type="file"]::file-selector-button:active { transform: translate(2px, 2px); box-shadow: none; }

fieldset.options {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 0.9rem 1rem;
  margin: 0 0 1.1rem;
}
fieldset.options legend {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0 0.4rem;
}
fieldset.options label {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  font-size: 0.92rem;
  padding: 0.22rem 0;
}
fieldset.options input[type="checkbox"] { accent-color: var(--accent); }

code {
  background: var(--panel);
  border: 1px solid var(--steel);
  border-radius: var(--radius);
  padding: 0.05rem 0.35rem;
  font-size: 0.88em;
}

.field-label { display: block; font-size: 0.92rem; font-weight: 600; margin-bottom: 0.1rem; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }

ul.report { padding-left: 1.1rem; margin: 0 0 1.2rem; }
ul.report li { margin: 0.35rem 0; font-size: 0.94rem; }

/* Wide tables scroll inside their card instead of stretching the page. */
.table-scroll { overflow-x: auto; margin-bottom: 0.75rem; border: 2px solid var(--border); }
.table-scroll table { min-width: max-content; font-size: 0.9rem; }
.table-scroll td { white-space: nowrap; }
.table-scroll th { position: sticky; top: 0; }

@media (max-width: 520px) {
  .site-header { padding: 0.9rem 1rem; }
  .container { padding: 1.5rem 1rem; }
}
