/* ==========================================================================
   ATS X-RAY — Design System & Core Stylesheet
   Aesthetic: Editorial Swiss Diagnostic & High-Trust Typography
   ========================================================================== */

:root {
  /* Color Palette — Warm Archival Paper & Clinical Charcoal */
  --bg-canvas: hsl(40, 23%, 96%);
  --bg-surface: hsl(40, 30%, 99%);
  --bg-recessed: hsl(38, 18%, 92%);
  --bg-terminal: hsl(210, 15%, 12%);
  --bg-terminal-elevated: hsl(210, 14%, 16%);

  /* Typography Colors */
  --text-primary: hsl(210, 20%, 12%);
  --text-secondary: hsl(210, 10%, 36%);
  --text-muted: hsl(210, 8%, 52%);
  --text-terminal: hsl(45, 20%, 90%);
  --text-terminal-dim: hsl(210, 10%, 60%);

  /* Semantic Status Colors */
  --status-critical: hsl(6, 74%, 46%);
  --status-critical-bg: hsl(6, 78%, 95%);
  --status-warning: hsl(32, 88%, 44%);
  --status-warning-bg: hsl(36, 90%, 94%);
  --status-pass: hsl(152, 58%, 30%);
  --status-pass-bg: hsl(150, 52%, 93%);

  /* Interactive & Brand Tokens */
  --brand-ink: hsl(210, 22%, 14%);
  --brand-action: hsl(16, 82%, 44%);
  --brand-action-hover: hsl(16, 85%, 38%);
  --border-subtle: hsl(38, 15%, 85%);
  --border-strong: hsl(210, 14%, 74%);
  --border-terminal: hsl(210, 12%, 24%);

  /* Elevation & Depth */
  --shadow-sm: 0 1px 2px rgba(20, 24, 28, 0.05);
  --shadow-md: 0 6px 20px -4px rgba(20, 24, 28, 0.08), 0 2px 6px -1px rgba(20, 24, 28, 0.04);
  --shadow-lg: 0 20px 40px -12px rgba(20, 24, 28, 0.14), 0 4px 12px -2px rgba(20, 24, 28, 0.06);

  /* Typography Families */
  --font-serif: 'Instrument Serif', Georgia, serif;
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Layout & Spacing */
  --container-max: 1220px;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --transition-fast: 150ms cubic-bezier(0.22, 1, 0.36, 1);
  --transition-smooth: 260ms cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-canvas);
  color: var(--text-primary);
  line-height: 1.55;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Subtle paper grain texture via SVG data URI */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* ==========================================================================
   Header & Top Navigation
   ========================================================================== */

.site-header {
  border-bottom: 1px solid var(--border-subtle);
  background-color: hsla(40, 23%, 96%, 0.92);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0.875rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand-logo {
  display: flex;
  align-items: baseline;
  gap: 0.625rem;
  text-decoration: none;
  color: var(--text-primary);
}

.brand-mark {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: -0.02em;
  background: var(--brand-ink);
  color: var(--bg-surface);
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
}

.brand-subtitle {
  font-size: 0.82rem;
  color: var(--text-secondary);
  font-weight: 500;
}

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

.header-link {
  font-size: 0.875rem;
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  transition: color var(--transition-fast);
  background: none;
  border: none;
  cursor: pointer;
}

.header-link:hover {
  color: var(--text-primary);
}

.header-price-tag {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  background: var(--bg-recessed);
  padding: 0.3rem 0.6rem;
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-weight: 600;
}

/* ==========================================================================
   Hero & Value Proposition
   ========================================================================== */

.main-container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 2.5rem 1.5rem 5rem;
  width: 100%;
  flex: 1;
}

.hero-section {
  max-width: 820px;
  margin: 0 auto 2.5rem;
  text-align: center;
}

.hero-kicker {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
  display: block;
}

.hero-title {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(2.35rem, 4.8vw, 3.6rem);
  line-height: 1.08;
  letter-spacing: -0.015em;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.hero-title em {
  font-style: italic;
  text-decoration: underline;
  text-decoration-color: var(--brand-action);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.hero-lead {
  font-size: 1.08rem;
  color: var(--text-secondary);
  max-width: 640px;
  margin: 0 auto 1.5rem;
  line-height: 1.6;
}

.system-compat-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--text-muted);
  padding-top: 0.5rem;
}

.system-compat-item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

/* ==========================================================================
   Control Bar & Input Workbench
   ========================================================================== */

.workbench-controls {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.5rem;
  display: grid;
  grid-template-columns: 1.25fr 1fr auto;
  gap: 1.25rem;
  align-items: start;
}

.workbench-controls > .control-group:last-child {
  padding-top: 1.62rem;
}

.control-group {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.control-label {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 1.2rem;
}

.source-mode-pill {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 700;
  padding: 0.12rem 0.48rem;
  border-radius: var(--radius-sm);
  letter-spacing: 0.04em;
}

.source-mode-pill.mode-demo {
  background: var(--bg-recessed);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
}

.source-mode-pill.mode-uploaded {
  background: var(--status-pass-bg);
  color: var(--status-pass);
  border: 1px solid #86EFAC;
}

.source-subbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.15rem;
}

.source-subbar.hidden {
  display: none !important;
}

.source-subbar-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
}

.uploaded-subbar {
  background: var(--status-pass-bg);
  border: 1px solid #BBF7D0;
  border-radius: var(--radius-sm);
  padding: 0.25rem 0.6rem;
}

.uploaded-confirm-text {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--status-pass);
}

.btn-reset-samples {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-secondary);
  background: transparent;
  border: none;
  text-decoration: underline;
  cursor: pointer;
  padding: 0;
}

.btn-reset-samples:hover {
  color: var(--text-primary);
}

.sample-pills {
  display: inline-flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.sample-btn {
  font-family: var(--font-mono);
  font-size: 0.69rem;
  background: var(--bg-recessed);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  outline: none;
  transition: background var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast);
}

.sample-btn:hover {
  border-color: var(--border-strong);
  color: var(--text-primary);
}

.sample-btn.active {
  background: var(--brand-ink);
  color: var(--bg-surface);
  border-color: var(--brand-ink);
  font-weight: 600;
}

.file-drop-zone {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  border: 1px dashed var(--border-strong);
  background: var(--bg-canvas);
  padding: 0.65rem 0.9rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color var(--transition-fast), background var(--transition-fast);
}

.file-drop-zone:hover,
.file-drop-zone.drag-over {
  border-color: var(--brand-action);
  background: var(--bg-surface);
}

.file-drop-zone.has-uploaded-file {
  border: 1.5px solid var(--status-pass);
  background: #F4FBF7;
}

.file-drop-text {
  font-size: 0.86rem;
  color: var(--text-secondary);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-drop-zone.has-uploaded-file .file-drop-text {
  color: var(--text-primary);
  font-weight: 600;
}

.file-drop-badge {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  flex-shrink: 0;
}

.file-drop-zone.has-uploaded-file .file-drop-badge {
  border-color: #86EFAC;
  color: var(--status-pass);
  font-weight: 600;
}

.select-input {
  width: 100%;
  font-family: var(--font-sans);
  font-size: 0.88rem;
  padding: 0.68rem 0.85rem;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  background-color: var(--bg-canvas);
  color: var(--text-primary);
  font-weight: 500;
  cursor: pointer;
}

.select-input:focus {
  outline: 2px solid var(--brand-ink);
  outline-offset: 1px;
}

.btn-primary {
  font-family: var(--font-sans);
  font-size: 0.92rem;
  font-weight: 600;
  background-color: var(--brand-action);
  color: #fff;
  border: none;
  padding: 0.75rem 1.35rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background-color var(--transition-fast), transform var(--transition-fast);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  white-space: nowrap;
}

.btn-primary:hover {
  background-color: var(--brand-action-hover);
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  font-family: var(--font-sans);
  font-size: 0.86rem;
  font-weight: 600;
  background-color: var(--bg-surface);
  color: var(--text-primary);
  border: 1px solid var(--border-strong);
  padding: 0.6rem 1rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background-color var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.btn-secondary:hover {
  background-color: var(--bg-recessed);
}

/* Custom JD Drawer */
.custom-jd-panel {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1rem 1.5rem;
  margin-bottom: 1.5rem;
  display: none;
}

.custom-jd-panel.open {
  display: block;
}

.textarea-input {
  width: 100%;
  min-height: 90px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  padding: 0.75rem;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  background: var(--bg-canvas);
  color: var(--text-primary);
  resize: vertical;
  margin-top: 0.5rem;
}

/* ==========================================================================
   Diagnostic Score Strip
   ========================================================================== */

.diagnostic-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.metric-cell {
  padding: 1.15rem 1.35rem;
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.metric-cell:last-child {
  border-right: none;
}

.metric-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  margin-bottom: 0.35rem;
}

.metric-value-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
}

.metric-number {
  font-family: var(--font-serif);
  font-size: 2.2rem;
  line-height: 1;
  font-weight: 400;
}

.metric-badge {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-sm);
}

.badge-critical {
  background: var(--status-critical-bg);
  color: var(--status-critical);
}

.badge-warning {
  background: var(--status-warning-bg);
  color: var(--status-warning);
}

.badge-pass {
  background: var(--status-pass-bg);
  color: var(--status-pass);
}

.metric-subtext {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
}

/* ==========================================================================
   Side-by-Side Split X-Ray View
   ========================================================================== */

.xray-workspace {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 2rem;
  align-items: stretch;
}

.pane-card {
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 540px;
  box-shadow: var(--shadow-md);
}

.pane-human {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
}

.pane-robot {
  background: var(--bg-terminal);
  border: 1px solid var(--border-terminal);
  color: var(--text-terminal);
}

.pane-header {
  padding: 0.85rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
}

.pane-robot .pane-header {
  border-bottom-color: var(--border-terminal);
  background: var(--bg-terminal-elevated);
}

.pane-title-group {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.pane-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.indicator-human {
  background: var(--status-pass);
}

.indicator-robot {
  background: var(--status-critical);
}

.pane-title {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.pane-tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-sm);
  background: var(--bg-recessed);
  color: var(--text-secondary);
}

.pane-robot .pane-tag {
  background: hsla(0, 0%, 100%, 0.08);
  color: var(--text-terminal-dim);
}

.pane-body {
  padding: 1.5rem;
  flex: 1;
  overflow-y: auto;
  max-height: 560px;
}

/* Visual Mock Resume (What You See) */
.resume-visual-sheet {
  background: #fff;
  border: 1px solid var(--border-subtle);
  padding: 1.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  line-height: 1.45;
  box-shadow: var(--shadow-sm);
}

.rv-header {
  border-bottom: 2px solid var(--text-primary);
  padding-bottom: 0.75rem;
  margin-bottom: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

.rv-name {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  line-height: 1.1;
}

.rv-contact {
  font-size: 0.72rem;
  color: var(--text-secondary);
  text-align: right;
}

.rv-two-col {
  display: grid;
  grid-template-columns: 1.65fr 1fr;
  gap: 1.25rem;
}

.rv-one-col {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.rv-section-title {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 0.2rem;
  margin: 0.85rem 0 0.5rem;
  font-weight: 700;
}

.rv-section-title:first-child {
  margin-top: 0;
}

.rv-job-title {
  font-weight: 700;
  color: var(--text-primary);
}

.rv-job-meta {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.rv-list {
  padding-left: 1rem;
  margin-bottom: 0.65rem;
}

.rv-list li {
  margin-bottom: 0.25rem;
}

.rv-trap-highlight {
  position: relative;
  background: hsla(6, 78%, 50%, 0.08);
  border-bottom: 1px dashed var(--status-critical);
  padding: 0 2px;
}

.rv-skill-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.74rem;
  margin-bottom: 0.3rem;
}

.rv-dots {
  font-family: var(--font-mono);
  letter-spacing: 1px;
  color: var(--brand-action);
}

/* Robot Terminal Stream (What Workday/Taleo Sees) */
.terminal-stream {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  line-height: 1.65;
}

.terminal-log-entry {
  padding: 0.65rem 0.8rem;
  border-radius: var(--radius-sm);
  margin-bottom: 0.6rem;
  background: var(--bg-terminal-elevated);
  border-left: 3px solid transparent;
}

.terminal-log-entry.entry-error {
  border-left-color: var(--status-critical);
  background: hsla(6, 74%, 46%, 0.14);
}

.terminal-log-entry.entry-warn {
  border-left-color: var(--status-warning);
  background: hsla(32, 88%, 44%, 0.12);
}

.terminal-log-entry.entry-ok {
  border-left-color: var(--status-pass);
}

.log-tag {
  display: inline-block;
  font-size: 0.66rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 0.1rem 0.35rem;
  border-radius: 3px;
  margin-bottom: 0.3rem;
}

.tag-err {
  background: var(--status-critical);
  color: #fff;
}

.tag-warn {
  background: var(--status-warning);
  color: #fff;
}

.tag-ok {
  background: var(--status-pass);
  color: #fff;
}

.raw-line {
  color: var(--text-terminal);
  word-break: break-word;
}

.raw-note {
  font-size: 0.72rem;
  color: var(--text-terminal-dim);
  margin-top: 0.25rem;
}

/* ==========================================================================
   Paywall & $3.99 Instant Fix Unlock Section
   ========================================================================== */

.unlock-section {
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-lg);
  margin-bottom: 2.5rem;
  position: relative;
  overflow: hidden;
}

.unlock-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 2rem;
  align-items: center;
}

.unlock-headline {
  font-family: var(--font-serif);
  font-size: 2rem;
  line-height: 1.15;
  margin-bottom: 0.65rem;
}

.unlock-desc {
  color: var(--text-secondary);
  font-size: 0.96rem;
  margin-bottom: 1.25rem;
}

.keyword-preview-box {
  background: var(--bg-canvas);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  margin-bottom: 1.25rem;
}

.kw-header {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 0.65rem;
  display: flex;
  justify-content: space-between;
}

.kw-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.kw-chip {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 0.25rem 0.55rem;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.kw-matched {
  background: var(--status-pass-bg);
  color: var(--status-pass);
}

.kw-missing {
  background: var(--status-critical-bg);
  color: var(--status-critical);
}

.kw-locked {
  background: var(--bg-recessed);
  color: var(--text-muted);
  filter: blur(3.5px);
  user-select: none;
}

.unlock-offer-card {
  background: var(--bg-canvas);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.price-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 0.85rem;
}

.price-amount {
  font-family: var(--font-serif);
  font-size: 2.6rem;
  line-height: 1;
}

.price-period {
  font-size: 0.82rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.deliverables-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  font-size: 0.86rem;
  color: var(--text-primary);
}

.deliverables-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.check-mark {
  color: var(--status-pass);
  font-weight: 700;
  font-family: var(--font-mono);
}

.guarantee-note {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
}

/* ==========================================================================
   Unlocked Deliverable Studio (Shown after $3.99 Purchase)
   ========================================================================== */

.unlocked-studio {
  display: none;
  background: var(--bg-surface);
  border: 2px solid var(--status-pass);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-lg);
  margin-bottom: 2.5rem;
}

.unlocked-studio.visible {
  display: block;
}

.studio-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 1.25rem;
  margin-bottom: 1.5rem;
}

.download-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.studio-editor-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 1.5rem;
}

.fixed-resume-editor {
  width: 100%;
  min-height: 420px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  line-height: 1.6;
  padding: 1.25rem;
  background: #fff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
}

/* ==========================================================================
   Checkout Modal
   ========================================================================== */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 18, 22, 0.62);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1.5rem;
}

.modal-backdrop.open {
  display: flex;
}

.checkout-modal {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  max-width: 480px;
  width: 100%;
  padding: 2rem;
  box-shadow: var(--shadow-lg);
  position: relative;
}

.modal-close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  background: none;
  border: none;
  font-size: 1.25rem;
  cursor: pointer;
  color: var(--text-secondary);
}

.checkout-summary {
  background: var(--bg-canvas);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.9rem 1rem;
  margin: 1rem 0 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.form-field {
  margin-bottom: 0.9rem;
}

.form-field label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.35rem;
}

.form-field input {
  width: 100%;
  padding: 0.65rem 0.8rem;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: #fff;
}

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

/* ==========================================================================
   YouTube Ads PM Telemetry & GTM Debugger Drawer
   ========================================================================== */

.ads-telemetry-drawer {
  background: var(--bg-terminal);
  color: var(--text-terminal);
  border-top: 2px solid var(--brand-action);
  padding: 1.25rem 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.76rem;
}

.telemetry-inner {
  max-width: var(--container-max);
  margin: 0 auto;
}

.telemetry-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 0.85rem;
}

.telemetry-controls {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.telemetry-input {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  padding: 0.35rem 0.6rem;
  background: var(--bg-terminal-elevated);
  border: 1px solid var(--border-terminal);
  color: var(--text-terminal);
  border-radius: var(--radius-sm);
}

.telemetry-event-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  max-height: 180px;
  overflow-y: auto;
  background: var(--bg-terminal-elevated);
  padding: 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-terminal);
}

.telemetry-event-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid hsla(0, 0%, 100%, 0.06);
}

.site-footer {
  border-top: 1px solid var(--border-subtle);
  padding: 1.5rem;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

@media (max-width: 960px) {
  .workbench-controls {
    grid-template-columns: 1fr;
  }
  .diagnostic-strip {
    grid-template-columns: repeat(2, 1fr);
  }
  .xray-workspace,
  .unlock-grid,
  .studio-editor-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .diagnostic-strip {
    grid-template-columns: 1fr;
  }
  .header-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ==========================================================================
   Visual PDF Page Renderer & Diagnostic X-Ray Bounding Box Overlays
   ========================================================================== */

.pdf-page-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  padding: 0.5rem 0.75rem;
  background: var(--bg-canvas);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.72rem;
}

.pdf-page-viewport {
  position: relative;
  width: 100%;
  background: #fff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.pdf-page-img {
  display: block;
  width: 100%;
  height: auto;
  user-select: none;
}

.xray-overlay-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  transition: opacity var(--transition-fast);
}

.xray-overlay-layer.hidden {
  opacity: 0;
}

.xray-trap-box {
  position: absolute;
  border: 1.5px dashed var(--status-critical);
  background: hsla(6, 78%, 48%, 0.11);
  border-radius: 3px;
  pointer-events: auto;
  transition: background var(--transition-fast);
}

.xray-trap-box:hover {
  background: hsla(6, 78%, 48%, 0.22);
}

.xray-trap-box.trap-warn {
  border-color: var(--status-warning);
  background: hsla(32, 88%, 44%, 0.12);
}

.xray-trap-tag {
  position: absolute;
  top: -19px;
  left: -1px;
  background: var(--status-critical);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 2px;
  white-space: nowrap;
  letter-spacing: 0.02em;
}

.xray-trap-box.trap-warn .xray-trap-tag {
  background: var(--status-warning);
}

.xray-scanline-divider {
  position: absolute;
  top: 10%;
  bottom: 4%;
  width: 0;
  border-left: 2px dotted var(--status-critical);
  pointer-events: none;
}

/* ==========================================================================
   CRO Upgrades: Live Peekaboo Blurred Preview & 3-Step Checkout Box
   ========================================================================== */

.peekaboo-preview-card {
  background: var(--bg-canvas);
  border: 1.5px solid var(--status-pass);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow-sm);
}

.peekaboo-toolbar {
  background: var(--status-pass-bg);
  border-bottom: 1px solid hsla(152, 68%, 28%, 0.2);
  padding: 0.55rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.peekaboo-sheet {
  background: #fff;
  padding: 1.25rem 1.4rem;
  position: relative;
}

.peekaboo-clear-zone {
  padding-bottom: 0.5rem;
}

.peekaboo-blur-wrapper {
  position: relative;
  overflow: hidden;
  max-height: 165px;
  border-top: 1px dashed var(--border-subtle);
  padding-top: 0.5rem;
}

.peekaboo-blurred-zone {
  filter: blur(4.8px);
  opacity: 0.68;
  user-select: none;
  pointer-events: none;
}

.peekaboo-lock-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0.94) 80%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.peekaboo-lock-pill {
  background: var(--text-primary);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 0.65rem 1.2rem;
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  transition: transform var(--transition-fast), background var(--transition-fast);
}

.peekaboo-lock-pill:hover {
  background: var(--brand-action);
  transform: translateY(-1px);
}

.checkout-steps-box {
  background: #fff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.75rem 0.95rem;
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.checkout-steps-title {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.35rem;
}

.checkout-step-item {
  line-height: 1.45;
  margin-bottom: 0.2rem;
}

