:root {
  --primary: #1d4ed8;
  --background: #ffffff;
  --text: #0f172a;
  --accent: #1d4ed8;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: -apple-system, system-ui, sans-serif; background: var(--background); color: var(--text); line-height: 1.6; font-size: 15.5px; }

/* ===== header ===== */
.site-header { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; row-gap: .5rem; padding: 1rem 2rem; border-bottom: 1px solid rgba(128,128,128,.15); }
.site-header .brand { display: inline-flex; align-items: center; gap: .5rem; font-weight: 700; font-size: 1.15rem; letter-spacing: -.01em; color: var(--text); text-decoration: none; }
.brand-logo { width: 26px; height: 26px; border-radius: 6px; object-fit: cover; }
.site-header nav a { margin-left: 1.3rem; color: var(--text); opacity: .75; text-decoration: none; font-size: .86rem; font-weight: 500; }
.site-header nav a:hover { opacity: 1; color: var(--primary); }
.site-search { position: relative; }
.site-search-kbd input { padding-right: 1.8rem; }
.site-search-kbd-hint {
  position: absolute; right: .55rem; top: 50%; transform: translateY(-50%);
  width: 1.2rem; height: 1.2rem; display: flex; align-items: center; justify-content: center;
  border-radius: 4px; background: rgba(128,128,128,.12); font-size: .72rem; opacity: .55; pointer-events: none;
}
.site-search input { padding: .4rem .75rem; border: 1px solid rgba(128,128,128,.22); border-radius: 6px; background: var(--background); color: var(--text); font-size: .82rem; width: 180px; }
.site-search-results { position: absolute; right: 0; top: calc(100% + .3rem); width: 320px; max-width: 80vw; max-height: 320px; overflow-y: auto; background: var(--background); border: 1px solid rgba(128,128,128,.18); border-radius: 8px; box-shadow: 0 10px 24px rgba(0,0,0,.08); z-index: 10; }
.site-search-result { display: block; padding: .55rem .75rem; text-decoration: none; color: var(--text); border-bottom: 1px solid rgba(128,128,128,.1); }
.site-search-result:last-child { border-bottom: none; }
.site-search-result:hover { background: rgba(128,128,128,.05); }
.site-search-result-title { display: block; font-weight: 600; font-size: .84rem; }
.site-search-result-summary { display: block; font-size: .74rem; opacity: .65; margin-top: .15rem; }

main { max-width: 1240px; margin: 0 auto; padding: 2.5rem 2rem; }

/* ===== docs layout (left category rail + content + right TOC rail) ===== */
.docs-layout { display: grid; grid-template-columns: 200px minmax(0, 1fr) 220px; gap: 2.25rem; align-items: start; }
.docs-layout-no-toc { grid-template-columns: 200px minmax(0, 1fr); }
.docs-nav { position: sticky; top: 1.5rem; }
.docs-nav-title { margin: 0 0 .6rem; font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; opacity: .55; }
.docs-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .1rem; }
.docs-nav a { display: block; padding: .4rem .6rem; border-radius: 6px; color: var(--text); opacity: .72; text-decoration: none; font-size: .88rem; border-left: 2px solid transparent; }
.docs-nav a:hover { opacity: 1; background: rgba(128,128,128,.05); }
.docs-nav a.is-active { opacity: 1; color: var(--primary); border-left-color: var(--primary); background: rgba(128,128,128,.05); font-weight: 600; }
.docs-toc { position: sticky; top: 1.5rem; }
.docs-toc-title { margin: 0 0 .6rem; font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; opacity: .55; }
.docs-toc ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .35rem; border-left: 1px solid rgba(128,128,128,.15); }
.docs-toc a { display: block; padding: .15rem 0 .15rem .8rem; color: var(--text); opacity: .68; text-decoration: none; font-size: .84rem; }
.docs-toc a:hover { opacity: 1; color: var(--primary); }
.docs-list { list-style: none; margin: 1rem 0 0; padding: 0; }
.docs-list li { display: flex; align-items: center; gap: .6rem; padding: .7rem .2rem; border-bottom: 1px solid rgba(128,128,128,.12); }
.docs-list a { color: var(--text); text-decoration: none; font-weight: 600; flex: 1; }
.docs-list a:hover { color: var(--primary); }
.docs-list-date { flex: none; font-size: .78rem; opacity: .5; }
@media (max-width: 900px) {
  .docs-layout, .docs-layout-no-toc { grid-template-columns: 1fr; }
  .docs-nav, .docs-toc { position: static; }
}

.breadcrumb { font-size: .8rem; opacity: .6; margin: 0 0 1.5rem; }
.breadcrumb a { color: inherit; text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb-sep { margin: 0 .4rem; }

/* ===== intro / hero heading ===== */
.hero { text-align: center; padding: 2rem 0 2.5rem; }
.hero h1 { font-size: 2.5rem; font-weight: 700; letter-spacing: -.025em; margin: 0 0 .75rem; color: var(--text); }
.hero p { opacity: .68; max-width: 540px; margin: 0 auto; font-size: 1.02rem; }
/* CTA phrases as a plain inline text line instead of pill buttons — minimal/docs feel */
.cta-inline { margin-top: 1.1rem; font-size: .92rem; }
.cta-inline-word { font-weight: 600; color: var(--primary); }
.cta-inline-sep { opacity: .35; margin: 0 .5rem; }

/* ===== featured hero ===== */
.featured-hero { margin: 1.5rem 0; }
.hero-track { display: flex; gap: 1rem; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; padding-bottom: .5rem; margin: 0 -.1rem; scrollbar-width: none; }
.hero-track::-webkit-scrollbar { display: none; }
.hero-slide { position: relative; flex: 0 0 58%; scroll-snap-align: start; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .55rem; min-height: 210px; padding: 1.5rem; border-radius: 10px; border: 1px solid rgba(128,128,128,.15); background: rgba(128,128,128,.03); color: var(--text); text-decoration: none; text-align: center; }
.hero-slide-icon { font-size: 2.1rem; }
.hero-slide-title { font-weight: 600; font-size: 1rem; }
.hero-slide-has-image { background-size: cover; background-position: center; color: #fff; }
.hero-slide-has-image .hero-slide-title { text-shadow: 0 1px 4px rgba(0,0,0,.7); }
@media (max-width: 640px) { .hero-slide { flex-basis: 82%; min-height: 180px; } }

/* carousel controls — minimal outlined arrows + flat progress dots (hero-carousel.js) */
.featured-hero-carousel-section { position: relative; display: flex; align-items: center; gap: .5rem; }
.hero-carousel-arrow {
  flex: none; width: 2.1rem; height: 2.1rem; border-radius: 6px; cursor: pointer;
  background: var(--background); border: 1px solid rgba(128,128,128,.22); color: var(--text);
  font-size: 1.1rem; line-height: 1; display: flex; align-items: center; justify-content: center;
  transition: border-color .15s ease;
}
.hero-carousel-arrow:hover { border-color: var(--primary); color: var(--primary); }
.featured-hero-carousel-section .hero-track { flex: 1; min-width: 0; }
.hero-carousel-dots { display: flex; justify-content: center; gap: .4rem; margin-top: .8rem; }
.hero-carousel-dot { width: .45rem; height: .45rem; border-radius: 50%; border: none; padding: 0; cursor: pointer; background: rgba(128,128,128,.25); transition: background .15s ease; }
.hero-carousel-dot.is-active { background: var(--primary); }

.featured-hero-spotlight { display: flex; align-items: flex-start; gap: 1rem; flex-wrap: wrap; }
.hero-spotlight-main { flex: 1 1 62%; min-width: 260px; display: flex; }
.hero-spotlight-main .hero-slide { flex: 1; min-height: 300px; }
.hero-spotlight-list { flex: 1 1 34%; min-width: 220px; display: flex; flex-direction: column; gap: .7rem; }
.hero-spotlight-item { min-height: 80px; padding: .85rem 1rem; flex-direction: row; justify-content: flex-start; text-align: left; }
.hero-spotlight-item .hero-slide-icon { font-size: 1.3rem; }
.hero-spotlight-item .hero-slide-title { font-size: .9rem; }

.hero-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1rem; }
.hero-grid-item { min-height: 140px; }

/* ===== feature grid (family-specific) ===== */
.feature-grid-section { margin: 2rem 0; }
.feature-grid-section h2 { font-size: 1.2rem; font-weight: 700; letter-spacing: -.01em; }
.feature-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1rem; margin-top: 1rem; }
.feature-card { display: flex; flex-direction: column; gap: .5rem; padding: 1.3rem; border: 1px solid rgba(128,128,128,.15); border-radius: 10px; text-decoration: none; color: var(--text); position: relative; transition: border-color .15s ease, box-shadow .15s ease; }
.feature-card::before { content: ""; position: absolute; top: 0; left: 1.3rem; right: 1.3rem; height: 2px; background: var(--primary); border-radius: 0 0 3px 3px; opacity: 0; transition: opacity .15s ease; }
.feature-card:hover { border-color: var(--primary); box-shadow: 0 4px 14px rgba(0,0,0,.06); }
.feature-card:hover::before { opacity: 1; }
.feature-card-title { font-weight: 700; color: var(--text); }
.feature-card-desc { font-size: .86rem; opacity: .65; }

/* ===== category preview / category page ===== */
.category-preview, .category-page { margin: 2.25rem 0 0; }
.category-preview h2, .category-page h1 { font-size: 1.2rem; font-weight: 700; letter-spacing: -.01em; }
.category-preview h2 a { color: var(--text); text-decoration: none; }
.category-preview h2 a:hover { color: var(--primary); }
.category-preview-image { display: block; width: 100%; aspect-ratio: 1200 / 480; object-fit: cover; border-radius: var(--radius); margin: 0 0 .75rem; }
/* flat inline list instead of a card grid — reads like a docs section index */
.category-preview-docs { padding-bottom: 1.25rem; border-bottom: 1px solid rgba(128,128,128,.12); }
.docs-inline-list { list-style: none; margin: .75rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem 1.4rem; }
.docs-inline-list li { font-size: .88rem; display: flex; align-items: center; gap: .4rem; }
.docs-inline-list a { color: var(--text); text-decoration: none; }
.docs-inline-list a:hover { color: var(--primary); }

.download-bar-list { display: flex; flex-direction: column; gap: .5rem; margin-top: .9rem; }
.download-bar-item { display: flex; justify-content: space-between; align-items: center; padding: .65rem .95rem; border: 1px solid rgba(128,128,128,.15); border-radius: 8px; text-decoration: none; color: var(--text); transition: border-color .15s ease; }
.download-bar-item:hover { border-color: var(--primary); }
.download-bar-title { font-weight: 600; }
.download-bar-cta { font-size: .8rem; color: var(--primary); font-weight: 600; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; margin: 1rem 0; }
.card { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .95rem 1.1rem; border: 1px solid rgba(128,128,128,.15); border-radius: 10px; text-decoration: none; color: var(--text); transition: border-color .15s ease, box-shadow .15s ease; }
.card:hover { border-color: var(--primary); box-shadow: 0 4px 14px rgba(0,0,0,.06); }
.card-title { flex: 1; font-weight: 600; }

.card-style-elevated { border-color: transparent; box-shadow: 0 6px 18px rgba(0,0,0,.08); }
.card-style-elevated:hover { box-shadow: 0 10px 24px rgba(0,0,0,.1); }
.card-style-minimal { border: none; border-bottom: 1px solid rgba(128,128,128,.15); border-radius: 0; padding: .75rem .1rem; }
.card-style-minimal:hover { border-bottom-color: var(--primary); box-shadow: none; }

/* ===== app download ===== */
.app-download-section { margin: 2.25rem 0 0; }
.download-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; margin-top: 1rem; }
.download-card { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; padding: .95rem 1.1rem; border: 1px solid rgba(128,128,128,.15); border-radius: 10px; text-decoration: none; color: var(--text); transition: border-color .15s ease; }
.download-card:hover { border-color: var(--primary); }
.download-icon { font-size: 1.4rem; flex: none; }
.download-title { flex: 1; font-weight: 600; }
.download-btn { flex: none; padding: .38rem .85rem; border-radius: 6px; background: var(--primary); color: #fff; font-size: .78rem; font-weight: 600; white-space: nowrap; }

.app-download-hero { display: flex; flex-direction: column; gap: 1.1rem; margin: 1rem 0 1.5rem; padding: 1.2rem; border-radius: 10px; border: 1px solid rgba(128,128,128,.15); }
.app-download-header { display: flex; gap: 1.4rem; align-items: flex-start; }
.app-download-icon-slot { flex: none; }
.app-download-icon { width: 56px; height: 56px; border-radius: 12px; object-fit: cover; }
.app-download-icon-placeholder { width: 56px; height: 56px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.6rem; background: rgba(128,128,128,.08); }
.app-download-info { flex: 1; min-width: 0; }
.app-download-name { margin: 0 0 .4rem; color: var(--text); font-weight: 700; font-size: 1.02rem; }
/* horizontal screenshot gallery — real screenshots come back portrait (9:16) */
.app-download-gallery { display: flex; gap: .7rem; overflow-x: auto; padding-bottom: .3rem; scroll-snap-type: x mandatory; }
.app-download-gallery-shot { flex: none; width: 138px; height: 245px; border-radius: 10px; object-fit: cover; scroll-snap-align: start; border: 1px solid rgba(128,128,128,.15); }
.app-download-desc { margin: 0 0 .8rem; opacity: .68; }
.app-download-hero-btn { display: inline-block; padding: .7rem 1.6rem; border-radius: 8px; background: var(--primary); color: #fff; text-decoration: none; font-weight: 600; font-size: .95rem; }
.app-download-meta { margin: .7rem 0 0; font-size: .8rem; opacity: .62; }
.app-download-age-notice { margin: .4rem 0 0; font-size: .8rem; color: #b45309; }

.app-rating { display: flex; gap: 1.5rem; align-items: center; margin: .8rem 0; flex-wrap: wrap; }
.app-rating-summary { flex: none; text-align: center; }
.app-rating-number { font-size: 2rem; font-weight: 700; line-height: 1; color: var(--text); }
.app-rating-stars { position: relative; display: inline-block; font-size: .92rem; line-height: 1; margin-top: .3rem; }
.app-rating-stars-bg { color: rgba(128,128,128,.28); white-space: nowrap; }
.app-rating-stars-fg { position: absolute; top: 0; left: 0; overflow: hidden; color: var(--primary); white-space: nowrap; }
.app-rating-bars { flex: 1; min-width: 160px; display: flex; flex-direction: column; gap: .25rem; }
.app-rating-bar-row { display: flex; align-items: center; gap: .5rem; font-size: .76rem; opacity: .75; }
.app-rating-bar-label { flex: none; width: .7rem; text-align: right; }
.app-rating-bar-track { flex: 1; height: 5px; border-radius: 4px; background: rgba(128,128,128,.16); overflow: hidden; }
.app-rating-bar-fill { height: 100%; background: var(--primary); }

/* ===== tag cloud ===== */
.tag-cloud-section { margin-top: 2.5rem; }
.tag-cloud-section h2 { font-size: 1.05rem; font-weight: 700; }
.tag-chip { display: inline-flex; align-items: center; gap: .4rem; padding: .3rem .8rem; border-radius: 6px; border: 1px solid rgba(128,128,128,.18); font-size: .8rem; color: var(--text); }
/* minimal inline text line instead of chips — a docs-footer-style tag index */
.tag-inline-line { margin-top: .75rem; font-size: .92rem; line-height: 2; }
.tag-inline-word { font-weight: 600; color: var(--text); }
.tag-inline-word sup { opacity: .5; font-size: .68em; margin-left: .1em; }
.tag-inline-sep { opacity: .35; margin: 0 .5rem; }

/* ===== faq ===== */
.faq-section { margin-top: 2.5rem; }
.faq-section h2 { font-size: 1.05rem; font-weight: 700; }
.faq-item { border: 1px solid rgba(128,128,128,.15); border-radius: 8px; padding: .7rem .95rem; margin-bottom: .5rem; }
.faq-item summary { font-weight: 650; cursor: pointer; }
.faq-item[open] summary { margin-bottom: .4rem; }
.faq-item p { margin: 0; opacity: .7; }
.faq-q-num { color: var(--primary); font-weight: 700; margin-right: .5rem; }

/* ===== about ===== */
.about-summary { margin-top: 2.5rem; }
.about-summary h2 { font-size: 1.05rem; font-weight: 700; }
.about-summary-sidebar { padding: 1rem 1.2rem; border: 1px solid rgba(128,128,128,.15); border-radius: 10px; background: rgba(128,128,128,.03); }

/* ===== article page ===== */
article h1 { font-size: 1.9rem; font-weight: 700; letter-spacing: -.015em; color: var(--text); }
.static-page { padding: 1.4rem 1.6rem; border: 1px solid rgba(128,128,128,.15); border-radius: 10px; }
.article-meta { font-size: .82rem; opacity: .6; margin: -.5rem 0 1.2rem; }
.article-hero-image { display: block; width: 100%; aspect-ratio: 1200 / 630; object-fit: cover; border-radius: 10px; margin: 1rem 0 1.5rem; }
.article-actions { display: flex; gap: .5rem; margin: 0 0 1rem; }
.share-btn, .collect-btn { min-height: 42px; display: inline-flex; align-items: center; gap: .3rem; padding: 0 1rem; border-radius: 8px; border: 1px solid rgba(128,128,128,.22); background: transparent; color: var(--text); font-size: .86rem; font-weight: 600; cursor: pointer; }
.share-btn:hover, .collect-btn:hover { border-color: var(--primary); color: var(--primary); }
.collect-btn.is-collected { border-color: var(--accent); color: var(--accent); }
.article-action-toast { position: fixed; left: 50%; bottom: 2rem; transform: translateX(-50%); padding: .55rem 1.1rem; border-radius: 8px; background: rgba(0,0,0,.82); color: #fff; font-size: .82rem; z-index: 100; }

.featured-summary { border-collapse: collapse; margin: 1rem 0; }
.featured-summary td { border: 1px solid rgba(128,128,128,.15); padding: .5rem .95rem; }

.article-tags { display: flex; flex-wrap: wrap; gap: .35rem; margin: 1.5rem 0 0; }
.article-tags .tag-chip { font-size: .75rem; padding: .22rem .65rem; }

.author-box { margin-top: 2rem; padding: 1rem 1.2rem; border: 1px solid rgba(128,128,128,.15); border-radius: 10px; }
.author-box-name { margin: 0 0 .3rem; font-weight: 700; color: var(--text); }
.author-box-bio { margin: 0; opacity: .68; font-size: .88rem; }

.related-articles { margin-top: 2.5rem; }
.related-articles h2 { font-size: 1.05rem; font-weight: 700; }
.related-articles ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; }
.related-articles li { padding: .7rem .95rem; border: 1px solid rgba(128,128,128,.15); border-radius: 8px; }
.related-articles a { color: var(--text); text-decoration: none; font-weight: 600; }
.related-articles a:hover { color: var(--primary); }

/* ===== comments ===== */
.comments { margin-top: 2.5rem; border-top: 1px solid rgba(128,128,128,.15); padding-top: 1.5rem; }
.comments h2 { font-size: 1.05rem; font-weight: 700; }
.comment { padding: .85rem 0; border-bottom: 1px solid rgba(128,128,128,.1); }
.comment-meta { font-size: .78rem; opacity: .62; margin-bottom: .3rem; }
.comment-name { font-weight: 650; margin-right: .6rem; }
.comment-text { margin: 0; }
.comment-replies { margin: .6rem 0 0 1.5rem; border-left: 2px solid rgba(128,128,128,.14); padding-left: 1rem; }
.comment-reply { padding: .5rem 0; }
.comment-reply.is-author .comment-name { color: var(--primary); }

/* ===== footer ===== */
.site-footer { text-align: center; padding: 2.25rem; opacity: .6; font-size: .82rem; border-top: 1px solid rgba(128,128,128,.12); }
.footer-nav { margin-bottom: .75rem; }
.footer-nav a { color: inherit; text-decoration: none; margin: 0 .55rem; opacity: .8; }
.footer-nav a:hover { opacity: 1; text-decoration: underline; }

/* ===== visual_style variants ===== */
.visual-style-clean .feature-card:hover { transform: translateY(-1px); }

.visual-style-editorial .site-header { border-bottom-width: 2px; }
.visual-style-editorial .hero h1 { font-weight: 800; }
.visual-style-editorial .download-btn { border-radius: 3px; }
.visual-style-editorial .feature-card, .visual-style-editorial .card { border-radius: 3px; }

.visual-style-vibrant .cta-inline-word { background: linear-gradient(135deg, var(--primary), var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.visual-style-vibrant .feature-card::before { background: linear-gradient(90deg, var(--primary), var(--accent)); }

.download-date, .download-bar-date, .docs-inline-date, .related-date { font-size: .78rem; opacity: .5; }
.download-date { flex: 1 0 100%; order: 99; }
.download-bar-date, .docs-inline-date { display: block; }
.related-date { display: block; margin-top: .2rem; }
.hero-slide-date { position: absolute; bottom: .6rem; left: .8rem; font-size: .78rem; opacity: .6; color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,.6); }

.card { border-radius: 12px; box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1); background: #ffffff; }
.button { background: linear-gradient(135deg, #1d4ed8, #1e40af); border-radius: 8px; color: #ffffff; border: none; }
.container { border: 1px solid rgba(29, 78, 216, 0.1); border-radius: 16px; transition: box-shadow 0.3s; }
.container:hover { box-shadow: 0 10px 15px -3px rgba(29, 78, 216, 0.2); }
.text-highlight { color: #1d4ed8; font-weight: 600; text-shadow: 0 0 1px rgba(29,78,216,0.1); }
.input-field { border: 1px solid #e2e8f0; border-radius: 6px; outline: none; }
.input-field:focus { border-color: #1d4ed8; box-shadow: 0 