/* Kith: "Round the table". White paper, aubergine ink, and flat pastel blocks.
   Colour is used one block at a time: each page has one main block, never a mix.
   A group is always drawn the same way: a row of potato-print stamps, one per person, with a place left for you. */
/* Fonts are served from this site, so visitors' browsers contact nobody else. Licences: public/fonts/LICENSE.md */
@font-face { font-family: "Fraunces"; font-style: normal; font-weight: 500 800; font-display: swap; src: url("/fonts/fraunces.woff2") format("woff2"); }
@font-face { font-family: "DM Sans"; font-style: normal; font-weight: 400 700; font-display: swap; src: url("/fonts/dm-sans.woff2") format("woff2"); }
:root {
  color-scheme: light;
  --bg: #ffffff;
  --surface: #ffffff;
  --ink: #2e2540;
  --ink-soft: #5e5673;
  --line: #e9e4ee;
  --tint: #f7f4fb;
  --peach: #ffd9c7;
  --mint: #cdebd6;
  --lilac: #ddd3f5;
  --butter: #fbe6a2;
  --sky: #cfe3f8;
  --alert: #a3262f;
  --block: 28px; /* corner of a pastel block */
  --round: 16px; /* corner of things inside a block */
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "DM Sans", "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font-body); font-size: 17px; line-height: 1.55;
}
.wrap { max-width: 1000px; margin-inline: auto; padding-inline: 16px; }
.wrap.wide { max-width: 1400px; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 700; letter-spacing: -0.015em; text-wrap: balance; margin: 0; line-height: 1.1; }
p { margin: 0; }
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
[hidden] { display: none !important; }

/* header and footer */
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 18px; }
.mark { text-decoration: none; }
.top-nav { display: flex; align-items: center; gap: 18px; font-weight: 700; font-size: 0.95rem; }
.mark-word { font-family: var(--font-display); font-weight: 700; font-size: 1.9rem; letter-spacing: -0.02em; line-height: 1; }
.foot .wrap { padding-block: 8px 48px; color: var(--ink-soft); font-size: 0.9rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; }
.foot b { color: var(--ink); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; text-decoration: none;
  background: var(--ink); color: #ffffff; border: 2px solid var(--ink);
  border-radius: 999px; padding: 0.7rem 1.5rem; font-weight: 700; min-height: 48px;
}
.btn:disabled { opacity: 0.35; cursor: not-allowed; }
.btn.quiet { background: transparent; color: var(--ink); }
.btn.small { min-height: 40px; padding: 0.4rem 1rem; font-size: 0.95rem; }

/* pastel blocks */
.block { border-radius: var(--block); padding: clamp(24px, 5vw, 48px); }
.peach { background: var(--peach); }
.mint { background: var(--mint); }

/* landing page: hero block, two short sections, closing block */
.landing .wrap { display: grid; gap: 64px; padding-bottom: 64px; }
.hero { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 5vw, 56px); align-items: center; }
.hero > * { min-width: 0; }
.hero h1 { font-size: clamp(2.4rem, 5.6vw, 3.9rem); line-height: 1.02; }
.hero-text { display: grid; gap: 22px; }
.lede { font-size: 1.2rem; max-width: 28em; }
.hero-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }
.hero-cta small { font-size: 0.92rem; }
.section { display: grid; gap: 28px; }
.section h2, .closing h2 { font-size: clamp(1.6rem, 3.4vw, 2.1rem); }
.steps, .promises { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.steps li, .promises li { display: grid; gap: 8px; align-content: start; }
.steps h3, .promises h3 { font-size: 1.25rem; }
.steps p, .promises p { color: var(--ink-soft); }
.steps { counter-reset: s; }
.steps li { counter-increment: s; }
.steps li::before {
  content: counter(s); display: grid; place-items: center; width: 40px; height: 40px; margin-bottom: 4px;
  border-radius: 50%; background: var(--butter); font-family: var(--font-display); font-weight: 700; font-size: 1.2rem;
}
.promises li { border-top: 2px solid var(--ink); padding-top: 16px; }
.closing { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px 40px; }
.closing div { display: grid; gap: 8px; max-width: 34em; }

/* group card: the one picture of a group, used on the landing page and the preview */
.group { background: var(--surface); border-radius: 20px; padding: 22px; display: grid; gap: 14px; min-width: 0; }
.group-tag { font-size: 0.88rem; color: var(--ink-soft); margin-bottom: 4px; }
.group h3 { font-size: 1.4rem; }
.stamp-row { display: flex; align-items: center; gap: clamp(6px, 2vw, 12px); padding-block: 4px; }
.stamp { flex: 0 1 50px; min-width: 0; height: auto; aspect-ratio: 1; overflow: visible; }
.stamp:nth-of-type(odd) { transform: rotate(-6deg); }
.stamp:nth-of-type(even) { transform: rotate(5deg); }
.stamp.sky { color: #9fc8ee; } .stamp.coral { color: #f4a99c; } .stamp.leaf { color: #a2d8b3; } .stamp.sun { color: #f4cf6b; } .stamp.plum { color: #c3b3ec; }
.cut { fill: none; stroke: var(--surface); stroke-width: 4.5; stroke-linecap: round; }
.cut-fill { fill: var(--surface); }
.stamp-you {
  display: grid; place-items: center; flex: 0 1 50px; min-width: 0; aspect-ratio: 1; transform: rotate(4deg);
  border: 2px dashed var(--ink); border-radius: 34% 30% 36% 28%; font-size: clamp(0.68rem, 3vw, 0.8rem); font-weight: 700;
}
/* landing page picture: the same stamps as a loose sheet, with no facts attached */
.hero-art { margin: 0; display: grid; gap: 18px; justify-items: center; }
.hero-art .stamp-row {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(18px, 4vw, 34px); width: min(100%, 380px);
  background: var(--surface); border-radius: var(--block); padding: clamp(26px, 5vw, 42px); transform: rotate(-2deg);
}
.hero-art .stamp, .hero-art .stamp-you { width: 100%; }
.hero-art .stamp-you { font-size: 1.05rem; border-width: 3px; }
.hero-art figcaption { font-weight: 700; text-align: center; max-width: 18em; }
.facts { display: grid; margin: 0; }
.facts > div { display: grid; grid-template-columns: 5.2em 1fr; gap: 12px; padding-block: 9px; border-top: 1px solid var(--line); }
.facts dt { color: var(--ink-soft); font-size: 0.92rem; }
.facts dd { margin: 0; font-weight: 700; min-width: 0; }
.into { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.into small { font-weight: 400; color: var(--ink-soft); white-space: nowrap; }

/* sign-up flow and single-panel pages: one block per page */
.flow .wrap { max-width: 640px; padding-block: 8px 64px; display: grid; gap: 16px; }
.flow .wrap > *, .panel > *, .step > *, .stack > * { min-width: 0; }
.progress { display: flex; gap: 8px; align-items: center; min-height: 26px; padding-inline: 4px; }
.progress i { width: 12px; height: 12px; border-radius: 50%; background: var(--line); display: block; }
.progress i.now { background: var(--surface); box-shadow: inset 0 0 0 3px var(--ink); }
.progress i.done { background: var(--ink); }
.progress span { margin-left: 8px; font-size: 0.88rem; color: var(--ink-soft); }
.panel { background: var(--lilac); border-radius: var(--block); padding: clamp(22px, 5vw, 36px); display: grid; gap: 20px; }
.panel.peach { background: var(--peach); }
.panel.prose { background: var(--surface); border: 1px solid var(--line); gap: 14px; }
.panel h2, .panel-title { font-size: clamp(1.6rem, 4.5vw, 2.1rem); }
.panel h2:focus { outline: none; }
.step, .stack { display: grid; gap: 20px; }
/* Without JavaScript every step shows as one long form, divided by rules. */
.step + .step { border-top: 2px solid var(--surface); padding-top: 24px; }
.js .step + .step { border-top: 0; padding-top: 0; }
.help { color: var(--ink-soft); }
.help.small { font-size: 0.9rem; }
.me-actions { display: flex; flex-wrap: wrap; gap: 10px 12px; align-items: center; }
.panel .next-title { font-size: 1.05rem; margin-top: 6px; }
.next { margin: 8px 0 0; padding-left: 1.3em; display: grid; gap: 6px; color: var(--ink-soft); }
.me-more { margin-top: 18px; padding: 0 6px; }
.me-more > summary { cursor: pointer; color: var(--ink-soft); font-size: 0.93rem; text-decoration: underline; text-underline-offset: 3px; list-style: none; }
.me-more > summary::-webkit-details-marker { display: none; }
.me-more[open] > summary { color: var(--ink); text-decoration: none; font-weight: 700; }
.me-more-body { margin-top: 12px; padding: 18px 20px; border: 1px solid var(--line, rgba(46,37,64,.15)); border-radius: 18px; display: grid; gap: 12px; }
.choices { display: flex; flex-wrap: wrap; gap: 10px; }
.choice {
  position: relative; display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  background: var(--surface); border-radius: 999px; padding: 0.6rem 1.15rem; font-weight: 700; min-height: 46px;
}
.choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choice:has(input:checked) { background: var(--ink); color: #ffffff; }
.choice:has(input:focus-visible) { outline: 3px solid var(--ink); outline-offset: 3px; }
.choice:has(input:disabled) { opacity: 0.45; cursor: not-allowed; }
.choice.mine::after { content: "(mine)"; font-size: 0.85rem; font-weight: 400; }
.field { display: grid; gap: 8px; }
.field label, .sublabel { font-weight: 700; font-size: 0.95rem; }
.field input[type="text"], .field input[type="tel"], .field input[type="email"], .field textarea {
  background: var(--surface); border: 2px solid transparent; border-radius: var(--round);
  padding: 0.75rem 1.1rem; width: 100%; min-height: 50px;
}
.field input:focus-visible, .field textarea:focus-visible { outline: none; border-color: var(--ink); }
.field textarea { font: inherit; color: inherit; resize: vertical; min-height: 5.5rem; }
.consent.off { opacity: 0.45; }
/* place suggestions under the town or village box */
.combo { position: relative; }
.suggest {
  position: absolute; z-index: 5; left: 0; right: 0; top: calc(100% + 6px); list-style: none; margin: 0; padding: 6px;
  background: var(--surface); border: 2px solid var(--ink); border-radius: var(--round);
}
.suggest li { padding: 0.6rem 0.8rem; border-radius: 10px; cursor: pointer; font-weight: 700; }
.suggest li small { font-weight: 400; color: var(--ink-soft); font-size: 0.92rem; }
.suggest li[aria-selected="true"], .suggest li:hover { background: var(--lilac); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.nav { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.consent {
  display: grid; grid-template-columns: 24px 1fr; gap: 12px; align-items: start; cursor: pointer;
  background: var(--surface); border-radius: var(--round); padding: 14px 16px; font-size: 0.97rem;
}
.consent input { width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--ink); }
.errors { background: var(--surface); border: 2px solid var(--alert); border-radius: var(--round); padding: 14px 16px; color: var(--alert); }
.errors ul { margin: 6px 0 0; padding-left: 1.2em; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.prose h2 { font-size: 1.25rem; margin-top: 8px; }
.prose ul { margin: 0; padding-left: 1.2em; display: grid; gap: 6px; }
.draft { background: var(--butter); border-radius: 12px; padding: 10px 14px; }

/* organiser view: a to-do list, then people as cards and groups as cards */
.org-main .wrap { padding-block: 16px 64px; display: grid; gap: 28px; }
.org-main .wrap > * { min-width: 0; }
.org-main section { display: grid; gap: 14px; scroll-margin-top: 16px; }
.org-main h1 { font-size: 2rem; }
.org-main h2 { font-size: 1.5rem; }
.org-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 24px; }
.org-head nav { display: flex; flex-wrap: wrap; gap: 6px 20px; font-weight: 700; font-size: 0.95rem; }
.muted { color: var(--ink-soft); font-size: 0.95rem; }
.bad { color: var(--alert); }
.org-notice { background: var(--mint); border-radius: 12px; padding: 10px 14px; font-weight: 700; }
.org-notice.problem { background: var(--peach); }
.org-flag { background: var(--butter); border-radius: 12px; padding: 10px 14px; font-weight: 700; }
.todo { background: var(--lilac); border-radius: 20px; padding: 20px 22px; }
.todo-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.todo.quiet { background: var(--tint); }
.todo.quiet ul { font-weight: 400; }
.todo .muted { margin-top: 8px; font-size: 0.88rem; }
.next-step { background: var(--tint); border-radius: 12px; padding: 12px 14px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.next-step h4 { font-family: var(--font-body); font-size: 0.95rem; font-weight: 700; margin: 0; line-height: 1.3; }
.next-step p { margin: 0; }
.todo h2 { margin: 0 0 8px; }
.todo ul, .todo p { margin-top: 0; }
.next-step .muted { font-size: 0.88rem; display: grid; gap: 8px; }
.g-next { color: var(--ink-soft); font-size: 0.95rem; }
.todo ul { margin: 0; padding-left: 1.2em; display: grid; gap: 6px; font-weight: 700; }

.pill { display: inline-block; border-radius: 999px; padding: 2px 12px; font-size: 0.85rem; font-weight: 700; background: var(--tint); white-space: nowrap; text-transform: capitalize; justify-self: start; }
.pill.joined, .pill.g-open { background: var(--mint); }
.pill.offered, .pill.g-forming { background: var(--butter); }
.pill.g-full { background: var(--ink); color: #ffffff; }
.pill.declined, .pill.left, .pill.released, .pill.g-quiet, .pill.g-closed { background: var(--line); color: var(--ink-soft); }

.p-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.p-card { border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; align-content: start; }
.p-card header, .g-card header { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; }
.p-card h3, .g-card h3 { font-size: 1.25rem; }
.p-card header small, .p-where small { color: var(--ink-soft); font-size: 0.88rem; }
.p-where { font-weight: 700; }
.p-facts { margin: 0; display: grid; font-size: 0.93rem; }
.p-facts > div { display: grid; grid-template-columns: 4.5em 1fr; gap: 10px; padding-block: 5px; border-top: 1px solid var(--line); }
.p-facts dt { color: var(--ink-soft); }
.p-facts dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.p-facts small { color: var(--ink-soft); }
.offer { display: flex; flex-wrap: wrap; gap: 8px; }
.offer select { flex: 1 1 100%; min-width: 0; }

.g-card { background: var(--tint); border-radius: 20px; padding: 20px 22px; display: grid; gap: 14px; scroll-margin-top: 16px; }
.g-count { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; }
.g-count small { color: var(--ink-soft); }
.seats { display: inline-flex; gap: 4px; }
.seats i { width: 22px; height: 12px; border-radius: 4px; background: var(--surface); border: 1.5px solid #cfc8d8; }
.seats i.joined { background: var(--ink); border-color: var(--ink); }
.seats i.offered { background: var(--butter); border-color: var(--ink); }
.members { list-style: none; margin: 0; padding: 0; display: grid; background: var(--surface); border-radius: 12px; }
.member { display: grid; grid-template-columns: minmax(120px, 1fr) 130px 3fr; gap: 6px 16px; align-items: start; padding: 10px 14px; border-top: 1px solid var(--line); font-size: 0.93rem; }
.member:first-child { border-top: 0; }
.m-name { display: grid; }
.m-name small { color: var(--ink-soft); }
.m-detail { display: grid; gap: 6px; justify-items: start; min-width: 0; }
.copy-row { display: flex; gap: 6px; width: 100%; max-width: 520px; }

.more > summary { cursor: pointer; font-weight: 700; font-size: 0.93rem; color: var(--ink-soft); }
.more[open] > summary { margin-bottom: 10px; color: var(--ink); }
.more > form, .more > p { margin-top: 8px; }
.more form { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; }
.scroll { overflow-x: auto; }
table.org { border-collapse: collapse; width: 100%; font-size: 0.9rem; background: var(--surface); }
table.org th, table.org td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top; }
table.org th { background: var(--tint); white-space: nowrap; }
table.org small { color: var(--ink-soft); }
.tiny { font-size: 0.8rem; }
pre.mail { white-space: pre-wrap; font: inherit; margin: 8px 0 0; max-width: 60ch; }
.org-form { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; }
.org-form label { display: grid; gap: 4px; font-size: 0.85rem; font-weight: 700; }
.org-form .grow { flex: 1 1 240px; }
.org-form input, .org-form select, .offer select, input.copy {
  background: var(--surface); border: 1.5px solid #cfc8d8; border-radius: 8px; padding: 6px 10px; min-height: 40px; font-weight: 400;
}
input.copy { flex: 1 1 auto; min-width: 0; font-size: 0.8rem; }

@media (max-width: 700px) {
  .member { grid-template-columns: 1fr auto; }
  .m-detail { grid-column: 1 / -1; }
}
@media (max-width: 820px) {
  .landing .wrap { gap: 48px; }
  .hero { grid-template-columns: 1fr; }
  .steps, .promises { grid-template-columns: 1fr; gap: 24px; }
}
@media (max-width: 460px) {
  .top .btn { display: none; }
}
@media (prefers-reduced-motion: no-preference) {
  .choice { transition: background-color 0.12s ease, color 0.12s ease; }
}
