/* Attolloo Group — site stylesheet for the main pages.
   The blog still uses /style.css; the header lives in /css/menu.css. */

@font-face {
  font-family: "Schibsted Grotesk";
  src: url("/fonts/schibsted-grotesk-latin-wght-normal.woff2") format("woff2");
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Source Serif 4";
  src: url("/fonts/source-serif-4-latin-wght-normal.woff2") format("woff2");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Colours taken from the Attolloo logo, plus a lamp-light amber */
  --ink: #002448;
  --text: #1c2f45;
  --text-soft: #4b5d72;
  --green: #30b454;
  --green-deep: #1b7a3a;
  --blue: #18609c;
  --amber: #e9b44c;
  --snow: #ffffff;
  --frost: #f2f6f9;
  --line: #d6dfe8;

  --sans: "Schibsted Grotesk", "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;

  --wrap: 1120px;
  --gutter: clamp(20px, 4vw, 40px);
  --measure: 62ch;
  --radius: 6px;
}

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

html { -webkit-text-size-adjust: 100%; scroll-padding-top: 96px; }

body {
  margin: 0;
  background: var(--snow);
  color: var(--text);
  font-family: var(--serif);
  font-size: 1.125rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; }

/* An element marked hidden stays hidden, whatever display its class sets */
[hidden] { display: none !important; }

a { color: var(--blue); text-underline-offset: 0.16em; }
a:hover { color: var(--ink); }

:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 2px; }

.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
  padding: 0.85em 1.35em;
  border-radius: var(--radius);
  border: 2px solid transparent;
  text-decoration: none;
  cursor: pointer;
}
.btn--primary { background: var(--green-deep); color: #fff; }
.btn--primary:hover { background: #14602d; color: #fff; }
.btn--light { background: #fff; color: var(--ink); }
.btn--light:hover { background: var(--frost); color: var(--ink); }
.btn--quiet { background: transparent; color: var(--ink); border-color: var(--line); }
.btn--quiet:hover { border-color: var(--ink); }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: flex-end;
  min-height: clamp(300px, 42vh, 440px);
  background-color: var(--ink);
  background-image: var(--hero-img, none);
  background-size: cover;
  background-position: center;
  color: #fff;
}
body[data-page="home"] .hero { min-height: clamp(400px, 62vh, 620px); }

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(100deg, rgba(0, 36, 72, 0.94) 0%, rgba(0, 36, 72, 0.8) 42%, rgba(0, 36, 72, 0.38) 100%);
}

.hero-inner {
  width: 100%;
  max-width: calc(var(--wrap) + 2 * var(--gutter));
  margin-inline: auto;
  padding: clamp(56px, 9vw, 104px) var(--gutter) clamp(40px, 6vw, 72px);
}

.hero h1 {
  margin: 0;
  max-width: 21ch;
  font-family: var(--sans);
  font-weight: 700;
  font-size: clamp(2.1rem, 5vw, 3.6rem);
  line-height: 1.06;
  letter-spacing: -0.022em;
  text-wrap: balance;
}

.hero-sub {
  margin: 1.1em 0 0;
  max-width: 56ch;
  font-size: clamp(1.1rem, 1.6vw, 1.3rem);
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.88);
  white-space: pre-line;
}

.hero-actions { margin: 1.8em 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: 0.6em 1.7em; }
.hero-link {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  min-height: 44px;
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  text-decoration: none;
}
.hero-link:hover { color: #fff; text-decoration: underline; text-underline-offset: 0.22em; }
.hero-link:focus-visible { outline-color: #fff; }
.hero-link-icon {                       /* play triangle in a ring */
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.9em;
  height: 1.9em;
  border: 1.5px solid currentColor;
  border-radius: 50%;
}
.hero-link-icon::before {
  content: "";
  margin-left: 0.14em;
  border-style: solid;
  border-width: 0.3em 0 0.3em 0.5em;
  border-color: transparent transparent transparent currentColor;
}

/* ---------- Home hero: the path from product to market ----------
   A drawing of the headline: the dot runs to the gap and is stopped by the ones who have to say yes.
   Written by /js/site.js (heroPathHtml). It arrives once, when the page opens; nothing moves for
   readers who have asked for reduced motion. Hovering the booking button shows the way through. */

body[data-page="home"] .hero h1 { max-width: 26ch; }
.hero-line { display: block; }

.hero-path {
  --from: 34%;                         /* how far along the line the gap begins */
  --gap: 46%;
  --post: 38px;
  position: relative;
  display: grid;
  grid-template-columns: var(--from) var(--gap) minmax(0, 1fr);
  max-width: 880px;
  margin-top: clamp(30px, 4.6vw, 52px);
  padding-top: calc(var(--post) + 2.6em);          /* room for the posts and their names above the line */
  font-family: var(--sans);
  font-size: 0.86rem;
  font-weight: 600;
  line-height: 1.25;
}
.hp-seg { position: relative; display: block; padding-top: 0.95em; color: rgba(255, 255, 255, 0.82); }
.hp-seg > i { position: absolute; top: 0; left: 0; right: 0; height: 3px; background: #fff; transform-origin: left center; transition: background-color 0.5s ease; }
.hp-seg > b { display: block; font-weight: 600; }
.hp-seg--to { text-align: right; }

.hp-gap { position: relative; display: block; height: 3px; }
.hp-dash {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(90deg, var(--amber) 0 9px, transparent 9px 15px);
  transition: background 0.4s ease;
}
/* one post for each of the ones who have to say yes, standing on the line with the name above it */
.hp-post {
  position: absolute;
  left: calc((var(--k) + 0.5) * 100% / var(--n, 4));
  bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5em;
  transform: translateX(-50%);
}
.hp-post > b { font-weight: 600; color: #fff; white-space: nowrap; }
.hp-post > i {
  display: block;
  width: 4px;
  height: var(--post);
  border-radius: 2px 2px 0 0;
  background: var(--amber);
  box-shadow: 0 0 12px rgba(233, 180, 76, 0.65);
  transform-origin: 50% 100%;
  transition: background-color 0.25s ease, box-shadow 0.25s ease, transform 0.35s cubic-bezier(0.6, 0, 0.9, 0.4);
  transition-delay: calc(var(--k) * 90ms);
}

/* the dot: the company, waiting where the gap begins */
.hp-dot {
  position: absolute;
  top: calc(var(--post) + 2.6em + 1.5px);
  left: calc(var(--from) - 11px);
  width: 16px;
  height: 16px;
  margin: -8px 0 0 -8px;
  transition: left 0.95s cubic-bezier(0.6, 0, 0.2, 1) 0.42s;
}
.hp-dot > b {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(233, 180, 76, 0.35), 0 0 20px rgba(233, 180, 76, 0.8);
  transition: box-shadow 0.4s ease;
}

/* Hovering or focusing the booking button: each one says yes, the posts give way, and the dot goes through */
.hero:has(.hero-actions .btn:hover) .hp-post > i,
.hero:has(.hero-actions .btn:focus-visible) .hp-post > i {
  background: var(--green);
  box-shadow: 0 0 14px rgba(48, 180, 84, 0.9);
  transform: scaleY(0.28);
}
.hero:has(.hero-actions .btn:hover) .hp-dash,
.hero:has(.hero-actions .btn:focus-visible) .hp-dash { background: var(--green); }
.hero:has(.hero-actions .btn:hover) .hp-seg--to > i,
.hero:has(.hero-actions .btn:focus-visible) .hp-seg--to > i { background: var(--green); }
.hero:has(.hero-actions .btn:hover) .hp-dot,
.hero:has(.hero-actions .btn:focus-visible) .hp-dot { left: calc(100% - 8px); }
.hero:has(.hero-actions .btn:hover) .hp-dot > b,
.hero:has(.hero-actions .btn:focus-visible) .hp-dot > b { box-shadow: 0 0 0 4px rgba(48, 180, 84, 0.4), 0 0 20px rgba(48, 180, 84, 0.85); }

@media (max-width: 640px) {
  .hero-path { --from: 24%; --gap: 55%; --post: 30px; font-size: 0.74rem; padding-top: calc(var(--post) + 4.4em); }
  .hp-dot { top: calc(var(--post) + 4.4em + 1.5px); width: 14px; height: 14px; margin: -7px 0 0 -7px; left: calc(var(--from) - 9px); }
  /* the names would run into each other in one row: every other post is taller */
  .hp-post:nth-child(odd) > i { height: calc(var(--post) + 1.7em); }
}

/* How it arrives: one sequence when the page opens */
@media (prefers-reduced-motion: no-preference) {
  @keyframes hp-rise { from { opacity: 0; transform: translateY(0.35em); } to { opacity: 1; transform: none; } }
  @keyframes hp-fade { from { opacity: 0; } to { opacity: 1; } }
  @keyframes hp-draw { from { transform: scaleX(0); } to { transform: scaleX(1); } }
  @keyframes hp-run { from { left: 8px; } }
  @keyframes hp-grow { from { transform: scaleY(0); } to { transform: scaleY(1); } }
  @keyframes hp-try {
    0%, 62%, 100% { transform: translateX(0); }
    74% { transform: translateX(9px); }
    82% { transform: translateX(-5px); }
    92% { transform: translateX(1px); }
  }
  body[data-page="home"] .hero-line { animation: hp-rise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) 0.1s backwards; }
  body[data-page="home"] .hero-line + .hero-line { animation-delay: 1.2s; }
  .hp-seg--from > i { animation: hp-draw 0.85s cubic-bezier(0.3, 0.6, 0.2, 1) 0.2s backwards; }
  .hp-seg--from > b { animation: hp-fade 0.5s ease 0.3s backwards; }
  .hp-dot { animation: hp-run 0.95s cubic-bezier(0.3, 0.6, 0.2, 1) 0.2s backwards, hp-fade 0.3s ease 0.2s backwards; }
  .hp-dash { animation: hp-fade 0.4s ease 1.25s backwards; }
  .hp-post > i { animation: hp-grow 0.5s cubic-bezier(0.2, 0.9, 0.25, 1.25) backwards; animation-delay: calc(1.4s + var(--k) * 0.12s); }
  .hp-post > b { animation: hp-fade 0.4s ease backwards; animation-delay: calc(1.55s + var(--k) * 0.12s); }
  .hp-seg--to > i, .hp-seg--to > b { animation: hp-fade 0.5s ease 1.75s backwards; }
  body[data-page="home"] .hero-sub { animation: hp-rise 0.6s ease 1.9s backwards; }
  body[data-page="home"] .hero-actions { animation: hp-rise 0.6s ease 2.05s backwards; }
  .hp-dot > b { animation: hp-try 3s ease-in-out 3s infinite; }
  .hero:has(.hero-actions .btn:hover) .hp-dot > b,
  .hero:has(.hero-actions .btn:focus-visible) .hp-dot > b { animation: none; }
}
@media (prefers-reduced-motion: reduce) {
  .hp-dot, .hp-post > i, .hp-seg > i, .hp-dash { transition: none; }
}

/* ---------- Home: how it works, in three steps, right under the hero ---------- */

.steps { border-bottom: 1px solid var(--line); background: var(--frost); }
.steps-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(22px, 4vw, 56px);
  max-width: calc(var(--wrap) + 2 * var(--gutter));
  margin: 0 auto;
  padding: clamp(30px, 4.4vw, 52px) var(--gutter);
}
.steps-list li { position: relative; padding-left: 3.2em; }
.steps-n {
  position: absolute;
  left: 0;
  top: -0.1em;
  width: 2.2em;
  height: 2.2em;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 700;
  line-height: 2.2em;
  text-align: center;
}
.steps-title { margin: 0 0 0.3em; font-family: var(--sans); font-size: 1.14rem; font-weight: 700; line-height: 1.25; letter-spacing: -0.008em; color: var(--ink); }
.steps-list p { margin: 0; font-size: 1.02rem; line-height: 1.5; color: var(--text); }
@media (max-width: 760px) {
  .steps-list { grid-template-columns: minmax(0, 1fr); gap: 22px; }
}

/* ---------- "In short": three lines under the hero on the framework pages ---------- */

.in-short { border-bottom: 1px solid var(--line); background: var(--frost); }
.in-short-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(20px, 4vw, 56px);
  max-width: calc(var(--wrap) + 2 * var(--gutter));
  margin: 0 auto;
  padding: clamp(26px, 3.6vw, 42px) var(--gutter);
}
.in-short-item { padding-top: 0.85em; border-top: 3px solid var(--green); }
.in-short dt { margin-bottom: 0.35em; font-family: var(--sans); font-size: 0.95rem; font-weight: 700; color: var(--ink); }
.in-short dd { margin: 0; font-size: 1.02rem; line-height: 1.5; color: var(--text); }
@media (max-width: 760px) {
  .in-short-list { grid-template-columns: minmax(0, 1fr); gap: 18px; }
}

/* ---------- Sections: image beside text ---------- */

.story-row {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: start;
  padding-block: clamp(48px, 7vw, 92px);
}
.story-row + .story-row { border-top: 1px solid var(--line); }

.story-row:nth-child(even) { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.story-row:nth-child(even) .story-media { order: 2; }

.story-row--text { grid-template-columns: minmax(0, 1fr); }
.story-row--text:nth-child(even) { grid-template-columns: minmax(0, 1fr); }

.story-media { margin: 0; }
.story-media img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius);
  background: var(--frost);
}

/* Diagrams: SVG files placed in the page by /js/site.js */
.diagram {
  aspect-ratio: 4 / 3;
  padding: clamp(10px, 3%, 22px);
  border-radius: var(--radius);
  background: var(--frost);
}
.diagram svg { display: block; width: 100%; height: 100%; }
.diagram img { display: block; width: 100%; height: 100%; aspect-ratio: auto; object-fit: contain; background: none; }
.diagram a { cursor: pointer; }
.diagram a:hover .diagram-row,
.diagram a:focus-visible .diagram-row { stroke: var(--ink); }
.diagram a:focus-visible { outline: none; }
.diagram a:focus-visible .diagram-row { stroke-width: 3; }

.story-body h2 {
  margin: 0 0 0.7em;
  max-width: 24ch;
  font-family: var(--sans);
  font-weight: 700;
  font-size: clamp(1.55rem, 2.7vw, 2.15rem);
  line-height: 1.14;
  letter-spacing: -0.016em;
  color: var(--ink);
  text-wrap: balance;
}

@media (min-width: 900px) {
  .story-media { position: sticky; top: 104px; }
  .story-row--text .story-body {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: clamp(28px, 5vw, 72px);
    align-items: start;
  }
  .story-row--text .story-body h2 { margin-bottom: 0; }
}

@media (max-width: 760px) {
  .story-row,
  .story-row:nth-child(even) { grid-template-columns: minmax(0, 1fr); }
  .story-row:nth-child(even) .story-media { order: 0; }
  .story-media img { aspect-ratio: 4 / 3; }
}

.empty-note { padding-block: 64px; color: var(--text-soft); }

/* ---------- Text written in the CMS ---------- */

.prose > * { max-width: var(--measure); }
.prose > :first-child { margin-top: 0; }
.prose > :last-child { margin-bottom: 0; }

.prose p { margin: 0 0 1.05em; }

.prose h3 {
  margin: 1.9em 0 0.3em;
  font-family: var(--sans);
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0.035em;
  color: var(--ink);
}

/* Timeline: "GENERATION n — … (years)" headings and the text under them */
.prose h3.gen,
.prose h3.gen ~ * {
  margin-left: 6px;
  padding-left: 1.6rem;
  border-left: 2px solid var(--line);
}
.prose h3.gen { position: relative; margin-top: 0; margin-bottom: 0; padding-top: 1.7em; padding-bottom: 0.35em; }
.prose h3.gen ~ p { margin-bottom: 0; padding-bottom: 1.05em; }
.prose h3.gen::before {
  content: "";
  position: absolute;
  left: -8px;
  top: calc(1.7em + 0.5rem);
  width: 14px;
  height: 14px;
  border: 3px solid var(--green);
  border-radius: 50%;
  background: #fff;
}
.gen-years {
  display: block;
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--green-deep);
}
.gen-name { display: block; margin-top: 0.25em; }
/* what follows the timeline (the note on integrity) steps back out of it */
.prose h3.gen ~ h3:not(.gen),
.prose h3.gen ~ h3:not(.gen) ~ * { margin-left: 0; padding-left: 0; border-left: 0; }
.prose h3.gen ~ h3:not(.gen) { margin-top: 1.9em; }
.prose h3.gen ~ h3:not(.gen) ~ p { padding-bottom: 0; margin-bottom: 1.05em; }

/* Second level: "+++ Title" in the CMS text folds what follows behind that title */
.prose details.more { margin-top: 1.3em; margin-bottom: 1.05em; }
.prose details.more > summary {
  display: inline-flex;
  align-items: center;
  gap: 0.65em;
  min-height: 44px;
  padding: 0.35em 0;
  font-family: var(--sans);
  font-size: 0.98rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--green-deep);
  cursor: pointer;
  list-style: none;
}
.prose details.more > summary::-webkit-details-marker { display: none; }
.prose details.more > summary::before {      /* plus, turning into minus when open */
  content: "";
  flex: 0 0 auto;
  width: 1.5em;
  height: 1.5em;
  border: 1.5px solid currentColor;
  border-radius: 50%;
  background:
    linear-gradient(currentColor, currentColor) center / 0.62em 1.5px no-repeat,
    linear-gradient(currentColor, currentColor) center / 1.5px 0.62em no-repeat;
}
.prose details.more[open] > summary::before {
  background: linear-gradient(currentColor, currentColor) center / 0.62em 1.5px no-repeat;
}
.prose details.more > summary:hover { color: var(--ink); }
.prose details.more > summary:hover .more-label { text-decoration: underline; text-underline-offset: 0.2em; }
.prose details.more > summary:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 4px; }
.more-body { padding-top: 0.6em; }
.more-body > :first-child { margin-top: 0; }
.more-body > :last-child { margin-bottom: 0; }
/* in the timeline the fold stays on the rail */
.prose h3.gen ~ details.more { margin-top: 0; margin-bottom: 0; padding-bottom: 0.9em; }
.prose h3.gen ~ p:has(+ details.more) { padding-bottom: 0.25em; }
.prose h3.gen ~ h3:not(.gen) ~ details.more { margin-top: 1.3em; margin-bottom: 1.05em; padding-bottom: 0; }

.prose ul { margin: 0 0 1.05em; padding-left: 1.15em; }
.prose li { margin-bottom: 0.4em; padding-left: 0.2em; }
.prose li::marker { color: var(--green-deep); }
.prose ol { margin: 0 0 1.05em; padding-left: 1.6em; }
.prose ol li { margin-bottom: 0.75em; padding-left: 0.35em; }
.prose ol li::marker { font-family: var(--sans); font-weight: 700; }

.prose blockquote {
  margin: 1.7em 0;
  padding: 0.1em 0 0.1em 1.1em;
  border-left: 3px solid var(--green);
  font-size: 1.22rem;
  line-height: 1.5;
  color: var(--ink);
}

/* A framed box: "::: Title" in the CMS text, ended by a line with only ":::" */
.prose .callout {
  margin: 1.7em 0;
  padding: 1.25em 1.35em 1.3em;
  border: 1px solid var(--line);
  border-top: 3px solid var(--green);
  border-radius: var(--radius);
  background: var(--frost);
}
.prose .callout > :last-child { margin-bottom: 0; }
.prose .callout .callout-title {
  margin: 0 0 0.9em;
  font-size: 1.12rem;
  letter-spacing: -0.005em;
}
.prose .callout ol { list-style: none; margin: 0 0 1.1em; padding: 0; counter-reset: step; }
.prose .callout ol li {
  counter-increment: step;
  position: relative;
  margin-bottom: 0.85em;
  padding-left: 2.5em;
  font-size: 1.02rem;
  line-height: 1.5;
}
.prose .callout ol li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0.1em;
  width: 1.75em;
  height: 1.75em;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  font-family: var(--sans);
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.75em;
  text-align: center;
}
.prose .callout p > a:only-child,
.prose p > a[href$="#screening"]:only-child {
  display: inline-block;
  padding: 0.6em 1.1em;
  border-radius: var(--radius);
  background: var(--green-deep);
  color: #fff;
  font-family: var(--sans);
  font-size: 0.98rem;
  font-weight: 600;
  text-decoration: none;
}
.prose .callout p > a:only-child:hover,
.prose p > a[href$="#screening"]:only-child:hover { background: #14602d; }
.prose .callout p > a:only-child:focus-visible,
.prose p > a[href$="#screening"]:only-child:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }

.prose .lead-in {
  font-family: var(--sans);
  font-size: 0.86em;
  font-weight: 700;
  letter-spacing: 0.035em;
  color: var(--ink);
}

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

.contact {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
  gap: clamp(32px, 6vw, 88px);
  align-items: start;
  padding-block: clamp(48px, 7vw, 92px);
}
.contact h2 {
  margin: 0;
  font-family: var(--sans);
  font-weight: 700;
  font-size: clamp(1.4rem, 2.3vw, 1.8rem);
  line-height: 1.15;
  letter-spacing: -0.014em;
  color: var(--ink);
}
.contact-photo { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); margin-bottom: 1.3rem; }
.contact-role { margin: 0.35em 0 0; font-family: var(--sans); font-size: 1rem; color: var(--text-soft); }
.contact-ways { list-style: none; margin: 1.5rem 0 0; padding: 0; border-top: 1px solid var(--line); font-family: var(--sans); font-size: 1rem; }
.contact-ways li { display: grid; grid-template-columns: 5.6em minmax(0, 1fr); gap: 0.8em; padding: 0.8em 0; border-bottom: 1px solid var(--line); }
.contact-ways li > span:first-child { color: var(--text-soft); }
.contact-ways a { overflow-wrap: anywhere; }

#formHeading { scroll-margin-top: 96px; }
.contact-intro { margin: 0.7em 0 0; max-width: 54ch; }
.contact-prefill { margin: 1.1em 0 0; padding: 0.7em 0.9em; border-left: 3px solid var(--green); background: #f1f8f3; font-family: var(--sans); font-size: 0.98rem; }

.contact-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.15rem 1.25rem; margin-top: 1.7rem; font-family: var(--sans); }
.contact-form .field--wide { grid-column: 1 / -1; }
.contact-form label { display: block; margin-bottom: 0.4em; font-size: 0.98rem; font-weight: 600; color: var(--ink); }
.contact-form .optional { font-weight: 400; color: var(--text-soft); }
.contact-form input,
.contact-form select,
.contact-form textarea {
  display: block;
  width: 100%;
  min-height: 48px;
  padding: 0.65em 0.8em;
  border: 1.5px solid #b7c4d1;
  border-radius: var(--radius);
  background: #fff;
  color: var(--text);
  font: inherit;
  font-size: 1.05rem;
  line-height: 1.4;
}
.contact-form textarea { resize: vertical; min-height: 9.5em; }
.contact-form input:hover,
.contact-form select:hover,
.contact-form textarea:hover { border-color: var(--text-soft); }
.contact-form input:focus-visible,
.contact-form select:focus-visible,
.contact-form textarea:focus-visible { outline: 3px solid var(--blue); outline-offset: 1px; border-color: var(--blue); }
.contact-form .check { display: flex; align-items: flex-start; gap: 0.7em; margin: 0; font-weight: 500; cursor: pointer; }
.contact-form .check input { flex: 0 0 auto; width: 1.25rem; height: 1.25rem; min-height: 0; margin: 0.12em 0 0; padding: 0; accent-color: var(--green-deep); }
.contact-form .check small { display: block; margin-top: 0.15em; font-size: 0.9rem; font-weight: 400; color: var(--text-soft); }
.contact-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.contact-actions { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 1rem 1.4rem; align-items: center; margin-top: 0.3rem; }
.contact-privacy { margin: 0; font-size: 0.9rem; line-height: 1.45; color: var(--text-soft); }
.contact-error { margin: 0; padding: 0.8em 1em; border-left: 3px solid var(--amber); background: #fdf6e6; font-size: 1rem; color: var(--ink); }
.contact-success { margin-top: 1.7rem; padding: 1.4rem 1.5rem; border-left: 3px solid var(--green); background: #f1f8f3; }
.contact-success h3 { margin: 0 0 0.3em; font-family: var(--sans); font-size: 1.2rem; color: var(--ink); }
.contact-success p { margin: 0; }
.contact-success:focus { outline: none; }

@media (max-width: 820px) {
  .contact { grid-template-columns: minmax(0, 1fr); }
  .contact-card { display: grid; grid-template-columns: minmax(0, 1fr); max-width: 30rem; }
  .contact-form { grid-template-columns: minmax(0, 1fr); }
  .contact-actions { grid-template-columns: minmax(0, 1fr); }
  .contact-actions .btn { justify-self: start; }
}

/* ---------- Page not found ---------- */

.notfound { padding-block: clamp(48px, 7vw, 92px); }
.notfound p { max-width: var(--measure); margin: 0 0 1.05em; }
.notfound ul { margin: 0.4em 0 0; padding-left: 1.15em; font-family: var(--sans); }
.notfound li { margin-bottom: 0.5em; }
.notfound li::marker { color: var(--green-deep); }

/* ---------- Invitation to the self-test ---------- */

.match-band { background: var(--frost); border-top: 1px solid var(--line); }
.match-band-inner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: clamp(20px, 4vw, 48px);
  align-items: center;
  padding-block: clamp(36px, 5vw, 60px);
}
.match-band svg { display: block; width: 92px; height: auto; }
.match-band h2 {
  margin: 0 0 0.25em;
  font-family: var(--sans);
  font-size: clamp(1.3rem, 2.2vw, 1.7rem);
  line-height: 1.2;
  letter-spacing: -0.012em;
  color: var(--ink);
}
.match-band p { margin: 0; max-width: 52ch; color: var(--text-soft); }

@media (max-width: 760px) {
  .match-band-inner { grid-template-columns: minmax(0, 1fr); }
  .match-band svg { width: 64px; }
}

/* ---------- Footer ---------- */

.site-footer {
  background: var(--ink);
  color: rgba(255, 255, 255, 0.82);
  font-family: var(--sans);
  font-size: 0.95rem;
  line-height: 1.55;
}
.footer-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px 64px;
  max-width: calc(var(--wrap) + 2 * var(--gutter));
  margin-inline: auto;
  padding: clamp(36px, 5vw, 56px) var(--gutter);
}
.footer-brand { font-size: 1.1rem; font-weight: 700; color: #fff; }
.footer-copy { margin-top: 6px; color: rgba(255, 255, 255, 0.66); }
.footer-nav { display: grid; grid-template-columns: repeat(2, auto); gap: 6px 36px; align-content: start; }
.footer-nav a { color: #fff; text-decoration: none; }
.footer-nav a:hover { text-decoration: underline; color: #fff; }

@media (max-width: 600px) {
  .footer-inner { grid-template-columns: minmax(0, 1fr); }
  .footer-nav { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Self-test page ---------- */

.match-intro { background: var(--ink); color: #fff; }
.match-intro-inner { padding-block: clamp(44px, 7vw, 84px) clamp(36px, 5vw, 60px); }
.match-intro h1 {
  margin: 0;
  max-width: 18ch;
  font-family: var(--sans);
  font-weight: 700;
  font-size: clamp(2.1rem, 5vw, 3.4rem);
  line-height: 1.06;
  letter-spacing: -0.022em;
}
.match-intro p {
  margin: 1em 0 0;
  max-width: 56ch;
  font-size: clamp(1.1rem, 1.6vw, 1.25rem);
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.88);
}

.match-layout {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: start;
  padding-block: clamp(36px, 6vw, 72px) clamp(56px, 8vw, 96px);
}

.match-figure { margin: 0; text-align: center; }
.match-figure svg { display: block; width: 100%; max-width: 320px; height: auto; margin-inline: auto; }
.match-figure figcaption {
  margin-top: 10px;
  font-family: var(--sans);
  font-size: 0.9rem;
  color: var(--text-soft);
}
@media (min-width: 900px) { .match-figure { position: sticky; top: 104px; } }

.hex-wedge { fill: #fff; stroke: var(--ink); stroke-width: 1.5; stroke-linejoin: round; transition: fill 0.2s ease; }
.hex-wedge[data-level="2"] { fill: var(--green); }
.hex-wedge[data-level="1"] { fill: var(--amber); }
.hex-wedge[data-level="0"] { fill: #c5d0db; }
.hex-wedge[data-current="true"] { stroke-width: 4; }
.hex-label { font-family: var(--sans); font-size: 13px; font-weight: 600; fill: var(--ink); }

.hex-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 16px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
  font-family: var(--sans);
  font-size: 0.85rem;
  color: var(--text-soft);
}
.hex-legend span {
  display: inline-block;
  width: 0.8em;
  height: 0.8em;
  margin-right: 0.4em;
  border: 1.5px solid var(--ink);
  vertical-align: -0.05em;
}
.hex-legend .lv2 { background: var(--green); }
.hex-legend .lv1 { background: var(--amber); }
.hex-legend .lv0 { background: #c5d0db; }

.match-step {
  margin: 0 0 0.6em;
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-soft);
}

.match-panel h2 {
  margin: 0 0 0.5em;
  font-family: var(--sans);
  font-weight: 700;
  font-size: clamp(1.4rem, 2.5vw, 1.9rem);
  line-height: 1.2;
  letter-spacing: -0.014em;
  color: var(--ink);
  text-wrap: balance;
}
.match-panel h2:focus { outline: none; }
.match-panel p { max-width: var(--measure); }
.match-help { margin: 0 0 1.2em; color: var(--text-soft); }
.match-help li { margin-bottom: 0.25em; }

.match-panel fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
.match-panel legend { padding: 0; }

.match-options { display: grid; gap: 10px; margin: 1.3em 0 0; }
.match-option {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  padding: 16px 18px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  line-height: 1.45;
  cursor: pointer;
}
.match-option:hover { border-color: var(--text-soft); }
.match-option input {
  width: 1.15em;
  height: 1.15em;
  margin: 0.2em 0 0;
  accent-color: var(--green-deep);
}
.match-option:has(input:checked) { border-color: var(--green-deep); background: #f1f8f3; box-shadow: inset 0 0 0 1px var(--green-deep); }
.match-option:has(input:focus-visible) { outline: 3px solid var(--blue); outline-offset: 2px; }
.match-option input:focus-visible { outline: none; }

.match-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 1.8em; }

.match-note {
  margin: 1.6em 0 0;
  font-family: var(--sans);
  font-size: 0.9rem;
  color: var(--text-soft);
}

.match-verdict {
  margin: 0 0 1.4em;
  padding: 0 0 0 1.1em;
  border-left: 4px solid var(--line);
}
.match-verdict[data-verdict="strong"] { border-left-color: var(--green); }
.match-verdict[data-verdict="possible"] { border-left-color: var(--amber); }
.match-verdict p { margin: 0; }

.match-results { margin: 2em 0 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.match-results li {
  display: grid;
  grid-template-columns: minmax(0, 9em) minmax(0, 1fr);
  gap: 4px 20px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.match-results .dim { font-family: var(--sans); font-weight: 700; color: var(--ink); }
.match-results .level { font-family: var(--sans); font-size: 0.9rem; font-weight: 600; color: var(--text-soft); }
.match-results .level::before {
  content: "";
  display: inline-block;
  width: 0.75em;
  height: 0.75em;
  margin-right: 0.45em;
  border: 1.5px solid var(--ink);
  vertical-align: -0.03em;
  background: #c5d0db;
}
.match-results li[data-level="2"] .level::before { background: var(--green); }
.match-results li[data-level="1"] .level::before { background: var(--amber); }
.match-results .answer { grid-column: 2; color: var(--text); }
.match-results .dim-cell { display: flex; flex-direction: column; gap: 2px; }

.match-subhead {
  margin: 2.2em 0 0.4em;
  font-family: var(--sans);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--ink);
}
.match-reasons { margin: 0; padding-left: 1.15em; max-width: var(--measure); }
.match-reasons li { margin-bottom: 0.5em; }

.match-scoring { margin-top: 2.2em; max-width: var(--measure); font-size: 1rem; color: var(--text-soft); }
.match-scoring summary { font-family: var(--sans); font-weight: 600; color: var(--ink); cursor: pointer; }
.match-scoring p { margin: 0.7em 0 0; }

@media (max-width: 899px) {
  .match-layout { grid-template-columns: minmax(0, 1fr); }
  .match-figure svg { max-width: 240px; }
}
@media (max-width: 520px) {
  .match-results li { grid-template-columns: minmax(0, 1fr); }
  .match-results .answer { grid-column: 1; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}

.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;
}
