@import url("/tokens.css");

html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}
img { display: block; }
a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--gold-hi); }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.15; margin: 0 0 .5em; }
h2 { font-size: clamp(1.9rem, 4vw, 2.6rem); }
h3 { font-size: 1.2rem; color: var(--gold-hi); }
p { margin: 0 0 1em; }
code { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 640px; text-align: center; }
.sub { color: var(--muted); font-size: 1.1rem; max-width: 640px; }
.narrow .sub { margin-left: auto; margin-right: auto; }
.muted { color: var(--muted); font-size: .9rem; }

/* Buttons */
/* .btn base (gradient, pill, ghost, disabled) is in tokens.css; the public site adds size and lift */
.btn { padding: .8em 1.5em; font-size: 1rem; transition: transform .15s ease, box-shadow .15s ease; }
.btn:hover { transform: translateY(-1px); }
.btn-small { padding: .5em 1.1em; font-size: .9rem; }

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 10;
  background: rgba(11, 10, 9, .82); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-family: var(--serif); font-size: 1.15rem; letter-spacing: .08em; text-transform: uppercase; }
.brand:hover { color: var(--text); }
.nav-links { display: flex; gap: 22px; margin-left: auto; }
.nav-links a { color: var(--muted); font-size: .95rem; }
.nav-links a:hover { color: var(--text); }

/* Hero */
.hero {
  padding: 96px 0 88px; text-align: center;
  background: radial-gradient(ellipse 60% 55% at 50% 30%, rgba(212, 162, 76, .14), transparent 70%);
}
.hero-inner { display: flex; flex-direction: column; align-items: center; }
.hero-logo { filter: drop-shadow(0 0 40px rgba(212, 162, 76, .35)); margin-bottom: 28px; }
.eyebrow { color: var(--gold); letter-spacing: .25em; text-transform: uppercase; font-size: .85rem; margin-bottom: .8em; }
/* The big hero title on the homepage is narrow on purpose; other titles use the full width */
.hero h1 { font-size: clamp(2.4rem, 7vw, 4.6rem); max-width: 18ch; }
h1 { font-size: clamp(2rem, 5vw, 3rem); }
.lead { color: var(--muted); font-size: 1.15rem; max-width: 600px; }
.status { display: inline-flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 999px; padding: .4em 1em; font-size: .9rem; color: var(--muted); margin: 8px 0 28px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 0 rgba(212, 162, 76, .6); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(212, 162, 76, 0); } 100% { box-shadow: 0 0 0 0 rgba(212, 162, 76, 0); } }
.actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }

/* Sections */
.section { padding: 88px 0; }
.section-alt { background: var(--bg-alt); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--gap); margin-top: 32px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.card p { color: var(--muted); margin: 0; }

/* Tokenomics */
.bar { display: flex; height: 18px; border-radius: 999px; overflow: hidden; margin: 32px 0 24px; gap: 3px; }
.seg { width: var(--w); }
.s1 { background: var(--gold); }
.s2 { background: var(--gold-hi); }
.s3 { background: var(--copper); }
.s4 { background: #5e4320; }
.legend { list-style: none; padding: 0; margin: 0 0 32px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px 32px; }
.legend li { display: flex; gap: 12px; align-items: flex-start; }
.legend i { flex: none; width: 14px; height: 14px; border-radius: 4px; margin-top: 5px; }
.legend b { display: block; }
.legend span { color: var(--muted); font-size: .95rem; }
.addresses { display: grid; gap: 10px; }
.addr { display: flex; align-items: center; gap: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px; }
.addr span { color: var(--muted); font-size: .9rem; min-width: 120px; }
.addr code { flex: 1; overflow-wrap: anywhere; color: var(--text); font-size: .92rem; }
.copy { background: none; border: 1px solid var(--line); color: var(--gold); border-radius: 8px; padding: .35em .8em; cursor: pointer; font: inherit; font-size: .85rem; }
.copy:hover { border-color: var(--gold); }
.warn { color: var(--muted); font-size: .9rem; margin-top: 14px; }

/* Steps */
.steps { list-style: none; padding: 0; margin: 32px 0 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; counter-reset: step; }
.steps li { counter-increment: step; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.steps li::before { content: counter(step); display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--gold); color: var(--gold); font-family: var(--serif); margin-bottom: 14px; }
.steps b { display: block; margin-bottom: 6px; }
.steps span { color: var(--muted); font-size: .95rem; }

/* Roadmap */
.roadmap { list-style: none; padding: 0; margin: 32px 0 0; border-left: 1px solid var(--line); }
.roadmap li { position: relative; padding: 0 0 28px 28px; }
.roadmap li::before { content: ""; position: absolute; left: -6px; top: 6px; width: 11px; height: 11px; border-radius: 50%; background: var(--bg-alt); border: 1px solid var(--muted); }
.roadmap li.now::before { background: var(--gold); border-color: var(--gold); box-shadow: 0 0 12px rgba(212, 162, 76, .6); }
.roadmap b { display: block; font-family: var(--serif); font-size: 1.15rem; }
.roadmap li.now b { color: var(--gold-hi); }
.roadmap span { color: var(--muted); }

/* App */
.app-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 48px; align-items: center; }
.checks { list-style: none; padding: 0; margin: 24px 0; }
.checks li { padding-left: 28px; position: relative; margin-bottom: 10px; }
.checks li::before { content: ""; position: absolute; left: 0; top: .45em; width: 12px; height: 7px; border-left: 2px solid var(--gold); border-bottom: 2px solid var(--gold); transform: rotate(-45deg); }
.phone { justify-self: center; width: 260px; padding: 12px; border-radius: 38px; background: #050504; border: 1px solid var(--line); box-shadow: 0 30px 80px rgba(0, 0, 0, .5), 0 0 60px rgba(212, 162, 76, .08); }
.screen { border-radius: 28px; background: var(--surface); padding: 22px 16px 26px; display: grid; gap: 10px; min-height: 440px; align-content: start; }
.p-head { display: flex; align-items: center; gap: 8px; font-family: var(--serif); letter-spacing: .06em; text-transform: uppercase; font-size: .85rem; margin-bottom: 8px; }
.p-card { background: linear-gradient(135deg, rgba(243, 213, 138, .18), rgba(156, 107, 42, .12)); border: 1px solid rgba(212, 162, 76, .35); border-radius: 16px; padding: 18px; }
.p-card small { color: var(--muted); display: block; }
.p-card strong { font-size: 1.35rem; font-family: var(--serif); }
.p-row { display: flex; justify-content: space-between; background: var(--bg-alt); border-radius: 12px; padding: 12px 14px; font-size: .88rem; }
.p-row em { font-style: normal; color: var(--gold); }
.p-btn { margin-top: 8px; text-align: center; padding: 12px; border-radius: 999px; background: var(--gold-gradient); color: #1a1208; font-weight: 650; }

/* App download page (/app/, app.js) and the offline page (sw.js) */
.app-hero { background: radial-gradient(ellipse 60% 55% at 50% 20%, rgba(212, 162, 76, .12), transparent 70%); }
.app-icon, .offline-logo { margin: 0 auto 24px; border-radius: 22px; box-shadow: 0 0 40px rgba(212, 162, 76, .2); }
.offline-logo { border-radius: 0; box-shadow: none; }
.app-install { text-align: left; margin-top: 28px; }
.app-install-title { font-size: 1.35rem; color: var(--gold-hi); margin-bottom: .4em; }
.app-install .u-how { margin-bottom: 4px; }
.app-perks { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 900px) { .app-perks { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .app-perks { grid-template-columns: minmax(0, 1fr); } }

/* Waitlist */
.waitlist { display: grid; grid-template-columns: 1fr auto; gap: 12px; margin-top: 28px; text-align: left; }
.waitlist input[type="email"] { background: var(--surface); border: 1px solid var(--line); color: var(--text); border-radius: 999px; padding: .8em 1.3em; font: inherit; }
.consent { grid-column: 1 / -1; display: flex; gap: 10px; align-items: flex-start; color: var(--muted); font-size: .9rem; }
.consent input { accent-color: var(--gold); margin-top: 4px; }
.hp { position: absolute; left: -9999px; }
.form-msg { grid-column: 1 / -1; min-height: 1.5em; margin: 0; font-size: .95rem; }
.form-msg.ok { color: var(--gold-hi); }
.form-msg.err { color: var(--error); }
.or { color: var(--muted); margin-top: 24px; }

/* Countdown + social proof */
.status.live { color: var(--gold-hi); border-color: var(--gold); }
.countdown { display: flex; gap: 12px; margin: 0 0 28px; }
.countdown div { min-width: 76px; padding: 12px 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.countdown b { display: block; font-family: var(--serif); font-size: 2rem; color: var(--gold-hi); font-variant-numeric: tabular-nums; }
.countdown span { color: var(--muted); font-size: .75rem; text-transform: uppercase; letter-spacing: .12em; }
.counter { color: var(--muted); margin: 22px 0 0; }
.counter b { color: var(--gold-hi); }

/* Waitlist dashboard */
.me { margin-top: 28px; background: var(--surface); border: 1px solid rgba(212, 162, 76, .35); border-radius: var(--radius); padding: 28px 24px; text-align: center; }
.me-badge { display: inline-block; font-family: var(--serif); font-size: 1.3rem; color: #1a1208; background: var(--gold-gradient); border-radius: 999px; padding: .3em 1.1em; margin-bottom: 22px; }
.me-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 18px; }
.me-stats b { display: block; font-family: var(--serif); font-size: 1.7rem; color: var(--gold-hi); }
.me-stats span { color: var(--muted); font-size: .85rem; }
.me-next { color: var(--muted); margin: 0 0 8px; font-size: .95rem; }
.progress { height: 8px; background: var(--bg); border-radius: 999px; overflow: hidden; margin-bottom: 26px; }
.progress span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--copper), var(--gold-hi)); transition: width .6s ease; }
.me h3 { margin-bottom: .2em; }
.share-link { display: flex; align-items: center; gap: 10px; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin: 14px 0 12px; text-align: left; }
.share-link code { flex: 1; overflow-wrap: anywhere; font-size: .9rem; }
.share { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.share-btn { border: 1px solid var(--line); background: var(--bg); color: var(--text); border-radius: 999px; padding: .55em 1.2em; font: inherit; font-size: .92rem; cursor: pointer; }
.share-btn:hover { border-color: var(--gold); color: var(--gold-hi); }
.ranks { list-style: none; padding: 0; margin: 32px 0 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; text-align: left; }
.ranks li { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
.ranks b { display: block; font-family: var(--serif); color: var(--gold-hi); }
.ranks span { display: block; font-size: .85rem; color: var(--text); }
.ranks em { display: block; font-style: normal; font-size: .8rem; color: var(--muted); margin-top: 4px; }
.ranks li.done { border-color: var(--gold); background: linear-gradient(135deg, rgba(243, 213, 138, .12), rgba(156, 107, 42, .08)); }
.narrow .eyebrow { margin-bottom: .6em; }

/* Account */
.notice { text-align: left; background: rgba(224, 168, 90, .08); border: 1px solid rgba(224, 168, 90, .35); color: var(--text); border-radius: 10px; padding: 12px 16px; font-size: .95rem; }
.signup-done { margin-top: 20px; }
.signup-done p:last-child { margin: 0; }
.signup-done:focus { outline: none; }
.settings { margin-top: 32px; text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.toggle { display: flex; gap: 12px; align-items: flex-start; margin: 12px 0 16px; cursor: pointer; }
.toggle input { accent-color: var(--gold); margin-top: 5px; }
.danger { margin-top: 20px; border-top: 1px solid var(--line); padding-top: 16px; }
.danger summary { cursor: pointer; color: var(--error); }
.danger p { color: var(--muted); margin: 12px 0; }
.btn-danger { background: #8c3a2b; color: #fff; }
.btn-danger:hover { color: #fff; box-shadow: none; }

/* User dashboard: sidebar + content */
.u-loading { padding: 40px 20px; }
/* Full width, like the admin (admin.css main): the grids below spread the cards */
.u-main { padding: 48px 48px 64px; min-width: 0; }
.u-main .eyebrow { margin-bottom: .5em; }
.u-title { font-size: clamp(1.8rem, 3.5vw, 2.4rem); }
.u-main > section > h3 { margin-top: 32px; }
.u-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin: 24px 0 0; }
.u-stats div { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.u-stats b { display: block; font-family: var(--serif); font-size: 2rem; color: var(--gold-hi); }
.u-stats span { color: var(--muted); font-size: .9rem; }
.u-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; margin-top: 16px; }
.u-card .btn { margin-top: 6px; }
.u-card .btn[disabled] { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }
.u-card .share-link { margin-top: 0; }
.u-share { justify-content: flex-start; }
.u-mt { margin-top: 14px; }
.u-main .ranks { margin-top: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
/* A card with an image (the Forger Card): when the row is taller, the image sits in the
   middle and the buttons at the bottom */
.u-card-media { display: flex; flex-direction: column; align-items: flex-start; }
.u-card-media > img { margin: auto 0; }
/* Card layouts. u-flow: cards side by side, a row shares its height, and a card alone in
   its row takes the full width (hidden cards drop out by themselves). u-cols: two columns
   whose last cards stretch to the bottom, so no column ends in an empty gap. */
.u-flow { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 16px; }
.u-flow > * { flex: 1 1 400px; min-width: 0; margin-top: 0; }
.u-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 16px; }
.u-col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.u-col > * { margin-top: 0; }
.u-col > :last-child { flex: 1 1 auto; }
@media (max-width: 760px) { .u-cols { grid-template-columns: minmax(0, 1fr); } }
/* The installed app (html.is-app, set by app-start.js): the account's login is an app
   screen, a card with the logo, without the website nav */
.app-login-brand { display: none; }
.is-app #guest > .nav { display: none; }
.is-app #guest > main { min-height: 100vh; min-height: 100dvh; display: grid; align-items: center; padding: 32px 0; }
.is-app #guest .narrow { width: calc(100% - 32px); max-width: 440px; padding: 32px 24px; background: var(--surface); border: 1px solid var(--line); border-top: 3px solid var(--gold); border-radius: var(--radius); }
.is-app .app-login-brand { display: grid; justify-items: center; gap: 12px; margin-bottom: 24px; font-family: var(--serif); font-size: 1.15rem; letter-spacing: .08em; text-transform: uppercase; }
.is-app .app-login-brand img { filter: drop-shadow(0 0 28px rgba(212, 162, 76, .3)); }
.is-app #guest .sub { font-size: 1rem; }
.is-app #guest .waitlist { grid-template-columns: 1fr; margin-top: 20px; }
.u-main .notice { margin: 16px 0 0; }
.u-main .ranks .rank-state { display: block; margin-top: 10px; font-size: .78rem; color: var(--muted); }
.u-main .ranks li.done .rank-state { color: var(--gold-hi); }
/* What a member gets per confirmed friend (account.js renderPerks) */
.u-perks { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin: 14px 0 6px; }
.u-perks div { border: 1px solid var(--line); border-radius: 12px; padding: 16px; background: var(--bg); }
.u-perks b { display: block; font-family: var(--serif); font-size: 1.5rem; color: var(--gold-hi); line-height: 1.2; }
.u-perks strong { display: block; margin: 4px 0 2px; font-size: .95rem; }
.u-perks span { display: block; color: var(--muted); font-size: .85rem; }
.u-card > h3:first-child { margin-top: 0; }
.u-card > .progress:last-child { margin-bottom: 4px; }
.u-how { list-style: none; counter-reset: how; padding: 0; margin: 14px 0 0; display: grid; gap: 14px; }
.u-how li { counter-increment: how; display: grid; grid-template-columns: 32px 1fr; gap: 12px; align-items: start; }
.u-how li::before { content: counter(how); display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--gold); color: var(--gold-hi); font-family: var(--serif); }
.u-how b { display: block; }
.u-how span { color: var(--muted); font-size: .92rem; }


/* Support chat bubble (support.js) */
.chat-fab { position: fixed; right: 20px; bottom: 20px; z-index: 40; width: 58px; height: 58px; display: grid; place-items: center; border: 0; border-radius: 50%; cursor: pointer; color: #1a1208; background: var(--gold-gradient); box-shadow: 0 10px 30px rgba(0, 0, 0, .45), 0 0 0 1px rgba(243, 213, 138, .3); transition: transform .15s ease; }
.chat-fab:hover { transform: translateY(-2px); }
.chat-badge { position: absolute; top: -2px; right: -2px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; background: var(--error); color: #fff; font-size: 12px; font-weight: 700; line-height: 20px; text-align: center; }
.chat-panel { position: fixed; right: 20px; bottom: 92px; z-index: 40; width: 370px; max-width: calc(100vw - 32px); height: min(560px, calc(100vh - 120px)); height: min(560px, calc(100dvh - 120px)); display: flex; flex-direction: column; background: var(--bg-alt); border: 1px solid var(--line); border-top: 3px solid var(--gold); border-radius: var(--radius); box-shadow: 0 24px 60px rgba(0, 0, 0, .55); overflow: hidden; }
.chat-head { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); background: var(--surface); }
.chat-head div { flex: 1; display: grid; line-height: 1.3; }
.chat-head b { font-family: var(--serif); font-size: 1.05rem; }
.chat-head small { color: var(--muted); font-size: .8rem; }
.chat-close { background: none; border: 0; color: var(--muted); font-size: 26px; line-height: 1; cursor: pointer; padding: 0 4px; }
.chat-close:hover { color: var(--text); }
.chat-new { background: none; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); font: inherit; font-size: .78rem; padding: 4px 9px; cursor: pointer; white-space: nowrap; }
.chat-new:hover { color: var(--gold); border-color: var(--gold); }
.chat-body { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.chat-msg { max-width: 85%; margin: 0; padding: 10px 13px; border-radius: 14px; font-size: .93rem; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.chat-msg time { display: block; margin-top: 4px; font-size: .72rem; opacity: .65; }
.chat-msg.admin { align-self: flex-start; background: var(--surface); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.chat-msg.visitor { align-self: flex-end; background: rgba(212, 162, 76, .16); border: 1px solid rgba(212, 162, 76, .35); border-bottom-right-radius: 4px; }
.chat-head-img.is-photo, .chat-avatar { border-radius: 50%; object-fit: cover; border: 1px solid rgba(212, 162, 76, .55); }
.chat-line { align-self: flex-start; display: flex; align-items: flex-end; gap: 8px; max-width: 92%; }
.chat-line .chat-msg { max-width: none; }
.chat-avatar { flex: none; width: 28px; height: 28px; }
.chat-typing { display: flex; gap: 4px; padding: 13px 14px; }
.chat-typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--gold); opacity: .35; animation: chat-dot 1.2s infinite; }
.chat-typing span:nth-child(2) { animation-delay: .2s; }
.chat-typing span:nth-child(3) { animation-delay: .4s; }
@keyframes chat-dot { 0%, 60%, 100% { opacity: .35; transform: none; } 30% { opacity: 1; transform: translateY(-3px); } }
@media (prefers-reduced-motion: reduce) { .chat-typing span { animation: none; opacity: .7; } }
.chat-closed { margin: 6px 0 0; text-align: center; color: var(--muted); font-size: .85rem; }
.chat-safety { margin: 0; padding: 6px 16px; color: var(--muted); font-size: .75rem; text-align: center; border-top: 1px solid var(--line); }
.chat-compose { padding: 10px 12px 12px; border-top: 1px solid var(--line); background: var(--surface); }
.chat-intro { display: grid; gap: 8px; margin-bottom: 8px; }
.chat-compose input, .chat-compose textarea { width: 100%; background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; font: inherit; font-size: .92rem; }
.chat-compose textarea { resize: none; }
.chat-row { display: flex; gap: 8px; align-items: flex-end; }
.chat-send { flex: none; width: 42px; height: 42px; border: 0; border-radius: 50%; cursor: pointer; color: #1a1208; background: var(--gold); font-size: 16px; }
.chat-send:disabled { opacity: .5; }
.chat-note { margin: 6px 2px 0; font-size: .78rem; color: var(--muted); }
.chat-note:empty { display: none; }
@media (max-width: 480px) {
  .chat-fab { right: 16px; bottom: 16px; }
  .chat-panel { right: 8px; left: 8px; bottom: 84px; width: auto; max-width: none; height: calc(100vh - 100px); height: calc(100dvh - 100px); }
}

/* Floating Admin/User switch on the logged-out account page (admins only).
   The sidebar version lives in sidebar.css. */
.view-switch { position: fixed; left: 16px; bottom: 16px; z-index: 20; display: grid; grid-template-columns: 1fr 1fr; width: 150px; padding: 3px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; font-size: .85rem; box-shadow: 0 8px 24px rgba(0, 0, 0, .4); }
.view-switch a { text-align: center; padding: 6px 0; border-radius: 7px; color: var(--muted); }
.view-switch a:hover { color: var(--text); }
.view-switch a[aria-current="page"] { background: var(--gold); color: #1a1208; font-weight: 650; }

/* Blog */
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap); margin-top: 28px; }
.post-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; color: var(--text); transition: border-color .15s ease; }
.post-card:hover { color: var(--text); border-color: var(--gold); }
.post-card time { color: var(--muted); font-size: .85rem; margin-bottom: 8px; }
.post-card p { color: var(--muted); font-size: .95rem; flex: 1; }
.post-card .read { color: var(--gold); font-size: .9rem; }
.post { max-width: 720px; }
.post .back { display: inline-block; margin-bottom: 28px; font-size: .95rem; }
.post time { display: block; color: var(--muted); font-size: .9rem; margin-bottom: 10px; }
.post h1 { font-size: clamp(2rem, 5vw, 3rem); max-width: none; }
.post-lead { color: var(--muted); font-size: 1.2rem; }
.prose { font-size: 1.07rem; line-height: 1.75; margin-top: 32px; }
.prose h2 { font-size: 1.6rem; margin-top: 1.6em; }
.prose h3 { margin-top: 1.4em; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1em; }
.prose li { margin-bottom: .4em; }
.prose blockquote { margin: 1.4em 0; padding: 4px 20px; border-left: 3px solid var(--gold); background: var(--surface); border-radius: 0 10px 10px 0; }
.prose blockquote p { margin: .8em 0; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }
.prose code { background: var(--surface); padding: .1em .35em; border-radius: 5px; font-size: .92em; }
.post-share { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 36px; }
.post-share span { color: var(--muted); margin-right: 4px; }
.post-cta { margin-top: 40px; padding: 28px; background: var(--surface); border: 1px solid rgba(212, 162, 76, .35); border-radius: var(--radius); text-align: center; }
.post-cta p { color: var(--muted); }
.post-cta .waitlist { max-width: 560px; margin: 18px auto 0; }
.post-cta .signup-done { max-width: 560px; margin: 18px auto 0; }
.prose .post-cta-mid { margin: 36px 0; }
.prose .post-cta-mid h3 { margin-top: 0; }

/* Footer */
.footer { padding: 56px 0 32px; border-top: 1px solid var(--line); background: var(--bg-alt); }
.foot-grid { display: grid; grid-template-columns: 1.6fr repeat(4, 1fr); gap: 32px; margin-bottom: 36px; }
.foot-brand p { color: var(--muted); font-size: .92rem; max-width: 30ch; margin-top: 14px; }
.foot-col { display: grid; gap: 10px; align-content: start; }
.foot-col h4 { margin: 0 0 4px; font: 600 .78rem/1.2 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--gold); }
.foot-col a { color: var(--muted); font-size: .94rem; }
.foot-col a:hover { color: var(--text); }
.foot-col a[aria-disabled="true"] { opacity: .5; }
.foot-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: .85rem; }
.foot-bottom a { color: var(--muted); }
.foot-bottom a:hover { color: var(--gold-hi); }
.foot-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; }

/* Team page */
.page-title { font-size: clamp(2.2rem, 5vw, 3.4rem); }
.founder { display: flex; gap: 28px; align-items: flex-start; margin: 40px 0 56px; padding: 28px; background: var(--surface); border: 1px solid var(--line); border-top: 3px solid var(--gold); border-radius: var(--radius); }
.founder > img { flex: none; filter: drop-shadow(0 0 24px rgba(212, 162, 76, .3)); }
.founder h2 { margin-bottom: .3em; }
.founder p { max-width: 70ch; }
.founder .muted { margin: 0; }
.team-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 24px 0 16px; }
.member { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.member img, .member-initial { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; }
.member-initial { display: grid; place-items: center; background: var(--gold-gradient); color: #1a1208; font: 600 4rem var(--serif); }
.member-body { padding: 18px 20px 22px; }
.member-body h3 { margin: 10px 0 2px; font-size: 1.35rem; }
.member-role { color: var(--gold-hi); font-size: .95rem; margin-bottom: .6em; }
.member-body p:last-child { color: var(--muted); margin: 0; font-size: .95rem; }
.ai-badge { display: inline-block; font-size: .7rem; font-weight: 650; letter-spacing: .1em; text-transform: uppercase; color: #1a1208; background: var(--gold); border-radius: 999px; padding: 2px 10px; }
.small { font-size: .85rem; }

/* Forum */
.forum h1 { font-size: clamp(2rem, 4.5vw, 3rem); }
.f-crumbs { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin-bottom: 20px; color: var(--muted); font-size: .92rem; }
.f-crumbs .sep { color: var(--muted); opacity: .5; }
.f-crumbs .current { color: var(--muted); }
.f-cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; margin: 32px 0 48px; }
.f-cat { display: grid; gap: 6px; align-content: start; padding: 22px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); color: var(--text); transition: border-color .15s ease; }
.f-cat:hover { color: var(--text); border-color: var(--gold); }
.f-cat h3 { margin: 0; display: flex; align-items: center; gap: 10px; }
.f-cat p { margin: 0; color: var(--muted); font-size: .95rem; }
.f-meta { color: var(--muted); font-size: .85rem; }
.f-list { list-style: none; margin: 16px 0 0; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.f-topic a { display: grid; gap: 4px; padding: 16px 22px; border-bottom: 1px solid var(--line); color: var(--text); }
.f-topic:last-child a { border-bottom: 0; }
.f-topic a:hover { color: var(--text); background: rgba(255, 255, 255, .02); }
.f-title { font-weight: 600; }
.f-flag { display: inline-block; margin-right: 8px; padding: 1px 8px; border: 1px solid rgba(212, 162, 76, .5); border-radius: 999px; color: var(--gold); font-size: .7rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; vertical-align: 2px; }
.f-empty { padding: 28px 22px; color: var(--muted); }
.f-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.f-head h1 { margin-bottom: .2em; }
.f-pager { display: flex; align-items: center; justify-content: flex-end; gap: 12px; margin-top: 16px; }
.forum h1.f-topic-title { margin-bottom: .4em; font-size: clamp(1.7rem, 3.5vw, 2.3rem); }
.f-posts { display: grid; gap: 16px; margin-top: 24px; }
.f-post { padding: 20px 22px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.f-post.hidden-post { opacity: .7; }
.f-post header { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.f-post header b { margin-right: 6px; }
.f-post header time { display: block; color: var(--muted); font-size: .82rem; }
.f-body { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.7; }
.f-avatar { display: inline-grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 50%; object-fit: cover; background: var(--gold-gradient); color: #1a1208; font: 600 1rem var(--serif); box-shadow: 0 0 0 1.5px rgba(212, 162, 76, .5); }
.f-avatar.team { padding: 2px; background: var(--bg); }
.f-badge { font-size: .72rem; color: var(--gold-hi); border: 1px solid rgba(212, 162, 76, .45); border-radius: 999px; padding: 1px 8px; }
.ai-badge.team { background: var(--surface); color: var(--gold); border: 1px solid var(--gold); }
.f-report { margin-top: 10px; padding: 0; border: 0; background: none; color: var(--muted); font: inherit; font-size: .82rem; cursor: pointer; }
.f-report:hover { color: var(--error); }
.f-gate, .f-compose { display: grid; gap: 12px; margin-top: 24px; padding: 22px; background: var(--surface); border: 1px solid rgba(212, 162, 76, .35); border-radius: var(--radius); }
.f-gate p { margin: 0; }
.f-compose label { display: grid; gap: 6px; color: var(--muted); font-size: .92rem; }
.f-compose h3 { margin: 0; }
.f-compose input, .f-compose select, .f-compose textarea, .f-inline input { width: 100%; background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: 10px; padding: 11px 14px; font: inherit; }
.f-compose textarea { resize: vertical; }
.f-inline { display: flex; gap: 10px; }
.f-actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.f-actions .form-msg, .f-gate .form-msg { margin: 0; color: var(--error); }
@media (max-width: 640px) {
  .f-head { flex-direction: column; }
  .f-inline { flex-direction: column; }
  .f-topic a, .f-post { padding: 16px; }
}

.field-u { flex: 1; min-width: 0; background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: 10px; padding: 11px 14px; font: inherit; }

/* Contact form */
.contact-form { display: grid; gap: 16px; margin-top: 32px; padding: 28px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.contact-form label { display: grid; gap: 6px; color: var(--muted); font-size: .92rem; }
.contact-form input, .contact-form select, .contact-form textarea { width: 100%; background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: 10px; padding: 11px 14px; font: inherit; }
.contact-form textarea { resize: vertical; }
.contact-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.contact-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.contact-actions .form-msg { margin: 0; }
@media (max-width: 640px) {
  .contact-row { grid-template-columns: minmax(0, 1fr); }
  .contact-form { padding: 20px; }
}

/* Legal pages (layout of a blog post) */
.legal h1 { margin-top: 0; }
.legal .prose h2 { font-size: 1.35rem; }
.disclaimer { color: var(--muted); font-size: .85rem; max-width: 820px; }

/* Blog: posts with a category sidebar */
.blog-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 48px; align-items: start; }
.blog-layout .post-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
.blog-side { position: sticky; top: 96px; display: grid; gap: 16px; }
.side-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.side-card h3 { font-size: 1.05rem; margin: 0 0 12px; }
.cat-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.cat-list a { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 9px; color: var(--text); font-size: .95rem; }
.cat-list a:hover { background: var(--bg); color: var(--gold-hi); }
.cat-list a.active { background: rgba(212, 162, 76, .14); color: var(--gold-hi); }
.cat-count { color: var(--muted); font-size: .82rem; min-width: 1.6em; text-align: center; padding: 1px 6px; border: 1px solid var(--line); border-radius: 999px; }
.side-join { border-color: rgba(212, 162, 76, .35); }
.side-join p { color: var(--muted); font-size: .92rem; margin: 0 0 14px; }
.side-rss { display: block; margin-top: 12px; font-size: .88rem; }
.post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 10px; }
.post-meta time { margin: 0; }
.post-card .post-meta time { margin: 0; }
.cat-chip { display: inline-block; padding: 2px 10px; border-radius: 999px; border: 1px solid rgba(212, 162, 76, .45); color: var(--gold); font-size: .75rem; letter-spacing: .06em; text-transform: uppercase; }
a.cat-chip:hover { background: rgba(212, 162, 76, .14); color: var(--gold-hi); }

/* Comments under a post */
.comments { margin-top: 56px; padding-top: 32px; border-top: 1px solid var(--line); }
.comments h2 { font-size: 1.6rem; }
.c-list { display: grid; gap: 16px; margin: 20px 0 32px; }
.c-thread { display: grid; gap: 12px; }
.c-replies { display: grid; gap: 12px; margin-left: 48px; padding-left: 16px; border-left: 2px solid var(--line); }
.c-item { display: flex; gap: 12px; align-items: flex-start; scroll-margin-top: 100px; }
.c-avatar { flex: none; width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
img.c-avatar { border: 1px solid rgba(212, 162, 76, .55); }
.c-avatar-logo { background: var(--bg); padding: 4px; }
.c-initial { display: grid; place-items: center; background: var(--surface); border: 1px solid var(--line); color: var(--gold); font-family: var(--serif); font-size: 1.05rem; }
.c-body { flex: 1; min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 4px var(--radius) var(--radius) var(--radius); padding: 12px 16px; }
.c-team .c-body { border-color: rgba(212, 162, 76, .35); }
.c-flash .c-body { box-shadow: 0 0 0 2px var(--gold); }
.c-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: .9rem; }
.c-head time { color: var(--muted); font-size: .8rem; margin-left: auto; }
.c-badge { font-size: .7rem; letter-spacing: .05em; text-transform: uppercase; color: var(--gold); border: 1px solid rgba(212, 162, 76, .45); border-radius: 999px; padding: 1px 8px; }
.c-badge-member { color: var(--muted); border-color: var(--line); }
.c-text { margin: 6px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.6; }
.c-reply { background: none; border: 0; padding: 0; margin-top: 6px; color: var(--muted); font: inherit; font-size: .82rem; cursor: pointer; }
.c-reply:hover { color: var(--gold); }
.c-form { display: grid; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.c-form .field-u { width: 100%; resize: vertical; }
.c-form-title { margin: 0; font-size: 1.2rem; }
.c-replying { margin: 0; color: var(--gold); font-size: .9rem; }
.c-cancel { background: none; border: 0; color: var(--muted); text-decoration: underline; font: inherit; cursor: pointer; }
.c-as { margin: 0; }
.c-check { display: flex; gap: 8px; align-items: center; padding: 8px 12px; border: 1px solid rgba(212, 162, 76, .35); border-radius: 10px; background: rgba(212, 162, 76, .06); cursor: pointer; line-height: 1.4; font-size: .86rem; }
.c-check input { width: 15px; height: 15px; margin: 0; accent-color: var(--gold); flex: none; }
.c-check b { color: var(--gold-hi); }
.c-email { display: grid; gap: 6px; }
.c-email .muted, .c-rules { margin: 0; font-size: .82rem; }
.c-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.c-actions .form-msg { margin: 0; color: var(--error); }
.c-actions .form-msg.ok { color: var(--gold-hi); }

/* Responsive */
@media (max-width: 900px) {
  .blog-layout { grid-template-columns: 1fr; gap: 32px; }
  .blog-side { position: static; }
  .blog-layout .post-grid { grid-template-columns: 1fr; }
  .c-replies { margin-left: 18px; }
  .u-main { padding: 28px 20px 48px; }
  .cards, .steps, .ranks { grid-template-columns: repeat(2, 1fr); }
  .post-grid { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .foot-brand { grid-column: 1 / -1; }
  .team-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .app-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  .nav-links { display: none; }
  .nav .btn-small { margin-left: auto; }
  .hero { padding: 64px 0; }
  .section { padding: 64px 0; }
  .cards, .steps, .legend { grid-template-columns: 1fr; }
  .addr { flex-wrap: wrap; gap: 6px 14px; }
  .addr span { min-width: 0; width: 100%; }
  .waitlist { grid-template-columns: 1fr; }
  .countdown { gap: 8px; }
  .countdown div { min-width: 64px; }
  .countdown b { font-size: 1.5rem; }
  .me { padding: 24px 16px; }
  .u-main { padding: 24px 16px 40px; }
  .u-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .u-stats div { padding: 14px 12px; }
  .u-stats b { font-size: 1.4rem; }
  .u-perks { grid-template-columns: 1fr; gap: 8px; }
  .me-stats b { font-size: 1.35rem; }
  .foot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 20px; }
  .foot-brand { grid-column: 1 / -1; }
  .team-grid { grid-template-columns: minmax(0, 1fr); }
  .founder { flex-direction: column; padding: 22px; }
  .foot-bottom { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .dot { animation: none; }
  .btn { transition: none; }
}

/* Chapters: waitlist milestones (chapters.js) */
.ch-sub { margin: 0 0 14px; color: var(--muted); }
.ch-sub b { color: var(--gold-hi); font-weight: 600; }
.ch-progress { margin-bottom: 20px; }
.chapters { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; text-align: left; }
.chapters li { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.chapters b { display: block; font-family: var(--serif); color: var(--gold-hi); }
.chapters span { display: block; margin-top: 2px; font-size: .85rem; color: var(--text); }
.chapters em { display: block; margin-top: 6px; font-style: normal; font-size: .85rem; color: var(--muted); }
.chapters li.next { border-color: rgba(212, 162, 76, .55); }
.chapters li.done { border-color: var(--gold); background: linear-gradient(135deg, rgba(243, 213, 138, .12), rgba(156, 107, 42, .08)); }
.chapters li.done span::before { content: "✓ "; color: var(--gold-hi); }

/* Forger Card in the account */
.forger-card { display: block; width: 100%; max-width: 600px; height: auto; border-radius: 14px; border: 1px solid var(--line); background: var(--bg); }
.card-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
/* Team page: link to each agent's card */
.member-card-link { display: inline-block; margin-top: 10px; font-size: .85rem; color: var(--gold); text-decoration: none; }
.member-card-link:hover { color: var(--gold-hi); text-decoration: underline; }

/* The Forge Quest (account and homepage) */
.quest-form { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.quest-form input { flex: 1 1 260px; min-width: 0; }
.keeper { display: inline-block; margin-top: 8px; padding: 6px 14px; border: 1.5px solid var(--gold); border-radius: 999px; color: var(--gold-hi); font-family: var(--serif); letter-spacing: .04em; }
/* Scrollbars: in tokens.css */
/* Rewards in the account */
.rw-tasks, .rw-history { list-style: none; margin: 0; padding: 0; }
.rw-tasks li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.rw-tasks li:last-child, .rw-history li:last-child { border-bottom: 0; }
.rw-tasks li > div:first-child { display: grid; gap: 2px; min-width: 0; flex: 1 1 260px; }
.rw-tasks li > div:first-child span { font-size: .9rem; }
.rw-task-actions { display: flex; align-items: center; gap: 10px; }
.rw-task-actions .btn { padding: 8px 16px; font-size: .9rem; }
.rw-pts { font-family: var(--serif); color: var(--gold-hi); font-weight: 600; }
.rw-done { color: var(--ok); font-size: .9rem; }
.rw-pending { color: var(--muted); font-size: .9rem; }
.rw-history li { display: grid; grid-template-columns: minmax(0, 1fr) auto 70px; gap: 12px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: .92rem; }
.rw-history li.muted { display: block; }
.rw-history b { text-align: right; color: var(--gold-hi); font-variant-numeric: tabular-nums; }
.rw-history b.neg { color: var(--error); }
/* A/B tests: a testable element appears once its variant is chosen, at most 0.3 s.
   main.js shows slots without a running test right away, and every slot when the API fails. */
[data-exp] { visibility: hidden; animation: exp-show 0s linear .3s forwards; }
[data-exp].exp-ready { visibility: visible; animation: none; }
@keyframes exp-show { to { visibility: visible; } }