/* ==========================================================================
   Club NEXUS — Design system v3
   ========================================================================== */

:root {
  /* Brand — taken from the NEXUS logo: sky blue → deep blue → violet → pink */
  --blue: #1e9bf0;
  --blue-deep: #2541c8;
  --violet: #8f2ee6;
  --violet-deep: #5b1fa8;
  --magenta: #ee3a8f;
  --grad: linear-gradient(120deg, #1e9bf0 0%, #2f5fe0 24%, #7a32e8 52%, #c536c8 76%, #ee3a8f 100%);
  --grad-loop: linear-gradient(120deg, #1e9bf0, #2f5fe0, #7a32e8, #c536c8, #ee3a8f, #7a32e8, #1e9bf0);
  --grad-soft: linear-gradient(135deg, rgba(30, 155, 240, .12), rgba(122, 50, 232, .1), rgba(238, 58, 143, .12));

  /* Surfaces */
  --night: #080619;
  --night-2: #0f0c29;
  --night-3: #18143d;
  --paper: #ffffff;
  --soft: #f8f4fb;
  --soft-2: #f1e9f7;

  /* Text */
  --ink: #160c1f;
  --ink-2: #3a2d45;
  --muted: #6b5f75;
  --on-dark: #ffffff;
  --on-dark-muted: rgba(240, 230, 250, .7);

  /* Lines & shadows */
  --line: rgba(22, 12, 31, .08);
  --line-strong: rgba(22, 12, 31, .14);
  --line-dark: rgba(255, 255, 255, .1);
  --shadow-sm: 0 1px 2px rgba(22, 12, 31, .04), 0 4px 14px rgba(22, 12, 31, .05);
  --shadow-md: 0 2px 4px rgba(22, 12, 31, .04), 0 18px 44px rgba(46, 12, 74, .1);
  --shadow-lg: 0 30px 80px rgba(46, 12, 74, .2);
  --shadow-glow: 0 18px 50px rgba(122, 50, 232, .38), 0 6px 24px rgba(30, 155, 240, .25);

  /* Type */
  --font-display: "Space Grotesk", "Inter", "Segoe UI", system-ui, sans-serif;
  --font-body: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;

  /* Geometry */
  --container: 1240px;
  --gutter: 24px;
  --radius-sm: 6px;
  --radius: 8px;
  --radius-lg: 12px;
  --header-h: 76px;

  /* Motion */
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-in-out: cubic-bezier(.65, 0, .35, 1);
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

::selection {
  color: #fff;
  background: var(--magenta);
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}

h1, h2, h3 {
  margin: 0;
  font-family: var(--font-display);
  letter-spacing: -.02em;
  line-height: 1.08;
}

p {
  margin: 0;
}

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

.container {
  width: min(var(--container), calc(100% - var(--gutter) * 2));
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  z-index: 200;
  top: 12px;
  left: 12px;
  padding: 10px 16px;
  border-radius: 6px;
  color: #fff;
  background: var(--ink);
  font-weight: 600;
  transform: translateY(-160%);
  transition: transform .3s var(--ease-out);
}

.skip-link:focus {
  transform: none;
}

.text-gradient {
  background: var(--grad-loop);
  background-size: 300% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: gradFlow 8s linear infinite;
}

/* Slides the looping logo gradient so brand accents feel alive. */
@keyframes gradFlow {
  from { background-position: 0% 50%; }
  to { background-position: 300% 50%; }
}

/* ---------- Scrollbar ---------- */
@supports (scrollbar-color: auto) {
  html {
    scrollbar-color: rgba(47, 95, 224, .55) transparent;
    scrollbar-width: thin;
  }
}

/* ---------- Eyebrow ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--violet-deep);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 22px;
  height: 2px;
  border-radius: 2px;
  background: var(--grad);
}

.eyebrow-light {
  color: #f3c8ff;
}

/* ---------- Buttons ---------- */
.btn {
  --btn-pad: 0 22px;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  padding: var(--btn-pad);
  border: 0;
  border-radius: 6px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 650;
  letter-spacing: -.005em;
  white-space: nowrap;
  isolation: isolate;
  overflow: hidden;
  transition: transform .45s var(--ease-out), box-shadow .45s var(--ease-out), background-color .3s ease, color .3s ease;
  will-change: transform;
}

.btn svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform .45s var(--ease-out);
}

.btn:hover svg {
  transform: translateX(4px);
}

.btn:active {
  transform: scale(.97);
}

.btn-large {
  --btn-pad: 0 28px;
  min-height: 56px;
  font-size: 16px;
}

.btn-primary {
  color: #fff;
  background: var(--grad-loop);
  background-size: 300% 100%;
  box-shadow: 0 10px 30px rgba(90, 60, 225, .35), inset 0 1px 0 rgba(255, 255, 255, .25);
  animation: gradFlow 10s linear infinite;
}

.btn-primary::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .35) 50%, transparent 70%);
  transform: translateX(-120%);
  transition: transform .8s var(--ease-out);
}

.btn-primary:hover {
  box-shadow: var(--shadow-glow), inset 0 1px 0 rgba(255, 255, 255, .25);
}

.btn-primary:hover::after {
  transform: translateX(120%);
}

.btn-light {
  color: var(--ink);
  background: #fff;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .14);
}

.btn-light:hover {
  box-shadow: 0 16px 40px rgba(0, 0, 0, .22);
}

.btn-glass {
  color: #fff;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .22);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.btn-glass:hover {
  background: rgba(255, 255, 255, .16);
  border-color: rgba(255, 255, 255, .4);
}

.btn-ghost {
  color: var(--ink);
  background: var(--soft);
  border: 1px solid var(--line);
}

.btn-ghost:hover {
  background: var(--soft-2);
}

/* ---------- Preloader ---------- */
.preloader {
  display: none;
}

.show-preloader .preloader {
  position: fixed;
  z-index: 150;
  inset: 0;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 50% 45%, #14175a 0%, var(--night) 60%);
  transition: clip-path .9s var(--ease-in-out), visibility 0s linear .9s;
  clip-path: inset(0 0 0 0);
}

.show-preloader.is-loaded .preloader {
  clip-path: inset(0 0 100% 0);
  visibility: hidden;
}

.preloader-inner {
  display: grid;
  justify-items: center;
  gap: 26px;
}

.preloader img {
  width: min(220px, 56vw);
  animation: preloaderLogo 1.1s var(--ease-out) both;
}

.preloader-bar {
  width: 160px;
  height: 2px;
  border-radius: 2px;
  background: rgba(255, 255, 255, .12);
  overflow: hidden;
}

.preloader-bar span {
  display: block;
  height: 100%;
  background: var(--grad);
  transform-origin: left;
  animation: preloaderBar 1s var(--ease-in-out) forwards;
}

@keyframes preloaderLogo {
  from { opacity: 0; transform: translateY(14px) scale(.96); filter: blur(8px); }
  to { opacity: 1; transform: none; filter: none; }
}

@keyframes preloaderBar {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

/* ---------- Scroll progress ---------- */
.scroll-progress {
  position: fixed;
  z-index: 120;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--grad);
  transform: scaleX(0);
  transform-origin: left;
  pointer-events: none;
}

/* ---------- Navigation (floating island) ---------- */
.site-header {
  position: fixed;
  z-index: 100;
  top: 0;
  left: 0;
  width: 100%;
  padding-top: 18px;
  color: #fff;
  pointer-events: none;
  transition: transform .7s var(--ease-out), padding .7s var(--ease-out);
}

.site-header > * {
  pointer-events: auto;
}

.site-header.is-hidden {
  transform: translateY(-130%);
}

.site-header.is-scrolled {
  padding-top: 12px;
}

.navbar-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: min(var(--container), calc(100% - var(--gutter) * 2));
  height: 76px;
  margin-inline: auto;
  padding: 0 8px 0 22px;
  border-radius: 6px;
  isolation: isolate;
  transition: width .9s var(--ease-out), height .7s var(--ease-out), padding .7s var(--ease-out);
}

/* Glass surface — invisible at the top of the page, appears once scrolled */
.navbar-inner::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  border-radius: inherit;
  background:
    radial-gradient(260px circle at var(--gx, 50%) var(--gy, 50%), rgba(206, 80, 240, .16), transparent 70%),
    linear-gradient(180deg, rgba(30, 12, 48, .8), rgba(14, 5, 24, .82));
  box-shadow: 0 24px 60px rgba(8, 2, 16, .45), inset 0 1px 0 rgba(255, 255, 255, .08);
  backdrop-filter: blur(22px) saturate(1.6);
  -webkit-backdrop-filter: blur(22px) saturate(1.6);
  opacity: 0;
  transform: scale(.98);
  transition: opacity .6s ease, transform .9s var(--ease-out);
}

/* Animated gradient hairline */
.navbar-inner::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  padding: 1px;
  border-radius: inherit;
  background: linear-gradient(110deg, rgba(255, 255, 255, .06) 0%, rgba(255, 255, 255, .28) 20%, rgba(196, 70, 245, .75) 40%, rgba(238, 58, 143, .7) 55%, rgba(255, 255, 255, .06) 75%, rgba(255, 255, 255, .2) 100%);
  background-size: 300% 100%;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  opacity: 0;
  animation: navBorder 8s linear infinite;
  transition: opacity .6s ease;
  pointer-events: none;
}

@keyframes navBorder {
  to { background-position: 300% 0; }
}

.site-header.is-scrolled .navbar-inner {
  width: min(1080px, calc(100% - var(--gutter) * 2));
  height: 64px;
  padding-left: 20px;
}

.site-header.is-scrolled .navbar-inner::before,
.site-header.is-scrolled .navbar-inner::after {
  opacity: 1;
  transform: none;
}

/* Brand */
.brand {
  flex: none;
  display: inline-flex;
  align-items: center;
  transition: transform .5s var(--ease-out), filter .5s ease;
}

.brand:hover {
  transform: scale(1.04);
  filter: drop-shadow(0 0 14px rgba(220, 110, 255, .55));
}

.brand-logo {
  width: 132px;
  height: auto;
  transition: width .7s var(--ease-out);
}

.site-header.is-scrolled .brand-logo {
  width: 112px;
}

/* Links */
.nav-panel {
  display: flex;
  align-items: center;
}

.nav-panel-label,
.nav-mobile-foot,
.nav-num {
  display: none;
}

.nav-links {
  position: relative;
  display: flex;
  align-items: center;
  gap: 2px;
  margin: 0;
  padding: 5px;
  list-style: none;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 6px;
  background: rgba(255, 255, 255, .05);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: background .6s ease, border-color .6s ease;
}

.site-header.is-scrolled .nav-links {
  border-color: transparent;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.nav-links a {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 6px;
  color: rgba(255, 255, 255, .68);
  font-size: 14.5px;
  font-weight: 550;
  letter-spacing: -.005em;
  transition: color .35s ease;
}

.nav-label {
  display: block;
  height: 1.5em;
  line-height: 1.5;
  overflow: hidden;
}

.nav-label > span {
  display: block;
  text-shadow: 0 1.5em 0 #fff;
  transition: transform .55s var(--ease-out);
}

.nav-links a:hover .nav-label > span,
.nav-links a:focus-visible .nav-label > span {
  transform: translateY(-1.5em);
}

.nav-links a.is-current {
  color: #fff;
}

.nav-indicator {
  position: absolute;
  z-index: 0;
  top: 50%;
  left: 0;
  width: var(--w, 0);
  height: calc(100% - 10px);
  border-radius: 6px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .15), rgba(255, 255, 255, .04));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2), 0 8px 22px rgba(6, 0, 14, .35);
  opacity: var(--o, 0);
  transform: translate(var(--x, 0), -50%);
  transition: transform .6s var(--ease-out), width .6s var(--ease-out), opacity .35s ease;
  pointer-events: none;
}

.nav-indicator::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -1px;
  width: 18px;
  height: 2px;
  margin-left: -9px;
  border-radius: 2px;
  background: var(--grad);
  box-shadow: 0 0 10px 2px rgba(238, 58, 143, .65);
}

/* Actions */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-login {
  display: inline-flex;
  align-items: center;
  height: 46px;
  padding: 0 13px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 6px;
  color: rgba(255, 255, 255, .85);
  background: rgba(255, 255, 255, .04);
  font-size: 14px;
  font-weight: 600;
  transition: background .35s ease, border-color .35s ease, color .35s ease, height .7s var(--ease-out);
}

.nav-login svg {
  flex: none;
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav-login span {
  max-width: 0;
  overflow: hidden;
  white-space: nowrap;
  opacity: 0;
  transition: max-width .55s var(--ease-out), margin .55s var(--ease-out), opacity .3s ease;
}

.nav-login:hover,
.nav-login:focus-visible {
  color: #fff;
  border-color: rgba(255, 255, 255, .3);
  background: rgba(255, 255, 255, .1);
}

.nav-login:hover span,
.nav-login:focus-visible span {
  max-width: 60px;
  margin-left: 8px;
  opacity: 1;
}

.nav-cta {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  height: 50px;
  padding: 0 6px 0 22px;
  border-radius: 6px;
  color: #fff;
  background: var(--grad);
  font-size: 14.5px;
  font-weight: 650;
  isolation: isolate;
  overflow: hidden;
  box-shadow: 0 10px 28px rgba(196, 48, 200, .4), inset 0 1px 0 rgba(255, 255, 255, .3);
  transition: height .7s var(--ease-out), box-shadow .5s ease, transform .5s var(--ease-out);
}

.nav-cta::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .4) 50%, transparent 70%);
  transform: translateX(-120%);
  transition: transform .9s var(--ease-out);
}

.nav-cta:hover {
  box-shadow: 0 14px 40px rgba(210, 55, 210, .6), inset 0 1px 0 rgba(255, 255, 255, .3);
}

.nav-cta:hover::after {
  transform: translateX(120%);
}

.nav-cta:active {
  transform: scale(.97);
}

.nav-cta-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  color: var(--violet-deep);
  background: #fff;
  transition: transform .6s var(--ease-spring), width .7s var(--ease-out), height .7s var(--ease-out);
}

.nav-cta-icon svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  transform: rotate(-45deg);
  transition: transform .6s var(--ease-spring);
}

.nav-cta:hover .nav-cta-icon {
  transform: scale(1.08);
}

.nav-cta:hover .nav-cta-icon svg {
  transform: rotate(0deg);
}

.site-header.is-scrolled .nav-cta {
  height: 46px;
}

.site-header.is-scrolled .nav-cta-icon {
  width: 34px;
  height: 34px;
}

.site-header.is-scrolled .nav-login {
  height: 44px;
}

/* Toggle */
.nav-toggle {
  display: none;
  position: relative;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 50%;
  background: rgba(255, 255, 255, .06);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: background .3s ease, transform .5s var(--ease-out);
}

.nav-toggle:hover {
  background: rgba(255, 255, 255, .12);
}

.nav-toggle span {
  position: absolute;
  left: 14px;
  height: 2px;
  border-radius: 2px;
  background: #fff;
  transition: transform .55s var(--ease-out), top .55s var(--ease-out), width .55s var(--ease-out);
}

.nav-toggle span:first-child { top: 19px; width: 18px; }
.nav-toggle span:last-child { top: 26px; width: 12px; }

.nav-toggle:hover span:last-child {
  width: 18px;
}

.site-header.is-open .nav-toggle {
  transform: rotate(90deg);
}

.site-header.is-open .nav-toggle span:first-child,
.site-header.is-open .nav-toggle span:last-child {
  top: 22.5px;
  width: 18px;
}

.site-header.is-open .nav-toggle span:first-child { transform: rotate(45deg); }
.site-header.is-open .nav-toggle span:last-child { transform: rotate(-45deg); }

/* Simple bar used on the registration & login pages */
.registration-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: min(var(--container), calc(100% - var(--gutter) * 2));
  height: 70px;
  margin-inline: auto;
  padding: 0 10px 0 22px;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 6px;
  background: rgba(16, 6, 28, .6);
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  box-shadow: 0 20px 50px rgba(8, 2, 16, .35);
}

.registration-nav .brand-logo {
  width: 118px;
}

/* ---------- Navigation: responsive ---------- */
@media (max-width: 1180px) {
  .nav-links a {
    padding: 8px 12px;
  }

  .nav-login {
    display: none;
  }
}

@media (max-width: 1024px) {
  .navbar-inner,
  .site-header.is-scrolled .navbar-inner {
    height: 64px;
    padding: 0 8px 0 18px;
  }

  .nav-toggle {
    display: block;
  }

  .nav-panel {
    position: fixed;
    inset: 0;
    z-index: -3;
    flex-direction: column;
    align-items: stretch;
    padding: 108px 28px 30px;
    overflow-y: auto;
    background:
      radial-gradient(ellipse 70% 45% at 100% 0%, rgba(30, 155, 240, .3), transparent 70%),
      radial-gradient(ellipse 60% 40% at 0% 100%, rgba(238, 58, 143, .22), transparent 70%),
      var(--night);
    clip-path: circle(0 at calc(100% - 52px) 50px);
    visibility: hidden;
    transition: clip-path .75s var(--ease-in-out), visibility 0s linear .75s;
  }

  .site-header.is-open .nav-panel {
    clip-path: circle(150% at calc(100% - 52px) 50px);
    visibility: visible;
    transition: clip-path .85s var(--ease-in-out);
  }

  .site-header.is-open .navbar-inner::before,
  .site-header.is-open .navbar-inner::after {
    opacity: 0;
  }

  .nav-panel-label {
    display: block;
    margin-bottom: 14px;
    color: rgba(243, 200, 255, .6);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .2em;
    text-transform: uppercase;
  }

  .nav-links,
  .site-header.is-scrolled .nav-links {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0;
    border: 0;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .nav-indicator {
    display: none;
  }

  .nav-links a {
    gap: 16px;
    padding: 13px 0;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
    border-radius: 0;
    color: #fff;
    font-family: var(--font-display);
    font-size: clamp(30px, 7.5vw, 42px);
    font-weight: 600;
    letter-spacing: -.035em;
    opacity: 0;
    transform: translateY(28px);
    transition: opacity .5s ease, transform .7s var(--ease-out), color .3s ease;
  }

  .nav-num {
    display: block;
    width: 26px;
    color: rgba(243, 200, 255, .55);
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .05em;
  }

  .nav-label > span {
    text-shadow: 0 1.5em 0 #f3c8ff;
  }

  .nav-links a.is-current .nav-label > span {
    background: var(--grad);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: none;
  }

  .nav-links a.is-current .nav-num {
    color: #f3c8ff;
  }

  .nav-mobile-foot {
    display: grid;
    gap: 18px;
    margin-top: auto;
    padding-top: 36px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity .5s ease, transform .7s var(--ease-out);
  }

  .nav-mobile-foot .btn {
    width: 100%;
  }

  .nav-mobile-login {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    height: 52px;
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 6px;
    color: #fff;
    font-weight: 600;
  }

  .nav-mobile-login svg,
  .nav-mobile-socials svg {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .nav-mobile-socials svg.is-filled {
    fill: currentColor;
    stroke: none;
  }

  .nav-mobile-socials {
    display: flex;
    justify-content: center;
    gap: 10px;
  }

  .nav-mobile-socials a {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    color: rgba(255, 255, 255, .8);
    background: rgba(255, 255, 255, .06);
    transition: background .3s ease, color .3s ease;
  }

  .nav-mobile-socials a:hover {
    color: #fff;
    background: var(--grad);
  }

  .site-header.is-open .nav-links a,
  .site-header.is-open .nav-mobile-foot {
    opacity: 1;
    transform: none;
    transition-delay: calc(var(--i, 7) * 55ms + 260ms);
  }

  .site-header.is-open .nav-mobile-foot {
    transition-delay: 680ms;
  }

  .site-header.is-open .nav-cta {
    opacity: 0;
    pointer-events: none;
  }
}

@media (max-width: 760px) {
  .site-header {
    padding-top: 10px;
  }

  .site-header.is-scrolled {
    padding-top: 8px;
  }

  .brand-logo,
  .site-header.is-scrolled .brand-logo {
    width: 108px;
  }

  .nav-cta {
    height: 44px;
    padding-left: 16px;
    gap: 10px;
    font-size: 14px;
  }

  .nav-cta-icon,
  .site-header.is-scrolled .nav-cta-icon {
    width: 32px;
    height: 32px;
  }

  .site-header.is-scrolled .nav-cta {
    height: 44px;
  }

  .nav-panel {
    padding-top: 96px;
  }

  .registration-nav {
    height: 62px;
    padding-left: 18px;
  }

  .registration-nav .brand-logo {
    width: 104px;
  }
}

@media (max-width: 340px) {
  .nav-cta-text {
    display: none;
  }

  .nav-cta {
    padding: 0 6px;
  }
}


/* ---------- Hero ---------- */
.hero,
.page-hero {
  position: relative;
  color: #fff;
  background: var(--night);
  overflow: hidden;
  isolation: isolate;
}

.hero {
  min-height: max(760px, 100svh);
  display: flex;
  align-items: center;
  padding: 170px 0 150px;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
}

.hero-bg > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .28;
  filter: saturate(1.2) blur(2px);
  transform: scale(1.08);
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 70% at 15% 40%, rgba(8, 6, 25, .92), transparent 70%),
    linear-gradient(180deg, rgba(8, 6, 25, .55) 0%, rgba(8, 6, 25, .2) 40%, var(--night) 100%);
}

.hero-grid {
  position: absolute;
  inset: 0;
  z-index: 1;
  background-image:
    linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 70% 60% at 60% 40%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 60% 40%, #000 20%, transparent 75%);
  animation: gridDrift 24s linear infinite;
}

@keyframes gridDrift {
  to { background-position: 64px 64px; }
}

.hero-aurora {
  position: absolute;
  z-index: 1;
  border-radius: 50%;
  filter: blur(90px);
  opacity: .55;
  mix-blend-mode: screen;
}

.hero-aurora-a {
  width: 560px;
  height: 560px;
  top: -140px;
  right: -80px;
  background: #2563eb;
  animation: auroraA 16s var(--ease-in-out) infinite alternate;
}

.hero-aurora-b {
  width: 460px;
  height: 460px;
  bottom: -160px;
  left: 30%;
  background: #e0368f;
  opacity: .35;
  animation: auroraB 19s var(--ease-in-out) infinite alternate;
}

@keyframes auroraA {
  to { transform: translate(-120px, 90px) scale(1.15); }
}

@keyframes auroraB {
  to { transform: translate(140px, -60px) scale(.9); }
}

.hero-particles {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.hero-particles span {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 12px rgba(238, 120, 255, .9);
  opacity: 0;
  animation: particle var(--duration) ease-in-out var(--delay) infinite;
}

@keyframes particle {
  0%, 100% { opacity: 0; transform: translate(0, 0); }
  40%, 60% { opacity: .7; }
  50% { transform: translate(var(--move-x), var(--move-y)); }
}

.hero-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  align-items: center;
  gap: 64px;
}

.hero h1 {
  margin: 22px 0 28px;
  font-size: clamp(56px, 8.4vw, 118px);
  font-weight: 700;
  line-height: .95;
  letter-spacing: -.045em;
}

.line {
  display: block;
  overflow: hidden;
  padding-bottom: .06em;
  margin-bottom: -.06em;
}

.word {
  display: inline-block;
}

.hero-lead {
  max-width: 560px;
  color: rgba(255, 255, 255, .86);
  font-size: 18px;
  line-height: 1.7;
}

.hero-sub {
  max-width: 540px;
  margin-top: 14px;
  color: var(--on-dark-muted);
  font-size: 15.5px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  margin-top: 38px;
}

.hero-or {
  color: rgba(255, 255, 255, .45);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.hero-visual {
  position: relative;
  aspect-ratio: 1 / .92;
  perspective: 1200px;
}

.hero-frame {
  position: absolute;
  inset: 7% 0 7% 6%;
  border-radius: 12px;
  padding: 10px;
  background: linear-gradient(140deg, rgba(255, 255, 255, .22), rgba(255, 255, 255, .03));
  box-shadow: 0 40px 100px rgba(0, 0, 0, .5), 0 0 0 1px rgba(255, 255, 255, .08);
  overflow: hidden;
  transition: transform .9s var(--ease-out);
}

.hero-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
}

.hero-frame::before {
  content: "";
  position: absolute;
  inset: -2px;
  z-index: -1;
  border-radius: inherit;
  background: conic-gradient(from var(--angle, 0deg), transparent 0 70%, #1e9bf0 76%, #7a32e8 82%, #ee3a8f 88%, transparent 96%);
  animation: borderSpin 6s linear infinite;
}

@property --angle {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}

@keyframes borderSpin {
  to { --angle: 360deg; }
}

.hero-frame-shine {
  position: absolute;
  inset: 10px;
  border-radius: 12px;
  background: linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, .16) 50%, transparent 65%);
  background-size: 250% 100%;
  animation: shine 7s ease-in-out infinite;
  pointer-events: none;
}

@keyframes shine {
  0%, 60% { background-position: 150% 0; }
  100% { background-position: -100% 0; }
}

.floating-card {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 20px 14px 14px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 10px;
  background: rgba(22, 8, 36, .62);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .35);
  transition: transform .9s var(--ease-out);
}

.floating-card > div {
  display: grid;
  line-height: 1.2;
}

.floating-card strong {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -.03em;
}

.floating-card span:not(.floating-icon) {
  color: var(--on-dark-muted);
  font-size: 13px;
}

.floating-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 8px;
  background: var(--grad);
  box-shadow: 0 10px 24px rgba(200, 50, 200, .4);
}

.floating-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: #fff;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.floating-card-a {
  top: 0;
  left: -4%;
  animation: floatY 6s ease-in-out infinite;
}

.floating-card-b {
  right: -3%;
  bottom: 0;
  animation: floatY 7s ease-in-out -2s infinite;
}

@keyframes floatY {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -12px; }
}

.scroll-cue {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: 104px;
  width: 26px;
  height: 42px;
  margin-left: -13px;
  border: 1.5px solid rgba(255, 255, 255, .35);
  border-radius: 6px;
}

.scroll-cue span {
  position: absolute;
  top: 8px;
  left: 50%;
  width: 3px;
  height: 8px;
  margin-left: -1.5px;
  border-radius: 3px;
  background: #fff;
  animation: scrollCue 1.8s var(--ease-in-out) infinite;
}

@keyframes scrollCue {
  0% { opacity: 0; transform: translateY(0); }
  30% { opacity: 1; }
  100% { opacity: 0; transform: translateY(14px); }
}

/* Hero entrance (only when JS is running) */
.js .hero-anim {
  opacity: 0;
  transform: translateY(24px);
  filter: blur(6px);
}

.js .line .word {
  transform: translateY(110%);
}

.js.is-loaded .hero-anim {
  opacity: 1;
  transform: none;
  filter: none;
  transition: opacity 1s var(--ease-out), transform 1.1s var(--ease-out), filter 1s var(--ease-out);
  transition-delay: calc(var(--d, 0) * 110ms + 150ms);
}

.js.is-loaded .line .word {
  transform: none;
  transition: transform 1.2s var(--ease-out);
  transition-delay: calc(var(--d, 0) * 110ms + 150ms);
}

/* ---------- Highlights ---------- */
.highlights {
  position: relative;
  z-index: 5;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: -88px;
}

.highlight-card {
  position: relative;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, .96);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(10px);
  overflow: hidden;
  transition: transform .6s var(--ease-out), box-shadow .6s var(--ease-out);
}

.highlight-card:hover {
  transform: translateY(-6px);
}

.highlight-card h3 {
  margin: 22px 0 8px;
  font-size: 22px;
}

.highlight-card p {
  color: var(--muted);
  font-size: 15px;
}

.highlight-num {
  position: absolute;
  top: 22px;
  right: 26px;
  color: transparent;
  font-family: var(--font-display);
  font-size: 54px;
  font-weight: 700;
  line-height: 1;
  -webkit-text-stroke: 1px rgba(164, 47, 240, .22);
}

/* ---------- Icons ---------- */
.card-icon {
  position: relative;
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 8px;
  background: var(--grad);
  box-shadow: 0 12px 28px rgba(190, 50, 210, .3), inset 0 1px 0 rgba(255, 255, 255, .3);
  transition: transform .6s var(--ease-spring);
}

.card-icon svg {
  width: 25px;
  height: 25px;
  fill: none;
  stroke: #fff;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

article:hover .card-icon {
  transform: rotate(-8deg) scale(1.08);
}

/* ---------- Spotlight hover ---------- */
[data-spotlight] {
  position: relative;
  isolation: isolate;
}

[data-spotlight]::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(196, 60, 230, .11), transparent 60%);
  opacity: 0;
  transition: opacity .4s ease;
  pointer-events: none;
}

[data-spotlight]:hover::before {
  opacity: 1;
}

/* ---------- Ticker ---------- */
.ticker {
  margin-top: 72px;
  padding: 22px 0;
  border-block: 1px solid var(--line);
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}

.ticker-track {
  display: flex;
  align-items: center;
  gap: 34px;
  width: max-content;
  animation: marquee 40s linear infinite;
}

.ticker:hover .ticker-track {
  animation-play-state: paused;
}

.ticker span {
  color: var(--ink-2);
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -.02em;
  white-space: nowrap;
}

.ticker i {
  width: 10px;
  height: 10px;
  flex: none;
  border-radius: 3px;
  background: var(--grad);
  transform: rotate(45deg);
}

@keyframes marquee {
  to { transform: translateX(-50%); }
}

/* ---------- Sections ---------- */
.section {
  position: relative;
  padding: 120px 0;
}

.section.container {
  padding-inline: 0;
}

.section-soft {
  background: var(--soft);
}

.section-soft::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(109, 24, 168, .08) 1px, transparent 1px);
  background-size: 22px 22px;
  mask-image: linear-gradient(180deg, #000, transparent 40%, transparent 60%, #000);
  -webkit-mask-image: linear-gradient(180deg, #000, transparent 40%, transparent 60%, #000);
  pointer-events: none;
}

.section-soft > .container {
  position: relative;
}

.section-dark {
  color: #fff;
  background: var(--night);
  overflow: hidden;
  isolation: isolate;
}

.section-dark::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background:
    radial-gradient(ellipse 50% 60% at 85% 0%, rgba(138, 37, 224, .32), transparent 70%),
    radial-gradient(ellipse 40% 50% at 0% 100%, rgba(224, 54, 143, .2), transparent 70%);
}

.section-heading {
  max-width: 720px;
  margin: 0 auto 60px;
  text-align: center;
}

.section-heading h2 {
  margin-top: 16px;
  font-size: clamp(38px, 5vw, 62px);
  font-weight: 700;
  letter-spacing: -.035em;
}

.section-heading .eyebrow {
  justify-content: center;
}

.section-intro {
  max-width: 620px;
  margin: 20px auto 0;
  color: var(--muted);
  font-size: 17px;
}

.section-heading-row {
  display: flex;
  align-items: end;
  justify-content: space-between;
  max-width: none;
  text-align: left;
}

.section-heading-row .eyebrow {
  justify-content: flex-start;
}

/* ---------- Reveal system ---------- */
.js [data-reveal],
.js [data-stagger] > * {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity .9s var(--ease-out), transform 1s var(--ease-out);
  transition-delay: var(--stagger, 0ms);
}

.js [data-reveal="scale"] {
  transform: scale(.94);
}

.js [data-reveal="clip"] {
  opacity: 1;
  transform: none;
  clip-path: inset(18% 18% 18% 18% round 40px);
  transition: clip-path 1.4s var(--ease-out);
}

.js [data-reveal="clip"] img {
  transform: scale(1.25);
  transition: transform 1.6s var(--ease-out);
}

.js [data-reveal].is-visible,
.js [data-stagger].is-visible > * {
  opacity: 1;
  transform: none;
}

.js [data-reveal="clip"].is-visible {
  clip-path: inset(0 0 0 0 round var(--radius-lg));
}

.js [data-reveal="clip"].is-visible img {
  transform: none;
}

/* Split headings */
.split-word {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
  padding-bottom: .08em;
  margin-bottom: -.08em;
}

.split-inner {
  display: inline-block;
}

.js [data-split] .split-inner {
  transform: translateY(105%);
  transition: transform 1s var(--ease-out);
  transition-delay: calc(var(--wi, 0) * 70ms);
}

.js [data-split].is-visible .split-inner {
  transform: none;
}

/* ---------- About ---------- */
.about {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 80px;
}

.about-media {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 1 / 1.02;
  box-shadow: var(--shadow-lg);
}

.about-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about-badge {
  position: absolute;
  left: 22px;
  bottom: 22px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 20px;
  border-radius: 10px;
  background: rgba(255, 255, 255, .9);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--shadow-md);
}

.about-badge strong {
  font-family: var(--font-display);
  font-size: 34px;
  line-height: 1;
  letter-spacing: -.03em;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.about-badge span {
  max-width: 130px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 550;
  line-height: 1.35;
}

.about-copy h2 {
  margin: 16px 0 26px;
  font-size: clamp(38px, 4.6vw, 58px);
  letter-spacing: -.035em;
}

.about-copy p {
  color: var(--muted);
  font-size: 17px;
}

.about-copy p + p {
  margin-top: 16px;
}

.about-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 30px 0 0;
  padding: 0;
  list-style: none;
}

.about-tags li {
  padding: 8px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 600;
  transition: border-color .3s ease, background .3s ease, transform .4s var(--ease-out);
}

.about-tags li:hover {
  border-color: transparent;
  background: var(--grad-soft);
  transform: translateY(-2px);
}

/* ---------- Story / Mission ---------- */
.story-grid,
.mv-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.mv-grid {
  margin-top: 24px;
}

.story-card,
.mv-card {
  position: relative;
  padding: 40px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--paper);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform .6s var(--ease-out), box-shadow .6s var(--ease-out);
}

.story-card:hover,
.mv-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.story-step {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 6px;
  color: var(--violet-deep);
  background: var(--grad-soft);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.story-card h3,
.mv-card h3 {
  margin: 20px 0 14px;
  font-size: 30px;
}

.story-card p,
.mv-card p {
  color: var(--muted);
}

.mv-card p + p {
  margin-top: 14px;
}

.mv-card .eyebrow {
  margin-top: 26px;
}

.mv-card h3 {
  margin-top: 10px;
}

.story-card-featured {
  color: #fff;
  border-color: transparent;
  background:
    radial-gradient(ellipse 80% 80% at 100% 0%, rgba(238, 58, 143, .45), transparent 60%),
    linear-gradient(150deg, #23307f 0%, #2a0f5c 50%, #150a33 100%);
  box-shadow: var(--shadow-lg);
}

.story-card-featured p {
  position: relative;
  color: rgba(255, 255, 255, .8);
}

.story-card-featured .story-step {
  color: #fff;
  background: rgba(255, 255, 255, .12);
}

.story-card-featured[data-spotlight]::before {
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, .1), transparent 60%);
}

.story-big {
  position: absolute;
  right: -10px;
  bottom: -40px;
  color: transparent;
  font-family: var(--font-display);
  font-size: 180px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -.06em;
  -webkit-text-stroke: 1px rgba(255, 255, 255, .12);
  pointer-events: none;
}

/* ---------- Values ---------- */
.values-grid,
.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.values-grid article,
.news-grid article {
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  transition: transform .6s var(--ease-out), box-shadow .6s var(--ease-out), border-color .4s ease;
}

.values-grid article:hover,
.news-grid article:hover {
  transform: translateY(-6px);
  border-color: rgba(164, 47, 240, .22);
  box-shadow: var(--shadow-md);
}

.values-grid h3,
.news-grid h3 {
  margin: 24px 0 10px;
  font-size: 21px;
}

.values-grid p,
.news-grid p {
  color: var(--muted);
  font-size: 15px;
}

.news-grid article {
  display: flex;
  flex-direction: column;
}

.news-tag {
  align-self: flex-start;
  margin-top: 22px;
  padding: 4px 11px;
  border-radius: 6px;
  color: var(--violet-deep);
  background: var(--grad-soft);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.news-grid h3 {
  margin-top: 12px;
}

/* ---------- Objectives ---------- */
.objectives {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: obj;
}

.objectives li {
  position: relative;
  display: flex;
  gap: 18px;
  align-items: flex-start;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink-2);
  font-weight: 550;
  line-height: 1.5;
  counter-increment: obj;
  transition: transform .5s var(--ease-out), box-shadow .5s var(--ease-out), border-color .4s ease;
}

.objectives li::before {
  content: counter(obj, decimal-leading-zero);
  flex: none;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  color: #fff;
  background: var(--grad);
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
}

.objectives li:hover {
  transform: translateY(-4px);
  border-color: rgba(164, 47, 240, .2);
  box-shadow: var(--shadow-md);
}

/* ---------- Stats ---------- */
.stats-band {
  position: relative;
  padding: 120px 0;
  color: #fff;
  background: var(--night);
  overflow: hidden;
  isolation: isolate;
}

.stats-band::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -30%;
  background:
    radial-gradient(circle at 20% 30%, rgba(30, 155, 240, .32), transparent 35%),
    radial-gradient(circle at 80% 70%, rgba(238, 58, 143, .25), transparent 35%);
  animation: slowSpin 40s linear infinite;
}

@keyframes slowSpin {
  to { transform: rotate(360deg); }
}

.stats-inner {
  display: grid;
  grid-template-columns: .8fr 1.2fr;
  gap: 70px;
  align-items: center;
}

.stats-intro h2 {
  margin: 16px 0 18px;
  font-size: clamp(40px, 5vw, 64px);
  letter-spacing: -.035em;
}

.stats-intro p {
  max-width: 360px;
  color: var(--on-dark-muted);
  font-size: 17px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  border: 1px solid var(--line-dark);
  border-radius: var(--radius-lg);
  background: var(--line-dark);
  overflow: hidden;
}

.stats-grid article {
  display: grid;
  gap: 10px;
  align-content: start;
  padding: 34px 28px;
  background: rgba(16, 6, 28, .92);
  transition: background .4s ease;
}

.stats-grid article:hover {
  background: rgba(36, 14, 58, .95);
}

.stats-grid strong {
  font-family: var(--font-display);
  font-size: clamp(40px, 4vw, 54px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -.04em;
  background: linear-gradient(180deg, #fff 30%, #e3b5ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-variant-numeric: tabular-nums;
}

.stats-grid span {
  color: var(--on-dark-muted);
  font-size: 14px;
  line-height: 1.45;
}

/* ---------- Why join ---------- */
.join-layout {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 24px;
  align-items: stretch;
}

.join-core {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 10px;
  min-height: 100%;
  padding: 36px;
  border-radius: var(--radius-lg);
  color: #fff;
  background: linear-gradient(160deg, #1d2a7a, #2a0b55 55%, #0e0726);
  overflow: hidden;
  isolation: isolate;
  box-shadow: var(--shadow-lg);
}

.join-core-glow {
  position: absolute;
  z-index: -1;
  inset: -40%;
  background: conic-gradient(from 0deg, transparent, rgba(30, 155, 240, .5), transparent 30%, rgba(238, 58, 143, .45), transparent 60%);
  animation: slowSpin 14s linear infinite;
  filter: blur(40px);
}

.join-core img {
  width: 150px;
  margin-bottom: auto;
}

.join-core strong {
  margin-top: 60px;
  font-family: var(--font-display);
  font-size: 32px;
  line-height: 1.1;
  letter-spacing: -.03em;
}

.join-core > span {
  margin-bottom: 18px;
  color: var(--on-dark-muted);
}

.join-benefits {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.join-benefits article {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  transition: transform .5s var(--ease-out), box-shadow .5s var(--ease-out), border-color .4s ease;
}

.join-benefits article:hover {
  transform: translateY(-5px);
  border-color: rgba(164, 47, 240, .2);
  box-shadow: var(--shadow-md);
}

.join-benefits span {
  color: transparent;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
}

.join-benefits h3 {
  margin: 14px 0 8px;
  font-size: 20px;
}

.join-benefits p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

/* ---------- Trainings carousel ---------- */
.carousel-controls {
  display: flex;
  gap: 10px;
}

.carousel-btn {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 50%;
  background: rgba(255, 255, 255, .05);
  transition: background .3s ease, border-color .3s ease, transform .4s var(--ease-out), opacity .3s ease;
}

.carousel-btn svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: #fff;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.carousel-btn:hover:not(:disabled) {
  border-color: transparent;
  background: var(--grad);
  transform: scale(1.06);
}

.carousel-btn:disabled {
  opacity: .35;
  cursor: default;
}

.training-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(300px, 340px);
  gap: 20px;
  padding: 10px max(var(--gutter), calc((100% - var(--container)) / 2)) 30px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: max(var(--gutter), calc((100% - var(--container)) / 2));
  scrollbar-width: none;
  overscroll-behavior-x: contain;
  cursor: grab;
}

.training-track::-webkit-scrollbar {
  display: none;
}

.training-track.is-dragging {
  cursor: grabbing;
  scroll-snap-type: none;
  user-select: none;
}

.training-track.is-dragging article {
  pointer-events: none;
}

.training-track article {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 330px;
  padding: 30px;
  border: 1px solid var(--line-dark);
  border-radius: var(--radius-lg);
  background: linear-gradient(170deg, rgba(255, 255, 255, .07), rgba(255, 255, 255, .02));
  scroll-snap-align: start;
  overflow: hidden;
  transition: transform .6s var(--ease-out), border-color .4s ease, background .4s ease;
}

.training-track article[data-spotlight]::before {
  background: radial-gradient(380px circle at var(--mx, 50%) var(--my, 50%), rgba(210, 80, 255, .18), transparent 60%);
}

.training-track article:hover {
  transform: translateY(-6px);
  border-color: rgba(220, 120, 255, .35);
}

.training-track small {
  margin-top: 26px;
  color: #f0b9ff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.training-track h3 {
  margin: 8px 0 12px;
  font-size: 24px;
}

.training-track p {
  color: var(--on-dark-muted);
  font-size: 15px;
}

.training-num {
  position: absolute;
  top: 22px;
  right: 26px;
  color: transparent;
  font-family: var(--font-display);
  font-size: 58px;
  font-weight: 700;
  line-height: 1;
  -webkit-text-stroke: 1px rgba(255, 255, 255, .14);
}

.carousel-progress {
  position: relative;
  height: 3px;
  margin-top: 16px;
  border-radius: 3px;
  background: rgba(255, 255, 255, .1);
  overflow: hidden;
}

.carousel-progress span {
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--thumb, 30%);
  border-radius: inherit;
  background: var(--grad);
  transform: translateX(var(--pos, 0));
  transition: transform .2s linear;
}

/* ---------- Timeline ---------- */
.timeline {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 90px;
  row-gap: 26px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  margin-left: -1px;
  background: var(--line-strong);
}

.timeline::after {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: 2px;
  height: calc(var(--progress, 0) * 100%);
  margin-left: -1px;
  background: var(--grad);
  box-shadow: 0 0 16px rgba(200, 60, 220, .6);
}

.timeline-item {
  position: relative;
}

.timeline-item:nth-child(even) {
  margin-top: 90px;
}

.timeline-item article {
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow-sm);
  transition: transform .6s var(--ease-out), box-shadow .6s var(--ease-out);
}

.timeline-item article:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.timeline-dot {
  position: absolute;
  top: 34px;
  z-index: 1;
  width: 16px;
  height: 16px;
  border: 3px solid var(--paper);
  border-radius: 50%;
  background: var(--grad);
  box-shadow: 0 0 0 4px rgba(164, 47, 240, .15);
}

.timeline-item:nth-child(odd) .timeline-dot { right: -53px; }
.timeline-item:nth-child(even) .timeline-dot { left: -53px; }

.timeline-tag {
  display: inline-block;
  padding: 4px 11px;
  border-radius: 6px;
  color: var(--violet-deep);
  background: var(--grad-soft);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.timeline-item h3 {
  margin: 14px 0 10px;
  font-size: 22px;
}

.timeline-item p {
  color: var(--muted);
  font-size: 15px;
}

.js .timeline-item:nth-child(odd)[data-reveal] { transform: translateX(-40px); }
.js .timeline-item:nth-child(even)[data-reveal] { transform: translateX(40px); }
.js .timeline-item[data-reveal].is-visible { transform: none; }

/* ---------- Projects ---------- */
.filter-row {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px;
  width: fit-content;
  margin: -24px auto 44px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--paper);
  box-shadow: var(--shadow-sm);
}

.filter-row button {
  position: relative;
  z-index: 1;
  padding: 10px 20px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 650;
  transition: color .35s ease;
}

.filter-row button:hover {
  color: var(--ink);
}

.filter-row button.is-active {
  color: #fff;
}

.filter-indicator {
  position: absolute;
  z-index: 0;
  top: 0;
  left: 0;
  width: var(--w, 0);
  height: var(--h, 0);
  border-radius: 6px;
  background: var(--grad);
  box-shadow: 0 8px 20px rgba(190, 50, 210, .35);
  transform: translate(var(--x, 0), var(--y, 0));
  transition: transform .55s var(--ease-out), width .55s var(--ease-out);
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.project-grid article {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--paper);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform .6s var(--ease-out), box-shadow .6s var(--ease-out), opacity .4s ease;
}

.project-grid article:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.project-grid article.is-hidden {
  display: none;
}

.project-media {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

.project-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(22, 8, 36, .35));
  transition: opacity .5s ease;
}

.project-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.1s var(--ease-out);
}

.project-grid article:hover .project-media img {
  transform: scale(1.07);
}

.project-body {
  padding: 24px 26px 28px;
}

.project-body span {
  color: var(--violet-deep);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.project-body h3 {
  margin: 8px 0 10px;
  font-size: 22px;
}

.project-body p {
  color: var(--muted);
  font-size: 14.5px;
}

::view-transition-group(*) {
  animation-duration: .5s;
  animation-timing-function: cubic-bezier(.16, 1, .3, 1);
}

/* ---------- Team ---------- */
.team-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}

.member {
  position: relative;
  border-radius: var(--radius-lg);
  background: var(--paper);
  border: 1px solid var(--line);
  overflow: hidden;
  transition: transform .6s var(--ease-out), box-shadow .6s var(--ease-out);
}

.member:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.member-lead {
  grid-column: span 2;
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.member-photo {
  position: relative;
  aspect-ratio: 4 / 4.4;
  background: var(--soft-2);
  overflow: hidden;
}

.member-lead .member-photo {
  aspect-ratio: auto;
  min-height: 100%;
}

.member-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 18%;
  transition: transform 1.1s var(--ease-out), filter .6s ease;
}

.member:hover .member-photo img {
  transform: scale(1.06);
}

.member-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(22, 8, 36, .25));
}

.member-info {
  padding: 22px 22px 26px;
}

.member-lead .member-info {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 30px;
}

.member-info span {
  display: inline-block;
  color: var(--violet-deep);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .1em;
  line-height: 1.4;
  text-transform: uppercase;
}

.member-info h3 {
  margin: 8px 0 8px;
  font-size: 20px;
}

.member-lead .member-info h3 {
  font-size: 26px;
}

.member-info p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

/* ---------- Departments ---------- */
.department-command {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 24px;
}

.command-screen {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 460px;
  padding: 40px;
  border: 1px solid var(--line-dark);
  border-radius: var(--radius-lg);
  background: linear-gradient(160deg, rgba(60, 18, 100, .7), rgba(20, 7, 34, .9));
  overflow: hidden;
  isolation: isolate;
}

.command-screen > img {
  width: 140px;
  opacity: .9;
}

.command-label {
  margin-top: auto;
  color: #f0b9ff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.command-content h3 {
  margin: 12px 0 14px;
  font-size: clamp(34px, 4vw, 52px);
  letter-spacing: -.035em;
}

.command-content p {
  max-width: 440px;
  color: var(--on-dark-muted);
  font-size: 17px;
}

.command-content.is-switching {
  animation: commandIn .7s var(--ease-out);
}

@keyframes commandIn {
  from { opacity: 0; transform: translateY(16px); filter: blur(6px); }
  to { opacity: 1; transform: none; filter: none; }
}

.command-metrics {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 30px;
  padding-top: 22px;
  border-top: 1px solid var(--line-dark);
}

.command-metrics span {
  color: var(--on-dark-muted);
  font-size: 14px;
}

.command-metrics strong {
  font-family: var(--font-display);
  font-size: 32px;
  font-variant-numeric: tabular-nums;
}

.command-radar {
  position: absolute;
  z-index: -1;
  top: -120px;
  right: -120px;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, rgba(238, 58, 143, .35), transparent 25%);
  animation: slowSpin 6s linear infinite;
  mask-image: radial-gradient(circle, #000 0 69%, transparent 70%);
  -webkit-mask-image: radial-gradient(circle, #000 0 69%, transparent 70%);
}

.command-radar span {
  position: absolute;
  inset: calc(var(--i, 0) * 50px);
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 50%;
}

.command-radar span:nth-child(1) { --i: 0; }
.command-radar span:nth-child(2) { --i: 1; }
.command-radar span:nth-child(3) { --i: 2; }

.department-console {
  display: grid;
  gap: 12px;
}

.department-node {
  position: relative;
  display: grid;
  grid-template-columns: 48px 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 18px 22px 18px 18px;
  border: 1px solid var(--line-dark);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .03);
  color: #fff;
  text-align: left;
  overflow: hidden;
  transition: background .4s ease, border-color .4s ease, transform .5s var(--ease-out);
}

.department-node::after {
  content: "";
  position: absolute;
  left: 0;
  top: 20%;
  bottom: 20%;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--grad);
  transform: scaleY(0);
  transition: transform .5s var(--ease-out);
}

.department-node:hover {
  background: rgba(255, 255, 255, .06);
  transform: translateX(4px);
}

.department-node.is-active {
  border-color: rgba(220, 120, 255, .35);
  background: linear-gradient(90deg, rgba(164, 47, 240, .22), rgba(238, 58, 143, .08));
}

.department-node.is-active::after {
  transform: scaleY(1);
}

.department-node span {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 8px;
  background: rgba(255, 255, 255, .07);
  font-family: var(--font-display);
  font-weight: 700;
  transition: background .4s ease;
}

.department-node.is-active span {
  background: var(--grad);
}

.department-node strong {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 600;
}

.department-node em {
  color: var(--on-dark-muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
}

/* ---------- Gallery (home) ---------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 230px;
  gap: 18px;
}

.gallery-grid a {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 24px;
  border-radius: var(--radius-lg);
  color: #fff;
  overflow: hidden;
  isolation: isolate;
  background: var(--night-2);
}

.gallery-grid a:nth-child(1) { grid-column: span 2; grid-row: span 2; }
.gallery-grid a:nth-child(4),
.gallery-grid a:nth-child(5),
.gallery-grid a:nth-child(6) { grid-column: span 2; }

.gallery-grid img {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.2s var(--ease-out);
}

.gallery-grid a::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(8, 6, 25, 0) 30%, rgba(8, 6, 25, .85));
  transition: background .5s ease;
}

.gallery-grid a:hover img {
  transform: scale(1.08);
}

.gallery-grid a:hover::before {
  background: linear-gradient(180deg, rgba(110, 24, 168, .25) 0%, rgba(8, 6, 25, .9));
}

.gallery-grid span {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -.02em;
}

.gallery-grid a:nth-child(1) span {
  font-size: 38px;
}

.gallery-grid small {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  color: rgba(255, 255, 255, .75);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.gallery-grid small::after {
  content: "→";
  transition: transform .4s var(--ease-out);
}

.gallery-grid a:hover small::after {
  transform: translateX(6px);
}

/* ---------- Partners ---------- */
.partners-section {
  padding-bottom: 100px;
}

.partner-marquee {
  position: relative;
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}

.partner-track {
  display: flex;
  width: max-content;
  animation: marquee 32s linear infinite;
}

.partner-marquee:hover .partner-track {
  animation-play-state: paused;
}

.partner-set {
  display: flex;
  gap: 20px;
  padding-right: 20px;
}

.partner-logo {
  display: grid;
  place-items: center;
  width: 230px;
  height: 130px;
  margin: 0;
  padding: 22px 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  transition: transform .5s var(--ease-out), box-shadow .5s var(--ease-out);
}

.partner-logo img {
  max-width: 100%;
  max-height: 80px;
  object-fit: contain;
  filter: grayscale(1);
  opacity: .7;
  transition: filter .5s ease, opacity .5s ease;
}

.partner-logo:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.partner-logo:hover img {
  filter: none;
  opacity: 1;
}

/* ---------- CTA ---------- */
.cta {
  padding: 40px 0 120px;
}

.cta-card {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  padding: 72px;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(130deg, #1f3aa6 0%, #4a1696 45%, #1a0838 100%);
  overflow: hidden;
  isolation: isolate;
  box-shadow: var(--shadow-lg);
}

.cta-glow {
  position: absolute;
  z-index: -1;
  width: 600px;
  height: 600px;
  top: -300px;
  right: -100px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(238, 58, 143, .55), transparent 65%);
  animation: auroraA 12s var(--ease-in-out) infinite alternate;
}

.cta-copy {
  max-width: 620px;
}

.cta-card h2 {
  margin: 16px 0 14px;
  font-size: clamp(36px, 4.6vw, 58px);
  letter-spacing: -.035em;
}

.cta-card p {
  color: rgba(255, 255, 255, .78);
  font-size: 17px;
}

.cta-word {
  position: absolute;
  z-index: -1;
  right: 30px;
  bottom: -50px;
  color: transparent;
  font-family: var(--font-display);
  font-size: 220px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -.06em;
  -webkit-text-stroke: 1px rgba(255, 255, 255, .1);
  pointer-events: none;
}

/* ---------- Footer ---------- */
.site-footer {
  position: relative;
  padding: 90px 0 0;
  color: var(--on-dark-muted);
  background: var(--night);
  overflow: hidden;
}

.site-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: min(900px, 90%);
  height: 1px;
  transform: translateX(-50%);
  background: linear-gradient(90deg, transparent, rgba(220, 120, 255, .6), transparent);
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 50px;
  padding-bottom: 60px;
}

.footer-brand img {
  width: 160px;
  margin-bottom: 20px;
}

.footer-brand p {
  max-width: 340px;
  font-size: 15px;
}

.footer-brand p + p {
  margin-top: 8px;
}

.footer-col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.footer-col h3 {
  margin-bottom: 8px;
  color: #fff;
  font-size: 16px;
  letter-spacing: 0;
}

.footer-col a,
.footer-col p {
  position: relative;
  font-size: 15px;
  transition: color .3s ease;
}

.footer-col a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .45s var(--ease-out);
}

.footer-col a:hover {
  color: #fff;
}

.footer-col a:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 26px 0 34px;
  border-top: 1px solid var(--line-dark);
  font-size: 14px;
}

.footer-top {
  color: #fff;
  font-weight: 600;
}

/* ---------- Back to top ---------- */
.to-top {
  position: fixed;
  z-index: 90;
  right: 24px;
  bottom: 24px;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(18, 6, 30, .85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 14px 34px rgba(18, 6, 30, .35);
  opacity: 0;
  transform: translateY(20px) scale(.8);
  pointer-events: none;
  transition: opacity .4s ease, transform .5s var(--ease-spring);
}

.to-top.is-visible {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.to-top:hover .to-top-arrow {
  transform: translateY(-3px);
}

.to-top-ring {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.to-top-ring circle {
  fill: none;
  stroke: var(--magenta);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-dasharray: 138.2;
  stroke-dashoffset: calc(138.2 - 138.2 * var(--p, 0));
}

.to-top-arrow {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: #fff;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform .4s var(--ease-out);
}

/* ==========================================================================
   Gallery page
   ========================================================================== */
.page-hero {
  padding: 200px 0 110px;
}

.page-hero-inner {
  position: relative;
  z-index: 2;
}

.breadcrumb {
  display: flex;
  gap: 10px;
  color: var(--on-dark-muted);
  font-size: 14px;
  font-weight: 550;
}

.breadcrumb a:hover {
  color: #fff;
}

.page-hero h1 {
  margin: 18px 0 18px;
  font-size: clamp(56px, 9vw, 120px);
  letter-spacing: -.045em;
  line-height: .95;
}

.page-hero p {
  max-width: 560px;
  color: rgba(255, 255, 255, .8);
  font-size: 18px;
}

.gallery-browser {
  padding: 0 0 120px;
}

.album-tabs {
  position: relative;
  z-index: 5;
  display: flex;
  gap: 4px;
  width: fit-content;
  max-width: 100%;
  margin: -32px auto 60px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--paper);
  box-shadow: var(--shadow-md);
  overflow-x: auto;
  scrollbar-width: none;
}

.album-tabs::-webkit-scrollbar {
  display: none;
}

.album-tabs button {
  position: relative;
  z-index: 1;
  flex: none;
  padding: 12px 22px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 14.5px;
  font-weight: 650;
  transition: color .35s ease;
}

.album-tabs button:hover {
  color: var(--ink);
}

.album-tabs button.is-active {
  color: #fff;
}

.album-indicator {
  position: absolute;
  z-index: 0;
  top: 6px;
  left: 0;
  width: var(--w, 0);
  height: calc(100% - 12px);
  border-radius: 6px;
  background: var(--grad);
  box-shadow: 0 8px 20px rgba(190, 50, 210, .35);
  transform: translateX(var(--x, 0));
  transition: transform .55s var(--ease-out), width .55s var(--ease-out);
}

.gallery-showcase-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 50px;
}

.gallery-showcase-head h2 {
  margin-top: 14px;
  font-size: clamp(40px, 5vw, 64px);
  letter-spacing: -.035em;
}

.gallery-showcase-head p {
  max-width: 440px;
  color: var(--muted);
  font-size: 17px;
}

.gallery-showcase.is-switching .gallery-showcase-head,
.gallery-showcase.is-switching .gallery-photo-grid {
  animation: commandIn .7s var(--ease-out);
}

.media-section-title {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 22px;
}

.media-section-title span {
  padding: 5px 12px;
  border-radius: 6px;
  color: var(--violet-deep);
  background: var(--grad-soft);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.media-section-title strong {
  font-family: var(--font-display);
  font-size: 20px;
}

.media-section-title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.gallery-photo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 60px;
}

.gallery-photo {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3.2;
  padding: 0;
  border: 0;
  border-radius: var(--radius-lg);
  background: var(--night-2);
  overflow: hidden;
  text-align: left;
  isolation: isolate;
  animation: photoIn .8s var(--ease-out) both;
  animation-delay: calc(var(--i, 0) * 80ms);
}

@keyframes photoIn {
  from { opacity: 0; transform: translateY(24px) scale(.97); }
  to { opacity: 1; transform: none; }
}

.gallery-photo img {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.1s var(--ease-out);
}

.gallery-photo.is-contain {
  background: var(--soft);
  border: 1px solid var(--line);
}

.gallery-photo.is-contain img {
  inset: 14% 18% 34%;
  width: 64%;
  height: 52%;
  object-fit: contain;
}

.gallery-photo::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, transparent 35%, rgba(8, 6, 25, .88));
}

.gallery-photo:hover img {
  transform: scale(1.07);
}

.gallery-photo-info {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: grid;
  gap: 4px;
  padding: 22px;
  color: #fff;
}

.gallery-photo-info span {
  color: #f0b9ff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.gallery-photo-info strong {
  font-family: var(--font-display);
  font-size: 21px;
  letter-spacing: -.02em;
}

.gallery-photo-info em {
  display: -webkit-box;
  max-height: 0;
  color: rgba(255, 255, 255, .78);
  font-size: 14px;
  font-style: normal;
  line-height: 1.5;
  overflow: hidden;
  opacity: 0;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  transition: max-height .6s var(--ease-out), opacity .4s ease;
}

.gallery-photo:hover .gallery-photo-info em,
.gallery-photo:focus-visible .gallery-photo-info em {
  max-height: 3em;
  opacity: 1;
}

.gallery-play {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  place-items: center;
  width: 70px;
  height: 70px;
  margin: -50px 0 0 -35px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .16);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, .35);
  transition: transform .5s var(--ease-spring), background .3s ease;
}

.gallery-play::before {
  content: "";
  margin-left: 4px;
  border-style: solid;
  border-width: 10px 0 10px 16px;
  border-color: transparent transparent transparent #fff;
}

.gallery-play::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .5);
  animation: pulseRing 2.2s ease-out infinite;
}

.gallery-video:hover .gallery-play {
  transform: scale(1.12);
  background: var(--grad);
}

/* Lightbox */
.gallery-lightbox {
  position: fixed;
  z-index: 140;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 40px;
  background: rgba(8, 2, 14, .88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .45s ease, visibility 0s linear .45s;
}

.gallery-lightbox.is-open {
  opacity: 1;
  visibility: visible;
  transition: opacity .45s ease;
}

.lightbox-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(280px, .8fr);
  width: min(1180px, 100%);
  max-height: calc(100vh - 80px);
  border-radius: var(--radius-lg);
  background: var(--paper);
  overflow: hidden;
  box-shadow: 0 40px 120px rgba(0, 0, 0, .5);
  transform: translateY(30px) scale(.96);
  transition: transform .6s var(--ease-out);
}

.gallery-lightbox.is-open .lightbox-panel {
  transform: none;
}

.lightbox-image-wrap {
  display: block;
  min-height: 420px;
  padding: 0;
  border: 0;
  background: var(--night);
  overflow: hidden;
  cursor: zoom-in;
}

.lightbox-image-wrap img {
  width: 100%;
  height: 100%;
  max-height: calc(100vh - 80px);
  object-fit: cover;
  transition: transform .7s var(--ease-out), opacity .3s ease;
}

.lightbox-image-wrap img.is-changing {
  opacity: 0;
}

.gallery-lightbox.is-zoomed .lightbox-image-wrap {
  cursor: zoom-out;
}

.gallery-lightbox.is-zoomed .lightbox-image-wrap img {
  transform: scale(1.6);
}

.gallery-lightbox.is-contain .lightbox-image-wrap {
  background: var(--soft);
}

.gallery-lightbox.is-contain .lightbox-image-wrap img {
  object-fit: contain;
  padding: 50px;
}

.lightbox-info {
  display: flex;
  flex-direction: column;
  padding: 40px 36px;
}

.lightbox-info > span {
  color: var(--violet-deep);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.lightbox-info h3 {
  margin: 12px 0 14px;
  font-size: 30px;
}

.lightbox-info p {
  color: var(--muted);
}

.lightbox-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 30px;
}

.lightbox-count {
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.lightbox-close,
.lightbox-nav {
  position: absolute;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 50%;
  background: rgba(255, 255, 255, .08);
  transition: background .3s ease, transform .4s var(--ease-out);
}

.lightbox-close svg,
.lightbox-nav svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: #fff;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.lightbox-close:hover,
.lightbox-nav:hover {
  background: var(--grad);
  border-color: transparent;
}

.lightbox-close {
  top: 22px;
  right: 22px;
}

.lightbox-close:hover {
  transform: rotate(90deg);
}

.lightbox-nav {
  top: 50%;
  margin-top: -26px;
}

.lightbox-prev { left: 22px; }
.lightbox-next { right: 22px; }

body.lightbox-open {
  overflow: hidden;
}

/* ==========================================================================
   Registration & login pages
   ========================================================================== */
.registration-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: #fff;
  background: var(--night);
  isolation: isolate;
}

.registration-page::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(180deg, rgba(8, 6, 25, .7), var(--night)),
    url("../assets/images/web/background-purple.webp") center / cover no-repeat;
  opacity: .9;
}

.registration-page::after {
  content: "";
  position: fixed;
  z-index: -1;
  width: 620px;
  height: 620px;
  top: -200px;
  right: -160px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(37, 99, 235, .5), rgba(122, 50, 232, .25) 40%, transparent 65%);
  filter: blur(30px);
  animation: auroraA 14s var(--ease-in-out) infinite alternate;
  pointer-events: none;
}

.registration-page .site-header {
  position: relative;
  padding-top: 20px;
}

.registration-main {
  flex: 1;
  display: grid;
  place-items: center;
  padding: 50px var(--gutter) 80px;
}

.registration-card {
  position: relative;
  width: min(560px, 100%);
  padding: 48px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 12px;
  background: rgba(14, 12, 40, .72);
  backdrop-filter: blur(24px) saturate(1.3);
  -webkit-backdrop-filter: blur(24px) saturate(1.3);
  box-shadow: 0 40px 120px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255, 255, 255, .08);
  animation: cardIn .9s var(--ease-out) backwards;
}

.registration-card::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 15%;
  right: 15%;
  height: 1px;
  background: linear-gradient(90deg, transparent, #1e9bf0, #c56bff, #ee3a8f, transparent);
}

@keyframes cardIn {
  from { opacity: 0; transform: translateY(30px) scale(.98); }
  to { opacity: 1; transform: none; }
}

.registration-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #f3c8ff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .16em;
}

.registration-eyebrow::before {
  content: "";
  width: 22px;
  height: 2px;
  border-radius: 2px;
  background: var(--grad);
}

.registration-card h1 {
  margin: 16px 0 12px;
  font-size: clamp(32px, 5vw, 42px);
  letter-spacing: -.035em;
}

.registration-intro {
  color: var(--on-dark-muted);
  font-size: 15.5px;
}

.registration-form {
  display: grid;
  gap: 8px;
  margin-top: 30px;
}

.registration-form label {
  margin-top: 10px;
  color: rgba(255, 255, 255, .88);
  font-size: 14px;
  font-weight: 600;
}

.registration-form label span {
  color: var(--on-dark-muted);
  font-weight: 500;
}

.registration-form input,
.registration-form select {
  width: 100%;
  height: 52px;
  padding: 0 16px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 8px;
  color: #fff;
  background: rgba(255, 255, 255, .05);
  font: inherit;
  font-size: 15.5px;
  transition: border-color .3s ease, background .3s ease, box-shadow .3s ease;
}

.registration-form select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23e9d5ff' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 18px;
}

.registration-form select option {
  color: var(--ink);
}

.registration-form input:hover,
.registration-form select:hover {
  border-color: rgba(255, 255, 255, .26);
}

.registration-form input:focus,
.registration-form select:focus {
  outline: none;
  border-color: #4f8bff;
  background: rgba(255, 255, 255, .08);
  box-shadow: 0 0 0 4px rgba(30, 155, 240, .22);
}

.registration-form input:user-invalid,
.registration-form select:user-invalid {
  border-color: #ff6b9a;
}

.registration-form select:disabled {
  opacity: .5;
  cursor: not-allowed;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.form-field {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.form-field[hidden] {
  display: none;
}

@media (max-width: 520px) {
  .form-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}

.registration-trap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.password-field {
  position: relative;
}

.password-field input {
  padding-right: 90px;
}

.password-toggle {
  position: absolute;
  top: 8px;
  right: 8px;
  height: 36px;
  padding: 0 12px;
  border: 0;
  border-radius: 6px;
  color: #f3c8ff;
  background: rgba(255, 255, 255, .07);
  font-size: 13px;
  font-weight: 600;
  transition: background .3s ease;
}

.password-toggle:hover {
  background: rgba(255, 255, 255, .14);
}

.password-meter {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-top: 4px;
}

.password-meter span {
  height: 4px;
  border-radius: 4px;
  background: rgba(255, 255, 255, .1);
  transition: background .4s ease;
}

.password-meter[data-level="1"] span:nth-child(-n+1) { background: #ff6b9a; }
.password-meter[data-level="2"] span:nth-child(-n+2) { background: #ffb36b; }
.password-meter[data-level="3"] span:nth-child(-n+3) { background: #c26bff; }
.password-meter[data-level="4"] span { background: #4ade80; }

.registration-submit {
  width: 100%;
  margin-top: 22px;
  min-height: 54px;
}

.registration-submit.is-loading {
  pointer-events: none;
  color: transparent;
}

.registration-submit.is-loading::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid rgba(255, 255, 255, .35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.registration-footnote {
  margin-top: 24px;
  color: var(--on-dark-muted);
  font-size: 13.5px;
  text-align: center;
}

.registration-footnote a {
  color: #f3c8ff;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.form-alert,
.form-success {
  display: flex;
  gap: 12px;
  margin-top: 22px;
  padding: 14px 16px;
  border-radius: 8px;
  font-size: 14.5px;
  line-height: 1.5;
  animation: cardIn .6s var(--ease-out) backwards;
}

.form-alert {
  color: #ffd6e2;
  background: rgba(255, 70, 120, .12);
  border: 1px solid rgba(255, 90, 140, .35);
}

.form-success {
  color: #d5ffe2;
  background: rgba(74, 222, 128, .1);
  border: 1px solid rgba(74, 222, 128, .35);
}

.member-details {
  display: grid;
  gap: 10px;
  margin: 26px 0 0;
}

.member-details div {
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 8px;
  background: rgba(255, 255, 255, .04);
}

.member-details dt {
  color: var(--on-dark-muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.member-details dd {
  margin: 4px 0 0;
  font-weight: 600;
}

/* ==========================================================================
   Member area (espace.php, membre.php, admin.php)
   ========================================================================== */
.registration-form textarea,
.app-page textarea,
.app-page input:not([type="radio"]):not([type="checkbox"]):not([type="file"]),
.app-page select {
  width: 100%;
  min-height: 46px;
  padding: 11px 14px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 8px;
  color: #fff;
  background: rgba(255, 255, 255, .05);
  font: inherit;
  font-size: 15px;
  resize: vertical;
  transition: border-color .3s ease, box-shadow .3s ease;
}

.app-page select { appearance: auto; }
.app-page select option { color: var(--ink); }

.app-page textarea:focus,
.app-page input:focus,
.app-page select:focus {
  outline: none;
  border-color: #4f8bff;
  box-shadow: 0 0 0 4px rgba(30, 155, 240, .22);
}

.app-page input[type="file"] { color: var(--on-dark-muted); font: inherit; }

/* Cross-page fade so moving between tabs feels continuous (Chromium; others just navigate). */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .22s; }
.app-main > * { animation: appRise .45s var(--ease-out) backwards; }
.app-main > *:nth-child(2) { animation-delay: .04s; }
.app-main > *:nth-child(3) { animation-delay: .08s; }
.app-main > *:nth-child(n+4) { animation-delay: .12s; }
@keyframes appRise { from { opacity: 0; transform: translateY(8px); } }

.app-icon {
  width: 16px;
  height: 16px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: -3px;
}

.app-avatar .app-icon { width: 30px; height: 30px; }
.app-meta { display: flex; align-items: center; gap: 6px; }

.app-nav-actions { display: flex; align-items: center; gap: 10px; }
.btn-sm { --btn-pad: 0 16px; min-height: 38px; font-size: 14px; }

.btn-ghost-dark {
  color: #fff;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .16);
}

.btn-ghost-dark:hover { background: rgba(255, 255, 255, .12); }

.app-main {
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 26px var(--gutter) 80px;
  display: grid;
  gap: 20px;
  align-content: start;
}

.app-tabs {
  display: flex;
  gap: 6px;
  padding: 6px;
  overflow-x: auto;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 6px;
  background: rgba(14, 12, 40, .6);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  scrollbar-width: none;
}

.app-tabs::-webkit-scrollbar { display: none; }

.app-tabs a {
  flex: none;
  padding: 9px 16px;
  border-radius: 6px;
  color: var(--on-dark-muted);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  transition: color .3s ease, background .3s ease;
}

.app-tabs a:hover { color: #fff; background: rgba(255, 255, 255, .06); }

.app-tabs a.is-active {
  color: #fff;
  background: rgba(255, 255, 255, .08);
  box-shadow: inset 0 -2px 0 #4f8bff;
}

.app-subtabs { border-radius: 10px; }
.app-tabs a.app-tab-admin:not(.is-active) { color: #ffc9e3; }

.app-count {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  margin-left: 4px;
  padding: 0 6px;
  border-radius: 6px;
  color: #fff;
  background: var(--magenta);
  font-size: 12px;
}

.app-flash { margin: 0; }

.app-hero {
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 26px 28px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 12px;
  position: relative;
  overflow: hidden;
  background: rgba(14, 12, 40, .78);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.app-hero::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: var(--grad);
}

.app-hero > div { flex: 1; min-width: 0; }
.app-hero h1 { margin: 6px 0 4px; font-size: clamp(26px, 4vw, 36px); letter-spacing: -.03em; }
.app-hero-meta { color: var(--on-dark-muted); font-size: 14.5px; }

.app-avatar {
  display: inline-grid;
  flex: none;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: #fff;
  background: var(--grad);
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
}

.app-avatar.is-large { width: 76px; height: 76px; font-size: 28px; }
.app-avatar.is-small { width: 30px; height: 30px; font-size: 12px; }

.app-stats {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
}

.app-stat {
  display: grid;
  gap: 4px;
  padding: 18px 20px;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 10px;
  background: rgba(14, 12, 40, .7);
  transition: transform .4s var(--ease-out), border-color .3s ease;
}

a.app-stat:hover { transform: translateY(-3px); border-color: rgba(79, 139, 255, .5); }

.app-stat strong {
  font-family: var(--font-display);
  font-size: 32px;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.app-stat span { color: var(--on-dark-muted); font-size: 13px; line-height: 1.35; }

.app-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  align-items: start;
}

.app-card {
  display: block;
  padding: 26px;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 12px;
  background: rgba(14, 12, 40, .72);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.app-card h2 { margin: 0 0 14px; font-size: 21px; letter-spacing: -.02em; }
.app-card h3 { margin: 18px 0 8px; font-size: 16px; }
.app-card p + p { margin-top: 6px; }

.app-card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.app-card-head h2 { margin: 8px 0 6px; }

.app-callout {
  border-color: rgba(238, 58, 143, .4);
  background: linear-gradient(120deg, rgba(30, 155, 240, .14), rgba(238, 58, 143, .14)), rgba(14, 12, 40, .72);
}

.app-muted { color: var(--on-dark-muted); font-size: 13.5px; }
.app-empty { color: var(--on-dark-muted); padding: 18px; border: 1px dashed rgba(255, 255, 255, .14); border-radius: 8px; text-align: center; }
.app-empty a, .app-card p a, .app-team a, .app-list a { color: #9cc8ff; }
.app-quote { color: var(--on-dark-muted); font-style: italic; font-size: 14px; }

.app-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border: 1px solid rgba(79, 139, 255, .35);
  border-radius: 6px;
  color: #cfe1ff;
  background: rgba(30, 155, 240, .1);
  font-size: 12px;
  font-weight: 600;
}

.app-badge.is-ok { color: #c9f7d9; border-color: rgba(74, 222, 128, .4); background: rgba(74, 222, 128, .1); }
.app-badge.is-off { color: #ffd0de; border-color: rgba(255, 90, 140, .4); background: rgba(255, 70, 120, .1); }

.app-tags { display: flex; flex-wrap: wrap; gap: 8px; }

.app-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 14px;
}

.app-tile {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 10px;
  background: rgba(255, 255, 255, .03);
  transition: border-color .3s ease, transform .4s var(--ease-out);
}

.app-tile:hover { border-color: rgba(79, 139, 255, .45); transform: translateY(-2px); }
.app-tile h3 { margin: 2px 0 0; }
.app-tile p { font-size: 14px; color: rgba(255, 255, 255, .82); }
.app-tile form { margin-top: auto; width: 100%; }
.app-certificate { border-color: rgba(74, 222, 128, .3); }

.app-rows { display: grid; gap: 10px; }

.app-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 8px;
  background: rgba(255, 255, 255, .03);
}

.app-row + .app-row { margin-top: 10px; }
.app-row-main { flex: 1 1 240px; min-width: 0; display: grid; gap: 6px; }
.app-row-main h3 { margin: 0; }

.app-progress {
  height: 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, .08);
  overflow: hidden;
}

.app-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--grad);
  transition: width .8s var(--ease-out);
}

.app-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }

.app-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, .03);
}

.app-list li a { display: inline-flex; align-items: center; gap: 10px; }

.app-team { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; margin: 14px 0 0; padding: 0; list-style: none; }

.app-team li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, .04);
}

.app-team a { display: flex; align-items: center; gap: 10px; color: #fff; }
.app-team span { display: grid; }
.app-team small { color: var(--on-dark-muted); }

.app-link-button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0;
  border: 0;
  color: #9cc8ff;
  background: none;
  font: inherit;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
}

.app-link-button:hover { text-decoration: underline; }

.app-form { margin-top: 0; }
.app-form .btn { justify-self: start; margin-top: 10px; }
.app-invite { margin-top: 18px; }

.app-inline-form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; width: 100%; }
.app-inline-form > select, .app-inline-form > input { flex: 1 1 180px; width: auto; }
.app-inline-form .btn { flex: none; }
.app-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.app-narrow { max-width: 90px; flex: 0 0 90px !important; }
.app-check { display: flex; align-items: center; gap: 10px; margin-top: 12px; }

.app-skills { display: grid; gap: 14px; }
.app-skills fieldset { margin: 0; padding: 0; border: 0; }
.app-skills legend { margin-bottom: 8px; font-weight: 600; font-size: 14.5px; }
.app-levels { display: flex; flex-wrap: wrap; gap: 6px; }
.app-levels label { position: relative; }
.app-levels input { position: absolute; opacity: 0; }

.app-levels span {
  display: inline-block;
  padding: 7px 12px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 6px;
  color: var(--on-dark-muted);
  font-size: 13px;
  cursor: pointer;
  transition: all .25s ease;
}

.app-levels input:checked + span { color: #fff; border-color: transparent; background: var(--grad); }
.app-levels input:focus-visible + span { box-shadow: 0 0 0 3px rgba(30, 155, 240, .45); }

.app-score { display: flex; align-items: center; gap: 18px; margin-bottom: 18px; }

.app-score strong {
  font-family: var(--font-display);
  font-size: 54px;
  line-height: 1;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.app-score span { color: rgba(255, 255, 255, .85); }
.app-skill-bars { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.app-skill-bars li { display: grid; grid-template-columns: 1fr; gap: 4px; font-size: 14px; }
.app-skill-bars small { color: var(--on-dark-muted); }
.app-ask { margin-top: 18px; }

.app-chat { display: grid; gap: 14px; }

.app-chat-log {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 320px;
  max-height: 56vh;
  padding: 16px;
  overflow-y: auto;
  border-radius: 10px;
  background: rgba(0, 0, 0, .2);
}

.app-msg {
  max-width: 82%;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 15px;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  animation: cardIn .4s var(--ease-out) backwards;
}

.app-msg.is-bot { align-self: flex-start; border-bottom-left-radius: 6px; background: rgba(255, 255, 255, .07); }
.app-msg.is-me { align-self: flex-end; border-bottom-right-radius: 6px; color: #fff; background: var(--grad); }
.app-msg.is-error { align-self: flex-start; color: #ffd6e2; background: rgba(255, 70, 120, .12); }
.app-msg.is-typing { animation: pulseDots 1s ease-in-out infinite; }
.app-bullet { display: block; padding-left: 16px; position: relative; }
.app-bullet::before { content: "•"; position: absolute; left: 2px; color: #7fb4ff; }

@keyframes pulseDots { 50% { opacity: .4; } }

.app-chat-suggestions { display: flex; flex-wrap: wrap; gap: 8px; }

.app-chat-suggestions button {
  padding: 8px 14px;
  border: 1px solid rgba(79, 139, 255, .35);
  border-radius: 6px;
  color: #cfe1ff;
  background: rgba(30, 155, 240, .08);
  font: inherit;
  font-size: 13.5px;
  cursor: pointer;
}

.app-chat-suggestions button:hover { background: rgba(30, 155, 240, .18); }

.app-chat-form { display: flex; align-items: flex-end; gap: 10px; }
.app-chat-form textarea { flex: 1; min-height: 50px; max-height: 160px; resize: none; }

.app-table-wrap { overflow-x: auto; }
.app-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.app-table th { color: var(--on-dark-muted); font-size: 12px; font-weight: 700; letter-spacing: .08em; text-align: left; text-transform: uppercase; }
.app-table th, .app-table td { padding: 12px 10px; border-bottom: 1px solid rgba(255, 255, 255, .08); vertical-align: top; }
.app-table a { color: #fff; }

@media (max-width: 900px) {
  .app-stats { grid-template-columns: repeat(2, 1fr); }
  .app-grid { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .app-hero { flex-wrap: wrap; gap: 16px; padding: 20px; }
  .app-hero > div { flex: 1 1 calc(100% - 80px); }
  .app-hero > .btn { width: 100%; }
  .app-avatar.is-large { width: 60px; height: 60px; font-size: 22px; }
  .app-card { padding: 18px; }
  .app-row { flex-wrap: wrap; }
  .app-msg { max-width: 92%; }
}

.app-link-button.is-danger { color: #ff9dbb; }
.app-row-tools { width: auto; flex: 0 1 auto; }
.app-order { display: grid; place-items: center; width: 30px; height: 30px; flex: none; border-radius: 6px; color: var(--on-dark-muted); background: rgba(255, 255, 255, .06); font-size: 13px; font-weight: 700; }
.app-signature { display: grid; place-items: center; width: 120px; height: 56px; flex: none; padding: 4px; border-radius: 6px; background: #fff; }
.app-signature img { max-width: 100%; max-height: 100%; object-fit: contain; }
.app-details summary { cursor: pointer; font-weight: 600; }
.app-details[open] summary { margin-bottom: 16px; }
.app-table td.app-actions { display: table-cell; }
.app-table td.app-actions > * { display: inline-block; margin: 0 10px 4px 0; }

/* ==========================================================================
   App shell — sidebar, top bar, command palette, mobile dock
   ========================================================================== */
body.app-page {
  --side-w: 264px;
  --shell-bg: #07061a;
  --panel: #0d0c23;
  --panel-line: rgba(255, 255, 255, .075);
  min-height: 100vh;
  color: #fff;
  background:
    radial-gradient(ellipse 60% 40% at 100% 0%, rgba(122, 50, 232, .12), transparent 70%),
    radial-gradient(ellipse 50% 40% at 0% 100%, rgba(30, 155, 240, .08), transparent 70%),
    var(--shell-bg);
}

.side-mini body.app-page { --side-w: 76px; }

.shell { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); min-height: 100vh; transition: grid-template-columns .35s var(--ease-out); }

/* ---------- Sidebar ---------- */
.side {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  gap: 6px;
  height: 100vh;
  padding: 16px 12px;
  overflow: hidden auto;
  border-right: 1px solid var(--panel-line);
  background: linear-gradient(180deg, #0b0a21, #08071b);
  scrollbar-width: none;
}

.side::-webkit-scrollbar { display: none; }
.side-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 2px 4px 12px; }
.side-brand img { display: block; height: 26px; width: auto; }

.side-icon-btn {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: none;
  border: 1px solid var(--panel-line);
  border-radius: 8px;
  color: var(--on-dark-muted);
  background: transparent;
  cursor: pointer;
  transition: color .2s ease, background .2s ease;
}

.side-icon-btn:hover { color: #fff; background: rgba(255, 255, 255, .06); }
.side-icon-btn .app-icon { width: 18px; height: 18px; vertical-align: 0; }

.side-me {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
  padding: 10px;
  border: 1px solid var(--panel-line);
  border-radius: 10px;
  background: rgba(255, 255, 255, .025);
  transition: border-color .2s ease;
}

.side-me:hover { border-color: rgba(79, 139, 255, .4); }
.side-me .side-text { display: grid; min-width: 0; }
.side-me strong { overflow: hidden; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.side-me small { overflow: hidden; color: var(--on-dark-muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }

.side-search {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 38px;
  margin-bottom: 6px;
  padding: 0 10px;
  border: 1px solid var(--panel-line);
  border-radius: 8px;
  color: var(--on-dark-muted);
  background: rgba(0, 0, 0, .2);
  font: inherit;
  font-size: 13.5px;
  cursor: pointer;
}

.side-search:hover { color: #fff; border-color: rgba(255, 255, 255, .16); }
.side-search kbd { margin-left: auto; }

.app-page kbd {
  padding: 1px 6px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-bottom-width: 2px;
  border-radius: 4px;
  color: var(--on-dark-muted);
  font: 600 11px/1.6 var(--font-body);
}

.side-nav { display: grid; gap: 2px; }

.side-label {
  margin: 14px 10px 6px;
  color: rgba(240, 230, 250, .38);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  white-space: nowrap;
}

.side-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  height: 40px;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  color: rgba(240, 230, 250, .66);
  background: transparent;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: color .2s ease, background .2s ease;
}

.side-link .app-icon { width: 19px; height: 19px; vertical-align: 0; }
.side-link:hover { color: #fff; background: rgba(255, 255, 255, .045); }

.side-link.is-active {
  color: #fff;
  background: linear-gradient(90deg, rgba(47, 95, 224, .2), rgba(122, 50, 232, .06));
}

.side-link.is-active::before {
  content: "";
  position: absolute;
  left: -12px;
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--grad);
}

.side-link.is-active .app-icon { color: #7fb4ff; }

.side-badge {
  margin-left: auto;
  min-width: 20px;
  padding: 1px 6px;
  border-radius: 5px;
  color: #fff;
  background: var(--magenta);
  font-size: 11.5px;
  font-weight: 700;
  text-align: center;
}

.side-foot { display: grid; gap: 2px; margin-top: auto; padding-top: 12px; border-top: 1px solid var(--panel-line); }
.side-foot form { margin: 0; }

/* Icon rail */
.side-mini .side-text,
.side-mini .side-label,
.side-mini .side-brand { display: none; }
.side-mini .side-top { justify-content: center; }
.side-mini .side-me, .side-mini .side-search, .side-mini .side-link { justify-content: center; padding: 0; }
.side-mini .side-me { height: 52px; border-color: transparent; background: none; }
.side-mini .side-search { width: 40px; margin-inline: auto; }
.side-mini .side-badge { position: absolute; top: 4px; right: 6px; min-width: 8px; height: 8px; padding: 0; font-size: 0; }
.side-mini .side-collapse { transform: scaleX(-1); }
.side-mini .side-nav { margin-top: 10px; }

.side-mini [data-tip]:hover::after {
  content: attr(data-tip);
  position: fixed;
  left: 84px;
  z-index: 60;
  padding: 6px 10px;
  border: 1px solid var(--panel-line);
  border-radius: 6px;
  color: #fff;
  background: #16143a;
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  pointer-events: none;
}

.side-backdrop { display: none; }

/* ---------- Top bar ---------- */
.shell-main { min-width: 0; display: flex; flex-direction: column; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 16px;
  height: 60px;
  padding: 0 32px;
  border-bottom: 1px solid var(--panel-line);
  background: rgba(7, 6, 26, .78);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
}

.topbar-menu, .topbar-brand { display: none; }
.topbar-brand img { display: block; height: 22px; }
.topbar-crumb { display: flex; align-items: center; gap: 8px; min-width: 0; color: var(--on-dark-muted); font-size: 13.5px; }
.topbar-crumb strong { overflow: hidden; color: #fff; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }

.topbar-search {
  display: flex;
  align-items: center;
  gap: 10px;
  width: min(360px, 40%);
  height: 36px;
  margin-left: auto;
  padding: 0 10px 0 12px;
  border: 1px solid var(--panel-line);
  border-radius: 8px;
  color: var(--on-dark-muted);
  background: rgba(255, 255, 255, .03);
  font: inherit;
  font-size: 13.5px;
  cursor: text;
  transition: border-color .2s ease;
}

.topbar-search:hover { border-color: rgba(255, 255, 255, .18); }
.topbar-search span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar-search kbd { margin-left: auto; }
.topbar-me { display: flex; }

/* ---------- Content framing ---------- */
body.app-page .app-main {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 30px 32px 64px;
  gap: 18px;
}

.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; padding-bottom: 6px; }
.page-eyebrow { display: flex; align-items: center; gap: 10px; color: #a9c8ff; font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.page-eyebrow::before { content: ""; width: 18px; height: 2px; background: var(--grad); }
.page-head h1 { margin: 8px 0 4px; font-family: var(--font-display); font-size: clamp(26px, 3.2vw, 34px); letter-spacing: -.03em; }
.page-sub { color: var(--on-dark-muted); font-size: 15px; }
.page-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.page-actions .btn .app-icon, .welcome .btn .app-icon { vertical-align: -3px; }

body.app-page .app-card {
  padding: 22px 24px;
  border: 1px solid var(--panel-line);
  border-radius: 10px;
  background: var(--panel);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

body.app-page .app-card > h2:first-child,
body.app-page .app-card-head {
  margin: -22px -24px 18px;
  padding: 16px 24px;
  border-bottom: 1px solid var(--panel-line);
  font-size: 15.5px;
  font-weight: 600;
  letter-spacing: -.005em;
}

body.app-page .app-card-head h2 { margin: 6px 0 0; font-size: 15.5px; }
body.app-page .app-callout { padding: 14px 18px; border-color: rgba(238, 58, 143, .35); }
body.app-page .app-tile, body.app-page .app-row, body.app-page .app-list li { border-radius: 8px; }

/* Stats as one segmented strip instead of separate boxes */
body.app-page .app-stats {
  gap: 0;
  border: 1px solid var(--panel-line);
  border-radius: 10px;
  background: var(--panel);
  overflow: hidden;
}

body.app-page .app-stat { border: 0; border-radius: 0; background: none; padding: 18px 22px; }
body.app-page .app-stat + .app-stat { border-left: 1px solid var(--panel-line); }
body.app-page a.app-stat:hover { transform: none; background: rgba(255, 255, 255, .025); }
body.app-page .app-stat strong { font-size: 28px; }

/* Dashboard welcome band */
.welcome {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px;
  padding: 22px 24px;
  overflow: hidden;
  border: 1px solid var(--panel-line);
  border-radius: 10px;
  background:
    linear-gradient(115deg, rgba(30, 155, 240, .14), rgba(122, 50, 232, .1) 45%, rgba(238, 58, 143, .08)),
    var(--panel);
}

.welcome::before { content: ""; position: absolute; inset: 0 0 auto; height: 2px; background: var(--grad); }
.welcome-id { display: flex; align-items: center; gap: 14px; min-width: 0; }
.welcome-id div { display: grid; gap: 2px; min-width: 0; }
.welcome-id strong { font-size: 17px; }
.welcome-id span { color: var(--on-dark-muted); font-size: 13.5px; }
.welcome-next { padding-left: 24px; border-left: 1px solid var(--panel-line); }
.welcome-next a { display: grid; gap: 6px; }
.welcome-next small { display: flex; align-items: center; gap: 6px; color: var(--on-dark-muted); font-size: 12.5px; }
.welcome-label { display: block; margin-bottom: 4px; color: rgba(240, 230, 250, .45); font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.welcome-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }

@media (max-width: 1320px) {
  .welcome { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .welcome-actions { grid-column: 1 / -1; justify-content: flex-start; padding-top: 16px; border-top: 1px solid var(--panel-line); }
}

/* Profile cover */
.profile-cover { overflow: hidden; border: 1px solid var(--panel-line); border-radius: 10px; background: var(--panel); }
.profile-cover-band { height: 96px; background: linear-gradient(115deg, #142a7a 0%, #3a1a8f 50%, #8a2378 100%); }
.profile-cover-body { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 18px; padding: 0 24px 20px; }
.profile-cover-body > div { display: grid; gap: 2px; flex: 1; min-width: 200px; padding-bottom: 4px; }
.profile-cover-body strong { font-size: 22px; font-family: var(--font-display); }
.profile-cover-body span { color: var(--on-dark-muted); font-size: 14px; }
.app-avatar.is-xl { width: 92px; height: 92px; margin-top: -46px; border: 4px solid var(--panel); font-size: 32px; }
.profile-cover-stats { display: flex; gap: 24px; margin: 0; }
.profile-cover-stats div { text-align: center; }
.profile-cover-stats dt { color: var(--on-dark-muted); font-size: 12px; }
.profile-cover-stats dd { margin: 0; font: 700 22px/1.2 var(--font-display); }

/* ---------- Command palette ---------- */
.palette {
  width: min(560px, calc(100vw - 32px));
  max-height: min(520px, 80vh);
  margin: 12vh auto auto;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 12px;
  color: #fff;
  background: #100f2a;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .6);
}

.palette::backdrop { background: rgba(4, 3, 14, .6); backdrop-filter: blur(3px); }
.palette[open] { animation: paletteIn .18s var(--ease-out); }
@keyframes paletteIn { from { opacity: 0; transform: translateY(-8px) scale(.98); } }
.palette-box { display: flex; flex-direction: column; max-height: inherit; }
.palette-input { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--panel-line); color: var(--on-dark-muted); }
body.app-page .palette-input input { flex: 1; min-width: 0; min-height: 0; padding: 0; border: 0; outline: none; color: #fff; background: none; box-shadow: none; font: inherit; font-size: 16px; }
body.app-page .palette-input input::-webkit-search-cancel-button { display: none; }
.palette-list { flex: 1; margin: 0; padding: 6px; overflow-y: auto; list-style: none; }
.palette-list li[role="option"] { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 7px; color: rgba(240, 230, 250, .8); font-size: 14.5px; cursor: pointer; }
.palette-list li.is-active { color: #fff; background: rgba(79, 139, 255, .16); }
.palette-list li .app-icon { width: 18px; height: 18px; vertical-align: 0; }
.palette-group { padding: 10px 12px 4px; color: rgba(240, 230, 250, .4); font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.palette-empty { padding: 22px; color: var(--on-dark-muted); text-align: center; }
.palette-hint { display: flex; gap: 6px; align-items: center; margin: 0; padding: 10px 16px; border-top: 1px solid var(--panel-line); color: var(--on-dark-muted); font-size: 12px; }
.palette kbd { padding: 1px 6px; border: 1px solid rgba(255, 255, 255, .14); border-radius: 4px; font: 600 11px/1.6 var(--font-body); }

/* ---------- Mobile dock ---------- */
.dock { display: none; }

@media (max-width: 960px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(300px, 86vw);
    transform: translateX(-102%);
    transition: transform .32s var(--ease-out);
    box-shadow: 20px 0 60px rgba(0, 0, 0, .5);
  }
  .side-open .side { transform: none; }
  .side-collapse { display: none; }
  .side-mini .side-text, .side-mini .side-label, .side-mini .side-brand { display: revert; }
  .side-mini .side-me, .side-mini .side-search, .side-mini .side-link { justify-content: flex-start; padding: 0 10px; }
  .side-mini .side-me { height: auto; padding: 10px; }
  .side-mini .side-search { width: auto; margin-inline: 0; }
  .side-backdrop { position: fixed; inset: 0; z-index: 35; display: block; background: rgba(4, 3, 14, .55); opacity: 0; visibility: hidden; transition: opacity .3s ease, visibility 0s linear .3s; }
  .side-open .side-backdrop { opacity: 1; visibility: visible; transition: opacity .3s ease; }

  .topbar { padding: 0 16px; gap: 12px; }
  .topbar-menu, .topbar-brand { display: grid; }
  .topbar-crumb { display: none; }
  .topbar-search { width: 38px; padding: 0; justify-content: center; }
  .topbar-search span, .topbar-search kbd { display: none; }

  body.app-page .app-main { padding: 22px 16px 104px; }
  .welcome { grid-template-columns: 1fr; gap: 16px; }
  .welcome-next { padding: 14px 0 0; border-left: 0; border-top: 1px solid var(--panel-line); }
  .welcome-actions { justify-content: flex-start; }
  body.app-page .app-stats { grid-template-columns: repeat(2, 1fr); }
  body.app-page .app-stat + .app-stat { border-left: 0; }
  body.app-page .app-stat:nth-child(even) { border-left: 1px solid var(--panel-line); }
  body.app-page .app-stat:nth-child(n+3) { border-top: 1px solid var(--panel-line); }

  .dock {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom));
    z-index: 30;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    padding: 6px;
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 12px;
    background: rgba(14, 12, 38, .88);
    backdrop-filter: blur(16px) saturate(1.3);
    -webkit-backdrop-filter: blur(16px) saturate(1.3);
    box-shadow: 0 14px 40px rgba(0, 0, 0, .45);
  }
  .dock a, .dock button {
    position: relative;
    display: grid;
    justify-items: center;
    gap: 3px;
    padding: 7px 2px;
    border: 0;
    border-radius: 8px;
    color: rgba(240, 230, 250, .6);
    background: none;
    font: inherit;
    font-size: 11px;
    font-weight: 600;
  }
  .dock .app-icon { width: 21px; height: 21px; vertical-align: 0; }
  .dock .is-active { color: #fff; background: rgba(79, 139, 255, .16); }
  .dock .is-active .app-icon { color: #7fb4ff; }
  .dock-dot { position: absolute; top: 6px; right: calc(50% - 16px); width: 8px; height: 8px; border-radius: 50%; background: var(--magenta); }
}

@media (max-width: 560px) {
  .profile-cover-stats { width: 100%; justify-content: space-around; }
  .page-head h1 { font-size: 26px; }
}

/* ==========================================================================
   Photos, bureau, attendance
   ========================================================================== */
.app-avatar.has-photo { overflow: hidden; background: #1a1840; }
.app-avatar.has-photo img { width: 100%; height: 100%; object-fit: cover; }
.app-avatar.is-xl-flat { width: 84px; height: 84px; border-radius: 10px; font-size: 28px; }
.photo-edit { display: flex; align-items: center; gap: 18px; margin-bottom: 18px; padding-bottom: 18px; border-bottom: 1px solid var(--panel-line, rgba(255, 255, 255, .08)); }
.photo-edit strong { display: block; margin-bottom: 4px; }
.photo-edit .app-actions { margin-top: 10px; }
.photo-pick { cursor: pointer; }
.photo-pick .app-icon { vertical-align: -3px; }
.photo-form { margin: 0; }

.bureau-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.bureau-card { display: grid; justify-items: center; gap: 6px; padding: 18px 12px; border: 1px solid var(--panel-line, rgba(255, 255, 255, .08)); border-radius: 10px; text-align: center; transition: border-color .2s ease, background .2s ease; }
.bureau-card:hover { border-color: rgba(79, 139, 255, .45); background: rgba(255, 255, 255, .02); }
.bureau-card strong { font-size: 14px; }
.bureau-card span { color: #c9a8ff; font-size: 12.5px; }
.table-person { display: flex; align-items: center; gap: 10px; }
.invite-link input { font-family: ui-monospace, monospace; font-size: 13px; }

.app-stats-4 { grid-template-columns: repeat(4, 1fr); }
.presence-rows .app-row { gap: 14px; }
.presence-date { display: grid; place-items: center; width: 48px; height: 52px; flex: none; border: 1px solid var(--panel-line, rgba(255, 255, 255, .08)); border-radius: 8px; line-height: 1.1; }
.presence-date strong { font: 700 19px var(--font-display); }
.presence-date small { color: var(--on-dark-muted); font-size: 11px; text-transform: uppercase; }
.presence-rows h3 a { color: #fff; }
.presence-rows h3 a:hover { color: #9cc8ff; }

.presence-pill { flex: none; padding: 4px 10px; border-radius: 5px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.presence-pill.is-present { color: #b8f5cc; background: rgba(74, 222, 128, .14); }
.presence-pill.is-retard { color: #ffe0a8; background: rgba(255, 179, 64, .16); }
.presence-pill.is-excuse { color: #cfe1ff; background: rgba(79, 139, 255, .16); }
.presence-pill.is-absent { color: #ffc4d4; background: rgba(255, 70, 120, .15); }
.presence-pill.is-a_venir { color: var(--on-dark-muted); background: rgba(255, 255, 255, .06); }

.report-head { display: grid; gap: 8px; }
.report-head h2 { margin: 4px 0 0; font: 600 24px var(--font-display); }
.report-head .app-actions { margin-top: 6px; }

.roll { display: grid; gap: 6px; }
.roll-filter { margin-bottom: 8px; }
.roll-row { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 8px; background: rgba(255, 255, 255, .025); }
.roll-row .app-row-main { gap: 2px; }
.roll-actions { display: flex; gap: 4px; margin: 0; }
.roll-actions button { width: 30px; height: 30px; border: 1px solid var(--panel-line, rgba(255, 255, 255, .1)); border-radius: 6px; color: var(--on-dark-muted); background: transparent; font: 700 12px var(--font-body); cursor: pointer; }
.roll-actions button:hover { color: #fff; background: rgba(255, 255, 255, .06); }
.roll-actions button.is-on { color: #fff; border-color: transparent; background: #2f5fe0; }
.roll-row[hidden] { display: none; }

.card-check { display: flex; align-items: center; gap: 16px; margin: 18px 0 6px; }
.card-check-photo { display: grid; place-items: center; width: 76px; height: 76px; flex: none; overflow: hidden; border-radius: 10px; color: #fff; background: var(--grad); font: 700 26px var(--font-display); }
.card-check-photo img { width: 100%; height: 100%; object-fit: cover; }
.card-check h1 { margin: 0; font-size: 26px; }
.card-check-status { color: #b8f5cc; font-weight: 600; }

/* ---------- Scanner ---------- */
.scan-page { display: flex; flex-direction: column; height: 100vh; height: 100dvh; overflow: hidden; }
.scan-top { display: flex; align-items: center; gap: 14px; padding: 12px 16px; padding-top: max(12px, env(safe-area-inset-top)); border-bottom: 1px solid rgba(255, 255, 255, .08); }
.scan-title { display: grid; flex: 1; min-width: 0; }
.scan-title strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.scan-title span { color: var(--on-dark-muted); font-size: 13px; }
.scan-count { display: flex; align-items: baseline; gap: 4px; padding: 6px 12px; border-radius: 8px; background: rgba(74, 222, 128, .12); color: #b8f5cc; }
.scan-count strong { font: 700 22px var(--font-display); }

.scan-main { display: grid; grid-template-columns: minmax(0, 1fr) 340px; flex: 1; min-height: 0; }
.scan-view { position: relative; min-height: 0; overflow: hidden; background: #000; }
.scan-view video { width: 100%; height: 100%; object-fit: cover; }
.scan-view video.is-mirrored { transform: scaleX(-1); }
.scan-frame { position: absolute; top: 50%; left: 50%; width: min(64vmin, 340px); aspect-ratio: 1; transform: translate(-50%, -50%); box-shadow: 0 0 0 100vmax rgba(4, 3, 14, .45); border-radius: 12px; pointer-events: none; }
.scan-frame i { position: absolute; width: 34px; height: 34px; border: 4px solid #fff; }
.scan-frame i:nth-child(1) { top: -2px; left: -2px; border-right: 0; border-bottom: 0; border-radius: 12px 0 0 0; }
.scan-frame i:nth-child(2) { top: -2px; right: -2px; border-left: 0; border-bottom: 0; border-radius: 0 12px 0 0; }
.scan-frame i:nth-child(3) { bottom: -2px; left: -2px; border-right: 0; border-top: 0; border-radius: 0 0 0 12px; }
.scan-frame i:nth-child(4) { bottom: -2px; right: -2px; border-left: 0; border-top: 0; border-radius: 0 0 12px 0; }
.scan-frame b { position: absolute; left: 8%; right: 8%; height: 2px; background: linear-gradient(90deg, transparent, #4f8bff, #ee3a8f, transparent); box-shadow: 0 0 12px #4f8bff; animation: scanLine 2.2s ease-in-out infinite; }
@keyframes scanLine { 0%, 100% { top: 8%; } 50% { top: 92%; } }
.scan-message { position: absolute; inset: auto 16px 50% 16px; transform: translateY(50%); padding: 14px 16px; border-radius: 10px; color: #fff; background: rgba(14, 12, 40, .9); text-align: center; }
.scan-message[hidden] { display: none; }
.scan-tools { position: absolute; top: 14px; right: 14px; display: grid; gap: 8px; }
.scan-tool { display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid rgba(255, 255, 255, .2); border-radius: 10px; color: #fff; background: rgba(7, 6, 26, .6); backdrop-filter: blur(8px); cursor: pointer; }
.scan-tool .app-icon { width: 20px; height: 20px; vertical-align: 0; }
.scan-tool[aria-pressed="false"] { opacity: .5; }

.scan-result {
  position: absolute;
  left: 16px;
  bottom: 16px;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 14px;
  width: min(460px, calc(100% - 32px));
  padding: 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, .12);
  background: rgba(14, 12, 40, .94);
  box-shadow: 0 20px 50px rgba(0, 0, 0, .5);
  animation: resultIn .25s var(--ease-out);
}
.scan-result[hidden] { display: none; }
@keyframes resultIn { from { opacity: 0; transform: translateY(14px); } }
.scan-result > div { display: grid; flex: 1; min-width: 0; }
.scan-result strong { font-size: 17px; }
.scan-result span[data-result-meta] { color: var(--on-dark-muted); font-size: 13px; }
.scan-result-photo { display: grid; place-items: center; width: 60px; height: 60px; flex: none; overflow: hidden; border-radius: 10px; color: #fff; background: var(--grad); font: 700 20px var(--font-display); }
.scan-result-photo img { width: 100%; height: 100%; object-fit: cover; }
.scan-result-state { padding: 6px 10px; border-radius: 6px; font-size: 12.5px; font-weight: 700; white-space: nowrap; }
.scan-result.is-ok { border-color: rgba(74, 222, 128, .6); }
.scan-result.is-ok .scan-result-state { color: #0b3a1d; background: #4ade80; }
.scan-result.is-late { border-color: rgba(255, 179, 64, .6); }
.scan-result.is-late .scan-result-state { color: #3a2400; background: #ffb340; }
.scan-result.is-info .scan-result-state { color: #fff; background: #2f5fe0; }
.scan-result.is-bad { border-color: rgba(255, 70, 120, .6); }
.scan-result.is-bad .scan-result-state { color: #fff; background: #e1305f; }

.scan-main { position: relative; }
.scan-side { display: flex; flex-direction: column; gap: 14px; min-height: 0; padding: 18px; overflow-y: auto; border-left: 1px solid rgba(255, 255, 255, .08); background: #0b0a21; }
.scan-side h2 { margin: 6px 0 0; color: var(--on-dark-muted); font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.scan-manual label { display: block; margin-bottom: 8px; font-size: 13.5px; font-weight: 600; }
.scan-log { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.scan-log li { display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 8px; background: rgba(255, 255, 255, .03); font-size: 13.5px; animation: resultIn .25s var(--ease-out); }
.scan-log li span { color: var(--on-dark-muted); font-variant-numeric: tabular-nums; }
.scan-log li em { font-style: normal; font-size: 12px; font-weight: 700; color: #b8f5cc; }
.scan-log li.is-late em { color: #ffe0a8; }
.scan-log .scan-log-empty { display: block; color: var(--on-dark-muted); text-align: center; }

@media (max-width: 860px) {
  .scan-main { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr) auto; }
  .scan-side { max-height: 34vh; border-left: 0; border-top: 1px solid rgba(255, 255, 255, .08); }
  .scan-result { bottom: calc(34vh + 12px); left: 12px; width: calc(100% - 24px); }
  .app-stats-4 { grid-template-columns: repeat(2, 1fr); }
  .photo-edit { align-items: flex-start; }
}

/* ==========================================================================
   Premium motion layer — shell, panels, toasts, console
   ========================================================================== */
.nav-progress {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  height: 2px;
  opacity: 0;
  pointer-events: none;
  transform: scaleX(0);
  transform-origin: left;
  background: var(--grad);
  box-shadow: 0 0 12px rgba(79, 139, 255, .8);
}
html.is-navigating .nav-progress { opacity: 1; animation: navLoad 8s cubic-bezier(.08, .8, .2, 1) forwards; }
@keyframes navLoad { 0% { transform: scaleX(0); } 15% { transform: scaleX(.42); } 100% { transform: scaleX(.94); } }

/* Page title settles in */
body.app-page .page-head h1 { animation: headReveal .75s var(--ease-out) both; }
body.app-page .page-eyebrow::before { animation: lineGrow .9s .1s var(--ease-out) both; }
body.app-page .page-sub { animation: appRise .7s .12s var(--ease-out) backwards; }
@keyframes headReveal { from { opacity: 0; transform: translateY(14px); filter: blur(6px); } }
@keyframes lineGrow { from { width: 0; } }

/* Sidebar glide highlight */
.side-nav { position: relative; }
.side-nav .side-link { z-index: 1; }
.side-glide {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 0;
  border-radius: 8px;
  background: rgba(255, 255, 255, .055);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .04);
  opacity: 0;
  pointer-events: none;
  transition: transform .32s var(--ease-out), height .32s var(--ease-out), opacity .2s ease;
}
.side-glide.is-on { opacity: 1; }
.side-nav.has-glide .side-link:hover { background: transparent; }
.side-link.is-active::before { animation: activeBar .5s var(--ease-out) both; }
@keyframes activeBar { from { transform: scaleY(0); } }

/* Pointer-following border light on panels */
body.app-page :is(.app-card, .app-tile, .bureau-card, .welcome, .roll-row) { position: relative; }
body.app-page :is(.app-card, .app-tile, .bureau-card, .welcome, .roll-row)::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  padding: 1px;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(340px circle at var(--mx, -999px) var(--my, -999px), rgba(111, 160, 255, .6), rgba(197, 54, 200, .25) 35%, transparent 65%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  opacity: 0;
  transition: opacity .35s ease;
}
body.app-page :is(.app-card, .app-tile, .bureau-card, .welcome, .roll-row):hover::after { opacity: 1; }
body.app-page .app-tile { transition: border-color .3s ease, transform .45s var(--ease-out), box-shadow .45s var(--ease-out); }
body.app-page .app-tile:hover { transform: translateY(-3px); box-shadow: 0 18px 40px -18px rgba(47, 95, 224, .55); }
body.app-page .app-rows > *, body.app-page .app-table tbody tr { animation: appRise .5s var(--ease-out) backwards; }
body.app-page .app-rows > :nth-child(2), body.app-page .app-table tbody tr:nth-child(2) { animation-delay: .04s; }
body.app-page .app-rows > :nth-child(3), body.app-page .app-table tbody tr:nth-child(3) { animation-delay: .08s; }
body.app-page .app-rows > :nth-child(4), body.app-page .app-table tbody tr:nth-child(4) { animation-delay: .12s; }
body.app-page .app-rows > :nth-child(n+5), body.app-page .app-table tbody tr:nth-child(n+5) { animation-delay: .16s; }
body.app-page .btn { transition: transform .2s var(--ease-out), box-shadow .3s ease, background-color .3s ease, color .3s ease, border-color .3s ease; }
body.app-page .btn:hover { transform: translateY(-1px); }
body.app-page .btn:active { transform: translateY(0) scale(.98); }

/* Toast notifications */
body.app-page .app-flash {
  position: fixed;
  top: 74px;
  right: 24px;
  z-index: 80;
  display: flex;
  align-items: center;
  gap: 12px;
  width: min(420px, calc(100vw - 32px));
  margin: 0;
  padding: 14px 12px 14px 16px;
  overflow: hidden;
  border: 0;
  border-radius: 12px;
  color: #fff;
  background: rgba(16, 15, 42, .94);
  backdrop-filter: blur(18px) saturate(1.3);
  -webkit-backdrop-filter: blur(18px) saturate(1.3);
  box-shadow: 0 26px 60px -12px rgba(0, 0, 0, .65), inset 0 0 0 1px rgba(255, 255, 255, .09);
  font-size: 14.5px;
  line-height: 1.45;
  animation: toastIn .55s var(--ease-spring) both;
}
body.app-page .app-flash > span { flex: 1; }
body.app-page .app-flash > .app-icon { width: 20px; height: 20px; vertical-align: 0; }
body.app-page .form-success.app-flash { box-shadow: 0 26px 60px -12px rgba(0, 0, 0, .65), inset 0 0 0 1px rgba(74, 222, 128, .28), inset 3px 0 0 #4ade80; }
body.app-page .form-success.app-flash > .app-icon { color: #4ade80; }
body.app-page .form-alert.app-flash { box-shadow: 0 26px 60px -12px rgba(0, 0, 0, .65), inset 0 0 0 1px rgba(255, 90, 140, .3), inset 3px 0 0 #ff5c8a; }
body.app-page .form-alert.app-flash > .app-icon { color: #ff7ea1; }
.toast-close { display: grid; place-items: center; width: 30px; height: 30px; flex: none; border: 0; border-radius: 8px; color: var(--on-dark-muted); background: transparent; cursor: pointer; transition: background .2s, color .2s; }
.toast-close:hover { color: #fff; background: rgba(255, 255, 255, .08); }
.toast-close .app-icon { width: 16px; height: 16px; vertical-align: 0; }
.toast-timer { position: absolute; inset: auto 0 0; height: 2px; background: var(--grad); transform-origin: left; display: none; }
[data-autohide] .toast-timer { display: block; animation: toastTimer 6s linear forwards; }
body.app-page .app-flash.is-leaving { animation: toastOut .38s ease forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateX(28px) scale(.96); } }
@keyframes toastOut { to { opacity: 0; transform: translateX(28px) scale(.96); } }
@keyframes toastTimer { to { transform: scaleX(0); } }

/* Console (dedicated administrator account) */
.app-avatar.is-console { background: conic-gradient(from 200deg, #1e9bf0, #7a32e8, #ee3a8f, #1e9bf0); box-shadow: 0 0 0 2px rgba(255, 255, 255, .08); }
body.is-console .side-brand { display: flex; align-items: center; gap: 8px; }
body.is-console .side-brand::after {
  content: "Console";
  padding: 2px 7px;
  border-radius: 5px;
  color: #fff;
  background: linear-gradient(110deg, rgba(47, 95, 224, .5), rgba(197, 54, 200, .5));
  font: 700 10px/1.5 var(--font-body);
  letter-spacing: .12em;
  text-transform: uppercase;
}
body.is-console .topbar { box-shadow: inset 0 -1px 0 rgba(197, 54, 200, .22); }
.side-mini body.is-console .side-brand::after { display: none; }
.admin-add { margin-top: 16px; padding: 14px 16px; border: 1px dashed var(--panel-line, rgba(255, 255, 255, .1)); border-radius: 10px; }
.login-admin-link { margin-top: 10px; font-size: 13px; opacity: .8; }

@media (max-width: 960px) {
  body.app-page .app-flash { top: 70px; right: 12px; left: 12px; width: auto; }
}

.verify-status { display: flex; gap: 16px; align-items: flex-start; margin: 18px 0 6px; }
.verify-status svg { width: 44px; height: 44px; flex: none; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.verify-card.is-ok .verify-status svg { stroke: #4ade80; }
.verify-card.is-bad .verify-status svg { stroke: #ff6b9a; }
.verify-status h1 { margin: 0 0 6px; font-size: 28px; }
.verify-status p { color: var(--on-dark-muted); }
.verify-card .registration-form { margin-top: 26px; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1180px) {
  .join-layout {
    grid-template-columns: 1fr;
  }

  .join-core {
    min-height: 320px;
  }

  .team-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .member-lead {
    grid-column: span 3;
    grid-template-columns: 1fr 1.4fr;
  }

  .member-lead .member-photo {
    aspect-ratio: 4 / 3.4;
  }
}

@media (max-width: 1024px) {
  .hero {
    padding: 150px 0 140px;
  }

  .hero-inner {
    grid-template-columns: 1fr;
    gap: 50px;
  }

  .hero-visual {
    max-width: 620px;
    width: 100%;
    margin: 0 auto;
  }

  .scroll-cue {
    display: none;
  }

  .about,
  .stats-inner,
  .department-command {
    grid-template-columns: 1fr;
    gap: 50px;
  }

  .about-media {
    max-width: 620px;
  }

  .values-grid,
  .news-grid,
  .project-grid,
  .objectives {
    grid-template-columns: repeat(2, 1fr);
  }

  .join-benefits {
    grid-template-columns: repeat(2, 1fr);
  }

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .gallery-grid a:nth-child(1) { grid-column: span 2; grid-row: span 1; }
  .gallery-grid a:nth-child(4),
  .gallery-grid a:nth-child(5) { grid-column: span 1; }
  .gallery-grid a:nth-child(6) { grid-column: span 2; }

  .timeline {
    grid-template-columns: 1fr;
    row-gap: 20px;
    padding-left: 36px;
  }

  .timeline::before,
  .timeline::after {
    left: 7px;
  }

  .timeline-item:nth-child(even) {
    margin-top: 0;
  }

  .timeline-item:nth-child(odd) .timeline-dot,
  .timeline-item:nth-child(even) .timeline-dot {
    left: -37px;
    right: auto;
  }

  .js .timeline-item:nth-child(odd)[data-reveal],
  .js .timeline-item:nth-child(even)[data-reveal] {
    transform: translateX(30px);
  }

  .js .timeline-item[data-reveal].is-visible {
    transform: none;
  }

  .cta-card {
    flex-direction: column;
    align-items: flex-start;
    padding: 56px 40px;
  }

  .gallery-photo-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .lightbox-panel {
    grid-template-columns: 1fr;
    overflow-y: auto;
  }

  .lightbox-image-wrap {
    min-height: 0;
    aspect-ratio: 4 / 3;
  }

  .lightbox-nav {
    top: auto;
    bottom: 22px;
    margin-top: 0;
  }
}

@media (max-width: 760px) {
  :root {
    --gutter: 16px;
  }

  .hero {
    min-height: auto;
    padding: 120px 0 130px;
  }

  .hero h1 {
    font-size: clamp(54px, 17vw, 80px);
  }

  .hero-lead {
    font-size: 16.5px;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .hero-or {
    text-align: center;
  }

  .floating-card {
    padding: 10px 14px 10px 10px;
  }

  .floating-card strong {
    font-size: 22px;
  }

  .floating-icon {
    width: 38px;
    height: 38px;
  }

  .floating-card-a { left: 0; }
  .floating-card-b { right: 0; }

  .highlights {
    grid-template-columns: 1fr;
    margin-top: -70px;
  }

  .ticker {
    margin-top: 50px;
  }

  .ticker span {
    font-size: 18px;
  }

  .section {
    padding: 84px 0;
  }

  .stats-band {
    padding: 84px 0;
  }

  .section-heading {
    margin-bottom: 40px;
  }

  .section-heading-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }

  .story-grid,
  .mv-grid,
  .values-grid,
  .news-grid,
  .project-grid,
  .objectives,
  .join-benefits,
  .gallery-photo-grid {
    grid-template-columns: 1fr;
  }

  .story-card,
  .mv-card {
    padding: 28px;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .stats-grid article {
    padding: 26px 20px;
  }

  .training-track {
    grid-auto-columns: 82%;
  }

  .filter-row {
    margin-top: -10px;
    border-radius: 12px;
  }

  .filter-row button {
    padding: 9px 15px;
  }

  .team-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }

  .member-lead {
    grid-column: span 2;
    grid-template-columns: 1fr;
  }

  .member-info {
    padding: 16px;
  }

  .member-info h3 {
    font-size: 17px;
  }

  .member-info p {
    display: none;
  }

  .member-lead .member-info p {
    display: block;
  }

  .command-screen {
    min-height: 380px;
    padding: 30px;
  }

  .department-node em {
    display: none;
  }

  .gallery-grid {
    grid-template-columns: 1fr 1fr;
    grid-auto-rows: 170px;
    gap: 12px;
  }

  .gallery-grid a {
    padding: 16px;
  }

  .gallery-grid span {
    font-size: 20px;
  }

  .gallery-grid a:nth-child(1) span {
    font-size: 28px;
  }

  .partner-logo {
    width: 170px;
    height: 100px;
  }

  .cta {
    padding-bottom: 84px;
  }

  .cta-card {
    padding: 44px 26px;
    border-radius: 12px;
  }

  .cta-card .btn {
    width: 100%;
  }

  .cta-word {
    font-size: 120px;
  }

  .footer-inner {
    grid-template-columns: 1fr 1fr;
    gap: 36px;
  }

  .footer-brand {
    grid-column: span 2;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }

  .to-top {
    right: 16px;
    bottom: 16px;
  }

  .page-hero {
    padding: 150px 0 90px;
  }

  .album-tabs {
    justify-content: flex-start;
  }

  .gallery-showcase-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .gallery-photo-info em {
    max-height: 3em;
    opacity: 1;
  }

  .gallery-lightbox {
    padding: 14px;
  }

  .lightbox-info {
    padding: 26px 22px 80px;
  }

  .lightbox-close {
    top: 12px;
    right: 12px;
  }

  .registration-card {
    padding: 32px 22px;
    border-radius: 12px;
  }

  .registration-nav .btn {
    --btn-pad: 0 16px;
    font-size: 14px;
  }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    transition-delay: 0ms !important;
  }

  .ticker-track,
  .partner-track {
    animation: none !important;
  }

  .js [data-reveal],
  .js [data-stagger] > *,
  .js .hero-anim,
  .js .line .word,
  .js [data-split] .split-inner {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
    clip-path: none !important;
  }
}


/* ==========================================================================
   Console: dashboard and public-site management
   ========================================================================== */
.member-initials { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; background: var(--grad); font: 700 54px var(--font-display); letter-spacing: -.02em; }

.app-link-button .app-icon { flex: none; }
.page-actions .btn .app-icon { margin-right: 4px; }

.quick-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.quick-action {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 14px;
  align-items: center;
  padding: 16px 18px;
  border: 1px solid var(--panel-line, rgba(255, 255, 255, .08));
  border-radius: 10px;
  background: rgba(255, 255, 255, .025);
  transition: border-color .2s ease, background .2s ease;
}
.quick-action:hover, .quick-action:focus-visible { border-color: rgba(79, 139, 255, .5); background: rgba(79, 139, 255, .07); }
.quick-action .app-icon { grid-row: span 2; width: 38px; height: 38px; padding: 9px; border-radius: 9px; color: #fff; background: linear-gradient(135deg, rgba(30, 155, 240, .35), rgba(238, 58, 143, .35)); vertical-align: 0; }
.quick-action strong { font-size: 15px; }
.quick-action span { color: var(--on-dark-muted); font-size: 13px; }

.todo-list, .site-parts { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.todo-list li { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--panel-line, rgba(255, 255, 255, .08)); border-radius: 8px; font-size: 14px; }
.todo-list li > span { flex: 1; }
.todo-list li > .app-icon { color: #9cc8ff; }
.site-parts a { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border: 1px solid var(--panel-line, rgba(255, 255, 255, .08)); border-radius: 8px; transition: border-color .2s ease; }
.site-parts a:hover { border-color: rgba(79, 139, 255, .45); }
.site-parts span { display: grid; flex: 1; }
.site-parts small { color: var(--on-dark-muted); font-size: 12.5px; }
.site-parts em { color: #9cc8ff; font-size: 13px; font-style: normal; }

/* List on the left, form on the right */
.site-layout { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(320px, 1fr); gap: 20px; align-items: start; }
.site-form { position: sticky; top: 78px; }
.site-list { display: grid; gap: 8px; }
.site-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 12px;
  border: 1px solid var(--panel-line, rgba(255, 255, 255, .08));
  border-radius: 9px;
  background: rgba(255, 255, 255, .02);
  transition: border-color .2s ease;
}
.site-item:hover { border-color: rgba(255, 255, 255, .16); }
.site-item.is-editing { border-color: rgba(79, 139, 255, .7); background: rgba(79, 139, 255, .07); }
.site-item.is-hidden .site-thumb, .site-item.is-hidden h3 { opacity: .45; }
.site-item h3 { font-size: 15px; }
.site-item .app-row-main { gap: 3px; }
.site-item .app-row-main p { font-size: 13.5px; }
.site-actions { flex-direction: column; align-items: flex-start; gap: 6px; }
.site-actions form { margin: 0; }

.site-thumb { display: grid; place-items: center; flex: none; overflow: hidden; border-radius: 7px; background: rgba(255, 255, 255, .06); }
.site-thumb img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; }
.site-thumb.is-portrait { width: 56px; height: 68px; }
.site-thumb.is-portrait span { color: #fff; font: 700 18px var(--font-display); }
.site-thumb.is-landscape { width: 96px; height: 64px; }
.site-thumb.is-logo { width: 96px; height: 56px; padding: 6px; background: #fff; }
.site-thumb.is-logo img { object-fit: contain; }

.order-buttons { display: grid; justify-items: center; gap: 2px; flex: none; }
.order-buttons form { margin: 0; }
.order-buttons .app-order { width: 26px; height: 22px; font-size: 12px; }
.order-btn { display: grid; place-items: center; width: 30px; height: 24px; padding: 0; border: 1px solid var(--panel-line, rgba(255, 255, 255, .1)); border-radius: 6px; color: #fff; background: rgba(255, 255, 255, .04); cursor: pointer; transition: background .2s ease, border-color .2s ease; }
.order-btn:hover:not(:disabled) { border-color: rgba(79, 139, 255, .6); background: rgba(79, 139, 255, .18); }
.order-btn:disabled { opacity: .25; cursor: default; }
.order-btn .app-icon { width: 15px; height: 15px; vertical-align: 0; }

/* Picture field with live preview */
.image-field { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 16px; align-items: center; margin-bottom: 6px; }
.image-field label { margin-top: 0; }
.image-field small { display: block; margin-top: 6px; font-size: 12.5px; }
.image-preview { position: relative; display: grid; place-items: center; overflow: hidden; border: 1px dashed rgba(255, 255, 255, .2); border-radius: 8px; background: rgba(255, 255, 255, .04); color: var(--on-dark-muted); font-size: 12px; text-align: center; }
.image-preview span { display: grid; justify-items: center; gap: 6px; padding: 6px; }
.image-preview span .app-icon { width: 22px; height: 22px; }
.image-preview img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; }
.image-preview[data-count]:not([data-count=""])::after { content: attr(data-count); position: absolute; right: 6px; bottom: 6px; padding: 2px 7px; border-radius: 10px; color: #fff; background: rgba(0, 0, 0, .7); font-size: 12px; font-weight: 700; }
.is-portrait .image-preview { width: 104px; height: 128px; }
.is-landscape .image-preview { width: 150px; height: 100px; }
.is-logo .image-preview { width: 150px; height: 90px; padding: 8px; background: #fff; }
.is-logo .image-preview img { object-fit: contain; }

/* Gallery */
.console-albums { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.console-albums a { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border: 1px solid var(--panel-line, rgba(255, 255, 255, .1)); border-radius: 999px; color: var(--on-dark-muted); font-size: 14px; font-weight: 600; }
.console-albums a span { min-width: 22px; padding: 1px 7px; border-radius: 10px; background: rgba(255, 255, 255, .08); font-size: 12px; text-align: center; }
.console-albums a:hover { color: #fff; border-color: rgba(255, 255, 255, .25); }
.console-albums a.is-active { color: #fff; border-color: transparent; background: linear-gradient(120deg, rgba(30, 155, 240, .35), rgba(238, 58, 143, .35)); }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.photo-card { margin: 0; overflow: hidden; border: 1px solid var(--panel-line, rgba(255, 255, 255, .08)); border-radius: 9px; background: rgba(255, 255, 255, .02); }
.photo-card.is-editing { border-color: rgba(79, 139, 255, .7); }
.photo-card.is-hidden img { opacity: .4; }
.photo-card img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.photo-card figcaption { display: grid; gap: 8px; padding: 10px 12px 12px; }
.photo-card strong { font-size: 14px; }
.photo-tools { display: flex; align-items: center; gap: 12px; }
.photo-tools .order-buttons { grid-auto-flow: column; }
.photo-tools .app-actions { flex-direction: column; align-items: flex-start; gap: 4px; font-size: 13px; }
.photo-tools form { margin: 0; }

/* Certificates */
.cert-ready { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.cert-ready > .app-icon { width: 40px; height: 40px; padding: 9px; border-radius: 50%; color: #0b2a17; background: #4ade80; vertical-align: 0; }
body.app-page .cert-ready h2 { margin: 0; padding: 0; border: 0; font-size: 17px; }
.cert-steps { display: grid; gap: 18px; }
.cert-step { margin: 0; padding: 16px 18px 18px; border: 1px solid var(--panel-line, rgba(255, 255, 255, .08)); border-radius: 10px; }
.cert-step legend { display: flex; align-items: center; gap: 10px; padding: 0 8px; font-weight: 700; }
.cert-step legend span { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; color: #fff; background: var(--grad); font-size: 13px; }
.field-title { margin: 14px 0 8px; font-weight: 600; font-size: 14.5px; }
.template-choice { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.template-option { position: relative; display: grid; justify-items: center; gap: 8px; margin: 0; padding: 12px 10px; border: 1px solid var(--panel-line, rgba(255, 255, 255, .1)); border-radius: 9px; font-size: 13.5px; font-weight: 600; cursor: pointer; transition: border-color .2s ease, background .2s ease; }
.template-option input { position: absolute; opacity: 0; }
.template-option:has(input:checked) { border-color: rgba(79, 139, 255, .8); background: rgba(79, 139, 255, .1); }
.template-option:has(input:focus-visible) { outline: 2px solid #9cc8ff; outline-offset: 2px; }
.template-mini { position: relative; display: grid; align-content: center; justify-items: center; gap: 5px; width: 92px; height: 64px; border-radius: 3px; background: #fbf9f4; }
.template-mini b { width: 52%; height: 4px; border-radius: 2px; background: #c9c1d8; }
.template-mini b + b { width: 34%; }
.template-mini i { width: 40%; height: 6px; border-radius: 2px; background: #2b2560; }
.template-mini em { position: absolute; right: 8px; bottom: 7px; width: 12px; height: 12px; border-radius: 50%; background: #c99a2e; }
.template-mini.is-prestige { box-shadow: inset 0 0 0 3px #fbf9f4, inset 0 0 0 5px #c99a2e; }
.template-mini.is-moderne { background: linear-gradient(90deg, #3a2a9a 0 18%, #fbf9f4 18%); }
.template-mini.is-moderne em { background: #3a2a9a; }
.template-mini.is-epure em { display: none; }
.table-search { width: min(280px, 100%); min-height: 38px; padding: 0 12px; border: 1px solid var(--panel-line, rgba(255, 255, 255, .12)); border-radius: 8px; color: #fff; background: rgba(255, 255, 255, .04); font: inherit; font-size: 14px; }

@media (max-width: 1180px) {
  .site-layout { grid-template-columns: 1fr; }
  .site-form { position: static; order: -1; }
  .quick-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .quick-grid, .template-choice { grid-template-columns: 1fr; }
  .site-item { flex-wrap: wrap; }
  .site-actions { flex-direction: row; flex-wrap: wrap; width: 100%; padding-left: 44px; }
  .image-field { grid-template-columns: 1fr; }
}
/* Checkboxes and radios keep their natural size inside forms */
.registration-form input[type="checkbox"],
.registration-form input[type="radio"] { width: 18px; height: 18px; min-height: 0; flex: none; margin: 0; padding: 0; accent-color: #4f8bff; box-shadow: none; }
.registration-form .app-check { font-weight: 500; font-size: 14.5px; cursor: pointer; }
.template-option input[type="radio"] { position: absolute; opacity: 0; }
.image-preview img[hidden] { display: none; }
body.app-page .app-card-head p { margin-top: 4px; font-weight: 400; font-size: 13.5px; }
.site-actions { flex-direction: row; flex-wrap: wrap; justify-content: flex-end; gap: 4px 14px; max-width: 220px; }
.site-actions .app-link-button, .photo-tools .app-link-button { display: inline-flex; align-items: center; white-space: nowrap; }
.app-card-head .table-search { flex: 0 1 280px; width: 280px; }

body.app-page .site-form { position: sticky; top: 78px; }
@media (max-width: 1180px) { body.app-page .site-form { position: relative; top: 0; } }

.photo-grid:empty { display: none; }
@media (max-width: 640px) { .site-actions { max-width: none; justify-content: flex-start; padding-left: 44px; } .site-item .app-row-main { flex-basis: 100%; padding-left: 44px; } }

/* Console: assistant settings */
.provider-choice { display: grid; gap: 8px; margin-bottom: 6px; }
.provider-option { display: flex; align-items: center; gap: 12px; margin: 0; padding: 12px 14px; border: 1px solid var(--panel-line, rgba(255, 255, 255, .1)); border-radius: 9px; cursor: pointer; transition: border-color .2s ease, background .2s ease; }
.provider-option:has(input:checked) { border-color: rgba(79, 139, 255, .8); background: rgba(79, 139, 255, .1); }
.provider-option span { display: grid; gap: 2px; }
.provider-option small { color: var(--on-dark-muted); font-size: 12.5px; font-weight: 400; }
.steps-list { display: grid; gap: 10px; margin: 0 0 16px; padding-left: 22px; line-height: 1.55; }
.steps-list a, .app-card .app-muted a { color: #9cc8ff; }
.steps-list code, .app-card .app-muted code { padding: 1px 6px; border-radius: 4px; background: rgba(255, 255, 255, .08); font-size: 13px; }
.ai-forget { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--panel-line, rgba(255, 255, 255, .08)); }
/* ==========================================================================
   Home: "Who We Are" — the long text sections gathered in one tabbed block
   ========================================================================== */
.discover { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 64px; align-items: center; }
.discover-media { aspect-ratio: 4 / 4.3; }
.discover-copy h2 { margin: 16px 0 24px; font-size: clamp(36px, 4.2vw, 54px); letter-spacing: -.035em; }
.discover-tabs { width: auto; max-width: 100%; margin: 0 0 24px; justify-content: flex-start; }
.discover-tabs button { padding: 9px 15px; }
.discover-panels { display: grid; }
.discover-panel {
  grid-area: 1 / 1;
  align-self: start;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity .35s ease, transform .5s var(--ease-out), visibility 0s linear .35s;
}
.discover-panel.is-active { opacity: 1; visibility: visible; transform: none; transition: opacity .45s ease .08s, transform .6s var(--ease-out) .08s; }
.discover-panel p { color: var(--muted); font-size: 16.5px; }
.discover-panel p + p { margin-top: 14px; }
.discover-panel .discover-lead { color: var(--ink); font-size: 20px; font-weight: 550; line-height: 1.5; }
.discover-panel .about-tags { margin-top: 24px; }

.discover-timeline { display: grid; gap: 22px; margin: 0; padding: 0 0 0 26px; border-left: 2px solid var(--line-strong); list-style: none; }
.discover-timeline li { position: relative; }
.discover-timeline li::before { content: ""; position: absolute; left: -33px; top: 3px; width: 12px; height: 12px; border: 2px solid var(--paper); border-radius: 50%; background: var(--grad); box-shadow: 0 0 0 4px rgba(122, 50, 232, .14); }
.discover-timeline span { color: var(--violet-deep); font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.discover-timeline h3 { margin: 4px 0 6px; font-size: 20px; }

.discover-duo { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.discover-duo article { padding: 22px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--paper); box-shadow: var(--shadow-sm); }
.discover-duo h3 { margin: 16px 0 8px; font-size: 19px; }
.discover-duo p { font-size: 15px; }

.discover-values, .discover-goals, .discover-benefits { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.discover-values { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.discover-values li { display: grid; gap: 4px; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--paper); transition: transform .4s var(--ease-out), box-shadow .4s ease; }
.discover-values li:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.discover-values .card-icon { width: 38px; height: 38px; margin-bottom: 8px; box-shadow: none; }
.discover-values .card-icon svg { width: 19px; height: 19px; }
.discover-values strong { font-family: var(--font-display); font-size: 16px; }
.discover-values small { color: var(--muted); font-size: 13.5px; line-height: 1.45; }

.discover-goals { grid-template-columns: repeat(2, minmax(0, 1fr)); counter-reset: goal; }
.discover-goals li { display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink-2); font-size: 14.5px; line-height: 1.45; counter-increment: goal; }
.discover-goals li::before { content: counter(goal, decimal-leading-zero); flex: none; min-width: 26px; font: 700 13px/1.6 var(--font-display); background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

.discover-benefits { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 24px; }
.discover-benefits li { padding: 13px 16px; border: 1px solid var(--line); border-radius: var(--radius); color: var(--muted); font-size: 15px; }
.discover-benefits strong { font-family: var(--font-display); background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

.discover-progress { height: 3px; margin-top: 26px; overflow: hidden; border-radius: 3px; background: var(--line); transition: opacity .4s ease; }
.discover-progress span { display: block; width: 100%; height: 100%; background: var(--grad); transform: scaleX(0); transform-origin: left; }
.discover-progress.is-running span { animation: discoverFill var(--discover-delay, 7s) linear forwards; }
.discover-copy:hover .discover-progress span, .discover-copy:focus-within .discover-progress span { animation-play-state: paused; }
.discover-progress.is-off { opacity: 0; }
@keyframes discoverFill { to { transform: scaleX(1); } }

@media (max-width: 1024px) {
  .discover { grid-template-columns: 1fr; gap: 44px; }
  .discover-media { max-width: 620px; aspect-ratio: 16 / 11; }
}

@media (max-width: 640px) {
  .discover-tabs button { padding: 8px 11px; font-size: 13px; }
  .discover-values { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .discover-duo, .discover-goals, .discover-benefits { grid-template-columns: 1fr; }
  .discover-panel .discover-lead { font-size: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  .discover-panel, .discover-panel.is-active { transition: none; transform: none; }
  .discover-progress { display: none; }
}
.discover-values li { align-content: start; }

/* ==========================================================================
   Treasury, online courses and LinkedIn sharing
   ========================================================================== */
.page-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; padding: 5px; border: 1px solid var(--panel-line, rgba(255, 255, 255, .08)); border-radius: 10px; background: var(--panel, rgba(14, 12, 40, .7)); }
.page-tabs a { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 7px; color: var(--on-dark-muted); font-size: 14px; font-weight: 600; transition: color .2s ease, background .2s ease; }
.page-tabs a:hover { color: #fff; background: rgba(255, 255, 255, .05); }
.page-tabs a.is-active { color: #fff; background: linear-gradient(120deg, rgba(30, 155, 240, .3), rgba(238, 58, 143, .3)); }
.page-tabs a span { min-width: 20px; padding: 0 6px; border-radius: 9px; background: rgba(255, 255, 255, .1); font-size: 12px; text-align: center; }
.page-tabs a span.is-hot { background: #ee3a8f; color: #fff; }

.season-pick { display: flex; align-items: center; gap: 8px; color: var(--on-dark-muted); font-size: 13.5px; }
.season-pick select { min-height: 38px; padding: 0 10px; border: 1px solid var(--panel-line, rgba(255, 255, 255, .12)); border-radius: 8px; color: #fff; background: #16143a; font: inherit; }

.is-in { color: #5eead4; }
.is-out { color: #ff8db7; }
strong.is-negative { background: none; -webkit-text-fill-color: #ff8db7; color: #ff8db7; }
.finance-quick { margin-bottom: 20px; }
.finance-chart { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); align-items: end; gap: 6px; height: 200px; padding-top: 10px; }
.finance-month { display: grid; grid-template-rows: 1fr auto; height: 100%; gap: 6px; text-align: center; }
.finance-month span { color: var(--on-dark-muted); font-size: 11px; }
.finance-bars { display: flex; align-items: flex-end; justify-content: center; gap: 3px; height: 100%; border-bottom: 1px solid var(--panel-line, rgba(255, 255, 255, .1)); }
.finance-bars i { width: 38%; min-height: 2px; border-radius: 3px 3px 0 0; }
.finance-bars i.is-in { background: linear-gradient(180deg, #5eead4, #1e9bf0); }
.finance-bars i.is-out { background: linear-gradient(180deg, #ff8db7, #c536c8); }
.finance-legend { display: flex; gap: 18px; margin-top: 12px; font-size: 13px; }
.finance-legend span::before { content: ""; display: inline-block; width: 10px; height: 10px; margin-right: 6px; border-radius: 3px; background: currentColor; vertical-align: -1px; }
.finance-split { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.finance-split li { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; font-size: 14px; }
.finance-split i { grid-column: 1 / -1; height: 6px; border-radius: 3px; background: linear-gradient(90deg, #c536c8, #ee3a8f); }
.finance-recent { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.finance-recent li { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--panel-line, rgba(255, 255, 255, .08)); border-radius: 8px; }
.finance-recent li > span:nth-child(2) { display: grid; flex: 1; min-width: 0; }
.finance-recent small { color: var(--on-dark-muted); font-size: 12.5px; }
.finance-recent em { font-style: normal; font-weight: 700; white-space: nowrap; }
.finance-dot { display: grid; place-items: center; width: 32px; height: 32px; flex: none; border-radius: 8px; background: rgba(94, 234, 212, .12); }
.finance-dot.is-out { background: rgba(255, 141, 183, .12); }
.finance-dot .app-icon { vertical-align: 0; }
.finance-layout { grid-template-columns: minmax(0, 1.7fr) minmax(320px, 1fr); }
.finance-side { display: grid; gap: 20px; align-content: start; }
.finance-side .site-form { position: static; }
.finance-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 14px; }
.finance-filters label { display: flex; align-items: center; gap: 6px; margin: 0; color: var(--on-dark-muted); font-size: 13px; }
.finance-filters input, .finance-filters select { min-height: 38px; padding: 0 10px; border: 1px solid var(--panel-line, rgba(255, 255, 255, .12)); border-radius: 8px; color: #fff; background: rgba(255, 255, 255, .04); font: inherit; font-size: 13.5px; color-scheme: dark; }
.finance-filters select option, .finance-filters select optgroup { background: #16143a; }
.finance-totals { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-bottom: 14px; padding: 12px 14px; border-radius: 8px; background: rgba(255, 255, 255, .03); color: var(--on-dark-muted); font-size: 13.5px; }
.finance-totals strong { margin-left: 4px; color: #fff; }
.finance-totals strong.is-in { color: #5eead4; }
.finance-totals strong.is-out { color: #ff8db7; }
.finance-table td small { display: block; margin-top: 2px; font-size: 12.5px; }
.app-table .num { text-align: right; white-space: nowrap; }
.app-table tr.is-editing td { background: rgba(79, 139, 255, .08); }
.kind-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 4px; }
.kind-switch label { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 0; padding: 12px; border: 1px solid var(--panel-line, rgba(255, 255, 255, .12)); border-radius: 9px; font-weight: 700; cursor: pointer; transition: border-color .2s ease, background .2s ease; }
.kind-switch input { position: absolute; opacity: 0; }
.kind-switch label.is-in:has(input:checked) { border-color: #5eead4; background: rgba(94, 234, 212, .1); }
.kind-switch label.is-out:has(input:checked) { border-color: #ff8db7; background: rgba(255, 141, 183, .1); }
.kind-switch label:has(input:focus-visible) { outline: 2px solid #9cc8ff; outline-offset: 2px; }
.dues-member { display: flex; align-items: center; gap: 10px; }
.dues-member > span:last-child { display: grid; }
.dues-form { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.dues-form input, .dues-form select { width: 96px; min-height: 36px; padding: 0 8px; border: 1px solid var(--panel-line, rgba(255, 255, 255, .12)); border-radius: 7px; color: #fff; background: rgba(255, 255, 255, .04); font: inherit; font-size: 13.5px; }
.dues-form select { width: auto; background: #16143a; }
.budget-list { display: grid; gap: 12px; }
.budget-card { padding: 16px; border: 1px solid var(--panel-line, rgba(255, 255, 255, .08)); border-radius: 10px; }
.budget-card.is-over { border-color: rgba(255, 141, 183, .5); }
.budget-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.budget-head h3 { margin: 0; font-size: 16px; }
.budget-line { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; margin: 10px 0 6px; color: var(--on-dark-muted); font-size: 13.5px; }
.budget-line strong { color: #fff; }
.budget-bar { height: 8px; overflow: hidden; border-radius: 4px; background: rgba(255, 255, 255, .08); }
.budget-bar i { display: block; height: 100%; border-radius: 4px; background: var(--grad); }
.budget-card.is-over .budget-bar i { background: #ff5c93; }
.report-tools { margin-bottom: 16px; }
.finance-report { padding: 40px; border-radius: 12px; color: #1d1530; background: #fff; }
.finance-report header { display: flex; align-items: center; gap: 22px; padding-bottom: 20px; border-bottom: 3px solid #7a32e8; }
.finance-report header img { width: 150px; filter: brightness(0) saturate(100%) invert(18%) sepia(60%) saturate(2400%) hue-rotate(255deg); }
.finance-report h2 { margin: 0 0 4px; color: #1d1530; font-size: 24px; }
.finance-report header p { margin: 0; color: #5b4f6b; font-size: 13.5px; }
.report-summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 24px 0; }
.report-summary div { display: grid; gap: 4px; padding: 14px; border-radius: 8px; background: #f6f2fb; }
.report-summary span { color: #5b4f6b; font-size: 12.5px; }
.report-summary strong { font-size: 19px; }
.finance-report .is-in { color: #0f8a6c; }
.finance-report .is-out { color: #c2185b; }
.report-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.report-columns h3 { margin: 0 0 10px; font-size: 15px; }
.report-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.report-table td, .report-table th { padding: 8px 0; border-bottom: 1px solid #ece6f3; text-align: left; }
.report-table .num { text-align: right; }
.report-table tfoot th { border-bottom: 0; border-top: 2px solid #1d1530; }
.report-note { margin-top: 20px; color: #5b4f6b; font-size: 13.5px; }
.report-signatures { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; margin-top: 50px; }
.report-signatures div { height: 90px; border-bottom: 1px solid #1d1530; }
.report-signatures span { font-size: 13px; font-weight: 600; }
@media print {
  body.app-page { background: #fff !important; }
  body.app-page .side, body.app-page .topbar, body.app-page .dock, body.app-page .page-head, body.app-page .page-tabs, body.app-page .report-tools, body.app-page .app-flash, .nav-progress { display: none !important; }
  body.app-page .shell-main { margin: 0 !important; padding: 0 !important; }
  body.app-page .app-main { padding: 0 !important; }
  .finance-report { padding: 0; }
}

/* Courses */
.course-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.course-card { display: grid; overflow: hidden; border: 1px solid var(--panel-line, rgba(255, 255, 255, .08)); border-radius: 12px; background: rgba(255, 255, 255, .02); transition: transform .35s var(--ease-out), border-color .25s ease; }
.course-card:hover { transform: translateY(-3px); border-color: rgba(79, 139, 255, .5); }
.course-cover { display: grid; place-items: center; aspect-ratio: 16 / 9; overflow: hidden; color: rgba(255, 255, 255, .7); background: linear-gradient(135deg, #142a7a, #3a1a8f 55%, #8a2378); }
.course-cover img { width: 100%; height: 100%; object-fit: cover; }
.course-cover .app-icon { width: 42px; height: 42px; }
.course-body { display: grid; gap: 8px; align-content: start; padding: 14px 16px 16px; }
.course-body strong { font-size: 16px; line-height: 1.3; }
.course-body > small { color: var(--on-dark-muted); font-size: 13px; line-height: 1.45; }
.course-body .course-meta { font-size: 12.5px; }
.course-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.course-status.is-published { color: #c9f7d9; border-color: rgba(74, 222, 128, .4); background: rgba(74, 222, 128, .1); }
.course-status.is-pending { color: #ffe3a3; border-color: rgba(250, 204, 21, .4); background: rgba(250, 204, 21, .1); }
.course-status.is-refused { color: #ffd0de; border-color: rgba(255, 90, 140, .4); background: rgba(255, 70, 120, .1); }
.course-state { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 16px; }
.course-state p { margin: 6px 0 0; color: var(--on-dark-muted); font-size: 14px; }
.course-state.is-refused { border-color: rgba(255, 90, 140, .4); }
.studio-empty h2 { margin-top: 0; }
.studio-form { max-width: 860px; }
.danger-zone { margin-top: 22px; padding-top: 14px; border-top: 1px solid var(--panel-line, rgba(255, 255, 255, .08)); }
.app-narrow-field { flex: 0 0 140px !important; }
.grading-list { display: grid; gap: 12px; }
.grading-card { padding: 16px; border: 1px solid var(--panel-line, rgba(255, 255, 255, .08)); border-radius: 10px; }
.grading-card.is-pending { border-color: rgba(250, 204, 21, .45); }
.grading-card header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.grading-card header div { display: grid; }
.grading-text { margin-bottom: 10px; padding: 12px; border-radius: 8px; background: rgba(255, 255, 255, .03); font-size: 14.5px; line-height: 1.6; overflow-wrap: anywhere; }
.grading-text a, .lesson-body a, .course-description a { color: #9cc8ff; }
.grading-form { margin-top: 6px; }

.preview-banner { display: flex; align-items: center; gap: 8px; margin: 0 0 16px; padding: 10px 14px; border-radius: 8px; color: #ffe3a3; background: rgba(250, 204, 21, .1); font-size: 14px; }
.course-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 28px; align-items: center; margin-bottom: 20px; padding: 22px; border: 1px solid var(--panel-line, rgba(255, 255, 255, .08)); border-radius: 12px; background: var(--panel, rgba(14, 12, 40, .7)); }
.course-hero-cover { display: grid; place-items: center; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 10px; background: linear-gradient(135deg, #142a7a, #3a1a8f 55%, #8a2378); color: rgba(255, 255, 255, .7); }
.course-hero-cover img { width: 100%; height: 100%; object-fit: cover; }
.course-hero-cover .app-icon { width: 60px; height: 60px; }
.course-summary { margin: 14px 0; font-size: 18px; line-height: 1.55; }
.course-facts { display: grid; gap: 8px; margin: 0 0 20px; padding: 0; list-style: none; color: var(--on-dark-muted); font-size: 14.5px; }
.course-facts .app-icon { margin-right: 6px; color: #9cc8ff; }
.course-description { font-size: 15px; line-height: 1.7; }
.course-trainer { display: flex; align-items: center; gap: 12px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--panel-line, rgba(255, 255, 255, .08)); }
.course-trainer > span:last-child { display: grid; }
.course-progress { display: grid; gap: 8px; margin-bottom: 16px; color: var(--on-dark-muted); font-size: 14px; }
.course-progress strong { color: #fff; font-size: 18px; }
.course-done { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-bottom: 16px; }
.course-done > .app-icon { width: 42px; height: 42px; padding: 9px; border-radius: 50%; color: #1d1530; background: #ffd166; vertical-align: 0; }
body.app-page .course-done h2 { margin: 0; padding: 0; border: 0; font-size: 18px; }
.course-player { display: grid; grid-template-columns: minmax(250px, 320px) minmax(0, 1fr); gap: 20px; align-items: start; }
.course-nav { position: sticky; top: 78px; }
body.app-page .course-nav { position: sticky; top: 78px; }
.course-outline { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }
.course-outline a, .course-outline.is-static li { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; padding: 10px; border-radius: 8px; font-size: 14px; }
.course-outline.is-static li .app-icon { color: #9cc8ff; }
.course-outline small { color: var(--on-dark-muted); font-size: 12px; white-space: nowrap; }
.course-outline a:hover { background: rgba(255, 255, 255, .05); }
.course-outline li.is-current a { background: rgba(79, 139, 255, .16); }
.outline-mark { display: grid; place-items: center; width: 26px; height: 26px; border: 1px solid rgba(255, 255, 255, .2); border-radius: 50%; color: var(--on-dark-muted); font-size: 12px; font-weight: 700; }
.outline-mark .app-icon { width: 14px; height: 14px; vertical-align: 0; }
.course-outline li.is-done .outline-mark { border-color: transparent; color: #0b2a17; background: #4ade80; }
.course-outline li.is-waiting .outline-mark { border-color: #facc15; color: #facc15; }
.course-outline li.is-failed .outline-mark { border-color: #ff8db7; color: #ff8db7; }
.course-outline li.is-task { margin-top: 2px; }
.stage-kicker { margin: 0; color: #9cc8ff; font-size: 13px; font-weight: 600; }
.stage-title { margin: 6px 0 16px; font-size: 24px; }
body.app-page .course-stage > h2.stage-title { margin: 6px 0 16px; padding: 0; border: 0; font-size: 24px; }
.lesson-video { position: relative; aspect-ratio: 16 / 9; overflow: hidden; margin-bottom: 18px; border-radius: 10px; background: #000; }
.lesson-video iframe, .lesson-video video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.lesson-body { margin-bottom: 18px; font-size: 15.5px; line-height: 1.75; overflow-wrap: anywhere; }
.lesson-file { display: inline-flex; align-items: center; gap: 12px; margin-bottom: 18px; padding: 12px 16px; border: 1px solid var(--panel-line, rgba(255, 255, 255, .12)); border-radius: 10px; }
.lesson-file:hover { border-color: rgba(79, 139, 255, .6); }
.lesson-file > span { display: grid; }
.lesson-file small { color: var(--on-dark-muted); font-size: 12.5px; }
.stage-actions { display: flex; flex-wrap: wrap; gap: 10px; padding-top: 16px; border-top: 1px solid var(--panel-line, rgba(255, 255, 255, .08)); }
.grade-box { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; padding: 14px 16px; border: 1px solid var(--panel-line, rgba(255, 255, 255, .12)); border-radius: 10px; font-size: 14px; }
.grade-box strong { font-size: 22px; }
.grade-box.is-ok { border-color: rgba(74, 222, 128, .45); background: rgba(74, 222, 128, .08); }
.grade-box.is-off { border-color: rgba(255, 90, 140, .45); background: rgba(255, 70, 120, .08); }
.trainer-cta { border-color: rgba(122, 50, 232, .45); background: linear-gradient(120deg, rgba(30, 155, 240, .1), rgba(238, 58, 143, .1)), var(--panel, rgba(14, 12, 40, .7)); }
.review-row { flex-wrap: wrap; }
.review-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.review-refuse { display: flex; gap: 6px; }
.review-refuse input { min-height: 36px; padding: 0 10px; border: 1px solid var(--panel-line, rgba(255, 255, 255, .12)); border-radius: 7px; color: #fff; background: rgba(255, 255, 255, .04); font: inherit; font-size: 13.5px; }
#certifier .app-row select { min-height: 36px; padding: 0 8px; border: 1px solid var(--panel-line, rgba(255, 255, 255, .12)); border-radius: 7px; color: #fff; background: #16143a; font: inherit; font-size: 13.5px; }
.treasurer-check { grid-column: 1 / -1; }

/* LinkedIn */
.li-button .li-icon, .li-link .li-icon { width: 15px; height: 15px; vertical-align: -2px; }
.btn.li-button { gap: 8px; }
.btn.btn-primary.li-button { background: #0a66c2; box-shadow: 0 10px 24px -10px rgba(10, 102, 194, .8); }
.btn.btn-primary.li-button:hover { background: #004182; }
.btn-ghost-dark.li-button:hover { border-color: #0a66c2; color: #fff; background: #0a66c2; }
.li-actions { margin-top: 4px; }
.timeline-share { display: inline-flex; align-items: center; gap: 6px; margin-top: 12px; color: #0a66c2; font-size: 13px; font-weight: 700; }
.timeline-share svg { width: 15px; height: 15px; fill: currentColor; }
.timeline-share:hover { text-decoration: underline; }
.verify-share, .event-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0; }
.event-card h1 { margin: 6px 0 10px; font-size: clamp(28px, 4vw, 40px); }
.event-date { display: flex; align-items: center; gap: 8px; color: var(--on-dark-muted); }
.event-text { margin: 18px 0; font-size: 16px; line-height: 1.7; }
.event-join { color: var(--on-dark-muted); }
.event-join a { color: #9cc8ff; }

@media (max-width: 1180px) {
  .finance-layout { grid-template-columns: 1fr; }
  .course-player { grid-template-columns: 1fr; }
  .course-nav, body.app-page .course-nav { position: static; }
  .report-summary { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .course-hero { grid-template-columns: 1fr; }
  .report-columns { grid-template-columns: 1fr; }
  .finance-chart { gap: 3px; }
  .finance-report { padding: 22px; }
}
.finance-filters select, .finance-filters input[type='search'] { width: auto; flex: 1 1 190px; }
.finance-filters input[type='date'] { width: auto; }

/* ==========================================================================
   Folding sidebar groups and light mode
   ========================================================================== */
.side-group { display: grid; }
.side-group-toggle {
  display: flex; align-items: center; gap: 8px; width: 100%; margin: 10px 0 2px; padding: 6px 10px;
  border: 0; border-radius: 7px; color: rgba(240, 230, 250, .45); background: transparent;
  font: 700 11px/1.4 var(--font-body); letter-spacing: .12em; text-transform: uppercase; text-align: left; cursor: pointer;
  transition: color .2s ease, background .2s ease;
}
.side-group-toggle:hover { color: rgba(240, 230, 250, .85); background: rgba(255, 255, 255, .03); }
.side-group-toggle .side-text { flex: 1; }
.side-chevron { width: 14px; height: 14px; transition: transform .25s var(--ease-out); }
.side-group.is-open .side-chevron { transform: rotate(90deg); }
.side-group-badge { margin-left: 0; letter-spacing: 0; }
.side-group.is-open .side-group-badge { display: none; }
.side-group-items { display: none; gap: 2px; }
.side-group.is-open .side-group-items { display: grid; animation: groupOpen .25s var(--ease-out); }
@keyframes groupOpen { from { opacity: 0; transform: translateY(-4px); } }
.side-nav > .side-link { margin-top: 4px; }
/* Icon rail: no folding, every icon visible, a thin line between groups. */
.side-mini .side-group-toggle { height: 1px; margin: 8px 14px; padding: 0; background: var(--panel-line); pointer-events: none; }
.side-mini .side-group-toggle > * { display: none; }
.side-mini .side-group-items { display: grid; animation: none; }

.theme-toggle { flex: none; }
.theme-toggle .theme-moon { display: none; }
.theme-light .theme-toggle .theme-sun { display: none; }
.theme-light .theme-toggle .theme-moon { display: block; }
::view-transition-old(root), ::view-transition-new(root) { mix-blend-mode: normal; }

/* ---------- Light mode ---------- */
html.theme-light { color-scheme: light; }
html.theme-light body.app-page {
  --shell-bg: #f4f2fa; --panel: #ffffff; --panel-line: rgba(30, 20, 60, .1); --on-dark-muted: #675b7a;
  color: #1d1530;
  background: radial-gradient(ellipse 60% 40% at 100% 0%, rgba(122, 50, 232, .07), transparent 70%), radial-gradient(ellipse 50% 40% at 0% 100%, rgba(30, 155, 240, .06), transparent 70%), var(--shell-bg);
}
html.theme-light body.app-page .side { background: #fff; }
html.theme-light .side-brand img, html.theme-light .topbar-brand img { filter: brightness(0) saturate(100%) invert(14%) sepia(52%) saturate(2800%) hue-rotate(250deg) brightness(.9); }
html.theme-light .side-group-toggle, html.theme-light .side-label { color: rgba(29, 21, 48, .48); }
html.theme-light .side-group-toggle:hover { color: #1d1530; background: rgba(30, 20, 60, .04); }
html.theme-light .side-link { color: #4a3f5e; }
html.theme-light .side-link:hover { color: #1d1530; background: rgba(30, 20, 60, .05); }
html.theme-light .side-link.is-active { color: #1d1530; background: linear-gradient(90deg, rgba(47, 95, 224, .13), rgba(122, 50, 232, .04)); }
html.theme-light .side-link.is-active .app-icon { color: #2f5fe0; }
html.theme-light .side-glide { background: rgba(30, 20, 60, .05); box-shadow: inset 0 0 0 1px rgba(30, 20, 60, .04); }
html.theme-light .side-me, html.theme-light .side-search { background: rgba(30, 20, 60, .025); }
html.theme-light .side-search:hover, html.theme-light .side-icon-btn:hover { color: #1d1530; background: rgba(30, 20, 60, .05); }
html.theme-light .side-mini [data-tip]:hover::after { color: #fff; background: #1d1530; }
html.theme-light .side-backdrop { background: rgba(29, 21, 48, .35); }
html.theme-light .topbar { background: rgba(255, 255, 255, .86); }
html.theme-light .topbar-crumb strong { color: #1d1530; }
html.theme-light .topbar-search { background: rgba(30, 20, 60, .03); }
html.theme-light .topbar-search:hover { border-color: rgba(30, 20, 60, .2); }
html.theme-light .app-page kbd, html.theme-light .palette kbd { border-color: rgba(30, 20, 60, .16); }
html.theme-light body.app-page .app-card, html.theme-light body.app-page .app-stats { box-shadow: 0 1px 2px rgba(30, 20, 60, .04), 0 10px 28px -12px rgba(30, 20, 60, .12); }
html.theme-light body.app-page a.app-stat:hover { background: rgba(30, 20, 60, .025); }
html.theme-light .app-hero, html.theme-light .course-hero { background: #fff; border-color: var(--panel-line); }
html.theme-light :is(.app-row, .app-tile, .app-list li, .app-team li, .site-item, .quick-action, .todo-list li, .site-parts a, .finance-recent li, .budget-card, .grading-card, .cert-step, .template-option, .provider-option, .photo-card, .course-card, .lesson-file, .grade-box, .kind-switch label, .bureau-card, .roll-row, .order-btn, .dues-form input, .page-tabs, .console-albums a, .app-tabs) {
  border-color: var(--panel-line); background-color: rgba(30, 20, 60, .018);
}
html.theme-light :is(.site-item, .quick-action, .site-parts a, .course-card, .lesson-file, .bureau-card):hover { border-color: rgba(47, 95, 224, .45); }
html.theme-light .site-item.is-editing, html.theme-light .photo-card.is-editing { border-color: rgba(47, 95, 224, .7); background: rgba(47, 95, 224, .06); }
html.theme-light .app-table th, html.theme-light .app-table td { border-bottom-color: var(--panel-line); }
html.theme-light .app-table a { color: #1d1530; }
html.theme-light .app-table tr.is-editing td { background: rgba(47, 95, 224, .07); }
html.theme-light .registration-form label { color: #2a2140; }
html.theme-light :is(.app-page input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), .app-page textarea, .app-page select, .registration-form input:not([type="checkbox"]):not([type="radio"]), .registration-form select, .season-pick select, .finance-filters input, .finance-filters select, .dues-form input, .dues-form select, .review-refuse input, #certifier .app-row select, .table-search) {
  color: #1d1530; border-color: rgba(30, 20, 60, .18); background-color: #fff;
}
html.theme-light :is(.app-page input, .app-page textarea, .registration-form input):hover { border-color: rgba(30, 20, 60, .3); }
html.theme-light :is(.finance-filters, .season-pick, .dues-form) :is(input, select) { color-scheme: light; }
html.theme-light :is(.finance-filters, .season-pick, .dues-form) :is(select option, select optgroup) { background: #fff; }
html.theme-light .app-page input::placeholder, html.theme-light .app-page textarea::placeholder { color: rgba(29, 21, 48, .4); }
html.theme-light .btn-ghost-dark { color: #1d1530; border-color: rgba(30, 20, 60, .16); background: rgba(30, 20, 60, .035); }
html.theme-light .btn-ghost-dark:hover { background: rgba(30, 20, 60, .08); }
html.theme-light .btn-glass { color: #1d1530; border-color: rgba(30, 20, 60, .16); background: rgba(30, 20, 60, .04); }
html.theme-light .app-link-button, html.theme-light .app-empty a, html.theme-light .app-card p a, html.theme-light .app-team a, html.theme-light .app-list a, html.theme-light .steps-list a, html.theme-light .app-card .app-muted a, html.theme-light :is(.grading-text, .lesson-body, .course-description) a { color: #2f5fe0; }
html.theme-light .app-link-button.is-danger { color: #cc2763; }
html.theme-light .app-empty { border-color: rgba(30, 20, 60, .16); }
html.theme-light .app-badge { color: #2f4fb8; border-color: rgba(47, 95, 224, .3); background: rgba(47, 95, 224, .07); }
html.theme-light .app-badge.is-ok, html.theme-light .course-status.is-published { color: #0f7a43; border-color: rgba(22, 163, 74, .32); background: rgba(22, 163, 74, .09); }
html.theme-light .app-badge.is-off, html.theme-light .course-status.is-refused { color: #c0265e; border-color: rgba(225, 29, 72, .3); background: rgba(225, 29, 72, .07); }
html.theme-light .course-status.is-pending { color: #8a5a00; border-color: rgba(202, 138, 4, .35); background: rgba(250, 204, 21, .14); }
html.theme-light .app-callout, html.theme-light body.app-page .app-callout { background: linear-gradient(120deg, rgba(30, 155, 240, .07), rgba(238, 58, 143, .07)), #fff; }
html.theme-light .trainer-cta { background: linear-gradient(120deg, rgba(30, 155, 240, .07), rgba(238, 58, 143, .07)), #fff; }
html.theme-light .welcome { background: linear-gradient(115deg, rgba(30, 155, 240, .09), rgba(122, 50, 232, .06) 45%, rgba(238, 58, 143, .05)), #fff; }
html.theme-light .welcome-label { color: rgba(29, 21, 48, .5); }
html.theme-light body.app-page .app-flash { color: #1d1530; background: rgba(255, 255, 255, .97); box-shadow: 0 24px 50px -16px rgba(30, 20, 60, .35), inset 0 0 0 1px rgba(30, 20, 60, .08); }
html.theme-light .toast-close:hover { color: #1d1530; background: rgba(30, 20, 60, .06); }
html.theme-light .app-progress, html.theme-light .budget-bar { background: rgba(30, 20, 60, .08); }
html.theme-light .app-msg.is-bot { background: rgba(30, 20, 60, .05); }
html.theme-light .app-chat-suggestions button { color: #2f4fb8; border-color: rgba(47, 95, 224, .3); background: rgba(47, 95, 224, .06); }
html.theme-light .app-levels span { border-color: rgba(30, 20, 60, .16); }
html.theme-light .app-score span { color: #3a2d50; }
html.theme-light .app-bullet::before { color: #2f5fe0; }
html.theme-light .roll-actions button:hover { color: #1d1530; background: rgba(30, 20, 60, .06); }
html.theme-light .bureau-card span { color: #7a32e8; }
html.theme-light .palette { color: #1d1530; border-color: rgba(30, 20, 60, .12); background: #fff; box-shadow: 0 30px 80px rgba(30, 20, 60, .3); }
html.theme-light body.app-page .palette-input input { color: #1d1530; }
html.theme-light .palette-list li[role="option"] { color: #3a2d50; }
html.theme-light .palette-list li.is-active { color: #1d1530; background: rgba(47, 95, 224, .1); }
html.theme-light .palette-group { color: rgba(29, 21, 48, .45); }
html.theme-light .dock { border-color: rgba(30, 20, 60, .1); background: rgba(255, 255, 255, .94); box-shadow: 0 12px 40px -10px rgba(30, 20, 60, .3); }
html.theme-light .dock a, html.theme-light .dock button { color: #675b7a; }
html.theme-light .dock .is-active { color: #1d1530; background: rgba(47, 95, 224, .1); }
html.theme-light .dock .is-active .app-icon { color: #2f5fe0; }
html.theme-light .page-tabs a:hover { color: #1d1530; background: rgba(30, 20, 60, .05); }
html.theme-light .page-tabs a.is-active, html.theme-light .console-albums a.is-active { color: #1d1530; background: linear-gradient(120deg, rgba(30, 155, 240, .16), rgba(238, 58, 143, .14)); }
html.theme-light .page-tabs a span, html.theme-light .console-albums a span { background: rgba(30, 20, 60, .08); }
html.theme-light .page-tabs a span.is-hot { color: #fff; background: #ee3a8f; }
html.theme-light .console-albums a:hover { color: #1d1530; }
html.theme-light .order-btn { color: #1d1530; }
html.theme-light .order-btn:hover:not(:disabled) { background: rgba(47, 95, 224, .12); }
html.theme-light .app-order { background: rgba(30, 20, 60, .06); }
html.theme-light .image-preview { border-color: rgba(30, 20, 60, .2); background: rgba(30, 20, 60, .03); }
html.theme-light .site-thumb { background: rgba(30, 20, 60, .05); }
html.theme-light .site-thumb.is-portrait span { color: #2f5fe0; }
html.theme-light .quick-action .app-icon { color: #fff; }
html.theme-light .todo-list li > .app-icon, html.theme-light .course-facts .app-icon, html.theme-light .course-outline.is-static li .app-icon { color: #2f5fe0; }
html.theme-light .site-parts em, html.theme-light .stage-kicker { color: #2f5fe0; }
html.theme-light .is-in, html.theme-light .finance-totals strong.is-in { color: #0f8a6c; }
html.theme-light .is-out, html.theme-light .finance-totals strong.is-out { color: #c2185b; }
html.theme-light strong.is-negative { color: #c2185b; -webkit-text-fill-color: #c2185b; }
html.theme-light .finance-totals { background: rgba(30, 20, 60, .03); }
html.theme-light .finance-totals strong, html.theme-light .budget-line strong, html.theme-light .course-progress strong { color: #1d1530; }
html.theme-light .finance-dot { background: rgba(15, 138, 108, .1); }
html.theme-light .finance-dot.is-out { background: rgba(194, 24, 91, .08); }
html.theme-light .kind-switch label.is-in:has(input:checked) { border-color: #0f8a6c; background: rgba(15, 138, 108, .08); }
html.theme-light .kind-switch label.is-out:has(input:checked) { border-color: #c2185b; background: rgba(194, 24, 91, .07); }
html.theme-light .grading-text { background: rgba(30, 20, 60, .035); }
html.theme-light .outline-mark { border-color: rgba(30, 20, 60, .2); }
html.theme-light .course-outline a:hover { background: rgba(30, 20, 60, .045); }
html.theme-light .course-outline li.is-current a { background: rgba(47, 95, 224, .1); }
html.theme-light .preview-banner { color: #8a5a00; background: rgba(250, 204, 21, .16); }
html.theme-light .grade-box.is-ok { background: rgba(22, 163, 74, .07); }
html.theme-light .grade-box.is-off { background: rgba(225, 29, 72, .06); }
html.theme-light .steps-list code, html.theme-light .app-card .app-muted code { background: rgba(30, 20, 60, .06); }
html.theme-light .template-mini { box-shadow: 0 0 0 1px rgba(30, 20, 60, .1); }
html.theme-light .template-mini.is-prestige { box-shadow: inset 0 0 0 3px #fbf9f4, inset 0 0 0 5px #c99a2e, 0 0 0 1px rgba(30, 20, 60, .1); }
html.theme-light .side-mini .side-group-toggle { background: var(--panel-line); }
html.theme-light .finance-bars { border-bottom-color: var(--panel-line); }
html.theme-light .app-page input[type="file"] { color: #675b7a; }
html.theme-light .page-eyebrow { color: #2f5fe0; }
html.theme-light body.is-console .side-brand::after { color: #fff; background: linear-gradient(120deg, #2f5fe0, #c536c8); }
html.theme-light .quick-action .app-icon { background: var(--grad); }
html.theme-light .app-chat-log { border-color: var(--panel-line); }
/* ==========================================================================
   Courses, Coursera style: visual catalogue, presentation page, player, quiz
   ========================================================================== */
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Stars: gold up to the rating */
.stars { display: inline-block; font-size: 14px; line-height: 1; letter-spacing: 1px; vertical-align: -1px; }
.stars::before { content: "★★★★★"; background: linear-gradient(90deg, #f5b301 var(--pct), rgba(150, 140, 170, .45) var(--pct)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stars.is-large { font-size: 20px; }

/* Catalogue */
.course-feature { position: relative; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 28px; align-items: center; overflow: hidden; padding: 28px; border-radius: 16px; color: #fff; background: #120d33; isolation: isolate; }
.course-feature::before { content: ""; position: absolute; inset: -40px; z-index: -2; background: var(--cover, linear-gradient(120deg, #1e9bf0, #7a32e8, #ee3a8f)) center / cover; filter: blur(34px) saturate(1.3); opacity: .9; }
.course-feature::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(10, 7, 30, .86) 30%, rgba(10, 7, 30, .35)); }
.course-feature-text { display: grid; gap: 10px; justify-items: start; }
.course-feature-tag { padding: 4px 10px; border-radius: 999px; background: rgba(255, 255, 255, .14); font-size: 12px; font-weight: 700; }
.course-feature strong { font: 700 clamp(24px, 3vw, 34px)/1.15 var(--font-display); letter-spacing: -.02em; }
.course-feature-text > span:not(.course-feature-tag):not(.btn) { color: rgba(255, 255, 255, .82); }
.course-feature-meta { font-size: 13.5px; }
.course-feature-media { position: relative; display: grid; place-items: center; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 12px; background: linear-gradient(135deg, #142a7a, #3a1a8f 55%, #8a2378); box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .7); }
.course-feature-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease-out); }
.course-feature:hover .course-feature-media img { transform: scale(1.04); }
.course-play { position: absolute; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; color: #1d1530; background: rgba(255, 255, 255, .92); box-shadow: 0 10px 30px rgba(0, 0, 0, .35); transition: transform .3s var(--ease-out); }
.course-play .app-icon { width: 20px; height: 20px; vertical-align: 0; }
.course-play.is-big { width: 64px; height: 64px; }
.course-play.is-big .app-icon { width: 28px; height: 28px; }
.course-feature:hover .course-play, .course-card:hover .course-play, .resume-card:hover .course-play { transform: scale(1.08); }
.course-shelf { display: grid; gap: 14px; }
.course-shelf h2 { margin: 0; font-size: 20px; }
.shelf-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.category-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.category-chips button { padding: 7px 14px; border: 1px solid var(--panel-line, rgba(255, 255, 255, .12)); border-radius: 999px; color: var(--on-dark-muted); background: transparent; font: 600 13px var(--font-body); cursor: pointer; transition: all .2s ease; }
.category-chips button:hover { color: inherit; border-color: rgba(79, 139, 255, .5); }
.category-chips button.is-active { color: #fff; border-color: transparent; background: var(--grad); }
.course-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.course-card { position: relative; background: var(--panel, rgba(14, 12, 40, .7)); }
.course-cover { position: relative; }
.course-cover img { transition: transform .7s var(--ease-out); }
.course-card:hover .course-cover img { transform: scale(1.05); }
.course-cover .course-play { opacity: 0; }
.course-card:hover .course-cover .course-play { opacity: 1; }
.course-cover .course-status { position: absolute; top: 10px; left: 10px; }
.course-level { position: absolute; left: 10px; bottom: 10px; padding: 3px 9px; border-radius: 6px; color: #fff; background: rgba(10, 7, 30, .72); backdrop-filter: blur(6px); font-size: 11.5px; font-weight: 700; }
.course-trainer-line { display: flex; align-items: center; gap: 8px; color: var(--on-dark-muted); font-size: 12.5px; }
.course-trainer-line .app-avatar { width: 24px; height: 24px; font-size: 10px; }
.course-summary-line { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.course-card-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px; margin-top: 2px; }
.course-card-foot small { color: var(--on-dark-muted); font-size: 12.5px; }
.course-rating { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; }
.course-new { padding: 2px 8px; border-radius: 6px; color: #fff; background: #0f8a6c; font-size: 11.5px; font-weight: 700; }
.course-alert { color: #ff8db7 !important; font-weight: 700; }

/* Resume card on the dashboard */
.resume-card { display: grid; grid-template-columns: 220px minmax(0, 1fr) auto; gap: 20px; align-items: center; padding: 14px; border: 1px solid var(--panel-line, rgba(255, 255, 255, .08)); border-radius: 14px; background: linear-gradient(110deg, rgba(30, 155, 240, .12), rgba(238, 58, 143, .1)), var(--panel, rgba(14, 12, 40, .7)); }
.resume-media { position: relative; display: grid; place-items: center; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 10px; background: linear-gradient(135deg, #142a7a, #8a2378); }
.resume-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.resume-text { display: grid; gap: 6px; }
.resume-text small { color: #9cc8ff; font-weight: 700; font-size: 12.5px; }
.resume-text strong { font: 700 19px var(--font-display); }
.resume-text > span:last-child { color: var(--on-dark-muted); font-size: 13px; }

/* Presentation page */
.course-banner { position: relative; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 32px; align-items: center; overflow: hidden; padding: 34px; border-radius: 18px; color: #fff; background: #120d33; isolation: isolate; }
.course-banner::before { content: ""; position: absolute; inset: -50px; z-index: -2; background: var(--cover, linear-gradient(120deg, #1e9bf0, #7a32e8, #ee3a8f)) center / cover; filter: blur(34px) saturate(1.4); opacity: .9; }
.course-banner::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(10, 7, 30, .86) 30%, rgba(10, 7, 30, .35)); }
.course-banner-text { display: grid; gap: 12px; justify-items: start; }
.course-crumbs { margin: 0; color: rgba(255, 255, 255, .7); font-size: 13px; }
.course-crumbs a { color: #9cc8ff; }
.course-crumbs span { margin: 0 4px; }
.course-banner h2 { margin: 0; font: 700 clamp(28px, 3.6vw, 42px)/1.1 var(--font-display); letter-spacing: -.03em; }
.course-banner-summary { margin: 0; color: rgba(255, 255, 255, .85); font-size: 17px; line-height: 1.5; }
.course-banner-trainer { display: flex; align-items: center; gap: 10px; margin: 0; color: rgba(255, 255, 255, .85); font-size: 14px; }
.course-banner-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-top: 6px; }
.course-banner-count { color: rgba(255, 255, 255, .8); font-size: 14px; }
.course-banner-media { position: relative; display: grid; place-items: center; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 14px; background: rgba(255, 255, 255, .06); box-shadow: 0 30px 70px -24px rgba(0, 0, 0, .8); }
.course-banner-media img { width: 100%; height: 100%; object-fit: cover; }
.course-banner-media .lesson-video { width: 100%; margin: 0; border-radius: 0; }
.course-banner-placeholder .app-icon { width: 64px; height: 64px; color: rgba(255, 255, 255, .6); }
.course-facts-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); overflow: hidden; border: 1px solid var(--panel-line, rgba(255, 255, 255, .08)); border-radius: 12px; background: var(--panel, rgba(14, 12, 40, .7)); }
.course-facts-strip div { display: grid; gap: 4px; padding: 18px 20px; }
.course-facts-strip div + div { border-left: 1px solid var(--panel-line, rgba(255, 255, 255, .08)); }
.course-facts-strip strong { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 16px; }
.course-facts-strip span { color: var(--on-dark-muted); font-size: 13px; }
.course-about { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(280px, 1fr); gap: 20px; align-items: start; }
.course-about-main, .course-about-side { display: grid; gap: 20px; }
.course-about-side { position: sticky; top: 78px; }
.outcome-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 22px; margin: 0; padding: 0; list-style: none; }
.outcome-grid li { display: flex; gap: 10px; font-size: 14.5px; line-height: 1.5; }
.outcome-grid .app-icon { flex: none; margin-top: 3px; color: #4ade80; }
.skill-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.skill-chips span { padding: 6px 12px; border-radius: 999px; background: rgba(79, 139, 255, .12); color: #cfe1ff; font-size: 13px; font-weight: 600; }
.detail-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.detail-cards div { display: grid; grid-template-columns: auto 1fr; column-gap: 12px; align-items: center; padding: 14px; border: 1px solid var(--panel-line, rgba(255, 255, 255, .08)); border-radius: 10px; }
.detail-cards .app-icon { grid-row: span 2; width: 36px; height: 36px; padding: 8px; border-radius: 9px; color: #fff; background: var(--grad); vertical-align: 0; }
.detail-cards strong { font-size: 14.5px; }
.detail-cards span { color: var(--on-dark-muted); font-size: 13px; }
.syllabus { display: grid; gap: 10px; margin-top: 16px; }
.syllabus-module { border: 1px solid var(--panel-line, rgba(255, 255, 255, .08)); border-radius: 12px; overflow: hidden; }
.syllabus-module summary { display: flex; align-items: center; gap: 14px; padding: 16px 18px; cursor: pointer; list-style: none; }
.syllabus-module summary::-webkit-details-marker { display: none; }
.syllabus-module summary > span:nth-child(2) { display: grid; flex: 1; gap: 3px; }
.syllabus-module summary small { color: var(--on-dark-muted); font-size: 13px; }
.syllabus-index { display: grid; place-items: center; width: 34px; height: 34px; flex: none; border-radius: 10px; color: #fff; background: var(--grad); font-weight: 800; }
.syllabus-chevron { transition: transform .25s ease; }
.syllabus-module[open] .syllabus-chevron { transform: rotate(180deg); }
.syllabus-summary { margin: 0; padding: 0 18px 10px 66px; color: var(--on-dark-muted); font-size: 14px; }
.syllabus-items { display: grid; gap: 2px; margin: 0; padding: 0 18px 16px 66px; list-style: none; }
.syllabus-items li { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; padding: 8px 0; border-top: 1px solid var(--panel-line, rgba(255, 255, 255, .06)); font-size: 14px; }
.syllabus-items .app-icon { color: #9cc8ff; }
.syllabus-items small { color: var(--on-dark-muted); font-size: 12.5px; }
.trainer-head { display: flex; align-items: center; gap: 14px; }
.trainer-head > div { display: grid; gap: 2px; }
.trainer-head span { color: var(--on-dark-muted); font-size: 13.5px; }
.app-avatar.is-large { width: 64px; height: 64px; font-size: 22px; }
.review-summary { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 12px; }
.review-summary strong { font: 700 34px var(--font-display); }
.review-summary span { color: var(--on-dark-muted); font-size: 13px; }
.review-bars { display: grid; gap: 6px; margin: 0 0 14px; padding: 0; list-style: none; font-size: 12.5px; }
.review-bars li { display: grid; grid-template-columns: 32px 1fr 36px; gap: 8px; align-items: center; }
.review-bars i { height: 6px; overflow: hidden; border-radius: 3px; background: rgba(150, 140, 170, .25); }
.review-bars b { display: block; height: 100%; background: #f5b301; }
.review-bars small { color: var(--on-dark-muted); text-align: right; }
.review-list { display: grid; gap: 12px; }
.review { display: flex; gap: 10px; }
.review p { margin: 4px 0 0; font-size: 14px; line-height: 1.5; }

/* Player */
.player-head { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 18px; overflow: hidden; padding: 20px 24px; border-radius: 14px; color: #fff; background: #120d33; isolation: isolate; }
.player-head::before { content: ""; position: absolute; inset: -40px; z-index: -2; background: var(--cover, linear-gradient(120deg, #1e9bf0, #7a32e8, #ee3a8f)) center / cover; filter: blur(30px); opacity: .9; }
.player-head::after { content: ""; position: absolute; inset: 0; z-index: -1; background: rgba(10, 7, 30, .72); }
.player-head h2 { margin: 6px 0 4px; font: 700 22px var(--font-display); }
.player-head p { margin: 0; color: rgba(255, 255, 255, .78); font-size: 13.5px; }
.player-back { display: inline-flex; align-items: center; gap: 6px; color: #cfe1ff; font-size: 13px; font-weight: 600; }
.progress-ring { display: grid; place-items: center; width: 68px; height: 68px; flex: none; border-radius: 50%; background: conic-gradient(#4ade80 calc(var(--p) * 1%), rgba(255, 255, 255, .15) 0); }
.progress-ring span { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 50%; color: #fff; background: #1a1340; font-size: 13px; font-weight: 800; }
.nav-module { border-bottom: 1px solid var(--panel-line, rgba(255, 255, 255, .08)); }
.nav-module:last-child { border-bottom: 0; }
.nav-module summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 4px; cursor: pointer; list-style: none; }
.nav-module summary::-webkit-details-marker { display: none; }
.nav-module summary > span { display: grid; }
.nav-module summary small { color: var(--on-dark-muted); font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.nav-module summary strong { font-size: 14.5px; }
.nav-module summary em { color: var(--on-dark-muted); font-size: 12px; font-style: normal; }
.nav-module .course-outline { padding-bottom: 10px; }
.course-outline a { grid-template-columns: auto 1fr auto; }
.course-outline li.is-quiz .outline-mark, .course-outline li.is-task .outline-mark { border-radius: 8px; }
.lesson-body.is-reading { padding: 22px; border-radius: 12px; background: rgba(255, 255, 255, .03); font-size: 16px; line-height: 1.8; }
.next-item { display: inline-flex; align-items: center; gap: 12px; margin-left: auto; padding: 8px 14px 8px 8px; border: 1px solid var(--panel-line, rgba(255, 255, 255, .1)); border-radius: 12px; transition: border-color .2s ease; }
.next-item:hover { border-color: rgba(79, 139, 255, .6); }
.next-item > span:last-child { display: grid; }
.next-item small { color: var(--on-dark-muted); font-size: 12px; }
.next-thumb { position: relative; display: grid; place-items: center; width: 84px; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 8px; color: #fff; background: var(--grad); }
.next-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.next-thumb .app-icon { position: relative; filter: drop-shadow(0 1px 4px rgba(0, 0, 0, .6)); }
.quiz-form { display: grid; gap: 16px; margin-bottom: 10px; }
.quiz-question { margin: 0; padding: 18px; border: 1px solid var(--panel-line, rgba(255, 255, 255, .1)); border-radius: 12px; }
.quiz-question.is-right { border-color: rgba(74, 222, 128, .55); }
.quiz-question.is-wrong { border-color: rgba(255, 90, 140, .55); }
.quiz-question legend { display: flex; gap: 10px; align-items: flex-start; padding: 0 6px; font-weight: 700; font-size: 15.5px; line-height: 1.4; }
.quiz-question legend span { display: grid; place-items: center; width: 24px; height: 24px; flex: none; border-radius: 50%; color: #fff; background: var(--grad); font-size: 12px; }
.quiz-option { display: flex; align-items: center; gap: 12px; margin: 8px 0 0; padding: 12px 14px; border: 1px solid var(--panel-line, rgba(255, 255, 255, .12)); border-radius: 10px; font-weight: 500; cursor: pointer; transition: border-color .2s ease, background .2s ease; }
.quiz-option:hover { border-color: rgba(79, 139, 255, .5); }
.quiz-option:has(input:checked) { border-color: #4f8bff; background: rgba(79, 139, 255, .1); }
.quiz-option input { width: 18px; height: 18px; accent-color: #4f8bff; }
.quiz-option.is-answer { border-color: rgba(74, 222, 128, .7); background: rgba(74, 222, 128, .1); }
.quiz-option.is-picked-wrong { border-color: rgba(255, 90, 140, .7); background: rgba(255, 70, 120, .08); }
.quiz-explanation { display: flex; gap: 8px; margin: 12px 0 0; color: var(--on-dark-muted); font-size: 14px; }
.review-box { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--panel-line, rgba(255, 255, 255, .08)); }
.review-box summary { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; cursor: pointer; color: #f5b301; }
.review-form { display: grid; gap: 10px; margin-top: 12px; max-width: 520px; }
.star-input { display: inline-flex; flex-direction: row-reverse; justify-content: flex-end; gap: 2px; }
.star-input input { position: absolute; opacity: 0; }
.star-input label { margin: 0; color: rgba(150, 140, 170, .5); font-size: 30px; line-height: 1; cursor: pointer; transition: color .15s ease, transform .15s ease; }
.star-input label:hover, .star-input label:hover ~ label, .star-input input:checked ~ label { color: #f5b301; }
.star-input label:hover { transform: scale(1.12); }
.star-input input:focus-visible + label { outline: 2px solid #9cc8ff; outline-offset: 2px; border-radius: 4px; }

/* Studio */
.studio-welcome { display: grid; grid-template-columns: auto 1fr; gap: 30px; align-items: center; padding: 30px; border-radius: 16px; color: #fff; background: linear-gradient(120deg, #142a7a, #3a1a8f 55%, #8a2378); }
.studio-welcome h2 { margin: 0 0 8px; font: 700 26px var(--font-display); }
.studio-welcome p { max-width: 60ch; margin: 0 0 18px; color: rgba(255, 255, 255, .85); line-height: 1.6; }
.studio-welcome-art { display: grid; grid-template-columns: repeat(2, 56px); gap: 10px; }
.studio-welcome-art span { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 14px; background: rgba(255, 255, 255, .14); }
.studio-welcome-art .app-icon { width: 26px; height: 26px; }
.studio-layout { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(330px, 1fr); gap: 20px; align-items: start; }
.studio-outline { display: grid; gap: 14px; }
.module-card { padding: 18px; border: 1px solid var(--panel-line, rgba(255, 255, 255, .08)); border-radius: 14px; background: var(--panel, rgba(14, 12, 40, .7)); }
.module-card.is-target { border-color: rgba(79, 139, 255, .55); }
.module-card header { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.module-number { padding: 3px 9px; border-radius: 6px; color: #fff; background: var(--grad); font-size: 12px; font-weight: 800; }
.module-card h3 { flex: 1; margin: 0; font-size: 17px; }
.module-tools, .item-tools { display: inline-flex; align-items: center; gap: 10px; }
.module-tools form, .item-tools form, .mini-arrows form { margin: 0; }
.module-summary { margin: 8px 0 0; color: var(--on-dark-muted); font-size: 14px; }
.module-includes { margin: 6px 0 12px; color: var(--on-dark-muted); font-size: 13px; }
.module-items { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.module-item { display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 8px; border: 1px solid var(--panel-line, rgba(255, 255, 255, .08)); border-radius: 10px; }
.module-item.is-editing { border-color: rgba(79, 139, 255, .7); background: rgba(79, 139, 255, .07); }
.item-thumb { position: relative; display: grid; place-items: center; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 7px; color: #fff; background: linear-gradient(135deg, #2f5fe0, #7a32e8); }
.module-item.is-lecture .item-thumb { background: linear-gradient(135deg, #0f8a6c, #1e9bf0); }
.module-item.is-quiz .item-thumb { background: linear-gradient(135deg, #c536c8, #ee3a8f); }
.module-item.is-task .item-thumb { background: linear-gradient(135deg, #f59e0b, #ee3a8f); }
.item-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.item-thumb .app-icon { position: relative; width: 20px; height: 20px; filter: drop-shadow(0 1px 4px rgba(0, 0, 0, .6)); }
.item-main { display: grid; gap: 2px; min-width: 0; }
.item-main strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14.5px; }
.item-main small { color: var(--on-dark-muted); font-size: 12.5px; }
.mini-arrows { display: inline-flex; gap: 2px; }
.mini-arrows button { display: grid; place-items: center; width: 24px; height: 24px; padding: 0; border: 1px solid var(--panel-line, rgba(255, 255, 255, .12)); border-radius: 6px; color: inherit; background: transparent; cursor: pointer; }
.mini-arrows button:disabled { opacity: .25; cursor: default; }
.mini-arrows .app-icon { width: 13px; height: 13px; vertical-align: 0; }
.module-add { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--panel-line, rgba(255, 255, 255, .12)); font-size: 13px; }
.module-add > span { color: var(--on-dark-muted); }
.module-add a { display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border: 1px solid var(--panel-line, rgba(255, 255, 255, .12)); border-radius: 999px; font-weight: 600; transition: border-color .2s ease, background .2s ease; }
.module-add a:hover { border-color: rgba(79, 139, 255, .6); background: rgba(79, 139, 255, .08); }
.module-new { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 16px; border: 2px dashed var(--panel-line, rgba(255, 255, 255, .14)); border-radius: 14px; color: var(--on-dark-muted); font-weight: 700; transition: border-color .2s ease, color .2s ease; }
.module-new:hover { border-color: rgba(79, 139, 255, .6); color: inherit; }
.studio-panel { position: sticky; top: 78px; }
body.app-page .studio-panel { position: sticky; top: 78px; }
.video-preview:not(:empty) { overflow: hidden; aspect-ratio: 16 / 9; border-radius: 10px; }
.video-preview img { width: 100%; height: 100%; object-fit: cover; }
.quiz-editor { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--panel-line, rgba(255, 255, 255, .1)); }
.quiz-editor h3 { margin: 0 0 4px; }
.quiz-question-list { display: grid; gap: 8px; margin: 12px 0; padding-left: 20px; }
.quiz-question-list li { display: grid; gap: 2px; padding: 8px 0; border-bottom: 1px solid var(--panel-line, rgba(255, 255, 255, .06)); font-size: 14px; }
.quiz-option-input { display: flex; align-items: center; gap: 10px; margin: 0; }
.quiz-option-input input[type="radio"] { flex: none; }

@media (max-width: 1180px) {
  .studio-layout, .course-about { grid-template-columns: 1fr; }
  .studio-panel, body.app-page .studio-panel, .course-about-side { position: static; }
  .course-feature, .course-banner { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .resume-card { grid-template-columns: 1fr; }
  .course-facts-strip { grid-template-columns: 1fr 1fr; }
  .course-facts-strip div:nth-child(3) { border-left: 0; }
  .course-facts-strip div:nth-child(n+3) { border-top: 1px solid var(--panel-line, rgba(255, 255, 255, .08)); }
  .outcome-grid, .detail-cards { grid-template-columns: 1fr; }
  .module-item { grid-template-columns: 72px minmax(0, 1fr); }
  .module-item .item-tools { grid-column: 1 / -1; justify-content: flex-end; }
  .syllabus-items, .syllabus-summary { padding-left: 18px; }
  .studio-welcome { grid-template-columns: 1fr; }
  .course-banner { padding: 22px; }
}

/* Light mode for the course pages (banners stay dark: they sit on a picture) */
html.theme-light .skill-chips span { color: #2f4fb8; background: rgba(47, 95, 224, .09); }
html.theme-light .lesson-body.is-reading { background: rgba(30, 20, 60, .03); }
html.theme-light :is(.syllabus-module, .detail-cards div, .quiz-question, .quiz-option, .next-item, .module-card, .module-item, .resume-card, .course-card, .mini-arrows button, .module-add a, .category-chips button, .nav-module) { border-color: var(--panel-line); }
html.theme-light .resume-card { background: linear-gradient(110deg, rgba(30, 155, 240, .08), rgba(238, 58, 143, .06)), #fff; }
html.theme-light .resume-text small, html.theme-light .syllabus-items .app-icon { color: #2f5fe0; }
html.theme-light .course-alert { color: #c2185b !important; }
html.theme-light .module-new { border-color: rgba(30, 20, 60, .16); }
html.theme-light .quiz-option:has(input:checked) { background: rgba(47, 95, 224, .07); }.trainer-cta-head { display: flex; align-items: center; gap: 16px; }
.trainer-cta-head h2 { margin: 0 0 4px; }
.trainer-cta-head p { margin: 0; }
.trainer-cta-icon { display: grid; place-items: center; width: 52px; height: 52px; flex: none; border-radius: 14px; color: #fff; background: var(--grad); }
.trainer-cta-icon .app-icon { width: 24px; height: 24px; vertical-align: 0; }
.trainer-cta-form { margin-top: 14px; }
.trainer-cta-form > summary { list-style: none; }
.trainer-cta-form > summary::-webkit-details-marker { display: none; }
.trainer-cta-form[open] > summary { display: none; }.stage-kicker { display: flex; align-items: center; gap: 6px; }
.stage-kicker .app-icon { flex: none; width: 16px; height: 16px; }
.quiz-question legend { float: left; width: 100%; margin: 0 0 6px; padding: 0; }
.quiz-question legend + * { clear: both; }
.quiz-option input[type="radio"], .quiz-option-input input[type="radio"] { appearance: none; -webkit-appearance: none; flex: none; width: 20px; height: 20px; margin: 0; padding: 0; border: 2px solid rgba(255, 255, 255, .35); border-radius: 50%; background: transparent; transition: border-color .15s ease, box-shadow .15s ease; }
.quiz-option input[type="radio"]:checked, .quiz-option-input input[type="radio"]:checked { border-color: #4f8bff; background: #4f8bff; box-shadow: inset 0 0 0 4px #15102f; }
.quiz-option input[type="radio"]:focus-visible { outline: 2px solid #9cc8ff; outline-offset: 2px; }
html.theme-light .quiz-option input[type="radio"], html.theme-light .quiz-option-input input[type="radio"] { border-color: rgba(30, 20, 60, .35); }
html.theme-light .quiz-option input[type="radio"]:checked, .quiz-option-input input[type="radio"]:checked { border-color: #2f5fe0; background: #2f5fe0; box-shadow: inset 0 0 0 4px #fff; }.module-tools a, .module-tools button, .item-tools a, .item-tools button { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }@media (max-width: 1180px) {
  .course-player > .course-stage { order: -1; }
}
/* ==========================================================================
   Studio in steps, video import, protected player, course access
   ========================================================================== */
.wizard-step { min-width: 0; margin: 0; padding: 0; border: 0; }
.wizard-step[hidden], .wizard-nav [hidden], .video-drop [hidden] { display: none !important; }
.registration-form .wizard-step { display: grid; gap: 10px; }
.wizard-legend { display: grid; gap: 2px; margin: 0 0 6px; padding: 0; font: 700 20px/1.25 var(--font-display); letter-spacing: -.01em; }
.wizard-legend span { color: #9cc8ff; font: 700 11.5px var(--font-body); text-transform: uppercase; letter-spacing: .12em; }
.wizard:not(.is-wizard) .wizard-step + .wizard-step { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--panel-line, rgba(255, 255, 255, .08)); }
.wizard:not(.is-wizard) [data-wizard-prev], .wizard:not(.is-wizard) [data-wizard-next] { display: none; }
.wizard-steps { position: relative; display: flex; gap: 6px; margin: 0 0 18px; padding: 0 0 14px; list-style: none; }
.wizard-steps::before, .wizard-steps::after { content: ""; position: absolute; left: 0; bottom: 0; height: 4px; border-radius: 2px; }
.wizard-steps::before { right: 0; background: rgba(150, 140, 170, .2); }
.wizard-steps::after { width: var(--wizard-progress, 0%); background: var(--grad); transition: width .45s var(--ease-out); }
.wizard-steps li { flex: 1; min-width: 0; }
.wizard-steps button { display: flex; align-items: center; gap: 8px; width: 100%; padding: 6px 4px; border: 0; color: var(--on-dark-muted); background: none; font: 600 13px var(--font-body); text-align: left; cursor: pointer; }
.wizard-steps button span { display: grid; place-items: center; width: 26px; height: 26px; flex: none; border: 2px solid rgba(150, 140, 170, .4); border-radius: 50%; font-size: 12px; font-weight: 800; transition: all .25s ease; }
.wizard-steps li.is-active button { color: inherit; }
.wizard-steps li.is-active button span { color: #fff; border-color: transparent; background: var(--grad); box-shadow: 0 0 0 4px rgba(79, 139, 255, .18); }
.wizard-steps li.is-done button span { color: #fff; border-color: #22c55e; background: #22c55e; }
.wizard-nav { display: flex; align-items: center; gap: 10px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--panel-line, rgba(255, 255, 255, .08)); }
.wizard-count { flex: 1; color: var(--on-dark-muted); font-size: 12.5px; text-align: center; }
.wizard-nav .btn .app-icon { width: 16px; height: 16px; }
.wizard-nav [data-wizard-submit] { margin-left: auto; }
.wizard-nav [data-wizard-next] + [data-wizard-submit]:not([hidden]) { margin-left: 0; }
.btn.is-busy { opacity: .7; pointer-events: none; }
.wizard .wizard-step:not([hidden]) { animation: wizard-in .35s var(--ease-out); }
@keyframes wizard-in { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .wizard .wizard-step:not([hidden]) { animation: none; } }
@media (max-width: 560px) { .wizard-steps button { flex-direction: column; font-size: 11px; text-align: center; } }

.panel-title { display: flex; align-items: center; gap: 10px; }
.panel-icon { display: grid; place-items: center; width: 34px; height: 34px; flex: none; border-radius: 10px; color: #fff; background: linear-gradient(135deg, #2f5fe0, #7a32e8); }
.panel-icon.is-lecture { background: linear-gradient(135deg, #0f8a6c, #1e9bf0); }
.panel-icon.is-quiz { background: linear-gradient(135deg, #c536c8, #ee3a8f); }
.panel-icon.is-task { background: linear-gradient(135deg, #f59e0b, #ee3a8f); }
.panel-icon .app-icon { width: 18px; height: 18px; vertical-align: 0; }
.panel-close { display: block; margin-top: 12px; color: var(--on-dark-muted); font-size: 13px; text-align: center; }

.choice-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.choice-card { position: relative; margin: 0; cursor: pointer; }
.choice-card input { position: absolute; opacity: 0; pointer-events: none; }
.choice-card > span { display: grid; justify-items: start; gap: 4px; height: 100%; padding: 14px; border: 1.5px solid var(--panel-line, rgba(255, 255, 255, .12)); border-radius: 12px; transition: border-color .2s ease, background .2s ease, transform .2s ease; }
.choice-card .app-icon { width: 22px; height: 22px; color: #9cc8ff; }
.choice-card strong { font-size: 14.5px; }
.choice-card small { color: var(--on-dark-muted); font-size: 12px; font-weight: 500; }
.choice-card:hover > span { transform: translateY(-2px); border-color: rgba(79, 139, 255, .5); }
.choice-card input:checked + span { border-color: #4f8bff; background: rgba(79, 139, 255, .1); box-shadow: 0 0 0 3px rgba(79, 139, 255, .15); }
.choice-card input:focus-visible + span { outline: 2px solid #9cc8ff; outline-offset: 2px; }
@media (max-width: 560px) { .choice-cards { grid-template-columns: 1fr; } }

.access-explain { display: flex; gap: 14px; align-items: flex-start; padding: 14px 16px; border-radius: 12px; background: rgba(79, 139, 255, .08); }
.access-explain > span { display: grid; place-items: center; width: 38px; height: 38px; flex: none; border-radius: 10px; color: #fff; background: var(--grad); }
.access-explain p { margin: 0; font-size: 14px; line-height: 1.55; }
.price-input { display: flex; align-items: center; max-width: 220px; }
.price-input input { border-top-right-radius: 0 !important; border-bottom-right-radius: 0 !important; }
.price-input span { display: grid; place-items: center; align-self: stretch; padding: 0 14px; border: 1px solid var(--panel-line, rgba(255, 255, 255, .14)); border-left: 0; border-radius: 0 10px 10px 0; color: var(--on-dark-muted); font-weight: 700; }

/* Video import */
.video-drop { display: grid; gap: 10px; }
.video-drop-input { position: absolute !important; width: 1px !important; height: 1px !important; opacity: 0; overflow: hidden; pointer-events: none; }
.video-drop-zone { display: grid; justify-items: center; gap: 6px; margin: 0; padding: 30px 20px; border: 2px dashed rgba(79, 139, 255, .45); border-radius: 14px; background: linear-gradient(135deg, rgba(30, 155, 240, .07), rgba(238, 58, 143, .05)); text-align: center; cursor: pointer; transition: border-color .2s ease, background .2s ease, transform .2s ease; }
.video-drop-zone:hover, .video-drop.is-over .video-drop-zone { border-color: #4f8bff; background: linear-gradient(135deg, rgba(30, 155, 240, .14), rgba(238, 58, 143, .1)); transform: scale(1.01); }
.video-drop-icon { display: grid; place-items: center; width: 56px; height: 56px; margin-bottom: 4px; border-radius: 50%; color: #fff; background: var(--grad); box-shadow: 0 12px 30px -10px rgba(79, 139, 255, .7); }
.video-drop-icon .app-icon { width: 26px; height: 26px; vertical-align: 0; }
.video-drop-zone strong { font-size: 16px; }
.video-drop-zone > span:last-child { color: var(--on-dark-muted); font-size: 13px; font-weight: 500; }
.video-drop.has-current .video-drop-zone { padding: 16px; }
.video-drop.has-current .video-drop-icon { width: 40px; height: 40px; }
.video-current { display: flex; align-items: center; gap: 12px; padding: 8px; border: 1px solid var(--panel-line, rgba(255, 255, 255, .1)); border-radius: 12px; font-size: 13.5px; font-weight: 600; }
.video-current img, .video-current-icon { width: 120px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 8px; }
.video-current-icon { display: grid; place-items: center; color: #fff; background: var(--grad); }
.video-current > span:last-child { display: inline-flex; align-items: center; gap: 6px; }
.video-current > span:last-child .app-icon { color: #22c55e; }
.video-drop-work { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 14px; align-items: center; padding: 12px; border: 1px solid var(--panel-line, rgba(255, 255, 255, .1)); border-radius: 14px; }
.video-drop-work video { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 10px; background: #000; }
.video-drop-info { display: grid; gap: 6px; min-width: 0; }
.video-drop-info strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.video-drop-bar { height: 8px; overflow: hidden; border-radius: 4px; background: rgba(150, 140, 170, .22); }
.video-drop-bar i { display: block; width: 0; height: 100%; border-radius: 4px; background: var(--grad); transition: width .3s ease; }
.video-drop.is-done .video-drop-bar i { background: #22c55e; }
.video-drop-info small { color: var(--on-dark-muted); font-size: 12.5px; }
.video-drop.is-done .video-drop-info small { color: #4ade80; font-weight: 700; }
.video-drop-info .app-link-button { justify-self: start; }
.video-drop-error { margin: 0; padding: 10px 12px; border-radius: 10px; color: #ffb3c9; background: rgba(255, 70, 120, .1); font-size: 13.5px; font-weight: 600; }
.video-tip { display: flex; gap: 8px; align-items: flex-start; margin: 4px 0 0; color: var(--on-dark-muted); font-size: 13px; line-height: 1.5; }
.video-tip .app-icon { flex: none; margin-top: 2px; color: #9cc8ff; }
@media (max-width: 560px) { .video-drop-work { grid-template-columns: 1fr; } }

/* Protected player: the viewer's name drifts slowly over the picture */
.lesson-video.is-protected { position: relative; overflow: hidden; background: #000; }
.lesson-video.is-protected video { display: block; width: 100%; max-height: 72vh; background: #000; }
.video-watermark { position: absolute; top: 12%; left: 6%; z-index: 2; color: rgba(255, 255, 255, .28); font-size: 12.5px; font-weight: 700; letter-spacing: .02em; text-shadow: 0 1px 2px rgba(0, 0, 0, .5); white-space: nowrap; pointer-events: none; user-select: none; animation: watermark-drift 48s linear infinite; }
@keyframes watermark-drift {
  0% { top: 10%; left: 6%; }
  25% { top: 62%; left: 48%; }
  50% { top: 30%; left: 60%; }
  75% { top: 70%; left: 10%; }
  100% { top: 10%; left: 6%; }
}

/* Access to a course */
.course-price-tag { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; color: #fff; background: rgba(255, 255, 255, .12); font-size: 13.5px; }
.course-price-tag .app-icon { width: 16px; height: 16px; }
.access-state { display: inline-flex; align-items: center; gap: 12px; padding: 10px 16px; border: 1px solid rgba(245, 179, 1, .45); border-radius: 12px; color: #fff; background: rgba(245, 179, 1, .12); }
.access-state > .app-icon { width: 22px; height: 22px; color: #f5b301; }
.access-state > span { display: grid; gap: 2px; }
.access-state small { color: rgba(255, 255, 255, .8); font-size: 12.5px; }
.access-refused { display: flex; align-items: center; gap: 8px; margin: 0; color: #ffb3c9; font-size: 13.5px; }
.course-price { position: absolute; top: 10px; right: 10px; padding: 3px 9px; border-radius: 6px; color: #1d1530; background: #fff; font-size: 12px; font-weight: 800; box-shadow: 0 4px 14px rgba(0, 0, 0, .25); }
.course-pending { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: 6px; color: #1d1530; background: #f5b301; font-size: 11.5px; font-weight: 700; }
.course-pending .app-icon { width: 13px; height: 13px; }
.access-row { flex-wrap: wrap; }
.access-form { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0; }
.access-form select { width: auto; min-width: 130px; }
.access-form .app-check { margin: 0; }
.access-grant { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--panel-line, rgba(255, 255, 255, .08)); }
.access-grant > summary { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; cursor: pointer; }
.access-grant-form { margin-top: 12px; }

html.theme-light .wizard-legend span, html.theme-light .choice-card .app-icon, html.theme-light .video-tip .app-icon { color: #2f5fe0; }
html.theme-light .access-explain { background: rgba(47, 95, 224, .07); }
html.theme-light .video-drop-error { color: #b4234f; background: rgba(220, 38, 90, .08); }
html.theme-light .video-drop.is-done .video-drop-info small { color: #15803d; }
html.theme-light .access-refused { color: #b4234f; }
html.theme-light .choice-card input:checked + span { background: rgba(47, 95, 224, .06); }
/* ==========================================================================
   Engaging member space: level, badges, next steps, agenda, celebrations
   ========================================================================== */
.dash-hero { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 28px; align-items: center; overflow: hidden; padding: 28px 32px; border-radius: 20px; color: #fff; background: linear-gradient(120deg, #13207a 0%, #3a1a8f 48%, #8a2378 100%); isolation: isolate; }
.dash-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(circle at 85% 20%, rgba(255, 255, 255, .18), transparent 45%), radial-gradient(circle at 10% 110%, rgba(30, 155, 240, .45), transparent 50%); }
.dash-hero::after { content: ""; position: absolute; right: -60px; bottom: -80px; z-index: -1; width: 280px; height: 280px; border-radius: 50%; border: 40px solid rgba(255, 255, 255, .05); }
.dash-hero-main { display: grid; gap: 18px; min-width: 0; }
.dash-hero-id { display: flex; align-items: center; gap: 16px; }
.dash-hero-id .app-avatar { box-shadow: 0 0 0 4px rgba(255, 255, 255, .18); }
.dash-hello { margin: 0; font: 600 clamp(24px, 3vw, 32px)/1.15 var(--font-display); letter-spacing: -.02em; }
.dash-hello strong { background: linear-gradient(90deg, #fff, #ffd7ef); -webkit-background-clip: text; background-clip: text; color: transparent; }
.dash-sub { color: rgba(255, 255, 255, .78); font-size: 13.5px; }
.dash-level { display: grid; gap: 8px; max-width: 560px; }
.dash-level-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.dash-level-chip { padding: 3px 10px; border-radius: 999px; color: #1d1530; background: #f5b301; font-size: 12px; font-weight: 800; }
.dash-level-head strong { font: 700 18px var(--font-display); }
.dash-xp { margin-left: auto; color: rgba(255, 255, 255, .85); font-size: 13.5px; }
.dash-xp b { color: #fff; font-size: 16px; }
.dash-xp-bar { height: 12px; overflow: hidden; border-radius: 999px; background: rgba(255, 255, 255, .16); box-shadow: inset 0 1px 3px rgba(0, 0, 0, .25); }
.dash-xp-bar span { display: block; width: var(--xp); height: 100%; border-radius: inherit; background: linear-gradient(90deg, #f5b301, #ff7ea1, #ffd7ef); box-shadow: 0 0 18px rgba(245, 179, 1, .6); animation: xp-grow 1.4s var(--ease-out) .25s both; }
@keyframes xp-grow { from { width: 0; } }
.dash-level small { color: rgba(255, 255, 255, .8); font-size: 13px; }
.dash-hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.dash-hero .btn-ghost-dark { color: #fff; border-color: rgba(255, 255, 255, .3); background: rgba(255, 255, 255, .08); }
.dash-ring { position: relative; display: grid; place-items: center; width: 150px; height: 150px; border-radius: 50%; background: conic-gradient(#f5b301 calc(var(--p) * 1%), rgba(255, 255, 255, .15) 0); box-shadow: 0 20px 50px -15px rgba(0, 0, 0, .6); animation: ring-pop .9s var(--ease-spring, cubic-bezier(.34, 1.56, .64, 1)) both .2s; }
.dash-ring span { display: grid; place-items: center; width: 122px; height: 122px; border-radius: 50%; background: #241556; }
.dash-ring small { margin-bottom: -18px; color: rgba(255, 255, 255, .7); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .14em; }
.dash-ring b { font: 800 54px/1 var(--font-display); }
@keyframes ring-pop { from { opacity: 0; transform: scale(.6) rotate(-30deg); } }

.dash-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 20px; }
.dash-steps-bar { height: 6px; margin: -4px 0 14px; overflow: hidden; border-radius: 3px; background: rgba(150, 140, 170, .2); }
.dash-steps-bar span { display: block; height: 100%; border-radius: 3px; background: var(--grad); }
.dash-step-list { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.dash-step-list a { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--panel-line, rgba(255, 255, 255, .1)); border-radius: 12px; transition: transform .2s ease, border-color .2s ease, background .2s ease; }
.dash-step-list a:hover { transform: translateX(4px); border-color: rgba(79, 139, 255, .55); background: rgba(79, 139, 255, .07); }
.dash-step-list a > .app-icon:last-child { color: var(--on-dark-muted); transition: transform .2s ease; }
.dash-step-list a:hover > .app-icon:last-child { transform: translateX(3px); color: inherit; }
.dash-step-icon { display: grid; place-items: center; width: 38px; height: 38px; flex: none; border-radius: 11px; color: #fff; background: var(--grad); }
.dash-step-icon .app-icon { width: 18px; height: 18px; vertical-align: 0; }
.dash-step-text { flex: 1; font-weight: 600; font-size: 14.5px; }
.dash-step-xp { padding: 3px 9px; border-radius: 999px; color: #f5b301; background: rgba(245, 179, 1, .12); font-size: 12px; font-weight: 800; white-space: nowrap; }
.dash-all-done { display: flex; align-items: center; gap: 10px; margin: 0; padding: 14px; border-radius: 12px; color: #4ade80; background: rgba(74, 222, 128, .08); font-weight: 700; }
.dash-agenda-list { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.dash-agenda-list a { display: flex; align-items: center; gap: 14px; padding: 10px; border-radius: 12px; transition: background .2s ease; }
.dash-agenda-list a:hover { background: rgba(79, 139, 255, .07); }
.dash-date { display: grid; place-items: center; width: 54px; height: 58px; flex: none; border-radius: 12px; color: #fff; background: linear-gradient(160deg, #ee3a8f, #7a32e8); line-height: 1; box-shadow: 0 10px 22px -10px rgba(238, 58, 143, .7); }
.dash-date b { font: 800 22px var(--font-display); }
.dash-date small { font-size: 11px; font-weight: 700; text-transform: uppercase; }
.dash-agenda-text { display: grid; flex: 1; gap: 3px; min-width: 0; }
.dash-agenda-text strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14.5px; }
.dash-agenda-text small { display: flex; align-items: center; gap: 5px; color: var(--on-dark-muted); font-size: 12.5px; }
.dash-agenda-text .app-icon { width: 13px; height: 13px; }
.dash-countdown { padding: 4px 10px; border-radius: 999px; color: #9cc8ff; background: rgba(79, 139, 255, .12); font-size: 12px; font-weight: 700; white-space: nowrap; }

.badge-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.badge-item { position: relative; display: grid; justify-items: center; gap: 6px; padding: 16px 10px 14px; border: 1px solid var(--panel-line, rgba(255, 255, 255, .08)); border-radius: 14px; text-align: center; transition: transform .25s var(--ease-out), box-shadow .25s ease; }
.badge-item strong { font-size: 13.5px; }
.badge-item small { color: var(--on-dark-muted); font-size: 11.5px; line-height: 1.35; }
.badge-medal { display: grid; place-items: center; width: 58px; height: 58px; border-radius: 50%; color: var(--on-dark-muted); background: rgba(150, 140, 170, .14); border: 2px dashed rgba(150, 140, 170, .35); }
.badge-medal .app-icon { width: 24px; height: 24px; vertical-align: 0; }
.badge-item:not(.is-unlocked) strong { opacity: .6; }
.badge-item.is-unlocked .badge-medal { color: #fff; border: 3px solid rgba(255, 255, 255, .85); background: conic-gradient(from 210deg, #f5b301, #ee3a8f, #7a32e8, #1e9bf0, #f5b301); box-shadow: 0 10px 26px -8px rgba(238, 58, 143, .7); }
.badge-item.is-unlocked:hover { transform: translateY(-4px) rotate(-1deg); box-shadow: 0 18px 30px -18px rgba(122, 50, 232, .8); }
.badge-item.is-unlocked:hover .badge-medal { animation: medal-shine 1s ease; }
.badge-item.is-new { border-color: #f5b301; box-shadow: 0 0 0 3px rgba(245, 179, 1, .25); animation: badge-new 1.2s var(--ease-out) .3s both; }
.badge-item.is-new::after { content: "Nouveau"; position: absolute; top: -9px; right: 10px; padding: 2px 8px; border-radius: 999px; color: #1d1530; background: #f5b301; font-size: 10.5px; font-weight: 800; text-transform: uppercase; }
@keyframes medal-shine { 50% { transform: rotate(-12deg) scale(1.08); } }
@keyframes badge-new { 0% { transform: scale(.4); opacity: 0; } 60% { transform: scale(1.12); opacity: 1; } 100% { transform: none; } }

.confetti-canvas { position: fixed; inset: 0; z-index: 9999; width: 100vw; height: 100vh; pointer-events: none; }
body.app-page .app-flash.is-celebration { box-shadow: 0 26px 60px -12px rgba(0, 0, 0, .65), inset 0 0 0 1px rgba(245, 179, 1, .45), inset 3px 0 0 #f5b301; }
body.app-page .app-flash.is-celebration > .app-icon, .toast-medal { color: #f5b301; }
.toast-medal { display: grid; place-items: center; width: 22px; font-size: 20px; line-height: 1; }

.course-search { display: flex; align-items: center; gap: 8px; flex: 1; max-width: 340px; margin: 0; padding: 0 12px; border: 1px solid var(--panel-line, rgba(255, 255, 255, .14)); border-radius: 999px; background: rgba(255, 255, 255, .03); transition: border-color .2s ease, box-shadow .2s ease; }
.course-search:focus-within { border-color: #4f8bff; box-shadow: 0 0 0 3px rgba(79, 139, 255, .18); }
.course-search .app-icon { flex: none; width: 16px; height: 16px; color: var(--on-dark-muted); }
.course-search input { flex: 1; min-width: 0; height: 38px; padding: 0; border: 0 !important; color: inherit; background: transparent !important; box-shadow: none !important; font: 500 14px var(--font-body); outline: none; }

/* Player comfort */
.video-resume { position: absolute; top: 14px; left: 14px; z-index: 3; padding: 6px 12px; border-radius: 999px; color: #fff; background: rgba(10, 7, 30, .8); backdrop-filter: blur(6px); font-size: 12.5px; font-weight: 700; animation: toastIn .4s ease both; }
.video-end { position: absolute; inset: 0; z-index: 4; display: grid; place-items: center; padding: 20px; background: rgba(10, 7, 30, .82); backdrop-filter: blur(4px); animation: fade-in .35s ease both; }
.video-end > div { display: grid; justify-items: center; gap: 8px; text-align: center; color: #fff; }
.video-end-check { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: #22c55e; font-size: 30px; font-weight: 800; box-shadow: 0 0 0 10px rgba(34, 197, 94, .2); animation: ring-pop .6s ease both; }
.video-end strong { font: 700 20px var(--font-display); }
.video-end p { margin: 0; color: rgba(255, 255, 255, .8); font-size: 14px; }
.video-end-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 6px; }
.video-end .btn-ghost-dark { color: #fff; border-color: rgba(255, 255, 255, .35); }
@keyframes fade-in { from { opacity: 0; } }
.quiz-progress { position: sticky; top: 70px; z-index: 2; display: flex; align-items: center; gap: 12px; padding: 10px 14px; border: 1px solid var(--panel-line, rgba(255, 255, 255, .1)); border-radius: 12px; background: var(--panel-solid, #120d2e); font-size: 13px; font-weight: 700; }
.quiz-progress i { flex: 1; height: 6px; overflow: hidden; border-radius: 3px; background: rgba(150, 140, 170, .22); }
.quiz-progress b { display: block; width: 0; height: 100%; border-radius: 3px; background: var(--grad); transition: width .35s var(--ease-out); }
.quiz-progress.is-complete { border-color: rgba(74, 222, 128, .5); color: #4ade80; }
.quiz-progress.is-complete b { background: #22c55e; }
.quiz-question { transition: border-color .25s ease, background .25s ease; }
.quiz-question.is-answered:not(.is-right):not(.is-wrong) { border-color: rgba(79, 139, 255, .45); background: rgba(79, 139, 255, .04); }
.quiz-question.is-answered:not(.is-right):not(.is-wrong) legend span { background: #22c55e; }

/* Buttons: pressed feel and loading spinner */
body.app-page .btn:active:not(:disabled) { transform: translateY(1px) scale(.98); }
.btn.is-loading { position: relative; color: transparent !important; pointer-events: none; }
.btn.is-loading > * { visibility: hidden; }
.btn.is-loading::after { content: ""; position: absolute; top: 50%; left: 50%; width: 18px; height: 18px; margin: -9px 0 0 -9px; border: 2.5px solid rgba(255, 255, 255, .35); border-top-color: #fff; border-radius: 50%; animation: btn-spin .7s linear infinite; }
.btn-ghost-dark.is-loading::after { border-color: rgba(150, 140, 170, .35); border-top-color: currentColor; }
@keyframes btn-spin { to { transform: rotate(360deg); } }

@media (max-width: 900px) {
  .dash-hero { grid-template-columns: 1fr; padding: 22px; }
  .dash-ring { position: absolute; top: 18px; right: 18px; width: 84px; height: 84px; }
  .dash-ring span { width: 66px; height: 66px; }
  .dash-ring b { font-size: 28px; }
  .dash-ring small { margin-bottom: -8px; font-size: 8.5px; }
  .dash-hero-id { padding-right: 92px; }
  .dash-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .dash-ring, .badge-item.is-new, .video-end, .video-end-check { animation: none; }
  .dash-xp-bar span { animation: none; }
}

html.theme-light .dash-step-xp { color: #a16207; background: rgba(245, 179, 1, .16); }
html.theme-light .dash-countdown { color: #2f5fe0; background: rgba(47, 95, 224, .09); }
html.theme-light .dash-all-done { color: #15803d; background: rgba(34, 197, 94, .1); }
html.theme-light .badge-medal { background: rgba(30, 20, 60, .05); border-color: rgba(30, 20, 60, .2); }
html.theme-light .quiz-progress { background: #fff; }
html.theme-light .quiz-progress.is-complete { color: #15803d; }
html.theme-light .course-search { background: #fff; }html.theme-light .dash-hero .btn-ghost-dark { color: #fff !important; border-color: rgba(255, 255, 255, .4) !important; background: rgba(255, 255, 255, .12) !important; }
html.theme-light .dash-hero .btn-ghost-dark .app-icon { color: #fff; }
@media (max-width: 560px) {
  .dash-agenda-list a { flex-wrap: wrap; }
  .dash-agenda-text { flex-basis: calc(100% - 70px); }
  .dash-agenda-text strong { white-space: normal; }
  .dash-countdown { margin-left: 68px; }
}
/* ==========================================================================
   Member pages: banners, living cards, radar, diplomas, attendance timeline
   ========================================================================== */
.page-banner { --b1: #13207a; --b2: #3a1a8f; --b3: #8a2378; position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: center; overflow: hidden; padding: 26px 30px; border-radius: 20px; color: #fff; background: linear-gradient(120deg, var(--b1), var(--b2) 55%, var(--b3)); isolation: isolate; }
.page-banner::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(circle at 88% 15%, rgba(255, 255, 255, .2), transparent 42%), radial-gradient(circle at 0% 120%, rgba(255, 255, 255, .14), transparent 50%); }
.page-banner.is-blue { --b1: #0b3a8c; --b2: #1e6fd9; --b3: #22b8cf; }
.page-banner.is-gold { --b1: #6b3a05; --b2: #b7791f; --b3: #f5b301; }
.page-banner.is-purple { --b1: #2a1366; --b2: #6d28d9; --b3: #c026d3; }
.page-banner.is-pink { --b1: #5b1146; --b2: #be185d; --b3: #f97316; }
.page-banner.is-indigo { --b1: #1e1b4b; --b2: #4338ca; --b3: #7c3aed; }
.page-banner.is-teal { --b1: #064e3b; --b2: #0f766e; --b3: #0ea5e9; }
.page-banner.is-green { --b1: #14532d; --b2: #15803d; --b3: #84cc16; }
.page-banner-art { position: absolute; right: 150px; top: 50%; z-index: -1; width: 220px; height: 220px; color: rgba(255, 255, 255, .1); transform: translateY(-50%) rotate(-12deg); animation: banner-float 9s ease-in-out infinite; }
.page-banner-art .app-icon { width: 100%; height: 100%; stroke-width: 1.2; }
@keyframes banner-float { 50% { transform: translateY(-56%) rotate(-6deg); } }
.page-banner-body { display: grid; gap: 10px; justify-items: start; max-width: 720px; }
.page-banner-title { margin: 0; font: 700 clamp(26px, 3vw, 34px)/1.1 var(--font-display); letter-spacing: -.02em; }
.page-banner-text { margin: 0; color: rgba(255, 255, 255, .86); font-size: 15px; line-height: 1.55; }
.page-banner-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 0; padding: 0; list-style: none; }
.page-banner-chips li { display: inline-flex; align-items: baseline; gap: 6px; padding: 7px 13px; border-radius: 999px; background: rgba(255, 255, 255, .14); backdrop-filter: blur(6px); font-size: 13px; }
.page-banner-chips b { font: 800 17px var(--font-display); }
.page-banner-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.page-banner .btn-primary { color: #1d1530; background: #fff; box-shadow: 0 10px 24px -10px rgba(0, 0, 0, .5); }
.page-banner .btn-primary .app-icon { color: inherit; }
.dash-ring.is-small { width: 120px; height: 120px; background: conic-gradient(#fff calc(var(--p) * 1%), rgba(255, 255, 255, .2) 0); }
.dash-ring.is-small span { width: 96px; height: 96px; background: rgba(10, 7, 30, .55); backdrop-filter: blur(4px); }
.dash-ring.is-small b { font-size: 28px; }
.dash-ring.is-small small { margin-bottom: -8px; font-size: 10px; }

/* Trainings */
.track-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.track-card { display: flex; align-items: center; gap: 14px; padding: 14px; border: 1px solid var(--panel-line, rgba(255, 255, 255, .1)); border-radius: 14px; transition: transform .2s ease, border-color .2s ease; }
.track-card:hover { transform: translateY(-2px); border-color: rgba(79, 139, 255, .45); }
.track-ring { display: grid; place-items: center; width: 62px; height: 62px; flex: none; border-radius: 50%; background: conic-gradient(#4f8bff calc(var(--p) * 1%), rgba(150, 140, 170, .2) 0); }
.track-ring span { display: grid; place-items: center; width: 50px; height: 50px; border-radius: 50%; background: var(--panel-solid, #120d2e); font-size: 13px; font-weight: 800; }
.track-card.is-termine .track-ring { background: #22c55e; }
.track-card.is-termine .track-ring span { color: #22c55e; }
.track-body { display: grid; flex: 1; gap: 2px; min-width: 0; }
.track-body h3 { margin: 0; font-size: 15px; }
.track-body p { margin: 0; font-size: 12.5px; }
.track-icon { color: #9cc8ff; }
.track-icon .app-icon { width: 16px; height: 16px; }
.training-grid, .crew-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 16px; }
.training-card, .crew-card { position: relative; display: flex; flex-direction: column; gap: 10px; padding: 18px; border: 1px solid var(--panel-line, rgba(255, 255, 255, .1)); border-radius: 16px; background: linear-gradient(180deg, rgba(255, 255, 255, .025), transparent); transition: transform .25s var(--ease-out), border-color .25s ease, box-shadow .25s ease; }
.training-card:hover, .crew-card:hover { transform: translateY(-4px); border-color: rgba(79, 139, 255, .45); box-shadow: 0 22px 40px -26px rgba(79, 139, 255, .7); }
.training-card.is-mine { border-color: rgba(34, 197, 94, .45); }
.training-card.is-full { opacity: .72; }
.training-top, .crew-top { display: flex; align-items: center; gap: 10px; }
.training-icon, .crew-icon { display: grid; place-items: center; width: 46px; height: 46px; flex: none; border-radius: 14px; color: #fff; background: var(--grad); box-shadow: 0 10px 22px -10px rgba(122, 50, 232, .8); transition: transform .3s var(--ease-out); }
.training-icon .app-icon, .crew-icon .app-icon { width: 22px; height: 22px; vertical-align: 0; }
.training-card:hover .training-icon, .crew-card:hover .crew-icon { transform: rotate(-8deg) scale(1.06); }
.training-hot { display: inline-flex; align-items: center; gap: 4px; margin-left: auto; padding: 3px 9px; border-radius: 999px; color: #fb923c; background: rgba(251, 146, 60, .14); font-size: 11.5px; font-weight: 800; }
.training-hot .app-icon { width: 13px; height: 13px; }
.training-card h3, .crew-card h3 { margin: 0; font-size: 17px; }
.training-text, .crew-text { display: -webkit-box; margin: 0; overflow: hidden; color: var(--on-dark-muted); font-size: 13.5px; line-height: 1.55; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.training-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 0; color: var(--on-dark-muted); font-size: 12.5px; }
.training-meta span { display: inline-flex; align-items: center; gap: 5px; }
.training-meta .app-icon { width: 14px; height: 14px; }
.seat-meter { height: 6px; overflow: hidden; border-radius: 3px; background: rgba(150, 140, 170, .2); }
.seat-meter span { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, #22c55e, #f5b301 70%, #ef4444); background-size: 300px 100%; }
.seat-text { margin-top: -4px; color: var(--on-dark-muted); font-size: 12px; font-weight: 600; }
.seat-text.is-urgent { color: #fb923c; animation: pulse-soft 1.8s ease-in-out infinite; }
@keyframes pulse-soft { 50% { opacity: .55; } }
.training-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 4px; }
.training-done { display: inline-flex; align-items: center; gap: 6px; color: #4ade80; font-size: 13.5px; font-weight: 700; }

/* Projects */
.crew-status { margin-left: auto; padding: 3px 10px; border-radius: 999px; background: rgba(79, 139, 255, .14); color: #9cc8ff; font-size: 11.5px; font-weight: 800; }
.crew-card.is-termine .crew-status { color: #4ade80; background: rgba(74, 222, 128, .14); }
.crew-card.is-recrutement .crew-status { color: #f5b301; background: rgba(245, 179, 1, .14); }
.crew-domain { color: #9cc8ff; font-size: 11.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; }
.crew-wanted { display: flex; gap: 6px; margin: 0; padding: 8px 10px; border-radius: 10px; background: rgba(245, 179, 1, .08); font-size: 13px; }
.crew-wanted .app-icon { flex: none; color: #f5b301; }
.crew-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; font-size: 12.5px; }
.crew-role { display: inline-flex; align-items: center; gap: 5px; color: #f5b301; font-weight: 700; }
.crew-card .btn, .crew-card .app-inline-form { align-self: flex-start; }
.face-stack { display: inline-flex; }
.face-stack .app-avatar { width: 30px; height: 30px; margin-left: -8px; box-shadow: 0 0 0 2px var(--panel-solid, #120d2e); font-size: 11px; }
.face-stack .app-avatar:first-child { margin-left: 0; }
.face-more { display: grid; place-items: center; width: 30px; height: 30px; margin-left: -8px; border-radius: 50%; background: rgba(150, 140, 170, .3); box-shadow: 0 0 0 2px var(--panel-solid, #120d2e); font-size: 11px; font-weight: 800; }
.team-seats { display: inline-flex; flex-wrap: wrap; gap: 4px; margin-left: auto; max-width: 120px; justify-content: flex-end; }
.team-seats i { width: 10px; height: 10px; border-radius: 50%; border: 1.5px dashed rgba(150, 140, 170, .6); }
.team-seats i.is-taken { border: 0; background: var(--grad); }

/* Certificates as diplomas */
.diploma-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 18px; }
.diploma { display: grid; gap: 12px; padding: 14px; border-radius: 18px; background: linear-gradient(135deg, rgba(245, 179, 1, .5), rgba(238, 58, 143, .35), rgba(122, 50, 232, .4)); transition: transform .3s var(--ease-out), box-shadow .3s ease; }
.diploma:hover { transform: translateY(-4px) rotate(-.4deg); box-shadow: 0 26px 50px -28px rgba(245, 179, 1, .8); }
.diploma.is-revoked { filter: grayscale(1); opacity: .7; }
.diploma-frame { position: relative; display: grid; justify-items: center; gap: 6px; padding: 26px 18px 18px; border: 1px solid rgba(245, 179, 1, .5); border-radius: 12px; background: radial-gradient(circle at 50% 0%, rgba(245, 179, 1, .14), transparent 60%), var(--panel-solid, #120d2e); text-align: center; }
.diploma-frame::before { content: ""; position: absolute; inset: 6px; border: 1px dashed rgba(245, 179, 1, .3); border-radius: 8px; pointer-events: none; }
.diploma-seal { display: grid; place-items: center; width: 60px; height: 60px; border-radius: 50%; color: #3b2503; background: radial-gradient(circle at 35% 30%, #ffe08a, #f5b301 55%, #b7791f); box-shadow: 0 0 0 5px rgba(245, 179, 1, .18), 0 12px 24px -10px rgba(245, 179, 1, .8); }
.diploma-seal .app-icon { width: 28px; height: 28px; vertical-align: 0; }
.diploma-kind { color: #f5b301; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .14em; }
.diploma-frame h3 { margin: 0; font: 700 19px/1.25 var(--font-display); }
.diploma-name { margin: 0; font-size: 13.5px; }
.diploma-frame .app-muted { margin: 0; font-size: 13px; }
.diploma-meta { display: inline-flex; align-items: center; gap: 6px; margin: 4px 0 0; color: var(--on-dark-muted); font-size: 12px; }
.diploma-actions, .diploma .li-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 0 4px; }
.diploma .li-actions { justify-content: flex-start; }
.empty-showcase { display: flex; align-items: center; gap: 30px; padding: 30px; }
.empty-showcase h2 { margin: 0 0 8px; }
.empty-showcase p { max-width: 560px; }
.empty-diploma { position: relative; display: grid; justify-items: center; gap: 8px; width: 190px; flex: none; padding: 24px 18px; border: 2px dashed rgba(245, 179, 1, .45); border-radius: 14px; transform: rotate(-4deg); animation: banner-float 7s ease-in-out infinite; }
.empty-diploma i { display: block; height: 8px; border-radius: 4px; background: rgba(150, 140, 170, .25); }
.empty-diploma i:nth-of-type(1) { width: 80%; }
.empty-diploma i:nth-of-type(2) { width: 60%; }
.empty-diploma i:nth-of-type(3) { width: 70%; }
.empty-diploma .diploma-seal { filter: grayscale(.6); }

/* Self-evaluation radar */
.evaluation-grid { align-items: start; }

.radar-box { display: grid; justify-items: center; gap: 4px; margin-bottom: 14px; }
.radar { width: 100%; max-width: 460px; overflow: visible; }
.radar-grid { fill: none; stroke: rgba(150, 140, 170, .28); stroke-width: 1; }
.radar-axis { stroke: rgba(150, 140, 170, .22); stroke-width: 1; }
.radar-label { fill: var(--on-dark-muted); font: 600 11px var(--font-body); }
.radar-shape { fill: rgba(122, 50, 232, .32); stroke: #a78bfa; stroke-width: 2.5; stroke-linejoin: round; transform-origin: 230px 190px; animation: radar-in 1s var(--ease-out) both .2s; }
.radar-dot { fill: #fff; stroke: #ee3a8f; stroke-width: 2.5; animation: radar-in 1s var(--ease-out) both .2s; transform-origin: 230px 190px; }
@keyframes radar-in { from { transform: scale(0); opacity: 0; } }
.radar-hint { margin: 0; color: var(--on-dark-muted); font-size: 12.5px; text-align: center; }

/* Visits */
.visit-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; }
.visit-card { display: flex; gap: 16px; padding: 16px; border: 1px solid var(--panel-line, rgba(255, 255, 255, .1)); border-radius: 16px; transition: transform .25s var(--ease-out), border-color .25s ease; }
.visit-card:hover { transform: translateY(-3px); border-color: rgba(14, 165, 233, .5); }
.visit-card.is-mine { border-color: rgba(34, 197, 94, .5); background: linear-gradient(135deg, rgba(34, 197, 94, .06), transparent 60%); }
.visit-date { display: grid; place-items: center; align-content: center; width: 70px; height: 84px; flex: none; border-radius: 14px; color: #fff; background: linear-gradient(160deg, #0ea5e9, #0f766e); line-height: 1.05; box-shadow: 0 12px 24px -12px rgba(14, 165, 233, .8); }
.visit-date b { font: 800 30px var(--font-display); }
.visit-date small { font-size: 11px; font-weight: 700; text-transform: uppercase; opacity: .9; }
.visit-body { display: grid; flex: 1; gap: 6px; align-content: start; min-width: 0; }
.visit-body .dash-countdown { justify-self: start; }
.visit-body h3 { margin: 0; font-size: 16.5px; }
.visit-place { display: flex; align-items: center; gap: 5px; margin: 0; color: var(--on-dark-muted); font-size: 13px; }
.visit-text { margin: 0; color: var(--on-dark-muted); font-size: 13px; line-height: 1.5; }
.visit-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 6px 0 0; }

/* Attendance */
.streak-callout { display: flex; align-items: center; gap: 14px; margin: 0; padding: 14px 18px; border-color: rgba(251, 146, 60, .45); background: linear-gradient(90deg, rgba(251, 146, 60, .12), transparent); }
.streak-flame { display: grid; place-items: center; width: 42px; height: 42px; flex: none; border-radius: 50%; color: #fff; background: linear-gradient(160deg, #f59e0b, #ef4444); animation: flame-flicker 1.4s ease-in-out infinite; }
.streak-flame .app-icon { width: 22px; height: 22px; vertical-align: 0; }
@keyframes flame-flicker { 50% { transform: scale(1.08) rotate(-4deg); } }
.presence-dots { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.presence-dots li { width: 22px; height: 22px; border-radius: 7px; background: rgba(150, 140, 170, .25); transition: transform .2s ease; animation: dot-in .4s var(--ease-out) both; }
.presence-dots li:hover { transform: scale(1.25); }
.presence-dots li.is-present, .presence-legend .is-present i { background: #22c55e; }
.presence-dots li.is-retard, .presence-legend .is-retard i { background: #f5b301; }
.presence-dots li.is-excuse, .presence-legend .is-excuse i { background: #60a5fa; }
.presence-dots li.is-absent, .presence-legend .is-absent i { background: #ef4444; }
.presence-dots li.is-a_venir, .presence-legend .is-a_venir i { background: transparent; border: 2px dashed rgba(150, 140, 170, .6); }
@keyframes dot-in { from { transform: scale(0); } }
.presence-legend { display: flex; flex-wrap: wrap; gap: 14px; margin: 14px 0 0; color: var(--on-dark-muted); font-size: 12.5px; }
.presence-legend span { display: inline-flex; align-items: center; gap: 6px; }
.presence-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 4px; }

@media (max-width: 900px) {
  .page-banner { grid-template-columns: 1fr; padding: 22px; }
  .page-banner .dash-ring.is-small { position: absolute; top: 16px; right: 16px; width: 76px; height: 76px; }
  .page-banner .dash-ring.is-small span { width: 60px; height: 60px; }
  .page-banner .dash-ring.is-small b { font-size: 18px; }
  .page-banner .dash-ring.is-small small { display: none; }
  .page-banner:has(.dash-ring) .page-banner-title { padding-right: 84px; }
  .page-banner-art { right: -30px; width: 160px; height: 160px; }

  .empty-showcase { flex-direction: column; text-align: center; }
  .empty-showcase .app-actions { justify-content: center; }
  .visit-grid, .diploma-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .page-banner-art, .empty-diploma, .streak-flame, .seat-text.is-urgent, .presence-dots li, .radar-shape, .radar-dot { animation: none; }
}

html.theme-light .track-ring span { background: #fff; }
html.theme-light .training-card, html.theme-light .crew-card { background: #fff; }
html.theme-light .diploma-frame { background: radial-gradient(circle at 50% 0%, rgba(245, 179, 1, .16), transparent 60%), #fffdf7; }
html.theme-light .crew-status, html.theme-light .crew-domain, html.theme-light .track-icon { color: #2f5fe0; }
html.theme-light .face-stack .app-avatar, html.theme-light .face-more { box-shadow: 0 0 0 2px #fff; }
html.theme-light .training-done { color: #15803d; }
html.theme-light .radar-shape { fill: rgba(109, 40, 217, .18); stroke: #6d28d9; }
.diploma-actions .app-link-button, .track-card .app-link-button { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.diploma-actions .app-link-button .app-icon, .track-card .app-link-button .app-icon { width: 15px; height: 15px; }
@media (max-width: 900px) {
  .page-banner:has(.dash-ring) .page-banner-text { padding-right: 70px; }
}
/* ==========================================================================
   Administration console: welcome, site health, growth chart, activity
   ========================================================================== */
.admin-hero { background: linear-gradient(120deg, #0f172a 0%, #1e3a8a 45%, #6d28d9 100%); }
.admin-hero-icon { display: grid; place-items: center; width: 72px; height: 72px; flex: none; border-radius: 22px; color: #fff; background: rgba(255, 255, 255, .14); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .25); }
.admin-hero-icon .app-icon { width: 34px; height: 34px; vertical-align: 0; }
.admin-hero .dash-ring { background: conic-gradient(#4ade80 calc(var(--p) * 1%), rgba(255, 255, 255, .15) 0); }
.dash-ring b i { font-size: .45em; font-style: normal; opacity: .8; }
.btn-on-banner, .page-banner .btn-ghost-dark { color: #fff !important; border-color: rgba(255, 255, 255, .4) !important; background: rgba(255, 255, 255, .1) !important; }
.page-banner .season-pick { display: inline-flex; align-items: center; gap: 8px; padding: 4px 6px 4px 12px; border-radius: 999px; background: rgba(255, 255, 255, .14); }
.page-banner .season-pick label { margin: 0; color: #fff; font-size: 13px; font-weight: 700; }
.page-banner .season-pick select { width: auto; min-height: 32px; padding: 4px 30px 4px 10px; border: 0; border-radius: 999px; color: #1d1530; background-color: #fff; font-weight: 700; }

.admin-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.bar-chart { display: flex; align-items: flex-end; gap: 14px; height: 200px; padding: 10px 4px 0; }
.bar-col { display: grid; flex: 1; grid-template-rows: auto 1fr auto; justify-items: center; gap: 6px; height: 100%; }
.bar-col b { font: 800 14px var(--font-display); }
.bar-col .bar { align-self: end; width: 100%; max-width: 46px; height: var(--h); min-height: 4px; border-radius: 10px 10px 4px 4px; background: linear-gradient(180deg, #60a5fa, #7c3aed); box-shadow: 0 10px 20px -12px rgba(124, 58, 237, .9); transform-origin: bottom; animation: bar-grow .8s var(--ease-out) both; animation-delay: calc(var(--i) * 90ms); }
.bar-col.is-now .bar { background: linear-gradient(180deg, #f472b6, #ee3a8f); }
.bar-col small { color: var(--on-dark-muted); font-size: 12px; font-weight: 600; }
@keyframes bar-grow { from { transform: scaleY(0); } }
.health-list { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.health-list a { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 10px; transition: background .2s ease; }
.health-list a:hover { background: rgba(79, 139, 255, .08); }
.health-mark { display: grid; place-items: center; width: 30px; height: 30px; flex: none; border-radius: 9px; color: #fb923c; background: rgba(251, 146, 60, .14); }
.health-mark .app-icon { width: 16px; height: 16px; vertical-align: 0; }
.health-list .is-ok .health-mark { color: #fff; background: #22c55e; }
.health-list .is-ok a > span:nth-child(2) { color: var(--on-dark-muted); }
.health-list a > span:nth-child(2) { flex: 1; font-size: 14px; font-weight: 600; }
.health-list em { padding: 3px 10px; border-radius: 999px; color: #fb923c; background: rgba(251, 146, 60, .12); font-size: 12px; font-style: normal; font-weight: 800; }
.activity-feed { position: relative; display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }
.activity-feed::before { content: ""; position: absolute; top: 18px; bottom: 18px; left: 17px; width: 2px; background: linear-gradient(180deg, rgba(79, 139, 255, .45), rgba(150, 140, 170, .1)); }
.activity-feed li { position: relative; display: flex; align-items: center; gap: 14px; padding: 8px 0; animation: feed-in .5s var(--ease-out) both; }
.activity-feed li:nth-child(2) { animation-delay: .06s; } .activity-feed li:nth-child(3) { animation-delay: .12s; } .activity-feed li:nth-child(4) { animation-delay: .18s; } .activity-feed li:nth-child(5) { animation-delay: .24s; } .activity-feed li:nth-child(n+6) { animation-delay: .3s; }
@keyframes feed-in { from { opacity: 0; transform: translateX(-10px); } }
.activity-dot { position: relative; display: grid; place-items: center; width: 36px; height: 36px; flex: none; border-radius: 50%; color: #fff; box-shadow: 0 0 0 4px var(--panel-solid, #120d2e); }
.activity-dot .app-icon { width: 16px; height: 16px; vertical-align: 0; }
.activity-dot.is-blue { background: #3b82f6; } .activity-dot.is-gold { background: #d97706; } .activity-dot.is-purple { background: #7c3aed; } .activity-dot.is-green { background: #16a34a; } .activity-dot.is-red { background: #dc2626; } .activity-dot.is-pink { background: #db2777; }
.activity-feed p { flex: 1; margin: 0; font-size: 14px; line-height: 1.45; }
.activity-feed time { color: var(--on-dark-muted); font-size: 12px; white-space: nowrap; }
.todo-clear { display: flex; align-items: center; gap: 14px; margin: 0; padding: 16px; border-radius: 14px; background: linear-gradient(90deg, rgba(34, 197, 94, .12), transparent); }
.todo-clear > span:first-child { display: grid; place-items: center; width: 44px; height: 44px; flex: none; border-radius: 50%; color: #fff; background: #22c55e; box-shadow: 0 0 0 6px rgba(34, 197, 94, .18); }
.todo-clear > span:last-child { display: grid; gap: 2px; color: var(--on-dark-muted); font-size: 13.5px; }
.todo-clear strong { color: inherit; font-size: 15px; }
body.app-page .todo-clear strong { color: #4ade80; }

/* Quick actions: one colour per action, livelier hover */
.quick-action { transition: transform .25s var(--ease-out), border-color .25s ease, box-shadow .25s ease; }
.quick-action:hover { transform: translateY(-3px); box-shadow: 0 18px 34px -22px rgba(79, 139, 255, .8); }
.quick-action > .app-icon { transition: transform .3s var(--ease-out); }
.quick-action:hover > .app-icon { transform: rotate(-8deg) scale(1.08); }
.quick-grid .quick-action:nth-child(1) > .app-icon { color: #fff; background: linear-gradient(135deg, #f59e0b, #d97706); }
.quick-grid .quick-action:nth-child(2) > .app-icon { color: #fff; background: linear-gradient(135deg, #22c55e, #15803d); }
.quick-grid .quick-action:nth-child(3) > .app-icon { color: #fff; background: linear-gradient(135deg, #3b82f6, #1d4ed8); }
.quick-grid .quick-action:nth-child(4) > .app-icon { color: #fff; background: linear-gradient(135deg, #ec4899, #be185d); }
.quick-grid .quick-action:nth-child(5) > .app-icon { color: #fff; background: linear-gradient(135deg, #8b5cf6, #6d28d9); }
.quick-grid .quick-action:nth-child(6) > .app-icon { color: #fff; background: linear-gradient(135deg, #14b8a6, #0f766e); }
.todo-list li > .app-icon { color: #fb923c; }

/* Lists of the console: rows react to the pointer */
body.app-page .app-rows > .app-row, body.app-page .app-table tbody tr { transition: background .2s ease, transform .2s ease; }
body.app-page .app-rows > .app-row:hover { background: rgba(79, 139, 255, .05); }
body.app-page .app-table tbody tr:hover { background: rgba(79, 139, 255, .06); }

@media (max-width: 900px) {
  .admin-grid { grid-template-columns: 1fr; }
  .admin-hero .dash-hero-id { padding-right: 92px; }
  .admin-hero-icon { width: 54px; height: 54px; border-radius: 16px; }
}
@media (prefers-reduced-motion: reduce) { .bar-col .bar, .activity-feed li { animation: none; } }
@media print { .page-banner { display: none !important; } }
html.theme-light .activity-dot { box-shadow: 0 0 0 4px #fff; }
html.theme-light .health-list .is-ok a > span:nth-child(2) { color: #6b6585; }
html.theme-light body.app-page .todo-clear strong, html.theme-light .todo-clear strong { color: #15803d; }.admin-grid > .app-card:first-child { display: flex; flex-direction: column; }
.admin-grid .bar-chart { flex: 1; min-height: 200px; }
/* ==========================================================================
   Site content in the console: visual cards, icon toolbar, image drop zone
   ========================================================================== */
.card-rank { position: absolute; top: 10px; left: 10px; z-index: 2; padding: 3px 9px; border-radius: 999px; color: #fff; background: rgba(10, 7, 30, .72); backdrop-filter: blur(6px); font-size: 12px; font-weight: 800; }
.card-chip { position: absolute; left: 10px; bottom: 10px; z-index: 2; display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 999px; color: #fff; background: linear-gradient(135deg, #4f8bff, #7c3aed); font-size: 11.5px; font-weight: 800; box-shadow: 0 6px 16px -6px rgba(0, 0, 0, .6); }
.card-chip.is-gold { color: #3b2503; background: linear-gradient(135deg, #ffe08a, #f5b301); }
.card-chip .app-icon { width: 13px; height: 13px; }
.card-chip.is-inline, .card-hidden.is-inline { position: static; box-shadow: none; }
.card-hidden { position: absolute; top: 10px; right: 10px; z-index: 2; display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; color: #fff; background: rgba(220, 38, 38, .85); font-size: 11.5px; font-weight: 800; }
.card-hidden .app-icon { width: 13px; height: 13px; }
.card-tools { display: flex; align-items: center; justify-content: center; gap: 2px; padding: 6px; border-top: 1px solid var(--panel-line, rgba(255, 255, 255, .08)); }
.card-tools form { margin: 0; }
.tool-sep { width: 1px; height: 20px; margin: 0 4px; background: var(--panel-line, rgba(255, 255, 255, .14)); }
.tool-btn { display: grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 9px; color: var(--on-dark-muted); background: transparent; cursor: pointer; transition: background .2s ease, color .2s ease, transform .2s ease; }
.tool-btn .app-icon, .tool-btn svg { width: 17px; height: 17px; vertical-align: 0; }
.tool-btn:hover:not(:disabled) { color: #fff; background: rgba(79, 139, 255, .2); transform: translateY(-1px); }
.tool-btn.is-danger:hover:not(:disabled) { color: #fff; background: #dc2626; }
.tool-btn.is-linkedin:hover { color: #fff; background: #0a66c2; }
.tool-btn:disabled { opacity: .25; cursor: default; }

/* Bureau: portrait cards like the public site */
.board-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 16px; }
.board-card, .show-card, .logo-card { position: relative; display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--panel-line, rgba(255, 255, 255, .1)); border-radius: 16px; background: var(--panel-solid, #120d2e); transition: transform .25s var(--ease-out), border-color .25s ease, box-shadow .25s ease; }
.board-card:hover, .show-card:hover, .logo-card:hover { transform: translateY(-4px); border-color: rgba(79, 139, 255, .5); box-shadow: 0 22px 40px -26px rgba(79, 139, 255, .8); }
.board-card.is-lead { border-color: rgba(245, 179, 1, .5); }
.board-card.is-editing, .show-card.is-editing, .logo-card.is-editing, .event-card.is-editing, .photo-card.is-editing { border-color: #4f8bff; box-shadow: 0 0 0 3px rgba(79, 139, 255, .25); }
.board-card.is-hidden img, .show-card.is-hidden img, .logo-card.is-hidden img, .photo-card.is-hidden img { filter: grayscale(1); opacity: .45; }
.board-photo { position: relative; aspect-ratio: 4 / 5; overflow: hidden; background: linear-gradient(160deg, #1e3a8a, #6d28d9); }
.board-photo img { width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform .6s var(--ease-out); }
.board-card:hover .board-photo img, .show-card:hover .show-cover img { transform: scale(1.06); }
.board-photo::after { content: ""; position: absolute; inset: 55% 0 0; background: linear-gradient(transparent, rgba(10, 7, 30, .75)); pointer-events: none; }
.board-initials { display: grid; place-items: center; height: 100%; color: #fff; font: 800 40px var(--font-display); }
.board-info { display: grid; gap: 2px; padding: 12px 14px 10px; text-align: center; }
.board-info strong { font-size: 15px; }
.board-info small { color: #c4b5fd; font-size: 12.5px; font-weight: 600; }

/* Site projects */
.show-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.show-cover { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: linear-gradient(135deg, #1e3a8a, #7c3aed); }
.show-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease-out); }
.show-empty { display: grid; place-items: center; height: 100%; color: rgba(255, 255, 255, .6); }
.show-empty .app-icon { width: 40px; height: 40px; }
.show-body { display: grid; flex: 1; gap: 4px; align-content: start; padding: 12px 14px; }
.show-category { color: #9cc8ff; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; }
.show-body h3 { margin: 0; font-size: 15.5px; }
.show-body p { display: -webkit-box; margin: 0; overflow: hidden; color: var(--on-dark-muted); font-size: 13px; line-height: 1.5; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }

/* Partners: logos on a clean white stage */
.logo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 16px; }
.logo-stage { position: relative; display: grid; place-items: center; aspect-ratio: 3 / 2; padding: 26px 18px 18px; background: #fff; }
.logo-stage img { max-width: 100%; max-height: 80px; object-fit: contain; transition: transform .4s var(--ease-out); }
.logo-card:hover .logo-stage img { transform: scale(1.08); }
.logo-info { display: grid; gap: 3px; padding: 10px 12px 8px; text-align: center; }
.logo-info strong { font-size: 14px; }
.logo-info a, .logo-info small { display: inline-flex; align-items: center; justify-content: center; gap: 4px; overflow: hidden; color: var(--on-dark-muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.logo-info .app-icon { flex: none; width: 12px; height: 12px; }

/* Gallery photos */
.photo-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.photo-card { display: flex; flex-direction: column; border-radius: 14px; transition: transform .25s var(--ease-out), box-shadow .25s ease; }
.photo-card:hover { transform: translateY(-3px); box-shadow: 0 20px 36px -24px rgba(79, 139, 255, .8); }
.photo-frame { position: relative; overflow: hidden; }
.photo-frame img { aspect-ratio: 4 / 3; transition: transform .6s var(--ease-out); }
.photo-card:hover .photo-frame img { transform: scale(1.06); }
.photo-frame figcaption { position: absolute; inset: auto 0 0; display: grid; gap: 1px; padding: 26px 12px 10px; color: #fff; background: linear-gradient(transparent, rgba(10, 7, 30, .85)); }
.photo-frame figcaption strong { font-size: 13.5px; }
.photo-frame figcaption small { color: rgba(255, 255, 255, .75); font-size: 11.5px; }

/* Events: a timeline of cards */
.event-timeline { position: relative; display: grid; gap: 14px; margin: 0; padding: 0 0 0 4px; list-style: none; }
.event-card { position: relative; display: grid; grid-template-columns: 74px minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 14px; border: 1px solid var(--panel-line, rgba(255, 255, 255, .1)); border-radius: 16px; background: var(--panel-solid, #120d2e); transition: transform .25s var(--ease-out), border-color .25s ease; }
.event-card:hover { transform: translateX(4px); border-color: rgba(238, 58, 143, .5); }
.event-card.is-hidden { opacity: .6; }
.event-date { display: grid; place-items: center; align-content: center; width: 74px; height: 82px; border-radius: 14px; color: #fff; background: linear-gradient(160deg, #6d28d9, #be185d); line-height: 1.1; box-shadow: 0 12px 24px -14px rgba(190, 24, 93, .9); }
.event-card.is-future .event-date { background: linear-gradient(160deg, #ec4899, #f97316); }
.event-date b { font: 800 28px var(--font-display); }
.event-date small { font-size: 11px; font-weight: 700; text-transform: uppercase; opacity: .9; }
.event-date .app-icon { width: 26px; height: 26px; }
.event-body { display: grid; gap: 4px; min-width: 0; }
.event-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0; }
.event-body h3 { margin: 0; font-size: 16px; }
.event-text { display: -webkit-box; margin: 0; overflow: hidden; color: var(--on-dark-muted); font-size: 13px; line-height: 1.5; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.event-card .card-tools { flex-direction: column; flex-wrap: wrap; max-height: 100%; padding: 0 0 0 10px; border-top: 0; border-left: 1px solid var(--panel-line, rgba(255, 255, 255, .08)); display: grid; grid-template-columns: repeat(2, 34px); }
.event-card .tool-sep { display: none; }

/* Side form: a coloured edge and a proper image drop zone */
body.app-page .site-form { overflow: hidden; }
body.app-page .site-form { border-top: 3px solid #8b5cf6; }
.image-field { display: grid; grid-template-columns: 1fr; gap: 8px; margin-bottom: 8px; }
.image-field .field-title { margin: 0; }
.image-input { position: absolute !important; width: 1px !important; height: 1px !important; opacity: 0; overflow: hidden; }
.image-drop { position: relative; display: grid; place-items: center; overflow: hidden; margin: 0; border: 2px dashed rgba(79, 139, 255, .45); border-radius: 14px; background: linear-gradient(135deg, rgba(30, 155, 240, .07), rgba(238, 58, 143, .05)); cursor: pointer; transition: border-color .2s ease, transform .2s ease; }
.image-field.is-landscape .image-drop { aspect-ratio: 16 / 9; }
.image-field.is-portrait .image-drop { width: 190px; aspect-ratio: 4 / 5; }
.image-field.is-logo .image-drop { aspect-ratio: 2 / 1; background: #fff; }
.image-field.is-round .image-drop, .image-field.is-square .image-drop { width: 170px; aspect-ratio: 1; }
.image-drop:hover, .image-drop.is-over { border-color: #4f8bff; transform: scale(1.01); }
.image-drop img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.image-field.is-logo .image-drop img { padding: 12px; object-fit: contain; }
.image-drop-hint { position: relative; z-index: 1; display: grid; justify-items: center; gap: 4px; padding: 10px; text-align: center; }
.image-drop-hint .app-icon { width: 40px; height: 40px; padding: 9px; border-radius: 50%; color: #fff; background: var(--grad); }
.image-drop-hint strong { font-size: 14px; }
.image-drop-hint small { color: var(--on-dark-muted); font-size: 12px; }
.image-field.is-logo .image-drop-hint { color: #1d1530; }
.image-drop.has-image .image-drop-hint { opacity: 0; color: #fff; background: rgba(10, 7, 30, .6); border-radius: 12px; transition: opacity .2s ease; }
.image-drop.has-image .image-drop-hint small { color: rgba(255, 255, 255, .8); }
.image-drop.has-image:hover .image-drop-hint, .image-drop.has-image.is-over .image-drop-hint { opacity: 1; }
.image-drop.is-fresh { border-style: solid; border-color: #22c55e; }
.image-drop[data-count]:not([data-count=""])::after { content: attr(data-count); position: absolute; right: 10px; bottom: 10px; z-index: 2; padding: 3px 10px; border-radius: 999px; color: #fff; background: rgba(10, 7, 30, .8); font-size: 13px; font-weight: 800; }
.image-note { margin: 0; }

@media (max-width: 760px) {
  .event-card { grid-template-columns: 64px minmax(0, 1fr); }
  .event-card .card-tools { grid-column: 1 / -1; display: flex; justify-content: center; padding: 8px 0 0; border-left: 0; border-top: 1px solid var(--panel-line, rgba(255, 255, 255, .08)); }
  .event-card .tool-sep { display: block; }
  .event-date { width: 64px; height: 72px; }
}
html.theme-light .board-card, html.theme-light .show-card, html.theme-light .logo-card, html.theme-light .event-card { background: #fff; border-color: var(--panel-line); }
html.theme-light .logo-stage { background: #f8f7fc; }
html.theme-light .board-info small { color: #6d28d9; }
html.theme-light .show-category { color: #2f5fe0; }
html.theme-light .tool-btn:hover:not(:disabled) { color: #fff; background: #4f6ef7; }.image-drop-hint { background: transparent; border: 0; }
.image-field.is-logo .image-drop-hint small { color: #6b6585; }
.album-empty { display: grid; justify-items: center; gap: 8px; padding: 34px 20px; border: 2px dashed rgba(236, 72, 153, .35); border-radius: 16px; text-align: center; }
.album-empty > span { display: grid; place-items: center; width: 60px; height: 60px; border-radius: 18px; color: #fff; background: linear-gradient(135deg, #ec4899, #be185d); }
.album-empty > span .app-icon { width: 28px; height: 28px; vertical-align: 0; }
.album-empty strong { font-size: 16px; }
.album-empty p { max-width: 380px; margin: 0; color: var(--on-dark-muted); font-size: 13.5px; }
.image-drop img[hidden] { display: none !important; }

/* ==========================================================================
   Circuit simulator
   ========================================================================== */
.board-picker { display: flex; flex-wrap: wrap; gap: 14px 22px; margin-bottom: 16px; }
.board-family { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.board-family small { margin-right: 4px; color: var(--on-dark-muted); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .12em; }
.board-pill { display: inline-flex; align-items: center; gap: 6px; padding: 7px 13px; border: 1px solid var(--panel-line, rgba(255, 255, 255, .14)); border-radius: 999px; font-size: 13px; font-weight: 700; transition: border-color .2s ease, background .2s ease, transform .2s ease; }
.board-pill .app-icon { width: 15px; height: 15px; color: #2dd4bf; }
.board-pill:hover { transform: translateY(-1px); border-color: rgba(45, 212, 191, .6); }
.board-pill.is-active { color: #fff; border-color: transparent; background: linear-gradient(135deg, #0f766e, #0ea5e9); box-shadow: 0 10px 22px -12px rgba(14, 165, 233, .9); }
.board-pill.is-active .app-icon { color: #fff; }
.sim-frame { overflow: hidden; border: 1px solid var(--panel-line, rgba(255, 255, 255, .1)); border-radius: 16px; background: #0b0a1f; }
.sim-frame:fullscreen { border-radius: 0; }
.sim-frame:fullscreen .sim-stage.is-workshop { height: calc(100vh - 56px); }
.sim-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px 8px 14px; border-bottom: 1px solid var(--panel-line, rgba(255, 255, 255, .1)); background: linear-gradient(90deg, rgba(15, 118, 110, .25), rgba(14, 165, 233, .12)); }
.sim-board { display: inline-flex; align-items: center; gap: 8px; color: #fff; font-weight: 800; }
.sim-board .app-icon { color: #2dd4bf; }
.sim-toolbar-actions { display: inline-flex; align-items: center; gap: 6px; }
.sim-stage { position: relative; display: grid; place-items: center; min-height: 240px; background: radial-gradient(circle at 50% 40%, rgba(45, 212, 191, .16), transparent 55%), repeating-linear-gradient(0deg, rgba(255, 255, 255, .035) 0 1px, transparent 1px 24px), repeating-linear-gradient(90deg, rgba(255, 255, 255, .035) 0 1px, transparent 1px 24px), #0b0a1f; }
.sim-stage.is-workshop { height: min(78vh, 760px); }
.sim-stage.is-inline { aspect-ratio: 16 / 10; margin: 14px 0; overflow: hidden; border: 1px solid var(--panel-line, rgba(255, 255, 255, .1)); border-radius: 14px; }
.sim-stage iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #fff; }
.sim-stage.is-loading::after { content: "Chargement du simulateur…"; position: absolute; left: 50%; top: 50%; z-index: 0; color: rgba(255, 255, 255, .7); font-weight: 700; transform: translate(-50%, -50%); }
.sim-launch { display: grid; justify-items: center; gap: 8px; padding: 26px; border: 0; color: #fff; background: none; font: inherit; text-align: center; cursor: pointer; }
.sim-launch-icon { display: grid; place-items: center; width: 82px; height: 82px; border-radius: 50%; color: #fff; background: linear-gradient(135deg, #14b8a6, #0ea5e9); box-shadow: 0 0 0 10px rgba(45, 212, 191, .14), 0 20px 40px -14px rgba(14, 165, 233, .9); transition: transform .3s var(--ease-out); animation: sim-pulse 2.4s ease-in-out infinite; }
.sim-launch-icon .app-icon { width: 36px; height: 36px; vertical-align: 0; }
.sim-launch:hover .sim-launch-icon { transform: scale(1.08); }
.sim-launch strong { font: 700 19px var(--font-display); }
.sim-launch small { color: rgba(255, 255, 255, .7); font-size: 13px; }
@keyframes sim-pulse { 50% { box-shadow: 0 0 0 18px rgba(45, 212, 191, .06), 0 20px 40px -14px rgba(14, 165, 233, .9); } }
.sim-open { position: absolute; right: 12px; bottom: 12px; z-index: 2; display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; color: #fff; background: rgba(10, 7, 30, .75); font-size: 12.5px; font-weight: 700; }
.sim-stage.is-running .sim-open { top: 10px; bottom: auto; }
.sim-howto { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 16px 0 0; padding: 0; list-style: none; }
.sim-howto li { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border-radius: 12px; background: rgba(45, 212, 191, .07); font-size: 13.5px; line-height: 1.5; }
.sim-howto span { display: grid; place-items: center; width: 26px; height: 26px; flex: none; border-radius: 50%; color: #fff; background: linear-gradient(135deg, #14b8a6, #0ea5e9); font-weight: 800; font-size: 13px; }
.challenge-brief { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 16px; padding: 18px; border: 1px solid rgba(245, 179, 1, .45); border-radius: 16px; background: linear-gradient(120deg, rgba(245, 179, 1, .12), transparent 70%); }
.challenge-brief > div { flex: 1; }
.challenge-brief-icon { display: grid; place-items: center; width: 48px; height: 48px; flex: none; border-radius: 14px; color: #3b2503; background: linear-gradient(135deg, #ffe08a, #f5b301); }
.challenge-brief-icon .app-icon { width: 24px; height: 24px; vertical-align: 0; }
.challenge-brief-kicker { margin: 0; color: #f5b301; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; }
.challenge-brief h3 { margin: 4px 0 8px; font-size: 19px; }
.challenge-brief ol { margin: 0 0 8px; padding-left: 20px; font-size: 14px; line-height: 1.7; }
.challenge-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.challenge-card { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 16px; border: 1px solid var(--panel-line, rgba(255, 255, 255, .1)); border-radius: 16px; transition: transform .25s var(--ease-out), border-color .25s ease, box-shadow .25s ease; }
.challenge-card:hover { transform: translateY(-4px); border-color: rgba(245, 179, 1, .55); box-shadow: 0 20px 36px -24px rgba(245, 179, 1, .8); }
.challenge-card.is-current { border-color: #f5b301; }
.challenge-card.is-done { border-color: rgba(34, 197, 94, .5); background: linear-gradient(135deg, rgba(34, 197, 94, .07), transparent 60%); }
.challenge-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
.challenge-level { padding: 3px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 800; }
.challenge-level.is-green { color: #4ade80; background: rgba(74, 222, 128, .12); }
.challenge-level.is-gold { color: #f5b301; background: rgba(245, 179, 1, .12); }
.challenge-level.is-pink { color: #f472b6; background: rgba(244, 114, 182, .12); }
.challenge-board { color: var(--on-dark-muted); font-size: 12px; font-weight: 700; }
.challenge-card strong { font-size: 16px; }
.challenge-card small { color: var(--on-dark-muted); font-size: 13px; line-height: 1.5; }
.challenge-cta { display: inline-flex; align-items: center; gap: 6px; margin-top: auto; padding-top: 8px; color: #9cc8ff; font-size: 13.5px; font-weight: 700; }
.challenge-card.is-done .challenge-cta { color: #4ade80; }
.challenge-cta .app-icon { width: 15px; height: 15px; }
.sim-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.sim-card { display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--panel-line, rgba(255, 255, 255, .1)); border-radius: 16px; background: var(--panel-solid, #120d2e); transition: transform .25s var(--ease-out), border-color .25s ease; }
.sim-card:hover { transform: translateY(-3px); border-color: rgba(45, 212, 191, .55); }
.sim-card-art { position: relative; display: grid; place-items: center; aspect-ratio: 16 / 8; color: rgba(255, 255, 255, .85); background: radial-gradient(circle at 50% 50%, rgba(45, 212, 191, .3), transparent 60%), repeating-linear-gradient(0deg, rgba(255, 255, 255, .05) 0 1px, transparent 1px 16px), repeating-linear-gradient(90deg, rgba(255, 255, 255, .05) 0 1px, transparent 1px 16px), linear-gradient(135deg, #0f766e, #1e3a8a); }
.sim-card-art > .app-icon { width: 44px; height: 44px; }
.sim-card-art .card-rank { left: auto; right: 10px; display: inline-flex; align-items: center; gap: 4px; }
.sim-card-art .card-rank .app-icon { width: 12px; height: 12px; }
.sim-card-body { display: grid; flex: 1; gap: 4px; align-content: start; padding: 12px 14px; }
.sim-card-body h3 { margin: 0; font-size: 15.5px; }
.sim-card-body p { display: -webkit-box; margin: 0; overflow: hidden; color: var(--on-dark-muted); font-size: 13px; line-height: 1.5; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.sim-card-challenge { display: inline-flex; align-items: center; gap: 5px; color: #f5b301; font-size: 12px; font-weight: 700; }
.sim-card-challenge .app-icon { width: 13px; height: 13px; }
.sim-author { display: inline-flex; align-items: center; gap: 8px; margin-top: 6px; color: var(--on-dark-muted); font-size: 12.5px; font-weight: 600; }
.like-btn { display: inline-flex; align-items: center; gap: 5px; height: 34px; padding: 0 12px; border: 1px solid var(--panel-line, rgba(255, 255, 255, .14)); border-radius: 999px; color: var(--on-dark-muted); background: transparent; font: 700 14px var(--font-body); cursor: pointer; transition: all .2s ease; }
.like-btn:hover { color: #f472b6; border-color: rgba(244, 114, 182, .5); }
.like-btn.is-liked { color: #fff; border-color: transparent; background: linear-gradient(135deg, #ec4899, #be185d); }
.like-btn.is-liked:active { transform: scale(1.15); }
.sim-dialog { width: min(1200px, 96vw); height: min(820px, 92vh); padding: 0; overflow: hidden; border: 1px solid rgba(255, 255, 255, .15); border-radius: 18px; color: #fff; background: #0b0a1f; box-shadow: 0 40px 100px -30px rgba(0, 0, 0, .9); }
.sim-dialog::backdrop { background: rgba(5, 4, 15, .75); backdrop-filter: blur(4px); }
.sim-dialog[open] { display: flex; flex-direction: column; animation: toastIn .35s ease both; }
.sim-dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px 10px 18px; border-bottom: 1px solid rgba(255, 255, 255, .1); }
.sim-dialog-head > span { display: inline-flex; align-items: center; gap: 6px; }
.sim-dialog iframe { flex: 1; width: 100%; border: 0; background: #fff; }
.sim-layout { align-items: start; }
@media (max-width: 760px) {
  .sim-howto { grid-template-columns: 1fr; }
  .sim-stage.is-workshop { height: 70vh; }
  .sim-toolbar .btn { width: 100%; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) { .sim-launch-icon { animation: none; } }
html.theme-light .board-pill .app-icon { color: #0f766e; }
html.theme-light .sim-card, html.theme-light .challenge-card { background: #fff; }
html.theme-light .challenge-cta { color: #2f5fe0; }
html.theme-light .challenge-level.is-green { color: #15803d; }
html.theme-light .challenge-level.is-gold { color: #a16207; }
html.theme-light .sim-howto li { background: rgba(15, 118, 110, .07); }
.sim-howto p { margin: 0; }

/* ==========================================================================
   Finishing touches: page transitions, confirmations, tooltips, drafts
   ========================================================================== */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .22s; }
@media (prefers-reduced-motion: reduce) { @view-transition { navigation: none; } }

/* Blocks rise gently as they scroll into view. Driven by the scroll itself: where the browser
   cannot do it, nothing is hidden. */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    body.app-page .app-main > .app-card, body.app-page .app-main > .app-grid > *, body.app-page .app-main > .dash-grid > *, body.app-page .app-main > .course-shelf { animation: block-rise linear both; animation-timeline: view(); animation-range: entry 0% entry 28%; }
  }
}
@keyframes block-rise { from { opacity: 0; transform: translateY(26px); } }

.confirm-dialog { width: min(420px, 92vw); padding: 26px 24px 20px; border: 1px solid rgba(255, 255, 255, .14); border-radius: 18px; color: #fff; background: #15112f; text-align: center; box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .9); }
.confirm-dialog[open] { animation: confirm-in .28s var(--ease-spring, cubic-bezier(.34, 1.56, .64, 1)) both; }
.confirm-dialog::backdrop { background: rgba(5, 4, 15, .6); backdrop-filter: blur(3px); }
@keyframes confirm-in { from { opacity: 0; transform: translateY(12px) scale(.95); } }
.confirm-icon { display: grid; place-items: center; width: 56px; height: 56px; margin: 0 auto 12px; border-radius: 50%; color: #fff; background: linear-gradient(135deg, #4f8bff, #7c3aed); font: 800 26px var(--font-display); box-shadow: 0 0 0 8px rgba(79, 139, 255, .15); }
.confirm-dialog.is-danger .confirm-icon { background: linear-gradient(135deg, #f43f5e, #b91c1c); box-shadow: 0 0 0 8px rgba(244, 63, 94, .15); }
.confirm-text { margin: 0 0 20px; font-size: 15.5px; line-height: 1.5; }
.confirm-actions { display: flex; justify-content: center; gap: 10px; }
.confirm-dialog.is-danger [data-answer="yes"] { background: linear-gradient(135deg, #f43f5e, #b91c1c); }

.tool-btn { position: relative; }
.tool-btn[data-tip]:hover::after, .tool-btn[data-tip]:focus-visible::after { content: attr(data-tip); position: absolute; bottom: calc(100% + 8px); left: 50%; z-index: 30; padding: 5px 9px; border-radius: 8px; color: #fff; background: #1d1530; box-shadow: 0 8px 20px -8px rgba(0, 0, 0, .7), inset 0 0 0 1px rgba(255, 255, 255, .12); font: 600 12px var(--font-body); white-space: nowrap; pointer-events: none; transform: translateX(-50%); animation: tip-in .15s ease both; }
@keyframes tip-in { from { opacity: 0; transform: translate(-50%, 4px); } }

.char-count { display: block; margin-top: 4px; color: var(--on-dark-muted); font-size: 11.5px; text-align: right; }
.char-count.is-near { color: #fb923c; font-weight: 700; }
.draft-note { display: inline-flex; align-items: center; gap: 8px; margin-top: 4px; padding: 3px 10px; border-radius: 999px; color: #9cc8ff; background: rgba(79, 139, 255, .12); font-size: 12px; font-weight: 600; }
.draft-note button { padding: 0; border: 0; color: inherit; background: none; font: inherit; text-decoration: underline; cursor: pointer; }

.app-to-top { position: fixed; right: 22px; bottom: 22px; z-index: 40; display: grid; place-items: center; width: 46px; height: 46px; border: 0; border-radius: 50%; color: #fff; background: var(--grad); box-shadow: 0 14px 30px -12px rgba(122, 50, 232, .9); cursor: pointer; opacity: 0; transform: translateY(16px) scale(.9); pointer-events: none; transition: opacity .3s ease, transform .3s var(--ease-out); }
.app-to-top svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.app-to-top.is-visible { opacity: 1; transform: none; pointer-events: auto; }
.app-to-top:hover { transform: translateY(-3px); }
@media (max-width: 900px) { .app-to-top { right: 16px; bottom: 92px; } }

/* Public profile as a portfolio */
.profile-hero { background: linear-gradient(120deg, #1e1b4b 0%, #6d28d9 50%, #db2777 100%); }
.profile-hero .app-avatar.is-xl { width: 92px; height: 92px; font-size: 30px; box-shadow: 0 0 0 4px rgba(255, 255, 255, .25); }
.profile-hero .dash-hello strong { font-size: clamp(26px, 3.2vw, 36px); }
.profile-grid { align-items: start; }
.profile-bio { margin: 0 0 14px; font-size: 15px; line-height: 1.7; }
.profile-strengths { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 10px; }
.profile-strengths span { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; color: #4ade80; background: rgba(74, 222, 128, .1); font-size: 13px; font-weight: 700; }
.profile-strengths .app-icon { width: 14px; height: 14px; }
.profile-radar .radar { max-width: 420px; }
.badge-grid.is-compact { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; }
.badge-grid.is-compact .badge-item { padding: 12px 8px; }
.badge-grid.is-compact .badge-medal { width: 48px; height: 48px; }
.badge-grid.is-compact strong { font-size: 12.5px; }
.profile-sub { margin: 20px 0 10px; font-size: 15px; }
.profile-certs { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.profile-certs li { display: flex; align-items: center; gap: 12px; padding: 10px; border: 1px solid rgba(245, 179, 1, .3); border-radius: 12px; background: linear-gradient(90deg, rgba(245, 179, 1, .08), transparent); }
.profile-certs li > span:nth-child(2) { display: grid; flex: 1; gap: 2px; min-width: 0; }
.profile-certs strong { font-size: 14px; }
.profile-certs small { color: var(--on-dark-muted); font-size: 12px; }
.profile-certs .app-link-button { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.diploma-seal.is-mini { width: 38px; height: 38px; flex: none; box-shadow: 0 0 0 3px rgba(245, 179, 1, .18); }
.diploma-seal.is-mini .app-icon { width: 18px; height: 18px; }
.crew-card .crew-role { margin-top: auto; }
.profile-done { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.profile-done span { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: rgba(79, 139, 255, .12); font-size: 13px; font-weight: 600; }
.profile-done span.is-online { background: rgba(236, 72, 153, .12); }
.profile-done .app-icon { width: 14px; height: 14px; }

html.theme-light .confirm-dialog { color: #1d1530; background: #fff; border-color: var(--panel-line); }
html.theme-light .tool-btn[data-tip]:hover::after { background: #1d1530; }
html.theme-light .profile-strengths span { color: #15803d; }
html.theme-light .draft-note { color: #2f5fe0; }
/* Login and sign-up: what the club offers, beside the form on wide screens */
.join-perks { display: none; }
@media (min-width: 1100px) {
  .registration-main:has(.join-perks) { display: grid; grid-template-columns: minmax(0, 560px) minmax(0, 440px); justify-content: center; align-items: center; gap: 56px; }
  .registration-main:has(.join-perks) .registration-card { margin: 0; }
  .join-perks { display: block; color: #fff; }
  .join-perks-kicker { margin: 0 0 10px; color: #f0abfc; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .16em; }
  .join-perks h2 { margin: 0 0 26px; font: 700 34px/1.15 var(--font-display); letter-spacing: -.02em; }
  .join-perks h2 span { background: linear-gradient(90deg, #60a5fa, #f472b6); -webkit-background-clip: text; background-clip: text; color: transparent; }
  .join-perks ul { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; }
  .join-perks li { display: flex; gap: 14px; align-items: flex-start; padding: 14px 16px; border: 1px solid rgba(255, 255, 255, .1); border-radius: 16px; background: rgba(12, 8, 34, .55); backdrop-filter: blur(10px); animation: perk-in .6s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(var(--i) * 90ms + 150ms); transition: transform .25s ease, border-color .25s ease; }
  .join-perks li:hover { transform: translateX(6px); border-color: rgba(244, 114, 182, .45); }
  .join-perk-icon { display: grid; place-items: center; width: 42px; height: 42px; flex: none; border-radius: 12px; background: linear-gradient(135deg, #3b82f6, #a855f7 55%, #ec4899); box-shadow: 0 10px 22px -10px rgba(168, 85, 247, .9); }
  .join-perk-icon svg { width: 21px; height: 21px; fill: none; stroke: #fff; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
  .join-perks li > span:last-child { display: grid; gap: 3px; }
  .join-perks strong { font-size: 15px; }
  .join-perks small { color: rgba(255, 255, 255, .72); font-size: 13px; line-height: 1.5; }
}
@keyframes perk-in { from { opacity: 0; transform: translateX(24px); } }
@media (prefers-reduced-motion: reduce) { .join-perks li { animation: none; } }
.caps-warning { display: flex; align-items: center; gap: 6px; margin: -4px 0 8px; color: #fbbf24; font-size: 12.5px; font-weight: 700; }
.caps-warning[hidden] { display: none; }

.profile-hero .app-avatar.is-xl { margin: 0; flex: none; }

/* ==========================================================================
   Contact page and console inbox
   ========================================================================== */
.contact-main { width: min(1180px, calc(100% - 32px)); margin: 0 auto; padding: 120px 0 70px; color: #fff; }
.contact-hero { max-width: 720px; margin: 0 auto 36px; text-align: center; }
.contact-hero .registration-eyebrow { justify-content: center; }
.contact-hero h1 { margin: 8px 0 12px; font: 700 clamp(34px, 5vw, 54px)/1.05 var(--font-display); letter-spacing: -.03em; }
.contact-hero h1 span { background: linear-gradient(90deg, #60a5fa, #c084fc, #f472b6); -webkit-background-clip: text; background-clip: text; color: transparent; }
.contact-hero p { margin: 0; color: rgba(255, 255, 255, .78); font-size: 16.5px; line-height: 1.6; }
.contact-layout { display: grid; grid-template-columns: minmax(0, 400px) minmax(0, 1fr); gap: 28px; align-items: start; }
.contact-info { display: grid; gap: 12px; }
.contact-tile { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 1px solid rgba(255, 255, 255, .1); border-radius: 16px; color: #fff; background: rgba(12, 8, 34, .6); backdrop-filter: blur(10px); transition: transform .25s ease, border-color .25s ease; }
a.contact-tile:hover { transform: translateX(4px); border-color: rgba(96, 165, 250, .5); }
.contact-tile-icon { display: grid; place-items: center; width: 44px; height: 44px; flex: none; border-radius: 13px; background: linear-gradient(135deg, #3b82f6, #a855f7 55%, #ec4899); box-shadow: 0 10px 22px -10px rgba(168, 85, 247, .9); }
.contact-tile-icon svg, .contact-join-arrow svg, .contact-sent-icon svg, .contact-form .registration-submit svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.contact-tile > span:last-child { display: grid; gap: 2px; min-width: 0; }
.contact-tile small { color: rgba(255, 255, 255, .6); font-size: 11.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; }
.contact-tile strong { overflow: hidden; font-size: 15px; text-overflow: ellipsis; }
.contact-map { overflow: hidden; height: 210px; border: 1px solid rgba(255, 255, 255, .1); border-radius: 16px; background: rgba(12, 8, 34, .6); }
.contact-map iframe { width: 100%; height: 100%; border: 0; filter: saturate(.85) contrast(1.05); }
.contact-join { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px; border-radius: 16px; color: #fff; background: linear-gradient(120deg, #1e3a8a, #6d28d9 55%, #be185d); box-shadow: 0 18px 36px -20px rgba(168, 85, 247, .9); transition: transform .25s ease; }
.contact-join:hover { transform: translateY(-3px); }
.contact-join > span:first-child { display: grid; gap: 2px; }
.contact-join small { color: rgba(255, 255, 255, .8); font-size: 13px; }
.contact-join-arrow { display: grid; place-items: center; width: 38px; height: 38px; flex: none; border-radius: 50%; background: rgba(255, 255, 255, .18); }
.contact-card { margin: 0; max-width: none; }
.contact-card h2 { margin: 0 0 14px; font: 700 26px var(--font-display); }
.contact-form .registration-submit { display: inline-flex; align-items: center; justify-content: center; gap: 10px; }
.contact-trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.topic-pills { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 6px; }
.topic-pill { position: relative; margin: 0; cursor: pointer; }
.topic-pill input { position: absolute; opacity: 0; pointer-events: none; }
.topic-pill span { display: inline-block; padding: 8px 14px; border: 1px solid rgba(255, 255, 255, .16); border-radius: 999px; color: rgba(255, 255, 255, .85); font-size: 13.5px; font-weight: 600; transition: all .2s ease; }
.topic-pill:hover span { border-color: rgba(192, 132, 252, .6); }
.topic-pill input:checked + span { color: #fff; border-color: transparent; background: linear-gradient(135deg, #6366f1, #a855f7, #ec4899); box-shadow: 0 8px 20px -10px rgba(168, 85, 247, .9); }
.topic-pill input:focus-visible + span { outline: 2px solid #c4b5fd; outline-offset: 2px; }
.contact-sent { display: grid; justify-items: center; gap: 12px; padding: 30px 10px; text-align: center; }
.contact-sent-icon { display: grid; place-items: center; width: 76px; height: 76px; border-radius: 50%; color: #fff; background: #22c55e; box-shadow: 0 0 0 12px rgba(34, 197, 94, .18); animation: ring-pop .7s ease both; }
.contact-sent-icon svg { width: 36px; height: 36px; stroke-width: 2.6; }
.contact-sent h2 { margin: 6px 0 0; }
.contact-sent p { max-width: 440px; margin: 0; color: rgba(255, 255, 255, .8); line-height: 1.6; }
.contact-sent-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 8px; }
@media (max-width: 900px) {
  .contact-main { padding-top: 104px; }
  .contact-layout { grid-template-columns: 1fr; }
  .contact-card { order: -1; }
}

.inbox { display: grid; gap: 14px; }
.inbox-item { padding: 16px 18px; border: 1px solid var(--panel-line, rgba(255, 255, 255, .1)); border-left: 4px solid #4f8bff; border-radius: 14px; background: var(--panel-solid, #120d2e); transition: border-color .2s ease; }
.inbox-item.is-read { border-left-color: rgba(150, 140, 170, .4); opacity: .85; }
.inbox-item header { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; }
.inbox-avatar { display: grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: 50%; color: #fff; background: var(--grad); font-weight: 800; }
.inbox-from { display: grid; flex: 1; min-width: 160px; }
.inbox-from strong { font-size: 15px; }
.inbox-from a { color: var(--on-dark-muted); font-size: 13px; }
.inbox-topic { padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 800; }
.inbox-topic.is-blue { color: #93c5fd; background: rgba(59, 130, 246, .15); }
.inbox-topic.is-gold { color: #fbbf24; background: rgba(245, 158, 11, .15); }
.inbox-topic.is-green { color: #4ade80; background: rgba(34, 197, 94, .15); }
.inbox-topic.is-pink { color: #f472b6; background: rgba(236, 72, 153, .15); }
.inbox-topic.is-purple { color: #c4b5fd; background: rgba(139, 92, 246, .15); }
.inbox-item time { color: var(--on-dark-muted); font-size: 12.5px; }
.inbox-item h3 { margin: 12px 0 6px; font-size: 16px; }
.inbox-body { margin: 0; font-size: 14.5px; line-height: 1.65; }
.inbox-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; }
.inbox-actions form { margin: 0; }
.inbox-actions .app-link-button { display: inline-flex; align-items: center; gap: 5px; }
.inbox-note { flex-basis: 100%; }
html.theme-light .inbox-item { background: #fff; }
/* ==========================================================================
   Notification centre, guided tour, keyboard shortcuts
   ========================================================================== */
.notif { position: relative; }
.notif-bell .app-icon { transform-origin: 50% 10%; }
.notif-bell.has-unread .app-icon { animation: bell-ring 2.8s ease-in-out infinite; }
@keyframes bell-ring { 0%, 70%, 100% { transform: rotate(0); } 74% { transform: rotate(14deg); } 78% { transform: rotate(-12deg); } 82% { transform: rotate(8deg); } 86% { transform: rotate(-4deg); } }
.notif-count { position: absolute; top: -4px; right: -4px; display: grid; place-items: center; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 999px; color: #fff; background: linear-gradient(135deg, #f43f5e, #ec4899); box-shadow: 0 0 0 2px var(--app-bg, #07061a); font-size: 11px; font-weight: 800; animation: count-pop .4s var(--ease-spring, cubic-bezier(.34, 1.56, .64, 1)) both; }
.notif-count.is-leaving { transform: scale(0); opacity: 0; transition: transform .3s ease, opacity .3s ease; }
@keyframes count-pop { from { transform: scale(0); } }
.notif-panel { position: absolute; top: calc(100% + 10px); right: -60px; z-index: 60; width: min(400px, calc(100vw - 24px)); max-height: min(560px, 75vh); overflow: hidden; display: flex; flex-direction: column; border: 1px solid rgba(255, 255, 255, .12); border-radius: 18px; background: #15112f; box-shadow: 0 30px 70px -24px rgba(0, 0, 0, .85); animation: confirm-in .25s ease both; }
.notif-panel[hidden] { display: none; }
.notif-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.notif-head strong { font: 700 16px var(--font-display); }
.notif-head span { color: var(--on-dark-muted); font-size: 12.5px; }
.notif-list { flex: 1; overflow-y: auto; margin: 0; padding: 6px; list-style: none; }
.notif-list a { position: relative; display: flex; gap: 12px; align-items: flex-start; padding: 10px; border-radius: 12px; transition: background .2s ease; }
.notif-list a:hover { background: rgba(79, 139, 255, .1); }
.notif-list .is-unread a { background: rgba(79, 139, 255, .07); }
.notif-list .is-unread a::after { content: ""; position: absolute; top: 16px; right: 12px; width: 8px; height: 8px; border-radius: 50%; background: #60a5fa; box-shadow: 0 0 0 3px rgba(96, 165, 250, .25); }
.notif-list .activity-dot { width: 34px; height: 34px; box-shadow: none; }
.notif-text { display: grid; gap: 3px; padding-right: 14px; font-size: 13.5px; line-height: 1.45; }
.notif-text time { color: var(--on-dark-muted); font-size: 11.5px; }
.notif-empty { display: grid; justify-items: center; gap: 6px; padding: 34px 20px; text-align: center; }
.notif-empty > span { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; color: #fff; background: var(--grad); }
.notif-empty small { color: var(--on-dark-muted); font-size: 13px; }
@media (max-width: 700px) { .notif-panel { position: fixed; top: 64px; right: 12px; left: 12px; width: auto; } }

.tour-layer { position: fixed; inset: 0; z-index: 9000; animation: fade-in .25s ease both; }
.tour-layer.is-leaving { opacity: 0; transition: opacity .25s ease; }
.tour-spot { position: fixed; border-radius: 14px; box-shadow: 0 0 0 9999px rgba(5, 4, 15, .72), 0 0 0 3px #a78bfa, 0 0 30px 6px rgba(167, 139, 250, .5); transition: top .35s var(--ease-out), left .35s var(--ease-out), width .35s var(--ease-out), height .35s var(--ease-out); pointer-events: none; }
.tour-card { position: fixed; width: min(340px, calc(100vw - 24px)); padding: 18px 18px 14px; border: 1px solid rgba(255, 255, 255, .14); border-radius: 18px; color: #fff; background: #15112f; box-shadow: 0 30px 70px -20px rgba(0, 0, 0, .9); opacity: 0; transform: translateY(8px); transition: opacity .25s ease, transform .3s var(--ease-out), top .35s var(--ease-out), left .35s var(--ease-out); }
.tour-card.is-in { opacity: 1; transform: none; }
.tour-count { margin: 0; color: #c4b5fd; font-size: 11.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .12em; }
.tour-card h3 { margin: 6px 0 6px; font: 700 19px var(--font-display); }
.tour-text { margin: 0; color: rgba(255, 255, 255, .82); font-size: 14px; line-height: 1.55; }
.tour-dots { display: flex; gap: 6px; margin: 14px 0 12px; }
.tour-dots i { width: 7px; height: 7px; border-radius: 999px; background: rgba(255, 255, 255, .25); transition: width .3s ease, background .3s ease; }
.tour-dots i.is-on { width: 22px; background: var(--grad); }
.tour-actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.tour-actions > span { display: inline-flex; gap: 8px; }
.tour-actions .btn-ghost-dark { color: #fff; }

.shortcuts-dialog { text-align: left; }
.shortcuts-dialog h3 { margin: 0 0 14px; font: 700 20px var(--font-display); }
.shortcuts-dialog ul { display: grid; gap: 4px; margin: 0 0 18px; padding: 0; list-style: none; }
.shortcuts-dialog li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 10px; border-radius: 10px; font-size: 14px; }
.shortcuts-dialog li:nth-child(odd) { background: rgba(255, 255, 255, .04); }
.shortcuts-dialog li > span:last-child { color: var(--on-dark-muted); font-size: 12px; white-space: nowrap; }
.shortcuts-dialog kbd { display: inline-block; min-width: 26px; padding: 3px 7px; border: 1px solid rgba(255, 255, 255, .2); border-bottom-width: 3px; border-radius: 7px; color: #fff; background: rgba(255, 255, 255, .06); font: 700 12px var(--font-body); text-align: center; }
.shortcuts-dialog .confirm-actions { justify-content: space-between; }

html.theme-light .notif-panel, html.theme-light .tour-card { color: #1d1530; background: #fff; border-color: var(--panel-line); }
html.theme-light .notif-head { border-color: var(--panel-line); }
html.theme-light .tour-text { color: #4b4566; }
html.theme-light .tour-actions .btn-ghost-dark { color: #1d1530; }
html.theme-light .shortcuts-dialog kbd { color: #1d1530; border-color: rgba(30, 20, 60, .2); background: #f6f4fb; }
html.theme-light .shortcuts-dialog li:nth-child(odd) { background: rgba(30, 20, 60, .04); }
@media (prefers-reduced-motion: reduce) { .notif-bell.has-unread .app-icon, .tour-spot, .tour-card { animation: none; transition: none; } }
.tour-card [hidden] { display: none !important; }

/* ---------- Competence tests (evaluation.php and the Evaluation tab) ---------- */
:where(.assess-level, .assess-results li, .profile-strengths span, .assess-result) { --lv: #a78bfa; }
.is-l0 { --lv: #94a3b8; }
.is-l1 { --lv: #38bdf8; }
.is-l2 { --lv: #a78bfa; }
.is-l3 { --lv: #4ade80; }
.is-l4 { --lv: #f5b301; }
.assess-level { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px; color: var(--lv); background: color-mix(in srgb, var(--lv) 14%, transparent); font-size: 11.5px; font-weight: 800; letter-spacing: .02em; white-space: nowrap; }

.assess-how { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 0 0 22px; padding: 0; list-style: none; counter-reset: how; }
.assess-how li { position: relative; display: flex; align-items: center; gap: 14px; padding: 16px 18px; border: 1px solid var(--panel-line); border-radius: 14px; background: var(--panel); counter-increment: how; }
.assess-how li::after { content: counter(how); position: absolute; top: 10px; right: 14px; color: rgba(150, 140, 170, .3); font: 800 26px var(--font-display); }
.assess-how li > span { display: grid; place-items: center; width: 44px; height: 44px; flex: none; border-radius: 12px; color: #fff; background: linear-gradient(150deg, #4338ca, #7c3aed); box-shadow: 0 10px 22px -10px rgba(124, 58, 237, .8); }
.assess-how strong { display: block; font-size: 14.5px; }
.assess-how small { color: var(--on-dark-muted); font-size: 12.5px; }

.assess-domains { margin-top: 30px; }
.assess-domains-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px; margin-bottom: 18px; }
.assess-domains-head h2 { margin: 0 0 4px; font: 700 20px var(--font-display); }
.assess-domains-head p { margin: 0; font-size: 13px; }
.assess-filter { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; border: 1px solid var(--panel-line); border-radius: 999px; background: var(--panel); }
.assess-filter button { display: inline-flex; align-items: center; gap: 7px; padding: 7px 14px; border: 0; border-radius: 999px; color: var(--on-dark-muted); background: none; font: 600 13px var(--font-body); cursor: pointer; transition: color .2s ease, background .2s ease; }
.assess-filter button b { display: grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: rgba(150, 140, 170, .16); font-size: 11px; }
.assess-filter button:hover { color: inherit; }
.assess-filter button.is-on { color: #fff; background: linear-gradient(135deg, #4338ca, #7c3aed); box-shadow: 0 8px 20px -10px rgba(124, 58, 237, .9); }
.assess-filter button.is-on b { background: rgba(255, 255, 255, .22); }
.assess-filter-empty { padding: 30px; border: 1px dashed rgba(150, 140, 170, .35); border-radius: 14px; color: var(--on-dark-muted); text-align: center; }

/* Families sit side by side when they are small (2 + 2 on one row). */
.assess-families { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 26px 16px; }
.assess-family { grid-column: span var(--n); min-width: 0; }
.assess-family[hidden] { display: none; }
.assess-family-title { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; color: var(--on-dark-muted); font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.assess-family-title .app-icon { width: 15px; height: 15px; }
.assess-family-title::after { content: ""; flex: 1; height: 1px; background: var(--panel-line); }
.assess-grid { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 16px; }

.dcard { --hue: #7c3aed; position: relative; display: flex; flex-direction: column; min-height: 236px; padding: 18px 18px 16px; overflow: hidden; isolation: isolate; border: 1px solid color-mix(in srgb, var(--hue) 22%, var(--panel-line)); border-radius: 18px; color: inherit; background: radial-gradient(120% 70% at 0% 0%, color-mix(in srgb, var(--hue) 20%, transparent), transparent 60%), var(--panel); text-decoration: none; transition: transform .3s var(--ease-out), border-color .3s ease, box-shadow .3s ease; }
.dcard[hidden] { display: none; }
.dcard:hover, .dcard:focus-visible { transform: translateY(-5px); border-color: color-mix(in srgb, var(--hue) 65%, transparent); box-shadow: 0 26px 46px -26px color-mix(in srgb, var(--hue) 85%, transparent); outline: none; }
.dcard-art { position: absolute; right: -26px; bottom: -30px; z-index: -1; color: var(--hue); opacity: .08; transform: rotate(-14deg); transition: transform .5s var(--ease-out), opacity .3s ease; }
.dcard-art .app-icon { width: 150px; height: 150px; stroke-width: 1.4; }
.dcard:hover .dcard-art { opacity: .16; transform: rotate(-4deg) scale(1.06); }
.dcard-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 16px; }
.dcard-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; color: #fff; background: linear-gradient(145deg, color-mix(in srgb, var(--hue) 75%, #fff), var(--hue) 55%, color-mix(in srgb, var(--hue) 70%, #000)); box-shadow: 0 12px 24px -12px var(--hue), inset 0 1px 0 rgba(255, 255, 255, .35); transition: transform .35s var(--ease-spring); }
.dcard:hover .dcard-icon { transform: rotate(-8deg) scale(1.08); }
.dcard-icon .app-icon { width: 23px; height: 23px; }
.dcard-flag { display: inline-flex; align-items: center; gap: 4px; padding: 4px 9px; border-radius: 999px; color: #fbbf24; background: rgba(251, 191, 36, .12); font-size: 11px; font-weight: 800; }
.dcard-flag .app-icon { width: 12px; height: 12px; fill: currentColor; }
.dcard-ring { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: conic-gradient(var(--hue) calc(var(--p) * 1%), rgba(150, 140, 170, .18) 0); }
.dcard-ring b { display: flex; align-items: center; justify-content: center; gap: 1px; width: 42px; height: 42px; border-radius: 50%; background: var(--panel); font: 800 14px/1 var(--font-display); }
.dcard-ring small { font-size: 9px; opacity: .7; }
.dcard-title { margin: 0 0 6px; font: 700 17px/1.25 var(--font-display); }
.dcard-topics { color: var(--on-dark-muted); font-size: 13px; line-height: 1.45; }
.dcard-status { display: flex; align-items: center; gap: 10px; margin: 14px 0 16px; }
.dcard-status small { color: var(--on-dark-muted); font-size: 12px; }
.dcard-diff { display: inline-flex; gap: 3px; }
.dcard-diff i { width: 14px; height: 5px; border-radius: 3px; background: #4ade80; }
.dcard-diff i:nth-child(2) { background: #f5b301; }
.dcard-diff i:nth-child(3) { background: #f87171; }
.dcard-cta { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding: 10px 14px; border-radius: 12px; color: color-mix(in srgb, var(--hue) 60%, #fff); background: color-mix(in srgb, var(--hue) 13%, transparent); font-size: 13.5px; font-weight: 700; transition: background .25s ease, color .25s ease; }
.dcard-cta .app-icon { width: 16px; height: 16px; }
.dcard-cta > span { display: inline-flex; align-items: center; gap: 8px; }
.dcard-cta .app-icon:last-child { transition: transform .25s ease; }
.dcard:hover .dcard-cta { color: #fff; background: var(--hue); }
.dcard:hover .dcard-cta .app-icon:last-child { transform: translateX(4px); }
@media (max-width: 1200px) {
  .assess-families { grid-template-columns: 1fr; }
  .assess-family { grid-column: auto; }
  .assess-grid { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
}
@media (max-width: 600px) { .assess-filter { border-radius: 16px; } }
html.theme-light .dcard-cta { color: color-mix(in srgb, var(--hue) 75%, #000); }
html.theme-light .dcard:hover .dcard-cta { color: #fff; }
html.theme-light .dcard-flag { color: #b45309; background: rgba(245, 158, 11, .14); }
html.theme-light .dcard-art { opacity: .1; }
html.theme-light .assess-filter button.is-on { color: #fff; }
.assess-card-bar { display: block; height: 6px; overflow: hidden; border-radius: 999px; background: rgba(150, 140, 170, .2); }
.assess-card-bar i { display: block; height: 100%; border-radius: inherit; background: var(--lv); animation: bar-grow 1s var(--ease-out) both .2s; transform-origin: left; }
@keyframes bar-grow { from { transform: scaleX(0); } }

.assess-radar-hint { display: flex; align-items: center; gap: 10px; margin: 0 0 16px; padding: 14px 16px; border: 1px dashed rgba(150, 140, 170, .35); border-radius: 12px; color: var(--on-dark-muted); font-size: 13.5px; }
.assess-results { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.assess-results a { display: flex; align-items: center; gap: 14px; padding: 12px; border-radius: 12px; color: inherit; text-decoration: none; transition: background .2s ease; }
.assess-results a:hover { background: rgba(150, 140, 170, .08); }
.assess-results-icon { display: grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: 11px; color: #fff; background: linear-gradient(145deg, color-mix(in srgb, var(--hue, var(--lv)) 75%, #fff), var(--hue, var(--lv)) 60%); box-shadow: 0 8px 18px -10px var(--hue, var(--lv)); }
.assess-results-main { display: grid; flex: 1; gap: 6px; min-width: 0; }
.assess-results-main strong { font-size: 14px; }
.assess-results-main small { color: var(--on-dark-muted); font-size: 12px; }
.assess-results-score { display: grid; justify-items: end; gap: 4px; }
.assess-results-score b { font: 800 20px var(--font-display); }
.assess-results-score small, .assess-facts .is-up, .assess-facts .is-down { font-size: 11.5px; font-weight: 800; }
.is-up { color: #4ade80; }
.is-down { color: #f87171; }

/* Test page */
.assess-intro { position: relative; display: flex; align-items: center; gap: 28px; margin-bottom: 22px; padding: 30px 32px; overflow: hidden; border-radius: 20px; color: #fff; background: radial-gradient(circle at 85% 20%, rgba(238, 58, 143, .35), transparent 45%), linear-gradient(135deg, #1e1b4b, #4338ca 55%, #7c3aed); box-shadow: 0 30px 60px -30px rgba(67, 56, 202, .9); transition: padding .4s var(--ease-out); }
.assess-intro h1 { margin: 4px 0 8px; font: 800 clamp(24px, 3.4vw, 34px)/1.1 var(--font-display); }
.assess-intro p { margin: 0 0 14px; max-width: 620px; color: rgba(255, 255, 255, .85); }
.assess-intro-art { display: grid; place-items: center; width: 110px; height: 110px; flex: none; border-radius: 30px; background: rgba(255, 255, 255, .12); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .2); animation: banner-float 7s ease-in-out infinite; }
.assess-intro-art .app-icon { width: 54px; height: 54px; }
.assess-eyebrow { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0; color: rgba(255, 255, 255, .75); font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.assess-eyebrow a { display: inline-flex; align-items: center; gap: 4px; color: inherit; }
.assess-eyebrow .app-icon { width: 14px; height: 14px; }
.assess-facts { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; padding: 0; list-style: none; }
.assess-facts li { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: rgba(255, 255, 255, .12); font-size: 13px; }
.assess-facts .app-icon { width: 15px; height: 15px; }
.assess-last { font-size: 13.5px; }
.assess-last a { color: #fff; font-weight: 700; }
.assess-wait { display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 12px; background: rgba(0, 0, 0, .2); font-size: 13.5px; }
.assess-intro.is-compact { padding: 18px 24px; }
.assess-intro.is-compact .assess-intro-art { width: 64px; height: 64px; border-radius: 18px; }
.assess-intro.is-compact .assess-intro-art .app-icon { width: 30px; height: 30px; }
.assess-intro.is-compact h1 { font-size: 22px; }
.assess-intro.is-compact p:not(.assess-eyebrow), .assess-intro.is-compact .assess-facts, .assess-intro.is-compact [data-assess-start] { display: none; }

.assess { max-width: 860px; margin: 0 auto; scroll-margin-top: 90px; }
.assess.is-stepped:not(.is-running) { display: none; }
.assess [hidden] { display: none !important; }
.assess-top { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.assess-count { font-size: 13px; font-weight: 800; white-space: nowrap; }
.assess-progress { flex: 1; height: 8px; overflow: hidden; border-radius: 999px; background: rgba(150, 140, 170, .2); }
.assess-progress span { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #4338ca, #7c3aed, #ee3a8f); transition: width .5s var(--ease-out); }
.assess-timer { min-width: 44px; color: var(--on-dark-muted); font: 700 13px var(--font-body); font-variant-numeric: tabular-nums; text-align: right; }
.assess-list { display: grid; gap: 16px; margin: 0; padding: 0; list-style: none; }
.assess-q { padding: 26px 28px; border: 1px solid var(--panel-line); border-radius: 18px; background: var(--panel); }
.assess.is-stepped .assess-q { min-height: 380px; }
.assess-q.is-entering { animation: q-in .45s var(--ease-out) both; }
@keyframes q-in { from { opacity: 0; transform: translateX(26px); } }
.assess-q-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 14px; }
.assess-num { color: var(--on-dark-muted); font-size: 12px; font-weight: 700; }
.assess-tag { display: inline-flex; padding: 4px 10px; border-radius: 999px; font-size: 11px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.assess-tag.is-d1 { color: #4ade80; background: rgba(74, 222, 128, .12); }
.assess-tag.is-d2 { color: #f5b301; background: rgba(245, 179, 1, .12); }
.assess-tag.is-d3 { color: #f87171; background: rgba(248, 113, 113, .13); }
.assess-q-title { margin: 0 0 20px; font: 700 clamp(18px, 2.2vw, 22px)/1.35 var(--font-display); }
.assess-code { margin: 0 0 14px; padding: 14px 16px; overflow-x: auto; border-radius: 12px; color: #e2e8f0; background: #0b1020; font: 500 14px/1.55 ui-monospace, "Cascadia Code", Consolas, monospace; }
.assess-options { display: grid; gap: 10px; }
.assess-option { position: relative; display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 1.5px solid var(--panel-line); border-radius: 14px; cursor: pointer; transition: border-color .2s ease, background .2s ease, transform .15s ease; }
.assess-option:hover { border-color: rgba(124, 58, 237, .5); background: rgba(124, 58, 237, .06); }
.assess-option:active { transform: scale(.99); }
.assess-option input { position: absolute; opacity: 0; pointer-events: none; }
.assess-letter { display: grid; place-items: center; width: 34px; height: 34px; flex: none; border: 1.5px solid rgba(150, 140, 170, .4); border-radius: 10px; font: 800 14px var(--font-display); transition: all .2s ease; }
.assess-option-text { font-size: 15px; line-height: 1.45; }
.assess-option:has(input:checked) { border-color: #7c3aed; background: linear-gradient(90deg, rgba(124, 58, 237, .16), rgba(124, 58, 237, .04)); }
.assess-option:has(input:checked) .assess-letter { border-color: transparent; color: #fff; background: linear-gradient(150deg, #4338ca, #7c3aed); transform: scale(1.06); }
.assess-option:has(input:focus-visible) { outline: 2px solid #a78bfa; outline-offset: 2px; }
.assess-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; }
.assess-nav .btn:last-child, .assess-nav [data-assess-next] { margin-left: auto; }
.assess-nav .btn:disabled { opacity: .4; cursor: not-allowed; box-shadow: none; transform: none; }
.assess-keys { color: var(--on-dark-muted); font-size: 12px; }
.assess-keys kbd { display: inline-block; min-width: 20px; padding: 1px 6px; border: 1px solid rgba(150, 140, 170, .35); border-bottom-width: 2px; border-radius: 5px; font: 700 11px var(--font-body); text-align: center; }
.assess:not(.is-stepped) .assess-keys, .assess:not(.is-stepped) .assess-top { display: none; }

/* Result */
.assess-result { position: relative; display: flex; align-items: center; gap: 34px; margin-bottom: 20px; padding: 30px 34px; overflow: hidden; border-radius: 20px; color: #fff; background: radial-gradient(circle at 12% 30%, color-mix(in srgb, var(--lv) 45%, transparent), transparent 50%), linear-gradient(135deg, #1e1b4b, #312e81 50%, #4c1d95); box-shadow: 0 30px 60px -30px rgba(67, 56, 202, .9); }
.assess-result h1 { margin: 6px 0 8px; font: 800 clamp(26px, 3.6vw, 38px)/1.1 var(--font-display); }
.assess-level-name { color: var(--lv); }
.assess-result-text { max-width: 620px; margin: 0 0 16px; color: rgba(255, 255, 255, .85); }
.assess-result-ring { display: grid; place-items: center; width: 170px; height: 170px; flex: none; border-radius: 50%; background: conic-gradient(var(--lv) calc(var(--p) * 1%), rgba(255, 255, 255, .14) 0); box-shadow: 0 0 0 8px rgba(255, 255, 255, .05), 0 20px 50px -15px rgba(0, 0, 0, .6); animation: ring-pop .9s var(--ease-spring) both .15s; }
.assess-result-ring span { display: flex; align-items: baseline; justify-content: center; width: 136px; height: 136px; padding-top: 42px; border-radius: 50%; background: #1b1747; }
.assess-result-ring b { font: 800 46px/1 var(--font-display); }
.assess-result-ring small { font-size: 18px; font-weight: 700; opacity: .7; }
.assess-scale { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; max-width: 560px; margin: 0 0 16px; padding: 0; list-style: none; }
.assess-scale li { display: grid; gap: 6px; }
.assess-scale span { height: 8px; border-radius: 999px; background: rgba(255, 255, 255, .15); }
.assess-scale .is-passed span { background: color-mix(in srgb, var(--lv) 55%, transparent); }
.assess-scale .is-current span { background: var(--lv); box-shadow: 0 0 14px var(--lv); }
.assess-scale small { color: rgba(255, 255, 255, .55); font-size: 11px; font-weight: 700; }
.assess-scale .is-current small { color: #fff; }
.assess-result-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; margin-bottom: 18px; }
.assess-bars { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; }
.assess-bars li { display: grid; grid-template-columns: 80px 1fr 40px; align-items: center; gap: 12px; font-size: 13.5px; font-weight: 700; }
.assess-bars b { text-align: right; }
.assess-bar { height: 10px; overflow: hidden; border-radius: 999px; background: rgba(150, 140, 170, .2); }
.assess-bar i { display: block; height: 100%; border-radius: inherit; animation: bar-grow 1s var(--ease-out) both .3s; transform-origin: left; }
.assess-bars .is-d1 i { background: #4ade80; }
.assess-bars .is-d2 i { background: #f5b301; }
.assess-bars .is-d3 i { background: #f87171; }
.assess-next { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.assess-next .assess-wait { color: var(--on-dark-muted); background: rgba(150, 140, 170, .1); }
.assess-review ol { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.assess-review-item { display: flex; gap: 14px; padding: 16px; border: 1px solid var(--panel-line); border-left: 4px solid #4ade80; border-radius: 12px; }
.assess-review-item.is-bad { border-left-color: #f87171; }
.assess-review-mark { display: grid; place-items: center; width: 30px; height: 30px; flex: none; border-radius: 50%; color: #fff; background: #22c55e; }
.assess-review-item.is-bad .assess-review-mark { background: #ef4444; }
.assess-review-mark .app-icon { width: 16px; height: 16px; }
.assess-review-item > div { min-width: 0; }
.assess-review-q { display: grid; justify-items: start; gap: 8px; margin: 0 0 8px; font-weight: 700; }
.assess-review-q .assess-code { width: 100%; margin: 0; font-size: 13px; }
.assess-review-line { margin: 0 0 4px; font-size: 13.5px; }
.assess-review-line.is-good { color: #4ade80; }
.assess-review-line.is-bad { color: #f87171; text-decoration: line-through; text-decoration-thickness: 1px; }
.assess-review-why { display: flex; gap: 8px; margin: 8px 0 0; padding: 10px 12px; border-radius: 10px; color: var(--on-dark-muted); background: rgba(150, 140, 170, .08); font-size: 13px; line-height: 1.5; }
.assess-review-why .app-icon { width: 15px; height: 15px; flex: none; margin-top: 2px; color: #a78bfa; }

.profile-tested-title { display: flex; align-items: center; gap: 8px; margin: 16px 0 10px; font-size: 14px; }
.profile-tested-title .app-icon { width: 16px; height: 16px; color: #4ade80; }
.profile-strengths span[class*="is-l"] { color: var(--lv); background: color-mix(in srgb, var(--lv) 12%, transparent); }

html.theme-light .is-l0 { --lv: #64748b; }
html.theme-light .is-l1 { --lv: #0284c7; }
html.theme-light .is-l2 { --lv: #7c3aed; }
html.theme-light .is-l3 { --lv: #15803d; }
html.theme-light .is-l4 { --lv: #b45309; }
.assess-result.is-level-0, html.theme-light .assess-result.is-level-0 { --lv: #94a3b8; }
.assess-result.is-level-1, html.theme-light .assess-result.is-level-1 { --lv: #38bdf8; }
.assess-result.is-level-2, html.theme-light .assess-result.is-level-2 { --lv: #a78bfa; }
.assess-result.is-level-3, html.theme-light .assess-result.is-level-3 { --lv: #4ade80; }
.assess-result.is-level-4, html.theme-light .assess-result.is-level-4 { --lv: #f5b301; }
html.theme-light .assess-tag.is-d1, html.theme-light .assess-review-line.is-good, html.theme-light .is-up { color: #15803d; }
html.theme-light .assess-tag.is-d2, html.theme-light .assess-card-flag { color: #b45309; }
html.theme-light .assess-tag.is-d3, html.theme-light .assess-review-line.is-bad, html.theme-light .is-down { color: #dc2626; }
html.theme-light .assess-card-cta { color: #6d28d9; }
html.theme-light .assess-result .is-up { color: #4ade80; }
html.theme-light .assess-result .is-down { color: #fca5a5; }
html.theme-light .assess-option { background: #fff; }

@media (max-width: 860px) {
  .assess-how, .assess-result-grid { grid-template-columns: 1fr; }
  .assess-intro, .assess-result { flex-direction: column; align-items: flex-start; gap: 18px; padding: 22px 20px; }
  .assess-intro-art { width: 72px; height: 72px; border-radius: 20px; }
  .assess-intro-art .app-icon { width: 34px; height: 34px; }
  .assess-result-ring { width: 130px; height: 130px; }
  .assess-result-ring span { width: 104px; height: 104px; padding-top: 32px; }
  .assess-result-ring b { font-size: 34px; }
  .assess-q { padding: 20px 18px; }
  .assess.is-stepped .assess-q { min-height: 0; }
  .assess-keys { display: none; }
  .assess-scale small { font-size: 9.5px; }
}
@media (prefers-reduced-motion: reduce) { .assess-q.is-entering, .assess-card-bar i, .assess-bar i, .assess-result-ring, .assess-intro-art { animation: none; } }

/* ---------- CV & Portfolio (cv.php) ---------- */
.cv-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 18px; }
.cv-tabs a { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border: 1px solid var(--panel-line); border-radius: 12px; color: var(--on-dark-muted); background: var(--panel); font-size: 14px; font-weight: 700; text-decoration: none; transition: color .2s ease, border-color .2s ease; }
.cv-tabs a .app-icon { width: 17px; height: 17px; }
.cv-tabs a:hover { color: inherit; }
.cv-tabs a.is-active { color: #fff; border-color: transparent; background: linear-gradient(135deg, #b45309, #f59e0b); box-shadow: 0 10px 24px -12px rgba(245, 158, 11, .9); }
.cv-premium-tag { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; color: #fbbf24; background: rgba(251, 191, 36, .14); font-size: 11px; }
.cv-premium-tag .app-icon { width: 12px !important; height: 12px !important; }
.cv-tabs a.is-active .cv-premium-tag { color: #fff; background: rgba(255, 255, 255, .2); }

.cv-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.02fr); gap: 22px; align-items: start; }
.cv-editor { display: grid; gap: 12px; }
.cv-step { border: 1px solid var(--panel-line); border-radius: 16px; background: var(--panel); overflow: hidden; }
.cv-step > summary { display: flex; align-items: center; gap: 14px; padding: 16px 18px; cursor: pointer; list-style: none; }
.cv-step > summary::-webkit-details-marker { display: none; }
.cv-step > summary::after { content: ""; width: 9px; height: 9px; margin-left: auto; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; opacity: .5; transform: rotate(45deg); transition: transform .25s ease; flex: none; }
.cv-step[open] > summary::after { transform: rotate(-135deg); }
.cv-step > summary > span:nth-child(2) { display: grid; }
.cv-step summary strong { font-size: 15px; }
.cv-step summary small { color: var(--on-dark-muted); font-size: 12.5px; }
.cv-step-num { display: grid; place-items: center; width: 32px; height: 32px; flex: none; border-radius: 10px; color: #fff; background: linear-gradient(145deg, #f59e0b, #b45309); font: 800 14px var(--font-display); }
.cv-auto-tag { display: inline-flex; align-items: center; gap: 5px; margin-left: auto; padding: 4px 10px; border-radius: 999px; color: #a78bfa; background: rgba(167, 139, 250, .12); font-size: 11.5px; font-weight: 800; white-space: nowrap; }
.cv-auto-tag + * { margin-left: 0; }
.cv-auto-tag .app-icon { width: 13px; height: 13px; }
.cv-step[open] > summary { border-bottom: 1px solid var(--panel-line); }

.cv-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; padding: 16px 18px 18px; }
.cv-fields label { display: flex; flex-wrap: wrap; align-content: start; gap: 6px 4px; font-size: 13px; font-weight: 700; }
.cv-fields label > span { color: var(--on-dark-muted); font-weight: 500; }
.cv-fields label > input:not([type="checkbox"]):not([type="radio"]), .cv-fields label > textarea { flex-basis: 100%; }
.cv-fields .is-wide { grid-column: 1 / -1; }
.cv-fields input:not([type="checkbox"]):not([type="radio"]), .cv-fields textarea { width: 100%; min-height: 42px; padding: 9px 12px; border: 1px solid rgba(150, 140, 170, .28); border-radius: 10px; color: inherit; background: rgba(150, 140, 170, .06); font: 500 14px var(--font-body); transition: border-color .2s ease, box-shadow .2s ease; }
.cv-fields textarea { resize: vertical; line-height: 1.5; }
.cv-fields input:focus, .cv-fields textarea:focus { outline: none; border-color: #f59e0b; box-shadow: 0 0 0 3px rgba(245, 158, 11, .18); }
.cv-fields input[type="month"], .cv-fields input[type="date"] { color-scheme: dark; }
html.theme-light .cv-fields input[type="month"], html.theme-light .cv-fields input[type="date"] { color-scheme: light; }
.cv-check { display: flex !important; align-items: center; gap: 10px !important; font-weight: 600 !important; }
.cv-check input { width: 18px; height: 18px; accent-color: #f59e0b; }

.cv-auto { display: grid; gap: 14px; padding: 16px 18px 18px; }
.cv-auto-group h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font-size: 13.5px; }
.cv-auto-group h3 .app-icon { width: 16px; height: 16px; color: #f59e0b; }
.cv-auto-group h3 small { padding: 1px 8px; border-radius: 999px; background: rgba(150, 140, 170, .16); font-size: 11px; }
.cv-auto-group ul { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.cv-auto-group label { display: flex; align-items: flex-start; gap: 10px; padding: 9px 12px; border: 1px solid var(--panel-line); border-radius: 10px; cursor: pointer; transition: border-color .2s ease, background .2s ease, opacity .2s ease; }
.cv-auto-group label:hover { border-color: rgba(245, 158, 11, .45); }
.cv-auto-group label:has(input[type="checkbox"]:not(:checked)) { opacity: .5; }
.cv-auto-group label:has(input[type="checkbox"]:checked) { background: rgba(245, 158, 11, .05); }
.cv-auto-group input[type="checkbox"] { width: 17px; height: 17px; margin-top: 2px; flex: none; accent-color: #f59e0b; }
.cv-auto-group label > span { display: grid; min-width: 0; }
.cv-auto-group b { font-size: 13.5px; font-weight: 600; }
.cv-auto-group small { color: var(--on-dark-muted); font-size: 12px; }
.cv-auto-empty { margin: 0; padding: 10px 12px; border: 1px dashed rgba(150, 140, 170, .3); border-radius: 10px; color: var(--on-dark-muted); font-size: 13px; }
.cv-auto-empty a { color: #fbbf24; font-weight: 700; }

.cv-exps { display: grid; gap: 12px; padding: 16px 18px 18px; justify-items: start; }
.cv-exp { position: relative; width: 100%; margin: 0; padding: 0 0 8px; border: 1px solid var(--panel-line); border-radius: 12px; }
.cv-exp .cv-fields { padding: 14px 14px 6px; }
.cv-exp [data-cv-exp-remove] { margin-left: 14px; }
.cv-save { display: flex; align-items: center; gap: 14px; }
.cv-status { color: var(--on-dark-muted); font-size: 13px; }
.cv-status.is-saving { color: #fbbf24; }
.cv-status.is-saved { color: #4ade80; }

.cv-preview-col { position: sticky; top: 84px; display: grid; gap: 14px; }
.cv-design { display: grid; gap: 12px; padding: 14px; border: 1px solid var(--panel-line); border-radius: 16px; background: var(--panel); }
.cv-templates { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.cv-template { position: relative; display: grid; gap: 8px; padding: 10px; border: 1.5px solid var(--panel-line); border-radius: 12px; cursor: pointer; transition: border-color .2s ease, transform .2s ease; }
.cv-template:hover { transform: translateY(-2px); }
.cv-template input { position: absolute; opacity: 0; }
.cv-template:has(input:checked) { border-color: #f59e0b; box-shadow: 0 0 0 3px rgba(245, 158, 11, .15); }
.cv-template:has(input:focus-visible) { outline: 2px solid #f59e0b; outline-offset: 2px; }
.cv-template b { font-size: 13px; }
.cv-template small { display: block; color: var(--on-dark-muted); font-size: 11px; line-height: 1.35; }
.cv-template-art { position: relative; display: grid; grid-template-columns: 34% 1fr; height: 62px; overflow: hidden; border-radius: 6px; background: #fff; }
.cv-template-art i { display: block; }
.cv-template-art i:nth-child(1) { grid-row: span 2; background: linear-gradient(#cbd5e1 0 30%, transparent 30% 40%, #e2e8f0 40% 44%, transparent 44% 52%, #e2e8f0 52% 56%, transparent 56%); margin: 6px; }
.cv-template-art i:nth-child(2) { margin: 8px 8px 0; background: repeating-linear-gradient(#94a3b8 0 3px, transparent 3px 8px); }
.cv-template-art i:nth-child(3) { margin: 4px 8px 8px; background: repeating-linear-gradient(#cbd5e1 0 3px, transparent 3px 7px); }
.cv-template.is-classique .cv-template-art::after { content: ""; position: absolute; top: 0; bottom: 0; left: 34%; width: 1px; background: #1f2430; }
.cv-template.is-moderne .cv-template-art i:nth-child(1) { margin: 0; background: linear-gradient(#4338ca, #312e81); }
.cv-template.is-elegant .cv-template-art { grid-template-columns: 1fr 30%; grid-template-rows: 20px 1fr; }
.cv-template.is-elegant .cv-template-art i:nth-child(1) { grid-column: 1 / -1; grid-row: auto; margin: 0; background: linear-gradient(120deg, #312e81, #4338ca); }
.cv-template.is-elegant .cv-template-art i:nth-child(3) { margin: 0; background: #eef0fb; }
.cv-accents { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.cv-accents > span { display: inline-flex; align-items: center; gap: 5px; margin-right: 4px; color: var(--on-dark-muted); font-size: 12.5px; font-weight: 700; }
.cv-accents > span .app-icon { width: 13px; height: 13px; color: #fbbf24; }
.cv-accent { position: relative; cursor: pointer; }
.cv-accent input { position: absolute; opacity: 0; }
.cv-accent span { display: block; width: 24px; height: 24px; border: 2px solid transparent; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 2px var(--panel); transition: transform .2s ease; }
.cv-accent:hover span { transform: scale(1.12); }
.cv-accent:has(input:checked) span { border-color: var(--c); }
.cv-accent.is-locked { cursor: not-allowed; opacity: .35; }
.cv-paper { position: relative; overflow: hidden; border-radius: 10px; background: #fff; box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .7), 0 0 0 1px rgba(150, 140, 170, .2); }
.cv-paper iframe { display: block; width: 794px; height: 1123px; border: 0; transform-origin: 0 0; }
.cv-paper.is-loading::after { content: ""; position: absolute; inset: 0; background: rgba(255, 255, 255, .5); }
.cv-export { display: grid; justify-items: center; gap: 6px; text-align: center; }
.cv-export small { color: var(--on-dark-muted); font-size: 12.5px; }
.cv-download { width: 100%; min-height: 50px; font-size: 15px; background: linear-gradient(120deg, #b45309, #f59e0b, #ee3a8f) !important; }
.cv-export-locked { display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px 16px; border: 1px solid rgba(245, 158, 11, .4); border-radius: 14px; background: rgba(245, 158, 11, .08); text-align: left; font-size: 13px; }
.cv-export-locked > .app-icon { width: 22px; height: 22px; color: #fbbf24; flex: none; }

.premium-card { position: relative; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; margin-top: 26px; padding: 30px 32px; overflow: hidden; isolation: isolate; border-radius: 22px; color: #fff; background: linear-gradient(135deg, #1c1033, #3b1d5e 55%, #6b2c5c); box-shadow: 0 30px 60px -30px rgba(107, 44, 92, .9); scroll-margin-top: 90px; }
.premium-glow { position: absolute; inset: -40% -10% auto auto; z-index: -1; width: 420px; height: 420px; border-radius: 50%; background: radial-gradient(circle, rgba(251, 191, 36, .45), transparent 65%); animation: banner-float 8s ease-in-out infinite; }
.premium-badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; color: #1c1033; background: linear-gradient(120deg, #fde68a, #f59e0b); font-size: 12px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.premium-badge .app-icon { width: 14px; height: 14px; }
.premium-main h2 { margin: 12px 0 14px; font: 800 clamp(22px, 3vw, 30px)/1.15 var(--font-display); }
.premium-main ul { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.premium-main li { display: flex; align-items: center; gap: 10px; color: rgba(255, 255, 255, .88); font-size: 14.5px; }
.premium-main li .app-icon { width: 18px; height: 18px; padding: 3px; border-radius: 50%; color: #1c1033; background: #fbbf24; }
.premium-price { display: grid; justify-items: center; gap: 10px; min-width: 250px; padding: 22px; border: 1px solid rgba(255, 255, 255, .16); border-radius: 18px; background: rgba(255, 255, 255, .06); backdrop-filter: blur(6px); text-align: center; }
.premium-price p { margin: 0; font-size: 18px; }
.premium-price p b { font: 800 48px var(--font-display); background: linear-gradient(120deg, #fde68a, #f59e0b); -webkit-background-clip: text; background-clip: text; color: transparent; }
.premium-price p small { display: block; color: rgba(255, 255, 255, .7); font-size: 13px; }
.premium-price small { color: rgba(255, 255, 255, .65); font-size: 12px; }
.premium-pending { display: flex; gap: 8px; max-width: 280px; color: #fde68a; font-size: 13px; text-align: left; }
.premium-pending .app-icon { width: 18px; height: 18px; flex: none; }

.pf-layout { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 22px; align-items: start; }
.pf-settings .cv-fields { padding: 0; }
.cv-switch { display: flex !important; align-items: center; gap: 12px !important; cursor: pointer; }
.cv-switch input { position: absolute; opacity: 0; }
.cv-switch span { position: relative; width: 46px; height: 26px; flex: none; border-radius: 999px; background: rgba(150, 140, 170, .35); transition: background .25s ease; }
.cv-switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .25s var(--ease-spring); }
.cv-switch input:checked + span { background: #22c55e; }
.cv-switch input:checked + span::after { transform: translateX(20px); }
.cv-switch input:focus-visible + span { outline: 2px solid #f59e0b; outline-offset: 2px; }
.pf-themes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.pf-theme, .cv-fields .pf-theme { position: relative; display: grid; gap: 4px; padding: 10px; border: 1.5px solid var(--panel-line); border-radius: 12px; cursor: pointer; }
.pf-theme input { position: absolute; opacity: 0; }
.pf-theme:has(input:checked) { border-color: #f59e0b; box-shadow: 0 0 0 3px rgba(245, 158, 11, .15); }
.pf-theme small { color: var(--on-dark-muted); font-size: 11px; font-weight: 500; }
.pf-theme-art { display: block; height: 46px; margin-bottom: 4px; border-radius: 8px; }
.pf-theme.is-aurora .pf-theme-art { background: radial-gradient(circle at 80% 20%, #ee3a8f, transparent 50%), linear-gradient(135deg, #0b0820, #4c1d95); }
.pf-theme.is-ocean .pf-theme-art { background: radial-gradient(circle at 80% 20%, #22d3ee, transparent 50%), linear-gradient(135deg, #031525, #0e4a6e); }
.pf-theme.is-clair .pf-theme-art { background: radial-gradient(circle at 80% 20%, #c7d2fe, transparent 55%), linear-gradient(135deg, #ffffff, #eef2ff); box-shadow: inset 0 0 0 1px rgba(30, 20, 60, .1); }
.pf-link { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 16px; padding: 12px 14px; border: 1px solid var(--panel-line); border-radius: 12px; }
.pf-link code { flex: 1 1 calc(100% - 30px); min-width: 0; overflow: hidden; color: var(--on-dark-muted); font-size: 12.5px; text-overflow: ellipsis; white-space: nowrap; }
.pf-dot { width: 10px; height: 10px; flex: none; border-radius: 50%; background: #94a3b8; }
.pf-link.is-live .pf-dot { background: #22c55e; box-shadow: 0 0 0 4px rgba(34, 197, 94, .2); animation: pf-pulse 2s ease-in-out infinite; }
@keyframes pf-pulse { 50% { box-shadow: 0 0 0 7px rgba(34, 197, 94, .05); } }
.pf-perks { display: grid; gap: 12px; margin: 0 0 18px; padding: 0; list-style: none; }
.pf-perks li { display: flex; gap: 12px; }
.pf-perks li > .app-icon { width: 34px; height: 34px; padding: 8px; flex: none; border-radius: 10px; color: #fbbf24; background: rgba(251, 191, 36, .12); }
.pf-perks span { display: grid; color: var(--on-dark-muted); font-size: 13px; }
.pf-perks b { color: inherit; font-size: 14px; }
html:not(.theme-light) .pf-perks b { color: #fff; }
.pf-preview { position: relative; overflow: hidden; border: 1px solid var(--panel-line); border-radius: 16px; background: #0b0820; box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .7); }
.pf-browser { display: flex; align-items: center; gap: 6px; padding: 10px 14px; background: #16132e; }
.pf-browser span { width: 10px; height: 10px; border-radius: 50%; background: #ef4444; }
.pf-browser span:nth-child(2) { background: #f59e0b; }
.pf-browser span:nth-child(3) { background: #22c55e; }
.pf-browser code { flex: 1; margin-left: 10px; padding: 4px 10px; overflow: hidden; border-radius: 6px; color: rgba(255, 255, 255, .6); background: rgba(255, 255, 255, .06); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.pf-preview iframe { display: block; width: 100%; height: 640px; border: 0; }
.pf-layout.is-locked .pf-preview iframe { filter: blur(2px) saturate(1.1); pointer-events: none; }
.pf-lock { position: absolute; inset: 40px 0 0; display: grid; place-content: center; justify-items: center; gap: 12px; color: #fff; background: linear-gradient(180deg, rgba(11, 8, 32, .1), rgba(11, 8, 32, .75)); text-align: center; }
.pf-lock > span { display: grid; place-items: center; width: 60px; height: 60px; border-radius: 50%; color: #1c1033; background: linear-gradient(120deg, #fde68a, #f59e0b); box-shadow: 0 0 0 10px rgba(251, 191, 36, .15); }
.pf-lock > span .app-icon { width: 26px; height: 26px; }
.pf-lock strong { font: 700 18px var(--font-display); }

html.theme-light .cv-premium-tag, html.theme-light .cv-accents > span .app-icon { color: #b45309; }
html.theme-light .cv-auto-empty a { color: #b45309; }
@media (max-width: 1100px) {
  .cv-layout, .pf-layout { grid-template-columns: 1fr; }
  .cv-preview-col { position: static; }
}
@media (max-width: 600px) {
  .cv-fields, .pf-themes { grid-template-columns: 1fr; }
  .cv-templates { grid-template-columns: 1fr 1fr 1fr; }
  .cv-template small { display: none; }
  .premium-card { padding: 22px 18px; }
  .premium-price { width: 100%; }
}
.premium-leads { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.premium-leads li { display: flex; align-items: center; gap: 12px; }
.premium-leads span { flex: 1; font-weight: 600; }
.premium-leads b { color: #fbbf24; font-size: 13px; }
.is-danger-text { color: #f87171; }
/* ---------- Nexus, the CV agent (cv.php) ---------- */
.cv-fields select { width: 100%; min-height: 42px; padding: 9px 12px; border: 1px solid rgba(150, 140, 170, .28); border-radius: 10px; color: inherit; background: rgba(150, 140, 170, .06); font: 500 14px var(--font-body); flex-basis: 100%; }
.cv-fields select option { color: #1d1530; }
.nexbot { display: block; overflow: visible; }
.nexbot-stem { stroke: #a78bfa; stroke-width: 3; stroke-linecap: round; }
.nexbot-light { fill: #22d3ee; filter: drop-shadow(0 0 6px #22d3ee); animation: nexbot-glow 1.6s ease-in-out infinite; }
.nexbot-eyes ellipse { fill: #67e8f9; filter: drop-shadow(0 0 4px #22d3ee); transform-box: fill-box; transform-origin: center; animation: nexbot-blink 4.5s infinite; }
.nexbot-smile { fill: none; stroke: #67e8f9; stroke-width: 3; stroke-linecap: round; }
.nexbot-heart { fill: #f472b6; animation: nexbot-glow 1.2s ease-in-out infinite; }
.nexbot-arm { transform-box: fill-box; transform-origin: 50% 100%; }
.nexbot.is-waving .nexbot-arm { animation: nexbot-wave 1.6s ease-in-out infinite; }
.nexbot.is-waving { animation: nexbot-float 4s ease-in-out infinite; }
@keyframes nexbot-blink { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.1); } }
@keyframes nexbot-glow { 50% { opacity: .45; } }
@keyframes nexbot-wave { 0%, 60%, 100% { transform: rotate(0); } 15%, 45% { transform: rotate(-22deg); } 30% { transform: rotate(14deg); } }
@keyframes nexbot-float { 50% { transform: translateY(-6px); } }

.agent-hero { position: relative; display: flex; align-items: center; gap: 26px; margin-bottom: 20px; padding: 20px 26px; overflow: hidden; border: 1px solid rgba(139, 92, 246, .35); border-radius: 20px; background: radial-gradient(circle at 10% 50%, rgba(139, 92, 246, .22), transparent 45%), linear-gradient(120deg, rgba(34, 211, 238, .06), transparent 60%), var(--panel); }
.agent-hero-bot { width: 112px; flex: none; }
.agent-hero-text { display: grid; gap: 14px; }
.agent-bubble { position: relative; max-width: 640px; margin: 0; padding: 14px 18px; border-radius: 4px 18px 18px 18px; background: rgba(139, 92, 246, .14); font-size: 15px; line-height: 1.55; }
.agent-bubble::before { content: ""; position: absolute; top: 0; left: -10px; border: 10px solid transparent; border-top-color: rgba(139, 92, 246, .14); border-right-color: rgba(139, 92, 246, .14); }
.agent-hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.agent-hero-actions .app-muted { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
.agent-hero-actions .app-muted .app-icon { width: 15px; height: 15px; }

.agent { width: min(560px, calc(100% - 24px)); max-height: min(760px, calc(100% - 24px)); padding: 0; overflow: hidden; border: 1px solid rgba(139, 92, 246, .4); border-radius: 24px; color: #f4f1ff; background: #0e0b26; box-shadow: 0 40px 100px -20px rgba(0, 0, 0, .8), 0 0 0 1px rgba(255, 255, 255, .04); }
.agent[open] { display: flex; flex-direction: column; animation: agent-in .45s var(--ease-spring) both; }
.agent::backdrop { background: rgba(6, 4, 20, .6); backdrop-filter: blur(4px); }
@keyframes agent-in { from { opacity: 0; transform: translateY(24px) scale(.96); } }
.agent-head { position: relative; display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: linear-gradient(120deg, #2e1065, #4c1d95 60%, #6d28d9); }
.agent-head-bot { width: 40px; height: 44px; flex: none; }
.agent-head-name { display: grid; flex: 1; }
.agent-head-name b { font: 700 16px var(--font-display); }
.agent-head-name small { display: inline-flex; align-items: center; gap: 6px; color: rgba(255, 255, 255, .75); font-size: 12px; }
.agent-head-name small i { width: 8px; height: 8px; border-radius: 50%; background: #4ade80; box-shadow: 0 0 0 3px rgba(74, 222, 128, .25); }
.agent-progress { position: absolute; inset: auto 0 0; height: 3px; background: rgba(255, 255, 255, .12); }
.agent-progress span { display: block; width: 0; height: 100%; background: linear-gradient(90deg, #22d3ee, #f472b6); transition: width .6s var(--ease-out); }
.agent-close { display: grid; place-items: center; width: 34px; height: 34px; border: 0; border-radius: 10px; color: #fff; background: rgba(255, 255, 255, .12); cursor: pointer; }
.agent-close .app-icon { width: 18px; height: 18px; }
.agent-chat { display: flex; flex-direction: column; gap: 10px; flex: 1; min-height: 300px; padding: 18px 16px; overflow-y: auto; background: radial-gradient(circle at 100% 0%, rgba(139, 92, 246, .12), transparent 40%); }
.agent-msg { display: flex; align-items: flex-end; gap: 8px; max-width: 88%; animation: msg-in .35s var(--ease-out) both; }
@keyframes msg-in { from { opacity: 0; transform: translateY(8px); } }
.agent-msg p { margin: 0; padding: 10px 14px; border-radius: 18px; font-size: 14.5px; line-height: 1.5; }
.agent-msg.is-bot p { border-bottom-left-radius: 4px; background: #1d1840; }
.agent-msg.is-bot b { color: #c4b5fd; }
.agent-msg.is-me { align-self: flex-end; }
.agent-msg.is-me p { border-bottom-right-radius: 4px; color: #fff; background: linear-gradient(120deg, #6d28d9, #db2777); }
.agent-avatar { width: 28px; height: 31px; flex: none; }
.agent-msg.is-typing p { display: inline-flex; gap: 4px; padding: 14px 16px; }
.agent-msg.is-typing i { width: 7px; height: 7px; border-radius: 50%; background: #a78bfa; animation: typing-dot 1s ease-in-out infinite; }
.agent-msg.is-typing i:nth-child(2) { animation-delay: .15s; }
.agent-msg.is-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes typing-dot { 50% { opacity: .3; transform: translateY(-3px); } }
.agent-input { display: grid; gap: 10px; padding: 14px 16px 16px; border-top: 1px solid rgba(255, 255, 255, .08); background: #0b0920; }
.agent-input:empty { display: none; }
.agent-chips { display: flex; flex-wrap: wrap; gap: 8px; max-height: 210px; overflow-y: auto; }
.agent-chip { display: inline-grid; gap: 1px; padding: 9px 14px; border: 1.5px solid rgba(167, 139, 250, .45); border-radius: 999px; color: #ede9fe; background: rgba(139, 92, 246, .1); font: 600 14px var(--font-body); text-align: left; cursor: pointer; transition: background .2s ease, transform .15s ease, border-color .2s ease; }
.agent-chip small { color: rgba(237, 233, 254, .6); font-size: 11px; font-weight: 500; }
.agent-chip:hover { transform: translateY(-2px); background: rgba(139, 92, 246, .22); }
.agent-chip.is-on { border-color: transparent; color: #fff; background: linear-gradient(120deg, #6d28d9, #db2777); }
.agent-chip:focus-visible, .agent-skip:focus-visible { outline: 2px solid #22d3ee; outline-offset: 2px; }
.agent-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.agent-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px; }
.agent-form input, .agent-form textarea { flex: 1; min-width: 0; min-height: 46px; padding: 11px 14px; border: 1.5px solid rgba(167, 139, 250, .4); border-radius: 14px; color: #fff; background: rgba(255, 255, 255, .05); font: 500 15px var(--font-body); color-scheme: dark; resize: none; }
.agent-form input:focus, .agent-form textarea:focus { outline: none; border-color: #22d3ee; box-shadow: 0 0 0 3px rgba(34, 211, 238, .2); }
.agent-send { display: grid; place-items: center; width: 46px; height: 46px; flex: none; border: 0; border-radius: 14px; color: #fff; background: linear-gradient(120deg, #6d28d9, #db2777); cursor: pointer; }
.agent-send .app-icon { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.agent-skip { padding: 6px 4px; border: 0; color: rgba(237, 233, 254, .65); background: none; font: 600 13px var(--font-body); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.agent-form .agent-skip { flex-basis: 100%; text-align: left; }
html.theme-light .agent-hero { border-color: rgba(109, 40, 217, .25); }
html.theme-light .agent-bubble { background: rgba(109, 40, 217, .08); }
html.theme-light .agent-bubble::before { border-top-color: rgba(109, 40, 217, .08); border-right-color: rgba(109, 40, 217, .08); }
@media (max-width: 600px) {
  .agent-hero { flex-direction: column; align-items: flex-start; gap: 12px; padding: 18px; }
  .agent-hero-bot { width: 84px; }
  .agent { max-height: calc(100% - 12px); border-radius: 20px; }
}
@media (prefers-reduced-motion: reduce) { .nexbot *, .nexbot, .agent-msg, .agent[open] { animation: none !important; } }
/* ---------- Automatic emails (console) and the "notify" switches ---------- */
.notify-toggle { display: flex !important; align-items: flex-start; gap: 12px; margin: 14px 0 6px !important; padding: 12px 14px; border: 1px solid rgba(139, 92, 246, .35); border-radius: 12px; background: rgba(139, 92, 246, .08); cursor: pointer; }
.notify-toggle input { width: 18px !important; height: 18px !important; min-height: 0 !important; margin-top: 2px !important; flex: none; accent-color: #8b5cf6; }
.notify-toggle span { display: grid; gap: 2px; font-weight: 500; }
.notify-toggle b { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; }
.notify-toggle b .app-icon { width: 16px; height: 16px; color: #a78bfa; }
.notify-toggle small { color: var(--on-dark-muted); font-size: 12.5px; }
.mail-status { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; font-size: 13.5px; font-weight: 600; }
.mail-status span { width: 10px; height: 10px; flex: none; border-radius: 50%; }
.mail-status.is-on span { background: #22c55e; box-shadow: 0 0 0 4px rgba(34, 197, 94, .2); }
.mail-status.is-off span { background: #f59e0b; box-shadow: 0 0 0 4px rgba(245, 158, 11, .2); }
.mail-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 0 0 14px; padding: 0; list-style: none; }
.mail-stats li { display: grid; padding: 12px; border: 1px solid var(--panel-line); border-radius: 12px; text-align: center; }
.mail-stats b { font: 800 24px var(--font-display); }
.mail-stats span { color: var(--on-dark-muted); font-size: 12px; }
.mail-stats .is-bad b { color: #f87171; }
.mail-error { display: flex; gap: 6px; margin: 0 0 6px; color: #f87171; font-size: 12.5px; overflow-wrap: anywhere; }
.mail-error .app-icon { width: 14px; height: 14px; flex: none; margin-top: 2px; }
.mail-test { display: grid; gap: 6px; margin-top: 14px; }
.mail-test label { font-size: 13px; font-weight: 700; }
.mail-test > div { display: flex; gap: 8px; }
.mail-test input { flex: 1; min-width: 0; min-height: 40px; padding: 8px 12px; border: 1px solid rgba(150, 140, 170, .28); border-radius: 10px; color: inherit; background: rgba(150, 140, 170, .06); font: 500 14px var(--font-body); }
.mail-cron { margin-top: 14px; font-size: 13px; }
.mail-cron summary { cursor: pointer; font-weight: 700; }
.mail-cron code { display: block; margin: 6px 0; padding: 8px 10px; overflow-x: auto; border-radius: 8px; background: rgba(150, 140, 170, .12); font-size: 12px; white-space: nowrap; }
/* Several forms stacked in the side column: they scroll normally instead of piling up. */
body.app-page .site-layout > div > .site-form { position: relative; top: 0; }
.site-layout > div > .site-form + .site-form { margin-top: 18px; }
/* ---------- Private meetings (console "Réunions" and member "Mes réunions") ---------- */
.meet-card { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 18px; align-items: start; padding: 18px 0; border-bottom: 1px solid var(--panel-line); scroll-margin-top: 90px; }
.meet-card:last-child { border-bottom: 0; }
.meet-date { display: grid; place-items: center; align-content: center; width: 70px; height: 82px; border-radius: 16px; color: #fff; background: linear-gradient(160deg, #4338ca, #7c3aed 60%, #be185d); box-shadow: 0 14px 26px -14px rgba(124, 58, 237, .9); line-height: 1.05; }
.meet-date b { font: 800 30px var(--font-display); }
.meet-date small { font-size: 11px; font-weight: 700; text-transform: uppercase; opacity: .9; }
.meet-body { display: grid; gap: 6px; min-width: 0; }
.meet-body h3 { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; font-size: 16.5px; }
.meet-aud { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 700; color: #a5b4fc; background: rgba(99, 102, 241, .14); }
.meet-aud .app-icon { width: 13px; height: 13px; }
.meet-aud.is-bureau { color: #fbbf24; background: rgba(251, 191, 36, .13); }
.meet-aud.is-choix { color: #f0abfc; background: rgba(217, 70, 239, .13); }
.meet-meta { margin: 0; color: var(--on-dark-muted); font-size: 13.5px; }
.meet-meta a { display: inline-flex; align-items: center; gap: 4px; color: #a78bfa; font-weight: 700; }
.meet-meta .app-icon { width: 14px; height: 14px; }
.meet-agenda-title { margin: 6px 0 0; color: var(--on-dark-muted); font-size: 11.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.meet-agenda { display: grid; gap: 3px; margin: 2px 0 4px; padding-left: 20px; font-size: 13.5px; }
.meet-agenda li::marker { color: #a78bfa; font-weight: 800; }
.meet-bar { display: flex; height: 8px; overflow: hidden; border-radius: 999px; background: rgba(150, 140, 170, .2); }
.meet-bar i { display: block; height: 100%; }
.meet-bar .is-yes { background: #22c55e; }
.meet-bar .is-no { background: #f59e0b; }
.meet-counts { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 0; font-size: 12.5px; font-weight: 600; }
.meet-counts span { display: inline-flex; align-items: center; gap: 4px; }
.meet-counts .app-icon { width: 13px; height: 13px; }
.meet-counts .is-yes { color: #4ade80; }
.meet-counts .is-no { color: #fbbf24; }
.meet-people summary { cursor: pointer; color: #a78bfa; font-size: 13px; font-weight: 700; }
.meet-people ul { display: grid; gap: 6px; margin: 10px 0 0; padding: 0; list-style: none; }
.meet-people li { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.meet-people li > span { display: grid; flex: 1; min-width: 0; }
.meet-people small { color: var(--on-dark-muted); font-style: italic; }
.meet-people em { padding: 2px 9px; border-radius: 999px; color: var(--on-dark-muted); background: rgba(150, 140, 170, .14); font-size: 11.5px; font-style: normal; font-weight: 700; white-space: nowrap; }
.meet-people em.is-yes { color: #4ade80; background: rgba(34, 197, 94, .13); }
.meet-people em.is-no { color: #fbbf24; background: rgba(245, 158, 11, .13); }
.meet-actions { display: grid; gap: 6px; justify-items: stretch; }
.meet-actions form { display: grid; }
.meet-form textarea { width: 100%; padding: 12px 16px; border: 1px solid rgba(255, 255, 255, .14); border-radius: 8px; color: inherit; background: rgba(255, 255, 255, .05); font: 15px/1.5 var(--font-body); resize: vertical; }
.meet-audience { display: grid; gap: 8px; margin: 14px 0 0; padding: 0; border: 0; }
.meet-audience legend { margin-bottom: 8px; font-size: 14px; font-weight: 700; }
.meet-choice { margin: 0 !important; cursor: pointer; }
.meet-choice input { position: absolute; opacity: 0; }
.meet-choice > span { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 12px; align-items: center; padding: 11px 14px; border: 1.5px solid var(--panel-line); border-radius: 12px; transition: border-color .2s ease, background .2s ease; }
.meet-choice .app-icon { grid-row: span 2; width: 22px; height: 22px; color: #a78bfa; }
.meet-choice b { font-size: 14px; }
.meet-choice small { color: var(--on-dark-muted); font-size: 12px; font-weight: 500; }
.meet-choice:has(input:checked) > span { border-color: #8b5cf6; background: rgba(139, 92, 246, .1); }
.meet-choice:has(input:focus-visible) > span { outline: 2px solid #a78bfa; outline-offset: 2px; }
.meet-picker { margin-top: 10px; overflow: hidden; border: 1px solid var(--panel-line); border-radius: 12px; }
.meet-picker[hidden] { display: none; }
.meet-picker-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px; border-bottom: 1px solid var(--panel-line); }
.meet-picker-tools input { flex: 1; min-width: 140px; height: 38px !important; }
.meet-picked { color: #a78bfa; font-size: 12.5px; font-weight: 800; }
.meet-picker ul { max-height: 260px; margin: 0; padding: 6px; overflow-y: auto; list-style: none; }
.meet-picker li[hidden] { display: none; }
.meet-picker label { display: flex !important; align-items: center; gap: 10px; margin: 0 !important; padding: 7px 8px; border-radius: 10px; cursor: pointer; font-weight: 500 !important; }
.meet-picker label:hover { background: rgba(150, 140, 170, .08); }
.meet-picker label:has(input:checked) { background: rgba(139, 92, 246, .12); }
.meet-picker label > span { display: grid; }
.meet-picker b { font-size: 13.5px; }
.meet-picker small { color: var(--on-dark-muted); font-size: 11.5px; }

.my-meetings { display: grid; gap: 14px; }
.meet-card.is-member { padding: 20px; border: 1px solid var(--panel-line); border-left: 4px solid #8b5cf6; border-radius: 16px; background: var(--panel); }
.meet-card.is-member.is-yes { border-left-color: #22c55e; }
.meet-card.is-member.is-no { border-left-color: #f59e0b; }
.meet-card.is-member.is-waiting { box-shadow: 0 0 0 1px rgba(139, 92, 246, .35), 0 18px 40px -26px rgba(139, 92, 246, .8); }
.meet-join { justify-self: start; margin-top: 4px; }
.meet-answer { display: grid; gap: 8px; min-width: 220px; }
.meet-answer-state { display: flex; align-items: center; gap: 6px; margin: 0 0 2px; font-size: 13px; font-weight: 700; }
.meet-answer-state .app-icon { width: 15px; height: 15px; }
.is-yes .meet-answer-state { color: #4ade80; }
.is-no .meet-answer-state { color: #fbbf24; }
.is-waiting .meet-answer-state { color: #a78bfa; }
.meet-decline { display: grid; gap: 8px; }
.meet-decline summary { list-style: none; cursor: pointer; justify-content: center; }
.meet-decline summary::-webkit-details-marker { display: none; }
.meet-decline input { min-height: 38px; padding: 8px 12px; border: 1px solid rgba(150, 140, 170, .28); border-radius: 10px; color: inherit; background: rgba(150, 140, 170, .06); font: 500 13.5px var(--font-body); }
.meet-answer > .btn, .meet-decline .btn { justify-content: center; }
html.theme-light .meet-aud { color: #4338ca; }
html.theme-light .meet-aud.is-bureau { color: #b45309; }
html.theme-light .meet-aud.is-choix { color: #a21caf; }
html.theme-light .meet-counts .is-yes, html.theme-light .meet-people em.is-yes, html.theme-light .is-yes .meet-answer-state { color: #15803d; }
html.theme-light .meet-counts .is-no, html.theme-light .meet-people em.is-no, html.theme-light .is-no .meet-answer-state { color: #b45309; }
@media (max-width: 760px) {
  .meet-card { grid-template-columns: auto minmax(0, 1fr); }
  .meet-actions, .meet-answer { grid-column: 1 / -1; }
  .meet-actions { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
}
.meet-actions .app-link-button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 6px; }
.meet-people .app-avatar, .meet-picker .app-avatar { width: 30px !important; height: 30px !important; min-width: 30px; flex: none; font-size: 11px; }
.meet-people .app-avatar img, .meet-picker .app-avatar img { width: 100%; height: 100%; object-fit: cover; }
/* ---------- Phone widths: content never wider than the screen ---------- */
/* A grid track sized by its widest child (a long <select> option, a row of stats) used to push
   whole pages sideways; tracks are capped to the screen and children may shrink. */
body.app-page .app-main { grid-template-columns: minmax(0, 1fr); }
body.app-page .app-main > *,
.page-banner-body, .registration-form > *, .form-row > *, .form-field, .site-layout > *, .app-grid > * { min-width: 0; }
.registration-form, .page-banner-body { grid-template-columns: minmax(0, 1fr); }
body.app-page select, body.app-page input, body.app-page textarea { max-width: 100%; }
body.app-page select { text-overflow: ellipsis; }
@media (max-width: 600px) {
  .app-stats.app-stats-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bureau-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)) !important; }
  .password-meter { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .page-banner-chips { flex-wrap: wrap; }
  .page-banner-actions { flex-wrap: wrap; }
}
/* ---------- Add to calendar ---------- */
.cal-links { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 6px 0 0; color: var(--on-dark-muted); font-size: 13px; }
.cal-links .app-icon { width: 15px; height: 15px; color: #a78bfa; }
.cal-links a { padding: 3px 10px; border: 1px solid rgba(139, 92, 246, .4); border-radius: 999px; color: #c4b5fd; font-weight: 700; text-decoration: none; transition: background .2s ease; }
.cal-links a:hover { background: rgba(139, 92, 246, .15); }
.event-cal { justify-content: center; margin-top: 16px; }
.cal-sync { display: flex; gap: 18px; align-items: flex-start; margin-top: 16px; border-color: rgba(139, 92, 246, .35); background: radial-gradient(circle at 0 0, rgba(139, 92, 246, .12), transparent 50%), var(--panel); }
body.app-page .cal-sync > div > h2:first-child { margin: 0 0 6px; padding: 0; border: 0; font-size: 16px; }
.cal-sync-icon { display: grid; place-items: center; width: 52px; height: 52px; flex: none; border-radius: 15px; color: #fff; background: linear-gradient(150deg, #4338ca, #7c3aed); box-shadow: 0 12px 24px -12px rgba(124, 58, 237, .9); }
.cal-sync-icon .app-icon { width: 26px; height: 26px; }
.cal-sync p { margin: 0 0 12px; }
.cal-sync-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.cal-sync small { font-size: 12px; }
html.theme-light .cal-links a { color: #5b21b6; }
@media (max-width: 600px) { .cal-sync { flex-direction: column; } }
/* Install button of the app (shown only when the browser can install it). */
.side-install[hidden] { display: none !important; }
.side-install { color: #c4b5fd !important; background: linear-gradient(90deg, rgba(139, 92, 246, .16), transparent) !important; }
/* ---------- Treasury, redesigned ---------- */
.fin-hero { position: relative; display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 22px; margin-bottom: 16px; padding: 28px 30px; overflow: hidden; isolation: isolate; border-radius: 22px; color: #fff; background: radial-gradient(circle at 85% -10%, rgba(255, 255, 255, .22), transparent 40%), linear-gradient(125deg, #064e3b 0%, #0f766e 45%, #0e7490 100%); box-shadow: 0 30px 60px -32px rgba(15, 118, 110, .9); }
.fin-hero.is-negative { background: radial-gradient(circle at 85% -10%, rgba(255, 255, 255, .2), transparent 40%), linear-gradient(125deg, #4c0519, #9f1239 50%, #be185d); }
.fin-hero-art { position: absolute; right: -30px; bottom: -40px; z-index: -1; color: #fff; opacity: .1; transform: rotate(-12deg); }
.fin-hero-art .app-icon { width: 260px; height: 260px; stroke-width: 1.2; }
.fin-hero-eyebrow { display: flex; align-items: center; gap: 8px; margin: 0 0 14px; color: rgba(255, 255, 255, .78); font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.fin-hero-eyebrow .app-icon { width: 16px; height: 16px; }
.fin-hero-label { margin: 0; color: rgba(255, 255, 255, .8); font-size: 14px; }
.fin-hero-balance { margin: 2px 0 18px; font: 800 clamp(34px, 5.5vw, 54px)/1 var(--font-display); letter-spacing: -.02em; text-shadow: 0 10px 30px rgba(0, 0, 0, .25); }
.fin-hero-stats { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; padding: 0; list-style: none; }
.fin-hero-stats li { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border: 1px solid rgba(255, 255, 255, .18); border-radius: 14px; background: rgba(255, 255, 255, .1); backdrop-filter: blur(6px); }
.fin-hero-stats .app-icon { width: 28px; height: 28px; padding: 6px; border-radius: 9px; background: rgba(255, 255, 255, .16); }
.fin-hero-stats .is-in .app-icon { color: #86efac; }
.fin-hero-stats .is-out .app-icon { color: #fda4af; }
.fin-hero-stats span { display: grid; }
.fin-hero-stats small { color: rgba(255, 255, 255, .72); font-size: 11.5px; }
.fin-hero-stats b { font: 800 16px var(--font-display); }
.fin-hero-side { display: grid; justify-items: end; gap: 10px; }
.fin-hero .season-pick { display: flex; align-items: center; gap: 8px; color: rgba(255, 255, 255, .8); font-size: 13px; }
.fin-hero .season-pick select { padding: 7px 10px; border: 1px solid rgba(255, 255, 255, .3); border-radius: 10px; color: #fff; background: rgba(255, 255, 255, .12); font: 700 13px var(--font-body); }
.fin-hero .season-pick option { color: #1d1530; }
.fin-hero .btn-primary { color: #064e3b !important; background: #fff !important; box-shadow: 0 12px 26px -12px rgba(0, 0, 0, .5); }

.fin-tabs { display: flex; gap: 6px; margin: 0 0 18px; padding: 5px; overflow-x: auto; border: 1px solid var(--panel-line); border-radius: 16px; background: var(--panel); scrollbar-width: none; }
.fin-tabs::-webkit-scrollbar { display: none; }
.fin-tabs a { display: inline-flex; align-items: center; gap: 8px; flex: 1 0 auto; justify-content: center; padding: 10px 14px; border-radius: 12px; color: var(--on-dark-muted); font-size: 13.5px; font-weight: 700; text-decoration: none; white-space: nowrap; transition: color .2s ease, background .2s ease; }
.fin-tabs a .app-icon { width: 17px; height: 17px; }
.fin-tabs a:hover { color: inherit; background: rgba(150, 140, 170, .08); }
.fin-tabs a.is-active { color: #fff; background: linear-gradient(130deg, #0f766e, #0e7490); box-shadow: 0 10px 22px -12px rgba(14, 116, 144, .9); }

.fin-treasurer { margin-bottom: 18px; border-color: rgba(245, 179, 1, .35); background: radial-gradient(circle at 0 0, rgba(245, 179, 1, .1), transparent 45%), var(--panel); }
.fin-treasurer-head { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 14px; }
body.app-page .fin-treasurer-head h2 { margin: 0 0 4px; padding: 0; border: 0; font-size: 16px; }
.fin-treasurer-head p { margin: 0; }
.fin-treasurer-icon { display: grid; place-items: center; width: 46px; height: 46px; flex: none; border-radius: 14px; color: #3b2a00; background: linear-gradient(140deg, #fde68a, #f59e0b); box-shadow: 0 12px 24px -12px rgba(245, 158, 11, .9); }
.fin-treasurer-icon .app-icon { width: 22px; height: 22px; }
.fin-treasurer-list { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 14px; padding: 0; list-style: none; }
.fin-treasurer-list li { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border: 1px solid var(--panel-line); border-radius: 14px; background: rgba(150, 140, 170, .05); }
.fin-treasurer-list li > span { display: grid; }
.fin-treasurer-list small { color: var(--on-dark-muted); font-size: 12px; }
.fin-treasurer-empty { display: flex; align-items: center; gap: 8px; margin: 0 0 14px; color: #fbbf24; font-size: 13.5px; font-weight: 600; }
.fin-treasurer-empty .app-icon { width: 16px; height: 16px; }
.fin-treasurer-form { display: flex; flex-wrap: wrap; gap: 8px; }
.fin-treasurer-form select { flex: 1; min-width: 200px; min-height: 40px; padding: 8px 12px; border: 1px solid rgba(150, 140, 170, .28); border-radius: 10px; color: inherit; background: rgba(150, 140, 170, .06); font: 600 14px var(--font-body); }
.fin-treasurer-form select option { color: #1d1530; }

.fin-quick { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.fin-tile { --c: #22c55e; position: relative; display: grid; gap: 4px; padding: 18px; overflow: hidden; border: 1px solid color-mix(in srgb, var(--c) 30%, var(--panel-line)); border-radius: 18px; color: inherit; background: radial-gradient(120% 90% at 0 0, color-mix(in srgb, var(--c) 18%, transparent), transparent 60%), var(--panel); text-decoration: none; transition: transform .25s var(--ease-out), box-shadow .25s ease; }
.fin-tile:hover { transform: translateY(-4px); box-shadow: 0 22px 40px -24px var(--c); }
.fin-tile > span { display: grid; place-items: center; width: 42px; height: 42px; margin-bottom: 8px; border-radius: 12px; color: #fff; background: var(--c); box-shadow: 0 10px 22px -10px var(--c); }
.fin-tile > span .app-icon { width: 20px; height: 20px; }
.fin-tile b { font: 700 15px var(--font-display); }
.fin-tile small { color: var(--on-dark-muted); font-size: 12.5px; }
.fin-tile.is-out { --c: #f43f5e; }
.fin-tile.is-dues { --c: #6366f1; }
.fin-tile.is-collect { --c: #ec4899; }

.fin-chart .finance-bars i.is-in { background: linear-gradient(180deg, #4ade80, #15803d); border-radius: 6px 6px 2px 2px; }
.fin-chart .finance-bars i.is-out { background: linear-gradient(180deg, #fb7185, #be123c); border-radius: 6px 6px 2px 2px; }
.fin-chart .finance-month { border-radius: 10px; transition: background .2s ease; }
.fin-chart .finance-month:hover, .fin-chart .finance-month:focus-visible { background: rgba(150, 140, 170, .1); outline: none; }
.fin-donut-wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 22px; }
.fin-donut { display: grid; place-items: center; width: 170px; height: 170px; flex: none; border-radius: 50%; animation: ring-pop .9s var(--ease-spring) both; }
.fin-donut span { display: grid; place-items: center; align-content: center; width: 112px; height: 112px; border-radius: 50%; background: var(--panel); text-align: center; }
.fin-donut b { font: 800 16px var(--font-display); }
.fin-donut small { color: var(--on-dark-muted); font-size: 11.5px; }
.fin-legend { display: grid; flex: 1; gap: 8px; min-width: 180px; margin: 0; padding: 0; list-style: none; }
.fin-legend li { display: flex; align-items: center; gap: 10px; font-size: 13.5px; }
.fin-legend i { width: 12px; height: 12px; flex: none; border-radius: 4px; background: var(--c); }
.fin-legend span { flex: 1; }
.fin-legend b { font-size: 13px; }
.fin-cat-icon { display: grid; place-items: center; width: 36px; height: 36px; flex: none; border-radius: 11px; color: var(--c); background: color-mix(in srgb, var(--c) 15%, transparent); }
.fin-cat-icon .app-icon { width: 17px; height: 17px; }

.collect-ring { display: grid; place-items: center; width: 46px; height: 46px; flex: none; border-radius: 50%; color: var(--c, #8b5cf6); background: conic-gradient(var(--c, #8b5cf6) calc(var(--p, 0) * 1%), color-mix(in srgb, var(--c, #8b5cf6) 16%, transparent) 0); }
.collect-ring > .app-icon, .collect-ring > span { display: grid; place-items: center; width: calc(100% - 10px); height: calc(100% - 10px); border-radius: 50%; background: var(--panel); }
.collect-ring > .app-icon { padding: 9px; }
.collect-ring.is-big { width: 64px; height: 64px; }
.collect-ring.is-big b { font: 800 15px var(--font-display); color: var(--c, #8b5cf6); }
.collect-ring.is-huge { width: 128px; height: 128px; }
.collect-ring.is-huge > span { align-content: center; text-align: center; }
.collect-ring.is-huge b { font: 800 30px var(--font-display); color: var(--c, #8b5cf6); }
.collect-ring.is-huge small { color: var(--on-dark-muted); font-size: 11px; }
.collect-ring.is-huge .app-icon { width: 44px; height: 44px; }
.collect-mini { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.collect-mini a { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--panel-line); border-radius: 14px; color: inherit; text-decoration: none; transition: border-color .2s ease; }
.collect-mini a:hover { border-color: var(--c); }
.collect-mini a > span:last-child { display: grid; min-width: 0; }
.collect-mini small { color: var(--on-dark-muted); font-size: 12px; }

.collect-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 16px; margin-bottom: 20px; }
.collect-card { --c: #8b5cf6; position: relative; display: flex; flex-direction: column; gap: 8px; min-height: 210px; padding: 20px; overflow: hidden; border: 1px solid color-mix(in srgb, var(--c) 30%, var(--panel-line)); border-radius: 20px; color: inherit; background: radial-gradient(120% 80% at 100% 0, color-mix(in srgb, var(--c) 20%, transparent), transparent 60%), var(--panel); text-decoration: none; transition: transform .3s var(--ease-out), box-shadow .3s ease; }
.collect-card:hover { transform: translateY(-5px); box-shadow: 0 26px 46px -26px var(--c); }
.collect-card.is-closed { opacity: .65; filter: saturate(.6); }
.collect-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.collect-kind { display: inline-flex; align-items: center; gap: 6px; margin: 0; padding: 4px 10px; border-radius: 999px; color: var(--c); background: color-mix(in srgb, var(--c) 14%, transparent); font-size: 11.5px; font-weight: 800; }
.collect-kind .app-icon { width: 13px; height: 13px; }
.collect-card > strong { font: 700 18px/1.25 var(--font-display); }
.collect-card-meta { color: var(--on-dark-muted); font-size: 13px; }
.collect-card-meta em { color: #fbbf24; font-style: normal; font-weight: 700; }
.collect-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 10px; border-top: 1px solid var(--panel-line); color: var(--c); font-size: 13px; font-weight: 700; }
.collect-card-foot .app-icon { width: 16px; height: 16px; transition: transform .25s ease; }
.collect-card:hover .collect-card-foot .app-icon { transform: translateX(4px); }

.collect-kinds { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; margin: 0 0 6px; padding: 0; border: 0; }
.collect-kinds legend { margin-bottom: 10px; font-size: 14px; font-weight: 700; }
.collect-kind-choice { margin: 0 !important; cursor: pointer; }
.collect-kind-choice input { position: absolute; opacity: 0; }
.collect-kind-choice > span { display: grid; gap: 3px; height: 100%; padding: 14px; border: 1.5px solid var(--panel-line); border-radius: 14px; transition: border-color .2s ease, background .2s ease, transform .2s ease; }
.collect-kind-choice i { display: grid; place-items: center; width: 36px; height: 36px; margin-bottom: 6px; border-radius: 11px; color: #fff; background: var(--c); }
.collect-kind-choice i .app-icon { width: 18px; height: 18px; }
.collect-kind-choice b { font-size: 14px; }
.collect-kind-choice small { color: var(--on-dark-muted); font-size: 12px; font-weight: 500; }
.collect-kind-choice:hover > span { transform: translateY(-2px); }
.collect-kind-choice:has(input:checked) > span { border-color: var(--c); background: color-mix(in srgb, var(--c) 10%, transparent); }
.collect-kind-choice:has(input:focus-visible) > span { outline: 2px solid var(--c); outline-offset: 2px; }
.collect-sizes { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 12px 0 4px; }
.collect-sizes[hidden] { display: none; }
.collect-sizes > span { margin-right: 6px; font-size: 14px; font-weight: 700; }
.collect-sizes label, .pay-sizes label { margin: 0 !important; cursor: pointer; }
.collect-sizes input, .pay-sizes input { position: absolute; opacity: 0; }
.collect-sizes b, .pay-sizes b { display: grid; place-items: center; min-width: 42px; height: 38px; padding: 0 10px; border: 1.5px solid var(--panel-line); border-radius: 10px; font-size: 13px; font-weight: 800; transition: all .2s ease; }
.collect-sizes input:checked + b, .pay-sizes input:checked + b { border-color: #ec4899; color: #fff; background: linear-gradient(140deg, #ec4899, #be185d); }
.collect-sizes input:focus-visible + b, .pay-sizes input:focus-visible + b { outline: 2px solid #f9a8d4; outline-offset: 2px; }

.collect-head { --c: #8b5cf6; display: grid; gap: 14px; margin-bottom: 18px; padding: 22px 24px; border: 1px solid color-mix(in srgb, var(--c) 35%, var(--panel-line)); border-radius: 22px; background: radial-gradient(90% 120% at 0 0, color-mix(in srgb, var(--c) 18%, transparent), transparent 60%), var(--panel); }
.collect-head > .app-link-button { justify-self: start; }
.collect-head-main { display: flex; flex-wrap: wrap; align-items: center; gap: 24px; }
.collect-head-main > div { flex: 1; min-width: 240px; }
.collect-head h2 { margin: 8px 0 4px; font: 800 26px/1.15 var(--font-display); }
.collect-facts { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0 0; padding: 0; list-style: none; }
.collect-facts li { display: grid; padding: 10px 14px; border: 1px solid var(--panel-line); border-radius: 14px; background: rgba(150, 140, 170, .05); }
.collect-facts b { font: 800 16px var(--font-display); }
.collect-facts small { color: var(--on-dark-muted); font-size: 11.5px; }
.collect-facts .is-warn b { color: #fbbf24; }
.collect-head-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.size-bars { display: flex; align-items: flex-end; gap: 14px; height: 150px; margin: 0; padding: 0; list-style: none; }
.size-bars li { display: grid; grid-template-rows: auto 1fr auto; flex: 1; height: 100%; justify-items: center; gap: 6px; }
.size-bars span { display: flex; align-items: flex-end; width: 100%; max-width: 54px; height: 100%; }
.size-bars i { display: block; width: 100%; min-height: 4px; border-radius: 8px 8px 3px 3px; background: linear-gradient(180deg, #f472b6, #be185d); animation: bar-grow-y .8s var(--ease-out) both; transform-origin: bottom; }
@keyframes bar-grow-y { from { transform: scaleY(0); } }
.size-bars small { color: var(--on-dark-muted); font-size: 12px; font-weight: 700; }
.collect-status { display: inline-flex; align-items: center; gap: 6px; margin: 2px 4px 2px 0; padding: 4px 6px 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.collect-status .app-icon { width: 13px; height: 13px; }
.collect-status.is-paid { color: #4ade80; background: rgba(34, 197, 94, .13); }
.collect-status.is-order { color: #fbbf24; background: rgba(245, 158, 11, .13); }
.collect-status form { display: inline; }
.collect-x { display: grid; place-items: center; width: 20px; height: 20px; padding: 0; border: 0; border-radius: 50%; color: inherit; background: rgba(150, 140, 170, .2); cursor: pointer; opacity: .7; }
.collect-x:hover { opacity: 1; background: rgba(248, 113, 113, .3); }
.collect-x .app-icon { width: 11px; height: 11px; }
.collect-pay select { min-height: 36px; padding: 6px 8px; border: 1px solid rgba(150, 140, 170, .28); border-radius: 9px; color: inherit; background: rgba(150, 140, 170, .06); font: 600 13px var(--font-body); }
.collect-pay select option { color: #1d1530; }
.sponsor-list { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.sponsor-list li { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--panel-line); border-radius: 14px; background: linear-gradient(90deg, rgba(245, 158, 11, .07), transparent 60%); }
.sponsor-list li > span:nth-child(2) { display: grid; flex: 1; min-width: 0; }
.sponsor-list small { color: var(--on-dark-muted); font-size: 12px; }
.sponsor-list em { color: #fbbf24; font: 800 16px var(--font-display); font-style: normal; }
.sponsor-logo { display: grid; place-items: center; width: 42px; height: 42px; flex: none; border-radius: 12px; color: #3b2a00; background: linear-gradient(140deg, #fde68a, #f59e0b); font: 800 14px var(--font-display); }

.treasurer-card { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; padding: 16px 20px; border-radius: 18px; color: #fff; background: radial-gradient(circle at 90% 0, rgba(255, 255, 255, .2), transparent 45%), linear-gradient(125deg, #064e3b, #0f766e 55%, #0e7490); box-shadow: 0 20px 40px -26px rgba(15, 118, 110, .9); text-decoration: none; transition: transform .25s var(--ease-out); }
.treasurer-card:hover { transform: translateY(-3px); }
.treasurer-card > span:nth-child(2) { display: grid; flex: 1; }
.treasurer-card small { color: rgba(255, 255, 255, .75); font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.treasurer-card b { font: 800 22px var(--font-display); }
.treasurer-card em { color: rgba(255, 255, 255, .85); font-size: 13px; font-style: normal; }
.treasurer-card-icon { display: grid; place-items: center; width: 52px; height: 52px; flex: none; border-radius: 15px; background: rgba(255, 255, 255, .16); }
.treasurer-card-icon .app-icon { width: 26px; height: 26px; }
.treasurer-card > .app-icon { width: 20px; height: 20px; }

.my-payments { margin-bottom: 18px; scroll-margin-top: 90px; }
.pay-list { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.pay-list li { --c: #8b5cf6; display: flex; flex-wrap: wrap; align-items: center; gap: 14px; padding: 14px; border: 1px solid var(--panel-line); border-left: 4px solid var(--c); border-radius: 14px; }
.pay-icon { display: grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: 12px; color: #fff; background: var(--c); }
.pay-icon .app-icon { width: 19px; height: 19px; }
.pay-main { display: grid; flex: 1; min-width: 180px; }
.pay-main small { color: var(--on-dark-muted); font-size: 12.5px; }
.pay-state { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; }
.pay-state .app-icon { width: 15px; height: 15px; }
.pay-list .is-paid .pay-state { color: #4ade80; }
.pay-list .is-due .pay-state b { color: #fbbf24; font-size: 15px; }
.pay-order { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.pay-sizes { display: flex; flex-wrap: wrap; gap: 6px; }
.pay-sizes b { min-width: 38px; height: 34px; }
.pay-hint { display: inline-flex; align-items: center; gap: 6px; flex-basis: 100%; color: #fbbf24; font-size: 12.5px; font-weight: 600; }
.pay-hint .app-icon { width: 14px; height: 14px; }

html.theme-light .fin-tabs a.is-active { color: #fff; }
html.theme-light .collect-status.is-paid, html.theme-light .pay-list .is-paid .pay-state { color: #15803d; }
html.theme-light .collect-status.is-order, html.theme-light .pay-hint, html.theme-light .pay-list .is-due .pay-state b, html.theme-light .collect-card-meta em, html.theme-light .fin-treasurer-empty, html.theme-light .collect-facts .is-warn b { color: #b45309; }
html.theme-light .sponsor-list em { color: #b45309; }
@media (max-width: 900px) { .fin-quick { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) {
  .fin-hero { padding: 22px 18px; }
  .fin-hero-side { justify-items: start; }
  .fin-hero-stats li { flex: 1 1 140px; }
  .fin-tabs a span { display: none; }
  .fin-tabs a.is-active span { display: inline; }
  .collect-ring.is-huge { width: 100px; height: 100px; }
  .size-bars { gap: 6px; }
}
.collect-pay { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.collect-pay input[name="amount"] { width: 92px !important; min-width: 0; flex: none; }
/* ---------- Native dropdown lists, readable everywhere ---------- */
/* Option text used to inherit the dark ink while some lists drew a dark background:
   one rule for every list of the platform, in the dark and the light theme. */
body.app-page select { color-scheme: dark; }
body.app-page select option, body.app-page select optgroup { color: #f4f1ff !important; background-color: #16143a !important; }
body.app-page select optgroup { color: #c4b5fd !important; font-weight: 800; }
body.app-page select option:checked { color: #fff !important; background-color: #5b21b6 !important; }
body.app-page select option:disabled { color: #8a85a0 !important; }
html.theme-light body.app-page select { color-scheme: light; }
html.theme-light body.app-page select option, html.theme-light body.app-page select optgroup { color: #1d1530 !important; background-color: #fff !important; }
html.theme-light body.app-page select optgroup { color: #5b21b6 !important; }
html.theme-light body.app-page select option:checked { color: #1d1530 !important; background-color: #ede9fe !important; }
/* ---------- Boutique NEXUS (boutique.php): luxury configurator ---------- */
.shop-hero { position: relative; margin-bottom: 22px; padding: 46px 40px 0; overflow: hidden; isolation: isolate; border-radius: 26px; color: #fff; background: radial-gradient(60% 90% at 85% 10%, rgba(238, 58, 143, .35), transparent 60%), radial-gradient(50% 80% at 10% 100%, rgba(30, 155, 240, .3), transparent 60%), #08070f; box-shadow: 0 40px 80px -40px rgba(0, 0, 0, .9), inset 0 0 0 1px rgba(255, 255, 255, .06); }
.shop-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, .07) 45%, transparent 60%); background-size: 250% 100%; animation: shop-sheen 7s ease-in-out infinite; }
@keyframes shop-sheen { 0%, 100% { background-position: 120% 0; } 50% { background-position: -20% 0; } }
.shop-hero-text { max-width: 720px; padding-bottom: 34px; }
.shop-eyebrow { display: inline-flex; align-items: center; gap: 10px; margin: 0 0 18px; color: rgba(255, 255, 255, .7); font-size: 12px; font-weight: 700; letter-spacing: .32em; text-transform: uppercase; }
.shop-eyebrow span { width: 34px; height: 1px; background: linear-gradient(90deg, #1e9bf0, #ee3a8f); }
.shop-hero h1 { margin: 0 0 16px; font: 700 clamp(44px, 7vw, 84px)/.95 var(--font-display); letter-spacing: -.045em; animation: shop-rise .9s var(--ease-out) both; }
.shop-hero h1 em { font-style: normal; background: linear-gradient(100deg, #1e9bf0, #7a32e8 45%, #ee3a8f); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: shop-grad 6s ease-in-out infinite; }
@keyframes shop-grad { 50% { background-position: 100% 0; } }
@keyframes shop-rise { from { opacity: 0; transform: translateY(24px); } }
.shop-hero-text > p { max-width: 560px; margin: 0 0 20px; color: rgba(255, 255, 255, .72); font-size: 16px; line-height: 1.65; animation: shop-rise .9s var(--ease-out) both .1s; }
.shop-hero-facts { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; animation: shop-rise .9s var(--ease-out) both .2s; }
.shop-hero-facts li { display: inline-flex; align-items: center; gap: 7px; padding: 7px 14px; border: 1px solid rgba(255, 255, 255, .14); border-radius: 999px; background: rgba(255, 255, 255, .05); font-size: 13px; }
.shop-hero-facts .app-icon { width: 15px; height: 15px; }
.shop-marquee { margin: 0 -40px; padding: 14px 0; overflow: hidden; border-top: 1px solid rgba(255, 255, 255, .08); background: rgba(255, 255, 255, .03); }
.shop-marquee > div { display: flex; gap: 28px; width: max-content; animation: shop-marquee 32s linear infinite; }
.shop-marquee span { color: rgba(255, 255, 255, .55); font: 600 13px var(--font-display); letter-spacing: .34em; white-space: nowrap; }
.shop-marquee b { color: #ee3a8f; font-size: 12px; }
@keyframes shop-marquee { to { transform: translateX(-50%); } }
.shop-closed { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; border-color: rgba(245, 179, 1, .35); }
.shop-closed > .app-icon { width: 22px; height: 22px; flex: none; color: #fbbf24; }

.shop { --g: #121214; display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); gap: 22px; align-items: start; margin-bottom: 22px; }
.shop-stage { position: sticky; top: 84px; display: grid; place-items: center; min-height: 560px; padding: 30px 20px 76px; overflow: hidden; border-radius: 26px; background: radial-gradient(70% 60% at 50% 38%, #2a2440, #0d0b16 70%); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06), 0 40px 70px -40px rgba(0, 0, 0, .9); perspective: 1400px; }
.shop-spot { position: absolute; top: -20%; left: 50%; width: 70%; height: 90%; transform: translateX(-50%); background: radial-gradient(closest-side, rgba(255, 255, 255, .16), transparent); filter: blur(10px); pointer-events: none; }
.shop-stage::after { content: ""; position: absolute; bottom: 64px; left: 50%; width: 52%; height: 24px; transform: translateX(-50%); border-radius: 50%; background: radial-gradient(closest-side, rgba(0, 0, 0, .65), transparent); animation: shop-shadow 6s ease-in-out infinite; }
.shop-flip { position: relative; width: min(100%, 440px); aspect-ratio: 400 / 452; transform-style: preserve-3d; transition: transform 1s cubic-bezier(.7, -.2, .3, 1.2); animation: shop-float 6s ease-in-out infinite; }
.shop-flip.is-back { transform: rotateY(180deg); }
@keyframes shop-float { 50% { translate: 0 -12px; } }
@keyframes shop-shadow { 50% { width: 44%; opacity: .7; } }
.shop-face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.shop-face.is-back { transform: rotateY(180deg); }
.shop-view { display: none; width: 100%; height: 100%; }
.shop-view.is-entering { animation: shop-swap .6s var(--ease-spring) both; }
@keyframes shop-swap { from { opacity: 0; transform: scale(.9) translateY(14px); } }
.garment { display: block; width: 100%; height: 100%; overflow: visible; }
.garment .g-body { fill: var(--g); transition: fill .6s ease; }
.garment .g-cloth { fill: #fff; }
.garment .g-rib { fill: var(--g); transition: fill .6s ease; filter: brightness(.82); }
.garment .g-inner { fill: #000; opacity: .45; }
.garment .g-shade-soft { fill: #000; opacity: .12; }
.garment .g-seam { fill: none; stroke: #000; stroke-opacity: .28; stroke-width: 1.4; stroke-dasharray: 3 3; }
.garment .g-pocket { fill: #000; fill-opacity: .1; stroke: #000; stroke-opacity: .25; stroke-width: 1.4; }
.garment .g-cord { fill: none; stroke: #e5e7eb; stroke-width: 3.2; stroke-linecap: round; opacity: .9; }
.garment .g-tip { fill: #cbd5e1; }
.garment .g-tag { fill: #fff; fill-opacity: .55; font: 700 9px var(--font-display); letter-spacing: .3em; }
.garment .g-neon { filter: drop-shadow(0 0 6px rgba(238, 58, 143, .35)); }
.shop-stage-bar { position: absolute; right: 18px; bottom: 18px; left: 18px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.shop-turn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border: 1px solid rgba(255, 255, 255, .18); border-radius: 999px; color: #fff; background: rgba(255, 255, 255, .08); backdrop-filter: blur(8px); font: 700 13px var(--font-body); cursor: pointer; transition: background .2s ease, transform .2s ease; }
.shop-turn:hover { background: rgba(255, 255, 255, .16); transform: translateY(-2px); }
.shop-turn .app-icon { width: 16px; height: 16px; transition: transform .6s ease; }
.shop-turn.is-on .app-icon { transform: rotate(180deg); }
.shop-color-name { color: rgba(255, 255, 255, .75); font-size: 12px; font-weight: 700; letter-spacing: .24em; text-transform: uppercase; }

.shop-panel { display: grid; gap: 4px; padding: 28px; border: 1px solid var(--panel-line); border-radius: 26px; background: var(--panel); }
.shop-step { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 18px 0 10px; color: var(--on-dark-muted); font-size: 11.5px; font-weight: 800; letter-spacing: .24em; text-transform: uppercase; }
.shop-step:first-of-type { margin-top: 0; }
.shop-step span { color: inherit; letter-spacing: .08em; text-transform: none; font-size: 13px; font-weight: 600; }
.shop-products { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; }
.shop-product { position: relative; display: grid; justify-items: center; gap: 2px; padding: 12px 8px 12px; border: 1.5px solid var(--panel-line); border-radius: 18px; cursor: pointer; text-align: center; transition: border-color .25s ease, transform .25s var(--ease-spring), background .25s ease; }
.shop-product input, .shop-swatch input, .shop-sizes input { position: absolute; opacity: 0; }
.shop-product:hover { transform: translateY(-3px); }
.shop-product-art { width: 74px; height: 84px; margin-bottom: 4px; transition: transform .4s var(--ease-spring); }
.shop-product-art .garment .g-cord, .shop-product-art .garment .g-tag { display: none; }
.shop-product b { font: 700 14px var(--font-display); }
.shop-product small { color: var(--on-dark-muted); font-size: 12.5px; font-weight: 600; }
.shop-product:has(input:checked) { border-color: transparent; background: linear-gradient(var(--panel), var(--panel)) padding-box, linear-gradient(130deg, #1e9bf0, #7a32e8, #ee3a8f) border-box; box-shadow: 0 18px 30px -22px rgba(238, 58, 143, .9); }
.shop-product:has(input:checked) .shop-product-art { transform: scale(1.08) rotate(-3deg); }
.shop-product:has(input:focus-visible) { outline: 2px solid #c4b5fd; outline-offset: 3px; }
.shop-colors { display: flex; flex-wrap: wrap; gap: 12px; }
.shop-swatch { position: relative; cursor: pointer; }
.shop-swatch span { display: block; width: 38px; height: 38px; border-radius: 50%; background: radial-gradient(circle at 32% 28%, rgba(255, 255, 255, .28), transparent 45%), var(--s); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18), 0 6px 14px -6px rgba(0, 0, 0, .6); transition: transform .3s var(--ease-spring), box-shadow .3s ease; }
.shop-swatch:hover span { transform: scale(1.12); }
.shop-swatch input:checked + span { transform: scale(1.12); box-shadow: 0 0 0 3px var(--panel), 0 0 0 5px #ee3a8f, 0 10px 20px -8px rgba(0, 0, 0, .7); }
.shop-swatch input:focus-visible + span { outline: 2px solid #c4b5fd; outline-offset: 6px; }
.shop-sizes { display: flex; flex-wrap: wrap; gap: 8px; }
.shop-sizes label { position: relative; cursor: pointer; }
.shop-sizes b { display: grid; place-items: center; min-width: 54px; height: 46px; padding: 0 14px; border: 1.5px solid var(--panel-line); border-radius: 12px; font: 700 14px var(--font-display); letter-spacing: .06em; transition: all .2s ease; }
.shop-sizes label:hover b { border-color: rgba(238, 58, 143, .5); }
.shop-sizes input:checked + b { border-color: transparent; color: #08070f; background: #fff; box-shadow: 0 10px 22px -12px rgba(255, 255, 255, .7); }
.shop-sizes input:focus-visible + b { outline: 2px solid #c4b5fd; outline-offset: 2px; }
.shop-guide { margin-top: 10px; font-size: 13px; }
.shop-guide summary { cursor: pointer; color: var(--on-dark-muted); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.shop-guide table { width: 100%; margin: 10px 0 6px; border-collapse: collapse; }
.shop-guide th, .shop-guide td { padding: 7px 8px; border-bottom: 1px solid var(--panel-line); text-align: left; }
.shop-guide th { color: var(--on-dark-muted); font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; }
.shop-guide p { margin: 0; color: var(--on-dark-muted); }
.shop-specs { display: grid; gap: 10px; margin: 20px 0 0; padding: 18px 0 0; border-top: 1px solid var(--panel-line); list-style: none; }
.shop-specs li { display: flex; align-items: center; gap: 10px; color: var(--on-dark-muted); font-size: 13.5px; }
.shop-specs .app-icon { width: 17px; height: 17px; flex: none; color: #c4b5fd; }
.shop-buy-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 22px; }
.shop-price { display: grid; margin: 0; }
.shop-price small { color: var(--on-dark-muted); font-size: 11.5px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; }
.shop-price b { font: 800 36px/1.05 var(--font-display); letter-spacing: -.02em; }
.shop-price b.is-bump { animation: shop-bump .5s var(--ease-spring); }
@keyframes shop-bump { 40% { transform: scale(1.12); color: #f9a8d4; } }
.shop-buy { position: relative; display: inline-flex; align-items: center; gap: 12px; padding: 18px 28px; overflow: hidden; border: 0; border-radius: 999px; color: #08070f; background: #fff; font: 800 15px var(--font-display); letter-spacing: .08em; text-transform: uppercase; cursor: pointer; box-shadow: 0 20px 40px -18px rgba(238, 58, 143, .8); transition: transform .25s var(--ease-spring); }
.shop-buy::before { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, rgba(238, 58, 143, .35) 50%, transparent 70%); transform: translateX(-100%); animation: shop-shine 3.2s ease-in-out infinite; }
@keyframes shop-shine { 60%, 100% { transform: translateX(100%); } }
.shop-buy:hover { transform: translateY(-3px) scale(1.02); }
.shop-buy .app-icon { width: 18px; height: 18px; transition: transform .25s ease; }
.shop-buy:hover .app-icon { transform: translateX(4px); }
.shop-buy:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.shop-buy:disabled::before { display: none; }

.shop-photos { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; margin-bottom: 22px; }
.shop-photos figure { position: relative; margin: 0; overflow: hidden; border-radius: 22px; aspect-ratio: 1; }
.shop-photos img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease-out); }
.shop-photos figure:hover img { transform: scale(1.06); }
.shop-photos figcaption { position: absolute; left: 14px; bottom: 14px; padding: 7px 14px; border-radius: 999px; color: #fff; background: rgba(8, 7, 15, .65); backdrop-filter: blur(8px); font-size: 12.5px; font-weight: 700; letter-spacing: .06em; }
.shop-quote { display: grid; place-content: center; gap: 10px; padding: 28px; border-radius: 22px; color: #fff; background: radial-gradient(circle at 80% 0, rgba(238, 58, 143, .4), transparent 55%), radial-gradient(circle at 0 100%, rgba(30, 155, 240, .35), transparent 55%), #0b0a14; }
.shop-quote p { margin: 0; font: 700 clamp(22px, 2.4vw, 30px)/1.2 var(--font-display); letter-spacing: -.02em; }
.shop-quote small { color: rgba(255, 255, 255, .65); }

.shop-orders ul { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.shop-orders li { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; padding: 12px 14px; border: 1px solid var(--panel-line); border-radius: 16px; }
.shop-order-art { width: 54px; height: 62px; flex: none; }
.shop-order-art .g-cord, .shop-order-art .g-tag { display: none; }
.shop-order-main { display: grid; flex: 1; min-width: 180px; }
.shop-order-main small { color: var(--on-dark-muted); font-size: 12px; }
.shop-order-price { font: 800 16px var(--font-display); }
.shop-status { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; font-size: 12px; font-weight: 800; }
.shop-status .app-icon { width: 13px; height: 13px; }
.shop-status.is-paid { color: #4ade80; background: rgba(34, 197, 94, .13); }
.shop-status.is-order { color: #fbbf24; background: rgba(245, 158, 11, .13); }
html.theme-light .shop-sizes input:checked + b { color: #fff; background: #15112c; }
html.theme-light .shop-status.is-paid { color: #15803d; }
html.theme-light .shop-status.is-order { color: #b45309; }
@media (max-width: 1100px) {
  .shop { grid-template-columns: 1fr; }
  .shop-stage { position: relative; top: 0; min-height: 440px; }
}
@media (max-width: 700px) {
  .shop-hero { padding: 30px 20px 0; }
  .shop-marquee { margin: 0 -20px; }
  .shop-panel { padding: 20px; }
  .shop-photos { grid-template-columns: 1fr 1fr; }
  .shop-quote { grid-column: 1 / -1; }
  .shop-buy-row { flex-wrap: wrap; }
  .shop-buy { flex: 1; justify-content: center; }
  .shop-products { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .shop-product { padding: 10px 4px; }
  .shop-product-art { width: 54px; height: 62px; }
  .shop-product b { font-size: 12.5px; }
  .shop-colors { gap: 10px; }
  .shop-swatch span { width: 34px; height: 34px; }
  .shop-photos figcaption { left: 8px; bottom: 8px; padding: 5px 10px; font-size: 11px; }
  .shop-stage { min-height: 380px; }
}
@media (prefers-reduced-motion: reduce) { .shop-hero::before, .shop-marquee > div, .shop-flip, .shop-stage::after, .shop-buy::before, .shop-hero h1 em { animation: none; } .shop-flip { transition: none; } }
/* ---------- Boutique, treasurer side (tresorerie.php) ---------- */
.merch-setup { display: grid; gap: 10px; margin: 14px 0 6px; padding: 18px; border: 1px solid var(--panel-line); border-radius: 18px; background: rgba(236, 72, 153, .04); }
.merch-setup[hidden] { display: none; }
.merch-setup-title { display: flex; align-items: center; gap: 8px; margin: 4px 0 0; font-size: 14px; font-weight: 800; }
.merch-setup-title .app-icon { width: 16px; height: 16px; color: #f472b6; }
.merch-setup-products { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px; }
.merch-setup-product { position: relative; display: grid !important; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 4px 12px; margin: 0 !important; padding: 12px; border: 1.5px solid var(--panel-line); border-radius: 14px; cursor: pointer; transition: border-color .2s ease, opacity .2s ease; }
.merch-setup-product > input[type=checkbox] { position: absolute; top: 10px; right: 10px; width: 18px; height: 18px; accent-color: #ec4899; }
.merch-setup-product:has(> input:checked) { border-color: rgba(236, 72, 153, .7); }
.merch-setup-product:not(:has(> input:checked)) { opacity: .55; }
.merch-setup-art { grid-row: span 2; width: 52px; height: 60px; }
.merch-setup-product b { display: block; font-size: 14px; }
.merch-setup-product small { display: block; color: var(--on-dark-muted); font-size: 12px; font-weight: 500; }
.merch-setup-price { display: flex; align-items: center; gap: 6px; }
.merch-setup-price input { width: 90px !important; min-height: 36px !important; padding: 6px 10px !important; }
.merch-setup-price em { color: var(--on-dark-muted); font-size: 12px; font-style: normal; font-weight: 700; }
.merch-setup-colors { display: flex; flex-wrap: wrap; gap: 8px; }
.merch-setup-colors label { position: relative; display: inline-flex !important; align-items: center; gap: 8px; margin: 0 !important; padding: 6px 12px 6px 6px; border: 1.5px solid var(--panel-line); border-radius: 999px; font-size: 13px; font-weight: 700; cursor: pointer; transition: border-color .2s ease, opacity .2s ease; }
.merch-setup-colors input { position: absolute; opacity: 0; }
.merch-setup-colors i { width: 22px; height: 22px; border-radius: 50%; background: var(--s); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .25); }
.merch-setup-colors label:has(input:checked) { border-color: #ec4899; }
.merch-setup-colors label:not(:has(input:checked)) { opacity: .5; }
.merch-setup-colors label:has(input:focus-visible) { outline: 2px solid #f9a8d4; outline-offset: 2px; }
.merch-art { display: block; flex: none; width: 40px; height: 46px; }
.merch-art .g-cord, .merch-art .g-tag, .merch-setup-art .g-cord, .merch-setup-art .g-tag { display: none; }
.merch-line { display: inline-flex; align-items: center; gap: 10px; }
.merch-sheet-table th:not(:first-child), .merch-sheet-table td:not(:first-child) { width: 64px; text-align: center; }
.merch-sheet-table td.has-qty { color: #f9a8d4; font-weight: 800; font-size: 15px; }
.merch-sheet-table td.is-zero { color: var(--on-dark-muted); opacity: .5; }
.merch-sheet-table tfoot th { padding-top: 12px; border-top: 2px solid var(--panel-line); }
.merch-order-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.merch-order-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; padding: 10px 12px; border: 1px solid var(--panel-line); border-radius: 14px; }
.merch-order-who { display: grid; flex: 1; min-width: 160px; }
.merch-order-who small { color: var(--on-dark-muted); font-size: 12px; }
.merch-order-list .collect-pay { flex-wrap: nowrap; }
.merch-order-list .collect-pay input { width: 84px; }
.merch-order-list em { font-style: normal; font-weight: 800; }
.merch-order-list.is-paid li { background: rgba(34, 197, 94, .04); }
.merch-sub { display: flex; align-items: center; gap: 8px; margin: 22px 0 10px; font-size: 15px; }
.merch-sub .app-icon { width: 16px; height: 16px; color: #4ade80; }
@media (max-width: 700px) {
  .merch-order-list .collect-pay { flex-wrap: wrap; width: 100%; }
  .merch-setup { padding: 12px; }
}.pay-shop { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px 12px; }
.pay-shop .btn .app-icon { width: 15px; height: 15px; }

/* ---------- Forgotten password (login.php, mot-de-passe-oublie.php) ---------- */
.login-pw-label { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-top: 10px; }
.login-pw-label label { margin-top: 0; }
.login-pw-label a, .form-alert a { color: #f3c8ff; font-size: 13.5px; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }
.login-pw-label a:hover, .form-alert a:hover { color: #fff; }
.form-alert { flex-wrap: wrap; }
.reset-card { text-align: left; }
.reset-badge { position: relative; display: grid; place-items: center; width: 64px; height: 64px; margin-bottom: 22px; border-radius: 20px; color: #fff; background: linear-gradient(140deg, #1e9bf0, #7a32e8 55%, #ee3a8f); box-shadow: 0 18px 40px -14px rgba(238, 58, 143, .7); animation: reset-pop .8s var(--ease-spring) both .15s; }
.reset-badge::after { content: ""; position: absolute; inset: -6px; border: 1px solid rgba(197, 107, 255, .45); border-radius: 24px; animation: reset-ring 2.6s ease-out infinite 1s; }
.reset-badge svg { width: 30px; height: 30px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.reset-card.is-invalid .reset-badge { background: linear-gradient(140deg, #f59e0b, #ef4444); box-shadow: 0 18px 40px -14px rgba(239, 68, 68, .7); }
@keyframes reset-pop { from { opacity: 0; transform: scale(.4) rotate(-12deg); } }
@keyframes reset-ring { 0% { opacity: .9; transform: scale(.92); } 100% { opacity: 0; transform: scale(1.35); } }
.reset-steps { display: grid; gap: 12px; margin: 26px 0 0; padding: 0; list-style: none; }
.reset-steps li { display: flex; align-items: flex-start; gap: 14px; padding: 14px 16px; border: 1px solid rgba(255, 255, 255, .1); border-radius: 12px; background: rgba(255, 255, 255, .03); color: rgba(255, 255, 255, .82); font-size: 14.5px; line-height: 1.5; animation: cardIn .6s var(--ease-out) backwards; }
.reset-steps li:nth-child(2) { animation-delay: .08s; }
.reset-steps li:nth-child(3) { animation-delay: .16s; }
.reset-steps b { display: grid; place-items: center; flex: none; width: 26px; height: 26px; border-radius: 50%; background: rgba(197, 107, 255, .2); color: #f3c8ff; font-size: 13px; }
.reset-card a.registration-submit { display: inline-flex; align-items: center; justify-content: center; margin-top: 26px; }
.pw-hint { color: var(--on-dark-muted); font-size: 12.5px; transition: color .25s ease; }
.pw-hint[data-ok="1"] { color: #86efac; }
@media (prefers-reduced-motion: reduce) { .reset-badge, .reset-badge::after, .reset-steps li { animation: none; } }
/* ---------- Change password (profile, espace.php) ---------- */
.pw-change { margin-top: 22px; border: 1px solid var(--panel-line); border-radius: 14px; background: rgba(255, 255, 255, .02); }
.pw-change summary { display: flex; align-items: center; gap: 12px; padding: 14px 16px; cursor: pointer; list-style: none; }
.pw-change summary::-webkit-details-marker { display: none; }
.pw-change summary > span:nth-child(2) { display: grid; flex: 1; min-width: 0; }
.pw-change summary b { font-size: 14.5px; }
.pw-change summary small { overflow: hidden; color: var(--on-dark-muted); font-size: 12.5px; text-overflow: ellipsis; white-space: nowrap; }
.pw-change-icon { display: grid; place-items: center; flex: none; width: 38px; height: 38px; border-radius: 12px; color: #fff; background: linear-gradient(140deg, #1e9bf0, #7a32e8 55%, #ee3a8f); box-shadow: 0 10px 22px -12px rgba(238, 58, 143, .8); }
.pw-change-icon .app-icon { width: 18px; height: 18px; }
.pw-change-chevron .app-icon { width: 18px; height: 18px; color: var(--on-dark-muted); transition: transform .3s var(--ease-out); }
.pw-change[open] .pw-change-chevron .app-icon { transform: rotate(180deg); }
.pw-change summary:hover { background: rgba(255, 255, 255, .03); }
.pw-change summary:focus-visible { outline: 2px solid #c4b5fd; outline-offset: 2px; border-radius: 14px; }
.pw-change form { margin: 0; padding: 0 16px 16px; animation: cardIn .45s var(--ease-out) backwards; }
.pw-change .login-pw-label { margin-top: 4px; }
.pw-change-note { display: flex; align-items: flex-start; gap: 8px; margin: 8px 0 4px; font-size: 12.5px; }
.pw-change-note .app-icon { width: 15px; height: 15px; flex: none; margin-top: 2px; color: #86efac; }
html.theme-light .pw-change { background: rgba(80, 40, 160, .03); }
html.theme-light .login-pw-label a { color: #6d28d9; }
html.theme-light .pw-hint[data-ok="1"] { color: #15803d; }

/* ---------- Home motion ("Connecting minds", js/home-motion.js) ---------- */
/* Only when the <head> script found WebGL and no reduced-motion preference: GSAP takes over the
   hero entrance, the CSS transitions stand by as the fallback. */
.hero-canvas { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; pointer-events: none; opacity: 0; transition: opacity 1.4s var(--ease-out); }
.hero-canvas.is-on { opacity: 1; }
.motion-pro .hero-frame, .motion-pro .hero-particles { display: none; }
.motion-pro .hero-bg > img { opacity: .13; }
.motion-pro .hero-grid { opacity: .55; }
.js.motion-pro .hero-anim, .js.motion-pro.is-loaded .hero-anim { opacity: 0; transform: translateY(24px); filter: blur(6px); transition: none; }
.js.motion-pro.motion-ready .hero-anim { transform: none; filter: none; }
.js.motion-pro .line .word, .js.motion-pro.is-loaded .line .word { transform: none; transition: none; }
.js.motion-pro:not(.motion-ready) .hero h1 { visibility: hidden; }
.motion-pro .hero h1 .line { perspective: 900px; }
.motion-pro .hero h1 .char { display: inline-block; will-change: transform, opacity; }
.motion-pro .hero h1 .text-gradient .char { background-repeat: no-repeat; -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; }
.motion-pro .hero h1 .text-gradient:has(.char) { background: none; animation: none; }
.motion-pro .floating-card { animation: none; }
.motion-pro .hero-visual { pointer-events: none; }
.motion-pro .hero-visual .floating-card { pointer-events: auto; }
.motion-pro .highlights { perspective: 1100px; }
.motion-pro .highlight-card { translate: 0 calc((1 - var(--rise, 1)) * 130px); rotate: x calc((1 - var(--rise, 1)) * 32deg); opacity: calc(.15 + var(--rise, 1) * .85); transform-origin: 50% 100%; }
.motion-pro .ticker { will-change: transform; }

/* Custom cursor: a dot glued to the pointer and a ring that follows with a little delay. */
.has-cursor body, .has-cursor a, .has-cursor button, .has-cursor label, .has-cursor summary { cursor: none; }
.has-cursor input, .has-cursor textarea, .has-cursor select { cursor: text; }
.cursor-dot, .cursor-ring { position: fixed; top: 0; left: 0; z-index: 9999; pointer-events: none; border-radius: 50%; opacity: 0; transition: opacity .3s ease; }
.cursor-on .cursor-dot, .cursor-on .cursor-ring { opacity: 1; }
.cursor-dot { width: 7px; height: 7px; background: #fff; mix-blend-mode: difference; }
.cursor-ring { width: 38px; height: 38px; border: 1.5px solid rgba(255, 255, 255, .55); mix-blend-mode: difference; transition: width .35s var(--ease-out), height .35s var(--ease-out), background .35s ease, border-color .35s ease, opacity .3s ease; }
.cursor-ring.is-link { width: 70px; height: 70px; border-color: transparent; background: rgba(255, 255, 255, .92); }
.cursor-ring.is-text { width: 4px; height: 30px; border-radius: 2px; }
.cursor-ring.is-down { width: 26px; height: 26px; }

/* Kinetic band: two giant lines driven by the scroll. */
.kinetic-band { position: relative; display: grid; gap: 6px; padding: clamp(60px, 9vw, 130px) 0; overflow: hidden; background: var(--night); }
.kinetic-band::before, .kinetic-band::after { content: ""; position: absolute; top: 0; bottom: 0; z-index: 1; width: 12%; pointer-events: none; }
.kinetic-band::before { left: 0; background: linear-gradient(90deg, var(--night), transparent); }
.kinetic-band::after { right: 0; background: linear-gradient(-90deg, var(--night), transparent); }
.kinetic-row { display: flex; align-items: center; gap: .45em; width: max-content; color: #fff; font: 700 clamp(48px, 9.5vw, 150px)/1.02 var(--font-display); letter-spacing: -.045em; white-space: nowrap; text-transform: uppercase; will-change: transform; }
.kinetic-row.is-reverse { margin-left: -10vw; }
.kinetic-row .is-outline { color: transparent; -webkit-text-stroke: 1.5px rgba(255, 255, 255, .55); }
.kinetic-row .is-gradient { background: var(--grad-loop); background-size: 300% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: gradFlow 8s linear infinite; }
.kinetic-row i { flex: none; width: .32em; height: .32em; border-radius: 50%; background: var(--grad); box-shadow: 0 0 30px rgba(238, 58, 143, .6); }
@media (max-width: 1024px) {
  .motion-pro .hero-visual { min-height: 340px; }
}
@media (prefers-reduced-motion: reduce) {
  .kinetic-row .is-gradient { animation: none; }
}
/* ---------- Home retouch: the night lab ---------- */
/* The hero's night continues down the page instead of switching to white template sections.
   Colours come from the same variables, flipped for the home page content only. */
body.home { background: var(--night); }
body.home main {
  --paper: #13102f;
  --soft: #0c0a22;
  --soft-2: #1b1742;
  --ink: #f4f1ff;
  --ink-2: #d9d3ee;
  --muted: #aaa3c6;
  --violet-deep: #c4b5fd;
  --line: rgba(255, 255, 255, .08);
  --line-strong: rgba(255, 255, 255, .16);
  --shadow-sm: 0 10px 30px rgba(0, 0, 0, .3);
  --shadow-md: 0 18px 44px rgba(0, 0, 0, .45);
  --shadow-lg: 0 30px 80px rgba(0, 0, 0, .55);
  --grad-soft: linear-gradient(135deg, rgba(30, 155, 240, .2), rgba(122, 50, 232, .22), rgba(238, 58, 143, .2));
  color: var(--ink);
}
body.home main .section-heading h2 { color: var(--ink); }

/* Breadboard: the "lab" sections carry the dot grid of a prototyping board. */
body.home .section-soft::before {
  background-image: radial-gradient(rgba(196, 181, 253, .16) 1.2px, transparent 1.4px);
  background-size: 24px 24px;
  mask-image: radial-gradient(ellipse 75% 70% at 50% 45%, #000 25%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 75% 70% at 50% 45%, #000 25%, transparent 80%);
}

/* Highlights float over the hero as dark glass, lit by the brand signal on top. */
body.home .highlight-card { border-color: rgba(255, 255, 255, .1); background: rgba(19, 16, 47, .84); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
body.home .highlight-card::after { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: var(--grad); }
body.home .ticker { border-color: rgba(255, 255, 255, .08); }

/* Light islands kept on purpose: partner logos are printed on white, the join button is white. */
body.home .partner-logo { border-color: transparent; background: #fff; }
body.home main .btn-light { color: #160c1f; }
body.home main .btn-light:hover { color: #fff; }
body.home .about-badge { border: 1px solid rgba(255, 255, 255, .14); background: rgba(12, 10, 34, .78); }
body.home .timeline-share { color: #8cc4ff; }
body.home .member-photo::after { background: linear-gradient(180deg, transparent 55%, rgba(8, 6, 25, .55)); }

/* Events: the timeline becomes a circuit trace. Upcoming path dashed, travelled path lit, and each
   pad lights up when the signal reaches it (js/home-motion.js toggles .is-lit). */
body.home .timeline::before { background: repeating-linear-gradient(180deg, rgba(196, 181, 253, .28) 0 8px, transparent 8px 14px); }
body.home .timeline-dot { border: 2px solid rgba(196, 181, 253, .5); background: var(--night); box-shadow: none; transition: background .5s var(--ease-out), border-color .5s ease, box-shadow .5s ease; }
body.home .timeline-item.is-lit .timeline-dot { border-color: #fff; background: var(--grad); box-shadow: 0 0 0 5px rgba(122, 50, 232, .2), 0 0 22px rgba(238, 58, 143, .6); }
body.home .timeline-item article { transition: transform .6s var(--ease-out), box-shadow .6s var(--ease-out), border-color .5s ease; }
body.home .timeline-item.is-lit article { border-color: rgba(196, 181, 253, .28); }

/* Section ledes sit under the title; in the trainings row they align left with it. */
body.home .section-heading .section-intro { margin-top: 14px; }
body.home .section-heading-row .section-intro { margin-left: 0; }
body.home .section-dark .section-intro { color: var(--on-dark-muted); }

/* Phones: the symbol first, shorter text, comfortable tap targets. */
@media (max-width: 760px) {
  body.home .hero { padding-top: 104px; }
  body.home .hero-visual { order: -1; width: 100%; max-width: 360px; margin: 0 auto -10px; }
  body.home.motion-pro .hero-visual { min-height: 300px; }
  body.home .hero-sub { display: none; }
  body.home .hero-inner { gap: 18px; }
  body.home .filter-row button, body.home .discover-tabs button { min-height: 44px; }
  body.home .section-intro { font-size: 15.5px; }
}
/* ---------- HR: engagement score, alerts, decisions (rh.php, engagement.php, reglement.php) ---------- */
.rh-inline-form { display: inline; }
.rh-count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: #f43f5e; color: #fff; font-size: 11.5px; font-style: normal; font-weight: 800; }
.rh-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-bottom: 18px; }
.rh-grid > .app-card { margin: 0; }
.rh-who { display: inline-flex; align-items: center; gap: 12px; min-width: 0; color: inherit; text-decoration: none; }
.rh-who > span { display: grid; min-width: 0; }
.rh-who b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rh-who small { color: var(--on-dark-muted); font-size: 12.5px; }
a.rh-who:hover b { text-decoration: underline; text-underline-offset: 3px; }
.rh-list, .rh-feed, .rh-top, .rh-just, .rh-decisions, .rh-abs, .rh-events, .eng-abs-list, .eng-rank, .eng-earn, .eng-steps, .rh-ladder-steps { margin: 0; padding: 0; list-style: none; }
.rh-list li, .rh-top li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--panel-line); }
.rh-list li:first-child, .rh-top li:first-child { border-top: 0; }
.rh-list .rh-who, .rh-top .rh-who { flex: 1; }
.rh-next { color: #fda4af; font-size: 12.5px; font-weight: 600; text-align: right; }
.rh-score { display: inline-grid; justify-items: center; min-width: 74px; padding: 5px 10px; border: 1px solid currentColor; border-radius: 12px; line-height: 1.1; }
.rh-score b { font: 800 18px var(--font-display); }
.rh-score small { font-size: 10.5px; font-weight: 700; white-space: nowrap; }
.rh-pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border: 1px solid currentColor; border-radius: 999px; font-size: 12px; font-weight: 700; line-height: 1.3; white-space: nowrap; }
.rh-pill .app-icon { width: 13px; height: 13px; }
:is(.rh-pill, .rh-score, .rh-kind).is-green { color: #6ee7a8; background: rgba(34, 197, 94, .08); }
:is(.rh-pill, .rh-score, .rh-kind).is-blue { color: #93c5fd; background: rgba(59, 130, 246, .08); }
:is(.rh-pill, .rh-score, .rh-kind).is-gold { color: #fcd34d; background: rgba(234, 179, 8, .08); }
:is(.rh-pill, .rh-score, .rh-kind).is-orange { color: #fdba74; background: rgba(249, 115, 22, .08); }
:is(.rh-pill, .rh-score, .rh-kind).is-red { color: #fda4af; background: rgba(244, 63, 94, .09); }
.rh-points { display: inline-grid; place-items: center; min-width: 44px; padding: 2px 8px; border-radius: 8px; font: 800 13px var(--font-display); }
.rh-points.is-up { color: #6ee7a8; background: rgba(34, 197, 94, .12); }
.rh-points.is-down { color: #fda4af; background: rgba(244, 63, 94, .12); }
.rh-just li { display: grid; gap: 10px; padding: 14px; border: 1px solid var(--panel-line); border-radius: 14px; }
.rh-just li + li { margin-top: 10px; }
.rh-just-head { display: flex; align-items: center; gap: 10px; }
.rh-just-head span { display: grid; }
.rh-just-head small { color: var(--on-dark-muted); font-size: 12.5px; }
.rh-just blockquote { margin: 0; padding: 10px 14px; border-left: 3px solid #fcd34d; border-radius: 8px; background: rgba(255, 255, 255, .03); font-size: 14px; }
.rh-just-form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.rh-just-form input { flex: 1 1 200px; min-width: 0; }
.rh-feed li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 10px 0; border-top: 1px solid var(--panel-line); }
.rh-feed li:first-child { border-top: 0; }
.rh-feed small { color: var(--on-dark-muted); font-size: 12.5px; }
.rh-feed a { color: inherit; }
:is(.rh-feed, .rh-decisions) li.is-cancelled { opacity: .55; }
.rh-top { counter-reset: top; }
.rh-top li::before { counter-increment: top; content: counter(top); display: grid; place-items: center; flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--grad); color: #fff; font: 800 12.5px var(--font-display); }
.rh-footnote { display: flex; align-items: center; gap: 8px; margin: 0 0 24px; color: var(--on-dark-muted); font-size: 13px; }
.rh-footnote .app-icon { width: 15px; height: 15px; flex: none; }
.rh-count-cell { display: flex; align-items: center; gap: 10px; min-width: 150px; }
.rh-count-cell b { min-width: 16px; font: 800 16px var(--font-display); }
.rh-gauge { position: relative; flex: 1; height: 8px; border-radius: 99px; background: rgba(255, 255, 255, .08); }
.rh-gauge > span { position: absolute; inset: 0 auto 0 0; width: var(--p); border-radius: inherit; background: linear-gradient(90deg, #fbbf24, #f43f5e); }
.rh-gauge i { position: absolute; top: -3px; width: 2px; height: 14px; margin-left: -1px; border-radius: 2px; background: rgba(255, 255, 255, .55); }
.rh-decisions li { display: grid; gap: 8px; padding: 14px 0; border-top: 1px solid var(--panel-line); }
.rh-decisions li:first-child { border-top: 0; }
.rh-decisions p { margin: 0; color: var(--on-dark-muted); font-size: 14.5px; line-height: 1.55; }
.rh-decision-top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.rh-decision-top a { color: inherit; }
.rh-decision-top small { color: var(--on-dark-muted); font-size: 12.5px; }
.rh-cancel summary { width: fit-content; color: #fda4af; font-size: 13px; font-weight: 700; cursor: pointer; }
.rh-cancel form { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.rh-cancel input { flex: 1 1 220px; min-width: 0; }
.rh-cancel-note { display: flex; align-items: center; gap: 6px; font-size: 13px !important; }
.rh-cancel-note .app-icon { width: 14px; height: 14px; flex: none; }
.rh-back { margin-bottom: 14px; }
.rh-file { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 24px; align-items: center; margin-bottom: 18px; padding: 24px; border: 1px solid var(--panel-line); border-radius: 18px; background: var(--panel); }
.rh-file-id { display: flex; align-items: center; gap: 18px; min-width: 0; }
.rh-file-id h2 { margin: 0 0 2px; font-size: 24px; }
.rh-file-facts { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; margin: 12px 0 0; padding: 0; list-style: none; }
.rh-file-facts li { display: grid; line-height: 1.15; }
.rh-file-facts b { font: 800 20px var(--font-display); }
.rh-file-facts small { color: var(--on-dark-muted); font-size: 12px; }
.rh-ladder { display: grid; gap: 12px; }
.rh-ladder p { margin: 0; font-size: 14px; }
.rh-ladder-steps, .eng-steps { display: flex; flex-wrap: wrap; gap: 8px; }
.rh-ladder-steps li, .eng-steps li { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border: 1px solid var(--panel-line); border-radius: 999px; color: var(--on-dark-muted); font-size: 12.5px; font-weight: 600; }
.rh-ladder-steps b, .eng-steps b { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: rgba(255, 255, 255, .08); color: #fff; font: 800 12px var(--font-display); }
.rh-ladder-steps li.is-reached, .eng-steps li.is-reached { border-color: rgba(244, 63, 94, .5); color: #fda4af; }
.rh-ladder-steps li.is-reached b, .eng-steps li.is-reached b { background: #f43f5e; }
.rh-kinds { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 0 0 6px; padding: 0; border: 0; }
.rh-kinds legend { margin-bottom: 8px; font-size: 14px; font-weight: 600; }
.rh-kind { position: relative; margin: 0 !important; border: 1px solid var(--panel-line); border-radius: 12px; background: transparent !important; cursor: pointer; }
.rh-kind input { position: absolute; opacity: 0; }
.rh-kind span { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 2px 10px; padding: 10px 12px; }
.rh-kind .app-icon { grid-row: span 2; width: 20px; height: 20px; }
.rh-kind b { color: var(--fg, #fff); font-size: 14px; }
.rh-kind small { color: var(--on-dark-muted); font-size: 12px; font-weight: 500; }
.rh-kind:has(input:checked) { border-color: currentColor; box-shadow: 0 0 0 1px currentColor inset; }
.rh-kind:has(input:focus-visible) { outline: 2px solid #c4b5fd; outline-offset: 2px; }
.rh-send [data-points-field][hidden] { display: none; }
.rh-abs li, .rh-events li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--panel-line); }
.rh-abs li:first-child, .rh-events li:first-child { border-top: 0; }
.rh-abs li > span { display: grid; flex: 1; min-width: 0; }
.rh-abs small, .rh-events small { color: var(--on-dark-muted); font-size: 12.5px; }
.rh-events li > span:nth-child(2) { flex: 1; min-width: 0; font-size: 14px; }
.rh-sub { margin: 22px 0 8px; font-size: 16px; }

/* Mon engagement */
.eng-top { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: 18px; margin-bottom: 18px; }
.eng-top > .app-card { margin: 0; }
.eng-score { position: relative; overflow: hidden; isolation: isolate; }
.eng-score::before { content: ""; position: absolute; top: -40%; right: -30%; z-index: -1; width: 80%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(closest-side, currentColor, transparent); opacity: .16; }
.eng-score.is-green { color: #6ee7a8; } .eng-score.is-blue { color: #93c5fd; } .eng-score.is-gold { color: #fcd34d; } .eng-score.is-orange { color: #fdba74; } .eng-score.is-red { color: #fda4af; }
.eng-score > *:not(.eng-tier):not(.eng-progress) { color: var(--fg, #fff); }
.eng-score-label { margin: 0; color: var(--on-dark-muted) !important; font-size: 13px; font-weight: 600; }
.eng-score-value { display: flex; align-items: baseline; gap: 10px; margin: 6px 0 4px; }
.eng-score-value b { font: 800 clamp(56px, 7vw, 84px)/1 var(--font-display); letter-spacing: -.04em; }
.eng-score-value span { color: var(--on-dark-muted); font-weight: 600; }
.eng-tier { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 14px; padding: 6px 12px; border: 1px solid currentColor; border-radius: 999px; font-weight: 800; }
.eng-tier .app-icon { width: 16px; height: 16px; }
.eng-progress { height: 8px; margin-bottom: 8px; overflow: hidden; border-radius: 99px; background: rgba(255, 255, 255, .08); }
.eng-progress span { display: block; height: 100%; border-radius: inherit; background: currentColor; transition: width 1s var(--ease-out); }
.eng-earn { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 16px; }
.eng-earn li { padding: 10px 12px; border: 1px solid var(--panel-line); border-radius: 12px; color: var(--on-dark-muted); font-size: 13px; }
.eng-earn b { display: block; color: #6ee7a8; font: 800 18px var(--font-display); }
.eng-earn li.is-down b { color: #fda4af; }
.eng-counter { display: flex; align-items: center; gap: 16px; margin-bottom: 14px; padding: 14px 16px; border: 1px solid var(--panel-line); border-radius: 14px; }
.eng-counter b { font: 800 44px/1 var(--font-display); }
.eng-counter span { font-size: 14.5px; line-height: 1.5; }
.eng-counter.is-close { border-color: rgba(244, 63, 94, .5); background: rgba(244, 63, 94, .08); }
.eng-counter.is-close b { color: #fda4af; }
.eng-steps { margin-bottom: 16px; }
.eng-abs-list li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 14px; padding: 12px 0; border-top: 1px solid var(--panel-line); }
.eng-abs-list li > div { display: grid; }
.eng-abs-list small { color: var(--on-dark-muted); font-size: 12.5px; }
.eng-justify { flex-basis: 100%; }
.eng-justify summary { display: inline-flex; align-items: center; gap: 6px; width: fit-content; color: #c4b5fd; font-size: 13.5px; font-weight: 700; cursor: pointer; }
.eng-justify summary .app-icon { width: 15px; height: 15px; }
.eng-justify form { margin-top: 8px; }
.eng-tip { display: flex; align-items: flex-start; gap: 8px; margin: 14px 0 0; color: var(--on-dark-muted); font-size: 13px; }
.eng-tip .app-icon { width: 15px; height: 15px; flex: none; margin-top: 2px; }
.eng-rank li { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 12px; }
.eng-rank li + li { margin-top: 2px; }
.eng-rank li.is-me { background: rgba(122, 50, 232, .16); box-shadow: inset 0 0 0 1px rgba(196, 181, 253, .35); }
.eng-rank li.is-outside { margin-top: 10px; }
.eng-rank-pos { display: grid; place-items: center; flex: none; width: 28px; height: 28px; border-radius: 50%; background: rgba(255, 255, 255, .07); font: 800 13px var(--font-display); }
.eng-rank li:nth-child(1) .eng-rank-pos { background: linear-gradient(135deg, #fde68a, #f59e0b); color: #3b2300; }
.eng-rank li:nth-child(2) .eng-rank-pos { background: linear-gradient(135deg, #e5e7eb, #9ca3af); color: #1f2937; }
.eng-rank li:nth-child(3) .eng-rank-pos { background: linear-gradient(135deg, #fdba74, #c2410c); color: #fff; }
.eng-rank-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.eng-rank-name small { color: var(--on-dark-muted); }
.eng-rank b { font: 800 16px var(--font-display); }

/* Règlement */
.rules { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 18px; align-items: start; }
.rules-toc { position: sticky; top: 90px; margin: 0; }
.rules-toc p { margin: 0 0 8px; color: var(--on-dark-muted); font-size: 13px; font-weight: 700; }
.rules-toc ol { display: grid; gap: 2px; margin: 0; padding-left: 22px; }
.rules-toc a { display: block; padding: 4px 0; color: inherit; font-size: 14px; text-decoration: none; }
.rules-toc a:hover { color: #c4b5fd; }
.rules-body { display: grid; gap: 14px; }
.rules-article { margin: 0; scroll-margin-top: 90px; }
.rules-article h2 { display: grid; gap: 2px; margin: 0 0 12px; font-size: 21px; }
.rules-article h2 span { color: #c4b5fd; font-size: 13px; font-weight: 700; }
.rules-article ul { display: grid; gap: 10px; margin: 0; padding-left: 20px; max-width: 72ch; }
.rules-article li { color: var(--on-dark-muted); line-height: 1.65; }
.rules-article li::marker { color: #c4b5fd; }

html.theme-light :is(.rh-pill, .rh-score, .rh-kind).is-green { color: #15803d; }
html.theme-light :is(.rh-pill, .rh-score, .rh-kind).is-blue { color: #1d4ed8; }
html.theme-light :is(.rh-pill, .rh-score, .rh-kind).is-gold { color: #a16207; }
html.theme-light :is(.rh-pill, .rh-score, .rh-kind).is-orange { color: #c2410c; }
html.theme-light :is(.rh-pill, .rh-score, .rh-kind).is-red, html.theme-light .rh-next, html.theme-light .rh-cancel summary { color: #be123c; }
html.theme-light :is(.rh-gauge, .eng-progress) { background: rgba(30, 20, 60, .1); }
html.theme-light :is(.rh-ladder-steps, .eng-steps) b { background: rgba(30, 20, 60, .1); color: #1d1530; }
html.theme-light .eng-score.is-green { color: #15803d; } html.theme-light .eng-score.is-blue { color: #1d4ed8; } html.theme-light .eng-score.is-gold { color: #a16207; } html.theme-light .eng-score.is-orange { color: #c2410c; } html.theme-light .eng-score.is-red { color: #be123c; }

@media (max-width: 900px) {
  .rh-grid, .eng-top, .rh-file, .rules { grid-template-columns: 1fr; }
  .rules-toc { position: static; }
}
@media (max-width: 560px) {
  .rh-kinds, .eng-earn { grid-template-columns: 1fr; }
  .rh-list li { flex-wrap: wrap; }
  .rh-next { order: 3; flex-basis: 100%; text-align: left; }
  .rh-file { padding: 18px; }
  .rh-file-id { align-items: flex-start; }
}
/* ---------- Club market (boutique.php): aisles, catalogue, product sheet, cart, order steps ---------- */
.mk-nav { position: sticky; top: 74px; z-index: 30; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 22px; padding: 10px; border: 1px solid var(--panel-line); border-radius: 18px; background: rgba(13, 11, 30, .82); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.mk-chip { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border: 1px solid var(--panel-line); border-radius: 999px; background: transparent; color: var(--on-dark-muted); font: 700 13px var(--font-body); text-decoration: none; cursor: pointer; transition: color .2s, border-color .2s, background .2s; }
.mk-chip .app-icon { width: 16px; height: 16px; }
.mk-chip em { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: rgba(255, 255, 255, .08); font-size: 11px; font-style: normal; }
.mk-chip:hover { color: #fff; border-color: rgba(196, 181, 253, .45); }
.mk-chip.is-active { color: #fff; border-color: transparent; background: var(--grad); }
.mk-chip.is-active em { background: rgba(0, 0, 0, .2); }
.mk-search { display: flex; flex: 1 1 200px; align-items: center; gap: 8px; min-width: 0; margin: 0 !important; padding: 0 12px; border: 1px solid var(--panel-line); border-radius: 999px; }
.mk-search .app-icon { width: 16px; height: 16px; flex: none; color: var(--on-dark-muted); }
.mk-search input { flex: 1; min-width: 0; min-height: 38px !important; padding: 0 !important; border: 0 !important; background: transparent !important; box-shadow: none !important; }
.mk-head { margin: 34px 0 16px; scroll-margin-top: 150px; }
.mk-head h2 { margin: 0 0 6px; font: 700 clamp(26px, 3vw, 36px)/1.1 var(--font-display); letter-spacing: -.03em; }
.mk-head p { max-width: 64ch; margin: 0; color: var(--on-dark-muted); }
.mk-section { scroll-margin-top: 150px; margin-bottom: 26px; }
.mk-empty { display: flex; align-items: center; gap: 10px; }
.mk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.mk-card { position: relative; display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--panel-line); border-radius: 20px; background: var(--panel); transition: border-color .3s ease, transform .4s var(--ease-out); }
.mk-card[hidden] { display: none; }
.mk-card:hover { border-color: rgba(196, 181, 253, .35); transform: translateY(-4px); }
.mk-card.is-featured { border-color: rgba(238, 58, 143, .45); }
.mk-card-open { position: relative; display: block; width: 100%; padding: 0; border: 0; background: radial-gradient(circle at 50% 35%, #2a2350, #120f2b 75%); cursor: zoom-in; }
.mk-visual { display: grid; place-items: center; aspect-ratio: 4 / 3; overflow: hidden; }
.mk-visual img { width: 100%; height: 100%; object-fit: cover; }
.mk-art { width: 86%; height: auto; transition: transform .6s var(--ease-out); }
.mk-card:hover .mk-art { transform: translateY(-4px) scale(1.04); }
.mk-flag { position: absolute; top: 12px; left: 12px; padding: 4px 10px; border-radius: 999px; background: var(--grad); color: #fff; font-size: 11.5px; font-weight: 800; }
.mk-card-body { display: flex; flex: 1; flex-direction: column; gap: 6px; padding: 16px; }
.mk-cat { margin: 0; color: #c4b5fd; font-size: 12px; font-weight: 700; }
.mk-card h3 { margin: 0; font-size: 17px; line-height: 1.3; }
.mk-summary { margin: 0; color: var(--on-dark-muted); font-size: 13.5px; line-height: 1.5; }
.mk-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 8px; }
.mk-price { font: 800 20px var(--font-display); }
.mk-add { justify-content: center; margin-top: 8px; }
.mk-add:disabled { opacity: .5; cursor: not-allowed; }
.mk-dialog { width: min(760px, calc(100% - 32px)); max-height: calc(100% - 40px); padding: 0; overflow: auto; border: 1px solid var(--panel-line); border-radius: 22px; background: #110e27; color: #fff; }
.mk-dialog::backdrop { background: rgba(4, 3, 12, .7); backdrop-filter: blur(4px); }
.mk-dialog[open] { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); animation: mk-pop .35s var(--ease-out); }
@keyframes mk-pop { from { opacity: 0; transform: translateY(16px) scale(.98); } }
.mk-dialog-visual { display: grid; place-items: center; min-height: 280px; background: radial-gradient(circle at 50% 35%, #2a2350, #120f2b 75%); }
.mk-dialog-visual .mk-art { width: 90%; }
.mk-dialog-visual img { width: 100%; height: 100%; object-fit: cover; }
.mk-dialog-body { display: flex; flex-direction: column; gap: 10px; padding: 26px; }
.mk-dialog-body h2 { margin: 0; font-size: 24px; }
.mk-dialog-more p { margin: 0 0 10px; color: var(--on-dark-muted); line-height: 1.6; }
.mk-specs { display: grid; gap: 0; margin: 0; border-top: 1px solid var(--panel-line); }
.mk-specs div { display: flex; justify-content: space-between; gap: 14px; padding: 8px 0; border-bottom: 1px solid var(--panel-line); font-size: 13.5px; }
.mk-specs dt { color: var(--on-dark-muted); }
.mk-specs dd { margin: 0; font-weight: 600; text-align: right; }
.mk-x { position: absolute; top: 12px; right: 12px; z-index: 2; display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid var(--panel-line); border-radius: 50%; background: rgba(8, 6, 25, .7); color: #fff; cursor: pointer; }
.mk-x .app-icon { width: 18px; height: 18px; }
.mk-cart-btn { position: fixed; right: 24px; bottom: 92px; z-index: 60; display: inline-flex; align-items: center; gap: 10px; padding: 12px 16px; border: 0; border-radius: 999px; background: var(--grad); color: #fff; font: 800 14px var(--font-body); box-shadow: 0 18px 40px -14px rgba(238, 58, 143, .8); cursor: pointer; transition: transform .3s var(--ease-out); }
.mk-cart-btn .app-icon { width: 20px; height: 20px; }
.mk-cart-btn b { display: inline-grid; place-items: center; min-width: 24px; height: 24px; padding: 0 6px; border-radius: 999px; background: #fff; color: #5b21b6; font-size: 12.5px; }
.mk-cart-btn:not(.has-items) b { background: rgba(255, 255, 255, .25); color: #fff; }
.mk-cart-btn:hover { transform: translateY(-3px); }
.mk-cart-btn.is-bump { animation: mk-bump .5s var(--ease-spring); }
@keyframes mk-bump { 40% { transform: scale(1.12); } }
.mk-backdrop { position: fixed; inset: 0; z-index: 70; background: rgba(4, 3, 12, .6); opacity: 0; transition: opacity .3s ease; }
.mk-backdrop.is-open { opacity: 1; }
.mk-cart { position: fixed; top: 0; right: 0; bottom: 0; z-index: 71; display: flex; flex-direction: column; width: min(420px, 100%); padding: 22px; overflow-y: auto; border-left: 1px solid var(--panel-line); background: #0f0c25; transform: translateX(100%); transition: transform .4s var(--ease-out); }
.mk-cart.is-open { transform: none; }
.mk-cart[hidden], .mk-backdrop[hidden] { display: none; }
.mk-cart-head { position: relative; display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.mk-cart-head h2 { margin: 0; font-size: 22px; }
.mk-cart-head .mk-x { position: static; }
.mk-cart-list { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.mk-cart-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 6px 12px; padding: 12px 0; border-bottom: 1px solid var(--panel-line); }
.mk-cart-name { display: grid; grid-column: 1 / -1; font-weight: 700; }
.mk-cart-name small { color: var(--on-dark-muted); font-size: 12.5px; font-weight: 500; }
.mk-qty { display: inline-flex; align-items: center; gap: 4px; }
.mk-qty button { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid var(--panel-line); border-radius: 10px; background: transparent; color: #fff; font-size: 18px; cursor: pointer; }
.mk-qty button:disabled { opacity: .35; cursor: not-allowed; }
.mk-qty b { min-width: 28px; text-align: center; }
.mk-line { text-align: right; }
.mk-cart-foot { display: grid; gap: 8px; margin-top: auto; padding-top: 16px; }
.mk-cart-foot[hidden] { display: none; }
.mk-cart-foot label { font-size: 14px; font-weight: 600; }
.mk-cart-foot label span { color: var(--on-dark-muted); font-weight: 500; }
.mk-total { display: flex; align-items: baseline; justify-content: space-between; margin: 8px 0 4px; font-size: 15px; }
.mk-total b { font: 800 26px var(--font-display); }
.mk-cart-foot .btn { justify-content: center; }
.mk-cart-foot small { color: var(--on-dark-muted); font-size: 12px; text-align: center; }
.mk-orders { display: grid; gap: 12px; margin: 0 0 14px; padding: 0; list-style: none; }
.mk-orders li { display: grid; gap: 10px; padding: 16px; border: 1px solid var(--panel-line); border-radius: 16px; }
.mk-orders li.is-cancelled { opacity: .55; }
.mk-order-top { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; }
.mk-order-top small { flex: 1; color: var(--on-dark-muted); font-size: 12.5px; }
.mk-order-items { margin: 0; color: var(--on-dark-muted); font-size: 14px; }
.mk-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin: 0; padding: 0; list-style: none; counter-reset: none; }
.mk-steps li { position: relative; display: grid; justify-items: center; gap: 6px; padding: 0; border: 0; color: var(--on-dark-muted); font-size: 12px; font-weight: 600; text-align: center; }
.mk-steps li::before { content: ""; position: absolute; top: 15px; left: -50%; width: 100%; height: 2px; background: var(--panel-line); }
.mk-steps li:first-child::before { display: none; }
.mk-steps .app-icon { position: relative; z-index: 1; box-sizing: content-box; width: 16px; height: 16px; padding: 7px; border: 1px solid var(--panel-line); border-radius: 50%; background: #0f0c25; }
.mk-steps li.is-done, .mk-steps li.is-current { color: #fff; }
.mk-steps li.is-done .app-icon { border-color: transparent; background: #22c55e; color: #fff; }
.mk-steps li.is-current .app-icon { border-color: transparent; background: var(--grad); color: #fff; box-shadow: 0 0 0 5px rgba(122, 50, 232, .2); }
.mk-steps li.is-done::before, .mk-steps li.is-current::before { background: #22c55e; }
html.theme-light .mk-nav { background: rgba(255, 255, 255, .86); }
html.theme-light :is(.mk-dialog, .mk-cart) { background: #fff; color: #1d1530; }
html.theme-light :is(.mk-qty button, .mk-x) { color: #1d1530; background: #fff; }
html.theme-light .mk-steps .app-icon { background: #fff; }
@media (max-width: 760px) {
  .mk-nav { top: 62px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .mk-nav::-webkit-scrollbar { display: none; }
  .mk-chip { flex: none; }
  .mk-search { flex: 0 0 200px; }
  .mk-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .mk-card-body { padding: 12px; }
  .mk-card h3 { font-size: 15px; }
  .mk-summary { display: none; }
  .mk-card-foot { flex-wrap: wrap; }
  .mk-price { font-size: 17px; }
  .mk-add { gap: 6px; padding-inline: 10px; }
  .mk-add-long { display: none; }
  .mk-dialog[open] { grid-template-columns: 1fr; }
  .mk-dialog-visual { min-height: 200px; }
  .mk-cart-btn { right: 16px; }
  .mk-cart-btn span { display: none; }
}
@media (max-width: 960px) { .mk-cart-btn { bottom: calc(96px + env(safe-area-inset-bottom)); } }
@media (prefers-reduced-motion: reduce) { .mk-cart, .mk-backdrop { transition: none; } .mk-dialog[open], .mk-cart-btn.is-bump { animation: none; } }
/* ---------- Treasury: shop orders and catalogue ---------- */
.sales-tabs { margin: 4px 0 14px; }
.sales-form .registration-form { max-width: 880px; }
.sales-orders { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.sales-order { display: grid; grid-template-columns: minmax(180px, 1.1fr) minmax(0, 1.6fr) auto; align-items: start; gap: 12px 18px; padding: 14px 16px; border: 1px solid var(--panel-line); border-left: 3px solid #f97316; border-radius: 14px; }
.sales-order.is-payee { border-left-color: #3b82f6; }
.sales-order.is-prete, .sales-order.is-retiree { border-left-color: #22c55e; }
.sales-order.is-annulee { border-left-color: #f43f5e; opacity: .65; }
.sales-order-who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.sales-order-who span { display: grid; min-width: 0; }
.sales-order-who small { color: var(--on-dark-muted); font-size: 12.5px; }
.sales-order-items { display: grid; gap: 3px; margin: 0; padding: 0; list-style: none; font-size: 14px; }
.sales-order-items small { color: var(--on-dark-muted); }
.sales-order-note { display: flex; align-items: center; gap: 6px; color: var(--on-dark-muted); font-style: italic; }
.sales-order-note .app-icon { width: 14px; height: 14px; }
.sales-order-side { display: grid; justify-items: end; gap: 6px; text-align: right; }
.sales-order-side strong { font: 800 18px var(--font-display); }
.sales-order-actions { display: flex; flex-wrap: wrap; grid-column: 1 / -1; align-items: center; gap: 8px; padding-top: 10px; border-top: 1px dashed var(--panel-line); }
.sales-order-actions form { margin: 0; }
.sales-order-actions .collect-pay { display: flex; gap: 6px; }
.sales-item { display: flex; align-items: center; gap: 12px; }
.sales-item > span:last-child { display: grid; }
.sales-thumb { display: grid; flex: none; place-items: center; width: 58px; height: 44px; overflow: hidden; border-radius: 10px; background: radial-gradient(circle at 50% 35%, #2a2350, #120f2b 75%); }
.sales-thumb img { width: 100%; height: 100%; object-fit: cover; }
.sales-thumb .mk-art { width: 100%; }
.sales-table tr.is-off { opacity: .55; }
.sales-stock { display: inline-flex; align-items: center; gap: 4px; margin: 0 8px 4px 0; }
.sales-stock input { flex: none; width: 72px !important; min-height: 32px !important; padding: 4px 8px !important; text-align: center; }
@media (max-width: 900px) {
  .sales-order { grid-template-columns: minmax(0, 1fr) auto; }
  .sales-order-items { grid-column: 1 / -1; grid-row: 2; }
  .sales-order-actions .collect-pay { flex: 1 1 100%; }
}
@media (max-width: 600px) {
  .sales-order { grid-template-columns: minmax(0, 1fr); }
  .sales-order-items { grid-row: auto; }
  .sales-order-side { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; text-align: left; }
}
/* ==========================================================================
   NEXUS Market (market.php): public shop window, apparel drop and electronics lab
   ========================================================================== */
body.market-page { color: #fff; background: var(--night); }
.market-page .section-intro { color: var(--on-dark-muted); }
.market-page .section-heading-row { flex-wrap: wrap; gap: 26px; }
.market-page .section-heading-row .section-intro { margin-left: 0; }
.market-page .section-heading-row > * { min-width: 0; }
.mkt-label { display: inline-flex; align-items: center; gap: 12px; color: #c4b5fd; font: 600 12.5px var(--font-display); letter-spacing: .24em; text-transform: uppercase; }
.mkt-label::before { content: ""; width: 28px; height: 1px; background: var(--grad); }
.section-heading:not(.section-heading-row) .mkt-label { justify-content: center; }

.mkt-hero { position: relative; isolation: isolate; overflow: hidden; padding: 168px 0 96px; color: #fff; }
.mkt-hero-inner { position: relative; z-index: 2; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); align-items: center; gap: 40px; }
.mkt-kicker { display: inline-flex; align-items: center; gap: 10px; margin: 26px 0 0; padding: 7px 15px; border: 1px solid rgba(255, 255, 255, .14); border-radius: 999px; background: rgba(255, 255, 255, .05); font: 600 12px var(--font-display); letter-spacing: .2em; text-transform: uppercase; }
.mkt-kicker span { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 4px rgba(34, 197, 94, .22); animation: mkt-pulse 2.2s ease-in-out infinite; }
.mkt-hero h1 { margin: 22px 0; font-size: clamp(46px, 5.6vw, 88px); letter-spacing: -.05em; line-height: .96; }
.mkt-lead { max-width: 540px; margin: 0; color: rgba(255, 255, 255, .76); font-size: 18px; line-height: 1.65; }
.mkt-hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }
.mkt-hero-facts { display: flex; flex-wrap: wrap; gap: 38px; margin: 42px 0 0; padding: 22px 0 0; list-style: none; border-top: 1px solid rgba(255, 255, 255, .1); }
.mkt-hero-facts li { display: grid; gap: 4px; }
.mkt-hero-facts b { font: 700 26px var(--font-display); letter-spacing: -.02em; }
.mkt-hero-facts span { color: var(--on-dark-muted); font-size: 12px; letter-spacing: .16em; text-transform: uppercase; }
.mkt-hero-visual { position: relative; justify-self: center; width: 100%; max-width: 560px; aspect-ratio: 1; }
.mkt-halo { position: absolute; inset: 10%; border-radius: 50%; background: conic-gradient(from 0deg, #1e9bf0, #7a32e8, #ee3a8f, #1e9bf0); filter: blur(70px); opacity: .42; animation: mkt-spin 18s linear infinite; }
.mkt-hero-piece { position: absolute; }
.mkt-hero-piece.is-front { inset: 6% 6% 2% 12%; animation: mkt-float 7s ease-in-out infinite; }
.mkt-hero-piece.is-back { --g: #1b2440; inset: 22% 50% 20% -4%; opacity: .55; transform: rotate(-12deg); }
.mkt-chip-float { position: absolute; display: inline-flex; align-items: center; gap: 9px; padding: 10px 15px; border: 1px solid rgba(255, 255, 255, .16); border-radius: 999px; background: rgba(15, 12, 41, .62); box-shadow: 0 20px 40px -20px rgba(0, 0, 0, .8); font-size: 13px; font-weight: 600; white-space: nowrap; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); animation: mkt-float 6s ease-in-out infinite; }
.mkt-chip-float i { width: 8px; height: 8px; border-radius: 50%; background: var(--grad); }
.mkt-chip-float.is-a { top: 14%; right: 0; animation-delay: -2s; }
.mkt-chip-float.is-b { right: -2%; bottom: 26%; animation-delay: -4s; }
.mkt-chip-float.is-c { bottom: 10%; left: 6%; }
@keyframes mkt-float { 50% { translate: 0 -14px; } }
@keyframes mkt-spin { to { rotate: 1turn; } }
@keyframes mkt-pulse { 50% { box-shadow: 0 0 0 8px rgba(34, 197, 94, 0); } }

.mkt-ticker { margin-top: 0; border-color: rgba(255, 255, 255, .08); background: rgba(255, 255, 255, .02); }
.mkt-ticker span { color: rgba(255, 255, 255, .85); font-size: 18px; letter-spacing: .1em; text-transform: uppercase; }

.mkt-drop { padding-top: 110px; }
.mkt-soon { margin: 0; padding: 12px 18px; border: 1px dashed rgba(255, 255, 255, .22); border-radius: 14px; color: var(--on-dark-muted); }
.mkt-pieces { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.market-page .mkt-piece { display: flex; flex-direction: column; overflow: hidden; border: 1px solid rgba(255, 255, 255, .08); border-radius: 26px; background: linear-gradient(180deg, rgba(255, 255, 255, .045), rgba(255, 255, 255, .01)); transition: opacity .9s var(--ease-out), transform 1s var(--ease-out), translate .6s var(--ease-out), border-color .4s ease, box-shadow .6s ease; transition-delay: var(--stagger, 0ms), var(--stagger, 0ms), 0s, 0s, 0s; }
.market-page .mkt-piece:hover { translate: 0 -6px; border-color: rgba(196, 181, 253, .35); box-shadow: 0 40px 80px -40px rgba(122, 50, 232, .6); }
.market-page .mkt-piece.is-hero { border-color: rgba(238, 58, 143, .45); }
.mkt-piece-stage { position: relative; display: grid; place-items: center; aspect-ratio: 1; padding: 40px 36px 66px; background: radial-gradient(70% 60% at 50% 40%, #2a2440, #0d0b16 72%); perspective: 1200px; }
.mkt-piece-stage::after { content: ""; position: absolute; bottom: 52px; left: 50%; width: 50%; height: 20px; transform: translateX(-50%); border-radius: 50%; background: radial-gradient(closest-side, rgba(0, 0, 0, .7), transparent); }
.mkt-piece-tag { position: absolute; top: 18px; left: 18px; z-index: 2; padding: 6px 12px; border-radius: 999px; background: rgba(255, 255, 255, .08); font: 600 11px var(--font-display); letter-spacing: .18em; text-transform: uppercase; }
.mkt-piece.is-hero .mkt-piece-tag { background: var(--grad); }
.mkt-flip { position: relative; z-index: 1; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform 1s var(--ease-out); }
.mkt-piece.is-turned .mkt-flip { transform: rotateY(180deg); }
.mkt-face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.mkt-face.is-back { transform: rotateY(180deg); }
.mkt-face .garment { transition: scale .8s var(--ease-out); }
.mkt-piece:hover .mkt-face .garment { scale: 1.04; }
.mkt-turn { position: absolute; right: 16px; bottom: 16px; z-index: 2; display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border: 1px solid rgba(255, 255, 255, .16); border-radius: 999px; background: rgba(8, 6, 25, .55); color: #fff; font: 600 13px var(--font-body); cursor: pointer; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.mkt-turn:hover { border-color: rgba(255, 255, 255, .4); }
.mkt-turn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: rotate .6s var(--ease-out); }
.mkt-piece.is-turned .mkt-turn svg { rotate: -180deg; }
.mkt-piece-body { display: flex; flex: 1; flex-direction: column; gap: 10px; padding: 22px 24px 24px; }
.mkt-piece-top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.mkt-piece-top h3 { margin: 0; font-size: 24px; letter-spacing: -.025em; }
.mkt-piece-top b { font: 700 22px var(--font-display); white-space: nowrap; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.mkt-piece-fabric { margin: 0; color: rgba(255, 255, 255, .86); font-size: 14.5px; }
.mkt-piece-print { margin: 0; color: var(--on-dark-muted); font-size: 13.5px; line-height: 1.5; }
.mkt-swatches { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; margin-top: 6px; }
.mkt-swatches i { width: 18px; height: 18px; border: 2px solid rgba(255, 255, 255, .22); border-radius: 50%; background: var(--s); }
.mkt-swatches small { margin-left: 4px; color: var(--on-dark-muted); font-size: 12.5px; }
.mkt-sizes { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 14px; }
.mkt-sizes span { min-width: 38px; padding: 5px 8px; border: 1px solid rgba(255, 255, 255, .12); border-radius: 8px; color: rgba(255, 255, 255, .82); font: 600 12px var(--font-display); text-align: center; }
.mkt-piece-cta { justify-content: center; margin-top: auto; }


.mkt-filters { display: flex; flex-wrap: wrap; gap: 8px; }
.mkt-filters button { display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border: 1px solid rgba(255, 255, 255, .12); border-radius: 999px; background: transparent; color: var(--on-dark-muted); font: 600 13.5px var(--font-body); cursor: pointer; transition: color .25s, border-color .25s, background .25s; }
.mkt-filters button:hover { color: #fff; border-color: rgba(196, 181, 253, .4); }
.mkt-filters button[aria-pressed="true"] { color: #fff; border-color: transparent; background: var(--grad); }
.mkt-filters em { font-style: normal; opacity: .75; }
.mkt-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.mkt-item { position: relative; display: flex; flex-direction: column; overflow: hidden; border: 1px solid rgba(255, 255, 255, .08); border-radius: 22px; background: rgba(255, 255, 255, .025); transition: translate .5s var(--ease-out), border-color .4s ease; animation: mkt-in .6s var(--ease-out) backwards; }
.mkt-item[hidden] { display: none; }
.mkt-item:hover { translate: 0 -5px; border-color: rgba(196, 181, 253, .3); }
.mkt-item.is-featured { border-color: rgba(238, 58, 143, .35); }
@keyframes mkt-in { from { opacity: 0; translate: 0 14px; } }
.mkt-item-visual { position: relative; display: grid; place-items: center; aspect-ratio: 4 / 3; background: radial-gradient(circle at 50% 35%, #2a2350, #120f2b 75%); }
.mkt-item-visual img { width: 100%; height: 100%; object-fit: cover; }
.mkt-item:hover .mk-art { transform: translateY(-4px) scale(1.05); }
.mkt-item-flag { position: absolute; top: 12px; left: 12px; padding: 4px 10px; border-radius: 999px; background: var(--grad); font: 700 10.5px var(--font-display); letter-spacing: .16em; text-transform: uppercase; }
.mkt-item-body { display: flex; flex: 1; flex-direction: column; gap: 6px; padding: 16px 18px 18px; }
.mkt-item-body small { color: #c4b5fd; font-size: 11.5px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }
.mkt-item-body h3 { margin: 0; font-size: 17px; line-height: 1.3; }
.mkt-item-body p { margin: 0; color: var(--on-dark-muted); font-size: 13.5px; line-height: 1.5; }
.mkt-item-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 10px; }
.mkt-item-foot b { font: 700 19px var(--font-display); }
.mkt-stock { padding: 4px 10px; border: 1px solid currentColor; border-radius: 999px; font-size: 11.5px; font-weight: 700; white-space: nowrap; }
.mkt-stock.is-blue { color: #93c5fd; }
.mkt-stock.is-green { color: #6ee7a8; }
.mkt-stock.is-orange { color: #fdba74; }
.mkt-stock.is-red { color: #fda4af; }
.mkt-lab-cta { display: flex; justify-content: center; margin-top: 46px; }
.mkt-empty { padding: 30px; border: 1px dashed rgba(255, 255, 255, .2); border-radius: 20px; color: var(--on-dark-muted); text-align: center; }

.mkt-how { padding-top: 40px; }
.mkt-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin: 0; padding: 0; list-style: none; }
.mkt-steps li { position: relative; overflow: hidden; padding: 30px; border: 1px solid rgba(255, 255, 255, .08); border-radius: 22px; background: rgba(255, 255, 255, .025); }
.mkt-step-num { display: table; margin-bottom: 24px; font: 700 54px/1 var(--font-display); letter-spacing: -.04em; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.mkt-steps h3 { margin: 0 0 8px; font-size: 21px; }
.mkt-steps p { margin: 0; color: var(--on-dark-muted); line-height: 1.6; }
.mkt-band { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; margin-top: 40px; padding: 34px 38px; border: 1px solid rgba(255, 255, 255, .1); border-radius: 26px; background: radial-gradient(60% 140% at 0% 0%, rgba(30, 155, 240, .3), transparent 60%), radial-gradient(60% 140% at 100% 100%, rgba(238, 58, 143, .35), transparent 60%), #15113a; }
.mkt-band h3 { margin: 0 0 6px; font-size: clamp(24px, 2.4vw, 32px); letter-spacing: -.03em; }
.mkt-band p { margin: 0; color: rgba(255, 255, 255, .75); }
.mkt-band-actions { display: flex; flex-wrap: wrap; gap: 12px; }

@media (max-width: 1100px) { .mkt-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 960px) {
  .mkt-hero { padding: 120px 0 56px; }
  .mkt-hero-inner { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .mkt-hero-visual { max-width: 400px; }
  .mkt-pieces { display: flex; gap: 14px; margin-inline: calc(var(--gutter) * -1); padding: 4px var(--gutter) 18px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: var(--gutter); scrollbar-width: none; }
  .mkt-pieces::-webkit-scrollbar { display: none; }
  .market-page .mkt-piece { flex: 0 0 min(84%, 360px); scroll-snap-align: start; }
  .mkt-steps { grid-template-columns: minmax(0, 1fr); }
  .mkt-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
}
@media (max-width: 560px) {
  .mkt-hero h1 { font-size: clamp(40px, 12vw, 56px); }
  .mkt-lead { font-size: 16px; }
  .mkt-hero-facts { gap: 24px; }
  .mkt-hero-facts b { font-size: 21px; }
  .mkt-chip-float { padding: 8px 12px; font-size: 12px; }
  .mkt-item-body { padding: 12px; }
  .mkt-item-body h3 { font-size: 15px; }
  .mkt-item-body p { display: none; }
  .mkt-item-foot { flex-wrap: wrap; }
  .market-page .section-heading-row { display: block; }
  .market-page .section-heading-row > * + * { margin-top: 22px; }
  .mkt-filters { flex-wrap: nowrap; margin-inline: calc(var(--gutter) * -1); padding: 2px var(--gutter); overflow-x: auto; scrollbar-width: none; }
  .mkt-filters button { flex: none; }
  .mkt-band { padding: 26px 22px; }
}
@media (prefers-reduced-motion: reduce) {
  .mkt-halo, .mkt-hero-piece.is-front, .mkt-chip-float, .mkt-kicker span, .mkt-item { animation: none; }
  .mkt-flip { transition: none; }
}
/* ---------- WhatsApp group: dashboard card and end of the sign-up ---------- */
.btn.wa-btn { justify-content: center; border-color: transparent; color: #fff; background: #25d366; box-shadow: 0 14px 30px -14px rgba(37, 211, 102, .85); }
.btn.wa-btn:hover { color: #fff; background: #1ebe5b; }
.wa-btn .app-icon { width: 18px; height: 18px; }
.wa-icon { display: grid; flex: none; place-items: center; width: 48px; height: 48px; border-radius: 14px; color: #fff; background: #25d366; box-shadow: 0 12px 26px -12px rgba(37, 211, 102, .9); }
.wa-icon .app-icon { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.wa-card { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 20px; margin: 0 0 22px; padding: 20px 24px; border: 1px solid rgba(37, 211, 102, .35); border-radius: 20px; background: radial-gradient(80% 160% at 0% 0%, rgba(37, 211, 102, .16), transparent 60%), var(--panel); }
.wa-text { flex: 1 1 280px; }
.wa-card h2 { margin: 0 0 4px; font-size: 18px; }
.wa-card p { margin: 0; color: var(--on-dark-muted); font-size: 14px; line-height: 1.55; }
.wa-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.wa-join { display: grid; gap: 14px; margin: 18px 0 12px; padding: 18px; border: 1px solid rgba(37, 211, 102, .45); border-radius: 16px; background: rgba(37, 211, 102, .08); }
.wa-join-head { display: flex; align-items: center; gap: 14px; }
.wa-join-head strong { display: block; margin-bottom: 2px; }
.wa-join-head small { display: block; opacity: .78; font-size: 13.5px; line-height: 1.5; }
@media (max-width: 560px) { .wa-actions, .wa-actions .wa-btn { width: 100%; } .wa-actions { justify-content: space-between; } }
/* "New" dot on the Market link of the site menu */
.nav-links a .nav-new { position: absolute; top: 5px; right: 5px; width: 7px; height: 7px; border-radius: 50%; background: var(--magenta); animation: nav-new 2.2s ease-out infinite; pointer-events: none; }
@keyframes nav-new { 0% { box-shadow: 0 0 0 0 rgba(238, 58, 143, .65); } 70%, 100% { box-shadow: 0 0 0 7px rgba(238, 58, 143, 0); } }
@media (max-width: 1024px) { .nav-links a .nav-new { position: static; flex: none; width: 9px; height: 9px; } }
@media (prefers-reduced-motion: reduce) { .nav-links a .nav-new { animation: none; } }
/* Real photos of the club pieces (cut out, transparent background) */
img.garment { object-fit: contain; filter: drop-shadow(0 26px 30px rgba(0, 0, 0, .55)); }
.mkt-hero-piece.is-back img.garment { filter: blur(.5px) drop-shadow(0 20px 26px rgba(0, 0, 0, .5)); }
.shop-product-art img.garment, .shop-order-art img.garment, .merch-art img.garment, .merch-setup-art img.garment { filter: drop-shadow(0 6px 8px rgba(0, 0, 0, .45)); }
.shop-stage img.garment { filter: drop-shadow(0 30px 34px rgba(0, 0, 0, .6)); }
.shop-color-name { display: grid; justify-items: end; gap: 2px; text-align: right; }
.shop-color-name small { color: rgba(255, 255, 255, .5); font-size: 10px; letter-spacing: .14em; }
.shop-color-name b { color: #fff; }

/* Credits of the catalogue photos (Wikimedia Commons, free licences) */
.mk-credit { margin: 12px 0 0; color: var(--on-dark-muted); font-size: 11.5px; }
.mk-credit a { color: inherit; text-decoration: underline; }
.mkt-credits { margin-top: 26px; color: var(--on-dark-muted); font-size: 12.5px; }
.mkt-credits summary { width: max-content; cursor: pointer; }
.mkt-credits summary:hover { color: #fff; }
.mkt-credits ul { columns: 2 320px; gap: 30px; margin: 12px 0 0; padding-left: 18px; line-height: 1.7; }
.mkt-credits a { color: #c4b5fd; }
/* Product photos fill a fixed 4:3 frame, whatever their own shape */
.mkt-item-visual, .mk-visual { position: relative; overflow: hidden; }
.mkt-item-visual > img, .mk-visual > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: scale .8s var(--ease-out); }
.mkt-item:hover .mkt-item-visual > img, .mk-card:hover .mk-visual > img { scale: 1.05; }
.mkt-item-flag { z-index: 1; }
.mk-dialog-visual { position: relative; overflow: hidden; }
.mk-dialog-visual > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* Lookbook: the club pieces worn by members, cinematic shots with the story beside them */
.mkt-look { display: grid; gap: 26px; }
.mkt-shot { position: relative; margin: 0; overflow: hidden; isolation: isolate; aspect-ratio: 2 / 1; border-radius: 28px; background: #0d0b16; box-shadow: 0 50px 90px -50px rgba(0, 0, 0, .9); }
.mkt-shot img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; object-position: center top; transition: scale 1.6s var(--ease-out); }
.mkt-shot:hover img { scale: 1.04; }
.mkt-shot::before { content: ""; position: absolute; inset: 0; z-index: -1; }
.mkt-shot.is-left::before { background: linear-gradient(90deg, rgba(8, 6, 25, .95) 0%, rgba(8, 6, 25, .8) 28%, rgba(8, 6, 25, .2) 52%, transparent 64%); }
.mkt-shot.is-right::before { background: linear-gradient(270deg, rgba(8, 6, 25, .95) 0%, rgba(8, 6, 25, .8) 28%, rgba(8, 6, 25, .2) 52%, transparent 64%); }
.mkt-shot::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08); pointer-events: none; }
.mkt-shot figcaption { position: absolute; top: 50%; display: grid; justify-items: start; gap: 14px; width: min(36%, 430px); translate: 0 -50%; color: #fff; }
.mkt-shot.is-left figcaption { left: clamp(24px, 4.5vw, 64px); }
.mkt-shot.is-right figcaption { right: clamp(24px, 4.5vw, 64px); }
.mkt-shot h3 { margin: 0; font: 700 clamp(28px, 3.3vw, 50px)/1.03 var(--font-display); letter-spacing: -.04em; }
.mkt-shot p { margin: 0; color: rgba(255, 255, 255, .78); font-size: 16px; line-height: 1.6; }
.mkt-shot .btn { margin-top: 6px; }
.shop-look { margin-bottom: 22px; }
.shop-look .mkt-shot h3 { font-size: clamp(24px, 2.6vw, 38px); }
/* Editorial split: the photo on two thirds, the story on a dark panel that melts into it */


.mkt-shot.is-left img { left: 32%; width: 68%; }
.mkt-shot.is-right img { right: 32%; left: auto; width: 68%; }
.mkt-shot.is-left::before { background: radial-gradient(45% 80% at 0% 50%, rgba(122, 50, 232, .26), transparent 70%), linear-gradient(90deg, #0d0b16 34%, rgba(13, 11, 22, .55) 44%, transparent 58%); }
.mkt-shot.is-right::before { background: radial-gradient(45% 80% at 100% 50%, rgba(238, 58, 143, .22), transparent 70%), linear-gradient(270deg, #0d0b16 34%, rgba(13, 11, 22, .55) 44%, transparent 58%); }
.mkt-shot figcaption { width: min(29%, 380px); }
.mkt-shot.is-left figcaption { left: clamp(24px, 3.4vw, 52px); }
.mkt-shot.is-right figcaption { right: clamp(24px, 3.4vw, 52px); }
@media (max-width: 760px) {
  .mkt-shot.is-left img, .mkt-shot.is-right img { left: auto; right: auto; width: 100%; }
  .mkt-shot figcaption { width: auto; }
}@media (max-width: 760px) {
  .mkt-shot { display: flex; flex-direction: column; aspect-ratio: auto; border-radius: 22px; }
  .mkt-shot img { position: relative; z-index: 0; height: auto; aspect-ratio: 4 / 5; object-position: 50% 15%; }
  .mkt-shot::before { display: none; }
  .mkt-shot figcaption { position: static; width: auto; padding: 22px 22px 26px; translate: none; }
  .mkt-shot p { font-size: 15px; }
}
/* Apparel in black or white: two big colour choices, sizes with their stock, orders with photos */
.shop-colors.is-duo { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.shop-color-pick { position: relative; display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1.5px solid var(--panel-line); border-radius: 14px; font-weight: 700; cursor: pointer; transition: border-color .2s ease, background .2s ease; }
.shop-color-pick input { position: absolute; opacity: 0; pointer-events: none; }
.shop-color-pick i { width: 28px; height: 28px; flex: none; border-radius: 50%; background: radial-gradient(circle at 32% 28%, rgba(255, 255, 255, .3), transparent 45%), var(--s); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .25), 0 6px 14px -6px rgba(0, 0, 0, .6); }
.shop-color-pick:hover { border-color: rgba(238, 58, 143, .5); }
.shop-color-pick:has(input:checked) { border-color: #ee3a8f; background: rgba(238, 58, 143, .08); box-shadow: 0 0 0 3px rgba(238, 58, 143, .15); }
.shop-color-pick:has(input:focus-visible) { outline: 2px solid #c4b5fd; outline-offset: 2px; }
.shop-sizes label { display: grid; justify-items: center; gap: 4px; }
.shop-sizes em { min-height: 14px; color: #fdba74; font-size: 10.5px; font-style: normal; font-weight: 700; }
.shop-sizes input:disabled + b { opacity: .35; text-decoration: line-through; cursor: not-allowed; }
.shop-sizes label:has(input:disabled) { cursor: not-allowed; }
.mk-order-lines { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.mk-order-lines li { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 0; border: 0; font-size: 14px; }
.mk-line-thumb { display: grid; place-items: center; width: 48px; height: 48px; overflow: hidden; border-radius: 10px; background: radial-gradient(circle at 50% 35%, #2a2350, #120f2b 75%); }
.mk-line-thumb img { width: 100%; height: 100%; object-fit: cover; }
.mk-line-thumb img.garment { object-fit: contain; padding: 3px; filter: none; }
.mk-line-thumb .mk-art { width: 100%; }
.mk-order-lines em { color: var(--on-dark-muted); font-size: 13px; font-style: normal; }
.mk-order-next { display: flex; align-items: center; gap: 8px; margin: 0; padding: 10px 12px; border-radius: 12px; background: rgba(122, 50, 232, .1); color: rgba(255, 255, 255, .85); font-size: 13.5px; }
.mk-order-next .app-icon { width: 16px; height: 16px; flex: none; color: #c4b5fd; }
html.theme-light .mk-order-next { color: #3b2f52; }
/* Treasury shop: quick jumps, step hints, apparel stock grid */
.sales-jump { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; }
.sales-jump a { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border: 1px solid var(--panel-line); border-radius: 999px; color: var(--on-dark-muted); font-size: 13.5px; font-weight: 600; transition: color .2s, border-color .2s; }
.sales-jump a:hover { color: #fff; border-color: rgba(196, 181, 253, .45); }
.sales-jump .app-icon { width: 16px; height: 16px; }
a.app-stat { color: inherit; transition: border-color .2s, translate .3s var(--ease-out); }
a.app-stat:hover { border-color: rgba(196, 181, 253, .4); translate: 0 -2px; }
.sales-hint { display: flex; align-items: center; gap: 8px; margin: -2px 0 14px; color: var(--on-dark-muted); font-size: 13.5px; }
.sales-hint .app-icon { width: 15px; height: 15px; color: #c4b5fd; }
.sales-tabs a .app-icon { width: 15px; height: 15px; }
.sales-legacy { display: flex; align-items: center; gap: 12px; margin: 0 0 18px; padding: 14px 18px; border-color: rgba(249, 115, 22, .35); font-size: 14px; }
.sales-legacy .app-icon { flex: none; color: #fdba74; }
.sales-legacy a { color: #c4b5fd; text-decoration: underline; }
.sales-order-items { display: grid; gap: 8px; min-width: 0; }
.sales-order-note { margin: 0; }
.merch-stock-table td { padding: 8px 6px; }
.merch-stock-table input { width: 64px !important; min-height: 36px !important; padding: 4px 6px !important; text-align: center; }
.merch-stock-table input.is-out { border-color: rgba(244, 63, 94, .6) !important; color: #fda4af; }
.merch-stock-table input.is-low { border-color: rgba(249, 115, 22, .6) !important; color: #fdba74; }
.merch-stock-form .app-actions { margin-top: 14px; }
.merch-sheet-table .mk-line-thumb, .merch-stock-table .mk-line-thumb { width: 42px; height: 42px; }
@media print { body:has(#production) :is(.sales-jump, .sales-legacy, #commandes, #stock, #catalogue, #produit, .app-stats) { display: none !important; } }
/* Market page: black or white for each piece */
.mkt-piece[data-color="noir"] .garment.is-blanc, .mkt-piece[data-color="blanc"] .garment.is-noir { display: none; }
.mkt-colors { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.mkt-colors button { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px 7px 8px; border: 1px solid rgba(255, 255, 255, .14); border-radius: 999px; background: transparent; color: rgba(255, 255, 255, .8); font: 600 13px var(--font-body); cursor: pointer; transition: border-color .2s, background .2s, color .2s; }
.mkt-colors button i { width: 20px; height: 20px; border-radius: 50%; background: var(--s); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .3); }
.mkt-colors button:hover { color: #fff; border-color: rgba(255, 255, 255, .35); }
.mkt-colors button[aria-pressed="true"] { color: #fff; border-color: #ee3a8f; background: rgba(238, 58, 143, .12); }