/* PonsPayroll ledger interface — production adaptation of the Claude Design handoff. */
@font-face {
  font-family: "Bricolage Grotesque";
  src: url("/assets/fonts/bricolage-grotesque-latin-wght.woff2") format("woff2-variations");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "JetBrains Mono";
  src: url("/assets/fonts/jetbrains-mono-latin-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "JetBrains Mono";
  src: url("/assets/fonts/jetbrains-mono-latin-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "JetBrains Mono";
  src: url("/assets/fonts/jetbrains-mono-latin-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;
  --bg: #f1ebdd;
  --surface: #fffdf7;
  --surface-strong: #fffdf7;
  --panel: rgba(22, 19, 17, .025);
  --panel-hover: rgba(22, 19, 17, .06);
  --ink: #161311;
  --muted: #6e6455;
  --soft: #8a7f6c;
  --gold: #c8931f;
  --gold-deep: #a9760d;
  --gold-pale: #e4c270;
  --line: rgba(22, 19, 17, .15);
  --line-strong: #161311;
  --shadow: 0 20px 40px rgba(22, 19, 17, .18);
  --radius: 0;
  --radius-sm: 0;
  --max: 100%;
  --font: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
}

html { background: var(--bg); }

body {
  color: var(--ink);
  font-family: var(--font);
  background: var(--bg);
  background-image: linear-gradient(rgba(22, 19, 17, .07) 1px, transparent 1px);
  background-size: 100% 32px;
  background-attachment: scroll;
}

body::before, .grain { display: none; }
.page { min-height: 100vh; overflow-x: clip; }
.shell { width: 100%; padding-inline: clamp(20px, 4vw, 48px); }
main { padding-bottom: 0; }
a:hover { color: inherit; opacity: .8; }

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
  border-radius: 0;
}

.eyebrow, .label, .mono, .round-id, .muted {
  font-family: var(--mono);
}

.eyebrow, .label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .1em;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: 64px;
  background: rgba(241, 235, 221, .97);
  border-bottom: 2px solid var(--ink);
  box-shadow: none;
  backdrop-filter: none;
}

.site-header.scrolled { background: rgba(241, 235, 221, .97); box-shadow: none; }

.header-inner {
  display: flex;
  width: 100%;
  min-height: 64px;
  padding: 12px clamp(20px, 4vw, 48px);
  align-items: center;
  justify-content: space-between;
  gap: 12px 32px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.brand-link, .footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
}

.brand-link .wordmark, .footer-brand .wordmark {
  font-family: var(--font);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -.02em;
  text-transform: none;
}

.ledger-logo {
  display: block;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  object-fit: contain;
  filter: drop-shadow(0 2px 3px rgb(93 58 7 / 18%));
}

.ledger-logo.small { width: 24px; height: 24px; }

.site-header nav {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.site-header nav a {
  padding: 4px 0;
  color: var(--ink);
  border: 0;
  border-radius: 0;
  font-weight: 500;
  text-decoration: none;
}

.site-header nav a[aria-current="page"] {
  padding: 4px 8px;
  color: var(--bg);
  background: var(--ink);
}

.header-actions { display: flex; align-items: center; gap: 16px; }
.chain-name { color: var(--muted); white-space: nowrap; }

.x-button, .get-button {
  display: inline-flex;
  min-width: 0;
  height: auto;
  padding: 8px 14px;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  background: transparent;
  border: 2px solid var(--ink);
  border-radius: 0;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .02em;
  text-decoration: none;
  white-space: nowrap;
}

.x-button { width: 35px; padding-inline: 0; }
.x-button[aria-disabled="true"], .get-button[aria-disabled="true"] { opacity: .45; pointer-events: none; }
.network-pill { color: var(--bg); background: var(--ink); border: 0; border-radius: 0; font-family: var(--mono); }

/* Home hero */
.ledger-hero {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(40px, 5vw, 64px);
  padding: clamp(48px, 6vw, 80px) clamp(20px, 4vw, 48px) 64px;
  align-items: start;
}

.ledger-hero-copy { min-width: 0; }
.ledger-hero-copy .eyebrow { margin: 0 0 24px; }

.ledger-hero h1 {
  margin: 0 0 28px;
  font-size: clamp(52px, 7.2vw, 92px);
  font-weight: 700;
  font-variation-settings: "opsz" 96;
  letter-spacing: -.045em;
  line-height: .95;
  text-wrap: balance;
}

.ledger-hero h1 span { color: var(--gold); }
.ledger-hero .lede { max-width: 560px; margin: 0 0 36px; color: #3a342c; font-size: clamp(17px, 1.5vw, 20px); line-height: 1.45; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }

.button {
  display: inline-flex;
  min-height: 56px;
  padding: 0 28px;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--bg);
  background: var(--ink);
  border: 2px solid var(--ink);
  border-radius: 0;
  box-shadow: none;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
}

.button::after { display: none; }
.button.secondary { color: var(--ink); background: transparent; border-color: var(--ink); }
.button svg { width: 16px; }

.ledger-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px 40px;
  margin-top: 56px;
  padding-top: 24px;
  border-top: 2px solid var(--ink);
  font-family: var(--mono);
}

.ledger-stats .label { display: block; margin-bottom: 6px; }
.ledger-stats strong { display: block; font-size: clamp(19px, 2vw, 28px); font-weight: 700; letter-spacing: -.04em; line-height: 1.15; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }

/* Receipt */
.ledger-receipt-stage { position: relative; width: 100%; max-width: 480px; margin: 0 auto; padding-top: 24px; }

.receipt-coin {
  position: absolute;
  top: -40px;
  right: -80px;
  width: 340px;
  height: 340px;
  max-width: none;
  opacity: .28;
  filter: grayscale(1) contrast(1.6) brightness(.55);
  mix-blend-mode: multiply;
  pointer-events: none;
  transform: rotate(-14deg);
}

.ledger-receipt {
  position: relative;
  min-height: 500px;
  padding: 28px 28px 44px;
  color: var(--ink);
  background: var(--surface);
  box-shadow: var(--shadow);
  clip-path: polygon(0 0,100% 0,100% calc(100% - 10px),97% 100%,94% calc(100% - 10px),91% 100%,88% calc(100% - 10px),85% 100%,82% calc(100% - 10px),79% 100%,76% calc(100% - 10px),73% 100%,70% calc(100% - 10px),67% 100%,64% calc(100% - 10px),61% 100%,58% calc(100% - 10px),55% 100%,52% calc(100% - 10px),49% 100%,46% calc(100% - 10px),43% 100%,40% calc(100% - 10px),37% 100%,34% calc(100% - 10px),31% 100%,28% calc(100% - 10px),25% 100%,22% calc(100% - 10px),19% 100%,16% calc(100% - 10px),13% 100%,10% calc(100% - 10px),7% 100%,4% calc(100% - 10px),1% 100%,0 calc(100% - 10px));
  font-family: var(--mono);
  font-size: 13px;
  transform: rotate(-1.2deg);
}

.receipt-head { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 20px; color: var(--muted); font-size: 11px; letter-spacing: .06em; text-align: right; }
.receipt-logo { display: block; width: 44px; height: 44px; flex: 0 0 auto; object-fit: contain; filter: drop-shadow(0 2px 3px rgb(93 58 7 / 18%)); }
.receipt-title { padding: 10px 0; border-top: 1px dashed var(--ink); border-bottom: 1px dashed var(--ink); font-size: 14px; font-weight: 700; letter-spacing: .1em; text-align: center; overflow-wrap: anywhere; }
.receipt-lines { padding: 14px 0 6px; }
.ledger-receipt-row { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; }
.ledger-receipt-row span:first-child { white-space: pre-wrap; }
.ledger-receipt-row span:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.ledger-receipt-row.is-muted { color: var(--muted); }
.ledger-receipt-row.is-section { margin-top: 8px; padding-top: 12px; border-top: 1px dashed var(--ink); }
.ledger-receipt-row.is-total { margin-top: 8px; padding-top: 12px; border-top: 2px solid var(--ink); font-size: 15px; font-weight: 700; }

.receipt-stamp {
  position: absolute;
  top: -10px;
  right: -24px;
  padding: 6px 14px;
  opacity: .72;
  color: var(--gold);
  border: 3px solid var(--gold);
  font-family: var(--mono);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: .16em;
  line-height: 1.2;
  text-transform: uppercase;
  mix-blend-mode: multiply;
  transform: rotate(14deg);
}

.receipt-stamp.is-finalized { opacity: .92; }

/* Ticker */
.ledger-ticker { display: flex; height: 44px; align-items: center; overflow: hidden; color: var(--bg); background: var(--ink); border-top: 2px solid var(--ink); border-bottom: 2px solid var(--ink); font-family: var(--mono); font-size: 13px; }
.ticker-track { display: flex; min-width: max-content; gap: 48px; padding-left: 48px; white-space: nowrap; animation: ledger-marquee 40s linear infinite; }
.ticker-track span::after { content: "◆"; margin-left: 48px; color: var(--gold); }
@keyframes ledger-marquee { to { transform: translateX(-50%); } }

/* Sections */
.ledger-section { padding: clamp(56px, 6vw, 80px) clamp(20px, 4vw, 48px) 0; scroll-margin-top: 80px; }
.ledger-titlebar { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 12px 32px; padding-bottom: 20px; border-bottom: 2px solid var(--ink); }
.ledger-titlebar h2 { margin: 0; font-size: clamp(36px, 4vw, 48px); font-weight: 700; letter-spacing: -.04em; line-height: 1; }
.ledger-titlebar > span { color: var(--muted); font-family: var(--mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; }
.ledger-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 40px; margin: 0; padding: 0; list-style: none; }
.ledger-steps li { display: grid; grid-template-rows: auto 1fr; gap: 16px; padding: 28px 0; border-bottom: 1px solid var(--ink); }
.ledger-steps li > span { font-family: var(--mono); font-size: 14px; font-weight: 700; }
.ledger-steps h3 { margin: 0 0 8px; font-size: 22px; font-weight: 600; letter-spacing: -.02em; }
.ledger-steps p { margin: 0; color: #3a342c; }
.policy-bar { display: flex; height: 22px; gap: 3px; margin-top: 14px; }
.policy-bar i:nth-child(1) { flex: 20; background: var(--ink); }
.policy-bar i:nth-child(2) { flex: 60; background: var(--gold); }
.policy-bar i:nth-child(3) { flex: 15; background: repeating-linear-gradient(135deg,var(--ink) 0 3px,transparent 3px 6px); }
.policy-bar i:nth-child(4) { flex: 5; border: 1.5px solid var(--ink); }
.policy-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 10px; color: var(--muted); font-family: var(--mono); font-size: 10px; letter-spacing: .04em; text-transform: uppercase; }

/* Round + lookup */
.ledger-round-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 48px; }
.latest-round-card, .lookup-card { min-height: 390px; padding: clamp(28px, 3vw, 40px); }
.latest-round-card { color: var(--bg); background: var(--ink); }
.latest-round-card .label { display: block; margin-bottom: 16px; color: var(--gold); }
.latest-round-card > strong { display: block; margin-bottom: 8px; font-size: clamp(40px, 4.4vw, 56px); font-weight: 700; letter-spacing: -.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.latest-round-card > p { margin: 0 0 6px; color: #b9b0a0; }
.latest-round-card > small { display: block; margin-bottom: 28px; color: #8a7f6c; font-family: var(--mono); font-size: 12px; }
.latest-round-card .distribution-receipts a { color: var(--bg); background: transparent; border: 1px solid var(--bg); border-radius: 0; font-family: var(--mono); font-weight: 400; }

.lookup-card { display: flex; flex-direction: column; gap: 24px; border: 2px solid var(--ink); }
.lookup-card .label { display: block; margin-bottom: 16px; }
.lookup-card h2 { max-width: 560px; margin: 0; font-size: clamp(22px, 2.2vw, 28px); font-weight: 600; letter-spacing: -.03em; line-height: 1.15; }
.lookup { display: flex; width: 100%; max-width: none; margin-top: auto; padding: 0; gap: 0; background: transparent; border: 2px solid var(--ink); border-radius: 0; box-shadow: none; font-family: var(--mono); }
.lookup:focus-within { border-color: var(--ink); box-shadow: none; }
.lookup input { padding: 14px 16px; color: var(--ink); font-family: var(--mono); font-size: 14px; }
.lookup input::placeholder { color: var(--soft); }
.lookup button { min-height: 48px; padding: 14px 20px; color: var(--bg); background: var(--ink); border: 0; border-radius: 0; font-family: var(--mono); font-size: 14px; font-weight: 700; }
.lookup-help { margin: .8rem 0 0; color: var(--muted); font-family: var(--mono); font-size: 12px; }
.lookup-card .lookup-help { margin: -12px 0 0; }
.lookup-result { width: 100%; max-width: none; margin: 0; padding: 16px 0 0; background: transparent; border: 0; border-top: 1px dashed var(--ink); border-radius: 0; box-shadow: none; font-family: var(--mono); font-size: 13px; }
.result-grid { gap: 0; }
.result-grid > div { padding: 10px 0; background: transparent; border: 0; border-top: 1px solid var(--line); border-radius: 0; }
.result-grid strong { font-size: 18px; }
.result-message .empty-mark { display: none; }

/* Distribution and holder pages */
.page-head { max-width: 920px; padding: clamp(56px, 6vw, 80px) 0 40px; }
.page-head h1 { margin-bottom: 24px; font-size: clamp(48px, 7vw, 88px); font-weight: 700; letter-spacing: -.045em; line-height: .95; }
.page-head .lede { max-width: 720px; color: #3a342c; font-size: clamp(17px, 1.5vw, 20px); }
.distributions-list { gap: 24px; }
.distribution-card { padding: clamp(24px, 3vw, 40px); color: var(--ink); background: var(--surface); border: 2px solid var(--ink); border-radius: 0; box-shadow: none; }
.distribution-head { padding-bottom: 20px; border-bottom: 2px solid var(--ink); }
.distribution-head h3 { font-size: 24px; }
.status { color: var(--ink); background: transparent; border: 1px solid var(--ink); border-radius: 0; font-family: var(--mono); }
.distribution-primary { gap: 0; margin-top: 24px; border: 1px solid var(--ink); }
.distribution-primary > div { padding: 20px; background: transparent; border: 0; border-right: 1px solid var(--ink); border-radius: 0; }
.distribution-primary > div:last-child { border-right: 0; }
.distribution-split { margin-top: 24px; padding: 20px; border: 1px solid var(--ink); border-radius: 0; }
.split-bar { overflow: hidden; border-radius: 0; }
.split-bar .s-rebate { flex: 20; }
.split-bar .s-holders { flex: 60; }
.split-bar .s-creator { flex: 15; }
.split-bar .s-operations { flex: 5; }
.split-legend i, .split-bar span { border-radius: 0; }
.distribution-receipts a { color: var(--ink); background: transparent; border: 1px solid var(--ink); border-radius: 0; font-family: var(--mono); }
.distribution-receipts a:hover { background: var(--panel-hover); }
.notice, .empty-state { color: var(--ink); background: var(--surface); border: 2px dashed var(--ink); border-radius: 0; }
.empty-mark { color: var(--bg); background: var(--ink); border: 0; border-radius: 0; font-family: var(--font); }
.pagination button { color: var(--ink); background: transparent; border: 2px solid var(--ink); border-radius: 0; font-family: var(--mono); }

/* Footer */
.site-footer { margin-top: clamp(64px, 7vw, 96px); padding: 0; border-top: 2px solid var(--ink); background: var(--bg); }
.footer-inner { display: flex; min-height: 72px; padding: 20px clamp(20px, 4vw, 48px); align-items: center; justify-content: space-between; gap: 12px 32px; color: var(--muted); font-family: var(--mono); font-size: 12px; letter-spacing: .04em; text-transform: uppercase; }
.footer-brand { color: var(--ink); text-transform: none; }
.site-footer nav { display: flex; gap: 20px; }
.site-footer nav a { padding: 0; color: var(--muted); border-radius: 0; font-weight: 500; }
.site-footer nav a:hover { color: var(--ink); background: transparent; }
.footer-trust { text-align: right; }
.footer-meta { grid-column: auto; padding: 0; border: 0; }

@media (max-width: 1100px) {
  .chain-name { display: none; }
  .ledger-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 960px) {
  .ledger-hero { grid-template-columns: 1fr; }
  .ledger-receipt-stage { margin-top: 24px; }
  .ledger-round-grid { grid-template-columns: 1fr; }
  .latest-round-card, .lookup-card { min-height: 0; }
}

@media (max-width: 760px) {
  .header-inner { display: grid; grid-template-columns: 1fr auto; }
  .brand-link { grid-column: 1; grid-row: 1; }
  .header-actions { grid-column: 2; grid-row: 1; }
  .site-header nav { grid-column: 1 / -1; grid-row: 2; display: grid; grid-template-columns: repeat(3, 1fr); width: 100%; gap: 0; border-top: 1px solid var(--ink); }
  .site-header nav a { padding: 8px; text-align: center; }
  .site-header nav a[aria-current="page"] { padding: 8px; }
  .ledger-stats { grid-template-columns: 1fr; }
  .ledger-steps { grid-template-columns: 1fr; }
  .footer-inner { flex-wrap: wrap; }
  .footer-trust { width: 100%; text-align: left; }
}

@media (max-width: 560px) {
  .wordmark { font-size: 15px; }
  .get-button { padding: 7px 9px; font-size: 10px; }
  .ledger-hero { padding-top: 40px; }
  .ledger-hero h1 { font-size: clamp(48px, 15vw, 68px); }
  .ledger-receipt { min-height: 360px; padding-inline: 20px; }
  .receipt-coin { right: -120px; }
  .receipt-stamp { right: -8px; font-size: 14px; }
  .distribution-primary { grid-template-columns: 1fr; }
  .distribution-primary > div { border-right: 0; border-bottom: 1px solid var(--ink); }
  .distribution-primary > div:last-child { border-bottom: 0; }
  .lookup { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  .ticker-track { animation: none; }
}
