/*
 * Public site styles. Clean and calm: white page, brand teal accents, Hanken Grotesk, generous spacing.
 * No gradients, glass effects, glows, animations, parallax or sticky blurred bars. Every colour comes from
 * tokens.css. Mobile first; checked at 360-1440px on /stil-rehberi.
 * No text-transform: uppercase anywhere: CSS case mapping depends on the lang attribute and Turkish i/İ.
 */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

/* In-page links (the home page's "Yaklaşan etkinlikler" button) glide to their section instead of jumping. Not for
   people who asked their device for reduced motion. */
@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: var(--font-size-body);
  line-height: var(--line-height-body);
  font-synthesis-weight: none; /* the font file stops at 600; never fake a heavier bold */
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}

h1,
h2,
h3,
h4,
.h1,
.h2,
.h3,
.h4 {
  margin: 0 0 var(--space-4);
  color: var(--color-ink);
  font-family: var(--font-sans);
  font-weight: var(--font-weight-strong);
  line-height: var(--line-height-heading);
  letter-spacing: -0.01em;
  text-wrap: balance;
}

h1, .h1 { font-size: var(--font-size-h1); letter-spacing: -0.02em; margin-bottom: var(--space-5); }
h2, .h2 { font-size: var(--font-size-h2); margin-top: var(--space-7); }
h3, .h3 { font-size: var(--font-size-h3); line-height: var(--line-height-title); letter-spacing: 0; margin-top: var(--space-6); }
h4, .h4 { font-size: var(--font-size-h4); line-height: var(--line-height-title); letter-spacing: 0; margin-top: var(--space-5); }
h1 + h2, h2 + h3, h3 + h4 { margin-top: 0; }

p,
ul,
ol,
dl,
blockquote,
figure,
table {
  margin: 0 0 var(--space-4);
}

ul,
ol {
  padding-left: 1.4em;
}

li + li {
  margin-top: var(--space-1);
}

li::marker {
  color: var(--color-teal-dark);
}

strong,
b {
  font-weight: var(--font-weight-strong);
}

small {
  font-size: var(--font-size-small);
}

hr {
  border: 0;
  border-top: var(--border-thin) solid var(--color-line);
  margin: var(--space-6) 0;
}

img,
svg {
  max-width: 100%;
  height: auto;
}

blockquote {
  margin-left: 0;
  padding-left: var(--space-5);
  border-left: var(--border-accent) solid var(--color-teal);
  color: var(--color-ink);
  font-size: var(--font-size-lead);
}

code {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.9em;
}

/* ---------- Links and focus ---------- */
a {
  color: var(--color-teal-dark);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--color-teal-dark-hover);
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 3px solid var(--color-teal);
  outline-offset: 2px;
}

/* ---------- Layout helpers ---------- */
.container {
  width: 100%;
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.prose {
  max-width: var(--measure);
}

.lead {
  color: var(--color-text);
  font-size: var(--font-size-lead);
  line-height: 1.55;
}

/* Texts typed in the admin as plain text (the home page's): their line breaks show as typed. */
.text-lines {
  white-space: pre-line;
}

.meta {
  color: var(--color-muted);
  font-size: var(--font-size-small);
}

.section {
  padding: var(--space-7) 0;
}

.section--subtle {
  background: var(--color-bg-subtle);
}

.section__header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-2) var(--space-5);
  margin-bottom: var(--space-5);
}

.section__header h2 {
  margin: 0;
}

@media (min-width: 48rem) {
  .section {
    padding: var(--space-8) 0;
  }
}

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

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -4rem;
  z-index: 20;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-small);
  background: var(--color-ink);
  color: var(--color-white);
  font-weight: var(--font-weight-strong);
}

.skip-link:focus {
  top: var(--space-2);
}

/* The general a:hover colour is dark teal, which would vanish on the ink background. */
.skip-link:hover {
  color: var(--color-white);
}

main {
  display: block;
}

main:focus {
  outline: none;
}

.page {
  padding-top: var(--space-6);
  padding-bottom: var(--space-8);
}

.icon {
  display: inline-block;
  flex: none;
  width: 1.25rem;
  height: 1.25rem;
  fill: currentColor;
}

/* ---------- Header ---------- */
.site-header {
  position: relative;
  z-index: 10;
  background: var(--color-bg);
  border-bottom: var(--border-thin) solid var(--color-line);
}

/* Logo on the left, the tools group on the right. With large text on a narrow screen the group wraps below the
   logo, still right-aligned, instead of pushing the page sideways. */
.site-header__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) var(--space-4);
  min-height: var(--header-height);
  padding-top: var(--space-2);
  padding-bottom: var(--space-2);
}

.site-logo {
  display: block;
  flex: none;
  margin-right: auto;
  border-radius: var(--radius-small);
}

.site-logo img {
  display: block;
  width: 58px;
  height: auto;
}

.site-header__tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-2) var(--space-4);
  margin-left: auto;
}

/* Desktop menu: hidden on small screens, where the menu button takes over. */
.site-nav {
  display: none;
}

.site-nav ul,
.mobile-menu__nav ul,
.lang-toggle ul,
.social-links {
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav li + li,
.mobile-menu__nav li + li,
.lang-toggle li + li,
.social-links li + li {
  margin-top: 0;
}

.site-nav ul {
  display: flex;
  gap: var(--space-1);
}

.site-nav a {
  display: block;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-small);
  color: var(--color-ink);
  font-weight: var(--font-weight-medium);
  text-decoration: none;
}

.site-nav a:hover {
  background: var(--color-bg-subtle);
  color: var(--color-ink);
}

.site-nav a[aria-current="page"] {
  color: var(--color-teal-dark);
  box-shadow: inset 0 -3px 0 var(--color-teal);
  border-radius: var(--radius-small) var(--radius-small) 0 0;
}

/* Language switch: a two-option toggle, the current language filled. */
.lang-toggle ul,
.lang-toggle li {
  display: flex;
}

.lang-toggle ul {
  min-height: 2.875rem;
  border: var(--border-thin) solid var(--color-field);
  border-radius: var(--radius-small);
  overflow: hidden;
}

.lang-toggle a,
.lang-toggle [aria-current="true"] {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 2.75rem;
  padding: 0.35rem 0.6rem;
  font-size: var(--font-size-small);
  font-weight: var(--font-weight-strong);
  line-height: 1.4;
  text-align: center;
  text-decoration: none;
}

.lang-toggle a {
  color: var(--color-ink);
}

.lang-toggle a:hover {
  background: var(--color-bg-subtle);
  color: var(--color-ink);
}

.lang-toggle [aria-current="true"] {
  background: var(--color-ink);
  color: var(--color-white);
}

.lang-toggle a:focus-visible {
  outline-offset: -3px;
}

/* Search: an icon link the height of the language switch, beside it. */
.header-search {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.875rem;
  height: 2.875rem;
  border: var(--border-thin) solid var(--color-field);
  border-radius: var(--radius-small);
  color: var(--color-ink);
}

.header-search:hover {
  background: var(--color-bg-subtle);
  color: var(--color-ink);
}

.header-search[aria-current="page"] {
  background: var(--color-ink);
  border-color: var(--color-ink);
  color: var(--color-white);
}

/* Mobile menu: a button that shows and hides the panel under the header (js/site.js; css/nojs.css without it). */
.mobile-menu {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 2.875rem;
  margin: 0;
  padding: 0 var(--space-3);
  border: var(--border-thin) solid var(--color-field);
  border-radius: var(--radius-small);
  background: none;
  color: var(--color-ink);
  font: var(--font-weight-strong) var(--font-size-small) / 1.4 var(--font-sans);
  cursor: pointer;
}

.mobile-menu .icon--close,
.mobile-menu[aria-expanded="true"] .icon--menu {
  display: none;
}

.mobile-menu[aria-expanded="true"] .icon--close {
  display: inline-block;
}

.mobile-menu__panel[hidden] {
  display: none;
}

.mobile-menu__panel {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  padding: var(--space-3) var(--gutter) var(--space-5);
  border-bottom: var(--border-thin) solid var(--color-line);
  background: var(--color-bg);
}

.mobile-menu__nav a {
  display: block;
  padding: var(--space-3) 0;
  border-bottom: var(--border-thin) solid var(--color-line);
  color: var(--color-ink);
  font-weight: var(--font-weight-medium);
  text-decoration: none;
}

.mobile-menu__nav a[aria-current="page"] {
  color: var(--color-teal-dark);
}

.mobile-menu__panel .social-links {
  margin-top: var(--space-4);
}

/* Instagram beside the desktop menu, an outlined square like the search icon; shown from 64rem, where the menu
   panel (which has its own copy) is gone. */
.site-header__social {
  display: none;
}

.site-header__social .social-links a {
  width: 2.875rem;
  height: 2.875rem;
  border: var(--border-thin) solid var(--color-field);
}

@media (min-width: 48rem) {
  .site-logo img {
    width: 66px;
  }
}

@media (min-width: 64rem) {
  .site-nav {
    display: flex;
  }

  .mobile-menu,
  .mobile-menu__panel {
    display: none;
  }

  .site-header__social {
    display: block;
  }

  .site-header__inner,
  .site-header__tools {
    column-gap: var(--space-5);
  }

  /* The menu sits between the logo and the tools here; the logo's auto margin alone pushes both right. */
  .site-header__tools {
    margin-left: 0;
  }
}

/* ---------- Social links ---------- */
.social-links {
  display: flex;
  gap: var(--space-2);
}

.social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: var(--radius-small);
  color: var(--color-ink);
}

.social-links a:hover {
  background: var(--color-bg-subtle);
  color: var(--color-teal-dark);
}

.site-footer .social-links a {
  color: var(--color-white);
  border: var(--border-thin) solid var(--color-on-ink-rule);
}

.site-footer .social-links a:hover {
  background: transparent;
  border-color: var(--color-teal-light);
  color: var(--color-teal-light);
}

/* ---------- Breadcrumbs ---------- */
.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  margin: 0 0 var(--space-4);
  padding: 0;
  list-style: none;
  color: var(--color-muted);
  font-size: var(--font-size-small);
}

/* min-width: 0 lets a crumb holding one very long word shrink, so the word breaks instead of widening the page. */
.breadcrumbs li {
  min-width: 0;
}

.breadcrumbs li + li {
  margin-top: 0;
}

.breadcrumbs li + li::before {
  content: "›";
  margin: 0 var(--space-2);
  color: var(--color-muted);
}

/* ---------- Buttons ---------- */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 2.875rem;
  padding: 0.65rem 1.25rem;
  border: var(--border-thin) solid var(--color-teal-dark);
  border-radius: var(--radius-small);
  background: var(--color-teal-dark);
  color: var(--color-white);
  font: var(--font-weight-strong) var(--font-size-ui)/1.3 var(--font-sans);
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.button:hover {
  border-color: var(--color-teal-dark-hover);
  background: var(--color-teal-dark-hover);
  color: var(--color-white);
  text-decoration: none;
}

.button--secondary {
  border-color: var(--color-field);
  background: var(--color-surface);
  color: var(--color-ink);
}

.button--secondary:hover {
  border-color: var(--color-ink);
  background: var(--color-surface);
  color: var(--color-ink);
}

.button--small {
  min-height: 2.25rem;
  padding: 0.35rem 0.85rem;
  font-size: var(--font-size-small);
}

.button[disabled],
.button[aria-disabled="true"] {
  opacity: 0.5;
  cursor: not-allowed;
}

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

/* A standalone "more" link: semibold, underlined like every other link (no arrow glyph). */
.link-more {
  font-weight: var(--font-weight-strong);
}

/* ---------- Forms ---------- */
.field {
  margin: 0 0 var(--space-5);
}

label,
.label {
  display: block;
  margin-bottom: var(--space-1);
  color: var(--color-ink);
  font-weight: var(--font-weight-strong);
}

.label__optional {
  color: var(--color-muted);
  font-weight: var(--font-weight-normal);
}

.hint {
  display: block;
  margin: 0 0 var(--space-2);
  color: var(--color-muted);
  font-size: var(--font-size-small);
}

input:not([type="checkbox"], [type="radio"], [type="submit"], [type="button"], [type="hidden"]),
select,
textarea {
  display: block;
  width: 100%;
  max-width: 32rem;
  min-height: 2.875rem;
  padding: 0.55rem 0.75rem;
  border: var(--border-thin) solid var(--color-field);
  border-radius: var(--radius-small);
  background: var(--color-surface);
  color: var(--color-text);
  font: inherit;
}

input.input--short {
  max-width: 8rem;
}

textarea {
  max-width: var(--measure);
  min-height: 9rem;
  resize: vertical;
}

input:hover,
select:hover,
textarea:hover {
  border-color: var(--color-muted);
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  border-color: var(--color-teal-dark);
}

fieldset {
  min-inline-size: 0; /* browsers default to min-content, which overflows narrow screens with large text */
  margin: 0 0 var(--space-5);
  padding: var(--space-4) var(--space-5) var(--space-2);
  border: var(--border-thin) solid var(--color-line);
  border-radius: var(--radius-card);
  background: var(--color-surface);
}

legend {
  padding: 0 var(--space-1);
  color: var(--color-ink);
  font-weight: var(--font-weight-strong);
}

.choice {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  margin: 0 0 var(--space-3);
}

.choice label {
  min-width: 0;
  margin: 0;
  color: var(--color-text);
  font-weight: var(--font-weight-normal);
}

.choice input {
  flex: none;
  width: 1.25rem;
  height: 1.25rem;
  margin: 0.2rem 0 0;
  accent-color: var(--color-teal-dark);
}

.field--error input,
.field--error select,
.field--error textarea {
  border: 2px solid var(--color-error);
}

.error-message {
  display: block;
  margin: 0 0 var(--space-2);
  color: var(--color-error);
  font-size: var(--font-size-small);
  font-weight: var(--font-weight-strong);
}

.error-summary {
  margin: 0 0 var(--space-5);
  padding: var(--space-4) var(--space-5);
  border: 2px solid var(--color-error);
  border-radius: var(--radius-card);
  background: var(--color-surface);
}

.error-summary h2 {
  margin: 0 0 var(--space-2);
  color: var(--color-error);
  font-size: var(--font-size-h4);
}

.error-summary a {
  color: var(--color-error);
}

/* ---------- Notices ---------- */
.notice {
  margin: var(--space-5) 0;
  padding: var(--space-4) var(--space-5);
  border: var(--border-thin) solid var(--color-line);
  border-radius: var(--radius-small);
  background: var(--color-tint);
}

.notice > :last-child {
  margin-bottom: 0;
}

.notice--warning {
  border-color: var(--color-warning);
  background: var(--color-surface);
}

.notice--error {
  border-color: var(--color-error);
  background: var(--color-surface);
}

.notice__title {
  display: block;
  margin-bottom: var(--space-1);
  color: var(--color-ink);
  font-weight: var(--font-weight-strong);
}

.notice--warning .notice__title { color: var(--color-warning); }
.notice--error .notice__title { color: var(--color-error); }

/* ---------- Status labels ---------- */
.badge {
  display: inline-block;
  padding: 0.1rem 0.5rem;
  border: var(--border-thin) solid currentColor;
  border-radius: var(--radius-small);
  background: var(--color-surface);
  font-size: var(--font-size-caption);
  font-weight: var(--font-weight-strong);
  line-height: 1.5;
}

.badge--upcoming { color: var(--color-teal-dark); }
.badge--open { border-color: var(--color-teal-dark); background: var(--color-teal-dark); color: var(--color-white); }
.badge--completed { color: var(--color-muted); }
.badge--postponed { color: var(--color-warning); }
.badge--cancelled { color: var(--color-error); }
.badge--draft { color: var(--color-muted); border-style: dashed; }

/* ---------- Cards ---------- */
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: var(--space-5);
  border: var(--border-thin) solid var(--color-line);
  border-radius: var(--radius-card);
  background: var(--color-surface);
}

.card > :last-child {
  margin-bottom: 0;
}

.card--link:hover {
  border-color: var(--color-teal);
}

/* The title link covers the whole card, so the entire card is clickable without nesting links. */
.card--link .card__title a::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--radius-card);
}

.card--link .card__title a:focus-visible {
  outline: none;
}

.card--link:has(.card__title a:focus-visible) {
  outline: 3px solid var(--color-teal);
  outline-offset: 2px;
}

.card__title {
  margin: 0 0 var(--space-2);
  font-size: var(--font-size-h3);
}

.card__title a {
  color: var(--color-ink);
  text-decoration: none;
}

.card__title a:hover {
  text-decoration: underline;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 18rem), 1fr));
  gap: var(--space-5);
  margin: 0 0 var(--space-5);
  padding: 0;
  list-style: none;
}

.card-grid > li {
  display: flex;
  min-width: 0;
}

.card-grid > li + li {
  margin-top: 0;
}

.card-grid > li > .card {
  flex: 1;
  min-width: 0;
}

.facts {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: var(--space-1) var(--space-4);
  margin: 0 0 var(--space-4);
}

.facts dt {
  color: var(--color-muted);
  font-weight: var(--font-weight-strong);
}

.facts dd {
  margin: 0;
}

/* Event card: date tile beside the text. */
.event-card {
  display: grid;
  grid-template-columns: 4rem minmax(0, 1fr);
  gap: var(--space-4);
  align-items: start;
}

.event-card .card__title {
  font-size: var(--font-size-h4);
  letter-spacing: 0;
}

.event-card__body > :last-child {
  margin-bottom: 0;
}

.date-tile {
  padding: var(--space-2) var(--space-1);
  border-radius: var(--radius-small);
  background: var(--color-tint);
  color: var(--color-ink);
  text-align: center;
  line-height: 1.1;
}

.date-tile__day {
  display: block;
  font-size: var(--font-size-date);
  font-weight: var(--font-weight-strong);
  letter-spacing: -0.02em;
}

.date-tile__month {
  display: block;
  margin-top: 0.15rem;
  color: var(--color-teal-dark);
  font-size: var(--font-size-caption);
  font-weight: var(--font-weight-strong);
}

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

.event-list > li {
  position: relative;
  display: grid;
  grid-template-columns: 4rem minmax(0, 1fr);
  gap: var(--space-4);
  align-items: start;
  margin: 0;
  padding: var(--space-4) 0;
  border-top: var(--border-thin) solid var(--color-line);
}

/* Very large text on a narrow screen (under 20em wide, which a 320px phone at normal text size is not): the date
   tile goes above the title instead of squeezing it into a thin column. */
@media (width < 20em) {
  .event-card,
  .event-list > li {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-3);
  }

  .event-card > .date-tile,
  .event-list > li > .date-tile {
    justify-self: start;
    min-width: 4rem;
  }

  .button {
    overflow-wrap: anywhere;
  }
}

.event-list > li:last-child {
  border-bottom: var(--border-thin) solid var(--color-line);
}

.event-list__title {
  margin: 0 0 var(--space-1);
  font-size: var(--font-size-h4);
  letter-spacing: 0;
}

.event-list__title a {
  color: var(--color-ink);
}

/* The title link covers the whole row (date tile and summary too), like .card--link: a large tap target, no nested links. */
.event-list__title a::after {
  content: "";
  position: absolute;
  inset: 0;
}

.event-list > li:hover .event-list__title a {
  text-decoration-thickness: 2px;
}

.event-list__title a:focus-visible {
  outline: none;
}

.event-list > li:has(.event-list__title a:focus-visible) {
  outline: 3px solid var(--color-teal);
  outline-offset: 2px;
}

/* Organisation card: the logo in a white circle above the name, both centred; the whole card is the link. */
.org-card {
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-6) var(--space-4);
  text-align: center;
}

.org-card__mark {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 5.5rem;
  height: 5.5rem;
  overflow: hidden; /* most logos are round artwork on a white square: the circle trims the corners */
  border: var(--border-thin) solid var(--color-line);
  border-radius: 50%;
  background: var(--color-white);
}

.org-card__logo {
  display: block;
  width: 100%;
  height: 100%;
}

.org-card__initials {
  color: var(--color-teal-dark);
  font-size: var(--font-size-h3);
  font-weight: var(--font-weight-strong);
  line-height: 1;
}

.org-card__name {
  margin: 0;
  font-size: var(--font-size-body);
  font-weight: var(--font-weight-medium);
  line-height: 1.4;
}

.org-card__name a {
  color: var(--color-ink);
  text-decoration: none;
}

.org-card__name a:hover {
  text-decoration: underline;
}

/* Organisation cards: two across on phones, three from 48rem, four from 64rem. */
.org-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-4);
  margin: 0 0 var(--space-5);
  padding: 0;
  list-style: none;
}

.org-grid > li {
  display: flex;
  min-width: 0;
}

.org-grid > li + li {
  margin-top: 0;
}

.org-grid > li > .card {
  flex: 1;
  min-width: 0;
}

@media (min-width: 48rem) {
  .org-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--space-5);
  }
}

@media (min-width: 64rem) {
  .org-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* Very large text on a narrow screen (under 20em wide): one card per row. */
@media (width < 20em) {
  .org-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* A centred section opening (the home page's organisations) and its closing link. */
.section__intro {
  max-width: var(--measure-wide);
  margin: 0 auto var(--space-6);
  text-align: center;
}

.section__intro h2 {
  margin-top: 0;
}

.section__intro > :last-child {
  margin-bottom: 0;
}

.section__more {
  margin: var(--space-5) 0 0;
  text-align: center;
}

.download {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) var(--space-4);
  padding: var(--space-4) var(--space-5);
  border: var(--border-thin) solid var(--color-line);
  border-radius: var(--radius-card);
  background: var(--color-surface);
}

/* ---------- Home page ---------- */
.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  min-height: clamp(26rem, 62vh, 40rem);
  padding: var(--space-7) 0;
  overflow: hidden;
  background: var(--color-ink);
  color: var(--color-white);
}

.hero__image,
.hero__image img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero__image {
  z-index: -2;
}

.hero__image img {
  object-fit: cover;
  border-radius: 0;
}

/* A solid scrim, not a gradient: white text stays at 5:1 or better over any photo. */
.hero:not(.hero--no-image)::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: color-mix(in srgb, var(--color-ink) 70%, transparent);
}

.hero__content {
  text-align: center;
}

.hero__logo {
  margin: 0 auto var(--space-5);
  line-height: 0;
}

.hero__logo img {
  display: block;
  width: 176px;
  height: auto;
  margin: 0 auto;
}

.hero__lead {
  max-width: var(--measure);
  margin: 0 auto var(--space-5);
  color: var(--color-white);
  font-size: var(--font-size-lead);
  line-height: 1.5;
}

/* One centred column: the upcoming-events button, then any open forms under it, all as wide as the widest. */
.hero__actions {
  display: grid;
  justify-content: center;
  gap: var(--space-3);
}

.hero :focus-visible {
  outline-color: var(--color-teal-light);
}

.button--light {
  border-color: var(--color-white);
  background: var(--color-white);
  color: var(--color-ink);
}

.button--light:hover {
  border-color: var(--color-tint);
  background: var(--color-tint);
  color: var(--color-ink);
}

/* The hero's second rank: white outline and label on the dark surface. */
.button--outline-light {
  border-color: var(--color-white);
  background: transparent;
  color: var(--color-white);
}

.button--outline-light:hover {
  border-color: var(--color-white);
  background: color-mix(in srgb, var(--color-white) 14%, transparent);
  color: var(--color-white);
}

@media (min-width: 48rem) {
  .hero__logo img {
    width: 240px;
  }
}

/* About us and vision, merged: who we are beside where we are going. */
.about-vision {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-6);
  align-items: start;
}

.about-vision h2 {
  margin-top: 0;
}

.vision-card {
  padding: var(--space-6);
  border-radius: var(--radius-card);
  background: var(--color-tint);
  color: var(--color-ink);
}

.vision-card h3 {
  margin: 0 0 var(--space-3);
  color: var(--color-teal-dark);
  font-size: var(--font-size-h4);
  letter-spacing: 0;
}

.vision-card p {
  margin: 0;
  font-size: var(--font-size-lead);
  line-height: 1.55;
}

.steps-heading {
  margin-top: var(--space-7);
}

.steps {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-5) var(--space-6);
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.steps li {
  position: relative;
  margin: 0;
  padding: 0.25rem 0 0 3.25rem; /* small screens: number beside the text */
  counter-increment: step;
}

.steps li + li {
  margin-top: 0;
}

.steps li::before {
  content: counter(step);
  position: absolute;
  top: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border: 2px solid var(--color-teal);
  border-radius: 50%;
  color: var(--color-teal-dark);
  font-weight: var(--font-weight-strong);
}

.empty-state {
  padding: var(--space-6) var(--space-5);
  border: var(--border-thin) dashed var(--color-field);
  border-radius: var(--radius-card);
  color: var(--color-muted);
  text-align: center;
}

@media (min-width: 40rem) {
  .steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 56rem) {
  .about-vision {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: var(--space-7);
  }
}

@media (min-width: 64rem) {
  .steps {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  /* Four across: number above the text. */
  .steps li {
    padding: 3.25rem 0 0;
  }
}

/* ---------- Tables ---------- */
/* position: relative makes this the containing block of visually hidden cell text, which is absolutely
   positioned and would otherwise escape the scroll box and widen the page. */
.table-scroll {
  position: relative;
  max-width: 100%;
  overflow-x: auto;
  border: var(--border-thin) solid var(--color-line);
  border-radius: var(--radius-card);
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--color-surface);
  font-size: var(--font-size-small);
  font-variant-numeric: tabular-nums;
}

.table-scroll table {
  margin: 0;
}

caption {
  padding: var(--space-3) var(--space-4) 0;
  color: var(--color-ink);
  font-weight: var(--font-weight-strong);
  text-align: left;
}

th {
  font-weight: var(--font-weight-strong);
}

th,
td {
  padding: var(--space-3) var(--space-4);
  border-bottom: var(--border-thin) solid var(--color-line);
  text-align: left;
  vertical-align: top;
}

thead th {
  border-bottom: 2px solid var(--color-ink);
  color: var(--color-ink);
  white-space: nowrap;
}

tbody tr:last-child td {
  border-bottom: 0;
}

/* ---------- Figures ---------- */
figure {
  margin: var(--space-5) 0;
}

figure img {
  border-radius: var(--radius-card);
}

figcaption {
  margin-top: var(--space-2);
  color: var(--color-muted);
  font-size: var(--font-size-small);
}

/* ---------- Pagination ---------- */
.pagination ul {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin: var(--space-5) 0;
  padding: 0;
  list-style: none;
}

.pagination li + li {
  margin-top: 0;
}

.pagination a,
.pagination [aria-current="page"] {
  display: inline-block;
  min-width: 2.75rem;
  min-height: 2.75rem;
  padding: 0.55rem 0.8rem;
  border: var(--border-thin) solid var(--color-line);
  border-radius: var(--radius-small);
  background: var(--color-surface);
  text-align: center;
  text-decoration: none;
}

.pagination a:hover {
  border-color: var(--color-teal-dark);
}

.pagination [aria-current="page"] {
  border-color: var(--color-ink);
  background: var(--color-ink);
  color: var(--color-white);
  font-weight: var(--font-weight-strong);
}

/* ---------- Content pages ---------- */
/* Page title block: title, then its status and lead. */
.page-header {
  max-width: var(--measure-wide);
  margin-bottom: var(--space-6);
}

.page-header h1 {
  margin-bottom: var(--space-3);
}

.page-header > :last-child {
  margin-bottom: 0;
}

.section-block {
  margin-top: var(--space-7);
}

.section-block > h2 {
  margin-bottom: var(--space-4);
}

/* Detail pages: the story on the left, the key facts beside it on wide screens. */
.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-6);
}

.detail-layout__main > section {
  margin-top: var(--space-7);
}

.detail-layout__main > :first-child {
  margin-top: 0;
}

.detail-layout__aside > * + * {
  margin-top: var(--space-6);
}

/* The grid gap spaces the blocks; a heading that opens one adds no margin on top of it. */
.detail-layout__main > :first-child > h2:first-child,
.detail-layout__aside > :first-child > h2:first-child {
  margin-top: 0;
}

/* Wide screens: the main text on the left across both rows; the details card, then the organisations and
   reports, on the right. The last row takes any spare height, so the right column stays packed at the top. */
@media (min-width: 64rem) {
  .detail-layout {
    grid-template-columns: minmax(0, 2fr) minmax(16rem, 1fr);
    grid-template-rows: auto 1fr;
    gap: var(--space-6) var(--space-7);
    align-items: start;
  }

  .detail-layout__main {
    grid-column: 1;
    grid-row: 1 / span 2;
  }

  .detail-layout__facts {
    grid-column: 2;
    grid-row: 1;
  }

  .detail-layout__aside {
    grid-column: 2;
    grid-row: 2;
  }
}

.event-cover-figure {
  margin: 0 0 var(--space-6);
}

.event-cover img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius-card);
}

.facts__line {
  display: block;
}

.apply-box {
  margin-top: var(--space-4);
  padding-top: var(--space-4);
  border-top: var(--border-thin) solid var(--color-line);
}

.apply-box > :last-child {
  margin-bottom: 0;
}

/* The event's form buttons (questions, attendance), one per line and equally wide. */
.apply-box .button {
  width: 100%;
}

/* Organisations and speakers beside an event: a name per line, its role under it. */
.people-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.people-list > li {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  padding: var(--space-2) 0;
  border-bottom: var(--border-thin) solid var(--color-line);
}

.people-list > li + li {
  margin-top: 0;
}

/* Speakers who agreed to be named. */
.name-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-5);
  margin: 0;
  padding: 0;
  list-style: none;
}

.name-list > li + li {
  margin-top: 0;
}

/* Event photos: two across from tablet width, captions under each. */
.gallery {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-5);
  margin: 0;
  padding: 0;
  list-style: none;
}

.gallery > li + li {
  margin-top: 0;
}

.gallery figure {
  margin: 0;
}

.gallery__image img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius-card);
}

@media (min-width: 40rem) {
  .gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Organisation logos are served as <picture>; the frame is on the picture, the image fits inside. */
picture.org-card__logo,
picture.org-logo {
  display: block;
}

.org-card__logo img,
.org-logo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.org-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: var(--space-5);
  max-width: none;
}

.org-header > div {
  flex: 1 1 20rem;
  min-width: 0;
  max-width: var(--measure);
}

.org-logo {
  flex: none;
  width: 8rem;
  height: 8rem;
  padding: var(--space-2);
  border: var(--border-thin) solid var(--color-line);
  border-radius: var(--radius-small);
  background: var(--color-white);
}

/* FAQ on the about page */
.faq__item {
  max-width: var(--measure);
  padding: var(--space-4) 0;
  border-top: var(--border-thin) solid var(--color-line);
}

.faq__item h3 {
  margin-bottom: var(--space-2);
  font-size: var(--font-size-h4);
  letter-spacing: 0;
}

.faq__item .prose > :last-child {
  margin-bottom: 0;
}

/* Forms on a page of their own keep a readable width. */
.form-page {
  max-width: var(--measure);
}

/* Take-part page: the step's number above its heading, and Back to the left of the forward button, which comes
   first in the markup so Enter in a field moves on. */
.form-step {
  margin-top: var(--space-6);
}

.form-step__progress {
  margin: 0 0 var(--space-1);
  color: var(--color-muted);
  font-size: var(--font-size-small);
  font-weight: var(--font-weight-strong);
}

.form-step h2 {
  margin-top: 0;
}

.actions--steps {
  flex-direction: row-reverse;
  justify-content: flex-end;
}

.form fieldset + fieldset,
.form .field + fieldset,
.form fieldset + .field {
  margin-top: var(--space-5);
}

/* Bots fill every field; people never see this one. Off-screen rather than display:none, which some bots skip. */
.honeypot {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Browser surfaces in the palette */
::selection {
  background: var(--color-tint);
  color: var(--color-ink);
}

input,
textarea {
  caret-color: var(--color-teal-dark);
}

.date-tile,
.pagination {
  font-variant-numeric: tabular-nums;
}

/* ---------- Search ---------- */
.search-form {
  max-width: 42rem;
  margin-bottom: var(--space-6);
}

.search-form label {
  display: block;
  margin-bottom: var(--space-2);
  font-weight: var(--font-weight-strong);
}

.search-form__row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

.search-form__row input {
  flex: 1 1 14rem;
  min-width: 0;
}

.search-results__list {
  max-width: 42rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.search-results__list > li {
  padding: var(--space-5) 0;
  border-top: var(--border-thin) solid var(--color-hairline);
}

.search-results__list > li > * {
  margin: 0;
}

.search-results__list > li > * + * {
  margin-top: var(--space-2);
}

.search-results__title {
  font-size: var(--font-size-h3);
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--color-ink);
  color: var(--color-white);
  font-size: var(--font-size-small);
}

.site-footer a {
  color: var(--color-teal-light);
}

.site-footer a:hover {
  color: var(--color-white);
}

.site-footer :focus-visible {
  outline-color: var(--color-teal-light);
}

/* The brand block (logo, one line about the platform, social links), then the link groups: side by side (one column
   with very large text), and beside the brand block from 64rem. */
.site-footer__main {
  display: grid;
  gap: var(--space-7);
  padding-top: var(--space-7);
  padding-bottom: var(--space-7);
}

.site-footer__nav {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 9.5rem), 1fr));
  gap: var(--space-6) var(--space-5);
}

@media (min-width: 48rem) {
  .site-footer__main {
    padding-top: var(--space-8);
  }
}

@media (min-width: 64rem) {
  .site-footer__main {
    grid-template-columns: minmax(0, 5fr) minmax(0, 8fr);
  }

  .site-footer__nav {
    column-gap: var(--space-6);
  }
}

.site-footer h2 {
  margin: 0 0 var(--space-3);
  color: var(--color-white);
  font-size: var(--font-size-h4);
  letter-spacing: 0;
}

.site-footer ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer li + li {
  margin-top: var(--space-2);
}

.site-footer .social-links {
  margin-top: var(--space-5);
}

.site-footer .social-links li + li {
  margin-top: 0;
}

.site-footer p {
  margin: 0 0 var(--space-3);
  color: var(--color-on-ink-muted);
}

.site-footer__brand h2 {
  margin-bottom: var(--space-5);
}

.site-footer__logo {
  display: block;
  width: 96px;
  height: auto;
}

.site-footer__about {
  max-width: 24rem;
  font-size: var(--font-size-ui);
}

/* Inside the container, so the rule lines up with the content above it. */
.site-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-2) var(--space-5);
  padding-top: var(--space-5);
  padding-bottom: var(--space-6);
  border-top: var(--border-thin) solid var(--color-on-ink-rule);
  color: var(--color-on-ink-muted);
  font-size: var(--font-size-small);
}

.site-footer__bottom p {
  margin: 0;
}

/* ---------- Touch ---------- */
/* Any touch input, including touch laptops: small text links get about 40px of height to tap. Footer rows grow
   for real; breadcrumbs and "more" links grow only their hit area (negative margins keep the layout as it is). */
@media (any-pointer: coarse) {
  .site-footer__nav a {
    display: inline-block;
    padding: 0.6875rem 0; /* 14px text at line height 1.6 plus this = 44px */
  }

  .site-footer__nav li + li {
    margin-top: 0;
  }

  .breadcrumbs ol {
    row-gap: var(--space-4);
  }

  .breadcrumbs a,
  .link-more {
    display: inline-block;
    padding: var(--space-2) 0;
    margin: calc(-1 * var(--space-2)) 0;
  }
}

/* ---------- Windows high contrast ---------- */
/* Forced colours drop backgrounds and box shadows; the current page and the selected options need another cue. */
@media (forced-colors: active) {
  .site-nav a[aria-current="page"],
  .mobile-menu__nav a[aria-current="page"] {
    text-decoration: underline;
    text-decoration-thickness: 3px;
    text-underline-offset: 0.35em;
  }

  .lang-toggle [aria-current="true"],
  .pagination [aria-current="page"] {
    forced-color-adjust: none;
    background: Highlight;
    color: HighlightText;
  }
}

/* ---------- Motion and print ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

@media print {
  .site-header,
  .site-footer,
  .skip-link {
    display: none;
  }

  a {
    color: inherit;
  }
}
