/* ==================================================================
   Homepage (Toadllm landing) — flowtech_core-specific styles.
   Self-contained: the landing page owns its static folder (images, css,
   ...) and does not depend on the shared frontend/static UI layer for
   assets. It reuses the shared design-system components (.btn, .card,
   .tag, .field-input) and is themed exclusively through the skin tokens
   (--m-*), so the day/night skins apply here too.
   ================================================================== */

/* ---------- Layout / containers ---------- */
.hp-container {
  max-width: 72rem;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.hp-section {
  padding: 4.5rem 0;
}

.hp-section-soft {
  padding: 4.5rem 0;
  background: var(--m-soft);
}

.hp-section-head {
  text-align: center;
  margin-bottom: 2.75rem;
}

.hp-section-head .hp-badge {
  margin: 0 auto 1.1rem;
}

/* ---------- Header / navbar ---------- */
.hp-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: #fff;
  border-bottom: 1px solid var(--m-border);
}

.hp-header-actions .ftg-switcher-btn {
  /* Just the flag: no background, no border, no shadow. The dropdown menu
     still opens on click. */
  background: transparent;
  background-image: none;
  border: none;
  box-shadow: none;
  padding: 8px 10px;
}

/* The night skin re-paints the switcher chevron with a light stroke: clear it
   here too (higher specificity than the skin rule). */
html[data-skin="night"] .hp-header-actions .ftg-switcher-btn {
  background-image: none;
}

.hp-header-actions .ftg-switcher-btn:hover {
  box-shadow: none;
}

/* Desktop topbar action order: Login, Free Analysis, then the language
   switcher as the last (rightmost) item. */
.hp-header-actions .btn-secondary {
  order: 1;
  background: var(--m-forest-soft);
}

/* The Free Analysis button in the header inherits the primary shadow
   (3px 3px 0 var(--m-ink)) — align it with the Login button's shadow. */
.hp-header-actions .btn-primary {
  order: 2;
  box-shadow: 3px 3px 0 var(--m-border-d);
}

.hp-header-actions .btn-primary:hover {
  box-shadow: 1px 1px 0 var(--m-border-d);
}

.hp-header-actions form {
  order: 3;
}

.hp-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  row-gap: 0.5rem;
  padding: 0.75rem 0;
}

.hp-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
}

.hp-brand img {
  height: 2.25rem;
  width: auto;
  object-fit: contain;
}

.hp-brand-name {
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--m-ink);
}

.hp-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.hp-nav a {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--m-text);
  text-decoration: none;
  white-space: nowrap;
}

.hp-nav a:hover {
  color: var(--m-forest);
}

.hp-header-actions {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

@media (max-width: 920px) {
  .hp-nav {
    gap: 1rem;
  }
}

/* ---------- Badges / headings ---------- */
.hp-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.85rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--m-forest);
  background: var(--m-forest-soft);
  border-radius: 999px;
  white-space: nowrap;
}

.hp-h1 {
  font-size: clamp(2.6rem, 4.6vw, 4.9rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
  font-weight: 900;
  color: var(--m-ink);
  margin: 0.5rem 0 1rem;
}

.hp-h2 {
  font-size: clamp(1.45rem, 2.4vw, 2.15rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--m-ink);
  line-height: 1.2;
  margin: 0 0 0.75rem;
}

.hp-gradient-text {
  background: linear-gradient(90deg, var(--m-forest), var(--m-lime));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Hero headline: mostly solid dark forest with a narrow band that fades to a
   light green (lime, still darker than the light canvas) and back. The band
   sits near the center of a 200%-wide gradient image; animating
   background-position 0% -> 100% -> 0% slides it across the text right-to-left
   and then back left-to-right, bouncing off the edges of the headline (the
   fade is wide, the lime core kept narrow). The drop-shadow stays on the
   parent .hp-h1, NOT on the clipped-text span (a filter on the same element
   as `background-clip: text` disables the clipping and paints the whole box
   as a gradient rectangle). IMPORTANT: the `background` shorthand resets
   `background-clip` to `border-box`, so the clip is re-declared AFTER it.
   Disabled when the user prefers reduced motion. */
.hp-h1 {
  filter: drop-shadow(2px 4px 6px rgba(0, 0, 0, 0.35));
}

.hp-h1 .hp-gradient-text {
  background: linear-gradient(
    90deg,
    var(--m-forest) 0,
    var(--m-forest) calc(50% - 90px),
    var(--m-lime) calc(50% - 4px),
    var(--m-lime) calc(50% + 4px),
    var(--m-forest) calc(50% + 90px),
    var(--m-forest) 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  background-size: 200% auto;
  animation: hp-title-sweep 7s ease-in-out infinite;
}

@keyframes hp-title-sweep {
  0%   { background-position: 0% center; }
  50%  { background-position: 100% center; }
  100% { background-position: 0% center; }
}

@media (prefers-reduced-motion: reduce) {
  .hp-h1 .hp-gradient-text {
    animation: none;
    background: linear-gradient(90deg, var(--m-forest) 55%, var(--m-lime) 100%);
    -webkit-background-clip: text;
    background-clip: text;
  }
}

.hp-section-sub {
  font-size: 1rem;
  color: var(--m-muted);
  max-width: 42rem;
  margin: 0 auto;
  line-height: 1.55;
}

/* ---------- Hero (main free-analysis CTA) ---------- */
/* Slightly less breathing room above the headline so the hero starts closer
   to the sticky navbar (the section default is 4.5rem). */
.hp-hero {
  padding-top: 3rem;
}

.hp-hero-inner {
  max-width: 52rem;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.hp-hero-inner .hp-badge {
  margin: 0 auto 1.1rem;
}

.hp-hero-sub {
  font-size: 1.1rem;
  line-height: 1.6;
  color: var(--m-text);
  max-width: 42rem;
  margin: 0 auto 1.4rem;
}

/* ---------- Hero monitored-engine icons (between the sub line and the form) ---------- */
/* The icon row is a horizontally scrolling carousel: the track holds two identical
   groups (home.js clones the first one) and animates -50%, so the marquee loops
   seamlessly. The container masks the edges. */
.hp-engines {
  position: relative;
  overflow: hidden;
  margin: 0 0 1.75rem;
  padding: 0.45rem 0;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 6%, #000 94%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 6%, #000 94%, transparent 100%);
}

.hp-engines-track {
  display: flex;
  width: max-content;
  animation: hp-engines-scroll 32s linear infinite;
}

.hp-engines-group {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding-right: 0.6rem;
}

@keyframes hp-engines-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

.hp-engine-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--m-card);
  border: var(--border-w) var(--border-style) var(--m-border);
  border-radius: 999px;
  padding: 0.55rem 0.95rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--m-text);
  white-space: nowrap;
  box-shadow: 2px 2px 0 var(--m-shadow);
}

.hp-engine-chip img {
  width: 1.5rem;
  height: 1.5rem;
  object-fit: contain;
}

@media (prefers-reduced-motion: reduce) {
  .hp-engines {
    -webkit-mask-image: none;
    mask-image: none;
  }

  .hp-engines-track {
    animation: none;
    width: auto;
    flex-wrap: wrap;
    justify-content: center;
  }

  .hp-engines-group[aria-hidden="true"] {
    display: none;
  }
}

.hp-analyze-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  justify-content: center;
  width: 100%;
}

/* The URL box now sits between the headline and the sub line: keep a little
   air below it so it does not touch the sub text. */
.hp-hero-inner .hp-analyze-form {
  margin-bottom: 1.5rem;
}

.hp-domain {
  flex: 1 1 16rem;
  min-width: 0;
}

.hp-hero-inner .hp-domain {
  flex: 1 1 20rem;
  max-width: 24rem;
  padding: 0.95rem 1.25rem;
  font-size: 1.1rem;
  text-align: center;
}

.hp-hero-inner .hp-btn-lg {
  padding: 0.95rem 1.75rem;
  font-size: 1rem;
}

.hp-btn-lg {
  padding: 0.8rem 1.35rem;
  font-size: 0.9375rem;
}

.hp-btn-shrink {
  flex: 0 0 auto;
}

.hp-form-error {
  font-size: 0.8125rem;
  color: var(--m-danger);
  margin-top: 0.6rem;
  display: block;
}

/* Keep Tailwind's .hidden effective (this stylesheet loads after tailwind). */
.hp-form-error.hidden { display: none; }

.hp-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  align-items: center;
  justify-content: center;
  margin-top: 1.6rem;
}

/* ---------- Trust line ---------- */
.hp-trust li {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--m-text);
}

.hp-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.45rem;
  height: 1.45rem;
  border-radius: 999px;
  background: var(--m-forest);
  color: var(--m-on-accent);
  font-size: 0.875rem;
  line-height: 1;
  font-weight: 800;
}

/* ---------- Social proof ---------- */

/* Client logo wall: three static rows of 10 real-world brand marks, each in a
   uniform cell (equal width, fixed height). Every row's left/right edges are
   masked with a gradient, so the first/last logos fade out as if the strip of
   logos continued beyond the visible area. */
.hp-logos {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.hp-logos-row {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 1.5rem;
  padding: 0.4rem 0;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 3%, #000 97%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 3%, #000 97%, transparent 100%);
}

.hp-logo {
  width: 100%;
  max-width: 5rem;
  height: 2.5rem;
  margin: 0 auto;
  object-fit: contain;
  opacity: 0.92;
}

/* Pure-black brand marks are inverted on the dark skin so they stay readable. */
html[data-skin="night"] .hp-logo--mono {
  filter: brightness(0) invert(1);
}

/* Identification/illustrative note under the demo dashboard: compact muted
   text, coherent with .hp-flow-source. */
.hp-demo-note {
  margin: 1rem auto 0;
  max-width: 42rem;
  font-size: 0.8125rem;
  font-weight: 400;
  line-height: 1.5;
  color: var(--m-muted);
  text-align: center;
}

/* ---------- Market shift (AI purchase consequence flow: 3 equal boxes) ---------- */
.hp-flow {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  gap: 1.25rem;
  align-items: stretch;
}

.hp-flow-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
}

.hp-flow-body {
  font-size: 1rem;
  line-height: 1.55;
  color: var(--m-text);
}

.hp-flow-body strong {
  font-weight: 800;
  color: var(--m-forest-d);
}

.hp-flow-source {
  margin: 1.75rem auto 0;
  width: fit-content;
  font-size: 0.8125rem;
  font-weight: 400;
  color: var(--m-muted);
  text-align: center;
}

.hp-flow-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--m-lime);
  font-size: 1.35rem;
}

@media (max-width: 960px) {
  .hp-flow {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .hp-flow-arrow {
    transform: rotate(90deg);
    margin: 0.15rem 0;
  }
}

/* ---------- Core platform features (3 cards per row) ---------- */
.hp-feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

@media (max-width: 1100px) {
  .hp-feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 960px) {
  .hp-feature-grid {
    grid-template-columns: 1fr;
  }
}

.hp-feature {
  display: flex;
  flex-direction: column;
}

.hp-feature-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--m-ink);
  line-height: 1.35;
}

.hp-feature-body {
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--m-muted);
  margin-top: 0.6rem;
}

.hp-feature-ph {
  margin-top: auto;
  padding-top: 1.1rem;
}

/* ---------- Pricing ---------- */
.hp-billing-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  margin-bottom: 4.5rem;
}

/* Segmented billing toggle with a sliding gradient thumb. */
.hp-billing-toggle {
  position: relative;
  display: inline-flex;
  gap: 0.25rem;
  padding: 0.3rem;
  background: var(--m-soft);
  border: 1px solid var(--m-border-d);
  border-radius: 999px;
  box-shadow: 2px 2px 0 var(--m-border-d);
}

.hp-billing-thumb {
  position: absolute;
  top: 0.3rem;
  bottom: 0.3rem;
  left: 0.3rem;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--m-emerald), var(--m-forest));
  box-shadow: 1px 1px 0 var(--m-border-d);
  transition: left 0.25s ease, width 0.25s ease;
  z-index: 0;
}

.hp-billing-btn {
  position: relative;
  z-index: 1;
  padding: 0.5rem 1.05rem;
  font-size: 0.8125rem;
  font-weight: 700;
  border: none;
  background: transparent;
  color: var(--m-muted);
  border-radius: 999px;
  cursor: pointer;
  transition: color 0.15s ease;
}

.hp-billing-btn:not(.is-active):hover {
  color: var(--m-ink);
}

.hp-billing-btn.is-active {
  color: var(--m-on-accent);
  background: transparent;
  box-shadow: none;
}

/* Price swap animation when the billing period changes. */
.hp-price-swap {
  animation: hpPriceSwap 0.3s ease;
}

@keyframes hpPriceSwap {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hp-save-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.55rem;
  font-size: 0.6875rem;
  font-weight: 800;
  color: #000; /* black — readable on the light gold badge */
  background: linear-gradient(135deg, color-mix(in srgb, var(--m-amber) 35%, white), color-mix(in srgb, var(--m-amber) 65%, white));
  border-radius: 999px;
}

/* The pricing layout is a grid that reads like a table (feature label column
   + 4 plan columns). The featured Growth plan is a STANDALONE card that spans
   all rows and overflows the frame top and bottom, so it reads as a real
   superimposed column (a table row cannot overflow without misaligning the
   values). The frame uses `overflow: visible` so the card can spill out. */
.hp-pricing-wrap {
  position: relative;
  overflow: visible;
  background: var(--m-card);
  border: var(--border-w) var(--border-style) var(--m-ink);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-x) var(--shadow-y) 0 var(--m-shadow);
}

/* The generated grid (shop grid plan §4.3): the shared partial sets
   grid-template-columns inline from the builder (one fraction per column);
   the variable default keeps the CSS usable standalone. */
.hp-pricing-grid {
  display: grid;
  grid-template-columns: 1.05fr repeat(var(--hp-tier-cols, 5), 1fr);
  align-items: stretch;
  min-width: 40rem;
  grid-auto-rows: minmax(2.4rem, auto);
}

/* Current-plan column (D9): dimmed and non-interactive-looking. */
.hp-grid-cell.hp-col-current {
  opacity: 0.55;
}

/* Diagonal "Current plan!" stamp crossing the owned column (D9): a grid item
   spanning the whole column, above the cells, never clickable. */
.hp-current-stamp {
  z-index: 2;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hp-current-stamp span {
  transform: rotate(-18deg);
  padding: 0.35rem 1.1rem;
  font-size: 1.35rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  white-space: nowrap;
  color: color-mix(in srgb, var(--m-forest) 80%, transparent);
  border: 3px double color-mix(in srgb, var(--m-forest) 60%, transparent);
  border-radius: 0.6rem;
  background: color-mix(in srgb, var(--m-card) 55%, transparent);
}

/* Grid cells — plan columns and feature labels. */
.hp-grid-cell {
  padding: 0.9rem 1rem;
  text-align: center;
  font-size: 0.9375rem;
  background: var(--m-card);
  border-bottom: 1px solid var(--m-border);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Goal row — the per-plan benefit copy is denser, so a smaller font keeps it
   readable in the narrow columns. */
.hp-grid-cell.hp-goal-text {
  font-size: 0.8125rem;
  line-height: 1.35;
  font-weight: 500;
}

.hp-grid-cell.hp-row-alt {
  background: var(--m-soft);
}

/* Feature-label column (left) shares the header's green tone. */
.hp-grid-cell.hp-grid-feature {
  text-align: left;
  color: var(--m-text);
  font-weight: 600;
  background: var(--m-brand-tint-25);
  justify-content: flex-start;
  white-space: nowrap;
}

.hp-grid-cell.hp-grid-feature.hp-row-alt {
  background: var(--m-brand-tint-25);
}

/* Rounded frame corners: the wrap keeps `overflow: visible` (so the featured
   card can spill out), so the cells at the four frame corners carry their own
   rounded radius to match the frame's `--r-lg` outline. */
.hp-corner-tl { border-top-left-radius: var(--r-lg); }
.hp-corner-tr { border-top-right-radius: var(--r-lg); }
.hp-corner-bl { border-bottom-left-radius: var(--r-lg); }
.hp-corner-br { border-bottom-right-radius: var(--r-lg); }

/* Header row — plan names on the green band. */
.hp-grid-cell.hp-grid-head {
  color: var(--m-forest-d);
  font-weight: 800;
  font-size: 1.125rem;
  padding: 1.05rem 1rem;
  border-bottom: 1px solid var(--m-border-d);
}

/* "Card CTA" label cell. */
.hp-grid-cell.hp-cta-label {
  color: var(--m-faint);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  white-space: nowrap;
}

/* The featured Growth card — standalone, spans all grid rows in column 4 and
   overflows the frame top and bottom. Opaque cream background, dark-green
   outline, rounded corners on its own box (no white halo: the card is its own
   element, so the rounded corners clip only its own background), and a drop
   shadow for the superimposed look. */
.hp-pricing-featured {
  grid-column: var(--hp-featured-col, 4);
  grid-row: 1 / span 14;
  margin: -1.5rem 0;
  z-index: 0;
  background: color-mix(in srgb, var(--m-amber) 16%, var(--m-card));
  border: 2px solid var(--m-forest);
  border-radius: var(--r-md);
  box-shadow: 0 10px 26px rgba(30, 58, 40, 0.22);
  overflow: hidden;
}

/* Green header band at the top of the card, matching the header row height. */
.hp-pricing-featured::before {
  content: '';
  display: block;
  height: 5.2rem;
  background: linear-gradient(135deg, var(--m-emerald), var(--m-forest));
}

/* The Growth column cells sit on top of the card (z-index 1) and are
   transparent so the card's cream/green shows through; they are aligned with
   the grid rows and keep the same grey row dividers as the other columns. */
.hp-growth-cell {
  grid-column: var(--hp-featured-col, 4);
  z-index: 1;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--m-border);
}

.hp-growth-last {
  border-bottom: none;
}

.hp-grid-cell.hp-growth-cell.hp-grid-head {
  color: var(--m-on-accent);
}

/* The Growth column keeps a uniform soft-yellow (card) background: the
   alternating row shade must not override it. */
.hp-grid-cell.hp-growth-cell {
  background: transparent;
}

.hp-tier-badge {
  display: inline-flex;
  align-items: center;
  margin-left: 0.5rem;
  padding: 0.14rem 0.55rem;
  font-size: 0.625rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--m-forest-d);
  background: var(--m-on-accent);
  border-radius: 999px;
  white-space: nowrap;
}

/* "Best Deal" tag: soft-yellow background with a thin yellow outline. */
.hp-tier-badge--best {
  color: var(--m-amber-fg);
  background: var(--m-amber-soft);
  border: 1px solid var(--m-amber);
}

/* Status icons in the Yes/No cells. */
.hp-cell-icon {
  margin-right: 0.3rem;
  font-size: 0.8125rem;
}

.hp-cell-icon--yes {
  color: var(--m-emerald);
}

.hp-cell-icon--no {
  color: var(--m-faint);
}

/* Round green badge with a white check — a more visible "yes" marker used on
   the Yes / Full / Unlimited values. `line-height: 1` on the badge and the
   icon keeps the check glyph optically centered in the circle (FontAwesome's
   check otherwise sits slightly below the vertical centre). */
.hp-check-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.1rem;
  height: 1.1rem;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--m-emerald);
  color: #fff;
  font-size: 0.6rem;
  line-height: 1;
  margin-right: 0.35rem;
  vertical-align: middle;
}

.hp-check-badge i {
  line-height: 1;
  display: block;
}

/* Golden star marker that replaces the round green check badge on the two
   Success-manager "Yes" answers — same footprint as the check badge (1.1rem)
   so the marker column stays aligned with the other rows. */
.hp-cell-icon--star {
  color: var(--m-amber);
  font-size: 1.1rem;
  line-height: 1;
}

/* The two starred "Yes" answers carry a dark-yellow value text. */
.hp-cell-txt--star {
  color: var(--m-amber-fg);
}

/* Align the check/X/star markers into a vertical line down each column while
   the value text stays centred: the marker is absolutely positioned at a fixed
   left offset (so its x does not move with the text width), and the text is
   centred in the cell. */
.hp-grid-cell:has(.hp-check-badge),
.hp-grid-cell:has(.hp-cell-icon--no),
.hp-grid-cell:has(.hp-cell-icon--star) {
  position: relative;
}

.hp-grid-cell:has(.hp-check-badge) .hp-check-badge,
.hp-grid-cell:has(.hp-cell-icon--no) .hp-cell-icon--no,
.hp-grid-cell:has(.hp-cell-icon--star) .hp-cell-icon--star {
  position: absolute;
  left: 1rem;
}

.hp-cell-txt {
  vertical-align: middle;
}

/* Muted value text — the gray "Manual" answer on the Update row (Essential). */
.hp-cell-muted {
  color: var(--m-muted);
}

/* Positive/highlighted feature values (Yes, prompts ≥ 3,000, Custom,
   Unlimited) — forest green and bold so the "good" facts pop. */
.hp-feat-strong {
  color: var(--m-forest);
  font-weight: 800;
}

/* Price — bigger values, per-unit muted. */
.hp-price-value {
  font-weight: 800;
  font-size: 1.5rem;
  color: var(--m-ink);
  white-space: nowrap;
}

.hp-price-per {
  font-size: 0.8125rem;
  color: var(--m-muted);
  white-space: nowrap;
}

/* Free / Custom price pills. */
.hp-price-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.8rem;
  font-size: 0.8125rem;
  font-weight: 800;
  border-radius: 999px;
  white-space: nowrap;
}

.hp-price-pill--free {
  background: var(--m-forest-soft);
  color: var(--m-forest);
}

.hp-price-pill--custom {
  background: var(--m-soft);
  color: var(--m-muted);
}

.hp-grid-cell .btn {
  white-space: nowrap;
  padding: 0.55rem 0.9rem;
  font-size: 0.8125rem;
  min-width: 9rem;
}

/* Yellow "Get in touch" CTA in the pricing grid — a lighter, clearer amber
   than the other CTAs so the sales action reads clearly, with black text on
   the light fill (readable on both skins' amber). */
.hp-grid-cell .hp-btn-sales {
  background: linear-gradient(135deg, color-mix(in srgb, var(--m-amber) 38%, white), color-mix(in srgb, var(--m-amber) 68%, white));
  color: #000;
  box-shadow: 3px 3px 0 var(--m-border-d);
}

.hp-grid-cell .hp-btn-sales:hover {
  background: linear-gradient(135deg, var(--m-amber), var(--m-amber-d));
  color: #000;
  box-shadow: 1px 1px 0 var(--m-border-d);
  transform: translate(2px, 2px);
  text-decoration: none;
}

/* ---------- "Get in touch" lead-capture modal ---------- */
/* Fixed full-screen layer behind the pricing grid (z 100000, same as the
   app-wide FtgModal overlay). The dialog is a card styled with the skin
   tokens (day/night) and the .field-input fields; the form + success panel
   swap inside it. */
.hp-contact-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 100000;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}

.hp-contact-modal.is-open {
  display: flex;
}

.hp-contact-overlay {
  position: absolute;
  inset: 0;
  background: rgba(20, 34, 26, 0.55);
}

.hp-contact-dialog {
  position: relative;
  width: 100%;
  max-width: 30rem;
  max-height: calc(100vh - 2.5rem);
  overflow-y: auto;
  background: var(--m-card);
  border: var(--border-w) var(--border-style) var(--m-border-d);
  border-radius: var(--r-lg);
  box-shadow: 8px 8px 0 rgba(20, 34, 26, 0.18);
  padding: 1.6rem 1.6rem 1.25rem;
}

.hp-contact-x {
  position: absolute;
  top: 0.7rem;
  right: 0.7rem;
  width: 2.1rem;
  height: 2.1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--m-soft);
  border: none;
  border-radius: var(--r-md);
  color: var(--m-muted);
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.hp-contact-x:hover {
  background: var(--m-hover);
  color: var(--m-ink);
}

.hp-contact-dialog .hp-badge {
  margin-bottom: 0.6rem;
}

.hp-contact-title {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: var(--m-ink);
}

.hp-contact-intro {
  margin: 0.4rem 0 1.1rem;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--m-text);
}

.hp-contact-field {
  display: block;
  margin: 0 0 0.85rem;
}

.hp-contact-label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--m-text);
}

.hp-contact-req {
  color: var(--m-danger);
}

.hp-contact-dialog textarea.field-input {
  resize: vertical;
  min-height: 5.5rem;
}

.hp-contact-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.15rem;
}

.hp-contact-actions .btn {
  flex: 1;
}

.hp-contact-reassure {
  margin: 0.9rem 0 0;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--m-muted);
}

.hp-contact-success {
  text-align: center;
  padding: 0.6rem 0 0.25rem;
}

.hp-contact-success i {
  display: block;
  margin: 0 auto 0.65rem;
  font-size: 2.6rem;
  color: var(--m-forest);
}

.hp-contact-success h3 {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--m-ink);
  margin: 0 0 0.45rem;
}

.hp-contact-success p {
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--m-text);
  margin: 0 auto 1.1rem;
  max-width: 24rem;
}

/* On narrow screens the grid scrolls horizontally; the featured card is pulled
   back inside so it does not clip against the scroll edge. */
@media (max-width: 960px) {
  .hp-pricing-wrap { overflow-x: auto; }
  .hp-pricing-featured { margin: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .hp-billing-thumb { transition: none; }
  .hp-price-swap { animation: none; }
}

/* ---------- FAQ ---------- */
.hp-faq-list {
  max-width: 46rem;
  margin: 0 auto;
}

.hp-faq details {
  background: var(--m-card);
  border: var(--border-w) var(--border-style) var(--m-border-d);
  border-radius: var(--r-md);
  margin-bottom: 0.75rem;
}

.hp-faq summary {
  padding: 1rem 1.25rem;
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--m-ink);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.hp-faq summary::-webkit-details-marker {
  display: none;
}

.hp-faq summary::marker {
  content: "";
}

.hp-faq summary::after {
  content: "+";
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 700;
  color: var(--m-forest);
  width: 1.5rem;
  text-align: center;
  flex: 0 0 auto;
}

.hp-faq details[open] summary::after {
  content: "−";
}

.hp-faq-answer {
  padding: 0.9rem 1.25rem;
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--m-muted);
  border-top: 1px dashed var(--m-border-d);
}

/* ---------- Legal pages (Privacy Policy / Terms and Conditions) ---------- */
.hp-legal {
  max-width: 46rem;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.hp-legal-lead {
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--m-text);
}

.hp-legal-section h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--m-ink);
  margin: 0 0 0.35rem;
}

.hp-legal-section p {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--m-muted);
  margin: 0;
}

.hp-legal-section ul,
.hp-legal-section ol {
  margin: 0.35rem 0 0;
  padding-left: 1.25rem;
  display: grid;
  gap: 0.35rem;
}

.hp-legal-section li {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--m-muted);
}

.hp-legal-section p + ul,
.hp-legal-section p + ol {
  margin-top: 0.4rem;
}

.hp-legal-updated {
  font-size: 0.75rem;
  color: var(--m-muted);
}

/* ---------- Footer ---------- */
.hp-footer {
  padding: 2.5rem 0 1.5rem;
}

.hp-footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.hp-footer-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.hp-footer-brand img {
  height: 2rem;
  width: auto;
  object-fit: contain;
}

.hp-footer-brand-name {
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--m-ink);
}

.hp-footer-tagline {
  font-size: 0.8125rem;
  color: var(--m-muted);
}

.hp-footer-links {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.hp-footer-links a {
  font-size: 0.8125rem;
  color: var(--m-muted);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.hp-footer-links a:hover {
  color: color-mix(in srgb, var(--m-muted) 70%, var(--m-ink));
}

.hp-footer-disclaimer {
  max-width: 52rem;
  font-size: 0.75rem;
  line-height: 1.5;
  color: var(--m-muted);
  text-align: center;
}

.hp-footer-disclaimer a {
  color: var(--m-forest);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.hp-footer-disclaimer a:hover {
  color: var(--m-forest-d);
}

.hp-footer-copyright {
  font-size: 0.8125rem;
  color: var(--m-muted);
}

/* ---------- Feature mockups (replace the old image placeholders) ---------- */
/* A flat, shadow-free mini-app-window preview of each product feature, in the
   same style as the rotating dashboard demo (real widgets, skin tokens) but
   completely static: no animation, no interaction (pointer-events off). Every
   card shares a fixed height so the 3-per-row grid stays aligned; the
   sentiment card is taller (it replaced a 4:3 placeholder). */
.hp-feature-mock {
  height: 17rem;
  display: flex;
  flex-direction: column;
  background: var(--m-card);
  border: 2px solid var(--m-forest-d);
  border-radius: var(--r-md);
  overflow: hidden;
  pointer-events: none;
  user-select: none;
}

.hp-feature-mock-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.8rem;
  border-bottom: 1px solid var(--m-border);
  background: var(--m-soft);
}

.hp-feature-mock-title {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--m-ink);
}

.hp-feature-mock-body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 0.8rem 0.75rem;
}

.hp-feature-mock-body-pad {
  padding: 0.5rem 0.7rem 0.6rem;
}

/* Brand highlight: green text where the monitored brand is mentioned. */
.hm-highlight {
  color: var(--m-forest);
  font-weight: 800;
  background: color-mix(in srgb, var(--m-forest) 14%, transparent);
  border-radius: 3px;
  padding: 0 0.15rem;
}

/* Chips (engine/persona/keyword selectors) */
.hm-chips {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.35rem;
  overflow: hidden;
}

.hm-chips--wrap {
  flex-wrap: wrap;
  justify-content: center;
}

.hm-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.6rem;
  border: 1px solid var(--m-border);
  border-radius: 999px;
  background: var(--m-card);
  font-size: 0.6875rem;
  font-weight: 700;
  color: var(--m-muted);
  white-space: nowrap;
}

.hm-chip img {
  width: 1rem;
  height: 1rem;
  object-fit: contain;
}

.hm-chip--on {
  border-color: var(--m-forest);
  color: var(--m-forest);
  background: var(--m-forest-soft);
}

.hm-chip--pos { border-color: var(--m-success); color: var(--m-success); }
.hm-chip--neg { border-color: var(--m-danger); color: var(--m-danger); }

.hm-chip--open {
  border-color: var(--m-amber);
  color: var(--m-amber-fg);
  background: var(--m-amber-soft);
}

.hm-chip--progress {
  border-color: var(--m-aqua);
  color: var(--m-aqua-fg);
  background: var(--m-aqua-soft);
}

.hm-chip--done {
  border-color: var(--m-success);
  color: var(--m-forest);
  background: var(--m-forest-soft);
}

/* Shared query line */
.hm-query {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  color: var(--m-text);
  white-space: nowrap;
  overflow: hidden;
}

.hm-query-label {
  font-weight: 700;
  color: var(--m-muted);
  flex: 0 0 auto;
}

.hm-query-text {
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* AI answer card */
.hm-answer {
  width: 100%;
  border: 1px solid var(--m-border);
  border-radius: var(--r-sm);
  background: var(--m-soft);
  padding: 0.55rem 0.7rem;
}

.hm-answer-head {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  margin-bottom: 0.2rem;
}

.hm-answer-icon {
  width: 1.05rem;
  height: 1.05rem;
  object-fit: contain;
}

.hm-answer-name {
  font-size: 0.6875rem;
  font-weight: 800;
  color: var(--m-ink);
}

.hm-answer-text {
  font-size: 0.6875rem;
  line-height: 1.4;
  color: var(--m-text);
  margin: 0;
  text-align: center;
}

.hm-persona-label {
  font-size: 0.5625rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--m-muted);
}

/* Small pill badges (severity / priority / source type) */
.hm-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.12rem 0.5rem;
  border-radius: 999px;
  font-size: 0.625rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.hm-badge--ok      { color: var(--m-forest); background: var(--m-forest-soft); }
.hm-badge--warn    { color: var(--m-amber-fg); background: var(--m-amber-soft); }
.hm-badge--bad     { color: var(--m-danger); background: var(--m-danger-soft); }
.hm-badge--info    { color: var(--m-aqua-fg); background: var(--m-aqua-soft); }
.hm-badge--neutral { color: var(--m-muted); background: var(--m-soft); }
.hm-badge--lav     { color: var(--m-lavender-fg); background: var(--m-lavender-soft); }

/* Status dot (sentiment legend) */
.hm-dot {
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 999px;
  flex: 0 0 auto;
}

.hm-dot--ok   { background: var(--m-success); }
.hm-dot--warn { background: var(--m-warning); }
.hm-dot--bad  { background: var(--m-danger); }

/* Charts (SOV horizontal bar + sentiment doughnut) */
.hm-chart {
  position: relative;
}

.hm-chart--sov {
  width: 100%;
  flex: 1 1 0;
  min-height: 0;
}

.hm-footnote {
  font-size: 0.6875rem;
  color: var(--m-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  flex: 0 0 auto;
}

.hm-trend-up {
  color: var(--m-success);
  font-size: 0.75rem;
}

/* Sentiment: centered doughnut with the positive mascot in the hole, a
   single-row legend below it and the keyword chips underneath. */
.hm-sentiment {
  display: flex;
  justify-content: center;
  width: 100%;
  flex: 0 0 auto;
}

.hm-sentiment-chart {
  position: relative;
  width: 140px;
  height: 140px;
}

.hm-sentiment-img {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 58px;
  height: 58px;
  object-fit: contain;
  padding: 5px;
  border-radius: 999px;
}

.hm-sentiment-img.sent-pos {
  background: color-mix(in srgb, var(--m-success) 18%, white);
}

.hm-legend {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.9rem;
  flex-wrap: wrap;
  width: 100%;
}

.hm-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  color: var(--m-text);
}

.hm-legend-item strong {
  font-size: 0.75rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--m-ink);
}

/* Source table (domain + type + usage bar) */
.hm-source {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
}

.hm-source-top {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
}

.hm-domain {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--m-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1 1 auto;
  min-width: 0;
}

.hm-pct {
  font-size: 0.6875rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--m-ink);
  flex: 0 0 auto;
}

.hm-bar {
  height: 6px;
  border-radius: 999px;
  background: var(--m-soft);
  overflow: hidden;
}

.hm-bar-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
}

.hm-bar--ok      { background: var(--m-forest); }
.hm-bar--warn    { background: var(--m-amber); }
.hm-bar--info    { background: var(--m-aqua); }
.hm-bar--neutral { background: var(--m-muted); }
.hm-bar--lav     { background: var(--m-lavender); }

/* Hallucination alert panel */
.hm-alert {
  width: 100%;
  border: 1px solid color-mix(in srgb, var(--m-danger) 45%, transparent);
  border-radius: var(--r-sm);
  background: var(--m-danger-soft);
  padding: 0.6rem 0.7rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  text-align: center;
}

.hm-alert-head {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
}

.hm-alert-title {
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--m-ink);
}

.hm-alert-quote {
  font-size: 0.75rem;
  line-height: 1.5;
  color: var(--m-text);
  margin: 0;
}

.hm-strike {
  color: var(--m-muted);
  text-decoration-color: var(--m-danger);
}

.hm-wrong {
  color: var(--m-danger);
  font-weight: 700;
}

.hm-alert-cause {
  font-size: 0.72rem;
  color: var(--m-muted);
  line-height: 1.45;
}

.hm-cause-label {
  display: inline-block;
  font-size: 0.625rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--m-danger);
  margin-bottom: 0.1rem;
}

.hm-cause-text {
  margin: 0;
}

.hm-url {
  font-family: var(--font-mono);
  color: var(--m-ink);
  font-weight: 700;
  background: var(--m-card);
  border-radius: 3px;
  padding: 0 0.2rem;
}

.hm-alert-actions {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 0.15rem;
}

/* Buttons (decorative, pointer-events off) */
.hm-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.3rem 0.75rem;
  border-radius: var(--r-sm);
  border: 1px solid var(--m-forest);
  background: var(--m-forest);
  color: var(--m-on-accent);
  font-size: 0.6875rem;
  font-weight: 700;
  white-space: nowrap;
}

.hm-btn--ghost {
  background: var(--m-card);
  color: var(--m-forest);
  border-color: var(--m-border-d);
}

/* Remediation task rows */
.hm-task {
  width: 100%;
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
}

.hm-task-check {
  margin-top: 0.15rem;
  accent-color: var(--m-forest);
  width: 0.9rem;
  height: 0.9rem;
}

.hm-task-main {
  flex: 1 1 auto;
  min-width: 0;
}

.hm-task-title {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--m-ink);
  line-height: 1.35;
}

.hm-task-title > span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hm-task-meta {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-top: 0.3rem;
}

.hm-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 999px;
  background: var(--m-forest-soft);
  color: var(--m-forest);
  font-size: 0.5625rem;
  font-weight: 800;
}

.hm-task-assignee {
  font-size: 0.6875rem;
  color: var(--m-muted);
}

/* Content studio: comparison matrix + FAQ + footer */
.hm-matrix {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.6875rem;
  color: var(--m-text);
  flex: 0 0 auto;
}

.hm-matrix th,
.hm-matrix td {
  padding: 0.3rem 0.5rem;
  text-align: center;
}

.hm-matrix thead th {
  font-weight: 800;
  color: var(--m-ink);
  border-bottom: 1px solid var(--m-border);
}

.hm-matrix thead th:first-child,
.hm-matrix tbody th {
  text-align: left;
}

.hm-matrix tbody th {
  font-weight: 600;
  color: var(--m-muted);
}

.hm-matrix tbody tr:nth-child(even) td {
  background: var(--m-soft);
}

.hm-matrix td {
  color: var(--m-forest);
  font-weight: 800;
}

.hm-matrix-no {
  color: var(--m-muted);
}

.hm-faq {
  border: 1px solid var(--m-border);
  border-left: 3px solid var(--m-forest);
  border-radius: var(--r-sm);
  background: var(--m-soft);
  padding: 0.5rem 0.65rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.hm-faq-q {
  font-size: 0.6875rem;
  font-weight: 700;
  color: var(--m-ink);
}

.hm-faq-a {
  font-size: 0.6875rem;
  line-height: 1.45;
  color: var(--m-muted);
}

.hm-faq-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1rem;
  height: 1rem;
  border-radius: 999px;
  background: var(--m-forest);
  color: var(--m-on-accent);
  font-size: 0.5625rem;
  font-weight: 800;
  margin-right: 0.3rem;
}

.hm-content-foot {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
}

/* Persona simulator answers */
.hm-persona-answers {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.hm-persona-answers .hm-answer {
  padding: 0.4rem 0.6rem;
}

/* Multi-turn chat transcript: a centered, slightly narrower column so the
   staggered user/AI bubbles read like a real chat without the two sides
   sitting too far apart. */
.hm-chat {
  width: 86%;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

.hm-chat-turn {
  display: flex;
}

.hm-chat-turn--user {
  justify-content: flex-start;
}

.hm-chat-turn--ai {
  justify-content: flex-end;
}

.hm-bubble {
  max-width: 88%;
  padding: 0.3rem 0.55rem;
  border-radius: var(--r-md);
  font-size: 0.6875rem;
  line-height: 1.35;
  color: var(--m-text);
  background: var(--m-soft);
  border: 1px solid var(--m-border);
}

.hm-chat-turn--user .hm-bubble {
  background: var(--m-forest);
  border-color: var(--m-forest);
  color: var(--m-on-accent);
}

.hm-chat-foot {
  display: flex;
  justify-content: center;
  padding-top: 0.1rem;
  flex: 0 0 auto;
}

/* Integration rows with real toggle switches */
.hm-integration {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.45rem 0.5rem;
  border: 1px solid var(--m-border);
  border-radius: var(--r-sm);
  background: var(--m-card);
}

.hm-integration-icon {
  width: 1.1rem;
  text-align: center;
  font-size: 1.05rem;
  color: var(--m-ink);
  flex: 0 0 auto;
}

.hm-integration-main {
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
  flex: 1 1 auto;
  min-width: 0;
}

.hm-integration-name {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--m-ink);
}

.hm-integration-type {
  font-size: 0.625rem;
  color: var(--m-muted);
}

.hm-toggle {
  appearance: none;
  -webkit-appearance: none;
  width: 1.9rem;
  height: 1.05rem;
  border-radius: 999px;
  background: var(--m-border-d);
  border: 1px solid var(--m-border-d);
  position: relative;
  flex: 0 0 auto;
  margin: 0;
}

.hm-toggle::after {
  content: "";
  position: absolute;
  top: 0.08rem;
  left: 0.08rem;
  width: 0.78rem;
  height: 0.78rem;
  border-radius: 999px;
  background: var(--m-card);
}

.hm-toggle:checked {
  background: var(--m-forest);
  border-color: var(--m-forest);
}

.hm-toggle:checked::after {
  left: 0.94rem;
}

/* ---------- Rotating dashboard demo (replaces the LLM-badges placeholder) ---------- */
/* A flat, shadow-free preview of the real Dashboard: the same widgets the
   product renders, built with the same Chart.js. The left column carries the
   timeline and leaderboard; the right column stacks three equal-height boxes
   (visibility by model, visibility share | sentiment mascot, and the typed
   visibility-prompts list). Purely decorative — the area ignores all pointer
   input. The section is hidden in CSS from the first paint and revealed by
   home_dashboard.js (adds `.hp-demo-visible` once the section scrolls into
   view), staggering the cards. */
.hp-demo {
  /* Deep meadow-green panel (same skin token as the onboarding stepper) so the
     white widget cards inside stand out from the light section background. */
  background: var(--m-stepper-bg, linear-gradient(180deg, #2f7d52 0%, #276845 100%));
  border: 1px solid var(--m-border-d);
  border-radius: var(--r-lg);
  padding: 0.85rem;
  pointer-events: none;
  user-select: none;
}

.hp-demo.hidden { display: none; }

.hp-demo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}

/* Explicit 2x2 placement: the left column (timeline over leaderboard, each
   spanning two columns) sits beside the right column, which is one grid cell
   spanning both rows and holding its three equal-height boxes as a flex
   column. */
.hp-demo-timeline { grid-column: 1 / span 2; grid-row: 1; }
.hp-demo-leaderboard { grid-column: 1 / span 2; grid-row: 2; }

.hp-demo-card {
  background: var(--m-card);
  border: 1px solid var(--m-border-d);
  border-radius: var(--r-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.hp-demo-card-wide { grid-column: span 2; }

/* Right column: spans the two left rows and stacks the three boxes (visibility
   by model, the share|sentiment row, and the typed prompts list) with flex: 1
   each, so they always share the column height equally. */
.hp-demo-right {
  grid-column: 3;
  grid-row: 1 / span 2;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-height: 0;
}

.hp-demo-right > * { flex: 1 1 0; min-height: 0; }

/* Middle-right row: the visibility-share box split vertically, so the donut
   and the sentiment mascot sit in two same-width boxes side by side. */
.hp-demo-right-row {
  display: flex;
  gap: 0.75rem;
  min-width: 0;
}

.hp-demo-right-row .hp-demo-card { flex: 1 1 0; min-width: 0; }

/* The two right-column charts fill whatever height their box gets instead of
   using the fixed 250px timeline chart height. */
.hp-demo-chart-fill { flex: 1 1 0; height: auto; min-height: 0; }

/* Sentiment box: the Dashboard sentiment KPI recreated at demo scale — just
   the brand mascot image on a soft sentiment-tinted circle (no score under
   it), sized to fill the box. */
.hp-demo-sentiment {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 0.5rem 0.5rem;
}

.hp-demo-sent-img {
  width: 92px;
  height: 92px;
  object-fit: contain;
  padding: 12px;
  border-radius: 999px;
}

.hp-demo-sent-img.sent-pos { background: color-mix(in srgb, var(--m-success) 18%, white); }
.hp-demo-sent-img.sent-neu { background: color-mix(in srgb, var(--m-warning) 26%, white); }
.hp-demo-sent-img.sent-neg { background: color-mix(in srgb, var(--m-danger) 16%, white); }

/* Visibility-prompts box: four short prompts per brand typed one after the
   other (re-typed on every rotation), each with a leading line number, and a
   blinking cursor resting at the start of an empty 5th line. The five lines
   are vertically centered in the box with a comfortable inter-line gap. */
.hp-demo-prompts-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.5rem 0.8rem 0.5rem;
  font-size: 0.8rem;
  line-height: 1.2;
  color: var(--m-text);
  min-height: 0;
  overflow: hidden;
}

.hp-demo-prompts-line {
  display: flex;
  align-items: baseline;
  gap: 0.45rem;
  white-space: nowrap;
}

.hp-demo-prompts-num {
  font-weight: 800;
  color: var(--m-amber);
  font-variant-numeric: tabular-nums;
}

.hp-demo-prompts-text { white-space: nowrap; }

.hp-demo-prompts-cursor {
  display: inline-block;
  width: 0.55em;
  height: 1.05em;
  background: currentColor;
  margin-left: 1px;
  vertical-align: -2px;
  animation: hp-demo-cursor-blink 1s steps(1) infinite;
}

@keyframes hp-demo-cursor-blink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

.hp-demo-card-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 0.9rem;
  border-bottom: 1px solid var(--m-border);
}

.hp-demo-card-title {
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--m-ink);
}

.hp-demo-card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.hp-demo-card-body-pad { padding: 0.15rem 0.25rem 0.25rem; }

.hp-demo-chart {
  position: relative;
  height: 250px;
  padding: 0.6rem 0.5rem 0.35rem;
}

/* The visibility-share donut fills the body height of its box (so it is
   always fully visible and never clipped), stays square and is centered
   horizontally; the middle number scales with it. */
.hp-demo-chart-donut {
  flex: 1 1 0;
  height: auto;
  min-height: 0;
  max-width: 100%;
  align-self: center;
  aspect-ratio: 1 / 1;
  padding: 0.15rem;
}

/* Leaderboard table: compact, no scrollbar, no shadow. */
.hp-demo-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8125rem;
  flex: 1;
}

.hp-demo-table th {
  text-align: center;
  font-size: 0.625rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--m-muted);
  padding: 0.5rem 0.3rem 0.35rem;
}

.hp-demo-table th:nth-child(2) { text-align: left; padding-left: 1rem; }

.hp-demo-table td {
  padding: 0.4rem 0.3rem;
  border-top: 1px solid var(--m-border);
  vertical-align: middle;
}

.hp-demo-table tbody { transition: opacity 0.18s ease; }

.hp-demo-num {
  text-align: center;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--m-text);
  white-space: nowrap;
}

.hp-demo-entity {
  text-align: left;
  padding-left: 1rem;
  white-space: nowrap;
}

.hp-demo-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 5px;
  background: #fff;
  margin-right: 0.4rem;
  vertical-align: -4px;
  overflow: hidden;
}

.hp-demo-avatar img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.hp-demo-avatar-initial {
  border: 1.5px solid;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
}

.hp-demo-brand { color: var(--m-amber-fg); font-weight: 800; }
.hp-demo-row-brand { background: var(--m-amber-soft); }

.hp-demo-trend { margin-left: 0.15rem; font-size: 0.9rem; }
.hp-demo-trend-up { color: var(--m-success); }
.hp-demo-trend-down { color: var(--m-danger); }

.hp-demo-sentcell { text-align: center; }

.hp-demo-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  margin-right: 0.3rem;
  vertical-align: -1px;
}

.hp-demo-sent {
  font-size: 0.75rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--m-text);
  white-space: nowrap;
}

/* Leaderboard rows re-enter with a tiny stagger every time a new brand's data
   is rendered (the tbody is rebuilt, so the animation replays). */
.hp-demo-table tr {
  animation: hp-demo-row-in 0.3s ease both;
}

.hp-demo-table tr:nth-child(2) { animation-delay: 0.03s; }
.hp-demo-table tr:nth-child(3) { animation-delay: 0.06s; }
.hp-demo-table tr:nth-child(4) { animation-delay: 0.09s; }
.hp-demo-table tr:nth-child(5) { animation-delay: 0.12s; }
.hp-demo-table tr:nth-child(6) { animation-delay: 0.15s; }

@keyframes hp-demo-row-in {
  from { opacity: 0; transform: translateY(5px); }
  to   { opacity: 1; transform: none; }
}

/* Entrance: hidden from the very first paint (CSS default, not added by JS)
   and revealed only once the section scrolls into view — home_dashboard.js
   adds `.hp-demo-visible` via IntersectionObserver. Keeping the hidden state
   in CSS avoids the flash of the section before the script runs. */
.hp-demo { opacity: 0; }

.hp-demo .hp-demo-card {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.hp-demo-visible { opacity: 1; }

.hp-demo-visible .hp-demo-card { opacity: 1; transform: none; }
.hp-demo-visible .hp-demo-models { transition-delay: 0.08s; }
.hp-demo-visible .hp-demo-share { transition-delay: 0.16s; }
.hp-demo-visible .hp-demo-sent { transition-delay: 0.24s; }
.hp-demo-visible .hp-demo-prompts { transition-delay: 0.32s; }
.hp-demo-visible .hp-demo-leaderboard { transition-delay: 0.4s; }

@media (prefers-reduced-motion: reduce) {
  .hp-demo,
  .hp-demo .hp-demo-card {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  .hp-demo-table tr {
    animation: none !important;
  }

  .hp-demo-prompts-cursor {
    animation: none !important;
  }
}

/* Tighter vertical rhythm around the social-proof section (the demo sits
   inside it, below the client-logo wall). */
.hp-section-demo { padding: 2.75rem 0; }

@media (max-width: 960px) {
  .hp-demo-grid { grid-template-columns: 1fr; }
  .hp-demo-card-wide { grid-column: span 1; }
  .hp-demo-timeline,
  .hp-demo-leaderboard,
  .hp-demo-right { grid-column: auto; grid-row: auto; }
  .hp-demo-chart { height: 220px; }
  /* On a single column the boxes have natural height, so the donut falls back
     to a fixed centered square instead of flex-filling the body. */
  .hp-demo-chart-donut {
    flex: 0 0 auto;
    height: 140px;
    width: 140px;
    max-height: none;
    margin: auto;
  }
  /* On a single column the right boxes keep their natural height (the
     equal-height requirement only applies to the desktop column); the chart
     fill keeps the fixed mobile height. */
  .hp-demo-right > * { flex: 1 1 auto; }
  .hp-demo-chart-fill { flex: 1 1 auto; }
}

/* ---------- Narrow screens (phone, not desktop) ---------- */
@media (max-width: 640px) {
  /* Topbar becomes two rows. Row 1: toad logo (wordmark text dropped) on the
     left, the Free Analysis + Login pair horizontally centered in the whole
     topbar, and the language switcher pinned to the right; row 2: the 4 nav
     links on their own full-width centered line. The logo is taken out of
     flow (absolute, left) so the actions container spans the full row and its
     centered pair lands on the true topbar center; the switcher is parked at
     the right edge. */
  .hp-header-inner {
    position: relative;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.5rem 0;
  }

  .hp-brand-name {
    display: none;
  }

  .hp-brand {
    position: absolute;
    left: 0.5rem;
    top: 0.5rem;
  }

  .hp-nav {
    order: 3;
    flex-basis: 100%;
    justify-content: center;
    gap: 1.25rem;
  }

  .hp-header-actions {
    flex: 1;
    justify-content: center;
    gap: 0.4rem;
    position: relative;
  }

  /* Language switcher parked at the far right of the topbar row. */
  .hp-header-actions form {
    position: absolute;
    right: 0;
    top: 0;
  }

  /* Center pair order: Free Analysis, then Login; Free Analysis keeps its
     green gradient + white label while sharing Login's border and shadow. */
  .hp-header-actions .btn-primary {
    order: 1;
    background: linear-gradient(135deg, var(--m-emerald), var(--m-forest));
    color: var(--m-on-accent);
    border: var(--border-w) var(--border-style) var(--m-ink);
    box-shadow: 3px 3px 0 var(--m-border-d);
  }

  .hp-header-actions .btn-secondary {
    order: 2;
  }

  .hp-header-actions .btn {
    padding: 7px 10px;
    font-size: 12px;
  }

  .hp-header-actions .ftg-switcher-btn {
    padding: 6px 10px;
  }

  /* Hero headline splits into two lines: "Dominate" on top with a larger font
     so its length covers the "AI Search." line below. */
  .hp-gradient-text {
    display: block;
  }

  .hp-head-word {
    display: block;
    font-size: 1.25em;
    line-height: 1.1;
  }

  /* Hero: URL box + "Go!" button share one line (button pinned to the right
     of the box); the label swaps to the short "Go!" text. */
  .hp-hero-inner .hp-analyze-form {
    gap: 0.5rem;
  }

  .hp-hero-inner .hp-domain {
    flex: 1 1 0;
    min-width: 0;
    max-width: none;
    padding: 0.85rem 1rem;
    font-size: 1rem;
  }

  .hp-hero-inner .hp-btn-lg {
    padding: 0.85rem 1.1rem;
    font-size: 0.9375rem;
  }

  .hp-hero-inner .hp-btn-lg span {
    display: none;
  }

  .hp-hero-inner .hp-btn-lg::after {
    content: attr(data-short);
  }

  .hp-hero-inner .hp-form-error {
    flex-basis: 100%;
  }

  /* The client-logo wall rows halve from 10 to 5 icons so each mark stays
     legible; the row-level edge-fade mask still applies on both sides. Only
     the first three mobile lines are kept (15 marks: the full first desktop
     row = two lines, plus the first half of the second row = the third line);
     every remaining mark is cut off. */
  .hp-logos-row {
    grid-template-columns: repeat(5, 1fr);
  }

  .hp-logos-row:nth-child(2) img:nth-child(n+6),
  .hp-logos-row:nth-child(3) img {
    display: none;
  }
}

/* ---------- Misc ---------- */
html {
  scroll-behavior: smooth;
}