/* Prompt Change Diff Guard — Brand styles
 * Lawrence Holl warm-editorial palette (Blue Astrolabe spec, 2026-05-09)
 * Same anchor as IEP Parent Binder + Helper character system
 */

:root {
  /* Mira's Blue Astrolabe palette */
  --warm-cream:    #fff0dd;
  --warm-tint:     #fffaf1;
  --parchment:     #f6efe3;
  --pale-blue:     #e8f0ff;
  --royal-blue:    #2457c5;
  --deep-navy:     #173f96;
  --ink:           #201a14;
  --warm-gray:     #695f54;
  --beige-line:    #ded0bd;
  --sage-soft:     #c6d9bc;
  --green-confirm: #476c45;
  --amber-gold:    #9a6b24;
  --light-wheat:   #e3c493;
  --terracotta:    #8a5542;

  /* Type */
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

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

html, body {
  background: var(--warm-cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
  min-height: 100vh;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px;
}

header.brand {
  border-bottom: 1px solid var(--beige-line);
  padding-bottom: 16px;
  margin-bottom: 24px;
}

header.brand h1 {
  font-size: 28px;
  color: var(--royal-blue);
  letter-spacing: -0.01em;
  font-weight: 700;
  margin-bottom: 8px;
}

header.brand p.tagline {
  color: var(--warm-gray);
  margin-top: 4px;
  font-size: 14px;
}

header.brand p.tagline-bold {
  color: var(--ink);
  font-size: 17px;
  line-height: 1.5;
  margin-bottom: 6px;
  font-weight: 500;
  max-width: 760px;
}

header.brand p.tagline-meta {
  color: var(--warm-gray);
  font-size: 13px;
  margin-bottom: 18px;
  max-width: 760px;
}

.how-it-works {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 0 20px;
  padding: 14px 16px;
  background: var(--pale-blue);
  border-radius: 8px;
  flex-wrap: wrap;
}

.how-step {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--deep-navy);
  font-weight: 500;
}

.how-num {
  background: var(--royal-blue);
  color: white;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}

.how-arrow {
  color: var(--royal-blue);
  font-weight: 700;
  font-size: 18px;
}

@media (max-width: 720px) {
  .how-arrow { display: none; }
  .how-it-works { flex-direction: column; align-items: flex-start; }
}

.hero-cta {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.hero-cta button {
  font-size: 16px;
  padding: 14px 24px;
}

.hero-cta-meta {
  color: var(--warm-gray);
  font-size: 12px;
  font-style: italic;
}

section {
  background: var(--warm-tint);
  border: 1px solid var(--beige-line);
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
}

section h2 {
  font-size: 16px;
  color: var(--deep-navy);
  margin-bottom: 12px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

section h2 .step-num {
  display: inline-block;
  background: var(--royal-blue);
  color: white;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  margin-right: 8px;
  line-height: 22px;
}

.helper-text {
  color: var(--warm-gray);
  font-size: 13px;
  margin-bottom: 12px;
  font-style: italic;
}

textarea, input[type="text"], input[type="password"], select {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--beige-line);
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 13px;
  background: white;
  color: var(--ink);
  transition: border-color 120ms ease;
}

textarea:focus, input:focus, select:focus {
  outline: none;
  border-color: var(--royal-blue);
  box-shadow: 0 0 0 3px rgba(36, 87, 197, 0.15);
}

textarea {
  min-height: 140px;
  resize: vertical;
}

.two-column {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 720px) {
  .two-column { grid-template-columns: 1fr; }
}

.col-label {
  font-weight: 600;
  font-size: 13px;
  color: var(--ink);
  margin-bottom: 6px;
}

.col-label .badge-old { color: var(--terracotta); font-size: 11px; margin-left: 6px; }
.col-label .badge-new { color: var(--green-confirm); font-size: 11px; margin-left: 6px; }

button.primary {
  background: var(--royal-blue);
  color: white;
  border: none;
  padding: 12px 28px;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 120ms ease;
}

button.primary:hover { background: var(--deep-navy); }
button.primary:disabled { background: var(--beige-line); color: var(--warm-gray); cursor: not-allowed; }

button.secondary {
  background: transparent;
  color: var(--royal-blue);
  border: 1px solid var(--royal-blue);
  padding: 10px 20px;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  transition: background 120ms ease;
}
button.secondary:hover { background: var(--pale-blue); }

.sample-cases {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sample-case {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.sample-case-num {
  background: var(--pale-blue);
  color: var(--deep-navy);
  font-weight: 600;
  border-radius: 4px;
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  margin-top: 4px;
}

.sample-case input {
  flex: 1;
}

.sample-case button.remove-case {
  background: transparent;
  border: 1px solid var(--terracotta);
  color: var(--terracotta);
  padding: 6px 10px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
}

.add-case-row { margin-top: 8px; }

.diff-results {
  margin-top: 24px;
}

.diff-case {
  background: white;
  border: 1px solid var(--beige-line);
  border-left: 4px solid var(--royal-blue);
  border-radius: 6px;
  padding: 16px;
  margin-bottom: 16px;
}

.diff-case .input-label {
  color: var(--warm-gray);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}

.diff-case .input-text {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--ink);
  padding: 8px;
  background: var(--parchment);
  border-radius: 4px;
  margin-bottom: 12px;
}

.diff-case .outputs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 720px) {
  .diff-case .outputs { grid-template-columns: 1fr; }
}

.output-pane {
  background: var(--warm-tint);
  border: 1px solid var(--beige-line);
  border-radius: 4px;
  padding: 10px;
}

.output-pane h3 {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}

.output-pane.old h3 { color: var(--terracotta); }
.output-pane.new h3 { color: var(--green-confirm); }

.output-pane pre {
  white-space: pre-wrap;
  word-wrap: break-word;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.5;
  color: var(--ink);
}

.diff-labels {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.diff-label {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
}

.diff-label.length    { background: var(--pale-blue);  color: var(--deep-navy); }
.diff-label.tone      { background: var(--light-wheat); color: var(--amber-gold); }
.diff-label.behavior  { background: rgba(138,85,66,0.15); color: var(--terracotta); }
.diff-label.minimal   { background: var(--sage-soft); color: var(--green-confirm); }

.reviewer-note {
  margin-top: 12px;
}

.reviewer-note label {
  font-size: 12px;
  color: var(--warm-gray);
  display: block;
  margin-bottom: 4px;
}

.reviewer-note textarea {
  min-height: 60px;
  font-family: var(--font-body);
  font-size: 13px;
}

footer.disclaimer {
  margin-top: 40px;
  padding: 16px;
  background: var(--parchment);
  border: 1px solid var(--beige-line);
  border-radius: 6px;
  color: var(--warm-gray);
  font-size: 12px;
  line-height: 1.6;
}

footer.disclaimer strong { color: var(--ink); }

.footer-brand {
  display: block;
  margin-top: 8px;
  color: var(--royal-blue, #2457c5);
  font-size: 11px;
  font-style: italic;
  letter-spacing: 0.02em;
}

.controls-row {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.controls-row .status-text {
  color: var(--warm-gray);
  font-size: 13px;
}

.kbd-hint {
  color: var(--warm-gray);
  font-size: 12px;
}

.kbd-hint kbd {
  font-family: var(--font-mono);
  background: var(--parchment);
  border: 1px solid var(--beige-line);
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 11px;
  color: var(--ink);
}

.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--warm-gray);
}

.empty-state .empty-icon {
  font-size: 36px;
  margin-bottom: 12px;
  opacity: 0.5;
}

/* License-activated success banner */
.license-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-radius: 8px;
  margin-bottom: 20px;
  font-size: 14px;
  line-height: 1.5;
}

.license-banner-success {
  background: var(--sage-soft);
  border: 1px solid var(--green-confirm);
  color: var(--ink);
}

.license-banner-icon {
  background: var(--green-confirm);
  color: white;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
  flex-shrink: 0;
}

.license-banner-close {
  background: transparent;
  border: none;
  color: var(--warm-gray);
  font-size: 20px;
  cursor: pointer;
  margin-left: auto;
  line-height: 1;
  padding: 0 4px;
}

.license-banner-close:hover { color: var(--ink); }

/* License-required gate (replaces Real Mode fields when no license) */
.license-gate {
  grid-column: 1 / -1;
  background: var(--parchment);
  border: 2px solid var(--royal-blue);
  border-radius: 12px;
  padding: 28px;
  text-align: center;
}

.license-gate-icon {
  font-size: 36px;
  margin-bottom: 8px;
}

.license-gate h3 {
  color: var(--deep-navy);
  font-size: 18px;
  margin-bottom: 8px;
  font-weight: 700;
}

.license-gate p {
  color: var(--ink);
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 16px;
  max-width: 540px;
  margin-left: auto;
  margin-right: auto;
}

.license-gate-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.license-gate-buy {
  font-size: 16px !important;
  padding: 14px 28px !important;
  text-decoration: none;
  display: inline-block;
}

.license-gate-meta {
  font-size: 12px !important;
  color: var(--warm-gray) !important;
  margin-bottom: 0 !important;
}

/* Demo/Real mode toggle */
.mode-toggle {
  display: inline-flex;
  background: var(--parchment);
  border: 1px solid var(--beige-line);
  border-radius: 999px;
  padding: 4px;
  gap: 4px;
  margin-bottom: 12px;
}

.mode-pill {
  background: transparent;
  border: none;
  color: var(--warm-gray);
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 120ms ease;
}

.mode-pill:hover { color: var(--ink); }

.mode-pill-active,
.mode-pill-active:hover {
  background: var(--royal-blue);
  color: white;
}

/* Demo mode badge on result cards */
.demo-badge {
  display: inline-block;
  background: var(--light-wheat);
  color: var(--amber-gold);
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  margin-left: 8px;
  vertical-align: middle;
}

/* Spinner for run button */
.spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: pdg-spin 0.7s linear infinite;
  vertical-align: middle;
  margin-right: 4px;
}

@keyframes pdg-spin {
  to { transform: rotate(360deg); }
}

/* Results summary strip — appears above per-case cards */
.results-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin: 16px 0;
  padding: 16px;
  background: var(--warm-tint);
  border: 1px solid var(--beige-line);
  border-radius: 8px;
}

.summary-stat {
  text-align: center;
  padding: 8px;
  border-radius: 6px;
  background: white;
  border: 1px solid var(--beige-line);
}

.summary-stat-good { border-color: var(--green-confirm); background: var(--sage-soft); }
.summary-stat-warn { border-color: var(--amber-gold); background: var(--light-wheat); }
.summary-stat-error { border-color: var(--terracotta); background: rgba(138,85,66,0.12); }

.summary-num {
  font-size: 32px;
  font-weight: 700;
  color: var(--royal-blue);
  line-height: 1;
  margin-bottom: 4px;
}

.summary-stat-good .summary-num { color: var(--green-confirm); }
.summary-stat-warn .summary-num { color: var(--amber-gold); }
.summary-stat-error .summary-num { color: var(--terracotta); }

.summary-label {
  font-size: 11px;
  color: var(--warm-gray);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

/* Per-case error rendering */
.diff-case-error {
  border-left-color: var(--terracotta) !important;
  background: rgba(138, 85, 66, 0.04);
}

.case-error {
  background: rgba(138, 85, 66, 0.08);
  border: 1px solid rgba(138, 85, 66, 0.3);
  border-radius: 4px;
  padding: 12px;
  margin-top: 8px;
}

.case-error-kind {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--terracotta);
  font-weight: 700;
  margin-bottom: 4px;
}

.case-error-message {
  color: var(--ink);
  font-size: 13px;
  line-height: 1.5;
}
