/* ==========================================================================
   ThirdPartyConsult — Design System
   Tokens: Blue #155EEF · Ink #111827 · Red #EF4444 · White · Surface #F5F7FA
   Type: IBM Plex Sans (display/body) · IBM Plex Mono (labels, code, meta)
   ========================================================================== */

:root {
  --blue: #155EEF;
  --blue-dark: #0E3FB0;
  --blue-tint: #EAF0FE;
  --ink: #111827;
  --ink-soft: #1F2937;
  --red: #EF4444;
  --red-tint: #FDECEC;
  --white: #FFFFFF;
  --surface: #F5F7FA;
  --border: #E4E7EC;
  --text-secondary: #4B5563;
  --text-muted: #6B7280;
  --console-bg: #0B1220;
  --console-line: #1E293B;
  --console-blue: #5B9DFF;
  --console-green: #34D399;
  --console-text: #CBD5E1;

  --font-display: 'IBM Plex Sans', 'Segoe UI', Arial, sans-serif;
  --font-body: 'IBM Plex Sans', 'Segoe UI', Arial, sans-serif;
  --font-mono: 'IBM Plex Mono', 'SFMono-Regular', Consolas, monospace;

  --max-width: 1180px;
  --article-width: 780px;
  --radius-sm: 3px;
  --radius-md: 4px;
  --shadow-card: 0 1px 2px rgba(17, 24, 39, 0.06), 0 1px 1px rgba(17, 24, 39, 0.04);
  --shadow-raised: 0 4px 16px rgba(17, 24, 39, 0.10);
  --glow-blue: 0 0 0 1px rgba(21, 94, 239, 0.4), 0 0 18px rgba(21, 94, 239, 0.35);
  --glow-red: 0 0 0 1px rgba(239, 68, 68, 0.45), 0 0 18px rgba(239, 68, 68, 0.3);
}

/* ---------- Circuit-grid texture (cyber surfaces) ---------- */
.grid-dark {
  background-color: var(--ink);
  background-image:
    linear-gradient(rgba(91, 157, 255, 0.09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(91, 157, 255, 0.09) 1px, transparent 1px);
  background-size: 28px 28px;
}
.grid-light {
  background-image:
    linear-gradient(rgba(17, 24, 39, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(17, 24, 39, 0.045) 1px, transparent 1px);
  background-size: 28px 28px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--white);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
ul, ol { padding-left: 1.25em; }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--ink);
  line-height: 1.2;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}
section[id], h2[id], h3[id] { scroll-margin-top: 84px; }
h1 { font-size: clamp(2rem, 4vw, 2.75rem); font-weight: 700; }
h2 { font-size: clamp(1.5rem, 3vw, 1.9rem); font-weight: 700; }
h3 { font-size: 1.25rem; font-weight: 600; }
h4 { font-size: 1.05rem; font-weight: 600; }
p { margin: 0 0 1em; color: var(--ink-soft); }
:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap;
}

/* ---------- Eyebrow / mono labels (signature texture) ---------- */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--blue);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 0.75em;
}
.eyebrow::before {
  content: "//";
  color: var(--text-muted);
}
.eyebrow.red { color: var(--red); }
.eyebrow.red::before { color: var(--red); opacity: 0.6; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 12px 22px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--blue); color: var(--white); box-shadow: 0 0 0 1px rgba(21,94,239,0.15); }
.btn-primary:hover { background: var(--blue-dark); box-shadow: var(--glow-blue); }
.btn-outline { background: transparent; color: var(--ink); border-color: var(--border); }
.btn-outline:hover { border-color: var(--ink); background: var(--surface); }
.btn-ghost { background: transparent; color: var(--blue); border-color: transparent; padding-left: 0; padding-right: 0; }
.btn-ghost::after { content: "→"; margin-left: 4px; transition: transform 0.15s ease; }
.btn-ghost:hover::after { transform: translateX(3px); }
.btn-sm { padding: 8px 14px; font-size: 0.85rem; }

/* ---------- Masthead (media alert strip) ---------- */
.masthead {
  background: var(--red);
  background-image: repeating-linear-gradient(90deg, rgba(255,255,255,0.06) 0px, rgba(255,255,255,0.06) 1px, transparent 1px, transparent 10px);
  border-bottom: 1px solid #B91C1C;
}
.masthead .container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 6px 24px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--white);
  text-align: center;
  gap: 8px;
}
.masthead .masthead-bracket { opacity: 0.75; font-weight: 400; }
.masthead .masthead-suffix { display: none; opacity: 0.85; text-transform: none; letter-spacing: 0.02em; }
@media (min-width: 640px) {
  .masthead .container { font-size: 0.72rem; }
  .masthead .masthead-suffix { display: inline; }
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  border-bottom: 1px solid var(--border);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  height: 68px;
}
.brand { display: flex; align-items: center; flex-shrink: 0; }
.brand img { height: 26px; width: auto; }

.main-nav { display: none; flex: 1; }
.main-nav ul {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0;
  margin: 0;
  padding: 0;
  height: 68px;
}
.main-nav > ul > li { position: relative; height: 100%; display: flex; align-items: stretch; }
.main-nav a.nav-link {
  display: flex;
  align-items: center;
  height: 100%;
  padding: 0 16px;
  color: var(--ink-soft);
  font-weight: 500;
  font-size: 0.89rem;
  white-space: nowrap;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.main-nav a.nav-link:hover,
.main-nav li.active a.nav-link {
  color: var(--blue);
  border-bottom-color: var(--red);
}
.has-dropdown .dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 260px;
  background: var(--white);
  border: 1px solid var(--border);
  border-top: 2px solid var(--red);
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  box-shadow: var(--shadow-raised);
  padding: 8px;
  list-style: none;
  margin: 0;
  z-index: 110;
}
.has-dropdown:hover .dropdown,
.has-dropdown:focus-within .dropdown { display: block; }
.dropdown li a {
  display: block;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--ink-soft);
  font-size: 0.9rem;
  text-decoration: none;
}
.dropdown li a:hover { background: var(--surface); color: var(--blue); }
.dropdown li a span {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 2px;
}
.header-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.search-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 9px 12px;
  cursor: pointer;
  line-height: 1;
}
.search-trigger:hover { border-color: var(--blue); color: var(--blue); }
.menu-toggle {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  flex-shrink: 0;
}
.menu-toggle span {
  display: block;
  position: absolute;
  height: 2px;
  width: 18px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease, top 0.2s ease;
}
.menu-toggle span:nth-child(1) { top: 14px; }
.menu-toggle span:nth-child(2) { top: 19px; }
.menu-toggle span:nth-child(3) { top: 24px; }
.menu-toggle[aria-expanded="true"] span:nth-child(1) { top: 19px; transform: rotate(45deg); background: var(--red); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { top: 19px; transform: rotate(-45deg); background: var(--red); }

@media (min-width: 960px) {
  .main-nav { display: flex; align-items: stretch; }
  .menu-toggle { display: none; }
}

/* Mobile nav panel */
.mobile-nav {
  display: none;
  position: fixed;
  inset: 0 0 0 0;
  top: calc(68px + 44px);
  background: var(--white);
  z-index: 99;
  overflow-y: auto;
  padding: 8px 20px 40px;
}
.mobile-nav.open { display: block; }
.mobile-nav details { border-bottom: 1px solid var(--border); }
.mobile-nav summary {
  padding: 17px 2px;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.mobile-nav summary::-webkit-details-marker { display: none; }
.mobile-nav summary::after { content: "+"; color: var(--red); font-weight: 400; font-size: 1.1rem; }
.mobile-nav details[open] summary::after { content: "\2013"; }
.mobile-nav details[open] summary { color: var(--blue); }
.mobile-nav ul { list-style: none; margin: 0 0 14px; padding: 0; }
.mobile-nav ul a { display: block; padding: 11px 2px 11px 12px; border-left: 2px solid var(--border); color: var(--text-secondary); text-decoration: none; font-size: 0.94rem; }
.mobile-nav ul a:hover { border-left-color: var(--blue); color: var(--blue); }
.mobile-nav > a { display: flex; align-items: center; padding: 17px 2px; border-bottom: 1px solid var(--border); font-family: var(--font-display); font-size: 1rem; font-weight: 600; text-decoration: none; color: var(--ink); }
.mobile-nav > a:hover { color: var(--blue); }
@media (min-width: 960px) { .mobile-nav { display: none !important; } }

/* ---------- Breadcrumbs ---------- */
.breadcrumbs {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
  padding: 14px 0;
}
.breadcrumbs a { color: var(--text-muted); }
.breadcrumbs a:hover { color: var(--blue); }
.breadcrumbs .sep { margin: 0 6px; color: var(--border); }

/* ---------- Hero ---------- */
.hero {
  border-bottom: 1px solid var(--border);
  background: var(--white);
}
.hero .container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 36px;
  padding-top: 56px;
  padding-bottom: 56px;
}
@media (min-width: 960px) {
  .hero .container { grid-template-columns: 1.05fr 0.95fr; align-items: center; padding-top: 76px; padding-bottom: 76px; }
}
.hero h1 { margin-bottom: 0.4em; }
.hero .lede { font-size: 1.1rem; color: var(--text-secondary); max-width: 46ch; margin-bottom: 1.75em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* Signature: live API console panel */
.api-console {
  background: var(--console-bg);
  background-image:
    linear-gradient(rgba(91, 157, 255, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(91, 157, 255, 0.07) 1px, transparent 1px);
  background-size: 24px 24px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(91, 157, 255, 0.35);
  box-shadow: var(--glow-blue);
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  position: relative;
}
.api-console::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(255,255,255,0.025) 0px, rgba(255,255,255,0.025) 1px, transparent 1px, transparent 3px);
}
.api-console .console-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: #0F1A2E;
  border-bottom: 1px solid var(--console-line);
  position: relative;
  z-index: 1;
}
.api-console .dot { width: 8px; height: 8px; border-radius: 50%; background: #33415580; }
.api-console .dot.live { background: var(--red); box-shadow: 0 0 8px rgba(239,68,68,0.8); animation: pulse-dot 2s ease-in-out infinite; }
@keyframes pulse-dot { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
.api-console .console-label { margin-left: 8px; color: #7C8CAA; font-size: 0.72rem; letter-spacing: 0.04em; }
.api-console pre {
  margin: 0;
  padding: 18px 16px 22px;
  color: var(--console-text);
  white-space: pre-wrap;
  min-height: 220px;
  position: relative;
  z-index: 1;
}
.api-console .k { color: #7DD3FC; }
.api-console .s { color: var(--console-green); }
.api-console .n { color: #FBBF24; }
.api-console .c { color: #7C8CAA; }
.console-cursor { display: inline-block; width: 7px; height: 14px; background: var(--red); box-shadow: 0 0 6px rgba(239,68,68,0.8); vertical-align: text-bottom; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* ---------- Sections ---------- */
section { padding: 64px 0; }
.section-alt { background: var(--surface); }
.section-head { max-width: 640px; margin-bottom: 40px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-foot { margin-top: 32px; }

/* ---------- Card grids ---------- */
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: 1fr; }
.grid-3 { grid-template-columns: 1fr; }
.grid-4 { grid-template-columns: 1fr; }
@media (min-width: 700px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 960px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
a.card { display: block; color: inherit; text-decoration: none; }
a.card:hover { border-color: var(--blue); box-shadow: var(--glow-blue); transform: translateY(-2px); }
.card .card-index { font-family: var(--font-mono); font-size: 0.72rem; font-weight: 600; color: var(--red); margin-bottom: 10px; display: block; }
.card h3 { margin-bottom: 0.4em; }
.card p { color: var(--text-secondary); font-size: 0.94rem; margin-bottom: 0.5em; }
.card .card-link { font-family: var(--font-mono); font-size: 0.78rem; color: var(--blue); }

.pillar-card { border-top: 3px solid var(--ink); }
.pillar-card:hover { border-top-color: var(--red); box-shadow: var(--glow-red); }

/* Article/preview cards */
.article-card { display: flex; flex-direction: column; height: 100%; }
.article-card .tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--red);
  background: var(--red-tint);
  padding: 3px 8px;
  border-radius: 2px;
  display: inline-block;
  margin-bottom: 10px;
  width: fit-content;
}
.article-card .meta { font-family: var(--font-mono); font-size: 0.72rem; color: var(--text-muted); margin-top: auto; padding-top: 12px; }

/* ---------- Diagrams ---------- */
.diagram {
  background: var(--console-bg);
  background-image:
    linear-gradient(rgba(91, 157, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(91, 157, 255, 0.06) 1px, transparent 1px);
  background-size: 20px 20px;
  color: var(--console-text);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.65;
  border: 1px solid rgba(91, 157, 255, 0.25);
  border-radius: var(--radius-md);
  padding: 24px;
  overflow-x: auto;
  white-space: pre;
}
.diagram .arrow { color: var(--console-blue); }
.diagram .node { color: var(--red); text-shadow: 0 0 8px rgba(239,68,68,0.5); }
.diagram-caption { font-family: var(--font-mono); font-size: 0.78rem; color: var(--text-muted); margin-top: 10px; }

.flow-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  border-left: 2px solid var(--border);
}
.flow-steps li {
  position: relative;
  padding: 4px 0 24px 24px;
}
.flow-steps li::before {
  content: "";
  position: absolute;
  left: -7px;
  top: 6px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--white);
  border: 2px solid var(--blue);
}
.flow-steps li strong { display: block; font-family: var(--font-display); margin-bottom: 2px; }
.flow-steps li span { color: var(--text-secondary); font-size: 0.92rem; }

/* ---------- Callouts ---------- */
.callout {
  border: 1px solid var(--border);
  border-left: 3px solid var(--blue);
  background: var(--surface);
  padding: 18px 20px;
  border-radius: var(--radius-sm);
  margin: 24px 0;
}
.callout p:last-child { margin-bottom: 0; }
.callout.warning { border-left-color: var(--red); background: var(--red-tint); }
.callout .callout-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--blue);
  margin-bottom: 6px;
  display: block;
}
.callout.warning .callout-label { color: var(--red); }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; margin: 24px 0; }
table { border-collapse: collapse; width: 100%; font-size: 0.92rem; }
th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--border); }
th { font-family: var(--font-mono); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); background: var(--surface); }
code { font-family: var(--font-mono); background: var(--surface); padding: 2px 6px; border-radius: 3px; font-size: 0.88em; }
pre.code-block {
  background: var(--console-bg);
  color: var(--console-text);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  padding: 18px;
  border-radius: var(--radius-md);
  overflow-x: auto;
}
pre.code-block code { background: none; padding: 0; color: inherit; }

/* ---------- Article layout ---------- */
.article-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  padding: 48px 0 80px;
}
@media (min-width: 1080px) {
  .article-layout { grid-template-columns: 200px minmax(0, var(--article-width)) 1fr; }
}
.article-toc {
  order: 2;
  position: sticky;
  top: 90px;
  align-self: start;
  font-size: 0.85rem;
}
.article-toc .eyebrow { margin-bottom: 10px; }
.article-toc ol { list-style: none; padding: 0; margin: 0; border-left: 1px solid var(--border); }
.article-toc li { margin-bottom: 6px; }
.article-toc a { display: block; padding: 4px 0 4px 14px; color: var(--text-secondary); text-decoration: none; border-left: 2px solid transparent; margin-left: -1px; }
.article-toc a:hover, .article-toc a.active { color: var(--blue); border-left-color: var(--blue); }
.article-body { order: 1; min-width: 0; max-width: var(--article-width); }
.article-meta { display: flex; flex-wrap: wrap; gap: 16px; font-family: var(--font-mono); font-size: 0.78rem; color: var(--text-muted); margin: 16px 0 28px; padding-bottom: 20px; border-bottom: 1px solid var(--border); }
.article-side { order: 3; font-size: 0.88rem; }
.article-side .card { margin-bottom: 16px; }
.key-takeaways { background: var(--surface); border-radius: var(--radius-md); padding: 20px 24px; margin: 32px 0; }
.key-takeaways h3 { margin-bottom: 10px; }
.related-articles { margin-top: 48px; padding-top: 32px; border-top: 1px solid var(--border); }
.sources { font-size: 0.85rem; color: var(--text-muted); }
.disclaimer-box { font-size: 0.85rem; color: var(--text-muted); background: var(--surface); padding: 16px 20px; border-radius: var(--radius-sm); margin-top: 24px; }

/* ---------- Learning path (vertical flow) ---------- */
.learning-path { display: flex; flex-direction: column; align-items: center; gap: 0; }
.learning-path .step {
  width: 100%; max-width: 420px;
  background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: 16px 20px; text-align: center; font-weight: 600;
}
.learning-path .connector { color: var(--blue); font-family: var(--font-mono); padding: 6px 0; }

/* ---------- FAQ accordion ---------- */
.faq-item { border-bottom: 1px solid var(--border); }
.faq-item summary {
  padding: 18px 4px;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-display);
  font-weight: 600;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; color: var(--blue); font-size: 1.2rem; font-weight: 400; }
.faq-item[open] summary::after { content: "–"; }
.faq-item .faq-answer { padding: 0 4px 18px; color: var(--text-secondary); }

/* ---------- Search modal ---------- */
.search-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(17, 24, 39, 0.55);
  padding: 10vh 16px 0;
}
.search-modal.open { display: block; }
.search-panel {
  max-width: 640px;
  margin: 0 auto;
  background: var(--white);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-raised);
}
.search-input-row { display: flex; align-items: center; border-bottom: 1px solid var(--border); padding: 4px 16px; }
.search-input-row span { font-family: var(--font-mono); color: var(--text-muted); margin-right: 8px; }
#searchInput { flex: 1; border: none; outline: none; padding: 14px 4px; font-size: 1rem; font-family: var(--font-body); }
.search-close { background: none; border: none; color: var(--text-muted); cursor: pointer; font-family: var(--font-mono); font-size: 0.8rem; }
.search-results { max-height: 50vh; overflow-y: auto; padding: 8px; }
.search-results .result { display: block; padding: 12px; border-radius: var(--radius-sm); text-decoration: none; }
.search-results .result:hover, .search-results .result.active-result { background: var(--surface); }
.search-results .result .tag { font-family: var(--font-mono); font-size: 0.7rem; color: var(--red); text-transform: uppercase; letter-spacing: 0.04em; }
.search-results .result h4 { margin: 2px 0 2px; color: var(--ink); }
.search-results .result p { margin: 0; font-size: 0.85rem; color: var(--text-muted); }
.search-empty { padding: 24px 16px; color: var(--text-muted); font-size: 0.9rem; }

/* ---------- Resource filters ---------- */
.filter-bar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 32px; }
.filter-chip {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  padding: 7px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--white);
  cursor: pointer;
  color: var(--text-secondary);
}
.filter-chip:hover { border-color: var(--blue); color: var(--blue); }
.filter-chip.active { background: var(--ink); color: var(--white); border-color: var(--ink); }

/* ---------- Services ---------- */
.service-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
}
@media (min-width: 700px) { .service-row { grid-template-columns: 220px 1fr; } }
.service-row h3 { margin-bottom: 6px; }

/* ---------- Forms ---------- */
.form-grid { display: grid; gap: 18px; }
@media (min-width: 700px) { .form-grid.two-col { grid-template-columns: 1fr 1fr; } }
label { display: block; font-family: var(--font-mono); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-secondary); margin-bottom: 6px; }
input, select, textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 0.95rem;
  padding: 11px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--ink);
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--blue); outline-offset: 1px; border-color: var(--blue); }
.form-note { font-size: 0.82rem; color: var(--text-muted); margin-top: 6px; }
.field-error { color: var(--red); font-size: 0.8rem; margin-top: 4px; display: none; }
.form-status { padding: 14px 16px; border-radius: var(--radius-sm); margin-top: 16px; display: none; font-size: 0.9rem; }
.form-status.success { display: block; background: #ECFDF5; color: #047857; border: 1px solid #A7F3D0; }

/* ---------- Back to top ---------- */
#backToTop {
  position: fixed; right: 20px; bottom: 20px;
  width: 42px; height: 42px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--white);
  border: none;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  z-index: 90;
}
#backToTop.show { display: flex; }
.reading-progress {
  position: fixed; top: 0; left: 0; height: 3px; background: var(--blue); z-index: 150; width: 0%;
}

/* ---------- CTA band ---------- */
.cta-band {
  background: var(--ink);
  background-image:
    linear-gradient(rgba(91, 157, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(91, 157, 255, 0.08) 1px, transparent 1px);
  background-size: 24px 24px;
  border: 1px solid rgba(91,157,255,0.25);
  color: var(--white);
  border-radius: var(--radius-md);
  padding: 40px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.cta-band h2, .cta-band p { color: var(--white); }
.cta-band p { color: #9CA3AF; margin-bottom: 0; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ink);
  background-image:
    linear-gradient(rgba(91, 157, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(91, 157, 255, 0.06) 1px, transparent 1px);
  background-size: 28px 28px;
  color: #C6CCD6;
  padding: 56px 0 28px;
  margin-top: 40px;
  border-top: 2px solid var(--red);
}
.footer-grid { display: grid; grid-template-columns: 1fr; gap: 32px; margin-bottom: 40px; }
@media (min-width: 700px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; } }
.footer-brand img { height: 26px; margin-bottom: 12px; filter: brightness(0) invert(1); }
.footer-brand p { color: #9CA3AF; font-size: 0.88rem; max-width: 34ch; }
.site-footer h4 { color: var(--white); font-family: var(--font-mono); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 14px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 10px; }
.site-footer a { color: #C6CCD6; font-size: 0.9rem; text-decoration: none; transition: color 0.15s ease, text-shadow 0.15s ease; }
.site-footer a:hover { color: var(--console-blue); text-shadow: 0 0 8px rgba(91,157,255,0.6); text-decoration: none; }
.footer-bottom { border-top: 1px solid #263042; padding-top: 24px; display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; font-size: 0.82rem; color: #7C8CAA; }
.footer-bottom a { color: #9CA3AF; }

/* ---------- Utilities ---------- */
.mt-0 { margin-top: 0; }
.text-center { text-align: center; }
.small { font-size: 0.85rem; color: var(--text-muted); }
.risk-strip {
  background: var(--red-tint);
  border-top: 1px solid #FBD5D5;
  border-bottom: 1px solid #FBD5D5;
  padding: 14px 0;
  font-size: 0.85rem;
  color: #7A1F1F;
}
.risk-strip .container { display: flex; gap: 10px; align-items: center; }
.risk-strip strong { font-family: var(--font-mono); text-transform: uppercase; font-size: 0.75rem; }
