/* LifeApp. Colours: blue = Guy, orange = Jen, green = both of you. No drop shadows. */
:root {
  --bg: #F6F5F2;
  --card: #FFFFFF;
  --line: #E4E2DC;
  --line-soft: #EEEDE9;
  --ink: #1B1D22;
  --muted: #5D6470;
  --guy: #2563C9;
  --jen: #C2551C;
  --both: #17695A;
  --both-dark: #10392F;
  --both-pale: #A9D8C8;
  --warn-bg: #FDECD9; --warn: #8A3B0E;
  --ok-bg: #DDF0E8; --ok: #0F5444;
  --bad-bg: #FBE1E1; --bad: #9B1C1C;
  --info-bg: #E2EAF8; --info: #1A4A9E;
  --grey-bg: #EEEDE9; --grey: #4A505B;
  --seg: #EAE8E2;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif; color: var(--ink); background: var(--bg); font-size: 15px; line-height: 1.4; }
a { color: var(--both); }
main { max-width: 560px; margin: 0 auto; padding: calc(20px + env(safe-area-inset-top)) 16px 110px; display: flex; flex-direction: column; gap: 12px; }
h1 { margin: 0; font-size: 28px; font-weight: 700; letter-spacing: -0.02em; }
h2 { margin: 0; font-size: 16px; font-weight: 600; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.date { color: var(--muted); font-size: 13px; font-weight: 500; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.card.dark { background: var(--both-dark); border-color: var(--both-dark); color: #FFFFFF; }
.card.dark .lbl { color: var(--both-pale); }
.card.dark .muted { color: #CFE8DF; }
.card.tax { background: #FFF6EC; border-color: #F3D3B0; }
a.card { text-decoration: none; color: inherit; }
.lbl { font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); margin: 0; }
.row { display: flex; align-items: center; gap: 10px; }
.row.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }
.amt { font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
.big { font-size: 32px; font-weight: 700; letter-spacing: -0.02em; }
.lnk { font-size: 13px; font-weight: 600; color: var(--both); text-decoration: none; background: none; border: 0; padding: 0; cursor: pointer; font-family: inherit; }
.list { display: flex; flex-direction: column; }
.list > .ln { padding: 9px 0; border-bottom: 1px solid var(--line-soft); }
.list > .ln:last-child { border-bottom: 0; padding-bottom: 0; }
.list > .ln:first-child { padding-top: 0; }
.ln { display: flex; align-items: center; gap: 10px; font-size: 14px; text-decoration: none; color: inherit; }
.ln .sub { display: block; color: var(--muted); font-size: 13px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.stat { gap: 2px; padding: 12px; }
.stat .amt { font-size: 17px; }

.dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.av { width: 28px; height: 28px; border-radius: 50%; color: #FFFFFF; font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; text-decoration: none; flex-shrink: 0; }
.g { background: var(--guy); } .j { background: var(--jen); } .b { background: var(--both); }
.av.off { opacity: .35; }

.pill { font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: 999px; white-space: nowrap; }
.warn { background: var(--warn-bg); color: var(--warn); }
.ok { background: var(--ok-bg); color: var(--ok); }
.bad { background: var(--bad-bg); color: var(--bad); }
.info { background: var(--info-bg); color: var(--info); }
.grey { background: var(--grey-bg); color: var(--grey); }

.seg { display: flex; background: var(--seg); border-radius: 12px; padding: 3px; gap: 2px; }
.seg a { flex: 1; text-align: center; font-size: 13px; font-weight: 600; padding: 9px 0; border-radius: 9px; color: var(--grey); text-decoration: none; }
.seg a.on { background: #FFFFFF; color: var(--ink); }

.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 14px; border-radius: 12px; font-size: 14px; font-weight: 600; text-decoration: none; border: 1px solid var(--line); background: #FFFFFF; color: var(--ink); cursor: pointer; font-family: inherit; }
.btn.primary { background: var(--both); border-color: var(--both); color: #FFFFFF; }
.btn.small { min-height: 36px; font-size: 13px; padding: 0 12px; border-radius: 10px; }
.btns { display: flex; gap: 8px; flex-wrap: wrap; }
.btns > * { flex: 1; }
form.inline { display: inline; margin: 0; }

.field { display: flex; flex-direction: column; gap: 5px; }
.field label, .field .label { font-size: 13px; font-weight: 600; color: var(--muted); }
input[type=text], input[type=email], input[type=password], input[type=date], input[type=number], input[type=url], input[type=time], select, textarea {
  font: inherit; font-size: 16px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: #FFFFFF; color: var(--ink); width: 100%; min-height: 44px;
}
textarea { min-height: 110px; resize: vertical; line-height: 1.45; }
input:focus, select:focus, textarea:focus, .btn:focus-visible, a:focus-visible { outline: 2px solid var(--both); outline-offset: 2px; }
.check { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.check input { width: 20px; height: 20px; accent-color: var(--both); }
.who { display: flex; gap: 6px; }
.who label { flex: 1; }
.who input { position: absolute; opacity: 0; pointer-events: none; }
.who span { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; border: 1px solid var(--line); border-radius: 10px; font-weight: 600; font-size: 14px; background: #FFFFFF; cursor: pointer; }
.who input:checked + span { border-color: currentColor; }
.who .w-guy { color: var(--guy); } .who .w-jen { color: var(--jen); } .who .w-both { color: var(--both); }
.who input:focus-visible + span { outline: 2px solid var(--both); outline-offset: 2px; }

.flash { background: var(--ok-bg); color: var(--ok); border-radius: 12px; padding: 10px 14px; font-size: 14px; font-weight: 500; }
.error { background: var(--bad-bg); color: var(--bad); border-radius: 12px; padding: 10px 14px; font-size: 14px; }
.msg { background: var(--bg); border-radius: 12px; padding: 10px 12px; font-size: 14px; line-height: 1.45; white-space: pre-wrap; }
.draft { border: 1px dashed var(--both-pale); border-radius: 12px; padding: 10px 12px; font-size: 14px; line-height: 1.45; white-space: pre-wrap; }
.empty { color: var(--muted); font-size: 14px; }

.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; }
.cal span { height: 30px; border-radius: 6px; font-size: 11px; display: flex; align-items: center; justify-content: center; background: #F1F0EC; color: var(--grey); }
.cal .hd { background: none; height: 18px; font-weight: 600; }
.cal .pad { background: none; }
.cal .bk { background: var(--both); color: #FFFFFF; }
.cal .co { background: #F2A65A; color: #3A1A04; }
.cal .bl { background: #D7D5CF; color: var(--grey); }
.cal .td { outline: 2px solid var(--ink); outline-offset: -2px; }
.key { display: flex; gap: 12px; font-size: 12px; flex-wrap: wrap; align-items: center; }
.key i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 4px; vertical-align: -1px; }

nav.tabs { position: fixed; left: 0; right: 0; bottom: 0; display: flex; justify-content: center; border-top: 1px solid var(--line); background: #FFFFFF; padding: 6px 4px calc(8px + env(safe-area-inset-bottom)); z-index: 10; }
nav.tabs .inner { display: flex; width: 100%; max-width: 560px; }
nav.tabs a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 0; font-size: 11px; font-weight: 600; color: var(--muted); text-decoration: none; position: relative; }
nav.tabs a.on { color: var(--both); }
nav.tabs .badge { position: absolute; top: 2px; left: calc(50% + 6px); background: var(--bad); color: #FFFFFF; font-size: 10px; font-weight: 700; border-radius: 999px; min-width: 16px; height: 16px; padding: 0 4px; display: flex; align-items: center; justify-content: center; }

.login { max-width: 380px; margin: 0 auto; padding: 80px 16px; display: flex; flex-direction: column; gap: 16px; }
details summary { cursor: pointer; font-weight: 600; font-size: 14px; color: var(--both); list-style: none; }
details summary::-webkit-details-marker { display: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
