/* Enzo's dashboard: warm "morning note" look.
   Paper + ink palette, one green accent, clay for things that need attention.
   Serif (Apple's New York on iPhone) for the voice; system sans for small print. */
:root {
  --paper: #f6f1e9; --raised: #fffdf8; --ink: #2b2620; --muted: #7a6f63; --faint: #a89c8e;
  --line: #e6dccd; --accent: #46694b; --accent-soft: #e2eadd; --clay: #b2582f; --clay-soft: #f6e5d9;
  --sand: #dccdb8; --work: #8b78a8;
  --serif: ui-serif, "New York", "Iowan Old Style", "Palatino Linotype", Palatino, P052, Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", "Segoe UI", sans-serif;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #1c1915; --raised: #25211c; --ink: #efe6d8; --muted: #a99c8b; --faint: #7d7165;
    --line: #362f28; --accent: #93b896; --accent-soft: #2b382c; --clay: #e39a6e; --clay-soft: #3b2b21;
    --sand: #51473c; --work: #b3a2d1;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--paper); color: var(--ink); }
body {
  font: 16px/1.45 var(--sans);
  -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: 100%;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}
main { max-width: 720px; margin: 0 auto; padding: 10px 22px 36px; }
p { margin: 6px 0; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.center { text-align: center; }
.pad { padding: 48px 0; }
.num, .money { font-variant-numeric: tabular-nums; }
.good { color: var(--accent); } .warn, .bad { color: var(--clay); }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

/* ---------- header: the morning note */
.top { padding: 4px 0 20px; }
.topline { display: flex; justify-content: space-between; align-items: center; gap: 8px; color: var(--muted); font-size: 14px; }
.tools { display: flex; gap: 2px; margin-right: -8px; }
.quiet { background: none; border: 0; color: var(--muted); font-size: 14px; padding: 10px 8px; min-height: 44px; cursor: pointer; }
.quiet:active { color: var(--ink); }
.top h1 { font-family: var(--serif); font-size: 34px; font-weight: 600; line-height: 1.12; letter-spacing: -0.4px; margin: 8px 0 12px; }
.brief { font-family: var(--serif); font-size: 19px; line-height: 1.55; margin: 0; text-wrap: pretty; }
.brief .money { font-weight: 600; }

.note { display: flex; gap: 10px; align-items: baseline; padding: 11px 14px; border-radius: 14px;
  background: var(--clay-soft); font-size: 15px; margin: 10px 0; }
.note > .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--clay); flex: none; transform: translateY(-1px); }
.note.warn, .note.bad { color: var(--ink); }
.note.info { background: var(--accent-soft); display: block; }
.note.info .btn { margin: 12px 0 4px; }

/* ---------- sections */
.block { border-top: 1px solid var(--line); padding: 22px 0 18px; }
.block h2 { font-family: var(--serif); font-size: 23px; font-weight: 600; letter-spacing: -0.2px; margin: 0 0 10px; }
.block h3 { font-family: var(--serif); font-size: 17px; font-weight: 600; margin: 18px 0 2px; }
.kicker { color: var(--muted); font-size: 14px; margin: -6px 0 10px; }
.lead { font-family: var(--serif); font-size: 36px; font-weight: 500; letter-spacing: -0.5px; line-height: 1.15; }
.lead-sub { color: var(--muted); font-size: 14px; margin: 2px 0 8px; }
.pair { display: grid; }
@media (min-width: 720px) { .pair { grid-template-columns: 1fr 1fr; column-gap: 40px; } }

.row { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; padding: 11px 0; border-top: 1px solid var(--line); }
.rows > .row:first-child { border-top: 0; }
.row .l { min-width: 0; }
.row .r { text-align: right; white-space: nowrap; }
.sub { font-size: 13.5px; color: var(--muted); }
.sub.warn { color: var(--clay); }
.strong { font-weight: 600; }

/* calendar */
.day { margin-top: 14px; }
.day:first-of-type { margin-top: 0; }
.day h3 { margin: 0 0 2px; }
.ev { display: grid; grid-template-columns: 78px 1fr; gap: 12px; padding: 7px 0; }
.ev .t { color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; padding-top: 1px; white-space: nowrap; }
.ev .title { font-size: 16px; }
.ev .meta { display: flex; align-items: center; gap: 6px; font-size: 13.5px; color: var(--muted); flex-wrap: wrap; }
.cal-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--faint); flex: none; }
.cal-dot.Work { background: var(--work); }
.cal-dot.Personal { background: var(--accent); }
.empty { color: var(--muted); font-size: 15px; font-style: italic; font-family: var(--serif); padding: 4px 0; }

/* taxes timeline */
.timeline { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); margin: 16px 0 12px; }
.timeline::before { content: ""; position: absolute; left: 12.5%; right: 12.5%; top: 6px; height: 2px; background: var(--line); }
.tl { position: relative; text-align: center; font-size: 13px; color: var(--muted); }
.tl .pip { display: block; width: 14px; height: 14px; border-radius: 50%; margin: 0 auto 6px;
  background: var(--paper); border: 2px solid var(--faint); }
.tl.paid .pip { background: var(--accent); border-color: var(--accent); }
.tl.late .pip { background: var(--clay); border-color: var(--clay); }
.tl b { display: block; color: var(--ink); font-size: 14px; font-weight: 600; }

/* spending */
.legend { display: flex; gap: 16px; font-size: 13px; color: var(--muted); margin: 10px 0 2px; }
.sw { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; background: var(--accent); }
.sw.prev { background: var(--sand); }
.cat { padding: 9px 0 6px; border-top: 1px solid var(--line); }
.cats > .cat:first-child { border-top: 0; }
.cat .h { display: flex; justify-content: space-between; gap: 12px; font-size: 15.5px; }
.bars { display: grid; gap: 3px; margin-top: 6px; }
.bar { height: 6px; border-radius: 3px; }
.bar > span { display: block; height: 100%; border-radius: 3px; background: var(--accent); }
.bar.prev > span { background: var(--sand); }

/* footer */
.foot { border-top: 1px solid var(--line); margin-top: 6px; padding: 14px 0 0; display: flex; justify-content: space-between;
  align-items: center; gap: 12px; color: var(--muted); font-size: 13px; }

/* ---------- sign-in screens */
.auth { max-width: 400px; margin: 11vh auto 0; }
.auth h1 { font-family: var(--serif); font-size: 34px; font-weight: 600; letter-spacing: -0.4px; margin: 0 0 6px; }
.auth .lede { font-family: var(--serif); font-size: 18px; color: var(--muted); margin-bottom: 18px; }
label { display: block; font-size: 14px; color: var(--muted); margin: 16px 0 6px; }
input[type=password], input[type=text] {
  width: 100%; font: inherit; font-size: 17px; padding: 13px 15px; border-radius: 14px;
  border: 1px solid var(--line); background: var(--raised); color: var(--ink);
}
input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.btn { display: block; width: 100%; font-size: 17px; font-weight: 600; padding: 15px; margin: 18px 0 8px;
  border-radius: 999px; border: 0; background: var(--ink); color: var(--paper); cursor: pointer; min-height: 50px; }
.btn.secondary { background: transparent; border: 1px solid var(--line); color: var(--ink); font-weight: 500; }
.btn:disabled { opacity: 0.5; }
.link { background: none; border: 0; color: var(--accent); padding: 10px 0; min-height: 44px; cursor: pointer; }
.msg { min-height: 22px; font-size: 14px; margin-top: 8px; }
.msg.bad { color: var(--clay); } .msg.good { color: var(--accent); }
.hidden-user { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

body.hide-amounts .money { filter: blur(7px); }

@media (prefers-reduced-motion: no-preference) {
  .fade-in { animation: fade-in 0.35s ease-out both; }
  @keyframes fade-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
}
