/* Inter, self-hosted (SIL Open Font License, see fonts/Inter-OFL.txt). */
@font-face {
  font-family: Inter;
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("/fonts/inter-latin-ext.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF,
    U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: Inter;
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("/fonts/inter-latin.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --primary: #0a0a0a;
  --primary-active: #1f1f1f;
  --primary-disabled: #e5e5e5;
  --ink: #0a0a0a;
  --body: #3a3a3a;
  --body-strong: #1a1a1a;
  --muted: #6a6a6a;
  --muted-soft: #9a9a9a;
  --hairline: #e5e5e5;
  --hairline-soft: #f0f0f0;
  --canvas: #fffaf0;
  --surface-soft: #faf5e8;
  --surface-card: #f5f0e0;
  --surface-strong: #ebe6d6;
  --on-primary: #ffffff;
  --on-dark: #ffffff;
  --on-dark-soft: #a0a0a0;
  --brand-pink: #ff4d8b;
  --brand-teal: #1a3a3a;
  --brand-lavender: #b8a4ed;
  --brand-peach: #ffb084;
  --brand-ochre: #e8b94a;
  --brand-mint: #a4d4c5;
  --brand-coral: #ff6b5a;
  --success: #22c55e;
  --warning: #f59e0b;
  --error: #ef4444;

  --rounded-xs: 6px;
  --rounded-sm: 8px;
  --rounded-md: 12px;
  --rounded-lg: 16px;
  --rounded-xl: 24px;
  --rounded-pill: 9999px;

  --space-xxs: 4px;
  --space-xs: 8px;
  --space-sm: 12px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-xxl: 48px;

  --font: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--canvas);
  color: var(--body);
  font: 400 16px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
}

/* --- type --- */

h1,
h2,
h3,
h4 {
  color: var(--ink);
}

h1 {
  font-size: 32px;
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.5px;
  margin: var(--space-xs) 0 var(--space-lg);
}

h2 {
  font-size: 24px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.3px;
  margin: var(--space-xxl) 0 var(--space-sm);
}

h3 {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.4;
  margin: var(--space-lg) 0 var(--space-xs);
}

h4,
.label {
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--muted);
  margin: var(--space-lg) 0 var(--space-xs);
}

a {
  color: var(--ink);
  text-underline-offset: 3px;
}

strong {
  color: var(--body-strong);
}

.lead {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--body-strong);
}

.hint,
.meta {
  color: var(--muted);
  font-size: 14px;
}

/* --- frame --- */

.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-md);
  height: 64px;
  padding: 0 var(--space-md);
  max-width: 72rem;
  margin: 0 auto;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  color: var(--ink);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.5px;
  text-decoration: none;
}

.brand-mark {
  width: 22px;
  height: 22px;
  border-radius: var(--rounded-pill);
  background: var(--brand-pink);
  box-shadow: 8px 0 0 -2px var(--brand-ochre);
}

.who {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 60%;
}

main {
  max-width: 44rem;
  margin: 0 auto;
  padding: var(--space-md) var(--space-md) var(--space-xxl);
}

main.wide {
  max-width: 72rem;
}

.narrow {
  max-width: 28rem;
}

.footer {
  background: var(--surface-soft);
  color: var(--body);
  font-size: 14px;
  padding: var(--space-xxl) var(--space-md);
  margin-top: var(--space-xxl);
}

.footer p {
  max-width: 72rem;
  margin: 0 auto var(--space-xs);
}

.made-by {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  margin-top: var(--space-md);
  font-weight: 500;
}

.made-by a {
  display: inline-flex;
}

.back {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
}

.back a {
  color: var(--muted);
  text-decoration: none;
}

/* --- forms --- */

label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  margin: var(--space-md) 0 var(--space-xs);
}

input:not([type="checkbox"]):not([type="radio"]),
textarea,
select {
  width: 100%;
  min-height: 44px;
  padding: var(--space-sm) var(--space-md);
  font: 400 16px/1.4 var(--font);
  color: var(--ink);
  background: var(--canvas);
  border: 1px solid var(--muted-soft);
  border-radius: var(--rounded-md);
}

select {
  width: auto;
  max-width: 100%;
}

input:not([type="checkbox"]):not([type="radio"]):focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--ink);
  box-shadow: 0 0 0 1px var(--ink);
}

input[type="checkbox"],
input[type="radio"] {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
  vertical-align: -3px;
}

fieldset {
  border: 0;
  padding: 0;
  margin: var(--space-lg) 0 0;
}

legend {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  padding: 0;
  margin-bottom: var(--space-xxs);
}

label.choice,
.checks label {
  font-size: 16px;
  font-weight: 400;
  color: var(--body);
  margin: var(--space-xs) 0;
}

.checks {
  list-style: none;
  padding: 0;
  margin: var(--space-xxs) 0 0;
}

.columns {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr));
  column-gap: var(--space-md);
}

form.inline {
  display: inline;
}

form.row {
  display: flex;
  gap: var(--space-xs);
  align-items: center;
  margin: var(--space-xs) 0;
}

form.row button {
  margin-top: 0;
  white-space: nowrap;
}

/* --- buttons --- */

button,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  margin-top: var(--space-md);
  padding: var(--space-sm) 20px;
  font: 600 14px/1 var(--font);
  color: var(--on-primary);
  background: var(--primary);
  border: 1px solid var(--primary);
  border-radius: var(--rounded-md);
  text-decoration: none;
  cursor: pointer;
}

button:active,
.button:active {
  background: var(--primary-active);
}

button.secondary,
.button.secondary {
  color: var(--ink);
  background: var(--canvas);
  border-color: var(--hairline);
}

button.danger {
  color: var(--ink);
  background: var(--canvas);
  border-color: var(--error);
}

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

/* --- messages --- */

.error {
  margin: var(--space-md) 0;
  padding: var(--space-sm) var(--space-md);
  color: var(--ink);
  font-weight: 600;
  background: var(--surface-card);
  border-left: 4px solid var(--error);
  border-radius: var(--rounded-md);
}

.notice {
  padding: var(--space-md) var(--space-lg);
  color: var(--ink);
  background: var(--surface-card);
  border-radius: var(--rounded-lg);
}

/* --- cards --- */

.card {
  padding: var(--space-lg);
  margin: var(--space-md) 0;
  background: var(--canvas);
  border: 1px solid var(--hairline);
  border-radius: var(--rounded-lg);
}

.card h2,
.card h3 {
  margin-top: 0;
}

.feature {
  padding: var(--space-lg);
  margin: var(--space-md) 0;
  border-radius: var(--rounded-xl);
  color: var(--ink);
}

.feature h2,
.feature h3,
.feature strong {
  color: inherit;
  margin-top: 0;
}

/* The saturated card colours. Text stays ink on every light fill, pink included, so small type stays readable. */
.fill-pink {
  background: var(--brand-pink);
}

.fill-teal {
  background: var(--brand-teal);
  color: var(--on-dark);
}

.fill-lavender {
  background: var(--brand-lavender);
}

.fill-peach {
  background: var(--brand-peach);
}

.fill-ochre {
  background: var(--brand-ochre);
}

.fill-cream {
  background: var(--surface-card);
}

.fill-closed {
  background: var(--surface-strong);
}

.fill-teal a,
.fill-teal h2,
.fill-teal h3,
.fill-teal strong {
  color: var(--on-dark);
}

.feature .meta,
.feature .hint,
.tile .meta {
  color: inherit;
  opacity: 0.85;
}

.on-color {
  color: var(--ink);
  background: var(--canvas);
  border-color: var(--canvas);
}

/* --- badges --- */

.tag,
.pill {
  display: inline-block;
  margin: 2px var(--space-xxs) 2px 0;
  padding: var(--space-xxs) var(--space-sm);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
  color: var(--ink);
  background: var(--surface-card);
  border-radius: var(--rounded-pill);
}

.pill.status-unpaid {
  background: var(--canvas);
}

.pill.status-declared,
.tag.wait {
  background: var(--warning);
}

.pill.status-verified {
  background: var(--success);
}

.pill.status-exempt {
  background: var(--surface-strong);
}

/* --- lists --- */

.list,
.people,
.kids,
.events {
  list-style: none;
  padding: 0;
  margin: var(--space-xs) 0;
}

.list li,
.people li {
  padding: var(--space-md) 0;
  border-bottom: 1px solid var(--hairline);
}

.list li a {
  font-weight: 600;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-xs);
}

.actions button,
.copy-button {
  min-height: 36px;
  margin-top: var(--space-xs);
  padding: var(--space-xs) var(--space-md);
  font-size: 14px;
  border-radius: var(--rounded-sm);
}

.actions form.row button {
  margin-top: 0;
}

.events li {
  padding: var(--space-xs) 0;
  font-size: 14px;
  border-bottom: 1px solid var(--hairline);
}

/* --- group page --- */

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-md);
  margin-top: var(--space-xl);
}

.section-head h2 {
  margin: 0;
}

.section-head .button {
  margin-top: 0;
}

.tiles {
  list-style: none;
  padding: 0;
  margin: var(--space-md) 0 var(--space-xl);
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
  gap: var(--space-md);
}

.tile {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  height: 100%;
  padding: var(--space-lg);
  color: var(--ink);
  text-decoration: none;
  border-radius: var(--rounded-xl);
}

.tile.fill-teal {
  color: var(--on-dark);
}

.tile strong {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.3;
}

.mine {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-xs);
  font-weight: 600;
}

.mine .pill {
  margin: 0;
}

progress {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 8px;
  border: 0;
  border-radius: var(--rounded-pill);
  background: var(--surface-strong);
  overflow: hidden;
}

progress::-webkit-progress-bar {
  background: var(--surface-strong);
}

progress::-webkit-progress-value {
  background: var(--primary);
  border-radius: var(--rounded-pill);
}

progress::-moz-progress-bar {
  background: var(--primary);
  border-radius: var(--rounded-pill);
}

.tile progress,
.tile progress::-webkit-progress-bar {
  background: var(--canvas);
}

.fill-teal progress::-webkit-progress-value {
  background: var(--brand-ochre);
}

.fill-teal progress::-moz-progress-bar {
  background: var(--brand-ochre);
}

.leave {
  margin-top: var(--space-xxl);
  font-size: 14px;
}

.leave a {
  color: var(--muted);
}

/* --- collection page --- */

.paybox p {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.4;
}

.copies,
.label-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-xs);
}

.label-line .copy-button {
  margin-top: 0;
}

.progress {
  margin: var(--space-lg) 0;
}

.progress p {
  margin: 0 0 var(--space-xs);
}

.description {
  white-space: pre-line;
}

.status {
  margin: var(--space-xs) 0;
}

.note {
  padding: var(--space-xs) var(--space-sm);
  color: var(--ink);
  background: var(--surface-card);
  border-left: 4px solid var(--error);
  border-radius: var(--rounded-sm);
}

.links {
  margin-top: var(--space-xl);
}

.danger-link {
  font-size: 14px;
  color: var(--muted);
}

details summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--ink);
  margin: var(--space-xs) 0;
}

.collection-form fieldset input[name^="amount"] {
  margin-bottom: var(--space-xxs);
}

/* --- landing --- */

.hero {
  padding: var(--space-xl) 0 var(--space-md);
}

.hero h1 {
  font-size: clamp(40px, 9vw, 72px);
  line-height: 1;
  letter-spacing: -2px;
  max-width: 14ch;
  margin-bottom: var(--space-lg);
}

.hero .lead {
  max-width: 36rem;
}

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: var(--space-md);
  margin: var(--space-xl) 0;
}

.features .feature {
  margin: 0;
  padding: var(--space-xl);
}

.features h2 {
  font-size: 24px;
  margin-bottom: var(--space-sm);
}

@media (min-width: 60rem) {
  .hero-band {
    display: grid;
    grid-template-columns: 7fr 5fr;
    gap: var(--space-xxl);
    align-items: center;
    padding: var(--space-xl) 0;
  }
}

.login-card {
  max-width: 28rem;
  padding: var(--space-lg);
  background: var(--surface-soft);
  border-radius: var(--rounded-xl);
}

.login-card h2 {
  margin-top: 0;
}

@media (max-width: 30rem) {
  h1 {
    font-size: 28px;
  }

  form.row {
    flex-wrap: wrap;
  }

  form.row input {
    flex-basis: 100%;
  }
}

/* --- notices, photos, expenses --- */

.notices {
  list-style: none;
  padding: 0;
  margin: var(--space-md) 0;
  display: grid;
  gap: var(--space-sm);
}

.notice-item {
  margin: 0;
}

.notice-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-xs);
}

.notice-head .tag {
  margin: 0;
  text-decoration: none;
}

.notice-item .description {
  margin: var(--space-sm) 0;
}

.notice-form {
  margin-top: var(--space-md);
}

.notice-form h3 {
  margin-top: 0;
}

.photo-link {
  display: block;
  margin: var(--space-sm) 0;
}

.photo {
  display: block;
  max-width: 100%;
  max-height: 22rem;
  border-radius: var(--rounded-md);
  object-fit: contain;
  background: var(--surface-card);
}

button.small,
.button.small {
  min-height: 36px;
  margin-top: var(--space-xs);
  padding: var(--space-xs) var(--space-md);
  border-radius: var(--rounded-sm);
}

.expense-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-md);
}

input[type="file"] {
  font: 400 14px/1.4 var(--font);
  color: var(--body);
}

.notice-item .actions form {
  margin: 0;
}
