/* Presentation pages only. Application styles and saved preferences are separate. */
html { scroll-padding-top: 24px; }
.site-page { min-width: 280px; }
.site-page .site-header { position: relative; background: var(--bg-page); }
.site-header .about-link[aria-current='page'] { color: var(--primary); }
.site-page .site-footer { max-width: 1136px; margin: 64px auto 0; padding: 32px 0; border-top: 1px solid var(--border); display: grid; grid-template-columns: 1fr auto; gap: 24px; }
.site-footer p { color: var(--text-muted); font-size: 13px; margin-top: 8px; }
.site-footer nav { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 22px; }
.site-footer nav a { padding: 10px 0; color: var(--text-muted); font-size: 13px; text-decoration: none; }
.site-footer nav a:hover { color: var(--primary); text-decoration: underline; }
.site-footer .site-copyright { grid-column: 1 / -1; margin-top: 0; font-size: 12px; }
.breadcrumbs { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; color: var(--text-muted); font-size: 12px; line-height: 1.7; }
.breadcrumbs a { text-decoration: none; padding: 8px 0; }
.breadcrumbs a:hover, .text-link:hover { text-decoration: underline; }
.text-link { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 0; color: var(--primary); text-decoration: none; font-size: 14px; font-weight: 650; }
.launch-page main { max-width: 1184px; margin: auto; padding: 16px 24px 0; }
.launch-hero { display: grid; grid-template-columns: 1.1fr 1fr; align-items: center; gap: 48px; padding: 40px 0 64px; }
.launch-hero h1 { font-size: clamp(32px, 3.6vw, 48px); line-height: 1.13; letter-spacing: -1.8px; font-weight: 800; text-wrap: balance; }
.launch-intro { margin-top: 20px; color: var(--text-muted); font-size: 17px; line-height: 1.7; max-width: 58ch; }
.launch-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 24px; margin-top: 24px; }
.launch-actions .btn-primary { min-height: 48px; padding: 12px 20px; }
.launch-preview { padding: 16px; border: 1px solid var(--border); border-radius: 24px; background: var(--bg-card); box-shadow: 0 16px 44px rgb(15 23 42 / 5%); }
.launch-preview img { display: block; width: 100%; height: auto; border-radius: 12px; }
.launch-preview.banner-preview { padding: 0; overflow: hidden; }
.launch-preview.banner-preview img { aspect-ratio: var(--banner-ratio, 16 / 9); object-fit: cover; border-radius: 0; }
.hero.cnc-hero { max-width: 1184px; display: grid; grid-template-columns: 1.1fr 1fr; align-items: center; gap: 36px; text-align: left; }
.cnc-hero-art { margin: 0; overflow: hidden; border: 1px solid var(--border); border-radius: 18px; }
.cnc-hero-art img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; }
@media (max-width: 820px) {
  .hero.cnc-hero { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .cnc-hero-art { width: 100%; max-width: 720px; margin-inline: auto; }
}
.page-section { padding: 36px 0; border-top: 1px solid var(--border); }
.section-heading { margin-bottom: 24px; }
.page-section h2, .guide-callout h2 { font-size: clamp(23px, 2.3vw, 30px); line-height: 1.3; letter-spacing: -.8px; font-weight: 750; }
.feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.feature-card { padding: 24px; border: 1px solid var(--border); border-radius: 16px; background: var(--bg-card); display: flex; flex-direction: column; align-items: flex-start; }
.feature-card h3 { margin: 18px 0 10px; font-size: 18px; letter-spacing: -.4px; }
.feature-card p { font-size: 14px; color: var(--text-muted); line-height: 1.7; }
.feature-card .text-link { margin-top: auto; padding-top: 18px; }
.step-number { display: inline-flex; justify-content: center; align-items: center; width: 34px; height: 34px; flex-shrink: 0; border-radius: 10px; background: var(--bg-subtle); color: var(--primary); font-size: 12px; font-weight: 750; }
.how-section { display: grid; grid-template-columns: 1fr 1.2fr; gap: 64px; padding: 48px 0; }
.steps-list { display: grid; gap: 20px; list-style: none; margin: 0; padding: 0; }
.steps-list li { display: flex; gap: 16px; align-items: flex-start; }
.steps-list p { color: var(--text-muted); font-size: 15px; padding-top: 4px; }
.guide-callout { max-width: 1136px; margin: 36px auto 0; padding: 30px; border: 1px solid var(--border); border-radius: 18px; background: var(--bg-subtle); display: flex; justify-content: space-between; align-items: center; gap: 24px; }
.guide-callout .btn-primary { flex-shrink: 0; }
.guide-callout .text-link { display: flex; justify-content: flex-start; }
.guide-callout h2 { font-size: 23px; margin-bottom: 10px; }
.download-caption { font-size: 12px; color: var(--text-muted); margin-top: 12px; }
.cnc-icon { display: flex; align-items: center; justify-content: center; background: var(--bg-subtle); color: var(--primary); height: 84px; font-size: 30px; }
.cnc-card .tool-card-content { padding-top: 18px; }
.blog-hero { padding-top: 44px; padding-bottom: 40px; }
.blog-card .tool-card-content { padding: 24px; }
.blog-card h3 { margin-top: 16px; font-size: 21px; line-height: 1.35; }
.article-card-meta { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; width: 100%; gap: 8px; }
.article-card-meta > span:last-child { color: var(--text-muted); font-size: 11px; }

/* The reader overrides legacy article typography, while preserving article content. */
.article-page { background: #f8fafc; color: #0f172a; }
.article-header { max-width: 1008px; margin: auto; padding: 24px 24px 40px; }
.article-header .breadcrumbs { margin-bottom: 30px; }
.article-header h1 { max-width: 920px; font-size: clamp(30px, 4vw, 48px); font-weight: 800; line-height: 1.15; letter-spacing: -1.6px; text-wrap: balance; color: #0f172a; }
.article-intro { max-width: 72ch; margin-top: 20px; color: #475569; font-size: 18px; line-height: 1.7; }
.article-meta { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-top: 24px; font-size: 12px; color: #64748b; }
.article-page .reader-main { max-width: 1184px; padding: 32px 24px 0; margin: 0 auto; background: transparent; border-top: 1px solid #dce3ed; }
.reading-layout { display: grid; grid-template-columns: 220px minmax(0, 760px); justify-content: space-between; gap: 40px; align-items: start; }
.reader-sidebar { position: sticky; top: 24px; min-width: 0; }
.article-toc { border: 1px solid #dce3ed; border-radius: 14px; background: white; overflow: hidden; }
.article-toc summary { cursor: pointer; padding: 16px; font-size: 13px; font-weight: 750; color: #0f172a; }
.article-toc ol { max-height: 65vh; overflow-y: auto; margin: 0; padding: 0 16px 16px 32px; font-size: 12px; line-height: 1.6; color: #64748b; }
.article-toc li { padding-left: 2px; }
.article-toc a { display: block; padding: 7px 0; text-decoration: none; color: #475569; }
.article-toc a:hover { color: #1d4ed8; text-decoration: underline; }
.sidebar-tool { display: block; margin-top: 14px; padding: 14px 16px; border-radius: 12px; background: #eef3ff; color: #1d4ed8; font-size: 12px; font-weight: 650; text-decoration: none; }
.article-page .article-body { width: 100%; max-width: 760px; min-width: 0; color: #334155; font-family: Inter, system-ui, sans-serif; font-size: 16px; line-height: 1.8; margin: 0; padding: 0; background: transparent; box-shadow: none; overflow-wrap: anywhere; }
.article-page .article-body p { text-align: left !important; line-height: 1.8; margin: 0 0 1.4em; color: inherit; font-size: inherit; }
.article-page .article-body h2 { color: #0f172a; font-size: clamp(23px, 2.4vw, 28px); font-weight: 750; line-height: 1.35; letter-spacing: -.6px; margin: 2.2em 0 .9em; padding: 0 0 12px; border-bottom: 1px solid #dce3ed; scroll-margin-top: 24px; }
.article-page .article-body > :first-child { margin-top: 0; }
.article-page .article-body h3 { color: #0f172a; font-size: 21px; font-weight: 700; line-height: 1.4; margin: 1.7em 0 .75em; }
.article-page .article-body h4 { color: #0f172a; font-size: 18px; font-weight: 700; margin: 1.5em 0 .6em; }
.article-page .article-body a { color: #1d4ed8; text-underline-offset: 3px; overflow-wrap: anywhere; }
.article-page .article-body a:hover { text-decoration: underline; }
.article-page .article-body img { display: block; max-width: 100%; height: auto; margin: 24px auto; border-radius: 12px; }
.article-page .article-body ul, .article-page .article-body ol { padding-left: 24px; margin: 1em 0 1.5em; }
.article-page .article-body li { margin: .55em 0; }
.article-page .article-body li > p { margin-bottom: .5em; }
.article-page .article-body pre { max-width: 100%; overflow-x: auto; white-space: pre; padding: 20px; border-radius: 10px; font-size: 13px; line-height: 1.7; }
.article-page .article-body code { overflow-wrap: anywhere; }
.article-page .article-body pre code { overflow-wrap: normal; }
.article-table-scroll { position: relative; width: 100%; overflow-x: auto; margin: 24px 0; border: 1px solid #dce3ed; border-radius: 10px; }
.article-page .article-body table { width: 100%; min-width: 540px; border-collapse: collapse; margin: 0; background: white; font-size: 13px; }
.article-page .article-body th, .article-page .article-body td { padding: 12px 14px; text-align: left; border: 1px solid #e2e8f0; color: #334155; }
.article-page .article-body th { background: #eef3ff; color: #0f172a; font-weight: 700; }
.article-page .article-body :is(.bg-indigo-900, .bg-slate-900, .bg-gray-900, .bg-blue-900, .bg-blue-600, .bg-indigo-600) :is(h2,h3,h4,p) { color: white; }
.article-page .article-body a:is(.bg-indigo-600,.bg-blue-600,.bg-indigo-900) { color: white; }
.article-page .article-body :is(a,h2,h3,h4).text-white { color: white; }
.article-page .article-body :is(.bg-indigo-950,.bg-indigo-800,.bg-red-950,.bg-black) :is(h2,h3,h4) { color: white; }
.article-page .article-body .katex-display { position: relative; max-width: 100%; overflow-x: auto; overflow-y: hidden; padding: 8px 0; }
.article-page .article-body .flex > *, .article-page .article-body .grid > * { min-width: 0; max-width: 100%; }
.article-page .article-body .font-mono { max-width: 100%; }
.related-reading { margin: 64px 0 0; padding-top: 28px; border-top: 1px solid #dce3ed; }
.related-reading h2 { font-size: 23px; font-weight: 750; margin: 0 0 20px; }
.related-reading > div { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.related-reading a { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; padding: 22px; background: white; border: 1px solid #dce3ed; border-radius: 14px; text-decoration: none; }
.related-reading a:hover { border-color: #1d4ed8; }
.related-reading span { font-size: 11px; font-weight: 650; }
.related-reading strong { color: #0f172a; font-size: 16px; line-height: 1.5; }
.related-reading a span:last-child { margin-top: auto; }
.info-page :is(.hero,.hero-section,.page-header) { min-height: auto; max-width: 860px; margin: 0 auto 32px; padding: 32px 24px; }
.info-page :is(.hero,.hero-section,.page-header) h1 { font-size: clamp(28px, 3.5vw, 44px); line-height: 1.2; letter-spacing: -1px; }
.info-page :is(.hero,.hero-section,.page-header) > p { max-width: 64ch; margin: 16px auto 0; font-size: 16px; line-height: 1.7; }
.info-page .prose { max-width: 76ch; font-size: 16px; line-height: 1.8; }
.info-page .prose p { text-align: left !important; }
.info-page main img { max-width: 100%; height: auto; }
.info-page .policy-layout > * { min-width: 0; }
.install-dialog { width: min(440px, calc(100vw - 32px)); border: 1px solid var(--border); padding: 28px; border-radius: 18px; background: var(--bg-card); color: var(--text-main); box-shadow: 0 24px 80px rgb(0 0 0 / 20%); }
.install-dialog::backdrop { background: rgb(15 23 42 / 45%); }
.install-dialog h2 { margin-bottom: 12px; font-size: 23px; }
.install-dialog p { color: var(--text-muted); font-size: 14px; margin-bottom: 20px; }

@media (max-width: 1184px) {
  .site-page .site-footer { margin-left: 24px; margin-right: 24px; }
  .cnc-directory .guide-callout { margin-left: 24px; margin-right: 24px; }
}
@media (max-width: 980px) {
  .launch-hero { gap: 28px; }
  .reading-layout { grid-template-columns: minmax(0, 760px); justify-content: center; gap: 28px; }
  .reader-sidebar { position: static; }
  .article-toc ol { max-height: 50vh; }
  .article-header { max-width: 808px; }
  .sidebar-tool { display: inline-block; }
}
@media (max-width: 760px) {
  .launch-hero { grid-template-columns: minmax(0, 1fr); gap: 28px; padding: 28px 0 36px; }
  .launch-preview { max-width: 560px; padding: 10px; border-radius: 18px; }
  .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .how-section { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .guide-callout { flex-direction: column; align-items: flex-start; padding: 24px; }
  .site-page .site-footer { grid-template-columns: 1fr; gap: 16px; }
  .related-reading > div { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .site-header .about-link { display: block; font-size: 12px; }
  .site-header .brand-link > i { display: none; }
  .launch-page main { padding: 12px 20px 0; }
  .launch-hero h1 { font-size: 34px; letter-spacing: -1.2px; }
  .launch-intro { font-size: 15px; margin-top: 16px; }
  .launch-actions { margin-top: 20px; gap: 8px 18px; }
  .feature-grid { grid-template-columns: 1fr; gap: 12px; }
  .feature-card { padding: 20px; }
  .feature-card h3 { margin-top: 14px; }
  .page-section { padding: 28px 0; }
  .guide-callout { margin-top: 24px; padding: 22px; }
  .site-page .site-footer { margin: 40px 20px 0; padding: 24px 0; }
  .cnc-directory .guide-callout { margin-left: 16px; margin-right: 16px; }
  .cnc-card .tool-card-content { padding: 0; }
  .cnc-card.catalog-card .tool-card-content { padding: 18px; }
  .cnc-icon { height: 80px; font-size: 26px; }
  .tool-card.blog-card { display: flex; padding: 0; }
  .blog-card .tool-card-content { padding: 22px; }
  .blog-card h3 { margin: 14px 0 10px; font-size: 21px; }
  .blog-card p { font-size: 14px; line-height: 1.7; margin-bottom: 18px; }
  .article-header { padding: 12px 20px 28px; }
  .article-header .breadcrumbs { margin-bottom: 20px; }
  .article-header h1 { font-size: 32px; letter-spacing: -1px; }
  .article-intro { font-size: 16px; margin-top: 16px; }
  .article-meta { gap: 8px 16px; margin-top: 20px; }
  .article-page .reader-main { padding: 24px 20px 0; }
  .article-page .article-body { font-size: 16px; }
  .article-page .article-body h2 { margin-top: 1.8em; }
  .article-page .article-body h3 { font-size: 20px; }
  .article-page .article-body pre { padding: 16px; font-size: 12px; }
  .article-page .article-body [class*='p-8'] { padding: 20px; }
  .article-page .article-body [class*='p-6'] { padding: 16px; }
  .related-reading { margin-top: 40px; }
}
