:root {
  color-scheme: light;
  --primary: #0b4f3a;
  --primary-deep: #073429;
  --accent: #d6a83f;
  --accent-soft: #f7edcf;
  --page: #f3f5f1;
  --surface: #ffffff;
  --ink: #19231e;
  --muted: #66736b;
  --line: #dce3de;
  --reader-scale: 1;
  --measure: 760px;
  --shadow: 0 16px 50px rgba(7, 52, 41, 0.12);
  font-family: Inter, Aptos, "Segoe UI", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--page);
  color: var(--ink);
  margin: 0;
}

body.dark {
  color-scheme: dark;
  --page: #111a16;
  --surface: #19241e;
  --ink: #f3f7f4;
  --muted: #bac7bf;
  --line: #394b41;
  --accent-soft: #443919;
  --shadow: 0 16px 50px rgba(0, 0, 0, 0.28);
}

button,
input,
textarea,
select {
  color: inherit;
  font: inherit;
}

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

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

img,
video {
  display: block;
  max-width: 100%;
}

.skip-link {
  background: var(--accent);
  color: #17241d;
  font-weight: 800;
  left: 16px;
  padding: 12px 18px;
  position: fixed;
  top: -80px;
  z-index: 200;
}

.skip-link:focus {
  top: 12px;
}

.reader-loading {
  align-items: center;
  display: flex;
  font-size: 1.1rem;
  font-weight: 750;
  justify-content: center;
  min-height: 100vh;
}

.progress {
  background: transparent;
  height: 5px;
  left: 0;
  position: fixed;
  right: 0;
  top: 0;
  z-index: 110;
}

.progress span {
  background: var(--accent);
  display: block;
  height: 100%;
  transform-origin: left;
  width: 0;
}

.reader-header {
  align-items: center;
  backdrop-filter: blur(15px);
  background: color-mix(in srgb, var(--primary-deep) 94%, transparent);
  color: white;
  display: flex;
  gap: 14px;
  justify-content: space-between;
  min-height: 70px;
  padding: 10px max(16px, calc((100vw - 1220px) / 2));
  position: sticky;
  top: 0;
  z-index: 100;
}

.reader-brand {
  align-items: center;
  color: inherit;
  display: flex;
  gap: 10px;
  min-width: 0;
  text-decoration: none;
}

.reader-logo {
  align-items: center;
  background: var(--accent);
  border-radius: 50%;
  color: var(--primary-deep);
  display: flex;
  flex: 0 0 44px;
  font-family: Georgia, serif;
  font-size: 11px;
  font-weight: 900;
  height: 44px;
  justify-content: center;
  overflow: hidden;
}

.reader-logo img {
  height: 100%;
  object-fit: contain;
  width: 100%;
}

.reader-logos {
  display: flex;
  flex: 0 0 auto;
  gap: 5px;
}

.reader-logos > img {
  background: white;
  border: 2px solid var(--accent);
  border-radius: 50%;
  height: 44px;
  object-fit: contain;
  width: 44px;
}

.reader-brand-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.reader-brand-copy strong {
  font-size: 0.95rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reader-brand-copy span {
  color: #c5d6ce;
  font-size: 0.72rem;
}

.reader-tools {
  align-items: center;
  display: flex;
  gap: 7px;
}

.reader-tool,
.reader-menu-button {
  align-items: center;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  color: white;
  display: inline-flex;
  font-weight: 760;
  gap: 6px;
  justify-content: center;
  min-height: 44px;
  min-width: 44px;
  padding: 0 11px;
  text-decoration: none;
}

.reader-tool:hover,
.reader-menu-button:hover {
  background: rgba(255, 255, 255, 0.16);
}

.reader-tool .tool-label {
  font-size: 0.76rem;
}

.text-tool {
  font-family: Georgia, serif;
  font-size: 1.1rem;
  padding: 0;
}

.reader-main {
  font-size: calc(1rem * var(--reader-scale));
}

.cover {
  background: var(--primary);
  color: white;
  display: grid;
  min-height: min(830px, calc(100vh - 70px));
  overflow: hidden;
  position: relative;
}

.cover-media {
  inset: 0;
  position: absolute;
}

.cover-media::after {
  background:
    linear-gradient(90deg, rgba(7, 52, 41, 0.92) 0%, rgba(7, 52, 41, 0.64) 55%, rgba(7, 52, 41, 0.2) 100%),
    linear-gradient(0deg, rgba(7, 52, 41, 0.72), transparent 50%);
  content: "";
  inset: 0;
  position: absolute;
}

.cover-media img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.cover-content {
  align-self: end;
  display: grid;
  gap: 18px;
  max-width: 900px;
  padding: clamp(50px, 9vw, 120px) max(22px, calc((100vw - 1180px) / 2));
  position: relative;
  z-index: 1;
}

.cover:has(.page-footer) .cover-content {
  padding-bottom: max(100px, 9vw);
}

.cover-edition,
.article-kicker,
.section-eyebrow {
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.cover-edition {
  color: #f1d784;
}

.cover h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3rem, 9vw, 7.5rem);
  letter-spacing: -0.055em;
  line-height: 0.91;
  margin: 0;
  max-width: 900px;
}

.cover h2 {
  font-size: clamp(1.15rem, 2.3vw, 1.8rem);
  font-weight: 520;
  line-height: 1.35;
  margin: 0;
  max-width: 650px;
}

.cover-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.mag-button {
  align-items: center;
  background: var(--accent);
  border: 2px solid var(--accent);
  border-radius: 12px;
  color: #17241d;
  display: inline-flex;
  font-weight: 820;
  gap: 8px;
  justify-content: center;
  min-height: 50px;
  padding: 0 18px;
  text-decoration: none;
}

.mag-button.secondary {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.7);
  color: white;
}

.contents {
  background: var(--surface);
  border-radius: 26px;
  box-shadow: var(--shadow);
  margin: clamp(28px, 5vw, 64px) auto;
  max-width: 1050px;
  padding: clamp(24px, 5vw, 58px);
  width: calc(100% - 32px);
}

.contents-heading {
  align-items: end;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  margin-bottom: 18px;
  padding-bottom: 14px;
}

.contents-heading span {
  color: var(--muted);
  font-size: 0.78rem;
}

.contents-heading p {
  color: var(--muted);
  margin: 8px 0 0;
  max-width: 62ch;
}

.contents.without-numbers .contents-list {
  counter-reset: none;
}

.contents.without-numbers .contents-list a::before {
  content: "";
  width: 0;
}

.contents h2 {
  font-family: Georgia, serif;
  font-size: clamp(2rem, 5vw, 3.2rem);
  margin: 0;
}

.contents-list {
  counter-reset: contents;
  display: grid;
  gap: 0;
  list-style: none;
  margin: 0;
  padding: 0;
}

.contents-list li {
  counter-increment: contents;
}

.contents-list a {
  align-items: center;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  display: grid;
  gap: 14px;
  grid-template-columns: 42px 1fr auto;
  min-height: 64px;
  padding: 8px 0;
  text-decoration: none;
}

.contents-list a::before {
  color: var(--accent);
  content: counter(contents, decimal-leading-zero);
  font-family: Georgia, serif;
  font-size: 1.25rem;
  font-weight: 800;
}

.contents-list a::after {
  color: var(--primary);
  content: "→";
  font-size: 1.5rem;
}

body.dark .contents-list a::after {
  color: var(--accent);
}

.article {
  background: var(--surface);
  border-radius: 28px;
  box-shadow: var(--shadow);
  margin: clamp(28px, 6vw, 76px) auto;
  max-width: 1050px;
  overflow: clip;
  scroll-margin-top: 90px;
  width: calc(100% - 32px);
}

.article-inner {
  margin: 0 auto;
  max-width: var(--measure);
  padding: clamp(28px, 6vw, 70px) clamp(20px, 6vw, 70px);
}

.article-number {
  color: var(--accent);
  font-family: Georgia, serif;
  font-size: 1.1rem;
  font-weight: 850;
}

.article-title-row {
  align-items: center;
  display: flex;
  gap: 20px;
}

.article-title-row > div {
  min-width: 0;
}

.article-title-image {
  border: 3px solid var(--accent);
  border-radius: 50%;
  flex: 0 0 clamp(76px, 10vw, 112px);
  height: clamp(76px, 10vw, 112px);
  object-fit: cover;
  width: clamp(76px, 10vw, 112px);
}

.article-title-kicker {
  color: var(--primary);
  display: block;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.13em;
  margin-top: 8px;
  text-transform: uppercase;
}

.article-title {
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.5rem, 6vw, 4.7rem);
  letter-spacing: -0.045em;
  line-height: 1;
  margin: 8px 0 26px;
}

.reader-block {
  margin: clamp(22px, 4vw, 38px) 0;
}

.reader-block:first-child {
  margin-top: 0;
}

.reader-paragraph {
  font-size: calc(1.12rem * var(--reader-scale));
  line-height: 1.8;
  margin: 0;
  white-space: pre-line;
}

.paragraph-shell {
  display: grid;
  gap: 10px;
}

.paragraph-shell .reader-paragraph {
  margin: 0;
}

.paragraph-listen {
  background: var(--accent-soft);
  border: 1px solid var(--accent);
  border-radius: 999px;
  color: var(--primary-deep);
  font-weight: 800;
  justify-self: start;
  min-height: 44px;
  padding: 8px 16px;
}

.block-heading,
.block-section {
  align-items: center;
  display: flex;
  gap: 16px;
}

.heading-image {
  border: 2px solid var(--accent);
  border-radius: 50%;
  flex: 0 0 72px;
  height: 72px;
  object-fit: cover;
  width: 72px;
}

.block-heading h2 {
  font-family: Georgia, serif;
  font-size: clamp(2rem, 5vw, 3.5rem);
  letter-spacing: -0.035em;
  line-height: 1.05;
  margin: 7px 0 0;
}

.block-section {
  border-left: 7px solid var(--accent);
  padding: 8px 0 8px 18px;
}

.block-section h2 {
  font-size: clamp(1.7rem, 4vw, 2.6rem);
  margin: 5px 0 0;
}

.article-kicker,
.section-eyebrow {
  color: var(--primary);
}

body.dark .article-kicker,
body.dark .section-eyebrow {
  color: #efcf6d;
}

.single-image {
  margin-left: calc(clamp(20px, 6vw, 70px) * -1);
  margin-right: calc(clamp(20px, 6vw, 70px) * -1);
}

.single-image img {
  max-height: 780px;
  object-fit: contain;
  width: 100%;
}

figcaption,
.caption {
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.55;
  margin-top: 9px;
}

.single-image figcaption {
  padding: 0 clamp(20px, 6vw, 70px);
}

.gallery-heading h3 {
  font-size: 1.35rem;
  margin: 0 0 5px;
}

.gallery-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.gallery-grid button {
  background: #dfe5e1;
  border: 0;
  border-radius: 13px;
  min-height: 180px;
  overflow: hidden;
  padding: 0;
}

.gallery-grid img {
  height: 100%;
  object-fit: cover;
  transition: transform 180ms ease;
  width: 100%;
}

.gallery-grid button:hover img {
  transform: scale(1.025);
}

.carousel {
  display: flex;
  flex-direction: column;
  min-height: clamp(560px, calc(100svh - 150px), 900px);
}

.carousel .gallery-heading {
  flex: 0 0 auto;
}

.carousel-stage {
  background: var(--primary-deep);
  border-radius: 18px;
  flex: 1 1 auto;
  min-height: 360px;
  overflow: hidden;
  position: relative;
}

.carousel-slide {
  background: transparent;
  border: 0;
  height: 100%;
  inset: 0;
  padding: 0;
  position: absolute;
  width: 100%;
}

.carousel-slide img {
  height: 100%;
  object-fit: contain;
  width: 100%;
}

.carousel-control {
  background: rgba(7, 52, 41, 0.84);
  border: 2px solid white;
  border-radius: 50%;
  color: white;
  font-size: 2rem;
  height: 52px;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  z-index: 2;
}

.carousel-control.previous { left: 14px; }
.carousel-control.next { right: 14px; }

.carousel-footer {
  align-items: center;
  display: grid;
  flex: 0 0 auto;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding-top: 12px;
}

.carousel-thumbnails {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  padding: 3px 3px 8px;
  scrollbar-width: thin;
  scroll-snap-type: inline mandatory;
}

.carousel-thumbnail {
  background: var(--surface);
  border: 3px solid transparent;
  border-radius: 10px;
  flex: 0 0 84px;
  height: 62px;
  overflow: hidden;
  padding: 0;
  scroll-snap-align: center;
}

.carousel-thumbnail img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.carousel-thumbnail.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--primary);
}

.carousel-thumbnail:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
}

.carousel-status {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
  min-width: 54px;
  text-align: center;
}

.page-footer {
  align-items: center;
  background: var(--surface);
  border-top: 5px solid color-mix(in srgb, var(--accent) 55%, #c9c3ff);
  color: var(--ink);
  display: grid;
  font-size: 0.88rem;
  gap: 12px;
  grid-template-columns: 44px minmax(0, 1fr) 34px 44px;
  min-height: 54px;
  padding: 5px 14px;
  position: relative;
  width: 100%;
  z-index: 3;
}

.cover > .page-footer {
  bottom: 0;
  left: 0;
  position: absolute;
}

.contents > .page-footer {
  margin-top: 34px;
}

.page-footer strong {
  overflow: hidden;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.page-footer-number {
  font-weight: 900;
  text-align: center;
}

.page-footer-logo {
  align-items: center;
  display: flex;
  height: 38px;
  justify-content: center;
}

.page-footer-logo img {
  height: 36px;
  object-fit: contain;
  width: 36px;
}

body.dark .page-footer {
  background: #eef2ef;
  color: #17211c;
}

.quote {
  border-bottom: 1px solid var(--line);
  border-top: 1px solid var(--line);
  color: var(--primary);
  font-family: Georgia, serif;
  font-size: clamp(1.55rem, 4vw, 2.25rem);
  font-style: italic;
  line-height: 1.35;
  padding: 30px 0;
}

body.dark .quote {
  color: #f2d57e;
}

.quote p {
  margin: 0;
}

.quote cite {
  color: var(--muted);
  display: block;
  font-family: Inter, Aptos, sans-serif;
  font-size: 0.82rem;
  font-style: normal;
  font-weight: 750;
  margin-top: 15px;
}

.notice {
  background: var(--accent-soft);
  border-left: 7px solid var(--accent);
  border-radius: 14px;
  padding: 20px;
}

.notice.green {
  background: color-mix(in srgb, var(--primary) 10%, var(--surface));
  border-color: var(--primary);
}

.notice.purple {
  background: color-mix(in srgb, #7e57a1 12%, var(--surface));
  border-color: #7e57a1;
}

.notice h3 {
  font-size: 1.15rem;
  margin: 0 0 7px;
}

.notice p {
  line-height: 1.65;
  margin: 0;
  white-space: pre-line;
}

.divider {
  border: 0;
  border-top: 4px solid var(--accent);
  margin: 42px auto;
  max-width: 180px;
}

.divider.green {
  border-color: var(--primary);
}

.divider.dots {
  border: 0;
  color: var(--accent);
  font-size: 2rem;
  letter-spacing: 0.4em;
  text-align: center;
}

.divider.dots::after {
  content: "•••";
}

.button-block {
  display: flex;
  justify-content: center;
}

.button-block .secondary {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

.button-block .outline {
  background: transparent;
  border-color: var(--primary);
  color: var(--primary);
}

body.dark .button-block .outline {
  border-color: var(--accent);
  color: var(--accent);
}

.video-shell,
.audio-shell,
.download-card,
.contact-card,
.interactive-card,
.tts-panel {
  background: color-mix(in srgb, var(--primary) 5%, var(--surface));
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
}

.video-shell iframe,
.video-shell video {
  aspect-ratio: 16 / 9;
  background: #000;
  border: 0;
  width: 100%;
}

.media-copy {
  padding: 18px;
}

.media-copy h3 {
  margin: 0 0 6px;
}

.media-copy p {
  color: var(--muted);
  line-height: 1.6;
  margin: 0;
}

.transcript {
  border-top: 1px solid var(--line);
  margin-top: 14px;
  padding-top: 12px;
}

.transcript summary {
  cursor: pointer;
  font-weight: 750;
  min-height: 38px;
}

.audio-shell {
  padding: 18px;
}

.audio-shell audio {
  margin: 12px 0;
  width: 100%;
}

.download-card,
.contact-card {
  align-items: center;
  display: grid;
  gap: 16px;
  grid-template-columns: 52px 1fr auto;
  padding: 18px;
}

.download-icon,
.contact-avatar {
  align-items: center;
  background: var(--accent);
  border-radius: 50%;
  color: var(--primary-deep);
  display: flex;
  font-size: 1.4rem;
  font-weight: 900;
  height: 52px;
  justify-content: center;
  overflow: hidden;
  width: 52px;
}

.contact-avatar img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.download-card h3,
.contact-card h3 {
  margin: 0 0 4px;
}

.download-card p,
.contact-card p {
  color: var(--muted);
  line-height: 1.5;
  margin: 0;
}

.contact-links {
  display: grid;
  gap: 6px;
  grid-column: 2 / -1;
}

.contact-links a {
  color: var(--primary);
  font-weight: 720;
  overflow-wrap: anywhere;
}

body.dark .contact-links a {
  color: #f0d170;
}

.table-scroll {
  overflow-x: auto;
}

.data-table {
  border-collapse: collapse;
  min-width: 520px;
  width: 100%;
}

.data-table caption {
  color: var(--ink);
  font-size: 1.25rem;
  font-weight: 820;
  margin-bottom: 10px;
  text-align: left;
}

.data-table th,
.data-table td {
  border-bottom: 1px solid var(--line);
  padding: 13px 12px;
  text-align: left;
}

.data-table th {
  background: var(--primary);
  color: white;
  font-size: 0.84rem;
}

.tts-panel {
  padding: 16px;
}

.tts-heading {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.tts-heading strong {
  font-size: 0.95rem;
}

.tts-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

.tts-controls button,
.tts-controls select,
.survey-submit,
.poll-submit,
.clear-response {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 9px;
  min-height: 44px;
  padding: 0 12px;
}

.tts-controls button.primary,
.survey-submit,
.poll-submit {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
  font-weight: 800;
}

.tts-unavailable {
  color: var(--muted);
  font-size: 0.85rem;
}

.interactive-card {
  padding: clamp(18px, 4vw, 28px);
}

.interactive-card h3 {
  font-size: 1.4rem;
  margin: 0 0 7px;
}

.interactive-card > p {
  color: var(--muted);
  line-height: 1.55;
  margin: 0 0 18px;
}

.choice-list,
.survey-fields {
  display: grid;
  gap: 10px;
}

.choice {
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 11px;
  display: flex;
  gap: 10px;
  min-height: 50px;
  padding: 9px 12px;
}

.choice input {
  accent-color: var(--primary);
  height: 20px;
  width: 20px;
}

.poll-submit,
.survey-submit {
  margin-top: 16px;
}

.poll-results {
  display: grid;
  gap: 11px;
  margin-top: 18px;
}

.result-row {
  display: grid;
  gap: 5px;
}

.result-copy {
  display: flex;
  font-size: 0.84rem;
  justify-content: space-between;
}

.result-track {
  background: var(--line);
  border-radius: 999px;
  height: 9px;
  overflow: hidden;
}

.result-track span {
  background: var(--accent);
  display: block;
  height: 100%;
}

.clear-response {
  color: var(--muted);
  font-size: 0.82rem;
  margin-top: 14px;
}

.survey-field {
  display: grid;
  gap: 7px;
}

.survey-field > span,
.rating-field legend {
  font-weight: 750;
}

.survey-field input[type="text"],
.survey-field textarea {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  min-height: 48px;
  padding: 10px 12px;
  width: 100%;
}

.survey-field textarea {
  min-height: 120px;
  resize: vertical;
}

.rating-field {
  border: 0;
  margin: 0;
  padding: 0;
}

.rating-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.rating-options label {
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  display: flex;
  font-weight: 800;
  height: 48px;
  justify-content: center;
  width: 48px;
}

.rating-options input {
  height: 1px;
  opacity: 0;
  position: absolute;
  width: 1px;
}

.rating-options label:has(input:checked) {
  background: var(--accent);
  border-color: var(--accent);
  color: #17241d;
}

.article-navigation {
  align-items: center;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-top: 44px;
  padding-top: 24px;
}

.article-navigation a {
  color: var(--primary);
  font-weight: 780;
  line-height: 1.35;
  max-width: 46%;
  min-height: 44px;
  text-decoration: none;
}

body.dark .article-navigation a {
  color: #f1d478;
}

.reader-footer {
  background: var(--primary-deep);
  color: white;
  margin-top: 80px;
  padding: 46px 20px;
  text-align: center;
}

.reader-footer strong,
.reader-footer span {
  display: block;
}

.reader-footer span {
  color: #b8ccc2;
  font-size: 0.8rem;
  margin-top: 7px;
}

.lightbox {
  background: rgba(4, 14, 10, 0.93);
  border: 0;
  height: 100vh;
  margin: 0;
  max-height: none;
  max-width: none;
  padding: 22px;
  width: 100vw;
}

.lightbox::backdrop {
  background: rgba(4, 14, 10, 0.93);
}

.lightbox img {
  height: calc(100vh - 44px);
  margin: auto;
  object-fit: contain;
  width: calc(100vw - 44px);
}

.lightbox button {
  align-items: center;
  background: white;
  border: 0;
  border-radius: 50%;
  color: #122019;
  display: flex;
  font-size: 1.5rem;
  height: 48px;
  justify-content: center;
  position: fixed;
  right: 22px;
  top: 22px;
  width: 48px;
  z-index: 2;
}

.reader-menu {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  color: var(--ink);
  max-height: calc(100vh - 95px);
  overflow: auto;
  padding: 10px;
  position: fixed;
  right: 14px;
  top: 80px;
  width: min(360px, calc(100vw - 28px));
  z-index: 120;
}

.reader-menu[hidden] {
  display: none;
}

.reader-menu a {
  border-radius: 9px;
  color: inherit;
  display: block;
  font-weight: 700;
  padding: 12px;
  text-decoration: none;
}

.reader-menu a:hover {
  background: color-mix(in srgb, var(--primary) 8%, var(--surface));
}

@media (max-width: 720px) {
  .reader-header {
    min-height: 64px;
  }

  .reader-brand-copy strong {
    max-width: 150px;
  }

  .reader-tools .tool-label,
  .reader-tools .pdf-tool {
    display: none;
  }

  .reader-logo {
    flex-basis: 40px;
    height: 40px;
  }

  .cover {
    min-height: calc(100vh - 64px);
  }

  .cover-media::after {
    background:
      linear-gradient(0deg, rgba(7, 52, 41, 0.96) 0%, rgba(7, 52, 41, 0.58) 72%, rgba(7, 52, 41, 0.25) 100%);
  }

  .cover-content {
    padding-bottom: 50px;
  }

  .cover h1 {
    font-size: clamp(3.1rem, 17vw, 5.5rem);
  }

  .contents-list a {
    grid-template-columns: 36px 1fr auto;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .gallery-grid button {
    min-height: 220px;
  }

  .carousel {
    min-height: calc(100svh - 88px);
  }

  .carousel-stage {
    min-height: 300px;
  }

  .carousel-thumbnail {
    flex-basis: 68px;
    height: 52px;
  }

  .carousel-control {
    height: 46px;
    width: 46px;
  }

  .page-footer {
    font-size: 0.78rem;
    gap: 7px;
    grid-template-columns: 38px minmax(0, 1fr) 28px 38px;
    padding-inline: 8px;
  }

  .page-footer-logo,
  .page-footer-logo img {
    height: 32px;
    width: 32px;
  }

  .download-card,
  .contact-card {
    align-items: start;
    grid-template-columns: 48px 1fr;
  }

  .download-card .mag-button {
    grid-column: 1 / -1;
  }

  .article-navigation {
    align-items: stretch;
    flex-direction: column;
  }

  .article-navigation a {
    max-width: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media print {
  :root {
    --page: white;
    --surface: white;
    --ink: black;
    --muted: #333;
    --line: #aaa;
    --reader-scale: 0.94;
  }

  .reader-header,
  .progress,
  .tts-panel,
  .interactive-card,
  .article-navigation,
  .reader-footer,
  .cover-actions,
  .reader-menu {
    display: none !important;
  }

  .page-footer {
    break-inside: avoid;
  }

  body {
    background: white !important;
    color: black !important;
  }

  .cover {
    break-after: page;
    min-height: 95vh;
  }

  .contents,
  .article {
    box-shadow: none;
    break-inside: auto;
    margin: 0 auto;
    max-width: none;
    width: 100%;
  }

  .article {
    break-before: page;
  }

  .reader-block,
  figure,
  table,
  .notice,
  .download-card,
  .contact-card {
    break-inside: avoid;
  }

  a {
    color: black !important;
    text-decoration: none !important;
  }
}
