/* Shared styles for /strategies/<slug>.html — standalone, indexable, one URL
   per strategy. Builds on legal.css's reading-column shape with strategy-
   specific blocks (numerical example, related strategies, calculator CTA). */

:root {
  --text: #6e7178;
  --text-h: #0a0a0a;
  --bg: #ffffff;
  --surface: #ffffff;
  --border: #e5e7eb;
  --rule: #ececef;
  --code-bg: #f4f5f7;
  --accent: #5e6ad2;
  --accent-bg: rgba(94, 106, 210, 0.08);
  --accent-border: rgba(94, 106, 210, 0.35);
  --shadow-sm:
    rgba(15, 17, 22, 0.04) 0 1px 2px 0,
    rgba(15, 17, 22, 0.03) 0 1px 1px 0;
  --sans: 'Inter Variable', Inter, -apple-system, BlinkMacSystemFont,
          'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --mono: ui-monospace, 'SF Mono', 'JetBrains Mono', Menlo, Consolas,
          'Liberation Mono', monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --text: #8a8f98;
    --text-h: #f7f8f8;
    --bg: #08090a;
    --surface: #101113;
    --border: #23252a;
    --rule: #2a2c31;
    --code-bg: #16181c;
    --accent: #7b85e5;
    --accent-bg: rgba(123, 133, 229, 0.10);
    --accent-border: rgba(123, 133, 229, 0.4);
    --shadow-sm:
      rgba(0, 0, 0, 0.3) 0 1px 2px 0,
      rgba(0, 0, 0, 0.2) 0 1px 1px 0;
  }
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.65 var(--sans);
  letter-spacing: -0.005em;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.strategy {
  max-width: 760px;
  margin: 0 auto;
  padding: 48px 24px 80px;
}

.strategy-nav {
  font-size: 13px;
  margin-bottom: 32px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 12px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--rule);
}

.strategy-nav a {
  color: var(--accent);
  text-decoration: none;
}

.strategy-nav a:hover { text-decoration: underline; }

.strategy-eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin: 0 0 8px;
}

h1 {
  font-size: 30px;
  font-weight: 600;
  letter-spacing: -0.022em;
  color: var(--text-h);
  margin: 0 0 12px;
  line-height: 1.15;
}

.strategy-lede {
  font-size: 16px;
  color: var(--text);
  margin: 0 0 28px;
  line-height: 1.55;
}

.strategy-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 36px;
}

.strategy-meta span {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--accent-bg);
  color: var(--accent);
  letter-spacing: 0.04em;
}

h2 {
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.014em;
  color: var(--text-h);
  margin: 36px 0 12px;
}

p, ul, ol { margin: 0 0 14px; }
ul, ol { padding-left: 22px; }
li { margin-bottom: 6px; }

a { color: var(--accent); }

strong { color: var(--text-h); }

code {
  font-family: var(--mono);
  font-size: 13px;
  padding: 2px 5px;
  background: var(--code-bg);
  border-radius: 4px;
}

/* Numerical example block — gives the page a concrete worked example, both for
   reader comprehension and to anchor long-tail "<strategy> max loss" queries. */
.example {
  margin: 18px 0;
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.example-title {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 10px;
}

.example dl {
  display: grid;
  grid-template-columns: minmax(160px, max-content) 1fr;
  gap: 6px 16px;
  margin: 0;
  font-size: 14px;
}

.example dt {
  color: var(--text);
}

.example dd {
  margin: 0;
  font-family: var(--mono);
  color: var(--text-h);
}

/* CTA back to the calculator. Big, friendly, accent-colored. */
.calculator-cta {
  margin: 36px 0;
  padding: 18px 22px;
  background: var(--accent-bg);
  border: 1px solid var(--accent-border);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.calculator-cta-text {
  font-size: 14px;
  color: var(--text-h);
  flex: 1 1 320px;
}

.calculator-cta a {
  display: inline-flex;
  align-items: center;
  padding: 9px 18px;
  background: var(--accent);
  color: #ffffff !important;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s, box-shadow 0.15s;
}

.calculator-cta a:hover {
  background: #4f5bc4;
  box-shadow: var(--shadow-sm);
}

/* Related-strategies grid: internal-link signal for crawlers + helps readers
   discover adjacent concepts. */
.related-strategies {
  margin-top: 24px;
}

.related-strategies-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
}

.related-strategies-grid a {
  display: block;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
  text-decoration: none;
  color: var(--text-h);
  font-size: 13px;
  font-weight: 500;
  transition: border-color 0.15s, background 0.15s;
}

.related-strategies-grid a:hover {
  border-color: var(--accent-border);
  background: var(--accent-bg);
  color: var(--accent);
}

.disclaimer-note {
  margin-top: 40px;
  padding-top: 16px;
  border-top: 1px solid var(--rule);
  font-size: 12px;
  color: var(--text-h);
  line-height: 1.55;
}

.disclaimer-note a { color: var(--text-h); border-bottom: 1px solid var(--border); text-decoration: none; }

/* FAQ block — visible text mirrors the FAQPage JSON-LD so the page qualifies
   for Google FAQ rich snippets. <details>/<summary> for native expand/collapse
   without any JS. */
.faq {
  margin: 40px 0 24px;
}

.faq h2 {
  margin-bottom: 16px;
}

.faq-item {
  border-top: 1px solid var(--rule);
  padding: 14px 0;
}

.faq-item:last-of-type {
  border-bottom: 1px solid var(--rule);
}

.faq-item > summary {
  cursor: pointer;
  list-style: none;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-h);
  padding-right: 28px;
  position: relative;
  outline: none;
}

.faq-item > summary::-webkit-details-marker { display: none; }

.faq-item > summary::after {
  content: '+';
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 18px;
  font-weight: 400;
  color: var(--text);
  line-height: 1;
}

.faq-item[open] > summary::after {
  content: '−';
}

.faq-item > p {
  margin: 10px 0 4px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text);
}

.strategy-footer {
  margin-top: 60px;
  padding-top: 20px;
  border-top: 1px solid var(--rule);
  font-size: 12px;
  color: var(--text-h);
}
