/* Shared appearance controls and colorful product icons in both themes. */
html[data-theme="dark"] { color-scheme: dark; }
.theme-toggle { display: inline-flex; align-items: center; justify-content: center; gap: 6px; flex: 0 0 auto; min-height: 38px; padding: 6px 10px; border: 1px solid var(--border-glass-hover); border-radius: 9px; background: var(--bg-secondary); color: var(--text-primary); font: inherit; font-size: .8rem; cursor: pointer; position: relative; z-index: 1001; }
.theme-toggle__icon { font-size: 1.35rem; line-height: 1; }
.theme-toggle:hover { border-color: var(--accent-primary-light); }
.theme-toggle:focus-visible { outline: 2px solid var(--accent-primary-light); outline-offset: 3px; }
.header-inner { gap: 12px; }
.knowledge-index .theme-toggle { z-index: auto; }
.feature-tile-icon { display: inline-grid; place-items: center; width: 48px; height: 48px; flex: 0 0 auto; border-radius: 12px; background: #eee7ff; color: #6435b2; border: 1px solid #c8b3ed; margin-bottom: 14px; }
.feature-tile-icon svg { width: 26px; height: 26px; }
.feature-tile-icon--blue { background: #e2efff; color: #175da7; border-color: #9bbce4; }
.feature-tile-icon--teal { background: #daf5ed; color: #146951; border-color: #8ccdb9; }
.feature-tile-icon--orange { background: #fff0da; color: #9a4d0a; border-color: #e0b582; }
.feature-tile-icon--rose { background: #ffe7ef; color: #aa2858; border-color: #e5a0b8; }
html[data-theme="dark"] .feature-tile-icon { background: #302344; color: #d6b6ff; border-color: #70518b; }
html[data-theme="dark"] .feature-tile-icon--blue { background: #193550; color: #99caff; border-color: #3b6b99; }
html[data-theme="dark"] .feature-tile-icon--teal { background: #183d35; color: #8ce0c5; border-color: #397b69; }
html[data-theme="dark"] .feature-tile-icon--orange { background: #45321f; color: #ffd097; border-color: #967045; }
html[data-theme="dark"] .feature-tile-icon--rose { background: #452736; color: #ffb0cf; border-color: #935970; }
/* These large icon blocks establish visual categories without recoloring screenshots. */
html[data-theme="light"] .expertise-card:nth-child(3n+1) .card-icon { background: #e2efff; border: 1px solid #9bbce4; box-shadow: none; }
html[data-theme="light"] .expertise-card:nth-child(3n+2) .card-icon { background: #daf5ed; border: 1px solid #8ccdb9; box-shadow: none; }
html[data-theme="light"] .expertise-card:nth-child(3n) .card-icon { background: #fff0da; border: 1px solid #e0b582; box-shadow: none; }
html[data-theme="light"] .integration-card:nth-child(4n+1) .integration-card-icon { background: #e2efff; }
html[data-theme="light"] .integration-card:nth-child(4n+2) .integration-card-icon { background: #ffe7ef; }
html[data-theme="light"] .integration-card:nth-child(4n+3) .integration-card-icon { background: #daf5ed; }
html[data-theme="light"] .integration-card:nth-child(4n) .integration-card-icon { background: #fff0da; }
@media (max-width: 1380px) and (min-width: 1201px) { .theme-toggle__label { display: none; } .theme-toggle { width: 38px; padding: 0; } .nav-links { gap: 16px; } }
@media (max-width: 768px) {
  .theme-toggle { width: 44px; height: 44px; padding: 0; }
  .theme-toggle__label { display: none; }
  .header-inner, .home-chat .header-inner { gap: 6px; }
}
@media (max-width: 380px) {
  .header-inner, .home-chat .header-inner { padding-inline: 8px; gap: 4px; }
  .header-inner .logo { font-size: 1.2rem; }
}

/* Editorial detail pages share the selected theme and locally hosted font. */
.detail-header { border-bottom: 1px solid var(--border-glass); background: var(--bg-primary); }
.detail-header > div, .detail-header nav { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.detail-header > div { min-height: 64px; }
.detail-header nav { font-size: .9rem; }
.detail-hero { padding: 48px 0 36px; background: var(--bg-secondary); }
.detail-hero .section-label { display: block; margin-top: 24px; }
.detail-hero h1 { font-size: clamp(2rem, 4vw, 3.4rem); line-height: 1.15; max-width: 980px; }
.detail-lead { color: var(--text-secondary); max-width: 900px; font-size: 1.12rem; line-height: 1.75; margin-top: 24px; }
.detail-layout { display: grid; grid-template-columns: minmax(210px, 280px) minmax(0, 1fr); gap: 48px; align-items: start; padding-block: 36px 64px; }
.detail-toc { display: grid; gap: 12px; padding: 20px; border: 1px solid var(--border-glass); border-radius: 12px; background: var(--bg-secondary); font-size: .9rem; line-height: 1.5; }
.detail-toc a { text-decoration: underline; text-underline-offset: 3px; }
.detail-article { padding: 28px 0; border-bottom: 1px solid var(--border-glass); scroll-margin-top: 24px; }
.detail-article:first-child { padding-top: 0; }
.detail-article h2 { font-size: clamp(1.35rem, 2.4vw, 1.75rem); line-height: 1.3; margin-bottom: 16px; }
.detail-article p, .detail-article li { color: var(--text-secondary); line-height: 1.75; }
.detail-article ul { padding-left: 22px; margin: 16px 0; list-style: disc; }
.detail-article li + li { margin-top: 10px; }
.detail-article h3 { font-size: 1rem; margin-top: 20px; }
.detail-article summary { color: var(--text-primary); }
.detail-related { display: flex; flex-wrap: wrap; gap: 16px 28px; margin-top: 32px; }
.detail-related a { text-decoration: underline; }
.selling-details { padding-block: 40px; }
.selling-details h2 { max-width: 920px; font-size: clamp(1.7rem, 3vw, 2.5rem); }
.selling-details > p { max-width: 920px; color: var(--text-secondary); line-height: 1.75; margin: 16px 0 24px; }
.selling-details dl { display: grid; grid-template-columns: 1fr 1fr; gap: 0 36px; }
.selling-details dl > div { border-top: 1px solid var(--border-glass); padding: 22px 0; }
.selling-details dt { font-weight: 650; font-size: 1.08rem; margin-bottom: 8px; }
.selling-details dd { margin: 0; color: var(--text-secondary); line-height: 1.7; }
.selling-details dd a { display: inline-block; margin-top: 10px; text-decoration: underline; }
.selling-proof { color: var(--text-secondary); line-height: 1.7; margin: 22px 0; padding-left: 22px; }
.selling-proof li + li { margin-top: 8px; }
@media (max-width: 768px) {
  .detail-layout { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .detail-header > div, .detail-header nav { gap: 10px; }
  .detail-header .logo { font-size: 1.2rem; }
  .detail-header nav { font-size: .8rem; }
  .detail-hero { padding: 28px 0; }
  .detail-toc { padding: 16px; }
  .detail-toc { max-height: 220px; overflow-y: auto; }
  .selling-details dl { grid-template-columns: minmax(0, 1fr); }
}
