/* ==========================================================================
   Ploce Design Studio — pages.css
   --------------------------------------------------------------------------
   Page-specific layout: the home page sections, the projects browser,
   the project detail template, studio, team, news, careers, contact,
   legal pages and the 404 page.

   CONTENTS
   01. Home hero
   02. Home intro
   03. Brand definition block (dictionary entry)
   04. Our approach (numbered statements)
   05. Our services (the nine strands)
   06. Home studio / team / clients / recognition
   07. Closing call to action
   08. Sub-page header (shared by every inner page)
   09. Projects page (search, filters, view toggle)
   10. Project detail template
   11. News list and article template
   12. Studio page
   13. Team page
   14. Careers page
   15. Contact page
   16. Legal pages (privacy, terms)
   17. 404 page
   18. Terms page (legal layout, placeholders, form consent)
   ========================================================================== */

/* 01. HOME HERO ============================================================ */
/* Full-bleed image with a short, bold statement over it. The scrim keeps
   cream text readable over any future photograph (checked: >= 7:1). */

.hero {
  position: relative;
  min-height: min(92svh, 900px);
  display: flex;
  align-items: flex-end;
  color: var(--cream);
  isolation: isolate;
}

.hero__media {
  position: absolute;
  inset: 0;
  z-index: -1;
  margin: 0;
}

.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Dark scrim, heavier toward the bottom where the type sits. */
.hero__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(24, 23, 20, 0.78) 0%,
    rgba(24, 23, 20, 0.32) 46%,
    rgba(24, 23, 20, 0.05) 78%
  );
}

.hero__inner {
  padding-block: clamp(4rem, 12vh, 7rem) clamp(2.5rem, 8vh, 5rem);
}

.hero__eyebrow {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin-bottom: 1.2rem;
  font-family: var(--font-condensed);
  font-size: var(--fs-eyebrow);
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--straw);
}

.hero__eyebrow::after {
  content: "";
  width: 3.5rem;
  height: 1px;
  background: var(--straw);
}

.hero__title {
  font-size: var(--fs-display);
  margin: 0 0 1.1rem;
  max-width: 12ch;
}

.hero__sub {
  font-family: var(--font-serif);
  font-size: var(--fs-lede);
  line-height: 1.45;
  max-width: 40ch;
  margin: 0 0 1.8rem;
  color: var(--cream);
}

/* 02. HOME INTRO =========================================================== */

.intro {
  padding-block: var(--space-section);
  display: grid;
  gap: 2rem;
}

@media (min-width: 64em) {
  .intro {
    grid-template-columns: repeat(12, 1fr);
    align-items: start;
  }

  .intro__label {
    grid-column: 1 / 4;
    position: sticky;
    top: calc(var(--header-h) + 2rem);
  }

  .intro__body {
    grid-column: 5 / 12;
  }
}

.intro__body p:last-child {
  margin-bottom: 0;
}

.text-link {
  font-weight: 600;
  color: var(--reed-olive);
  text-decoration: none;
  border-bottom: 2px solid var(--straw);
}

.text-link:hover {
  color: var(--bark);
  border-bottom-color: var(--bark);
}

/* 03. BRAND DEFINITION BLOCK =============================================== */
/* A dictionary-style entry: the name, how to say it, then numbered senses. */

.definition {
  background: var(--cream-deep);
  padding-block: var(--space-section);
  border-block: 1px solid var(--line);
}

.definition__inner {
  max-width: 46rem;
  margin-inline: auto;
}

.definition__head {
  font-family: var(--font-serif);
  font-size: clamp(2.2rem, 6vw, 3.6rem);
  margin-bottom: 1.5rem;
}

/* The pronunciation sits beside the headword, as in a real dictionary. */
.definition__pron {
  font-family: var(--font-sans);
  font-size: 1rem;
  color: var(--reed-olive);
  font-weight: 400;
  letter-spacing: 0;
}

.definition__pos {
  font-style: italic;
  color: var(--nest-brown);
}

.definition__sense {
  display: grid;
  grid-template-columns: 2.2rem 1fr;
  gap: 0.8rem;
  margin: 0 0 0.9rem;
  font-size: var(--fs-lede);
  font-family: var(--font-serif);
  line-height: 1.45;
}

.definition__number {
  font-family: var(--font-condensed);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--nest-brown);
  padding-top: 0.35rem;
  text-align: right;
}

/* 04. OUR APPROACH ========================================================= */
/* Five short statements, numbered like strands. */

.approach-list {
  counter-reset: strand;
  list-style: none;
  margin: 0;
  padding: 0;
}

.approach-item {
  display: grid;
  grid-template-columns: 3.5rem 1fr;
  gap: 0.5rem 1.25rem;
  padding-block: 1.9rem;
  border-top: 1px solid var(--line-strong);
}

.approach-item:last-child {
  border-bottom: 1px solid var(--line-strong);
}

.approach-item__number {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  color: var(--nest-brown);
}

.approach-item h3 {
  font-size: clamp(1.35rem, 3.5vw, 1.9rem);
  margin: 0 0 0.35rem;
}

.approach-item p {
  margin: 0;
  max-width: 52ch;
}

/* 05. OUR SERVICES ========================================================= */
/* The nine strands, each with a one-line description. */

.strand-list {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: strand;
}

.strand-item {
  display: grid;
  gap: 0.35rem 2rem;
  padding-block: 1.6rem;
  border-top: 1px solid var(--line);
}

@media (min-width: 64em) {
  .strand-item {
    grid-template-columns: minmax(0, 22rem) 1fr auto;
    align-items: baseline;
  }
}

.strand-item h3 {
  margin: 0;
  font-size: clamp(1.3rem, 3vw, 1.8rem);
}

.strand-item p {
  margin: 0;
  max-width: 48ch;
  color: var(--bark);
}

.strand-item__link {
  font-weight: 600;
  white-space: nowrap;
  text-decoration: none;
  border-bottom: 2px solid var(--straw);
  color: var(--reed-olive);
}

.strand-item__link:hover {
  color: var(--bark);
  border-bottom-color: var(--bark);
}

/* 06. HOME: STUDIO / TEAM / CLIENTS / RECOGNITION ========================= */

.duo {
  display: grid;
  gap: var(--gap);
  align-items: center;
}

@media (min-width: 64em) {
  .duo {
    grid-template-columns: 1fr 1fr;
    gap: clamp(2rem, 5vw, 4.5rem);
  }
}

.duo__media {
  margin: 0;
}

.duo__media img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.duo__body p:last-child {
  margin-bottom: 0;
}

/* Team preview: three portraits under a shared caption. */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: var(--gap);
  list-style: none;
  margin: 0;
  padding: 0;
}

.team-grid img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.team-grid figcaption {
  padding-top: 0.6rem;
  font-size: var(--fs-small);
  color: var(--reed-olive);
}

/* Client logo grid: black and white wordmark placeholders. */
.clients-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--line); /* the gaps read as hairlines */
  border: 1px solid var(--line);
  list-style: none;
  margin: 0;
  padding: 0;
}

@media (min-width: 48em) {
  .clients-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.clients-grid li {
  background: var(--cream);
  min-height: 6.5rem;
  display: grid;
  place-items: center;
  padding: 1rem;
  text-align: center;
  filter: grayscale(1); /* keeps future logos black and white */
}

.clients-grid .client-name {
  font-family: var(--font-serif);
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  color: var(--bark);
  opacity: 0.72;
  text-transform: uppercase;
}

.sample-note {
  font-size: var(--fs-small);
  color: var(--reed-olive);
  margin-top: 0.9rem;
}

/* Inside dark sections, dry grass keeps the note readable (6.0:1). */
.section--bark .sample-note {
  color: var(--dry-grass);
}

/* Recognition: animated counters (figures are marked as samples). */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem 1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

@media (min-width: 48em) {
  .stats-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.stat__value {
  font-family: var(--font-serif);
  font-size: clamp(3rem, 8vw, 5.2rem);
  line-height: 1;
  display: block;
  color: var(--straw);
  margin-bottom: 0.5rem;
  font-variant-numeric: tabular-nums; /* steady while counting */
}

.stat__label {
  font-size: var(--fs-small);
  color: var(--cream);
  margin: 0;
}

/* 07. CLOSING CTA ========================================================= */

.cta {
  text-align: center;
  padding-block: var(--space-section);
}

.cta__title {
  font-size: clamp(2rem, 5.5vw, 3.6rem);
  max-width: 22ch;
  margin-inline: auto;
}

.cta p {
  margin-inline: auto;
  max-width: 44ch;
}

.cta .btn {
  margin-top: 1.4rem;
}

/* 08. SUB-PAGE HEADER ====================================================== */
/* Shared intro band for every inner page. */

.page-head {
  padding-block: clamp(3rem, 7vw, 5.5rem) clamp(2.5rem, 5vw, 4rem);
  border-bottom: 1px solid var(--line);
}

.page-head__title {
  font-size: var(--fs-h1);
  margin-bottom: 0.8rem;
  max-width: 16ch;
}

.page-head__lede {
  max-width: 54ch;
}

/* 09. PROJECTS PAGE ======================================================= */

.toolbar {
  display: grid;
  gap: 1.25rem;
  padding-block: 1.75rem;
  border-bottom: 1px solid var(--line);
}

@media (min-width: 64em) {
  .toolbar {
    grid-template-columns: minmax(16rem, 22rem) 1fr auto;
    align-items: start;
  }
}

/* Search field */
.search {
  position: relative;
}

.search__input {
  width: 100%;
  padding: 0.65rem 0.9rem 0.65rem 2.4rem;
  font: inherit;
  background: #fffdf6;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
}

.search__icon {
  position: absolute;
  left: 0.8rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--reed-olive);
  pointer-events: none;
}

/* Filter groups: a labelled row of chips each. */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem 1.5rem;
}

.filter-group {
  border: 0;
  margin: 0;
  padding: 0;
  min-width: 0;
}

.filter-group__legend {
  float: left;
  font-family: var(--font-condensed);
  font-size: var(--fs-eyebrow);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--reed-olive);
  padding: 0.45rem 0.6rem 0.45rem 0;
}

.filter-group__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

/* Grid / List view toggle */
.view-toggle {
  display: inline-flex;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  overflow: hidden;
  align-self: start;
}

.view-toggle__button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1rem;
  font: inherit;
  font-family: var(--font-geometric);
  font-size: 0.85rem;
  font-weight: 400;
  background: transparent;
  border: 0;
  color: var(--bark);
  cursor: pointer;
}

.view-toggle__button + .view-toggle__button {
  border-left: 1px solid var(--line-strong);
}

.view-toggle__button[aria-pressed="true"] {
  background: var(--bark);
  color: var(--cream);
}

/* Results line, announced politely to screen readers. */
.results-line {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  padding-block: 1.4rem 2.2rem;
  margin: 0;
}

.results-line__clear {
  font: inherit;
  font-size: var(--fs-small);
  font-weight: 600;
  background: none;
  border: 0;
  color: var(--reed-olive);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 0.2em;
  padding: 0;
}

.results-line__clear:hover {
  color: var(--bark);
}

/* Empty state */
.empty-state {
  padding: clamp(2.5rem, 6vw, 4.5rem) 0;
  text-align: center;
}

.empty-state h2 {
  font-size: var(--fs-h3);
}

/* 10. PROJECT DETAIL TEMPLATE ============================================= */

.detail-hero {
  padding-block: clamp(2.5rem, 6vw, 4.5rem);
}

.detail-hero__media {
  margin: 0 0 1.6rem;
}

.detail-hero__media img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.detail-hero__title {
  font-size: clamp(2.2rem, 5vw, 4rem);
  max-width: 18ch;
  margin-bottom: 0.6rem;
}

.detail-hero__summary {
  font-family: var(--font-serif);
  font-size: var(--fs-lede);
  max-width: 46ch;
  margin: 0;
}

/* Story plus facts sidebar. */
.detail-cols {
  display: grid;
  gap: 3rem;
  padding-block: clamp(2rem, 5vw, 3.5rem);
  border-top: 1px solid var(--line);
}

@media (min-width: 64em) {
  .detail-cols {
    grid-template-columns: 7fr 4fr;
    gap: clamp(3rem, 6vw, 5.5rem);
  }
}

.detail-story p {
  font-size: 1.1rem;
}

.facts {
  align-self: start;
}

@media (min-width: 64em) {
  .facts {
    position: sticky;
    top: calc(var(--header-h) + 2rem);
  }
}

.facts__heading {
  font-family: var(--font-condensed);
  font-size: var(--fs-eyebrow);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--reed-olive);
  margin-bottom: 1.1rem;
}

.facts dl {
  margin: 0;
}

.facts__row {
  display: grid;
  grid-template-columns: 8.5rem 1fr;
  gap: 0.6rem;
  padding-block: 0.7rem;
  border-bottom: 1px solid var(--line);
}

.facts dt {
  font-family: var(--font-condensed);
  font-size: var(--fs-small);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--reed-olive);
}

.facts dd {
  margin: 0;
  font-size: var(--fs-small);
}

/* Gallery: same masonry idea as the work grid. */
.gallery {
  padding-block: clamp(2rem, 5vw, 3.5rem);
  border-top: 1px solid var(--line);
}

.gallery .card__media img {
  aspect-ratio: auto;
}

.gallery .card__link {
  height: auto;
}

/* Prev / next pager. */
.pager {
  display: grid;
  gap: 1px;
  background: var(--line);
  border-block: 1px solid var(--line);
}

@media (min-width: 48em) {
  .pager {
    grid-template-columns: 1fr 1fr;
  }
}

.pager__link {
  background: var(--cream);
  padding: 1.6rem clamp(1.25rem, 3vw, 2.5rem);
  text-decoration: none;
  display: grid;
  gap: 0.3rem;
}

.pager__link:hover {
  background: var(--cream-deep);
}

.pager__direction {
  font-family: var(--font-condensed);
  font-size: var(--fs-eyebrow);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--reed-olive);
}

.pager__title {
  font-family: var(--font-serif);
  font-size: 1.35rem;
}

.pager__link--next {
  text-align: right;
}

/* Related strands block reuses the standard work grid. */
.related {
  padding-block: var(--space-section);
}

/* 11. NEWS ================================================================= */

.news-grid {
  display: grid;
  gap: clamp(2rem, 5vw, 3.5rem);
  list-style: none;
  margin: 0;
  padding: 0;
}

@media (min-width: 64em) {
  .news-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.news-card__media {
  margin: 0 0 1rem;
  overflow: hidden;
}

.news-card__media img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  transition: transform 0.7s var(--ease);
}

.news-card__link:hover img {
  transform: scale(1.04);
}

.news-card__link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.news-card__meta {
  font-size: var(--fs-small);
  color: var(--reed-olive);
  margin-bottom: 0.4rem;
}

.news-card__title {
  font-size: 1.4rem;
  margin-bottom: 0.4rem;
}

/* Article template */
.article__meta {
  font-size: var(--fs-small);
  color: var(--reed-olive);
  margin-bottom: 1.5rem;
}

.article__hero img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

.article__body {
  max-width: 60ch;
  margin-inline: auto;
}

.article__body p {
  font-size: 1.1rem;
}

.article__foot {
  margin-top: 2.5rem;
}

/* 12. STUDIO PAGE ========================================================= */

/* Process steps: a numbered path from brief to handover. */
.process-list {
  list-style: none;
  counter-reset: step;
  margin: 0;
  padding: 0;
}

.process-item {
  display: grid;
  grid-template-columns: 4rem 1fr;
  gap: 0.4rem 1.5rem;
  padding-block: 1.8rem;
  border-top: 1px solid var(--line-strong);
}

.process-item__number {
  font-family: var(--font-serif);
  font-size: 2rem;
  color: var(--straw);
  line-height: 1;
}

.process-item h3 {
  margin: 0 0 0.3rem;
}

.process-item p {
  margin: 0;
  max-width: 50ch;
}

/* Materials / research lab. */
.lab-grid {
  display: grid;
  gap: var(--gap);
}

@media (min-width: 64em) {
  .lab-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.lab-card {
  background: var(--cream-deep);
  padding: clamp(1.5rem, 3vw, 2.2rem);
  border-top: 3px solid var(--straw);
}

.lab-card h3 {
  margin-bottom: 0.5rem;
}

.lab-card p {
  font-size: var(--fs-small);
  margin-bottom: 0;
}

/* 13. TEAM PAGE =========================================================== */

/* .team-grid lives in pages.css section 06 (shared with the home preview). */
.team-grid--page {
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

.team-member__name {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  margin: 0.7rem 0 0;
}

.team-member__role {
  font-size: var(--fs-small);
  color: var(--reed-olive);
  margin: 0.15rem 0 0.35rem;
}

.team-member__bio {
  font-size: var(--fs-small);
  margin: 0;
  max-width: 34ch;
}

/* 14. CAREERS PAGE ======================================================== */

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

.role {
  border-top: 1px solid var(--line-strong);
}

.role:last-child {
  border-bottom: 1px solid var(--line-strong);
}

.role__link {
  display: grid;
  gap: 0.3rem 2rem;
  padding-block: 1.7rem;
  text-decoration: none;
  color: inherit;
}

@media (min-width: 64em) {
  .role__link {
    grid-template-columns: 1fr auto auto;
    align-items: baseline;
  }
}

.role__link:hover .role__title {
  text-decoration: underline;
  text-decoration-color: var(--straw);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.2em;
}

.role__title {
  font-family: var(--font-serif);
  font-size: clamp(1.35rem, 3vw, 1.9rem);
  margin: 0;
}

.role__meta {
  font-size: var(--fs-small);
  color: var(--reed-olive);
}

/* 15. CONTACT PAGE ======================================================== */

.contact-cols {
  display: grid;
  gap: 3rem;
  padding-block: clamp(2.5rem, 6vw, 4rem);
}

@media (min-width: 64em) {
  .contact-cols {
    grid-template-columns: 7fr 4fr;
    gap: clamp(3rem, 6vw, 5.5rem);
  }
}

.contact-details {
  align-self: start;
}

@media (min-width: 64em) {
  .contact-details {
    position: sticky;
    top: calc(var(--header-h) + 2rem);
  }
}

.contact-details h2 {
  font-size: var(--fs-h3);
}

.contact-details dl {
  margin: 0 0 1.8rem;
}

/* Map embed placeholder: a woven slot waiting for your iframe. */
.map-placeholder {
  border: 1px dashed var(--line-strong);
  background-color: var(--cream);
  background-image:
    repeating-linear-gradient(45deg, var(--dry-grass) 0 2px, transparent 2px 12px),
    repeating-linear-gradient(-45deg, var(--straw) 0 2px, transparent 2px 12px);
  min-height: clamp(220px, 40vw, 420px);
  display: grid;
  place-items: center;
  text-align: center;
  padding: 1.5rem;
}

.map-placeholder__label {
  background: var(--cream);
  padding: 0.8rem 1.3rem;
  font-size: var(--fs-small);
  font-weight: 600;
  border: 1px solid var(--line-strong);
  max-width: 26rem;
}

/* 16. LEGAL PAGES (PRIVACY, TERMS) ======================================== */

.legal-body {
  max-width: 68ch;
  line-height: 1.6;
}

.legal-body h2 {
  font-size: var(--fs-h3);
  margin-top: 2.2rem;
}

.legal-body p,
.legal-body li {
  font-size: 1rem;
}

/* Placeholder banner so nobody ships this text by accident. */
.placeholder-banner {
  border: 1px dashed var(--line-strong);
  background: var(--cream-deep);
  padding: 1rem 1.3rem;
  font-size: var(--fs-small);
  margin-bottom: 2rem;
}

/* 17. 404 PAGE ============================================================ */

.error-page {
  min-height: calc(100svh - var(--header-h) - 6rem);
  display: grid;
  place-items: center;
  text-align: center;
  padding-block: var(--space-section);
}

.error-page__code {
  font-family: var(--font-serif);
  font-size: clamp(5rem, 18vw, 10rem);
  line-height: 1;
  color: var(--straw);
  margin: 0;
}

.error-page h1 {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  max-width: 20ch;
  margin-inline: auto;
}

.error-page p {
  max-width: 42ch;
  margin-inline: auto;
}

.error-page__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.9rem;
  margin-top: 1.6rem;
}

/* 18. TERMS PAGE (LEGAL LAYOUT) ========================================== */
/* A two-column legal layout: a sticky contents sidebar beside one readable
   column of clauses. Below the desktop breakpoint the contents becomes a
   native <details> list at the top of the page (collapsible, no JS needed). */

/* Every bracketed value the owner must supply is wrapped in
   <mark class="placeholder">. Straw at about 25% opacity makes the gaps
   obvious without shouting over the text. */
.placeholder {
  background: rgba(232, 185, 35, 0.25);
  color: inherit;
  padding: 0 0.15em;
  border-radius: 2px;
  /* Keep the highlight tidy when a long placeholder wraps over lines. */
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

/* Effective / last updated dates, shown under the page title. */
.legal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 2.75rem;
  margin: 1.6rem 0 0;
}
.legal-meta div {
  margin: 0;
}
.legal-meta dt {
  font-family: var(--font-condensed);
  font-size: var(--fs-eyebrow);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--reed-olive);
}
.legal-meta dd {
  margin: 0.15rem 0 0;
  font-family: var(--font-serif);
  font-size: 1.2rem;
}

/* Two-column shell. */
.legal-layout {
  display: grid;
  gap: var(--gap);
}

/* Contents list. */
.legal-toc details {
  border: 1px solid var(--line-strong);
  background: var(--cream-deep);
  padding: 0.35rem 1rem;
}
.legal-toc__summary {
  cursor: pointer;
  font-weight: 600;
  padding: 0.7rem 0;
}
.legal-toc__list {
  list-style: none;
  margin: 0;
  padding: 0 0 0.7rem;
}
.legal-toc__list li {
  border-top: 1px solid var(--line);
}
.legal-toc__list a {
  display: block;
  padding: 0.5rem 0;
  font-size: var(--fs-small);
  color: var(--reed-olive);
  text-decoration: none;
}
.legal-toc__list a:hover,
.legal-toc__list a:focus-visible {
  color: var(--bark);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

/* Summary box that opens the clauses. */
.legal-summary {
  border: 1px solid var(--line-strong);
  border-left: 4px solid var(--straw);
  background: var(--cream-deep);
  padding: 1rem 1.3rem;
  margin-bottom: 2.25rem;
}
.legal-summary p {
  margin: 0;
  max-width: 62ch;
}

/* Clause body. */
.legal-body ul {
  margin: 0 0 1em;
  padding-left: 1.2rem;
}
.legal-body li {
  margin-bottom: 0.45rem;
  max-width: 66ch;
}
.legal-address {
  font-style: normal;
  margin-bottom: 1.6rem;
}
.legal-backtotop {
  margin-top: 2.5rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--line);
}
.legal-version {
  font-size: var(--fs-small);
  color: var(--reed-olive);
  margin-top: 1.5rem;
}

/* Consent line under the contact, newsletter and application forms. */
.form-consent {
  font-size: var(--fs-small);
  color: var(--bark-soft);
  margin: 0.7rem 0 0;
  max-width: 46ch;
}
.form-consent a {
  color: var(--reed-olive);
}
/* In the dark footer the newsletter form needs the lighter pairings. */
.site-footer .form-consent {
  color: var(--cream-soft);
}
.site-footer .form-consent a {
  color: var(--straw);
}

@media (min-width: 64em) {
  .legal-layout {
    grid-template-columns: minmax(14rem, 17rem) minmax(0, 1fr);
    gap: clamp(2rem, 5vw, 4rem);
    align-items: start;
  }
  .legal-toc {
    position: sticky;
    top: calc(var(--header-h) + 1.5rem);
  }
}
