/*
 * centability.app: Clear Day, the app's palette and type (apps/mobile/src/constants/tokens.ts and
 * type-scale.ts), on a 4px spacing scale (4, 8, 12, 16, 24, 32, 48, 64, 96).
 */

@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("/fonts/PlusJakartaSans_500Medium.ttf") format("truetype");
  font-weight: 400 500;
  font-display: swap;
}

@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("/fonts/PlusJakartaSans_700Bold.ttf") format("truetype");
  font-weight: 600 700;
  font-display: swap;
}

@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("/fonts/PlusJakartaSans_800ExtraBold.ttf") format("truetype");
  font-weight: 800;
  font-display: swap;
}

:root {
  --primary: #3438B5;
  --primary-pressed: #282B8F;
  --on-primary: #FFFFFF;
  --primary-soft: #ECECFA;
  --primary-soft-pressed: #DCDDF5;
  --hero: #2B2E9C;
  --hero-end: #3438B5;
  --on-hero: #FFFFFF;
  --on-hero-soft: #D7D8FF;
  --hero-track: #4D4FAC;
  --spark: #FF9152;
  --spark-on-hero: #FF9152;
  --spark-mark: #C9581A;
  --track: #E8E7E1;
  --success: #11775A;
  --ink: #16172B;
  --background: #F6F5F1;
  --surface: #FFFFFF;
  --surface-raised: #EFEEE9;
  --separator: #E3E2DC;
  --text: #16172B;
  --text-secondary: #565870;
  --text-quiet: #85869A;
  --control-border: #858799;
  --close-mark: #B26A00;
  --money-in: #11775A;
  --danger: #B3261E;
  --focus: #3438B5;
  --shadow: 22, 23, 43;
  --radius-card: 20px;
  --radius-button: 14px;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --primary: #9EAAFF;
    --primary-pressed: #8893EE;
    --on-primary: #0C0E2E;
    --primary-soft: #2D3270;
    --primary-soft-pressed: #363B80;
    --on-hero-soft: #DADBFF;
    --hero: #2E31A8;
    --hero-track: #4B4EB5;
    --spark: #FFA36B;
    --spark-mark: #FFA36B;
    --track: #414250;
    --success: #4ADBA3;
    --background: #0E0F13;
    --surface: #202128;
    --surface-raised: #2B2C35;
    --separator: #3D3E4B;
    --text: #F5F5F7;
    --text-secondary: #B0B2C0;
    --text-quiet: #8A8CA0;
    --control-border: #8587A0;
    --close-mark: #FFC25C;
    --money-in: #4ADBA3;
    --danger: #FFB4AB;
    --focus: #9EAAFF;
    --shadow: 0, 0, 0;
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font: 500 17px/1.6 "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3 {
  font-weight: 800;
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

a {
  color: var(--primary);
  text-underline-offset: 3px;
}

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
  border-radius: 4px;
}

.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

.skip {
  position: absolute;
  left: 16px;
  top: -64px;
  padding: 8px 16px;
  border-radius: var(--radius-button);
  background: var(--primary);
  color: var(--on-primary);
  font-weight: 700;
  z-index: 10;
}

.skip:focus {
  top: 16px;
}

/* Header and footer */
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 72px;
}

.site-header {
  border-bottom: 1px solid var(--separator);
}

.home .site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--background);
  border-bottom-color: transparent;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 800;
  font-size: 19px;
  letter-spacing: -0.01em;
  text-decoration: none;
}

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

.site-header nav {
  display: flex;
  gap: 4px;
  font-size: 15px;
}

.site-header nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 10px;
  color: var(--text-secondary);
  font-weight: 600;
  text-decoration: none;
  transition: color 150ms ease-out, background-color 150ms ease-out;
}

@media (hover: hover) {
  .site-header nav a:hover {
    background: var(--surface-raised);
    color: var(--text);
  }
}

.site-header nav a.nav-cta {
  white-space: nowrap;
  margin-left: 8px;
  padding: 0 16px;
  background: var(--primary);
  color: var(--on-primary);
  font-weight: 700;
}

@media (hover: hover) {
  .site-header nav a.nav-cta:hover {
    background: var(--primary-pressed);
    color: var(--on-primary);
  }
}

.site-header nav a[aria-current="page"] {
  color: var(--primary);
}

/* With scripts, the header's Join button waits until the first form has scrolled away, and goes once joined */
.js .site-header nav a.nav-cta {
  display: none;
}

.js.past-join:not(.has-joined) .site-header nav a.nav-cta {
  display: inline-flex;
}

/* Once joined, the other Join buttons go too */
.has-joined a[data-join-link] {
  display: none;
}

/* The home header carries three links plus the Join button: on a phone only Prices stays beside it */
@media (max-width: 720px) {
  .home .site-header nav .nav-how,
  .home .site-header nav .nav-questions {
    display: none;
  }
}

@media (max-width: 380px) {
  .js.past-join:not(.has-joined) .home .site-header nav .nav-prices {
    display: none;
  }
}

@media (max-width: 520px) {
  .wrap {
    padding: 0 16px;
  }

  .site-header nav {
    gap: 0;
    font-size: 14px;
  }

  .site-header nav a {
    padding: 0 6px;
  }

  .brand {
    font-size: 17px;
  }

  .site-header nav a.nav-cta {
    padding: 0 12px;
  }
}

.site-footer {
  margin-top: 64px;
  padding: 32px 0 48px;
  border-top: 1px solid var(--separator);
  color: var(--text-secondary);
  font-size: 14px;
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 32px;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  flex: 1;
}

.site-footer a {
  display: inline-block;
  padding: 10px 0;
  color: var(--text-secondary);
}

.site-footer a.brand {
  display: flex;
  color: var(--text);
}

.site-footer p {
  margin: 0;
}

.brand-small {
  font-size: 16px;
}

.brand-small img {
  width: 24px;
  height: 24px;
}

/* Buttons */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 24px;
  border-radius: var(--radius-button);
  background: var(--primary);
  color: var(--on-primary);
  font-weight: 700;
  text-decoration: none;
  transition: background-color 150ms ease-out, transform 120ms ease-out;
}

button.button {
  border: 0;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.button:disabled {
  opacity: 0.7;
  cursor: default;
}

.button:active {
  transform: scale(0.97);
}

@media (prefers-reduced-motion: reduce) {
  .button:active {
    transform: none;
  }
}

@media (hover: hover) {
  .button:hover {
    background: var(--primary-pressed);
  }
}

.button-quiet {
  background: var(--primary-soft);
  color: var(--primary);
}

@media (hover: hover) {
  .button-quiet:hover {
    background: var(--primary-soft-pressed);
  }
}

/*
 * Landing page (direction "The number first", on the 7:40 check-in story). The first screen is the
 * number and the way to join, nothing else. Below it one made-up Thursday runs through the page;
 * each chapter is a time of that day (the closer, the next Monday), set as a stamp over a piece of the
 * real interface.
 */

/* Beta now, launch later: <html data-stage> picks which of each pair shows */
[data-stage="beta"] .launch-only,
[data-stage="launch"] .beta-only {
  display: none !important;
}

/* The beta is on iPhone first: an Android phone reads its own line before the form */
.android-only,
.on-android .not-android {
  display: none;
}

.on-android .android-only {
  display: inline;
}

/* Things that only work with the script */
.js-only {
  display: none;
}

.js span.js-only {
  display: inline;
}

.js button.js-only {
  display: inline-flex;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 16px;
  scroll-margin-top: 8px;
}

.hero h1 {
  align-self: stretch;
  margin: 0 0 8px;
  font-size: clamp(30px, 5vw, 56px);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.035em;
}

.what {
  align-self: stretch;
  margin: 0 0 16px;
  color: var(--text-secondary);
  font-size: 16px;
  line-height: 1.4;
}

.fineprint {
  margin: 12px 0 0;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.45;
}

/*
 * The top of the app's Dashboard (board H1): the week's number stands on the page, with the one bar
 * of the app under it (the fill is what's spent, the orange tick is today, and orange is used for
 * nothing else), the pace and the week's dots. Framed as a phone's page so it reads as the app.
 */
.lead {
  --lead-bg: var(--surface);
  width: 100%;
  max-width: 480px;
  margin-bottom: 16px;
  padding: 18px 20px 20px;
  border-radius: 28px;
  background: var(--lead-bg);
  box-shadow: 0 0 0 1px var(--separator), 0 24px 48px -24px rgba(var(--shadow), 0.3);
  text-align: left;
}

.lead p {
  margin: 0;
}

.lead-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px !important;
}

.lead-title {
  display: flex;
  flex-direction: column;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.lead-title small {
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.5;
}

.flame {
  width: 14px;
  height: 14px;
  margin-right: 5px;
  fill: var(--primary);
}

.streak-on .flame {
  fill: var(--ink);
}

/* TYPE.eyebrow: 11/14 caps at +1 tracking */
.eyebrow {
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.09em;
  line-height: 14px;
  text-transform: uppercase;
}

.lead-amount {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: 72px;
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
}

.lead-amount small {
  color: var(--text-secondary);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0;
}

/* tick-bar.tsx: 14 tall, the tick 4 wide and 5 proud of the track, with a ring of the page */
.tick-bar {
  position: relative;
  height: 14px;
  margin: 12px 0 26px !important;
  border-radius: 999px;
  background: var(--track);
}

.tick-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--spent);
  border-radius: inherit;
  background: var(--primary);
}

.tick-mark {
  position: absolute;
  top: -5px;
  bottom: -5px;
  left: calc(var(--today) - 2px);
  width: 4px;
  border-radius: 2px;
  background: var(--spark-mark);
  box-shadow: 0 0 0 2px var(--lead-bg);
}

.tick-label {
  position: absolute;
  top: 20px;
  left: var(--today);
  transform: translateX(-50%);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
}

.pace-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.pace {
  display: flex;
  flex-direction: column;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.35;
}

.pace b {
  color: var(--success);
  font-size: 15px;
  font-weight: 700;
}

/* week-row.tsx: a day on pace is filled indigo with a check in the page's colour (white, or near-black in dark mode), today before the check-in an indigo ring, days to come the track */
.days {
  display: flex;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.days li {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}

.days li::before {
  content: "";
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--track);
}

.days .day-under::before {
  background: var(--primary) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.4 6.6 11 12 5.4' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 14px no-repeat;
}

@media (prefers-color-scheme: dark) {
  .days .day-under::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.4 6.6 11 12 5.4' fill='none' stroke='%230E0F13' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  }
}

.days .day-open::before {
  box-sizing: border-box;
  border: 3px solid var(--primary);
  background: transparent;
  box-shadow: 0 0 0 3px var(--primary-soft);
}

.days .day-open {
  color: var(--text);
}

.days-wide {
  justify-content: space-between;
  margin-top: 14px;
}

.tick-label-start {
  transform: translateX(-4px);
}

/* The hero shows no buttons: the join form is the one action on the first screen */
.lead-hero .lead-actions {
  display: none !important;
}

.lead-actions {
  display: flex;
  gap: 10px;
  margin-top: 18px !important;
}

.lead-check-in,
.lead-log {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 52px;
  border-radius: 16px;
  font-size: 16px;
  font-weight: 700;
}

.lead-check-in {
  flex: 1;
  background: var(--primary);
  color: var(--on-primary);
}

.lead-log {
  padding: 0 18px;
  background: var(--primary-soft);
  color: var(--primary);
}

/* The join form: one field, one button. site.js swaps it for .joined in the same place */
.join-slot {
  width: 100%;
  max-width: 480px;
}

.join label {
  display: block;
  margin-bottom: 4px;
  font-size: 14px;
  font-weight: 700;
}

/* Shown only without the script (inside <noscript>): which phone, so the right invite is sent */
.join-phone {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
  margin: 12px 0 0;
  padding: 0;
  border: 0;
}

.join-phone legend {
  padding: 0;
  margin-bottom: 4px;
  font-size: 14px;
  font-weight: 700;
}

.join-phone label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  margin: 0;
  font-size: 16px;
  font-weight: 500;
}

.join-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
}

.join input[type="email"] {
  width: 100%;
  min-height: 52px;
  padding: 0 16px;
  border: 2px solid var(--control-border);
  border-radius: var(--radius-button);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 17px;
}

.join input[type="email"]::placeholder {
  color: var(--text-secondary);
}

.join input[type="email"]:focus-visible {
  border-color: var(--primary);
  border-radius: var(--radius-button);
}

.join input[aria-invalid="true"] {
  border-color: var(--danger);
}

.join-error {
  margin: -4px 0 0;
  color: var(--danger);
  font-size: 14px;
  font-weight: 700;
}

.join .button {
  width: 100%;
}

/* A field people can't see: anything typed here is a bot */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.joined {
  padding: 14px 16px;
  border-radius: var(--radius-button);
  background: var(--surface);
  box-shadow: inset 0 0 0 2px var(--primary);
  animation: joined-in 200ms ease-out;
}

.joined:focus-visible {
  border-radius: var(--radius-button);
}

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

.joined-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 4px;
  font-size: 17px;
  font-weight: 800;
}

.joined-title::before {
  content: "";
  width: 12px;
  height: 7px;
  margin: -3px 2px 0;
  border-left: 2.5px solid var(--money-in);
  border-bottom: 2.5px solid var(--money-in);
  transform: rotate(-45deg);
}

.joined .join-error {
  margin: 8px 0 0;
}

.joined-body {
  margin: 0;
  color: var(--text-secondary);
  font-size: 15px;
  overflow-wrap: anywhere;
}

.joined-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0 20px;
  margin: 4px 0 -8px;
  font-size: 14px;
}

.joined-choices {
  display: flex;
  gap: 8px;
  margin: 12px 0 0;
}

.joined-choices .button {
  flex: 1;
}

.text-button {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--primary);
  font: inherit;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.text-button:disabled {
  opacity: 0.6;
}

/* At launch: the store for this phone is the button, the other a link; a computer gets both */
.stores {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.stores .store {
  flex: 1 1 200px;
}

.on-ios .store-android,
.on-android .store-ios {
  flex-basis: 100%;
  order: 2;
  min-height: 44px;
  background: none;
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* The way down to the first chapter, at the foot of the first screen */
.cue {
  display: flex;
  align-items: center;
  align-self: stretch;
  gap: 6px;
  min-height: 44px;
  margin-top: 8px;
  border-top: 1px solid var(--separator);
  color: var(--primary);
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
}

@media (min-width: 700px) {
  .hero {
    padding-top: 40px;
    text-align: center;
  }

  .hero h1 {
    margin-bottom: 12px;
  }

  .what {
    margin-bottom: 28px;
    font-size: 19px;
  }

  .join-slot {
    text-align: left;
  }

  .hero .fineprint {
    text-align: center;
  }

  /* Shown only without the script (inside <noscript>): which phone, so the right invite is sent */
.join-phone {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
  margin: 12px 0 0;
  padding: 0;
  border: 0;
}

.join-phone legend {
  padding: 0;
  margin-bottom: 4px;
  font-size: 14px;
  font-weight: 700;
}

.join-phone label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  margin: 0;
  font-size: 16px;
  font-weight: 500;
}

.join-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .join-row .join-error {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .join .button {
    width: auto;
  }

  .cue {
    justify-content: center;
    margin-top: 32px;
    padding-top: 8px;
  }

  .join-slot {
    max-width: 560px;
  }

  .lead-hero {
    max-width: 520px;
    padding: 24px 28px 28px;
  }

  .lead-hero .lead-amount {
    font-size: 96px;
  }
}

.stamp {
  margin: 0 0 12px;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.stamp b {
  color: var(--text);
  font-weight: 800;
}

.streak {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 12px;
  border-radius: 14px;
  box-shadow: inset 0 0 0 1.5px var(--control-border);
  font-size: 13px;
  font-weight: 700;
}

.streak {
  transition: background-color 300ms ease-out, box-shadow 300ms ease-out;
}

.streak-on {
  background: var(--spark);
  color: var(--ink);
  box-shadow: none;
}

.card-ui,
.sheet {
  border-radius: var(--radius-card);
  background: var(--surface);
}

.mini-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.mini-link {
  color: var(--primary);
  font-size: 15px;
  font-weight: 700;
}

.mini-title small,
.sheet-title small {
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
}

.row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  margin: 0;
  font-size: 14px;
}

.tile {
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 11px;
}

.tile-coffee { background: #F4DCC8; }
.tile-food { background: #D3EDDF; }
.tile-transit { background: #DCDDF5; }
.tile-gas { background: #F4E3B5; }

@media (prefers-color-scheme: dark) {
  .tile-coffee { background: #5A3A22; }
  .tile-food { background: #17443A; }
  .tile-transit { background: #2D3270; }
  .tile-gas { background: #4A3811; }
}

.row-name {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
  font-weight: 700;
  line-height: 1.3;
}

.row-name small {
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 500;
}

.row-amount {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* Chapters */
.chapter,
.chapter-wide {
  padding-top: 96px;
}

.chapter {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  align-items: center;
  gap: 64px;
}

.chapter-flip .chapter-copy {
  order: 2;
}

/* The page's clock: each chapter is a time of the same Thursday, and the closer the next Monday */
.clock {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 12px;
  margin: 0 0 16px;
  color: var(--primary);
  font-size: clamp(48px, 5.4vw, 76px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.045em;
  font-variant-numeric: tabular-nums;
}

.clock small {
  color: var(--text-secondary);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0;
}

.band .clock {
  color: #FFFFFF;
}

.band .clock small {
  color: #D7D8FF;
}

.chapter-copy h2,
.privacy h2,
.prices h2,
.questions h2,
.closer h2 {
  margin: 0 0 16px;
  font-size: clamp(30px, 3.4vw, 44px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.chapter-copy p:not(.stamp) {
  max-width: 30em;
  margin: 0;
  color: var(--text-secondary);
}

.chapter-copy-wide {
  max-width: 640px;
  margin-bottom: 40px;
}

/* The check-in sheet */
.panel {
  padding: 40px;
  border-radius: 28px;
  background: var(--surface-raised);
}

.sheet {
  max-width: 420px;
  margin: 0 auto;
  padding: 20px;
  box-shadow: 0 24px 48px -24px rgba(var(--shadow), 0.3);
}

.sheet-title {
  display: flex;
  flex-direction: column;
  margin: 0 0 12px;
  font-size: 20px;
  font-weight: 800;
}

.q {
  padding: 4px 0;
  border-top: 1px solid var(--separator);
}

.q-done .row-name {
  color: var(--text-secondary);
}

.answer {
  margin: 0 0 8px 44px;
  color: var(--money-in);
  font-size: 13px;
  font-weight: 700;
}

.tick {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  margin-left: auto;
  border-radius: 50%;
  background: var(--primary);
}

.tick::after {
  content: "";
  width: 12px;
  height: 7px;
  margin-top: -3px;
  border-left: 2.5px solid var(--on-primary);
  border-bottom: 2.5px solid var(--on-primary);
  transform: rotate(-45deg);
}

.sheet-button {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 52px;
  margin: 12px 0 0;
  border-radius: var(--radius-button);
  background: var(--primary);
  color: var(--on-primary);
  font-weight: 700;
}

/* This week's spending money: the one colour ground on the page, the app's hero indigo */
.band {
  margin-top: 96px;
  padding-bottom: 96px;
  background: linear-gradient(160deg, var(--hero), var(--hero-end));
  color: #FFFFFF;
}

.band .stamp,
.band .chapter-copy p:not(.stamp) {
  color: #D7D8FF;
}

.band .stamp b {
  color: #FFFFFF;
}

.sum {
  padding: 24px;
  border-radius: var(--radius-card);
  background: #FFFFFF;
  color: #16172B;
  box-shadow: 0 32px 64px -32px rgba(0, 0, 0, 0.45);
}

.sum-title {
  margin: 0 0 12px;
  font-size: 17px;
  font-weight: 800;
}

.line {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin: 0;
  padding: 8px 0;
  color: #565870;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}

.line span:last-child {
  color: #16172B;
  font-weight: 700;
}

.line-total {
  border-top: 1px solid #E3E2DC;
  color: #16172B;
  font-weight: 700;
}

.line-result {
  margin-top: 4px;
  padding: 12px 16px;
  border-radius: 12px;
  background: #ECECFA;
  color: #16172B;
  font-weight: 800;
}

.line-result span:last-child {
  color: #3438B5;
  font-size: 20px;
  font-weight: 800;
}

/* Bills and subscriptions: two unequal panels */
.pair {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 16px;
}

.card-ui {
  padding: 24px;
  box-shadow: 0 0 0 1px var(--separator);
}

.card-ui .row + .row {
  border-top: 1px solid var(--separator);
}

/* Coming up (coming-up-card.tsx): the day on its own, the merchant's tile, Bill or Subscription */
.date-col {
  display: flex;
  flex: none;
  flex-direction: column;
  align-items: center;
  width: 32px;
  padding: 10px 0;
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  text-transform: uppercase;
}

.date-col b {
  color: var(--text);
  font-size: 18px;
  font-weight: 800;
}

.logo {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  color: #FFFFFF;
  font-size: 15px;
  font-weight: 800;
}

/* Tile hues (tokens.ts TileHues): never rose, so nothing reads as over */
.logo-1 { background: #1667A8; }
.logo-2 { background: #0E7480; }
.logo-3 { background: #11775A; }
.logo-4 { background: #8A3BA8; }

.card-ui .row-amount {
  font-size: 16px;
}

/* Needs you: a question is a plain row that opens what it's about */
.notice-row {
  align-items: flex-start;
  padding-top: 8px;
}

.notice-row .row-name {
  font-size: 16px;
}

.notice-row .row-name small {
  margin-top: 2px;
  font-size: 14px;
  line-height: 1.4;
}

.chevron {
  align-self: center;
  color: var(--text-secondary);
  font-size: 22px;
  font-weight: 700;
}

/* The five tabs, in the tab bar's order, Dashboard in the middle as the bar's round button */
.tabs-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 961px) and (max-width: 1199px) {
  .tabs-grid .tab-home {
    grid-column: 1 / -1;
    order: -1;
  }
}

@media (min-width: 1200px) {
  .tabs-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

.tabs-grid li {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 20px;
  border-radius: var(--radius-card);
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--separator);
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.45;
}

.tabs-grid p {
  margin: 0;
}

.tab-name {
  margin: 0;
  color: var(--text);
  font-size: 17px;
  font-weight: 700;
}

.tab-glyph {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-bottom: 8px;
  border-radius: 50%;
  background: var(--primary-soft);
}

.tab-glyph svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: var(--primary);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tab-home .tab-glyph {
  background: var(--primary);
}

.tab-home .tab-glyph svg {
  stroke: var(--on-primary);
}

.card-notice {
  display: flex;
  flex-direction: column;
}

/* Privacy: calm, on the page itself */
.privacy {
  padding-top: 96px;
}

.privacy-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px 32px;
}

.privacy-head .clock {
  flex-basis: 100%;
}

.privacy-head h2 {
  margin: 0;
}

.promises {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px 32px;
  font-size: 15px;
  margin: 32px 0;
  padding: 0;
  color: var(--text-secondary);
  list-style: none;
}

.promises li {
  padding-top: 16px;
  border-top: 1px solid var(--separator);
}

.promises strong {
  display: block;
  margin-bottom: 4px;
  color: var(--text);
  font-size: 18px;
  font-weight: 800;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  font-weight: 700;
}

/* Closing */
.closer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 64px;
  padding-top: 112px;
}

.screen-tomorrow {
  width: 340px;
  margin-right: 48px;
  box-shadow: 0 0 0 1px var(--separator), 0 32px 64px -32px rgba(var(--shadow), 0.35);
  transform: rotate(2deg);
}

.closer-copy p:not(.clock):not(.fineprint) {
  max-width: 34em;
  margin: 0 0 32px;
  color: var(--text-secondary);
  font-size: 18px;
}

.home .site-footer {
  margin-top: 112px;
}

@media (max-width: 960px) {
  .tabs-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tab-home {
    grid-column: 1 / -1;
    order: -1;
  }

  .chapter,
  .why,
  .closer {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .chapter-flip .chapter-copy {
    order: 0;
  }

  .pair {
    grid-template-columns: 1fr;
  }

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

  .screen-tomorrow {
    order: -1;
    justify-self: center;
    margin-right: 0;
  }
}

@media (max-width: 520px) {
  /* The first screen has to fit above Safari's toolbars (about 664px) down to the 7:40 cue */
  .home .site-header .wrap {
    min-height: 56px;
  }

  .hero {
    padding-top: 8px;
  }

  .hero h1 {
    margin-bottom: 6px;
  }

  .what {
    margin-bottom: 12px;
  }

  .lead-hero {
    margin-bottom: 12px;
    padding: 14px 16px 16px;
  }

  .lead-hero .lead-head {
    margin-bottom: 10px !important;
  }

  .lead-hero .lead-amount {
    font-size: 60px;
  }

  /* The first screen keeps the form in view: the number and its bar only; the check-in is the next chapter */
  .lead-hero .pace-row,
  .lead-hero .lead-title small {
    display: none;
  }

  .lead-hero .lead-title {
    font-size: 22px;
  }

  .lead-hero .tick-bar {
    margin-bottom: 22px !important;
  }

  .days {
    gap: 4px;
  }

  .days li::before {
    width: 22px;
    height: 22px;
  }

  

  

  .panel {
    padding: 16px;
  }

  .sheet,
  .card-ui,
  .sum {
    padding: 16px;
  }

  

  .promises {
    grid-template-columns: 1fr;
    gap: 20px;
    margin: 24px 0 0;
    font-size: 15px;
  }

  .promises strong {
    font-size: 17px;
  }

  .site-footer .wrap,
  .site-footer nav {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .chapter,
  .chapter-wide,
  .why,
  .prices,
  .questions,
  .privacy {
    padding-top: 72px;
  }

  .band {
    margin-top: 72px;
    padding-bottom: 72px;
  }

  .closer {
    padding-top: 80px;
  }

  .screen-tomorrow {
    width: 100%;
    transform: none;
  }

  .tabs-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .tabs-grid li {
    display: grid;
    grid-template-columns: 40px 1fr;
    column-gap: 14px;
    padding: 14px 16px;
  }

  .tab-glyph {
    grid-row: 1 / span 2;
    width: 40px;
    height: 40px;
    margin: 0;
  }
}

/* The check-in you can try: each purchase is a button, and the third one moves the streak */
.demo .sheet-title {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  column-gap: 12px;
}

.demo .sheet-title small {
  grid-column: 1;
}

.demo .sheet-title .streak {
  grid-column: 2;
  grid-row: 1 / span 2;
}

.q-btn {
  display: block;
  width: 100%;
  padding: 4px 0;
  border: 0;
  border-top: 1px solid var(--separator);
  border-radius: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.q-btn .row {
  min-height: 56px;
}

.q-btn .tick {
  flex: none;
  margin-left: 0;
  background: transparent;
  box-shadow: inset 0 0 0 2px var(--control-border);
  transition: background-color 150ms ease-out, box-shadow 150ms ease-out, transform 150ms ease-out;
}

.q-btn .tick::after {
  opacity: 0;
  transition: opacity 150ms ease-out;
}

.q-btn[aria-pressed="true"] {
  cursor: default;
}

.q-btn[aria-pressed="true"] .tick {
  background: var(--primary);
  box-shadow: none;
}

.q-btn[aria-pressed="true"] .tick::after {
  opacity: 1;
}

.q-btn[aria-pressed="true"] .row-name {
  color: var(--text-secondary);
}

.q-btn.q-next .tick {
  box-shadow: inset 0 0 0 2.5px var(--primary);
}

.js .q-btn.q-next .row-amount::after {
  content: "Looks right?";
  display: block;
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
  text-align: right;
}

@media (hover: hover) {
  .q-btn:hover {
    background: var(--surface-raised);
  }
}

.q-btn:active .tick {
  transform: scale(0.92);
}

.demo-receipt {
  margin-top: 12px;
  padding: 14px 16px;
  border-radius: var(--radius-button);
  background: var(--primary-soft);
  animation: joined-in 200ms ease-out;
}

.demo-receipt[hidden] {
  display: none;
}

.demo-receipt p {
  margin: 0;
  font-size: 15px;
}

.demo-receipt b {
  display: block;
  font-size: 16px;
}

.demo-receipt .button {
  width: 100%;
  margin-top: 12px;
}

.demo-receipt .text-button {
  width: 100%;
  justify-content: center;
  font-size: 14px;
}

/* Why it costs money: the same sum, on the page */
.why {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  align-items: center;
  gap: 64px;
  padding-top: 96px;
}

.sum-plain {
  box-shadow: 0 0 0 1px var(--separator);
}

.sum-plain .line-result span:last-child {
  font-size: 17px;
}

/* Prices: one plan, Plus, its price printed */
.prices,
.questions {
  padding-top: 96px;
}

.plans {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 32px;
}

.plans-one {
  grid-template-columns: minmax(0, 480px);
}

.plan {
  padding: 24px;
  border-radius: var(--radius-card);
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--separator);
}

.plan-pick {
  box-shadow: 0 0 0 2px var(--primary);
}

.plan h3 {
  margin: 0;
  color: var(--text-secondary);
  font-size: 15px;
  font-weight: 700;
}

.plan-pick h3 {
  color: var(--primary);
}

.plan-price {
  text-wrap: balance;
  margin: 4px 0;
  font-size: 22px;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.plan-note {
  margin: 0 0 16px;
  color: var(--text-secondary);
  font-size: 15px;
}

.plan-note strong {
  display: block;
  color: var(--text);
}

.plan ul {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 15px;
}

.plan li {
  padding: 10px 0;
  border-top: 1px solid var(--separator);
}

.plans-both {
  margin: 24px 0 4px;
  font-weight: 700;
}

.plans-note {
  margin: 0 0 24px;
  color: var(--text-secondary);
}

/* Questions */
.faq {
  max-width: 760px;
  margin-top: 16px;
}

.faq details {
  border-bottom: 1px solid var(--separator);
}

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 60px;
  padding: 8px 0;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
  list-style: none;
  cursor: pointer;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  flex: none;
  color: var(--primary);
  font-size: 24px;
  font-weight: 500;
  line-height: 1;
}

.faq details[open] summary::after {
  content: "−";
}

.faq details p {
  max-width: 40em;
  margin: 0 0 20px;
  color: var(--text-secondary);
}

.closer h2 {
  margin-bottom: 24px;
}

/* Chapters rise once as they come into view (site.js); never under Reduce Motion. They only move:
   faded, their text would be under 4.5:1 for as long as it took to come in */
.reveals .reveal {
  transform: translateY(12px);
  transition: transform 280ms ease-out;
}

.reveals .reveal.is-seen {
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .joined,
  .demo-receipt {
    animation: none;
  }

  .streak,
  .q-btn .tick,
  .q-btn .tick::after {
    transition: none;
  }
}

@media (max-width: 960px) {
  .why {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

@media (max-width: 640px) {
  .plans {
    grid-template-columns: 1fr;
  }
}

/*
 * Phone-only and computer-only lines (week-review.html), by the kind of screen rather than a script:
 * the site's CSP allows none. A touch screen without hover is a phone or tablet.
 */
.phone-only {
  display: none;
}

@media (hover: none) and (pointer: coarse) {
  .phone-only {
    display: block;
  }

  .desktop-only {
    display: none;
  }
}

/* Policy pages */
.doc {
  max-width: 760px;
  padding-top: 48px;
}

.doc h1 {
  margin: 0 0 4px;
  font-size: clamp(30px, 5vw, 40px);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.doc .updated {
  margin: 0 0 32px;
  color: var(--text-secondary);
}

.doc h2 {
  margin: 48px 0 12px;
  padding-top: 8px;
  font-size: 24px;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.doc h3 {
  margin: 32px 0 8px;
  font-size: 19px;
}

.doc li + li {
  margin-top: 8px;
}

.summary {
  margin: 24px 0;
  padding: 20px 24px;
  border-left: 4px solid var(--primary);
  border-radius: 12px;
  background: var(--surface);
}

.summary ul {
  margin: 8px 0 0;
  padding-left: 20px;
}

.toc {
  padding: 20px 24px;
  border-radius: 12px;
  background: var(--surface);
  font-size: 15px;
}

.toc ol {
  margin: 8px 0 0;
  padding-left: 24px;
  columns: 2 220px;
}

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

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border-radius: 12px;
  overflow: hidden;
  font-size: 15px;
}

th,
td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--separator);
  text-align: left;
  vertical-align: top;
}

tr:last-child td {
  border-bottom: none;
}

th {
  background: var(--primary-soft);
}
