/* Shared by every page: tokens, header, footer, rankings, launch state. */
:root {
  --bg: #FFFFFF;
  --soft: #F4F4F3;
  --ink: #0A0A0A;
  --ink-2: #2B2B2B;
  --muted: #6B6B6B;
  --faint: #A6A6A6;
  --line: #E7E7E5;
  --line-2: #CFCFCC;
  --sans: "Archivo", system-ui, -apple-system, sans-serif;
  --serif: "Instrument Serif", "Times New Roman", serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  --radius: 16px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
a, button { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
body { font-family: var(--sans); background: var(--bg); color: var(--ink); line-height: 1.55; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img, video { display: block; max-width: 100%; }
a { color: inherit; }
::selection { background: var(--ink); color: var(--bg); }
.wrap { width: min(1200px, 100% - 32px); margin-inline: auto; }

.label { font-family: var(--mono); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.label::before { content: "[ "; color: var(--faint); }
.label::after { content: " ]"; color: var(--faint); }
.display { font-family: var(--sans); font-weight: 900; font-stretch: 70%; text-transform: uppercase; line-height: .88; letter-spacing: -.01em; }
.serif-i { font-family: var(--serif); font-style: italic; font-weight: 400; text-transform: none; letter-spacing: -.01em; font-stretch: normal; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5em; font: 600 .95rem var(--sans); text-decoration: none; cursor: pointer; white-space: nowrap; padding: .9em 1.5em; border-radius: 999px; border: 1.5px solid var(--ink); transition: transform .15s ease, background .2s, color .2s; }
.btn-dark { background: var(--ink); color: var(--bg); }
.btn-dark:hover { transform: translateY(-1px); background: var(--ink-2); }
.btn-line { background: transparent; color: var(--ink); }
@media (hover: hover) { .btn-line:hover { background: var(--ink); color: var(--bg); } }
a:focus-visible, button:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

body:not(.live) [data-live] { display: none !important; }
body.live [data-soon] { display: none !important; }

.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ink); display: inline-block; animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: .25; transform: scale(.7); } }


/* Affiliate bar */
.promo { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 6px 14px; padding: 9px 16px; text-align: center; text-decoration: none; background: var(--ink); color: #D9D9D9; font-size: .85rem; }
.promo .short { display: none; }
.promo strong { color: #fff; font-weight: 600; }
.promo-cta { font-family: var(--mono); font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; color: #fff; border-bottom: 1px solid #fff; }
.promo .ad { font-family: var(--mono); font-size: .64rem; letter-spacing: .12em; text-transform: uppercase; color: #8C8C8C; }


/* Nav ("$TOPCAT presents", Mailchimp-style) */
nav { position: sticky; top: 0; z-index: 20; background: rgba(255,255,255,.88); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-coin { width: 32px; height: 32px; border-radius: 50%; background: var(--ink); display: grid; place-items: center; color: #fff; flex: none; }
.brand-coin img { width: 24px; height: 24px; }
/* The header coin flips like the big one: a full turn every few seconds, faster on hover. */
.brand { perspective: 240px; }
.brand-coin { box-shadow: inset 0 0 0 1.5px #4A4A4A; animation: coin-flip 5s cubic-bezier(.65,0,.35,1) infinite; }
.brand:hover .brand-coin, .brand:focus-visible .brand-coin { animation-duration: 1.1s; }
@keyframes coin-flip { 0%, 62% { transform: rotateY(0); } 100% { transform: rotateY(360deg); } }
.brand b { font-weight: 800; font-stretch: 80%; font-size: 1.15rem; letter-spacing: .02em; }
.brand .presents { font-family: var(--serif); font-style: italic; font-size: 1.1rem; color: var(--muted); }
.nav-links { display: flex; gap: 26px; font-size: .92rem; font-weight: 500; }
.nav-links a { text-decoration: none; color: var(--muted); transition: color .2s; }
.nav-links a:hover, .nav-links a[aria-current] { color: var(--ink); }
.nav-links a[aria-current] { text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 1.5px; }
.nav-inner .btn { padding: .6em 1.1em; font-size: .86rem; }
.nav-actions { display: flex; align-items: center; gap: 8px; }
.nav-actions .btn { min-height: 44px; }
.nav-actions .make svg { width: 11px; height: 11px; flex: none; }


/* Sections */
section.block { padding: 112px 0; border-bottom: 1px solid var(--line); }
.sec-head { display: grid; grid-template-columns: 1.2fr 1fr; gap: 32px; align-items: end; margin-bottom: 52px; }
.sec-head h2 { font-size: clamp(3rem, 7vw, 6rem); margin-top: 18px; }
.sec-head p { color: var(--muted); max-width: 44ch; justify-self: end; font-size: 1.02rem; }


/* Contract address strip */
.ca { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 10px 18px; padding: 18px; border-top: 1px solid var(--line); font-size: .92rem; color: var(--muted); }
.ca code { font-family: var(--mono); font-size: .85rem; color: var(--ink); background: var(--soft); padding: .4em .7em; border-radius: 8px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ca button { font: 500 .74rem var(--mono); letter-spacing: .08em; text-transform: uppercase; background: var(--ink); color: var(--bg); border: 0; border-radius: 8px; padding: .55em .9em; cursor: pointer; }

/* Rankings (BitcoinOS-style ruled rows) */
.ranks { border-top: 1.5px solid var(--ink); }
.ranks-head, .row { display: grid; grid-template-columns: 72px 88px 1fr minmax(140px, 260px) 130px; gap: 22px; align-items: center; }
.ranks-head { padding: 12px 0; border-bottom: 1px solid var(--line); }
.ranks-head span { font-family: var(--mono); font-size: .66rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.row { padding: 20px 0; border-bottom: 1px solid var(--line); }
.row .seat-note { font: 500 .7rem var(--mono); letter-spacing: .12em; text-transform: uppercase; color: #9A9A9A; }
.deadline { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 18px 32px; border: 1.5px solid var(--ink); border-radius: var(--radius); padding: 20px 24px; margin-bottom: 36px; }
.deadline > div:first-child b { display: block; margin-top: 6px; font-weight: 900; font-stretch: 72%; font-size: 1.9rem; text-transform: uppercase; line-height: 1; }
.clock { display: flex; gap: 10px; }
.clock div { min-width: 74px; text-align: center; background: var(--ink); color: #fff; border-radius: 12px; padding: 10px 8px 8px; }
.clock b { display: block; font-weight: 900; font-stretch: 70%; font-size: 2.4rem; line-height: 1; font-variant-numeric: tabular-nums; }
.clock span { font: 500 .6rem var(--mono); letter-spacing: .14em; text-transform: uppercase; color: #9A9A9A; }
.deadline.closed .clock { display: none; }
.row .rank { font-weight: 900; font-stretch: 70%; font-size: 2.6rem; line-height: 1; color: var(--faint); }
.row img, .row .ph { position: relative; width: 88px; height: 88px; object-fit: cover; border-radius: 14px; filter: grayscale(1) contrast(1.06); }
.ph { display: grid; place-items: center; background: var(--soft); }
.ph span { font-weight: 900; font-stretch: 70%; font-size: 2.6rem; color: var(--ink); line-height: 1; }
.who { display: grid; gap: 4px; min-width: 0; }
.who .role { font-family: var(--mono); font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.who h3 { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; font-weight: 800; font-stretch: 76%; font-size: 1.9rem; text-transform: uppercase; line-height: 1; overflow-wrap: anywhere; }
.who p { font-size: .9rem; color: var(--muted); }
.fav-tag { font-family: var(--mono); font-size: .62rem; font-weight: 500; letter-spacing: .12em; background: var(--ink); color: var(--bg); padding: .35em .7em; border-radius: 999px; }
.vote { justify-self: end; position: relative; flex: none; white-space: nowrap; font: 600 .78rem var(--sans); letter-spacing: .04em; text-transform: uppercase; cursor: pointer; color: var(--ink); background: transparent; border: 1.5px solid var(--ink); border-radius: 999px; padding: .55em 1em; transition: background .2s, color .2s; }
.vote[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
@media (hover: hover) { .vote:hover { background: var(--ink); color: var(--bg); } }
.vote:disabled { opacity: .55; cursor: progress; }
.meter { min-width: 0; }
.meter-bar { height: 4px; border-radius: 4px; background: var(--line); overflow: hidden; }
.meter-bar span { display: block; height: 100%; background: var(--ink); transition: width .5s ease; }
.meter-num { font-family: var(--mono); font-size: .7rem; color: var(--muted); margin-top: 6px; }
.row.top { background: var(--ink); color: var(--bg); border-radius: var(--radius); padding: 22px; margin: 10px -22px; border-bottom-color: transparent; }
.row.top .rank { color: var(--bg); }
.row.top .who .role, .row.top .who p { color: #BDBDBD; }
.row.top .fav-tag { background: var(--bg); color: var(--ink); }
.row.top .meter-bar { background: #2E2E2E; } .row.top .meter-bar span { background: #fff; }
.row.top .meter-num { color: #9A9A9A; }
.row.top .vote { border-color: #fff; color: #fff; }
.row.top .vote[aria-pressed="true"] { background: #fff; color: var(--ink); }
.row.top .ph { background: #1A1A1A; } .row.top .ph span { color: #fff; }
.ranks-note { color: var(--muted); font-family: var(--mono); font-size: .8rem; text-align: center; margin-top: 24px; }
.ranks-note:empty { display: none; }
.burst { position: fixed; z-index: 60; width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 2px solid var(--ink); pointer-events: none; animation: burst .8s cubic-bezier(.2,.7,.3,1) forwards; }
.burst::after { content: ""; position: absolute; inset: 3px; border-radius: 50%; border: 1px solid var(--ink); }
@keyframes burst { to { transform: translate(var(--bx), var(--by)) scale(.4) rotate(220deg); opacity: 0; } }


/* Footer (BAGGU / KOBU oversized wordmark) */
footer { padding: 64px 0 28px; overflow: hidden; }
.foot-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 20px; align-items: center; }
.foot-links { display: flex; flex-wrap: wrap; gap: 24px; font-size: .92rem; font-weight: 500; }
.foot-links a { text-decoration: none; color: var(--muted); } .foot-links a:hover { color: var(--ink); }
.wordmark { font-weight: 900; font-stretch: 62%; font-size: clamp(4.4rem, 21.5vw, 19rem); line-height: .8; letter-spacing: -.02em; text-align: center; margin: 48px 0 26px; white-space: nowrap; }
.disclaimer { font-size: .78rem; color: var(--muted); max-width: 95ch; padding-top: 22px; border-top: 1px solid var(--line); }
.disclaimer + .disclaimer { border-top: 0; padding-top: 10px; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 140px); z-index: 50; font: 500 .82rem var(--mono); color: var(--bg); background: var(--ink); padding: .85em 1.4em; border-radius: 999px; transition: transform .3s ease, visibility .3s; visibility: hidden; }
.toast.show { transform: translate(-50%, 0); visibility: visible; }

.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }

/* Menu button + full-screen menu for phones (Open-style: black sheet, big links with arrows) */
.menu-btn { display: none; width: 44px; height: 44px; flex: none; border-radius: 50%; border: 1.5px solid var(--ink); background: transparent; color: var(--ink); cursor: pointer; place-items: center; }
.menu-btn svg { width: 18px; height: 18px; }
.menu { position: fixed; inset: 0; z-index: 40; background: var(--ink); color: #fff; display: flex; flex-direction: column; padding: 14px 16px 28px; overflow-y: auto; }
.menu[hidden] { display: none; }
.menu-top { display: flex; align-items: center; justify-content: space-between; height: 44px; }
.menu-top b { font-weight: 800; font-stretch: 80%; font-size: 1.15rem; letter-spacing: .02em; }
.menu-close { width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid #fff; background: transparent; color: #fff; cursor: pointer; display: grid; place-items: center; }
.menu-close svg { width: 16px; height: 16px; }
.menu-links { display: grid; margin: auto 0; padding: 32px 0; }
.menu-links a { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 16px 0; border-bottom: 1px solid #2B2B2B; text-decoration: none; font-weight: 900; font-stretch: 70%; text-transform: uppercase; font-size: clamp(2.2rem, 11vw, 3.4rem); line-height: 1; }
.menu-links a span { font: 500 .8rem var(--mono); letter-spacing: .1em; color: #8C8C8C; white-space: nowrap; }
.menu-links a[aria-current] span { color: #fff; }
.menu-foot { display: flex; flex-wrap: wrap; gap: 10px; }
.menu-foot .btn { flex: 1 1 auto; border-color: #fff; }
.menu-foot .btn-line { color: #fff; }
.menu-foot .btn-dark { background: #fff; color: var(--ink); }
.menu a:focus-visible, .menu button:focus-visible { outline-color: #fff; }
body.menu-open { overflow: hidden; }

/* Page headers on the inner pages */
.page-head { padding: 72px 0 0; }
.page-head .sec-head { margin-bottom: 44px; }
.page-head h1 { font-size: clamp(3rem, 7vw, 6rem); margin-top: 18px; }

/* Three facts in a ruled row */
.trio { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1.5px solid var(--ink); }
.trio div { padding: 26px 26px 6px 0; }
.trio div + div { padding-left: 26px; border-left: 1px solid var(--line); }
.trio .n { font: 500 .74rem var(--mono); color: var(--muted); }
.trio h3 { font-weight: 800; font-stretch: 82%; text-transform: uppercase; font-size: 1.35rem; line-height: 1.05; margin: 10px 0 8px; }
.trio p { color: var(--muted); font-size: .95rem; }

.more { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 36px; }

@media (max-width: 860px) {
  .nav-links { display: none; }
  .menu-btn { display: grid; }
  .brand .presents { display: none; }
  .sec-head { grid-template-columns: 1fr; }
  .sec-head p { justify-self: start; }
  section.block { padding: 88px 0; }
  .page-head { padding-top: 48px; }
  .ranks-head, .row { grid-template-columns: 52px 72px 1fr 150px 110px; gap: 16px; }
  .row img, .row .ph { width: 72px; height: 72px; }
  .row.top { margin: 10px -14px; padding: 20px 14px; }
  .trio { grid-template-columns: 1fr; }
  .trio div, .trio div + div { padding: 22px 0; border-left: 0; border-bottom: 1px solid var(--line); }
}
@media (max-width: 560px) {
  .ranks-head { display: none; }
  .row { grid-template-columns: 44px 64px 1fr; grid-template-areas: "rank img who" "meter meter vote"; gap: 12px 14px; }
  .row.top { margin: 10px -12px; padding: 18px 12px; }
  .row .rank { grid-area: rank; font-size: 1.8rem; }
  .row img, .row .ph { grid-area: img; width: 64px; height: 64px; }
  .row .ph span { font-size: 1.8rem; }
  .row .who { grid-area: who; }
  .who h3 { font-size: 1.4rem; }
  .who p { display: none; }
  .row .meter { grid-area: meter; }
  .row .vote { grid-area: vote; min-height: 44px; min-width: 104px; padding: .6em 1.2em; font-size: .86rem; }
  .row .seat-note { grid-column: 1 / -1; }
  .row { padding: 18px 0; }
  .who .role { font-size: .72rem; }
  .fav-tag { font-size: .66rem; }
  .meter-num, .row .seat-note { font-size: .74rem; }
  .clock span { font-size: .68rem; }
  .deadline { padding: 16px; }
  .clock { width: 100%; }
  .clock div { flex: 1; min-width: 0; }
  .clock b { font-size: 1.9rem; }
  .nav-inner .btn { padding: .7em .95em; font-size: .8rem; }
  .nav-inner { gap: 10px; }
  .nav-actions { gap: 6px; }
  .more .btn { flex: 1 1 auto; }
  /* One-line promo bar and tighter vertical rhythm, so less scrolling */
  .promo { padding: 8px 12px; gap: 4px 10px; font-size: .8rem; min-height: 44px; }
  .promo .long { display: none; }
  .promo .short { display: inline; }
  .promo-cta { font-size: .68rem; letter-spacing: .05em; }
  .promo .ad { font-size: 0; }
  .promo .ad::after { content: "Ad"; font-size: .68rem; }
  .row.top > span:empty { display: none; }
  section.block { padding: 64px 0; }
  .sec-head { margin-bottom: 32px; gap: 16px; }
  .page-head { padding-top: 36px; }
  .btn { min-height: 48px; }
  .nav-inner .btn { min-height: 44px; }
  /* Comfortable tap targets for text links */
  .brand { min-height: 44px; }
  .foot-links { gap: 4px 22px; }
  .foot-links a { display: inline-flex; align-items: center; min-height: 44px; }
  footer { padding-top: 44px; }
  .wordmark { margin: 28px 0 22px; }
  .toast { bottom: calc(16px + env(safe-area-inset-bottom)); max-width: calc(100% - 32px); text-align: center; }
  .menu { padding-bottom: calc(24px + env(safe-area-inset-bottom)); }
}
@media (max-width: 430px) {
  .brand b { display: none; }
}
@media (max-width: 380px) {
  .nav-actions .xs-hide, body.live .nav-actions .make { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .dot, .brand-coin { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}
