:root {
  --bg: #d7f500;
  --panel: #16240a;
  --line: #2a2a28;
  --line-bright: #45443f;
  --text: #0a0a0a;
  --muted: #8a887f;
  --accent: #0a0a0a;
  --accent-dim: #7a5a00;
  --danger: #d4432c;
  --header-bg: #5c7a00;
  /* Reserved for text/glyphs that sit on the dark header or dark panel
     backgrounds, where black would be unreadable — everything else on the
     bright --bg green now uses black (--text / --accent) for contrast. */
  --on-dark: #ffffff;
  --mono: "IBM Plex Mono", "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  color: var(--text);
  font-family: var(--mono);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

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

body {
  background: none;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* scattered decorative feather watermark, sits behind all content */
.feather-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.feather-bg img {
  position: absolute;
  height: auto;
  opacity: 0.2;
  user-select: none;
}

/* signature element: repeating hazard stripe, used sparingly as structural accent */
.hazard {
  height: 6px;
  background-image: repeating-linear-gradient(
    -45deg,
    var(--accent) 0px, var(--accent) 8px,
    #1a1a17 8px, #1a1a17 16px
  );
}

a { color: var(--accent); }

/* ---------- header ---------- */
.site-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(92, 122, 0, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.mark { display: flex; align-items: center; gap: 10px; }
.mark-glyph {
  height: 24px;
  width: auto;
  display: block;
}
.mark-text {
  font-weight: 600;
  letter-spacing: 0.18em;
  font-size: 15px;
  background: linear-gradient(
    100deg,
    #111110 0%,
    #111110 45%,
    #f5f5f0 48%,
    #ffffff 50%,
    #f5f5f0 52%,
    #111110 55%,
    #111110 100%
  );
  background-size: 300% 100%;
  background-repeat: no-repeat;
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  animation: shimmer-sweep 3s linear infinite, shimmer-glow 3s ease-in-out infinite;
}

/*
 * The shine band sits at 48-52% of the gradient's own width, but the
 * gradient is rendered at 3x the text width (background-size: 300%) and
 * never repeats. Animating background-position from 0% to 100% slides the
 * visible 1x-wide "window" from the gradient's left third to its right
 * third, so the shine band (parked in the middle) sweeps across the text
 * exactly once. Both endpoints only show plain dark gradient (0-33% and
 * 66-100% of the gradient are flat #111110), so the instant reset from
 * 100% back to 0% at the end of each loop is visually identical on both
 * sides - no jump or flash at the seam.
 */
@keyframes shimmer-sweep {
  0% { background-position: 0% 0; }
  100% { background-position: 100% 0; }
}

@keyframes shimmer-glow {
  0%, 100% { text-shadow: 0 0 1px rgba(255, 255, 255, 0); }
  50% { text-shadow: 0 0 4px rgba(255, 255, 255, 0.28), 0 0 1px rgba(255, 255, 255, 0.18); }
}

.tag {
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 5px 10px;
}

.tag--subtle {
  margin-left: 4px;
  border-color: rgba(233, 231, 224, 0.25);
  color: rgba(233, 231, 224, 0.7);
}

.buy-button {
  display: inline-block;
  background: #16240a;
  color: var(--on-dark);
  font-family: var(--mono);
  font-weight: 700;
  letter-spacing: 0.08em;
  font-size: 12px;
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease;
}
.buy-button:hover { background: #ffce33; }

/* ---------- nav ---------- */
.site-nav {
  position: sticky;
  top: 62px;
  z-index: 9;
  display: flex;
  gap: 4px;
  padding: 10px 28px;
  background: rgba(92, 122, 0, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
}

.site-nav a {
  background: var(--panel);
  color: var(--on-dark);
  text-decoration: none;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 7px 14px;
  white-space: nowrap;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 6px;
  transition: background 0.15s ease, color 0.15s ease;
}

.site-nav a:hover {
  background: var(--on-dark);
  color: #0a0a0a;
}

/* ---------- layout ---------- */
html { scroll-behavior: smooth; }

main {
  flex: 1;
  max-width: 960px;
  width: 100%;
  margin: 0 auto;
  padding: 0 28px 64px;
}

section { margin-top: 48px; scroll-margin-top: 112px; }

/* ---------- contract address pill ---------- */
.ca-pill-wrap {
  display: flex;
  justify-content: center;
  margin-top: 48px;
}

.ca-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--panel);
  color: var(--on-dark);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 999px;
  padding: 8px 20px;
  cursor: pointer;
  transition: box-shadow 0.2s ease, filter 0.2s ease;
}

.ca-pill-icon { flex-shrink: 0; opacity: 0.75; }

.ca-pill:hover,
.ca-pill:focus-visible {
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.3), 0 0 16px rgba(255, 255, 255, 0.45);
  outline: none;
}

.ca-pill.copied {
  color: #b6ff4d;
}

/* blurs everything else on the page while the pill is hovered/focused,
   without touching the pill itself (nested inside main, not a direct
   child of body, so it needs its own exclusion inside the main rule) */
body:has(.ca-pill:hover) > .site-head,
body:has(.ca-pill:hover) > .site-nav,
body:has(.ca-pill:hover) > .feather-bg,
body:has(.ca-pill:hover) main > *:not(.ca-pill-wrap),
body:has(.ca-pill:focus-visible) > .site-head,
body:has(.ca-pill:focus-visible) > .site-nav,
body:has(.ca-pill:focus-visible) > .feather-bg,
body:has(.ca-pill:focus-visible) main > *:not(.ca-pill-wrap) {
  filter: blur(4px);
}

.site-head,
.site-nav,
.feather-bg,
main > * {
  transition: filter 0.2s ease;
}

.section-label {
  font-size: 17px;
  font-weight: 700;
  text-align: center;
  letter-spacing: 0.14em;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
  margin-bottom: 18px;
}

/* ---------- totals ---------- */
.totals { margin-top: 0; }
.totals-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--panel);
}

.stat-block {
  padding: 22px 22px;
  border-left: 1px solid var(--line);
}
.stat-block:first-child { border-left: none; }

.stat-block { background: var(--panel); }

.stat-label {
  font-size: 10.5px;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-bottom: 12px;
}

.stat-value {
  font-size: 30px;
  font-weight: 600;
  line-height: 1;
  color: var(--on-dark);
}

.stat-value--status {
  font-size: 24px;
  letter-spacing: 0.04em;
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.error-flag {
  color: var(--danger);
  font-size: 15px;
  cursor: default;
}

.stat-unit {
  margin-top: 8px;
  font-size: 10.5px;
  color: var(--muted);
  letter-spacing: 0.08em;
}

/* ---------- lookup ---------- */
.lookup-form {
  display: flex;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--panel);
}

#lookup-input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--on-dark);
  font-family: var(--mono);
  font-size: 14px;
  padding: 14px 16px;
  outline: none;
}
#lookup-input::placeholder { color: var(--muted); }

.lookup-form button {
  background: var(--panel);
  color: var(--on-dark);
  border: none;
  font-family: var(--mono);
  font-weight: 700;
  letter-spacing: 0.08em;
  font-size: 12px;
  padding: 0 22px;
  cursor: pointer;
}
.lookup-form button:hover { background: #ffce33; }

.lookup-result {
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--panel);
}
.lookup-result-row {
  display: flex;
  justify-content: space-between;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--on-dark);
}
.lookup-result-row:first-child { border-top: none; }
.lookup-result-row span:first-child { color: var(--muted); letter-spacing: 0.06em; }

.lookup-error {
  margin-top: 14px;
  border: 1px solid var(--danger);
  border-radius: 8px;
  background: var(--panel);
  color: var(--danger);
  padding: 12px 16px;
  font-size: 13px;
}

.lookup-explanation {
  padding: 12px 16px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.mono { font-family: var(--mono); }

/* ---------- loyalty tier chart ---------- */
.tier-chart-intro {
  max-width: 640px;
  margin: 0 auto 20px;
  text-align: center;
  font-size: 12px;
  line-height: 1.6;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.tier-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.tier-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 16px 16px;
  border-top: 3px solid var(--tier-color, var(--line-bright));
}

.tier-card-label {
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.06em;
  color: var(--tier-color, var(--on-dark));
  margin-bottom: 6px;
}

.tier-card-range {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.04em;
  margin-bottom: 10px;
}

.tier-card-weight {
  font-size: 20px;
  font-weight: 700;
  color: var(--on-dark);
}

/* tier badge — used both in the chart cards and the wallet-lookup result */
.tier-badge {
  display: inline-block;
  font-weight: 700;
  letter-spacing: 0.06em;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  color: #0a0a0a;
  background: var(--tier-color, var(--muted));
}

.tier-basic   { --tier-color: #d4432c; }
.tier-jeet    { --tier-color: #f2822c; }
.tier-trader  { --tier-color: #b7b6ac; }
.tier-holder  { --tier-color: #7ddc5e; }
.tier-believer{ --tier-color: #4ee08a; }
.tier-degen   { --tier-color: #ffce33; }

@media (max-width: 860px) {
  .tier-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .tier-grid { grid-template-columns: 1fr; }
}

/* ---------- tables ---------- */
.table-wrap {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--panel);
}

.ledger-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border: none;
  background: var(--panel);
}

.ledger-table th {
  text-align: left;
  font-size: 10.5px;
  letter-spacing: 0.1em;
  color: var(--muted);
  font-weight: 600;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
}

.ledger-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  color: var(--on-dark);
}

.ledger-table tr:last-child td { border-bottom: none; }

.ledger-table tr.row-clickable { cursor: pointer; }

.ledger-table tr.row-clickable:hover td,
.ledger-table tr.row-clickable:focus-visible td {
  background: rgba(245, 180, 0, 0.1);
}

.ledger-table tr.row-clickable:focus-visible { outline: none; }

.rank-cell { color: #ffce33; font-weight: 700; }

.tx-link {
  display: inline-block;
  background: #1b2e0a;
  color: var(--on-dark);
  font-family: var(--mono);
  font-weight: 700;
  letter-spacing: 0.06em;
  font-size: 11px;
  padding: 5px 10px;
  border: none;
  border-radius: 6px;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease;
}
.tx-link:hover { background: #ffce33; color: #0a0a0a; }

.empty-row {
  color: var(--muted);
  text-align: center;
  padding: 24px 14px;
  letter-spacing: 0.06em;
  font-size: 12px;
}

/* ---------- footer ---------- */
.site-foot {
  border-top: 1px solid var(--line);
  padding: 18px 28px;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.04em;
}

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .totals-grid { grid-template-columns: 1fr; }
  .stat-block { border-left: none; border-top: 1px solid var(--line); }
  .stat-block:first-child { border-top: none; }
}

@media (max-width: 640px) {
  main { padding: 0 16px 48px; }
  .site-head { padding: 16px; }
}
