/* HumanEndpoint: view `examples` (Voorbeelden / Examples).
   Contract: docs/FRONTEND.md (section 0 first). Tokens only. Everything is prefixed .ex-
   Calm and airy: white space does the work, one quiet card edge, no shadows. */

/* ---------- hero ---------- */

.ex-hero {
  padding-block: clamp(var(--space-7), 8vw, var(--space-9)) clamp(var(--space-5), 4vw, var(--space-7));
}

.ex-hero h1 {
  max-width: 18ch;
  margin: 0 0 var(--space-4);
  font-size: clamp(2.1rem, 5vw, 3.4rem);
  line-height: 1.08;
  text-wrap: balance;
  overflow-wrap: break-word;
}

.ex-hero .lead {
  max-width: 46ch;
  margin: 0 0 var(--space-4);
}

.ex-hero__note {
  max-width: 56ch;
  margin: 0;
  color: var(--ink-soft);
  font-size: 1rem;
}

/* ---------- sections ---------- */

.ex-section {
  padding-block: clamp(var(--space-5), 4vw, var(--space-7)) clamp(var(--space-7), 7vw, var(--space-8));
}

.ex-title {
  margin: 0 0 var(--space-5);
}

/* ---------- filter ---------- */

.ex-filters {
  margin: 0 0 var(--space-4);
}

.ex-filters__label {
  margin: 0 0 var(--space-2);
  max-width: none;
  color: var(--ink-soft);
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1.4;
}

.ex-filters__row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-3);
}

.ex-filter {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 44px;
  max-width: 100%;
  margin: 0;
  padding: var(--space-2) var(--space-4);
  border: 1px solid var(--ink-soft);
  border-radius: 999px;
  background: var(--paper-raised);
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.3;
  text-align: left;
  overflow-wrap: anywhere;
  cursor: pointer;
}

.ex-filter:hover {
  background: var(--paper-deep);
}

/* Chosen: darker fill AND a check mark, so colour is never the only signal. */
.ex-filter[aria-pressed="true"] {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--paper);
}

.ex-filter[aria-pressed="true"]::before {
  content: "\2713";
  flex: none;
  font-weight: 700;
}

.ex-count {
  margin: 0 0 var(--space-5);
  max-width: none;
  color: var(--ink-soft);
  font-size: 0.9375rem;
}

/* ---------- the cases ---------- */

.ex-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-6);
  align-items: start;
  max-width: 46rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ex-item {
  min-width: 0;
  max-width: none;
  margin: 0;
  padding: 0;
}

.ex-card {
  min-width: 0;
  padding: var(--space-5);
  border: 1px solid var(--rule);
  border-radius: 8px;
  background: var(--paper-raised);
  color: var(--ink);
}

.ex-card__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) var(--space-3);
  margin: 0 0 var(--space-4);
  font-family: var(--font-text);
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0;
  scroll-margin-top: var(--space-6);
}

/* Receives focus after "Meer voorbeelden": show it, however the button was pressed. */
.ex-card__head:focus {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 4px;
}

.ex-card__label {
  color: var(--ink-soft);
}

/* The service name sits in the card head, after the label "Voorbeeld". */
.ex-card__kind {
  color: var(--ink);
}

.ex-card__kind::before {
  content: "\00B7";
  margin-right: var(--space-3);
  color: var(--ink-soft);
}

.ex-card__setting {
  margin-left: auto;
}

.ex-card__voice {
  max-width: none;
  margin: 0 0 var(--space-5);
  overflow-wrap: break-word;
}

.ex-card .voice-machine {
  padding: var(--space-4);
}

/* The answers are a few sentences long: a calmer size than the pull-quote default. */
.ex-card .voice-human {
  padding-left: var(--space-4);
  font-size: 1.125rem;
  line-height: 1.55;
}

.ex-card__takeaway {
  max-width: none;
  margin: 0;
  padding-top: var(--space-4);
  border-top: 1px solid var(--rule);
  font-weight: 600;
  line-height: 1.5;
  overflow-wrap: break-word;
}

.ex-card__takeaway-label {
  display: block;
  margin-bottom: var(--space-1);
  color: var(--ink-soft);
  font-size: 0.875rem;
  font-weight: 700;
}

.ex-more {
  margin-top: var(--space-6);
}

/* ---------- closing block ---------- */

.ex-next {
  background: var(--paper-deep);
  padding-block: clamp(var(--space-7), 7vw, var(--space-8));
}

.ex-next__text {
  margin: 0 0 var(--space-5);
  max-width: 46ch;
}

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

/* ---------- wider screens: two calm columns ---------- */

@media (min-width: 1000px) {
  .ex-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-6);
    max-width: none;
  }

  .ex-card {
    padding: var(--space-6);
  }
}

/* ---------- small screens ---------- */

@media (max-width: 420px) {
  .ex-card {
    padding: var(--space-4);
  }

  .ex-card .voice-machine {
    padding: var(--space-3);
  }

  .ex-actions .button {
    width: 100%;
  }
}

/* ---------- preferences ---------- */

@media (prefers-reduced-motion: reduce) {
  .ex-filter,
  .ex-card {
    transition: none;
    animation: none;
  }
}

@media (forced-colors: active) {
  .ex-filter,
  .ex-card {
    border: 1px solid CanvasText;
  }

  .ex-filter[aria-pressed="true"] {
    border-width: 3px;
  }
}
