body.large-type {
  font-size: 1.16rem;
}

html,
body {
  max-width: 100%;
  overflow-x: clip;
}

h1, h2, h3, p, a, span, strong, b, li, dd {
  overflow-wrap: anywhere;
}

.menu-button {
  display: none;
}

.side-nav {
  visibility: hidden;
  pointer-events: none;
}

.side-nav.open {
  visibility: visible;
  pointer-events: auto;
}

body.reduce-motion *,
body.reduce-motion *::before,
body.reduce-motion *::after {
  scroll-behavior: auto !important;
  animation: none !important;
  transition: none !important;
}

.site-title {
  display: flex;
  align-items: center;
  align-self: stretch;
  color: var(--ink-dark);
  white-space: nowrap;
  font-weight: 900;
  text-decoration: none;
}

@media (max-width: 1050px) {
  .menu-button {
    display: flex;
  }
}

.issue-grid a {
  min-height: 21rem;
}

.issue-grid a b {
  line-height: 1.55;
}

.issue-group {
  margin-top: clamp(3rem, 7vw, 6rem);
}

.issue-group-heading {
  max-width: 52rem;
  margin-bottom: 1.5rem;
}

.issue-group-heading h3 {
  margin: .35rem 0 .75rem;
  font-size: clamp(1.85rem, 4vw, 3.6rem);
  line-height: 1.08;
}

.issue-group-heading > p:last-child {
  max-width: 42rem;
  line-height: 1.75;
}

.petition-resources {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem 1.5rem;
  margin-top: 1.25rem;
}

.petition-resources a {
  color: inherit;
  font-weight: 800;
  text-underline-offset: .3em;
}

.petition-group .issue-grid,
.policy-group .issue-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.petition-group .issue-grid > a,
.policy-group .issue-grid > a {
  border-bottom: 1px solid var(--ink-dark);
}

.petition-group .issue-grid > a:nth-child(even),
.policy-group .issue-grid > a:nth-child(even) {
  border-right: 0;
}

.elder-card-section {
  background: var(--ink-dark);
  color: #fff;
}

.elder-card-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(20rem, .85fr);
  gap: clamp(2rem, 7vw, 7rem);
  align-items: center;
  max-width: 1200px;
  margin: auto;
}

.elder-card-copy h2 {
  margin: .5rem 0 1.5rem;
  color: #fff;
  font-size: clamp(3rem, 7vw, 7rem);
  line-height: 1.02;
}

.elder-card-lead {
  max-width: 42rem;
  color: #e4e7ed;
  font-family: "Noto Serif TC", serif;
  font-size: 1.1rem;
  line-height: 1.9;
}

.elder-cycle {
  margin-top: 2.5rem;
  border-top: 1px solid #ffffff55;
}

.elder-cycle > div {
  display: grid;
  grid-template-columns: 2.5rem 8rem 1fr;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid #ffffff55;
}

.elder-cycle b { color: var(--orange); }
.elder-cycle span { color: #cdd2dc; line-height: 1.6; }

.video-frame {
  aspect-ratio: 16 / 9;
  background: #000;
  box-shadow: 24px 24px var(--orange);
}

.video-frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.elder-card-note {
  margin-top: 3.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid #ffffff55;
}

.elder-card-note strong { font-size: 1.2rem; }
.elder-card-note p { color: #cdd2dc; line-height: 1.8; }

.elder-card-details {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-width: 1200px;
  margin: 5rem auto 0;
  border-top: 1px solid #ffffff55;
  border-bottom: 1px solid #ffffff55;
}

.elder-card-details article { padding: 2rem; border-right: 1px solid #ffffff55; }
.elder-card-details article:last-child { border-right: 0; }
.elder-card-details span { color: var(--orange); font-size: .8rem; font-weight: 900; }
.elder-card-details h3 { margin: .75rem 0 1rem; font-size: 1.6rem; }
.elder-card-details p { color: #cdd2dc; line-height: 1.75; }

.action-grid .action-card {
  display: block;
  min-height: 330px;
  padding: 2.5rem;
  color: inherit;
  border-top: 1px solid var(--ink-dark);
  text-decoration: none;
  transition: background .2s, transform .2s;
}

.action-grid .action-card:nth-child(odd) { border-right: 1px solid var(--ink-dark); }
.action-grid .action-card:hover { background: #fff; transform: translateY(-6px); }
.action-grid .action-card b { display: inline-block; margin-top: 1.2rem; text-decoration: underline; text-underline-offset: .3em; }

.hero-visual {
  overflow: visible;
}

.hero-portrait {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  overflow: visible !important;
}

.hero-portrait::before,
.hero-portrait::after {
  display: none !important;
}

.hero-portrait img {
  width: min(48vw, 720px) !important;
  height: min(88vh, 860px) !important;
  object-fit: contain !important;
  object-position: center bottom !important;
  filter: none !important;
}

.campaign-costs,
.dashboard-preview {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 3rem;
}

.campaign-costs > div,
.dashboard-preview > div {
  display: flex;
  min-height: 10rem;
  padding: 1.35rem;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid currentColor;
}

.campaign-costs small,
.dashboard-preview small {
  font-weight: 700;
  letter-spacing: .08em;
}

.campaign-costs strong,
.dashboard-preview strong {
  font-size: clamp(1.55rem, 3vw, 3.4rem);
  line-height: 1.05;
}

.dashboard-preview {
  margin: 2rem auto 0;
  max-width: 72rem;
}

.observation-heading {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(18rem, .9fr);
  gap: 2rem;
  align-items: end;
  max-width: 72rem;
  margin: 5rem auto 0;
}

.observation-heading h3 {
  margin: .35rem 0 0;
  font-size: clamp(2rem, 5vw, 4.5rem);
  line-height: 1;
}

.observation-heading > p,
.peak-note p,
.data-caveat {
  line-height: 1.75;
}

.observation-summary {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.route-comparison {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  max-width: 72rem;
  margin: 1rem auto 0;
}

.route-card {
  position: relative;
  min-height: 20rem;
  padding: 1.5rem;
  border: 1px solid currentColor;
  overflow: hidden;
}

.route-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: .45rem;
  background: currentColor;
}

.route-main { color: #237b55; }
.route-nanjing { color: #d95f1f; }
.route-zhongxiao { color: #7451a6; }

.route-card > span {
  display: block;
  margin-top: .5rem;
  font-weight: 800;
}

.route-card > strong {
  display: block;
  margin: .25rem 0 1.5rem;
  font-size: clamp(2.3rem, 4vw, 4rem);
  line-height: 1;
}

.route-card dl {
  margin: 0;
}

.route-card dl > div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: .65rem 0;
  border-top: 1px solid currentColor;
}

.route-card dt { opacity: .75; }
.route-card dd { margin: 0; font-weight: 800; text-align: right; }
.route-card p { margin: 1.5rem 0 0; line-height: 1.65; }

.peak-note,
.data-caveat,
.dashboard-next {
  max-width: 72rem;
  margin: 1rem auto 0;
}

.peak-note {
  display: grid;
  grid-template-columns: minmax(15rem, .7fr) minmax(0, 1.3fr);
  gap: 2rem;
  padding: 1.5rem;
  border: 1px solid currentColor;
}

.peak-note strong { font-size: 1.15rem; }
.peak-note p { margin: 0; }

.data-caveat {
  font-size: .9rem;
  opacity: .78;
}

.dashboard-next {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: .5rem 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid currentColor;
}

.dashboard-next small { font-weight: 800; letter-spacing: .08em; }
.dashboard-next strong { font-size: 1.35rem; }

.dashboard-preview > div {
  background: rgba(255,255,255,.08);
}

.budget-scope {
  margin-top: 1.2rem;
  max-width: 40rem;
  font-size: .92rem;
  opacity: .82;
}

.new-taipei {
  display: inline-block;
  margin-left: .2em;
  padding: .05em .18em;
  color: #172b52;
  background: #fff;
}

.board-game-action {
  grid-column: span 2;
}

.board-game-action a,
.about-coming {
  display: inline-block;
  margin-top: 1rem;
  color: inherit;
  font-weight: 800;
  text-underline-offset: .25em;
}

.about-portrait img {
  object-fit: contain !important;
  background: transparent !important;
}

@media (max-width: 720px) {
  .issue-grid a {
    min-height: auto;
  }

  .petition-group .issue-grid,
  .policy-group .issue-grid,
  .elder-card-grid,
  .elder-card-details {
    grid-template-columns: 1fr;
  }

  .petition-group .issue-grid > a,
  .policy-group .issue-grid > a {
    border-right: 0;
  }

  .elder-card-details article {
    border-right: 0;
    border-bottom: 1px solid #ffffff55;
  }

  .elder-card-details article:last-child { border-bottom: 0; }

  .elder-cycle > div { grid-template-columns: 2.5rem 1fr; }
  .elder-cycle span { grid-column: 2; }

  .action-grid .action-card,
  .action-grid .action-card:nth-child(odd) {
    min-height: auto;
    padding: 2rem 0;
    border-right: 0;
  }

  .issue-group {
    margin-top: 3rem;
  }

  .hero-portrait img {
    width: 100% !important;
    height: 62vh !important;
  }

  .campaign-costs,
  .dashboard-preview,
  .route-comparison,
  .observation-heading,
  .peak-note {
    grid-template-columns: 1fr;
  }

  .observation-heading {
    margin-top: 3.5rem;
  }

  .route-card {
    min-height: auto;
  }

  .board-game-action {
    grid-column: auto;
  }
}

@media (max-width: 420px) {
  .site-header {
    padding-left: max(1rem, env(safe-area-inset-left));
    padding-right: max(1rem, env(safe-area-inset-right));
  }

  .site-title {
    max-width: calc(100vw - 5.5rem);
    font-size: .9rem;
  }

  .hero h1 {
    font-size: clamp(2.8rem, 15vw, 3.5rem);
  }

  .chapter {
    padding-left: max(1rem, env(safe-area-inset-left));
    padding-right: max(1rem, env(safe-area-inset-right));
  }

  .elder-card-details article {
    padding: 1.5rem 0;
  }
}

@media (max-width: 900px) and (orientation: landscape) and (max-height: 600px) {
  .hero {
    min-height: auto;
  }

  .hero-copy {
    padding-bottom: 2rem;
  }

  .hero-visual {
    position: relative;
    height: 80vh;
    min-height: 280px;
  }

  .reading-tools {
    right: .8rem;
    bottom: .6rem;
    left: auto;
    transform: none;
  }
}
