/* ==========================================================================
   Blockchain theme for the autosurf script ("Ledger light")
   Same light palette as the solar theme (white, leaf green, sky blue, sun
   orange) re-cut for an ad network that runs on-chain: isometric blocks,
   node lattices, mono hashes. Solar power stays as one small accent (the sun).
   Layout concept: white "block" surfaces on a faint isometric lattice; green
   for actions and confirmed blocks, blue for the chain and information,
   orange only for the sun, warnings and money due.
   Uses the SAME class names as design/assets/css/theme.css, so the PHP
   templates work with either theme; blockchain-only extras are at the end.
   No framework. ~24 KB unminified. Fonts: see README (self-host in production).
   ========================================================================== */

:root {
  /* --- Palette ---------------------------------------------------------- */
  --c-bg:         #F4F8FC;  /* page ground: cool morning white */
  --c-surface:    #FFFFFF;  /* panels, header */
  --c-surface-2:  #F5F9FD;  /* zebra rows, inset areas (blue-tinted white) */
  --c-ink:        #0F2A3D;  /* main text: deep chain navy */
  --c-ink-soft:   #4A6274;  /* secondary text */
  --c-ink-faint:  #7C91A1;  /* captions, placeholders */
  --c-line:       #DCE6EF;  /* borders, rules */
  --c-line-strong:#C2D2DF;

  --c-leaf:       #1E9A55;  /* primary actions, confirmed blocks */
  --c-leaf-deep:  #147842;
  --c-leaf-soft:  #E2F4E9;
  --c-sky:        #1C7BCB;  /* the chain, info, links */
  --c-sky-deep:   #13609F;
  --c-sky-soft:   #E3F0FA;
  --c-sun:        #F28A1B;  /* the sun, warnings, money due */
  --c-sun-deep:   #B85D06;
  --c-sun-soft:   #FFF0DD;
  --c-danger:     #CF3F36;
  --c-danger-soft:#FCE9E7;

  --c-night:      #0E2233;  /* footer, admin sidebar, toasts */
  --c-night-2:    #17344A;
  --c-night-ink:  #C9D8E4;

  --g-sun:  linear-gradient(135deg, #FFB23F 0%, #F28A1B 100%);
  --g-leaf: linear-gradient(180deg, #27AE62 0%, #1A8D4D 100%);
  --g-sky:  linear-gradient(180deg, #E1EFFA 0%, #F4F8FC 100%);
  --g-chain: linear-gradient(90deg, var(--c-leaf), var(--c-sky));

  /* Faint isometric lattice used behind the hero and auth pages */
  --lattice: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='32' viewBox='0 0 56 32'%3E%3Cpath d='M0 16L28 0l28 16-28 16z' fill='none' stroke='%231C7BCB' stroke-opacity='.09'/%3E%3C/svg%3E");

  /* --- Type ------------------------------------------------------------- */
  --f-display: "Sora", "Segoe UI", system-ui, sans-serif;
  --f-body:    "Figtree", "Segoe UI", system-ui, -apple-system, sans-serif;
  --f-mono:    "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --fs-xs: .75rem; --fs-sm: .875rem; --fs-md: 1rem; --fs-lg: 1.125rem;
  --fs-xl: 1.375rem; --fs-2xl: 1.75rem; --fs-3xl: clamp(2rem, 4.4vw, 3.4rem);

  /* --- Shape & space ---------------------------------------------------- */
  --r-sm: 6px; --r-md: 9px; --r-lg: 14px; --r-pill: 999px;
  --sh-1: 0 1px 2px rgba(15,42,61,.06), 0 1px 1px rgba(15,42,61,.04);
  --sh-2: 0 10px 28px -10px rgba(15,42,61,.22);
  --gap: 1rem;
  --wrap: 1180px;
  --side: max(16px, env(safe-area-inset-left, 0px));
  --side-r: max(16px, env(safe-area-inset-right, 0px));
  --header-h: 64px;
}

/* ---------- Base ---------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--c-bg); color: var(--c-ink);
  font: 400 var(--fs-md)/1.6 var(--f-body);
  -webkit-font-smoothing: antialiased;
}
img, svg, canvas { max-width: 100%; }
img { height: auto; }
a { color: var(--c-sky-deep); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--c-leaf-deep); }
h1, h2, h3, h4 { font-family: var(--f-display); line-height: 1.15; margin: 0 0 .5em; text-wrap: balance; letter-spacing: -.02em; }
h1 { font-size: var(--fs-3xl); font-weight: 700; letter-spacing: -.035em; }
h2 { font-size: var(--fs-2xl); font-weight: 650; }
h3 { font-size: var(--fs-xl); font-weight: 600; }
h4 { font-size: var(--fs-lg); font-weight: 600; }
p { margin: 0 0 1em; }
code, .mono { font-family: var(--f-mono); font-size: .9em; }
.num { font-variant-numeric: tabular-nums; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--c-sky) 55%, transparent); outline-offset: 2px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--c-ink-soft); }
.faint { color: var(--c-ink-faint); font-size: var(--fs-sm); }
/* Eyebrow reads like a block label: mono, with a small cube marker */
.eyebrow { display: inline-flex; align-items: center; gap: .5rem; font: 600 var(--fs-xs)/1 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--c-sky-deep); }
.eyebrow::before { content: ""; width: 9px; height: 9px; background: var(--c-leaf); transform: rotate(45deg); border-radius: 2px; flex: none; }

.wrap { max-width: var(--wrap); margin-inline: auto; padding-left: var(--side); padding-right: var(--side-r); }
.stack { display: flex; flex-direction: column; gap: var(--gap); }
.row { display: flex; flex-wrap: wrap; gap: var(--gap); align-items: center; }
.row-between { display: flex; flex-wrap: wrap; gap: var(--gap); align-items: center; justify-content: space-between; }
.grid { display: grid; gap: var(--gap); grid-template-columns: repeat(auto-fit, minmax(min(100%, var(--min, 220px)), 1fr)); }
.grid > *, .row > * { min-width: 0; }

/* ---------- Logo (admin-uploaded transparent PNG, with fallback mark) ---- */
.logo { display: inline-flex; align-items: center; gap: .55rem; text-decoration: none; color: var(--c-ink); }
[hidden] { display: none !important; }
.logo img { display: block; height: var(--logo-h, 40px); width: auto; max-width: 220px; object-fit: contain; }
.logo-mark { width: 34px; height: 34px; flex: none; }
.logo-text { font: 700 1.25rem/1 var(--f-display); letter-spacing: -.03em; }
.logo-text b { color: var(--c-sky); font-weight: 700; }

/* ---------- Header / nav --------------------------------------------------- */
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 60; background: var(--c-surface); }
.site-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50;
  background: color-mix(in srgb, var(--c-surface) 92%, transparent);
  backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--c-line);
}
.site-header .wrap { display: flex; align-items: center; gap: 1rem; min-height: var(--header-h); }
.nav { display: flex; align-items: center; gap: .25rem; margin-left: auto; }
.nav a { padding: .5rem .75rem; border-radius: var(--r-sm); color: var(--c-ink-soft); text-decoration: none; font-weight: 600; font-size: var(--fs-sm); }
.nav a:hover, .nav a[aria-current="page"] { color: var(--c-sky-deep); background: var(--c-sky-soft); }
.nav-actions { display: flex; gap: .5rem; align-items: center; }
.nav-toggle { display: none; margin-left: auto; background: none; border: 1px solid var(--c-line); border-radius: var(--r-sm); padding: .45rem .6rem; color: var(--c-ink); cursor: pointer; }
@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }
  .site-header .wrap { flex-wrap: wrap; }
  .nav, .nav-actions { display: none; width: 100%; }
  .site-header.is-open .nav { display: flex; flex-direction: column; align-items: stretch; margin: 0; padding-bottom: .5rem; }
  .site-header.is-open .nav-actions { display: flex; padding-bottom: 1rem; }
  .site-header.is-open .nav-actions .btn { flex: 1; }
}

/* ---------- Buttons: solid "blocks" with a little depth ------------------- */
.btn {
  --b-bg: var(--c-surface); --b-fg: var(--c-ink); --b-bd: var(--c-line-strong); --b-depth: var(--c-line-strong);
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  padding: .62rem 1.1rem; border-radius: var(--r-md);
  border: 1px solid var(--b-bd); background: var(--b-bg); color: var(--b-fg);
  box-shadow: 0 2px 0 var(--b-depth);
  font: 700 var(--fs-sm)/1.2 var(--f-body); text-decoration: none; cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease, background .15s ease;
  white-space: nowrap;
}
.btn:hover { color: var(--b-fg); transform: translateY(-1px); box-shadow: 0 3px 0 var(--b-depth), var(--sh-2); }
.btn:active { transform: translateY(2px); box-shadow: 0 0 0 var(--b-depth); }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btn-primary { --b-bg: var(--c-leaf); --b-fg: #fff; --b-bd: #1A8D4D; --b-depth: #116A3A; background: var(--g-leaf); }
.btn-sun     { --b-bg: var(--c-sun); --b-fg: #3A1D00; --b-bd: #E07B10; --b-depth: #B85D06; background: var(--g-sun); }
.btn-sky     { --b-bg: var(--c-sky); --b-fg: #fff; --b-bd: var(--c-sky); --b-depth: #0E4C80; }
.btn-ghost   { --b-bg: transparent; --b-bd: transparent; --b-fg: var(--c-sky-deep); --b-depth: transparent; }
.btn-danger  { --b-bg: var(--c-surface); --b-fg: var(--c-danger); --b-bd: color-mix(in srgb, var(--c-danger) 40%, white); --b-depth: color-mix(in srgb, var(--c-danger) 30%, white); }
.btn-sm { padding: .4rem .75rem; font-size: var(--fs-xs); border-radius: var(--r-sm); }
.btn-lg { padding: .85rem 1.5rem; font-size: var(--fs-md); }
.btn-block { width: 100%; }

/* ---------- Panels / cards ----------------------------------------------- */
.panel { background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--r-lg); padding: 1.25rem; box-shadow: var(--sh-1); min-width: 0; }
.panel > h3:first-child, .panel > h4:first-child { margin-top: 0; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: .9rem; flex-wrap: wrap; }
.panel-head h3, .panel-head h4 { margin: 0; }
.panel-flat { background: var(--c-surface-2); box-shadow: none; }

/* Stat tile */
.stat { display: flex; flex-direction: column; gap: .2rem; }
.stat-label { font: 600 var(--fs-xs)/1.3 var(--f-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--c-ink-soft); }
.stat-value { font: 700 var(--fs-2xl)/1.1 var(--f-display); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.stat-sub { font-size: var(--fs-sm); color: var(--c-ink-soft); }
.stat-up { color: var(--c-leaf-deep); font-weight: 700; }
.stat-down { color: var(--c-danger); font-weight: 700; }

/* Coin balance tile: coins are hexagons here (blocks, not discs) */
.coin { display: flex; gap: .8rem; align-items: center; }
.coin-icon { width: 40px; height: 44px; clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); display: grid; place-items: center; font: 700 .62rem/1 var(--f-mono); color: #fff; flex: none; }
.coin-usdt { background: #26A17B; } .coin-btc { background: #F7931A; } .coin-ltc { background: #345D9D; } .coin-trx { background: #D9302D; } .coin-bnb { background: #D4A208; } .coin-eth { background: #627EEA; }

/* ---------- Badges / pills ------------------------------------------------ */
.badge { display: inline-flex; align-items: center; gap: .35rem; padding: .18rem .55rem; border-radius: var(--r-sm); font-size: var(--fs-xs); font-weight: 700; background: var(--c-surface-2); color: var(--c-ink-soft); border: 1px solid var(--c-line); white-space: nowrap; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 1px; transform: rotate(45deg); background: currentColor; opacity: .85; }
.badge-ok      { background: var(--c-leaf-soft); color: var(--c-leaf-deep); border-color: transparent; }
.badge-info    { background: var(--c-sky-soft);  color: var(--c-sky-deep);  border-color: transparent; }
.badge-warn    { background: var(--c-sun-soft);  color: var(--c-sun-deep);  border-color: transparent; }
.badge-danger  { background: var(--c-danger-soft); color: var(--c-danger); border-color: transparent; }
.badge-plain::before { display: none; }

/* ---------- Alerts -------------------------------------------------------- */
.alert { display: flex; gap: .8rem; align-items: flex-start; padding: .9rem 1rem; border-radius: var(--r-md); border: 1px solid; font-size: var(--fs-sm); }
.alert > svg { flex: none; width: 22px; height: 22px; margin-top: 1px; }
.alert strong { display: block; font-size: var(--fs-md); margin-bottom: .15rem; }
.alert-info   { background: var(--c-sky-soft);  border-color: color-mix(in srgb, var(--c-sky) 30%, white);  color: var(--c-sky-deep); }
.alert-ok     { background: var(--c-leaf-soft); border-color: color-mix(in srgb, var(--c-leaf) 30%, white); color: var(--c-leaf-deep); }
.alert-warn   { background: var(--c-sun-soft);  border-color: color-mix(in srgb, var(--c-sun) 45%, white);  color: #7A3E04; }
.alert-danger { background: var(--c-danger-soft); border-color: color-mix(in srgb, var(--c-danger) 35%, white); color: #8E2620; }
/* The "send the EXACT amount" warning (feature 25): loud on purpose */
.alert-exact { border-width: 2px; border-color: var(--c-sun); background: repeating-linear-gradient(-45deg, var(--c-sun-soft) 0 14px, #FFE7C7 14px 28px); color: #6A3503; }
.alert-exact strong { font-size: var(--fs-lg); }

/* ---------- Forms --------------------------------------------------------- */
.field { display: flex; flex-direction: column; gap: .35rem; min-width: 0; }
.field label, .label { font-size: var(--fs-sm); font-weight: 700; color: var(--c-ink); }
.field .hint { font-size: var(--fs-xs); color: var(--c-ink-faint); }
.field .error { font-size: var(--fs-xs); color: var(--c-danger); font-weight: 700; }
.input, .select, .textarea {
  width: 100%; padding: .65rem .8rem; border-radius: var(--r-md);
  border: 1px solid var(--c-line-strong); background: var(--c-surface); color: var(--c-ink);
  font: inherit; font-size: var(--fs-sm);
}
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--c-sky); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c-sky) 20%, transparent); }
.input[aria-invalid="true"] { border-color: var(--c-danger); }
.textarea { min-height: 110px; resize: vertical; }
.input-group { display: flex; min-width: 0; }
.input-group .input { border-radius: var(--r-md) 0 0 var(--r-md); min-width: 0; }
.input-group .btn { border-radius: 0 var(--r-md) var(--r-md) 0; box-shadow: none; transform: none; }
.check { display: flex; gap: .55rem; align-items: center; font-size: var(--fs-sm); }
.check input { accent-color: var(--c-leaf); width: 18px; height: 18px; }
/* Toggle switch: <label class="switch"><input type="checkbox"><span></span> Text</label> */
.switch { display: inline-flex; align-items: center; gap: .6rem; cursor: pointer; font-size: var(--fs-sm); font-weight: 600; }
.switch input { position: absolute; opacity: 0; }
.switch span { width: 40px; height: 22px; border-radius: 7px; background: var(--c-line-strong); position: relative; transition: background .2s; flex: none; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 4px; background: #fff; box-shadow: var(--sh-1); transition: transform .2s; }
.switch input:checked + span { background: var(--c-leaf); }
.switch input:checked + span::after { transform: translateX(18px); }
.switch input:focus-visible + span { outline: 3px solid color-mix(in srgb, var(--c-sky) 55%, transparent); outline-offset: 2px; }
.form-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }

/* Social / wallet sign-in buttons */
.auth-btn { display: flex; align-items: center; justify-content: center; gap: .6rem; width: 100%; padding: .7rem 1rem; border-radius: var(--r-md); border: 1px solid var(--c-line-strong); background: var(--c-surface); font: 700 var(--fs-sm)/1.2 var(--f-body); color: var(--c-ink); cursor: pointer; }
.auth-btn:hover { border-color: var(--c-sky); background: var(--c-surface-2); }
.auth-btn svg { width: 20px; height: 20px; }
.divider { display: flex; align-items: center; gap: .75rem; color: var(--c-ink-faint); font: 500 var(--fs-xs)/1 var(--f-mono); text-transform: uppercase; letter-spacing: .08em; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--c-line); }

/* ---------- Tables -------------------------------------------------------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--c-line); border-radius: var(--r-md); background: var(--c-surface); }
.table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.table th { text-align: left; font: 600 var(--fs-xs)/1.2 var(--f-mono); letter-spacing: .05em; text-transform: uppercase; color: var(--c-ink-soft); background: var(--c-surface-2); padding: .65rem .85rem; border-bottom: 1px solid var(--c-line); white-space: nowrap; }
.table td { padding: .7rem .85rem; border-bottom: 1px solid var(--c-line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: color-mix(in srgb, var(--c-sky-soft) 50%, white); }
.table .r { text-align: right; font-variant-numeric: tabular-nums; }
.hash { font-family: var(--f-mono); font-size: var(--fs-xs); color: var(--c-sky-deep); }

/* Progress (qualifying days, surf goal): segmented like blocks */
.progress { height: 8px; border-radius: 3px; background: var(--c-line); overflow: hidden; }
.progress > i { display: block; height: 100%; width: var(--p, 0%); border-radius: inherit; background: var(--g-chain); position: relative;
  -webkit-mask: repeating-linear-gradient(90deg, #000 0 10px, transparent 10px 12px); mask: repeating-linear-gradient(90deg, #000 0 10px, transparent 10px 12px); }
.progress-sun > i { background: var(--g-sun); }

/* Pagination & tabs */
.pager { display: flex; gap: .3rem; flex-wrap: wrap; }
.pager a, .pager span { min-width: 36px; padding: .4rem .6rem; text-align: center; border-radius: var(--r-sm); border: 1px solid var(--c-line); background: var(--c-surface); text-decoration: none; color: var(--c-ink-soft); font-weight: 700; font-size: var(--fs-sm); }
.pager [aria-current] { background: var(--c-sky); color: #fff; border-color: var(--c-sky); }
.tabs { display: flex; gap: .25rem; border-bottom: 1px solid var(--c-line); overflow-x: auto; scrollbar-width: none; }
.tabs a, .tabs button { padding: .7rem 1rem; border: 0; background: none; font: 700 var(--fs-sm)/1 var(--f-body); color: var(--c-ink-soft); text-decoration: none; border-bottom: 3px solid transparent; white-space: nowrap; cursor: pointer; }
.tabs [aria-selected="true"], .tabs [aria-current] { color: var(--c-sky-deep); border-bottom-color: var(--c-sky); }

/* ---------- Banner zones (feature 3, 18) -----------------------------------
   Same zones and rules as the solar theme: a zone is printed ONLY when it has
   at least one active banner, so no empty boxes. Any size works via --w / --h.
   -------------------------------------------------------------------------- */
.ad-slot { --w: 468; --h: 60; position: relative; display: block; flex: none; width: calc(var(--w) * 1px); max-width: 100%; aspect-ratio: var(--w) / var(--h); margin-inline: auto; border-radius: var(--r-sm); overflow: hidden; background: var(--c-surface-2); }
.ad-slot > a { display: block; width: 100%; height: 100%; }
.ad-slot img { display: block; width: 100%; height: 100%; object-fit: contain; }
.ad-slot::after { content: "Ad"; position: absolute; top: 3px; right: 3px; padding: 0 .3rem; font: 600 9px/1.5 var(--f-mono); letter-spacing: .05em; color: var(--c-ink-faint); background: rgba(255,255,255,.88); border-radius: 3px; pointer-events: none; }
.ad-728 { --w: 728; --h: 90; } .ad-468 { --w: 468; --h: 60; } .ad-300 { --w: 300; --h: 250; } .ad-160 { --w: 160; --h: 600; } .ad-125 { --w: 125; --h: 125; } .ad-120 { --w: 120; --h: 600; }
.ad-text { width: auto; aspect-ratio: auto; padding: .75rem 1rem; font-size: var(--fs-sm); border: 1px solid var(--c-line); }
.ad-rotator > :not(.is-active) { display: none; }
.ad-rotator > .is-active { animation: ad-fade .6s ease; }
@keyframes ad-fade { from { opacity: 0; } to { opacity: 1; } }

.ad-zone { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: .75rem; }
.ad-zone > * { min-width: 0; }
.ad-zone > .ad-rotator { width: 100%; }
.ad-zone-inline, .ad-zone-surf, .ad-zone-box, .ad-zone-side { width: 100%; }
.ad-zone-top, .ad-zone-bottom { padding-block: .9rem; }
.ad-zone-top { border-bottom: 1px solid var(--c-line); background: var(--c-surface); }
.ad-zone-inline { padding-block: .5rem; }
.ad-zone-buttons { gap: .6rem; }
.ad-zone-box { flex-direction: column; }
.ad-zone-side { flex-direction: column; padding: .5rem 0; }
.ad-rail { position: fixed; top: calc(env(safe-area-inset-top, 0px) + var(--header-h) + 24px); z-index: 5; display: none; flex-direction: column; gap: .75rem; }
.ad-rail-left { right: calc(50% + var(--wrap) / 2 + 12px); }
.ad-rail-right { left: calc(50% + var(--wrap) / 2 + 12px); }
@media (min-width: 1560px) { .ad-rail { display: flex; } }
@media (max-width: 960px) { .ad-zone-side { display: none; } }

/* ---------- Public site --------------------------------------------------- */
.hero { position: relative; background: var(--lattice) center top / 56px 32px, var(--g-sky); overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: 1fr 1.08fr; gap: 2.25rem; align-items: center; padding-block: 3.25rem 2.75rem; }
.hero h1 span { color: var(--c-sky); }
.hero h1 em { font-style: normal; color: var(--c-leaf); }
.hero-lead { font-size: var(--fs-lg); color: var(--c-ink-soft); max-width: 34rem; }
.hero-scene { position: relative; aspect-ratio: 5 / 3.4; width: 100%; border-radius: 20px; overflow: hidden; background: linear-gradient(#E6F2FB, #FAFCFE 75%); border: 1px solid var(--c-line); box-shadow: var(--sh-2); }
.hero-scene canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
@media (max-width: 860px) { .hero .wrap { grid-template-columns: 1fr; padding-block: 2rem 1.5rem; } }

.trust-row { display: flex; flex-wrap: wrap; gap: 1.25rem; margin-top: 1.25rem; font-size: var(--fs-sm); color: var(--c-ink-soft); }
.trust-row span { display: inline-flex; align-items: center; gap: .4rem; }
.trust-row svg { width: 18px; height: 18px; color: var(--c-sky); }

.counter-strip { background: var(--c-surface); border-block: 1px solid var(--c-line); }
.counter-strip .wrap { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; padding-block: 1.25rem; }
.counter-strip .stat { align-items: center; text-align: center; }
.counter-strip .stat + .stat { border-left: 1px dashed var(--c-line-strong); }
@media (max-width: 640px) { .counter-strip .wrap { grid-template-columns: repeat(2, 1fr); } .counter-strip .stat:nth-child(3) { border-left: 0; } }

.section { padding-block: 3.5rem; }
.section-head { max-width: 42rem; margin-bottom: 2rem; }
.step { display: flex; flex-direction: column; gap: .6rem; }
.step-icon { width: 52px; height: 58px; clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); display: grid; place-items: center; }
.step-icon svg { width: 26px; height: 26px; }
.step-icon.leaf { background: var(--c-leaf-soft); color: var(--c-leaf-deep); }
.step-icon.sky { background: var(--c-sky-soft); color: var(--c-sky-deep); }
.step-icon.sun { background: var(--c-sun-soft); color: var(--c-sun-deep); }

.plan { display: flex; flex-direction: column; gap: .75rem; }
.plan-price { font: 700 var(--fs-2xl)/1 var(--f-display); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.plan-price small { font: 600 var(--fs-sm) var(--f-body); letter-spacing: 0; color: var(--c-ink-soft); }
.plan ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .45rem; font-size: var(--fs-sm); }
.plan li { display: flex; gap: .5rem; } .plan li::before { content: ""; flex: none; width: 16px; height: 16px; margin-top: 3px; border-radius: 4px; background: var(--c-leaf-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.5 2.5L12 5.5' fill='none' stroke='%23147842' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") center/12px no-repeat; }
.plan.is-featured { border: 2px solid var(--c-sky); position: relative; }
.plan .ribbon { position: absolute; top: -12px; left: 1.25rem; }

.site-footer { position: relative; margin-top: 3rem; background: var(--c-night); color: var(--c-night-ink); }
.site-footer a { color: #E6F0F7; text-decoration: none; }
.site-footer a:hover { color: #FFC879; }
.footer-scene { display: block; width: 100%; height: 96px; background: var(--c-bg); }
.site-footer .wrap { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 2rem; padding-block: 2.5rem 1.5rem; }
.site-footer h4 { color: #fff; font-size: var(--fs-md); }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .4rem; font-size: var(--fs-sm); }
.site-footer .logo { color: #fff; }
.site-footer .logo-text b { color: #6CB8F2; }
.footer-base { border-top: 1px solid rgba(255,255,255,.1); font-size: var(--fs-xs); color: #8EA7BA; }
.footer-base .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem; padding-block: 1rem; }
@media (max-width: 760px) { .site-footer .wrap { grid-template-columns: 1fr 1fr; } }

/* Auth card */
.auth-shell { min-height: 70vh; display: grid; place-items: center; padding-block: 2.5rem; background: var(--lattice) center / 56px 32px, var(--g-sky); }
.auth-card { width: min(440px, 100%); }

/* ---------- App shell: member area + admin -------------------------------- */
.app { display: grid; grid-template-columns: 248px 1fr; min-height: calc(100vh - var(--header-h)); }
.app-side { background: var(--c-surface); border-right: 1px solid var(--c-line); padding: 1rem .75rem; display: flex; flex-direction: column; gap: 1rem; }
.app-main { min-width: 0; padding: 1.5rem max(16px, 2vw); display: flex; flex-direction: column; gap: 1.25rem; }
.side-group { display: flex; flex-direction: column; gap: 2px; }
.side-title { font: 600 11px/1.2 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--c-ink-faint); padding: .6rem .7rem .3rem; }
.side-link { display: flex; align-items: center; gap: .6rem; padding: .5rem .7rem; border-radius: var(--r-sm); color: var(--c-ink-soft); font-weight: 600; font-size: var(--fs-sm); text-decoration: none; position: relative; }
.side-link svg { width: 18px; height: 18px; flex: none; }
.side-link:hover { background: var(--c-surface-2); color: var(--c-ink); }
.side-link[aria-current="page"] { background: var(--c-sky-soft); color: var(--c-sky-deep); }
.side-link .count { margin-left: auto; min-width: 22px; padding: 0 .4rem; border-radius: 5px; background: var(--c-sun); color: #3A1D00; font: 700 11px/1.6 var(--f-mono); text-align: center; }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem; }
.page-head h1 { font-size: var(--fs-2xl); margin: 0; letter-spacing: -.03em; }
.crumbs { font: 500 var(--fs-xs)/1.3 var(--f-mono); color: var(--c-ink-faint); margin-bottom: .3rem; }
@media (max-width: 960px) {
  .app { grid-template-columns: 1fr; }
  .app-side { flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--c-line); padding: .5rem; gap: .25rem; scrollbar-width: thin; }
  .side-group { flex-direction: row; gap: 2px; }
  .side-title { display: none; }
  .side-link { white-space: nowrap; }
}

/* Admin flavour: deep navy sidebar, same tokens */
.admin .app-side { background: var(--c-night); border-color: var(--c-night); }
.admin .side-title { color: #6E8BA1; }
.admin .side-link { color: #BFD0DD; }
.admin .side-link:hover { background: rgba(255,255,255,.06); color: #fff; }
.admin .side-link[aria-current="page"] { background: rgba(28,123,203,.25); color: #8FCBFF; }
.admin-top { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; }
.admin-top .input { max-width: 340px; }

/* Charge ring (surf goal / daily condition). SVG with stroke-dasharray. */
.ring { position: relative; width: var(--ring, 132px); aspect-ratio: 1; flex: none; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring .track { stroke: var(--c-line); }
.ring .bar { stroke: url(#ringGrad); stroke-linecap: butt; transition: stroke-dashoffset 1s cubic-bezier(.2,.8,.2,1); }
.ring-label { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.ring-label b { font: 700 1.6rem/1 var(--f-display); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.ring-label small { font-size: var(--fs-xs); color: var(--c-ink-soft); }

/* Referral tree */
.tree, .tree ul { list-style: none; margin: 0; padding-left: 1.1rem; }
.tree { padding-left: 0; }
.tree li { position: relative; padding: .3rem 0 .3rem 1rem; }
.tree ul li::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; border-left: 1px dashed var(--c-line-strong); }
.tree ul li::after { content: ""; position: absolute; left: 0; top: 1.05rem; width: .8rem; border-top: 1px dashed var(--c-line-strong); }
.tree summary { cursor: pointer; list-style: none; display: inline-flex; gap: .5rem; align-items: center; font-size: var(--fs-sm); }
.tree summary::-webkit-details-marker { display: none; }

/* ---------- Surf bar ------------------------------------------------------ */
.surf { display: flex; flex-direction: column; height: 100%; min-height: 520px; }
.surf-bar { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; padding: .6rem max(16px, 1.5vw); background: var(--c-surface); border-bottom: 3px solid; border-image: var(--g-chain) 1; }
.surf-timer { --ring: 46px; }
.surf-timer .ring-label b { font-size: .95rem; }
.surf-check { display: flex; gap: .4rem; }
.surf-check button { width: 42px; height: 42px; border-radius: 9px; border: 1px solid var(--c-line-strong); box-shadow: 0 2px 0 var(--c-line-strong); background: var(--c-surface); cursor: pointer; display: grid; place-items: center; color: var(--c-ink); }
.surf-check button:hover { border-color: var(--c-sky); background: var(--c-sky-soft); }
.surf-check svg { width: 22px; height: 22px; }
.surf-frame { flex: 1; background: var(--lattice) center / 56px 32px, var(--c-surface-2); display: grid; grid-template-columns: minmax(0, 1fr); place-items: center; padding-block: 1rem; color: var(--c-ink-faint); }

/* Copy field (payment address / amount) */
.copy { display: flex; gap: .5rem; align-items: center; padding: .6rem .7rem; border: 1px solid var(--c-line-strong); border-radius: var(--r-md); background: var(--c-surface-2); min-width: 0; }
.copy code { flex: 1; min-width: 0; overflow-wrap: anywhere; font-size: var(--fs-sm); color: var(--c-ink); }
.countdown { font: 700 var(--fs-xl)/1 var(--f-mono); color: var(--c-sun-deep); font-variant-numeric: tabular-nums; }

/* Toast */
.toast { position: fixed; right: max(16px, env(safe-area-inset-right, 0px)); bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 80; background: var(--c-night); color: #fff; padding: .7rem 1rem; border-radius: var(--r-md); box-shadow: var(--sh-2); font-size: var(--fs-sm); font-weight: 600; }

/* ==========================================================================
   Blockchain-only components (optional; templates for the solar theme
   simply do not use them)
   ========================================================================== */

/* Live dot: a small pulsing square (used on "live" chips and the ledger) */
.live-dot { width: 9px; height: 9px; border-radius: 2px; background: var(--c-leaf); display: inline-block; transform: rotate(45deg); animation: live 2.2s ease-out infinite; }
@keyframes live { 0% { box-shadow: 0 0 0 0 rgba(30,154,85,.45); } 70%,100% { box-shadow: 0 0 0 9px rgba(30,154,85,0); } }
.sun-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--g-sun); display: inline-block; flex: none; }

/* Chip that sits on the hero scene */
.scene-chip { position: absolute; left: 14px; top: 14px; display: inline-flex; gap: .55rem; align-items: center; padding: .45rem .8rem; border-radius: 8px; background: rgba(255,255,255,.94); border: 1px solid var(--c-line); box-shadow: var(--sh-1); font-size: var(--fs-sm); font-weight: 700; }
.scene-chip .hash { font-weight: 500; }

/* Block header: mono "BLOCK #n · hash" strip on top of a panel */
.block-tag { display: flex; justify-content: space-between; gap: .75rem; flex-wrap: wrap; margin: -1.25rem -1.25rem 1rem; padding: .5rem 1.25rem; border-bottom: 1px dashed var(--c-line-strong); background: var(--c-surface-2); border-radius: var(--r-lg) var(--r-lg) 0 0; font: 500 var(--fs-xs)/1.4 var(--f-mono); color: var(--c-ink-faint); }
.block-tag b { color: var(--c-sky-deep); font-weight: 600; }

/* Activity ticker: real, recent public events (activity feed module). Pauses on hover. */
.ticker { background: var(--c-night); color: var(--c-night-ink); font: 500 var(--fs-xs)/1 var(--f-mono); overflow: hidden; white-space: nowrap; }
/* The partial prints the events twice; the track slides by half its width for a seamless loop */
.ticker-track { display: inline-flex; gap: 2.5rem; padding: .7rem 2.5rem .7rem 0; animation: ticker 60s linear infinite; }
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker-track span { display: inline-flex; gap: .5rem; align-items: center; }
.ticker-track b { color: #fff; font-weight: 600; }
.ticker-track i { font-style: normal; color: #7FD8A4; }
.ticker-track em { font-style: normal; color: #FFC879; }
@keyframes ticker { to { transform: translateX(-50%); } }

/* Ledger: a list of recent blocks (ad views settled, adpacks, payouts) */
.ledger { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.ledger li { display: grid; grid-template-columns: auto 1fr auto; gap: .9rem; align-items: center; padding: .75rem 0; border-bottom: 1px dashed var(--c-line); }
.ledger li:last-child { border-bottom: 0; }
.ledger .cube { width: 34px; height: 38px; clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); display: grid; place-items: center; background: var(--c-sky-soft); color: var(--c-sky-deep); }
.ledger .cube svg { width: 18px; height: 18px; }
.ledger .cube.ok { background: var(--c-leaf-soft); color: var(--c-leaf-deep); }
.ledger .cube.sun { background: var(--c-sun-soft); color: var(--c-sun-deep); }
.ledger .what { min-width: 0; font-size: var(--fs-sm); }
.ledger .what small { display: block; font: 500 var(--fs-xs)/1.4 var(--f-mono); color: var(--c-ink-faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ledger .amt { font: 600 var(--fs-sm)/1.2 var(--f-mono); text-align: right; white-space: nowrap; }
.ledger li.is-new { animation: ledger-in .7s ease; }
@keyframes ledger-in { from { background: var(--c-leaf-soft); } to { background: transparent; } }

/* Value flow: advertisers -> network -> members, with a moving dashed link */
.flow { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; gap: .75rem; align-items: stretch; }
.flow-node { min-width: 0; }
.flow-link { align-self: center; width: 54px; height: 2px; background: repeating-linear-gradient(90deg, var(--c-sky) 0 6px, transparent 6px 11px); background-size: 22px 2px; animation: flow 1.2s linear infinite; position: relative; }
.flow-link::after { content: ""; position: absolute; right: -2px; top: -4px; border: 5px solid transparent; border-left-color: var(--c-sky); border-right: 0; }
@keyframes flow { to { background-position: 22px 0; } }
@media (max-width: 860px) {
  .flow { grid-template-columns: 1fr; }
  .flow-link { justify-self: center; width: 2px; height: 30px; background: repeating-linear-gradient(180deg, var(--c-sky) 0 6px, transparent 6px 11px); background-size: 2px 22px; animation-name: flow-v; }
  .flow-link::after { right: -4px; top: auto; bottom: -2px; border: 5px solid transparent; border-top-color: var(--c-sky); border-bottom: 0; }
}
@keyframes flow-v { to { background-position: 0 22px; } }

/* Ad format cards with a tiny wireframe of where the ad shows */
.format { display: flex; flex-direction: column; gap: .7rem; }
.format-shot { height: 92px; border-radius: var(--r-md); background: var(--c-surface-2); border: 1px solid var(--c-line); position: relative; overflow: hidden; }
.format-shot i { position: absolute; display: block; border-radius: 3px; background: var(--c-line); }
.format-shot i.ad { background: var(--g-chain); opacity: .85; }
.format-shot i.ad.sun { background: var(--g-sun); }
.format-price { font: 600 var(--fs-sm)/1.3 var(--f-mono); color: var(--c-sky-deep); }

/* Confirmations as a row of blocks filling in */
.confirm-blocks { display: flex; flex-wrap: wrap; gap: 4px; }
.confirm-blocks i { width: 14px; height: 14px; border-radius: 3px; background: var(--c-line); }
.confirm-blocks i.on { background: var(--c-leaf); }
.confirm-blocks i.now { background: var(--c-sky); animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: .35; } }

.logo-mark .sun { transform-origin: 32.5px 7.5px; animation: sun-breathe 4s ease-in-out infinite; }
@keyframes sun-breathe { 50% { transform: scale(1.12); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .ticker { white-space: normal; }
  .ticker-track { flex-wrap: wrap; gap: .6rem 2rem; padding-left: var(--side); transform: none !important; }
  .ticker-track [aria-hidden="true"] { display: none; }
}
