/* GW Insiders Resource — series styles
   Used by /tools/<slug>-resource/ pages. Pairs with gw-tools.css. */

:root {
  --ir-red-tint: rgba(198, 40, 40, 0.10);
  --ir-card-shadow: 0 1px 3px rgba(0,0,0,0.06);
  --ir-card-shadow-hover: 0 6px 18px rgba(0,0,0,0.10);
}

/* Wider canvas for resource pages */
.insiders-main { max-width: 820px; margin: 0 auto; padding: 1.5rem 1.25rem 2rem; position: relative; z-index: 2; }

/* Cursor spotlight — fixed, pointer-events off, behind content via z-index ordering */
.gw-spotlight {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background: radial-gradient(
    520px circle at var(--mx, 50%) var(--my, 50%),
    var(--ir-red-tint) 0%,
    rgba(198, 40, 40, 0) 60%
  );
  transition: background 90ms linear;
}

/* Hero strip */
.insiders-hero { position: relative; z-index: 2; }
.insiders-hero .stamp {
  display: inline-block;
  background: var(--gw-red);
  color: white;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  padding: 0.28rem 0.6rem;
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 0.4rem;
}
.insiders-hero h1 { font-size: 2.2rem; margin: 0; letter-spacing: 0.01em; }
.insiders-hero p { color: #cfcfcf; margin-top: 0.4rem; }

/* Hero pull quote */
.hero-quote {
  font-size: 1.2rem;
  line-height: 1.45;
  font-weight: 600;
  background: white;
  border-left: 6px solid var(--gw-red);
  padding: 0.85rem 1.1rem;
  margin: 1.25rem 0 1.75rem;
  box-shadow: var(--ir-card-shadow);
}

/* Tab anchor row */
.tab-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(116px, 1fr));
  gap: 0.5rem;
  margin: 1.5rem 0;
}
.tab-row a {
  background: var(--gw-black);
  color: white;
  padding: 0.95rem 0.5rem;
  text-decoration: none;
  text-align: center;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: 4px;
  font-size: 0.92rem;
  transition: transform 120ms ease, background 120ms ease;
}
.tab-row a:hover { background: #2a2a2a; transform: translateY(-2px); }
.tab-row a small {
  display: block;
  font-weight: 400;
  opacity: 0.78;
  text-transform: none;
  letter-spacing: 0;
  margin-top: 0.3rem;
  font-size: 0.78rem;
}

/* Section heads */
.insiders-main h2 {
  font-size: 1.5rem;
  letter-spacing: 0.02em;
  margin: 2.25rem 0 0.5rem;
  padding-bottom: 0.35rem;
  border-bottom: 2px solid var(--gw-black);
}
.insiders-main h2 .num { color: var(--gw-red); margin-right: 0.4rem; }

/* Card hover lift for the parallax cards */
.gw-card[data-parallax] {
  transition: transform 280ms cubic-bezier(.2,.7,.3,1), box-shadow 200ms ease;
  will-change: transform;
}
.gw-card[data-parallax]:hover { box-shadow: var(--ir-card-shadow-hover); }

/* Protocol grid */
.protocol-wrap { background: white; padding: 0.5rem; box-shadow: var(--ir-card-shadow); overflow-x: auto; }
.protocol-grid { width: 100%; border-collapse: collapse; font-size: 0.92rem; min-width: 560px; }
.protocol-grid th, .protocol-grid td {
  border: 1px solid #e3e3e3;
  padding: 0.65rem 0.7rem;
  text-align: left;
  vertical-align: top;
}
.protocol-grid th { background: var(--gw-black); color: white; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; font-size: 0.78rem; }
.protocol-grid td:first-child { font-weight: 700; text-align: center; width: 3rem; }
.phase-prox { background: #fff5e6; }
.phase-dist { background: #e8f4f8; }
.phase-int  { background: #efe8f8; }
.phase-tag { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: #555; }

/* Expandable detail boxes */
.insiders-main details {
  background: white;
  padding: 0.7rem 1rem;
  margin: 0.6rem 0;
  border-left: 4px solid var(--gw-muted);
  box-shadow: var(--ir-card-shadow);
  cursor: pointer;
}
.insiders-main details[open] { border-left-color: var(--gw-black); }
.insiders-main summary { font-weight: 700; }
.insiders-main details p { margin: 0.5rem 0 0; }

/* Source list + inline source chips */
.source-link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: #f0ede5;
  color: var(--gw-black);
  padding: 0.18rem 0.5rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  margin: 0 0.15rem;
  border: 1px solid #e1ddd1;
  transition: background 120ms ease;
}
.source-link:hover { background: #e7e3d3; }
.source-link::after { content: "↗"; font-size: 0.75rem; opacity: 0.7; }

.source-list { display: flex; flex-direction: column; gap: 0; background: white; box-shadow: var(--ir-card-shadow); }
.source-list a {
  padding: 0.8rem 1rem;
  border-bottom: 1px solid #eee;
  color: var(--gw-body);
  text-decoration: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  transition: background 120ms ease;
}
.source-list a:last-child { border-bottom: 0; }
.source-list a:hover { background: #faf8f1; }
.source-list .src-meta {
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gw-muted);
  font-weight: 700;
  white-space: nowrap;
}
.source-list .src-meta.internal { color: var(--gw-red); }
.source-list .src-meta.external { color: var(--gw-orange); }

/* Pull-quote block (Scott's verbatim voice) */
.scott-quote {
  border-left: 4px solid var(--gw-black);
  padding: 0.6rem 1rem;
  margin: 0.75rem 0;
  font-style: italic;
  color: #2a2a2a;
}

/* Asymmetry color legend */
.asym-row { display: flex; gap: 0.5rem; margin: 0.4rem 0; flex-wrap: wrap; }
.asym-row span {
  padding: 0.35rem 0.7rem;
  border-radius: 4px;
  font-weight: 700;
  font-size: 0.9rem;
}
.asym-green  { background: #e0efd9; color: var(--gw-green); }
.asym-yellow { background: #fff3c4; color: #b07900; }
.asym-red    { background: #fadcdc; color: var(--gw-red); }

/* Talk-inside CTA */
.talk-cta { text-align: left; }
.talk-cta .gw-btn { display: inline-block; width: auto; padding: 0.85rem 1.4rem; }

/* ── Deep-dive components ─────────────────────────────────── */

/* Reading guide callout under the hero */
.read-guide {
  background: white; border-left: 4px solid var(--gw-orange);
  padding: 0.75rem 1rem; margin: 1rem 0 0;
  font-size: 0.92rem; box-shadow: var(--ir-card-shadow);
}
.read-guide strong { color: var(--gw-black); }

/* Anatomy primer — one row per muscle */
.anatomy-grid { display: grid; gap: 0.5rem; margin: 0.75rem 0; }
.anatomy-grid .muscle {
  background: white; padding: 0.7rem 1rem;
  border-left: 4px solid #888; box-shadow: var(--ir-card-shadow);
}
.anatomy-grid .muscle.canonical {
  border-left-color: var(--gw-red); background: #fff5f3;
}
.anatomy-grid .muscle h4 { margin: 0 0 0.15rem; font-size: 1rem; }
.anatomy-grid .muscle .meta {
  font-size: 0.72rem; color: var(--gw-muted); text-transform: uppercase;
  letter-spacing: 0.06em; font-weight: 700; margin-bottom: 0.2rem;
}
.anatomy-grid .muscle p { margin: 0.2rem 0 0; font-size: 0.9rem; }

/* Two-column mechanism cards (Type 1 vs Type 2) */
.mechanism-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem;
  margin: 0.75rem 0;
}
@media (max-width: 640px) { .mechanism-grid { grid-template-columns: 1fr; } }
.mechanism-card {
  background: white; padding: 0.9rem 1rem;
  box-shadow: var(--ir-card-shadow); border-top: 4px solid var(--gw-red);
}
.mechanism-card.type2 { border-top-color: var(--gw-orange); }
.mechanism-card h4 { margin: 0 0 0.4rem; font-size: 1rem; }
.mechanism-card .tag {
  display: inline-block; font-size: 0.7rem; letter-spacing: 0.06em;
  text-transform: uppercase; font-weight: 700; color: var(--gw-muted);
  margin-bottom: 0.3rem;
}
.mechanism-card dl { margin: 0.4rem 0 0; font-size: 0.88rem; }
.mechanism-card dt {
  font-weight: 700; margin-top: 0.45rem; font-size: 0.78rem;
  text-transform: uppercase; letter-spacing: 0.04em; color: var(--gw-muted);
}
.mechanism-card dd { margin: 0.1rem 0 0; color: var(--gw-body); }

/* Research card — single-source summary box */
.research-card {
  background: white; padding: 0.85rem 1rem; margin: 0.5rem 0;
  border-left: 4px solid var(--gw-green); box-shadow: var(--ir-card-shadow);
}
.research-card h4 { margin: 0 0 0.25rem; font-size: 1rem; }
.research-card .cite {
  display: block; font-size: 0.78rem; color: var(--gw-muted);
  margin-top: 0.4rem; font-style: italic;
}
.research-card .cite a { color: var(--gw-muted); }

/* Fact box — black callout with single high-impact stat */
.fact-box {
  background: var(--gw-black); color: white;
  padding: 0.75rem 1rem; margin: 0.6rem 0;
  border-left: 6px solid var(--gw-red);
  font-size: 0.95rem;
}
.fact-box .big { font-size: 1.4rem; font-weight: 700; color: var(--gw-yellow); display: block; }

/* Protocol-detail card (testing protocols, exercise rationales) */
.protocol-detail {
  background: white; padding: 0.85rem 1rem; margin: 0.5rem 0;
  box-shadow: var(--ir-card-shadow); border-left: 4px solid var(--gw-black);
}
.protocol-detail h4 { margin: 0 0 0.35rem; }
.protocol-detail .meta-row {
  display: flex; gap: 1rem; flex-wrap: wrap; font-size: 0.82rem;
  color: var(--gw-muted); margin: 0.3rem 0 0.5rem;
  border-bottom: 1px dashed #ddd; padding-bottom: 0.4rem;
}
.protocol-detail .meta-row strong { color: var(--gw-black); }

/* Return-to-play stages — numbered cards */
.rtp-stages { list-style: none; padding: 0; margin: 0.5rem 0; counter-reset: stage; }
.rtp-stages li {
  counter-increment: stage;
  background: white; padding: 0.7rem 1rem 0.7rem 3.2rem;
  margin: 0.4rem 0; position: relative;
  box-shadow: var(--ir-card-shadow); border-left: 4px solid var(--gw-orange);
}
.rtp-stages li::before {
  content: counter(stage);
  position: absolute; left: 0.9rem; top: 50%; transform: translateY(-50%);
  background: var(--gw-orange); color: white;
  width: 1.7rem; height: 1.7rem; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.9rem;
}
.rtp-stages strong { display: block; margin-bottom: 0.1rem; }
.rtp-stages small { color: var(--gw-muted); display: block; margin-top: 0.15rem; }

/* MRI grading table */
.grade-table {
  width: 100%; border-collapse: collapse; margin: 0.5rem 0;
  background: white; box-shadow: var(--ir-card-shadow); font-size: 0.88rem;
}
.grade-table th, .grade-table td {
  padding: 0.55rem 0.7rem; text-align: left;
  border-bottom: 1px solid #eee;
}
.grade-table th {
  background: var(--gw-black); color: white;
  text-transform: uppercase; font-size: 0.74rem; letter-spacing: 0.04em;
}
.grade-table td:first-child { font-weight: 700; width: 3.5rem; }

/* Glossary */
.glossary {
  background: white; box-shadow: var(--ir-card-shadow); margin: 0.5rem 0;
}
.glossary dt {
  padding: 0.65rem 1rem 0.1rem; font-weight: 700; color: var(--gw-black);
  font-size: 0.95rem;
}
.glossary dd {
  padding: 0 1rem 0.65rem; margin: 0; color: var(--gw-body);
  border-bottom: 1px solid #eee; font-size: 0.9rem;
}
.glossary dd:last-child { border-bottom: 0; }

/* Inline citation chip — superscript reference */
.cite-ref {
  display: inline-block; vertical-align: super; font-size: 0.7em;
  background: var(--gw-paper); border: 1px solid #ddd;
  padding: 0 0.35rem; margin: 0 0.1rem; border-radius: 999px;
  color: var(--gw-body); text-decoration: none; font-weight: 700;
  line-height: 1.3;
}
.cite-ref:hover { background: var(--gw-yellow); border-color: #c79a00; }

/* Reference list (academic sources) */
.ref-list {
  background: white; padding: 0.85rem 1rem 0.85rem 2.4rem;
  margin: 0.5rem 0; box-shadow: var(--ir-card-shadow); font-size: 0.85rem;
}
.ref-list ol { padding: 0; margin: 0; }
.ref-list li { margin: 0.35rem 0; padding-left: 0.25rem; }
.ref-list a { color: var(--gw-body); text-decoration: underline; }
.ref-list a:hover { color: var(--gw-red); }

/* Print: kill chrome, expand depth */
@media print {
  .gw-spotlight, .tab-row, .gw-footer, .no-print { display: none !important; }
  body { background: white; }
  .insiders-main { max-width: 100%; }
  .gw-card[data-parallax] { transform: none !important; box-shadow: none; border: 1px solid #ddd; }
  details { box-shadow: none; }
  details[open] summary { display: none; } /* compact when printing */
}

/* Reduced motion: kill spotlight + parallax */
@media (prefers-reduced-motion: reduce) {
  .gw-spotlight { display: none; }
  .gw-card[data-parallax] { transform: none !important; transition: none; }
  .tab-row a { transition: none; }
}

/* Narrow screens */
@media (max-width: 540px) {
  .tab-row { grid-template-columns: 1fr; }
  .insiders-hero h1 { font-size: 1.7rem; }
  .hero-quote { font-size: 1.05rem; }
}
