/* The Futuristica identity, small: white paper, ink, graphite for reading,
   one live blue. Outfit throughout, light and large for what you see first.
   This file is the system every page shares; admin.css and guest.css hold
   what belongs to one page. */

@font-face {
  font-family: "Outfit";
  src: url("/outfit.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  /* Paper, porcelain for things you could hold, ink, graphite for reading */
  --paper: #ffffff;
  --card: #f5f5f8;
  --line: #e4e4e8;
  --graphite: #4d4b47;
  --ink: #111110;
  --ink-hover: #29292c;
  --ink-15: rgb(17 17 16 / 0.15);
  --ink-25: rgb(17 17 16 / 0.25);
  --ink-50: rgb(17 17 16 / 0.5);
  /* Blue means now; the focus ring is that blue deepened to read on paper */
  --now: #27b3df;
  --focus: #0b7fab;
  --error: #9b2c1f;
  /* First light, seen only through the ring: high sky, haze, the horizon */
  --dawn: #eeecff;
  --haze: #e7eefc;
  --horizon: #cfeaf8;
  --sky: linear-gradient(165deg, var(--dawn), var(--haze) 55%, var(--horizon));
  /* The fill of a well, a tile or a chip on whatever surface it sits on:
     porcelain on paper, paper on porcelain (sheets, menus, lifted rows) */
  --well: var(--card);
  --radius: clamp(0.75rem, 0.6rem + 0.5vw, 1rem);

  /* Type, a 390 phone to a 1280 desk */
  --t-display: clamp(2.75rem, 1.9rem + 3.5vw, 5rem);
  --t-title: clamp(2.25rem, 1.7rem + 2.2vw, 3.5rem);
  --t-heading: clamp(1.75rem, 1.55rem + 0.9vw, 2.25rem);
  --t-item: clamp(1.25rem, 1.18rem + 0.3vw, 1.5rem);
  --t-lead: clamp(1.1875rem, 1.15rem + 0.19vw, 1.3125rem);
  --t-body: clamp(1.0625rem, 1.04rem + 0.1vw, 1.125rem);
  --t-small: clamp(0.875rem, 0.85rem + 0.1vw, 0.9375rem);
  --t-numeral-xl: clamp(5rem, 3.5rem + 6vw, 8rem);

  /* Space: inside an item 4 or 8, item 16, set, group, part (a section) */
  --item: 1rem;
  --set: 1.5rem;
  --group: 3rem;
  --part: 5rem;
  --margin: max(1.25rem, env(safe-area-inset-left), env(safe-area-inset-right));

  /* Columns: the admin's 12, a guest's one, and a line you can read */
  --col: 65rem;
  --col-guest: 35rem;
  --read: 34rem;

  /* Things settle on the expo curve; the pen draws on its own */
  --expo: cubic-bezier(0.19, 1, 0.22, 1);
  --pen: cubic-bezier(0.45, 0, 0.2, 1);
  --quick: 0.4s;
  --settle: 0.8s;
  --story: 1.2s;
}

@media (min-width: 48rem) {
  :root {
    --set: 2rem;
    --group: 4rem;
    --part: 7rem;
    --margin: max(3rem, env(safe-area-inset-left), env(safe-area-inset-right));
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--graphite);
  font-family: "Outfit", ui-sans-serif, system-ui, sans-serif;
  font-weight: 340;
  font-size: var(--t-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

p,
h1,
h2,
h3,
h4,
figure {
  margin: 0;
}

h1,
h2,
h3,
h4 {
  font-size: inherit;
  font-weight: inherit;
}

a {
  color: inherit;
}

[hidden] {
  display: none !important;
}

::selection {
  background: var(--ink);
  color: var(--paper);
}

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  border-radius: 4px;
}

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

/* ---------- Type ---------- */

.display,
.title,
.heading,
.item,
.numeral,
.numeral-xl {
  color: var(--ink);
}

.display {
  font-size: var(--t-display);
  font-weight: 300;
  line-height: 1;
  letter-spacing: -0.04em;
}

.title {
  font-size: var(--t-title);
  font-weight: 300;
  line-height: 1.04;
  letter-spacing: -0.035em;
}

.heading {
  font-size: var(--t-heading);
  font-weight: 300;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.item {
  font-size: var(--t-item);
  font-weight: 340;
  line-height: 1.3;
  letter-spacing: -0.015em;
}

.lead {
  font-size: var(--t-lead);
  line-height: 1.5;
}

.small,
small {
  font-size: var(--t-small);
  line-height: 1.5;
}

.ink {
  color: var(--ink);
}

/* The one label: small tracked capitals, at most once a page, above the title */
.label {
  font-size: 11px;
  font-weight: 440;
  line-height: 1;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--graphite);
}

/* The few numbers that matter: light, lining and tabular */
.numeral,
.numeral-xl {
  font-weight: 300;
  font-variant-numeric: lining-nums tabular-nums;
}

.numeral {
  font-size: 1.5rem;
  line-height: 1;
  letter-spacing: -0.045em;
}

.numeral-xl {
  font-size: var(--t-numeral-xl);
  line-height: 0.9;
  letter-spacing: -0.05em;
}

.numeral.big {
  font-size: 3rem;
}

.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.85rem;
  word-break: break-all;
  color: var(--ink);
}

/* A link draws its hairline: the inline one rests on a faint line, the
   quiet one has none until the pointer comes. Both draw left to right. */
.link,
.link-quiet {
  color: var(--ink);
  text-decoration: none;
  padding-bottom: 0.15em;
  transition:
    background-size var(--quick) var(--expo),
    color var(--quick);
}

.link {
  background:
    linear-gradient(currentColor, currentColor) var(--from, right) bottom / var(--drawn, 0%) 1px no-repeat,
    linear-gradient(var(--ink-25), var(--ink-25)) left bottom / 100% 1px no-repeat;
}

.link-quiet {
  background: linear-gradient(currentColor, currentColor) var(--from, right) bottom / var(--drawn, 0%) 1px
    no-repeat;
}

:is(.link, .link-quiet, .btn-text):is(:hover, :focus-visible) {
  --drawn: 100%;
  --from: left;
}

@media (forced-colors: active) {
  .link,
  :is(.link-quiet, .btn-text):hover {
    text-decoration: underline;
  }
}

/* ---------- Page: header, column, footer ---------- */

.top,
main {
  width: 100%;
  max-width: calc(var(--col-guest) + 2 * var(--margin));
  margin: 0 auto;
  padding-inline: var(--margin);
}

:is(.top, main).wide {
  max-width: calc(var(--col) + 2 * var(--margin));
}

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--item) var(--set);
  padding-top: max(1.25rem, env(safe-area-inset-top));
  padding-bottom: 1.25rem;
  view-transition-name: top;
}

main {
  flex: 1;
  padding-bottom: var(--part);
}

/* The logo is only ever whole: the f breaks out of the ring's box on purpose */
.mark,
.wordmark {
  overflow: visible;
  flex: none;
}

/* The lockup, then where you are in a quiet label */
.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--item);
  color: var(--ink);
  text-decoration: none;
  flex: none;
}

.brand .wordmark {
  display: block;
  height: 1.75rem;
  width: auto;
}

/* Futuristica × Maribor: our host's crest at the lockup's height, said once for the whole app */
.brand .pair {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
}

.brand .with {
  color: var(--graphite);
  font-weight: 300;
  line-height: 1;
}

.brand .crest {
  width: 1.75rem;
  height: 1.75rem;
}

/* Every role's links fit one line; the current page is ink, its line drawn */
.top nav {
  display: flex;
  align-items: center;
  gap: var(--item);
  white-space: nowrap;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.top nav::-webkit-scrollbar {
  display: none;
}

.top nav :is(a, button) {
  font: inherit;
  color: var(--graphite);
  border: 0;
  padding: 0.5rem 0 0.15em;
  background-color: transparent;
  cursor: pointer;
}

.top nav :is(a, button):hover,
.top nav a[aria-current="page"] {
  color: var(--ink);
}

.top nav a[aria-current="page"] {
  --drawn: 100%;
}

.top nav form {
  display: flex;
  margin: 0;
}

/* A phone has the lockup on one line and the links under it */
@media (max-width: 47.99rem) {
  .top {
    flex-wrap: wrap;
    row-gap: 0.25rem;
  }

  .top nav {
    flex-basis: 100%;
  }
}

@media (min-width: 48rem) {
  .top {
    padding-top: max(2rem, env(safe-area-inset-top));
  }

  .brand :is(.wordmark, .crest) {
    height: 2rem;
  }

  .brand .crest {
    width: 2rem;
  }

  .top nav {
    gap: var(--set);
  }
}

footer {
  background: var(--ink);
  color: #c9c8c4;
  padding: var(--group) var(--margin) max(var(--group), env(safe-area-inset-bottom));
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--item);
  font-size: var(--t-small);
  flex-wrap: wrap;
}

footer .wordmark {
  color: var(--paper);
  height: 2rem;
  width: auto;
}

/* ---------- Rhythm: page head, sections, columns ---------- */

/* The label, the title, the lead; one action on the title's baseline */
.page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: var(--set);
  padding: var(--set) 0 var(--group);
}

.page-head .label {
  display: block;
  margin-bottom: var(--item);
}

.page-head .lead {
  margin-top: var(--item);
  max-width: var(--read);
}

/* Air does the work between sections, not hairlines */
.section,
.block {
  margin-top: var(--part);
}

.section-head,
.block-head {
  margin-bottom: var(--set);
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.5rem var(--set);
}

.block-head p {
  margin-top: 0.5rem;
}

.group {
  margin-top: var(--group);
}

.read {
  max-width: var(--read);
}

/* The admin's twelve columns; a phone has one */
.cols {
  display: grid;
  gap: var(--set);
}

@media (min-width: 48rem) {
  .cols {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: var(--set) 2rem;
  }

  .span-3 {
    grid-column: span 3;
  }
  .span-4 {
    grid-column: span 4;
  }
  .span-5 {
    grid-column: span 5;
  }
  .span-6 {
    grid-column: span 6;
  }
  .span-7 {
    grid-column: span 7;
  }
  .span-8 {
    grid-column: span 8;
  }
  .span-9 {
    grid-column: span 9;
  }
}

/* ---------- Buttons: the site's pill ---------- */

/* Label type, fully round. The solid pill ends in a paper disc whose arrow
   nudges on hover; the outline fills ink. Compact ones carry words only. */
.btn,
.btn-quiet {
  font: inherit;
  font-size: 11px;
  font-weight: 440;
  line-height: 1;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--item);
  min-height: 3rem;
  padding: 0 1.75rem;
  border: 1px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition:
    background-color var(--quick) var(--expo),
    border-color var(--quick) var(--expo),
    color var(--quick) var(--expo),
    scale var(--quick) var(--expo);
}

.btn {
  background: var(--ink);
  color: var(--paper);
  padding: 0 0.375rem 0 1.75rem;
}

.btn:hover {
  background: var(--ink-hover);
}

.btn::after {
  content: "→";
  display: grid;
  place-items: center;
  flex: none;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background: var(--paper);
  color: var(--ink);
  font-size: 14px;
  letter-spacing: 0;
  transition: padding-left var(--quick) var(--expo);
}

.btn:hover::after {
  padding-left: 6px;
}

.btn-quiet {
  background: transparent;
  color: var(--ink);
  border-color: rgb(17 17 16 / 0.2);
}

.btn-quiet:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

.small-btn,
.btn.small-btn {
  min-height: 2.75rem;
  padding: 0 1.25rem;
  justify-content: center;
}

.btn.small-btn::after {
  display: none;
}

@media (min-width: 48rem) {
  .btn,
  .btn-quiet {
    min-height: 3.25rem;
  }

  .btn::after {
    width: 2.5rem;
    height: 2.5rem;
  }

  .small-btn,
  .btn.small-btn {
    min-height: 2.5rem;
  }
}

/* A text button: body size, graphite, its line drawn under the pointer */
.btn-text {
  font: inherit;
  color: var(--graphite);
  border: 0;
  padding: 0 0 0.15em;
  cursor: pointer;
  text-decoration: none;
  background: linear-gradient(currentColor, currentColor) var(--from, right) bottom / var(--drawn, 0%) 1px
    no-repeat;
  transition:
    background-size var(--quick) var(--expo),
    color var(--quick);
}

.btn-text:hover {
  color: var(--ink);
}

/* A press answers at once */
:is(.btn, .btn-quiet, .chip, .x, .more > summary, .toggle > *):active {
  scale: 0.98;
}

button:disabled {
  opacity: 0.45;
  pointer-events: none;
}

.danger,
.btn-text.danger:hover {
  color: var(--error) !important;
}

/* A round 36px button: × to remove. It turns clay red under the pointer. */
.x {
  position: relative;
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border: 1px solid var(--ink-15);
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  transition:
    background-color var(--quick) var(--expo),
    border-color var(--quick) var(--expo),
    color var(--quick) var(--expo);
}

.x::before,
.x::after {
  content: "";
  position: absolute;
  width: 0.75rem;
  height: 1.5px;
  background: currentColor;
  rotate: 45deg;
}

.x::after {
  rotate: -45deg;
}

.x:hover {
  background: var(--error);
  border-color: var(--error);
  color: var(--paper);
}

/* ---------- Segmented switch ---------- */

/* One ink thumb under the answer given. Without script the answer itself
   is ink; with it (data-thumb) the thumb slides there. */
.toggle {
  position: relative;
  isolation: isolate;
  display: inline-flex;
  padding: 4px;
  margin: 0;
  border: 0;
  background: var(--well);
  border-radius: 999px;
}

.toggle > :is(button, label) {
  position: relative;
  font: inherit;
  font-weight: 390;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.25rem;
  padding: 0 1.25rem;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--graphite);
  white-space: nowrap;
  cursor: pointer;
  transition:
    color var(--quick) var(--expo),
    background-color var(--quick) var(--expo);
}

.toggle > :is(button, label):hover {
  color: var(--ink);
}

.toggle > :is([aria-pressed="true"], label:has(:checked)) {
  background: var(--ink);
  color: var(--paper);
}

.toggle[data-thumb] > :is([aria-pressed="true"], label:has(:checked)) {
  background: transparent;
}

.toggle[data-thumb]::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: 4px;
  bottom: 4px;
  left: 0;
  width: var(--w, 0);
  translate: var(--x, 0) 0;
  border-radius: 999px;
  background: var(--ink);
  transition:
    translate var(--quick) var(--expo),
    width var(--quick) var(--expo);
}

.toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.toggle label:has(:focus-visible) {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

/* ---------- Fields: an underline, as on the site's contact page ---------- */

:where(input:not([type="checkbox"], [type="radio"], [type="file"], [type="hidden"]), select) {
  font: inherit;
  font-size: var(--t-item);
  letter-spacing: -0.015em;
  color: var(--ink);
  width: 100%;
  min-height: 3rem;
  padding: 0.5rem 0 0.625rem;
  border: 0;
  border-bottom: 1px solid var(--ink-25);
  border-radius: 0;
  background: transparent;
  transition:
    border-color var(--quick) var(--expo),
    box-shadow var(--quick) var(--expo);
}

:where(input, select)::placeholder {
  color: var(--graphite);
  opacity: 1;
}

:where(input, select, textarea):hover {
  border-color: var(--ink-50);
}

:where(input, select, textarea):focus {
  outline: none;
  border-color: var(--ink);
  box-shadow: inset 0 -1px 0 var(--ink);
}

/* A field shows focus with its own line, drawn in ink: no ring around it */
:where(input:not([type="checkbox"], [type="radio"]), select):focus-visible {
  outline: none;
}

textarea:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 1.5px var(--ink);
}

/* Numbers are typed, not spun */
input[type="number"] {
  appearance: textfield;
}

input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  appearance: none;
  margin: 0;
}

/* The browser's calendar, clock and clear icons, redrawn in our line */
input::-webkit-calendar-picker-indicator {
  width: 1.125rem;
  height: 1.125rem;
  padding: 0;
  cursor: pointer;
  opacity: 0.5;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18' fill='none' stroke='%23111110' stroke-width='1.5'%3E%3Crect x='2' y='3.5' width='14' height='12.5' rx='2.5'/%3E%3Cpath d='M2 7.5h14M6 1.5v4M12 1.5v4'/%3E%3C/svg%3E")
    center / contain no-repeat;
  transition: opacity var(--quick) var(--expo);
}

input[type="time"]::-webkit-calendar-picker-indicator {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18' fill='none' stroke='%23111110' stroke-width='1.5' stroke-linecap='round'%3E%3Ccircle cx='9' cy='9' r='7.25'/%3E%3Cpath d='M9 5v4l2.75 1.75'/%3E%3C/svg%3E");
}

input:is(:hover, :focus)::-webkit-calendar-picker-indicator {
  opacity: 1;
}

input[type="search"]::-webkit-search-cancel-button {
  appearance: none;
  width: 1rem;
  height: 1rem;
  cursor: pointer;
  opacity: 0.5;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23111110' stroke-width='1.5' stroke-linecap='round'%3E%3Cpath d='M3.5 3.5l9 9M12.5 3.5l-9 9'/%3E%3C/svg%3E")
    center / contain no-repeat;
}

select {
  appearance: none;
  padding-right: 1.75rem;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%23111110' stroke-width='1.5'%3E%3Cpath d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E")
    right 0.25rem center no-repeat;
}

input::-webkit-date-and-time-value {
  text-align: left;
}

/* A paper well on porcelain, a porcelain well on paper */
textarea {
  font: inherit;
  color: var(--ink);
  width: 100%;
  line-height: 1.6;
  padding: 1rem 1.25rem;
  border: 0;
  border-radius: 12px;
  background: var(--well);
}

/* A box drawn in our line; checked, it fills ink with a white tick */
input[type="checkbox"],
input[type="radio"] {
  appearance: none;
  display: inline-grid;
  place-items: center;
  width: 1.25rem;
  height: 1.25rem;
  margin: 0;
  border: 1.5px solid var(--ink-50);
  border-radius: 6px;
  background: var(--paper);
  cursor: pointer;
  flex: none;
  transition:
    background var(--quick) var(--expo),
    border-color var(--quick) var(--expo);
}

input[type="radio"] {
  border-radius: 50%;
}

input:is([type="checkbox"], [type="radio"]):hover {
  border-color: var(--ink);
}

input:is([type="checkbox"], [type="radio"]):checked {
  border-color: var(--ink);
  background: var(--ink)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 8.25l2.75 2.75L12 5.5'/%3E%3C/svg%3E")
    center / 0.875rem no-repeat;
}

[aria-invalid="true"] {
  border-color: var(--error) !important;
}

/* The label above in small graphite, the hint or error below */
.field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.field-label,
.field-hint {
  font-size: var(--t-small);
  color: var(--graphite);
}

.field-error {
  font-size: var(--t-small);
  color: var(--error);
}

.check {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--ink);
  cursor: pointer;
}

/* ---------- Rows that lift ---------- */

/* A list's line: a hairline above (none on the first). Under the pointer,
   or open, it lifts onto porcelain a step past the column, edge to edge
   on a phone, and the hairlines either side give way. */
.rows {
  list-style: none;
  margin: 0;
  padding: 0;
}

.row {
  display: flex;
  align-items: center;
  gap: var(--item);
  min-height: 4.5rem;
  padding: 1.25rem 0;
  border-top: 1px solid var(--line);
  color: inherit;
  text-decoration: none;
  transition:
    background-color var(--quick) var(--expo),
    border-color var(--quick) var(--expo);
}

.row:first-child {
  border-top-color: transparent;
}

details.row {
  display: block;
}

details.row > summary {
  display: flex;
  align-items: center;
  gap: var(--item);
  list-style: none;
  cursor: pointer;
}

details.row > summary::-webkit-details-marker {
  display: none;
}

.row:is(.open, [open], :has(.more[open])),
.row:is(a, .lift):focus-visible {
  --well: var(--paper);
  background: var(--card);
  margin-inline: calc(-1 * var(--margin));
  padding-inline: var(--margin);
  border-top-color: transparent;
  outline-offset: -2px;
}

.row:is(.open, [open], :has(.more[open])) + .row {
  border-top-color: transparent;
}

@media (hover: hover) {
  .row:is(a, .lift, details):hover {
    --well: var(--paper);
    background: var(--card);
    margin-inline: calc(-1 * var(--margin));
    padding-inline: var(--margin);
    border-top-color: transparent;
  }

  .row:is(a, .lift, details):hover + .row {
    border-top-color: transparent;
  }
}

@media (min-width: 48rem) {
  .row:is(.open, [open], :has(.more[open])),
  .row:is(a, .lift):focus-visible {
    margin-inline: -1.5rem;
    padding-inline: 1.5rem;
    border-radius: var(--radius);
  }

  @media (hover: hover) {
    .row:is(a, .lift, details):hover {
      margin-inline: -1.5rem;
      padding-inline: 1.5rem;
      border-radius: var(--radius);
    }
  }
}

.row-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.row-end {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: none;
}

/* Someone's initials in a porcelain circle */
.initials {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: var(--well);
  color: var(--ink);
  font-size: 0.875rem;
  font-weight: 390;
  letter-spacing: 0.02em;
}

/* Someone, as the ring around their own first light: the sky's angle and
   stops come from their id (parts.tsx Avatar), initials in ink inside */
.avatar {
  position: relative;
  display: inline-grid;
  place-items: center;
  flex: none;
  width: var(--size, 2.5rem);
  height: var(--size, 2.5rem);
  container-type: inline-size;
  color: var(--ink);
}

.avatar::before {
  content: "";
  position: absolute;
  inset: 2.95%;
  border-radius: 50%;
  background: linear-gradient(var(--a, 165deg), var(--dawn), var(--haze) var(--h, 55%), var(--horizon) var(--z, 100%));
}

.avatar svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.avatar > span {
  position: relative;
  font-size: 34cqi;
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0.01em;
}

/* ---------- Clubs ---------- */

/* A crest on a paper disc; without one, the club's initial on porcelain */
.crest {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: var(--size, 3rem);
  height: var(--size, 3rem);
  container-type: inline-size;
}

/* A crest stands free in its own shape; only the monogram gets a disc */
.crest img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.crest.monogram {
  border-radius: 50%;
  background: var(--well);
  color: var(--ink);
}

.crest.monogram > span {
  font-size: 38cqi;
  font-weight: 340;
  line-height: 1;
  letter-spacing: -0.02em;
}

/* 'Maribor : [crest] Olimpija' in a list: the opponent's crest sized to the
   type, beside their name; a long name ends in an ellipsis */
.match-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  column-gap: 0.3em;
  min-width: 0;
}

.match-line .side {
  display: inline-flex;
  align-items: center;
  gap: 0.3em;
  min-width: 0;
  white-space: nowrap;
}

.match-line .crest {
  width: 1.3em;
  height: 1.3em;
}

.match-line .club {
  overflow: hidden;
  text-overflow: ellipsis;
}

.vs {
  color: var(--graphite);
}

/* ---------- Sheets ---------- */

/* Porcelain, for things you could hold: no border, no shadow */
.sheet {
  --well: var(--paper);
  background: var(--card);
  border-radius: var(--radius);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--item);
}

.sheet + .sheet {
  margin-top: var(--item);
}

/* The one thing a page is about right now, a step past the column */
.lifted {
  margin-inline: calc(-1 * var(--margin));
  padding-inline: var(--margin);
  border-radius: 0;
}

@media (min-width: 48rem) {
  .sheet {
    padding: 2rem;
  }

  .lifted {
    margin-inline: -1.5rem;
    padding-inline: 1.5rem;
    border-radius: var(--radius);
  }
}

/* ---------- What the page says back ---------- */

/* A lasting state: one ink sentence at the top of its section, no box */
.notice {
  font-size: var(--t-item);
  line-height: 1.3;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin: 0 0 var(--set);
}

/* After an action: an ink pill at the bottom, there for four seconds */
.toast {
  position: fixed;
  z-index: 40;
  left: 50%;
  bottom: max(1.5rem, calc(env(safe-area-inset-bottom) + 0.75rem));
  translate: -50% 0;
  max-width: calc(100vw - 2.5rem);
  width: max-content;
  margin: 0;
  padding: 0.75rem 1.25rem;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-size: var(--t-small);
  line-height: 1.4;
  text-align: center;
  pointer-events: none;
  animation: toast 4.8s var(--expo) both;
}

@keyframes toast {
  0% {
    opacity: 0;
    transform: translateY(12px);
  }
  8%,
  92% {
    opacity: 1;
    transform: none;
  }
  100% {
    opacity: 0;
    transform: translateY(6px);
  }
}

/* Nothing here yet: one drawn object, one sentence, one action */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--set);
  padding: var(--group) 0;
  text-align: center;
}

.empty-state > p {
  max-width: var(--read);
}

/* ---------- Chips ---------- */

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* A chip that holds a checkbox: the box hides, the chip itself turns ink */
.chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.5rem;
  padding: 0.5rem 1rem;
  border: 1px solid var(--ink-15);
  /* Half the height: a pill on one line, a soft box if the words wrap */
  border-radius: 1.25rem;
  line-height: 1.3;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-size: var(--t-small);
  text-decoration: none;
  cursor: pointer;
  transition:
    background-color var(--quick) var(--expo),
    border-color var(--quick) var(--expo),
    color var(--quick) var(--expo);
}

.chip:hover {
  border-color: var(--ink-50);
}

.chip:is(:has(input:checked), [aria-pressed="true"]) {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

.chip input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.chip:has(input:focus-visible) {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.tag {
  font-size: var(--t-small);
  color: var(--graphite);
}

/* ---------- The ··· menu ---------- */

/* A 40px circle like the site's FAQ chip, ink while open. The panel is
   porcelain; on a phone it rises from the bottom as a sheet. */
.more {
  position: relative;
}

.more > summary,
.more > summary.small-btn {
  list-style: none;
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  min-height: 0;
  padding: 0;
  border: 1px solid var(--ink-15);
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
  font-size: 1rem;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition:
    background-color var(--quick) var(--expo),
    border-color var(--quick) var(--expo),
    color var(--quick) var(--expo);
}

.more > summary::-webkit-details-marker {
  display: none;
}

.more > summary:hover {
  border-color: var(--ink-50);
  background: transparent;
  color: var(--ink);
}

.more[open] > summary {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

.menu {
  --well: var(--paper);
  position: absolute;
  z-index: 20;
  right: 0;
  top: calc(100% + 0.5rem);
  min-width: 17rem;
  padding: 0.5rem;
  border-radius: var(--radius);
  background: var(--card);
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: left;
}

.menu form {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0;
}

.menu :is(button, a):not(.toggle > *, .seat) {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 2.75rem;
  padding: 0 0.75rem;
  border: 0;
  border-radius: 0.5rem;
  background: none;
  font: inherit;
  color: var(--ink);
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.menu :is(button, a):not(.toggle > *, .seat):hover {
  background: var(--paper);
}

.menu hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 0.25rem 0.75rem;
}

.menu .toggle {
  display: flex;
  margin-bottom: 0.25rem;
}

.menu .toggle > * {
  flex: 1;
  padding: 0 0.75rem;
}

.menu .plan,
.menu select {
  margin: 0.25rem 0.75rem 0.5rem;
  width: auto;
}

@media (max-width: 47.99rem) {
  .menu {
    position: fixed;
    z-index: 30;
    left: 0;
    right: 0;
    top: auto;
    bottom: 0;
    min-width: 0;
    max-height: 85dvh;
    overflow-y: auto;
    padding: 0.75rem var(--margin) max(0.75rem, env(safe-area-inset-bottom));
    border-radius: var(--radius) var(--radius) 0 0;
    animation: sheet-up var(--quick) var(--expo) backwards;
  }

  /* The page dims behind the sheet; a tap on it closes the menu */
  .more[open] > summary::before {
    content: "";
    position: fixed;
    z-index: 29;
    inset: 0;
    background: rgb(17 17 16 / 0.24);
    cursor: default;
    animation: fade var(--quick) backwards;
  }
}

@keyframes sheet-up {
  from {
    transform: translateY(100%);
  }
}

@keyframes fade {
  from {
    opacity: 0;
  }
}

/* ---------- The date ring ---------- */

/* The logo's ring holds the match's date and nothing else: dawn inside,
   an ink stroke an eighth of its radius, a blue bead outside while live.
   Text inside scales with the ring (container units). */
.ring {
  position: relative;
  flex: none;
  width: var(--ring, 11.5rem);
  aspect-ratio: 1;
  container-type: inline-size;
  color: var(--ink);
}

.ring-sky {
  position: absolute;
  inset: 2.95%;
  border-radius: 50%;
  background: var(--sky);
}

.ring svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.ring-stroke {
  stroke-dasharray: 50 50;
  stroke-linecap: round;
  animation: ring-draw var(--settle) var(--pen) 0.1s backwards;
}

.ring-text {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  animation: fade var(--quick) ease-out 0.6s backwards;
}

.ring-day,
.ring-text .numeral {
  font-size: 19cqi;
  line-height: 1;
}

.ring-time {
  margin-top: 3cqi;
  font-size: max(0.875rem, 8.5cqi);
  line-height: 1.2;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

/* Who we play, small under the time: the ring is the match's badge */
.ring-text .crest {
  width: 20cqi;
  height: 20cqi;
  margin-top: 6cqi;
}

.ring-bead,
.ring-glow {
  fill: var(--now);
  transform-box: fill-box;
  transform-origin: center;
}

.ring-bead {
  animation: fade var(--quick) var(--expo) 1.4s backwards;
}

.ring-glow {
  opacity: 0.22;
  animation: breathe calc(2 * var(--story)) var(--pen) 1.4s infinite backwards;
}

@keyframes ring-draw {
  from {
    stroke-dashoffset: 50;
  }
}

@keyframes breathe {
  0%,
  100% {
    transform: scale(0.86);
  }
  50% {
    transform: scale(1.86);
  }
}

/* Live this second, in a line of text: one blue point that breathes */
.now {
  position: relative;
  display: inline-block;
  flex: none;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--now);
}

.now::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--now);
  opacity: 0.22;
  animation: breathe calc(2 * var(--story)) var(--pen) infinite;
}

/* ---------- The seat plan ---------- */

/* The loža drawn as the real box: two rows of six, row 1 at the front on
   an ink rail, "Igrišče" under it. Set it on a sheet; tiles are paper. */
.plan {
  --cols: 6;
  --tile-h: 3.5rem;
  --gap: 6px;
  display: flex;
  flex-direction: column;
  gap: var(--gap);
  width: 100%;
  max-width: calc(var(--cols) * 5.5rem + (var(--cols) - 1) * 10px);
}

.plan-seats {
  display: grid;
  grid-template-columns: repeat(var(--cols), minmax(0, 1fr));
  gap: var(--gap);
}

.plan-extra {
  margin-bottom: calc(1.5rem - var(--gap));
}

.plan-label {
  display: block;
  margin-bottom: 0.25rem;
  font-size: var(--t-small);
}

.plan-rail {
  display: block;
  height: 6px;
  margin-top: calc(0.75rem - var(--gap));
  border-radius: 3px;
  background: var(--ink);
  transform-origin: left;
  animation: rail var(--settle) var(--pen) 0.3s backwards;
}

.plan-foot {
  display: flex;
  justify-content: space-between;
  gap: var(--item);
  font-size: var(--t-small);
}

@media (min-width: 48rem) {
  .plan {
    --tile-h: 4.5rem;
    --gap: 10px;
  }
}

/* A seat: number top left; a name (initials on a phone) when taken.
   Coming is ink, waiting is ringed in ink, free is paper, held for the
   host's guests a shade darker. */
.seat {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-width: 0;
  height: var(--tile-h, 3.5rem);
  padding: 0.375rem 0.5rem;
  border-radius: 10px;
  background: var(--well);
  color: var(--graphite);
  font-size: 15px;
  font-weight: 390;
  line-height: 1.2;
  text-decoration: none;
  animation: seat-in var(--settle) var(--expo) calc(var(--i, 0) * 0.04s) backwards;
}

.seat-n {
  position: absolute;
  top: 0.375rem;
  left: 0.5rem;
  font-size: 11px;
  font-weight: 440;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.seat-name,
.seat-init {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.seat-name {
  display: none;
}

.seat.yes {
  background: var(--ink);
  color: var(--paper);
  animation:
    seat-in var(--settle) var(--expo) calc(var(--i, 0) * 0.04s) backwards,
    seat-fill var(--quick) var(--expo) calc(var(--i, 0) * 0.04s + 0.4s) backwards;
}

.seat.pending {
  color: var(--ink);
  box-shadow: inset 0 0 0 2px var(--ink);
}

.seat.held {
  background: var(--line);
}

a.seat {
  transition: background-color var(--quick) var(--expo);
}

a.seat.yes:hover {
  background: var(--ink-hover);
}

@media (min-width: 48rem) {
  .seat-name {
    display: block;
  }

  .seat-init {
    display: none;
  }
}

/* The plan in small, for a menu: 36 by 30, initials only */
.plan.compact {
  --tile-h: 30px;
  --gap: 4px;
  max-width: calc(var(--cols) * 36px + (var(--cols) - 1) * 4px);
}

.plan.compact .seat,
.seat.mini {
  align-items: center;
  justify-content: center;
  padding: 0;
  font-size: 11px;
  border-radius: 6px;
}

.plan.compact :is(.seat-n, .seat-name),
.plan.compact .seat:not(.free, .held) .seat-n {
  display: none;
}

.plan.compact :is(.seat.free, .seat.held) .seat-n,
.seat.mini .seat-n {
  display: block;
  position: static;
}

.plan.compact .seat-init {
  display: block;
}

.plan.compact .seat.pending {
  box-shadow: inset 0 0 0 1.5px var(--ink);
}

/* A seat at the start of a guest's row, in its state */
.seat.mini {
  display: inline-flex;
  flex: none;
  width: 28px;
  height: 24px;
  animation: none;
}

@keyframes seat-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

@keyframes seat-fill {
  from {
    background: var(--well);
    color: var(--ink);
  }
}

@keyframes rail {
  from {
    transform: scaleX(0);
  }
}

/* The plan as a glyph for a list: 2 by 6 squares, ink per guest */
.glyph {
  display: inline-grid;
  grid-template-columns: repeat(var(--cols, 6), 8px);
  gap: 3px;
  flex: none;
}

.glyph i {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--line);
}

.glyph .yes {
  background: var(--ink);
}

.glyph .pending {
  background: var(--paper);
  box-shadow: inset 0 0 0 1.5px var(--ink);
}

/* ---------- Files: a slot per job, a row per file ---------- */

/* A slot: its name, a status line, then a porcelain field holding its
   files, or, while empty, two drawn A4 sheets to drop a PDF on */
.slot {
  display: flex;
  flex-direction: column;
  gap: var(--item);
}

.slot + .slot {
  margin-top: var(--group);
}

.slot-head p {
  margin-top: 0.25rem;
}

.slot-field {
  --well: var(--paper);
  border-radius: var(--radius);
  background: var(--card);
  transition: background-color var(--quick) var(--expo);
}

.slot[data-over] .slot-field {
  background: #eeeef3;
}

.slot-field > form {
  margin: 0;
}

.slot-field .file-rows {
  padding: 0.5rem 1.5rem;
}

.slot-more {
  padding: 0 1.5rem 1.25rem;
}

.slot-more label {
  cursor: pointer;
}

.slot-more label:has(:focus-visible) {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

.drop {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  min-height: 12.5rem;
  padding: 2rem 1.5rem;
  border-radius: var(--radius);
  text-align: center;
  cursor: pointer;
}

.drop:has(:focus-visible) {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

@media (hover: hover) {
  .drop:hover .sheets i:first-child {
    transform: translateY(-4px) rotate(-5deg);
  }

  .drop:hover .sheets i:last-child {
    transform: translateY(-4px) rotate(5deg);
  }
}

/* The file input stays in the page for the keyboard, unseen */
.drop input[type="file"],
.slot-more input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
}

/* Two paper A4 sheets, offset and turned; the front one has a heading
   in ink and three soft lines */
.sheets {
  position: relative;
  width: 4.75rem;
  height: 5.75rem;
  margin-bottom: var(--item);
}

.sheets i {
  position: absolute;
  width: 56px;
  height: 79px;
  border-radius: 4px;
  background: var(--paper);
  transition: transform var(--quick) var(--expo);
}

.sheets i:first-child {
  left: 0;
  top: 0;
  transform: rotate(-3deg);
}

.sheets i:last-child {
  left: 14px;
  top: 10px;
  transform: rotate(3deg);
  background:
    linear-gradient(var(--ink), var(--ink)) 9px 12px / 22px 3px no-repeat,
    linear-gradient(var(--ink-15), var(--ink-15)) 9px 24px / 38px 3px no-repeat,
    linear-gradient(var(--ink-15), var(--ink-15)) 9px 32px / 34px 3px no-repeat,
    linear-gradient(var(--ink-15), var(--ink-15)) 9px 40px / 26px 3px no-repeat,
    var(--paper);
}

.slot[data-over] .sheets i:first-child {
  transform: translateY(-8px) rotate(-8deg);
}

.slot[data-over] .sheets i:last-child {
  transform: translateY(-8px) rotate(8deg);
}

.drop .item {
  color: var(--ink);
}

.drop-over,
.slot[data-over] .drop-idle {
  display: none;
}

.slot[data-over] .drop-over {
  display: inline;
}

.slot[data-state="busy"] :is(.drop, .slot-more label) {
  display: none;
}

.upload-status:empty {
  display: none;
}

.slot-field .upload-status {
  padding: 0 1.5rem 1.25rem;
}

/* A file: page one as a thumbnail, the name, what it is, × at the right */
.file-rows {
  list-style: none;
  margin: 0;
  padding: 0;
}

.file-row {
  display: grid;
  grid-template-columns: 2.5rem minmax(0, 1fr) auto;
  gap: 0 var(--item);
  align-items: center;
  padding: var(--item) 0;
  border-top: 1px solid var(--line);
}

.file-row:first-child {
  border-top: 0;
}

.file-row > form {
  margin: 0;
}

.file-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.file-main .link {
  display: inline;
  align-self: flex-start;
  overflow-wrap: anywhere;
}

/* Page one, drawn by pdf.js; until then, a paper sheet with soft lines */
.thumb {
  display: block;
  width: 2.5rem;
  height: 3.5rem;
  overflow: hidden;
  border-radius: 4px;
  background:
    linear-gradient(var(--ink-15), var(--ink-15)) 6px 8px / 20px 2px no-repeat,
    linear-gradient(var(--ink-15), var(--ink-15)) 6px 14px / 26px 2px no-repeat,
    linear-gradient(var(--ink-15), var(--ink-15)) 6px 20px / 22px 2px no-repeat,
    var(--well);
}

.thumb :is(canvas, img) {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}

/* While uploading, a 3px ink bar fills under the row */
.file-row .bar {
  grid-column: 2 / -1;
  height: 3px;
  margin-top: 0.5rem;
  border-radius: 2px;
  background: var(--line);
  overflow: hidden;
}

.file-row .bar i {
  display: block;
  height: 100%;
  width: calc(var(--p, 0) * 100%);
  background: var(--ink);
  transition: width 0.3s var(--expo);
}

/* ---------- Motion ---------- */

/* Rows arrive 12px up, a beat apart, at most eight staggered */
.appear {
  animation: fade-up var(--settle) var(--expo) calc(min(var(--i, 0), 8) * 0.06s) backwards;
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
}

@keyframes settle {
  from {
    opacity: 0;
    transform: scale(0.96);
  }
}

/* Page to page: the old steps back, the new rises into place */
@view-transition {
  navigation: auto;
}

::view-transition-old(root) {
  animation: page-out var(--quick) ease-in both;
}

::view-transition-new(root) {
  animation: page-in var(--settle) var(--expo) 0.12s both;
}

@keyframes page-out {
  to {
    opacity: 0;
    translate: 0 -8px;
  }
}

@keyframes page-in {
  from {
    opacity: 0;
    translate: 0 14px;
  }
}

/* With reduced motion every picture is in its final frame */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after,
  ::view-transition-group(*),
  ::view-transition-old(*),
  ::view-transition-new(*) {
    animation: none !important;
    transition: none !important;
  }
}
