/* The Ikoyi Equation. Everything is scoped to .ieq so it cannot clash with site.css or Bricks.
   Fonts come from the site (Playfair Display, Hanken Grotesk); nothing is loaded here.
   The equation bar sticks just below the site's sticky header (#brx-header), using the header
   height tokens from site.css Part 2b (--df-bar-h, --df-adminbar-h). Without them it sticks at the top.
   Don't place the shortcode inside a section with overflow: hidden (e.g. .phero, .cta): that disables sticky. */

.ieq {
  --ink: #073b37; --deep: #052f2c; --teal: #08736d; --gold: #fbae41; --gold-text: #9a6512;
  --paper: #f7f6f1; --surface: #ffffff; --tint: #edf0e9; --text: #1b302d; --muted: #536661;
  --line: #dfe5df; --usd: #3d6f9e; --naira: #8a6a3a; --bad: #a3402e;
  --serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --sans: 'Hanken Grotesk', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
  --ieq-sticky-top: calc(var(--df-bar-h, 0px) + var(--df-adminbar-h, 0px));
  background: var(--paper); color: var(--text); font: 400 17px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased; scroll-margin-top: var(--ieq-sticky-top);
}
.ieq *, .ieq *::before, .ieq *::after { box-sizing: border-box; }
.ieq button, .ieq input, .ieq select { font: inherit; color: inherit; }
.ieq :focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.ieq p { margin: 0; }
.ieq .ieq-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ieq [hidden] { display: none !important; }
.ieq-preview { background: var(--gold); color: #052f2c; font-size: .82rem; text-align: center; padding: .45rem 1rem; margin: 0; }
.dfie-soon { text-align: center; padding: 3rem 1rem; }

/* Equation bar: the signature element */
/* The bar's background runs the full screen width, like the header above it, while its content stays
   in the column. Shadows paint the edges and clip-path trims them to the bar's height: no sideways scrolling. */
.ieq .ieq-eqbar { position: sticky; top: var(--ieq-sticky-top); z-index: 10; background: var(--surface);
  box-shadow: 0 0 0 100vmax var(--surface), 0 1px 0 100vmax var(--line); clip-path: inset(0 -100vmax -1px); }
.ieq .ieq-eqbar-in { max-width: 980px; margin: 0 auto; padding: .7rem 1rem; display: flex; align-items: baseline; justify-content: center; gap: .55rem; overflow-x: auto; scrollbar-width: none; }
.ieq .ieq-term { display: flex; flex-direction: column; align-items: center; min-width: 0; white-space: nowrap; }
.ieq .ieq-term b { font: 400 1.05rem var(--serif); color: var(--muted); transition: color .4s; }
.ieq .ieq-term small { font-size: .7rem; color: var(--muted); max-width: 17ch; overflow: hidden; text-overflow: ellipsis; min-height: 1.1em; }
.ieq .ieq-term.ieq-on b { color: var(--ink); }
.ieq .ieq-term.ieq-on small { color: var(--teal); font-weight: 600; }
.ieq .ieq-term.ieq-now b { color: var(--ink); text-decoration: underline 2px var(--gold); text-underline-offset: 5px; }
.ieq .ieq-op { font: 400 1.1rem var(--serif); color: var(--muted); }
.ieq .ieq-term-result b { font-style: italic; }
.ieq .ieq-term-result.ieq-on b { color: var(--gold-text); }

.ieq .ieq-main { max-width: 760px; margin: 0 auto; padding: 2.2rem 1.2rem 5rem; }
.ieq .ieq-screen { display: none; }
.ieq .ieq-screen.ieq-on { display: block; }
.ieq:not(.ieq-js) #ieq-s-method { display: block; margin-top: 3rem; }   /* readable without JavaScript */
.ieq:not(.ieq-js) #ieq-method-back, .ieq:not(.ieq-js) .ieq-acts button, .ieq:not(.ieq-js) .ieq-facts button, .ieq:not(.ieq-js) .ieq-eqbar { display: none; }
.ieq h1, .ieq h2, .ieq h3 { font-family: var(--serif); font-weight: 500; color: var(--ink); letter-spacing: -.02em; line-height: 1.12; margin: 0; text-transform: none; }
.ieq h1 { font-size: clamp(2.6rem, 8vw, 4.2rem); }
.ieq h2 { font-size: clamp(1.7rem, 5vw, 2.4rem); }
.ieq h3 { font-size: 1.25rem; }
.ieq h1:focus, .ieq h2:focus { outline: none; }
.ieq .ieq-lede { font-size: 1.12rem; color: var(--muted); max-width: 54ch; margin-top: 1.1rem; }
.ieq .ieq-lede-tight { margin-top: .5rem; }
.ieq .ieq-gap { margin-top: 2rem; }
.ieq .ieq-step { color: var(--teal); font-weight: 600; font-size: .9rem; margin-bottom: .7rem; }
.ieq .ieq-note { font-size: .86rem; color: var(--muted); margin-top: .9rem; }
.ieq .ieq-nowrap { white-space: nowrap; }

/* Buttons */
.ieq .ieq-btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 48px; padding: .8rem 1.35rem; border: 1px solid var(--ink); border-radius: 2px; background: var(--ink); color: var(--paper); font-weight: 600; font-size: 1rem; line-height: 1.3; cursor: pointer; text-decoration: none; }
.ieq .ieq-btn:hover { background: var(--teal); border-color: var(--teal); color: var(--paper); }
.ieq .ieq-btn.ieq-gold { background: var(--gold); border-color: var(--gold); color: #052f2c; }
.ieq .ieq-btn.ieq-gold:hover { filter: brightness(1.05); }
.ieq .ieq-btn.ieq-ghost { background: transparent; color: var(--ink); }
.ieq .ieq-btn.ieq-ghost:hover { background: var(--tint); }
.ieq .ieq-btn:disabled { opacity: .45; cursor: not-allowed; }
.ieq .ieq-acts { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.8rem; }
.ieq .ieq-linkbtn { background: none; border: 0; padding: 0; color: var(--teal); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; font-size: inherit; }

/* Intro */
.ieq .ieq-intro h1, .ieq .ieq-intro h2 { max-width: 12ch; }
.ieq .ieq-formula { font: 400 clamp(1.1rem, 3.4vw, 1.5rem) var(--serif); color: var(--ink); margin-top: 1.6rem; border-left: 3px solid var(--gold); padding-left: 1rem; }
.ieq .ieq-how { margin: 1.4rem 0 0; padding-left: 1.3rem; max-width: 52ch; }
.ieq .ieq-how li { margin-bottom: .35rem; }
.ieq .ieq-how b { color: var(--ink); }
.ieq .ieq-facts { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; margin-top: 1.4rem; color: var(--muted); font-size: .92rem; }

/* Quiz and skip */
.ieq .ieq-qcount { color: var(--muted); font-size: .9rem; margin-bottom: .6rem; }
.ieq .ieq-choices { display: grid; gap: .6rem; margin-top: 1.5rem; }
.ieq .ieq-choices label { display: grid; gap: .3rem; font-weight: 600; color: var(--ink); }
.ieq .ieq-choice { text-align: left; padding: 1rem 1.1rem; border: 1px solid var(--line); border-radius: 3px; background: var(--surface); color: var(--text); cursor: pointer; line-height: 1.45; font-weight: 400; width: 100%; }
.ieq .ieq-choice:hover { border-color: var(--teal); }
.ieq .ieq-choice[aria-pressed="true"] { border-color: var(--ink); box-shadow: inset 4px 0 0 var(--gold); }
.ieq .ieq-choice span { display: block; font-size: .86rem; color: var(--muted); margin-top: .15rem; }
.ieq .ieq-progress { height: 3px; background: var(--line); margin-top: 1.6rem; }
.ieq .ieq-progress i { display: block; height: 100%; background: var(--gold); transition: width .35s; }

/* Profile */
.ieq .ieq-profile { margin-top: 1.4rem; padding: 1.6rem; background: var(--surface); border: 1px solid var(--line); border-top: 4px solid var(--gold); }
.ieq .ieq-profile h2 { margin-bottom: .6rem; }
.ieq .ieq-profile ul { margin: 1rem 0 0; padding-left: 1.1rem; color: var(--muted); }
.ieq .ieq-profile li + li { margin-top: .35rem; }

/* Guess */
.ieq .ieq-guess { margin-top: 1.6rem; padding: 1.5rem; background: var(--surface); border: 1px solid var(--line); }
.ieq .ieq-guess output { display: block; font: 500 3rem var(--serif); color: var(--ink); line-height: 1; margin-top: .4rem; }
.ieq input[type=range] { width: 100%; margin-top: 1rem; accent-color: var(--teal); height: 32px; }
.ieq .ieq-scale { display: flex; justify-content: space-between; font-size: .8rem; color: var(--muted); }
.ieq .ieq-setup { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: .8rem; margin-top: 1.4rem; }
.ieq .ieq-setup div { padding: .9rem 1rem; background: var(--tint); }
.ieq .ieq-setup b { display: block; font: 500 1.25rem var(--serif); color: var(--ink); }
.ieq .ieq-setup span { font-size: .84rem; color: var(--muted); }

/* Race */
.ieq .ieq-race { margin-top: 1.4rem; background: var(--surface); border: 1px solid var(--line); padding: 1rem 1rem .6rem; }
.ieq .ieq-race svg { display: block; width: 100%; height: auto; overflow: visible; }
.ieq .ieq-race .axis { stroke: var(--line); }
.ieq .ieq-race .tick { fill: var(--muted); font: 12px var(--sans); }
.ieq .ieq-legend { display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; font-size: .9rem; margin: .6rem 0 .2rem; }
.ieq .ieq-legend span::before { content: ""; display: inline-block; width: 14px; height: 3px; margin-right: .4rem; vertical-align: middle; background: currentColor; }
.ieq .ieq-l-prop { color: var(--teal); } .ieq .ieq-l-usd { color: var(--usd); } .ieq .ieq-l-ngn { color: var(--naira); }
.ieq .ieq-legend .ieq-dash::before { background: repeating-linear-gradient(90deg, currentColor 0 4px, transparent 4px 7px); }
.ieq .ieq-summary { margin-top: 1rem; font-size: 1.02rem; }
.ieq .ieq-summary strong { color: var(--ink); }
.ieq .ieq-table-wrap { overflow-x: auto; }
.ieq .ieq-table { width: 100%; border-collapse: collapse; margin-top: 1rem; font-size: .93rem; }
.ieq .ieq-table th, .ieq .ieq-table td { text-align: left; padding: .5rem .4rem; border-bottom: 1px solid var(--line); }
.ieq .ieq-table td:not(:first-child), .ieq .ieq-table th:not(:first-child) { text-align: right; font-variant-numeric: tabular-nums; }
.ieq .ieq-table th { font-weight: 600; color: var(--muted); font-size: .82rem; }

/* Waterfall */
.ieq .ieq-wf { margin-top: 1.4rem; display: grid; gap: .45rem; }
.ieq .ieq-wf-row { display: grid; grid-template-columns: minmax(120px, 34%) 1fr auto; align-items: center; gap: .8rem; font-size: .92rem; }
.ieq .ieq-wf-bar { height: 22px; background: var(--tint); position: relative; }
.ieq .ieq-wf-bar i { position: absolute; top: 0; bottom: 0; background: var(--teal); }
.ieq .ieq-wf-row.minus .ieq-wf-bar i { background: var(--bad); opacity: .75; }
.ieq .ieq-wf-row.total .ieq-wf-bar i { background: var(--ink); }
.ieq .ieq-wf-row .v { font-variant-numeric: tabular-nums; min-width: 6.5ch; text-align: right; }
.ieq .ieq-yields { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .8rem; margin-top: 1.4rem; }
.ieq .ieq-yields div { padding: 1rem; border: 1px solid var(--line); background: var(--surface); }
.ieq .ieq-yields b { display: block; font: 500 2rem var(--serif); color: var(--ink); line-height: 1.1; }
.ieq .ieq-yields span { font-size: .85rem; color: var(--muted); }
.ieq .ieq-yields .hl { border-color: var(--ink); box-shadow: inset 0 4px 0 var(--gold); }

/* What-if cards */
.ieq .ieq-card { margin-top: 1.4rem; padding: 1.6rem; background: var(--deep); color: #eef3ef; border-radius: 4px; }
.ieq .ieq-card .when { color: var(--gold); font-weight: 600; font-size: .9rem; }
.ieq .ieq-card h3 { color: #fff; font-size: 1.55rem; margin: .4rem 0 .6rem; }
.ieq .ieq-card p { color: #c9d8d3; }
.ieq .ieq-card .opts { display: grid; gap: .6rem; margin-top: 1.3rem; }
.ieq .ieq-card .opt { text-align: left; padding: .9rem 1rem; border: 1px solid rgba(255,255,255,.28); background: rgba(255,255,255,.05); color: #fff; border-radius: 3px; cursor: pointer; line-height: 1.45; width: 100%; }
.ieq .ieq-card .opt:hover { border-color: var(--gold); }
.ieq .ieq-card .opt:disabled { cursor: default; }
.ieq .ieq-card .opt.faded { opacity: .4; }
.ieq .ieq-card .opt span { display: block; font-size: .85rem; color: #b9cbc5; margin-top: .15rem; }
.ieq .ieq-card .outcome { margin-top: 1rem; padding: .9rem 1rem; border-left: 3px solid var(--gold); background: rgba(255,255,255,.06); color: #eef3ef; }
.ieq .ieq-card .ieq-btn { margin-top: 1rem; }
.ieq .ieq-dots { display: flex; gap: .4rem; margin-top: 1.2rem; }
.ieq .ieq-dots i { width: 28px; height: 4px; background: var(--line); }
.ieq .ieq-dots i.on { background: var(--gold); }

/* Result */
.ieq .ieq-result { margin-top: 1.4rem; background: var(--surface); border: 1px solid var(--line); border-top: 6px solid var(--ink); padding: 1.8rem 1.6rem; }
.ieq .ieq-eq { display: grid; gap: .1rem; }
.ieq .eqline { display: grid; grid-template-columns: 2.1rem 1fr; align-items: baseline; padding: .7rem 0; border-bottom: 1px solid var(--line); }
.ieq .eqline .sym { font: 400 1.4rem var(--serif); color: var(--gold-text); }
.ieq .eqline .lbl { font-size: .82rem; color: var(--muted); }
.ieq .eqline .val { display: block; font: 500 1.3rem var(--serif); color: var(--ink); line-height: 1.25; }
.ieq .eqline .val small { font-size: .55em; color: var(--muted); }
.ieq .eqline.final { border-bottom: 0; padding-top: 1rem; }
.ieq .eqline.final .val { font-size: clamp(1.8rem, 6vw, 2.5rem); }
.ieq .eqline.final .sub { display: block; color: var(--muted); font-size: .95rem; margin-top: .3rem; }
.ieq .ieq-badge { display: inline-block; margin-top: 1.2rem; padding: .3rem .7rem; font-size: .8rem; background: var(--tint); color: var(--muted); border-radius: 2px; }
.ieq .ieq-consider { margin-top: 1.4rem; padding: 1.1rem 1.2rem; background: var(--tint); }
.ieq .ieq-consider h3 { font-size: 1.05rem; margin-bottom: .35rem; }
.ieq .ieq-headline { margin-top: 0; margin-bottom: 1.2rem; padding: 1.1rem 1.2rem; background: var(--deep); color: #eef3ef; border-radius: 3px; font: 400 1.2rem/1.4 var(--serif); }
.ieq .ieq-headline strong { color: var(--gold); font-weight: 500; }
.ieq .ieq-takeaway { margin-top: 1.4rem; padding: 1rem 1.2rem; border-left: 4px solid var(--gold); background: var(--surface); }
.ieq .ieq-takeaway b { display: block; font-size: .8rem; color: var(--gold-text); margin-bottom: .2rem; }
.ieq .ieq-notify { margin-top: 2rem; padding-top: 1.4rem; border-top: 1px solid var(--line); }
.ieq .ieq-notify form { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: .8rem; }
.ieq .ieq-notify input { flex: 1 1 220px; min-height: 48px; padding: .7rem .9rem; border: 1px solid var(--line); background: var(--surface); border-radius: 2px; }
.ieq .ieq-disclaimer { margin-top: 2rem; font-size: .8rem; color: var(--muted); }
.ieq .ieq-compare { margin-top: 1.6rem; }
.ieq .ieq-compare h3 { margin-bottom: .3rem; }
.ieq .ieq-cmp { width: 100%; min-width: 520px; border-collapse: collapse; font-size: .92rem; margin-top: .8rem; }
.ieq .ieq-cmp th, .ieq .ieq-cmp td { padding: .6rem .5rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.ieq .ieq-cmp thead th { font-weight: 600; color: var(--muted); font-size: .82rem; }
.ieq .ieq-cmp td.n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ieq .ieq-cmp tr.you td:first-child { box-shadow: inset 4px 0 0 var(--gold); padding-left: .8rem; }
.ieq .ieq-cmp .conf { display: block; font-size: .75rem; color: var(--muted); }

/* Method */
.ieq .ieq-method-t { width: 100%; min-width: 560px; border-collapse: collapse; margin-top: 1rem; font-size: .9rem; }
.ieq .ieq-method-t th, .ieq .ieq-method-t td { text-align: left; padding: .55rem .4rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.ieq .ieq-method-t th { color: var(--muted); font-weight: 600; font-size: .8rem; }
.ieq .ieq-method h3 { margin-top: 2rem; }
.ieq .ieq-method ul { padding-left: 1.2rem; }
.ieq .ieq-pill { display: inline-block; padding: .1rem .45rem; border-radius: 2px; font-size: .72rem; font-weight: 600; background: var(--tint); color: var(--muted); white-space: nowrap; }
.ieq .ieq-pill.ieq-verified { background: #dbeee4; color: #1f5c3a; }
.ieq .ieq-pill.ieq-indicative { background: #fbeccc; color: #7a5410; }

.ieq .ieq-toast { position: fixed; left: 50%; bottom: calc(1.5rem + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); background: var(--ink); color: var(--paper); padding: .7rem 1.1rem; border-radius: 3px; font-size: .9rem; opacity: 0; pointer-events: none; transition: opacity .25s; z-index: 100; }
.ieq .ieq-toast.on { opacity: 1; }
.ieq .ieq-print-mark { display: none; margin-top: 1rem; font-size: .8rem; }

/* FAQ shortcode */
.ieq-faq { max-width: 760px; margin: 0 auto; }
.ieq-faq details { border-bottom: 1px solid var(--df-line, #dfe5df); padding: .9rem 0; }
.ieq-faq summary { cursor: pointer; font-weight: 600; color: var(--df-ink, #073b37); }
.ieq-faq details p { margin: .6rem 0 0; color: var(--df-text, #1b302d); }

@media (max-width: 560px) {
  .ieq { font-size: 16px; }
  .ieq .ieq-eqbar-in { justify-content: flex-start; gap: .4rem; padding: .55rem .8rem; }
  .ieq .ieq-term b { font-size: .92rem; }
  .ieq .ieq-term small { font-size: .64rem; max-width: 9ch; }
  .ieq .ieq-wf-row { grid-template-columns: 1fr auto; }
  .ieq .ieq-wf-row .ieq-wf-bar { grid-column: 1 / -1; grid-row: 2; }
  .ieq .ieq-result { padding: 1.4rem 1.1rem; }
}
@media (prefers-reduced-motion: reduce) {
  .ieq *, .ieq *::before, .ieq *::after { transition: none !important; animation: none !important; }
}

/* Print: only the result card, whatever the site template around it. */
@media print {
  html.ieq-printing body * { visibility: hidden !important; }
  html.ieq-printing #ieq-s-result, html.ieq-printing #ieq-s-result * { visibility: visible !important; }
  html.ieq-printing #ieq-s-result { position: absolute; left: 0; top: 0; width: 100%; }
  html.ieq-printing #ieq-s-result .ieq-acts, html.ieq-printing .ieq-notify, html.ieq-printing #ieq-shared-note,
  html.ieq-printing #ieq-s-result .ieq-linkbtn { display: none !important; }
  html.ieq-printing .ieq { background: #fff; }
  html.ieq-printing .ieq-eqbar { box-shadow: none; clip-path: none; }
  html.ieq-printing .ieq .ieq-print-mark { display: block; }
}
