/* Vox Americanus — 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 — two-row layout at all widths ---- */
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: 9px 16px;
  display: flex; align-items: center; flex-wrap: wrap; gap: 0;
}
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: 5px;
  order: 1; flex: 1;
}
header.top .brand .star { color: var(--red); }
header.top nav {
  display: flex; gap: 0; order: 3; width: 100%; flex: none;
  flex-wrap: nowrap; justify-content: space-around;
  border-top: 1px solid var(--line); margin-top: 8px; margin-bottom: -9px; padding: 6px 0;
}
header.top nav a {
  color: var(--muted); padding: 6px 16px; border-radius: 999px; font-size: 14px; font-weight: 600;
  flex: 1; text-align: center;
}
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; order: 2; padding-left: 8px; padding-right: 18px; }
a.me-name { color: var(--ink); font-weight: 600; font-size: 13px; }
a.me-name:hover { color: var(--navy); text-decoration: none; }

/* ---- notification jewel ---- */
.notif-jewel {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--red); color: #fff; font-size: 10px; font-weight: 700;
  border-radius: 999px; min-width: 16px; height: 16px; padding: 0 4px;
  margin-left: 4px; line-height: 1; vertical-align: middle;
}
.notif-nav { position: relative; }

/* ---- notifications page ---- */
.page-title { font-family: Georgia, serif; font-size: 20px; color: var(--ink); margin: 18px 0 8px; }
.notif-list { margin-top: 4px; }
.notif-item {
  display: flex; align-items: flex-start; gap: 11px;
  padding: 13px 14px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--surface); margin: 7px 0; box-shadow: var(--shadow);
  position: relative;
}
.notif-item.notif-new { background: #f0f5ff; border-color: #c3d4ea; }
.notif-body { flex: 1; font-size: 14px; line-height: 1.5; }
.notif-actor a { color: var(--ink); font-weight: 700; }
.notif-actor a:hover { color: var(--navy); text-decoration: none; }
.notif-verb { color: var(--muted); margin: 0 4px; }
.notif-snippet { color: var(--navy); font-style: italic; font-size: 13px; display: block; margin-top: 3px; }
.notif-snippet:hover { text-decoration: underline; }
.notif-time { font-size: 12px; color: var(--faint); }
.notif-dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--red);
  flex-shrink: 0; margin-top: 6px;
}

.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); }
.feed-new-badge {
  display: inline-block; vertical-align: middle; margin-left: 6px;
  background: var(--red); color: #fff; font-size: 11px; font-weight: 700;
  line-height: 1; border-radius: 999px; padding: 3px 7px; min-width: 18px; text-align: center;
}
.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-follow-action { margin-left: auto; flex-shrink: 0; }
.profile-follow-action form { margin: 0; }
.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); }

/* ---- profile tabs ---- */
.profile-tabs { display: flex; gap: 6px; margin: 0 0 16px; }
.profile-tab {
  background: none; border: 1px solid transparent; border-radius: 7px; cursor: pointer;
  font-family: inherit; font-size: 14px; font-weight: 600; color: var(--muted); padding: 8px 14px;
}
.profile-tab:hover { color: var(--ink); }
.profile-tab.active { color: var(--ink); border-color: #c4ccd6; }
.profile-tab-count {
  display: inline-block; font-size: 12px; font-weight: 700; color: var(--muted);
  background: var(--bg-soft); border: 1px solid var(--line); border-radius: 999px;
  padding: 0 7px; margin-left: 3px; min-width: 18px; text-align: center;
}

/* ---- endorsements ---- */
.endorse-section-title { font-weight: 700; font-size: 15px; margin-bottom: 12px; color: var(--ink); font-family: Georgia, serif; }
.endorse-item { border-left: 3px solid var(--red); padding: 8px 12px; background: var(--red-soft); }
.endorse-item.endorse-given { border-left-color: var(--navy); background: var(--navy-soft); }
.endorse-item.endorse-hidden { opacity: .6; border-left-color: var(--line); background: var(--bg-soft); }
.endorse-meta { font-size: 12px; color: var(--faint); display: flex; align-items: center; flex-wrap: wrap; gap: 2px; }
.endorse-hidden-tag { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); background: var(--bg-soft); border: 1px solid var(--line); border-radius: 999px; padding: 1px 7px; margin-left: 6px; }
.endorse-hide-btn { background: none; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); cursor: pointer; font-family: inherit; font-size: 11px; font-weight: 600; padding: 2px 10px; }
.endorse-hide-btn:hover { border-color: var(--navy); color: var(--navy); }
.endorse-owner-note { font-size: 12px; color: var(--faint); margin-bottom: 14px; padding: 8px 10px; background: var(--bg-soft); border-radius: 6px; line-height: 1.5; }

/* ---- about tab ---- */
.about-block { margin-bottom: 18px; }
.about-block:last-child { margin-bottom: 0; }
.about-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); margin-bottom: 7px; }
.about-text { font-size: 14px; line-height: 1.6; color: var(--ink); }
.about-domains { display: flex; flex-direction: column; gap: 12px; }
.about-domain-row { display: flex; gap: 11px; align-items: flex-start; }
.about-domain-icon { font-size: 18px; line-height: 1.3; flex-shrink: 0; }
.about-domain-name { font-size: 14px; font-weight: 700; color: var(--ink); }
.about-domain-detail { font-size: 13px; color: var(--muted); margin-top: 1px; }
.about-domains-note { font-size: 12px; color: var(--faint); margin-top: 12px; line-height: 1.5; }
.domain-chip-tag { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; border-radius: 999px; padding: 1px 8px; margin-left: 4px; vertical-align: middle; border: 1px solid var(--line); color: var(--muted); }
.domain-work { border-color: var(--navy); color: var(--navy); }
.domain-academic { border-color: #2563eb; color: #2563eb; }
.domain-government, .domain-military { border-color: var(--red); color: var(--red); }
.domain-organization { border-color: #047857; color: #047857; }
.domain-personal { border-color: var(--line); color: var(--muted); }

/* ---- 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 .brand { font-size: 17px; }
  header.top .me { padding-right: 12px; }
  header.top .me .name { display: none; }
  header.top nav a { font-size: 12px; padding: 6px 4px; }
  .tabs a { flex: 1; text-align: center; padding: 12px 6px; }
  .hero h1 { font-size: 32px; }
  .steps .s .v { font-size: 10px; }
}

/* ---- compose: text/video toggle ---- */
.compose-tabs { display: flex; gap: 6px; margin-bottom: 10px; }
.compose-tab {
  font-size: 13px; font-weight: 600; padding: 6px 14px; border-radius: 999px;
  background: var(--bg-soft); color: var(--muted); border: 1px solid var(--line); cursor: pointer;
}
.compose-tab:hover { border-color: var(--navy); background: var(--navy-soft); color: var(--navy); }
.compose-tab.active { background: var(--navy); border-color: var(--navy); color: #fff; }

/* ---- recorder ---- */
.recorder { position: relative; }
.rec-preview {
  width: 100%; max-height: 360px; background: #0b1220; border-radius: 10px;
  border: 1px solid var(--line); transform: scaleX(-1); /* mirror selfie cam */
  display: block;
}
.rec-preview.recording { border-color: var(--red); box-shadow: 0 0 0 3px var(--red-soft); }
.rec-timer {
  position: absolute; top: 10px; left: 10px; background: var(--red); color: #fff;
  font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px;
}
.rec-timer::before { content: "● "; }
.mic-warning { color: var(--dislike); font-size: 13px; font-weight: 600; margin-top: 8px; }

/* ---- video playback ---- */
.video-wrap { margin: 8px 0; }
.post-video {
  width: 84%; max-width: 440px; max-height: 480px; background: #0b1220;
  border-radius: 10px; border: 1px solid var(--line); display: block;
}
.transcript { margin: 8px 0 4px; }
.transcript-label { font-size: 13px; font-weight: 600; color: var(--navy); margin-bottom: 4px; }
.transcript-body {
  font-size: 14px; line-height: 1.55; color: var(--ink);
  border-left: 3px solid var(--line); padding: 4px 0 4px 12px;
}
.transcript-body.clamped { max-height: 4.9em; overflow: hidden; }
.transcript-body p { margin: 0 0 0.6em; }
.transcript-body p:last-child { margin-bottom: 0; }
.transcript-more {
  background: none; border: none; color: var(--navy); font-weight: 600;
  font-size: 13px; padding: 5px 0 2px; cursor: pointer;
}
.transcript-more:hover { text-decoration: underline; }
.transcript-pending { font-style: italic; margin: 6px 0; }

/* ---- recording upload progress ---- */
.rec-progress { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.rec-progress-bar {
  flex: 1; height: 8px; background: var(--bg-soft); border: 1px solid var(--line);
  border-radius: 999px; overflow: hidden;
}
.rec-progress-fill {
  height: 100%; width: 0%; background: var(--red); border-radius: 999px;
  transition: width .2s ease;
}
.rec-progress-fill.indeterminate {
  width: 40% !important; background: linear-gradient(90deg, transparent, var(--red), transparent);
  animation: rec-indet 1.1s linear infinite; transition: none;
}
@keyframes rec-indet { 0% { margin-left: -40%; } 100% { margin-left: 100%; } }
#rec-progress-label { white-space: nowrap; font-weight: 600; color: var(--navy); }
.me-avatar-link { display: inline-flex; align-items: center; }
.me-avatar-link:hover { text-decoration: none; }

/* ---- prominent settings row on own profile ---- */
.settings-row {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 14px; padding: 12px 14px; border: 1px solid var(--line);
  background: var(--bg-soft); border-radius: 10px; color: var(--navy);
  font-weight: 600; font-size: 14px;
}
.settings-row:hover { background: var(--navy-soft); border-color: #c3d4ea; text-decoration: none; }
.settings-row-arrow { color: var(--faint); }

/* ---- invite page ---- */
.invite-list { margin: 0; padding-left: 18px; }
.invite-list li { font-size: 14px; line-height: 1.55; margin: 0 0 9px; color: var(--ink); }
.invite-list li:last-child { margin-bottom: 0; }
