/*
 * Doughcast website. The same "Ivory & Ink" look as the app: warm ivory and ink in light mode,
 * near-black and champagne gold in dark mode (follows the visitor's system setting).
 * Headings use DM Serif Display (bundled, OFL); body text uses the system font.
 */

@font-face {
  font-family: "DM Serif Display";
  src: url("fonts/dm-serif-display-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "DM Serif Display";
  src: url("fonts/dm-serif-display-latin-400-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

:root {
  color-scheme: light dark;
  --bg: #f6f2e9;
  --surface: #fffdf8;
  --surface-2: #f8f4eb;
  --dayhead: #f4eee3;
  --line: rgb(27 34 48 / 0.1);
  --line-strong: rgb(27 34 48 / 0.18);
  --ink: #1b2230;
  --ink-2: #4a505c;
  --ink-3: #575c65;
  --primary: #1f2633;
  --on-primary: #f6ebd2;
  --gold: #a47e3b;
  --gold-text: #6b4f1d;
  --gold-soft: #f1e7cf;
  --shadow: rgb(27 34 48 / 0.35);
  --strike: rgb(161 48 42 / 0.7);
  --band: #1b2230;
  --band-ink: #f3ecdd;
  --band-ink-2: #c3c8d2;
  --band-gold: #d4b06b;
  --income: #1c6a41;
  --income-ink: #175a37;
  --income-soft: #d6ebdd;
  --expense: #a1302a;
  --expense-ink: #8f2620;
  --expense-soft: #f6dad5;
  --hypo: #6d4f86;
  --caution: #b07a1e;
  --caution-soft: rgb(203 150 52 / 0.2);
  --crit-soft: rgb(176 50 43 / 0.13);
  --track: #c9c3b6;
  --serif: "DM Serif Display", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101318;
    --surface: #171c24;
    --surface-2: #13171e;
    --dayhead: #1a1f27;
    --line: rgb(238 231 216 / 0.08);
    --line-strong: rgb(238 231 216 / 0.16);
    --ink: #eee7d8;
    --ink-2: #b9bfcb;
    --ink-3: #959cab;
    --primary: #d4b06b;
    --on-primary: #16120a;
    --gold: #d4b06b;
    --gold-text: #e2c483;
    --gold-soft: rgb(212 176 107 / 0.13);
    --shadow: rgb(0 0 0 / 0.7);
    --strike: rgb(243 167 157 / 0.75);
    --band: #1a2029;
    --income: #86d8a4;
    --income-ink: #9fe2b6;
    --income-soft: #12301f;
    --expense: #f3a79d;
    --expense-ink: #f6b8af;
    --expense-soft: #3a1c22;
    --hypo: #c8a8e6;
    --caution: #e6bd66;
    --caution-soft: rgb(230 189 102 / 0.16);
    --crit-soft: rgb(243 167 157 / 0.16);
    --track: #3a414d;
  }
}

*,
*::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-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img {
  max-width: 100%;
  height: auto;
  display: block;
}
a {
  color: inherit;
}
:focus-visible {
  outline: 2.5px solid var(--gold);
  outline-offset: 3px;
  border-radius: 6px;
}
h1,
h2,
h3 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
}
p {
  margin: 0;
}
em {
  color: var(--gold-text);
}
.skip {
  position: absolute;
  left: -999px;
  top: 8px;
  padding: 8px 14px;
  border-radius: 8px;
  background: var(--primary);
  color: var(--on-primary);
  z-index: 10;
}
.skip:focus {
  left: 12px;
}

/* Layout */
.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}
.narrow {
  max-width: 820px;
  margin: 0 auto;
  padding: 0 24px;
}
.section {
  padding-top: clamp(88px, 12vw, 140px);
}
.eyebrow {
  display: block;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-text);
}
.lede {
  font-size: 19px;
  color: var(--ink-2);
}
.h-xl {
  font-size: clamp(54px, 10vw, 136px);
  line-height: 0.95;
  letter-spacing: -0.02em;
}
.h-lg {
  font-size: clamp(38px, 5vw, 62px);
  line-height: 1.04;
}
.h-md {
  font-size: clamp(36px, 4.6vw, 56px);
  line-height: 1.04;
}
.split {
  display: flex;
  flex-wrap: wrap;
  gap: 24px 64px;
  align-items: flex-start;
}
.split > :first-child {
  flex: 1 1 280px;
}
.split > :last-child {
  flex: 2 1 420px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  font-size: 19px;
  color: var(--ink-2);
}
.split strong {
  color: var(--ink);
}

/* Header and footer */
.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 22px;
  padding-bottom: 22px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.brand img {
  width: 34px;
  height: 34px;
  border-radius: 8px;
}
.brand span {
  font-family: var(--serif);
  font-size: 25px;
  line-height: 1;
}
.nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}
.nav a {
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--ink-2);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
}
.nav a:hover {
  color: var(--ink);
  background: var(--gold-soft);
}
.nav a[aria-current="page"] {
  background: var(--gold-soft);
  color: var(--ink);
  font-weight: 600;
}
.nav .nav-cta {
  margin-left: 8px;
  background: var(--primary);
  color: var(--on-primary);
  font-weight: 600;
}
.nav .nav-cta:hover {
  background: var(--primary);
  color: var(--on-primary);
  opacity: 0.92;
}
.site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 64px;
  padding-bottom: 48px;
  font-size: 14px;
  color: var(--ink-3);
}
.site-footer .brand img {
  width: 24px;
  height: 24px;
  border-radius: 6px;
}
.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
}
.site-footer a {
  color: var(--ink-3);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 24px;
  border: 0;
  border-radius: 12px;
  background: var(--primary);
  color: var(--on-primary);
  text-decoration: none;
  font: inherit;
  font-size: 17px;
  font-weight: 600;
}
.btn svg {
  width: 18px;
  height: 18px;
}
.btn[aria-disabled="true"] {
  cursor: default;
}
.link {
  font-weight: 600;
  text-decoration-color: var(--gold);
  text-underline-offset: 5px;
}
.fine {
  font-size: 15px;
  color: var(--ink-3);
}

/* Hero */
.hero {
  display: flex;
  flex-direction: column;
  gap: 26px;
  padding-top: clamp(40px, 6vw, 72px);
}
.hero-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 8px 28px;
}
.aside-note {
  display: inline-block;
  transform: rotate(-4deg);
  margin-bottom: 14px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 24px;
  color: var(--gold-text);
}
.hero-sub {
  max-width: 880px;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(26px, 3.2vw, 40px);
  line-height: 1.2;
  color: var(--ink-2);
}
.cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
  padding-top: 4px;
}

/* App screenshot in a Mac window */
.window {
  margin-top: 40px;
  border-radius: 14px;
  overflow: hidden;
  background: var(--bg);
  box-shadow: 0 0 0 1px var(--line), 0 40px 90px -30px var(--shadow), 0 12px 30px -16px var(--shadow);
}
.window-bar {
  display: flex;
  gap: 8px;
  padding: 12px 16px 4px;
}
.window-bar span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ff5f57;
}
.window-bar span:nth-child(2) {
  background: #febc2e;
}
.window-bar span:nth-child(3) {
  background: #28c840;
}

/* The advice */
.struck {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-family: var(--serif);
  font-size: clamp(32px, 4.6vw, 54px);
  line-height: 1.12;
  color: var(--ink-3);
}
.struck li {
  text-decoration: line-through;
  text-decoration-color: var(--strike);
  text-decoration-thickness: 3px;
}
.prose {
  display: flex;
  flex-direction: column;
  gap: 26px;
}
.prose p {
  font-size: 20px;
}
.pull {
  margin: 28px 0;
  padding-left: 28px;
  box-shadow: inset 3px 0 0 var(--gold);
  font-family: var(--serif);
  font-size: clamp(32px, 4.4vw, 50px);
  line-height: 1.12;
}

/* Live demo */
.demo {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: flex-start;
  margin-top: 26px;
}
.demo-cal {
  flex: 3 1 620px;
  min-width: 0;
  overflow-x: auto;
  border-radius: 16px;
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--line), 0 24px 60px -30px var(--shadow);
}
.demo-cal-inner {
  min-width: 600px;
}
.demo-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px 12px;
}
.demo-month {
  font-family: var(--serif);
  font-size: 26px;
  line-height: 1;
}
.demo-month span {
  color: var(--gold-text);
}
.legend {
  display: flex;
  gap: 14px;
  font-size: 12.5px;
  color: var(--ink-3);
}
.legend span {
  display: flex;
  align-items: center;
  gap: 6px;
}
.legend i {
  width: 10px;
  height: 10px;
  border-radius: 3px;
}
.legend .tight {
  background: var(--caution-soft);
  box-shadow: inset 0 0 0 1px var(--caution);
}
.legend .short {
  background: var(--crit-soft);
  box-shadow: inset 0 0 0 1px var(--expense);
}
.grid7 {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  box-shadow: 0 -1px 0 var(--line);
}
.wd {
  padding: 6px 9px;
  background: var(--surface-2);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--ink-3);
}
.day {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-height: 92px;
  padding-bottom: 6px;
  background: var(--surface);
}
.day-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 25px;
  padding: 0 8px;
  background: var(--dayhead);
  transition: background-color 160ms ease;
}
.day.tight .day-bar {
  background: var(--caution-soft);
}
.day.short .day-bar {
  background: var(--crit-soft);
}
.day-num {
  font-family: var(--serif);
  font-size: 14px;
}
.day-bal {
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--ink-2);
}
.day.short .day-bal {
  color: var(--expense-ink);
}
/* Day cells are narrow, so a pill puts its name on one line and its amount on the next. */
.pill {
  display: flex;
  flex-direction: column;
  margin: 0 5px;
  padding: 2px 6px 3px;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.3;
}
.pill b {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-weight: 600;
}
.pill i {
  font-style: normal;
  font-variant-numeric: tabular-nums;
}
.pill.out {
  background: var(--expense-soft);
  color: var(--expense-ink);
}
.pill.in {
  background: var(--income-soft);
  color: var(--income-ink);
}
.pill.expected {
  background: var(--surface);
  color: var(--income-ink);
  box-shadow: inset 0 0 0 1px var(--income);
}
.pill.whatif {
  background: var(--surface);
  color: var(--hypo);
  box-shadow: inset 0 0 0 1px var(--hypo);
}
.pill.more {
  color: var(--ink-3);
}
.demo-side {
  flex: 1 1 300px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.card {
  border-radius: 16px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
}
.slider {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 20px;
}
.slider label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 15px;
  font-weight: 600;
}
.slider output {
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 400;
}
.slider input {
  width: 100%;
  accent-color: var(--gold);
}
.toggles {
  display: flex;
  flex-direction: column;
  padding: 6px 0;
}
.toggle {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 56px;
  padding: 8px 20px;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.toggle:hover {
  background: var(--surface-2);
}
.toggle span:first-child {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.toggle strong {
  font-size: 15.5px;
}
.toggle small {
  font-size: 13.5px;
  color: var(--ink-3);
}
.switch {
  position: relative;
  flex: 0 0 auto;
  width: 40px;
  height: 24px;
  border-radius: 99px;
  background: var(--track);
  transition: background-color 160ms ease;
}
.switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgb(0 0 0 / 0.3);
  transition: transform 200ms cubic-bezier(0.2, 1.2, 0.35, 1);
}
.toggle[aria-checked="true"] .switch {
  background: var(--gold);
}
.toggle[aria-checked="true"] .switch::after {
  transform: translateX(16px);
}
.verdict {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 20px;
  border-radius: 16px;
  background: var(--gold-soft);
  transition: background-color 160ms ease;
}
.verdict.tight {
  background: var(--caution-soft);
}
.verdict.short {
  background: var(--crit-soft);
}
.stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
}
.stats span {
  display: flex;
  flex-direction: column;
  font-size: 13px;
  color: var(--ink-3);
}
.stats strong {
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 400;
  line-height: 1.1;
  color: var(--ink);
}
.verdict.short #lowest {
  color: var(--expense-ink);
}
.verdict.tight #lowest {
  color: var(--gold-text);
}
.verdict p {
  font-size: 15.5px;
  line-height: 1.45;
}
.verdict .note {
  font-style: italic;
  color: var(--ink-2);
}

/* Feature list */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 44px 40px;
  margin-top: 36px;
}
.features div {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 18px;
  box-shadow: inset 0 1px 0 var(--line-strong);
}
.features h3 {
  font-size: 28px;
  line-height: 1.15;
}
.features p {
  color: var(--ink-2);
}

/* Dark band */
.band {
  padding: clamp(32px, 5vw, 64px);
  border-radius: 24px;
  background: var(--band);
  color: var(--band-ink);
}
.band em {
  color: var(--band-gold);
}
.band .split > :last-child {
  color: var(--band-ink-2);
}

/* Closing call to action */
.closing {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 18px;
  padding: clamp(48px, 7vw, 96px) 24px;
  border-radius: 28px;
  background: var(--gold-soft);
}
.closing img {
  width: 76px;
  height: 76px;
  border-radius: 17px;
}
.closing h2 {
  font-size: clamp(42px, 6.4vw, 84px);
  line-height: 1;
}

/* Pricing */
.toggle-group {
  display: inline-flex;
  gap: 4px;
  margin-top: 12px;
  padding: 4px;
  border-radius: 12px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
}
.toggle-group button {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 18px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--ink-2);
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}
.toggle-group button[aria-pressed="true"] {
  background: var(--primary);
  color: var(--on-primary);
}
.tag {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 99px;
  background: var(--gold-soft);
  color: var(--gold-text);
  font-size: 12.5px;
  font-weight: 600;
}
.plans {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  max-width: 980px;
  margin: 40px auto 0;
}
.plan {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 36px;
  border-radius: 24px;
  background: var(--surface);
  box-shadow: 0 0 0 1.5px var(--gold), 0 30px 60px -30px var(--shadow);
}
.plan.dark {
  background: var(--band);
  color: var(--band-ink);
  box-shadow: none;
}
.plan-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.plan h2 {
  font-family: var(--sans);
  font-size: 20px;
  font-weight: 600;
}
.price {
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.price strong {
  font-family: var(--serif);
  font-size: 64px;
  font-weight: 400;
  line-height: 1;
}
.price span,
.plan .sub {
  font-size: 16px;
  color: var(--ink-3);
}
.plan.dark .price span,
.plan.dark .sub {
  color: var(--band-ink-2);
}
.plan .btn {
  justify-content: center;
}
.plan.dark .btn {
  background: var(--band-gold);
  color: #16120a;
}
.plan.dark .tag {
  background: rgb(212 176 107 / 0.18);
  color: #e2c483;
}
.checks {
  margin: 4px 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.checks li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.checks svg {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin-top: 4px;
  color: var(--gold-text);
}
.plan.dark .checks svg {
  color: var(--band-gold);
}
.checks .soon {
  margin-left: auto;
  flex: 0 0 auto;
  padding: 2px 8px;
  border-radius: 99px;
  background: var(--surface-2);
  box-shadow: inset 0 0 0 1px var(--line);
  color: var(--ink-3);
  font-size: 12.5px;
}
.qa {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px;
  margin-top: 28px;
}
.qa div {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 26px;
}
.qa h3 {
  font-family: var(--sans);
  font-size: 17px;
  font-weight: 600;
}
.qa p {
  font-size: 15.5px;
  color: var(--ink-2);
}

/* Privacy page */
.beliefs {
  display: flex;
  flex-direction: column;
  gap: 22px;
  margin-top: 22px;
}
.beliefs div {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 18px;
  box-shadow: inset 0 1px 0 var(--line-strong);
}
.beliefs h3 {
  font-size: 26px;
  line-height: 1.2;
}
.beliefs p,
.rows p {
  color: var(--ink-2);
}
.rows {
  display: flex;
  flex-direction: column;
  margin-top: 18px;
}
.rows > div {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 22px 24px;
}
.rows > div + div {
  box-shadow: inset 0 1px 0 var(--line);
}
.rows svg {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  margin-top: 3px;
  color: var(--gold-text);
}
.rows h3 {
  font-family: var(--sans);
  font-size: 18px;
  font-weight: 600;
}

/* Legal pages */
.legal {
  padding-top: 48px;
}
.legal h1 {
  font-size: clamp(40px, 6vw, 64px);
  line-height: 1.05;
}
.legal h2 {
  margin-top: 40px;
  font-size: 28px;
}
.legal p,
.legal li {
  margin-top: 12px;
  color: var(--ink-2);
}
.legal ul {
  padding-left: 22px;
}
.legal strong {
  color: var(--ink);
}
.draft {
  margin-top: 20px;
  padding: 14px 18px;
  border-radius: 12px;
  background: var(--caution-soft);
  color: var(--ink);
  font-size: 15px;
}

@media (max-width: 640px) {
  body {
    font-size: 16px;
  }
  .nav {
    width: 100%;
    justify-content: space-between;
  }
  .nav .nav-cta {
    margin-left: 0;
  }
  .aside-note {
    font-size: 20px;
  }
  .plan {
    padding: 26px;
  }
  /* On a phone the demo calendar shows just each day's balance, so the whole week fits. */
  .demo-cal-inner {
    min-width: 0;
  }
  .demo-head {
    flex-wrap: wrap;
  }
  .wd {
    padding: 6px 4px;
    font-size: 9.5px;
    letter-spacing: 0.04em;
  }
  .day {
    min-height: 0;
    padding-bottom: 0;
  }
  .day .pill {
    display: none;
  }
  .day-bar {
    flex-direction: column;
    align-items: flex-start;
    height: auto;
    min-height: 50px;
    padding: 5px 5px 6px;
    gap: 2px;
  }
  .day-bal {
    font-size: 11px;
  }
}
