/* Знакомство с kvorium: семь экранов для разговора и подробный справочник. */
html:has(.guide-page, .projects-page), body:has(.guide-page, .projects-page) { min-width: 0; }
.guide-page { max-width: 1440px; }
.guide-page .button { min-height: 38px; padding: 8px 14px; font-size: var(--text-sm); border-radius: 8px; box-shadow: none; }
.guide-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; padding: 0 0 20px; }
.guide-brand { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 10px; font-size: var(--text-sm); font-weight: var(--weight-strong); }
.guide-brand > .icon { color: var(--accent); }
.guide-brand > span { margin-left: 8px; color: var(--text-tertiary); font-weight: var(--weight-normal); }
.guide-toolbar-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.guide-layout { display: grid; grid-template-columns: 232px minmax(0, 1fr); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.guide-layout[hidden], .guide-catalog[hidden] { display: none; }
.guide-rail { min-width: 0; padding: 24px 12px; background: var(--surface-muted); border-right: 1px solid var(--border); }
.guide-rail-label { margin: 0 12px 16px; font-size: var(--text-xs); font-weight: var(--weight-strong); color: var(--text-tertiary); }
.guide-page .guide-chapter { width: 100%; justify-content: flex-start; text-align: left; gap: 12px; padding: 14px 12px; margin-bottom: 4px; color: var(--text-secondary); background: transparent; border: 1px solid transparent; font-weight: var(--weight-normal); line-height: var(--leading-text); }
.guide-chapter-number { color: var(--text-tertiary); font-size: var(--text-xs); font-variant-numeric: tabular-nums; }
.guide-page .guide-chapter:hover { background: var(--surface-sunken); }
.guide-page .guide-chapter[aria-current="step"] { color: var(--text); background: var(--surface); border-color: var(--border); font-weight: var(--weight-strong); }
.guide-chapter[aria-current="step"] .guide-chapter-number { color: var(--accent); }
.guide-stage { min-width: 0; display: flex; flex-direction: column; }
.guide-slide { flex: 1; min-width: 0; padding: 28px 32px 24px; }
.guide-slide:focus { outline: none; }
.guide-slide:focus-visible { outline: none; }
.guide-slide-heading { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.guide-slide-symbol { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 10px; background: var(--accent-subtle); color: var(--accent); }
.guide-symbol-law { background: #f4edde; color: #906d35; }
.guide-symbol-voices, .guide-symbol-meetings { background: #eeeafa; color: #766092; }
.guide-symbol-results, .guide-symbol-materials { background: #eaf0f8; color: #567492; }
.guide-eyebrow { font-size: var(--text-sm); color: var(--text-secondary); }
.guide-slide h2 { margin: 0 0 24px; max-width: var(--measure); font-size: clamp(26px, 2.7vw, 36px); line-height: 1.16; font-weight: var(--weight-strong); text-wrap: balance; letter-spacing: -0.025em; }
.guide-slide-columns { display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); align-items: start; gap: 32px; }
.guide-narrative { min-width: 0; }
.guide-lead { margin: 0 0 24px; font-size: 18px; line-height: var(--leading-text); color: var(--text-secondary); }
.guide-points { margin: 0; padding: 0; list-style: none; }
.guide-points > li { position: relative; margin-top: 16px; padding-left: 18px; font-size: var(--text-base); line-height: var(--leading-text); }
.guide-points > li::before { position: absolute; left: 0; top: 0.65em; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); content: ""; }
.guide-takeaway { margin: 24px 0 0; padding-top: 20px; border-top: 1px solid var(--border); color: var(--text-secondary); font-size: var(--text-base); line-height: var(--leading-text); }
.guide-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 32px; border-top: 1px solid var(--border); }
.guide-footer > div:first-child { display: grid; gap: 6px; }
.guide-counter { color: var(--text-secondary); font-size: var(--text-sm); font-variant-numeric: tabular-nums; }
.guide-key-hint { color: var(--text-tertiary); font-size: var(--text-xs); }
.guide-end-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }

/* Схематичные примеры используют те же документные приметы, что «Результаты».
   Это иллюстрации сценария; внутри нет неработающих кнопок и ссылок. */
.guide-demo { min-width: 0; margin: 0; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: var(--surface); }
.guide-demo > figcaption { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; background: var(--surface-muted); border-bottom: 1px solid var(--border); font-size: var(--text-xs); color: var(--text-secondary); }
.guide-demo > figcaption > span:first-child { font-weight: var(--weight-strong); }
.guide-demo > figcaption > span:last-child { text-align: right; color: var(--text-tertiary); }
.guide-demo-body { padding: 20px; }
.guide-demo-body > h3 { font-size: var(--text-base); margin-bottom: 16px; }
.guide-demo-row { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; align-items: start; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.guide-demo-row > .icon { margin-top: 2px; color: var(--accent); }
.guide-demo-row strong { font-size: var(--text-sm); line-height: var(--leading-ui); }
.guide-demo-row p { margin: 5px 0 0; color: var(--text-secondary); font-size: var(--text-sm); line-height: var(--leading-text); }
.guide-demo-tag { margin-top: 2px; padding: 3px 6px; font-size: var(--text-xs); color: var(--text-secondary); background: var(--surface-muted); border-radius: 4px; }
.guide-demo-project { display: flex; gap: 14px; padding-bottom: 12px; }
.guide-demo-project > .icon { flex: 0 0 auto; color: var(--accent); }
.guide-demo-project h3 { margin: 0 0 6px; font-size: 18px; }
.guide-demo-project p { margin: 0; font-size: var(--text-sm); line-height: var(--leading-text); color: var(--text-secondary); }
.guide-demo-note { margin: 16px 0 0; color: var(--text-tertiary); font-size: var(--text-xs); line-height: var(--leading-text); }
.guide-flow { display: flex; flex-wrap: wrap; gap: 10px 14px; margin-top: 18px; font-size: var(--text-xs); color: var(--text-secondary); }
.guide-flow > span { display: inline-flex; gap: 6px; align-items: center; }
.guide-flow b { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; color: var(--accent); background: var(--accent-subtle); border-radius: 4px; }
.guide-compare { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 20px 0 8px; }
.guide-compare > div + div { padding-left: 16px; border-left: 1px solid var(--border); }
.guide-demo-label { color: var(--text-tertiary); font-size: var(--text-xs); }
.guide-compare p { margin: 10px 0 0; font-family: var(--font-document); font-size: 20px; line-height: var(--leading-text); }
.guide-compare mark { background: var(--accent-subtle); color: var(--accent); padding: 1px 3px; }
.guide-compare mark.guide-before { background: #f7e9e7; color: #8d564b; }
.guide-result-types { display: flex; flex-wrap: wrap; gap: 8px 12px; padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.guide-result-types > span { display: inline-flex; align-items: center; gap: 5px; color: var(--text-tertiary); font-size: var(--text-xs); }
.guide-result-types .is-selected { color: var(--accent); font-weight: var(--weight-strong); }
.guide-result-types .icon { width: 16px; height: 16px; }
.guide-paper { padding: 20px 0 0; }
.guide-paper > h3 { font-family: var(--font-document); font-size: 23px; line-height: var(--leading-tight); margin-bottom: 18px; }
.guide-paper-section { margin-top: 14px; }
.guide-paper-section > strong { font-size: var(--text-xs); color: var(--text-secondary); }
.guide-paper-section > p { margin: 5px 0 0; font-family: var(--font-document); font-size: 18px; line-height: var(--leading-text); }
.guide-transcript { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; margin-top: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.guide-transcript > span { color: var(--accent); font-size: var(--text-xs); font-variant-numeric: tabular-nums; padding-top: 3px; }
.guide-transcript p { margin: 0; font-size: var(--text-sm); line-height: var(--leading-text); }

/* Справочник: навигация и открытая подробность, без длинной ленты складок. */
.guide-catalog { display: grid; grid-template-columns: 300px minmax(0, 1fr); border-top: 1px solid var(--border); min-height: 560px; }
.guide-catalog-index { min-width: 0; padding: 20px 16px; border-right: 1px solid var(--border); background: var(--surface-muted); }
.guide-catalog-index .field { font-size: var(--text-sm); }
.guide-feature-list { max-height: 560px; margin-top: 12px; overflow-y: auto; }
.guide-page .guide-feature-button { width: 100%; text-align: left; justify-content: flex-start; padding: 12px; border: 0; background: transparent; color: var(--text-secondary); font-weight: var(--weight-normal); }
.guide-page .guide-feature-button:hover { background: var(--surface-sunken); }
.guide-page .guide-feature-button[aria-pressed="true"] { color: var(--accent); background: var(--accent-subtle); font-weight: var(--weight-strong); }
.guide-feature-detail { min-width: 0; padding: 28px 32px; }
.guide-feature-detail h2 { font-size: 26px; }
.guide-feature-copy, .guide-reference-steps p { max-width: var(--measure); line-height: var(--leading-doc); }
.guide-feature-example { margin-top: 28px; padding: 20px 0 0; border-top: 1px solid var(--border); }
.guide-feature-example h3 { color: var(--accent); font-size: var(--text-sm); }
.guide-feature-example p { max-width: var(--measure); font-family: var(--font-document); font-size: 22px; line-height: var(--leading-text); }
.guide-reference-steps { padding-left: 24px; }
.guide-reference-steps li { margin-bottom: 24px; padding-left: 8px; }
.guide-reference-steps li::marker { color: var(--accent); font-variant-numeric: tabular-nums; }
.guide-reference-steps h3 { margin-bottom: 8px; }
.guide-reference-steps p { color: var(--text-secondary); }

/* Показ остаётся внутри приложения и завершается кнопкой или Escape. */
body:has(.guide-page.is-presenting) :is(.global-header, .setup-alert, .skip-link) { display: none; }
body:has(.guide-page.is-presenting) .workspace-shell { margin: 0; padding: 0; }
body:has(.guide-page.is-presenting) #mainContent { padding: 0; }
.guide-page.is-presenting { max-width: 1440px; padding: 16px 32px; margin: 0 auto; }
.guide-page.is-presenting > .page-header, .guide-page.is-presenting .guide-rail { display: none; }
.guide-page.is-presenting .guide-toolbar { padding-bottom: 14px; }
.guide-page.is-presenting .guide-layout { grid-template-columns: minmax(0, 1fr); min-height: calc(100dvh - 100px); }
.guide-page.is-presenting .guide-slide { padding: 24px 32px; }
.guide-page.is-presenting .guide-slide-columns { grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: 48px; }
.guide-page.is-presenting .guide-slide h2 { font-size: clamp(28px, 3vw, 40px); }
.guide-page.is-presenting .guide-demo { max-width: 640px; }
.guide-page.is-presenting .guide-demo-row strong { font-size: var(--text-base); }
.guide-page.is-presenting .guide-takeaway { margin-top: 24px; }

.projects-page .page-header { flex-wrap: wrap; align-items: center; }
.projects-page .page-heading { flex: 1 1 220px; }
.projects-page .page-header > .review-actions { margin: 0; justify-content: flex-end; flex-wrap: wrap; gap: 8px; }
.projects-page .page-header .button { font-size: var(--text-sm); }

@media (min-width: 901px) and (max-height: 820px) {
  .guide-page.is-presenting .guide-slide { padding: 20px 32px; }
  .guide-page.is-presenting .guide-slide-heading { margin-bottom: 12px; }
  .guide-page.is-presenting .guide-slide h2 { font-size: 32px; margin-bottom: 20px; }
  .guide-page.is-presenting .guide-demo-body { padding: 16px; }
  .guide-page.is-presenting .guide-demo-row { padding: 10px 0; }
  .guide-page.is-presenting .guide-demo-project { padding-bottom: 8px; }
  .guide-page.is-presenting .guide-paper { padding-top: 14px; }
  .guide-page.is-presenting .guide-paper > h3 { margin-bottom: 12px; }
  .guide-page.is-presenting .guide-paper-section { margin-top: 10px; }
  .guide-page.is-presenting .guide-takeaway { margin-top: 20px; padding-top: 16px; }
  .guide-page.is-presenting .guide-footer { padding: 12px 32px; }
}

@media (max-width: 1100px) {
  .guide-layout { grid-template-columns: 192px minmax(0, 1fr); }
  .guide-slide { padding: 24px; }
  .guide-slide-columns { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .guide-demo { max-width: 680px; }
  .guide-points > li { margin-top: 12px; }
  .guide-lead { margin-bottom: 16px; }
  .guide-footer { padding: 16px 24px; flex-wrap: wrap; }
}
@media (max-width: 700px) {
  .guide-toolbar, .guide-page .page-header { gap: 12px; }
  .guide-brand > span { display: none; }
  .guide-layout, .guide-catalog { grid-template-columns: minmax(0, 1fr); }
  .guide-rail { display: flex; gap: 4px; overflow-x: auto; padding: 8px; border-right: 0; border-bottom: 1px solid var(--border); }
  .guide-rail-label { display: none; }
  .guide-page .guide-chapter { width: auto; flex: 0 0 auto; white-space: nowrap; margin: 0; padding: 10px; }
  .guide-slide, .guide-page.is-presenting .guide-slide { padding: 24px 0; }
  .guide-slide h2 { font-size: 28px; }
  .guide-footer { padding: 16px 0; }
  .guide-key-hint { display: none; }
  .guide-demo-row { grid-template-columns: 22px minmax(0, 1fr); }
  .guide-demo-tag { grid-column: 2; justify-self: start; }
  .guide-feature-list { max-height: 240px; }
  .guide-catalog-index { border-right: 0; border-bottom: 1px solid var(--border); }
  .guide-feature-detail { padding: 24px 0; }
  .guide-page.is-presenting { padding: 16px 20px; }
  .guide-page.is-presenting .guide-slide-columns { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .projects-page .page-header > .review-actions { justify-content: flex-start; }
}
