/* one font on every phone: Plus Jakarta Sans (SIL Open Font License, static/fonts/OFL-PlusJakartaSans.txt), Latin only; other scripts fall back to the system font */
@font-face { font-family: "Plus Jakarta Sans"; src: url("/static/fonts/pjs-latin.woff2") format("woff2"); font-weight: 200 800; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
:root {
  --bg: #fbf6ee; --card: #ffffff; --ink: #2b2622; --muted: #6f655b; --line: #e8dccb;
  --primary: #bd3f0a; --on-primary: #ffffff; --accent: #3f6b54; --edge: #857a6d; --accent-soft: #e3efe7;
  --warn: #8a5a00; --warn-soft: #fbefd2; --bad: #a3271f; --bad-soft: #fbe3df; --soft: #f4ebdd;
  --radius: 16px; --shadow: 0 1px 2px rgba(60, 40, 20, .08);
}
:root[data-theme="dark"] {
  --bg: #1c1916; --card: #272320; --ink: #f2eadf; --muted: #b3a89b; --line: #3a342e;
  --primary: #ff8a5c; --on-primary: #1c1916; --edge: #8f8579; --accent: #8cc3a3; --accent-soft: #24332b;
  --warn: #f0c36a; --warn-soft: #3a2f16; --bad: #f2a199; --bad-soft: #3c211e; --soft: #302b26; --shadow: none;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1c1916; --card: #272320; --ink: #f2eadf; --muted: #b3a89b; --line: #3a342e;
    --primary: #ff8a5c; --on-primary: #1c1916; --edge: #8f8579; --accent: #8cc3a3; --accent-soft: #24332b;
    --warn: #f0c36a; --warn-soft: #3a2f16; --bad: #f2a199; --bad-soft: #3c211e; --soft: #302b26; --shadow: none;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink); font-size: 1rem; line-height: 1.5;
  font-family: "Plus Jakarta Sans", ui-rounded, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  font-optical-sizing: auto; -webkit-font-smoothing: antialiased;
}
/* the wallpaper of a themed house: thin line drawings in the house's own colour, very light (the cards cover it; it shows only in the gaps); themes.css turns it on per theme */
body::before { content: none; position: fixed; inset: 0; z-index: -1; pointer-events: none; background: var(--primary); opacity: .14;
  -webkit-mask-size: 260px 260px; mask-size: 260px 260px; -webkit-mask-repeat: repeat; mask-repeat: repeat; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) body::before { opacity: .17; } }
:root[data-theme="dark"] body::before { opacity: .17; }
html[data-simple="1"] body::before { display: none; }
@media print { body::before { display: none; } }
.wrap { max-width: 640px; margin: 0 auto; padding: 0 16px 48px; }
header.top { padding: 20px 0 8px; }
.house { font-size: 1.6rem; font-weight: 700; line-height: 1.2; margin: 0; overflow-wrap: anywhere; }
.sub { color: var(--muted); font-size: .95rem; margin: 2px 0 0; }
nav.tabs { display: flex; gap: 8px; overflow-x: auto; padding: 8px 0 12px; scrollbar-width: none; }
nav.tabs a { white-space: nowrap; padding: 10px 14px; border-radius: 999px; background: var(--soft); color: var(--ink);
  text-decoration: none; font-size: .95rem; min-height: 44px; display: inline-flex; align-items: center; }
nav.tabs a[aria-current="page"] { background: var(--ink); color: var(--bg); }
h1 { font-size: 1.45rem; margin: 20px 0 10px; line-height: 1.25; }
h2 { font-size: 1.15rem; margin: 26px 0 8px; }
h3 { font-size: 1rem; margin: 14px 0 4px; }
p { margin: 8px 0; }
a { color: var(--primary); }
.muted { color: var(--muted); }
.small { font-size: .9rem; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin: 12px 0; box-shadow: var(--shadow); }
.card h2:first-child, .card h3:first-child { margin-top: 0; }
.stack > * + * { margin-top: 12px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.grow { flex: 1 1 auto; min-width: 0; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 10px 18px; border-radius: 14px;
  border: 1.5px solid var(--line); background: var(--card); color: var(--ink); font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; }
.btn.primary { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.btn.good { background: var(--accent); border-color: var(--accent); color: var(--bg); }
.btn.danger { color: var(--bad); border-color: var(--bad); }
.btn.small { min-height: 44px; padding: 6px 14px; font-size: .95rem; }
.btn.wide { width: 100%; }
.btn:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
label { display: block; font-weight: 600; margin: 12px 0 4px; }
input[type=text], input[type=email], input[type=url], input[type=tel], input[type=date], input[type=number], input[type=password], input[type=search], select, textarea {
  width: 100%; min-height: 48px; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 12px; font: inherit; color: var(--ink); background: var(--bg); }
textarea { min-height: 96px; resize: vertical; }
.check { display: flex; gap: 10px; align-items: center; min-height: 44px; font-weight: 500; margin: 0; }
.check input { width: 24px; height: 24px; accent-color: var(--primary); flex: none; }
.hint { color: var(--muted); font-size: .88rem; margin: 4px 0 0; }
.pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .82rem; font-weight: 700; background: var(--soft); color: var(--muted); white-space: nowrap; }
.pill.ok { background: var(--accent-soft); color: var(--accent); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.bad { background: var(--bad-soft); color: var(--bad); }
.banner { border-radius: var(--radius); padding: 14px 16px; margin: 12px 0; font-weight: 600; }
.banner.block { background: var(--bad-soft); color: var(--bad); border: 1.5px solid var(--bad); }
.banner.info { background: var(--accent-soft); color: var(--accent); }
.banner.warn { background: var(--warn-soft); color: var(--warn); }
.flash { border-radius: 12px; padding: 12px 14px; margin: 10px 0; font-weight: 600; background: var(--accent-soft); color: var(--accent); }
.flash.err { background: var(--bad-soft); color: var(--bad); }
.money { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.big { font-size: 1.9rem; font-weight: 800; line-height: 1.1; }
ul.plain { list-style: none; margin: 0; padding: 0; }
ul.plain > li { padding: 12px 0; border-top: 1px solid var(--line); }
ul.plain > li:first-child { border-top: 0; }
table.tbl { width: 100%; border-collapse: collapse; font-size: .95rem; }
table.tbl th, table.tbl td { text-align: left; padding: 8px 4px; border-top: 1px solid var(--line); vertical-align: top; }
table.tbl th { color: var(--muted); font-weight: 600; font-size: .85rem; border-top: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
progress { width: 100%; height: 14px; accent-color: var(--accent); }
.bar { height: 12px; border-radius: 999px; background: var(--soft); overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--accent); }
.w0{width:0}.w5{width:5%}.w10{width:10%}.w15{width:15%}.w20{width:20%}.w25{width:25%}.w30{width:30%}.w35{width:35%}.w40{width:40%}
.w45{width:45%}.w50{width:50%}.w55{width:55%}.w60{width:60%}.w65{width:65%}.w70{width:70%}.w75{width:75%}.w80{width:80%}.w85{width:85%}.w90{width:90%}.w95{width:95%}.w100{width:100%}
code, .mono { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: .85rem; }
.code { word-break: break-all; background: var(--soft); border-radius: 12px; padding: 12px; width: 100%; min-height: 110px; }
.qr { display: block; margin: 12px auto; width: 240px; height: 240px; background: #fff; border-radius: 12px; padding: 8px; }
details { margin: 10px 0; }
summary { cursor: pointer; font-weight: 600; min-height: 44px; display: flex; align-items: center; gap: 8px; color: var(--primary); list-style: none; }
summary::-webkit-details-marker { display: none; }
summary::before { content: ""; width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); flex: none; transition: transform .15s; }
details[open] > summary::before { transform: rotate(45deg); }
[hidden] { display: none !important; }
.math { background: var(--soft); border-radius: 12px; padding: 12px 14px; font-size: .95rem; }
.math p { margin: 4px 0; }
footer.foot { margin-top: 36px; padding-top: 14px; border-top: 1px solid var(--line); color: var(--muted); font-size: .88rem; }
footer.foot a { color: var(--muted); }
.link-box { word-break: break-all; font-size: .85rem; }
.hero { padding: 28px 0 8px; }
.hero h1 { font-size: 1.9rem; }
@media (min-width: 700px) { .wrap { padding-top: 12px; } }
@media (prefers-reduced-motion: no-preference) { .btn { transition: transform .08s; } .btn:active { transform: scale(.98); } }

/* the logo has a light and a dark version: the app's own theme decides, then the phone's */
header.top .brandmark .lg-dark { display: none; }
:root[data-theme="dark"] header.top .brandmark .lg-light { display: none; }
:root[data-theme="dark"] header.top .brandmark .lg-dark { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) header.top .brandmark .lg-light { display: none; }
  :root:not([data-theme="light"]) header.top .brandmark .lg-dark { display: block; }
}
/* print: the "Acordo da casa" sheet on one clean page */
.vh { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media print {
  @page { size: A4; margin: 14mm; }
  body { background: #fff; color: #000; font-size: 11pt; line-height: 1.35; }
  .wrap { max-width: none; padding: 0; }
  nav.tabs, nav.botnav, .me-btn, .tiles-wrap, footer.foot, .noprint, .flash, header.top .sub, #install-hint, #offline-note, .top-hint { display: none !important; }
  header.top { padding: 0; }
  header.top .house { font-size: 10pt; color: #555; }
header.top .brandmark { display: inline-block; line-height: 0; }
header.top .brandmark img { height: 34px; width: auto; display: block; }
header.top .brandmark .lg-dark { display: none !important; }
  .sheet h1 { font-size: 17pt; margin: 0 0 4pt; }
  .sheet h2 { font-size: 11.5pt; margin: 8pt 0 2pt; }
  .sheet p { margin: 2pt 0; }
  .sheet section.rule { break-inside: avoid; border-top: .5pt solid #999; padding-top: 4pt; }
  .sheet .muted, .sheet .hint { color: #444; }
  table.tbl th, table.tbl td { padding: 3pt 4pt; border-color: #999; }
  a { color: #000; text-decoration: none; }
}

/* onboarding */
ol.steps { list-style: none; display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 8px; margin: 8px 0; scrollbar-width: none; }
ol.steps a { white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 8px 12px; border-radius: 999px;
  background: var(--soft); color: var(--ink); text-decoration: none; font-size: .9rem; }
ol.steps a[aria-current="step"] { background: var(--ink); color: var(--bg); }
.row.pair > .grow { flex: 1 1 130px; min-width: 0; }
.code.msg { word-break: normal; overflow-wrap: anywhere; }
.navrow { margin-top: 18px; }
.center { text-align: center; }

/* member first visit, install hint */
ol.three { margin: 0; padding-left: 1.3rem; }
ol.three li { margin: 8px 0; }
.welcome { border-color: var(--accent); }
#install-hint, #offline-note { border-radius: var(--radius); padding: 12px 14px; margin: 10px 0; font-size: .95rem; background: var(--soft); }
#install-hint[hidden], #offline-note[hidden] { display: none; }
#install-hint .row { margin-top: 6px; }

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid2 .big { font-size: 1.5rem; }
p.center a, footer.foot a, .noprint a { display: inline-flex; align-items: center; min-height: 44px; }

/* identity: avatars, crest, member cards, themes in themes.css */
.av { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%; flex: none;
  font-size: 1.35rem; font-weight: 700; color: #fff; overflow: hidden; vertical-align: middle; }
.av.sm { width: 28px; height: 28px; font-size: .9rem; }
.av.big { width: 72px; height: 72px; font-size: 2.2rem; }
.av img { width: 100%; height: 100%; object-fit: cover; display: block; }
.av-c0 { background: #c2410c; } .av-c1 { background: #1f5f8b; } .av-c2 { background: #2f6b3f; } .av-c3 { background: #7a5c00; }
.av-c4 { background: #6d3b8a; } .av-c5 { background: #a5254f; } .av-c6 { background: #3b4652; } .av-c7 { background: #6b4226; }
.av-c8 { background: #0e6b6b; } .av-c9 { background: #8a3f6a; } .av-c10 { background: #4a5a1f; } .av-c11 { background: #8a2f2f; }
.crest { width: 56px; height: 66px; flex: none; }
.house-head { display: flex; gap: 12px; align-items: center; }
.motto { font-style: italic; color: var(--muted); margin: 2px 0 0; }
.person { display: flex; gap: 12px; align-items: center; padding: 10px 0; }
.person + .person { border-top: 1px solid var(--line); }
.person .grow strong { display: block; }
.tag { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: .78rem; font-weight: 700; background: var(--accent-soft); color: var(--accent); margin-left: 6px; }
.tag.warn { background: var(--warn-soft); color: var(--warn); }
fieldset.pick { border: 1.5px solid var(--line); border-radius: var(--radius); padding: 10px 12px; margin: 12px 0; }
fieldset.pick legend { padding: 0 6px; font-weight: 600; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips label.chip { display: inline-flex; align-items: center; justify-content: center; min-width: 48px; min-height: 48px; border-radius: 14px;
  border: 1.5px solid var(--line); background: var(--card); cursor: pointer; font-size: 1.4rem; padding: 0 8px; }
.chips input[type=radio], .chips input[type=checkbox] { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chips label.chip:has(input:checked) { border-color: var(--primary); background: var(--accent-soft); outline: 2px solid var(--primary); }
.chips label.chip:has(input:focus-visible) { outline: 3px solid var(--primary); outline-offset: 2px; }
.swatch { width: 28px; height: 28px; border-radius: 50%; display: block; }
.person .grow span { display: block; }
.person .grow strong .tag { display: inline-block; }

/* navigation: bottom bar, profile button, pinned tiles, catalogue */
.nowrap { flex-wrap: nowrap; }
.ic { width: 24px; height: 24px; flex: none; }
.block { display: block; }
body.has-nav { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
nav.botnav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: var(--card); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
.bar-in { max-width: 640px; margin: 0 auto; display: flex; }
nav.botnav a { flex: 1 1 0; min-width: 0; min-height: 60px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  color: var(--muted); text-decoration: none; font-size: .78rem; font-weight: 600; }
nav.botnav a[aria-current="page"] { color: var(--primary); }
nav.botnav a[aria-current="page"] .ic { stroke-width: 2.3; }
.me-btn { flex: none; width: 48px; height: 48px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--soft); color: var(--ink); margin-top: 6px; }
.me-btn.on { background: var(--primary); color: var(--on-primary); }
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 8px 0 4px; }
.tile { position: relative; min-height: 84px; padding: 12px 6px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); color: var(--ink);
  text-decoration: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; font-size: .88rem; font-weight: 600; text-align: center; box-shadow: var(--shadow); }
.tile .ic { color: var(--primary); width: 28px; height: 28px; }
.tile.add { background: transparent; border-style: dashed; color: var(--muted); }
.tile.add .ic { color: var(--muted); }
.badge { background: var(--primary); color: var(--on-primary); border-radius: 999px; min-width: 22px; height: 22px; padding: 0 6px; font-size: .78rem; line-height: 22px; text-align: center; }
.tile .badge { position: absolute; top: 6px; right: 8px; }
.badge.inl { display: inline-block; }
.cat { list-style: none; padding: 0; margin: 0; }
.cat-item { display: flex; gap: 10px; align-items: center; padding: 12px; margin: 8px 0; }
.cat-main { display: flex; gap: 12px; align-items: center; flex: 1 1 auto; min-width: 0; color: var(--ink); text-decoration: none; }
.cat-ic { width: 44px; height: 44px; border-radius: 12px; background: var(--soft); color: var(--primary); display: flex; align-items: center; justify-content: center; flex: none; }
.pinbtn { flex-direction: column; gap: 0; min-width: 64px; font-size: .74rem; padding: 4px 8px; }
.pinbtn .ic { width: 20px; height: 20px; }
.pinbtn.on { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); }
.seg { display: flex; gap: 8px; }
.seg .btn { flex: 1; }
.seg .btn[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.me-btn img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.photo-hero { display: flex; justify-content: center; }
.photo-hero .av.big { width: 112px; height: 112px; font-size: 3rem; }
.photo-hero .av.big img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
label.btn { cursor: pointer; margin: 0; }
.in-android nav.botnav { bottom: var(--inset-b, 0px); }
.in-android.has-nav { padding-bottom: calc(76px + var(--inset-b, 0px)); }
.in-android nav.botnav::after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: var(--inset-b, 0px); background: var(--card); }

/* desktop and tablet: a side rail instead of the bottom bar, a wider page, two columns where it helps */
@media (min-width: 960px) {
  body.has-nav { padding-bottom: 0; padding-left: 220px; }
  .wrap { max-width: 920px; padding: 0 32px 48px; }
  nav.botnav { top: 0; bottom: auto; right: auto; width: 220px; height: 100vh; border-top: 0; border-right: 1px solid var(--line); padding: 88px 12px 12px; border-radius: 0; }
  .bar-in { max-width: none; flex-direction: column; gap: 4px; }
  nav.botnav a { flex: none; flex-direction: row; justify-content: flex-start; gap: 12px; min-height: 48px; padding: 0 14px; border-radius: 12px; font-size: 1rem; }
  nav.botnav a[aria-current="page"] { background: var(--soft); }
  .tiles { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
  .cat { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
  .cat-item { margin: 0; }
  textarea.msg { max-width: 560px; }
  #install-hint { display: none !important; }
}

/* the monthly calendar: a grid on a wide screen, a plain list of the days with bills on a phone */
.cal-nav { margin: 8px 0; }
.cal { margin: 12px 0; }
.cal-head, .cal-week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal-head { color: var(--muted); font-size: .85rem; text-align: center; margin-bottom: 4px; }
.cal-week { margin-bottom: 6px; }
.cal-day { min-height: 92px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 6px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.cal-day.off { background: transparent; border-style: dashed; opacity: .5; }
.cal-day.today { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary) inset; }
.cal-n { font-weight: 700; font-size: .9rem; }
.cal-mon { display: none; }
.cal-chip { display: block; border-radius: 8px; padding: 4px 6px; font-size: .74rem; line-height: 1.25; text-decoration: none; color: var(--ink); background: var(--soft); border-left: 4px solid var(--muted); overflow-wrap: anywhere; }
.cal-chip span { display: block; color: var(--muted); }
.cal-chip.paid { border-left-color: var(--accent); }
.cal-chip.said { border-left-color: var(--warn); }
.cal-chip.open, .cal-chip.late { border-left-color: var(--bad); }
.cal-chip.none { border-left-color: var(--primary); }
@media (max-width: 719px) {
  .cal-head, .cal-day.empty, .cal-day.off { display: none; }
  .cal-week { display: block; margin: 0; }
  .cal-day { min-height: 0; margin-bottom: 8px; padding: 10px; }
  .cal-mon { display: inline; color: var(--muted); font-weight: 500; }
  .cal-chip { font-size: .95rem; padding: 8px 10px; }
}
.seg a[aria-current="true"], .seg .btn[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.seg a.btn { text-decoration: none; }

/* home: a quiet row of links under the shortcuts, compact notices */
.quick { display: flex; gap: 6px 16px; flex-wrap: wrap; margin: 6px 0 2px; font-size: .95rem; }
.quick a { min-height: 44px; display: inline-flex; align-items: center; }
.card.slim { padding: 12px 16px; }
.more-rules { color: var(--muted); }
.check-row { background: var(--warn-soft); border-radius: 12px; padding: 12px; }
.card.house-head { align-items: center; }
.card.house-head .house { font-size: 1.3rem; }
.card.house-head .crest { width: 64px; height: 75px; }

/* "new ..." forms fold away behind a button-like summary; file pickers look like the app's buttons */
details.new > summary { justify-content: center; background: var(--primary); color: var(--on-primary); border-radius: 14px; min-height: 48px; padding: 0 18px; }
details.new[open] > summary { background: var(--soft); color: var(--ink); }
details.new > summary::before { display: none; }
input[type=file] { font: inherit; color: var(--muted); max-width: 100%; }
input[type=file]::file-selector-button { font: inherit; font-weight: 600; min-height: 44px; padding: 8px 14px; margin-right: 10px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--card); color: var(--ink); cursor: pointer; }

/* never wider than the screen; inside the phone apps the page does not zoom or pan sideways (it is an app, not a web page) */
html, body { overflow-x: clip; max-width: 100%; }
body.in-app { touch-action: pan-y; -webkit-text-size-adjust: 100%; }
.banner.block p { margin: 0; }
.banner.block details { margin: 4px 0 0; }
.banner.block summary { color: inherit; min-height: 36px; font-size: .9rem; }

/* list rows: settings and every "open this" list (UX audit 8.3) */
.group-label { font-size: .75rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); margin: 24px 4px 8px; }
.rows { background: var(--card); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.rowlink { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 8px 16px; color: var(--ink); text-decoration: none; width: 100%; background: none; border: 0; font: inherit; text-align: left; cursor: pointer; }
.rowlink + .rowlink { border-top: 1px solid var(--line); }
.rowlink:active { background: var(--soft); }
.row-ic { width: 24px; height: 24px; color: var(--primary); flex: none; display: flex; }
.row-main { flex: 1 1 auto; min-width: 0; }
.row-t { display: block; font-weight: 600; white-space: normal; overflow-wrap: anywhere; }
.row-s { display: block; font-size: .875rem; color: var(--muted); }
.row-v { flex: 0 1 45%; text-align: right; font-size: .875rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-v.warn { color: var(--warn); font-weight: 600; }
.row-chev { width: 8px; height: 8px; border-right: 2px solid var(--muted); border-top: 2px solid var(--muted); transform: rotate(45deg); flex: none; }
.row-check { color: var(--primary); font-weight: 800; visibility: hidden; }
.pickrow[aria-pressed="true"] .row-check, .pickrow[aria-current="true"] .row-check { visibility: visible; }
.me-card { display: flex; align-items: center; gap: 14px; padding: 8px 4px; color: var(--ink); text-decoration: none; }
.me-card .grow > * { display: block; }
.me-card .link { color: var(--primary); font-weight: 600; }
/* sub-pages: a back chevron and the title, nothing else (5.6) */
header.top.subtop { display: flex; align-items: center; gap: 4px; padding: 8px 0; min-height: 48px; }
header.subtop .back { width: 44px; height: 44px; margin-left: -12px; display: flex; align-items: center; justify-content: center; flex: none; }
header.subtop .back .row-chev { transform: rotate(-135deg); width: 10px; height: 10px; border-color: var(--ink); }
header.subtop .subtitle { font-size: 1.0625rem; font-weight: 700; margin: 0; }
header.subtop ~ main > h1:first-child { display: none; }
main { padding-inline: 0; }
.actions-sticky { position: sticky; bottom: calc(68px + env(safe-area-inset-bottom)); padding: 12px 0; background: linear-gradient(transparent, var(--bg) 30%); }
body:not(.has-nav) .actions-sticky { bottom: env(safe-area-inset-bottom); }
details.more > summary { color: var(--primary); font-weight: 600; min-height: 44px; display: flex; align-items: center; }
.btn.text { background: none; border-color: transparent; color: var(--primary); }
.btn.text.danger { color: var(--bad); }
.empty { text-align: center; color: var(--muted); padding: 24px 0; }
input.switch { appearance: none; -webkit-appearance: none; flex: none; width: 48px; height: 28px; border-radius: 999px; background: var(--line); position: relative; margin: 0; cursor: pointer; transition: background .15s; }
input.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: transform .15s; }
input.switch:checked { background: var(--ok); }
input.switch:checked::after { transform: translateX(20px); }
/* status colours never follow the house theme (5.4) */
:root { --ok: #1f7a4d; --ok-soft: #e1f3ea; }
:root[data-theme="dark"] { --ok: #7fd1a3; --ok-soft: #1d3327; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --ok: #7fd1a3; --ok-soft: #1d3327; } }
.pill.ok { background: var(--ok-soft); color: var(--ok); }
label.rowlink .row-t { white-space: normal; }

/* alerts: one line, one action (5.1) */
.alert { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 8px 12px 8px 16px; border-radius: 12px; font-size: .92rem; margin: 12px 0; text-decoration: none; }
.alert > .grow { min-width: 0; overflow-wrap: anywhere; }
.alert.block { background: var(--bad-soft); color: var(--bad); border: 1.5px solid var(--bad); }
.alert.warn { background: var(--warn-soft); color: var(--warn); }
.alert.info { background: var(--soft); color: var(--ink); }
.alert .btn { min-height: 44px; padding: 4px 14px; flex: none; }
.alert .row-chev { border-color: currentColor; margin-right: 6px; }
/* item rows: a bill, a chore, a poll */
.card.items { padding: 4px 16px; }
.row-item { display: flex; align-items: center; gap: 12px; padding: 12px 0; color: var(--ink); text-decoration: none; }
.row-item + .row-item, .card.items > .total + .row-item { border-top: 1px solid var(--line); }
.row-item .row-t { color: var(--ink); text-decoration: none; }
.row-t.wrap { white-space: normal; }
.row-side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex: none; }
.row-s.late, .row-day.late { color: var(--bad); font-weight: 600; }
.row-s.soon, .row-day.soon { color: var(--warn); font-weight: 600; }
.row-day { flex: none; font-size: .875rem; color: var(--muted); }
.total { margin: 12px 0 4px; }
.hero { font-size: 2rem; font-weight: 800; line-height: 1.1; }
.pay { gap: 4px; }
.pay form { margin: 0; }
.tick-form { margin: 0; flex: none; }
.tick { width: 44px; height: 44px; margin: 0 -8px; border: 0; background: none; padding: 8px; cursor: pointer; }
.tick::before { content: ""; display: block; width: 100%; height: 100%; border-radius: 50%; border: 2px solid var(--muted); box-sizing: border-box; }
.tick:active::before { background: var(--ok); border-color: var(--ok); }
details.swap > summary { font-size: .875rem; color: var(--muted); min-height: 44px; }
.swpanel { padding: 4px 0 8px; }
.row-item.sched > .ib { margin-right: -10px; }
.rows.spaced { margin-top: 24px; }
.empty.big { font-size: 1.15rem; padding: 40px 0; }
.chip-row { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 4px 16px; margin: 24px -16px 0; }
.chip-row::-webkit-scrollbar { display: none; }
.chip-link { position: relative; flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px; border-radius: 999px; background: var(--soft); color: var(--ink); text-decoration: none; font-size: .875rem; font-weight: 600; }
.chip-link .ic { width: 18px; height: 18px; }
/* "it worked" is a toast above the tab bar: it takes no room on the page and leaves on its own */
.flash:not(.err) { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(84px + env(safe-area-inset-bottom)); z-index: 30; margin: 0; padding: 10px 18px; border-radius: 999px; width: max-content; max-width: calc(100vw - 32px); text-align: center;
  background: var(--ink); color: var(--bg); font-size: .92rem; box-shadow: 0 4px 16px rgba(0,0,0,.25); animation: toast 5s forwards; }
body:not(.has-nav) .flash:not(.err) { bottom: calc(24px + env(safe-area-inset-bottom)); }
@keyframes toast { 0% { opacity: 0; } 4%, 90% { opacity: 1; } 100% { opacity: 0; visibility: hidden; } }
@media print { .flash { display: none; } }
.row-item.bill { display: grid; grid-template-columns: 1fr auto; align-items: start; gap: 6px 12px; }
.row-item.bill .row-side { display: contents; }
.row-item.bill .pay, .row-item.bill .row-side > .btn { grid-column: 1 / -1; justify-self: end; }
details.split { padding: 4px 16px; margin: 12px 0; }
details.split > summary { min-height: 56px; display: flex; align-items: center; }
details.split > summary .grow > * { display: block; }
.share-row { display: flex; align-items: center; gap: 12px; margin: 8px 0; }
.share-row label { flex: 1; margin: 0; }
.share-row input { width: 96px; flex: none; text-align: right; }
.money-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; }
.money-top > div > * { display: block; }
.money.big { font-size: 1.3rem; }
.totals-more { margin: 6px 4px 0; }
.row-t.done { color: var(--ok); }
.done-today { margin-top: 12px; }
.row-side form { margin: 0; }
.row-item .row-s { white-space: normal; }
.btn.apple { background: #000; border-color: #000; color: #fff; }
:root[data-theme="dark"] .btn.apple { background: #fff; border-color: #fff; color: #000; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn.apple { background: #fff; border-color: #fff; color: #000; } }
.share-line { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 8px 0; }
.share-line + .share-line { border-top: 1px solid var(--line); }
.share-line .bar { grid-column: 1 / -1; }
.share-line.mine .share-name { font-weight: 700; }
.share-n { color: var(--muted); font-size: .875rem; }
.row-item.sched.mine .row-t { color: var(--primary); }
.period { margin: 8px 4px 0; }
.add-line { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.add-line .chips { margin: 0; }
.row-item.contact { align-items: flex-start; }
.tag.admin { background: var(--primary); color: var(--on-primary); }
h2 .tag { font-size: .7rem; vertical-align: middle; font-weight: 600; }
.me-card .tag { align-self: flex-start; display: inline-block; width: fit-content; }
.week-day .cal-chip { font-size: .92rem; padding: 10px 12px; margin-bottom: 6px; border-radius: 12px; }
.week-none { margin: 0 4px; }
.group-label.today { color: var(--primary); }
.cal-month { margin: 12px 0; }
.cal-month .cal-day { min-height: 56px; align-items: center; justify-content: center; text-decoration: none; color: var(--ink); gap: 2px; }
.cal-month .mine-n { background: var(--primary); color: var(--on-primary); border-radius: 999px; min-width: 22px; height: 22px; display: inline-flex; align-items: center; justify-content: center; font-size: .8rem; font-weight: 700; }
.cal-month .all-n { color: var(--muted); font-size: .72rem; }
/* the compact month: a real grid of days at any width, with a number where something is yours */
.cal-month .cal-head { display: grid !important; }
.cal-month .cal-week { display: grid !important; margin-bottom: 6px; }
.cal-month .cal-day, .cal-month .cal-day.off { display: flex !important; margin: 0; padding: 4px; }
.cal-month .cal-day.off { border: 0; }
.only-phone { display: none; }
@media (max-width: 719px) { .only-phone { display: block; } }
.add-line .chip > span { font-size: .92rem; padding: 6px 12px; min-height: 0; }

/* ---- the public page (landing) ---- */
body.lp { padding: 0; }
.lp-in { max-width: 1040px; margin: 0 auto; padding: 0 20px; }
.lp-top { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.lp-top .lp-in { display: flex; align-items: center; justify-content: space-between; min-height: 60px; }
.lp-brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.2rem; color: var(--ink); text-decoration: none; }
.lp-brand img { border-radius: 9px; }
.lp-nav { display: flex; align-items: center; gap: 16px; font-size: .95rem; }
.lp-hero { padding: 48px 0 40px; }
.lp-two { display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; }
.lp-kicker { color: var(--primary); font-weight: 700; margin: 0 0 12px; }
.lp h1 { font-size: clamp(2rem, 5.4vw, 3.3rem); line-height: 1.08; margin: 0 0 18px; letter-spacing: -.02em; }
.lp h2 { font-size: clamp(1.5rem, 3.4vw, 2.1rem); line-height: 1.15; margin: 0 0 18px; letter-spacing: -.01em; }
.lp h3 { font-size: 1.08rem; margin: 0 0 6px; }
.lp-lead { font-size: 1.15rem; color: var(--muted); max-width: 34em; margin: 0 0 24px; }
.lp-cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 0 0 14px; }
.lp-cta .btn { min-height: 52px; padding: 0 24px; font-size: 1.05rem; text-decoration: none; }
.lp-note { color: var(--muted); font-size: .92rem; margin: 0; }
.lp-phone { margin: 0; justify-self: center; width: min(300px, 78vw); border-radius: 34px; padding: 9px; background: var(--ink); box-shadow: 0 24px 60px rgba(0, 0, 0, .18); }
.lp-phone img { display: block; width: 100%; height: auto; border-radius: 26px; }
.lp-band { background: var(--soft); padding: 44px 0; }
.lp-three { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.lp-three p, .lp-grid p { color: var(--muted); margin: 0; }
.lp-feature { padding: 64px 0; }
.lp-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.lp-list li { padding-left: 30px; position: relative; color: var(--muted); }
.lp-list li::before { content: "✓"; position: absolute; left: 0; top: 0; color: var(--ok); font-weight: 800; }
.lp-list strong { color: var(--ink); }
.lp-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 24px; }
.lp-grid > div { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 18px; }
.lp-center { text-align: center; }
.lp-center .lp-lead { margin-inline: auto; }
.lp-center .lp-cta { justify-content: center; }
.lp-final { padding: 72px 0; }
.lp-foot { border-top: 1px solid var(--line); padding: 28px 0 40px; color: var(--muted); font-size: .9rem; text-align: center; }
.lp-foot p { margin: 4px 0; }
@media (max-width: 760px) {
  .lp-hero { padding: 28px 0; }
  .lp-two { grid-template-columns: 1fr; gap: 32px; }
  .lp-feature .lp-two > figure { order: 2; }
  .lp-three, .lp-grid { grid-template-columns: 1fr; gap: 18px; }
  .lp-feature { padding: 44px 0; }
  .lp-cta .btn { flex: 1 1 100%; }
}

/* a rule is one folded row: title and a small state; the text opens when it still needs reading */
details.rule { padding: 4px 16px; }
details.rule > summary.rule-sum { color: var(--ink); font-weight: 400; justify-content: space-between; gap: 12px; }
details.rule > summary.rule-sum::before { order: 3; margin-left: 4px; transform: rotate(-45deg); }
details.rule[open] > summary.rule-sum::before { transform: rotate(45deg); }
details.rule > .stack { padding: 0 0 12px; }


/* ===== v2 (2026-10-12): hierarchy, shape and motion; see docs/notes/UX-REDESIGN-2026-10-12.md ===== */
:root { --r-card: 20px; --shadow: 0 1px 2px rgba(43, 26, 10, .05), 0 8px 24px rgba(43, 26, 10, .06); --tint: color-mix(in srgb, var(--primary) 14%, transparent); }
:root[data-theme="dark"] { --shadow: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --shadow: none; } }
/* the page title is the big thing; the house name is small above it */
header.top { padding: 18px 0 6px; }
.house { font-size: .8125rem; font-weight: 700; color: var(--muted); letter-spacing: .01em; line-height: 1.3; }
.sub { font-size: 1.75rem; font-weight: 800; letter-spacing: -.025em; line-height: 1.15; color: var(--ink); margin: 2px 0 0; }
h1 { font-size: 1.75rem; font-weight: 800; letter-spacing: -.025em; }
h2 { font-size: 1.0625rem; font-weight: 700; letter-spacing: -.01em; margin: 28px 0 8px; }
.big { font-size: 2.25rem; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.money { font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
label { font-weight: 600; font-size: .9rem; color: var(--muted); }
/* buttons: pills; one filled per screen, the rest tonal or text */
.btn { border: 0; border-radius: 999px; background: var(--soft); color: var(--ink); font-weight: 700; padding: 10px 22px; letter-spacing: -.005em; }
.btn.primary, .btn.good { background: var(--primary); color: var(--on-primary); }
.btn.danger { background: var(--bad-soft); color: var(--bad); }
.btn.text { background: none; color: var(--primary); padding-inline: 12px; }
.btn.text.danger { background: none; color: var(--bad); }
.btn.small { padding: 6px 18px; }
.btn:disabled, .btn[aria-busy="true"] { opacity: .55; cursor: default; }
.btn:active { transform: scale(.97); }
/* surfaces */
.card { border: 0; border-radius: var(--r-card); padding: 18px; box-shadow: var(--shadow); }
.rows, .tile { border: 0; border-radius: var(--r-card); box-shadow: var(--shadow); }
:root[data-theme="dark"] .card, :root[data-theme="dark"] .rows, :root[data-theme="dark"] .tile { border: 1px solid var(--line); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .card, :root:not([data-theme="light"]) .rows, :root:not([data-theme="light"]) .tile { border: 1px solid var(--line); } }
.alert, .banner, .flash { border-radius: 16px; }
input[type=text], input[type=email], input[type=url], input[type=tel], input[type=date], input[type=number], input[type=password], input[type=search], select, textarea { border-radius: 14px; background: var(--card); }
/* the bottom bar: the current tab gets a soft pill behind its icon */
nav.botnav { border-top: 0; box-shadow: 0 -1px 0 var(--line), 0 -10px 30px rgba(43, 26, 10, .05); view-transition-name: botnav; }
nav.botnav a { position: relative; gap: 3px; font-size: .75rem; font-weight: 700; }
nav.botnav a .ic, nav.botnav a span { position: relative; z-index: 1; }
nav.botnav a[aria-current="page"]::before { content: ""; position: absolute; top: 7px; width: 60px; height: 32px; border-radius: 16px; background: var(--soft); background: var(--tint); }
@media (min-width: 960px) { nav.botnav a[aria-current="page"]::before { display: none; } }
/* motion: pages cross-fade (the bar stays put); a tap is felt at once */
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
  ::view-transition-old(root), ::view-transition-new(root) { animation-duration: .14s; }
}

.group-label.late { color: var(--bad); }
.group-label.soon { color: var(--warn); }

/* a bill row: name and amount, then the actions across the full width */
.row-item.bill .pay { justify-self: stretch; width: 100%; gap: 8px; }
.row-item.bill .pay > *, .row-item.bill .pay form { flex: 1 1 0; }
.row-item.bill .pay .btn { width: 100%; }
.row-item.bill .row-side > form { grid-column: 1 / -1; justify-self: start; }
.row-item.bill .row-side > form .btn.text { padding-inline: 0; }
.day-head { margin: 14px 0 0; padding-top: 4px; font-size: .75rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.day-head:first-child { margin-top: 10px; }
.day-head.late { color: var(--bad); }
.day-head.soon { color: var(--warn); }
.day-head + .row-item { border-top: 0 !important; padding-top: 4px; }
.card.house-head .house { color: var(--ink); font-weight: 800; letter-spacing: -.02em; }

/* feedback at the moment of closing (app.js "felt"): green with a check, the row slides away */
.btn.felt, .btn.felt:active { background: var(--ok); color: #fff; }
.btn.felt::before { content: "✓"; margin-right: 6px; font-weight: 800; }
.tick.felt::before { background: var(--ok); border-color: var(--ok); }
.tick.felt::after { content: "✓"; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 800; }
.tick { position: relative; }
.row-item.leaving { opacity: 0; transform: translateX(28px); transition: opacity .22s ease-out .04s, transform .22s ease-out .04s; }
@keyframes pop { 0% { transform: scale(1); } 45% { transform: scale(1.08); } 100% { transform: scale(1); } }
.btn.felt, .tick.felt { animation: pop .22s ease-out; }

/* compact: the same information in less height */
.row-item { padding: 10px 0; gap: 10px; }
.row-item .row-t { line-height: 1.3; }
.row-item .av { width: 36px; height: 36px; font-size: 1.1rem; }
.row-who { color: var(--muted); font-size: .9rem; text-align: right; flex: none; }
.day-head + .row-item { padding-top: 2px; }
.card.items .row-item:has(> .row-t) { min-height: 44px; }
.tag.kudos { margin: 0; }
.clamp1 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card.slim { padding: 14px 16px; }
.meter { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: center; font-size: .9rem; }
.meter > .bar { grid-column: 1 / -1; height: 8px; }
.meter span { color: var(--muted); }
.tile { min-height: 76px; padding: 10px 6px; gap: 4px; font-size: .82rem; }
.tile .ic { width: 26px; height: 26px; }
.cat-item { padding: 10px 12px; margin: 6px 0; }
.cat-ic { width: 40px; height: 40px; }
.pinbtn { min-width: 0; padding: 4px 10px; flex-direction: row; gap: 4px; font-size: .78rem; }
.person { padding: 8px 0; }
.card { margin: 10px 0; }
h2 { margin: 22px 0 6px; }
.row-t.wrap { white-space: normal; overflow: visible; }
.person .grow strong { display: block; }
.person .grow strong span { display: inline; } .person .grow strong .tag { display: inline-block; }
.pinbtn { width: 44px; min-width: 44px; padding: 0; position: relative; }
.pinbtn > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Explorar: one clean surface with dividers, plain icons (no boxes) */
ul.cat { background: var(--card); border-radius: var(--r-card); box-shadow: var(--shadow); overflow: hidden; margin: 8px 0; }
:root[data-theme="dark"] ul.cat { border: 1px solid var(--line); }
ul.cat > li.card.cat-item { margin: 0; border-radius: 0; box-shadow: none; background: transparent; border: 0; padding: 10px 14px; }
ul.cat > li.card.cat-item + li.card.cat-item { border-top: 1px solid var(--line); }
.cat-ic { background: none; width: 28px; height: 28px; border-radius: 0; }
.pinbtn { background: none; }
.pinbtn.on { background: none; border: 0; }
.pinbtn .ic { color: var(--muted); }
.pinbtn.on .ic { color: var(--primary); fill: var(--primary); }

/* one-tap voting on the home card: the options are the buttons */
.row-item.poll-card { display: block; }
.row-item.poll-card > a.row-main { display: block; color: var(--ink); text-decoration: none; margin-bottom: 8px; }
.opts { display: flex; flex-wrap: wrap; gap: 8px; }
.opts form { flex: 1 1 40%; margin: 0; }
.opts .btn.opt { width: 100%; }
.row-t.wrap { max-width: none; margin: 0; padding: 0; }

/* a caption is at most two short lines (checked for every row in both languages by scripts/check_captions.py) */
.cap { font-size: .8rem; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; white-space: normal; }
.pay + .pay { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 12px; }

/* the house plant */
.plant-row { display: flex; align-items: center; gap: 14px; }
.plant { width: 70px; height: 103px; flex: none; }
.pl-pot { fill: var(--primary); }
.pl-stem { fill: none; stroke: var(--ok); stroke-width: 4; stroke-linecap: round; }
.pl-leaf { fill: var(--ok); }
.plant-thirsty .pl-leaf { fill: #a39a52; }
.plant-thirsty .pl-stem { stroke: #8a8240; }
.pl-flower { fill: var(--primary); opacity: .9; }
.pl-core { fill: #f5c542; }
@media (prefers-reduced-motion: no-preference) {
  .pl-top { transform-box: fill-box; transform-origin: 50% 100%; }
  .plant-thriving .pl-top, .plant-growing .pl-top { animation: sway 4.5s ease-in-out infinite alternate; }
  @keyframes sway { from { transform: rotate(-2.5deg); } to { transform: rotate(2.5deg); } }
}

/* stickers: one tap on the hands opens the row; one tap on a sticker sends it */
details.stickers { margin: 0; flex: none; }
details.stickers > summary { list-style: none; padding: 0 16px; }
details.stickers > summary::before { display: none; }
.sticker-row { display: flex; gap: 6px; margin-top: 8px; }
.sticker-row form { margin: 0; }
.stk-btn { width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--soft); font-size: 1.35rem; cursor: pointer; }
.stk-btn:active { transform: scale(.9); }
.stk { display: inline-flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.row-item:has(details.stickers[open]) { flex-wrap: wrap; }
.row-item:has(details.stickers[open]) details.stickers { flex-basis: 100%; }

.card-preview { width: 100%; max-width: 300px; height: auto; aspect-ratio: 9 / 16; border-radius: 16px; display: block; margin: 0 auto; background: var(--soft); }
.row-line { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.row-line .row-t { flex: 1 1 auto; }
.confetti { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 50; }

/* ===== v3 (2026-10-12): large text, visible edges, bigger targets (docs/sim/usability.md F-06 to F-08, F-25, F-32, F-33) ===== */
/* "Letra grande" in Perfil, Aparência: the root grows, and everything sized in rem (text, buttons, fields, rows) grows with it */
:root[data-text="large"] { font-size: 125%; }
:root[data-text="larger"] { font-size: 150%; }
:root[data-text="huge"] { font-size: 200%; }
.btn { min-height: 3rem; border: 1.5px solid var(--edge); white-space: normal; text-align: center; line-height: 1.25; overflow-wrap: break-word; }
.quick-add .btn { flex: none; white-space: nowrap; }
.btn.small { min-height: 2.75rem; }
.btn.primary, .btn.good { border-color: var(--primary); }
.btn.danger { border-color: var(--bad); }
.btn.text, .btn.text.danger { border-color: transparent; }
.btn.felt, .btn.felt:active { border-color: var(--ok); }
input[type=text], input[type=email], input[type=url], input[type=tel], input[type=date], input[type=number], input[type=password], input[type=search], select, textarea { min-height: 3rem; border-color: var(--edge); }
textarea { min-height: 6rem; }
input.switch { background: var(--edge); width: 3rem; height: 1.75rem; }
input.switch::after { width: 1.375rem; height: 1.375rem; top: .1875rem; left: .1875rem; }
input.switch:checked { background: var(--ok); }
input.switch:checked::after { transform: translateX(1.25rem); }
.chips label.chip { border-color: var(--edge); min-width: 3rem; min-height: 3rem; }
.tick { width: 2.75rem; height: 2.75rem; }
.tick:focus-visible, button:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.tick:focus-visible { border-radius: 50%; }
a.row-t, .link-tap { display: flex; align-items: center; min-height: 2.75rem; }
.link-tap { display: inline-flex; }
.chip-link { min-height: 2.75rem; }
.chip-row { flex-wrap: wrap; overflow: visible; margin-inline: 0; padding-inline: 0; }
.row.nowrap.pay { flex-wrap: wrap; }
.row-item.bill .pay > *, .row-item.bill .pay form { flex: 1 1 8rem; }
.row-item.bill .row-main { min-width: 0; }
body.has-nav { padding-bottom: calc(5rem + env(safe-area-inset-bottom)); }
nav.botnav a { min-height: 3.75rem; }
.check { align-items: flex-start; padding: 6px 0; min-height: 2.75rem; }
.check input { margin-top: 1px; }
.check > span { font-weight: 700; }
.check > span > .muted { font-weight: 400; margin-top: 2px; }
.check > span > .block { display: block; }
.alert .btn { white-space: nowrap; min-width: 4.5rem; }
:root[data-text="larger"] .card.items .row-item, :root[data-text="huge"] .card.items .row-item { flex-wrap: wrap; }
.row-item > .row-main { min-width: 0; }

/* the toast that can be taken back: eight seconds, the button is the second thing in it */
.flash.undo:not(.err) { display: flex; align-items: center; gap: 4px; padding: 2px 4px 2px 18px; animation: toast8 8s forwards; }
.flash.undo form { margin: 0; }
.flash.undo .undo-btn { min-height: 2.75rem; padding: 0 16px; border: 0; border-radius: 999px; background: transparent; color: var(--bg); font: inherit; font-weight: 800; text-decoration: underline; cursor: pointer; }
@keyframes toast8 { 0% { opacity: 0; } 3%, 94% { opacity: 1; } 100% { opacity: 0; visibility: hidden; } }

/* "Você pagou?" when the person comes back from the bank app */
.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; max-width: 640px; margin: 0 auto; background: var(--card); color: var(--ink); border-radius: 20px 20px 0 0;
  box-shadow: 0 -8px 30px rgba(0, 0, 0, .28); padding: 18px 16px calc(18px + env(safe-area-inset-bottom)); border: 1px solid var(--line); }
.sheet p { margin: 0 0 12px; font-weight: 700; }
.sheet .row { gap: 10px; }
.sheet .row > * { flex: 1 1 8rem; }
.sheet form { margin: 0; }
.sheet .btn { width: 100%; }

/* small blocks of the shortcuts */
.changes { background: var(--soft); border-radius: 16px; padding: 10px 16px; margin: 10px 0; font-size: .9375rem; }
.changes p { margin: 2px 0; }
.chip-form { display: inline; margin: 0; }
.quick-add { display: flex; gap: 8px; align-items: stretch; }
.quick-add input { flex: 1 1 auto; min-width: 0; }
.preview-line { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-top: 1px solid var(--line); }
.preview-line:first-child { border-top: 0; }
.preview-line span:first-child { color: var(--muted); }
html[data-discreet="1"] .money:not(.shown) { filter: blur(.35em); }
html[data-discreet="1"] .money:not(.shown):active, html[data-discreet="1"] .money:not(.shown):focus { filter: none; }

/* "Modo simples": only what is owed and the next chore, bigger buttons (Perfil, Aparência) */
html[data-simple="1"] .chip-row, html[data-simple="1"] .changes, html[data-simple="1"] nav.rows.spaced { display: none; }
html[data-simple="1"] .btn { min-height: 3.5rem; font-size: 1.0625rem; }
ul.plain > li > a:first-child { display: inline-flex; align-items: center; min-height: 2.75rem; }
.cat-main { min-height: 2.75rem; }

/* the owner's dashboard: small bar charts drawn by the server as SVG */
.chart { display: block; width: 100%; height: 64px; }
.chart rect { fill: var(--primary); opacity: .85; }

/* large text (found with scripts/check_text_size.py): the tab bar keeps its labels small, the two money figures stack, the shortcut tiles go one per row */
:root[data-text="larger"] nav.botnav a { font-size: .5rem; }
:root[data-text="huge"] nav.botnav a { font-size: .4rem; }
:root[data-text="larger"] nav.botnav a .ic, :root[data-text="huge"] nav.botnav a .ic { width: 1.4rem; height: 1.4rem; }
:root[data-text="larger"] .money-top, :root[data-text="huge"] .money-top { flex-direction: column; align-items: flex-start; gap: 8px; }
:root[data-text="larger"] .tiles, :root[data-text="huge"] .tiles { grid-template-columns: 1fr; }

/* owner console: the table of houses scrolls sideways on a phone; the filters sit in a grid */
.tblwrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.houses { min-width: 640px; }
table.houses th a { color: inherit; white-space: nowrap; }
.filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
table.houses td:first-child, table.houses td:nth-child(5) { white-space: nowrap; }

/* search: the magnifier beside the avatar; the field and its results */
.top-btns { display: flex; gap: 8px; flex: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* rotation: a list to drag; the number fields stay for browsers without scripts */
.rot-list { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 6px; }
.rot-list li { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--card, #fff); }
.rot-list .nm { flex: 1; font-weight: 600; margin: 0; }
.rot-list input { width: 3em; text-align: center; }
.rot .grip { display: none; touch-action: none; cursor: grab; color: var(--muted); font-size: 1.3rem; letter-spacing: -2px; padding: 6px 4px; user-select: none; }
.rot.js .grip { display: inline-block; }
.rot.js .rot-list input { display: none; }
.rot-btns { display: flex; gap: 4px; flex: none; }
.rot-list li.drag { box-shadow: 0 4px 14px rgba(0, 0, 0, .18); opacity: .9; }
.rot-out li { opacity: .75; }
.rot-h { margin: 10px 0 6px; font-weight: 600; color: var(--muted); font-size: .9rem; }
.rot-out:empty::before { content: "–"; color: var(--muted); padding-left: 4px; }

nav.botnav a { position: relative; }
.badge.nav { position: absolute; top: 2px; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px; font-size: .7rem; line-height: 18px; text-align: center; border-radius: 9px; }
.rot-out [data-up], .rot-out [data-down] { display: none; }

.thumb { display: inline-block; margin-top: 6px; } .thumb img { width: 96px; height: 96px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); }

/* views of the same subject (Minha semana | Casa, Lista | Calendário): links that look like a segmented control */
nav.views { margin: 4px 0 12px; flex-wrap: wrap; }
nav.views .btn { flex: 1 1 auto; text-align: center; white-space: nowrap; }
nav.views .btn.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.weekstrip { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin: 6px 0 14px; text-align: center; }
.weekstrip div { border: 1px solid var(--line); border-radius: 10px; padding: 6px 0 4px; font-size: .78rem; background: var(--card, #fff); }
.weekstrip b { display: block; font-size: 1.05rem; line-height: 1.25; }
.weekstrip .dot { display: block; height: 14px; line-height: 14px; font-size: .9rem; }
.weekstrip .today { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary) inset; font-weight: 600; }
.weekstrip .late { border-color: var(--bad, #a23a2a); color: var(--bad, #a23a2a); }
.weekstrip .done { color: var(--good, #1f6b5a); }

form.steps fieldset.step { border: 0; margin: 0; padding: 0; min-width: 0; }
form.steps fieldset.step legend { font: 700 1.05rem var(--display, inherit); padding: 0; margin-bottom: 6px; }
form.steps .actions-sticky { display: flex; gap: 8px; }
form.steps .actions-sticky .wide { flex: 1; }

.dots { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.dot-p { font-size: 1rem; line-height: 1; color: var(--muted); }
.dot-p.paid { color: var(--good, #1f6b5a); } .dot-p.said { color: var(--warn, #9a5b00); }

h4.grp { margin: 14px 0 2px; font: 600 .74rem var(--mono, inherit); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }

/* the week as a grid: a row per person, a column per day; scrolls sideways on a phone, the names stay in view */
.wrap-x { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--card, #fff); margin: 6px 0; }
table.shifts { border-collapse: collapse; min-width: 560px; width: 100%; font-size: .82rem; }
table.shifts th, table.shifts td { padding: 6px 6px; border-bottom: 1px solid var(--line); border-left: 1px solid var(--line); text-align: left; vertical-align: top; }
table.shifts thead th { font-weight: 600; text-align: center; white-space: nowrap; }
table.shifts tbody th { position: sticky; left: 0; background: var(--card, #fff); white-space: nowrap; border-left: 0; z-index: 1; }
table.shifts .today { background: color-mix(in srgb, var(--primary) 10%, transparent); }
table.shifts tr.mine th, table.shifts tr.mine td { font-weight: 600; }
.shift { display: block; padding: 1px 6px; margin: 1px 0; border-radius: 6px; background: var(--soft); }
.shift.done { text-decoration: line-through; opacity: .6; }

/* ---- Início: what needs this person, as collapsed cards with a counter (grid or compact list) and short task rows ---- */
.hbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 20px 0 8px; }
.hbar h2 { margin: 0; }
.hview { display: inline-flex; gap: 2px; padding: 3px; background: var(--soft); border-radius: 999px; }
.ib { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--muted); text-decoration: none; cursor: pointer; font: inherit; }
.ib .ic { width: 20px; height: 20px; }
.ib:active { background: var(--soft); }
.hview .ib { width: 40px; height: 40px; }
.hview .ib[aria-pressed="true"] { background: var(--card); color: var(--ink); box-shadow: var(--shadow); }
.cnt { display: inline-grid; place-items: center; flex: none; min-width: 26px; height: 26px; padding: 0 8px; border-radius: 999px; background: var(--soft); color: var(--ink); font-size: .85rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.cnt.bad { background: var(--bad-soft); color: var(--bad); }
.cnt.warn { background: var(--warn-soft); color: var(--warn); }
.hgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.htile { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-height: 112px; padding: 14px; text-align: left; font: inherit; color: var(--ink); background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); cursor: pointer; }
.htile .hi { display: grid; place-items: center; width: 40px; height: 40px; margin-bottom: 8px; border-radius: 12px; background: var(--soft); color: var(--primary); }
.htile .hi .ic { width: 22px; height: 22px; }
.htile .cnt { position: absolute; top: 12px; right: 12px; }
.htile .ht { font-weight: 700; line-height: 1.2; }
.htile .hs { font-size: .8rem; line-height: 1.25; color: var(--muted); overflow-wrap: anywhere; }
.htile[aria-expanded="true"] { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); }
.hpanels { margin-top: 10px; }
.hpanels .hpanel > .card:first-of-type, .hpanels .hpanel > .rows:first-of-type { margin-top: 0; }
.hph { margin: 4px 2px 8px; font-size: 1rem; }
.hlist .hpanel { padding: 0 0 8px; border-top: 1px solid var(--line); background: var(--soft); }
.hlist .hpanel > .card, .hlist .hpanel > .rows { margin: 8px 8px 0; }
.hrow[aria-expanded="true"] .row-chev { transform: rotate(135deg); }
.hrow + .hpanel + .hrow { border-top: 1px solid var(--line); }
.rows > .row-item { padding-inline: 16px; }
.rows > .row-item + .row-item { border-top: 1px solid var(--line); }
/* a chore on the home: tick, name, small icons for what it carries, how late, and a swap button; nothing under the name */
.trows { padding-block: 0; }
.trow { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 4px 0; }
.trow + .trow, .swrow + .trow { border-top: 1px solid var(--line); }
.trow .tick { margin: 0 -8px 0 -6px; }
.tmain { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; flex-wrap: wrap; gap: 2px 8px; }
.tname { font-weight: 600; overflow-wrap: anywhere; }
.ti { display: inline-flex; align-items: center; gap: 3px; color: var(--muted); font-size: .8rem; }
.ti .ic { width: 16px; height: 16px; }
.ti.warn { color: var(--warn); }
.trow .row-day { flex: none; }
.trow .ib { margin-right: -10px; }
.swrow { display: flex; align-items: center; gap: 8px; padding: 0 0 10px 44px; overflow-x: auto; scrollbar-width: none; }
.swrow[hidden] { display: none; }
.swrow::-webkit-scrollbar { display: none; }
.swrow form { flex: none; margin: 0; }
.swrow .muted { flex: none; }
.legend { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 0; padding: 8px 0 10px; border-top: 1px solid var(--line); font-size: .78rem; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 4px; }
.legend .ic { width: 14px; height: 14px; }
.row-item.vrow { flex-wrap: wrap; }
.vrow .vact { flex: 1 1 100%; display: flex; gap: 8px; }
.vrow .vact form { margin: 0; }
/* inside the home's cards the bills keep their rows, only tighter */
.hpanel .row-item.bill { padding-block: 10px; }
.hpanel .totals-more { margin: 8px 0 0; }
.paid-wrap { display: contents; }
.row-item.mrow { flex-wrap: wrap; }
.mrow .row-main { flex: 1 1 12rem; }
.mmark { flex: 1 1 100%; display: flex; gap: 8px; margin: 0; }
.mmark input { flex: 1 1 auto; min-width: 0; }
.mmark .btn { flex: 1 1 0; }
.mmark { flex-wrap: wrap; }
.mmark input { flex: 1 1 100%; }

/* a bill in the house list: the whole row is the link; name and relative due on the left, amount and who paid on the right */
.billrow { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; color: var(--ink); text-decoration: none; }
.billrow .row-main { display: flex; flex-direction: column; min-width: 0; }
.billrow .row-side { display: flex; flex-direction: column; align-items: flex-end; flex: none; }
textarea.code { resize: none; }
.rowlink .lead { display: inline-flex; flex: none; width: 24px; color: var(--muted); }
.rowlink .lead .ic { width: 22px; height: 22px; }

/* rule suggestions: a title and its line to tick, the text editable under "Mudar o texto"; the save button stays in reach */
.sugs .sug { padding: 10px 0; border-top: 1px solid var(--line); }
.sugs .sug:first-child { border-top: 0; }
.sugline { display: flex; align-items: flex-start; gap: 12px; min-height: 44px; }
.sugline input[type="checkbox"] { width: 24px; height: 24px; flex: none; margin-top: 2px; }
.sugline .row-s { display: block; }
.sugedit > summary { font-size: .875rem; color: var(--muted); min-height: 36px; margin-left: 36px; }
.stickybar { position: sticky; bottom: 76px; padding: 8px 0; background: var(--bg); z-index: 5; }
.add-line .chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.add-line .chips .chip { flex: none; }
.chip-row { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.chip-row .chip-link { flex: none; }
textarea.code.msg { resize: none; }
.billrow .row-main { flex: 1; }
form.row[role="search"] .btn.small { flex: none; }
.row.nowrap { flex-wrap: nowrap; }
.card .billrow { display: flex; width: 100%; }

/* Calendário: what I receive is told apart from what I pay by a green edge and a label, not by the status colour alone */
.cal-chip.recv { border-left: 4px solid var(--good, #2f6b3f); }
p.right { text-align: right; margin: 4px 0; }

/* Casa: the pin buttons show only while "Editar atalhos" is on; a pinned row carries a small pin */
body:not(.pinning) .cat-item > form { display: none; }
.pinned-mark { display: inline-flex; vertical-align: middle; color: var(--accent); }
.pinned-mark .ic { width: 14px; height: 14px; }

/* Aparência: "Aa" at each text size, each one a step larger than the last */
.aa { flex: none; width: 40px; text-align: center; font-weight: 700; color: var(--muted); line-height: 1; }
.aa-normal { font-size: .9rem; } .aa-large { font-size: 1.1rem; } .aa-larger { font-size: 1.3rem; } .aa-huge { font-size: 1.6rem; }
input[type=search]::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }
.card > .empty, .card .empty { padding: 16px 0; }
.empty { background: none; }

/* one disclosure look: secondary "open more" lines are quiet (muted, regular weight); only "+ Novo ..." keeps the accent */
details:not(.new):not(.stickers) > summary { color: var(--muted); font-weight: 500; }
/* one row anatomy: every list row is at least 56 px tall */
.row-item { min-height: 56px; }
.mrow .mmark, .mrow .vact form { flex-wrap: wrap; }
.mnote { flex: 1 1 100%; min-height: 40px; font-size: .875rem; }
mark { background: var(--accent-soft); color: inherit; border-radius: 3px; padding: 0 1px; }

/* one bottom sheet for "more options" on a row (Moradores, Mural): the panel moves in, forms keep working */
.opback { position: fixed; inset: 0; z-index: 50; background: rgba(0, 0, 0, .4); }
.opsheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 51; max-width: 640px; margin: 0 auto; max-height: 85vh; overflow-y: auto; background: var(--card); color: var(--ink);
  border-radius: 20px 20px 0 0; box-shadow: 0 -8px 30px rgba(0, 0, 0, .28); padding: 8px 16px calc(20px + env(safe-area-inset-bottom)); border: 1px solid var(--line); }
.opsheet .ophead { display: flex; align-items: center; justify-content: space-between; gap: 8px; position: sticky; top: 0; background: var(--card); padding: 6px 0; }
.opsheet .ophead strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* moving between pages: the browser cross-fades the old page into the new one instead of flashing white (the same-origin navigation transition); a thin bar shows a slow load */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .14s; }
@media (prefers-reduced-motion: reduce) { @view-transition { navigation: none; } }
html.navigating::before { content: ""; position: fixed; top: 0; left: 0; height: 3px; width: 100%; z-index: 100; background: var(--primary, #2f6b3f); transform-origin: left; animation: navbar 8s cubic-bezier(.1, .6, .2, 1) forwards; }
@keyframes navbar { from { transform: scaleX(0); } to { transform: scaleX(.92); } }
@media (prefers-reduced-motion: reduce) { html.navigating::before { animation: none; transform: scaleX(.6); } }
a:active, .rowlink:active, .htile:active { opacity: .7; }
