/* Portal presentation only. Chapter selection, language and exercise data stay intact. */
/* Keep the overview aligned when a shorter exercise list no longer needs scrolling. */
html { scrollbar-gutter: stable; }
@supports not (scrollbar-gutter: stable) {
  html { overflow-y: scroll; }
}
.book-portal .wrap { max-width: 960px; }
.book-portal h1 { font-size: clamp(1.8rem,4.6vw,2.65rem); }
.book-portal .book-kicker { font-size: .75rem; }
.book-portal .settings-disclosure { margin-top: 24px; }
.book-portal .settings-disclosure summary { list-style: none; }
.book-portal .settings-summary-title { font-size: 1rem; }
.book-portal .settings-summary-text { font-size: .875rem; }
.book-portal .settings { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; margin: 0; }
.book-portal .setting-card { padding: 0; border: 0; background: transparent; }
.book-portal .setting-card label { font-size: .875rem; margin-bottom: 8px; }
.book-portal select { width: 100%; }
.book-portal .language-select { width: auto; }
.book-portal .prompt { margin-top: 30px; font-size: 1.25rem; }
.book-portal .prompt-sub { margin-top: 5px; font-size: .875rem; }
.book-portal .portal-card { margin-top: 20px; border: 0; border-radius: 0; background: transparent; overflow: visible; }
.book-portal .chapter-head { padding: 18px 20px; border: 0; border-left: 4px solid var(--accent); background: var(--accent-wash); }
.book-portal .chapter-kicker { margin-bottom: 7px; font-size: .75rem; letter-spacing: .08em; color: var(--accent-dark); }
.book-portal .chapter-title { font-size: 1.4rem; line-height: 1.2; }
.book-portal .chapter-dot { display: none; }
.book-portal .section { padding: 22px 0 0; }
.book-portal .section-title { margin: 0 0 13px; font-size: .875rem; color: var(--muted); }
.book-portal .exercise-list { gap: 0; }
.book-portal .exercise-row { grid-template-columns: 36px minmax(0,1fr) auto; gap: 16px; padding: 17px 0; border: 0; border-top: 1px solid var(--line); border-radius: 0; background: transparent; }
.book-portal .exercise-row:last-child { border-bottom: 1px solid var(--line); }
.book-portal .exercise-num { width: 34px; height: 34px; border: 1px solid var(--accent-line); border-radius: 3px; background: var(--accent-wash); color: var(--accent-dark); font-size: .875rem; }
.book-portal .exercise-title { font-size: 1rem; line-height: 1.4; font-weight: 750; }
.book-portal .exercise-meta { margin-top: 4px; font-size: .875rem; line-height: 1.4; }
.book-portal .open-btn { min-height: 44px; padding: 10px 15px; border: 1px solid var(--accent-dark); border-radius: 4px; background: var(--accent-dark); color: #fff; font-size: .875rem; line-height: 1.4; font-weight: 750; }
.book-portal .open-btn:hover { opacity: 1; filter: brightness(.92); }
.book-portal .combo-section { margin: 26px 0 0; padding: 20px; border: 0; border-left: 4px solid var(--orange); border-radius: 0; background: #fff4e8; }
.book-portal .combo-section .section-title { color: #87500e; font-size: .875rem; margin-bottom: 8px; }
.book-portal .combo-intro { font-size: .875rem; margin-bottom: 15px; }
.book-portal .combo-section .exercise-row { border-color: #e8d7c2; }
.book-portal .combo-section .exercise-num { background: #fff; border-color: #e8d7c2; color: #87500e; }
.book-portal .footnote { margin-top: 24px; font-size: .875rem; line-height: 1.5; }
.book-portal .settings-summary-left { flex-wrap: wrap; row-gap: 4px; }
.book-portal .settings-summary-text { white-space: normal; overflow: visible; }
.book-portal .title-row { gap: 16px; }
.book-portal :is(select,.open-btn,summary) { -webkit-tap-highlight-color: transparent; }
@media (max-width: 700px) {
  .book-portal .settings { grid-template-columns: 1fr; margin: 0; }
  .book-portal .exercise-row { grid-template-columns: 34px minmax(0,1fr); gap: 8px 12px; }
  .book-portal .open-btn { grid-column: 2; justify-self: start; }
  .book-portal .chapter-head { padding: 16px; }
  .book-portal .combo-section { padding: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .book-portal * { transition: none; }
}
