/* /var/www/progressive-voices.com/assets/css/pv-redesign.css
 * Progressive Voices — editorial redesign matching pharmacology.tips layout.
 * Utility strip → sticky header (brand, nav, search, user pod) →
 * page head → section rows → footer.
 * Typography: Fraunces (self-hosted) headings + Inter body.
 * Palette: navy / warm gold / off-white — identical to pharmacology.tips.
 */

@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('/assets/fonts/fraunces-vf.woff2') format('woff2-variations'),
       url('/assets/fonts/fraunces-vf.woff2') format('woff2');
}

/* ── Tokens ─────────────────────────────────────────────────────────── */
body.pv-body {
  --ink:      #0B1220;
  --ink-2:    #2A3142;
  --muted:    #5B6275;
  --muted-2:  #8A92A5;
  --line:     #E3E5EA;
  --line-2:   #D8DAE0;
  --bg:       #FAFAF7;
  --card:     #FFFFFF;
  --navy:     #0E2A47;
  --navy-2:   #163C66;
  --accent:   #C8A461;
  --accent-2: #8A6A2D;

  /* Category tag colors for PV content */
  --tag-politics:   #7B1D1D; --tag-politics-bg:   #FDECEA;
  --tag-philosophy: #4F3FB8; --tag-philosophy-bg: #ECE8FD;
  --tag-medicines:  #1F567F; --tag-medicines-bg:  #DCEAF5;
  --tag-pharmacy:   #0F6E55; --tag-pharmacy-bg:   #DBF1E8;
  --tag-culture:    #9C4520; --tag-culture-bg:    #FBE6DA;
  --tag-chess:      #8A6A2D; --tag-chess-bg:      #F4ECDA;
  --tag-other:      #5B6275; --tag-other-bg:      #F2F3F0;
  --tag-links:      #2A3142; --tag-links-bg:      #ECEEEA;

  --shadow-sm: 0 1px 2px rgba(11,18,32,.04), 0 1px 1px rgba(11,18,32,.03);
  --shadow-md: 0 8px 24px -10px rgba(11,18,32,.14), 0 2px 6px -2px rgba(11,18,32,.06);
  --shadow-lg: 0 26px 60px -22px rgba(11,18,32,.30), 0 8px 18px -8px rgba(11,18,32,.12);
}

/* ── Base ───────────────────────────────────────────────────────────── */
body.pv-body {
  margin: 0; padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
}
body.pv-body * { box-sizing: border-box; }
body.pv-body a { color: inherit; text-decoration: none; }

/* ── Utility strip ──────────────────────────────────────────────────── */
.pv-util {
  background: var(--navy);
  color: rgba(255,255,255,.78);
  font-size: 12px;
  letter-spacing: .4px;
}
.pv-util-inner {
  max-width: 1280px; margin: 0 auto;
  padding: 7px 28px;
  display: flex; align-items: center; justify-content: space-between;
}
.pv-util a { color: rgba(255,255,255,.78); transition: color .15s; }
.pv-util a:hover { color: #fff; }
.pv-util-right { display: flex; align-items: center; gap: 14px; }
.pv-util-dot {
  width: 3px; height: 3px; border-radius: 50%;
  background: rgba(255,255,255,.4); display: inline-block;
}

/* ── Header ─────────────────────────────────────────────────────────── */
.pv-header {
  background: var(--card);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 50;
}
.pv-header-inner {
  max-width: 1280px; margin: 0 auto;
  padding: 14px 28px;
  display: grid;
  grid-template-columns: auto auto 1fr auto;
  align-items: center;
  gap: 24px;
}
.pv-brand {
  display: flex; align-items: center; gap: 12px;
}
.pv-brand-mark {
  width: 32px; height: 32px; border-radius: 8px;
  background: var(--navy);
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff;
  box-shadow: inset 0 -1px 0 rgba(255,255,255,.08);
  flex-shrink: 0;
}
.pv-brand-mark svg { width: 17px; height: 17px; }
.pv-brand-name {
  font-family: 'Fraunces', 'Iowan Old Style', Georgia, serif;
  font-weight: 600;
  font-size: 21px; letter-spacing: -.5px; line-height: 1;
  color: var(--ink);
}
.pv-brand-sub {
  font-size: 10px; letter-spacing: 1.6px; text-transform: uppercase;
  color: var(--muted); margin-top: 3px; font-weight: 500;
}

.pv-nav-primary {
  display: flex; align-items: center; gap: 2px;
}
.pv-nav-primary a {
  color: var(--ink-2);
  font-size: 13.5px; font-weight: 500;
  padding: 7px 12px; border-radius: 7px;
  position: relative;
  transition: background .15s, color .15s;
}
.pv-nav-primary a:hover { background: #F1F2EF; color: var(--ink); }
.pv-nav-primary a.active { color: var(--ink); font-weight: 600; }
.pv-nav-primary a.active::after {
  content: "";
  position: absolute;
  left: 12px; right: 12px; bottom: -16px;
  height: 2px; background: var(--ink);
}

.pv-search-wrap { display: flex; justify-content: center; }
.pv-search {
  width: 100%; max-width: 480px;
  display: flex; align-items: center; gap: 10px;
  background: #F2F3F0;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 9px 18px;
  color: var(--muted); font-size: 13.5px;
  cursor: pointer; transition: all .18s;
  text-decoration: none;
}
.pv-search:hover { background: #ECEEEA; border-color: var(--line); }
.pv-search svg { width: 16px; height: 16px; flex-shrink: 0; }
.pv-search-text { flex: 1; color: var(--muted); }

.pv-user-pod { display: flex; align-items: center; gap: 6px; }
.pv-icon-btn {
  width: 34px; height: 34px; border-radius: 8px; border: 1px solid transparent;
  background: transparent; color: var(--ink-2);
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; transition: background .15s, color .15s; padding: 0;
  text-decoration: none;
}
.pv-icon-btn:hover { background: #F1F2EF; }
.pv-icon-btn svg, .pv-icon-btn i { width: 17px; height: 17px; font-size: 16px; }
.pv-avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff; font-weight: 600; font-size: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  margin-left: 6px; margin-right: 4px;
  flex-shrink: 0; text-transform: uppercase;
}
.pv-user-name {
  font-size: 13px; font-weight: 600; color: var(--ink); line-height: 1.1;
}
.pv-user-role {
  font-size: 9px; letter-spacing: 1.4px; color: var(--muted);
  text-transform: uppercase; font-weight: 600;
}
.pv-user-meta { display: flex; flex-direction: column; }

/* ── Page container ─────────────────────────────────────────────────── */
.pv-page {
  max-width: 1280px; margin: 0 auto;
  padding: 36px 28px 72px;
}

/* ── Page head ── eyebrow + serif title + right meta ───────────────── */
.pv-page-head {
  display: grid; grid-template-columns: 1fr auto; align-items: end;
  padding-bottom: 24px; border-bottom: 1px solid var(--line);
  margin-bottom: 36px; gap: 18px;
}
.pv-eyebrow {
  font-size: 11px; letter-spacing: 2px; text-transform: uppercase;
  color: var(--muted); font-weight: 600; margin-bottom: 10px;
}
.pv-page-title {
  font-family: 'Fraunces', 'Iowan Old Style', Georgia, serif;
  font-weight: 500;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.05; letter-spacing: -1px;
  color: var(--ink); margin: 0; max-width: 720px;
}
.pv-page-title em { font-style: italic; font-weight: 500; color: var(--navy-2); }
.pv-page-meta {
  text-align: right; font-size: 12.5px; color: var(--muted); line-height: 1.4;
}
.pv-page-meta strong {
  color: var(--ink); font-weight: 600; font-size: 14.5px;
  display: block; margin-bottom: 2px;
}

/* ── Section row ────────────────────────────────────────────────────── */
.pv-row { margin-bottom: 56px; }
.pv-row-head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 18px;
}
.pv-row-title {
  font-family: 'Fraunces', 'Iowan Old Style', Georgia, serif;
  font-weight: 500; font-size: 26px; letter-spacing: -.5px;
  margin: 0; color: var(--ink);
  display: flex; align-items: center; gap: 10px;
}
.pv-row-count {
  font-family: 'Inter', sans-serif;
  font-size: 11.5px; letter-spacing: .4px;
  color: var(--muted); font-weight: 500;
  padding: 3px 8px; background: #F1F2EF; border-radius: 999px;
}
.pv-row-actions {
  display: flex; align-items: center; gap: 6px;
  font-size: 13px; color: var(--ink-2); font-weight: 500;
  transition: color .15s;
}
.pv-row-actions:hover { color: var(--ink); }
.pv-row-actions svg { width: 14px; height: 14px; }

/* ── Category chips ─────────────────────────────────────────────────── */
.pv-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.pv-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px; border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--card); color: var(--ink-2);
  font-size: 13px; font-weight: 500;
  transition: all .15s; cursor: pointer; text-decoration: none;
}
.pv-chip:hover { border-color: var(--navy); color: var(--navy); background: #F0F4FA; }
.pv-chip.active { background: var(--navy); border-color: var(--navy); color: #fff; }

/* ── Citation cards ─────────────────────────────────────────────────── */
.pv-citation-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}
.pv-citation-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 22px;
  display: flex; flex-direction: column; justify-content: space-between;
  min-height: 180px;
  transition: transform .18s, box-shadow .18s, border-color .18s;
  position: relative;
}
.pv-citation-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--line-2);
}
.pv-citation-card.is-pinned {
  background: var(--navy); border-color: var(--navy);
}
.pv-citation-card.is-pinned .pv-citation-text { color: rgba(255,255,255,.85); }
.pv-citation-card.is-pinned .pv-citation-title { color: #fff; }
.pv-citation-card.is-pinned .pv-citation-meta { color: rgba(255,255,255,.55); }
.pv-citation-card.is-pinned .pv-tag { opacity: .85; }

.pv-citation-title {
  font-family: 'Fraunces', 'Iowan Old Style', Georgia, serif;
  font-weight: 500; font-size: 18px; letter-spacing: -.3px;
  color: var(--ink); margin: 0 0 10px 0; line-height: 1.2;
}
.pv-citation-text {
  font-size: 13.5px; color: var(--muted); line-height: 1.6;
  flex: 1; margin-bottom: 14px;
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical;
  overflow: hidden;
}
.pv-citation-meta {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 11px; color: var(--muted-2); flex-wrap: wrap; gap: 6px;
}
.pv-citation-author { font-weight: 600; font-size: 12px; color: var(--ink-2); }

/* ── Link cards ─────────────────────────────────────────────────────── */
.pv-link-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}
.pv-link-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 16px 18px;
  display: flex; flex-direction: column; gap: 8px;
  transition: transform .15s, box-shadow .15s, border-color .15s;
}
.pv-link-card:hover {
  transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--line-2);
}
.pv-link-title {
  font-size: 14.5px; font-weight: 600; color: var(--ink); line-height: 1.3;
}
.pv-link-url {
  font-size: 11.5px; color: var(--accent-2);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.pv-link-desc { font-size: 12.5px; color: var(--muted); line-height: 1.5; }

/* ── Category tiles (large cards like pharmacology.tips) ────────────── */
.pv-cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}
.pv-cat {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 22px; position: relative; overflow: hidden;
  transition: transform .18s, box-shadow .18s, border-color .18s;
  display: flex; flex-direction: column; justify-content: space-between;
  min-height: 160px; text-decoration: none;
}
.pv-cat:hover {
  transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--line-2);
}
.pv-cat-icon {
  width: 42px; height: 42px; border-radius: 10px;
  background: #F2F4F0; color: var(--navy-2);
  display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: 14px; font-size: 20px;
}
.pv-cat-icon i { font-size: 20px; }
.pv-cat-title {
  font-family: 'Fraunces', 'Iowan Old Style', Georgia, serif;
  font-weight: 500; font-size: 21px; letter-spacing: -.4px;
  margin: 0 0 6px 0; color: var(--ink);
}
.pv-cat-desc { font-size: 12.5px; color: var(--muted); line-height: 1.5; margin: 0; }
.pv-cat-foot {
  display: flex; align-items: center; justify-content: space-between; margin-top: 18px;
}
.pv-cat-count {
  font-size: 10.5px; letter-spacing: 1.3px; text-transform: uppercase;
  color: var(--muted); font-weight: 600;
}
.pv-cat-arrow {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--navy); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  transition: transform .18s, background .18s; flex-shrink: 0;
}
.pv-cat-arrow svg { width: 13px; height: 13px; }
.pv-cat:hover .pv-cat-arrow { transform: translateX(3px); background: var(--navy-2); }
.pv-cat.is-hero {
  background: var(--navy); border-color: var(--navy);
}
.pv-cat.is-hero .pv-cat-icon { background: rgba(255,255,255,.10); color: #fff; }
.pv-cat.is-hero .pv-cat-title { color: #fff; }
.pv-cat.is-hero .pv-cat-desc { color: rgba(255,255,255,.72); }
.pv-cat.is-hero .pv-cat-count { color: rgba(255,255,255,.55); }
.pv-cat.is-hero .pv-cat-arrow { background: var(--accent); color: var(--navy); }

/* ── Tag pills ──────────────────────────────────────────────────────── */
.pv-tag {
  font-size: 9.5px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase;
  padding: 2px 7px; border-radius: 4px; display: inline-block;
}
.pv-tag-politics   { background: var(--tag-politics-bg);   color: var(--tag-politics); }
.pv-tag-philosophy { background: var(--tag-philosophy-bg); color: var(--tag-philosophy); }
.pv-tag-medicines  { background: var(--tag-medicines-bg);  color: var(--tag-medicines); }
.pv-tag-pharmacy   { background: var(--tag-pharmacy-bg);   color: var(--tag-pharmacy); }
.pv-tag-culture    { background: var(--tag-culture-bg);    color: var(--tag-culture); }
.pv-tag-chess      { background: var(--tag-chess-bg);      color: var(--tag-chess); }
.pv-tag-other      { background: var(--tag-other-bg);      color: var(--tag-other); }
.pv-tag-links      { background: var(--tag-links-bg);      color: var(--tag-links); }

/* ── Pagination ─────────────────────────────────────────────────────── */
.pv-pagination {
  display: flex; align-items: center; justify-content: center; gap: 4px;
  margin-top: 36px; flex-wrap: wrap;
}
.pv-page-btn {
  width: 36px; height: 36px; border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 500; color: var(--ink-2);
  border: 1px solid var(--line); background: var(--card);
  text-decoration: none; transition: all .15s;
}
.pv-page-btn:hover { background: #F1F2EF; border-color: var(--line-2); color: var(--ink); }
.pv-page-btn.active { background: var(--navy); border-color: var(--navy); color: #fff; }
.pv-page-btn.disabled { opacity: .35; pointer-events: none; }

/* ── Login card ─────────────────────────────────────────────────────── */
.pv-login-wrap {
  min-height: 80vh;
  display: flex; align-items: center; justify-content: center;
  padding: 48px 24px;
}
.pv-login-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 18px;
  padding: 40px 48px; width: 100%; max-width: 420px;
  box-shadow: var(--shadow-md);
}
.pv-login-title {
  font-family: 'Fraunces', 'Iowan Old Style', Georgia, serif;
  font-weight: 500; font-size: 30px; letter-spacing: -.5px;
  color: var(--ink); margin: 0 0 6px 0;
}
.pv-login-sub { font-size: 13.5px; color: var(--muted); margin-bottom: 28px; }
.pv-form-label { font-size: 12px; font-weight: 600; letter-spacing: .4px; color: var(--ink-2); margin-bottom: 6px; display: block; }
.pv-form-input {
  width: 100%; padding: 10px 14px; border: 1px solid var(--line);
  border-radius: 8px; font-size: 14px; color: var(--ink);
  background: var(--bg); font-family: inherit;
  transition: border-color .15s, box-shadow .15s; outline: none;
}
.pv-form-input:focus { border-color: var(--navy); box-shadow: 0 0 0 3px rgba(14,42,71,.10); }
.pv-btn-primary {
  width: 100%; padding: 11px 20px;
  background: var(--navy); color: #fff; border: none;
  border-radius: 8px; font-size: 14px; font-weight: 600;
  cursor: pointer; font-family: inherit;
  transition: background .15s, transform .1s;
}
.pv-btn-primary:hover { background: var(--navy-2); }
.pv-btn-primary:active { transform: scale(.98); }
.pv-alert-error {
  background: #FEE2E2; color: #7B1D1D; border: 1px solid #FECACA;
  border-radius: 8px; padding: 10px 14px; font-size: 13px; margin-bottom: 18px;
}

/* ── Footer ─────────────────────────────────────────────────────────── */
.pv-footer {
  border-top: 1px solid var(--line); padding: 30px 0; margin-top: 16px;
  font-size: 12px; color: var(--muted);
}
.pv-footer-inner {
  max-width: 1280px; margin: 0 auto; padding: 0 28px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 18px; flex-wrap: wrap;
}
.pv-footer-links { display: flex; gap: 18px; }
.pv-footer a { color: inherit; transition: color .15s; }
.pv-footer a:hover { color: var(--ink); }

/* ── Responsive ─────────────────────────────────────────────────────── */
@media (max-width: 960px) {
  .pv-header-inner { grid-template-columns: auto 1fr auto; gap: 16px; }
  .pv-nav-primary { display: none; }
}
@media (max-width: 700px) {
  .pv-util { display: none; }
  .pv-header-inner { padding: 12px 18px; }
  .pv-brand-name { font-size: 18px; }
  .pv-brand-sub { display: none; }
  .pv-user-meta { display: none; }
  .pv-page { padding: 26px 18px 56px; }
  .pv-page-head { grid-template-columns: 1fr; }
  .pv-page-meta { text-align: left; }
  .pv-page-title { font-size: 24px; }
  .pv-row { margin-bottom: 40px; }
  .pv-row-title { font-size: 20px; }
  .pv-citation-grid { grid-template-columns: 1fr; }
  .pv-link-grid { grid-template-columns: 1fr; }
  .pv-login-card { padding: 28px 22px; }
}
