/* The visual language of spec §2, ported from the approved mockups
   (docs/superpowers/specs/2026-09-26-household-app-mockups.html) to a
   full-screen phone. The mockups drew a 330px phone frame at 12.5px; a real
   phone is ~390px wide, so sizes here run about 1.16x theirs, ratios kept.

   The one idea: the split is the picture. Flat colour appears only where it
   encodes data - split bars, budget bars, person dots. Hairlines separate
   decisions, a heavier ink rule opens a section. No cards, no shadows, no
   radius except pills and avatars. Orange means one thing: it waits on you. */

@font-face {
  font-family: 'Fraunces';
  src: url('fonts/fraunces-latin-full-normal.woff2') format('woff2');
  font-weight: 100 900; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Fraunces';
  src: url('fonts/fraunces-latin-full-italic.woff2') format('woff2');
  font-weight: 100 900; font-style: italic; font-display: swap;
}
@font-face {
  font-family: 'Schibsted Grotesk';
  src: url('fonts/schibsted-grotesk-latin-wght-normal.woff2') format('woff2');
  font-weight: 400 900; font-style: normal; font-display: swap;
}

:root {
  --paper: #EDEEE9; --ink: #000; --r: #1F6D47; --h: #5A5FD8; --hot: #E4501F;
  --mute: #7E7D77; --line: #C6C6BF;
  --serif: 'Fraunces', Georgia, serif;
  --sans: 'Schibsted Grotesk', system-ui, sans-serif;
  /* the viewer's own colour: the active tab, the "left" half of the budget bar */
  --me: var(--r); --me-soft: rgba(31, 109, 71, .14);
  --gutter: 18px;
}
:root[data-me="1"] { --me: var(--h); --me-soft: rgba(90, 95, 216, .14); }

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--paper); color: var(--ink); }
body {
  font-family: var(--sans); font-size: 14.5px; line-height: 1.3;
  -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; text-align: inherit; }
input { font: inherit; color: inherit; }
[hidden] { display: none !important; }

/* the page */
.screen { min-height: 100dvh; display: flex; flex-direction: column; }
.bd {
  flex: 1; width: 100%; max-width: 560px; margin: 0 auto; display: flex; flex-direction: column;
  padding: calc(env(safe-area-inset-top) + 10px) var(--gutter) calc(env(safe-area-inset-bottom) + 100px);
}
.bd.bare { padding-bottom: calc(env(safe-area-inset-bottom) + 24px); }
.fresh { font-size: 11.5px; color: var(--mute); padding: 0 0 6px; }
.fresh.stale { color: var(--ink); font-weight: 600; }
.hd { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; padding: 2px 0 12px; }
.hd h1 { font-family: var(--serif); font-weight: 500; font-size: 35px; letter-spacing: -.02em; margin: 0; line-height: 1; }
.hd .sub { color: var(--mute); font-size: 13.5px; }
.rule { border-top: 1px solid var(--line); margin: 0; }
.rule.ink { border-top: 1.5px solid var(--ink); }
.gap { margin-top: 12px; }
.gap-s { margin-top: 6px; }
.sec { padding: 12px 0; }
.sec-h { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 7px; }
.sec-h b { font-weight: 600; font-size: 14px; }
.sec-h span { color: var(--mute); font-size: 13px; }
.num { font-size: 44px; font-weight: 500; letter-spacing: -.035em; line-height: 1; }
.num small { font-size: 16px; font-weight: 500; letter-spacing: 0; color: var(--mute); margin-left: 7px; }
.num.over, .num.over small { color: var(--hot); }
.mute { color: var(--mute); }
.hot { color: var(--hot); }
.strong { font-weight: 600; }
.row { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.say { font-family: var(--serif); font-size: 22px; font-weight: 500; letter-spacing: -.01em; line-height: 1.15; margin: 0; }
.say em { font-style: italic; font-weight: 400; }
.title { font-family: var(--serif); font-size: 30px; font-weight: 500; letter-spacing: -.02em; line-height: 1.05; }
.meta-line { margin: 7px 0 12px; }
.back { color: var(--mute); padding: 2px 0 10px; display: inline-block; }
.empty { padding: 28px 0; color: var(--mute); font-family: var(--serif); font-size: 17px; line-height: 1.4; margin: 0; }

/* the split bar: flat blocks whose widths are the shares (flex set via the CSSOM) */
.bar { display: flex; height: 22px; width: 100%; gap: 2px; }
.bar.tall { height: 40px; }
.bar.thin { height: 6px; gap: 0; }
.bar b {
  display: flex; align-items: center; height: 100%; min-width: 0; padding: 0 8px;
  overflow: hidden; white-space: nowrap; font-weight: 600; font-size: 12.5px; color: #fff;
}
.bar.tall b { font-size: 16px; }
.bar.thin b { padding: 0; }
.bar .p0 { background: var(--r); }
.bar .p1 { background: var(--h); }
.bar .pn { background: var(--mute); }
.bar .me { background: var(--me); }
.bar .k { background: var(--ink); }
.bar .o { background: var(--hot); }
.bar .g { background: var(--line); }
.legend { display: flex; justify-content: space-between; gap: 10px; font-size: 12.5px; margin-top: 6px; }
.fg0 { color: var(--r); }
.fg1 { color: var(--h); }
.fgn { color: var(--mute); }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; margin-right: 8px; vertical-align: 0; flex: none; }
.dot.p0 { background: var(--r); }
.dot.p1 { background: var(--h); }
.dot.pn { background: var(--mute); }
.dot.hot { background: var(--hot); }
.dots .dot { margin: 0; }
.dots .dot + .dot { margin-left: -3px; }

/* pills and actions */
.pill { display: inline-block; padding: 7px 14px; border-radius: 99px; border: 1.5px solid var(--ink); font-weight: 600; font-size: 13.5px; line-height: 1; }
.pill.fill { background: var(--ink); color: var(--paper); }
.pill.soft, .pill.tab { border-color: transparent; background: rgba(0, 0, 0, .06); font-weight: 500; }
.pill.biz { border-style: dashed; border-color: var(--mute); color: var(--mute); font-weight: 500; }
.pill[disabled] { opacity: .45; }
.pills { display: flex; gap: 7px; flex-wrap: wrap; }
.acts { display: flex; gap: 9px; align-items: center; margin-top: 10px; flex-wrap: wrap; }
.acts .lnk, .lnk { font-weight: 600; font-size: 13.5px; padding: 7px 4px; }

/* lists */
.list .it { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); }
.list .it:first-of-type { border-top: 0; }
.m { font-family: var(--serif); font-size: 16.5px; }
.meta { color: var(--mute); font-size: 12.5px; margin-left: 7px; font-family: var(--sans); }
.new { color: var(--hot); font-weight: 600; font-size: 12.5px; margin-right: 9px; }
.cat { display: grid; grid-template-columns: 1fr auto; gap: 3px 12px; align-items: center; font-size: 13.5px; }
.cat .bar { grid-column: 1 / -1; margin-bottom: 7px; }
.cat .sec-h, .cat .span2 { grid-column: 1 / -1; }
.cat .span2 { margin: -4px 0 8px; }
.why { font-size: 12.5px; color: var(--mute); margin-top: 6px; line-height: 1.4; }
.why b { color: var(--ink); font-weight: 600; }
.why.hot { color: var(--hot); }
.ask {
  display: block; width: 100%; margin-top: 9px; border: 0; border-bottom: 1px solid var(--ink);
  padding: 5px 0; background: transparent; font-family: var(--serif); font-style: italic; font-size: 16px;
}
.ask::placeholder { color: var(--mute); }
.ask:focus { outline: none; }

/* inbox items and receipts */
.item { padding: 12px 0; border-top: 1px solid var(--line); }
.item .top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.item .mer { font-family: var(--serif); font-size: 19px; font-weight: 500; }
.item .amt { font-size: 19px; font-weight: 600; letter-spacing: -.02em; }
.thumb { width: 48px; height: 62px; flex: none; object-fit: cover; background: #fff; border: 1px solid var(--line); border-radius: 2px; transform: rotate(-2deg); }
.photo { display: block; max-width: 100%; max-height: 60vh; border: 1px solid var(--line); background: #fff; }

/* the tab bar and the camera button */
.nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  display: flex; justify-content: space-around; align-items: center;
  height: calc(64px + env(safe-area-inset-bottom)); padding: 0 8px env(safe-area-inset-bottom);
  border-top: 1px solid var(--line); background: var(--paper);
}
.nav a { position: relative; font-size: 13.5px; font-weight: 500; padding: 8px 14px; border-radius: 99px; color: var(--mute); }
.nav a.on { background: var(--me-soft); color: var(--me); font-weight: 600; }
.nav a.n::after { content: ''; position: absolute; top: 7px; right: 6px; width: 7px; height: 7px; border-radius: 50%; background: var(--hot); }
.cam-btn {
  position: fixed; z-index: 11; right: var(--gutter); bottom: calc(80px + env(safe-area-inset-bottom));
  width: 58px; height: 58px; border-radius: 50%; background: var(--ink); color: var(--paper);
  display: flex; align-items: center; justify-content: center;
}
.cam-btn svg { width: 25px; height: 25px; }

/* months, the ledger */
.months { display: flex; gap: 16px; align-items: baseline; padding: 9px 0 3px; font-size: 14px; color: var(--mute); overflow-x: auto; white-space: nowrap; scrollbar-width: none; }
.months a.on { color: var(--ink); font-weight: 600; border-bottom: 1.5px solid var(--ink); padding-bottom: 2px; }
.months .arrow { margin-left: auto; font-size: 16px; color: var(--ink); display: flex; gap: 14px; }
.months .arrow .off { color: var(--line); }
.seg { display: inline-flex; border: 1.5px solid var(--ink); border-radius: 99px; padding: 2px; font-size: 13.5px; font-weight: 600; }
.seg a { padding: 6px 13px; border-radius: 99px; color: var(--mute); }
.seg a.on { background: var(--ink); color: var(--paper); }
.search { width: 7.5em; border: 0; border-bottom: 1px solid var(--line); background: transparent; padding: 4px 0; font-size: 16px; text-align: right; }
.search:focus { outline: none; border-bottom-color: var(--ink); }
.day { display: flex; justify-content: space-between; align-items: baseline; padding: 14px 0 5px; font-size: 13px; color: var(--mute); }
.day b { font-family: var(--serif); font-weight: 500; font-size: 16px; color: var(--ink); }
.tx { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 9px 0; border-top: 1px solid var(--line); align-items: baseline; }
.tx .m { font-size: 17px; }
.tx .a { font-weight: 600; font-size: 16px; letter-spacing: -.01em; text-align: right; }
.tx .k { color: var(--mute); font-size: 12.5px; }
.tx .k.hot { color: var(--hot); }
.tx .mini { grid-column: 2; justify-self: end; width: 72px; height: 6px; display: flex; gap: 1px; margin-top: 3px; }
.mini b { display: block; height: 100%; padding: 0; min-width: 0; }
.mini .p0 { background: var(--r); }
.mini .p1 { background: var(--h); }
.mini .pn { background: var(--mute); }
.tx.pend .m, .tx.pend .a { color: var(--mute); font-weight: 400; }
.flagm { display: inline-block; font-size: 11.5px; border: 1px dashed var(--mute); border-radius: 99px; padding: 1px 8px; color: var(--mute); margin-left: 7px; vertical-align: 2px; font-family: var(--sans); }

/* household */
.member { display: flex; align-items: center; gap: 12px; padding: 9px 0; }
.av { width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; font-family: var(--serif); font-size: 17px; flex: none; }
.av.p0 { background: var(--r); }
.av.p1 { background: var(--h); }
.av.pn { background: var(--mute); }
.member .nm { font-family: var(--serif); font-size: 18px; }
.member .em { color: var(--mute); font-size: 12.5px; }
.tabrow { display: grid; grid-template-columns: 1fr auto; gap: 3px 12px; padding: 9px 0; border-top: 1px solid var(--line); align-items: center; }
.tabrow:first-of-type { border-top: 0; }
.tabrow .bar { grid-column: 1 / -1; height: 10px; }
.tabrow .nm { font-family: var(--serif); font-size: 17px; }
.tabrow .nm.plain { font-family: var(--sans); font-size: 13.5px; color: var(--mute); }
.tabrow .who { font-size: 13px; text-align: right; }
.rulerow { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); font-size: 14px; }
.rulerow:first-of-type { border-top: 0; }
.rulerow .k { font-family: var(--serif); font-size: 16px; }
.rulerow .k small { font-family: var(--sans); color: var(--mute); font-size: 12.5px; margin-left: 6px; }
.setrow { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line); width: 100%; }
.setrow:first-of-type { border-top: 0; }
.setrow .t { font-size: 14.5px; font-weight: 600; }
.setrow .d { color: var(--mute); font-size: 12.5px; margin-top: 2px; }

/* sign-in */
.login { padding-top: calc(env(safe-area-inset-top) + 12vh); }
.login h1 { font-family: var(--serif); font-weight: 500; font-size: 40px; letter-spacing: -.02em; margin: 0 0 10px; }
.field { display: block; margin: 18px 0 12px; font-size: 13px; font-weight: 600; }
.field input {
  display: block; width: 100%; margin-top: 7px; font-size: 18px; padding: 12px 16px;
  border: 1.5px solid var(--ink); border-radius: 99px; background: transparent;
}
.field input:focus { outline: 2px solid var(--me); outline-offset: 2px; }
.err { color: var(--hot); font-size: 13.5px; margin: 10px 0 0; }

/* capture (Task 21 builds the screen; its classes come with the rest of the mockup) */
.screen.dark { background: #000; color: #fff; }
.dark .mute { color: #8e8e93; }
.vf { flex: 1; position: relative; min-height: 40vh; border-radius: 12px; overflow: hidden; background: #151515; display: flex; align-items: center; justify-content: center; margin-top: 8px; }
.vf img { max-width: 100%; max-height: 100%; object-fit: contain; }
.hintf { display: block; width: 100%; margin-top: 12px; border-radius: 99px; border: 1px solid #333; padding: 11px 16px; background: transparent; color: #fff; font-family: var(--serif); font-style: italic; font-size: 16px; }
.hintf::placeholder { color: #8e8e93; }
.shut { width: 74px; height: 74px; border-radius: 50%; border: 3px solid #fff; margin: 16px auto 8px; display: flex; align-items: center; justify-content: center; }
.shut i { width: 60px; height: 60px; border-radius: 50%; background: #fff; display: block; }

/* the Inbox: the first item under a group heading takes no rule of its own */
.sec-h + .item { border-top: 0; padding-top: 4px; }
section[data-group] .item .acts .pill.biz { color: var(--ink); border-color: var(--ink); }

/* sheets: a bottom panel, paper on a dimmed page, a heavier ink rule opening it */
.sheet-back {
  position: fixed; inset: 0; z-index: 20; background: rgba(0, 0, 0, .28);
  display: flex; align-items: flex-end; justify-content: center;
}
.sheet {
  width: 100%; max-width: 560px; max-height: 88dvh; overflow-y: auto; background: var(--paper);
  border-top: 1.5px solid var(--ink); padding: 14px var(--gutter) calc(env(safe-area-inset-bottom) + 18px);
}
.sheet-h { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 12px; }
.sheet-h b { font-family: var(--serif); font-size: 22px; font-weight: 500; }
.sheet .say { margin: 4px 0 6px; }
.sheet textarea {
  display: block; width: 100%; border: 1.5px solid var(--ink); background: transparent; padding: 10px 12px;
  font-family: var(--serif); font-size: 17px; line-height: 1.35; resize: vertical;
}
.sheet textarea:focus { outline: 2px solid var(--me); outline-offset: 2px; }
.sheet input[type="range"] { display: block; width: 100%; margin: 4px 0 2px; accent-color: var(--ink); }
.cand { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; width: 100%; padding: 10px 0;
        border-top: 1px solid var(--line); align-items: baseline; }
.cand:first-of-type { border-top: 0; }
.cand .a { font-weight: 600; text-align: right; }
.cand .k { color: var(--mute); font-size: 12.5px; }
.check { display: flex; gap: 10px; align-items: center; font-size: 13.5px; margin: 12px 0 6px; }
/* the page under an open sheet stays where it is */
html.sheet-open, html.sheet-open body { overflow: hidden; }

/* capture: the mockup's dark screen, the file inputs hidden behind their labels */
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0);
                   clip-path: inset(50%); white-space: nowrap; }
.cap-top { padding: 2px 0 8px; }
.cap-top a, .cap-top label { padding: 6px 0; }
.cap-title { font-family: var(--serif); font-size: 19px; }
.cap-note { text-align: center; font-size: 13px; }
.cap-last { text-align: center; font-size: 13px; color: #fff; margin-top: 4px; min-height: 1.3em; }
.cap-held { justify-content: center; }
.shut { cursor: pointer; }
.shut.off, .cap-top label.off { opacity: .4; cursor: default; }
