:root {
  --page-bg: #f5f8fb;
  --page-bg-soft: #e6eef7;
  --ink: #172033;
  --muted: #536174;
  --line: rgba(30, 41, 59, 0.14);
  --surface: rgba(255, 255, 255, 0.82);
  --surface-strong: #ffffff;
  --primary: #315eb8;
  --teal: #18a999;
  --success: #13795b;
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

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

body {
  background: linear-gradient(180deg, var(--page-bg) 0%, #ffffff 48%, var(--page-bg-soft) 100%);
  color: var(--ink);
  margin: 0;
  min-height: 100vh;
}

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

button {
  color: inherit;
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

.site-header {
  background: rgba(248, 251, 253, 0.92);
  border-bottom: 1px solid rgba(30, 41, 59, 0.1);
  border-top: 3px solid #143a5a;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.07);
  position: sticky;
  top: 0;
  z-index: 20;
}

.site-header__inner {
  align-items: center;
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(230px, 1fr) auto auto auto;
  margin: 0 auto;
  max-width: 1600px;
  padding: 1.05rem clamp(1rem, 4vw, 2rem);
}

.brand {
  align-items: center;
  display: inline-flex;
  gap: 1rem;
  min-width: 0;
}

.brand img {
  flex: 0 0 auto;
  height: 44px;
  width: 44px;
}

.brand__copy {
  display: grid;
  line-height: 1.12;
  min-width: 0;
}

.brand__name {
  font-size: clamp(1.9rem, 4vw, 2.45rem);
  font-weight: 760;
}

.brand__tagline {
  color: var(--muted);
  font-size: 1rem;
  min-height: 1.25rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.main-nav {
  align-items: center;
  display: flex;
  gap: 0.65rem;
}

.main-nav a,
.lang-switch button {
  align-items: center;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(30, 41, 59, 0.12);
  border-radius: 0.55rem;
  display: inline-flex;
  font-size: 1.02rem;
  justify-content: center;
  min-height: 2.55rem;
  padding: 0.5rem 0.75rem;
  white-space: nowrap;
}

.main-nav a:hover,
.main-nav a.is-active,
.lang-switch button.is-active,
.lang-switch button:hover {
  background: #fff;
  border-color: rgba(49, 94, 184, 0.28);
  color: var(--primary);
}

.lang-switch {
  display: flex;
  gap: 0.35rem;
}

.senior-page {
  margin: 0 auto;
  max-width: 1180px;
  padding: clamp(1.25rem, 4vw, 2.7rem) clamp(1rem, 4vw, 2rem) 2rem;
}

.senior-hero,
.routine-hero {
  display: grid;
  gap: clamp(1.2rem, 3vw, 2rem);
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.95fr);
  margin-bottom: 1.4rem;
}

.senior-kicker,
.routine-kicker {
  color: var(--primary);
  font-size: 0.88rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  margin: 0 0 0.75rem;
  text-transform: uppercase;
}

h1 {
  font-size: clamp(2.35rem, 6vw, 4.25rem);
  font-weight: 850;
  line-height: 1;
  margin: 0;
}

.senior-lead,
.routine-lead {
  color: #253248;
  font-size: 1.18rem;
  line-height: 1.65;
  margin: 1.1rem 0 0;
  max-width: 46rem;
}

.senior-actions,
.routine-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.4rem;
}

.daily-link,
.senior-card__link,
.routine-step__link,
.routine-step__button {
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 0.55rem;
  cursor: pointer;
  display: inline-flex;
  font-weight: 850;
  justify-content: center;
  min-height: 3rem;
  padding: 0.68rem 0.95rem;
}

.daily-link--primary,
.senior-card__link,
.routine-step__button {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.daily-link--ghost,
.routine-step__link {
  background: rgba(255, 255, 255, 0.76);
}

.senior-panel,
.routine-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 16px 38px rgba(15, 23, 42, 0.09);
  padding: clamp(1rem, 3vw, 1.35rem);
}

.senior-panel h2,
.routine-panel h2 {
  font-size: 1.35rem;
  margin: 0 0 0.7rem;
}

.senior-panel ul,
.routine-panel ul {
  color: var(--muted);
  display: grid;
  gap: 0.55rem;
  margin: 0;
  padding-left: 1.2rem;
}

.senior-grid,
.routine-grid,
.faq-grid {
  display: grid;
  gap: 1rem;
}

.senior-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 1rem;
}

.routine-grid {
  margin-top: 1rem;
}

.senior-card,
.routine-step,
.faq-item,
.support-card,
.support-impact {
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1rem;
}

.senior-card h2,
.routine-step h2,
.faq-item h2,
.support-card h2,
.support-impact h2 {
  font-size: 1.18rem;
  line-height: 1.25;
  margin: 0;
}

.senior-card p,
.routine-step p,
.faq-item p,
.support-card p {
  color: var(--muted);
  line-height: 1.55;
  margin: 0.55rem 0 0;
}

.senior-card__link,
.routine-step__controls {
  margin-top: 0.9rem;
}

.routine-step {
  align-items: center;
  display: grid;
  gap: 1rem;
  grid-template-columns: auto minmax(0, 1fr) auto;
}

.routine-step__number {
  align-items: center;
  background: #dce7f7;
  border-radius: 999px;
  color: #173f7a;
  display: inline-flex;
  font-size: 1.2rem;
  font-weight: 900;
  height: 3rem;
  justify-content: center;
  width: 3rem;
}

.routine-step__controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  justify-content: flex-end;
  margin-top: 0;
}

.support-page {
  max-width: 1120px;
}

.support-panel__logo {
  height: 56px;
  margin-bottom: 0.8rem;
  width: 56px;
}

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

.support-card {
  display: flex;
  flex-direction: column;
  min-height: 16rem;
}

.support-card--featured {
  border-color: rgba(24, 169, 153, 0.34);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.07);
}

.support-card__badge,
.support-impact__eyebrow {
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  margin-bottom: 0.65rem;
  text-transform: uppercase;
}

.support-card .senior-card__link {
  margin-top: auto;
}

.support-qr {
  align-self: center;
  background: #fff;
  border: 1px solid rgba(30, 41, 59, 0.12);
  border-radius: 8px;
  display: block;
  margin: 1rem 0;
  max-width: 13rem;
  padding: 0.45rem;
}

.support-qr img {
  display: block;
  height: auto;
  width: 100%;
}

.support-impact {
  align-items: start;
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(220px, 0.7fr) minmax(0, 1.3fr);
  margin-top: 1rem;
}

.support-list {
  color: var(--muted);
  display: grid;
  gap: 0.55rem;
  line-height: 1.55;
  margin: 0;
  padding-left: 1.2rem;
}

.support-note {
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.6;
  margin: 1rem 0 0;
}

.support-note a {
  color: var(--primary);
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.routine-step.is-done {
  border-color: rgba(19, 121, 91, 0.36);
}

.routine-step.is-done .routine-step__number,
.routine-step.is-done .routine-step__button {
  background: var(--success);
  border-color: var(--success);
  color: #fff;
}

.routine-progress {
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid var(--line);
  border-radius: 999px;
  height: 0.9rem;
  margin-top: 1rem;
  overflow: hidden;
}

.routine-progress__bar {
  background: linear-gradient(90deg, var(--primary), var(--teal));
  height: 100%;
  width: 0;
}

.routine-status {
  color: var(--muted);
  font-weight: 750;
  margin: 0.75rem 0 0;
}

.trust-note {
  color: var(--muted);
  font-size: 0.96rem;
  line-height: 1.55;
  margin-top: 1rem;
}

.trust-note a {
  color: var(--primary);
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.site-footer {
  color: var(--muted);
  font-size: 0.9rem;
  padding: 1.25rem;
  text-align: center;
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid rgba(49, 94, 184, 0.32);
  outline-offset: 2px;
}

@media (max-width: 1080px) {
  .site-header__inner {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .brand {
    grid-column: 1;
    grid-row: 1;
  }

  .lang-switch,
  .senior-mode-toggle {
    grid-row: 1;
  }

  .main-nav {
    grid-column: 1 / -1;
    grid-row: 2;
    overflow-x: auto;
    padding-bottom: 0.15rem;
    scrollbar-width: none;
  }

  .main-nav::-webkit-scrollbar {
    display: none;
  }

  .main-nav a {
    flex: 0 0 auto;
  }

  .senior-hero,
  .routine-hero {
    grid-template-columns: 1fr;
  }

  .senior-grid,
  .support-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .support-impact {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .site-header__inner {
    gap: 0.65rem;
    padding: 0.75rem 0.9rem 0.65rem;
  }

  .brand {
    gap: 0.6rem;
  }

  .brand img {
    height: 36px;
    width: 36px;
  }

  .brand__name {
    font-size: 1.65rem;
  }

  .brand__tagline {
    font-size: 0.82rem;
    max-width: 58vw;
  }

  .main-nav {
    gap: 0.35rem;
  }

  .main-nav a,
  .lang-switch button {
    font-size: 0.9rem;
    min-height: 2.25rem;
    padding: 0.38rem 0.58rem;
  }

  .senior-page {
    padding-left: 0.85rem;
    padding-right: 0.85rem;
  }

  .senior-grid,
  .support-grid,
  .routine-step {
    grid-template-columns: 1fr;
  }

  .routine-step__controls {
    justify-content: stretch;
  }

  .routine-step__link,
  .routine-step__button,
  .daily-link,
  .senior-card__link {
    width: 100%;
  }
}
