/*
 * Design refinement layer, loaded after the other stylesheets.
 * - A readable type scale: labels from 12px, body text from 16px.
 * - Text colours that pass WCAG AA contrast in both themes.
 * - Calmer buttons, more breathing room between sections.
 * - Entrance and interaction motion (see motion.js), always optional.
 */

/* ---------- Tokens ---------- */
:root {
  --fs-label: 12px;
  --fs-meta: 13px;
  --fs-small: 14px;
  --fs-body: 16px;
  --fs-lead: clamp(17px, 1.25vw, 19px);
  --track-label: 0.14em;
  --blue-ink: #7cbcf7; /* small blue text on dark surfaces */
  --label: #8fb0d2;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-ui: cubic-bezier(0.4, 0, 0.2, 1);
  --dur-fast: 150ms;
  --dur-base: 250ms;
  --dur-slow: 600ms;
  --radius: 12px;
  --section-gap: clamp(64px, 8vw, 112px);
}
html:not(.dark-theme) {
  --muted: #55697f;
  --blue-ink: #1a68ae;
  --label: #3d6a94;
}
body {
  font-size: var(--fs-body);
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}
h1,
h2,
h3 {
  text-wrap: balance;
}
p {
  text-wrap: pretty;
}

/* ---------- Header ---------- */
@media (min-width: 851px) {
  .header {
    position: sticky;
    top: 0;
    z-index: 30;
    backdrop-filter: saturate(1.4) blur(12px);
    -webkit-backdrop-filter: saturate(1.4) blur(12px);
  }
}
.header nav a {
  font-size: var(--fs-small);
}
.header .nav-contact {
  font-size: var(--fs-small);
  gap: 14px;
  padding: 11px 16px;
  min-height: 44px;
}
.page-directory a {
  font-size: var(--fs-small);
}

/* ---------- Labels and small text ---------- */
.eyebrow,
.section-label,
.cards-heading,
.card-back-top,
.dialog-kicker,
.demo-titlebar,
.demo-step {
  font-size: var(--fs-label);
  letter-spacing: var(--track-label);
  font-weight: 500;
}
.section-label {
  color: var(--blue-ink);
  line-height: 1.6;
}
html:not(.dark-theme) .eyebrow,
html:not(.dark-theme) .cards-heading,
html:not(.dark-theme) .card-back-top,
html:not(.dark-theme) .dialog-kicker,
html:not(.dark-theme) .demo-titlebar,
html:not(.dark-theme) .demo-step {
  color: var(--label);
}
.breadcrumb {
  font-size: var(--fs-meta);
}

/* ---------- Home hero ---------- */
.intro {
  padding-top: clamp(56px, 7vw, 96px);
}
.intro h1 {
  margin-top: 28px;
}
.intro-description,
html:not(.dark-theme) .intro-description {
  font-size: var(--fs-lead);
  line-height: 1.6;
  max-width: 34em;
  margin: 26px auto 0;
  color: var(--muted);
}
.intro-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px 32px;
  margin-top: 36px;
}
.intro-actions .inline-link {
  font-size: var(--fs-body);
}

/* ---------- Expertise cards ---------- */
.expertises {
  padding-top: clamp(56px, 7vw, 88px);
}
.cards-heading {
  margin-bottom: 20px;
}
.cards-heading > span:last-child {
  font-size: var(--fs-meta);
  letter-spacing: 0;
}
.cards-heading svg {
  width: 14px;
  height: 14px;
}
.cards-grid {
  gap: 18px;
}
.flip-card {
  height: 452px;
}
.flip-front,
.flip-back {
  padding: 26px;
}
.card-meta {
  font-size: var(--fs-meta);
}
.card-meta > span:first-child {
  font-size: var(--fs-label);
}
.card-art {
  height: 170px;
  margin-top: 18px;
}
.card-art > svg {
  height: 128px;
}
.card-title {
  font-size: clamp(22px, 1.75vw, 25px);
  line-height: 1.22;
  margin-top: 18px;
}
.card-front-footer {
  font-size: var(--fs-meta);
}
.flip-corner {
  width: 32px;
  height: 32px;
}
.card-back-top button {
  width: 32px;
  height: 32px;
}
.flip-back h2 {
  font-size: 22px;
  line-height: 1.25;
  margin-top: 18px;
}
.flip-back > p {
  font-size: 15px;
  line-height: 1.6;
  margin-top: 14px;
}
.card-outcome {
  font-size: var(--fs-small);
  line-height: 1.5;
  margin-top: 16px;
  padding-left: 12px;
}
.card-more {
  font-size: var(--fs-small);
  padding-top: 16px;
  min-height: 44px;
}
html:not(.dark-theme) .card-meta,
html:not(.dark-theme) .card-front-footer {
  color: var(--label);
}
html:not(.dark-theme) .card-meta > span:first-child {
  color: #5f7f9e;
}
html:not(.dark-theme) .flip-back > p {
  color: #46607a;
}
html:not(.dark-theme) .card-outcome {
  color: var(--blue-ink);
}

/* ---------- Sections ---------- */
.section-heading {
  margin-bottom: 40px;
}
.section-heading h2,
.editorial-band h2,
.page-cta h2,
.demo-invitation h2,
.team-story h2,
.faq-section h2,
.case-heading h2 {
  font-size: clamp(32px, 3.4vw, 46px);
  line-height: 1.12;
}
.section-heading > p {
  max-width: 380px;
  font-size: var(--fs-body);
  line-height: 1.65;
}
.explore-section {
  padding-block: var(--section-gap) 24px;
}
.explore-grid {
  gap: 32px;
}
.explore-link {
  padding: 28px 0 8px;
}
.explore-link h3 {
  font-size: 24px;
  line-height: 1.25;
}
.explore-link p {
  font-size: var(--fs-body);
  line-height: 1.65;
  margin: 14px 0 24px;
}
.inline-link {
  font-size: 15px;
  gap: 10px;
  min-height: 44px;
}
.explore-link .section-label,
.issue-card .section-label {
  font-size: var(--fs-label);
}

/* Closing call to action, shared by the home and inner pages. */
.page-cta {
  padding: clamp(32px, 4.5vw, 56px);
  margin-block: var(--section-gap) 56px;
  gap: 48px;
  border-radius: var(--radius);
}
.page-cta h2 {
  margin: 16px 0 18px;
}
.page-cta p {
  font-size: var(--fs-body);
  line-height: 1.65;
}
.page-cta .button {
  flex-shrink: 0;
}

/* Inner pages */
.page-hero {
  padding-block: clamp(48px, 6vw, 88px) clamp(56px, 6vw, 96px);
}
.page-hero h1 {
  line-height: 1.05;
}
.page-intro {
  font-size: var(--fs-lead);
  line-height: 1.65;
  max-width: 36em;
}
.editorial-note > p {
  font-size: 19px;
  line-height: 1.55;
}
.editorial-note small {
  font-size: var(--fs-meta);
  line-height: 1.6;
}
.content-section {
  padding-block: clamp(48px, 6vw, 80px);
}
.issue-grid {
  gap: 24px;
}
.issue-card {
  padding: clamp(26px, 2.6vw, 36px);
  border-radius: var(--radius);
}
.issue-card h3 {
  font-size: 26px;
}
.issue-card p {
  font-size: var(--fs-body);
  line-height: 1.65;
}
.issue-piste strong {
  font-size: var(--fs-small);
}
.issue-piste p {
  font-size: 15px;
}
.editorial-band {
  padding-block: clamp(48px, 6vw, 80px);
  margin-block: 32px;
}
.editorial-band p {
  font-size: var(--fs-body);
  line-height: 1.7;
  max-width: 34em;
}
.mission-steps li {
  padding-block: 36px;
}
.mission-steps h3 {
  font-size: 24px;
}
.mission-steps p {
  font-size: var(--fs-body);
  line-height: 1.65;
  max-width: 36em;
}
.step-output p {
  font-size: 15px;
  line-height: 1.6;
}
.deliverable-grid {
  gap: 40px;
}
.deliverable-grid h3 {
  font-size: 23px;
}
.deliverable-grid p,
.values-grid p,
.team-story p,
.case-columns p,
.case-next p {
  font-size: var(--fs-body);
  line-height: 1.7;
}
.demo-invitation {
  padding: clamp(32px, 4.5vw, 56px);
  border-radius: var(--radius);
}
.demo-invitation p {
  font-size: var(--fs-body);
  line-height: 1.7;
}
.demo-invitation small {
  font-size: var(--fs-meta);
}
.demo-preview > span:not(.section-label) {
  font-size: var(--fs-small);
}
.method-orbit > span {
  font-size: var(--fs-small);
  padding: 8px 14px;
}
.founders p {
  font-size: var(--fs-meta);
}
.founders h2 {
  font-size: 22px;
}
.values-grid h3 {
  font-size: 27px;
}
.faq-item summary {
  font-size: 17px;
  padding-block: 24px;
}
.faq-item p {
  font-size: var(--fs-body);
  line-height: 1.7;
  max-width: 40em;
}
.case-jump a {
  font-size: 15px;
}
.case-section {
  scroll-margin-top: 120px;
}
.case-situation p {
  font-size: 18px;
  line-height: 1.7;
}
.case-columns h3 {
  font-size: 21px;
}
.related-pages {
  padding-block: 24px 56px;
}

/* ---------- Footer ---------- */
.footer,
.footer button,
.footer a {
  font-size: var(--fs-meta);
}
.footer {
  padding-block: 28px 32px;
}
.footer button {
  padding: 8px 0;
}
html:not(.dark-theme) .footer,
html:not(.dark-theme) .footer button,
html:not(.dark-theme) .footer a {
  color: var(--muted);
}
html:not(.dark-theme) .footer a:hover,
html:not(.dark-theme) .footer button:hover {
  color: var(--blue-ink);
}

/* ---------- Buttons ---------- */
.button {
  gap: 14px;
  min-height: 48px;
  padding: 13px 22px;
  border-radius: 8px;
  font-size: 15px;
  box-shadow: none;
  translate: var(--mg-x, 0) var(--mg-y, 0);
  transition:
    background-color var(--dur-fast) var(--ease-ui),
    border-color var(--dur-fast) var(--ease-ui),
    translate 400ms var(--ease-out);
}
.button svg {
  width: 18px;
  height: 18px;
  transition: transform var(--dur-base) var(--ease-out);
}
.button-dark,
.button-lime,
html:not(.dark-theme) .button-dark,
html:not(.dark-theme) .button-lime {
  box-shadow: none;
}
html:not(.dark-theme) .button-dark,
html:not(.dark-theme) .button-lime {
  background: #1f6fb5;
  border-color: #1f6fb5;
}
.button:hover,
html:not(.dark-theme) .button:hover {
  transform: none;
}
html:not(.dark-theme) .button:hover {
  background: #185d99;
  border-color: #185d99;
}
.button:hover svg {
  transform: translate(2px, -2px);
}
.button:active {
  transform: none;
  background: #154f83;
}
.text-button {
  font-size: var(--fs-small);
  min-height: 44px;
}

/* ---------- Dialogs ---------- */
.topic-content > p {
  font-size: var(--fs-body);
  line-height: 1.7;
}
.topic-list li {
  font-size: 15px;
  line-height: 1.6;
}
.topic-list li > span {
  font-size: var(--fs-label);
}
.topic-note {
  font-size: var(--fs-small) !important;
}
.contact-heading p {
  font-size: var(--fs-body);
}
.contact-form label {
  font-size: var(--fs-small);
}
.contact-form input,
.contact-form textarea,
.contact-form select {
  font-size: var(--fs-body);
  min-height: 48px;
}
.contact-form input::placeholder,
.contact-form textarea::placeholder {
  font-size: var(--fs-small);
}
.form-note {
  font-size: var(--fs-meta);
  line-height: 1.6;
}
.form-result > p,
.form-result textarea {
  font-size: var(--fs-small);
}
.copy-message,
.demo-reset,
.demo-back {
  font-size: var(--fs-small);
}
.legal-content p {
  font-size: 15px;
  line-height: 1.7;
}
.demo-dialog {
  width: 540px;
}
.demo-titlebar span:last-child {
  font-size: var(--fs-label);
}
.demo-intro {
  font-size: 15px;
  line-height: 1.6;
}
.demo-option {
  font-size: 15px;
  padding: 13px 14px;
  min-height: 48px;
}
.demo-option span {
  font-size: var(--fs-label);
  width: 26px;
  height: 26px;
}
.demo-footer {
  font-size: var(--fs-label);
}
.demo-summary strong {
  font-size: 15px;
}
.demo-summary p {
  font-size: var(--fs-small);
  line-height: 1.65;
}
.demo-result-actions .button {
  font-size: var(--fs-small);
  padding: 12px 16px;
}
html:not(.dark-theme) .topic-list li,
html:not(.dark-theme) .topic-content > p,
html:not(.dark-theme) .contact-heading p,
html:not(.dark-theme) .form-note,
html:not(.dark-theme) .form-result > p,
html:not(.dark-theme) .legal-content p,
html:not(.dark-theme) .demo-intro,
html:not(.dark-theme) .demo-footer,
html:not(.dark-theme) .demo-summary p,
html:not(.dark-theme) .demo-option {
  color: var(--muted);
}
html:not(.dark-theme) .topic-list li > span,
html:not(.dark-theme) .demo-option span,
html:not(.dark-theme) .demo-back,
html:not(.dark-theme) .text-button,
html:not(.dark-theme) .topic-note {
  color: var(--blue-ink) !important;
}

/* ---------- Responsive ---------- */
@media (max-width: 1200px) {
  .cards-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .flip-card {
    height: 420px;
  }
}
@media (max-width: 850px) {
  .flip-card {
    height: 440px;
  }
  .explore-link .section-label {
    font-size: var(--fs-label);
  }
  .section-heading > p {
    font-size: var(--fs-body);
  }
  .page-intro {
    font-size: 17px;
  }
}
@media (max-width: 600px) {
  .eyebrow {
    font-size: 11px;
    letter-spacing: 0.12em;
  }
  .intro-description {
    max-width: 30em;
  }
  .intro-actions {
    flex-direction: column;
    gap: 12px;
  }
  .intro-actions .button {
    width: 100%;
  }
  .cards-heading {
    font-size: 11px;
  }
  .cards-heading > span:first-child {
    max-width: 150px;
  }
  .cards-heading > span:last-child {
    font-size: var(--fs-meta);
    max-width: 170px;
  }
  .cards-grid {
    grid-template-columns: 1fr;
  }
  .flip-card {
    height: 430px;
  }
  .flip-front,
  .flip-back {
    padding: 24px;
  }
  .card-art {
    margin-top: 10px;
  }
  .card-title {
    font-size: 26px;
  }
  .flip-back h2 {
    font-size: 24px;
    max-width: none;
  }
  .header .nav-contact {
    font-size: var(--fs-meta);
    padding: 9px 12px;
    gap: 8px;
  }
  .header nav a {
    font-size: var(--fs-small);
  }
  .section-label {
    font-size: 11px;
  }
  .section-heading h2,
  .editorial-band h2,
  .page-cta h2,
  .demo-invitation h2,
  .team-story h2,
  .case-heading h2 {
    font-size: 32px;
  }
  .page-cta .button {
    width: 100%;
  }
  .page-directory a {
    font-size: var(--fs-small);
  }
  .footer > div {
    gap: 4px 20px;
  }
  .faq-item summary {
    font-size: 16px;
  }
  .contact-form label {
    font-size: var(--fs-meta);
  }
  .topic-content > p,
  .editorial-band p,
  .page-intro {
    font-size: var(--fs-body);
  }
  .demo-titlebar,
  .demo-titlebar span:last-child,
  .demo-step {
    font-size: 11px;
  }
}
@media (max-width: 360px) {
  .flip-card {
    height: 470px;
  }
  .eyebrow {
    font-size: 10px;
  }
}

/* =========================================================
 * Motion — adapted from Motion Primitives (ibelick) for a
 * site without a framework. Everything below is disabled
 * by the system setting and by the footer "Réduire" button.
 * ========================================================= */

/* Hero entrance (TextEffect, preset "fade-in-blur", per word). */
@keyframes mp-rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
}
@keyframes mp-blur-in {
  from {
    opacity: 0;
    filter: blur(10px);
    transform: translateY(10px);
  }
}
@keyframes mp-fade {
  from {
    opacity: 0;
  }
}
.motion-on [data-text-effect]:not(.te-ready) {
  opacity: 0;
}
.te-word {
  display: inline-block;
}
.motion-on .te-ready .te-word {
  animation: mp-blur-in 800ms var(--ease-out) both;
  animation-delay: calc(var(--te-delay, 120ms) + var(--i) * 55ms);
}
.motion-on .intro .eyebrow,
.motion-on .breadcrumb,
.motion-on .page-hero > div > .section-label {
  animation: mp-fade 600ms var(--ease-out) both;
}
.motion-on .intro-description,
.motion-on .page-intro {
  animation: mp-rise 700ms var(--ease-out) 480ms both;
}
.motion-on .intro-actions {
  animation: mp-rise 700ms var(--ease-out) 600ms both;
}
.motion-on .page-hero > aside {
  animation: mp-rise 800ms var(--ease-out) 620ms both;
}
.motion-on .cards-heading {
  animation: mp-fade 700ms var(--ease-out) 700ms both;
}
.motion-on .cards-grid > .flip-card {
  animation: mp-rise 800ms var(--ease-out) both;
  animation-delay: calc(760ms + var(--n, 0) * 90ms);
}
.cards-grid > .flip-card:nth-child(2) {
  --n: 1;
}
.cards-grid > .flip-card:nth-child(3) {
  --n: 2;
}
.cards-grid > .flip-card:nth-child(4) {
  --n: 3;
}

/* Scroll reveal (InView + AnimatedGroup): one entrance per element. */
.motion-on [data-reveal]:not(.is-in) {
  opacity: 0;
}
.motion-on [data-reveal].is-in {
  animation: mp-rise 700ms var(--ease-out) both;
  animation-delay: calc(var(--ri, 0) * 90ms);
}

/* Spotlight: a soft light that follows the pointer on cards. */
[data-spotlight] {
  isolation: isolate;
}
.issue-card[data-spotlight],
.founders[data-spotlight],
.demo-preview[data-spotlight] {
  position: relative;
}
[data-spotlight]::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(
    320px circle at var(--sx, 50%) var(--sy, 50%),
    rgb(88 168 245 / 0.14),
    transparent 65%
  );
  transition: opacity 400ms var(--ease-out);
}
html:not(.dark-theme) [data-spotlight]::after {
  background: radial-gradient(
    320px circle at var(--sx, 50%) var(--sy, 50%),
    rgb(30 120 200 / 0.1),
    transparent 65%
  );
}
[data-spotlight].is-lit::after {
  opacity: 1;
}

/* Scroll progress on the longer inner pages. */
.scroll-progress {
  position: fixed;
  inset: 0 0 auto;
  height: 2px;
  z-index: 40;
  background: var(--blue);
  transform-origin: 0 50%;
  transform: scaleX(var(--progress, 0));
  pointer-events: none;
}

/* Small interaction details. */
.inline-link svg {
  transition: transform var(--dur-base) var(--ease-out);
}
.header nav a {
  transition:
    color var(--dur-fast) var(--ease-ui),
    border-color var(--dur-fast) var(--ease-ui);
}
.faq-mark:after {
  transition: transform var(--dur-base) var(--ease-out);
}
.faq-item[open] .faq-mark:after {
  display: block;
  transform: scaleY(0);
}
@supports (interpolate-size: allow-keywords) {
  .faq-item {
    interpolate-size: allow-keywords;
  }
  .faq-item::details-content {
    block-size: 0;
    overflow: hidden;
    transition:
      block-size 450ms var(--ease-out),
      content-visibility 450ms allow-discrete;
  }
  .faq-item[open]::details-content {
    block-size: auto;
  }
}
@keyframes mp-dialog-in {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
  }
}
dialog[open] {
  animation: mp-dialog-in 380ms var(--ease-out);
}
dialog[open]::backdrop {
  animation: mp-fade 300ms var(--ease-out);
}

/* Reduced motion: content is always visible, nothing moves. */
@media (prefers-reduced-motion: reduce) {
  [data-reveal],
  [data-text-effect],
  .te-word {
    opacity: 1 !important;
    animation: none !important;
  }
  .scroll-progress {
    display: none;
  }
  .button {
    translate: none;
  }
}
html.reduce-motion [data-reveal],
html.reduce-motion [data-text-effect],
html.reduce-motion .te-word {
  opacity: 1 !important;
  animation: none !important;
}
html.reduce-motion .scroll-progress {
  display: none;
}
html.reduce-motion .button {
  translate: none;
}

/* ---------- Contrast fixes for small blue and grey text ---------- */
.inline-link,
.case-jump a {
  color: var(--blue-ink);
}
html:not(.dark-theme) .cards-heading > span:last-child {
  color: var(--label);
}
html:not(.dark-theme) .card-meta > span:first-child {
  color: #4d6c8a;
}
html:not(.dark-theme) .flip-corner {
  color: var(--blue-ink);
}
.intro-description span {
  display: block;
}
.header nav a:hover,
.header nav a[aria-current="page"],
.method-orbit > span,
.faq-item p a,
.breadcrumb a:hover,
.page-directory a:hover {
  color: var(--blue-ink);
}
.header nav a[aria-current="page"] {
  border-bottom-color: var(--blue-ink);
}
/* Dark theme: lift the faintest greys above 4.5:1. */
html.dark-theme .cards-heading,
html.dark-theme .card-meta > span:first-child,
html.dark-theme .footer,
html.dark-theme .footer button {
  color: #8ea3bd;
}

/* Mobile: keep the two-line card titles (the hidden <br> glued words together)
   and hint that the menu scrolls sideways without showing a scrollbar. */
@media (max-width: 600px) {
  .card-title br {
    display: inline;
  }
  .header nav {
    scrollbar-width: none;
    -webkit-mask-image: linear-gradient(90deg, #000 82%, transparent);
    mask-image: linear-gradient(90deg, #000 82%, transparent);
    padding-right: 32px;
  }
  .header nav::-webkit-scrollbar {
    display: none;
  }
}
.page-hero > div > .section-label {
  text-transform: uppercase;
}

/* ---------- Design review fixes (taste-design-review, 2026-10-25) ---------- */

/* P1: the closing CTA keeps the same size as every other primary button. */
.page-cta .button {
  font-size: 15px;
}

/* P2: inner pages already list related pages; the extra directory repeated
   the header menu a third time. */
.inner-page .page-directory {
  display: none;
}
.inner-page .related-pages {
  border-bottom: 1px solid var(--line);
}

/* P2: the three "Aller plus loin" links were cramped on tablets. */
@media (max-width: 900px) {
  .explore-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .explore-link p {
    max-width: 36em;
  }
}

/* P2: the method preview looked clickable; it now opens the demo. */
.demo-preview[data-demo-open] {
  cursor: pointer;
  transition: border-color var(--dur-fast) var(--ease-ui);
}
.demo-preview[data-demo-open]:hover {
  border-color: var(--blue);
}

/* P2: small links reach the 24px minimum target height (WCAG 2.2). */
.page-directory a,
.footer a,
.breadcrumb a,
.related-pages .inline-link {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
}
.page-directory a,
.footer a {
  padding-block: 4px;
}

/* =========================================================
 * Light theme on a light beige background. Surfaces turn warm;
 * every blue element (accent text, buttons, illustrations,
 * logo) stays blue. The dark theme is unchanged.
 * ========================================================= */
html:not(.dark-theme) {
  --night: #faf7f0; /* page */
  --panel: #fefcf8; /* cards, inputs */
  --panel-back: #f3eee4; /* call-to-action bands, highlighted blocks */
  --line: #e6ddce;
  --surface-dialog: #fdfbf6;
}
html:not(.dark-theme) .header {
  background: #faf7f0ed;
  border-color: var(--line);
}
html:not(.dark-theme) .intro:before {
  background: radial-gradient(ellipse at 50% 45%, #fffaf099, transparent 65%);
}
html:not(.dark-theme) .flip-front {
  background: linear-gradient(145deg, #fffefb, #f6f1e7);
  border-color: #e2d8c6;
}
html:not(.dark-theme) .flip-front:before {
  background: radial-gradient(ellipse at 50% 20%, #fff8ea99, transparent 65%);
}
html:not(.dark-theme) .flip-back {
  background: #f6f0e6;
  border-color: #e2d8c6;
}
html:not(.dark-theme) .card-more {
  border-color: #ddd1bd;
}
html:not(.dark-theme) .footer,
html:not(.dark-theme) .closing,
html:not(.dark-theme) .topic-list,
html:not(.dark-theme) .topic-list li {
  border-color: var(--line);
}
html:not(.dark-theme) dialog {
  background: var(--surface-dialog);
  border-color: #ddd1bd;
  box-shadow: 0 30px 110px #3d2f1a29;
}
html:not(.dark-theme) dialog::backdrop {
  background: #2b241a66;
}
html:not(.dark-theme) .contact-form input,
html:not(.dark-theme) .contact-form textarea,
html:not(.dark-theme) .contact-form select {
  background-color: var(--panel);
  border-color: #7f93a8; /* 3:1 against the dialog, as WCAG asks for field edges */
}
html:not(.dark-theme) .contact-form select option {
  background: var(--panel);
}
html:not(.dark-theme) .form-result {
  border-color: var(--line);
}
html:not(.dark-theme) .demo-content {
  background: #f6f1e7;
  border-color: #e2d8c6;
}
html:not(.dark-theme) .demo-option {
  background: var(--panel);
}
html:not(.dark-theme) .demo-progress i {
  background: #e8dfd0;
}
html:not(.dark-theme) .contact-form label > span,
html:not(.dark-theme) .demo-preview i {
  color: var(--blue-ink);
}

/* Contact form: outcome of the copy button. */
.copy-hint {
  margin-top: 8px;
  font-size: var(--fs-small);
  line-height: 1.5;
}
.copy-hint:empty {
  display: none;
}
/* 404 page */
.not-found {
  grid-template-columns: 1fr;
}
.not-found .intro-actions {
  justify-content: flex-start;
}
button.inline-link {
  background: none;
  padding: 0;
}

/* ---------- Method page: the four movements as a readable cycle ---------- */
.page-hero:has(.method-cycle) {
  grid-template-columns: minmax(0, 1fr) minmax(0, 400px);
}
.method-cycle {
  margin: 0;
}
.method-cycle svg {
  display: block;
  width: 100%;
  max-width: 400px;
  height: auto;
  margin-inline: auto;
  overflow: visible;
}
.mc-ring {
  fill: none;
  stroke: #9dbde0;
  stroke-width: 1.5;
}
.mc-arrow {
  fill: none;
  stroke: #e8833a;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.mc-node {
  fill: #e5eef8;
  stroke: #7fa6cf;
  stroke-width: 1.5;
}
.mc-num {
  font: 700 13px var(--sans);
  fill: #0e2747;
  stroke: none;
}
.mc-label {
  font: 600 17px var(--sans);
  fill: #0e2747;
  stroke: none;
}
.mc-core {
  fill: #0e2747;
  stroke: none;
}
.mc-core-a {
  font: 500 17px var(--sans);
  fill: #ffffff;
  stroke: none;
}
.mc-core-b {
  font: italic 26px var(--serif);
  fill: #8cc8ff;
  stroke: none;
}
html.dark-theme .mc-node {
  fill: #142941;
  stroke: #3d638b;
}
html.dark-theme .mc-num,
html.dark-theme .mc-label {
  fill: #f2f6fc;
}
html.dark-theme .mc-ring {
  stroke: #345779;
}
html.dark-theme .mc-core {
  fill: #1e78c8;
}
html.dark-theme .mc-core-b {
  fill: #ffffff;
}
@media (max-width: 850px) {
  .page-hero:has(.method-cycle) {
    grid-template-columns: minmax(0, 1fr);
  }
  .method-cycle svg {
    max-width: 380px;
  }
}
