/*
 * Public pages (ADR 0057): the platform's design tokens (frontend/src/index.css, ADR 0008; a
 * frontend test keeps the values equal), brand tokens overridden per organization in the page
 * (app.branding.theme). Light or dark follows the visitor's system setting. Written by hand: a
 * few small templates, no build step in the backend image.
 */

:root {
  --background: #f4f6f8;
  --surface: #ffffff;
  --surface-muted: #edf0f3;
  --foreground: #17222d;
  --muted-foreground: #4f5b67;
  --border: #d3d9df;
  --border-strong: #7f8b98;

  --primary: #0e6b63;
  --primary-hover: #0b5c55;
  --primary-active: #094d47;
  --primary-foreground: #ffffff;
  --primary-emphasis: #0e6b63;
  --primary-subtle: #e2f1ef;
  --primary-subtle-foreground: #0a4d47;
  --accent: #a3540a;
  --accent-foreground: #ffffff;
  --accent-subtle: #fbeee0;
  --accent-subtle-foreground: #7a3e05;
  --danger: #b42318;
  --danger-subtle: #fbe8e6;
  --danger-subtle-foreground: #8a1a12;

  --focus-ring: #17222d;
  --focus-gap: #ffffff;

  --font-sans: 'Atkinson Hyperlegible Next Variable', system-ui, 'Segoe UI', sans-serif;
  --radius-control: 0.375rem;
  --radius-panel: 0.625rem;

  color-scheme: light;
}

/* Dark from the system setting, unless a page asks for one look (the widget's option). */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --background: #0f161d;
    --surface: #16202a;
    --surface-muted: #1e2934;
    --foreground: #e8edf2;
    --muted-foreground: #a7b3bf;
    --border: #2c3946;
    --border-strong: #6b7a89;

    --primary: #4fb3a8;
    --primary-hover: #66c1b6;
    --primary-active: #7fcdc3;
    --primary-foreground: #0b1a18;
    --primary-emphasis: #6cc4b9;
    --primary-subtle: #133631;
    --primary-subtle-foreground: #a6e0d8;
    --accent: #e39a4f;
    --accent-foreground: #1d1105;
    --accent-subtle: #3a2511;
    --accent-subtle-foreground: #f4c99a;
  --danger: #f2877d;
  --danger-subtle: #3d1714;
  --danger-subtle-foreground: #f8beb8;

    --focus-ring: #e8edf2;
    --focus-gap: #0f161d;

    color-scheme: dark;
  }
}

:root[data-theme='dark'] {
  --background: #0f161d;
  --surface: #16202a;
  --surface-muted: #1e2934;
  --foreground: #e8edf2;
  --muted-foreground: #a7b3bf;
  --border: #2c3946;
  --border-strong: #6b7a89;

  --primary: #4fb3a8;
  --primary-hover: #66c1b6;
  --primary-active: #7fcdc3;
  --primary-foreground: #0b1a18;
  --primary-emphasis: #6cc4b9;
  --primary-subtle: #133631;
  --primary-subtle-foreground: #a6e0d8;
  --accent: #e39a4f;
  --accent-foreground: #1d1105;
  --accent-subtle: #3a2511;
  --accent-subtle-foreground: #f4c99a;
  --danger: #f2877d;
  --danger-subtle: #3d1714;
  --danger-subtle-foreground: #f8beb8;

  --focus-ring: #e8edf2;
  --focus-gap: #0f161d;

  color-scheme: dark;
}

/* --- Base ------------------------------------------------------------------------------- */

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

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

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--background);
  color: var(--foreground);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: 650;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

h1 {
  font-size: 1.75rem;
  line-height: 2.25rem;
}

h2 {
  font-size: 1.1875rem;
  line-height: 1.75rem;
}

h3 {
  font-size: 1rem;
  line-height: 1.5rem;
}

@media (min-width: 48rem) {
  h1 {
    font-size: 2.0625rem;
    line-height: 2.5rem;
  }
}

p {
  margin: 0;
}

a {
  color: var(--primary-emphasis);
  text-underline-offset: 3px;
}

img {
  max-width: 100%;
  display: block;
}

:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 2px var(--focus-gap),
    0 0 0 4px var(--focus-ring);
  border-radius: 2px;
}

main:focus {
  outline: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -3rem;
  z-index: 10;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-control);
  background: var(--surface);
  color: var(--foreground);
}

.skip-link:focus {
  top: 0.75rem;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* --- Layout ----------------------------------------------------------------------------- */

.container {
  width: 100%;
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 1rem;
}

@media (min-width: 48rem) {
  .container {
    padding: 0 1.5rem;
  }
}

.main {
  flex: 1;
  padding-top: 2rem;
  padding-bottom: 3rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  color: var(--foreground);
  text-decoration: none;
  min-width: 0;
}

.brand-logo {
  max-height: 2.5rem;
  width: auto;
}

.brand-name {
  font-weight: 700;
  font-size: 1.1875rem;
  overflow-wrap: anywhere;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.language-switch {
  display: flex;
  gap: 0.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.language-switch a {
  display: inline-block;
  padding: 0.375rem 0.5rem;
  border-radius: var(--radius-control);
  color: var(--muted-foreground);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 600;
}

.language-switch a[aria-current='page'] {
  color: var(--primary-subtle-foreground);
  background: var(--primary-subtle);
}

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted-foreground);
  font-size: 0.875rem;
}

.footer-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  padding-top: 1.25rem;
  padding-bottom: 1.25rem;
}

/* --- Elements --------------------------------------------------------------------------- */

.lead {
  font-size: 1.1875rem;
  line-height: 1.75rem;
  color: var(--muted-foreground);
  max-width: 48rem;
}

.muted {
  color: var(--muted-foreground);
}

.strong {
  font-weight: 600;
}

.pre-line {
  white-space: pre-line;
}

.price {
  font-weight: 650;
}

.breadcrumb {
  font-size: 0.875rem;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-panel);
  padding: 1.25rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0.5rem 1.125rem;
  border-radius: var(--radius-control);
  border: 1px solid transparent;
  background: var(--primary);
  color: var(--primary-foreground);
  font-weight: 600;
  text-decoration: none;
  text-align: center;
}

.button:hover {
  background: var(--primary-hover);
}

.button:active {
  background: var(--primary-active);
}

.button-outline {
  background: var(--surface);
  color: var(--foreground);
  border-color: var(--border-strong);
  min-height: 2.5rem;
}

.button-outline:hover {
  background: var(--surface-muted);
}

.badge {
  display: inline-block;
  margin-left: 0.375rem;
  padding: 0 0.375rem;
  border-radius: var(--radius-control);
  background: var(--accent-subtle);
  color: var(--accent-subtle-foreground);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.plain-list {
  margin: 0;
  padding-left: 1.25rem;
}

.account-hint {
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

.empty {
  padding: 2rem;
  text-align: center;
  color: var(--muted-foreground);
  background: var(--surface);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-panel);
}

/* --- Catalog ---------------------------------------------------------------------------- */

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.chip {
  display: inline-block;
  padding: 0.375rem 0.875rem;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: var(--surface);
  color: var(--foreground);
  font-size: 0.875rem;
  text-decoration: none;
}

.chip:hover {
  background: var(--surface-muted);
}

.chip[aria-current='page'] {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--primary-foreground);
  font-weight: 600;
}

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

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-panel);
}

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

.card:focus-within {
  box-shadow:
    0 0 0 2px var(--focus-gap),
    0 0 0 4px var(--focus-ring);
}

.card-cover {
  aspect-ratio: 16 / 9;
  width: 100%;
  /* Pictures with width and height attributes keep the card's proportions too. */
  height: auto;
  object-fit: cover;
  background: var(--surface-muted);
}

.card-cover-empty {
  background: linear-gradient(135deg, var(--primary-subtle), var(--accent-subtle));
}

.card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1rem 1.125rem 1.25rem;
}

.card-kind {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--primary-emphasis);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.card-title a {
  color: var(--foreground);
  text-decoration: none;
}

/* The whole card opens the page; the title stays the only link for screen readers. */
.card-title a::after {
  content: '';
  position: absolute;
  inset: 0;
}

.card-title a:focus-visible {
  box-shadow: none;
}

.card-summary {
  color: var(--muted-foreground);
  font-size: 0.9375rem;
}

.card-meta {
  margin-top: auto;
  padding-top: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  font-size: 0.875rem;
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

/* --- Training and course pages ---------------------------------------------------------- */

.item-layout {
  display: grid;
  gap: 1.5rem;
  align-items: start;
}

@media (min-width: 60rem) {
  .item-layout {
    grid-template-columns: minmax(0, 1fr) 22rem;
    gap: 2rem;
  }

  .item-aside {
    position: sticky;
    top: 1.5rem;
  }
}

.item-main {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-width: 0;
}

.item-main section {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.item-cover {
  aspect-ratio: 16 / 9;
  width: 100%;
  object-fit: cover;
  border-radius: var(--radius-panel);
}

.item-aside {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

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

.edition {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  padding: 1rem 0;
  border-top: 1px solid var(--border);
  font-size: 0.9375rem;
}

.edition:first-child {
  border-top: 0;
  padding-top: 0.25rem;
}

.edition .button {
  margin-top: 0.375rem;
}

.document {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-width: 52rem;
}

.error-page {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
  padding: 3rem 0;
}

/* Formatted texts of trainings and courses (as .rich-text in the app). */
.rich-text {
  line-height: 1.6;
  max-width: 48rem;
}

.rich-text > * {
  margin: 0;
}

.rich-text > * + * {
  margin-top: 0.75em;
}

.rich-text h3,
.rich-text h4 {
  font-size: 1.0625rem;
  font-weight: 700;
  margin-top: 1.25em;
}

.rich-text ul,
.rich-text ol {
  padding-left: 1.5em;
}

.rich-text li + li {
  margin-top: 0.25em;
}

.rich-text strong,
.rich-text b {
  font-weight: 700;
}

/* --- Widget (ADR 0057, part 4): inside a frame on another website ---------------------- */

/* The frame takes the page's height (embed.js), so it never needs its own scrollbar, which
   would also take width from the content while the height is being set. */
.embed {
  min-height: 0;
  overflow: hidden;
  background: transparent;
}

.embed main {
  padding: 4px;
}

.embed .cards-single {
  grid-template-columns: minmax(0, 32rem);
}

.embed-dates {
  display: grid;
  gap: 0.75rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.embed-date {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 1rem 1.125rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-panel);
}

.embed-date:hover {
  border-color: var(--border-strong);
}

.embed-date:focus-within {
  box-shadow:
    0 0 0 2px var(--focus-gap),
    0 0 0 4px var(--focus-ring);
}

.embed-when {
  font-weight: 600;
  color: var(--primary-emphasis);
}

.embed-title a {
  color: var(--foreground);
  text-decoration: none;
}

/* The whole entry opens the page; the title stays the only link for screen readers. */
.embed-title a::after {
  content: '';
  position: absolute;
  inset: 0;
}

.embed-title a:focus-visible {
  box-shadow: none;
}

.embed-footer {
  padding: 0.5rem 4px 4px;
}

/* On its own background: the website around the frame may be light or dark. */
.embed-footer a {
  display: inline-block;
  padding: 0.375rem 0.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
  color: var(--primary-emphasis);
  font-weight: 600;
}

/* --- Website (ADR 0059): menu, home page and blocks -------------------------------------- */

.site-menu {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-menu a {
  display: inline-block;
  padding: 0.5rem 0.625rem;
  border-radius: var(--radius-control);
  color: var(--foreground);
  font-weight: 600;
  text-decoration: none;
}

.site-menu a:hover {
  background: var(--surface-muted);
}

.site-menu a[aria-current='page'] {
  color: var(--primary-subtle-foreground);
  background: var(--primary-subtle);
}

/* Phones: the menu folds under a "Menu" button (a <details> element, no JavaScript); wide
   screens show it in the header. Only one of the two is displayed, so only one is read out. */
.menu-narrow {
  display: none;
}

.site-header {
  position: relative;
}

@media (max-width: 48rem) {
  .menu-wide {
    display: none;
  }

  .menu-narrow {
    display: block;
  }

  .header-nav {
    flex-shrink: 1;
    gap: 0.5rem;
  }
}

.menu-narrow summary {
  display: inline-flex;
  align-items: center;
  min-height: 2.5rem;
  padding: 0.375rem 0.75rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-control);
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

.menu-narrow summary::-webkit-details-marker {
  display: none;
}

.menu-narrow summary::after {
  content: '';
  width: 0.5rem;
  height: 0.5rem;
  margin-left: 0.5rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-0.125rem) rotate(45deg);
}

.menu-narrow[open] summary::after {
  transform: translateY(0.125rem) rotate(-135deg);
}

.menu-narrow[open] > nav {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 10;
  padding: 0.5rem 1rem 1rem;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 8px 16px rgb(0 0 0 / 0.08);
}

.site-menu-stack {
  display: flex;
  flex-direction: column;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-menu-stack a {
  display: block;
  padding: 0.75rem 0.5rem;
  border-radius: var(--radius-control);
  color: var(--foreground);
  font-weight: 600;
  text-decoration: none;
}

.site-menu-stack a[aria-current='page'] {
  color: var(--primary-subtle-foreground);
  background: var(--primary-subtle);
}

.page-title h1 {
  font-size: 2rem;
  line-height: 2.5rem;
}

.footer-columns {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem 3rem;
  padding-top: 1.75rem;
  padding-bottom: 0.5rem;
}

.footer-text {
  max-width: 24rem;
  margin: 0;
}

.plain-links {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

/* Blocks run edge to edge; each keeps its content in a container. */
.site-page {
  flex: 1;
  padding-bottom: 3rem;
}

.block {
  padding-top: 2.5rem;
}

.block h2 {
  margin-bottom: 1rem;
  font-size: 1.5rem;
  line-height: 2rem;
}

@media (min-width: 48rem) {
  .block h2 {
    font-size: 1.75rem;
    line-height: 2.25rem;
  }
}

/* Text blocks keep a readable line length, aligned with the other blocks. */
.narrow > * {
  max-width: 48rem;
}

.block-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  margin-bottom: 1rem;
}

.block-head h2 {
  margin-bottom: 0;
}

.block-head a {
  color: var(--primary-emphasis);
  font-weight: 600;
}

.hero {
  padding: 3.5rem 0;
  background: var(--primary-subtle);
  color: var(--primary-subtle-foreground);
}

.hero-inner {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
}

.hero .hero-heading {
  margin: 0;
  max-width: 48rem;
  color: var(--primary-subtle-foreground);
  font-size: 2rem;
  line-height: 1.2;
}

.hero-text {
  margin: 0;
  max-width: 44rem;
  font-size: 1.1875rem;
  line-height: 1.75rem;
}

@media (min-width: 48rem) {
  .hero {
    padding: 5rem 0;
  }

  .hero .hero-heading {
    font-size: 2.75rem;
  }
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.call-to-action {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 2rem;
  border-radius: var(--radius-panel);
  background: var(--primary);
  color: var(--primary-foreground);
}

.call-to-action h2 {
  margin: 0;
  color: var(--primary-foreground);
}

.call-to-action p {
  margin: 0;
  max-width: 44rem;
}

/* On the brand color: the page's surface colors keep their contrast. */
.call-to-action .button {
  background: var(--surface);
  color: var(--foreground);
}

.call-to-action .button:hover {
  background: var(--surface-muted);
}

.contact-list {
  display: grid;
  gap: 1rem;
  margin: 0;
}

.contact-list dt {
  font-weight: 600;
}

.contact-list dd {
  margin: 0.125rem 0 0;
}

.preview-bar {
  padding: 0.625rem 0;
  background: var(--accent-subtle);
  color: var(--accent-subtle-foreground);
  font-size: 0.875rem;
  font-weight: 600;
}

/* Banner with a photo behind the text: a dark scrim keeps white text readable on any photo
   (the brightest pixel under a 60% black scrim gives at least 5.7:1). */
.hero-photo {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: #000;
  color: #fff;
}

.hero-photo-image {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-photo::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgb(0 0 0 / 0.6);
}

.hero-photo .hero-heading {
  color: #fff;
}

.text-image {
  display: grid;
  gap: 1.5rem;
  align-items: center;
}

.text-image-text > * {
  max-width: 44rem;
}

.text-image-image {
  width: 100%;
  height: auto;
  border-radius: var(--radius-panel);
}

@media (min-width: 48rem) {
  .text-image {
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
  }

  .text-image-left .text-image-image {
    order: -1;
  }
}

.team {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 14rem), 1fr));
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.person {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.person-photo {
  width: 100%;
  max-width: 12rem;
  aspect-ratio: 1;
  height: auto;
  object-fit: cover;
  border-radius: var(--radius-panel);
  margin-bottom: 0.5rem;
}

.person-photo-empty {
  background: var(--primary-subtle);
}

.person-role {
  color: var(--muted-foreground);
  font-weight: 600;
}

.logos {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.5rem 2.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.logo-image {
  display: block;
  width: auto;
  max-width: 10rem;
  max-height: 3.5rem;
  object-fit: contain;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

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

.gallery a {
  display: block;
}

.gallery-image {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius-control);
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 10rem), 1fr));
  gap: 1.5rem;
  margin: 0;
}

/* The number first on the screen; the label stays first for screen readers (dt, dd). */
.stat {
  display: flex;
  flex-direction: column-reverse;
  gap: 0.25rem;
}

.stat dd {
  margin: 0;
  color: var(--primary-emphasis);
  font-size: 2.25rem;
  line-height: 2.5rem;
  font-weight: 700;
}

.stat dt {
  color: var(--muted-foreground);
}

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

.testimonial {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1rem;
  height: 100%;
  margin: 0;
  padding: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-panel);
}

.testimonial blockquote {
  margin: 0;
  font-size: 1.0625rem;
  line-height: 1.625rem;
}

.testimonial figcaption {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.testimonial figcaption > span {
  display: flex;
  flex-direction: column;
}

.testimonial-photo {
  width: 3rem;
  height: 3rem;
  border-radius: 999px;
  object-fit: cover;
}

.faq {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--border);
}

.faq-item {
  border-bottom: 1px solid var(--border);
}

.faq-item summary {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: '+';
  flex-shrink: 0;
  color: var(--primary-emphasis);
  font-size: 1.25rem;
  line-height: 1.5rem;
}

.faq-item[open] summary::after {
  content: '–';
}

.faq-item .rich-text {
  padding-bottom: 1rem;
}

.features {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 16rem), 1fr));
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.feature {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: var(--radius-panel);
  background: var(--primary-subtle);
  color: var(--primary-subtle-foreground);
}

/* Tile titles stay small also when they are the block's h2 (a block without a heading). */
.block .feature-title {
  margin: 0;
  font-size: 1.0625rem;
  line-height: 1.5rem;
}

.video {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--radius-panel);
  background: var(--primary);
}

.video-start {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-foreground);
  text-decoration: none;
}

.video-cover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* On a cover photo the label sits on its own dark background, so it stays readable. */
.video-play {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  max-width: calc(100% - 2rem);
  padding: 0.75rem 1.25rem;
  border-radius: 999px;
  background: rgb(0 0 0 / 0.75);
  color: #fff;
  font-weight: 600;
}

.video-play-icon {
  flex-shrink: 0;
  width: 0;
  height: 0;
  border-top: 0.5rem solid transparent;
  border-bottom: 0.5rem solid transparent;
  border-left: 0.8rem solid currentColor;
}

.video-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.video-note {
  margin-top: 0.5rem;
  font-size: 0.875rem;
}

.post-head {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.post-head h1,
.post-head p {
  margin: 0;
}

.post-cover {
  width: 100%;
  height: auto;
  max-height: 32rem;
  margin-top: 1rem;
  object-fit: cover;
  border-radius: var(--radius-panel);
}

/* --- Contact form (ADR 0060) ------------------------------------------------------------- */

.contact-form fieldset {
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}

.contact-form fieldset:disabled {
  opacity: 0.7;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  margin-bottom: 1rem;
}

.form-field label {
  font-weight: 600;
}

.form-optional {
  font-weight: 400;
  color: var(--muted-foreground);
}

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  min-height: 2.75rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-control);
  background: var(--surface);
  color: var(--foreground);
  font: inherit;
}

.form-field textarea {
  resize: vertical;
}

.form-field [aria-invalid='true'] {
  border-color: var(--danger);
  border-width: 2px;
}

.form-error {
  margin: 0;
  color: var(--danger);
  font-weight: 600;
}

.form-problems {
  margin-bottom: 1rem;
  padding: 0.75rem 1rem;
  border-left: 4px solid var(--danger);
  border-radius: var(--radius-control);
  background: var(--danger-subtle);
  color: var(--danger-subtle-foreground);
}

.form-problems p {
  margin: 0;
}

.form-sent {
  padding: 1rem 1.25rem;
  border-left: 4px solid var(--primary);
  border-radius: var(--radius-control);
  background: var(--primary-subtle);
  color: var(--primary-subtle-foreground);
}

.form-sent p {
  margin: 0;
}

.form-sent-title {
  font-weight: 700;
  margin-bottom: 0.25rem !important;
}

.form-note,
.form-privacy {
  color: var(--muted-foreground);
  font-size: 0.9375rem;
}

.form-privacy {
  margin: 0 0 1.25rem;
}

/* Out of sight for people; bots still find and fill it. */
.form-trap {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.contact-form .button {
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

/* "Ask about this training" (ADR 0060, part 3b). */
.ask-layout {
  max-width: 44rem;
  padding-bottom: 2.5rem;
}

.ask-link {
  margin: 1rem 0 0;
}

.ask-layout .lead {
  margin-bottom: 1.5rem;
}

.form-about {
  margin: 0 0 1.25rem;
  font-weight: 600;
}

.ask-back {
  margin-top: 1.5rem;
}

/* --- Consent banner (ADR 0061) ------------------------------------------------------------- */

.consent {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 50;
  max-height: 85vh;
  overflow-y: auto;
  border-top: 1px solid var(--border-strong);
  background: var(--surface);
  box-shadow: 0 -4px 16px rgb(23 34 45 / 0.12);
}

.consent[hidden],
.consent [hidden] {
  display: none;
}

.consent-box {
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.consent-title {
  margin: 0 0 0.5rem;
  font-size: 1.125rem;
}

.consent-box p {
  margin: 0 0 0.75rem;
  max-width: 60rem;
}

.consent-choices {
  margin: 0 0 0.75rem;
  padding: 0;
  border: 0;
}

.consent-choice {
  display: flex;
  gap: 0.625rem;
  align-items: flex-start;
  margin-bottom: 0.5rem;
}

.consent-choice input {
  width: 1.25rem;
  height: 1.25rem;
  margin-top: 0.125rem;
  flex-shrink: 0;
}

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

.consent-buttons .button,
.link-button {
  font: inherit;
  cursor: pointer;
}

.consent-buttons .button {
  font-weight: 600;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  margin: 0;
}

.link-button {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  text-decoration: underline;
}

.link-button[hidden] {
  display: none;
}

