/* Shared styles for every page: tokens, base, buttons, nav, mega menu,
   section typography and footer. Page-only styles stay in each page's <style>. */
/* ════════════════════════════════════════════════════════════════
   Tokens: the editor palette (VS Code Dark Modern / Light Modern)
   plus the wave colours from the login page.
   ════════════════════════════════════════════════════════════════ */
:root {
  --ui-font: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --mono-font: "Geist Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --bg: #181818;
  --surface: #1f1f1f;
  --raised: #252526;
  --input-bg: #1f1f1f;
  --border: #2b2b2b;
  --border-strong: #3c3c3c;
  --text: #cccccc;
  --text-strong: #ececec;
  --text-dim: #9d9d9d;
  --label: #7d7d7d;
  --accent: #0078d4;
  --accent-hover: #026ec1;
  --link: #4daafc;
  --hover: rgba(255, 255, 255, .05);
  --active: rgba(255, 255, 255, .09);
  --nav-bg: rgba(24, 24, 24, .82);
  /* Wave palette (login.html) */
  --w-navy: #0b2745;
  --w-navy-2: #0d3358;
  --w-blue: #0078d4;
  --w-indigo: #3730a3;
  --w-teal: #17a2b8;
  --w-sky: #78beff;
  /* The free-agent band */
  --band-a: #0b2745;
  --band-b: #13306a;
  --band-text: #d7e6f7;
  --band-strong: #ffffff;
  --band-dim: rgba(215, 230, 247, .72);
  --band-rule: rgba(120, 190, 255, .28);
  --band-link: #8fc8ff;
  --line-1: rgba(120, 190, 255, .55);
  --line-2: rgba(160, 150, 255, .45);
  --line-3: rgba(23, 162, 184, .45);
  --radius: 8px;
  --gap: 6px;
  --maxw: 1180px;
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f8f8f8;
    --surface: #ffffff;
    --raised: #f3f3f3;
    --input-bg: #ffffff;
    --border: #e5e5e5;
    --border-strong: #d4d4d4;
    --text: #3b3b3b;
    --text-strong: #1f1f1f;
    --text-dim: #616161;
    --label: #767676;
    --accent: #005fb8;
    --accent-hover: #0258a8;
    --link: #005fb8;
    --hover: rgba(0, 0, 0, .04);
    --active: rgba(0, 0, 0, .07);
    --nav-bg: rgba(248, 248, 248, .85);
    --band-a: #dcebfb;
    --band-b: #d9d8f7;
    --band-text: #2a3a52;
    --band-strong: #0e1f36;
    --band-dim: #475a74;
    --band-rule: rgba(0, 95, 184, .22);
    --band-link: #0a4c8c;
    --line-1: rgba(0, 95, 184, .35);
    --line-2: rgba(80, 70, 200, .28);
    --line-3: rgba(14, 106, 168, .28);
  }
}
/* Manual appearance override. No data-theme means follow the OS. */
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #181818; --surface: #1f1f1f; --raised: #252526; --input-bg: #1f1f1f;
  --border: #2b2b2b; --border-strong: #3c3c3c; --text: #cccccc; --text-strong: #ececec;
  --text-dim: #9d9d9d; --label: #7d7d7d; --accent: #0078d4; --accent-hover: #026ec1;
  --link: #4daafc; --hover: rgba(255, 255, 255, .05); --active: rgba(255, 255, 255, .09);
  --nav-bg: rgba(24, 24, 24, .82); --band-a: #0b2745; --band-b: #13306a;
  --band-text: #d7e6f7; --band-strong: #ffffff; --band-dim: rgba(215, 230, 247, .72);
  --band-rule: rgba(120, 190, 255, .28); --band-link: #8fc8ff;
  --line-1: rgba(120, 190, 255, .55); --line-2: rgba(160, 150, 255, .45); --line-3: rgba(23, 162, 184, .45);
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f8f8f8; --surface: #ffffff; --raised: #f3f3f3; --input-bg: #ffffff;
  --border: #e5e5e5; --border-strong: #d4d4d4; --text: #3b3b3b; --text-strong: #1f1f1f;
  --text-dim: #616161; --label: #767676; --accent: #005fb8; --accent-hover: #0258a8;
  --link: #005fb8; --hover: rgba(0, 0, 0, .04); --active: rgba(0, 0, 0, .07);
  --nav-bg: rgba(248, 248, 248, .85); --band-a: #dcebfb; --band-b: #d9d8f7;
  --band-text: #2a3a52; --band-strong: #0e1f36; --band-dim: #475a74;
  --band-rule: rgba(0, 95, 184, .22); --band-link: #0a4c8c;
  --line-1: rgba(0, 95, 184, .35); --line-2: rgba(80, 70, 200, .28); --line-3: rgba(14, 106, 168, .28);
}
    input[type="password"]::-ms-reveal,
    input[type="password"]::-ms-clear {
      display: none;
      width: 0;
      height: 0;
    }
/* Theme switcher */
.theme-corner {
  position: absolute;
  top: 12px;
  right: 14px;
  z-index: 70;
}
.theme-toggle {
  position: relative;
  width: 40px;
  height: 36px;
  padding: 0;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: var(--text-dim);
  cursor: pointer;
  transition:
    width .2s cubic-bezier(.2, .8, .2, 1),
    background-color .12s,
    border-color .12s,
    color .12s;
}
.theme-toggle:hover {
  width: 108px;
  background: var(--hover);
  border-color: var(--border-strong);
  color: var(--text-strong);
}
.theme-icon {
  position: absolute;
  left: 3px;
  top: 50%;
  width: 30px;
  height: 30px;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--raised);
}
.theme-icon i {
  font-size: 20px;
  line-height: 1;
}
.theme-toggle[data-mode="system"] .theme-icon i { color: var(--text-dim); }
.theme-toggle[data-mode="light"] .theme-icon i { color: #d99a16; }
.theme-toggle[data-mode="dark"] .theme-icon i { color: #78beff; }
.theme-label {
  position: absolute;
  left: 42px;
  right: 9px;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0;
  color: var(--text-strong);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: -.01em;
  white-space: nowrap;
  text-align: left;
  pointer-events: none;
  transition: opacity .12s;
}
.theme-toggle:hover .theme-label { opacity: 1; }
/* Below this width the control snaps into nav-actions, after Open IDE. */
@media (max-width: 1450px) {
  .theme-corner {
    position: static;
    inset: auto;
    z-index: auto;
    flex: none;
    display: flex;
    align-items: center;
    height: 36px;
  }
  .theme-toggle,
  .theme-toggle:hover {
    width: 40px;
    height: 36px;
    border-radius: 7px;
    background: transparent;
    border-color: transparent;
  }
  .theme-icon {
    left: 50%;
    width: 32px;
    height: 32px;
    transform: translate(-50%, -50%);
  }
  .theme-label { display: none; }
}
@media (max-width: 1000px) {
  .theme-corner { height: 36px; }
  .theme-toggle,
  .theme-toggle:hover {
    width: 40px;
    height: 36px;
  }
  .theme-icon {
    left: 50%;
    width: 32px;
    height: 32px;
    transform: translate(-50%, -50%);
  }
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: calc(72px + env(safe-area-inset-top, 0px)); }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 15px/1.6 var(--ui-font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; }
button, input, textarea { font: inherit; color: inherit; }
button { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
::selection { background: color-mix(in srgb, var(--accent) 45%, transparent); }
.wrap { width: min(var(--maxw), 100% - 48px); margin-inline: auto; }
/* Inline link inside prose: quiet until hovered */
.inline-link {
  color: var(--text-strong);
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--link) 55%, transparent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color .12s, text-decoration-color .12s;
}
.inline-link:hover { color: var(--link); text-decoration-color: var(--link); }
/* ── Buttons ─────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 38px;
  padding: 0 16px;
  border-radius: 7px;
  border: 1px solid transparent;
  font-size: 13.5px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color .12s, border-color .12s, color .12s;
}
.btn i { font-size: 16px; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-quiet { background: transparent; border-color: var(--border-strong); color: var(--text-strong); }
.btn-quiet:hover { background: var(--hover); }
.btn-sm { height: 32px; padding: 0 12px; font-size: 13px; }
/* ════════════════════════════════════════════════════════════════
   Navigation
   ════════════════════════════════════════════════════════════════ */
.nav {
  position: sticky; top: 0; z-index: 50;
  padding-top: env(safe-area-inset-top, 0px);
  background: var(--nav-bg);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.nav.is-scrolled { border-bottom-color: var(--border); }
.nav-inner { display: flex; align-items: center; gap: 28px; height: 60px; }
.brand {
  display: inline-flex; align-items: center; gap: 9px;
  color: var(--text-strong);
  text-decoration: none;
  font-size: 17px; font-weight: 600; letter-spacing: -.02em;
}
.brand img { width: 22px; height: 22px; border-radius: 5px; }
.nav-links { display: flex; align-items: center; gap: 2px; margin: 0; padding: 0; list-style: none; }
.nav-links a, .nav-trigger {
  display: inline-flex; align-items: center; gap: 4px;
  height: 32px; padding: 0 11px;
  border: 0; border-radius: 6px;
  background: transparent;
  color: var(--text-dim);
  font-size: 13.5px;
  text-decoration: none;
  cursor: pointer;
  transition: color .12s, background-color .12s;
}
.nav-links a:hover, .nav-trigger:hover, .nav-trigger[aria-expanded="true"] { color: var(--text-strong); background: var(--hover); }
.nav-trigger > i { font-size: 13px; opacity: .6; transition: transform .2s; }
.nav-trigger[aria-expanded="true"] > i { transform: rotate(180deg); opacity: 1; }
/* ════════════════════════════════════════════════════════════════
   Mega menu: one panel that morphs between panes
   ════════════════════════════════════════════════════════════════ */
.menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: 600px; height: 300px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .03) inset, 0 24px 60px -18px rgba(0, 0, 0, .7), 0 4px 14px rgba(0, 0, 0, .3);
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px) scale(.985);
  transform-origin: top center;
  transition:
    left .34s cubic-bezier(.2, .8, .2, 1),
    width .34s cubic-bezier(.2, .8, .2, 1),
    height .34s cubic-bezier(.2, .8, .2, 1),
    opacity .18s ease,
    transform .22s ease,
    visibility 0s linear .22s;
  z-index: 60;
}
@media (prefers-color-scheme: light) {
  .menu { box-shadow: 0 24px 60px -24px rgba(0, 30, 80, .28), 0 4px 14px rgba(0, 0, 0, .06); }
}
.menu.is-open {
  opacity: 1; visibility: visible; transform: none;
  transition:
    left .34s cubic-bezier(.2, .8, .2, 1),
    width .34s cubic-bezier(.2, .8, .2, 1),
    height .34s cubic-bezier(.2, .8, .2, 1),
    opacity .18s ease,
    transform .22s ease,
    visibility 0s;
}
.menu.no-morph, .menu.no-morph ~ .menu-caret { transition-property: opacity, transform, visibility !important; }
.menu-caret {
  position: absolute;
  top: calc(100% + 3px);
  left: 0;
  width: 12px; height: 12px;
  background: var(--surface);
  border-left: 1px solid var(--border-strong);
  border-top: 1px solid var(--border-strong);
  border-radius: 3px 0 0 0;
  transform: rotate(45deg);
  opacity: 0; visibility: hidden;
  transition: left .34s cubic-bezier(.2, .8, .2, 1), opacity .18s, visibility 0s linear .22s;
  z-index: 61;
  pointer-events: none;
}
.menu.is-open ~ .menu-caret { opacity: 1; visibility: visible; transition: left .34s cubic-bezier(.2, .8, .2, 1), opacity .18s, visibility 0s; }
.menu-pane {
  position: absolute; top: 0; left: 0;
  opacity: 0;
  transform: translateX(28px);
  transition: opacity .2s ease, transform .34s cubic-bezier(.2, .8, .2, 1);
  pointer-events: none;
}
.menu-pane.is-active { opacity: 1; transform: none; pointer-events: auto; transition-delay: .04s; }
.mp-label { margin: 0 0 6px; padding: 0 10px; color: var(--label); font-size: 12px; font-weight: 500; }
.mp-row {
  display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 2px 12px; align-items: center;
  padding: 9px 10px;
  border-radius: 9px;
  text-decoration: none;
  transition: background-color .12s;
}
.mp-row:hover, .mp-row:focus-visible { background: var(--hover); outline-offset: -2px; }
.mp-row-icon {
  grid-row: span 2;
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--raised);
  color: var(--text-dim);
  font-size: 17px;
  transition: color .12s, border-color .12s;
}
.mp-row:hover .mp-row-icon { color: var(--link); border-color: var(--border-strong); }
.mp-row-icon.is-main { color: var(--link); border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); background: color-mix(in srgb, var(--accent) 12%, var(--raised)); }
.mp-badge { display: inline-flex; align-items: center; height: 17px; margin-left: 6px; padding: 0 6px; border-radius: 9px; background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--link); font-size: 10.5px; font-weight: 500; vertical-align: 1px; }
.mp-row-title { color: var(--text-strong); font-size: 13.5px; font-weight: 500; line-height: 1.3; }
.mp-row-desc { color: var(--text-dim); font-size: 12.5px; line-height: 1.4; }
.mp-row.compact { grid-template-columns: 22px minmax(0, 1fr); padding: 8px 10px; }
.mp-row.compact .mp-row-icon { width: 22px; height: 22px; border: 0; background: none; font-size: 17px; }
.mp-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px 18px;
  border-top: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg) 60%, var(--surface));
  color: var(--text-dim);
  font-size: 12.5px;
}
.mp-foot a { color: var(--link); text-decoration: none; display: inline-flex; align-items: center; gap: 5px; }
.mp-foot a:hover { text-decoration: underline; text-underline-offset: 3px; }
/* Editors pane */
.mp-editors { width: 660px; }
.mp-editors-grid { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 10px; padding: 10px; }
.mp-feature {
  position: relative; isolation: isolate;
  display: flex; flex-direction: column;
  padding: 18px 18px 86px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--bg);
  text-decoration: none;
  overflow: hidden;
  transition: border-color .15s;
}
.mp-feature:hover, .mp-feature:focus-visible { border-color: color-mix(in srgb, var(--accent) 55%, var(--border)); outline-offset: -2px; }
.mp-feature svg { position: absolute; z-index: -1; left: 0; bottom: 0; width: 100%; height: 76px; transition: transform .5s cubic-bezier(.2, .8, .2, 1); transform-origin: bottom; }
.mp-feature:hover svg { transform: scaleY(1.12); }
.mp-tag {
  align-self: flex-start;
  height: 21px; padding: 0 8px;
  display: inline-flex; align-items: center;
  border-radius: 11px;
  background: color-mix(in srgb, var(--accent) 16%, transparent);
  color: var(--link);
  font-size: 11.5px; font-weight: 500;
}
.mp-feature-title { margin-top: 12px; color: var(--text-strong); font-size: 19px; font-weight: 600; letter-spacing: -.02em; display: flex; align-items: center; gap: 6px; }
.mp-feature-title i { font-size: 16px; color: var(--label); transition: transform .15s, color .15s; }
.mp-feature:hover .mp-feature-title i { transform: translateX(3px); color: var(--text-strong); }
.mp-feature-desc { margin-top: 6px; color: var(--text-dim); font-size: 13px; line-height: 1.5; }
.mp-feature-list { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 6px; }
.mp-feature-list li { display: flex; align-items: center; gap: 8px; color: var(--text); font-size: 12.5px; }
.mp-feature-list i { color: var(--link); font-size: 14px; }
.mp-side { display: flex; flex-direction: column; padding-top: 8px; }
/* Editors pane: stacked feature cards that swap on row hover */
/* Editors pane: stacked feature cards that crossfade on row hover */
/* Editors pane: the new card fades in over the old one */
.mp-stage { position: relative; display: grid; }
.mp-stage > .mp-feature {
  grid-area: 1 / 1;
  z-index: 0;
  opacity: 0; visibility: hidden;
  /* Leaving: stay fully visible underneath, then vanish once covered */
  transition:
    opacity 0s linear .2s,
    visibility 0s linear .2s,
    border-color .15s;
}
.mp-stage > .mp-feature.is-active {
  z-index: 2;
  opacity: 1; visibility: visible;
  /* Entering: fade in on top */
  transition:
    opacity .2s ease,
    visibility 0s,
    border-color .15s;
}
/* Keep the row highlighted while its card is showing */
.mp-side .mp-row.is-on { background: var(--hover); }
.mp-side .mp-row.is-on .mp-row-icon { color: var(--link); border-color: var(--border-strong); }
/* Shared bits for the art-corner cards */
.mp-feature .mp-glow { position: absolute; z-index: -2; right: -8px; bottom: -18px; width: 132px; height: 132px; border-radius: 50%; pointer-events: none; }
.mp-feature .mp-art-icon { position: absolute; z-index: -1; right: -12px; bottom: -16px; font-size: 108px; line-height: 1; pointer-events: none; transition: transform .5s cubic-bezier(.2, .8, .2, 1); }
.mp-feature.is-sandbox .mp-art-icon { transform: rotate(-12deg); }
.mp-feature.is-sandbox:hover .mp-art-icon { transform: rotate(-12deg) scale(1.06); }
.mp-feature.is-q5:hover .mp-art-icon { animation: mp-spin 8s linear infinite; }
@keyframes mp-spin { to { transform: rotate(360deg); } }
/* Codevre Editor: mint and teal */
.mp-feature.is-editor { background: #111816; border-color: rgba(115, 201, 145, .24); }
.mp-feature.is-editor .mp-tag { background: rgba(115, 201, 145, .16); color: #8fdcae; }
.mp-feature.is-editor .mp-feature-title { color: #f1fbf6; }
.mp-feature.is-editor .mp-feature-title i { color: rgba(214, 236, 226, .58); }
.mp-feature.is-editor .mp-feature-desc { color: rgba(214, 236, 226, .78); }
.mp-feature.is-editor .mp-feature-list li { color: #d6ece2; }
.mp-feature.is-editor .mp-feature-list i { color: #73c991; }
.mp-feature.is-editor .mp-ed-line { fill: none; stroke: rgba(115, 201, 145, .4); stroke-width: 1.2; vector-effect: non-scaling-stroke; }
/* Light appearance: keep the Editor mint/teal identity, but lift the card. */
@media (prefers-color-scheme: light) {
  :root:not([data-theme]) .mp-feature.is-editor {
    background: #edf8f3;
    border-color: rgba(45, 138, 79, .22);
  }
  :root:not([data-theme]) .mp-feature.is-editor .mp-tag { background: rgba(45, 138, 79, .11); color: #237a45; }
  :root:not([data-theme]) .mp-feature.is-editor .mp-feature-title { color: #143326; }
  :root:not([data-theme]) .mp-feature.is-editor .mp-feature-title i { color: rgba(20, 51, 38, .48); }
  :root:not([data-theme]) .mp-feature.is-editor .mp-feature-desc { color: #536c60; }
  :root:not([data-theme]) .mp-feature.is-editor .mp-feature-list li { color: #2d4c3d; }
  :root:not([data-theme]) .mp-feature.is-editor .mp-feature-list i { color: #2d8a4f; }
  :root:not([data-theme]) .mp-feature.is-editor .mp-ed-line { stroke: rgba(35, 122, 69, .28); }
  :root:not([data-theme]) .mp-feature.is-editor #mp-ed-a stop:first-child { stop-color: #d9f0e5; }
  :root:not([data-theme]) .mp-feature.is-editor #mp-ed-a stop:last-child { stop-color: #c4e7d6; }
  :root:not([data-theme]) .mp-feature.is-editor #mp-ed-b stop:first-child { stop-color: #9fd7bd; }
  :root:not([data-theme]) .mp-feature.is-editor #mp-ed-b stop:last-child { stop-color: #78c7a5; }
  :root:not([data-theme]) .mp-feature.is-editor #mp-ed-c stop:first-child { stop-color: #62bd96; }
  :root:not([data-theme]) .mp-feature.is-editor #mp-ed-c stop:last-child { stop-color: #73c991; }
}
:root[data-theme="light"] .mp-feature.is-editor {
  background: #edf8f3;
  border-color: rgba(45, 138, 79, .22);
}
:root[data-theme="light"] .mp-feature.is-editor .mp-tag { background: rgba(45, 138, 79, .11); color: #237a45; }
:root[data-theme="light"] .mp-feature.is-editor .mp-feature-title { color: #143326; }
:root[data-theme="light"] .mp-feature.is-editor .mp-feature-title i { color: rgba(20, 51, 38, .48); }
:root[data-theme="light"] .mp-feature.is-editor .mp-feature-desc { color: #536c60; }
:root[data-theme="light"] .mp-feature.is-editor .mp-feature-list li { color: #2d4c3d; }
:root[data-theme="light"] .mp-feature.is-editor .mp-feature-list i { color: #2d8a4f; }
:root[data-theme="light"] .mp-feature.is-editor .mp-ed-line { stroke: rgba(35, 122, 69, .28); }
:root[data-theme="light"] .mp-feature.is-editor #mp-ed-a stop:first-child { stop-color: #d9f0e5; }
:root[data-theme="light"] .mp-feature.is-editor #mp-ed-a stop:last-child { stop-color: #c4e7d6; }
:root[data-theme="light"] .mp-feature.is-editor #mp-ed-b stop:first-child { stop-color: #9fd7bd; }
:root[data-theme="light"] .mp-feature.is-editor #mp-ed-b stop:last-child { stop-color: #78c7a5; }
:root[data-theme="light"] .mp-feature.is-editor #mp-ed-c stop:first-child { stop-color: #62bd96; }
:root[data-theme="light"] .mp-feature.is-editor #mp-ed-c stop:last-child { stop-color: #73c991; }
/* Sandbox: dark with an oversized cube */
.mp-feature.is-sandbox { background: linear-gradient(160deg, #171a1f 0%, #1c2026 100%); border-color: rgba(77, 170, 252, .18); }
.mp-feature.is-sandbox .mp-glow { background: radial-gradient(circle, rgba(77, 170, 252, .16) 0%, rgba(77, 170, 252, .05) 42%, transparent 72%); }
.mp-feature.is-sandbox .mp-art-icon { color: rgba(120, 190, 255, .32); }
.mp-feature.is-sandbox .mp-feature-title { color: #f2f6fb; }
.mp-feature.is-sandbox .mp-feature-title i { color: rgba(215, 230, 247, .58); }
.mp-feature.is-sandbox .mp-feature-desc { color: #a6b2c0; }
.mp-feature.is-sandbox .mp-feature-list li { color: #d7e6f7; }
/* Light appearance: cool blue-gray Sandbox card with the same cube motif. */
@media (prefers-color-scheme: light) {
  :root:not([data-theme]) .mp-feature.is-sandbox {
    background: linear-gradient(160deg, #f1f6fb 0%, #e7eef6 100%);
    border-color: rgba(0, 95, 184, .18);
  }
  :root:not([data-theme]) .mp-feature.is-sandbox .mp-glow {
    background: radial-gradient(circle, rgba(0, 120, 212, .14) 0%, rgba(0, 120, 212, .05) 42%, transparent 72%);
  }
  :root:not([data-theme]) .mp-feature.is-sandbox .mp-art-icon { color: rgba(0, 95, 184, .22); }
  :root:not([data-theme]) .mp-feature.is-sandbox .mp-tag { background: rgba(0, 95, 184, .10); color: #005fb8; }
  :root:not([data-theme]) .mp-feature.is-sandbox .mp-feature-title { color: #172b3e; }
  :root:not([data-theme]) .mp-feature.is-sandbox .mp-feature-title i { color: rgba(23, 43, 62, .48); }
  :root:not([data-theme]) .mp-feature.is-sandbox .mp-feature-desc { color: #5b6d7e; }
  :root:not([data-theme]) .mp-feature.is-sandbox .mp-feature-list li { color: #30485e; }
  :root:not([data-theme]) .mp-feature.is-sandbox .mp-feature-list i { color: #005fb8; }
}
:root[data-theme="light"] .mp-feature.is-sandbox {
  background: linear-gradient(160deg, #f1f6fb 0%, #e7eef6 100%);
  border-color: rgba(0, 95, 184, .18);
}
:root[data-theme="light"] .mp-feature.is-sandbox .mp-glow {
  background: radial-gradient(circle, rgba(0, 120, 212, .14) 0%, rgba(0, 120, 212, .05) 42%, transparent 72%);
}
:root[data-theme="light"] .mp-feature.is-sandbox .mp-art-icon { color: rgba(0, 95, 184, .22); }
:root[data-theme="light"] .mp-feature.is-sandbox .mp-tag { background: rgba(0, 95, 184, .10); color: #005fb8; }
:root[data-theme="light"] .mp-feature.is-sandbox .mp-feature-title { color: #172b3e; }
:root[data-theme="light"] .mp-feature.is-sandbox .mp-feature-title i { color: rgba(23, 43, 62, .48); }
:root[data-theme="light"] .mp-feature.is-sandbox .mp-feature-desc { color: #5b6d7e; }
:root[data-theme="light"] .mp-feature.is-sandbox .mp-feature-list li { color: #30485e; }
:root[data-theme="light"] .mp-feature.is-sandbox .mp-feature-list i { color: #005fb8; }
/* q5: light blue, dark type, big asterisk */
.mp-feature.is-q5 { background: #dcebfb; border-color: rgba(10, 76, 140, .16); }
.mp-feature.is-q5 .mp-glow { background: radial-gradient(circle, rgba(120, 190, 255, .24) 0%, rgba(120, 190, 255, .1) 42%, transparent 72%); }
.mp-feature.is-q5 .mp-art-icon { color: rgba(11, 39, 69, .22); }
.mp-feature.is-q5 .mp-tag { background: rgba(10, 76, 140, .12); color: #0a4c8c; }
.mp-feature.is-q5 .mp-feature-title { color: #0b1f36; }
.mp-feature.is-q5 .mp-feature-title i { color: rgba(11, 31, 54, .55); }
.mp-feature.is-q5 .mp-feature-desc { color: #4b6179; }
.mp-feature.is-q5 .mp-feature-list li { color: #26364d; }
.mp-feature.is-q5 .mp-feature-list i { color: #0a4c8c; }
/* Learn pane */
.mp-learn { width: 500px; }
.mp-learn-grid { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 10px; padding: 10px; }
.mp-art {
  --c-bg: #dcebfb; --c-strong: #0b1f36; --c-dim: #4a5d78;
  position: relative;
  display: flex; flex-direction: column;
  padding: 16px;
  border-radius: 11px;
  background: var(--c-bg);
  text-decoration: none;
  overflow: hidden;
}
@media (prefers-color-scheme: light) { .mp-art { --c-bg: #0b2745; --c-strong: #fff; --c-dim: rgba(215, 230, 247, .75); } }
.mp-art strong { color: var(--c-strong); font-size: 16px; font-weight: 600; letter-spacing: -.02em; line-height: 1.15; }
.mp-art span { margin-top: 6px; color: var(--c-dim); font-size: 12px; line-height: 1.4; }
.mp-art svg { position: absolute; left: 50%; bottom: -1px; width: 150%; transform: translateX(-50%); transition: transform .5s cubic-bezier(.2, .8, .2, 1); transform-origin: bottom center; }
.mp-art:hover svg { transform: translateX(-50%) scale(1.06); }
.mp-art circle { fill: none; stroke-width: 11; }
.mp-art .a0 { stroke: #0b2745; }
@media (prefers-color-scheme: light) { .mp-art .a0 { stroke: #1d3f73; } }
.mp-list { padding-top: 4px; }
/* Resources pane */
.mp-resources { width: 540px; }
.mp-resources-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 10px; padding: 14px 10px 10px; }
/* Account pane */
.mp-account { width: 290px; }
.mp-account-list { display: flex; flex-direction: column; padding: 8px; }
#userDropdown .hidden { display: none; }
.mp-account-foot { padding: 6px 8px 8px; border-top: 1px solid var(--border); }
.mp-signout {
  width: 100%;
  display: flex; align-items: center; gap: 10px;
  height: 36px; padding: 0 12px;
  border: 0; border-radius: 9px;
  background: transparent;
  color: var(--text-dim);
  font: inherit; font-size: 13.5px;
  text-align: left;
  cursor: pointer;
  transition: color .12s, background-color .12s;
}
.mp-signout i { font-size: 17px; }
.mp-signout:hover, .mp-signout:focus-visible { color: var(--text-strong); background: var(--hover); outline-offset: -2px; }
.nav-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.nav-account { gap: 8px; padding: 0 9px 0 4px; }
.nav-account[hidden] { display: none; }
.nav-avatar {
  width: 24px; height: 24px; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  background: var(--raised) center / cover no-repeat;
  color: var(--text-dim);
  font-size: 14px;
  overflow: hidden;
}
.nav-login { color: var(--text-dim); font-size: 13.5px; text-decoration: none; padding: 0 10px; }
.nav-login:hover { color: var(--text-strong); }
.nav-toggle {
  display: none;
  width: 36px; height: 36px;
  align-items: center; justify-content: center;
  border: 1px solid var(--border-strong); border-radius: 7px;
  background: transparent; color: var(--text-strong);
  font-size: 18px; cursor: pointer;
}
.nav-sheet {
  display: none;
  border-top: 1px solid var(--border);
  padding: 10px 0 18px;
}
.nav-sheet a {
  display: block;
  padding: 10px 2px;
  color: var(--text-strong);
  text-decoration: none;
  font-size: 15px;
  border-bottom: 1px solid var(--border);
}
.nav.is-open .nav-sheet { display: block; }
/* ════════════════════════════════════════════════════════════════
   Shared section typography
   ════════════════════════════════════════════════════════════════ */
.section { padding: clamp(80px, 11vw, 136px) 0; }
.section-head { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 24px 64px; align-items: end; margin-bottom: 48px; }
.section-head h2, .h2 {
  margin: 0;
  color: var(--text-strong);
  font-size: clamp(32px, 4.4vw, 56px);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -.035em;
  text-wrap: balance;
}
.section-head p { margin: 0; max-width: 48ch; color: var(--text-dim); font-size: 16px; }
/* ════════════════════════════════════════════════════════════════
   Footer: the login page's wave panel
   ════════════════════════════════════════════════════════════════ */
.footer {
  position: relative;
  isolation: isolate;
  margin-top: clamp(40px, 6vw, 80px);
  padding: clamp(72px, 9vw, 112px) 0 0;
  border-top: 1px solid var(--border);
  overflow: hidden;
}
.footer-cta { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 28px 48px; }
.footer-cta h2 {
  margin: 0;
  max-width: 15ch;
  color: var(--text-strong);
  font-size: clamp(36px, 5.2vw, 68px);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -.04em;
}
.footer-cta .actions { display: flex; flex-wrap: wrap; gap: 10px; }
.footer-links {
  display: grid;
  grid-template-columns: 1.3fr repeat(4, minmax(0, 1fr));
  gap: 36px 28px;
  margin-top: clamp(56px, 7vw, 88px);
  padding-top: 36px;
  border-top: 1px solid var(--border-strong);
}
.footer-brand p { margin: 12px 0 0; max-width: 30ch; color: var(--text-dim); font-size: 13.5px; }
/* Pages without the call to action (<!-- include footer no-cta -->) */
.footer > .wrap > .footer-links:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.footer-col h4 { margin: 0 0 12px; color: var(--text-strong); font-size: 13px; font-weight: 600; }
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col a { display: inline-block; padding: 4px 0; color: var(--text-dim); font-size: 13.5px; text-decoration: none; }
.footer-col a:hover { color: var(--text-strong); }
.footer-waves-wrap { position: relative; height: clamp(240px, 30vw, 380px); margin-top: 24px; }
.waves { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.wave-a { fill: url(#fw-a); } .wave-b { fill: url(#fw-b); } .wave-c { fill: url(#fw-c); } .wave-d { fill: url(#fw-d); }
.wave-line { fill: none; stroke-width: 1.25; vector-effect: non-scaling-stroke; }
.wave-line-1 { stroke: rgba(120, 190, 255, .35); }
.wave-line-2 { stroke: rgba(160, 150, 255, .25); }
.ws-a1 { stop-color: #0b2745; } .ws-a2 { stop-color: #0d3358; }
.ws-b1 { stop-color: #0a4c8c; } .ws-b2 { stop-color: #0078d4; }
.ws-c1 { stop-color: #3730a3; } .ws-c2 { stop-color: #1d5fc4; }
.ws-d1 { stop-color: #0e6aa8; } .ws-d2 { stop-color: #17a2b8; }
@media (prefers-color-scheme: light) {
  .ws-a1 { stop-color: #e3eefb; } .ws-a2 { stop-color: #d6e7fa; }
  .ws-b1 { stop-color: #b7d5f5; } .ws-b2 { stop-color: #8fc0f0; }
  .ws-c1 { stop-color: #c7c3f4; } .ws-c2 { stop-color: #a9c4f2; }
  .ws-d1 { stop-color: #9fcbe9; } .ws-d2 { stop-color: #9fdde6; }
  .wave-line-1 { stroke: rgba(0, 95, 184, .25); }
  .wave-line-2 { stroke: rgba(80, 70, 200, .18); }
}
.footer-base {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding-bottom: calc(22px + env(safe-area-inset-bottom, 0px));
}
.footer-base .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 20px; color: rgba(255, 255, 255, .7); font-size: 12.5px; }
.footer-base a { color: inherit; text-decoration: none; }
.footer-base a:hover { color: #fff; }
.footer-base .social { display: flex; gap: 16px; }
.footer-base .social a { display: inline-flex; align-items: center; gap: 6px; }
@media (prefers-color-scheme: light) {
  .footer-base .wrap { color: #2a3a52; }
  .footer-base a:hover { color: #0e1f36; }
}
/* ════════════════════════════════════════════════════════════════
   Responsive: shared
   ════════════════════════════════════════════════════════════════ */
@media (max-width: 1000px) {
  .nav-links { display: none; }
  .nav-toggle { display: inline-flex; }
  .menu:not(.is-account), .menu:not(.is-account) ~ .menu-caret { display: none; }
  .footer-links { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 820px) {
  .section-head { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
  .wrap { width: calc(100% - 32px); }
  .nav-actions .btn-primary { display: none; }
  .nav-account-label { display: none; }
  .footer-links { grid-template-columns: 1fr 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; animation-delay: 0s !important; transition: none !important; }
}
/* Component-level theme overrides for rules that are not token-based. */
:root[data-theme="dark"] .menu { box-shadow: 0 1px 0 rgba(255,255,255,.03) inset, 0 24px 60px -18px rgba(0,0,0,.7), 0 4px 14px rgba(0,0,0,.3); }
:root[data-theme="dark"] .mp-art { --c-bg: #dcebfb; --c-strong: #0b1f36; --c-dim: #4a5d78; }
:root[data-theme="dark"] .mp-art .a0 { stroke: #0b2745; }
:root[data-theme="dark"] .ws-a1 { stop-color: #0b2745; } :root[data-theme="dark"] .ws-a2 { stop-color: #0d3358; }
:root[data-theme="dark"] .ws-b1 { stop-color: #0a4c8c; } :root[data-theme="dark"] .ws-b2 { stop-color: #0078d4; }
:root[data-theme="dark"] .ws-c1 { stop-color: #3730a3; } :root[data-theme="dark"] .ws-c2 { stop-color: #1d5fc4; }
:root[data-theme="dark"] .ws-d1 { stop-color: #0e6aa8; } :root[data-theme="dark"] .ws-d2 { stop-color: #17a2b8; }
:root[data-theme="dark"] .wave-line-1 { stroke: rgba(120,190,255,.35); }
:root[data-theme="dark"] .wave-line-2 { stroke: rgba(160,150,255,.25); }
:root[data-theme="dark"] .footer-base .wrap { color: rgba(255,255,255,.7); }
:root[data-theme="dark"] .footer-base a:hover { color: #fff; }
:root[data-theme="light"] .menu { box-shadow: 0 24px 60px -24px rgba(0,30,80,.28), 0 4px 14px rgba(0,0,0,.06); }
:root[data-theme="light"] .mp-art { --c-bg: #0b2745; --c-strong: #fff; --c-dim: rgba(215,230,247,.75); }
:root[data-theme="light"] .mp-art .a0 { stroke: #1d3f73; }
:root[data-theme="light"] .ws-a1 { stop-color: #e3eefb; } :root[data-theme="light"] .ws-a2 { stop-color: #d6e7fa; }
:root[data-theme="light"] .ws-b1 { stop-color: #b7d5f5; } :root[data-theme="light"] .ws-b2 { stop-color: #8fc0f0; }
:root[data-theme="light"] .ws-c1 { stop-color: #c7c3f4; } :root[data-theme="light"] .ws-c2 { stop-color: #a9c4f2; }
:root[data-theme="light"] .ws-d1 { stop-color: #9fcbe9; } :root[data-theme="light"] .ws-d2 { stop-color: #9fdde6; }
:root[data-theme="light"] .wave-line-1 { stroke: rgba(0,95,184,.25); }
:root[data-theme="light"] .wave-line-2 { stroke: rgba(80,70,200,.18); }
:root[data-theme="light"] .footer-base .wrap { color: #2a3a52; }
:root[data-theme="light"] .footer-base a:hover { color: #0e1f36; }
