/* The look: bold and plain. A near-black page, dark cards, heavy system sans-serif headings and
   big numbers, and one accent: the money green of the banker logo. No serif fonts, no gold, no
   ornaments. Text is at WCAG AA or better: #f5f5f4 on #0b0c0b is 18:1, the muted grey 8:1, the
   green 9:1. */

:root {
  /* brand */
  --ink: #0b0c0b;
  --green: #3ccf6e;
  --green-deep: #1f7a43;

  /* type */
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;

  --bg: #0b0c0b;
  --panel: #151716;
  --panel-2: #1e211f;
  --line: rgba(255, 255, 255, 0.09);
  --text: #f5f5f4;
  --muted: #a9aeab;
  --link: #5fe08b;
  --accent-text: #5fe08b;
  --ok: #5fe08b;
  --bad: #ff8a7a;
  --warn: #f5c451;
  --on-accent: #06210f;
  --focus: #5fe08b;
  --radius: 14px;
}

* { box-sizing: border-box; }

html { background: var(--bg); color: var(--text); }
body {
  min-height: 100vh; margin: 0; color: var(--text); background: var(--bg);
  font: 16px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: var(--green); color: var(--on-accent); }

a { color: var(--link); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }

main { max-width: 920px; margin: 0 auto; padding: 16px 16px 64px; }

/* ---------------------------------------------------------------- frame */

#siteHeader { position: sticky; top: 0; z-index: 8; background: rgba(11, 12, 11, 0.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.top {
  max-width: 920px; margin: 0 auto; padding: 8px 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 0 16px; flex-wrap: wrap;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px; min-height: 44px;
  font-weight: 900; font-size: 1.2rem; letter-spacing: -0.01em;
  color: var(--text); text-decoration: none; overflow-wrap: anywhere;
}
.brand::before {
  content: ""; flex: 0 0 34px; width: 34px; height: 34px; border-radius: 50%;
  background: var(--green-deep) url("logo-128.png") center / cover no-repeat;
}
.brand:hover { text-decoration: none; color: var(--accent-text); }
.nav { display: flex; flex-wrap: wrap; gap: 0 4px; margin-left: -8px; }
.nav a {
  display: inline-flex; align-items: center; min-height: 40px; padding: 0 10px; white-space: nowrap;
  font-weight: 600; font-size: 0.92rem; color: var(--muted); text-decoration: none; border-radius: 8px;
}
.nav a:hover { color: var(--text); background: var(--panel-2); }
@media (max-width: 560px) {
  .nav { flex-wrap: nowrap; overflow-x: auto; width: calc(100% + 16px); margin-right: -16px; scrollbar-width: none; }
  .nav::-webkit-scrollbar { display: none; }
}
.nav a.active { color: var(--text); background: var(--panel-2); }

#siteFooter {
  max-width: 920px; margin: 0 auto; padding: 24px 16px 48px; color: var(--muted); font-size: 0.85rem;
  border-top: 1px solid var(--line); word-break: break-word;
}
#siteFooter > div { margin-top: 6px; }
#siteFooter .legal { margin-top: 12px; }

header.page h1, .hero h1 { font-weight: 900; color: var(--text); line-height: 1.05; letter-spacing: -0.03em; overflow-wrap: anywhere; }
header.page h1 { font-size: clamp(2rem, 7vw, 2.8rem); margin: 22px 0 0; }
header.page .lead { font-size: 1.15rem; line-height: 1.45; color: var(--muted); margin: 10px 0 24px; max-width: 40em; }

.hero { margin: 28px 0 28px; }
.hero h1 { font-size: clamp(2.8rem, 13vw, 5rem); margin: 0; }
.hero .tagline { margin: 10px 0 0; }
.tagline { font-weight: 700; font-size: clamp(1.15rem, 4.4vw, 1.5rem); line-height: 1.3; color: var(--muted); margin: 8px 0 24px; max-width: 30em; }

/* ---------------------------------------------------------------- cards */

.card, .pot, .stat, .next { position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.card { padding: 22px; }
.card + .card, #result { margin-top: 14px; }

/* ---------------------------------------------------------------- pots and the clock */

.pots { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 560px) { .pots { grid-template-columns: 1fr; } }

.pot { padding: 22px; }
.pot.big {
  border-color: rgba(60, 207, 110, 0.55);
  background: linear-gradient(160deg, rgba(60, 207, 110, 0.16) 0%, rgba(60, 207, 110, 0.03) 55%), var(--panel);
}
.pot .label { font-weight: 800; color: var(--muted); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; }
.pot.big .label { color: var(--accent-text); }
.pot .amount { font-weight: 900; font-size: clamp(2.2rem, 9vw, 2.9rem); letter-spacing: -0.03em; margin: 6px 0 0; word-break: break-word; line-height: 1.1; font-variant-numeric: tabular-nums; }
.pot .usd { color: var(--text); font-weight: 700; font-size: 1.1rem; }
.pot .when { margin-top: 12px; font-size: 0.92rem; color: var(--muted); }

.next { margin-top: 14px; padding: 22px; display: flex; justify-content: space-between; align-items: center; gap: 12px 24px; flex-wrap: wrap; }
.next > div { min-width: 0; }
.next .countdown { font-size: clamp(2.2rem, 10vw, 3rem); font-weight: 900; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; margin: 6px 0 2px; line-height: 1.1; }
.next .state { color: var(--muted); font-weight: 600; }
.next .state.closed { color: var(--warn); font-weight: 700; }
.next .stats-col { flex: 1 1 220px; }

/* ---------------------------------------------------------------- sections */

section { margin-top: 40px; }
section h2 { font-weight: 900; font-size: clamp(1.4rem, 5.4vw, 1.75rem); letter-spacing: -0.02em; line-height: 1.15; margin: 0 0 14px; overflow-wrap: anywhere; }
section h3 { font-weight: 800; font-size: 1.1rem; margin: 20px 0 8px; color: var(--text); overflow-wrap: anywhere; }
section h3:first-child { margin-top: 0; }
.section-head { display: flex; justify-content: space-between; align-items: center; gap: 4px 12px; flex-wrap: wrap; margin-bottom: 14px; }
.section-head h2 { margin: 0; }
.section-head a { display: inline-flex; align-items: center; min-height: 40px; font-weight: 700; }

.card p:first-child { margin-top: 0; }
.card p:last-child { margin-bottom: 0; }
.card ul, .card ol { padding-left: 20px; margin: 8px 0; }
.card li { margin: 8px 0; }
.card li::marker { color: var(--green); }
.row { display: flex; justify-content: space-between; gap: 4px 12px; padding: 10px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.row:last-child { border-bottom: 0; }
.row .k { color: var(--muted); }
.row .v { font-variant-numeric: tabular-nums; text-align: right; word-break: break-all; font-weight: 700; }
/* Sentences in a row (the visitor's status, the Settings block) wrap at words, not mid-word. */
#myStatus, #settingsBlock .row .v { word-break: normal; overflow-wrap: anywhere; }
#myStatus { flex: 1 1 14rem; }
#settingsBlock #setPending { flex: 1 1 100%; text-align: left; }

.callout { border-left: 4px solid var(--green); padding: 12px 16px; background: var(--panel-2); border-radius: 0 10px 10px 0; margin: 12px 0; }
.callout.warn { border-left-color: var(--warn); }
.callout.bad { border-left-color: var(--bad); }

/* numbered steps: a solid green disc with a heavy numeral */
.steps { list-style: none; counter-reset: step; padding: 0; margin: 0; display: grid; gap: 18px; }
.steps li { counter-increment: step; display: flex; gap: 14px; align-items: flex-start; margin: 0; }
.steps li::before {
  content: counter(step); flex: 0 0 34px; height: 34px; border-radius: 50%; background: var(--green);
  color: var(--on-accent); font-weight: 900; font-size: 1rem;
  display: inline-flex; align-items: center; justify-content: center;
}
.steps li > div { min-width: 0; color: var(--muted); }
.steps strong { display: block; color: var(--text); font-size: 1.08rem; font-weight: 800; margin-bottom: 2px; }
.card .steps { padding: 0; }
.steps li > div span strong { display: inline; font-size: inherit; margin: 0; }

/* stat tiles */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.stat { padding: 16px; min-width: 0; }
.stat .label { color: var(--muted); font-weight: 800; font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.08em; }
.stat .value { font-size: 1.45rem; font-weight: 900; margin-top: 4px; font-variant-numeric: tabular-nums; word-break: break-word; letter-spacing: -0.01em; }
.stat .sub { color: var(--muted); font-size: 0.85rem; }

/* contract list */
.contracts .row .k { flex: 0 0 auto; }
.contracts .row .v { text-align: left; flex: 1 1 auto; font-weight: 400; }

/* ---------------------------------------------------------------- controls */

button, .button {
  font: inherit; font-weight: 800; font-size: 0.98rem; line-height: 1.2;
  color: var(--on-accent); background: var(--green);
  border: 1px solid var(--green); border-radius: 10px; padding: 11px 20px; min-height: 46px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; text-align: center; text-decoration: none;
}
.button:hover, .button:hover:where(a) { text-decoration: none; }
button:hover:not(:disabled), .button:hover { background: #55dc84; border-color: #55dc84; }
button.secondary, .button.secondary { background: transparent; color: var(--text); border: 1px solid rgba(255, 255, 255, 0.22); }
button.secondary:hover:not(:disabled), .button.secondary:hover { background: var(--panel-2); border-color: rgba(255, 255, 255, 0.35); }
/* The small buttons carry data (page numbers, "Show entries"): case and digits stay as written. */
button.small { font-weight: 700; font-size: 0.9rem; padding: 6px 14px; min-height: 40px; }
button:disabled { opacity: 0.45; cursor: not-allowed; }
.actions { display: flex; gap: 10px 12px; flex-wrap: wrap; margin-top: 14px; align-items: center; }
.actions a { display: inline-flex; align-items: center; min-height: 40px; }
/* a link that closes a card on its own line ("More on safety") is a 40px target too */
.card p:last-child > a:only-child:not(.button) { display: inline-flex; align-items: center; min-height: 40px; font-weight: 700; }

select, input[type="text"] {
  font: inherit; color: var(--text); background: var(--panel-2); border: 1px solid rgba(255, 255, 255, 0.2); border-radius: 10px;
  padding: 9px 12px; min-height: 44px; max-width: 100%;
}
label.field { display: block; color: var(--muted); font-size: 0.9rem; margin-bottom: 4px; }

.pager { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 14px; }
.pager .count { color: var(--muted); font-size: 0.9rem; margin-left: auto; }
.pager button { min-width: 40px; }
.pager button.current { background: var(--green); color: var(--on-accent); border-color: var(--green); }

.note { color: var(--muted); font-size: 0.9rem; margin-top: 10px; }
.ok { color: var(--ok); }
.bad { color: var(--bad); }
.warn { color: var(--warn); }
.mono { font-family: var(--mono); font-size: 0.9em; overflow-wrap: anywhere; }
.break { word-break: break-all; }
pre, code { font-family: var(--mono); }
code { background: var(--panel-2); border: 1px solid var(--line); border-radius: 6px; padding: 1px 5px; font-size: 0.88em; }
pre {
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; padding: 12px; margin: 8px 0;
  font-size: 0.85rem; white-space: pre-wrap; word-break: break-all; overflow-x: auto;
}
pre code { background: none; border: 0; padding: 0; font-size: inherit; }
code { overflow-wrap: anywhere; }
.formula { display: block; margin: 6px 0; white-space: pre-wrap; }

/* ---------------------------------------------------------------- tables */

.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.card.table-wrap { padding: 18px 16px; }
table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
th, td { text-align: left; padding: 10px 8px 10px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 800; font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; white-space: nowrap; }
td.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.table-wrap td:first-child { min-width: 10.5rem; }
td .note { margin-top: 0; }
tr:last-child td { border-bottom: 0; }
.tag {
  display: inline-block; padding: 2px 9px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.25); color: var(--text);
  font-weight: 800; font-size: 0.7rem; letter-spacing: 0.06em; text-transform: uppercase; white-space: nowrap;
}
.tag.big { background: var(--green); border-color: var(--green); color: var(--on-accent); }
.tag.ok { border-color: var(--green); color: var(--ok); }
.tag.bad { border-color: var(--bad); color: var(--bad); }

/* ---------------------------------------------------------------- FAQ */

.toc { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 4px; }
.toc a {
  display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border: 1px solid rgba(255, 255, 255, 0.18); border-radius: 999px;
  color: var(--text); font-weight: 700; font-size: 0.88rem; text-decoration: none;
}
.toc a:hover { background: var(--panel-2); text-decoration: none; }

details { border-top: 1px solid var(--line); padding: 0; }
details:first-of-type { border-top: 0; }
details[open] { padding-bottom: 12px; }
summary { cursor: pointer; font-weight: 800; font-size: 1.02rem; padding: 12px 0; min-height: 44px; }
summary::marker { color: var(--green); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
details p, details ul { color: var(--text); margin: 8px 0; }
details ul { padding-left: 20px; }

/* ---------------------------------------------------------------- the verifier */

.verdict {
  background: var(--panel); border: 1px solid var(--line); border-left: 6px solid var(--muted); border-radius: 10px;
  padding: 14px 16px; margin: 14px 0; font-weight: 700; color: var(--text);
}
.verdict.ok { border-left-color: var(--green); }
.verdict.warn { border-left-color: var(--warn); }
.verdict.bad { border-left-color: var(--bad); }
.verdict.pending { color: var(--muted); }
.verdict ul { font-weight: 400; color: var(--text); margin: 8px 0 0; padding-left: 20px; }
.picks { list-style: none; padding: 0; margin: 0; }
.picks li { padding: 9px 0; border-bottom: 1px solid var(--line); word-break: break-word; }
.picks li:last-child { border-bottom: 0; }
.picks .reason { color: var(--muted); font-size: 0.9rem; }
.picks .winner { color: var(--ok); font-weight: 700; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; align-items: baseline; }
.kv .k { color: var(--muted); }
.kv .v { min-width: 0; word-break: break-all; }
@media (max-width: 560px) { .kv { grid-template-columns: 1fr; gap: 2px; } .kv .v { margin-bottom: 8px; } }

.toast {
  position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); background: var(--panel-2);
  border: 1px solid var(--line); color: var(--text); padding: 12px 16px; border-radius: 10px;
  max-width: 92vw; display: none; z-index: 10; box-shadow: 0 6px 24px rgba(0, 0, 0, 0.5);
}
.toast.show { display: block; }

footer { color: var(--muted); font-size: 0.85rem; }
[hidden] { display: none !important; }

/* Long addresses and hashes in the verify page wrap instead of widening it. */
.verdict, .reason, .picks li { overflow-wrap: anywhere; }

/* ---------------------------------------------------------------- motion */

@media (prefers-reduced-motion: no-preference) {
  a, button, .nav a, .toc a { transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease; }
}
