/* Luna Guide — shared styles for SEO landing pages */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #FAFAFA; --surface: #FFFFFF; --text: #1A1A2E; --muted: #636366;
  --accent: #E8A0BF; --accent-dark: #D4789C; --border: #E5E5EA;
  --period: #E88AAB; --follicular: #C4B5E0; --fertile: #A8D8B9;
  --ovulation: #7EC8E3; --luteal: #F5D6A8;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1C1C1E; --surface: #2C2C2E; --text: #F2F2F7; --muted: #98989F;
    --accent: #F0B8D0; --accent-dark: #F5C8DA; --border: #48484A;
  }
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', Roboto, sans-serif;
  background: var(--bg); color: var(--text); line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

/* Layout */
.container { max-width: 720px; margin: 0 auto; padding: 0 24px; }

/* Header */
.site-header { padding: 20px 0; border-bottom: 1px solid var(--border); }
.site-header .container { display: flex; align-items: center; justify-content: space-between; }
.site-header .logo { font-size: 20px; font-weight: 700; text-decoration: none; color: var(--text); }
.site-header .logo span { color: var(--accent); }
.site-header .cta-sm { padding: 8px 20px; background: var(--accent); color: white; font-weight: 600; font-size: 14px; border-radius: 12px; text-decoration: none; }
.site-header .cta-sm:hover { background: var(--accent-dark); }

/* Breadcrumbs */
.breadcrumbs { padding: 16px 0 0; font-size: 13px; color: var(--muted); }
.breadcrumbs a { color: var(--accent); text-decoration: none; }
.breadcrumbs a:hover { text-decoration: underline; }

/* Hero */
.hero { padding: 48px 0 32px; text-align: center; }
.hero h1 { font-size: 32px; font-weight: 800; line-height: 1.2; max-width: 600px; margin: 0 auto; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero .subtitle { font-size: 17px; color: var(--muted); margin-top: 12px; max-width: 500px; margin-inline: auto; }
.hero .cta { display: inline-block; margin-top: 24px; padding: 14px 36px; background: var(--accent); color: white; font-weight: 700; font-size: 16px; border-radius: 16px; text-decoration: none; }
.hero .cta:hover { background: var(--accent-dark); }
.hero .cta-hint { font-size: 13px; color: var(--muted); margin-top: 8px; }

/* Content */
article { padding: 32px 0; }
article h2 { font-size: 24px; font-weight: 700; margin: 32px 0 16px; }
article h3 { font-size: 18px; font-weight: 600; margin: 24px 0 12px; color: var(--accent-dark); }
article p { margin-bottom: 16px; font-size: 16px; }
article ul, article ol { margin: 0 0 16px 24px; font-size: 16px; }
article li { margin-bottom: 8px; }
article strong { font-weight: 600; }
article blockquote { border-left: 3px solid var(--accent); padding: 12px 20px; margin: 20px 0; background: rgba(232,160,191,0.05); border-radius: 0 12px 12px 0; font-style: italic; color: var(--muted); }

/* Tip cards */
.tips-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 24px 0; }
@media (max-width: 500px) { .tips-grid { grid-template-columns: 1fr; } }
.tip-card { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 20px; }
.tip-card .icon { font-size: 28px; margin-bottom: 8px; }
.tip-card .title { font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.tip-card .desc { font-size: 13px; color: var(--muted); line-height: 1.5; }

/* Phase badge */
.phase-badge { display: inline-block; padding: 4px 14px; border-radius: 20px; font-size: 13px; font-weight: 600; color: white; }
.phase-badge.menstruation { background: var(--period); }
.phase-badge.follicular { background: var(--follicular); }
.phase-badge.fertile { background: var(--fertile); }
.phase-badge.ovulation { background: var(--ovulation); }
.phase-badge.luteal { background: var(--luteal); }

/* Related articles */
.related { padding: 32px 0; border-top: 1px solid var(--border); }
.related h2 { font-size: 20px; text-align: left; }
.related-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 16px; }
@media (max-width: 500px) { .related-grid { grid-template-columns: 1fr; } }
.related-card { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 20px; text-decoration: none; color: var(--text); transition: border-color 0.2s; }
.related-card:hover { border-color: var(--accent); }
.related-card .r-title { font-size: 15px; font-weight: 600; }
.related-card .r-desc { font-size: 13px; color: var(--muted); margin-top: 4px; }

/* Related articles (auto-interlinking, 15_add_related_links.py) */
.related-articles { padding: 32px 0; border-top: 1px solid var(--border); }
.related-articles h2 { font-size: 20px; text-align: left; }
.related-list { list-style: none; padding: 0; margin: 16px 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 500px) { .related-list { grid-template-columns: 1fr; } }
.related-list a { display: block; padding: 14px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; text-decoration: none; color: var(--text); font-size: 15px; font-weight: 600; transition: border-color 0.2s, background 0.2s; }
.related-list a::before { content: "\2192"; color: var(--accent); font-weight: 700; margin-right: 8px; }
.related-list a:hover { border-color: var(--accent); background: rgba(232,160,191,0.06); }

/* Comparison table (competitor pages, 17_create_compare_pages.py) */
.compare-wrap { overflow-x: auto; margin: 24px 0; }
.compare-table { width: 100%; border-collapse: collapse; font-size: 15px; min-width: 480px; }
.compare-table th, .compare-table td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: top; }
.compare-table thead th { font-size: 14px; font-weight: 700; border-bottom: 2px solid var(--border); }
.compare-table thead th.col-luna { color: var(--accent-dark); }
.compare-table tbody td:first-child { color: var(--muted); font-weight: 600; }
.compare-table td.cell-luna { background: rgba(232,160,191,0.06); font-weight: 600; }
.compare-table tr:last-child td { border-bottom: none; }
.when-better { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 20px 24px; margin: 24px 0; }
.when-better h2 { margin-top: 0; font-size: 19px; }

/* CTA section */
.cta-section { text-align: center; padding: 48px 0; margin: 32px 0; background: linear-gradient(135deg, rgba(232,160,191,0.1), rgba(182,127,208,0.1)); border-radius: 24px; }
.cta-section h2 { font-size: 24px; font-weight: 700; }
.cta-section p { color: var(--muted); margin-top: 8px; max-width: 400px; margin-inline: auto; }
.cta-section .cta { display: inline-block; margin-top: 20px; padding: 14px 36px; background: var(--accent); color: white; font-weight: 700; font-size: 16px; border-radius: 16px; text-decoration: none; }
.cta-section .cta:hover { background: var(--accent-dark); }

/* Footer */
.site-footer { padding: 32px 0; border-top: 1px solid var(--border); text-align: center; font-size: 13px; color: var(--muted); }
.site-footer a { color: var(--accent); text-decoration: none; }
.site-footer .disclaimer { margin-top: 12px; font-size: 12px; }

/* Hub page */
.hub-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; margin: 32px 0; }
@media (max-width: 600px) { .hub-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 400px) { .hub-grid { grid-template-columns: 1fr; } }
.hub-card { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 24px 20px; text-decoration: none; color: var(--text); text-align: center; transition: border-color 0.2s, transform 0.2s; }
.hub-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.hub-card .h-icon { font-size: 36px; margin-bottom: 12px; }
.hub-card .h-title { font-size: 15px; font-weight: 600; }
.hub-card .h-desc { font-size: 12px; color: var(--muted); margin-top: 4px; }

/* Table of contents */
.toc { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 20px 24px; margin: 24px 0; }
.toc h3 { font-size: 15px; font-weight: 600; margin-bottom: 8px; color: var(--text); }
.toc ol { margin-left: 20px; }
.toc li { margin-bottom: 4px; font-size: 14px; }
.toc a { color: var(--accent); text-decoration: none; }
.toc a:hover { text-decoration: underline; }

/* ============================================================
 * Enrichment blocks (TL;DR, FAQ, glossary, red flags, segments,
 * reviewer card, references). Added 2026-05 with Metrika launch.
 * ============================================================ */
.article-meta { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; font-size: 13px; color: var(--muted); margin: 8px 0 24px; }
.article-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--muted); display: inline-block; }
.article-meta .badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 12px; background: rgba(232,160,191,0.12); color: var(--accent-dark); font-weight: 500; }

.tldr { background: linear-gradient(135deg, rgba(232,160,191,0.10), rgba(168,216,185,0.08)); border: 1px solid var(--border); border-radius: 16px; padding: 20px 24px; margin: 24px 0 32px; }
.tldr h2 { font-size: 16px; font-weight: 700; margin: 0 0 12px; color: var(--accent-dark); text-transform: uppercase; letter-spacing: 0.05em; }
.tldr ul { margin: 0 0 0 20px; padding: 0; list-style: none; }
.tldr li { font-size: 15px; line-height: 1.55; margin-bottom: 8px; padding-left: 24px; position: relative; }
.tldr li::before { content: "✓"; position: absolute; left: 0; top: 0; color: var(--accent); font-weight: 700; }

.faq { margin: 32px 0; }
.faq h2 { font-size: 22px; font-weight: 700; margin-bottom: 16px; }
.faq-item { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; margin-bottom: 8px; overflow: hidden; }
.faq-item .faq-q { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; cursor: pointer; font-weight: 600; font-size: 15px; user-select: none; }
.faq-item .faq-q::after { content: "+"; font-size: 20px; color: var(--accent); transition: transform 0.2s; }
.faq-item.open .faq-q::after { content: "−"; }
.faq-item .faq-a { padding: 0 18px 16px; font-size: 15px; line-height: 1.65; color: var(--text); display: none; }
.faq-item.open .faq-a { display: block; }
.faq-item .faq-a p { margin-bottom: 8px; }

.glossary { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 20px 24px; margin: 32px 0; }
.glossary h2 { font-size: 18px; font-weight: 700; margin-bottom: 12px; }
.glossary dl { margin: 0; }
.glossary dt { font-weight: 600; font-size: 14px; color: var(--accent-dark); margin-top: 12px; }
.glossary dt:first-child { margin-top: 0; }
.glossary dd { margin: 4px 0 0; font-size: 14px; line-height: 1.6; color: var(--muted); }
.glossary-term { border-bottom: 1px dotted var(--accent); cursor: help; }

.red-flags { background: rgba(255, 100, 100, 0.06); border: 1px solid rgba(232, 138, 171, 0.4); border-left: 4px solid #E0506E; border-radius: 12px; padding: 18px 22px; margin: 32px 0; }
.red-flags h2 { font-size: 18px; font-weight: 700; margin: 0 0 10px; color: #C0364E; }
@media (prefers-color-scheme: dark) { .red-flags h2 { color: #FF8FA3; } }
.red-flags ul { margin: 0 0 0 20px; }
.red-flags li { font-size: 15px; line-height: 1.55; margin-bottom: 6px; }

.segment-block { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 22px 24px; margin: 24px 0; }
.segment-block .segment-tag { display: inline-block; padding: 3px 10px; border-radius: 10px; background: var(--accent); color: white; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 8px; }
.segment-block h3 { font-size: 17px; font-weight: 700; margin: 0 0 8px; color: var(--text); }
.segment-block p { font-size: 15px; line-height: 1.65; margin-bottom: 8px; }
.segment-block ul { margin: 8px 0 0 20px; }
.segment-block li { font-size: 14.5px; margin-bottom: 4px; }
.segment-block[data-segment="teens"] .segment-tag { background: #C4B5E0; }
.segment-block[data-segment="ttc"] .segment-tag { background: #A8D8B9; color: #1A1A2E; }
.segment-block[data-segment="postpartum"] .segment-tag { background: #F5D6A8; color: #1A1A2E; }
.segment-block[data-segment="perimenopause"] .segment-tag { background: #B898D2; }
.segment-block[data-segment="athlete"] .segment-tag { background: #7EC8E3; }
.segment-block[data-segment="working"] .segment-tag { background: #E8A0BF; }
.segment-block[data-segment="pcos"] .segment-tag { background: #D4789C; }
.segment-block[data-segment="endo"] .segment-tag { background: #E0506E; }
.segment-block[data-segment="partner"] .segment-tag { background: #F0B8D0; color: #1A1A2E; }

.reviewer-card { display: flex; align-items: center; gap: 14px; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 16px 20px; margin: 32px 0 16px; }
.reviewer-card .r-avatar { width: 46px; height: 46px; border-radius: 50%; background: linear-gradient(135deg, var(--accent), var(--accent-dark)); display: flex; align-items: center; justify-content: center; font-size: 22px; flex-shrink: 0; }
.reviewer-card .r-info { flex: 1; }
.reviewer-card .r-info .r-name { font-size: 14px; font-weight: 600; }
.reviewer-card .r-info .r-meta { font-size: 12px; color: var(--muted); margin-top: 2px; }

.references { padding: 24px 0; border-top: 1px solid var(--border); margin-top: 24px; }
.references h2 { font-size: 16px; font-weight: 700; margin-bottom: 10px; }
.references ol { margin-left: 20px; padding: 0; }
.references li { font-size: 13px; line-height: 1.55; margin-bottom: 6px; color: var(--muted); }
.references a { color: var(--accent); text-decoration: none; }
.references a:hover { text-decoration: underline; }

/* Hub original-content blocks (added 2026-05 to fix Yandex MPK signal) */
.hub-intro { margin: 40px 0 24px; }
.hub-intro h2 { font-size: 22px; font-weight: 700; margin-bottom: 12px; }
.hub-intro p { font-size: 16px; line-height: 1.7; margin-bottom: 14px; color: var(--text); }
.hub-featured { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 24px; margin: 32px 0; }
.hub-featured h2 { font-size: 18px; font-weight: 700; margin-bottom: 16px; }
.featured-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
.featured-tip { display: flex; gap: 12px; align-items: flex-start; }
.featured-tip .ft-icon { font-size: 24px; line-height: 1; flex-shrink: 0; }
.featured-tip .ft-body strong { display: block; font-size: 14px; font-weight: 600; margin-bottom: 2px; }
.featured-tip .ft-body p { font-size: 13.5px; color: var(--muted); margin: 0; line-height: 1.5; }
.hub-community { background: linear-gradient(135deg, rgba(232,160,191,0.10), rgba(126,200,227,0.08)); border: 1px solid var(--border); border-radius: 16px; padding: 18px 24px; margin: 24px 0; text-align: center; }
.hub-community p { font-size: 15px; color: var(--text); margin: 0; }
.hub-community strong { color: var(--accent-dark); font-weight: 700; }

/* ============================================================
 * Editorial partner block (RU relationships cluster, script 19).
 * Uses the violet --follicular tone rather than Luna's pink CTA so a
 * third-party recommendation can never be mistaken for a Luna product
 * button. Restrained on purpose: the audience is often in acute distress.
 * ============================================================ */
.expert-note { background: var(--surface); border: 1px solid var(--border); border-left: 4px solid #B67FD0; border-radius: 14px; padding: 22px 24px; margin: 32px 0; }
.expert-note .e-tag { display: inline-block; padding: 3px 10px; border-radius: 10px; background: rgba(182,127,208,0.16); color: #8A5BA8; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 10px; }
@media (prefers-color-scheme: dark) { .expert-note .e-tag { color: #D6B0EA; background: rgba(182,127,208,0.24); } }
.expert-note h2 { font-size: 18px; font-weight: 700; margin: 0 0 6px; }
.expert-note .e-who { font-size: 13.5px; color: var(--muted); margin: 0 0 12px; }
.expert-note p { font-size: 15px; line-height: 1.65; margin-bottom: 12px; }
.expert-note .e-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 16px; }
.expert-note .expert-cta { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 12px 26px; background: #B67FD0; color: #FFFFFF; font-weight: 700; font-size: 15px; border-radius: 14px; text-decoration: none; transition: background 0.2s; }
.expert-note .expert-cta:hover { background: #9E63BA; }
.expert-note .expert-cta:focus-visible { outline: 3px solid #8A5BA8; outline-offset: 2px; }
.expert-note .e-site { display: inline-flex; align-items: center; min-height: 44px; font-size: 14px; color: #8A5BA8; text-decoration: none; border-bottom: 1px solid transparent; }
.expert-note .e-site:hover { border-bottom-color: #8A5BA8; }
@media (prefers-color-scheme: dark) { .expert-note .e-site { color: #D6B0EA; } .expert-note .e-site:hover { border-bottom-color: #D6B0EA; } }
.expert-note .expert-disclaimer { font-size: 12px; color: var(--muted); margin: 14px 0 0; line-height: 1.5; }
