/* PromptCraft Pro — Frontend Stylesheet v5.0 */

/* ── Tokens ─────────────────────────────────────────────── */
.pc-wrap {
  /* ── 60% — neutral base (near-black, not flat #000 so depth still reads) ── */
  --pc-bg:           #0c0c0e;
  --pc-surface:      #151517;
  --pc-surface-2:    #1a1a1d;
  --pc-surface-3:    #222226;

  /* ── 30% — structure: borders + text, deliberately desaturated ── */
  --pc-border:       #2b2b30;
  --pc-border-med:   #3e3e45;
  --pc-text:         #f5f5f3;
  --pc-text-muted:   #a5a5ad;
  --pc-text-dim:     #6d6d76;

  /* ── 10% — the ONE vibrant colour, reserved for interactive/action elements ── */
  --pc-accent:       #f6b91d;
  --pc-accent-dark:  #d99f0c;
  --pc-accent-glow:  rgba(246,185,29,0.16);
  --pc-accent-ink:   #171308;

  --pc-cta-grad:        var(--pc-accent);
  --pc-cta-grad-dark:   var(--pc-accent-dark);
  --pc-cta-border:      var(--pc-accent);
  --pc-cta-border-dark: var(--pc-accent-dark);

  --pc-success:      #3ecf8e;
  --pc-error:        #ff6259;
  --pc-warn:         #f0a63e;
  --pc-pink:         #f6b91d;
  --pc-radius:       10px;
  --pc-font:         -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --pc-mono:         'JetBrains Mono', 'Fira Code', 'Cascadia Code', Consolas, monospace;

  width: 100%;
  font-family: var(--pc-font);
  color: var(--pc-text);
  background: transparent;
  box-sizing: border-box;
  padding: 4px;
}

.pc-wrap *, .pc-wrap *::before, .pc-wrap *::after {
  box-sizing: inherit;
}

/* ── Animated ring wrapper ───────────────────────────────── */
@property --ring-angle {
  syntax: '<angle>';
  inherits: false;
  initial-value: 0deg;
}

.pc-ring-wrapper {
  position: relative;
  border-radius: 18px;
  padding: 3px;
  background: conic-gradient(
    from var(--ring-angle),
    var(--pc-border-med) 0%,
    var(--pc-accent) 25%,
    var(--pc-border-med) 50%,
    var(--pc-accent) 75%,
    var(--pc-border-med) 100%
  );
  animation: pc-ring-spin 3s linear infinite;
}

@keyframes pc-ring-spin {
  to { --ring-angle: 360deg; }
}

@supports not (background: conic-gradient(from 1turn, red, red)) {
  .pc-ring-wrapper {
    background: linear-gradient(135deg, var(--pc-border-med), var(--pc-accent));
    animation: pc-ring-fallback 3s linear infinite;
    background-size: 400% 400%;
  }
  @keyframes pc-ring-fallback {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
  }
}

/* Respect user's reduced-motion preference — stop all decorative animations */
@media (prefers-reduced-motion: reduce) {
  .pc-ring-wrapper {
    animation: none;
    background: var(--pc-accent);
  }
  .pc-orbit-ball,
  .pc-loading-icon,
  .pc-progress-bar,
  .pc-cursor,
  .pc-word {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
  .pc-modal,
  .pc-modal-overlay {
    animation: none !important;
  }
}

.pc-ring-inner {
  background: var(--pc-bg);
  border-radius: 15px;
  overflow: hidden;
}

.pc-ring-inner::before {
  content: '';
  display: block;
  height: 4px;
  background: var(--pc-accent);
  flex-shrink: 0;
}

/* ── Toolbar ─────────────────────────────────────────────── */
.pc-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
  height: 48px;
  background: var(--pc-surface);
  border-bottom: 1px solid var(--pc-border);
  flex-shrink: 0;
}

.pc-toolbar-brand {
  display: flex;
  align-items: center;
  gap: 9px;
}

.pc-brand-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--pc-text);
  letter-spacing: -0.01em;
}

.pc-brand-tag {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--pc-accent);
  background: var(--pc-accent-glow);
  border: 1px solid rgba(246,185,29,0.3);
  border-radius: 4px;
  padding: 2px 6px;
  line-height: 1;
}

.pc-toolbar-right {
  display: flex;
  align-items: center;
  gap: 7px;
}

.pc-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--pc-text-dim);
  transition: background 0.3s;
}

.pc-status-dot.active { background: var(--pc-success); }

.pc-status-label {
  font-size: 12px;
  color: var(--pc-text-muted);
}

/* ── Context bar ─────────────────────────────────────────── */
/*
 * Sits between toolbar and main input.
 * All settings inline — model picker, use case, tone, price.
 * Scrolls horizontally on narrow screens.
 */
.pc-context-bar {
  display: flex;
  align-items: center;
  height: 46px;
  background: var(--pc-surface);
  border-bottom: 1px solid var(--pc-border);
  padding: 0 8px;
  flex-shrink: 0;
  /* Horizontal scroll on narrow screens */
  overflow-x: auto;
  scrollbar-width: none;
}

.pc-context-bar::-webkit-scrollbar { display: none; }

/* Vertical divider between controls */
.pc-context-sep {
  width: 1px;
  height: 20px;
  background: var(--pc-border);
  flex-shrink: 0;
  margin: 0 6px;
}

/* Wrapper for labelled selects */
.pc-ctx-select-wrap {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0 4px;
  flex-shrink: 0;
}

.pc-ctx-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--pc-text-dim);
  white-space: nowrap;
  user-select: none;
}

/* Price display pushed to far right */
.pc-price-display {
  margin-left: auto;
  padding: 0 10px;
  white-space: nowrap;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 4px;
}

.pc-price-idle {
  font-size: 12px;
  color: var(--pc-text-dim);
}

.pc-price-amount {
  font-size: 12px;
  font-weight: 700;
  color: var(--pc-accent);
}

.pc-price-unit {
  font-size: 11px;
  color: var(--pc-text-muted);
}

/* ── Selects (context bar) ───────────────────────────────── */
.pc-context-bar .pc-select {
  border: none;
  background: transparent;
  font-family: var(--pc-font);
  font-size: 13px;
  font-weight: 500;
  color: var(--pc-text-muted);
  cursor: pointer;
  padding: 5px 6px;
  border-radius: 7px;
  outline: none;
  transition: background 0.13s, color 0.13s;
  -webkit-appearance: auto;
  appearance: auto;
  height: 34px;
}

.pc-context-bar .pc-select:hover {
  background: var(--pc-surface-2);
  color: var(--pc-text);
}

.pc-context-bar .pc-select:focus {
  background: var(--pc-surface-3);
  color: var(--pc-text);
}

/* ── Main input area (full width, no sidebar) ────────────── */
.pc-main {
  background: var(--pc-bg);
}

.pc-input-area {
  padding: 22px 22px 0;
}

.pc-input-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 10px;
  gap: 8px;
}

.pc-input-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--pc-text);
  letter-spacing: -0.01em;
}

.pc-char-count {
  font-size: 11px;
  color: var(--pc-text-dim);
  flex-shrink: 0;
}

.pc-textarea {
  width: 100%;
  min-height: 180px;
  max-height: 360px;
  resize: vertical;
  background: var(--pc-surface);
  border: 1.5px solid var(--pc-border-med);
  border-radius: var(--pc-radius);
  padding: 14px 16px;
  font-family: var(--pc-font);
  font-size: 14px;
  line-height: 1.65;
  color: var(--pc-text);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.pc-textarea::placeholder {
  color: var(--pc-text-dim);
  font-size: 13px;
  line-height: 1.7;
}

.pc-textarea:focus {
  border-color: var(--pc-accent);
  box-shadow: 0 0 0 3px var(--pc-accent-glow);
}

/* ── Example chips ───────────────────────────────────────── */
.pc-examples {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.pc-examples-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--pc-text-dim);
  padding-top: 2px;
  flex-shrink: 0;
}

.pc-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.pc-chip {
  font-family: var(--pc-font);
  font-size: 12px;
  color: var(--pc-text-muted);
  background: var(--pc-surface);
  border: 1px solid var(--pc-border);
  border-radius: 100px;
  padding: 4px 12px;
  cursor: pointer;
  line-height: 1.4;
  transition: border-color 0.13s, color 0.13s, background 0.13s;
}

.pc-chip:hover {
  border-color: var(--pc-border-med);
  color: var(--pc-text);
  background: var(--pc-surface-2);
}

/* ── Sharpen my brief ─────────────────────────────────────── */
.pc-sharpen {
  margin-top: 14px;
}

.pc-sharpen-toggle {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: var(--pc-text-muted);
  cursor: pointer;
  user-select: none;
}

.pc-sharpen-toggle input[type="checkbox"] {
  accent-color: var(--pc-accent);
  cursor: pointer;
}

.pc-sharpen-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
  padding: 12px 14px;
  background: var(--pc-surface-2);
  border: 1px solid var(--pc-border);
  border-radius: var(--pc-radius);
}

.pc-sharpen-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.pc-sharpen-input {
  width: 100%;
  background: var(--pc-surface);
  border: 1.5px solid var(--pc-border-med);
  border-radius: 8px;
  padding: 8px 10px;
  font-family: var(--pc-font);
  font-size: 13px;
  color: var(--pc-text);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.pc-sharpen-input:focus {
  border-color: var(--pc-accent);
  box-shadow: 0 0 0 3px var(--pc-accent-glow);
}

/* ── Input footer (generate button) ─────────────────────── */
.pc-input-footer {
  display: flex;
  justify-content: flex-end;
  padding: 16px 0 22px;
}

/* ── Buttons ─────────────────────────────────────────────── */
.pc-wrap .pc-btn,
.pc-btn {
  display: inline-flex !important;
  align-items: center !important;
  gap: 7px !important;
  padding: 9px 18px !important;
  border-radius: var(--pc-radius) !important;
  border: 1.5px solid transparent !important;
  font-family: var(--pc-font) !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  line-height: 1 !important;
  transition: opacity 0.15s, transform 0.1s, background 0.13s, border-color 0.13s !important;
  white-space: nowrap !important;
  text-decoration: none !important;
  box-sizing: border-box !important;
}

.pc-btn:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.pc-btn:active:not(:disabled) {
  transform: scale(0.98);
}

.pc-btn-primary {
  background: var(--pc-cta-grad);
  color: var(--pc-accent-ink);
  border-color: var(--pc-cta-border);
  font-weight: 700 !important;
}

.pc-btn-primary:hover:not(:disabled) {
  background: var(--pc-cta-grad-dark);
  border-color: var(--pc-cta-border-dark);
}

.pc-btn-copy {
  background: var(--pc-surface-2);
  color: var(--pc-text);
  border-color: var(--pc-border-med);
}

.pc-btn-copy:hover:not(:disabled) {
  border-color: var(--pc-accent);
  color: var(--pc-accent);
}

.pc-wrap .pc-btn-ghost,
.pc-btn-ghost {
  background: transparent !important;
  background-color: transparent !important;
  color: var(--pc-text-muted) !important;
  border-color: var(--pc-border) !important;
}

.pc-wrap .pc-btn-ghost:hover:not(:disabled),
.pc-btn-ghost:hover:not(:disabled) {
  color: var(--pc-text) !important;
  border-color: var(--pc-border-med) !important;
}

/* ── Output Modal overlay ────────────────────────────────── */
.pc-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(0,0,0,0.72);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: pc-overlay-in 0.25s ease;
}

@keyframes pc-overlay-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* WP shifts page content down by the admin bar's height for logged-in
   users (html { margin-top }), but our fixed overlay still centers
   against the full viewport. Offset it so the modal centers against
   the visible page instead of sitting too high. */
body.admin-bar .pc-modal-overlay { top: 32px; }
@media screen and (max-width: 600px) {
  body.admin-bar .pc-modal-overlay { top: 46px; }
}

.pc-modal {
  background: var(--pc-surface);
  border-radius: 20px;
  border: 1.5px solid var(--pc-border-med);
  box-shadow:
    0 32px 80px rgba(0, 0, 0, 0.5),
    0 8px 24px rgba(0, 0, 0, 0.35),
    0 0 0 0.5px rgba(255,255,255,0.05) inset;
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: pc-modal-in 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  font-family: var(--pc-font);
  color: var(--pc-text);
}

@keyframes pc-modal-in {
  from { opacity: 0; transform: scale(0.88) translateY(20px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.pc-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 20px 22px 16px;
  border-bottom: 1px solid var(--pc-border);
  flex-shrink: 0;
  gap: 12px;
  background: linear-gradient(180deg, var(--pc-surface-2) 0%, var(--pc-surface) 100%);
}

.pc-modal-title-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pc-modal-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--pc-text);
  letter-spacing: -0.02em;
}

.pc-modal-badges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.pc-modal-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1.5px solid var(--pc-border);
  background: var(--pc-surface-2);
  color: var(--pc-text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: border-color 0.13s, color 0.13s, background 0.13s, transform 0.13s;
}

.pc-modal-close:hover {
  border-color: var(--pc-error);
  color: var(--pc-error);
  background: rgba(255,98,89,0.07);
  transform: scale(1.08);
}

.pc-modal-body {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
}

.pc-modal-body::-webkit-scrollbar { width: 3px; }
.pc-modal-body::-webkit-scrollbar-track { background: transparent; }
.pc-modal-body::-webkit-scrollbar-thumb { background: var(--pc-border-med); border-radius: 2px; }

/* ── Loading (inside modal) — Rich centred panel ────────── */

/* Modal body needs room when loading */
#pc-loading { min-height: 320px; display: flex; align-items: center; }

.pc-loading-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  padding: 40px 24px 36px;
  text-align: center;
}

/* ── Orbital ring spinner ── */
.pc-orbit-ring {
  position: relative;
  width: 88px;
  height: 88px;
  margin-bottom: 8px;
}

.pc-orbit-track {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 3px solid var(--pc-border);
}

.pc-orbit-ball {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 3px solid transparent;
  border-top-color: var(--pc-accent);
  border-right-color: var(--pc-pink);
  animation: pc-orbit 1s cubic-bezier(0.55,0,0.45,1) infinite;
}

@keyframes pc-orbit {
  to { transform: rotate(360deg); }
}

/* ── Brain icon in centre of ring ── */
.pc-loading-icon {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--pc-accent);
  animation: pc-pulse-icon 2s ease-in-out infinite;
}

@keyframes pc-pulse-icon {
  0%, 100% { opacity: 0.7; transform: scale(1);    }
  50%       { opacity: 1;   transform: scale(1.1); }
}

/* ── Text ── */
.pc-loading-headline {
  font-size: 17px;
  font-weight: 700;
  color: var(--pc-text);
  margin: 0;
  letter-spacing: -0.02em;
  transition: opacity 0.35s ease;
}

.pc-loading-sub {
  font-size: 13px;
  color: var(--pc-text-muted);
  margin: 0;
  min-height: 18px;
  transition: opacity 0.35s ease;
}

.pc-loading-hint {
  font-size: 11px;
  color: var(--pc-text-dim);
  margin: 6px 0 0;
  opacity: 0.75;
}

/* ── Progress bar ── */
.pc-progress-track {
  width: 240px;
  max-width: 100%;
  height: 5px;
  background: var(--pc-border);
  border-radius: 100px;
  overflow: hidden;
  margin-top: 6px;
}

.pc-progress-bar {
  height: 100%;
  width: 0%;
  border-radius: 100px;
  background: linear-gradient(90deg, var(--pc-accent), var(--pc-pink));
  transition: width 0.6s ease;
  animation: pc-progress-shimmer 1.5s ease-in-out infinite;
}

@keyframes pc-progress-shimmer {
  0%   { filter: brightness(1); }
  50%  { filter: brightness(1.25); }
  100% { filter: brightness(1); }
}

/* Keep old dot blink for any legacy use */
.pc-dots {
  display: inline-block;
  animation: pc-blink 1.2s step-end infinite;
}

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

/* ── Result (inside modal) ───────────────────────────────── */
.pc-result-box {
  background: #ffffff;
  border: 1px solid var(--pc-border);
  border-radius: var(--pc-radius);
  padding: 18px 20px;
  margin-bottom: 16px;
  min-height: 80px;
}

.pc-result-text {
  font-family: var(--pc-mono);
  font-size: 12.5px;
  line-height: 1.75;
  color: #000000;
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
}

/* ── Typewriter animation ────────────────────────────────── */
.pc-word {
  display: inline;
  opacity: 0;
  animation: pc-word-fade 0.12s ease forwards;
}

@keyframes pc-word-fade {
  from { opacity: 0; transform: translateY(2px); }
  to   { opacity: 1; transform: translateY(0); }
}

.pc-cursor {
  display: inline-block;
  width: 2px;
  height: 1em;
  background: var(--pc-accent);
  vertical-align: text-bottom;
  margin-left: 2px;
  animation: pc-cursor-blink 0.8s step-end infinite;
}

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

.pc-result-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.pc-copy-toast {
  font-size: 11px;
  color: var(--pc-success);
  margin-left: 4px;
  opacity: 0;
  transition: opacity 0.25s;
}

.pc-copy-toast.visible { opacity: 1; }

/* ── Badge ───────────────────────────────────────────────── */
.pc-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 100px;
  background: var(--pc-accent-glow);
  color: var(--pc-accent);
  border: 1px solid rgba(246,185,29,0.25);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.pc-badge-dim {
  background: rgba(255,255,255,0.05);
  color: var(--pc-text-muted);
  border-color: var(--pc-border);
}

/* ── Error ───────────────────────────────────────────────── */
.pc-error-box {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: rgba(255,98,89,0.07);
  border: 1px solid rgba(255,98,89,0.2);
  border-radius: var(--pc-radius);
  padding: 14px 16px;
  margin-bottom: 14px;
}

.pc-error-box svg { flex-shrink: 0; margin-top: 1px; }

.pc-error-text {
  font-size: 13px;
  color: var(--pc-error);
  margin: 0;
  line-height: 1.5;
}

.pc-error-actions {
  display: flex;
  gap: 8px;
}

/* ── Small button variant ─────────────────────────────────── */
.pc-btn-sm {
  padding: 7px 14px;
  font-size: 12px;
}

/* ── Keyboard / focus-visible ring ──────────────────────── */
.pc-wrap :focus-visible {
  outline: 2px solid var(--pc-accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Suppress outline for mouse clicks — only show on keyboard focus */
.pc-wrap :focus:not(:focus-visible) {
  outline: none;
}

/* Keyboard shortcut hint shown below the generate button */
.pc-kbd-hint {
  font-size: 11px;
  color: var(--pc-text-dim);
  margin-top: 6px;
  text-align: right;
}
.pc-kbd-hint kbd {
  display: inline-block;
  padding: 1px 5px;
  border: 1px solid var(--pc-border-med);
  border-radius: 4px;
  background: var(--pc-surface);
  font-family: var(--pc-mono);
  font-size: 10px;
  color: var(--pc-text-muted);
  line-height: 1.5;
}

/* Screen-reader-only live region */
.pc-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;
}

/* Char count turns amber at 80%, red at 95% */
.pc-char-count.pc-chars-warn  { color: var(--pc-warn); font-weight: 600; }
.pc-char-count.pc-chars-limit { color: var(--pc-error); font-weight: 700; }

/* Min-length hint shown below textarea when input is too short */
.pc-min-hint {
  font-size: 11.5px;
  color: var(--pc-text-dim);
  margin-top: 4px;
  transition: color 0.2s;
}
.pc-min-hint.pc-min-hint-ok { color: var(--pc-success); }
@media (max-width: 480px) {
  .pc-toolbar { padding: 0 14px; }

  /* Context bar: tighten spacing, hide "Use case" / "Tone" labels */
  .pc-context-bar { padding: 0 4px; }
  .pc-ctx-label   { display: none; }
  .pc-context-sep { margin: 0 3px; }

  .pc-input-area  { padding: 16px 14px 0; }
  .pc-input-footer { padding: 14px 0 18px; }

  .pc-modal {
    max-height: 92vh;
    max-width: calc(100% - 24px);
    width: 100%;
    border-radius: 18px;
    margin: 0 12px;
  }

  .pc-modal-overlay {
    padding: 20px 0;
    align-items: center;
  }
}

/* ═══════════════════════════════════════════════════════════
   PromptCraft Pro v5 — Additional styles
   ═══════════════════════════════════════════════════════════ */

/* ── Paid / verified banner ─────────────────────────────── */
.pc-paid-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(62,207,142,0.09);
  border: 1px solid rgba(62,207,142,0.28);
  border-radius: 8px;
  padding: 10px 14px;
  margin: 0 16px 4px;
  font-size: 13px;
  color: var(--pc-success);
  line-height: 1.4;
}
.pc-paid-banner svg { flex-shrink: 0; }

/* ── Inline notice ──────────────────────────────────────── */
.pc-inline-notice {
  display: none;
  padding: 9px 14px;
  border-radius: 8px;
  font-size: 13px;
  margin: 8px 0 4px;
  line-height: 1.4;
}
.pc-inline-notice .pc-notice-icon {
  font-weight: 700;
  margin-right: 5px;
}
.pc-notice-success { background: rgba(62,207,142,0.09); color: var(--pc-success); border: 1px solid rgba(62,207,142,0.28); }
.pc-notice-error   { background: rgba(255,98,89,0.09);  color: var(--pc-error);   border: 1px solid rgba(255,98,89,0.28); }
.pc-notice-info    { background: rgba(148,163,184,0.09); color: #cbd5e1;          border: 1px solid rgba(148,163,184,0.28); }

/* ── Recovery section ───────────────────────────────────── */
.pc-recovery-section {
  margin: 8px 0 0;
  border-top: 1px solid var(--pc-border);
  padding-top: 8px;
}

.pc-recovery-toggle {
  display: flex;
  align-items: center;
  gap: 7px;
  width: 100%;
  background: none;
  border: none;
  color: var(--pc-text-muted);
  font-size: 12.5px;
  cursor: pointer;
  padding: 8px 16px;
  text-align: left;
  transition: color 0.15s;
}
.pc-recovery-toggle:hover { color: var(--pc-text); }
.pc-recovery-chevron {
  margin-left: auto;
  transition: transform 0.2s;
}
.pc-recovery-toggle.open .pc-recovery-chevron {
  transform: rotate(180deg);
}

.pc-recovery-panel {
  padding: 12px 16px 16px;
}

.pc-recovery-hint {
  font-size: 12.5px;
  color: var(--pc-text-muted);
  margin: 0 0 12px;
  line-height: 1.5;
}
.pc-recovery-hint code {
  background: var(--pc-surface-2);
  border: 1px solid var(--pc-border);
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 11px;
  color: var(--pc-text);
}

.pc-recovery-fields {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pc-recovery-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.pc-recovery-or {
  text-align: center;
  font-size: 12px;
  color: var(--pc-text-dim);
  position: relative;
}
.pc-recovery-or::before,
.pc-recovery-or::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 40%;
  height: 1px;
  background: var(--pc-border);
}
.pc-recovery-or::before { left: 0; }
.pc-recovery-or::after  { right: 0; }

.pc-btn-recover {
  background: var(--pc-surface-2);
  color: var(--pc-text);
  border: 1.5px solid var(--pc-border-med);
  border-radius: 8px;
  padding: 9px 18px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  align-self: flex-start;
  margin-top: 2px;
  font-family: var(--pc-font);
}
.pc-btn-recover:hover { background: var(--pc-surface-3); border-color: var(--pc-accent); color: var(--pc-accent); }
.pc-btn-recover:disabled { opacity: 0.5; cursor: not-allowed; }

.pc-recovery-msg {
  font-size: 12.5px;
  margin: 10px 0 0;
  padding: 8px 10px;
  border-radius: 6px;
  line-height: 1.4;
}
.pc-recovery-msg.pc-recovery-error { background: rgba(255,98,89,0.08); color: var(--pc-error); border: 1px solid rgba(255,98,89,0.2); }
.pc-recovery-msg.pc-recovery-ok    { background: rgba(22,163,74,0.08);  color: var(--pc-success); border: 1px solid rgba(22,163,74,0.2); }

/* ── History list ─────────────────────────────────────────── */
.pc-history-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
}

.pc-history-item {
  background: #ffffff;
  border: 1px solid #e2e2e2;
  border-radius: 10px;
  padding: 12px 14px;
}

.pc-history-item-header {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.pc-history-badge {
  font-size: 10.5px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 100px;
  background: rgba(150,102,10,0.1);
  color: #96660a;
  border: 1px solid rgba(150,102,10,0.25);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.pc-history-date {
  font-size: 11.5px;
  color: #6b6b6b;
  margin-left: auto;
}

.pc-history-item-text {
  font-size: 12.5px;
  line-height: 1.65;
  color: #000000;
  background: transparent;
  white-space: pre-wrap;
  max-height: 90px;
  overflow: hidden;
  position: relative;
  margin: 0 0 8px;
  font-family: var(--pc-mono);
}

.pc-history-item.pc-history-expanded .pc-history-item-text {
  max-height: none;
}

.pc-history-item-actions {
  display: flex;
  gap: 8px;
}

.pc-history-action-btn {
  background: #f4f4f4;
  color: #333333;
  border: 1px solid #dddddd;
  border-radius: 7px;
  padding: 5px 11px;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  font-family: var(--pc-font);
}
.pc-history-action-btn:hover { background: #ebebeb; color: #000000; border-color: #96660a; }

/* ── History Tab Switcher ───────────────────────────────────── */
.pc-history-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--pc-border-med);
  padding-bottom: 0;
}

.pc-history-tab {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 7px 14px 9px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--pc-text-muted);
  cursor: pointer;
  font-family: var(--pc-font);
  transition: color 0.15s, border-color 0.15s;
  margin-bottom: -1px;
}

.pc-history-tab:hover {
  color: var(--pc-text);
}

.pc-history-tab--active {
  color: var(--pc-accent);
  border-bottom-color: var(--pc-accent);
}

/* ─────────────────────────────────────────────────────────────
   Complete Prompt Panel
   ───────────────────────────────────────────────────────────── */


/* ── Upgrade nudge card ─────────────────────────────────────── */

.pc-nudge {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px 14px 14px;
  background: linear-gradient(135deg, rgba(246,185,29,0.07) 0%, rgba(246,185,29,0.03) 100%);
  border-bottom: 1px solid rgba(246,185,29,0.15);
  position: relative;
  animation: pc-nudge-in 0.3s ease both;
}

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

.pc-nudge.pc-nudge-hidden {
  display: none;
}

.pc-nudge-icon {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--pc-accent);
  color: var(--pc-accent-ink);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
}

.pc-nudge-body {
  flex: 1;
  min-width: 0;
}

.pc-nudge-headline {
  font-size: 13px;
  font-weight: 600;
  color: var(--pc-text);
  margin: 0 0 5px;
  line-height: 1.35;
}

.pc-nudge-sub {
  font-size: 12px;
  color: var(--pc-text-muted);
  margin: 0;
  line-height: 1.55;
}

.pc-nudge-dismiss {
  flex-shrink: 0;
  background: none;
  border: none;
  padding: 4px;
  cursor: pointer;
  color: var(--pc-text-dim);
  border-radius: 4px;
  line-height: 1;
  transition: color 0.15s, background 0.15s;
  margin-top: -2px;
}

.pc-nudge-dismiss:hover {
  color: var(--pc-text);
  background: rgba(246,185,29,0.08);
}

@media (prefers-reduced-motion: reduce) {
  .pc-nudge { animation: none; }
}

/* ── Complete panel — stepper layout ───────────────────────── */

.pc-complete-panel {
  display: none;
  margin-top: 20px;
  border: 1.5px solid var(--pc-accent);
  border-radius: 10px;
  overflow: hidden;
  background: var(--pc-bg);
}

/* Progress track row */
.pc-stepper-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px 10px;
  background: rgba(246,185,29,0.06);
  border-bottom: 1px solid rgba(246,185,29,0.13);
  gap: 10px;
}

.pc-stepper-track {
  display: flex;
  align-items: center;
  gap: 0;
  flex: 1;
  min-width: 0;
}

/* Each step node */
.pc-step-node {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  flex-shrink: 0;
  transition: background 0.2s, color 0.2s;
  position: relative;
  z-index: 1;
}
.pc-step-node.todo {
  background: var(--pc-surface);
  border: 1.5px solid var(--pc-border-med);
  color: var(--pc-text-muted);
}
.pc-step-node.active {
  background: var(--pc-accent);
  border: 1.5px solid var(--pc-accent);
  color: var(--pc-accent-ink);
  box-shadow: 0 0 0 3px var(--pc-accent-glow);
}
.pc-step-node.done {
  background: var(--pc-success);
  border: 1.5px solid var(--pc-success);
  color: #fff;
}

/* Connector lines between nodes */
.pc-step-line {
  flex: 1;
  height: 2px;
  background: var(--pc-border-med);
  transition: background 0.25s;
  min-width: 6px;
}
.pc-step-line.done {
  background: var(--pc-success);
}

/* "See all questions" toggle */
.pc-stepper-peek-btn {
  font-size: 11px;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Peek list */
.pc-stepper-peek-list {
  padding: 10px 16px 4px;
  background: rgba(246,185,29,0.03);
  border-bottom: 1px solid rgba(246,185,29,0.1);
}
.pc-stepper-peek-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 5px 0;
  font-size: 12px;
  color: var(--pc-text-muted);
  border-bottom: 1px dashed var(--pc-border);
}
.pc-stepper-peek-item:last-child { border-bottom: none; }
.pc-stepper-peek-item.answered { color: var(--pc-text); }
.pc-stepper-peek-num {
  flex-shrink: 0;
  font-weight: 700;
  font-size: 10.5px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--pc-surface-2);
  border: 1px solid var(--pc-border-med);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--pc-text-muted);
  margin-top: 1px;
}
.pc-stepper-peek-item.answered .pc-stepper-peek-num {
  background: var(--pc-success);
  border-color: var(--pc-success);
  color: #fff;
}
.pc-stepper-peek-text { flex: 1; line-height: 1.4; }
.pc-stepper-peek-ans {
  font-size: 11px;
  color: var(--pc-success);
  font-style: italic;
  margin-top: 2px;
}

/* Active question card */
.pc-stepper-card {
  padding: 16px 16px 4px;
}
.pc-stepper-question {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--pc-text);
  line-height: 1.45;
  margin-bottom: 10px;
}
.pc-stepper-input {
  width: 100%;
  padding: 9px 12px;
  font-size: 13px;
  font-family: var(--pc-font);
  color: var(--pc-text);
  background: var(--pc-surface);
  border: 1.5px solid var(--pc-border-med);
  border-radius: 8px;
  resize: vertical;
  min-height: 64px;
  line-height: 1.55;
  box-sizing: border-box;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.pc-stepper-input:focus {
  outline: none;
  border-color: var(--pc-accent);
  box-shadow: 0 0 0 3px var(--pc-accent-glow);
}
.pc-stepper-char {
  font-size: 11px;
  color: var(--pc-text-muted);
  text-align: right;
  margin-top: 4px;
  margin-bottom: 2px;
}

/* Nav row */
.pc-stepper-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px 14px;
  gap: 8px;
}
.pc-stepper-counter {
  font-size: 12px;
  color: var(--pc-text-muted);
  font-weight: 500;
  flex: 1;
  text-align: center;
}
.pc-btn-accent {
  background: rgba(246,185,29,0.1);
  color: var(--pc-accent);
  border: 1.5px solid rgba(246,185,29,0.3);
  font-weight: 700;
}
.pc-btn-accent:hover:not(:disabled) {
  background: rgba(246,185,29,0.18);
  border-color: var(--pc-accent);
}
.pc-btn-accent:disabled {
  opacity: 0.38;
  cursor: not-allowed;
}

/* Pay footer (last step only) */
.pc-complete-footer {
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  border-top: 1px solid var(--pc-border);
}

.pc-complete-price-note {
  font-size: 12px;
  color: var(--pc-text-muted);
}

.pc-btn-complete {
  width: 100%;
  justify-content: center;
  gap: 7px;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 700;
}

.pc-complete-skip {
  font-size: 12px;
  color: var(--pc-text-muted);
  margin: 0;
  text-align: center;
}

.pc-link-btn,
.pc-wrap .pc-link-btn,
.pc-wrap button.pc-link-btn {
  background: none !important;
  background-color: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin: 0 !important;
  font-size: inherit !important;
  color: var(--pc-accent) !important;
  cursor: pointer !important;
  text-decoration: underline !important;
  font-family: var(--pc-font) !important;
  font-weight: 500 !important;
  line-height: inherit !important;
  display: inline !important;
  width: auto !important;
  min-width: 0 !important;
}

.pc-link-btn:hover,
.pc-wrap .pc-link-btn:hover {
  opacity: 0.75 !important;
  color: var(--pc-accent) !important;
}

/* Stepper peek button specific — small and inline */
.pc-stepper-peek-btn {
  font-size: 11px !important;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
}

/* ── Completed result box ───────────────────────────────────── */

.pc-completed-result {
  margin-top: 20px;
}

.pc-completed-label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--pc-success);
  margin-bottom: 10px;
}

/* ── Stepper card slide animation ──────────────────────────── */
@keyframes pc-slide-in {
  from { opacity: 0; transform: translateX(14px); }
  to   { opacity: 1; transform: translateX(0); }
}
.pc-stepper-slide-in {
  animation: pc-slide-in 0.22s ease-out forwards;
}

/* ═══════════════════════════════════════════════════════════
   Independent Verification Scorecard
   Keeps the audit transparent: what was checked, what passed,
   what got auto-corrected, and the resulting score — not just
   a "trust us" badge. Colour stays inside the 10% action budget:
   the panel itself is neutral surface; only pass/fail dots and
   the score number use success/warn/accent.
   ═══════════════════════════════════════════════════════════ */

.pc-verify-panel {
  margin-top: 14px;
  border: 1px solid var(--pc-border);
  border-radius: var(--pc-radius);
  background: var(--pc-surface-2);
  overflow: hidden;
}

.pc-verify-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  cursor: pointer;
  user-select: none;
}

.pc-verify-header-icon {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(62,207,142,0.12);
  color: var(--pc-success);
}
.pc-verify-panel.--unavailable .pc-verify-header-icon {
  background: rgba(255,255,255,0.06);
  color: var(--pc-text-dim);
}

.pc-verify-header-text {
  flex: 1;
  min-width: 0;
}

.pc-verify-title {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--pc-text);
  line-height: 1.3;
}

.pc-verify-sub {
  font-size: 11.5px;
  color: var(--pc-text-muted);
  margin-top: 1px;
  line-height: 1.4;
}

.pc-verify-score {
  flex-shrink: 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--pc-accent);
  font-variant-numeric: tabular-nums;
  padding: 3px 9px;
  border-radius: 100px;
  background: var(--pc-accent-glow);
  border: 1px solid rgba(246,185,29,0.3);
}

.pc-verify-chevron {
  flex-shrink: 0;
  color: var(--pc-text-dim);
  transition: transform 0.2s;
}
.pc-verify-panel.--open .pc-verify-chevron {
  transform: rotate(180deg);
}

.pc-verify-list {
  display: none;
  flex-direction: column;
  padding: 2px 14px 12px;
  border-top: 1px solid var(--pc-border);
  margin-top: 2px;
}
.pc-verify-panel.--open .pc-verify-list {
  display: flex;
}

.pc-verify-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px dashed var(--pc-border);
}
.pc-verify-item:last-child { border-bottom: none; }

.pc-verify-item-icon {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  margin-top: 1px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pc-verify-item-icon.--pass { color: var(--pc-success); }
.pc-verify-item-icon.--repaired { color: var(--pc-warn); }
.pc-verify-item-icon.--unknown { color: var(--pc-text-dim); }

.pc-verify-item-body { flex: 1; min-width: 0; }

.pc-verify-item-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--pc-text);
  line-height: 1.4;
}

.pc-verify-item-note {
  font-size: 11.5px;
  color: var(--pc-text-muted);
  line-height: 1.45;
  margin-top: 1px;
}
