/* ==========================================================================
   Inner pages (content, section, legal, contact, claim form, 404).
   Composes the v2 components; only arrangement and a few small additions
   live here. Tokens only, no raw colours.
   ========================================================================== */

/* ---------- Main nav: mark the section of the current page ---------- */

.nav__link.is-section {
  color: var(--color-highlight);
}

.nav__panel [aria-current="page"] {
  color: var(--color-highlight);
}

/* ---------- Section spacing under the page header ---------- */

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

.page-header__eyebrow {
  font-family: var(--font-display);
  font-size: var(--fs-xl);
  font-weight: var(--fw-bold);
  color: var(--color-highlight);
}

/* ---------- Prose (CMS bodies) ---------- */

.prose {
  overflow-wrap: anywhere;
}

.prose h2 {
  font-size: var(--fs-xl);
}

.prose h3,
.prose h4 {
  font-size: var(--fs-lg);
  margin-top: var(--space-6);
}

.prose img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-md);
}

.prose a[href$=".pdf"]::after {
  content: " (PDF)";
  font-size: var(--fs-sm);
}

.prose hr {
  border: 0;
  border-top: 1px solid var(--color-border);
  margin-block: var(--space-6);
}

.prose blockquote {
  padding: var(--space-4) var(--space-5);
  border-left: 4px solid var(--color-highlight);
  background: var(--color-surface);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.prose .table-wrap {
  max-width: 100%;
}

.prose--legal {
  font-size: var(--fs-base);
}

.prose--legal h2 {
  font-size: var(--fs-lg);
  scroll-margin-top: 7rem;
}

/* ---------- Sidebar ---------- */

.sidebar {
  min-width: 0;
}

@media (min-width: 64em) {
  .sidebar--sticky {
    position: sticky;
    top: 7rem;
    max-height: calc(100vh - 8rem);
    overflow-y: auto;
  }
}

.side-nav__root {
  color: inherit;
  text-decoration: none;
}

.side-nav__root:hover,
.side-nav__root[aria-current="page"] {
  color: var(--color-highlight);
}

.side-nav__list--sub {
  padding-left: var(--space-4);
}

.toc .side-nav__link {
  min-height: 2.25rem;
  font-size: var(--fs-sm);
}

.help-card {
  gap: var(--space-3);
}

.help-card__title {
  font-size: var(--fs-lg);
}

/* ---------- Section cards and document list ---------- */

.section-cards__title {
  font-size: var(--fs-lg);
  margin-top: var(--space-6);
}

.section-cards {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr));
}

.doc-list {
  display: grid;
  gap: var(--space-3);
  list-style: none;
  padding: 0;
}

.doc-card {
  align-items: center;
  text-decoration: none;
  color: var(--color-text);
}

.doc-card .card__body {
  flex: 1;
}

.doc-card .card__title {
  margin: 0;
  color: var(--color-link);
}

.doc-card:hover .card__title,
.doc-card:focus-visible .card__title {
  color: var(--color-link-hover);
  text-decoration: underline;
}

/* ---------- Contact page ---------- */

.contact-split {
  align-items: start;
}

.contact-list {
  font-style: normal;
  display: grid;
  gap: var(--space-3);
  margin-block: var(--space-4);
}

.contact-list__row {
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
}

.contact-list__row .icon {
  flex-shrink: 0;
  margin-top: 0.2em;
  color: var(--color-link);
}

/* ---------- Forms ---------- */

.form-card {
  gap: var(--space-5);
}

.form .fieldset + .fieldset {
  margin-top: var(--space-2);
}

.choice-group {
  display: grid;
  gap: var(--space-1);
}

@media (min-width: 48em) {
  .choice-group {
    grid-template-columns: repeat(3, auto);
    justify-content: start;
    column-gap: var(--space-6);
  }
}

[data-bank-wrapper][hidden] {
  display: none;
}

.alert ul {
  margin-top: var(--space-2);
  padding-left: var(--space-5);
}

.alert a {
  color: inherit;
  font-weight: var(--fw-semibold);
}

/* Honeypot: off-screen for people, still in the DOM for bots */
.hp-field {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ---------- 404 ---------- */

.error-links {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 14rem), 1fr));
}

.icon--up {
  transform: rotate(-90deg);
}

/* ---------- Prose extras: definition-list timeline, multi-column lists ---------- */

.prose dl {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: var(--space-3) var(--space-5);
  padding: var(--space-5);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
}

.prose dt {
  font-family: var(--font-display);
  font-weight: var(--fw-bold);
  color: var(--color-link);
}

.prose dd {
  margin: 0;
}

.prose .country-list {
  columns: 2 12rem;
  column-gap: var(--space-6);
  padding-left: var(--space-5);
}

.prose .country-list li {
  break-inside: avoid;
}

.prose .country-list li + li {
  margin-top: var(--space-1);
}

/* Keep focused alerts and form fields clear of the sticky header */
[data-error-summary],
[data-success],
.form .field,
.fieldset {
  scroll-margin-top: 7rem;
}

.prose-figure {
  max-width: 34rem;
  margin: var(--space-6) auto;
}

.prose-figure img {
  display: block;
  width: 100%;
  box-shadow: 0 8px 24px rgb(0 0 0 / 0.15);
}

.prose-figure figcaption {
  margin-top: var(--space-2);
  font-size: var(--fs-sm);
  color: var(--color-text-muted, inherit);
  text-align: center;
}

/* Several images in one paragraph (e.g. certificate badges) sit in a row */
.prose p:has(> img + img) {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-4);
}

/* ---------- Online claim: steps after submission (PDF copy by e-mail) ---------- */

.stack.stack--sm > * + * {
  margin-top: var(--space-2);
}

.form-card__title {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--fs-lg);
}

.form-card__title .icon {
  flex: none;
  color: var(--color-primary);
}

.form-card__aside {
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-border);
}

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

.progress-steps__item {
  position: relative;
  display: grid;
  justify-items: center;
  gap: var(--space-2);
  text-align: center;
  font-size: var(--fs-xs);
  color: var(--color-text-secondary);
}

/* connector line between the marks */
.progress-steps__item + .progress-steps__item::before {
  content: "";
  position: absolute;
  top: 1rem;
  right: calc(50% + 1.25rem);
  width: calc(100% - 2.5rem + var(--space-2));
  height: 2px;
  background: var(--color-border);
}

.progress-steps__item.is-done + .progress-steps__item::before,
.progress-steps__item.is-done + .progress-steps__item.is-current::before {
  background: var(--color-primary);
}

.progress-steps__mark {
  display: inline-grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border: 2px solid var(--color-border-strong);
  border-radius: var(--radius-pill);
  background: var(--color-surface);
  font-weight: var(--fw-semibold);
}

.progress-steps__item.is-done .progress-steps__mark {
  border-color: var(--color-primary);
  background: var(--color-primary);
  color: var(--color-on-primary);
}

.progress-steps__item.is-current {
  color: var(--color-text);
  font-weight: var(--fw-semibold);
}

.progress-steps__item.is-current .progress-steps__mark {
  border-color: var(--color-primary);
  color: var(--color-primary);
  box-shadow: 0 0 0 4px var(--color-primary-subtle);
}

.progress-steps__item.is-skipped {
  opacity: 0.55;
}

@media (min-width: 40em) {
  .progress-steps__item {
    font-size: var(--fs-sm);
  }
}

.field__input--code {
  max-width: 12rem;
  font-size: 1.5rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.3em;
  text-align: center;
}

.next-list {
  margin: 0;
  padding-left: var(--space-5);
}

.next-list li + li {
  margin-top: var(--space-2);
}

/* ---------- ALTCHA bot protection widget (brand colours) ---------- */

altcha-widget {
  display: block;
  max-width: 22rem;
  --altcha-color-primary: var(--color-primary);
  --altcha-color-success: var(--color-primary);
  --altcha-border-radius: var(--radius-sm);
}

.field--error altcha-widget {
  --altcha-border-color: var(--color-error);
}
