/*
Theme Name: PeptideGuide Core
Theme URI: https://peptideguide.com
Author: PeptideGuide
Description: Lightweight custom theme for peptideguide.com (encyclopedic architecture, speed-first).
Version: 0.1.0
Requires at least: 6.0
Tested up to: 6.5
Text Domain: peptideguide
*/

:root {
  --bg: #f5f7fb;
  --surface: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --brand: #0b5fff;
  --radius: 14px;
  --max: 1120px;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: 16px 0; }
.brand { font-weight: 700; color: var(--text); font-size: 20px; }
.main-nav a { margin-left: 18px; color: var(--text); font-size: 14px; }
.menu-inline { margin: 0; padding: 0; list-style: none; display: flex; gap: 18px; }
.menu-inline li { margin: 0; }
.menu-inline a { margin-left: 0; }
.main { padding: 28px 0 56px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.page-title, h1 { margin-top: 0; line-height: 1.2; }
.grid { display: grid; grid-template-columns: 1fr 320px; gap: 24px; }
.meta { color: var(--muted); font-size: 14px; }
.sidebar .card { margin-bottom: 18px; }
.kv { width: 100%; border-collapse: collapse; font-size: 14px; }
.kv th, .kv td { border-bottom: 1px solid var(--line); padding: 8px; text-align: left; vertical-align: top; }
.list-clean { list-style: none; margin: 0; padding: 0; }
.list-clean li { padding: 8px 0; border-bottom: 1px solid var(--line); }
.score-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.score-list li { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; border-bottom: 1px solid var(--line); padding-bottom: 8px; }
.score-list li strong { white-space: nowrap; }
.sidebar-scorecard h3 { margin-bottom: 10px; }
.sidebar-scorecard-visual { padding: 0; overflow: hidden; border-radius: 14px; }
.ss-top { background: #f3f4f6; border-bottom: 1px solid #e5e7eb; padding: 14px; }
.ss-brand { font-size: 10px; text-transform: uppercase; letter-spacing: .08em; color: #4b5563; font-weight: 700; }
.ss-title { font-size: 22px; font-weight: 800; line-height: 1.1; margin-top: 3px; color: #0f172a; }
.ss-tag { display: inline-block; margin-top: 8px; background: #e5e7eb; color: #374151; font-size: 10px; font-weight: 700; padding: 4px 8px; border-radius: 8px; text-transform: uppercase; letter-spacing: .04em; }
.ss-body { padding: 12px 14px; }
.ss-kicker { font-size: 10px; text-transform: uppercase; letter-spacing: .08em; color: #64748b; font-weight: 700; margin-bottom: 8px; }
.ss-item { margin-bottom: 9px; }
.ss-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; color: #0f172a; margin-bottom: 4px; }
.ss-row strong { font-size: 12px; white-space: nowrap; }
.ss-track { height: 6px; background: #e5e7eb; border-radius: 999px; overflow: hidden; }
.ss-fill { height: 100%; background: linear-gradient(90deg, #2563eb, #38bdf8); border-radius: 999px; }
.ss-stats { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; margin-top: 10px; }
.ss-stat { background:#f8fafc; border:1px solid #eef2f7; border-radius:10px; padding:8px 10px; }
.ss-stat strong { display:block; font-size:18px; line-height:1.1; color:#0f172a; }
.ss-stat span { display:block; margin-top:2px; font-size:10px; text-transform:uppercase; letter-spacing:.06em; color:#4b5563; font-weight:700; }
.ss-alert { border-top: 1px solid #e5e7eb; background: #fffbeb; color: #854d0e; font-size: 11px; line-height: 1.35; padding: 10px 12px; }
.site-footer { border-top: 1px solid var(--line); background: var(--surface); }
.footer-inner { padding: 20px 0; color: var(--muted); font-size: 14px; }
.tax-badges { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 14px; }
.badge { font-size: 12px; border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px; color: var(--muted); background: #fff; }
.pg-hero {
  background: linear-gradient(135deg, #0f172a 0%, #111827 60%, #1e293b 100%);
  color: #e2e8f0;
  border: none;
  margin-bottom: 24px;
}
.pg-hero h1 { color: #fff; font-size: clamp(30px, 5vw, 50px); margin-bottom: 10px; }
.pg-hero .eyebrow { letter-spacing: .08em; text-transform: uppercase; color: #93c5fd; font-size: 12px; margin-bottom: 8px; }
.pg-hero .lead { color: #cbd5e1; max-width: 760px; }
.hero-actions { display: flex; gap: 10px; margin-top: 18px; }
.btn {
  display: inline-block;
  padding: 10px 14px;
  border-radius: 10px;
  background: #2563eb;
  color: #fff;
  font-weight: 600;
}
.btn:hover { text-decoration: none; filter: brightness(1.05); }
.btn-ghost { background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.2); }

.hub-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.hub {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  display: block;
  color: inherit;
  background: #fff;
}
.hub h3 { margin: 0 0 6px; color: #0f172a; }
.hub p { margin: 0; color: var(--muted); font-size: 14px; }
.hub:hover { text-decoration: none; box-shadow: 0 4px 14px rgba(2,8,23,.06); }
.profile-section { margin-top: 20px; padding-top: 12px; border-top: 1px solid var(--line); }
.profile-section h2 { margin: 0 0 10px; font-size: 22px; }
.peptide-profile ul { margin: 0 0 0 18px; }
.global-disclaimer {
  margin-top: 24px;
  padding: 14px 16px;
  border: 1px solid #fecaca;
  background: #fff7ed;
  border-radius: 12px;
}
.global-disclaimer h2 {
  margin: 0 0 8px;
  font-size: 16px;
  color: #7c2d12;
}
.global-disclaimer p {
  margin: 0;
  font-size: 14px;
  color: #7c2d12;
}

.pg-faq-accordion {
  display: grid;
  gap: 14px;
  margin-top: 10px;
}
.pg-faq-accordion details {
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  overflow: hidden;
}
.pg-faq-accordion summary {
  list-style: none;
  cursor: pointer;
  font-weight: 700;
  font-size: 19px;
  color: #374151;
  padding: 20px 22px;
  line-height: 1.35;
}
.pg-faq-accordion summary::-webkit-details-marker { display: none; }
.pg-faq-accordion summary::after {
  content: '+';
  float: right;
  font-weight: 700;
  color: #9ca3af;
}
.pg-faq-accordion details[open] {
  background: #f8fafc;
}
.pg-faq-accordion details[open] summary {
  border-bottom: 1px solid #e5e7eb;
}
.pg-faq-accordion details[open] summary::after { content: '−'; color:#4b5563; }
.pg-faq-answer {
  padding: 14px 22px 20px 22px;
  color: #4b5563;
  font-size: 16px;
  line-height: 1.7;
}
.pg-faq-answer p { margin: 0; }

/* ── Burger menu ── */
.burger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  flex-direction: column;
  gap: 5px;
  z-index: 110;
}
.burger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform .25s, opacity .25s;
}
.mobile-nav-open .burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.mobile-nav-open .burger span:nth-child(2) { opacity: 0; }
.mobile-nav-open .burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Mobile nav drawer ── */
.mobile-nav {
  display: none;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  padding: 0 20px 16px;
}
.mobile-nav-open .mobile-nav { display: block; }
.mobile-menu-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.mobile-menu-list li {
  border-bottom: 1px solid var(--line);
}
.mobile-menu-list a {
  display: block;
  padding: 12px 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}
.mobile-menu-list li:last-child { border-bottom: none; }

@media (max-width: 980px) {
  .grid { grid-template-columns: 1fr; }
  .hub-grid { grid-template-columns: 1fr; }
  .main-nav { display: none; }
  .burger { display: flex; }
  .pg-faq-accordion summary { font-size: 18px; }
  .pg-faq-answer { font-size: 16px; }

  /* Peptide pages: scorecard before content, rest after on mobile */
  .peptide-profile-grid { display: flex; flex-direction: column; }
  .peptide-profile-grid .sidebar { display: contents; }
  .peptide-profile-grid .sidebar .sidebar-scorecard { order: -1; }
  .peptide-profile-grid .sidebar .sidebar-rest { order: 1; }

  /* Compare pages: content first, sidebar after on mobile */
  .compare-profile-grid { display: flex; flex-direction: column; }
  .compare-profile-grid .compare-profile { order: -1; }
}

/* ── Footer ── */
.site-footer { background: #111; color: #aaa; padding: 2rem 0; text-align: center; font-size: 0.85rem; line-height: 1.6; }
.footer-links { margin-bottom: 0.75rem; }
.footer-links a { color: #0284c7; text-decoration: none; margin: 0 0.75rem; }
.footer-links a:hover { color: #0ea5e9; text-decoration: underline; }
.footer-copy { margin: 0 0 0.4rem; color: #6b7280; }
.footer-disclaimer { margin: 0; color: #4b5563; font-size: 0.78rem; max-width: 640px; margin-left: auto; margin-right: auto; }

/* ── Contact Form ── */
#pg-contact-form { max-width: 600px; margin: 1.5rem 0; }
.pg-form-group { margin-bottom: 1rem; }
.pg-form-group label { display: block; font-weight: 600; margin-bottom: 0.3rem; color: #e0e0e0; font-size: 0.9rem; }
.pg-form-group input, .pg-form-group select, .pg-form-group textarea { width: 100%; padding: 0.6rem 0.8rem; background: #1a1a2e; border: 1px solid #333; border-radius: 6px; color: #e0e0e0; font-size: 0.95rem; font-family: inherit; }
.pg-form-group input:focus, .pg-form-group select:focus, .pg-form-group textarea:focus { outline: none; border-color: #4fc3f7; box-shadow: 0 0 0 2px rgba(79,195,247,0.15); }
.pg-form-group textarea { resize: vertical; }
.pg-honeypot { position: absolute; left: -9999px; }
.pg-submit { background: #4fc3f7; color: #0a0a1a; border: none; padding: 0.7rem 2rem; border-radius: 6px; font-size: 1rem; font-weight: 600; cursor: pointer; transition: background 0.2s; }
.pg-submit:hover { background: #81d4fa; }
.pg-form-success { background: #1b5e20; color: #c8e6c9; padding: 1rem; border-radius: 6px; margin-bottom: 1rem; }
.pg-form-error { background: #b71c1c; color: #ffcdd2; padding: 1rem; border-radius: 6px; margin-bottom: 1rem; }

/* ── Hub intro paragraphs ── */
.pg-hub-intro { color: #64748b; margin-top: 4px; font-size: 15px; line-height: 1.6; margin-bottom: 0; }

/* ── Homepage hero sub ── */
.hero-sub { font-size: 13px; color: rgba(255,255,255,0.6); margin-top: 8px; letter-spacing: 0.02em; }

/* ── Peptide page mobile reorder: scorecard → content → rest of sidebar ── */
@media (max-width: 980px) {
  .peptide-profile-grid {
    display: flex;
    flex-direction: column;
  }
  .peptide-profile-grid .sidebar-scorecard {
    order: -2;
  }
  .peptide-profile-grid .peptide-profile {
    order: -1;
  }
  .peptide-profile-grid .sidebar-rest {
    order: 1;
  }
}
