/* ==========================================================================
   Birkly — front page template (iteration 2)
   Layout idea: a wide wrapper, generous white space, and content grouped in
   soft borderless boxes. Separation comes from space and fill, not lines.
   ========================================================================== */

:root {
  /* colour */
  --paper:   #f6f6f2;
  --surface: #ffffff;
  --ink:     #16172b;
  --muted:   #5d5f70;
  --soft:    #e4e4dc;   /* skeleton bars, quiet fills */
  --accent:  #7fe3dc;
  --accent-ink: #0b6f6a;
  --sand:    #f1e3b4;
  --rose:    #f6c1cf;
  --sky:     #bcd9f7;

  /* type */
  --serif: "Newsreader", "Iowan Old Style", Georgia, serif;
  --sans:  "Geist", "Helvetica Neue", Arial, sans-serif;
  --mono:  "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* space */
  --frame:  1560px;                       /* wrapper width */
  --gutter: clamp(20px, 4vw, 64px);       /* wrapper side padding */
  --space:  clamp(96px, 12vw, 184px);     /* between sections */
  --gap:    clamp(12px, 1.4vw, 20px);     /* between boxes */
  --box:    clamp(28px, 3.2vw, 52px);     /* padding inside boxes */
  --r-box:  24px;
  --r-big:  32px;
  --r-sm:   10px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;   /* the hero waves bleed past the wrapper */
}
h1, h2, h3, h4, p, ul, ol, pre { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
button, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent-ink); outline-offset: 3px; }

[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 8px; }
.skip:focus { top: 12px; }

/* ---------- type ---------- */
h1, h2, h3 { font-family: var(--serif); font-weight: 400; letter-spacing: -0.015em; text-wrap: balance; }
h1 { font-size: clamp(46px, 7.6vw, 124px); line-height: 1; letter-spacing: -0.03em; max-width: 13ch; }
h2 { font-size: clamp(32px, 4.4vw, 68px); line-height: 1.06; letter-spacing: -0.02em; max-width: 18ch; }
h3 { font-size: clamp(24px, 2vw, 30px); line-height: 1.15; }
h1 em { font-style: italic; }
.dot { color: var(--accent); }
.lead { font-size: clamp(17px, 1.4vw, 21px); color: var(--muted); max-width: 50ch; }

.eyebrow { font: 400 13px/1 var(--mono); color: var(--muted); margin-bottom: 28px; }
.eyebrow mark { background: none; color: var(--accent-ink); }
.num { font: 400 13px/1 var(--mono); color: var(--accent-ink); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 52px; padding: 0 26px; border-radius: 999px; border: 0;
  font-weight: 500; font-size: 16px; white-space: nowrap; cursor: pointer;
  transition: background-color .15s, transform .15s;
}
.btn:active { transform: translateY(1px); }
.btn--sm { height: 40px; padding: 0 18px; font-size: 14px; }
.btn--accent { background: var(--accent); color: var(--ink); }
.btn--accent:hover { background: #63d6ce; }
.btn--dark { background: var(--ink); color: #fff; }
.btn--dark:hover { background: #2a2c48; }
.btn--ghost { background: var(--surface); }
.btn--ghost:hover { background: var(--soft); }
.btn--ghost-inv { background: rgba(255,255,255,.1); color: #fff; }
.btn--ghost-inv:hover { background: rgba(255,255,255,.2); }

/* ---------- wrapper ---------- */
.frame, .nav__bar { max-width: var(--frame); margin-inline: auto; }
.frame { padding-inline: var(--gutter); }

/* ---------- nav ---------- */
.nav { position: sticky; top: 14px; z-index: 50; padding-inline: var(--gutter); margin-top: 14px; }
.nav__bar {
  height: 64px; display: flex; align-items: center; gap: 20px; padding: 0;
  background: rgba(255,255,255,.66); -webkit-backdrop-filter: blur(18px) saturate(1.5); backdrop-filter: blur(18px) saturate(1.5);
  border-radius: 18px; box-shadow: inset 0 0 0 1px rgba(255,255,255,.7);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.7), 0 1px 0 rgba(22,23,43,.04), 0 12px 32px -24px rgba(22,23,43,.3);
}
/* left end: a light sand wash behind the logo, fading under the first links */
.nav__brand {
  align-self: stretch; display: flex; align-items: center; flex: none;
  --wash: clamp(150px, 13vw, 220px);
  padding: 0 var(--wash) 0 26px; margin-right: calc(40px - var(--wash)); border-radius: 18px 0 0 18px;
  background: linear-gradient(90deg, rgba(255,255,255,.95) 0%, rgba(255,255,255,.75) 34%, rgba(255,255,255,.3) 66%, rgba(255,255,255,0) 100%);
}
.nav__brand img { display: block; height: 30px; width: auto; transform: translateY(3px); }
/* right end: the main sponsor, fading in from the bar */
.nav__sponsor {
  align-self: stretch; display: grid; align-content: center; justify-items: end; flex: none;
  --wash: clamp(170px, 15vw, 260px);
  padding: 0 24px 0 var(--wash); margin-left: calc(28px - var(--wash)); border-radius: 0 18px 18px 0;
  background: linear-gradient(90deg, rgba(255,254,199,0) 0%, rgba(255,254,199,.6) 30%, #FFFEC7 62%, #FFFEC7 100%);
  transition: filter .2s;
}
.nav__sponsor:hover { filter: saturate(1.25); }
.nav__sponsor { position: relative; z-index: 0; }
.nav__sponsor > * { position: relative; }
.nav__sponsor small { font: 400 10px/1 var(--sans); color: rgba(22,23,43,.7); margin-bottom: 4px; }
.nav__sponsor img { display: block; height: 26px; width: auto; }
.nav__menu-sponsor img { height: 24px; width: auto; }
.nav__menu-sponsor { display: none; }
.nav__sponsor-mark { font: 600 22px/1 var(--sans); letter-spacing: -0.02em; color: var(--accent-ink); white-space: nowrap; }
.logo {
  font: 500 20px/1 var(--serif); letter-spacing: -0.01em;
  background: var(--ink); color: var(--sand);
  padding: 10px 12px 11px; border-radius: 8px;
}
.nav__links { display: flex; gap: 4px; margin-right: auto; }
.nav__links a { position: relative; padding: 9px 14px; border-radius: 10px; font-size: 15px; color: var(--muted); transition: color .2s, background-color .2s; }
.nav__links a::after { content: ""; position: absolute; left: 50%; bottom: 3px; width: 18px; height: 3px; margin-left: -9px; border-radius: 3px; background: var(--accent-ink); transform: scaleX(0); transition: transform .3s cubic-bezier(.2,.7,.2,1), background-color .2s; }
.nav__links a:hover { color: var(--ink); background: rgba(22,23,43,.06); }
.nav__links a:hover::after { transform: scaleX(.45); background: var(--accent); }
.nav__end { display: flex; align-items: center; gap: 10px; margin-left: auto; position: relative; z-index: 1; }
.nav__links { position: relative; z-index: 1; }
.lang select { border: 0; background: transparent; border-radius: 10px; height: 40px; padding: 0 8px; font: 400 13px var(--mono); cursor: pointer; }
.lang select:hover { background: var(--paper); }
.nav__toggle { display: none; width: 40px; height: 40px; border: 0; border-radius: 10px; background: var(--paper); cursor: pointer; padding: 0; }
.nav__toggle span { display: block; width: 16px; height: 1.5px; background: var(--ink); margin: 4px auto; transition: transform .2s; }
.nav__toggle[aria-expanded="true"] span:first-child { transform: translateY(2.75px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:last-child { transform: translateY(-2.75px) rotate(-45deg); }

/* ---------- sections + boxes ---------- */
.section { padding-top: var(--space); }
.section__head { margin-bottom: clamp(40px, 5vw, 80px); }
.section__head--row { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; }

.cells { display: grid; gap: var(--gap); }
.cells--2 { grid-template-columns: repeat(2, 1fr); }
.cells--3 { grid-template-columns: repeat(3, 1fr); }
.cells--4 { grid-template-columns: repeat(4, 1fr); }
.cell { background: var(--surface); border-radius: var(--r-box); padding: var(--box); min-width: 0; }
a.cell { transition: transform .2s ease, box-shadow .2s ease; }
a.cell:hover { transform: translateY(-3px); box-shadow: 0 24px 40px -28px rgba(22,23,43,.35); }

/* ---------- hero ---------- */
/* centred and compact, so the product box is already in view on load */
.hero__copy { padding: clamp(48px, 6vw, 96px) 0 clamp(40px, 4.5vw, 72px); display: grid; justify-items: center; text-align: center; }
.hero h1 { font-size: clamp(42px, 6vw, 92px); max-width: 17ch; }
.hero .lead { margin-top: clamp(20px, 2vw, 32px); max-width: 58ch; }
.pill { display: inline-flex; align-items: center; gap: 8px; font: 400 13px/1 var(--mono); color: var(--muted); background: var(--surface); padding: 10px 14px; border-radius: 999px; margin-bottom: 28px; }
.pill mark { background: none; color: var(--accent-ink); }
.pill__dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent-ink); }
.hero__cta { display: flex; gap: 10px; flex-wrap: wrap; }
.hero .hero__cta { justify-content: center; margin-top: clamp(28px, 3vw, 44px); }

.stage { background: var(--accent); border-radius: var(--r-big); padding: clamp(20px, 5.5vw, 96px) clamp(16px, 6vw, 112px) 0; overflow: hidden; }
/* hero: screenshot and numbers share one rounded teal box; the cut between them is straight */
.showcase { border-radius: var(--r-big); overflow: hidden; }
.showcase .stage { border-radius: 0; }
.showcase .shot { box-shadow: 0 24px 60px -30px rgba(22,23,43,.45); }
.shot { margin: 0; background: #f1f1ea; border-radius: 16px 16px 0 0; overflow: hidden; box-shadow: 0 40px 80px -24px rgba(22,23,43,.45); }
.shot__bar { display: flex; gap: 7px; padding: 14px 16px; background: var(--surface); }
.shot__bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--soft); }
.shot img { display: block; width: 100%; height: auto; aspect-ratio: 2 / 1; object-fit: cover; object-position: 0 0; }


/* ---------- organic line waves (drawn by main.js) ----------
   A background layer only. Each line is more transparent the lower it sits
   (set per line in main.js), and the layer itself dissolves at its bottom edge. */
.waves { position: absolute; pointer-events: none; -webkit-mask-image: linear-gradient(to bottom, #000 60%, transparent); mask-image: linear-gradient(to bottom, #000 60%, transparent); }
/* page layer: exactly one viewport tall, from the very top, bleeding to the window edges.
   Never narrower than 1000px, so the curves stay long and calm on phones. */
/* the clip box keeps the extra-wide lines from widening the page on phones */
.waves-clip { position: absolute; top: 0; left: 0; width: 100%; height: 100vh; overflow: hidden; pointer-events: none; z-index: -1; }
.waves--page { top: 0; left: 50%; width: max(100vw, 1000px); height: 100%; transform: translateX(-50%); }
.cta { position: relative; overflow: hidden; }
.cta > :not(.waves) { position: relative; z-index: 1; }
.cta .waves { left: 50%; top: 0; width: max(100%, 1000px); height: 100%; transform: translateX(-50%); z-index: 0; }

/* ---------- stats: plain numbers under the hero box ---------- */
.stats { --stats-gap: 1px; display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--stats-gap); margin-top: var(--stats-gap); }
.stat { display: grid; gap: 10px; align-content: start; background: var(--surface); padding: clamp(22px, 2.4vw, 36px); }
.stat strong { font: 400 clamp(44px, 5.4vw, 84px)/1 var(--serif); letter-spacing: -0.03em; }
.stat span { color: var(--muted); }

/* ---------- pixel icons ---------- */
.px { display: block; fill: currentColor; }
.px .px-a { fill: var(--accent); }

/* ---------- cards ---------- */
.card { display: grid; align-content: space-between; gap: 56px; min-height: clamp(280px, 24vw, 380px); }
.card h3 { font-size: clamp(26px, 2.8vw, 40px); margin-bottom: 16px; max-width: 16ch; }
.card p, .step p, .use p { color: var(--muted); max-width: 44ch; }
.plug p { color: var(--muted); }

/* ---------- audience: four panels, one open ---------- */
.ticks { display: grid; gap: 18px; font-size: clamp(16px, 1.3vw, 19px); }
.ticks li { padding-left: 34px; position: relative; }
.ticks li::before { content: ""; position: absolute; left: 2px; top: .5em; width: 12px; height: 6px; border-left: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(-45deg); }

.seats { display: flex; gap: var(--gap); height: clamp(460px, 36vw, 580px); }
.seat { flex: 1 1 0; min-width: 0; position: relative; overflow: hidden; display: flex; flex-direction: column; border-radius: var(--r-big); background: var(--bg); color: var(--fg); transition: flex-grow .6s cubic-bezier(.2,.7,.2,1); }
.seat.is-open { flex-grow: 7; }
.seat--ink  { --bg: var(--ink);    --fg: #fff; --sub: #b3b5c6; }
.seat--sand { --bg: var(--sand);   --fg: var(--ink); --sub: rgba(22,23,43,.72); }
.seat--rose { --bg: var(--rose);   --fg: var(--ink); --sub: rgba(22,23,43,.72); }
.seat--teal { --bg: var(--accent); --fg: var(--ink); --sub: rgba(22,23,43,.72); }
.seat--sky  { --bg: var(--sky);    --fg: var(--ink); --sub: rgba(22,23,43,.72); }
.seat--ink .ticks li::before { border-color: var(--accent); }

.seat__head { display: flex; align-items: baseline; gap: 14px; padding: var(--box); border: 0; background: none; color: inherit; text-align: left; cursor: pointer; font: 400 13px/1 var(--mono); }
.seat.is-open .seat__head { cursor: default; }
.seat:not(.is-open) .seat__head { position: absolute; inset: 0; flex-direction: column; justify-content: space-between; align-items: flex-start; padding: clamp(20px, 2vw, 32px); }
.seat:not(.is-open) .seat__name { writing-mode: vertical-rl; transform: rotate(180deg); font: 400 clamp(24px, 2.2vw, 32px)/1 var(--serif); letter-spacing: -0.01em; white-space: nowrap; }
.seat:not(.is-open):hover { filter: brightness(1.04); }
.seat--ink:not(.is-open):hover { filter: brightness(1.35); }

.seat__body { margin-top: auto; padding: 0 var(--box) var(--box); min-width: 480px; display: grid; gap: clamp(28px, 3vw, 48px); opacity: 0; visibility: hidden; transition: opacity .25s ease, visibility 0s .25s; }
.seat.is-open .seat__body { opacity: 1; visibility: visible; transition: opacity .4s ease .3s, visibility 0s; }
.seat__body h3 { font-size: clamp(30px, 3.6vw, 56px); line-height: 1.05; letter-spacing: -0.02em; max-width: 15ch; margin-bottom: 20px; }
.seat__body p { color: var(--sub); max-width: 44ch; }
@media (min-width: 1280px) {
  .seat__body { grid-template-columns: 1.4fr 1fr; align-items: end; }
}

/* ---------- steps: one example ("blog") carried through three boxes ---------- */
.step { display: grid; gap: 14px; align-content: start; padding: var(--gap); padding-bottom: var(--box); }
.step > :not(.step__art) { padding-inline: calc(var(--box) - var(--gap)); }
.step__art { background: var(--paper); border-radius: calc(var(--r-box) - 8px); padding: clamp(20px, 2.4vw, 36px); min-height: 330px; display: grid; align-items: center; margin-bottom: 24px; overflow: hidden; }
.mini { display: grid; gap: 8px; font-size: 14px; min-width: 0; }
.mini__head { display: flex; align-items: center; gap: 10px; font: 400 13px var(--mono); color: var(--muted); margin-bottom: 8px; }
.mini__row { display: grid; grid-template-columns: 72px 1fr; align-items: center; gap: 12px; padding: 12px 14px; background: var(--surface); border-radius: var(--r-sm); font: 400 13px/1.45 var(--mono); }
.mini__row span { color: var(--muted); }
.mini__row em { font-style: normal; color: var(--accent-ink); justify-self: end; }
.mini__row b { font: 400 14px/1.4 var(--sans); }
.mini__img { display: block; height: 40px; border-radius: 6px; background: repeating-linear-gradient(135deg, var(--paper) 0 8px, var(--soft) 8px 16px); }
.mini--code { font: 400 13.5px/1.9 var(--mono); background: var(--surface); border-radius: var(--r-sm); padding: 16px 18px; overflow-x: auto; }
.mini--code i { font-style: normal; color: var(--accent-ink); }

/* ---------- setups: how a site is built up from the same parts ---------- */
.blk { display: inline-block; font: 400 13px/1 var(--mono); padding: 7px 10px; border-radius: 7px; background: var(--ink); color: #fff; }
.blk--d1 { background: var(--soft); color: var(--ink); }
.need { display: inline-block; font: 400 13px/1 var(--mono); padding: 7px 10px; border-radius: 999px; background: var(--paper); color: var(--muted); white-space: nowrap; }
.need--plugin { background: var(--ink); color: var(--accent); }
.use__tag { font: 400 13px var(--mono); color: var(--muted); }

.tabs__list { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: var(--gap); }
.tabs__list button { padding: 12px 22px; border: 0; border-radius: 999px; background: var(--surface); font-size: 16px; font-weight: 500; color: var(--muted); cursor: pointer; transition: color .15s, background-color .15s; }
.tabs__list button:hover { color: var(--ink); }
.tabs__list button[aria-selected="true"] { background: var(--ink); color: #fff; }

/* one plain table per setup: collection | fields | example entries */
.blk--plugin { background: var(--ink); color: var(--accent); }
.spec { background: var(--surface); border-radius: var(--r-big); padding: var(--box); min-height: 440px; }
.spec[hidden] { display: none; }
.spec__top { display: flex; justify-content: space-between; align-items: baseline; gap: 16px 32px; flex-wrap: wrap; margin-bottom: clamp(24px, 3vw, 44px); }
.spec__top h3 { font-size: clamp(26px, 2.6vw, 38px); letter-spacing: -0.02em; }
.spec__table { display: grid; gap: 8px; }
.spec__row { display: grid; grid-template-columns: minmax(180px, 1fr) 2fr 2.4fr; gap: 12px 24px; align-items: center; background: var(--paper); border-radius: 14px; padding: 14px 18px; }
.spec__row--head { background: none; padding-block: 0 4px; font: 400 13px var(--mono); color: var(--muted); }
.spec__row--d1 .spec__name { padding-left: 28px; }
.spec__row--d2 .spec__name { padding-left: 56px; }
.spec__row--d1 .spec__name::before, .spec__row--d2 .spec__name::before { content: "↳"; color: var(--muted); margin-right: 8px; margin-left: -22px; }
.spec__cell { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.spec__cell--wide { grid-column: 2 / -1; }
.fld { font: 400 13px/1 var(--mono); padding: 7px 10px; border-radius: 7px; background: var(--surface); color: var(--muted); }
.ent { font-size: 15px; line-height: 1; padding: 8px 12px; border-radius: 999px; background: var(--surface); }
.spec__row--plugin { background: var(--accent); margin-top: 8px; }
.spec__row--plugin .ent { background: rgba(255,255,255,.6); }
.spec__row--none { color: var(--muted); font-size: 15px; margin-top: 8px; }

/* ---------- connect ---------- */
.section--split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 96px); align-items: center; }
.split__copy h2 { margin-bottom: 28px; }
.split__box { background: var(--sand); border-radius: var(--r-big); padding: clamp(24px, 5vw, 80px); display: grid; align-items: center; min-height: clamp(280px, 34vw, 520px); min-width: 0; }
.code { background: var(--ink); color: #e9e9f2; border-radius: 16px; overflow: hidden; box-shadow: 0 32px 56px -32px rgba(22,23,43,.5); min-width: 0; }
.code__bar { display: flex; justify-content: space-between; align-items: center; padding: 12px 12px 0 20px; font: 400 13px var(--mono); color: #a4a6b8; }
.code__copy { background: rgba(255,255,255,.1); border: 0; color: #fff; font: 400 13px var(--mono); padding: 7px 12px; border-radius: 8px; cursor: pointer; }
.code__copy:hover { background: rgba(255,255,255,.2); }
.code pre { padding: 20px 20px 28px; font: 400 14px/1.7 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere; }

/* ---------- hub ---------- */
.plug { display: grid; gap: 10px; align-content: start; }
.plug__tile { width: 56px; height: 56px; border-radius: 14px; background: var(--c); display: grid; place-items: center; font: 500 26px var(--serif); margin-bottom: clamp(32px, 5vw, 72px); }

/* ---------- cta ---------- */
.cta { margin-top: var(--space); background: var(--ink); color: #fff; border-radius: var(--r-big); padding: clamp(64px, 10vw, 168px) clamp(28px, 6vw, 112px); display: grid; gap: 24px; justify-items: start; }
.cta h2 { font-size: clamp(38px, 6vw, 96px); line-height: 1; letter-spacing: -0.03em; max-width: 12ch; }
.cta p { color: #b3b5c6; font-size: clamp(17px, 1.4vw, 21px); max-width: 44ch; margin-bottom: 16px; }

/* ---------- story + newsletter ---------- */
.closing { display: grid; grid-template-columns: 1.35fr 1fr; gap: var(--gap); margin-top: var(--gap); }
.closing .cell { border-radius: var(--r-big); padding: clamp(32px, 5vw, 88px) clamp(28px, 4.5vw, 80px); }
.story { display: grid; gap: clamp(24px, 2.4vw, 36px); align-content: start; }
.story .eyebrow, .news .eyebrow { margin-bottom: 0; }
.story__lead { font: 400 clamp(24px, 2.3vw, 36px)/1.2 var(--serif); letter-spacing: -0.015em; max-width: 30ch; }
.story__more { display: grid; gap: 16px; color: var(--muted); max-width: 58ch; }
.story__sig { display: flex; align-items: center; gap: 12px; font-weight: 500; margin-top: clamp(8px, 2vw, 32px); }
.story__sig svg { border-radius: 2px; }
.story__b { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: var(--ink); color: var(--sand); font: 500 22px/1 var(--serif); }

.news { background: var(--sand); display: grid; gap: 40px; align-content: space-between; }
.news > div { display: grid; gap: 20px; }
.news h3 { font-size: clamp(30px, 3.2vw, 48px); line-height: 1.05; letter-spacing: -0.02em; }
.news .eyebrow { color: var(--ink); }
.news__form { display: grid; gap: 10px; }
.news__form label { font-size: 14px; font-weight: 500; }
.news__form label span { font-weight: 400; opacity: .6; }
.news__row { display: flex; gap: 8px; flex-wrap: wrap; }
.news__row input { flex: 1 1 220px; min-width: 0; height: 52px; padding: 0 22px; border: 0; border-radius: 999px; background: var(--surface); font: inherit; color: var(--ink); }
.news__row input::placeholder { color: #9a9ca8; }
.news__note { font-size: 13px; line-height: 1.5; opacity: .75; margin-top: 6px; }

/* ---------- footer ---------- */
.footer { padding: var(--gap) 0 var(--gutter); }
.footer a { transition: color .15s; }
.footer a:hover { color: var(--accent-ink); }
.footer__box { background: var(--surface); border-radius: var(--r-big); padding: clamp(32px, 5vw, 88px) clamp(28px, 6vw, 112px) clamp(28px, 3vw, 48px); }
.footer__top { display: grid; grid-template-columns: 1fr 1.2fr; gap: clamp(40px, 6vw, 120px); align-items: start; }
.footer__logo { display: inline-block; }
.footer__logo img { display: block; height: 40px; width: auto; }
.footer__brand p { font: 400 clamp(24px, 2.2vw, 34px)/1.15 var(--serif); letter-spacing: -0.015em; margin-top: 28px; max-width: 18ch; }
.footer__flags { display: flex; gap: 8px; margin-top: 24px; }
.footer__flags svg { border-radius: 2px; display: block; }
.footer__social { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.footer__social a { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; background: var(--paper); color: var(--ink); transition: background-color .2s, color .2s, transform .25s cubic-bezier(.2,.7,.2,1); }
.footer__social svg { fill: currentColor; display: block; }
.footer__social a:hover { background: var(--ink); color: var(--accent); transform: translateY(-3px); }
.footer__cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.footer__col { display: grid; gap: 12px; align-content: start; justify-items: start; font-size: 16px; }
.footer__col h4 { font: 400 13px var(--mono); color: var(--muted); margin-bottom: 8px; }
.footer__base { display: flex; justify-content: space-between; gap: 12px 32px; flex-wrap: wrap; margin-top: clamp(56px, 7vw, 112px); font: 400 13px var(--mono); color: var(--muted); }
.footer__base a { color: var(--ink); }
.footer__base-end { display: flex; gap: 24px; flex-wrap: wrap; }

/* ==========================================================================
   Sub-pages
   ========================================================================== */
.nav__links a[aria-current] { color: var(--ink); font-weight: 500; background: none; }
.nav__links a[aria-current]::after, .nav__links a[aria-current]:hover::after { transform: scaleX(1); background: var(--accent-ink); }
.nav__links a[aria-current]:hover { background: rgba(22,23,43,.06); }

/* ---------- page hero ---------- */
.phero { padding: clamp(64px, 9vw, 144px) 0 clamp(8px, 2vw, 32px); }
.phero h1 { font-size: clamp(44px, 6.6vw, 104px); max-width: 15ch; }
.phero .lead { margin-top: clamp(24px, 2.4vw, 36px); max-width: 58ch; }
.phero .hero__cta { margin-top: clamp(28px, 3vw, 44px); }

/* ---------- small shared pieces ---------- */
.kicker { font: 400 13px/1.4 var(--mono); color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.doclinks { font-size: 14px; color: var(--muted); margin-top: 28px; }
.doclinks a, .prose a, .textlink { color: var(--ink); text-decoration: none; border-radius: 3px; background: linear-gradient(var(--accent), var(--accent)) no-repeat 0 100% / 100% 1.5px; box-decoration-break: clone; -webkit-box-decoration-break: clone; transition: background-size .35s cubic-bezier(.2,.7,.2,1); padding-bottom: 1px; }
.doclinks a:hover, .prose a:hover, .textlink:hover { background-size: 100% 100%; }
.stack { display: grid; gap: 20px; align-content: start; }
.stack--lg { gap: clamp(28px, 3vw, 44px); }
.section--tight { padding-top: var(--gap); }
.tile { width: 48px; height: 48px; border-radius: 12px; background: var(--c, var(--paper)); color: var(--ink); display: grid; place-items: center; font: 500 22px var(--serif); }
.stage--sm { padding: clamp(20px, 4vw, 64px) clamp(16px, 5vw, 88px) 0; background: var(--c, var(--accent)); }
.section--split .stage { align-self: stretch; }
.section--split .shot img { aspect-ratio: 4 / 3; }

/* coloured boxes */
.cell--ink  { background: var(--ink); color: #fff; }
.cell--sand { background: var(--sand); }
.cell--rose { background: var(--rose); }
.cell--teal { background: var(--accent); }
.cell--sky  { background: var(--sky); }
.cell--soft { background: #ecece6; }
.cell--ink p, .cell--ink .kicker { color: #b3b5c6; }
.cell--sand p, .cell--rose p, .cell--teal p, .cell--sky p, .cell--sand .kicker, .cell--rose .kicker, .cell--teal .kicker, .cell--sky .kicker { color: rgba(22,23,43,.74); }
.cell--big { border-radius: var(--r-big); padding: clamp(32px, 5vw, 88px) clamp(28px, 4.5vw, 80px); }
.cell h3 + p, .cell .kicker + h3 { margin-top: 12px; }
.cell--span2 { grid-column: span 2; }

/* plain rows: label left, value right */
.rowlist { display: grid; gap: 8px; }
.rowlist li { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 14px 18px; border-radius: 12px; background: var(--paper); }
.cell--ink .rowlist li { background: rgba(255,255,255,.07); }
.rowlist li.is-sub { margin-left: 28px; }

/* link rows: a dark fill sweeps in from the left, the arrow slides on and turns teal */
.rowlist--links li { position: relative; padding: 18px 22px; background: var(--paper) linear-gradient(var(--ink), var(--ink)) no-repeat left / 0% 100%; transition: background-size .45s cubic-bezier(.2,.7,.2,1), color .25s; font-weight: 500; }
.rowlist--links a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.rowlist--links li > span { display: inline-block; transition: transform .45s cubic-bezier(.2,.7,.2,1), color .25s; }
.rowlist--links li:hover, .rowlist--links li:focus-within { background-size: 100% 100%; color: #fff; }
.rowlist--links li:hover > span, .rowlist--links li:focus-within > span { transform: translateX(6px) rotate(-45deg); color: var(--accent); }
.section--split-news { grid-template-columns: 1.35fr 1fr; gap: var(--gap); }

/* definition rows (Agent Guide) */
.defs { display: grid; gap: 8px; }
.defs div { display: grid; grid-template-columns: 220px 1fr; gap: 16px; padding: 14px 18px; border-radius: 12px; background: rgba(255,255,255,.07); }
.defs dt { font: 400 13px/1.5 var(--mono); color: var(--accent); }
.defs dd { margin: 0; color: #b3b5c6; font-size: 15px; }

/* ---------- roadmap ---------- */
.phase { display: grid; gap: 28px; align-content: start; }
.phase__top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.phase h3 { font-size: clamp(30px, 3vw, 44px); }
.phase .ticks { font-size: 16px; gap: 14px; }
.wishes { display: grid; gap: 8px; }
.wish { display: grid; grid-template-columns: 96px 1fr auto; gap: 12px 28px; align-items: center; background: var(--surface); border-radius: var(--r-box); padding: 20px 28px 20px 20px; }
.wish h3 { font-size: 24px; margin-bottom: 6px; }
.wish p { color: var(--muted); }
.vote { display: grid; justify-items: center; gap: 2px; padding: 12px 0; border: 0; border-radius: 14px; background: var(--paper); cursor: pointer; font: 400 12px var(--mono); color: var(--muted); transition: background-color .15s, color .15s; }
.vote b { font: 400 26px/1 var(--serif); color: var(--ink); }
.vote:hover { background: var(--soft); }
.vote[aria-pressed="true"] { background: var(--ink); color: var(--accent); }
.vote[aria-pressed="true"] b { color: #fff; }

/* ---------- blog ---------- */
.post { display: flex; flex-direction: column; gap: 14px; min-height: 300px; }
.post h3 { font-size: clamp(24px, 2.2vw, 32px); }
.post p { color: var(--muted); }
.post__more { margin-top: auto; padding-top: 20px; font-weight: 500; font-size: 15px; }
/* featured post: the image fills the left half edge to edge, the text sits in the right half */
.post--feature { display: grid; grid-template-columns: 1.1fr 1fr; gap: 0; align-items: stretch; border-radius: var(--r-big); padding: 0; min-height: 0; overflow: hidden; }
.post--feature h3 { font-size: clamp(30px, 3.4vw, 52px); line-height: 1.06; letter-spacing: -0.02em; }
.post--feature .stack { align-self: center; padding: clamp(32px, 4.5vw, 80px); }
.post__img { overflow: hidden; background: var(--paper); aspect-ratio: 16 / 10; }
.post--feature .post__img { aspect-ratio: auto; min-height: clamp(280px, 30vw, 460px); }
.post__img img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center; transition: transform .6s cubic-bezier(.2,.7,.2,1); }
.post--feature:hover .post__img img { transform: scale(1.02); }
.post__img:not(:has(img)) { display: none; }
.post--feature:has(.post__img:not(:has(img))) { grid-template-columns: 1fr; }

/* ---------- long-form text (posts, docs, legal) ---------- */
.prose { max-width: 70ch; font-size: 18px; line-height: 1.7; }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { font-size: clamp(28px, 2.6vw, 38px); line-height: 1.12; max-width: none; margin-top: 2em; }
.prose h3 { font: 600 19px/1.4 var(--sans); letter-spacing: 0; margin-top: 1.6em; }
.prose h2 + *, .prose h3 + * { margin-top: .7em; }
.prose ul { list-style: disc; padding-left: 1.2em; display: grid; gap: .5em; }
.prose ol { list-style: decimal; padding-left: 1.4em; display: grid; gap: .5em; }
.prose li::marker { color: var(--muted); }
.prose strong { font-weight: 600; }
.prose hr { border: 0; height: 0; margin: 2.6em 0 0; }
.prose hr + h2 { margin-top: 1.4em; }
.prose img { display: block; max-width: 100%; height: auto; border-radius: 14px; }
.prose pre { background: var(--paper); border-radius: 14px; padding: 18px 20px; overflow-x: auto; font: 400 14px/1.6 var(--mono); }
.prose pre code { background: none; padding: 0; }
/* tables: quiet rows on paper, scroll sideways on small screens */
.prose table { display: block; width: 100%; overflow-x: auto; border-collapse: separate; border-spacing: 0; font-size: 15px; line-height: 1.5; margin-top: 1.6em; margin-bottom: .4em; }
.prose thead th { font: 400 12px/1.4 var(--mono); color: var(--muted); text-align: left; padding: 0 16px 12px; white-space: nowrap; }
.prose td { padding: 14px 16px; vertical-align: top; background: var(--paper); border-top: 2px solid var(--surface); min-width: 9em; }
.prose tbody tr td:first-child { border-radius: 12px 0 0 12px; }
.prose tbody tr td:last-child { border-radius: 0 12px 12px 0; }
.prose td strong { font-weight: 600; }
.prose code { font: 400 .88em var(--mono); background: var(--surface); padding: 2px 7px; border-radius: 6px; }
.prose blockquote { margin: 1.6em 0; padding: 4px 0 4px 24px; box-shadow: inset 3px 0 0 var(--accent); font: italic 400 22px/1.45 var(--serif); }
.prose address { font-style: normal; }
.article__head { padding: clamp(56px, 8vw, 128px) 0 clamp(32px, 4vw, 56px); max-width: 1100px; }
.article__head h1 { font-size: clamp(40px, 6vw, 92px); max-width: 16ch; margin-top: 24px; }
.article__by { display: flex; align-items: center; gap: 14px; margin-top: 36px; font-weight: 500; }
.article__by small { display: block; font: 400 13px var(--mono); color: var(--muted); }
.article { padding-bottom: var(--space); }
.article--box { background: var(--surface); border-radius: var(--r-big); padding: clamp(32px, 6vw, 104px) clamp(24px, 6vw, 112px); margin-bottom: var(--space); }

/* ---------- docs ---------- */
.docs { display: grid; grid-template-columns: 300px 1fr; gap: var(--gap); align-items: start; padding-top: clamp(32px, 4vw, 64px); margin-bottom: var(--space); }
.docs__nav { position: sticky; top: 96px; background: var(--surface); border-radius: var(--r-box); padding: 20px; display: grid; gap: 24px; }
.docs__nav input { width: 100%; height: 46px; border: 0; border-radius: 12px; background: var(--paper); padding: 0 16px; font: inherit; }
.docs__group { display: grid; gap: 2px; }
.docs__group h4 { font: 400 13px var(--mono); color: var(--muted); padding: 0 12px 8px; }
.docs__group a { padding: 9px 12px; border-radius: 10px; font-size: 15px; color: var(--muted); }
.docs__group a:hover { color: var(--ink); }
.docs__group a[aria-current] { background: var(--ink); color: #fff; }
.docs .article--box { margin-bottom: 0; }
.docs > * { min-width: 0; }
.prose code { overflow-wrap: anywhere; }

/* ---------- forms ---------- */
.form { display: grid; gap: 20px; }
.form__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.field { display: grid; gap: 8px; font-size: 14px; font-weight: 500; }
.field span { font-weight: 400; opacity: .6; }
.field input, .field select, .field textarea, .filters input, .filters select { width: 100%; min-height: 52px; border: 0; border-radius: 14px; background: var(--paper); padding: 0 18px; font: 400 16px var(--sans); color: var(--ink); }
.field textarea { padding: 16px 18px; min-height: 120px; resize: vertical; }
.cell--sand .field input, .cell--sand .choice span, .filters input, .filters select { background: var(--surface); }
.choices { display: flex; flex-wrap: wrap; gap: 6px; border: 0; padding: 0; margin: 0; }
.choices legend { font-size: 14px; font-weight: 500; margin-bottom: 8px; padding: 0; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.choice span { display: block; padding: 12px 20px; border-radius: 999px; background: var(--paper); font-size: 15px; transition: background-color .15s, color .15s; }
.choice input:checked + span { background: var(--ink); color: #fff; }
.choice input:focus-visible + span { outline: 2px solid var(--accent-ink); outline-offset: 3px; }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; }
.check input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--ink); }
.form__note { font-size: 13px; opacity: .75; }
.form__error { margin: 0; font-size: 14px; color: #b42318; }
.donate__sum .form__error { color: #ffb4a8; }
.form__status { margin: 0; font-size: 15px; padding: 12px 16px; border-radius: 12px; background: var(--paper); }
.form__status.is-error { color: #b42318; }
.filters { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 8px; margin-bottom: var(--gap); }

/* ---------- hub offers ---------- */
.hub__count { margin-bottom: 14px; }
.hub__empty { background: var(--surface); border-radius: var(--r-box); padding: 40px; text-align: center; color: var(--muted); }
.offer { display: flex; flex-direction: column; padding: var(--gap); position: relative; }
.offer[hidden] { display: none; }
.offer__media { position: relative; border-radius: calc(var(--r-box) - 8px); overflow: hidden; background: var(--paper); aspect-ratio: 16 / 9; }
.offer__cover { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.offer:hover .offer__cover { transform: scale(1.03); }
.offer__badges { position: absolute; top: 12px; left: 12px; display: flex; gap: 6px; }
.offer__badges span, .dlg__body .offer__badges span { font: 400 13px/1 var(--mono); padding: 7px 10px; border-radius: 999px; background: var(--surface); }
.offer__status::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--accent-ink); margin-right: 7px; vertical-align: 1px; }
.offer__status.is-soon::before { background: #c8a33a; }
.offer__dist { background: var(--ink) !important; color: var(--accent); }
.offer__icon { position: absolute; left: 16px; bottom: -1px; width: 56px; height: 56px; border-radius: 14px 14px 0 0; background: var(--surface); padding: 10px 10px 4px; }
.offer__body { display: flex; flex-direction: column; gap: 10px; padding: 22px calc(var(--box) - var(--gap)) calc(var(--box) - var(--gap)); flex: 1; }
.offer__body h3 { font-size: clamp(24px, 2vw, 30px); }
.offer__body > p:not(.kicker) { color: var(--muted); }
.offer__meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.offer__meta li { font: 400 13px/1 var(--mono); padding: 7px 10px; border-radius: 7px; background: var(--paper); color: var(--muted); }
.offer__foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: auto; padding-top: 18px; }
.offer__price { font: 400 22px/1.2 var(--serif); }
.offer__compare { display: block; font: 400 12px var(--sans); color: var(--muted); margin-top: 2px; }
.offer__promo { display: inline-block; font: 400 12px/1 var(--mono); padding: 5px 8px; border-radius: 999px; background: var(--accent); color: var(--ink); vertical-align: 1px; }
.offer__open { border: 0; background: var(--ink); color: #fff; font: 500 14px var(--sans); padding: 10px 18px; border-radius: 999px; cursor: pointer; }
.offer__open::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }   /* whole card opens the dialog */
.offer:hover .offer__open { background: #2a2c48; }

.dlg { width: min(720px, calc(100% - 32px)); max-height: calc(100dvh - 48px); padding: 0; border: 0; border-radius: var(--r-big); background: var(--surface); color: var(--ink); overflow: auto; }
.dlg::backdrop { background: rgba(22,23,43,.55); backdrop-filter: blur(4px); }
.dlg__cover { position: relative; aspect-ratio: 16 / 7; background: var(--paper); }
.dlg__cover > img:first-child { width: 100%; height: 100%; object-fit: cover; display: block; }
.dlg__body { padding: 28px clamp(24px, 4vw, 48px) clamp(28px, 4vw, 48px); display: grid; gap: 16px; align-content: start; }
.dlg__block, .plans { align-content: start; }
.dlg__body .offer__badges { position: static; }
.dlg__body .offer__badges span { background: var(--paper); }
.dlg__body h2 { font-size: clamp(32px, 4vw, 48px); }
.dlg__notice { background: var(--sand); border-radius: 12px; padding: 14px 18px; font-size: 15px; }
.dlg__block { display: grid; gap: 10px; }
.dlg__x { position: absolute; top: 14px; right: 14px; width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--surface); font-size: 24px; line-height: 1; cursor: pointer; }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 0; }
.facts div { background: var(--paper); border-radius: 10px; padding: 10px 14px; }
.facts dt { font: 400 12px var(--mono); color: var(--muted); }
.facts dd { margin: 2px 0 0; font-size: 15px; }
.plans { display: grid; gap: 6px; }
.plans li { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; background: var(--paper); border-radius: 12px; padding: 14px 16px; }
.plans li.is-default { box-shadow: inset 0 0 0 2px var(--ink); }
.plan__price s, .offer__compare s { color: var(--muted); margin-left: 6px; }
.plan__price small { color: var(--muted); }

/* ---------- sponsors ---------- */
.sp-hero { display: grid; grid-template-columns: 1.4fr 1fr; gap: clamp(32px, 5vw, 96px); align-items: end; padding: clamp(64px, 9vw, 144px) 0 0; }
.sp-hero h1 { font-size: clamp(44px, 6.4vw, 100px); max-width: 13ch; }
.sp-hero .pill { margin-bottom: 0; justify-self: start; }
.sp-status { border-radius: var(--r-big); padding: clamp(24px, 3vw, 40px); display: grid; gap: 24px; }
.sp-status__rows { display: grid; gap: 6px; }
.sp-status__rows li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 12px; background: rgba(255,255,255,.07); }
.sp-status__rows b { font: 400 22px/1 var(--serif); color: #fff; }
.sp-status__rows b.need { font: 400 13px/1 var(--mono); color: var(--accent); }
.sp-status__people { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.avstack { display: flex; }
.av--sm { width: 36px; height: 36px; font-size: 15px; box-shadow: 0 0 0 3px var(--ink); }
.avstack .av + .av { margin-left: -8px; }
.textlink--inv { color: #fff; }
.textlink--inv:hover { color: var(--ink); }

.tiers { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap); }
.tier { display: flex; flex-direction: column; gap: 18px; background: var(--surface); border-radius: var(--r-big); padding: clamp(28px, 3vw, 44px); }
.tier__top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.tier h3 { font-size: clamp(32px, 3vw, 44px); letter-spacing: -0.02em; }
.tier__price { font: 400 26px/1.2 var(--serif); padding-bottom: 18px; box-shadow: 0 1px 0 var(--soft); }
.tier__price small { font: 400 14px var(--sans); color: var(--muted); margin-left: 6px; }
.tier .ticks { font-size: 16px; gap: 12px; margin-bottom: 12px; }
.tier .btn { margin-top: auto; align-self: flex-start; }
.tier--feature { background: var(--ink); color: #fff; }
.tier--feature .kicker, .tier--feature .tier__price small { color: #b3b5c6; }
.tier--feature .tier__price { box-shadow: 0 1px 0 rgba(255,255,255,.14); }
.tier--feature .ticks li::before { border-color: var(--accent); }
.partner-row { display: grid; grid-template-columns: auto 1fr auto; gap: 12px 32px; align-items: center; margin-top: var(--gap); background: var(--sand); border-radius: var(--r-box); padding: 22px clamp(24px, 3vw, 44px); transition: background-color .15s; }
.partner-row:hover { background: #ead690; }
.partner-row__text { max-width: 70ch; }
.partner-row .post__more { padding-top: 0; white-space: nowrap; }

.donate { display: grid; grid-template-columns: 1.5fr 1fr; gap: var(--gap); align-items: start; }
.donate__fields { display: grid; gap: 22px; background: var(--surface); border-radius: var(--r-big); padding: clamp(28px, 3.4vw, 52px); }
.donate__sum { position: sticky; top: 96px; display: grid; gap: 14px; background: var(--ink); color: #fff; border-radius: var(--r-big); padding: clamp(28px, 3vw, 44px); }
.donate__sum .kicker, .donate__sum .form__note { color: #b3b5c6; }
.donate__amount { font: 400 clamp(56px, 6vw, 88px)/1 var(--serif); letter-spacing: -0.03em; }
.donate__cadence { color: var(--accent); font: 400 14px var(--mono); margin-top: -4px; }
.donate__sum .ticks { font-size: 15px; gap: 10px; margin: 8px 0; }
.donate__sum .ticks li::before { border-color: var(--accent); }
.donate__sum .btn { width: 100%; }
.seg { display: inline-grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; margin: 0; border: 0; background: var(--paper); border-radius: 999px; justify-self: start; }
.seg label { position: relative; }
.seg input, .amount input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.seg span { display: block; padding: 10px 22px; border-radius: 999px; font-weight: 500; font-size: 15px; transition: background-color .15s, color .15s; }
.seg input:checked + span { background: var(--ink); color: #fff; }
.amounts { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; border: 0; }
.amounts legend { font-size: 14px; font-weight: 500; margin-bottom: 8px; padding: 0; }
.amount { position: relative; }
.amount span { display: grid; place-items: center; min-width: 64px; height: 42px; padding: 0 18px; border-radius: 999px; background: var(--paper); font: 500 15px var(--sans); transition: background-color .15s, color .15s; }
.amount:hover span { background: #ebebe4; }
.amount input:checked + span { background: var(--ink); color: #fff; }
.seg input:focus-visible + span, .amount input:focus-visible + span { outline: 2px solid var(--accent-ink); outline-offset: 3px; }
.field[hidden] { display: none; }

/* sponsor showcase: each slot is either filled or open (data-state on the slot) */
.mslot[data-state="open"] .mslot__filled, .mslot[data-state="filled"] .mslot__open,
.sslot[data-state="open"] .sslot__filled, .sslot[data-state="filled"] .sslot__open { display: none; }
.sslot[data-state="open"] > div { background: none; box-shadow: inset 0 0 0 2px #e2e2d8; }
.sp-status__open { text-decoration: underline; text-decoration-color: rgba(255,255,255,.35); text-underline-offset: 4px; }

.logomark { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 14px; background: var(--ink); color: var(--accent); font: 500 22px var(--serif); }
.logomark--lg { width: 96px; height: 96px; border-radius: 24px; font-size: 40px; }
.logomark--sm { width: 32px; height: 32px; border-radius: 9px; font-size: 14px; }
.logomark__name { font: 500 22px/1.1 var(--serif); }
.logomark__name--lg { font-size: clamp(28px, 2.6vw, 40px); }

.mslot__filled, .mslot__open { display: grid; grid-template-columns: 1fr 1.15fr; gap: var(--gap); background: var(--surface); border-radius: var(--r-big); padding: var(--gap); }
.mslot__logo { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 18px; min-height: clamp(240px, 24vw, 360px); border-radius: calc(var(--r-big) - 10px); background: var(--paper); text-align: center; padding: 24px; }
.mslot__logo--brand img { width: min(320px, 70%); height: auto; }
.mslot__logo--image { padding: 0; overflow: hidden; background: #FFFF00; }
.mslot__logo--image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mslot__logo--open { background: none; border: 2px dashed #cfcfc4; }
.mslot__logo--open span, .sslot__logo--open span { font: 400 13px var(--mono); color: var(--muted); }
.mslot__copy { display: grid; gap: 18px; align-content: center; padding: clamp(16px, 3vw, 48px); }
.mslot__copy h3 { font-size: clamp(26px, 2.6vw, 38px); line-height: 1.12; letter-spacing: -0.015em; max-width: 22ch; }
.mslot__copy p:not(.kicker) { color: var(--muted); max-width: 52ch; }
.mslot__copy .btn { justify-self: start; margin-top: 6px; }

.sslots { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap); margin-top: var(--gap); }
.sslot > div { display: grid; gap: 14px; align-content: start; background: var(--surface); border-radius: var(--r-box); padding: var(--gap) var(--gap) 24px; height: 100%; }
.sslot > div > :not(.sslot__logo) { padding-inline: 8px; }
.sslot__logo { display: flex; align-items: center; justify-content: center; gap: 14px; height: 140px; border-radius: calc(var(--r-box) - 8px); background: var(--paper); }
.sslot__logo--open { background: none; border: 2px dashed #cfcfc4; }
.sslot__text { color: var(--muted); font-size: 15px; }

.pslots { display: flex; align-items: center; gap: 12px 20px; flex-wrap: wrap; margin-top: var(--gap); padding: 14px 14px 14px 24px; border-radius: var(--r-box); background: var(--surface); }
.pslots__list { display: flex; gap: 8px; flex-wrap: wrap; }
.pslot { display: flex; align-items: center; gap: 10px; padding: 8px 16px 8px 8px; border-radius: 999px; background: var(--paper); font-weight: 500; font-size: 15px; }
.pslot small { font: 400 13px var(--mono); color: var(--muted); }
.pslot--open { padding: 0; background: none; }
.pslot--open a { display: block; padding: 10px 16px; border-radius: 999px; border: 1.5px dashed #cfcfc4; color: var(--muted); font-weight: 400; }
.pslot--open a:hover { color: var(--ink); border-color: var(--ink); }

.enquiry { display: grid; grid-template-columns: 1fr 1.3fr; gap: clamp(32px, 5vw, 96px); align-items: start; background: var(--surface); border-radius: var(--r-big); padding: clamp(28px, 5vw, 80px); }
.enquiry h2 { max-width: 14ch; }

.av { width: 44px; height: 44px; border-radius: 50%; background: var(--c, var(--sand)); color: var(--ink); display: grid; place-items: center; flex: none; font: 500 18px/1 var(--serif); font-style: normal; }
.av[style*="--ink"] { color: var(--sand); }
.av--add { background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
.wall { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.wall li, .wall__you a { display: flex; align-items: center; gap: 14px; background: var(--surface); border-radius: 16px; padding: 14px 16px; min-width: 0; }
.wall li span { display: grid; min-width: 0; }
.wall b { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wall small { font: 400 13px var(--mono); color: var(--muted); }
.wall .wall__you { padding: 0; background: none; }
.wall__you a { width: 100%; height: 100%; background: transparent; box-shadow: inset 0 0 0 1.5px #d4d4ca; transition: background-color .25s, box-shadow .25s, color .25s; }
.wall__you small { color: var(--muted); transition: color .25s; }
.wall__you .av--add { background: var(--paper); box-shadow: none; font: 400 22px/1 var(--sans); transition: background-color .25s, transform .35s cubic-bezier(.2,.7,.2,1); }
.wall__you a:hover { background: var(--ink); color: #fff; box-shadow: none; }
.wall__you a:hover small { color: #b3b5c6; }
.wall__you a:hover .av--add { background: var(--accent); color: var(--ink); transform: rotate(90deg); }
.wall .av img, .wallopt__preview img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; display: block; }

/* supporters wall opt-in: name + logo/avatar */
.wallopt { display: grid; grid-template-columns: auto 1fr; gap: 20px; align-items: center; background: var(--paper); border-radius: 18px; padding: 18px; }
.wallopt__pic { position: relative; cursor: pointer; }
.wallopt__pic input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.wallopt__preview { background: var(--surface); color: var(--muted); font: 300 34px/1 var(--sans); box-shadow: inset 0 0 0 1.5px #d4d4ca; overflow: hidden; transition: box-shadow .2s; }
.wallopt__pic:hover .wallopt__preview { box-shadow: inset 0 0 0 1.5px var(--ink); }
.wallopt__pic:focus-within .wallopt__preview { outline: 2px solid var(--accent-ink); outline-offset: 3px; }
.wallopt__fields { display: grid; gap: 10px; min-width: 0; }
.wallopt__actions { display: flex; gap: 6px; flex-wrap: wrap; }
.wallopt__actions .btn { cursor: pointer; background: var(--surface); }

.card .tile { margin-bottom: 8px; }

/* ---------- club ---------- */
.club-hero { display: grid; grid-template-columns: 1.15fr 1fr; gap: clamp(32px, 5vw, 96px); align-items: end; padding: clamp(56px, 8vw, 128px) 0 clamp(40px, 5vw, 72px); }
.club-hero h1 { font-size: clamp(44px, 6vw, 96px); max-width: 12ch; }
.club-hero .pill { margin-bottom: 0; justify-self: start; }
.club-feats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.club-feats li { display: grid; gap: 14px; padding: 20px; }
.club-feats li div { display: grid; gap: 4px; }
.club-feats small { color: var(--muted); font-size: 14px; line-height: 1.5; }

.club { display: grid; grid-template-columns: 260px minmax(0, 1fr) 320px; gap: var(--gap); align-items: start; margin-bottom: var(--space); }
.club__side, .club__aside { display: grid; gap: var(--gap); position: sticky; top: 96px; }
.club .cell { padding: 20px; }
.me { display: flex; gap: 14px; align-items: center; }
.club__nav { display: grid; gap: 2px; background: var(--surface); border-radius: var(--r-box); padding: 10px; }
.club__nav a { padding: 11px 14px; border-radius: 12px; color: var(--muted); }
.club__nav a:hover { color: var(--ink); background: var(--paper); }
.club__nav a[aria-current] { background: var(--ink); color: #fff; }
.club__feed { display: grid; gap: var(--gap); min-width: 0; }
.composer { display: flex; gap: 14px; align-items: flex-start; }
.composer__main { flex: 1; display: grid; gap: 10px; min-width: 0; }
.composer textarea { width: 100%; border: 0; border-radius: 14px; background: var(--paper); padding: 14px 16px; font: 400 16px/1.5 var(--sans); color: var(--ink); resize: vertical; min-height: 56px; }
.composer__row { display: flex; justify-content: space-between; gap: 10px; }
.composer select { border: 0; border-radius: 999px; background: var(--paper); padding: 0 14px; height: 40px; font: 400 14px var(--sans); }
.feed-tabs { margin-bottom: 0; }
.feed-tabs button { padding: 9px 18px; font-size: 15px; }
.feed-tabs button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.feed { display: grid; gap: var(--gap); }
.fpost { display: grid; gap: 16px; padding: 24px !important; }
.fpost[hidden] { display: none; }
.fpost__head { display: flex; gap: 14px; align-items: center; }
.post__who { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.post__who b { font-weight: 600; }
.post__who .need { padding: 5px 8px; font-size: 11px; }
.badge--sup { background: var(--sand); color: var(--ink); }
.fpost__text { font-size: 17px; line-height: 1.6; overflow-wrap: anywhere; }
.fpost__img { margin: 0; border-radius: 16px; overflow: hidden; background: var(--paper); aspect-ratio: 16 / 9; }
.fpost__img img { width: 100%; height: 100%; object-fit: cover; object-position: 0 0; display: block; }
.fpost__foot { display: flex; align-items: center; gap: 16px; }
.like { display: inline-flex; align-items: center; gap: 6px; border: 0; border-radius: 999px; background: var(--paper); padding: 8px 14px; font: 500 14px var(--sans); cursor: pointer; transition: background-color .15s, color .15s; }
.like:hover { background: var(--soft); }
.like[aria-pressed="true"] { background: var(--rose); }
.like[aria-pressed="true"] span:first-child { color: #c2185b; }
.reply { display: flex; gap: 12px; background: var(--paper); border-radius: 16px; padding: 14px 16px; }
.reply .av { width: 34px; height: 34px; font-size: 14px; }
.reply p + p { margin-top: 4px; color: var(--muted); font-size: 15px; }
.embed { display: grid; grid-template-columns: auto 1fr auto; gap: 16px; align-items: center; background: var(--paper); border-radius: 16px; padding: 12px; }
.embed .vote { background: var(--surface); padding: 10px 16px; }
.embed span:nth-child(2) { display: grid; }
.embed small { color: var(--muted); font-size: 14px; }
.mini-vote { display: flex; align-items: center; gap: 14px; padding: 10px 12px; border-radius: 12px; background: var(--paper); font-size: 15px; }
.mini-vote b { font: 400 22px var(--serif); min-width: 40px; }
.mini-vote:hover { background: var(--soft); }
.club__aside .empty { color: var(--muted); font-size: 15px; }
.club__aside h3 { font-size: 26px; }

/* ---------- club: member area ---------- */
.club--member { padding-top: clamp(32px, 4vw, 56px); }
.club--wide { grid-template-columns: 260px minmax(0, 1fr); }
.club__nav a { display: flex; justify-content: space-between; align-items: center; }
.club__nav .count { font: 500 12px/1 var(--sans); background: var(--accent); color: var(--ink); border-radius: 999px; padding: 4px 8px; }
.club__new { width: 100%; }
a.me { transition: background-color .15s; }
a.me:hover { background: #fbfbf8; }
a.me[aria-current] { box-shadow: inset 0 0 0 2px var(--ink); }
.av--sm { width: 34px; height: 34px; font-size: 14px; }
.av--xl { width: 96px; height: 96px; font-size: 40px; }
.who-link:hover b { text-decoration: underline; text-underline-offset: 3px; }
.fpost__head a:hover, .comments-link:hover { color: var(--ink); }
.load-more { justify-self: center; }
.textbtn { border: 0; background: none; padding: 0; font: 500 14px var(--sans); color: var(--muted); cursor: pointer; }
.textbtn:hover { color: var(--ink); }
.club-head { display: grid; gap: 8px; padding: 8px 4px 4px; }
.club-head h1 { font-size: clamp(36px, 4vw, 56px); }
.club-head--row { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.mini-members { display: grid; gap: 4px; }
.mini-members a, .profile-mini { display: flex; align-items: center; gap: 12px; padding: 6px; border-radius: 12px; }
.mini-members a:hover { background: var(--paper); }
.mini-members span, .profile-mini span { display: grid; line-height: 1.3; }
.mini-members small, .profile-mini small { font: 400 13px var(--mono); color: var(--muted); }
.mini-post { display: grid; gap: 2px; padding: 10px 12px; border-radius: 12px; background: var(--paper); }
.mini-post small { color: var(--muted); font-size: 13px; }
.mini-post:hover { background: var(--soft); }
.follow[aria-pressed="true"] { background: var(--paper); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }

/* landing + auth */
.club-hero--join { align-items: start; }
.club-hero--join .club-feats { margin-top: 12px; }
.auth-card { padding: clamp(28px, 3vw, 44px) !important; gap: 18px; border-radius: var(--r-big); }
.auth-card__title { font-size: clamp(30px, 3vw, 44px); line-height: 1.05; }
.auth-card__sub { color: var(--muted); margin-top: 8px; }
.auth-card .btn { width: 100%; }
.field .field__prefix, .field .field__row { opacity: 1; font-weight: 400; }
.field .field__row { font-weight: 500; }
.field__hint { font-weight: 400; font-size: 13px; color: var(--muted); }
.field__prefix { display: flex; align-items: center; background: var(--paper); border-radius: 14px; padding-left: 18px; }
.field__prefix b { font-weight: 400; color: var(--muted); }
.field__prefix input { padding-left: 4px !important; }
.field__row { display: flex; justify-content: space-between; gap: 12px; }
.field__row a { font-weight: 400; }
.auth { display: grid; place-items: center; padding: clamp(48px, 8vw, 120px) 0 var(--space); }
.auth .auth-card { width: min(480px, 100%); }
.auth .pill { margin-bottom: 18px; }
.auth-or { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; }
.auth-or::before, .auth-or::after { content: ""; flex: 1; height: 1px; background: var(--soft); }
.club-peek { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); align-items: start; pointer-events: none; }

/* post detail */
.back-link { color: var(--muted); font-size: 15px; padding: 4px; }
.back-link:hover { color: var(--ink); }
.fpost--detail .fpost__head .follow { margin-left: auto; }
.fpost__title { font-size: clamp(30px, 3vw, 44px); line-height: 1.08; letter-spacing: -0.02em; }
.fpost__text p + p { margin-top: .8em; }
.fpost__text code { font: 400 .88em var(--mono); background: var(--paper); padding: 2px 7px; border-radius: 6px; }
.thread { display: grid; gap: 20px; padding: 24px !important; }
.thread__title { font-size: 28px; display: flex; align-items: baseline; gap: 10px; }
.reply-form { display: flex; gap: 12px; align-items: flex-start; }
.reply-form textarea { width: 100%; border: 0; border-radius: 14px; background: var(--paper); padding: 12px 16px; font: 400 16px/1.5 var(--sans); color: var(--ink); resize: vertical; }
.comments { display: grid; gap: 16px; }
.comments--nested { margin: 12px 0 0 46px; padding-left: 16px; box-shadow: inset 2px 0 0 var(--soft); }
.comment__body { display: flex; gap: 12px; align-items: flex-start; }
.comment__main { display: grid; gap: 6px; min-width: 0; flex: 1; }
.comment__text { font-size: 16px; overflow-wrap: anywhere; }
.comment__actions { display: flex; align-items: center; gap: 14px; }
.like--sm { padding: 5px 10px; font-size: 13px; }
.need.op { background: var(--sky); color: var(--ink); }

/* profile */
.profile { padding: 0 !important; overflow: hidden; }
.profile__cover { height: clamp(120px, 14vw, 180px); background: var(--sky); position: relative; overflow: hidden; }
.profile__cover::after { content: ""; position: absolute; inset: 0; background: radial-gradient(120% 140% at 85% 0%, rgba(255,255,255,.55), transparent 55%), repeating-linear-gradient(170deg, transparent 0 34px, rgba(255,255,255,.25) 34px 36px); }
.profile__body { display: flex; align-items: flex-end; gap: 18px; padding: 0 24px; margin-top: -40px; position: relative; flex-wrap: wrap; }
.profile__body .av--xl { box-shadow: 0 0 0 5px var(--surface); }
.profile__id { flex: 1; min-width: 180px; padding-bottom: 6px; }
.profile__id h1 { font-size: clamp(30px, 3vw, 42px); line-height: 1.1; }
.profile__actions { padding-bottom: 8px; }
.profile__bio { padding: 18px 24px 0; font-size: 17px; max-width: 60ch; }
.profile__meta { display: flex; gap: 8px 20px; flex-wrap: wrap; padding: 10px 24px 0; color: var(--muted); font-size: 15px; }
.profile__stats { display: flex; gap: 8px; flex-wrap: wrap; padding: 18px 24px 24px; }
.profile__stats li { background: var(--paper); border-radius: 999px; padding: 8px 14px; font-size: 14px; color: var(--muted); }
.profile__stats b { color: var(--ink); font-weight: 600; margin-right: 2px; }
.badges { display: grid; gap: 8px; }
.badges li { display: flex; align-items: center; gap: 12px; }
.badges .tile { width: 40px; height: 40px; font-size: 16px; }
.badges li > span:last-child { display: grid; line-height: 1.3; }
.badges small { color: var(--muted); font-size: 13px; }

/* members */
.member-filters { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; }
.member-filters input { min-height: 48px; border: 0; border-radius: 999px; background: var(--surface); padding: 0 20px; font: 400 16px var(--sans); }
.members { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: var(--gap); }
.member { display: grid; gap: 12px; align-content: start; }
.member[hidden] { display: none; }
.member__link { display: flex; align-items: center; gap: 12px; }
.member__link span { display: grid; line-height: 1.3; }
.member__link small { font: 400 13px var(--mono); color: var(--muted); }
.member > .need { justify-self: start; }
.member p { color: var(--muted); font-size: 15px; }
.member__foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: auto; }

/* notifications */
.notifs { display: grid; gap: 2px; padding: 8px !important; }
.notif a { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: 14px; }
.notif a:hover { background: var(--paper); }
.notif.is-unread a { background: #f3fbfa; }
.notif__text { flex: 1; display: grid; gap: 2px; font-size: 15px; }
.notif__text em { font-style: normal; color: var(--muted); }
.notif__text small { font: 400 13px var(--mono); color: var(--muted); }
.notif__dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent-ink); flex: none; }

/* deals */
.deals { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: var(--gap); }
.deal { display: grid; gap: 14px; align-content: start; }
.deal__top { display: flex; align-items: center; gap: 12px; }
.deal__top > span:nth-child(2) { display: grid; line-height: 1.3; flex: 1; }
.deal__top small { color: var(--muted); font-size: 13px; }
.deal h3 { font-size: 24px; }
.deal p { color: var(--muted); font-size: 15px; }
.deal__code { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: var(--c); border-radius: 14px; padding: 8px 8px 8px 16px; }
.deal__code code { font: 500 15px var(--mono); letter-spacing: .06em; }
.deal-cta { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.deal-cta h3 { font-size: 26px; }

/* settings */
.settings-nav { display: flex; gap: 6px; flex-wrap: wrap; position: sticky; top: 86px; z-index: 5; padding: 6px; background: rgba(246,246,242,.9); backdrop-filter: blur(10px); border-radius: 999px; }
.settings-nav a { padding: 9px 16px; border-radius: 999px; background: var(--surface); font-size: 15px; }
.settings-nav a:hover { background: var(--ink); color: #fff; }
.settings { display: grid; gap: 20px; padding: clamp(24px, 3vw, 40px) !important; scroll-margin-top: 150px; }
.settings h2 { font-size: 28px; }
.settings__avatar { display: flex; align-items: center; gap: 18px; }
.settings__avatar > div { display: grid; gap: 6px; justify-items: start; }
.settings__save { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.toggles { display: grid; gap: 4px; }
.toggles li { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 14px 16px; border-radius: 14px; background: var(--paper); }
.toggles li > span { display: grid; line-height: 1.35; }
.toggles small { color: var(--muted); font-size: 14px; }
.switch { position: relative; flex: none; }
.switch input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.switch i { display: block; width: 46px; height: 26px; border-radius: 999px; background: #cfcfc6; position: relative; transition: background-color .2s; }
.switch i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .2s; }
.switch input:checked + span + i { background: var(--ink); }
.switch input:checked + span + i::after { transform: translateX(20px); }
.switch input:focus-visible + span + i { outline: 2px solid var(--accent-ink); outline-offset: 3px; }
.danger { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 8px; padding: 16px; border-radius: 14px; box-shadow: inset 0 0 0 1.5px #f0c4c4; }
.danger > div { display: grid; }
.danger small { color: var(--muted); font-size: 14px; }
.danger__btn { color: #b3261e; }
.danger__btn:hover { background: #fbeaea; }

/* ---------- club: page states (?state=… in the URL) ---------- */
html:not([data-state]) [data-when]:not([data-when="filled"]):not([data-when="request"]),
html[data-state="empty"] [data-when]:not([data-when="empty"]),
html[data-state="sent"] [data-when]:not([data-when="sent"]),
html[data-state="new"] [data-when]:not([data-when="new"]),
html[data-state="reset"] [data-when]:not([data-when="reset"]),
html[data-state="guest"] [data-when]:not([data-when="guest"]) { display: none !important; }

/* clickable post cards */
.fpost.is-clickable { cursor: pointer; transition: box-shadow .2s; }
.fpost.is-clickable:hover { box-shadow: 0 0 0 2px var(--soft); }
.fpost__open { display: block; color: inherit; }
.fpost__open:hover { color: inherit; }
.club__signout { justify-self: center; font-size: 14px; color: var(--muted); padding: 4px; }
.club__signout:hover { color: var(--ink); }

/* auth flow */
.join-card { display: grid; gap: 0; align-self: start; border-radius: var(--r-big); padding: clamp(32px, 3.4vw, 52px) !important; }
.join-card__head { display: grid; gap: 12px; padding-bottom: 28px; }
.join-card__head .kicker { color: var(--accent-ink); }
.join-card__head h2 { font-size: clamp(36px, 3.4vw, 52px); line-height: 1; letter-spacing: -0.02em; }
.join-card__head p:last-child { color: var(--muted); font-size: 17px; }
.join-card__ticks { font-size: 16px; gap: 14px; padding: 28px 0; border-top: 1px solid #ecece4; border-bottom: 1px solid #ecece4; }
.join-card__ticks li::before { border-color: var(--accent-ink); top: .45em; }
.join-card__actions { display: grid; gap: 16px; justify-items: center; padding: 28px 0 24px; }
.join-card__actions .btn { width: 100%; height: 56px; font-size: 16px; }
.join-card__actions p { font-size: 15px; color: var(--muted); }
.join-card__note { background: var(--paper); border-radius: 14px; padding: 16px 18px; font-size: 14px; line-height: 1.5; color: var(--muted); }
.join-card__note b { color: var(--ink); font-weight: 600; }
.auth { display: grid; justify-items: center; gap: 20px; }
.auth-card--wide { width: min(620px, 100%) !important; }
.auth-card--center { justify-items: center; text-align: center; display: grid; gap: 16px; }
.auth-card--center p { color: var(--muted); max-width: 40ch; }
.tile--lg { width: 64px; height: 64px; font-size: 28px; border-radius: 18px; }
.skip-link { justify-self: center; font-size: 15px; }
.steps-mini { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.steps-mini li { display: flex; align-items: center; gap: 8px; padding: 8px 14px 8px 8px; border-radius: 999px; background: var(--surface); color: var(--muted); font-size: 14px; }
.steps-mini b { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--paper); font: 500 12px var(--sans); color: var(--ink); }
.steps-mini [aria-current] { color: var(--ink); font-weight: 500; }
.steps-mini [aria-current] b { background: var(--ink); color: #fff; }
.notice { background: #e6f7f5; color: var(--accent-ink); border-radius: 12px; padding: 12px 16px; font-size: 15px; }
.suggests { display: grid; gap: 6px; margin-top: 4px; }
.suggest { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; background: var(--paper); font-weight: 400; }
.field .suggest span, .field .suggest b { opacity: 1; font-weight: 400; }
.field .suggest b { font-weight: 600; }
.suggest > span { flex: 1; display: grid; line-height: 1.35; min-width: 0; }
.suggest small { color: var(--muted); font-size: 13px; }
.auth-card .suggest .btn { width: auto; }

/* empty states */
.empty-state { display: grid; justify-items: center; text-align: center; gap: 14px; padding: clamp(40px, 6vw, 80px) 24px !important; }
.empty-state h2 { font-size: clamp(28px, 2.6vw, 36px); }
.empty-state p { color: var(--muted); max-width: 44ch; }
.empty-state .hero__cta { justify-content: center; }
.empty-state--welcome { justify-items: stretch; text-align: left; }
.empty-state--welcome > :is(.tile, h2, p) { justify-self: center; text-align: center; }
.checklist { display: grid; gap: 8px; counter-reset: step; max-width: 520px; width: 100%; justify-self: center; margin-top: 8px; }
.checklist a { display: grid; grid-template-columns: 36px 1fr; grid-template-rows: auto auto; column-gap: 14px; align-items: center; padding: 14px 16px; border-radius: 16px; background: var(--paper); transition: background-color .15s; }
.checklist a::before { counter-increment: step; content: counter(step); grid-row: span 2; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--surface); font-weight: 600; }
.checklist small { color: var(--muted); font-size: 14px; }
.checklist a:hover { background: var(--soft); }
.upsell { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.profile__cover--me { background: var(--sand); }
.profile__bio--empty { color: var(--muted); }

/* post menu + dialogs */
.menu { position: relative; }
.menu summary { list-style: none; cursor: pointer; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; color: var(--muted); letter-spacing: 1px; font-size: 12px; }
.menu summary::-webkit-details-marker { display: none; }
.menu summary:hover, .menu[open] summary { background: var(--paper); color: var(--ink); }
.menu__list { position: absolute; right: 0; top: 44px; z-index: 10; display: grid; min-width: 180px; padding: 6px; border-radius: 14px; background: var(--surface); box-shadow: 0 16px 40px -12px rgba(22,23,43,.35); }
.menu__list a, .menu__list button { text-align: left; padding: 10px 12px; border-radius: 10px; border: 0; background: none; font: 400 15px var(--sans); cursor: pointer; }
.menu__list a:hover, .menu__list button:hover { background: var(--paper); }
.menu__danger { color: #b3261e; }
.dlg--sm { width: min(520px, calc(100% - 32px)); }
.dlg--sm .dlg__body h2 { font-size: 30px; }
.dlg--sm .dlg__body > p { color: var(--muted); }
.dlg__actions { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.btn--danger { background: #b3261e; color: #fff; }
.btn--danger:hover { background: #8f1d17; }
.btn--danger:disabled { opacity: .35; cursor: not-allowed; }
.choices--stack { display: grid; }
.choices--stack .choice span { border-radius: 12px; }

/* editor */
.editor { display: grid; gap: 22px; padding: clamp(24px, 3vw, 40px) !important; }
.editor__head { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.editor__head h1 { font-size: clamp(32px, 3vw, 44px); }
.editor__head .seg { background: var(--paper); }
.editor__write { display: grid; gap: 20px; }
.editor__foot { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding-top: 18px; box-shadow: 0 -1px 0 var(--soft); }
.drop { position: relative; display: grid; place-items: center; text-align: center; min-height: 120px; border-radius: 16px; border: 2px dashed #cfcfc4; background: var(--paper); cursor: pointer; font-weight: 400; }
.drop:hover { border-color: var(--ink); }
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.drop span { display: grid; gap: 4px; padding: 16px; }
.drop small { color: var(--muted); font-size: 13px; }
.drop__preview { margin: 8px 0 0; display: grid; gap: 8px; justify-items: start; }
.drop__preview img { max-height: 220px; border-radius: 14px; }
.fpost--preview { background: var(--paper); border-radius: var(--r-box); padding: 24px; }
.tips { font-size: 15px; gap: 10px; }

/* template overview */
.ov__h { font-size: clamp(28px, 2.6vw, 38px); margin-bottom: 20px; }
.ov { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 8px; }
.ov a { display: grid; gap: 4px; padding: 18px 20px; border-radius: 16px; background: var(--surface); transition: box-shadow .15s; }
.ov a:hover { box-shadow: 0 0 0 2px var(--ink); }
.ov small { color: var(--muted); font-size: 14px; }
.ov code { font: 400 13px var(--mono); color: var(--accent-ink); }

/* ---------- blog post cover ---------- */
.post-cover { margin: 0 0 var(--gap); border-radius: var(--r-big); overflow: hidden; background: var(--surface); }
.post-cover img { display: block; width: 100%; aspect-ratio: 21 / 9; object-fit: cover; object-position: center; }
.post-cover figcaption { padding: 14px 24px; font: 400 13px var(--mono); color: var(--muted); text-align: center; }

/* blog post: centred reading column, post end, continue reading */
.article__head--center { margin-inline: auto; text-align: center; display: grid; justify-items: center; }
.article__head--center h1 { margin-inline: auto; }
.article__head--center .lead { margin: 28px auto 0; max-width: 46ch; }
.article__head--center .article__by { text-align: left; }
.article--post { margin-bottom: var(--gap); }
.article--post .prose { margin-inline: auto; }
.post-end { max-width: 70ch; margin: clamp(48px, 6vw, 88px) auto 0; padding-top: 32px; border-top: 1px solid #ececE4; display: grid; gap: 24px; }
.post-end__tags { display: flex; flex-wrap: wrap; gap: 6px; }
.post-end__share { display: flex; align-items: center; gap: 14px; }
.post-end__author { display: grid; grid-template-columns: auto 1fr auto; gap: 18px; align-items: center; background: var(--paper); border-radius: 18px; padding: 20px 22px; }
.post-end__author .kicker { margin-bottom: 4px; }
.post-end__author p:not(.kicker) { color: var(--muted); font-size: 15px; }
.post-end__author b { color: var(--ink); font-weight: 600; }
.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); }
.post-nav__link { display: grid; gap: 10px; align-content: start; background: var(--surface); border-radius: var(--r-box); padding: clamp(24px, 3vw, 44px); transition: background-color .25s, color .25s; }
.post-nav__link--next { text-align: right; }
.post-nav__link b { font: 400 clamp(22px, 2vw, 30px)/1.15 var(--serif); letter-spacing: -0.015em; }
.post-nav__link small { font: 400 13px var(--mono); color: var(--muted); }
.post-nav__link:hover { background: var(--ink); color: #fff; }
.post-nav__link:hover .kicker { color: var(--accent); }
.post-nav__link:hover small { color: #b3b5c6; }

/* ---------- reveal ---------- */
.js .reveal > * { opacity: 0; transform: translateY(10px); transition: opacity .5s ease var(--d, 0ms), transform .5s ease var(--d, 0ms); }
.js .reveal.is-in > * { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 1320px) and (min-width: 1041px) {
  .nav__bar { gap: 8px; }
  .nav__links { gap: 0; }
  .nav__links a { padding: 9px 10px; }
  .nav__brand { --wash: 130px; }
  .nav__sponsor { --wash: 124px; padding-right: 16px; }
  .nav__sponsor img { height: 24px; }
  .nav__brand { padding-left: 20px; }
}

@media (max-width: 1280px) and (min-width: 1041px) {
  .club { grid-template-columns: 240px minmax(0, 1fr); }
  .club__aside { grid-column: 2; position: static; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
}

@media (max-width: 1040px) {
  .cells--4, .cells--3 { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(4, 1fr); }
  .footer__top, .closing { grid-template-columns: 1fr; }
  .sp-hero, .club-hero, .tiers, .donate, .enquiry, .mslot__filled, .mslot__open, .sslots { grid-template-columns: 1fr; }
  .donate__sum { position: static; }
  .partner-row { grid-template-columns: 1fr; }
  .club, .club--wide, .club-peek { grid-template-columns: 1fr; }
  .club__new { display: none; }
  .club__side, .club__aside { position: static; }
  .club__nav { display: flex; overflow-x: auto; }
  .club__nav a { white-space: nowrap; }
  .club__aside { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
  .docs, .post--feature, .post-nav { grid-template-columns: 1fr; }
  .post-nav__link--next { text-align: left; }
  .post-end__author { grid-template-columns: auto 1fr; }
  .post-end__author .btn { grid-column: 1 / -1; justify-self: start; }
  .docs__nav { position: static; }
  .post--feature .stack { padding: 28px 24px 32px; }
  .post--feature .post__img { min-height: 0; aspect-ratio: 16 / 10; }
  .cell--span2 { grid-column: auto; }
  .defs div { grid-template-columns: 1fr; gap: 4px; }
  .spec { min-height: 0; }
  .spec__row { grid-template-columns: 1fr; gap: 10px; align-items: start; }
  .spec__row--head { display: none; }
  .spec__cell--wide { grid-column: auto; }
  .spec__cell[data-label]::before { content: attr(data-label); flex-basis: 100%; font: 400 12px var(--mono); color: var(--muted); }
  .spec__row--plugin .spec__cell[data-label]::before { color: var(--ink); }
  .section--split { grid-template-columns: 1fr; }
  .seats { flex-direction: column; height: auto; }
  .seat, .seat.is-open { flex: none; }
  .seat:not(.is-open) .seat__head { position: static; flex-direction: row; justify-content: flex-start; align-items: baseline; padding: 22px var(--box); width: 100%; }
  .seat:not(.is-open) .seat__name { writing-mode: horizontal-tb; transform: none; font-size: 24px; }
  .seat__head { padding-bottom: 0; }
  .seat__body { min-width: 0; padding-top: clamp(40px, 8vw, 72px); display: none; }
  .seat.is-open .seat__body { display: grid; }

  .nav__toggle { display: block; }
  .lang { display: none; }
  .nav__end { margin-right: 10px; }
  .nav__sponsor { display: none; }
  .nav__links .nav__menu-sponsor { display: flex; align-items: center; gap: 10px; margin-top: 6px; padding: 16px 14px; border-radius: 12px; background: #FFFEC7; }
  .nav__menu-sponsor small { font-size: 12px; color: rgba(22,23,43,.62); }
  .nav__menu-sponsor .nav__sponsor-mark { font-size: 18px; }
  .nav__brand { --wash: 96px; }
  .nav__links {
    display: none; position: absolute; left: var(--gutter); right: var(--gutter); top: 72px;
    flex-direction: column; gap: 0; padding: 10px;
    background: var(--surface); border-radius: 18px; box-shadow: 0 32px 56px -24px rgba(22,23,43,.3);
  }
  .nav__links.is-open { display: flex; max-height: calc(100vh - 110px); max-height: calc(100dvh - 110px); overflow-y: auto; overscroll-behavior: contain; }
  .nav__links a { padding: 14px; font-size: 17px; color: var(--ink); }
  .nav__links a::after { display: none; }
  .nav__links a[aria-current] { background: var(--paper); }
  .nav__links .nav__menu-sponsor::after { display: none; }
}

@media (max-width: 680px) {
  :root { --r-box: 20px; --r-big: 24px; }
  .cells--2, .cells--3 { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .shot img { aspect-ratio: auto; height: 400px; width: auto; max-width: none; }
  .shot__bar { padding: 11px 13px; }
  .card, .use { min-height: 0; }
  .hero__cta, .hero__cta .btn { width: 100%; }
  .facts, .club-feats { grid-template-columns: 1fr; }
  .member-filters { grid-template-columns: 1fr; }
  .comments--nested { margin-left: 16px; }
  .settings-nav { top: 78px; border-radius: 18px; }
  .profile__body { padding: 0 18px; }
  .profile__bio, .profile__meta, .profile__stats { padding-inline: 18px; }
  .sslot__logo { height: 96px; }
  .mslot__logo { min-height: 180px; }
  .embed { grid-template-columns: auto 1fr; }
  .embed > .need { display: none; }
  .post-cover img { aspect-ratio: 4 / 3; }

  .form__grid, .filters { grid-template-columns: 1fr; }
  .wish { grid-template-columns: 72px 1fr; padding: 16px; }
  .wish > .need { grid-column: 2; justify-self: start; }
  .cells--4 { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .prose { font-size: 17px; }
  .tabs__list button { padding: 10px 16px; font-size: 15px; }
  .footer__cols { grid-template-columns: 1fr 1fr; }
  .step__art { min-height: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal > * { opacity: 1; transform: none; }
}

/* ---------- product: content flow (collection → entry → template → page) ---------- */
.flow { display: grid; grid-template-columns: repeat(4, 1fr); background: var(--surface); border-radius: var(--r-big); padding: clamp(12px, 1.4vw, 20px); }
.flow__step { position: relative; display: grid; grid-template-rows: auto auto 1fr; padding: clamp(20px, 2.4vw, 40px); min-width: 0; }
.flow__step + .flow__step { box-shadow: inset 1px 0 0 #ececE4; }
.flow__step + .flow__step::before { content: "→"; position: absolute; left: 0; top: clamp(20px, 2.4vw, 40px); transform: translateX(-50%); width: 26px; height: 26px; display: grid; place-items: center; background: var(--surface); color: #a3a5b2; font-size: 14px; }
.flow__step h3 { font-size: clamp(24px, 2vw, 30px); }
.flow__sub { font: 400 13px var(--mono); color: var(--muted); margin: 8px 0 clamp(24px, 2.6vw, 40px); }
.flow__list { display: grid; align-content: start; }
.flow__list div { display: grid; grid-template-columns: 64px 1fr; gap: 12px; padding: 11px 0; border-top: 1px solid #ececE4; font-size: 14px; }
.flow__list div:last-child { border-bottom: 1px solid #ececE4; }
.flow__list dt { font: 400 13px var(--mono); color: var(--muted); }
.flow__list dd { margin: 0; font: 400 13px var(--mono); color: var(--accent-ink); }
.flow__list--data dd { font: 400 14px/1.4 var(--sans); color: var(--ink); }
.flow__code { font: 400 13px/1.9 var(--mono); color: var(--ink); white-space: pre; overflow-x: auto; align-self: start; }
.flow__code i { font-style: normal; color: var(--accent-ink); }
.flow__step--out { background: var(--paper); border-radius: calc(var(--r-big) - 10px); box-shadow: none; }
.flow__step--out::before { background: var(--paper) !important; border-radius: 50%; }
.flow__page { display: grid; gap: 8px; align-content: start; }
.flow__page b { font: 400 22px/1.15 var(--serif); letter-spacing: -0.01em; }
.flow__page small { font: 400 13px var(--mono); color: var(--accent-ink); }
.flow__page span { font-size: 14px; line-height: 1.55; color: var(--muted); }

/* ---------- product: user groups ---------- */
.groups { display: grid; gap: 8px; }
.group { --bg: var(--surface); display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 80px); align-items: center; background: var(--bg); border-radius: var(--r-box); padding: clamp(28px, 3vw, 48px) clamp(24px, 3.4vw, 56px); }
.group[style*="--sand"] { --bg: var(--sand); }
.group[style*="--rose"] { --bg: var(--rose); }
.group[style*="--accent"] { --bg: var(--accent); }
.group[style*="--sky"] { --bg: var(--sky); }
.group__who { display: grid; gap: 14px; align-content: center; }
.group__who h3 { font-size: clamp(32px, 3.4vw, 52px); line-height: 1; letter-spacing: -0.02em; }
.group__who p { color: rgba(22,23,43,.72); font-size: clamp(17px, 1.3vw, 20px); line-height: 1.4; max-width: 34ch; }
.group__ticks { font-size: 15px; gap: 10px; }
.group__ticks li::before { top: .45em; }
.group--ink { --bg: var(--ink); color: #fff; }
.group--ink .group__who p { color: #b3b5c6; }
.group--ink .group__ticks li::before { border-color: var(--accent); }

/* ---------- product: same request, different roles ---------- */
.asks { display: grid; gap: clamp(24px, 3vw, 40px); align-content: center; }
.asks__q { display: grid; gap: 10px; font: 400 clamp(26px, 2.4vw, 36px)/1.15 var(--serif); letter-spacing: -0.015em; }
.asks__list { display: grid; }
.asks__list li { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding: 16px 0; border-top: 1px solid #ececE4; }
.asks__who { display: grid; gap: 4px; }
.asks__who b { font-weight: 500; }
.asks__who small { font: 400 13px var(--mono); color: var(--muted); }
.asks__res { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; padding: 7px 12px; border-radius: 999px; }
.asks__res::before { font-size: 12px; }
.asks__res--ok { background: var(--accent); }
.asks__res--ok::before { content: "✓"; }
.asks__res--no { background: var(--paper); color: var(--muted); }
.asks__res--no::before { content: "✕"; }
.asks__res--wait { background: var(--sand); }
.asks__res--wait::before { content: "◷"; }

/* ---------- product: site shapes ---------- */
.legend { display: flex; flex-wrap: wrap; gap: 10px 28px; align-items: center; margin-bottom: var(--gap); padding: 16px 22px; border-radius: 16px; background: var(--surface); font-size: 14px; color: var(--muted); }
.legend > span { display: inline-flex; align-items: center; gap: 10px; }
.blk--sub { background: #3a3c5c; }
.fld--plugin { background: var(--accent) !important; color: var(--ink) !important; }
.shape { display: grid; grid-template-rows: auto 1fr auto; gap: 22px; }
.shape__top { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.shape__top h3 { font-size: clamp(26px, 2.4vw, 34px); }
.shape p { color: var(--muted); }
.tree { display: grid; gap: 6px; align-content: start; background: var(--paper); border-radius: calc(var(--r-box) - 8px); padding: 14px; }
.tree__node { position: relative; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-left: calc(var(--d) * 26px); padding: 8px; border-radius: 10px; background: var(--surface); }
.tree__node[style*="--d:1"]::before, .tree__node[style*="--d:2"]::before { content: ""; position: absolute; left: -16px; top: -6px; width: 12px; height: 24px; border-left: 1.5px solid #c9c9c0; border-bottom: 1.5px solid #c9c9c0; border-bottom-left-radius: 6px; }
.tree__fields { display: flex; flex-wrap: wrap; gap: 4px; }
.tree .fld { background: var(--paper); padding: 6px 8px; font-size: 12px; }

@media (max-width: 1280px) {
  .flow { grid-template-columns: repeat(2, 1fr); }
  .flow__step:nth-child(3) { box-shadow: none; }
  .flow__step:nth-child(3)::before { display: none; }
}
@media (max-width: 1040px) {
  .group { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  .flow { grid-template-columns: 1fr; }
  .flow__step + .flow__step { box-shadow: inset 0 1px 0 #ececE4; }
  .flow__step + .flow__step::before, .flow__step:nth-child(3)::before { display: grid; left: 50%; top: 0; transform: translate(-50%, -50%) rotate(90deg); }
  .flow__step--out { box-shadow: none !important; }
}

/* ---------- product: fieldtypes ---------- */
.ftype__badge { justify-self: start; display: inline-flex; align-items: center; gap: 8px; font: 400 13px/1 var(--mono); text-transform: uppercase; letter-spacing: .05em; padding: 8px 10px; border-radius: 8px; background: var(--paper); }
.ftype__badge span { font-size: 14px; color: var(--accent-ink); text-transform: none; }
.spot { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); }
.spot__card { display: grid; grid-template-rows: auto 1fr; background: var(--surface); border-radius: var(--r-big); padding: clamp(12px, 1.2vw, 18px); min-width: 0; }
.spot__art { background: var(--accent); border-radius: calc(var(--r-big) - 10px); padding: clamp(24px, 3.4vw, 56px) clamp(20px, 3.4vw, 56px) 0; overflow: hidden; display: flex; align-items: flex-end; min-height: 300px; }
.spot__card + .spot__card .spot__art { background: var(--sand); }
.spot__copy { display: grid; gap: 16px; align-content: start; padding: clamp(22px, 2.6vw, 40px) clamp(14px, 2.2vw, 32px) clamp(14px, 1.6vw, 22px); }
.spot__copy h3 { font-size: clamp(28px, 2.6vw, 40px); line-height: 1.08; letter-spacing: -0.02em; max-width: 18ch; }
.spot__ticks { font-size: 15px; gap: 10px; color: var(--muted); }
.spot__ticks li::before { border-color: var(--accent-ink); top: .45em; }
.spot__ticks code { font: 400 13px var(--mono); color: var(--ink); background: var(--paper); padding: 2px 6px; border-radius: 5px; }

/* ContentEditor mock */
.ce { width: 100%; background: var(--surface); border-radius: 14px 14px 0 0; box-shadow: 0 30px 50px -30px rgba(22,23,43,.45); font-size: 12px; }
.ce__bar { display: flex; align-items: center; gap: 4px; padding: 10px 12px; border-bottom: 1px solid #ecece4; }
.ce__tab { padding: 5px 9px; border-radius: 6px; color: var(--muted); }
.ce__tab.is-on { background: var(--paper); color: var(--ink); font-weight: 500; }
.ce__tools { margin-left: auto; display: flex; gap: 2px; color: var(--muted); font: 400 13px var(--mono); }
.ce__tools > * { display: grid; place-items: center; min-width: 22px; height: 22px; border-radius: 5px; font-style: normal; }
.ce__tools i { font-style: italic; }
.ce__doc { position: relative; padding: 18px 18px 58px; display: grid; gap: 12px; }
.ce__h { font: 400 20px/1.1 var(--serif); }
.ce__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ce__cell { display: grid; gap: 6px; align-content: start; padding: 8px; border-radius: 8px; background: var(--paper); }
.ce__cell.is-sel { grid-column: span 2; grid-row: span 2; box-shadow: inset 0 0 0 1.5px var(--accent-ink); position: relative; }
.ce__cell.is-sel small { position: absolute; top: -9px; right: 8px; font: 400 10px var(--mono); background: var(--accent-ink); color: #fff; padding: 2px 6px; border-radius: 4px; }
.ce__img { display: block; height: 74px; border-radius: 6px; background: repeating-linear-gradient(135deg, #e3e3da 0 7px, #efefe9 7px 14px); }
.ce__line { display: block; height: 6px; border-radius: 3px; background: #dcdcd3; }
.ce__line--s { width: 60%; }
.ce__panel { position: absolute; right: 14px; bottom: 10px; display: flex; gap: 4px; padding: 6px; border-radius: 10px; background: var(--ink); color: #fff; font: 400 10.5px var(--mono); box-shadow: 0 14px 24px -12px rgba(22,23,43,.5); }
.ce__panel span { padding: 4px 7px; border-radius: 6px; background: rgba(255,255,255,.08); }
.ce__panel span:first-child { background: none; color: var(--accent); }

/* DynamicItems mock */
.di { width: 100%; display: grid; gap: 6px; background: var(--surface); border-radius: 14px 14px 0 0; padding: 16px 16px 20px; box-shadow: 0 30px 50px -30px rgba(22,23,43,.45); font-size: 13px; }
.di__head { font: 400 18px var(--serif); margin-bottom: 6px; }
.di__head small { font: 400 12px var(--mono); color: var(--muted); margin-left: 6px; }
.di__block { display: grid; grid-template-columns: 112px 64px 1fr; gap: 10px; align-items: center; padding: 9px 10px; border-radius: 9px; background: var(--paper); min-width: 0; }
.di__block .fld { justify-self: start; background: var(--surface); padding: 5px 7px; font-size: 11px; }
.di__block b { font: 400 13px var(--mono); color: var(--muted); }
.di__block em { font-style: normal; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.di__img { display: block; height: 22px; border-radius: 5px; background: repeating-linear-gradient(135deg, #e3e3da 0 6px, #ffffff 6px 12px); }
.di__add { margin-top: 2px; padding: 9px 10px; border-radius: 9px; box-shadow: inset 0 0 0 1.5px #d4d4ca; color: var(--muted); font-size: 12px; text-align: center; }

/* all fieldtypes */
.ftlist { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(28px, 3vw, 48px) clamp(28px, 3.4vw, 64px); margin-top: var(--gap); background: var(--surface); border-radius: var(--r-big); padding: clamp(28px, 4vw, 72px); }
.ftlist__group h3 { font-size: clamp(20px, 1.6vw, 24px); margin-bottom: 12px; }
.ftlist__group li { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 9px 0; border-top: 1px solid #ecece4; }
.ftlist__group b { font: 400 13.5px var(--mono); }
.ftlist__group small { font-size: 13px; color: var(--muted); text-align: right; }

/* ---------- product: every feature ---------- */
.feats__nav { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: var(--gap); }
.feats__nav a { font-size: 14px; padding: 9px 14px; border-radius: 999px; background: var(--surface); transition: background-color .2s, color .2s; }
.feats__nav a:hover { background: var(--ink); color: #fff; }
.feats { columns: 3 320px; column-gap: clamp(32px, 4vw, 72px); background: var(--surface); border-radius: var(--r-big); padding: clamp(28px, 4vw, 72px); }
.feats__group { break-inside: avoid; margin-bottom: clamp(36px, 3.6vw, 56px); scroll-margin-top: 100px; }
.feats__group h3 { font-size: clamp(22px, 1.8vw, 28px); margin-bottom: 14px; }
.feats__group dl div { padding: 12px 0; border-top: 1px solid #ecece4; }
.feats__group dt { font-weight: 600; font-size: 15px; }
.feats__group dd { margin: 4px 0 0; color: var(--muted); font-size: 14px; line-height: 1.5; }

@media (max-width: 1280px) { .ftlist { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 1040px) { .spot { grid-template-columns: 1fr; } }
@media (max-width: 680px) { .ftlist { grid-template-columns: 1fr; } .di__block { grid-template-columns: auto 1fr; } .di__block b { display: none; } .ce__tools span:nth-child(n+4) { display: none; } }

/* ---------- blog post: comments ---------- */
.post-comments { display: grid; gap: 28px; margin: 0 0 var(--gap); background: var(--surface); border-radius: var(--r-big); padding: clamp(32px, 6vw, 104px) clamp(24px, 6vw, 112px); scroll-margin-top: 100px; }
.post-comments > * { width: 100%; max-width: 52.2rem; margin-inline: auto; }   /* = the 70ch prose column at 18px */
.post-comments > .post-comments__more { width: auto; }
.post-comments__head { display: grid; gap: 8px; }
.post-comments__head h2 { font-size: clamp(30px, 3vw, 44px); display: flex; align-items: baseline; gap: 12px; }
.post-comments__head p { color: var(--muted); font-size: 15px; }
.post-comments__gate { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; background: var(--paper); border-radius: 16px; padding: 18px 20px; }
.post-comments__gate .hero__cta { margin: 0; }
.post-comments .comments { gap: 22px; padding-top: 24px; border-top: 1px solid #ecece4; }
.post-comments__more { justify-self: center; }

/* ---------- product sub-pages: next link ---------- */
.pnext { display: flex; justify-content: space-between; align-items: center; gap: 24px; margin-top: var(--space); background: var(--surface); border-radius: var(--r-big); padding: clamp(28px, 3.4vw, 56px); transition: background-color .25s, color .25s; }
.pnext span { display: grid; gap: 8px; }
.pnext small { font: 400 13px var(--mono); color: var(--muted); }
.pnext b { font: 400 clamp(28px, 3vw, 48px)/1.05 var(--serif); letter-spacing: -0.02em; }
.pnext i { font-style: normal; font-size: clamp(28px, 3vw, 44px); transition: transform .35s cubic-bezier(.2,.7,.2,1); }
.pnext:hover { background: var(--ink); color: #fff; }
.pnext:hover small { color: var(--accent); }
.pnext:hover i { transform: translateX(8px); color: var(--accent); }

/* ---------- product overview: topic teasers ---------- */
.topics { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--gap); }
.topic { display: grid; grid-template-rows: auto 1fr auto; gap: 18px; min-height: clamp(320px, 28vw, 420px); background: var(--bg, var(--surface)); border-radius: var(--r-big); padding: clamp(28px, 3.4vw, 56px); transition: transform .35s cubic-bezier(.2,.7,.2,1); }
.topic:hover { transform: translateY(-4px); }
.topic h3 { font-size: clamp(30px, 3vw, 46px); line-height: 1.05; letter-spacing: -0.02em; max-width: 16ch; }
.topic p { color: rgba(22,23,43,.74); max-width: 46ch; }
.topic .chips .fld { background: rgba(255,255,255,.6); color: var(--ink); }
.topic__go { display: flex; justify-content: space-between; align-items: center; font-weight: 500; padding-top: 18px; border-top: 1px solid rgba(22,23,43,.12); }
.topic__go i { font-style: normal; transition: transform .35s cubic-bezier(.2,.7,.2,1); }
.topic:hover .topic__go i { transform: translateX(6px); }
.topic--ink { --bg: var(--ink); color: #fff; }
.topic--ink p { color: #b3b5c6; }
.topic--ink .chips .fld { background: rgba(255,255,255,.08); color: #fff; }
.topic--ink .topic__go { border-color: rgba(255,255,255,.14); }
.topic--ink .kicker { color: var(--accent); }
.topic-all { display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center; margin-top: var(--gap); background: var(--surface); border-radius: var(--r-big); padding: clamp(28px, 3.4vw, 56px); }
.topic-all h3 { font-size: clamp(28px, 2.6vw, 40px); }
.topic-all p { color: var(--muted); margin-top: 10px; max-width: 70ch; }
@media (max-width: 1040px) { .topics { grid-template-columns: 1fr; } .topic-all { grid-template-columns: 1fr; } }

/* integration: code sample */
.codebox { background: var(--ink); color: #e9e9f2; border-radius: var(--r-big); padding: clamp(24px, 3vw, 48px); font: 400 14px/1.85 var(--mono); overflow-x: auto; white-space: pre; }
.codebox i { font-style: normal; color: var(--accent); }
.codebox em { font-style: normal; color: #8f91a6; }
.snip { font: 400 13px/1.7 var(--mono); background: var(--paper); border-radius: 10px; padding: 12px 14px; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--ink); }
.snip i { font-style: normal; color: var(--accent-ink); }
.topics--3 { grid-template-columns: repeat(3, 1fr); }
.topics--3 .topic:hover { transform: none; }
@media (max-width: 1040px) { .topics--3 { grid-template-columns: 1fr; } }

/* ---------- main nav: Product dropdown ---------- */
.navdd { position: relative; }
.navdd { display: flex; align-items: center; border-radius: 10px; transition: background-color .2s; }
.nav__links .navdd__link { padding-right: 4px; }
.nav__links .navdd__link:hover { background: none; }
.navdd__btn { display: grid; place-items: center; width: 26px; height: 36px; margin-right: 4px; padding: 0; border: 0; border-radius: 8px; background: none; color: var(--muted); cursor: pointer; transition: color .2s; }
.navdd__btn svg { transition: transform .25s cubic-bezier(.2,.7,.2,1); }
.navdd.is-open, .navdd:has(.navdd__link:hover) { background: rgba(22,23,43,.06); }
.navdd.is-open .navdd__link, .navdd.is-open .navdd__btn, .navdd__btn:hover { color: var(--ink); }
.navdd.is-current .navdd__link { color: var(--ink); font-weight: 500; }
.navdd.is-current .navdd__link::after { transform: scaleX(1); background: var(--accent-ink); }
.navdd.is-open .navdd__btn svg { transform: rotate(180deg); }
.navdd__menu { position: absolute; top: calc(100% + 14px); left: -12px; width: 560px; display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 10px; border-radius: 20px; background: var(--surface); box-shadow: 0 0 0 1px rgba(22,23,43,.05), 0 30px 60px -24px rgba(22,23,43,.35); opacity: 0; visibility: hidden; transform: translateY(-6px); transition: opacity .2s, transform .25s cubic-bezier(.2,.7,.2,1), visibility 0s .25s; z-index: 60; }
.navdd__menu::before { content: ""; position: absolute; left: 0; right: 0; top: -16px; height: 16px; }   /* hover bridge */
.navdd.is-open .navdd__menu { opacity: 1; visibility: visible; transform: none; transition: opacity .2s, transform .25s cubic-bezier(.2,.7,.2,1), visibility 0s; }
@media (hover: hover) and (min-width: 1041px) {
  .navdd:hover .navdd__menu { opacity: 1; visibility: visible; transform: none; transition: opacity .2s, transform .25s cubic-bezier(.2,.7,.2,1), visibility 0s; }
  .navdd:hover { background: rgba(22,23,43,.06); }
  .navdd:hover .navdd__link, .navdd:hover .navdd__btn { color: var(--ink); }
  .navdd:hover .navdd__btn svg { transform: rotate(180deg); }
}
.nav__links .navdd__item { display: grid; gap: 4px; align-content: start; padding: 14px 16px; border-radius: 14px; color: var(--ink); font-size: 15px; }
.nav__links .navdd__item::after { display: none; }
.navdd__item b { font-weight: 500; }
.navdd__item small { font-size: 13px; color: var(--muted); line-height: 1.35; }
.nav__links .navdd__item:hover { background: var(--paper); }
.nav__links .navdd__item[aria-current] { background: var(--paper); font-weight: 400; }
.navdd__item[aria-current] b::after { content: ""; display: inline-block; width: 6px; height: 6px; margin-left: 8px; border-radius: 50%; background: var(--accent-ink); vertical-align: middle; }
.navdd__item--lead { grid-column: 1 / -1; position: relative; margin-bottom: 4px; }
.navdd__item--lead::before { content: ""; position: absolute; left: 16px; right: 16px; bottom: -4px; height: 1px; background: #ececE4; }
.navdd__item--all { grid-column: 1 / -1; display: flex !important; justify-content: space-between; align-items: baseline; border-top: 1px solid #ececE4; border-radius: 0 0 14px 14px; margin-top: 4px; }
@media (max-width: 1320px) and (min-width: 1041px) { .nav__links .navdd__link { padding-right: 2px; } }
@media (max-width: 1040px) {
  .navdd { flex-wrap: wrap; }
  .nav__links .navdd__link { flex: 1; padding-right: 14px; }
  .navdd__btn { width: 48px; height: 48px; color: var(--ink); background: var(--paper); border-radius: 10px; margin: 0; }
  .navdd.is-open, .navdd:has(.navdd__link:hover) { background: none; }
  .navdd__menu { flex-basis: 100%; position: static; width: auto; grid-template-columns: 1fr; padding: 0 0 6px 10px; box-shadow: none; background: none; display: none; opacity: 1; visibility: visible; transform: none; }
  .navdd.is-open .navdd__menu { display: grid; }
  .nav__links .navdd__item { padding: 10px 14px; }
  .navdd__item--lead { margin-bottom: 0; }
  .navdd__item--lead::before { display: none; }
  .navdd__item--all { border-top: 0; margin-top: 0; }
}

/* overview: "More about …" link under each topic section */
.more { margin-top: var(--gap); }
.more a { display: inline-flex; align-items: center; gap: 10px; padding: 12px 20px; border-radius: 999px; background: var(--surface); font-weight: 500; font-size: 15px; transition: background-color .25s, color .25s; }
.more a span { transition: transform .3s cubic-bezier(.2,.7,.2,1); }
.more a:hover { background: var(--ink); color: #fff; }
.more a:hover span { transform: translateX(5px); color: var(--accent); }
.split__copy .more { margin-top: 8px; }

/* external link in the main nav (Docs) */
.nav__links .nav__ext { display: inline-flex; align-items: center; gap: 5px; }
.nav__ext svg { opacity: .55; transition: transform .25s cubic-bezier(.2,.7,.2,1), opacity .2s; }
.nav__ext:hover svg { opacity: 1; transform: translate(1px, -1px); }

/* ---------- front page: one quiet line of benefits under the screenshot ---------- */
.strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; margin-top: 1px; }
.strip li { background: var(--surface); }
.strip a { position: relative; display: grid; gap: 6px; align-content: start; height: 100%; padding: clamp(24px, 2.4vw, 36px) clamp(40px, 3.4vw, 56px) clamp(24px, 2.4vw, 36px) clamp(20px, 2.4vw, 36px); text-align: left; transition: background-color .3s; }
.strip__px { width: 32px; height: 32px; margin-bottom: 18px; color: var(--ink); transition: transform .35s cubic-bezier(.2,.7,.2,1); }
.strip__go { position: absolute; top: clamp(24px, 2.4vw, 36px); right: clamp(18px, 2vw, 28px); font-style: normal; color: #c3c5ce; transition: transform .35s cubic-bezier(.2,.7,.2,1), color .25s; }
.strip a:hover { background: #fbfbf8; }
.strip a:hover .strip__px { transform: translateY(-2px); }
.strip a:hover .strip__go { color: var(--accent-ink); transform: translateX(4px); }
.strip b { font: 400 clamp(20px, 1.7vw, 26px)/1.2 var(--serif); letter-spacing: -0.01em; transition: color .25s; }
.strip span { font-size: 14px; color: var(--muted); }
.strip a:hover b { color: var(--accent-ink); }
@media (max-width: 1040px) { .strip { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .strip { grid-template-columns: 1fr; } .strip a { padding: 18px 20px; } }

/* roadmap phases from the CMS: colour by status, bullets turned into a list by main.js */
.phase:first-child { background: var(--accent); }
.phase--later { background: var(--surface); }
a.vote { text-decoration: none; color: inherit; }

/* the CMS adds its own "For agents" link to the first <footer>; the site footer already has one */
a[data-birkly-agent-guide="footer-link"] { display: none; }


/* newsletter: result of the sign-up from the CMS */
.news__form [data-birkly-form-status] { margin: 6px 0 0; padding: 12px 18px; border-radius: 14px; background: var(--surface); font-size: 15px; line-height: 1.45; opacity: 1; }
.news__form [data-birkly-form-status].is-error { color: #b42318; }
.news__form [data-birkly-form-status][hidden] { display: none; }

/* thank-you page after a donation */
.ty-hero h1 { max-width: none; }
.ty-hero .pill { margin-bottom: 0; }
.ty-note { color: var(--muted); max-width: 52ch; }

/* ---------- analytics consent (shown by birkly-client.js through main.js) ---------- */
.consent {
  position: fixed; z-index: 9000; left: 24px; bottom: 24px; width: min(440px, calc(100vw - 48px));
  display: grid; gap: 12px; padding: 24px 26px 22px; border-radius: var(--r-box);
  background: var(--surface); color: var(--ink); box-shadow: 0 18px 60px rgba(22, 23, 43, .16), 0 2px 8px rgba(22, 23, 43, .06);
  animation: consent-in .35s cubic-bezier(.2,.7,.2,1) both;
}
.consent.is-leaving { opacity: 0; transform: translateY(8px); transition: opacity .2s, transform .2s; }
.consent__kicker { font: 400 12px/1 var(--mono); color: var(--accent-ink); }
.consent__text { font-size: 15px; line-height: 1.5; color: var(--muted); }
.consent__actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.consent__decline { background: var(--paper); color: var(--ink); }
.consent__decline:hover { background: var(--soft); }
.consent__more { margin-left: auto; font-size: 14px; }
@keyframes consent-in { from { opacity: 0; transform: translateY(12px); } }
@media (max-width: 560px) {
  .consent { left: 16px; right: 16px; bottom: 16px; width: auto; padding: 20px; }
  .consent__more { margin-left: 4px; }
}
@media (prefers-reduced-motion: reduce) { .consent { animation: none; } }

/* the CMS default banner, in case it appears before main.js has loaded */
#birkly-analytics-consent {
  left: 24px !important; right: auto !important; bottom: 24px !important; max-width: min(440px, calc(100vw - 48px)) !important;
  padding: 24px 26px 22px !important; border-radius: var(--r-box) !important; background: var(--surface) !important; color: var(--muted) !important;
  font: 400 15px/1.5 var(--sans) !important; box-shadow: 0 18px 60px rgba(22, 23, 43, .16), 0 2px 8px rgba(22, 23, 43, .06) !important;
}
#birkly-analytics-consent p { margin: 0 0 14px !important; }
#birkly-analytics-consent button {
  height: 40px !important; padding: 0 18px !important; border-radius: 999px !important; border: 0 !important;
  font: 500 14px var(--sans) !important; background: var(--paper) !important; color: var(--ink) !important;
}
#birkly-analytics-consent button:first-child { background: var(--ink) !important; color: #fff !important; }
