/*
 * Copyright (c) 2026 Galiel 3.14 Ltd.
 * All rights reserved.
 * Usage of this file is subject to the terms of the license agreement.
 */

/* =========================================================================
   GLOBAL DESIGN TOKENS — Warm Putty Neumorphism
   (reused verbatim from the homepage — same shared header/grid/card system)
   ========================================================================= */

:root {
  --ai-314-m-pill-h: 1.075rem;
  --ai-314-m-pill-fs: 0.65rem;
  --ai-314-m-pill-row-gap: 8px;
  --ai-314-m-pill-col-gap: 0px;
  --ai-314-m-pill-edge: 4px;
  --ai-314-m-pill-edge-right: 12px;
  /* Set live by Light JS: extra pull that closes the mobile header gap */
  --ai-314-phone-pull: 0px;
  --ai-314-nav-pull: 0px;
  --ai-314-m-pill-inline-pad: 0.3em;
  --ai-314-m-pill-marker-space: 6px;
  --ai-314-m-pill-top-space: 4px;
  --ai-314-phone-bar-h: 24px;
  --ai-314-fs-phone: 0.7rem;
  --ai-314-color-heading-strong: #121110;
  --ai-314-color-on-media-link: #FFE7C7;
  --ai-314-color-on-media: #FFFFFF;
  --ai-314-scrim-strong: rgba(58, 54, 46, 0.65);
  --ai-314-scrim-soft: rgba(58, 54, 46, 0.42);
  --ai-314-text-shadow-on-media:
    -1px -1px 1px rgba(0, 0, 0, 0.85), 1px -1px 1px rgba(0, 0, 0, 0.85),
    -1px 1px 1px rgba(0, 0, 0, 0.85), 1px 1px 1px rgba(0, 0, 0, 0.85),
    0 0 8px rgba(0, 0, 0, 0.9), 0 0 16px rgba(0, 0, 0, 0.8),
    0 0 28px rgba(0, 0, 0, 0.65);
  --ai-314-fw-on-media: 600;
  --ai-314-color-chip-bg: rgba(255, 255, 255, 0.92);
  --ai-314-shadow-chip: rgba(0, 0, 0, 0.25);

  --ai-314-color-bg: white;
  --ai-314-color-surface: #E8E3DA;

  --ai-314-color-text: #3A362E;
  --ai-314-color-text-muted: #7A7367;

  --ai-314-color-brand: #F2871F;
  --ai-314-color-brand-dark: #B85E0F;
  --ai-314-color-accent: #7A8B6F;

  --ai-314-shadow-dark: rgba(166, 150, 124, 0.45);
  --ai-314-shadow-light: rgba(255, 255, 255, 0.85);

  --ai-314-radius-sm: 10px;
  --ai-314-radius-md: 20px;
  --ai-314-radius-lg: 30px;
  --ai-314-radius-pill: 999px;

  --ai-314-space-3xs: 0.25rem;
  --ai-314-space-2xs: 0.5rem;
  --ai-314-space-xs: 0.75rem;
  --ai-314-space-sm: 1rem;
  --ai-314-space-md: 1.5rem;
  --ai-314-space-lg: 2.25rem;
  --ai-314-space-xl: 3.25rem;
  --ai-314-space-2xl: 4.5rem;

  --ai-314-header-h: 64px;
  --ai-314-content-max-w: 1400px;
  --ai-314-gap: clamp(0.75rem, 1.25vw, 1.25rem);

  --ai-314-fs-nav: clamp(0.7rem, 0.65rem + 0.2vw, 0.85rem);
  --ai-314-fs-title: clamp(0.9375rem, 0.85rem + 0.3vw, 1.125rem);
  --ai-314-fs-utility-lg: clamp(0.9rem, 0.8rem + 0.3vw, 1.05rem);
  --ai-314-fs-breadcrumb: clamp(0.6875rem, 0.65rem + 0.1vw, 0.75rem);
  --ai-314-fs-hero-title: clamp(1.125rem, 0.95rem + 1vw, 1.5rem);
  --ai-314-fs-hero-sub: clamp(1rem, 0.9rem + 0.6vw, 1.25rem);
  --ai-314-fs-h4: clamp(1.05rem, 0.95rem + 0.5vw, 1.35rem);
  --ai-314-fs-body: clamp(1rem, 0.95rem + 0.2vw, 1.125rem);
  --ai-314-fs-fine: 0.6875rem;
  --ai-314-fs-sidebar-h: 0.8125rem;
  --ai-314-fs-sidebar-link: 0.875rem;

  /* Scrubbed live by Light JS on scroll, 0 to 0.28 */
  --ai-314-header-shadow-alpha: 0;

  /* Scroll-reveal tuning — consumed by JS at init */
  --ai-314-reveal-margin: 2cm;
  --ai-314-reveal-idle-ms: 1000;
}

/* =========================================================================
   SOFT NEUMORPHISM — "Warm Putty Neumorphism"  (reused from homepage)
   ========================================================================= */

html {
  background: var(--ai-314-color-bg);
  scroll-behavior: smooth;
}

body#modern-ai-root,
body#modern-ai-root * {
  box-sizing: border-box;
}

body#modern-ai-root {
  position: relative;
  background: var(--ai-314-color-bg);
  color: var(--ai-314-color-text);
  font-family: arial, sans-serif;
  font-size: var(--ai-314-fs-body);
  line-height: 1.65;
  overflow-x: hidden;
  min-height: 100vh;
}

body#modern-ai-root::before {
  content: "";
  position: fixed;
  inset-block-start: 0;
  inset-inline: 0;
  height: var(--ai-314-header-h);
  background: var(--ai-314-color-brand);
  box-shadow: 0 4px 12px rgba(0, 0, 0, var(--ai-314-header-shadow-alpha));
  transition: height 0.25s ease, box-shadow 0.15s ease;
  z-index: 30;
  pointer-events: none;
}

body#modern-ai-root a {
  color: var(--ai-314-color-brand-dark);
  text-decoration: none;
  overflow-wrap: anywhere;
}
body#modern-ai-root a:hover,
body#modern-ai-root a:focus-visible {
  text-decoration: underline;
  text-underline-offset: 0.2em;
}
body#modern-ai-root a:focus-visible {
  outline: 2px solid var(--ai-314-color-brand);
  outline-offset: 3px;
  border-radius: 4px;
}

body#modern-ai-root center {
  display: block;
  text-align: center;
}

/* -------------------------------------------------------------------------
   FIXED HEADER
   ------------------------------------------------------------------------- */

body#modern-ai-root div.logo#logo {
  position: fixed;
  inset-block-start: 0;
  inset-inline-start: 0;
  width: auto;
  height: var(--ai-314-header-h);
  display: flex;
  align-items: center;
  padding-inline: var(--ai-314-space-sm);
  background: var(--ai-314-color-brand);
  z-index: 40;
  transition: height 0.25s ease, padding 0.25s ease;
}
body#modern-ai-root div.logo#logo img {
  height: 54px;
  width: auto;
  border-radius: var(--ai-314-radius-sm);
  box-shadow:
    3px 3px 6px var(--ai-314-shadow-dark),
    -3px -3px 6px var(--ai-314-shadow-light);
  transition: height 0.25s ease;
}

body#modern-ai-root div.hh1#mh1 {
  position: fixed;
  inset-block-start: 0;
  inset-inline-start: 84px;
  height: var(--ai-314-header-h);
  display: flex;
  align-items: center;
  background: var(--ai-314-color-brand);
  padding-inline-end: var(--ai-314-space-sm);
  z-index: 39;
  max-width: calc(100vw - 84px);
  transition: height 0.25s ease, padding 0.25s ease;
}
body#modern-ai-root div.hh1#mh1 a[href="/"] {
  color: var(--ai-314-color-text);
  font-size: var(--ai-314-fs-title);
  font-weight: 700;
  line-height: 1.2;
  display: block;
  overflow-wrap: anywhere;
  word-break: break-word;
  transition: font-size 0.25s ease;
}
body#modern-ai-root div.hh1#mh1 a[href="/"]:hover {
  text-decoration: none;
  color: var(--ai-314-color-brand-dark);
}

body#modern-ai-root div#outerNav {
  position: fixed;
  inset-block-start: 0;
  inset-inline-end: 0;
  height: var(--ai-314-header-h);
  display: flex;
  align-items: center;
  background: var(--ai-314-color-brand);
  padding-inline: var(--ai-314-space-sm);
  z-index: 38;
  max-width: 65vw;
  font-size: var(--ai-314-fs-nav);
  line-height: 1;
  transition: height 0.25s ease, padding 0.25s ease;
}

body#modern-ai-root div#outerNav #nav {
  direction: rtl;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-start;
  gap: var(--ai-314-space-2xs);
  width: 100%;
  height: 100%;
  line-height: 1;
  padding: 0;
  overflow-x: auto;
  overflow-y: hidden;
  white-space: nowrap;
  scrollbar-width: none;
}
body#modern-ai-root div#outerNav #nav::-webkit-scrollbar {
  display: none;
}
body#modern-ai-root div#outerNav #nav a {
  flex: 0 0 auto;
  color: var(--ai-314-color-text);
  font-size: var(--ai-314-fs-nav);
  font-weight: 600;
  line-height: 1;
  padding: 0.4em 0.75em;
  border-radius: var(--ai-314-radius-pill);
  white-space: nowrap;
  background: var(--ai-314-color-bg);
  box-shadow:
    3px 3px 6px var(--ai-314-shadow-dark),
    -3px -3px 6px var(--ai-314-shadow-light);
  transition: box-shadow 0.2s ease, padding 0.25s ease;
}
body#modern-ai-root div#outerNav #nav a:hover,
body#modern-ai-root div#outerNav #nav a:focus-visible {
  color: var(--ai-314-color-brand-dark);
  text-decoration: none;
  box-shadow:
    inset 2px 2px 5px var(--ai-314-shadow-dark),
    inset -2px -2px 5px var(--ai-314-shadow-light);
}

body#modern-ai-root div#bellow-logo {
  min-height: var(--ai-314-header-h);
  width: 100%;
  transition: min-height 0.25s ease;
}

body#modern-ai-root div.hh2#mh2 {
  /* full viewport width, flush under the fixed header (cancels the grid gap) */
  width: 100vw;
  max-width: 100vw;
  height: var(--ai-314-phone-bar-h);
  min-height: 0;
  margin-inline: calc(50% - 50vw);
  margin-block: calc(-1 * var(--ai-314-gap)) 0;
  background: var(--ai-314-color-bg);
  box-shadow:
    inset 3px 3px 8px var(--ai-314-shadow-dark),
    inset -3px -3px 8px var(--ai-314-shadow-light);
  padding-block: 0;
  padding-inline: var(--ai-314-space-sm);
  display: flex;
  align-items: center;
  direction: ltr;
  justify-content: flex-start;
}
body#modern-ai-root div.hh2#mh2 big {
  margin: 0;
  font-size: var(--ai-314-fs-phone);
  line-height: 1;
  transition: font-size 0.25s ease;
}
body#modern-ai-root div.hh2#mh2 span {
  display: inline-block;
  margin: 0;
  padding: 0;
  font-size: var(--ai-314-fs-phone);
  line-height: 1;
  letter-spacing: 0.02em;
  background: transparent;
  border-radius: 0;
  box-shadow: none;
  transition: font-size 0.25s ease;
}

body#modern-ai-root div.path {
  width: 100%;
  padding-inline: var(--ai-314-space-sm);
  padding-block: var(--ai-314-space-3xs);
  font-size: var(--ai-314-fs-breadcrumb);
  color: var(--ai-314-color-text-muted);
  display: block;
  text-align: right;
}

body#modern-ai-root > br {
  display: none;
}

body#modern-ai-root > p.outerP,
body#modern-ai-root .mainSection > p:empty,
body#modern-ai-root .mainSection > p:has(> span:only-child:empty) {
  margin: 0;
  min-height: 0;
}

/* -------------------------------------------------------------------------
   COMPACT HEADER STATE
   ------------------------------------------------------------------------- */

body#modern-ai-root.ai-is-scrolled {
  --ai-314-header-h: 48px;
}

body#modern-ai-root.ai-is-scrolled div.logo#logo img {
  height: 34px;
}
body#modern-ai-root.ai-is-scrolled div.hh1#mh1 a[href="/"] {
  font-size: 0.85rem;
}
body#modern-ai-root.ai-is-scrolled div#outerNav #nav a {
  padding: 0.3em 0.6em;
}

@media (prefers-reduced-motion: reduce) {
  body#modern-ai-root,
  body#modern-ai-root div.logo#logo,
  body#modern-ai-root div.logo#logo img,
  body#modern-ai-root div.hh1#mh1,
  body#modern-ai-root div.hh1#mh1 a[href="/"],
  body#modern-ai-root div#outerNav,
  body#modern-ai-root div#outerNav #nav a,
  body#modern-ai-root div#bellow-logo,
  body#modern-ai-root div.hh2#mh2,
  body#modern-ai-root div.hh2#mh2 big,
  body#modern-ai-root div.hh2#mh2 span,
  body#modern-ai-root::before {
    transition: none;
  }
}

/* -------------------------------------------------------------------------
   GRID
   ------------------------------------------------------------------------- */

body#modern-ai-root {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--ai-314-gap);
  max-width: var(--ai-314-content-max-w);
  margin-inline: auto;
  padding-inline: var(--ai-314-space-sm);
  padding-block-end: var(--ai-314-space-2xl);
  align-items: start;
}

body#modern-ai-root div.hh2#mh2,
body#modern-ai-root div.path,
body#modern-ai-root div.mainSection,
body#modern-ai-root div.toplink,
body#modern-ai-root div#footer,
body#modern-ai-root div#local .active,
body#modern-ai-root div#local .localSection {
  grid-column: 1 / -1;
}

body#modern-ai-root div#local.side {
  display: contents;
}

/* -------------------------------------------------------------------------
   REORDER — move the sidebar's first section (div#local .active, the
   "תוכנית..." quick-links block) to sit just below the phone-number bar,
   ahead of the breadcrumb/hero/cards. DOM order stays untouched (it's
   still physically near the bottom of the document, right before
   .toplink) — this is pure visual reordering via CSS Grid's `order`.
   Because #local is display:contents, .active is already a direct item
   of this top-level grid, so it can be pulled forward on its own.

   #outerNav is included here too: it's position:fixed (and so excluded
   from grid placement entirely) at desktop widths, where this order
   value is simply inert — but at ≤959px it switches to position:static
   (see the MOBILE/TABLET HEADER ADJUSTMENTS block) and becomes a real
   grid item for the first time. Left at the default order:0 it sorted
   itself AFTER the quick-links block; giving it an explicit spot ahead
   of .active puts the main site menu above the quick-links, as it
   should read.

   Only the four items below get an explicit order; every other grid
   item keeps the default `order: 0` and so keeps its existing relative
   sequence (ties are broken by original DOM order). */
body#modern-ai-root > div#bellow-logo {
  order: -4;
}
body#modern-ai-root div.hh2#mh2 {
  order: -3;
}
body#modern-ai-root div#outerNav {
  order: -2;
}
body#modern-ai-root div#local .active {
  order: -1;
}

@media (min-width: 960px) {
  body#modern-ai-root {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body#modern-ai-root div.hh2#mh2,
  body#modern-ai-root div.path,
  body#modern-ai-root div.mainSection,
  body#modern-ai-root div.toplink,
  body#modern-ai-root div#footer,
  body#modern-ai-root div#local .active {
    grid-column: span 2;
  }

  body#modern-ai-root div.mainSection:has(> h4#vickathon-redirect),
  body#modern-ai-root div.mainSection:has(> h4#teach-entrepreneurship) {
    grid-column: span 1;
  }

  body#modern-ai-root div#local .localSection {
    grid-column: span 1;
  }
}

/* -------------------------------------------------------------------------
   HERO — .mainSection.topMainSection
   ------------------------------------------------------------------------- */

body#modern-ai-root div.mainSection.topMainSection {
  background: var(--ai-314-color-bg);
  color: var(--ai-314-color-text);
  border-radius: var(--ai-314-radius-lg);
  padding: var(--ai-314-space-xl) var(--ai-314-space-md);
  margin-block-start: var(--ai-314-space-sm);
  box-shadow:
    10px 10px 22px var(--ai-314-shadow-dark),
    -10px -10px 22px var(--ai-314-shadow-light);
  position: relative;
  overflow: hidden;
}
body#modern-ai-root div.mainSection.topMainSection::before {
  content: "";
  position: absolute;
  inset-inline-end: -50px;
  inset-block-start: -50px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: var(--ai-314-color-bg);
  box-shadow:
    inset 6px 6px 14px var(--ai-314-shadow-dark),
    inset -6px -6px 14px var(--ai-314-shadow-light);
  opacity: 0.6;
  pointer-events: none;
}
body#modern-ai-root div.mainSection.topMainSection::after {
  content: "";
  position: absolute;
  inset-inline-start: -40px;
  inset-block-end: -40px;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: var(--ai-314-color-bg);
  box-shadow:
    inset 6px 6px 14px var(--ai-314-shadow-dark),
    inset -6px -6px 14px var(--ai-314-shadow-light);
  opacity: 0.5;
  pointer-events: none;
}
body#modern-ai-root div.mainSection.topMainSection h1 {
  position: relative;
  z-index: 1;
  font-size: var(--ai-314-fs-hero-title);
  line-height: 1.4;
  margin: 0;
}
body#modern-ai-root div.mainSection.topMainSection h1 center:first-child {
  margin-block-end: var(--ai-314-space-xs);
}
body#modern-ai-root div.mainSection.topMainSection h1 small {
  font-size: var(--ai-314-fs-hero-sub);
  font-weight: 400;
  color: var(--ai-314-color-text-muted);
  display: inline-block;
}

/* -------------------------------------------------------------------------
   NEUMORPHIC CARDS — every other .mainSection
   ------------------------------------------------------------------------- */

body#modern-ai-root div.mainSection:not(.topMainSection) {
  background: var(--ai-314-color-bg);
  color: var(--ai-314-color-text);
  border-radius: var(--ai-314-radius-md);
  padding: var(--ai-314-space-lg) var(--ai-314-space-md);
  box-shadow:
    8px 8px 18px var(--ai-314-shadow-dark),
    -8px -8px 18px var(--ai-314-shadow-light);
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}
body#modern-ai-root div.mainSection:not(.topMainSection):hover {
  box-shadow:
    10px 10px 22px var(--ai-314-shadow-dark),
    -10px -10px 22px var(--ai-314-shadow-light);
  transform: translateY(-2px);
}

body#modern-ai-root div.mainSection:has(> h4#yourturn),
body#modern-ai-root div.mainSection:has(> h4#ba1y) {
  box-shadow:
    inset 6px 6px 14px var(--ai-314-shadow-dark),
    inset -6px -6px 14px var(--ai-314-shadow-light);
}
body#modern-ai-root div.mainSection:has(> h4#yourturn):hover,
body#modern-ai-root div.mainSection:has(> h4#ba1y):hover {
  transform: none;
}

body#modern-ai-root .mainSection h4 {
  margin: 0 0 var(--ai-314-space-sm);
  padding-inline-start: var(--ai-314-space-xs);
  border-inline-start: 4px solid var(--ai-314-color-brand);
}
body#modern-ai-root .mainSection h4 big {
  font-size: var(--ai-314-fs-h4);
}
body#modern-ai-root .mainSection h4 span {
  letter-spacing: 0.01em;
}

body#modern-ai-root .mainSection p {
  margin: 0 0 var(--ai-314-space-sm);
  color: var(--ai-314-color-text);
}
body#modern-ai-root .mainSection p:last-child {
  margin-block-end: 0;
}
body#modern-ai-root .mainSection p a {
  color: var(--ai-314-color-brand-dark);
  font-weight: 600;
  border-bottom: 1px solid currentColor;
}
body#modern-ai-root .mainSection p a:hover {
  color: var(--ai-314-color-accent);
}

/* Emphasized inline text (quotes, check marks) is deliberately left
   unwrapped: no pill, fill, padding or shadow. */
body#modern-ai-root p.shadow-box span > span {
  color: var(--ai-314-color-accent);
}

body#modern-ai-root p.shadow-box {
  background: var(--ai-314-color-bg);
  border-radius: var(--ai-314-radius-md);
  padding: var(--ai-314-space-md);
  box-shadow:
    inset 5px 5px 12px var(--ai-314-shadow-dark),
    inset -5px -5px 12px var(--ai-314-shadow-light);
}
body#modern-ai-root p.shadow-box strong {
  display: block;
  margin-block-end: var(--ai-314-space-2xs);
  color: var(--ai-314-color-brand-dark);
}

body#modern-ai-root .mainSection img.an-img {
  border-radius: var(--ai-314-radius-md);
  box-shadow:
    6px 6px 14px var(--ai-314-shadow-dark),
    -6px -6px 14px var(--ai-314-shadow-light);
}
body#modern-ai-root .mainSection img.an-img.mix-blend {
  mix-blend-mode: multiply;
}

body#modern-ai-root .mainSection > div:has(> div > iframe) {
  border-radius: var(--ai-314-radius-md);
  box-shadow:
    6px 6px 14px var(--ai-314-shadow-dark),
    -6px -6px 14px var(--ai-314-shadow-light);
  overflow: hidden;
}
body#modern-ai-root .mainSection > div:has(> div > iframe) > div {
  border-radius: inherit;
}

/* -------------------------------------------------------------------------
   LISTS — ul/li inside a card (this page's "conditions" section; the
   homepage has no bare lists, so this is new). Kept inside the same
   .mainSection typography scale/spacing tokens as everything else.
   ------------------------------------------------------------------------- */

body#modern-ai-root .mainSection ul {
  list-style: none;
  margin: 0 0 var(--ai-314-space-sm);
  padding-inline-start: 1.4em;
}
body#modern-ai-root .mainSection ul li {
  position: relative;
  margin-block-end: var(--ai-314-space-2xs);
  line-height: 1.6;
}
body#modern-ai-root .mainSection ul li::before {
  content: "";
  position: absolute;
  inset-inline-start: -1.1em;
  top: 0.7em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ai-314-color-brand);
}

/* -------------------------------------------------------------------------
   BARE IFRAME — the Google Maps embed on this page sits as a direct
   child of .mainSection (no div>div wrapper like the Canva/YouTube
   embeds elsewhere), and has no ai-orig-locked attributes at all, so
   it's fully restyled here rather than reusing the div-wrapped rule.
   ------------------------------------------------------------------------- */

body#modern-ai-root .mainSection > iframe {
  display: block;
  width: 100%;
  max-width: 453px;
  height: 800px;
  margin-inline: auto;
  border: 0;
  border-radius: var(--ai-314-radius-md);
  box-shadow:
    6px 6px 14px var(--ai-314-shadow-dark),
    -6px -6px 14px var(--ai-314-shadow-light);
}

/* -------------------------------------------------------------------------
   CAROUSEL — #slider-1 (Slick)
   ------------------------------------------------------------------------- */

body#modern-ai-root #slider-1 {
  margin-block: var(--ai-314-space-md);
  border-radius: var(--ai-314-radius-lg);
  overflow: hidden;
  box-shadow:
    8px 8px 18px var(--ai-314-shadow-dark),
    -8px -8px 18px var(--ai-314-shadow-light);
  background: var(--ai-314-color-bg);
}
body#modern-ai-root #slider-1 .slick-list {
  border-radius: inherit;
}
body#modern-ai-root #slider-1 .slick-slide > div {
  border-radius: inherit;
}
body#modern-ai-root #slider-1 .slick-slide div:has(> iframe) {
  overflow: hidden;
  border-radius: var(--ai-314-radius-lg);
}
body#modern-ai-root #slider-1 .slick-prev.slick-arrow,
body#modern-ai-root #slider-1 .slick-next.slick-arrow {
  width: 46px;
  height: 46px;
  background: var(--ai-314-color-bg);
  border: none;
  border-radius: 50%;
  box-shadow:
    4px 4px 9px var(--ai-314-shadow-dark),
    -4px -4px 9px var(--ai-314-shadow-light);
  font-size: 0;
  transition: box-shadow 0.2s ease;
}
body#modern-ai-root #slider-1 .slick-prev.slick-arrow:hover,
body#modern-ai-root #slider-1 .slick-next.slick-arrow:hover {
  box-shadow:
    inset 3px 3px 7px var(--ai-314-shadow-dark),
    inset -3px -3px 7px var(--ai-314-shadow-light);
}
body#modern-ai-root #slider-1 .slick-prev.slick-arrow::before,
body#modern-ai-root #slider-1 .slick-next.slick-arrow::before {
  color: var(--ai-314-color-brand-dark);
  font-size: 1.1rem;
  opacity: 1;
}
body#modern-ai-root #slider-1 .slick-disabled {
  opacity: 0.4;
}
body#modern-ai-root #slider-1 .slick-dots {
  display: flex;
  justify-content: center;
  gap: var(--ai-314-space-2xs);
  padding-inline-start: 0;
}
body#modern-ai-root #slider-1 .slick-dots li button {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--ai-314-color-bg);
  border: none;
  box-shadow:
    inset 1.5px 1.5px 3px var(--ai-314-shadow-dark),
    inset -1.5px -1.5px 3px var(--ai-314-shadow-light);
  font-size: 0;
  padding: 0;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
body#modern-ai-root #slider-1 .slick-dots li.slick-active button {
  box-shadow:
    2px 2px 5px var(--ai-314-shadow-dark),
    -2px -2px 5px var(--ai-314-shadow-light);
  transform: scale(1.2);
}

/* -------------------------------------------------------------------------
   FORMER-SIDEBAR CARDS
   ------------------------------------------------------------------------- */

body#modern-ai-root div#local .active,
body#modern-ai-root div#local .localSection {
  background: var(--ai-314-color-bg);
  border-radius: var(--ai-314-radius-md);
  padding: var(--ai-314-space-lg) var(--ai-314-space-md);
  box-shadow:
    8px 8px 18px var(--ai-314-shadow-dark),
    -8px -8px 18px var(--ai-314-shadow-light);
  font-size: var(--ai-314-fs-fine);
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}
body#modern-ai-root div#local .active:hover,
body#modern-ai-root div#local .localSection:hover {
  box-shadow:
    10px 10px 22px var(--ai-314-shadow-dark),
    -10px -10px 22px var(--ai-314-shadow-light);
  transform: translateY(-2px);
}

body#modern-ai-root div#local h5 {
  margin: 0 0 var(--ai-314-space-sm);
  font-size: var(--ai-314-fs-sidebar-h);
  font-weight: 700;
  color: var(--ai-314-color-brand-dark);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
body#modern-ai-root div#local h5 a {
  color: inherit;
}
body#modern-ai-root div#local .active h5::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ai-314-color-brand);
  margin-inline-end: 0.5em;
  vertical-align: middle;
}

body#modern-ai-root div#local .active ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: var(--ai-314-space-2xs);
}
body#modern-ai-root div#local .active ul li {
  flex: 0 1 auto;
}
body#modern-ai-root div#local .active ul li::before {
  content: none; /* don't inherit the generic card bullet dot above */
}
body#modern-ai-root div#local .active ul li a {
  display: inline-block;
  font-size: var(--ai-314-fs-sidebar-link);
  color: var(--ai-314-color-text);
  background-color: var(--ai-314-color-bg);
  padding: 0.45em 0.9em;
  border-radius: var(--ai-314-radius-pill);
  box-shadow:
    3px 3px 7px var(--ai-314-shadow-dark),
    -3px -3px 7px var(--ai-314-shadow-light);
  transition: box-shadow 0.2s ease, color 0.2s ease;
  white-space: normal;
  overflow-wrap: anywhere;
}
body#modern-ai-root div#local .active ul li a:hover,
body#modern-ai-root div#local .active ul li a:focus-visible {
  background-color: var(--ai-314-color-bg);
  color: var(--ai-314-color-brand-dark);
  text-decoration: none;
  box-shadow:
    inset 2px 2px 5px var(--ai-314-shadow-dark),
    inset -2px -2px 5px var(--ai-314-shadow-light);
}

body#modern-ai-root div#local .localSection div a {
  display: flex;
  align-items: center;
  gap: 0.5em;
  font-size: var(--ai-314-fs-sidebar-link);
  font-weight: 600;
  color: var(--ai-314-color-brand-dark);
  background-color: var(--ai-314-color-bg);
  padding: 0.4em 0.6em;
  border-radius: var(--ai-314-radius-sm);
  text-decoration: underline;
  text-underline-offset: 0.2em;
  transition: box-shadow 0.2s ease, color 0.2s ease;
}
body#modern-ai-root div#local .localSection div a::before {
  content: "";
  flex: 0 0 auto;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--ai-314-color-brand);
}
body#modern-ai-root div#local .localSection div a:hover,
body#modern-ai-root div#local .localSection div a:focus-visible {
  background-color: var(--ai-314-color-bg);
  color: var(--ai-314-color-brand);
  text-decoration: underline;
  box-shadow:
    inset 2px 2px 5px var(--ai-314-shadow-dark),
    inset -2px -2px 5px var(--ai-314-shadow-light);
}

/* -------------------------------------------------------------------------
   COMPACT QUICK-LINKS OVERRIDE — div#local .active, now relocated (see
   the `order:-1` rule in the GRID section above) to sit directly under
   the phone bar. Same selectors as the base sidebar-card rules above,
   so this wins purely on source order (declared later) — no !important
   needed. Header hidden (kept in the DOM per the lock constraints, just
   not rendered), card chrome (padding/shadow/radius/hover-lift) dropped,
   buttons shrunk (smaller again on narrow/mobile screens).
   Spacing: the phone bar's own `margin-block-end` is zeroed directly
   (safe now that .active always immediately follows it) rather than
   trying to out-negative it from this side — compounding two separate
   negative-margin subtractions here previously overshot at mobile
   widths, visually pushing this block up above the phone bar entirely.
   Only the grid's own `gap` (which already scales sanely with the
   viewport via clamp()) needs cancelling now.
   ------------------------------------------------------------------------- */

body#modern-ai-root div#local .active h5 {
  display: none;
}
body#modern-ai-root div#local .active {
  margin-block-start: calc(-1 * var(--ai-314-gap));
  padding: var(--ai-314-space-xs) var(--ai-314-space-sm);
  box-shadow: none;
  border-radius: 0;
}
body#modern-ai-root div#local .active:hover {
  box-shadow: none;
  transform: none;
}
body#modern-ai-root div#local .active ul li a {
  font-size: 0.6rem;
  padding: 0.25em 0.5em;
}

@media (max-width: 640px) {
  body#modern-ai-root div#local .active ul li a {
    font-size: 0.5rem;
  }
}

/* -------------------------------------------------------------------------
   BACK-TO-TOP + FOOTER
   ------------------------------------------------------------------------- */

body#modern-ai-root div.toplink {
  display: flex;
  justify-content: center;
  padding-block: var(--ai-314-space-sm);
}
body#modern-ai-root div.toplink a {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  background: var(--ai-314-color-bg);
  border-radius: var(--ai-314-radius-pill);
  padding: 0.55em 1.2em;
  font-size: var(--ai-314-fs-fine);
  font-weight: 600;
  color: var(--ai-314-color-text);
  box-shadow:
    4px 4px 9px var(--ai-314-shadow-dark),
    -4px -4px 9px var(--ai-314-shadow-light);
  transition: box-shadow 0.2s ease;
}
body#modern-ai-root div.toplink a:hover {
  color: var(--ai-314-color-brand-dark);
  text-decoration: none;
  box-shadow:
    inset 3px 3px 7px var(--ai-314-shadow-dark),
    inset -3px -3px 7px var(--ai-314-shadow-light);
}
body#modern-ai-root div.toplink img {
  filter: grayscale(1) contrast(0.85);
  opacity: 0.75;
}

body#modern-ai-root div#footer {
  background: var(--ai-314-color-bg);
  color: var(--ai-314-color-text-muted);
  border-radius: var(--ai-314-radius-md);
  padding: var(--ai-314-space-sm) var(--ai-314-space-md);
  margin-block-start: var(--ai-314-space-sm);
  font-size: var(--ai-314-fs-fine);
  min-height: 48px;
  box-shadow:
    inset 4px 4px 10px var(--ai-314-shadow-dark),
    inset -4px -4px 10px var(--ai-314-shadow-light);
}
body#modern-ai-root div#footer > div {
  color: inherit;
}
body#modern-ai-root div#footer a {
  color: var(--ai-314-color-brand-dark);
  text-decoration: underline;
}

/* -------------------------------------------------------------------------
   MOBILE/TABLET HEADER ADJUSTMENTS — below 960px
   ------------------------------------------------------------------------- */

@media (max-width: 959px) {
  :root {
    --ai-314-header-h: 54px;
  }

  body#modern-ai-root div.logo#logo img {
    height: 40px;
  }

  body#modern-ai-root div.hh1#mh1 {
    inset-inline-start: 64px;
    max-width: calc(100vw - 64px);
  }
  body#modern-ai-root div.hh1#mh1 a[href="/"] {
    font-size: 0.8rem;
  }

  body#modern-ai-root div#outerNav {
    position: static;
    height: auto;
    width: calc(100% + (2 * var(--ai-314-space-sm)));
    max-width: none;
    margin-inline: calc(-1 * var(--ai-314-space-sm));
    padding-inline: var(--ai-314-space-sm);
    padding-block: var(--ai-314-space-2xs);
    margin-block-end: var(--ai-314-space-xs);
    z-index: 1;
  }
  body#modern-ai-root div#outerNav #nav {
    height: auto;
    direction: rtl;
    flex-wrap: wrap;
    justify-content: flex-start;
    overflow-x: visible;
    white-space: normal;
  }
  body#modern-ai-root div#outerNav #nav a {
    font-size: 0.7rem;
    padding: 0.35em 0.6em;
  }
}

/* 1. Hide empty elements that break the 2-column grid */
body#modern-ai-root > p.outerP,
body#modern-ai-root .mainSection > p:empty,
body#modern-ai-root .mainSection > p:has(> span:only-child:empty),
body#modern-ai-root > div#bellow-logo {
  display: none;
}

/* 2. Remove the dark gray margin, force the grid to occupy full width */
html,
body#modern-ai-root {
  margin: 0 !important;
}
body#modern-ai-root {
  max-width: 100% !important;
}

/* 3. Prevent legacy yellow hover background on sidebar list items */
body#modern-ai-root div#local li:hover {
  background: transparent;
  background-color: transparent;
}

/* 1. Paint the deepest background layer to remove the dark gray permanently */
html,
body {
  background: var(--ai-314-color-bg) !important;
  background-color: var(--ai-314-color-bg) !important;
}

/* 2. Restore/center the layout container width */
body#modern-ai-root {
  max-width: 1400px !important;
  margin-inline: auto !important;
}

/* 3. Force cards to ignore legacy max-widths and fill their grid columns */
body#modern-ai-root div.mainSection,
body#modern-ai-root div#local .active,
body#modern-ai-root div#local .localSection {
  width: 100%;
  max-width: 100%;
  margin-inline: 0;
  box-sizing: border-box;
}

/* 1. Restore the invisible spacer, spanning the whole grid width */
body#modern-ai-root > div#bellow-logo {
  display: block;
  grid-column: 1 / -1;
}

/* 2. Let the slider's arrows/shadows spill out of its own bounds */
body#modern-ai-root #slider-1 {
  overflow: visible;
}

/* 3. Re-clip only the inner track, keeping images' rounded corners */
body#modern-ai-root #slider-1 .slick-list {
  border-radius: var(--ai-314-radius-lg);
  overflow: hidden;
}

/* =========================================================================
   FIX — sidebar-card header contrast (div#local h5)
   ========================================================================= */

body#modern-ai-root div#local .active,
body#modern-ai-root div#local .localSection,
body#modern-ai-root div#local h5,
body#modern-ai-root div#local h5 a {
  opacity: 1 !important;
  filter: none !important;
  mix-blend-mode: normal !important;
}
body#modern-ai-root div#local h5 {
  color: var(--ai-314-color-heading-strong);
  font-weight: 800;
}
body#modern-ai-root div#local h5 a {
  color: var(--ai-314-color-heading-strong);
}

/* =========================================================================
   SCROLL-REVEAL FADE-IN
   ========================================================================= */

.ai-fade-ready {
  opacity: 0;
  transform: translateY(16px);
}
body#modern-ai-root div.mainSection.ai-fade-ready,
body#modern-ai-root div#local .active.ai-fade-ready,
body#modern-ai-root div#local .localSection.ai-fade-ready {
  transition: opacity 0.5s ease, transform 0.5s ease, box-shadow 0.25s ease;
}
.ai-fade-ready.ai-is-visible {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .ai-fade-ready {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

@media (max-width: 640px) {
  :root {
    --ai-314-reveal-margin: 12%;
  }
  .ai-fade-ready {
    transform: translateY(32px);
  }
  body#modern-ai-root div.mainSection.ai-fade-ready,
  body#modern-ai-root div#local .active.ai-fade-ready,
  body#modern-ai-root div#local .localSection.ai-fade-ready {
    transition: opacity 0.7s ease, transform 0.7s ease, box-shadow 0.25s ease;
  }
}

/* =========================================================================
   FULL-BLEED VIDEO / IMAGE BACKGROUND SECTIONS — div.bgdWrapper
   Two instances on this page:
     1) a looping <video class="deskVid"> + poster <img class="mobileVid">
     2) CSS background-image layers (div.bgdDesktopImg / .bgdMobileImg)

   Lock notes:
   - .bgdWrapper locks position/overflow-x/overflow-y only → width/margin
     are used here for the viewport breakout; overflow is NEVER redeclared.
   - video.deskVid locks opacity only → free to position/size.
   - img.mobileVid locks object-fit + opacity → sized/positioned here,
     those two properties are left completely alone.
   - .bgdDesktopImg / .bgdMobileImg lock position + all four insets +
     background-image/size/attachment/opacity → only z-index/display
     are touched here; legacy JS is trusted to fill the wrapper.
   - The h4's inner <span> locks `color` → instead of fighting that, the
     heading gets its own light chip (CSS Judo), so whatever color legacy
     JS applies stays legible over the footage without ever touching it.

   RESIZE — confirmed from the live page's actual CSS: the original site
   never used object-fit. It sizes the video with the pre-object-fit
   "cover" trick (absolute + top/left:50% + min-width/min-height:100% +
   width/height:auto + a centering transform), gated to desktop widths.
   That exact technique is reused below (un-gated, since the mobile swap
   to a static poster is handled separately further down), so it covers
   the new, larger full-bleed wrapper instead of the old narrower one.

   PINNING — the live CSS above is plain `position: absolute`: the
   original design never pinned this video while scrolling, so there is
   no "restore the original" pure-CSS path here. Two no-JS options exist
   in general (background-attachment:fixed, position:sticky) and neither
   applies: background-attachment only paints a CSS background-image,
   never a live <video>'s own frames (or a plain <img>'s own rendered
   content, for that matter); and sticky's containing scroll ancestor
   here is .bgdWrapper itself, whose overflow:hidden is locked and never
   scrolls internally, which collapses sticky to behaving like static.
   The JS-enhanced block below adds real pinning on top of the CSS
   baseline, for both the desktop <video> and the mobile poster <img> —
   without that script, the baseline (scrolls normally, still fully
   covers the section) is what renders; nothing breaks.
   ========================================================================= */

body#modern-ai-root div.bgdWrapper {
  grid-column: 1 / -1;
  width: 100vw;
  max-width: 100vw;
  margin-inline-start: calc(50% - 50vw);
  margin-inline-end: calc(50% - 50vw);
  padding-block: var(--ai-314-space-xl);
}

/* Baseline (works with no JS at all): the exact technique already
   confirmed live on this page, re-declared here with enough specificity
   to win regardless of the legacy rule's own @media gate. `opacity` is
   the only locked property on this element and is never touched. */
body#modern-ai-root div.bgdWrapper video.deskVid {
  display: block !important;
  position: absolute !important;
  z-index: 0;
  top: 50% !important;
  left: 50% !important;
  min-width: 100% !important;
  min-height: 100% !important;
  width: auto !important;
  height: auto !important;
  transform: translateX(-50%) translateY(-50%) !important;
  pointer-events: none;
}

/* Enhanced (JS-confirmed) state — genuinely pinned to the viewport, not
   a scroll-driven approximation. ai_theme_initPinnedBgdVideo() adds
   .ai-js-pin-ready to <body> only once it can reliably manage
   visibility, so this rule never applies unless that script actually
   ran. Sizing keeps the same min-width/min-height + centering-transform
   technique (scaled to the viewport instead of the wrapper) so the
   video never distorts; a second class, toggled by an
   IntersectionObserver watching .bgdWrapper, controls visibility so the
   video only ever paints while its section is on screen — this also
   stops the now-viewport-fixed video from visually covering later,
   unrelated sections once scrolled past. */
body#modern-ai-root.ai-js-pin-ready div.bgdWrapper video.deskVid {
  position: fixed !important;
  top: 50% !important;
  left: 50% !important;
  min-width: 100vw !important;
  min-height: 100vh !important;
  width: auto !important;
  height: auto !important;
  transform: translateX(-50%) translateY(-50%) !important;
  visibility: hidden;
}
body#modern-ai-root.ai-js-pin-ready div.bgdWrapper video.deskVid.ai-bgd-active {
  visibility: visible;
}

/* Baseline: same off-object-fit scaling trick as the desktop video.
   object-fit is locked to `contain` on this element, which would
   letterbox it under normal width/height:100% sizing — but object-fit
   only matters when the box's aspect ratio differs from the image's,
   and this technique keeps them identical by scaling the box itself
   (min-width/min-height + width/height:auto), so the lock is never
   touched and never gets a chance to matter. */
body#modern-ai-root div.bgdWrapper img.mobileVid {
  display: none; /* shown only below 640px, see media query */
  position: absolute;
  z-index: 0;
  top: 50%;
  left: 50%;
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  transform: translateX(-50%) translateY(-50%);
  pointer-events: none;
}

/* Enhanced (JS-confirmed) pinned state — same mechanism as the desktop
   video above. A static image has none of the decode/iOS-toolbar
   concerns that keep the <video> desktop-only, so mobile gets the pin
   effect too, just with the lighter-weight poster image standing in. */
body#modern-ai-root.ai-js-pin-ready div.bgdWrapper img.mobileVid {
  position: fixed;
  top: 50%;
  left: 50%;
  min-width: 100vw;
  min-height: 100vh;
  width: auto;
  height: auto;
  transform: translateX(-50%) translateY(-50%);
  visibility: hidden;
}
body#modern-ai-root.ai-js-pin-ready div.bgdWrapper img.mobileVid.ai-bgd-active {
  visibility: visible;
}
body#modern-ai-root div.bgdWrapper div.bgdDesktopImg {
  z-index: 0;
}
body#modern-ai-root div.bgdWrapper div.bgdMobileImg {
  display: none; /* swapped in below 640px */
  z-index: 0;
}

@media (max-width: 640px) {
  /* Video is never shown on mobile — heavier to decode continuously
     than most phones want, regardless of JS/pin state. The static
     poster image takes over as the section's background instead, and
     picks up the same pin-while-scrolling treatment when JS is active. */
  body#modern-ai-root div.bgdWrapper video.deskVid,
  body#modern-ai-root.ai-js-pin-ready div.bgdWrapper video.deskVid {
    display: none !important;
  }
  body#modern-ai-root div.bgdWrapper img.mobileVid,
  body#modern-ai-root.ai-js-pin-ready div.bgdWrapper img.mobileVid {
    display: block;
  }
  body#modern-ai-root div.bgdWrapper div.bgdDesktopImg {
    display: none;
  }
  body#modern-ai-root div.bgdWrapper div.bgdMobileImg {
    display: block;
  }
}

/* Legibility scrim above the footage, below the text */
body#modern-ai-root div.bgdWrapper::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    var(--ai-314-scrim-strong) 0%,
    var(--ai-314-scrim-soft) 45%,
    var(--ai-314-scrim-strong) 100%
  );
}

/* The card: full width, transparent, chrome stripped. Specificity
   (1 id, 2 classes, 2 types) beats the base neumorphic-card rule
   (1 id, 2 classes, 1 type) — no !important needed. */
body#modern-ai-root div.bgdWrapper div.mainSection {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 100%;
  background: transparent;
  box-shadow: none;
  border-radius: 0;
}
body#modern-ai-root div.bgdWrapper div.mainSection:hover {
  box-shadow: none;
  transform: none;
}

/* Readable text measure, no wrapper elements added */
body#modern-ai-root div.bgdWrapper div.mainSection > p,
body#modern-ai-root div.bgdWrapper div.mainSection > ul {
  max-width: var(--ai-314-content-max-w);
  margin-inline: auto;
}
body#modern-ai-root div.bgdWrapper div.mainSection p,
body#modern-ai-root div.bgdWrapper div.mainSection li,
body#modern-ai-root div.bgdWrapper div.mainSection a {
  color: var(--ai-314-color-on-media);
  text-shadow: var(--ai-314-text-shadow-on-media);
  font-weight: var(--ai-314-fw-on-media);
}
body#modern-ai-root div.bgdWrapper div.mainSection p a {
  color: var(--ai-314-color-on-media-link);
  border-bottom-color: currentColor;
}
body#modern-ai-root div.bgdWrapper div.mainSection p a:hover {
  color: var(--ai-314-color-on-media);
}
body#modern-ai-root div.bgdWrapper div.mainSection ul li::before {
  background: var(--ai-314-color-on-media);
}

/* Heading chip — sidesteps the locked span color by controlling its
   background instead. width:fit-content + margin:auto centers a
   block-level box without needing an extra wrapper element. */
body#modern-ai-root div.bgdWrapper div.mainSection h4 {
  display: block;
  width: fit-content;
  max-width: 100%;
  margin: 0 auto var(--ai-314-space-md);
  padding: 0.5em 1.1em;
  background: var(--ai-314-color-chip-bg);
  border-radius: var(--ai-314-radius-sm);
  border-inline-start: 4px solid var(--ai-314-color-brand);
  box-shadow: 3px 3px 8px var(--ai-314-shadow-chip);
}

/* Stand-alone image placed directly in the page grid: span every column and
   center within it. Its margins, display and max-width are locked, so grid
   alignment is used instead. */
body#modern-ai-root > img.an-img {
  grid-column: 1 / -1;
  justify-self: center;
}

/* Image inside a card that the page renders inline: make it a block so its
   (locked) auto side margins can center it; justify-self covers zero margins
   in browsers that support it for block boxes. */
body#modern-ai-root div.mainSection > img.an-img {
  display: block;
  justify-self: center;
}

/* Mobile / tablet: keep the phone bar flush under the fixed header. The
   spacer is pinned to exactly the header height, and any extra offset from
   legacy rules on the spacer, body or phone bar is cleared. */
@media (max-width: 959px) {
  body#modern-ai-root {
    padding-block-start: 0;
  }
  body#modern-ai-root > div#bellow-logo {
    height: var(--ai-314-header-h);
    min-height: var(--ai-314-header-h);
    max-height: var(--ai-314-header-h);
    margin: 0;
    padding: 0;
    border: 0;
    overflow: hidden;
  }
  body#modern-ai-root div.hh2#mh2 {
    position: static;
    border-top: 0;
    margin-block-start: calc(-1 * var(--ai-314-gap) - var(--ai-314-phone-pull)) !important;
  }
  /* menu sits flush under the phone bar */
  body#modern-ai-root div#outerNav {
    margin-block-start: calc(-1 * var(--ai-314-gap) - var(--ai-314-nav-pull)) !important;
  }
}

/* Mobile quick-link pills: tighter spacing, larger text, same pill height.
   The longer selectors outrank the legacy list spacing. */
@media (max-width: 640px) {
  body#modern-ai-root div#outerNav {
    margin-block-end: 0;
  }
  html body#modern-ai-root div#local.side div.active {
    padding-block: var(--ai-314-m-pill-top-space);
    /* reach past the page padding, leaving only a thin edge to the viewport */
    width: auto;
    max-width: none;
    margin-inline: calc(-1 * var(--ai-314-space-sm));
    padding-left: var(--ai-314-m-pill-edge);
    padding-right: var(--ai-314-m-pill-edge-right);
  }
  html body#modern-ai-root div#local.side div.active ul {
    margin: 0;
    padding: 0;
    gap: var(--ai-314-m-pill-row-gap) var(--ai-314-m-pill-col-gap);
  }
  html body#modern-ai-root div#local.side div.active ul li {
    margin: 0;
    padding: 0 0 0 var(--ai-314-m-pill-marker-space);
    min-height: 0;
    height: auto;
    background-position: left center;
  }
  html body#modern-ai-root div#local.side div.active ul li a {
    display: block;
    margin: 0;
    padding: 0 var(--ai-314-m-pill-inline-pad);
    font-size: var(--ai-314-m-pill-fs);
    line-height: var(--ai-314-m-pill-h);
  }
}

/* Half-width card with no partner beside it: center it at one column's width. */
@media (min-width: 960px) {
  body#modern-ai-root div.mainSection:has(> h4#vickathon-redirect),
  body#modern-ai-root div.mainSection:has(> h4#teach-entrepreneurship) {
    grid-column: 1 / -1;
    justify-self: center;
    width: calc((100% - var(--ai-314-gap)) / 2);
  }

  /* the two cards next to each other keep their side-by-side layout */
  body#modern-ai-root div.mainSection:has(> h4#vickathon-redirect):has(+ div.mainSection > h4#teach-entrepreneurship),
  body#modern-ai-root div.mainSection:has(> h4#vickathon-redirect) + div.mainSection:has(> h4#teach-entrepreneurship),
  body#modern-ai-root div.mainSection:has(> h4#vickathon-redirect):has(+ p.outerP + div.mainSection > h4#teach-entrepreneurship),
  body#modern-ai-root div.mainSection:has(> h4#vickathon-redirect) + p.outerP + div.mainSection:has(> h4#teach-entrepreneurship),
  body#modern-ai-root div.mainSection:has(> h4#teach-entrepreneurship):has(+ div.mainSection > h4#vickathon-redirect),
  body#modern-ai-root div.mainSection:has(> h4#teach-entrepreneurship) + div.mainSection:has(> h4#vickathon-redirect),
  body#modern-ai-root div.mainSection:has(> h4#teach-entrepreneurship):has(+ p.outerP + div.mainSection > h4#vickathon-redirect),
  body#modern-ai-root div.mainSection:has(> h4#teach-entrepreneurship) + p.outerP + div.mainSection:has(> h4#vickathon-redirect) {
    grid-column: span 1;
    justify-self: stretch;
    width: 100%;
  }
}
