/* ==========================================================================
   nuclide-research.com/ablation - Ablation v3.0 + GEM Workbench Stylesheet
   Harmonized with Nocturnal Obsidian & Daylight Vellum (.zs-* tokens)
   Zero External CDNs | Strict CSP 'self' | Zero Horizontal Overflow
   ========================================================================== */

:focus-visible {
  outline: 2px solid var(--zs-accent-soft);
  outline-offset: 2px;
}

body[data-theme="vellum"] :focus-visible {
  outline-color: var(--zs-accent);
}

/* Modern Hero */
.ab-modern-hero {
  position: relative;
  padding: 64px 0 60px;
  background:
    radial-gradient(ellipse 68% 46% at 50% 6%, rgba(225, 29, 72, 0.11), transparent 68%),
    radial-gradient(ellipse 52% 40% at 78% 22%, rgba(20, 184, 166, 0.08), transparent 66%),
    var(--zs-bg);
  border-bottom: 1px solid var(--zs-rule);
}

body[data-theme="vellum"] .ab-modern-hero {
  background:
    radial-gradient(ellipse 68% 46% at 50% 6%, rgba(190, 18, 60, 0.055), transparent 68%),
    radial-gradient(ellipse 52% 40% at 78% 22%, rgba(15, 118, 110, 0.045), transparent 66%),
    var(--zs-bg);
}

.ab-hero-center {
  max-width: 820px;
  margin: 0 auto 44px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 18px;
}

.ab-hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 38px;
  padding: 6px 14px 6px 10px;
  border-radius: 999px;
  background: var(--zs-surface);
  border: 1px solid var(--zs-rule-strong);
  box-shadow: var(--zs-specular);
  color: var(--zs-ink-soft);
  font-size: 0.82rem;
  font-weight: 550;
  text-decoration: none;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.ab-hero-pill:hover {
  color: var(--zs-ink);
  border-color: var(--zs-accent-soft);
}

.ab-pill-icon {
  width: 18px;
  height: 18px;
  display: block;
  flex-shrink: 0;
}

.ab-hero-h1 {
  margin: 0;
  font-family: var(--font-serif, "Newsreader", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif);
  font-size: clamp(2.25rem, 4.5vw, 3.55rem);
  font-weight: 680;
  line-height: 1.1;
  letter-spacing: -0.028em;
  color: var(--zs-ink);
}

.zs-head-folio h1,
.zs-head-folio h2,
.ab-modern-hero h2 {
  font-family: var(--font-serif, "Newsreader", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif);
  font-weight: 680;
  line-height: 1.12;
  letter-spacing: -0.024em;
}

.zs-head-folio {
  max-width: 780px;
  margin: 0 auto 40px;
  align-items: center;
  text-align: center;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--zs-rule);
}

.ab-hero-muted {
  color: var(--zs-ink-soft);
  font-weight: 600;
}

.ab-hero-lead {
  margin: 0;
  max-width: 64ch;
  font-size: 1.04rem;
  line-height: 1.65;
  color: var(--zs-ink-soft);
}

.ab-hero-lead strong {
  color: var(--zs-ink);
  font-weight: 600;
}

.ab-hero-ctas {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 4px;
}

.ab-quick-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 20px;
  margin-top: 4px;
}

.ab-quick-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 0.86rem;
  font-weight: 540;
  color: var(--zs-ink-soft);
  text-decoration: none;
  transition: color 0.14s ease;
}

.ab-quick-links a:hover {
  color: var(--zs-ink);
}

/* KPI Strip */
.ab-kpi-strip {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}

.ab-kpi-cell {
  padding: 18px 14px;
  border-radius: 12px;
  background: var(--zs-surface);
  border: 1px solid var(--zs-rule);
  box-shadow: var(--zs-shadow-card), var(--zs-specular);
  text-align: center;
  min-width: 0;
}

.ab-kpi-num {
  display: block;
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--zs-ink);
  line-height: 1.2;
}

.ab-kpi-label {
  display: block;
  margin-top: 5px;
  font-family: var(--zs-mono);
  font-size: 0.75rem;
  color: var(--zs-ink-soft);
  line-height: 1.35;
}

/* 5-Stage Pipeline & Zoe Callout */
.pipeline-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

.pipeline-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px 18px;
  border-radius: 12px;
  background: var(--zs-surface);
  border: 1px solid var(--zs-rule);
  box-shadow: var(--zs-shadow-card), var(--zs-specular);
  min-width: 0;
  transition: border-color 0.16s ease, transform 0.16s ease;
}

.pipeline-card:hover {
  transform: translateY(-2px);
  border-color: var(--zs-rule-strong);
}

.pipe-step {
  font-family: var(--zs-mono);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--zs-accent-soft);
}

body[data-theme="vellum"] .pipe-step {
  color: var(--zs-accent);
}

.pipeline-card h3 {
  margin: 0;
  font-size: 1.04rem;
  font-weight: 640;
  line-height: 1.3;
  color: var(--zs-ink);
}

.pipeline-card p {
  margin: 0;
  max-width: 64ch;
  font-size: 0.9rem;
  color: var(--zs-ink-soft);
  line-height: 1.56;
}

.zoe-ci-callout {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 22px;
  align-items: center;
  padding: 24px 28px;
  border-radius: 14px;
  background: var(--zs-surface);
  border: 1px solid var(--zs-rule-strong);
  box-shadow: var(--zs-shadow-card), var(--zs-specular);
}

.zoe-ci-avatar-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
}

.zoe-ci-avatar {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 18%;
  border: 2px solid var(--zs-accent);
}

.zoe-ci-body {
  min-width: 0;
}

.zoe-ci-body h3 {
  margin: 6px 0 8px;
  font-size: 1.22rem;
  font-weight: 650;
  color: var(--zs-ink);
}

.zoe-ci-body p {
  margin: 0;
  font-size: 0.94rem;
  color: var(--zs-ink-soft);
  line-height: 1.62;
  max-width: 68ch;
}

.zoe-ci-body a:not(.zs-btn) {
  color: var(--zs-ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Interactive 3-Pane RE Workbench */
.ab-bench-wrap {
  margin-top: 28px;
}

.ab-bench-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.ab-bench-head h3 {
  margin: 4px 0 0;
  font-size: 1.24rem;
  font-weight: 650;
  color: var(--zs-ink);
}

.ab-bench-summary {
  margin: 0;
  max-width: 64ch;
  font-size: 0.88rem;
  line-height: 1.58;
  color: var(--zs-ink-soft);
}

.ab-bench-meta {
  display: grid;
  gap: 8px;
  margin-top: auto;
}

.ab-bench-kv {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--zs-rule);
  background: var(--zs-bg-elev);
}

.ab-bench-kv span {
  font-family: var(--zs-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--zs-ink-muted);
}

.ab-bench-kv strong {
  font-family: var(--zs-mono);
  font-size: 0.8rem;
  color: var(--zs-ink);
  overflow-wrap: anywhere;
}

/* Catalog, Why Different, Comparison & Documentation Hub */
.ab-catalog-box,
.ab-docs-shell {
  padding: 24px;
  border-radius: 14px;
  background: var(--zs-surface);
  border: 1px solid var(--zs-rule-strong);
  box-shadow: var(--zs-shadow-card), var(--zs-specular);
}

.ab-catalog-controls {
  display: flex;
  justify-content: center;
  margin-bottom: 14px;
}

.ab-search-input {
  width: 100%;
  max-width: 560px;
  min-height: 44px;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid var(--zs-rule-strong);
  background: var(--zs-bg);
  color: var(--zs-ink);
  font-family: inherit;
  font-size: 0.94rem;
}

.ab-search-input::placeholder {
  color: var(--zs-ink-muted);
  opacity: 1;
}

body[data-theme="vellum"] .ab-search-input {
  background: #FFFFFF;
}

.ab-tab-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 16px;
}

.ab-tab-btn,
.filter-btn,
.mode-tab-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  min-width: 44px;
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid var(--zs-rule-strong);
  background: var(--zs-bg-elev);
  color: var(--zs-ink-soft);
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 580;
  cursor: pointer;
  transition: background 0.14s ease, border-color 0.14s ease, color 0.14s ease;
}

body[data-theme="vellum"] .ab-tab-btn,
body[data-theme="vellum"] .filter-btn,
body[data-theme="vellum"] .mode-tab-btn {
  background: #FFFFFF;
}

.ab-tab-btn:hover,
.filter-btn:hover,
.mode-tab-btn:hover {
  border-color: var(--zs-accent-soft);
  color: var(--zs-ink);
}

.ab-tab-btn.is-active,
.filter-btn.is-active,
.mode-tab-btn.is-active,
.ab-tab-btn.is-active:hover,
.filter-btn.is-active:hover,
.mode-tab-btn.is-active:hover {
  background: var(--zs-accent);
  border-color: var(--zs-accent);
  color: var(--zs-accent-ink, #FFFFFF);
}

body[data-theme="vellum"] .ab-tab-btn.is-active,
body[data-theme="vellum"] .filter-btn.is-active,
body[data-theme="vellum"] .mode-tab-btn.is-active,
body[data-theme="vellum"] .ab-tab-btn.is-active:hover,
body[data-theme="vellum"] .filter-btn.is-active:hover,
body[data-theme="vellum"] .mode-tab-btn.is-active:hover {
  background: var(--zs-accent);
  border-color: var(--zs-accent);
  color: var(--zs-accent-ink, #FFFFFF);
}

.isa-status-note {
  text-align: center;
  font-family: var(--zs-mono);
  font-size: 0.82rem;
  color: var(--zs-teal-text);
  margin: 0 0 18px;
}

.ab-cap-grid,
.ab-why-grid,
.ab-ref-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.ab-cap-card,
.ab-why-card,
.ab-ref-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px;
  border-radius: 12px;
  background: var(--zs-bg-elev);
  border: 1px solid var(--zs-rule);
  border-left: 3px solid var(--zs-accent);
  min-width: 0;
}

body[data-theme="vellum"] .ab-cap-card,
body[data-theme="vellum"] .ab-ref-card {
  background: #FAF9F6;
}

.ab-why-card {
  background: var(--zs-surface);
  border: 1px solid var(--zs-rule-strong);
  border-top: 3px solid var(--zs-accent);
  box-shadow: var(--zs-shadow-card), var(--zs-specular);
}

.ab-cap-card h3,
.ab-cap-card h4,
.ab-why-card h3,
.ab-ref-card h4 {
  margin: 0;
  font-size: 1.04rem;
  font-weight: 640;
  line-height: 1.3;
  color: var(--zs-ink);
}

.ab-cap-card p,
.ab-why-card p,
.ab-ref-card p {
  margin: 0;
  max-width: 64ch;
  font-size: 0.88rem;
  line-height: 1.56;
  color: var(--zs-ink-soft);
}

.ab-cap-card a:not(.zs-btn) {
  color: var(--zs-ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.ab-code-path {
  font-family: var(--zs-mono);
  font-size: 0.78rem;
  color: var(--zs-teal-text);
  overflow-wrap: anywhere;
}

body[data-theme="vellum"] .ab-code-path {
  color: #115E59;
  background: rgba(15, 118, 110, 0.08);
  border-color: rgba(15, 118, 110, 0.24);
}

.ab-compare-wrap {
  width: 100%;
  overflow-x: auto;
  margin-top: 24px;
  border-radius: 12px;
  border: 1px solid var(--zs-rule-strong);
  background: var(--zs-surface);
  box-shadow: var(--zs-shadow-card);
}

.ab-compare-table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.88rem;
}

.ab-compare-table th,
.ab-compare-table td {
  padding: 13px 15px;
  border-bottom: 1px solid var(--zs-rule);
  vertical-align: top;
  line-height: 1.5;
  color: var(--zs-ink-soft);
}

.ab-compare-table thead th {
  font-family: var(--zs-mono);
  font-size: 0.78rem;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--zs-bg-elev);
  color: var(--zs-ink);
  border-bottom: 1px solid var(--zs-rule-strong);
}

.ab-compare-table th.is-ablation-col,
.ab-compare-table td.is-ablation-col {
  background: rgba(20, 184, 166, 0.08);
  color: var(--zs-ink);
  font-weight: 560;
}

body[data-theme="vellum"] .ab-compare-table th.is-ablation-col,
body[data-theme="vellum"] .ab-compare-table td.is-ablation-col {
  background: rgba(15, 118, 110, 0.06);
}

.ab-compare-table td:first-child {
  font-weight: 640;
  color: var(--zs-ink);
}

.ab-doc-reader {
  padding: 22px 24px;
  border-radius: 12px;
  background: var(--zs-bg-elev);
  border: 1px solid var(--zs-rule-strong);
}

body[data-theme="vellum"] .ab-doc-reader {
  background: #FAF9F6;
}

.ab-doc-title {
  margin: 6px 0 8px;
  font-size: 1.38rem;
  font-weight: 660;
  color: var(--zs-ink);
}

.ab-doc-summary {
  margin: 0 0 18px;
  font-size: 0.95rem;
  line-height: 1.62;
  color: var(--zs-ink-soft);
  max-width: 66ch;
}

.ab-doc-section {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--zs-rule);
}

.ab-doc-section h4 {
  margin: 0 0 6px;
  font-size: 1.05rem;
  font-weight: 640;
  color: var(--zs-accent-soft);
}

body[data-theme="vellum"] .ab-doc-section h4 {
  color: var(--zs-accent);
}

.ab-doc-section p {
  margin: 0 0 10px;
  font-size: 0.92rem;
  line-height: 1.62;
  color: var(--zs-ink-soft);
  max-width: 66ch;
}

.ab-doc-pre,
.ab-doc-code {
  --zs-ink: #F4F4F5;
  --zs-ink-soft: #D4D4D8;
  --zs-ink-muted: #A1A1AA;
  --surface-strong: rgba(255, 255, 255, 0.12);
  --zs-rule: rgba(255, 255, 255, 0.14);
  margin: 8px 0 0;
  padding: 14px 16px;
  border-radius: 9px;
  background: #070709;
  color: #E4E4E7;
  border: 1px solid rgba(255, 255, 255, 0.1);
  overflow-x: auto;
  font-family: var(--zs-mono);
  font-size: 0.82rem;
  line-height: 1.56;
}

.ab-doc-subgrid {
  margin-top: 16px;
}

.ab-std-table-wrap {
  margin-top: 14px;
}

.ab-ref-explorer {
  margin-top: 26px;
  padding-top: 24px;
  border-top: 1px solid var(--zs-rule-strong);
}

.ab-ref-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.ab-ref-head h3 {
  margin: 4px 0 0;
  font-size: 1.22rem;
  font-weight: 650;
  color: var(--zs-ink);
}

.ab-ref-search-wrap {
  flex: 1;
  min-width: 240px;
  max-width: 460px;
}

.ab-ref-more-wrap {
  margin-top: 18px;
  text-align: center;
}

/* Dual Mode Terminal Spread */
.book-spread {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 1px minmax(0, 1fr);
  gap: 28px;
  padding: 28px;
  border-radius: 14px;
  border: 1px solid var(--zs-rule-strong);
  background: var(--zs-surface);
  box-shadow: var(--zs-shadow-window), var(--zs-specular);
}

.spread-page {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.spread-gutter {
  width: 1px;
  background: linear-gradient(to bottom, transparent, var(--zs-rule-strong) 12%, var(--zs-rule-strong) 88%, transparent);
  box-shadow: -6px 0 14px rgba(0, 0, 0, 0.22), 6px 0 14px rgba(0, 0, 0, 0.22);
}

body[data-theme="vellum"] .spread-gutter {
  box-shadow: -4px 0 10px rgba(9, 9, 11, 0.06), 4px 0 10px rgba(9, 9, 11, 0.06);
}

.mode-group-label {
  font-family: var(--zs-mono);
  font-size: 0.74rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--zs-teal-text);
}

.mode-tab-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.quickstart-box {
  margin-top: auto;
  padding: 16px;
  border-radius: 10px;
  border: 1px solid var(--zs-rule);
  background: var(--zs-bg-elev);
}

.qs-head {
  font-family: var(--zs-mono);
  font-size: 0.76rem;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--zs-ink);
  margin-bottom: 10px;
}

.qs-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.velvet-terminal {
  --zs-ink: #F4F4F5;
  --zs-ink-soft: #D4D4D8;
  --zs-ink-muted: #A1A1AA;
  --zs-teal-text: #2DD4BF;
  --zs-accent-soft: #FB7185;
  --zs-emerald-text: #34D399;
  --surface-strong: rgba(255, 255, 255, 0.12);
  --zs-rule: rgba(255, 255, 255, 0.14);
  display: flex;
  flex-direction: column;
  height: 100%;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #070709;
  color: #F4F4F5;
  overflow: hidden;
}

.term-chrome {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

.term-dots {
  display: inline-flex;
  gap: 6px;
}

.term-dots span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
}

.term-title {
  font-family: var(--zs-mono);
  font-size: 0.76rem;
  color: #A1A1AA;
  overflow-wrap: anywhere;
}

.term-badge {
  font-family: var(--zs-mono);
  font-size: 0.72rem;
  font-weight: 650;
  padding: 3px 9px;
  border-radius: 6px;
  background: rgba(20, 184, 166, 0.16);
  border: 1px solid rgba(45, 212, 191, 0.35);
  color: #2DD4BF;
  flex-shrink: 0;
}

.term-content {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.term-content h3 {
  margin: 0;
  font-size: 1.15rem;
  color: #F4F4F5;
}

.term-cmd-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #111116;
}

.term-cmd-wrap pre {
  margin: 0;
  overflow-x: auto;
  font-family: var(--zs-mono);
  font-size: 0.82rem;
  color: #E4E4E7;
}

.term-prompt {
  color: #34D399;
}

.term-specs {
  display: grid;
  gap: 8px;
}

.spec-row {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 10px;
  padding: 9px 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.spec-row span {
  font-family: var(--zs-mono);
  font-size: 0.76rem;
  color: #A1A1AA;
}

.spec-row strong {
  font-size: 0.86rem;
  color: #F4F4F5;
  overflow-wrap: anywhere;
}

.term-desc {
  margin: 0;
  max-width: 64ch;
  font-size: 0.9rem;
  line-height: 1.58;
  color: #A1A1AA;
}

/* Collapsible Technical Details & ISA Matrix */
.folio-details,
.tier-details {
  margin-top: 10px;
  margin-bottom: 14px;
  border: 1px solid var(--zs-rule-strong);
  border-radius: 10px;
  background: var(--zs-surface);
  padding: 8px 16px;
}

.folio-details summary,
.tier-details summary {
  display: flex;
  align-items: center;
  min-height: 44px;
  font-size: 0.92rem;
  font-weight: 620;
  color: var(--zs-ink);
  cursor: pointer;
}

.folio-details > div,
.tier-details .tier-features {
  margin-top: 10px;
  margin-bottom: 10px;
}

.filter-pills.centered-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 16px;
}

.isa-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.isa-card {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 15px 16px;
  border-radius: 10px;
  background: var(--zs-bg-elev);
  border: 1px solid var(--zs-rule);
  border-left: 3px solid var(--zs-teal);
  min-width: 0;
  transition: transform 0.14s ease, border-color 0.16s ease;
}

.isa-card:hover {
  transform: translateY(-2px);
  border-color: var(--zs-rule-strong);
}

.isa-card[data-cat="native"] { border-left-color: var(--zs-accent); }
.isa-card[data-cat="automotive"] { border-left-color: var(--zs-amber); }
.isa-card[data-cat="fpga"] { border-left-color: var(--zs-emerald); }
.isa-card[data-cat="vm"] { border-left-color: var(--zs-teal); }

.isa-card h3 {
  margin: 0;
  font-size: 0.98rem;
  font-weight: 630;
  color: var(--zs-ink);
}

.isa-card p {
  margin: 0;
  font-size: 0.84rem;
  color: var(--zs-ink-soft);
}

/* Gallery Vector Crests & Lightbox */
.gallery-grid.ablation-gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.plate-card {
  display: flex;
  flex-direction: column;
  border-radius: 12px;
  border: 1px solid var(--zs-rule-strong);
  background: var(--zs-surface);
  box-shadow: var(--zs-shadow-card), var(--zs-specular);
  overflow: hidden;
  min-width: 0;
}

.plate-thumb-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 186px;
  padding: 18px;
  border: 0;
  border-bottom: 1px solid var(--zs-rule);
  background: var(--zs-well);
  cursor: zoom-in;
}

body[data-theme="vellum"] .plate-thumb-btn {
  background: #F3F2EE;
}

.plate-thumb-btn img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transition: transform 0.25s ease;
}

.plate-thumb-btn:hover img {
  transform: scale(1.04);
}

.plate-meta {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.plate-tag,
.hub-tag {
  font-family: var(--zs-mono);
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--zs-teal-text);
}

.plate-meta h3 {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 640;
  color: var(--zs-ink);
}

.plate-meta p {
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.5;
  color: var(--zs-ink-soft);
}

.plate-lightbox {
  position: fixed;
  inset: 0;
  z-index: 960;
  background: rgba(6, 6, 9, 0.84);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.plate-lightbox[hidden] {
  display: none;
}

.lightbox-dialog {
  width: min(720px, 100%);
  border-radius: 14px;
  border: 1px solid var(--zs-rule-strong);
  background: var(--zs-surface);
  color: var(--zs-ink);
  box-shadow: var(--zs-shadow-window);
  overflow: hidden;
}

.lightbox-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--zs-rule);
  background: var(--zs-bg-elev);
}

.lightbox-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.lightbox-img {
  width: 100%;
  max-height: 360px;
  object-fit: contain;
  padding: 20px;
  border-radius: 10px;
  background: var(--zs-well);
  border: 1px solid var(--zs-rule);
}

body[data-theme="vellum"] .lightbox-img {
  background: #F3F2EE;
}

.lightbox-body h3 {
  margin: 4px 0 0;
  font-size: 1.18rem;
}

.lightbox-body p {
  margin: 0;
  color: var(--zs-ink-soft);
}

.card-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 580;
  color: var(--zs-accent-soft);
}

/* Security, ZOE Hub & Verification Plate */
.capability-grid.ablation-security-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.ab-zoe-hub-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 20px;
}

.velvet-plate.verification-plate {
  --zs-ink: #F4F4F5;
  --zs-ink-soft: #D4D4D8;
  --zs-ink-muted: #A1A1AA;
  --zs-teal-text: #2DD4BF;
  --zs-accent-soft: #FB7185;
  --zs-emerald-text: #34D399;
  --surface-strong: rgba(255, 255, 255, 0.12);
  --zs-rule: rgba(255, 255, 255, 0.14);
  padding: 24px;
  border-radius: 12px;
  background: #070709;
  color: #F4F4F5;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.velvet-plate.verification-plate .zs-kicker-teal {
  color: #2DD4BF;
}

.velvet-plate.verification-plate code {
  color: #F4F4F5;
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.18);
}

.verif-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.verif-head h3 {
  margin: 8px 0 0;
  font-size: 1.26rem;
  color: #F4F4F5;
}

.pill-emerald {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 6px;
  font-family: var(--zs-mono);
  font-size: 0.72rem;
  font-weight: 650;
  background: rgba(52, 211, 153, 0.14);
  border: 1px solid rgba(52, 211, 153, 0.35);
  color: #34D399;
}

body[data-theme="vellum"] .pill-emerald {
  background: rgba(4, 120, 87, 0.10);
  border-color: rgba(4, 120, 87, 0.32);
  color: #065F46;
}

.velvet-plate .pill-emerald,
body[data-theme="vellum"] .velvet-plate .pill-emerald {
  background: rgba(52, 211, 153, 0.14);
  border-color: rgba(52, 211, 153, 0.35);
  color: #34D399;
}

.verif-py {
  font-family: var(--zs-mono);
  font-size: 0.78rem;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #FBBF24;
  background: rgba(255, 255, 255, 0.04);
}

.verif-kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.verif-kpi {
  padding: 15px 16px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.09);
  min-width: 0;
}

.verif-label {
  display: block;
  font-family: var(--zs-mono);
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #2DD4BF;
  margin-bottom: 4px;
}

.verif-num {
  display: block;
  font-size: 1.52rem;
  font-weight: 700;
  color: #F4F4F5;
  line-height: 1.2;
}

.verif-kpi small {
  display: block;
  margin-top: 5px;
  font-size: 0.84rem;
  color: #A1A1AA;
}

.standards-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.std-card {
  padding: 15px 16px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  min-width: 0;
}

.std-card h3 {
  margin: 4px 0 6px;
  font-size: 1.04rem;
  color: #F4F4F5;
}

.std-card p {
  margin: 0;
  font-size: 0.86rem;
  color: #A1A1AA;
  line-height: 1.54;
}

/* Tiers Grid */
.tiers-grid.tiers-4col {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  align-items: stretch;
}

.tiers-grid.tiers-4col .tier-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 24px 20px;
  border-radius: 14px;
  background: var(--zs-surface);
  border: 1px solid var(--zs-rule);
  box-shadow: var(--zs-shadow-card), var(--zs-specular);
  min-width: 0;
}

.tiers-grid.tiers-4col .tier-card.is-featured {
  border-color: rgba(225, 29, 72, 0.5);
  box-shadow: 0 20px 52px -20px rgba(225, 29, 72, 0.24), inset 0 2px 0 var(--zs-accent);
}

.tier-badge {
  font-family: var(--zs-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--zs-ink-muted);
}

.tier-card.is-featured .tier-badge {
  color: var(--zs-accent-soft);
}

.tier-card h3 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 650;
  color: var(--zs-ink);
}

.tier-price {
  font-size: 1.82rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--zs-ink);
}

.tier-cadence {
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.52;
  color: var(--zs-ink-soft);
}

.tier-features {
  margin: 6px 0 0;
  padding-left: 18px;
  display: grid;
  gap: 6px;
}

.tier-features li {
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--zs-ink-soft);
}

.tiers-grid.tiers-4col .tier-card .zs-btn {
  margin-top: auto;
  width: 100%;
}

/* Add-Ons Banner, Universal Setup & Procurement Access Plate */
.ab-open-access-banner {
  margin-top: 22px;
  padding: 22px 24px;
  border-radius: 14px;
  background: var(--zs-surface);
  border: 1px solid var(--zs-rule-strong);
  border-left: 4px solid var(--zs-emerald);
  box-shadow: var(--zs-shadow-card), var(--zs-specular);
}

.ab-open-access-banner h3 {
  margin: 6px 0 8px;
  font-size: 1.16rem;
  color: var(--zs-ink);
}

.ab-open-access-banner p {
  margin: 0;
  max-width: 66ch;
  font-size: 0.92rem;
  line-height: 1.62;
  color: var(--zs-ink-soft);
}

.ab-setup-box {
  margin-top: 24px;
  padding: 24px;
  border-radius: 14px;
  background: var(--zs-surface);
  border: 1px solid var(--zs-rule-strong);
  box-shadow: var(--zs-shadow-card), var(--zs-specular);
}

.ab-setup-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.ab-setup-head h3 {
  margin: 4px 0 0;
  font-size: 1.2rem;
  color: var(--zs-ink);
}

.ab-setup-lead {
  margin: 0 0 16px;
  font-size: 0.92rem;
  line-height: 1.62;
  color: var(--zs-ink-soft);
  max-width: 66ch;
}

.ab-setup-controls {
  display: grid;
  gap: 14px;
  margin-bottom: 16px;
}

.ab-setup-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ab-setup-group .ab-tab-strip {
  justify-content: flex-start;
  margin-bottom: 0;
}

.ab-setup-lbl {
  font-family: var(--zs-mono);
  font-size: 0.76rem;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--zs-accent-soft);
}

body[data-theme="vellum"] .ab-setup-lbl {
  color: var(--zs-accent);
}

.ab-setup-terminal {
  padding: 18px;
  border-radius: 10px;
  background: var(--zs-bg-elev);
  border: 1px solid var(--zs-rule-strong);
}

.ab-setup-term-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.ab-setup-term-bar strong {
  font-family: var(--zs-mono);
  font-size: 0.85rem;
  color: var(--zs-ink);
  overflow-wrap: anywhere;
}

.ab-setup-terminal .ab-doc-code {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.ab-setup-checks {
  margin: 14px 0 0;
  padding-left: 20px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 18px;
  font-size: 0.88rem;
  line-height: 1.54;
  color: var(--zs-ink-soft);
}

.ablation-access-plate {
  margin: 24px 0;
  padding: 24px;
  border-radius: 14px;
  background: var(--zs-surface);
  border: 1px solid var(--zs-rule-strong);
  box-shadow: var(--zs-shadow-card), var(--zs-specular);
  text-align: center;
}

.ablation-access-plate h3 {
  margin: 6px 0 8px;
  font-size: 1.28rem;
  color: var(--zs-ink);
}

.ablation-access-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 18px 0;
  text-align: left;
}

.ablation-access-step {
  padding: 16px;
  border-radius: 10px;
  background: var(--zs-bg-elev);
  border: 1px solid var(--zs-rule);
}

.ablation-access-step strong {
  display: block;
  margin-bottom: 6px;
  color: var(--zs-ink);
}

.ablation-access-step p {
  margin: 0;
  max-width: 64ch;
  font-size: 0.88rem;
  line-height: 1.54;
  color: var(--zs-ink-soft);
}

.ablation-access-step a:not(.zs-btn),
.ablation-access-plate a:not(.zs-btn) {
  color: var(--zs-ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.ablation-access-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin: 16px 0 12px;
}

.ablation-access-actions .zs-btn {
  text-decoration: none;
}

.license-footnote {
  margin: 0;
  max-width: 68ch;
  font-size: 0.9rem;
  line-height: 1.62;
  color: var(--zs-ink-soft);
}

/* Responsive Breakpoints */
@media (max-width: 1120px) {
  .pipeline-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .tiers-grid.tiers-4col {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .isa-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .gallery-grid.ablation-gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 960px) {
  .ab-kpi-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .book-spread {
    grid-template-columns: 1fr;
  }
  .spread-gutter {
    display: none;
  }
  .ab-cap-grid,
  .ab-why-grid,
  .ab-ref-grid,
  .ab-zoe-hub-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .ablation-access-steps,
  .verif-kpi-grid,
  .standards-strip {
    grid-template-columns: 1fr;
  }
  .isa-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .ab-modern-hero {
    padding: 44px 0 40px;
  }
  .ab-kpi-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .pipeline-grid,
  .tiers-grid.tiers-4col,
  .ab-cap-grid,
  .ab-why-grid,
  .ab-ref-grid,
  .ab-zoe-hub-grid,
  .capability-grid.ablation-security-grid,
  .gallery-grid.ablation-gallery-grid,
  .isa-grid,
  .ab-setup-checks {
    grid-template-columns: 1fr;
  }
  .zoe-ci-callout {
    grid-template-columns: 1fr;
    text-align: center;
    padding: 20px 18px;
  }
  .zoe-ci-avatar-wrap {
    justify-content: center;
  }
  .spec-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }
  .ab-catalog-box,
  .ab-docs-shell,
  .ab-doc-reader,
  .book-spread,
  .ab-setup-box,
  .ablation-access-plate {
    padding: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pipeline-card:hover,
  .isa-card:hover,
  .plate-thumb-btn:hover img {
    transform: none;
  }
}
