/* Knowledge base layout and navigation for the AI case directory. */
:root {
  --knowledge-line: #e8e9eb;
  --faint: #787d84;
}
html { scroll-behavior: smooth; scroll-padding-top: 24px; }
.ai-gallery .sidebar > nav { overflow-y: auto; min-height: 0; }
.ai-gallery .sidebar .nav-link, .mobile-menu .nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  margin: 5px 0;
  padding: 10px 13px;
  border-radius: 6px;
  color: #656a70;
  font-size: 14px;
  line-height: 1.6;
}
.ai-gallery .nav-link:hover { background: #fafafa; color: var(--ink); }
.ai-gallery .nav-link[aria-current] { background: #eceef4; color: var(--accent); }
.ai-gallery .side-label, .ai-gallery .signature { color: var(--faint); }
.ai-gallery .page { max-width: 1152px; padding: 38px 64px 22px; }
.topbar, .section-label, .site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.topbar { min-height: 30px; font-size: 12px; color: var(--faint); }
.top-note { font-size: 11px; letter-spacing: .08em; }
.home-content { max-width: 840px; margin: auto; }
.ai-gallery .page-heading { display: block; margin: 0; padding: 55px 0 40px; }
.intro { margin-top: 14px; font-size: 15px; line-height: 1.9; color: var(--muted); }
.section-label { margin: 0 0 10px; }
.section-label h2 { font-size: 13px; font-weight: 600; }
.section-label span { color: var(--faint); font-size: 11px; }
.ai-gallery .case-card { scroll-margin-top: 0; }
.site-footer {
  margin-top: 38px;
  padding-top: 18px;
  border-top: 1px solid var(--knowledge-line);
  color: var(--faint);
  font-size: 11px;
}
.site-footer a:hover { color: var(--ink); }
@media (min-width: 1550px) {
  .ai-gallery .page { padding-top: 46px; }
  .ai-gallery .page-heading { padding-top: 68px; }
}
@media (max-width: 1180px) {
  .ai-gallery .page { padding-inline: 40px; }
  .ai-gallery .sidebar .nav-link { gap: 10px; font-size: 13px; }
}
@media (max-width: 960px) {
  .ai-gallery .page-heading h1 { font-size: 32px; }
  .top-note { display: none; }
}
@media (max-width: 720px) {
  html { scroll-padding-top: 90px; }
  .ai-gallery .mobile-head { display: block; padding: 0; z-index: 5; }
  .mobile-bar {
    min-height: 65px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 22px;
  }
  .mobile-menu summary {
    display: flex;
    align-items: center;
    list-style: none;
    gap: 7px;
    padding: 10px 0 10px 12px;
    color: var(--muted);
    font-size: 12px;
    cursor: pointer;
  }
  .mobile-menu summary::-webkit-details-marker { display: none; }
  .mobile-menu summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
  .mobile-menu nav {
    position: absolute;
    inset: 65px 0 auto;
    max-height: calc(100dvh - 65px);
    overflow-y: auto;
    padding: 13px 20px 18px;
    border-bottom: 1px solid var(--knowledge-line);
    box-shadow: 0 12px 22px #20212406;
    background: #fff;
  }
  .ai-gallery .mobile-menu .nav-link { gap: 12px; min-height: 44px; padding: 10px 13px; font-size: 14px; }
  .ai-gallery .page { padding: 24px 24px 22px; }
  .topbar { min-height: 20px; font-size: 11px; }
  .ai-gallery .page-heading { padding: 35px 0 30px; }
  .ai-gallery .page-heading h1 { font-size: 29px; }
  .intro { margin-top: 12px; font-size: 14px; }
  .site-footer { margin-top: 27px; font-size: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
