/* =====================================================
   Doinp — shared site chrome
   "Soft Dark" system: slate-blue field, deep near-black
   panels, light tactile raised pills. Matte, soft, minimal.
   (Replaces the previous liquid-glass treatment.)
   ===================================================== */
:root {
  /* neutral near-black backdrop (flat, no gradient) */
  --bg-0: #1c1c1f;
  --bg-1: #151517;
  --bg-2: #0d0d0f;

  /* near-black surfaces */
  --surface-top: #1f1f23;
  --surface-bot: #141416;
  --surface-2:   #232327;   /* inset tracks / wells */
  --well:        #08080a;

  /* positive performance (profit / ROI) */
  --positive:     #3ad07f;
  --positive-glow: rgba(58, 208, 127, 0.35);

  /* crisp light raised pill (the tactile selector) */
  --raised-top: #f5f6f8;
  --raised-bot: #d4d7dd;

  /* neutral accent — brightness, not hue */
  --accent:     #c2c4cb;
  --accent-dim: #8d8f97;

  /* text */
  --cream:       #f5f6f8;            /* kept name so existing markup works */
  --cream-dim:   rgba(245, 246, 248, 0.55);
  --cream-faint: rgba(255, 255, 255, 0.07);

  /* hairlines */
  --hair:   rgba(255, 255, 255, 0.07);
  --hair-2: rgba(255, 255, 255, 0.12);

  /* legacy accent tokens remapped to neutral so any stray
     reference stays on-palette */
  --orange:   #c2c4cb;
  --orange-2: #d4d7dd;
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  min-height: 100%;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--cream);
  background-color: #0d0d0f;
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  position: relative;
  isolation: isolate;
  background: #0d0d0f;
}

a { color: inherit; }

/* ---------- NAVBAR : dark soft pill bar ---------- */
.nav {
  position: sticky;
  top: 14px;
  z-index: 50;
  margin: 14px auto 0;
  max-width: 1180px;
  width: calc(100% - 28px);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  padding: 10px 14px 10px 18px;
  border-radius: 24px;
  background: linear-gradient(180deg, var(--surface-top) 0%, var(--surface-bot) 100%);
  border: 1px solid var(--hair);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    inset 0 -1px 0 rgba(0, 0, 0, 0.4),
    0 24px 50px -28px rgba(0, 0, 0, 0.9);
}
.nav__brand {
  display: flex; align-items: center; gap: 12px;
  justify-self: start; text-decoration: none; color: var(--cream);
}
.nav__pfp {
  width: 44px; height: 44px;
  flex-shrink: 0;
  display: grid; place-items: center;
  overflow: hidden;
  border-radius: 12px;
  background: var(--well);
  border: 1px solid var(--hair-2);
}
.nav__pfp img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.nav__name { font-size: 16px; font-weight: 600; letter-spacing: 0.01em; }

/* inset dark track that holds the link pills */
.nav__links {
  justify-self: center;
  display: inline-flex; align-items: center; gap: 0;
  list-style: none; margin: 0; padding: 5px;
  background: linear-gradient(180deg, var(--well) 0%, #101012 100%);
  border: 1px solid rgba(0, 0, 0, 0.5);
  border-radius: 999px;
  box-shadow:
    inset 0 2px 6px rgba(0, 0, 0, 0.75),
    inset 0 -1px 0 rgba(255, 255, 255, 0.03);
}
.nav__links li { display: flex; }
.nav__links a {
  display: inline-flex; align-items: center; justify-content: center;
  line-height: 1;
  padding: 9px 16px 8px;
  border-radius: 999px;
  text-decoration: none;
  color: var(--cream-dim);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.05em;
  transition: color 180ms ease, background 180ms ease;
}
.nav__links a:hover { color: var(--cream); }
/* light tactile raised pill — the active selector */
.nav__links a.is-active {
  color: #15171c;
  background: linear-gradient(180deg, var(--raised-top) 0%, var(--raised-bot) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    inset 0 -2px 3px rgba(0, 0, 0, 0.12),
    0 5px 13px -4px rgba(0, 0, 0, 0.7);
}
.nav__links a.is-active:hover { color: #15171c; }

.nav__lang {
  justify-self: end;
  display: inline-flex; align-items: center;
  padding: 4px;
  background: linear-gradient(180deg, var(--well) 0%, #101012 100%);
  border: 1px solid rgba(0, 0, 0, 0.5);
  border-radius: 999px;
  position: relative;
  box-shadow:
    inset 0 2px 6px rgba(0, 0, 0, 0.75),
    inset 0 -1px 0 rgba(255, 255, 255, 0.03);
}
.nav__lang button {
  appearance: none; border: 0; background: transparent;
  color: var(--cream-dim);
  font-family: inherit; font-size: 13px; font-weight: 600;
  letter-spacing: 0.05em;
  display: inline-flex; align-items: center; justify-content: center;
  line-height: 1;
  padding: 9px 15px 8px; border-radius: 999px;
  cursor: pointer; position: relative; z-index: 1;
  transition: color 180ms ease;
}
.nav__lang button[aria-pressed="true"] { color: #15171c; }
.nav__lang::before {
  content: "";
  position: absolute;
  top: 4px; left: 4px;
  width: calc(50% - 4px);
  height: calc(100% - 8px);
  background: linear-gradient(180deg, var(--raised-top) 0%, var(--raised-bot) 100%);
  border-radius: 999px;
  transition: transform 220ms cubic-bezier(.4,.0,.2,1);
  z-index: 0;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    inset 0 -2px 3px rgba(0, 0, 0, 0.12),
    0 5px 13px -4px rgba(0, 0, 0, 0.7);
}
.nav__lang[data-lang="en"]::before { transform: translateX(100%); }

/* ---------- LAYOUT ---------- */
main {
  max-width: 1180px;
  margin: 0 auto;
  padding: 72px 40px 40px;
  display: flex; flex-direction: column;
  gap: 112px;
}

.eyebrow {
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--accent-dim);
  margin: 0 0 14px;
}
.section-head {
  display: flex; align-items: end; justify-content: space-between;
  gap: 24px; margin-bottom: 40px;
}
.section-head h2 {
  margin: 0;
  font-size: clamp(28px, 3.2vw, 40px);
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.1;
}
.section-head p {
  margin: 0;
  color: var(--cream-dim);
  font-size: 15px;
  max-width: 48ch;
  text-wrap: pretty;
}
.link-arrow {
  color: #e8e9ec;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
  transition: color 160ms ease;
}
.link-arrow:hover { color: #ffffff; }

/* ---------- HERO ---------- */
.hero {
  padding-top: 56px;
  padding-bottom: 24px;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 56px;
  align-items: center;
}
.hero h1 {
  font-size: clamp(40px, 6vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.025em;
  font-weight: 800;
  margin: 0 0 20px;
  color: var(--cream);
  text-wrap: balance;
}
.hero h1 em {
  color: #ffffff;
  font-style: normal;
}
.hero__lede {
  font-size: 17px;
  line-height: 1.55;
  color: var(--cream-dim);
  max-width: 52ch;
  margin: 0 0 28px;
  text-wrap: pretty;
}
.hero__ctas { display: flex; gap: 12px; flex-wrap: wrap; }

/* ---------- BUTTONS ---------- */
.btn {
  position: relative;
  display: inline-flex; align-items: center; gap: 9px;
  padding: 12px 22px;
  border-radius: 999px;
  font-family: inherit; font-size: 14px; font-weight: 600;
  letter-spacing: 0.01em;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 160ms ease, box-shadow 200ms ease,
              border-color 160ms ease, background 200ms ease;
}
.btn svg { width: 17px; height: 17px; flex-shrink: 0; }
/* primary = light tactile raised pill */
.btn--primary {
  background: linear-gradient(180deg, var(--raised-top) 0%, var(--raised-bot) 100%);
  color: #15171c;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    inset 0 -2px 3px rgba(0, 0, 0, 0.12),
    0 8px 20px -8px rgba(0, 0, 0, 0.65);
}
.btn--primary:hover {
  transform: translateY(-1px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 1),
    inset 0 -2px 3px rgba(0, 0, 0, 0.12),
    0 12px 26px -8px rgba(0, 0, 0, 0.8);
}
/* ghost = dark soft pill */
.btn--ghost {
  color: var(--cream);
  background: linear-gradient(180deg, var(--surface-2) 0%, var(--surface-bot) 100%);
  border-color: var(--hair-2);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 8px 20px -10px rgba(0, 0, 0, 0.6);
}
.btn--ghost:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 12px 26px -10px rgba(0, 0, 0, 0.7);
}

/* =====================================================
   SOFT PANEL — shared surface (class kept as .glass)
   ===================================================== */
.glass {
  position: relative;
  border-radius: 24px;
  background: linear-gradient(180deg, var(--surface-top) 0%, var(--surface-bot) 100%);
  border: 1px solid var(--hair);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 28px 56px -32px rgba(0, 0, 0, 0.9);
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 200ms ease;
}

/* KPI card */
.kpi-card { padding: 28px; }
.kpi-card__head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 24px;
}
.kpi-card__label {
  font-size: 12px; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--cream-dim);
}
.kpi-card__badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--cream-dim);
  padding: 4px 10px;
  border: 1px solid var(--hair-2);
  border-radius: 999px;
}
.kpi-card__badge::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(194, 196, 203, 0.16);
}
/* live values: hide the static fallback behind a shimmer until the
   real Google-Sheets numbers are bound (avoids a flash of stale data) */
[data-prophet-cell]:not(.is-resolved),
.win[data-prophet-pw]:not(.is-resolved) .win__profit,
.win[data-prophet-pw]:not(.is-resolved) .win__roi {
  color: transparent !important;
  border-radius: 8px;
  background-image: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.04) 25%,
    rgba(255, 255, 255, 0.11) 37%,
    rgba(255, 255, 255, 0.04) 63%
  );
  background-size: 400% 100%;
  animation: prophet-shimmer 1.4s ease infinite;
}
@keyframes prophet-shimmer {
  0%   { background-position: 100% 0; }
  100% { background-position: 0 0; }
}
@media (prefers-reduced-motion: reduce) {
  [data-prophet-cell]:not(.is-resolved),
  .win[data-prophet-pw]:not(.is-resolved) .win__profit,
  .win[data-prophet-pw]:not(.is-resolved) .win__roi { animation: none; }
}

/* sim pane: mask the static fallback numbers behind the same shimmer while
   the monthly Monte Carlo recomputes from the sheet */
.sim-pane.is-computing .sim__row-val {
  color: transparent !important;
  border-radius: 8px;
  background-image: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.04) 25%,
    rgba(255, 255, 255, 0.11) 37%,
    rgba(255, 255, 255, 0.04) 63%
  );
  background-size: 400% 100%;
  animation: prophet-shimmer 1.4s ease infinite;
}
@media (prefers-reduced-motion: reduce) {
  .sim-pane.is-computing .sim__row-val { animation: none; }
}

.kpi-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.kpi {
  padding: 16px 0;
  border-top: 1px solid var(--hair);
}
.kpi__value {
  font-size: 30px; font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--cream);
  line-height: 1;
}
.kpi--accent .kpi__value { color: #ffffff; }
/* positive profit / ROI numbers read green site-wide */
.kpi__value.is-positive,
.kpi--accent .kpi__value.is-positive,
.card__stat-value.is-positive {
  color: var(--positive);
}
.kpi__caption {
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--cream-dim);
  margin-top: 8px;
}
.kpi-card__foot {
  margin-top: 22px;
  font-size: 13px;
  color: var(--cream-dim);
  display: flex; justify-content: space-between; align-items: center;
}

/* ---------- CARD GRIDS ---------- */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}
@media (max-width: 720px) { .grid-2 { grid-template-columns: 1fr; } }
.card {
  display: flex; flex-direction: column;
  padding: 26px;
  text-decoration: none;
  color: var(--cream);
  min-height: 220px;
}
.card:hover {
  transform: translateY(-3px);
  border-color: var(--hair-2);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    0 34px 64px -28px rgba(0, 0, 0, 0.9);
}
.card[aria-disabled="true"] { opacity: 0.55; pointer-events: none; }
.card__top {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 20px;
}
.card__name {
  font-size: 18px; font-weight: 700;
  letter-spacing: -0.005em;
}
.card__tag {
  font-size: 10px; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase;
  padding: 4px 9px; border-radius: 9px;
  background: var(--surface-2);
  color: var(--cream-dim);
  border: 1px solid var(--hair-2);
  white-space: nowrap;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
/* "Live" tag gets a soft status dot */
.tag-live {
  display: inline-flex; align-items: center; gap: 7px;
  color: var(--cream);
}
.tag-live::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: #e7e8eb;
  box-shadow: 0 0 0 3px rgba(231, 232, 235, 0.16);
}
.card__tag--muted {
  background: var(--surface-2);
  color: var(--cream-dim);
  border-color: var(--hair);
}
.card__meta {
  font-size: 13px; color: var(--cream-dim);
  margin-bottom: auto;
  line-height: 1.5;
}
.card__stat {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--hair);
  display: flex; align-items: baseline; justify-content: space-between;
}
.card__stat-value {
  font-size: 22px; font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.01em;
}
.card__stat-label {
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--cream-dim);
}
.card__left {
  display: flex; align-items: center; gap: 12px;
  min-width: 0;
}
.card__avatar {
  width: 40px; height: 40px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--surface-2);
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}

.tool-card .card__top { margin-bottom: 12px; }
.tool-card__desc {
  font-size: 14px; color: var(--cream-dim);
  line-height: 1.5;
  flex: 1;
}
.tool-card__cta {
  margin-top: 18px;
  font-size: 13px; font-weight: 600;
  color: #e8e9ec;
}

/* tool card — icon-first header (refined neutral) */
.tool-card__top {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 16px;
}
.tool-card .card__name {
  display: block; font-size: 17px; line-height: 1.3; margin-bottom: 8px;
}
.tool-icon {
  display: grid; place-items: center;
  width: 38px; height: 38px; flex-shrink: 0;
  border-radius: 11px;
  color: var(--cream);
  background: linear-gradient(180deg, #26262b 0%, #17171a 100%);
  border: 1px solid var(--hair-2);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    0 5px 14px -8px rgba(0, 0, 0, 0.8);
}
.tool-icon svg { width: 19px; height: 19px; }

/* ---------- ABOUT STRIP ---------- */
.about {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 32px;
  align-items: center;
  padding: 32px;
}
.about__avatar {
  width: 104px; height: 104px;
  flex-shrink: 0;
  border-radius: 20px;
  overflow: hidden;
  background: var(--well);
  border: 1px solid var(--hair-2);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 14px 30px -16px rgba(0, 0, 0, 0.8);
}
.about__avatar img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.about__copy h3 {
  margin: 0 0 6px;
  font-size: 18px; font-weight: 700;
  letter-spacing: -0.005em;
}
.about__copy p {
  margin: 0; font-size: 14px; line-height: 1.55;
  color: var(--cream-dim); max-width: 60ch;
  text-wrap: pretty;
}
.socials { display: flex; gap: 10px; }
.socials a {
  display: grid; place-items: center;
  width: 42px; height: 42px;
  border-radius: 13px;
  color: var(--cream);
  text-decoration: none;
  border: 1px solid var(--hair);
  background: linear-gradient(180deg, var(--surface-2) 0%, var(--surface-bot) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 6px 16px -10px rgba(0, 0, 0, 0.7);
  transition: transform 160ms ease, box-shadow 200ms ease,
              background 200ms ease, color 200ms ease, border-color 160ms ease;
}
.socials a:hover {
  transform: translateY(-1px);
  color: #15171c;
  border-color: transparent;
  background: linear-gradient(180deg, var(--raised-top) 0%, var(--raised-bot) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.85),
    0 10px 22px -10px rgba(0, 0, 0, 0.6);
}
.socials svg { width: 18px; height: 18px; }

/* ---------- PAGE HEADER (for sub-pages) ---------- */
.page-head {
  padding-top: 56px;
  max-width: 760px;
}
.page-head h1 {
  font-size: clamp(36px, 5vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  font-weight: 800;
  margin: 0 0 16px;
  color: var(--cream);
  text-wrap: balance;
}
.page-head__lede {
  font-size: 17px;
  line-height: 1.55;
  color: var(--cream-dim);
  margin: 0;
  text-wrap: pretty;
}

/* Category sub-header (Extensions / Calculators) */
.cat-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 24px; margin-bottom: 24px;
}
.cat-head h2 {
  margin: 0;
  font-size: 22px; font-weight: 700;
  letter-spacing: -0.01em;
}
.cat-head__count {
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--cream-dim);
}

/* WIP / coming-soon notice */
.wip {
  margin-top: 32px;
  padding: 32px;
  text-align: center;
}
.wip__title {
  font-size: 14px; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 12px;
}
.wip__body {
  font-size: 16px; color: var(--cream-dim);
  margin: 0 auto;
  max-width: 52ch;
  line-height: 1.55;
  text-wrap: pretty;
}

/* ---------- EXTENSION / MODEL DETAIL PAGE ---------- */
.detail {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 32px;
  align-items: start;
}
.detail__main { padding: 32px; }
.detail__main h2 {
  font-size: 22px; font-weight: 700;
  letter-spacing: -0.005em;
  margin: 0 0 12px;
}
.detail__main h2:not(:first-child) { margin-top: 28px; }
.detail__main p {
  font-size: 15px; line-height: 1.6;
  color: var(--cream-dim);
  margin: 0 0 14px;
  text-wrap: pretty;
}
.detail__main ul {
  margin: 0 0 14px;
  padding-left: 22px;
  color: var(--cream-dim);
  font-size: 15px;
  line-height: 1.65;
}
.detail__main ul li::marker { color: var(--accent); }
.detail__side {
  padding: 28px;
  display: flex; flex-direction: column;
  gap: 14px;
}
.detail__side .btn { width: 100%; justify-content: center; }
.detail__side-hint {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--cream-dim);
  text-align: center;
  text-wrap: pretty;
}

/* GitHub button icon */
.btn .icon {
  width: 16px; height: 16px;
  flex-shrink: 0;
}

/* ---------- MODAL ---------- */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(10, 12, 16, 0.74);
  display: none;
  align-items: center; justify-content: center;
  z-index: 100;
  padding: 20px;
  opacity: 0;
  transition: opacity 220ms ease;
}
.modal-backdrop[data-open="true"] {
  display: flex;
  opacity: 1;
}
.modal {
  position: relative;
  max-width: 640px;
  width: 100%;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  padding: 36px 36px 32px;
  border-radius: 24px;
  transform: translateY(8px);
  transition: transform 240ms cubic-bezier(.2,.7,.3,1);
}
.modal-backdrop[data-open="true"] .modal { transform: translateY(0); }
.modal__close {
  position: absolute;
  top: 16px; right: 16px;
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border-radius: 10px;
  border: 1px solid var(--hair);
  background: var(--well);
  color: var(--cream);
  cursor: pointer;
  font-size: 18px;
  transition: background 160ms ease, border-color 160ms ease;
}
.modal__close:hover {
  background: var(--surface-2);
  border-color: var(--hair-2);
}
.modal__eyebrow {
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 8px;
}
.modal__title {
  font-size: 24px; font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 20px;
}
.modal__tabs {
  display: inline-flex;
  padding: 4px;
  background: var(--well);
  border: 1px solid var(--hair);
  border-radius: 999px;
  margin: 0 0 22px;
  position: relative;
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.55);
}
.modal__tab {
  appearance: none; border: 0; background: transparent;
  color: var(--cream-dim);
  font-family: inherit; font-size: 12px; font-weight: 600;
  letter-spacing: 0.06em;
  padding: 7px 16px; border-radius: 999px;
  cursor: pointer;
  transition: color 180ms ease, background 180ms ease;
}
.modal__tab[aria-pressed="true"] {
  background: linear-gradient(180deg, var(--raised-top) 0%, var(--raised-bot) 100%);
  color: #15171c;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.85),
    0 4px 10px -3px rgba(0, 0, 0, 0.55);
}
.modal__tabpanel { display: none; }
.modal__tabpanel[data-active="true"] { display: block; }
.modal__step {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 14px;
  padding: 14px 0;
  border-top: 1px solid var(--hair);
}
.modal__step:first-of-type { border-top: 0; padding-top: 0; }
.modal__step-num {
  display: grid; place-items: center;
  width: 28px; height: 28px;
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--accent);
  border: 1px solid var(--hair-2);
  font-size: 13px; font-weight: 700;
}
.modal__step-body h4 {
  margin: 4px 0 4px;
  font-size: 15px;
  font-weight: 600;
  color: var(--cream);
}
.modal__step-body p {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--cream-dim);
  text-wrap: pretty;
}
.modal__step-body code {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 12.5px;
  padding: 1px 6px;
  border-radius: 5px;
  background: var(--well);
  border: 1px solid var(--hair);
  color: var(--cream);
}
.modal__foot {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--hair);
  font-size: 13px;
  color: var(--cream-dim);
  text-wrap: pretty;
}

/* ---------- FOOTER ---------- */
footer {
  max-width: 1180px;
  margin: 24px auto 0;
  padding: 40px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 16px;
  align-items: center;
  border-top: 1px solid var(--hair);
  color: var(--cream-dim);
  font-size: 12px;
}
footer p { margin: 0; max-width: 56ch; text-wrap: pretty; }
footer .footer__left { justify-self: start; text-align: left; }
footer .footer__mid { justify-self: center; text-align: center; }
footer .footer__right {
  justify-self: end;
  color: var(--cream-dim);
  text-decoration: none;
  border-bottom: 1px solid var(--hair-2);
  padding-bottom: 1px;
  transition: color 180ms ease, border-color 180ms ease;
}
footer .footer__right:hover { color: var(--cream); border-color: var(--cream-dim); }
@media (max-width: 640px) {
  footer {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
    padding: 28px 20px;
  }
  footer .footer__left, footer .footer__mid, footer .footer__right { justify-self: center; text-align: center; }
}

/* ---------- REGULATORY WARNING (BR — Lei 14.790 / Portaria SPA-MF 1.964) ---------- */
/* Mandatory Ministério da Fazenda warning band, injected on every page by site.js */
.gov-warn {
  --warn: #e0a341;                 /* muted amber — official-caution accent only */
  display: flex; align-items: center; justify-content: center;
  gap: 13px; flex-wrap: wrap;
  padding: 11px 24px;
  background: linear-gradient(180deg, #201d17 0%, #17150f 100%);
  border-bottom: 1px solid rgba(224, 163, 65, 0.22);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  color: var(--cream);
  font-size: 12.5px; line-height: 1.35; text-align: center;
}
.gov-warn__icon { color: var(--warn); flex: none; width: 18px; height: 18px; }
.gov-warn__text { font-weight: 600; letter-spacing: 0.003em; }
.gov-warn__text b { color: var(--warn); font-weight: 700; }
.gov-warn__age {
  flex: none; font-weight: 800; font-size: 11px; letter-spacing: 0.02em;
  color: var(--warn); border: 1.5px solid var(--warn); border-radius: 6px;
  padding: 2px 7px;
}
@media (max-width: 640px) {
  .gov-warn { font-size: 11.5px; padding: 10px 14px; gap: 9px; }
}

/* footer compliance block (spans the footer grid, appended by site.js) */
.footer-compliance {
  grid-column: 1 / -1;
  margin-top: 6px; padding-top: 18px;
  border-top: 1px solid var(--hair);
  display: flex; flex-direction: column; gap: 8px; align-items: center;
  text-align: center; color: var(--cream-dim);
  font-size: 11.5px; line-height: 1.5;
}
.footer-compliance__warn { color: var(--cream); font-weight: 600; max-width: 72ch; }
.footer-compliance__warn b { color: #e0a341; }
.footer-compliance__row {
  display: flex; flex-wrap: wrap; gap: 6px 14px;
  justify-content: center; align-items: center; max-width: 82ch;
}
.footer-compliance a { color: var(--cream); }
.footer-compliance a:hover { color: #fff; }
.footer-compliance__age {
  font-weight: 800; color: #e0a341; border: 1.5px solid #e0a341;
  border-radius: 6px; padding: 1px 6px; font-size: 10.5px;
}

/* ---------- REGULATORY / METHODOLOGY NOTE (inline callout) ---------- */
.reg-note {
  max-width: 1180px; margin: 26px auto 0; padding: 16px 20px;
  display: flex; gap: 14px; align-items: flex-start;
  border: 1px solid var(--hair); border-left: 3px solid #e0a341;
  border-radius: 14px;
  background: linear-gradient(180deg, var(--surface-top) 0%, var(--surface-bot) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.reg-note__icon { color: #e0a341; flex: none; width: 20px; height: 20px; margin-top: 1px; }
.reg-note__body { margin: 0; font-size: 13px; line-height: 1.6; color: var(--cream-dim); text-wrap: pretty; }
.reg-note__body b, .reg-note__body strong { color: var(--cream); font-weight: 650; }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 900px) {
  .hero { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .hero > * { min-width: 0; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .about { grid-template-columns: auto 1fr; }
  .socials { grid-column: 1 / -1; }
  .detail { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .kpi-card__head { flex-wrap: wrap; gap: 10px; }
  .kpi-card { padding: 24px 22px; }
  .kpi__value { font-size: 26px; }
}
@media (max-width: 400px) {
  .nav { width: calc(100% - 16px); padding: 10px 10px; gap: 9px 8px; }
  .nav__links { padding: 4px; }
  .nav__links a { padding: 9px 3px 8px; font-size: 11.5px; }
  .kpi-row { gap: 10px; }
  .kpi__value { font-size: 21px; }
}
@media (max-width: 640px) {
  /* two-row nav: [brand | lang] on top, full-width link track below.
     NB: the grid children of .nav are .nav__brand, <nav>, and .nav__lang —
     so the responsive placement must target <nav>, not .nav__links. */
  .nav { grid-template-columns: 1fr auto; gap: 10px 12px; padding: 10px 12px 10px 14px; }
  .nav__brand { grid-column: 1; grid-row: 1; }
  .nav__lang { grid-column: 2; grid-row: 1; justify-self: end; }
  .nav > nav { grid-column: 1 / -1; grid-row: 2; min-width: 0; }
  .nav__links { display: flex; width: 100%; justify-self: stretch; }
  .nav__links li { flex: 1 1 0; min-width: 0; }
  .nav__links a { width: 100%; padding: 10px 4px 9px; font-size: 12px; letter-spacing: 0.02em; white-space: nowrap; }
  main { padding: 32px 18px 20px; gap: 64px; }
  .hero { padding-top: 20px; padding-bottom: 4px; }
  .section-head { flex-direction: column; align-items: start; margin-bottom: 28px; }
  .grid-3 { grid-template-columns: 1fr; }
  .about { grid-template-columns: 1fr; text-align: left; }
}

/* =====================================================
   PROFILE-PICTURE RING — monochrome "liquid light" border
   A dark rim with a bright white→silver comet of light that
   travels around the avatar, plus a soft traveling glow.
   Applied ONLY to the two profile pictures.
   ===================================================== */
@property --pfp-ring-angle {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}
@keyframes pfp-ring-spin { to { --pfp-ring-angle: 360deg; } }

.nav__pfp,
.about__avatar {
  position: relative;
  overflow: visible;
  border: none;
  background: var(--well);
  --ring-w: 2px;
  --ring-r: 14px;
}
.about__avatar { --ring-w: 4px; --ring-r: 24px; }

.nav__pfp > img,
.about__avatar > img {
  position: relative;
  z-index: 2;
  border-radius: inherit;
}

/* the rotating ring — a full conic disc; the photo (z-index 2) covers
   the centre, so only the outer band reads as a border ring.
   The two layers are injected by site.js so the conic renders reliably. */
.pfp-ring__band,
.pfp-ring__glow {
  position: absolute;
  inset: calc(-1 * var(--ring-w));
  border-radius: var(--ring-r);
  pointer-events: none;
  animation: pfp-ring-spin 4.6s linear infinite;
}
.pfp-ring__band {
  z-index: 1;
  background: conic-gradient(from var(--pfp-ring-angle),
    #2c2c31 0deg,
    #26262b 190deg,
    rgba(255, 255, 255, 0.14) 244deg,
    #d6d8de 286deg,
    #ffffff 308deg,
    #ffffff 318deg,
    #b4b6bd 336deg,
    #45454c 354deg,
    #2c2c31 360deg);
}
/* traveling glow bloom (the "vivid" halo, in white) */
.pfp-ring__glow {
  z-index: 0;
  background: conic-gradient(from var(--pfp-ring-angle),
    transparent 0deg,
    transparent 244deg,
    rgba(255, 255, 255, 0.55) 290deg,
    rgba(255, 255, 255, 0.95) 314deg,
    rgba(255, 255, 255, 0.55) 338deg,
    transparent 360deg);
  filter: blur(7px);
  opacity: 0.9;
}
.about__avatar .pfp-ring__glow { filter: blur(12px); }

@media (prefers-reduced-motion: reduce) {
  .pfp-ring__band, .pfp-ring__glow { animation: none; }
}
