/*
 * outmizer.css (outmizer-ds) v1.4.1, the design target for extension/styles.css.
 * It is styles.css v1.4.0 with two mechanical changes so it works on a normal page (":host" is
 * ":root", and the brand font loads from ./fonts/), plus the v1.4.1 changes listed at the end of this
 * file, decided 2026-10-08: the off-palette blue becomes Slate Blue, the missing hover and active
 * states are added, and one undefined variable is fixed. Apply the same changes to extension/styles.css.
 *
 * Version: 1.4.0 | Last updated: 2026-10-01 | Author: Outmizer
 * v1.4.0: The wordmark is 11 px tall (was 14) and may overflow its box (the stroke added in constants.js).
 *         The collapsed pill is 30 px tall (was 36) with tighter padding.
 *         .bubble__notice added — the "Your prompt changed" notice over a Phase 1 brief.
 *         The panel is now the containing block of the placeholder dropdowns (.ph-wrapper no
 *         longer is); placePhMenu() in bubble.js sets each menu's left/top.
 * v1.3.0: .phase1__output-controls added — fixed Output format / Output length
 *         section appended after all segments in the Phase 1 panel (owner
 *         decision 2026-07-07: the two guardians are permanent bubble UI).
 * v1.2.0: Brand update — spinning circle replaced with three-slash fade animation.
 *         Titillium Web (weight 600) added via @font-face for brand name.
 *         New icon set (SVG slash mark) replaces completing-circle brand mark.
 * v1.1.0: btn--outline style added for privacy banner secondary action button.
 *
 * FILE: styles.css
 * WHAT IT DOES: All visual styling for the Outmizer floating bubble.
 *               This file is injected into the shadow DOM root by bubble.js,
 *               which isolates every rule here from ChatGPT/Claude/Gemini's
 *               own stylesheets. Nothing leaks in or out.
 *
 * CONNECTS TO:
 *   - bubble.js   — injects this file into the shadow DOM via a <link> tag;
 *                   all class names here must match what bubble.js writes
 *   - manifest.json — listed in web_accessible_resources so bubble.js can
 *                     reference it via chrome.runtime.getURL('styles.css')
 *
 * IMPORTANT RULES:
 *   - NO external font imports here — shadow DOM cannot load Google Fonts.
 *     Product text uses the system stack (Segoe UI, system-ui, -apple-system); only the
 *     brand name uses a bundled face (Titillium Web SemiBold, weight 600).
 *   - This file styles ONLY the floating bubble injected into AI pages.
 *     The settings popup (popup.html) has its own inline styles.
 *   - Color palette is strictly enforced:
 *       #0F0E47  Midnight Navy  — headers, CTAs, text, pill
 *       #FFFFFF  White          — all backgrounds
 *       #4A6FA5  Slate Blue     — progress, hover, highlights, "all is well"
 *       #E8E6FF  Lavender White — input backgrounds, tints
 *       #E63946  Alert Red      — ONLY for critical states, warnings, gaps
 *       NO green. No purple gradients. No dark panel backgrounds.
 *       See Blueprint Section 22.
 *   - Animation speeds: 150–200ms for transitions, 300ms for the circle fill.
 *     Nothing slow or decorative. See Blueprint Section 22, Animation Principles.
 *
 * BLUEPRINT REFERENCES:
 *   - Full bubble spec:    Blueprint Section 10, Block 3
 *   - Color palette:       Blueprint Section 22
 *   - Typography:          Blueprint Section 22
 *   - Animation rules:     Blueprint Section 22
 *   - Component specs:     Blueprint Section 22, Component Visual Specs
 *   - Token bar:           Blueprint Section 10, Token Bar
 *   - Privacy banner:      Blueprint Section 10, Privacy Warning
 */

/* =============================================================================
   FONT STACK
   Shadow DOM cannot load Google Fonts externally.
   Product UI: Segoe UI, system-ui, -apple-system, sans-serif. Mono: Consolas, SF Mono, Fira Code.
   Brand name only: Titillium Web SemiBold (600), bundled below.
   See Blueprint Section 22 — Typography.
   ============================================================================= */

:root {
  /* CSS custom properties on the document root (the extension scopes them to the shadow host).
     These cascade into all children and serve as the single
     source of truth for every visual value in the bubble. */

  /* Brand colors */
  --color-navy:            #0F0E47;
  --color-white:           #FFFFFF;
  --color-slate-blue:      #4A6FA5;
  --color-lavender-white:  #E8E6FF;
  --color-alert-red:       #E63946;
  --color-text-soft:       #1a1a2e; /* Near-black for body text — softer than pure black */

  /* Opacity variants */
  --color-navy-06:   rgba(15, 14, 71, 0.06);
  --color-navy-08:   rgba(15, 14, 71, 0.08);
  --color-navy-10:   rgba(15, 14, 71, 0.10);
  --color-navy-12:   rgba(15, 14, 71, 0.12);
  --color-navy-15:   rgba(15, 14, 71, 0.15);
  --color-navy-20:   rgba(15, 14, 71, 0.20);
  --color-navy-40:   rgba(15, 14, 71, 0.40);
  --color-navy-45:   rgba(15, 14, 71, 0.45);
  --color-slate-20:  rgba(74, 111, 165, 0.20);
  --color-slate-15:  rgba(74, 111, 165, 0.15);
  --color-red-08:    rgba(230, 57, 70, 0.08);
  --color-red-30:    rgba(230, 57, 70, 0.30);

  /* Font stacks */
  --font-brand:   'Titillium Web', 'Segoe UI', system-ui, sans-serif; /* brand name only */
  --font-display: 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-body:    'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-mono:    'Consolas', 'SF Mono', 'Fira Code', monospace;

  /* Dimensions from bubble.js constants — must stay in sync */
  --bubble-width:        340px;
  --bubble-max-height:   520px;
  --bubble-radius:       16px;
  --pill-radius:         20px;
  --pill-height:         30px;
  --bubble-padding:      20px;

  /* Animation timing — see Blueprint Section 22 */
  --transition-expand:   180ms ease-out;
  --transition-collapse: 200ms ease-in-out;
  --transition-color:    150ms ease-out;
  --transition-bar:      300ms ease-out;
}

/* =============================================================================
   BRAND FONT — Titillium Web (weight 600)
   Loaded via @font-face with the bundled TTF file so it works inside
   the shadow DOM where Google Fonts @import is not accessible.
   Used ONLY for the brand name (.bubble__brand, .bubble__pill-label).
   All other UI text stays on the system font stack.
   ============================================================================= */

@font-face {
  font-family: 'Titillium Web';
  src: url('./fonts/TitilliumWeb-SemiBold.ttf') format('truetype');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

/* =============================================================================
   BRAND SLASH ANIMATION — Three-slash fade pulse
   Replaces the old spinning circle / completing circle brand mark.
   Used in: LOADING state, WATCHING state, PHASE_2 state (bubble.js).
   See ANIMATION-SPEC.css for full spec reference.
   ============================================================================= */

.outmizer-slash-group {
  display: flex;
  align-items: center;
  gap: 4px;
  padding-left: 4px; /* prevents left-edge clip from skewX transform */
}

.outmizer-slash {
  border-radius: 1px;
  transform: skewX(-18deg);
  flex-shrink: 0;
  background: #FFFFFF; /* white slashes inside navy bubble */
}

/* Navy slashes (for placement on white/light backgrounds) */
.outmizer-slash--navy { background: #0F0E47; }

/* Size variants */
.outmizer-slash-group--128 .outmizer-slash { width: 11px;  height: 46px; }
.outmizer-slash-group--48  .outmizer-slash { width: 5px;   height: 18px; }
.outmizer-slash-group--32  .outmizer-slash { width: 3.5px; height: 12px; }
.outmizer-slash-group--16  .outmizer-slash { width: 2px;   height: 6px;  }

/* Fade pulse keyframe — three slashes fade in sequentially left to right */
@keyframes outmizer-slash-fade {
  0%   { opacity: 0.12; }
  33%  { opacity: 1;    }
  66%  { opacity: 0.12; }
  100% { opacity: 0.12; }
}

.outmizer-slash-group--animated .outmizer-slash {
  animation: outmizer-slash-fade 1.6s ease-in-out infinite;
}

.outmizer-slash-group--animated .outmizer-slash:nth-child(1) { animation-delay: 0s;    }
.outmizer-slash-group--animated .outmizer-slash:nth-child(2) { animation-delay: 0.25s; }
.outmizer-slash-group--animated .outmizer-slash:nth-child(3) { animation-delay: 0.50s; }

/* Bubble icon container (for standalone brand icon usage) */
.outmizer-bubble-icon {
  border-radius: 50%;
  background: #0F0E47;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.outmizer-bubble-icon--light {
  background: #FFFFFF;
}

/* =============================================================================
   RESET
   Scoped inside shadow DOM — won't affect the host page.
   ============================================================================= */

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

/* =============================================================================
   BUBBLE CONTAINER — the root element inside the shadow DOM
   Two states: .bubble--pill (collapsed) and .bubble--expanded (full panel)
   See Blueprint Section 10, Block 3 — Canvas Structure
   ============================================================================= */

.bubble {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--color-navy);
  background: var(--color-white);
  border-radius: var(--pill-radius);
  overflow: hidden;
  /* Smooth transition between pill and expanded panel */
  transition:
    border-radius var(--transition-expand),
    box-shadow    var(--transition-expand);
}

/* PILL STATE — collapsed, always visible in bottom-right corner */
.bubble--pill {
  border: 1px solid var(--color-navy-12);
  box-shadow: 0 2px 12px var(--color-navy-08);
  border-radius: var(--pill-radius);
}

/* Hide the full panel when in pill state — only the pill div is visible */
.bubble--pill .bubble__panel {
  display: none;
}

/* EXPANDED STATE — full panel with all phase content */
.bubble--expanded {
  width: var(--bubble-width);
  max-width: 100%;
  max-height: var(--bubble-max-height);
  border: 1px solid var(--color-navy-10);
  box-shadow: 0 8px 32px var(--color-navy-12);
  border-radius: var(--bubble-radius);
  /* Containing block of the placeholder dropdowns (see placePhMenu() in bubble.js). */
  position: relative;
  overflow-y: auto;
  /* Without this, overflow-x implicitly computes to 'auto' (CSS spec: an
     axis left at 'visible' resolves to 'auto' once the other axis is not
     'visible'). A placeholder dropdown positioned near the panel's right
     edge would then overflow horizontally, and focusing its "Write your
     own..." input made the browser auto-scroll the panel sideways to reveal
     it -- the whole panel visibly "pushed" left. Reported live 2026-07-13. */
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: var(--color-slate-blue) transparent;
}

/* Hide the pill when the full panel is showing */
.bubble--expanded .bubble__pill {
  display: none;
}

.bubble--expanded::-webkit-scrollbar {
  width: 4px;
}

.bubble--expanded::-webkit-scrollbar-track {
  background: transparent;
}

.bubble--expanded::-webkit-scrollbar-thumb {
  background: var(--color-slate-20);
  border-radius: 2px;
}

/* =============================================================================
   PILL — the collapsed state icon + label
   See Blueprint Section 22 — DEFAULT STATE
   ============================================================================= */

.bubble__pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 12px;
  height: var(--pill-height);
  cursor: pointer;
  user-select: none;
}

/* Live status dot — breathing blue in idle/ready, hidden in active states */
.bubble__pill-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-slate-blue);
  flex-shrink: 0;
  transition: opacity 200ms ease;
}

@keyframes dot-breathe {
  0%, 100% { opacity: .5; }
  50%       { opacity: 1; }
}

.bubble__pill-dot--breathing {
  animation: dot-breathe 2.2s ease-in-out infinite;
}

.bubble__pill-dot--hidden {
  opacity: 0;
  pointer-events: none;
}

.bubble__pill-icon {
  font-size: 14px;
  color: var(--color-navy);
  line-height: 1;
  flex-shrink: 0;
}

/* Outmizer wordmark (SVG) in the header and the collapsed pill. 11 px: the small version of the
   logo with a thin stroke (constants.js), sized to sit beside the slashes without dominating a panel. */
.outmizer-wordmark {
  display: block;
  overflow: visible;
  height: 11px;
  width: auto;
  flex-shrink: 0;
}

.bubble__pill-label {
  display: flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-brand);
  font-weight: 600;
  font-size: 13px;
  color: var(--color-navy);
  letter-spacing: -0.1px;
  white-space: nowrap;
}

/* Divider between brand name and hint text */
.bubble__pill-divider {
  width: 1px;
  height: 11px;
  background: rgba(15, 14, 71, 0.15);
  flex-shrink: 0;
}

/* Hint text — "Ready" in idle, hidden in active states */
.bubble__pill-hint {
  font-size: 11px;
  color: rgba(15, 14, 71, 0.38);
  white-space: nowrap;
  font-family: var(--font-body);
}

.bubble__pill-hint--hidden {
  display: none;
}

/* READY STATE pulse — single animation, never loops
   See Blueprint Section 8 — single subtle pulse, draws attention once */
.bubble__pill--pulse {
  animation: pill-pulse 500ms ease-out 1 forwards;
}

@keyframes pill-pulse {
  0%   { box-shadow: 0 2px 12px var(--color-navy-08); }
  50%  { box-shadow: 0 0 0 4px rgba(74, 111, 165, 0.20); }
  100% { box-shadow: 0 2px 12px var(--color-navy-08); }
}

/* ACTIVE PULSE BORDER — shown on bubble during loading, watching, evaluating.
   Communicates "Outmizer is working" without any text needed.
   Stops immediately when result is shown. */
@keyframes active-pulse {
  0%   { box-shadow: 0 0 0 3px rgba(74,111,165,0.15), 0 0 12px rgba(74,111,165,0.10); }
  50%  { box-shadow: 0 0 0 5px rgba(74,111,165,0.08), 0 0 22px rgba(74,111,165,0.20); }
  100% { box-shadow: 0 0 0 3px rgba(74,111,165,0.15), 0 0 12px rgba(74,111,165,0.10); }
}

/* Applied to .bubble--pill and .bubble--expanded when Outmizer is active */
.bubble--active-pulse {
  border-color: var(--color-slate-blue) !important;
  animation: active-pulse 2.5s ease-in-out infinite;
}

/* IDLE PULSE BORDER — steady gentle pulse on idle pill */
@keyframes idle-pulse {
  0%   { box-shadow: 0 0 0 2px rgba(74,111,165,0.10), 0 0 8px rgba(74,111,165,0.07); }
  50%  { box-shadow: 0 0 0 3px rgba(74,111,165,0.06), 0 0 14px rgba(74,111,165,0.13); }
  100% { box-shadow: 0 0 0 2px rgba(74,111,165,0.10), 0 0 8px rgba(74,111,165,0.07); }
}

.bubble--idle-pulse {
  border-color: var(--color-slate-blue) !important;
  animation: idle-pulse 3s ease-in-out infinite;
}

/* =============================================================================
   PANEL STRUCTURE — fixed header, variable content, fixed footer
   See Blueprint Section 10, Block 3 — Canvas Structure: Fixed vs Variable
   ============================================================================= */

.bubble__panel {
  display: flex;
  flex-direction: column;
  min-height: var(--pill-height);
}

/* FIXED HEADER — brand name + close button, always present */
.bubble__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px var(--bubble-padding) 10px;
  flex-shrink: 0;
}

/* Brand name + industry switcher — left side of header row */
.bubble__brand-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0; /* Prevents flex overflow */
}

.bubble__brand {
  font-family: var(--font-brand);
  font-weight: 600;
  font-size: 15px;
  color: var(--color-navy);
  letter-spacing: -0.2px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.bubble__header-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.bubble__minimize-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 18px;
  font-weight: 300;
  color: var(--color-navy-40);
  line-height: 1;
  padding: 2px 6px;
  border-radius: 4px;
  transition: color var(--transition-color),
              background var(--transition-color);
}

.bubble__minimize-btn:hover {
  color: var(--color-navy);
  background: var(--color-navy-06);
}

.bubble__close-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 18px;
  color: var(--color-navy-40);
  line-height: 1;
  padding: 2px 4px;
  border-radius: 4px;
  transition: color var(--transition-color),
              background var(--transition-color);
}

.bubble__close-btn:hover {
  color: var(--color-navy);
  background: var(--color-navy-06);
}

/* PHASE DOTS — ● ○ ○ → ● ● ○ → ● ● ●
   See Blueprint Section 10 — Phase dots: 6px, 8px gap, centered */
.bubble__phase-dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  padding-bottom: 14px;
  flex-shrink: 0;
}

.phase-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-lavender-white);
  transition: background var(--transition-color);
}

.phase-dot--active {
  background: var(--color-navy);
}

/* VARIABLE CONTENT AREA — swapped by phase renderers in bubble.js */
.bubble__content {
  padding: 0 var(--bubble-padding) 14px;
  flex: 1;
  min-height: 0;
}

/* FIXED FOOTER — cycle bar, always visible at bottom of expanded panel
   See Blueprint Section 10, Block 3 — Token Bar (Fixed Footer) */
.bubble__footer {
  padding: 12px var(--bubble-padding) 16px;
  border-top: 1px solid var(--color-navy-06);
  flex-shrink: 0;
}

/* =============================================================================
   CYCLE BAR (TOKEN BAR)
   Shows cycles remaining as a filled bar + text label.
   Normal state: Slate Blue. Warning state (≤30%): Alert Red.
   See Blueprint Section 10, Block 3 — Token Bar
   ============================================================================= */

.cycle-bar {
  height: 4px;
  background: var(--color-navy-08);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 6px;
}

.cycle-bar__fill {
  height: 100%;
  background: var(--color-slate-blue);
  border-radius: 2px;
  /* Smooth width transition when cycle count updates */
  transition: width var(--transition-bar),
              background var(--transition-color);
}

/* Warning state — turns red at ≤30% cycles remaining */
.cycle-bar__fill--warning {
  background: var(--color-alert-red);
}

.cycle-bar__label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 300;
  color: var(--color-navy-45);
  letter-spacing: 0.2px;
}

.cycle-bar__label--warning {
  color: var(--color-alert-red);
}

/* =============================================================================
   LOADING COMMANDS — shown during LOADING and PHASE_2 states
   Progressive command list: done (green tick), active (spinning), pending (muted)
   ============================================================================= */

.loading-stage {
  padding: 14px 18px 16px;
}

.loading-stage__label {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: rgba(15, 14, 71, 0.32);
  margin-bottom: 12px;
  display: block;
  font-family: var(--font-body);
}

.cmd-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cmd {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  /* Body font, not monospace (changed 2026-07-14): the step lines read as
     product copy, not terminal output -- Segoe UI matches the rest of the
     panel. The technical mono accent lives on the numbers instead (cycle
     counter, score labels), which keep var(--font-mono). */
  font-family: var(--font-body);
  line-height: 1.4;
  color: rgba(15, 14, 71, 0.25);
}

.cmd--done {
  color: rgba(15, 14, 71, 0.38);
}

.cmd--active {
  color: var(--color-navy);
  font-weight: 500;
}

.cmd__check {
  color: #1D9E75;
  font-size: 10px;
  flex-shrink: 0;
  width: 12px;
  text-align: center;
}

.cmd__dash {
  color: rgba(15, 14, 71, 0.2);
  flex-shrink: 0;
  width: 12px;
  text-align: center;
}

/* .cmd--active uses .outmizer-slash-group--animated inline — no separate spinner rule needed */
.cmd .outmizer-slash-group { padding-left: 0; flex-shrink: 0; }

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

.cmd__cursor {
  animation: cmd-cursor-blink 0.7s ease-in-out infinite;
  margin-left: 1px;
}

/* =============================================================================
   PHASE 1 — ENHANCEMENT PANEL
   Clarity score label, gap list, enhanced prompt box, action buttons.
   See Blueprint Section 10, Block 3 — Phase 1 Enhancement
   ============================================================================= */

/* Customization Score — pinned inside actions bar, always visible */
.phase1__cust-score {
  border-top: 1px solid rgba(15,14,71,0.08);
  padding: 10px 0 8px;
  margin-bottom: 10px;
}

.phase1__cust-score-title {
  display: block;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.7px;
  text-transform: uppercase;
  color: rgba(15,14,71,0.35);
  margin-bottom: 5px;
}

.phase1__cust-score-row {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 4px;
}

.phase1__strength-number {
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
  min-width: 22px;
  transition: color 0.3s ease;
  display: inline-block;
  color: #9CA3AF;
}

.phase1__cust-score-bar-wrap {
  flex: 1;
  height: 4px;
  background: rgba(15,14,71,0.08);
  border-radius: 2px;
  overflow: hidden;
}

.phase1__cust-score-bar {
  display: block;
  height: 100%;
  border-radius: 2px;
  width: 0%;
  transition: width 0.35s ease, background 0.3s ease;
  background: #9CA3AF;
}

.phase1__cust-score-max {
  font-family: var(--font-mono);
  font-size: 11px;
  color: rgba(15,14,71,0.3);
}

.phase1__strength-label {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.2px;
  color: #9CA3AF;
  transition: color 0.3s ease;
  display: block;
}

@keyframes strength-pop {
  0%   { transform: scale(1);    }
  40%  { transform: scale(1.28); }
  100% { transform: scale(1);    }
}

.strength-pop {
  animation: strength-pop 0.28s ease-out forwards;
}

/* Legacy clarity score styles — kept for any older code paths */
.phase1__score { margin-bottom: 10px; }
.phase1__score-label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 300;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

/* Gap list — max 3 items, colored dot + one sentence each */
.phase1__gaps {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}

/* Enhanced prompt — clean white surface, no box, content breathes freely.
   The "expert brief" model means each block is a paragraph, not a list item.
   Scrollable when content exceeds max-height. */
.phase1__enhanced-prompt {
  background: transparent;
  border: none;
  border-top: 1px solid rgba(15, 14, 71, 0.08);
  border-radius: 0;
  padding: 14px 0 0 0;
  font-size: 13px;
  font-family: var(--font-body);
  color: var(--color-text-soft);
  line-height: 1.65;
  margin-bottom: 14px;
}

.phase1__enhanced-prompt::-webkit-scrollbar {
  width: 3px;
}

.phase1__enhanced-prompt::-webkit-scrollbar-thumb {
  background: rgba(15, 14, 71, 0.12);
  border-radius: 2px;
}

/* Section label — "THE EXCELLENT VERSION OF THIS EMAIL DOES THREE THINGS"
   Tiny, muted, uppercase. Organizes without competing with content. */
.phase1__brief-label {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: rgba(15, 14, 71, 0.38);
  font-family: var(--font-body);
  margin-bottom: 10px;
  display: block;
}

/* Each requirement block — paragraph with breathing room below.
   No bullet points. Each block reads as its own expert instruction. */
.phase1__req-block {
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(15, 14, 71, 0.06);
}

.phase1__req-block:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

/* =============================================================================
   HIGHLIGHT SEGMENTS — Feature 1 / Blueprint Section 37
   Pill tag + warm color system.
   Each requirement block has a pill tag on its own line above the instruction.
   required    → amber pill    — must include for output to work well
   suggested   → green pill    — nice to have, improves quality
   placeholder → red italic    — user must fill this in themselves
   ============================================================================= */

/* Pill tag — sits above each instruction block, never inline */
.segment-pill {
  display: inline-flex;
  align-items: center;
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  border-radius: 20px;
  padding: 2px 8px;
  margin-bottom: 5px;
}

.segment-pill--required {
  background: rgba(251, 191, 36, 0.25);
  color: #7a5200;
}

.segment-pill--suggested {
  background: rgba(29, 158, 117, 0.15);
  color: #0a5c42;
}

/* Inline segment marks — kept for backwards compat but now minimal */
.segment--required {
  color: inherit;
}

.segment--suggested {
  color: inherit;
}

/* Placeholder — red italic, clearly needs user input */
.segment--placeholder {
  color: #C0392B;
  font-style: italic;
  font-weight: 500;
  background: transparent;
  padding: 0;
  border-radius: 0;
}

/* ── PLACEHOLDER DROPDOWN ─────────────────────────────────────────────────── */
.ph-wrapper {
  display: inline;
}

.ph-trigger {
  color: #C0392B;
  font-style: italic;
  font-weight: 500;
  cursor: pointer;
  border-bottom: 1px dashed rgba(192, 57, 43, 0.45);
  transition: opacity 0.12s;
}

.ph-caret {
  font-style: normal;
  font-size: 13px;
  line-height: 1;
  opacity: 0.85;
  margin-left: 2px;
  vertical-align: middle;
  display: inline-block;
}

.ph-trigger:hover {
  opacity: 0.75;
}

.ph-trigger--filled {
  color: #0a5c42;
  font-style: normal;
  font-weight: 500;
  border-bottom: 1px solid rgba(10, 92, 66, 0.3);
}

.ph-menu {
  display: none;
  position: absolute;
  z-index: 200;
  background: #ffffff;
  border: 1px solid rgba(15, 14, 71, 0.13);
  border-radius: 8px;
  box-shadow: 0 4px 18px rgba(15, 14, 71, 0.13);
  min-width: 210px;
  max-width: 270px;
  overflow: hidden;
}

.ph-menu--open {
  display: block;
}

/* Placement is JS-driven: placePhMenu() in bubble.js sets left/top in px inside the panel
   (.bubble--expanded, the containing block) and caps max-width to the panel's inner width, so
   the menu sits fully inside the panel whatever the trigger's position or line wrapping. */

.ph-menu__option {
  padding: 8px 12px;
  font-size: 12px;
  line-height: 1.4;
  color: rgba(15, 14, 71, 0.82);
  cursor: pointer;
  font-style: normal;
}

.ph-menu__option:hover {
  background: rgba(15, 14, 71, 0.05);
}

.ph-menu__option--selected {
  color: #0a5c42;
  font-weight: 500;
  background: rgba(29, 158, 117, 0.07);
}

.ph-menu__divider {
  height: 1px;
  background: rgba(15, 14, 71, 0.08);
  margin: 3px 0;
}

.ph-menu__write {
  padding: 6px 10px 8px;
}

.ph-menu__input {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid rgba(15, 14, 71, 0.18);
  border-radius: 5px;
  padding: 5px 8px;
  font-size: 12px;
  font-family: var(--font-body);
  color: rgba(15, 14, 71, 0.85);
  outline: none;
  background: #fff;
}

.ph-menu__input::placeholder {
  color: rgba(15, 14, 71, 0.35);
}

.ph-menu__input:focus {
  border-color: rgba(15, 14, 71, 0.42);
}

/* ── NICE-TO-HAVE TOGGLE ──────────────────────────────────────────────────── */
.ph-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  border-radius: 20px;
  padding: 2px 7px;
  cursor: pointer;
  user-select: none;
  border: none;
  background: rgba(192, 57, 43, 0.12);
  color: #C0392B;
  font-family: var(--font-body);
  margin-left: 6px;
  vertical-align: middle;
}

.ph-toggle--skipped {
  background: rgba(29, 158, 117, 0.15);
  color: #0a5c42;
}

.ph-toggle__dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}

.phase1__req-block--skipped {
  opacity: 0.35;
}

.phase1__req-block--skipped .ph-toggle {
  opacity: 1;
}

/* A dropdown living inside a skipped nice-to-have block is excluded from the
   paste along with its block -- letting the user open/fill it while skipped
   would be a lie. Inert until the block is included again ("include this"). */
.phase1__req-block--skipped .ph-wrapper {
  pointer-events: none;
}

/* Fixed Output Controls — Output format / Output length (v1.3.0)
   Permanent bubble UI appended after all segments, before the legend.
   The two guardians against unwanted formats and bloated answers: always
   present, always the last two taps before "Use this prompt". A slightly
   heavier top border separates them from the model-generated brief above. */
.phase1__output-controls {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--color-navy-12);
}

.phase1__output-controls .phase1__req-block {
  margin-bottom: 8px;
  padding-bottom: 8px;
}

/* Legend row */
.segment-legend {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0 12px;
  flex-wrap: wrap;
}

.legend__item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  color: rgba(15, 14, 71, 0.38);
  font-family: var(--font-body);
}

.legend__swatch {
  width: 8px;
  height: 8px;
  border-radius: 10px;
  flex-shrink: 0;
}

.legend__swatch--required {
  background: rgba(251, 191, 36, 0.5);
}

.legend__swatch--suggested {
  background: rgba(29, 158, 117, 0.35);
}

.legend__swatch--placeholder {
  background: rgba(192, 57, 43, 0.30);
}

/* Legacy [ADDED: x] marker — kept for any cached old-format responses */
.enhanced-addition {
  background: var(--color-slate-15);
  border-radius: 2px;
  padding: 0 2px;
  color: inherit;
}

/* Three action buttons row */
.phase3-pass__review-note,
.phase3-gaps__review-note {
  font-size: 11px;
  color: var(--color-navy-40);
  font-family: var(--font-body);
  line-height: 1.5;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--color-navy-06);
}

.phase3-pass__privacy-note {
  font-size: 11px;
  color: var(--color-alert-red);
  font-family: var(--font-body);
  line-height: 1.5;
  margin-top: 6px;
}

.phase1__actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* =============================================================================
   PHASE 2 — EVALUATING
   Completing circle animation + use-case-specific status text.
   See Blueprint Section 10, Block 3 — Phase 2 Evaluating
   ============================================================================= */

.phase2__evaluating {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 0 10px;
  gap: 16px;
}

/* Phase 2 animation container — holds the three-slash fade group */
.phase2__circle-animation {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Use-case-specific status text — "Checking your email..." etc.
   See Blueprint Section 10 — never generic, always specific */
.phase2__status-text {
  font-size: 13px;
  font-family: var(--font-body);
  color: var(--color-navy-45);
  text-align: center;
}

/* =============================================================================
   PHASE 3 PASS — VERDICT, OUTPUT DELIVERED
   Warm verdict sentence + review note + "Looks good" button.
   Auto-collapses after 8s. See Blueprint Section 10, Block 3 — Phase 3 Pass
   ============================================================================= */

/* Full cycle completion banner — shown at top of Phase 3 pass verdict */
.phase3-pass__cycle-complete {
  font-size: 11px;
  font-weight: 500;
  color: #1D9E75;
  letter-spacing: 0.1px;
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(29, 158, 117, 0.15);
  font-family: var(--font-body);
}

.phase3-pass {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.phase3-pass__verdict {
  font-size: 13px;
  font-family: var(--font-body);
  color: var(--color-navy);
  line-height: 1.55;
}

/* Review note — always appended, never removed
   Warm, not cautionary. See Blueprint Section 10. */
.phase3-pass__review-nudge {
  font-size: 11px;
  color: var(--color-navy-40);
  margin-top: 8px;
  text-align: center;
}

.phase3-pass__review-nudge .btn--link {
  background: none;
  border: none;
  padding: 0;
  font-size: 11px;
  color: var(--color-slate-blue);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
  font-family: inherit;
}

.phase3-pass__review-note {
  font-size: 12px;
  font-family: var(--font-body);
  color: var(--color-navy-45);
  line-height: 1.5;
}

.phase3-pass__actions {
  margin-top: 4px;
}

/* =============================================================================
   PHASE 3 GAPS — VERDICT WITH CORRECTION NEEDED
   Verdict sentence + gap list + correction prompt box + two buttons.
   NEVER auto-collapses. See Blueprint Section 10, Block 3 — Phase 3 Gaps
   ============================================================================= */

.phase3-gaps {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.phase3-gaps__verdict {
  font-size: 13px;
  font-family: var(--font-body);
  color: var(--color-navy);
  line-height: 1.55;
}

.phase3-gaps__gap-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Correction prompt box — scrollable, same style as enhanced prompt box
   See Blueprint Section 10 — Background: #E8E6FF, max-height 120px */
.phase3-gaps__correction-prompt {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.phase3-gaps__correction-label {
  font-size: 11px;
  font-family: var(--font-mono);
  font-weight: 300;
  color: var(--color-navy-45);
  letter-spacing: 0.2px;
  text-transform: uppercase;
}

.phase3-gaps__correction-text {
  background: var(--color-lavender-white);
  border: 1px solid var(--color-slate-20);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 13px;
  font-family: var(--font-body);
  color: var(--color-text-soft);
  line-height: 1.55;
  max-height: 120px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--color-slate-blue) transparent;
}

.phase3-gaps__correction-text::-webkit-scrollbar {
  width: 3px;
}

.phase3-gaps__correction-text::-webkit-scrollbar-thumb {
  background: var(--color-slate-20);
  border-radius: 2px;
}

.phase3-gaps__actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* =============================================================================
   GAP ITEMS — used in Phase 1 and Phase 3 Gaps
   Colored dot (red = high impact, blue = medium) + one plain sentence.
   See Blueprint Section 22 — Gap Items component spec
   ============================================================================= */

.gap-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  /* Start invisible — animateGapItemsIn() adds .gap-item--visible */
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 200ms ease-out, transform 200ms ease-out;
  /* Each item delays by index * GAP_STAGGER_DELAY_MS (set inline by bubble.js) */
  transition-delay: var(--gap-delay, 0ms);
}

/* Triggered by animateGapItemsIn() — staggered fade in */
.gap-item--visible {
  opacity: 1;
  transform: translateY(0);
}

.gap-item__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 4px; /* Aligns dot with first line of text */
  /* Background color set inline by bubble.js based on impact level */
}

.gap-item__text {
  font-size: 13px;
  font-family: var(--font-body);
  color: var(--color-text-soft);
  line-height: 1.6;
}

/* =============================================================================
   READY TO CHECK
   Shown after Phase 2 text-growth detection fires — Blueprint Section 8
   ============================================================================= */

.ready-to-check {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 8px 0 4px;
  text-align: center;
}

.ready-to-check__message {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-navy);
  margin: 0;
  font-family: var(--font-body);
}

/* =============================================================================
   ARTIFACT ALERT STATE
   Passive message shown when artifact/canvas panel detected.
   Auto-hides after 10s. See Blueprint Section 8 — ARTIFACT ALERT
   ============================================================================= */

.artifact-alert {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px 0;
}

.artifact-alert__message {
  font-size: 13px;
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--color-navy);
}

.artifact-alert__sub {
  font-size: 12px;
  font-family: var(--font-body);
  color: var(--color-navy-45);
  line-height: 1.5;
}

/* =============================================================================
   PRIVACY WARNING BANNER
   Red tint, shown ABOVE Phase 1 results when privacy_flag = true.
   See Blueprint Section 10 — Privacy Warning (Integrated Into Phase 1)
   ============================================================================= */

.privacy-banner {
  background: var(--color-red-08);
  border: 1px solid var(--color-red-30);
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 14px;
  /* Slides down from top when it appears */
  animation: privacy-slide-in 150ms ease-out forwards;
}

@keyframes privacy-slide-in {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.privacy-banner__text {
  font-size: 12px;
  font-family: var(--font-body);
  color: var(--color-alert-red);
  line-height: 1.55;
  margin-bottom: 10px;
}

.privacy-banner__actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Second-stage copy reminder — shown when user copies enhanced prompt */
.privacy-copy-reminder {
  background: var(--color-red-08);
  border: 1px solid var(--color-red-30);
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.privacy-copy-reminder__text {
  font-size: 12px;
  font-family: var(--font-body);
  color: var(--color-alert-red);
  line-height: 1.5;
}

/* =============================================================================
   LAYER 1 PRE-SEND PRIVACY CHECK (PRIVACY_CHECK state) — v2.5.0
   Full panel shown when the on-device scan finds sensitive data at
   Enhance-click time, BEFORE any network request. Red is correct here:
   this is a critical warning state (design rule: Alert Red only for
   critical states, warnings, gaps).
   ============================================================================= */

.privacy-check__alert {
  background: var(--color-red-08);
  border: 1px solid var(--color-alert-red);
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 14px;
  animation: privacy-slide-in 150ms ease-out forwards;
}

.privacy-check__title {
  font-size: 13px;
  font-weight: 700;
  font-family: var(--font-body);
  color: var(--color-alert-red);
  margin-bottom: 4px;
}

.privacy-check__sub {
  font-size: 12px;
  font-family: var(--font-body);
  color: var(--color-alert-red);
  line-height: 1.55;
}

.privacy-check__section-label {
  font-size: 11px;
  font-weight: 600;
  font-family: var(--font-body);
  color: var(--color-slate-blue);
  letter-spacing: 0.4px;
  margin-bottom: 6px;
}

.privacy-check__list {
  border: 1px solid var(--color-red-30);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 12px;
}

.privacy-check__row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  cursor: pointer;
}

/* v2.6.0: don't offer a pointer cursor over a row whose checkbox is locked.
   :has() is safe here -- Chrome-only extension surface, supported since 105. */
.privacy-check__row:has(.privacy-check__checkbox:disabled) {
  cursor: default;
}

.privacy-check__row + .privacy-check__row {
  border-top: 1px solid var(--color-red-08);
}

.privacy-check__checkbox {
  accent-color: var(--color-navy);
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  cursor: pointer;
}

/* v2.6.0: policy-locked checkboxes -- always checked, cannot be unticked.
   cursor: default signals "locked", not "clickable but currently off". */
.privacy-check__checkbox:disabled {
  cursor: default;
  opacity: 0.7;
}

.privacy-check__label {
  font-size: 12px;
  font-family: var(--font-body);
  color: var(--color-text-soft);
  white-space: nowrap;
}

/* The detected value chip. Mono for the numeric-accent convention; red text
   because this IS the risky content; lavender tint keeps it readable.
   Long values (JWTs) get truncated with an ellipsis instead of breaking layout. */
.privacy-check__value {
  margin-left: auto;
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--color-alert-red);
  background: var(--color-lavender-white);
  padding: 2px 7px;
  border-radius: 6px;
  max-width: 170px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.privacy-check__note {
  font-size: 11px;
  font-family: var(--font-body);
  color: var(--color-navy-45);
  line-height: 1.5;
  margin-bottom: 12px;
}

/* Attachment rows are informational -- no checkbox, no pointer cursor.
   Outmizer checks only the file NAME; contents are never touched. */
.privacy-check__row--file {
  cursor: default;
}

.privacy-check__file-icon {
  font-size: 13px;
  flex-shrink: 0;
  width: 14px;
  text-align: center;
}

/* File warning uses alert red -- unlike text findings the user can't mask
   this from inside Outmizer; the only fix is removing the file. */
.privacy-check__note--file {
  color: var(--color-alert-red);
}

/* v2.6.0: team policy lock-down note. Navy on lavender -- informational,
   not an alarm: the panel is enforcing the team's own rule, not warning. */
.privacy-check__note--policy {
  color: var(--color-navy);
  background: var(--color-lavender-white);
  border-radius: 6px;
  padding: 6px 10px;
}

.privacy-check__note-token {
  font-family: var(--font-mono);
  font-size: 10px;
  background: var(--color-lavender-white);
  color: var(--color-navy);
  padding: 1px 5px;
  border-radius: 4px;
}

.privacy-check__actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 10px;
}

/* Three-slash brand mark inside the primary button — replaces the ✦ star.
   Inline-flex so the flex slash-group sits in the button's text line. */
.privacy-check__btn-logo {
  display: inline-flex;
  vertical-align: middle;
  margin-right: 7px;
}

/* De-emphasized by design: the bypass must be available but never inviting. */
.privacy-check__bypass {
  align-self: center;
  color: var(--color-navy-45);
  text-decoration: underline;
}

.privacy-check__footer {
  font-size: 10.5px;
  font-family: var(--font-body);
  color: var(--color-slate-blue);
  text-align: center;
  background: var(--color-lavender-white);
  border-radius: 6px;
  padding: 6px 10px;
}

/* =============================================================================
   SECURITY MONITORING CARD (footer, team owners only) — v2.5.0
   Tiny collapsible stats card under the cycle bar. Aggregate protection
   numbers for the owner's team: flagged / masked / bypassed.
   Hidden entirely for members and non-team users.
   ============================================================================= */

.security-card {
  margin-top: 6px;
  border-top: 1px solid var(--color-lavender-white);
  padding-top: 4px;
}

.security-card__toggle {
  width: 100%;
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 600;
  font-family: var(--font-body);
  color: var(--color-slate-blue);
  padding: 3px 2px;
}

.security-card__toggle:hover {
  color: var(--color-navy);
}

.security-card__caret {
  font-size: 10px;
}

.security-card__stats {
  display: flex;
  justify-content: space-between;
  gap: 6px;
  padding: 6px 2px 2px;
}

.security-card__stat {
  flex: 1;
  text-align: center;
  background: var(--color-lavender-white);
  border-radius: 6px;
  padding: 5px 4px;
}

/* Mono on the numbers — numeric-accent convention (v2.2.2 body-font rule:
   mono stays on numeric accents only) */
.security-card__num {
  display: block;
  font-size: 14px;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--color-navy);
}

/* Bypasses are the number an owner should notice — red only when > 0 */
.security-card__num--warn {
  color: var(--color-alert-red);
}

.security-card__cap {
  display: block;
  font-size: 9.5px;
  font-family: var(--font-body);
  color: var(--color-navy-45);
  letter-spacing: 0.3px;
}

.security-card__meta {
  font-size: 10px;
  font-family: var(--font-body);
  color: var(--color-navy-45);
  line-height: 1.45;
  padding: 4px 2px 0;
}

.security-card__meta--soft {
  color: var(--color-slate-blue);
  font-size: 9.5px;
}

/* =============================================================================
   EVALUATION SKIP MESSAGE
   Shown when output type is excluded (image/code/math/translation).
   Phase dots stay at ● ● ○ — see Blueprint Section 10, Phase 2
   ============================================================================= */

.evaluation-skip {
  padding: 8px 0;
}

.evaluation-skip__message {
  font-size: 13px;
  font-family: var(--font-body);
  color: var(--color-navy-45);
  line-height: 1.5;
}

/* =============================================================================
   ERROR STATE
   Shows one of the five approved messages from Blueprint Section 25.
   Never shows HTTP codes or technical language.
   ============================================================================= */

.error-state {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 8px 0;
  /* min-height: 0 on the flex container allows children to compress correctly.
     Without it, the flex container can grow beyond the panel max-height.
     Blueprint Section 25. */
  min-height: 0;
}

.error-state__message {
  font-size: 13px;
  font-family: var(--font-body);
  color: var(--color-navy);
  line-height: 1.6;
  white-space: pre-line; /* Preserves \n line breaks in the error message strings */
  /* Allow the message text to scroll if it overflows -- never let it push buttons offscreen.
     The buttons must always remain fully visible so the user has a way out. */
  overflow-y: auto;
  min-height: 0;
}

.error-state__actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  /* flex-shrink: 0 ensures the button row never compresses below its natural size
     even when the panel content area is at max-height. The message scrolls instead.
     Adversarial Test Plan pre-Test 3. Blueprint Section 25. */
  flex-shrink: 0;
}

/* =============================================================================
   UPGRADE SCREEN
   Replaces variable content when cycles reach 0.
   Shown after Phase 3 verdict for peak motivation.
   See Blueprint Section 11, Block 4 — Upgrade Flow
   ============================================================================= */

.upgrade {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 8px 0;
}

.upgrade__message {
  font-size: 13px;
  font-family: var(--font-body);
  color: var(--color-navy);
  line-height: 1.6;
}

.upgrade__actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.upgrade__most-popular {
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--color-white);
  background: var(--color-navy);
  display: inline-block;
  padding: 2px 10px;
  border-radius: 10px;
  margin-bottom: 4px;
  align-self: center;
}
/* Individual upgrade button modifiers — allow per-button overrides if needed.
   Currently unstyled beyond the base .btn class, but must exist so bubble.js
   class writes don't produce console warnings. */
.upgrade__annual  {}
.upgrade__monthly {}
.upgrade__topup   {}

/* =============================================================================
   BUTTONS
   Three variants: primary (Navy), text-only, tertiary (muted text).
   No shadows on any button — flat and clean per Blueprint Section 22.
   ============================================================================= */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 400;
  padding: 10px 18px;
  text-align: center;
  width: 100%;
  line-height: 1;
  /* Immediate response — buttons never animate on click */
  transition: background var(--transition-color),
              color      var(--transition-color);
}

/* PRIMARY — Midnight Navy, white text
   See Blueprint Section 22 — Primary Button */
.btn--primary {
  background: var(--color-navy);
  color: var(--color-white);
}

.btn--primary:hover {
  background: #1a1960; /* Slightly lighter Navy on hover */
}

.btn--primary:active {
  background: #0a0935;
}

/* TEXT — no background, Navy text, underline on hover */
.btn--text {
  background: none;
  color: var(--color-navy-45);
  padding: 8px 0;
}

.btn--text:hover {
  color: var(--color-navy);
}

/* TERTIARY — muted, for "Regenerate ↺" */
.btn--tertiary {
  color: var(--color-slate-blue);
}

.btn--tertiary:hover {
  color: var(--color-navy);
}

/* SMALL — used inside privacy banner and copy reminder */
.btn--small {
  padding: 7px 14px;
  font-size: 12px;
}

/* OUTLINE — white background, slate border, slate text.
   Used for secondary actions in the privacy banner where two
   buttons sit side by side and need clear visual hierarchy. */
.btn--outline {
  background: transparent;
  color: var(--color-slate-blue);
  border: 1.5px solid var(--color-slate-blue);
}

.btn--outline:hover {
  background: rgba(74, 111, 165, 0.06);
}

/* =============================================================================
   INDUSTRY SWITCHER — Feature 3 / Blueprint Section 39
   Compact dropdown in the bubble header for switching industry profile
   without opening the popup settings panel.
   Sits right of the brand name in the header row.
   ============================================================================= */

.industry-switcher {
  position: relative;
  flex-shrink: 0;
}

/* The visible trigger — shows current industry label + dropdown arrow */
.industry-switcher__trigger {
  display: flex;
  align-items: center;
  gap: 3px;
  background: none;
  border: 1px solid var(--color-slate-20);
  border-radius: 10px;
  padding: 3px 7px 3px 8px;
  cursor: pointer;
  font-size: 10px;
  font-family: var(--font-body);
  color: var(--color-navy-60);
  line-height: 1;
  transition: border-color 120ms ease, color 120ms ease;
  white-space: nowrap;
}

.industry-switcher__trigger:hover {
  border-color: var(--color-navy-40);
  color: var(--color-navy);
}

/* The ▾ arrow — rotates when open */
.industry-switcher__arrow {
  font-size: 8px;
  display: inline-block;
  transition: transform 120ms ease;
  line-height: 1;
}

/* Rotate arrow when dropdown is open */
.industry-switcher__trigger[aria-expanded="true"] .industry-switcher__arrow {
  transform: rotate(180deg);
}

/* The dropdown panel — absolutely positioned below the trigger */
.industry-switcher__dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  background: var(--color-white);
  border: 1px solid var(--color-slate-20);
  border-radius: 10px;
  box-shadow: 0 4px 16px rgba(15, 14, 71, 0.10);
  min-width: 120px;
  z-index: 100;
  overflow: hidden;
  padding: 4px;
}

/* Each industry option button */
.industry-switcher__option {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  cursor: pointer;
  padding: 7px 10px;
  font-size: 12px;
  font-family: var(--font-body);
  color: var(--color-text-soft);
  border-radius: 6px;
  transition: background 100ms ease, color 100ms ease;
  white-space: nowrap;
}

.industry-switcher__option:hover {
  background: var(--color-lavender-white);
  color: var(--color-navy);
}

/* Currently selected option — navy dot indicator */
.industry-switcher__option--active {
  color: var(--color-navy);
  font-weight: 500;
  background: var(--color-lavender-white);
}

.industry-switcher__option--active::before {
  content: '·';
  margin-right: 5px;
  color: var(--color-navy);
  font-weight: 700;
}


/* =============================================================================
   PHASE A ADDITIONS — v2.2.0
   All new visual rules added in Phase A. Do not remove or merge upward.
   ============================================================================= */

/* ── A1: PILL ICON — SVG ─────────────────────────────────────────────────────
   No extra glow needed. The existing .bubble--pill border (1px, navy-12) and
   box-shadow (0 2px 12px navy-08) already produce the correct lavender look.
   ─────────────────────────────────────────────────────────────────────────── */

.bubble__pill-icon {
  display: inline-block;
  flex-shrink: 0;
  vertical-align: middle;
}

/* ── A2: WATCHING STATE — SLASH FADE ANIMATION ───────────────────────────────
   When bubble is in WATCHING or LOADING state, the pill icon slash group
   animates via outmizer-slash-group--animated (defined above).
   ─────────────────────────────────────────────────────────────────────────── */

/* (Animation handled by .outmizer-slash-group--animated above) */

/* ── A3: CYCLE BAR LABEL ROW — INFO BUTTON + TOOLTIP ────────────────────────
   Label and ? button sit on the same row.
   Tooltip panel appears below on click.
   Support email link appears below tooltip.
   ─────────────────────────────────────────────────────────────────────────── */

.cycle-bar__label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

/* The ? info button — small, muted, no decoration */
.cycle-bar__info-btn {
  background: none;
  border: 1px solid var(--color-navy-15);
  border-radius: 50%;
  width: 14px;
  height: 14px;
  font-size: 9px;
  font-family: var(--font-mono);
  color: var(--color-navy-40);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 0;
  line-height: 1;
  transition: color var(--transition-color), border-color var(--transition-color);
}

.cycle-bar__info-btn:hover {
  color: var(--color-navy);
  border-color: var(--color-navy-40);
}

/* Tooltip panel — hidden by default, shown on ? click */
.cycle-bar__tooltip {
  background: var(--color-lavender-white);
  border: 1px solid var(--color-navy-10);
  border-radius: 8px;
  padding: 10px 12px;
  margin-top: 6px;
  font-size: 11px;
  font-family: var(--font-body);
  color: var(--color-navy);
  line-height: 1.55;
}

.cycle-bar__tooltip[hidden] {
  display: none;
}

/* Top-up link inside tooltip */
.cycle-bar__topup-link {
  color: var(--color-slate-blue);
  text-decoration: none;
  font-size: 11px;
  font-family: var(--font-body);
}

.cycle-bar__topup-link:hover {
  text-decoration: underline;
  color: var(--color-navy);
}

/* ── A5: SUPPORT LINK IN FOOTER ──────────────────────────────────────────────
   Subtle support email link always visible below the cycle bar.
   Small, muted — present but not intrusive.
   ─────────────────────────────────────────────────────────────────────────── */

.cycle-bar__support {
  margin-top: 8px;
  text-align: right;
}

.cycle-bar__support-link {
  font-size: 10px;
  font-family: var(--font-body);
  color: var(--color-navy-20);
  text-decoration: none;
  letter-spacing: 0.1px;
  transition: color var(--transition-color);
}

.cycle-bar__support-link:hover {
  color: var(--color-navy-45);
}

/* ── A4: RESTORE ORIGINAL PROMPT BUTTON ─────────────────────────────────────
   Ghost text link below the enhanced prompt box.
   Only shown when originalPromptText is stored.
   ─────────────────────────────────────────────────────────────────────────── */

.phase1__restore-btn {
  display: block;
  background: none;
  border: none;
  padding: 4px 0;
  margin-bottom: 8px;
  font-size: 11px;
  font-family: var(--font-body);
  color: var(--color-navy-40);
  cursor: pointer;
  text-decoration: none;
  letter-spacing: 0.1px;
  transition: color var(--transition-color);
}

.phase1__restore-btn:hover {
  color: var(--color-alert-red);
}

/* ── PHASE 1 HINT TEXT ───────────────────────────────────────────────────────
   "After the AI responds, Outmizer will check it automatically."
   Shown below the restore link, above the action buttons.
   ─────────────────────────────────────────────────────────────────────────── */

.phase1__hint {
  font-size: 11px;
  font-family: var(--font-body);
  color: var(--color-navy-40);
  text-align: center;
  padding: 4px 0 10px;
  line-height: 1.4;
}

/* ── A7: LEGAL DISCLAIMER — BRAND VOICE ─────────────────────────────────────
   Same protection as before, rewritten in warm tone.
   Applied in Phase 3 Pass and Phase 3 Gaps.
   ─────────────────────────────────────────────────────────────────────────── */

.phase3-pass__legal,
.phase3-gaps__legal {
  font-size: 10px;
  font-family: var(--font-body);
  color: var(--color-navy-20);
  line-height: 1.5;
  padding-top: 8px;
  border-top: 1px solid var(--color-navy-06);
}


/* =============================================================================
   ACCESSIBILITY — WCAG 2.1 AA COMPLIANCE
   These rules ensure keyboard navigation and screen reader support.
   Added: April 2026.
   Blueprint Section 22 — Accessibility standards.
   ============================================================================= */

/* ── FOCUS RINGS ──────────────────────────────────────────────────────────────
   :focus-visible fires only for keyboard navigation, not mouse clicks.
   This means sighted mouse users see no ring, keyboard users always see one.
   The outline uses --color-slate-blue offset from the element so it never
   blends with navy backgrounds.
   ─────────────────────────────────────────────────────────────────────────── */

/* All interactive elements inside the bubble get a visible focus ring */
button:focus-visible,
[role="button"]:focus-visible,
select:focus-visible,
input:focus-visible,
a:focus-visible,
[tabindex="0"]:focus-visible {
  outline: 2px solid var(--color-slate-blue);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Pill specifically — larger radius to match pill shape */
#outmizer-pill:focus-visible {
  outline: 2px solid var(--color-slate-blue);
  outline-offset: 3px;
  border-radius: 20px;
}

/* Header action buttons — minimize and close */
.bubble__minimize-btn:focus-visible,
.bubble__close-btn:focus-visible {
  outline: 2px solid var(--color-slate-blue);
  outline-offset: 2px;
  border-radius: 6px;
}

/* Industry switcher trigger */
.industry-switcher__trigger:focus-visible {
  outline: 2px solid var(--color-slate-blue);
  outline-offset: 2px;
  border-radius: 6px;
}

/* Dynamic content buttons — enhance, check, regenerate, send follow-up */
.phase1__use-btn:focus-visible,
.phase1__regen-btn:focus-visible,
.ready-to-check__btn:focus-visible,
.phase3-gaps__followup-btn:focus-visible,
.phase3-pass__dismiss-btn:focus-visible,
.artifact-verify__btn:focus-visible,
.upgrade__btn:focus-visible,
.error__retry-btn:focus-visible {
  outline: 2px solid var(--color-slate-blue);
  outline-offset: 2px;
}

/* ── SCREEN READER ONLY UTILITY ───────────────────────────────────────────────
   .sr-only hides text visually but keeps it in the accessibility tree.
   Used for phase dot status text, progress announcements, and any
   context that visual users get from layout but screen readers need spelled out.
   ─────────────────────────────────────────────────────────────────────────── */

.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;
}

/* ── EDIT NOTICE ─────────────────────────────────────────────────────────
   Shown over a Phase 1 brief when the chat-box text changed. */
.bubble__notice {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  margin: 0 12px 8px;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--color-navy-06);
  border: 1px solid var(--color-navy-12);
  font-size: 12px;
  color: var(--color-navy);
}

.bubble__notice[hidden] {
  display: none;
}

.bubble__notice-text {
  flex: 1 1 100%;
  font-weight: 600;
}

.bubble__notice-btn {
  font: inherit;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid var(--color-navy-20);
  background: var(--color-white);
  color: var(--color-navy);
  cursor: pointer;
}

.bubble__notice-btn--primary {
  background: var(--color-navy);
  border-color: var(--color-navy);
  color: var(--color-white);
}

/* =============================================================================
   v1.4.1 CHANGES (design target, decided 2026-10-08; apply to extension/styles.css)
   1. #3B82F6 and rgba(59,130,246,a) above are now Slate Blue. The breathing dot, the pulse border
      colour and the pulse glow keep their alpha (6 to 20%); only the hue moves to the brand slate.
   2. .phase3-pass__review-nudge .btn--link used var(--color-slate), which is not defined. It is
      now var(--color-slate-blue).
   3. States the product was missing: pill hover, notice button hover, review link hover, outline
      and text button active. All use existing tokens.
   ============================================================================= */
.bubble__pill {
  transition: background var(--transition-color);
}
.bubble__pill:hover {
  background: var(--color-navy-06);
}
.bubble__notice-btn {
  transition: background var(--transition-color), border-color var(--transition-color);
}
.bubble__notice-btn:hover {
  background: var(--color-navy-06);
}
.bubble__notice-btn--primary:hover {
  background: #1a1960;
  border-color: #1a1960;
}
.phase3-pass__review-nudge .btn--link:hover {
  color: var(--color-navy);
}
.btn--outline:active {
  background: var(--color-slate-20);
}
.btn--text:active {
  color: var(--color-navy);
}
