/* ===========================================================================
   guides.css — shared styling for the public guide pages.

   Used by guides.html and every /guides article. Deliberately a separate file
   from the app's inline styles: these pages are long-form reading, so the type
   is larger and the measure wider than anything in index.html. Keeping it
   external means one edit restyles every article, and it is served from
   /static/ with the seven-day cache header.
   ========================================================================= */

:root {
  --bg: #0A0E1C;
  --card: #141B2E;
  --accent: #4C6FFF;
  --accent2: #8B5CF6;
  --btn-text: #ffffff;
  --text: #E8E6E1;
  --muted: #9CA3B5;
  --rule: rgba(255, 255, 255, 0.08);
  --font-display: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.68;
  -webkit-font-smoothing: antialiased;
}

/* A comfortable reading measure. Long-form wants roughly 65-75 characters a
   line, which is what 700px gets at this type size. */
.wrap { max-width: 700px; margin: 0 auto; padding: 0 22px; }

/* ---------- masthead ---------- */
.mast {
  border-bottom: 1px solid var(--rule);
  background: linear-gradient(180deg, rgba(79, 70, 196, 0.16) 0%, transparent 100%);
}
.mast-inner {
  max-width: 700px; margin: 0 auto; padding: 18px 22px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.mast a.brand {
  font-family: var(--font-display); font-weight: 700;
  font-size: 0.86rem; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--text); text-decoration: none;
}
.mast a.brand span { color: var(--accent); }
.mast nav { display: flex; gap: 16px; }
.mast nav a {
  font-size: 0.82rem; color: var(--muted); text-decoration: none; white-space: nowrap;
}
.mast nav a:hover { color: var(--text); }

/* ---------- article ---------- */
article { padding: 34px 0 10px; }

.crumb { font-size: 0.78rem; color: var(--muted); margin: 0 0 16px; }
.crumb a { color: var(--muted); text-decoration: none; }
.crumb a:hover { color: var(--text); text-decoration: underline; }

h1 {
  font-family: var(--font-display); font-weight: 700;
  font-size: 1.95rem; line-height: 1.2; letter-spacing: -0.02em;
  margin: 0 0 14px; color: #fff;
}
@media (max-width: 480px) { h1 { font-size: 1.62rem; } }

.standfirst {
  font-size: 1.04rem; line-height: 1.6; color: rgba(232, 230, 225, 0.82);
  margin: 0 0 8px;
}

.byline {
  font-size: 0.76rem; color: var(--muted);
  margin: 0 0 30px; padding-bottom: 20px; border-bottom: 1px solid var(--rule);
}

h2 {
  font-family: var(--font-display); font-weight: 700;
  font-size: 1.22rem; line-height: 1.3; letter-spacing: -0.01em;
  margin: 38px 0 12px; color: #fff;
}
h3 {
  font-family: var(--font-display); font-weight: 600;
  font-size: 1.02rem; margin: 26px 0 8px; color: #fff;
}

p { margin: 0 0 18px; }
a { color: var(--accent); }

ul, ol { margin: 0 0 18px; padding-left: 22px; }
li { margin-bottom: 9px; }

strong, b { color: #fff; font-weight: 600; }

/* ---------- key takeaway box ---------- */
.keypoint {
  background: var(--card);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--accent);
  border-radius: 12px;
  padding: 16px 18px;
  margin: 0 0 28px;
}
.keypoint p { margin: 0; font-size: 0.97rem; }
.keypoint .kp-label {
  display: block;
  font-family: var(--font-display); font-weight: 700;
  font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 6px;
}

/* ---------- data table ---------- */
.tbl-wrap { overflow-x: auto; margin: 0 0 22px; }
table {
  width: 100%; border-collapse: collapse; font-size: 0.9rem;
}
th, td { padding: 11px 10px; text-align: left; border-bottom: 1px solid var(--rule); }
th {
  color: var(--muted); font-weight: 600;
  font-size: 0.7rem; letter-spacing: 0.06em; text-transform: uppercase;
}
td:first-child { color: #fff; }

/* ---------- inline call to action ---------- */
.cta-box {
  background: linear-gradient(135deg, rgba(76, 111, 255, 0.14) 0%, var(--card) 70%);
  border: 1px solid rgba(139, 92, 246, 0.4);
  border-radius: 16px;
  padding: 22px;
  margin: 36px 0 10px;
  text-align: center;
}
.cta-box h2 { margin: 0 0 8px; font-size: 1.1rem; }
.cta-box p { font-size: 0.9rem; color: var(--muted); margin: 0 0 18px; }
.cta-btn {
  display: inline-block;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent2) 100%);
  color: var(--btn-text); text-decoration: none;
  border-radius: 12px; padding: 14px 26px;
  font-family: var(--font-display); font-weight: 700; font-size: 0.95rem;
  box-shadow: 0 12px 30px -14px rgba(124, 58, 237, 0.75);
}
.cta-note { font-size: 0.74rem; color: var(--muted); margin: 14px 0 0; }

/* ---------- related links ---------- */
.related { margin: 40px 0 0; padding-top: 26px; border-top: 1px solid var(--rule); }
.related h2 { margin-top: 0; font-size: 1.05rem; }
.related ul { list-style: none; padding: 0; margin: 0; }
.related li { margin: 0; border-bottom: 1px solid var(--rule); }
.related li a {
  display: block; padding: 13px 0; text-decoration: none;
  color: var(--text); font-size: 0.94rem;
}
.related li a:hover { color: var(--accent); }
.related li a span { display: block; font-size: 0.8rem; color: var(--muted); margin-top: 2px; }

/* ---------- guides index ---------- */
.index-grid { display: flex; flex-direction: column; gap: 14px; margin: 26px 0 0; }
.index-card {
  display: block; text-decoration: none; color: var(--text);
  background: var(--card); border: 1px solid var(--rule);
  border-radius: 14px; padding: 18px 20px;
}
.index-card:hover { border-color: rgba(139, 92, 246, 0.5); }
.index-card h2 {
  margin: 0 0 6px; font-size: 1.05rem; color: #fff;
}
.index-card p { margin: 0; font-size: 0.88rem; color: var(--muted); line-height: 1.55; }

/* ---------- footer ---------- */
.foot {
  margin-top: 48px; padding: 26px 0 40px;
  border-top: 1px solid var(--rule);
  font-size: 0.78rem; color: var(--muted);
}
.foot-links { display: flex; flex-wrap: wrap; gap: 16px; margin: 0 0 14px; }
.foot-links a { color: var(--muted); text-decoration: none; }
.foot-links a:hover { color: var(--text); }
.foot p { margin: 0; font-size: 0.74rem; line-height: 1.6; }

/* ---------- consent bar (injected by guides.js) ---------- */
.consent-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 9999;
  background: #101728; border-top: 1px solid var(--rule);
  padding: 14px 18px calc(14px + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -10px 30px -18px rgba(0, 0, 0, 0.9);
}
.consent-inner {
  max-width: 700px; margin: 0 auto;
  display: flex; flex-direction: column; gap: 12px;
}
.consent-text { margin: 0; font-size: 0.8rem; line-height: 1.5; color: var(--muted); }
.consent-text a { color: var(--accent); text-decoration: underline; }
.consent-actions { display: flex; gap: 10px; }
.consent-btn {
  border: 1px solid var(--accent); border-radius: 10px;
  padding: 10px 16px; cursor: pointer;
  font-family: var(--font-body); font-size: 0.82rem; font-weight: 600;
}
.consent-btn.accept { background: var(--accent); color: var(--btn-text); }
.consent-btn.reject { background: transparent; color: var(--accent); }
@media (min-width: 620px) {
  .consent-inner { flex-direction: row; align-items: center; gap: 18px; }
  .consent-actions { flex: 0 0 auto; }
  .consent-btn { min-width: 104px; }
}
[hidden] { display: none !important; }
