/**
 * Bilim temelleri — Transform Ledger / Rest or Fall / Shape Stack
 */

.doc-science-lab {
  margin: 0.85rem 0 1.1rem;
  padding: 0.85rem 0.95rem 0.95rem;
  border-radius: 14px;
  border: 1px solid rgba(120, 180, 255, 0.22);
  background: linear-gradient(
    152deg,
    rgba(6, 12, 26, 0.58) 0%,
    rgba(4, 10, 22, 0.52) 45%,
    rgba(8, 14, 30, 0.6) 100%
  );
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.04) inset,
    0 14px 36px rgba(0, 0, 0, 0.38);
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
}

.doc-science-lab__tag {
  margin: 0 0 0.45rem;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(140, 210, 255, 0.95);
}

.doc-science-lab__lead {
  margin: 0 0 0.65rem;
  font-size: 0.8rem;
  line-height: 1.55;
  color: rgba(175, 198, 230, 0.9);
}

.doc-science-lab__viewport-wrap {
  position: relative;
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(46, 231, 242, 0.12);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.35) inset,
    0 0 40px rgba(46, 231, 242, 0.04);
}

.doc-science-lab__viewport {
  width: 100%;
  min-height: 240px;
  background:
    radial-gradient(ellipse 70% 55% at 50% 42%, rgba(46, 231, 242, 0.06) 0%, transparent 62%),
    radial-gradient(ellipse 50% 40% at 70% 20%, rgba(181, 108, 255, 0.05) 0%, transparent 55%),
    #05080f;
}

.doc-science-lab[data-science-demo="transform-ledger"] .doc-science-lab__viewport {
  min-height: 280px;
}

.doc-science-lab__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.75rem;
  margin-top: 0.7rem;
}

.doc-science-lab__btn {
  appearance: none;
  border: 1px solid rgba(120, 180, 255, 0.28);
  background: rgba(20, 32, 52, 0.85);
  color: rgba(220, 232, 248, 0.95);
  font: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.38rem 0.7rem;
  border-radius: 8px;
  cursor: pointer;
}

.doc-science-lab__btn:hover {
  border-color: rgba(46, 231, 242, 0.45);
  color: #fff;
}

.doc-science-lab__hint {
  margin: 0.35rem 0 0;
  font-size: 0.72rem;
  line-height: 1.45;
  color: rgba(150, 175, 210, 0.88);
}

.doc-science-lab__matrix {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
  margin-top: 0.75rem;
}

.doc-science-lab__matrix pre {
  margin: 0;
  padding: 0.55rem 0.65rem;
  border-radius: 8px;
  border: 1px solid rgba(110, 150, 210, 0.18);
  background: rgba(0, 0, 0, 0.35);
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.62rem;
  line-height: 1.45;
  color: rgba(180, 210, 240, 0.92);
  overflow-x: auto;
  white-space: pre;
}

.doc-science-lab__matrix-label {
  display: block;
  margin-bottom: 0.3rem;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(120, 170, 220, 0.85);
}

.doc-formula {
  display: inline-block;
  padding: 0.05em 0.35em;
  border-radius: 4px;
  background: rgba(46, 231, 242, 0.08);
  border: 1px solid rgba(46, 231, 242, 0.18);
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.92em;
  color: rgba(200, 235, 255, 0.95);
}

.doc-science-role {
  margin: 1rem 0 1.25rem;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  border-left: 3px solid rgba(46, 231, 242, 0.55);
  background: rgba(46, 231, 242, 0.05);
}

.doc-science-role .doc-prose {
  margin: 0;
}

.doc-science-role .doc-prose > p:last-child {
  margin-bottom: 0;
}

.doc-science-role strong {
  color: rgba(230, 245, 255, 0.98);
}

@media (max-width: 720px) {
  .doc-science-lab__matrix {
    grid-template-columns: 1fr;
  }
}
