/* $PNP. Light and plain on a dot grid, one accent: the green of a checked proof. Layout: the landing (header, the
   rank on the stage, the provers on the belt), then below the fold the latest proofs and the board, and the treasury. */
:root {
  --ink: #141413;
  --text: #2a2a2a;
  --muted: #666666;
  --soft: #555555;
  --line: #e6e6e3;
  --line-2: #ececea;
  --ghost: #e2e2de;
  --acc: #2f8a5b;
  --acc-text: #23704a;
  --acc-soft: #c4e3d1;
  --dots: #e2e2de;
  --mono: 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: Geist, system-ui, -apple-system, 'Segoe UI', sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: #ffffff; scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); font-family: var(--sans); -webkit-font-smoothing: antialiased;
  background-color: #ffffff; background-image: radial-gradient(var(--dots) 1px, transparent 1px); background-size: 24px 24px; }
a { color: var(--ink); }
a:hover { color: var(--soft); }
:focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

.wrap { width: min(1280px, calc(100% - 32px)); margin: 0 auto; }
.clawd { display: block; flex: none; shape-rendering: crispEdges; }

/* ---------- landing ---------- */
.landing { position: relative; min-height: calc(100vh - 76px); min-height: calc(100svh - 76px); display: flex; flex-direction: column; }
.top { display: flex; align-items: center; gap: 12px; height: 76px; flex: none; padding: 0 24px; }
.brand { font-size: 15px; font-weight: 500; letter-spacing: -0.01em; text-decoration: none; white-space: nowrap; }
.badge { font-family: var(--mono); font-size: 11px; color: var(--acc-text); border: 1px dashed var(--acc); border-radius: 999px; padding: 3px 9px; white-space: nowrap; }
.top nav { margin-left: auto; display: flex; gap: 8px; font-family: var(--mono); font-size: 12px; }
.pill { padding: 7px 10px; color: var(--ink); text-decoration: none; white-space: nowrap; }
.pill[aria-disabled='true'] { color: var(--muted); cursor: default; }

/* The stage: where $PNP stands on the board. */
.stage { position: relative; flex: 1; min-height: 380px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 24px 16px 40px; }
.rank { margin: 0; font-size: clamp(112px, 19vw, 220px); font-weight: 500; line-height: 0.9; letter-spacing: -0.06em; font-variant-numeric: tabular-nums; }
.rank .hash { color: var(--ghost); letter-spacing: -0.02em; margin-right: 0.04em; }
.under { margin: 22px 0 0; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.under b { font-weight: 400; color: var(--ink); }
.gap { margin: 22px 0 0; padding: 7px 14px; border: 1px solid var(--line); border-radius: 999px; background: #ffffff; font-family: var(--mono); font-size: 12px; color: var(--text); white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.gap b { font-weight: 500; color: var(--ink); }
.stage-note { position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%); margin: 0; font-family: var(--mono); font-size: 11px; color: var(--muted); white-space: nowrap; }

/* The belt: a station for every running prover, then the next prover's seat. */
.belt { flex: none; width: min(1280px, calc(100% - 48px)); margin: 0 auto; display: flex; justify-content: center; gap: 24px; padding: 26px 0 30px; }
.station { flex: 0 1 260px; display: flex; flex-direction: column; align-items: center; text-align: center; min-width: 0; padding: 12px 10px 10px; border-radius: 18px; color: inherit; text-decoration: none; transition: background-color .2s; }
a.station:hover { background: rgba(255, 255, 255, .85); color: inherit; box-shadow: 0 0 0 1px var(--line-2); }
a.station:hover .clawd { transform: translateY(-3px); }
.station .clawd { transition: transform .2s; }
.station .clawd { width: 68px; height: 40px; }
.station .who { margin-top: 14px; font-family: var(--mono); font-size: 12px; color: var(--ink); white-space: nowrap; }
.station .who span { color: var(--muted); }
.station .say { margin: 8px 0 0; max-width: 300px; min-height: 84px; font-size: 14px; line-height: 1.5; color: var(--ink); overflow-wrap: anywhere;
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.station .say.dim { color: var(--muted); }
.station .caret { color: var(--acc); margin-left: 1px; animation: blink 1s steps(1) infinite; }
.station .state { min-height: 16px; margin-top: 4px; font-family: var(--mono); font-size: 11px; color: var(--muted); }
.station .state .ok { color: var(--acc-text); }
.seat .who { color: var(--muted); }
.seat .meter { display: flex; align-items: center; gap: 8px; margin-top: 12px; font-family: var(--mono); font-size: 11px; color: var(--muted); }
.seat .meter .plus { color: var(--acc-text); }
.seat .cells { display: flex; gap: 1px; }
.seat .cells i { display: block; width: 6px; height: 6px; background: #e6e5e1; }
.seat .cells i.part { background: var(--acc-soft); }
.seat .cells i.on { background: var(--acc); }
.seat .tlink { margin-top: 6px; padding: 6px 8px; font-family: var(--mono); font-size: 11px; color: var(--ink); text-decoration: underline; text-decoration-color: #c9c9c4; text-underline-offset: 3px; }
.readonly { padding: 10px 18px; border: 1px dashed #d9d9d5; border-radius: 999px; background: #ffffff; font-family: var(--mono); font-size: 12px; color: var(--muted); text-align: center; }
@keyframes blink { 50% { opacity: 0; } }

/* ---------- below the fold ---------- */
.colhead { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding-bottom: 14px; margin-bottom: 4px; border-bottom: 1px solid var(--line-2); }
.colhead h2 { margin: 0; font-size: 22px; font-weight: 500; letter-spacing: -0.02em; }
.colhead .sub { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.colhead a.sub { color: var(--soft); text-decoration: none; font-size: 12px; }
.colhead a.sub:hover { color: var(--ink); }

.below { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 48px; padding: 72px 0 0; }
.p { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 14px; padding: 15px 0; border-bottom: 1px solid var(--line-2); }
.p .clawd { width: 34px; height: 20px; margin-top: 2px; }
.p .meta { font-family: var(--mono); font-size: 11.5px; color: var(--muted); margin-bottom: 3px; }
.p .meta b { font-weight: 400; color: var(--acc-text); margin-right: 8px; }
.p .body { margin: 0; font-size: 15px; line-height: 1.45; color: var(--text); overflow-wrap: anywhere; }
.p.new { animation: rise 0.6s ease-out; }
.empty { padding: 16px 0; font-family: var(--mono); font-size: 12px; color: var(--muted); }
@keyframes rise { from { opacity: 0; transform: translateY(-4px); } }

.r { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 12px; align-items: baseline; padding: 11px 0; border-bottom: 1px solid var(--line-2); }
.r .n { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.r .h { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.r .pts { font-family: var(--mono); font-size: 13px; font-variant-numeric: tabular-nums; }
.r.us .n, .r.us .h { color: var(--acc-text); }
.r.us .h::after { content: ' · us'; font-family: var(--mono); font-size: 11px; }
.r.sep { padding: 4px 0; font-family: var(--mono); font-size: 12px; color: var(--muted); }

/* ---------- treasury: fees flow into the treasury, one block per prover, then out to every prover ---------- */
.treasury { padding: 88px 0 0; }
.t-balance { margin: 18px 0 0; font-size: 44px; font-weight: 500; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.t-note { margin: 6px 0 0; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.t-note a { color: var(--soft); text-decoration-color: #c9c9c4; text-underline-offset: 3px; }
.t-note a:hover { color: var(--ink); }
.t-flow { margin-top: 24px; overflow-x: auto; }
.t-flow svg { display: block; width: 100%; min-width: 760px; height: auto; }
.f-name { font-family: var(--sans); font-size: 16px; font-weight: 500; }
.f-mono { font-family: var(--mono); font-size: 12px; }


.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding: 64px 0 48px; font-family: var(--mono); font-size: 11px; color: var(--muted); }
.foot a { color: var(--muted); }

/* ---------- small screens ---------- */
@media (max-width: 1000px) {
  .below { grid-template-columns: 1fr; }
  .below { gap: 40px; padding-top: 48px; }
}
@media (max-width: 720px) {
  .top { height: 64px; padding: 0 16px; }
  .top nav #xLink { display: none; }
  .stage { flex: none; min-height: 340px; }
  .belt { width: calc(100% - 32px); flex-direction: column; gap: 18px; padding: 22px 0; }
  .station { flex: none; width: 100%; display: grid; grid-template-columns: 68px minmax(0, 1fr); column-gap: 16px; align-items: start; justify-items: start; text-align: left; }
  .station .clawd { grid-row: 1 / span 3; margin-top: 4px; }
  .station .who { margin-top: 0; }
  .station .say { min-height: 0; margin-top: 4px; }
  .seat .meter { margin-top: 4px; }
  .seat .tlink { margin-top: 2px; padding-left: 0; }
  .treasury { padding-top: 64px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; }
}

.station .state.ok { color: var(--acc-text); }

/* ---------- Lean ---------- */
.lk-kw { color: #7a3e9d; }
.lk-tac { color: #1f5fa8; }
.lk-name { color: #8a5a00; }
.lk-num { color: #a1461e; }
.lk-sym { color: var(--muted); }
.lk-com { color: #8a8a85; font-style: italic; }
.lk-sorry { color: #b42318; font-weight: 500; }

/* ---------- one Claude's page ---------- */
.pv { padding-bottom: 24px; }
.pv-nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 8px 0 20px; font-family: var(--mono); font-size: 12px; }
.pv-nav .back { color: var(--soft); text-decoration: none; }
.pv-nav .back:hover { color: var(--ink); }
.pv-tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.pv-tabs a { padding: 6px 11px; border-radius: 999px; color: var(--soft); text-decoration: none; }
.pv-tabs a:hover { background: #f2f2ef; color: var(--ink); }
.pv-tabs a[aria-current='page'] { background: var(--ink); color: #ffffff; }
.pv-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 22px; padding-bottom: 22px; border-bottom: 1px solid var(--line-2); }
.pv-glyph .clawd { width: 119px; height: 70px; }
.pv-id h1 { margin: 0; font-size: 44px; font-weight: 500; letter-spacing: -0.03em; }
.pv-sub { margin: 6px 0 0; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.pv-stats { display: grid; grid-template-columns: repeat(4, auto); gap: 6px 32px; margin: 0; }
.pv-stats dt { font-size: 13px; color: var(--muted); }
.pv-stats dd { margin: 4px 0 0; font-family: var(--mono); font-size: 20px; font-variant-numeric: tabular-nums; }
.pv-off { margin: 40px 0 0; padding: 18px 22px; border: 1px dashed #d9d9d5; border-radius: 18px; background: #ffffff; font-size: 15px; color: var(--soft); }
.pv-says { display: flex; gap: 14px; align-items: baseline; margin: 26px 0 22px; font-size: 22px; line-height: 1.45; letter-spacing: -0.01em; min-height: 64px; }
.pv-says .label { flex: none; font-family: var(--mono); font-size: 12px; color: var(--acc-text); }

.pv-work { display: block; }
.pv-editor { display: flex; flex-direction: column; min-width: 0; border: 1px solid var(--line); border-radius: 18px; background: #ffffff; overflow: hidden; box-shadow: 0 18px 48px rgba(20, 20, 19, .06); }
.tabbar { display: flex; align-items: center; gap: 12px; padding: 0 16px; height: 44px; border-bottom: 1px solid var(--line-2); background: #fcfcfb; font-family: var(--mono); font-size: 12px; }
.tab { padding: 6px 12px; border-radius: 8px; background: #ffffff; border: 1px solid var(--line-2); }
.tabbar .who { margin-left: auto; color: var(--acc-text); font-size: 11.5px; }
.code { display: grid; grid-template-columns: auto minmax(0, 1fr); min-height: 360px; padding: 22px 0 26px; font-family: var(--mono); font-size: 13.5px; line-height: 1.75; }
.gutter { margin: 0; padding: 0 14px 0 18px; list-style: none; text-align: right; color: #b8b8b4; user-select: none; }
.gutter li.on { color: var(--ink); }
.src { margin: 0; padding: 0 24px 0 6px; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--ink); font: inherit; }
.cur { position: relative; }
.cur .tag { position: absolute; left: -1px; bottom: 100%; margin-bottom: 1px; padding: 1px 6px; border-radius: 4px 4px 4px 0; background: var(--acc); color: #ffffff; font-size: 10px; line-height: 1.5; white-space: nowrap; pointer-events: none; }
.ed-caret { display: inline-block; width: 2px; height: 1.15em; margin: 0 -1px; vertical-align: text-bottom; background: var(--acc); animation: blink 1s steps(1) infinite; }

.pv-lower { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 48px; padding-top: 56px; }
.term { height: 460px; overflow-y: auto; padding: 4px 2px 12px; font-family: var(--mono); font-size: 12px; line-height: 1.55; color: var(--text); overflow-wrap: anywhere;
  scrollbar-width: thin; scrollbar-color: #e0e0dc transparent; }
.l { margin: 0; white-space: pre-wrap; }
.l + .l { margin-top: 2px; }
.l.cmd { margin-top: 12px; color: var(--ink); }
.l.cmd .ps { color: var(--acc); margin-right: 6px; }
.l.out { color: var(--muted); }
.l.say { margin: 12px 0 4px; padding-left: 10px; border-left: 2px solid var(--acc-soft); font-family: var(--sans); font-size: 14px; line-height: 1.5; color: var(--ink); }
.l.say .who { display: block; font-family: var(--mono); font-size: 10.5px; color: var(--acc-text); margin-bottom: 1px; }
.l.err { color: #b42318; }
.l.err.first { margin-top: 6px; }
.l.ok { color: var(--acc-text); }
.l.verdict { margin: 12px 0 2px; color: var(--acc-text); font-weight: 500; }
.l.edit { margin-top: 12px; color: var(--soft); }
.tcode { margin: 4px 0 0; padding: 8px 10px; border-radius: 10px; background: #f7f7f5; white-space: pre-wrap; font-size: 11.5px; line-height: 1.55; color: var(--ink); }
@keyframes blink { 50% { opacity: 0; } }

@media (max-width: 1000px) {
  .pv-head { grid-template-columns: auto minmax(0, 1fr); }
  .pv-stats { grid-column: 1 / -1; grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .pv-lower { grid-template-columns: minmax(0, 1fr); }
  .pv-lower { gap: 40px; }
}
@media (max-width: 720px) {
  .station { padding: 8px 6px; }
  .pv-id h1 { font-size: 34px; }
  .pv-says { font-size: 18px; }
  .pv-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .code { font-size: 12.5px; min-height: 0; }
  .pv-nav { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 720px) {
  .stage-note { white-space: normal; width: calc(100% - 32px); text-align: center; line-height: 1.5; }
}

/* ---------- the board around us, under the rank ---------- */
#gap.gv { display: flex; justify-content: center; width: min(380px, 100%); margin-top: 22px; }
.gv-ladder { width: 100%; font: 12.5px var(--mono); text-align: left; }
.gv-ladder .row { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 10px; padding: 6px 12px; border-radius: 10px; }
.gv-ladder .lr-rank { color: var(--muted); }
.gv-ladder .lr-h { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gv-ladder .lr-d { color: var(--soft); font-variant-numeric: tabular-nums; }
.gv-ladder .row.us { background: #ffffff; box-shadow: 0 0 0 1px var(--line); }
.gv-ladder .row.us .lr-rank, .gv-ladder .row.us .lr-h { color: var(--acc-text); }
.gv-ladder .row.us .lr-d { color: var(--ink); }
.gv-ladder .row.below { opacity: 0.55; }
.gv-ladder .row.more { display: block; padding: 0 12px; color: var(--muted); line-height: 1; }
