/* Light is the site-wide default again. The two deliberate exceptions —
   /security and the shared footer (.ft-footer) — carry their own local
   dark overrides right where they're used, so they stay dark regardless
   of these root values. */
:root {
  --ink: #11110F;
  --muted: #67665F;
  --border: #E7E6DF;
  --accent: #4C3AFF;
  --bg: #FFFFFF;
  --secondary: #FFCA0A;
  --surface: #FFFFFF;
}

/* ---------- Global type scale ----------
   Single source of truth for Foundly's typographic hierarchy. Every heading,
   subtitle, body, UI, secondary, metric, and label style in the app should
   trace back to one of these tokens rather than a one-off font-size. */
:root {
  --fs-display: 52px; --lh-display: 1.02; --fw-display: 500; --ls-display: -0.05em;
  --fs-h1: 36px;      --lh-h1: 1.1;       --fw-h1: 500;      --ls-h1: -0.045em;
  --fs-h2: 26px;      --lh-h2: 1.2;       --fw-h2: 500;      --ls-h2: -0.035em;
  --fs-h3: 18px;      --lh-h3: 1.3;       --fw-h3: 500;      --ls-h3: -0.02em;
  --fs-subtitle: 17px; --lh-subtitle: 1.55; --fw-subtitle: 400; --ls-subtitle: -0.01em;
  --fs-body: 14px;    --lh-body: 1.65;    --fw-body: 400;    --ls-body: -0.005em;
  --fs-ui: 14px;      --fw-ui: 450;       --ls-ui: -0.01em;
  --fs-secondary: 12px; --lh-secondary: 1.5; --fw-secondary: 400;
  --fs-metric: 40px;  --lh-metric: 1;     --fw-metric: 500;  --ls-metric: -0.045em;
  --fs-label: 12px;   --fw-label: 500;    --ls-label: 0.08em;
}
.fd-display { font-size: var(--fs-display); line-height: var(--lh-display); font-weight: var(--fw-display); letter-spacing: var(--ls-display); }
.fd-h1 { font-size: var(--fs-h1); line-height: var(--lh-h1); font-weight: var(--fw-h1); letter-spacing: var(--ls-h1); }
.fd-h2 { font-size: var(--fs-h2); line-height: var(--lh-h2); font-weight: var(--fw-h2); letter-spacing: var(--ls-h2); }
.fd-h3 { font-size: var(--fs-h3); line-height: var(--lh-h3); font-weight: var(--fw-h3); letter-spacing: var(--ls-h3); }
.fd-subtitle { font-size: var(--fs-subtitle); line-height: var(--lh-subtitle); font-weight: var(--fw-subtitle); letter-spacing: var(--ls-subtitle); }
.fd-body { font-size: var(--fs-body); line-height: var(--lh-body); font-weight: var(--fw-body); letter-spacing: var(--ls-body); }
.fd-ui { font-size: var(--fs-ui); font-weight: var(--fw-ui); letter-spacing: var(--ls-ui); }
.fd-secondary { font-size: var(--fs-secondary); line-height: var(--lh-secondary); font-weight: var(--fw-secondary); }
.fd-metric { font-size: var(--fs-metric); line-height: var(--lh-metric); font-weight: var(--fw-metric); letter-spacing: var(--ls-metric); }
.fd-label { font-size: var(--fs-label); font-weight: var(--fw-label); letter-spacing: var(--ls-label); text-transform: uppercase; }
:root[data-theme="dark"] .profile-btn-danger { background: rgba(230, 111, 81, 0.16); color: #DF795F; }
* { box-sizing: border-box; }
html, body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", sans-serif;
  overscroll-behavior: none;
}
/* Blanket enforcement: every element inherits the site font unless a more
   specific rule overrides it (e.g. the monospace prompt/code blocks), so no
   widget, form control, or one-off element can silently fall back to the
   browser's default UI font. */
*, *::before, *::after { font-family: inherit; }
a { color: inherit; }

/* ---------- Header ---------- */
/* Always fixed to the very top, full width, white — no more shrinking
   into a floating inset pill on scroll. Only .on-dark (over the black
   encryption/footer block further down the page) swaps the color; a
   scrolled state just adds a hairline border + soft shadow. */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  padding: 14px 24px;
  border-radius: 0;
  border: 1px solid transparent;
  border-bottom-color: transparent;
  background: var(--surface);
  box-shadow: none;
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.site-header.scrolled {
  border-bottom-color: var(--border);
  box-shadow: 0 4px 20px rgba(17, 17, 15, 0.06);
}
.site-header.on-dark {
  /* Tool pages set --lpt-accent on <body>, so the header matches that
     tool's own color while over its hero; pages without it (homepage,
     over the black hero/footer) fall back to flat black. */
  background: var(--lpt-accent, #000000);
  border-bottom-color: transparent;
  box-shadow: none;
}
.site-header.on-dark .brand span { color: #fff; }
.site-header.on-dark .sh-menu-trigger,
.site-header.on-dark .sh-menu-link {
  color: rgba(255, 255, 255, 0.7);
}
.site-header.on-dark .sh-menu-trigger:hover,
.site-header.on-dark .sh-menu-link:hover,
.site-header.on-dark .sh-menu-item:hover .sh-menu-trigger,
.site-header.on-dark .sh-menu-item:focus-within .sh-menu-trigger {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}
.site-header.on-dark .menu-toggle { color: #fff; }

/* Header "Log in" — always transparent, text color follows whatever the
   header is currently sitting on (dark hero vs. scrolled white bar). */
.header-actions .btn-ghost { background: transparent; border-color: transparent; color: var(--ink); }
.header-actions .btn-ghost:hover { background: rgba(17, 17, 15, 0.06); }
.site-header.on-dark .header-actions .btn-ghost { color: #fff; }
.site-header.on-dark .header-actions .btn-ghost:hover { background: rgba(255, 255, 255, 0.1); }

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  flex-shrink: 0;
}
.brand img { width: 34px; height: 34px; border-radius: 9px; }
.brand span { font-weight: 700; font-size: 18px; letter-spacing: -0.02em; color: var(--ink); }

.sh-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

.sh-menu {
  display: flex;
  align-items: center;
  gap: 2px;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}
.sh-menu-item { position: relative; }
.sh-menu-trigger,
.sh-menu-link {
  display: flex;
  align-items: center;
  gap: 5px;
  border: none;
  background: none;
  text-decoration: none;
  color: var(--muted);
  font-size: var(--fs-ui);
  font-weight: var(--fw-ui);
  letter-spacing: var(--ls-ui);
  padding: 9px 14px;
  border-radius: 8px;
  font-family: inherit;
  transition: background 0.15s ease, color 0.15s ease;
}
.sh-menu-trigger { cursor: default; }
.sh-menu-link { cursor: pointer; }
.sh-menu-trigger:hover,
.sh-menu-link:hover,
.sh-menu-item:hover .sh-menu-trigger,
.sh-menu-item:focus-within .sh-menu-trigger {
  background: var(--surface);
  color: var(--ink);
}
.sh-menu-trigger i { font-size: 9px; transition: transform 0.2s ease; }
.sh-menu-item:hover .sh-menu-trigger i,
.sh-menu-item:focus-within .sh-menu-trigger i { transform: rotate(180deg); }

.sh-menu-panel {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(-6px);
  background: var(--panel, #FFFFFF);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: 0 16px 40px rgba(17, 17, 15, 0.14);
  padding: 10px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
  z-index: 60;
}
/* Floating panel picks up the header's own current color (light glass vs
   the tool's accent/black) instead of always being flat white, so it reads
   as an extension of the header rather than a mismatched popover. */
.site-header.on-dark .sh-menu-panel {
  background: color-mix(in srgb, var(--lpt-accent, #000000) 92%, transparent);
  border-color: rgba(255, 255, 255, 0.14);
}
.site-header.on-dark .sh-menu-card-title,
.site-header.on-dark .sh-menu-list a { color: #fff; }
.site-header.on-dark .sh-menu-card-desc { color: rgba(255, 255, 255, 0.6); }
.site-header.on-dark .sh-menu-card:hover,
.site-header.on-dark .sh-menu-list a:hover { background: rgba(255, 255, 255, 0.1); }
.site-header.on-dark .sh-menu-list a i { color: rgba(255, 255, 255, 0.55); }
.site-header.on-dark .sh-menu-footer { border-top-color: rgba(255, 255, 255, 0.14); }
.site-header.on-dark .sh-menu-footer p { color: rgba(255, 255, 255, 0.6); }
.site-header.on-dark .sh-menu-footer a { color: #fff; }
.sh-menu-item:hover .sh-menu-panel,
.sh-menu-item:focus-within .sh-menu-panel {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.sh-menu-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2px; width: 560px; max-width: 80vw; }
.sh-menu-card { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 10px; text-decoration: none; }
.sh-menu-card:hover { background: var(--surface); }
.sh-menu-card-icon.nav-icon-badge { width: 40px; height: 40px; border-radius: 11px; padding: 8px; }
.sh-menu-card-icon.nav-icon-badge i { font-size: 17px; }
.sh-menu-card-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sh-menu-card-title { font-size: var(--fs-ui); font-weight: 600; letter-spacing: var(--ls-ui); color: var(--ink); }
.sh-menu-card-desc { font-size: var(--fs-secondary); line-height: var(--lh-secondary); color: var(--muted); }
.sh-menu-footer { padding: 10px 8px 4px; margin-top: 4px; border-top: 1px solid var(--border); }
.sh-menu-footer p { margin: 0; font-size: var(--fs-secondary); color: var(--muted); }
.sh-menu-footer a { color: var(--ink); font-weight: 600; text-decoration: underline; }

.sh-menu-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; width: 420px; max-width: 80vw; }
.sh-menu-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 1px; }
.sh-menu-list a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 9px;
  text-decoration: none;
  font-size: var(--fs-ui);
  font-weight: 500;
  letter-spacing: var(--ls-ui);
  color: var(--ink);
}
.sh-menu-list a:hover { background: var(--surface); }
.sh-menu-list a i { font-size: 15px; color: var(--muted); width: 16px; text-align: center; flex-shrink: 0; }

.nav-icon-badge {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  box-sizing: border-box;
  border: 1.5px solid var(--badge-border);
  background: var(--badge-bg);
}
.nav-icon-badge i {
  font-size: 14px;
  width: auto;
  line-height: 1;
  text-align: center;
  position: relative;
  top: 1px;
  color: #fff;
}
.badge-private-mode { --badge-bg: #4C9AE8; --badge-border: #1D5FA8; }
.badge-idea-validator { --badge-bg: #22C55E; --badge-border: #008A2E; }
.badge-idea-generator { --badge-bg: #FBBF24; --badge-border: #D99A00; }
.badge-startups-library { --badge-bg: #F97316; --badge-border: #C93E00; }
.badge-market-research { --badge-bg: #EC4899; --badge-border: #BA005A; }
.badge-competitor-research { --badge-bg: #E53935; --badge-border: #B20400; }
.badge-customer-research { --badge-bg: #4F46E5; --badge-border: #0B00BB; }
.badge-mvp-planner { --badge-bg: #6D29D9; --badge-border: #4C00A2; }
.badge-website-analyzer { --badge-bg: #38BEF8; --badge-border: #0287C7; }
.badge-mrr-calculator { --badge-bg: #059669; --badge-border: #024D35; }
.badge-name-generator { --badge-bg: #D946EF; --badge-border: #93039D; }
.badge-seo-analyzer { --badge-bg: #F43F5E; --badge-border: #9F0025; }
.badge-equity-calculator { --badge-bg: #0891B2; --badge-border: #045063; }
.badge-runway-calculator { --badge-bg: #EAB308; --badge-border: #8A6400; }

/* ---------- Tool card: used in the landing page's "One workspace" stack
   and re-used as-is for each dedicated tool page's first section ---------- */
.lp-stack-card { width: 100%; scroll-margin-top: 96px; display: flex; flex-wrap: wrap; align-items: center; gap: 40px 56px; border: 1px solid var(--border); border-radius: 24px; background: var(--bg); padding: 48px; }
.lp-stack-card-content { flex: 1 1 0; min-width: 0; }
.lp-stack-card-head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.lp-stack-card-icon.nav-icon-badge { width: 56px; height: 56px; border-radius: 16px; padding: 13px; flex-shrink: 0; }
.lp-stack-card-icon.nav-icon-badge i { font-size: 24px; }
.lp-stack-card h3 { font-size: var(--fs-h2); line-height: var(--lh-h2); font-weight: var(--fw-h2); letter-spacing: var(--ls-h2); color: var(--ink); margin: 0; }
.lp-stack-card .lp-stack-card-tagline { font-size: var(--fs-h1); line-height: var(--lh-h1); font-weight: var(--fw-h1); letter-spacing: var(--ls-h1); color: var(--ink); margin: 0 0 14px; max-width: 640px; }
.lp-stack-card p { font-size: var(--fs-subtitle); line-height: var(--lh-subtitle); font-weight: var(--fw-subtitle); letter-spacing: var(--ls-subtitle); color: var(--muted); margin: 0; max-width: 560px; }
.lp-stack-card-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 22px;
  padding: 15px 24px;
  border-radius: 14px;
  border: 1.5px solid transparent;
  font-size: var(--fs-ui);
  font-weight: 700;
  letter-spacing: var(--ls-ui);
  color: #fff;
  text-decoration: none;
}
.lp-stack-card-cta svg { width: 16px; height: 16px; transition: transform 0.15s ease; }
.lp-stack-card-cta:hover svg { transform: translateX(3px); }

.lp-mockup-frame {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 16px;
  border: 1px dashed var(--border);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--muted);
}
.lp-mockup-frame i { font-size: 26px; }
.lp-mockup-frame span { font-size: var(--fs-secondary); line-height: var(--lh-secondary); font-weight: var(--fw-secondary); }
.lp-stack-card .lp-mockup-frame { flex: 1 1 0; min-width: 0; margin-top: 0; }

/* Mockup slot filled with a real product video instead of the placeholder
   icon — plays silently on loop, never interactive (no controls, no
   clicks, nothing to pause/seek). */
.lp-mockup-frame.has-video { padding: 0; overflow: hidden; border-style: solid; }
.lp-mockup-frame.has-video video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
  border-radius: inherit;
}

@media (max-width: 860px) {
  .lp-stack-card { flex-direction: column; align-items: stretch; gap: 0; padding: 28px; border-radius: 20px; }
  /* flex: 1 1 0 only makes sense while .lp-stack-card lays its children out
     as a row — once it stacks into a column, that flex-basis:0 collapses
     the frame to zero height (the card itself has no fixed height to grow
     into), which is why the video mockups disappeared on mobile. Drop back
     to a plain full-width block sized by its own aspect-ratio instead. */
  .lp-stack-card .lp-mockup-frame { flex: none; width: 100%; margin-top: 26px; }
}

.lp-stack-info {
  flex: 1 1 100%;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px 40px;
}
.lp-stack-info-item h4 { font-size: var(--fs-h3); line-height: var(--lh-h3); font-weight: var(--fw-h3); letter-spacing: var(--ls-h3); color: var(--ink); margin: 0 0 10px; }
.lp-stack-info-item p { font-size: var(--fs-subtitle); line-height: var(--lh-subtitle); font-weight: var(--fw-subtitle); letter-spacing: var(--ls-subtitle); color: var(--muted); margin: 0; max-width: none; }

@media (max-width: 860px) {
  .lp-stack-info { grid-template-columns: 1fr; gap: 24px; margin-top: 26px; }
}

.lp-stack-card-cta { transition: opacity 0.15s ease; }
.lp-stack-card-cta:hover { opacity: 0.88; }
.lp-stack-card:has(.badge-idea-validator) .lp-stack-card-cta { background: #22C55E; border-color: #008A2E; }
.lp-stack-card:has(.badge-idea-generator) .lp-stack-card-cta { background: #FBBF24; border-color: #D99A00; }
.lp-stack-card:has(.badge-startups-library) .lp-stack-card-cta { background: #F97316; border-color: #C93E00; }
.lp-stack-card:has(.badge-market-research) .lp-stack-card-cta { background: #EC4899; border-color: #BA005A; }
.lp-stack-card:has(.badge-competitor-research) .lp-stack-card-cta { background: #E53935; border-color: #B20400; }
.lp-stack-card:has(.badge-customer-research) .lp-stack-card-cta { background: #4F46E5; border-color: #0B00BB; }
.lp-stack-card:has(.badge-mvp-planner) .lp-stack-card-cta { background: #6D29D9; border-color: #4C00A2; }
.lp-stack-card:has(.badge-website-analyzer) .lp-stack-card-cta { background: #38BEF8; border-color: #0287C7; }
.lp-stack-card:has(.badge-private-mode) .lp-stack-card-cta { background: #4C9AE8; border-color: #1D5FA8; }

@media (max-width: 640px) {
  .lp-stack-card h3 { font-size: clamp(16px, 3.6vw, var(--fs-h2)); }
  .lp-stack-card .lp-stack-card-tagline { font-size: clamp(24px, 6vw, var(--fs-h1)); }
  /* Each tool page's own hero re-uses this same card — full size there
     instead of shrinking, so the tool page title reads the same on mobile
     as it does on desktop. */
  .lp-tool-hero .lp-stack-card h3 { font-size: var(--fs-h2); }
  .lp-tool-hero .lp-stack-card-tagline { font-size: var(--fs-h1); }
}

/* Single tool page hero: centered, borderless — mirrors the main landing
   page's hero (label, title, subtitle, CTA) instead of the boxed
   .lp-stack-card used for each tool's preview on the homepage stack. Flat
   solid color, same as that tool's own icon badge, regardless of theme —
   not a light/dark-adaptive surface. Full-bleed, edge to edge, same as the
   footer — the max-width/centering lives on the content inside it instead
   of on the section itself. */
.lp-tool-hero {
  position: relative;
  padding: 64px 24px 40px;
  background: var(--lpt-accent, var(--accent));
}
.lpt-hero-inner { max-width: 720px; margin: 0 auto 48px; text-align: center; position: relative; }
.lpt-hero-label {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 28px;
}
.lpt-hero-label .nav-icon-badge { width: 56px; height: 56px; border-radius: 16px; padding: 13px; flex-shrink: 0; }
.lpt-hero-label .nav-icon-badge i { font-size: 24px; }
.lpt-hero-label-text { font-size: var(--fs-h2); line-height: var(--lh-h2); font-weight: var(--fw-h2); letter-spacing: var(--ls-h2); color: var(--ink); }
.lpt-hero-title { font-size: clamp(44px, 7vw, 88px); font-weight: var(--fw-display); letter-spacing: var(--ls-display); line-height: var(--lh-display); color: var(--ink); margin: 0 0 22px; }
.lpt-hero-subtitle { font-size: var(--fs-subtitle); line-height: var(--lh-subtitle); font-weight: var(--fw-subtitle); letter-spacing: var(--ls-subtitle); color: var(--muted); margin: 0 auto 28px; max-width: 640px; }
.lpt-hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: 999px;
  background: var(--lpt-accent, var(--ink));
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
  transition: opacity 0.15s ease;
}
.lpt-hero-cta:hover { opacity: 0.88; }
.lpt-hero-cta svg { width: 16px; height: 16px; transition: transform 0.15s ease; }
.lpt-hero-cta:hover svg { transform: translateX(3px); }
.lpt-hero-mockup { margin-bottom: 40px; }

/* ---------- Single tool page: "What is / Features / Benefits / Ecosystem /
   Final CTA" sections that go below the hero. Shared across every tool
   landing page so a color accent + icon set is all each page needs to set. */
.lpt-section { max-width: 1200px; margin: 0 auto; padding: 72px 24px; }
.lpt-section-alt { max-width: none; background: var(--surface); }
.lpt-section-alt > .lpt-inner { max-width: 1200px; margin: 0 auto; padding: 72px 24px; }
@media (max-width: 640px) {
  .lpt-section { padding: 48px 20px; }
  .lpt-section-alt > .lpt-inner { padding: 48px 20px; }
}

.lpt-head { max-width: 640px; margin: 0 auto 48px; text-align: center; }
.lpt-head-left { max-width: 640px; margin: 0 0 48px; text-align: left; }
.lpt-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--fs-label);
  font-weight: var(--fw-label);
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  color: var(--lpt-accent, var(--accent));
  margin: 0 0 12px;
}
.lpt-title { font-size: var(--fs-h1); line-height: var(--lh-h1); font-weight: var(--fw-h1); letter-spacing: var(--ls-h1); color: var(--ink); margin: 0 0 12px; }
.lpt-lede { font-size: var(--fs-h3); line-height: var(--lh-h3); font-weight: var(--fw-h3); letter-spacing: var(--ls-h3); color: var(--ink); margin: 0 0 16px; }
.lpt-intro { font-size: var(--fs-subtitle); line-height: var(--lh-subtitle); font-weight: var(--fw-subtitle); letter-spacing: var(--ls-subtitle); color: var(--muted); margin: 0; }

/* "What is X" — reuses the same 3-col blurb grid as the hero's .lp-stack-info */
.lpt-blurb-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.lpt-blurb-grid h4 { font-size: var(--fs-h3); line-height: var(--lh-h3); font-weight: var(--fw-h3); letter-spacing: var(--ls-h3); color: var(--ink); margin: 0 0 10px; }
.lpt-blurb-grid p { font-size: var(--fs-subtitle); line-height: var(--lh-subtitle); font-weight: var(--fw-subtitle); letter-spacing: var(--ls-subtitle); color: var(--muted); margin: 0; }
@media (max-width: 860px) {
  .lpt-blurb-grid { grid-template-columns: 1fr; gap: 28px; }
}

/* "What is X" — bento variant: one tall card + two stacked cards, each with
   its own title, paragraph, and a mockup slot underneath. */
.lpt-bento { display: grid; grid-template-columns: 1fr 1fr; grid-auto-rows: 1fr; gap: 20px; text-align: left; }
.lpt-bento-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 32px;
  background: transparent;
}
.lpt-bento-card-lg { grid-row: span 2; }
.lpt-bento-card h4 { font-size: var(--fs-h3); line-height: var(--lh-h3); font-weight: var(--fw-h3); letter-spacing: var(--ls-h3); color: var(--ink); margin: 0 0 10px; }
.lpt-bento-card p { font-size: var(--fs-subtitle); line-height: var(--lh-subtitle); font-weight: var(--fw-subtitle); letter-spacing: var(--ls-subtitle); color: var(--muted); margin: 0 0 24px; }
.lpt-bento-mockup { flex: 1; min-height: 180px; aspect-ratio: auto; margin-top: auto; }
@media (max-width: 860px) {
  .lpt-bento { grid-template-columns: 1fr; }
  .lpt-bento-card-lg { grid-row: auto; }
  .lpt-bento-mockup { min-height: 140px; }
}

/* Features — icon-badge cards */
.lpt-feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.lpt-feature-card { border: 1px solid var(--border); border-radius: 18px; padding: 26px; background: var(--bg); }
.lpt-feature-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--lpt-accent, var(--accent)) 14%, transparent);
  color: var(--lpt-accent, var(--accent));
  font-size: 18px;
  margin-bottom: 16px;
}
.lpt-feature-card h4 { font-size: var(--fs-h3); line-height: var(--lh-h3); font-weight: var(--fw-h3); letter-spacing: var(--ls-h3); color: var(--ink); margin: 0 0 8px; }
.lpt-feature-card p { font-size: var(--fs-subtitle); line-height: var(--lh-subtitle); font-weight: var(--fw-subtitle); letter-spacing: var(--ls-subtitle); color: var(--muted); margin: 0; }
@media (max-width: 860px) {
  .lpt-feature-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .lpt-feature-grid { grid-template-columns: 1fr; }
}

/* Benefits — checklist-style rows in a 2-col grid */
.lpt-benefit-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px 40px; }
.lpt-benefit-item { display: flex; align-items: flex-start; gap: 14px; }
.lpt-benefit-check {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--lpt-accent, var(--accent));
  color: #fff;
  font-size: 12px;
  margin-top: 2px;
}
.lpt-benefit-item h4 { font-size: var(--fs-h3); line-height: var(--lh-h3); font-weight: var(--fw-h3); letter-spacing: var(--ls-h3); color: var(--ink); margin: 0 0 6px; }
.lpt-benefit-item p { font-size: var(--fs-subtitle); line-height: var(--lh-subtitle); font-weight: var(--fw-subtitle); letter-spacing: var(--ls-subtitle); color: var(--muted); margin: 0; }

/* Benefits — plain variant: no cards, transparent background, tool icon
   above each item, 3-col grid. */
.lpt-benefit-grid-plain { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px 32px; }
.lpt-benefit-plain-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--lpt-accent, var(--accent));
  border: 1.5px solid var(--lpt-accent-border, rgba(0, 0, 0, 0.16));
  color: #fff;
  font-size: 18px;
  margin-bottom: 18px;
}
.lpt-benefit-plain-item h4 { font-size: var(--fs-h3); line-height: var(--lh-h3); font-weight: var(--fw-h3); letter-spacing: var(--ls-h3); color: var(--ink); margin: 0 0 8px; }
.lpt-benefit-plain-item p { font-size: var(--fs-subtitle); line-height: var(--lh-subtitle); font-weight: var(--fw-subtitle); letter-spacing: var(--ls-subtitle); color: var(--muted); margin: 0; }
@media (max-width: 860px) {
  .lpt-benefit-grid-plain { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .lpt-benefit-grid-plain { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .lpt-benefit-grid { grid-template-columns: 1fr; }
}

/* Ecosystem — horizontal step flow across the other Foundly tools. Item
   count varies per tool page (5 or 6), so auto-fit keeps every row filling
   the full width instead of hardcoding a fixed column count. */
.lpt-eco-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; }
.lpt-eco-item {
  position: relative;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 22px 18px;
  background: var(--bg);
  text-decoration: none;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.lpt-eco-item:hover { border-color: var(--muted); transform: translateY(-2px); }
.lpt-eco-item.is-current { border-color: var(--lpt-accent, var(--accent)); background: color-mix(in srgb, var(--lpt-accent, var(--accent)) 6%, var(--bg)); }
.lpt-eco-step.nav-icon-badge { width: 40px; height: 40px; border-radius: 11px; padding: 8px; margin-bottom: 14px; }
.lpt-eco-step.nav-icon-badge i { font-size: 17px; }
.lpt-eco-item h4 { font-size: var(--fs-ui); font-weight: 650; letter-spacing: var(--ls-ui); color: var(--ink); margin: 0 0 6px; }
.lpt-eco-item p { font-size: var(--fs-secondary); line-height: var(--lh-secondary); color: var(--muted); margin: 0; }
@media (max-width: 960px) {
  .lpt-eco-row { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .lpt-eco-row { grid-template-columns: 1fr; }
}

/* Final CTA — full-bleed flat white, glued directly to the footer below it
   (zero gap, same base color) so the two read as one continuous light block
   instead of a floating card. Pages that need it dark (/security) override
   this locally. */
.lpt-cta {
  max-width: none;
  margin: 0;
  padding: 96px 40px;
  border-radius: 0;
  background-color: var(--bg);
  text-align: center;
}
.lpt-cta-logo { width: 56px; height: 56px; border-radius: 16px; margin: 0 auto 24px; display: block; box-shadow: 0 10px 28px rgba(0, 0, 0, 0.12); }
.lpt-cta h2 { font-size: clamp(40px, 6vw, 68px); line-height: var(--lh-h1); font-weight: var(--fw-h1); letter-spacing: var(--ls-h1); color: var(--ink); margin: 0 auto 12px; max-width: 720px; }
.lpt-cta p { font-size: var(--fs-subtitle); line-height: var(--lh-subtitle); font-weight: var(--fw-subtitle); letter-spacing: var(--ls-subtitle); color: var(--muted); margin: 0 auto 28px; max-width: 560px; }
.lpt-cta .btn { padding: 14px 26px; font-size: 15px; border-radius: 999px; }
.lpt-cta-sub { margin-top: 18px; font-size: 12.5px; color: var(--muted); }
@media (max-width: 640px) {
  .lpt-cta { padding: 56px 24px; }
  /* Same big mobile size as every other section title (.lp-section-head
     h2), so the final CTA doesn't read smaller than the rest of the page. */
  .lpt-cta h2 { font-size: clamp(30px, 9vw, 40px); }
}

/* "Everything you need" dock section — shared between the homepage stack
   and (copied verbatim) tool pages that want the same tool-jump dock. */
.lp-section-head { text-align: center; max-width: 780px; margin: 0 auto 40px; }
.lp-section-head h2 { font-size: clamp(40px, 6vw, 68px); line-height: var(--lh-h1); font-weight: var(--fw-h1); letter-spacing: var(--ls-h1); color: var(--ink); margin: 0 0 12px; }
@media (max-width: 640px) {
  /* Same bigger, more hero-like mobile size for every section that shares
     .lp-section-head (stack, benefits, privacy, audience, testimonials,
     FAQ) — they all need to read at the same scale on mobile, not just
     "Everything you need to build your next startup". */
  .lp-section-head h2 { font-size: clamp(30px, 9vw, 40px); }
}
.lp-section-head p { color: var(--muted); font-size: var(--fs-subtitle); line-height: var(--lh-subtitle); font-weight: var(--fw-subtitle); letter-spacing: var(--ls-subtitle); margin: 0; }

/* Encryption/privacy section — full-bleed flat black like .lpt-cta, but a
   large two-column feature block (mockup + 3 feature rows) rather than a
   short centered blurb, so it reads as a substantial section in its own
   right instead of a small aside. */
.lp-priv2 { background-color: #000000; padding: 120px 40px; }
.lp-priv2-inner { max-width: 1160px; margin: 0 auto; }
.lp-priv2-head { max-width: 680px; margin: 0 auto 72px; text-align: center; }
.lp-priv2-icon {
  width: 56px; height: 56px; margin: 0 auto 22px; border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.25); background: rgba(255, 255, 255, 0.05);
  display: flex; align-items: center; justify-content: center;
}
.lp-priv2-icon i { font-size: 22px; color: #fff; }
.lp-priv2-head h2 { font-size: clamp(40px, 6vw, 68px); line-height: var(--lh-h1); font-weight: var(--fw-h1); letter-spacing: var(--ls-h1); color: #fff; margin: 0 0 12px; }
.lp-priv2-head p { font-size: var(--fs-subtitle); line-height: var(--lh-subtitle); font-weight: var(--fw-subtitle); letter-spacing: var(--ls-subtitle); color: rgba(255, 255, 255, 0.6); margin: 0; }

.lp-priv2-body { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }

.lp-priv2-mockup {
  width: 100%;
  min-height: 420px;
  border-radius: 20px;
  background: #0B0B0C;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.45);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.priv-code-topbar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.priv-code-dot { width: 10px; height: 10px; border-radius: 50%; }
.priv-code-dot-r { background: #FF5F57; }
.priv-code-dot-y { background: #FEBC2E; }
.priv-code-dot-g { background: #28C840; }
.priv-code-topbar-label { margin-left: 8px; font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 12px; color: rgba(255, 255, 255, 0.4); }
.priv-code-body {
  margin: 0;
  padding: 32px 28px 36px;
  flex: 1;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 18px;
  line-height: 1.9;
  white-space: pre-wrap;
  word-break: break-word;
  color: #E7E6DF;
}
.priv-code-line { min-height: 1.9em; }
.tok-key { color: #F472B6; }
.tok-str { color: #4ADE80; }
.tok-str.tok-cipher { color: #FB923C; }
.tok-bool { color: #60A5FA; }
.tok-punc { color: rgba(255, 255, 255, 0.55); }
.priv-code-cursor {
  display: inline-block;
  width: 8px;
  height: 1em;
  margin-left: 2px;
  background: #E7E6DF;
  vertical-align: -0.15em;
  animation: priv-code-blink 0.9s step-end infinite;
}
@keyframes priv-code-blink { 50% { opacity: 0; } }

.lp-priv2-features { display: flex; flex-direction: column; gap: 36px; }
.lp-priv2-feature-text h3 { font-size: var(--fs-h1); line-height: var(--lh-h1); font-weight: var(--fw-h1); letter-spacing: var(--ls-h1); color: #fff; margin: 0 0 10px; }
.lp-priv2-feature-text p { font-size: var(--fs-subtitle); line-height: var(--lh-subtitle); font-weight: var(--fw-subtitle); letter-spacing: var(--ls-subtitle); color: rgba(255, 255, 255, 0.6); margin: 0; }

.lp-priv2-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: flex-start;
  margin-top: 8px;
  padding: 14px 26px;
  border-radius: 999px;
  background: #fff;
  color: #000;
  font-size: var(--fs-ui);
  font-weight: 650;
  letter-spacing: var(--ls-ui);
  text-decoration: none;
  transition: opacity 0.15s ease;
}
.lp-priv2-cta:hover { opacity: 0.8; }
.lp-priv2-cta svg { width: 16px; height: 16px; transition: transform 0.15s ease; }
.lp-priv2-cta:hover svg { transform: translateX(2px); }

@media (max-width: 900px) {
  .lp-priv2 { padding: 80px 24px; }
  .lp-priv2-head { margin-bottom: 48px; }
  .lp-priv2-body { grid-template-columns: 1fr; gap: 40px; }
  .lp-priv2-mockup { min-height: 340px; }
}
@media (max-width: 640px) {
  .lp-priv2-head h2 { font-size: clamp(30px, 9vw, 40px); }
  .priv-code-body { font-size: 15px; padding: 24px 20px 28px; }
}

/* Shared tool-landing-page template, applied to every /tool-name page
   (body class tpl-*, each with its own --lpt-accent/--lpt-accent-border set
   on <body> so both <header> and <main> can read it) — unified heading
   scale: every title on the page (hero + section heads) matches
   .lp-section-head h2. */
[class^="tpl-"] .lpt-hero-title,
[class^="tpl-"] .lp-stack-card-tagline,
[class^="tpl-"] .lpt-title {
  font-size: clamp(32px, 6vw, 68px);
  line-height: var(--lh-h1);
  font-weight: var(--fw-h1);
  letter-spacing: var(--ls-h1);
}
@media (max-width: 640px) {
  /* Same big mobile size as every other section title on the site — this
     rule's own base clamp above would otherwise shrink these all the way
     down to 32px on narrow screens. */
  [class^="tpl-"] .lpt-hero-title,
  [class^="tpl-"] .lp-stack-card-tagline,
  [class^="tpl-"] .lpt-title {
    font-size: clamp(38px, 11vw, 56px);
  }
}

/* Hero keeps the default template's layout (icon/title row, tagline,
   paragraph, CTA, mockup, 3-info grid) but loses the bordered "card" look —
   it should read as a free-standing hero, not a boxed preview card. Its
   own max-width/centering now lives here instead of on .lp-tool-hero,
   since that section itself is full-bleed. */
[class^="tpl-"] .lp-tool-hero .lp-stack-card {
  max-width: 1200px;
  margin: 0 auto;
  border: none;
  background: none;
  padding: 0;
  border-radius: 0;
}

/* Hero CTA is a real filled button here (white bg, accent-colored text)
   instead of the default template's plain colored-text link — needs to
   contrast against the hero's own solid accent-color background. */
[class^="tpl-"] .lp-tool-hero .lp-stack-card-cta {
  background: #fff;
  color: var(--lpt-accent);
  padding: 14px 26px;
  border-radius: 999px;
  border-color: transparent;
  transition: opacity 0.15s ease;
}
[class^="tpl-"] .lp-tool-hero .lp-stack-card-cta:hover { opacity: 0.88; color: var(--lpt-accent); }

/* Everything else in the hero sits directly on that solid accent color, so
   it all switches to a white/on-color treatment — the icon badge flips to
   a white circle (accent-colored icon) so it doesn't disappear into a
   same-color background. */
[class^="tpl-"] .lp-tool-hero .lp-stack-card h3,
[class^="tpl-"] .lp-tool-hero .lp-stack-card-tagline { color: #fff; }
[class^="tpl-"] .lp-tool-hero .lp-stack-card p { color: rgba(255, 255, 255, 0.75); }
[class^="tpl-"] .lp-tool-hero .lp-stack-card-icon.nav-icon-badge {
  background: #fff;
  border-color: rgba(255, 255, 255, 0.5);
}
[class^="tpl-"] .lp-tool-hero .lp-stack-card-icon.nav-icon-badge i { color: var(--lpt-accent); }
[class^="tpl-"] .lp-tool-hero .lp-mockup-frame {
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.7);
}
[class^="tpl-"] .lp-tool-hero .lp-stack-info-item h4 { color: #fff; }
[class^="tpl-"] .lp-tool-hero .lp-stack-info-item p { color: rgba(255, 255, 255, 0.7); }

/* Even vertical rhythm between every section on the page — 80px top/bottom
   each, no section-specific margins fighting it. */
[class^="tpl-"] .lp-tool-hero { padding-top: 80px; padding-bottom: 80px; }
[class^="tpl-"] .lpt-section { padding-top: 80px; padding-bottom: 80px; }
[class^="tpl-"] .lpt-section-alt > .lpt-inner { padding-top: 80px; padding-bottom: 80px; }
[class^="tpl-"] .lp-stack { margin-top: 0; padding-top: 80px; padding-bottom: 80px; }
@media (max-width: 640px) {
  [class^="tpl-"] .lp-tool-hero,
  [class^="tpl-"] .lpt-section,
  [class^="tpl-"] .lpt-section-alt > .lpt-inner,
  [class^="tpl-"] .lp-stack { padding-top: 56px; padding-bottom: 56px; }
}

/* Header "Sign up" — no brand yellow/accent color, just follows whatever
   the header is currently sitting on: black on the light/scrolled bar,
   white on the dark hero. */
.site-header .btn-secondary { background: var(--ink); color: var(--bg); }
.site-header.on-dark .btn-secondary { background: #fff; color: #000000; }

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 38px;
  padding: 0 18px;
  border-radius: 999px;
  font-size: var(--fs-ui);
  font-weight: var(--fw-ui);
  letter-spacing: var(--ls-ui);
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  white-space: nowrap;
}
.btn-ghost {
  background: var(--bg);
  color: var(--ink);
  border-color: var(--border);
}
.btn-ghost:hover { background: var(--surface); }
.btn-dark {
  background: var(--accent);
  color: var(--bg);
}
.btn-dark:hover { opacity: 0.9; }
.btn-secondary {
  background: var(--secondary);
  color: #11110F;
}
.btn-secondary:hover { opacity: 0.9; }

.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 22px;
  color: var(--ink);
  cursor: pointer;
  padding: 4px;
}

.nav-overlay { display: contents; }
.nav-overlay-close { display: none; }
.nav-overlay-scroll { display: none; }
.nav-overlay-actions { display: none; }

@media (max-width: 720px) {
  .header-actions { display: none; }
  .sh-menu { display: none; }
  .menu-toggle { display: inline-flex; }

  /* Dropdown anchored to the header's own bottom edge — not a full-screen
     takeover, so it reads as something that opened out of the header
     rather than a separate page-level layer. */
  .nav-overlay {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 70px;
    left: 16px;
    right: 16px;
    max-height: calc(100vh - 96px);
    background: var(--panel, #FFFFFF);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid var(--border);
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(17, 17, 15, 0.18);
    z-index: 90;
    padding: 8px 8px 16px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-8px) scale(0.98);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  }
  .nav-overlay.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0) scale(1);
  }
  .site-header.on-dark .nav-overlay {
    background: color-mix(in srgb, var(--lpt-accent, #000000) 94%, transparent);
    border-color: rgba(255, 255, 255, 0.14);
  }
  .site-header.on-dark .nav-overlay-group-label { color: rgba(255, 255, 255, 0.6); }
  .site-header.on-dark .nav-overlay-list a { color: #fff; }
  .site-header.on-dark .nav-overlay-list a i { color: rgba(255, 255, 255, 0.55); }
  .site-header.on-dark .nav-overlay-list a:active { background: rgba(255, 255, 255, 0.1); }
  .site-header.on-dark .nav-overlay-actions { border-top-color: rgba(255, 255, 255, 0.14); }
  .site-header.on-dark .nav-overlay-close { background: rgba(255, 255, 255, 0.14); color: #fff; }
  .nav-overlay-close {
    display: flex;
    align-items: center;
    justify-content: center;
    align-self: flex-end;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--surface);
    border: none;
    color: var(--ink);
    font-size: 14px;
    cursor: pointer;
    margin: 6px 6px 4px auto;
    flex-shrink: 0;
  }

  .nav-overlay-scroll { display: block; flex: 1; min-height: 0; overflow-y: auto; padding: 0 8px 8px; }
  .nav-overlay-group-label {
    font-size: var(--fs-label);
    font-weight: var(--fw-label);
    letter-spacing: var(--ls-label);
    text-transform: uppercase;
    color: var(--muted);
    padding: 14px 10px 8px;
  }
  .nav-overlay-list:first-of-type + .nav-overlay-group-label,
  .nav-overlay-scroll > .nav-overlay-group-label:first-child { padding-top: 0; }
  .nav-overlay-list { list-style: none; margin: 0; padding: 0; }
  .nav-overlay-list a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 10px;
    border-radius: 10px;
    text-decoration: none;
    font-size: var(--fs-h3);
    font-weight: var(--fw-h3);
    letter-spacing: var(--ls-h3);
    color: var(--ink);
  }
  .nav-overlay-list a:active { background: var(--surface); }
  .nav-overlay-list a i { font-size: 18px; color: var(--muted); width: 20px; text-align: center; flex-shrink: 0; }
  .nav-overlay-list a .nav-icon-badge { width: 36px; height: 36px; border-radius: 10px; padding: 7px; }
  .nav-overlay-list a .nav-icon-badge i { font-size: 16px; color: #fff; width: auto; }

  .nav-overlay-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    flex-shrink: 0;
    padding-top: 14px;
    border-top: 1px solid var(--border);
  }
  .nav-overlay-actions .btn { width: 100%; height: 48px; }
}

.validator-page-wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 56px 24px 40px;
}

.validator-hero-label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  margin: 0 0 22px;
  color: var(--ink);
  font-size: clamp(1.8rem, 3vw, 2.75rem);
  font-weight: 650;
  letter-spacing: -0.035em;
  line-height: 1.05;
}
.validator-hero-label i { display: block; font-size: 0.9em; color: var(--ink); }
.validator-hero-label span { font-size: 1em; font-weight: inherit; letter-spacing: inherit; color: var(--ink); }

.validator-hero-title {
  text-align: center;
  font-size: clamp(2.55rem, 5vw, 4.65rem);
  font-weight: 690;
  letter-spacing: -0.06em;
  line-height: 0.99;
  color: var(--ink);
  margin: 14px 0 28px;
}
@media (max-width: 760px) {
  .validator-hero-title { font-size: clamp(2.4rem, 11vw, 3.6rem); }
}
@media (max-width: 640px) {
  .validator-page-wrap { padding: 40px 16px 32px; }
  .validator-hero-title { margin-bottom: 20px; }
}

.validator-tool {
  width: 100%;
  display: flex;
  flex-direction: column;
}

.validator-tool-box {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.validator-tool-box textarea {
  border: none;
  outline: none;
  resize: none;
  background: transparent;
  font-family: inherit;
  font-size: 16px;
  color: var(--ink);
  min-height: 130px;
  max-height: 320px;
  width: 100%;
  overflow-y: auto;
}
.validator-tool-box textarea::placeholder { color: #99978F; }

.validator-tool-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.validator-cta {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  padding: 0;
  border-radius: 50%;
  border: none;
  background: var(--secondary);
  color: #11110F;
  font-size: 15px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
}
.validator-cta .cta-arrow { font-size: 20px; line-height: 1; }
.validator-cta:hover { opacity: 0.92; }
.validator-cta:disabled { opacity: 0.6; cursor: not-allowed; }

.validator-test-link {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
  padding: 0;
  border: none;
  background: none;
  color: var(--muted);
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
}
.validator-test-link:hover { color: var(--ink); }
.validator-test-link:disabled { opacity: 0.5; cursor: not-allowed; }


.private {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
}
.private i { font-size: 18px; }

.private-popover {
  position: absolute;
  bottom: calc(100% + 12px);
  left: 0;
  width: 280px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  box-shadow: 0 12px 32px rgba(17, 17, 15, 0.14);
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
  z-index: 20;
}
.private-popover.open,
.private:hover .private-popover { opacity: 1; visibility: visible; transform: translateY(0); }
.private-popover::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 18px;
  width: 12px;
  height: 12px;
  background: var(--bg);
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  transform: translateY(-6px) rotate(45deg);
}
.private-popover-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 6px;
}
.private-popover-text {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.55;
  margin: 0;
}
@media (max-width: 480px) {
  .private-popover { width: 240px; left: -8px; }
}

.switch {
  position: relative;
  width: 40px;
  height: 22px;
  border-radius: 999px;
  background: var(--accent);
  border: none;
  cursor: pointer;
  flex-shrink: 0;
}
.switch::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 20px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #FFFFFF;
  transition: left 0.15s ease;
}
.switch.off { background: #DEDDD7; }
.switch.off::after { left: 2px; }

.btn-spinner {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(17, 17, 15, 0.25);
  border-top-color: #11110F;
  animation: foundly-spin 0.7s linear infinite;
}
@keyframes foundly-spin {
  to { transform: rotate(360deg); }
}

.idea-error {
  display: none;
  color: #E66F51;
  font-size: 13px;
  margin-top: 10px;
  text-align: left;
}

.idea-free-hint {
  margin: 10px 0 0;
  font-size: 12.5px;
  color: var(--muted);
  text-align: left;
}
.idea-free-hint a { color: var(--ink); font-weight: 700; text-decoration: underline; }

/* ---------- Idea validation progress animation ---------- */
.idea-progress-stage {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 32px;
  width: 100%;
  max-width: 900px;
  margin: 24px auto 0;
  padding: 40px 24px;
  --ip-scale: 1.2;
}

@media (min-width: 400px) { .idea-progress-stage { --ip-scale: 1.35; } }
@media (min-width: 540px) { .idea-progress-stage { --ip-scale: 1.6; } }
@media (min-width: 700px) { .idea-progress-stage { --ip-scale: 1.8; } }
/* .app-main gains a 240px sidebar margin at this width — keep scale
   conservative right at the crossover so the animation still fits. */
@media (min-width: 861px) { .idea-progress-stage { --ip-scale: 1.8; } }
@media (min-width: 1024px) { .idea-progress-stage { --ip-scale: 2; } }
@media (min-width: 1280px) { .idea-progress-stage { --ip-scale: 2.2; } }
@media (min-width: 1600px) { .idea-progress-stage { --ip-scale: 2.4; } }

/* Outer frame: sizes/centers the visible animation area, scales responsively
   with --ip-scale. Inner .ip-anim-scaler stays a fixed 220x170 logical box
   (every stage's markup/JS is authored against that size) and is blown up
   visually via CSS transform, so every existing animation keeps working
   unchanged at any breakpoint or zoom level. Scale is capped so 220/170 * scale
   never exceeds this viewport's own box — otherwise the transform pushes
   content (map edges, floating avatars near the edge of their 220x170 box)
   past the clip boundary and it gets visibly cut off. */
.ip-anim-viewport {
  width: 100%;
  max-width: 560px;
  height: calc(170px * var(--ip-scale));
  max-height: 50vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.ip-anim-scaler {
  width: 220px;
  height: 170px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: scale(var(--ip-scale));
}

.ip-dynamic-text {
  margin: 0;
  font-size: clamp(15px, 1.6vw, 19px);
  font-weight: 600;
  text-align: center;
  max-width: 420px;
  min-height: 40px;
  background-image: linear-gradient(
    100deg,
    var(--muted) 0%,
    var(--muted) 38%,
    var(--ink) 50%,
    var(--muted) 62%,
    var(--muted) 100%
  );
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: ip-text-shimmer 2s linear infinite;
}

@keyframes ip-text-shimmer {
  0% { background-position: 140% 0; }
  100% { background-position: -140% 0; }
}

/* Stage 1 — Understanding the idea: pulsing dot + expanding sonar waves */
.ip-understand {
  position: relative;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ip-understand-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--ink);
  z-index: 1;
  animation: ip-understand-dot-pulse 1.8s ease-in-out infinite;
}
@keyframes ip-understand-dot-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.2); }
}
.ip-understand-wave {
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1.5px solid var(--ink);
  animation: ip-understand-wave-expand 1.8s ease-out infinite;
}
.ip-understand-wave--1 { animation-delay: 0s; }
.ip-understand-wave--2 { animation-delay: 0.6s; }
.ip-understand-wave--3 { animation-delay: 1.2s; }
@keyframes ip-understand-wave-expand {
  0% { transform: scale(1); opacity: 0.65; }
  100% { transform: scale(4.2); opacity: 0; }
}

/* Stage 2 — Market sizing: world map with blinking countries + hotspots */
.ip-map-wrap {
  position: relative;
  width: 100%;
  height: 100%;
}
.ip-map {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 10px;
  overflow: hidden;
}
.ip-map .jvm-zoom-btn { display: none; }
.ip-map-hotspots {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.ip-map-hotspot {
  position: absolute;
  width: 6px;
  height: 6px;
  margin: -3px 0 0 -3px;
  border-radius: 50%;
  background: var(--accent);
  animation: ip-hotspot-dot 2.6s ease-in-out infinite;
}
.ip-map-hotspot::before {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1.5px solid var(--accent);
  animation: ip-hotspot-ping 2.6s ease-out infinite;
}
.ip-map-hotspot--a { top: 34%; left: 21%; animation-delay: 0s; }
.ip-map-hotspot--b { top: 27%; left: 49%; animation-delay: 0.6s; }
.ip-map-hotspot--c { top: 38%; left: 74%; animation-delay: 1.2s; }
.ip-map-hotspot--d { top: 62%; left: 32%; animation-delay: 1.8s; }
@keyframes ip-hotspot-dot {
  0%, 100% { opacity: 0; transform: scale(0.6); }
  15%, 55% { opacity: 1; transform: scale(1); }
  80% { opacity: 0; transform: scale(0.8); }
}
@keyframes ip-hotspot-ping {
  0% { transform: scale(0.4); opacity: 0.9; }
  70%, 100% { transform: scale(2.4); opacity: 0; }
}

/* Stage 3 — Demand signals: orbiting particles around a rotating platform logo */
.ip-reddit {
  position: relative;
  width: 100px;
  height: 100px;
}
.ip-orbit-ring {
  position: absolute;
  inset: 3px;
  border: 1.5px dashed var(--border);
  border-radius: 50%;
  animation: ip-orbit-spin 7s linear infinite;
}
.ip-particle-orbit {
  position: absolute;
  inset: 0;
  animation: ip-orbit-spin linear infinite;
}
.ip-particle-orbit--a { inset: 0; animation-duration: 3.2s; }
.ip-particle-orbit--b { inset: 14px; animation-duration: 4.6s; animation-direction: reverse; }
.ip-particle-orbit--c { inset: -8px; animation-duration: 6s; }
.ip-particle {
  position: absolute;
  top: 0;
  left: 50%;
  width: 6px;
  height: 6px;
  margin-left: -3px;
  border-radius: 50%;
  background: var(--ink);
  opacity: 0.85;
}
@keyframes ip-orbit-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
.ip-logo-wrap {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid var(--border);
  z-index: 2;
  animation: ip-logo-breathe 2.4s ease-in-out infinite;
}
.ip-signal-logo-img {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 66%;
  height: 66%;
  object-fit: contain;
  opacity: 0;
  transition: opacity 0.4s ease;
}
.ip-signal-logo-img.is-active { opacity: 1; }
@keyframes ip-logo-breathe {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

/* Stage 4 — Customer profiling: real profile photos floating in/out */
.ip-profiles {
  position: relative;
  width: 100%;
  height: 100%;
}
.ip-profile-avatar {
  position: absolute;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  overflow: hidden;
  border: 1.5px solid var(--bg);
  background: var(--surface);
  opacity: 0;
  transform: scale(0.6);
  animation: ip-profile-float 3.6s ease-in-out infinite;
}
.ip-profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.ip-profile-avatar:nth-child(1) { animation-delay: 0s; }
.ip-profile-avatar:nth-child(2) { animation-delay: 0.5s; }
.ip-profile-avatar:nth-child(3) { animation-delay: 1s; }
.ip-profile-avatar:nth-child(4) { animation-delay: 1.5s; }
.ip-profile-avatar:nth-child(5) { animation-delay: 2s; }
.ip-profile-avatar:nth-child(6) { animation-delay: 2.5s; }
.ip-profile-avatar:nth-child(7) { animation-delay: 3s; }
@keyframes ip-profile-float {
  0% { opacity: 0; transform: scale(0.6); }
  18%, 72% { opacity: 1; transform: scale(1); }
  92%, 100% { opacity: 0; transform: scale(0.7); }
}

/* Stage 5 — Competitor scan: tiles popping in with real favicon logos */
.ip-competitors {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.ip-competitor-tile {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: transparent;
  overflow: hidden;
  opacity: 0;
  transform: scale(0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: ip-tile-pop 3.6s ease-in-out infinite;
}
.ip-competitor-tile img {
  width: 62%;
  height: 62%;
  object-fit: contain;
}
@keyframes ip-tile-pop {
  0% { opacity: 0; transform: scale(0.7); }
  10%, 80% { opacity: 1; transform: scale(1); }
  94%, 100% { opacity: 0; transform: scale(0.85); }
}

/* Stage 6 — Business model: bars growing/shrinking in cascade */
.ip-viability {
  width: 100px;
  height: 90px;
}
.ip-viability-bar {
  fill: var(--border);
  transform-box: fill-box;
  transform-origin: 50% 100%;
  transform: scaleY(0.2);
  animation: ip-viability-grow 2.8s ease-in-out infinite;
}
@keyframes ip-viability-grow {
  0%, 100% { transform: scaleY(0.2); fill: var(--border); }
  42%, 62% { transform: scaleY(var(--h)); fill: var(--green, #23885A); }
}

/* Stage 7 — Finalizing: opportunity gauge sweep */
.ip-gauge {
  width: 150px;
  height: 95px;
}
.ip-gauge-tick {
  transition: stroke 0.25s ease;
}

@media (prefers-reduced-motion: reduce) {
  .ip-anim-viewport * { animation: none !important; }
  .ip-dynamic-text {
    animation: none !important;
    background-image: none;
    -webkit-background-clip: initial;
    background-clip: initial;
    color: var(--muted);
  }
}

/* ---------- Recent results ---------- */
.recent-section {
  width: 100%;
  max-width: 720px;
  margin-top: 40px;
}
.recent-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 10px;
}
.recent-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.recent-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  text-decoration: none;
  color: var(--ink);
  background: var(--bg);
}
.recent-item:hover { background: var(--surface); }
.recent-info { flex: 1; min-width: 0; }
.recent-idea {
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.recent-verdict { font-size: 12px; color: var(--muted); margin-top: 2px; }
.recent-time { font-size: 12px; color: var(--muted); flex-shrink: 0; }
.recent-item > i { color: var(--muted); font-size: 13px; flex-shrink: 0; }
.recent-empty {
  color: var(--muted);
  font-size: 14px;
  border: 1px dashed var(--border);
  border-radius: 12px;
  padding: 20px;
  text-align: center;
}

/* Mini arc gauge (semi-circle dial, e.g. Recent list, Library cards) */
.mini-arc {
  position: relative;
  width: 72px;
  flex-shrink: 0;
}
.mini-arc svg { display: block; width: 100%; height: auto; }
.mini-arc span {
  position: absolute;
  left: 0;
  right: 0;
  top: 82%;
  transform: translateY(-50%);
  text-align: center;
  font-size: 13px;
  font-weight: 800;
  color: var(--ink);
}

/* ---------- Auth modal (popup login/signup, replaces the old /login page) ---------- */
.auth-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(17, 17, 15, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 1000;
}
.auth-modal {
  position: relative;
  background: var(--bg);
  border-radius: 18px;
  padding: 32px 28px;
  max-width: 380px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
}
.auth-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: var(--surface);
  color: var(--ink);
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.auth-modal-close:hover { background: var(--border); }
.auth-modal .auth-card { max-width: none; }
@media (max-width: 640px) {
  .auth-modal { padding: 26px 20px; }
}

/* ---------- Upgrade-plan page (/plans, minimalist, signed-in users only) ---------- */
.plans-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  padding: 80px 24px 60px;
  max-width: 820px;
  width: 100%;
  margin: 0 auto;
  box-sizing: border-box;
  text-align: center;
}
.plans-close {
  position: fixed;
  top: 20px;
  right: 20px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: var(--surface);
  color: var(--ink);
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  text-decoration: none;
  z-index: 1;
}
.plans-close:hover { background: var(--border); }
.plans-loading {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sp-pill {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border);
  background: var(--bg);
  border-radius: 999px;
  padding: 4px;
  box-shadow: 0 1px 3px rgba(17, 17, 15, 0.08);
  margin-bottom: 22px;
}
.sp-pill-avatars { display: flex; }
.sp-pill-avatars img { width: 20px; height: 20px; border-radius: 50%; object-fit: cover; border: 1px solid var(--bg); margin-left: -6px; }
.sp-pill-avatars img:first-child { margin-left: 0; }
.sp-pill-text { padding: 0 8px 0 6px; font-size: var(--fs-secondary); line-height: var(--lh-secondary); font-weight: var(--fw-secondary); color: var(--muted); }
.sp-pill-text strong { font-weight: 600; color: var(--ink); }

.sp-pill.is-transparent {
  border: none;
  background: transparent;
  box-shadow: none;
  padding: 0;
  gap: 10px;
}
.sp-pill.is-transparent .sp-pill-text { padding: 0; }
.sp-trustpilot { display: flex; align-items: center; }
.sp-trustpilot img { height: 26px; width: auto; display: block; }
.sp-pill-divider { color: var(--border); font-size: 15px; line-height: 1; }

.upg-trust {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 20px;
}
.upg-trust-avatars { display: flex; }
.upg-trust-avatars img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--bg);
  margin-left: -10px;
}
.upg-trust-avatars img:first-child { margin-left: 0; }
.upg-trust span { font-size: 14px; font-weight: 700; color: var(--muted); }

.upg-title { font-size: clamp(32px, 5vw, var(--fs-display)); line-height: var(--lh-display); font-weight: var(--fw-display); letter-spacing: var(--ls-display); margin: 0 0 10px; color: var(--ink); }
.upg-subtitle { font-size: var(--fs-subtitle); line-height: var(--lh-subtitle); font-weight: var(--fw-subtitle); letter-spacing: var(--ls-subtitle); color: var(--muted); margin: 0 0 32px; }

.upg-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  text-align: left;
}
.upg-card {
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
}
.upg-name-logo { width: 28px; height: 28px; display: block; margin-bottom: 10px; }
.upg-name { font-size: 19px; font-weight: 400; color: var(--muted); margin-bottom: 12px; }
.upg-price { display: flex; align-items: baseline; gap: 6px; margin-bottom: 6px; flex-wrap: wrap; }
.upg-price .amount { font-size: var(--fs-metric); line-height: var(--lh-metric); font-weight: var(--fw-metric); letter-spacing: var(--ls-metric); color: var(--ink); }
.upg-price .period { font-size: 14px; color: var(--muted); }
.upg-sub { font-size: 13px; color: var(--muted); margin: 0 0 20px; }
.upg-btn {
  display: block;
  width: 100%;
  height: 52px;
  border-radius: 12px;
  border: none;
  background: #FFCA0A;
  color: #11110F;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  margin-bottom: 24px;
}
.upg-btn:hover { filter: brightness(0.97); }
.upg-btn:disabled { opacity: 0.6; cursor: default; }
.upg-btn-dark { background: #11110F; color: #FFFFFF; }
.upg-btn-dark:hover { filter: brightness(1.2); }
.upg-features { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.upg-features li { display: flex; align-items: center; gap: 10px; font-size: 13.5px; color: var(--muted); }
.upg-features i { color: #1C7C4D; font-size: 12px; flex-shrink: 0; }

/* Mobile-only shared checklist — on desktop each plan card keeps its own
   list; on mobile the two cards merge into a single stacked block and the
   checklist is shown once below it instead of twice. */
.upg-features-shared { display: none; }

.upg-msg { margin: 24px 0 0; font-size: 13px; color: var(--ink); text-align: center; min-height: 18px; }

.upg-pay-icons {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
  margin: 48px 0 0;
}
.upg-pay-icons img { height: 22px; width: auto; }

.upg-billing-note {
  max-width: 640px;
  margin: 40px auto 0;
  font-size: 12px;
  line-height: 1.6;
  color: var(--muted);
  text-align: center;
}
.upg-billing-note a { color: var(--muted); text-decoration: underline; }

@media (max-width: 640px) {
  .plans-page { padding: 64px 20px 40px; }

  .upg-cards {
    grid-template-columns: 1fr;
    gap: 0;
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
  }
  .upg-card {
    border: none;
    border-radius: 0;
    padding: 22px;
  }
  .upg-card:first-child { border-bottom: 1px solid var(--border); }
  .upg-card .upg-features { display: none; }

  .upg-features-shared {
    display: flex;
    flex-direction: column;
    gap: 14px;
    list-style: none;
    margin: 28px 0 0;
    padding: 0;
    text-align: left;
  }
  .upg-features-shared li { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--muted); }
  .upg-features-shared i { color: #1C7C4D; font-size: 12px; flex-shrink: 0; }
}

/* ---------- Auth pages ---------- */
.auth-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
}

.auth-card {
  width: 100%;
  max-width: 380px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.auth-card img.auth-logo {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  margin-bottom: 24px;
}

.auth-card h2 {
  font-size: var(--fs-h1);
  line-height: var(--lh-h1);
  font-weight: var(--fw-h1);
  letter-spacing: var(--ls-h1);
  margin: 0 0 28px;
}
.auth-card h2:has(+ .auth-subtitle) { margin-bottom: 8px; }

.auth-subtitle {
  font-size: 14px;
  color: var(--muted);
  margin: 0 0 28px;
}

.auth-choice { width: 100%; margin-bottom: 4px; }

.auth-btn {
  width: 100%;
  height: 52px;
  border-radius: 999px;
  border: none;
  font-size: 16px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
}
.auth-btn-google {
  background: #11110F;
  color: #FFFFFF;
  border: 1px solid #11110F;
}
.auth-btn-google:hover { opacity: 0.9; }
.auth-btn-google img { width: 20px; height: 20px; }

.auth-form { width: 100%; text-align: left; }

.form-field { margin-bottom: 14px; }
.form-field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--ink);
}
.form-field input {
  width: 100%;
  height: 46px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg);
  padding: 0 14px;
  font-size: 15px;
  font-family: inherit;
  color: var(--ink);
  outline: none;
}
.form-field input:disabled { opacity: 0.7; }
.form-field input:focus { border-color: var(--ink); }

.auth-submit {
  width: 100%;
  height: 50px;
  border-radius: 999px;
  border: none;
  background: var(--ink);
  color: var(--bg);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 6px;
}
.auth-submit:hover { opacity: 0.9; }
.auth-submit:disabled { opacity: 0.6; cursor: not-allowed; }

.auth-message {
  width: 100%;
  font-size: 13px;
  line-height: 1.5;
  margin-top: 14px;
  text-align: left;
}
.auth-message.error { color: #E66F51; }
.auth-message.success { color: #23885A; }

.auth-terms {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
  margin: 20px 0 0;
}
.auth-terms a {
  color: var(--ink);
  font-weight: 600;
  text-decoration: underline;
}

.auth-switch {
  color: var(--muted);
  font-size: 14px;
  margin-top: 32px;
}
.auth-switch a {
  color: var(--ink);
  font-weight: 600;
  text-decoration: underline;
}

/* ---------- App (sidebar layout) ---------- */
.app-layout {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 240px;
  flex-shrink: 0;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 16px 12px;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  height: 100dvh;
  overflow-y: auto;
  overflow-x: hidden;
  background: var(--bg);
  z-index: 50;
  transition: width 0.18s ease;
}

.app-main {
  margin-left: 240px;
  transition: margin-left 0.18s ease;
}

@media (min-width: 861px) {
  .sidebar.collapsed { width: 76px; }
  .sidebar.collapsed ~ .app-main { margin-left: 76px; }
  .sidebar.collapsed .sidebar-label { display: none; }
  .sidebar.collapsed .brand { justify-content: center; padding-left: 0; padding-right: 0; }
  .sidebar.collapsed .sidebar-nav a { justify-content: center; padding-left: 0; padding-right: 0; }
  .sidebar.collapsed .sidebar-profile-link { justify-content: center; padding-left: 0; padding-right: 0; }
  .sidebar.collapsed .sidebar-guest-actions { display: none !important; }
  .sidebar.collapsed .sidebar-collapse-btn { justify-content: center; padding-left: 0; padding-right: 0; }
  .sidebar.collapsed .sidebar-collapse-btn i { transform: rotate(180deg); }
}

.sidebar .brand {
  padding: 8px 8px 20px;
}

.sidebar-nav {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.sidebar-nav-group {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.sidebar-nav-group-label {
  padding: 0 12px 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.sidebar-bottom {
  margin-top: auto;
  display: flex;
  flex-direction: column;
}

.sidebar-collapse-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  margin-bottom: 8px;
  border: none;
  border-radius: 10px;
  background: none;
  color: var(--muted);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.sidebar-collapse-btn:hover { background: var(--surface); color: var(--ink); }
.sidebar-collapse-btn i { font-size: 15px; width: 15px; text-align: center; }
@media (max-width: 860px) {
  .sidebar-collapse-btn { display: none; }
}
.sidebar-nav-bottom {
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.sidebar-profile-link { padding: 8px !important; }
.sidebar-profile-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--secondary);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.sidebar-profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.sidebar-profile-avatar span { font-size: 13px; font-weight: 800; color: #11110F; }
.sidebar-profile-info { min-width: 0; }
.sidebar-profile-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar-profile-plan {
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar-profile-plan.is-pro {
  font-weight: 800;
  background: linear-gradient(90deg, #1B5FD6 0%, #4C9AF0 45%, #7EDCF2 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
@media (max-width: 860px) {
  .sidebar-profile-link { padding: 10px !important; }
  .sidebar-profile-avatar { width: 40px; height: 40px; }
  .sidebar-profile-avatar span { font-size: 15px; }
  .sidebar-profile-name { font-size: 16px; }
  .sidebar-profile-plan { font-size: 13px; }
}

.sidebar-guest-actions { display: flex; flex-direction: column; gap: 10px; }
.sidebar-guest-actions .btn { width: 100%; }
.sidebar-user-actions { display: flex; flex-direction: column; }

.app-topbar-guest-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.app-topbar-guest-actions .btn,
.sidebar-guest-actions .btn { border-radius: 10px; }

.plan-btn { border: none; width: 100%; font-family: inherit; cursor: pointer; }

.ph-head { display: flex; gap: 16px; align-items: flex-start; }
.ph-head-thumb { width: 64px; height: 64px; border-radius: 14px; object-fit: cover; flex-shrink: 0; background: var(--surface); }
.ph-head-name { font-size: 20px; font-weight: 800; letter-spacing: -0.01em; margin: 0 0 4px; }
.ph-head-tagline { font-size: 14px; color: var(--muted); margin: 0 0 10px; line-height: 1.4; }
.ph-topics { display: flex; flex-wrap: wrap; gap: 6px; }
.ph-topic-chip {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  white-space: nowrap;
}

.ph-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
  gap: 10px;
  margin: 20px 0;
  padding: 14px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.ph-stat { text-align: center; }
.ph-stat-value { font-size: 17px; font-weight: 800; color: var(--ink); }
.ph-stat-value.ph-orange { color: #E66F51; }
.ph-stat-label { font-size: 11px; color: var(--muted); margin-top: 2px; }

.ph-section-title { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; color: var(--muted); margin: 22px 0 10px; }
.ph-description { font-size: 14px; color: var(--ink); line-height: 1.6; white-space: pre-line; }

.ph-media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.ph-media-item { position: relative; border-radius: 10px; overflow: hidden; aspect-ratio: 4/3; background: var(--surface); display: block; }
.ph-media-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ph-media-play { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(17, 17, 15, 0.25); color: #FFFFFF; font-size: 22px; }

.ph-makers { display: flex; flex-direction: column; gap: 12px; }
.ph-maker { display: flex; gap: 10px; align-items: flex-start; }
.ph-maker-avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; flex-shrink: 0; background: var(--surface); }
.ph-maker-name { font-size: 13px; font-weight: 700; color: var(--ink); }
.ph-maker-headline { font-size: 12px; color: var(--muted); margin-top: 1px; }
.ph-maker-links { display: flex; gap: 8px; margin-top: 4px; }
.ph-maker-links a { font-size: 11px; color: var(--accent); text-decoration: none; }
.ph-maker-links a:hover { text-decoration: underline; }

.ph-links-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.ph-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  border: 1px solid var(--border);
  color: var(--ink);
}
.ph-link-btn:hover { background: var(--surface); }
.ph-link-btn.ph-link-primary { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.ph-link-btn.ph-link-primary:hover { opacity: 0.88; }

@media (max-width: 640px) {
  .ph-head { gap: 12px; }
  .ph-head-thumb { width: 52px; height: 52px; }
}

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  text-decoration: none;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}
.sidebar-nav a i { font-size: 17px; width: 17px; text-align: center; }
.sidebar-nav a:hover { background: var(--surface); color: var(--ink); }
.sidebar-nav a.active { background: var(--surface); color: var(--ink); }

.sidebar-nav-toggle { cursor: pointer; }
.sidebar-nav-chevron { margin-left: auto; font-size: 13px !important; width: auto !important; transition: transform 0.15s ease; }
.sidebar-nav-parent.open .sidebar-nav-chevron { transform: rotate(180deg); }
.sidebar-nav-sub {
  list-style: none;
  margin: 2px 0 0;
  padding: 0;
  display: none;
  flex-direction: column;
  gap: 2px;
}
.sidebar-nav-parent.open .sidebar-nav-sub { display: flex; }
.sidebar-nav-sub a { padding-left: 34px; font-size: 13.5px; }
.sidebar.collapsed .sidebar-nav-sub { display: none; }
.sidebar.collapsed .sidebar-nav-chevron { display: none; }

.app-main {
  flex: 1;
  min-width: 0;
  overflow-x: hidden;
}

.app-section { display: none; }
.app-section.active { display: block; }


.empty-state {
  margin: 24px;
  padding: 60px 24px;
  border: 1px dashed var(--border);
  border-radius: 16px;
  text-align: center;
  color: var(--muted);
}
.empty-state i {
  font-size: 28px;
  color: var(--muted);
  margin-bottom: 12px;
  display: block;
}
.empty-state p { margin: 0; font-size: 15px; }

.dash-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin: 24px 24px 0;
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  background: var(--bg);
}
.dash-stat { padding: 22px 24px; border-right: 1px solid var(--border); }
.dash-stat:last-child { border-right: none; }
.dash-stat-label { font-size: 13px; color: var(--muted); margin-bottom: 10px; }
.dash-stat-accent { color: var(--ink); font-weight: 700; }
.dash-stat-num { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; color: var(--ink); margin-bottom: 6px; }
.dash-stat-desc { font-size: 12px; color: var(--muted); line-height: 1.4; margin: 0; }

.dash-carousel {
  position: relative;
  margin: 20px 24px 0;
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  background: var(--bg);
}
.dash-carousel-track { display: flex; transition: transform 0.3s ease; }
.dash-carousel-slide {
  flex: 0 0 100%;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 5;
  background: var(--surface);
}
.dash-carousel-slide img { width: 100%; height: 100%; object-fit: cover; display: block; }

.dash-tools { padding: 32px 24px; }
.dash-tools-header h3 { font-size: 18px; font-weight: 800; letter-spacing: -0.01em; margin: 0 0 4px; }
.dash-tools-header p { font-size: 13px; color: var(--muted); margin: 0 0 18px; }
.dash-tools-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.dash-tool-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 16px;
  color: inherit;
  background: none;
  font-family: inherit;
  text-align: left;
  width: 100%;
}
.dash-tool-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: var(--ink);
  font-size: 22px;
  margin-bottom: 4px;
}
.dash-tool-title { font-size: 14px; font-weight: 700; color: var(--ink); }
.dash-tool-desc { font-size: 12.5px; color: var(--muted); line-height: 1.5; margin: 0; flex: 1; }
.dash-tool-btn {
  display: inline-block;
  align-self: flex-start;
  margin-top: 4px;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease;
}
.dash-tool-btn:hover { background: var(--surface); }

@media (max-width: 1100px) {
  .dash-stats { grid-template-columns: repeat(2, 1fr); }
  .dash-stat:nth-child(2) { border-right: none; }
  .dash-stat:nth-child(3), .dash-stat:nth-child(4) { border-top: 1px solid var(--border); }
  .dash-tools-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .dash-stats { grid-template-columns: 1fr; margin: 16px 16px 0; }
  .dash-stat { border-right: none !important; border-top: 1px solid var(--border); }
  .dash-stat:first-child { border-top: none; }
  .dash-carousel { margin: 16px 16px 0; border-radius: 14px; }
  .dash-tools { padding: 24px 16px; }
  .dash-tools-grid { grid-template-columns: 1fr; }
}

/* ---------- AI Assistant (floating widget) ---------- */
.ai-fab {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  background: var(--ink);
  color: var(--bg);
  font-size: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(17, 17, 15, 0.25);
  z-index: 80;
  transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.ai-fab:hover { transform: translateY(-2px); }
.ai-fab.open { background: var(--secondary); color: #11110F; }

.ai-panel {
  position: fixed;
  right: 24px;
  bottom: 92px;
  width: 380px;
  max-width: calc(100vw - 32px);
  height: 600px;
  max-height: calc(100vh - 140px);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: 0 24px 60px rgba(17, 17, 15, 0.25);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 79;
  opacity: 0;
  transform: translateY(16px) scale(0.98);
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}
.ai-panel.open { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }

.ai-panel-header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.ai-panel-header-title { display: flex; align-items: center; gap: 10px; min-width: 0; }
.ai-panel-avatar {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  flex-shrink: 0;
}
.ai-panel-avatar img { width: 100%; height: 100%; object-fit: contain; padding: 4px; }
.ai-panel-name { font-size: 13px; font-weight: 700; color: var(--ink); }
.ai-panel-status { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 200px; }
.ai-panel-actions { display: flex; align-items: center; gap: 2px; flex-shrink: 0; }
.ai-panel-icon-btn {
  width: 28px;
  height: 28px;
  border: none;
  background: none;
  border-radius: 8px;
  color: var(--muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}
.ai-panel-icon-btn:hover { background: var(--surface); color: var(--ink); }

.ai-history {
  position: absolute;
  top: 58px;
  left: 8px;
  right: 8px;
  max-height: 260px;
  overflow-y: auto;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 12px 28px rgba(17, 17, 15, 0.16);
  padding: 6px;
  z-index: 2;
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
}
.ai-history.open { opacity: 1; transform: translateY(0); pointer-events: auto; }

.ai-history-list { display: flex; flex-direction: column; gap: 2px; }
.ai-history-empty { padding: 10px; font-size: 13px; color: var(--muted); }
.ai-history-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 9px 10px;
  border-radius: 10px;
  cursor: pointer;
  color: var(--ink);
}
.ai-history-item:hover, .ai-history-item.active { background: var(--surface); }
.ai-history-item-title {
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ai-history-item-delete {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border: none;
  background: transparent;
  color: var(--muted);
  border-radius: 6px;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}
.ai-history-item:hover .ai-history-item-delete { display: flex; }
.ai-history-item-delete:hover { background: var(--border); color: var(--ink); }

.ai-messages { flex: 1; overflow-y: auto; padding: 18px 16px; }
.ai-empty { text-align: center; margin-top: 8px; }
.ai-empty-icon {
  width: 44px;
  height: 44px;
  margin: 0 auto 14px;
  border-radius: 13px;
  background: var(--surface);
  color: var(--ink);
  font-size: 19px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ai-empty h2 { font-size: var(--fs-h3); line-height: var(--lh-h3); font-weight: var(--fw-h3); letter-spacing: var(--ls-h3); margin: 0 0 6px; }
.ai-empty p { font-size: 13px; color: var(--muted); line-height: 1.5; margin: 0 0 18px; }
.ai-suggestions { display: flex; flex-direction: column; gap: 8px; }
.ai-suggestion-chip {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg);
  color: var(--ink);
  font-family: inherit;
  font-size: 12.5px;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s ease;
}
.ai-suggestion-chip:hover { border-color: var(--ink); }

.ai-msg { margin: 0 0 16px; display: flex; gap: 8px; }
.ai-msg-user { justify-content: flex-end; }
.ai-msg-user .ai-msg-bubble {
  max-width: 88%;
  background: var(--ink);
  color: var(--bg);
  padding: 10px 13px;
  border-radius: 16px 16px 4px 16px;
  font-size: 13.5px;
  line-height: 1.5;
  white-space: pre-wrap;
}
.ai-msg-assistant { align-items: flex-start; }
.ai-msg-avatar {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 7px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
}
.ai-msg-avatar img { width: 100%; height: 100%; object-fit: contain; padding: 3px; }
.ai-msg-content { flex: 1; min-width: 0; }
.ai-msg-assistant .ai-msg-bubble {
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--ink);
  white-space: pre-wrap;
}
.ai-msg-markdown p { margin: 0 0 10px; }
.ai-msg-markdown p:last-child { margin-bottom: 0; }
.ai-msg-markdown h3, .ai-msg-markdown h4, .ai-msg-markdown h5 { margin: 14px 0 6px; font-weight: 800; letter-spacing: -0.01em; }
.ai-msg-markdown h3:first-child, .ai-msg-markdown h4:first-child, .ai-msg-markdown h5:first-child { margin-top: 0; }
.ai-msg-markdown ul, .ai-msg-markdown ol { margin: 0 0 10px; padding-left: 20px; }
.ai-msg-markdown li { margin-bottom: 4px; }
.ai-msg-markdown code { background: var(--surface); border: 1px solid var(--border); border-radius: 4px; padding: 1px 5px; font-size: 12px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.ai-msg-markdown pre { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 12px; overflow-x: auto; margin: 0 0 10px; }
.ai-msg-markdown pre code { background: none; border: none; padding: 0; }
.ai-msg-markdown a { color: var(--ink); text-decoration: underline; }
.ai-msg-error { color: #E66F51; font-size: 13px; }

.ai-typing { display: inline-flex; gap: 4px; padding: 4px 0; }
.ai-typing span { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); animation: aiTypingBounce 1.1s infinite ease-in-out; }
.ai-typing span:nth-child(2) { animation-delay: 0.15s; }
.ai-typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes aiTypingBounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
  30% { transform: translateY(-4px); opacity: 1; }
}

.ai-composer-wrap { flex-shrink: 0; padding: 10px 12px 12px; }
.ai-composer {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 8px 8px 8px 14px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--bg);
}
.ai-composer textarea {
  flex: 1;
  border: none;
  outline: none;
  background: none;
  resize: none;
  font-family: inherit;
  font-size: 13.5px;
  color: var(--ink);
  line-height: 1.5;
  max-height: 140px;
  padding: 6px 0;
}
.ai-composer textarea::placeholder { color: var(--muted); }
.ai-send-btn {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: none;
  background: var(--ink);
  color: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: opacity 0.15s ease;
}
.ai-send-btn:disabled { opacity: 0.3; cursor: default; }

@media (max-width: 480px) {
  .ai-fab { right: 16px; bottom: 16px; }
  .ai-panel {
    right: 12px;
    left: 12px;
    bottom: 84px;
    width: auto;
    max-width: none;
    height: auto;
    max-height: calc(100vh - 110px);
  }
}

.feed-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
  padding: 20px 24px 24px;
}
.feed-card {
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  overflow: hidden;
  background: var(--bg);
  border: 1px solid var(--border);
}
.feed-card-info { display: flex; flex-direction: column; padding: 12px 14px 14px; gap: 8px; }
.feed-card-site {
  display: flex;
  align-items: center;
  gap: 10px;
}
.feed-card-favicon { width: 28px; height: 28px; border-radius: 6px; flex-shrink: 0; object-fit: cover; }
.feed-card-site-text { min-width: 0; }
.feed-card-site-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.feed-card-desc-wrap {
  max-height: 2.8em;
  min-height: 0;
  flex-shrink: 0;
  overflow: hidden;
}
.feed-card-desc {
  font-size: 12px;
  color: var(--ink);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
  overflow-wrap: anywhere;
}
.feed-card-visit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 38px;
  margin-top: 2px;
  border-radius: 10px;
  border: 1px solid var(--border);
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
}
.feed-card-visit i { font-size: 12px; }
.feed-card-visit:hover { border-color: var(--accent); color: var(--accent); }
.feed-card-video-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 9 / 16;
  max-height: 480px;
  background: #11110F;
  cursor: pointer;
}
.feed-card-video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #11110F;
}
.feed-card-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  background: rgba(17, 17, 15, 0.5);
  color: #FFFFFF;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: opacity 0.15s ease, transform 0.15s ease;
}
.feed-card-play i { margin-left: 2px; }
.feed-card-video-wrap.is-playing .feed-card-play {
  opacity: 0;
  pointer-events: none;
}
.feed-card-video-wrap:not(.is-playing):hover .feed-card-play { transform: translate(-50%, -50%) scale(1.06); }
.feed-loading { text-align: center; padding: 40px 20px; color: var(--muted); font-size: 14px; }

/* ---------- Skeleton loading (Idea/Startup Library, Startups Feed, recent ideas) ---------- */
@keyframes foundlySkeletonShimmer { 0% { background-position: -400px 0; } 100% { background-position: 400px 0; } }
.sk-block {
  background: linear-gradient(90deg, var(--border) 25%, var(--surface) 37%, var(--border) 63%);
  background-size: 400px 100%;
  animation: foundlySkeletonShimmer 1.4s ease-in-out infinite;
  border-radius: 8px;
}
.sk-card {
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.sk-card-head { display: flex; align-items: center; gap: 12px; }
.sk-card-avatar { width: 44px; height: 44px; border-radius: 12px; flex-shrink: 0; }
.sk-card-head-text { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.sk-line { height: 12px; border-radius: 6px; }
.sk-card-media { height: 140px; border-radius: 12px; }
.sk-row {
  display: flex; align-items: center; gap: 14px;
  border: 1px solid var(--border); border-radius: 14px; padding: 12px 16px; margin-bottom: 10px;
}
.sk-row:last-child { margin-bottom: 0; }
.sk-row-gauge { width: 44px; height: 44px; border-radius: 50%; flex-shrink: 0; }
.sk-row-text { flex: 1; display: flex; flex-direction: column; gap: 6px; }

.startup-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
  padding: 20px 24px 24px;
}
.startup-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  border-radius: 16px;
  background: var(--bg);
  border: 1px solid var(--border);
}
.startup-card-head { display: flex; align-items: center; gap: 12px; }
.startup-card-logo { width: 44px; height: 44px; border-radius: 12px; object-fit: cover; flex-shrink: 0; }
.startup-card-logo-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  color: var(--muted);
  font-size: 18px;
}
.startup-card-head-text { min-width: 0; display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.startup-card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.startup-card-desc {
  font-size: 13px;
  color: var(--ink);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
  overflow-wrap: anywhere;
}
.startup-card-meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.startup-card-founder {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.startup-card-founder img { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.startup-card-media-wrap { border-radius: 12px; overflow: hidden; background: var(--surface); height: 180px; }
.startup-card-media { display: block; width: 100%; height: 100%; object-fit: cover; }
.startup-card-visit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--border);
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
}
.startup-card-visit i { font-size: 12px; }
.startup-card-visit:hover { border-color: var(--accent); color: var(--accent); }

.lib-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 24px 24px 0;
}
.lib-header-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  font-size: 30px;
}
.lib-header-text {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}
.lib-header-text h2 {
  margin: 0;
  font-size: var(--fs-h1);
  line-height: var(--lh-h1);
  font-weight: var(--fw-h1);
  letter-spacing: var(--ls-h1);
  white-space: nowrap;
}

.validator-history-title {
  padding: 0;
  margin-bottom: 12px;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.validator-recent-list { display: flex; flex-direction: column; gap: 10px; }
.recent-idea-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border: 1px solid var(--border);
  border-radius: 14px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease;
}
.recent-idea-row:hover { border-color: var(--accent); }
.recent-idea-gauge { flex-shrink: 0; width: 54px; }
.recent-idea-gauge .so-score-gauge { position: relative; width: 54px; top: -4px; }
.recent-idea-gauge .so-score-gauge svg { display: block; width: 100%; height: auto; }
.recent-idea-gauge .so-score-pct { position: absolute; left: 0; right: 0; bottom: 0; text-align: center; font-size: 11px; font-weight: 800; color: var(--ink); }
.recent-idea-text { flex: 1; min-width: 0; }
.recent-idea-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.recent-idea-sub {
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}
.recent-idea-time { flex-shrink: 0; font-size: 13px; color: var(--muted); white-space: nowrap; }
.recent-idea-chevron { flex-shrink: 0; font-size: 15px; color: var(--muted); }
@media (max-width: 480px) {
  .recent-idea-time { display: none; }
}

.validator-open-btn {
  margin-left: auto;
  flex-shrink: 0;
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 18px;
  border-radius: 10px;
  border: none;
  background: var(--secondary);
  color: #11110F;
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
}
.validator-open-btn i { display: inline-flex; align-items: center; font-size: 14px; line-height: 1; }
.validator-open-btn:hover { opacity: 0.92; }

.validator-inline-card {
  position: relative;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 28px;
  margin: 0 0 32px;
}
@media (max-width: 640px) {
  .validator-inline-card { padding: 20px; margin-bottom: 24px; }
}

/* ---------- Startup Validator: trust row, brand marquee, feature CTAs ---------- */
.validator-trust-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 28px;
}
.validator-trust-avatars {
  display: flex;
}
.validator-trust-avatars img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--bg);
  margin-left: -10px;
}
.validator-trust-avatars img:first-child { margin-left: 0; }
.validator-trust-text {
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
}

.validator-marquee {
  width: min(100% - 30px, 1180px);
  margin: 0 auto;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.validator-marquee-track {
  display: flex;
  align-items: center;
  gap: 88px;
  width: max-content;
  /* Three identical sets back to back; sliding by exactly one set's width
     (1/3 of the track) lands on a pixel-identical frame, so the loop point
     is invisible and the strip scrolls with no start/end — endless. */
  animation: validatorMarquee 30s linear infinite;
}
.validator-marquee-logo {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.validator-marquee-logo img { height: 46px; width: auto; display: block; opacity: 0.9; }
@keyframes validatorMarquee {
  from { transform: translateX(0); }
  to { transform: translateX(-33.3333%); }
}

@media (min-width: 861px) {
  .validator-marquee-track { gap: 104px; }
  .validator-marquee-logo img { height: 68px; }
}

@media (max-width: 640px) {
  .validator-trust-row { margin-bottom: 20px; }
  .validator-marquee-track { gap: 48px; }
  .validator-marquee-logo img { height: 30px; }
}

/* ---------- Guest-only product tour (Idea Library / Startups Library /
   Startups Feed), shown below the marquee — ported verbatim from
   recursos/landingfdk2 (its own separate marketing-site design, kept on
   fixed literal colors instead of the app's --ink/--muted/--border tokens
   since those flip in dark mode and this content is meant to look identical
   regardless of the app's theme, exactly like the earlier landingfdk port).
   Every selector is fdk2--prefixed so nothing here can collide with the
   app's own class names. */
.fdk2-container { width: min(1180px, calc(100% - 48px)); margin-inline: auto; }
.fdk2-section { padding: 96px 0; }
.fdk2-product-section { overflow: hidden; }

.fdk2-product-section-label {
  display: flex;
  align-items: center;
  gap: 15px;
  margin: 0 0 22px;
  color: #11110f;
  font-size: clamp(1.8rem, 3vw, 2.75rem);
  font-weight: 650;
  letter-spacing: -0.035em;
  line-height: 1.05;
}
.fdk2-product-section-label .fi { display: block; color: inherit; font-size: 0.9em; line-height: 1; }

.fdk2-split-heading { display: grid; grid-template-columns: 1.45fr 0.65fr; gap: 80px; align-items: end; margin-bottom: 56px; }
.fdk2-split-heading > div { max-width: 780px; }
.fdk2-split-heading h2, .fdk2-feed-copy h2 {
  margin: 14px 0 18px;
  font-size: clamp(2.55rem, 5vw, 4.65rem);
  font-weight: 690;
  letter-spacing: -0.06em;
  line-height: 0.99;
  color: #11110f;
}
.fdk2-feed-copy h2 { max-width: 520px; margin-top: 14px; }

.fdk2-section-intro-copy { display: flex; align-items: flex-start; flex-direction: column; padding-bottom: 3px; }
.fdk2-section-intro-copy p { margin: 0; color: #67665f; font-size: 0.9rem; line-height: 1.65; }
.fdk2-feed-copy > p { margin: 0; color: #67665f; font-size: 1.08rem; line-height: 1.7; }

.fdk2-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 54px;
  padding: 0 23px;
  border: 0;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.fdk2-button:hover { transform: translateY(-2px); }
.fdk2-button-dark { background: #11110f; color: #fff; box-shadow: none; }
.fdk2-button-dark:hover { background: #2c2b27; box-shadow: none; }
.fdk2-section-cta { width: max-content; min-height: 48px; margin-top: 22px; padding: 0 19px; font-size: 0.72rem; border-radius: 10px; }
.fdk2-feed-copy .fdk2-section-cta { margin-top: 25px; }

.fdk2-library-embed-shell { padding: 0; overflow: hidden; border: 1px solid #e7e6df; border-radius: 20px; background: #fff; }
.fdk2-library-embed-frame { display: block; width: 100%; height: auto; border: 0; background: #fff; }

.fdk2-feed-section { overflow: hidden; background: transparent; }
.fdk2-feed-layout { display: grid; grid-template-columns: 0.75fr 1.25fr; gap: 80px; align-items: center; }

.fdk2-social-source-logos { display: flex; align-items: center; gap: 15px; margin: 28px 0 4px; }
.fdk2-social-source-logos img { display: block; width: 38px; height: 38px; object-fit: contain; }

.fdk2-reel-stage { position: relative; min-height: 520px; perspective: 1000px; }
.fdk2-reel-card {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 245px;
  padding: 8px;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 25px 60px rgba(17, 17, 15, 0.16);
  transform: translate(-50%, -50%);
}
.fdk2-reel-card.fdk2-card-main { z-index: 3; }
.fdk2-reel-card.fdk2-card-back { z-index: 1; opacity: 0.78; }
.fdk2-reel-card.fdk2-card-back.fdk2-left { transform: translate(-118%, -48%) rotate(-9deg) scale(0.9); }
.fdk2-reel-card.fdk2-card-back.fdk2-right { transform: translate(18%, -48%) rotate(9deg) scale(0.9); }
.fdk2-reel-card.fdk2-video-card { padding: 7px; overflow: hidden; background: #fff; pointer-events: none; user-select: none; }
.fdk2-reel-card.fdk2-video-card video { display: block; width: 100%; height: 420px; border-radius: 16px; background: #111; object-fit: cover; object-position: center; pointer-events: none; }
.fdk2-reel-card.fdk2-video-card.fdk2-card-main { box-shadow: 0 30px 75px rgba(17, 17, 15, 0.22); }

@media (max-width: 1050px) {
  .fdk2-feed-layout { grid-template-columns: 1fr; gap: 70px; }
  .fdk2-feed-copy { max-width: 680px; }
  .fdk2-reel-stage { width: min(700px, 100%); margin: auto; }
}

@media (max-width: 760px) {
  .fdk2-container { width: min(100% - 30px, 1180px); }
  .fdk2-section { padding: 64px 0; }
  .fdk2-split-heading { grid-template-columns: 1fr; gap: 12px; margin-bottom: 40px; }
  .fdk2-split-heading h2, .fdk2-feed-copy h2 { font-size: clamp(2.4rem, 11vw, 3.6rem); }
  .fdk2-reel-stage { min-height: 500px; transform: scale(0.83); }
}

@media (max-width: 700px) {
  .fdk2-library-embed-shell { width: 100%; border-right: 0; border-left: 0; border-radius: 0; }
}

@media (max-width: 480px) {
  .fdk2-reel-stage { width: 120%; margin-left: -10%; transform: scale(0.72); }
  .fdk2-section-cta { width: 100%; justify-content: center; }
  .fdk2-social-source-logos { gap: 11px; overflow: hidden; }
  .fdk2-social-source-logos img { width: 32px; height: 32px; }
}

.ph-powered-badge {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
  flex-shrink: 0;
}
.ph-powered-logo { height: 16px; width: auto; display: block; }
.ph-powered-logo-dark { display: none; }
:root[data-theme="dark"] .ph-powered-logo-light { display: none; }
:root[data-theme="dark"] .ph-powered-logo-dark { display: block; }

.lib-maker-avatars { display: flex; align-items: center; }
.lib-maker-avatars img {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--bg);
  margin-left: -8px;
  background: var(--surface);
}
.lib-maker-avatars img:first-child { margin-left: 0; }

.library-toolbar {
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 12px;
  margin: 20px 24px 0;
}

.library-search {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 220px;
  padding: 0 16px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: transparent;
}
.library-search i { color: var(--muted); font-size: 15px; flex-shrink: 0; }
.library-search input {
  flex: 1;
  border: none;
  outline: none;
  background: none;
  font-size: 14px;
  font-family: inherit;
  color: var(--ink);
}
.library-search input::placeholder { color: var(--muted); }

.lib-filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: transparent;
  color: var(--ink);
  font-size: 14px;
  font-weight: 400;
  cursor: pointer;
  white-space: nowrap;
}
.lib-filter-btn:hover { background: var(--surface); }
.lib-filter-btn i:first-child { font-size: 15px; color: var(--muted); }
.lib-filter-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--secondary);
}

.lib-view-switcher {
  display: inline-flex;
  align-items: center;
  height: 44px;
  padding: 4px;
  gap: 2px;
  border: 1px solid var(--border);
  border-radius: 12px;
  flex-shrink: 0;
}
.lib-view-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font-size: 15px;
  cursor: pointer;
}
.lib-view-btn:hover { background: var(--surface); color: var(--ink); }
.lib-view-btn.active { background: var(--surface); color: var(--ink); }

/* Idea Library: Cards view */
.lib-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 20px 24px 0;
}
@media (max-width: 1100px) {
  .lib-cards-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .lib-cards-grid { grid-template-columns: minmax(0, 1fr); }
}
.lib-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 12px;
  padding: 16px;
  border-radius: 16px;
  background: var(--bg);
  border: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease;
}
.lib-card:hover { border-color: var(--accent); }
.lib-card-head { display: flex; align-items: center; gap: 12px; }
.lib-card-head-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.lib-card-title {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.lib-card-score { flex-shrink: 0; width: 54px; position: relative; }
.lib-card-score .so-score-gauge { position: relative; width: 54px; top: -4px; }
.lib-card-score .so-score-gauge svg { display: block; width: 100%; height: auto; }
.lib-card-score .so-score-pct { position: absolute; left: 0; right: 0; bottom: 0; text-align: center; font-size: 10px; font-weight: 800; color: var(--ink); }
.lib-card-desc {
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
  overflow-wrap: anywhere;
}

/* Free plan: a slice of the library is visible but blurred behind a lock
   overlay to encourage upgrading, rather than hiding those cards outright —
   seeing there's more content there is the point. */
.lib-card-locked { position: relative; overflow: hidden; cursor: default; }
.lib-card-locked:hover { border-color: var(--border); }
.lib-card-locked .lib-card-head,
.lib-card-locked .lib-card-desc {
  filter: blur(6px);
  pointer-events: none;
  user-select: none;
}
.lib-card-lock-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  text-align: center;
  padding: 16px;
  background: color-mix(in srgb, var(--bg) 72%, transparent);
}
.lib-card-lock-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--surface);
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  margin-bottom: 2px;
}
.lib-card-lock-title { font-size: 12.5px; font-weight: 700; color: var(--ink); }
.lib-card-lock-upgrade {
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
  text-decoration: underline;
  cursor: pointer;
  background: none;
  border: none;
  font-family: inherit;
  padding: 0;
}
.lib-filter-panel {
  display: none;
  align-items: flex-end;
  gap: 16px;
  flex-wrap: wrap;
  margin: 12px 24px 0;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
}
.lib-filter-panel.open { display: flex; }
.lib-filter-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 160px;
}
.lib-filter-field label {
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
}
.lib-filter-field select {
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: transparent;
  color: var(--ink);
  font-size: 13px;
  font-family: inherit;
}
.lib-filter-actions {
  display: flex;
  gap: 8px;
  margin-left: auto;
}
.lib-filter-clear,
.lib-filter-apply {
  height: 40px;
  padding: 0 18px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 400;
  cursor: pointer;
}
.lib-filter-clear {
  border: 1px solid var(--border);
  background: transparent;
  color: var(--ink);
}
.lib-filter-clear:hover { background: var(--surface); }
.lib-filter-apply {
  border: none;
  background: var(--ink);
  color: var(--bg);
}
.lib-filter-apply:hover { opacity: 0.9; }

.lib-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 28px 24px 32px;
  flex-wrap: wrap;
}
.lib-page-btn, .lib-page-nav {
  min-width: 34px;
  height: 34px;
  padding: 0 8px;
  border-radius: 9px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.lib-page-btn:hover, .lib-page-nav:hover:not(:disabled) { background: var(--surface); color: var(--ink); }
.lib-page-btn.active {
  background: var(--secondary);
  color: #11110F;
  font-weight: 800;
}
.lib-page-nav { border-color: var(--border); color: var(--ink); }
.lib-page-nav:disabled { opacity: 0.35; cursor: default; }
.lib-page-nav:disabled:hover { background: transparent; }
.lib-page-ellipsis { color: var(--muted); font-size: 13px; padding: 0 4px; }

.library-table-wrap {
  margin: 12px 0 24px;
  border-top: 1px solid var(--border);
}
@media (max-width: 860px) {
  .library-table-wrap { overflow-x: auto; }
}

.library-table {
  width: 100%;
  min-width: 780px;
  border-collapse: collapse;
  font-size: 14px;
}
.library-table thead th {
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--surface);
  text-align: left;
  font-size: 12px;
  font-weight: 400;
  color: var(--ink);
  letter-spacing: 0.01em;
  padding: 8px 24px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.library-table th.lib-sortable { cursor: pointer; user-select: none; }
.library-table th.lib-sortable:hover { color: var(--ink); }
.library-table th.lib-sortable.active { color: var(--ink); }
.lib-sort-icon { font-size: 11px; margin-left: 2px; opacity: 0.5; }
.library-table th.lib-sortable.active .lib-sort-icon { opacity: 1; }

.library-table tbody tr.library-row { border-bottom: 1px solid var(--border); cursor: pointer; }
.library-table tbody tr.library-row:last-child { border-bottom: none; }
.library-table tbody tr.library-row:hover { background: var(--surface); }
.library-table td { padding: 14px 24px; vertical-align: middle; }

.lib-detail-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 10px;
  background: var(--secondary);
  color: #11110F;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}
.lib-detail-cta:hover { opacity: 0.9; }

.lib-detail-powered {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--muted);
}

.lib-modal-carousel {
  display: flex;
  gap: 8px;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 4px;
}
.lib-modal-carousel img {
  scroll-snap-align: start;
  flex: 0 0 auto;
  height: 130px;
  width: auto;
  max-width: 180px;
  border-radius: 8px;
  object-fit: cover;
  background: var(--surface);
  border: 1px solid var(--border);
}

.ph-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(17, 17, 15, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 1000;
}
.ph-modal {
  position: relative;
  background: var(--bg);
  border-radius: 18px;
  padding: 28px;
  max-width: 560px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
}
.ph-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: var(--surface);
  color: var(--ink);
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.ph-modal-close:hover { background: var(--border); }

@media (max-width: 640px) {
  .ph-modal { padding: 22px; max-height: 90vh; }
  .ph-modal-close { top: 12px; right: 12px; }
}

.lib-col-idea { max-width: 360px; }
.lib-idea-cell { display: flex; align-items: center; gap: 12px; min-width: 0; }
.lib-idea-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: var(--surface);
  border: none;
  box-shadow: none;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 15px;
  line-height: 1;
}
.lib-idea-icon i { display: flex; }
.lib-idea-thumb { object-fit: cover; padding: 0; }
.lib-idea-text { min-width: 0; }
.lib-idea-title {
  display: block;
  font-size: 14px;
  font-weight: 400;
  color: var(--accent);
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 300px;
}
.lib-idea-title:hover { text-decoration: underline; }
.lib-idea-sub {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 300px;
  margin-top: 2px;
}

.lib-col-score { white-space: nowrap; }
.lib-col-score .mini-arc { width: 56px; }
.lib-col-score .mini-arc span { font-size: 12px; }

.lib-col-mrr { white-space: nowrap; }

.lib-col-metric { white-space: nowrap; text-align: center; }
.lib-metric-cell { display: inline-flex; flex-direction: column; align-items: center; gap: 4px; }
.lib-metric-cell .so-score-gauge { position: relative; width: 54px; top: -4px; }
.lib-metric-cell .so-score-gauge svg { display: block; width: 100%; height: auto; }
.lib-metric-cell .so-score-pct { position: absolute; left: 0; right: 0; bottom: 0; text-align: center; font-size: 11px; font-weight: 800; color: var(--ink); }
.lib-metric-cell .so-gauge { position: relative; width: 48px; }
.lib-metric-cell .so-gauge svg { display: block; width: 100%; height: auto; }
.lib-metric-cell .so-num { font-size: 11px; color: var(--ink); }
.lib-metric-cell .so-bars { display: flex; align-items: flex-end; gap: 2px; height: 20px; width: 48px; }
.lib-metric-cell .so-bars div { flex: 1; background: #42A471; border-radius: 1px 1px 0 0; }
.lib-metric-cell .so-demand-bars { display: flex; align-items: center; gap: 2px; height: 20px; width: 48px; }
.lib-metric-cell .so-demand-bar { flex: 1; height: 11px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); }
.lib-metric-cell .so-demand-bar.filled { background: #4C7ACE; border-color: transparent; }
.lib-metric-cell .so-linechart { display: block; width: 48px; height: 20px; }
.lib-metric-cell .so-diffbars { display: flex; align-items: flex-end; justify-content: center; gap: 4px; height: 20px; width: 48px; }
.lib-metric-cell .so-diffbar { flex: 1; max-width: 10px; border-radius: 1px 1px 0 0; background: var(--surface); border: 1px solid var(--border); }
.lib-metric-cell .so-diffbar.filled { border-color: transparent; }

@media (max-width: 640px) {
  .lib-header { padding: 20px 16px 0; }
  .library-toolbar { margin: 20px 16px 0; }
  .library-search { min-width: 0; flex-basis: 100%; }
  .library-table-wrap { margin: 12px 0 20px; }
  .lib-filter-panel { margin: 12px 16px 0; }
}

.library-tag {
  display: inline-flex;
  align-items: center;
  font-size: 13px;
  font-weight: 400;
  color: var(--muted);
  white-space: nowrap;
}

.ph-votes {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #E66F51;
  white-space: nowrap;
}
.ph-votes i { font-size: 11px; }

.lib-rating {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  color: var(--ink);
  white-space: nowrap;
}
.lib-rating i { font-size: 11px; color: #FFCA0A; }

.sidebar-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 20px;
  color: var(--ink);
  cursor: pointer;
  padding: 4px;
}

.sidebar-close {
  display: none;
  position: absolute;
  top: 20px;
  right: 20px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--surface);
  border: none;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: var(--ink);
  cursor: pointer;
}

.app-topbar {
  display: none;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
}
.app-topbar .brand img { width: 24px; height: 24px; }
.app-topbar .brand span { font-size: 16px; }

/* Free-plan upgrade banner — pinned above the whole app shell (sidebar +
   topbar), only ever shown to signed-in Free users (see foundlyRenderFreeAttemptsHint). */
.free-banner {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 44px;
  align-items: center;
  justify-content: center;
  background: #FFCA0A;
  color: #11110F;
  font-size: 13.5px;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  z-index: 90;
  padding: 0 16px;
}
.free-banner:hover { filter: brightness(0.97); }
body.has-free-banner .free-banner { display: flex; }
@media (min-width: 861px) {
  body.has-free-banner .sidebar { top: 44px; height: calc(100vh - 44px); height: calc(100dvh - 44px); }
  body.has-free-banner .app-main { margin-top: 44px; }
}

body.no-scroll { overflow: hidden; }

@media (max-width: 860px) {
  .app-main { margin-left: 0; padding-top: 56px; }
  body.has-free-banner .app-main { padding-top: 100px; }
  body.has-free-banner .app-topbar { top: 44px; }

  .app-topbar {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 60;
    background: var(--bg);
  }
  .sidebar-toggle { display: inline-flex; }

  .sidebar {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100dvh;
    border-right: none;
    background: var(--bg);
    z-index: 70;
    display: flex;
    flex-direction: column;
    padding: 24px;
    opacity: 0;
    visibility: hidden;
    transform: scale(0.98);
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
  }
  .sidebar.open {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
  }
  .sidebar .brand { display: none; }
  .sidebar-close { display: flex; }

  .sidebar-nav-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
  .sidebar-nav {
    gap: 4px;
  }
  .sidebar-nav a {
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -0.01em;
    padding: 16px 10px;
    gap: 16px;
    color: var(--ink);
    border-radius: 14px;
  }
  .sidebar-nav a i { font-size: 24px; width: 24px; color: var(--muted); }
  .sidebar-nav a.active { background: var(--surface); }

  .sidebar-bottom { margin-top: 0; flex-shrink: 0; }

  .sidebar-nav-group-label { font-size: 13px; padding: 0 10px 10px; }

  .sidebar-profile-link { padding: 14px !important; }
  .sidebar-profile-avatar { width: 48px; height: 48px; }
  .sidebar-profile-avatar span { font-size: 18px; }
  .sidebar-profile-name { font-size: 18px; }
  .sidebar-profile-plan { font-size: 14px; }
}

/* ---------- Plans (mandatory subscription page) ---------- */
.plans-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}
.plans-topbar-actions { display: flex; align-items: center; gap: 16px; }
.plans-back-link {
  display: inline-flex;
  align-items: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
}
.plans-back-link:hover { text-decoration: underline; }
.plans-logout-link {
  background: none;
  border: none;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  padding: 0;
}
.plans-logout-link:hover { color: var(--ink); }
.plans-msg {
  text-align: center;
  color: #E66F51;
  font-size: 13px;
  margin: 20px 0 0;
  min-height: 18px;
}

/* ---------- Pricing ---------- */
.pricing-wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 64px 24px 96px;
}

.pricing-hero {
  text-align: center;
  max-width: 560px;
  margin: 0 auto 48px;
}
.pricing-hero h1 {
  font-size: clamp(30px, 5vw, var(--fs-display));
  line-height: var(--lh-display);
  font-weight: var(--fw-display);
  letter-spacing: var(--ls-display);
  margin: 0 0 12px;
}
.pricing-hero p {
  color: var(--muted);
  font-size: var(--fs-subtitle);
  line-height: var(--lh-subtitle);
  font-weight: var(--fw-subtitle);
  letter-spacing: var(--ls-subtitle);
  margin: 0;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  align-items: start;
}

.plan-card {
  position: relative;
  border: 1px solid var(--border);
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  overflow: hidden;
}
.plan-card.popular {
  border: 2px solid var(--secondary);
  box-shadow: 0 12px 32px rgba(255, 202, 10, 0.18);
}

.plan-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--secondary);
  color: #11110F;
  font-size: 13px;
  font-weight: 700;
  padding: 10px 0;
}
.plan-badge i { font-size: 13px; }

.plan-body {
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.plan-name {
  font-size: 20px;
  font-weight: 800;
  margin: 0 0 6px;
}

.plan-desc {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  margin: 0 0 20px;
  min-height: 38px;
}

.plan-price {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-bottom: 4px;
}
.plan-price .amount {
  font-size: var(--fs-metric);
  line-height: var(--lh-metric);
  font-weight: var(--fw-metric);
  letter-spacing: var(--ls-metric);
}
.plan-price .period {
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}

.plan-credits {
  color: var(--muted);
  font-size: 13px;
  margin: 0 0 20px;
}

.plan-btn {
  display: block;
  width: 100%;
  text-align: center;
  height: 44px;
  line-height: 44px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}
.plan-btn:hover { opacity: 0.9; }
.plan-btn-popular { background: var(--secondary); color: #11110F; }

.plan-whats-inside {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  margin: 24px 0 4px;
}

.plan-features {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}
.plan-features li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--ink);
  line-height: 1.4;
  padding: 10px 0;
  border-top: 1px solid var(--border);
}
.plan-features li:first-child { border-top: none; }
.plan-features li i {
  color: #7D6507;
  font-size: 13px;
  flex-shrink: 0;
}

@media (max-width: 860px) {
  .pricing-grid { grid-template-columns: 1fr; max-width: 420px; margin: 0 auto; }
}
@media (max-width: 560px) {
  .pricing-wrap { padding: 40px 20px 64px; }
}

/* FAQ */
.faq-section {
  max-width: 720px;
  margin: 96px auto 0;
}
.faq-section h2 {
  text-align: center;
  font-size: clamp(24px, 4vw, var(--fs-h2));
  line-height: var(--lh-h2);
  font-weight: var(--fw-h2);
  letter-spacing: var(--ls-h2);
  margin: 0 0 32px;
}
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.faq-item {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0 20px;
  background: var(--bg);
}
.faq-q {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: none;
  border: none;
  padding: 18px 0;
  font-size: 15px;
  font-weight: 700;
  text-align: left;
  color: var(--ink);
  cursor: pointer;
  font-family: inherit;
}
.faq-q i {
  color: var(--muted);
  font-size: 14px;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}
.faq-item.open .faq-q i { transform: rotate(180deg); }
.faq-a {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.25s ease;
}
.faq-item.open .faq-a { grid-template-rows: 1fr; }
.faq-a-inner { overflow: hidden; }
.faq-a p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.6;
  margin: 0 0 18px;
}

/* Footer — flat white, matching the final CTA (.lpt-cta) that lives as its
   own first child, so both read as one seamless light section; padding sits
   on .ft-wrap instead of the footer itself so the CTA above it stays
   full-bleed, edge to edge. Pages that need it dark (/security) override
   this locally. */
.ft-footer {
  background-color: var(--bg);
  margin-top: 96px;
}
.ft-wrap { max-width: 1200px; margin: 0 auto; padding: 56px 24px 28px; }
.ft-top { margin-bottom: 48px; }

.ft-cols { display: grid; grid-template-columns: 1fr; gap: 32px; }
.ft-col { display: flex; flex-direction: column; gap: 12px; }
.ft-col h4 { font-size: var(--fs-label); font-weight: var(--fw-label); letter-spacing: var(--ls-label); text-transform: uppercase; color: var(--muted); margin: 0 0 4px; }
.ft-col a, .ft-col .ft-soon { color: var(--ink); font-size: var(--fs-ui); font-weight: var(--fw-ui); letter-spacing: var(--ls-ui); text-decoration: none; }
.ft-col a:hover { color: var(--muted); }
.ft-col .ft-soon { color: var(--muted); cursor: default; }

.ft-bottom { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 24px; border-top: 1px solid var(--border); }
.ft-copy { margin: 0; color: var(--muted); font-size: var(--fs-secondary); line-height: var(--lh-secondary); font-weight: var(--fw-secondary); }
.ft-legal { display: flex; gap: 20px; flex-wrap: wrap; }
.ft-legal a { color: var(--muted); font-size: var(--fs-secondary); line-height: var(--lh-secondary); text-decoration: none; }
.ft-legal a:hover { color: var(--ink); }

@media (max-width: 480px) {
  .ft-bottom { flex-direction: column; align-items: flex-start; gap: 12px; }
}

/* ---------- Profile ---------- */
.profile-identity {
  display: flex;
  align-items: center;
  gap: 18px;
}

.avatar-upload {
  position: relative;
  flex-shrink: 0;
}
.avatar-circle {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.avatar-circle img { width: 100%; height: 100%; object-fit: cover; }
.avatar-circle span { font-size: 24px; font-weight: 800; color: #11110F; }

/* Skeleton loading — shown as the initial state of the sidebar profile and
   the Settings > Account card while foundlyInitProfile() is still fetching
   session/subscription data, replaced the instant real content is set
   (textContent wipes the .skel-line child, no JS toggling needed). */
@keyframes foundlySkeletonPulse {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.skel-line {
  display: inline-block;
  height: 0.85em;
  vertical-align: middle;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--border) 25%, var(--surface) 50%, var(--border) 75%);
  background-size: 200% 100%;
  animation: foundlySkeletonPulse 1.4s ease-in-out infinite;
}
.avatar-circle.skel, .sidebar-profile-avatar.skel {
  background: linear-gradient(90deg, var(--border) 25%, var(--surface) 50%, var(--border) 75%);
  background-size: 200% 100%;
  animation: foundlySkeletonPulse 1.4s ease-in-out infinite;
}
.avatar-edit {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  cursor: pointer;
  border: 2px solid var(--bg);
}

.profile-identity-info { min-width: 0; }
.profile-name { font-size: 18px; font-weight: 800; letter-spacing: -0.01em; }
.profile-email { font-size: 13px; color: var(--muted); margin-top: 3px; }
.profile-meta { font-size: 12.5px; color: var(--muted); margin-top: 2px; }

.profile-btn {
  height: 42px;
  padding: 0 18px;
  border-radius: 999px;
  border: none;
  background: var(--ink);
  color: var(--bg);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}
.profile-btn:hover { opacity: 0.9; }
.profile-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.profile-btn-ghost { background: var(--surface); color: var(--ink); }
.profile-btn-danger { background: #FFE1D4; color: #E66F51; }

.profile-msg {
  font-size: 13px;
  margin: 10px 0 0;
  display: none;
}
.profile-msg.visible { display: block; }
.profile-msg.error { color: #E66F51; }
.profile-msg.success { color: #23885A; }

/* Card system used throughout the redesigned settings page — every group
   (profile, name, password, preferences, danger zone) is its own bordered
   card instead of one long list separated by thin dividers. */
.set-card {
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 22px;
  margin-bottom: 16px;
}
.set-card-profile {
  display: flex;
  align-items: center;
  gap: 18px;
  background: transparent;
  border-color: transparent;
  padding-left: 0;
  padding-right: 0;
}
.set-card-title { font-size: 14.5px; font-weight: 700; }

.set-input {
  height: 44px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg);
  padding: 0 14px;
  font-size: 14px;
  font-family: inherit;
  color: var(--ink);
  outline: none;
}
.set-input:focus { border-color: var(--ink); }

.pref-name { font-size: 14px; font-weight: 600; }
.pref-desc { font-size: 13px; color: var(--muted); margin-top: 2px; }

.danger-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
}
.danger-row:first-child { padding-top: 4px; }
.danger-row:last-child { padding-bottom: 0; }
.danger-row:not(:last-of-type) { border-bottom: 1px solid rgba(230, 111, 81, 0.25); }
.danger-row .profile-btn-danger { flex-shrink: 0; }

@media (max-width: 480px) {
  .danger-row { flex-direction: column; align-items: flex-start; gap: 10px; }
  .set-card-profile { flex-direction: column; align-items: flex-start; }
}

/* ---------- Settings page (single flat page, Name/Password/Billing each
   open their own popup — see .settings-modal-* below) ---------- */
.settings-shell-single { display: flex; justify-content: center; min-height: 100%; }
.settings-content-single { width: 100%; max-width: 640px; padding: 40px 24px 60px; }

.settings-back {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--muted);
  margin-bottom: 20px;
}
.settings-back:hover { color: var(--ink); }
.settings-back i { font-size: 14px; }

.settings-content-single h2 { font-size: var(--fs-h2); line-height: var(--lh-h2); font-weight: var(--fw-h2); letter-spacing: var(--ls-h2); margin: 0 0 6px; }
.settings-pane-desc { color: var(--muted); font-size: 14px; margin: 0 0 28px; }
.settings-divider { height: 1px; background: var(--border); margin: 24px 0; }
.settings-subhead { font-size: 15px; font-weight: 700; margin: 0 0 16px; }
.settings-subhead-danger { color: #E66F51; }
:root[data-theme="dark"] .settings-subhead-danger { color: #DF795F; }

.settings-list {
  border: 1px solid var(--border);
  border-radius: 16px;
  margin-bottom: 16px;
  overflow: hidden;
}
.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  padding: 16px 20px;
  border: none;
  border-top: 1px solid var(--border);
  background: none;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
}
.settings-row:first-child { border-top: none; }
.settings-row:not(.settings-row-static):hover { background: var(--surface); }
.settings-row-static { cursor: default; }
.settings-row-text { min-width: 0; }
.settings-row-label { font-size: 14px; font-weight: 600; color: var(--ink); }
.settings-row-value { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.settings-row-sub { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.settings-row-chevron { font-size: 14px; color: var(--muted); flex-shrink: 0; }

.settings-logout-standalone {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  padding: 10px 12px;
  border: none;
  background: none;
  color: #E66F51;
  font-size: 13px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  border-radius: 10px;
}
.settings-logout-standalone:hover { background: var(--surface); }
:root[data-theme="dark"] .settings-logout-standalone { color: #DF795F; }

/* ---------- Settings popups (Name / Password / Billing) ---------- */
.settings-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(17, 17, 15, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 1000;
}
.settings-modal {
  position: relative;
  background: var(--bg);
  border-radius: 18px;
  padding: 32px 28px;
  max-width: 380px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
}
.settings-modal-lg { max-width: 520px; }
.settings-modal-title { font-size: 18px; font-weight: 800; letter-spacing: -0.01em; margin: 0 0 18px; }
.settings-modal-input { width: 100%; margin-bottom: 10px; }
.settings-modal-input:last-of-type { margin-bottom: 0; }
.settings-modal-save-btn { width: 100%; margin-top: 14px; }

.billing-hero {
  padding: 0 0 22px;
  border-radius: 0;
  border: none;
  background: none;
  color: var(--ink);
  margin-bottom: 10px;
}
.billing-hero-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}
.billing-hero-label { font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.billing-hero-plan { font-size: 24px; font-weight: 800; letter-spacing: -0.02em; }
.billing-hero-grid {
  display: flex;
  gap: 32px;
  padding-top: 18px;
  margin-bottom: 22px;
  border-top: 1px solid var(--border);
}
.billing-hero-stat { display: flex; flex-direction: column; gap: 4px; }
.billing-hero-stat-label { font-size: 12px; color: var(--muted); }
.billing-hero-stat-value { font-size: 15px; font-weight: 700; }
.billing-hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.billing-hero-actions .profile-btn-ghost { background: var(--surface); color: var(--ink); border: 1px solid var(--border); }

.billing-history-list { display: flex; flex-direction: column; }
.billing-history-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-top: 1px solid var(--border);
}
.billing-history-row:first-child { border-top: none; }
.billing-history-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.billing-history-plan { font-size: 14px; font-weight: 600; color: var(--ink); }
.billing-history-date { font-size: 12.5px; color: var(--muted); }
.billing-history-right { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.billing-history-amount { font-size: 14px; font-weight: 700; color: var(--ink); }
.billing-status-pill {
  display: inline-flex;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  text-transform: capitalize;
}

@media (max-width: 480px) {
  .billing-hero-grid { gap: 20px; }
  .billing-hero-actions { flex-direction: column; }
  .billing-hero-actions .profile-btn { width: 100%; }
}

@media (max-width: 860px) {
  .settings-content-single { padding: 24px 16px 40px; }
}
@media (max-width: 640px) {
  .settings-modal { padding: 26px 20px; }
}

/* ---------- Inline report viewer (view-result / view-idea shown inside /app) ---------- */
#view-report {
  --report-card: #FFFFFF;
  --green: #23885A;
  --green-bg: #DFF5E8;
  --orange: #DBB52D;
  --orange-bg: #FFE1D4;
  --red: #E66F51;
  --red-bg: #FFE1D4;
  --blue: #4C7ACE;
  --track: #E7E6DF;
  --chart-bar-bg: #B9CEF9;
  background: var(--bg);
  position: relative;
  min-height: 100vh;
}
:root[data-theme="dark"] #view-report {
  --report-card: #1A1B18;
  --green-bg: rgba(35, 136, 90, 0.16);
  --orange-bg: rgba(219, 181, 45, 0.16);
  --red-bg: rgba(230, 111, 81, 0.16);
  --track: #42433D;
  --chart-bar-bg: #233E53;
}

#view-report .report {
  max-width: none;
  margin: 0;
  padding: 24px 24px 80px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
/* Makes these wrapper divs participate in the grid as if their .card
   children were direct grid items, instead of collapsing them all into a
   single grid cell/column. */
#personalReport, #libraryReport { display: contents; }
#personalReport[hidden], #libraryReport[hidden] { display: none; }
#view-report .idea-header-row {
  grid-column: 1 / -1;
  display: flex;
  align-items: flex-start;
  gap: 16px;
}
#view-report .idea-header-text { min-width: 0; }
#view-report .idea-title {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.3;
  margin: 0;
}
#view-report .idea-description {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.6;
  margin: 8px 0 0;
}
#view-report .idea-verdict-headline { color: var(--ink); font-weight: 800; }

/* ---- Library idea viewer: logo + title + category, then formatted content ---- */
#view-report .idea-simple-header { display: flex; align-items: center; gap: 16px; }
#view-report .idea-simple-logo .lib-idea-icon { width: 64px; height: 64px; border-radius: 16px; font-size: 26px; }
#view-report .idea-simple-heading { min-width: 0; display: flex; flex-direction: column; gap: 8px; }
#view-report .idea-simple-title { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.25; margin: 0; }
#view-report .idea-simple-content { font-size: 15px; line-height: 1.7; color: var(--ink); }
#view-report .idea-simple-content p { margin: 0 0 1em; }
#view-report .idea-simple-content p:last-child { margin-bottom: 0; }
#view-report .idea-simple-content strong { font-weight: 700; }
#view-report .idea-simple-content a { color: var(--ink); text-decoration: underline; text-underline-offset: 2px; }
#view-report .idea-simple-content img { display: block; width: 100%; height: auto; border-radius: 12px; margin: 1.2em 0; }
@media (max-width: 560px) {
  #view-report .idea-simple-title { font-size: 21px; }
  #view-report .idea-simple-logo .lib-idea-icon { width: 52px; height: 52px; border-radius: 14px; font-size: 21px; }
}

@media (max-width: 560px) {
  #view-report .idea-title { font-size: 19px; }
  #view-report .report { padding: 16px 16px 60px; gap: 12px; }
}

#view-report .report-topbar {
  max-width: none;
  margin: 0;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 14px;
  border-bottom: 1px solid var(--border);
}
#view-report .report-topbar a {
  color: var(--ink);
  font-weight: 400;
  text-decoration: underline;
}
#view-report .report-topbar a:hover { opacity: 0.75; }
#view-report .report-topbar .crumb-sep { font-size: 11px; color: var(--muted); }
#view-report .report-topbar .crumb-current { color: var(--ink); font-weight: 400; }

#view-report .card {
  background: var(--report-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px 22px;
}

/* Free plan: section titles stay visible, everything under them is blurred
   and locked behind an "Upgrade to Pro" overlay — sized to the content
   itself (not the whole card) so the title never gets covered. */
#view-report .card-lock-wrap { position: relative; }
#view-report .card-locked .card-lock-target {
  filter: blur(6px);
  pointer-events: none;
  user-select: none;
}
#view-report .card-lock-overlay { display: none; }
#view-report .card-locked .card-lock-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
  padding: 16px;
  min-height: 96px;
  background: color-mix(in srgb, var(--bg) 72%, transparent);
}
#view-report .card-lock-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--surface);
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}
#view-report .card-lock-upgrade {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  text-decoration: underline;
  cursor: pointer;
  background: none;
  border: none;
  font-family: inherit;
  padding: 0;
}

#view-report .qa-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
#view-report .qa-item { }
#view-report .qa-q { font-size: 12px; font-weight: 700; color: var(--muted); margin-bottom: 4px; }
#view-report .qa-a { font-size: 13px; color: var(--ink); line-height: 1.55; margin: 0; }
@media (max-width: 480px) {
  #view-report .qa-grid { grid-template-columns: 1fr; }
}

#view-report .section-title {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  row-gap: 6px;
  gap: 8px;
  font-size: var(--fs-h2);
  line-height: var(--lh-h2);
  font-weight: var(--fw-h2);
  letter-spacing: var(--ls-h2);
  margin: 0 0 18px;
}
#view-report .section-title i { font-size: 18px; color: var(--muted); }
#view-report .section-subtitle { margin: -12px 0 18px; font-size: var(--fs-subtitle); line-height: var(--lh-subtitle); font-weight: var(--fw-subtitle); letter-spacing: var(--ls-subtitle); color: var(--muted); }
#view-report .section-subtitle:empty { display: none; }
#view-report .section-title .brand-tag {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}
#view-report .brand-tag img { width: auto; height: 13px; display: block; }

#view-report p.lead { font-size: 14px; line-height: 1.6; color: var(--ink); margin: 0; }

#view-report .idea-potential-badge {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin: 0 0 4px;
}
#view-report .idea-potential-badge .so-score-gauge { width: 200px; }
#view-report .idea-potential-badge .so-score-pct { font-size: var(--fs-metric); line-height: var(--lh-metric); font-weight: var(--fw-metric); letter-spacing: var(--ls-metric); bottom: 10px; }
#view-report .idea-potential-label { font-size: 16px; font-weight: 700; color: var(--ink); }

#view-report .so-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
#view-report .so-cell {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  padding: 18px;
  border-right: 1px solid var(--border);
}
#view-report .so-cell:last-child { border-right: none; }
#view-report .so-label { font-size: 12px; font-weight: 400; color: var(--muted); }
#view-report .so-num { font-size: 13px; font-weight: 600; color: var(--ink); }
#view-report .so-plain { font-size: 15px; font-weight: 400; color: var(--ink); }

#view-report .so-gauge,
#view-report .so-bars,
#view-report .so-demand-bars,
#view-report .so-linechart,
#view-report .so-diffbars {
  width: 84px;
}
#view-report .so-score-gauge { position: relative; width: 100px; }
#view-report .so-score-gauge svg { display: block; width: 100%; height: auto; }
#view-report .so-score-pct { position: absolute; left: 0; right: 0; bottom: 0; text-align: center; font-size: 17px; font-weight: 800; color: var(--ink); }
#view-report .so-gauge { position: relative; }
#view-report .so-gauge svg { display: block; width: 100%; height: auto; }

#view-report .so-bars { display: flex; align-items: flex-end; gap: 3px; height: 28px; }
#view-report .so-bars div { flex: 1; background: #42A471; border-radius: 2px 2px 0 0; }

#view-report .so-demand-bars { display: flex; align-items: center; gap: 3px; height: 24px; }
#view-report .so-demand-bar { flex: 1; height: 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); }
#view-report .so-demand-bar.filled { background: #4C7ACE; border-color: transparent; }

#view-report .so-linechart { display: block; height: 32px; }

#view-report .so-diffbars { display: flex; align-items: flex-end; gap: 6px; height: 28px; }
#view-report .so-diffbar { flex: 1; border-radius: 2px 2px 0 0; background: var(--surface); border: 1px solid var(--border); }
#view-report .so-diffbar.filled { border-color: transparent; }

@media (max-width: 900px) {
  #view-report .so-grid { grid-template-columns: repeat(2, 1fr); }
  #view-report .so-cell { border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); }
  #view-report .so-cell:nth-child(2n) { border-right: none; }
  #view-report .so-cell:nth-child(n+3) { border-bottom: none; }
}
@media (max-width: 420px) {
  #view-report .so-grid { grid-template-columns: 1fr; }
  #view-report .so-cell { border-right: none !important; border-bottom: 1px solid var(--border); }
  #view-report .so-cell:last-child { border-bottom: none; }
}

#view-report .reddit-list { display: flex; flex-direction: column; gap: 12px; }
#view-report .reddit-card {
  display: block;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
  background: var(--report-card);
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
}
#view-report .reddit-card:hover { box-shadow: 0 8px 20px rgba(17, 17, 15, 0.06); border-color: var(--muted); }
#view-report .reddit-head { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
#view-report .reddit-icon-img { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
#view-report .reddit-head .sub { font-size: 12px; font-weight: 700; }
#view-report .reddit-head .site { font-size: 11px; color: var(--muted); }
#view-report .reddit-card h5 { margin: 0; font-weight: 700; line-height: 1.4; color: var(--ink); }
#view-report .reddit-reactions { display: flex; align-items: center; gap: 16px; font-size: 13px; color: var(--muted); font-weight: 600; }
#view-report .reddit-reactions span { display: flex; align-items: center; gap: 5px; }
#view-report .reddit-reactions i { font-size: 14px; }
#view-report .comm-note { font-size: 13px; color: var(--muted); line-height: 1.55; margin: 12px 0 0; }

#view-report .evidence-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items: start;
}
@media (max-width: 900px) {
  #view-report .evidence-row { grid-template-columns: 1fr; }
}
/* Search Demand card hides itself when there are no conversations — Search
   trends then takes the full row instead of leaving an empty column. */
#view-report .evidence-row.single-col { grid-template-columns: 1fr; }

#view-report .advantage-risks-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items: start;
}
@media (max-width: 900px) {
  #view-report .advantage-risks-row { grid-template-columns: 1fr; }
}

#view-report .map-box {
  width: calc(100% + 44px);
  margin: 0 -22px 16px;
  aspect-ratio: 16 / 9;
  background: var(--report-card);
  position: relative;
  overflow: hidden;
}
#view-report .map-box svg { display: block; width: 100%; height: 100%; }
@media (max-width: 560px) {
  #view-report .report-topbar { padding: 16px; }
  #view-report .card { padding: 18px 16px; border-radius: 14px; }
  #view-report .map-box { width: calc(100% + 32px); margin: 0 -16px 16px; }
}
#view-report .country-row { display: flex; align-items: center; gap: 10px; padding: 7px 0; font-size: 13px; }
#view-report .country-flag { width: 22px; height: 16px; border-radius: 3px; object-fit: cover; flex-shrink: 0; box-shadow: 0 0 0 1px rgba(17, 17, 15, 0.06); }
#view-report .country-name { width: 92px; flex-shrink: 0; color: var(--ink); }
#view-report .country-bar-track { flex: 1; height: 6px; background: var(--surface); border-radius: 999px; overflow: hidden; }
#view-report .country-bar-fill { display: block; height: 100%; background: var(--blue); border-radius: 999px; }
#view-report .country-val { width: 34px; text-align: right; color: var(--muted); font-size: 12px; flex-shrink: 0; }
#view-report .reco-box { margin-top: 14px; padding: 12px; background: var(--surface); border-radius: 10px; font-size: 13px; color: var(--muted); line-height: 1.5; }
#view-report .reco-box b { color: var(--ink); }

#view-report .market-customer-row {
  display: grid;
  grid-template-columns: 3fr 1fr;
  gap: 16px;
  align-items: start;
}
@media (max-width: 900px) {
  #view-report .market-customer-row { grid-template-columns: 1fr; }
}

#view-report .market-meta-row { display: flex; gap: 32px; flex-wrap: wrap; }
#view-report .market-meta-label { font-size: 12px; color: var(--muted); font-weight: 600; margin-bottom: 5px; }
#view-report .market-meta-value { font-size: 14px; font-weight: 700; }

#view-report .trend-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  margin: 0 -12px;
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  transition: background 0.15s ease;
}
#view-report .trend-row:not(:last-of-type) { border-bottom: 1px solid var(--border); }
#view-report .trend-row:hover { background: var(--surface); }
#view-report .trend-row span { font-size: 13px; font-weight: 400; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-right: 10px; }
#view-report .trend-row svg { width: 90px; height: 32px; flex-shrink: 0; }

#view-report .show-more {
  display: block;
  width: 100%;
  text-align: center;
  margin-top: 14px;
  padding: 10px;
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  border: none;
  cursor: pointer;
}
#view-report .show-more:hover { background: var(--border); }

#view-report .bars-chart { display: flex; align-items: flex-end; gap: 4px; height: 70px; margin-bottom: 14px; }
#view-report .bars-chart div { flex: 1; background: var(--blue); border-radius: 3px 3px 0 0; opacity: 0.85; }
#view-report .field-label { font-size: 13px; font-weight: 700; color: var(--ink); text-transform: none; letter-spacing: 0; margin: 14px 0 6px; }
#view-report .field-label:first-of-type { margin-top: 0; }
#view-report .age-value, #view-report .gender-value { font-size: 14px; font-weight: 400; }
#view-report .chip-box { border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; font-size: 13px; margin-bottom: 6px; }

#view-report .sat-competition-row {
  display: grid;
  grid-template-columns: minmax(260px, 340px) 1fr;
  gap: 16px;
  align-items: start;
}
#view-report .saturation-card, #view-report .competition-card {
  border: 1px solid var(--border);
  border-radius: 16px;
}
#view-report .sat-labels-row {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 4px;
}
#view-report .sat-gauge { width: 100%; max-width: 220px; margin: 0 auto; }
#view-report .sat-gauge svg { display: block; width: 100%; height: auto; }
#view-report .sat-value-row { display: flex; justify-content: center; margin-top: 6px; }
@media (max-width: 640px) {
  #view-report .sat-gauge { max-width: 320px; }
}
#view-report .count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
}
#view-report .competitor-table-wrap { overflow-x: auto; }
#view-report .competitor-table { width: 100%; min-width: 460px; border-collapse: collapse; }
#view-report .competitor-table td { padding: 12px 0; border-bottom: 1px solid var(--border); font-size: 13px; vertical-align: middle; }
#view-report .competitor-table tr:last-child td { border-bottom: none; }
#view-report .comp-td-name { display: flex; align-items: center; gap: 10px; white-space: nowrap; }
#view-report .comp-favicon { width: 20px; height: 20px; border-radius: 4px; object-fit: cover; flex-shrink: 0; }
#view-report .comp-td-name a { color: var(--accent); text-decoration: none; }
#view-report .comp-td-name a:hover { text-decoration: underline; }
#view-report .comp-td-desc { color: var(--muted); max-width: 360px; }
#view-report .comp-td-price { color: var(--ink); white-space: nowrap; text-align: right; }
#view-report .demand-table .comp-td-desc { color: var(--ink); }
#view-report .demand-source { display: flex; flex-direction: column; gap: 2px; line-height: 1.3; }
#view-report .demand-table .demand-source-name { font-size: 13px; color: var(--ink); font-weight: 400; }
#view-report .demand-table .demand-source-sub { font-size: 11px; color: var(--muted); }
#view-report .comp-td-link { width: 32px; text-align: right; }
#view-report .comp-td-link a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  color: var(--muted);
  text-decoration: none;
  font-size: 12px;
}
#view-report .comp-td-link a:hover { background: var(--surface); color: var(--ink); }
@media (max-width: 900px) {
  #view-report .sat-competition-row { grid-template-columns: 1fr; }
}

/* Competitors + Search Demand tables -> stacked cards on mobile. Desktop is
   untouched — this is purely a reflow of the same markup, no JS involved. */
@media (max-width: 640px) {
  #view-report .competition-card .competitor-table-wrap,
  #view-report .demand-card .competitor-table-wrap { overflow-x: visible; }
  #view-report .competition-card .competitor-table,
  #view-report .demand-card .competitor-table { min-width: 0; display: block; }
  #view-report .competition-card .competitor-table tbody,
  #view-report .demand-card .competitor-table tbody { display: block; }
  #view-report .competition-card .competitor-table tr,
  #view-report .demand-card .competitor-table tr {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    column-gap: 10px;
    row-gap: 6px;
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
  }
  #view-report .competition-card .competitor-table tr:last-child,
  #view-report .demand-card .competitor-table tr:last-child {
    border-bottom: none;
  }
  #view-report .competition-card .competitor-table td,
  #view-report .demand-card .competitor-table td { display: block; padding: 0; border: none; }
  #view-report .competition-card .comp-td-name,
  #view-report .demand-card .comp-td-name { flex: 1 1 100%; }
  #view-report .competition-card .comp-td-desc,
  #view-report .demand-card .comp-td-desc { flex: 1 1 auto; max-width: none; font-size: 12.5px; }
  #view-report .competition-card .comp-td-price { margin-left: auto; }
}

#view-report .adv-row { display: flex; align-items: center; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--border); }
#view-report .adv-row:last-child { border-bottom: none; }
#view-report .adv-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 13px;
  line-height: 1;
  flex-shrink: 0;
}
#view-report .adv-icon i { display: flex; }
#view-report .adv-icon-high { background: var(--green); color: #FFFFFF; }
#view-report .adv-icon-medium { background: var(--orange); color: #FFFFFF; }
#view-report .adv-icon-low { background: var(--muted); color: #FFFFFF; }
#view-report .adv-row-text { font-size: 14px; color: var(--ink); line-height: 1.5; }

#view-report .revpot-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1.1fr;
  gap: 24px;
  margin-bottom: 20px;
}
#view-report .revpot-label { font-size: 13px; color: var(--muted); margin-bottom: 14px; }
#view-report .revpot-minmax { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-top: 8px; }
#view-report .revpot-box {
  display: block;
  width: 100%;
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 14px;
  font-family: inherit;
  color: var(--ink);
  background: var(--report-card, transparent);
  box-sizing: border-box;
}
#view-report .revpot-box:focus { outline: none; border-color: var(--accent, #4C7ACE); }
#view-report .revpot-result {
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px 18px;
}
:root[data-theme="dark"] #view-report .revpot-result { background: rgba(255, 255, 255, 0.04); }
#view-report .revpot-result-label { font-size: 13px; color: var(--muted); margin-bottom: 10px; }
#view-report .revpot-result-value { font-size: 26px; font-weight: 700; color: var(--ink); }
#view-report .revpot-result-value .unit { font-size: 14px; font-weight: 400; color: var(--muted); margin-left: 2px; }
#view-report .revpot-result-arr { font-size: 13px; color: var(--muted); margin-top: 8px; line-height: 1.5; }
@media (max-width: 780px) {
  #view-report .revpot-grid { grid-template-columns: 1fr; gap: 20px; }
}
#view-report .slider-track { position: relative; height: 4px; background: var(--border); border-radius: 999px; }
#view-report .slider-fill { position: absolute; top: 0; left: 0; height: 100%; background: var(--blue); border-radius: 999px; }
#view-report .slider-dot {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--blue);
  border: 2px solid #FFFFFF;
  box-shadow: 0 0 0 1px var(--blue);
  pointer-events: none;
}
#view-report .slider-input {
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  height: 24px;
  margin: 0;
  transform: translateY(-50%);
  background: transparent;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
}
#view-report .slider-input::-webkit-slider-runnable-track { background: transparent; }
#view-report .slider-input::-moz-range-track { background: transparent; }
#view-report .slider-input::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; background: transparent; }
#view-report .slider-input::-moz-range-thumb { width: 20px; height: 20px; border: none; background: transparent; }
#view-report .mono-bars { display: flex; align-items: flex-end; gap: 5px; height: 50px; margin-top: 14px; }
#view-report .mono-bars div { flex: 1; background: var(--blue); border-radius: 3px 3px 0 0; }

#view-report .risk-row { display: flex; align-items: center; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--border); }
#view-report .risk-row:last-child { border-bottom: none; }
#view-report .risk-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 13px;
  line-height: 1;
  flex-shrink: 0;
}
#view-report .risk-icon i { display: flex; }
#view-report .risk-icon-high { background: var(--red); color: #FFFFFF; }
#view-report .risk-icon-medium { background: var(--orange); color: #FFFFFF; }
#view-report .risk-icon-low { background: var(--green); color: #FFFFFF; }
#view-report .risk-row-text { font-size: 14px; color: var(--ink); line-height: 1.5; }

#view-report .badge { display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: 11px; font-weight: 700; }
#view-report .badge-high { background: var(--red-bg); color: var(--red); }
#view-report .badge-medium { background: var(--orange-bg); color: var(--orange); }
#view-report .badge-low { background: var(--green-bg); color: var(--green); }
#view-report .badge-pos-high { background: var(--green-bg); color: var(--green); }
#view-report .badge-pos-medium { background: var(--orange-bg); color: var(--orange); }
#view-report .badge-pos-low { background: var(--surface); color: var(--muted); }

#view-report .report-loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  z-index: 40;
}
#view-report .report-empty {
  max-width: 400px;
  margin: 80px auto;
  text-align: center;
  padding: 0 24px;
}
#view-report .loading-arc { width: 120px; }
#view-report .loading-arc svg { display: block; width: 100%; height: auto; }
#view-report .report-empty h2 { font-size: var(--fs-h3); line-height: var(--lh-h3); font-weight: var(--fw-h3); letter-spacing: var(--ls-h3); margin: 0 0 8px; }
#view-report .report-empty p { color: var(--muted); font-size: 14px; margin: 0 0 20px; }

/* Library idea reports: "Copy AI Build Prompt" card.
   Body is always dark, regardless of site theme — it's meant to read like a
   code/prompt block, not like the rest of the page. */
#view-report .prompt-card { border: 1px solid var(--border); border-radius: 16px; overflow: hidden; background: var(--bg); }
#view-report .prompt-card-header { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--border); }
#view-report .prompt-card-title { font-size: 14.5px; font-weight: 800; color: var(--ink); }
#view-report .prompt-copy-btn {
  width: 34px; height: 34px; border-radius: 10px; flex-shrink: 0;
  border: 1px solid var(--border); background: var(--bg); color: var(--ink);
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}
#view-report .prompt-copy-btn:hover { background: var(--surface); border-color: var(--muted); }
#view-report .prompt-copy-btn:active { transform: scale(0.96); }
#view-report .prompt-card-body {
  margin: 0; padding: 18px; background: #11110F; color: #F6F6F2;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px; line-height: 1.65; white-space: pre-wrap; word-break: break-word;
  max-height: 360px; overflow-y: auto;
}

@media print {
  .app-topbar, .sidebar, .ai-fab, .ai-panel, #view-report .report-topbar, #view-report .prompt-card {
    display: none !important;
  }
  .app-main { padding: 0 !important; margin: 0 !important; max-width: none !important; }
  .app-layout { display: block !important; }
  body { background: #fff !important; }
}
