/* SEO-03: the only asset these pages load. Its URL carries a hash of these
   bytes, so it is served immutable for a year and still changes the instant
   this file does.

   Tokens are the app's (frontend/src/app.css) so the two renderings of one
   screen look like the same site. Tailwind is not involved — pulling the SPA's
   generated stylesheet in here would ship a few hundred KB of utilities to
   every crawler for the sake of a dozen rules. */

:root {
  --canvas: #f6f7f9;
  --ink: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --brand: #16a34a;
  --brand-hover: #15803d;
  --link: #2563eb;
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font: 15px/1.6 Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-text-size-adjust: 100%;
}

a { color: var(--link); }
img { max-width: 100%; height: auto; }
h1, h2 { line-height: 1.2; letter-spacing: -0.02em; }

/* ---- chrome ---- */

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 64px;
  padding: 0 16px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.wordmark {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--ink);
  text-decoration: none;
}
.wordmark span { color: var(--brand); }

.btn {
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding: 0 20px;
  border-radius: 12px;
  background: var(--brand);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.btn:hover { background: var(--brand-hover); }

main { max-width: 720px; margin: 0 auto; padding: 24px 16px 64px; }

.foot {
  max-width: 720px;
  margin: 0 auto;
  padding: 24px 16px 48px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}
.foot nav { display: flex; gap: 16px; margin-bottom: 8px; }
.foot p { margin: 0; }

/* ---- shared ---- */

section { margin-bottom: 40px; }
.head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.muted { color: var(--muted); font-size: 13px; }
.gone { color: var(--muted); font-style: italic; }
.pager { margin-top: 16px; }

.who {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
}
.who img { border-radius: 50%; }
.who:hover span { text-decoration: underline; }

/* Bodies are plain text (POST-04) and their newlines are the author's
   paragraphing — the only thing standing in for formatting we do not have. */
.body { white-space: pre-wrap; overflow-wrap: break-word; margin: 12px 0; }

time { color: var(--muted); font-size: 13px; }
.group {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
}
.group::before { content: "in "; font-weight: 400; }

/* ---- banner (home) ---- */

.banner { padding: 8px 0 32px; }
.banner h1 { font-size: 32px; font-weight: 800; margin: 0 0 20px; }
.lede { margin: 0 0 12px; max-width: 46em; }
.banner .btn { margin-bottom: 20px; }

/* ---- groups ---- */

.groups { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 12px; }
.groups > li { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 16px; }
.group-card { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.group-name { font-weight: 600; }
.initial {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #f0fdf4;
  color: var(--brand);
  font-weight: 700;
  text-transform: uppercase;
}
/* PROF-01's placeholder, at byline size. `flex: none` on both so a long
   handle beside it cannot squash the circle into an ellipse. */
.who .initial { width: 32px; height: 32px; font-size: 13px; }
.who img { flex: none; }
.snippet {
  margin: 12px 0 4px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  overflow-wrap: break-word;
}

/* ---- cards ---- */

.feed { display: grid; gap: 12px; }
.card, .post, .comments {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
}
.card > header, .post > header, .comment > header {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.card > footer { font-size: 13px; }

.shots { display: grid; gap: 8px; margin: 12px 0; }
.shots.n2, .shots.n3 { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.shots img { border-radius: 12px; width: 100%; object-fit: cover; }
.more-shots { margin: 0; color: var(--muted); font-size: 13px; }

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

.profile { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 20px; }
.profile h1 { font-size: 24px; margin: 12px 0 4px; }
.avatar { border-radius: 50%; }
.bio { margin: 12px 0 0; }

/* ---- post page ---- */

.post .body { font-size: 16px; }
.post img { border-radius: 12px; margin: 12px 0; }
.pinned {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 10px 0;
  margin: 12px 0;
}
.updates { border-top: 1px solid var(--line); margin-top: 16px; padding-top: 8px; font-size: 14px; }

/* ---- tips (TIP-02, post page only) ---- */

.tips {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 12px;
}
.tip-total { margin: 0; font-weight: 600; color: var(--brand); }
.card .tip-total { margin-left: auto; font-size: 13px; font-weight: 600; }
.card > footer { display: flex; align-items: center; gap: 12px; }
.tippers { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 12px; }
.tippers li { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.tippers a { display: inline-flex; align-items: center; gap: 6px; color: var(--ink); text-decoration: none; }
.tippers img { border-radius: 50%; }
.amount { color: var(--brand); font-weight: 600; }
.tip-entry {
  display: inline-flex;
  align-items: center;
  height: 32px;
  padding: 0 12px;
  border: 1px dashed var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
}
.tip-entry:hover { border-color: var(--brand); color: var(--brand); }

.kt { margin: 12px 0 2px; font-weight: 700; color: var(--brand); }

/* the line back to the post on a later page of a long thread */
.back { margin: 0 0 16px; font-size: 14px; }
.back a { font-weight: 600; }

/* ---- comments ---- */

.comments h2 { font-size: 17px; margin: 0 0 12px; }
.thread { list-style: none; margin: 0; padding: 0; }
.thread .thread { margin-left: 16px; padding-left: 12px; border-left: 2px solid var(--line); }
.comment { padding: 12px 0; border-top: 1px solid var(--line); }
.comment .body { margin: 6px 0 0; font-size: 14px; }

.closer {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px;
  margin-top: 16px;
}
.closer p { margin: 0 0 8px; width: 100%; }

@media (min-width: 640px) {
  .banner h1 { font-size: 40px; }
  main { padding: 32px 24px 80px; }
  .groups { grid-template-columns: repeat(3, 1fr); }
}
