/* GetFullDiary app (Phase 5). Brand: dark #0A0A0A, lime #8DC63F, Space Grotesk headings, Inter body.
   One spacing scale: 4 8 12 16 24 32 48. Fonts are served from the app itself (no Google). */
@font-face { font-family: "Inter"; src: url("fonts/inter.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Space Grotesk"; src: url("fonts/space-grotesk.woff2") format("woff2"); font-weight: 300 700; font-display: swap; }
:root {
  --bg: #0A0A0A;
  --surface: #141414;
  --raised: #202020;
  --line: #262626;
  --line-2: #3A3A3A;
  --text: #F4F4F1;
  --muted: #A9A9A4;
  --faint: #8C8C87;
  --lime: #8DC63F;
  --lime-ink: #0A0A0A;
  --lime-soft: rgba(141, 198, 63, 0.14);
  --amber: #F2B84B;
  --red: #FF8A80;
  --paper: #F5F4EF;
  --paper-ink: #1B1B1B;
  --head: "Space Grotesk", "Arial", sans-serif;
  --body: "Inter", "Arial", sans-serif;
  --nav-h: 64px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.5 var(--body);
  -webkit-font-smoothing: antialiased;
}
p, h1, h2, ul, ol, dl, dd, figure { margin: 0; }
p, li, dd, dt, .item-title, .fold-t, .item-meta, .fold-m, .mini-t { text-wrap: pretty; }
h1, .h1-sub, .state-t, .empty-t { text-wrap: balance; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--lime); outline-offset: 2px; border-radius: 8px; }
.ic { flex: none; display: block; }

/* ---------- shell ---------- */
.app {
  max-width: 560px;
  margin: 0 auto;
  padding: calc(16px + env(safe-area-inset-top)) 16px calc(var(--nav-h) + 32px + env(safe-area-inset-bottom));
}
.is-signin .app, .is-index .app { padding-bottom: 32px; }
.is-sub .app { padding-bottom: calc(76px + 32px + env(safe-area-inset-bottom)); }
.actbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: rgba(10, 10, 10, 0.94); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
}
.actbar-in { max-width: 528px; margin: 0 auto; }

.nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  height: calc(var(--nav-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  display: grid; grid-template-columns: repeat(3, 1fr);
  background: rgba(10, 10, 10, 0.94);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
}
.nav-brand { display: none; }
.tab {
  position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  color: var(--muted); text-decoration: none; font-size: 12px; font-weight: 500;
}
.tab.on { color: var(--lime); }
.badge {
  position: absolute; top: 6px; left: calc(50% + 6px);
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  display: grid; place-items: center;
  background: var(--lime); color: var(--lime-ink); font-size: 11px; font-weight: 700;
}

/* ---------- headings ---------- */
.head { margin-bottom: 24px; }
.head-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
h1 { font: 700 32px/1.1 var(--head); letter-spacing: -0.02em; }
.date { color: var(--muted); font-size: 15px; white-space: nowrap; }
.purpose { margin-top: 8px; color: var(--muted); font-size: 15px; line-height: 1.45; }
.back {
  display: inline-flex; align-items: center; gap: 4px; min-height: 44px; margin-left: -6px; padding-right: 8px;
  color: var(--muted); text-decoration: none; font-size: 15px; font-weight: 500;
}
.kicker { margin-top: 8px; color: var(--lime); font-size: 13px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; }
.h1-sub { margin-top: 8px; font: 700 26px/1.2 var(--head); letter-spacing: -0.01em; }

.sec-h { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; font: 700 20px/1.2 var(--head); }
.count {
  display: inline-grid; place-items: center; min-width: 24px; height: 24px; padding: 0 7px; border-radius: 12px;
  background: var(--raised); color: var(--text); font: 600 13px/1 var(--body);
}
.count-on { background: var(--lime); color: var(--lime-ink); }
.summary { display: flex; align-items: center; gap: 8px; margin-bottom: 24px; color: var(--muted); font-size: 15px; }
.summary .ic { color: var(--lime); }
.searchbox + .summary { margin-top: 16px; }
.sec + .sec { margin-top: 32px; }
.muted { color: var(--muted); }
.late { color: var(--amber); font-weight: 600; }
.ok { color: var(--lime); font-weight: 600; }
.link { color: var(--lime); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- cards and list items ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 16px; }
.card-h { display: flex; align-items: baseline; justify-content: space-between; font: 700 20px/1.2 var(--head); }
.card-h-m { color: var(--muted); font: 400 14px/1 var(--body); }
.list { display: flex; flex-direction: column; gap: 12px; }

.item {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px;
  min-height: 72px; padding: 15px 16px 17px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
  color: var(--text); text-decoration: none;
  transition: transform 0.12s ease, border-color 0.12s ease;
}
.item.client { grid-template-columns: 1fr auto; }
.kind {
  width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
  background: var(--lime-soft); color: var(--lime);
}
.item-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.item-title { font-size: 16px; line-height: 1.35; font-weight: 600; }
.item-meta { color: var(--muted); font-size: 14px; line-height: 1.4; }
.item-when { color: var(--muted); font-size: 14px; line-height: 1.4; font-weight: 500; }
.item-when.late { color: var(--amber); font-weight: 600; }
.chev { color: var(--muted); }
.item:active, .btn:active, .choice:active, .qbtn:active { transform: scale(0.97); }
@media (hover: hover) { .item:hover, .choice:hover, .fold > summary:hover { border-color: var(--line-2); } }

/* folds (detail behind a tap) */
.fold { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; }
.fold > summary {
  list-style: none; cursor: pointer;
  display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 12px;
  min-height: 64px; padding: 15px 16px 17px;
}
.fold > summary::-webkit-details-marker { display: none; }
.fold-t { display: block; font-size: 16px; line-height: 1.35; font-weight: 600; }
.fold-m { display: block; margin-top: 4px; color: var(--muted); font-size: 14px; line-height: 1.4; }
.fold-ic { color: var(--muted); transition: transform 0.15s ease; }
details[open] > summary .fold-ic { transform: rotate(180deg); }
.minis { padding: 0 16px 4px; }
.mini {
  display: grid; grid-template-columns: 18px 1fr; gap: 12px; align-items: start;
  padding: 12px 0; border-top: 1px solid var(--line); color: var(--muted);
}
.mini .ic { margin-top: 2px; }
.mini-plain { grid-template-columns: 1fr; }
.mini-t { display: block; color: var(--text); font-size: 15px; line-height: 1.4; }
.mini-m { display: block; margin-top: 2px; font-size: 13px; line-height: 1.4; }
.mini-m:empty { display: none; }

/* ---------- Today ---------- */
.today-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; }
.today-grid > .area-needs { order: -1; }
.brief-time { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 14px; font-weight: 600; }
.brief-time .ic { color: var(--lime); }
.brief-lines { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.brief-lines li { position: relative; padding-left: 16px; font-size: 16px; line-height: 1.45; }
.brief-lines li::after {
  content: ""; position: absolute; left: 2px; top: 0.6em; width: 6px; height: 6px; border-radius: 50%; background: var(--line-2);
}
.brief { padding-bottom: 4px; }
.fold-inline { margin-top: 0; }
.fold-inline[open] { padding-bottom: 16px; }
.fold-inline summary {
  list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; min-height: 44px;
  color: var(--lime); font-size: 15px; font-weight: 600;
}
.fold-inline summary::-webkit-details-marker { display: none; }
.fold-inline .fold-ic { color: var(--lime); }
.brief-more dt { margin-top: 12px; color: var(--muted); font-size: 13px; font-weight: 600; }
.brief-more dt:first-child { margin-top: 0; }
.brief-more dd { margin-top: 4px; font-size: 15px; line-height: 1.45; }

.rows { margin-top: 12px; }
.row { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding: 12px 0; border-top: 1px solid var(--line); }
.row:last-child { padding-bottom: 0; }
.row dt { font-size: 15px; line-height: 1.4; }
.row-m { display: block; margin-top: 2px; color: var(--muted); font-size: 13px; line-height: 1.4; }
.amt { font: 700 18px/1.3 var(--head); white-space: nowrap; font-variant-numeric: tabular-nums; }
.amt-s { color: var(--muted); font: 600 14px/1.4 var(--body); }

.empty { padding: 32px 16px; text-align: center; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; }
.empty-ic { width: 56px; height: 56px; margin: 0 auto 16px; border-radius: 50%; display: grid; place-items: center; background: var(--lime-soft); color: var(--lime); }
.empty-t { font: 700 20px/1.25 var(--head); }
.empty-m { max-width: 30ch; margin: 8px auto 0; color: var(--muted); font-size: 15px; line-height: 1.45; }
.empty + .fold { margin-top: 12px; }
.aside-line { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; color: var(--muted); font-size: 14px; }
.aside-line .link { min-height: 44px; display: inline-flex; align-items: center; }

/* ---------- Clients ---------- */
.searchbox {
  display: flex; align-items: center; gap: 8px; height: 48px; padding: 0 16px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; color: var(--muted);
}
.searchbox input { flex: 1; min-width: 0; height: 100%; border: 0; background: transparent; color: var(--text); font: 16px var(--body); outline: none; }
.searchbox input::placeholder { color: var(--faint); }
.client-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.dot-needs {
  flex: none; padding: 2px 8px; border-radius: 999px; background: var(--lime); color: var(--lime-ink);
  font-size: 12px; line-height: 1.5; font-weight: 600; white-space: nowrap;
}
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.chip { padding: 2px 10px; border: 1px solid var(--line-2); border-radius: 999px; font-size: 13px; line-height: 1.5; font-weight: 500; }
.chip-on { color: var(--lime); border-color: rgba(141, 198, 63, 0.45); }
.client-state { margin-top: 4px; font-size: 15px; line-height: 1.4; }
.client-last { display: block; margin-top: 2px; color: var(--muted); font-size: 13px; }

/* ---------- one client ---------- */
.chips-lg { margin-top: 16px; }
.state-card { margin: 16px 0 12px; }
.state-k { color: var(--muted); font-size: 13px; font-weight: 600; }
.state-t { margin-top: 4px; font: 700 18px/1.3 var(--head); }
.state-m { margin-top: 4px; color: var(--muted); font-size: 15px; line-height: 1.45; }
.fold-sec > summary { grid-template-columns: 1fr auto; min-height: 56px; }
.fold-body { padding: 0 16px 16px; }
.kv li { display: grid; grid-template-columns: 96px 1fr; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.kv li:last-child { padding-bottom: 0; }
.kv-k { color: var(--muted); font-size: 14px; line-height: 1.45; }
.kv-v { font-size: 15px; line-height: 1.45; overflow-wrap: anywhere; }
.history li { display: grid; grid-template-columns: 76px 1fr; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.h-d { color: var(--muted); font-size: 13px; line-height: 1.6; font-weight: 600; }
.h-t { font-size: 15px; line-height: 1.45; }
.more { display: inline-flex; align-items: center; min-height: 44px; margin-top: 4px; }

/* ---------- Team ---------- */
.person > summary { grid-template-columns: 44px 1fr auto; }
.pic { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; }
.pic-ic { background: var(--raised); color: var(--lime); }
.pic-m { background: var(--lime-soft); color: var(--lime); font: 700 18px/1 var(--head); }
.role { color: var(--muted); font-size: 13px; font-weight: 500; }
.dot { width: 10px; height: 10px; border-radius: 50%; }
.dot-ok { background: var(--lime); }
.dot-wait { border: 2px solid var(--amber); }
.dot-idle { background: var(--line-2); }
.st { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; font-weight: 600; }
.st-ok { color: var(--lime); }
.st-wait { color: var(--amber); }
.st-bad { color: var(--red); }

/* ---------- approvals ---------- */
.to { margin-top: 0; color: var(--muted); font-size: 15px; line-height: 1.45; }
.head-sub { margin-bottom: 16px; }
.paper { margin-top: 16px; padding: 16px; border-radius: 16px; background: var(--paper); color: var(--paper-ink); font-size: 16px; line-height: 1.55; }
.paper p + p { margin-top: 12px; }
.bubble { margin-top: 16px; max-width: 92%; padding: 12px 16px; border-radius: 20px 20px 20px 6px; background: var(--raised); font-size: 16px; line-height: 1.45; }
.bubble p + p { margin-top: 8px; }
.checked { display: flex; align-items: flex-start; gap: 8px; margin-top: 16px; color: var(--muted); font-size: 14px; line-height: 1.45; }
.checked .ic { margin-top: 1px; color: var(--lime); }
.checked + .checked { margin-top: 8px; }
.checked-wait .ic { color: var(--amber); }
.checked-bad { color: var(--text); }
.checked-bad .ic { color: var(--red); }
.quiet-l { justify-content: flex-start; margin-top: 0; padding-left: 26px; }
.act { margin-top: 24px; }
.act-when { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-bottom: 12px; font-size: 15px; }
.act-when .ic { color: var(--muted); }
.act-when .link { margin-left: auto; min-height: 44px; display: inline-flex; align-items: center; }
.btn {
  display: flex; align-items: center; justify-content: center; width: 100%; height: 52px; padding: 0 16px;
  border: 0; border-radius: 14px; background: var(--lime); color: var(--lime-ink);
  font: 600 17px/1 var(--body); text-decoration: none; cursor: pointer; transition: transform 0.12s ease;
}
.btn-2 { background: transparent; color: var(--text); box-shadow: inset 0 0 0 1.5px var(--line-2); }
.quiet { display: flex; justify-content: center; gap: 24px; margin-top: 8px; }
.qbtn {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 4px;
  color: var(--text); font-size: 15px; font-weight: 500; text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 4px;
}
.quiet-1 { margin-top: 16px; }
.act-after { margin-top: 12px; color: var(--muted); font-size: 14px; line-height: 1.45; text-align: center; }
.act-left { margin-top: 0; text-align: left; }
.steps { display: flex; flex-direction: column; gap: 12px; }
.step { display: grid; grid-template-columns: 28px 1fr; gap: 12px; align-items: center; }
.step-n { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; box-shadow: inset 0 0 0 1.5px var(--line-2); font-size: 14px; font-weight: 600; }
.step-b { display: flex; flex-direction: column; gap: 8px; }
.step-m { color: var(--muted); font-size: 14px; line-height: 1.45; }
.step-top { align-items: start; }
.scope { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.scope code { padding: 8px 12px; border-radius: 10px; background: var(--raised); color: var(--text); font: 600 15px/1.3 ui-monospace, Menlo, Consolas, monospace; overflow-wrap: anywhere; }
.zoho-form { margin-top: 0; }
.pings { display: flex; flex-direction: column; gap: 8px; }
.ping { display: grid; grid-template-columns: 20px 1fr; gap: 12px; align-items: start; padding: 12px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.ping .ic { margin-top: 1px; color: var(--lime); }
.ping-t { display: block; font-size: 15px; font-weight: 600; line-height: 1.35; }
.ping-m { display: block; margin-top: 2px; color: var(--muted); font-size: 14px; line-height: 1.4; }
.steps + .quiet { margin-top: 16px; }
.diff { margin-top: 16px; display: flex; flex-direction: column; gap: 8px; }
.diff-row { padding: 12px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.diff-k { display: block; margin-bottom: 4px; font-size: 13px; font-weight: 600; }
.diff-was .diff-k { color: var(--red); }
.diff-new .diff-k { color: var(--lime); }
.diff-v { display: block; font-size: 15px; line-height: 1.45; }
.choices { margin-top: 8px; display: flex; flex-direction: column; gap: 12px; }
.choice {
  display: block; min-height: 72px; padding: 14px 16px 18px; border-radius: 16px; text-decoration: none; color: var(--text);
  background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--line-2); transition: transform 0.12s ease;
}
.choice-v { display: block; font: 700 22px/1.25 var(--head); overflow-wrap: anywhere; }
.choice-m { display: block; margin-top: 4px; color: var(--muted); font-size: 14px; line-height: 1.4; }

/* ---------- sign in ---------- */
.signin { max-width: 400px; margin: 0 auto; padding-top: 32px; display: flex; flex-direction: column; }
.signin-logo { margin-bottom: 16px; }
.signin-h { font: 700 28px/1.15 var(--head); letter-spacing: -0.01em; }
.signin-form { margin-top: 32px; display: flex; flex-direction: column; gap: 12px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field-l { font-size: 14px; font-weight: 600; }
.field input {
  height: 52px; padding: 0 16px; border-radius: 14px; border: 0; box-shadow: inset 0 0 0 1.5px var(--line-2);
  background: var(--surface); color: var(--text); font: 17px var(--body);
}
.field input::placeholder { color: var(--faint); }
.code-wrap { margin-top: 32px; }
.code-wrap .field-l { color: var(--muted); font-weight: 500; }
.code { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin-top: 8px; }
.code span { height: 52px; border-radius: 12px; background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--line); }
.signin-foot { display: flex; align-items: center; gap: 8px; margin-top: 32px; color: var(--muted); font-size: 14px; }

/* ---------- computer ---------- */
@media (min-width: 1024px) {
  .nav {
    top: 0; right: auto; width: 240px; height: auto; padding: 24px 16px;
    display: flex; flex-direction: column; gap: 4px;
    border-top: 0; border-right: 1px solid var(--line); background: var(--bg);
  }
  .nav-brand {
    display: flex; align-items: center; gap: 10px; margin: 0 0 24px 8px;
    color: var(--text); text-decoration: none; font: 700 18px/1 var(--head);
  }
  .tab { flex-direction: row; justify-content: flex-start; gap: 12px; min-height: 48px; padding: 0 12px; border-radius: 12px; font-size: 15px; }
  .tab.on { background: var(--lime-soft); }
  .badge { position: static; margin-left: auto; }
  .app { max-width: 1160px; margin: 0 0 0 240px; padding: 40px 48px 48px; }
  .is-sub .app { max-width: 640px; margin: 0 auto; }
  .actbar-in { max-width: 576px; }
  .is-today .today-grid > .area-needs { order: 0; }
  .is-today .today-grid {
    grid-template-columns: minmax(0, 1fr) 380px;
    grid-template-areas: "needs brief" "needs money" "needs progress" "needs aside";
    grid-template-rows: auto auto auto 1fr;
    gap: 24px 48px; align-items: start;
  }
  .area-brief { grid-area: brief; }
  .area-needs { grid-area: needs; }
  .area-money { grid-area: money; }
  .area-aside { grid-area: aside; }
  .area-progress { grid-area: progress; }
}

/* ---------- today's emails ---------- */
.seg-wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; margin-top: 16px; }
.seg-l { display: flex; align-items: center; gap: 8px; font-size: 15px; }
.seg-l .ic { color: var(--muted); }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 14px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.seg-o { display: grid; place-items: center; min-width: 72px; min-height: 44px; border-radius: 10px; color: var(--text); font-size: 15px; font-weight: 600; text-decoration: none; }
.seg-o { background: transparent; }
.seg-o.seg-on { background: var(--lime); color: var(--lime-ink); }
.batch { margin-top: 16px; }
.fold-p { color: var(--text); }
.paper-in { margin-top: 0; }
.shot { margin: 4px 0 0; }
.shot img { display: block; width: 100%; max-width: 360px; height: auto; margin-top: 8px; border-radius: 10px; background: #E6E5DF; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08); }
.paper-h { font-size: 14px; color: #4A4A46; }
.paper-h span { display: inline-block; min-width: 56px; font-weight: 600; color: var(--paper-ink); }
.paper .paper-h + .paper-h { margin-top: 4px; }
.paper-h + p:not(.paper-h) { margin-top: 16px; }
.fold-body > .quiet { margin-top: 8px; }

/* ---------- post ready ---------- */
.post-preview { position: relative; width: 216px; margin: 16px auto 0; border-radius: 16px; overflow: hidden; box-shadow: 0 0 0 1px var(--line); }
.post-preview img { display: block; width: 100%; height: auto; }
.play { position: absolute; left: 50%; top: 76%; width: 56px; height: 56px; margin: -28px 0 0 -28px; border-radius: 50%; display: grid; place-items: center; background: rgba(10, 10, 10, 0.72); color: var(--text); }
.dur { position: absolute; right: 8px; bottom: 8px; padding: 2px 8px; border-radius: 999px; background: rgba(10, 10, 10, 0.8); color: var(--text); font-size: 13px; font-weight: 600; }
.copies { margin-top: 16px; }
.copyblock { padding: 12px 16px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; }
.copy-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.copy-l { font-size: 14px; font-weight: 600; }
.copy-l .muted { font-weight: 400; }
.copy-t { font-size: 15px; line-height: 1.5; }
.copy-top + .copy-t { margin-top: 4px; }
.copy-t + .copy-t { margin-top: 8px; }
.btn-s {
  flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px; border-radius: 12px;
  color: var(--text); font-size: 14px; font-weight: 600; text-decoration: none; box-shadow: inset 0 0 0 1.5px var(--line-2);
}
.btn-s:active { transform: scale(0.97); }
button.btn-s { background: transparent; border: 0; font-family: inherit; cursor: pointer; }

/* ---------- money and progress graphs (one lime ramp, checked with the dataviz validator: paid, owed, offered) ---------- */
:root { --ramp-1: #8DC63F; --ramp-2: #6A9E2E; --ramp-3: #4A7520; --ramp-track: #26331A; }
.split { display: flex; gap: 2px; height: 16px; margin-top: 16px; }
.sp { min-width: 4px; }
.sp:first-child { border-radius: 4px 0 0 4px; }
.sp:last-child { border-radius: 0 4px 4px 0; }
.sp-paid { background: var(--ramp-1); }
.sp-owed { background: var(--ramp-2); }
.sp-offer { background: var(--ramp-3); }
.keyed { position: relative; padding-left: 20px; }
.key { position: absolute; left: 0; top: 5px; width: 10px; height: 10px; border-radius: 3px; }
.k-paid { background: var(--ramp-1); }
.k-owed { background: var(--ramp-2); }
.k-offer { background: var(--ramp-3); }
.chart-t { margin-top: 16px; color: var(--muted); font-size: 13px; font-weight: 600; }
.funnel { margin-top: 8px; display: flex; flex-direction: column; gap: 8px; }
.funnel li { display: grid; grid-template-columns: 64px 1fr 28px; align-items: center; gap: 12px; }
.f-l { font-size: 14px; }
.f-bar { height: 12px; }
.f-bar b { display: block; height: 100%; min-width: 4px; border-radius: 0 4px 4px 0; background: var(--ramp-1); }
.f-n { text-align: right; font: 700 15px/1 var(--head); font-variant-numeric: tabular-nums; }
.spots { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; margin-top: 8px; }
.spots i { height: 12px; border-radius: 4px; background: var(--ramp-track); }
.spots i.on { background: var(--ramp-1); }
.spots-m { margin-top: 8px; color: var(--muted); font-size: 13px; }

/* ---------- the real app (on top of the sketch styles) ---------- */
[hidden] { display: none !important; }
.is-sub .nav { display: none; }
.is-sub .app, .has-bar .app { padding-bottom: calc(76px + 32px + env(safe-area-inset-bottom)); }
.is-sub.has-bar .app { padding-bottom: calc(76px + 32px + env(safe-area-inset-bottom)); }
.loading { padding: 48px 0; color: var(--muted); text-align: center; }
.state-msg { padding: 48px 0; display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.state-msg .btn { max-width: 280px; }
.toast {
  position: fixed; left: 16px; right: 16px; bottom: calc(var(--nav-h) + 16px + env(safe-area-inset-bottom)); z-index: 20;
  max-width: 528px; margin: 0 auto; padding: 12px 16px; border-radius: 14px;
  background: var(--paper); color: var(--paper-ink); font-size: 15px; font-weight: 600; text-align: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}
.toast.bad { background: #FFD9D4; color: #4A0E08; }
.has-bar .toast, .is-sub .toast { bottom: calc(88px + env(safe-area-inset-bottom)); }
.busy { opacity: 0.6; pointer-events: none; }
button.btn, button.qbtn, button.choice, button.link, button.bar-link, button.seg-o { font-family: inherit; border: 0; cursor: pointer; }
button.qbtn, button.link, button.bar-link { background: transparent; padding: 0 4px; }
button.choice { width: 100%; text-align: left; }
button.link { font-size: inherit; padding: 0; }
.bar-link { display: block; margin-top: 8px; min-height: 44px; line-height: 44px; text-align: center; color: var(--text); font-size: 15px; font-weight: 500; text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 4px; }
.actbar .btn + .bar-link { margin-top: 4px; }
.tip { display: flex; align-items: flex-start; gap: 8px; margin-top: 16px; padding: 12px 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); color: var(--text); font-size: 14px; line-height: 1.45; }
.tip .ic { margin-top: 2px; color: var(--lime); }
.form-msg { min-height: 20px; color: var(--red); font-size: 14px; }
.form-msg:empty { display: none; }
.code-in { letter-spacing: 0.3em; font: 600 24px/1 var(--head) !important; text-align: center; }
.brief-wait { margin-top: 12px; padding-bottom: 12px; font-size: 16px; line-height: 1.45; }
.brief-time { flex-wrap: wrap; }
.brief-by { margin-left: auto; color: var(--faint); font-weight: 400; font-size: 13px; }
.mini-a { color: inherit; text-decoration: none; }
.minis li:first-child .mini { border-top: 1px solid var(--line); }
.tag { display: inline-block; margin-left: 6px; padding: 0 8px; border-radius: 999px; background: var(--raised); color: var(--muted); font-size: 12px; font-weight: 600; line-height: 1.6; vertical-align: 2px; }
.tag-bad { background: rgba(255, 138, 128, 0.14); color: var(--red); }
.is-out .fold-t { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--line-2); }
.media-note { display: flex; align-items: center; gap: 12px; margin-top: 16px; padding: 16px; border-radius: 16px; background: var(--surface); border: 1px dashed var(--line-2); color: var(--muted); font-size: 15px; line-height: 1.45; }
.media-note .ic { color: var(--lime); }
.post-preview video { display: block; width: 100%; height: auto; background: #000; }
.slides { display: flex; gap: 8px; margin-top: 16px; overflow-x: auto; scroll-snap-type: x mandatory; }
.slides img { flex: none; width: 72%; max-width: 280px; border-radius: 14px; scroll-snap-align: start; }
.detail { margin-top: 16px; font-size: 15px; line-height: 1.55; overflow-wrap: anywhere; }
.detail p + p { margin-top: 12px; }
.fold-why { margin-top: 16px; }
.why { font-size: 15px; line-height: 1.5; color: var(--muted); }
.edit { margin-top: 16px; }
.edit textarea {
  width: 100%; padding: 12px 16px; border: 0; border-radius: 14px; box-shadow: inset 0 0 0 1.5px var(--line-2);
  background: var(--surface); color: var(--text); font: 16px/1.5 var(--body); resize: vertical;
}
.edit textarea:focus { outline: none; box-shadow: inset 0 0 0 2px var(--lime); }
.change-box { margin-top: 16px; }
.save-free { margin-top: 12px; }
.summary-bad .ic { color: var(--red); }
.dot-bad { background: var(--red); }
.signed-in { margin-top: 32px; color: var(--muted); font-size: 14px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.signed-in .link { min-height: 44px; }
.h-more summary { list-style: none; cursor: pointer; }
.h-more summary::-webkit-details-marker { display: none; }
.h-more summary::after { content: " more"; color: var(--lime); font-weight: 600; }
.h-more[open] summary { display: none; }
.state-gap { height: 16px; }
.choices .choice:active { box-shadow: inset 0 0 0 2px var(--lime); }
.signin .quiet { justify-content: flex-start; }
.signin .btn { margin-top: 4px; }
@media (min-width: 1024px) {
  .is-sub .app { max-width: 640px; margin: 0 auto; padding-left: 16px; padding-right: 16px; }
  .is-bare .app, body:not(:has(.nav:not([hidden]))) .app { margin: 0 auto; }
  .toast { bottom: 24px; }
}
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

/* long words (web addresses) wrap instead of pushing the page sideways */
.history li > *, .kv li > *, .item-body, .fold > summary > span { min-width: 0; }
.h-t, .kv-v, .mini-t, .fold-m, .client-state, .detail, .copy-t, .paper, .bubble, .brief-lines li, .brief-more dd, .item-title { overflow-wrap: anywhere; }
