/* Pages: home, category, term, glossary, comparisons, cases, Shark Tank
   simulator, calculators, quiz and learning path, then the content widgets. */

/* ------------------------------------------------------------------ home: hero */

/* The page ground shows through; two brand glows and a faint paper grid frame the title. */
.hero {
  position: relative;
  margin-bottom: 26px;
  padding: 44px 40px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--grad-a) 28%, var(--border));
  border-radius: 24px;
  background:
    radial-gradient(900px 420px at 100% -20%, color-mix(in srgb, var(--grad-b) 16%, transparent), transparent 60%),
    radial-gradient(800px 380px at 0% 120%, color-mix(in srgb, var(--grad-a) 20%, transparent), transparent 60%),
    color-mix(in srgb, var(--surface) 88%, transparent);
  box-shadow: var(--shadow-glow);
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--paper-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--paper-grid) 1px, transparent 1px);
  background-size: 40px 40px;
  -webkit-mask-image: radial-gradient(70% 90% at 85% 10%, #000, transparent 75%);
  mask-image: radial-gradient(70% 90% at 85% 10%, #000, transparent 75%);
  pointer-events: none;
}

.hero > * {
  position: relative;
  z-index: 1;
}

/* Eyebrow: the site's quiet teal pill that names a section. */
.hero .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  margin-bottom: 16px;
  padding: 0.3rem 0.85rem;
  border: 1px solid color-mix(in srgb, var(--teal) 32%, transparent);
  border-radius: var(--r-pill);
  background: var(--teal-soft);
  color: var(--teal);
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.5;
}

.hero h1 {
  margin-bottom: 10px;
  font-size: clamp(1.75rem, 3.8vw, 2.75rem);
  font-weight: 800;
}

.hero .sub {
  max-width: 640px;
  margin-bottom: 24px;
  color: var(--text-2);
  font-size: clamp(1rem, 1.6vw, 1.18rem);
}

.hero .sub .ltr {
  padding: 0 6px;
  border-radius: 6px;
  background: var(--highlight-wash);
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.88em;
}

/* ------------------------------------------------------------------ home: stats, sections, path, tools */

.stat {
  display: flex;
  align-items: center;
  gap: 14px;
}

.stat .ico {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  flex: none;
  border-radius: 14px;
  background: var(--primary-soft);
  color: var(--primary-text);
}

.stat .v {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.3;
  font-variant-numeric: tabular-nums;
}

.stat .l {
  color: var(--muted);
  font-size: 0.82rem;
}

.stat.s-accent .ico { background: var(--ok-soft); color: var(--ok); }
.stat.s-warn .ico { background: var(--warn-soft); color: var(--warn-text); }
.stat.s-info .ico { background: var(--info-soft); color: var(--info-text); }

.sec-h {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 34px 0 14px;
}

.sec-h h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
}

.sec-h h2 .ic { color: var(--primary); }

.sec-h .more {
  font-size: 0.88rem;
  font-weight: 600;
}

.path-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
}

.path-item .n {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: none;
  border-radius: 11px;
  background: var(--primary-soft);
  color: var(--primary-text);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.path-item.full .n {
  background: var(--ok);
  color: var(--ok-ink);
}

.path-item .t { font-weight: 700; }

.path-item .s {
  color: var(--muted);
  font-size: 0.8rem;
  direction: ltr;
  text-align: right;
}

.path-item .body {
  flex: 1;
  min-width: 0;
}

.path-item .bar {
  height: 6px;
  margin-top: 8px;
}

.path-item .pct {
  min-width: 40px;
  color: var(--muted);
  font-size: 0.8rem;
  font-variant-numeric: tabular-nums;
  text-align: left;
}

.tool {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.tool .ico {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  flex: none;
  border-radius: 14px;
  color: #fff;
}

.tool .t {
  margin-bottom: 2px;
  font-weight: 700;
}

.tool .d {
  color: var(--muted);
  font-size: 0.86rem;
}

.home-note {
  margin-top: 28px;
}

/* ------------------------------------------------------------------ category page */

.cat-head {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 18px;
}

.cat-head .ico {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  flex: none;
  border-radius: 18px;
  color: #fff;
  box-shadow: var(--shadow);
}

.cat-head h1 { margin-bottom: 2px; }

.cat-head .en {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.9rem;
  direction: ltr;
  text-align: right;
}

.cat-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
}

.cat-meta .bar {
  flex: 1;
  min-width: 120px;
}

.cat-desc {
  color: var(--text-2);
  font-size: 1.05rem;
}

.group-h {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 26px 0 12px;
  font-size: 1.05rem;
}

.group-h::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

.intro {
  margin-bottom: 22px;
  padding: 22px 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--surface) 90%, transparent);
}

.intro h3 { margin-top: 1.2em; }
.intro h3:first-child { margin-top: 0; }
.intro h4 { margin-top: 1em; }

/* ------------------------------------------------------------------ term page */

.term-head {
  margin-bottom: 16px;
  padding: 22px 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  box-shadow: var(--shadow-sm);
}

.term-head .titles {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 14px;
}

.term-head h1 { margin: 0; }

.term-head .en {
  color: var(--primary-text);
  font-family: var(--mono);
  font-size: 1.1rem;
  direction: ltr;
}

.term-head .short {
  margin: 10px 0 14px;
  color: var(--text-2);
  font-size: 1.05rem;
}

.term-head .meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.term-nav {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 26px;
}

.term-nav a {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
}

.term-nav a:hover {
  border-color: color-mix(in srgb, var(--primary) 55%, var(--border));
  text-decoration: none;
}

.term-nav a .lbl {
  display: block;
  color: var(--muted);
  font-size: 0.76rem;
}

.term-nav a .t {
  display: block;
  font-weight: 700;
}

.term-nav a.next {
  justify-content: flex-end;
  text-align: left;
}

.term-nav a .en {
  display: block;
  color: var(--muted);
  font-size: 0.76rem;
  direction: ltr;
}

.rel-chips a { text-decoration: none; }

.sticky-actions {
  position: sticky;
  bottom: 16px;
  display: flex;
  justify-content: center;
  pointer-events: none;
}

/* ------------------------------------------------------------------ glossary */

.filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 14px 0 18px;
}

.filters input,
.filters select {
  height: 42px;
  border: 1px solid var(--border-2);
  border-radius: var(--r-md);
  background: var(--surface);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.filters input {
  flex: 1;
  min-width: min(220px, 100%);
  padding: 0 14px;
}

.filters select {
  max-width: 100%;
  padding: 0 12px;
}

.filters input:focus,
.filters select:focus {
  border-color: var(--primary);
  box-shadow: var(--focus-ring);
}

.alpha {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 18px;
  direction: ltr;
}

.alpha button {
  min-width: 32px;
  height: 32px;
  padding: 0 6px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface);
  color: var(--text-2);
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 700;
  transition: border-color 0.15s, color 0.15s;
}

.alpha button:hover:not(:disabled):not(.on) {
  border-color: color-mix(in srgb, var(--primary) 55%, var(--border));
  color: var(--primary-text);
}

.alpha button.on {
  border-color: transparent;
  background: var(--brand-gradient);
  color: var(--on-btn);
}

.alpha button:disabled {
  opacity: 0.35;
  cursor: default;
}

.letter-h {
  margin: 24px 0 10px;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--primary-soft);
  color: var(--primary-text);
  font-family: var(--mono);
  font-size: 1.5rem;
  font-weight: 700;
  direction: ltr;
  text-align: left;
}

.gcard {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px;
}

.gcard .en {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--primary-text);
  font-family: var(--mono);
  font-size: 0.95rem;
  font-weight: 700;
  direction: ltr;
  text-align: right;
}

.gcard .ar {
  font-size: 1.02rem;
  font-weight: 700;
}

.gcard .def {
  color: var(--text-2);
  font-size: 0.88rem;
}

.gcard .cat { margin-top: auto; }

/* ------------------------------------------------------------------ comparisons */

.cmp-index { margin-bottom: 20px; }
.cmp-card { margin-bottom: 18px; }

.cmp-h {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.cmp-h .vs {
  padding: 4px 12px;
  border-radius: 99px;
  background: var(--primary-soft);
  color: var(--primary-text);
  font-family: var(--mono);
  font-weight: 700;
  direction: ltr;
}

.cmp-sum { margin-top: 10px; }

/* ------------------------------------------------------------------ tabs (cases, calculators) */

.calc-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.calc-tabs button,
.calc-tabs a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface);
  color: var(--text-2);
  font-size: 0.86rem;
  font-weight: 600;
  text-decoration: none;
  transition: border-color 0.15s, color 0.15s;
}

.calc-tabs button:hover,
.calc-tabs a:hover {
  border-color: color-mix(in srgb, var(--primary) 55%, var(--border));
  color: var(--primary-text);
  text-decoration: none;
}

/* The open tab wears the brand gradient. */
.calc-tabs button.on,
.calc-tabs a.on {
  border-color: transparent;
  background: var(--brand-gradient);
  color: var(--on-btn);
}

/* ------------------------------------------------------------------ cases */

.case-head {
  display: flex;
  align-items: center;
  gap: 16px;
}

.case-head .ico {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  flex: none;
  border-radius: 16px;
  color: #fff;
}

.case-story { margin-top: 14px; }
.case-h { margin-top: 20px; }

/* The English name beside an Arabic title. */
.en-tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.9rem;
  direction: ltr;
}

.en-tag-sm { font-size: 0.85rem; }

.fin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin: 16px 0;
}

.kpi {
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface-2);
}

.kpi .l {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.78rem;
}

.kpi .l .en {
  font-family: var(--mono);
  font-size: 0.72rem;
  direction: ltr;
}

.kpi .v {
  margin-top: 2px;
  font-size: 1.15rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  direction: ltr;
  text-align: right;
}

.kpi .v.pos { color: var(--ok); }
.kpi .v.neg { color: var(--danger-text); }

.kpi .h {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.74rem;
}

.qa {
  margin: 10px 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
}

.qa-q {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: var(--surface-2);
  font-weight: 600;
  cursor: pointer;
}

.qa-q:hover {
  background: color-mix(in srgb, var(--primary-soft) 60%, var(--surface-2));
}

.qa-q:focus-visible {
  box-shadow: var(--focus-ring-inset);
}

.qa-q .chev {
  margin-inline-start: auto;
  color: var(--muted);
  transition: transform 0.2s;
}

.qa.open .qa-q .chev { transform: rotate(180deg); }

.qa-a {
  display: none;
  padding: 12px 16px;
  color: var(--text-2);
}

.qa.open .qa-a { display: block; }

/* ------------------------------------------------------------------ Shark Tank simulator */

.pitch {
  position: relative;
  margin: 14px 0;
  padding: 20px 22px;
  border: 1px solid color-mix(in srgb, var(--info) 35%, var(--border));
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--info-soft), var(--surface));
}

.pitch .who {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  color: var(--info-text);
  font-weight: 700;
}

.pitch .who .av {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--info);
  color: var(--on-info);
  font-weight: 700;
}

.pitch .say {
  color: var(--text);
  font-size: 1.08rem;
}

.pitch.shark {
  border-color: color-mix(in srgb, var(--warn) 40%, var(--border));
  background: linear-gradient(135deg, var(--warn-soft), var(--surface));
}

.pitch.shark .who { color: var(--warn-text); }

.pitch.shark .who .av {
  background: var(--warn);
  color: var(--on-warn);
}

.shark-context { margin: 12px 0; }

.answers {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin: 12px 0;
}

.scenario-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.scenario-list button,
.scenario-list a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface);
  color: var(--text-2);
  font-size: 0.84rem;
  font-weight: 600;
  text-decoration: none;
  transition: border-color 0.15s, color 0.15s;
}

.scenario-list button:hover,
.scenario-list a:hover {
  border-color: color-mix(in srgb, var(--primary) 55%, var(--border));
  color: var(--primary-text);
  text-decoration: none;
}

.scenario-list button.done,
.scenario-list a.done {
  border-color: var(--ok);
}

.scenario-list button.done .ic,
.scenario-list a.done .ic {
  color: var(--ok);
}

/* The open scenario wears the brand gradient. */
.scenario-list button.on,
.scenario-list a.on,
.scenario-list a.on:hover {
  border-color: transparent;
  background: var(--brand-gradient);
  color: var(--on-btn);
}

.scenario-list a.on .ic { color: inherit; }

/* ------------------------------------------------------------------ calculators */

.calc-title { margin-bottom: 4px; }

.calc {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 18px;
}

.calc .inputs {
  display: grid;
  align-content: start;
  gap: 14px;
}

.calc .out {
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--surface-2);
}

.calc .out .r {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--border-2);
}

.calc .out .r:last-of-type { border-bottom: 0; }

.calc .out .r .l {
  color: var(--text-2);
  font-size: 0.9rem;
}

.calc .out .r .v {
  font-size: 1.2rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  direction: ltr;
}

/* The headline result in the brand's gradient ink. */
.calc .out .r .v.big {
  font-size: 1.5rem;
  background-image: var(--text-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.calc .out .r .v.big small {
  -webkit-text-fill-color: var(--muted);
}

.calc .note {
  margin-top: 12px;
  font-size: 0.92rem;
}

/* ------------------------------------------------------------------ quiz */

.quiz-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

.quiz-top .bar {
  flex: 1;
  min-width: 160px;
}

.quiz-intro { padding: 36px; }
.quiz-result { padding: 30px; }
.review-h { margin-top: 24px; }
.quiz-next-row { margin-top: 14px; }

.q-card { padding: 24px; }

.q-card .q {
  margin-bottom: 16px;
  font-size: 1.12rem;
  font-weight: 700;
}

.q-card .explain { margin-top: 14px; }

.review-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 8px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: color-mix(in srgb, var(--surface) 90%, transparent);
}

.review-item.ok { border-color: color-mix(in srgb, var(--ok) 50%, var(--border)); }
.review-item.ok > .ic { color: var(--ok); }
.review-item.bad { border-color: color-mix(in srgb, var(--danger) 50%, var(--border)); }
.review-item.bad > .ic { color: var(--danger-text); }

/* ------------------------------------------------------------------ learning path */

.path-summary { margin-bottom: 20px; }
.path-summary .bar { margin-top: 12px; }

.level { margin-bottom: 18px; }

.level-h {
  display: flex;
  align-items: center;
  gap: 14px;
}

.level-h .n {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: none;
  border-radius: 14px;
  color: #fff;
  font-size: 1.05rem;
  font-weight: 700;
}

.level-h .t {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
}

.level-h .s {
  color: var(--muted);
  font-size: 0.82rem;
  direction: ltr;
  text-align: right;
}

.level-h .pct {
  margin-inline-start: auto;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.level-desc { margin: 8px 0 0; }
.level-cats { margin-top: 10px; }

.lesson-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(230px, 100%), 1fr));
  gap: 8px;
  margin-top: 14px;
}

.lesson {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--bg);
  color: var(--text);
  font-size: 0.9rem;
  transition: border-color 0.15s, background 0.15s;
}

.lesson:hover {
  border-color: var(--primary);
  background: var(--surface);
  text-decoration: none;
}

.lesson .box {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  flex: none;
  border: 2px solid var(--border-2);
  border-radius: 6px;
  color: var(--ok-ink);
}

.lesson.done .box {
  border-color: var(--ok);
  background: var(--ok);
}

.lesson.viewed:not(.done) .box { border-color: var(--amber); }

.lesson .en {
  margin-inline-start: auto;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.72rem;
  direction: ltr;
}

/* ------------------------------------------------------------------ widgets (in section intros) */

.captable {
  display: grid;
  gap: 10px;
  margin: 14px 0;
}

.ct-bar {
  display: flex;
  height: 38px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
}

.ct-bar > div {
  display: grid;
  place-items: center;
  overflow: hidden;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
}

.ct-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.84rem;
}

.ct-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.ct-legend i {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 3px;
}

/* Cap-table owners: deep stops that keep white labels readable in both themes. */
.c1 { background: #4f46e5; }
.c2 { background: #7c3aed; }
.c3 { background: #047857; }
.c4 { background: #b45309; }
.c5 { background: #0e7490; }
.c6 { background: #b91c1c; }

.bs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 14px 0;
}

.bs .col {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface);
}

.bs .col h4 {
  display: flex;
  justify-content: space-between;
  margin: 0;
  padding: 10px 14px;
  background: var(--surface-2);
}

.bs .row {
  display: flex;
  justify-content: space-between;
  padding: 8px 14px;
  border-top: 1px solid var(--border);
  font-size: 0.9rem;
}

.bs .row.sub {
  padding-inline-start: 26px;
  color: var(--muted);
}

.bs .row.total {
  background: var(--primary-soft);
  color: var(--primary-text);
  font-weight: 700;
}

.bs .row .num { direction: ltr; }

.timeline {
  position: relative;
  display: grid;
  gap: 0;
  margin: 14px 0;
  padding-inline-start: 26px;
}

.timeline::before {
  content: "";
  position: absolute;
  inset-block: 8px;
  inset-inline-start: 9px;
  width: 2px;
  background: linear-gradient(180deg, var(--grad-a), var(--grad-b) 55%, var(--grad-c));
  opacity: 0.55;
}

.tl-item {
  position: relative;
  padding: 6px 0 14px;
}

.tl-item::before {
  content: "";
  position: absolute;
  inset-inline-start: -23px;
  top: 12px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-soft);
}

.tl-item .t { font-weight: 700; }

.tl-item .d {
  color: var(--text-2);
  font-size: 0.88rem;
}

.flow {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(160px, 100%), 1fr));
  gap: 10px;
  margin: 14px 0;
}

.flow .step {
  position: relative;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface-2);
  text-align: center;
}

.flow .step b { display: block; }

.flow .step small {
  display: block;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.72rem;
  direction: ltr;
}

.flow .step .v {
  color: var(--primary-text);
  font-weight: 700;
  direction: ltr;
}

/* Sales funnel: each stage's bar narrows in the brand gradient. */
.funnel-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.funnel-label {
  width: 130px;
  font-size: 0.9rem;
  font-weight: 600;
}

.funnel-en {
  display: block;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.72rem;
  direction: ltr;
  text-align: right;
}

.funnel-track { flex: 1; }

.funnel-bar {
  display: grid;
  place-items: center;
  height: 30px;
  border-radius: 8px;
  background: var(--brand-gradient);
  color: var(--on-btn);
  font-size: 0.8rem;
  font-weight: 700;
}

.funnel-pct {
  width: 60px;
  color: var(--muted);
  font-size: 0.85rem;
}

/* TAM / SAM / SOM: three nested circles (size and colour come from the widget). */
.tss {
  position: relative;
  max-width: 320px;
  height: 300px;
  margin: 14px auto;
}

.tss-circle {
  position: absolute;
  bottom: 0;
  left: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding-top: 14px;
  border-radius: 50%;
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  transform: translateX(-50%);
}

.tss-circle code {
  border: 0;
  background: rgb(255 255 255 / 0.2);
  color: #fff;
}

.tss-value {
  font-size: 0.8rem;
  opacity: 0.9;
}

/* ------------------------------------------------------------------ breakpoints */

@media (max-width: 1100px) {
  .calc { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  h1 { font-size: 1.55rem; }

  .hero {
    padding: 30px 20px;
    border-radius: 18px;
  }

  .term-nav { flex-direction: column; }

  .term-nav a.next {
    justify-content: flex-start;
    text-align: right;
  }

  .bs { grid-template-columns: 1fr; }

  .cat-head .ico {
    width: 52px;
    height: 52px;
  }

  .panel-b,
  .term-head,
  .intro,
  .card {
    padding-inline: 16px;
  }

  .quiz-intro,
  .quiz-result {
    padding-inline: 16px;
  }
}
