/* tipjar. The look, layered over the base components in style.css. DESIGN.md is the contract.
   The feel of the two sites the coins are for: white and cream, light by default, Buy Me a
   Coffee's yellow on every primary button, Ko-fi's blue for links and the one emphasised word of
   a headline, a rounded friendly face for headlines. Green and red only ever mean up and down. */

:root {
  --font: 'Nunito', 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Nunito', 'Inter', ui-sans-serif, system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --r-card: 20px; --r-inner: 12px;
  --bg: #fffdf7; --surface: #ffffff; --surface-2: #f6f3ea; --line: #e9e4d8;
  --ink: #0d0c22; --muted: #6b6a7b; --accent: #ffdd00; --accent-ink: #0d0c22; --accent-text: #0b8fcf;
  --up: #16a34a; --down: #e0481c; --kofi: #13c3ff; --bmc: #ffdd00;
  color-scheme: light;
}
:root[data-theme='dark'] {
  --bg: #0d0c22; --surface: #16152e; --surface-2: #1e1d3a; --line: #2c2b4a;
  --ink: #f8f7ff; --muted: #a09fb8; --accent: #ffdd00; --accent-ink: #0d0c22; --accent-text: #4fd1ff;
  --up: #2dd36f; --down: #ff6a3d;
  color-scheme: dark;
}
body { background: var(--bg); font-family: var(--font); }
a:not(.btn):not(.btn-secondary):not(.card):not(.wordmark):not(.tag):not(.chip):not([class*='btn']) { color: var(--accent-text); }
.tape a, .jar a, .nav a, .foot-right a, .wm { color: inherit; }

/* ---------- type ---------- */
.display { font-family: var(--font-display); font-weight: 800; text-transform: none; letter-spacing: -0.03em; line-height: 1.02; }
.display em { font-style: normal; color: var(--accent-text); }
.eyebrow { font-family: var(--font-mono); font-size: 11px; line-height: 16px; font-weight: 500; letter-spacing: 0.1em; }
.section-head h2, .band h2 { font-size: 46px; }
.section-head { justify-items: center; text-align: center; }
.section-head p { margin-inline: auto; }
.page-h { font-family: var(--font-display); font-weight: 800; font-size: 42px; line-height: 46px; letter-spacing: -0.03em; }
.page-h em { font-style: normal; color: var(--accent-text); }
.lede { font-size: 18px; line-height: 28px; color: var(--muted); max-width: 58ch; }
h1, h2, h3, b, strong { font-weight: 800; }

/* ---------- controls: pills ---------- */
.btn, .btn-secondary, .btn-ghost { border-radius: var(--r-pill); }
.btn { font-weight: 700; }
.btn-secondary { background: transparent; border-color: var(--line); }
.btn-secondary:hover { border-color: var(--ink); }
.tabs { border-radius: var(--r-pill); }
.tabs button { border-radius: var(--r-pill); }
.tabs button[aria-selected='true'] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.pill, .icon-btn { border-radius: var(--r-pill); background: transparent; }
.meter > i { background: var(--up); }
.chip { font-family: var(--font-mono); font-weight: 500; }
.chip-on { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); }
.input, .textarea, .input.ro { border-radius: var(--r-inner); }
.pl i { width: 7px; height: 7px; }
.pl.kofi i { background: var(--kofi); } .pl.bmc i { background: var(--bmc); }

/* ---------- header, tape, footer ---------- */
.header { background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.wordmark { gap: 10px; }
.wordmark img { border-radius: 8px; }
.wm { display: inline-flex; align-items: baseline; font-size: 19px; font-weight: 800; letter-spacing: -0.03em; }
.wm em { font-style: normal; font-weight: 800; color: var(--accent-text); }
.nav a { border-radius: var(--r-pill); }

.tape { border-bottom: 1px solid var(--line); overflow: hidden; }
.tape-run { display: flex; width: max-content; animation: tape 80s linear infinite; }
.tape:hover .tape-run { animation-play-state: paused; }
.tape-set { display: flex; }
.tape a { display: inline-flex; align-items: center; gap: var(--s2); height: 34px; padding: 0 var(--s4); border-right: 1px solid var(--line); font: 500 12px/16px var(--font-mono); white-space: nowrap; }
.tape a b { font-weight: 700; }
.tape a:hover b { color: var(--accent-text); }
@keyframes tape { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .tape-run { animation: none; } }

.footer .container { align-items: flex-start; padding-block: var(--s5); }
.foot-col { display: grid; gap: var(--s2); max-width: 52ch; }
.foot-right { text-align: right; justify-items: end; }
.footer a { text-decoration: underline; text-underline-offset: 2px; }

/* ---------- home: hero ---------- */
.home-hero { display: grid; justify-items: center; text-align: center; gap: var(--s5); padding-top: var(--s6); }
.home-hero h1 { font-size: clamp(44px, 6.4vw, 84px); line-height: 1.02; max-width: 16ch; }
.premise { width: 100%; max-width: 680px; display: flex; gap: var(--s2); padding: 6px; border: 1px solid var(--line); border-radius: var(--r-pill); background: var(--surface); transition: border-color 120ms; }
.premise:focus-within { border-color: var(--accent-text); }
.premise input { flex: 1; min-width: 0; height: 48px; padding: 0 var(--s4); background: none; border: 0; outline: none; font-size: 16px; }
.premise input::placeholder { color: var(--muted); }
.premise .btn { flex: none; }
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--s2); }
.chip-btn { height: 32px; padding: 0 14px; border-radius: var(--r-pill); border: 1px solid var(--line); font: 500 13px/1 var(--font-mono); color: var(--muted); white-space: nowrap; display: inline-flex; align-items: center; gap: 8px; transition: border-color 120ms, color 120ms; }
.chip-btn:hover { color: var(--ink); border-color: var(--muted); }

/* The jar: the coins that exist, as a row of round pictures on one baseline. Real coins only. */
.jar { width: 100%; max-width: 980px; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: var(--s3); align-items: end; margin-top: var(--s2); }
.jar a { display: grid; justify-items: center; gap: var(--s2); min-width: 0; }
.jar .coin-pic { width: 100%; aspect-ratio: 1; border-radius: 50%; border: 1px solid var(--line); background: var(--surface-2); overflow: hidden; }
.jar .coin-pic img { width: 100%; height: 100%; object-fit: cover; }
.jar a:nth-child(3) .coin-pic, .jar a:nth-child(4) .coin-pic { transform: scale(1.12); transform-origin: bottom; }
.jar .tick { text-align: center; }
.jar-note { font: 500 11px/16px var(--font-mono); letter-spacing: 0.06em; color: var(--muted); }

.home-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-block: 1px solid var(--line); }
.home-stats > div { display: grid; justify-items: center; gap: var(--s1); padding: var(--s5) var(--s3); border-left: 1px solid var(--line); text-align: center; }
.home-stats > div:first-child { border-left: 0; }
.home-stats b { font-family: var(--font-display); font-weight: 800; font-size: 44px; line-height: 48px; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }

/* ---------- board card ---------- */
.card.coin { border-radius: var(--r-card); gap: var(--s3); }
.card.coin:hover { border-color: var(--muted); }
.coin-pic-sq { aspect-ratio: 1; border-radius: 14px; overflow: hidden; background: var(--surface-2); border: 1px solid var(--line); position: relative; }
.coin-pic-sq img { width: 100%; height: 100%; object-fit: cover; }
.coin-pic-sq .ph { width: 100%; height: 100%; display: grid; place-items: center; font: 400 64px/1 var(--font-display); color: var(--muted); }
.coin-pic-sq .tag { position: absolute; left: 8px; top: 8px; height: 22px; padding: 0 8px; border-radius: var(--r-pill); display: inline-flex; align-items: center; gap: 6px; font: 500 11px/1 var(--font-mono); background: color-mix(in srgb, var(--bg) 78%, transparent); backdrop-filter: blur(6px); color: var(--ink); }
.coin-pic-sq .tag.claimed { background: var(--accent); color: var(--accent-ink); }
.inf-title b { font-size: 16px; line-height: 22px; }
.tick { font: 500 12px/16px var(--font-mono); color: var(--muted); white-space: nowrap; }
.for { display: flex; align-items: center; gap: 8px; font-size: 13px; line-height: 18px; color: var(--muted); min-width: 0; }
.for img { width: 20px; height: 20px; border-radius: 50%; object-fit: cover; flex: none; }
.quote { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s2); margin-top: auto; padding-top: var(--s2); }
.quote-v { display: block; font-size: 20px; line-height: 24px; font-weight: 700; letter-spacing: -0.01em; }
.quote-l { display: block; font-size: 11px; line-height: 14px; color: var(--muted); }
.delta { height: 24px; padding: 0 8px; border-radius: var(--r-pill); display: inline-flex; align-items: center; font: 700 12px/16px var(--font-mono); background: color-mix(in srgb, currentColor 12%, transparent); }
.curve-line { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: var(--s2); font-size: 11px; line-height: 14px; color: var(--muted); }
.curve-line .meter { height: 4px; margin: 0; }

/* ---------- home: how it works ---------- */
.how { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s4); }
.how > li { display: grid; grid-template-rows: auto auto 1fr auto; gap: var(--s3); padding: var(--s5); border: 1px solid var(--line); border-radius: var(--r-card); background: var(--surface); }
.how .n { font: 500 12px/16px var(--font-mono); color: var(--accent-text); letter-spacing: 0.1em; }
.how h3 { font-family: var(--font-display); font-weight: 800; font-size: 30px; line-height: 32px; letter-spacing: -0.01em; }
.how p { color: var(--muted); font-size: 14px; line-height: 20px; }
.how .demo { min-height: 72px; display: grid; align-content: center; gap: 6px; padding: var(--s3) var(--s4); border-radius: var(--r-inner); background: var(--surface-2); font: 500 12px/16px var(--font-mono); }
.how .demo .row { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); }
.how .demo .ok::before { content: '\2713'; color: var(--up); font-weight: 700; margin-right: 6px; }
.how .demo code { color: var(--accent-text); }

/* ---------- the fee split ---------- */
.fee-card { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s6); align-items: center; padding: var(--s6); border-radius: var(--r-card); }
.fee-copy { display: grid; gap: var(--s3); }
.fee-copy h2 { font-size: 44px; }
.fee-copy p { color: var(--muted); }
.splitter { display: grid; gap: var(--s4); }
.splitbar { display: flex; height: 44px; border-radius: var(--r-inner); overflow: hidden; border: 1px solid var(--line); }
.splitbar > i { display: block; min-width: 2px; }
.seg-protocol { background: var(--surface-2); }
.seg-platform { background: var(--muted); }
.seg-creator { background: var(--accent); }
.legend { display: grid; }
.legend > div { display: grid; grid-template-columns: 12px minmax(0, 1fr) auto; align-items: center; gap: var(--s3); padding: 10px 0; border-top: 1px solid var(--line); font-size: 14px; line-height: 20px; }
.legend > div:first-child { border-top: 0; }
.legend i { width: 12px; height: 12px; border-radius: 4px; border: 1px solid var(--line); }
.legend dd { font: 700 13px/18px var(--font-mono); }
.legend small { display: block; font-size: 12px; line-height: 16px; color: var(--muted); }

.details { border-radius: var(--r-card); }
.band { border-radius: var(--r-card); }
.band h2 { font-size: clamp(40px, 6vw, 80px); }

/* ---------- launch, creators ---------- */
.sign { display: grid; border: 1px solid var(--line); border-radius: var(--r-inner); }
.sign > div { display: flex; justify-content: space-between; gap: var(--s4); padding: 10px var(--s4); border-top: 1px solid var(--line); font-size: 13px; line-height: 18px; }
.sign > div:first-child { border-top: 0; }
.sign dt { color: var(--muted); }
.sign dd { font-weight: 600; text-align: right; overflow-wrap: anywhere; }
.code code { font-family: var(--font-mono); color: var(--accent-text); }
.steps-v li[data-done='true']::before { background: var(--up); border-color: var(--up); color: #fff; }

/* ---------- coin page ---------- */
.ident-text h1 { font-family: var(--font-display); font-weight: 800; letter-spacing: -0.02em; font-size: 40px; line-height: 44px; }
.chart-price { font-family: var(--font-display); font-weight: 800; }
.avatar { border-radius: 16px; }

/* ---------- responsive ---------- */
@media (max-width: 1099px) { .how { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 959px) {
  .fee-card { grid-template-columns: minmax(0, 1fr); padding: var(--s5); gap: var(--s5); }
  .fee-copy h2 { font-size: 36px; }
}
@media (max-width: 819px) {
  .section-head h2, .band h2 { font-size: 40px; }
  .home-stats b { font-size: 32px; line-height: 36px; }
  .foot-right { text-align: left; justify-items: start; }
  .jar { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .jar a:nth-child(n+5) { display: none; }
  .jar a:nth-child(3) .coin-pic, .jar a:nth-child(4) .coin-pic { transform: none; }
  .jar a:nth-child(2) .coin-pic, .jar a:nth-child(3) .coin-pic { transform: scale(1.1); transform-origin: bottom; }
}
@media (max-width: 639px) {
  .how { grid-template-columns: minmax(0, 1fr); }
  .premise { flex-direction: column; border-radius: var(--r-card); padding: var(--s2); }
  .premise .btn { width: 100%; }
  .premise input { text-align: center; }
  .lede { font-size: 16px; line-height: 24px; }
  .home-stats > div { padding: var(--s4) var(--s1); }
  .home-stats b { font-size: 26px; line-height: 30px; }
  .how > li { padding: var(--s4); }
  .wordmark .wm, .wordmark .wm span { display: none; }
  .footer .wm, .footer .wm span { display: inline-flex; }
  .chart-price { font-size: 26px; }
  .ident-text h1 { font-size: 30px; line-height: 34px; }
  .page-h { font-size: 34px; line-height: 36px; }
  .header .btn, .header .btn-secondary { padding: 0 14px; height: 38px; font-size: 14px; }
  .header .btn-sm { height: 36px; padding: 0 12px; }
  .header button.pill { max-width: 104px; font-size: 12px; padding: 0 10px; }
}
@media (max-width: 767px) { .header .wide, #theme { display: none; } }
@media (max-width: 359px) {
  .header .container { gap: 6px; }
  .nav a { padding: 0 5px; font-size: 13px; }
  .header .btn, .header .btn-secondary, .header .btn-sm { padding: 0 10px; font-size: 13px; }
}

/* demo rows never wrap; the first cell gives way */
.how .demo .row > :first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.how .demo .row > :last-child { flex: none; white-space: nowrap; }
.seg-protocol { background: var(--line); }
.btn.act { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
button.link { color: var(--accent-text); text-decoration: underline; text-underline-offset: 2px; font: inherit; }

/* ---------- operator ---------- */
.op-row { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) auto; gap: var(--s4); align-items: center; padding: var(--s3) 0; border-top: 1px solid var(--line); }
.op-row:first-child { border-top: 0; }
.op-main { display: grid; gap: 2px; min-width: 0; }
.op-main b { font-size: 15px; line-height: 20px; }
.op-main a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.op-num { display: grid; gap: 2px; }
.op-num b { font-size: 17px; line-height: 22px; }
.op-act { display: flex; gap: var(--s2); flex-wrap: wrap; justify-content: flex-end; }
.op-form .input { height: 32px; font-size: 13px; }
@media (max-width: 819px) { .op-row { grid-template-columns: minmax(0, 1fr); } .op-act { justify-content: flex-start; } }

/* The mark: the supplied cup, black on nothing; white on the dark theme. */
.wordmark img.mark { border-radius: 0; }
:root[data-theme='dark'] .wordmark img.mark { filter: invert(1); }
