/* Portal Web Interativo — Design System & Contexto Funcional Bcommercy */
/* Baseado nos tokens extraídos em /srv/catalogo-web/tokens/tokens.css e tokens.json */

:root {
  color-scheme: light;
  --f: 'Sora', system-ui, -apple-system, 'Segoe UI', sans-serif;

  /* Core & Brand Tokens (Bcommercy) */
  --ink: #0E2517;
  --muted: #586B64;
  --green: #3A9E55;
  --green-eyebrow: #2B7742;
  --green-link: #237035;
  --green-link-hover: #174D24;
  --lime: #B1EA57;
  --lime-btn: #BDE874;
  --lime-grad-start: #CFF58F;
  --lime-grad-end: #A6E04F;
  --marquee-dot: #7BCB5A;
  --whatsapp: #25D366;

  /* Surfaces */
  --bg-white: #FFFFFF;
  --bg-hero-top: #E6F8E9;
  --bg-hero-mid: #F4FCF5;
  --bg-steps-bottom: #E6F7EA;
  --bg-price-bottom: #E9F8EC;
  --bg-win-bar: #F3F6F4;
  --bg-media: #F2F2F2;
  --dark-0: #0A1A10;
  --dark-60: #10291A;
  --dark-100: #173F25;
  --dark-cat: #0C1F13;
  --dark-cat-end: #11301C;
  --dark-muted: #C9DFD0;

  /* Borders & Hairlines */
  --line: rgba(14, 37, 23, 0.09);
  --line-strong: rgba(14, 37, 23, 0.18);
  --border-badge: #CFE9D4;
  --border-panel-hover: rgba(58, 158, 85, 0.32);

  /* Gradients */
  --grad-btn: linear-gradient(90deg, #CFF58F 0%, #A6E04F 100%);
  --grad-hero: linear-gradient(180deg, #E6F8E9 0%, #F4FCF5 58%, #FFFFFF 100%);
  --grad-steps: linear-gradient(180deg, #F3FCF4 0%, #E6F7EA 100%);
  --grad-lia: linear-gradient(125deg, #0A1A10 0%, #10291A 55%, #173F25 100%);
  --grad-catalogs: linear-gradient(180deg, #0C1F13 0%, #11301C 100%);
  --grad-icon: linear-gradient(180deg, #E9F9DA 0%, #D6F2C9 100%);
  --grad-guarantee: linear-gradient(90deg, #F0FBF1 0%, #E4F7D9 100%);

  /* Radii & Shadows */
  --r-xs: 4px;
  --r-sm: 12px;
  --r-md: 14px;
  --r-lg: 18px;
  --r-win: 22px;
  --r-card: 24px;
  --r-pill: 999px;
  --shadow-btn: 0 10px 28px rgba(159, 219, 74, 0.35);
  --shadow-btn-hover: 0 16px 38px rgba(159, 219, 74, 0.55);
  --shadow-nav: 0 12px 34px rgba(14, 37, 23, 0.09);
  --shadow-card: 0 18px 40px rgba(13, 51, 26, 0.07);
  --shadow-win: 0 32px 72px rgba(13, 51, 26, 0.16), 0 8px 20px rgba(13, 51, 26, 0.06);

  /* Layout & Motion */
  --container-max: 1184px;
  --ease-smooth: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-reveal: cubic-bezier(0.2, 0.7, 0.2, 1);
  --ease-carousel: cubic-bezier(0.65, 0.05, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
  font-family: var(--f);
  color: var(--ink);
  background: var(--bg-white);
  -webkit-text-size-adjust: 100%;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
body {
  margin: 0;
  font-family: var(--f);
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg-white);
}
img, svg { display: block; max-inline-size: 100%; }
button, input, select { font: inherit; color: inherit; }
a { color: var(--green-link); text-underline-offset: 3px; }
a:hover { color: var(--green-link-hover); }
:focus-visible { outline: 3px solid var(--green-eyebrow); outline-offset: 3px; }
.section-dark :focus-visible, .site-footer :focus-visible { outline-color: var(--lime); }

.visually-hidden {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  inset-block-start: -100px;
  inset-inline-start: 16px;
  z-index: 2000;
  background: var(--ink);
  color: var(--lime);
  padding: 12px 20px;
  border-radius: var(--r-pill);
  font-weight: 600;
  text-decoration: none;
  box-shadow: var(--shadow-win);
}
.skip-link:focus { inset-block-start: 16px; }

.wrap {
  inline-size: min(var(--container-max), calc(100% - 32px));
  margin-inline: auto;
}
@media (min-width: 768px) {
  .wrap { inline-size: min(var(--container-max), calc(100% - 48px)); }
}

.section {
  padding-block: 64px;
  content-visibility: auto;
  contain-intrinsic-size: 1px 700px;
}
.section--hero {
  content-visibility: visible;
  background: var(--grad-hero);
  padding-block: 112px 56px;
  position: relative;
  border-block-end: 1px solid var(--line);
}
.section--steps { background: var(--grad-steps); }
.section--soft {
  background: var(--bg-hero-mid);
  border-block: 1px solid var(--line);
}
@media (min-width: 1024px) {
  .section { padding-block: 88px; }
  .section--hero { padding-block: 124px 72px; }
}

.eyebrow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  max-inline-size: 100%;
  overflow-wrap: anywhere;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  line-height: 1.3;
  color: var(--green-eyebrow);
  margin: 0 0 12px;
}
.section-dark .eyebrow { color: var(--lime); }

h1, .h1 {
  font-size: clamp(32px, 4vw, 56px);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.033em;
  margin: 0 0 18px;
  text-wrap: balance;
}
h2, .h2 {
  font-size: clamp(26px, 3vw, 40px);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin: 0 0 14px;
  text-wrap: balance;
}
h3, .h3 {
  font-size: clamp(19px, 1.8vw, 23px);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.025em;
  margin: 0 0 10px;
}
.lead { font-size: clamp(16px, 1.4vw, 18px); color: var(--muted); margin: 0 0 24px; max-inline-size: 68ch; }
.section-dark .lead { color: var(--dark-muted); }
.muted { color: var(--muted); }
.section-dark .muted { color: var(--dark-muted); }

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
  background: rgba(14, 37, 23, 0.06);
  padding: 2px 6px;
  border-radius: 6px;
  overflow-wrap: anywhere;
  word-break: break-word;
}
pre[tabindex="0"] code {
  overflow-wrap: normal;
  word-break: normal;
}
.section-dark code { background: #143620; color: var(--lime); }

/* Header & Single Nav Landmark */
.site-header {
  position: fixed;
  inset-block-start: 12px;
  inset-inline: 0;
  z-index: 999;
  pointer-events: none;
}
.header-inner {
  pointer-events: auto;
  inline-size: min(1240px, calc(100% - 20px));
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 14px 10px 18px;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px) saturate(160%);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-nav);
}
@media (min-width: 768px) {
  .header-inner {
    inline-size: min(1240px, calc(100% - 32px));
    padding: 10px 16px 10px 22px;
  }
}
.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-inline-size: 0;
  text-decoration: none;
  color: var(--ink);
  font-weight: 600;
  font-size: 15px;
  white-space: nowrap;
  flex-shrink: 1;
}
@media (max-width: 480px) {
  .header-inner {
    gap: 8px;
    padding: 8px 10px 8px 12px;
  }
  .brand-link {
    gap: 8px;
    font-size: 14px;
  }
  .brand-tag {
    display: none;
  }
  .menu-button {
    padding: 8px 12px;
    font-size: 13.5px;
    flex-shrink: 0;
  }
}
.brand-mark {
  display: inline-grid;
  place-items: center;
  inline-size: 34px;
  block-size: 34px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--lime);
  font-weight: 700;
  font-size: 16px;
}
.brand-tag {
  font-size: 12px;
  font-weight: 600;
  color: var(--green-eyebrow);
  background: var(--bg-hero-top);
  border: 1px solid var(--border-badge);
  padding: 2px 9px;
  border-radius: var(--r-pill);
}
.site-nav { display: flex; align-items: center; gap: 10px; }
.menu-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line-strong);
  background: var(--bg-white);
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.site-menu { list-style: none; margin: 0; padding: 0; }
.site-menu[popover] {
  position: fixed;
  inset: 74px 16px auto auto;
  inline-size: min(86vw, 310px);
  max-block-size: calc(100dvh - 96px);
  overflow: auto;
  background: var(--bg-white);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-card);
  padding: 12px;
  box-shadow: var(--shadow-win);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.site-menu[popover]:not(:popover-open):not(.is-fallback-open) { display: none; }
.site-menu.is-fallback-open {
  position: fixed;
  inset: 74px 16px auto auto;
  inline-size: min(86vw, 310px);
  background: var(--bg-white);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-card);
  padding: 12px;
  box-shadow: var(--shadow-win);
  display: flex;
  flex-direction: column;
  gap: 4px;
  z-index: 1200;
}
.site-menu a {
  display: block;
  padding: 10px 14px;
  border-radius: var(--r-pill);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  white-space: nowrap;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.site-menu a:hover { background: var(--bg-hero-top); }
.site-menu a[aria-current="location"] {
  background: var(--ink);
  color: var(--lime);
  font-weight: 600;
}
.site-header.is-wide .menu-button { display: none; }
.site-header.is-wide .site-menu {
  position: static;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 4px;
  inline-size: auto;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  overflow: visible;
}
.site-header.is-wide .site-menu a { padding: 8px 13px; font-size: 13.5px; }

/* Buttons & Hero */
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.bc-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-radius: var(--r-pill);
  padding: 6px 6px 6px 24px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  color: var(--ink);
  text-decoration: none;
  background: var(--grad-btn);
  background-color: var(--lime-btn);
  border: 1px solid rgba(14, 37, 23, 0.14);
  box-shadow: var(--shadow-btn);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.bc-btn-primary:hover { color: var(--ink); transform: translateY(-2px); box-shadow: var(--shadow-btn-hover); }
.bc-btn-arrow {
  display: inline-grid;
  place-items: center;
  inline-size: 40px;
  block-size: 40px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--lime);
  flex-shrink: 0;
}
.bc-btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: var(--r-pill);
  padding: 14px 24px;
  font-size: 15px;
  font-weight: 500;
  line-height: 1;
  color: var(--ink);
  text-decoration: none;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(14, 37, 23, 0.72);
  cursor: pointer;
  transition: background-color 0.2s ease;
}
.bc-btn-ghost:hover { color: var(--ink); background: var(--bg-white); }
.section-dark .bc-btn-ghost {
  background: rgba(255, 255, 255, 0.08);
  color: var(--bg-white);
  border-color: rgba(177, 234, 87, 0.55);
}
.section-dark .bc-btn-ghost:hover { background: rgba(255, 255, 255, 0.18); color: var(--bg-white); }

.hero-grid { display: grid; gap: 32px; align-items: center; }
@media (min-width: 960px) {
  .hero-grid { grid-template-columns: 1.15fr 0.85fr; gap: 44px; }
}
.hero-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-block-end: 20px; }
.pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: var(--r-pill);
  font-size: 12.5px;
  font-weight: 600;
  background: var(--bg-white);
  color: var(--ink);
  border: 1px solid var(--border-badge);
}
.section-dark .pill-badge {
  background: rgba(177, 234, 87, 0.14);
  color: var(--lime);
  border-color: rgba(177, 234, 87, 0.35);
}
.hero-preview-card {
  background: var(--bg-white);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: 14px;
  box-shadow: var(--shadow-win);
}
.hero-preview-trigger {
  display: block;
  inline-size: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  border-radius: var(--r-md);
  overflow: hidden;
  text-align: start;
}
.hero-preview-trigger img {
  inline-size: 100%;
  block-size: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: top;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
}
.hero-preview-caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-block-start: 12px;
  font-size: 13px;
  color: var(--muted);
}

/* KPI Grid & Downloads */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(195px, 100%), 1fr));
  gap: 16px;
  margin-block: 40px 28px;
}
.kpi-card {
  background: var(--bg-white);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 20px;
  box-shadow: var(--shadow-card);
}
.kpi-value {
  font-size: clamp(26px, 2.5vw, 34px);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1.1;
  color: var(--ink);
  margin: 0 0 6px;
}
.kpi-label { font-size: 13.5px; font-weight: 600; color: var(--green-eyebrow); margin: 0 0 4px; }
.kpi-detail { font-size: 13px; color: var(--muted); margin: 0; }

.downloads-panel {
  background: var(--bg-white);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: 24px;
  box-shadow: var(--shadow-card);
}
.downloads-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(230px, 100%), 1fr));
  gap: 10px;
  margin-block-start: 16px;
}
.download-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: var(--bg-hero-mid);
  text-decoration: none;
  color: var(--ink);
  transition: background-color 0.2s ease, border-color 0.2s ease;
}
.download-item:hover { color: var(--ink); background: var(--bg-hero-top); border-color: var(--green); }
.download-name { font-size: 13.5px; font-weight: 600; word-break: break-word; }
.download-meta { font-size: 12px; color: var(--muted); white-space: nowrap; }

/* Grids, Cards & Journey */
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(270px, 100%), 1fr)); gap: 20px; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); gap: 24px; }
.hero-grid > *,
.grid-2 > *,
.grid-3 > *,
.kpi-grid > *,
.swatch-grid > *,
.motion-grid > *,
.preview-grid > *,
.screens-grid > *,
.downloads-grid > *,
.filter-bar > *,
.search-box {
  min-inline-size: 0;
}
.pill-badge, .tag-chip {
  max-inline-size: 100%;
  overflow-wrap: anywhere;
}
.card {
  background: var(--bg-white);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: 24px;
  box-shadow: var(--shadow-card);
  min-inline-size: 0;
}
.section-dark,
.card.section-dark {
  background-color: var(--dark-0);
  background-image: var(--grad-lia);
  color: var(--bg-white);
  border-color: rgba(255, 255, 255, 0.14);
}
.section-dark--catalogs {
  background-color: var(--dark-cat);
  background-image: var(--grad-catalogs);
}
.section-dark .card {
  background-color: #122E1C;
  background-image: none;
  border-color: rgba(255, 255, 255, 0.14);
  box-shadow: none;
}
.step-card {
  background: var(--bg-white);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: 26px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: var(--shadow-card);
}
.step-num { font-size: 56px; font-weight: 100; line-height: 1; letter-spacing: -0.05em; color: var(--green-eyebrow); }
.tag-list { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0; padding: 0; }
.tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: var(--r-pill);
  background: var(--bg-win-bar);
  color: var(--ink);
  border: 1px solid var(--line);
}
.section-dark .tag-chip {
  background: rgba(255, 255, 255, 0.1);
  color: var(--bg-white);
  border-color: rgba(255, 255, 255, 0.18);
}

.guarantee-banner {
  background: var(--grad-guarantee);
  border: 1px solid var(--border-badge);
  border-radius: var(--r-card);
  padding: 22px 26px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-block: 24px;
}
.notice-box {
  border-inline-start: 4px solid var(--green-eyebrow);
  background: var(--bg-win-bar);
  padding: 14px 18px;
  border-radius: 0 var(--r-md) var(--r-md) 0;
  font-size: 14px;
}
.section-dark .notice-box {
  background-color: #163C24;
  border-inline-start-color: var(--lime);
}

/* FAQ Accordion */
.faq-list { display: grid; gap: 10px; margin-block-start: 20px; }
.faq-item {
  background: var(--bg-white);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: clip;
  transition: border-color 0.2s ease;
}
.faq-item[open] { border-color: var(--green); }
.faq-item summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-marker {
  inline-size: 32px;
  block-size: 32px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  background: var(--bg-hero-top);
  color: var(--ink);
  font-weight: 700;
  flex-shrink: 0;
  transition: background-color 0.2s ease, transform 0.2s ease;
}
.faq-item[open] .faq-marker { background: var(--lime); transform: rotate(45deg); }
.faq-answer {
  padding: 0 20px 18px;
  color: var(--muted);
  margin: 0;
  border-block-start: 1px solid var(--line);
  padding-block-start: 14px;
}

/* Search & Filter Controls */
.filter-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-block: 20px; }
.search-box { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; flex: 1 1 280px; }
.search-input {
  inline-size: min(360px, 100%);
  padding: 10px 16px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line-strong);
  background: var(--bg-white);
  font-size: 14.5px;
}
.chip-group { display: flex; flex-wrap: wrap; gap: 8px; }
.filter-btn {
  padding: 8px 14px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line-strong);
  background: var(--bg-white);
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.filter-btn[aria-pressed="true"] {
  background: var(--ink);
  color: var(--lime);
  border-color: var(--ink);
  font-weight: 600;
}

/* Tokens Showcase */
.swatch-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr)); gap: 14px; margin-block: 16px 32px; }
.swatch-card {
  background: var(--bg-white);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.swatch-preview {
  block-size: 72px;
  border-block-end: 1px solid var(--line);
  background-image:
    linear-gradient(45deg, #ececec 25%, transparent 25%),
    linear-gradient(-45deg, #ececec 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #ececec 75%),
    linear-gradient(-45deg, transparent 75%, #ececec 75%);
  background-size: 16px 16px;
  background-position: 0 0, 0 8px, 8px -8px, -8px 0;
  position: relative;
}
.swatch-fill { position: absolute; inset: 0; }
.swatch-body { padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.swatch-name { font-size: 13px; font-weight: 600; word-break: break-word; }
.swatch-value { font-size: 12px; color: var(--muted); word-break: break-all; }
.copy-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-block-start: auto; padding-block-start: 6px; }
.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line-strong);
  background: var(--bg-win-bar);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.copy-btn:hover { background: var(--bg-hero-top); }
.copy-btn[data-copied="true"] { background: var(--ink); color: var(--lime); border-color: var(--ink); }

.type-scale-list { display: grid; gap: 12px; margin-block: 16px 32px; }
.type-row { background: var(--bg-white); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px 20px; display: grid; gap: 8px; }
.type-sample { color: var(--ink); overflow-wrap: anywhere; }
.spacing-bar-wrap { display: flex; align-items: center; gap: 12px; }
.spacing-bar { max-inline-size: 100%; block-size: 12px; border-radius: var(--r-pill); background: linear-gradient(90deg, var(--green-eyebrow), var(--lime)); }

/* Animations Playground */
.motion-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(250px, 100%), 1fr)); gap: 16px; }
.motion-card {
  background-color: #13311E;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--r-lg);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.motion-stage {
  block-size: 76px;
  border-radius: var(--r-md);
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: grid;
  place-items: center;
  overflow: hidden;
  position: relative;
}
.motion-demo-box {
  padding: 8px 14px;
  border-radius: var(--r-pill);
  background: var(--lime);
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
}
@media (prefers-reduced-motion: no-preference) {
  .motion-stage[data-playing="true"] .anim-bc-marq { animation: pg-marq 3.5s linear infinite; }
  .motion-stage[data-playing="true"] .anim-bc-float { animation: pg-float 2.6s ease-in-out infinite; }
  .motion-stage[data-playing="true"] .anim-bc-drift { animation: pg-drift 3s ease-in-out infinite alternate; }
  .motion-stage[data-playing="true"] .anim-bc-rise { animation: pg-rise 1.6s var(--ease-smooth) infinite alternate; }
  .motion-stage[data-playing="true"] .anim-bc-spin { animation: pg-spin 2.4s linear infinite; }
  .motion-stage[data-playing="true"] .anim-bc-pulse { animation: pg-pulse 2s ease-in-out infinite; }
  .motion-stage[data-playing="true"] .anim-bc-heroIn { animation: pg-heroIn 1.8s var(--ease-smooth) infinite; }
  .motion-stage[data-playing="true"] .anim-bc-devIn { animation: pg-devIn 1.8s var(--ease-smooth) infinite; }
  .motion-stage[data-playing="true"] .anim-eicon-spin { animation: pg-spin 2s linear infinite; }
}
.motion-stage[data-force-play="true"] .anim-bc-marq { animation: pg-marq 3.5s linear infinite; }
.motion-stage[data-force-play="true"] .anim-bc-float { animation: pg-float 2.6s ease-in-out infinite; }
.motion-stage[data-force-play="true"] .anim-bc-drift { animation: pg-drift 3s ease-in-out infinite alternate; }
.motion-stage[data-force-play="true"] .anim-bc-rise { animation: pg-rise 1.6s var(--ease-smooth) infinite alternate; }
.motion-stage[data-force-play="true"] .anim-bc-spin { animation: pg-spin 2.4s linear infinite; }
.motion-stage[data-force-play="true"] .anim-bc-pulse { animation: pg-pulse 2s ease-in-out infinite; }
.motion-stage[data-force-play="true"] .anim-bc-heroIn { animation: pg-heroIn 1.8s var(--ease-smooth) infinite; }
.motion-stage[data-force-play="true"] .anim-bc-devIn { animation: pg-devIn 1.8s var(--ease-smooth) infinite; }
.motion-stage[data-force-play="true"] .anim-eicon-spin { animation: pg-spin 2s linear infinite; }

@keyframes pg-marq { from { transform: translateX(35%); } to { transform: translateX(-35%); } }
@keyframes pg-float { 0%, 100% { transform: translateY(4px); } 50% { transform: translateY(-10px); } }
@keyframes pg-drift { from { transform: translateX(-18px); } to { transform: translateX(18px); } }
@keyframes pg-rise { from { transform: translateY(14px); opacity: 0.5; } to { transform: translateY(0); opacity: 1; } }
@keyframes pg-spin { to { transform: rotate(360deg); } }
@keyframes pg-pulse { 0%, 100% { opacity: 0.45; } 50% { opacity: 1; } }
@keyframes pg-heroIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes pg-devIn { from { opacity: 0; transform: translateX(32px); } to { opacity: 1; transform: none; } }

/* Live Component Previews & Before/After Simulator */
.preview-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(270px, 100%), 1fr)); gap: 20px; margin-block-end: 36px; }
.bc-card-demo {
  background: var(--bg-white);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: 24px;
  transition: border-color 0.25s ease;
}
.bc-card-demo:hover { border-color: var(--border-panel-hover); }
.bc-icon-circle {
  inline-size: 52px;
  block-size: 52px;
  border-radius: 50%;
  background: var(--grad-icon);
  color: var(--green-eyebrow);
  display: grid;
  place-items: center;
  margin-block-end: 18px;
}
.bc-panel-highlight-demo {
  background-color: var(--ink);
  background-image: linear-gradient(160deg, #0E2517 0%, #173F25 100%);
  color: var(--bg-white);
  border-radius: var(--r-card);
  padding: 24px;
}
.ba-box {
  position: relative;
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid var(--line);
  aspect-ratio: 16 / 10;
  background: var(--bg-win-bar);
  --pos: 50%;
}
.ba-layer { position: absolute; inset: 0; display: grid; place-items: center; padding: 18px; text-align: center; }
.ba-layer--before { background: linear-gradient(135deg, #d7dbd8 0%, #aeb5b0 100%); color: var(--ink); }
.ba-layer--after {
  background-color: var(--dark-0);
  background-image: radial-gradient(circle at 50% 35%, #2b5a3c 0%, #0a1a10 75%);
  color: var(--bg-white);
  clip-path: inset(0 0 0 var(--pos));
}
.ba-divider { position: absolute; inset-block: 0; inset-inline-start: var(--pos); inline-size: 3px; background: var(--lime); transform: translateX(-50%); pointer-events: none; }
.ba-range-wrap { margin-block-start: 10px; display: flex; align-items: center; gap: 10px; font-size: 13px; }
.ba-range-wrap input[type="range"] { flex: 1; accent-color: var(--green-eyebrow); }

/* Tabs Pattern */
.tablist { display: flex; flex-wrap: nowrap; overflow-x: auto; gap: 6px; border-block-end: 1px solid var(--line); margin-block-end: 20px; padding-block-end: 2px; }
.tablist [role="tab"] {
  position: relative;
  border: 0;
  background: transparent;
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  white-space: nowrap;
  cursor: pointer;
  border-radius: var(--r-sm) var(--r-sm) 0 0;
}
.tablist [role="tab"]:hover { color: var(--ink); background: var(--bg-hero-mid); }
.tablist [role="tab"][aria-selected="true"] { color: var(--ink); font-weight: 600; }
.tablist [role="tab"][aria-selected="true"]::after {
  content: "";
  position: absolute;
  inset: auto 8px 0;
  border-block-end: 3px solid var(--green-eyebrow);
}
.tabpanel { background: var(--bg-white); border: 1px solid var(--line); border-radius: var(--r-card); padding: 24px; box-shadow: var(--shadow-card); }
.md-body h1, .md-body h2, .md-body h3 { margin-block-start: 1.2em; margin-block-end: 0.5em; }
.md-body h1:first-child, .md-body h2:first-child { margin-block-start: 0; }
.md-body ul { padding-inline-start: 20px; }
.md-body li + li { margin-block-start: 6px; }

/* Gallery & Thumbnails */
.screens-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(250px, 100%), 1fr)); gap: 18px; }
.screen-card {
  margin: 0;
  background: var(--bg-white);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-card);
}
.screen-trigger {
  display: block;
  inline-size: 100%;
  padding: 0;
  border: 0;
  background: var(--bg-win-bar);
  cursor: pointer;
  position: relative;
}
.screen-trigger img {
  inline-size: 100%;
  block-size: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: top;
}
.screen-caption { padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.screen-title { font-size: 14px; font-weight: 600; color: var(--ink); }
.screen-meta { font-size: 12.5px; color: var(--muted); }

/* Native <dialog> Lightbox */
dialog.lightbox {
  padding: 0;
  margin: auto;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-card);
  background: var(--bg-white);
  color: var(--ink);
  inline-size: min(1080px, calc(100vw - 24px));
  max-block-size: calc(100dvh - 24px);
  box-shadow: var(--shadow-win);
  overscroll-behavior: contain;
}
@media (prefers-reduced-motion: no-preference) {
  dialog.lightbox {
    opacity: 0;
    transform: scale(0.97);
    transition:
      opacity 0.22s ease,
      transform 0.22s var(--ease-smooth),
      overlay 0.22s allow-discrete,
      display 0.22s allow-discrete;
  }
  dialog.lightbox[open] {
    opacity: 1;
    transform: none;
    @starting-style { opacity: 0; transform: scale(0.97); }
  }
}
dialog.lightbox::backdrop {
  background: rgba(10, 26, 16, 0.78);
  backdrop-filter: blur(4px);
  overflow: hidden;
  overscroll-behavior: contain;
}
.lightbox-shell { display: flex; flex-direction: column; max-block-size: calc(100dvh - 28px); }
.lightbox-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border-block-end: 1px solid var(--line);
  background: var(--bg-win-bar);
}
.lightbox-title { font-size: 15px; font-weight: 600; margin: 0; }
.lightbox-media {
  overflow: auto;
  padding: 16px;
  background: #102016;
  display: grid;
  place-items: start center;
  flex: 1;
}
.lightbox-media img { max-inline-size: 100%; block-size: auto; border-radius: var(--r-sm); background: var(--bg-white); }
.lightbox-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 18px;
  border-block-start: 1px solid var(--line);
  background: var(--bg-white);
  font-size: 13px;
}

/* Responsive Tables */
.table-wrapper {
  overflow: auto;
  max-inline-size: 100%;
  max-block-size: min(560px, 75dvh);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--bg-white);
  container-type: inline-size;
}
.data-table { inline-size: 100%; border-collapse: separate; border-spacing: 0; text-align: start; font-size: 14px; }
.data-table caption {
  padding: 14px 16px;
  font-weight: 600;
  text-align: start;
  background: var(--bg-hero-mid);
  border-block-end: 1px solid var(--line);
}
.data-table thead th {
  position: sticky;
  inset-block-start: 0;
  z-index: 2;
  background: var(--bg-win-bar);
  padding: 12px 14px;
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink);
  border-block-end: 1px solid var(--line-strong);
  white-space: nowrap;
}
.data-table tbody th, .data-table tbody td {
  padding: 12px 14px;
  border-block-end: 1px solid var(--line);
  vertical-align: top;
}
.data-table tbody th { font-weight: 600; background: var(--bg-white); }
@container (width < 640px) {
  .data-table, .data-table thead, .data-table tbody, .data-table tr, .data-table th, .data-table td { display: block; }
  .data-table thead { display: none; }
  .data-table tbody tr {
    margin: 12px;
    border: 1px solid var(--line-strong);
    border-radius: var(--r-md);
    overflow: hidden;
  }
  .data-table tbody th {
    position: sticky;
    inset-block-start: 0;
    z-index: 1;
    background: var(--bg-hero-top);
    border-block-end: 1px solid var(--line);
  }
  .data-table tbody td::before {
    content: attr(data-label) ": ";
    font-weight: 600;
    color: var(--green-eyebrow);
  }
}

/* Confidence Badges & Popover Legend */
.conf-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: var(--r-pill);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.conf-observed { background: #E6F8E9; color: #174D24; border: 1px solid #9CD8AA; }
.conf-derived { background: #FFF7E0; color: #6B4400; border: 1px solid #E5C16C; }
.conf-inferred { background: #EEF2FF; color: #1E3A8A; border: 1px solid #B7C6F8; }

.legend-popover[popover] {
  margin: auto;
  inset: auto;
  max-inline-size: min(440px, calc(100vw - 32px));
  padding: 20px;
  border-radius: var(--r-card);
  border: 1px solid var(--line-strong);
  background: var(--bg-white);
  color: var(--ink);
  box-shadow: var(--shadow-win);
}
.legend-popover[popover]:not(:popover-open):not(.is-fallback-open) { display: none; }
.legend-popover.is-fallback-open {
  position: fixed;
  inset-block-start: 50%;
  inset-inline-start: 50%;
  transform: translate(-50%, -50%);
  z-index: 1500;
}

pre[tabindex="0"] {
  overflow: auto;
  padding: 16px;
  border-radius: var(--r-md);
  background: var(--dark-0);
  color: #EAF7EE;
  font-size: 13px;
  line-height: 1.5;
  border: 1px solid rgba(255, 255, 255, 0.14);
}
pre[tabindex="0"] code { background: transparent; color: inherit; padding: 0; }

.site-footer {
  background: var(--dark-0);
  color: var(--bg-white);
  padding-block: 52px 36px;
  border-block-start: 1px solid rgba(177, 234, 87, 0.22);
}
.site-footer a { color: var(--lime); }

@media (forced-colors: active) {
  .bc-btn-primary, .bc-btn-ghost, .filter-btn, .copy-btn, .conf-badge, .card, .kpi-card {
    border: 1px solid ButtonText;
  }
  .tablist [role="tab"][aria-selected="true"]::after { border-block-end: 3px solid Highlight; }
}
