/* Investor app. Calm colours, large type, one figure per line. */
:root {
  --ground: #F2F5F3;
  --card: #FFFFFF;
  --ink: #12332E;
  --muted: #51635F;
  --line: #E6ECE9;
  --accent: #1F6F5E;
  --accent-soft: #E4F0EB;
  --bar: #2F8A74;
  --attention-bg: #FBF1E2;
  --attention-ink: #6E3C06;
  --danger: #9B2C2C;
  --received-bg: #E7EEF8;
  --received-ink: #1F4F8F;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--ground); color: var(--ink);
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px; line-height: 1.4; font-variant-numeric: tabular-nums;
}
#app { max-width: 520px; margin: 0 auto; padding: 20px 16px calc(96px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 18px; }
h1 { margin: 0; font-size: 26px; font-weight: 700; letter-spacing: -0.3px; }
h2 { margin: 0; font-size: 13px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.6px; }
p { margin: 0; }
a { color: var(--accent); }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.row.center { align-items: center; }
.grow { flex: 1; min-width: 0; }
.right { text-align: right; }

.card { background: var(--card); border-radius: 20px; padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.card.dark { background: var(--ink); color: #fff; }
.card.dark .muted { color: #C9DAD4; }
.card.attention, a.attention { background: var(--attention-bg); color: var(--attention-ink); }
a.card { text-decoration: none; color: inherit; }
.divider { height: 1px; background: var(--line); }
.figure { font-size: 20px; font-weight: 600; white-space: nowrap; }
.figure.big { font-size: 30px; font-weight: 700; letter-spacing: -0.4px; }
.label { font-size: 15px; color: var(--muted); }
.title { font-size: 16px; font-weight: 600; }

.chip { display: inline-flex; align-items: center; font-size: 12px; font-weight: 600; color: var(--accent); background: var(--accent-soft); border-radius: 8px; padding: 4px 8px; white-space: nowrap; }
.chip.plain { color: var(--muted); background: #ECEFED; }
.chip.amber { color: var(--attention-ink); background: var(--attention-bg); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }

.bar { height: 8px; border-radius: 4px; background: var(--line); overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 4px; background: var(--bar); }

button, .button {
  font: inherit; font-size: 17px; font-weight: 600; min-height: 52px; border-radius: 16px; border: 0; padding: 0 18px;
  background: var(--accent); color: #fff; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; text-decoration: none;
}
button.secondary, .button.secondary { background: transparent; color: var(--ink); border: 1.5px solid #B9C7C2; }
button.quiet { background: transparent; color: var(--accent); min-height: 44px; padding: 0 8px; font-size: 15px; }
button.danger { background: transparent; color: var(--danger); border: 1.5px solid #E3B8B8; }
button.pill { min-height: 44px; border-radius: 22px; font-size: 14px; font-weight: 500; background: var(--card); color: var(--ink); padding: 0 16px; }
button.pill[aria-pressed="true"] { background: var(--ink); color: #fff; font-weight: 600; }
button:disabled { opacity: 0.5; cursor: default; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 3px solid #7FB8A8; outline-offset: 2px; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }

label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 500; color: var(--muted); }
input, textarea, select {
  font: inherit; font-size: 17px; color: var(--ink); background: var(--card); border: 1.5px solid #C9D5D0; border-radius: 14px; padding: 14px; width: 100%;
}
textarea { min-height: 96px; resize: vertical; }
label.check { flex-direction: row; align-items: flex-start; gap: 12px; color: var(--ink); font-size: 15px; font-weight: 400; }
label.check input { width: 24px; height: 24px; margin: 0; flex: none; accent-color: var(--accent); }

.back { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; text-decoration: none; font-size: 15px; font-weight: 500; }
.icon { width: 36px; height: 36px; border-radius: 18px; flex: none; display: flex; align-items: center; justify-content: center; background: var(--accent-soft); color: var(--accent); }
.icon.received { background: var(--received-bg); color: var(--received-ink); }
.icon.off { background: #ECEFED; color: var(--muted); }
.icon svg, .back svg { width: 18px; height: 18px; }
svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.strike { text-decoration: line-through; color: var(--muted); }
.error { color: var(--danger); font-size: 15px; }
.notice { background: var(--accent-soft); color: var(--ink); border-radius: 14px; padding: 12px 14px; font-size: 15px; }
.avatar { width: 44px; height: 44px; border-radius: 22px; background: #DCE8E3; font-size: 13px; font-weight: 600; display: flex; align-items: center; justify-content: center; flex: none; }
.list > * + * { border-top: 1px solid var(--line); }
.list > * { padding: 14px 0; }
.card.list { gap: 0; padding: 4px 18px; }
.option { text-align: left; justify-content: flex-start; background: var(--card); color: var(--ink); border: 1.5px solid #C9D5D0; font-weight: 500; }
.option[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); }
.steps > .row { padding: 10px 0; }
.steps > .row + .row { border-top: 1px solid var(--line); }

#tabs {
  position: fixed; left: 0; right: 0; bottom: 0; background: var(--card); border-top: 1px solid var(--line);
  display: flex; justify-content: space-around; padding: 8px 8px calc(10px + env(safe-area-inset-bottom));
}
#tabs[hidden] { display: none; }
#tabs a { position: relative; min-width: 68px; min-height: 48px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; text-decoration: none; color: var(--muted); font-size: 12px; font-weight: 500; }
#tabs a[aria-current="page"] { color: var(--accent); font-weight: 600; }
#tabs svg { width: 22px; height: 22px; }
#unread { position: absolute; top: 2px; right: 12px; min-width: 18px; height: 18px; border-radius: 9px; background: #B4530A; color: #fff; font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; padding: 0 5px; }
#unread[hidden] { display: none; }

dialog { border: 0; border-radius: 20px; padding: 22px; width: min(92vw, 420px); color: var(--ink); }
dialog::backdrop { background: rgba(18, 51, 46, 0.45); }
dialog .stack { gap: 14px; }
.sign-in { min-height: 80vh; justify-content: center; }
@media (prefers-reduced-motion: no-preference) { .bar > i { transition: width 0.4s ease; } }

/* Project photos: a row that scrolls sideways. */
.photos { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 4px; }
.photo-box { margin: 0; flex: 0 0 82%; max-width: 420px; scroll-snap-align: start; display: flex; flex-direction: column; gap: 4px; }
.photo { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 16px; background: var(--card); }
