/* WithMe website.
   Colours mirror the app's direction 2 palette (mobile/src/components/palette.tsx): ivory ground,
   ink type, olive as the single accent; warm graphite in dark mode.
   Type: Bricolage Grotesque (the logo face) for display, Inter (the app face) for reading. */

@font-face { font-family: "Bricolage"; font-weight: 200 800; font-stretch: 75% 100%; font-display: swap; src: url("fonts/BricolageGrotesque.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 400; font-display: swap; src: url("fonts/Inter-Regular.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 500; font-display: swap; src: url("fonts/Inter-Medium.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 600; font-display: swap; src: url("fonts/Inter-SemiBold.woff2") format("woff2"); }

:root {
  color-scheme: light dark;
  --ivory: #F6F4EC;
  --card: #FFFFFF;
  --raised: #ECEADF;
  --ink: #15180F;
  --ink2: #3C4135;
  --muted: #64675B;
  --line: #E4E3D8;
  --olive: #607344;
  --olive-text: #4E5E37;
  --olive-soft: #EEF1E2;
  --olive-tint: #CDD3BE;
  --on-olive: #F6F4EC;
  --danger: #9F4E32;
  --liquid-front: #9ADB5C;
  --liquid-back: #DDE15A;
  --nailed: #5FA864;
  --pretty: #9BC97E;
  --halfway: #F0C46B;
  --barely: #F2A65A;
  --display: "Bricolage", "Inter", system-ui, sans-serif;
  --page: 1280px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ivory: #121311;
    --card: #1C1D1A;
    --raised: #262724;
    --ink: #EEEDE6;
    --ink2: #CFCFC4;
    --muted: #A2A496;
    --line: #2E2F2B;
    --olive: #A3BA6E;
    --olive-text: #BFD38A;
    --olive-soft: rgba(163, 186, 110, 0.14);
    --olive-tint: #3A4031;
    --on-olive: #121410;
    --danger: #E59A80;
  }
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--ivory);
  color: var(--ink);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

a { color: var(--olive-text); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible { outline: 2px solid var(--olive); outline-offset: 3px; border-radius: 6px; }

h1, h2, h3 { margin: 0; font-weight: 700; }

.wrap { width: 100%; max-width: var(--page); margin: 0 auto; padding: 0 24px; }

.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 16px; background: var(--card); padding: 8px 12px; z-index: 30; }

.label { display: block; font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.02em; color: var(--ink); }

.big { font-family: var(--display); font-weight: 800; font-stretch: 82%; text-transform: uppercase; line-height: 0.88; letter-spacing: -0.01em; }

/* Top bar: pills left, the wordmark centred, status and Join right */

.topbar { position: sticky; top: 0; z-index: 20; display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); grid-template-areas: "nav logo right"; align-items: center; gap: 10px 16px; padding: 14px 16px; background: color-mix(in srgb, var(--ivory) 86%, transparent); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.topbar .logo { grid-area: logo; }
.tb-nav { grid-area: nav; display: flex; gap: 6px; min-width: 0; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.tb-nav::-webkit-scrollbar { display: none; }
.tb-right { grid-area: right; }
.chip { display: inline-flex; align-items: center; flex: none; min-height: 36px; padding: 0 15px; border-radius: 999px; background: var(--card); color: var(--ink); text-decoration: none; font-family: var(--display); font-size: 15px; font-weight: 600; letter-spacing: -0.005em; box-shadow: inset 0 0 0 1px var(--line); white-space: nowrap; }
.chip:hover, .chip[aria-current="page"] { background: var(--ink); color: var(--ivory); box-shadow: none; }

.logo { font-family: var(--display); font-weight: 700; font-size: 30px; letter-spacing: -0.01em; color: var(--ink); text-decoration: none; line-height: 1; }
.logo span, .footer-mark span { color: var(--olive); }

.tb-right { display: flex; justify-content: flex-end; align-items: center; gap: 12px; }
.tb-right .status { margin-right: 8px; }
.status { margin: 0; font-size: 12px; line-height: 1.3; color: var(--ink); font-weight: 500; }
.join { display: inline-flex; align-items: center; gap: 10px; min-height: 36px; padding: 0 4px 0 16px; border-radius: 999px; background: var(--ink); color: var(--ivory); text-decoration: none; font-family: var(--display); font-size: 15px; font-weight: 600; white-space: nowrap; }
.join i { width: 28px; height: 28px; border-radius: 50%; background: var(--olive); display: grid; place-items: center; color: var(--on-olive); font-style: normal; transition: transform 0.25s ease; }
.join svg { width: 14px; height: 14px; }
.join:hover i { transform: rotate(45deg); }
.menu-btn, .menu-only { display: none; }
.menu-btn { width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%; background: var(--card); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); place-items: center; cursor: pointer; }
.menu-btn svg { width: 22px; height: 22px; overflow: visible; }
.menu-btn path { transition: transform 0.25s ease; transform-origin: 12px 12px; }
.menu-btn[aria-expanded="true"] .top { transform: translateY(3px) rotate(45deg); }
.menu-btn[aria-expanded="true"] .bottom { transform: translateY(-3px) rotate(-45deg); }

/* Buttons */

.button { display: inline-flex; align-items: center; justify-content: center; gap: 10px; white-space: nowrap; min-height: 52px; padding: 0 7px 0 24px; border-radius: 999px; font: inherit; font-weight: 600; font-size: 16px; text-decoration: none; background: var(--ink); color: var(--ivory); }
.button i { width: 38px; height: 38px; border-radius: 50%; background: var(--olive); display: grid; place-items: center; color: var(--on-olive); transition: transform 0.25s ease; }
.button svg { width: 16px; height: 16px; }
.button:hover i { transform: rotate(45deg); }

/* Hero */

.hero { position: relative; min-height: calc(100svh - 64px); display: grid; place-items: start center; padding: clamp(24px, 4vw, 56px) 16px 0; overflow: hidden; isolation: isolate; }
.hero h1 { position: relative; z-index: 2; text-align: center; color: var(--olive); font-size: clamp(60px, 11.5vw, 176px); }
.hero h1 .line { display: block; overflow: hidden; padding: 0.02em 0.04em 0; }
.hero h1 .line > span { display: block; animation: rise 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both; animation-delay: calc(var(--i) * 110ms + 100ms); }
@keyframes rise { from { transform: translateY(110%); } }

.tag { position: absolute; z-index: 3; left: var(--x); top: var(--y); rotate: var(--r); padding: 8px 16px; border-radius: 999px; background: var(--ink); color: var(--ivory); font-family: "Inter", sans-serif; font-size: clamp(12px, 1.1vw, 15px); font-weight: 500; line-height: 1.2; text-transform: none; letter-spacing: 0; white-space: nowrap; animation: pop 0.5s cubic-bezier(0.3, 1.5, 0.5, 1) both, bob 6s ease-in-out infinite; animation-delay: calc(var(--d) + 700ms), calc(var(--d) * 3); }
@keyframes pop { from { scale: 0; } }
@keyframes bob { 0%, 100% { translate: 0 0; } 50% { translate: 0 -6px; } }

.hero-orb { position: absolute; z-index: 1; left: 50%; bottom: 0; width: min(760px, 92vw); aspect-ratio: 1; translate: -50% 64%; }
.hero-orb svg { width: 100%; height: 100%; display: block; overflow: visible; }
.orb-ring { fill: var(--card); stroke: var(--ink); stroke-width: 1.2; }
.wave { animation: drift 9s linear infinite; }
.wave.back { fill: var(--liquid-back); animation-duration: 14s; animation-direction: reverse; }
.wave.front { fill: var(--liquid-front); }
.slosh { animation: slosh 7s ease-in-out infinite; transform-origin: 100px 100px; }
@keyframes drift { to { transform: translateX(-100px); } }
@keyframes slosh { 0%, 100% { transform: rotate(-3deg); } 50% { transform: rotate(3deg); } }

.loop { position: absolute; z-index: 0; width: clamp(140px, 18vw, 280px); fill: none; stroke: var(--olive); stroke-width: 16; stroke-linecap: round; }
.loop path { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 1.8s 0.6s cubic-bezier(0.6, 0, 0.3, 1) forwards; }
.loop.left { left: -24px; top: 26%; }
.loop.right { right: -24px; top: 8%; }
@keyframes draw { to { stroke-dashoffset: 0; } }

/* Ribbon: a curved olive band with text running along it */

.ribbon-wrap { overflow: hidden; margin-top: -8vw; position: relative; z-index: 4; } /* the band covers the orb's cut-off base along the whole curve */
.ribbon { display: block; width: 110%; margin: 0 -5%; height: auto; }
.ribbon .band { fill: none; stroke: var(--olive); stroke-width: 92; }
.ribbon text { font-family: var(--display); font-weight: 800; font-stretch: 82%; font-size: 46px; fill: var(--on-olive); text-transform: uppercase; letter-spacing: 0.01em; }

/* About: words fill in as you scroll */

.about { padding: clamp(80px, 12vw, 160px) 0; text-align: center; position: relative; }
.about .label { margin-bottom: 32px; }
.reveal { position: relative; max-width: 1100px; margin: 0 auto; font-family: var(--display); font-weight: 700; font-size: clamp(30px, 4.4vw, 64px); line-height: 1.06; letter-spacing: -0.015em; color: var(--ink); }
.js .reveal .w { color: var(--olive-tint); transition: color 0.25s ease; }
.js .reveal .w.on { color: var(--ink); }
.reveal .pin { position: absolute; left: clamp(0px, var(--x), 100% - 200px); top: var(--y); rotate: var(--r); padding: 8px 16px; border-radius: 999px; background: var(--olive); color: var(--on-olive); font-family: "Inter", sans-serif; font-size: 14px; font-weight: 500; letter-spacing: 0; line-height: 1.2; white-space: nowrap; }
.js .reveal .pin { scale: 0; transition: scale 0.4s cubic-bezier(0.3, 1.5, 0.5, 1); }
.js .reveal .pin.on { scale: 1; }

/* How it works: three cards */

.section-top { display: grid; grid-template-columns: 1fr auto 1fr; align-items: start; gap: 24px; margin-bottom: 48px; }
.section-top h2 { font-size: clamp(56px, 8vw, 120px); text-align: center; }
.section-top p { margin: 0; justify-self: end; max-width: 22em; color: var(--ink2); font-size: 16px; }

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.card .scene { aspect-ratio: 4 / 5; border-radius: 20px; display: grid; place-items: center; padding: 28px; overflow: hidden; }
.card .meta { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 16px 4px 8px; }
.card .meta b { width: 32px; height: 32px; border-radius: 8px; background: var(--olive); color: var(--on-olive); display: grid; place-items: center; font-family: var(--display); font-size: 15px; }
.card .meta h3 { font-family: var(--display); font-weight: 800; font-stretch: 82%; text-transform: uppercase; font-size: 18px; line-height: 1.1; }
.card .meta small { display: block; color: var(--olive-text); font-size: 12px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.02em; }
.card > p { margin: 0 4px; color: var(--muted); font-size: 15px; }

.scene.one { background: var(--olive-soft); }
.scene.two { background: var(--olive); }
.scene.three { background: var(--raised); }

.ui { width: 100%; max-width: 300px; background: var(--card); border-radius: 18px; padding: 18px; box-shadow: 0 14px 40px rgba(21, 24, 15, 0.12); color: var(--ink); font-size: 14px; }
.ui .t { font-weight: 600; font-size: 16px; margin-bottom: 2px; }
.ui .s { color: var(--muted); font-size: 13px; }
.seg { display: grid; grid-template-columns: repeat(3, 1fr); background: var(--raised); border-radius: 10px; padding: 3px; margin: 16px 0; font-size: 12px; font-weight: 500; text-align: center; }
.seg span { padding: 6px 0; border-radius: 8px; color: var(--muted); }
.seg .sel { background: var(--card); color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1); }
.days { display: flex; justify-content: space-between; }
.days span { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 600; background: var(--raised); color: var(--muted); }
.days .on { background: var(--olive); color: var(--on-olive); }
.tiers { display: grid; gap: 8px; margin-top: 14px; }
.tiers span { border-radius: 10px; padding: 9px 12px; font-weight: 500; font-size: 13px; color: #1C1A16; }
.tiers .nailed { background: var(--nailed); color: #FFFFFF; }
.tiers .pretty { background: var(--pretty); }
.tiers .halfway { background: var(--halfway); }
.tiers .barely { background: var(--barely); }
.feed { display: grid; gap: 10px; width: 100%; max-width: 300px; }
.note { display: flex; gap: 10px; align-items: center; background: var(--card); border-radius: 16px; padding: 12px 14px; box-shadow: 0 10px 28px rgba(21, 24, 15, 0.10); font-size: 13px; line-height: 1.35; color: var(--ink2); }
.note:nth-child(2) { margin-left: 24px; rotate: 2deg; }
.note:nth-child(3) { rotate: -2deg; }
.note .av { width: 34px; height: 34px; border-radius: 50%; flex: none; display: grid; place-items: center; font-weight: 600; font-size: 13px; color: #1C1A16; }
.note strong { color: var(--ink); font-weight: 600; }

/* Focus: stops along a line that draws as you scroll */

.focus { padding: clamp(80px, 10vw, 140px) 0 40px; }
.track { position: relative; aspect-ratio: 12 / 10; max-width: 1200px; margin: 0 auto; }
.track > svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.track .path { fill: none; stroke: var(--olive); stroke-width: 14; stroke-linecap: round; }
.track .ghost { fill: none; stroke: var(--olive-tint); stroke-width: 14; stroke-linecap: round; }
.stop { position: absolute; left: var(--x); top: var(--y); z-index: 2; max-width: 50%; }
.stop h3 { font-size: clamp(34px, 4.6vw, 68px); color: var(--olive); display: flex; flex-wrap: wrap; align-items: center; gap: 0.16em; }
.badge { width: 0.8em; height: 0.8em; border-radius: 0.14em; background: var(--ink); color: var(--olive); display: inline-grid; place-items: center; rotate: var(--r, -8deg); flex: none; }
.badge svg { width: 55%; height: 55%; }
.bubble { display: inline-block; margin: 12px 0 0 clamp(0px, 4vw, 60px); max-width: 270px; padding: 10px 16px; border: 2px solid var(--olive); border-radius: 18px; background: var(--ivory); color: var(--ink2); font-size: 14px; line-height: 1.4; rotate: -2deg; }
.focus .fineprint { text-align: center; color: var(--muted); font-size: 15px; margin: 24px auto 0; max-width: 40em; }

/* Privacy */

.privacy { padding: clamp(80px, 10vw, 140px) 0; }
.rules { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 48px; border-top: 2px solid var(--ink); }
.rule { display: grid; grid-template-columns: 56px 1fr; gap: 16px; padding: 28px 0; border-bottom: 1px solid var(--line); }
.rule .n { font-family: var(--display); font-weight: 800; font-size: 28px; color: var(--olive); line-height: 1; }
.rule h3 { font-family: var(--display); font-weight: 700; font-size: 24px; line-height: 1.1; letter-spacing: -0.01em; margin-bottom: 6px; }
.rule p { margin: 0; color: var(--muted); }
.privacy .more { margin-top: 24px; font-size: 15px; }

/* Join */

.join-section { text-align: center; padding: clamp(80px, 10vw, 140px) 0 clamp(60px, 8vw, 100px); }
.join-section h2 { font-size: clamp(64px, 12vw, 190px); color: var(--olive); }
.join-section p { color: var(--ink2); font-size: 18px; margin: 28px auto 32px; max-width: 30em; }

/* Footer: links, then the wordmark across the page */

.site-footer { padding: 32px 0 0; overflow: hidden; }
.site-footer .row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px 32px; padding-top: 24px; border-top: 1px solid var(--line); color: var(--muted); font-size: 15px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--ink); text-decoration: underline; }
.site-footer p { margin: 0; }
.footer-mark { display: block; font-family: var(--display); font-weight: 700; font-size: 25vw; line-height: 0.8; letter-spacing: -0.03em; color: var(--ink); text-align: center; margin: 24px 0 0; padding-bottom: 0.04em; user-select: none; }

/* About page */

.hero.about-hero { min-height: 0; padding-bottom: clamp(16px, 3vw, 48px); justify-items: center; }
.about-hero .label { position: relative; z-index: 2; margin-bottom: 20px; }

.meaning { padding: 0 0 clamp(60px, 8vw, 100px); }
.meaning-card { background: var(--olive); color: var(--on-olive); border-radius: 32px; padding: clamp(32px, 6vw, 72px); display: grid; grid-template-columns: auto 1fr; align-items: end; gap: 24px 56px; }
.meaning-card .label { color: var(--on-olive); grid-column: 1 / -1; opacity: 0.8; }
.meaning-card h2 { font-family: var(--display); font-weight: 700; font-stretch: 100%; text-transform: none; letter-spacing: -0.03em; font-size: clamp(72px, 13vw, 200px); line-height: 0.8; }
.meaning-card h2 .me { color: var(--ivory); }
.meaning-card h2 .dot { color: var(--liquid-front); }
.meaning-card p { margin: 0; font-family: var(--display); font-weight: 600; font-size: clamp(20px, 2.2vw, 30px); line-height: 1.25; max-width: 22em; }

.countdown { display: block; margin-top: 6px; font-weight: 600; color: var(--olive-text); }
.countdown:empty { display: none; }

.founders-section { padding: clamp(80px, 10vw, 140px) 0 0; }
.founders { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 24px; }
.founder { background: var(--card); border-radius: 28px; padding: clamp(28px, 4vw, 48px); box-shadow: inset 0 0 0 1px var(--line); display: grid; justify-items: start; gap: 6px; }
.founder .mono { width: clamp(96px, 11vw, 140px); aspect-ratio: 1; border-radius: 50%; border: 1.5px solid var(--ink); background: linear-gradient(to bottom, var(--card) 50%, var(--liquid-back) 50%, var(--liquid-front)); display: grid; place-items: center; margin-bottom: 20px; overflow: hidden; }
.founder .mono span { font-family: var(--display); font-weight: 800; font-size: clamp(32px, 3.6vw, 46px); color: var(--ink); letter-spacing: -0.02em; }
.founder h3 { font-size: clamp(38px, 4.4vw, 64px); color: var(--olive); }
.founder small { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.02em; color: var(--muted); margin-top: 8px; }
.founders .with { font-family: var(--display); font-weight: 700; font-size: clamp(28px, 3vw, 40px); color: var(--ink); rotate: -8deg; background: var(--ivory); border: 2px solid var(--olive); border-radius: 999px; padding: 4px 20px 8px; }

.rules.three { grid-template-columns: repeat(3, 1fr); }

.teaser .section-top { margin-bottom: 24px; }
.teaser h2 .with-word { color: var(--olive); }
.teaser-link { text-align: center; margin: 0; }

/* Events page */

.events { padding: 0 0 clamp(60px, 8vw, 100px); }
.event { display: grid; grid-template-columns: auto 1fr; gap: clamp(24px, 4vw, 56px); background: var(--card); border-radius: 32px; padding: clamp(24px, 4vw, 48px); box-shadow: inset 0 0 0 1px var(--line); }
.event-date { width: clamp(110px, 13vw, 170px); aspect-ratio: 4 / 5; border-radius: 24px; background: var(--olive); color: var(--on-olive); display: grid; place-content: center; justify-items: center; text-align: center; rotate: -4deg; align-self: start; }
.event-date .month, .event-date .weekday { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; }
.event-date .day { font-family: var(--display); font-weight: 800; font-size: clamp(64px, 8vw, 104px); line-height: 0.9; }
.event-body h2 { font-size: clamp(44px, 6.4vw, 92px); color: var(--olive); margin: 12px 0 16px; }
.event-body h2 .x { color: var(--ink); }
.event-lede { font-size: 18px; color: var(--ink2); margin: 0 0 28px; max-width: 34em; }
.event-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 0 0 28px; border-top: 2px solid var(--ink); padding-top: 20px; }
.event-facts dt { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); margin-bottom: 6px; }
.event-facts dd { margin: 0; font-weight: 500; color: var(--ink); line-height: 1.4; }
.chip-static { display: inline-block; padding: 3px 12px; border-radius: 999px; background: var(--olive-soft); color: var(--olive-text); font-weight: 600; font-size: 14px; }
.schedule { list-style: none; padding: 0; margin: 0 0 32px; display: grid; gap: 8px; }
.schedule li { display: grid; grid-template-columns: 72px 1fr; gap: 12px; align-items: baseline; padding: 12px 16px; border-radius: 14px; background: var(--ivory); }
.schedule time { font-family: var(--display); font-weight: 800; color: var(--olive); }
.event-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }
/* Luma's checkout script styles its button; match the site's primary button instead. */
.event .register a.luma-checkout--button { display: inline-flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 7px 0 24px; border-radius: 999px; background: var(--ink); color: var(--ivory); font-family: "Inter", sans-serif; font-weight: 600; font-size: 16px; line-height: 1; text-decoration: none; white-space: nowrap; box-shadow: none; border: 0; }
.event .register a.luma-checkout--button i { width: 38px; height: 38px; border-radius: 50%; background: var(--olive); color: var(--on-olive); display: grid; place-items: center; transition: transform 0.25s ease; }
.event .register a.luma-checkout--button svg { width: 16px; height: 16px; }
.event .register a.luma-checkout--button:hover { opacity: 1; }
.event .register a.luma-checkout--button:hover i { transform: rotate(45deg); }
.link-out { color: var(--olive-text); font-weight: 500; font-size: 15px; }
.event-past { margin: 0; font-weight: 600; color: var(--ink2); }
.event .fineprint { margin: 16px 0 0; font-size: 13px; color: var(--muted); }

/* Home: next event card */
.next-event { padding: clamp(60px, 8vw, 100px) 0 0; }
.next-card { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: clamp(20px, 3vw, 40px); background: var(--olive); color: var(--on-olive); border-radius: 28px; padding: clamp(20px, 3vw, 36px); text-decoration: none; }
.next-card .event-date { background: var(--ivory); color: var(--olive); width: clamp(84px, 9vw, 116px); }
.next-card .event-date .day { font-size: clamp(48px, 5.4vw, 72px); }
.next-card .label { color: var(--on-olive); opacity: 0.8; margin-bottom: 6px; }
.next-card h2 { font-size: clamp(32px, 4.6vw, 64px); }
.next-card p { margin: 8px 0 0; opacity: 0.85; }
.next-card .go { width: 56px; height: 56px; border-radius: 50%; background: var(--ivory); color: var(--olive); display: grid; place-items: center; transition: transform 0.25s ease; }
.next-card .go svg { width: 22px; height: 22px; }
.next-card:hover .go { transform: rotate(45deg); }

/* Account page */

.account .wrap { max-width: 880px; }
.form-card { display: grid; gap: 16px; max-width: 440px; background: var(--card); border-radius: 24px; padding: 28px; box-shadow: inset 0 0 0 1px var(--line); margin-bottom: 20px; }
.form-card label, dialog label { display: grid; gap: 6px; font-size: 14px; font-weight: 500; color: var(--ink); }
.form-card input, dialog input { font: inherit; font-size: 16px; padding: 13px 16px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--ivory); color: var(--ink); width: 100%; }
.form-card input:focus-visible, dialog input:focus-visible { outline: none; border-color: var(--olive); box-shadow: 0 0 0 3px var(--olive-soft); }
.form-msg { margin: 0; font-size: 14px; line-height: 1.4; }
.form-msg.error { color: var(--danger); font-weight: 500; }
.form-msg.ok { color: var(--ink2); }
.form-note { color: var(--muted); font-size: 15px; }
button.button { border: 0; cursor: pointer; justify-self: start; }
button.button:disabled { opacity: 0.6; cursor: progress; }
.button.ghost { background: var(--raised); color: var(--ink); padding: 0 22px; }
.button.danger { background: var(--danger); color: var(--ivory); padding: 0 22px; }
.link-button { background: none; border: 0; padding: 0; font: inherit; font-size: 15px; color: var(--olive-text); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; justify-self: start; }

.profile { display: flex; align-items: center; gap: 24px; margin-bottom: 32px; }
.profile h1 { margin-bottom: 4px; }
.profile .updated { margin: 0; }
.avatar { width: clamp(88px, 12vw, 120px); aspect-ratio: 1; border-radius: 50%; overflow: hidden; flex: none; box-shadow: 0 10px 30px rgba(21, 24, 15, 0.18); }
.avatar svg { width: 100%; height: 100%; display: block; }
.account-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.panel-card { background: var(--card); border-radius: 20px; padding: 22px; box-shadow: inset 0 0 0 1px var(--line); display: grid; gap: 10px; align-content: start; }
.account .panel-card h2 { font-family: var(--display); font-size: 20px; margin: 0; }
.panel-card p { margin: 0; color: var(--muted); font-size: 15px; }
.panel-card .code { font-family: var(--display); font-weight: 800; font-size: 28px; letter-spacing: 0.06em; color: var(--olive); }
.danger-zone { margin-top: 48px; padding-top: 28px; border-top: 1px solid var(--line); display: grid; gap: 12px; }
.account .danger-zone h2 { margin: 0; }
.danger-zone p { margin: 0; max-width: 36em; }

dialog { border: 0; border-radius: 24px; padding: 28px; width: min(440px, calc(100% - 32px)); background: var(--card); color: var(--ink); box-shadow: 0 30px 80px rgba(0, 0, 0, 0.3); }
dialog::backdrop { background: rgba(21, 24, 15, 0.45); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
dialog form { display: grid; gap: 16px; }
dialog h2 { font-family: var(--display); font-size: 26px; margin: 0; }
dialog p { margin: 0; color: var(--ink2); }
.dialog-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }

/* Document pages */

.doc { padding: 48px 0 80px; }
.doc .wrap { max-width: 760px; }
.doc h1 { font-family: var(--display); font-weight: 800; font-stretch: 82%; text-transform: uppercase; font-size: clamp(48px, 8vw, 88px); line-height: 0.9; color: var(--olive); margin-bottom: 16px; }
.doc .updated { color: var(--muted); font-size: 15px; margin: 0 0 40px; }
.doc h2 { font-family: var(--display); font-size: 28px; margin: 48px 0 12px; letter-spacing: -0.01em; line-height: 1.1; }
.doc h3 { font-size: 18px; margin: 28px 0 8px; }
.doc p, .doc li { color: var(--ink2); }
.doc ul, .doc ol { padding-left: 22px; }
.doc li { margin: 6px 0; }
.doc li::marker { color: var(--olive); }
.doc strong { color: var(--ink); font-weight: 600; }
.doc .summary { background: var(--olive-soft); border-radius: 20px; padding: 24px 28px; }
.doc .summary h2 { margin-top: 0; font-size: 22px; }
.doc .summary ul { margin-bottom: 0; }

.table-scroll { overflow-x: auto; margin: 16px 0; border-radius: 16px; box-shadow: inset 0 0 0 1px var(--line); }
table { width: 100%; border-collapse: collapse; font-size: 15px; min-width: 560px; }
th, td { text-align: left; vertical-align: top; padding: 12px 16px; border-bottom: 1px solid var(--line); }
th { font-weight: 600; color: var(--ink); background: var(--raised); }
td { color: var(--ink2); }
tr:last-child td { border-bottom: 0; }

.steps-list { counter-reset: step; list-style: none; padding: 0 !important; display: grid; gap: 10px; }
.steps-list li { counter-increment: step; display: flex; gap: 14px; align-items: flex-start; background: var(--card); border-radius: 16px; padding: 14px 18px; box-shadow: inset 0 0 0 1px var(--line); margin: 0; }
.steps-list li::before { content: counter(step); width: 28px; height: 28px; flex: none; border-radius: 8px; display: grid; place-items: center; background: var(--olive); color: var(--on-olive); font-family: var(--display); font-weight: 700; font-size: 14px; }

details { background: var(--card); border-radius: 16px; box-shadow: inset 0 0 0 1px var(--line); margin: 10px 0; }
summary { cursor: pointer; padding: 18px 22px; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; color: var(--olive); font-weight: 500; font-size: 20px; line-height: 1; }
details[open] summary::after { content: "–"; }
details > div { padding: 0 22px 18px; }
details > div p { margin: 0 0 10px; }

.contact-card { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; background: var(--olive-soft); border-radius: 20px; padding: 24px 28px; margin: 24px 0 8px; }
.contact-card p { margin: 0; }
.contact-card .addr { font-weight: 600; color: var(--ink); word-break: break-all; }

/* Smaller screens */

@media (max-width: 1180px) {
  .topbar { grid-template-columns: auto 1fr; grid-template-areas: "logo right" "nav nav"; padding: 12px 16px 10px; }
  .tb-nav { margin: 0 -16px; padding: 0 16px 2px; }
  .status { display: none; }
}

@media (max-width: 960px) {
  .section-top { grid-template-columns: 1fr; text-align: left; }
  .section-top h2 { text-align: left; }
  .section-top p { justify-self: start; }
  .cards { grid-template-columns: 1fr; max-width: 520px; }
  .card .scene { aspect-ratio: 5 / 4; }
  .rules, .rules.three { grid-template-columns: 1fr; }
  .meaning-card { grid-template-columns: 1fr; }
  .account-grid { grid-template-columns: 1fr; }
  .event { grid-template-columns: 1fr; }
  .event-facts { grid-template-columns: 1fr; }
  .next-card { grid-template-columns: auto 1fr; }
  .next-card .go { display: none; }
  .founders { grid-template-columns: 1fr; justify-items: stretch; }
  .founders .with { justify-self: center; }
  .track { aspect-ratio: auto; display: grid; gap: 40px; padding-left: 52px; }
  .stop { position: static; max-width: none; }
  .bubble { margin-left: 0; }
}

@media (max-width: 760px) {
  .topbar { padding: 10px 12px 8px; }
  .tb-nav { margin: 0; padding: 0; flex-wrap: wrap; overflow: visible; gap: 6px; }
  .tb-right { gap: 8px; }
  .chip { min-height: 32px; padding: 0 12px; font-size: 14px; }
  .logo { font-size: 26px; }
  /* With the script running, the links fold into a dropdown behind the menu button. */
  .has-menu .topbar { grid-template-areas: "logo right"; padding-bottom: 10px; }
  .has-menu .tb-right .signin { display: none; }
  .has-menu .menu-btn { display: grid; }
  .has-menu .tb-nav { position: absolute; top: calc(100% + 6px); left: 12px; right: 12px; flex-direction: column; flex-wrap: nowrap; gap: 2px; padding: 8px; border-radius: 22px; background: var(--ivory); box-shadow: inset 0 0 0 1px var(--line), 0 18px 40px rgba(0, 0, 0, 0.18); opacity: 0; visibility: hidden; transform: translateY(-8px); transition: opacity 0.2s ease, transform 0.2s ease, visibility 0s linear 0.2s; }
  .has-menu .menu-open .tb-nav { opacity: 1; visibility: visible; transform: none; transition: opacity 0.2s ease, transform 0.2s ease; }
  .has-menu .tb-nav .chip { min-height: 52px; padding: 0 18px; font-size: 20px; background: transparent; box-shadow: none; border-radius: 16px; }
  .has-menu .tb-nav .chip:hover, .has-menu .tb-nav .chip[aria-current="page"] { background: var(--card); color: var(--ink); }
  .has-menu .tb-nav .menu-only { display: inline-flex; }
  .hero { min-height: 0; padding-bottom: 56vw; }
  .hero h1 { display: flex; flex-wrap: wrap; justify-content: center; }
  .hero h1 .line { flex-basis: 100%; }
  .tag { position: relative; left: auto; top: auto; margin: 18px 3px 0; }
  .loop { width: 96px; stroke-width: 22; }
  .loop.left { left: -50px; top: auto; bottom: 10%; }
  .loop.right { right: -50px; top: -4%; }
  .hero-orb { width: 114vw; }
  .ribbon-wrap { margin-top: -12vw; margin-bottom: -8vw; }
  .about { padding-top: 48px; }
  .ribbon { width: 140%; margin: 0 -20%; }
  .ribbon .band { stroke-width: 136; }
  .ribbon text { font-size: 64px; }
  .wrap { padding: 0 16px; }
}

@media (max-width: 520px) {
  body { font-size: 16px; }
  .tag { font-size: 11px; padding: 6px 12px; }
  .reveal .pin { font-size: 12px; padding: 6px 12px; }
  .rule { grid-template-columns: 40px 1fr; }
  .table-scroll { box-shadow: none; overflow: visible; }
  table { min-width: 0; }
  thead { display: none; }
  table, tbody, tr, td { display: block; }
  tr { background: var(--card); border-radius: 16px; box-shadow: inset 0 0 0 1px var(--line); padding: 14px 18px; margin-bottom: 10px; }
  td { border: 0; padding: 4px 0; }
  td:first-child { color: var(--ink); font-weight: 600; }
  td[data-label]:not(:first-child)::before { content: attr(data-label); display: block; color: var(--muted); font-size: 13px; font-weight: 500; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .loop path { stroke-dashoffset: 0; }
}
