/* ── Brand tokens ─────────────────────────────── */
:root {
  --brand-accent:       #f97316;
  --brand-accent-light: #fff7ed;
  --brand-primary:      #1a1a2e;
  --brand-border:       #e5e7eb;
  --brand-surface:      #f9fafb;
  --brand-muted:        #6b7280;
  --font-mono:          ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --font-body:          system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", "Liberation Sans", Arial, sans-serif;
}

body {
  font-family: var(--font-body);
  background: var(--brand-surface);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main { flex: 1; }

/* ── Navbar ───────────────────────────────────── */
.site-navbar {
  background: #166534;
  box-shadow: 0 2px 8px rgba(0,0,0,.15);
}

.site-navbar .navbar-brand {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1.2rem;
  color: #fff;
  letter-spacing: -0.5px;
}

.site-navbar .navbar-brand span {
  color: var(--brand-accent);
}

.btn-nav-logout {
  background: transparent;
  border: 1px solid rgba(255,255,255,.35);
  color: rgba(255,255,255,.9);
  border-radius: 6px;
  padding: 4px 12px;
  font-size: 0.82rem;
  cursor: pointer;
  transition: background .15s;
  white-space: nowrap;
}

.btn-nav-logout:hover {
  background: rgba(255,255,255,.15);
  color: #fff;
}

.btn-nav-settings {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255,255,255,.35);
  border-radius: 6px;
  color: rgba(255,255,255,.9);
  text-decoration: none;
  transition: background .15s;
}

.btn-nav-settings:hover {
  background: rgba(255,255,255,.15);
  color: #fff;
}

.nav-username {
  font-size: 0.82rem;
  color: rgba(255,255,255,.75);
  white-space: nowrap;
}

/* ── Shared meta / muted text ─────────────────── */
.meta {
  font-size: 0.8rem;
  color: var(--brand-muted);
}

/* ── Post card ───────────────────────────────── */
.post-card {
  border: 1px solid var(--brand-border);
  border-radius: 10px;
  background: #fff;
  transition: box-shadow .15s;
}
.post-card:hover { box-shadow: 0 2px 10px rgba(0,0,0,.07); }

.post-card .card-title a {
  color: var(--brand-primary);
  text-decoration: none;
  font-weight: 600;
}
.post-card .card-title a:hover { color: var(--brand-accent); }

.post-description {
  color: var(--brand-muted);
  font-size: 0.92rem;
  line-height: 1.5;
  margin-bottom: 0.85rem;
}

/* ── Domain pill ─────────────────────────────── */
.domain-pill {
  font-size: 0.78rem;
  color: var(--brand-muted);
  background: var(--brand-surface);
  border: 1px solid var(--brand-border);
  border-radius: 20px;
  padding: 2px 9px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}
.domain-pill:hover {
  background: var(--brand-accent-light);
  border-color: var(--brand-accent);
  color: var(--brand-accent);
}

/* ── Upvote button ───────────────────────────── */
.btn-upvote {
  border: 1px solid var(--brand-border);
  background: #fff;
  color: var(--brand-muted);
  font-size: 0.8rem;
  padding: 4px 12px;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  text-decoration: none;
  transition: all .15s;
}
.btn-upvote:hover {
  background: var(--brand-accent-light);
  border-color: var(--brand-accent);
  color: var(--brand-accent);
}
.btn-upvote.voted, .btn-upvote:disabled {
  background: var(--brand-accent-light);
  border-color: var(--brand-accent);
  color: var(--brand-accent);
  cursor: default;
}
.btn-upvote.locked {
  background: var(--brand-surface);
  border-color: var(--brand-border);
  color: var(--brand-muted);
  cursor: default;
}

/* ── Visibility badge ────────────────────────── */
.visibility-badge {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  border-radius: 999px;
  padding: 3px 8px;
  border: 1px solid var(--brand-border);
}
.visibility-badge.private {
  color: #92400e;
  background: #fff7ed;
  border-color: #fdba74;
}
.visibility-badge.public {
  color: #166534;
  background: #f0fdf4;
  border-color: #86efac;
}

/* ── Section heading ─────────────────────────── */
.section-heading {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--brand-muted);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 1rem;
}
.section-heading::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--brand-border);
}

/* ── Empty state ─────────────────────────────── */
.empty-state { text-align: center; padding: 3rem 1rem; color: var(--brand-muted); }
.empty-state i { font-size: 2.5rem; display: block; margin-bottom: .75rem; opacity: .4; }

/* ── Brand CTA button ────────────────────────── */
.btn-brand {
  background: var(--brand-accent);
  color: #fff;
  border: 1px solid var(--brand-accent);
}
.btn-brand:hover {
  background: #ea6c0a;
  border-color: #ea6c0a;
  color: #fff;
}

/* ── Home hero ───────────────────────────────── */
.home-hero {
  border: 1px solid var(--brand-border);
  border-radius: 14px;
  background: linear-gradient(135deg, #ffffff 0%, #fff7ed 100%);
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--brand-muted);
  margin-bottom: 0.9rem;
}

.hero-title {
  font-size: clamp(1.7rem, 3vw, 2.5rem);
  font-weight: 700;
  color: var(--brand-primary);
  margin-bottom: 0.9rem;
}

.hero-copy {
  font-size: 1rem;
  color: var(--brand-muted);
  max-width: 60ch;
  margin-bottom: 0;
}

/* ── Submit card ─────────────────────────────── */
.submit-card { border: 2px solid var(--brand-accent); border-radius: 10px; }
.submit-card .card-header {
  background: var(--brand-accent);
  color: #fff;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.88rem;
  border-radius: 7px 7px 0 0 !important;
}

/* ── Sidebar ─────────────────────────────────── */
.sidebar-info-card {
  border: 1px solid var(--brand-border);
  border-radius: 10px;
  background: #fff;
}

.sidebar-title {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--brand-muted);
  margin-bottom: 0.9rem;
}

.sidebar-list {
  color: var(--brand-muted);
  margin-bottom: 0;
}

.sidebar-list li + li {
  margin-top: 0.65rem;
}

/* ── Filter bar (my bookmarks) ───────────────── */
.filter-bar {
  background: #fff;
  border: 1px solid var(--brand-border);
  border-radius: 10px;
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
}

/* ── Post detail ─────────────────────────────── */
.detail-card {
  background: #fff;
  border: 1px solid var(--brand-border);
  border-radius: 10px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1rem;
}
.post-hero { border-left: 4px solid var(--brand-accent); }

.post-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: .5rem;
}
.post-title a { color: var(--brand-primary); }
.post-title a:hover { color: var(--brand-accent); }

/* post_detail has different color/spacing for .post-description */
.detail-card .post-description {
  margin-top: 1rem;
  margin-bottom: 0;
  color: var(--brand-primary);
  line-height: 1.65;
}

.post-meta {
  font-size: 0.82rem;
  color: var(--brand-muted);
  display: flex;
  flex-wrap: wrap;
  gap: .65rem;
}
.post-meta i { color: var(--brand-accent); }

.share-label {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--brand-muted);
  margin-bottom: .4rem;
}

.share-url {
  width: 100%;
  border: 1px solid var(--brand-border);
  border-radius: 8px;
  padding: .6rem .85rem;
  font-size: 0.88rem;
  color: var(--brand-primary);
  background: var(--brand-surface);
  cursor: text;
}

.action-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 20px;
  background: var(--brand-surface);
  border: 1px solid var(--brand-border);
  color: var(--brand-muted);
  font-size: 0.82rem;
  text-decoration: none;
  cursor: pointer;
  transition: all .15s;
}
.action-chip:hover {
  color: var(--brand-accent);
  border-color: var(--brand-accent);
  background: var(--brand-accent-light);
}
.action-chip.voted, .action-chip:disabled {
  color: var(--brand-accent);
  border-color: var(--brand-accent);
  background: var(--brand-accent-light);
  cursor: default;
}
.action-chip.locked {
  background: var(--brand-surface);
  border-color: var(--brand-border);
  color: var(--brand-muted);
  cursor: default;
}

.btn-back {
  font-size: 0.85rem;
  color: var(--brand-muted);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 1rem;
}
.btn-back:hover { color: var(--brand-accent); }

/* ── Forms (change password, auth pages) ─────── */
.form-control:focus {
  border-color: var(--brand-accent);
  box-shadow: 0 0 0 0.25rem rgba(249, 115, 22, 0.25);
}
input[type="password"] {
  letter-spacing: 0.1em;
}

/* ── Delete account animation ────────────────── */
@keyframes pulse {
  0%   { transform: scale(1);    opacity: 1; }
  50%  { transform: scale(1.05); opacity: 0.9; }
  100% { transform: scale(1);    opacity: 1; }
}
.animate-pulse {
  animation: pulse 2s infinite ease-in-out;
}

/* ── Settings page ───────────────────────────── */
.list-group-item-action:hover {
  background-color: var(--brand-accent-faint, #f8f9fa);
}
.security-card .list-group-item {
  transition: all 0.2s;
}
.security-card .list-group-item:hover {
  border-left: 4px solid var(--brand-accent);
  padding-left: calc(1rem - 4px);
}
