.reader-page {
  max-width: 1680px;
  padding: 40px 36px 72px;
}

.reader-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 36px;
  align-items: start;
}

.reader-sidebar {
  position: sticky;
  top: 24px;
  max-height: calc(100dvh - 48px);
  overflow-y: auto;
  padding: 4px 12px 12px 0;
}

.reader-home {
  font-size: 14px;
}
.toc-label {
  margin: 28px 0 12px;
  font-size: 14px;
  color: #657080;
}
.reader-toc {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.reader-toc a {
  padding: 9px 12px;
  border-left: 2px solid transparent;
  font-size: 15px;
  line-height: 1.6;
  color: #47566b;
  text-decoration: none;
}
.reader-toc .toc-child {
  padding: 6px 12px 6px 24px;
  font-size: 13px;
  color: #657080;
}
.reader-toc a:hover {
  background: #eef2f8;
}
.reader-toc a[aria-current] {
  border-left-color: #245eb5;
  background: #e8effb;
  color: #194e9b;
  font-weight: 600;
}
.mobile-toc {
  display: none;
}

.reader-content {
  min-width: 0;
}
.reader-content .day-intro {
  margin: 0 0 32px;
}
.reader-content .day-intro h1 {
  font-size: clamp(27px, 3vw, 38px);
}
.reader-content .compact-section {
  padding: 28px 0;
}
.reader-content .feature-section {
  padding: 16px 0 32px;
}
.section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.reader-page .section-heading :is(h1, h2, h3, h4) {
  margin: 0;
  min-width: 0;
  line-height: 1.5;
}
.permalink {
  flex-shrink: 0;
  color: #657080;
  font-size: 13px;
  white-space: nowrap;
  text-decoration: none;
}
.permalink:hover {
  color: #175cd3;
  text-decoration: underline;
}
.reader-content :is(section[id], .comparison) {
  scroll-margin-top: 28px;
}
.reader-content .evidence {
  margin-top: 22px;
}
.comparison + .comparison {
  margin-top: 36px;
}
.reader-content .columns {
  gap: 12px;
  align-items: start;
}
.reader-content .columns .panel {
  padding: 12px;
  border-radius: 8px;
}
.reader-content .columns img {
  margin: 12px auto 0;
}
.reader-content .columns a {
  cursor: zoom-in;
}
.reader-content .columns .panel p {
  font-size: 13px;
}
.reader-content .columns:focus-visible {
  outline: 3px solid #175cd3;
  outline-offset: 4px;
}
.comparison-tip {
  display: none;
}
.reader-content .prototype-preview {
  margin-left: 0;
  margin-right: 0;
}
.reader-content .prototype-preview img {
  height: auto;
}
.reader-content .pending {
  margin-top: 32px;
}
.reader-status {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 40;
  max-width: calc(100vw - 40px);
  margin: 0;
  padding: 12px 18px;
  border: 1px solid #c6d6ec;
  border-radius: 6px;
  color: #194e9b;
  background: white;
  box-shadow: 0 4px 20px #22304414;
  font-size: 14px;
}
.reader-status[hidden] {
  display: none;
}
.skip-reader {
  position: fixed;
  top: -80px;
  left: 16px;
  z-index: 50;
  padding: 10px 16px;
  background: white;
}
.skip-reader:focus {
  top: 12px;
}

html.image-viewer-open {
  overflow: hidden;
}
.image-viewer {
  width: calc(100vw - 32px);
  height: calc(100dvh - 32px);
  max-width: none;
  max-height: none;
  margin: auto;
  padding: 0;
  overflow: hidden;
  border: 1px solid #566376;
  border-radius: 10px;
  background: #111820;
  color: #fff;
}
.image-viewer[open] {
  display: flex;
  flex-direction: column;
}
.image-viewer::backdrop {
  background: #000c;
}
.image-viewer-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
}
.image-viewer-toolbar p {
  flex: 1;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.image-viewer button {
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid #657080;
  border-radius: 6px;
  background: #223044;
  color: #fff;
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}
.image-viewer button:focus-visible,
.image-viewer-stage:focus-visible {
  outline: 3px solid #a3c4ff;
  outline-offset: -3px;
}
.image-viewer-message {
  margin: 0;
  padding: 0 16px 8px;
}
.image-viewer-message:empty {
  display: none;
}
.image-viewer-stage {
  display: grid;
  flex: 1;
  min-height: 0;
  padding: 16px;
  overflow: auto;
  overscroll-behavior: contain;
  overflow-anchor: none;
  place-items: center;
}
.image-viewer-stage img {
  display: block;
  width: auto;
  height: auto;
  max-width: calc(100vw - 66px);
  max-height: calc(100dvh - 140px);
}
.image-viewer-stage img[hidden] {
  display: none;
}
.image-viewer-frame {
  position: relative;
  width: max-content;
  max-width: 100%;
  line-height: 0;
}
.image-marked-frame {
  position: relative;
  display: block;
  max-width: 420px;
  margin: 16px auto;
  line-height: 0;
}
.image-marked-frame img {
  margin: 0;
}
.image-circles {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  fill: none;
  stroke: #e32020;
  stroke-width: 3px;
}
.image-viewer-zoomed .image-viewer-frame {
  max-width: none;
}
.image-viewer-zoomed .image-viewer-stage {
  display: block;
  place-items: start;
}
.image-viewer-zoomed img {
  max-width: none;
  max-height: none;
}
.reader-content img {
  cursor: zoom-in;
}
.image-preview-button {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: zoom-in;
}
.other-updates {
  margin-top: 32px;
}
.other-updates h2 {
  font-size: 19px;
}

@media (max-width: 1200px) {
  .reader-layout {
    grid-template-columns: 210px minmax(0, 1fr);
    gap: 28px;
  }
  .reader-page {
    padding-left: 24px;
    padding-right: 24px;
  }
  .reader-content .columns.historical-columns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .reader-page {
    padding: 0 20px 40px;
  }
  .reader-layout {
    display: block;
  }
  .reader-sidebar {
    position: static;
    max-height: none;
    overflow: visible;
    padding: 12px 0;
  }
  .reader-ready .reader-sidebar {
    position: sticky;
    top: 0;
    z-index: 20;
    margin: 0 -20px;
    padding: 12px 20px;
    background: #f7f9fb;
    border-bottom: 1px solid #dce1e8;
  }
  .reader-ready .reader-toc,
  .reader-ready .toc-label {
    display: none;
  }
  .reader-ready .mobile-toc {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 8px;
    color: #657080;
    font-size: 13px;
  }
  .mobile-toc select {
    min-width: 0;
    flex: 1;
    padding: 9px 28px 9px 10px;
    border: 1px solid #c6d6ec;
    border-radius: 5px;
    background: white;
    color: #223044;
    font: inherit;
    font-size: 15px;
  }
  .mobile-toc select:focus-visible {
    outline: 3px solid #175cd3;
    outline-offset: 2px;
  }
  .reader-content {
    padding-top: 24px;
  }
  .reader-content :is(section[id], .comparison) {
    scroll-margin-top: 128px;
  }
  .reader-content .columns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .reader-page {
    padding-left: 16px;
    padding-right: 16px;
  }
  .reader-ready .reader-sidebar {
    margin-left: -16px;
    margin-right: -16px;
    padding-left: 16px;
    padding-right: 16px;
  }
  .reader-content .day-intro h1 {
    font-size: 27px;
  }
  .reader-content .section-heading h2 {
    font-size: 21px;
  }
  .reader-content .section-heading h3 {
    font-size: 19px;
  }
  .reader-content .section-heading h4 {
    font-size: 17px;
  }
  .permalink {
    font-size: 12px;
  }
  .comparison-tip {
    display: block;
    font-size: 12px;
    color: #657080;
  }
  .reader-content .columns {
    display: flex;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x proximity;
    padding: 4px 0 14px;
    gap: 12px;
  }
  .reader-content .columns > .panel {
    flex: 0 0 min(78vw, 320px);
    scroll-snap-align: start;
  }
}
.original-feedback {
  margin: 12px 0 20px;
  font-size: 14px;
  color: #566376;
}
.original-feedback summary {
  width: fit-content;
  cursor: pointer;
  color: #175cd3;
  padding: 5px 0;
}
.original-feedback summary:focus-visible {
  outline: 3px solid #175cd3;
  outline-offset: 3px;
}
.original-feedback-content {
  margin-top: 8px;
  padding: 12px 16px;
  background: #f5f7fa;
  border-radius: 6px;
}
.original-feedback blockquote {
  white-space: pre-wrap;
  margin: 6px 0 12px;
  padding-left: 12px;
  border-left: 3px solid #c6d6ec;
  color: #37465b;
}
.feedback-sources {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin: 18px 0;
  color: #657080;
  font-size: 14px;
}
.feedback-images {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 16px;
}
.feedback-images .panel {
  min-width: 0;
  margin: 0;
  padding: 14px;
}
.feedback-images .image-preview-button {
  display: block;
  width: 100%;
  margin: 12px 0;
}
.feedback-images img {
  display: block;
  max-width: 100%;
  width: auto;
  height: auto;
  max-height: 320px;
  margin: auto;
  object-fit: contain;
}
@media (max-width: 700px) {
  .feedback-images {
    grid-template-columns: 1fr;
  }
  .feedback-images img {
    max-height: 280px;
  }
}
.release-handoff {
  margin: 14px 0;
  padding: 12px 16px;
  background: #f5f7fa;
  border: 1px solid #dce1e8;
  border-radius: 8px;
}
.release-handoff summary {
  cursor: pointer;
  font-weight: 650;
}
.release-handoff textarea {
  display: block;
  width: 100%;
  margin: 10px 0;
  padding: 8px;
  font: inherit;
}
.release-handoff button {
  padding: 6px 10px;
  cursor: pointer;
}
.journey {
  margin: 20px 0 28px;
}
.journey h4 {
  margin: 0 0 6px;
  font-size: 18px;
}
.journey ol {
  counter-reset: journey;
  list-style: none;
  padding: 0 0 0 39px;
  margin: 12px 0 0;
}
.journey-step {
  position: relative;
  counter-increment: journey;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 14px;
  margin: 0 0 18px;
  padding: 12px 14px;
  border: 1px solid #dce3ed;
  border-radius: 10px;
  background: #fff;
}
.journey-step::before {
  content: counter(journey);
  position: absolute;
  left: -39px;
  top: 11px;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border: 1px solid #c6d6ec;
  border-radius: 50%;
  background: #eff5fe;
  color: #274a76;
  font-size: 13px;
  font-weight: 700;
  z-index: 1;
}
.journey-step:not(:last-child)::after {
  content: '';
  position: absolute;
  left: -26px;
  top: 40px;
  bottom: -23px;
  border-left: 2px solid #c6d6ec;
}
.journey-text {
  flex: 1 1 160px;
}
.journey-text p {
  margin: 4px 0 0;
  font-size: 14px;
}
.journey-status {
  display: block;
  margin-top: 2px;
  color: #4d5e73;
  font-size: 12px;
}
.journey-step figure {
  width: 300px;
  max-width: 100%;
  margin: 0;
}
.journey-step .image-preview-button {
  display: block;
  width: 100%;
}
.journey-step img {
  display: block;
  width: 100%;
  height: auto;
}
@media (max-width: 700px) {
  .journey-text {
    flex-basis: 100%;
  }
  .journey-step figure {
    margin-inline: auto;
  }
}
.scenario-results {
  max-width: 100%;
  overflow-x: auto;
}
.scenario-results table {
  width: 100%;
  min-width: 530px;
  border-collapse: collapse;
  font-size: 14px;
}
.scenario-results caption {
  padding: 0 0 8px;
  text-align: left;
  font-weight: 700;
}
.scenario-results th,
.scenario-results td {
  border-bottom: 1px solid #dce3ed;
  padding: 8px 10px;
  text-align: left;
  vertical-align: top;
}
.scenario-results thead {
  background: #eef3fa;
}
