.advanced-graphic-depth {
  --agd-ink: #edf7f5;
  --agd-muted: #c8dfdc;
  box-sizing: border-box;
  display: grid;
  gap: .68rem;
  min-width: 0;
  margin: .9rem 0 1.05rem;
  padding: clamp(.75rem, 2vw, 1.05rem);
  border: 1px solid #5e9193;
  border-radius: .75rem;
  background: #18343d;
  box-shadow: 0 7px 18px #061b2440;
  color: var(--agd-ink);
}
.advanced-graphic-depth * { box-sizing: border-box; }
.advanced-graphic-depth-title {
  margin: 0;
  color: #f5fbf6;
  font-size: clamp(1rem, 2vw, 1.22rem);
  line-height: 1.3;
}
.advanced-graphic-depth-instruction,
.advanced-graphic-depth-limit {
  margin: 0;
  color: var(--agd-muted);
  font-size: .84rem;
  line-height: 1.5;
}
.advanced-graphic-depth-limit {
  padding-top: .5rem;
  border-top: 1px solid #5a8084;
}
.advanced-reader-visual .advanced-graphic-depth button,
.advanced-reader-two .advanced-graphic-depth button,
.advanced-reader-three .advanced-graphic-depth button,
.advanced-reader-four .advanced-graphic-depth button,
.advanced-reader-five .advanced-graphic-depth button,
.advanced-reader-six .advanced-graphic-depth button {
  appearance: none;
  font: inherit;
  cursor: pointer;
}
.advanced-graphic-depth button:focus-visible {
  outline: 3px solid #fce0a8;
  outline-offset: 2px;
}
.advanced-graphic-depth-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
}
.advanced-graphic-depth-tab {
  padding: .44rem .68rem;
  border: 1px solid #82aaad;
  border-radius: .3rem;
  background: #244751;
  color: #f2f8f7;
  font-size: .8rem !important;
  font-weight: 750 !important;
  line-height: 1.35;
}
.advanced-graphic-depth-tab[aria-pressed="true"] {
  border-color: #b8eadf;
  background: #b4e6d9;
  color: #0b2e35;
}

/* The source card contains authored observations, without a simulated monitor channel. */
.advanced-graphic-depth-monitor {
  min-width: 0;
  padding: .62rem;
  border: 1px solid #78a8a7;
  border-radius: .5rem;
  background: #0d252b;
}
.advanced-graphic-depth-monitor-top {
  padding: .05rem .15rem .45rem;
  color: #d2e6dd;
  font: 700 .75rem/1.3 ui-monospace, SFMono-Regular, Consolas, monospace;
  letter-spacing: .035em;
}
.advanced-graphic-depth-monitor-screen {
  display: grid;
  grid-template-columns: minmax(8rem, .3fr) minmax(0, 1fr);
  gap: .35rem .8rem;
  min-width: 0;
  padding: .78rem;
  border: 1px solid #456e72;
  border-radius: .28rem;
  background: #143238;
}
.advanced-graphic-depth-monitor-readout {
  display: grid;
  align-content: center;
  grid-template-columns: auto 1fr;
  grid-row: 1 / span 3;
  column-gap: .2rem;
  min-width: 0;
  padding: .3rem .75rem .3rem .2rem;
  border-right: 1px solid #547577;
  color: #a4ecbf;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}
.advanced-graphic-depth-readout-label {
  grid-column: 1 / -1;
  color: #c4d8cf;
  font-size: .75rem;
  font-weight: 700;
  line-height: 1.3;
}
.advanced-graphic-depth-readout-value {
  min-width: 0;
  font-size: clamp(2.15rem, 5vw, 3.3rem);
  font-weight: 700;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
}
.advanced-graphic-depth-readout-unit {
  align-self: end;
  padding-bottom: .35rem;
  color: #c4d8cf;
  font-size: .75rem;
  font-weight: 700;
}
.advanced-graphic-depth-monitor-time {
  grid-column: 2;
  color: #f2dfb5;
  font: 700 .83rem/1.35 ui-monospace, SFMono-Regular, Consolas, monospace;
}
.advanced-graphic-depth-monitor-exact {
  grid-column: 2;
  padding-top: .3rem;
  border-top: 1px solid #244247;
  color: #dcebe7;
  font-size: .78rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.advanced-graphic-depth-monitor-patient {
  grid-column: 2;
  color: #eef7f1;
  font-size: .82rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.advanced-graphic-depth-plot {
  display: flex;
  gap: .4rem;
  min-width: 0;
  padding: .2rem 0 .45rem;
  overflow-x: auto;
  scrollbar-color: #8db5ae #24434b;
}
.advanced-reader-visual .advanced-graphic-depth-bar,
.advanced-reader-two .advanced-graphic-depth-bar,
.advanced-reader-three .advanced-graphic-depth-bar,
.advanced-reader-four .advanced-graphic-depth-bar,
.advanced-reader-five .advanced-graphic-depth-bar,
.advanced-reader-six .advanced-graphic-depth-bar {
  display: grid;
  align-content: space-between;
  gap: .2rem;
  flex: 0 0 clamp(6.2rem, 22%, 9rem);
  min-width: 0;
  min-height: 5.6rem;
  margin: 0;
  padding: .45rem .48rem;
  border: 1px solid #78989a;
  border-radius: .3rem;
  background: #112c34;
  box-shadow: none;
  color: #ecf6f3;
  text-align: left;
}
.advanced-graphic-depth-bar:hover { background: #214a50; }
.advanced-graphic-depth-bar.is-current {
  border-color: #f2d49d !important;
  background: #244d50 !important;
  box-shadow: inset 3px 0 #f2d49d !important;
}
.advanced-graphic-depth-time {
  color: #e8d49f;
  font: 700 .75rem/1.2 ui-monospace, SFMono-Regular, Consolas, monospace;
}
.advanced-graphic-depth-number {
  color: #a4ecbf;
  font: 700 1.3rem/1.05 ui-monospace, SFMono-Regular, Consolas, monospace;
  font-variant-numeric: tabular-nums;
}
.advanced-graphic-depth-source-label {
  color: #d4e4e0;
  font-size: .75rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.advanced-graphic-depth-detail,
.advanced-graphic-depth-source-caveat {
  margin: 0;
  padding: .58rem .7rem;
  border-left: 3px solid #e6c481;
  background: #31433e;
  font-size: .82rem;
  line-height: 1.48;
}
.advanced-graphic-depth-source-caveat {
  border: 1px solid #cdaa73;
  background: #473e2e;
  color: #fff0d6;
}
.advanced-graphic-depth-comparison,
.advanced-graphic-depth-lead-review {
  display: grid;
  gap: .55rem;
  min-width: 0;
  padding: .78rem;
  border: 1px solid #719a98;
  border-radius: .45rem;
  background: #102b32;
}
.advanced-graphic-depth-comparison h5,
.advanced-graphic-depth-lead-review h5 {
  margin: 0;
  color: #f6ead1;
  font-size: .94rem;
}
.advanced-graphic-depth-comparison p,
.advanced-graphic-depth-lead-review p { margin: 0; line-height: 1.48; }
.advanced-graphic-depth-pin-controls,
.advanced-graphic-depth-decision-controls {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
}
.advanced-graphic-depth-pin,
.advanced-graphic-depth-check,
.advanced-graphic-depth-retry {
  min-height: 2.4rem;
  padding: .46rem .7rem;
  border: 1px solid #abd5c9;
  border-radius: .32rem;
  background: #d8eee5;
  color: #12343a;
  font-size: .8rem !important;
  font-weight: 750 !important;
  text-align: left;
}
.advanced-graphic-depth-pin:hover,
.advanced-graphic-depth-check:hover,
.advanced-graphic-depth-retry:hover { background: #f3f9dc; }
.advanced-graphic-depth-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .5rem;
}
.advanced-graphic-depth-pair-card {
  display: grid;
  align-content: start;
  gap: .27rem;
  min-width: 0;
  padding: .58rem .65rem;
  border-left: 3px solid #e6c481;
  background: #25454a;
  color: #eff7f4;
  font-size: .8rem;
  overflow-wrap: anywhere;
}
.advanced-graphic-depth-pair-card strong { color: #ffe8bd; }
.advanced-graphic-depth-pair-status,
.advanced-graphic-depth-feedback {
  min-height: 1.35rem;
  color: #f4e7c7;
  font-size: .81rem;
}
.advanced-graphic-depth-decision {
  display: grid;
  gap: .38rem;
  min-width: 0;
  margin: 0;
  padding: .58rem;
  border: 1px solid #668c8b;
}
.advanced-graphic-depth-decision legend {
  padding: 0 .25rem;
  color: #e9f2ed;
  font-size: .82rem;
  font-weight: 700;
}
.advanced-graphic-depth-choice {
  display: flex;
  align-items: flex-start;
  gap: .42rem;
  min-width: 0;
  font-size: .8rem;
  line-height: 1.42;
}
.advanced-graphic-depth-choice input { flex: 0 0 auto; margin: .15rem 0 0; }

/* A source index shows exactly which narrative lead findings were supplied. */
.advanced-graphic-depth-paper-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: .2rem .8rem;
  padding: .5rem .65rem;
  border: 1px solid #9db7b0;
  border-bottom: 0;
  border-radius: .25rem .25rem 0 0;
  background: #dcece8;
  color: #1b353b;
  font: 700 .75rem/1.35 ui-monospace, SFMono-Regular, Consolas, monospace;
}
.advanced-graphic-depth-paper-time { font: inherit; }
.advanced-graphic-depth-atlas {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .65rem;
  min-width: 0;
  padding: .6rem;
  border: 1px solid #8bb0aa;
  border-radius: 0 0 .25rem .25rem;
  background: #dcece8;
}
.advanced-graphic-depth-lead-group { min-width: 0; }
.advanced-graphic-depth-lead-group h5 {
  margin: 0 0 .4rem;
  color: #294a4b;
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.advanced-graphic-depth-lead-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .25rem;
}
.advanced-reader-visual .advanced-graphic-depth-lead,
.advanced-reader-two .advanced-graphic-depth-lead,
.advanced-reader-three .advanced-graphic-depth-lead,
.advanced-reader-four .advanced-graphic-depth-lead,
.advanced-reader-five .advanced-graphic-depth-lead,
.advanced-reader-six .advanced-graphic-depth-lead {
  display: grid;
  align-content: space-between;
  gap: .12rem;
  min-width: 0;
  min-height: 5rem;
  margin: 0;
  padding: .3rem .34rem;
  border: 1px solid #a1beb6;
  border-radius: .25rem;
  background: #f7fbf7;
  box-shadow: none;
  color: #29353a;
  text-align: left;
}
.advanced-graphic-depth-lead:hover { background-color: #e5f3e8; }
.advanced-graphic-depth-lead strong {
  color: #1e2d34;
  font: 700 .94rem/1.1 ui-monospace, SFMono-Regular, Consolas, monospace;
}
.advanced-graphic-depth-lead-summary {
  color: #284248;
  font-size: .76rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.advanced-graphic-depth-lead-status {
  color: #405159;
  font-size: .75rem;
  line-height: 1.2;
  overflow-wrap: anywhere;
}
.advanced-graphic-depth-lead.is-change-noted { border-bottom: 4px solid #ab6a33; }
.advanced-graphic-depth-lead.is-finding-supplied { border-bottom: 4px solid #418579; }
.advanced-graphic-depth-lead.is-source-limited { border-bottom: 4px solid #866044; }
.advanced-graphic-depth-lead.is-selected {
  outline: 3px solid #145d71;
  outline-offset: 0;
  background: #fff0d8 !important;
  color: #29353a !important;
}
.advanced-graphic-depth-finding {
  display: grid;
  gap: .2rem;
  min-width: 0;
  padding: .6rem .7rem;
  border-left: 3px solid #a6dfd4;
  background: #21434b;
}
.advanced-graphic-depth-finding strong { color: #fff0c5; }
.advanced-graphic-depth-finding p {
  margin: .1rem 0;
  font-size: .83rem;
  line-height: 1.43;
}
.advanced-graphic-depth-reference { color: #c6e0dd; }
@media (max-width: 720px) {
  .advanced-graphic-depth-atlas { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 430px) {
  .advanced-graphic-depth-monitor-screen { grid-template-columns: minmax(0, 1fr); }
  .advanced-graphic-depth-monitor-readout {
    grid-row: auto;
    grid-template-columns: auto auto;
    justify-content: start;
    border-right: 0;
    border-bottom: 1px solid #547577;
  }
  .advanced-graphic-depth-monitor-time,
  .advanced-graphic-depth-monitor-exact,
  .advanced-graphic-depth-monitor-patient { grid-column: 1; }
  .advanced-graphic-depth-pair { grid-template-columns: minmax(0, 1fr); }
  .advanced-graphic-depth-lead-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* Keep every authored source-time control visible when the lesson's
     reading column narrows; the visual order still follows source time. */
  .advanced-graphic-depth-plot {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .35rem;
    overflow-x: visible;
  }
  .advanced-reader-visual .advanced-graphic-depth-bar,
  .advanced-reader-two .advanced-graphic-depth-bar,
  .advanced-reader-three .advanced-graphic-depth-bar,
  .advanced-reader-four .advanced-graphic-depth-bar,
  .advanced-reader-five .advanced-graphic-depth-bar,
  .advanced-reader-six .advanced-graphic-depth-bar { width: 100%; flex-basis: auto; }
}
