/* A light, animated welcome; the interface keeps its original LTR layout. */
.neo-home { overflow: clip; }
body.neo-landing { overflow-x: clip; }
.neo-era-story { margin: 42px auto 0; max-width: 640px; }
.neo-retrospective { padding: 0 22px 30px; text-align: center; }
.neo-era-stage { position: relative; }
.neo-era-label { color: var(--accent); font-size: 13px; font-weight: 600; margin: 0 0 20px; }
.neo-era-hint { color: var(--muted); font-size: 12px; margin: 22px 0; }
.neo-era-signature { margin-top: 26px; font-size: 21px; letter-spacing: -.04em; font-weight: 600; color: var(--accent); }
.neo-era-modern { margin-top: 65px; }
.neo-retro-window { max-width: 530px; margin: auto; border: 1px solid #6988ba; border-radius: 8px 8px 3px 3px; padding: 4px; background: linear-gradient(#e8f2ff, #cedcf0); box-shadow: 0 18px 50px #18326330, inset 0 0 0 1px #fff; color: #253954; text-align: left; font-family: Tahoma, Arial, sans-serif; font-size: 12px; }
.neo-retro-title { display: flex; justify-content: space-between; gap: 12px; padding: 8px 10px; border-radius: 4px 4px 0 0; color: #fff; background: linear-gradient(#688cbe, #365d92); font-weight: bold; }
.neo-retro-tools { display: flex; gap: 23px; padding: 8px 12px; font-size: 20px; color: #345780; border-bottom: 1px solid #a6bbd8; }
.neo-retro-layout { display: grid; grid-template-columns: minmax(0, 1fr) 95px; gap: 12px; padding: 12px; }
.neo-retro-transcript { min-height: 175px; padding: 13px; background: #fff; border: 1px solid #97accb; box-shadow: inset 1px 1px 3px #0001; }
.neo-retro-transcript small { display: block; font-size: 10px; color: #596979; }
.neo-retro-transcript p { margin: 4px 0 15px; line-height: 1.5; }
.neo-retro-transcript .neo-retro-wizz { color: #745288; font-size: 11px; margin-bottom: 0; }
.neo-retro-portraits { display: flex; flex-direction: column; gap: 15px; }
.neo-retro-portraits div { display: grid; place-items: center; height: 78px; border: 3px solid #fff; outline: 1px solid #91a9c6; border-radius: 5px; background: linear-gradient(140deg,#b7dff2,#8595cf); color: #263e6d; font-size: 43px; }
.neo-retro-portraits div:last-child { background: linear-gradient(140deg,#e1d5f6,#aac8df); }
.neo-retro-composer { margin: 0 12px; padding: 13px; min-height: 65px; border: 1px solid #97accb; background: #fff; color: #596979; }
.neo-retro-composer > :last-child { display: block; margin-top: 12px; color: #365d92; }
.neo-retro-status { display: flex; gap: 6px; padding: 7px 12px 3px; font-size: 10px; }
.neo-retro-status > :first-child { color: #237846; }
.neo-era-stage { display: grid; }
.neo-era-retro, .neo-era-modern { grid-area: 1 / 1; min-width: 0; margin: 0; align-self: center; }
.neo-era-retro { opacity: calc(1 - var(--era-progress, 0)); }
.neo-era-modern { opacity: var(--era-progress, 0); }
.neo-era-retro[aria-hidden="true"], .neo-era-modern[aria-hidden="true"] { pointer-events: none; }
.neo-era-retro[aria-hidden="false"], .neo-era-modern[aria-hidden="false"] { position: relative; z-index: 1; }
.neo-wizz { display: inline-flex; align-items: center; justify-content: center; gap: 5px; min-height: 32px; padding: 5px 10px; font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; }
.neo-wizz--retro { margin-left: auto; border: 1px solid #819abd; border-radius: 3px; background: linear-gradient(#fff,#d4e2f4); color: #253954; box-shadow: inset 0 0 0 1px #fff; }
.neo-retro-tools { align-items: center; }
.neo-wizz--retro:hover { background: #fff; }
.neo-wizz--modern { display: flex; margin: 12px 0 0 auto; border: 1px solid var(--accent-border); border-radius: 10px; color: var(--accent); background: var(--accent-soft); }
.neo-wizz--modern:hover { background: var(--panel-light); }
@media(max-width: 640px) {
  .neo-retro-layout { grid-template-columns: minmax(0, 1fr) 55px; gap: 8px; padding: 8px; }
  .neo-retro-portraits div { height: 55px; font-size: 30px; }
  .neo-retro-transcript { padding: 10px; }
  .neo-retro-composer { margin: 0 8px; }
  .neo-era-label { font-size: 12px; }
}
.neo-hero { position: relative; isolation: isolate; max-width: 1200px; margin: auto; padding: 90px 28px 35px; text-align: center; }
.neo-kicker { display: inline-flex; align-items: center; gap: 10px; color: var(--accent-blue); font-size: 12px; font-weight: 600; letter-spacing: .08em; }
.neo-kicker > [aria-hidden] { width: 7px; height: 7px; border-radius: 50%; background: var(--accent-blue); box-shadow: 0 0 0 5px var(--accent-soft); }
.neo-hero h1 { max-width: 900px; margin: 25px auto; font-size: clamp(40px, 5.7vw, 78px); line-height: 1.08; letter-spacing: -.055em; font-weight: 600; color: var(--text); text-wrap: balance; }
.neo-hero h1 + .neo-memory { margin-top: 45px; }
.neo-orbit { position: absolute; z-index: -1; width: 570px; height: 570px; border: 1px solid var(--border-subtle); border-radius: 50%; pointer-events: none; }
.neo-orbit--one { left: -320px; top: 80px; }
.neo-orbit--two { right: -330px; top: 210px; }
.neo-orbit::after { content: ''; position: absolute; inset: 18%; border: 1px dashed var(--border); border-radius: 50%; animation: neo-orbit 65s linear infinite; }
.neo-memory { position: relative; width: min(100%, 470px); margin: auto; text-align: left; border: 1px solid var(--border-strong); border-radius: 22px; background: var(--panel); box-shadow: 0 28px 80px #3152ff18; animation: neo-float 7s ease-in-out infinite; }
.neo-memory__bar { display: flex; justify-content: space-between; align-items: center; padding: 15px 20px; border-bottom: 1px solid var(--border); border-radius: 22px 22px 0 0; background: var(--accent-soft); color: var(--accent); font-size: 11px; font-weight: 600; }
.neo-memory__bar > :first-child { letter-spacing: 3px; }
.neo-memory__body { padding: 24px; }
.neo-memory__contact { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; }
.neo-memory__contact img { border-radius: 12px; object-fit: cover; }
.neo-memory__contact strong { display: block; font-size: 15px; }
.neo-memory__contact small { display: flex; align-items: center; gap: 5px; color: var(--muted); font-size: 11px; margin-top: 5px; }
.neo-memory__contact i { width: 6px; height: 6px; border-radius: 50%; background: #29b875; }
.neo-memory__time { margin-left: auto; font-size: 11px; color: var(--muted); }
.neo-note { width: fit-content; max-width: 90%; padding: 13px 17px; margin: 12px 0; border-radius: 16px 16px 16px 4px; background: var(--panel-light); font-size: 14px; line-height: 1.5; }
.neo-note--mine { margin-left: auto; border-radius: 16px 16px 4px 16px; background: var(--accent-gradient); color: #fff; }
.neo-memory__typing { display: flex; gap: 4px; padding: 10px 5px 0; }
.neo-memory__typing span { height: 5px; width: 5px; border-radius: 50%; background: var(--muted); animation: neo-typing 1.5s ease-in-out infinite; }
.neo-memory__typing span:nth-child(2) { animation-delay: .2s; }
.neo-memory__typing span:nth-child(3) { animation-delay: .4s; }
.neo-sticker { position: absolute; display: grid; place-items: center; width: 66px; height: 66px; font-size: 46px; border-radius: 20px; background: var(--panel); border: 1px solid var(--border); box-shadow: 0 12px 25px #0001; }
.neo-sticker--smile { top: 65px; left: -75px; color: var(--accent-blue); transform: rotate(-14deg); }
.neo-sticker--star { bottom: 25px; right: -70px; color: var(--accent-coral); transform: rotate(14deg); }
.neo-scroll { margin: 45px 0 0; color: var(--muted); font-size: 22px; }
.neo-spirit { max-width: 1120px; padding: 65px 28px 100px; margin: auto; }
.neo-spirit__heading h2 { margin: 15px 0 35px; font-size: clamp(30px, 3vw, 44px); line-height: 1.2; letter-spacing: -.04em; }
.neo-spirit__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.neo-spirit article { padding: 28px; background: var(--surface); border: 1px solid var(--border); border-radius: 20px; }
.neo-feature-symbol { display: block; color: var(--accent); font-size: 16px; margin-bottom: 35px; }
.neo-spirit h3 { margin-bottom: 12px; font-size: 18px; }
.neo-spirit article p { font-size: 14px; line-height: 1.8; color: var(--muted); }
.nav-login-button.neo-account-avatar { width: 46px; height: 46px; min-height: 46px; padding: 0; overflow: hidden; border-radius: 10px; flex-shrink: 0; }
.neo-account-avatar img { display: block; width: 100%; height: 100%; object-fit: cover; }
.nav-user-button.neo-account-avatar::after { display: none; }
@keyframes neo-float { 50% { transform: translateY(-7px); } }
@keyframes neo-orbit { to { transform: rotate(360deg); } }
@keyframes neo-typing { 50% { opacity: .35; transform: translateY(-3px); } }
@media (max-width: 640px) {
  .neo-hero { padding: 50px 22px 20px; }
  .neo-kicker { font-size: 10px; letter-spacing: .035em; }
  .neo-hero h1 { font-size: clamp(36px, 10vw, 55px); margin: 24px auto; }
  .neo-hero h1 + .neo-memory { margin-top: 35px; }
  .neo-memory__body { padding: 18px; }
  .neo-sticker { width: 38px; height: 38px; font-size: 28px; border-radius: 12px; }
  .neo-sticker--smile { left: -12px; top: -18px; }
  .neo-sticker--star { right: -12px; bottom: -12px; }
  .neo-spirit { padding: 40px 22px 65px; }
  .neo-spirit__grid { grid-template-columns: 1fr; gap: 12px; }
  .neo-spirit article { padding: 24px; }
  .neo-feature-symbol { margin-bottom: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .neo-home *, .neo-home *::after { animation: none !important; }
}
/* Neo: cyan, royal blue and violet. Semantic status colours stay independent. */
:root {
  color-scheme: dark;
  --bg: #090f23;
  --panel: #111c36;
  --panel-light: #1a2948;
  --accent: #9caeff;
  --accent-blue: #80cfff;
  --accent-coral: #b69aff;
  --accent-gradient: linear-gradient(120deg, #1761cf 0%, #4548df 52%, #793bd2 100%);
  --brand-gradient: linear-gradient(120deg, #14aaf2, #3152ff 52%, #8850ff);
  --accent-soft: #202f57;
  --accent-border: #536ba9;
  --text: #f1f5ff;
  --muted: #b0bfd8;
  --text-primary: var(--text);
  --text-secondary: var(--muted);
  --border-subtle: rgba(150, 178, 235, 0.12);
  --border: rgba(150, 178, 235, 0.2);
  --border-strong: rgba(150, 178, 235, 0.32);
  --surface: rgba(135, 165, 235, 0.07);
  --surface-strong: rgba(135, 165, 235, 0.13);
  --header-bg: rgba(9, 15, 35, 0.94);
  --footer-bg: #0c152c;
  --preview-surface: var(--panel);
  --preview-ink: var(--text);
  --success-text: #89e4b5;
  --error-text: #ffb0bb;
  --bg-gradient: radial-gradient(ellipse at 76% 12%, rgba(49, 82, 255, 0.17), transparent 45%), radial-gradient(ellipse at 98% 48%, rgba(136, 80, 255, 0.1), transparent 40%), #090f23;
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f4f7ff;
  --panel: #ffffff;
  --panel-light: #edf2ff;
  --accent: #5541b8;
  --accent-blue: #165ab8;
  --accent-coral: #733fc1;
  --accent-soft: #e8edff;
  --accent-border: #929fd4;
  --text: #182443;
  --muted: #53617d;
  --border-subtle: rgba(43, 66, 120, 0.1);
  --border: rgba(43, 66, 120, 0.17);
  --border-strong: rgba(43, 66, 120, 0.29);
  --surface: rgba(49, 82, 190, 0.04);
  --surface-strong: rgba(49, 82, 190, 0.08);
  --header-bg: rgba(248, 250, 255, 0.95);
  --footer-bg: #eaf0fc;
  --success-text: #146943;
  --error-text: #ad243e;
  --bg-gradient: radial-gradient(ellipse at 76% 12%, rgba(20, 170, 242, 0.09), transparent 45%), radial-gradient(ellipse at 98% 48%, rgba(136, 80, 255, 0.07), transparent 40%), #f4f7ff;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Restore native dialog centering after the universal margin reset. */
dialog { position:fixed; inset:0; margin:auto; max-height:calc(100dvh - 32px); overflow-y:auto; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 100px;
}

body {
  font-family: "Space Grotesk", sans-serif;
  background: var(--bg-gradient);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 6rem;
}

body > main {
  flex: 1 0 auto;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.site-nav {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 20px 32px;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--header-bg);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.logo {
  display: flex;
  align-items: center;
  justify-self: start;
  height: 10px;
}

.logo img {
  width: 250px;
  max-width: 100%;
  height: auto;
}

.nav-links {
  display: flex;
  gap: 20px;
  justify-self: center;
}

.nav-actions {
  display: flex;
  justify-self: end;
}

.nav-user {
  position: relative;
}

.nav-login-button {
  border: 1px solid var(--border-strong);
  background: var(--panel-light);
  color: var(--text);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  padding: 10px 20px;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.nav-user-button {
  gap: 8px;
}

.nav-user-button::after {
  content: "▸";
  font-size: 0.8em;
  display: inline-block;
  transition: transform 0.2s ease;
  transform-origin: center;
}

.nav-user-button[aria-expanded="true"]::after {
  transform: rotate(90deg);
}

.nav-login-button:hover {
  transform: translateY(-1px);
}

.nav-login-button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.nav-user-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 180px;
  background: var(--panel);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  padding: 34px 8px 8px;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.25);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-6px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 20;
}

.nav-user-menu.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.nav-user-menu form {
  margin: 0;
}

.nav-user-menu__item {
  width: 100%;
  border: none;
  background: transparent;
  color: var(--text);
  font-weight: 600;
  text-align: left;
  display: flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
}

.nav-user-menu__item:hover,
.nav-user-menu__item:focus-visible {
  background: var(--panel-light);
}


.nav-user-menu__item-icon {
  width: 16px;
  height: 16px;
  display: inline-flex;
  margin-right: 8px;
  color: var(--accent);
}

.nav-user-menu__item-icon svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.nav-user-menu__item-icon i {
  width: 16px;
  height: 16px;
  display: inline-grid;
  place-items: center;
  font-size: 16px;
  line-height: 1;
}

.nav-user-menu__item--logout .nav-user-menu__item-icon {
  margin-right: 0;
}

.nav-user-menu__item--logout {
  margin: 0 0 0 auto;
  width: 24px;
  height: 24px;
  padding: 4px;
  justify-content: center;
  border-radius: 6px;
}
.nav-user-menu form { position: absolute; top: 5px; right: 5px; margin: 0; }
.nav-user-menu__name { position: absolute; top: 5px; left: 12px; right: 36px; height: 24px; line-height: 24px; font-size: 12px; font-weight: 500; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: start; }
.nav-user-menu__item--logout .nav-user-menu__item-icon i { font-size: 11px; }

.nav-links a {
  color: var(--text);
  font-weight: 600;
}

.nav-links a.is-active {
  color: var(--accent);
}

.modal {
  position: fixed;
  top: var(--auth-top, 80px);
  left: var(--auth-left, 12px);
  width: min(340px, calc(100vw - 24px));
  z-index: 100;
}

.modal.hidden {
  display: none;
}

.confirmation-code-control { position: relative; height: 48px; }
.confirmation-code-slots { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; height: 100%; pointer-events: none; }
.confirmation-code-slots span { display: grid; place-items: center; border-bottom: 2px solid var(--border-strong); font-size: 1.4rem; font-weight: 600; }
.confirmation-code-control:focus-within .confirmation-code-slots span.is-current { border-color: var(--accent); }
.confirmation-code-control .confirmation-code-input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; z-index: 1; cursor: text; font-size: 16px; }

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(9, 10, 12, 0.7);
  backdrop-filter: blur(4px);
}

.modal__content {
  position: relative;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01)),
    var(--panel);
  border: 1px solid var(--border-strong);
  border-radius: 24px;
  padding: 24px 22px 22px;
  width: 100%;
  box-sizing: border-box;
  max-height: var(--auth-height, calc(100dvh - 100px));
  overflow-y: auto;
  overscroll-behavior: contain;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4);
  z-index: 1;
  display: grid;
  gap: 16px;
}

.modal__categories {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  background: rgba(255, 255, 255, 0.035);
  padding: 6px;
  border-radius: 16px;
  border: 1px solid var(--border-strong);
}

.modal__category {
  border: none;
  border-radius: 12px;
  padding: 10px 6px;
  font-weight: 700;
  cursor: pointer;
  background: transparent;
  color: var(--text);
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.modal__category.is-active {
  background: var(--accent-gradient);
  color: #ffffff;
  box-shadow: 0 10px 22px rgba(67, 211, 255, 0.18);
}

.modal__category:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.modal__header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-right: 12px;
  margin-bottom: 4px;
}

.modal__header-icon {
  display: grid;
  place-items: center;
  flex: 0 0 40px;
  height: 40px;
  border: 1px solid var(--border-strong);
  border-radius: 13px;
  background: var(--panel-light);
  color: var(--accent);
  font-size: 1.1rem;
}

.modal__title {
  font-size: 1rem;
  line-height: 1.3;
}

.modal__subtitle {
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.5;
  margin-top: 2px;
}

.modal__close {
  position: absolute;
  top: 5px;
  right: 7px;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  background: var(--panel-light);
  color: var(--text);
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
}

.modal__close:hover {
  background: rgba(255, 255, 255, 0.08);
}

.modal__form {
  display: grid;
  gap: 12px;
}

.modal__field {
  display: grid;
  gap: 8px;
}

.modal__field.is-hidden {
  display: none;
}

.is-hidden {
  display: none;
}

.modal__label {
  font-weight: 600;
  font-size: 0.75rem;
}

.modal__label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.modal__input-control {
  position: relative;
}

.modal__input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 0.8rem;
  pointer-events: none;
}

.modal__input-control .modal__input,
.modal__password-control .modal__input {
  width: 100%;
  padding-left: 38px;
}

.modal__input {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  padding: 11px 14px;
  color: var(--text);
}

.modal__form .modal__input {
  min-width: 0;
  min-height: 44px;
  font-family: inherit;
  font-size: 16px;
  background: var(--surface);
  border-radius: 10px;
}

.modal__input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.modal__password-control {
  position: relative;
  display: flex;
  align-items: center;
}

.modal__password-control .modal__input {
  width: 100%;
}

.modal__input--password {
  padding-right: 46px;
}

.modal__password-toggle {
  position: absolute;
  right: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease;
}

.modal__password-toggle:hover,
.modal__password-toggle:focus-visible {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

.modal__password-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.modal__submit {
  margin-top: 4px;
  border: none;
  border-radius: 12px;
  background: var(--accent-gradient);
  color: #ffffff;
  font-weight: 700;
  padding: 12px 16px;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(67, 211, 255, 0.18);
}

.modal__text-button {
  justify-self: start;
  border: none;
  background: transparent;
  color: var(--accent);
  font-weight: 600;
  padding: 0;
  cursor: pointer;
}

.modal__text-button--forgot {
  font-size: 0.65rem;
  margin: 0;
}

.modal__submit,
.modal__signup-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  min-height: 44px;
  font-family: inherit;
  font-size: 0.8rem;
}

.modal__signup-button {
  padding: 11px 14px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
}

.modal__signup-button:hover {
  background: var(--panel-light);
}

.modal__signup-button.is-hidden,
.modal__remember.is-hidden {
  display: none;
}

.modal__text-button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 6px;
}

.modal__remember {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.75rem;
}

.modal__remember input[type="checkbox"] {
  accent-color: var(--accent);
}

.modal__message {
  border-radius: 12px;
  padding: 12px 14px;
  font-weight: 600;
}

.modal__resend-button {
  width: 100%;
  min-height: 40px;
  text-align: center;
  font-family: inherit;
  font-size: 0.8rem;
}

.modal__resend-button:disabled {
  color: var(--muted);
  cursor: not-allowed;
  opacity: 0.75;
}

.modal__message--error {
  background: rgba(255, 106, 106, 0.15);
  border: 1px solid rgba(255, 106, 106, 0.35);
  color: var(--error-text);
}

.modal__message--success {
  background: rgba(61, 203, 150, 0.15);
  border: 1px solid rgba(61, 203, 150, 0.35);
  color: var(--success-text);
}

.legal-page {
  padding: 48px 32px;
}

.legal-content {
  max-width: 860px;
  margin: 0 auto;
  background: var(--panel);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 28px;
  display: grid;
  gap: 14px;
}

.legal-content h1 {
  font-size: 1.9rem;
  margin-bottom: 4px;
}

.legal-content h2 {
  margin-top: 6px;
  font-size: 1.05rem;
}

.legal-content p {
  color: var(--muted);
  line-height: 1.65;
}

.legal-document-body {
  min-width: 0;
  color: var(--muted);
  line-height: 1.7;
  overflow-wrap: anywhere;
}

.legal-document-body > *:first-child { margin-top: 0; }
.legal-document-body > *:last-child { margin-bottom: 0; }
.legal-document-body h2,
.legal-document-body h3,
.legal-document-body h4 { color: var(--text); line-height: 1.3; margin: 1.6em 0 0.55em; }
.legal-document-body h2 { color: var(--accent-blue); font-size: 1.2rem; }
.legal-document-body h3 { font-size: 1.08rem; }
.legal-document-body h4 { font-size: 1rem; }
.legal-document-body p { margin: 0.75em 0; }
.legal-document-body ul,
.legal-document-body ol { margin: 0.8em 0; padding-inline-start: 1.7rem; }
.legal-document-body li + li { margin-top: 0.35em; }
.legal-document-body a { color: var(--accent-blue); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.legal-document-body a:hover { text-decoration-thickness: 2px; }
.legal-document-body blockquote {
  margin: 1.2em 0;
  padding: 0.75em 1em;
  border-inline-start: 4px solid var(--accent);
  border-radius: 0 10px 10px 0;
  background: color-mix(in srgb, var(--accent) 8%, transparent);
}
.legal-document-body pre,
.legal-document-body code { font-family: Consolas, "SFMono-Regular", monospace; }
.legal-document-body pre { overflow: auto; padding: 1em; border: 1px solid var(--border-subtle); border-radius: 10px; background: var(--footer-bg); }
.legal-document-body img { display: block; max-width: 100%; height: auto; margin: 1.2em auto; border-radius: 12px; }
.legal-document-body hr { border: 0; border-top: 1px solid var(--border-subtle); margin: 1.5em 0; }


.site-footer {
  border-top: 1px solid var(--border-subtle);
  background: var(--footer-bg);
  backdrop-filter: blur(6px);
  padding: 24px 32px 32px;
}

.footer-content {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 16px 24px;
}

.footer-brand {
  color: var(--muted);
  font-size: 0.95rem;
}

.footer-host {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0;
  border: 0;
  border-radius: 0;
  color: var(--text);
  background: transparent;
  text-decoration: none;
  font-weight: 700;
  flex-shrink: 0;
}

.footer-host img { width: 48px; height: 48px; object-fit: contain; }
.footer-copyright { margin: 24px 0 0; text-align: center; color: var(--muted); font-size: 12px; line-height: 1.6; }
.footer-host:hover { border-color: var(--accent); }
.footer-host:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }

.footer-disclaimer {
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.5;
  flex-basis: 100%;
}

.footer-current-page {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  flex-basis: 100%;
}

.footer-navigation {
  display: flex;
  flex-direction: column;
  gap: 10px;
  color: var(--muted);
}

.footer-nav-title {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.footer-nav-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-nav-links a {
  color: var(--text);
  font-size: 0.8rem;
  font-weight: 500;
  text-decoration: none;
}

.footer-nav-links a:hover,
.footer-nav-links a:focus-visible {
  color: var(--accent);
}

.footer-controls {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-left: auto;
}

.footer-language {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 0.85rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.footer-language label {
  font-weight: 600;
}

.footer-theme {
  display: flex;
  align-items: center;
}

.footer-language select {
  background: var(--panel-light);
  color: var(--text);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: normal;
  text-transform: none;
}

.footer-language select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.theme-toggle {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  background: var(--panel-light);
  color: var(--text);
  display: grid;
  place-items: center;
  position: relative;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.theme-toggle:hover {
  transform: translateY(-1px);
}

.theme-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.theme-toggle__icon {
  position: absolute;
  width: 16px;
  height: 16px;
  opacity: 0;
  transform: scale(0.85);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.theme-toggle__icon svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.theme-toggle__icon--sun svg circle {
  fill: currentColor;
  stroke: none;
}

:root[data-theme="light"] .theme-toggle__icon--moon {
  opacity: 1;
  transform: scale(1);
}

:root[data-theme="dark"] .theme-toggle__icon--sun {
  opacity: 1;
  transform: scale(1);
}

@media (max-width: 720px) {
  .site-nav {
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 10px;
    padding: 16px;
  }

  .logo img {
    width: 180px;
  }

  .nav-login-button {
    padding: 9px 14px;
  }

  .nav-links {
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
  }

  .site-footer {
    padding: 20px;
  }

  .legal-page {
    padding: 24px 20px;
  }

  .legal-content {
    padding: 22px;
  }
}

/* Neo Messenger 2026 — direction éditoriale */
.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.site-nav {
  grid-template-columns: minmax(220px, 1fr) auto minmax(220px, 1fr);
  min-height: 92px;
  padding: 18px clamp(24px, 5vw, 84px);
  border-bottom-color: transparent;
  box-shadow: 0 1px 0 var(--border-subtle);
  backdrop-filter: blur(18px);
}

.site-brand {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 0.72rem;
  color: var(--text);
  font-size: clamp(1.25rem, 1.8vw, 1.65rem);
  font-weight: 700;
  letter-spacing: -0.045em;
  text-decoration: none;
  min-width: 0;
}

.site-brand:hover {
  text-decoration: none;
}

.site-brand__logo {
  display: block;
  width: clamp(10rem, 14vw, 12.5rem);
  height: auto;
  flex: 0 0 auto;
}

.nav-links {
  gap: clamp(1.5rem, 4vw, 3.75rem);
  align-items: center;
}

.nav-links a {
  position: relative;
  padding: 0.65rem 0;
  color: var(--text);
  font-size: 0.98rem;
  font-weight: 500;
  text-decoration: none;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 50%;
  right: 50%;
  bottom: 0;
  height: 2px;
  border-radius: 999px;
  background: var(--accent-blue);
  transition: left 180ms ease, right 180ms ease;
}

.nav-links a:hover::after,
.nav-links a:focus-visible::after,
.nav-links a.is-active::after {
  left: 18%;
  right: 18%;
}

.nav-links a.is-active {
  color: var(--accent-blue);
}

.nav-login-button {
  min-height: 46px;
  border-radius: 13px;
  padding: 0.78rem 1.25rem;
}

.nav-login-button--primary {
  border-color: transparent;
  background: var(--accent-gradient);
  color: #fff;
  box-shadow: 0 12px 24px rgba(9, 103, 242, 0.2);
}

.nav-actions {
  min-width: 0;
}

.home-page {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.hero {
  isolation: isolate;
  position: relative;
  width: min(1540px, calc(100% - 48px));
  min-height: 680px;
  margin: 0 auto;
  padding: clamp(72px, 8vw, 126px) 0 54px;
  display: grid;
  grid-template-columns: minmax(350px, 0.78fr) minmax(600px, 1.35fr);
  align-items: center;
  gap: clamp(44px, 6vw, 96px);
}

.hero__content {
  position: relative;
  z-index: 2;
  padding-left: clamp(8px, 1.5vw, 24px);
}

.hero__eyebrow {
  margin-bottom: 1.45rem;
  color: var(--accent-blue);
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.17em;
  text-transform: uppercase;
}

.hero__title {
  max-width: 660px;
  color: var(--text);
  font-family: "DM Serif Display", Georgia, serif;
  font-size: clamp(3.45rem, 5.6vw, 6rem);
  font-weight: 400;
  line-height: 0.95;
  letter-spacing: -0.045em;
}

.hero__lead {
  max-width: 580px;
  margin-top: 1.8rem;
  color: var(--muted);
  font-size: clamp(1.05rem, 1.7vw, 1.35rem);
  line-height: 1.55;
}

.hero__actions {
  margin-top: 1.75rem;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem 1.1rem;
}

.button {
  min-height: 54px;
  border: 0;
  border-radius: 13px;
  padding: 0.9rem 1.35rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.72rem;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: transform 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}

.button:hover {
  transform: translateY(-2px);
  text-decoration: none;
}

.button:focus-visible {
  outline: 3px solid rgba(9, 103, 242, 0.3);
  outline-offset: 3px;
}

.button--primary {
  min-width: 214px;
  background: var(--accent-gradient);
  color: #fff;
  box-shadow: 0 16px 30px rgba(9, 103, 242, 0.22);
}

.button--text {
  min-width: auto;
  background: transparent;
  color: var(--accent-blue);
  box-shadow: none;
}

.hero__trust {
  margin-top: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.72rem;
  color: var(--text);
  font-size: 0.9rem;
}

.hero__trust-icon {
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--accent-blue);
  background: var(--accent-soft);
}

.hero__glow {
  position: absolute;
  z-index: -1;
  pointer-events: none;
  border-radius: 50%;
  filter: blur(18px);
  opacity: 0.78;
}

.hero__glow--blue {
  width: 560px;
  height: 560px;
  top: 30px;
  left: 46%;
  background: radial-gradient(circle, rgba(53, 130, 255, 0.33), transparent 68%);
}

.hero__glow--mint {
  width: 430px;
  height: 430px;
  top: 74px;
  right: -90px;
  background: radial-gradient(circle, rgba(136, 80, 255, 0.2), transparent 68%);
}

.product-preview {
  position: relative;
  z-index: 2;
  min-width: 0;
  height: clamp(470px, 39vw, 570px);
  border: 1px solid var(--border);
  border-radius: 18px;
  display: grid;
  grid-template-columns: 41% 59%;
  grid-template-rows: 38px 1fr;
  overflow: hidden;
  background: var(--preview-surface);
  color: var(--preview-ink);
  box-shadow: 0 30px 70px rgba(25, 54, 98, 0.18), 0 8px 24px rgba(25, 54, 98, 0.1);
}

.product-preview__bar {
  grid-column: 1 / -1;
  padding: 0 1rem;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  border-bottom: 1px solid var(--border);
  background: var(--panel);
}

.window-dot { width: 0.62rem; height: 0.62rem; border-radius: 50%; }
.window-dot--coral { background: #ff675e; }
.window-dot--amber { background: #ffba16; }
.window-dot--green { background: #20b95b; }

.preview-sidebar {
  min-width: 0;
  padding: 1rem 0.9rem;
  border-right: 1px solid var(--border);
  background: var(--panel-light);
}

.preview-brand {
  padding: 0 0.4rem 0.9rem;
  display: grid;
  grid-template-columns: 1.9rem 1fr auto;
  align-items: center;
  gap: 0.55rem;
  font-size: clamp(0.68rem, 0.85vw, 0.9rem);
}

.preview-brand__icon { width: 1.9rem; height: 1.9rem; object-fit: contain; }

.preview-search {
  height: 2.45rem;
  padding: 0 0.8rem;
  border: 1px solid var(--border);
  border-radius: 9px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--muted);
  background: var(--panel);
  font-size: clamp(0.58rem, 0.72vw, 0.78rem);
}

.preview-filters {
  margin: 0.65rem 0;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  color: var(--muted);
  font-size: clamp(0.55rem, 0.7vw, 0.75rem);
}

.preview-filters span { padding: 0.42rem 0.62rem; border-radius: 7px; }
.preview-filters .is-selected { color: var(--accent-blue); background: var(--accent-soft); }

.preview-contact {
  position: relative;
  min-width: 0;
  min-height: 59px;
  padding: 0.55rem 0.45rem;
  border-radius: 9px;
  display: grid;
  grid-template-columns: 2.25rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.55rem;
  font-size: clamp(0.58rem, 0.72vw, 0.78rem);
}

.preview-contact.is-active { background: var(--accent-soft); }
.preview-contact span:nth-child(2) { min-width: 0; display: grid; gap: 0.15rem; }
.preview-contact strong, .preview-contact small { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.preview-contact small, .preview-contact time { color: var(--muted); font-size: 0.88em; }
.preview-contact b { position: absolute; right: 0.45rem; bottom: 0.35rem; width: 1.15rem; height: 1.15rem; border-radius: 50%; display: grid; place-items: center; background: var(--accent-gradient); color: #fff; font-size: 0.65rem; }

.preview-avatar {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 700;
}

.preview-avatar--camille { background: linear-gradient(145deg, #64b9d5, #325b6a 48%, #e8c78e 49%, #5c7536); }
.preview-avatar--family { background: linear-gradient(145deg, #ff9579, #a4446d); }
.preview-avatar--lucas { background: linear-gradient(145deg, #de986c, #704332); }
.preview-avatar--team { color: var(--accent-blue); background: var(--accent-soft); }

.preview-chat {
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: var(--panel);
}

.preview-chat__header {
  min-height: 72px;
  padding: 0.9rem 1.1rem;
  border-bottom: 1px solid var(--border);
  display: grid;
  grid-template-columns: 2.5rem 1fr auto;
  align-items: center;
  gap: 0.65rem;
  font-size: clamp(0.66rem, 0.85vw, 0.9rem);
}

.preview-chat__header > span:nth-child(2) { display: grid; gap: 0.2rem; }
.preview-chat__header small { color: var(--muted); }
.preview-chat__header small i { display: inline-block; width: 0.45rem; height: 0.45rem; margin-right: 0.25rem; border-radius: 50%; background: #22c979; }
.preview-chat__tools { display: flex; gap: clamp(0.8rem, 1.6vw, 1.5rem); color: var(--text); }
.preview-chat__day { margin: 1rem 0 0; text-align: center; color: var(--muted); font-size: clamp(0.58rem, 0.7vw, 0.72rem); }

.preview-messages {
  flex: 1;
  min-height: 0;
  padding: 1.1rem clamp(1rem, 2.4vw, 2rem);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.preview-message {
  width: fit-content;
  max-width: 72%;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  display: flex;
  align-items: flex-end;
  gap: 0.8rem;
  color: var(--text);
  font-size: clamp(0.61rem, 0.78vw, 0.8rem);
  line-height: 1.4;
  box-shadow: 0 3px 8px rgba(22, 32, 56, 0.025);
}

.preview-message--mine { align-self: flex-end; border-color: var(--accent-border); background: var(--accent-soft); }
.preview-message time { flex: 0 0 auto; color: var(--muted); font-size: 0.78em; white-space: nowrap; }
.preview-message time i { color: var(--accent-blue); }

.preview-composer {
  min-height: 50px;
  margin: 0 1rem 1rem;
  padding: 0.45rem 0.55rem 0.45rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 13px;
  display: grid;
  grid-template-columns: auto 1fr auto auto auto;
  align-items: center;
  gap: 0.8rem;
  color: var(--muted);
  font-size: clamp(0.6rem, 0.74vw, 0.76rem);
}

.preview-composer b { width: 2.35rem; height: 2.35rem; border-radius: 50%; display: grid; place-items: center; color: #fff; background: var(--accent-gradient); }

.feature-grid {
  width: min(1540px, calc(100% - 48px));
  margin: 0 auto;
  padding: 0 0 clamp(70px, 8vw, 112px);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.feature-card {
  min-height: 150px;
  padding: clamp(1.35rem, 2vw, 2rem);
  border: 1px solid var(--border-strong);
  border-radius: 17px;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  background: var(--panel);
  background: color-mix(in srgb, var(--panel) 82%, transparent);
  box-shadow: 0 12px 35px rgba(35, 48, 69, 0.045);
}

.feature-card__icon {
  flex: 0 0 auto;
  width: 4.75rem;
  height: 4.75rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 1.65rem;
}

.feature-card__icon--mint { background: linear-gradient(145deg, #087eaf, #165ab8); }
.feature-card__icon--blue { background: var(--accent-gradient); }
.feature-card__icon--coral { background: linear-gradient(145deg, #783dd1, #5541b8); }
.feature-card h3 { margin-bottom: 0.35rem; font-family: "DM Serif Display", Georgia, serif; font-size: 1.5rem; font-weight: 400; }
.feature-card p { color: var(--muted); line-height: 1.5; }

.modal__backdrop { background: rgba(3, 14, 35, 0.62); }
.modal__content { border-radius: 20px; box-shadow: 0 30px 80px rgba(4, 20, 48, 0.28); }
.modal__submit { background: var(--accent-gradient); box-shadow: 0 12px 28px rgba(9, 103, 242, 0.2); }

.legal-page { padding: clamp(48px, 7vw, 100px) 24px; }
.legal-content { max-width: 920px; padding: clamp(28px, 5vw, 58px); border-radius: 20px; box-shadow: 0 22px 60px rgba(24, 41, 67, 0.07); }
.legal-content h1 { font-family: "DM Serif Display", Georgia, serif; font-size: clamp(2.3rem, 5vw, 4rem); font-weight: 400; letter-spacing: -0.03em; }
.legal-content h2 { color: var(--accent-blue); }

.site-footer { padding: 42px clamp(24px, 5vw, 84px); }
.footer-content { max-width: 1540px; }

@media (max-width: 1120px) {
  .site-nav { grid-template-columns: 1fr auto; }
  .site-nav .site-brand { grid-column: 1; grid-row: 1; }
  .site-nav .nav-actions { grid-column: 2; grid-row: 1; }
  .site-nav .nav-links { display: flex; grid-column: 1 / -1; grid-row: 2; justify-content: center; flex-wrap: wrap; gap: 8px 24px; min-width: 0; }
  .site-nav .nav-links a { font-size: 12px; padding: 5px 0; }
  .hero { grid-template-columns: 1fr; padding-top: 72px; }
  .hero__content { max-width: 740px; }
  .product-preview { height: min(66vw, 570px); }
}

@media (max-width: 760px) {
  .site-nav { min-height: 74px; padding: 12px 16px; gap: 12px; }
  .site-brand { font-size: 1.05rem; gap: 0.4rem; }
  .site-brand__logo { width: 9.5rem; }
  .nav-login-button { min-height: 42px; padding: 0.68rem 0.8rem; font-size: 0.78rem; }
  .nav-user-button { max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .hero { width: min(100% - 32px, 620px); min-height: auto; padding: 64px 0 36px; gap: 42px; }
  .hero__content { padding-left: 0; }
  .hero__eyebrow { font-size: 0.7rem; line-height: 1.5; }
  .hero__title { font-size: clamp(3rem, 15vw, 4.6rem); }
  .hero__lead { font-size: 1.05rem; }
  .hero__actions { align-items: stretch; }
  .button--primary { flex: 1 1 190px; }
  .button--text { flex: 0 0 auto; }
  .product-preview { height: 510px; grid-template-columns: 1fr; grid-template-rows: 34px 1fr; }
  .preview-sidebar { display: none; }
  .preview-chat { grid-column: 1; }
  .preview-messages { padding: 0.9rem; }
  .preview-message { max-width: 84%; font-size: 0.72rem; }
  .feature-grid { width: min(100% - 32px, 620px); grid-template-columns: 1fr; padding-bottom: 64px; }
  .feature-card { min-height: 126px; }
  .feature-card__icon { width: 4rem; height: 4rem; }
  .footer-content, .footer-controls { align-items: flex-start; }
  .footer-controls { width: 100%; margin-left: 0; justify-content: space-between; }
}

@media (max-width: 430px) {
  .site-nav { grid-template-columns: minmax(0, 1fr) auto; }
  .site-brand__logo { width: 8.75rem; }
  .hero__title { max-width: 100%; font-size: clamp(2.7rem, 12.2vw, 3.05rem); overflow-wrap: normal; }
  .hero__actions { display: grid; grid-template-columns: minmax(0, 1fr); }
  .button--text { justify-self: start; }
  .button { min-height: 50px; padding-inline: 1rem; }
  .preview-chat__tools { gap: 0.75rem; }
  .preview-composer { gap: 0.55rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
}

/* Consistent selection and keyboard navigation across both themes. */
.nav-login-button.nav-login-button--icon {
  width: 46px;
  height: 46px;
  min-width: 46px;
  min-height: 46px;
  flex: 0 0 46px;
  padding: 0;
  border-radius: 12px;
  font-size: 1.1rem;
}

::selection { background: var(--accent-soft); color: var(--text); }
.theme-toggle__icon > i { font-size: 16px; line-height: 1; }
.nav-downloads summary > i { width: 12px; font-size: 10px; flex-shrink: 0; }
.nav-downloads[open] summary > i { transform: rotate(180deg); }
.neo-retro-title > [aria-hidden] { display: flex; gap: 8px; font-size: 10px; align-items: center; }
.neo-retro-composer > :last-child i + i { margin-left: 8px; }
.neo-wizz > i { font-size: 13px; }
.neo-cookie-heading button > i { font-size: 18px; }
.nav-downloads { position: relative; font-size: inherit; }
.nav-downloads summary { display: flex; align-items: center; gap: 6px; padding: .65rem 0; list-style: none; cursor: pointer; color: var(--text); font-size: .98rem; font-weight: 500; }
.nav-downloads summary::-webkit-details-marker { display: none; }
.nav-downloads summary svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.5; flex-shrink: 0; }
.nav-downloads[open] summary svg { transform: rotate(180deg); }
.nav-downloads summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 4px; }
.nav-downloads__list { position: absolute; top: calc(100% + 12px); left: 50%; transform: translateX(-50%); width: 210px; max-width: calc(100vw - 24px); padding: 7px; background: var(--panel); border: 1px solid var(--border-strong); border-radius: 14px; box-shadow: 0 16px 45px #0003; z-index: 25; }
.site-nav .nav-downloads__list a { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 8px; font-size: 13px; line-height: 1.4; }
.nav-downloads__list a > [aria-hidden] { width: 22px; font-size: 20px; text-align: center; color: var(--accent); }
.nav-downloads__list a::after { display: none; }
.nav-downloads__list a:hover, .nav-downloads__list a:focus-visible, .nav-downloads__list a[aria-current="page"] { background: var(--accent-soft); color: var(--accent); }
.download-page { max-width: 920px; margin: 0 auto; padding: 70px 24px 90px; }
.download-hero { text-align: center; }
.download-symbol { display: grid; place-items: center; width: 64px; height: 64px; margin: 0 auto 22px; font-size: 34px; line-height: 1; border-radius: 18px; background: var(--accent-soft); color: var(--accent); }
.download-hero h1 { font-size: clamp(30px, 4vw, 44px); letter-spacing: -.045em; line-height: 1.15; margin-bottom: 12px; }
.download-description { font-size: 17px; line-height: 1.7; color: var(--muted); }
.download-card { max-width: 540px; margin: 24px auto 0; }
.download-actions { display: flex; align-items: stretch; justify-content: center; gap: 12px; flex-wrap: wrap; }
.download-actions .download-action { gap: 8px; }
.download-action.download-store { background: transparent; }
.download-card .download-version { margin: 0 0 18px; }
.download-card p { font-size: 13px; color: var(--muted); line-height: 1.7; margin-top: 16px; }
.download-action { display: inline-flex; justify-content: center; align-items: center; min-height: 44px; padding: 12px 18px; border: 1px solid var(--accent-border); border-radius: 12px; background: var(--accent-soft); color: var(--text); font: inherit; font-size: 14px; line-height: 1.5; }
.download-action:disabled { cursor: not-allowed; }
.download-action--soon { position: relative; overflow: hidden; max-width: 100%; }
.download-action--soon > :not(.download-soon) { opacity: .45; }
.download-soon { position: absolute; z-index: 1; top: 50%; left: -10%; width: 120%; padding: 4px 10px; transform: translateY(-50%) rotate(16deg); background: linear-gradient(110deg, #235bd7, #7041cf); color: #fff; box-shadow: 0 2px 6px #0003; font-size: 11px; font-weight: 700; line-height: 1.5; text-align: center; pointer-events: none; }
.download-action:not(:disabled):hover { border-color: var(--accent); }
.download-action:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.download-back { color: var(--accent); font-size: 13px; }
@media(max-width: 1120px) { .nav-downloads summary { font-size: 12px; padding: 5px 0; } }
@media(max-width: 760px) {
  .nav-downloads summary { font-size: 11px; padding: 8px 0; gap: 4px; }
  .download-page { padding: 45px 20px 60px; }
  .download-actions { flex-direction: column; max-width: 300px; margin: auto; }
}
@media(max-width: 360px) { .nav-downloads summary { font-size: 10px; gap: 3px; } }
.neo-cookie-banner[hidden] { display: none; }
.neo-cookie-banner { position: fixed; bottom: max(12px, env(safe-area-inset-bottom)); left: 12px; right: 12px; max-width: 660px; margin: auto; z-index: 2100; padding: 20px; border: 1px solid var(--border-strong); border-radius: 18px; background: var(--panel); color: var(--text); box-shadow: 0 12px 60px #0004; max-height: calc(100dvh - 24px); overflow: auto; }
.neo-cookie-banner h2, .neo-cookie-dialog h2 { font-size: 18px; margin: 0; }
.neo-cookie-banner p, .neo-cookie-dialog p { font-size: 13px; line-height: 1.6; margin: 12px 0; color: var(--muted); }
.neo-cookie-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.neo-cookie-actions button { flex: 1 1 130px; min-height: 40px; padding: 10px; font: inherit; font-size: 12px; border: 1px solid var(--accent-border); border-radius: 9px; color: var(--text); background: var(--accent-soft); cursor: pointer; }
.neo-cookie-actions button:hover { background: var(--panel-light); }
.neo-cookie-dialog { position: fixed; inset: 0; margin: auto; width: min(520px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); overflow: auto; padding: 22px; border: 1px solid var(--border-strong); border-radius: 18px; background: var(--panel); color: var(--text); box-shadow: 0 20px 70px #0005; }
.neo-cookie-dialog::backdrop { background: #07102488; backdrop-filter: blur(4px); }
.neo-cookie-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.neo-cookie-heading button { background: transparent; color: var(--text); font-size: 24px; border: 0; width: 32px; height: 32px; cursor: pointer; }
.neo-cookie-category { display: flex; gap: 12px; align-items: flex-start; padding: 16px 0; border-bottom: 1px solid var(--border); }
.neo-cookie-category input { width: 18px; height: 18px; flex: 0 0 18px; margin-top: 2px; accent-color: var(--accent); }
.neo-cookie-category strong { display: block; font-size: 14px; }
.neo-cookie-category small { display: block; color: var(--muted); font-size: 12px; line-height: 1.6; margin-top: 5px; }
.neo-cookie-dialog a { color: var(--accent); font-size: 12px; }
.neo-cookie-link { background: transparent; color: var(--muted); border: 0; padding: 5px; font: inherit; font-size: 11px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; min-height: 32px; }
.neo-cookie-notice:not(:empty) { position: fixed; z-index: 2200; bottom: 12px; left: 12px; right: 12px; max-width: 480px; margin: auto; padding: 12px; border-radius: 12px; background: var(--panel); color: var(--text); box-shadow: 0 4px 20px #0003; font-size: 12px; }
.neo-cookie-noscript { padding: 10px; font-size: 12px; }
/* Compact, centred navigation with a translucent surface above page content. */
.site-nav { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); min-height: 72px; padding: 12px clamp(16px, 4vw, 56px); gap: 16px; background: rgba(9, 15, 35, .72); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
:root[data-theme="light"] .site-nav { background: rgba(248, 250, 255, .72); }
.site-nav .site-brand { grid-column: 1; grid-row: 1; }
.site-nav .site-brand__logo { width: 130px; max-width: 100%; }
.site-nav .nav-links { display: flex; grid-column: 2; grid-row: 1; justify-self: center; align-items: center; justify-content: center; gap: 28px; flex-wrap: nowrap; }
.site-nav .nav-actions { grid-column: 3; grid-row: 1; min-width: 0; max-width: 100%; }
@media (max-width: 760px) {
  .site-nav { min-height: 66px; padding: 10px 12px; gap: 8px; }
  .site-nav .site-brand__logo { width: 88px; }
  .site-nav .nav-links { gap: 12px; }
  .site-nav .nav-links a { font-size: 11px; padding: 8px 0; white-space: nowrap; }
  .site-nav .nav-user { max-width: 100%; }
  .site-nav .nav-user-button { max-width: 100%; }
}
@media (max-width: 360px) {
  .site-nav { padding: 10px 8px; gap: 6px; }
  .site-nav .site-brand__logo { width: 64px; }
  .site-nav .nav-links { gap: 8px; }
  .site-nav .nav-links a { font-size: 10px; }
}
/* Native selection and editing shortcuts are reserved for text fields. */
body {
  -webkit-user-select: none;
  user-select: none;
}
body :is(input:not([type="button"]):not([type="submit"]):not([type="reset"]):not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not([type="file"]), textarea, [contenteditable="true"], [contenteditable=""], [contenteditable="plaintext-only"]) {
  -webkit-user-select: text;
  user-select: text;
}
.legal-content .legal-updated { margin: 8px 0 24px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.legal-updated time { display: inline-block; }
.site-footer { padding-bottom: 8px; }
.site-footer .footer-content { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 28px 20px; direction: ltr; }
.site-footer .footer-host { justify-self: end; }
.site-footer .footer-controls { grid-column: 1 / -1; display: grid; grid-template-columns: 80px minmax(0, 1fr) 80px; align-items: center; gap: 12px; width: 100%; margin: 0; }
.footer-controls .footer-copyright { grid-column: 2; grid-row: 1; margin: 0; }
.footer-controls .footer-language { grid-column: 1; grid-row: 1; gap: 7px; }
.footer-controls .footer-theme { grid-column: 3; grid-row: 1; justify-self: end; }
.footer-link-groups { display: flex; align-items: flex-start; flex-wrap: wrap; gap: 24px clamp(28px, 5vw, 72px); min-width: 0; }
.footer-link-groups .footer-navigation { min-width: 0; }
.footer-link-groups .footer-nav-links a { overflow-wrap: anywhere; }
@media (max-width: 480px) {
  .site-footer .footer-controls { grid-template-columns: 65px minmax(0, 1fr) 40px; gap: 7px; }
  .footer-controls .footer-copyright { font-size: 10px; }
}
:where(a, button, input, textarea, select):focus-visible {
  outline: 2px solid var(--accent-blue);
  outline-offset: 3px;
}
/* Appels vocaux WebRTC */
.chat-page__message-action--call{color:#8ed8ff}.chat-page__message-action--call:hover{color:#fff;background:rgba(43,145,255,.22)}
.chat-page__message-action:disabled{opacity:.42;cursor:not-allowed}
.neo-voice-call{display:flex;align-items:center;gap:10px;min-height:54px;padding:8px 14px;border-bottom:1px solid var(--chat-border,#29466f);background:linear-gradient(90deg,rgba(22,119,255,.14),rgba(142,52,235,.12))}
.neo-voice-call[hidden],.neo-voice-call__button[hidden]{display:none!important}.neo-voice-call__icon{display:grid;place-items:center;width:34px;height:34px;border-radius:10px;color:#fff;background:linear-gradient(135deg,#168fff,#8638e8);animation:neo-call-pulse 1.8s infinite}.neo-voice-call__details{display:flex;flex:1;min-width:0;flex-direction:column;font-size:.78rem}.neo-voice-call__details strong{font-size:.82rem}.neo-voice-call__details time{font-variant-numeric:tabular-nums;color:#a9bddd}.neo-voice-call__button{display:inline-grid;place-items:center;width:38px;height:38px;padding:0;border:0;border-radius:10px;color:#fff;font:inherit;font-size:.78rem;cursor:pointer}.neo-voice-call__button span{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}.neo-voice-call__button--answer{background:#1d9d5a}.neo-voice-call__button--speaker{display:none;background:#35527f}.neo-voice-call__button--speaker[aria-pressed="true"]{background:#168fff;box-shadow:0 0 0 2px rgba(118,197,255,.25)}.neo-voice-call__button--hangup{background:#d44960}.neo-voice-call audio{display:none}
.chat-page__message-panel--minimized .neo-voice-call{display:none}
.neo-incoming-call{position:fixed;inset:0;z-index:14000;display:grid;place-items:center;padding:18px;background:rgba(2,8,24,.55);backdrop-filter:blur(5px)}.neo-incoming-call>section{display:flex;align-items:center;gap:12px;width:min(390px,calc(100vw - 28px));padding:14px;border:1px solid #426497;border-radius:18px;background:#111f3c;color:#fff;box-shadow:0 22px 65px rgba(0,0,0,.45)}.neo-incoming-call img{width:48px;height:48px;object-fit:cover;border-radius:12px}.neo-incoming-call div{display:flex;min-width:0;flex:1;flex-direction:column}.neo-incoming-call span{font-size:.72rem;color:#a9bddd}.neo-incoming-call strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.neo-incoming-call button{display:grid;place-items:center;width:38px;height:38px;border:0;border-radius:10px;color:#fff;cursor:pointer}.neo-incoming-call__answer{background:#1d9d5a}.neo-incoming-call__hangup{background:#d44960}
@keyframes neo-call-pulse{50%{box-shadow:0 0 0 7px rgba(65,147,255,.13);transform:scale(1.04)}}
@media(max-width:720px){.neo-voice-call{padding:7px 9px;gap:7px}.neo-voice-call__button{width:36px;height:36px}.neo-voice-call__button--speaker{display:grid}.chat-page__message-action--call{display:grid!important}}
@media(prefers-reduced-motion:reduce){.neo-voice-call__icon{animation:none}}
