/* ===========================================================
   InkForge — Native macOS Drawing App
   Case-study Design System
   Palette family: Studio Slate (dark canvas + steel-blue ink accent)
   Tokens sourced from /Users/ilans/InkForge/INKFORGE_DESIGN.md
   =========================================================== */

:root {
  /* ----- InkForge brand: Studio Slate dark palette + steel blue ----- */
  --brand-primary: #4874B0;        /* steel blue - the sole accent / active tool */
  --brand-mid: #5A88C4;            /* lighter steel blue - hover, links */
  --brand-deep: #335E99;           /* deep steel blue - pressed, dark fill */
  --brand-cyan: #6A9FD4;           /* sky blue - secondary accent */
  --brand-ink: #F2F2F2;            /* near-white primary text on dark */
  --brand-ink-deeper: #FFFFFF;
  --brand-ink-soft: #B3B3B8;

  --brand-purple: #4874B0;         /* steel blue used as "third" accent role */
  --brand-purple-deep: #2A4E8A;    /* deep for gradient start */
  --brand-purple-soft: #1E2F47;    /* dark steel tint for soft backgrounds */

  --brand-orange: #6A9FD4;         /* sky blue used in warm-accent role */
  --brand-orange-soft: #1D2D3F;
  --brand-lime: #3A7D6A;           /* muted teal - success */
  --brand-mint: #2E5C4E;           /* deep teal */
  --brand-cream: #2E2E30;          /* panel bg (dark) */
  --brand-blue-tint: #1E2F47;      /* dark blue tint for card highlights */
  --brand-teal-tint: #1E2E2C;

  /* RGB channels for alpha compositing. Dark theme uses near-black shadows. */
  --shadow-rgb: 0, 0, 0;           /* pure black — every drop shadow */
  --glow-rgb: 72, 116, 176;        /* steel blue — glows, soft fills */
  --accent2-rgb: 106, 159, 212;    /* sky blue secondary accent */
  --counter-rgb: 180, 100, 70;     /* warm counter note */

  /* Surfaces - dark canvas hierarchy (five-stop grey from InkForge Theme.swift) */
  --bg: #242426;                   /* canvas-bg: deepest, behind bitmap */
  --bg-subtle: #262628;
  --bg-soft: #2E2E30;              /* panel level */
  --bg-card: #2E2E30;              /* panel — toolbar, sidebars */
  --bg-card-elevated: #383839;     /* panel-alt — layer panel, picker */
  --bg-card-hover: #3D3D42;        /* button-bg — hovered control */
  --bg-glass: rgba(46, 46, 48, 0.88);
  --bg-hero-purple: linear-gradient(135deg, var(--brand-purple-deep) 0%, var(--brand-primary) 100%);
  --bg-elevated: var(--bg-card-elevated);

  /* Aliases (legacy class references) */
  --primary: var(--brand-primary);
  --primary-bright: var(--brand-mid);
  --primary-deep: var(--brand-deep);
  --primary-glow: rgba(var(--glow-rgb), 0.25);
  --cyan: var(--brand-cyan);
  --cyan-soft: rgba(var(--accent2-rgb), 0.16);
  --primary-soft: rgba(var(--glow-rgb), 0.10);
  --primary-soft-strong: rgba(var(--glow-rgb), 0.18);

  /* Signals - calibrated for dark bg */
  --success: #3A9E78;              /* readable green on dark */
  --success-soft: #1A3029;
  --warning: #C98030;
  --warning-soft: rgba(201, 128, 48, 0.12);
  --counter: #C07050;              /* warm counter */
  --counter-soft: rgba(var(--counter-rgb), 0.14);
  --danger: #B03A4E;

  /* Text - three-tier on dark (from InkForge Theme.swift) */
  --text: #F2F2F2;                 /* primary labels */
  --text-dim: #B3B3B8;             /* secondary, values */
  --text-muted: #808085;           /* tertiary, status */
  --text-faint: #606065;
  --text-ghost: #484850;
  --text-on-purple: #FFFFFF;

  /* Borders - dark hairlines */
  --border: #4D4D52;               /* 1px hairline between panels */
  --border-strong: #5D5D62;
  --border-primary: rgba(var(--glow-rgb), 0.40);

  /* Type - Inter (precise, UI-native) + SF Mono — matches macOS app aesthetic */
  --font-heading: 'Inter', system-ui, -apple-system, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', Menlo, monospace;

  /* Radii - tight scale matching InkForge's precision-tool aesthetic */
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;
  --r-xl: 18px;
  --r-2xl: 22px;
  --r-pill: 999px;

  /* Shadows - always dark/black alpha on dark bg */
  --shadow-sm: 0 1px 3px rgba(var(--shadow-rgb), 0.30);
  --shadow-md: 0 8px 22px rgba(var(--shadow-rgb), 0.40), 0 2px 6px rgba(var(--shadow-rgb), 0.25);
  --shadow-lg: 0 24px 48px rgba(var(--shadow-rgb), 0.50), 0 4px 12px rgba(var(--shadow-rgb), 0.30);
  --shadow-glow: 0 0 22px rgba(var(--glow-rgb), 0.35);

  /* Transitions */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --t-fast: 160ms;
  --t-med: 280ms;
  --t-slow: 520ms;
}

/* ---------- Reset ---------- */

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Ambient background - soft light tint, the brand site-style */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 15% 10%, rgba(var(--glow-rgb), 0.05), transparent 45%),
    radial-gradient(circle at 85% 70%, rgba(var(--accent2-rgb), 0.04), transparent 50%);
  pointer-events: none;
  z-index: 0;
}

h1, h2, h3, h4, h5 {
  font-family: var(--font-heading);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--text);
}
h1 { font-size: clamp(2.5rem, 6vw, 4.75rem); line-height: 1.02; letter-spacing: -0.035em; }
h2 { font-size: clamp(1.875rem, 3.5vw, 2.75rem); line-height: 1.08; letter-spacing: -0.025em; }
h3 { font-size: clamp(1.25rem, 2vw, 1.625rem); line-height: 1.2; }
h4 { font-size: 1.125rem; line-height: 1.3; }

p { margin: 0; color: var(--text-dim); }
a { color: var(--primary-bright); text-decoration: none; transition: color var(--t-fast) var(--ease); }
a:hover { color: var(--brand-primary); }

button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, select, textarea { font-family: inherit; }

::selection { background: var(--primary); color: var(--text); }

/* ---------- Layout ---------- */

.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 32px;
  position: relative;
  z-index: 1;
}
.container-narrow { max-width: 920px; }

.section { padding: 120px 0; position: relative; z-index: 1; }
.section-sm { padding: 72px 0; }

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-heading);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--primary-bright);
  margin-bottom: 20px;
}
.section-label::before {
  content: '';
  width: 20px;
  height: 1px;
  background: var(--primary-bright);
}

/* ---------- Nav ---------- */

.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: var(--bg-glass);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  border-bottom: 1px solid var(--border);
  transition: padding var(--t-med) var(--ease);
}
.nav-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 18px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.01em;
  color: var(--text);
}
.nav-brand-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  filter: drop-shadow(0 4px 12px rgba(var(--glow-rgb), 0.32));
}
.nav-brand-mark svg { width: 100%; height: 100%; }
.nav-links { display: flex; gap: 8px; align-items: center; }
.nav-link {
  padding: 10px 16px;
  font-size: 14px;
  color: var(--text-dim);
  border-radius: var(--r-pill);
  transition: all var(--t-fast) var(--ease);
}
.nav-link:hover { color: var(--text); background: var(--bg-card); }
.nav-link.is-active { color: var(--text); background: var(--bg-card); }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 28px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: var(--r-pill);
  transition: all var(--t-fast) var(--ease);
  white-space: nowrap;
  line-height: 1;
}
.btn-primary {
  background: var(--brand-primary);
  color: #FFFFFF;
}
.btn-primary:hover {
  background: var(--brand-deep);
  color: #FFFFFF;
}
.btn-primary:active { background: #0039B0; }

.btn-secondary {
  background: #FFFFFF;
  color: var(--brand-ink);
  border: 1.5px solid var(--brand-ink);
}
.btn-secondary:hover { background: var(--brand-ink); color: #FFFFFF; border-color: var(--brand-ink); }

.btn-ghost {
  color: var(--text-dim);
  padding: 12px 18px;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 600;
  font-size: 14px;
}
.btn-ghost:hover { color: var(--brand-primary); background: var(--bg-soft); }

.btn-sm { padding: 10px 18px; font-size: 11.5px; gap: 8px; }
.btn-lg { padding: 16px 32px; font-size: 14px; }

/* Arrow icon trailing a button - small badge style */
.btn .btn-arrow {
  display: inline-grid;
  place-items: center;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
}
.btn-secondary .btn-arrow { background: var(--brand-ink); color: #FFFFFF; }
.btn-secondary:hover .btn-arrow { background: rgba(255, 255, 255, 0.16); }

/* ---------- Hero ---------- */

.hero {
  padding: 200px 0 120px;
  position: relative;
  overflow: hidden;
}
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  font-family: var(--font-heading);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--primary-bright);
  background: rgba(var(--glow-rgb), 0.12);
  border: 1px solid var(--border-primary);
  border-radius: var(--r-pill);
  margin-bottom: 28px;
}
.hero-eyebrow-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 8px var(--cyan);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}
.hero h1 {
  max-width: 16ch;
  margin-bottom: 28px;
}
/* Italic accent - matches the brand's "tailored" hero treatment:
   solid brand-blue italic in medium weight. Italic glyphs slant right, so
   add a touch of right-side breathing room so the next word doesn't crowd. */
.hero-gradient {
  color: var(--brand-primary);
  font-style: italic;
  font-weight: 500;
  margin-right: 0.12em;
}

/* Inline brand mark helper — unused in this theme, kept as layout utility */
.b-mark {
  display: inline-block;
  height: 0.82em;
  width: auto;
  vertical-align: -0.06em;
  margin: 0;
}
.hero-sub {
  font-size: clamp(1.05rem, 1.5vw, 1.25rem);
  max-width: 56ch;
  color: var(--text-dim);
  margin-bottom: 40px;
  line-height: 1.55;
}
.hero-meta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 56px;
}
.tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  font-size: 13px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  color: var(--text-dim);
}
.tag svg { stroke: var(--primary-bright); }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }

/* ---------- Cards / Sections ---------- */

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-md);   /* 12px - the brand's default card radius */
  padding: 32px;
  transition: all var(--t-med) var(--ease);
}
.card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-strong);
}
.card-title {
  font-family: var(--font-heading);
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 12px;
}
.card-body { color: var(--text-dim); font-size: 14px; line-height: 1.6; }

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }

@media (max-width: 900px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* ---------- Timeline ---------- */

.timeline { position: relative; padding-left: 32px; }
.timeline::before {
  content: '';
  position: absolute;
  left: 6px; top: 8px; bottom: 8px;
  width: 2px;
  background: linear-gradient(180deg, var(--primary) 0%, var(--cyan) 50%, transparent 100%);
}
.timeline-step {
  position: relative;
  padding-bottom: 56px;
}
.timeline-step:last-child { padding-bottom: 0; }
.timeline-step::before {
  content: '';
  position: absolute;
  left: -32px; top: 6px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 0 4px var(--bg), 0 0 16px var(--primary-glow);
}
.timeline-label {
  font-family: var(--font-heading);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brand-primary);
  margin-bottom: 8px;
}
.timeline-title {
  font-family: var(--font-heading);
  font-size: 1.375rem;
  font-weight: 700;
  margin-bottom: 12px;
}
.timeline-body { color: var(--text-dim); font-size: 15px; line-height: 1.65; max-width: 64ch; }

/* ---------- Showcase ---------- */

.showcase {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 56px;
  align-items: center;
  padding: 56px 0;
  border-top: 1px solid var(--border);
}
.showcase:first-child { border-top: none; padding-top: 0; }
.showcase-reverse { grid-template-columns: 1fr 1.3fr; }
.showcase-reverse .showcase-media { order: 2; }
.showcase-reverse .showcase-text { order: 1; }
.showcase-media {
  border-radius: var(--r-xl);
  overflow: hidden;
  border: 1px solid var(--border-strong);
  background: var(--bg-elevated);
  box-shadow: var(--shadow-lg);
}
.showcase-media img, .showcase-media video {
  width: 100%; display: block;
}
.showcase-eyebrow {
  font-family: var(--font-heading);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--primary-bright);
  margin-bottom: 12px;
}
.showcase-title { font-size: 1.625rem; margin-bottom: 16px; }
.showcase-body { color: var(--text-dim); line-height: 1.65; }

@media (max-width: 900px) {
  .showcase, .showcase-reverse { grid-template-columns: 1fr; gap: 28px; }
  .showcase-reverse .showcase-media { order: 1; }
  .showcase-reverse .showcase-text { order: 2; }
}

/* ---------- Reveal animations ---------- */

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 800ms var(--ease-out), transform 800ms var(--ease-out);
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* ---------- Footer ---------- */

.footer {
  padding: 64px 0 48px;
  border-top: 1px solid var(--border);
  margin-top: 80px;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 32px;
  flex-wrap: wrap;
}
.footer-brand { display: flex; align-items: center; gap: 10px; opacity: 0.5; }
.footer-disclaimer {
  font-size: 13px;
  color: var(--text-muted);
  max-width: 50ch;
}

/* ===========================================================
   PROTOTYPE - Pricing Studio
   =========================================================== */

.proto-shell {
  min-height: 100vh;
  padding: 100px 0 80px;
  position: relative;
  z-index: 1;
}

/* Progress strip */
.proto-progress {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 56px;
  max-width: 760px;
}
.proto-step {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-muted);
  font-size: 13px;
  font-family: var(--font-heading);
  letter-spacing: 0.04em;
}
.proto-step-num {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  display: grid; place-items: center;
  font-size: 12px;
  font-weight: 700;
  transition: all var(--t-med) var(--ease);
}
.proto-step.is-active .proto-step-num {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--text);
  box-shadow: 0 0 0 4px rgba(var(--glow-rgb),0.18);
}
.proto-step.is-active { color: var(--text); }
.proto-step.is-done .proto-step-num {
  background: var(--success);
  border-color: var(--success);
  color: var(--bg);
}
.proto-step-line { flex: 1; height: 1px; background: var(--border); }

/* Screen container */
.screen {
  display: none;
  animation: screenIn 420ms var(--ease-out);
}
.screen.is-active { display: block; }
@keyframes screenIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Two-column studio layout */
.studio {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 32px;
  align-items: start;
}
@media (max-width: 1100px) {
  .studio { grid-template-columns: 1fr; }
}

/* Screen heading */
.screen-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 24px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}
.screen-head h1 {
  font-size: clamp(2rem, 3.4vw, 2.75rem);
  margin-bottom: 8px;
}
.screen-head p { font-size: 1.0625rem; max-width: 72ch; }

/* ---------- Intake screen ---------- */

/* Two-column grid: main form + 'why we ask' sidebar */
.intake-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 56px;
  align-items: start;
}
@media (max-width: 1100px) {
  .intake-grid { grid-template-columns: 1fr; gap: 32px; }
  .intake-side { order: -1; }
}

.intake { max-width: 720px; margin: 0 auto; } /* legacy fallback */
.intake-main { min-width: 0; }

.intake-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-md);   /* 12px - the brand's default */
  padding: 36px;
  box-shadow: var(--shadow-md);
}

/* Hero pill - replaces the simple section-label, adds purple accent */
.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px 6px 10px;
  background: var(--brand-purple-soft);
  border-radius: var(--r-pill);
  font-family: var(--font-heading);
  font-size: 11px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--brand-purple-deep);
  font-weight: 600;
  margin-bottom: 20px;
}
.hero-pill-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--brand-primary);
  box-shadow: 0 0 8px rgba(var(--glow-rgb), 0.6);
}

/* Intake sidebar */
.intake-side {
  position: sticky;
  top: 100px;
}
@media (max-width: 1100px) { .intake-side { position: static; } }

.intake-side-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-md);   /* 12px */
  padding: 28px;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}
.intake-side-card::before {
  content: '';
  position: absolute;
  top: -60px; right: -60px;
  width: 200px; height: 200px;
  background: radial-gradient(circle, var(--brand-blue-tint), transparent 70%);
  pointer-events: none;
}
.intake-side-eyebrow {
  font-family: var(--font-heading);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brand-primary);
  margin-bottom: 10px;
  position: relative;
}
.intake-side-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  margin-bottom: 22px;
  line-height: 1.2;
  position: relative;
}
.intake-side-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
}
.intake-side-list li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.intake-side-list strong {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 2px;
}
.intake-side-list span {
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.5;
}
.intake-side-icon {
  flex-shrink: 0;
  width: 26px; height: 26px;
  border-radius: 8px;
  display: grid;
  place-items: center;
}
.intake-side-foot {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 24px;
  position: relative;
}
.intake-side-stat {
  display: flex;
  flex-direction: column;
  font-size: 12px;
  color: var(--text-muted);
}
.intake-side-stat strong {
  font-family: var(--font-heading);
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
  margin-bottom: 2px;
}
.field { margin-bottom: 32px; }
.field:last-child { margin-bottom: 0; }
.field-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}
.field-help {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 16px;
}
.field-input {
  width: 100%;
  padding: 16px 18px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-md);
  color: var(--text);
  font-size: 15px;
  transition: all var(--t-fast) var(--ease);
}
.field-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(var(--glow-rgb),0.18);
}
.field-input::placeholder { color: var(--text-muted); }

/* Empty-URL validation feedback: red border + a brief shake */
.field-input.is-error {
  border-color: var(--danger);
  box-shadow: 0 0 0 4px rgba(141, 0, 42, 0.10);
  animation: input-shake 0.45s cubic-bezier(0.36, 0.07, 0.19, 0.97);
}
@keyframes input-shake {
  0%, 100% { transform: translateX(0); }
  15%, 75% { transform: translateX(-6px); }
  30%, 60% { transform: translateX(6px); }
  45% { transform: translateX(-3px); }
}

/* Soft "site recognized" - favicon appears in the check slot once we've
   confirmed the domain. Falls back to a green check if no favicon (rare). */
.field-input-wrap { position: relative; }
.field-input-wrap .field-input { padding-right: 48px; }     /* room for the indicator */
.field-check {
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%) scale(0.6);
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--success);
  color: #FFFFFF;
  display: grid;
  place-items: center;
  opacity: 0;
  pointer-events: none;
  overflow: hidden;
  transition: opacity 280ms var(--ease), transform 380ms cubic-bezier(0.34, 1.56, 0.64, 1), background 200ms var(--ease);
}
.field-input-wrap.is-verified .field-check {
  opacity: 1;
  transform: translateY(-50%) scale(1);
}
/* When the favicon loads in, drop the green bg and let the favicon shine */
.field-input-wrap.has-favicon .field-check {
  background: #FFFFFF;
  box-shadow: 0 2px 6px rgba(var(--shadow-rgb), 0.10), 0 0 0 1px var(--border);
}
.field-check img {
  width: 20px;
  height: 20px;
  object-fit: contain;
  display: block;
}
/* Hide the fallback SVG when the favicon is in */
.field-input-wrap.has-favicon .field-check svg { display: none; }

.chip-group { display: flex; flex-wrap: wrap; gap: 10px; }

/* Detection shimmer - chips fade + sweep while traffic is being looked up */
.chip-group.is-detecting .chip {
  opacity: 0.5;
  pointer-events: none;
  position: relative;
  overflow: hidden;
}
.chip-group.is-detecting .chip::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 30%, rgba(var(--glow-rgb), 0.20) 50%, transparent 70%);
  animation: chip-shimmer 1.1s linear infinite;
}
@keyframes chip-shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* "Auto-detected" note that appears below the chip group on successful detection */
.chip-group-note {
  margin-top: 12px;
  font-size: 12.5px;
  color: var(--success);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 280ms var(--ease), transform 280ms var(--ease);
  height: 0;
  overflow: hidden;
}
.chip-group-note.is-visible {
  opacity: 1;
  transform: translateY(0);
  height: auto;
  margin-top: 12px;
}
/* Soft variant used when we genuinely can't ID the site - muted, not green */
.chip-group-note.is-soft {
  color: var(--text-muted);
}
.chip-group-note.is-soft svg { opacity: 0; width: 0; height: 0; }

/* Auto-selected chip carries a subtle teal ring so it reads "machine picked this" */
.chip.is-auto.is-selected {
  background: var(--success-soft);
  border-color: var(--success);
  color: var(--success);
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-pill);
  color: var(--text-dim);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--t-fast) var(--ease);
}
.chip:hover { color: var(--text); border-color: var(--primary-bright); }
.chip.is-selected {
  background: rgba(var(--glow-rgb), 0.14);
  border-color: var(--primary);
  color: var(--text);
}

/* ---------- Tailored offer screen ---------- */

.offer-hero {
  background: linear-gradient(180deg, var(--brand-blue-tint) 0%, #FFFFFF 100%);
  border: 1px solid var(--border);
  border-radius: var(--r-md);   /* 12px */
  padding: 48px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

/* Favicon of the user's actual website - personalizes the offer card.
   "We know what your site looks like" is a small but powerful trust signal. */
.offer-favicon {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #FFFFFF;
  box-shadow: 0 6px 20px rgba(var(--shadow-rgb), 0.10), 0 2px 6px rgba(var(--shadow-rgb), 0.06);
  padding: 9px;
  object-fit: contain;
  z-index: 2;
  opacity: 0;
  transform: scale(0.85);
  transition: opacity 360ms var(--ease-out), transform 360ms var(--ease-out);
}
.offer-favicon.is-loaded {
  opacity: 1;
  transform: scale(1);
}
.offer-hero::before {
  content: '';
  position: absolute;
  top: -120px; right: -120px;
  width: 320px; height: 320px;
  background: radial-gradient(circle, var(--brand-purple-soft), transparent 70%);
  pointer-events: none;
  border-radius: 50%;
}
.offer-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px 6px 10px;
  background: var(--brand-mint);
  border: 1px solid rgba(2, 125, 118, 0.18);
  border-radius: var(--r-pill);
  font-size: 11.5px;
  font-family: var(--font-heading);
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: #0B403D;
  font-weight: 600;
  margin-bottom: 20px;
}
.offer-name {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 3vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  margin-bottom: 12px;
  line-height: 1.1;
  max-width: 14ch;
}
.offer-blurb { font-size: 1.0625rem; max-width: 60ch; color: var(--text-dim); margin-bottom: 32px; }
.offer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: end;
  position: relative;
  z-index: 1;
}
.offer-price {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 8px;
}
.offer-amount {
  font-family: var(--font-heading);
  font-size: clamp(3rem, 6vw, 4.5rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-purple));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1;
}
.offer-period { color: var(--text-muted); font-size: 1.0625rem; }
.offer-vs {
  font-size: 13px;
  color: var(--success);
  margin-bottom: 24px;
}
.offer-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.offer-explain {
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
  position: relative;
  z-index: 1;
}
.offer-explain-title {
  font-size: 13px;
  font-family: var(--font-heading);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 16px;
}
.offer-reasons {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.offer-reason {
  padding: 18px;
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  font-size: 13.5px;
  color: var(--text-dim);
  line-height: 1.55;
  box-shadow: var(--shadow-sm);
}
.offer-reason strong { color: var(--text); display: block; margin-bottom: 6px; font-weight: 700; font-size: 14px; }

@media (max-width: 800px) {
  .offer-grid, .offer-reasons { grid-template-columns: 1fr; }
}

/* ---------- Studio left panel - levers ---------- */

.levers {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-md);   /* 12px */
  padding: 36px;
  box-shadow: var(--shadow-sm);
}
.lever {
  padding: 28px 0;
  border-bottom: 1px solid var(--border);
}
.lever:first-child { padding-top: 0; }
.lever:last-child { padding-bottom: 0; border-bottom: none; }
.lever-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 4px;
  gap: 16px;
}
.lever-title {
  font-family: var(--font-heading);
  font-size: 1.0625rem;
  font-weight: 700;
}
.lever-value {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--brand-primary);
  font-weight: 600;
}
.lever-help {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 18px;
}

/* Range slider */
.slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  background: var(--bg-elevated);
  border-radius: var(--r-pill);
  outline: none;
  transition: background var(--t-fast) var(--ease);
  background-image: linear-gradient(90deg, var(--primary), var(--cyan));
  background-repeat: no-repeat;
  background-size: 50% 100%;
}
.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--text);
  border: 3px solid var(--primary);
  box-shadow: 0 0 0 4px rgba(var(--glow-rgb),0.2), 0 2px 8px rgba(0,0,0,0.4);
  cursor: grab;
  transition: transform var(--t-fast) var(--ease);
}
.slider::-webkit-slider-thumb:hover { transform: scale(1.1); }
.slider::-webkit-slider-thumb:active { cursor: grabbing; transform: scale(0.95); }
.slider::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--text);
  border: 3px solid var(--primary);
  cursor: grab;
}
.slider-ticks {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-faint);
}

/* Segmented control */
.segmented {
  display: flex;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  padding: 4px;
  gap: 2px;
  position: relative;
}
.segmented-btn {
  flex: 1;
  padding: 12px 16px;
  border-radius: var(--r-pill);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-dim);
  cursor: pointer;
  transition: all var(--t-fast) var(--ease);
  position: relative;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.segmented-btn:hover { color: var(--text); }
.segmented-btn.is-active {
  background: var(--primary);
  color: #FFFFFF;
  box-shadow: 0 4px 16px rgba(var(--glow-rgb), 0.32);
}
.segmented-btn .save {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  padding: 2px 6px;
  border-radius: var(--r-sm);
  background: var(--success-soft);
  color: var(--success);
  text-transform: uppercase;
}
.segmented-btn.is-active .save { background: rgba(255, 255, 255, 0.22); color: #FFFFFF; }

/* Stepper */
.stepper {
  display: inline-flex;
  align-items: center;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  overflow: hidden;
}
.stepper-btn {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  color: var(--text);
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--t-fast) var(--ease);
}
.stepper-btn:hover { background: var(--bg-card-hover); }
.stepper-value {
  min-width: 56px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}

/* Add-on toggle cards */
.addons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 600px) { .addons { grid-template-columns: 1fr; } }

.addon {
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-md);
  padding: 16px;
  cursor: pointer;
  transition: all var(--t-fast) var(--ease);
  position: relative;
}
.addon:hover { border-color: var(--primary-bright); }
.addon.is-on {
  background: rgba(var(--glow-rgb), 0.12);
  border-color: var(--primary);
  box-shadow: 0 0 0 1px var(--primary), 0 4px 24px rgba(var(--glow-rgb),0.16);
}
.addon.is-locked {
  opacity: 0.55;
  cursor: not-allowed;
  border-style: dashed;
}
.addon-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 8px;
  margin-bottom: 6px;
}
.addon-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.25;
}
.addon-price {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--brand-primary);
  white-space: nowrap;
}
.addon-desc { font-size: 12px; color: var(--text-muted); line-height: 1.4; }
.addon-lock-msg {
  margin-top: 8px;
  font-size: 11px;
  color: var(--warning);
  display: flex;
  align-items: center;
  gap: 6px;
}

.addon-check {
  width: 18px; height: 18px;
  border-radius: 6px;
  border: 1.5px solid var(--border-strong);
  display: grid; place-items: center;
  transition: all var(--t-fast) var(--ease);
}
.addon.is-on .addon-check {
  background: var(--primary);
  border-color: var(--primary);
}
.addon.is-on .addon-check svg { opacity: 1; }
.addon-check svg { opacity: 0; transition: opacity var(--t-fast) var(--ease); }

/* ---------- Studio right panel - price + breakdown ---------- */

.summary {
  position: sticky;
  top: 100px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-md);   /* 12px */
  padding: 32px;
  box-shadow: var(--shadow-sm);
}
.summary-eyebrow {
  font-family: var(--font-heading);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.summary-price {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 4px;
}
.summary-amount {
  font-family: var(--font-heading);
  font-size: 3.25rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-purple));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1;
  transition: filter 200ms var(--ease);
}
.summary-amount.is-pulsing { animation: pricePulse 600ms var(--ease-out); }
@keyframes pricePulse {
  0% { filter: brightness(1); transform: scale(1); }
  35% { filter: brightness(1.4); transform: scale(1.05); }
  100% { filter: brightness(1); transform: scale(1); }
}
.summary-period { color: var(--text-muted); font-size: 1rem; }
.summary-vs {
  font-size: 13px;
  color: var(--success);
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.summary-breakdown {
  padding-top: 20px;
  border-top: 1px solid var(--border);
  margin-bottom: 24px;
}
.breakdown-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  font-size: 13px;
}
.breakdown-row + .breakdown-row { border-top: 1px dashed var(--border); }
.breakdown-label { color: var(--text-dim); }
.breakdown-value { color: var(--text); font-family: var(--font-mono); font-weight: 600; }
.breakdown-row.is-discount .breakdown-value { color: var(--success); }
.breakdown-row.is-total {
  margin-top: 8px;
  padding-top: 14px;
  border-top: 1px solid var(--border-strong) !important;
  font-size: 15px;
  font-weight: 700;
}
.breakdown-row.is-total .breakdown-label { color: var(--text); font-weight: 700; }
.breakdown-row.is-total .breakdown-value { font-size: 16px; }

.summary-actions { display: flex; flex-direction: column; gap: 10px; }
.summary-action-note {
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.5;
}

/* Counter-offer "Smart Suggestion" card - uses brand teal #027D76 (--success).
   Teal reads as friendly/helpful, not alarming - matches the "here's a smart
   trade" voice better than the orange we had before. */
.counter {
  margin-top: 20px;
  padding: 18px;
  background: var(--success-soft);                /* #DDF0F1 */
  border: 1px solid rgba(2, 125, 118, 0.24);
  border-radius: var(--r-md);
  position: relative;
  animation: counterIn 480ms var(--ease-out);
}
@keyframes counterIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.counter-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-heading);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--success);                          /* #027D76 */
  font-weight: 700;
  margin-bottom: 8px;
}
.counter-eyebrow svg { stroke: var(--success); }
.counter-msg {
  font-size: 13.5px;
  color: var(--text);
  margin-bottom: 14px;
  line-height: 1.55;
}
.counter-msg strong { color: var(--brand-ink); font-weight: 700; }
.counter-cta {
  width: 100%;
  padding: 12px 16px;
  background: var(--success);                     /* #027D76 */
  color: #FFFFFF;
  border-radius: var(--r-pill);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all var(--t-fast) var(--ease);
}
.counter-cta:hover { background: #015F5A; transform: translateY(-1px); color: #FFFFFF; }

/* "Why this price" expandable panel */
.why-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 16px;
  padding: 6px 0;
  font-size: 13px;
  color: var(--primary-bright);
  cursor: pointer;
}
.why-toggle:hover { color: var(--brand-primary); }
.why-panel {
  margin-top: 12px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 400ms var(--ease);
}
.why-panel.is-open { max-height: 600px; }
.why-content {
  padding: 16px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  font-size: 12.5px;
  color: var(--text-dim);
  line-height: 1.6;
}
.why-content ul { margin: 8px 0 0; padding-left: 18px; }
.why-content li { margin-bottom: 6px; }
.why-content code {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 2px 6px;
  background: rgba(78,212,255,0.1);
  color: var(--brand-primary);
  border-radius: 4px;
}

/* Trust pill */
.trust-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: var(--brand-blue-tint);      /* #E7F4FF - more solid */
  border: 1px solid rgba(var(--glow-rgb), 0.18);
  border-radius: var(--r-pill);
  font-size: 12.5px;
  color: var(--brand-primary);
  font-weight: 600;
  margin-bottom: 24px;
}

/* ---------- Negotiation modal (counter-offer detail) ---------- */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(6, 10, 31, 0.78);
  backdrop-filter: blur(8px);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: backdropIn 280ms var(--ease-out);
}
.modal-backdrop.is-open { display: flex; }
@keyframes backdropIn { from { opacity: 0; } to { opacity: 1; } }
.modal {
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-2xl);
  padding: 40px;
  width: 100%;
  max-width: 720px;
  position: relative;
  animation: modalIn 420ms var(--ease-out);
}
@keyframes modalIn {
  from { opacity: 0; transform: translateY(20px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.modal-close {
  position: absolute;
  top: 20px; right: 20px;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--bg-card);
  display: grid;
  place-items: center;
  color: var(--text-dim);
  cursor: pointer;
  transition: all var(--t-fast) var(--ease);
}
.modal-close:hover { background: var(--bg-card-hover); color: var(--text); }
.modal-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: var(--success-soft);
  border: 1px solid rgba(2, 125, 118, 0.24);
  border-radius: var(--r-pill);
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--success);
  margin-bottom: 18px;
}
.modal h2 { font-size: 1.875rem; margin-bottom: 10px; }
.modal p { color: var(--text-dim); margin-bottom: 24px; }
.compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 28px;
}
@media (max-width: 640px) { .compare { grid-template-columns: 1fr; } }
.compare-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 24px;
}
.compare-card.is-new {
  border-color: var(--success);
  background: linear-gradient(180deg, rgba(2, 125, 118, 0.08), var(--bg-card));
}
.compare-eyebrow {
  font-family: var(--font-heading);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 12px;
}
.compare-card.is-new .compare-eyebrow { color: var(--success); }
.compare-price {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}
.compare-list {
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}
.compare-list li {
  display: flex;
  gap: 8px;
  font-size: 13px;
  color: var(--text-dim);
  padding: 6px 0;
}
.compare-list li.is-new { color: var(--text); font-weight: 600; }
.compare-list svg { flex-shrink: 0; margin-top: 2px; }
.modal-actions { display: flex; gap: 12px; justify-content: flex-end; flex-wrap: wrap; }

/* ---------- Final summary screen ---------- */

.success-burst {
  width: 72px; height: 72px;
  margin: 0 auto 24px;
  border-radius: 50%;
  background: var(--success-soft);
  border: 2px solid var(--success);
  display: grid;
  place-items: center;
  animation: burst 600ms var(--ease-out);
}
@keyframes burst {
  0% { transform: scale(0.6); opacity: 0; }
  60% { transform: scale(1.1); opacity: 1; }
  100% { transform: scale(1); }
}
.final {
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
}
.final-card {
  margin-top: 40px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-md);   /* 12px */
  padding: 40px;
  text-align: left;
  box-shadow: var(--shadow-lg); /* receipt-like depth - this card IS the deliverable */
}
.final-row {
  display: flex;
  justify-content: space-between;
  padding: 14px 0;
  font-size: 14px;
}
.final-row + .final-row { border-top: 1px solid var(--border); }

/* Inline favicon next to the website value in the receipt */
.final-favicon {
  display: inline-block;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #FFFFFF;
  box-shadow: 0 1px 3px rgba(var(--shadow-rgb), 0.12);
  padding: 2px;
  vertical-align: -4px;
  margin-right: 8px;
  object-fit: contain;
}
.final-row.is-total {
  margin-top: 8px;
  padding-top: 20px;
  border-top: 2px solid var(--border-strong) !important;
  font-size: 17px;
  font-weight: 700;
}
.final-label { color: var(--text-dim); }
.final-value { color: var(--text); font-family: var(--font-mono); font-weight: 600; }
.final-actions { display: flex; gap: 12px; justify-content: center; margin-top: 32px; flex-wrap: wrap; }

/* Procurement activity feed - appears on the receipt after sending */
.proc-feed {
  margin-top: 28px;
  padding: 22px 0 4px;
  border-top: 1px solid var(--border);
  display: none;
}
.proc-feed.is-visible { display: block; animation: feed-in 420ms var(--ease-out); }
@keyframes feed-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.proc-feed-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.proc-feed-eyebrow {
  font-family: var(--font-heading);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--text-muted);
}
.proc-feed-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: var(--brand-blue-tint);
  color: var(--brand-primary);
  font-size: 11px;
  font-family: var(--font-mono);
  border-radius: var(--r-pill);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.proc-feed-status.is-approved {
  background: var(--success-soft);
  color: var(--success);
}
.proc-feed-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.proc-feed-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13.5px;
  color: var(--text-dim);
  animation: feed-row-in 420ms var(--ease-out);
}
@keyframes feed-row-in {
  from { opacity: 0; transform: translateX(-6px); }
  to { opacity: 1; transform: translateX(0); }
}
.proc-feed-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--brand-primary);
  flex-shrink: 0;
  box-shadow: 0 0 0 3px rgba(var(--glow-rgb), 0.16);
}
.proc-feed-item.is-approved .proc-feed-dot {
  background: var(--success);
  box-shadow: 0 0 0 3px rgba(2, 125, 118, 0.18);
}
.proc-feed-label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.proc-feed-item.is-approved .proc-feed-label {
  color: var(--text);
  font-weight: 600;
}
.proc-feed-time {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  flex-shrink: 0;
}

/* Finalize button pulses gently once procurement has approved */
.final-actions .btn-primary.is-ready {
  animation: ready-pulse 1.8s ease-in-out infinite;
}
@keyframes ready-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(var(--glow-rgb), 0.35); }
  50%      { box-shadow: 0 0 0 10px rgba(var(--glow-rgb), 0); }
}

/* ---------- Misc utilities ---------- */

.row-between { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mb-16 { margin-bottom: 16px; }
.text-dim { color: var(--text-dim); }
.text-muted { color: var(--text-muted); }
.text-success { color: var(--success); }
.text-counter { color: var(--counter); }
.text-mono { font-family: var(--font-mono); }

/* ---------- User flow diagram ---------- */

.flow {
  display: flex;
  align-items: stretch;
  gap: 0;
  margin: 40px 0;
  flex-wrap: wrap;
}
.flow-step {
  flex: 1;
  min-width: 180px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 20px;
  position: relative;
}
.flow-step + .flow-step { margin-left: 14px; }
.flow-step::after {
  content: '';
  position: absolute;
  right: -14px;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 1px;
  background: var(--border-strong);
  z-index: 1;
}
.flow-step:last-child::after { display: none; }
.flow-step-num {
  font-family: var(--font-heading);
  font-size: 11px;
  color: var(--primary-bright);
  letter-spacing: 0.12em;
  margin-bottom: 8px;
}
.flow-step-title {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 6px;
}
.flow-step-desc { font-size: 12px; color: var(--text-dim); line-height: 1.5; }

@media (max-width: 900px) {
  .flow { flex-direction: column; }
  .flow-step + .flow-step { margin-left: 0; margin-top: 14px; }
  .flow-step::after { display: none; }
}

/* ===========================================================
   AI CO-PILOT
   =========================================================== */

/* Floating launcher button */
.copilot-fab {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 150;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 22px 10px 12px;
  background: #FFFFFF;
  color: var(--brand-ink);
  border-radius: var(--r-pill);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  box-shadow: 0 10px 30px rgba(var(--shadow-rgb), 0.16), 0 2px 6px rgba(var(--shadow-rgb), 0.08);
  cursor: pointer;
  transition: all var(--t-fast) var(--ease);
  border: 1px solid var(--border);
}
.copilot-fab strong { color: var(--brand-primary); font-weight: 700; }
.copilot-fab:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 36px rgba(var(--shadow-rgb), 0.22), 0 4px 10px rgba(var(--shadow-rgb), 0.10);
  border-color: var(--brand-primary);
}
.copilot-fab-mascot {
  width: 36px; height: 36px;
  display: grid; place-items: center;
  /* Periodic jump cycle: idle for most of the time, then an excited hop */
  animation: mascot-jump 7s cubic-bezier(0.34, 1.56, 0.64, 1) infinite;
}
.copilot-fab-mascot img {
  display: block;
  /* Gentle continuous bob nested inside the jump-cycle parent */
  animation: mascot-bob 3.6s ease-in-out infinite;
  transform-origin: center bottom;
}
/* Hover = "pet the mascot" - pause animations and scale up slightly */
.copilot-fab:hover .copilot-fab-mascot { animation-play-state: paused; }
.copilot-fab:hover .copilot-fab-mascot img {
  animation: mascot-wiggle 0.6s ease-in-out;
}
@keyframes mascot-bob {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50% { transform: translateY(-2px) rotate(2deg); }
}
@keyframes mascot-jump {
  /* 0-70%: stays in place - the idle stretch */
  0%, 70%, 100% { transform: translateY(0) scale(1); }
  /* 75-85%: hop up with a little squash-and-stretch */
  75% { transform: translateY(-3px) scale(1.05, 0.95); }   /* squash */
  80% { transform: translateY(-12px) scale(0.92, 1.08); }  /* peak - stretch */
  85% { transform: translateY(-3px) scale(1.05, 0.95); }   /* land */
  90% { transform: translateY(0) scale(1); }
}
@keyframes mascot-wiggle {
  0%, 100% { transform: rotate(-2deg); }
  25% { transform: rotate(-12deg); }
  50% { transform: rotate(0deg); }
  75% { transform: rotate(8deg); }
}
.copilot-fab.is-hidden { transform: translateY(120%); opacity: 0; pointer-events: none; }

/* AI invitation banner in studio */
.copilot-banner {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 22px;
  background: linear-gradient(135deg, rgba(var(--glow-rgb),0.10) 0%, rgba(78,212,255,0.06) 100%);
  border: 1px solid var(--border-primary);
  border-radius: var(--r-lg);
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
}
.copilot-banner::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(78,212,255,0.2), transparent 70%);
  pointer-events: none;
}
.copilot-banner-icon {
  flex-shrink: 0;
  width: 56px; height: 56px;
  display: grid; place-items: center;
  /* Same playful cycle as the FAB, but staggered so they don't jump in sync */
  animation: mascot-jump 7s cubic-bezier(0.34, 1.56, 0.64, 1) infinite;
  animation-delay: 2s;
}
.copilot-banner-icon img {
  display: block;
  animation: mascot-bob 3.6s ease-in-out infinite;
  animation-delay: 0.8s;
  transform-origin: center bottom;
}
.copilot-banner:hover .copilot-banner-icon { animation-play-state: paused; }
.copilot-banner:hover .copilot-banner-icon img { animation: mascot-wiggle 0.6s ease-in-out; }
.copilot-banner-eyebrow strong { color: var(--brand-primary); font-weight: 700; }
.copilot-banner-text { flex: 1; }
.copilot-banner-eyebrow {
  font-family: var(--font-heading);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brand-primary);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.copilot-banner-eyebrow::after {
  content: 'NEW';
  font-size: 9px;
  letter-spacing: 0.08em;
  padding: 2px 6px;
  background: var(--cyan);
  color: var(--bg);
  border-radius: 4px;
  font-weight: 700;
}
.copilot-banner-title { font-weight: 700; font-size: 15px; color: var(--text); }
.copilot-banner-sub { font-size: 13px; color: var(--text-dim); margin-top: 2px; }

/* Drawer */
.copilot-drawer {
  position: fixed;
  top: 0; right: 0;
  height: 100vh;
  width: 440px;
  max-width: 92vw;
  background: var(--bg-elevated);
  border-left: 1px solid var(--border-strong);
  box-shadow: -20px 0 60px rgba(0,0,0,0.4);
  z-index: 180;
  transform: translateX(100%);
  transition: transform 420ms var(--ease);
  display: flex;
  flex-direction: column;
}
.copilot-drawer.is-open { transform: translateX(0); }
.copilot-drawer-head {
  padding: 22px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.copilot-drawer-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 16px;
}
.copilot-drawer-title-mark {
  width: 36px; height: 36px;
  display: grid; place-items: center;
}
.copilot-drawer-title-mark img { display: block; }
.copilot-drawer-title strong { color: var(--brand-primary); font-weight: 700; }
.copilot-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: var(--success-soft);
  border: 1px solid rgba(0,229,160,0.32);
  border-radius: var(--r-pill);
  font-family: var(--font-heading);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--success);
}
.copilot-status.is-demo {
  background: var(--warning-soft);
  border-color: rgba(var(--counter-rgb),0.32);
  color: var(--warning);
}
.copilot-status-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 6px var(--success);
}
.copilot-status.is-demo .copilot-status-dot { background: var(--warning); box-shadow: 0 0 6px var(--warning); }

.copilot-close {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--bg-card);
  display: grid; place-items: center;
  color: var(--text-dim);
  cursor: pointer;
  transition: all var(--t-fast) var(--ease);
}
.copilot-close:hover { color: var(--text); background: var(--bg-card-hover); }

/* Conversation area */
.copilot-conv {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  scrollbar-width: thin;
  scrollbar-color: var(--border-strong) transparent;
}
.copilot-conv::-webkit-scrollbar { width: 6px; }
.copilot-conv::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 3px; }

.copilot-msg {
  display: flex;
  gap: 10px;
  animation: msgIn 380ms var(--ease-out);
}
@keyframes msgIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
.copilot-msg-avatar {
  width: 28px; height: 28px;
  border-radius: 8px;
  flex-shrink: 0;
  display: grid; place-items: center;
  font-size: 12px;
  font-weight: 700;
}
.copilot-msg.is-user .copilot-msg-avatar {
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  color: var(--text);
}
.copilot-msg.is-ai .copilot-msg-avatar {
  background: transparent;
  width: 32px; height: 32px;
}
.copilot-msg.is-ai .copilot-msg-avatar img { display: block; }
.copilot-msg-name span { font-weight: 700; }
.copilot-msg-body {
  flex: 1;
  padding-top: 4px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--text);
}
.copilot-msg.is-user .copilot-msg-body { color: var(--text-dim); font-style: italic; }
.copilot-msg-name {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 4px;
  font-family: var(--font-heading);
  letter-spacing: 0.04em;
}

/* Tool-use chips inside conversation */
.copilot-tool {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--brand-primary);
  margin: 6px 6px 6px 0;
  animation: toolIn 360ms var(--ease-out);
}
@keyframes toolIn {
  from { opacity: 0; transform: translateX(-6px); }
  to { opacity: 1; transform: translateX(0); }
}
.copilot-tool-icon {
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--cyan);
  display: grid; place-items: center;
  color: var(--bg);
  font-size: 9px;
}
.copilot-tool .copilot-tool-icon { animation: spin 0.7s linear; }
@keyframes spin { from { transform: rotate(0); } to { transform: rotate(360deg); } }

/* Thinking dots */
.copilot-thinking {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 8px 12px;
  background: var(--bg-card);
  border-radius: var(--r-md);
}
.copilot-thinking-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--text-muted);
  animation: thinkPulse 1.2s ease-in-out infinite;
}
.copilot-thinking-dot:nth-child(2) { animation-delay: 0.2s; }
.copilot-thinking-dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes thinkPulse {
  0%, 80%, 100% { opacity: 0.3; transform: scale(0.8); }
  40% { opacity: 1; transform: scale(1.1); }
}

/* Empty state with suggestion chips */
.copilot-empty {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 12px 4px;
}
.copilot-empty-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.25;
}
.copilot-empty-title .hero-gradient { font-family: inherit; }
.copilot-empty-sub { font-size: 13px; color: var(--text-dim); line-height: 1.5; }
.copilot-suggestions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}
.copilot-suggestion {
  padding: 12px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  font-size: 13px;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: all var(--t-fast) var(--ease);
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}
.copilot-suggestion:hover {
  border-color: var(--primary);
  background: var(--bg-card-hover);
  transform: translateX(2px);
}
.copilot-suggestion-icon {
  width: 24px; height: 24px;
  border-radius: 7px;
  background: rgba(var(--glow-rgb),0.16);
  display: grid; place-items: center;
  flex-shrink: 0;
}

/* Input area */
.copilot-input-wrap {
  padding: 16px 18px 18px;
  border-top: 1px solid var(--border);
  background: var(--bg-elevated);
}
.copilot-input-form {
  display: flex;
  gap: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-md);
  padding: 6px 6px 6px 14px;
  align-items: end;
  transition: border-color var(--t-fast) var(--ease);
}
.copilot-input-form:focus-within { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(var(--glow-rgb),0.14); }
.copilot-input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text);
  font-size: 14px;
  font-family: var(--font-body);
  resize: none;
  outline: none;
  padding: 10px 0;
  line-height: 1.5;
  max-height: 120px;
  min-height: 22px;
  overflow-y: auto;
  /* Fully hide scrollbar - keyboard/touch scrolling still works at max-height */
  scrollbar-width: none;       /* Firefox */
  -ms-overflow-style: none;    /* Legacy Edge / IE */
}
.copilot-input::-webkit-scrollbar { width: 0; height: 0; display: none; }
.copilot-input::placeholder { color: var(--text-muted); }
.copilot-send {
  width: 36px; height: 36px;
  border-radius: 9px;
  background: var(--primary);
  display: grid; place-items: center;
  color: #FFFFFF;
  cursor: pointer;
  transition: all var(--t-fast) var(--ease);
  flex-shrink: 0;
}
.copilot-send:hover { background: var(--brand-deep); color: #FFFFFF; }
.copilot-send:disabled { background: var(--border-strong); cursor: not-allowed; color: var(--text-muted); }

.copilot-foot {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 10px;
  text-align: center;
  line-height: 1.4;
}

/* Lever-pulse: visual feedback when AI changes a lever */
.lever.is-pulsing,
.addon.is-pulsing,
.segmented-btn.is-pulsing,
.stepper.is-pulsing {
  animation: leverPulse 900ms var(--ease-out);
}
@keyframes leverPulse {
  0% { box-shadow: 0 0 0 0 rgba(78,212,255,0.6); }
  60% { box-shadow: 0 0 0 12px rgba(78,212,255,0); }
  100% { box-shadow: 0 0 0 0 rgba(78,212,255,0); }
}

/* Mobile drawer adjustments */
@media (max-width: 720px) {
  .copilot-drawer {
    width: 100vw;
    max-width: 100vw;
    height: 88vh;
    top: auto;
    bottom: 0;
    border-left: none;
    border-top: 1px solid var(--border-strong);
    border-radius: 24px 24px 0 0;
    transform: translateY(100%);
  }
  .copilot-drawer.is-open { transform: translateY(0); }
  .copilot-fab { bottom: 20px; right: 20px; }
}

/* ---------- Print refinement ---------- */
@media (max-width: 600px) {
  .container { padding: 0 20px; }
  .section { padding: 80px 0; }
  .hero { padding: 140px 0 80px; }
  .intake-card { padding: 28px; }
  .levers, .summary, .offer-hero, .final-card { padding: 24px; }
  .nav-link { padding: 8px 12px; font-size: 13px; }
}
