
:root {
  --paper: #f3ead7;
  --ink: #16120c;
  --muted: #5c5346;
  --rule: #c9b89a;
  --red: #c1121f;
  --red-d: #8b0d16;
  --cream: #fff8ea;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { background: var(--paper); color: var(--ink); min-height: 100vh; }
body { font-family: Georgia, "Times New Roman", serif; line-height: 1.45; }
a { color: inherit; text-decoration: none; }
.mast { border-bottom: 3px solid var(--ink); padding: 14px 0 10px; }
.mast-top {
  display: flex; justify-content: space-between; align-items: baseline; gap: 8px; flex-wrap: wrap;
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted);
}
.wordmark {
  font-family: Georgia, "Times New Roman", serif; font-style: italic;
  font-size: clamp(40px, 8vw, 68px); line-height: 0.9; text-align: center;
  padding: 8px 0 4px; font-weight: 700;
}
.tagline {
  text-align: center;
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase;
  border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink);
  padding: 6px 0; margin-top: 4px;
}
nav.ed {
  display: flex; flex-wrap: wrap; justify-content: center;
  font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12px;
  border-bottom: 1px solid var(--rule);
}
nav.ed a { padding: 10px 12px; }
nav.ed a.on, nav.ed a:hover { text-decoration: underline; text-underline-offset: 4px; }
.sheet { max-width: 880px; margin: 0 auto; padding: 0 18px 72px; }
.kicker {
  font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 11px;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--red);
  margin: 28px 0 8px;
}
h1.hed { font-size: clamp(28px, 5vw, 44px); font-weight: 700; letter-spacing: -0.03em; line-height: 1.05; }
.deck { margin: 10px 0 22px; color: var(--muted); max-width: 58ch; font-size: 18px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--ink); margin: 18px 0 28px; }
.stat { padding: 12px 14px; border-right: 1px solid var(--ink); }
.stat:last-child { border-right: 0; }
.stat b { display: block; font-size: 22px; font-variant-numeric: tabular-nums; }
.stat span {
  font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 10px;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted);
}
@media (max-width: 640px) {
  .stats { grid-template-columns: 1fr; }
  .stat { border-right: 0; border-bottom: 1px solid var(--ink); }
}
.claim { background: var(--cream); border: 1px solid var(--ink); padding: 16px; margin-bottom: 28px; }
.claim h2 {
  font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 11px;
  letter-spacing: 0.14em; text-transform: uppercase; margin-bottom: 12px;
}
.grid3 { display: grid; grid-template-columns: 1fr 150px 210px; gap: 8px; }
@media (max-width: 700px) { .grid3 { grid-template-columns: 1fr; } }
input, select, textarea, button {
  font: 15px/1.3 ui-monospace, Menlo, Consolas, monospace;
  border: 1px solid var(--ink); background: #fff; color: var(--ink);
  padding: 10px; border-radius: 0;
}
textarea { width: 100%; min-height: 120px; font-family: Georgia, serif; }
.amt { display: flex; }
.amt button { width: 40px; cursor: pointer; background: var(--paper); }
.amt input { flex: 1; min-width: 0; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; align-items: center; }
button.go { background: var(--red); color: #fff; border-color: var(--red-d); font-weight: 600; cursor: pointer; }
button.quiet { background: transparent; cursor: pointer; }
.fine { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 11px; color: var(--muted); margin-top: 8px; }
.filters { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; }
.filters button {
  background: transparent; cursor: pointer; font-size: 11px;
  letter-spacing: 0.06em; text-transform: uppercase; padding: 6px 8px;
}
.filters button.on { background: var(--ink); color: var(--paper); }
table.board { width: 100%; border-collapse: collapse; font-size: 16px; }
table.board th {
  font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 10px;
  letter-spacing: 0.12em; text-transform: uppercase; text-align: left;
  border-bottom: 2px solid var(--ink); padding: 8px 6px;
}
table.board td { padding: 12px 6px; border-bottom: 1px solid var(--rule); vertical-align: top; }
table.board tr.one td { background: #f7d7d4; }
.r { font-family: ui-monospace, Menlo, Consolas, monospace; font-weight: 600; color: var(--red); width: 48px; }
.name { font-weight: 700; }
.sub { display: block; font-size: 13px; color: var(--muted); font-family: ui-monospace, Menlo, Consolas, monospace; }
.money { font-variant-numeric: tabular-nums; font-weight: 700; white-space: nowrap; }
.take { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 11px; text-decoration: underline; cursor: pointer; color: var(--red); }
.prose { max-width: 62ch; }
.prose h1 { font-size: 34px; margin: 28px 0 12px; }
.prose h2 { font-size: 22px; margin: 22px 0 8px; }
.prose p, .prose li { margin-bottom: 10px; font-size: 17px; }
.prose ul { padding-left: 20px; }
.prose a { color: var(--red); text-decoration: underline; }
.act { font-size: 15px; padding: 8px 0; border-bottom: 1px dotted var(--rule); }
footer.col {
  margin-top: 48px; padding-top: 14px; border-top: 3px solid var(--ink);
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 11px; color: var(--muted);
}
.toast {
  position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%);
  background: var(--ink); color: var(--paper); padding: 10px 14px;
  font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12px; display: none; z-index: 9;
}

.who { display: flex; gap: 10px; align-items: flex-start; }
.avatar {
  width: 44px; height: 44px; object-fit: cover; flex: none;
  border: 1px solid var(--ink); background: #ddd;
}
.avatar.lg { width: 64px; height: 64px; }

html { -webkit-text-size-adjust: 100%; }
.sheet { padding-left: 14px; padding-right: 14px; }
button.go, button.quiet, .take, nav.ed a { min-height: 44px; display: inline-flex; align-items: center; }
input, select, button { font-size: 16px; } /* prevent iOS zoom */
nav.ed {
  justify-content: flex-start;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  flex-wrap: nowrap;
  scrollbar-width: none;
}
nav.ed::-webkit-scrollbar { display: none; }
nav.ed a { white-space: nowrap; padding: 12px 14px; }

@media (max-width: 760px) {
  .wordmark { font-size: 42px; padding: 10px 0 6px; }
  .tagline { letter-spacing: 0.08em; font-size: 10px; padding: 8px 4px; }
  h1.hed { font-size: 28px; }
  .deck { font-size: 16px; }
  .mast-top { justify-content: center; text-align: center; }
  .claim { padding: 14px; }
  .grid3 { grid-template-columns: 1fr; }
  .amt { width: 100%; }
  .actions { flex-direction: column; align-items: stretch; }
  .actions button { width: 100%; justify-content: center; }
  .filters { overflow-x: auto; flex-wrap: nowrap; -webkit-overflow-scrolling: touch; }
  .filters button { flex: none; }

  table.board thead { display: none; }
  table.board, table.board tbody { display: block; width: 100%; }
  table.board tr {
    display: grid;
    grid-template-columns: 52px 1fr;
    grid-template-areas:
      "rank who"
      "meta meta"
      "take take";
    gap: 8px 10px;
    border: 1px solid var(--ink);
    margin: 0 0 10px;
    padding: 12px;
    background: var(--cream);
  }
  table.board tr.one { background: #f7d7d4; }
  table.board td { border: 0; padding: 0; }
  table.board td.r {
    grid-area: rank; font-size: 22px; padding-top: 6px;
  }
  table.board td:nth-child(2) { grid-area: who; }
  table.board td.money,
  table.board td:nth-child(6) { display: none; }
  table.board td.money:nth-child(3),
  table.board td.money:nth-child(4),
  table.board td.money:nth-child(5) {
    display: inline;
  }
  .mob-meta { grid-area: meta; display: flex; flex-wrap: wrap; gap: 8px 14px; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12px; }
  .mob-take { grid-area: take; }
  .mob-take .take {
    display: flex; justify-content: center; width: 100%;
    border: 1px solid var(--ink); padding: 10px; text-decoration: none;
    background: #fff;
  }
  .avatar { width: 48px; height: 48px; }
  footer.col { flex-direction: column; }
}

@media (min-width: 761px) {
  .mob-meta, .mob-take { display: none; }
}

.visits {
  display: block; margin-top: 6px;
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 11px; color: var(--red); letter-spacing: 0.02em;
}
.visits b { font-size: 13px; }
a.name { font-weight: 700; }
a.name:hover, .who a:hover { text-decoration: underline; }

.take.share { display: block; margin-top: 6px; color: var(--ink); }
.slip-wrap {
  display: none; position: fixed; inset: 0; background: rgba(22,18,12,.45);
  z-index: 30; align-items: center; justify-content: center; padding: 18px;
}
.slip {
  width: min(420px, 100%); background: var(--paper); border: 2px solid var(--ink);
  padding: 20px 18px 16px; position: relative;
  box-shadow: 6px 8px 0 #16120c;
}
.slip h3 { font-size: 26px; line-height: 1.1; margin: 4px 0 10px; }
.slip-name { font-weight: 700; font-size: 18px; }
.slip-x {
  position: absolute; top: 8px; right: 8px; background: transparent; cursor: pointer;
}
.slip-shares { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 8px; }
.slip-shares button {
  background: var(--cream); cursor: pointer;
}
@media (max-width: 760px) {
  .mob-take .take.share { margin-top: 8px; }
}
