/* mezcal-night — shared stylesheet for strategy guide pages */
:root {
  --bg: #0B0F14;
  --fg: #E9E3D7;
  --accent: #5FA8D3;
  --accent2: #D07A4B;
  --muted: #0F1620;
  --muted-text: #A79F92;
  --border: rgba(233,227,215,0.16);
  --danger: #B0302F;
  --highlight: #EB8F2C;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: #8CC7E8; text-decoration: underline; }

.skip-link {
  position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden;
}
.skip-link:focus {
  position: static; width: auto; height: auto; overflow: visible;
  padding: 8px 16px; background: var(--accent); color: var(--bg); font-weight: 600;
}

/* Site header */
.site-header { border-bottom: 1px solid var(--border); }
.site-header-inner {
  max-width: 860px; margin: 0 auto; padding: 14px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.brand { font-size: 1.1rem; font-weight: 700; color: var(--fg); letter-spacing: -0.01em; text-decoration: none; }
.brand:hover { color: var(--accent); text-decoration: none; }
.site-nav a { font-size: 0.85rem; color: var(--muted-text); margin-left: 1rem; }
.site-nav a:hover { color: var(--fg); text-decoration: none; }

/* Main */
main { flex: 1; max-width: 860px; margin: 0 auto; padding: 2rem 24px 4rem; width: 100%; }
article { max-width: 720px; }

/* Breadcrumb */
.breadcrumb { font-size: 0.82rem; color: var(--muted-text); margin-bottom: 1.5rem; }
.breadcrumb a { color: var(--muted-text); }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb [aria-current="page"] { color: var(--fg); }

/* Article header */
h1 {
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; margin-bottom: 0.75rem;
}
.byline {
  font-size: 0.82rem; color: var(--muted-text);
  margin-bottom: 2rem; padding-bottom: 1rem; border-bottom: 1px solid var(--border);
}

/* Body text */
h2 { font-size: 1.25rem; font-weight: 600; color: var(--fg); margin: 2.25rem 0 0.75rem; }
h3 { font-size: 1rem; font-weight: 600; color: var(--accent); margin: 1.5rem 0 0.5rem; }
p { margin-bottom: 1rem; }
p.lede { font-size: 1.02rem; margin-bottom: 1.5rem; }
ul, ol { padding-left: 1.5rem; margin-bottom: 1rem; }
li { margin-bottom: 0.35rem; }
strong { font-weight: 600; }

/* Tables */
table { width: 100%; border-collapse: collapse; margin: 0.75rem 0 1.5rem; font-size: 0.9rem; }
th {
  background: var(--muted); color: var(--fg); padding: 0.55rem 0.85rem;
  text-align: left; font-weight: 600; border-bottom: 1px solid var(--border);
}
td { padding: 0.55rem 0.85rem; border-bottom: 1px solid var(--border); vertical-align: top; }
tr:last-child td { border-bottom: none; }
tr:nth-child(even) td { background: rgba(15,22,32,0.6); }

/* Formula box */
.formula {
  background: var(--muted); border-left: 3px solid var(--accent);
  border-radius: 0 6px 6px 0; padding: 0.85rem 1.1rem;
  margin: 0.75rem 0 1.25rem; font-size: 0.92rem; color: var(--accent); font-weight: 600;
}

/* Callout */
.callout {
  background: var(--muted); border-left: 3px solid var(--highlight);
  border-radius: 0 6px 6px 0; padding: 0.85rem 1.1rem;
  margin: 0.75rem 0 1.25rem; font-size: 0.88rem; color: var(--muted-text);
}
.callout strong { color: var(--fg); }

/* FAQ */
.faq { border-top: 1px solid var(--border); padding-top: 2rem; margin-top: 2.5rem; }
.faq h2 { margin-top: 0; }
.faq-item { margin-bottom: 1.5rem; border-bottom: 1px solid var(--border); padding-bottom: 1.5rem; }
.faq-item:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
dt { font-weight: 600; color: var(--fg); margin-bottom: 0.4rem; }
dd { color: var(--muted-text); line-height: 1.65; margin-left: 0; }

/* Sources */
.source-list { list-style: none; padding: 0; margin: 0.75rem 0 1.5rem; font-size: 0.87rem; }
.source-list li {
  padding: 0.5rem 0 0.5rem 1rem; border-bottom: 1px solid var(--border);
  position: relative; color: var(--muted-text);
}
.source-list li::before { content: "›"; position: absolute; left: 0; color: var(--accent); font-weight: 700; }
.source-list li:last-child { border-bottom: none; }

/* CTA box */
.cta-box {
  background: var(--muted); border: 1px solid var(--border);
  border-radius: 10px; padding: 1.25rem 1.5rem; margin: 2rem 0; text-align: center;
}
.cta-box p { margin-bottom: 0.6rem; font-size: 0.9rem; color: var(--muted-text); }
.cta-box a {
  display: inline-block; background: var(--accent); color: var(--bg);
  font-weight: 600; font-size: 0.9rem; padding: 8px 20px;
  border-radius: 6px; text-decoration: none; margin-top: 4px;
}
.cta-box a:hover { background: #8CC7E8; color: var(--bg); text-decoration: none; }

/* More guides list */
.guides-list { list-style: none; padding: 0; margin: 0.5rem 0 1rem; }
.guides-list li {
  padding: 0.5rem 0; border-bottom: 1px solid var(--border);
  font-size: 0.9rem; color: var(--muted-text);
}
.guides-list li:last-child { border-bottom: none; }
.guides-list a { font-weight: 600; }

/* Disclaimer */
.disclaimer {
  background: var(--muted); border-left: 3px solid var(--muted-text);
  padding: 0.9rem 1.15rem; margin: 2rem auto;
  max-width: 860px; border-radius: 0 0.4rem 0.4rem 0;
  font-size: 0.82rem; color: var(--muted-text); line-height: 1.55;
  width: calc(100% - 48px);
}
.disclaimer strong { color: var(--fg); }

/* Footer */
footer {
  border-top: 1px solid var(--border); padding: 24px;
  text-align: center; color: var(--muted-text); font-size: 0.85rem;
  max-width: 860px; margin: 0 auto; width: 100%;
}
footer .cross-links { margin-bottom: 10px; }
footer .cross-links a { color: var(--accent); margin: 0 4px; }
footer p { color: var(--muted-text); margin: 4px 0; }

@media (max-width: 600px) {
  .site-header-inner { padding: 12px 16px; }
  main { padding: 1.5rem 16px 3rem; }
  .disclaimer { width: calc(100% - 32px); margin: 1.5rem auto; }
}

/* ── Calculator tool (options-profit-calculator page) ── */
input[type="number"], select {
  background: var(--muted);
  color: var(--fg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.5rem 0.75rem;
  font-size: 0.9rem;
  width: 100%;
  font-family: inherit;
}
input[type="number"]:focus, select:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}
.calc-section {
  background: var(--muted);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.5rem;
  margin-bottom: 2rem;
}
.calc-section h2 { margin-top: 0; }
.calc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.calc-field { display: flex; flex-direction: column; gap: 0.35rem; }
.calc-field label { font-size: 0.8rem; color: var(--muted-text); font-weight: 500; }
.calc-results {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin: 1rem 0 1.5rem;
}
.calc-result-item {
  background: #0B0F14;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.85rem 1rem;
  text-align: center;
}
.calc-label { display: block; font-size: 0.72rem; color: var(--muted-text); margin-bottom: 0.35rem; text-transform: uppercase; letter-spacing: 0.05em; }
.calc-value { display: block; font-size: 1.2rem; font-weight: 700; color: var(--accent); font-variant-numeric: tabular-nums; }
.calc-range-row {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}
.calc-range-field {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.calc-range-field label { font-size: 0.85rem; color: var(--muted-text); white-space: nowrap; }
.calc-range-field input { width: 100px; }
tr.profit td { color: #6bba6b; }
tr.loss td { color: #e05c5c; }
tr.breakeven-row td { color: var(--fg); font-weight: 600; }
.noscript-notice {
  background: var(--muted);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.75rem 1rem;
  font-size: 0.85rem;
  color: var(--muted-text);
  margin: 0.75rem 0;
}
@media (max-width: 600px) {
  .calc-results { grid-template-columns: 1fr 1fr; }
  .calc-grid { grid-template-columns: 1fr 1fr; }
}
