.osi-cover-art { position: relative; margin: 0 0 1.2rem; overflow: hidden; border-radius: .65rem; background: #152339; }
.osi-cover-art img { display: block; width: 100%; height: clamp(10rem, 25vw, 16rem); object-fit: cover; object-position: center; }
.osi-cover-art figcaption { padding: .65rem .9rem; color: #d4e4f7; }

.osi-reading > .lesson-chapter:first-child { overflow: clip; }
.osi-explorer { display: grid; grid-template-columns: minmax(10rem, .85fr) minmax(0, 1.75fr); gap: .8rem; margin: 1rem 0 1.6rem; }
.osi-stack { display: grid; align-self: start; position: sticky; top: 1rem; gap: .38rem; }
.osi-reading button {
  font: inherit;
  color: #eaf5ff;
  border: 1px solid #6884a6;
  border-radius: .45rem;
  padding: .5rem .7rem;
  background: #20334f;
  cursor: pointer;
}
.osi-stack button { display: flex; align-items: center; text-align: left; gap: .55rem; min-height: 2.65rem; }
.osi-stack button span { min-width: 1.3em; color: #a7c7e8; font-variant-numeric: tabular-nums; }
.osi-reading button[aria-pressed="true"] { background: #264c66; border-color: #91dff9; box-shadow: inset .2rem 0 #91dff9; }
.osi-reading button:hover:not(:disabled) { border-color: #c1e7ff; }
.osi-reading button:disabled { opacity: .55; cursor: default; }

.osi-layer-detail, .osi-trace { overflow: hidden; border: 1px solid #405575; border-radius: .65rem; background: #142237; }
.osi-detail-copy { padding: .8rem 1rem 1rem; }
.osi-trace-controls, .osi-directions, .osi-steps, .osi-fields { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.osi-step-label { color: #a9c7e2; font-size: .875rem; }
.osi-detail-copy h3, .osi-trace h4 { margin: .35rem 0; color: #ecf6ff; }
.osi-detail-copy p { margin: .4rem 0 .5rem; }

.osi-trace { display: grid; gap: .8rem; padding: .85rem 1rem; }
.osi-trace-controls { justify-content: space-between; }
.osi-pipe {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .7rem;
  padding: .53rem .75rem;
  border-radius: .4rem;
  background: #1e3652;
  font-size: .9rem;
  font-weight: 650;
}
.osi-arrow { width: 35%; text-align: center; color: #9ee8ff; font-size: 1.5rem; }
.osi-fields span {
  padding: .32rem .55rem;
  border: 1px solid #577ba0;
  border-radius: .35rem;
  background: #203d59;
  color: #e4f3ff;
  font: 500 .9rem/1.45 ui-monospace, monospace;
  animation: osi-field-enter 240ms ease-out both;
}
.osi-trace-status p { margin: .55rem 0 .2rem; }
@keyframes osi-field-enter { from { opacity: .45; transform: translateY(.25rem); } }

@media(max-width: 920px) {
  .osi-explorer { grid-template-columns: 1fr; }
  .osi-stack { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .osi-stack button { padding-inline: .5rem; }
}

@media(prefers-reduced-motion: reduce) {
  .osi-fields span { animation: none; }
}

.osi-layer-detail { min-width: 0; }
.osi-definition { display: flow-root; }
.osi-definition > p, .osi-definition > ul { margin: .7rem 0; }
.osi-definition > :first-child { margin-top: 0; }
.osi-definition > :last-child { margin-bottom: 0; }
.osi-comparison-table { overflow-x: auto; margin: .85rem 0; }
.osi-comparison-table table { min-width: 25rem; width: 100%; border-collapse: collapse; text-align: left; }
.osi-comparison-table th, .osi-comparison-table td { padding: .6rem .65rem; vertical-align: top; border: 1px solid #496781; }
.osi-comparison-table th { background: #22405d; }
.osi-technical-note { margin: 1rem 0 0; padding: .65rem .8rem; border-left: 3px solid #7cbfdc; background: #1c354e; border-radius: .3rem; }
.osi-technical-note p { margin: .2rem 0 0; }
