/* Site layer for generated pages: tool-page hero, editorial widgets, related cards, spec tables, landing prose.
   Loaded after style.css / editorial.css. Theme-aware via the site's CSS variables — no hard-coded colours, so it
   renders on both the light (freewebtoapp) and dark (freewebsitetoapk) themes. */

main { display: block; }

/* ---- tool pages ---- */
.tool-page-hero { padding: 110px 0 24px; text-align: center; }
.tool-page-hero h1 { font-family: var(--font-display); font-size: clamp(28px, 4vw, 42px); font-weight: 800; color: var(--text-primary); margin: 8px auto 14px; max-width: 900px; line-height: 1.15; }
.tool-page-kicker { color: var(--primary); font-weight: 600; font-size: 13px; letter-spacing: .04em; text-transform: uppercase; margin: 0; }
.tool-page-intro { color: var(--text-secondary); font-size: 1.1rem; max-width: 760px; margin: 0 auto; line-height: 1.6; }
.tool-page .tool-section { padding: 10px 0 30px; }
.tool-editorial { margin-top: 30px; }

/* ---- editorial widgets ---- */
.article-content table.spec, .prose-section table.spec { width: 100%; border-collapse: collapse; margin: 24px 0; font-size: .97rem; }
table.spec th, table.spec td { border: 1px solid var(--border-color); padding: 10px 12px; text-align: left; vertical-align: top; color: var(--text-secondary); }
table.spec th { background: var(--bg-input); color: var(--text-primary); font-weight: 700; }
table.spec td strong { color: var(--text-primary); }
table.spec a { color: var(--primary); }
table.spec code { font-size: .9em; }
.table-scroll { overflow-x: auto; }
.article-content pre { background: #0F172A; color: #E2E8F0; padding: 18px 20px; border-radius: 12px; overflow-x: auto; font-size: .9rem; line-height: 1.55; position: relative; }
.article-content code, .prose-section code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: var(--bg-input); padding: 2px 6px; border-radius: 6px; color: var(--text-primary); font-size: .92em; }
.article-content pre code { background: transparent; padding: 0; color: inherit; }
.code-wrap { position: relative; }
.copy-btn { position: absolute; top: 10px; right: 10px; background: #1E293B; color: #E2E8F0; border: 1px solid #334155; border-radius: 8px; padding: 4px 10px; font-size: 12px; cursor: pointer; z-index: 1; }
.copy-btn:hover { background: #334155; }
.article-content .note { background: var(--bg-input); border-left: 4px solid var(--primary); padding: 18px 22px; border-radius: 8px; margin: 26px 0; }
.article-content .warn { background: color-mix(in srgb, var(--warning) 10%, transparent); border-left: 4px solid var(--warning); padding: 18px 22px; border-radius: 8px; margin: 26px 0; }
.article-content .note p:last-child, .article-content .warn p:last-child { margin-bottom: 0; }
.checklist { list-style: none; padding-left: 0 !important; }
.checklist li { padding-left: 30px; position: relative; }
.checklist li::before { content: '✓'; position: absolute; left: 0; top: 0; color: var(--success); font-weight: 800; }
.article-content h2 { scroll-margin-top: 90px; }
.article-content .toc { background: var(--bg-input); border: 1px solid var(--border-color); border-radius: 12px; padding: 18px 24px; margin: 0 0 30px; }
.article-content .toc p { margin: 0 0 8px; font-weight: 700; color: var(--text-primary); }
.article-content .toc ol { margin: 0; padding-left: 20px; }
.article-content .toc li { margin-bottom: 6px; }
.article-content .toc a { color: var(--primary); text-decoration: none; }
.article-content .cta-inline { display: inline-block; background: var(--primary); color: #fff !important; padding: 12px 22px; border-radius: 10px; font-weight: 600; text-decoration: none; margin-top: 6px; }
.article-content figure { margin: 26px 0; }
.article-content figcaption { color: var(--text-muted); font-size: .9rem; margin-top: 8px; text-align: center; }
.article-content .two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
@media (max-width: 720px) { .article-content .two-col { grid-template-columns: 1fr; } }

/* ---- related cards ---- */
.related-section { background: var(--bg-input); padding: 70px 0; }
.related-section h2 { text-align: center; font-family: var(--font-display); font-size: 2rem; margin-bottom: 40px; color: var(--text-primary); }
.related-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; max-width: 1100px; margin: 0 auto; }
.related-card { text-decoration: none; background: var(--bg-card); border: 1px solid var(--border-color); padding: 26px; border-radius: 16px; transition: transform .2s ease, box-shadow .2s ease; display: block; }
.related-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.related-card h3 { color: var(--text-primary); margin: 6px 0 8px; font-size: 1.15rem; line-height: 1.35; }
.related-card p { color: var(--text-secondary); line-height: 1.55; margin: 0; font-size: .95rem; }
.related-kicker { color: var(--primary); font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }

/* ---- landing-page prose blocks ---- */
.prose-section { padding: 70px 0; }
.prose-section .container { max-width: 900px; }
.prose-section h2 { font-family: var(--font-display); font-size: 2rem; color: var(--text-primary); margin: 0 0 18px; line-height: 1.2; }
.prose-section h3 { font-size: 1.3rem; color: var(--text-primary); margin: 28px 0 10px; }
.prose-section p, .prose-section li { color: var(--text-secondary); line-height: 1.75; font-size: 1.05rem; }
.prose-section p strong, .prose-section li strong { color: var(--text-primary); }
.prose-section a { color: var(--primary); }
.prose-section ul, .prose-section ol { padding-left: 26px; }
.prose-section li { margin-bottom: 8px; }
.prose-section.alt { background: var(--bg-input); }
.page-hero-simple { padding: 120px 0 40px; text-align: center; }
.page-hero-simple h1 { font-family: var(--font-display); font-size: clamp(30px, 4.5vw, 48px); color: var(--text-primary); margin: 10px 0 14px; line-height: 1.12; }
.page-hero-simple p.lead { color: var(--text-secondary); font-size: 1.15rem; max-width: 760px; margin: 0 auto; line-height: 1.6; }
.page-kicker { color: var(--primary); font-weight: 700; font-size: 13px; letter-spacing: .05em; text-transform: uppercase; }

/* ---- guide index extras ---- */
.guide-filters { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 26px; }
.guide-filters span { background: color-mix(in srgb, var(--primary) 14%, transparent); color: var(--primary); padding: 6px 14px; border-radius: 20px; font-size: 13px; font-weight: 600; }

/* ---- hero for landing pages: real information, no fake stats ---- */
.hero-simple { padding: 120px 0 60px; background: var(--gradient-hero); }
.hero-simple .container { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.hero-simple h1 { font-family: var(--font-display); font-size: clamp(32px, 4.6vw, 52px); line-height: 1.1; color: var(--text-primary); margin: 12px 0 18px; }
.hero-simple p.lead { color: var(--text-secondary); font-size: 1.15rem; line-height: 1.65; margin-bottom: 26px; }
.hero-simple .hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-simple .hero-fineprint { color: var(--text-muted); font-size: 13px; margin-top: 14px; }
.hero-panel { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--card-radius, 20px); padding: 26px; box-shadow: var(--shadow-lg); }
.hero-panel h3 { font-size: 1rem; color: var(--text-primary); margin: 0 0 14px; }
.hero-panel ol { margin: 0; padding-left: 22px; color: var(--text-secondary); line-height: 1.6; }
.hero-panel li { margin-bottom: 10px; }
.hero-panel li strong { color: var(--text-primary); }
.hero-panel .panel-foot { border-top: 1px solid var(--border-color); margin-top: 16px; padding-top: 14px; font-size: 13px; color: var(--text-muted); }
.hero-panel a { color: var(--primary); }
@media (max-width: 860px) { .hero-simple .container { grid-template-columns: 1fr; } .hero-simple { padding-top: 100px; } }

/* ---- card grids ---- */
.cards-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 22px; }
.card-plain { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 16px; padding: 24px; transition: transform .2s ease, box-shadow .2s ease; }
a.card-plain:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.card-plain h3 { font-size: 1.1rem; color: var(--text-primary); margin: 8px 0 8px; }
.card-plain p { color: var(--text-secondary); line-height: 1.6; margin: 0; font-size: .97rem; }
.card-plain .icon { font-size: 26px; }

/* ---- FAQ block reuse from style.css; ensure legibility on both themes ---- */
.landing-faq .faq-item h3 { color: var(--text-primary); }
.landing-faq .faq-item p { color: var(--text-secondary); }
.landing-faq .faq-item a { color: var(--primary); }
