:root {
  --paper: #f7faf7;
  --surface: #ffffff;
  --mist: #edf5f2;
  --ink: #1f2933;
  --muted: #5d6972;
  --teal: #0f6b63;
  --teal-dark: #084b46;
  --coral: #bf5b45;
  --gold: #d3952d;
  --blue: #294d75;
  --leaf: #627d48;
  --line: rgba(31, 41, 51, 0.14);
  --shadow: 0 18px 45px rgba(25, 39, 52, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.6;
}

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

a {
  color: var(--teal-dark);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--coral);
}

p,
li {
  color: var(--muted);
}

p {
  margin: 0;
}

h1,
h2,
h3,
h4 {
  color: var(--ink);
  line-height: 1.08;
  margin: 0;
}

h1 {
  color: #ffffff;
  font-size: clamp(2.35rem, 8vw, 4.45rem);
  max-width: 920px;
}

h2 {
  font-size: clamp(1.75rem, 4vw, 2.35rem);
}

h3 {
  font-size: 1.2rem;
}

h4 {
  font-size: 1rem;
}

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

.skip-link {
  background: var(--ink);
  color: #ffffff;
  left: 1rem;
  padding: 0.65rem 0.9rem;
  position: absolute;
  top: -4rem;
  z-index: 20;
}

.skip-link:focus {
  top: 1rem;
}

.site-header {
  align-items: center;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  padding: 0.85rem 5vw;
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand {
  align-items: center;
  color: var(--teal-dark);
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 1.02rem;
  font-weight: 800;
  gap: 0.6rem;
  letter-spacing: 0;
  text-decoration: none;
}

.brand-logo {
  background: #ffffff;
  border: 1px solid rgba(31, 41, 51, 0.12);
  border-radius: 50%;
  box-shadow: 0 8px 18px rgba(25, 39, 52, 0.12);
  height: 44px;
  object-fit: contain;
  padding: 0.12rem;
  width: 44px;
}

.nav-links {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.12rem;
  justify-content: flex-end;
}

.nav-links a {
  border-radius: 999px;
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 800;
  padding: 0.42rem 0.58rem;
  text-decoration: none;
  transition: background 180ms ease, color 180ms ease, transform 180ms ease;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  background: var(--mist);
  color: var(--teal-dark);
}

.nav-links a:hover {
  transform: translateY(-1px);
}

.hero,
.page-hero {
  animation: hero-drift 16s ease-out both;
  background-position: center;
  background-size: cover;
  color: #ffffff;
  display: flex;
  position: relative;
}

.hero::after,
.page-hero::after {
  background: rgba(8, 32, 31, 0.08);
  bottom: 0;
  content: "";
  height: 22%;
  left: 0;
  pointer-events: none;
  position: absolute;
  right: 0;
}

.hero {
  align-items: center;
  background-image:
    linear-gradient(90deg, rgba(7, 36, 37, 0.9), rgba(7, 36, 37, 0.58), rgba(7, 36, 37, 0.12)),
    url("../images/seniors-conversation.jpg");
  min-height: 76svh;
}

.page-hero {
  align-items: flex-end;
  min-height: 390px;
  padding-top: 4rem;
}

.page-hero.issue {
  background-image:
    linear-gradient(90deg, rgba(20, 38, 51, 0.87), rgba(20, 38, 51, 0.5), rgba(20, 38, 51, 0.12)),
    url("../images/seniors-conversation.jpg");
}

.page-hero.local {
  background-image:
    linear-gradient(90deg, rgba(8, 55, 50, 0.9), rgba(8, 55, 50, 0.5), rgba(8, 55, 50, 0.14)),
    url("../images/sanchong-senior-center.jpg");
}

.page-hero.toolkit,
.page-hero.take-action {
  background-image:
    linear-gradient(90deg, rgba(67, 44, 35, 0.88), rgba(67, 44, 35, 0.5), rgba(67, 44, 35, 0.14)),
    url("../images/digital-workshop.jpg");
}

.page-hero.interactive,
.page-hero.impact {
  background-image:
    linear-gradient(90deg, rgba(13, 49, 65, 0.88), rgba(13, 49, 65, 0.52), rgba(13, 49, 65, 0.14)),
    url("../images/digital-workshop.jpg");
}

.page-hero.ethics,
.page-hero.sources {
  background-image:
    linear-gradient(90deg, rgba(36, 54, 38, 0.9), rgba(36, 54, 38, 0.5), rgba(36, 54, 38, 0.16)),
    url("../images/sanchong-senior-center.jpg");
}

.hero-content,
.page-hero-content {
  padding: 5rem 5vw;
  position: relative;
  width: min(980px, 100%);
  z-index: 1;
}

.page-hero-content {
  padding-bottom: 4rem;
}

.hero-content > *,
.page-hero-content > * {
  animation: rise-in 760ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.hero-content > :nth-child(2),
.page-hero-content > :nth-child(2) {
  animation-delay: 100ms;
}

.hero-content > :nth-child(3),
.page-hero-content > :nth-child(3) {
  animation-delay: 190ms;
}

.hero-content > :nth-child(4),
.page-hero-content > :nth-child(4) {
  animation-delay: 280ms;
}

.eyebrow {
  color: var(--gold);
  display: block;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  margin-bottom: 0.75rem;
  text-transform: uppercase;
}

.hero p,
.page-hero p {
  color: rgba(255, 255, 255, 0.92);
  font-size: 1.16rem;
  margin-top: 1.15rem;
  max-width: 760px;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 2rem;
}

.button,
.copy-button,
.quiz-option {
  align-items: center;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  font-weight: 800;
  justify-content: center;
  min-height: 44px;
  padding: 0.76rem 1.02rem;
  text-decoration: none;
  transition: background 180ms ease, border-color 180ms ease, box-shadow 180ms ease, color 180ms ease, transform 180ms ease;
}

.button.primary {
  background: #ffffff;
  color: var(--teal-dark);
}

.button.secondary {
  border: 1px solid rgba(255, 255, 255, 0.74);
  color: #ffffff;
}

.button.ink {
  background: var(--teal-dark);
  color: #ffffff;
}

.button.outline {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--teal-dark);
}

.button.primary:hover,
.button.secondary:hover,
.button.ink:hover,
.button.outline:hover,
.copy-button:hover,
.quiz-option:hover,
.quiz-option.is-selected {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--ink);
  box-shadow: 0 12px 30px rgba(31, 41, 51, 0.18);
  transform: translateY(-2px);
}

.section {
  padding: 4.5rem 5vw;
}

.section.alt {
  background: var(--mist);
}

.section.tight {
  padding-top: 3rem;
}

.section-inner {
  margin: 0 auto;
  max-width: 1180px;
}

.narrow {
  max-width: 860px;
}

.section-heading {
  display: grid;
  gap: 0.85rem;
  margin-bottom: 2rem;
  max-width: 860px;
}

.section-heading p,
.text-stack p {
  font-size: 1.04rem;
}

.stats-grid,
.card-grid,
.link-grid,
.two-column,
.three-column,
.four-column,
.resource-grid,
.action-grid,
.dashboard-grid,
.form-grid,
.map-grid {
  display: grid;
  gap: 1rem;
}

.stats-grid,
.four-column {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.card-grid,
.three-column,
.resource-grid,
.action-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.dashboard-grid {
  grid-template-columns: 1.2fr 0.8fr;
}

.two-column,
.form-grid,
.map-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.split {
  align-items: center;
  display: grid;
  gap: 2rem;
  grid-template-columns: 1.02fr 0.98fr;
}

.text-stack {
  display: grid;
  gap: 1rem;
}

.stat,
.card,
.link-card,
.source-item,
.resource-card,
.action-card,
.dashboard-panel,
.quiz-panel,
.form-panel,
.map-panel,
.ethics-rule {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1.2rem;
  transition: border-color 220ms ease, box-shadow 220ms ease, transform 220ms ease;
}

.stat:hover,
.card:hover,
.link-card:hover,
.source-item:hover,
.resource-card:hover,
.action-card:hover,
.dashboard-panel:hover,
.ethics-rule:hover {
  border-color: rgba(15, 107, 99, 0.34);
  box-shadow: var(--shadow);
  transform: translateY(-4px);
}

.stat strong {
  color: var(--teal-dark);
  display: block;
  font-size: 2rem;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  margin-bottom: 0.5rem;
}

.stat span,
.small-note {
  color: var(--muted);
  display: block;
  font-size: 0.93rem;
}

.ticker-number {
  position: relative;
  width: max-content;
}

.ticker-number::after {
  background: linear-gradient(90deg, transparent, rgba(211, 149, 45, 0.38), transparent);
  content: "";
  height: 110%;
  left: -18%;
  opacity: 0;
  pointer-events: none;
  position: absolute;
  top: -5%;
  transform: translateX(-80%);
  width: 42%;
}

.ticker-number.is-ticking {
  animation: ticker-pop 420ms ease both;
}

.ticker-number.is-ticking::after {
  animation: ticker-sheen 760ms ease both;
}

.card,
.resource-card,
.action-card,
.dashboard-panel,
.quiz-panel,
.form-panel,
.ethics-rule {
  display: grid;
  gap: 0.75rem;
}

.accent-teal {
  border-top: 5px solid var(--teal);
}

.accent-coral {
  border-top: 5px solid var(--coral);
}

.accent-gold {
  border-top: 5px solid var(--gold);
}

.accent-blue {
  border-top: 5px solid var(--blue);
}

.accent-leaf {
  border-top: 5px solid var(--leaf);
}

.link-card {
  display: grid;
  gap: 0.55rem;
  min-height: 164px;
  text-decoration: none;
}

.link-card h3 {
  color: var(--ink);
}

.feature-image {
  border-radius: 8px;
  box-shadow: var(--shadow);
  height: 100%;
  max-height: 520px;
  object-fit: cover;
  transform-origin: center;
  width: 100%;
}

.callout {
  background: var(--surface);
  border-left: 6px solid var(--coral);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 1.35rem;
}

.callout strong {
  color: var(--coral);
}

.issue-visual {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 1rem;
  padding: 1.2rem;
}

.overlap-row {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(3, 1fr);
}

.overlap-item {
  align-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  min-height: 120px;
  padding: 1rem;
  text-align: center;
}

.overlap-item strong {
  color: var(--teal-dark);
  display: block;
  font-size: 1.55rem;
}

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

table {
  background: var(--surface);
  border-collapse: collapse;
  min-width: 720px;
  width: 100%;
}

th,
td {
  border: 1px solid var(--line);
  padding: 0.9rem;
  text-align: left;
  vertical-align: top;
}

th {
  background: var(--teal-dark);
  color: #ffffff;
}

.check-list,
.number-list,
.plain-list {
  margin: 0;
  padding-left: 1.2rem;
}

.check-list li,
.number-list li,
.plain-list li {
  margin: 0.55rem 0;
}

.timeline {
  border-left: 4px solid var(--teal);
  display: grid;
  gap: 1rem;
  margin-left: 0.35rem;
  padding-left: 1rem;
}

.timeline-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1rem;
  transition: border-color 220ms ease, box-shadow 220ms ease, transform 220ms ease;
}

.timeline-item:hover {
  border-color: rgba(15, 107, 99, 0.38);
  box-shadow: var(--shadow);
  transform: translateX(4px);
}

.timeline-item strong {
  color: var(--teal-dark);
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.tag {
  background: var(--mist);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--teal-dark);
  font-weight: 800;
  padding: 0.38rem 0.68rem;
  transition: background 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.tag:hover {
  background: #ffffff;
  border-color: rgba(15, 107, 99, 0.34);
  transform: translateY(-2px);
}

.resource-card pre {
  background: #f1f5f4;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9rem;
  margin: 0;
  max-height: 260px;
  overflow: auto;
  padding: 0.9rem;
  white-space: pre-wrap;
}

.copy-button,
.quiz-option {
  background: #ffffff;
  border: 1px solid var(--line);
  color: var(--teal-dark);
  width: max-content;
}

.quiz-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.quiz-result {
  background: var(--mist);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  min-height: 78px;
  padding: 1rem;
}

.quiz-result strong {
  color: var(--teal-dark);
  display: block;
  margin-bottom: 0.4rem;
}

.quiz-result p {
  margin-bottom: 0.55rem;
}

.quiz-result span {
  color: var(--ink);
  display: block;
  font-weight: 700;
}

.action-card strong {
  color: var(--teal-dark);
  display: block;
  font-size: 1.8rem;
  line-height: 1;
}

.dashboard-panel .metric-list {
  display: grid;
  gap: 0.85rem;
}

.metric-row {
  align-items: baseline;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  padding-bottom: 0.7rem;
}

.metric-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.metric-row strong {
  color: var(--teal-dark);
  font-size: 1.35rem;
  font-variant-numeric: tabular-nums;
}

.sheet-status {
  color: var(--muted);
  font-size: 0.9rem;
}

.form-panel form {
  display: grid;
  gap: 0.8rem;
}

.form-panel label {
  color: var(--ink);
  display: grid;
  font-weight: 800;
  gap: 0.35rem;
}

.form-panel input,
.form-panel select,
.form-panel textarea {
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  padding: 0.72rem;
  width: 100%;
}

.form-panel textarea {
  min-height: 110px;
  resize: vertical;
}

.upload-fieldset {
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 0.75rem;
  margin: 0;
  padding: 1rem;
}

.upload-fieldset legend {
  color: var(--teal-dark);
  font-weight: 800;
  padding: 0 0.35rem;
}

.form-panel input[type="file"] {
  background: #ffffff;
  padding: 0.62rem;
}

.checkbox-label {
  align-items: flex-start;
  color: var(--muted);
  display: flex;
  font-weight: 400;
  gap: 0.65rem;
}

.checkbox-label input {
  flex: 0 0 auto;
  margin-top: 0.25rem;
  width: auto;
}

.checkbox-label span {
  color: var(--muted);
  font-weight: 400;
}

.hidden-field {
  border: 0 !important;
  clip: rect(0 0 0 0) !important;
  height: 1px !important;
  margin: -1px !important;
  overflow: hidden !important;
  padding: 0 !important;
  position: absolute !important;
  white-space: nowrap !important;
  width: 1px !important;
}

.map-panel {
  min-height: 280px;
  overflow: hidden;
  position: relative;
}

.map-panel::before {
  background:
    linear-gradient(90deg, rgba(15, 107, 99, 0.1) 1px, transparent 1px),
    linear-gradient(rgba(15, 107, 99, 0.1) 1px, transparent 1px);
  background-size: 44px 44px;
  bottom: 0;
  content: "";
  left: 0;
  opacity: 0.5;
  position: absolute;
  right: 0;
  top: 0;
}

.map-list {
  display: grid;
  gap: 0.75rem;
  position: relative;
  z-index: 1;
}

.map-place {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.85rem;
}

.qr-card {
  align-items: center;
  display: grid;
  gap: 1rem;
  grid-template-columns: 150px 1fr;
}

.qr-card img {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.75rem;
}

.quote-band {
  background: var(--teal-dark);
  color: #ffffff;
  padding: 3.6rem 5vw;
}

.quote-band blockquote {
  color: #ffffff;
  font-size: clamp(1.25rem, 3vw, 1.65rem);
  line-height: 1.35;
  margin: 0 auto;
  max-width: 980px;
}

.quote-band cite {
  color: #c9e7df;
  display: block;
  font-size: 0.95rem;
  font-style: normal;
  margin-top: 1rem;
}

.site-footer {
  background: var(--ink);
  color: #ffffff;
  padding: 2rem 5vw;
}

.footer-inner {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  margin: 0 auto;
  max-width: 1180px;
}

.site-footer p {
  color: #ffffff;
}

.site-footer a {
  color: #c9e7df;
}

.source-list {
  display: grid;
  gap: 1rem;
}

.source-item h3 {
  margin-bottom: 0.4rem;
}

.scroll-progress {
  background: linear-gradient(90deg, var(--gold), var(--coral), var(--teal));
  height: 4px;
  left: 0;
  position: fixed;
  top: 0;
  transform: scaleX(0);
  transform-origin: left center;
  width: 100%;
  z-index: 30;
}

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 650ms ease, transform 650ms cubic-bezier(0.2, 0.8, 0.2, 1);
  transition-delay: var(--delay, 0ms);
}

.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

.feature-image.reveal {
  transform: translateY(22px) scale(0.985);
}

.feature-image.reveal.in-view {
  transform: translateY(0) scale(1);
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(18px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes hero-drift {
  from {
    background-position: center 50%;
  }

  to {
    background-position: center 46%;
  }
}

@keyframes ticker-pop {
  0% {
    transform: translateY(2px) scale(0.98);
  }

  65% {
    transform: translateY(-1px) scale(1.035);
  }

  100% {
    transform: translateY(0) scale(1);
  }
}

@keyframes ticker-sheen {
  0% {
    opacity: 0;
    transform: translateX(-80%);
  }

  25% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    transform: translateX(240%);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
  }

  .reveal,
  .feature-image.reveal,
  .reveal.in-view,
  .feature-image.reveal.in-view {
    opacity: 1;
    transform: none;
  }

  .scroll-progress {
    display: none;
  }
}

@media (max-width: 1120px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .nav-links {
    justify-content: flex-start;
  }
}

@media (max-width: 940px) {
  .stats-grid,
  .card-grid,
  .three-column,
  .four-column,
  .resource-grid,
  .action-grid,
  .dashboard-grid,
  .form-grid,
  .map-grid,
  .two-column,
  .split {
    grid-template-columns: 1fr;
  }

  .hero,
  .page-hero {
    min-height: 560px;
  }

  .qr-card {
    grid-template-columns: 1fr;
  }

  .qr-card img {
    width: 160px;
  }
}

@media (max-width: 620px) {
  .site-header {
    padding: 0.8rem 1rem;
  }

  .nav-links a {
    font-size: 0.8rem;
    padding: 0.35rem 0.46rem;
  }

  .brand-logo {
    height: 38px;
    width: 38px;
  }

  .hero-content,
  .page-hero-content,
  .section,
  .quote-band,
  .site-footer {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .hero-content,
  .page-hero-content {
    padding-bottom: 3rem;
    padding-top: 3.5rem;
  }

  .button,
  .copy-button,
  .quiz-option {
    width: 100%;
  }

  .stat strong {
    font-size: 1.65rem;
  }

  .overlap-row {
    grid-template-columns: 1fr;
  }

  table {
    min-width: 640px;
  }
}
