/* ==========================================================================
   STYLES BÁO CÁO THƯỜNG NIÊN TRI ÂN 20/11 (PHƯƠNG ÁN 19 - MODULE PRODUCTION)
   Chủ đề: Gieo mầm tri thức · Vững bước vươn xa
   Chuẩn hóa: Scalable REM Typography, Responsive WebP, Content-Visibility, WCAG AA/AAA
   ========================================================================== */

*, *::before, *::after {
  box-sizing: border-box;
}

:root {
  --red: #B3002D;
  --red-deep: #7E0020;
  --red-soft: #FFF0F3;
  --ink: #141414;
  --paper: #FFFFFF;
  --warm: #F3F0EC;
  --warm-2: #EAE4DC;
  --rule: #D6D0C9;
  --rule-strong: #141414;
  --muted: #59534E;
  --on-red: #FFE3E9;
  --focus: #141414;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  --serif: 'Noto Serif Display', Georgia, 'Times New Roman', serif;
  --letter-scale: 1;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5.25rem;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.7;
  font-size-adjust: from-font;
  -webkit-font-smoothing: antialiased;
}

/* Defensive CSS Box Containment */
body, div, section, article, main, aside, header, footer, nav, figure, figcaption,
p, h1, h2, h3, h4, blockquote, span, a, button {
  min-width: 0;
  overflow-wrap: break-word;
  word-break: break-word;
}

h1, h2, h3, h4, p, figure, blockquote {
  margin: 0;
}

a {
  color: inherit;
  text-underline-offset: 0.3em;
}

button {
  font: inherit;
  cursor: pointer;
}

button, a {
  -webkit-tap-highlight-color: transparent;
}

svg, img, picture {
  display: block;
  max-width: 100%;
  height: auto;
}

:where(button, a, [tabindex]):focus-visible {
  outline: 3px solid var(--focus, #141414);
  outline-offset: 4px;
}

main:focus {
  outline: none;
}

[hidden] {
  display: none !important;
}

.skip {
  display: block;
  padding: 0.5rem 1.25rem;
  background: #fff;
  color: #111;
  font-weight: 600;
  position: fixed;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 200;
}
.skip:not(:focus-visible) {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  clip-path: inset(50%);
  overflow: hidden;
}

.vh {
  position: absolute;
  width: 1px;
  height: 1px;
  clip-path: inset(50%);
  overflow: hidden;
}

.shell {
  width: min(77.5rem, calc(100% - 6rem));
  margin-inline: auto;
}

.action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  padding: 0.8125rem 1.4375rem;
  text-decoration: none;
  border: 1px solid currentColor;
  background: transparent;
  color: inherit;
  min-height: 3rem;
  line-height: 1.45;
  text-align: center;
  font-size: 0.96875rem;
  transition: background .2s ease, color .2s ease, border-color .2s ease, transform .15s ease;
}
.action:active {
  transform: scale(0.98);
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.875rem;
}

/* Hero Cover (Annual Report Cover Spread - Optimized for instant LCP) */
.hero {
  background: var(--red);
  color: #fff;
  --focus: #fff;
  padding-bottom: 4.25rem;
}
.top {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
}
.top nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem 1.125rem;
  align-items: center;
  font-size: 0.875rem;
  font-weight: 500;
  margin-left: auto;
}
.top nav a {
  text-decoration: none;
  min-height: 2.75rem;
  display: inline-flex;
  align-items: center;
}
.top nav a:hover {
  text-decoration: underline;
}

.meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid rgb(255 255 255 / .55);
  border-bottom: 1px solid rgb(255 255 255 / .25);
  font-size: 0.75rem;
  letter-spacing: .11em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--on-red);
}
.meta span {
  padding: 0.75rem 1rem 0.75rem 0;
  border-right: 1px solid rgb(255 255 255 / .25);
}
.meta span + span {
  padding-left: 1rem;
}
.meta span:last-child {
  border-right: 0;
}

.numerals {
  margin: 0.875rem 0 0;
}
.numerals svg {
  width: 100%;
}
.num-stroke {
  fill: rgb(255 255 255 / .06);
  stroke: #fff;
  stroke-width: 1.4;
  stroke-dasharray: 1400;
  stroke-dashoffset: 0;
  animation: draw 1.2s cubic-bezier(.6,0,.2,1) .08s both;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 7.6fr) minmax(0, 4.4fr);
  gap: 2.75rem;
  align-items: start;
  margin-top: 1.5rem;
}
.kicker {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--on-red);
}
h1 {
  font-size: clamp(2.25rem, 1.25rem + 4vw, 4.75rem);
  line-height: 1.06;
  letter-spacing: -.04em;
  font-weight: 800;
  margin: 0.625rem 0 1.125rem;
}
h1 .line {
  display: block;
  overflow: hidden;
  padding-top: .16em;
  margin-top: -.12em;
  padding-bottom: .16em;
}
h1 .line > span {
  display: inline-block;
  animation: rise .55s cubic-bezier(.2,.8,.2,1) both;
}
h1 .line:nth-child(1) > span { animation-delay: .04s; }
h1 .line:nth-child(2) > span { animation-delay: .12s; }
h1 em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -.02em;
  font-size-adjust: from-font;
  display: inline-block;
}
.hero-quote {
  font-family: var(--serif);
  font-style: italic;
  font-size-adjust: from-font;
  font-size: 1.25rem;
  line-height: 1.48;
  color: var(--on-red);
  border-left: 2px solid #fff;
  padding-left: 1rem;
  margin: 0 0 1rem;
  max-width: 38rem;
  text-wrap: pretty;
}
.lead {
  font-size: 1.125rem;
  line-height: 1.62;
  max-width: 40rem;
  color: #fff;
  text-wrap: pretty;
}
.hero .action-row {
  margin-top: 1.5rem;
}
.btn-solid {
  background: #fff;
  color: var(--red);
  border-color: #fff;
  font-weight: 700;
}
.btn-solid:hover {
  background: var(--on-red);
}
.btn-outline-light {
  background: rgb(255 255 255 / .1);
  color: #fff;
  border-color: rgb(255 255 255 / .5);
  font-weight: 600;
}
.btn-outline-light:hover {
  background: rgb(255 255 255 / .22);
  border-color: #fff;
}

/* Figures Aside (616 Hours Specification Box) */
.figures {
  background: var(--red-deep);
  padding: 1.5rem 1.625rem;
  border: 1px solid rgb(255 255 255 / .22);
}
.fig-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.625rem;
  font-size: 0.75rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--on-red);
  border-bottom: 1px solid rgb(255 255 255 / .3);
  padding-bottom: 0.75rem;
}
.fig-total {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 0.875rem;
  margin: 0.875rem 0 0.5rem;
}
.fig-total b {
  font-size: clamp(3.75rem, 2.25rem + 4vw, 5.75rem);
  line-height: 1;
  font-weight: 800;
  letter-spacing: -.05em;
  font-variant-numeric: tabular-nums;
}
.fig-total > span {
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.35;
}
.bar {
  display: grid;
  grid-template-columns: 192fr 400fr 24fr;
  gap: 3px;
  height: 0.75rem;
  margin: 1rem 0 1.125rem;
}
.seg {
  background: #fff;
  transform-origin: left;
  animation: grow 1s cubic-bezier(.2,.8,.2,1) both;
}
.seg:nth-child(2) { background: #FF9DB1; animation-delay: .08s; }
.seg:nth-child(3) { background: #FFE3E9; animation-delay: .16s; }
.fig-rows {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}
.fig-rows div {
  border-top: 1px solid rgb(255 255 255 / .28);
  padding: 0.5625rem 0;
  display: grid;
  grid-template-columns: minmax(0, 4.5rem) minmax(0, 1fr);
  gap: 0.75rem;
  align-items: baseline;
}
.fig-rows b {
  display: block;
  font-size: 1.625rem;
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: -.03em;
  font-variant-numeric: tabular-nums;
}
.fig-rows small {
  display: block;
  font-size: 0.84375rem;
  line-height: 1.45;
  color: var(--on-red);
}
.fig-rows i {
  display: inline-block;
  width: 0.625rem;
  height: 0.625rem;
  margin-right: 0.375rem;
  background: #fff;
}
.fig-rows div:nth-child(2) i { background: #FF9DB1; }
.fig-rows div:nth-child(3) i { background: #FFE3E9; }
.fig-meta-row {
  border-top: 1px solid rgb(255 255 255 / .28);
  padding-top: 0.625rem;
  margin-top: 0.25rem;
  font-size: 0.78125rem;
  color: var(--on-red);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.375rem 0.75rem;
}

/* Sticky Chapter Index (F01) */
.index {
  position: sticky;
  top: 0;
  z-index: 80;
  background: rgb(255 255 255 / .96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule);
}
.index ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}
.index li {
  border-left: 1px solid var(--rule);
}
.index li:last-child {
  border-right: 1px solid var(--rule);
}
.index a {
  display: block;
  padding: 0.875rem 0.875rem 1rem;
  text-decoration: none;
  min-height: 2.75rem;
  height: 100%;
  border-bottom: 3px solid transparent;
  transition: background .2s, border-color .2s;
}
.index a:hover {
  background: var(--warm);
}
.index a[aria-current="location"] {
  background: var(--red-soft);
  border-bottom-color: var(--red);
}
.index small {
  display: block;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--red);
}
.index span {
  display: block;
  font-weight: 600;
  font-size: 0.875rem;
  line-height: 1.32;
  margin-top: 0.25rem;
}

/* Report Spreads & Off-screen Render Optimization */
.spread {
  padding: 5.75rem 0;
  border-bottom: 1px solid var(--rule);
}
.spread.warm {
  background: var(--warm);
}
#loi-nhan, #mang-theo, #khoanh-khac, #loi-hua {
  content-visibility: auto;
  contain-intrinsic-block-size: auto 56rem;
}

.grid12 {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  gap: 3.25rem;
  align-items: start;
}
.chap {
  display: inline-block;
  font-size: 0.78125rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--red);
  line-height: 1.4;
  padding-bottom: 0.125rem;
}
.chap-num {
  display: block;
  font-size: clamp(4.5rem, 2.5rem + 6vw, 8.25rem);
  line-height: .9;
  font-weight: 800;
  letter-spacing: -.06em;
  color: var(--red);
  margin: 0.625rem 0 1rem;
  font-variant-numeric: tabular-nums;
}
h2 {
  text-wrap: balance;
  font-size: clamp(1.75rem, 1.25rem + 2vw, 2.75rem);
  line-height: 1.25;
  letter-spacing: -.03em;
  font-weight: 700;
  padding-bottom: .18em;
}
.side-note {
  margin-top: 1.125rem;
  font-size: 0.90625rem;
  line-height: 1.6;
  color: var(--muted);
  max-width: 22rem;
  text-wrap: pretty;
}

/* Chapter 01: Letter Reader Tools & Formatting (F02) */
.letter-tools {
  margin-top: 1.5rem;
  padding-top: 1.125rem;
  border-top: 1px solid var(--rule);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 22rem;
}
.letter-tools-label {
  font-size: 0.71875rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
}
.size-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}
.size-btn {
  min-height: 2.625rem;
  padding: 0.375rem 0.75rem;
  border: 1px solid var(--rule);
  background: var(--paper);
  color: var(--ink);
  font-size: 0.8125rem;
  font-weight: 600;
  transition: background .15s, color .15s, border-color .15s;
}
.size-btn:hover:not([aria-pressed="true"]) {
  border-color: var(--ink);
}
.size-btn[aria-pressed="true"] {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}
.tool-btn {
  min-height: 2.75rem;
  padding: 0.5rem 0.875rem;
  border: 1px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
  font-size: 0.84375rem;
  font-weight: 600;
  text-align: left;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.tool-btn:hover {
  background: var(--warm);
}
.tool-status {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--red);
}

.letter-sheet {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-top: 4px solid var(--red);
  padding: clamp(1.5rem, 1rem + 2.5vw, 3rem);
  max-width: 48rem;
}
.letter-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 1.25rem;
  padding-bottom: 1.125rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--rule);
  font-size: 0.78125rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}
.letter {
  font-size: calc(1.125rem * var(--letter-scale));
  line-height: 1.75;
  text-wrap: pretty;
}
.letter p + p {
  margin-top: 1.125rem;
}
.letter .salute {
  font-family: var(--serif);
  font-size-adjust: from-font;
  font-size: calc(1.625rem * var(--letter-scale));
  line-height: 1.38;
  font-weight: 500;
  color: var(--ink);
}
.pull {
  font-family: var(--serif);
  font-style: italic;
  font-size-adjust: from-font;
  font-size: clamp(1.375rem, 1rem + 1.4vw, 2rem);
  line-height: 1.38;
  color: var(--red);
  border-top: 2px solid var(--ink);
  border-bottom: 1px solid var(--rule);
  padding: 1.375rem 0;
  margin: 1.75rem 0 !important;
}
.academy-tribute-box {
  background: var(--warm);
  border-left: 4px solid var(--red);
  padding: 1.125rem 1.25rem;
  margin: 1.5rem 0;
  font-size: calc(1rem * var(--letter-scale));
}
.academy-tribute-box strong {
  display: block;
  font-size: 0.78125rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 0.375rem;
}
.sign-row {
  margin-top: 1.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
}
.sign {
  font-weight: 700;
  font-size: 1.03125rem;
  line-height: 1.5;
}
.sign span {
  display: block;
  font-size: 0.84375rem;
  font-weight: 500;
  color: var(--muted);
}

/* Chapter 02: Messages & Recipient Filter (F03) */
.head-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem 2.5rem;
  justify-content: space-between;
  align-items: end;
  padding-bottom: 0.375rem;
}
.filter-bar {
  margin-top: 1.75rem;
  padding: 1rem 1.25rem;
  background: var(--paper);
  border: 1px solid var(--rule);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem 1.5rem;
}
.filter-bar.warm-bg {
  background: var(--warm);
  margin-bottom: 1.75rem;
}
.filter-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}
.filter-btn {
  min-height: 2.625rem;
  padding: 0.5rem 0.875rem;
  border: 1px solid var(--rule);
  background: var(--warm);
  color: var(--ink);
  font-size: 0.84375rem;
  font-weight: 600;
  transition: background .15s, color .15s, border-color .15s, transform .12s;
}
:where(.filter-bar.warm-bg) .filter-btn {
  background: var(--paper);
}
.filter-btn:hover:not([aria-pressed="true"]) {
  border-color: var(--ink);
}
.filter-btn[aria-pressed="true"] {
  background: var(--red);
  color: #fff;
  border-color: var(--red);
}
.filter-btn[aria-pressed="true"]:hover {
  background: var(--red-deep);
  border-color: var(--red-deep);
}
.filter-meta {
  font-size: 0.8125rem;
  color: var(--muted);
  font-weight: 500;
}

.messages {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2rem 1.75rem;
  margin-top: 2rem;
}
.msg {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-top: 3px solid var(--ink);
  padding: 1.375rem 1.375rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}
.msg[data-recipient-type="hoc-vien"],
.msg[data-recipient-type="vtg"] {
  border-top-color: var(--red);
}
.msg-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.375rem 0.625rem;
  font-size: 0.71875rem;
  letter-spacing: .09em;
  text-transform: uppercase;
  font-weight: 700;
  padding-bottom: 0.625rem;
  border-bottom: 1px solid var(--rule);
}
.msg-head span:first-child {
  color: var(--muted);
}
.msg-head span:last-child {
  color: var(--red);
}
.msg-to {
  font-size: 0.84375rem;
  line-height: 1.45;
  color: var(--muted);
}
.msg-to strong {
  color: var(--ink);
}
.msg blockquote {
  font-family: var(--serif);
  font-size-adjust: from-font;
  font-size: 1.1875rem;
  line-height: 1.48;
  color: var(--ink);
  text-wrap: pretty;
}
.msg-promise {
  background: var(--warm);
  border-left: 3px solid var(--red);
  padding: 0.625rem 0.75rem;
  font-size: 0.84375rem;
  line-height: 1.5;
  color: var(--ink);
}
.msg-promise strong {
  font-weight: 700;
  color: var(--red);
}
.msg-author {
  font-size: 0.84375rem;
  font-weight: 600;
  color: var(--ink);
  margin-top: auto;
  padding-top: 0.625rem;
  border-top: 1px dashed var(--rule);
}

/* Progressive Disclosure ("Xem trọn bộ" button on Mobile) */
.expand-row {
  display: none;
  margin-top: 1.5rem;
  justify-content: center;
}
.expand-btn {
  width: 100%;
  max-width: 26rem;
  min-height: 3rem;
  padding: 0.75rem 1.25rem;
  border: 1.5px solid var(--red);
  border-radius: 999px;
  background: var(--paper);
  color: var(--red);
  font-size: 0.875rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  box-shadow: 0 4px 14px rgb(179 0 45 / .08);
  transition: background .2s, color .2s, transform .15s;
}
.expand-btn:hover {
  background: var(--red);
  color: #fff;
}
.expand-btn:active {
  transform: scale(0.98);
}

/* Chapter 03: Real Classroom Stories */
.stories-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
}
.story-card {
  background: var(--warm);
  border: 1px solid var(--rule);
  border-top: 3px solid var(--red);
  padding: 1.5rem 1.5rem 1.375rem;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}
.story-card[data-course="vtaca-01"],
.story-card[data-course="vtaca-04"],
.story-card[data-course="vtaca-07"] {
  border-top-color: var(--ink);
}
.story-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--red);
}
.story-card h3 {
  margin: 0;
  font-family: var(--serif);
  font-size-adjust: from-font;
  font-size: 1.375rem;
  line-height: 1.32;
  font-weight: 500;
  color: var(--ink);
  text-wrap: balance;
}
.story-card p {
  font-size: 0.96875rem;
  line-height: 1.65;
  color: #2C2A28;
  text-wrap: pretty;
}
.story-tag {
  margin-top: auto;
  padding-top: 0.625rem;
  border-top: 1px solid var(--rule);
  font-size: 0.78125rem;
  color: var(--muted);
}

/* Chapter 04: Documentary Gallery & Lightbox (F05) */
.gallery {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 1.25rem;
  margin-top: 1.75rem;
}
.frame {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-top: 3px solid var(--red);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0;
}
.frame[data-gallery-cat="giang-duong"],
.frame[data-gallery-cat="hoc-vien"] {
  border-top-color: var(--ink);
}
.frame-visual {
  margin: 0.875rem 0.875rem 0;
  border: 1px solid var(--rule);
  background: #F7F4F0;
  overflow: hidden;
  cursor: pointer;
  position: relative;
}
.frame-visual img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform .35s ease;
}
.frame[data-orientation="wide"] .frame-visual img {
  aspect-ratio: 3 / 2;
  object-fit: cover;
}
.frame[data-orientation="landscape"] .frame-visual img {
  aspect-ratio: 4 / 3;
  object-fit: cover;
}
.frame[data-orientation="portrait"] .frame-visual img {
  aspect-ratio: 3 / 4;
  object-fit: cover;
}
.frame-visual:hover img {
  transform: scale(1.02);
}
.frame figcaption {
  padding: 0.875rem 1rem 1rem;
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex-grow: 1;
}
.fig-meta-line {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.375rem;
  font-size: 0.71875rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--red);
}
.frame figcaption h3 {
  display: block;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.38;
}
.frame-foot {
  padding: 0 1rem 1rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.625rem;
}
.privacy-tag {
  font-size: 0.75rem;
  color: var(--muted);
  flex: 1 1 9rem;
  min-width: 0;
}
.zoom-btn {
  min-height: 2.625rem;
  padding: 0.4375rem 0.875rem;
  border: 1px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
  font-size: 0.8125rem;
  font-weight: 600;
  margin-left: auto;
  flex-shrink: 0;
  transition: background .15s, color .15s;
}
.zoom-btn:hover {
  background: var(--ink);
  color: #fff;
}
.f-half { grid-column: span 6; }
.f-third { grid-column: span 4; }
.f-quarter { grid-column: span 3; }

/* Chapter 05: Collective Promise */
.promise {
  background: var(--red);
  color: #fff;
  --focus: #fff;
  padding: 6rem 0;
}
.promise .chap, .promise .chap-num {
  color: #fff;
}
.promise .side-note {
  color: var(--on-red);
}
.promise-text {
  font-family: var(--serif);
  font-size-adjust: from-font;
  font-size: clamp(1.5rem, 1.1rem + 1.8vw, 2.25rem);
  line-height: 1.42;
  text-wrap: pretty;
}
.promise-pillars {
  margin-top: 2rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}
.pillar {
  background: rgb(0 0 0 / .2);
  border-top: 2px solid #fff;
  padding: 1rem 1.125rem;
}
.pillar strong {
  display: block;
  font-size: 0.75rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--on-red);
  margin-bottom: 0.375rem;
}
.pillar p {
  font-size: 0.90625rem;
  line-height: 1.55;
  color: #fff;
}
.promise-sign {
  margin-top: 1.75rem;
  padding-top: 1.125rem;
  border-top: 1px solid rgb(255 255 255 / .45);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.875rem;
  justify-content: space-between;
  font-size: 0.9375rem;
  color: var(--on-red);
}
.promise-sign b {
  color: #fff;
}
.promise .action-row {
  margin-top: 1.75rem;
}

/* Colophon Footer */
.site-foot {
  background: var(--ink);
  color: #E9E6E2;
  border: 0;
  padding: 4rem 0 3.5rem;
  font-size: 0.8125rem;
  --focus: #fff;
}
.site-foot .foot-kicker {
  color: #FF9DB1;
}
.site-foot .foot-title {
  color: #fff;
  margin: 0.75rem 0 1.75rem;
}
.foot3 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2.25rem;
  border-top: 1px solid #444;
  padding-top: 1.5rem;
}
.foot3 h3 {
  font-size: 0.75rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #FF9DB1;
  margin-bottom: 0.625rem;
}
.foot3 p {
  font-size: 0.90625rem;
  line-height: 1.6;
  color: #D8D3CD;
}
.foot-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  align-items: center;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid #333;
}
.foot-btn {
  border-color: #fff;
  color: #fff;
  font-weight: 600;
}
.foot-btn:hover {
  background: #fff;
  color: var(--ink);
}
#copy-status {
  font-size: 0.875rem;
  color: #FFE3E9;
  font-weight: 600;
}
.foot-actions a, .foot-actions button {
  min-height: 2.75rem;
  display: inline-flex;
  align-items: center;
}

/* Dialogs & Modals */
dialog {
  width: min(44rem, calc(100% - 2rem));
  max-height: calc(100dvh - 2.5rem);
  border-radius: 6px;
  border: 0;
  border-top: 5px solid var(--red);
  background: #fff;
  color: var(--ink);
  padding: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  box-shadow: 0 24px 60px rgb(0 0 0 / .45);
}
dialog::backdrop {
  background: rgb(0 0 0 / .72);
  backdrop-filter: blur(6px);
}
.dialog-head {
  position: sticky;
  top: 0;
  z-index: 20;
  background: #fff;
  display: flex;
  flex-wrap: nowrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.125rem 1.5rem 0.875rem;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 0;
}
.dialog-head > div {
  flex: 1;
  min-width: 0;
}
.dialog-head h2 {
  font-family: var(--serif);
  font-size-adjust: from-font;
  font-weight: 600;
  letter-spacing: -.01em;
  font-size: 1.375rem;
  line-height: 1.32;
  margin-top: 0.25rem;
  padding-bottom: 0.1em;
}
.dialog-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 0.75rem;
  padding: 0.625rem 1.5rem;
  background: var(--warm);
  border-bottom: 1px solid var(--rule);
}
.dialog-toolbar .size-btn {
  min-height: 2.125rem;
  padding: 0.25rem 0.625rem;
  font-size: 0.78125rem;
  border-radius: 4px;
}
.dialog-copy-btn {
  min-height: 2.125rem;
  padding: 0.25rem 0.75rem;
  border: 1px solid var(--rule-strong);
  border-radius: 4px;
  background: var(--paper);
  color: var(--ink);
  font-size: 0.78125rem;
  font-weight: 600;
}
.dialog-copy-btn:hover {
  background: var(--ink);
  color: #fff;
}
.close-dialog {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  min-height: 2.375rem;
  padding: 0.375rem 0.875rem;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: var(--warm);
  color: var(--ink);
  font-size: 0.8125rem;
  font-weight: 600;
  flex-shrink: 0;
  text-decoration: none;
  transition: background .2s, border-color .2s, color .2s, transform .15s;
}
.close-dialog:hover {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}
.close-dialog:active {
  transform: scale(0.96);
}
.close-dialog .close-x {
  font-size: 0.9375rem;
  line-height: 1;
  font-weight: 700;
}
.dialog-copy {
  padding: 1.25rem 1.5rem;
}
#letter-dialog .sign-row {
  padding: 1rem 1.5rem 1.5rem;
  margin-top: 0;
}

/* Lightbox Dialog */
#lightbox-dialog {
  width: min(57.5rem, calc(100% - 2rem));
  padding: 0;
}
#lightbox-dialog .dialog-head h2 {
  font-size: 1.25rem;
  line-height: 1.3;
}
.lightbox-stage {
  border: 1px solid var(--rule);
  background: #141414;
  margin: 1.125rem 1.5rem 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  max-height: 58dvh;
  overflow: hidden;
  touch-action: pan-y;
  user-select: none;
}
.lightbox-stage picture {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}
.lightbox-stage img {
  width: auto;
  max-width: 100%;
  max-height: 58dvh;
  height: auto;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}
#lightbox-desc {
  padding: 0 1.5rem 0.75rem;
  margin: 0;
  font-size: 0.96875rem;
  line-height: 1.6;
  color: var(--ink);
}
.lightbox-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.625rem;
  margin-top: 0;
  padding: 0.75rem 1.5rem 1.25rem;
  border-top: 1px solid var(--rule);
}
.lightbox-nav-group {
  display: flex;
  gap: 0.5rem;
}
#lightbox-dialog .lightbox-controls .close-dialog {
  border-radius: 4px;
}
.swipe-hint {
  display: none;
  font-size: 0.75rem;
  color: var(--muted);
}

/* Floating Quick-Nav & Share Dock (Mobile / Tablet <= 64em) */
.quick-dock {
  display: none;
}

/* Chapters Quick-Jump Dialog */
#chapters-dialog {
  width: min(28rem, calc(100% - 1.5rem));
}
.chapters-list {
  list-style: none;
  margin: 0;
  padding: 0.5rem 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.chapters-list a {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding: 0.75rem 1rem;
  text-decoration: none;
  border: 1px solid var(--rule);
  border-radius: 8px;
  background: var(--paper);
  transition: background .15s, border-color .15s;
}
.chapters-list a:hover {
  background: var(--warm);
}
.chapters-list a[aria-current="location"] {
  background: var(--red-soft);
  border-color: var(--red);
}
.chapters-list small {
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: .08em;
  color: var(--red);
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}
.chapters-list span {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--ink);
}

/* Reveal Animations */
.reveal-on .rv {
  opacity: 0;
  clip-path: inset(0 0 100% 0);
  transition: opacity .75s ease, clip-path .85s cubic-bezier(.2,.8,.2,1);
}
.reveal-on .rv.in {
  opacity: 1;
  clip-path: inset(0 0 -1.5rem 0);
}
@keyframes draw { from { stroke-dashoffset: 1400; fill: rgb(255 255 255 / 0); } to { stroke-dashoffset: 0; fill: rgb(255 255 255 / .06); } }
@keyframes rise { from { transform: translateY(105%); } to { transform: none; } }
@keyframes grow { from { transform: scaleX(0); } to { transform: none; } }

/* Responsive Breakpoints (Scalable EM Media Queries) */
@media (max-width: 64em) {
  .hero-grid, .grid12 {
    grid-template-columns: minmax(0, 1fr);
    gap: 2rem;
  }
  .index {
    position: static;
  }
  .index ol {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .index li {
    border-bottom: 1px solid var(--rule);
  }
  .messages, .stories-grid, .promise-pillars {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .f-half, .f-third, .f-quarter {
    grid-column: span 6;
  }
  .side-note, .letter-tools {
    max-width: none;
  }

  /* Compact Floating Quick-Nav & Share Dock */
  .quick-dock {
    position: fixed;
    right: 1rem;
    bottom: max(0.875rem, env(safe-area-inset-bottom));
    z-index: 75;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.3125rem;
    border-radius: 999px;
    background: rgb(20 20 20 / .92);
    backdrop-filter: blur(10px);
    border: 1px solid rgb(255 255 255 / .18);
    box-shadow: 0 10px 28px rgb(0 0 0 / .28);
    color: #fff;
    --focus: #fff;
    transition: transform .28s cubic-bezier(.2,.8,.2,1), opacity .25s ease;
  }
  .quick-dock.at-top,
  .quick-dock.is-hidden:not(:focus-within) {
    transform: translateY(calc(100% + 1.75rem));
    opacity: 0;
    pointer-events: none;
  }
  .dock-btn {
    min-height: 2.375rem;
    padding: 0.375rem 0.8125rem;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: #fff;
    font-size: 0.8125rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    white-space: nowrap;
  }
  .dock-btn:hover {
    background: rgb(255 255 255 / .14);
  }
  .dock-btn.dock-primary {
    background: var(--red);
  }
  .dock-btn.dock-primary:hover {
    background: var(--red-deep);
  }
  .dock-top-btn {
    min-width: 2.375rem;
    padding-inline: 0.625rem;
    justify-content: center;
    border-left: 1px solid rgb(255 255 255 / .18);
    border-radius: 0 999px 999px 0;
  }
}

@media (max-width: 47.5em) {
  body {
    font-size: 1rem;
  }
  .shell {
    width: calc(100% - 2.5rem);
  }
  .top {
    padding: 0.75rem 0 0.375rem;
  }

  /* Horizontal Scrollable Strips with Soft-Edge Content Fade */
  .top nav,
  .filter-group {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    gap: 0.5rem;
  }
  .top nav::-webkit-scrollbar,
  .filter-group::-webkit-scrollbar {
    display: none;
  }
  .top nav {
    margin: 0 -1.25rem;
    width: calc(100% + 2.5rem);
    padding: 0.25rem 1.25rem 0.5rem;
  }
  .filter-bar {
    padding: 0.875rem 1rem;
    gap: 0.625rem;
  }
  .filter-group {
    margin: 0 -1rem;
    width: calc(100% + 2rem);
    padding: 0.125rem 1rem 0.25rem;
  }
  .filter-btn {
    flex-shrink: 0;
    white-space: nowrap;
    border-radius: 999px;
    min-height: 2.375rem;
    padding: 0.4375rem 0.9375rem;
    font-size: 0.8125rem;
  }

  /* Soft-edge mask gradients indicating horizontal scrollability */
  [data-scroll-fade="right"] {
    -webkit-mask-image: linear-gradient(to right, black calc(100% - 2.25rem), transparent 100%);
    mask-image: linear-gradient(to right, black calc(100% - 2.25rem), transparent 100%);
  }
  [data-scroll-fade="left"] {
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 2.25rem, black 100%);
    mask-image: linear-gradient(to right, transparent 0%, black 2.25rem, black 100%);
  }
  [data-scroll-fade="both"] {
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 1.75rem, black calc(100% - 1.75rem), transparent 100%);
    mask-image: linear-gradient(to right, transparent 0%, black 1.75rem, black calc(100% - 1.75rem), transparent 100%);
  }

  .top nav a {
    flex-shrink: 0;
    white-space: nowrap;
    min-height: 2.375rem;
    padding: 0.375rem 0.875rem;
    font-size: 0.8125rem;
    font-weight: 500;
    border-radius: 999px;
    background: rgb(255 255 255 / .12);
    border: 1px solid rgb(255 255 255 / .24);
    color: #fff;
    text-decoration: none;
    transition: background .2s ease, border-color .2s ease, transform .15s ease;
  }
  .top nav a:hover,
  .top nav a:focus-visible {
    background: rgb(255 255 255 / .24);
    border-color: #fff;
    text-decoration: none;
  }
  .top nav a:active {
    background: rgb(255 255 255 / .32);
    transform: scale(0.97);
  }

  .meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .meta span:nth-child(2) {
    border-right: 0;
  }
  .meta span:nth-child(3) {
    padding-left: 0;
  }
  .meta span:nth-child(n+3) {
    border-top: 1px solid rgb(255 255 255 / .25);
  }
  .hero {
    padding-bottom: 2.75rem;
  }
  .lead {
    font-size: 1.03125rem;
  }
  .figures {
    padding: 1.25rem;
  }

  /* Balance odd 5th item in 2-column Chapter Index */
  .index ol {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .index li:nth-child(2n) {
    border-right: 1px solid var(--rule);
  }
  .index li:nth-child(5) {
    grid-column: 1 / -1;
    border-bottom: 0;
  }

  .spread {
    padding: 3.5rem 0;
  }
  .messages, .stories-grid, .promise-pillars {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.5rem;
  }

  /* Mobile Progressive Disclosure */
  .mobile-collapsed {
    display: none !important;
  }
  .expand-row.has-collapsed {
    display: flex;
  }

  .letter {
    font-size: calc(1.03125rem * var(--letter-scale));
  }
  .f-half, .f-third, .f-quarter {
    grid-column: span 12;
  }
  .gallery {
    gap: 1rem;
    margin-top: 1.5rem;
  }
  .promise {
    padding: 4rem 0;
  }
  .foot3 {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.5rem;
  }
  .hero .action-row .action {
    flex: 1 1 100%;
  }

  dialog {
    width: calc(100% - 1.5rem);
    max-height: calc(100dvh - 1.75rem);
    padding: 0;
    border-radius: 6px;
  }
  .dialog-head {
    padding: 0.75rem 1rem;
    gap: 0.75rem;
  }
  .dialog-head h2 {
    font-size: 1.125rem;
    line-height: 1.35;
  }
  .dialog-toolbar {
    padding: 0.5rem 1rem;
  }
  .close-dialog {
    min-height: 2.25rem;
    padding: 0.375rem 0.75rem;
    font-size: 0.8125rem;
  }
  .close-dialog .esc-key {
    display: none;
  }
  .dialog-copy {
    padding: 1rem 1rem 1.25rem;
  }
  #letter-dialog .sign-row {
    padding: 0.875rem 1rem 1.25rem;
  }
  #lightbox-dialog .lightbox-stage {
    margin: 0.75rem 1rem;
  }
  #lightbox-dialog #lightbox-desc {
    padding: 0 1rem 0.625rem;
  }
  #lightbox-dialog .lightbox-controls {
    padding: 0.625rem 1rem 1rem;
  }
  .swipe-hint {
    display: block;
    width: 100%;
    text-align: center;
    padding-bottom: 0.25rem;
  }
  .site-foot {
    padding-bottom: 5.25rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}

@media print {
  .index, .filter-bar, .foot-actions, .letter-tools, .zoom-btn, .quick-dock, .expand-row {
    display: none !important;
  }
  .mobile-collapsed {
    display: flex !important;
  }
  #loi-nhan, #mang-theo, #khoanh-khac, #loi-hua {
    content-visibility: visible !important;
  }
  .hero, .promise, .site-foot {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  .spread {
    padding: 2.25rem 0;
    break-inside: avoid;
  }
}
