/* ============================================================
   MyTCRPlus API — INSTRUMENT-DARK DESIGN SYSTEM
   Site-agnostic instrument-panel surface applied to api.mytcrplus.com.
   Keeps the target IA, pages, objects, labels, and jobs.

   Kit: live constellation field, green-black wash, sticky
   translucent nav, campaign banner, stats plates, dual-column
   row lists, catalog cards, status chips, black-on-accent
   controls, hairline plates, 2px accent focus.

   Tokens: --accent #76B900 · canvas #070807 · plates + 1px line.
   ============================================================ */
:root {
  --accent: #76B900;
  --accent-press: #5A8D00;
  --accent-hover: #8AD400;
  --on-accent: #0A0A0A;
  --canvas: #070807;
  --canvas-mid: #0C0E0C;
  --plate: #111311;
  --recess: #161916;
  --plate-hover: #1C1F1C;
  --line: #2A2E2A;
  --line-strong: #3A403A;
  --ink: #F5F5F5;
  --ink-2: #C8CBC8;
  --mute: #8B908B;
  --mute-dim: #6A6E6A;
  --info: #3B6BFF;
  --info-tint: #00112c;
  --ok: #5FBF00;
  --ok-tint: #0d1a00;
  --warn: #E8B800;
  --warn-tint: #2d0b00;
  --danger: #E52020;
  --danger-tint: #2d0100;
  --font-sans: "Inter", ui-sans-serif, system-ui, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --r-ctl: 6px;
  --r-plate: 14px;
  --r-card: 16px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  background: var(--canvas) !important;
  color: var(--ink) !important;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
/* keep the page canvas, not a plate — body.bg-slate-50 beats `body` by specificity */
body.bg-slate-50 { background: var(--canvas) !important; }

/* ── Live constellation field + green-black wash ──────── */
#id-net {
  position: fixed; inset: 0;
  width: 100%; height: 100%;
  z-index: 0; pointer-events: none;
}
.id-wash {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 90% 70% at 8% -10%, rgba(118,185,0,.20), transparent 52%),
    radial-gradient(ellipse 50% 42% at 82% 6%, rgba(118,185,0,.07), transparent 50%),
    linear-gradient(180deg, rgba(7,8,7,.12) 0%, rgba(7,8,7,.84) 46%, #070807 72%);
}
/* real content above the fixed field */
body > header, body > nav, body > main, body > footer,
header, footer, main, .max-w-7xl, .max-w-6xl, .min-h-screen,
#app, #app-shell, .app-shell { position: relative; z-index: 1; }

/* ── Typography ───────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 { color: var(--ink) !important; font-family: var(--font-sans); }
code, pre, .mono, .font-mono, [class*="font-mono"] {
  font-family: var(--font-mono) !important;
}
a { color: inherit; }
::selection { background: var(--accent); color: var(--on-accent); }

/* ── Focus (2px accent ring, 2px offset) ─────────────── */
a:focus-visible, button:focus-visible, input:focus-visible,
textarea:focus-visible, select:focus-visible, summary:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--accent) !important;
  outline-offset: 2px !important;
  border-radius: 6px;
}

/* ═══════════ STICKY TRANSLUCENT NAV ═══════════ */
.id-nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(10,11,10,.82) !important;
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line) !important;
}
.id-nav-in {
  max-width: 1280px; margin: 0 auto; padding: 0 24px;
  height: 64px; display: flex; align-items: center; gap: 24px;
}
.id-brand {
  display: flex; align-items: center; gap: 10px;
  font-weight: 700; letter-spacing: .04em; font-size: 14px; color: var(--ink);
  text-decoration: none !important;
}
.id-mark {
  width: 28px; height: 28px; border-radius: 6px;
  background: var(--accent); color: var(--on-accent);
  display: grid; place-items: center; font-weight: 800; font-size: 13px;
}
.id-brand .id-api { color: var(--accent); }
.id-links { display: flex; gap: 18px; font-size: 14px; }
.id-links a {
  height: 64px; display: flex; align-items: center;
  color: var(--ink-2); text-decoration: none !important;
  border-bottom: 2px solid transparent;
  transition: color .15s ease, border-color .15s ease;
}
.id-links a:hover { color: var(--ink); }
.id-links a.on { color: var(--ink); border-bottom-color: var(--accent); }
.id-utils { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.id-host {
  font-family: var(--font-mono); font-size: 12px; color: var(--mute);
  border: 1px solid var(--line); border-radius: var(--r-ctl);
  padding: 5px 10px; background: var(--recess);
}
.id-link {
  color: var(--ink-2); font-size: 13px; font-weight: 500;
  text-decoration: none !important; transition: color .15s ease;
}
.id-link:hover { color: var(--ink); }
.id-nav .id-ctl { height: 34px; }

/* ═══════════ CONTROLS (black-on-accent) ═══════════ */
.id-ctl {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 18px;
  border-radius: var(--r-ctl); border: 1px solid transparent;
  font-size: 14px; font-weight: 700; letter-spacing: -.01em;
  cursor: pointer; text-decoration: none !important;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.id-primary { background: var(--accent); color: var(--on-accent) !important; }
.id-primary:hover { background: var(--accent-hover); }
.id-primary:active { background: var(--accent-press); }
.id-outline { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.id-outline:hover { border-color: var(--mute); }
.id-ghost { background: none; color: var(--accent); border: none; padding: 0 4px; height: auto; font-weight: 700; }
.id-ghost:hover { color: var(--accent-hover); }

/* ═══════════ HERO ═══════════ */
.id-hero { padding: 72px 24px 16px; text-align: center; }
.id-hero-in { max-width: 880px; margin: 0 auto; }
.id-eyebrow {
  font-family: var(--font-mono); font-size: 11px; font-weight: 600;
  color: var(--accent); letter-spacing: .14em; text-transform: uppercase;
  margin-bottom: 14px;
}
.id-display {
  font-size: clamp(34px, 5vw, 54px); font-weight: 700;
  letter-spacing: -.03em; line-height: 1.08; color: var(--ink); margin: 0 0 16px;
}
.id-display span { color: var(--accent); }
.id-lede { color: var(--mute); font-size: 16px; max-width: 56ch; margin: 0 auto; }

/* ═══════════ CAMPAIGN BANNER ═══════════ */
.id-banner {
  margin: 32px auto 0; max-width: 760px;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  background: linear-gradient(90deg, #0b0c0b 60%, rgba(11,12,11,.35) 100%),
    radial-gradient(circle 180px at 92% 50%, rgba(118,185,0,.16), transparent 70%);
  border: 1px solid var(--line); border-radius: var(--r-card);
  padding: 20px 24px; text-align: left;
}
.id-banner-copy { flex: 1; }
.id-banner-title { font-size: 17px; font-weight: 700; color: var(--ink); }
.id-banner-copy p { font-size: 13px; color: var(--ink-2); margin-top: 4px; }
.id-banner-actions { display: flex; gap: 10px; flex-shrink: 0; }

/* ═══════════ STATS PLATES ═══════════ */
.id-stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px;
  max-width: 760px; margin: 20px auto 0;
}
.id-stat {
  background: var(--plate); border: 1px solid var(--line);
  border-radius: var(--r-plate); padding: 16px 18px; text-align: left;
}
.id-stat b { display: block; font-size: 26px; font-weight: 700; color: var(--accent); font-family: var(--font-mono); }
.id-stat span { font-size: 12px; color: var(--mute); }

/* ═══════════ DUAL-COLUMN ROW LISTS ═══════════ */
.id-dual {
  max-width: 1280px; margin: 0 auto; padding: 40px 24px 0;
  display: grid; grid-template-columns: 1fr 1fr; gap: 28px;
}
.id-col-head { display: flex; justify-content: space-between; align-items: start; margin-bottom: 14px; }
.id-col-head h3 { font-size: 20px; font-weight: 700; margin: 0; }
.id-col-head p { color: var(--mute); font-size: 13px; margin-top: 4px; }
.id-row {
  display: flex; align-items: center; gap: 12px;
  background: var(--plate); border: 1px solid var(--line);
  border-radius: var(--r-plate); padding: 12px 14px; margin-bottom: 8px;
  text-decoration: none !important;
  transition: border-color .15s ease, background-color .15s ease;
}
.id-row:hover { border-color: var(--line-strong); background: var(--plate-hover); }
.id-av {
  width: 32px; height: 32px; border-radius: 8px; background: var(--recess);
  border: 1px solid var(--line); display: grid; place-items: center;
  font-size: 10px; font-weight: 700; color: var(--accent); font-family: var(--font-mono);
  flex-shrink: 0;
}
.id-grow { flex: 1; min-width: 0; }
.id-meta { display: block; font-size: 11px; color: var(--mute); }
.id-name { font-size: 14px; font-weight: 650; color: var(--ink); }
.id-chip {
  display: inline-flex; align-items: center; height: 21px; padding: 0 8px;
  border: 1px solid rgba(118,185,0,.45); border-radius: var(--r-ctl);
  font-size: 10px; font-weight: 600; color: var(--accent);
  font-family: var(--font-mono); white-space: nowrap;
}
.id-more {
  display: flex; width: 100%; justify-content: center; align-items: center; gap: 8px;
  margin-top: 12px; padding: 10px;
  background: transparent; color: var(--ink);
  border: 1px solid var(--accent); border-radius: var(--r-ctl);
  font-size: 13px; font-weight: 700; text-decoration: none !important;
  transition: background-color .15s ease, border-color .15s ease;
}
.id-more:hover { background: rgba(118,185,0,.08); }

/* ═══════════ CATALOG CARDS (four bands) ═══════════ */
.id-card-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(236px, 1fr));
  gap: 12px; margin-top: 8px;
}
.id-card {
  background: var(--plate); border: 1px solid var(--line);
  border-radius: var(--r-card); padding: 16px;
  display: flex; flex-direction: column; gap: 8px;
  transition: border-color .15s ease, background-color .15s ease;
}
.id-card:hover { border-color: var(--line-strong); background: var(--plate-hover); }
.id-card-badges { display: flex; gap: 6px; }
.id-card-title { font-size: 15px; font-weight: 650; color: var(--ink); line-height: 1.3; }
.id-card-desc {
  font-size: 13px; color: var(--ink-2); line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.id-card-foot {
  margin-top: auto; padding-top: 10px; border-top: 1px solid var(--line);
  display: flex; align-items: center; gap: 6px;
}
.id-card-foot .id-meta { margin-left: auto; font-family: var(--font-mono); }

/* ═══════════ TAILWIND-CLASS SURFACE RE-MAP ═══════════ */
/* Page chrome */
.bg-white,
.bg-slate-50 {
  background: var(--plate) !important;
}
.bg-slate-900 { background: var(--canvas-mid) !important; }
.bg-slate-100 { background: var(--recess) !important; }

/* Text */
.text-slate-900 { color: var(--ink) !important; }
.text-slate-800 { color: var(--ink-2) !important; }
.text-slate-700 { color: var(--ink-2) !important; }
.text-slate-600 { color: var(--mute) !important; }
.text-slate-500 { color: var(--mute) !important; }
.text-slate-400 { color: var(--mute) !important; }
.text-slate-300 { color: var(--mute) !important; }
.text-white { color: var(--ink) !important; }
.text-blue-600, .text-blue-700 { color: var(--accent) !important; }
.text-blue-800, .text-blue-900 { color: #bfe0ff !important; }
.text-green-600, .text-green-700, .text-green-800, .text-green-900 { color: #9fe06a !important; }
.text-amber-800, .text-amber-900 { color: #f7d873 !important; }
.text-red-700, .text-red-800 { color: #ff9a9a !important; }

/* Borders */
.border-slate-200, .border-slate-700, .border-slate-300 { border-color: var(--line) !important; }
.border-blue-200, .border-blue-100 { border-color: rgba(59,107,255,.35) !important; }
.border-green-200, .border-green-100 { border-color: rgba(95,191,0,.35) !important; }
.border-amber-200, .border-amber-100 { border-color: rgba(232,184,0,.35) !important; }

/* Radius: controls 6px, plates 14px, cards 16px */
.rounded { border-radius: var(--r-ctl) !important; }
.rounded-lg { border-radius: var(--r-plate) !important; }
.rounded-r { border-radius: var(--r-ctl) !important; }
.rounded-xl { border-radius: var(--r-card) !important; }

/* Elevation is plate + 1px line — no drop shadow */
.shadow-sm, .shadow-md, .shadow-lg { box-shadow: none !important; }
.hover\:shadow-md:hover { box-shadow: none !important; border-color: var(--line-strong) !important; }

/* Gradients used by the CTA plate → flat accent-wash plate */
.bg-gradient-to-br, .from-blue-50, .to-indigo-50, .from-blue-100, .to-indigo-100 {
  background-image: none !important;
  background: linear-gradient(135deg, var(--plate) 0%, var(--canvas-mid) 100%) !important;
}

/* ═══════════ SEMANTIC WELLS (950-step dark tints) ═══════════ */
.bg-blue-50 { background: var(--info-tint) !important; border-color: rgba(59,107,255,.4) !important; }
.bg-green-50 { background: var(--ok-tint) !important; border-color: rgba(95,191,0,.4) !important; }
.bg-amber-50 { background: var(--warn-tint) !important; border-color: rgba(232,184,0,.4) !important; }
.bg-red-50   { background: var(--danger-tint) !important; border-color: rgba(229,32,32,.4) !important; }
.bg-blue-100 { background: rgba(59,107,255,.14) !important; }
.bg-green-100 { background: rgba(95,191,0,.14) !important; }
.bg-red-100   { background: rgba(229,32,32,.14) !important; }
.bg-purple-100 { background: rgba(168,70,219,.14) !important; }
.bg-yellow-100 { background: rgba(232,184,0,.14) !important; }
.bg-blue-50 h4, .bg-green-50 h4, .bg-amber-50 h4, .bg-red-50 h4 { color: var(--ink) !important; }

/* ═══════════ METHOD BADGES (filled semantic chips) ═══════════ */
.method-badge {
  display: inline-flex; align-items: center; height: 20px; padding: 0 8px;
  border-radius: var(--r-ctl) !important;
  font-size: 10px !important; font-weight: 700 !important;
  letter-spacing: .06em; font-family: var(--font-mono);
}
.method-post   { background: var(--accent) !important; color: var(--on-accent) !important; }
.method-get    { background: var(--info) !important; color: #fff !important; }
.method-put    { background: var(--warn) !important; color: #1a1200 !important; }
.method-delete { background: var(--danger) !important; color: #fff !important; }

/* ═══════════ STATUS CHIPS (20–22px) ═══════════ */
.badge {
  display: inline-flex; align-items: center; height: 21px; padding: 0 8px;
  border-radius: var(--r-ctl); border: 1px solid var(--line-strong);
  font-size: 10px; font-weight: 600; font-family: var(--font-mono);
  background: transparent; color: var(--ink-2); white-space: nowrap;
}
.badge-required { background: var(--danger); border-color: var(--danger); color: #fff; }
.badge-optional { background: transparent; border-color: var(--line-strong); color: var(--ink-2); }
.badge-auth     { border-color: rgba(118,185,0,.5); color: var(--accent); }

/* ═══════════ ENDPOINT CARDS (hairline plates) ═══════════ */
.endpoint-card {
  background: var(--plate) !important;
  border: 1px solid var(--line) !important;
  border-left: 2px solid var(--accent) !important;
  border-radius: var(--r-card) !important;
  box-shadow: none !important;
  transition: border-color .15s ease, background-color .15s ease;
}
.endpoint-card:hover { border-color: var(--line-strong); }

/* ═══════════ CODE BLOCKS (recessed plates) ═══════════ */
.code-block {
  background: var(--recess) !important;
  color: #d8e6c2 !important;
  border: 1px solid var(--line) !important;
  border-radius: var(--r-ctl) !important;
  box-shadow: none !important;
  font-size: 0.8125rem;
}
.code-block .pass, .code-block .ok { color: var(--accent) !important; }
.response-example {
  background: var(--recess) !important;
  border: 1px solid var(--line) !important;
  border-radius: var(--r-ctl) !important;
}
.response-example pre { color: var(--mute) !important; }

/* ═══════════ PARAM TABLES (hairline) ═══════════ */
.param-table {
  width: 100%; border-collapse: collapse;
  border: 1px solid var(--line) !important;
  border-radius: var(--r-ctl) !important;
  margin: 1rem 0; background: var(--canvas-mid);
}
.param-table th {
  background: var(--recess) !important;
  color: var(--ink) !important;
  padding: 0.6rem 0.75rem; text-align: left;
  font-size: 0.72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .08em;
  border-bottom: 1px solid var(--line);
}
.param-table td {
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid var(--line) !important;
  color: var(--ink-2); font-size: 0.875rem; vertical-align: top;
}
.param-table tr:last-child td { border-bottom: none !important; }
.param-table td code {
  background: var(--recess) !important;
  color: var(--accent) !important;
  border: 1px solid var(--line) !important;
  padding: 1px 6px; border-radius: 4px; font-size: 0.8rem;
}
.param-table tr:nth-child(even) td { background: rgba(255,255,255,.015); }

/* ═══════════ SIDEBAR NAV (hairline plate) ═══════════ */
.sidebar {
  background: var(--plate) !important;
  border: 1px solid var(--line) !important;
  border-radius: var(--r-card) !important;
  box-shadow: none !important;
  position: sticky; top: 5.5rem; max-height: calc(100vh - 6.5rem); overflow-y: auto;
}
.sidebar h3 {
  font-family: var(--font-mono); font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .1em;
  color: var(--mute) !important; border-bottom: 1px solid var(--line);
  padding-bottom: 0.5rem; margin-bottom: 0.6rem;
}
.sidebar a {
  display: flex; align-items: center; gap: 8px;
  padding: 0.4rem 0.6rem; font-size: 0.85rem; font-weight: 500;
  color: var(--ink-2) !important;
  border-left: 2px solid transparent !important;
  border-radius: var(--r-ctl);
  transition: color .15s ease, border-color .15s ease, background-color .15s ease;
}
.sidebar a:hover { background: var(--plate-hover) !important; border-left-color: var(--line-strong) !important; color: var(--ink) !important; }
.sidebar a.active {
  background: var(--recess) !important;
  border-left-color: var(--accent) !important;
  color: var(--accent) !important; font-weight: 700 !important;
}
.sidebar i { color: var(--mute); }
.sidebar a.active i { color: var(--accent); }

/* ═══════════ COPY BUTTON (black-on-accent) ═══════════ */
.copy-btn {
  background: var(--accent) !important; color: var(--on-accent) !important;
  border: none !important; border-radius: var(--r-ctl) !important;
  font-size: 0.7rem; font-weight: 700; padding: 0.3rem 0.6rem; cursor: pointer;
}
.copy-btn:hover { background: var(--accent-hover); opacity: 1; }

/* ═══════════ FOOTER ═══════════ */
footer {
  border-top: 1px solid var(--line) !important;
  background: transparent !important;
  color: var(--mute) !important;
}
footer h4 { color: var(--ink) !important; }
footer a { color: var(--mute); transition: color .15s ease; }
footer a:hover { color: var(--ink) !important; }
footer .border-slate-700 { border-color: var(--line) !important; }

/* ═══════════ MISC ═══════════ */
main section h2 { letter-spacing: -.02em; }
main section h4 { color: var(--ink); }
main section h3 { color: var(--ink); }
.hover\:text-white:hover { color: var(--ink) !important; }

/* Scrollbar */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--canvas); }
::-webkit-scrollbar-thumb { background: var(--line-strong); border: 2px solid var(--canvas); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* Print */
@media print {
  #id-net, .id-wash { display: none !important; }
  body { background: #fff !important; color: #000 !important; }
}

/* ═══════════ MOTION (edge/fade only — no lift, no shadow) ═══════════ */
.id-reveal { opacity: 0; transform: translateY(14px); }
.id-reveal.in { opacity: 1; transform: none; }
.id-reveal, .id-reveal.in { transition: opacity .2s ease, transform .2s ease; }
.id-row, .id-card, .id-stat, .id-banner { transition: border-color .15s ease, background-color .15s ease; }

/* ═══════════ RESPONSIVE ═══════════ */
@media (max-width: 1024px) {
  .id-dual, .id-stats { grid-template-columns: 1fr 1fr; }
  .id-utils .id-host, .id-utils .id-link { display: none; }
}
@media (max-width: 860px) {
  .id-links { display: none; }
  .id-banner { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 640px) {
  .id-dual, .id-stats { grid-template-columns: 1fr; }
  .id-nav-in { padding: 0 16px; }
  .id-hero { padding: 48px 16px 12px; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  .id-reveal { opacity: 1; transform: none; }
}