/*
 * Shared look for both layouts: fonts, colour variables and the five themes.
 * Every colour in phone.css and desk.css reads from these variables, so a theme repaints everything.
 * Pot colours and the good / careful / over colours keep their meaning in every theme.
 */
@font-face { font-family: 'Fraunces'; src: url('../fonts/fraunces-latin-opsz-normal.woff2') format('woff2'); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: 'Manrope'; src: url('../fonts/manrope-latin-wght-normal.woff2') format('woff2'); font-weight: 200 800; font-style: normal; font-display: swap; }

:root {
  --fd: 'Fraunces', Georgia, serif;
  --fb: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;

  /* Blush (default). Pastel edition, 29 Nov 2026: soft hero gradient, dark text, deep accent buttons */
  --bg: #FBF1F1; --bg-2: #FFF8F7; --panel: #FFF8F7; --card: #FFFFFF;
  --ink: #2A1F22; --ink-2: #735F63; --ink-3: #9C8589; --line: #F0DEDC;
  --accent: #B0517A; --accent-d: #86385B; --on-accent: #FFFFFF;
  --hero-1: #FCEAEE; --hero-2: #F7D6DF; --hero-3: #F0C2D0; --hero-ink: #3A1E2B;
  --scrim: rgb(20 17 14 / .45);
  --sh-sm: 0 1px 2px rgb(36 31 26 / .05);
  --sh: 0 2px 4px rgb(36 31 26 / .05), 0 8px 22px rgb(36 31 26 / .06);

  /* pots: colour, soft background, text on the soft background, icon ink on the colour */
  --food: #8FBF9A;   --food-bg: #E6F1E8;   --food-ink: #1F5A3A;   --food-on: #164A2E;
  --fun: #EBA3B4;    --fun-bg: #FBE8ED;    --fun-ink: #8D3A4C;    --fun-on: #6E2335;
  --travel: #A8B8E6; --travel-bg: #E7EDFA; --travel-ink: #2A3F73; --travel-on: #223366;
  --home: #F2C94C;   --home-bg: #F4EDDB;   --home-ink: #6B5717;   --home-on: #5A4718;
  --debt: #BFA6DA;   --debt-bg: #EFE4F6;   --debt-ink: #5A3C7A;   --debt-on: #3C2458;

  /* good / careful / over */
  --good: #2F8B5B; --good-bg: #E4F0E6; --good-ink: #2F6A4A;
  --warn: #BE841F; --warn-bg: #F7ECCF; --warn-ink: #7A5714;
  --over: #C44D40; --over-bg: #F7E0DB; --over-ink: #8A3328;
  --hero-good: linear-gradient(120deg, #E7F2EA, #F4F9F1);
  --hero-warn: linear-gradient(120deg, #F8EFD6, #FCF7E8);
  --hero-over: linear-gradient(120deg, #F8E4DE, #FCEFEB);
  --fresh: rgb(143 191 154 / .38);
  color-scheme: light;
}

/* Lavender */
:root[data-theme='lavender'] {
  --bg: #F4F1FA; --bg-2: #FAF8FD; --panel: #FAF8FD; --line: #E3DDF0;
  --ink: #221F2B; --ink-2: #625D72; --ink-3: #8A849B; --accent: #6D5CC6; --accent-d: #4E3FA0;
  --hero-1: #F2EEFC; --hero-2: #E3DCF8; --hero-3: #D3C9F2; --hero-ink: #272148;
}
/* Mint */
:root[data-theme='mint'] {
  --bg: #EEF6F1; --bg-2: #F7FBF8; --panel: #F7FBF8; --line: #D8E8DE;
  --ink: #1C2621; --ink-2: #59675F; --ink-3: #7E8D84; --accent: #2F8A6E; --accent-d: #1F6A53;
  --hero-1: #E9F7F1; --hero-2: #D3EFE4; --hero-3: #BEE5D6; --hero-ink: #173A30;
}
/* Sage */
:root[data-theme='sage'] {
  --bg: #F1F3EC; --bg-2: #F9FAF5; --panel: #F9FAF5; --line: #DFE4D6;
  --ink: #1F261C; --ink-2: #5E6857; --ink-3: #838C7B; --accent: #557F52; --accent-d: #3D6340;
  --hero-1: #EEF3E8; --hero-2: #DCE8D3; --hero-3: #CBDDC0; --hero-ink: #22331F;
}
/* Latte */
:root[data-theme='latte'] {
  --bg: #F6EFE7; --bg-2: #FDF9F4; --panel: #FDF9F4; --line: #EADFD2;
  --ink: #2A2119; --ink-2: #6E6152; --ink-3: #93826F; --accent: #9A6A45; --accent-d: #77502F;
  --hero-1: #F8EFE5; --hero-2: #EEDDCB; --hero-3: #E3CBB3; --hero-ink: #3A2818;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font-family: var(--fb); -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
button { font: inherit; color: inherit; }
.num { font-variant-numeric: tabular-nums; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 8px; }
[hidden] { display: none !important; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* Which layout shows: the phone one on small screens, the sidebar one on a computer */
.desk { display: none; }
@media (min-width: 1000px) { .desk { display: grid; } .ph { display: none; } }

/* Shown only when the browser can't keep data (private window, storage blocked) */
.nosave { background: var(--warn-bg); color: var(--warn-ink); font-size: .84rem; font-weight: 700; padding: 10px 14px; border-radius: 12px; margin: 0 0 14px; line-height: 1.4; }
.ph .nosave { position: absolute; top: 0; left: 0; right: 0; z-index: 15; border-radius: 0; margin: 0; padding-top: calc(10px + env(safe-area-inset-top)); }
