@font-face{font-family:'Inter';font-style:normal;font-display:swap;font-weight:400;src:url(/assets/inter-latin-ext-400-normal.6744a7f509eb.woff2) format('woff2');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:400;src:url(/assets/inter-latin-400-normal.8909904ab6c8.woff2) format('woff2');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;}
@font-face{font-family:'Inter';font-style:normal;font-display:swap;font-weight:500;src:url(/assets/inter-latin-ext-500-normal.2c6fbc42d315.woff2) format('woff2');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:500;src:url(/assets/inter-latin-500-normal.f3779f1efccc.woff2) format('woff2');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;}
@font-face{font-family:'Inter';font-style:normal;font-display:swap;font-weight:600;src:url(/assets/inter-latin-ext-600-normal.e4bdf67b0cd1.woff2) format('woff2');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:600;src:url(/assets/inter-latin-600-normal.f9a06e79cd3a.woff2) format('woff2');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;}
@font-face{font-family:'Inter';font-style:normal;font-display:swap;font-weight:700;src:url(/assets/inter-latin-ext-700-normal.143f9504f137.woff2) format('woff2');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:700;src:url(/assets/inter-latin-700-normal.6f56409fd3d6.woff2) format('woff2');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;}
@font-face{font-family:'Lora';font-style:normal;font-display:swap;font-weight:500;src:url(/assets/lora-latin-ext-500-normal.ce50dfd05dfd.woff2) format('woff2');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:'Lora';font-style:normal;font-display:swap;font-weight:500;src:url(/assets/lora-latin-500-normal.03bcdff46fdc.woff2) format('woff2');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;}
@font-face{font-family:'Lora';font-style:normal;font-display:swap;font-weight:700;src:url(/assets/lora-latin-ext-700-normal.eacd7ecd09a1.woff2) format('woff2');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:'Lora';font-style:normal;font-display:swap;font-weight:700;src:url(/assets/lora-latin-700-normal.c05fd5289492.woff2) format('woff2');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;}
/* Diminuendo site stylesheet. Hand-written, no framework.
   Colours and type follow the Flutter app's lib/core/theme.dart:
   light #1565c0 / #d1e4ff / #fafafa / #1c1b1f, dark #1a1a2e / #16213e / #f5f5f5,
   headings in Lora, text in Inter. The light tint is a shade lighter than the
   app's (#d8e8ff) so that accent-coloured text on it reaches 4.5:1. The dark
   accent is the light accent's own blue, lightened: the brand keeps one hue
   in both schemes.
   Phone first; the layout widens at 768px. */

:root {
  color-scheme: light dark;
  --background: #fafafa;
  --surface: #fff;
  --text: #1c1b1f;
  --muted: #49454f;
  --accent: #1565c0;
  --tint: #d8e8ff;
  --border: #546e7a;
  --on-accent: #fff;
  --danger: #b3261e;
  --ok: #1b5e20;
}
@media (prefers-color-scheme: dark) {
  :root {
    --background: #1a1a2e;
    --surface: #16213e;
    --text: #f5f5f5;
    --muted: #c9c5d0;
    --accent: #9ecaff;
    --tint: #24345c;
    --border: #8b9eb8;
    --on-accent: #1a1a2e;
    --danger: #ffb4ab;
    --ok: #a5d6a7;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--background); color: var(--text); font: 1rem/1.6 Inter, system-ui, sans-serif; min-height: 100dvh; }
a { color: var(--accent); text-underline-offset: .2em; }
a:active { opacity: .75; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
h1, h2, h3 { font-family: Lora, Georgia, serif; line-height: 1.25; overflow-wrap: anywhere; }
h1 { font-size: 1.75rem; font-weight: 700; margin: 0 0 20px; }
h2 { font-size: 1.25rem; font-weight: 500; margin: 32px 0 12px; }
h3 { font-size: 1.05rem; font-weight: 500; margin: 20px 0 8px; }
p { margin: 0 0 16px; }

/* Header */
/* On a phone the header is one row: the brand, the choir and the way to the
   account. Language and sign-out join it on a wide screen (.wide-only); a
   phone has them on the account and "more" pages. */
header { padding: 4px 8px 4px 16px; display: flex; align-items: center; gap: 4px 12px; border-bottom: 1px solid var(--border); }
.brand { font: 700 1.4rem Lora, Georgia, serif; text-decoration: none; color: var(--text); display: inline-flex; align-items: center; min-height: 44px; flex: none; }
.choir { font-size: .9375rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 0 1 auto; min-width: 0; }
.session { display: flex; align-items: center; justify-content: flex-end; gap: 4px 12px; margin-left: auto; flex: none; }
.languages { display: flex; gap: 4px; margin: 0; }
.languages a, .languages button, footer a { display: inline-flex; align-items: center; min-height: 44px; padding: 8px; }
.logout { display: flex; align-items: center; gap: 8px; margin: 0; }
.wide-only { display: none; }
.who { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 44px; min-height: 44px; padding: 0 6px; border-radius: 8px; font-size: .875rem; text-decoration: none; }
.who-name { display: none; max-width: 20ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-decoration: underline; text-underline-offset: .2em; }
.icon { flex: none; }
[aria-current] { font-weight: 700; text-decoration-thickness: 3px; }

/* Layout and main navigation: bottom bar on a phone, sidebar when wide. */
main { padding: 24px 16px; max-width: 70ch; overflow-wrap: anywhere; }
.body.wide main { max-width: none; }
footer { padding: 0 8px calc(88px + env(safe-area-inset-bottom)); }
.primary { position: fixed; z-index: 10; bottom: 0; left: 0; right: 0; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); background: var(--surface); border-top: 1px solid var(--border); padding-bottom: env(safe-area-inset-bottom); }
.primary a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 60px; font-size: .75rem; line-height: 1.3; padding: 6px 2px; text-decoration: none; text-align: center; }
.primary a[aria-current] { background: var(--tint); }
.nav-icon { position: relative; display: inline-flex; }
.nav-icon .badge { position: absolute; top: -6px; left: 14px; }
.badge { display: inline-flex; align-items: center; justify-content: center; min-width: 1.5em; height: 1.5em; padding: 0 .35em; border-radius: 1em; background: var(--accent); color: var(--on-accent); font-size: .6875rem; font-weight: 700; line-height: 1; }
.skip { position: absolute; left: 16px; top: -100px; padding: 8px; background: var(--surface); z-index: 20; }
.skip:focus { top: 8px; }

/* Notices */
aside { border-left: 4px solid var(--accent); background: var(--tint); padding: 16px; margin-top: 32px; border-radius: 0 8px 8px 0; }
aside h2 { margin: 0 0 8px; font-size: 1.1rem; }
aside p { margin: 0; }
/* A problem is red with a warning sign, a success green with a tick, plain
   information blue: told apart by the sign as well as by the colour. */
.alert, .status { position: relative; padding: 12px 16px 12px 44px; border-radius: 8px; border-left: 4px solid var(--danger); background: color-mix(in srgb, var(--danger) 10%, var(--surface)); margin: 0 0 16px; }
.alert::before, .status::before { position: absolute; left: 14px; top: 11px; font-weight: 700; color: var(--danger); content: "!"; content: "!" / ""; }
.status { border-left-color: var(--ok); background: color-mix(in srgb, var(--ok) 12%, var(--surface)); }
.status::before { color: var(--ok); content: "✓"; content: "✓" / ""; }
.status.info { border-left-color: var(--accent); background: var(--tint); }
.status.info::before { color: var(--accent); content: "i"; content: "i" / ""; }
.status p:last-child, .alert p:last-child { margin-bottom: 0; }
.alert:focus-visible { outline-offset: 2px; }
.hint { font-size: .9375rem; color: var(--muted); }
.notice li { margin-bottom: 16px; }

/* Forms */
.stack { display: grid; gap: 8px; max-width: 28rem; margin: 0 0 24px; }
label, legend { font-weight: 600; margin-top: 8px; }
label.check { display: flex; align-items: flex-start; gap: 10px; font-weight: 400; min-height: 44px; padding: 8px 0; margin: 0; flex-wrap: wrap; }
label.check input { width: 22px; height: 22px; min-height: 0; margin: 2px 0 0; flex: none; }
label.check > span { flex: 1 1 0; min-width: 0; }
fieldset { border: 1px solid var(--border); border-radius: 8px; padding: 8px 16px 12px; margin: 0; min-width: 0; }
input, select, textarea, button, .button { font: inherit; min-height: 48px; border-radius: 8px; }
input, select, textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--border); background: var(--surface); color: var(--text); }
textarea { min-height: 10rem; resize: vertical; line-height: 1.5; }
input[type="checkbox"], input[type="radio"] { width: auto; accent-color: var(--accent); }
input[type="file"] { padding: 8px; }
button, .button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 20px; border: 2px solid var(--accent); background: var(--accent); color: var(--on-accent); font-weight: 600; text-decoration: none; cursor: pointer; }
.stack > button { margin-top: 16px; }
button.secondary, .button.secondary { background: transparent; color: var(--accent); min-height: 44px; padding: 6px 12px; }
button.danger, .button.danger { border-color: var(--danger); background: var(--danger); color: var(--background); }
button.secondary.danger { background: transparent; color: var(--danger); }
button.link { background: none; border: 0; color: var(--accent); font-weight: 400; text-decoration: underline; text-underline-offset: .2em; padding: 8px; min-height: 44px; }
button.link[aria-current] { font-weight: 700; text-decoration-thickness: 3px; }
button:disabled { opacity: .55; cursor: not-allowed; }
[aria-invalid="true"] { border-color: var(--danger); border-width: 2px; }
form.inline { display: inline-flex; margin: 0; }
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.row > input { flex: 1 1 12rem; }
.search { margin: 0 0 16px; max-width: 32rem; }
.grid { display: grid; gap: 8px 12px; grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr)); margin-bottom: 12px; }
.card { border: 1px solid var(--border); border-radius: 8px; padding: 12px 16px 16px; margin: 0 0 16px; background: var(--surface); }
.card h2, .card h3 { margin-top: 0; }
.copy { font-family: ui-monospace, Consolas, monospace; font-size: .875rem; }
.copy-row { flex-wrap: nowrap; }
.copy-row input { flex: 1 1 auto; min-width: 0; }
.copy-row button { flex: none; }
.providers { list-style: none; padding: 0; margin: 0 0 24px; display: grid; gap: 12px; max-width: 28rem; }
.providers .button { width: 100%; }

/* Lists */
dl { margin: 0 0 24px; }
dt { font-weight: 600; }
dd { margin: 0 0 12px; overflow-wrap: anywhere; }
.menu, .rows, .counts { list-style: none; padding: 0; margin: 0 0 24px; }
.menu li a { display: flex; align-items: center; min-height: 48px; padding: 8px 12px; border-bottom: 1px solid color-mix(in srgb, var(--border) 40%, transparent); text-decoration: none; font-weight: 500; }
.menu li a::after { content: "›"; margin-left: auto; padding-left: 12px; color: var(--muted); }
.rows li { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; min-height: 48px; padding: 8px 0; border-bottom: 1px solid color-mix(in srgb, var(--border) 40%, transparent); }
.rows li > a:first-child { font-weight: 500; }
.rows .meta { flex-basis: 100%; }
.rows form.inline { margin-left: auto; }
.meta { font-size: .875rem; color: var(--muted); overflow-wrap: anywhere; }
.counts li { padding: 4px 0; }
.tag { display: inline-flex; align-items: center; padding: 0 8px; min-height: 1.6em; border-radius: 1em; background: var(--tint); font-size: .8125rem; font-weight: 600; white-space: nowrap; }
.tag.muted { background: transparent; border: 1px solid var(--border); color: var(--muted); font-weight: 400; }
.tag.yes { background: color-mix(in srgb, var(--ok) 22%, transparent); }
.tag.no { background: color-mix(in srgb, var(--danger) 18%, transparent); }
.pager { display: flex; gap: 16px; margin: 16px 0; }
.pager a { display: inline-flex; align-items: center; min-height: 44px; }
table { border-collapse: collapse; width: 100%; margin: 0 0 24px; }
th, td { text-align: left; padding: 8px 12px 8px 0; border-bottom: 1px solid color-mix(in srgb, var(--border) 40%, transparent); vertical-align: top; }
th { font-weight: 600; }
.scroll-x { overflow-x: auto; }
.prose { overflow-wrap: anywhere; }
.prose img { max-width: 100%; height: auto; }
.prose pre { overflow-x: auto; padding: 12px; background: var(--surface); border-radius: 8px; }
.unread { border-left: 4px solid var(--accent); padding-left: 12px; }
.cancelled { text-decoration: line-through; color: var(--muted); }

.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.actions { margin: 0 0 16px; }
.crumbs { gap: 4px 16px; margin: 0 0 8px; }
.crumbs a { display: inline-flex; align-items: center; min-height: 44px; }
.practice-page { padding-top: 12px; }
.order { gap: 4px; margin: 4px 0 0; }
.order button { min-width: 44px; padding: 6px; }

/* Messages */
.comments { list-style: none; padding: 0; margin: 0 0 16px; }
.comments li { padding: 12px 0; border-bottom: 1px solid color-mix(in srgb, var(--border) 40%, transparent); }
.comments p { margin: 4px 0; white-space: pre-line; }
textarea.short { min-height: 5rem; }
.stack.wide-form { max-width: 44rem; }

/* Calendar */
.tabs { display: flex; gap: 4px; margin: 0 0 16px; border-bottom: 1px solid var(--border); }
.tabs a { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 16px; text-decoration: none; border-bottom: 3px solid transparent; }
.tabs a[aria-current] { border-bottom-color: var(--accent); }
.rows li.event { display: block; padding: 12px 0; }
.answers { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 0; }
.answers button { min-height: 44px; padding: 6px 16px; flex: 1 1 5.5rem; }
.answers button.chosen { box-shadow: 0 0 0 3px var(--tint); }
.days { display: flex; flex-wrap: wrap; gap: 0 16px; }
.programme { padding-left: 1.5rem; margin: 0 0 24px; }
.programme li { padding: 6px 0; }
.programme .meta { display: block; }
.month { display: none; }

@media (min-width: 768px) {
  header { min-height: 64px; padding: 8px 32px; flex-wrap: wrap; }
  .wide-only { display: flex; }
  .who { padding: 0 8px; }
  .who-name { display: inline-block; }
  .session-controls { display: none; }
  h1 { font-size: 2rem; }
  .layout { display: grid; grid-template-columns: 200px minmax(0, 1fr); max-width: 1200px; margin: auto; }
  .primary { position: static; display: flex; flex-direction: column; border: 0; padding: 24px 12px; background: transparent; }
  .primary a { flex-direction: row; justify-content: flex-start; gap: 12px; font-size: 1rem; padding: 12px 16px; min-height: 48px; border-radius: 8px; text-align: left; }
  main { padding: 40px 32px; }
  footer { padding: 0 24px 32px; }
  .who { max-width: 20ch; }
  .month { display: block; margin: 0 0 24px; }
  .month .row { justify-content: center; gap: 24px; }
  .month .row a { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; font-size: 1.5rem; text-decoration: none; }
  .month h2 { margin: 0; min-width: 12ch; text-align: center; }
  .month table { table-layout: fixed; }
  .month th { text-align: center; font-size: .875rem; padding: 4px; }
  .month td { height: 5.5rem; border: 1px solid color-mix(in srgb, var(--border) 40%, transparent); padding: 4px; font-size: .8125rem; }
  .month td.out { color: var(--muted); background: color-mix(in srgb, var(--border) 8%, transparent); }
  .month td.today { background: var(--tint); }
  .month td .num { display: block; font-weight: 600; }
  .month td a { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}

/* Stem editor */
.stems, .stems ul { list-style: none; padding: 0; margin: 0 0 24px; }
.stems ul { margin: 0 0 0 16px; padding-left: 12px; border-left: 2px solid var(--border); }
.stem { padding: 12px 0; border-bottom: 1px solid color-mix(in srgb, var(--border) 40%, transparent); display: grid; gap: 8px; }
.stem-head { margin: 0; }
.stem form { margin: 0; }
/* A summary that opens a form says so: a chevron that turns, in link colour. */
.stem details > summary, details.template > summary, .folds summary { cursor: pointer; min-height: 44px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; list-style: none; }
.stem details > summary::-webkit-details-marker, details.template > summary::-webkit-details-marker, .folds summary::-webkit-details-marker { display: none; }
.stem details > summary::before, details.template > summary::before, .folds summary::before { content: ""; flex: none; width: .5em; height: .5em; margin: 0 .5em 0 .15em; border-right: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(-45deg); }
.stem details[open] > summary::before, details.template[open] > summary::before, .folds details[open] > summary::before { transform: rotate(45deg); }
.stem details > summary { color: var(--accent); font-weight: 500; }
details.template { border-bottom: 1px solid color-mix(in srgb, var(--border) 40%, transparent); }
.folds { list-style: none; padding: 0; margin: 0 0 24px; }
.folds li { border-bottom: 1px solid color-mix(in srgb, var(--border) 40%, transparent); }
.folds details[open] { padding-bottom: 8px; }
textarea[spellcheck="false"] { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }

/* Text typed with line breaks keeps them. */
.lines { white-space: pre-line; }

/* Details of a choice show only when the choice is made (no script). */
.reveal:has(.reveal-switch:not(:checked)) .reveal-body { display: none; }

/* Language and sign-out on a phone (account and "more" pages). */
.session-controls { margin-top: 32px; }
.session-controls form { margin-bottom: 8px; }

/* The question before something is removed (web/src/ui). */
dialog.confirm { width: min(28rem, calc(100vw - 32px)); padding: 20px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); color: var(--text); }
dialog.confirm::backdrop { background: rgb(0 0 0 / .5); }
dialog.confirm p { margin: 0 0 20px; }
dialog.confirm .row { justify-content: flex-end; }

/* A form on its way: the pressed button turns, a second press does nothing. */
[aria-busy="true"] { cursor: progress; opacity: .8; }
button[aria-busy="true"]::after { content: ""; flex: none; width: 1em; height: 1em; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: turn .8s linear infinite; }
@keyframes turn { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { button[aria-busy="true"]::after { animation: none; } }
.busy-note { margin: 8px 0 0; }
