/*
 * Lasi: the festa poster. Two inks on white paper, the date biggest.
 * Written for a phone first; wider screens only get more air. See DESIGN.md.
 */

@font-face {
  font-family: "Bricolage Grotesque";
  font-style: normal;
  font-weight: 200 800;
  font-stretch: 75% 100%;
  font-display: swap;
  src: url("/assets/bricolage-grotesque-16ac37c9.woff2") format("woff2");
}

:root {
  --paper: #ffffff;
  --ink: #22306b;
  --ink-soft: #5a648f;
  --yellow: #f6d86b;
  --wash: #eff1f8;
  --red: #c8232c;

  --gutter: 20px;
  --column: 640px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
/* Room for the scrollbar on every page, long or short, so the column doesn't shift between them. */
html { scrollbar-gutter: stable; }

/* No double-tap zoom on controls tapped in quick succession; the grip keeps its own touch-action. */
button, a, input, textarea, summary, label { touch-action: manipulation; }

body {
  margin: 0;
  /* Pasted messages and links must wrap, not push the page sideways. */
  overflow-wrap: break-word;
  background: var(--paper);
  color: var(--ink);
  font-family: "Bricolage Grotesque", system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.45;
}

h1, h2, p, ul, dl, dd { margin: 0; }
ul { padding: 0; list-style: none; }
a { color: inherit; }

/* Hidden means hidden, whatever display a class sets. */
[hidden] { display: none !important; }

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

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}

/* The poster voice: heavy and narrow. Used for dates and titles only. */
.wordmark, .title, .next__day, .next__name, .event__day, .month__name, .empty__line {
  font-weight: 800;
  font-stretch: 75%;
  letter-spacing: -0.01em;
  line-height: 1;
}

/* Top */

.top {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  max-width: var(--column); margin: 0 auto;
  padding: 14px var(--gutter);
}

.wordmark { font-size: 1.75rem; text-decoration: none; }

/* The two lists that matter most, as tabs. Only on those lists. */
.nav {
  display: flex; gap: 20px;
  max-width: var(--column); margin: 0 auto 20px;
  padding: 0 var(--gutter);
}
.nav a {
  display: inline-flex; align-items: center; min-height: 44px;
  padding: 6px 0; border-bottom: 3px solid transparent;
  color: var(--ink-soft); font-weight: 600; text-decoration: none;
}
.nav a[aria-current="page"] { border-bottom-color: var(--ink); color: var(--ink); }

.page {
  max-width: var(--column); margin: 0 auto;
  padding: 0 var(--gutter) 72px;
}

/* Buttons */

.button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 22px;
  border: 0; border-radius: 999px;
  background: var(--ink); color: var(--paper);
  font: inherit; font-weight: 600; text-decoration: none;
  cursor: pointer;
}
.button--wide { width: 100%; min-height: 56px; font-size: 1.1rem; }
.button { transition: transform 0.12s ease-out; }
.button:active:not(:disabled) { transform: scale(0.97); }
@media (prefers-reduced-motion: reduce) { .button { transition: none; } }

/* Links that stand alone on a line are tapped, not read: 44px tall like everything else tappable. */
.back a, .more a, .lone-link a, .facts-rule a, .subfield summary { display: inline-flex; align-items: center; min-height: 44px; }

.danger {
  display: block; margin: 28px auto 0; padding: 12px;
  border: 0; background: none;
  color: var(--red); font: inherit; text-decoration: underline;
  cursor: pointer;
}

.notice {
  margin-bottom: 16px; padding: 12px 16px;
  background: var(--ink); color: var(--paper);
  font-weight: 600;
}
.notice a { color: inherit; text-underline-offset: 3px; }
.field__hint { margin-top: 6px; color: var(--ink-soft); font-size: 0.9rem; }

/* Setting up: each new musician's invitation, to copy and send. */
.invitations { margin: 28px 0 0; padding: 0; list-style: none; }
.invitations li { padding: 16px 0; border-bottom: 1px solid var(--ink); }
.invitations li:first-child { border-top: 1px solid var(--ink); }
.invitations__name { font-weight: 700; }
.invitations .copy { margin-top: 8px; }
.invitations + .question__actions { margin-top: 28px; }

/* The next event: the one bold thing. Edge to edge on a phone. */

.next {
  display: block;
  margin: 0 calc(var(--gutter) * -1);
  padding: 22px var(--gutter) 26px;
  background: var(--yellow);
  text-decoration: none;
}

.next__countdown { font-weight: 600; }

.next__date { display: flex; align-items: flex-end; gap: 14px; margin: 6px 0 14px; }
.next__day { font-size: clamp(7.5rem, 42vw, 11rem); line-height: 0.8; letter-spacing: -0.04em; }
.next__rest { padding-bottom: 4px; font-size: 1.25rem; font-weight: 600; line-height: 1.15; }

.next__name { font-size: 2rem; margin-bottom: 8px; text-wrap: balance; }

.where-when { display: flex; flex-wrap: wrap; column-gap: 12px; }
.where-when__time { font-weight: 700; }

/* The rest, month by month */

.month { margin-top: 36px; }
.month__name { font-size: 1.5rem; padding-bottom: 10px; border-bottom: 3px solid var(--ink); }

.event {
  display: grid; grid-template-columns: 64px 1fr; align-items: center; gap: 4px;
  min-height: 76px; padding: 12px 0;
  border-bottom: 1px solid var(--ink);
  text-decoration: none;
}

.event__date { display: flex; flex-direction: column; }
.event__day { font-size: 2.75rem; line-height: 0.9; letter-spacing: -0.03em; }
.event__weekday { color: var(--ink-soft); font-size: 0.9rem; font-weight: 600; }

.event__body { display: flex; flex-direction: column; min-width: 0; }
.event__name { font-size: 1.15rem; font-weight: 700; line-height: 1.25; }
.event .where-when { color: var(--ink-soft); }

.quiet { margin-top: 28px; color: var(--ink-soft); }
.more { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 24px; margin-top: 40px; }
.more form { display: contents; }
.link-button { padding: 0; border: 0; background: none; color: inherit; font: inherit; text-decoration: underline; cursor: pointer; }

/* A drawing for a screen with nothing on it yet: two inks, like everything else. */
/* Sized by height, so a drawing cropped to its own edges lines up with the text under it. */
.illustration { display: block; width: auto; height: 120px; margin: 32px 0 4px; color: var(--ink); }
.illustration__sun { fill: var(--yellow); }
.illustration__paper { fill: var(--paper); }
.empty .illustration { margin: 0 auto 20px; }
.illustration + .quiet { margin-top: 8px; }

/* A screen with nothing on it at all: the drawing, its sentence and the way to start, centred together. */
.empty { padding: 32px 0 8px; text-align: center; }
.empty p { max-width: 32ch; margin-inline: auto; text-wrap: balance; }
.empty .quiet { margin-top: 0; }
.empty__line { font-size: 3.5rem; margin-bottom: 12px; }
.empty .button { margin-top: 24px; }

/* One event */

.back { padding: 6px 0 18px; }
.back a { display: inline-block; padding: 6px 0; font-weight: 600; }
.back a::before { content: "‹ "; }

.title { font-size: clamp(2.5rem, 12vw, 3.5rem); text-wrap: balance; }

.sheet__countdown {
  display: inline-block; margin-bottom: 14px; padding: 4px 12px;
  background: var(--yellow); font-weight: 600;
}

/* A rule with a link in the middle of it. */
.facts-rule { display: flex; align-items: center; gap: 12px; margin-top: 16px; }
.facts-rule::before, .facts-rule::after { content: ""; flex: 1; height: 3px; background: var(--ink); }
.facts-rule a { padding: 6px 0; font-weight: 600; text-underline-offset: 3px; }

.facts { margin: 0; }
.facts > div {
  display: grid; grid-template-columns: 88px 1fr; gap: 4px;
  padding: 14px 0; border-bottom: 1px solid var(--ink);
}
.facts dt { color: var(--ink-soft); }
.facts dd { min-width: 0; font-size: 1.15rem; font-weight: 700; }

.place a { text-decoration-thickness: 2px; text-underline-offset: 3px; }

.notes { margin-top: 24px; }
.notes p + p { margin-top: 0.8em; }

/* Forms */

.form { display: grid; gap: 20px; margin-top: 24px; }
.form__pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.field { display: grid; gap: 6px; min-width: 0; }
.field label { font-weight: 700; }
.field__optional { margin-left: 6px; color: var(--ink-soft); font-weight: 400; font-size: 0.9rem; }

/* Every field that takes typing looks the same: a washed box with a heavy ink edge. */
.field input, .field textarea,
.inline-form input[type="text"], .inline-form input[type="date"], .copy input, .share input, .picker input {
  width: 100%; min-width: 0; min-height: 52px; padding: 12px 14px;
  border: 2px solid var(--ink); border-radius: 0;
  background: var(--wash); color: var(--ink);
  font: inherit; -webkit-appearance: none; appearance: none;
}
.field textarea { resize: vertical; }
.field ::placeholder { color: var(--ink-soft); opacity: 1; }

.field--wrong input, .field--wrong textarea { border-color: var(--red); }
.field__error { color: var(--red); font-weight: 600; }

/* Who plays: faces first. Initials in the ink, until there are photos. */

.avatar {
  display: inline-grid; place-items: center; flex: none;
  width: 52px; height: 52px; border-radius: 50%;
  background: var(--ink); color: var(--paper);
  font-size: 1.4rem; font-weight: 800; font-stretch: 75%; line-height: 1;
}
.avatar--small { width: 30px; height: 30px; font-size: 0.85rem; }
img.avatar { object-fit: cover; }
.avatar--add { background: none; color: var(--ink); box-shadow: inset 0 0 0 2px var(--ink); font-stretch: 100%; font-weight: 400; font-size: 1.6rem; }
.avatar--more { background: var(--surface, var(--paper)); color: var(--ink); box-shadow: inset 0 0 0 2px var(--ink); font-stretch: 100%; font-size: 0.75rem; }

/* A few faces overlapping, for a row in a list. */
.stack { display: flex; margin-top: 8px; }
.stack .avatar { outline: 2px solid var(--surface, var(--paper)); }
.stack .avatar + .avatar { margin-left: -6px; }
.next { --surface: var(--yellow); }
.next .stack { margin-top: 14px; }

.who { margin-top: 22px; }
.who__name { font-size: 1rem; font-weight: 700; }

/* The row runs off the edge of the screen and scrolls sideways when the group is big. */
.who__row {
  display: flex; gap: 4px;
  margin: 0 calc(var(--gutter) * -1); padding: 10px var(--gutter) 2px;
  overflow-x: auto; scrollbar-width: none; text-decoration: none;
}
.who__row::-webkit-scrollbar { display: none; }
.who__person { display: grid; justify-items: center; align-content: start; gap: 4px; flex: none; width: 52px; }
.who__first { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.75rem; font-weight: 600; }


.people { margin: 0; padding: 0; list-style: none; }
.people--editing { margin-top: 28px; border-top: 3px solid var(--ink); }

.person {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  min-height: 52px; padding: 4px 0;
  border-bottom: 1px solid var(--ink);
}
.person__name { min-width: 0; font-size: 1.1rem; font-weight: 700; line-height: 1.25; }
.person form { display: contents; }
.person__who { display: flex; align-items: center; gap: 12px; min-width: 0; }
a.person { text-decoration: none; }

/* A second input that belongs to the field above it: no label, only there when asked for. */
.subfield summary {
  display: inline-block; padding: 4px 0;
  font-weight: 600; text-decoration: underline; text-underline-offset: 3px;
  cursor: pointer; list-style: none;
}
.subfield summary::-webkit-details-marker { display: none; }
.subfield summary::before { content: "+ "; }
.subfield[open] summary { display: none; }
.subfield .field__error { margin-top: 6px; }
.password-change { margin: 8px 0 4px; gap: 16px; }
.subfield--alone { margin-top: -10px; }
.subfield--alone[open] { margin-top: -6px; }
.conversation { text-decoration-thickness: 2px; text-underline-offset: 3px; }
.field [aria-invalid="true"] { border-color: var(--red); }

/* Money */

/* One line: the fee, then the two figures after it, lighter. They wrap under it on a narrow phone. */
.money-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 18px; text-decoration: none; }
.money-row__fee { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 2px; }
.money-row__side { color: var(--ink-soft); font-size: 0.95rem; font-weight: 400; }

/* What is in hand is the screen's one loud thing. */
.in-hand { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 20px calc(var(--gutter) * -1) 0; padding: 18px var(--gutter) 20px; background: var(--yellow); }
.in-hand__amount { font-size: clamp(2.4rem, 12.5vw, 4rem); font-weight: 800; font-stretch: 75%; line-height: 0.9; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.in-hand__amount--none { color: var(--ink-soft); }
.in-hand__label { margin-top: 6px; font-weight: 600; line-height: 1.25; }

.fee { margin-top: 20px; border-top: 3px solid var(--ink); border-bottom: 1px solid var(--ink); }
.fee summary { display: flex; align-items: baseline; gap: 12px; padding: 12px 0; cursor: pointer; list-style: none; }
.fee summary::-webkit-details-marker { display: none; }
.fee__label { color: var(--ink-soft); }
.fee__amount { flex: 1; font-size: 1.15rem; font-weight: 700; }
.fee__change { font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.fee[open] .fee__change { display: none; }
.fee__to-come { margin-top: 10px; color: var(--ink-soft); }

.inline-form { display: flex; gap: 8px; padding-bottom: 14px; }
.inline-form input[type="text"], .inline-form input[type="date"], .copy input { flex: 1; }
.inline-form .button { min-height: 52px; }

.ledger { margin-top: 44px; }
.ledger__add { border-bottom: 3px solid var(--ink); }
.add-movement { border-bottom: 1px solid var(--ink); }
.add-movement:last-child { border-bottom: 0; }
.add-movement summary { padding: 14px 0; font-weight: 700; cursor: pointer; list-style: none; }
.add-movement summary::-webkit-details-marker { display: none; }
.add-movement summary::before { content: "+ "; }
.add-movement[open] summary::before { content: "− "; }
.add-movement .quiet { margin: 0 0 16px; }
.form--tight { margin: 0 0 18px; gap: 14px; }

.shares { margin: 0; padding: 0; list-style: none; }
.share { display: grid; grid-template-columns: 1fr 120px; align-items: center; gap: 12px; padding: 6px 0; }
.share__who { display: flex; align-items: center; gap: 10px; min-width: 0; cursor: pointer; }
.share input { min-height: 48px; padding: 10px 12px; text-align: right; font-variant-numeric: tabular-nums; }
.shares__left { color: var(--ink-soft); text-align: right; font-variant-numeric: tabular-nums; }
.shares__left--over { color: var(--red); font-weight: 600; }
.share input[aria-invalid="true"] { border-color: var(--red); }
.button:disabled { opacity: 0.35; cursor: default; }

.share ::placeholder { color: var(--ink-soft); opacity: 1; }

.movements { margin: 0; padding: 0; list-style: none; }
.movement { display: grid; grid-template-columns: 1fr auto 44px; align-items: center; gap: 8px; min-height: 60px; padding: 8px 0; border-bottom: 1px solid var(--ink); }
.movement__what { display: flex; align-items: center; gap: 10px; min-width: 0; }
.movement__name, .movement__date, .movement__amount, .movement__in-hand { display: block; }
.movement__name { font-weight: 700; line-height: 1.25; }
.movement__date, .movement__in-hand { color: var(--ink-soft); font-size: 0.85rem; }
.movement__money { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.movement__amount { font-weight: 700; }
.movement__amount--out { color: var(--ink-soft); }
.movement form { display: contents; }

/* Settings, always there. On a phone it sits in the top bar, so nothing floats over the page;
   on a wide screen it is fixed in the bottom-left corner. Light until hovered. */
/* As tall as a button whether or not the page has one, so the wordmark sits at the same height on every page. */
.top__right { display: flex; align-items: center; gap: 12px; min-height: 48px; }
.corner {
  display: grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: 50%;
  background: var(--paper); color: var(--ink-soft); box-shadow: inset 0 0 0 2px currentColor;
  transition: color 0.15s;
}
.corner:focus-visible { color: var(--ink); }
@media (hover: hover) and (pointer: fine) { .corner:hover { color: var(--ink); } }
.corner[aria-current="page"] { background: var(--ink); color: var(--paper); box-shadow: none; }
.corner svg { width: 18px; height: 18px; }
@media (min-width: 760px) {
  /* In the window's corner, up to a laptop's width (1512px). On a wider screen it
     stays where it was there, instead of drifting ever further from the page. */
  .corner { position: fixed; z-index: 20; bottom: 16px; left: max(16px, calc(50vw - 756px + 16px)); }
}
@media print { .corner { display: none; } }

/* The way in (sign in, set up, join): a narrow column, in the middle of the screen. */
.page--door { display: flex; flex-direction: column; justify-content: center; max-width: 400px; min-height: calc(100svh - 150px); padding-bottom: 96px; }
.page--door .title { font-size: 2.5rem; }
.page--door .quiet { margin-top: 20px; }

/* Setting up, one question at a time. Without JavaScript the questions simply follow each other. */
.steps { display: grid; gap: 48px; }
.steps--one-at-a-time { gap: 0; }
.steps__count:empty { display: none; }
.steps .steps__count { margin: 0 0 12px; font-variant-numeric: tabular-nums; }
.question .field { margin-top: 24px; }
.question__actions { display: flex; align-items: center; gap: 24px; margin-top: 24px; }
.question__actions .link-button { display: inline-flex; align-items: center; min-height: 44px; color: var(--ink-soft); }
.steps--one-at-a-time .question:not([hidden]) { animation: step-in 0.2s cubic-bezier(0.2, 0, 0, 1); }
@keyframes step-in { from { opacity: 0; transform: translateY(8px); } }
@media (prefers-reduced-motion: reduce) {
  .steps--one-at-a-time .question:not([hidden]) { animation-name: step-fade; }
  @keyframes step-fade { from { opacity: 0; } }
}

/* Settings: a sidebar beside the section; on a phone, a row of links above it. */

/* A wide page starts where every page's column starts, so nothing jumps sideways going
   from one page to another; the extra room goes to the right. */
.page--wide, .top--wide {
  --left: max(0px, (100% - var(--column)) / 2);
  max-width: none;
  width: min(920px, 100% - var(--left));
  margin-left: var(--left);
  margin-right: 0;
}
.settings { margin-top: 20px; }
/* The phone's menu: a plain list, your profile first, then what is the group's under its heading. */
.settings__nav { display: flex; flex-direction: column; border-top: 3px solid var(--ink); }
.settings__nav a {
  display: flex; align-items: center; justify-content: space-between; min-height: 56px;
  border-bottom: 1px solid var(--ink);
  font-size: 1.15rem; font-weight: 700; text-decoration: none;
}
.settings__nav a::after { content: "›"; color: var(--ink-soft); font-weight: 400; }
.settings__label { margin-top: 32px; padding-bottom: 10px; border-bottom: 3px solid var(--ink); font-size: 1.5rem; font-weight: 800; font-stretch: 75%; line-height: 1; }
.settings__body .setting .actions .button { margin-top: 0; }
.sign-out { margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--ink); }
.settings__body .sign-out .button { margin-top: 0; }
.back--phone { display: none; }
@media (max-width: 759px) {
  .settings--menu .settings__body, .settings:not(.settings--menu) .settings__nav, .back--wide { display: none; }
  .back--phone { display: block; }
  .settings__title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .settings:not(.settings--menu) { margin-top: 0; }
  .settings:not(.settings--menu) .settings__body { margin-top: 0; }
}
.settings__body { margin-top: 28px; }
.settings__body .button { margin-top: 20px; }

.setting--first { margin-top: 24px; }
.setting .quiet { margin-top: 12px; }
.setting .actions + .subfield { margin-top: 12px; }
/* The photo has a form of its own, outside the one it sits above: it keeps the same distance. */
.photo-field--alone { margin-top: 24px; }
.facts--plain { margin: 0; }
/* Longer labels (Language, Contact) need a wider first column. */
.facts--plain > div, .facts--roomy > div { grid-template-columns: 96px 1fr; }
.facts__more { margin-left: 10px; color: var(--ink-soft); font-size: 0.9rem; font-weight: 400; }
.facts__text p { font-size: 1rem; font-weight: 400; }
/* The one signed in, among the others. */
.person--me { margin: 0 -10px; padding-left: 10px; padding-right: 10px; background: var(--wash); }
.person__you { margin-left: 2px; padding: 1px 8px; box-shadow: inset 0 0 0 2px var(--ink); font-size: 0.75rem; font-weight: 700; }

.person__hint { flex: none; color: var(--ink-soft); font-size: 0.85rem; }
.amount { flex: none; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }

.lone-link { margin-top: 28px; }
.lone-link form, .valid-until form { display: contents; }
.lone-link .link-button { font-weight: 600; text-underline-offset: 3px; }
.valid-until { display: flex; align-items: center; gap: 16px; }
.valid-until .field--short { margin-top: 14px; }
.valid-until .link-button, .photo-field__row .link-button, .lone-link .link-button { display: inline-flex; align-items: center; min-height: 44px; }
.valid-until .link-button { margin-top: 14px; color: var(--ink-soft); font-size: 0.9rem; }
.lone-action { display: flex; justify-content: center; margin-top: 28px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.actions form { display: contents; }
.actions .button { margin-top: 0; }

/* A link to copy and paste somewhere else. */
.copy { display: flex; gap: 8px; margin-top: 14px; }
.copy input { min-height: 48px; padding: 10px 12px; }
.copy .button { margin-top: 0; }

/* Requests */

.requests { margin: 0; padding: 0; list-style: none; }
.requests--ruled { border-top: 3px solid var(--ink); }
.request-group + .request-group { margin-top: 40px; }
.request-group .quiet { margin-top: 14px; }
.request {
  display: grid; grid-template-columns: 64px 1fr auto; align-items: center; gap: 4px 8px;
  min-height: 68px; padding: 12px 0; border-bottom: 1px solid var(--ink);
  text-decoration: none;
}
.request__date { display: flex; flex-direction: column; }
.request__day { font-size: 2.75rem; font-weight: 800; font-stretch: 75%; line-height: 0.9; letter-spacing: -0.03em; }
.request__day--none { color: var(--ink-soft); }
.request__month { color: var(--ink-soft); font-size: 0.9rem; font-weight: 600; }
.request__body { display: flex; flex-direction: column; min-width: 0; }
.request__name { font-size: 1.15rem; font-weight: 700; line-height: 1.25; }
.request__facts { color: var(--ink-soft); }
/* Another open request wants the same day. */
.request--shared { margin: 0 -10px; padding-left: 10px; padding-right: 10px; background: var(--wash); }
.request__shared { font-size: 0.9rem; font-weight: 600; }
/* The day is already taken: loud. */
.clash.clash--loud, .request-form .clash { background: var(--red); color: var(--paper); }
.request-form .clash { margin-top: 10px; }

/* A new request starts with its day, and what that day already holds. */
.day-first { margin-top: 28px; }
.day-first label { font-size: 1.5rem; font-weight: 800; font-stretch: 75%; line-height: 1.1; }
.day-check { margin-top: 20px; }
.day-check__day { font-size: 1.25rem; font-weight: 700; }
.day-check__day::first-letter { text-transform: uppercase; }
.day-check__change { display: inline-flex; align-items: center; min-height: 44px; margin-left: 10px; font-size: 0.9rem; font-weight: 600; text-underline-offset: 3px; }
.day-check__free { margin-top: 8px; color: var(--ink-soft); }
.day-check .clash { margin-top: 12px; }

/* Where a request stands. */
.step { justify-self: end; max-width: 130px; padding: 4px 10px; box-shadow: inset 0 0 0 2px var(--ink); font-size: 0.85rem; font-weight: 600; line-height: 1.25; text-align: center; }

.clash { margin-top: 16px; padding: 10px 14px; background: var(--wash); font-weight: 600; }
.clash:empty { display: none; }

/* How a request ends: declining opens its reason under the two buttons. */
.decline { margin: 16px 0 0; }
.button--quiet[aria-expanded="true"] { background: var(--ink); color: var(--paper); }

/* Choices as chips, instead of a dropdown. */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; border: 0; }
.chips legend { padding: 0 0 6px; font-weight: 700; }
.chip { cursor: pointer; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; box-shadow: inset 0 0 0 2px var(--ink); font-weight: 600; }
.chip input:checked + span { background: var(--ink); color: var(--paper); }
.chip input:focus-visible + span { outline: 3px solid var(--ink); outline-offset: 3px; }
.chips--via { display: none; }
.request-form:has(input[name="request[source]"][value="member"]:checked) .chips--via { display: flex; }

/* Yes or no. */
.yn { display: flex; gap: 6px; flex: none; }
.yn form { display: contents; }
.yn__one {
  min-width: 52px; min-height: 44px; padding: 0 12px;
  border: 2px solid var(--ink); border-radius: 999px;
  background: var(--paper); color: var(--ink);
  font: inherit; font-weight: 600; cursor: pointer;
}
.yn__one--on { background: var(--ink); color: var(--paper); }

/* Asked on the home: can you play that day? */
.asks { margin: 0 0 24px; padding: 14px 16px 6px; box-shadow: inset 0 0 0 3px var(--ink); }
.asks__name { font-size: 1.25rem; font-weight: 800; font-stretch: 75%; line-height: 1; }
.asks ul { margin: 8px 0 0; }
.ask { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--ink); }
.ask__what { display: flex; flex-direction: column; flex: 1; min-width: 0; text-decoration: none; }
.ask__what .ask__date { text-decoration: underline; text-underline-offset: 3px; }
.ask__date { font-weight: 700; }
.ask__facts { color: var(--ink-soft); font-size: 0.9rem; }

/* Building a quote */

.options { margin: 0; padding: 0; list-style: none; }
.line { display: grid; grid-template-columns: 1fr auto 44px 44px; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--ink); }
.line form { display: contents; }
.line__body { display: flex; flex-direction: column; min-width: 0; }
.line__title { font-weight: 700; line-height: 1.25; }
.line__description { color: var(--ink-soft); font-size: 0.9rem; }
.working { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-top: 14px; padding: 10px 0; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); font-variant-numeric: tabular-nums; }
.working span { color: var(--ink-soft); }

/* Which option they went for. */

.choice { margin: 0; padding: 10px 14px 2px; border: 2px solid var(--ink); }
.choice legend { padding: 0 6px; margin-left: -6px; color: var(--ink-soft); font-size: 0.9rem; font-weight: 600; }
.choice__line { display: flex; align-items: flex-start; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--ink); cursor: pointer; }
.choice__line:last-child { border-bottom: 0; }
.choice__line input[type="radio"] { flex: none; width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--ink); }
.choice__body { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.choice__title { font-size: 1.1rem; font-weight: 700; line-height: 1.25; }

/* A box to tick. */
.field--short { max-width: 220px; margin-top: 14px; }
.setting .tick { margin-top: 18px; }
.tick { display: flex; align-items: center; gap: 10px; font-weight: 600; cursor: pointer; }
.tick input { flex: none; width: 22px; height: 22px; margin: 0; accent-color: var(--ink); }

.thumb { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; vertical-align: middle; }
/* A photo that is its own input. */
.photo-field__label { font-weight: 700; }
.photo-field__row { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 112px; }
.photo-field__row .link-button { color: var(--ink-soft); font-size: 0.85rem; }
.photo-input { position: relative; display: block; width: 112px; height: 112px; border-radius: 50%; overflow: hidden; cursor: pointer; }
.photo-input img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-input__add, .photo-input__change { position: absolute; inset: 0; display: grid; place-items: center; font-weight: 600; text-align: center; }
.photo-input__add { display: none; box-shadow: inset 0 0 0 2px var(--ink); border-radius: 50%; background: var(--wash); }
.photo-input--empty .photo-input__add { display: grid; }
.photo-input__change { background: rgb(34 48 107 / 0.72); color: var(--paper); opacity: 0; transition: opacity 0.15s; }
.photo-input:hover .photo-input__change, .photo-input:focus-within .photo-input__change { opacity: 1; }
.photo-input--empty .photo-input__change { display: none; }
.photo-input:focus-within { outline: 3px solid var(--ink); outline-offset: 3px; }
/* No hover on a phone: say it under the photo instead. */
@media (hover: none) {
  .photo-input { overflow: visible; }
  .photo-input img { border-radius: 50%; }
  .photo-input__change { inset: auto 0 -26px; background: none; color: var(--ink); opacity: 1; text-decoration: underline; font-size: 0.9rem; }
  .photo-field__row { gap: 30px; }
}

.swatch { display: inline-block; width: 18px; height: 18px; margin-right: 8px; border-radius: 50%; vertical-align: -3px; box-shadow: inset 0 0 0 1px rgb(0 0 0 / 0.2); }
.field input[type="color"] { width: 96px; padding: 4px; }
.field input[type="file"] { padding: 10px; }

/* The quote as the customer sees it: Lasi's look, the group's photo, name and words. */


/* The group's colour does the highlighting: the head, under each price, the total, the contacts.
   On a dark colour, what sits on it turns white. */
.letter--dark-accent .letter__head, .letter--dark-accent .letter__contact { color: var(--paper); }

.public .page { padding-top: 0; }
.letter__head { margin: 0 calc(var(--gutter) * -1) 26px; padding: 22px var(--gutter); background: var(--yellow); }
.letter__who { display: flex; align-items: center; gap: 16px; }
.letter__photo { flex: none; width: 96px; height: 96px; border-radius: 50%; object-fit: cover; }
.letter__name { margin: 0; flex: 1; min-width: 0; font-size: clamp(2.4rem, 11vw, 3.4rem); font-weight: 800; font-stretch: 75%; line-height: 0.95; letter-spacing: -0.01em; text-wrap: balance; }
.letter__for { margin-top: 16px; font-size: 1.15rem; font-weight: 700; }

.letter__intro { margin-top: 6px; }
.letter__intro p + p, .letter__notes p + p { margin-top: 0.9em; }
.letter__facts { margin-top: 26px; border-top: 3px solid var(--ink); }
.letter__facts > div { grid-template-columns: 96px 1fr; }

/* An option: its price loudest, as a date is on an event. */
.offer { margin-top: 30px; padding-bottom: 22px; border-bottom: 1px solid var(--ink); }
.offer__price { display: inline-block; padding-bottom: 8px; background: linear-gradient(var(--yellow), var(--yellow)) left bottom / 100% 6px no-repeat; font-size: clamp(3.6rem, 19vw, 5rem); font-weight: 800; font-stretch: 75%; line-height: 0.9; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.offer__title { margin-top: 12px; font-size: 1.25rem; font-weight: 700; line-height: 1.25; }
.offer__includes { margin-top: 10px; color: var(--ink-soft); font-size: 0.95rem; font-weight: 600; }
.includes { margin: 4px 0 0; padding-left: 1.2em; list-style: disc; }
.includes li { padding: 2px 0; }

.letter__foot { margin-top: 32px; display: grid; gap: 14px; }
.letter__notes { color: var(--ink-soft); }
.letter__contact { margin: 6px calc(var(--gutter) * -1) 0; padding: 18px var(--gutter); background: var(--yellow); font-style: normal; font-weight: 600; overflow-wrap: anywhere; }
.letter__contact p { margin: 0; line-height: 1.7; }

@media print {
  .public .page { max-width: none; padding: 0; }
  .letter__head, .letter__contact, .offer__price { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .letter__head, .letter__contact { margin-left: 0; margin-right: 0; }
  body.public { font-size: 11pt; }
  .offer { break-inside: avoid; }
}

@media (min-width: 760px) {
  .settings { display: grid; grid-template-columns: 180px 1fr; gap: 48px; align-items: start; margin-top: 28px; }
  .settings__nav { gap: 2px; border-top: 0; }
  .settings__nav a { min-height: 0; padding: 8px 12px; border-bottom: 0; border-left: 3px solid transparent; color: var(--ink-soft); font-size: 1rem; font-weight: 600; }
  .settings__nav a::after { content: none; }
  .settings__nav a[aria-current="page"] { border-left-color: var(--ink); color: var(--ink); }
  .settings__label { margin: 18px 0 4px; padding: 0 0 0 15px; border-bottom: 0; color: var(--ink-soft); font-size: 0.8rem; font-weight: 700; font-stretch: 100%; }
  .settings__body { margin-top: 0; }
}

@media (min-width: 700px) {
  .letter__head, .letter__contact { margin-left: 0; margin-right: 0; padding-left: 28px; padding-right: 28px; }
  .public .page { padding-top: 28px; }
  .in-hand { margin-left: 0; margin-right: 0; padding: 24px 32px; }
  .top { padding-top: 28px; padding-bottom: 28px; }
  .next { margin: 0; padding: 32px; }
}

/* The setlist */

.button--quiet {
  background: none; color: var(--ink);
  box-shadow: inset 0 0 0 2px var(--ink);
}

.alert {
  margin-bottom: 16px; padding: 12px 16px;
  background: var(--red); color: var(--paper);
  font-weight: 600;
}

.setlist, .setting, .checklist { margin-top: 44px; }
.setlist .button, .setting .button, .checklist .button { margin-top: 20px; }

/* The checklist: a row to tap, a box that fills when it is done. */
.ticks { margin: 0; padding: 0; list-style: none; }
.ticks form { display: contents; }
.tick-row {
  display: flex; align-items: center; gap: 14px; width: 100%; min-height: 52px; padding: 8px 0;
  border: 0; border-bottom: 1px solid var(--ink); border-radius: 0; background: none; color: var(--ink);
  font: inherit; font-size: 1.1rem; font-weight: 700; text-align: left; cursor: pointer;
}
.tick-row__box { display: grid; place-items: center; flex: none; width: 26px; height: 26px; box-shadow: inset 0 0 0 2px var(--ink); font-size: 1rem; line-height: 1; }
.tick-row--done .tick-row__box, .tick-row__box--done { background: var(--ink); color: var(--paper); }
.tick-row--done .tick-row__title { color: var(--ink-soft); font-weight: 400; text-decoration: line-through; }
.checklist .quiet { margin-top: 12px; }

/* Progress, the way Things shows a project: a ring, and a slice inside it that grows with each tick. */
.checklist__name { display: flex; align-items: center; gap: 10px; }
.progress {
  display: grid; place-items: center; flex: none; width: 24px; height: 24px; padding: 4px;
  border-radius: 50%; box-shadow: inset 0 0 0 2px var(--ink);
  background: conic-gradient(var(--ink) calc(var(--done) * 1turn), transparent 0) content-box;
}
.progress--done { padding: 0; background: var(--ink); color: var(--paper); }

.add-row { display: flex; gap: 8px; }
.add-row input[type="text"] { flex: 1; min-width: 0; min-height: 52px; padding: 12px 14px; border: 2px solid var(--ink); border-radius: 0; background: var(--wash); color: var(--ink); font: inherit; -webkit-appearance: none; appearance: none; }
.add-row ::placeholder { color: var(--ink-soft); opacity: 1; }
.add-row .button { min-height: 52px; margin-top: 0; }

/* The group's usual checklist, in Settings: the event's rows with empty boxes, and arrows to order them. */
.usual { margin: 24px 0 0; padding: 0; list-style: none; border-top: 3px solid var(--ink); }
.usual__item { display: flex; align-items: center; gap: 14px; min-height: 52px; padding: 8px 0; border-bottom: 1px solid var(--ink); }
.usual__title { flex: 1; min-width: 0; font-size: 1.1rem; font-weight: 700; line-height: 1.25; }
.usual__moves { display: flex; gap: 6px; }
.usual__moves form { display: contents; }

.section-name {
  font-size: 1.5rem; font-weight: 800; font-stretch: 75%; line-height: 1; letter-spacing: -0.01em;
  padding-bottom: 10px; border-bottom: 3px solid var(--ink);
}

.songs { margin: 0; padding: 0; list-style: none; }

.song {
  display: grid; grid-template-columns: 40px 1fr auto; align-items: center; gap: 4px;
  min-height: 52px; padding: 8px 0;
  border-bottom: 1px solid var(--ink);
}
.song__number {
  color: var(--ink-soft);
  font-size: 1.5rem; font-weight: 800; font-stretch: 75%; line-height: 1;
  font-variant-numeric: tabular-nums;
}
.song__title { min-width: 0; font-size: 1.1rem; font-weight: 700; line-height: 1.25; }

.songs--editing { margin-top: 28px; border-top: 3px solid var(--ink); }
.song__moves { display: flex; gap: 6px; }
.song__moves form { display: contents; }

.move {
  width: 44px; height: 44px; padding: 0;
  border: 2px solid var(--ink); border-radius: 0;
  background: var(--paper); color: var(--ink);
  font: inherit; font-size: 1.25rem; font-weight: 700; line-height: 1;
  cursor: pointer;
}
.move:disabled { opacity: 0.25; cursor: default; }
.move--out { border-color: transparent; color: var(--red); font-size: 1.6rem; }

.picker-form { display: grid; gap: 6px; margin-top: 24px; }
.picker-form label { font-weight: 700; }

/* The picker: type to search one of the group's lists, or create what isn't there. */

.picker { position: relative; }

.picker ::placeholder { color: var(--ink-soft); opacity: 1; }

.picker__panel {
  position: absolute; z-index: 10; top: 100%; left: 0; right: 0;
  max-height: min(50vh, 340px); overflow-y: auto; overscroll-behavior: contain;
  border: 2px solid var(--ink); border-top: 0;
  background: var(--paper);
}

.picker__option {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  width: 100%; min-height: 48px; padding: 10px 14px;
  border: 0; border-bottom: 1px solid var(--ink); border-radius: 0;
  background: none; color: var(--ink);
  font: inherit; font-weight: 700; text-align: left;
  cursor: pointer;
}
.picker__option:last-child { border-bottom: 0; }
.picker__option.is-active { background: var(--yellow); }
.picker__option:disabled { color: var(--ink-soft); font-weight: 400; cursor: default; }
.picker__option--create::before { content: "+"; margin-right: 10px; font-size: 1.3rem; line-height: 1; }
.picker__option--create { justify-content: flex-start; gap: 0; }
.picker__taken { flex: none; font-size: 0.85rem; }

.picker__none { padding: 12px 14px; color: var(--ink-soft); }

.picker__heading {
  padding: 6px 14px; border-bottom: 1px solid var(--ink);
  background: var(--wash); color: var(--ink-soft);
  font-size: 0.85rem; font-weight: 600;
}

/* Lists put in order by hand. The handle is the row's grip: drag it, or focus it and use the arrow keys. */
.grip {
  display: grid; place-items: center; flex: none; width: 44px; height: 44px; padding: 0;
  border: 0; background: none; color: var(--ink-soft);
  cursor: grab; touch-action: none;
}
@media (hover: hover) and (pointer: fine) { .grip:hover { color: var(--ink); } }
[data-sortable-target~="item"] { transition: transform 0.15s cubic-bezier(0.2, 0, 0, 1); }
/* The row in hand lifts off the page: the one place a shadow is allowed, and only while it is held. */
.is-dragging { position: relative; z-index: 1; background: var(--paper); box-shadow: 0 8px 20px rgb(34 48 107 / 0.18); transition: none; }
.is-sorting, .is-sorting * { cursor: grabbing; user-select: none; -webkit-user-select: none; }
.is-settling [data-sortable-target~="item"] { transition: none; }
@media (prefers-reduced-motion: reduce) {
  [data-sortable-target~="item"] { transition: none; }
}

/* The group's public form for new requests: the group's head, as on its quotes, then the form. */
.asking__title { margin-top: 8px; font-size: clamp(2.2rem, 10vw, 3rem); font-weight: 800; font-stretch: 75%; line-height: 1; letter-spacing: -0.01em; text-wrap: balance; }
.asking__intro { max-width: 34em; margin-top: 14px; }
.asking__intro a { text-underline-offset: 3px; }
.asking__form { margin-top: 28px; padding-top: 24px; border-top: 3px solid var(--ink); }
/* Off the page, not display: none, which some bots know to skip. */
.asking__trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.lexxy-content { --lexxy-text-size: 17px; color: inherit; }

/* The rich text editor in Lasi's inks: square, a 2px ink edge like every field, the wash inside. */
lexxy-editor {
  --lexxy-color-ink: var(--ink);
  --lexxy-color-ink-medium: var(--ink-soft);
  --lexxy-color-ink-light: var(--ink-soft);
  --lexxy-color-ink-lighter: var(--ink);
  --lexxy-color-accent-dark: var(--ink);
  --lexxy-radius: 0;
  --lexxy-text-size: 17px;
  border-width: 2px;
  border-radius: 0;
  background: var(--wash);
  font-family: inherit;
}
/* Lists keep their bullets and numbers in rich text, which the page's own lists drop. */
.lexxy-content ul, lexxy-editor ul { padding-left: 1.3em; list-style: disc; }
.lexxy-content ol, lexxy-editor ol { padding-left: 1.3em; list-style: decimal; }
.lexxy-content p + p, .lexxy-content p + ul, .lexxy-content ul + p { margin-top: 0.8em; }

/* Sent: the envelope lands, the group's circle comes up behind it, then the two notes rise out.
   Played once, on arrival; the drawing's resting state is its end. */
.sent-art { display: block; width: 200px; max-width: 60%; height: auto; margin: 12px 0 8px; color: var(--ink); overflow: visible; }
.sent-art__envelope, .sent-art__sun, .sent-art__notes { transform-box: fill-box; transform-origin: center; }
.sent-art__envelope { animation: sent-land 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) both; }
.sent-art__sun { animation: sent-rise 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) 0.35s both; }
.sent-art__notes { animation: sent-notes 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.6s both; }

@keyframes sent-land { from { opacity: 0; transform: translateY(40px) rotate(-6deg); } }
@keyframes sent-rise { from { opacity: 0; transform: scale(0.4); } }
@keyframes sent-notes { from { opacity: 0; transform: translateY(26px) scale(0.9); } }

/* Gentler, not gone: the drawing fades in, nothing moves. */
@media (prefers-reduced-motion: reduce) {
  .sent-art__envelope, .sent-art__sun, .sent-art__notes { animation-name: sent-fade; animation-duration: 0.4s; }
  @keyframes sent-fade { from { opacity: 0; } }
}
.asking--sent .sent-art { margin: 40px auto 12px; }
.asking--sent .asking__title, .asking--sent .asking__intro { margin-inline: auto; text-align: center; }

/* Editing the request form: its fields as the checklist's rows, a box to keep each one, a handle to order them. */
.form-fields { min-width: 0; margin: 0; padding: 0; border: 0; }
.form-fields legend { padding: 0; font-weight: 700; }
.form-fields .usual { margin-top: 12px; }
.form-fields__tick { flex: 1; min-width: 0; min-height: 44px; }
.form-fields__tick input:disabled { opacity: 0.5; }
.review-actions { margin: 16px 0 4px; }
