@font-face {
  font-family: "DM Sans";
  src: url("/fonts/dm-sans-latin-wght.woff2") format("woff2");
  font-weight: 100 1000;
  font-display: swap;
}
@font-face {
  font-family: "Outfit";
  src: url("/fonts/outfit-latin-wght.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

/* Teal and peach sampled from the cover */
:root {
  --teal-dark: #0d2e2f;
  --teal: #154345;
  --peach: #d4a587;
  --sage: #87908c;
  --ink: #173436;
  --link: #1d565a;
  --paper: #f3eee6;
  --rule: #cfd3cc;
  --on-dark: #fdf3e8;
  --edge: 0.12; /* how much darker the paper is at its edges */
  --muted-on-dark: #cfe0dc;
  --sage-light: #b9c7c2; /* the cover's sage, lifted to read on the teal */
  /* Teal bands lit softly from behind the cover, darker towards the edges.
     The lightest teal keeps peach text at 4.75:1 (WCAG AA). */
  --teal-lit:
    radial-gradient(38rem 28rem at 28% 45%, rgba(212, 165, 135, 0.10), transparent 70%),
    radial-gradient(46rem 34rem at 95% 0%, rgba(135, 144, 140, 0.16), transparent 70%),
    linear-gradient(165deg, #164649, var(--teal) 45%, #0f3335);
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  /* Laid paper: fine horizontal lines, as in good writing paper, a shade darker towards the edges */
  background:
    repeating-linear-gradient(0deg, rgba(92, 72, 44, 0.05) 0 1px, transparent 1px 4px),
    linear-gradient(90deg, rgba(92, 72, 44, var(--edge)), rgba(92, 72, 44, 0) 25%, rgba(92, 72, 44, 0) 75%, rgba(92, 72, 44, var(--edge))),
    var(--paper);
  color: var(--ink);
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: 1.1875rem; /* 19px */
  line-height: 1.6;
}

h1, h2 {
  font-family: "Outfit", system-ui, sans-serif;
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 0.6em;
}
h1 { font-size: clamp(2.4rem, 9vw, 3.6rem); color: var(--peach); }
h2 { font-size: clamp(1.75rem, 6vw, 2.4rem); margin-bottom: 0.5em; }
/* Section headings: teal, as "That's where this guide comes in", and centred */
.accent { color: var(--link); }
h2.accent { text-align: center; text-wrap: balance; }

p, ul, ol { margin: 0 0 1em; }

a { color: var(--link); text-underline-offset: 0.15em; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible, .btn:focus-visible {
  outline: 3px solid var(--peach);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: var(--peach);
  color: var(--ink);
  padding: 0.5rem 1rem;
  z-index: 1;
}
.skip:focus { top: 1rem; }

.wrap {
  max-width: 46rem;
  margin: 0 auto;
  padding: 0 1rem;
}

section.wrap { padding-top: 3rem; padding-bottom: 2.5rem; }

/* Hero */
.hero {
  background: var(--teal-lit);
  color: var(--on-dark);
  padding: 2rem 0 2.5rem;
  border-bottom: 3px solid var(--peach);
}
.hero-inner {
  display: grid;
  gap: 1.5rem;
  max-width: 60rem;
}
.hero h1 { margin-bottom: 0.25em; }
/* The title as on the cover: "Caring For" small and peach above, "Mum & Dad" in cream,
   the ampersand quieter in sage */
.hero h1, .hero-title { color: var(--on-dark); }
.h1-pre { display: block; font-size: 0.45em; font-weight: 500; letter-spacing: 0.06em; color: var(--peach); margin-bottom: 0.2em; }
.h1-amp { font-family: "DM Sans", system-ui, sans-serif; font-weight: 300; color: var(--sage-light); } /* the cover sets its ampersand in DM Sans Light */
.subtitle {
  font-family: "Outfit", system-ui, sans-serif;
  font-weight: 500;
  font-size: clamp(1.4rem, 5vw, 1.8rem);
  line-height: 1.2;
}
.lede { font-size: 1.3rem; line-height: 1.45; }
.byline { color: var(--muted-on-dark); margin: 0; }

.cover {
  justify-self: center;
  width: min(60vw, 300px);
}
/* The cover as a printed book, as on the Aarti Intelmann site: a hinge crease
   near the spine, a little shade inside it, and a soft shadow under it */
.cover, .also-cover {
  position: relative;
  display: block;
  border-radius: 2px 6px 6px 2px;
  overflow: hidden;
  box-shadow: 0 1.25rem 2.5rem -0.75rem rgba(0, 0, 0, 0.7), 0 0.25rem 0.6rem rgba(0, 0, 0, 0.35);
}
.cover img, .also-cover img {
  display: block;
  width: 100%;
  height: auto;
}
.cover::before, .also-cover::before {
  content: "";
  position: absolute;
  left: 4%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: rgba(0, 0, 0, 0.22);
  box-shadow: 1px 0 0 rgba(255, 255, 255, 0.12);
}
.cover::after, .also-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  box-shadow: inset 4px 0 6px -2px rgba(0, 0, 0, 0.35);
}

/* Phones: header text and all buttons centred. Paper a touch warmer, as phone
   screens at full brightness make the desktop shade look stark. */
@media (max-width: 759px) {
  :root { --paper: #e8dfd2; --rule: #c5cbc4; --edge: 0.07; }
  br.phone-only { display: inline; }
  .hero-text { text-align: center; }
  .buy { justify-content: center; }
}

@media (min-width: 760px) {
  .hero { padding: 3.5rem 0; }
  .hero-inner {
    grid-template-columns: 300px 1fr;
    grid-template-areas: "cover text" "cover buy";
    grid-template-rows: auto 1fr;
    align-items: start;
    column-gap: 3rem;
  }
  .hero-text { grid-area: text; }
  .hero .buy { grid-area: buy; }
  .cover { grid-area: cover; width: 300px; }
}

/* Buttons */
.buy {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.btn {
  display: inline-block;
  flex: none;
  width: 15rem; /* both buy buttons the same size, just wider than "Buy the paperback" */
  white-space: nowrap;
  text-align: center;
  padding: 0.85rem 1.25rem;
  border: 2px solid var(--peach);
  border-radius: 6px;
  background: var(--peach);
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
}
.btn:hover { background: #e2bda3; }
.btn-alt { background: transparent; color: inherit; }
.btn-alt:hover { background: rgba(212, 165, 135, 0.15); }
main .btn-alt { border-color: var(--link); }
main .buy { justify-content: center; } /* buy buttons in the sections centred at every width */
/* Kindle button in the sections styled as in the header: teal, peach border */
main .buy .btn-alt { background: var(--teal); color: var(--on-dark); border-color: var(--peach); }
main .buy .btn-alt:hover { background: #1b5255; }
.btn-inline { width: auto; max-width: 100%; white-space: normal; }
p:has(> .btn-inline) { text-align: center; } /* download button centred, only as wide as its text */
.btn-sub { display: block; font-weight: 400; font-size: 0.9em; }

/* The lists can't be selected, so not copied and pasted wholesale */
.steps, .task-groups, .chapters { -webkit-user-select: none; user-select: none; }

/* First steps */
.intro { font-size: 1.25rem; }
.steps {
  list-style: none;
  counter-reset: step;
  padding: 0;
}
.steps li {
  counter-increment: step;
  position: relative;
  padding-left: 3rem;
  margin-bottom: 1.25rem;
}
/* A circle in ink, the number in peach */
.steps li::before,
.steps li::after {
  position: absolute;
  left: 0.25rem;
  top: 0.25rem;
  width: 1.75rem;
  height: 1.75rem;
}
.steps li::before {
  content: "";
  border-radius: 50%;
  background: var(--ink);
}
.steps li::after {
  content: counter(step);
  display: grid;
  place-items: center;
  color: var(--peach);
  font-family: "Outfit", system-ui, sans-serif;
  font-weight: 600;
}

/* What the book covers: questions set between rules, like a contents page */
/* In a box centred under its heading, as the help lines, rules between the questions */
.questions {
  list-style: none;
  width: fit-content;
  max-width: 100%;
  margin: 0 auto 1.5em;
  padding: 0.25rem 1.5rem;
  background: #fbf8f3;
  border: 1px solid var(--rule);
  border-radius: 6px;
}
.questions li:last-child { border-bottom: 0; }
.questions li {
  padding: 0.7rem 0;
  border-bottom: 2px solid var(--rule);
  font-family: "Outfit", system-ui, sans-serif;
  font-weight: 500;
  font-size: 1.2rem;
  line-height: 1.35;
}

/* The help lines in a box centred under their heading, as wide as its contents,
   set like the "Shared by" box; the lines inside stay left-aligned */
.support ul {
  width: fit-content;
  max-width: 100%;
  margin: 0 auto;
  padding: 1.25rem 1.5rem 1.25rem 2.75rem;
  background: #fbf8f3;
  border: 1px solid var(--rule);
  border-radius: 6px;
}
.support li { margin-bottom: 0.5rem; }
.support li:last-child { margin-bottom: 0; }
a[href^="tel:"] { white-space: nowrap; }
.together { white-space: nowrap; } /* keep a phone number and its website on one line */
.phone-only { display: none; } /* line break used only on phones */

/* Footer */
.foot {
  margin-top: 1rem;
  padding: 2rem 0 2.5rem;
  background: linear-gradient(180deg, #12393a, var(--teal-dark));
  color: var(--muted-on-dark);
  font-size: 1rem;
  border-top: 3px solid var(--peach);
}
.foot a { color: var(--peach); }

/* For carers: a quieter page. Slim header, no cover, so the steps come first on a phone. */
.slim {
  background: var(--teal-lit);
  color: var(--on-dark);
  padding: 1.5rem 0 1.25rem;
  border-bottom: 3px solid var(--peach);
}
.slim { text-align: center; }
.slim h1 { font-size: clamp(2rem, 7vw, 2.8rem); margin-bottom: 0.2em; }
.slim .lede { margin: 0; color: var(--muted-on-dark); }
.carers section.wrap { padding-top: 2rem; }
.demo-banner {
  margin: 0;
  padding: 0.5rem 1rem;
  background: var(--teal-dark);
  color: var(--muted-on-dark);
  font-size: 0.95rem;
  text-align: center;
  border-bottom: 3px solid var(--peach);
}
/* "Shared by ...": the partner's details, so families can get back to them */
/* Centred, and only as wide as its contents (up to the page width) */
.partner {
  display: flex;
  gap: 1rem;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  margin: 1.5rem auto 0;
  padding: 1rem 1.25rem;
  border: 1px solid var(--rule);
  border-radius: 6px;
}
.partner p { margin: 0; }
.partner-logo { flex: none; max-width: 150px; max-height: 5rem; height: auto; }
.logo-placeholder {
  width: 120px;
  height: 4rem;
  display: grid;
  place-items: center;
  background: #d9dcd6;
  color: #4f5b58;
  font-size: 0.85rem;
  border-radius: 4px;
}
/* The book band, styled as the home page header */
main > .hero { border-top: 3px solid var(--peach); }
/* The hook, centred above the cover and the title */
.kicker {
  font-family: "Outfit", system-ui, sans-serif;
  font-weight: 500;
  color: var(--sage-light); /* set apart from the white text below it and the peach title */
  font-size: clamp(1.3rem, 5vw, 1.75rem);
  line-height: 1.3;
  text-align: center;
  text-wrap: balance;
  max-width: 40rem;
  margin: 0 auto 2rem;
  padding: 0 1rem;
}
/* For carers: everything still to do, set densely so the size of the job shows */
.todo { padding-bottom: 1.5rem; }
.tasks {
  list-style: none;
  padding: 0;
  margin: 0;
  border-top: 2px solid var(--rule); /* 2px, so it doesn't read as one of the paper's own lines */
  font-size: 1rem;
  line-height: 1.35;
}
.tasks li { padding: 0.45rem 0 0.45rem 1.1rem; border-bottom: 2px solid var(--rule); position: relative; break-inside: avoid; }
.tasks li::before { content: ""; position: absolute; left: 0.2rem; top: 0.75rem; width: 0.25rem; height: 0.75rem; border-radius: 1px; background: var(--sage); } /* one of the cover's bars */
/* The list in groups (from the book's contents): two columns of whole groups on wider screens */
.task-group { break-inside: avoid; }
.task-group:first-child h3 { margin-top: 0; } /* level with the second column, whose top margin the column break drops */
@media (min-width: 760px) {
  .task-groups { columns: 2; column-gap: 2rem; }
}

/* For carers: the hook on the page, leading from the steps into the book band */
.bridge { text-align: center; padding-top: 1rem; padding-bottom: 3rem; max-width: 60rem; }
/* "That's where this guide comes in": the answer to the hook, a line of its own,
   with the same space above (after the hook) as below (before the book band) */
.bridge .hook + p {
  font-family: "Outfit", system-ui, sans-serif;
  font-weight: 600;
  font-size: clamp(1.7rem, 6vw, 2.35rem);
  line-height: 1.2;
  color: var(--link);
  margin-top: 3rem;
}
@media (min-width: 760px) {
  .bridge .hook span { display: block; } /* one sentence per line on wider screens */
}
.bridge p { margin: 0; font-size: clamp(1.3rem, 4.5vw, 1.5rem); line-height: 1.35; }
.bridge .hook {
  font-family: "Outfit", system-ui, sans-serif;
  font-weight: 600;
  font-size: clamp(2rem, 7vw, 2.8rem); /* same as the page title */
  line-height: 1.15;
  text-wrap: balance;
  margin-bottom: 0;
}
/* A teal band between page sections, peach line above and below like the header */
.band {
  background: var(--teal-lit);
  color: var(--on-dark);
  border-top: 3px solid var(--peach);
  border-bottom: 3px solid var(--peach);
  padding: 2.25rem 0;
}
.band p:last-child { margin-bottom: 0; }
main .band .btn-alt { color: var(--on-dark); border-color: var(--peach); }
main .band .btn-alt:hover { background: rgba(212, 165, 135, 0.15); }
.hero-title { font-size: clamp(2.4rem, 9vw, 3.6rem); margin-bottom: 0.25em; }
@media (min-width: 760px) {
  main .hero .buy { justify-content: flex-start; } /* left, as in the home page header */
}

/* Contents page for partner organisations (/contents, unlisted); the heading style is shared with the task groups */
.hero-facts { font-weight: 600; color: var(--peach); margin: 0; } /* where the buy buttons sit on the home page */
@media (max-width: 759px) { .hero-facts { text-align: center; } }
.chapters h3, .task-group h3 {
  font-family: "Outfit", system-ui, sans-serif;
  font-weight: 600;
  font-size: 1.2rem;
  color: var(--link);
  margin: 1.5rem 0 0.4rem;
}
.chapters ol { margin: 0; padding-left: 2.25rem; border-top: 2px solid var(--rule); }
.chapters li { padding: 0.45rem 0 0.45rem 0.25rem; border-bottom: 2px solid var(--rule); }
.chapters li::marker { font-family: "Outfit", system-ui, sans-serif; font-weight: 600; color: var(--sage); }
.band p { text-align: center; }
.band p + p { margin-top: 1rem; }
.lines span { display: block; text-wrap: balance; } /* one phrase per line, broken at its commas */
.band .btn-inline { margin: 0.25rem; }

/* Partner link kit */
.kit { margin: 0 0 1em; padding: 1rem; background: #fbf8f3; border: 1px solid var(--rule); border-radius: 6px; }
.kit p { margin: 0; }
pre.kit { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 0.9rem; }
.kit-url { overflow-wrap: anywhere; }

/* Privacy notice */
.legal h1 { color: var(--ink); }
.legal h2 { font-size: clamp(1.35rem, 4.5vw, 1.6rem); margin-top: 1.75em; }

/* Home: the book in figures, under the blurb, as one line set between the cover's bars */
.facts {
  list-style: none;
  padding: 0;
  margin: 1.75rem 0 2rem;
  text-align: center;
  font-family: "Outfit", system-ui, sans-serif;
  font-weight: 500;
  font-size: 1.2rem;
  line-height: 1.6;
  color: var(--link);
  white-space: nowrap;
}
.facts li { display: inline; }
.facts + p { text-align: center; margin: -1rem 0 2rem; text-wrap: balance; font-family: "Outfit", system-ui, sans-serif; font-weight: 500; font-size: 1.2rem; color: var(--link); } /* what the figures leave out, set like them */
.facts li + li::before {
  content: "";
  display: inline-block;
  width: 0.2em;
  height: 0.8em;
  margin: 0 0.8em -0.05em;
  border-radius: 1px;
  background: var(--peach);
}
/* Phones: the last on a line of its own, so no bar starts or ends a line */
@media (max-width: 759px) {
  .facts li:last-child { display: block; }
  .facts li:last-child::before { display: none; }
}

/* Home: a heading within a section, such as "A look inside" */
.subhead { font-family: "Outfit", system-ui, sans-serif; font-weight: 600; font-size: 1.35rem; color: var(--link); text-align: center; text-wrap: balance; margin: 2.5rem 0 1rem; }
h2 + .subhead { margin-top: 0; }
.subhead span { display: block; } /* one sentence per line, each balanced on its own */
.subhead-large { font-size: clamp(1.5rem, 5vw, 1.75rem); } /* a heading over what follows, not a line of the text */

/* Home: pages from the book, as printed. A row that scrolls sideways on phones. */
.pages {
  display: flex;
  gap: 1.25rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 0.5rem 0.25rem 1.5rem;
  margin: 0 -1rem 1rem;
  padding-inline: 1rem;
}
.pages figure { flex: 0 0 62vw; margin: 0; scroll-snap-align: center; }
.pages .spread { flex-basis: 124vw; } /* an open book: two pages wide */
.pages img {
  display: block;
  width: 100%;
  height: auto;
  background: #fff;
  border-radius: 2px;
  box-shadow: 0 0.75rem 1.5rem -0.5rem rgba(23, 52, 54, 0.35), 0 0.15rem 0.4rem rgba(23, 52, 54, 0.15);
}
.pages figcaption { font-size: 0.95rem; text-align: center; margin-top: 0.6rem; }
@media (min-width: 760px) {
  .pages { overflow: visible; margin-inline: 0; padding-inline: 0; justify-content: space-between; }
  .pages figure { flex: 0 1 14rem; }
  .pages .spread { flex-basis: 28rem; }
}

/* Home: all the chapters, folded away until asked for */
.chapters-toggle { margin-bottom: 2rem; }
.chapters-toggle summary { display: block; width: fit-content; margin: 0 auto; cursor: pointer; list-style: none; }
.chapters-toggle summary::-webkit-details-marker { display: none; }
.chapters-toggle summary::after { content: ""; display: inline-block; width: 0.45em; height: 0.45em; margin-left: 0.6em; border: solid currentColor; border-width: 0 2px 2px 0; transform: translateY(-0.2em) rotate(45deg); }
.chapters-toggle[open] summary::after { transform: translateY(0.05em) rotate(-135deg); }
.chapters-toggle .chapters { margin-top: 1rem; }

/* Headings and links on the teal bands */
.band h2 { color: var(--peach); text-align: center; text-wrap: balance; }
.band a:not(.btn) { color: var(--peach); }

/* Home: the other book, laid out as on the Aarti Intelmann site */
.also {
  display: grid;
  grid-template-columns: 7.5rem 1fr;
  gap: 1.5rem;
  align-items: center;
  padding: 1.5rem;
  background: #f8f2e4; /* warm off-white, a shade deeper than the "look inside" pages */
  border: 1px solid var(--peach); /* defines the top and sides, where the shadow does not reach */
  border-radius: 6px;
  box-shadow: 0 0.75rem 1.5rem -0.75rem rgba(23, 52, 54, 0.45);
  color: var(--ink);
  text-decoration: none;
}
.also:hover { background: #f4ecda; }
.also-cover { width: 100%; }
.also-info { display: grid; gap: 0.5rem; font-size: 1rem; line-height: 1.5; }
.also-title { font-family: "Outfit", system-ui, sans-serif; font-weight: 600; font-size: 1.5rem; line-height: 1.2; color: var(--ink); }
.also-go { display: inline-flex; align-items: center; gap: 0.35rem; font-weight: 700; color: var(--ink); }
.also:hover .also-go { text-decoration: underline; }
@media (min-width: 760px) { .also { grid-template-columns: 10rem 1fr; gap: 2.5rem; padding: 2rem 2.5rem; } }
