/* Elder Tracker. Design J: warm oat paper, navy ink, Source Serif 4 Light for display, Instrument Sans for text.
   Every text/background pair below meets WCAG 2.2 AA (lowest 6.07:1); body text is never under 18px. */
@font-face { font-family: "Source Serif 4"; src: url(/fonts/source-serif-4-latin-wght-normal.woff2) format("woff2"); font-weight: 200 900; font-display: swap; }
@font-face { font-family: "Instrument Sans"; src: url(/fonts/instrument-sans-latin-wght-normal.woff2) format("woff2"); font-weight: 400 700; font-display: swap; }

:root {
  --bg: #f1e6d6; --cell: #fbf5ea; --line: #d8c8b0;
  --ink: #16233f; --muted: #4c5568; --navy: #1f3a6e; --light: #fbf5ea; --chip: #ffe2a3;
  --font-body: "Instrument Sans", system-ui, sans-serif; --font-display: "Source Serif 4", Georgia, serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 1.25rem/1.6 var(--font-body); overflow-wrap: break-word; }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 300; margin: 0 0 .5em; text-wrap: balance; }
h1 { font-size: clamp(3.25rem, 10vw, 8.5rem); line-height: .98; letter-spacing: -.04em; margin-bottom: .3em; }
h2 { font-size: clamp(2.25rem, 5.4vw, 4rem); line-height: 1.05; letter-spacing: -.03em; margin-bottom: .8em; }
h3 { font-size: clamp(2rem, 3.6vw, 2.75rem); line-height: 1.12; letter-spacing: -.02em; font-weight: 350; }
p, ul, ol, figure { margin: 0 0 1em; }
li { margin-bottom: .35em; }
a { color: var(--navy); text-underline-offset: .15em; }
a:focus-visible { outline: 3px solid var(--focus, var(--navy)); outline-offset: 3px; border-radius: 2px; }

.skip { position: absolute; left: -999rem; }
.skip:focus { left: 1rem; top: 1rem; z-index: 20; background: #fff; color: #000; padding: .5rem 1rem; }

.wrap { max-width: 70rem; margin-inline: auto; padding-inline: clamp(1.1rem, 4vw, 2.5rem); }
.wrap--wide { max-width: 82rem; }
main > section { padding-block: clamp(2.75rem, 7vw, 5.5rem); }
main > section p, .doc p, .doc li { max-width: 38em; }

/* Header and footer */
.top__in { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .4rem 2rem; padding-block: 1.1rem; }
.brand { font-family: var(--font-display); font-weight: 500; font-size: 1.5rem; letter-spacing: -.01em; color: inherit; text-decoration: none; }
.top ul, .foot ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .25rem 1.6rem; }
.top li, .foot li { margin: 0; }
.top nav a, .foot a { color: inherit; }
.foot { padding-block: 2.5rem 3.5rem; font-size: 1.125rem; color: var(--muted); }
.foot p { margin-bottom: .6em; }

.button { display: inline-block; background: var(--navy); color: var(--light); font-weight: 700; font-size: 1.1875rem; line-height: 1.3; text-decoration: none; padding: .85em 1.35em; border-radius: 999px; }
.button:hover { text-decoration: underline; }

/* Hero */
.hero { padding-top: clamp(2rem, 6vw, 4.5rem); }
.hero__text { text-align: center; }
.hero__text p { margin-inline: auto; }
.lede { font-size: 1.375rem; color: var(--muted); max-width: 31em; }
.hero__note { color: var(--muted); font-size: 1.125rem; }

/* The example week */
.strip { margin: clamp(2.5rem, 6vw, 4rem) 0 0; }
.week7 { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.week7 li { margin: 0; background: var(--cell); border-radius: 1rem; padding: .9rem 1rem 1rem; display: grid; grid-template-columns: 7.5rem 1fr; gap: .45rem 1rem; align-items: start; font-size: 1.125rem; line-height: 1.35; }
.week7 li > :not(.day) { grid-column: 2; }
.day { font-weight: 600; color: var(--muted); grid-row: 1 / span 4; }
.shift { justify-self: start; background: var(--navy); color: var(--light); font-weight: 600; padding: .3rem .7rem; border-radius: .5rem; }
.said { font-family: var(--font-display); font-size: 1.1875rem; line-height: 1.3; }
.cost { justify-self: start; border: 1.5px solid var(--ink); padding: .25rem .65rem; border-radius: .5rem; }
.todo { justify-self: start; background: var(--chip); padding: .3rem .7rem; border-radius: .5rem; font-weight: 500; }
.week7 .sum { background: var(--navy); color: var(--light); }
.sum .day { color: var(--light); }
.sum__n { font: 300 2.6rem/1 var(--font-display); letter-spacing: -.03em; }
.strip figcaption { margin-top: 1rem; color: var(--muted); font-size: 1.125rem; text-align: center; }
@media (min-width: 66rem) {
  .week7 { grid-template-columns: repeat(7, 1fr); }
  .week7 li { display: flex; flex-direction: column; align-items: flex-start; gap: .6rem; min-height: 15.5rem; }
  .day { margin-bottom: .3rem; }
  .sum__n { margin-top: auto; }
}
/* The week fills in once on load. Skipped for visitors who ask for reduced motion. */
@media (prefers-reduced-motion: no-preference) {
  .week7 li { animation: day-in .6s cubic-bezier(.2, .7, .2, 1) both; }
  .week7 li:nth-child(2) { animation-delay: .28s; }
  .week7 li:nth-child(3) { animation-delay: .56s; }
  .week7 li:nth-child(4) { animation-delay: .84s; }
  .week7 li:nth-child(5) { animation-delay: 1.12s; }
  .week7 li:nth-child(6) { animation-delay: 1.4s; }
  .week7 li:nth-child(7) { animation-delay: 1.9s; animation-duration: .9s; }
}
@keyframes day-in { from { opacity: 0; translate: 0 1.25rem; } }

/* Three kinds of people */
.phone { margin: 0; width: 16rem; max-width: 100%; max-height: 20rem; margin-inline: auto; border: .5rem solid var(--ink); border-bottom: 0; border-radius: 2.6rem 2.6rem 0 0; overflow: hidden; background: #fff; }
.person { display: grid; gap: 1.75rem; padding-top: 2.5rem; border-top: 1px solid var(--line); overflow: hidden; }
.person p, .person li { color: var(--muted); }
.person ul { padding-left: 1.15em; margin-bottom: 0; }
@media (min-width: 52rem) {
  .person { grid-template-columns: 1fr 22rem; gap: 3rem; align-items: end; }
  .person__text { align-self: center; padding-bottom: 2.5rem; }
  .person:nth-child(even) { grid-template-columns: 22rem 1fr; }
  .person:nth-child(even) .phone { order: -1; }
}

/* How a week goes */
.week { background: var(--cell); }
.steps { list-style: none; padding: 0; max-width: 48rem; counter-reset: step; }
.steps li { counter-increment: step; margin: 0; position: relative; padding: 1.1rem 0 1.1rem 4rem; border-top: 1px solid var(--line); color: var(--muted); }
.steps li strong { color: var(--ink); font-weight: 600; }
.steps li::before { content: counter(step); position: absolute; left: 0; top: .75rem; font: 300 2.75rem/1 var(--font-display); color: var(--navy); }

.private p { color: var(--muted); }

/* Closing call */
.ask__in { background: var(--navy); color: var(--light); border-radius: 2rem; padding: clamp(2.5rem, 7vw, 5rem) clamp(1.25rem, 5vw, 4rem); text-align: center; --focus: #ffe2a3; }
.ask__in h2 { font-size: clamp(2.6rem, 7vw, 5.5rem); margin-bottom: .35em; }
.ask__in p { margin-inline: auto; }
.ask__in .button { background: var(--light); color: var(--navy); }
.ask__in a:not(.button) { color: var(--light); }

/* Document pages: account deletion, contact, not found */
.doc { max-width: 46rem; padding-block: clamp(2rem, 6vw, 4rem); }
.doc h1 { font-size: clamp(2.5rem, 6vw, 4rem); letter-spacing: -.03em; line-height: 1.05; margin-bottom: .5em; }
.doc h2 { font-size: 2rem; letter-spacing: -.02em; line-height: 1.15; margin: 1.8em 0 .4em; }
.doc ol, .doc ul { padding-left: 1.3em; }
.updated { margin-top: 2.5em; color: var(--muted); }
