    /* ── Portal-specific styles ── */
    .portal-hero {
      background: linear-gradient(135deg,#040812 0%,#0c1225 55%,#12163a 100%);
      padding: 5.5rem 0 4rem;
      position: relative;
      overflow: hidden;
    }
    /* Ambient grid lines */
    .portal-hero::before {
      content:'';
      position:absolute; inset:0;
      background-image:
        linear-gradient(rgba(99,102,241,.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(99,102,241,.05) 1px, transparent 1px);
      background-size:60px 60px;
      pointer-events:none;
    }
    .portal-hero::after {
      content:'';
      position:absolute; inset:0;
      background:radial-gradient(ellipse 70% 55% at 35% 50%, rgba(99,102,241,.12) 0%, transparent 70%);
      pointer-events:none;
    }
    /* Two-column hero */
    .portal-hero__inner {
      position:relative; z-index:1;
      display:flex; align-items:center; gap:3rem; min-height:300px;
    }
    .portal-hero__content { flex:1; }
    .portal-brand-hero {
      display:inline-flex;
      align-items:center;
      gap:.95rem;
      padding:.55rem .7rem .55rem 1.05rem;
      margin-bottom:1.2rem;
      border-radius:999px;
      background:linear-gradient(135deg, rgba(255,255,255,.12), rgba(96,165,250,.08));
      border:1px solid rgba(191,219,254,.22);
      box-shadow:0 20px 60px rgba(37,99,235,.16), inset 0 1px 0 rgba(255,255,255,.12);
      backdrop-filter:blur(12px);
      -webkit-backdrop-filter:blur(12px);
    }
    .portal-brand-mark {
      width:68px;
      height:68px;
      flex:0 0 auto;
      background:url("assets/logo-icon.svg") center/contain no-repeat;
      filter:drop-shadow(0 12px 30px rgba(37,99,235,.35));
    }
    .portal-brand-copy {
      display:flex;
      flex-direction:column;
      gap:.12rem;
      min-width:0;
    }
    .portal-brand-copy strong {
      color:#f8fafc;
      font-size:1.55rem;
      line-height:1;
      letter-spacing:.01em;
      font-weight:800;
      text-shadow:0 3px 16px rgba(37,99,235,.45);
    }
    .portal-brand-copy span {
      color:#bfdbfe;
      font-size:.72rem;
      font-weight:700;
      white-space:nowrap;
    }
    .portal-brand-chips {
      display:flex;
      gap:.45rem;
      flex-wrap:wrap;
      margin:-.55rem 0 1.25rem;
    }
    .portal-brand-chips span {
      display:inline-flex;
      align-items:center;
      min-height:28px;
      padding:.22rem .7rem;
      border-radius:999px;
      background:rgba(15,23,42,.35);
      border:1px solid rgba(147,197,253,.22);
      color:#dbeafe;
      font-size:.68rem;
      font-weight:700;
    }
    .portal-hero__tag {
      display:inline-flex; align-items:center; gap:.5rem;
      font-size:.72rem; font-weight:700; letter-spacing:.12em; text-transform:uppercase;
      color:#a5b4fc; background:rgba(99,102,241,.12); border:1px solid rgba(99,102,241,.3);
      padding:.3rem .9rem; border-radius:99px; margin-bottom:1.25rem;
    }
    .portal-hero__title {
      font-size:clamp(1.8rem,3.5vw,2.75rem); font-weight:800; color:#172033; line-height:1.2;
      margin-bottom:.875rem;
    }
    .portal-hero__title em { color:#385f86; font-style:normal; }
    .portal-hero__sub {
      font-size:.9375rem; color:#4f5f73; max-width:36rem; line-height:1.75; margin-bottom:1.5rem;
    }
    .portal-hero__stats {
      display:flex; gap:2rem; flex-wrap:wrap; margin-bottom:1.75rem;
    }
    .portal-stat { text-align:right; }
    .portal-stat__val { font-size:1.75rem; font-weight:800; color:#f1f5f9; line-height:1; }
    .portal-stat__lbl { font-size:.68rem; color:#64748b; text-transform:uppercase; letter-spacing:.08em; margin-top:.2rem; }
    .portal-hero__actions { display:flex; gap:.75rem; flex-wrap:wrap; }

    /* ── Achievement visual cards ── */
    .portal-visual {
      position:relative; width:360px; min-height:320px; flex-shrink:0;
    }
    .portal-visual__glow {
      position:absolute; width:260px; height:260px;
      background:radial-gradient(circle, rgba(99,102,241,.22) 0%, rgba(14,165,233,.08) 50%, transparent 70%);
      top:50%; left:50%; transform:translate(-50%,-50%);
      pointer-events:none; z-index:0;
    }
    .pv-card {
      position:absolute; z-index:1;
      background:rgba(255,255,255,.07); border:1px solid rgba(255,255,255,.13);
      backdrop-filter:blur(10px); -webkit-backdrop-filter:blur(10px);
      border-radius:.875rem; padding:.75rem 1rem;
      display:flex; align-items:center; gap:.625rem;
      animation:pvFloat 6s ease-in-out infinite;
      cursor:default;
    }
    @keyframes pvFloat {
      0%,100% { transform:translateY(0); }
      50%      { transform:translateY(-9px); }
    }
    .pv-card__emoji { font-size:1.6rem; flex-shrink:0; line-height:1; }
    .pv-card__text  { display:flex; flex-direction:column; gap:.1rem; }
    .pv-card__lbl   { font-size:.6rem; color:rgba(255,255,255,.45); letter-spacing:.07em; text-transform:uppercase; }
    .pv-card__val   { font-size:.875rem; font-weight:700; color:#f1f5f9; line-height:1.2; }
    /* Positions & delays */
    .pv-card--1 { top:5px;   right:10px; animation-delay:0s;    min-width:180px; }
    .pv-card--2 { top:115px; left:5px;   animation-delay:1.4s;  min-width:170px; border-color:rgba(129,140,248,.25); }
    .pv-card--3 { bottom:75px; right:25px; animation-delay:0.7s; min-width:175px; border-color:rgba(34,197,94,.2); }
    .pv-card--4 { bottom:5px;  left:20px;  animation-delay:2.1s;  min-width:165px; border-color:rgba(251,191,36,.2); }
    /* Accent dot top-left of each card */
    .pv-card--2::before { content:''; position:absolute; top:-1px; right:-1px; width:7px; height:7px; background:#818cf8; border-radius:50%; }
    .pv-card--3::before { content:''; position:absolute; top:-1px; right:-1px; width:7px; height:7px; background:#22c55e; border-radius:50%; }
    .pv-card--4::before { content:''; position:absolute; top:-1px; right:-1px; width:7px; height:7px; background:#fbbf24; border-radius:50%; }

    @media(max-width:860px){
      .portal-hero__inner { flex-direction:column; gap:1.5rem; }
      .portal-visual { width:100%; min-height:220px; }
      .pv-card { font-size:.85em; }
    }
    @media(max-width:480px){
      .portal-visual { display:none; }
    }

    /* ── Competition cards ── */
    .competitions-section { padding:3rem 0 4.5rem; background:var(--clr-bg-alt); }
    .competitions-grid {
      display:grid;
      grid-template-columns:repeat(auto-fill, minmax(300px,1fr));
      gap:1.5rem;
      margin-top:2.5rem;
    }
    .comp-card {
      background:var(--card-bg,#fff) !important;
      border-radius:var(--radius-md);
      border:1px solid var(--card-border,var(--clr-border)) !important;
      box-shadow:0 14px 32px var(--card-glow,rgba(15,23,42,.08));
      text-decoration:none; color:inherit;
      display:flex; flex-direction:column; overflow:hidden;
      position:relative;
      transition:transform .22s, box-shadow .22s, border-color .22s;
    }
    .comp-card:hover {
      transform:translateY(-6px);
      box-shadow:0 22px 44px var(--card-glow,rgba(15,23,42,.14));
      border-color:var(--c-accent,var(--clr-primary)) !important;
    }

    /* ── Featured member competition card (spans 2 columns) ── */
    .comp-card--member {
      grid-column: span 2;
      background:linear-gradient(135deg, var(--c-accent,#1d4ed8) 0%, #172033 135%) !important;
      border:1px solid rgba(255,255,255,.18) !important;
      color:#fff !important;
      overflow:hidden;
    }
    .comp-card--member::after {
      content:''; position:absolute; inset:0;
      background:radial-gradient(circle at 85% 15%, rgba(255,255,255,.16), transparent 55%);
      pointer-events:none;
    }
    .comp-card--member__inner {
      position:relative; z-index:1;
      display:flex; flex-direction:column;
      padding:1.6rem 1.75rem; height:100%; gap:1rem;
    }
    .comp-card--member__top { display:flex; align-items:center; gap:.9rem; }
    .comp-card--member__avatar {
      width:3rem; height:3rem; border-radius:50%;
      background:rgba(255,255,255,.22); border:2px solid rgba(255,255,255,.45);
      display:flex; align-items:center; justify-content:center;
      font-size:1.3rem; font-weight:900; color:#fff; flex-shrink:0;
    }
    .comp-card--member__greet { display:flex; flex-direction:column; gap:.1rem; flex:1; min-width:0; }
    .comp-card--member__hello { font-size:.95rem; font-weight:800; color:#fff; }
    .comp-card--member__label {
      font-size:.68rem; font-weight:700; letter-spacing:.08em; text-transform:uppercase;
      color:rgba(255,255,255,.72);
    }
    .comp-card--member__icon { font-size:2.4rem; line-height:1; filter:drop-shadow(0 2px 6px rgba(0,0,0,.25)); }
    .comp-card--member__title { font-size:1.4rem; font-weight:800; color:#fff; line-height:1.25; margin:0; }
    .comp-card--member__progress { display:flex; flex-direction:column; gap:.4rem; }
    .comp-card--member__bar {
      height:10px; background:rgba(255,255,255,.2); border-radius:99px; overflow:hidden;
    }
    .comp-card--member__fill {
      height:100%; background:#fff; border-radius:99px; transition:width .6s ease;
    }
    .comp-card--member__pct { display:flex; align-items:baseline; gap:.5rem; }
    .comp-card--member__pct strong { font-size:1.25rem; font-weight:900; color:#fff; }
    .comp-card--member__pct span { font-size:.8rem; color:rgba(255,255,255,.78); }
    .comp-card--member__stats { display:flex; gap:.75rem; }
    .comp-card--member__stats > div {
      flex:1; text-align:center; padding:.6rem;
      background:rgba(255,255,255,.12); border:1px solid rgba(255,255,255,.16);
      border-radius:12px;
    }
    .comp-card--member__stats strong { display:block; font-size:1.3rem; font-weight:900; color:#fff; line-height:1; }
    .comp-card--member__stats span { font-size:.7rem; color:rgba(255,255,255,.75); margin-top:.2rem; display:block; }
    .comp-card--member__actions {
      margin-top:auto; display:flex; align-items:center; justify-content:space-between; gap:.75rem; flex-wrap:wrap;
    }
    .comp-card--member__resume {
      font-size:.78rem; color:rgba(255,255,255,.85);
      background:rgba(255,255,255,.12); border:1px solid rgba(255,255,255,.16);
      padding:.35rem .7rem; border-radius:99px;
      overflow:hidden; text-overflow:ellipsis; white-space:nowrap; max-width:60%;
    }
    .comp-card--member__cta {
      font-size:.9rem; font-weight:800; color:#fff;
      background:rgba(255,255,255,.18); border:1px solid rgba(255,255,255,.3);
      padding:.45rem 1.1rem; border-radius:99px; white-space:nowrap;
      transition:background .18s;
    }
    .comp-card--member:hover .comp-card--member__cta { background:rgba(255,255,255,.3); }
    /* Keep the featured gradient in dark mode (beat html[data-theme] .comp-card) */
    html[data-theme="dark"] .comp-card--member {
      background:linear-gradient(135deg, var(--c-accent,#1d4ed8) 0%, #0b1020 140%) !important;
      border-color:rgba(255,255,255,.16) !important;
    }
    @media (max-width:640px) {
      .comp-card--member { grid-column: span 1; }
      .comp-card--member__resume { max-width:100%; }
    }

    /* Colored top banner with icon */
    .comp-card__banner {
      height:80px;
      background:var(--card-banner,linear-gradient(135deg, var(--c-accent,#1d4ed8) 0%, #1e3a8a 100%)) !important;
      display:flex; align-items:center; justify-content:space-between;
      padding:0 1.35rem; position:relative; overflow:hidden;
    }
    .comp-card__banner::before {
      content:''; position:absolute; inset:0;
      background:url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffffff' fill-opacity='0.06'%3E%3Ccircle cx='20' cy='20' r='10'/%3E%3C/g%3E%3C/svg%3E");
      pointer-events:none;
    }
    .comp-card__big-icon {
      font-size:2.4rem; line-height:1; position:relative; z-index:1;
      filter: drop-shadow(0 2px 4px rgba(0,0,0,.2));
    }
    .comp-card__badge {
      position:relative; z-index:1;
      font-size:.65rem; font-weight:700; padding:.2rem .6rem; border-radius:99px;
      background:rgba(255,255,255,.18); color:#fff;
      border:1px solid rgba(255,255,255,.3);
    }
    .comp-card__body { padding:1rem 1.35rem .85rem; flex:1; background:linear-gradient(180deg, rgba(255,255,255,.58), rgba(255,255,255,.2)); }
    .comp-card__sub  { font-size:.68rem; font-weight:700; letter-spacing:.1em; text-transform:uppercase; color:var(--clr-muted); margin-bottom:.3rem; }
    .comp-card__title{ font-size:1.05rem; font-weight:700; line-height:1.3; margin-bottom:.5rem; color:var(--clr-text); }
    .comp-card__desc { font-size:.8rem; color:var(--clr-muted); line-height:1.6; margin-bottom:.85rem; }
    .comp-card__stats{ display:flex; gap:1rem; flex-wrap:wrap; margin-bottom:.75rem; }
    .comp-stat {
      display:flex; align-items:center; gap:.3rem; font-size:.72rem;
      color:var(--clr-muted); font-weight:600;
    }
    .comp-stat__dot  { width:.45rem; height:.45rem; border-radius:50%; background:var(--c-accent,var(--clr-primary)); }
    .comp-card__cta  {
      display:flex; align-items:center; justify-content:space-between;
      padding:.85rem 1.35rem; border-top:1px solid var(--card-border,var(--clr-border));
      font-size:.85rem; font-weight:700; color:var(--c-accent,var(--clr-primary));
      background:var(--card-cta,linear-gradient(135deg, transparent, var(--c-accent,var(--clr-primary))08)) !important;
      transition:background .18s, color .18s;
    }
    .comp-card:hover .comp-card__cta { background:var(--card-cta-hover,var(--card-cta)) !important; }
    html[data-theme="dark"] .comp-card {
      background:var(--card-dark-bg,rgba(36,18,22,.94)) !important;
      border-color:var(--card-dark-border,rgba(96,165,250,.34)) !important;
      box-shadow:0 18px 38px rgba(0,0,0,.22);
    }
    html[data-theme="dark"] .comp-card:hover {
      border-color:var(--c-accent,#60a5fa) !important;
      box-shadow:0 24px 48px rgba(0,0,0,.32);
    }
    html[data-theme="dark"] .comp-card__body {
      background:linear-gradient(180deg, rgba(255,255,255,.035), rgba(255,255,255,.01));
    }
    html[data-theme="dark"] .comp-card__cta {
      background:var(--card-dark-cta,linear-gradient(135deg,#1f2a44,#172033)) !important;
      border-top-color:var(--card-dark-border,rgba(96,165,250,.24));
      color:#dbeafe;
    }
    .comp-card__cta-arrow { font-size:1.1rem; transition:transform .18s; }
    .comp-card:hover .comp-card__cta-arrow { transform:translateX(-4px); }

    /* ── Shared modules section ── */
    .shared-section { padding:3rem 0; background:#fff; border-top:1px solid var(--clr-border); }
    .shared-grid {
      display:grid; grid-template-columns:repeat(auto-fill,minmax(240px,1fr));
      gap:1rem; margin-top:1.5rem;
    }
    .shared-item {
      display:flex; align-items:center; gap:.75rem;
      padding:.75rem 1rem; border:1px solid var(--clr-border);
      border-radius:var(--radius-sm); background:var(--clr-bg-alt);
      text-decoration:none; color:inherit;
      transition:border-color .15s, transform .15s;
    }
    .shared-item:hover { border-color:var(--clr-primary); transform:translateY(-2px); }
    .shared-item__icon { font-size:1.4rem; flex-shrink:0; }
    .shared-item__title { font-size:.83rem; font-weight:600; line-height:1.3; }
    .shared-item__badge {
      margin-top:.2rem; font-size:.62rem; font-weight:700; padding:.1rem .4rem;
      border-radius:99px; background:var(--clr-primary-lt); color:var(--clr-primary);
    }

    @media(max-width:640px){
      .competitions-grid { grid-template-columns:1fr; }
      .portal-hero__stats { gap:1.5rem; }
      .portal-brand-hero { width:100%; justify-content:center; padding:.65rem .8rem; border-radius:1.1rem; }
      .portal-brand-mark { width:58px; height:58px; }
      .portal-brand-mark::before { left:15px; top:29px; width:24px; }
      .portal-brand-mark::after { right:12px; top:11px; width:16px; height:26px; }
      .portal-brand-copy strong { font-size:1.25rem; }
      .portal-brand-copy span { white-space:normal; }
      .portal-brand-chips { justify-content:center; }
    }

    /* Calm professional portal refresh */
    :root {
      --portal-ink:#172033;
      --portal-muted:#667085;
      --portal-line:#d9e2ec;
      --portal-paper:#fbfcfe;
      --portal-soft:#f2f6fa;
      --portal-primary:#385f86;
      --portal-primary-2:#607d9b;
    }
    .portal-hero {
      background:
        linear-gradient(180deg, rgba(248,251,254,.98), rgba(241,246,251,.96)) !important;
      color:var(--portal-ink) !important;
      border-bottom:1px solid var(--portal-line);
      padding:5.1rem 0 3.4rem;
    }
    @media(max-width:640px){
      /* Le padding fixe (5.1rem) occupe une part disproportionnée d'un écran de
         téléphone (~10% de la hauteur) avant tout contenu visible — on le réduit
         ici, après la règle de base pour gagner la cascade (même spécificité). */
      .portal-hero { padding:2.5rem 0 2rem; }
    }
    .portal-hero::before {
      background-image:
        linear-gradient(rgba(56,95,134,.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(56,95,134,.045) 1px, transparent 1px) !important;
      background-size:72px 72px;
      opacity:.75;
    }
    .portal-hero::after {
      background:linear-gradient(90deg, rgba(255,255,255,.65), rgba(255,255,255,.08)) !important;
    }
    .portal-brand-hero {
      background:rgba(255,255,255,.74) !important;
      border-color:rgba(56,95,134,.16) !important;
      box-shadow:0 16px 42px rgba(38,58,84,.08), inset 0 1px 0 rgba(255,255,255,.9) !important;
    }
    .portal-brand-mark {
      background:url("assets/logo-icon.svg") center/contain no-repeat !important;
      border:0 !important;
      box-shadow:none !important;
      filter:drop-shadow(0 10px 24px rgba(38,75,112,.28));
    }
    .portal-brand-copy strong,
    .portal-hero__title,
    .portal-stat__val {
      color:var(--portal-ink) !important;
      text-shadow:none !important;
    }
    .portal-brand-copy span,
    .portal-hero__sub,
    .portal-stat__lbl {
      color:var(--portal-muted) !important;
    }
    .portal-brand-chips span,
    .portal-hero__tag {
      background:rgba(255,255,255,.68) !important;
      border-color:rgba(56,95,134,.15) !important;
      color:#496580 !important;
    }
    .portal-hero__title em { color:var(--portal-primary) !important; }
    .portal-hero .btn--primary {
      background:#385f86 !important;
      border-color:#385f86 !important;
      color:#fff !important;
      box-shadow:0 12px 28px rgba(56,95,134,.16) !important;
    }
    .portal-hero .btn--primary:hover { background:#2f5275 !important; }
    .portal-hero .btn--ghost-white {
      background:rgba(255,255,255,.72) !important;
      border-color:rgba(56,95,134,.22) !important;
      color:#385f86 !important;
    }
    .portal-visual__glow {
      background:radial-gradient(circle, rgba(96,125,155,.16) 0%, rgba(96,125,155,.06) 52%, transparent 72%) !important;
    }
    .pv-card {
      background:rgba(255,255,255,.72) !important;
      border-color:rgba(56,95,134,.16) !important;
      box-shadow:0 14px 32px rgba(38,58,84,.08);
    }
    .pv-card__lbl { color:#7a8796 !important; }
    .pv-card__val { color:#26384f !important; }
    .competitions-section {
      background:linear-gradient(180deg,#f6f9fc,#eef4f8) !important;
      padding-top:3.4rem;
    }
    .comp-card {
      border-radius:10px !important;
      box-shadow:0 12px 30px rgba(38,58,84,.08) !important;
    }
    .comp-card:hover {
      transform:translateY(-4px) !important;
      box-shadow:0 18px 38px rgba(38,58,84,.12) !important;
    }
    .comp-card__banner { height:72px !important; }
    .comp-card__banner::before { opacity:.35; }
    .comp-card__big-icon { opacity:.82; filter:drop-shadow(0 2px 4px rgba(22,34,48,.16)) !important; }
    .comp-card__badge {
      background:rgba(255,255,255,.22) !important;
      border-color:rgba(255,255,255,.32) !important;
    }
    .comp-card__body { background:rgba(255,255,255,.5) !important; }
    .comp-card__sub { color:#778293 !important; }
    .comp-card__title { color:#182234 !important; }
    .comp-card__desc,
    .comp-stat { color:#647184 !important; }
    .shared-section { background:#fbfcfe !important; }
    .section--alt { background:#f3f7fa !important; }
    .cta-section {
      background:linear-gradient(135deg,#314d68,#22384f) !important;
    }
    .header {
      background:rgba(250,252,254,.88) !important;
      border-bottom:1px solid rgba(217,226,236,.82) !important;
      box-shadow:0 10px 28px rgba(38,58,84,.06) !important;
    }
    .header .nav__logo,
    .header .nav__link,
    .header .nav__search-btn,
    .header .nav__burger { color:#233247 !important; }
    .header .nav__logo-icon { color:#385f86 !important; }
    .header .nav__portal--dark {
      background:#eef4fa !important;
      border-color:#d5e1ec !important;
      color:#385f86 !important;
    }
    html[data-theme="dark"] .portal-hero {
      background:linear-gradient(180deg,#111a24,#0d141d) !important;
      border-bottom-color:#26384f;
    }
    html[data-theme="dark"] .portal-brand-hero,
    html[data-theme="dark"] .pv-card {
      background:rgba(24,35,48,.72) !important;
      border-color:rgba(122,146,172,.22) !important;
    }
    html[data-theme="dark"] .portal-brand-copy strong,
    html[data-theme="dark"] .portal-hero__title,
    html[data-theme="dark"] .portal-stat__val,
    html[data-theme="dark"] .pv-card__val { color:#eef4fa !important; }
    html[data-theme="dark"] .portal-brand-copy span,
    html[data-theme="dark"] .portal-hero__sub,
    html[data-theme="dark"] .portal-stat__lbl,
    html[data-theme="dark"] .pv-card__lbl { color:#b7c4d1 !important; }
    html[data-theme="dark"] .portal-brand-chips span,
    html[data-theme="dark"] .portal-hero__tag {
      background:rgba(24,35,48,.72) !important;
      border-color:rgba(122,146,172,.22) !important;
      color:#d8e4ee !important;
    }
    html[data-theme="dark"] .portal-hero__title em { color:#9eb7d0 !important; }
    html[data-theme="dark"] .competitions-section { background:linear-gradient(180deg,#111a24,#0f1720) !important; }
    html[data-theme="dark"] .comp-card__title { color:#eef4fa !important; }
    html[data-theme="dark"] .comp-card__desc,
    html[data-theme="dark"] .comp-stat,
    html[data-theme="dark"] .comp-card__sub { color:#c3ced9 !important; }
    html[data-theme="dark"] .shared-section,
    html[data-theme="dark"] .section--alt { background:#0f1720 !important; }
    html[data-theme="dark"] .header {
      background:rgba(15,23,32,.92) !important;
      border-bottom-color:#26384f !important;
    }
    html[data-theme="dark"] .header .nav__logo,
    html[data-theme="dark"] .header .nav__link,
    html[data-theme="dark"] .header .nav__search-btn,
    html[data-theme="dark"] .header .nav__burger { color:#e9f0f7 !important; }
    html[data-theme="dark"] .header .nav__portal--dark {
      background:rgba(48,74,100,.5) !important;
      border-color:rgba(122,146,172,.28) !important;
      color:#e9f0f7 !important;
    }

    /* Light mode portal-hero colors (style.css no longer overrides .portal-hero) */
    .portal-hero .portal-hero__title,
    .portal-hero .portal-hero__title span { color:#172033; text-shadow:none; }
    .portal-hero .portal-hero__title em { color:#385f86; }
    .portal-hero .portal-hero__sub { color:#4f5f73; text-shadow:none; }
    .portal-hero .portal-stat__val { color:#172033; text-shadow:none; }
    .portal-hero .portal-stat__lbl { color:#667085; }
    .portal-brand-hero,
    .portal-visual .visual-card,
    .portal-visual__card {
      background:rgba(255,255,255,.78) !important;
      color:#172033 !important;
      border-color:rgba(133,160,188,.32) !important;
      box-shadow:0 18px 48px rgba(45,71,96,.12) !important;
    }
    .portal-brand-copy strong,
    .portal-brand-copy span,
    .portal-visual strong,
    .portal-visual span { color:#172033 !important; text-shadow:none !important; }
    .portal-brand-chips span,
    .portal-hero__tag {
      background:rgba(255,255,255,.66) !important;
      color:#385f86 !important;
      border-color:rgba(56,95,134,.18) !important;
    }
    .competition-card-modern,
    .competition-card {
      box-shadow:0 16px 42px rgba(50,70,92,.09) !important;
    }
    .competition-card-modern:hover,
    .competition-card:hover { box-shadow:0 22px 56px rgba(50,70,92,.13) !important; }

    html[data-theme="dark"] body {
      background:#101820 !important;
      color:#e9eef3 !important;
    }
    html[data-theme="dark"] .portal-hero {
      color:#edf3f8 !important;
      background:
        radial-gradient(circle at 18% 24%, rgba(96,125,155,.22), transparent 32%),
        radial-gradient(circle at 82% 12%, rgba(75,145,140,.14), transparent 30%),
        linear-gradient(180deg, #18222d 0%, #121b25 100%) !important;
      border-bottom-color:rgba(148,163,184,.16) !important;
    }
    html[data-theme="dark"] .portal-hero::before,
    html[data-theme="dark"] .portal-hero::after { opacity:.11 !important; }
    html[data-theme="dark"] .portal-hero .portal-hero__title,
    html[data-theme="dark"] .portal-hero .portal-hero__title span,
    html[data-theme="dark"] .portal-hero .portal-stat__val { color:#f3f7fb !important; text-shadow:none !important; }
    html[data-theme="dark"] .portal-hero .portal-hero__sub,
    html[data-theme="dark"] .portal-hero .portal-stat__lbl { color:#c7d3df !important; text-shadow:none !important; }
    html[data-theme="dark"] .portal-brand-hero,
    html[data-theme="dark"] .portal-visual .visual-card,
    html[data-theme="dark"] .portal-visual__card {
      background:rgba(25,36,48,.78) !important;
      color:#f3f7fb !important;
      border-color:rgba(156,178,199,.24) !important;
      box-shadow:0 18px 50px rgba(0,0,0,.22) !important;
    }
    html[data-theme="dark"] .portal-brand-copy strong,
    html[data-theme="dark"] .portal-brand-copy span,
    html[data-theme="dark"] .portal-visual strong,
    html[data-theme="dark"] .portal-visual span { color:#f3f7fb !important; text-shadow:none !important; }
    html[data-theme="dark"] .portal-brand-chips span,
    html[data-theme="dark"] .portal-hero__tag {
      background:rgba(238,245,255,.08) !important;
      color:#d9e6f2 !important;
      border-color:rgba(217,230,242,.17) !important;
    }
    html[data-theme="dark"] .portal-hero .btn--primary {
      background:#486d90 !important;
      color:#f8fbfe !important;
      box-shadow:0 14px 34px rgba(0,0,0,.2) !important;
    }
    html[data-theme="dark"] .portal-hero .btn--ghost-white {
      color:#e7eef6 !important;
      border-color:rgba(231,238,246,.34) !important;
      background:rgba(255,255,255,.04) !important;
    }
    html[data-theme="dark"] .competitions-section {
      background:linear-gradient(180deg,#121b25 0%,#172332 100%) !important;
    }
    html[data-theme="dark"] .competition-card-modern,
    html[data-theme="dark"] .competition-card {
      background:var(--comp-dark-bg, #182434) !important;
      border-color:var(--comp-dark-border, rgba(148,163,184,.18)) !important;
      color:#edf3f8 !important;
      box-shadow:0 16px 42px rgba(0,0,0,.22) !important;
    }

    /* Shared topics readability within the calm palette */
    .shared-card,
    .topic-card,
    .unit-card {
      background:rgba(255,255,255,.82) !important;
      border-color:rgba(133,160,188,.28) !important;
      color:#172033 !important;
      box-shadow:0 14px 36px rgba(50,70,92,.08) !important;
    }
    .shared-card *,
    .topic-card *,
    .unit-card * { text-shadow:none !important; }
    .shared-card h3,
    .topic-card h3,
    .unit-card h3,
    .shared-card .card-title,
    .topic-card .card-title,
    .unit-card .card-title { color:#1f2a3a !important; }
    .shared-card p,
    .topic-card p,
    .unit-card p,
    .shared-card small,
    .topic-card small,
    .unit-card small { color:#5f6f82 !important; }

    html[data-theme="dark"] .shared-card,
    html[data-theme="dark"] .topic-card,
    html[data-theme="dark"] .unit-card {
      background:rgba(24,35,48,.92) !important;
      border-color:rgba(132,154,178,.22) !important;
      color:#edf3f8 !important;
      box-shadow:0 14px 38px rgba(0,0,0,.18) !important;
      opacity:1 !important;
    }
    html[data-theme="dark"] .shared-card h3,
    html[data-theme="dark"] .topic-card h3,
    html[data-theme="dark"] .unit-card h3,
    html[data-theme="dark"] .shared-card .card-title,
    html[data-theme="dark"] .topic-card .card-title,
    html[data-theme="dark"] .unit-card .card-title { color:#eef5fb !important; }
    html[data-theme="dark"] .shared-card p,
    html[data-theme="dark"] .topic-card p,
    html[data-theme="dark"] .unit-card p,
    html[data-theme="dark"] .shared-card small,
    html[data-theme="dark"] .topic-card small,
    html[data-theme="dark"] .unit-card small { color:#c5d1dc !important; }

    /* Stable readable portal sections */
    main [data-animate] {
      opacity:1 !important;
      transform:none !important;
    }
    .section--alt {
      background:linear-gradient(180deg,#f6f9fc 0%,#eef4f8 100%) !important;
      color:#172033 !important;
    }
    .cta-section {
      background:linear-gradient(135deg,#1e3a5f 0%,#162d47 100%) !important;
    }
    .cta-section h2 { color:#f1f7fc !important; text-shadow:none !important; }
    .cta-section p  { color:#c8dded !important; text-shadow:none !important; }
    .section__title { color:#172033 !important; text-shadow:none !important; }
    .section__desc { color:#5f6f82 !important; text-shadow:none !important; }
    .shared-item {
      background:rgba(255,255,255,.84) !important;
      border-color:rgba(133,160,188,.3) !important;
      color:#1f2a3a !important;
      box-shadow:0 12px 32px rgba(50,70,92,.08) !important;
      opacity:1 !important;
    }
    .shared-item__title { color:#1f2a3a !important; text-shadow:none !important; }
    .shared-item__badge { color:#5f6f82 !important; text-shadow:none !important; }

    html[data-theme="dark"] .section--alt,
    html[data-theme="dark"] .cta-section {
      background:linear-gradient(180deg,#121b25 0%,#172536 100%) !important;
      color:#edf3f8 !important;
    }
    html[data-theme="dark"] .section__title { color:#f1f6fb !important; text-shadow:none !important; }
    html[data-theme="dark"] .section__desc { color:#c7d3df !important; text-shadow:none !important; }
    html[data-theme="dark"] .shared-item {
      background:rgba(24,35,48,.94) !important;
      border-color:rgba(132,154,178,.28) !important;
      color:#edf3f8 !important;
      box-shadow:0 12px 34px rgba(0,0,0,.18) !important;
      opacity:1 !important;
    }
    html[data-theme="dark"] .shared-item__title { color:#edf3f8 !important; text-shadow:none !important; }
    html[data-theme="dark"] .shared-item__badge { color:#c7d3df !important; text-shadow:none !important; }


    .site-stats { padding: 2.75rem 0; background: #0f172a; }
    .site-stats__eyebrow {
      text-align: center; color: #64748b; font-size: .72rem; font-weight: 700;
      letter-spacing: .12em; text-transform: uppercase; margin: 0 0 1.5rem;
    }
    .site-stats__grid {
      display: grid; grid-template-columns: repeat(6, 1fr); gap: 1rem;
    }
    .site-stats__item {
      text-align: center; padding: 1.1rem .5rem; background: #1e293b;
      border-radius: .75rem; border: 1px solid #334155;
    }
    .site-stats__val { font-size: 1.85rem; font-weight: 900; color: #f1f5f9; line-height: 1; }
    .site-stats__lbl { font-size: .72rem; color: #94a3b8; margin-top: .4rem; }
    @media (max-width: 900px) {
      .site-stats__grid { grid-template-columns: repeat(3, 1fr); }
    }
    @media (max-width: 520px) {
      .site-stats__grid { grid-template-columns: repeat(2, 1fr); }
    }

    .nl-signup { padding: 3rem 0; background: linear-gradient(135deg, #1d4ed8, #1e40af); }
    .nl-signup__inner {
      display: flex; align-items: center; justify-content: space-between;
      gap: 2rem; flex-wrap: wrap;
    }
    .nl-signup__text h2 { color: #fff; font-size: 1.35rem; font-weight: 800; margin: 0 0 .4rem; }
    .nl-signup__text p { color: rgba(255,255,255,.82); font-size: .92rem; margin: 0; }
    .nl-signup__action { min-width: 280px; }
    .nl-signup__form { display: flex; gap: .6rem; }
    .nl-signup__form input {
      flex: 1; padding: .7rem 1rem; border-radius: .6rem; border: 1.5px solid rgba(255,255,255,.4);
      background: rgba(255,255,255,.95); font-size: .9rem; outline: none; min-width: 0;
    }
    .nl-signup__form input:focus { border-color: #fff; }
    .nl-signup__hint { color: rgba(255,255,255,.75); font-size: .78rem; margin: .5rem 0 0; }
    .nl-signup__hint--ok { color: #bbf7d0; font-size: .88rem; font-weight: 700; margin: 0 0 .6rem; }
    .nl-signup__action .btn--ghost {
      background: transparent; border: 1.5px solid rgba(255,255,255,.5); color: #fff;
    }
    .nl-signup__action .btn--ghost:hover { background: rgba(255,255,255,.1); }
    .nl-signup__msg { font-size: .85rem; font-weight: 700; margin: .6rem 0 0; min-height: 1.2em; }
    .nl-signup__msg--ok  { color: #bbf7d0; }
    .nl-signup__msg--err { color: #fecaca; }
    @media (max-width: 640px) {
      .nl-signup__inner { flex-direction: column; align-items: stretch; text-align: center; }
      .nl-signup__form { flex-direction: column; }
    }
