/**
 * Pane design language — shared across homepage, product, and docs pages.
 * Background #22262e, 12px border-radius, 6px accent bars, blue uppercase headers.
 */

/* Override default section styling on pane pages */
body[data-page="home"] main,
body[data-page="product"] main,
body[data-page="docs"] main,
body[data-page="about"] main,
body[data-page="trust"] main,
body[data-page="contact"] main,
body[data-page="legal"] main {
  padding: 16px 0 3rem;
}

body[data-page="home"] section,
body[data-page="product"] section,
body[data-page="docs"] section,
body[data-page="about"] section,
body[data-page="trust"] section,
body[data-page="contact"] section,
body[data-page="legal"] section {
  padding: 0;
  border: none;
  background: none;
}

body[data-page="home"] .section-muted,
body[data-page="product"] .section-muted,
body[data-page="docs"] .section-muted,
body[data-page="about"] .section-muted,
body[data-page="trust"] .section-muted,
body[data-page="contact"] .section-muted,
body[data-page="legal"] .section-muted {
  border: none;
  background: none;
}

/* Override default hero styling */
body[data-page="home"] .hero,
body[data-page="product"] .hero,
body[data-page="docs"] .hero,
body[data-page="about"] .hero,
body[data-page="trust"] .hero,
body[data-page="contact"] .hero,
body[data-page="legal"] .hero {
  padding: 0;
}

body[data-page="home"] .hero + section,
body[data-page="product"] .hero + section,
body[data-page="docs"] .hero + section,
body[data-page="about"] .hero + section,
body[data-page="trust"] .hero + section,
body[data-page="contact"] .hero + section,
body[data-page="legal"] .hero + section {
  border-top: none;
}

/* Footer override */
body[data-page="home"] .site-footer,
body[data-page="product"] .site-footer,
body[data-page="docs"] .site-footer,
body[data-page="about"] .site-footer,
body[data-page="trust"] .site-footer,
body[data-page="contact"] .site-footer,
body[data-page="legal"] .site-footer {
  border-top: none;
  padding: 1rem 0 2rem;
  text-align: center;
}

body[data-page="home"] .footer-inner,
body[data-page="product"] .footer-inner,
body[data-page="docs"] .footer-inner,
body[data-page="about"] .footer-inner,
body[data-page="trust"] .footer-inner,
body[data-page="contact"] .footer-inner,
body[data-page="legal"] .footer-inner {
  justify-content: center;
}

/* ---------- Pane base ---------- */

.pn {
  background: #22262e;
  border: 1px dashed rgba(255, 255, 255, 0.10);
  border-radius: 2px;
  padding: 32px 40px;
  margin-bottom: 16px;
  position: relative;
  overflow: hidden;
}

.pn-accent {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 3px;
}

.pn-accent-blue   { background: #60a5fa; }
.pn-accent-green  { background: #22c55e; }
.pn-accent-amber  { background: #f5a623; }
.pn-accent-red    { background: #ef4444; }
.pn-accent-purple { background: #a78bfa; }
.pn-accent-gray   { background: #8b919a; }

/* ---------- Section label ---------- */

.pn-label {
  color: #8b949e;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 500;
  margin: 0 0 12px;
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

body[data-page="docs"] .pn-label {
  color: #e6edf3;
  font-size: 14px;
  font-weight: 600;
}

.pn-label a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  transition: color 0.15s;
}

.pn-label a:hover {
  color: #e6edf3;
}

/* ---------- Product cognitive color mapping ---------- */

body[data-page="product"] {
  --pn-cog-blue: #6699cc;
  --pn-cog-blue-dark: #5588bb;
  --pn-cog-install-card: #2b4a7a;
  --pn-cog-red: #f85149;
  --pn-cog-purple: #d2a8ff;
  --pn-cog-green: #3fb950;
  --pn-cog-amber: #d29922;
}

/* Section label color: base cognitive color, white only on hover */
body[data-page="product"] #the-gap .pn-label { color: var(--pn-cog-blue); }
body[data-page="product"] #the-install .pn-label { color: var(--pn-cog-blue-dark); }
body[data-page="product"] #the-problem .pn-label { color: var(--pn-cog-red); }
body[data-page="product"] #the-approach .pn-label { color: var(--pn-cog-blue); }
body[data-page="product"] #the-classifier .pn-label { color: var(--pn-cog-purple); }
body[data-page="product"] #the-policy .pn-label { color: var(--pn-cog-green); }
body[data-page="product"] #the-chain .pn-label { color: var(--pn-cog-purple); }
body[data-page="product"] #the-dashboard .pn-label { color: var(--pn-cog-green); }
body[data-page="product"] #the-honest-limits .pn-label { color: var(--pn-cog-amber); }

/* Card dashed-left accents: section cognitive mapping */
body[data-page="product"] #the-gap .pn-grid-2x2 .pn-card:nth-child(1) .pn-card-accent-left { background: var(--pn-cog-green); }
body[data-page="product"] #the-gap .pn-grid-2x2 .pn-card:nth-child(2) .pn-card-accent-left { background: var(--pn-cog-red); }

body[data-page="product"] #the-install .pn-grid-2x2 .pn-card .pn-card-accent-left { background: var(--pn-cog-install-card); }

body[data-page="product"] #the-approach .pn-grid-2x2 .pn-card .pn-card-accent-left { background: var(--pn-cog-blue); }

body[data-page="product"] #the-policy .pn-grid-2x2 .pn-card:nth-child(1) .pn-card-accent-left { background: var(--pn-cog-green); }
body[data-page="product"] #the-policy .pn-grid-2x2 .pn-card:nth-child(2) .pn-card-accent-left { background: var(--pn-cog-green); }
body[data-page="product"] #the-policy .pn-grid-2x2 .pn-card:nth-child(3) .pn-card-accent-left { background: var(--pn-cog-amber); }
body[data-page="product"] #the-policy .pn-grid-2x2 .pn-card:nth-child(4) .pn-card-accent-left { background: var(--pn-cog-blue); }

body[data-page="product"] #the-chain .pn-grid-2x2 .pn-card:nth-child(1) .pn-card-accent-left { background: var(--pn-cog-purple); }
body[data-page="product"] #the-chain .pn-grid-2x2 .pn-card:nth-child(2) .pn-card-accent-left { background: var(--pn-cog-purple); }
body[data-page="product"] #the-chain .pn-grid-2x2 .pn-card:nth-child(3) .pn-card-accent-left { background: var(--pn-cog-purple); }
body[data-page="product"] #the-chain .pn-grid-2x2 .pn-card:nth-child(4) .pn-card-accent-left { background: var(--pn-cog-green); }

body[data-page="product"] #the-honest-limits .pn-grid-2x2 .pn-card .pn-card-accent-left { background: var(--pn-cog-amber); }

/* ---------- Headings ---------- */

.pn-hero-heading {
  margin: 0 0 16px;
  font-size: 44px;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: #e4e6eb;
}

.pn-heading {
  margin: 0 0 12px;
  font-size: 20px;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -0.02em;
  color: #e4e6eb;
}

/* ---------- Text ---------- */

.pn-body {
  color: #8b919a;
  font-size: 15px;
  line-height: 1.7;
  margin: 0 0 10px;
  max-width: 52rem;
}

.pn-body:last-child {
  margin-bottom: 0;
}

.pn-body-white {
  color: #e4e6eb;
  font-size: 15px;
  line-height: 1.7;
  margin: 0 0 10px;
}

.pn-subheading {
  color: #e4e6eb;
  font-size: 16px;
  font-weight: 500;
  margin: 0 0 8px;
}

/* ---------- Cards inside panes ---------- */

.pn-card {
  background: #1a1d23;
  border: 1px dashed rgba(255, 255, 255, 0.08);
  border-radius: 2px;
  padding: 18px 20px;
  position: relative;
  overflow: hidden;
}

.pn-card-accent-top {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 3px;
}

.pn-card-accent-left {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 3px;
}

.pn-card-title {
  font-size: 15px;
  font-weight: 600;
  color: #e4e6eb;
  margin: 0 0 6px;
}

.pn-card-body {
  font-size: 13px;
  color: #8b919a;
  line-height: 1.6;
  margin: 0;
}

/* ---------- Grids ---------- */

.pn-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

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

.pn-grid-2x2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

/* ---------- CTA links (chevron-prefixed) ---------- */

.pn-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 16px;
}

.pn-btn-filled {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border: 1px dashed #8b949e;
  border-radius: 2px;
  background: none;
  font-weight: 600;
  font-size: 14px;
  color: #8b949e;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

.pn-btn-filled::before {
  content: "▸ ";
  margin-right: 2px;
}

.pn-btn-filled:hover {
  color: #e4e6eb;
  border-color: #e4e6eb;
}

.pn-btn-outline {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border: 1px dashed #22c55e;
  border-radius: 2px;
  background: none;
  font-weight: 600;
  font-size: 14px;
  color: #22c55e;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

.pn-btn-outline::before {
  content: "▸ ";
  margin-right: 2px;
}

.pn-btn-outline:hover {
  color: #4ade80;
  border-color: #4ade80;
}

/* ---------- Link ---------- */

.pn-link {
  display: inline-block;
  color: #fbbf24;
  font-size: 14px;
  font-weight: 600;
  margin-top: 12px;
  text-decoration: none;
  transition: color 0.15s;
}

.pn-link:hover {
  color: #fcd34d;
}

/* ---------- Flow diagram (static) ---------- */

.pn-flow {
  display: flex;
  align-items: stretch;
  gap: 0;
  margin: 16px 0 0;
}

.pn-flow-box {
  flex: 1;
  background: #1a1d23;
  border: 1px dashed rgba(255, 255, 255, 0.08);
  border-radius: 2px;
  padding: 20px 16px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.pn-flow-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  color: #60a5fa;
  font-size: 22px;
  flex-shrink: 0;
}

.pn-flow-label {
  font-size: 14px;
  font-weight: 600;
  color: #e4e6eb;
  margin: 0 0 4px;
}

.pn-flow-desc {
  font-size: 12px;
  color: #8b919a;
  line-height: 1.5;
  margin: 0;
}

/* ---------- Mini demo preview ---------- */

.pn-demo-preview {
  display: block;
  background: #1a1d23;
  border: 1px dashed rgba(255, 255, 255, 0.10);
  border-radius: 2px;
  padding: 16px 18px;
  margin-top: 16px;
  text-decoration: none;
  transition: border-color 0.2s;
}

.pn-demo-preview:hover {
  border-color: rgba(96, 165, 250, 0.4);
}

.pn-demo-title-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.08);
}

.pn-demo-title-accent {
  width: 3px;
  height: 16px;
  background: #60a5fa;
}

.pn-demo-title-text {
  font-size: 13px;
  font-weight: 600;
  color: #e4e6eb;
}

.pn-demo-panes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 10px;
}

.pn-demo-pane {
  background: #22262e;
  border-radius: 2px;
  border: 1px dashed rgba(255, 255, 255, 0.06);
  padding: 10px 12px;
}

.pn-demo-pane-label {
  font-size: 10px;
  color: #60a5fa;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  font-weight: 500;
  margin: 0 0 4px;
}

.pn-demo-pane-stat {
  font-size: 11px;
  color: #8b919a;
  margin: 0;
  line-height: 1.5;
}

.pn-demo-pane-stat strong {
  color: #e4e6eb;
}

.pn-demo-activity {
  margin-bottom: 10px;
}

.pn-demo-activity-label {
  font-size: 10px;
  color: #8b919a;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin: 0 0 4px;
}

.pn-demo-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 3px 0;
  font-size: 11px;
}

.pn-demo-badge {
  display: inline-block;
  padding: 0;
  border-radius: 0;
  background: none;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

.pn-demo-badge-allow {
  color: #22c55e;
}

.pn-demo-badge-deny {
  color: #ef4444;
}

.pn-demo-row-text {
  color: #8b919a;
}

.pn-demo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-bottom: 10px;
}

.pn-demo-grid-card {
  background: #22262e;
  border-radius: 2px;
  border: 1px dashed rgba(255, 255, 255, 0.06);
  padding: 6px 8px;
  font-size: 10px;
  color: #8b919a;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.pn-demo-grid-accent {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 2px;
}

.pn-demo-cta {
  display: block;
  text-align: center;
  color: #fbbf24;
  font-size: 12px;
  font-weight: 600;
  padding-top: 6px;
}

/* ---------- CTA section ---------- */

.pn-cta-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.pn-cta-heading {
  font-size: 20px;
  font-weight: 600;
  color: #e4e6eb;
  margin: 0 0 6px;
}

.pn-cta-sub {
  font-size: 14px;
  color: #8b919a;
  margin: 0;
}

/* ---------- SVG diagram container ---------- */

.pn-diagram {
  margin: 16px 0 0;
}

.pn-diagram img {
  width: 100%;
  height: auto;
  display: block;
}

/* ---------- Responsive ---------- */

@media (max-width: 1080px) {
  .pn-grid-3,
  .pn-grid-4 {
    grid-template-columns: 1fr 1fr;
  }
  .pn-demo-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 760px) {
  .pn {
    padding: 24px 20px;
  }
  .pn-hero-heading {
    font-size: 30px;
  }
  .pn-grid-3,
  .pn-grid-4,
  .pn-grid-2x2 {
    grid-template-columns: 1fr;
  }
  .pn-flow {
    flex-direction: column;
  }
  .pn-flow-arrow {
    transform: rotate(90deg);
    padding: 6px 0;
  }
  .pn-demo-panes {
    grid-template-columns: 1fr;
  }
  .pn-demo-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .pn-cta-section {
    flex-direction: column;
    align-items: flex-start;
  }
}
