/* ==========================================================================
   Product-screen kit for case studies.

   The screens on these pages are not screenshots — they are the interface,
   rebuilt in HTML and CSS. That buys three things a PNG cannot: the process
   actually runs, the type stays crisp at any density, and the screen answers
   the page's colour mode instead of punching a white rectangle through a dark
   article.

   Everything is scoped under .ui and driven by one small set of local custom
   properties, redefined once for dark. Nothing here reads a hard-coded colour
   below the token block — if a value is not in that block it is a bug.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Tokens. Light is the default because the products themselves are light;
   .page-wrap:not(.light-mode) is the site's dark state — the theme toggle
   adds .light-mode, so "no class" means dark.
   -------------------------------------------------------------------------- */

.ui {
  --ui-canvas-a: #eef1f6;
  --ui-canvas-b: #e4e9f1;

  --ui-bg: #ffffff;
  --ui-panel: #fafbfc;
  --ui-sunken: #f1f3f7;
  --ui-line: #e5e9ef;
  --ui-line-soft: #f0f2f6;

  --ui-ink: #14171d;
  --ui-ink-2: #545c68;
  --ui-ink-3: #626b78;

  --ui-solid: #101216;
  --ui-solid-ink: #ffffff;

  --ui-accent: #2563eb;
  --ui-ok: #17a05a;
  --ui-warn: #b4780c;
  --ui-bad: #dc2626;

  /* Tint strength differs per mode: on white a 12% wash reads as a badge, on
     near-black it disappears, so the two modes carry their own mix ratios. */
  --ui-tint: 12%;
  --ui-tint-strong: 18%;
  --ui-shadow: 0 24px 60px rgba(15, 23, 42, .14), 0 2px 8px rgba(15, 23, 42, .06);

  --ui-radius: 12px;
  --ui-radius-sm: 8px;

  /* One place to scale every screen. Type inside a mockup is UI type, not
     prose — it has to stay small relative to the window or the illusion of a
     real screen breaks, so it rides on a container-relative base. */
  --ui-fs: 12px;
}

.page-wrap:not(.light-mode) .ui {
  --ui-canvas-a: #131519;
  --ui-canvas-b: #0d0f13;

  --ui-bg: #15181e;
  --ui-panel: #1a1e25;
  --ui-sunken: #21252d;
  --ui-line: #2b3038;
  --ui-line-soft: #23272f;

  --ui-ink: #f1f4f8;
  --ui-ink-2: #a5adba;
  --ui-ink-3: #8b93a0;

  --ui-solid: #f1f4f8;
  --ui-solid-ink: #101216;

  --ui-accent: #6a9bff;
  --ui-ok: #2ad87f;
  --ui-warn: #e8b931;
  --ui-bad: #ff6b6b;

  --ui-tint: 18%;
  --ui-tint-strong: 26%;
  --ui-shadow: 0 24px 60px rgba(0, 0, 0, .55), 0 2px 8px rgba(0, 0, 0, .4);
}

/* --------------------------------------------------------------------------
   2. Canvas and window
   -------------------------------------------------------------------------- */

.ui {
  background: linear-gradient(180deg, var(--ui-canvas-a) 0%, var(--ui-canvas-b) 100%);
  border: 1px solid var(--_🎨-color--tokens---color-grade--light-16);
  border-radius: calc(var(--_🔘-radius---general--default) + 6px);
  padding: clamp(12px, 3.2vw, 36px);
  transition: background .3s ease, border-color .3s ease;
}

.ui-win {
  background: var(--ui-bg);
  border: 1px solid var(--ui-line);
  border-radius: var(--ui-radius);
  box-shadow: var(--ui-shadow);
  overflow: hidden;
  color: var(--ui-ink);
  font-family: 'DM Sans', sans-serif;
  font-size: var(--ui-fs);
  line-height: 1.45;
  text-align: left;
  transition: background .3s ease, border-color .3s ease, box-shadow .3s ease, color .3s ease;
}

/* --- top bar -------------------------------------------------------------- */

.ui-bar {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--ui-line);
  background: var(--ui-bg);
}

.ui-brand {
  display: flex;
  align-items: center;
  gap: 7px;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: -.01em;
  color: var(--ui-ink);
  white-space: nowrap;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ui-brand i {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: conic-gradient(from 210deg, #f59e0b, #ef4444, #a855f7, #3b82f6, #10b981, #f59e0b);
  -webkit-mask: radial-gradient(circle, transparent 3.4px, #000 3.8px);
  mask: radial-gradient(circle, transparent 3.4px, #000 3.8px);
  flex: none;
}

.ui-brand.is-mark i {
  background: var(--ui-accent);
  -webkit-mask: none;
  mask: none;
  border-radius: 5px;
}

.ui-tabs {
  display: flex;
  gap: 16px;
  margin-left: 4px;
}

.ui-tab {
  font-size: 11px;
  font-weight: 500;
  color: var(--ui-ink-3);
  padding-bottom: 2px;
  white-space: nowrap;
}

.ui-tab.is-on {
  color: var(--ui-ink);
  font-weight: 600;
  box-shadow: inset 0 -2px 0 var(--ui-ink);
}

.ui-user {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  color: var(--ui-ink-2);
  white-space: nowrap;
}

.ui-ava {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--ui-accent) 28%, var(--ui-bg));
  color: color-mix(in srgb, var(--ui-accent) 55%, var(--ui-ink));
  font-size: 8px;
  font-weight: 700;
  display: grid;
  place-items: center;
  flex: none;
}

/* macOS-style title bar, for screens shown as a window rather than an app */
.ui-titlebar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border-bottom: 1px solid var(--ui-line);
  background: var(--ui-panel);
}

.ui-dots {
  display: flex;
  gap: 6px;
  flex: none;
}

.ui-dots i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--ui-ink-3) 45%, transparent);
}

.ui-crumb {
  flex: 1;
  max-width: 320px;
  margin: 0 auto;
  padding: 3px 12px;
  border-radius: 100px;
  background: var(--ui-sunken);
  font-size: 9.5px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ui-ink-3);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* --- body: rail / main / aside ------------------------------------------- */

.ui-body {
  display: grid;
  grid-template-columns: 188px minmax(0, 1fr);
  min-height: 300px;
}

.ui-body.is-3col { grid-template-columns: 172px minmax(0, 1fr) 196px; }
.ui-body.is-1col { grid-template-columns: minmax(0, 1fr); }

.ui-rail {
  border-right: 1px solid var(--ui-line);
  background: var(--ui-panel);
  padding: 14px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.ui-rail-label,
.ui-aside-label {
  font-size: 9px;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--ui-ink-3);
  font-weight: 600;
  margin: 0 8px 9px;
}

.ui-rail-label + .ui-rail-label { margin-top: 14px; }

.ui-nav {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 6px 8px;
  border-radius: var(--ui-radius-sm);
  font-size: 11px;
  color: var(--ui-ink-2);
  min-width: 0;
}

.ui-nav > span { min-width: 0; }

.ui-nav .ui-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--ui-ink-3) 55%, transparent);
  margin-top: 4.5px;
  flex: none;
  transition: background .35s ease, box-shadow .35s ease;
}

.ui-nav.is-on {
  background: color-mix(in srgb, var(--ui-accent) var(--ui-tint), transparent);
  color: color-mix(in srgb, var(--ui-accent) 62%, var(--ui-ink));
  font-weight: 600;
}

.ui-nav.is-on .ui-dot { background: var(--ui-accent); }
.ui-nav.is-done .ui-dot { background: var(--ui-ok); }
.ui-nav.is-done { color: var(--ui-ink); }

.ui-main {
  padding: 18px 20px 20px;
  min-width: 0;
}

.ui-aside {
  border-left: 1px solid var(--ui-line);
  background: var(--ui-panel);
  padding: 14px 12px;
  min-width: 0;
}

/* --- headings inside a screen -------------------------------------------- */

.ui-h {
  font-size: 15px;
  font-weight: 700;
  color: var(--ui-ink);
  margin-bottom: 2px;
  letter-spacing: -.01em;
}

.ui-sub {
  font-size: 11px;
  color: var(--ui-ink-3);
  margin-bottom: 14px;
}

.ui-head-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.ui-head-row .ui-sub { margin-bottom: 0; }

.ui-subtabs {
  display: flex;
  gap: 14px;
  border-bottom: 1px solid var(--ui-line);
  margin-bottom: 13px;
  overflow-x: auto;
  scrollbar-width: none;
}

.ui-subtabs::-webkit-scrollbar { display: none; }

.ui-subtabs span {
  font-size: 11px;
  font-weight: 500;
  color: var(--ui-ink-3);
  padding-bottom: 7px;
  white-space: nowrap;
}

.ui-subtabs span.is-on {
  color: var(--ui-ink);
  font-weight: 600;
  box-shadow: inset 0 -2px 0 var(--ui-ink);
}

/* --------------------------------------------------------------------------
   3. Primitives: cards, buttons, chips, fields, bars, banners
   -------------------------------------------------------------------------- */

.ui-card {
  border: 1px solid var(--ui-line);
  border-radius: 10px;
  background: var(--ui-bg);
  padding: 12px;
  min-width: 0;
}

.ui-card.is-sunken { background: var(--ui-panel); }

/* A card can stand in for a stage row — a connector that is dialling out is the
   same idea as a pipeline step that is running. */
.ui-card[data-state] {
  transition: border-color .4s ease, background .4s ease, box-shadow .4s ease;
}

.ui-card[data-state="run"] {
  border-color: color-mix(in srgb, var(--ui-accent) 55%, transparent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ui-accent) 10%, transparent);
}

.ui-grid {
  display: grid;
  grid-template-columns: repeat(var(--ui-cols, 3), minmax(0, 1fr));
  gap: 10px;
}

.ui-k {
  font-size: 8.5px;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--ui-ink-3);
  font-weight: 600;
}

.ui-t {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ui-ink);
  letter-spacing: -.005em;
}

.ui-d {
  font-size: 10.5px;
  color: var(--ui-ink-2);
  line-height: 1.4;
}

.ui-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--ui-sunken);
  color: var(--ui-ink-2);
  border: 1px solid var(--ui-line);
  font-size: 10.5px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: var(--ui-radius-sm);
  white-space: nowrap;
  transition: background .35s ease, color .35s ease, border-color .35s ease, opacity .35s ease;
}

.ui-btn.is-primary {
  background: var(--ui-solid);
  color: var(--ui-solid-ink);
  border-color: var(--ui-solid);
}

/* A disabled control is a design decision on these pages, so it has to look
   deliberate rather than broken: same shape, drained of contrast. */
.ui-btn.is-off {
  background: var(--ui-sunken);
  color: var(--ui-ink-3);
  border-color: var(--ui-line);
}

.ui-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 9.5px;
  font-weight: 600;
  border-radius: 999px;
  padding: 2px 9px;
  background: var(--ui-sunken);
  color: var(--ui-ink-2);
  white-space: nowrap;
}

.ui-chip i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  flex: none;
}

.ui-chip.is-ok   { background: color-mix(in srgb, var(--ui-ok) var(--ui-tint), transparent);     color: color-mix(in srgb, var(--ui-ok) 65%, var(--ui-ink)); }
.ui-chip.is-run  { background: color-mix(in srgb, var(--ui-accent) var(--ui-tint), transparent); color: color-mix(in srgb, var(--ui-accent) 65%, var(--ui-ink)); }
.ui-chip.is-warn { background: color-mix(in srgb, var(--ui-warn) var(--ui-tint), transparent);   color: color-mix(in srgb, var(--ui-warn) 65%, var(--ui-ink)); }
.ui-chip.is-bad  { background: color-mix(in srgb, var(--ui-bad) var(--ui-tint), transparent);    color: color-mix(in srgb, var(--ui-bad) 65%, var(--ui-ink)); }

.ui-note {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 9px 12px;
  border-radius: var(--ui-radius-sm);
  border: 1px solid var(--ui-line);
  background: var(--ui-panel);
  font-size: 10.5px;
  color: var(--ui-ink-2);
  margin-bottom: 12px;
}

.ui-note b {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: var(--ui-ink);
  margin-bottom: 1px;
}

.ui-note i.badge {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  flex: none;
  margin-top: 1px;
  display: grid;
  place-items: center;
  font-style: normal;
  font-size: 9px;
  font-weight: 700;
}

.ui-note.is-warn {
  border-color: color-mix(in srgb, var(--ui-warn) 45%, transparent);
  background: color-mix(in srgb, var(--ui-warn) var(--ui-tint), transparent);
}

.ui-note.is-warn i.badge {
  background: color-mix(in srgb, var(--ui-warn) 80%, var(--ui-ink));
  color: var(--ui-bg);
}

.ui-note.is-ok {
  border-color: color-mix(in srgb, var(--ui-ok) 45%, transparent);
  background: color-mix(in srgb, var(--ui-ok) var(--ui-tint), transparent);
}

.ui-note.is-ok i.badge {
  background: color-mix(in srgb, var(--ui-ok) 80%, var(--ui-ink));
  color: var(--ui-bg);
}

/* --- form fields ---------------------------------------------------------- */

.ui-field { margin-bottom: 12px; }

.ui-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--ui-ink);
}

.ui-help {
  font-size: 9.5px;
  color: var(--ui-ink-3);
  margin: 1px 0 6px;
}

.ui-input {
  border: 1px solid var(--ui-line);
  border-radius: var(--ui-radius-sm);
  padding: 7px 10px;
  font-size: 11px;
  color: var(--ui-ink-2);
  background: var(--ui-bg);
  transition: border-color .35s ease, background .35s ease, color .35s ease, box-shadow .35s ease;
}

.ui-input.is-empty { color: var(--ui-ink-3); }

.ui-input.is-bad {
  border-color: color-mix(in srgb, var(--ui-bad) 55%, transparent);
  background: color-mix(in srgb, var(--ui-bad) 7%, var(--ui-bg));
}

.ui-input.is-focus {
  border-color: var(--ui-accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ui-accent) 18%, transparent);
  color: var(--ui-ink);
}

.ui-err {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  font-weight: 500;
  color: var(--ui-bad);
  margin-top: 5px;
}

.ui-err i {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--ui-bad) 82%, var(--ui-ink));
  color: var(--ui-bg);
  font-style: normal;
  font-size: 8px;
  font-weight: 700;
  display: grid;
  place-items: center;
  flex: none;
}

.ui-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.ui-tag {
  border: 1px solid var(--ui-line);
  border-radius: 999px;
  padding: 3px 11px;
  font-size: 10px;
  color: var(--ui-ink-2);
  font-weight: 500;
  transition: background .35s ease, color .35s ease, border-color .35s ease;
}

.ui-tag.is-on {
  background: var(--ui-solid);
  border-color: var(--ui-solid);
  color: var(--ui-solid-ink);
}

.ui-seg {
  display: inline-flex;
  border: 1px solid var(--ui-line);
  border-radius: var(--ui-radius-sm);
  overflow: hidden;
}

.ui-seg span {
  padding: 4px 13px;
  font-size: 10.5px;
  color: var(--ui-ink-2);
  font-weight: 500;
}

.ui-seg span.is-on {
  background: var(--ui-solid);
  color: var(--ui-solid-ink);
}

.ui-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--ui-line);
  margin: 16px -20px -20px;
  padding: 11px 20px;
  background: var(--ui-panel);
  flex-wrap: wrap;
}

.ui-ghost { font-size: 11px; color: var(--ui-ink-3); }

/* --- bars, meters, skeleton lines ---------------------------------------- */

.ui-track {
  height: 7px;
  border-radius: 100px;
  background: var(--ui-sunken);
  overflow: hidden;
}

.ui-fill {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 100px;
  background: var(--ui-accent);
  transition: width 1.1s cubic-bezier(.22, .61, .36, 1);
}

.ui-fill.is-ok { background: var(--ui-ok); }
.ui-fill.is-old { background: color-mix(in srgb, var(--ui-ink-3) 55%, transparent); }

.ui-line-fake {
  height: 7px;
  border-radius: 4px;
  background: var(--ui-sunken);
  margin-bottom: 4px;
}

.w90 { width: 90%; } .w80 { width: 80%; } .w75 { width: 75%; }
.w60 { width: 60%; } .w45 { width: 45%; } .w40 { width: 40%; }

/* --- tables --------------------------------------------------------------- */

.ui-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 10.5px;
}

.ui-table th {
  font-size: 8.5px;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--ui-ink-3);
  font-weight: 600;
  text-align: left;
  padding: 6px 9px;
  border-bottom: 1px solid var(--ui-line);
  white-space: nowrap;
}

.ui-table td {
  padding: 8px 9px;
  border-bottom: 1px solid var(--ui-line-soft);
  color: var(--ui-ink-2);
  vertical-align: middle;
}

.ui-table tr:last-child td { border-bottom: 0; }

.ui-file {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.ui-file .ui-doc {
  width: 21px;
  height: 25px;
  border-radius: 5px;
  border: 1px solid var(--ui-line);
  background: var(--ui-panel);
  position: relative;
  flex: none;
}

.ui-file .ui-doc::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 5px;
  width: 11px;
  height: 2px;
  border-radius: 2px;
  background: color-mix(in srgb, var(--ui-ink-3) 45%, transparent);
  box-shadow: 0 4px 0 color-mix(in srgb, var(--ui-ink-3) 45%, transparent),
              0 8px 0 color-mix(in srgb, var(--ui-ink-3) 45%, transparent);
}

.ui-file .n { display: block; font-size: 10.5px; font-weight: 600; color: var(--ui-ink); }
.ui-file .m { display: block; font-size: 9px; color: var(--ui-ink-3); }

.ui-fmt {
  display: inline-block;
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: .04em;
  color: var(--ui-ink-2);
  background: var(--ui-sunken);
  border-radius: 4px;
  padding: 2px 6px;
}

/* --------------------------------------------------------------------------
   4. The running process — stages driven by [data-flow]
   -------------------------------------------------------------------------- */

.ui-stage {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 9px 11px;
  border: 1px solid var(--ui-line);
  border-radius: 10px;
  margin-bottom: 7px;
  background: var(--ui-bg);
  transition: border-color .4s ease, background .4s ease, box-shadow .4s ease;
}

.ui-stage > div { min-width: 0; flex: 1; }

.ui-stage .ui-st-t {
  font-size: 12px;
  font-weight: 600;
  color: var(--ui-ink);
  transition: color .4s ease;
}

.ui-stage .ui-st-d { font-size: 10.5px; color: var(--ui-ink-3); }

.ui-stage[data-state="pend"] .ui-st-t { color: var(--ui-ink-2); font-weight: 500; }

.ui-stage[data-state="run"] {
  border-color: color-mix(in srgb, var(--ui-accent) 55%, transparent);
  background: color-mix(in srgb, var(--ui-accent) 5%, var(--ui-bg));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ui-accent) 10%, transparent);
}

.ui-stage[data-state="done"] {
  border-color: color-mix(in srgb, var(--ui-ok) 28%, var(--ui-line));
}

/* The icon holds all three states stacked in one grid cell and cross-fades
   between them, so the row never changes height as the run advances. */
.ui-ico {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  flex: none;
  margin-top: 1px;
  display: grid;
  place-items: center;
  background: var(--ui-sunken);
  transition: background .4s ease;
}

.ui-ico > * {
  grid-area: 1 / 1;
  opacity: 0;
  transition: opacity .3s ease;
}

.ui-ico .s-pend {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--ui-ink-3) 60%, transparent);
}

.ui-ico .s-run {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  border: 2px solid color-mix(in srgb, var(--ui-accent) 30%, transparent);
  border-top-color: var(--ui-accent);
  animation: ui-spin 1s linear infinite;
}

.ui-ico .s-done { color: var(--ui-ok); display: grid; }

[data-state="pend"] .ui-ico .s-pend,
[data-state="run"] .ui-ico .s-run,
[data-state="done"] .ui-ico .s-done { opacity: 1; }

[data-state="run"] .ui-ico { background: color-mix(in srgb, var(--ui-accent) var(--ui-tint), transparent); }
[data-state="done"] .ui-ico { background: color-mix(in srgb, var(--ui-ok) var(--ui-tint), transparent); }

/* Status chips stack the same way. */
.ui-state {
  margin-left: auto;
  display: grid;
  justify-items: end;
  flex: none;
}

.ui-state > * {
  grid-area: 1 / 1;
  opacity: 0;
  transition: opacity .3s ease;
}

[data-state="pend"] .ui-state .s-pend,
[data-state="run"] .ui-state .s-run,
[data-state="done"] .ui-state .s-done { opacity: 1; }

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

/* --- the agent trail ------------------------------------------------------ */

.ui-trail {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
  padding-top: 11px;
  border-top: 1px dashed var(--ui-line);
}

.ui-node {
  font-size: 10px;
  font-weight: 500;
  color: var(--ui-ink-2);
  background: var(--ui-sunken);
  border-radius: 999px;
  padding: 3px 10px;
  transition: background .4s ease, color .4s ease, box-shadow .4s ease;
}

.ui-node.is-on {
  background: color-mix(in srgb, var(--ui-ok) var(--ui-tint), transparent);
  color: color-mix(in srgb, var(--ui-ok) 65%, var(--ui-ink));
}

.ui-node.is-now {
  background: color-mix(in srgb, var(--ui-accent) var(--ui-tint), transparent);
  color: color-mix(in srgb, var(--ui-accent) 65%, var(--ui-ink));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ui-accent) 12%, transparent);
}

/* --- a thin run meter under the header ------------------------------------ */

.ui-meter {
  height: 3px;
  border-radius: 100px;
  background: var(--ui-sunken);
  overflow: hidden;
  margin-bottom: 12px;
}

.ui-meter i {
  display: block;
  height: 100%;
  width: 0;
  background: var(--ui-accent);
  transition: width .8s cubic-bezier(.22, .61, .36, 1);
}

.ui-win .is-complete .ui-meter i { background: var(--ui-ok); }

/* --------------------------------------------------------------------------
   5. Citation pairing — driven by [data-cycle]
   -------------------------------------------------------------------------- */

.ui-doc-body { padding: 18px 20px; min-width: 0; }

.ui-doc-t { font-size: 14px; font-weight: 700; color: var(--ui-ink); margin-bottom: 2px; }
.ui-doc-m { font-size: 10px; color: var(--ui-ink-3); margin-bottom: 13px; }

.ui-para {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  margin-bottom: 10px;
}

.ui-para .ui-line-fake { margin-bottom: 0; flex: none; }

.ui-cite {
  display: inline-grid;
  place-items: center;
  min-width: 15px;
  height: 15px;
  border-radius: 4px;
  background: var(--ui-sunken);
  color: var(--ui-ink-2);
  font-size: 8.5px;
  font-weight: 700;
  padding: 0 3px;
  transition: background .35s ease, color .35s ease, box-shadow .35s ease, transform .35s ease;
}

.ui-cite.is-on {
  background: color-mix(in srgb, var(--ui-accent) var(--ui-tint-strong), transparent);
  color: color-mix(in srgb, var(--ui-accent) 62%, var(--ui-ink));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ui-accent) 14%, transparent);
  transform: translateY(-1px);
}

.ui-src {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  padding: 7px 8px;
  border: 1px solid var(--ui-line);
  border-radius: var(--ui-radius-sm);
  background: var(--ui-bg);
  margin-bottom: 6px;
  transition: border-color .35s ease, background .35s ease, box-shadow .35s ease;
  min-width: 0;
}

.ui-src.is-on {
  border-color: color-mix(in srgb, var(--ui-accent) 55%, transparent);
  background: color-mix(in srgb, var(--ui-accent) 6%, var(--ui-bg));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ui-accent) 10%, transparent);
}

.ui-src i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ui-ok);
  margin-top: 4px;
  flex: none;
}

.ui-src .n { display: block; font-size: 10.5px; font-weight: 600; color: var(--ui-ink); }
.ui-src .m { display: block; font-size: 9px; color: var(--ui-ink-3); }

.ui-linkish {
  font-size: 10.5px;
  font-weight: 600;
  color: color-mix(in srgb, var(--ui-accent) 70%, var(--ui-ink));
  margin-top: 8px;
}

/* --------------------------------------------------------------------------
   6. Screens too wide to shrink honestly
   Below the point where 10px UI type would have to become 7px, the screen
   scrolls sideways inside its canvas instead. A real interface at a readable
   size beats a legible-nowhere reduction.
   -------------------------------------------------------------------------- */

.ui-scroll {
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--ui-radius);
}

.ui-scroll > .ui-win { min-width: 0; }

@media screen and (max-width: 767px) {
  .ui { padding: 10px; }

  .ui-body,
  .ui-body.is-3col { grid-template-columns: minmax(0, 1fr); }

  /* The rail and the aside are navigation and reference, not the subject of
     any caption on these pages — dropping them keeps the subject full width. */
  .ui-rail,
  .ui-aside,
  .ui-tabs { display: none; }

  .ui-main { padding: 14px; }
  .ui-foot { margin: 14px -14px -14px; padding: 11px 14px; }
  .ui-grid { grid-template-columns: minmax(0, 1fr); }

  .ui-scroll > .ui-win { min-width: 560px; }
}

@media screen and (max-width: 479px) {
  .ui { padding: 8px; }
  .ui-win { font-size: 11.5px; }
  .ui-main { padding: 12px; }
  .ui-foot { margin: 12px -12px -12px; padding: 10px 12px; }
  .ui-head-row { gap: 6px; }
  .ui-scroll > .ui-win { min-width: 480px; }
}


/* --------------------------------------------------------------------------
   8. State that arrives with the flow

   `data-at` gives an element the flow's cursor: .is-on once the run reaches
   that stage, .is-now while it is there. Most primitives already have an
   .is-on look, so they light up for free; the three rules below cover the
   cases where reaching a stage has to *change* an element rather than
   highlight it, and .ui-when covers the cases where it has to replace one.
   -------------------------------------------------------------------------- */

.ui-btn.is-off.is-on {
  background: var(--ui-solid);
  color: var(--ui-solid-ink);
  border-color: var(--ui-solid);
}

.ui-input.is-bad.is-on {
  border-color: var(--ui-line);
  background: var(--ui-bg);
  color: var(--ui-ink);
}

.ui-note.is-warn.is-on {
  border-color: color-mix(in srgb, var(--ui-ok) 45%, transparent);
  background: color-mix(in srgb, var(--ui-ok) var(--ui-tint), transparent);
}

.ui-note.is-warn.is-on i.badge { background: color-mix(in srgb, var(--ui-ok) 80%, var(--ui-ink)); }

/* Two readings of the same slot, cross-faded in place. Both stay in flow so
   the screen never reflows mid-run — a mockup that jumps while you read it
   is worse than a still one. */
.ui-when {
  display: grid;
}

.ui-when > * {
  grid-area: 1 / 1;
  transition: opacity .35s ease;
}

.ui-when > .w-before { opacity: 1; }
.ui-when > .w-after { opacity: 0; }
.ui-when.is-on > .w-before { opacity: 0; }
.ui-when.is-on > .w-after { opacity: 1; }

/* --------------------------------------------------------------------------
   9. Larger screen furniture
   -------------------------------------------------------------------------- */

/* A numbered "start here" step, used where the product's first screen has to
   answer "what do I do" before it answers anything else. */
.ui-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}

.ui-step {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 11px 12px;
  border: 1px solid var(--ui-line);
  border-radius: 10px;
  background: var(--ui-bg);
  transition: border-color .4s ease, background .4s ease, box-shadow .4s ease;
}

.ui-step .n {
  width: 17px;
  height: 17px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 9px;
  font-weight: 700;
  background: var(--ui-sunken);
  color: var(--ui-ink-3);
  margin-bottom: 3px;
  transition: background .4s ease, color .4s ease;
}

.ui-step.is-on {
  border-color: color-mix(in srgb, var(--ui-accent) 55%, transparent);
  background: color-mix(in srgb, var(--ui-accent) 5%, var(--ui-bg));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ui-accent) 10%, transparent);
}

.ui-step.is-on .n {
  background: var(--ui-accent);
  color: var(--ui-bg);
}

.ui-welcome {
  border: 1px solid var(--ui-line);
  border-radius: var(--ui-radius);
  background: var(--ui-panel);
  padding: 14px;
  margin-bottom: 14px;
}

/* A list row — the shape most enterprise screens are actually made of. */
.ui-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid var(--ui-line);
  border-radius: var(--ui-radius-sm);
  background: var(--ui-bg);
  margin-bottom: 6px;
  min-width: 0;
}

.ui-row > .grow { flex: 1; min-width: 0; }

.ui-row .n { display: block; font-size: 11px; font-weight: 600; color: var(--ui-ink); }
.ui-row .m { display: block; font-size: 9.5px; color: var(--ui-ink-3); }

/* Side-by-side legacy / optimised comparison. */
.ui-versus {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.ui-vcard {
  border: 1px solid var(--ui-line);
  border-radius: 10px;
  padding: 12px;
  background: var(--ui-bg);
  min-width: 0;
}

/* Legacy is grey, not red. It is the version being replaced, not a failure. */
.ui-vcard.is-legacy { background: var(--ui-panel); }

.ui-vcard.is-hero {
  border-color: color-mix(in srgb, var(--ui-ok) 50%, transparent);
  background: color-mix(in srgb, var(--ui-ok) 6%, var(--ui-bg));
}

.ui-stat {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  padding: 5px 0;
  border-bottom: 1px solid var(--ui-line-soft);
  font-size: 10px;
  color: var(--ui-ink-3);
}

.ui-stat:last-child { border-bottom: 0; }

.ui-stat b {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ui-ink);
  font-variant-numeric: tabular-nums;
}

.ui-vcard.is-hero .ui-stat b { color: color-mix(in srgb, var(--ui-ok) 62%, var(--ui-ink)); }

/* A scoring race: candidate models, bars that fill once the run reaches them. */
.ui-score {
  display: grid;
  grid-template-columns: minmax(64px, 88px) minmax(0, 1fr) 34px;
  align-items: center;
  gap: 9px;
  padding: 6px 0;
  font-size: 10.5px;
  color: var(--ui-ink-2);
}

.ui-score b {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--ui-ink);
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.ui-score .name {
  color: var(--ui-ink);
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* The empty state that names the next step, rather than shrugging. */
.ui-empty {
  border: 1px dashed var(--ui-line);
  border-radius: 10px;
  padding: 18px 14px;
  text-align: center;
  color: var(--ui-ink-3);
  font-size: 10.5px;
  background: var(--ui-panel);
}

.ui-empty b {
  display: block;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ui-ink-2);
  margin-bottom: 2px;
}

/* A compact screen shown as one of a family, small enough to read as a
   pattern rather than a page. */
.ui-mini {
  border: 1px solid var(--ui-line);
  border-radius: 10px;
  overflow: hidden;
  background: var(--ui-bg);
  font-family: 'DM Sans', sans-serif;
  color: var(--ui-ink);
}

.ui-mini-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border-bottom: 1px solid var(--ui-line);
  background: var(--ui-panel);
  font-size: 9px;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--ui-ink-3);
  font-weight: 600;
}

.ui-mini-body {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  min-height: 132px;
}

.ui-mini-rail {
  border-right: 1px solid var(--ui-line);
  background: var(--ui-panel);
  padding: 8px 6px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.ui-mini-rail i {
  height: 5px;
  border-radius: 3px;
  background: var(--ui-sunken);
}

.ui-mini-rail i.is-on { background: color-mix(in srgb, var(--ui-accent) 55%, transparent); }

.ui-mini-main {
  padding: 9px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.ui-mini-t { font-size: 10.5px; font-weight: 700; }
.ui-mini-d { font-size: 9px; color: var(--ui-ink-3); }

.ui-mini-card {
  border: 1px solid var(--ui-line);
  border-radius: 6px;
  padding: 6px 7px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.ui-mini-card .ui-line-fake { flex: 1; height: 5px; margin: 0; }

@media screen and (max-width: 767px) {
  .ui-steps,
  .ui-versus { grid-template-columns: minmax(0, 1fr); }
}
/* --------------------------------------------------------------------------
   7. Motion, held on request
   The screens must still explain themselves with motion switched off, so the
   engine paints a mid-run frame instead of a first frame and only the looping
   decoration stops here.
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  .ui-ico .s-run { animation: none; }

  .ui *,
  .ui *::before,
  .ui *::after {
    transition-duration: .001ms !important;
  }
}

/* --------------------------------------------------------------------------
   10. Second pass: pieces the real products actually have
   -------------------------------------------------------------------------- */

/* A status strip in place of tabs — MMP keeps system health in the top bar. */
.ui-status {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-left: 6px;
  font-size: 10.5px;
  color: var(--ui-ink-3);
  white-space: nowrap;
  min-width: 0;
  overflow: hidden;
}

.ui-status b { font-weight: 600; color: var(--ui-ink); }

.ui-live {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-weight: 600;
  color: var(--ui-ink);
}

.ui-live::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ui-ok);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ui-ok) 22%, transparent);
}

.ui-ver {
  font-size: 9px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 5px;
  border: 1px solid var(--ui-line);
  background: var(--ui-sunken);
  color: var(--ui-ink-2);
}

/* The real sidebar marks the current screen with a solid block. */
.ui-rail.is-solid .ui-nav.is-on {
  background: var(--ui-solid);
  color: var(--ui-solid-ink);
}

.ui-rail.is-solid .ui-nav.is-on .ui-dot { background: var(--ui-solid-ink); }

/* The legacy card is red in the shipped screen. The case study argues it
   should not be, but the rebuild shows what was built. */
.ui-vcard.is-red {
  border-color: color-mix(in srgb, var(--ui-bad) 45%, transparent);
  background: var(--ui-bg);
}

.ui-vcard.is-red .ui-stat b { color: color-mix(in srgb, var(--ui-bad) 75%, var(--ui-ink)); }

.ui-arch-step {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 9px;
  border: 1px solid var(--ui-line);
  border-radius: var(--ui-radius-sm);
  background: var(--ui-panel);
  font-size: 10.5px;
  color: var(--ui-ink);
}

.ui-arch-step .n {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 8.5px;
  font-weight: 700;
  color: var(--ui-accent);
  background: color-mix(in srgb, var(--ui-accent) var(--ui-tint), transparent);
  flex: none;
}

.ui-arch-step.is-ok {
  border-color: color-mix(in srgb, var(--ui-ok) 40%, transparent);
  background: color-mix(in srgb, var(--ui-ok) 7%, var(--ui-bg));
}

.ui-arch-step.is-ok .n { color: var(--ui-ok); background: color-mix(in srgb, var(--ui-ok) var(--ui-tint), transparent); }

.ui-arch-step small { display: block; font-size: 9px; color: var(--ui-ink-3); }

.ui-arch-arrow {
  text-align: center;
  font-size: 10px;
  line-height: 14px;
  color: var(--ui-ink-3);
}

.ui-delta {
  display: inline-block;
  margin-left: 5px;
  font-size: 8.5px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 999px;
  color: color-mix(in srgb, var(--ui-ok) 65%, var(--ui-ink));
  background: color-mix(in srgb, var(--ui-ok) var(--ui-tint), transparent);
  vertical-align: 1px;
}

/* Settings toggles and keyboard shortcuts. */
.ui-toggle {
  width: 24px;
  height: 14px;
  border-radius: 999px;
  background: var(--ui-sunken);
  border: 1px solid var(--ui-line);
  position: relative;
  flex: none;
}

.ui-toggle::after {
  content: "";
  position: absolute;
  top: 1px;
  left: 1px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--ui-bg);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .25);
}

.ui-toggle.is-on { background: var(--ui-solid); border-color: var(--ui-solid); }
.ui-toggle.is-on::after { left: 11px; background: var(--ui-solid-ink); }

.ui-kbd {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 8.5px;
  padding: 1px 5px;
  border-radius: 4px;
  background: var(--ui-sunken);
  color: var(--ui-ink-2);
  white-space: nowrap;
}

/* Richer mini screens: real rows instead of skeleton lines. */
.ui-mini-row {
  display: flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--ui-line);
  border-radius: 6px;
  padding: 5px 7px;
  font-size: 9px;
  color: var(--ui-ink);
  min-width: 0;
}

.ui-mini-row > .grow { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ui-mini-row small { color: var(--ui-ink-3); font-size: 8.5px; }

.ui-mini-kpi {
  display: flex;
  gap: 10px;
  padding: 6px 8px;
  border-radius: 6px;
  background: color-mix(in srgb, var(--ui-ok) 8%, var(--ui-bg));
  border: 1px solid color-mix(in srgb, var(--ui-ok) 30%, transparent);
  font-size: 8.5px;
  color: var(--ui-ink-3);
}

.ui-mini-kpi b { display: block; font-size: 12px; color: color-mix(in srgb, var(--ui-ok) 70%, var(--ui-ink)); }

.ui-mini .ui-btn { font-size: 9px; padding: 4px 9px; justify-content: center; }

/* A modal over a dimmed screen: preview before commitment. */
.ui-stage-wrap { position: relative; }

.ui-scrim {
  position: absolute;
  inset: 0;
  background: color-mix(in srgb, var(--ui-canvas-b) 62%, transparent);
  backdrop-filter: blur(1.5px);
  display: grid;
  place-items: center;
  padding: 16px;
  z-index: 2;
}

.ui-modal {
  width: min(360px, 100%);
  background: var(--ui-bg);
  border: 1px solid var(--ui-line);
  border-radius: var(--ui-radius);
  box-shadow: var(--ui-shadow);
  padding: 14px;
}

.ui-modal .ui-h { font-size: 13px; }

.ui-sec {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 9px;
  border: 1px solid var(--ui-line);
  border-radius: var(--ui-radius-sm);
  margin-bottom: 5px;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--ui-ink);
}

.ui-sec .grip {
  width: 6px;
  height: 10px;
  flex: none;
  background: radial-gradient(circle, var(--ui-ink-3) 1px, transparent 1.3px) 0 0 / 3px 3.3px;
  opacity: .7;
}

.ui-sec .edit { margin-left: auto; font-size: 9px; font-weight: 500; color: var(--ui-ink-3); }

.ui-uc {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 11px 12px;
  border: 1px solid var(--ui-line);
  border-radius: 10px;
  background: var(--ui-bg);
  min-width: 0;
}

.ui-uc .ui-actions { display: flex; align-items: center; gap: 10px; margin-top: 6px; }

/* Dialogs, for the copy audit. */
.ui-dialog {
  background: var(--ui-bg);
  border: 1px solid var(--ui-line);
  border-radius: var(--ui-radius);
  box-shadow: var(--ui-shadow);
  padding: 16px;
  font-family: 'DM Sans', sans-serif;
  font-size: var(--ui-fs);
  color: var(--ui-ink);
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.ui-dialog-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 13px;
  color: var(--ui-bad);
  background: color-mix(in srgb, var(--ui-bad) var(--ui-tint), transparent);
}

.ui-dialog.is-good .ui-dialog-icon {
  color: var(--ui-warn);
  background: color-mix(in srgb, var(--ui-warn) var(--ui-tint), transparent);
}

.ui-dialog-t { font-size: 14px; font-weight: 700; letter-spacing: -.01em; }
.ui-dialog-d { font-size: 11px; line-height: 1.5; color: var(--ui-ink-2); }
.ui-dialog-d b { color: color-mix(in srgb, var(--ui-accent) 70%, var(--ui-ink)); font-weight: 600; }

.ui-dialog-foot {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 6px;
}

.ui-verdict {
  align-self: flex-start;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 999px;
  margin-bottom: 2px;
}

.ui-verdict.is-bad { color: color-mix(in srgb, var(--ui-bad) 70%, var(--ui-ink)); background: color-mix(in srgb, var(--ui-bad) var(--ui-tint), transparent); }
.ui-verdict.is-ok  { color: color-mix(in srgb, var(--ui-ok) 70%, var(--ui-ink)); background: color-mix(in srgb, var(--ui-ok) var(--ui-tint), transparent); }

/* The agent drawn as a small graph: each node active, done or asking. */
.ui-graph {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 0;
  margin-top: 12px;
  padding-top: 11px;
  border-top: 1px dashed var(--ui-line);
}

.ui-graph .ui-node { margin-right: 14px; position: relative; }

.ui-graph .ui-node:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 50%;
  right: -12px;
  width: 10px;
  height: 1px;
  background: var(--ui-line);
}

.ui-node.is-attn.is-on {
  background: color-mix(in srgb, var(--ui-warn) var(--ui-tint), transparent);
  color: color-mix(in srgb, var(--ui-warn) 65%, var(--ui-ink));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ui-warn) 12%, transparent);
}

/* A phone, for the Live Prep surface. */
.ui-phone {
  width: 200px;
  flex: none;
  border: 1px solid var(--ui-line);
  border-radius: 24px;
  background: var(--ui-bg);
  box-shadow: var(--ui-shadow);
  padding: 10px 10px 14px;
  font-family: 'DM Sans', sans-serif;
  font-size: 11px;
  color: var(--ui-ink);
}

.ui-phone-notch {
  width: 54px;
  height: 5px;
  border-radius: 999px;
  background: var(--ui-sunken);
  margin: 0 auto 10px;
}

.ui-phone .ui-stage { padding: 7px 8px; margin-bottom: 5px; gap: 7px; }
.ui-phone .ui-stage .ui-st-t { font-size: 10.5px; }
.ui-phone .ui-stage .ui-st-d { font-size: 9px; }

/* Locale twins: the same form, two languages, one component. */
.ui-surfaces {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.ui-twins {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.ui-lang {
  display: inline-block;
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: .06em;
  padding: 1px 6px;
  border-radius: 4px;
  background: var(--ui-sunken);
  color: var(--ui-ink-2);
  margin-bottom: 8px;
}

/* Only the item matching the cycle's key shows; the rest wait in the same cell. */
.ui-swapset { display: grid; }
.ui-swapset > * { grid-area: 1 / 1; opacity: 0; transition: opacity .35s ease; }
.ui-swapset > .is-on { opacity: 1; }

.ui-uc[data-key] { transition: border-color .35s ease, box-shadow .35s ease, background .35s ease; }

.ui-uc.is-on {
  border-color: color-mix(in srgb, var(--ui-accent) 55%, transparent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ui-accent) 10%, transparent);
}

@media screen and (max-width: 767px) {
  .ui-status > :not(.ui-live) { display: none; }
  .ui-surfaces { flex-direction: column; align-items: stretch; }
  .ui-phone { width: auto; }
  .ui-twins { grid-template-columns: minmax(0, 1fr); }
}

.ui-appear { opacity: 0; transition: opacity .4s ease; }
.ui-appear.is-on { opacity: 1; }

/* Toggles also sit inline in table cells, where a bare span has no box. */
.ui-toggle { display: inline-block; vertical-align: middle; }
.ui-lang { align-self: flex-start; }

.ui-split { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 14px; }
.ui-ucs { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }

@media screen and (max-width: 767px) {
  .ui-split { grid-template-columns: minmax(0, 1fr); }
  .ui-ucs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* --------------------------------------------------------------------------
   11. Notices and icons
   A notice is the loudest thing inside a screen, so it gets the most care:
   an icon tile that names the kind, a title that says what happened, one
   line on what to do, and an optional action. Tone comes from one variable.
   -------------------------------------------------------------------------- */

.ui-note {
  --tone: var(--ui-accent);
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px 9px 12px;
  border-radius: 10px;
  font-size: 10.5px;
  line-height: 1.45;
  color: var(--ui-ink-2);
  margin-bottom: 12px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .05);
  transition: background .4s ease, border-color .4s ease;
}

.ui-note::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--tone);
  transition: background .4s ease;
}

.ui-note.is-warn { --tone: var(--ui-warn); }
.ui-note.is-ok   { --tone: var(--ui-ok); }
.ui-note.is-bad  { --tone: var(--ui-bad); }
.ui-note.is-info { --tone: var(--ui-accent); }
.ui-note.is-warn.is-on { --tone: var(--ui-ok); }

/* Listed together so each beats the older single-purpose rules above. */
.ui-note,
.ui-note.is-warn,
.ui-note.is-ok,
.ui-note.is-bad,
.ui-note.is-info,
.ui-note.is-warn.is-on {
  border: 1px solid color-mix(in srgb, var(--tone) 32%, var(--ui-line));
  background: color-mix(in srgb, var(--tone) 8%, var(--ui-bg));
}

.ui-note-ico {
  flex: none;
  width: 24px;
  height: 24px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  color: color-mix(in srgb, var(--tone) 80%, var(--ui-ink));
  background: color-mix(in srgb, var(--tone) 18%, transparent);
  transition: background .4s ease, color .4s ease;
}

.ui-note-ico .i {
  grid-area: 1 / 1;
  width: 13px;
  height: 13px;
  transition: opacity .3s ease;
}

.ui-note-ico .i-b { opacity: 0; }
.ui-note.is-on .ui-note-ico .i-a { opacity: 0; }
.ui-note.is-on .ui-note-ico .i-b { opacity: 1; }

.ui-note-body { flex: 1; min-width: 0; }

.ui-note b {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: var(--ui-ink);
  margin-bottom: 1px;
}

.ui-note-act {
  flex: none;
  font-size: 10px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 7px;
  background: var(--ui-bg);
  border: 1px solid color-mix(in srgb, var(--tone) 38%, var(--ui-line));
  color: color-mix(in srgb, var(--tone) 72%, var(--ui-ink));
  white-space: nowrap;
}

/* Inline field messages. */
.ui-err { gap: 5px; }
.ui-err .i { width: 12px; height: 12px; }

.ui-ok-line {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  font-weight: 500;
  color: color-mix(in srgb, var(--ui-ok) 75%, var(--ui-ink));
}

.ui-ok-line .i { width: 11px; height: 11px; stroke-width: 2.6; }

/* Empty state: an icon, a headline, the next step. */
.ui-empty-ico {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  margin: 0 auto 8px;
  background: var(--ui-bg);
  border: 1px solid var(--ui-line);
  color: var(--ui-ink-3);
}

.ui-empty-ico .i { width: 11px; height: 11px; }

/* Dialogs. */
.ui-dialog-icon .i { width: 15px; height: 15px; }

.ui-verdict { display: inline-flex; align-items: center; gap: 4px; }
.ui-verdict .i { width: 10px; height: 10px; stroke-width: 2.4; }

/* --- icons across the screen kit ------------------------------------------ */

.ui-nav { align-items: center; }
.ui-nav > .i { width: 13px; height: 13px; color: var(--ui-ink-3); }
.ui-nav.is-on > .i { color: inherit; }

.ui-status > span { display: inline-flex; align-items: center; gap: 4px; }
.ui-status .i { width: 11px; height: 11px; }

.ui-user { gap: 10px; }
.ui-stat-i { display: inline-flex; align-items: center; gap: 4px; color: var(--ui-ink-3); }
.ui-stat-i b { color: var(--ui-ink); font-weight: 600; }
.ui-stat-i .i { width: 11px; height: 11px; color: var(--ui-accent); }

.ui-h-ico {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 7px;
  margin-right: 8px;
  vertical-align: -5px;
  background: var(--ui-sunken);
  color: var(--ui-ink-2);
}

.ui-h-ico .i { width: 12px; height: 12px; }

.ui-chip .i { width: 10px; height: 10px; }

.ui-step-go {
  margin-top: auto;
  padding-top: 6px;
  color: var(--ui-ink-3);
  transition: color .35s ease, transform .35s ease;
}

.ui-step-go .i { width: 13px; height: 13px; }
.ui-step.is-on .ui-step-go { color: var(--ui-accent); transform: translateX(3px); }

.ui-row-ico,
.ui-src-ico,
.ui-uc-ico {
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 7px;
  color: var(--ui-accent);
  background: color-mix(in srgb, var(--ui-accent) var(--ui-tint), transparent);
  transition: background .35s ease, color .35s ease;
}

.ui-row-ico { width: 26px; height: 26px; }
.ui-row-ico.is-ok { color: var(--ui-ok); background: color-mix(in srgb, var(--ui-ok) var(--ui-tint), transparent); }
.ui-row-ico .i { width: 13px; height: 13px; }

.ui-src-ico { width: 22px; height: 22px; border-radius: 6px; color: var(--ui-ink-2); background: var(--ui-sunken); }
.ui-src-ico .i { width: 11px; height: 11px; }
.ui-src.is-on .ui-src-ico { color: var(--ui-accent); background: color-mix(in srgb, var(--ui-accent) var(--ui-tint), transparent); }
.ui-src { align-items: center; }

.ui-uc-ico { width: 26px; height: 26px; border-radius: 8px; margin-bottom: 4px; }
.ui-uc-ico .i { width: 13px; height: 13px; }
.ui-uc.is-on .ui-uc-ico { background: var(--ui-accent); color: var(--ui-bg); }

.ui-card-head { display: flex; align-items: center; gap: 8px; margin-bottom: 9px; }
.ui-card-head .ui-t,
.ui-card-head .ui-d { display: block; }

.ui-btn .i { width: 11px; height: 11px; }
.ui-btn svg.i { stroke-width: 2.2; }

.ui-tag { display: inline-flex; align-items: center; gap: 4px; }
.ui-tag .i { width: 10px; height: 10px; }

.ui-seg span { display: inline-flex; align-items: center; gap: 5px; }
.ui-seg .i { width: 10px; height: 10px; }

.ui-node { display: inline-flex; align-items: center; gap: 4px; }
.ui-node .i { width: 10px; height: 10px; }

.ui-linkish { display: inline-flex; align-items: center; gap: 5px; }
.ui-linkish .i { width: 11px; height: 11px; }

.ui-k .i { width: 10px; height: 10px; margin-right: 5px; vertical-align: -1px; }

.ui-sec .edit { display: grid; place-items: center; }
.ui-sec .edit .i { width: 10px; height: 10px; }

.ui-stat > span:first-child { display: inline-flex; align-items: center; gap: 6px; }
.ui-stat > span:first-child .i { width: 11px; height: 11px; }

.ui-arch-step .n .i { width: 9px; height: 9px; stroke-width: 3; }

.ui-mini-bar .i { width: 11px; height: 11px; }
.ui-mini-row > .i { width: 10px; height: 10px; color: var(--ui-ink-3); }

.ui-td-act { text-align: right; color: var(--ui-ink-3); }
.ui-td-act .i { width: 12px; height: 12px; }

.ui-ico .s-done.i { width: 10px; height: 10px; stroke-width: 3; color: var(--ui-ok); }

/* A select that looks like one. */
.ui-select { position: relative; padding-right: 26px; }

.ui-select::after {
  content: "";
  position: absolute;
  right: 11px;
  top: 50%;
  width: 5px;
  height: 5px;
  border-right: 1.5px solid var(--ui-ink-3);
  border-bottom: 1.5px solid var(--ui-ink-3);
  transform: translateY(-70%) rotate(45deg);
}

/* Product logos. Declared after `.cs-figure svg` (same specificity) so the
   figure border and full width never reach them. */
svg.ui-logo { display: block; flex: none; width: 18px; height: 18px; border: 0; border-radius: 5px; }
.ui-brand { gap: 8px; }


/* ==========================================================================
   12. Vitala. A phone-first product, so its screens are phones: the same kit
   tokens, re-tinted to the brand's orange, on the cream the store listing
   uses. `.ui.is-vitala` is the only switch.
   ========================================================================== */

@property --vt-p {
  syntax: "<number>";
  inherits: true;
  initial-value: 0;
}

.ui.is-vitala {
  --ui-canvas-a: #f8f1e7;
  --ui-canvas-b: #f0e5d3;
  --ui-accent: #e8591f;
  --vt-sun: #ffa646;
  --vt-orange: #f7833a;
  --vt-coral: #fc503a;
  --vt-rose: #fc2f4a;
  --vt-soft: #fff4ea;
  --vt-line: #f6dcc6;
}

.page-wrap:not(.light-mode) .ui.is-vitala {
  --ui-canvas-a: #1b1713;
  --ui-canvas-b: #13110e;
  --ui-accent: #ff8a4c;
  --vt-soft: #2a1f18;
  --vt-line: #4a3222;
}

/* --- layout: one or two phones, or a phone and its notes ------------------ */

.vt-row {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: clamp(14px, 3vw, 40px);
}

.vt-notes {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 250px;
  align-self: center;
  font-family: 'DM Sans', sans-serif;
}

/* Side notes explain the screen to the reader; they are prose, not UI, so
   they read at caption size rather than at the phone's type size. */
.vt-notes { width: 280px; gap: 12px; }
.vt-notes .ui-note { font-size: 13.5px; line-height: 1.5; padding: 12px 14px 12px 14px; align-items: flex-start; }
.vt-notes .ui-note b { font-size: 15px; margin-bottom: 3px; }
.vt-notes .ui-note-ico { width: 28px; height: 28px; }
.vt-notes .ui-note-ico .i { width: 15px; height: 15px; }
.vt-notes .ui-note { margin: 0; opacity: .35; transform: translateY(4px); transition: opacity .4s ease, transform .4s ease, background .4s ease, border-color .4s ease; }
.vt-notes .ui-note.is-on { opacity: 1; transform: none; }

/* --- the phone ------------------------------------------------------------ */

.vt-phone {
  position: relative;
  flex: none;
  display: flex;
  flex-direction: column;
  width: 236px;
  min-height: 486px;
  border: 1px solid var(--ui-line);
  border-radius: 32px;
  background: var(--ui-bg);
  box-shadow: var(--ui-shadow), inset 0 0 0 5px var(--ui-bg), inset 0 0 0 6px var(--ui-line-soft);
  overflow: hidden;
  font-family: 'DM Sans', sans-serif;
  font-size: 11px;
  line-height: 1.4;
  color: var(--ui-ink);
  text-align: left;
}

.vt-status {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 11px 20px 5px;
  font-size: 9px;
  font-weight: 700;
}

.vt-status::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 8px;
  width: 58px;
  height: 15px;
  margin-left: -29px;
  border-radius: 999px;
  background: #0d0f12;
}

.vt-status i { display: flex; gap: 2px; align-items: flex-end; }
.vt-status i::before,
.vt-status i::after { content: ""; width: 3px; height: 5px; border-radius: 1px; background: currentColor; }
.vt-status i::after { height: 7px; }

.vt-body { flex: 1; padding: 6px 12px 12px; min-width: 0; }

.vt-tabbar {
  display: flex;
  justify-content: space-around;
  padding: 7px 6px 12px;
  border-top: 1px solid var(--ui-line);
  background: var(--ui-bg);
  font-size: 8.5px;
  font-weight: 500;
  color: var(--ui-ink-3);
}

.vt-tabbar span { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.vt-tabbar .i { width: 13px; height: 13px; }
.vt-tabbar .is-on { color: var(--ui-accent); font-weight: 700; }

/* --- pieces --------------------------------------------------------------- */

.vt-hero {
  margin: -30px 0 0;
  padding: 30px 12px 16px;
  border-radius: 0 0 20px 20px;
  background: linear-gradient(165deg, var(--vt-orange) 0%, var(--vt-coral) 58%, var(--vt-rose) 100%);
  color: #fff;
  text-align: center;
}

.vt-hero + .vt-body { padding-top: 10px; }

.vt-word { display: block; font-size: 17px; font-weight: 700; letter-spacing: -.02em; margin-bottom: 6px; }

.vt-goal { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 6px; }
.vt-goal small { display: block; font-size: 8px; line-height: 1.25; opacity: .9; }
.vt-goal b { display: block; font-size: 12px; }
.vt-goal .vt-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; border: 1.5px solid #fff; margin-bottom: 2px; }
.vt-goal .vt-dot.is-a { background: #2ad87f; }
.vt-goal .vt-dot.is-b { background: #4f9bff; }

.vt-ring {
  --vt-p: 24;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: conic-gradient(#fff calc(var(--vt-p) * 1%), rgba(255, 255, 255, .28) 0);
  -webkit-mask: radial-gradient(circle, transparent 23px, #000 24px);
  mask: radial-gradient(circle, transparent 23px, #000 24px);
  transition: --vt-p 1.2s cubic-bezier(.2, .7, .2, 1);
}

.vt-ring.is-on { --vt-p: 71; }
.vt-ring-wrap { position: relative; display: grid; place-items: center; }
.vt-ring-wrap svg.vt-ring-logo { position: absolute; width: 26px; height: 26px; border-radius: 8px; }
.vt-hero p { font-size: 8.5px; margin: 6px 0 0; opacity: .9; }

.vt-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 2px 0 8px;
  font-size: 10px;
  font-weight: 600;
  color: var(--ui-accent);
  white-space: nowrap;
}

.vt-title::before,
.vt-title::after { content: ""; flex: 1; height: 1px; background: color-mix(in srgb, var(--ui-accent) 45%, transparent); }

.vt-card {
  border: 1px solid var(--ui-line);
  border-radius: 14px;
  background: var(--ui-bg);
  padding: 10px;
  margin-bottom: 8px;
  box-shadow: 0 6px 16px -10px rgba(120, 60, 20, .35);
}

.vt-card-head { display: flex; align-items: flex-start; gap: 8px; }
.vt-card-head > div { flex: 1; min-width: 0; }
.vt-card-t { font-size: 11.5px; font-weight: 700; }
.vt-card-d { font-size: 9px; color: var(--ui-ink-3); }

.vt-badge {
  flex: none;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  color: var(--ui-accent);
  background: color-mix(in srgb, var(--vt-sun) 26%, var(--ui-bg));
}

.vt-badge .i { width: 13px; height: 13px; }

.vt-k { display: block; font-size: 8.5px; color: var(--ui-ink-3); margin: 8px 0 4px; }

.vt-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; }
.vt-day { display: grid; justify-items: center; gap: 2px; font-size: 7.5px; color: var(--ui-ink-3); }

.vt-day > span {
  position: relative;
  display: grid;
  place-items: center;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  border: 1.5px solid color-mix(in srgb, var(--ui-ink-3) 45%, transparent);
  transition: background .35s ease, border-color .35s ease, box-shadow .35s ease;
}

.vt-day > span .i { width: 8px; height: 8px; stroke-width: 3.2; color: #fff; opacity: 0; transition: opacity .3s ease; }
.vt-day[data-state="run"] > span { border-color: var(--ui-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ui-accent) 18%, transparent); }
.vt-day[data-state="done"] > span { background: #22b86a; border-color: #22b86a; }
.vt-day[data-state="done"] > span .i { opacity: 1; }

.vt-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  margin-top: 9px;
  padding: 7px 10px;
  border-radius: 10px;
  background: linear-gradient(90deg, var(--vt-sun), var(--vt-orange));
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  box-shadow: 0 6px 14px -8px var(--vt-orange);
}

.vt-btn .i { width: 10px; height: 10px; }
.vt-btn.is-ghost { background: var(--vt-soft); color: var(--ui-accent); box-shadow: none; border: 1px solid var(--vt-line); }

.vt-meta { display: flex; align-items: center; gap: 5px; margin-top: 5px; font-size: 9px; color: var(--ui-ink-2); }
.vt-meta .i { width: 10px; height: 10px; color: var(--ui-ink-3); }

.vt-phone .ui-note { margin: 8px 0 0; padding: 7px 8px; gap: 7px; font-size: 9px; border-radius: 9px; }
.vt-phone .ui-note b { font-size: 9.5px; }
.vt-phone .ui-note-ico { width: 20px; height: 20px; border-radius: 6px; }
.vt-phone .ui-note-ico .i { width: 11px; height: 11px; }

.vt-top { display: flex; align-items: center; gap: 8px; margin: 2px 0 10px; }
.vt-top .vt-card-t { font-size: 12px; }
.vt-top .vt-icon-btn { margin-left: auto; }

.vt-icon-btn {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--ui-sunken);
  color: var(--ui-ink-2);
}

.vt-icon-btn .i { width: 12px; height: 12px; }

.vt-list { margin: 8px 0 0; padding: 0 0 0 14px; font-size: 9px; color: var(--ui-ink-2); }

/* --- check-in: three questions, answered one at a time -------------------- */

.vt-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--vt-soft);
  border: 1px solid var(--vt-line);
  font-size: 9.5px;
  font-weight: 600;
  color: var(--ui-accent);
}

.vt-pill .i { width: 10px; height: 10px; }

.vt-q {
  border: 1px solid var(--ui-line);
  border-radius: 12px;
  padding: 9px 10px;
  margin-top: 8px;
  background: var(--ui-bg);
  transition: opacity .4s ease, border-color .4s ease, box-shadow .4s ease;
}

.vt-q[data-state="pend"] { opacity: .45; }
.vt-q[data-state="run"] { border-color: color-mix(in srgb, var(--ui-accent) 60%, transparent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ui-accent) 12%, transparent); }

.vt-q-n { display: block; font-size: 7.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ui-accent); }
.vt-q-t { display: block; font-size: 10.5px; font-weight: 700; margin: 1px 0 7px; }

.vt-faces { display: flex; justify-content: space-between; color: var(--ui-ink-3); }
.vt-faces span { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; transition: background .35s ease, color .35s ease, transform .35s ease; }
.vt-faces .i { width: 16px; height: 16px; stroke-width: 1.8; }
.vt-faces span.is-on { background: color-mix(in srgb, var(--vt-sun) 30%, transparent); color: var(--ui-accent); transform: scale(1.12); }

.vt-slider { position: relative; height: 4px; margin: 9px 3px 6px; border-radius: 4px; background: var(--ui-sunken); }
.vt-slider i { position: absolute; left: 0; top: 0; bottom: 0; width: 88%; border-radius: 4px; background: linear-gradient(90deg, var(--vt-sun), var(--vt-orange)); transition: width .6s ease; }
.vt-slider i::after { content: ""; position: absolute; right: -6px; top: 50%; width: 12px; height: 12px; margin-top: -6px; border-radius: 50%; background: var(--ui-bg); border: 2px solid var(--vt-orange); }
.vt-slider i.is-on { width: 30%; }
.vt-say { display: block; font-size: 8.5px; color: var(--ui-ink-3); text-align: center; }

.vt-opts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; }

.vt-opt {
  display: grid;
  justify-items: center;
  gap: 3px;
  padding: 6px 2px;
  border: 1px solid var(--ui-line);
  border-radius: 9px;
  font-size: 8.5px;
  color: var(--ui-ink-2);
  transition: border-color .35s ease, background .35s ease, color .35s ease;
}

.vt-opt .i { width: 13px; height: 13px; }
.vt-opt.is-on { border-color: var(--vt-orange); background: var(--vt-soft); color: var(--ui-accent); font-weight: 700; }

/* --- the session player --------------------------------------------------- */

.vt-video {
  position: relative;
  height: 150px;
  margin: 0 -12px;
  background: linear-gradient(180deg, #eef1f4, #dfe5ea);
  display: grid;
  place-items: center;
  overflow: hidden;
}

.page-wrap:not(.light-mode) .vt-video { background: linear-gradient(180deg, #262b31, #1d2126); }
.vt-video svg.vt-figure { width: 92px; height: 120px; color: #3b4652; }
.page-wrap:not(.light-mode) .vt-video svg.vt-figure { color: #c9d1da; }
.vt-video .vt-figure .arm { transform-origin: 46px 44px; animation: vt-arm 2.4s ease-in-out infinite alternate; }

@keyframes vt-arm { from { transform: rotate(-8deg); } to { transform: rotate(20deg); } }

.vt-vbar { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(0, 0, 0, .08); }
.vt-vbar i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: var(--vt-orange); }
.vt-vbar i.is-now { animation: vt-fill 2.6s linear forwards; }

@keyframes vt-fill { to { width: 100%; } }

.vt-swap { display: grid; text-align: center; }
.vt-swap > * { grid-area: 1 / 1; opacity: 0; transition: opacity .3s ease; }
.vt-swap > .is-on:not(:has(~ .is-on)) { opacity: 1; }
.vt-ex { margin-top: 10px; font-size: 11px; font-weight: 700; }
.vt-timer { font-size: 26px; font-weight: 700; letter-spacing: -.02em; font-style: italic; color: var(--ui-ink); }

.vt-controls { display: flex; justify-content: center; align-items: center; gap: 18px; margin: 6px 0 10px; }
.vt-controls .vt-icon-btn { background: var(--ui-bg); box-shadow: 0 2px 8px rgba(0, 0, 0, .1); }
.vt-play { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: linear-gradient(160deg, var(--vt-sun), var(--vt-coral)); color: #fff; box-shadow: 0 8px 18px -8px var(--vt-coral); }
.vt-play .i { width: 15px; height: 15px; stroke-width: 3; }

.vt-next { display: flex; align-items: center; gap: 8px; padding: 6px 8px; margin-top: 4px; border-radius: 10px; font-size: 9.5px; transition: background .35s ease, opacity .35s ease; }
.vt-next b { font-weight: 600; flex: 1; }
.vt-next small { font-size: 8.5px; color: var(--ui-ink-3); }
.vt-next .ui-ico { width: 16px; height: 16px; }
.vt-next[data-state="pend"] { opacity: .6; }
.vt-next[data-state="run"] { background: var(--vt-soft); }

.vt-chips { display: flex; flex-wrap: wrap; gap: 4px; margin: 2px 0 6px; }
.vt-chips .ui-chip { background: var(--vt-soft); color: var(--ui-accent); }

/* --- progress ------------------------------------------------------------- */

.vt-ava { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: linear-gradient(160deg, var(--vt-sun), var(--vt-coral)); color: #fff; font-size: 9px; font-weight: 700; flex: none; }
.vt-over { display: block; font-size: 8px; font-weight: 600; color: var(--ui-accent); }

.vt-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 8px; }
.vt-stat { padding: 7px 8px; border-radius: 10px; background: color-mix(in srgb, var(--vt-sun) 16%, var(--ui-bg)); }
.vt-stat.is-wide { grid-column: 1 / -1; }
.vt-stat small { display: flex; justify-content: space-between; font-size: 8px; color: var(--ui-accent); }
.vt-stat small .i { width: 9px; height: 9px; }
.vt-stat b { display: block; font-size: 17px; font-weight: 700; color: var(--ui-accent); line-height: 1.15; }

.vt-bar-row { display: flex; justify-content: space-between; font-size: 9px; margin: 2px 0 4px; }
.vt-bar-row b { color: var(--ui-accent); }
.vt-bar { height: 4px; border-radius: 4px; background: var(--ui-sunken); overflow: hidden; }
.vt-bar i { display: block; height: 100%; width: 39%; background: linear-gradient(90deg, var(--vt-sun), var(--vt-orange)); }

.vt-chart { display: grid; grid-template-columns: 14px repeat(4, 1fr); align-items: end; gap: 4px; height: 90px; margin-top: 6px; padding-top: 4px; }
.vt-chart-y { display: flex; flex-direction: column; justify-content: space-between; align-self: stretch; padding-bottom: 14px; font-size: 7px; color: var(--ui-ink-3); }

.vt-col { display: grid; justify-items: center; align-self: stretch; grid-template-rows: 1fr auto; gap: 3px; font-size: 7.5px; color: var(--ui-ink-3); }

.vt-col i {
  align-self: end;
  width: 7px;
  height: var(--h);
  border-radius: 7px;
  background: var(--c);
  transform-origin: bottom;
  transform: scaleY(.06);
  transition: transform .7s cubic-bezier(.2, .7, .2, 1);
}

.vt-col[data-state="run"] i,
.vt-col[data-state="done"] i { transform: none; }

/* --- the website: a hero, three steps ------------------------------------- */

.vt-site { padding: 16px 20px 20px; }
.vt-site-nav { display: flex; align-items: center; gap: 16px; font-size: 10px; color: var(--ui-ink-2); margin-bottom: 18px; }
.vt-site-nav .vt-logo-s { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: var(--ui-ink); margin-right: auto; }
.vt-site-nav .vt-logo-s svg { width: 18px; height: 18px; border-radius: 5px; }
.vt-site-nav .vt-btn { margin: 0; padding: 5px 10px; font-size: 9.5px; }

.vt-site-hero { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 18px; align-items: center; }
.vt-site-tag { display: inline-block; padding: 2px 9px; border-radius: 999px; background: var(--vt-soft); color: var(--ui-accent); font-size: 9px; font-weight: 600; }
.vt-site-h { margin: 6px 0 6px; font-size: 22px; line-height: 1.12; font-weight: 700; letter-spacing: -.02em; color: var(--ui-ink); }
.vt-site-p { font-size: 10.5px; color: var(--ui-ink-2); margin: 0 0 6px; max-width: 320px; }
.vt-site-p.is-em { font-style: italic; }
.vt-site-hero .vt-btn { display: inline-flex; margin: 4px 0 8px; }
.vt-site-ticks { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 8.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--ui-ink-3); }
.vt-site-ticks span::before { content: "\2022"; color: var(--ui-accent); margin-right: 4px; }

.vt-site-art { display: flex; justify-content: center; align-items: center; position: relative; }
.vt-site-art::before { content: ""; position: absolute; inset: 12% 8%; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--vt-sun) 30%, transparent), transparent 70%); }
.vt-phone.is-mini { width: 150px; min-height: 0; border-radius: 22px; font-size: 9px; transform: rotate(4deg); }
.vt-phone.is-mini .vt-hero { padding: 20px 8px 10px; margin-top: -22px; }
.vt-phone.is-mini .vt-status { padding: 8px 14px 3px; font-size: 7px; }
.vt-phone.is-mini .vt-status::after { width: 40px; height: 10px; margin-left: -20px; top: 6px; }
.vt-phone.is-mini .vt-ring { width: 44px; height: 44px; -webkit-mask: radial-gradient(circle, transparent 15px, #000 16px); mask: radial-gradient(circle, transparent 15px, #000 16px); }
.vt-phone.is-mini .vt-word { font-size: 12px; margin-bottom: 4px; }
.vt-phone.is-mini .vt-body { padding: 8px 8px 10px; }

.vt-steps-h { margin: 22px 0 10px; text-align: center; font-size: 12px; font-weight: 700; color: var(--ui-ink); }
.vt-site-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }

.vt-site-step {
  display: grid;
  justify-items: center;
  gap: 5px;
  padding: 12px 8px;
  border: 1px solid var(--ui-line);
  border-radius: 12px;
  text-align: center;
  font-size: 10px;
  font-weight: 600;
  color: var(--ui-ink);
  transition: border-color .35s ease, box-shadow .35s ease, background .35s ease;
}

.vt-site-step small { font-size: 8px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ui-ink-3); }
.vt-site-step .vt-badge { width: 34px; height: 34px; }
.vt-site-step .vt-badge .i { width: 16px; height: 16px; }
.vt-site-step.is-on { border-color: color-mix(in srgb, var(--ui-accent) 55%, transparent); background: var(--vt-soft); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ui-accent) 10%, transparent); }

/* --- the care portal ------------------------------------------------------ */

.vt-portal .ui-main { background: var(--ui-panel); }
.vt-portal .ui-nav.is-on { background: color-mix(in srgb, var(--vt-sun) 26%, transparent); color: var(--ui-accent); }
.vt-back { display: flex; align-items: center; gap: 8px; }
.vt-back .vt-icon-btn { background: var(--ui-bg); border: 1px solid var(--ui-line); width: 22px; height: 22px; }

.vt-pt { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1fr); gap: 14px; }
.vt-pt-name { font-size: 13px; font-weight: 700; margin: 1px 0 5px; }
.vt-pt-name em { font-style: normal; color: var(--ui-accent); }
.vt-pt .vt-meta { margin-top: 3px; }
.vt-pt .ui-k { display: flex; align-items: center; gap: 6px; }
.vt-pt .ui-k .vt-badge { width: 20px; height: 20px; }
.vt-pt .ui-k .vt-badge .i { width: 11px; height: 11px; }
.vt-pt .ui-chip { margin: 5px 4px 0 0; background: color-mix(in srgb, var(--vt-sun) 22%, transparent); color: var(--ui-accent); }

.vt-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
.vt-kpi { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--ui-line); border-radius: 10px; background: var(--ui-bg); }
.vt-kpi small { display: block; font-size: 8.5px; color: var(--ui-ink-3); }
.vt-kpi b { font-size: 13px; font-weight: 700; }

.vt-rx { margin-top: 12px; border: 1px solid color-mix(in srgb, var(--ui-ok) 45%, var(--ui-line)); border-radius: 10px; overflow: hidden; background: var(--ui-bg); }
.vt-rx-head { display: flex; align-items: center; gap: 6px; padding: 6px 10px; background: color-mix(in srgb, var(--ui-ok) 12%, var(--ui-bg)); color: color-mix(in srgb, var(--ui-ok) 70%, var(--ui-ink)); font-size: 10px; font-weight: 700; }
.vt-rx-head .i { width: 11px; height: 11px; }
.vt-rx-head span { margin-left: auto; font-weight: 500; color: var(--ui-ink-3); }
.vt-rx-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding: 10px; }

.vt-dose { border-radius: 9px; padding: 7px; transition: background .35s ease, box-shadow .35s ease; }
.vt-dose[data-state="run"] { background: var(--vt-soft); box-shadow: 0 0 0 1px var(--vt-line); }
.vt-dose .ui-k { display: block; margin-bottom: 5px; }
.vt-dose-line { display: flex; align-items: center; gap: 5px; font-size: 9.5px; color: var(--ui-ink-2); white-space: nowrap; }
.vt-dose-line b { display: inline-grid; place-items: center; min-width: 20px; padding: 1px 5px; border-radius: 5px; background: color-mix(in srgb, var(--vt-sun) 28%, transparent); color: var(--ui-accent); font-weight: 700; }

.vt-actual { display: flex; align-items: center; justify-content: space-between; gap: 4px; margin-top: 6px; padding: 4px 6px; border-radius: 6px; font-size: 9px; color: var(--ui-ink-3); background: var(--ui-sunken); opacity: 0; transform: translateY(3px); transition: opacity .4s ease, transform .4s ease; }
.vt-actual.is-on { opacity: 1; transform: none; }
.vt-actual b { display: inline-flex; align-items: center; gap: 2px; color: color-mix(in srgb, var(--ui-ok) 75%, var(--ui-ink)); font-weight: 700; }
.vt-actual b .i { width: 9px; height: 9px; stroke-width: 3; }

.vt-portal .ui-note { margin: 10px 0 0; opacity: 0; transition: opacity .4s ease; }
.vt-portal .ui-note.is-on { opacity: 1; }

/* --- small screens -------------------------------------------------------- */

@media screen and (max-width: 767px) {
  .vt-row { flex-wrap: wrap; }
  .vt-row.is-pair { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 4px 14px; margin: -4px; scrollbar-width: thin; }
  .vt-row.is-pair > .vt-phone { scroll-snap-align: center; }
  .vt-notes { width: 100%; }
  .vt-site { padding: 14px; }
  .vt-site-nav > span:not(.vt-logo-s) { display: none; }
  .vt-site-hero { grid-template-columns: minmax(0, 1fr); }
  .vt-site-art { display: none; }
  .vt-site-steps { grid-template-columns: minmax(0, 1fr); }
  .vt-pt,
  .vt-kpis,
  .vt-rx-cols { grid-template-columns: minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  .vt-video .vt-figure .arm,
  .vt-vbar i.is-now { animation: none; }
  .vt-ring { transition: none; }
}

/* Vitala fixes: case-study.css styles every figure svg as an image and every
   section paragraph as prose; inside a phone neither is true. */
.ui.is-vitala svg.vt-figure,
.ui.is-vitala svg.vt-ring-logo,
.ui.is-vitala .vt-logo-s svg { border: 0; border-radius: 0; }
.ui.is-vitala svg.vt-ring-logo,
.ui.is-vitala .vt-logo-s svg { border-radius: 6px; }
.ui.is-vitala svg.vt-figure { width: 92px; height: 120px; }
.ui.is-vitala p { max-width: none; }
.ui.is-vitala p.vt-title { margin: 2px 0 8px; color: var(--ui-accent); }
.ui.is-vitala p.vt-site-p { margin: 0 0 6px; color: var(--ui-ink-2); max-width: 320px; }
.ui.is-vitala p.vt-site-h { margin: 6px 0; color: var(--ui-ink); }
.ui.is-vitala p.vt-steps-h { margin: 22px 0 10px; color: var(--ui-ink); }
.ui.is-vitala .vt-hero p { color: #fff; margin: 6px 0 0; }
.ui.is-vitala .vt-phone.is-mini .vt-btn { display: flex; margin-top: 6px; }
/* the site mockup's phone: undo the full phone's 486px floor, which stretched the whole hero */
.ui.is-vitala .vt-phone.is-mini { min-height: 300px; }

/* ==========================================================================
   13. Altura (Emteq). The Vitala phone kit, re-tinted to Altura's green on a
   mint canvas. `.ui.is-altura` is the only switch; the `em-` pieces are the
   ones only this product has: meals, chew pace, mood, the dietitian table
   and Emteq's dark website.
   ========================================================================== */

.ui.is-altura {
  --ui-canvas-a: #eef6f1;
  --ui-canvas-b: #e1eee6;
  --ui-accent: #1e7b4b;
  --vt-sun: #45b377;
  --vt-orange: #1e7b4b;
  --vt-soft: #e8f5ee;
  --vt-line: #cde7d8;
  --em-amber: #e8912a;
  --em-amber-soft: #fdf1e2;
  --em-protein: #8b6fd0;
  --em-carbs: #f2b632;
  --em-fat: #4aa3e0;
}

.page-wrap:not(.light-mode) .ui.is-altura {
  --ui-canvas-a: #121a15;
  --ui-canvas-b: #0d1310;
  --ui-accent: #5fd08f;
  --vt-soft: #16281e;
  --vt-line: #24452f;
  --em-amber: #f4a74a;
  --em-amber-soft: #2c2114;
}

.ui.is-altura .vt-btn { background: var(--ui-accent); box-shadow: none; }
.page-wrap:not(.light-mode) .ui.is-altura .vt-btn { color: #0c1a12; }
.ui.is-altura .vt-card { box-shadow: 0 6px 16px -12px rgba(20, 80, 50, .35); }
.ui.is-altura .vt-phone { background: var(--ui-bg); }
.ui.is-altura .vt-body { padding: 4px 11px 10px; }

/* --- home: greeting, week, calories, pace, fullness, meals ---------------- */

.em-top { display: flex; align-items: center; gap: 6px; margin: 2px 0 8px; }
.em-top b { font-size: 12.5px; font-weight: 700; margin-right: auto; }
.em-top .vt-icon-btn { width: 22px; height: 22px; }
.em-top .vt-icon-btn .i { width: 11px; height: 11px; }

.em-week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; margin-bottom: 8px; text-align: center; font-size: 7.5px; color: var(--ui-ink-3); }
.em-week span { display: grid; gap: 1px; padding: 3px 0; border-radius: 8px; }
.em-week b { font-size: 9.5px; color: var(--ui-ink); font-weight: 600; }
.em-week .is-today { background: var(--vt-soft); color: var(--ui-accent); }
.em-week .is-today b { color: var(--ui-accent); }
.em-week .is-later b { color: var(--ui-ink-3); font-weight: 500; }
.em-week i { justify-self: center; width: 12px; height: 3px; border-radius: 2px; background: color-mix(in srgb, var(--ui-accent) 45%, transparent); }
.em-week .is-later i { background: var(--ui-sunken); }

.em-cal-head { display: flex; justify-content: space-between; align-items: baseline; }
.em-cal-head .vt-card-t { font-size: 10.5px; }
.em-big { font-size: 22px; font-weight: 700; letter-spacing: -.02em; line-height: 1.1; text-align: left; }
.em-big small { font-size: 9px; font-weight: 500; color: var(--ui-ink-3); letter-spacing: 0; margin-left: 3px; }
.em-sub { font-size: 8.5px; color: var(--ui-ink-3); }

.em-meter { display: flex; height: 7px; margin: 7px 0 5px; border-radius: 7px; background: var(--ui-sunken); overflow: hidden; }
.em-meter i { display: block; width: 0; height: 100%; transition: width .9s cubic-bezier(.2, .7, .2, 1); }
.em-meter i + i { box-shadow: -1px 0 0 var(--ui-bg); }
.em-meter .is-b { background: var(--vt-sun); }
.em-meter .is-l { background: var(--ui-accent); }
.em-meter .is-s { background: var(--em-carbs); }

.em-legend { display: flex; gap: 8px; font-size: 7.5px; color: var(--ui-ink-3); }
.em-legend span { display: inline-flex; align-items: center; gap: 3px; }
.em-legend span::before { content: ""; width: 6px; height: 6px; border-radius: 2px; background: var(--c); }

.em-pace { display: grid; grid-template-columns: 1fr 1fr; margin: 8px 0 0; border-radius: 10px; overflow: hidden; border: 1px solid var(--ui-line); }
.em-pace > div { padding: 5px 8px; }
.em-pace small { display: block; font-size: 7.5px; color: var(--ui-ink-3); }
.em-pace b { font-size: 12px; font-weight: 700; }
.em-pace b em { font-style: normal; font-size: 7.5px; font-weight: 500; color: var(--ui-ink-3); margin-left: 2px; }
.em-pace .is-fast { background: var(--em-amber-soft); }
.em-pace .is-fast b { color: var(--em-amber); display: inline-flex; align-items: center; gap: 3px; }
.em-pace .is-fast b .i { width: 10px; height: 10px; stroke-width: 2.6; }
.em-pace .is-goal { background: var(--vt-soft); }
.em-pace .is-goal b { color: var(--ui-accent); }

.em-full { margin-top: 8px; }
.em-full > small { display: block; font-size: 8.5px; font-weight: 600; margin-bottom: 4px; }
.em-scale { position: relative; height: 5px; margin: 0 4px; border-radius: 5px; background: linear-gradient(90deg, var(--vt-soft), color-mix(in srgb, var(--ui-accent) 40%, var(--vt-soft)), var(--em-amber-soft)); }
.em-scale i { position: absolute; top: 50%; left: var(--x, 10%); width: 11px; height: 11px; margin: -5.5px 0 0 -5.5px; border-radius: 50%; background: var(--ui-bg); border: 2.5px solid var(--ui-accent); transition: left .8s cubic-bezier(.2, .7, .2, 1); }
.em-scale-l { display: flex; justify-content: space-between; margin-top: 4px; font-size: 7px; color: var(--ui-ink-3); }
.em-tip { display: flex; gap: 5px; margin-top: 6px; padding: 5px 7px; border-radius: 8px; background: var(--ui-sunken); font-size: 8px; color: var(--ui-ink-2); }
.em-tip .i { width: 10px; height: 10px; color: var(--em-carbs); flex: none; margin-top: 1px; }

.em-h { display: flex; justify-content: space-between; align-items: baseline; margin: 10px 0 5px; font-size: 11px; font-weight: 700; }
.em-h small { font-size: 8px; font-weight: 500; color: var(--ui-ink-3); }

.em-meal { display: flex; align-items: center; gap: 7px; padding: 5px 7px; margin-bottom: 4px; border: 1px solid var(--ui-line); border-radius: 10px; transition: opacity .4s ease, border-color .4s ease, background .4s ease; }
.em-meal-ico { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 7px; background: var(--ui-sunken); color: var(--ui-ink-3); flex: none; transition: background .4s ease, color .4s ease; }
.em-meal-ico .i { width: 11px; height: 11px; }
.em-meal-t { flex: 1; min-width: 0; }
.em-meal-t b { display: block; font-size: 9.5px; font-weight: 700; }
.em-meal-t small { display: block; font-size: 7.5px; color: var(--ui-ink-3); white-space: nowrap; }
.em-meal-t .em-live { display: none; color: var(--em-amber); font-weight: 600; }
.em-meal-t .em-live::before { content: ""; display: inline-block; width: 5px; height: 5px; margin-right: 4px; border-radius: 50%; background: currentColor; vertical-align: 1px; animation: em-blink 1s ease-in-out infinite alternate; }
.em-meal-end { display: grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid var(--ui-line); flex: none; transition: background .4s ease, border-color .4s ease; }
.em-meal-end .i { width: 8px; height: 8px; stroke-width: 3.2; color: #fff; opacity: 0; transition: opacity .3s ease; }

.em-meal[data-state="pend"] { opacity: .5; }
.em-meal[data-state="pend"] .em-done { visibility: hidden; }
.em-meal[data-state="run"] { border-color: color-mix(in srgb, var(--em-amber) 55%, transparent); background: var(--em-amber-soft); }
.em-meal[data-state="run"] .em-done { display: none; }
.em-meal[data-state="run"] .em-live { display: block; }
.em-meal[data-state="run"] .em-meal-ico { background: var(--em-amber); color: #fff; }
.em-meal[data-state="done"] .em-meal-ico { background: var(--vt-soft); color: var(--ui-accent); }
.em-meal[data-state="done"] .em-meal-end { background: var(--ui-accent); border-color: var(--ui-accent); }
.em-meal[data-state="done"] .em-meal-end .i { opacity: 1; }

@keyframes em-blink { from { opacity: .25; } to { opacity: 1; } }

/* --- one meal, as the glasses saw it -------------------------------------- */

.em-back { display: flex; align-items: center; gap: 7px; margin: 2px 0 8px; }
.em-back .vt-icon-btn { width: 22px; height: 22px; }
.em-back b { display: block; font-size: 12px; font-weight: 700; }
.em-back small { display: flex; align-items: center; gap: 3px; font-size: 7.5px; color: var(--ui-ink-3); }
.em-back small .i { width: 9px; height: 9px; color: var(--ui-accent); }
.em-back > span:not(:first-child) { margin-left: auto; }

.em-grid4 { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; }
.em-stat { padding: 6px 8px; border-radius: 9px; background: var(--ui-sunken); }
.em-stat small { display: block; font-size: 7.5px; color: var(--ui-ink-3); }
.em-stat b { font-size: 13px; font-weight: 700; letter-spacing: -.01em; }
.em-stat b em { font-style: normal; font-size: 8px; font-weight: 500; color: var(--ui-ink-3); margin-left: 1px; }

.em-rate { display: flex; align-items: center; gap: 6px; margin: 7px 0 0; padding: 6px 8px; border-radius: 9px; background: var(--em-amber-soft); font-size: 8.5px; color: var(--ui-ink-2); }
.em-rate b { color: var(--em-amber); font-size: 11px; }
.em-rate .ui-chip { margin-left: auto; background: var(--em-amber); color: #fff; }

.em-macros { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.em-macro { font-size: 7.5px; color: var(--ui-ink-3); }
.em-macro b { display: block; font-size: 11px; color: var(--ui-ink); font-weight: 700; }
.em-macro i { display: block; height: 3px; margin-top: 3px; border-radius: 3px; background: var(--ui-sunken); overflow: hidden; }
.em-macro i::before { content: ""; display: block; width: var(--w); height: 100%; background: var(--c); }

.em-food { display: flex; align-items: center; gap: 7px; padding: 5px 0; border-top: 1px solid var(--ui-line-soft); }
.em-food:first-of-type { border-top: 0; }
.em-food b { display: block; font-size: 9px; font-weight: 600; }
.em-food small { font-size: 7.5px; color: var(--ui-ink-3); }
.em-food > span:last-child { margin-left: auto; font-size: 8.5px; font-weight: 700; white-space: nowrap; }

.em-plate { position: relative; width: 30px; height: 30px; border-radius: 8px; flex: none; background: var(--ui-sunken); overflow: hidden; }
.em-plate::before { content: ""; position: absolute; inset: 4px; border-radius: 50%; background: #fbfaf7; box-shadow: 0 1px 3px rgba(0, 0, 0, .18); }
.em-plate::after { content: ""; position: absolute; inset: 8px; border-radius: 50%; background: var(--food); }
.em-plate.is-pepper { --food: radial-gradient(circle at 35% 40%, #d8452f 0 30%, transparent 31%), radial-gradient(circle at 66% 62%, #e7b35b 0 26%, transparent 27%), #7fb05b; }
.em-plate.is-rice { --food: radial-gradient(circle at 60% 38%, #c98b4f 0 30%, transparent 31%), radial-gradient(circle at 36% 64%, #f3eee2 0 34%, transparent 35%), #efe7d2; }

/* --- chewing: the week against the target --------------------------------- */

.em-seg { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2px; padding: 2px; margin-bottom: 8px; border-radius: 8px; background: var(--ui-sunken); font-size: 8px; text-align: center; color: var(--ui-ink-3); }
.em-seg span { padding: 3px 0; border-radius: 6px; }
.em-seg .is-on { background: var(--ui-accent); color: #fff; font-weight: 600; }
.page-wrap:not(.light-mode) .em-seg .is-on { color: #0c1a12; }

.em-delta { display: inline-flex; align-items: center; gap: 2px; font-size: 8px; font-weight: 700; color: var(--ui-accent); }
.em-delta .i { width: 9px; height: 9px; stroke-width: 2.8; }

.em-chart { position: relative; display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; height: 104px; margin: 8px 0 4px; padding-top: 6px; }
.em-target { position: absolute; left: -2px; right: -2px; bottom: calc(14px + (100% - 20px) * .55); border-top: 1.5px dashed color-mix(in srgb, var(--ui-accent) 70%, transparent); }
.em-target span { position: absolute; right: 0; top: -12px; font-size: 7px; font-weight: 600; color: var(--ui-accent); background: var(--ui-bg); padding: 0 2px; }
.em-col { display: grid; grid-template-rows: 1fr auto; justify-items: center; gap: 3px; font-size: 7.5px; color: var(--ui-ink-3); }
.em-col i { align-self: end; width: 100%; max-width: 16px; height: var(--h); border-radius: 5px 5px 3px 3px; background: var(--c); transform-origin: bottom; transform: scaleY(.05); transition: transform .7s cubic-bezier(.2, .7, .2, 1); }
.em-col[data-state="run"] i,
.em-col[data-state="done"] i { transform: none; }
.em-col[data-state="run"] { color: var(--ui-ink); font-weight: 700; }

.em-vs { display: grid; gap: 5px; margin-top: 6px; }
.em-vs > div { display: grid; grid-template-columns: 52px 1fr 30px; align-items: center; gap: 6px; font-size: 8px; color: var(--ui-ink-3); }
.em-vs i { height: 6px; border-radius: 6px; background: var(--ui-sunken); overflow: hidden; }
.em-vs i::before { content: ""; display: block; height: 100%; width: var(--w); background: var(--c); border-radius: 6px; }
.em-vs b { font-size: 8.5px; color: var(--ui-ink); text-align: right; }

/* --- after a meal: the check, one question at a time ---------------------- */

.em-progress { height: 3px; margin: 0 0 12px; border-radius: 3px; background: var(--ui-sunken); overflow: hidden; }
.em-progress i { display: block; width: 0; height: 100%; background: var(--ui-accent); transition: width .5s ease; }

.em-steps.vt-swap { text-align: left; }
.em-qcard { padding: 12px 12px; border-radius: 14px; background: var(--ui-accent); color: #fff; font-size: 11px; font-weight: 700; line-height: 1.35; text-align: center; margin-bottom: 10px; }
.page-wrap:not(.light-mode) .em-qcard { color: #0c1a12; }
.em-qn { display: block; margin-bottom: 4px; font-size: 7.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; opacity: .75; }
.em-opts { display: grid; gap: 5px; }
.em-opt { padding: 6px 8px; border: 1px solid var(--ui-line); border-radius: 9px; font-size: 9.5px; text-align: center; color: var(--ui-ink-2); transition: border-color .35s ease, background .35s ease, color .35s ease; }
.em-opt.is-on { border-color: var(--ui-accent); background: var(--vt-soft); color: var(--ui-accent); font-weight: 700; }

.em-faces { display: flex; justify-content: space-between; padding: 4px 2px; color: var(--ui-ink-3); }
.em-faces span { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; transition: background .35s ease, color .35s ease, transform .35s ease; }
.em-faces .i { width: 22px; height: 22px; stroke-width: 1.7; }
.em-faces span.is-on { background: var(--vt-soft); color: var(--ui-accent); transform: scale(1.12); }
.em-say { display: block; margin-top: 6px; text-align: center; font-size: 9px; font-weight: 700; color: var(--ui-accent); opacity: 0; transition: opacity .35s ease; }
.em-say.is-on { opacity: 1; }

.em-chips { display: flex; flex-wrap: wrap; gap: 4px; justify-content: center; }
.em-chips span { padding: 4px 8px; border-radius: 999px; border: 1px solid var(--ui-line); font-size: 8.5px; color: var(--ui-ink-2); transition: border-color .35s ease, background .35s ease, color .35s ease; }
.em-chips span.is-on { border-color: var(--ui-accent); background: var(--ui-accent); color: #fff; font-weight: 600; }
.page-wrap:not(.light-mode) .em-chips span.is-on { color: #0c1a12; }

.em-saved { display: grid; justify-items: center; gap: 6px; padding: 26px 8px 0; text-align: center; font-size: 9.5px; color: var(--ui-ink-2); }
.em-saved b { font-size: 12px; color: var(--ui-ink); }
.em-saved .em-ok { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--vt-soft); color: var(--ui-accent); }
.em-saved .em-ok .i { width: 20px; height: 20px; stroke-width: 2.6; }
.em-phone-foot { margin-top: auto; padding: 0 11px 14px; }

/* --- mood: the whole screen takes the colour of the answer ----------------- */

.em-mood { isolation: isolate; }
.em-mood-bg { position: absolute; inset: 0; z-index: -1; opacity: 0; background: var(--m-bg); transition: opacity .6s ease; }
.em-mood-bg.is-on { opacity: 1; }
.em-mood .vt-body { display: flex; flex-direction: column; }
.em-mood-q { margin: 6px 0 4px; text-align: center; font-size: 13px; font-weight: 700; line-height: 1.25; }
.em-mood-face { display: grid; place-items: center; height: 104px; }
.em-mood-face > span { grid-area: 1 / 1; display: grid; place-items: center; width: 84px; height: 84px; border-radius: 50%; background: var(--m-face); color: rgba(0, 0, 0, .62); opacity: 0; transform: scale(.7); transition: opacity .45s ease, transform .45s cubic-bezier(.3, 1.4, .5, 1); box-shadow: inset -6px -8px 0 rgba(0, 0, 0, .08); }
.em-mood-face > span.is-on { opacity: 1; transform: none; }
.em-mood-face .i { width: 56px; height: 56px; stroke-width: 1.5; }
.em-mood-l { display: grid; text-align: center; font-size: 10px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.em-mood-l > span { grid-area: 1 / 1; opacity: 0; transition: opacity .35s ease; }
.em-mood-l > span.is-on { opacity: 1; }
.em-mood-track { position: relative; height: 5px; margin: 12px 6px 4px; border-radius: 5px; background: rgba(255, 255, 255, .7); }
.page-wrap:not(.light-mode) .em-mood-track { background: rgba(255, 255, 255, .18); }
.em-mood-track > i { position: absolute; top: 50%; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; background: var(--m-face); border: 2.5px solid #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .2); opacity: 0; transition: opacity .35s ease; }
.em-mood-track > i.is-on { opacity: 1; }
.em-mood-ends { display: flex; justify-content: space-between; font-size: 7px; color: var(--ui-ink-3); margin: 0 2px 10px; }
.em-mood .em-chips span:not(.is-on) { background: rgba(255, 255, 255, .6); }
.page-wrap:not(.light-mode) .em-mood .em-chips span:not(.is-on) { background: rgba(255, 255, 255, .06); }
.em-mood .vt-btn { margin-top: 10px; }

.m-1 { --m-bg: #efe4f5; --m-face: #c29bd8; }
.m-2 { --m-bg: #f8f0d2; --m-face: #f2c53d; }
.m-3 { --m-bg: #ececec; --m-face: #cfd3d6; }
.m-4 { --m-bg: #e1f1e2; --m-face: #74cf86; }
.m-5 { --m-bg: #fbe6d6; --m-face: #f28f45; }
.page-wrap:not(.light-mode) .m-1 { --m-bg: #241b2a; }
.page-wrap:not(.light-mode) .m-2 { --m-bg: #2a2614; }
.page-wrap:not(.light-mode) .m-3 { --m-bg: #1f2224; }
.page-wrap:not(.light-mode) .m-4 { --m-bg: #16271b; }
.page-wrap:not(.light-mode) .m-5 { --m-bg: #2c1e14; }

/* --- insights and the chat ------------------------------------------------ */

.em-ins-t { margin: 2px 0 8px; text-align: center; font-size: 12px; font-weight: 700; }
.em-ins { position: relative; display: grid; grid-template-columns: 1fr auto; gap: 0 8px; padding: 8px 10px; margin-bottom: 6px; border-radius: 12px; background: var(--c); color: #fff; overflow: hidden; transition: opacity .45s ease, transform .45s ease; }
.em-ins[data-state="pend"] { opacity: .28; transform: translateY(4px); }
.em-ins small { grid-column: 1 / -1; font-size: 7px; opacity: .8; }
.em-ins b { font-size: 20px; font-weight: 700; letter-spacing: -.02em; line-height: 1.1; }
.em-ins strong { grid-column: 1 / -1; font-size: 10px; font-weight: 700; }
.em-ins > span:not(.em-ins-bars) { grid-column: 1 / -1; font-size: 7.5px; line-height: 1.35; opacity: .92; }
.em-ins-bars { grid-row: 1 / 3; grid-column: 2; align-self: end; display: flex; align-items: flex-end; gap: 2px; height: 26px; }
.em-ins-bars i { width: 3px; border-radius: 2px; background: rgba(255, 255, 255, .55); }
.em-ins-bars i:last-child { background: #fff; }
.em-ins.is-mood { --c: #4fa972; }
.em-ins.is-steps { --c: #e9792b; }
.em-ins.is-weight { --c: #9c78bf; }
.em-ins.is-chews { --c: #1f9bd6; }

.em-chat-date { margin: 0 0 6px; text-align: center; font-size: 7.5px; color: var(--ui-ink-3); }
.em-msg { max-width: 82%; margin-bottom: 6px; padding: 6px 8px; border-radius: 11px; font-size: 8.5px; line-height: 1.4; opacity: 0; transform: translateY(5px); transition: opacity .4s ease, transform .4s ease; }
.em-msg.is-on { opacity: 1; transform: none; }
.em-msg.is-dr { background: var(--ui-sunken); color: var(--ui-ink); border-bottom-left-radius: 3px; }
.em-msg.is-me { margin-left: auto; background: var(--ui-accent); color: #fff; border-bottom-right-radius: 3px; }
.page-wrap:not(.light-mode) .em-msg.is-me { color: #0c1a12; }
.em-typing { display: flex; gap: 3px; width: 34px; padding: 7px 8px; border-radius: 11px; background: var(--ui-sunken); }
.em-typing i { width: 4px; height: 4px; border-radius: 50%; background: var(--ui-ink-3); animation: em-blink .6s ease-in-out infinite alternate; }
.em-typing i:nth-child(2) { animation-delay: .2s; }
.em-typing i:nth-child(3) { animation-delay: .4s; }
.em-input { display: flex; align-items: center; gap: 6px; margin: auto 11px 14px; padding: 5px 5px 5px 10px; border: 1px solid var(--ui-line); border-radius: 999px; font-size: 8.5px; color: var(--ui-ink-3); }
.em-input span:last-child { display: grid; place-items: center; width: 20px; height: 20px; margin-left: auto; border-radius: 50%; background: var(--ui-accent); color: #fff; }
.em-input .i { width: 10px; height: 10px; }
.em-chat .vt-body { flex: 0 1 auto; }
.em-ava { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--vt-soft); color: var(--ui-accent); font-size: 8px; font-weight: 700; flex: none; }

/* --- the dietitian's portal ----------------------------------------------- */

.em-portal .ui-rail { background: var(--ui-panel); }
.em-portal .ui-nav.is-on { background: var(--vt-soft); color: var(--ui-accent); }
.em-portal .ui-main { background: var(--ui-panel); }
.em-logo { display: block; height: 18px; width: auto; border: 0; border-radius: 0; }
.em-logo.is-dark { display: none; }
.page-wrap:not(.light-mode) .em-logo.is-light { display: none; }
.page-wrap:not(.light-mode) .em-logo.is-dark { display: block; }
.em-date { display: inline-flex; align-items: center; gap: 6px; padding: 4px 8px; border: 1px solid var(--ui-line); border-radius: 7px; background: var(--ui-bg); font-size: 10px; color: var(--ui-ink-2); }
.em-date .i { width: 11px; height: 11px; }

.em-table-wrap { border: 1px solid var(--ui-line); border-radius: 10px; background: var(--ui-bg); overflow: hidden; }
.em-table td:not(:first-child),
.em-table th:not(:first-child) { text-align: right; }
.em-table td { font-variant-numeric: tabular-nums; transition: background .35s ease; }
.em-table td:first-child { color: var(--ui-ink); font-weight: 600; white-space: nowrap; }
.em-table tr.is-on td { background: var(--vt-soft); }
.em-table tr.is-on td:first-child { box-shadow: inset 3px 0 0 var(--ui-accent); color: var(--ui-accent); }
.em-table .is-fast { color: var(--em-amber); font-weight: 700; }

.em-client { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 10px; opacity: 0; transform: translateY(6px); transition: opacity .45s ease, transform .45s ease; }
.em-client.is-on { opacity: 1; transform: none; }
.em-kpi { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--ui-line); border-radius: 10px; background: var(--ui-bg); }
.em-kico { display: grid; place-items: center; flex: none; }
.em-kpi .em-kico { width: 26px; height: 26px; border-radius: 8px; background: color-mix(in srgb, var(--c) 16%, transparent); color: var(--c); }
.em-kpi .em-kico .i { width: 13px; height: 13px; }
.em-kpi small { display: block; font-size: 8.5px; color: var(--ui-ink-3); }
.em-kpi b { font-size: 13px; font-weight: 700; }

.em-ai { margin-top: 10px; border: 1px solid var(--ui-line); border-radius: 10px; background: var(--ui-bg); overflow: hidden; }
.em-ai-h { display: flex; align-items: center; gap: 6px; padding: 7px 10px; font-size: 10.5px; font-weight: 700; }
.em-ai-h .i { width: 12px; height: 12px; color: var(--em-carbs); }
.em-ai-h small { margin-left: auto; font-size: 9px; font-weight: 500; color: var(--ui-ink-3); }
.em-ai-row { display: grid; grid-template-columns: 110px 1fr; gap: 10px; padding: 7px 10px; border-top: 1px solid var(--ui-line-soft); font-size: 10px; color: var(--ui-ink-2); opacity: .35; transition: opacity .4s ease; }
.em-ai-row.is-on { opacity: 1; }
.em-ai-row b { color: var(--ui-ink); font-weight: 600; }

/* --- Emteq's website: dark, like the real one ------------------------------ */

.em-site { position: relative; padding: 14px 20px 18px; background: radial-gradient(120% 90% at 78% 0%, #1d2a48 0%, #0c0e13 58%); color: #f2f3f7; font-family: 'Montserrat', 'DM Sans', sans-serif; overflow: hidden; }
.em-site-nav { display: flex; align-items: center; gap: 16px; font-size: 9.5px; color: rgba(242, 243, 247, .8); margin-bottom: 22px; }
.em-site-nav img { height: 20px; width: auto; margin-right: auto; border: 0; border-radius: 0; }
.em-site-nav .em-pill { padding: 5px 11px; border: 1px solid rgba(255, 255, 255, .55); border-radius: 999px; color: #fff; }
.em-site-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 18px; align-items: center; min-height: 200px; }
.em-site-h { font-size: 21px; line-height: 1.22; font-weight: 400; letter-spacing: -.01em; text-align: left; }
.em-site-btns { display: flex; gap: 8px; margin-top: 14px; }
.em-site-btns span { padding: 6px 13px; border-radius: 999px; font-size: 9.5px; }
.em-site-btns span:first-child { background: linear-gradient(90deg, #b38cf5, #56a8f0); color: #fff; }
.em-site-btns span:last-child { border: 1px solid rgba(255, 255, 255, .5); }

.em-glass { position: relative; justify-self: end; width: min(100%, 250px); padding: 10px; border: 1px solid rgba(255, 255, 255, .22); border-radius: 14px; background: rgba(255, 255, 255, .05); backdrop-filter: blur(6px); font-size: 9.5px; }
.em-glass-h { display: flex; align-items: center; gap: 6px; padding: 7px 9px; margin-bottom: 6px; border: 1px solid rgba(255, 255, 255, .22); border-radius: 10px; font-size: 11px; }
.em-glass-h .i { width: 12px; height: 12px; }
.em-glass-row { display: flex; align-items: center; justify-content: space-between; padding: 6px 9px; border-top: 1px solid rgba(255, 255, 255, .1); color: rgba(242, 243, 247, .75); transition: background .35s ease, color .35s ease; border-radius: 8px; }
.em-glass-row b { display: inline-flex; align-items: center; gap: 5px; font-weight: 500; color: #fff; }
.em-glass-row b .i { width: 12px; height: 12px; }
.em-glass-row.is-on { background: rgba(126, 170, 255, .16); color: #fff; }
.em-batt { display: inline-block; width: 18px; height: 9px; border: 1.5px solid #fff; border-radius: 2px; position: relative; }
.em-batt::before { content: ""; position: absolute; inset: 1px 6px 1px 1px; background: #54d27a; border-radius: 1px; }

.em-site-steps { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin-top: 18px; }
.em-site-step { padding: 9px 9px 10px; border: 1px solid rgba(255, 255, 255, .12); border-radius: 12px; background: rgba(255, 255, 255, .03); font-size: 8.5px; line-height: 1.4; color: rgba(242, 243, 247, .6); transition: border-color .35s ease, background .35s ease, color .35s ease; }
.em-site-step b { display: flex; align-items: center; gap: 5px; margin-bottom: 4px; font-size: 10.5px; font-weight: 600; color: #fff; }
.em-site-step b .i { width: 13px; height: 13px; color: #8fb5ff; }
.em-site-step.is-on { border-color: rgba(143, 181, 255, .7); background: rgba(90, 130, 255, .14); color: #fff; }

/* --- the name and the palette (brand block) -------------------------------- */

.cs-brand-names { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
.cs-brand-names li { display: grid; justify-items: center; gap: 6px; padding: 12px 6px 10px; border: 1px solid var(--_🎨-color--tokens---color-grade--light-16); border-radius: 12px; font-size: 13px; font-weight: 700; color: var(--_🎨-color--tokens---text-body--strong); text-align: center; }
.cs-brand-names li svg { width: 34px; height: 34px; border: 0; border-radius: 9px; }
.cs-brand-names li small { font-size: 10px; font-weight: 500; color: var(--_🎨-color--tokens---text-body--medium); }
.cs-brand-names li.is-pick { border-color: #1e7b4b; box-shadow: 0 0 0 3px rgba(30, 123, 75, .14); }
.cs-brand-names li.is-pick small { color: #1e7b4b; font-weight: 700; }
.page-wrap:not(.light-mode) .cs-brand-names li.is-pick { border-color: #5fd08f; }
.page-wrap:not(.light-mode) .cs-brand-names li.is-pick small { color: #5fd08f; }
.cs-brand-icon.is-altura svg { box-shadow: 0 16px 30px -14px rgba(30, 123, 75, .8); }
.cs-gallery.is-pair { grid-auto-flow: row; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-auto-columns: auto; overflow: visible; }
.cs-gallery.is-pair .cs-shot img { aspect-ratio: 1759 / 932; object-fit: cover; object-position: top left; background: #fff; }

/* --- figure housekeeping, as for Vitala ------------------------------------ */

.ui.is-altura svg.em-ring,
.ui.is-altura .em-site img,
.ui.is-altura img.em-logo { border: 0; border-radius: 0; width: auto; height: 18px; }
.ui.is-altura .em-site-nav img { width: auto; height: 20px; }
.ui.is-altura p { max-width: none; margin: 0; color: inherit; }

/* --- small screens -------------------------------------------------------- */

@media screen and (max-width: 991px) {
  .cs-brand-names { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media screen and (max-width: 767px) {
  .em-site { padding: 12px 14px 14px; }
  .em-site-nav > span:not(.em-pill) { display: none; }
  .em-site-hero { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .em-glass { justify-self: stretch; width: auto; }
  .em-site-steps { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .em-client { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .em-ai-row { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .cs-gallery.is-pair { grid-template-columns: minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  .em-meal-t .em-live::before,
  .em-typing i { animation: none; }
}
.em-scale i.is-on { left: 66%; }

/* ==========================================================================
   14. 12Traders. A desktop web app on a soft indigo canvas. `.ui.is-12t` is
   the only switch; the `tw-` pieces are the trading CV, the habits panels,
   the job-event ranking, the academy and the marketing site.
   Profit and loss keep their own green and red; indigo is the platform, so
   it never reads as a gain or a loss.
   ========================================================================== */

.ui.is-12t {
  --ui-canvas-a: #eef0fb;
  --ui-canvas-b: #e3e6f6;
  --ui-accent: #3a36db;
  --tw-soft: #ecebfd;
  --tw-up: #16a36a;
  --tw-down: #e5484d;
  --tw-amber: #e8a23a;
  --tw-lav: #ece4f7;
  --tw-ink-dark: #1f1f1f;
}

.page-wrap:not(.light-mode) .ui.is-12t {
  --ui-canvas-a: #13131c;
  --ui-canvas-b: #0e0e15;
  --ui-accent: #8a86ff;
  --tw-soft: #22214a;
  --tw-up: #35d08a;
  --tw-down: #ff6b70;
  --tw-amber: #f2b45a;
  --tw-lav: #241f38;
}

.ui.is-12t svg:not(.i) { border: 0; border-radius: 0; width: auto; height: auto; display: inline-block; }
.ui.is-12t p { max-width: none; margin: 0; color: inherit; font-size: inherit; line-height: inherit; letter-spacing: normal; }
.ui.is-12t .is-up { color: var(--tw-up); }
.ui.is-12t .is-down { color: var(--tw-down); }

.tw-app { position: relative; font-size: 11.5px; }
.tw-body { padding: 14px 16px 16px; background: var(--ui-panel); }

.tw-card {
  background: var(--ui-bg);
  border: 1px solid var(--ui-line);
  border-radius: 10px;
  padding: 12px 14px;
  min-width: 0;
}

.tw-card-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.tw-card-h b { font-size: 12.5px; font-weight: 600; }
.tw-sel { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border: 1px solid var(--ui-line); border-radius: 6px; font-size: 10px; color: var(--ui-ink-2); }
.tw-sel .i { width: 9px; height: 9px; transform: rotate(90deg); }

.tw-av {
  display: inline-grid; place-items: center; flex: none;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--tw-soft); color: var(--ui-accent);
  font-size: 9px; font-weight: 700; letter-spacing: .02em;
}
.tw-av.is-lg { width: 52px; height: 52px; font-size: 16px; }
.tw-av.is-xl { width: 56px; height: 56px; font-size: 17px; }

/* --- app nav -------------------------------------------------------------- */

.tw-nav { display: flex; align-items: center; gap: 14px; padding: 10px 16px; border-bottom: 1px solid var(--ui-line); background: var(--ui-bg); }
.tw-brand { display: inline-flex; align-items: center; gap: 6px; font-size: 9.5px; line-height: 1.05; font-weight: 800; color: var(--ui-ink); }
.ui.is-12t .tw-brand svg { width: 16px; height: 22px; color: var(--ui-accent); }
.tw-search { display: inline-flex; align-items: center; gap: 6px; flex: 0 1 200px; padding: 6px 10px; border: 1px solid var(--ui-line); border-radius: 7px; color: var(--ui-ink-3); font-size: 10.5px; }
.tw-search .i { width: 11px; height: 11px; }
.tw-links { display: flex; gap: 14px; margin-left: auto; font-size: 10.5px; color: var(--ui-ink-2); }
.tw-links .is-on { color: var(--ui-accent); font-weight: 700; }
.tw-event { display: inline-flex; align-items: center; gap: 4px; padding: 5px 9px; border: 1px solid var(--ui-accent); border-radius: 7px; color: var(--ui-accent); font-size: 10px; font-weight: 600; white-space: nowrap; }
.tw-event .i { width: 9px; height: 9px; transform: rotate(90deg); }
.tw-bell { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 7px; background: var(--tw-soft); color: var(--ui-accent); }
.tw-bell .i { width: 12px; height: 12px; }

/* --- trading CV ----------------------------------------------------------- */

.tw-profile { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 18px; padding: 14px 16px; }
.tw-who { display: flex; align-items: center; gap: 12px; }
.tw-who b { display: block; font-size: 14px; }
.tw-who small { display: flex; align-items: center; gap: 5px; font-size: 9.5px; color: var(--ui-ink-3); }
.tw-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--tw-up); }
.tw-tag { display: inline-block; margin: 4px 0 3px; padding: 2px 7px; border-radius: 5px; background: var(--tw-soft); color: var(--ui-accent); font-size: 9.5px; font-weight: 600; }

.tw-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.tw-kpis > div { padding: 7px 9px; border-radius: 7px; background: var(--ui-sunken); min-width: 0; }
.tw-kpis b { display: flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; color: var(--ui-ink); white-space: nowrap; }
.tw-kpis .is-up b { color: var(--tw-up); }
.tw-kpis .is-down b { color: var(--tw-down); }
.tw-kpis b .i { width: 10px; height: 10px; }
.tw-kpis small { display: block; font-size: 8.5px; color: var(--ui-ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.tw-acts { display: grid; gap: 6px; }
.tw-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 7px 12px; border: 1px solid var(--ui-line); border-radius: 7px; font-size: 10.5px; font-weight: 600; color: var(--ui-ink); white-space: nowrap; transition: transform .25s ease, box-shadow .25s ease; }
.tw-btn .i { width: 11px; height: 11px; }
.tw-btn.is-primary { background: var(--ui-accent); border-color: var(--ui-accent); color: #fff; }
.page-wrap:not(.light-mode) .tw-btn.is-primary { color: #0e0e15; }
.tw-btn.is-primary.is-now { transform: scale(.96); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ui-accent) 25%, transparent); }

.tw-tabs { display: flex; gap: 6px; margin: 12px 0; }
.tw-tabs span { padding: 5px 10px; border-radius: 6px; font-size: 10.5px; color: var(--ui-ink-3); }
.tw-tabs .is-on { background: var(--tw-soft); color: var(--ui-accent); font-weight: 700; }

.tw-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.15fr); gap: 10px; }

/* Bars grow when their panel's stage arrives; heights are declared inline so
   the static frame is already the right chart. */
.tw-bars { display: flex; align-items: flex-end; justify-content: space-between; gap: 6px; height: 104px; padding-bottom: 16px; position: relative; }
.tw-bars > span { position: relative; flex: 1; display: flex; align-items: flex-end; justify-content: center; gap: 2px; height: 100%; }
.tw-bars i { width: 7px; height: 4%; border-radius: 3px 3px 1px 1px; background: var(--ui-accent); transition: height .8s cubic-bezier(.2, .8, .2, 1); }
.tw-bars i + i { background: color-mix(in srgb, var(--ui-accent) 38%, transparent); }
.tw-bars.is-on i,
.tw-habits .tw-bars i { height: var(--h); }
.tw-bars em { position: absolute; bottom: -16px; left: 50%; transform: translateX(-50%); font-style: normal; font-size: 8.5px; color: var(--ui-ink-3); white-space: nowrap; }
.tw-bars.is-wide i { width: 12px; }

.tw-legend { display: flex; gap: 10px; font-size: 9px; color: var(--ui-ink-3); margin-top: 8px; }
.tw-card-h .tw-legend { margin: 0; }
.tw-legend i { display: inline-block; width: 7px; height: 7px; margin-right: 4px; border-radius: 50%; background: var(--ui-accent); }
.tw-legend i.is-prev { background: color-mix(in srgb, var(--ui-accent) 38%, transparent); }

.tw-total { font-size: 22px; font-weight: 700; color: var(--ui-accent); letter-spacing: -.5px; }
.tw-split { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 8px 0 10px; }
.tw-split > div { display: grid; grid-template-columns: auto 1fr; align-items: center; column-gap: 7px; }
.tw-split b { font-size: 15px; }
.tw-split small { grid-column: 2; font-size: 8.5px; color: var(--ui-ink-3); }
.tw-split .is-win b { color: var(--tw-up); }
.tw-split .is-loss b { color: var(--tw-down); }

@property --fill { syntax: '<number>'; inherits: true; initial-value: 0; }

.tw-ring {
  --p: 50;
  --fill: 0;
  grid-row: span 2;
  width: 30px; height: 30px; border-radius: 50%;
  background: conic-gradient(var(--ring, var(--tw-up)) calc(var(--fill) * 1%), var(--ui-sunken) 0);
  -webkit-mask: radial-gradient(circle, transparent 54%, #000 56%);
          mask: radial-gradient(circle, transparent 54%, #000 56%);
  transition: --fill 1s ease;
}
.tw-split .is-loss .tw-ring { --ring: var(--tw-down); }
.tw-split.is-on .tw-ring,
.tw-s-ring .tw-ring { --fill: var(--p); }

.tw-pl { display: grid; gap: 4px; margin: 0; }
.tw-pl > div { display: grid; grid-template-columns: 1fr auto 1fr auto; gap: 6px; padding-top: 4px; border-top: 1px solid var(--ui-line-soft); font-size: 9.5px; }
.tw-pl dt { color: var(--ui-ink-2); }
.tw-pl dd { margin: 0; font-weight: 600; }

.tw-instr ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 7px; }
.tw-instr li { display: grid; grid-template-columns: auto minmax(0, 1fr) 56px auto; align-items: center; gap: 8px; }
.tw-instr li b { display: block; font-size: 10.5px; }
.tw-instr li small { display: block; font-size: 8.5px; color: var(--ui-ink-3); }
.tw-logo { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; background: var(--c); color: #fff; font-size: 10px; font-weight: 800; }
.ui.is-12t .tw-spark { width: 56px; height: 18px; }
.tw-spark polyline { fill: none; stroke: var(--tw-up); stroke-width: 1.4; stroke-linejoin: round; stroke-linecap: round; }
.tw-val { text-align: right; }
.tw-instr .tw-val small { color: var(--tw-up); font-weight: 600; }

.tw-toast {
  position: absolute; right: 18px; bottom: 18px;
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-radius: 10px;
  background: var(--ui-solid); color: var(--ui-solid-ink);
  box-shadow: 0 14px 30px -12px rgba(15, 15, 40, .45);
  font-size: 10.5px;
  opacity: 0; transform: translateY(8px);
  transition: opacity .4s ease, transform .4s ease;
}
.tw-toast.is-on { opacity: 1; transform: none; }
.tw-toast > span { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--tw-up); color: #fff; }
.tw-toast .i { width: 11px; height: 11px; stroke-width: 2.6; }
.tw-toast b { display: block; font-size: 11.5px; }

/* --- habits --------------------------------------------------------------- */

.tw-hgrid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr) minmax(0, .8fr); gap: 10px; }
.tw-habits .tw-card { transition: border-color .4s ease, box-shadow .4s ease, opacity .4s ease; opacity: .55; }
.tw-habits .tw-card.is-on { opacity: 1; border-color: color-mix(in srgb, var(--ui-accent) 55%, var(--ui-line)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ui-accent) 12%, transparent); }
.tw-period .tw-bars { height: 120px; }
.tw-period .is-peak { z-index: 1; }
.tw-tip { position: absolute; top: -6px; left: 60%; padding: 3px 6px; border-radius: 5px; background: var(--ui-solid); color: var(--ui-solid-ink); font-size: 9px; white-space: nowrap; }
.tw-tip small { display: block; font-size: 7.5px; opacity: .7; font-weight: 400; }
.tw-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 22px; }
.tw-facts > div, .tw-pick { padding: 7px 9px; border-radius: 7px; background: var(--ui-sunken); }
.tw-facts small, .tw-pick small { display: block; font-size: 8.5px; color: var(--ui-ink-3); }
.tw-facts b, .tw-pick b { display: block; font-size: 12px; }
.tw-facts em, .tw-pick em { display: block; font-style: normal; font-size: 8.5px; color: var(--ui-ink-3); }

.tw-score { display: flex; align-items: center; gap: 10px; font-size: 9.5px; color: var(--ui-ink-2); line-height: 1.3; }
.tw-score b { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: var(--ui-sunken); font-size: 16px; color: var(--ui-ink); }
.tw-rbars { display: flex; align-items: flex-end; gap: 5px; height: 78px; margin: 12px 0; }
.tw-rbars i { flex: 1; height: var(--h); border-radius: 3px 3px 1px 1px; background: var(--tw-up); }
.tw-rbars i.is-mid { background: var(--tw-amber); }
.tw-rbars i.is-hi { background: var(--tw-down); }
.tw-dd small { display: block; font-size: 9px; color: var(--ui-ink-3); margin-bottom: 4px; }
.tw-dd > div { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; }
.tw-dd span { padding: 5px 7px; border-radius: 6px; background: var(--ui-sunken); font-size: 8.5px; color: var(--ui-ink-3); }
.tw-dd span b { display: block; font-size: 11px; color: var(--ui-ink); }
.tw-most { display: grid; align-content: start; gap: 6px; }
.tw-most .tw-card-h { margin-bottom: 2px; }

/* --- job event ------------------------------------------------------------ */

.tw-ev-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 12px; }
.tw-ev-head b { display: block; font-size: 15px; }
.tw-ev-head small { font-size: 10px; color: var(--ui-ink-3); }
.tw-live { display: inline-flex; align-items: center; gap: 5px; margin-bottom: 3px; padding: 2px 7px; border-radius: 99px; background: color-mix(in srgb, var(--tw-down) 14%, transparent); color: var(--tw-down); font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.tw-live i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; animation: tw-pulse 1.4s ease-in-out infinite; }
@keyframes tw-pulse { 50% { opacity: .3; } }

.tw-seg { display: inline-flex; padding: 3px; border-radius: 8px; background: var(--ui-sunken); font-size: 10.5px; font-weight: 600; }
.tw-seg span { padding: 5px 11px; border-radius: 6px; color: var(--ui-ink-3); transition: background .35s ease, color .35s ease, box-shadow .35s ease; }
.tw-event-win .tw-seg-a,
.tw-event-win:not([data-flow-index="0"]) .tw-seg-b { background: var(--ui-bg); color: var(--ui-accent); box-shadow: 0 1px 3px rgba(15, 15, 40, .12); }
.tw-event-win:not([data-flow-index="0"]) .tw-seg-a { background: none; color: var(--ui-ink-3); box-shadow: none; }

.tw-rank { border: 1px solid var(--ui-line); border-radius: 10px; background: var(--ui-bg); overflow: hidden; }
.tw-rank-h,
.tw-row { display: grid; grid-template-columns: 30px minmax(0, 1.6fr) repeat(4, minmax(0, 1fr)); align-items: center; gap: 8px; padding: 0 14px; }
.tw-rank-h { height: 30px; font-size: 9px; color: var(--ui-ink-3); text-transform: uppercase; letter-spacing: .05em; border-bottom: 1px solid var(--ui-line); }
.tw-rank-b { position: relative; height: calc(5 * 38px); }
.tw-row {
  position: absolute; left: 0; right: 0; top: 0; height: 38px;
  font-size: 11px; font-weight: 600; font-variant-numeric: tabular-nums;
  border-bottom: 1px solid var(--ui-line-soft);
  transform: translateY(calc(var(--a) * 38px));
  transition: transform .9s cubic-bezier(.65, 0, .35, 1), background .4s ease;
}
.tw-event-win:not([data-flow-index="0"]) .tw-row { transform: translateY(calc(var(--b) * 38px)); }
.tw-t { display: flex; align-items: center; gap: 8px; }
.tw-n { position: relative; display: grid; color: var(--ui-ink-3); }
.tw-n i { grid-area: 1 / 1; font-style: normal; transition: opacity .3s ease; }
.tw-n .n-b,
.tw-event-win:not([data-flow-index="0"]) .tw-n .n-a { opacity: 0; }
.tw-event-win:not([data-flow-index="0"]) .tw-n .n-b { opacity: 1; }
.tw-event-win[data-flow-index="2"] .tw-row.is-pick,
.tw-event-win[data-flow-index="3"] .tw-row.is-pick { background: color-mix(in srgb, var(--ui-accent) 8%, transparent); }

.tw-compare {
  display: grid; gap: 6px;
  margin-top: 10px; padding: 12px 14px;
  border: 1px solid color-mix(in srgb, var(--ui-accent) 40%, var(--ui-line)); border-radius: 10px;
  background: var(--ui-bg);
  opacity: .35; transform: translateY(6px);
  transition: opacity .5s ease, transform .5s ease;
}
.tw-compare.is-on { opacity: 1; transform: none; }
.tw-cmp-h { display: grid; grid-template-columns: 120px 1fr 1fr; align-items: center; gap: 10px; font-size: 11.5px; font-weight: 700; }
.tw-cmp-h > span { display: flex; align-items: center; gap: 7px; }
.tw-cmp-h > span:first-child { grid-column: 2; }
.tw-cmp-h > span + span::before { content: "vs"; margin-right: 4px; font-size: 10px; font-weight: 500; color: var(--ui-ink-3); }
.tw-best { padding: 2px 7px; border-radius: 99px; background: color-mix(in srgb, var(--tw-up) 15%, transparent); color: var(--tw-up); font-size: 9px; font-style: normal; }
.tw-cmp-r { display: grid; grid-template-columns: 120px 1fr 1fr; align-items: center; gap: 10px; font-size: 10.5px; }
.tw-cmp-r small { font-size: 9.5px; color: var(--ui-ink-3); }
.tw-cmp-r > span { position: relative; display: flex; align-items: center; gap: 8px; font-weight: 600; font-variant-numeric: tabular-nums; }
.tw-cmp-r i { height: 6px; width: 0; max-width: 70%; border-radius: 3px; background: color-mix(in srgb, var(--ui-ink) 22%, transparent); transition: width .9s ease .1s; }
.tw-cmp-r .is-win i { background: var(--tw-up); }
.tw-cmp-r .is-win { color: var(--tw-up); }
.tw-compare.is-on .tw-cmp-r i { width: calc(var(--w) * .7); }

/* --- academy -------------------------------------------------------------- */

.tw-agrid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 10px; }
.tw-quiz { background: var(--tw-lav); border-color: transparent; padding: 14px 16px; }
.tw-q { font-size: 9.5px; font-weight: 700; color: var(--ui-accent); }
.tw-qbar { height: 4px; border-radius: 2px; background: color-mix(in srgb, var(--ui-accent) 15%, transparent); margin-bottom: 14px; }
.tw-qbar i { display: block; width: 60%; height: 100%; border-radius: 2px; background: var(--ui-accent); }
.ui.is-12t .tw-qq { font-size: 14px; font-weight: 700; line-height: 1.3; margin-bottom: 12px; color: var(--ui-ink); }
.tw-opt { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; padding: 9px 12px; border-radius: 8px; border: 1px solid var(--ui-line); background: var(--ui-bg); font-size: 11px; transition: border-color .4s ease, background .4s ease, color .4s ease; }
.tw-opt > span { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--ui-sunken); font-size: 9.5px; font-weight: 700; color: var(--ui-ink-2); transition: background .4s ease, color .4s ease; }
.tw-opt .i { margin-left: auto; width: 13px; height: 13px; stroke-width: 2.6; opacity: 0; transition: opacity .3s ease; }
.tw-opt.is-on { border-color: var(--tw-up); background: color-mix(in srgb, var(--tw-up) 10%, var(--ui-bg)); color: var(--ui-ink); }
.tw-opt.is-on > span { background: var(--tw-up); color: #fff; }
.tw-opt.is-on .i { opacity: 1; color: var(--tw-up); }
.tw-next {
  display: flex; align-items: center; gap: 10px; margin-top: 12px; padding: 10px 12px;
  border-radius: 9px; background: var(--ui-bg); border: 1px dashed color-mix(in srgb, var(--ui-accent) 50%, transparent);
  opacity: .3; transition: opacity .5s ease;
}
.tw-next.is-on { opacity: 1; border-style: solid; }
.tw-next-ico { display: grid; place-items: center; flex: none; width: 30px; height: 30px; border-radius: 8px; background: var(--tw-soft); color: var(--ui-accent); }
.tw-next-ico .i { width: 14px; height: 14px; }
.tw-next small { display: block; font-size: 8.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--ui-accent); }
.tw-next b { display: block; font-size: 12px; }
.tw-next em { display: block; font-style: normal; font-size: 9.5px; color: var(--ui-ink-3); }
.tw-next > .i { margin-left: auto; width: 12px; height: 12px; color: var(--ui-ink-3); }

.tw-acol { display: grid; gap: 8px; align-content: start; }
.tw-ch > div:first-child { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.tw-ch b { font-size: 12px; }
.tw-chk { display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--ui-sunken); color: transparent; transition: background .4s ease, color .4s ease; }
.tw-chk .i { width: 10px; height: 10px; stroke-width: 3; }
.tw-ch.is-on .tw-chk,
.tw-ch.is-done .tw-chk { background: var(--tw-up); color: #fff; }
.tw-top { padding: 2px 7px; border-radius: 5px; background: var(--tw-up); color: #fff; font-size: 9px; font-weight: 700; }
.tw-meta { display: flex; align-items: center; gap: 6px; margin-top: 4px; font-size: 9.5px; color: var(--ui-ink-2); }
.tw-meta em { margin-left: auto; font-style: normal; font-size: 9px; color: var(--ui-ink-3); }
.tw-lvl { display: inline-flex; align-items: flex-end; gap: 1.5px; height: 10px; }
.tw-lvl i { width: 2.5px; border-radius: 1px; background: var(--ui-line); }
.tw-lvl i:nth-child(1) { height: 40%; }
.tw-lvl i:nth-child(2) { height: 70%; }
.tw-lvl i:nth-child(3) { height: 100%; }
.tw-lvl.is-2 i:nth-child(-n+2),
.tw-lvl.is-3 i { background: var(--ui-accent); }
.tw-lvl.is-1 i:nth-child(1) { background: var(--tw-amber); }
.tw-prog { height: 4px; margin-top: 8px; border-radius: 2px; background: var(--ui-sunken); overflow: hidden; }
.tw-prog i { display: block; width: 72%; height: 100%; background: var(--ui-accent); transition: width 1s ease, background .4s ease; }
.tw-ch.is-on .tw-prog i { width: 100%; background: var(--tw-up); }
.tw-skills { display: flex; flex-wrap: wrap; gap: 5px; }
.tw-sk { display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px; border-radius: 99px; background: var(--ui-sunken); font-size: 10px; }

/* --- marketing site ------------------------------------------------------- */

.tw-site { font-size: 11px; }
.tw-s-nav { display: flex; align-items: center; gap: 18px; padding: 10px 18px; background: var(--ui-bg); border-bottom: 1px solid var(--ui-line); font-size: 10.5px; color: var(--ui-ink-2); }
.tw-s-nav > span:nth-child(2) { margin-left: auto; }
.tw-s-nav .is-on { color: var(--ui-ink); font-weight: 700; }
.tw-s-cta, .tw-s-btn { padding: 6px 12px; border-radius: 4px; background: #3a36db; color: #fff; font-weight: 700; font-size: 10px; white-space: nowrap; }
.ui.is-12t .tw-s-nav .tw-brand svg { width: 18px; height: 24px; }

.tw-s-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 22px; align-items: center; padding: 26px 26px 22px; background: var(--tw-ink-dark); color: #f4f4f6; }
.ui.is-12t .tw-s-h { font-size: 23px; line-height: 1.12; font-weight: 500; letter-spacing: -.4px; margin-bottom: 14px; }
.tw-s-btn { display: inline-block; }
.ui.is-12t .tw-s-sub { margin-top: 12px; font-size: 10.5px; line-height: 1.5; color: #c9c9d1; }
.tw-s-cards { display: grid; grid-template-columns: 1.1fr 1fr; gap: 8px; }
.tw-s-card { padding: 10px 12px; border-radius: 4px; background: #fff; color: #1f1f1f; }
.tw-s-card b { display: block; font-size: 11.5px; margin-bottom: 5px; }
.tw-s-card.is-person { grid-row: span 2; display: grid; align-content: space-between; gap: 10px; background: linear-gradient(160deg, #e9e8ff, #fff 60%); }
.tw-s-card.is-person .tw-av { background: #3a36db; color: #fff; }
.tw-s-perf small { display: block; font-size: 9.5px; color: #6b6b75; }
.tw-s-perf b { display: flex; align-items: center; gap: 4px; margin: 0; color: #16a36a; font-size: 15px; }
.tw-s-perf b .i { width: 12px; height: 12px; }
.tw-s-perf em, .tw-s-ring em { font-style: normal; font-size: 8.5px; color: #6b6b75; }
.tw-s-ring { display: grid; grid-template-columns: auto 1fr; align-items: center; column-gap: 8px; }
.tw-s-ring b { margin: 0; font-size: 13px; }
.tw-s-ring em { grid-column: 2; }
.tw-s-ring .tw-ring { background: conic-gradient(#16a36a calc(var(--fill) * 1%), #e8e8ee 0); }
.tw-s-card.is-peach { background: #f9e7dc; }
.tw-s-card.is-lav { background: #ece4f7; }
.tw-s-card ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 3px; font-size: 9.5px; }
.tw-s-card li { color: #1f1f1f; }
.tw-s-card li::before { content: "\2713"; display: inline-grid; place-items: center; width: 12px; height: 12px; margin-right: 5px; border-radius: 3px; background: #d6ecdf; color: #16a36a; font-size: 8px; font-weight: 800; }
.tw-s-mini { display: flex; justify-content: space-between; gap: 6px; margin-top: 4px; padding: 5px 7px; border-radius: 4px; background: #fff; font-size: 9.5px; font-weight: 600; }
.tw-s-mini span { font-weight: 400; color: #6b6b75; }

.tw-s-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; padding: 20px 26px 24px; background: var(--ui-panel); }
.ui.is-12t .tw-s-k { font-size: 15px; font-weight: 600; margin-bottom: 10px; color: var(--ui-ink); }
.tw-s-step { display: grid; grid-template-columns: auto 1fr; column-gap: 10px; padding: 8px 10px; border-radius: 8px; color: var(--ui-ink-3); font-size: 10px; transition: background .4s ease, color .4s ease, box-shadow .4s ease; }
.tw-s-step > span { grid-row: span 2; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 7px; background: var(--ui-sunken); color: var(--ui-ink-3); transition: background .4s ease, color .4s ease; }
.tw-s-step .i { width: 13px; height: 13px; }
.tw-s-step b { font-size: 11.5px; color: var(--ui-ink-2); }
.tw-s-step.is-on { background: var(--ui-bg); color: var(--ui-ink-2); box-shadow: 0 1px 3px rgba(15, 15, 40, .08); }
.tw-s-step.is-on > span { background: var(--tw-soft); color: var(--ui-accent); }
.tw-s-step.is-on b { color: var(--ui-ink); }

.tw-roi { padding: 14px 16px; border-radius: 10px; background: var(--ui-bg); border: 1px solid var(--ui-line); }
.ui.is-12t .tw-roi .tw-s-k { margin-bottom: 12px; }
.tw-roi-in { display: flex; align-items: center; gap: 8px; font-size: 10px; color: var(--ui-ink-3); }
.tw-roi-in > b { font-size: 18px; color: var(--ui-ink); }
.tw-swap { display: inline-grid; }
.tw-swap > span { grid-area: 1 / 1; opacity: 0; transition: opacity .35s ease; white-space: nowrap; }
.tw-swap > span.is-on { opacity: 1; }
.tw-slider { position: relative; flex: 1; height: 6px; margin-left: 10px; border-radius: 3px; background: var(--ui-sunken); }
.tw-slider > i { position: absolute; top: 0; bottom: 0; left: 0; width: 20%; border-radius: 3px; background: var(--ui-accent); transition: width .7s cubic-bezier(.65, 0, .35, 1); }
.tw-thumb { position: absolute; top: 50%; left: 20%; width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 50%; background: var(--ui-bg); border: 3px solid var(--ui-accent); transition: left .7s cubic-bezier(.65, 0, .35, 1); }
.tw-site:has(.tw-roi-in [data-key="b"].is-on) .tw-slider > i { width: 55%; }
.tw-site:has(.tw-roi-in [data-key="b"].is-on) .tw-thumb { left: 55%; }
.tw-site:has(.tw-roi-in [data-key="c"].is-on) .tw-slider > i { width: 90%; }
.tw-site:has(.tw-roi-in [data-key="c"].is-on) .tw-thumb { left: 90%; }
.tw-roi-out { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 16px; }
.tw-roi-out > div { padding: 9px 10px; border-radius: 8px; background: var(--ui-sunken); }
.tw-roi-out small { display: block; font-size: 8.5px; color: var(--ui-ink-3); }
.tw-roi-out b { font-size: 14px; color: var(--ui-ink); }
.tw-roi-out > div:first-child b { color: var(--ui-accent); }

/* --- brand block ---------------------------------------------------------- */

.tw-word { display: flex; align-items: center; gap: 16px; margin: auto 0; padding: 22px 26px; border-radius: 12px; background: #1f1f1f; color: #fff; width: max-content; max-width: 100%; }
.cs-brand .tw-word svg { width: 46px; height: 62px; color: #fff; border: 0; border-radius: 0; }
.tw-word span { font-family: 'DM Sans', sans-serif; font-size: 30px; line-height: 1.02; font-weight: 700; letter-spacing: -.5px; }
.cs-brand-icon.is-12t svg { box-shadow: 0 16px 30px -14px rgba(58, 54, 219, .8); }
.cs-gallery.is-three { grid-auto-flow: row; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-columns: auto; overflow: visible; }
.cs-gallery.is-three .cs-shot img { aspect-ratio: 4 / 5; object-fit: cover; object-position: top center; background: #f0f0f0; }

/* --- small screens -------------------------------------------------------- */

@media screen and (max-width: 991px) {
  .tw-profile { grid-template-columns: minmax(0, 1fr); }
  .tw-acts { grid-auto-flow: column; justify-content: start; }
  .tw-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .tw-instr { grid-column: 1 / -1; }
  .tw-hgrid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .tw-period { grid-column: 1 / -1; }
  .tw-links, .tw-event { display: none; }
  .tw-bell { margin-left: auto; }
}

@media screen and (max-width: 767px) {
  .tw-body { padding: 10px; }
  .tw-search { display: none; }
  .tw-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tw-grid, .tw-hgrid, .tw-agrid, .tw-s-body, .tw-s-hero { grid-template-columns: minmax(0, 1fr); }
  .tw-ev-head { flex-direction: column; align-items: flex-start; }
  .tw-rank-h, .tw-row { grid-template-columns: 22px minmax(0, 1.5fr) repeat(2, minmax(0, 1fr)); padding: 0 10px; }
  .tw-rank-h > span:nth-child(n+5), .tw-row > span:nth-child(n+5) { display: none; }
  .tw-cmp-h, .tw-cmp-r { grid-template-columns: 82px 1fr 1fr; }
  .tw-cmp-h > span + span::before { display: none; }
  .tw-s-nav > span:not(.tw-brand):not(.tw-s-cta) { display: none; }
  .tw-s-cta { margin-left: auto; }
  .ui.is-12t .tw-s-h { font-size: 19px; }
  .tw-roi-out { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .tw-word span { font-size: 24px; }
  .cs-gallery.is-three { grid-auto-flow: column; grid-template-columns: none; grid-auto-columns: 78%; overflow-x: auto; }
}

@media (prefers-reduced-motion: reduce) {
  .tw-live i { animation: none; }
}
@media screen and (max-width: 767px) {
  .tw-cmp-h .tw-best { display: none; }
  .tw-cmp-h > span:first-child { color: var(--tw-up); }
}

/* --- 12Traders on the phone ----------------------------------------------- */

.tw-m-row { gap: clamp(14px, 2.4vw, 30px); }
.tw-m-row .vt-phone { width: 244px; height: 530px; min-height: 0; }
.tw-m-row .vt-body { overflow: hidden; }
.tw-m-row .vt-body { padding: 4px 11px 10px; display: grid; align-content: start; gap: 8px; }
.tw-m-row .vt-tabbar .is-on { color: var(--ui-accent); }

.tw-m-top { display: flex; align-items: center; gap: 8px; margin: 2px 0 2px; }
.tw-m-top b { font-size: 13px; margin-right: auto; }
.tw-m-back { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 7px; background: var(--ui-sunken); }
.tw-m-back .i { width: 11px; height: 11px; }
.tw-m-top .tw-bell { width: 22px; height: 22px; }
.tw-m-top .tw-sel { font-size: 8.5px; padding: 2px 6px; }

.tw-m-who { display: flex; align-items: center; gap: 9px; }
.tw-m-who .tw-av.is-lg { width: 40px; height: 40px; font-size: 13px; }
.tw-m-who b { display: block; font-size: 12.5px; }
.tw-m-who small { display: flex; align-items: center; gap: 4px; font-size: 8.5px; color: var(--ui-ink-3); }
.tw-m-who .tw-tag { font-size: 8.5px; margin: 3px 0 0; }
.tw-m-flag { margin-left: auto; align-self: flex-start; padding: 2px 5px; border-radius: 4px; background: var(--ui-sunken); font-size: 8px; font-weight: 700; color: var(--ui-ink-2); }

.tw-m-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; }
.tw-m-kpis > div { padding: 6px 8px; }
.tw-m-kpis b { font-size: 11.5px; }
.tw-m-kpis small { font-size: 8px; }

.tw-m-tabs { margin: 0; gap: 4px; }
.tw-m-tabs span { padding: 4px 7px; font-size: 9px; }

.tw-m-card { padding: 9px 10px; border-radius: 9px; }
.tw-m-card .tw-card-h { margin-bottom: 6px; }
.tw-m-card .tw-card-h b { font-size: 11px; }
.tw-m-bars { height: 92px; }
.tw-m-bars i { width: 6px; }

.tw-m-total { display: flex; align-items: baseline; gap: 6px; }
.tw-m-total b { font-size: 26px; font-weight: 700; letter-spacing: -.6px; color: var(--ui-accent); }
.tw-m-total span { font-size: 10px; color: var(--ui-ink-3); }

.tw-m-wl { display: grid; gap: 8px; }
.tw-m-wl > div { display: grid; grid-template-columns: auto auto 1fr; align-items: center; gap: 8px; }
.tw-m-wl > div + div { padding-top: 8px; border-top: 1px solid var(--ui-line-soft); }
.tw-m-wl .tw-ring { width: 34px; height: 34px; grid-row: auto; }
.tw-m-wl b { display: block; font-size: 15px; }
.tw-m-wl small { font-size: 8.5px; color: var(--ui-ink-3); }
.tw-m-wl .is-win b { color: var(--tw-up); }
.tw-m-wl .is-loss b { color: var(--tw-down); }
.tw-m-wl .is-loss .tw-ring { --ring: var(--tw-down); }
.tw-m-wl.is-on .tw-ring { --fill: var(--p); }
.tw-m-wl dl { display: grid; grid-template-columns: auto auto; justify-content: end; gap: 1px 8px; margin: 0; font-size: 8.5px; }
.tw-m-wl dt { color: var(--ui-ink-3); }
.tw-m-wl dd { margin: 0; font-weight: 600; text-align: right; }

.tw-m-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; }
.tw-m-tiles > div { padding: 6px 8px; border-radius: 7px; background: var(--ui-sunken); }
.tw-m-tiles b { display: block; font-size: 12px; }
.tw-m-tiles small { font-size: 8px; color: var(--ui-ink-3); }

.tw-m-alloc { display: grid; gap: 7px; }
.tw-m-al { display: grid; grid-template-columns: 1fr auto; gap: 3px 6px; font-size: 9.5px; }
.tw-m-al b { font-size: 10px; color: var(--ui-accent); }
.tw-m-al > i,
.tw-m-cty > i { grid-column: 1 / -1; height: 5px; border-radius: 3px; background: var(--ui-sunken); overflow: hidden; }
.tw-m-al > i > i,
.tw-m-cty > i > i { display: block; width: 0; height: 100%; border-radius: 3px; background: var(--ui-accent); transition: width .9s cubic-bezier(.2, .8, .2, 1); }
.tw-m-al.is-b b { color: var(--tw-amber); }
.tw-m-al.is-b > i > i { background: var(--tw-amber); }
.tw-m-al.is-c b { color: var(--tw-up); }
.tw-m-al.is-c > i > i { background: var(--tw-up); }

.tw-m-cty { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 3px 7px; padding: 4px 0; font-size: 10px; }
.tw-m-cty + .tw-m-cty { border-top: 1px solid var(--ui-line-soft); }
.tw-m-cc { display: grid; place-items: center; width: 22px; height: 16px; border-radius: 4px; background: color-mix(in srgb, var(--c) 18%, transparent); color: var(--c); font-size: 7.5px; font-weight: 800; }
.tw-m-cty b { font-size: 10.5px; }
.tw-m-cty > i { grid-column: 2 / 3; }
.tw-m-cty > i > i { background: var(--c); }
.tw-m-cty em { font-style: normal; font-size: 8px; color: var(--ui-ink-3); }
.tw-m-row .tw-risk .tw-rbars { height: 56px; margin: 8px 0; }
.tw-m-row .tw-risk .tw-score b { width: 26px; height: 26px; font-size: 14px; }

/* --- For talents ---------------------------------------------------------- */

.tw-t-hero { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; padding: 18px 22px; background: var(--ui-bg); }
.tw-t-col { display: grid; grid-template-rows: auto 1fr; gap: 10px; }
.tw-t-card { position: relative; border-radius: 4px; padding: 12px; min-width: 0; color: #1f1f1f; font-size: 10px; line-height: 1.45; }
.tw-t-card b { display: block; font-size: 12px; margin-bottom: 4px; }
.tw-t-card p { color: #4b4b55; }
.tw-t-card.is-photo { min-height: 200px; display: flex; flex-direction: column; justify-content: flex-end; background: linear-gradient(160deg, var(--g1), var(--g2)); overflow: hidden; }
.tw-t-card.is-short { min-height: 92px; }
.tw-t-ini { position: absolute; top: 16px; left: 50%; transform: translateX(-50%); display: grid; place-items: center; width: 54px; height: 54px; border-radius: 50%; background: rgba(255, 255, 255, .55); color: #1f1f1f; font-size: 16px; font-weight: 700; }
.tw-t-card.is-short .tw-t-ini { top: 50%; transform: translate(-50%, -50%); width: 44px; height: 44px; font-size: 13px; }
.tw-t-stat { padding: 8px 9px; border-radius: 4px; background: #fff; box-shadow: 0 8px 18px -10px rgba(20, 20, 50, .3); }
.tw-t-stat small { display: block; font-size: 9px; font-weight: 700; color: #1f1f1f; margin-bottom: 4px; }
.tw-t-stat > div { display: flex; justify-content: space-between; gap: 6px; }
.tw-t-stat span { display: grid; font-size: 7.5px; color: #6b6b75; }
.tw-t-stat span b { display: flex; align-items: center; gap: 3px; margin: 0; font-size: 11px; color: #16a36a; }
.tw-t-stat span b .i { width: 10px; height: 10px; }
.tw-t-ring { grid-template-columns: auto auto; column-gap: 5px; align-items: center; }
.tw-t-ring .tw-ring { width: 22px; height: 22px; --fill: var(--p); background: conic-gradient(#16a36a calc(var(--fill) * 1%), #e8e8ee 0); }
.tw-t-ring b { color: #1f1f1f !important; }
.tw-t-card.is-lav { background: #ece4f7; }
.tw-t-card.is-sky { background: #e1ecf7; }

.tw-t-band { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; align-items: center; padding: 18px 22px; border-top: 1px solid var(--ui-line); border-bottom: 1px solid var(--ui-line); background: var(--ui-bg); }
.ui.is-12t .tw-t-h { font-size: 19px; line-height: 1.2; font-weight: 500; letter-spacing: -.3px; color: var(--ui-ink); }
.tw-t-band > div { display: grid; gap: 10px; justify-items: start; font-size: 10.5px; color: var(--ui-ink-2); }
.tw-t-band .tw-s-btn { display: inline-flex; align-items: center; gap: 6px; }
.tw-t-band .tw-s-btn .i { width: 11px; height: 11px; }

.tw-t-steps { display: grid; gap: 6px; }
.tw-t-step { position: relative; display: grid; grid-template-columns: auto 1fr; column-gap: 10px; padding: 9px 10px; border-radius: 8px; font-size: 10px; color: var(--ui-ink-3); transition: background .4s ease, box-shadow .4s ease; }
.tw-t-step > span { grid-row: span 3; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: var(--ui-sunken); color: var(--ui-ink-3); transition: background .4s ease, color .4s ease; }
.tw-t-step > span .i { width: 14px; height: 14px; }
.tw-t-step em { font-style: normal; font-size: 8.5px; font-weight: 700; letter-spacing: .08em; color: var(--ui-ink-3); }
.tw-t-step b { font-size: 11.5px; color: var(--ui-ink-2); }
.tw-t-step.is-on { background: var(--ui-bg); box-shadow: 0 1px 3px rgba(15, 15, 40, .08); color: var(--ui-ink-2); }
.tw-t-step.is-on > span { background: var(--tw-soft); color: var(--ui-accent); }
.tw-t-step.is-on em { color: var(--ui-accent); }
.tw-t-step.is-on b { color: var(--ui-ink); }

.tw-t-why { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tw-t-why > div { padding: 11px 12px; border-radius: 6px; font-size: 9.5px; line-height: 1.4; color: #4b4b55; transition: transform .45s cubic-bezier(.2, .8, .2, 1), box-shadow .45s ease; }
.tw-t-why b { display: block; margin-bottom: 3px; font-size: 11px; color: #1f1f1f; }
.tw-t-why .is-peach { background: #f9e7dc; }
.tw-t-why .is-lav { background: #ece4f7; }
.tw-t-why .is-mint { background: #e1f3e8; }
.tw-t-why .is-sky { background: #e1ecf7; }
.tw-t-why > div.is-on { transform: translateY(-3px); box-shadow: 0 10px 20px -12px rgba(20, 20, 60, .45); }

/* --- Home ----------------------------------------------------------------- */

.tw-h-body { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 22px; padding: 22px; background: var(--ui-panel); }
.tw-h-360 { padding: 16px; border-radius: 10px; background: var(--tw-ink-dark); color: #f4f4f6; }
.tw-h-k { display: inline-block; padding: 3px 8px; border-radius: 99px; background: rgba(255, 255, 255, .1); font-size: 8.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.ui.is-12t .tw-h-h { margin: 8px 0 14px; font-size: 17px; line-height: 1.2; font-weight: 500; letter-spacing: -.2px; }
.tw-h-sum { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.tw-h-sum > span { display: inline-flex; align-items: center; gap: 5px; padding: 6px 10px; border-radius: 99px; border: 1px dashed rgba(255, 255, 255, .25); color: rgba(255, 255, 255, .45); font-size: 10px; transition: background .4s ease, color .4s ease, border-color .4s ease, transform .4s cubic-bezier(.2, .8, .2, 1); }
.tw-h-sum > span .i { width: 11px; height: 11px; }
.tw-h-sum > span.is-on { border: 1px solid #8a86ff; background: rgba(138, 134, 255, .18); color: #fff; }
.tw-h-sum > span.is-now { transform: scale(1.06); }
.tw-h-sum em { font-style: normal; font-size: 11px; color: rgba(255, 255, 255, .4); }
.tw-h-twin { display: flex; align-items: center; gap: 10px; margin-top: 14px; padding: 10px 12px; border-radius: 10px; background: #3a36db; opacity: .25; transform: translateY(6px) scale(.98); transition: opacity .5s ease, transform .6s cubic-bezier(.2, .8, .2, 1); }
.tw-h-twin.is-on { opacity: 1; transform: none; }
.tw-h-twin-av { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; background: rgba(255, 255, 255, .16); }
.ui.is-12t .tw-h-twin-av svg { width: 16px; height: 22px; color: #fff; }
.tw-h-twin small { display: block; font-size: 9px; opacity: .8; }
.tw-h-twin b { font-size: 13.5px; }

.tw-faq { border-bottom: 1px solid var(--ui-line); }
.tw-faq > b { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 0; font-size: 11.5px; font-weight: 600; }
.tw-faq > b i { position: relative; flex: none; width: 10px; height: 10px; }
.tw-faq > b i::before,
.tw-faq > b i::after { content: ""; position: absolute; left: 0; top: 4px; width: 10px; height: 1.6px; border-radius: 1px; background: var(--ui-ink-2); transition: transform .35s ease; }
.tw-faq > b i::after { transform: rotate(90deg); }
.tw-faq > div { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .5s cubic-bezier(.65, 0, .35, 1); }
.ui.is-12t .tw-faq > div > p { overflow: hidden; font-size: 10.5px; line-height: 1.5; color: var(--ui-ink-2); }
.tw-faq.is-on:not(:has(~ .tw-faq.is-on)) > div { grid-template-rows: 1fr; }
.tw-faq.is-on:not(:has(~ .tw-faq.is-on)) > div > p { padding-bottom: 10px; }
.tw-faq.is-on:not(:has(~ .tw-faq.is-on)) > b { color: var(--ui-accent); }
.tw-faq.is-on:not(:has(~ .tw-faq.is-on)) > b i::after { transform: rotate(0deg); }

.tw-h-cta { display: grid; grid-template-columns: minmax(0, 1fr) 180px auto; gap: 10px; align-items: center; padding: 16px 22px; background: #e1ecf7; color: #1f1f1f; }
.tw-h-cta b { display: block; font-size: 13px; }
.tw-h-cta small { font-size: 9.5px; color: #4b4b55; }
.tw-h-input { padding: 7px 10px; border-radius: 3px; background: #fff; border: 1px solid #d5dce6; font-size: 10px; color: #8a8a94; }

@media screen and (max-width: 991px) {
  .tw-t-hero { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media screen and (max-width: 767px) {
  .tw-m-row { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 4px 14px; margin: -4px; }
  .tw-m-row > .vt-phone { scroll-snap-align: center; }
  .tw-t-band, .tw-h-body, .tw-h-cta { grid-template-columns: minmax(0, 1fr); }
  .tw-t-hero { padding: 12px; }
  .tw-t-card.is-photo { min-height: 170px; }
}
