/* Papias: warm white paper, ink, terracotta. The illustration palette (design/papias-2026-10-23/brief.md) is ink #23211F,
   warm white #F7F5EF and terracotta #C65D45; text and buttons use the darker terracotta #A74432, which reads at 5.5:1 on
   the paper (the lighter one is 3.8:1, so it only draws: outlines, the required star, the badge's mark). */
:root {
  --paper: #f7f5ef;
  --card: #fffefb;
  --ink: #23211f;
  --ink-soft: #5e5953;
  --line: #ddd8cf;
  --primary: #a74432;
  --primary-deep: #8a3627;
  --primary-wash: #f6e7e2;
  --on-primary: #f7f5ef;
  --accent: #c65d45;
  /* The logo's own colours: never overridden by a competition's colours (theme_css). */
  --brand-ink: #23211f;
  --brand-accent: #c65d45;
  --error: #8e1b1b;
  --error-wash: #fbe9e7;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(35, 33, 31, .06), 0 4px 16px rgba(35, 33, 31, .05);
  --serif: "Fraunces", Georgia, serif;
  --sans: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #1a1816;
    --card: #242120;
    --ink: #f2efe8;
    --ink-soft: #b3ada5;
    --line: #3a3633;
    --primary: #e58c72;
    --primary-deep: #f0a890;
    --primary-wash: #3a2822;
    --on-primary: #1a1816;
    --accent: #e58c72;
    --brand-ink: #f2efe8;
    --brand-accent: #e58c72;
    --error: #f08a78;
    --error-wash: #3a2320;
    --shadow: none;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.55 var(--sans);
}
main { flex: 1; width: 100%; }
a { color: var(--primary); text-underline-offset: 3px; }
a:hover { color: var(--primary-deep); }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .5em; }
h1 { font: 650 clamp(1.8rem, 3.6vw, 2.25rem)/1.15 var(--sans); letter-spacing: -.025em; }
h2 { font-size: 1.15rem; font-weight: 600; }
h3 { font-size: 1.05rem; font-weight: 600; }
p { margin: 0 0 1em; }
.muted { color: var(--ink-soft); }
.small { font-size: .875rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* top bar and footer */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px clamp(16px, 4vw, 40px);
}
/* The wordmark: Papias in Fraunces, with the compact mark (a serif P on a rounded square) beside it. On the
   formsage host a small line says the name is changing (legacy_host in web.py). */
.wordmark {
  display: inline-flex; align-items: baseline; gap: 0;
  font: 800 3.1rem/1 var(--serif); letter-spacing: -.015em; color: var(--ink); text-decoration: none;
  font-variation-settings: "opsz" 144;
}
/* Bigger, as on the mockup (Anton 2026-10-25: "the logo needs to be bigger"); the app's own header keeps it smaller. */
body:not(.site) .wordmark { font-size: 2rem; }
.wordmark:hover { color: var(--ink); }
.mark {
  display: inline-grid; place-items: center; width: 1.15em; height: 1.15em; border-radius: .3em; flex: none;
  background: var(--brand-ink); color: var(--paper); font: 800 .78em/1 var(--serif); font-variation-settings: "opsz" 144;
}
.mark::before { content: "P"; transform: translateY(-.02em); }
.brand-note { display: block; font: 500 .74rem/1.2 var(--sans); color: var(--ink-soft); letter-spacing: 0; margin-top: 2px; }
.wordmark .tld { font-size: .62em; font-weight: 700; letter-spacing: 0; margin-top: .22em; }
.wordmark.noted { display: inline-flex; flex-wrap: wrap; max-width: max-content; }
.wordmark.noted .brand-note { flex-basis: 100%; }
.topbar nav { display: flex; gap: 20px; align-items: center; }
.topbar nav a { color: var(--ink); text-decoration: none; font-weight: 500; }
.topbar nav a:hover { color: var(--primary); }
.topbar nav form { margin: 0; }
.topbar nav a.nav-upgrade { color: var(--primary); font-weight: 600; }
.admin .plan-line { margin: -4px 0 18px; }
.footer {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px;
  padding: 28px clamp(16px, 4vw, 40px); color: var(--ink-soft); font-size: .8rem;
  border-top: 1px solid var(--line); margin-top: 64px;
}

/* buttons and inputs */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 20px; border: 0; border-radius: 999px;
  background: var(--primary); color: var(--on-primary); font: 600 .95rem/1 var(--sans);
  text-decoration: none; cursor: pointer; white-space: nowrap;
}
@media (prefers-color-scheme: dark) { .btn { color: #10241a; } }
.btn:hover { background: var(--primary-deep); color: var(--on-primary); }
@media (prefers-color-scheme: dark) { .btn:hover { color: #10241a; } }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-quiet { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn-quiet:hover { background: var(--primary-wash); color: var(--ink); }
@media (prefers-color-scheme: dark) { .btn-quiet, .btn-quiet:hover { color: var(--ink); } }
.linkish {
  background: none; border: 0; padding: 0; font: inherit; font-weight: 500;
  color: var(--ink); cursor: pointer;
}
.linkish:hover { color: var(--primary); }
.linkish.danger { color: var(--error); font-size: .875rem; }

input, select, textarea {
  width: 100%; margin-top: 6px; padding: 11px 13px;
  font: inherit; color: var(--ink); background: var(--card);
  border: 1.5px solid var(--line); border-radius: 9px;
}
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-wash); }
input[type="checkbox"], input[type="radio"] { width: auto; margin: 0; accent-color: var(--primary); }
label { display: block; font-weight: 500; }
.stack > * + * { margin-top: 16px; }
.error { color: var(--error); font-size: .9rem; margin: 8px 0 0; }
.req { color: var(--accent); margin-left: 3px; }

/* sign in */
.narrow { max-width: 380px; margin: 0 auto; padding: 48px 16px; }

/* public form */
.form-wrap { max-width: 640px; margin: 0 auto; padding: 24px 16px 0; }
.form-head { padding: 28px 0 8px; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.form-desc { color: var(--ink-soft); font-size: 1.05rem; white-space: pre-line; }
.banner {
  background: var(--primary-wash); border-radius: var(--radius); padding: 12px 16px; font-size: .9rem;
}
.banner a { margin-left: 6px; font-weight: 600; }
.google-line { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin: 0 0 18px; }
.btn-google::before { content: "G"; display: inline-grid; place-items: center; width: 20px; height: 20px; margin-right: 8px;
  border-radius: 50%; background: var(--card); color: #4285f4; font: 800 .85rem/1 var(--serif); border: 1px solid var(--line); }
.verify-line { margin: 12px clamp(16px, 4vw, 40px) 0; }  /* the unconfirmed-account line, above the page */
.verify-line .inline, .guest-line .inline { display: inline; }
.guest-line { margin-bottom: 16px; }
.error-summary {
  background: var(--error-wash); color: var(--error); border-radius: var(--radius);
  padding: 12px 16px; font-weight: 500; margin-top: 16px;
}
.answers .q { padding: 22px 0; border-bottom: 1px solid var(--line); margin: 0; min-width: 0; }
fieldset.q { border: 0; border-bottom: 1px solid var(--line); padding: 22px 0; }
.answers legend, .answers .q > label:not(.option) { font-weight: 600; font-size: 1.02rem; padding: 0; }
.answers .help { margin: 4px 0 0; color: var(--ink-soft); font-size: .92rem; }
.answers .q.has-error input, .answers .q.has-error select, .answers .q.has-error textarea { border-color: var(--error); }
.answers .statement h2 { font: 650 1.6rem/1.2 var(--sans); letter-spacing: -.02em; margin: 8px 0 4px; }
.answers .statement p { color: var(--ink-soft); margin: 0; white-space: pre-line; }
.option {
  display: flex; align-items: center; gap: 12px; margin-top: 10px; padding: 11px 14px;
  border: 1.5px solid var(--line); border-radius: 9px; background: var(--card); font-weight: 400; cursor: pointer;
}
.option:has(input:checked) { border-color: var(--primary); background: var(--primary-wash); }
.submit-row { display: flex; align-items: center; gap: 18px; padding: 26px 0 0; flex-wrap: wrap; }
.req-note { color: var(--ink-soft); font-size: .85rem; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.done { text-align: center; padding-top: 72px; }
.tick {
  display: inline-block; width: 56px; height: 56px; border-radius: 50%; background: var(--primary-wash);
  position: relative; margin-bottom: 18px;
}
.tick::after {
  content: ""; position: absolute; left: 20px; top: 14px; width: 12px; height: 22px;
  border: solid var(--primary); border-width: 0 3px 3px 0; transform: rotate(45deg);
}

/* organiser pages */
.admin-wrap { max-width: 1120px; margin: 0 auto; padding: 16px clamp(16px, 4vw, 40px) 0; }
.page-head {
  display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-end; justify-content: space-between;
  margin-bottom: 24px;
}
.page-head h1 { margin: 4px 0 6px; overflow-wrap: anywhere; }
.back { font-size: .9rem; text-decoration: none; color: var(--ink-soft); }
.new-form { display: flex; gap: 10px; flex: 1; max-width: 460px; min-width: 260px; }
.new-form input { margin: 0; }
.form-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.form-row {
  display: grid; grid-template-columns: 1fr auto 110px 110px; gap: 16px; align-items: center;
  padding: 16px 8px; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none;
}
.form-row:hover { background: var(--card); color: var(--ink); }
.form-row-title { font-weight: 600; overflow-wrap: anywhere; }
@media (max-width: 640px) {
  .form-row { grid-template-columns: 1fr auto; }
  .form-row .muted { grid-column: span 1; font-size: .85rem; }
}
.pill {
  display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: .75rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .06em; background: var(--line); color: var(--ink-soft);
}
.pill-open { background: var(--primary-wash); color: var(--primary); }
.pill-closed { background: var(--error-wash); color: var(--error); }
.empty {
  text-align: center; padding: 56px 20px; border: 1.5px dashed var(--line); border-radius: var(--radius);
  color: var(--ink-soft);
}
.empty h2 { color: var(--ink); font: 650 1.6rem/1.2 var(--sans); letter-spacing: -.02em; }
.empty.small { padding: 28px 16px; margin-bottom: 16px; }
.empty.small p { margin: 0; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 20px; box-shadow: var(--shadow);
}

/* builder */
.title-line { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; font-size: .9rem; }
.share {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  background: var(--primary-wash); border-radius: var(--radius); padding: 12px 16px; font-size: .9rem;
}
.share code { font-size: .88rem; overflow-wrap: anywhere; }
.share p { margin: 0; flex: 1 1 240px; min-width: 0; }
.share .btn { padding: 8px 16px; }
.share-group { margin: 0 0 16px; }
.share-group .code { font: 600 1.05rem/1 ui-monospace, monospace; letter-spacing: .08em; }
.builder-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; align-items: start; }
@media (max-width: 860px) { .builder-grid { grid-template-columns: 1fr; } }
.builder-main > * + * { margin-top: 16px; }
.form-meta label + label { margin-top: 14px; }
.fields { list-style: none; margin: 0; padding: 0; }
.fields > li + li { margin-top: 12px; }
.field { border-left: 4px solid var(--primary); }
.field[data-type="statement"] { border-left-color: var(--accent); }
.field.invalid { border-color: var(--error); }
.field-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.field-type { font-size: .78rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-soft); }
.field-tools { display: flex; gap: 4px; }
.icon-btn {
  width: 34px; height: 34px; border-radius: 8px; border: 1px solid transparent; background: none;
  color: var(--ink-soft); cursor: pointer; font-size: 1rem;
}
.icon-btn:hover:not(:disabled) { background: var(--primary-wash); color: var(--ink); }
.icon-btn:disabled { opacity: .3; cursor: default; }
.field label { margin-top: 10px; font-size: .9rem; }
.field label.toggle { display: flex; align-items: center; gap: 10px; margin-top: 14px; font-weight: 500; }
.builder-side { position: sticky; top: 16px; display: grid; gap: 16px; }
@media (max-width: 860px) { .builder-side { position: static; } }
.palette h2 { font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-soft); }
.palette-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.palette-btn {
  display: flex; align-items: center; gap: 8px; padding: 10px; text-align: left;
  border: 1px solid var(--line); border-radius: 9px; background: var(--paper);
  font: 500 .84rem/1.2 var(--sans); color: var(--ink); cursor: pointer;
}
.palette-btn:hover { border-color: var(--primary); background: var(--primary-wash); }
.ico { width: 18px; height: 18px; flex: none; border-radius: 4px; background: var(--primary-wash); position: relative; }
.ico::after {
  content: ""; position: absolute; inset: 5px 4px; border-top: 2px solid var(--primary);
}
.ico-long_text::after { inset: 4px 3px; border-bottom: 2px solid var(--primary); }
.ico-choice::after, .ico-checkboxes::after, .ico-dropdown::after { inset: 5px; border: 2px solid var(--primary); }
.ico-choice::after { border-radius: 50%; }
.ico-statement { background: var(--accent); opacity: .7; }
.savebar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 16px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
}
.savebar .unsaved { color: var(--accent); font-weight: 600; font-size: .9rem; }
.savebar .error { margin: 0; }
.savebar .muted { font-size: .9rem; }
.danger-zone { text-align: right; }
.status-actions form { margin: 0; }

/* responses */
.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
.responses { border-collapse: collapse; width: 100%; font-size: .92rem; }
.responses th, .responses td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.responses th { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-soft); white-space: nowrap; }
.responses tr:last-child td { border-bottom: 0; }
.responses td { max-width: 320px; overflow-wrap: break-word; }
.responses .when { white-space: nowrap; color: var(--ink-soft); }

/* people filling in a form don't need the organiser's sign-in link */
.public-form .topbar nav { display: none; }

/* Last Man Standing: entry boxes, picks, organiser pages */
.step { font-size: .75rem; text-transform: uppercase; letter-spacing: .12em; color: var(--primary); font-weight: 600; margin: 0 0 6px; }
.q-title { display: block; font-weight: 600; font-size: 1.02rem; }
.sub-label { margin-top: 12px; font-weight: 500 !important; font-size: .95rem !important; }
.q-entries { border-bottom: 0 !important; }
.entry {
  background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--primary);
  border-radius: var(--radius); padding: 16px 18px; margin-top: 14px; box-shadow: var(--shadow);
}
.entry h3 { margin: 0; font-size: 1.05rem; }
.entry-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 4px; }
.entry label { margin-top: 10px; font-weight: 500; font-size: .92rem; }
.entry .meta { font-size: .86rem; color: var(--ink-soft); margin: 0; }
.entry.out { border-left-color: var(--line); opacity: .65; box-shadow: none; }
.entry .cur { font-size: .84rem; color: var(--primary); margin: 8px 0 0; }
.entry .cur.none { color: var(--ink-soft); }
.add-entry { margin-top: 14px; }
.who { display: flex; gap: 14px; align-items: center; color: var(--ink-soft); }
.who form { margin: 0; }
.signup-cta {
  margin-top: 32px; padding: 18px 20px; border: 1.5px dashed var(--line); border-radius: var(--radius);
  display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between;
}
.signup-cta p { margin: 0; flex: 1 1 240px; }
.done.compact { padding-top: 32px; }
.summary { list-style: none; padding: 0; margin: 20px 0; }
.summary li { display: flex; justify-content: space-between; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.center { text-align: center; }
.done + .summary + .center, .form-wrap > .banner { margin-top: 16px; }
.fixtures { margin-top: 28px; }
.fixtures summary { cursor: pointer; font-weight: 600; color: var(--primary); }
.fixtures ul { list-style: none; padding: 0; margin: 10px 0 0; font-size: .92rem; }
.fixtures li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.fixtures time { color: var(--ink-soft); white-space: nowrap; }
.add-more { margin-top: 24px; font-weight: 600; }
.stats { display: flex; flex-wrap: wrap; gap: 12px; margin: 18px 0 8px; }
.stats div {
  flex: 1 1 120px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 16px; display: flex; flex-direction: column;
}
.stats strong { font: 650 2rem/1 var(--sans); letter-spacing: -.02em; }
.stats span { color: var(--ink-soft); font-size: .85rem; margin-top: 4px; }
h2.section { margin: 36px 0 12px; font: 650 1.6rem/1.2 var(--sans); letter-spacing: -.02em; }
.grid-form { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 20px; align-items: start; }
.grid-form .wide { grid-column: 1 / -1; }
.grid-form .toggle { display: flex; gap: 10px; align-items: center; align-self: center; flex-wrap: wrap; }
.grid-form .muted.small { display: block; font-weight: 400; margin-top: 4px; }
.grid-form .toggle .muted.small { display: inline; margin: 0; }
@media (max-width: 640px) { .grid-form { grid-template-columns: 1fr; } }
.new-comp { margin-top: 28px; }
.card.warn { border-color: var(--accent); margin: 16px 0; }
.card.warn form { margin: 0; }
.inline-edit { display: flex; gap: 8px; align-items: center; margin: 0; }
.inline-edit input { margin: 0; padding: 6px 9px; min-width: 150px; }
.inline-edit button { white-space: nowrap; }
.entries-table td { vertical-align: middle; }
.entries-table form { margin: 0; }
.nowrap { white-space: nowrap; }
.pill-btn {
  border: 1.5px solid var(--line); background: none; border-radius: 999px; padding: 4px 12px;
  font: 600 .8rem/1.2 var(--sans); color: var(--ink-soft); cursor: pointer; white-space: nowrap;
}
.pill-btn:hover { border-color: var(--primary); color: var(--primary); }
.pill-btn.is-paid { background: var(--primary-wash); border-color: transparent; color: var(--primary); }
.responses tr.current td { background: var(--primary-wash); }
.after-table { margin-top: 8px; }

/* gameday */
.proposal-note { background: var(--card); border: 1.5px dashed var(--accent); border-radius: var(--radius); padding: 12px 16px; }
.stats .warn-stat { border-color: var(--accent); }
.stats .warn-stat strong { color: var(--accent); }
.warn-banner { background: var(--error-wash); color: var(--ink); }
.responses tr.row-out td { color: var(--ink-soft); }
.responses tr.row-out .verdict { color: var(--error); font-weight: 600; }
.responses tr.row-in .verdict { color: var(--primary); font-weight: 600; }
.responses tr.row-wait td { background: var(--error-wash); }
.responses tr.row-wait .verdict, .wait { color: var(--accent); font-weight: 600; }
.inline-edit select { margin: 0; padding: 6px 9px; width: auto; }
.confirm-bar { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; margin-top: 24px; }
.confirm-bar p { margin: 0; flex: 1 1 320px; }
.confirm-bar form { margin: 0; }
.settled { list-style: none; padding: 0; margin: 0; }
.settled > li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px; align-items: baseline;
  padding: 12px 0; border-bottom: 1px solid var(--line); }
.settled details { flex: 1 1 400px; }
.settled summary { cursor: pointer; }
.settled form { margin: 0; }
.settled-rows { list-style: none; padding: 0; margin: 10px 0 0; font-size: .92rem; }
.settled-rows li { display: grid; grid-template-columns: 1fr 1fr 80px; gap: 12px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.settled-rows .in { color: var(--primary); font-weight: 600; }
.settled-rows .out { color: var(--error); font-weight: 600; }
.cli-note { margin-top: 32px; }

.banner a { overflow-wrap: anywhere; font-weight: 600; }

/* payments */
.pill-wait { background: var(--error-wash); color: var(--accent); }
.summary .pill { margin-left: 6px; vertical-align: middle; font-size: .65rem; }
.payments-card p { margin-bottom: 10px; }
.upload { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 8px; }
.upload input[type=file] { width: auto; margin: 0; flex: 1 1 240px; }
.skipped { margin: 10px 0; font-size: .9rem; }
.skipped ul { margin: 6px 0 0; padding-left: 20px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }
.filters a { padding: 5px 12px; border-radius: 999px; border: 1.5px solid var(--line); text-decoration: none; color: var(--ink); font-size: .85rem; }
.filters a.on { background: var(--primary-wash); border-color: transparent; color: var(--primary); font-weight: 600; }
.responses tr.state-warn td:last-child { color: var(--accent); font-weight: 600; }
.responses tr.state-ok td:last-child { color: var(--primary); }

/* Show/Hide inside password boxes */
.pw-wrap { position: relative; display: block; }
.pw-wrap input { padding-right: 72px; }
.pw-toggle {
  position: absolute; right: 6px; top: 6px; bottom: 0; margin: auto 0; height: 34px;
  padding: 0 12px; border: 0; border-radius: 7px; background: var(--primary-wash); color: var(--primary);
  font: 600 .82rem/1 var(--sans); cursor: pointer;
}
.pw-toggle:hover { background: var(--line); color: var(--ink); }
.pw-toggle[aria-pressed="true"] { background: var(--primary); color: var(--card); }
.summary .auto-note { display: block; font-weight: 400; font-size: .8rem; color: var(--ink-soft); text-align: right; }

/* ===== public site ===== */
.eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: .75rem; font-weight: 600; color: var(--primary); margin: 0 0 12px; }
.eyebrow.center, .section-title, .center { text-align: center; }
.lede { font-size: 1.15rem; color: var(--ink-soft); max-width: 640px; margin: 0 auto 28px; }
.lede.left { margin-left: 0; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.hero-actions.left { justify-content: flex-start; }
.btn-big { padding: 15px 26px; font-size: 1.02rem; }
.btn-small { padding: 9px 16px; font-size: .88rem; }
.btn-light { background: var(--paper); color: var(--primary-deep); }
.btn-light:hover { background: var(--card); color: var(--primary-deep); }
.site main { overflow-x: hidden; }
/* The public site's headings are Fraunces, like the wordmark; the app's stay in the sans. */
.site h1, .site .section-title, .site .cta-band h2, .site .page-hero h1, .site .legal h2, .site .plan .price span, .site .value h2 {
  font-family: var(--serif); font-weight: 800; letter-spacing: -.02em; font-variation-settings: "opsz" 144; }

/* header */
.site-header { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent); }
.site-header-inner { max-width: 1160px; margin: 0 auto; padding: 12px clamp(16px, 4vw, 32px);
  display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.site-nav { display: flex; align-items: center; gap: 26px; }
.site-nav a:not(.btn) { color: var(--ink); text-decoration: none; font-weight: 500; font-size: .95rem; }
.site-nav a:not(.btn):hover { color: var(--primary); }
.site-nav form { margin: 0; }
.menu-toggle, .menu-button { display: none; }
@media (max-width: 820px) {
  .menu-button { display: block; width: 40px; height: 40px; position: relative; cursor: pointer; }
  .menu-button span, .menu-button span::before, .menu-button span::after {
    position: absolute; left: 9px; width: 22px; height: 2px; background: var(--ink); content: ""; border-radius: 2px; transition: .2s; }
  .menu-button span { top: 19px; }
  .menu-button span::before { top: -7px; left: 0; }
  .menu-button span::after { top: 7px; left: 0; }
  .site-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch;
    gap: 0; background: var(--paper); border-bottom: 1px solid var(--line); padding: 8px 16px 18px; }
  .site-nav a:not(.btn), .site-nav form { padding: 12px 4px; border-bottom: 1px solid var(--line); }
  .site-nav .btn { margin-top: 14px; }
  .menu-toggle:checked ~ .site-nav { display: flex; }
  .menu-toggle:checked + .menu-button span { background: transparent; }
  .menu-toggle:checked + .menu-button span::before { top: 0; transform: rotate(45deg); }
  .menu-toggle:checked + .menu-button span::after { top: 0; transform: rotate(-45deg); }
}

/* hero */
.hero2 { max-width: 1160px; margin: 0 auto; padding: clamp(40px, 7vw, 88px) clamp(16px, 4vw, 32px) 40px;
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero2 h1 { font-size: clamp(2.2rem, 4.6vw, 3.6rem); line-height: 1.06; letter-spacing: -.03em; margin-bottom: 22px; }
.hero2 h1 em { color: var(--primary); font-style: normal; }
.hero-note { margin-top: 22px; font-size: .88rem; color: var(--ink-soft); }
@media (max-width: 880px) { .hero2 { grid-template-columns: 1fr; } }

/* sections */
.section-block { max-width: 1160px; margin: 0 auto; padding: clamp(56px, 8vw, 96px) clamp(16px, 4vw, 32px) 0; }
.section-block.alt { max-width: none; margin-top: clamp(56px, 8vw, 96px); padding-bottom: clamp(56px, 8vw, 96px);
  background: var(--card); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-block.alt > * { max-width: 1096px; margin-left: auto; margin-right: auto; }
.section-title { font: 650 clamp(2rem, 4.2vw, 3rem)/1.1 var(--sans); letter-spacing: -.025em; margin: 0 auto 36px; max-width: 760px; }
.section-title.left { text-align: left; margin-left: 0; margin-bottom: 18px; }

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 36px 32px; }
@media (max-width: 900px) { .features { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .features { grid-template-columns: 1fr; } }
.feature h3 { font-size: 1.08rem; margin: 14px 0 6px; }
.feature p { color: var(--ink-soft); margin: 0; font-size: .96rem; }
.f-ico { display: block; width: 44px; height: 44px; border-radius: 12px; background: var(--primary-wash); position: relative; }
.f-ico::before { content: ""; position: absolute; inset: 0; margin: auto; }
.f-pay::before { width: 20px; height: 14px; border: 2px solid var(--primary); border-radius: 3px; box-shadow: inset 0 4px 0 -1px var(--primary); }
.f-check::before { width: 9px; height: 17px; border: solid var(--primary); border-width: 0 3px 3px 0; transform: translateY(-2px) rotate(45deg); }
.f-auto::before { width: 18px; height: 18px; border: 2.5px solid var(--primary); border-radius: 50%; border-right-color: transparent; }
.f-ball::before { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid var(--accent); background:
  radial-gradient(circle, var(--accent) 3px, transparent 3.5px); }
.f-log::before { width: 18px; height: 14px; border-top: 2.5px solid var(--primary); border-bottom: 2.5px solid var(--primary);
  box-shadow: 0 -6px 0 -4px var(--primary) inset; }
.f-lock::before { width: 18px; height: 13px; border-radius: 3px; background: var(--primary); transform: translateY(4px); }
.f-lock::after { content: ""; position: absolute; left: 0; right: 0; top: 9px; margin: auto; width: 10px; height: 10px;
  border: 2.5px solid var(--primary); border-bottom: 0; border-radius: 7px 7px 0 0; }

.split { display: grid; grid-template-columns: 1.1fr .9fr; gap: 56px; align-items: center; }
.split > * { margin: 0 !important; max-width: none !important; }
.section-block.alt.split { max-width: none; padding-left: max(32px, calc((100% - 1096px) / 2)); padding-right: max(32px, calc((100% - 1096px) / 2)); }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } .section-block.alt.split { padding-left: 16px; padding-right: 16px; } }
.ticks { list-style: none; padding: 0; margin: 0; }
.ticks li { position: relative; padding: 6px 0 6px 30px; }
.ticks li::before { content: ""; position: absolute; left: 4px; top: 12px; width: 6px; height: 11px;
  border: solid var(--primary); border-width: 0 2.5px 2.5px 0; transform: rotate(45deg); }
.faq { max-width: 780px; margin: 0 auto; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); padding: 4px 0; }
.faq summary { cursor: pointer; list-style: none; padding: 16px 40px 16px 0; font-weight: 600; font-size: 1.04rem; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 6px; top: 12px; font: 400 1.6rem/1 var(--sans); color: var(--primary); }
.faq details[open] summary::after { content: "−"; }
.faq details p { color: var(--ink-soft); margin: 0 0 18px; max-width: 680px; }

.cta-band { margin: clamp(64px, 9vw, 110px) auto 0; max-width: 1096px; padding: clamp(40px, 6vw, 64px) 24px 0;
  text-align: center; border-top: 1px solid var(--line); }
.cta-band h2 { font: 650 clamp(2rem, 4.2vw, 3rem)/1.1 var(--sans); letter-spacing: -.02em; margin: 0 0 22px; }
.cta-band p { color: var(--ink-soft); max-width: 520px; margin: -8px auto 26px; }
@media (max-width: 1140px) { .cta-band { margin-left: 16px; margin-right: 16px; } }

/* pricing */
.page-hero { max-width: 860px; margin: 0 auto; padding: clamp(48px, 8vw, 96px) 20px 8px; text-align: center; }
.page-hero h1 { font-size: clamp(2.2rem, 4.6vw, 3.2rem); line-height: 1.05; margin-bottom: 18px; }
.page-hero h1 em { color: var(--primary); font-style: normal; }
.plans { max-width: 1100px; margin: 40px auto 0; padding: 0 clamp(16px, 4vw, 32px); display: grid;
  grid-template-columns: repeat(3, 1fr); gap: 20px; align-items: stretch; }
@media (max-width: 900px) { .plans { grid-template-columns: 1fr; max-width: 520px; } }
.plan { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 30px 26px;
  display: flex; flex-direction: column; position: relative; }
.plan h2 { font-size: 1.1rem; margin: 0 0 12px; }
.plan .price { margin: 0 0 6px; color: var(--ink-soft); }
.plan .price span { font: 650 2.8rem/1 var(--sans); letter-spacing: -.02em; color: var(--ink); margin-right: 4px; }
.plan-for { color: var(--ink-soft); font-size: .95rem; min-height: 3em; }
.plan .ticks { margin: 6px 0 26px; flex: 1; font-size: .95rem; }
.plan .btn { align-self: stretch; }
.plan.featured { border: 2px solid var(--primary); box-shadow: 0 24px 50px -24px rgba(167, 68, 50, .35);
  background: color-mix(in srgb, var(--primary-wash) 45%, var(--card)); }
.plan-badge { position: absolute; top: -13px; left: 26px; background: var(--primary); color: var(--card); font-size: .72rem;
  font-weight: 600; letter-spacing: .08em; text-transform: uppercase; padding: 5px 12px; border-radius: 999px; }
.value-block { max-width: 820px; }
.value { background: var(--primary-wash); border-radius: 20px; padding: 28px 30px; }
.value h2 { font: 650 1.7rem/1.2 var(--sans); letter-spacing: -.02em; }
.value p { margin: 0; font-size: 1.05rem; }

/* legal */
.legal { max-width: 720px; margin: 0 auto; padding: clamp(40px, 7vw, 80px) 20px 0; }
.legal h1 { font-size: clamp(2.2rem, 4.5vw, 3.2rem); line-height: 1.08; }
.legal h2 { font: 650 1.6rem/1.2 var(--sans); letter-spacing: -.02em; margin: 36px 0 10px; }
.legal p, .legal li { color: var(--ink-soft); }
.legal li { margin-bottom: 8px; }
.legal strong { color: var(--ink); }

/* footer */
.site-footer { margin-top: clamp(48px, 7vw, 80px); border-top: 1px solid var(--line); }
.site-footer-inner { max-width: 1160px; margin: 0 auto; padding: 26px clamp(16px, 4vw, 32px) 8px;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 32px; }
.site-footer .wordmark { font-size: 2.3rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 22px; }
.footer-links a { color: var(--ink); text-decoration: none; font-size: .92rem; }
.footer-links a:hover { color: var(--primary); }
.legal-line { max-width: 1160px; margin: 0 auto; padding: 8px clamp(16px, 4vw, 32px) 28px; color: var(--ink-soft); font-size: .78rem; }
/* ===== product home ===== */
/* The Papias home (2026-10-23, design/papias-2026-10-23/homepage-mockup.png, matched more closely 2026-10-24): the
   comb hero at the mockup's scale, the builder as a browser window beside the phone, the pencil beside the clever
   bits, two plan cards, and the page ends on paper with a heading and a button. */
.hero2 { grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: clamp(16px, 3vw, 40px); padding-top: clamp(24px, 4vw, 48px); padding-bottom: 16px; }
.hero2 h1 { font-size: clamp(2.9rem, 5.7vw, 4.7rem); line-height: .98; margin-bottom: 20px; }
.hero-art { margin-right: calc(-1 * clamp(0px, 4vw, 56px)); }
.hero-art img { display: block; width: 100%; height: auto; }
.arrow-link { display: inline-flex; align-items: center; gap: 6px; padding: 15px 4px; font-weight: 600; color: var(--primary); text-decoration: none; }
.arrow-link:hover { color: var(--primary-deep); text-decoration: underline; }
@media (max-width: 880px) { .hero2 { grid-template-columns: 1fr; gap: 20px; } .hero-art { max-width: 560px; margin: 0 auto; } }
.demo2 { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, .6fr); gap: clamp(24px, 4vw, 48px); align-items: start; }
@media (max-width: 760px) { .demo2 { grid-template-columns: 1fr; max-width: 520px; margin: 0 auto; } }
.demo-label { font: 650 1.05rem/1.2 var(--sans); margin: 0 0 12px; }
/* The builder, as it is (admin/builder.html + builder.css), in the concept's browser window. */
.win { background: var(--card); border: 1px solid var(--line); border-radius: 14px; overflow: hidden;
  box-shadow: 0 24px 50px -28px rgba(35, 33, 31, .35); font-size: .8rem; }
.win-bar { display: flex; gap: 6px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.win-bar span { width: 10px; height: 10px; border-radius: 50%; background: #e4604f; }
.win-bar span:nth-child(2) { background: #e9b545; } .win-bar span:nth-child(3) { background: #5fc26c; }
.bd-top { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; overflow: hidden; }
.bd-back { color: var(--ink-soft); font-size: 1rem; }
.bd-top .mark { font-size: 13px; }
.bd-name { font-weight: 600; }
.bd-open { font-size: .62rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--primary-deep); background: var(--primary-wash); padding: 3px 7px; border-radius: 999px; }
.bd-tabs { display: flex; gap: 2px; margin-left: 6px; padding: 3px; background: var(--paper); border-radius: 9px; }
.bd-tabs span { padding: 4px 9px; border-radius: 7px; color: var(--ink-soft); font-weight: 500; }
.bd-tabs .on { background: var(--card); color: var(--ink); font-weight: 600; box-shadow: 0 1px 2px rgba(35, 33, 31, .12); }
.bd-ai { margin-left: auto; padding: 5px 10px; border: 1px solid var(--line); border-radius: 999px; font-weight: 500; }
.bd-save { padding: 5px 12px; background: var(--primary); color: var(--on-primary); border-radius: 999px; font-weight: 600; }
.bd-canvas { background: var(--paper); padding: 18px; }
.bd-form { background: var(--card); border-radius: 12px; overflow: hidden; padding-bottom: 16px; box-shadow: 0 10px 30px -20px rgba(35, 33, 31, .3); }
.bd-cover { height: 44px; background: linear-gradient(135deg, var(--primary-wash), color-mix(in srgb, var(--primary-wash) 40%, var(--card))); }
.bd-title { font: 700 1.3rem/1.15 var(--sans); letter-spacing: -.02em; margin: 16px 26px 2px; }
.bd-desc { color: var(--ink-soft); margin: 0 26px 10px; font-size: .86rem; }
.bd-q { font-weight: 600; font-size: .86rem; margin: 14px 26px 6px; }
.bd-q i, .ph-q i { color: var(--accent); font-style: normal; margin-left: 2px; }
.bd-in.tall { height: 48px; }
.bd-in { margin: 0 26px; height: 32px; border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; color: var(--ink-soft); font-size: .82rem; }
.bd-plus { margin: 20px 18px 0; border: 1.5px solid var(--primary); border-radius: 10px; padding: 10px 12px 10px; }
.bd-plus-line { display: flex; align-items: center; gap: 10px; font-size: .9rem; }
.bd-plus-ico { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 5px; background: var(--primary); color: var(--on-primary); font-weight: 700; line-height: 1; }
.bd-guess { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 8px 0 0 30px; font-size: .74rem; }
.bd-arrow { color: var(--ink-soft); margin-right: 2px; }
.bd-guess b { color: var(--primary); display: inline-flex; align-items: center; gap: 5px; }
.bd-opts { color: var(--ink-soft); margin-right: 4px; }
.bd-guess em { font-style: normal; display: inline-flex; align-items: center; gap: 5px; padding: 3px 8px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); }
.bd-ki { display: inline-grid; place-items: center; min-width: 16px; height: 16px; padding: 0 3px; border-radius: 4px; background: var(--primary-wash); color: var(--primary); font-size: .6rem; font-weight: 700; }
.dq-typed::after { content: ""; display: inline-block; width: 1.5px; height: 1.05em; background: var(--ink); margin-left: 2px; vertical-align: -2px; animation: blink 1s steps(2) infinite; }
@media (max-width: 760px) { .bd-ai { display: none; } }
@media (max-width: 480px) { .bd-tabs span:not(.on) { display: none; } .bd-canvas { padding: 12px; } .bd-title, .bd-desc, .bd-q, .bd-in { margin-left: 16px; margin-right: 16px; } }
/* The public form, as it is (the tidy form: cover band, title, questions, Send, the badge), in an iPhone 14
   (Anton 2026-10-25): body 71.5 x 146.7 mm, a 19.5:9 screen, the notch, the status bar, the home indicator, the
   side buttons; everything is a fraction of the width so it scales. Organiser's colours: navy, like the mockup. */
.phone { --w: 290px; width: var(--w); aspect-ratio: 71.5 / 146.7; margin: 0 auto; padding: calc(var(--w) * .034); position: relative;
  background: #1b1917; border-radius: calc(var(--w) * .165); box-shadow: 0 24px 50px -24px rgba(35, 33, 31, .5), inset 0 0 0 2px #3a3633; }
.phone::before, .phone::after { content: ""; position: absolute; width: 3px; border-radius: 2px; background: #2c2927; }
.phone::before { left: -3px; top: 19%; height: 6%; box-shadow: 0 calc(var(--w) * .27) 0 #2c2927, 0 calc(var(--w) * .42) 0 #2c2927; }
.phone::after { right: -3px; top: 30%; height: 11%; }
.ph-screen { height: 100%; position: relative; background: var(--paper); border-radius: calc(var(--w) * .13); overflow: hidden; --org: #12334a; --org-deep: #0b2232; }
.ph-notch { position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 41.5%; height: calc(var(--w) * .085); background: #1b1917; border-radius: 0 0 calc(var(--w) * .05) calc(var(--w) * .05); z-index: 2; }
.ph-status { position: absolute; top: calc(var(--w) * .03); left: 0; right: 0; display: flex; justify-content: space-between; padding: 0 calc(var(--w) * .085); font: 600 .62rem/1 var(--sans); color: #fff; z-index: 2; }
.ph-signal { display: flex; align-items: flex-end; gap: 1.5px; }
.ph-signal i { width: 2.5px; background: #fff; border-radius: 1px; }
.ph-signal i:nth-child(1) { height: 3px; } .ph-signal i:nth-child(2) { height: 5px; } .ph-signal i:nth-child(3) { height: 7px; }
.ph-signal i:nth-child(4) { width: 14px; height: 7px; margin-left: 5px; background: transparent; border: 1px solid rgba(255,255,255,.8); border-radius: 2px;
  box-shadow: inset 0 0 0 1px var(--org), inset 9px 0 0 #fff; }
.ph-home { position: absolute; bottom: calc(var(--w) * .025); left: 50%; transform: translateX(-50%); width: 34%; height: 4px; border-radius: 4px; background: var(--ink); opacity: .85; }
.ph-cover { height: calc(var(--w) * .3); background:
  radial-gradient(circle at 16% 125%, rgba(255,255,255,.14) 0 60px, transparent 61px),
  radial-gradient(circle at 86% -35%, rgba(255,255,255,.10) 0 90px, transparent 91px),
  linear-gradient(135deg, var(--org), var(--org-deep)); }
.ph-title { font: 700 1.25rem/1.1 var(--sans); letter-spacing: -.02em; margin: 18px 18px 4px; }
.ph-desc { color: var(--ink-soft); font-size: .82rem; margin: 0 18px 10px; }
.ph-q { font-weight: 600; font-size: .86rem; margin: 12px 18px 6px; }
.ph-in { margin: 0 18px; height: 34px; border: 1px solid var(--line); border-radius: 9px; background: var(--card); padding: 7px 10px; font-size: .9rem; }
.ph-in.tall { height: 50px; }
.ph-send { display: inline-block; margin: 16px 18px 0; padding: 10px 22px; background: var(--org); color: #fff; font-weight: 600; font-size: .88rem; border-radius: 999px; }
.ph-badge { display: flex; width: max-content; align-items: center; gap: 5px; margin: 18px auto 0; padding: 6px 11px 6px 7px; background: var(--card); border: 1px solid var(--line); border-radius: 999px;
  font: 500 .68rem/1 var(--sans); color: var(--ink); }
@media (prefers-color-scheme: dark) { .phone { background: #3b3734; } }
.ph-badge .mark { font-size: 13px; background: var(--brand-accent); }
.ph-badge b { font: 800 .8rem/1 var(--serif); font-variation-settings: "opsz" 144; }
.dq-hint { margin: 10px 0 0; font-size: .82rem; color: var(--ink-soft); }
.clever-split { grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); gap: clamp(24px, 5vw, 64px); }
.clever-split .section-title { font-size: clamp(1.8rem, 3.4vw, 2.5rem); }
.clever-art img { display: block; width: 100%; height: auto; }
@media (max-width: 860px) { .clever-split { grid-template-columns: 1fr; } .clever-art { max-width: 480px; margin: 0 auto; } }
.clever { list-style: none; padding: 0; margin: 0; display: grid; gap: 18px; }
.clever li { display: flex; gap: 16px; align-items: flex-start; }
.clever .f-ico { flex: none; }
.clever b { display: block; font-size: 1.05rem; margin: 10px 0 4px; }
.clever p { margin: 0; color: var(--ink-soft); font-size: .95rem; }
.f-ai::before { width: 16px; height: 16px; background: var(--primary); clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%); }
.f-branch::before { width: 8px; height: 8px; border-radius: 50%; background: var(--primary);
  box-shadow: -10px 10px 0 var(--primary), 10px 10px 0 var(--primary); transform: translateY(-5px); }
.f-plug::before { width: 14px; height: 10px; border-radius: 0 0 7px 7px; background: var(--primary); transform: translateY(1px); }
.f-plug::after { content: ""; position: absolute; left: 50%; top: 12px; width: 12px; height: 22px; margin-left: -6px; background:
  linear-gradient(var(--primary), var(--primary)) 1px 0 / 2.5px 6px no-repeat, linear-gradient(var(--primary), var(--primary)) 8.5px 0 / 2.5px 6px no-repeat,
  linear-gradient(var(--primary), var(--primary)) 4.75px 16px / 2.5px 6px no-repeat; }
.plans-two { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 820px; }
.plans-two .plan h2, .pricing-page .plan h2 { font: 700 1.5rem/1.1 var(--serif); font-variation-settings: "opsz" 144; }
.pricing-page .plans-note { text-align: center; margin: 22px auto 0; }
@media (max-width: 700px) { .plans-two { grid-template-columns: 1fr; max-width: 520px; } }
.plans-note { text-align: center; color: var(--ink-soft); font-size: .92rem; margin: 20px 0 0; }
.ea-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-right: 8px;
  vertical-align: 1px; box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 22%, transparent); }

/* hero: questions typed in the builder, and the form on a phone */
.demo { position: relative; padding-bottom: 40px; }
@media (max-width: 880px) { .demo { max-width: 480px; margin: 0 auto; width: 100%; } }
.demo-build { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 16px; margin-right: 22%;
  box-shadow: 0 24px 50px -28px rgba(35, 33, 31, .35); }
.demo-head { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: .85rem; color: var(--ink-soft);
  padding-bottom: 10px; margin: 0 0 10px; border-bottom: 1px solid var(--line); }
.demo-head .mark, .chat-head .mark { font-size: 15px; }
.dq { font-size: .9rem; font-weight: 600; padding: 8px 10px; border-radius: 10px; margin-bottom: 6px; background: var(--paper); }
.dq-kind { display: block; font-size: .66rem; font-weight: 600; text-transform: uppercase; letter-spacing: .07em; color: var(--primary); margin-bottom: 2px; }
.dq-group { border: 1.5px solid var(--primary); background: var(--card); }
.dq-inner { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.dq-inner span { font-weight: 500; font-size: .8rem; padding: 3px 9px; border-radius: 999px; background: var(--primary-wash); }
.dq-plus { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; border: 1.5px dashed var(--line);
  border-radius: 10px; padding: 8px 10px; font-size: .9rem; }
.dq-typed::after { content: ""; display: inline-block; width: 1.5px; height: 1.05em; background: var(--ink); margin-left: 2px;
  vertical-align: -2px; animation: caret 1.1s steps(1) infinite; }
@keyframes caret { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .dq-typed::after { animation: none; } }
.dq-guess { font-size: .74rem; font-weight: 600; color: var(--accent); white-space: nowrap; }
.dq-guess::before { content: "→ "; }
.demo-phone, .mock-phone { background: var(--paper); border: 1.5px solid var(--ink); border-radius: 26px; padding: 22px 16px 18px;
  box-shadow: 0 24px 50px -26px rgba(35, 33, 31, .5); }
.demo-phone { position: absolute; right: 0; bottom: 0; width: 44%; min-width: 170px; }
.dp-bar { height: 4px; border-radius: 4px; background: var(--line); overflow: hidden; margin-bottom: 14px; }
.dp-bar span { display: block; height: 100%; background: var(--primary); }
.dp-step { font-size: .72rem; color: var(--ink-soft); margin: 0 0 4px; }
.dp-q { font-weight: 650; font-size: 1.02rem; margin: 0 0 10px; }
.dp-opt { display: flex; align-items: center; gap: 8px; font-size: .86rem; border: 1.5px solid var(--line); border-radius: 9px;
  padding: 7px 9px; margin-bottom: 6px; background: var(--card); }
.dp-opt b { display: inline-grid; place-items: center; width: 20px; height: 20px; border: 1px solid var(--line); border-radius: 5px; font-size: .7rem; }
.dp-opt.on { border-color: var(--primary); background: var(--primary-wash); }
.dp-opt.on b { background: var(--primary); color: var(--card); border-color: var(--primary); }
.dp-ok { display: inline-block; margin-top: 6px; background: var(--primary); color: var(--card); font-weight: 600; font-size: .82rem;
  border-radius: 8px; padding: 6px 14px; }
@media (max-width: 420px) { .demo-build { margin-right: 0; } .demo { padding-bottom: 0; } .demo-phone { position: relative; width: 70%; margin: -12px 0 0 auto; } }

/* how it works */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; counter-reset: step; }
@media (max-width: 820px) { .steps { grid-template-columns: 1fr; } }
.steps li { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 24px 22px; counter-increment: step; }
.steps li::before { content: counter(step); display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%;
  background: var(--primary-wash); color: var(--primary); font-weight: 700; }
.steps h3 { margin: 14px 0 8px; font-size: 1.12rem; }
.steps p { margin: 0; color: var(--ink-soft); font-size: .95rem; }

/* section illustrations */
.mock-guess, .mock-adapt { background: var(--paper); border: 1px solid var(--line); border-radius: 18px; padding: 18px 20px;
  box-shadow: 0 24px 50px -30px rgba(35, 33, 31, .4); }
.mg-head { display: flex; justify-content: space-between; font-size: .7rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: .1em; color: var(--ink-soft); padding-bottom: 8px; }
.mg-row { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 10px 0; border-top: 1px solid var(--line); font-size: .9rem; }
.mg-row q { quotes: "“" "”"; }
.mg-row span { color: var(--primary); font-weight: 600; font-size: .8rem; text-align: right; flex: 0 1 44%; }
@media (max-width: 480px) { .mg-row { flex-direction: column; gap: 2px; } .mg-row span { text-align: left; } }
.ma-q { font-weight: 600; margin: 0 0 6px; font-size: .92rem; }
.ma-input { border: 1.5px solid var(--primary); border-radius: 9px; background: var(--card); padding: 7px 11px; width: 90px; margin-bottom: 14px; }
.ma-items { display: grid; gap: 6px; }
.ma-items div { display: flex; gap: 10px; align-items: baseline; background: var(--card); border: 1px solid var(--line);
  border-radius: 10px; padding: 9px 12px; font-size: .88rem; }
.ma-items b { font-size: .78rem; color: var(--primary); min-width: 52px; }
.ma-items span { flex: 1; }
.ma-items em { font-style: normal; color: var(--ink-soft); }
.ma-total { display: flex; justify-content: space-between; padding: 12px 12px 4px; font-size: .95rem; }
.ma-total strong { color: var(--primary); }
.ma-note { font-size: .8rem; color: var(--ink-soft); border-top: 1px dashed var(--line); margin: 10px 0 0; padding-top: 10px; }
#adapts.split { grid-template-columns: .95fr 1.05fr; }
@media (max-width: 860px) { #adapts.split { grid-template-columns: 1fr; } #adapts.split > :first-child { order: 2; } }
.mock-phone { max-width: 300px; justify-self: center; width: 100%; }
.mp-phone { display: flex; gap: 6px; font-size: .9rem; }
.mp-phone span { border: 1.5px solid var(--line); border-radius: 9px; background: var(--card); padding: 8px 10px; white-space: nowrap; }
.mp-phone span:last-child { flex: 1; border-color: var(--primary); }
.mp-hint { font-size: .74rem; color: var(--ink-soft); margin: 6px 0 4px; }
.f-form::before { width: 22px; height: 5px; border-radius: 3px; background: var(--primary);
  box-shadow: 0 8px 0 var(--primary), 0 -8px 0 color-mix(in srgb, var(--primary) 45%, transparent); }

/* coming next: a conversation */
.soon { display: inline-block; background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent);
  border-radius: 999px; padding: 4px 12px; letter-spacing: .1em; }
.ticks b { font-weight: 650; }
.chat { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 16px 16px 12px;
  box-shadow: 0 24px 50px -28px rgba(35, 33, 31, .35); }
.chat-head { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: .85rem; color: var(--ink-soft);
  padding-bottom: 10px; margin-bottom: 10px; border-bottom: 1px solid var(--line); }
.bubble { max-width: 86%; padding: 9px 13px; border-radius: 16px; margin: 0 0 8px; font-size: .9rem; line-height: 1.45; }
.bubble.ai { background: var(--primary-wash); border-bottom-left-radius: 5px; }
.bubble.me { background: var(--primary); color: var(--card); margin-left: auto; border-bottom-right-radius: 5px; }
.bubble.small { font-size: .84rem; }
.typing { display: flex; gap: 4px; padding: 10px 13px; margin: 0; width: 56px; border-radius: 16px; background: var(--primary-wash); }
.typing span { width: 6px; height: 6px; border-radius: 50%; background: var(--primary); opacity: .4; animation: blink 1.2s infinite; }
.typing span:nth-child(2) { animation-delay: .2s; }
.typing span:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 40% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .typing span { animation: none; } }

/* uses */
.uses { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px 24px; }
@media (max-width: 900px) { .uses { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .uses { grid-template-columns: 1fr; } }
.uses > div { border-top: 3px solid var(--primary); padding-top: 14px; }
.uses h3 { font-size: 1.05rem; margin-bottom: 6px; }
.uses p { color: var(--ink-soft); margin: 0; font-size: .94rem; }

/* picking a team by tapping it in its fixture */
.picker-label { font-weight: 600; font-size: .92rem; margin: 14px 0 8px; }
.picker { display: grid; gap: 8px; }
.fixture { display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; align-items: stretch; }
.vs { display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 52px;
  font-weight: 600; color: var(--ink-soft); font-size: .85rem; line-height: 1.1; }
.vs small { font-weight: 500; font-size: .68rem; margin-top: 2px; white-space: nowrap; }
.team { margin: 0 !important; cursor: pointer; }
.team input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.team span { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 46px; height: 100%;
  padding: 8px 10px; border: 1.5px solid var(--line); border-radius: 10px; background: var(--card); text-align: center;
  font-weight: 600; font-size: .92rem; transition: background .12s, border-color .12s; }
.team:hover span { border-color: var(--primary); }
.team input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.team input:checked + span { background: var(--primary); border-color: var(--primary); color: var(--card); }
.team.used { cursor: not-allowed; }
.team.used span { color: var(--ink-soft); background: transparent; border-style: dashed; text-decoration: line-through; font-weight: 500; }
.team.used small { text-decoration: none; font-size: .68rem; text-transform: uppercase; letter-spacing: .06em; }
.team.used:hover span { border-color: var(--line); }
.team.no-pick span { min-height: 0; flex-direction: row; gap: 4px; justify-content: flex-start; text-align: left; font-weight: 500;
  border-style: dashed; color: var(--ink-soft); font-size: .86rem; }
.team.no-pick input:checked + span { background: var(--primary-wash); color: var(--ink); border-color: var(--primary); }
@media (max-width: 380px) { .team span { font-size: .84rem; padding: 6px; } .vs { min-width: 42px; } }

/* round picks, shown to players once picks are locked */
.reveal { margin-top: 36px; padding-top: 24px; border-top: 1px solid var(--line); }
.reveal h2 { font: 650 1.7rem/1.2 var(--sans); letter-spacing: -.02em; margin-bottom: 4px; }
.reveal h3 { font-size: 1rem; margin: 22px 0 8px; }
.counts { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 6px; }
.counts li { display: grid; grid-template-columns: 120px 1fr 36px; gap: 10px; align-items: center; font-size: .92rem; }
.c-team { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.c-bar { height: 12px; border-radius: 6px; background: var(--primary-wash); overflow: hidden; }
.c-bar i { display: block; height: 100%; background: var(--primary); border-radius: 6px; }
.c-n { text-align: right; font-variant-numeric: tabular-nums; color: var(--ink-soft); }
.who-picked { list-style: none; padding: 0; margin: 0; font-size: .92rem; }
.who-picked li { display: grid; grid-template-columns: 1fr 1fr auto; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.who-picked small { color: var(--ink-soft); }
.who-picked .w-status { font-weight: 600; color: var(--primary); }
.who-picked li.out { color: var(--ink-soft); }
.who-picked li.out .w-status { color: var(--error); }
.section-link { font: 600 .85rem/1 var(--sans); margin-left: 12px; vertical-align: middle; }
.team.no-pick span { display: block; }

/* the saved pick on a player's card (picks.js): a state line, the picker behind "Change the pick" */
.pick { margin-top: 14px; }
.pick-state { display: flex; flex-direction: column; gap: 2px; margin: 0 0 10px; padding: 10px 14px; border-radius: 10px;
  background: var(--primary-wash); border: 1.5px solid var(--primary); transition: box-shadow .9s ease-out; }
.pick-state .pick-team { font-weight: 600; color: var(--primary); font-size: 1.02rem; }
.pick-state .pick-team b { font-size: 1.12rem; }
.pick-state .small { color: var(--ink-soft); }
.pick-state.none { background: transparent; border-style: dashed; border-color: var(--line); }
.pick-state.none .pick-team { color: var(--ink-soft); }
.pick-state.just-saved { box-shadow: 0 0 0 4px var(--primary-wash), 0 0 0 6px var(--primary); transition: none; }
details.change > summary { list-style: none; display: inline-block; cursor: pointer; }
details.change > summary::-webkit-details-marker { display: none; }
details.change.plain > summary { display: none; }
details.change[open] > summary { margin-bottom: 10px; }
details.change .remove { margin-top: 10px; }
.pick-error { margin-top: 10px; }
.pick-error[hidden] { display: none; }
.pick.saving .picker { opacity: .6; pointer-events: none; }

/* players' tabs */
.form-head.slim { padding-bottom: 0; border-bottom: 0; margin-bottom: 0; }
.tabs { display: flex; gap: 4px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 4px;
  margin: 14px 0 20px; position: sticky; top: 8px; z-index: 5; box-shadow: var(--shadow); }
.tabs a { flex: 1; text-align: center; padding: 9px 4px; border-radius: 9px; font-weight: 600; font-size: .88rem;
  color: var(--ink-soft); text-decoration: none; position: relative; }
.tabs a:hover { color: var(--ink); background: var(--primary-wash); }
.tabs a.on { background: var(--primary); color: var(--card); }
.tabs .dot { position: absolute; top: 6px; right: 8px; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.round-tabs { display: flex; gap: 6px; margin: 0 0 14px; overflow-x: auto; padding-bottom: 2px; }
.round-tabs a { padding: 5px 12px; border-radius: 999px; border: 1.5px solid var(--line); font-size: .82rem; font-weight: 600;
  color: var(--ink); text-decoration: none; white-space: nowrap; }
.round-tabs a.on { background: var(--primary-wash); border-color: transparent; color: var(--primary); }
.stat-tiles { display: flex; gap: 10px; margin: 0 0 18px; flex-wrap: wrap; }
.stat-tiles div { flex: 1 1 100px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.stat-tiles strong { display: block; font: 650 1.8rem/1.05 var(--sans); letter-spacing: -.02em; }
.stat-tiles strong.small-strong { font-size: 1.3rem; }
.stat-tiles span { font-size: .76rem; color: var(--ink-soft); }
.tab-h2 { font-size: 1rem; margin: 22px 0 10px; }
.counts li.lost .c-bar i { background: var(--error); }
.counts li.lost .c-team { color: var(--error); }
.player-list { list-style: none; padding: 0; margin: 0; }
.player-list li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.pl-name { font-weight: 600; }
.pl-picks { display: flex; flex-wrap: wrap; gap: 4px; }
.pl-picks span { font-size: .78rem; padding: 2px 8px; border-radius: 999px; background: var(--primary-wash); color: var(--primary); font-weight: 600; }
.rules { padding-left: 20px; margin: 0 0 24px; }
.rules li { margin-bottom: 12px; color: var(--ink-soft); }
.rules strong { color: var(--ink); }
.colours { display: flex; flex-wrap: wrap; gap: 14px 22px; align-items: center; }
.colours-title { width: 100%; font-weight: 500; }
.colours label:not(.toggle) { display: flex; align-items: center; gap: 8px; }
.colours input[type=color] { width: 46px; height: 34px; padding: 2px; margin: 0; cursor: pointer; }
.rename { margin: -4px 0 10px; }
.rename summary { display: inline; cursor: pointer; color: var(--primary); font-size: .88rem; }
.rename[open] { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.rename[open] summary { width: 100%; }
.rename input { flex: 1 1 180px; margin: 0; }
.edit-more summary { cursor: pointer; color: var(--primary); font-size: .85rem; }
.edit-more[open] { margin-bottom: 8px; }
.pay-edit { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: end; margin-top: 6px; }
.pay-edit label { display: flex; flex-direction: column; font-size: .8rem; gap: 2px; margin: 0; }
.pay-edit input { margin: 0; padding: 6px 8px; min-width: 0; width: 11em; }
.pay-edit input[type=number] { width: 6em; }
/* admin analytics */
.analytics .tab-h2 { margin-top: 26px; }
.two-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 0 32px; }
.splits { list-style: none; padding: 0; margin: 8px 0; display: grid; gap: 12px; }
.splits li { display: grid; grid-template-columns: minmax(0, 1fr) minmax(90px, 2fr) minmax(0, 1fr); gap: 4px 12px; align-items: center; }
.s-home { text-align: right; } .s-away { text-align: left; }
.s-home, .s-away { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: .92rem; }
.s-home b, .s-away b { font-variant-numeric: tabular-nums; }
.s-lead { font-weight: 600; color: var(--primary); }
.s-bar { display: flex; height: 12px; border-radius: 6px; background: var(--primary-wash); overflow: hidden; }
.s-bar .s-h { background: var(--primary); } .s-bar .s-a { background: var(--accent); margin-left: auto; }
.s-meta { grid-column: 1 / -1; text-align: center; }
.live-score { color: var(--error); }  /* a live score, not a result yet */
.live-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: currentColor; margin-right: 5px;
  vertical-align: 1px; animation: live-pulse 1.6s ease-in-out infinite; }
@keyframes live-pulse { 50% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) { .live-dot { animation: none; } }
.feed { list-style: none; padding: 0; margin: 0; }
.feed li { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: .9rem; }
.counts.lost-all .c-bar i { background: var(--error); }
.counts.results li { grid-template-columns: 120px 1fr 36px; }
.counts.results .r-words { grid-column: 1 / -1; margin-top: -4px; }
.counts.results li.r-loss .c-bar i, .counts.results li.r-draw .c-bar i { background: var(--error); }
.counts.results li.r-loss .c-team, .counts.results li.r-draw .c-team { color: var(--error); }
.counts.results li.r-pending .c-bar i { background: var(--line); }
@media (max-width: 520px) {
  .splits li { grid-template-columns: 1fr 1fr; }
  .splits .s-bar { grid-column: 1 / -1; grid-row: 2; }
  .s-home { text-align: left; } .s-away { text-align: right; }
}
.who { border-bottom: 1px solid var(--line); padding: 8px 0; }
.who summary { cursor: pointer; display: flex; gap: 10px; }
.who-list { list-style: none; padding: 6px 0 2px 14px; margin: 0; columns: 2 220px; font-size: .9rem; }
.who-list li { padding: 2px 0; break-inside: avoid; }
/* picks pie: the dataviz reference palette, validated on --card (light) and the dark card */
.pie-wrap { --pie-1: #2a78d6; --pie-2: #eb6834; --pie-3: #1baf7a; --pie-4: #eda100; --pie-5: #e87ba4;
  --pie-6: #008300; --pie-7: #4a3aa7; --pie-0: #a3a39b;
  display: flex; flex-wrap: wrap; gap: 18px 36px; align-items: center; margin: 12px 0 6px; }
@media (prefers-color-scheme: dark) {
  .pie-wrap { --pie-1: #3987e5; --pie-2: #d95926; --pie-3: #199e70; --pie-4: #c98500; --pie-5: #d55181;
    --pie-6: #008300; --pie-7: #9085e9; --pie-0: #6b726e; }
}
.pie { width: min(240px, 70vw); height: auto; flex: none; }
.pie path { stroke: var(--paper); stroke-width: 2; stroke-linejoin: round; }
.pie path:hover { opacity: .82; }
.pie-total { text-anchor: middle; font: 650 30px var(--sans); letter-spacing: -.02em; fill: var(--ink); }
.pie-sub { text-anchor: middle; font: 500 11px var(--sans); fill: var(--ink-soft); }
.slot-0 { fill: var(--pie-0); background: var(--pie-0); } .slot-1 { fill: var(--pie-1); background: var(--pie-1); }
.slot-2 { fill: var(--pie-2); background: var(--pie-2); } .slot-3 { fill: var(--pie-3); background: var(--pie-3); }
.slot-4 { fill: var(--pie-4); background: var(--pie-4); } .slot-5 { fill: var(--pie-5); background: var(--pie-5); }
.slot-6 { fill: var(--pie-6); background: var(--pie-6); } .slot-7 { fill: var(--pie-7); background: var(--pie-7); }
.pie-legend { border-collapse: collapse; font-size: .92rem; flex: 1 1 260px; max-width: 460px; }
.pie-legend td { padding: 5px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.pie-legend .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.swatch { display: inline-block; width: 11px; height: 11px; border-radius: 3px; margin-right: 8px; vertical-align: -1px; }
.buyback-note { font-size: .9rem; margin: 6px 0 8px; }
.buyback-due { background: var(--error-wash); border-radius: 10px; padding: 10px 14px; margin: 4px 0 12px; }
.buyback-due p { margin: 0 0 6px; }
.buyback-due .pay-line { margin: 4px 0 8px; }
.banner .pay-line { margin: 14px 0 4px; }
.buyback-due .btn { color: var(--on-primary); }
.entry.out.can-buy-back { opacity: 1; }  /* the buy-back button mustn't look disabled */
.entry.out.can-buy-back .meta { color: var(--ink-soft); }
.late-entry summary { cursor: pointer; font-weight: 600; }
.late-entry[open] summary { margin-bottom: 8px; }
/* groups */
.group-list { list-style: none; padding: 0; margin: 0 0 8px; }
.group-list li { padding: 10px 0; border-bottom: 1px solid var(--line); font-weight: 600; }
.join-form input { flex: 1 1 180px; }
.group-new, .group-add { display: grid; gap: 10px; margin: 8px 0 16px; }
.group-new fieldset { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px 16px; }
.group-new legend { font-weight: 500; margin-bottom: 4px; }
.group-table tr.is-out td { color: var(--ink-soft); }
.pie-group { margin: 0 0 12px; }
.pie-group select { margin-left: 6px; width: auto; display: inline-block; }
.organiser-add summary { cursor: pointer; }
.organiser-add form { display: grid; gap: 10px; margin-top: 10px; }
.entry-picker { max-height: 320px; overflow-y: auto; border: 1px solid var(--line); border-radius: 8px; padding: 4px 10px; }
.entry-picker label { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.entry-picker label:last-child { border-bottom: 0; }
.entry-picker label[hidden] { display: none; }
.entry-picker .muted.small { margin: 0; }

/* finding a row in a long list (ui.js) */
.filter-line { display: flex; align-items: center; gap: 12px; margin: 0 0 10px; }
.filter-line input { margin: 0; flex: 1 1 auto; max-width: 420px; }
.filter-line .muted { white-space: nowrap; }
[data-search][hidden] { display: none !important; }
.add-ticked:disabled { opacity: .5; cursor: default; }

/* phones */
input, select, textarea { max-width: 100%; }
input[type=file] { min-width: 0; }
.upload input[type=file] { flex: 1 1 100%; }
@media (max-width: 640px) {
  .topbar { flex-wrap: wrap; gap: 10px 16px; padding-top: 14px; padding-bottom: 10px; }
  .topbar nav { gap: 6px 16px; flex-wrap: wrap; font-size: .92rem; }
  .topbar nav a, .topbar nav .linkish { white-space: nowrap; padding: 6px 0; }
  .wordmark { font-size: 2.2rem; }
  body:not(.site) .wordmark { font-size: 1.7rem; }
  .tabs a { font-size: .8rem; padding: 10px 2px; white-space: nowrap; }
  .tabs .dot { top: 4px; right: 4px; }
  .page-head h1 { font-size: 1.9rem; }
  .title-line { gap: 8px 14px; }
  .title-line a { padding: 4px 0; }
  .stats { gap: 8px; }
  .card { padding: 14px 14px; }
  .section-link { display: block; margin: 6px 0 0; }
  .filters a { padding: 7px 12px; }
  .edit-more summary { padding: 6px 0; }
  .linkish.small { padding: 6px 0; }

  /* A table marked .stack becomes one card per row: each cell on its own line, labelled from data-label. */
  .stack-wrap { overflow: visible; border: 0; background: none; }
  .stack, .stack tbody, .stack tr, .stack td { display: block; width: 100%; max-width: none; }
  .stack thead { display: none; }
  .stack tr { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; margin: 0 0 10px; }
  .stack tr:last-child td { border-bottom: 0; }
  .stack td { border: 0; padding: 3px 0; white-space: normal; }
  .stack td[data-label] { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; }
  .stack td[data-label]::before { content: attr(data-label); flex: 0 0 5.4rem; font-size: .72rem; font-weight: 600;
    text-transform: uppercase; letter-spacing: .05em; color: var(--ink-soft); }
  .stack td[data-label] > form { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
  .stack td[data-label] > details[open] { flex: 1 1 100%; padding-left: calc(5.4rem + 12px); }
  .entries-table.stack td[data-label="Status"] > form { flex: 1 1 100%; padding-left: calc(5.4rem + 12px); }  /* Buy back */
  .stack td[data-label] > details[open] .inline-edit { margin-top: 4px; }
  .stack .stack-title { padding-bottom: 6px; font-weight: 600; }
  .stack .stack-actions { display: flex; flex-wrap: wrap; gap: 0 18px; align-items: baseline; border-top: 1px solid var(--line);
    margin-top: 8px; padding-top: 4px; }
  .stack .stack-actions:empty, .stack .stack-actions:not(:has(*)) { display: none; }
  .stack .stack-actions details { flex-basis: auto; }
  .stack .stack-actions details[open] { flex-basis: 100%; }
  .stack .inline-edit { flex-wrap: wrap; }
  .stack .inline-edit input, .stack .inline-edit select { flex: 1 1 160px; min-width: 0; }
  .entries-table.stack tr.row-is-out { background: color-mix(in srgb, var(--card) 60%, var(--paper)); }
  .stack .pay-edit input, .stack .pay-edit input[type=number] { width: 100%; }
  .stack .pay-edit label { flex: 1 1 140px; }
  .stack tr.state-warn td.state, .stack tr.state-ok td.state { font-weight: 600; }
  /* a group's members: each round's pick as a short "R1 Arsenal" line, side by side */
  /* a group's members: "Name · In · Remove" on one line, then "R1 Arsenal  R2 Leeds" */
  .group-table.stack tr { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 14px; padding: 9px 14px; margin-bottom: 8px; }
  .group-table.stack td { width: auto; padding: 0; }
  .group-table.stack .stack-title { order: 1; flex: 1 1 auto; padding: 0; }
  .group-table.stack td[data-label="Status"] { order: 2; font-size: .88rem; color: var(--primary); font-weight: 600; }
  .group-table.stack tr.is-out td[data-label="Status"] { color: var(--ink-soft); font-weight: 400; }
  .group-table.stack td[data-label="Status"]::before { display: none; }
  .group-table.stack .stack-actions { order: 3; border: 0; margin: 0; padding: 0; }
  .group-table.stack tr::after { content: ""; order: 4; flex-basis: 100%; }
  .group-table.stack td.pick { order: 5; display: inline-flex; gap: 5px; font-size: .9rem; }
  .group-table.stack td.pick::before { flex: none; }
  .group-table.stack tr.is-out { background: color-mix(in srgb, var(--card) 60%, var(--paper)); }
  /* once ui.js has shown the Share button, it sends the link; the code is short enough to say */
  .share-group:has(button[data-share]:not([hidden])) .share-url { display: none; }

  /* the organiser's entry picker: room to tap */
  .entry-picker { max-height: 55vh; padding: 0 12px; }
  .entry-picker label { padding: 11px 0; }
  .entry-picker input[type=checkbox] { width: 20px; height: 20px; }
  .organiser-add .btn { width: 100%; }
  .filter-line input { max-width: none; }
}

/* buy-backs on the payments page */
.buyback-list { display: grid; gap: 10px; margin: 0 0 24px; }
.buyback-list .entry-picker { list-style: none; margin: 0; max-height: none; }
.buyback-list li { border-bottom: 1px solid var(--line); }
.buyback-list li:last-child { border-bottom: 0; }
.buyback-list li label { border: 0; }
.buyback-list .bb-state { margin-left: auto; font-weight: 600; font-size: .85rem; }
.buyback-list .bb-unpaid .bb-state { color: var(--accent); }
.buyback-list .bb-paid-list .bb-state, .buyback-list .bb-paid-by-hand .bb-state { color: var(--primary); }
.buyback-list .bb-not-paid-in-time { color: var(--ink-soft); }
.buyback-list .bb-not-paid-in-time .bb-state { color: var(--ink-soft); font-weight: 400; }

/* Gameday: a confirmed round's out and through lists, with WhatsApp buy-back invites. */
.subsection { font-size: 1.05rem; margin: 22px 0 10px; }
.through-list > summary { cursor: pointer; }
.through-list > summary .subsection { display: inline; }
.wa-form { display: inline-block; margin: 0 8px 0 0; }
.round-list td { vertical-align: middle; }
.round-list .pill { margin-right: 8px; }

/* forms: pages, ratings, scales (form.js) */
.progress { margin: 18px 0 4px; }
.progress-bar { height: 6px; border-radius: 3px; background: var(--primary-wash); overflow: hidden; }
.progress-bar span { display: block; height: 100%; width: 0; background: var(--primary); transition: width .25s ease; }
.progress-text { margin: 6px 0 0; }
.page-head-q { padding: 22px 0 4px; }
.page-head-q h2 { font: 650 1.6rem/1.2 var(--sans); letter-spacing: -.02em; margin: 0 0 4px; }
.page-head-q p { color: var(--ink-soft); margin: 0; white-space: pre-line; }
.rating { display: flex; gap: 2px; margin-top: 10px; }
.star { cursor: pointer; font-size: 2rem; line-height: 1; color: var(--line); padding: 2px; }
.star input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.star.lit, .star:has(~ .star input:checked), .star:has(input:checked) { color: var(--accent); }
.rating:hover .star:not(.lit) { color: var(--line); }
.star:has(input:focus-visible) { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 6px; }
.scale { display: grid; grid-template-columns: repeat(var(--steps), minmax(0, 1fr)); gap: 6px; margin-top: 10px; }
.step { cursor: pointer; }
.step input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.step span {
  display: block; text-align: center; padding: 11px 0; border: 1.5px solid var(--line); border-radius: 9px;
  background: var(--card); font-weight: 600; font-variant-numeric: tabular-nums;
}
.step:hover span { border-color: var(--primary); }
.step:has(input:checked) span { background: var(--primary); border-color: var(--primary); color: var(--card); }
.step:has(input:focus-visible) span { outline: 2px solid var(--primary); outline-offset: 2px; }
.scale-ends { display: flex; justify-content: space-between; gap: 12px; margin-top: 6px; font-size: .85rem; color: var(--ink-soft); }
@media (max-width: 480px) { .scale { gap: 3px; } .step span { padding: 9px 0; font-size: .85rem; } .scale.nps .step span { padding: 9px 0; font-size: .78rem; border-radius: 6px; } }

/* a picture choice: options as cards with the picture above the text */
.opts-pics { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; margin-top: 10px; }
.option.pic, .tidy .option.pic { flex-direction: column; align-items: stretch; gap: 8px; margin-top: 0; padding: 8px 8px 9px; }
.option.pic .pic-img { display: block; aspect-ratio: 4 / 3; border-radius: 7px; overflow: hidden; background: var(--paper); }
.option.pic .pic-img img { display: block; width: 100%; height: 100%; object-fit: cover; }
.option.pic .pic-row { display: flex; align-items: center; gap: 10px; padding: 0 4px; min-width: 0; }
.option.pic .pic-row > span:last-child { overflow-wrap: break-word; min-width: 0; }
@media (max-width: 480px) { .opts-pics { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; } }

/* a picture block between the questions */
.block-image { margin: 0 0 34px; }
.block-image img { display: block; max-width: 100%; max-height: 560px; border-radius: 12px; }
.block-image figcaption { margin-top: 8px; color: var(--ink-soft); font-size: .92rem; }
.nps-score { margin: 8px 0 4px; display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; }
.nps-score strong { font-size: 1.3rem; color: var(--primary); }

/* builder: per-type settings, conditions, dragging */
.f-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 480px) { .f-row { grid-template-columns: 1fr; } }
.f-hint { margin: 6px 0 0; }
.f-id { margin: 10px 0 0; }
.f-id code { user-select: all; }
.f-logic { margin-top: 14px; border-top: 1px dashed var(--line); padding-top: 10px; }
.f-logic summary { cursor: pointer; font-weight: 600; font-size: .9rem; }
.logic-row { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr); gap: 8px; margin-top: 10px; }
@media (max-width: 560px) { .logic-row { grid-template-columns: 1fr; } }
.logic-row input[hidden] { display: none; }
.drag { cursor: grab; color: var(--ink-soft); font-size: 1.1rem; padding: 0 8px 0 0; user-select: none; touch-action: none; }
.field-head .field-type { flex: 1; }
.field.dragging { opacity: .45; }
.field.drop-before { box-shadow: 0 -3px 0 var(--primary); }
.field.drop-after { box-shadow: 0 3px 0 var(--primary); }
.field[data-type="page_break"] { border-left-color: var(--ink-soft); border-left-style: dashed; }
.field[data-type="hidden"] { border-left-color: var(--line); }
.settings h2 { font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-soft); margin: 18px 0 0; }
.settings h2:first-child { margin-top: 0; }
.ico-rating::after, .ico-scale::after, .ico-url::after, .ico-time::after, .ico-page_break::after, .ico-hidden::after {
  inset: 0; border: 0; display: grid; place-items: center; font-size: 11px; line-height: 1; color: var(--primary);
}
.ico-rating::after { content: "★"; }
.ico-scale::after { content: "1–5"; font-size: 7px; font-weight: 700; }
.ico-url::after { content: "↗"; }
.ico-time::after { content: "◷"; }
.ico-page_break::after { content: "⤓"; }
.ico-hidden::after { content: "?="; font-size: 8px; font-weight: 700; }

/* responses summary */
.summary-list { display: grid; gap: 14px; }
.q-summary h2 { font-size: 1.02rem; margin: 0; }
.q-summary .counts li { grid-template-columns: minmax(0, 160px) 1fr auto; }
.q-summary .counts li.top .c-team { color: var(--primary); }
.latest { margin: 10px 0 0; padding-left: 18px; }
.latest li + li { margin-top: 4px; }

/* working with responses: downloads, filters, star / done, one response's page */
.downloads { position: relative; }
.downloads summary { list-style: none; cursor: pointer; }
.downloads summary::-webkit-details-marker { display: none; }
.downloads summary::after { content: " ▾"; font-size: .8em; }
.downloads-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 10; min-width: 230px; background: var(--card);
  border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 6px; display: grid; }
.downloads-menu a { padding: 8px 10px; border-radius: 8px; color: var(--ink); text-decoration: none; font-size: .92rem; }
.downloads-menu a:hover { background: var(--primary-wash); }
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 14px; font-size: .9rem; }
.filters label { display: flex; align-items: center; gap: 6px; margin: 0; }
.filters input, .filters select { width: auto; padding: 7px 10px; font-size: .9rem; max-width: 220px; }
.filters .f-search { flex: 1 1 220px; }
.filters .f-search input { width: 100%; max-width: none; }
.filters form, .responses form { margin: 0; }
.star, .done-btn { background: none; border: 0; cursor: pointer; font-size: 1.15rem; line-height: 1; padding: 4px; color: var(--ink-soft); }
.star.on { color: var(--accent); }
.done-btn { width: 28px; height: 28px; border-radius: 50%; border: 1.5px solid var(--line); font-size: .9rem; }
.done-btn.on { background: var(--primary); border-color: var(--primary); color: var(--card); }
tr.is-done td { color: var(--ink-soft); }
.responses .when a { color: inherit; text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
.responses .when a:hover { color: var(--primary); }
.note-flag { display: inline-block; margin-left: 6px; font-size: .7rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: .06em; color: var(--accent); }
.dropoff h2 { font-size: 1.02rem; margin: 18px 0 0; }
.dropoff .counts li { grid-template-columns: minmax(0, 220px) 1fr auto; }
.dropoff .counts + p { margin-top: 16px; }
.resp-nav { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.resp-head { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: flex-start; margin-bottom: 14px; }
.resp-head h1 { margin: 0 0 4px; }
.resp-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.resp-actions form { margin: 0; }
.response-page .card { margin-bottom: 14px; }
.resp-q { padding: 12px 0; border-bottom: 1px solid var(--line); }
.resp-q:last-child { border-bottom: 0; }
.resp-q p { margin: 0; overflow-wrap: anywhere; }
.resp-label { font-size: .82rem; font-weight: 600; color: var(--ink-soft); margin-bottom: 4px !important; }
.resp-long { white-space: pre-line; }
.resp-items { margin: 0; padding-left: 20px; }
.resp-items li + li { margin-top: 10px; }
.resp-items dl { display: grid; grid-template-columns: minmax(0, 160px) 1fr; gap: 2px 12px; margin: 4px 0 0; font-size: .92rem; }
.resp-items dt { color: var(--ink-soft); }
.resp-items dd { margin: 0; }
.resp-edit .resp-q input, .resp-edit .resp-q select, .resp-edit .resp-q textarea { max-width: 520px; }
.edit-checks { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.edit-checks label { display: flex; gap: 6px; align-items: center; margin: 0; font-weight: 400; }
.edit-checks input { width: auto; }
.edit-address { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px 12px; }
.edit-address label { font-size: .85rem; margin: 0; }
.resp-edit-actions { display: flex; gap: 10px; margin-top: 16px; }
.resp-note label { display: block; margin-bottom: 6px; }
.resp-note textarea { margin-bottom: 8px; }
.resp-history h2 { font-size: 1.02rem; margin: 0 0 8px; }
.resp-history ul { margin: 0; padding-left: 18px; font-size: .92rem; }
.resp-history li + li { margin-top: 4px; }
.done-tag { color: var(--primary); }
.resp-delete { margin-top: 8px; }
@media print {
  .no-print, .topbar, footer, .resp-note button { display: none !important; }
  .response-page .card { box-shadow: none; border: 0; padding: 0; background: none; }
  .resp-note textarea { border: 0; padding: 0; resize: none; }
  .resp-note textarea:placeholder-shown { display: none; }
  body { background: #fff; color: #000; }
}
.submit-row [hidden], .submit-row[hidden] { display: none; }
.progress { margin-bottom: 14px; }
.page-head-q { padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.add-jump { display: none; font-weight: 600; white-space: nowrap; }
@media (max-width: 860px) {
  .builder { padding-bottom: 84px; }
  .savebar { position: fixed; left: 8px; right: 8px; bottom: 8px; z-index: 20; box-shadow: var(--shadow); }
  .add-jump { display: inline; }
}

/* forms phase 2: grid, ranking, files, signatures, calculations, answers in questions, embedding */
.pipe:empty::before { content: "…"; color: var(--ink-soft); }
.payment .pay-box { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 14px 16px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--primary-wash, rgba(0, 0, 0, .03)); }
.payment .pay-label { font-weight: 600; }
.payment .pay-amount { font: 650 1.6rem/1 var(--sans); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.payment .pay-note { margin-top: 8px; }
.paid-note { font-weight: 600; }
.calc { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.calc-label { font-weight: 600; }
.calc output { font: 650 1.6rem/1 var(--sans); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.matrix, .matrix-summary { width: 100%; border-collapse: collapse; margin-top: 10px; }
.matrix th, .matrix td, .matrix-summary th, .matrix-summary td { padding: 8px 6px; text-align: center; border-bottom: 1px solid var(--line); }
.matrix thead th, .matrix-summary thead th { font-size: .85rem; font-weight: 600; color: var(--ink-soft); }
.matrix tbody th, .matrix-summary tbody th { text-align: left; font-weight: 500; }
.matrix label { display: block; padding: 6px; cursor: pointer; margin: 0; }
.matrix input { width: 20px; height: 20px; accent-color: var(--primary); }
.ranking { list-style: none; counter-reset: rank; padding: 0; margin: 10px 0 0; display: grid; gap: 6px; }
.ranking li {
  counter-increment: rank; display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 12px;
  border: 1.5px solid var(--line); border-radius: 9px; background: var(--card);
}
.ranking li::before { content: counter(rank); font-weight: 700; color: var(--primary); min-width: 1.2em; }
.ranking .rank-text { flex: 1; cursor: grab; user-select: none; touch-action: none; }
.ranking .rank-handle { cursor: grab; color: var(--ink-soft); touch-action: none; user-select: none; }
.ranking li.dragging { border-color: var(--primary); background: var(--primary-wash); }
.rank-keep { margin-top: 8px; }
.file-input { display: block; margin-top: 10px; font: inherit; max-width: 100%; }
.sign-pad {
  position: relative; height: 170px; margin-top: 10px; border: 1.5px dashed var(--line); border-radius: 9px;
  background: #fffdf8; touch-action: none;
}
.q.has-error .sign-pad { border-color: var(--error); }
.sign-pad canvas { position: absolute; inset: 0; width: 100%; height: 100%; cursor: crosshair; }
.sign-hint { position: absolute; left: 16px; bottom: 14px; color: #8a948e; font-size: .9rem; pointer-events: none; }
.sign-pad.inked .sign-hint { display: none; }
.restored { margin-top: 16px; }
body.embed { background: transparent; }
body.embed .form-wrap { padding-top: 0; }
body.embed .done { padding-top: 32px; }

/* builder and list, phase 2 */
.f-pipe { margin-top: 10px; }
.f-pipe select { font-size: .85rem; }
.f-formula input { font-family: ui-monospace, monospace; }
.theme-colours input[type="color"] { width: 100%; height: 40px; padding: 2px; }
.webhook-log { list-style: none; padding: 0; margin: 6px 0 0; }
.webhook-log li { padding: 2px 0; }
.webhook-log li.bad { color: var(--error); }
.embed-modes { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 4px 0 8px; }
.embed-modes label { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; }
.embed-opts { margin: 8px 0 10px; }
.embed-opts input[type="color"] { width: 100%; height: 40px; padding: 2px; }
.embed-code {
  white-space: pre-wrap; word-break: break-all; font-size: .76rem; background: var(--paper); border: 1px solid var(--line);
  border-radius: 8px; padding: 10px; margin: 6px 0 4px;
}
.templates { margin: 0 0 22px; }
.templates summary { cursor: pointer; font-weight: 600; }
.template-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; margin-top: 12px; }
.template-grid form { margin: 0; }
.template-btn {
  width: 100%; height: 100%; text-align: left; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--card); color: var(--ink); font: inherit; cursor: pointer;
}
.template-btn:hover { border-color: var(--primary); background: var(--primary-wash); }
.template-btn strong { display: block; }
.template-btn span { font-size: .85rem; color: var(--ink-soft); }
.ico-ranking::after, .ico-matrix::after, .ico-file::after, .ico-signature::after, .ico-calculation::after {
  inset: 0; border: 0; display: grid; place-items: center; font-size: 10px; line-height: 1; color: var(--primary); font-weight: 700;
}
.ico-ranking::after { content: "1·2"; font-size: 7px; }
.ico-matrix::after { content: "▦"; font-size: 12px; }
.ico-file::after { content: "⇪"; font-size: 12px; }
.ico-signature::after { content: "✍"; font-size: 11px; }
.ico-calculation::after { content: "="; font-size: 12px; }
.f-pipe[hidden], .f-preview[hidden] { display: none; }
.nowrap { white-space: nowrap; }

/* ---- the tidied public form (2026-10-14): no site header, a cover band in the form's colours, no
   lines between questions, letter keys, a file drop zone, and a small "Made with formsage" badge ---- */
body.tidy { background: var(--paper); }
.f-cover {
  height: 190px;
  background:
    radial-gradient(circle at 16% 125%, rgba(255,255,255,.14) 0 130px, transparent 131px),
    radial-gradient(circle at 86% -35%, rgba(255,255,255,.10) 0 210px, transparent 211px),
    linear-gradient(135deg, var(--primary), var(--primary-deep));
}
.f-progress { position: fixed; top: 0; left: 0; right: 0; height: 4px; background: var(--primary-wash); z-index: 10; }
.f-progress i { display: block; height: 100%; width: 0; background: var(--primary); transition: width .3s ease; }
.tidy .form-wrap { max-width: 680px; padding: 0 24px 110px; }
.tidy .form-head { border: 0; padding: 40px 0 6px; margin: 0 0 26px; }
.tidy .form-head h1 { font-size: clamp(1.9rem, 4.4vw, 2.5rem); line-height: 1.1; }
.tidy .form-desc { margin: 10px 0 0; }
.f-meta { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 12px 0 0; color: var(--ink-soft); font-size: .88rem; }
.tidy .banner, .tidy .error-summary { margin: 0 0 22px; }
.tidy .answers .q, .tidy fieldset.q { border: 0; padding: 0; margin: 0 0 34px; }
.tidy .answers legend, .tidy .answers .q > label:not(.option) { font-size: 1.06rem; margin-bottom: 2px; }
.tidy .answers .help { margin: 2px 0 10px; }
.tidy .answers input:not([type=radio]):not([type=checkbox]):not([type=file]), .tidy .answers select, .tidy .answers textarea {
  border: 1.5px solid var(--line); border-radius: 10px; padding: 13px 15px; background: var(--card); margin-top: 8px;
}
.tidy .answers input:focus, .tidy .answers select:focus, .tidy .answers textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-wash); }
.tidy .option { margin-top: 8px; padding: 11px 14px; border-radius: 10px; }
.tidy .option input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.tidy .option .key {
  width: 24px; height: 24px; flex: none; border-radius: 6px; border: 1.5px solid var(--line); display: grid; place-items: center;
  font: 650 .74rem/1 var(--sans); color: var(--ink-soft); background: var(--card);
}
.tidy .option:has(input[type=checkbox]) .key { border-radius: 5px; }
.tidy .option:has(input:checked) .key { background: var(--primary); border-color: var(--primary); color: var(--card); }
.tidy .option:has(input:focus-visible) { outline: 2px solid var(--primary); outline-offset: 2px; }
.tidy .option:hover { border-color: var(--primary); }
.tidy .page-head-q { border: 0; padding: 4px 0 2px; margin-bottom: 22px; }
.tidy .page-head-q h2 { font-size: 1.5rem; }
.tidy .q.has-error .option, .tidy .q.has-error .drop { border-color: var(--error); }
.drop {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; margin-top: 8px; padding: 26px 18px;
  border: 1.5px dashed var(--line); border-radius: 12px; background: var(--card); text-align: center; color: var(--ink-soft);
}
.drop strong { color: var(--primary); }
.drop-ico { width: 40px; height: 40px; border-radius: 50%; background: var(--primary-wash); color: var(--primary); display: grid; place-items: center; font-size: 1.1rem; }
.drop .file-input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; margin: 0; }
.drop.over { border-color: var(--primary); background: var(--primary-wash); }
.drop:focus-within { outline: 2px solid var(--primary); outline-offset: 2px; }
.drop.has-file { padding: 14px 18px; }
.drop.has-file .drop-ico { display: none; }
.file-chip {
  display: flex; align-items: center; gap: 12px; margin-top: 8px; padding: 10px 12px; border: 1.5px solid var(--line);
  border-radius: 10px; background: var(--card);
}
.file-ext { min-width: 38px; height: 40px; padding: 0 4px; border-radius: 7px; background: var(--primary-wash); color: var(--primary); display: grid; place-items: center; font: 700 .62rem/1 var(--sans); }
.file-name { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; flex: 1; }
.file-clear { border: 0; background: none; color: var(--ink-soft); cursor: pointer; padding: 6px 8px; border-radius: 6px; }
.file-clear:hover { background: var(--error-wash); color: var(--error); }
.tidy .submit-row { padding-top: 6px; gap: 14px; }
.tidy .submit-row .btn { padding: 14px 28px; font-size: 1rem; }
.enter-hint { color: var(--ink-soft); font-size: .85rem; }
.enter-hint kbd { font: 600 .74rem/1 var(--sans); border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px; padding: 2px 6px; background: var(--card); color: var(--ink); }
@media (hover: none) { .enter-hint { display: none; } }
/* The "Made with Papias" badge on Free forms: Tadhg's pill (static/brand/made-with-light|dark.svg, 2026-11-05, drawn to
   the size of the CSS one it replaces, light and dark), linked with ref=footer so footer sign-ups are counted. */
.made-with {
  position: fixed; right: 18px; bottom: 18px; display: block; line-height: 0; border-radius: 999px;
  box-shadow: var(--shadow); text-decoration: none; z-index: 5; transition: transform .15s ease, box-shadow .15s ease;
}
.made-with img { display: block; width: 154px; height: 32px; }
.made-with:hover, .made-with:focus-visible { transform: translateY(-1px); box-shadow: 0 0 0 2px var(--primary), var(--shadow); }
@media (prefers-reduced-motion: reduce) { .made-with { transition: none; } .made-with:hover { transform: none; } }
.tidy .done { padding-top: 56px; }
.tidy .done h1 { font-size: clamp(1.8rem, 4vw, 2.3rem); }
@media (max-width: 640px) {
  .f-cover { height: 130px; }
  .tidy .form-wrap { padding: 0 18px 40px; }
  .tidy .form-head { padding-top: 28px; }
  .made-with { position: static; width: max-content; margin: 8px auto 28px; }
}
.file-chip[hidden], .f-progress[hidden] { display: none; }

/* phone numbers: a country-code picker in front of the number */
.phone-input { display: flex; gap: 8px; margin-top: 8px; }
.phone-input select.cc { flex: 0 0 auto; width: 6.6em; margin-top: 0 !important; padding-right: 6px; text-overflow: ellipsis; }
.phone-input input { flex: 1 1 auto; min-width: 0; margin-top: 0 !important; }

/* a form's own cover image and logo (Settings → Design) */
.f-cover.has-image { background-size: cover; background-position: center; background-repeat: no-repeat; }
.f-logo {
  display: block; width: 88px; height: 88px; object-fit: contain; margin: -44px 0 0; padding: 8px; border-radius: 22px;
  background: #fff; box-shadow: 0 6px 20px rgba(0, 0, 0, .14); position: relative;
}
.tidy .f-logo + .form-head { padding-top: 18px; }
.done .f-logo { margin-left: auto; margin-right: auto; }
@media (max-width: 640px) { .f-logo { width: 72px; height: 72px; margin-top: -36px; border-radius: 18px; } }

/* full-page backgrounds (Settings → Design → Background, 2026-10-25): the page in a soft tint, the main colour or
   the cover picture, and the form on a card. The band at the top goes: the page itself carries the colour, and a
   cover picture becomes the top of the card (.card-cover) unless it is the page. Never when embedded. */
body.tidy.bg { min-height: 100vh; }
body.tidy.bg-tint { background: var(--primary-wash); }
body.tidy.bg-colour { background: linear-gradient(135deg, var(--primary), var(--primary-deep)) fixed; }
body.tidy.bg-image { background: linear-gradient(rgba(20, 16, 14, .38), rgba(20, 16, 14, .38)), var(--f-bg, none) center / cover no-repeat fixed; }
.tidy.bg .form-wrap {
  max-width: 740px; margin: 44px auto 90px; padding: 0 44px 40px; background: var(--card); border-radius: 18px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, .16); overflow: hidden;
}
.tidy.bg .form-wrap .card-cover { height: 160px; margin: 0 -44px; }
.tidy.bg .form-head { padding-top: 34px; }
.tidy.bg .f-logo { margin-top: 28px; }
.tidy.bg .card-cover + .f-logo { margin-top: -44px; }
.tidy.bg .f-logo + .form-head { padding-top: 18px; }
.tidy.bg .done { padding-top: 44px; }
@media (max-width: 640px) {
  .tidy.bg .form-wrap { margin: 14px auto 10px; padding: 0 18px 30px; border-radius: 14px; }
  .tidy.bg .form-wrap .card-cover { margin: 0 -18px; height: 120px; }
  .tidy.bg .f-logo { margin-top: 22px; }
  .tidy.bg .card-cover + .f-logo { margin-top: -36px; }
  .tidy.bg .form-head { padding-top: 26px; }
  .tidy.bg-colour .made-with, .tidy.bg-image .made-with { margin-bottom: 20px; }
}

/* address, amount and consent questions */
.address .addr-line, .address .addr-row label { display: block; font-weight: 500; font-size: .9rem; color: var(--ink-soft); margin-top: 10px; }
.address .addr-line input, .address .addr-row input, .address .addr-row select { margin-top: 4px !important; color: var(--ink); }
.addr-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
@media (max-width: 480px) { .addr-row { grid-template-columns: 1fr; } }
.amount-input { position: relative; margin-top: 8px; }
.amount-input .currency { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); font-weight: 600; color: var(--ink-soft); pointer-events: none; }
.tidy .answers .amount-input input { margin-top: 0; padding-left: 46px; max-width: 260px; }
.consent-box { align-items: flex-start; }
.consent-box .ctick { margin-top: 1px; }
.tidy .consent-box:has(input:checked) .ctick::after { content: "✓"; font-size: .85rem; }
.consent .help { margin: 8px 0 0 50px !important; }

/* one question at a time (the form's Layout setting); form.js adds body.one-q */
.one-q .answers .q:not(.step-on), .one-q .page-head-q { display: none !important; }
.one-q .answers .q.step-on { min-height: 42vh; display: flex; flex-direction: column; justify-content: center; animation: step-in .28s ease; }
.one-q fieldset.q.step-on { display: block; padding-top: 6vh !important; }
.one-q .answers legend, .one-q .answers .q > label:not(.option):not(.addr-line) { font-size: clamp(1.3rem, 3vw, 1.7rem); line-height: 1.25; letter-spacing: -.015em; margin-bottom: 6px; }
.one-q .answers .statement h2 { font-size: clamp(1.6rem, 3.6vw, 2.1rem); }
.one-q .answers .help { font-size: 1rem; }
.one-q .tidy .option, .one-q .option { font-size: 1.05rem; padding: 13px 16px; }
.one-q .submit-row { padding-top: 0; }
@keyframes step-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .one-q .answers .q.step-on { animation: none; } }
.answers .q.address > label.addr-line { font-weight: 500; font-size: .9rem; color: var(--ink-soft); letter-spacing: 0; margin: 10px 0 0; }
.answers .q.address input, .answers .q.address select { font-weight: 400; font-size: 1rem; }

/* repeating groups ("+ Add another attendee") */
.q.group > legend { margin-bottom: 4px; }
.g-items { display: grid; gap: 14px; margin-top: 12px; }
.g-item { border: 1.5px solid var(--line); border-radius: 14px; padding: 6px 18px 4px; background: var(--card); }
.g-head { display: flex; justify-content: space-between; align-items: center; padding: 10px 0 2px; }
.g-title { font-weight: 650; color: var(--primary); }
.g-remove { color: var(--ink-soft); }
.g-remove:hover { color: var(--error); }
.tidy .g-item .q, .tidy .g-item fieldset.q { margin: 14px 0 18px; }
.g-add { margin-top: 12px; }
.g-add[hidden], .g-remove[hidden] { display: none; }
.one-q .answers .q.group.step-host { display: block !important; min-height: 0; animation: none; }
.one-q .g-item:not(.step-on) { display: none; }
.one-q .answers .g-item .q.q:not([hidden]), .one-q .answers .g-item fieldset.q.q:not([hidden]) { display: block !important; min-height: 0 !important; padding-top: 0 !important; animation: none; }
.one-q .g-item .q > label:not(.option):not(.addr-line), .one-q .g-item legend { font-size: 1.06rem !important; }
.one-q .group:not(.on-last) .g-add { display: none; }
.one-q .g-item.step-on { animation: step-in .28s ease; }
.csv-links { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.g-sum { margin: 6px 0 10px; }
.g-children { display: grid; gap: 10px; padding-left: 14px; border-left: 3px solid var(--primary-wash); }
.g-children .q-summary { box-shadow: none; }
.g-cell summary { cursor: pointer; color: var(--primary); font-weight: 600; }
.g-cell ol { margin: 6px 0 0; padding-left: 18px; white-space: normal; min-width: 260px; }

/* A form that sits inside a sentence (a "send it again" button in a line of text). */
form.inline { display: inline; }
.usage { padding-left: 18px; margin: 8px 0; }
.usage li + li { margin-top: 4px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

/* Why Papias, the features list and the privacy band (roadmap, 2026-10-26). */
.why { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px 32px; }
.why li { display: block; }
.why .f-ico { margin-bottom: 12px; }
.why b { display: block; font-size: 1.12rem; margin: 0 0 8px; letter-spacing: -.01em; }
.why p { margin: 0; color: var(--ink-soft); }
@media (max-width: 860px) { .why { grid-template-columns: 1fr; gap: 24px; max-width: 560px; margin: 0 auto; } }
.all-features { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.all-features li { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px 14px; }
.all-features b { display: block; margin-bottom: 4px; }
.all-features p { margin: 0; color: var(--ink-soft); font-size: .92rem; }
.all-features em { display: inline-block; margin-top: 10px; font: 600 .7rem/1.4 var(--sans); letter-spacing: .05em; text-transform: uppercase;
  color: var(--primary-deep); background: var(--primary-wash); padding: 2px 9px; border-radius: 999px; font-style: normal; }
@media (max-width: 900px) { .all-features { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .all-features { grid-template-columns: 1fr; } }
.privacy-band .value { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 32px; }
.privacy-band .value > div { max-width: 640px; }
.privacy-band .value p { color: var(--ink-soft); margin-top: 8px; }

/* version history (2026-10-26) */
.history { list-style: none; padding: 0; margin: 0; }
.history li { padding: 14px 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: 1fr auto; gap: 4px 20px; align-items: center; }
.history li:first-child { border-top: 0; padding-top: 0; }
.history-head { grid-column: 1; }
.history-change { grid-column: 1; margin: 0; color: var(--ink-soft); font-size: .92rem; }
.history form { grid-column: 2; grid-row: 1 / span 2; }
@media (max-width: 600px) { .history li { grid-template-columns: 1fr; } .history form { grid-column: 1; grid-row: auto; } }

/* --- the template library (/templates, 2026-10-27) --- */
.tpl-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.tpl-grid a { display: block; height: 100%; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 18px 18px 16px; color: inherit; text-decoration: none; }
.tpl-grid a:hover { border-color: var(--primary); background: var(--primary-wash); }
.tpl-grid b { display: block; font-size: 1.08rem; margin-bottom: 4px; letter-spacing: -.01em; }
.tpl-grid p { margin: 0 0 8px; color: var(--ink-soft); font-size: .92rem; }
.tpl-grid.compact a { padding: 14px 16px; }
.tpl-grid.compact p { margin: 0; }
.tpl-hero .eyebrow a { color: inherit; text-decoration: none; }
.tpl-hero .eyebrow a:hover { text-decoration: underline; }
.tpl-hero .lede { margin-bottom: 20px; }
.tpl-use { display: inline; margin: 0; }
.tpl-body { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(280px, .75fr); gap: clamp(24px, 4vw, 48px); align-items: start; }
.tpl-preview .win iframe { display: block; width: 100%; height: 720px; border: 0; background: var(--paper); }
.tpl-side h2 { font-size: 1.2rem; margin: 0 0 12px; }
.tpl-side h2 + * { margin-top: 0; }
.tpl-side > h2:not(:first-child) { margin-top: 28px; }
.tpl-questions { margin: 0; padding-left: 22px; }
.tpl-questions > li { margin-bottom: 8px; }
.tpl-questions ul { margin: 4px 0 0; padding-left: 18px; font-size: .92rem; }
.tpl-q { display: block; }
.tpl-kind { font-size: .8rem; color: var(--ink-soft); }
.tpl-before { margin: 0 0 16px; padding-left: 20px; }
.tpl-before li { margin-bottom: 6px; }
.tpl-others { padding-top: clamp(40px, 6vw, 64px); }
@media (max-width: 900px) {
  .tpl-body { grid-template-columns: minmax(0, 1fr); }
  .tpl-preview .win iframe { height: 600px; }
}

/* --- the comparison pages (/tally-alternative etc., 2026-10-27) --- */
.alternative-page .page-hero { max-width: 760px; }
.alternative-page .page-hero .lede { text-align: left; margin-bottom: 16px; }
.vs-section { max-width: 860px; padding-top: clamp(36px, 5vw, 56px); }
.vs-section h2 { font-size: 1.5rem; margin: 0 0 14px; }
.vs-stay { margin: 0; padding-left: 22px; }
.vs-stay li { margin-bottom: 10px; }
.vs-table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.vs-table th, .vs-table td { text-align: left; vertical-align: top; padding: 10px 12px; border-top: 1px solid var(--line); }
.vs-table thead th { border-top: 0; font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-soft); }
.vs-table tbody th { width: 22%; font-weight: 650; }
.vs-table td { width: 39%; }
.vs-table td:last-child { background: var(--primary-wash); }
.vs-different { list-style: none; padding: 0; margin: 0; }
.vs-different li { margin-bottom: 18px; }
.vs-different b { display: block; font-size: 1.1rem; margin-bottom: 4px; }
.vs-different p { margin: 0; color: var(--ink-soft); }
.footer-links.compare { margin-top: 10px; }
@media (max-width: 640px) {
  .vs-table { font-size: .9rem; }
  .vs-table th, .vs-table td { padding: 8px; }
}

/* --- the help centre (2026-10-31) ------------------------------------------------------------ */
.help-section { padding-top: clamp(32px, 5vw, 56px); }
.help-section-title { font: 650 1.4rem/1.2 var(--sans); letter-spacing: -.02em; margin: 0 0 14px; }
.help-page .tpl-grid a p { margin: 6px 0 0; color: var(--ink-soft); font-size: .92rem; }
.help-layout { max-width: 1160px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 32px); display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 48px; }
.help-aside { padding-top: clamp(48px, 7vw, 88px); font-size: .9rem; position: sticky; top: 0; align-self: start; max-height: 100vh; overflow: auto; }
.help-aside-title { text-transform: uppercase; letter-spacing: .1em; font-size: .7rem; font-weight: 600; color: var(--ink-soft); margin: 18px 0 6px; }
.help-aside ul { list-style: none; margin: 0; padding: 0; }
.help-aside li a { display: block; padding: 4px 8px; border-radius: 6px; color: var(--ink-soft); text-decoration: none; }
.help-aside li a:hover { color: var(--ink); background: var(--primary-wash); }
.help-aside li.on a { color: var(--primary); font-weight: 600; }
.help-article { margin: 0; padding-left: 0; padding-right: 0; max-width: 720px; }
.help-article h2 { margin-top: 40px; }
.help-article h3 { font: 650 1.15rem/1.3 var(--sans); margin: 26px 0 6px; }
.help-article figure { margin: 22px 0 26px; }
.help-article figure img { display: block; width: auto; max-width: 100%; height: auto; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 10px 30px -22px rgba(35, 33, 31, .5); }
.help-article figcaption { font-size: .82rem; color: var(--ink-soft); margin-top: 8px; }
.help-article pre { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; overflow: auto; font-size: .82rem; line-height: 1.5; }
.help-article code { font-size: .9em; }
.help-article table { border-collapse: collapse; width: 100%; font-size: .9rem; margin: 16px 0; }
.help-article th, .help-article td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.help-article th { font-weight: 600; color: var(--ink); }
.help-article td { color: var(--ink-soft); }
.help-article .note { background: var(--primary-wash); border-radius: 10px; padding: 12px 16px; color: var(--ink); }
.help-next { display: flex; justify-content: space-between; gap: 16px; margin-top: 48px; padding-top: 18px; border-top: 1px solid var(--line); font-weight: 600; }
.help-next a { color: var(--primary); text-decoration: none; }
.help-ask { margin-top: 28px; }
@media (max-width: 860px) {
  .help-layout { grid-template-columns: 1fr; gap: 0; }
  .help-aside { position: static; max-height: none; padding-top: 24px; order: 2; border-top: 1px solid var(--line); margin-top: 32px; }
}
.use-list { max-width: 720px; margin: 0; padding-left: 22px; color: var(--ink-soft); font-size: 1.05rem; }
.use-list li { margin-bottom: 8px; }
.changelog h2 { font-size: 1.2rem; margin-top: 32px; }
.changelog ul { padding-left: 22px; }

/* --- the home page's audiences, works-with row and templates row (2026-10-31) --------------------------------- */
.audiences { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.audiences a { display: block; height: 100%; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 18px 18px 16px; color: inherit; text-decoration: none; }
.audiences a:hover { border-color: var(--primary); background: var(--primary-wash); }
.audiences b { display: block; font-size: 1.05rem; margin-bottom: 6px; }
.audiences p { margin: 0; color: var(--ink-soft); font-size: .92rem; }
.works-with { margin: 26px 0 0; font-size: .92rem; color: var(--ink); line-height: 1.8; }
.works-with .muted { margin-right: 6px; }
.works-with a { margin-left: 10px; font-weight: 600; color: var(--primary); text-decoration: none; white-space: nowrap; }
.home-tpl { margin-top: 8px; }
.home-tpl a p { margin: 6px 0 0; color: var(--ink-soft); font-size: .92rem; }
.tidy .done .make-own { margin-top: 28px; font-size: .9rem; }
.tidy .done .make-own a { color: var(--ink-soft); }
.demo-video { max-width: 1000px; margin: 28px auto 0; border: 1px solid var(--line); border-radius: 14px; overflow: hidden;
  box-shadow: 0 24px 50px -30px rgba(35, 33, 31, .45); background: var(--card); }
.demo-video video { display: block; width: 100%; height: auto; }
.dq-hint.center { text-align: center; margin-top: 14px; }

/* --- the restructure of 2026-10-31: a shorter home, left headings with eyebrows, a tinted band, footer columns --- */
.hero-note { margin: 14px 0 0; color: var(--ink-soft); font-size: .95rem; }
.hero-note.center { text-align: center; max-width: 640px; margin: 14px auto 0; }
.section-block .eyebrow { margin-bottom: 8px; }
.section-note { margin: 22px 0 0; color: var(--ink-soft); }
.section-note a { color: var(--primary); font-weight: 600; text-decoration: none; }
.section-note a:hover { text-decoration: underline; }
@media (max-width: 640px) { .audiences p { display: none; } }
.why.get { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 34px 36px; }
@media (max-width: 860px) { .why.get { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .why.get { grid-template-columns: 1fr; } }
.band-ai { background: var(--primary-wash); border-color: transparent; }
.band-ai-inner { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(24px, 4vw, 56px); align-items: center; }
.band-ai .section-title { margin-bottom: 14px; }
.band-ai .lede { margin-bottom: 14px; }
.band-ai .demo-video { margin: 0; }
@media (max-width: 900px) { .band-ai-inner { grid-template-columns: 1fr; } }
.features-hero { max-width: 1160px; margin: 0 auto; padding: clamp(40px, 7vw, 80px) clamp(16px, 4vw, 32px) 0; align-items: center; }
.features-hero h1 { font-size: clamp(2.2rem, 4.6vw, 3.2rem); line-height: 1.05; margin: 0 0 14px; }
.footer-cols { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px 32px; margin-top: 22px; }
.footer-col { display: flex; flex-direction: column; gap: 7px; }
.footer-col a { color: var(--ink); text-decoration: none; font-size: .92rem; }
.footer-col a:hover { color: var(--primary); }
.footer-col-title { margin: 0 0 4px; text-transform: uppercase; letter-spacing: .1em; font-size: .7rem; font-weight: 600; color: var(--ink-soft); }
@media (max-width: 760px) { .footer-cols { grid-template-columns: 1fr 1fr; } }
.audiences.n4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.audiences.n5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.audiences.n7 { grid-template-columns: repeat(4, minmax(0, 1fr)); }  /* seven at work: 4 + 3, the last row left-aligned */
@media (max-width: 1000px) { .audiences.n4, .audiences.n7 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .audiences.n5 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) { .audiences.n4, .audiences.n5, .audiences.n7 { grid-template-columns: 1fr 1fr; } .audiences.n5 li:last-child, .audiences.n7 li:last-child { grid-column: 1 / -1; } }
.audiences-row-title { margin: 22px 0 10px; font-size: .8rem; font-weight: 600; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-soft); }
.audiences-row-title:first-of-type { margin-top: 0; }

/* ---- the look's extras (2026-10-31, the birthday-party round): patterns we draw (patterns.py, the tiles in
   --f-pat / --f-pat-w from background_css), the shade over a cover that is the page, a tinted card, the title in the
   main colour, and the button shape. The classes come from web.design_classes. ---- */
body.tidy.pat.bg-tint { background: var(--f-pat) repeat, var(--primary-wash); }
body.tidy.pat.bg-colour { background: var(--f-pat-w) repeat fixed, linear-gradient(135deg, var(--primary), var(--primary-deep)) fixed; }
@media (prefers-color-scheme: dark) { body.tidy.pat.bg-tint { background-image: var(--f-pat-w); } }
body.tidy.bg-image.scrim-light { background: linear-gradient(rgba(255, 255, 255, .58), rgba(255, 255, 255, .58)), var(--f-bg, none) center / cover no-repeat fixed; }
body.tidy.bg-image.scrim-none { background: var(--f-bg, none) center / cover no-repeat fixed; }
.tidy.bg.card-tint .form-wrap { background: color-mix(in srgb, var(--primary) 8%, var(--card)); }
.tidy.title-primary .form-head h1 { color: var(--primary); }
.tidy.btn-pill .btn { border-radius: 999px; }
.tidy.btn-square .btn { border-radius: 4px; }

/* A title font (web.TITLE_FONTS: Caveat, Pacifico) dresses the title and headings only; the questions stay readable. */
.tidy .form-head h1, .tidy .answers .statement h2, .tidy .answers .f-page-head h2, .tidy .done h1, .tidy .closed h1 {
  font-family: var(--display, var(--sans)); }
.tidy.font-title .form-head h1 { font-size: clamp(2.4rem, 5.6vw, 3.2rem); letter-spacing: 0; line-height: 1.05; }
.tidy.font-title .answers .statement h2, .tidy.font-title .answers .f-page-head h2 { font-size: 2rem; letter-spacing: 0; }

/* A gallery illustration shown WHOLE (web.design_classes "cover-whole"): the band at the column's width and 3:1,
   instead of edge to edge where a wide screen would keep only a strip of it. Textures and photos fill as before. */
.tidy.cover-whole .f-cover.has-image:not(.card-cover) { height: auto; aspect-ratio: 3 / 1; max-width: 740px; margin: 22px auto 0; border-radius: 16px; }
.tidy.bg.cover-whole .form-wrap .card-cover { height: auto; aspect-ratio: 3 / 1; }
@media (max-width: 640px) {
  .tidy.cover-whole .f-cover.has-image:not(.card-cover) { height: auto; margin: 12px 12px 0; border-radius: 12px; }
  .tidy.bg.cover-whole .form-wrap .card-cover { height: auto; }
}

/* The template library's occasions row (2026-11-02): cards with the gallery thumb on top. */
.tpl-occasions { margin-top: 44px; }
.tpl-occasions .section-note { margin: 0 0 18px; }
.tpl-grid.pictures a { padding: 0 0 16px; overflow: hidden; }
.tpl-grid.pictures img { display: block; width: 100%; aspect-ratio: 3 / 1; object-fit: cover; height: auto; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.tpl-grid.pictures b, .tpl-grid.pictures p, .tpl-grid.pictures span { margin-left: 18px; margin-right: 18px; }
.tpl-grid.pictures b { display: block; }

/* The home page's "Make it yours" section (2026-11-02): the Design tab and a dressed invitation, then the paper form. */
.make-yours .make-head { margin-bottom: 28px; }
.make-yours .lede.left { max-width: 680px; }
.make-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(220px, .5fr); gap: 36px; align-items: start; }
.make-yours figure { margin: 0; }
.make-yours img { display: block; width: 100%; height: auto; border-radius: 14px; border: 1px solid var(--line); box-shadow: 0 24px 60px -30px rgba(35, 33, 31, .4); }
.make-invite img { border-radius: 28px; }
.make-yours figcaption { margin-top: 12px; color: var(--ink-soft); font-size: .92rem; }
.make-yours figcaption a { color: var(--primary); font-weight: 600; text-decoration: none; }
.make-paper { display: grid; grid-template-columns: minmax(240px, .8fr) minmax(0, .9fr) minmax(0, 1.2fr); gap: 28px; align-items: center; margin-top: clamp(40px, 6vw, 64px); }
.make-paper h3 { font-family: var(--serif); font-weight: 800; font-size: 1.7rem; letter-spacing: -.02em; line-height: 1.1; margin: 0 0 10px; }
.make-paper-copy p { margin: 0; }
.make-paper-copy .dq-hint { margin-top: 12px; }
.make-before img { transform: rotate(-1deg); }
@media (max-width: 860px) {
  .make-grid, .make-paper { grid-template-columns: 1fr; }
  .make-invite { max-width: 300px; }
}

/* Nell's pill (Polycarp, bottom right, 56px on phones) sat over the end of the footer's legal line: room under it. */
.has-agent .legal-line { padding-right: 84px; }
@media (max-width: 640px) { .has-agent .site-footer-inner { padding-bottom: 72px; } }

/* Reach (app/attribution.py, /admin/reach): six small tables. */
.reach-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; margin-top: 16px; }
.reach-grid table.plain { width: 100%; border-collapse: collapse; }
.reach-grid table.plain td { padding: 3px 6px; border-top: 1px solid var(--line); font-size: .92rem; }
.reach-grid td.num { text-align: right; width: 4em; font-variant-numeric: tabular-nums; color: var(--muted); }

/* The feature landing pages (app/features_pages.py): a picture, the parts in two columns, templates as cards. */
.feature-shot { max-width: 1040px; margin: 0 auto 8px; }
.feature-shot img { max-width: 100%; height: auto; display: block; margin: 0 auto; border-radius: 14px; border: 1px solid var(--line); box-shadow: var(--shadow); }
.feature-page .faq-block .faq { margin-left: 0; }
.feature-parts { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 28px 40px; }
.feature-part h2 { font-size: 1.25rem; margin: 0 0 8px; }
.feature-part .article p { margin: 0 0 10px; }
.feature-page .lede p { margin: 0 0 12px; }
.feature-templates { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.feature-templates a { display: block; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); text-decoration: none; color: var(--ink); height: 100%; }
.feature-templates a:hover { border-color: var(--primary); }
.feature-templates b { display: block; margin-bottom: 4px; }
.feature-templates span { color: var(--muted); font-size: .92rem; }

/* Conversational forms (app/conversation.py, static/chat.js): the turns as bubbles, choices as buttons, a summary. */
.chat-notice { font-size: .9rem; color: var(--muted); margin-top: 8px; }
.chat-notice a { white-space: nowrap; }
.chat-log { display: flex; flex-direction: column; gap: 10px; margin: 18px 0 12px; }
.chat-msg { max-width: 85%; padding: 10px 14px; border-radius: 16px; line-height: 1.45; overflow-wrap: break-word; }
.chat-msg.bot { align-self: flex-start; background: var(--card); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.chat-msg.person { align-self: flex-end; background: var(--primary); color: var(--on-primary); border-bottom-right-radius: 4px; }
.chat-msg.question strong { font-size: 1.05rem; }
.chat-msg.question .req { color: var(--accent); }
.chat-msg .chat-help { margin: 4px 0 0; color: var(--muted); font-size: .92rem; }
.chat-msg.error { border-color: var(--primary); color: var(--primary-deep); }
.chat-msg.note, .chat-msg.typing-dots { color: var(--muted); font-style: italic; }
.chat-picks { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 14px; }
.chat-pick { border: 1px solid var(--line); background: var(--card); color: var(--ink); border-radius: 999px; padding: 9px 16px;
  font: inherit; cursor: pointer; }
.chat-pick:hover, .chat-pick:focus-visible { border-color: var(--primary); }
.chat-pick.on { background: var(--primary-wash); border-color: var(--primary); }
.chat-pick.primary { background: var(--primary); color: var(--on-primary); border-color: var(--primary); }
.chat-pick.primary.big { padding: 12px 24px; font-weight: 600; }
.chat-pick.quiet { background: transparent; color: var(--muted); }
.chat-pick.linkish { border: 0; background: none; padding: 0 0 0 10px; color: var(--primary); text-decoration: underline; }
.chat-scale { display: flex; flex-wrap: wrap; gap: 6px; }
.chat-scale .chat-pick { min-width: 44px; padding: 9px 10px; }
.chat-ends { width: 100%; margin: 0; color: var(--muted); font-size: .88rem; }
.chat-input { font: inherit; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--ink); }
.chat-summary { margin: 4px 0 10px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
.chat-summary dt { font-weight: 600; margin-top: 8px; }
.chat-summary dt:first-child { margin-top: 0; }
.chat-summary dd { margin: 2px 0 0; }
.chat-compose { position: sticky; bottom: 0; display: flex; gap: 8px; padding: 10px 0 14px; background: var(--paper); }
.chat-compose textarea { flex: 1; resize: none; font: inherit; padding: 11px 14px; border: 1px solid var(--line); border-radius: 14px;
  background: var(--card); color: var(--ink); min-height: 46px; }
.tidy.bg .chat-compose { background: transparent; }

.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.chat-compose[hidden], .chat-picks:empty { display: none; }
.check-line { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; }
.check-line input { margin-top: 4px; }
