/* ===========================================================
   Build a Men's Group  -  styles.css
   Bright, light, cheerful. Slate-blue #28557A accent. No dark backgrounds.
   =========================================================== */

:root {
  --accent: #28557A;
  --accent-deep: #1E4360;
  --accent-soft: #EEF3F8;
  --accent-tint: #F2F6FA;
  --amber: #E0922F;
  --ink: #1B242B;
  --ink-soft: #5A6B78;
  --ink-faint: #6b7280;
  --page: #F7F9FB;
  --warm: #FBF7F1;
  --line: #d9e3ec;
  --line-soft: #e7edf2;
  --card: #ffffff;
  --shadow-sm: 0 1px 3px rgba(27, 36, 43, 0.06), 0 1px 2px rgba(27, 36, 43, 0.04);
  --shadow-md: 0 6px 24px rgba(40, 85, 122, 0.10), 0 2px 8px rgba(27, 36, 43, 0.05);
  --shadow-lg: 0 18px 50px rgba(40, 85, 122, 0.14), 0 6px 18px rgba(27, 36, 43, 0.06);
  --radius: 16px;
  --radius-sm: 11px;
  --prose: min(92%, 760px);
  --wide: min(92%, 1100px);
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--page);
  line-height: 1.65;
  font-size: 18px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-wrap: break-word;
}

@media (max-width: 480px) {
  body { font-size: 17px; }
}

img, svg { max-width: 100%; height: auto; display: block; }

a { color: var(--accent-deep); text-decoration-thickness: 1.5px; text-underline-offset: 2px; }
a:hover { color: var(--accent); }

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--accent);
  color: #fff;
  padding: 10px 16px;
  border-radius: 0 0 10px 0;
  z-index: 200;
  font-weight: 600;
}
.skip-link:focus { left: 0; }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------- Containers ---------- */
.container-wide { width: var(--wide); margin-inline: auto; }

.prose {
  width: var(--prose);
  margin-inline: auto;
}
.prose-wide-head { width: var(--prose); margin-inline: auto; }

/* ---------- Sticky top bar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 253, 251, 0.88);
  backdrop-filter: saturate(160%) blur(10px);
  -webkit-backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  width: var(--wide);
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 58px;
  padding: 8px 0;
  flex-wrap: wrap;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--sans);
  font-weight: 700;
  font-size: 1.02rem;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}
.brand:hover { color: var(--ink); }
.brand-mark { display: inline-flex; filter: drop-shadow(0 1px 2px rgba(40,85,122,0.3)); }
.brand-text { background: linear-gradient(90deg, var(--accent-deep), var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }

.topnav {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}
.topnav a {
  color: var(--ink-soft);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.92rem;
  padding: 6px 11px;
  border-radius: 999px;
  transition: background-color .15s ease, color .15s ease;
  white-space: nowrap;
}
.topnav a:hover { background: var(--accent-soft); color: var(--accent-deep); }

@media (max-width: 430px) {
  .topnav a { padding: 5px 8px; font-size: 0.84rem; }
  .brand-text { font-size: 0.95rem; }
}

/* ---------- Hero ---------- */
.hero {
  background:
    radial-gradient(1100px 520px at 80% -10%, var(--accent-soft) 0%, rgba(238,243,248,0) 60%),
    radial-gradient(900px 500px at 0% 110%, #fbf1e2 0%, rgba(251,241,226,0) 55%),
    var(--page);
  border-bottom: 1px solid var(--line);
  padding: clamp(40px, 6vw, 78px) 0 clamp(36px, 5vw, 66px);
}
.hero-inner {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  align-items: center;
  gap: clamp(26px, 4vw, 56px);
}
@media (max-width: 880px) {
  .hero-inner { grid-template-columns: 1fr; gap: 30px; }
  .hero-art { order: -1; max-width: 460px; margin-inline: auto; width: 100%; }
}

.eyebrow {
  margin: 0 0 14px;
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-deep);
}
.hero h1 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(2.2rem, 6.2vw, 3.6rem);
  line-height: 1.04;
  letter-spacing: -0.02em;
  margin: 0 0 16px;
  color: var(--ink);
}
.subtitle {
  font-size: clamp(1.08rem, 2.4vw, 1.32rem);
  line-height: 1.45;
  color: var(--ink-soft);
  font-weight: 500;
  margin: 0 0 22px;
  max-width: 38ch;
}
.hero-lead {
  margin: 0 0 16px;
  color: var(--ink-soft);
  font-size: 1.02rem;
  line-height: 1.62;
  max-width: 56ch;
}
.hero-lead strong { color: var(--ink); }

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-top: 10px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 1.04rem;
  padding: 14px 26px;
  border-radius: 999px;
  text-decoration: none;
  box-shadow: 0 8px 22px rgba(40, 85, 122, 0.32);
  transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.btn-primary:hover {
  color: #fff;
  background: #1E4360;
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(40, 85, 122, 0.4);
}
.btn-primary svg { transition: transform .15s ease; }
.btn-primary:hover svg { transform: translateX(3px); }

.hero-art { position: relative; }
.hero-svg {
  width: 100%;
  height: auto;
  border-radius: 26px;
  box-shadow: var(--shadow-lg);
  background: #fffdfb;
}

/* ---------- Table of contents / jump row ---------- */
.toc {
  background: var(--warm);
  border-bottom: 1px solid var(--line-soft);
  position: sticky;
  top: 58px;
  z-index: 80;
}
.toc-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 0;
  overflow-x: auto;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}
.toc-label {
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-faint);
  flex: 0 0 auto;
}
.toc ul {
  display: flex;
  gap: 7px;
  list-style: none;
  margin: 0;
  padding: 0;
  flex: 1 1 auto;
}
.toc li { flex: 0 0 auto; }
.toc a {
  display: inline-block;
  color: var(--ink-soft);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.86rem;
  padding: 6px 13px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  white-space: nowrap;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.toc a:hover { background: var(--accent); color: #fff; border-color: var(--accent); }

@media (max-width: 700px) {
  .toc { position: static; }
}

/* ---------- Bands (full-bleed sections) ---------- */
.band {
  padding: clamp(34px, 5vw, 58px) 0;
  background: var(--page);
}
.band-tint {
  background: var(--accent-tint);
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}

/* ---------- Prose typography ---------- */
.prose h2 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1.55rem, 3.6vw, 2.15rem);
  line-height: 1.12;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin: 0 0 18px;
}
.prose h3 {
  font-family: var(--sans);
  font-weight: 700;
  font-size: clamp(1.16rem, 2.6vw, 1.4rem);
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 34px 0 10px;
}
.prose p {
  margin: 0 0 18px;
  color: var(--ink-soft);
}
.prose p strong { color: var(--ink); font-weight: 700; }

/* citation superscript-style links */
.cite {
  display: inline-block;
  font-size: 0.74em;
  font-weight: 700;
  line-height: 1;
  vertical-align: 0.34em;
  color: var(--accent-deep);
  text-decoration: none;
  padding: 0 1px;
  transition: color .12s ease;
}
.cite:hover { color: var(--accent); text-decoration: underline; }
.cite-on-tint { color: var(--accent-deep); }

/* ---------- Pull stat ---------- */
.pullstat {
  display: flex;
  align-items: center;
  gap: 20px;
  background: linear-gradient(120deg, var(--accent-soft), #fbf1e2);
  border: 1px solid var(--line);
  border-left: 5px solid var(--accent);
  border-radius: var(--radius);
  padding: 22px 24px;
  margin: 26px 0;
  box-shadow: var(--shadow-sm);
}
.pullstat-num {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(2.2rem, 6vw, 3rem);
  line-height: 1;
  color: var(--accent-deep);
  flex: 0 0 auto;
}
.pullstat-text { margin: 0; font-size: 0.98rem; color: var(--ink-soft); }
.pullstat-text strong { color: var(--ink); }
@media (max-width: 460px) {
  .pullstat { flex-direction: column; align-items: flex-start; gap: 8px; padding: 18px 18px; }
}

/* ---------- Steps at-a-glance head + note ---------- */
.note-after-table {
  margin-top: 22px;
  font-size: 1.02rem;
  color: var(--ink-soft);
  font-style: italic;
}

/* ---------- Data tables ---------- */
.table-wrap {
  width: var(--wide);
  margin: 8px auto 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius);
  scrollbar-width: thin;
}
/* When a table sits inside .prose (the format table), keep it within prose width */
.prose .table-wrap { width: 100%; margin-inline: 0; }

.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  font-size: 0.97rem;
}
.data-table thead th {
  background: linear-gradient(180deg, #fff, var(--accent-tint));
  color: var(--ink);
  font-weight: 700;
  text-align: left;
  padding: 14px 16px;
  font-size: 0.88rem;
  letter-spacing: 0.01em;
  border-bottom: 2px solid var(--accent-soft);
  white-space: nowrap;
}
.data-table tbody td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line-soft);
  color: var(--ink-soft);
  vertical-align: middle;
}
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:nth-child(even) td { background: #f6f9fc; }
.data-table td strong { color: var(--ink); }
.nowrap { white-space: nowrap; }

.steps-table td:first-child { width: 64px; }
.format-table td:first-child { width: 116px; }

.num-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-weight: 800;
  font-size: 1.02rem;
  box-shadow: 0 3px 8px rgba(40, 85, 122, 0.32);
}

/* steps cards (shown only on narrow screens) */
.steps-cards { display: none; }

@media (max-width: 640px) {
  .steps-table { display: none; }
  .table-wrap.steps-wrap, .steps-table + .steps-cards { }
  .steps-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
    gap: 14px;
    list-style: none;
    margin: 0;
    padding: 0;
  }
  .steps-cards li {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 16px 16px;
    box-shadow: var(--shadow-sm);
  }
  .steps-cards li[aria-hidden] { }
  .steps-cards h3 {
    margin: 2px 0 4px;
    font-size: 1.08rem;
    font-weight: 800;
    color: var(--ink);
  }
  .steps-cards .card-sub {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--accent-deep);
    background: var(--accent-soft);
    padding: 1px 8px;
    border-radius: 999px;
    margin-left: 6px;
    vertical-align: middle;
  }
  .steps-cards p { margin: 0; font-size: 0.95rem; color: var(--ink-soft); }
}

/* ---------- Step sections ---------- */
.step-head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
}
.step-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--accent), #3D6E96);
  color: #fff;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.7rem;
  box-shadow: 0 8px 18px rgba(40, 85, 122, 0.3);
}
.step-head h2 { margin: 0; }
@media (max-width: 480px) {
  .step-badge { width: 44px; height: 44px; font-size: 1.4rem; border-radius: 13px; }
  .step-head { gap: 12px; }
}

/* ---------- Meeting-flow diagram ---------- */
.flow-figure { margin: 28px 0 22px; }
.flow-cap, .goaround-cap {
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--accent-deep);
  text-align: center;
  margin: 0 0 14px;
}
.flow {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(160deg, #fff, var(--accent-tint));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 18px;
  box-shadow: var(--shadow-md);
}
.flow-step {
  flex: 1 1 130px;
  min-width: 116px;
  max-width: 180px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 14px 10px;
  box-shadow: var(--shadow-sm);
}
.flow-step-main {
  border-color: var(--accent);
  background: linear-gradient(180deg, #fff, var(--accent-soft));
}
.flow-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-weight: 800;
  font-size: 0.95rem;
  box-shadow: 0 3px 7px rgba(40, 85, 122, 0.3);
}
.flow-time {
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--accent-deep);
}
.flow-name {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.25;
}
.flow-arrow {
  display: flex;
  align-items: center;
  align-self: center;
  flex: 0 0 auto;
}
.flow-loop {
  flex-basis: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 4px;
}
.flow-loop-text {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent-deep);
  letter-spacing: 0.02em;
}
@media (max-width: 560px) {
  .flow { flex-direction: column; align-items: stretch; }
  .flow-step { max-width: none; flex-direction: row; justify-content: flex-start; text-align: left; gap: 12px; }
  .flow-name { flex: 1; }
  .flow-arrow { transform: rotate(90deg); }
  .flow-loop { display: none; }
}

/* ---------- Go-around illustration ---------- */
.goaround-figure { margin: 26px 0 22px; }
.goaround {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--line);
}
.goaround-svg { width: 100%; height: auto; display: block; }
.goaround-cap { margin-top: 14px; text-transform: none; letter-spacing: 0; font-weight: 600; font-size: 0.92rem; color: var(--ink-faint); }

/* ---------- Common mistakes list ---------- */
.mistakes {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}
.mistakes li {
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 15px 18px 15px 50px;
  color: var(--ink-soft);
  font-size: 0.98rem;
  box-shadow: var(--shadow-sm);
}
.mistakes li::before {
  content: "";
  position: absolute;
  left: 16px;
  top: 17px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M6 6l12 12M18 6L6 18'/%3E%3C/svg%3E") center / 13px no-repeat,
    var(--accent);
}
.mistakes li strong { color: var(--ink); }

/* ---------- FAQ accordions ---------- */
.faq-item {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  margin: 0 0 12px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 17px 52px 17px 20px;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--ink);
  position: relative;
  user-select: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "";
  position: absolute;
  right: 20px;
  top: 50%;
  width: 13px;
  height: 13px;
  margin-top: -7px;
  border-right: 2.5px solid var(--accent);
  border-bottom: 2.5px solid var(--accent);
  transform: rotate(45deg);
  transition: transform .2s ease;
}
.faq-item[open] summary::after { transform: rotate(-135deg); margin-top: -3px; }
.faq-item summary:hover { color: var(--accent-deep); }
.faq-body { padding: 0 20px 18px; }
.faq-body p { margin: 0; color: var(--ink-soft); }

/* ---------- Safety callout ---------- */
.safety-callout {
  display: flex;
  gap: 18px;
  background: linear-gradient(150deg, #fdf9f3, #fbf1e2);
  border: 1px solid var(--line);
  border-left: 5px solid var(--accent);
  border-radius: var(--radius);
  padding: 26px 26px;
  box-shadow: var(--shadow-md);
}
.safety-icon {
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: 1px solid var(--accent-soft);
  border-radius: 13px;
  box-shadow: var(--shadow-sm);
}
.safety-content h2 { margin: 2px 0 14px; }
.safety-content p:last-child { margin-bottom: 0; }
@media (max-width: 520px) {
  .safety-callout { flex-direction: column; gap: 12px; padding: 20px 18px; }
}

/* ---------- Sources ---------- */
.sources-list {
  margin: 0;
  padding-left: 1.4em;
  font-size: 0.86rem;
  line-height: 1.6;
  color: var(--ink-faint);
}
.sources-list li {
  margin: 0 0 10px;
  padding-left: 4px;
}
.sources-list li::marker { color: var(--accent-deep); font-weight: 700; }
.sources-list em { color: var(--ink-soft); }
.sources-list a { word-break: break-word; color: var(--accent-deep); }

/* ---------- Footer ---------- */
.site-footer {
  background: linear-gradient(180deg, var(--warm), var(--accent-tint));
  border-top: 1px solid var(--line);
  padding: clamp(34px, 5vw, 52px) 0 clamp(28px, 4vw, 40px);
}
.footer-inner { text-align: center; }
.footer-mark { display: inline-flex; margin-bottom: 10px; }
.footer-title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.3rem;
  color: var(--ink);
  margin: 0 0 8px;
}
.footer-line {
  margin: 0 auto 10px;
  max-width: 52ch;
  color: var(--ink-soft);
  font-size: 0.98rem;
}
.footer-meta {
  margin: 0;
  color: var(--ink-faint);
  font-size: 0.85rem;
}
.footer-meta a { color: var(--accent-deep); }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
