/* TWIST interface. Direction and tokens: docs/DESIGN.md */

:root {
  --canvas: #ebe9e7;
  --panel: #f6f5f4;
  --card: #ffffff;
  --tile: #f1efed;
  --raised: #e9e7e4;
  --line: rgba(23, 21, 19, 0.08);
  --line-strong: rgba(23, 21, 19, 0.14);
  --ink: #171513;
  --ink-2: #57524c;
  --ink-3: #716b65;
  --accent: #d92d5b;
  --accent-ink: #b81f49;
  --accent-soft: #fbe7ec;
  --dark: #151413;
  --dark-2: #23211f;
  --pos: #16a34a;
  --pos-soft: #e3f4e8;
  --neg: #dc2626;
  --neg-soft: #fbe4e4;
  --hatch: #dedbd7;

  --r-xs: 6px;
  --r-sm: 10px;
  --r: 16px;
  --r-lg: 20px;
  --r-panel: 28px;

  --sh-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --sh-float: 0 8px 24px rgba(0, 0, 0, 0.07);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --t-fast: 160ms;
  --t-menu: 200ms;
  --t-enter: 420ms;

  --font: "Instrument Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --rail: 72px;
  --nav: 232px;

  color-scheme: light;
}

/* tones for course covers, avatars and chart series */
[data-tone="rose"]  { --t-bg: #f8dfe6; --t-ink: #a3214a; --t-mid: #e78aa5; }
[data-tone="amber"] { --t-bg: #f7e6c9; --t-ink: #8a5208; --t-mid: #e3a94f; }
[data-tone="teal"]  { --t-bg: #d3ece6; --t-ink: #0d6556; --t-mid: #5fb5a3; }
[data-tone="sky"]   { --t-bg: #d9e7f6; --t-ink: #1d5a95; --t-mid: #73a6da; }
[data-tone="plum"]  { --t-bg: #e8dcf1; --t-ink: #643888; --t-mid: #a985c7; }
[data-tone="moss"]  { --t-bg: #e0ead3; --t-ink: #46651d; --t-mid: #94b26a; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 14px;
  line-height: 20px;
  color: var(--ink);
  background: var(--canvas);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4, p { margin: 0; }
.num, .tabular { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--mono); font-size: 12px; line-height: 16px; letter-spacing: 0.01em; }
.muted { color: var(--ink-3); }
.soft { color: var(--ink-2); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.i { flex: none; }
.logo { flex: none; }

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

/* ------------------------------------------------------------------ buttons and controls */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 16px; border-radius: var(--r-sm);
  border: 1px solid var(--line); background: var(--card); color: var(--ink);
  font-weight: 500; white-space: nowrap;
  transition: background-color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}
.btn:hover { background: var(--tile); }
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-ink); border-color: var(--accent-ink); }
.btn-dark { background: var(--dark); border-color: var(--dark); color: #fff; box-shadow: inset 0 1px 0 rgba(255,255,255,.12); }
.btn-dark:hover { background: #2b2926; }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-ghost:hover { background: var(--tile); }
.btn-sm { height: 32px; padding: 0 12px; font-size: 13px; border-radius: 8px; }
.btn-lg { height: 48px; padding: 0 20px; font-size: 15px; }
.btn-block { width: 100%; }
.btn[disabled], .btn.is-disabled { opacity: .5; pointer-events: none; }
.icon-btn {
  display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--card); color: var(--ink-2);
  transition: background-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}
.icon-btn:hover { color: var(--ink); background: var(--tile); }
.icon-btn:active { transform: scale(0.95); }

.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px;
  border-radius: 999px; background: var(--card); border: 1px solid var(--line);
  font-size: 13px; font-weight: 500; color: var(--ink-2); white-space: nowrap;
  transition: background-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
a.chip:hover, button.chip:hover { color: var(--ink); background: var(--tile); }
.chip.is-on { background: var(--dark); color: #fff; border-color: var(--dark); }

.delta {
  display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 8px; border-radius: 999px;
  font-size: 12px; font-weight: 500; font-variant-numeric: tabular-nums;
}
.delta-up { background: var(--accent); color: #fff; }
.delta-up-soft { background: var(--accent-soft); color: var(--accent-ink); border: 1px solid rgba(217,45,91,.25); }
.delta-down { background: var(--tile); color: var(--ink-2); }
.delta-pos { background: var(--pos-soft); color: #11702f; }

.count {
  display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px;
  border-radius: 999px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.count-dark { background: var(--dark); }
.tag {
  display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: var(--r-xs);
  background: var(--tile); color: var(--ink-2); font-size: 12px; font-weight: 500; white-space: nowrap;
}
.tag-accent { background: var(--accent-soft); color: var(--accent-ink); }
.tag-pos { background: var(--pos-soft); color: #11702f; }
.tag-dark { background: var(--dark); color: #fff; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-3); flex: none; }
.dot-live { background: var(--pos); box-shadow: 0 0 0 3px rgba(22,163,74,.15); }

.kbd {
  display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px;
  border-radius: var(--r-xs); border: 1px solid var(--line-strong); border-bottom-width: 2px;
  font-family: var(--mono); font-size: 11px; color: var(--ink-3); background: var(--card);
}

.seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: 12px; background: var(--tile); }
.seg a, .seg button {
  height: 30px; padding: 0 12px; border-radius: 9px; border: 0; background: transparent;
  display: inline-flex; align-items: center; font-size: 13px; font-weight: 500; color: var(--ink-2);
  transition: background-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.seg a:hover, .seg button:hover { color: var(--ink); }
.seg .is-on { background: var(--dark); color: #fff; box-shadow: inset 0 1px 0 rgba(255,255,255,.12); }

/* forms */
.field { display: grid; gap: 6px; }
.field > span, .label { font-size: 13px; font-weight: 500; color: var(--ink-2); }
.input, .select, textarea.input {
  width: 100%; height: 44px; padding: 0 14px; border-radius: var(--r-sm);
  border: 1px solid var(--line-strong); background: var(--card); color: var(--ink);
  transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
textarea.input { height: auto; min-height: 96px; padding: 12px 14px; resize: vertical; }
.input:focus, .select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(217,45,91,.14); }
.select { appearance: none; padding-right: 36px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%23716b65' stroke-width='1.5' stroke-linecap='round' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
.form-grid { display: grid; gap: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid .full { grid-column: 1 / -1; }
.hint { font-size: 12px; color: var(--ink-3); }

/* ------------------------------------------------------------------ app shell */

.shell { display: flex; min-height: 100vh; min-height: 100dvh; }

.rail {
  position: sticky; top: 0; height: 100vh; height: 100dvh; width: var(--rail); flex: none;
  display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 20px 0;
  view-transition-name: rail;
}
.rail-logo {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  background: var(--dark); color: #fff; font-weight: 600; font-size: 18px; letter-spacing: -0.02em; margin-bottom: 16px;
}
.rail-btn {
  position: relative; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  background: var(--card); color: var(--ink-2); box-shadow: var(--sh-sm);
  transition: background-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}
.rail-btn:hover { color: var(--ink); transform: translateY(-1px); }
.rail-btn:active { transform: scale(0.95); }
.rail-btn.is-active { background: var(--accent); color: #fff; box-shadow: 0 6px 16px rgba(217,45,91,.28); }
.rail-btn .tip {
  position: absolute; left: calc(100% + 10px); top: 50%; translate: 0 -50%; padding: 4px 8px; border-radius: 6px;
  background: var(--dark); color: #fff; font-size: 12px; white-space: nowrap; pointer-events: none;
  opacity: 0; transform: translateX(-4px); transition: opacity var(--t-menu) var(--ease), transform var(--t-menu) var(--ease); z-index: 30;
}
.rail-btn:hover .tip, .rail-btn:focus-visible .tip { opacity: 1; transform: none; }
.rail-spacer { flex: 1; }
.rail-me { position: relative; }
.rail-me .avatar { width: 40px; height: 40px; }
.rail-me::after { content: ""; position: absolute; right: 0; top: 0; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); border: 2px solid var(--canvas); }

.navpanel {
  position: sticky; top: 0; height: 100vh; height: 100dvh; width: var(--nav); flex: none; overflow-y: auto;
  padding: 24px 12px 24px 4px; scrollbar-width: none; view-transition-name: navpanel;
}
.navpanel::-webkit-scrollbar { display: none; }
.brand-switch {
  display: flex; align-items: center; gap: 6px; height: 36px; padding: 0 8px; margin-bottom: 24px;
  font-size: 16px; font-weight: 600; letter-spacing: -0.01em;
}
.brand-switch .i { color: var(--ink-3); }
.nav-quick { display: grid; gap: 2px; margin-bottom: 20px; }
.nav-item {
  display: flex; align-items: center; gap: 10px; height: 34px; padding: 0 8px; border-radius: 8px;
  color: var(--ink-2); font-weight: 500;
  transition: background-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.nav-item:hover { background: rgba(255,255,255,.6); color: var(--ink); }
.nav-item.is-active { color: var(--accent-ink); background: var(--card); box-shadow: var(--sh-sm); }
.nav-item .count { margin-left: auto; }
.nav-item .i { color: var(--ink-3); }
.nav-item.is-active .i { color: var(--accent); }
.nav-label {
  display: flex; align-items: center; justify-content: space-between; height: 28px; padding: 0 8px;
  margin: 20px 0 6px; font-weight: 600; color: var(--ink);
}
.nav-label .i { color: var(--ink-3); }
.nav-tree { position: relative; display: grid; gap: 2px; margin-left: 14px; padding-left: 12px; }
.nav-tree::before { content: ""; position: absolute; left: 0; top: 0; bottom: 17px; width: 1px; background: var(--line-strong); }
.nav-tree .nav-item { position: relative; }
.nav-tree .nav-item::before { content: ""; position: absolute; left: -12px; top: 50%; width: 8px; height: 1px; background: var(--line-strong); }

.main { flex: 1; min-width: 0; padding: 16px 16px 16px 0; }
.topbar { display: flex; align-items: center; gap: 12px; height: 56px; margin-bottom: 12px; padding-left: 4px; }
.search {
  display: flex; align-items: center; gap: 10px; width: min(440px, 100%); height: 44px; padding: 0 8px 0 16px;
  border-radius: 999px; background: var(--card); color: var(--ink-3); box-shadow: var(--sh-sm);
}
.search input { flex: 1; min-width: 0; height: 100%; border: 0; background: transparent; outline: none; color: var(--ink); }
.search input::placeholder { color: var(--ink-3); }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.role-switch { display: flex; gap: 4px; }

.panel {
  min-height: calc(100vh - 100px); padding: 28px 32px 40px; border-radius: var(--r-panel);
  background: var(--panel); box-shadow: 0 0 0 1px rgba(255,255,255,.6) inset, var(--sh-sm);
  view-transition-name: panel;
}
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.page-title { font-size: 32px; line-height: 1.15; font-weight: 500; letter-spacing: -0.02em; }
.page-title.is-muted { color: #b7b2ac; }
.page-sub { margin-top: 6px; color: var(--ink-2); }
.page-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.crumbs { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; color: var(--ink-3); font-size: 13px; }

/* people strip like a share bar */
.people-strip { display: flex; align-items: center; gap: 8px; margin-bottom: 20px; overflow-x: auto; scrollbar-width: none; }
.people-strip::-webkit-scrollbar { display: none; }
.people-strip > * { flex: none; }
.person-chip { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px 0 4px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); font-weight: 500; }

/* ------------------------------------------------------------------ cards and grid */

.grid { display: grid; gap: 16px; grid-template-columns: repeat(12, minmax(0, 1fr)); }
.grid > *, .stack > *, .stack-sm > *, .rev-split > *, .list > * { min-width: 0; }
.span-3 { grid-column: span 3; } .span-4 { grid-column: span 4; } .span-5 { grid-column: span 5; }
.span-6 { grid-column: span 6; } .span-7 { grid-column: span 7; } .span-8 { grid-column: span 8; }
.span-9 { grid-column: span 9; } .span-12 { grid-column: span 12; }
.stack { display: grid; gap: 16px; align-content: start; }
.stack-sm { display: grid; gap: 8px; align-content: start; }
.row { display: flex; align-items: center; gap: 8px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.wrap { flex-wrap: wrap; }
.mt-8 { margin-top: 8px; } .mt-12 { margin-top: 12px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; } .mt-32 { margin-top: 32px; }
.mb-16 { margin-bottom: 16px; } .mb-24 { margin-bottom: 24px; }

.card { position: relative; background: var(--card); border-radius: var(--r); padding: 20px; box-shadow: var(--sh-sm); border: 1px solid var(--line); }
.card-tile { background: var(--tile); border-radius: var(--r-lg); padding: 12px; border: 0; box-shadow: none; }
.card-flat { background: transparent; border: 0; box-shadow: none; padding: 0; }
.card-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 16px; }
.chart-scroll { overflow-x: auto; scrollbar-width: none; }
.chart-scroll::-webkit-scrollbar { display: none; }
.card-tile > .card-head { padding: 4px 4px 0; margin-bottom: 12px; }
.card-title { font-size: 15px; font-weight: 600; }
.card-sub { font-size: 13px; color: var(--ink-3); }
a.card { transition: border-color var(--t-fast) var(--ease), background-color var(--t-fast) var(--ease); }
a.card:hover { border-color: var(--line-strong); }

/* revenue hero */
.rev-label { font-size: 17px; font-weight: 500; margin-bottom: 8px; }
.rev-figure { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; }
.figure-xl { font-size: 48px; line-height: 1; font-weight: 600; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.figure-xl .dec { color: #b7b2ac; }
.rev-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 12px; color: var(--ink-2); font-size: 13px; }
.rev-meta strong { color: var(--ink); font-weight: 500; }

.kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.kpi {
  position: relative; display: flex; flex-direction: column; justify-content: space-between; gap: 12px; min-height: 120px; padding: 16px;
  border-radius: var(--r); background: var(--card); border: 1px solid var(--line); box-shadow: var(--sh-sm);
}
.kpi-label { font-size: 13px; color: var(--ink-2); display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.kpi-figure { font-size: 28px; line-height: 1; font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.kpi-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 13px; color: var(--ink-2); font-weight: 500; }
.kpi-foot .go { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 7px; background: var(--tile); color: var(--ink); }
.kpi-dark { background: var(--dark); border-color: var(--dark); color: #fff; }
.kpi-dark .kpi-label, .kpi-dark .kpi-foot { color: rgba(255,255,255,.7); }
.kpi-dark .kpi-foot .go { background: #fff; color: var(--dark); }
.kpi-dark .kpi-foot strong { color: #fff; font-weight: 500; }

/* signature: ticket stub perforation */
.stub { --notch: 10px; --notch-bg: var(--panel); }
.stub::before, .stub::after {
  content: ""; position: absolute; top: 50%; width: calc(var(--notch) * 2); height: calc(var(--notch) * 2);
  border-radius: 50%; background: var(--notch-bg); translate: 0 -50%;
}
.stub::before { left: calc(var(--notch) * -1); }
.stub::after { right: calc(var(--notch) * -1); }
.stub-line { border-top: 1.5px dashed var(--line-strong); margin: 0 4px; }
.kpi-dark .stub-line, .wallet-card .stub-line { border-color: rgba(255,255,255,.18); }
.stub-v::before, .stub-v::after { top: auto; left: var(--stub-x, 68%); right: auto; translate: -50% 0; }
.stub-v::before { top: calc(var(--notch) * -1); }
.stub-v::after { bottom: calc(var(--notch) * -1); }

/* partner share pills */
.share-row { display: flex; gap: 8px; margin: 20px 0 16px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.share-row::-webkit-scrollbar { display: none; }
.share-pill {
  display: flex; align-items: center; gap: 10px; flex: 1 0 auto; min-width: 220px; height: 44px; padding: 0 16px 0 4px;
  border-radius: 999px; background: var(--card); border: 1px solid var(--line); font-variant-numeric: tabular-nums;
}
.share-pill .amt { font-weight: 600; }
.share-pill .pct { margin-left: auto; color: var(--ink-3); font-size: 13px; }

/* list rows with logos */
.list { display: grid; gap: 8px; grid-template-columns: minmax(0, 1fr); }
.list-row {
  display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 8px 12px; border-radius: 12px;
  background: var(--card); font-variant-numeric: tabular-nums;
  transition: background-color var(--t-fast) var(--ease);
}
.card .list-row { background: transparent; padding: 8px 4px; border-radius: 0; min-height: 44px; }
.card .list-row + .list-row { border-top: 1px solid var(--line); }
.list-row .name { font-weight: 500; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-row .val { font-weight: 600; }
.list-row .meta { font-size: 12px; color: var(--ink-3); }
.logo-tile { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; background: var(--card); border: 1px solid var(--line); flex: none; color: var(--ink-2); }
.card-tile .logo-tile { background: var(--tile); }
.pct-tag { display: inline-grid; place-items: center; min-width: 44px; height: 24px; padding: 0 8px; border-radius: 999px; background: var(--tile); font-size: 12px; font-weight: 500; color: var(--ink-2); }

/* thin share bar */
.bar-h { position: relative; height: 6px; border-radius: 999px; background: var(--tile); overflow: hidden; }
.bar-h > i { position: absolute; inset: 0; transform-origin: left center; transform: scaleX(var(--v, 0)); background: var(--ink); border-radius: inherit; }
.bar-h.is-accent > i { background: var(--accent); }
.bar-h.is-muted > i { background: #c9c4be; }

/* avatars */
.avatar {
  display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; flex: none;
  background: var(--t-bg, var(--tile)); color: var(--t-ink, var(--ink-2)); font-size: 12px; font-weight: 600; letter-spacing: 0.02em;
  border: 2px solid var(--card);
}
.avatar.sm { width: 24px; height: 24px; font-size: 10px; border-width: 1px; }
.avatar.lg { width: 44px; height: 44px; font-size: 15px; }
.avatars { display: flex; }
.avatars .avatar + .avatar { margin-left: -8px; }

/* tables */
.table-wrap { overflow-x: auto; margin: 0 -4px; }
.table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.table th { text-align: left; font-size: 12px; font-weight: 500; color: var(--ink-3); padding: 0 8px 8px; white-space: nowrap; }
.table td { padding: 10px 8px; border-top: 1px solid var(--line); vertical-align: middle; }
.table tr:hover td { background: rgba(241,239,237,.5); }
.table .r { text-align: right; }
.table .strong { font-weight: 600; }
.cell-person { display: flex; align-items: center; gap: 10px; min-width: 160px; }
.cell-person .who { display: grid; }
.cell-person .who span { font-size: 12px; color: var(--ink-3); }

/* charts */
.chart { width: 100%; height: auto; overflow: visible; }
.chart .grid-line { stroke: var(--line); stroke-width: 1; }
.chart .axis { fill: var(--ink-3); font-family: var(--mono); font-size: 11px; }
.chart .bar { transform-box: fill-box; transform-origin: 50% 100%; transform: scaleY(var(--grow, 1)); }
.chart .bar:not(.is-ly) { fill: #cfcac4; }
.chart .bar.is-current:not(.is-ly) { fill: var(--accent); }

.chart .bar-hit { fill: transparent; cursor: pointer; }
.chart .line { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.chart .line-muted { fill: none; stroke: #c9c4be; stroke-width: 1.5; stroke-dasharray: 3 4; }
.chart .area { fill: url(#areaFill); }
.chart .val-tag rect { fill: var(--accent); }
.chart .val-tag text { fill: #fff; font-size: 11px; font-weight: 600; font-family: var(--font); }
.chart-tip {
  position: fixed; z-index: 60; pointer-events: none; padding: 8px 10px; border-radius: 10px; background: var(--dark); color: #fff;
  font-size: 12px; line-height: 16px; font-variant-numeric: tabular-nums; box-shadow: var(--sh-float);
  opacity: 0; transform: translateY(4px); transition: opacity var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}
.chart-tip.is-on { opacity: 1; transform: none; }
.chart-tip b { font-weight: 600; display: block; }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12px; color: var(--ink-3); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; background: #cfcac4; }
.legend i.is-accent { background: var(--accent); }
.legend i.is-hatch { background: repeating-linear-gradient(135deg, var(--hatch) 0 2px, transparent 2px 5px); border: 1px solid var(--hatch); }

/* source bars with logos (column chart) */
.colbars { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); align-items: end; gap: 8px; height: 168px; }
.colbar { position: relative; height: 100%; display: flex; align-items: flex-end; }
.colbar > div {
  position: relative; width: 100%; height: var(--h); border-radius: 12px; background: var(--card); border: 1px solid var(--line);
  transform-origin: bottom; transform: scaleY(var(--grow, 1)); display: flex; justify-content: center; padding-top: 10px;
}
.colbar.is-hatch > div { background: repeating-linear-gradient(135deg, #e6e3df 0 2px, #f6f5f4 2px 7px); }
.colbar .logo-tile { width: 28px; height: 28px; border-radius: 8px; }

/* revenue panel with accent column */
.rev-split { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 20px; align-items: stretch; }
.accent-panel {
  position: relative; display: flex; flex-direction: column; gap: 16px; padding: 20px; border-radius: var(--r-lg);
  background: var(--accent); color: #fff; overflow: hidden;
}
.accent-panel .k { font-size: 12px; color: rgba(255,255,255,.75); }
.accent-panel .v { font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; }
.accent-panel .v small { font-size: 13px; font-weight: 500; color: rgba(255,255,255,.75); }
.accent-panel .vlabel { position: absolute; left: 12px; bottom: 20px; writing-mode: vertical-rl; rotate: 180deg; font-size: 12px; color: rgba(255,255,255,.6); }
.accent-panel .stack-sm { padding-left: 20px; }

/* funnel */
.funnel { display: grid; gap: 12px; }
.funnel-row { display: grid; grid-template-columns: 96px minmax(0,1fr) 56px; align-items: center; gap: 12px; font-variant-numeric: tabular-nums; }
.funnel-row .k { font-size: 13px; color: var(--ink-2); }
.funnel-row .v { text-align: right; font-weight: 600; }

/* toasts */
.toasts { position: fixed; z-index: 80; left: 50%; bottom: 24px; translate: -50% 0; display: grid; gap: 8px; width: min(440px, calc(100vw - 32px)); }
.toast {
  display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: 14px; background: var(--dark); color: #fff;
  box-shadow: var(--sh-float); font-weight: 500;
  animation: toast-in var(--t-enter) var(--ease) both;
}
.toast .i { margin-top: 1px; }
.toast-ok .i { color: #6ee7a0; }
.toast-error { background: #fff; color: var(--ink); border: 1px solid rgba(220,38,38,.25); }
.toast-error .i { color: var(--neg); }
.toast.is-out { animation: toast-out 200ms ease-in both; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(8px); } }

/* entrance */
.enter { animation: rise var(--t-enter) var(--ease) both; animation-delay: calc(var(--i, 0) * 50ms); }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }

/* empty state */
.empty { display: grid; place-items: center; gap: 12px; padding: 48px 16px; text-align: center; color: var(--ink-2); }
.empty .icon-btn { width: 48px; height: 48px; }

/* stepper (learning pathway) */
.stepper { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 8px; }
.step { position: relative; display: grid; gap: 8px; padding-top: 4px; }
.step .bar { height: 4px; border-radius: 999px; background: var(--raised); overflow: hidden; }
.step .bar > i { display: block; height: 100%; background: var(--ink); transform-origin: left; transform: scaleX(var(--v, 0)); border-radius: inherit; }
.step.is-current .bar > i { background: var(--accent); }
.step .k { font-size: 12px; color: var(--ink-3); }
.step .t { font-weight: 500; font-size: 13px; }
.step.is-done .t { color: var(--ink); }
.step.is-locked .t { color: var(--ink-3); }

.lesson { display: flex; align-items: center; gap: 12px; padding: 12px 4px; border-top: 1px solid var(--line); }
.lesson:first-child { border-top: 0; }
.lesson .num-box { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; background: var(--tile); font-family: var(--mono); font-size: 12px; color: var(--ink-2); flex: none; }
.lesson.is-done .num-box { background: var(--dark); color: #fff; }
.lesson .grow { flex: 1; min-width: 0; }

.option {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--card); cursor: pointer;
  transition: border-color var(--t-fast) var(--ease), background-color var(--t-fast) var(--ease);
}
.option:hover { background: var(--tile); }
.option input { accent-color: var(--accent); width: 18px; height: 18px; }
.option:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }

/* course cover (built in code, a moment for catalog cards) */
.cover {
  position: relative; aspect-ratio: 16 / 10; border-radius: 14px; overflow: hidden; background: var(--t-bg); color: var(--t-ink);
  display: grid; place-items: center;
}
.cover .cover-icon { width: 38%; height: auto; opacity: .95; }
.cover .cover-icon .i { width: 100%; height: auto; stroke-width: 1; }
.cover .rings { position: absolute; inset: 0; }
.cover .rings circle { fill: none; stroke: var(--t-mid); stroke-width: 1; opacity: .5; }
.cover .cover-tag { position: absolute; left: 12px; top: 12px; }
.cover .cover-tag .tag { background: rgba(255,255,255,.8); color: var(--t-ink); }

/* wallet card: a rendered ticket of credit */
.wallet-card {
  --notch-bg: var(--panel);
  position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0; border-radius: 20px; color: #fff; overflow: visible;
  background: linear-gradient(160deg, #1f1d1b 0%, #141312 100%); box-shadow: 0 20px 40px -20px rgba(20,19,18,.6);
}
.wallet-card .main-part { padding: 24px; display: grid; gap: 20px; }
.wallet-card .side-part { position: relative; padding: 24px; display: grid; align-content: space-between; gap: 12px; border-left: 1.5px dashed rgba(255,255,255,.2); min-width: 160px; }
.wallet-card .k { font-size: 12px; color: rgba(255,255,255,.6); }
.wallet-card .big { font-size: 40px; line-height: 1; font-weight: 600; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.wallet-card .mid { font-size: 18px; font-weight: 600; font-variant-numeric: tabular-nums; }
.wallet-card .brandmark { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.wallet-card .brandmark i { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); display: inline-block; }
.wallet-card .notch { position: absolute; left: -11px; width: 20px; height: 20px; border-radius: 50%; background: var(--notch-bg); }
.wallet-card .notch.t { top: -10px; } .wallet-card .notch.b { bottom: -10px; }
.wallet-split { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
.wallet-split > div { padding: 12px; border-radius: 12px; background: rgba(255,255,255,.06); }

/* event ticket */
.ticket {
  --notch-bg: var(--panel);
  position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 148px; background: var(--card); border-radius: 18px; border: 1px solid var(--line); box-shadow: var(--sh-sm);
}
.ticket .t-main { padding: 20px; display: grid; gap: 12px; }
.ticket .t-stub { position: relative; padding: 16px; display: grid; place-items: center; gap: 8px; border-left: 1.5px dashed var(--line-strong); text-align: center; }
.ticket .t-stub .notch { position: absolute; left: -11px; width: 20px; height: 20px; border-radius: 50%; background: var(--notch-bg); border: 1px solid var(--line); }
.ticket .t-stub .notch.t { top: -11px; clip-path: inset(50% 0 0 0); }
.ticket .t-stub .notch.b { bottom: -11px; clip-path: inset(0 0 50% 0); }
.ticket .qr { width: 104px; height: 104px; }
.ticket .qr canvas, .ticket .qr img, .ticket .qr svg { width: 100%; height: 100%; image-rendering: pixelated; }
.ticket.is-used { opacity: .7; }

/* scanner */
.scanner-view { position: relative; aspect-ratio: 1; max-width: 420px; border-radius: 20px; overflow: hidden; background: var(--dark); }
.scanner-view video { width: 100%; height: 100%; object-fit: cover; }
.scanner-view .frame { position: absolute; inset: 18%; border: 2px solid rgba(255,255,255,.8); border-radius: 18px; }
.scan-result { padding: 16px; border-radius: 16px; display: flex; gap: 12px; align-items: flex-start; animation: rise var(--t-enter) var(--ease) both; }
.scan-result.ok { background: var(--pos-soft); color: #11702f; }
.scan-result.dup { background: #fff3db; color: #7a4b00; }
.scan-result.bad { background: var(--neg-soft); color: #9b1c1c; }

/* certificate */
.cert { max-width: 860px; margin: 32px auto; background: #fff; border-radius: 20px; padding: 56px; position: relative; border: 1px solid var(--line); }

/* drawer for mobile nav */
.drawer-scrim { position: fixed; inset: 0; z-index: 70; background: rgba(21,20,19,.36); opacity: 0; pointer-events: none; transition: opacity var(--t-menu) var(--ease); }
.drawer {
  position: fixed; z-index: 71; top: 0; bottom: 0; left: 0; width: min(320px, 86vw); overflow-y: auto; padding: 20px 16px 32px;
  background: var(--canvas); transform: translateX(-100%); transition: transform 320ms var(--ease);
}
body.drawer-open .drawer { transform: none; }
body.drawer-open .drawer-scrim { opacity: 1; pointer-events: auto; }
body.drawer-open { overflow: hidden; }

/* mobile bottom tab bar */
.tabbar {
  position: fixed; z-index: 50; left: 12px; right: 12px; bottom: 12px; display: none; justify-content: space-around; height: 64px;
  padding: 0 8px calc(env(safe-area-inset-bottom) * 0.5); border-radius: 22px; background: rgba(255,255,255,.94);
  -webkit-backdrop-filter: saturate(1.4) blur(12px); backdrop-filter: saturate(1.4) blur(12px); box-shadow: 0 10px 30px rgba(0,0,0,.1); border: 1px solid var(--line);
}
.tabbar a {
  display: grid; justify-items: center; align-content: center; gap: 2px; min-width: 56px; font-size: 11px; font-weight: 500; color: var(--ink-3);
  transition: color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}
.tabbar a:active { transform: scale(0.94); }
.tabbar a.is-active { color: var(--accent-ink); }
.tabbar a .pip { display: grid; place-items: center; width: 40px; height: 28px; border-radius: 999px; transition: background-color var(--t-fast) var(--ease); }
.tabbar a.is-active .pip { background: var(--accent-soft); }
.mobile-top { display: none; }

/* ------------------------------------------------------------------ public website */

.site { background: var(--panel); }
.site-nav {
  position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 24px; height: 68px; padding: 0 max(24px, calc((100vw - 1240px) / 2));
  background: rgba(246,245,244,.88); -webkit-backdrop-filter: saturate(1.4) blur(12px); backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid transparent; transition: border-color var(--t-menu) var(--ease);
}
.site-nav.is-stuck { border-color: var(--line); }
.wordmark { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 18px; letter-spacing: -0.02em; }
.wordmark .mark { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--dark); color: #fff; font-size: 15px; }
.site-links { display: flex; gap: 4px; }
.site-links a { height: 36px; padding: 0 12px; display: inline-flex; align-items: center; border-radius: 8px; color: var(--ink-2); font-weight: 500; transition: color var(--t-fast) var(--ease), background-color var(--t-fast) var(--ease); }
.site-links a:hover { color: var(--ink); background: var(--tile); }
.site-links a.is-active { color: var(--ink); }
.site-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.site-menu-btn { display: none; }

.container { width: min(1240px, calc(100% - 48px)); margin: 0 auto; }
.section { padding: 96px 0; }
.section-tight { padding: 64px 0; }
.eyebrow { font-size: 13px; font-weight: 500; color: var(--accent-ink); margin-bottom: 12px; display: inline-flex; align-items: center; gap: 8px; }
.h1 { font-size: 64px; line-height: 1.04; font-weight: 500; letter-spacing: -0.035em; }
.h2 { font-size: 40px; line-height: 1.1; font-weight: 500; letter-spacing: -0.025em; }
.h3 { font-size: 20px; line-height: 1.3; font-weight: 600; letter-spacing: -0.01em; }
.lead { font-size: 18px; line-height: 28px; color: var(--ink-2); max-width: 36rem; }
.hl { color: var(--accent); }

.hero { padding: 72px 0 96px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 56px; align-items: center; }
.hero-actions { display: flex; gap: 12px; margin-top: 32px; flex-wrap: wrap; }
.hero-proof { display: flex; gap: 32px; margin-top: 48px; flex-wrap: wrap; }
.hero-proof .v { font-size: 28px; font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.hero-proof .k { font-size: 13px; color: var(--ink-3); }

/* hero product preview */
.preview { position: relative; padding: 20px; border-radius: 28px; background: var(--canvas); }
.preview-app { border-radius: 20px; background: var(--panel); padding: 20px; box-shadow: 0 30px 60px -30px rgba(20,19,18,.35); border: 1px solid rgba(255,255,255,.7); }
.preview .float-ticket { position: absolute; right: -16px; bottom: -28px; width: 300px; box-shadow: 0 24px 48px -16px rgba(20,19,18,.35); }

.path-steps { display: grid; gap: 8px; }
.path-step { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); }
.path-step .st { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--tile); color: var(--ink-3); flex: none; }
.path-step.done .st { background: var(--dark); color: #fff; }
.path-step.now { border-color: rgba(217,45,91,.35); box-shadow: 0 0 0 3px rgba(217,45,91,.08); }
.path-step.now .st { background: var(--accent); color: #fff; }
.path-step .grow { flex: 1; min-width: 0; }
.path-step .t { font-weight: 500; }
.path-step .s { font-size: 12px; color: var(--ink-3); }

.course-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.course-card { display: grid; gap: 14px; padding: 12px 12px 16px; border-radius: 20px; background: var(--card); border: 1px solid var(--line); transition: border-color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease); }
.course-card:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.course-card .body { padding: 0 6px; display: grid; gap: 8px; }
.course-card .meta { display: flex; gap: 12px; font-size: 13px; color: var(--ink-3); flex-wrap: wrap; }
.course-card .price { font-weight: 600; font-variant-numeric: tabular-nums; }

.journey { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; counter-reset: j; }
.journey-step { padding: 20px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); display: grid; gap: 10px; align-content: start; }
.journey-step .n { font-family: var(--mono); font-size: 12px; color: var(--ink-3); }
.journey-step .i { color: var(--accent); }

.mode-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.mode-card { position: relative; display: grid; gap: 16px; padding: 24px; border-radius: 20px; background: var(--card); border: 1px solid var(--line); }
.mode-card.is-featured { border-color: var(--dark); box-shadow: 0 0 0 1px var(--dark); }
.mode-card .price { font-size: 32px; font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.mode-card ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; color: var(--ink-2); }
.mode-card li { display: flex; gap: 8px; align-items: flex-start; }
.mode-card li .i { color: var(--pos); margin-top: 1px; }

.event-row { display: grid; grid-template-columns: 88px minmax(0, 1fr) auto; gap: 20px; align-items: center; padding: 20px; border-radius: 20px; background: var(--card); border: 1px solid var(--line); transition: border-color var(--t-fast) var(--ease); }
.event-row:hover { border-color: var(--line-strong); }
.datebox { display: grid; place-items: center; width: 88px; height: 88px; border-radius: 16px; background: var(--tile); text-align: center; }
.datebox .d { font-size: 30px; font-weight: 600; line-height: 1; letter-spacing: -0.02em; }
.datebox .m { font-size: 12px; color: var(--ink-3); margin-top: 4px; }

.verify-box { max-width: 560px; }
.site-footer { padding: 56px 0 120px; border-top: 1px solid var(--line); color: var(--ink-2); }
.footer-grid { display: grid; grid-template-columns: 2fr repeat(3, 1fr); gap: 32px; }
.footer-grid h4 { font-size: 13px; font-weight: 600; color: var(--ink); margin-bottom: 12px; }
.footer-grid a { display: block; padding: 4px 0; color: var(--ink-2); }
.footer-grid a:hover { color: var(--ink); }

/* auth */
.auth { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); background: var(--panel); }
.auth-side { position: relative; margin: 16px; border-radius: 28px; background: var(--dark); color: #fff; padding: 40px; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; }
.auth-side .quote { font-size: 28px; line-height: 1.25; letter-spacing: -0.02em; font-weight: 500; max-width: 26rem; }
.auth-form { display: grid; place-items: center; padding: 40px 24px; }
.auth-form form { width: min(400px, 100%); display: grid; gap: 16px; }
.demo-accounts { display: grid; gap: 6px; padding: 12px; border-radius: 14px; background: var(--tile); font-size: 13px; }
.demo-accounts button { display: flex; justify-content: space-between; gap: 8px; padding: 6px 8px; border-radius: 8px; border: 0; background: transparent; text-align: left; color: var(--ink-2); transition: background-color var(--t-fast) var(--ease); }
.demo-accounts button:hover { background: var(--card); color: var(--ink); }

.alert { display: flex; gap: 10px; padding: 12px 14px; border-radius: 12px; background: var(--tile); color: var(--ink-2); font-size: 13px; }
.alert .i { margin-top: 1px; flex: none; }
.alert-accent { background: var(--accent-soft); color: var(--accent-ink); }
.alert-pos { background: var(--pos-soft); color: #11702f; }

/* ------------------------------------------------------------------ phase 2 components */
.textarea { height: auto; min-height: 80px; padding: 10px 12px; line-height: 1.5; resize: vertical; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--ink-2); cursor: pointer; }
.check input { width: 18px; height: 18px; margin-top: 1px; accent-color: var(--dark); flex: none; }
.guardian-box { border: 1px solid var(--line-strong); border-radius: var(--r-sm); padding: 16px; display: grid; gap: 12px; margin: 0; }
.guardian-box legend { padding: 0 6px; font-size: 13px; font-weight: 500; }
.input-prefix { display: flex; align-items: stretch; }
.input-prefix > span { display: grid; place-items: center; padding: 0 12px; background: var(--tile); border: 1px solid var(--line-strong); border-right: 0; border-radius: var(--r-sm) 0 0 var(--r-sm); color: var(--ink-2); font-size: 14px; }
.input-prefix .input { border-radius: 0 var(--r-sm) var(--r-sm) 0; min-width: 0; flex: 1; }
.otp-input { font-family: 'Geist Mono', ui-monospace, monospace; font-size: 22px; letter-spacing: 0.4em; text-align: center; height: 52px; }
.kv { display: grid; grid-template-columns: minmax(110px, auto) 1fr; gap: 10px 16px; font-size: 14px; }
.kv > span { color: var(--ink-3); }
.kv > b { font-weight: 500; min-width: 0; overflow-wrap: anywhere; }
.kv-wide { grid-template-columns: repeat(2, minmax(90px, auto) 1fr); }
.thread { display: grid; gap: 12px; }
.msg { padding: 14px 16px; border-radius: var(--r-sm); background: var(--tile); }
.msg.is-staff { background: var(--card); border: 1px solid var(--line-strong); }
.timeline { display: grid; gap: 14px; }
.tl-row { display: flex; gap: 12px; align-items: flex-start; }
.tl-row .logo-tile { width: 28px; height: 28px; flex: none; }
.wa-tpl { display: grid; gap: 4px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-sm); font-size: 13px; transition: border-color .2s cubic-bezier(0.22,1,0.36,1), transform .2s cubic-bezier(0.22,1,0.36,1); }
.wa-tpl:hover { border-color: #25d366; transform: translateY(-1px); }
.seg-opt { position: relative; }
.seg-opt input { position: absolute; opacity: 0; pointer-events: none; }
.seg-opt span { display: inline-flex; align-items: center; height: 30px; padding: 0 14px; border-radius: 9px; font-size: 13px; font-weight: 500; color: var(--ink-2); cursor: pointer; }
.seg-opt input:checked + span { background: var(--dark); color: #fff; box-shadow: inset 0 1px 0 rgba(255,255,255,.12); }
.seg-opt input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.score-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); }
.scorecard.is-scored { border-color: var(--line-strong); background: linear-gradient(var(--card), var(--card)) padding-box; }
.scorecard.is-scored .kpi-figure { color: var(--accent-ink); }
.bell { position: relative; }
.bell-dot { position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 600; display: grid; place-items: center; font-variant-numeric: tabular-nums; animation: pop .4s cubic-bezier(0.22,1,0.36,1) both; }
@keyframes pop { from { transform: scale(.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.list-row.is-unread { background: var(--accent-soft); }
.list-row.is-unread .name { color: var(--ink); }
details.assign { border: 1px solid var(--line); border-radius: var(--r-sm); padding: 12px 14px; }
details.assign summary { display: flex; align-items: center; gap: 8px; cursor: pointer; list-style: none; font-weight: 500; }
details.assign summary::-webkit-details-marker { display: none; }
details.assign summary .name { flex: 1; min-width: 0; }
.invoice .table td, .invoice .table th { padding-left: 0; }
.kyc-decide { flex: 1 1 320px; justify-content: flex-end; }
@media (max-width: 900px) {
  .kv-wide { grid-template-columns: minmax(90px, auto) 1fr; }
  .form-grid[style*="repeat(3"], .form-grid[style*="repeat(4"] { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}
@media (max-width: 420px) {
  .form-grid[style*="repeat(3"], .form-grid[style*="repeat(4"] { grid-template-columns: 1fr !important; }
}
@media (prefers-reduced-motion: reduce) { .bell-dot { animation: none; } .wa-tpl:hover { transform: none; } }

/* ------------------------------------------------------------------ view transitions */

@view-transition { navigation: auto; }
::view-transition-old(panel) { animation: vt-out 160ms ease-in both; }
::view-transition-new(panel) { animation: vt-in 320ms var(--ease) both; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 200ms; }
@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-in { from { opacity: 0; transform: translateY(6px); } }

/* ------------------------------------------------------------------ responsive */

@media (max-width: 1360px) {
  .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .span-4.lg-6 { grid-column: span 6; }
  .span-8.lg-12, .span-4.lg-12 { grid-column: span 12; }
}

@media (max-width: 1180px) {
  .navpanel { display: none; }
  .main { padding-left: 4px; }
  .grid > [class*="span-"] { grid-column: span 12; }
  .grid > .md-6 { grid-column: span 6; }
  .course-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .journey { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hero-grid { gap: 40px; }
  .h1 { font-size: 52px; }
}

@media (max-width: 900px) {
  .rail { display: none; }
  .main { padding: 0 0 104px; }
  .topbar { display: none; }
  .mobile-top {
    display: flex; align-items: center; gap: 12px; position: sticky; top: 0; z-index: 40; height: 60px; padding: 0 16px;
    background: rgba(235,233,231,.9); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  }
  .mobile-top .wordmark { font-size: 16px; }
  .mobile-top .right { margin-left: auto; display: flex; gap: 8px; }
  .tabbar { display: flex; }
  .panel { border-radius: 24px 24px 0 0; padding: 20px 16px 32px; min-height: calc(100vh - 60px); }
  .page-title { font-size: 26px; }
  .figure-xl { font-size: 38px; }
  .kpis { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 72%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin: 0 -16px; padding: 0 16px 4px; }
  .kpis::-webkit-scrollbar { display: none; }
  .kpis > * { scroll-snap-align: start; }
  .grid > .md-6 { grid-column: span 12; }
  .rev-split { grid-template-columns: none; }
  .chart-scroll .chart { min-width: 560px; }
  .accent-panel { flex-direction: row; flex-wrap: wrap; gap: 12px 24px; }
  .accent-panel .stack-sm { padding-left: 0; }
  .accent-panel .vlabel { display: none; }
  .form-grid { grid-template-columns: none; }
  .wallet-card { grid-template-columns: none; }
  .wallet-card .side-part { border-left: 0; border-top: 1.5px dashed rgba(255,255,255,.2); grid-template-columns: 1fr auto; align-items: center; }
  .wallet-card .notch { left: auto; top: auto; bottom: auto; }
  .wallet-card .notch.t { left: -10px; top: auto; }
  .wallet-card .notch.b { right: -10px; left: auto; bottom: auto; }
  .stepper { grid-auto-flow: row; grid-auto-columns: auto; }

  /* site */
  .site-links, .site-actions .hide-sm { display: none; }
  .site-menu-btn { display: inline-grid; }
  .site-nav { padding: 0 16px; gap: 12px; height: 60px; }
  .container { width: calc(100% - 32px); }
  .section { padding: 64px 0; }
  .hero { padding: 40px 0 64px; }
  .hero-grid { grid-template-columns: none; }
  .h1 { font-size: 40px; line-height: 1.06; letter-spacing: -0.03em; }
  .h2 { font-size: 30px; }
  .lead { font-size: 16px; line-height: 26px; }
  .preview { padding: 12px; }
  .preview .float-ticket { position: relative; right: auto; bottom: auto; width: auto; margin-top: 12px; }
  .course-grid, .mode-cards { grid-template-columns: none; }
  .journey { grid-template-columns: none; }
  .event-row { grid-template-columns: 64px minmax(0, 1fr); }
  .event-row .datebox { width: 64px; height: 64px; }
  .event-row .datebox .d { font-size: 22px; }
  .event-row > :last-child { grid-column: 1 / -1; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .auth { grid-template-columns: none; }
  .auth-side { display: none; }
  .cert { padding: 28px; margin: 0; border-radius: 0; }
  .ticket { grid-template-columns: minmax(0, 1fr) 120px; }
  .ticket .qr { width: 88px; height: 88px; }
}

@media (max-width: 420px) {
  .share-pill { min-width: 200px; }
  .ticket { grid-template-columns: none; }
  .ticket .t-stub { border-left: 0; border-top: 1.5px dashed var(--line-strong); }
  .ticket .t-stub .notch { display: none; }
}

/* Android app shell: the native app provides its own chrome */
.is-app .site-footer { display: none; }

@media print {
  body { background: #fff; }
  .no-print { display: none !important; }
  .cert { border: 0; margin: 0; }
}

/* ------------------------------------------------------------------ reduced motion (tiered) */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
  .chart .bar, .colbar > div, .bar-h > i, .step .bar > i { transform: none !important; }
  .bar-h > i { transform: scaleX(var(--v, 0)) !important; }
  .step .bar > i { transform: scaleX(var(--v, 0)) !important; }
  .btn, .chip, .nav-item, .tabbar a { transition: background-color 120ms linear, color 120ms linear !important; }
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}

/* ------------------------------------------------------------------ Nella, the site assistant */

.nella { position: fixed; z-index: 70; right: 24px; bottom: 24px; display: grid; justify-items: end; gap: 12px; pointer-events: none; }
.nella > * { pointer-events: auto; }
.nella-launch {
  display: inline-flex; align-items: center; gap: 10px; height: 52px; padding: 0 18px 0 6px; border: 0; border-radius: 999px;
  background: var(--dark); color: #fff; font: 500 14px/1 var(--font); cursor: pointer; box-shadow: 0 10px 28px rgba(0,0,0,.18);
  animation: nella-in var(--t-enter) var(--ease) backwards 600ms; transition: transform var(--t-fast) var(--ease);
}
.nella-launch:hover { transform: translateY(-2px); }
.nella-launch:active { transform: scale(.96); }
.nella-launch:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.nella-launch[aria-expanded="true"] { display: none; }
.nella-face {
  position: relative; display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 50%;
  background: var(--accent); color: #fff; font: 600 17px/1 var(--font); letter-spacing: -.02em;
}
.nella-live { position: absolute; right: 0; bottom: 1px; width: 10px; height: 10px; border-radius: 50%; background: var(--pos); border: 2px solid var(--dark); }
.nella-head .nella-live { border-color: var(--card); }

.nella-teaser {
  position: relative; max-width: 260px; padding: 14px 36px 14px 16px; border-radius: var(--r) var(--r) 6px var(--r);
  background: var(--card); border: 1px solid var(--line); box-shadow: var(--sh-float); font-size: 14px; color: var(--ink-2);
  animation: nella-pop var(--t-enter) var(--ease) both;
}
.nella-teaser p { margin: 0; }
.nella-teaser b { color: var(--ink); font-weight: 500; }
.nella-teaser-x { position: absolute; top: 8px; right: 8px; display: grid; place-items: center; width: 24px; height: 24px; border: 0; border-radius: 50%; background: transparent; color: var(--ink-3); cursor: pointer; }
.nella-teaser-x:hover { background: var(--tile); color: var(--ink); }

.nella-panel {
  display: flex; flex-direction: column; width: 384px; height: min(620px, calc(100dvh - 48px)); overflow: hidden;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: 0 24px 60px rgba(0,0,0,.16);
  transform-origin: bottom right; animation: nella-open var(--t-menu) var(--ease) both;
}
.nella-panel[hidden], .nella-teaser[hidden], .nella-callback[hidden], .nella-chips[hidden] { display: none; }
.nella-head { display: flex; align-items: center; gap: 12px; padding: 12px 12px 12px 16px; background: var(--card); border-bottom: 1px solid var(--line); }
.nella-who { display: grid; gap: 2px; flex: 1; min-width: 0; }
.nella-who b { font-weight: 500; font-size: 15px; }
.nella-who span { font-size: 12px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.nella-log { flex: 1; overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; gap: 10px; padding: 16px; }
.nella-msg { max-width: 86%; padding: 10px 14px; border-radius: var(--r) var(--r) var(--r) 6px; background: var(--card); border: 1px solid var(--line); font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; animation: nella-pop var(--t-menu) var(--ease) both; }
.nella-msg.is-me { align-self: flex-end; border-radius: var(--r) var(--r) 6px var(--r); background: var(--dark); color: #fff; border-color: var(--dark); }
.nella-msg a { color: var(--accent-ink); font-weight: 500; text-decoration: underline; text-underline-offset: 2px; }
.nella-msg b { font-weight: 600; }
.nella-msg ul { margin: 6px 0 0; padding-left: 18px; }
.nella-msg li + li { margin-top: 2px; }
.nella-msg.is-error { background: var(--neg-soft); border-color: transparent; color: var(--ink); }
.nella-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.nella-chips .chip { cursor: pointer; font-family: inherit; }
.nella-typing { display: inline-flex; gap: 4px; padding: 14px; }
.nella-typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--ink-3); animation: nella-dot 1s var(--ease) infinite; }
.nella-typing i:nth-child(2) { animation-delay: .15s; }
.nella-typing i:nth-child(3) { animation-delay: .3s; }

.nella-callback { display: grid; gap: 8px; margin: 0 12px 8px; padding: 14px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); }
.nella-callback-title { margin: 0; font-weight: 500; font-size: 14px; }
.nella-form { display: grid; gap: 8px; padding: 8px 12px 12px; border-top: 1px solid var(--line); background: var(--panel); }
.nella-callback-open { justify-self: start; display: inline-flex; align-items: center; gap: 6px; padding: 4px 8px; border: 0; border-radius: var(--r-xs); background: transparent; color: var(--ink-2); font: 500 12px/1.2 var(--font); cursor: pointer; }
.nella-callback-open:hover { background: var(--tile); color: var(--ink); }
.nella-input { display: flex; align-items: flex-end; gap: 8px; padding: 6px 6px 6px 14px; background: var(--card); border: 1px solid var(--line-strong); border-radius: 22px; }
.nella-input:focus-within { border-color: var(--ink-3); }
.nella-input textarea { flex: 1; min-width: 0; max-height: 120px; padding: 7px 0; border: 0; outline: 0; resize: none; background: transparent; font: 400 15px/1.4 var(--font); color: var(--ink); }
.nella-send { display: grid; place-items: center; flex: none; width: 36px; height: 36px; border: 0; border-radius: 50%; background: var(--dark); color: #fff; cursor: pointer; transition: transform var(--t-fast) var(--ease), opacity var(--t-fast); }
.nella-send:active { transform: scale(.92); }
.nella-send:disabled { opacity: .35; cursor: default; }

@keyframes nella-in { from { opacity: 0; transform: translateY(16px) scale(.9); } to { opacity: 1; transform: none; } }
@keyframes nella-pop { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes nella-open { from { opacity: 0; transform: translateY(12px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes nella-dot { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
@keyframes nella-nudge { 0%, 100% { transform: none; } 30% { transform: translateY(-6px); } 60% { transform: translateY(0); } 80% { transform: translateY(-2px); } }
.nella-launch.is-nudge { animation: nella-nudge 900ms var(--ease) 1; }

@media (max-width: 900px) {
  .nella.in-app { bottom: calc(88px + env(safe-area-inset-bottom) * .5); right: 16px; }
}
@media (max-width: 640px) {
  .nella { right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); }
  .nella-launch { padding: 0 6px; }
  .nella-launch-label { display: none; }
  .nella-panel { position: fixed; inset: 0; width: auto; height: 100dvh; border: 0; border-radius: 0; transform-origin: bottom center; }
  .nella-head { padding-top: calc(12px + env(safe-area-inset-top)); }
  .nella-form { padding-bottom: calc(12px + env(safe-area-inset-bottom)); }
  .nella-msg { max-width: 92%; }
  body.nella-open { overflow: hidden; }
}
@media print { .nella { display: none; } }
@media (prefers-reduced-motion: reduce) { .nella-typing i { animation: none; opacity: .6; } }

/* ================================================================== colour layer
   The client asked for a colourful product: every area gets its own colour family.
   Tones: violet, rose, orange, amber, green, teal, sky, plum (plus the original moss).
   Each tone sets --t-bg (soft tint), --t-mid, --t-ink (text on tint) and --t-solid (vivid fill). */

:root {
  --violet: #7c3aed; --rose: #e11d64; --orange: #f97316; --amber: #f59e0b;
  --green: #16a34a; --teal: #0d9488; --sky: #0284c7; --plum: #a21caf;
  --accent: #e11d64; --accent-ink: #be123c; --accent-soft: #ffe4ec;
  --grad-hot: linear-gradient(120deg, #e11d64 0%, #f97316 100%);
  --grad-cool: linear-gradient(135deg, #7c3aed 0%, #e11d64 100%);
  --grad-sea: linear-gradient(135deg, #0284c7 0%, #0d9488 100%);
  --grad-sun: linear-gradient(135deg, #f59e0b 0%, #f97316 100%);
  --canvas: #f4f1fb;
}
[data-tone="violet"] { --t-bg: #ede9fe; --t-ink: #5b21b6; --t-mid: #a78bfa; --t-solid: #7c3aed; }
[data-tone="rose"]   { --t-bg: #ffe4ec; --t-ink: #be123c; --t-mid: #fb7199; --t-solid: #e11d64; }
[data-tone="orange"] { --t-bg: #ffedd5; --t-ink: #c2410c; --t-mid: #fdba74; --t-solid: #f97316; }
[data-tone="amber"]  { --t-bg: #fef3c7; --t-ink: #92400e; --t-mid: #fcd34d; --t-solid: #f59e0b; }
[data-tone="green"]  { --t-bg: #dcfce7; --t-ink: #166534; --t-mid: #86efac; --t-solid: #16a34a; }
[data-tone="teal"]   { --t-bg: #ccfbf1; --t-ink: #115e59; --t-mid: #5eead4; --t-solid: #0d9488; }
[data-tone="sky"]    { --t-bg: #e0f2fe; --t-ink: #075985; --t-mid: #7dd3fc; --t-solid: #0284c7; }
[data-tone="plum"]   { --t-bg: #fae8ff; --t-ink: #86198f; --t-mid: #e879f9; --t-solid: #a21caf; }
[data-tone="moss"]   { --t-solid: #65a30d; }

/* ---------- shared controls */
body { background: var(--canvas); }
.btn-primary { background: var(--grad-hot); border-color: transparent; box-shadow: 0 8px 20px -8px rgba(225,29,100,.55); }
.btn-primary:hover { background: linear-gradient(120deg, #be123c 0%, #ea580c 100%); border-color: transparent; }
.btn-dark { background: #1e1b4b; border-color: #1e1b4b; }
.btn-dark:hover { background: #312e81; border-color: #312e81; }
.eyebrow { color: var(--violet); }
.hl { background: var(--grad-hot); -webkit-background-clip: text; background-clip: text; color: transparent; }
.tag { background: #ede9fe; color: #5b21b6; }
.tag-accent { background: #ffe4ec; color: #be123c; }
.tag-pos { background: #dcfce7; color: #166534; }
.tag-dark { background: #1e1b4b; color: #fff; }
.chip.is-on { background: var(--violet); border-color: var(--violet); }
.seg a.is-on { background: #1e1b4b; color: #fff; }
.bar-h > i { background: var(--grad-cool); }
.bar-h.is-accent > i { background: var(--grad-hot); }
.bar-h.is-muted > i { background: #c4b5fd; }
.dot-live { background: var(--green); }
.count { background: var(--rose); color: #fff; }

/* ---------- app shell: coloured rail and menu */
.shell { background:
  radial-gradient(900px 500px at 100% 0%, rgba(124,58,237,.10), transparent 60%),
  radial-gradient(700px 500px at 0% 100%, rgba(13,148,136,.08), transparent 60%), var(--canvas); }
.rail-logo { background: var(--grad-cool); }
.rail-btn[data-tone] { color: var(--t-solid); background: var(--t-bg); box-shadow: none; }
.rail-btn[data-tone].is-active { background: var(--t-solid); color: #fff; box-shadow: 0 8px 18px -8px var(--t-solid); }
.nav-label[data-tone] span { display: inline-flex; align-items: center; gap: 8px; }
.nav-label[data-tone] span::before { content: ""; width: 8px; height: 8px; border-radius: 3px; background: var(--t-solid); }
.nav-tree[data-tone] .nav-item .i { color: var(--t-solid); }
.nav-tree[data-tone] .nav-item:hover { background: var(--t-bg); color: var(--t-ink); }
.nav-tree[data-tone] .nav-item.is-active { background: var(--t-solid); color: #fff; box-shadow: 0 6px 16px -8px var(--t-solid); }
.nav-tree[data-tone] .nav-item.is-active .i { color: #fff; }
.nav-quick .nav-item .i { color: var(--violet); }
.page-title.is-muted { background: var(--grad-cool); -webkit-background-clip: text; background-clip: text; color: transparent; }
.person-chip:nth-child(3n+2) { background: #ede9fe; border-color: transparent; }
.person-chip:nth-child(3n+3) { background: #ffedd5; border-color: transparent; }
.person-chip:nth-child(3n+4) { background: #ccfbf1; border-color: transparent; }

/* ---------- KPI cards: one colour each */
.kpis > .kpi:nth-child(1) { background: linear-gradient(160deg, #ede9fe, #fff 70%); border-color: #ddd6fe; }
.kpis > .kpi:nth-child(1) .kpi-figure { color: #5b21b6; }
.kpis > .kpi:nth-child(3) { background: linear-gradient(160deg, #ccfbf1, #fff 70%); border-color: #99f6e4; --notch-bg: var(--canvas); }
.kpis > .kpi:nth-child(3) .kpi-figure { color: #115e59; }
.kpi-dark { background: var(--grad-cool); border-color: transparent; box-shadow: 0 16px 32px -16px rgba(124,58,237,.6); }
.kpi-dark .kpi-foot .go { color: var(--violet); }
.kpis > .kpi:nth-child(1) .kpi-foot .go { background: #7c3aed; color: #fff; }
.kpis > .kpi:nth-child(3) .kpi-foot .go { background: #0d9488; color: #fff; }
.rev-label { color: var(--violet); font-weight: 600; }
.delta-up { background: #dcfce7; color: #166534; }
.delta-up-soft { background: #ffedd5; color: #c2410c; }
.share-row .share-pill:nth-child(4n+1) { background: #ede9fe; border-color: transparent; }
.share-row .share-pill:nth-child(4n+2) { background: #ffe4ec; border-color: transparent; }
.share-row .share-pill:nth-child(4n+3) { background: #ccfbf1; border-color: transparent; }
.share-row .share-pill:nth-child(4n+4) { background: #fef3c7; border-color: transparent; }

/* ---------- cards get a coloured top edge in rotation */
.grid > .card:nth-child(6n+1), .grid > * > .card:nth-child(6n+1) { border-top: 3px solid var(--violet); }
.grid > .card:nth-child(6n+2), .grid > * > .card:nth-child(6n+2) { border-top: 3px solid var(--orange); }
.grid > .card:nth-child(6n+3), .grid > * > .card:nth-child(6n+3) { border-top: 3px solid var(--teal); }
.grid > .card:nth-child(6n+4), .grid > * > .card:nth-child(6n+4) { border-top: 3px solid var(--rose); }
.grid > .card:nth-child(6n+5), .grid > * > .card:nth-child(6n+5) { border-top: 3px solid var(--sky); }
.grid > .card:nth-child(6n+6), .grid > * > .card:nth-child(6n+6) { border-top: 3px solid var(--amber); }
.card-title .i, .card-head .i { color: var(--violet); }

/* ---------- charts in colour */
.accent-panel { background: var(--grad-cool); box-shadow: 0 18px 36px -18px rgba(124,58,237,.65); }
.chart .bar:not(.is-ly) { fill: #a78bfa; }
.chart .bar.is-current:not(.is-ly) { fill: var(--rose); }
.chart .line { stroke: var(--violet); stroke-width: 2.5; }
.chart .val-tag rect { fill: var(--rose); }
.legend i { background: #a78bfa; }
.legend i.is-accent { background: var(--rose); }
.colbars .colbar:nth-child(5n+1) > div { background: linear-gradient(180deg, #a78bfa, #ede9fe); border-color: transparent; }
.colbars .colbar:nth-child(5n+2) > div { background: linear-gradient(180deg, #fb7199, #ffe4ec); border-color: transparent; }
.colbars .colbar:nth-child(5n+3) > div { background: linear-gradient(180deg, #fdba74, #ffedd5); border-color: transparent; }
.colbars .colbar:nth-child(5n+4) > div { background: linear-gradient(180deg, #5eead4, #ccfbf1); border-color: transparent; }
.colbars .colbar:nth-child(5n+5) > div { background: linear-gradient(180deg, #7dd3fc, #e0f2fe); border-color: transparent; }
.colbar .logo-tile { background: rgba(255,255,255,.85); border-color: transparent; }
.funnel .funnel-row:nth-child(5n+1) .bar-h > i { background: #7c3aed; }
.funnel .funnel-row:nth-child(5n+2) .bar-h > i { background: #0284c7; }
.funnel .funnel-row:nth-child(5n+3) .bar-h > i { background: #0d9488; }
.funnel .funnel-row:nth-child(5n+4) .bar-h > i { background: #f59e0b; }
.funnel .funnel-row:nth-child(5n+5) .bar-h > i { background: var(--grad-hot); }
.list .list-row:nth-child(5n+1) .bar-h > i { background: #7c3aed; }
.list .list-row:nth-child(5n+2) .bar-h > i { background: #f97316; }
.list .list-row:nth-child(5n+3) .bar-h > i { background: #0d9488; }
.list .list-row:nth-child(5n+4) .bar-h > i { background: #e11d64; }
.list .list-row:nth-child(5n+5) .bar-h > i { background: #0284c7; }
.pct-tag { background: #ede9fe; color: #5b21b6; }
.list-row .logo-tile { border-color: transparent; background: #f5f3ff; color: var(--violet); }
.list .list-row:nth-child(4n+2) .logo-tile { background: #fff1e6; color: var(--orange); }
.list .list-row:nth-child(4n+3) .logo-tile { background: #e6fbf7; color: var(--teal); }
.list .list-row:nth-child(4n+4) .logo-tile { background: #ffe9f0; color: var(--rose); }

/* ---------- website */
.site { background: #fbfaff; }
.wordmark .mark { background: var(--grad-cool); color: #fff; }
.hero { position: relative; overflow: hidden; background:
  radial-gradient(600px 420px at 8% 12%, rgba(249,115,22,.16), transparent 60%),
  radial-gradient(700px 480px at 92% 18%, rgba(124,58,237,.18), transparent 62%),
  radial-gradient(600px 420px at 70% 100%, rgba(13,148,136,.14), transparent 60%),
  radial-gradient(500px 380px at 20% 95%, rgba(225,29,100,.12), transparent 60%); }
.hero-proof > div:nth-child(1) .v { color: var(--violet); }
.hero-proof > div:nth-child(2) .v { color: var(--orange); }
.hero-proof > div:nth-child(3) .v { color: var(--teal); }
.preview-app { border-top: 4px solid var(--violet); }
#how { background: linear-gradient(180deg, #f5f3ff 0%, #fff 100%) !important; }
.journey-step:nth-child(5n+1) { --t-bg: #ede9fe; --t-ink: #5b21b6; --t-solid: #7c3aed; }
.journey-step:nth-child(5n+2) { --t-bg: #e0f2fe; --t-ink: #075985; --t-solid: #0284c7; }
.journey-step:nth-child(5n+3) { --t-bg: #ffedd5; --t-ink: #c2410c; --t-solid: #f97316; }
.journey-step:nth-child(5n+4) { --t-bg: #dcfce7; --t-ink: #166534; --t-solid: #16a34a; }
.journey-step:nth-child(5n+5) { --t-bg: #ffe4ec; --t-ink: #be123c; --t-solid: #e11d64; }
.journey-step { background: var(--t-bg); border-color: transparent; }
.journey-step .n { color: var(--t-ink); font-weight: 600; }
.journey-step > .i { width: 44px; height: 44px; padding: 11px; border-radius: 14px; background: var(--t-solid); color: #fff; box-shadow: 0 8px 18px -8px var(--t-solid); }
.course-card { transition: transform var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease); }
.course-card:hover { transform: translateY(-3px); box-shadow: 0 18px 36px -18px rgba(76,29,149,.35); }
.course-card .price { color: var(--rose); }
.cover { background: linear-gradient(140deg, var(--t-bg) 0%, var(--t-mid) 100%); }
.cover .rings circle { stroke: #fff; opacity: .55; }
.cover-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.event-row .datebox { color: #fff; }
.stack > .event-row:nth-child(4n+1) .datebox { background: var(--grad-cool); }
.stack > .event-row:nth-child(4n+2) .datebox { background: var(--grad-sea); }
.stack > .event-row:nth-child(4n+3) .datebox { background: var(--grad-sun); }
.stack > .event-row:nth-child(4n+4) .datebox { background: var(--grad-hot); }
.event-row .datebox .m { color: rgba(255,255,255,.85); }
#centers .chip:nth-child(5n+1) { background: #ede9fe; color: #5b21b6; border-color: transparent; }
#centers .chip:nth-child(5n+2) { background: #ffedd5; color: #c2410c; border-color: transparent; }
#centers .chip:nth-child(5n+3) { background: #ccfbf1; color: #115e59; border-color: transparent; }
#centers .chip:nth-child(5n+4) { background: #ffe4ec; color: #be123c; border-color: transparent; }
#centers .chip:nth-child(5n+5) { background: #e0f2fe; color: #075985; border-color: transparent; }
.wallet-card { background: linear-gradient(135deg, #4c1d95 0%, #7c3aed 45%, #e11d64 100%); box-shadow: 0 24px 48px -20px rgba(124,58,237,.6); }
.site-footer { background: linear-gradient(160deg, #1e1b4b 0%, #312e81 60%, #4c1d95 100%); color: rgba(255,255,255,.75); border-top: 0; }
.site-footer h4, .site-footer .wordmark { color: #fff; }
.site-footer a { color: rgba(255,255,255,.75); }
.site-footer a:hover { color: #fff; }
.site-footer .muted { color: rgba(255,255,255,.55); }
.section-tight { background: linear-gradient(90deg, #fff7ed 0%, #fdf2f8 50%, #f5f3ff 100%) !important; }
.mode-card { border-top: 3px solid var(--violet); }
.mode-cards .mode-card:nth-child(2) { border-top-color: var(--orange); }
.mode-cards .mode-card:nth-child(3) { border-top-color: var(--teal); }

/* ---------- Nella picks up the palette */
.nella-launch { background: var(--grad-cool); }
.nella-face { background: var(--grad-hot); }
.nella-live { border-color: #fff; }
.nella-msg.is-me { background: var(--violet); border-color: var(--violet); }
.nella-send { background: var(--grad-hot); }
.nella-head { background: linear-gradient(120deg, #f5f3ff, #fff 60%); }
.nella-chips .chip:nth-child(4n+1) { background: #ede9fe; color: #5b21b6; border-color: transparent; }
.nella-chips .chip:nth-child(4n+2) { background: #ffedd5; color: #c2410c; border-color: transparent; }
.nella-chips .chip:nth-child(4n+3) { background: #ccfbf1; color: #115e59; border-color: transparent; }
.nella-chips .chip:nth-child(4n+4) { background: #ffe4ec; color: #be123c; border-color: transparent; }

/* ---------- mobile tab bar */
.tabbar a.is-active { color: var(--violet); }
.tabbar a.is-active .pip { background: #ede9fe; }

/* ---------- stock photos (shown only when the file exists, see stock_image()) */
.datebox.has-photo { background: linear-gradient(180deg, rgba(30,27,75,.15), rgba(30,27,75,.75)), var(--photo) center / cover !important; }
.preview.has-photo { background: transparent; }
.hero-photo { position: absolute; top: -28px; right: -28px; width: 74%; height: calc(100% + 20px); object-fit: cover; border-radius: 28px; box-shadow: 0 30px 60px -30px rgba(76,29,149,.5); }
.preview.has-photo .preview-app { position: relative; margin: 72px 22% 0 0; }
.studio-photo { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 20px; box-shadow: 0 20px 40px -24px rgba(76,29,149,.45); }
@media (max-width: 900px) {
  .hero-photo { position: static; width: 100%; height: auto; aspect-ratio: 4 / 3; margin-bottom: -48px; }
  .preview.has-photo .preview-app { margin: 0 12px; }
}

/* ---------- bigger event photos and detail banners */
.event-row:has(.datebox.has-photo) { grid-template-columns: 148px minmax(0, 1fr) auto; }
.datebox.has-photo { width: 148px; height: 108px; overflow: hidden; }
.detail-banner { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 20px; margin-bottom: 16px; box-shadow: 0 24px 48px -24px rgba(76,29,149,.5); }
@media (max-width: 640px) {
  .event-row:has(.datebox.has-photo) { grid-template-columns: 96px minmax(0, 1fr); }
  .datebox.has-photo { width: 96px; height: 96px; }
}

/* ================================================================== motion layer
   Lots of movement, as the client asked, but only transform and opacity, so it stays smooth on phones.
   Everything here switches off under prefers-reduced-motion (global rule near the end of the file). */

/* hero: slowly drifting colour light behind the content */
.hero::before, .hero::after {
  content: ""; position: absolute; z-index: 0; width: 520px; height: 520px; border-radius: 50%; pointer-events: none; filter: blur(60px); opacity: .55;
}
.hero::before { left: -120px; top: -140px; background: radial-gradient(circle, rgba(249,115,22,.55), transparent 65%); animation: drift-a 18s ease-in-out infinite alternate; }
.hero::after { right: -160px; bottom: -200px; background: radial-gradient(circle, rgba(124,58,237,.55), transparent 65%); animation: drift-b 22s ease-in-out infinite alternate; }
.hero > .container { position: relative; z-index: 1; }
@keyframes drift-a { from { transform: translate(0, 0) scale(1); } to { transform: translate(140px, 90px) scale(1.25); } }
@keyframes drift-b { from { transform: translate(0, 0) scale(1.1); } to { transform: translate(-160px, -80px) scale(.9); } }

/* hero: floating ticket, gently zooming photo, animated gradient word */
.preview .float-ticket { animation: bob 5s ease-in-out infinite; }
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(-1deg); } 50% { transform: translateY(-12px) rotate(1deg); } }
.hero-photo { animation: photo-in 1.1s var(--ease) backwards .2s; }
@keyframes photo-in { from { opacity: 0; transform: translateY(30px) scale(.94) rotate(2deg); } to { opacity: 1; transform: none; } }
.hl { background-size: 200% 100%; animation: hl-flow 6s linear infinite; background-image: linear-gradient(90deg, #e11d64, #f97316, #7c3aed, #e11d64); }
@keyframes hl-flow { to { background-position: -200% 0; } }
.hero-proof > div { animation: rise .7s var(--ease) backwards; }
.hero-proof > div:nth-child(2) { animation-delay: .12s; }
.hero-proof > div:nth-child(3) { animation-delay: .24s; }

/* category ticker under the hero */
.ticker { overflow: hidden; padding: 14px 0; background: linear-gradient(90deg, #7c3aed, #e11d64, #f97316, #0d9488, #7c3aed); background-size: 300% 100%; animation: ticker-bg 16s linear infinite; }
.ticker-track { display: flex; gap: 12px; width: max-content; animation: ticker 32s linear infinite; }
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker-item { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 16px; border-radius: 999px; background: rgba(255,255,255,.16); color: #fff; font-weight: 500; white-space: nowrap; }
.ticker-item .i { color: #fff; }
@keyframes ticker { to { transform: translateX(-50%); } }
@keyframes ticker-bg { to { background-position: 300% 0; } }

/* buttons: shine sweep on the main call to action, springy press everywhere */
.btn { transition: transform var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease), background-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease); }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(.97); }
.btn-primary { position: relative; overflow: hidden; isolation: isolate; }
.btn-primary::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.45) 50%, transparent 70%);
  transform: translateX(-120%); animation: shine 3.6s var(--ease) infinite;
}
@keyframes shine { 0%, 55% { transform: translateX(-120%); } 85%, 100% { transform: translateX(120%); } }

/* cards: lift on hover, photo zoom, tilt (tilt is driven from app.js on mouse devices) */
.course-card, .event-row, .journey-step, .kpi, .mode-card, .card, .list-row, .share-pill, .person-chip {
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color var(--t-fast) var(--ease), background-color var(--t-fast) var(--ease);
}
.course-card { transform-style: preserve-3d; will-change: transform; }
.course-card .cover { overflow: hidden; }
.cover-photo { transition: transform .8s var(--ease); }
.course-card:hover .cover-photo { transform: scale(1.08); }
.cover .cover-icon { transition: transform .5s var(--ease); }
.course-card:hover .cover .cover-icon { transform: scale(1.12) rotate(-6deg); }
.cover .rings { animation: rings 12s linear infinite; transform-origin: 50% 50%; }
@keyframes rings { to { transform: rotate(360deg); } }
.event-row:hover { transform: translateX(6px); box-shadow: 0 16px 32px -20px rgba(76,29,149,.4); }
.event-row:hover .btn { background: var(--violet); color: #fff; border-color: var(--violet); }
.datebox.has-photo { transition: transform .5s var(--ease); }
.event-row:hover .datebox { transform: scale(1.04) rotate(-1.5deg); }
.journey-step:hover { transform: translateY(-6px) rotate(-.6deg); box-shadow: 0 20px 36px -22px var(--t-solid); }
.journey-step:hover > .i { animation: wiggle .6s var(--ease); }
.kpi:hover, .mode-card:hover { transform: translateY(-4px); box-shadow: 0 18px 36px -20px rgba(76,29,149,.45); }
.list-row:hover { transform: translateX(4px); }
.share-pill:hover, .person-chip:hover { transform: translateY(-2px); }
.card:hover { box-shadow: 0 18px 40px -26px rgba(76,29,149,.35); }
.wallet-card { transition: transform .6s var(--ease); }
.wallet-card:hover { transform: rotate(-1.5deg) translateY(-6px) scale(1.01); }
.studio-photo, .detail-banner { transition: transform .8s var(--ease); }
.studio-photo:hover, .detail-banner:hover { transform: scale(1.02); }
.chip { transition: transform var(--t-fast) var(--ease); }
.chip:hover { transform: translateY(-2px) scale(1.03); }

/* menu, rail and tab bar */
.nav-item:hover .i { animation: wiggle .5s var(--ease); }
.nav-item { transition: background-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease); }
.nav-item:hover { transform: translateX(3px); }
.rail-btn:hover { transform: translateY(-2px) scale(1.08); }
.rail-logo { animation: logo-spin 8s var(--ease) infinite; }
@keyframes logo-spin { 0%, 85% { transform: rotate(0); } 95% { transform: rotate(360deg); } 100% { transform: rotate(360deg); } }
.tabbar a.is-active .pip { animation: pip-pop .45s var(--ease); }
@keyframes pip-pop { from { transform: scale(.6); } 60% { transform: scale(1.12); } to { transform: scale(1); } }
@keyframes wiggle { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-12deg); } 50% { transform: rotate(10deg); } 75% { transform: rotate(-5deg); } }

/* dashboard: gradient KPI card and accent panel shimmer, live dot pulse */
.kpi-dark, .accent-panel { overflow: hidden; }
.kpi-dark::after, .accent-panel::after {
  content: ""; position: absolute; inset: -50%; pointer-events: none;
  background: conic-gradient(from 0deg, transparent 0 70%, rgba(255,255,255,.18) 80%, transparent 90%);
  animation: sweep 7s linear infinite;
}
@keyframes sweep { to { transform: rotate(360deg); } }
.dot-live { position: relative; }
.dot-live::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: inherit; animation: ping 1.8s var(--ease) infinite; }
@keyframes ping { from { transform: scale(1); opacity: .7; } to { transform: scale(2.6); opacity: 0; } }
.bell-dot { animation: ping-soft 2s ease-in-out infinite; }
@keyframes ping-soft { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.25); } }

/* scroll reveal: set by app.js; content is never hidden when scripts do not run */
.js-motion [data-rv] { opacity: 0; }
.js-motion [data-rv].rv-in { opacity: 1; }

/* page enter for app screens */
.main > * { animation: rise .5s var(--ease) backwards; }
.main > *:nth-child(2) { animation-delay: .05s; }
.main > *:nth-child(3) { animation-delay: .1s; }
.main > *:nth-child(4) { animation-delay: .15s; }

@media (hover: none) {
  .event-row:hover, .list-row:hover, .nav-item:hover { transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .hero::before, .hero::after, .ticker-track, .ticker, .float-ticket, .hl, .rings, .rail-logo, .kpi-dark::after, .accent-panel::after, .btn-primary::after, .dot-live::after, .bell-dot { animation: none !important; }
  .js-motion [data-rv] { opacity: 1; }
}
