/* Oikos United intake portal — brand-matched to the marketing site.
   navy ground #0D1B2A, gold #B0894F / bright #C9A227, generous whitespace,
   mobile-first, one calm column. */
:root {
  --navy: #0D1B2A;
  --navy-2: #13243a;
  --navy-3: #1b3149;
  --gold: #B0894F;
  --gold-bright: #C9A227;
  --ink: #eaf0f6;
  --muted: #9fb0c2;
  --line: rgba(176, 137, 79, 0.28);
  --ok: #3bd684;
  --danger: #ff6b6b;
  --radius: 14px;
  --maxw: 640px;
  --sans: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background:
    radial-gradient(900px 500px at 80% -10%, rgba(201,162,39,0.10), transparent 60%),
    var(--navy);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.55;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.site-head, .site-foot {
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.brand { font-weight: 700; letter-spacing: 0.02em; color: var(--gold); }
.site-foot { margin-top: auto; color: var(--muted); font-size: 13px; }
.site-foot .dot { color: var(--gold); }

.app { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 8px 20px 48px; flex: 1; }
.loading { color: var(--muted); padding: 40px 0; }

/* Progress */
.progress { display: flex; gap: 6px; margin: 8px 0 28px; }
.progress span { flex: 1; height: 4px; border-radius: 999px; background: var(--navy-3); }
.progress span.done { background: var(--gold); }
.progress span.active { background: var(--gold-bright); }

h1 { font-size: 30px; line-height: 1.2; margin: 0 0 10px; }
h2 { font-size: 21px; margin: 0 0 6px; }
.lede { color: var(--muted); font-size: 16px; margin: 0 0 26px; }
.hint { color: var(--muted); font-size: 14px; }
/* Example/helper text under a field: italic + lighter so it reads as a quiet
   aside tied to the field ABOVE it, not a label for the next box. */
.field-hint { display: block; font-style: italic; color: var(--muted); opacity: 0.8; font-size: 12.5px; margin-top: 5px; line-height: 1.4; }

/* Cards (type picker) */
.cards { display: grid; gap: 12px; }
.card {
  text-align: left; background: var(--navy-2); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px; color: var(--ink); cursor: pointer;
  transition: border-color .15s, transform .05s;
}
.card:hover { border-color: var(--gold); }
.card:active { transform: scale(0.995); }
.card.sel { border-color: var(--gold-bright); box-shadow: 0 0 0 2px rgba(201,162,39,0.25); }
.card-title { font-weight: 600; font-size: 17px; }
.card-desc { color: var(--muted); font-size: 14px; margin-top: 2px; }

/* Fields */
.field { display: block; margin: 0 0 26px; }
.field > span { display: block; font-size: 14px; color: var(--ink); margin-bottom: 6px; }
input, textarea, select {
  width: 100%; background: var(--navy); color: var(--ink);
  border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px;
  font: inherit; font-size: 16px; /* 16px avoids iOS zoom */
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--gold-bright); }
textarea { resize: vertical; min-height: 90px; }
.section-title { color: var(--gold); font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; margin: 26px 0 12px; }
.hp { position: absolute; left: -9999px; opacity: 0; height: 0; }

/* File dropzone */
.dropzone {
  border: 1.5px dashed var(--line); border-radius: var(--radius); padding: 26px;
  text-align: center; color: var(--muted); cursor: pointer; transition: border-color .15s, background .15s;
}
.dropzone.over { border-color: var(--gold-bright); background: var(--navy-2); }
.files { list-style: none; padding: 0; margin: 16px 0 0; display: flex; flex-direction: column; gap: 8px; }
.file-row { display: flex; align-items: center; gap: 12px; background: var(--navy-2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.file-thumb { width: 40px; height: 40px; border-radius: 8px; object-fit: cover; background: var(--navy-3); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.file-meta { flex: 1; min-width: 0; }
.file-name { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-sub { color: var(--muted); font-size: 12px; }
.file-bar { height: 3px; background: var(--navy-3); border-radius: 999px; margin-top: 4px; overflow: hidden; }
.file-bar > i { display: block; height: 100%; background: var(--gold-bright); width: 0; transition: width .2s; }
.file-x { background: none; border: none; color: var(--muted); cursor: pointer; font-size: 18px; }
.file-err { color: var(--danger); font-size: 12px; }

/* Review */
.review dl { margin: 0; }
.review .r-sec { color: var(--gold); font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; margin: 18px 0 6px; }
.review .r-row { display: grid; grid-template-columns: 150px 1fr; gap: 12px; padding: 4px 0; font-size: 15px; }
.review .r-row dt { color: var(--muted); }
.review .r-row dd { margin: 0; }

/* Buttons / nav */
.nav { display: flex; gap: 12px; margin-top: 30px; }
.btn { font: inherit; font-size: 16px; border-radius: 10px; padding: 13px 20px; cursor: pointer; border: 1px solid transparent; }
.btn-primary { background: var(--gold); color: var(--navy); font-weight: 600; }
.btn-primary:hover { background: var(--gold-bright); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--gold); }
.grow { flex: 1; }

.center { text-align: center; padding: 30px 0; }
.big-emoji { font-size: 44px; }
.error-box { background: rgba(255,107,107,0.1); border: 1px solid rgba(255,107,107,0.4); color: #ffd0d0; border-radius: 10px; padding: 12px 14px; margin: 16px 0; font-size: 14px; }
#turnstile { margin: 18px 0; }

/* ── SF-5 hosted invoice page ────────────────────────────────────────────── */
.inv-card { background: rgba(255,255,255,0.03); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.inv-missing { color: var(--muted); text-align: center; padding: 40px 28px; }
.inv-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.inv-h { font-size: 22px; font-weight: 700; color: var(--ink); }
.inv-sub { color: var(--gold); font-size: 13px; margin-top: 2px; }
.inv-pill { display: inline-block; padding: 4px 12px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.inv-pill-sent, .inv-pill-partial { color: var(--gold-bright); background: rgba(201,162,39,.14); }
.inv-pill-overdue { color: var(--danger); background: rgba(255,107,107,.14); }
.inv-pill-paid { color: var(--ok); background: rgba(59,214,132,.16); }
.inv-meta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 24px 0; }
.inv-label { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin-bottom: 2px; }
.inv-table { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 14px; }
.inv-table th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: 8px 6px; border-bottom: 1px solid var(--line); }
.inv-table td { padding: 10px 6px; border-bottom: 1px solid rgba(176,137,79,.12); color: var(--ink); }
.inv-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.inv-totals { margin: 16px 0 8px; margin-left: auto; max-width: 280px; }
.inv-totals > div { display: flex; justify-content: space-between; padding: 4px 0; color: var(--muted); font-size: 14px; }
.inv-totals .inv-grand { color: var(--ink); font-weight: 700; font-size: 17px; border-top: 1px solid var(--line); padding-top: 8px; margin-top: 4px; }
.inv-totals .inv-balance { color: var(--gold-bright); font-weight: 700; }
.inv-actions { margin-top: 20px; }
.inv-btn { display: inline-block; background: var(--gold); color: #1a1205; text-decoration: none; font-weight: 700; padding: 10px 18px; border-radius: 8px; }
.inv-btn:hover { background: var(--gold-bright); }
.inv-foot { color: var(--muted); font-size: 12px; margin-top: 18px; }

/* ── PR-3 Project Room page ──────────────────────────────────────────────── */
.room { width: 100%; }
.room-closed { color: var(--muted); text-align: center; padding: 48px 20px; }
.room-head { padding-bottom: 16px; border-bottom: 1px solid var(--line); margin-bottom: 20px; }
.room-title { font-size: 22px; font-weight: 700; color: var(--ink); }
.room-sub { color: var(--gold); font-size: 13px; margin-top: 2px; }
.room-note { color: var(--muted); font-size: 12px; margin-top: 8px; }
.room-section { margin-bottom: 28px; }
.room-h2 { font-size: 14px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: 0 0 12px; }
.room-upload { margin-bottom: 14px; }
.room-upload-btn { display: inline-block; background: rgba(176,137,79,.14); color: var(--gold-bright); border: 1px solid var(--line); padding: 9px 16px; border-radius: 8px; font-weight: 600; cursor: pointer; font-size: 14px; }
.room-upload-btn:hover { background: rgba(176,137,79,.22); }
.room-uploading { list-style: none; margin: 8px 0 0; padding: 0; }
.room-up-row { font-size: 13px; color: var(--muted); padding: 3px 0; }
.room-up-pct { color: var(--gold-bright); }
.room-files-group { margin-bottom: 14px; }
.room-files-label { font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.room-file-list { list-style: none; margin: 0; padding: 0; }
.room-file { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 8px; margin-bottom: 6px; background: rgba(255,255,255,.02); }
.room-file-icon { font-size: 16px; }
.room-file-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); font-size: 14px; }
.room-file-size { color: var(--muted); font-size: 12px; }
.room-file-dl { color: var(--gold-bright); text-decoration: none; font-size: 13px; font-weight: 600; }
.room-file-pending { color: var(--muted); font-size: 12px; }
.room-empty { color: var(--muted); font-size: 14px; padding: 8px 0; }
.room-thread { list-style: none; margin: 0 0 14px; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.room-msg { max-width: 85%; padding: 10px 14px; border-radius: 12px; }
.room-msg-me { align-self: flex-end; background: rgba(176,137,79,.16); }
.room-msg-them { align-self: flex-start; background: rgba(255,255,255,.04); border: 1px solid var(--line); }
.room-msg-who { font-size: 11px; color: var(--muted); margin-bottom: 3px; }
.room-msg-body { color: var(--ink); font-size: 14px; white-space: pre-wrap; word-break: break-word; }
.room-msg-form { display: flex; gap: 8px; align-items: flex-end; }
.room-hp { position: absolute; left: -9999px; width: 1px; height: 1px; }
.room-msg-form textarea { flex: 1; background: rgba(255,255,255,.03); border: 1px solid var(--line); border-radius: 8px; color: var(--ink); padding: 10px 12px; font: inherit; resize: vertical; }
.room-send { background: var(--gold); color: #1a1205; border: none; border-radius: 8px; padding: 10px 18px; font-weight: 700; cursor: pointer; }
.room-send:hover { background: var(--gold-bright); }
