/* Sunroom: a clean, warm base where each person's posts wear their own color.
   Colors are assigned automatically (see PALETTE in app.py); nobody picks one. */

:root {
  color-scheme: light;
  --page: #fbfaf8;
  --surface: #ffffff;
  --ink: #18181a;
  --muted: #74716b;
  --line: #e8e5df;
  --soft: #f2f0ec;
  --accent: #18181a;
  --link: #2b5bd7;
  --danger: #b3261e;
  --radius: 18px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  overflow-wrap: anywhere;
  background: var(--page);
  color: var(--ink);
  font: 16px/1.5 "Bricolage Grotesque", "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
h1, h2, h3 { text-wrap: balance; letter-spacing: -.02em; }

/* ---------- shell ---------- */

.page { max-width: 560px; margin: 0 auto; padding: 0 16px 48px; }
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 6px 12px; flex-wrap: wrap;
  padding: 16px 0 10px;
}
.logo { font-weight: 800; font-size: 21px; letter-spacing: -.03em; color: var(--ink); }
.logo:hover { text-decoration: none; }
.logo::before {
  content: ""; display: inline-block; width: 26px; height: 26px; border-radius: 7px; margin-right: 8px; vertical-align: -6px;
  background: url("logo.svg") center / cover;
}
.logo span { color: var(--muted); font-weight: 600; }
.nav { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: center; font-size: 14px; font-weight: 600; }
.nav a { color: var(--muted); }
.nav a.on, .nav a:hover { color: var(--ink); text-decoration: none; }
.nav form { display: inline; }
.linkbtn { background: none; border: 0; padding: 0; font: inherit; color: var(--muted); cursor: pointer; }
.linkbtn:hover { color: var(--ink); }

.footer { text-align: center; font-size: 13px; color: var(--muted); padding-top: 40px; }

.flash {
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  padding: 10px 14px; margin: 6px 0 14px; font-size: 15px;
}

/* ---------- headings ---------- */

.hello { margin: 12px 0 14px; }
.hello h1 { font-size: 30px; font-weight: 800; margin: 0; line-height: 1.1; }
.hello p { margin: 4px 0 0; color: var(--muted); font-size: 15px; }
.section-label { font-size: 13px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; margin: 28px 0 12px; }

/* ---------- your people row ---------- */

.people { display: flex; gap: 14px; overflow-x: auto; padding: 6px 2px 10px; margin: 0 -2px 8px; scrollbar-width: none; }
.people::-webkit-scrollbar { display: none; }
.person { display: grid; justify-items: center; gap: 5px; font-size: 12px; font-weight: 600; color: var(--ink); min-width: 56px; }
.person:hover { text-decoration: none; }
.face {
  width: 52px; height: 52px; border-radius: 50%; object-fit: cover; display: grid; place-items: center;
  background: var(--c); color: #fff; font-weight: 700; font-size: 19px;
  box-shadow: 0 0 0 2px var(--page), 0 0 0 4.5px var(--c);
}
.person.add .face { background: var(--soft); color: var(--muted); box-shadow: 0 0 0 2px var(--page), 0 0 0 2px var(--line); font-size: 24px; font-weight: 400; }

/* ---------- posts ---------- */

.post { background: var(--bg); border-radius: var(--radius); padding: 12px; margin-bottom: 14px; }
.post-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.av {
  width: 34px; height: 34px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: var(--c); color: #fff; font-weight: 700; font-size: 15px;
}
.post-head b { display: block; font-size: 15px; line-height: 1.2; }
.post-head b a { color: var(--ink); }
.post-head small { color: var(--ink2); font-size: 12px; }
.photo { display: block; width: 100%; height: auto; border-radius: 12px; }
.caption { margin: 10px 2px 2px; font-size: 16px; }
.update-text { font-size: 21px; font-weight: 600; line-height: 1.25; margin: 2px 2px 4px; letter-spacing: -.01em; }
.note-link { display: inline-block; margin: 8px 2px 0; font-size: 13px; font-weight: 700; color: var(--ink2); }

/* ---------- the end of today ---------- */

.endcard {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px 18px; text-align: center; display: grid; justify-items: center; gap: 10px; margin: 6px 0 14px;
}
.endcard .faces { display: flex; padding-left: 10px; }
.endcard .faces .face { width: 46px; height: 46px; margin-left: -10px; box-shadow: 0 0 0 3px var(--surface); font-size: 17px; }
.endcard h2 { margin: 0; font-size: 22px; font-weight: 800; }
.endcard p { margin: 0; color: var(--muted); }

/* ---------- buttons & forms ---------- */

.btn {
  display: inline-block; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--accent); color: #fff; font: 700 15px "Bricolage Grotesque", sans-serif;
  padding: 11px 20px; text-align: center;
}
.btn:hover { text-decoration: none; opacity: .9; }
.btn:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 3px solid var(--link); outline-offset: 2px; }
.btn.big { width: 100%; font-size: 17px; padding: 14px 20px; }
.btn.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn.small { font-size: 13px; padding: 6px 12px; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 14px; }
.card h2 { font-size: 18px; margin: 0 0 6px; }
label { display: block; font-weight: 700; font-size: 14px; margin: 14px 0 6px; }
input[type=text], input[type=tel], select, textarea {
  width: 100%; font: 17px "Bricolage Grotesque", sans-serif; /* 16px+ stops iPhone zooming */
  padding: 11px 13px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink);
}
textarea { min-height: 120px; resize: vertical; }
.hint { font-size: 13px; color: var(--muted); margin: 8px 0 0; }
.radio { font-weight: 500; font-size: 16px; display: flex; gap: 10px; align-items: center; margin: 8px 0; }
.radio input { width: 18px; height: 18px; accent-color: var(--ink); }
.copyrow { display: flex; gap: 8px; }
.copyrow input { flex: 1; font-size: 15px; }
.people-list { list-style: none; padding: 0; margin: 0; }
.people-list li { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); gap: 10px; }
.people-list li:last-child { border-bottom: 0; }
.people-list .who { display: flex; align-items: center; gap: 10px; font-weight: 600; }

.empty { text-align: center; color: var(--muted); padding: 30px 10px; }

/* ---------- profile ---------- */

.profile-top { display: flex; align-items: center; gap: 14px; margin: 14px 0 16px; }
.profile-top .face { width: 64px; height: 64px; font-size: 26px; }
.profile-top h1 { margin: 0; font-size: 26px; font-weight: 800; }
.profile-top p { margin: 2px 0 0; color: var(--muted); font-size: 14px; }
.actions { display: flex; gap: 8px; margin-bottom: 18px; }
.actions form { display: contents; }

/* ---------- follow / home ---------- */

.invite { text-align: center; padding: 24px 0 8px; }
.invite .face { width: 76px; height: 76px; font-size: 30px; margin: 0 auto 14px; }
.invite h1 { font-size: 28px; font-weight: 800; margin: 0 0 6px; line-height: 1.15; }
.invite p { color: var(--muted); margin: 0 auto; max-width: 34ch; }
.teaser { position: relative; overflow: hidden; border-radius: var(--radius); margin: 18px 0; }
.teaser img { display: block; width: 100%; aspect-ratio: 4/3; object-fit: cover; filter: blur(16px); transform: scale(1.12); }
.teaser span { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 17px; text-shadow: 0 1px 6px rgba(0,0,0,.5); padding: 12px; text-align: center; }

.hero { padding: 28px 0 10px; }
.kicker { display: inline-block; font-size: 13px; font-weight: 700; color: #a8432a; background: #fde9e2; border-radius: 999px; padding: 4px 11px; margin-bottom: 14px; }
.hero h1 { font-size: 40px; font-weight: 800; line-height: 1.02; margin: 0 0 12px; }
.hero p { font-size: 18px; color: var(--muted); margin: 0 0 18px; max-width: 32ch; }
.number { display: inline-block; font-weight: 800; font-size: 24px; letter-spacing: -.01em; margin: 2px 0 6px; }
.steps { display: grid; gap: 10px; margin: 26px 0; }
.step { border-radius: var(--radius); padding: 14px 16px; background: var(--bg); }
.step b { display: block; color: var(--ink2); font-size: 13px; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 2px; }
.nots { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 0; padding: 0; list-style: none; }
.nots li { background: var(--soft); border-radius: 999px; padding: 6px 12px; font-size: 14px; font-weight: 600; color: var(--muted); text-decoration: line-through; text-decoration-thickness: 1.5px; }

@media (min-width: 640px) {
  .hero h1 { font-size: 48px; }
}

/* ---------- growth page (admin) ---------- */
.growth-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; margin-bottom: 8px; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; display: grid; }
.tile b { font-size: 26px; font-weight: 800; font-variant-numeric: tabular-nums; }
.tile span { font-size: 13px; color: var(--muted); }
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
table.growth { border-collapse: collapse; width: 100%; font-size: 14px; white-space: nowrap; }
table.growth th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 700; padding: 10px 12px; border-bottom: 1px solid var(--line); }
table.growth td { padding: 8px 12px; border-bottom: 1px solid var(--line); }
table.growth tr:last-child td { border-bottom: 0; }
table.growth .num { text-align: right; font-variant-numeric: tabular-nums; }
table.growth .zero { color: var(--muted); }

/* ---------- privacy & terms ---------- */
.legal h2 { font-size: 17px; margin: 18px 0 6px; }
.legal h2:first-child { margin-top: 0; }
.legal p, .legal li { font-size: 15.5px; }
.legal ul { margin: 0; padding-left: 20px; display: grid; gap: 6px; }

/* ---------- landing page ---------- */
.page.wide { max-width: 1080px; }
.nowrap { white-space: nowrap; }
.eyebrow { font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #b4561f; }

.l-hero { display: grid; gap: 28px; padding: 26px 0 18px; align-items: center; }
@media (min-width: 860px) { .l-hero { grid-template-columns: 1.05fr .95fr; gap: 40px; padding: 48px 0 28px; } }
.l-copy h1 { font-size: clamp(40px, 7vw, 64px); font-weight: 800; line-height: .98; letter-spacing: -.035em; margin: 0 0 16px; }
.glow-word { background: linear-gradient(100deg, #f2952e 10%, #e8603c 90%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.l-lede { font-size: 19px; color: var(--muted); max-width: 34ch; margin: 0 0 22px; line-height: 1.45; }
.l-cta { display: grid; gap: 8px; justify-items: start; margin-bottom: 16px; }
.l-btn { width: auto; padding: 15px 28px; font-size: 18px; background: linear-gradient(180deg, #f39a34, #e8762c); box-shadow: 0 6px 18px rgba(232, 118, 44, .28); }
.l-btn:hover { opacity: 1; filter: brightness(1.04); }
.l-facts { list-style: none; padding: 0; margin: 0 0 12px; display: flex; flex-wrap: wrap; gap: 8px; }
.l-facts li { font-size: 14px; font-weight: 600; background: var(--soft); border-radius: 999px; padding: 6px 12px; }
.l-facts li::before { content: "✓ "; color: #2f7a5b; }

.l-visual { position: relative; display: grid; place-items: center; padding: 10px 0; }
.l-sun { position: absolute; width: min(520px, 110%); aspect-ratio: 1; border-radius: 50%; z-index: 0;
  background: radial-gradient(circle, rgba(255, 214, 120, .55) 0%, rgba(242, 163, 58, .22) 38%, rgba(251, 250, 248, 0) 68%); }
.phone-mock { position: relative; z-index: 1; width: min(320px, 100%); background: #fff; border-radius: 40px; padding: 14px 12px 18px;
  border: 1px solid var(--line); box-shadow: 0 30px 60px rgba(120, 70, 20, .16), 0 4px 12px rgba(0, 0, 0, .06);
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif; }
.pm-top { display: grid; justify-items: center; gap: 3px; padding: 4px 0 10px; border-bottom: 1px solid #f0eeea; font-size: 12px; }
.pm-top img { width: 40px; height: 40px; border-radius: 50%; }
.pm-thread { display: flex; flex-direction: column; gap: 5px; padding-top: 8px; font-size: 14px; line-height: 1.3; }
.pm-time { align-self: center; color: #8a8a8e; font-size: 11px; margin: 6px 0 2px; }
.pm-me, .pm-them { max-width: 78%; border-radius: 18px; }
.pm-me { align-self: flex-end; }
.pm-me img { display: block; width: 150px; height: 150px; object-fit: cover; border-radius: 16px; }
.pm-text { background: #0a84ff; color: #fff; padding: 7px 12px; }
.pm-them { align-self: flex-start; background: #e9e9eb; color: #000; padding: 7px 12px; }
.pm-card { align-self: flex-start; width: 82%; border-radius: 16px; overflow: hidden; background: #e9e9eb; }
.pm-collage { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; padding: 7px; background: var(--page); }
.pm-collage i { display: block; background: var(--bg); padding: 3px; border-radius: 8px; }
.pm-collage img { display: block; width: 100%; aspect-ratio: 3/4; object-fit: cover; border-radius: 5px; }
.pm-card-text { padding: 7px 11px 9px; display: grid; font-size: 12.5px; }
.pm-card-text span { color: #8a8a8e; font-size: 11.5px; }

.l-section { padding: 44px 0 0; }
.l-head { display: grid; gap: 6px; margin-bottom: 18px; max-width: 46ch; }
.l-head h2 { font-size: clamp(26px, 4vw, 36px); font-weight: 800; margin: 0; line-height: 1.08; letter-spacing: -.025em; }
.l-head p { color: var(--muted); font-size: 17px; margin: 4px 0 0; }
.l-steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
@media (min-width: 760px) { .l-steps { grid-template-columns: repeat(3, 1fr); } }
.l-steps li { background: var(--bg); border-radius: var(--radius); padding: 18px; display: grid; gap: 6px; align-content: start; }
.l-steps .n { width: 30px; height: 30px; border-radius: 50%; background: var(--c); color: #fff; display: grid; place-items: center; font-weight: 800; }
.l-steps b { font-size: 18px; }
.l-steps p { margin: 0; color: var(--ink2); font-size: 15px; }

.l-split { display: grid; gap: 20px; align-items: start; }
@media (min-width: 860px) { .l-split { grid-template-columns: 1fr 1fr; gap: 48px; } .l-split .l-head { position: sticky; top: 24px; } }
.mini-feed { max-width: 420px; width: 100%; justify-self: center; }

.l-for { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); }
.l-for li { background: var(--bg); border-radius: var(--radius); padding: 16px; display: grid; gap: 4px; }
.l-for b { font-size: 17px; color: var(--ink); }
.l-for span { color: var(--ink2); font-size: 14.5px; }

.l-two { display: grid; gap: 14px; }
@media (min-width: 860px) { .l-two { grid-template-columns: 1fr 1fr; } }
.l-two .card { margin: 0; }

.l-final { margin-top: 48px; text-align: center; padding: 44px 20px; border-radius: 28px; display: grid; justify-items: center; gap: 8px;
  background: radial-gradient(circle at 50% 0%, rgba(255, 214, 120, .5), rgba(251, 250, 248, 0) 70%), var(--surface); border: 1px solid var(--line); }
.l-final h2 { font-size: clamp(28px, 4.5vw, 40px); font-weight: 800; margin: 0; letter-spacing: -.025em; }
.l-final p { margin: 0 0 8px; color: var(--muted); font-size: 17px; }
.l-final .hint { margin-top: 6px; }
@media (min-width: 860px) { .btn.big.l-btn { width: auto; min-width: 260px; } }

.l-calm-grid { list-style: none; padding: 0; margin: 0 0 10px; display: grid; gap: 10px;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 190px), 1fr)); }
.l-calm-grid li { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; display: grid; gap: 4px; align-content: start; }
.l-calm-grid b { font-size: 16px; }
.l-calm-grid b::before { content: ""; display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 8px; vertical-align: 1px;
  background: radial-gradient(circle at 35% 35%, #ffe08a, #f2952e); }
.l-calm-grid span { color: var(--muted); font-size: 14.5px; }
.l-trust { max-width: 720px; margin: 0 auto; }
.l-trust .card { margin: 0; }
