@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700;800&display=swap');

:root {
  --bg: #111719;
  --bg-card: #1b2326;
  --bg-card-2: #202a2e;
  --bg-elevated: #263136;
  --border: #334045;
  --border-soft: #334045;
  --border-hover: #526268;
  --border-accent: #6593ef;
  --text: #f0f4f3;
  --text-secondary: #bbc8c8;
  --text-muted: #97a8aa;
  --accent: #79a4fa;
  --accent-light: #a9c2ff;
  --accent-grad: #2862cc;
  --accent-glow: transparent;
  --green: #62c7a4;
  --green-glow: transparent;
  --yellow: #f0be72;
  --accent-2: #f0be72;
  --red: #f48a8a;
  --radius: 8px;
  --radius-sm: 6px;
  --radius-xs: 4px;
  --radius-lg: 8px;
  --surface-soft: #202a2e;
  --surface-quiet: #1b2326;
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.14);
  --shadow-soft: none;
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.24);
  --shadow-accent: none;
  --card-inset: none;
}

[data-theme="light"] {
  --bg: #f3f6f5;
  --bg-card: #fff;
  --bg-card-2: #edf2f0;
  --bg-elevated: #fff;
  --border: #d5dfdc;
  --border-soft: #d5dfdc;
  --border-hover: #a8b9b5;
  --border-accent: #255dc8;
  --text: #172326;
  --text-secondary: #455b60;
  --text-muted: #62767b;
  --accent: #245bc7;
  --accent-light: #17489f;
  --accent-grad: #245bc7;
  --accent-glow: transparent;
  --green: #087b5b;
  --green-glow: transparent;
  --yellow: #946017;
  --accent-2: #946017;
  --red: #b63d42;
  --surface-soft: #fff;
  --surface-quiet: #f8faf9;
  --shadow: 0 6px 20px rgba(23, 35, 38, 0.08);
  --shadow-soft: none;
  --shadow-lg: 0 16px 36px rgba(23, 35, 38, 0.14);
  --shadow-accent: none;
}

html *, html *::before, html *::after { letter-spacing: 0 !important; }
body, button, input, select, textarea { font-family: 'DM Sans', sans-serif; }
h1, h2, h3, h4, h5, h6, .brand-name, .plan-name, .stat-value {
  font-family: 'DM Sans', sans-serif;
}
.bg-gradient { background: none !important; }
.gradient-text, .hero-info h1 .highlight, .pricing-header h1 span {
  background: none !important;
  color: var(--accent) !important;
  -webkit-text-fill-color: currentColor !important;
}
.card, .stat-card, .plan-card, .modal, .sub-modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.card:hover, .stat-card:hover, .plan-card:hover {
  transform: none;
  box-shadow: none;
}
.btn-primary, .btn-primary:hover, .btn-primary:focus-visible,
.mobile-start-btn, .mobile-sticky-cta-action, .plan-card .plan-cta.primary,
.lifetime-btn, .modal .modal-cta {
  background: #2862cc;
  color: #fff;
  border-radius: 6px;
  box-shadow: none;
}
.btn-primary::before { display: none; }
.btn-primary:hover, .plan-card .plan-cta.primary:hover, .lifetime-btn:hover {
  background: #1e52b1;
  transform: none;
  box-shadow: none;
}
.btn-primary:active, .btn-ghost:active { transform: none; }
.btn-ghost, .btn-login, .theme-toggle, .mobile-menu-btn {
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  border-radius: 6px;
  box-shadow: none;
}
.btn-primary:focus-visible, .btn-ghost:focus-visible,
a:focus-visible, button:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.dot-accent, .dot-green, .dot-amber, .agency-badge-dot { box-shadow: none; }
.site-nav, .l-nav {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.nav-logo, .l-nav-logo { display: inline-flex; align-items: center; gap: 10px; min-width: 0; }
.brand-bifro-logo {
  display: block;
  width: 112px;
  height: 44px;
  flex: 0 0 112px;
  background: url('/assets/logo-dark.png') left -34px / 112px 112px no-repeat;
}
[data-theme="light"] .brand-bifro-logo {
  background-image: url('/assets/logo-light.png');
}
.nav-product-name {
  padding-left: 10px;
  border-left: 1px solid var(--border-hover);
  color: var(--text);
  font-size: .94rem;
  font-weight: 650;
  line-height: 1.25;
  white-space: nowrap;
}
.site-nav .nav-links a.active, .l-nav-links a:hover {
  color: var(--accent);
  background: var(--bg-card-2);
}
.theme-toggle { border-radius: 6px; }
.mobile-drawer, .mobile-drawer-header { background: var(--bg-card); }

.dashboard-body {
  --radius: 8px;
  --radius-sm: 6px;
  --radius-xs: 4px;
  --shadow: none;
  --shadow-lg: var(--shadow);
  max-width: 1260px;
  padding: 34px 28px 72px;
  gap: 26px;
}
[data-theme="light"] .dashboard-body { --shadow: none; --shadow-lg: 0 16px 36px rgba(23,35,38,.14); }
.dashboard-command, [data-theme="light"] .dashboard-command {
  padding: 12px 0 22px;
  border: 0;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  background: none;
  box-shadow: none;
  overflow: visible;
  align-items: end;
}
.dashboard-command h1 { font-size: 1.8rem; line-height: 1.18; font-weight: 700; }
.dashboard-command p { margin-top: 6px; font-size: .92rem; }
.dashboard-kicker, .create-summary-kicker { font-size: .7rem; color: var(--text-muted); }
.dashboard-command-primary, .dashboard-command-refresh { min-height: 44px; border-radius: 6px; }
.stats-row { gap: 8px; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.stat-card {
  min-height: 94px;
  padding: 16px;
  gap: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border);
}
.stat-icon { width: 30px; height: 30px; border-radius: 6px; }
.stat-card:hover { border-color: var(--border-hover); }
.create-panel { padding: 26px; }
.create-panel-header { margin-bottom: 22px; }
.create-panel-header h2 { font-size: 1.2rem; font-weight: 700; }
.access-option, .access-option.selected {
  border-radius: 6px;
  box-shadow: none;
}
.access-option.selected { border-color: var(--green); background: var(--bg-card-2); }
.access-option:hover { transform: none; box-shadow: none; }
.access-option-badge, .status-badge, .access-badge { border-radius: 4px; }
.create-summary { border-color: var(--border); }
.links-table .connection-row:hover td { background: var(--bg-card-2); }
.links-table .connection-row td { border-color: var(--border); }
.upgrade-banner { border-radius: 6px; }
.btn-fresh-link, .btn-copy-link, .btn-retry { border-radius: 6px; }
.btn-fresh-link, .btn-cancel-link {
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid var(--border-hover);
  background: var(--bg-card-2);
  color: var(--text);
  font: inherit;
  font-size: .76rem;
  font-weight: 650;
  cursor: pointer;
}
.btn-fresh-link:hover { border-color: var(--accent); color: var(--accent); }
.btn-cancel-link { border-color: transparent; background: transparent; color: var(--text-secondary); }
.btn-cancel-link:hover { color: var(--red); text-decoration: underline; }
.btn-fresh-link:disabled, .btn-cancel-link:disabled { opacity: .55; cursor: wait; }
.connection-actions-cell { white-space: normal; min-width: 210px; }
.connection-actions-cell button + button { margin-left: 6px; }
.connection-details-row td { padding: 0 18px 12px 60px !important; }
.connection-details { width: 100%; min-width: 0; }
.connection-details > summary {
  width: max-content;
  max-width: 100%;
  color: var(--text-secondary);
  font-size: .75rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}
.connection-details > summary::-webkit-details-marker { display: none; }
.connection-details > summary::after { content: '⌄'; display: inline-block; margin-left: 7px; transition: transform .15s; }
.connection-details[open] > summary::after { transform: rotate(180deg); }
.connection-details-content { display: grid; justify-items: start; gap: 10px; margin-top: 12px; }
.connection-details-meta { color: var(--text-muted); font-size: .73rem; }
.link-card-item .client-cell { min-width: 0; }
.link-card-item .client-cell > div { min-width: 0; }
.link-card-item .link-card-name { overflow-wrap: anywhere; line-height: 1.3; }
.link-card-item .link-card-header { gap: 10px; }
.link-card-item .link-card-actions { flex-wrap: wrap; }
.link-card-item .link-card-actions button { flex: 1 1 auto; margin: 0; }
.link-card-item .connection-details { border-top: 1px solid var(--border); padding-top: 12px; }
.link-card-item { border-radius: 8px; box-shadow: none; }
.founding-availability { margin: 14px 0 0; color: var(--text-secondary); font-size: .82rem; font-weight: 600; }

.l-nav { height: 68px; }
.mobile-start-btn { box-shadow: none; }
.hero-section {
  display: block !important;
  position: relative;
  max-width: none;
  min-height: 610px;
  padding: 100px max(5vw, calc((100vw - 1240px)/2)) 68px;
  isolation: isolate;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}
[data-theme="light"] .hero-section { background: #eaf0ed; }
.hero-info, .hero-info[style] {
  position: relative;
  z-index: 2;
  display: flex !important;
  width: min(100%, 620px);
  max-width: 620px;
  align-items: flex-start;
  gap: 20px;
}
.hero-info h1 {
  width: 100%;
  max-width: 12ch;
  margin: 0;
  font-size: 3.4rem;
  font-weight: 700;
  line-height: 1.06;
  text-align: left;
}
.hero-info p { max-width: 47ch; font-size: 1.08rem; line-height: 1.55; text-align: left; }
.hero-ctas { width: auto; margin: 0; }
.hero-start-btn, .hero-ctas .btn-primary {
  width: auto;
  min-width: 174px;
  min-height: 52px;
  padding: 11px 22px;
  border-radius: 6px;
  box-shadow: none;
}
.hero-start-btn small { font-size: .68rem; }
.hero-proof { margin: 0; }
.hero-free-chip, .hero-proof .hero-free-chip {
  padding: 7px 10px !important;
  min-height: 0;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--bg-card);
  color: var(--text-secondary);
  box-shadow: none;
}
.hero-free-chip::before { display: none; }
.hero-value-list, .hero-steps { display: none !important; }
.hero-preview-panel {
  position: absolute;
  z-index: 1;
  inset: 38px max(3vw, calc((100vw - 1360px)/2)) 38px auto;
  width: min(61vw, 900px);
  min-height: 0;
  height: auto;
  margin: 0;
  pointer-events: none;
}
.hero-art-stage, [data-theme="light"] .hero-art-stage {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
}
.hero-generated-art {
  display: block !important;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: right center;
  border: 1px solid var(--border);
  border-radius: 8px;
  opacity: 1;
}
.hero-art-vignette, .hero-desktop-meta-badge,
.hero-desktop-proof-chip, .hero-product-preview { display: none !important; }
.comparison-section, .trust-section, .l-section { background-image: none !important; box-shadow: none; }
[data-theme="light"] .comparison-section,
[data-theme="light"] .trust-section,
[data-theme="light"] .l-section { background-color: #f3f6f5; }
.comparison-grid, .comparison-card, .comparison-row,
.trust-model-main, .trust-model-after, .feature-card,
.credibility-panel, .problem-card, .operating-model-card,
.pricing-card-saas, .savings-calculator, .savings-result,
.dashboard-demo-shell, .soft-sim-grid, .soft-sim-autoplay-container {
  border-radius: 8px;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.comparison-card:hover, .feature-card:hover, .problem-card:hover,
.pricing-card-saas:hover, .soft-sim-grid:hover,
.soft-sim-autoplay-container:hover { transform: none; box-shadow: none; }
.comparison-row, .comparison-card, .feature-card, .problem-card,
.credibility-panel, .trust-model-main, .trust-model-after,
.pricing-card-saas, .operating-model-card {
  background: var(--bg-card);
  border-color: var(--border);
}
.comparison-card.is-bifro, .comparison-card.bifro-way,
.comparison-row.is-bifro { background: var(--bg-card-2); }
.operating-model-card { background: #1b2326; color: #f0f4f3; }
.operating-model-card h3 { color: #f0f4f3; }
.operating-model-card::after { display: none; }
.feature-card::after { display: none; }
.feature-visual { background: var(--bg-card-2); border-radius: 6px; }
[data-theme="light"] .feature-card,
[data-theme="light"] .credibility-panel,
[data-theme="light"] .problem-card,
[data-theme="light"] .calc-card,
[data-theme="light"] .pricing-card-saas,
[data-theme="light"] .faq-item,
[data-theme="light"] .agency-trust-card,
[data-theme="light"] .agency-trust-route,
[data-theme="light"] .soft-sim-grid,
[data-theme="light"] .lifetime-card {
  background: var(--bg-card);
  border-color: var(--border);
  box-shadow: none;
}
[data-theme="light"] .agency-trust-card.featured { background: var(--bg-card-2); }
[data-theme="light"] .for-agencies-section { background: #f3f6f5; }
[data-theme="light"] .soft-sim-sidebar { background: #edf2f0; border-color: var(--border); }
[data-theme="light"] .soft-sim-main { background: #f8faf9; }
[data-theme="light"] .feature-visual { background: #edf2f0; }
[data-theme="light"] .demo-mode-toggle-wrap,
[data-theme="light"] .demo-action-chip { box-shadow: none; border-color: var(--border); }
[data-theme="light"] .pricing-card-saas.popular,
[data-theme="light"] .pricing-card-saas.free-highlight { box-shadow: none; }
[data-theme="light"] .pricing-card-saas.popular { border-color: var(--accent); }
[data-theme="light"] .pricing-card-saas.free-highlight { border-color: var(--green); }
.client-link-card, .facebook-login-card, .meta-approval-card,
[data-theme="light"] .client-link-card,
[data-theme="light"] .facebook-login-card,
[data-theme="light"] .meta-approval-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  box-shadow: none;
}
.client-link-logo, .meta-logo-dot { background: var(--accent-grad); box-shadow: none; border-radius: 6px; }
.facebook-logo-dot { box-shadow: none; }
.demo-action-chip, .demo-action-chip:hover, .demo-action-chip.is-active,
.demo-action-chip.is-primary:hover {
  border-radius: 6px;
  background: var(--bg-card);
  color: var(--text);
  box-shadow: none;
  transform: none;
}
.demo-action-chip.is-active, .demo-action-chip.is-primary:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.demo-action-chip::before, .pricing-cad-note::before { box-shadow: none; }
.pricing-cad-note { border-radius: 6px; box-shadow: none; }
.pricing-card-saas.popular, .pricing-card-saas.free-highlight {
  border-color: var(--accent);
  box-shadow: none;
}
.pricing-card-saas.free-highlight { border-color: var(--green); }
.pricing-card-saas.popular::after,
.pricing-card-saas.free-highlight::after { border-radius: 4px; background: var(--accent-grad); }
.pricing-card-saas.free-highlight::after { background: var(--green); }
.pricing-card-saas.free-highlight button,
.pricing-card-saas.free-highlight button:hover {
  border-radius: 6px;
  background: var(--green) !important;
  color: #fff !important;
  box-shadow: none !important;
  transform: none !important;
}
.hero-mini-economics { background: var(--bg-card); border-radius: 6px; }
.comparison-card, .feature-card, .trust-pill, .trust-model,
.sim-card, .sim-access-card, .client-link-card,
.facebook-login-card, .meta-approval-card {
  border-radius: 8px;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.sim-card:hover, .feature-card:hover, .comparison-card:hover { transform: none; box-shadow: none; }
.sim-progress-fill { background: var(--accent); box-shadow: none; }
.sim-access-card.selected { border-color: var(--green); box-shadow: none; }
.sim-access-check { box-shadow: none; }
.mobile-sticky-cta, .mobile-sticky-cta-action { border-radius: 6px; box-shadow: none; }

.pricing-header { padding: 54px 24px 34px; }
.pricing-header h1 { font-size: 2.7rem; font-weight: 700; }
.pricing-header p { max-width: 600px; }
.plan-grid { gap: 12px; margin-bottom: 52px; }
.plan-card, .plan-card.highlighted, .plan-card.free-highlight {
  padding: 26px 22px;
  border-color: var(--border);
  box-shadow: none;
}
.plan-card.highlighted { border-color: var(--accent); }
.plan-card.free-highlight { border-color: var(--green); }
.plan-card .plan-icon { border-radius: 6px; }
.plan-card .plan-name { font-size: 1.18rem; font-weight: 700; }
.plan-card .plan-price .amount { font-size: 2.3rem; font-weight: 700; }
.plan-card .popular-badge, .plan-card.highlighted .popular-badge {
  border-radius: 4px;
  background: var(--accent-grad);
  box-shadow: none;
}
.plan-card.free-highlight .popular-badge { background: var(--green); box-shadow: none; }
.plan-card .plan-cta, .plan-card.free-highlight .plan-cta.outline {
  min-height: 44px;
  border-radius: 6px;
  box-shadow: none;
}
.plan-card.free-highlight .plan-cta.outline { background: var(--green); color: #071a15; }
.plan-card .plan-cta:hover { transform: none; box-shadow: none; }
.lifetime-row::before, .lifetime-card::after { display: none; }
.lifetime-card {
  border: 1px solid var(--border);
  border-left: 4px solid var(--yellow);
  border-radius: 8px;
  background: var(--bg-card);
  box-shadow: none;
  backdrop-filter: none;
}
[data-theme="light"] .lifetime-card { border-left-color: var(--yellow); }
.lifetime-badge { border-radius: 4px; background: var(--yellow); box-shadow: none; }
.lifetime-price { color: var(--text); font-weight: 700; }
.lifetime-btn { background: var(--text); color: var(--bg); }
.lifetime-btn:hover { background: var(--text-secondary); color: var(--bg); }
.modal-overlay { backdrop-filter: none; -webkit-backdrop-filter: none; }
.modal, .sub-modal { border-radius: 8px; box-shadow: var(--shadow-lg); }
.dashboard-body > .card, .dashboard-body section > .card,
.dashboard-body > .card:hover, .dashboard-body section > .card:hover {
  border-radius: 8px;
  box-shadow: none;
  transform: none;
}

@media (max-width: 1024px) {
  .stats-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hero-section {
    display: block !important;
    min-height: 780px;
    padding: 58px 5vw 420px !important;
  }
  .hero-preview-panel {
    inset: auto 5vw 34px;
    width: auto;
    height: 360px;
  }
}
@media (max-width: 640px) {
  .dashboard-body { padding: 22px 16px 68px; gap: 20px; }
  .dashboard-command { display: flex; flex-direction: column; align-items: stretch; padding: 0 0 20px; gap: 16px; }
  .dashboard-command h1 { font-size: 1.5rem; }
  .dashboard-command-actions { width: 100%; }
  .dashboard-command-primary { flex: 1; }
  .stats-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .stat-card { min-height: 82px; padding: 12px; }
  .stat-icon { display: none; }
  #usage-card { grid-column: 1 / -1; }
  .create-panel { padding: 18px; }
  .l-nav { padding-inline: 16px; }
  .brand-bifro-logo { width: 94px; height: 38px; flex-basis: 94px; background-size: 94px 94px; background-position: left -28px; }
  .nav-product-name { font-size: .82rem; padding-left: 8px; }
  .hero-section {
    min-height: 0;
    padding: 42px 20px 32px !important;
  }
  .hero-info { width: 100%; gap: 14px; }
  .hero-info h1 {
    max-width: 15ch;
    margin: 0;
    font-size: 2.3rem;
    line-height: 1.11;
    text-align: left;
  }
  .hero-info p { max-width: 39ch; margin: 0; font-size: .98rem; text-align: left; }
  .hero-ctas { margin: 4px 0 0; }
  .hero-start-btn, .hero-ctas .btn-primary { min-height: 48px; width: auto; }
  .hero-proof { justify-content: flex-start; }
  .hero-preview-panel {
    position: relative;
    inset: auto;
    width: calc(100% + 16px);
    height: auto;
    aspect-ratio: 1.65 / 1;
    margin: 26px -8px 0;
    order: initial;
  }
  .hero-generated-art { object-position: center; }
  .pricing-header { padding: 38px 18px 28px; }
  .pricing-header h1 { font-size: 2rem; }
  .plan-grid { gap: 14px; }
}
@media (max-width: 360px) {
  .hero-info h1 { font-size: 2rem; }
  .hero-preview-panel { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .reveal, .plan-card, .sim-card { animation: none !important; transition: none !important; }
}
