/* SAVP — supplementary styles.
   Tailwind handles most of it; this file is for things Tailwind utility
   classes don't express cleanly, plus typography setup for Inter +
   JetBrains Mono loaded via Google Fonts in the renderer. */

:root {
  --savp-ink: #0f172a;       /* slate-900 */
  --savp-paper: #ffffff;
  --savp-accent: #0e7490;    /* cyan-700 — civic, not playful */
  --savp-accent-bg: #ecfeff; /* cyan-50 */
  --savp-bind: #b45309;      /* amber-700 — for binding commitments */
  --savp-bind-bg: #fffbeb;
  --savp-pass: #047857;      /* emerald-700 */
  --savp-fail: #b91c1c;      /* red-700 */
}

html {
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-feature-settings: "ss01", "cv11";
  letter-spacing: -0.005em;
}

h1, h2, h3, h4 {
  letter-spacing: -0.02em;
}

.savp-mono {
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-feature-settings: "calt", "ss01";
}

/* Smooth scroll for anchor jumps from the landing page */
html {
  scroll-behavior: smooth;
}

/* ──────────────────────────────────────────────────────── */
/* Tool surface                                             */
/* ──────────────────────────────────────────────────────── */

/* Active tab indicator */
.tab-button {
  position: relative;
}
.tab-button::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: var(--savp-accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 180ms ease;
}
.tab-button.is-active::after {
  transform: scaleX(1);
}

/* Transcript turn rendering */
.transcript-turn {
  border-left: 3px solid transparent;
  padding: 0.6rem 0.875rem;
  border-radius: 0 4px 4px 0;
  transition: background-color 120ms ease;
}
.transcript-turn.binding {
  border-left-color: var(--savp-bind);
  background-color: var(--savp-bind-bg);
}
.transcript-turn.binding::before {
  content: "ON THE RECORD";
  display: inline-block;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--savp-bind);
  margin-right: 0.5rem;
  vertical-align: 0.1rem;
  background: rgba(180, 83, 9, 0.08);
  padding: 0.05rem 0.375rem;
  border-radius: 2px;
}

/* Verification check rows — rendered as a vertical timeline */
.check-row {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 0.75rem;
  align-items: start;
  padding: 0.625rem 0;
  border-bottom: 1px solid #f1f5f9;
  position: relative;
}
.check-row:last-child {
  border-bottom: none;
}
.check-row .check-icon {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  flex-shrink: 0;
}
.check-row.passed .check-icon {
  background: #d1fae5;
  color: var(--savp-pass);
}
.check-row.failed .check-icon {
  background: #fee2e2;
  color: var(--savp-fail);
}
.check-row.advisory.passed .check-icon {
  background: #f1f5f9;
  color: #64748b;
}
.check-name {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--savp-ink);
}
.check-detail {
  font-size: 0.78rem;
  color: #475569;
  line-height: 1.45;
  margin-top: 0.125rem;
}
.check-category {
  display: inline-block;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.625rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #64748b;
  margin-right: 0.5rem;
  background: #f8fafc;
  padding: 0.05rem 0.4rem;
  border-radius: 3px;
  border: 1px solid #e2e8f0;
}
.check-advisory-tag {
  display: inline-block;
  font-size: 0.625rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #64748b;
  margin-left: 0.375rem;
}

/* Result summary card */
.result-summary {
  border-radius: 6px;
  padding: 1rem 1.125rem;
  margin-bottom: 1rem;
  border-width: 1px;
  border-style: solid;
}
.result-summary.valid {
  background: #ecfdf5;
  border-color: #6ee7b7;
  color: #064e3b;
}
.result-summary.invalid {
  background: #fef2f2;
  border-color: #fca5a5;
  color: #7f1d1d;
}

/* Tag pills */
.tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.125rem 0.5rem;
  border-radius: 9999px;
  letter-spacing: 0.02em;
}
.tag-resolved { background: #d1fae5; color: #065f46; }
.tag-partially-resolved { background: #fef3c7; color: #92400e; }
.tag-escalated { background: #fed7aa; color: #9a3412; }
.tag-failed { background: #fecaca; color: #991b1b; }
.tag-disputed { background: #e9d5ff; color: #6b21a8; }
.tag-active { background: #d1fae5; color: #065f46; }
.tag-suspended { background: #fef3c7; color: #92400e; }
.tag-revoked { background: #fecaca; color: #991b1b; }
.tag-pending_approval { background: #e0f2fe; color: #075985; }
.tag-approved { background: #d1fae5; color: #065f46; }
.tag-rejected { background: #fecaca; color: #991b1b; }
.tag-completed { background: #e2e8f0; color: #334155; }

textarea.savp-paste {
  min-height: 22rem;
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, monospace;
  font-size: 0.78rem;
  line-height: 1.55;
  background: #fafafa;
}
textarea.savp-paste:focus {
  background: #ffffff;
}

/* Subtle scrollbars in long lists */
.scroll-region {
  max-height: 28rem;
  overflow-y: auto;
}
.scroll-region::-webkit-scrollbar { width: 8px; }
.scroll-region::-webkit-scrollbar-track { background: transparent; }
.scroll-region::-webkit-scrollbar-thumb {
  background: #e2e8f0;
  border-radius: 4px;
}
.scroll-region::-webkit-scrollbar-thumb:hover { background: #cbd5e1; }

/* JSON pretty-print container */
.json-pretty {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.72rem;
  line-height: 1.5;
  background: #0f172a;
  color: #e2e8f0;
  padding: 0.875rem;
  border-radius: 6px;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-all;
}
.json-pretty .jk { color: #67e8f9; }   /* keys */
.json-pretty .js { color: #fcd34d; }   /* strings */
.json-pretty .jn { color: #f9a8d4; }   /* numbers */
.json-pretty .jb { color: #c4b5fd; }   /* bool/null */

/* ──────────────────────────────────────────────────────── */
/* Landing page touches                                     */
/* ──────────────────────────────────────────────────────── */

.hero-grid-bg {
  background-image: linear-gradient(to right, #0f172a 1px, transparent 1px),
    linear-gradient(to bottom, #0f172a 1px, transparent 1px);
  background-size: 32px 32px;
  opacity: 0.025;
}

@keyframes pulse-soft {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}
