/* DAY 2 — reading and layout refinements */
.day2-page main {
  overflow-x: clip;
  overflow-y: visible;
}

.day2-page :where(a, button, summary):focus-visible {
  outline: 3px solid #c77983;
  outline-offset: 4px;
}

.day2-page :where(section, article)[id] {
  scroll-margin-top: 92px;
}

.day2-topbar nav {
  gap: 4px;
}

.day2-language-switcher {
  flex: 0 0 auto;
  display: inline-flex;
  gap: 3px;
  padding: 3px;
  border: 1px solid rgba(38, 62, 98, .14);
  border-radius: 999px;
  background: rgba(255, 255, 255, .7);
}

.day2-language-switcher a {
  display: grid;
  place-items: center;
  min-width: 31px;
  min-height: 31px;
  padding: 0 7px;
  border-radius: 999px;
  color: #526272;
  font-size: .72rem;
  font-weight: 900;
  line-height: 1;
  text-decoration: none;
}

.day2-language-switcher a:hover,
.day2-language-switcher a:focus-visible,
.day2-language-switcher a[aria-current="true"] {
  background: var(--indigo);
  color: #fff;
}

.day2-translation-note {
  margin: 22px 0;
  padding: 16px 18px;
  border: 1px solid rgba(185, 102, 112, .25);
  border-radius: 16px;
  background: #fff4f1;
  color: #624f55;
}

.day2-observation-focus {
  border-color: rgba(143, 63, 75, .34);
  background: linear-gradient(135deg, rgba(255, 249, 245, .98), rgba(255, 232, 230, .68));
  box-shadow: 0 18px 42px rgba(96, 55, 64, .12);
}

.day2-observation-focus .day2-dialogue-answer {
  position: relative;
}

.day2-observation-focus .day2-dialogue-answer::after {
  content: "重點證詞";
  position: absolute;
  right: 12px;
  top: 10px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #8f3f4b;
  color: #fff;
  font-size: .65rem;
  font-weight: 900;
  letter-spacing: .08em;
}

html[lang="en"] .day2-observation-focus .day2-dialogue-answer::after {
  content: "KEY TESTIMONY";
}

html[lang="ja"] .day2-observation-focus .day2-dialogue-answer::after {
  content: "重要証言";
}

.day2-observation-note {
  border-left-color: #8f3f4b;
  background: linear-gradient(145deg, #fff7f3, #f8e6e4);
}

.day2-observation-note > b {
  color: #733640;
  font-size: 1rem;
}

.day2-observation-note > div p {
  margin: .65em 0;
}

[data-note-lang] {
  display: none !important;
}

html[lang="zh-Hant"] [data-note-lang="zh"],
html[lang="zh-Hans"] [data-note-lang="zh"],
html[lang="en"] [data-note-lang="en"],
html[lang="ja"] [data-note-lang="ja"] {
  display: block !important;
}

b > [data-note-lang],
small > [data-note-lang] {
  width: 100%;
}

.day2-toc {
  width: 196px;
}

.day2-toc a[aria-current="location"] {
  color: var(--rose);
  font-weight: 900;
}

.day2-editorial-label,
.day2-editor-note {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #804750;
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .08em;
}

.day2-editorial-label::before,
.day2-editor-note::before {
  content: "";
  width: 22px;
  height: 2px;
  border-radius: 999px;
  background: var(--gold);
}

.day2-hero .day2-editorial-label {
  margin: 28px 0 0;
}

.day2-remembrance {
  display: flex;
  gap: clamp(8px, 1.2vw, 15px);
  margin: 18px 0 12px;
  color: #8f3f4b;
  font-family: "Noto Serif TC", "Songti TC", serif;
  font-size: clamp(2.35rem, 4.8vw, 4.9rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0;
  text-shadow: 0 2px 0 rgba(255, 255, 255, .8), 0 12px 28px rgba(143, 63, 75, .16);
}

.day2-remembrance span {
  display: grid;
  place-items: center;
  width: 1.18em;
  aspect-ratio: 1;
  border: 1px solid rgba(143, 63, 75, .24);
  border-radius: 17px 8px 15px 7px;
  background: linear-gradient(145deg, rgba(255, 250, 245, .84), rgba(244, 213, 211, .72));
  box-shadow: inset 0 0 0 4px rgba(255, 255, 255, .25), 0 10px 25px rgba(83, 49, 56, .1);
  transform: rotate(var(--day2-character-tilt, -1deg));
}

.day2-remembrance span:nth-child(even) {
  --day2-character-tilt: 1.5deg;
}

.day2-remembrance span:nth-child(3) {
  --day2-character-tilt: -.4deg;
}

.day2-hero blockquote {
  margin-top: 8px;
}

.day2-hero-poster img {
  width: min(100%, 380px);
  height: auto;
  aspect-ratio: 1003 / 1568;
  object-fit: contain;
}

.day2-editor-note {
  margin-top: 12px !important;
  padding: 8px 11px;
  border-radius: 11px;
  background: rgba(255, 255, 255, .68);
  letter-spacing: 0;
}

.day2-editorial-label.is-closing {
  margin-bottom: 10px;
  color: #fff0ef;
}

.day2-rule-grid i {
  background: #efdadd;
  color: #793d47;
}

.day2-facts small,
.day2-dialogue-meta,
.day2-dialogue-translation,
.day2-pdf-figure figcaption,
.day2-dispute-note small {
  color: #5f696f;
}

/* Evidence lenses and the four interpretation cards stay readable at desktop width. */
.day2-lens-grid,
.day2-procedure {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

/* Eight-question evidence path: two columns on desktop, one on mobile. */
.day2-question-path {
  top: 82px;
}

.day2-juror-wall {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  perspective: 1200px;
}

.day2-juror-wall article {
  position: relative;
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  min-height: 0;
  padding: 27px 25px;
  border: 1px solid rgba(36, 69, 101, .14);
  border-radius: 30px;
  background: linear-gradient(138deg, rgba(255, 251, 236, .96), rgba(255, 255, 255, .88));
  box-shadow: 0 18px 42px rgba(52, 66, 77, .10);
  text-align: left;
  overflow: hidden;
  transition: border-color .28s ease, box-shadow .28s ease, transform .28s ease;
}

.day2-juror-wall article::after {
  content: "";
  position: absolute;
  right: -58px;
  bottom: -74px;
  width: 185px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--juror-halo, #f1d7a8);
  opacity: .22;
  transition: transform .45s ease, opacity .3s ease;
}

.day2-juror-wall article:nth-child(2n) { --juror-halo: #d8d3df; }
.day2-juror-wall article:nth-child(3n) { --juror-halo: #c4d9dc; }
.day2-juror-wall article:nth-child(4n) { --juror-halo: #efd0d3; }

.day2-juror-wall article > b {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin: 0;
  border-radius: 50% 50% 18px;
  background: linear-gradient(145deg, #f0d08e, #f8e8c7);
  color: #76501d;
  box-shadow: 0 8px 22px rgba(210, 157, 66, .22);
  font: 900 .86rem/1 "Noto Serif TC", serif;
}

.day2-juror-wall article > div {
  position: relative;
  z-index: 1;
}

.day2-juror-wall h3 {
  margin: 0 0 .55em;
  color: var(--indigo);
  font: 800 clamp(1.05rem, 2vw, 1.22rem)/1.5 "Noto Serif TC", serif;
}

.day2-juror-wall p {
  margin: 0;
  color: #4c5d66;
  font-size: .91rem;
  line-height: 1.75;
}

.day2-juror-wall small {
  display: block;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(36, 69, 101, .11);
  color: #56666e;
  font-size: .82rem;
  line-height: 1.72;
}

.day2-juror-wall small strong {
  color: #8f4b56;
}

.day2-topic-link {
  display: inline-flex;
  margin-top: 14px;
  padding: 6px 11px;
  border: 1px solid rgba(36, 69, 101, .16);
  border-radius: 999px;
  background: rgba(255, 255, 255, .72);
  color: var(--indigo) !important;
  text-decoration: none;
  font-size: .75rem;
  font-weight: 900;
}

.day2-topic-link::after {
  content: " ↓";
}

.day2-juror-wall article.is-current {
  border-color: rgba(169, 95, 108, .52);
  box-shadow: 0 26px 60px rgba(52, 66, 77, .16);
  transform: translateY(-4px);
}

.day2-juror-wall article.is-current::after {
  opacity: .46;
  transform: scale(1.16);
}

/* Full record controls */
.day2-full-record {
  overflow: clip;
}

.day2-record-tools {
  display: grid;
  gap: 15px;
  width: min(980px, 100%);
  margin: 8px auto 20px;
  padding: 18px;
  border: 1px solid rgba(38, 69, 101, .14);
  border-radius: 22px;
  background: rgba(255, 255, 255, .78);
  box-shadow: 0 15px 38px rgba(48, 62, 72, .09);
  backdrop-filter: blur(12px);
}

.day2-record-tools-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.day2-record-tools-copy {
  display: grid;
  gap: 2px;
}

.day2-record-tools-copy strong {
  color: var(--indigo);
}

.day2-record-tools-copy span {
  color: #5f6c72;
  font-size: .78rem;
}

.day2-record-toggle-all,
.day2-chapter-toggle {
  border: 1px solid rgba(38, 69, 101, .18);
  background: #fffaf5;
  color: var(--indigo);
  cursor: pointer;
  font: inherit;
  font-weight: 900;
}

.day2-record-toggle-all {
  flex: 0 0 auto;
  padding: 9px 14px;
  border-radius: 999px;
}

.day2-chapter-jumps {
  display: flex;
  gap: 8px;
  padding: 2px 2px 5px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.day2-chapter-jumps a {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border-radius: 999px;
  background: #f1e9e9;
  color: #774650;
  text-decoration: none;
  font-size: .72rem;
  font-weight: 900;
}

.day2-chapter-jumps a span {
  color: var(--indigo);
}

.day2-record-progress {
  width: min(820px, calc(100% - 20px));
}

.day2-transcript {
  margin-top: 24px;
}

.day2-transcript-chapter > header {
  grid-template-columns: 64px minmax(0, 1fr) auto;
}

.day2-chapter-toggle {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-width: 112px;
  padding: 9px 12px;
  border-radius: 14px;
}

.day2-chapter-toggle i {
  position: relative;
  width: 16px;
  height: 16px;
}

.day2-chapter-toggle i::before,
.day2-chapter-toggle i::after {
  content: "";
  position: absolute;
  left: 2px;
  top: 7px;
  width: 12px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

.day2-chapter-toggle i::after {
  transform: rotate(90deg);
  transition: transform .24s ease;
}

.day2-chapter-toggle[aria-expanded="true"] i::after {
  transform: rotate(0deg);
}

.day2-transcript-chapter.is-collapsed > header {
  border-bottom: 0;
}

.day2-dialogue-flow[hidden] {
  display: none;
}

.day2-dispute-note small {
  font-size: .72rem;
}

@media (max-width: 760px) {
  .day2-language-switcher {
    margin-left: auto;
  }

  .day2-language-switcher a {
    min-width: 29px;
    min-height: 29px;
    padding-inline: 6px;
  }

  .day2-menu {
    margin-left: 0;
  }

  .day2-observation-focus .day2-dialogue-answer {
    padding-top: 44px;
  }

  .day2-observation-note {
    padding: 18px 16px;
  }

  .day2-hero-poster img {
    width: min(68vw, 290px);
    height: auto;
  }

  .day2-lens-grid,
  .day2-procedure,
  .day2-juror-wall {
    grid-template-columns: 1fr;
  }

  .day2-question-path {
    top: 68px;
  }

  .day2-juror-wall article {
    grid-template-columns: 46px minmax(0, 1fr);
    padding: 21px 17px;
  }

  .day2-juror-wall article > b {
    width: 40px;
    height: 40px;
  }

  .day2-juror-wall p {
    font-size: .88rem;
  }

  .day2-record-tools {
    padding: 15px;
  }

  .day2-record-tools-head {
    align-items: stretch;
    flex-direction: column;
  }

  .day2-record-toggle-all {
    width: 100%;
  }

  .day2-transcript-chapter > header {
    grid-template-columns: 46px minmax(0, 1fr);
  }

  .day2-chapter-toggle {
    grid-column: 1 / -1;
    justify-content: space-between;
    width: 100%;
  }

  .day2-dialogue-pair {
    grid-template-columns: 1fr;
  }

  .day2-dialogue-question,
  .day2-dialogue-answer {
    grid-template-columns: 38px minmax(0, 1fr);
  }
}

@media (max-width: 420px) {
  .day2-facts {
    grid-template-columns: 1fr;
  }

  .day2-question-path {
    grid-template-columns: 1fr auto;
    border-radius: 18px;
  }

  .day2-question-path span {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .day2-juror-wall article {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 1121px) {
  .day2-full-record .day2-record-tools,
  .day2-full-record .day2-transcript {
    width: min(900px, 100%);
    margin-left: 0;
    margin-right: auto;
  }

  .day2-full-record .day2-record-progress {
    width: min(820px, 100%);
    margin-left: 0;
    margin-right: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .day2-juror-wall article,
  .day2-juror-wall article::after,
  .day2-chapter-toggle i::after {
    transition: none;
  }
}
