:root {
  --white: oklch(100% 0 0);
  --black: oklch(0% 0 0);
  --blue: oklch(36.5% 0.18 262.8);
  --yellow: oklch(85.1% 0.169 98.3);
  --primary: var(--blue);
  --secondary: var(--white); 
  --tertiary: var(--yellow);
  --pitch: oklch(56% 0.13 145);
  --pitch-stripe: oklch(52% 0.13 145);
  --pitch-line: oklch(100% 0 0 / 0.55);
  --warning: oklch(72% 0.17 45);
  /* Borders and dividers. Set per background (see .section, .bg-primary)
     so they always contrast with whatever they sit on. */
  --border: var(--black);
  /* The focus ring's colour, set per background like --border: black on
     light ones, yellow on blue and black. */
  --focus: var(--black);
  /* Alternate table rows. */
  --row-stripe: oklch(96.5% 0 0);
  /* Form errors: dark red, readable on white (about 6:1 contrast). */
  --error: oklch(50% 0.19 27);
  /* Replies to an event (docs/adr/0040): light shades, so black text and
     icons stay readable on them. */
  --reply-attending: oklch(84% 0.14 150);
  --reply-maybe: oklch(88% 0.12 85);
  --reply-not-attending: oklch(82% 0.1 25);
  /* Done: a green a white tick reads on (5:1), standing out on yellow (3:1). */
  --done: oklch(52% 0.15 150);
  /* Greyed out: still readable on white (4.8:1) and seen on yellow (3:1). */
  --muted: oklch(55% 0 0);
  --text: var(--black);
  --bp-tablet: 48rem;
  --bp-desktop: 75rem;
  --bp-max-width: 90rem;
  --font-system: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  --font-body: "Noto Sans", var(--font-system);
  --box-shadow: 0.125em 0.125em var(--black);
}


html {
  height: 100%;
}

/*
 * min-height, not height: on a page longer than the screen the body grows
 * with it, so its bottom padding - room for the phones' bar - comes after
 * the footer (docs/adr/0038).
 */
body {
  min-height: 100%;
  background-color: var(--white);
  color: var(--text);
  font-family: var(--font-body);
  display: flex;
  flex-direction: column;
  /* A word too long for its line (a one-word team name on a phone) breaks
     rather than widening the page; unlike break-word, this lets flex items,
     grid cells and tables shrink to fit as well. Our own short words stay
     whole beside one (docs/adr/0108). */
  overflow-wrap: anywhere;
}

#layout-main {
  flex-grow: 1;
  flex-shrink: 0;
  flex-basis: auto;
}

/*
 * Where focus is (WCAG 2.4.7): a solid ring in --focus, the same in every
 * browser rather than each one's own, which can vanish on the blue.
 */
:focus-visible {
  outline: 0.1875rem solid var(--focus);
  outline-offset: 0.125rem;
}

/* Focused by the skip link only to move the starting point; no ring. */
#layout-main:focus {
  outline: none;
}

/* Off-screen until tabbed to, then shown over the header. */
.skip-link {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 100;
  padding: 0.5rem 1rem;
  border: 0.125rem solid var(--black);
  background-color: var(--tertiary);
  color: var(--black);
  font-weight: 700;
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: none;
}

/* Pages with a sticky heading (Events): keep what's focused clear of it. */
html:has(.events__heading) {
  scroll-padding-top: 4rem;
}

/*
 * Collapsible sections (<details>) whose <summary> is laid out with flex
 * lose the browser's open/closed triangle: draw one before their heading.
 */
.event__title::before,
.ranking__title::before,
.sport-positions__name::before,
.former-members__heading::before,
.admin__fold-heading::before,
.profile-team__heading::before {
  content: "▸" / "";
  display: inline-block;
  width: 1em;
}

details[open] > summary .event__title::before,
details[open] > summary .ranking__title::before,
details[open] > summary .sport-positions__name::before,
details[open] > summary .former-members__heading::before,
details[open] > summary .admin__fold-heading::before,
details[open] > summary .profile-team__heading::before {
  content: "▾" / "";
}

/* Inline SVG icons (components/icon.html.twig): a black outline, filled per use. */
.icon {
    flex-shrink: 0;
    width: 1.25em;
    height: 1.25em;
    vertical-align: middle;
}

.icon__circle {
    fill: var(--white);
    stroke: var(--black);
    stroke-width: 1.5;
}

.icon__mark {
    fill: none;
    stroke: var(--black);
    stroke-width: 2.25;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Line icons in the text's colour, e.g. the bottom bar's (components/icon.html.twig). */
.icon--line {
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* A line icon filled in, e.g. a feature request you support (docs/adr/0090). */
.icon--line.icon--filled {
    fill: currentColor;
}

/* Initials in a circle, standing in for a picture (components/avatar.html.twig). */
.avatar {
    display: inline-grid;
    flex-shrink: 0;
    place-items: center;
    border: 0.125rem solid var(--black);
    border-radius: 50%;
    background-color: var(--tertiary);
    color: var(--black);
    font-weight: 700;
    line-height: 1;
}

.avatar--small {
    width: 2rem;
    height: 2rem;
    font-size: 0.8rem;
}

.avatar--large {
    width: 4rem;
    height: 4rem;
    border-width: 0.25rem;
    font-size: 1.5rem;
}

#layout-footer {
  flex-shrink: 0;
}

h1, h2, h3, h4, h5, h6, p, label, li, a {
  color: currentColor;
}

.container {
  max-width: var(--bp-desktop);
  margin: 0 auto;
  padding-left: 2rem;
  padding-right: 2rem;
}

/* Phones: a narrower gutter leaves more room for the page (docs/adr/0038). */
@media (max-width: 47.99rem) {
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}

.section {
  padding-top: 2rem;
  padding-bottom: 2rem;
  background-color: var(--white);
  color: var(--black);
  --border: var(--black);
}


.border-tertiary {
  border-bottom-width: 0.5rem;
  border-bottom-style: solid;
  border-bottom-color: var(--tertiary);
}

.bg-primary {
  background-color: var(--primary);
  color: var(--white);
  --border: var(--black);
  --focus: var(--tertiary);
}


.list-reset {
  list-style: none;
  padding: 0rem;
  margin: 0rem;
}
.section__actions,
.section__intro {
    margin-bottom: 1.5rem;
}

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

.flash-messages {
    padding-top: 1rem;
}

/*
 * A message - a flash, a form's own errors, a sign-in card's refusal
 * (docs/adr/0106): a light background, dark words and a border a shade
 * lighter, coloured by its kind. The shades are Tailwind's 50, 800 and 600.
 */
.alert {
    padding: 0.75rem 1rem;
    border: 0.0625rem solid var(--alert-border);
    border-radius: 0.375rem;
    background-color: var(--alert-background);
    color: var(--alert-text);
    font-weight: 500;
}

.alert > * + *,
.alert + .alert {
    margin-top: 0.5rem;
}

.alert--error {
    --alert-background: oklch(97.1% 0.013 17.4);
    --alert-text: oklch(44.4% 0.177 26.9);
    --alert-border: oklch(57.7% 0.245 27.3);
}

.alert--info {
    --alert-background: oklch(97% 0.014 254.6);
    --alert-text: oklch(42.4% 0.199 265.6);
    --alert-border: oklch(54.6% 0.245 262.9);
}

.alert--success {
    --alert-background: oklch(98.2% 0.018 155.8);
    --alert-text: oklch(44.8% 0.119 151.3);
    --alert-border: oklch(62.7% 0.194 149.2);
}

.alert--warning {
    --alert-background: oklch(98.7% 0.022 95.3);
    --alert-text: oklch(47.3% 0.137 46.2);
    --alert-border: oklch(66.6% 0.179 58.3);
}

/* A page of text (the privacy policy): room between its paragraphs, headings and lists. */
.prose {
    max-width: 40rem;
}

.prose > * + * {
    margin-top: 1rem;
}

.prose > h2 {
    margin-top: 2rem;
}

.prose ul {
    padding-left: 1.25rem;
}

.prose li + li {
    margin-top: 0.5rem;
}

/* Several actions side by side, wrapping on narrow screens. */
.section__actions--row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}
