/* RankRedd Design System - Reddish Brand Frame + Google-Light Center */

:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-subtle: #f8f9fa;
  --ink: #202124;
  --ink-muted: #5f6368;
  --border: #e8eaed;
  --border-strong: #dadce0;
  --accent: #d94626;
  --accent-hover: #be381b;
  --accent-soft: #fef1ee;
  --ok: #137333;
  --ok-soft: #e6f4ea;
  --warn: #b06000;
  --warn-soft: #fef7e0;
  --ai: #1a73e8;
  --ai-soft: #e8f0fe;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(60, 64, 67, 0.06), 0 4px 16px rgba(60, 64, 67, 0.04);
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

@property --fade-start {
  syntax: "<length>";
  inherits: false;
  initial-value: 0px;
}

@property --fade-end {
  syntax: "<length>";
  inherits: false;
  initial-value: 0px;
}

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

html {
  color-scheme: light;
  overflow-x: clip;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  margin: 0 0 0.5rem;
  letter-spacing: -0.02em;
  line-height: 1.2;
  overflow-wrap: break-word;
  text-wrap: balance;
}

h1 { font-size: clamp(1.55rem, 4.6vw, 2.5rem); }
h2 { font-size: clamp(1.18rem, 2.8vw, 1.48rem); }
h3 { font-size: 1.02rem; }

p { margin: 0 0 0.75rem; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
code {
  font-family: var(--font-mono);
  font-size: 0.86em;
  background: var(--surface-subtle);
  padding: 0.12rem 0.35rem;
  border-radius: 5px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.muted { color: var(--ink-muted); }

.container {
  width: min(1240px, 100% - 2rem);
  margin-inline: auto;
}

/* Header & Responsive Popover Navigation (follows modern-web-guidance: navbar) */
.site-header, .app-header {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-top: 3px solid var(--accent);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 30;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  min-height: 58px;
  padding-block: 0.45rem;
}

.app-header .header-inner {
  flex-wrap: wrap;
}

.site-header .header-inner > * {
  flex-shrink: 0;
  white-space: nowrap;
}

.site-header.is-measuring,
.site-header.is-measuring * {
  transition: none !important;
}

.header-left, .header-right {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.site-nav {
  display: flex;
  align-items: center;
}

.menu-button {
  anchor-name: --menu-button;
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  min-height: 40px;
  padding: 0.42rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: #ffffff;
  color: var(--ink);
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
}
.menu-button:hover {
  background: var(--surface-subtle);
}
.menu-button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.menu-icon {
  font-size: 1rem;
  line-height: 1;
}
.menu-lang-tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 0.1rem 0.38rem;
  border-radius: 999px;
}

/* Language Switcher (EN | DE | FR | ES | PT) */
.lang-switcher {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.18rem;
  flex-wrap: wrap;
}
.lang-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.22rem 0.5rem;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.73rem;
  font-weight: 600;
  color: var(--ink-muted);
  text-decoration: none;
  line-height: 1.2;
}
.lang-pill:hover {
  color: var(--ink);
  background: #ffffff;
  text-decoration: none;
}
.lang-pill.is-active {
  background: var(--accent);
  color: #ffffff;
}
.site-header:not(.is-wide) .nav-lang-item {
  margin-top: 0.35rem;
  padding-top: 0.45rem;
  border-top: 1px solid var(--border);
}
.site-header:not(.is-wide) .lang-switcher {
  width: 100%;
  justify-content: space-between;
}
.site-header:not(.is-wide) .lang-pill {
  flex: 1 1 auto;
  min-height: 36px;
}
.footer-lang-row {
  width: 100%;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border);
}
.footer-lang-row .lang-switcher {
  background: transparent;
  border: 0;
  padding: 0;
  gap: 0.4rem;
}
.footer-lang-row .lang-pill {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  border: 1px solid var(--border);
  padding: 0.28rem 0.65rem;
  background: #ffffff;
}
.footer-lang-row .lang-pill.is-active {
  border-color: var(--accent);
  background: var(--accent);
  color: #ffffff;
}

.site-menu {
  list-style: none;
  margin: 0;
  padding: 0.6rem;
}

/* Narrow Layout: Popover Sheet */
.site-header:not(.is-wide) .site-menu {
  position: fixed;
  inset: auto;
  inset-block-start: 4.1rem;
  inset-block-start: anchor(--menu-button bottom);
  inset-inline-end: 1rem;
  inline-size: min(86dvw, 21rem);
  max-inline-size: calc(100dvw - 2rem);
  block-size: fit-content;
  max-block-size: calc(100dvh - 5.5rem);
  margin-block-start: 0.45rem;
  overflow: auto;
  background: #ffffff;
  border: 1px solid var(--border-strong);
  border-radius: 16px;
  box-shadow: 0 14px 36px rgba(32, 33, 36, 0.16);
}

@supports not selector(:popover-open) {
  .site-header:not(.is-wide) .site-menu[popover]:not(.is-open-fallback) {
    display: none;
  }
}

.site-header:not(.is-wide) .site-menu:is(:popover-open, .is-open-fallback) {
  display: grid;
  gap: 0.25rem;
}

@media (prefers-reduced-motion: no-preference) {
  .site-header:not(.is-wide) .site-menu[popover] {
    transition: opacity 0.18s ease, translate 0.18s ease, display 0.18s ease, overlay 0.18s ease;
    transition-behavior: allow-discrete;
  }
  .site-header:not(.is-wide) .site-menu[popover]:popover-open {
    opacity: 1;
    translate: 0 0;
    @starting-style {
      opacity: 0;
      translate: 0 -6px;
    }
  }
}

.site-header:not(.is-wide) .site-menu a:not(.btn) {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0.55rem 0.85rem;
  border-radius: 10px;
  color: var(--ink);
  font-weight: 500;
  font-size: 0.95rem;
}
.site-header:not(.is-wide) .site-menu a:not(.btn):hover {
  background: var(--surface-subtle);
  text-decoration: none;
}
.site-header:not(.is-wide) .site-menu a[aria-current="page"] {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
  border-inline-start: 3px solid var(--accent);
}
.site-header:not(.is-wide) .nav-cta-item {
  margin-top: 0.35rem;
  padding-top: 0.45rem;
  border-top: 1px solid var(--border);
}
.site-header:not(.is-wide) .nav-cta-item .btn {
  width: 100%;
  min-height: 44px;
}

/* Wide Layout: Inline Single-Row Navigation */
.site-header.is-wide .menu-button {
  display: none;
}
.site-header.is-wide .site-menu {
  position: static;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  inline-size: auto;
  max-inline-size: none;
  block-size: auto;
  max-block-size: none;
  overflow: visible;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}
.site-header.is-wide .site-menu::backdrop {
  display: none;
}
.site-header.is-wide .site-menu a:not(.btn) {
  color: var(--ink);
  font-weight: 500;
  font-size: 0.9rem;
  padding-block: 0.25rem;
}
.site-header.is-wide .site-menu a[aria-current="page"] {
  color: var(--accent);
  font-weight: 700;
  border-block-end: 2px solid var(--accent);
  text-decoration: none;
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
}

.brand-lockup:hover { text-decoration: none; }

.brand-mark {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
}

.brand-name { font-size: 1.05rem; letter-spacing: -0.02em; }

/* Buttons & Badges */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.62rem 1.05rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.9rem;
  font-family: inherit;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.btn:hover { text-decoration: none; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn-sm { padding: 0.42rem 0.78rem; font-size: 0.84rem; }
.btn-full { width: 100%; }

.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-secondary { background: var(--surface); color: var(--ink); border-color: var(--border-strong); }
.btn-secondary:hover { background: var(--surface-subtle); }
.btn-ghost { background: transparent; color: var(--ink-muted); }
.btn-ghost:hover { background: var(--surface-subtle); color: var(--ink); }

.btn-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  font-size: 1rem;
}
.btn-icon:hover { background: var(--surface-subtle); }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 600;
  white-space: nowrap;
}
.badge-subtle { background: var(--surface-subtle); color: var(--ink-muted); }
.badge-accent { background: var(--accent-soft); color: var(--accent); }
.badge-ok { background: var(--ok-soft); color: var(--ok); }
.badge-warn { background: var(--warn-soft); color: var(--warn); }
.badge-archived { background: #f1f3f4; color: #5f6368; border: 1px solid #dadce0; }
.badge-locked { background: #fce8e6; color: #c5221f; border: 1px solid #f6aea9; }
.badge-ai { background: var(--ai-soft); color: var(--ai); }

.user-pill {
  font-size: 0.82rem;
  color: var(--ink-muted);
  background: var(--surface-subtle);
  padding: 0.32rem 0.65rem;
  border-radius: 999px;
}

/* Landing Hero & Sections */
.hero { padding: 3.5rem 0 2.5rem; }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.9fr);
  gap: 2rem;
  align-items: start;
}
.eyebrow {
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  margin-bottom: 0.6rem;
}
.lead { font-size: 1.08rem; color: var(--ink-muted); max-width: 60ch; }
.cta-row { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-top: 1.25rem; }
.meta-note { font-size: 0.82rem; color: var(--ink-muted); margin-top: 0.85rem; }

.card, .hero-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.35rem;
  box-shadow: var(--shadow);
}

.card-kicker {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink-muted);
  margin-bottom: 0.85rem;
}

.dot-live {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ok);
}

.proof-highlight {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem;
  margin-bottom: 1rem;
}
.proof-highlight h2 { font-size: 1.05rem; margin-top: 0.5rem; }
.proof-highlight p { margin-bottom: 0; font-size: 0.9rem; color: var(--ink-muted); }

.mini-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin: 0 0 1rem;
}
.mini-stats div {
  background: var(--surface-subtle);
  padding: 0.65rem;
  border-radius: var(--radius-sm);
}
.mini-stats dt { font-size: 0.74rem; color: var(--ink-muted); }
.mini-stats dd {
  margin: 0.15rem 0 0;
  font-weight: 700;
  font-size: 1rem;
  font-variant-numeric: tabular-nums;
}

.section { padding: 3.4rem 0; }
.section-muted { background: #fbfcfd; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-head { margin-bottom: 1.5rem; }
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.15rem;
}
.step-num {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 0.15rem 0.48rem;
  border-radius: 6px;
  margin-bottom: 0.65rem;
}
.subcard {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem;
}
.split-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.site-footer { padding: 1.75rem 0 calc(1.75rem + env(safe-area-inset-bottom, 0px)); color: var(--ink-muted); font-size: 0.86rem; }
.footer-inner { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.footer-links { display: flex; gap: 0.65rem 1.1rem; flex-wrap: wrap; }

/* Auth / Forms */
.page-center {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 1.5rem;
}
.auth-card { width: min(440px, 100%); }
.auth-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}
.login-email-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  flex-wrap: wrap;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.8rem;
  margin-bottom: 0.9rem;
  font-size: 0.86rem;
}
.login-email-label {
  color: var(--ink-muted);
  word-break: break-word;
}
.login-email-label strong {
  color: var(--ink);
}
.otp-code-input {
  font-family: var(--font-mono);
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: 0.42em;
  padding-inline-start: calc(0.75rem + 0.42em);
  text-align: center;
  min-height: 54px;
}
.passwordless-note {
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1rem;
  font-size: 0.86rem;
}
.passwordless-note strong {
  display: block;
  color: var(--ink);
  margin-bottom: 0.25rem;
}
.passwordless-note p {
  margin: 0;
}
.auth-footer { margin-top: 1.15rem; padding-top: 1rem; border-top: 1px solid var(--border); font-size: 0.88rem; }

.stack-form { display: grid; gap: 0.9rem; }
.field { display: grid; gap: 0.35rem; font-size: 0.88rem; }
.field > span:not(.hint),
.field > label { font-weight: 600; }

input, select, textarea {
  font: inherit;
  font-size: max(1rem, 1em);
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 0.56rem 0.75rem;
  width: 100%;
  min-width: 0;
}
input:focus, select:focus, textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: var(--accent);
}
textarea { resize: vertical; line-height: 1.5; }
.form-error {
  color: #b91c1c;
  background: #fee2e2;
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.86rem;
  margin: 0;
}

/* App Workspace */
.app-main { padding: 1.5rem 0 3.5rem; }

.project-picker select {
  padding: 0.4rem 0.7rem;
  font-size: 0.88rem;
  font-weight: 600;
  min-width: 240px;
}

.workspace-banner {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.35rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow);
}
.banner-copy {
  flex: 1 1 320px;
  min-width: 0;
}
.banner-copy p {
  margin-bottom: 0;
}
.banner-badges { display: flex; gap: 0.45rem; flex-wrap: wrap; margin-bottom: 0.55rem; }
.banner-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.65rem;
  flex-wrap: wrap;
  flex-shrink: 0;
  margin-inline-start: auto;
}

/* First-scan attention cue (static ring fallback + compositor-only vibration under no-preference) */
.btn-scan-nudge {
  position: relative;
  box-shadow: 0 0 0 3px var(--accent-soft), 0 8px 20px -6px rgba(217, 70, 38, 0.48);
}

@media (prefers-reduced-motion: no-preference) {
  .btn-scan-nudge:not(:disabled) {
    animation: scan-cta-vibrate 3.2s ease-in-out infinite;
  }

  .btn-scan-nudge:not(:disabled)::after {
    content: "";
    position: absolute;
    inset: -3px;
    border-radius: inherit;
    border: 2px solid var(--accent);
    pointer-events: none;
    opacity: 0;
    animation: scan-cta-ring 3.2s ease-out infinite;
  }

  .btn-scan-nudge:hover,
  .btn-scan-nudge:focus-visible,
  .btn-scan-nudge:hover::after,
  .btn-scan-nudge:focus-visible::after {
    animation-play-state: paused;
  }
}

@keyframes scan-cta-vibrate {
  0%, 19%, 100% { transform: translate3d(0, 0, 0) rotate(0deg); }
  3% { transform: translate3d(-2px, 0, 0) rotate(-0.9deg); }
  6% { transform: translate3d(2px, 0, 0) rotate(0.9deg); }
  9% { transform: translate3d(-1.5px, 0, 0) rotate(-0.6deg); }
  12% { transform: translate3d(1.5px, 0, 0) rotate(0.6deg); }
  15% { transform: translate3d(-0.8px, 0, 0) rotate(-0.3deg); }
}

@keyframes scan-cta-ring {
  0% { opacity: 0.65; transform: scale(1); }
  32% { opacity: 0; transform: scale(1.12, 1.32); }
  100% { opacity: 0; transform: scale(1.12, 1.32); }
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 0.9rem;
  margin-bottom: 1.25rem;
}
.kpi-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
  display: grid;
  gap: 0.2rem;
}
.kpi-card-highlight {
  border-color: #bfdbfe;
  background: linear-gradient(180deg, #ffffff 0%, #f5f9ff 100%);
}
.kpi-label { font-size: 0.78rem; font-weight: 600; color: var(--ink-muted); text-transform: uppercase; letter-spacing: 0.04em; }
.kpi-value { font-size: 1.65rem; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.15; }
.kpi-sub { font-size: 0.8rem; color: var(--ink-muted); }

.toast {
  background: #17191c;
  color: #fff;
  padding: 0.7rem 1rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
  font-size: 0.88rem;
  font-weight: 500;
}

/* Modern Accessible Tabs (follows modern-web-guidance: tabs) */
.tabs-shell {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.tablist {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: inline proximity;
  scroll-padding-inline: 2.5rem;
  border-bottom: 1px solid var(--border);
  padding-inline: 0.75rem;
  scrollbar-width: none;
  --fade-size: 2.5rem;
  --fade-dir: right;
  --fade-start-pos: 0;
  --fade-end-pos: 100%;
  mask:
    linear-gradient(black, black) no-clip subtract,
    linear-gradient(to var(--fade-dir), black, transparent) var(--fade-start-pos) 0 / var(--fade-start) 100% no-repeat no-clip,
    linear-gradient(to var(--fade-dir), transparent, black) var(--fade-end-pos) 0 / var(--fade-end) 100% no-repeat no-clip;
  animation: reveal-fade-start linear both, hide-fade-end linear both;
  animation-timeline: scroll(self inline);
  animation-range: 0 var(--fade-size), calc(100% - var(--fade-size)) 100%;
}
.tablist::-webkit-scrollbar { display: none; }

@keyframes reveal-fade-start {
  to { --fade-start: var(--fade-size); }
}
@keyframes hide-fade-end {
  from { --fade-end: var(--fade-size); }
}

.tablist.more-start { --fade-start: var(--fade-size); }
.tablist.more-end { --fade-end: var(--fade-size); }

.tablist [role="tab"] {
  flex: none;
  scroll-snap-align: start;
  position: relative;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink-muted);
  padding: 0.9rem 1rem;
  cursor: pointer;
  white-space: nowrap;
}
.tablist [role="tab"]:hover { color: var(--ink); }

/* Mandatory: indicate selected tab with border pseudo-element (works in forced colors, zero dimension shift) */
.tablist [role="tab"][aria-selected="true"] {
  color: var(--accent);
}
.tablist [role="tab"][aria-selected="true"]::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  border-block-end: 3px solid var(--accent);
}

/* Mandatory: zero padding/border/margin/background on [role="tabpanel"] so hidden="until-found" renders no strip */
.tabpanels {
  display: grid;
}
.tabpanels > [role="tabpanel"] {
  grid-area: 1 / 1;
  min-width: 0;
}
.tabpanels > [role="tabpanel"]:not([hidden]) {
  position: relative;
  z-index: 1;
}
.tabpanels > [role="tabpanel"][hidden] {
  pointer-events: none;
  align-self: start;
  z-index: 0;
}
.panel-inner {
  padding: 1.25rem;
}
.panel-head { margin-bottom: 1rem; }

/* Filter bar */
.filter-bar {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 1rem;
}
.filter-bar input[type="search"] { flex: 1 1 220px; }
.filter-bar select { width: auto; flex: 0 1 180px; }
.checkbox-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.48rem 0.75rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
}
.checkbox-pill input { width: auto; }

/* Modern Responsive Data Table (follows modern-web-guidance: responsive-table) */
.table-wrapper {
  overflow-x: auto;
  overflow-y: visible;
  max-inline-size: 100%;
  container-type: inline-size;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.app-main .table-wrapper {
  overflow: auto;
  max-block-size: min(640px, 75vh);
}

.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.88rem;
  text-align: left;
}

.data-table thead {
  position: sticky;
  inset-block-start: 0;
  z-index: 2;
}

.data-table thead th {
  background: var(--surface-subtle);
  color: var(--ink-muted);
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.72rem 0.8rem;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.data-table tbody th,
.data-table tbody td {
  padding: 0.82rem 0.8rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.data-table tbody th {
  position: sticky;
  inset-inline-start: 0;
  z-index: 1;
  background: var(--surface);
  font-weight: 600;
  min-width: 260px;
}

.data-table tbody tr:hover th,
.data-table tbody tr:hover td {
  background: #f8f9fa;
}

.data-table tbody tr[data-thread-row] {
  cursor: pointer;
}
.data-table tbody tr.row-closed th,
.data-table tbody tr.row-closed td {
  background: #fafafa;
}
.data-table tbody tr.row-closed .thread-title-link {
  color: var(--ink-muted);
}
.thread-activity-cell {
  white-space: nowrap;
  font-size: 0.79rem;
  line-height: 1.42;
}
.thread-activity-start {
  color: var(--ink);
  font-weight: 500;
}
.thread-activity-last {
  color: var(--ink-muted);
}
.thread-activity-counts {
  color: var(--ink-muted);
  font-family: var(--font-mono);
  font-size: 0.74rem;
}
.closed-thread-notice {
  background: var(--warn-soft);
  color: var(--warn);
  border: 1px solid #f3d9a4;
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.85rem;
  font-size: 0.83rem;
  line-height: 1.45;
  font-weight: 500;
}
.top-comments-box {
  margin-top: 0.35rem;
  padding-top: 0.65rem;
  border-top: 1px solid var(--border);
}
.top-comments-title {
  display: block;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-muted);
  margin-bottom: 0.5rem;
}
.top-comments-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.5rem;
  max-height: 220px;
  overflow-y: auto;
}
.top-comment-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.55rem 0.7rem;
  font-size: 0.82rem;
  line-height: 1.45;
}
.top-comment-meta {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.74rem;
  color: var(--ink-muted);
  margin-bottom: 0.25rem;
  font-family: var(--font-mono);
}
.top-comment-body {
  margin: 0;
  color: var(--ink);
}
.scanner-btn-row {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}
.ai-strategy-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-bottom: 0.45rem;
}
.ai-strategy-head h2 {
  margin: 0;
}
.ai-group {
  margin-top: 0.85rem;
}
.ai-group-label {
  display: block;
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-muted);
  margin-bottom: 0.4rem;
}
.ai-pill-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.ai-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.24rem 0.6rem;
  border-radius: 999px;
  font-size: 0.79rem;
  font-weight: 500;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  color: var(--ink);
}
button.ai-pill-stem {
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  background: var(--accent-soft);
  border-color: #fad2c7;
  color: var(--accent);
}
button.ai-pill-stem:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.thread-title-link {
  color: var(--ink);
  font-weight: 600;
  display: block;
  margin-bottom: 0.25rem;
}
.thread-title-link:hover { color: var(--accent); }
.thread-meta-row { display: flex; gap: 0.35rem; flex-wrap: wrap; align-items: center; }

.num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.pos-pill {
  display: inline-grid;
  place-items: center;
  min-width: 34px;
  padding: 0.15rem 0.45rem;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.82rem;
}
.pos-top { background: var(--ok-soft); color: var(--ok); }
.pos-mid { background: var(--warn-soft); color: var(--warn); }
.pos-low { background: var(--surface-subtle); color: var(--ink-muted); }

/* Container-query stacked card layout for narrow viewports/containers */
@container (width < 600px) {
  .data-table, .data-table thead, .data-table tbody, .data-table tr, .data-table th, .data-table td {
    display: block;
  }
  .data-table thead {
    display: none;
  }
  .data-table tr {
    margin: 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
  }
  .data-table tbody th {
    position: sticky;
    inset-block-start: 0;
    z-index: 2;
    background: var(--surface-subtle);
    min-width: 0;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  }
  .data-table tbody td {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    border-bottom: 1px solid var(--surface-subtle);
  }
  .threads-table {
    --label-2: "Keyword";
    --label-3: "Google Pos";
    --label-4: "SV / CPC";
    --label-5: "Ads-Wert/Mo";
    --label-6: "Intent";
    --label-7: "Aktivität";
    --label-8: "Status";
    --label-9: "Aktion";
  }
  .share-threads-table {
    --label-2: "Keyword";
    --label-3: "Google Pos";
    --label-4: "SV / CPC";
    --label-5: "Ads-Wert/Mo";
    --label-6: "Intent";
    --label-7: "Entwurf";
  }
  .tool-threads-table {
    --label-2: "Keyword";
    --label-3: "Google Pos";
    --label-4: "SV / CPC";
    --label-5: "Intent";
    --label-6: "Link";
  }
  .compare-table {
    --label-2: "Basic Alerts";
    --label-3: "Gray-Hat Bots";
    --label-4: "RankRedd";
  }
  .mon-compare-table {
    --label-2: "Basic Alerts";
    --label-3: "RankRedd";
  }
  .auto-compare-table {
    --label-2: "Autopilot Bots";
    --label-3: "RankRedd Safe";
  }
  .geo-matrix-table {
    --label-2: "Google Page-1 Share";
    --label-3: "AI Citation Value";
    --label-4: "Action";
  }
  .agency-compare-table {
    --label-2: "Theory Audit";
    --label-3: "30-Day Pilot";
  }
  .bench-table {
    --label-2: "Google Pos";
    --label-3: "Commercial Signal";
    --label-4: "Action";
  }
  .automod-table {
    --label-2: "Impact";
    --label-3: "Safe Replacement";
  }
  .subreddits-table {
    --label-2: "Strenge";
    --label-3: "Promotions-Regel";
    --label-4: "Link-Policy";
    --label-5: "Team-Winkel";
  }
  .data-table td:nth-child(2)::before { content: var(--label-2) ": "; font-weight: 600; color: var(--ink-muted); }
  .data-table td:nth-child(3)::before { content: var(--label-3) ": "; font-weight: 600; color: var(--ink-muted); }
  .data-table td:nth-child(4)::before { content: var(--label-4) ": "; font-weight: 600; color: var(--ink-muted); }
  .data-table td:nth-child(5)::before { content: var(--label-5) ": "; font-weight: 600; color: var(--ink-muted); }
  .data-table td:nth-child(6)::before { content: var(--label-6) ": "; font-weight: 600; color: var(--ink-muted); }
  .data-table td:nth-child(7)::before { content: var(--label-7) ": "; font-weight: 600; color: var(--ink-muted); }
  .data-table td:nth-child(8)::before { content: var(--label-8) ": "; font-weight: 600; color: var(--ink-muted); }
  .data-table td:nth-child(9)::before { content: var(--label-9) ": "; font-weight: 600; color: var(--ink-muted); }
}

/* Scanner & Pilot Layouts */
.scanner-grid, .pilot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.25rem;
}

.scan-result {
  margin-top: 1rem;
  padding: 0.85rem;
  border-radius: var(--radius-sm);
  background: var(--ok-soft);
  color: #065f46;
  font-size: 0.88rem;
}

.scan-list {
  list-style: none;
  margin: 0.75rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.65rem;
}
.scan-list li {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.75rem;
  font-size: 0.85rem;
}

.roadmap-list {
  padding-left: 1.2rem;
  display: grid;
  gap: 0.75rem;
  margin: 0.75rem 0;
}

.email-box {
  font-family: var(--font-sans);
  font-size: 0.86rem;
  background: var(--bg);
}

.tool-inline-form {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}
.tool-inline-form input { flex: 1 1 260px; }
.tool-inline-form select { width: auto; flex: 0 1 190px; }

/* Native <dialog> Modal (follows modern-web-guidance: dialog + light-dismiss + prevent-page-scroll-under-modal-dialog) */
dialog {
  border: 0;
  padding: 0;
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.24);
  width: min(760px, calc(100vw - 2rem));
  max-height: calc(100dvh - 2rem);
}

dialog[open] {
  display: flex;
  flex-direction: column;
}

dialog:modal {
  overscroll-behavior: contain;
}

dialog::backdrop {
  background: rgba(15, 23, 42, 0.52);
  backdrop-filter: blur(2px);
  overflow: hidden;
  overscroll-behavior: contain;
}

.dialog-shell {
  display: flex;
  flex-direction: column;
  max-height: calc(100dvh - 2rem);
}
.dialog-shell-sm { width: min(500px, 100%); }

.dialog-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.15rem 1.35rem;
  border-bottom: 1px solid var(--border);
}
.dialog-header h1 { font-size: 1.18rem; margin: 0; }

.dialog-body {
  padding: 1.25rem 1.35rem;
  overflow-y: auto;
  display: grid;
  gap: 1rem;
}

.dialog-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 0.95rem 1.35rem;
  border-top: 1px solid var(--border);
  background: var(--bg);
}
.dialog-footer-right { display: flex; gap: 0.6rem; }

.thread-context {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.95rem;
  display: grid;
  gap: 0.6rem;
}
.snippet-quote {
  margin: 0;
  font-style: italic;
  color: var(--ink-muted);
  font-size: 0.9rem;
}
.context-meta {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.84rem;
}
.rule-callout {
  font-size: 0.83rem;
  background: var(--surface);
  border-left: 3px solid var(--accent);
  padding: 0.55rem 0.75rem;
  border-radius: 4px;
}

.composer-area { display: grid; gap: 0.85rem; }
.composer-bar { display: flex; justify-content: space-between; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.composer-controls { display: grid; grid-template-columns: 1fr 1.4fr; gap: 0.75rem; }

.compliance-panel {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.75rem 0.9rem;
  background: var(--bg);
}
.compliance-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.86rem;
  margin-bottom: 0.35rem;
}
.warnings-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.3rem;
  font-size: 0.82rem;
}
.warn-error { color: #b91c1c; }
.warn-warn { color: var(--warn); }
.warn-ok { color: var(--ok); font-weight: 500; }

.draft-preview {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
  font-family: var(--font-sans);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem;
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.6;
  max-width: 100%;
  overflow-x: auto;
}

.prose ul { padding-left: 1.25rem; display: grid; gap: 0.5rem; }

@media (max-width: 820px) {
  .hero-grid { grid-template-columns: 1fr; }
  .composer-controls { grid-template-columns: 1fr; }
}


/* ================= RANKREDD GOOGLE-LIGHT + REDDISH MOTION SHOWCASE ================= */

:root {
  --g-blue: #1a0dab;
  --g-ai-bg: #f4f7ff;
  --g-ai-border: #dbe6fd;
  --red-blush: #fff6f4;
  --red-hairline: #f9d5cc;
  --spring-easing: linear(
    0, 0.016 0.5%, 0.06 1%, 0.226 2%, 1.116 5.4%, 1.375 6.6%, 1.527 7.7%,
    1.565 8.2%, 1.585 8.8%, 1.581 9.3%, 1.559 9.8%, 1.458 10.9%, 0.937 14.3%,
    0.784 15.5%, 0.693 16.6%, 0.67 17.1%, 0.657 17.7%, 0.671 18.7%, 0.729 19.8%,
    1.042 23.3%, 1.13 24.5%, 1.182 25.6%, 1.201 26.7%, 1.192 27.7%, 1.156 28.8%,
    0.977 32.2%, 0.925 33.4%, 0.894 34.5%, 0.882 35.6%, 0.887 36.6%, 0.907 37.7%,
    1.045 42.4%, 1.069 44.5%, 1.059 46.3%, 0.979 50.9%, 0.96 53.4%, 0.966 55.3%,
    1.013 59.9%, 1.024 62.3%, 0.986 71.2%, 1.008 79.9%, 0.995 88.9%, 1
  );
}

.site-nav a.nav-active {
  color: var(--accent);
}

.btn-lg {
  padding: 0.78rem 1.35rem;
  font-size: 0.95rem;
}

.text-accent {
  color: var(--accent);
}

/* Warm reddish brand aura at top fading seamlessly into pure Google white */
.hero-kinetic {
  padding: 3.25rem 0 3rem;
  background:
    radial-gradient(ellipse 68% 58% at 82% 8%, rgba(217, 70, 38, 0.11), transparent 64%),
    radial-gradient(ellipse 56% 48% at 12% 4%, rgba(217, 70, 38, 0.08), transparent 58%),
    linear-gradient(180deg, #fff6f3 0%, #fffbfa 56%, #ffffff 100%);
}

.hero-grid-wide {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr);
  gap: 2.5rem;
  align-items: center;
}

.hero-trust-list {
  list-style: none;
  margin: 1.4rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.45rem;
  font-size: 0.88rem;
  color: var(--ink-muted);
}
.hero-trust-list li::before {
  content: "✓ ";
  color: var(--accent);
  font-weight: 700;
}

/* Featherweight Google-SERP Browser Frame (Light & Airy) */
.google-serp-stage {
  background: #ffffff;
  color: var(--ink);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 1.05rem 1.1rem;
  box-shadow:
    0 1px 2px rgba(60, 64, 67, 0.06),
    0 12px 36px rgba(217, 70, 38, 0.06),
    0 4px 14px rgba(60, 64, 67, 0.04);
}

.stage-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
  padding-bottom: 0.7rem;
  margin-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.stage-status {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-muted);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(217, 70, 38, 0.16);
}

@media (prefers-reduced-motion: no-preference) {
  .motion-stage:not(.is-paused) .pulse-dot {
    animation: calm-pulse 2.4s ease-in-out infinite;
  }
}

@keyframes calm-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.25); opacity: 0.6; }
}

.stage-controls {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.stage-steps {
  display: inline-flex;
  gap: 0.2rem;
  background: var(--surface-subtle);
  padding: 0.18rem;
  border-radius: 999px;
  border: 1px solid var(--border);
}

.stage-pill {
  border: 0;
  background: transparent;
  color: var(--ink-muted);
  font: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.24rem 0.56rem;
  border-radius: 999px;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.stage-pill.is-active {
  background: var(--accent);
  color: #fff;
}

.btn-pause {
  border: 1px solid var(--border-strong);
  background: #ffffff;
  color: var(--ink-muted);
  font: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.26rem 0.6rem;
  border-radius: 999px;
  cursor: pointer;
}
.btn-pause:hover {
  background: var(--surface-subtle);
  color: var(--ink);
}

/* Google-style Search Header inside Hero Stage */
.g-search-header {
  margin-bottom: 0.75rem;
}

.g-search-bar {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  background: #ffffff;
  border: 1px solid #dfe1e5;
  border-radius: 999px;
  padding: 0.46rem 0.55rem 0.46rem 0.9rem;
  box-shadow: 0 2px 8px rgba(60, 64, 67, 0.09);
  font-size: 0.85rem;
  color: var(--ink);
}

.g-search-icon {
  color: var(--ink-muted);
  font-size: 0.95rem;
}

.sim-query {
  flex: 1;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.g-radar-pill {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
}

.g-nav-tabs {
  display: flex;
  gap: 1.05rem;
  padding: 0.5rem 0.65rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.74rem;
  color: var(--ink-muted);
}

.g-tab {
  padding-bottom: 0.35rem;
  font-weight: 500;
}

.g-tab-active {
  color: var(--accent);
  font-weight: 600;
  border-bottom: 2px solid var(--accent);
}

/* Pipeline Cards (Pure Light Google Feel) */
.pipeline-canvas {
  display: grid;
  gap: 0;
}

.pipe-node {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.82rem 0.95rem;
  opacity: 0.82;
  transform: scale(0.992);
  transition: transform 0.65s ease-out, opacity 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  transition-timing-function: var(--spring-easing), ease, ease, ease;
}

.pipe-node-aio {
  background: linear-gradient(180deg, var(--g-ai-bg) 0%, #ffffff 100%);
  border-color: var(--g-ai-border);
}

.pipe-node.is-active {
  opacity: 1;
  transform: scale(1);
  border-color: var(--red-hairline);
  box-shadow: 0 0 0 1px rgba(217, 70, 38, 0.22), 0 8px 22px rgba(217, 70, 38, 0.08);
}

@media (prefers-reduced-motion: reduce) {
  .pipe-node {
    transition: border-color 0.15s ease, opacity 0.15s ease;
    transform: none;
  }
}

.node-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.45rem;
}

.g-aio-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: #1a73e8;
  letter-spacing: -0.01em;
}

.g-aio-text {
  font-size: 0.82rem;
  color: #3c4043;
  margin: 0 0 0.5rem;
  line-height: 1.45;
}

.serp-badges, .check-row, .noise-strip {
  display: flex;
  gap: 0.38rem;
  flex-wrap: wrap;
  align-items: center;
}

.chip {
  font-size: 0.71rem;
  font-weight: 600;
  padding: 0.14rem 0.48rem;
  border-radius: 999px;
  font-family: var(--font-mono);
}
.chip-ai { background: var(--ai-soft); color: var(--ai); }
.chip-red { background: var(--accent-soft); color: var(--accent); }
.chip-cpc { background: var(--warn-soft); color: var(--warn); }
.chip-sv { background: var(--surface-subtle); color: var(--ink-muted); border: 1px solid var(--border); }

/* Authentic Google Organic Search Result Card */
.g-result-cite {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 0.35rem;
}
.g-reddit-dot {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  display: grid;
  place-items: center;
  flex: none;
}
.g-site-name { font-size: 0.76rem; font-weight: 600; color: var(--ink); line-height: 1.2; }
.g-breadcrumb { font-size: 0.7rem; color: var(--ink-muted); line-height: 1.2; }

.intent-badge {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  background: var(--ok-soft);
  color: var(--ok);
  padding: 0.16rem 0.48rem;
  border-radius: 999px;
  white-space: nowrap;
}

.g-result-title {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--g-blue);
  margin-bottom: 0.22rem;
  line-height: 1.3;
}
.g-result-snippet {
  font-size: 0.79rem;
  color: #4d5156;
  margin-bottom: 0.45rem;
  line-height: 1.42;
}

.noise-tag {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--accent);
}
.noise-pill {
  font-size: 0.69rem;
  color: #9aa0a6;
  background: var(--surface-subtle);
  padding: 0.1rem 0.42rem;
  border-radius: 999px;
}

/* Subtle Reddish Animated SVG Connector */
.pipe-connector {
  width: 100%;
  height: 22px;
  display: block;
}
.pipe-track {
  stroke: #eceef2;
  stroke-width: 1.8;
  fill: none;
}
.pipe-flow {
  stroke: var(--accent);
  stroke-width: 2;
  stroke-dasharray: 6 8;
  fill: none;
  opacity: 0.75;
}
.pipe-spark {
  fill: var(--accent);
}

@media (prefers-reduced-motion: no-preference) {
  .motion-stage:not(.is-paused) .pipe-flow {
    animation: dash-flow 1.4s linear infinite;
  }
  .motion-stage:not(.is-paused) .pipe-flow-delay {
    animation-delay: 0.5s;
  }
  .motion-stage:not(.is-paused) .pipe-spark {
    animation: spark-drop 1.8s ease-in-out infinite;
  }
  .motion-stage:not(.is-paused) .pipe-spark-delay {
    animation-delay: 0.7s;
  }
}

@keyframes dash-flow {
  from { stroke-dashoffset: 28; }
  to { stroke-dashoffset: 0; }
}
@keyframes spark-drop {
  0% { transform: translateY(-8px); opacity: 0; }
  45% { opacity: 1; }
  100% { transform: translateY(8px); opacity: 0; }
}

.mono-stat-ok {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--ok);
}

.reply-sim-text {
  font-size: 0.8rem;
  color: #3c4043;
  margin: 0 0 0.5rem;
  line-height: 1.45;
}
.check-ok {
  font-size: 0.71rem;
  font-weight: 600;
  color: var(--ok);
  background: var(--ok-soft);
  padding: 0.14rem 0.48rem;
  border-radius: 999px;
}

.pipe-outcome {
  margin-top: 0.6rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  padding: 0.65rem 0.8rem;
  border-radius: 12px;
  background: var(--red-blush);
  border: 1px solid var(--red-hairline);
}
.pipe-outcome.is-active {
  border-color: var(--accent);
  box-shadow: 0 4px 14px rgba(217, 70, 38, 0.1);
}
.outcome-cell span { display: block; font-size: 0.69rem; color: var(--ink-muted); }
.outcome-cell strong { font-family: var(--font-mono); font-size: 0.86rem; color: var(--ink); }

/* Light Google-Airy Middle Strip (seamless white center with crisp hairlines) */
.signal-strip {
  background: #ffffff;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 2rem 0;
}
.strip-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 1.75rem;
  align-items: center;
}
.strip-grid p { margin: 0.35rem 0 0; font-size: 0.92rem; }
.strip-kpis {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}
.strip-kpis > div {
  background: var(--surface-subtle);
  border: 1px solid #eceef2;
  border-radius: 12px;
  padding: 0.8rem 0.9rem;
}
.strip-kpis span { display: block; font-size: 0.7rem; color: var(--ink-muted); text-transform: uppercase; letter-spacing: 0.04em; }
.strip-kpis strong { font-size: 0.86rem; color: var(--ink); }

/* Bento Grid & Scroll-Driven Reveal (follows modern-web-guidance: scroll-entry-exit-effects) */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.35rem;
}
.bento-card {
  background: #ffffff;
  border: 1px solid #eceef2;
  border-radius: 16px;
  padding: 1.65rem;
  box-shadow: none;
  transition: transform 0.6s ease-out, border-color 0.2s ease, box-shadow 0.2s ease;
  transition-timing-function: var(--spring-easing), ease, ease;
}
.bento-card:hover {
  border-color: var(--red-hairline);
  box-shadow: 0 6px 20px rgba(60, 64, 67, 0.06);
}
.bento-wide {
  grid-column: 1 / -1;
}
.bento-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: 1.75rem;
  align-items: center;
}
.card-link {
  display: inline-block;
  margin-top: 0.45rem;
  font-weight: 600;
  font-size: 0.9rem;
}

@media (prefers-reduced-motion: no-preference) {
  @supports ((animation-timeline: view()) and (animation-range: entry)) {
    @keyframes reveal-up {
      from {
        opacity: 0.15;
        translate: 0 24px;
      }
      to {
        opacity: 1;
        translate: 0 0;
      }
    }
    .reveal-on-scroll {
      animation: reveal-up auto linear backwards;
      animation-timeline: view();
      animation-range: entry 0% entry 32%;
    }
  }
}

/* Interactive Compliance Simulator (Light & Crisp) */
.mode-toggle {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}
.compliance-demo-box {
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1.15rem;
}
.compliance-demo-box.is-risky {
  background: #fff6f6;
  border-color: #f5c2c7;
}
.compliance-demo-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.65rem;
}
.demo-score-ok { color: var(--ok); font-family: var(--font-mono); font-size: 0.92rem; }
.demo-score-bad { color: #b91c1c; font-family: var(--font-mono); font-size: 0.92rem; }
.demo-reply-quote {
  font-size: 0.88rem;
  color: var(--ink);
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.78rem;
  margin-bottom: 0.75rem;
}
.demo-check-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.3rem;
  font-size: 0.83rem;
}

/* Interactive ROI Calculator - Airy White + Subtle Reddish Blush */
.calc-sliders { display: grid; gap: 1rem; margin-top: 1rem; }
.slider-field { display: grid; gap: 0.35rem; font-size: 0.88rem; }
.slider-field input[type="range"] { padding: 0; border: 0; accent-color: var(--accent); cursor: pointer; }

.calc-output-card {
  background: linear-gradient(180deg, var(--red-blush) 0%, #ffffff 100%);
  color: var(--ink);
  border: 1px solid var(--red-hairline);
  border-top: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 1.35rem;
}
.calc-kicker {
  display: block;
  font-size: 0.74rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-muted);
}
.calc-big {
  display: block;
  font-family: var(--font-mono);
  font-size: clamp(1.85rem, 3vw, 2.35rem);
  color: var(--accent);
  margin: 0.35rem 0 1rem;
  font-variant-numeric: tabular-nums;
}
.calc-subgrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border);
}
.calc-subgrid span { display: block; font-size: 0.74rem; color: var(--ink-muted); }
.calc-subgrid strong { font-family: var(--font-mono); font-size: 0.96rem; color: var(--ink); }

/* FAQ Accordion (follows modern-web-guidance: accordion) */
.faq-list { display: grid; gap: 0.7rem; }
.faq-item {
  background: #ffffff;
  border: 1px solid #eceef2;
  border-radius: 12px;
  padding: 0.95rem 1.15rem;
}
.faq-item summary {
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.65rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::before {
  content: "▸";
  font-family: var(--font-mono);
  color: var(--accent);
  font-size: 0.95rem;
  flex-shrink: 0;
  display: inline-block;
  transform: rotate(0deg);
}
.faq-item[open] > summary::before {
  transform: rotate(90deg);
}
.faq-item::details-content {
  interpolate-size: allow-keywords;
  overflow: clip;
  contain: layout;
}
.faq-item:not([open])::details-content {
  block-size: 0;
}
@media (prefers-reduced-motion: no-preference) {
  .faq-item summary::before {
    transition: transform 0.2s ease;
  }
  .faq-item::details-content {
    transition: block-size 0.26s ease, content-visibility 0.26s ease;
    transition-behavior: allow-discrete;
  }
}
.faq-item p { margin: 0.7rem 0 0 1.4rem; color: var(--ink-muted); font-size: 0.92rem; }

/* Airy Reddish-Blush Bottom CTA */
.section-cta-light {
  background: linear-gradient(180deg, #ffffff 0%, #fff2ee 100%);
  border-top: 1px solid var(--red-hairline);
  border-bottom: 1px solid var(--red-hairline);
}

/* ================= SEO / GEO SUBPAGES & INTERACTIVE LEAD MAGNETS ================= */

.subpage-main {
  max-width: 980px;
  padding: 1.75rem 0 4rem;
}

.breadcrumbs ol {
  list-style: none;
  margin: 0 0 1.25rem;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  font-size: 0.82rem;
  color: var(--ink-muted);
}
.breadcrumbs li + li::before {
  content: "›";
  margin-inline-end: 0.4rem;
  color: #9aa0a6;
}
.breadcrumbs a { color: var(--ink-muted); }
.breadcrumbs a:hover { color: var(--accent); }

.subpage-hero {
  background:
    radial-gradient(ellipse 65% 60% at 88% 10%, rgba(217, 70, 38, 0.09), transparent 62%),
    linear-gradient(180deg, #fff7f5 0%, #ffffff 100%);
  border: 1px solid var(--red-hairline);
  border-radius: 18px;
  padding: 2rem;
  margin-bottom: 1.75rem;
}

.subpage-section {
  margin: 2.75rem 0;
}

/* Answer-First GEO Box (Google-light clean left accent) */
.geo-answer-box {
  background: var(--g-ai-bg);
  border: 1px solid var(--g-ai-border);
  border-left: 4px solid var(--ai);
  border-radius: 12px;
  padding: 1.15rem 1.35rem;
  margin-bottom: 2.25rem;
}
.geo-answer-box strong {
  display: block;
  font-size: 0.86rem;
  color: var(--ai);
  margin-bottom: 0.35rem;
}
.geo-answer-box p {
  margin: 0;
  font-size: 0.94rem;
  color: #3c4043;
}

/* Lead Magnet Interactive Cards */
.lead-magnet-card {
  background: #ffffff;
  border: 1px solid var(--red-hairline);
  border-top: 3px solid var(--accent);
  border-radius: 16px;
  padding: 1.75rem;
  margin: 2.25rem 0;
  box-shadow: 0 4px 20px rgba(60, 64, 67, 0.04);
}
.lead-magnet-head {
  margin-bottom: 1.15rem;
}
.lead-magnet-head h2 {
  margin-top: 0.55rem;
}

.preset-row {
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
  margin-bottom: 1.15rem;
}

/* Accessible Forms (:user-invalid + hints above inputs - follows modern-web-guidance: forms + validate-input-after-interaction) */
.hint {
  display: block;
  color: var(--ink-muted);
  font-size: 0.82rem;
  font-weight: 400;
}

.error-msg {
  display: none;
  color: #c5221f;
  font-size: 0.84rem;
  font-weight: 500;
  margin-top: 0.15rem;
}

.lead-magnet-card input[type="text"],
.lead-magnet-card input[type="search"],
.lead-magnet-card select,
.lead-magnet-card textarea {
  font-size: max(1rem, 1em);
  min-height: 46px;
  border-color: #bdc1c6;
}

:is(input, select, textarea):is(:user-invalid, .user-invalid-fallback) {
  border-color: #c5221f;
  background-color: #fce8e6;
}
:is(input, select, textarea):is(:user-invalid, .user-invalid-fallback) + .error-msg {
  display: block;
}
:is(input, select, textarea):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.radio-fieldset,
.checklist-fieldset {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.9rem 1.05rem;
  margin: 0;
  background: var(--surface-subtle);
}
.radio-fieldset legend {
  font-weight: 600;
  font-size: 0.88rem;
  padding: 0 0.35rem;
}
.radio-group,
.geo-checklist {
  display: grid;
  gap: 0.6rem;
}
.radio-option {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
}
.radio-option input[type="radio"],
.geo-check-item input[type="checkbox"] {
  width: 1.15rem;
  height: 1.15rem;
  min-height: auto;
  margin-top: 0.15rem;
  accent-color: var(--accent);
  flex-shrink: 0;
  cursor: pointer;
}
.radio-option label {
  cursor: pointer;
  font-size: 0.88rem;
}

.geo-check-item {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.72rem 0.9rem;
  cursor: pointer;
  font-size: 0.88rem;
}
.geo-check-item:hover {
  border-color: var(--red-hairline);
}

/* Compliance Checker Output & Score Meter */
.checker-output,
.geo-score-bar-box {
  margin-top: 1.25rem;
  padding: 1.15rem;
  border-radius: 12px;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
}
.checker-score-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.65rem;
}
.checker-score-num {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.score-meter {
  height: 8px;
  border-radius: 999px;
  background: #e8eaed;
  overflow: hidden;
  margin-bottom: 0.9rem;
}
.score-meter-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: var(--accent);
  transition: width 0.35s ease, background-color 0.25s ease;
}
.score-meter-fill[data-tier="ok"] { background: var(--ok); }
.score-meter-fill[data-tier="warn"] { background: #e37400; }
.score-meter-fill[data-tier="bad"] { background: #c5221f; }

.check-bullet-list {
  margin: 0.5rem 0 0;
  padding-left: 1.15rem;
  display: grid;
  gap: 0.45rem;
  font-size: 0.9rem;
  color: var(--ink-muted);
}

/* Agency Pilot Builder */
.pilot-builder-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.9rem;
  margin-bottom: 1.15rem;
}
.pilot-output-wrap {
  margin-top: 0.5rem;
}

/* Free Tool Switcher */
.tool-switcher {
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}
.tool-switch-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.52rem 0.95rem;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: #ffffff;
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 600;
  text-decoration: none;
}
.tool-switch-pill:hover {
  text-decoration: none;
  border-color: var(--accent);
  color: var(--accent);
}
.tool-switch-pill.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
}

.cta-banner-box {
  border-radius: 16px;
  border: 1px solid var(--red-hairline);
  padding: 1.75rem;
  margin-top: 2.5rem;
}

.copy-feedback {
  margin: 0.5rem 0 0;
  font-size: 0.84rem;
  color: var(--ok);
  min-height: 1.2em;
}

/* ================= NAANO-STYLE HERO URL BAR, 299 EUR PRICING & 4-STEP ONBOARDING ================= */

.hero-url-form {
  display: flex;
  align-items: stretch;
  gap: 0.5rem;
  margin-top: 1.3rem;
  background: #ffffff;
  border: 1px solid #dadce0;
  border-radius: 14px;
  padding: 0.35rem;
  box-shadow: 0 4px 18px rgba(60, 64, 67, 0.08);
  max-width: 540px;
}

.hero-url-form input {
  flex: 1 1 auto;
  border: 0;
  background: transparent;
  padding: 0.65rem 0.85rem;
  font-size: max(1rem, 1em);
  min-height: 46px;
}
.hero-url-form input:focus {
  outline: none;
}
.hero-url-form:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(217, 70, 38, 0.14);
}
.hero-url-form .btn {
  flex-shrink: 0;
  border-radius: 10px;
  white-space: nowrap;
}

.hero-price-note {
  font-size: 0.82rem;
  color: var(--ink-muted);
  margin: 0.65rem 0 0;
  font-weight: 500;
}

.pricing-single-card,
.pay-plan-box {
  background: linear-gradient(180deg, #fff8f6 0%, #ffffff 100%);
  border: 1px solid var(--red-hairline);
  border-top: 3px solid var(--accent);
  border-radius: 18px;
  padding: 1.75rem;
}

.pay-plan-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
  padding-bottom: 1rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.pay-price-block {
  text-align: right;
}

.pay-price {
  display: block;
  font-family: var(--font-mono);
  font-size: clamp(2rem, 4vw, 2.6rem);
  line-height: 1.05;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.pay-feature-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
  font-size: 0.93rem;
  color: var(--ink);
}

.pricing-custom-card {
  margin-top: 1.1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.25rem 1.5rem;
}

.pricing-custom-card > div:first-child {
  flex: 1 1 320px;
  min-width: 0;
}

.pricing-custom-card h3 {
  margin: 0.45rem 0 0.35rem;
  font-size: 1.05rem;
  line-height: 1.3;
}

.pricing-custom-card p {
  margin: 0;
  font-size: 0.9rem;
}

.pricing-custom-actions {
  flex: 0 0 auto;
}

@media (max-width: 640px) {
  .pricing-custom-card {
    padding: 1.1rem;
  }
  .pricing-custom-actions,
  .pricing-custom-actions .btn {
    width: 100%;
  }
}

/* 4-Step Onboarding Wizard (/start) */
.onboarding-body {
  background:
    radial-gradient(ellipse 65% 45% at 85% 0%, rgba(217, 70, 38, 0.08), transparent 60%),
    radial-gradient(ellipse 55% 40% at 15% 0%, rgba(217, 70, 38, 0.05), transparent 55%),
    #ffffff;
  min-height: 100dvh;
}

.onb-main {
  max-width: 720px;
  padding: 2rem 0 4rem;
}

.onb-progress {
  margin-bottom: 1.5rem;
}

.onb-step-list {
  list-style: none;
  margin: 0 0 0.6rem;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.4rem;
}

.onb-step-item {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink-muted);
  padding: 0.35rem 0.5rem;
  border-radius: 8px;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.onb-step-item.is-active {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}

.onb-step-item.is-done {
  background: var(--ok-soft);
  border-color: #b7e1cd;
  color: var(--ok);
}

.onb-progress-bar {
  width: 100%;
  height: 6px;
  border: 0;
  border-radius: 999px;
  overflow: hidden;
  accent-color: var(--accent);
}

.onb-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-top: 3px solid var(--accent);
  border-radius: 18px;
  padding: 2rem;
  box-shadow: 0 8px 30px rgba(60, 64, 67, 0.06);
}

.onb-site-read {
  background: var(--g-ai-bg);
  border: 1px solid var(--g-ai-border);
  border-radius: 12px;
  padding: 0.95rem 1.1rem;
  margin-bottom: 1.25rem;
}

.onb-two-col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

.kw-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.25rem 0 0.45rem;
}

.kw-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid var(--red-hairline);
  border-radius: 999px;
  padding: 0.25rem 0.65rem;
  font-size: 0.82rem;
  font-weight: 600;
}

.kw-chip-rm {
  border: 0;
  background: transparent;
  color: var(--accent);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 0.1rem;
}

.kw-add-row {
  display: flex;
  gap: 0.5rem;
}
.kw-add-row input {
  flex: 1 1 auto;
}
.kw-add-row .btn {
  flex-shrink: 0;
}

.onb-lock-box {
  background: var(--red-blush);
  border: 1px solid var(--red-hairline);
  border-radius: 12px;
  padding: 0.95rem 1.1rem;
  font-size: 0.9rem;
}

.onb-plan-strip {
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid var(--red-hairline);
  border-radius: 10px;
  padding: 0.65rem 0.9rem;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1.15rem;
}

.onb-nav-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.5rem;
  flex-wrap: wrap;
}

.pass-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.btn-link-inline {
  border: 0;
  background: transparent;
  color: var(--accent);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0.2rem 0.4rem;
}

.pay-summary-box {
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem 1.15rem;
  margin: 1.15rem 0;
}

.pay-summary-dl {
  display: grid;
  gap: 0.45rem;
  margin: 0.65rem 0 0;
  font-size: 0.86rem;
}

.pay-summary-dl > div {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  padding-top: 0.4rem;
  border-top: 1px solid var(--border);
}

.pay-summary-dl dt {
  color: var(--ink-muted);
  font-weight: 500;
}

.pay-summary-dl dd {
  margin: 0;
  font-weight: 600;
  color: var(--ink);
  text-align: right;
  overflow-wrap: anywhere;
}

@media (max-width: 640px) {
  .hero-url-form {
    flex-direction: column;
    padding: 0.45rem;
  }
  .hero-url-form .btn {
    width: 100%;
    min-height: 48px;
  }
  .onb-main {
    padding: 1.1rem 0 2.75rem;
  }
  .onb-step-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .onb-card,
  .pricing-single-card,
  .pay-plan-box {
    padding: 1.2rem;
    border-radius: 14px;
  }
  .onb-two-col {
    grid-template-columns: 1fr;
  }
  .onb-nav-row {
    flex-direction: column-reverse;
    align-items: stretch;
  }
  .onb-nav-row .btn {
    width: 100%;
    min-height: 46px;
  }
  .pay-price-block {
    text-align: left;
  }
  .pay-summary-dl > div {
    flex-direction: column;
    gap: 0.15rem;
  }
  .pay-summary-dl dd {
    text-align: left;
  }
}

/* Prevent any grid/flex child from causing horizontal overflow on iPhone */
main,
.hero-grid-wide > *,
.strip-grid > *,
.bento-grid > *,
.bento-split > *,
.feature-grid > *,
.pipeline-canvas > *,
.g-search-bar > *,
.g-result-cite > *,
.scanner-grid > *,
.pilot-grid > * {
  min-width: 0;
}

.g-breadcrumb {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.g-result-cite {
  flex-wrap: wrap;
}

@container (width < 480px) {
  .data-table tbody td {
    flex-direction: column;
    gap: 0.22rem;
    align-items: flex-start;
  }
  .data-table tbody th {
    position: static;
    font-size: 0.92rem;
  }
}

@media (max-width: 960px) {
  .hero-grid-wide, .strip-grid, .bento-grid, .bento-split {
    grid-template-columns: 1fr;
  }
  .hero-grid-wide { gap: 1.65rem; }
  .strip-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .subpage-hero, .lead-magnet-card { padding: 1.35rem; }
}

@media (max-width: 640px) {
  .container {
    width: calc(100% - 1.5rem);
  }

  .brand-domain-badge {
    display: none;
  }

  .hero-kinetic {
    padding: 1.65rem 0 2rem;
  }

  .section {
    padding: 2.15rem 0;
  }

  .subpage-main {
    padding: 1.15rem 0 2.75rem;
  }

  .subpage-section {
    margin: 2rem 0;
  }

  .lead {
    font-size: 0.98rem;
  }

  /* Crisp iPhone Google-SERP Hero Motion Stage */
  .google-serp-stage {
    padding: 0.85rem;
    border-radius: 14px;
  }

  .stage-topbar {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
  }

  .stage-status {
    justify-content: space-between;
  }

  .stage-controls {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0.45rem;
  }

  .stage-steps {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    width: 100%;
    gap: 0.15rem;
  }

  .stage-pill {
    padding: 0.34rem 0.2rem;
    font-size: 0.69rem;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .btn-pause {
    align-self: flex-start;
    padding: 0.32rem 0.75rem;
  }

  .g-search-bar {
    padding: 0.48rem 0.7rem;
    font-size: 0.82rem;
  }

  .g-radar-pill {
    display: none;
  }

  .g-nav-tabs {
    overflow-x: auto;
    scrollbar-width: none;
    white-space: nowrap;
    gap: 0.9rem;
    padding-inline: 0.35rem;
  }
  .g-nav-tabs::-webkit-scrollbar { display: none; }

  .pipe-node {
    padding: 0.75rem 0.8rem;
  }

  .node-head {
    flex-wrap: wrap;
  }

  .intent-badge {
    margin-left: 0;
  }

  .pipe-outcome {
    grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
    gap: 0.5rem;
    padding: 0.65rem;
  }
  .outcome-cell strong {
    font-size: 0.82rem;
  }

  /* Light middle & cards on iPhone */
  .strip-kpis {
    grid-template-columns: 1fr;
    gap: 0.55rem;
  }

  .bento-card,
  .card,
  .subpage-hero,
  .lead-magnet-card,
  .cta-banner-box,
  .geo-answer-box {
    padding: 1.15rem;
    border-radius: 14px;
  }

  .calc-output-card {
    padding: 1.1rem;
  }

  .calc-subgrid {
    grid-template-columns: 1fr 1fr;
    gap: 0.6rem;
  }

  /* Comfortable iPhone touch targets */
  .cta-row {
    flex-direction: column;
    align-items: stretch;
  }
  .cta-row .btn,
  .mode-toggle .btn,
  .preset-row .btn,
  .tool-inline-form .btn,
  .banner-actions .btn {
    width: 100%;
    min-height: 46px;
  }

  .tool-inline-form {
    flex-direction: column;
    align-items: stretch;
  }
  .tool-inline-form .field {
    flex: 1 1 auto !important;
  }

  .tool-switcher {
    flex-direction: column;
  }
  .tool-switch-pill {
    justify-content: center;
    min-height: 44px;
    text-align: center;
  }

  .faq-item {
    padding: 0.85rem 0.95rem;
  }
  .faq-item p {
    margin-left: 0;
  }

  /* Workspace (/app) & Share report on iPhone */
  .app-main {
    padding: 1rem 0 2.75rem;
  }
  .header-left, .header-right {
    width: 100%;
  }
  .project-picker {
    width: 100%;
  }
  .project-picker select {
    min-width: 0;
    width: 100%;
  }
  .user-pill {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .workspace-banner {
    padding: 1.1rem;
  }
  .banner-actions {
    width: 100%;
    margin-inline-start: 0;
    flex-direction: column-reverse;
  }
  .kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
  }
  .kpi-card {
    padding: 0.85rem;
  }
  .kpi-value {
    font-size: 1.32rem;
  }
  .scanner-grid,
  .pilot-grid,
  .feature-grid {
    grid-template-columns: 1fr;
  }
  .filter-bar select,
  .filter-bar input[type="search"],
  .checkbox-pill {
    flex: 1 1 100%;
    width: 100%;
  }
  .panel-inner {
    padding: 0.9rem;
  }
  dialog {
    width: calc(100vw - 1rem);
    max-height: calc(100dvh - 1rem);
  }
  .dialog-header,
  .dialog-body,
  .dialog-footer {
    padding: 0.95rem 1rem;
  }
  .dialog-footer {
    flex-wrap: wrap;
  }
}
