/* The public site's one stylesheet, shared by every market's page (docs/runbook.md § The public site).
   It draws with the app's type and colours, and nothing else of the app's. Literata is served from here, never from
   Google: every page view would send the reader's IP address there. The fonts are copies of packages/theme/fonts,
   under the SIL Open Font License (fonts/OFL.txt). */

@font-face {
  font-family: 'Literata';
  font-style: normal;
  font-display: swap;
  font-weight: 200 900;
  src: url('fonts/literata-latin-ext-opsz-normal.woff2') format('woff2-variations');
  unicode-range:
    U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
    U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F,
    U+A720-A7FF;
}
@font-face {
  font-family: 'Literata';
  font-style: normal;
  font-display: swap;
  font-weight: 200 900;
  src: url('fonts/literata-latin-opsz-normal.woff2') format('woff2-variations');
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Literata';
  font-style: italic;
  font-display: swap;
  font-weight: 200 900;
  src: url('fonts/literata-latin-ext-opsz-italic.woff2') format('woff2-variations');
  unicode-range:
    U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
    U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F,
    U+A720-A7FF;
}
@font-face {
  font-family: 'Literata';
  font-style: italic;
  font-display: swap;
  font-weight: 200 900;
  src: url('fonts/literata-latin-opsz-italic.woff2') format('woff2-variations');
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  /* The Design System's colours, as packages/theme/src/theme.css holds them; only the ones this page uses */
  --paper: #faf9f6;
  --ink: #24211c;
  --pencil: #65625c;
  --faint: #8f8a82;
  --rule: #e4e0d8;
  --accent: #5f7350;
  --accent-pressed: #4e5f42;
  --highlight: #f4d46a;
  --font: 'Literata', Georgia, 'Times New Roman', serif;
  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.3rem;
  --step-2: 1.7rem;
  --step-3: clamp(2rem, 5vw, 3.1rem);
  color-scheme: light;
}
* {
  box-sizing: border-box;
}
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--step-0);
  line-height: 1.6;
  padding-inline: 20px;
  padding-block: 0 48px;
  margin: 0;
}
.wrap {
  max-width: 1040px;
  margin: 0 auto;
}
h1,
h2,
h3 {
  font-weight: 400;
  text-wrap: balance;
  margin: 0;
  line-height: 1.2;
}
p {
  margin: 0;
}
a {
  color: var(--accent);
}
a:hover {
  color: var(--accent-pressed);
}
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* top bar */
.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-block: 18px;
}
.word {
  display: flex;
  align-items: center;
}
.word .logo {
  display: block;
  height: 2.4rem;
  width: auto;
  color: var(--ink);
}
.top nav {
  display: flex;
  gap: 22px;
  font-size: var(--step--1);
}
.top nav a {
  color: var(--pencil);
  text-decoration: none;
}
.top nav a:hover {
  color: var(--ink);
}
.top nav a.signin {
  color: var(--accent);
}

/* hero */
.hero {
  /* the drawing leads the first screen, on the left, so the torch beam points across
     at the headline; on a phone it comes first too, above the words */
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 48px;
  align-items: center;
  padding-block: 32px 20px;
}
.hero > * {
  min-width: 0;
}
.hero .heroart {
  order: -1;
}
.dateline {
  display: flex;
  align-items: baseline;
  gap: 10px;
  color: var(--pencil);
}
.dateline .num {
  font-size: 2.6rem;
  line-height: 1;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.dateline .day {
  font-style: italic;
}
.dateline .time {
  font-variant-numeric: tabular-nums;
  font-size: var(--step--1);
}
.dateline .time::before {
  content: '·';
  margin-right: 10px;
  color: var(--faint);
}
/* a day off: its number underlined in pencil, as on the calendar */
.num.off {
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 8' preserveAspectRatio='none'%3E%3Cpath d='M2 5.5 C 14 3.2, 30 4.6, 44 3.4 S 55 3.6, 58 2.6' fill='none' stroke='%2365625C' stroke-width='1.4' stroke-linecap='round'/%3E%3C/svg%3E")
    left bottom / 100% 7px no-repeat;
  padding-bottom: 7px;
}
/* the first screen keeps to three sizes (small, title, body), no italics, and one bold
   sentence besides the headline */
.hero .dateline {
  margin-bottom: 16px;
  font-size: var(--step--1);
}
.hero .dateline .day {
  font-style: normal;
}
/* the headline in the Headline setting (Literata 600, tight), the one thing to read first */
.hero h1 {
  font-weight: 600;
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
}
.hero .story {
  margin-top: 14px;
  color: var(--pencil);
  max-width: 24em;
}
.plain {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--rule);
  max-width: 34em;
}
.hero .cta {
  margin-top: 24px;
}
.plain strong {
  font-weight: 600;
}
.plain .turn {
  margin-bottom: 8px;
}
.cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 18px;
  margin-top: 22px;
}
.btn {
  display: inline-block;
  transition: background-color 0.15s;
  background: var(--accent);
  color: var(--paper);
  text-decoration: none;
  padding: 12px 22px;
  border-radius: 999px;
  font-size: var(--step-0);
}
.btn:hover {
  background: var(--accent-pressed);
  color: var(--paper);
}
.cta small {
  color: var(--pencil);
  font-size: var(--step--1);
}
/* the store badges sit in the drawing's quiet lower right, one above the other:
   with the bold line, they say it's an app */
.heroart {
  position: relative;
}
.heroart .art {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 6px;
}
.badges {
  position: absolute;
  right: 14px;
  bottom: 14px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}
.badges[hidden] {
  display: none;
}
/* the official badges, at the same height */
.badges img {
  display: block;
  height: 40px;
  width: auto;
}

/* label between hairlines (the app's label style) */
.label {
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--pencil);
  font-style: italic;
  font-size: var(--step--1);
  margin-block: 64px 32px;
}
.label::before,
.label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--rule);
}

/* meet her */
.meet {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 40px;
  align-items: center;
}
.meet > * {
  min-width: 0;
}
.meet h2 {
  font-size: var(--step-2);
}
.letter {
  margin-top: 10px;
  font-size: var(--step-1);
  line-height: 1.5;
  max-width: 28em;
}
/* signed by hand at the end of the line, a little larger than in her chat */
.letter .signature {
  height: 1.4em;
  margin-left: 10px;
  vertical-align: -0.4em;
}
/* her drawn "‑M."; its fill follows the text colour */
.signature {
  display: inline-block;
  height: 1.15em;
  width: auto;
  margin-left: 6px;
  vertical-align: -0.28em;
  color: var(--ink);
}
.meet .note {
  margin-top: 18px;
  color: var(--pencil);
  max-width: 34em;
}
.meet .art {
  display: block;
  width: 100%;
  height: auto;
}

/* scenes: one day each. The case on the left; on the right, what it looks like in the
   app (her chat, a list, the letter) or on paper. No phone screens: they would show the
   same thing a second time */
.scene {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr) minmax(0, 1.15fr);
  gap: 20px 40px;
  padding-block: 34px;
  border-bottom: 1px solid var(--rule);
  align-items: start;
}
.scene .dateline,
.payoff .dateline {
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}
.scene .dateline .num,
.payoff .dateline .num {
  margin-bottom: 4px;
}
.scene .dateline .time::before,
.payoff .dateline .time::before {
  content: none;
}
.scene h3 {
  font-size: var(--step-1);
  font-weight: 500;
}
.scene .case {
  margin-top: 10px;
  color: var(--pencil);
  max-width: 26em;
}
/* the week on the fridge: the picture on the right, and the printed week across both
   columns below, since seven days need the width */
.scene > .art {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 6px;
}
.scene .onpaper {
  grid-column: 2 / -1;
  margin-top: 8px;
}
.scene .feature {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  font-size: var(--step--1);
  font-style: italic;
  color: var(--accent);
}
.scene .feature::before {
  content: '';
  width: 22px;
  height: 1px;
  background: currentColor;
  opacity: 0.6;
}
/* a drawing under the case, where the left column runs short of the right */
.scene .story .art {
  display: block;
  width: 100%;
  max-width: 26em;
  height: auto;
  margin-top: 26px;
  border-radius: 6px;
}
/* a quiet day: the date row and a line, nothing more */
.scene.quiet {
  grid-template-columns: 110px minmax(0, 1fr);
  padding-block: 20px;
  align-items: baseline;
}
.scene.quiet .dateline .num {
  font-size: 1.9rem;
}
.aside {
  color: var(--pencil);
  font-style: italic;
  max-width: 32em;
}
/* "a week with her" leads straight into the week */
.label + .scene {
  padding-top: 0;
}

/* what it looks like in the app, each piece under the name of where it lives */
.app {
  display: grid;
  gap: 22px;
  border-left: 1px solid var(--rule);
  padding-left: 28px;
}
.where {
  margin-bottom: 8px;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--pencil);
}

/* the day's lines, set the way the calendar and the lists set them: an appointment has
   its time and who's taking it, a job its tick box; the line under it says where it came from */
.cal {
  display: grid;
  gap: 2px;
  max-width: 26em;
}
.cal .line {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 12px;
}
.cal .t {
  flex: none;
  width: 3em;
  color: var(--pencil);
  font-variant-numeric: tabular-nums;
}
.cal .what {
  flex: 1;
  min-width: 0;
}
.cal .src {
  flex-basis: 100%;
  padding-left: calc(3em + 12px);
  color: var(--pencil);
  font-size: var(--step--1);
  font-style: italic;
}
.cal .job .src {
  padding-left: 26px;
}
.cal .done .what {
  color: var(--faint);
  text-decoration: line-through;
}
.box {
  flex: none;
  position: relative;
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 1.3px solid var(--faint);
  border-radius: 3px;
  transform: translateY(1px);
}
/* a tick in pencil, a little bigger than its box, as a hand makes it */
.box.tick::after {
  content: '';
  position: absolute;
  inset: -5px -3px 0 1px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M3 11 C 5 12.5, 6.5 14.5, 7.5 17 C 10 10, 13.5 5.5, 18 2' fill='none' stroke='%2365625C' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E")
    center / contain no-repeat;
}
.who {
  padding: 0 5px 1px;
  border-radius: 3px;
  color: var(--ink);
  font-size: var(--step--1);
  font-style: normal;
}

/* the conversation, set the way her tab sets it */
.convo {
  display: grid;
  gap: 12px;
  max-width: 32em;
}
.you {
  font-style: italic;
  color: var(--pencil);
  border-left: 1px solid var(--rule);
  padding-left: 14px;
}
/* a pasted message: the whole of it, smaller */
.you.pasted {
  font-size: var(--step--1);
  line-height: 1.5;
}
.her {
  color: var(--ink);
}
.her .signature {
  height: 1.05em;
}
/* her "undo that" under a message she filed, and the tea's "reply" */
.undo,
.reply {
  display: block;
  margin-top: 2px;
  font-size: var(--step--1);
  font-style: italic;
  color: var(--accent);
}
/* Sunday tea: each line under its section's name */
.tea {
  gap: 8px;
}
.tea i {
  display: block;
  font-size: var(--step--1);
  color: var(--pencil);
}

/* a printout: white paper, ruled, a little askew, as it lies on the table or hangs on the
   fridge. The plain print: names in grey, no colours */
.paper {
  background: #fff;
  padding: 18px 22px 20px;
  max-width: 24em;
  transform: rotate(-0.5deg);
  box-shadow:
    0 1px 2px rgba(36, 33, 28, 0.08),
    0 8px 20px rgba(36, 33, 28, 0.08);
  font-size: var(--step--1);
  line-height: 1.45;
}
.paper h4 {
  margin: 0;
  font-size: var(--step-0);
  font-weight: 600;
}
.paper .rl {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-height: 2.1em;
  padding-top: 0.5em;
  border-bottom: 1px solid var(--rule);
}
/* what a child wrote on the empty line, in pencil */
.paper .hand {
  font-style: italic;
  color: var(--pencil);
}

/* the printed week, set as the print sets it: one column per day, the
   date row on top, appointments under it with ruled pencil room, and the jobs in a band of
   their own below, with empty tick lines. Every rule runs level across the days: each cell
   is ruled from the same top, and the entries cover the rules behind them, so a day's pencil
   room starts at the first rule clear of its words. Smaller than the A4 sheet, and shorter */
.paper.week {
  --pitch: 24px;
  max-width: none;
  padding: 16px 18px 10px;
  transform: rotate(-0.3deg);
}
.week .head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--pencil);
}
.week .title {
  font-size: 1.6rem;
  font-weight: 300;
  letter-spacing: -0.02em;
  line-height: 1;
}
.week .range {
  font-style: italic;
  color: var(--pencil);
}
.week .days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  grid-template-rows: auto calc(var(--pitch) * 7) auto calc(var(--pitch) * 3);
}
/* a day is a column: its cells take their rows, and the band crosses all seven */
.week .sday {
  display: contents;
}
.week .sday > * {
  min-width: 0;
  padding-inline: 7px;
  overflow: hidden;
  background-origin: content-box;
  background-clip: content-box;
}
.week .sday ~ .sday > * {
  border-left: 1px solid var(--rule);
}
.week .hd {
  grid-row: 1;
  display: flex;
  align-items: flex-start;
  gap: 6px;
  padding-block: 8px 6px;
}
.week .num {
  font-size: 1.6rem;
  font-weight: 300;
  line-height: 0.9;
  font-variant-numeric: tabular-nums lining-nums;
}
.week .num.off {
  padding-bottom: 5px;
  background-size: 100% 5px;
}
.week .wd {
  display: flex;
  flex-direction: column;
  padding-top: 1px;
  font-size: 0.72rem;
  font-style: italic;
  line-height: 1.15;
  color: var(--pencil);
}
.week .wd .mo {
  font-style: normal;
  color: var(--ink);
}
.week .ap {
  grid-row: 2;
  background-image: repeating-linear-gradient(
    transparent 0 calc(var(--pitch) - 1px),
    var(--rule) 0 var(--pitch)
  );
}
.week .band {
  grid-row: 3;
  grid-column: 1 / -1;
  padding: 4px 0 2px;
  border-top: 1px solid var(--pencil);
  font-size: 0.78rem;
  font-style: italic;
  color: var(--pencil);
}
/* an empty tick line: the box, and the rule running on from it */
.week .jb {
  grid-row: 4;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='24'%3E%3Crect x='0.5' y='12.5' width='10' height='10' rx='1.5' fill='none' stroke='%238F8A82'/%3E%3C/svg%3E"),
    linear-gradient(transparent calc(var(--pitch) - 1px), var(--rule) 0);
  background-size:
    11px var(--pitch),
    calc(100% - 17px) var(--pitch);
  background-position:
    left top,
    right top;
  background-repeat: repeat-y;
}
/* the day's entries, on white, so the rules show only below them */
.week .ents {
  background: #fff;
  padding-bottom: 5px;
}
.week .ln {
  display: grid;
  grid-template-columns: 2.3rem minmax(0, 1fr);
  padding-top: 6px;
  font-size: 0.8rem;
  line-height: 1.25;
}
/* a job's lines keep the band's pitch, so it ends where an empty tick line begins */
.week .ln.job {
  grid-template-columns: 17px minmax(0, 1fr);
  padding-top: 0;
  line-height: var(--pitch);
}
.week .jb .ents {
  padding-bottom: 0;
}
.week .ln.job .t {
  padding-top: 0;
}
.week .ln.job .box {
  transform: none;
  vertical-align: -1px;
}
.week .ln .t {
  padding-top: 1px;
  font-size: 0.68rem;
  color: var(--pencil);
  font-variant-numeric: tabular-nums lining-nums;
}
.week .ln .box {
  width: 11px;
  height: 11px;
  border-color: var(--ink);
  border-width: 1px;
  transform: translateY(2px);
}
.week .ln .who {
  display: block;
  font-size: 0.68rem;
  font-style: italic;
  color: var(--pencil);
}
.week .foot {
  display: flex;
  justify-content: flex-end;
  margin-top: 4px;
}
.week .foot .signature {
  height: 0.9rem;
  margin: 0;
  color: var(--pencil);
}
.hl {
  background: var(--highlight);
  padding: 1px 4px;
  border-radius: 2px;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

/* the payoff */
.payoff {
  padding-block: 56px 8px;
}
/* the day as the week sets it: the date row on the left, its line beside it */
.payoff .day-row {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 10px 40px;
  align-items: start;
  margin-bottom: 26px;
}
.payoff .cal {
  padding-top: 4px;
}
.payoff h2 {
  font-size: var(--step-3);
  max-width: 16em;
}
.payoff .art {
  display: block;
  width: 100%;
  height: auto;
  margin-top: 30px;
  border-radius: 6px;
}

/* what she didn't do */
.didnt {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 48px;
}
.didnt div {
  padding-block: 18px;
  border-bottom: 1px solid var(--rule);
}
.didnt h3 {
  font-size: var(--step-1);
}
.didnt p {
  color: var(--pencil);
  margin-top: 4px;
}
.banana {
  margin-top: 28px;
  font-size: var(--step-1);
  max-width: 30em;
}

/* your first sunday */
.first {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 36px;
  margin-top: 8px;
}
.ring {
  position: relative;
  display: inline-block;
  padding: 4px 10px;
  margin-left: 14px;
}
.ring svg {
  position: absolute;
  inset: -10px -14px;
  width: calc(100% + 28px);
  height: calc(100% + 20px);
  overflow: visible;
}
.first .dateline {
  margin-top: 10px;
}
.first .num {
  font-size: 4.2rem;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.first h2 {
  font-size: var(--step-2);
}
.first .lead {
  margin-top: 12px;
  font-size: var(--step-1);
  max-width: 30em;
}
.first .cta {
  margin-top: 26px;
}

/* questions */
.faq div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: 6px 48px;
  padding-block: 18px;
  border-bottom: 1px solid var(--rule);
}
.faq div:last-child {
  border-bottom: 0;
}
.faq h3 {
  font-size: var(--step-0);
  font-weight: 600;
  line-height: 1.6;
}
.faq p {
  color: var(--pencil);
  max-width: 34em;
}

footer {
  margin-top: 72px;
  padding-top: 18px;
  border-top: 1px solid var(--rule);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  color: var(--pencil);
  font-size: var(--step--1);
}

@media (max-width: 820px) {
  .hero,
  .meet,
  .first {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  /* the plain line and the button reach the first screen of a phone */
  .hero {
    padding-block: 12px 8px;
  }
  .hero .dateline {
    margin-bottom: 10px;
  }
  .hero .story {
    margin-top: 10px;
  }
  .plain {
    margin-top: 16px;
    padding-top: 14px;
  }
  .cta,
  .hero .cta {
    margin-top: 16px;
  }
  .meet .art {
    max-width: 220px;
  }
  .badges {
    right: 10px;
    bottom: 10px;
    gap: 6px;
  }
  .scene,
  .scene.quiet {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }
  .scene.quiet {
    gap: 8px;
  }
  .scene .dateline,
  .payoff .dateline {
    flex-direction: row;
    align-items: baseline;
    gap: 10px;
  }
  .scene .dateline .time::before,
  .payoff .dateline .time::before {
    content: '·';
  }
  .payoff .day-row {
    grid-template-columns: minmax(0, 1fr);
  }
  .payoff .cal {
    padding-top: 0;
  }
  .app {
    padding-left: 16px;
    margin-top: 6px;
  }
  /* the week keeps its seven columns on a phone, and scrolls sideways inside its frame */
  .scene .onpaper {
    grid-column: auto;
    margin-top: 0;
  }
  .weekframe {
    overflow-x: auto;
    margin-inline: -20px;
    padding: 6px 20px 14px;
  }
  .paper.week {
    min-width: 680px;
    transform: none;
  }
  .didnt,
  .faq div {
    grid-template-columns: 1fr;
  }
  .faq div {
    gap: 4px;
  }
  .top nav a:not(.signin) {
    display: none;
  }
}
@media (prefers-reduced-motion: no-preference) {
  .ring path {
    stroke-dasharray: 320;
    stroke-dashoffset: 320;
    animation: draw 1.2s 0.4s ease-out forwards;
  }
  @keyframes draw {
    to {
      stroke-dashoffset: 0;
    }
  }
}
