/*
 * Shared components. Shadows only ever reference --e1, --e2, --e2-alta,
 * --e3 or --e-painel; no container of a button or card clips its content.
 */

/* Header ---------------------------------------------------------------- */

.site-header {
  position: relative;
  z-index: 2;
}

.site-header__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 111px;
}

.site-header__brand {
  color: var(--neutrals-dark);
}

.site-header__brand .wordmark {
  width: 150px;
  height: auto;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 20px;
}

.site-nav__links {
  display: flex;
  gap: 20px;
}

.site-nav__links a {
  color: var(--primary);
}

/* Submenus: open on hover or keyboard focus, below their item. The
   padding-top bridges the gap so the pointer can travel into the panel. */
.site-nav__item {
  position: relative;
}

.site-nav__top {
  display: block;
  padding-block: 10px;
  transition: color 320ms var(--ease);
}

.site-nav__item:hover .site-nav__top,
.site-nav__item:focus-within .site-nav__top {
  color: var(--neutrals-dark);
}

.submenu {
  position: absolute;
  top: 100%;
  left: 50%;
  z-index: 3;
  padding-top: 10px;
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, 6px);
  transition:
    opacity 320ms var(--ease),
    transform 320ms var(--ease),
    visibility 0s linear 320ms;
}

.site-nav__item:hover .submenu,
.site-nav__item:focus-within .submenu {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
  transition-delay: 0s;
}

.submenu__list {
  display: grid;
  gap: 2px;
  width: 300px;
  padding: 10px;
  border: 1px solid var(--neutrals-light);
  border-radius: 12px;
  background: var(--white);
  box-shadow: var(--e3);
}

.submenu--ecosystem .submenu__list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: 600px;
}

.submenu__link {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px;
  border-radius: 8px;
}

.submenu__name {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
  color: var(--neutrals-dark);
  transition: color 320ms var(--ease);
}

.submenu__text {
  color: var(--primary);
}

.submenu__link:hover .submenu__name,
.submenu__link:focus-visible .submenu__name {
  color: var(--secondary);
}

/* Language switch, right of the button: "PT / EN". */
.lang-switch {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--primary);
}

.lang-switch__sep {
  color: var(--neutrals-light);
}

.lang-switch a {
  transition: color 320ms var(--ease);
}

.lang-switch a:hover {
  color: var(--secondary);
}

.lang-switch [aria-current] {
  color: var(--neutrals-dark);
}

.menu-toggle {
  display: none;
  padding: 0;
  border: 0;
  background: none;
  color: var(--blackout);
  cursor: pointer;
}

.mobile-menu {
  border-top: 1px solid var(--neutrals-light);
  border-bottom: 1px solid var(--neutrals-light);
  background: var(--white);
}

.mobile-menu[hidden] {
  display: none;
}

.mobile-menu__list {
  display: flex;
  flex-direction: column;
  padding-block: 12px;
}

.mobile-menu__list a {
  display: block;
  padding-block: 8px;
  color: var(--primary);
}

.mobile-menu__group summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 12px;
  color: var(--neutrals-dark);
  list-style: none;
  cursor: pointer;
}

.mobile-menu__group summary::-webkit-details-marker {
  display: none;
}

.mobile-menu__group summary::after {
  content: "+";
  color: var(--secondary);
}

.mobile-menu__group[open] summary::after {
  content: "−";
}

.mobile-menu__sub {
  padding: 0 0 10px 14px;
}

.mobile-menu__lang {
  padding-bottom: 18px;
}

.mobile-menu__cta {
  padding-bottom: 26px;
}

@media (max-width: 900px) {
  .site-nav {
    display: none;
  }

  .menu-toggle {
    display: block;
  }
}

@media (min-width: 901px) {
  .mobile-menu {
    display: none;
  }
}

/* Buttons and links ----------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  color: var(--white);
  white-space: nowrap;
  cursor: pointer;
  box-shadow: var(--e2);
  /* Long and gentle: the color crossfades instead of switching. */
  transition:
    background-color 420ms var(--ease),
    transform 420ms var(--ease),
    box-shadow 420ms var(--ease);
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--e2-alta);
}

.btn:active {
  transform: translateY(0);
  box-shadow: var(--e1);
}

.btn--green { background: var(--secondary); }
.btn--dark { background: var(--neutrals-dark); }

/* Hover swaps the two button colors: dark turns green, green turns dark. */
.btn--green:hover { background: var(--neutrals-dark); }
.btn--dark:hover { background: var(--secondary); }

/* Sizes as drawn in Figma: header, hero, signup plate, products band. */
.btn--header { padding: 12px 16px; border-radius: 12px; }
.btn--hero { padding: 15px 26px; border-radius: 6px; }
.btn--signup { padding: 16px 26px; border-radius: 6px; }
.btn--band { padding: 13px 22px; border-radius: 9px; }

.link {
  color: var(--secondary);
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 4px;
  transition: text-decoration-color 320ms var(--ease);
}

.link:hover {
  text-decoration-color: currentColor;
}

/* Section head: eyebrow, title, lead ----------------------------------- */

.eyebrow {
  color: var(--primary);
}

.section-title {
  padding-top: 20px;
}

.on-dark {
  color: var(--white);
}

.on-dark .eyebrow {
  color: var(--neutrals-light);
}

/*
 * Plate: a dark band is an object resting on the page, not a background.
 * width min(1352px, 100% - 32px), radius 16px, E3, centred. The section
 * after it has no background of its own, so the shadow below survives.
 */
.plate {
  isolation: isolate;
}

.plate::before {
  content: "";
  position: absolute;
  inset-block: 0;
  left: 50%;
  z-index: -1;
  width: min(1352px, 100% - 32px);
  border-radius: 16px;
  background: var(--neutrals-dark);
  box-shadow: var(--e3);
  transform: translateX(-50%);
}

/* Cards ----------------------------------------------------------------- */

.card {
  position: relative;
  border: 1px solid var(--neutrals-light);
  border-radius: 8px;
  background: var(--white);
  box-shadow: var(--e1);
  transition: box-shadow 300ms var(--ease);
}

.card:hover {
  box-shadow: var(--e2-alta);
}

/* Signup plate ---------------------------------------------------------- */

.signup {
  padding-bottom: var(--section-space);
}

.signup__plate {
  width: min(1352px, 100% - 32px);
  margin-inline: auto;
  padding: 50px 75px;
  border-radius: 16px;
  background: var(--neutrals-light);
  box-shadow: var(--e3);
}

.signup__lead {
  max-width: 620px;
  padding-top: 16px;
  color: var(--primary);
}

.signup__actions {
  padding-top: 34px;
}

/* Signup intents: what the person wants to do first, the front's name
   underneath. Cards on the plate; radio cards on the signup page. */
.intents {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.intent {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
  height: 100%;
  padding: 16px 18px;
  border: 1px solid var(--white);
  border-radius: 8px;
  background: var(--white);
  box-shadow: var(--e1);
  color: var(--neutrals-dark);
  cursor: pointer;
  transition:
    border-color 320ms var(--ease),
    box-shadow 420ms var(--ease),
    transform 420ms var(--ease);
}

.intent__name {
  color: var(--primary);
  transition: color 320ms var(--ease);
}

.intent:hover {
  box-shadow: var(--e2-alta);
  transform: translateY(-1px);
}

.intent:hover .intent__name {
  color: var(--secondary);
}

.intent__input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.intents--form .intent {
  border-color: var(--neutrals-light);
  box-shadow: none;
}

.intent__input:checked + .intent {
  border-color: var(--secondary);
  box-shadow: var(--e2);
}

.intent__input:checked + .intent .intent__name {
  color: var(--secondary);
}

.intent__input:focus-visible + .intent {
  outline: 1px solid var(--secondary);
  outline-offset: 3px;
}

@media (max-width: 1100px) {
  .intents {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .intents {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Signup page ----------------------------------------------------------- */

.waitlist {
  display: flex;
  flex-direction: column;
  gap: 34px;
  padding-top: var(--margin-alternative);
}

.waitlist__choices {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 0;
  padding: 0;
  border: 0;
}

.waitlist__choices legend,
.waitlist__label {
  color: var(--primary);
}

.waitlist__choices legend {
  padding: 0 0 14px;
}

.waitlist__row {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 620px;
}

.waitlist__fields {
  display: flex;
  gap: 12px;
}

.waitlist__email {
  flex: 1 1 0;
  min-width: 0;
  padding: 15px 16px;
  border: 1px solid var(--neutrals-light);
  border-radius: 6px;
  background: var(--white);
  color: var(--neutrals-dark);
  transition: border-color 320ms var(--ease);
}

.waitlist__email::placeholder {
  color: var(--primary);
  opacity: 0.6;
}

.waitlist__email:focus {
  border-color: var(--secondary);
  outline: none;
}

.waitlist__email[aria-invalid] {
  border-color: var(--danger);
}

.waitlist__error {
  color: var(--danger);
}

.waitlist__consent {
  max-width: 620px;
  color: var(--primary);
}

.waitlist__consent a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.waitlist__trap {
  position: absolute;
  left: -9999px;
}

.signup-page__next {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  padding-top: 34px;
}

@media (max-width: 640px) {
  .waitlist__fields {
    flex-direction: column;
  }
}

/* Novidades ------------------------------------------------------------- */

.news {
  display: flex;
  flex-direction: column;
  max-width: 820px;
  padding-top: var(--margin-alternative);
}

.news__item {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-block: 30px;
  border-top: 1px solid var(--neutrals-light);
}

.news__date,
.news__summary,
.news__empty {
  color: var(--primary);
}

.news__item h2 a {
  transition: color 320ms var(--ease);
}

.news__item h2 a:hover {
  color: var(--secondary);
}

.news__empty {
  padding-top: var(--margin-alternative);
}

.news__pages {
  display: flex;
  gap: 28px;
  padding-top: 20px;
}

.news-post__body {
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-width: 720px;
  padding-top: var(--margin-alternative);
  color: var(--neutrals-dark);
}

.news-post__back {
  padding-top: var(--margin-alternative);
}

@media (max-width: 640px) {
  .signup__plate {
    padding: 34px 22px;
  }
}

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

.site-footer {
  position: relative;
  z-index: 1;
  padding-block: var(--margin-alternative);
  border-top: 1px solid var(--neutrals-light);
  color: var(--primary);
}

.site-footer__columns {
  display: flex;
  gap: 64px;
}

.site-footer__brand {
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex: 0 0 300px;
}

.site-footer__brand .wordmark {
  width: 104px;
  height: auto;
  color: var(--neutrals-dark);
}

.site-footer__col {
  display: flex;
  flex: 1 1 0;
  flex-direction: column;
  gap: 10px;
}

.site-footer__col ul {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.site-footer__heading {
  text-transform: uppercase;
  transition: color 320ms var(--ease);
}

.site-footer__heading:hover {
  color: var(--secondary);
}

.site-footer__col li a {
  transition: color 320ms var(--ease);
}

.site-footer__col li a:hover {
  color: var(--neutrals-dark);
}

.site-footer__legal {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding-top: var(--margin-alternative);
}

@media (max-width: 900px) {
  .site-footer__columns {
    flex-wrap: wrap;
    gap: 34px 64px;
  }

  .site-footer__brand {
    flex-basis: 100%;
  }

  .site-footer__col {
    flex: 1 1 140px;
  }
}

@media (max-width: 640px) {
  .site-footer__legal {
    flex-direction: column;
  }
}

/* Status label ---------------------------------------------------------- */

.status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--primary);
}

.status__dot {
  position: relative;
  flex: none;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--neutrals-light);
}

.status--dark {
  color: var(--neutrals-light);
}

.status--dark .status__dot {
  background: var(--primary);
}

.status--early,
.status--early.status--dark {
  color: var(--secondary);
}

.status--early .status__dot,
.status--early.status--dark .status__dot {
  background: var(--secondary);
}

/*
 * Pulse of the live product: a 9px ring in Secondary over 2.6s. Drawn as a
 * scaled ring instead of an animated box-shadow, so no shadow outside the
 * five elevations exists and the animation stays on transform and opacity.
 */
.status--early .status__dot::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--secondary);
  animation: status-pulse 2.6s infinite;
}

@keyframes status-pulse {
  from { transform: scale(1); opacity: 0.6; }
  to { transform: scale(4); opacity: 0; }
}

/* Product card ---------------------------------------------------------- */

.product-card {
  display: flex;
  flex-direction: column;
  padding: 26px;
}

.product-card__name {
  padding-top: 22px;
  color: var(--neutrals-dark);
}

.product-card__text {
  padding-top: 12px;
  color: var(--primary);
}

@media (prefers-reduced-motion: reduce) {
  .status--early .status__dot::after {
    animation: none;
    opacity: 0;
  }
}

/* Motion ---------------------------------------------------------------- */

/*
 * Node field. The canvas covers the whole viewport behind the content and
 * is never inside the hero box, so dispersion has the full screen to travel
 * and no ancestor can clip it.
 */
.node-field {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* Drag target in the hero: the slot the field is drawn around. */
.field-anchor {
  cursor: grab;
  touch-action: none;
}

.field-anchor.is-dragging {
  cursor: grabbing;
}

[data-parallax] {
  will-change: transform;
}

/* Tilt: 80ms linear while the cursor moves, 400ms on the way back. */
[data-tilt] {
  transform-style: preserve-3d;
  transition:
    transform 400ms var(--ease),
    box-shadow 300ms var(--ease);
}

[data-tilt].is-tilting {
  transition:
    transform 80ms linear,
    box-shadow 300ms var(--ease);
}

/* Glow that follows the cursor: Secondary at 14%, 260px on cards, 320px on the large cards. */
[data-tilt="card"]::after,
[data-tilt="big"]::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(
    260px circle at var(--glow-x, 50%) var(--glow-y, 50%),
    color-mix(in srgb, var(--secondary) 14%, transparent),
    transparent
  );
  opacity: 0;
  pointer-events: none;
  transition: opacity 300ms var(--ease);
}

[data-tilt="big"]::after {
  background: radial-gradient(
    320px circle at var(--glow-x, 50%) var(--glow-y, 50%),
    color-mix(in srgb, var(--secondary) 14%, transparent),
    transparent
  );
}

[data-tilt].is-tilting::after {
  opacity: 1;
}

/* Section entrance: opacity 0, 22px down, 5deg back; 620ms, 55ms per sibling. */
.reveal > * {
  opacity: 0;
  transform: perspective(1200px) translateY(22px) rotateX(5deg);
}

.reveal.is-revealed > * {
  opacity: 1;
  transform: none;
  transition:
    opacity 620ms var(--ease) var(--reveal-delay, 0ms),
    transform 620ms var(--ease) var(--reveal-delay, 0ms);
}

@media (prefers-reduced-motion: reduce) {
  .btn,
  .card,
  [data-tilt] {
    transition: none;
  }

  .btn:hover {
    transform: none;
  }
}

/* Section head ---------------------------------------------------------- */

.section-lead {
  max-width: 680px;
  padding-top: 18px;
  color: var(--primary);
}

/* Panels ---------------------------------------------------------------- */

.panel {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 11px;
  padding: 20px 22px;
  border: 1px solid var(--neutrals-light);
  border-radius: 6px;
  background: var(--white);
  color: var(--neutrals-dark);
}

.panel__label {
  color: var(--primary);
}

.panel__rule {
  width: 100%;
  height: 1px;
  margin: 0;
  border: 0;
  background: var(--neutrals-light);
}

.panel--dark {
  border-color: var(--primary);
  background: var(--blackout);
  box-shadow: var(--e-painel);
  color: var(--white);
}

.panel--dark .panel__label {
  color: var(--neutrals-light);
}

/* The opening label of a panel drawing, with "EXAMPLE" on the right: the
   figures in the drawings are illustrations, not real data. */
.panel__label--head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 6px 14px;
}

.panel--dark .panel__rule {
  background: var(--primary);
}

.panel__note--accent {
  color: var(--secondary);
}

.timeline {
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.timeline li {
  display: flex;
  align-items: center;
  gap: 14px;
}

.timeline .t-mono-medium-12 {
  color: var(--neutrals-light);
}

.timeline .is-done .t-mono-medium-12 {
  color: var(--secondary);
}

/* Responsive type: phones have no Figma frame, so the display styles step
   down to the next existing style instead of a new size. */
@media (max-width: 640px) {
  .t-display-60 { font-size: 40px; line-height: 1.15; }
  .t-display-40 { font-size: 30px; line-height: 1.22; letter-spacing: -0.01em; }
}

/* Panel footnotes are single lines in Figma (no wrap); phones may wrap. */
@media (min-width: 641px) {
  .panel > p:last-of-type {
    white-space: nowrap;
  }
}

/* Panel games (panels.js): the control row under the footnote, and the
   states the games move through. Hidden until the script takes over. */
.panel__play {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 14px;
  padding-top: 4px;
}

.panel__play[hidden] {
  display: none;
}

.panel__button {
  padding: 0;
  border: 0;
  background: none;
  color: var(--secondary);
  cursor: pointer;
}

.panel__button {
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 4px;
  transition: text-decoration-color 320ms var(--ease);
}

.panel__button:hover {
  text-decoration-color: currentColor;
}

.panel__button:disabled {
  opacity: 0.5;
  cursor: default;
  text-decoration: none;
}

.panel__status {
  color: var(--primary);
}

.panel--dark .panel__status {
  color: var(--neutrals-light);
}

.panel button:focus-visible {
  outline: 1px solid var(--secondary);
  outline-offset: 3px;
}

.is-game .is-waiting {
  opacity: 0.25;
}

.is-game .timeline li,
.is-game .panel__note,
.is-game [data-answer] {
  transition: opacity 240ms var(--ease);
}

.is-flash {
  animation: panel-flash 620ms var(--ease);
}

@keyframes panel-flash {
  from { opacity: 0.2; }
  to { opacity: 1; }
}

/* Page opening (ecosystem, company) -------------------------------------- */

.page-opening__title {
  padding-top: 22px;
}

.page-opening__lead {
  color: var(--primary);
}

.page-opening__lead--740 { max-width: 740px; padding-top: 28px; }
.page-opening__lead--760 { max-width: 760px; padding-top: 30px; }

/* On phones the plate sits 16px from the screen edge, the same as the
   page gutter; its content keeps the 22px inner padding panels use. */
@media (max-width: 640px) {
  .plate > .wrap {
    width: calc(100% - 2 * (16px + 22px));
  }
}

/* Reduced motion: the field is drawn once and must scroll with the page,
   so the canvas leaves the fixed layer and sits over the document. */
@media (prefers-reduced-motion: reduce) {
  .node-field {
    position: absolute;
    bottom: auto;
  }
}

/* Error pages ----------------------------------------------------------- */

.error-page {
  min-height: 60vh;
}

.error-page__code {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.error-page__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.error-page__code--warning { color: var(--warning); }
.error-page__code--danger { color: var(--danger); }

.error-page__links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 28px;
  padding-top: 40px;
}

/* Simias assistant ------------------------------------------------------ */

.simias {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
}

.simias__open {
  gap: 8px;
  padding: 12px 16px;
  border-radius: 999px;
}

.simias__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--secondary);
}

.simias__panel {
  display: flex;
  flex-direction: column;
  width: min(380px, calc(100vw - 32px));
  height: min(560px, calc(100vh - 120px));
  border: 1px solid var(--neutrals-light);
  border-radius: 12px;
  background: var(--white);
  box-shadow: var(--e3);
}

.simias__panel[hidden] {
  display: none;
}

.simias__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--neutrals-light);
}

.simias__who {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--neutrals-dark);
}

.simias__role {
  color: var(--primary);
}

.simias__close {
  padding: 0 4px;
  border: 0;
  background: none;
  color: var(--primary);
  font: 300 24px/1 var(--font-display);
  cursor: pointer;
  transition: color 320ms var(--ease);
}

.simias__close:hover {
  color: var(--neutrals-dark);
}

.simias__log {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 10px;
  min-height: 160px;
  padding: 16px;
  overflow-y: auto;
}

.simias__msg {
  max-width: 88%;
  padding: 10px 14px;
  border-radius: 12px;
}

.simias__msg--simias {
  align-self: flex-start;
  background: var(--neutrals-light);
  color: var(--neutrals-dark);
}

.simias__msg--you {
  align-self: flex-end;
  background: var(--neutrals-dark);
  color: var(--white);
}

.simias__msg.is-typing {
  color: var(--primary);
}

.simias__link {
  color: var(--secondary);
}

.simias__choices {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 0 0 auto;
  max-height: 200px;
  padding: 12px 16px 16px;
  border-top: 1px solid var(--neutrals-light);
  overflow-y: auto;
}

.simias__choices-label {
  color: var(--primary);
}

.simias__list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.simias__question {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--neutrals-light);
  border-radius: 8px;
  background: var(--white);
  color: var(--neutrals-dark);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 320ms var(--ease), color 320ms var(--ease);
}

.simias__question:hover,
.simias__question:focus-visible {
  border-color: var(--secondary);
  color: var(--secondary);
  outline: none;
}

.simias__more {
  padding: 0;
  border: 0;
  background: none;
  color: var(--secondary);
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 4px;
  transition: text-decoration-color 320ms var(--ease);
}

.simias__more:hover,
.simias__more:focus-visible {
  text-decoration-color: currentColor;
  outline: none;
}

.simias__fail {
  color: var(--danger);
}

@media (max-width: 640px) {
  .simias {
    right: 16px;
    bottom: 16px;
  }
}

/* Documentation --------------------------------------------------------- */

.docs__grid {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 64px;
}

.docs__nav {
  position: sticky;
  top: 24px;
  align-self: start;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.docs__home a,
.docs__section {
  color: var(--primary);
}

.docs__group ul {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 10px;
}

.docs__link {
  color: var(--primary);
  transition: color 320ms var(--ease);
}

.docs__link:hover,
.docs__link[aria-current] {
  color: var(--neutrals-dark);
}

.docs__link[aria-current] {
  font-weight: 600;
}

.docs__page {
  max-width: 760px;
}

.docs__summary {
  padding-top: 16px;
  color: var(--primary);
}

.docs__body {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding-top: var(--margin-alternative);
  color: var(--neutrals-dark);
}

.docs__body h2 {
  padding-top: 14px;
}

.docs__map {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px 18px;
  border: 1px solid var(--neutrals-light);
  border-radius: 6px;
  color: var(--primary);
}

.docs__map li {
  display: flex;
  justify-content: space-between;
}

.docs__code {
  padding: 14px 16px;
  border-radius: 4px;
  background: var(--neutrals-light);
  color: var(--neutrals-dark);
  white-space: pre-wrap;
}

.docs__code .code__verb {
  color: var(--secondary);
}

.docs__draft {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: var(--margin-alternative);
  padding: 10px 14px;
  border: 1px solid var(--neutrals-light);
  border-radius: 6px;
  color: var(--primary);
}

.docs__draft-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--warning);
}

.docs__pager {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-top: var(--margin-default);
  padding-top: 24px;
  border-top: 1px solid var(--neutrals-light);
}

@media (max-width: 900px) {
  .docs__grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
  }

  .docs__nav {
    position: static;
  }
}

/* Legal pages ----------------------------------------------------------- */

.legal__body {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 720px;
  padding-top: var(--margin-alternative);
  color: var(--neutrals-dark);
}

.legal__body h2 {
  padding-top: 18px;
}

.legal__body ul {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-left: 20px;
  list-style: disc;
}

.legal__body a {
  color: var(--secondary);
}

.legal__updated {
  color: var(--primary);
}

.legal__body h3 {
  padding-top: 6px;
}

.legal__body ol {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-left: 20px;
  list-style: decimal;
}

/* Table of contents: a bordered block above the text. */
.legal__toc {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px 22px;
  border: 1px solid var(--neutrals-light);
  border-radius: 8px;
}

.legal__toc > p {
  color: var(--primary);
}

/* Two columns where there is room, read top to bottom. */
@media (min-width: 720px) {
  .legal__toc ol {
    display: block;
    columns: 2;
    column-gap: 24px;
  }

  .legal__toc li + li {
    margin-top: 6px;
  }
}

.legal__toc a {
  color: var(--neutrals-dark);
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 4px;
  transition: color 320ms var(--ease), text-decoration-color 320ms var(--ease);
}

.legal__toc a:hover {
  color: var(--secondary);
  text-decoration-color: currentColor;
}

/* Anchored headings clear the top of the window. */
.legal__body [id] {
  scroll-margin-top: 24px;
}

.site-footer__policies {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
}

.site-footer__policies a {
  transition: color 320ms var(--ease);
}

.site-footer__policies a:hover {
  color: var(--neutrals-dark);
}

