/* ReefDeck Guides — shared editorial stylesheet.
   Brand tokens mirror the app/landing; typography is tuned for long-form reading. */
:root {
  --ocean-deep: #050b14;
  --ocean-mid: #0a1828;
  --brand: #1fb8cc;
  --brand-bright: #46d6e6;
  --brand-grad: linear-gradient(135deg, #25c9d6 0%, #2a86e0 100%);
  --brand-glow: rgba(54,198,224,0.35);
  --coral: #ff6f5e;
  --accent-green: #2dd4a7;
  --accent-yellow: #f6b945;
  --text-primary: #eaf2fa;
  --text-body: #cdd9e6;
  --text-muted: #8ea3b9;
  --card-bg: rgba(17, 34, 56, 0.55);
  --border: rgba(150,184,214,0.14);
  --border-strong: rgba(150,184,214,0.24);
  --radius: 14px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, system-ui, sans-serif;
  --serif: 'Fraunces', Georgia, 'Times New Roman', serif;
  --measure: 720px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  color: var(--text-body);
  background:
    radial-gradient(1100px 520px at 50% -8%, rgba(31,184,204,0.12), transparent 62%),
    linear-gradient(180deg, var(--ocean-mid) 0%, var(--ocean-deep) 100%);
  background-attachment: fixed;
  line-height: 1.7;
  font-size: 18px;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand-bright); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---- Top bar ---- */
.site-bar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 22px;
  background: rgba(5,11,20,0.72); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.site-bar .brand { display: flex; align-items: center; gap: 10px; font-weight: 800; color: var(--text-primary); font-size: 1.05rem; }
.site-bar .brand img { width: 28px; height: 28px; border-radius: 7px; }
.site-bar .bar-cta {
  background: var(--brand-grad); color: #07101e; font-weight: 700; font-size: 0.86rem;
  padding: 9px 16px; border-radius: 9px;
}
.site-bar .bar-cta:hover { text-decoration: none; }

/* ---- Layout ---- */
.wrap { max-width: var(--measure); margin: 0 auto; padding: 0 22px; }
article { padding: 30px 0 60px; }

.crumbs { font-size: 0.82rem; color: var(--text-muted); margin: 18px 0 22px; }
.crumbs a { color: var(--text-muted); }
.crumbs a:hover { color: var(--brand-bright); }

.eyebrow { text-transform: uppercase; letter-spacing: 2px; font-size: 0.72rem; font-weight: 700; color: var(--brand-bright); margin-bottom: 14px; }
h1 {
  font-family: var(--serif);
  font-weight: 600; font-size: clamp(2rem, 5vw, 2.85rem); line-height: 1.12;
  color: var(--text-primary); letter-spacing: -0.5px; margin-bottom: 18px;
}
.byline { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; font-size: 0.85rem; color: var(--text-muted); margin-bottom: 26px; }
.byline .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--text-muted); opacity: 0.6; }

figure.hero { margin: 0 0 30px; }
figure.hero img { width: 100%; height: auto; border-radius: var(--radius); border: 1px solid var(--border); display: block; }
figure.hero figcaption { font-size: 0.8rem; color: var(--text-muted); margin-top: 9px; text-align: center; }

/* ---- Quick answer (AI-quotable TL;DR) ---- */
.quick-answer {
  background: linear-gradient(135deg, rgba(31,184,204,0.10), rgba(42,134,224,0.06));
  border: 1px solid var(--border-strong); border-left: 3px solid var(--brand-bright);
  border-radius: 12px; padding: 20px 22px; margin: 0 0 34px;
}
.quick-answer .qa-label { display: flex; align-items: center; gap: 8px; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 1.4px; font-weight: 700; color: var(--brand-bright); margin-bottom: 10px; }
.quick-answer p { color: var(--text-primary); font-size: 1.02rem; margin: 0; }

/* ---- Body type ---- */
article h2 { font-family: var(--serif); font-weight: 600; font-size: 1.6rem; color: var(--text-primary); margin: 44px 0 14px; letter-spacing: -0.3px; }
article h3 { font-size: 1.18rem; font-weight: 700; color: var(--text-primary); margin: 30px 0 10px; }
article p { margin: 0 0 18px; }
article ul, article ol { margin: 0 0 20px; padding-left: 24px; }
article li { margin-bottom: 8px; }
article strong { color: var(--text-primary); font-weight: 600; }
article em { color: var(--text-primary); }

/* ---- Reference table ---- */
.table-scroll { overflow-x: auto; margin: 0 0 26px; border-radius: 12px; border: 1px solid var(--border); }
table.params { width: 100%; border-collapse: collapse; font-size: 0.92rem; min-width: 460px; }
table.params th, table.params td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--border); }
table.params thead th { background: rgba(7,16,30,0.6); color: var(--brand-bright); font-weight: 700; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.6px; }
table.params tbody tr:last-child td { border-bottom: none; }
table.params tbody tr:nth-child(even) { background: rgba(255,255,255,0.015); }
table.params td:first-child { color: var(--text-primary); font-weight: 600; }

/* ---- Callout ---- */
.note { background: var(--card-bg); border: 1px solid var(--border); border-radius: 12px; padding: 16px 20px; margin: 0 0 26px; font-size: 0.95rem; }
.note .note-h { font-weight: 700; color: var(--text-primary); margin-bottom: 4px; }

/* ---- CTA ---- */
.cta-box {
  background: linear-gradient(135deg, rgba(37,201,214,0.12), rgba(10,22,40,0.5));
  border: 1px solid var(--border-strong); border-radius: var(--radius);
  padding: 26px 24px; margin: 40px 0; text-align: center;
}
.cta-box h3 { font-family: var(--serif); font-weight: 600; font-size: 1.4rem; color: var(--text-primary); margin-bottom: 8px; }
.cta-box p { color: var(--text-muted); font-size: 0.95rem; margin-bottom: 18px; }
.cta-box .cta-btn { display: inline-flex; align-items: center; gap: 8px; background: var(--brand-grad); color: #07101e; font-weight: 800; padding: 13px 26px; border-radius: 11px; box-shadow: 0 10px 26px var(--brand-glow); }
.cta-box .cta-btn:hover { text-decoration: none; }
.cta-box .cta-sub { display: block; margin-top: 10px; font-size: 0.78rem; color: var(--text-muted); }

/* ---- FAQ ---- */
.faq { margin: 40px 0 0; }
.faq h2 { margin-bottom: 18px; }
.faq details { border: 1px solid var(--border); border-radius: 12px; padding: 4px 18px; margin-bottom: 12px; background: var(--card-bg); }
.faq summary { cursor: pointer; font-weight: 600; color: var(--text-primary); padding: 14px 0; list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; position: absolute; right: 0; top: 12px; font-size: 1.3rem; color: var(--brand-bright); }
.faq details[open] summary::after { content: '\2212'; }
.faq details p { padding: 0 0 16px; margin: 0; font-size: 0.96rem; }

/* ---- Related ---- */
.related { margin: 50px 0 0; border-top: 1px solid var(--border); padding-top: 28px; }
.related h2 { font-size: 1.15rem; color: var(--text-primary); margin-bottom: 16px; }
.related-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.related-grid a { display: block; padding: 14px 16px; border: 1px solid var(--border); border-radius: 11px; background: var(--card-bg); color: var(--text-primary); font-weight: 600; font-size: 0.92rem; }
.related-grid a:hover { border-color: var(--brand-bright); text-decoration: none; }

/* ---- Footer ---- */
.site-foot { border-top: 1px solid var(--border); padding: 30px 22px 50px; text-align: center; color: var(--text-muted); font-size: 0.84rem; }
.site-foot a { color: var(--text-muted); }
.site-foot .foot-links { margin-bottom: 10px; display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; }
.disclaimer { max-width: var(--measure); margin: 0 auto; font-size: 0.76rem; color: var(--text-muted); opacity: 0.8; line-height: 1.6; }

@media (max-width: 560px) {
  body { font-size: 17px; }
  .related-grid { grid-template-columns: 1fr; }
  .site-bar { padding: 12px 16px; }
}
