/* vertio.ch — Solace house style: dark, 0px corners, 1px rules, clay on edges
   only, sodium for machine-reported numbers. No framework, no build step. */

:root {
  --ground-deep: #131514;
  --ground: #181a19;
  --panel: #1e211f;
  --raise: #262a27;
  --rule: #2f3431;
  --line-soft: #282c29;
  --text: #b4b8b0;
  --muted: #8e948c;
  --decorative: #646a63;
  --clay: #a57258;
  --clay-deep: #7c5342;
  --sodium: #a3a87f;
  --alert: #b4503a;
  --sans: "IBM Plex Sans", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --chrome: "IBM Plex Sans Condensed", "IBM Plex Sans", system-ui, sans-serif;
  --mono: "IBM Plex Mono", "DejaVu Sans Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }

html { background: var(--ground-deep); }

body {
  margin: 0 auto;
  padding: 0 1rem 4rem;
  max-width: 68rem;
  background: var(--ground-deep);
  color: var(--text);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
}

a { color: var(--text); text-decoration: none; border-bottom: 1px solid var(--line-soft); }
a:hover { background: var(--raise); }
a:focus-visible { outline: none; border-bottom: 1px solid var(--clay); }

/* ---- masthead ------------------------------------------------------- */

.masthead {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: baseline;
  gap: 0 1rem;
  padding: 1.5rem 0 1rem;
  border-bottom: 1px solid var(--rule);
}

.brand {
  grid-row: 1;
  font-family: var(--chrome);
  font-size: 1.5rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text);
  border: 0;
}
.brand:hover { background: none; color: var(--clay); }

.tagline { grid-row: 1; margin: 0; color: var(--muted); font-size: 0.875rem; }

.languages { grid-column: 1; grid-row: 2; display: flex; gap: 0.75rem; margin-top: 0.75rem; }

/* The two things a visitor comes to do, kept beside the brand rather than in the footer. */
.actions { grid-column: 2; grid-row: 2; display: flex; flex-wrap: wrap; gap: 0.5rem; justify-self: end; margin-top: 0.75rem; }

.action {
  font-family: var(--chrome);
  font-size: 0.8125rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text);
  border: 1px solid var(--rule);
  padding: 0.35rem 0.9rem;
}
.action:hover { background: var(--raise); }
.action.is-primary { border-color: var(--clay); color: var(--clay); }
.action.is-primary:hover { background: var(--raise); color: var(--clay); }

.choice {
  font-family: var(--chrome);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  border: 0;
  padding: 0.15rem 0;
  border-bottom: 1px solid transparent;
}
.choice:hover { background: var(--raise); }
.choice.is-selected { color: var(--text); border-bottom: 1px solid var(--clay); }

/* ---- breadcrumbs and headings --------------------------------------- */

.crumbs { display: flex; flex-wrap: wrap; gap: 0.5rem; padding: 0.75rem 0; font-size: 0.8125rem; color: var(--muted); }
.crumbs a { color: var(--muted); border: 0; }
.crumbs a + a::before { content: "/"; color: var(--decorative); margin-right: 0.5rem; }
.crumbs a:hover { color: var(--text); background: none; }

h1 {
  margin: 0.5rem 0 0.25rem;
  font-family: var(--chrome);
  font-size: 1.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

h2 {
  margin: 2rem 0 0.5rem;
  font-family: var(--chrome);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.count { margin: 0 0 1rem; font-family: var(--mono); font-size: 0.8125rem; color: var(--sodium); }

.boards { display: flex; gap: 1rem; padding: 0.5rem 0 1rem; border-bottom: 1px solid var(--rule); }

/* ---- the board ------------------------------------------------------ */

table.board { width: 100%; border-collapse: collapse; }

table.board th {
  padding: 0.6rem 0.5rem;
  text-align: left;
  font-family: var(--chrome);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--rule);
}

table.board td { padding: 0.6rem 0.5rem; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
table.board tr:hover td { background: var(--panel); }

td.rank, th.rank { width: 3.5rem; font-family: var(--mono); color: var(--muted); text-align: right; }
td.mark, th.mark { width: 2.5rem; }
td.amount, th.amount { text-align: right; white-space: nowrap; }
td.amount { font-family: var(--mono); color: var(--sodium); }
td.place, td.category { color: var(--muted); font-size: 0.8125rem; white-space: nowrap; }
td.place a, td.category a { color: var(--muted); border: 0; }
td.place a:hover, td.category a:hover { color: var(--text); }

.icon { display: block; width: 32px; height: 32px; }
.icon.none { border: 1px solid var(--line-soft); background: var(--panel); }

.headline { font-weight: 600; border: 0; }
.headline:hover { color: var(--clay); background: none; }
.description { margin: 0.15rem 0 0; color: var(--muted); font-size: 0.8125rem; }

.empty { padding: 2rem 0; color: var(--muted); }

/* ---- pager ---------------------------------------------------------- */

.pager { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; padding: 1rem 0; border-bottom: 1px solid var(--rule); }
.page-line { font-family: var(--mono); font-size: 0.8125rem; color: var(--muted); margin-right: 0.25rem; }

/* ---- containment clusters ------------------------------------------- */

.cluster nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  font-size: 0.8125rem;
}
.cluster nav a { color: var(--muted); border: 0; }
.cluster nav a:hover { color: var(--text); }

/* ---- notices and the row's raise form ------------------------------- */

ul.notice {
  max-width: 42rem;
  margin: 1rem 0 0;
  padding: 0.6rem 0.75rem 0.6rem 1.6rem;
  border-left: 2px solid var(--clay);
  background: var(--panel);
  font-size: 0.875rem;
  color: var(--clay);
}
ul.notice li { margin: 0.15rem 0; }

th.bump, td.bump { text-align: right; white-space: nowrap; }
form.raise { display: flex; gap: 0.25rem; justify-content: flex-end; }
form.raise input {
  width: 4.5rem;
  padding: 0.2rem 0.3rem;
  font-size: 0.8125rem;
  text-align: right;
}
form.raise button {
  padding: 0.2rem 0.5rem;
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
}

/* ---- legal, forms --------------------------------------------------- */

main p { max-width: 42rem; }
.reference { font-size: 0.8125rem; }
.hint { color: var(--muted); font-size: 0.8125rem; }

/* The live amount check. Empty until the script speaks, so it takes no room. */
.amount-hint {
  margin: -0.75rem 0 0.75rem;
  font-family: var(--mono);
  font-size: 0.8125rem;
  color: var(--muted);
  border-left: 1px solid transparent;
  padding-left: 0.5rem;
}
.amount-hint:empty { display: none; }
.amount-hint[data-status="legal"] { color: var(--sodium); border-left-color: var(--sodium); }
.amount-hint[data-status="snapped"],
.amount-hint[data-status="taken"] { color: var(--clay); border-left-color: var(--clay-deep); }
.amount-hint[data-status="below-minimum"],
.amount-hint[data-status="invalid"] { color: var(--alert); border-left-color: var(--alert); }
.raise .amount-hint { margin: 0.25rem 0 0; padding-left: 0.35rem; font-size: 0.75rem; }
button:disabled { color: var(--decorative); border-color: var(--line-soft); cursor: not-allowed; }

form.bid { max-width: 34rem; margin-top: 1.5rem; }
.field { margin: 0 0 1rem; }
.field .label {
  display: block;
  font-family: var(--chrome);
  font-size: 0.6875rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.25rem;
}
input, select, button {
  font-family: var(--sans);
  font-size: 0.9375rem;
  color: var(--text);
  background: var(--panel);
  border: 1px solid var(--rule);
  border-radius: 0;
  padding: 0.45rem 0.5rem;
  width: 100%;
}
input:focus, select:focus, button:focus { outline: none; border-color: var(--clay); }
.field.check label { display: flex; gap: 0.6rem; align-items: flex-start; font-size: 0.875rem; color: var(--muted); }
.field.check input { width: auto; }
button {
  width: auto;
  font-family: var(--chrome);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.8125rem;
  padding: 0.5rem 1.25rem;
  cursor: pointer;
}
button:hover { background: var(--raise); }

/* ---- footer --------------------------------------------------------- */

.foot { margin-top: 3rem; padding-top: 1rem; border-top: 1px solid var(--rule); color: var(--muted); font-size: 0.8125rem; }
.foot nav { display: flex; flex-wrap: wrap; gap: 1rem; }
.foot a { color: var(--muted); border: 0; }
.foot a:hover { color: var(--text); }

/* ---- phones --------------------------------------------------------- */

@media (max-width: 40rem) {
  body { font-size: 14px; padding: 0 0.75rem 3rem; }
  .masthead { grid-template-columns: 1fr; }
  .tagline { grid-row: 2; }
  .actions { grid-column: 1; grid-row: 3; justify-self: start; }
  .languages { grid-row: 4; }
  h1 { font-size: 1.375rem; }

  table.board, table.board tbody, table.board tr, table.board td { display: block; width: 100%; }
  table.board thead { display: none; }
  table.board tr {
    position: relative;
    display: grid;
    grid-template-columns: 2.25rem 2.5rem 1fr auto;
    grid-template-areas: "rank mark listing amount" ". . place place" ". . category category" ". . bump bump";
    border-bottom: 1px solid var(--line-soft);
    padding: 0.5rem 0;
  }
  table.board td { border: 0; padding: 0.1rem 0.35rem; }
  td.rank { grid-area: rank; }
  td.mark { grid-area: mark; }
  td.listing { grid-area: listing; }
  td.amount { grid-area: amount; }
  td.place { grid-area: place; }
  td.category { grid-area: category; }
  td.bump { grid-area: bump; text-align: left; }
  form.raise { justify-content: flex-start; }
}
