/* Features: artwork first, details on intent. Scoped to this page. */
.lex-features-page > .article-body { max-width: 880px; padding-block: 40px 32px; }
.lex-features-page > .article-body h1 { font-size: clamp(2rem, 4vw, 3rem); line-height: 1.15; margin: 0 0 24px; }
.lex-features-page > .article-body h3 { margin-top: 24px; line-height: 1.4; }
.lex-engines {
  padding: 40px 32px 32px;
  background: #f5edde;
}
.lex-engines__inner { max-width: 880px; margin-inline: auto; }
.lex-engine {
  --acc-expand: 400ms;
  --acc-collapse: 250ms;
  --acc-ease: cubic-bezier(.22,1,.36,1);
  position: relative;
  padding-block: 16px;
}
.lex-engine + .lex-engine { margin-top: 8px; }
.lex-engine h2 { margin: 0; }
.lex-engine__trigger {
  display: grid;
  grid-template-columns: minmax(0,1fr) 320px;
  align-items: center;
  gap: 32px;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #1c1b17;
  text-align: left;
  cursor: pointer;
}
.lex-engine__name {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: clamp(40px,4.5vw,56px);
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: -.04em;
}
.lex-engine__art {
  position: relative;
  display: block;
  width: 320px;
  height: 192px;
  overflow: hidden;
  clip-path: polygon(5% 0,100% 0,95% 100%,0 100%);
}
.lex-engine[data-engine="layer"] .lex-engine__art {
  clip-path: polygon(0 0,95% 0,100% 100%,5% 100%);
}
.lex-engine__art img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.lex-engine__trigger:focus-visible {
  outline: 2px solid #55492b;
  outline-offset: 8px;
}
.lex-engine__actor {
  position: absolute;
  z-index: 4;
  width: 52px;
  height: 52px;
  right: 244px;
  top: 152px;
  opacity: 0;
  pointer-events: none;
}
.lex-engine__summary {
  padding: 24px 64px 8px 0;
  max-width: 440px;
  margin-left: auto;
  transform-origin: top center;
}
body.lex-theme main.lex-features-page .lex-engine__details {
  background: transparent !important;
  border: 0;
  border-radius: 0;
  box-shadow: none !important;
}
.lex-engine__summary p {
  margin: 0;
  color: #56564c;
  font-size: 16px;
  line-height: 1.6;
}
body.lex-theme .lex-engine__cta {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  margin-top: 16px;
  padding: 9px 16px;
  border: 1px solid #5d5a50;
  border-radius: 2px;
  background: transparent;
  color: #1c1b17;
  font-size: 14px;
  line-height: 1.5;
  text-decoration: none;
}
body.lex-theme .lex-engine__cta:hover { background: #1c1b17; color: #f5edde; }
.lex-engine__cta:focus-visible { outline: 2px solid #55492b; outline-offset: 4px; }
.lex-engine__cta:active { transform: translateY(1px); }

/* transitions-dev / 21-accordion.md */
.t-acc-panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows var(--acc-collapse) var(--acc-ease);
}
.t-acc[data-open="true"] .t-acc-panel {
  grid-template-rows: 1fr;
  transition: grid-template-rows var(--acc-expand) var(--acc-ease);
}
.t-acc-panel-inner {
  overflow: hidden;
  opacity: 0;
  filter: blur(2px);
  transition:
    opacity var(--acc-collapse) var(--acc-ease),
    filter var(--acc-collapse) var(--acc-ease);
}
.t-acc[data-open="true"] .t-acc-panel-inner {
  opacity: 1;
  filter: blur(0);
  transition:
    opacity var(--acc-expand) var(--acc-ease),
    filter var(--acc-expand) var(--acc-ease);
}
.t-acc-chevron {
  display: inline-flex;
  transform: scaleY(1);
  transform-origin: center;
  transition: transform var(--acc-chevron) var(--acc-ease);
}
.t-acc-chevron path { vector-effect: non-scaling-stroke; }
.t-acc[data-open="true"] .t-acc-chevron { transform: scaleY(-1); }
.lex-engines:not([data-enhanced]) .t-acc-panel { grid-template-rows: 1fr; }
.lex-engines:not([data-enhanced]) .t-acc-panel-inner { opacity: 1; filter: none; }

/* Geometry and eye proportions copied from Lexanon's LexMascot.
   Git baa4d75e, frontend/src/elements/identite/mascotte/lexMascot.css. */
.lex-mascot {
  --ink: #171916;
  --eye: #fff;
  --s: 52px;
  --look-x: 0;
  --look-y: 0;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--s);
  height: var(--s);
  line-height: 0;
  color: var(--ink);
  overflow: visible;
  isolation: isolate;
}
.lex-mascot-goo, .lex-mascot-gaze {
  position: absolute;
  top: 0;
  left: 0;
  width: var(--s);
  height: var(--s);
  transform-origin: 50% 85%;
  pointer-events: none;
}
.lex-mascot-goo { z-index: 1; }
.lex-mascot-flesh { position: absolute; inset: 0; display: block; width: 100%; height: 100%; overflow: visible; }
.lex-mascot-flesh-shape { fill: var(--ink); }
.lex-mascot-gaze {
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translate(calc(var(--look-x) * var(--s) * .12), calc(var(--look-y) * var(--s) * .1));
}
.lex-mascot-eyes { display: flex; align-items: center; gap: calc(var(--s) * .13); }
.lex-mascot-eye {
  display: block;
  width: calc(var(--s) * .155);
  height: calc(var(--s) * .24);
  fill: var(--eye);
  transform: skewX(-12deg);
  transform-origin: 50% 60%;
  animation: lex-blink 5.8s ease-in-out infinite paused;
}
.lex-engine[data-open="true"] .lex-mascot-eye { animation-play-state: running; }
@keyframes lex-blink {
  0%,42%,46%,100% { transform: skewX(-12deg) scaleY(1); }
  44% { transform: skewX(-12deg) scaleY(.1); }
}

body.lex-theme main.lex-features-page > .lex-features-tools { padding-block: 32px 64px; }
.lex-features-tools__grid {
  margin-top: 0;
  gap: 24px;
  grid-auto-rows: auto;
}
.lex-feature-tool {
  border: 0;
  min-height: 410px;
  height: 100%;
}
.lex-feature-tool__index { display: none; }
.lex-feature-tool__art {
  height: auto;
  flex: none;
  aspect-ratio: 5 / 3;
  object-fit: contain;
}
.lex-feature-tool h3 { margin: 24px 24px 0; font-size: clamp(25px,2.1vw,32px); }
.lex-feature-tool p { margin: 16px 24px 24px; font-size: 15px; }
.lex-feature-tool__link { margin: auto 24px 24px; }
.lex-feature-tool:hover { box-shadow: none; transform: none; }
.lex-feature-tool:focus-visible { outline: 2px solid #1c1b17; outline-offset: 5px; }
.lex-feature-tool--ocr { background: #e2e8f2; }
.lex-feature-tool--rose { background: #efdfd5; }
.lex-feature-tool--sand { background: #e9e1ce; }
.lex-feature-tool--sage { background: #e0e8db; }
.lex-feature-tool--lavender { background: #e9e1f0; }
.lex-feature-tool--amber { background: #f1e3ce; }
.lex-feature-tool--layer { background: #dce8e6; }
@media (max-width: 700px) {
  .lex-engines { padding: 24px 24px 32px; }
  .lex-engine__trigger { grid-template-columns: minmax(0,1fr) minmax(0,58%); gap: 16px; }
  .lex-engine__art { width: 100%; height: auto; aspect-ratio: 5 / 3; }
  .lex-engine__name { font-size: 36px; }
  .lex-engine__summary { max-width: 100%; padding-right: 80px; }
  .lex-features-tools__grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
  .lex-feature-tool:last-child { grid-column: auto; }
  .lex-feature-tool { min-height: 370px; }
}
@media (max-width: 480px) {
  .lex-feature-tool { min-height: 0; }
  .lex-features-tools__grid { grid-template-columns: 1fr; }
  .lex-engine__name { font-size: 32px; }
}
@media (prefers-reduced-motion: reduce) {
  .t-acc-panel, .t-acc-panel-inner, .t-acc-chevron { transition: none !important; }
  .lex-mascot-eye { animation: none; }
}
