/* 1776 Forum — light, approachable, American-first.
   White background, civic serif headlines, Old Glory red + navy accents. */
:root {
  --bg: #ffffff;
  --bg-soft: #f6f7f9;
  --surface: #ffffff;
  --ink: #15233b;          /* deep navy ink for body text */
  --muted: #5d6b7e;
  --faint: #97a2b0;
  --line: #e3e8ef;
  --line-soft: #eef1f6;
  --navy: #0a3161;         /* Old Glory Blue */
  --navy-soft: #eaf0f8;
  --red: #b22234;          /* Old Glory Red */
  --red-hover: #99202f;
  --red-soft: #fbecee;
  --like: #15803d;
  --dislike: #c0392b;
  --verified: #15803d;
  --shadow: 0 1px 2px rgba(16,30,54,.06), 0 1px 3px rgba(16,30,54,.04);
}
* { box-sizing: border-box; }
body {
  background: var(--bg-soft); color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 15px; line-height: 1.5; margin: 0;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, .serif { font-family: Georgia, "Iowan Old Style", "Times New Roman", serif; }
a { color: var(--navy); text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { max-width: 620px; margin: 0 auto; padding: 0 14px 90px; }

/* patriotic hairline under the header */
.flag-stripe { height: 3px; background: linear-gradient(90deg, var(--navy) 0 33%, #fff 33% 66%, var(--red) 66% 100%); }

/* ---- header / nav ---- */
header.top {
  position: sticky; top: 0; z-index: 10;
  background: rgba(255,255,255,0.92); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line); padding: 11px 0;
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
}
header.top .brand {
  font-family: Georgia, serif; font-weight: 700; font-size: 19px; color: var(--navy);
  letter-spacing: -0.01em; display: inline-flex; align-items: center; gap: 7px;
}
header.top .brand .star { color: var(--red); }
header.top nav { display: flex; gap: 2px; flex: 1; flex-wrap: wrap; }
header.top nav a {
  color: var(--muted); padding: 5px 11px; border-radius: 999px; font-size: 14px; font-weight: 600;
}
header.top nav a:hover { color: var(--navy); background: var(--navy-soft); text-decoration: none; }
header.top .me { color: var(--muted); font-size: 13px; display: inline-flex; align-items: center; gap: 7px; margin-left: auto; padding-left: 18px; }

.flash {
  border: 1px solid var(--navy); background: var(--navy-soft); border-radius: 8px;
  padding: 9px 13px; margin: 14px 0; color: var(--navy); font-size: 13.5px;
}

/* ---- cards / timeline rows ---- */
.card {
  border: 1px solid var(--line); border-radius: 12px;
  background: var(--surface); padding: 14px 16px; margin: 12px 0; box-shadow: var(--shadow);
}
/* feed rows render as cards with hover */
.card-link { cursor: pointer; transition: border-color .12s, box-shadow .12s; }
.card-link:hover { border-color: #cfd8e3; box-shadow: 0 2px 8px rgba(16,30,54,.08); }

.muted { color: var(--muted); }
.faint { color: var(--faint); }
.handle { color: var(--ink); font-weight: 700; }
.handle:hover { color: var(--navy); text-decoration: none; }
.post-body { word-break: break-word; overflow-wrap: anywhere; margin: 7px 0 9px; font-size: 15px; line-height: 1.55; color: var(--ink); }
.post-body p { margin: 0 0 0.7em; }
.post-body p:last-child { margin-bottom: 0; }

textarea, input[type=text], input[type=email], input[type=password] {
  width: 100%; background: #fff; color: var(--ink); border: 1px solid var(--line);
  border-radius: 9px; font-family: inherit; font-size: 15px; padding: 10px 12px; margin: 6px 0;
}
textarea:focus, input:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px var(--navy-soft); }
textarea { resize: vertical; min-height: 68px; }
label { font-size: 13px; font-weight: 600; color: var(--muted); display: block; margin-top: 8px; }

button, .btn {
  background: #fff; color: var(--navy); border: 1px solid #cdd6e2;
  border-radius: 999px; font-family: inherit; font-size: 14px; font-weight: 600;
  padding: 8px 18px; cursor: pointer; transition: all .12s ease; display: inline-block;
}
button:hover, .btn:hover { border-color: var(--navy); background: var(--navy-soft); text-decoration: none; }
button.primary, .btn.primary {
  background: var(--red); border-color: var(--red); color: #fff;
}
button.primary:hover, .btn.primary:hover { background: var(--red-hover); border-color: var(--red-hover); color: #fff; }

/* ---- avatars (initials circles) ---- */
.avatar {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0;
  color: #fff; font-weight: 700; font-size: 15px; letter-spacing: .02em;
  font-family: -apple-system, sans-serif;
}
.avatar.sm { width: 30px; height: 30px; font-size: 12px; }
.avatar.lg { width: 60px; height: 60px; font-size: 22px; }

/* ---- reactions ---- */
.reactions { display: inline-flex; gap: 6px; align-items: center; }
.reactions form { display: inline; }
.reactions button {
  border: 1px solid transparent; border-radius: 999px; padding: 4px 11px; font-size: 13px; font-weight: 600;
  color: var(--muted); background: transparent;
}
.reactions button:hover { color: var(--like); background: #ecf7f0; border-color: transparent; }
.reactions button.on-like { color: var(--like); background: #ecf7f0; }
.reactions button[title=dislike]:hover { color: var(--dislike); background: var(--red-soft); }
.reactions button.on-dislike { color: var(--dislike); background: var(--red-soft); }

.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.reply-action { color: var(--muted); border-radius: 999px; padding: 4px 10px; font-size: 13px; font-weight: 600; }
.reply-action:hover { color: var(--navy); background: var(--navy-soft); text-decoration: none; }

/* ---- tabs ---- */
.tabs { display: flex; gap: 0; margin: 4px 0 0; border-bottom: 1px solid var(--line); width: 100%; }
.tabs a {
  padding: 12px 20px; color: var(--muted); border: none;
  font-size: 14px; font-weight: 700; position: relative;
}
.tabs a:hover { color: var(--ink); text-decoration: none; }
.tabs a.active { color: var(--red); }
.tabs a.active::after {
  content: ""; position: absolute; left: 50%; transform: translateX(-50%);
  bottom: -1px; width: 40px; height: 3px; border-radius: 3px; background: var(--red);
}

.meta { font-size: 13px; color: var(--muted); }

/* ---- badges ---- */
.badge { font-size: 11.5px; font-weight: 700; border: 1px solid var(--line); border-radius: 999px; padding: 2px 9px; color: var(--muted); }
.badge.ok { color: var(--verified); border-color: #bfe3cc; background: #eef9f1; }
.badge.flag { color: var(--navy); border-color: #c3d4ea; background: var(--navy-soft); }
.proof-badge { font-size: 12px; line-height: 1; vertical-align: middle; }
.verified-check { color: var(--verified); font-weight: 700; }

.delete-btn { color: var(--faint); border-color: transparent; padding: 3px 9px; font-size: 13px; background: transparent; }
.delete-btn:hover { color: var(--dislike); border-color: var(--red-soft); background: var(--red-soft); }
button.btn-unfollow { color: var(--muted); }
button.btn-unfollow:hover { color: var(--dislike); border-color: var(--dislike); background: var(--red-soft); }

/* ---- comments ---- */
.comments-block { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line-soft); }
.comment { padding: 9px 0 6px; }
.comment + .comment { border-top: 1px solid var(--line-soft); }
.comment.comment-nested { border-left: 2px solid var(--line); padding-left: 12px; margin-top: 6px; border-top: none; }
.comment-header { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.comment-body { word-break: break-word; overflow-wrap: anywhere; margin: 5px 0 4px 38px; font-size: 14.5px; line-height: 1.5; }
.comment-body p { margin: 0 0 0.6em; }
.comment-body p:last-child { margin-bottom: 0; }
.comment-actions { display: flex; gap: 10px; align-items: center; margin-left: 38px; margin-top: 2px; }
.reply-link { font-size: 13px; color: var(--muted); cursor: pointer; font-weight: 600; }
.reply-link:hover { color: var(--navy); }
.inline-reply { margin: 8px 0 4px 38px; }
.comment-form { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line-soft); }
.comment-form-top { margin-top: 0; padding-top: 0; padding-bottom: 12px; border-top: none; border-bottom: 1px solid var(--line); margin-bottom: 8px; }

/* ---- profile ---- */
.profile-card { padding: 20px 18px 16px; }
.profile-header { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 12px; }
.profile-identity { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.profile-name { font-family: Georgia, serif; font-size: 22px; font-weight: 700; color: var(--ink); line-height: 1.15; }
.profile-badges-row { display: flex; gap: 7px; flex-wrap: wrap; align-items: center; }
.profile-bio { font-size: 14.5px; line-height: 1.55; color: var(--ink); border-top: 1px solid var(--line-soft); padding-top: 12px; margin-bottom: 12px; }
.profile-stats { display: flex; gap: 9px; align-items: center; font-size: 13px; color: var(--muted); flex-wrap: wrap; }
.profile-stats-sep { color: var(--line); }
.profile-writes-about { font-size: 13px; color: var(--muted); font-style: italic; margin-bottom: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--line-soft); }

/* ---- post tags ---- */
.post-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 4px; }
.post-tag { font-size: 11px; color: var(--muted); background: var(--bg-soft); border: 1px solid var(--line); border-radius: 999px; padding: 2px 9px; }

/* ---- landing ---- */
.hero { text-align: center; padding: 52px 8px 40px; }
.eyebrow { font-size: 12px; letter-spacing: 2px; text-transform: uppercase; color: var(--red); font-weight: 700; margin-bottom: 20px; }
.hero h1 { font-size: 42px; line-height: 1.08; color: var(--navy); margin: 0 0 16px; letter-spacing: -0.01em; }
.hero .lede { font-size: 17px; color: var(--ink); max-width: 520px; margin: 0 auto 10px; line-height: 1.55; }
.hero .sub { font-size: 14px; color: var(--muted); max-width: 480px; margin: 0 auto 28px; line-height: 1.6; }
.cta-row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin-bottom: 28px; }
.feature .ico { font-size: 26px; margin-bottom: 10px; }
.feature h4 { margin: 0 0 6px; font-size: 15px; color: var(--navy); font-family: Georgia, serif; }
.feature p { margin: 0; font-size: 13.5px; color: var(--muted); line-height: 1.5; }
.step { display: flex; gap: 16px; margin-bottom: 18px; align-items: flex-start; }
.step:last-child { margin-bottom: 0; }
.step .num { flex-shrink: 0; width: 28px; height: 28px; border-radius: 50%; background: var(--navy); color: #fff; font-weight: 700; font-size: 13px; display: flex; align-items: center; justify-content: center; }
.step .num.red { background: var(--red); }
.step h4 { margin: 0 0 3px; font-size: 14.5px; color: var(--ink); }
.step p { margin: 0; font-size: 13.5px; color: var(--muted); line-height: 1.5; }
.section-title { font-family: Georgia, serif; color: var(--navy); font-size: 18px; margin: 0 0 18px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.privacy-note { margin-top: 18px; padding: 12px 14px; background: var(--bg-soft); border-left: 3px solid var(--navy); border-radius: 6px; font-size: 12.5px; color: var(--muted); line-height: 1.55; }

/* ---- step progress bar (onboarding/signup) ---- */
.steps { display: flex; gap: 0; margin-bottom: 26px; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); }
.steps .s { flex: 1; padding: 9px 8px; text-align: center; border-right: 1px solid var(--line); background: #fff; }
.steps .s:last-child { border-right: none; }
.steps .s.active { background: var(--red-soft); }
.steps .s.done { background: var(--bg-soft); }
.steps .s .k { font-size: 10px; letter-spacing: 1px; font-weight: 700; color: var(--faint); }
.steps .s.active .k { color: var(--red); }
.steps .s.done .k { color: var(--verified); }
.steps .s .v { font-size: 11.5px; margin-top: 2px; color: var(--muted); }
.steps .s.active .v { color: var(--ink); font-weight: 600; }

.onb-step { border-left: 3px solid var(--line); padding: 4px 0 4px 16px; margin: 16px 0; }
.onb-step.done { border-color: var(--verified); }
.onb-step.current { border-color: var(--red); }

@media (max-width: 600px) {
  header.top .me .name { display: none; }
  .tabs a { flex: 1; text-align: center; padding: 12px 6px; }
  .hero h1 { font-size: 32px; }
  .steps .s .v { font-size: 10px; }
}
