/* ==========================================================================
   AEM Interview Preparation Hub - CSS Architecture
   ==========================================================================
   01. DESIGN TOKENS & THEMES
   02. BASE RESET & ACCESSIBILITY
   03. APP SHELL & SIDEBAR NAVIGATION
   04. TOPBAR & SEARCH HEADER
   05. WELCOME SCREEN & DASHBOARD PANELS
   06. READER LAYOUT & METADATA
   07. MARKDOWN TYPOGRAPHY & HIGHLIGHTING
   08. CODE WRAPPER, BADGES & MERMAID DIAGRAMS
   09. PAGER, ACTIONS & FLOATING TOOLS
   10. RESPONSIVE BREAKPOINTS
       - Wide Desktop (>= 1101px)
       - Tablet & Mobile (<= 1100px)
       - Small Devices (<= 640px)
   11. PRINT MEDIA STYLES
   ========================================================================== */

/* --------------------------------------------------------------------------
   01. DESIGN TOKENS & THEMES
   -------------------------------------------------------------------------- */
:root {
  --ink: #17211f;
  --muted: #68716d;
  --paper: #f5f3ed;
  --line: #d9ddd5;
  --sidebar: #17211f;
  --search-bg: #eeece5;
  --code-bg: #e9e7df;
  --code-text: #a5422d;
  --coral: #e66345;
  --teal: #1d827c;
  --yellow: #f2c95c;
}

[data-theme="dark"] {
  --ink: #edf0e8;
  --muted: #a9b2aa;
  --paper: #111917;
  --line: #35423e;
  --sidebar: #0b1210;
  --search-bg: #243430;
  --code-bg: #243430;
  --code-text: #ffab91;
  --coral: #ff8061;
  --teal: #65c3b5;
  --yellow: #f2c95c;
}

/* --------------------------------------------------------------------------
   02. BASE RESET & ACCESSIBILITY
   -------------------------------------------------------------------------- */
* {
  box-sizing: border-box;
}

:focus-visible {
  outline: 2px solid var(--coral);
  outline-offset: 2px;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Manrope, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  overflow-x: hidden;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 1000;
  padding: 10px 16px;
  background: var(--coral);
  color: #fffefa;
  font: 500 12px "DM Mono", monospace;
  text-decoration: none;
  border-radius: 0 0 4px 4px;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 0;
  outline: 2px solid var(--yellow);
}

.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  z-index: 4;
}

/* --------------------------------------------------------------------------
   03. APP SHELL & SIDEBAR NAVIGATION
   -------------------------------------------------------------------------- */
.app-shell {
  min-height: 100vh;
  display: block;
}

.sidebar {
  background: var(--sidebar);
  color: #f7f5ec;
  padding: 24px 18px 18px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  position: fixed;
  top: 0;
  left: 0;
  width: 260px;
  height: 100vh;
  z-index: 5;
  overflow: hidden;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.brand {
  color: inherit;
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  font-size: 11px;
  line-height: 1.25;
  letter-spacing: 0.08em;
  flex-shrink: 0;
}

.brand b {
  color: var(--yellow);
  font-size: 12px;
  letter-spacing: 0.16em;
}

.brand-mark {
  border: 1px solid var(--yellow);
  color: var(--yellow);
  font: 500 18px "DM Mono", monospace;
  padding: 9px 7px;
}

.sidebar-rule {
  border-top: 1px solid #36403d;
  margin: 16px 0 12px;
  flex-shrink: 0;
}

.sidebar-progress {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  padding: 8px 12px;
  margin-bottom: 12px;
  flex-shrink: 0;
}

.sidebar-progress-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font: 500 10px "DM Mono", monospace;
  color: #94a09b;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
}

.sidebar-progress-label strong {
  color: var(--yellow);
}

.sidebar-progress-bar {
  background: #25332f;
  height: 4px;
  border-radius: 2px;
  overflow: hidden;
}

.sidebar-progress-bar span {
  display: block;
  height: 100%;
  background: var(--coral);
  transition: width 0.3s ease;
}

.eyebrow {
  color: #94a09b;
  font: 500 10px "DM Mono", monospace;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  flex-shrink: 0;
}

.accent {
  color: var(--teal);
}

#document-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1 1 0%;
  min-height: 0;
  overflow-y: auto;
  padding-right: 4px;
  margin-top: 8px;
  margin-bottom: 8px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

#document-nav::-webkit-scrollbar {
  width: 4px;
}

#document-nav::-webkit-scrollbar-track {
  background: transparent;
}

#document-nav::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 2px;
}

#document-nav::-webkit-scrollbar-thumb:hover {
  background: var(--yellow);
}

/* Nav Links */
#document-nav a {
  color: #aab4ae;
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 8px;
  font-size: 12px;
  line-height: 1.35;
  padding: 7px 8px;
  text-decoration: none;
  border-radius: 4px;
  transition: color 0.2s, background 0.2s;
}

#document-nav a span:first-child {
  color: #60706a;
  font: 11px "DM Mono", monospace;
}

#document-nav a:hover,
#document-nav a.active {
  color: #fffefa;
  background: #263430;
}

#document-nav a.active span:first-child {
  color: var(--yellow);
}

/* Footer & Collapse Toggle Button */
.sidebar-footer {
  color: #82918a;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font: 10px "DM Mono", monospace;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}

.sidebar-footer-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sidebar-collapse-toggle {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #b0c0b8;
  font: 700 13px "DM Mono", monospace;
  padding: 4px 10px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.sidebar-collapse-toggle:hover {
  background: var(--yellow);
  color: #121a18;
  border-color: var(--yellow);
}

.status-dot {
  width: 7px;
  height: 7px;
  background: #69b59d;
  border-radius: 50%;
  box-shadow: 0 0 0 4px #29453e;
}

.main-content {
  min-width: 0;
  margin-left: 260px;
  overflow-x: clip;
  transition: margin-left 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Desktop Collapsed Sidebar State */
@media (min-width: 992px) {
  .app-shell.sidebar-collapsed .sidebar {
    width: 64px;
    padding: 16px 8px;
  }

  .app-shell.sidebar-collapsed .main-content {
    margin-left: 64px;
  }

  .app-shell.sidebar-collapsed .sidebar .brand span:not(.brand-mark),
  .app-shell.sidebar-collapsed .sidebar-progress,
  .app-shell.sidebar-collapsed .sidebar .eyebrow,
  .app-shell.sidebar-collapsed .sidebar-footer-info {
    display: none !important;
  }

  .app-shell.sidebar-collapsed .sidebar nav a {
    grid-template-columns: 1fr;
    justify-items: center;
    padding: 8px 4px;
  }

  .app-shell.sidebar-collapsed .sidebar nav a .nav-doc-title {
    display: none;
  }

  .app-shell.sidebar-collapsed .sidebar-footer {
    justify-content: center;
  }
}

/* --------------------------------------------------------------------------
   04. TOPBAR & SEARCH HEADER
   -------------------------------------------------------------------------- */
.topbar {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 16px;
  height: 76px;
  padding: 0 28px;
  position: sticky;
  top: 0;
  background: var(--paper);
  z-index: 3;
}

.breadcrumbs {
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  font: 10px "DM Mono", monospace;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.breadcrumbs b {
  color: var(--coral);
}

.breadcrumbs strong {
  color: var(--ink);
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-box {
  align-items: center;
  background: var(--search-bg);
  color: var(--muted);
  display: flex;
  gap: 8px;
  padding: 9px 12px;
  border-radius: 4px;
  width: min(280px, 35vw);
  transition: width 0.2s ease;
}

.search-box input {
  background: transparent;
  border: 0;
  color: var(--ink);
  font: 12px Manrope, sans-serif;
  min-width: 0;
  outline: 0;
  width: 100%;
}

.search-box input::placeholder {
  color: var(--muted);
  opacity: 1;
}

.search-box kbd {
  border: 1px solid var(--line);
  font: 10px "DM Mono", monospace;
  padding: 2px 5px;
  border-radius: 3px;
}

.theme-button,
.menu-button,
.print-button {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink);
  cursor: pointer;
  font-size: 18px;
  height: 38px;
  width: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: border-color 0.2s, color 0.2s;
}

.theme-button:hover,
.print-button:hover {
  border-color: var(--coral);
  color: var(--coral);
}

.menu-button {
  display: none;
}

/* --------------------------------------------------------------------------
   05. WELCOME SCREEN & DASHBOARD PANELS
   -------------------------------------------------------------------------- */
.welcome {
  align-items: center;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 40px;
  min-height: calc(100vh - 76px);
  padding: 40px 28px 60px;
}

.welcome h1 {
  font-size: clamp(36px, 5.5vw, 84px);
  letter-spacing: -0.065em;
  line-height: 1.02;
  margin: 16px 0 24px;
  max-width: 750px;
}

.welcome h1 em {
  color: var(--coral);
  font-family: Georgia, serif;
  font-weight: 400;
  letter-spacing: -0.08em;
}

.intro {
  color: var(--muted);
  font-size: clamp(14px, 1.5vw, 16px);
  line-height: 1.7;
  max-width: 570px;
}

.start-link {
  color: var(--ink);
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  margin-top: 25px;
  padding-bottom: 8px;
  text-decoration: none;
  border-bottom: 2px solid var(--coral);
}

.start-link span {
  color: var(--coral);
  font-size: 18px;
  margin-left: 8px;
}

.welcome-aside {
  align-items: center;
  background: var(--teal);
  color: #e9f1df;
  display: flex;
  flex-direction: column;
  height: 330px;
  justify-content: center;
  overflow: hidden;
  position: relative;
  text-align: center;
  width: 100%;
  max-width: 330px;
  border-radius: 8px;
  justify-self: center;
}

.welcome-aside p {
  font: 11px "DM Mono", monospace;
  line-height: 1.6;
  margin: 25px 0 0;
  position: relative;
}

.signal {
  border: 1px solid rgba(255, 255, 255, 0.45);
  font: 11px "DM Mono", monospace;
  letter-spacing: 0.18em;
  line-height: 1.8;
  padding: 20px;
  position: relative;
}

.signal strong {
  color: var(--yellow);
  font-size: 30px;
  letter-spacing: -0.05em;
}

.orbit {
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  height: 270px;
  position: absolute;
  width: 270px;
}

.orbit-one {
  transform: translate(45%, -42%);
}

.orbit-two {
  height: 450px;
  transform: translate(-40%, 45%);
  width: 450px;
}

.home-tools {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-column: 1 / -1;
  margin-top: 25px;
}

.index-panel {
  border-top: 2px solid var(--teal);
  display: grid;
  gap: 10px;
  padding-top: 14px;
}

.index-panel strong {
  font-size: 16px;
}

.index-panel a,
.panel-note {
  color: var(--muted);
  font-size: 12px;
  text-decoration: none;
}

.index-panel a:hover {
  color: var(--coral);
}

.index-panel a span {
  color: var(--coral);
  float: right;
}

/* --------------------------------------------------------------------------
   06. READER LAYOUT & METADATA
   -------------------------------------------------------------------------- */
.reader {
  max-width: 1400px;
  margin: 0 auto;
  padding: 36px 28px 80px;
}

.reader-meta {
  color: var(--teal);
  display: flex;
  font: 11px "DM Mono", monospace;
  justify-content: space-between;
  letter-spacing: 0.1em;
  margin-bottom: 25px;
}

.reading-progress {
  background: var(--line);
  height: 3px;
  margin: 0 auto 18px;
  max-width: 1000px;
}

.reading-progress span {
  background: var(--coral);
  display: block;
  height: 100%;
  transition: width 0.15s ease;
  width: 0;
}

.reader-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 auto 25px;
  max-width: 1000px;
}

.reader-actions button {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--muted);
  cursor: pointer;
  font: 11px "DM Mono", monospace;
  padding: 8px 12px;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.reader-actions button:hover,
.reader-actions button.is-complete {
  border-color: var(--teal);
  color: var(--teal);
}

/* While a chapter's content is being fetched, dim the chrome around the
   empty article instead of leaving it looking fully loaded — otherwise the
   action buttons and (empty) TOC render a beat before the actual content. */
.reader.is-loading .reader-actions,
.reader.is-loading .toc,
.reader.is-loading .pager,
.reader.is-loading .reader-meta {
  opacity: 0;
}

.loading-note {
  color: var(--muted);
  font: 12px "DM Mono", monospace;
  letter-spacing: 0.04em;
  padding: 40px 0;
}

/* --------------------------------------------------------------------------
   07. MARKDOWN TYPOGRAPHY & HIGHLIGHTING
   -------------------------------------------------------------------------- */
.markdown-body {
  max-width: 1000px;
  min-width: 0;
  width: 100%;
}

.markdown-body h1 {
  font-size: clamp(28px, 4vw, 56px);
  letter-spacing: -0.05em;
  line-height: 1.08;
  margin: 0 0 32px;
}

.markdown-body h2 {
  border-top: 1px solid var(--line);
  font-size: clamp(20px, 2.5vw, 27px);
  letter-spacing: -0.04em;
  margin: 56px 0 20px;
  padding-top: 20px;
  scroll-margin-top: 84px;
}

.markdown-body h3 {
  font-size: clamp(16px, 2vw, 19px);
  margin: 36px 0 12px;
  scroll-margin-top: 84px;
}

.markdown-body p,
.markdown-body li {
  color: var(--muted);
  font-size: clamp(14px, 1.2vw, 15px);
  line-height: 1.8;
}

.markdown-body ul,
.markdown-body ol {
  padding-left: 22px;
}

.markdown-body blockquote {
  border-left: 3px solid var(--coral);
  color: var(--ink);
  margin: 24px 0;
  padding: 4px 20px;
}

.markdown-body code {
  background: var(--code-bg);
  color: var(--code-text);
  font: 13px "DM Mono", monospace;
  padding: 2px 6px;
  border-radius: 3px;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.markdown-body table {
  border-collapse: collapse;
  display: block;
  margin: 25px 0;
  overflow-x: auto;
  width: 100%;
}

.markdown-body th,
.markdown-body td {
  border-bottom: 1px solid var(--line);
  padding: 12px 15px;
  text-align: left;
}

.markdown-body th {
  color: var(--ink);
  font-size: 12px;
}

.markdown-body td {
  color: var(--muted);
  font-size: 13px;
}

.markdown-body img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
}

/* --------------------------------------------------------------------------
   08. CODE WRAPPER, BADGES & MERMAID DIAGRAMS
   -------------------------------------------------------------------------- */
.code-wrapper {
  position: relative;
  margin: 24px 0;
}

.code-wrapper::before {
  content: attr(data-lang);
  position: absolute;
  top: 8px;
  left: 12px;
  font: 500 10px "DM Mono", monospace;
  color: var(--teal);
  letter-spacing: 0.12em;
  opacity: 0.85;
  pointer-events: none;
  z-index: 1;
}

.markdown-body pre {
  background: #1b2825;
  border-left: 3px solid var(--teal);
  color: #dfe9dc;
  overflow-x: auto;
  padding: 32px 20px 20px;
  position: relative;
  border-radius: 0 4px 4px 0;
  max-width: 100%;
  margin: 0;
}

.markdown-body pre code {
  background: none;
  color: inherit;
  padding: 0;
  white-space: pre;
  overflow-wrap: normal;
}

.copy-button {
  background: #30433e;
  border: 1px solid #52716a;
  color: #dfe9dc;
  cursor: pointer;
  font: 10px "DM Mono", monospace;
  padding: 4px 8px;
  position: absolute;
  right: 10px;
  top: 10px;
  border-radius: 3px;
}

.copy-button:hover {
  color: var(--yellow);
}

.markdown-body pre code .hljs-tag,
.markdown-body pre code .hljs-name,
.markdown-body pre code .hljs-attr {
  color: #ff8061;
}

.markdown-body pre code .hljs-string,
.markdown-body pre code .hljs-built_in {
  color: #f2c95c;
}

.markdown-body pre code .hljs-keyword,
.markdown-body pre code .hljs-title,
.markdown-body pre code .hljs-type {
  color: #65c3b5;
}

.markdown-body .mermaid-block {
  align-items: center;
  background: #1b2825;
  border-left: 3px solid var(--yellow);
  color: #dfe9dc;
  display: flex;
  justify-content: center;
  min-height: 80px;
  overflow-x: auto;
  padding: 22px;
  text-align: center;
  margin: 24px 0;
  border-radius: 0 4px 4px 0;
}

.markdown-body .mermaid-block svg {
  display: block;
  height: auto;
  margin: 0 auto;
  max-width: 100%;
}

.markdown-body .mermaid-block.diagram-fallback {
  display: block;
  text-align: left;
  white-space: pre-wrap;
}

/* --------------------------------------------------------------------------
   09. PAGER, ACTIONS & FLOATING TOOLS
   -------------------------------------------------------------------------- */
.pager,
.static-pager {
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin: 64px auto 0;
  max-width: 1000px;
  padding-top: 20px;
}

.pager a,
.static-pager a {
  color: var(--ink);
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-decoration: none;
}

.pager a.next,
.static-pager a.next {
  text-align: right;
}

.pager small,
.static-pager small {
  color: var(--teal);
  font: 10px "DM Mono", monospace;
}

.pager strong,
.static-pager strong {
  font-size: 13px;
}

.empty-state {
  color: var(--muted);
  padding: 80px 20px;
  text-align: center;
}

/* --------------------------------------------------------------------------
   09B. SITE FOOTER & STANDALONE (NON-SPA) CHAPTER PAGES
   -------------------------------------------------------------------------- */
.site-footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
  font: 12px "DM Mono", monospace;
  margin-top: 64px;
  padding: 24px 28px 40px;
  text-align: center;
}

.site-footer a {
  color: var(--teal);
}

.static-page-header {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  padding: 20px 28px;
}

.static-open-app {
  color: var(--coral);
  font: 12px "DM Mono", monospace;
  text-decoration: none;
}

.static-open-app:hover {
  text-decoration: underline;
}

.static-page-main {
  margin: 0 auto;
  max-width: 1000px;
  padding: 36px 28px 0;
}

.static-breadcrumb {
  color: var(--muted);
  font: 11px "DM Mono", monospace;
  letter-spacing: 0.08em;
  margin-bottom: 20px;
  text-transform: uppercase;
}

.static-breadcrumb a {
  color: var(--teal);
}

.top-button,
.bottom-button {
  align-items: center;
  background: var(--coral);
  border: 0;
  color: #fffefa;
  cursor: pointer;
  display: flex;
  font-size: 20px;
  height: 42px;
  width: 42px;
  justify-content: center;
  position: fixed;
  right: 24px;
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 6;
  transition: transform 0.2s ease, background 0.2s ease;
}

.top-button {
  bottom: 24px;
}

.bottom-button {
  bottom: 76px;
}

.top-button:hover,
.bottom-button:hover {
  background: var(--teal);
  transform: translateY(-2px);
}



/* --------------------------------------------------------------------------
   10. RESPONSIVE BREAKPOINTS
   -------------------------------------------------------------------------- */

/* Wide Desktops (>= 1101px): 2-Column Reader Layout with Sticky TOC */
@media (min-width: 1101px) {
  .reader {
    display: grid;
    gap: 0 32px;
    grid-template-columns: minmax(0, 1fr) clamp(220px, 22vw, 280px);
  }

  .reader-meta,
  .reading-progress,
  .reader-actions,
  .markdown-body,
  .pager {
    grid-column: 1;
    min-width: 0;
  }

  .toc {
    box-sizing: border-box;
    border-left: 2px solid var(--line);
    display: grid;
    gap: 8px;
    grid-column: 2;
    grid-row: 1 / span 5;
    align-self: start;
    margin: 0;
    max-height: calc(100vh - 110px);
    overflow-y: auto;
    padding: 0 0 0 16px;
    position: sticky;
    top: 90px;
    scrollbar-width: none;
  }

  .toc::-webkit-scrollbar {
    display: none;
  }

  .toc span {
    color: var(--teal);
    font: 10px "DM Mono", monospace;
    letter-spacing: 0.1em;
  }

  .toc a {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.45;
    text-decoration: none;
  }

  .toc a:hover,
  .toc a.active {
    color: var(--coral);
    font-weight: 600;
  }

  .toc-h3 {
    padding-left: 12px;
  }
}

/* Tablet & Mobile Screens (<= 1100px) */
@media (max-width: 1100px) {
  .main-content {
    margin-left: 0;
  }

  .sidebar {
    bottom: 0;
    min-height: 0;
    position: fixed;
    top: 0;
    transform: translateX(-100%);
    width: min(260px, 85vw);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .menu-button {
    display: flex;
  }

  .welcome {
    grid-template-columns: 1fr;
    gap: 40px;
    min-height: calc(100vh - 76px);
    padding: 40px 20px;
  }

  .welcome-aside {
    height: 260px;
    max-width: 100%;
  }

  .reader {
    display: block;
    padding: 30px 20px 60px;
  }

  .toc {
    display: none !important;
  }
}

/* Mobile Phones (<= 640px) */
@media (max-width: 640px) {
  .topbar {
    gap: 10px;
    height: 64px;
    padding: 0 16px;
  }

  .breadcrumbs {
    font-size: 9px;
  }

  .search-box {
    width: 38px;
    padding: 8px;
    justify-content: center;
  }

  .search-box input,
  .search-box kbd {
    display: none;
  }

  .search-box:focus-within {
    position: absolute;
    left: 16px;
    right: 16px;
    width: calc(100% - 32px);
    z-index: 10;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  }

  .search-box:focus-within input {
    display: block;
  }

  .welcome {
    padding: 36px 16px;
    gap: 32px;
  }

  .welcome h1 {
    font-size: 34px;
  }

  .home-tools {
    grid-template-columns: 1fr;
  }

  .reader {
    padding: 24px 16px 60px;
  }

  .reader-meta {
    flex-direction: column;
    gap: 4px;
  }

  .pager {
    grid-template-columns: 1fr;
    gap: 16px;
    margin-top: 40px;
  }

  .pager a.next {
    text-align: left;
  }

  .print-button {
    display: none;
  }
}

/* --------------------------------------------------------------------------
   11. PRINT MEDIA STYLES
   -------------------------------------------------------------------------- */
@media print {

  .sidebar,
  .topbar,
  .toc,
  .reader-meta,
  .reader-actions,
  .reading-progress,
  .pager,
  .top-button,
  .bottom-button,
  .sidebar-overlay {
    display: none !important;
  }

  .main-content {
    margin-left: 0;
  }

  .reader {
    max-width: none;
    padding: 0;
  }

  .markdown-body {
    max-width: none;
  }

  .markdown-body pre {
    break-inside: avoid;
  }
}