/*
 * ==========================================================================
 * REFINED TECHNICAL EDITORIAL
 * A bold, professional theme for a data engineering blog
 * ==========================================================================
 *
 * Design Philosophy:
 * - Clean, sophisticated typography with excellent readability
 * - Azure-inspired accent colors (fitting for Microsoft/data content)
 * - Subtle depth through shadows and refined spacing
 * - Purposeful micro-interactions that don't distract
 * - Content-first approach with professional polish
 */

/* ==========================================================================
   CSS CUSTOM PROPERTIES
   ========================================================================== */

:root {
  /* Primary Palette - Light Mode */
  --bg-primary: #FAFAF9;
  --bg-elevated: #FFFFFF;
  --bg-inset: #F5F5F4;
  --bg-subtle: #F0F0EF;

  --text-primary: #1C1917;
  --text-secondary: #44403C;
  --text-muted: #78716C;
  --text-faint: #A8A29E;

  --border-default: #E7E5E4;
  --border-subtle: #F0F0EF;
  --border-strong: #D6D3D1;

  /* Accent - Azure-inspired blue that fits data/Microsoft theme */
  --accent-primary: #0369A1;
  --accent-hover: #0284C7;
  --accent-light: #E0F2FE;
  --accent-faint: rgba(3, 105, 161, 0.08);
  --accent-glow: rgba(3, 105, 161, 0.15);

  /* Secondary - Warm amber for highlights */
  --secondary-primary: #B45309;
  --secondary-light: #FEF3C7;
  --secondary-faint: rgba(180, 83, 9, 0.08);

  /* Code Blocks */
  --code-bg: #1E293B;
  --code-text: #E2E8F0;
  --code-border: rgba(255, 255, 255, 0.08);
  --inline-code-bg: #FEF3C7;
  --inline-code-text: #92400E;

  /* Sidebar */
  --sidebar-bg: #0F172A;
  --sidebar-text: rgba(255, 255, 255, 0.85);
  --sidebar-text-muted: rgba(255, 255, 255, 0.5);
  --sidebar-accent: #38BDF8;
  --sidebar-border: rgba(255, 255, 255, 0.08);

  /* Typography */
  --font-display: 'Outfit', 'PT Sans', system-ui, -apple-system, sans-serif;
  --font-body: 'Source Serif 4', 'PT Serif', Georgia, 'Times New Roman', serif;
  --font-ui: 'Outfit', 'PT Sans', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'SF Mono', Menlo, monospace;

  /* Spacing Scale */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

  /* Transitions */
  --ease-out: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.6, 1);
  --duration-fast: 150ms;
  --duration-base: 250ms;
  --duration-slow: 350ms;

  /* Border Radius */
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 10px;
  --radius-xl: 14px;
  --radius-full: 9999px;
}

/* ==========================================================================
   DARK MODE
   ========================================================================== */

@media (prefers-color-scheme: dark) {
  :root {
    --bg-primary: #0C0A09;
    --bg-elevated: #1C1917;
    --bg-inset: #171412;
    --bg-subtle: #1C1917;

    --text-primary: #FAFAF9;
    --text-secondary: #D6D3D1;
    --text-muted: #A8A29E;
    --text-faint: #78716C;

    --border-default: #292524;
    --border-subtle: #1C1917;
    --border-strong: #44403C;

    --accent-primary: #38BDF8;
    --accent-hover: #7DD3FC;
    --accent-light: rgba(56, 189, 248, 0.12);
    --accent-faint: rgba(56, 189, 248, 0.06);
    --accent-glow: rgba(56, 189, 248, 0.2);

    --secondary-primary: #FBBF24;
    --secondary-light: rgba(251, 191, 36, 0.12);
    --secondary-faint: rgba(251, 191, 36, 0.06);

    --code-bg: #0F172A;
    --code-text: #E2E8F0;
    --code-border: rgba(255, 255, 255, 0.06);
    --inline-code-bg: rgba(56, 189, 248, 0.12);
    --inline-code-text: #7DD3FC;

    --sidebar-bg: #030712;
    --sidebar-accent: #38BDF8;

    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.2);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3), 0 1px 2px rgba(0, 0, 0, 0.15);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.35), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -2px rgba(0, 0, 0, 0.25);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 10px 10px -5px rgba(0, 0, 0, 0.3);
  }
}

/* ==========================================================================
   BASE RESETS & FOUNDATIONS
   ========================================================================== */

html {
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  color: var(--text-primary);
  background-color: var(--bg-primary);
  transition: background-color var(--duration-base) var(--ease-out),
              color var(--duration-base) var(--ease-out);
}

/* Selection styling */
::selection {
  background: var(--accent-primary);
  color: white;
}

::-moz-selection {
  background: var(--accent-primary);
  color: white;
}

/* ==========================================================================
   TYPOGRAPHY
   ========================================================================== */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.025em;
  line-height: 1.2;
}

h1 {
  font-size: 2.25rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

h2 {
  font-size: 1.625rem;
  margin-top: var(--space-10);
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-3);
  border-bottom: 2px solid var(--border-default);
}

h3 {
  font-size: 1.375rem;
  margin-top: var(--space-8);
  margin-bottom: var(--space-3);
}

h4 {
  font-size: 1.125rem;
  margin-top: var(--space-6);
  margin-bottom: var(--space-2);
}

p {
  line-height: 1.75;
  margin-bottom: var(--space-5);
  color: var(--text-secondary);
}

strong {
  font-weight: 600;
  color: var(--text-primary);
}

/* Lead paragraphs */
.lead {
  font-size: 1.2rem;
  line-height: 1.65;
  color: var(--text-secondary);
  font-weight: 400;
}

/* ==========================================================================
   LINKS
   ========================================================================== */

a {
  color: var(--accent-primary);
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-out);
}

a:hover,
a:focus {
  color: var(--accent-hover);
}

/* Content links with animated underline */
.post a:not(.pagination-item),
.page a:not(.pagination-item) {
  position: relative;
  text-decoration: none;
}

.post a:not(.pagination-item)::after,
.page a:not(.pagination-item)::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 0;
  height: 1.5px;
  background: var(--accent-primary);
  transition: width var(--duration-base) var(--ease-out);
}

.post a:not(.pagination-item):hover::after,
.page a:not(.pagination-item):hover::after {
  width: 100%;
}

/* Override theme color link styles */
.theme-base-08 .container a,
.theme-base-09 .container a,
.theme-base-0a .container a,
.theme-base-0b .container a,
.theme-base-0c .container a,
.theme-base-0d .container a,
.theme-base-0e .container a,
.theme-base-0f .container a {
  color: var(--accent-primary);
}

/* ==========================================================================
   MASTHEAD
   ========================================================================== */

.masthead {
  padding: var(--space-6) 0;
  margin-bottom: var(--space-10);
  border-bottom: 1px solid var(--border-default);
  background: linear-gradient(180deg, var(--bg-elevated) 0%, var(--bg-primary) 100%);
}

.masthead-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: -0.02em;
  margin: 0;
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: var(--space-3);
}

.masthead-title a {
  color: var(--text-primary);
  transition: color var(--duration-fast) var(--ease-out);
}

.masthead-title a:hover {
  color: var(--accent-primary);
}

.masthead-title small {
  font-family: var(--font-ui);
  font-weight: 400;
  font-size: 0.875rem;
  color: var(--text-muted);
  letter-spacing: 0;
}

@media (max-width: 48em) {
  .masthead-title {
    font-size: 1.25rem;
    text-align: center;
    justify-content: center;
  }

  .masthead-title small {
    display: none;
  }
}

/* ==========================================================================
   POSTS & PAGES
   ========================================================================== */

.post,
.page {
  margin-bottom: var(--space-16);
}

.post-title,
.page-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 2rem;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: var(--space-2);
}

.post-title a {
  color: var(--text-primary);
  transition: color var(--duration-fast) var(--ease-out);
}

.post-title a:hover {
  color: var(--accent-primary);
}

/* Post date with accent line */
.post-date {
  font-family: var(--font-ui);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: var(--space-2);
  margin-bottom: var(--space-6);
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.post-date::before {
  content: '';
  display: block;
  width: 28px;
  height: 2px;
  background: var(--accent-primary);
  border-radius: var(--radius-full);
}

/* Better paragraph spacing */
.post p,
.page p {
  margin-bottom: var(--space-5);
}

@media (max-width: 48em) {
  .post-title,
  .page-title {
    font-size: 1.5rem;
  }
}

/* ==========================================================================
   CODE BLOCKS
   ========================================================================== */

code,
pre {
  font-family: var(--font-mono);
  font-feature-settings: 'liga' 1, 'calt' 1;
}

/* Inline code */
code {
  font-size: 0.875em;
  font-weight: 500;
  padding: 0.15em 0.4em;
  background: var(--inline-code-bg);
  color: var(--inline-code-text);
  border-radius: var(--radius-sm);
}

/* Code blocks */
pre {
  background: var(--code-bg);
  color: var(--code-text);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  margin: var(--space-6) 0;
  overflow-x: auto;
  font-size: 0.875rem;
  line-height: 1.65;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--code-border);
  position: relative;
}

/* Reset inline code inside pre */
pre code {
  padding: 0;
  background: transparent;
  color: inherit;
  border-radius: 0;
  font-size: inherit;
  font-weight: normal;
}

/* Custom scrollbar for code */
pre::-webkit-scrollbar {
  height: 8px;
}

pre::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--radius-sm);
}

pre::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-sm);
}

pre::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Highlight wrapper */
.highlight {
  margin: var(--space-6) 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.highlight pre {
  margin: 0;
  border-radius: var(--radius-lg);
}

/* ==========================================================================
   MERMAID DIAGRAMS
   ========================================================================== */

pre.mermaid {
  background: var(--bg-subtle);
  border: 1px solid var(--border-default);
  box-shadow: none;
  padding: var(--space-6) var(--space-4);
  text-align: center;
  overflow-x: auto;
}

@media (prefers-color-scheme: dark) {
  pre.mermaid {
    background: var(--bg-inset);
    border-color: var(--border-subtle);
  }
}

/* ==========================================================================
   BLOCKQUOTES
   ========================================================================== */

blockquote {
  position: relative;
  margin: var(--space-8) 0;
  padding: var(--space-5) var(--space-6);
  background: var(--bg-elevated);
  border-left: 4px solid var(--accent-primary);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-style: italic;
  color: var(--text-secondary);
  box-shadow: var(--shadow-sm);
}

blockquote::before {
  content: '"';
  position: absolute;
  top: -8px;
  left: 16px;
  font-family: var(--font-display);
  font-size: 3.5rem;
  font-weight: 700;
  font-style: normal;
  color: var(--accent-primary);
  opacity: 0.12;
  line-height: 1;
}

blockquote p {
  color: var(--text-secondary);
}

blockquote p:last-child {
  margin-bottom: 0;
}

/* ==========================================================================
   TABLES
   ========================================================================== */

table {
  width: 100%;
  margin: var(--space-6) 0;
  border-collapse: separate;
  border-spacing: 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-default);
  font-size: 0.9375rem;
}

th,
td {
  padding: var(--space-3) var(--space-4);
  text-align: left;
  border: none;
  border-bottom: 1px solid var(--border-default);
}

th {
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: var(--bg-subtle);
  color: var(--text-muted);
}

td {
  background: var(--bg-elevated);
}

tbody tr:last-child td {
  border-bottom: none;
}

tbody tr:nth-child(odd) td {
  background: var(--bg-primary);
}

tbody tr:hover td {
  background: var(--accent-faint);
}

@media (max-width: 48em) {
  table {
    font-size: 0.8125rem;
  }

  th, td {
    padding: var(--space-2) var(--space-3);
  }
}

/* ==========================================================================
   LISTS
   ========================================================================== */

ul, ol {
  padding-left: var(--space-6);
  margin-bottom: var(--space-5);
}

li {
  margin-bottom: var(--space-2);
  line-height: 1.7;
  color: var(--text-secondary);
}

li::marker {
  color: var(--accent-primary);
}

li > ul,
li > ol {
  margin-top: var(--space-2);
  margin-bottom: 0;
}

/* ==========================================================================
   HORIZONTAL RULE
   ========================================================================== */

hr {
  border: none;
  height: 2px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    var(--border-default) 15%,
    var(--border-default) 85%,
    transparent 100%
  );
  margin: var(--space-10) 0;
}

/* ==========================================================================
   IMAGES
   ========================================================================== */

img {
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  transition: transform var(--duration-base) var(--ease-out),
              box-shadow var(--duration-base) var(--ease-out);
}

img:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* ==========================================================================
   SIDEBAR
   ========================================================================== */

.sidebar {
  background: var(--sidebar-bg);
  font-family: var(--font-ui);
  border-right: 1px solid var(--sidebar-border);
}

/* Gradient accent at top */
.sidebar::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 180px;
  background: linear-gradient(
    180deg,
    rgba(56, 189, 248, 0.08) 0%,
    transparent 100%
  );
  pointer-events: none;
}

.sidebar a {
  color: var(--sidebar-text);
  transition: color var(--duration-fast) var(--ease-out);
}

.sidebar a:hover {
  color: var(--sidebar-accent);
}

.sidebar-item {
  padding: var(--space-5);
}

.sidebar-item p {
  color: var(--sidebar-text-muted);
  font-size: 0.875rem;
  line-height: 1.6;
  margin-bottom: var(--space-2);
}

.sidebar-item p:last-child {
  margin-bottom: 0;
}

/* Profile image */
.sidebar-logo {
  padding: var(--space-6);
  text-align: center;
}

.sidebar-logo img {
  width: 110px;
  height: 110px;
  border-radius: var(--radius-full);
  margin: 0 auto;
  display: block;
  border: 3px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 30px rgba(56, 189, 248, 0.15),
              0 4px 12px rgba(0, 0, 0, 0.3);
  transition: transform var(--duration-base) var(--ease-out),
              box-shadow var(--duration-base) var(--ease-out),
              border-color var(--duration-base) var(--ease-out);
}

.sidebar-logo img:hover {
  transform: scale(1.05);
  border-color: var(--sidebar-accent);
  box-shadow: 0 0 40px rgba(56, 189, 248, 0.3),
              0 8px 20px rgba(0, 0, 0, 0.4);
}

/* Social icons */
#contact-list {
  padding: var(--space-4);
}

#contact-list a {
  display: inline-block;
  margin: 0 var(--space-1);
}

#contact-list .fa-stack {
  transition: transform var(--duration-fast) var(--ease-out);
}

#contact-list a:hover .fa-stack {
  transform: translateY(-3px);
}

#contact-list .fa-stack-2x {
  color: rgba(255, 255, 255, 0.08);
  transition: color var(--duration-fast) var(--ease-out);
}

#contact-list a:hover .fa-stack-2x {
  color: var(--sidebar-accent);
}

#contact-list .fa-stack-1x {
  color: var(--sidebar-text);
  transition: color var(--duration-fast) var(--ease-out);
}

#contact-list a:hover .fa-stack-1x {
  color: var(--sidebar-bg);
}

/* Sidebar navigation */
.sidebar-nav {
  border-bottom: 1px solid var(--sidebar-border);
}

.sidebar-nav-item {
  padding: var(--space-4) var(--space-5);
  border-top: 1px solid var(--sidebar-border);
  font-weight: 500;
  font-size: 0.9375rem;
  letter-spacing: 0.01em;
  transition: all var(--duration-fast) var(--ease-out);
  position: relative;
}

.sidebar-nav-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--sidebar-accent);
  transform: scaleY(0);
  transition: transform var(--duration-fast) var(--ease-out);
}

.sidebar-nav-item.active,
a.sidebar-nav-item:hover,
a.sidebar-nav-item:focus {
  background: rgba(255, 255, 255, 0.04);
  color: var(--sidebar-accent);
  text-decoration: none;
}

.sidebar-nav-item.active::before,
a.sidebar-nav-item:hover::before {
  transform: scaleY(1);
}

/* ==========================================================================
   SIDEBAR TOGGLE
   ========================================================================== */

.sidebar-toggle {
  position: fixed !important;
  top: 0.75rem;
  left: 1rem;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
}

.sidebar-toggle:hover {
  background: var(--bg-subtle);
  border-color: var(--accent-primary);
  box-shadow: var(--shadow-lg);
}

.sidebar-toggle::before {
  width: 20px;
  height: 20px;
  background-size: contain;
  opacity: 0.7;
  transition: opacity var(--duration-fast) var(--ease-out);
}

.sidebar-toggle:hover::before {
  opacity: 1;
}

@media (prefers-color-scheme: dark) {
  .sidebar-toggle {
    background: var(--bg-elevated);
    border-color: var(--border-default);
  }

  .sidebar-toggle::before {
    filter: invert(1);
  }

  .sidebar-toggle:hover {
    background: var(--bg-subtle);
    border-color: var(--accent-primary);
  }
}

.sidebar-toggle:active,
#sidebar-checkbox:checked ~ .sidebar-toggle {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
}

#sidebar-checkbox:checked ~ .sidebar-toggle::before {
  filter: invert(1);
}

/* ==========================================================================
   ALWAYS-VISIBLE SIDEBAR (Desktop)
   ========================================================================== */

@media (min-width: 56em) {
  /* Show sidebar permanently on desktop */
  .sidebar {
    left: 0;
    visibility: visible;
    transform: translateX(0);
  }

  /* Offset content to account for sidebar */
  .wrap {
    margin-left: 14rem;
  }

  /* Hide the toggle button on desktop */
  .sidebar-toggle {
    display: none;
  }

  /* Ensure sidebar checkbox doesn't affect layout on desktop */
  #sidebar-checkbox:checked ~ .sidebar,
  #sidebar-checkbox:checked ~ .wrap,
  #sidebar-checkbox:checked ~ .sidebar-toggle {
    transform: translateX(0);
  }

  #sidebar-checkbox:checked ~ .wrap {
    margin-left: 14rem;
  }
}

/* Medium screens - still use toggle but adjust */
@media (min-width: 48em) and (max-width: 55.99em) {
  .sidebar-toggle {
    left: 1rem;
  }
}

/* ==========================================================================
   PAGINATION
   ========================================================================== */

.pagination {
  font-family: var(--font-ui);
  margin: var(--space-10) 0;
}

.pagination-item {
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  padding: var(--space-4) var(--space-5);
  font-weight: 500;
  font-size: 0.9375rem;
  transition: all var(--duration-fast) var(--ease-out);
}

a.pagination-item:hover {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: white;
  text-decoration: none;
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

@media (min-width: 30em) {
  .pagination-item:first-child {
    border-radius: var(--radius-md) 0 0 var(--radius-md);
  }

  .pagination-item:last-child {
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
  }
}

/* ==========================================================================
   RELATED POSTS
   ========================================================================== */

.related {
  padding: var(--space-8) 0;
  border-top: 2px solid var(--border-default);
}

.related-posts {
  padding-left: 0;
  list-style: none;
}

.related-posts h3 {
  font-family: var(--font-display);
  font-size: 1.125rem;
  margin-top: 0;
}

.related-posts li {
  margin-bottom: var(--space-4);
}

.related-posts li small {
  color: var(--text-muted);
  font-family: var(--font-ui);
}

.related-posts li a:hover small {
  color: var(--accent-primary);
}

/* ==========================================================================
   MESSAGE / ALERT BOXES
   ========================================================================== */

.message {
  background: var(--accent-faint);
  border-left: 4px solid var(--accent-primary);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: var(--space-4) var(--space-5);
  color: var(--text-primary);
  margin-bottom: var(--space-5);
}

/* ==========================================================================
   POST FOOTER
   ========================================================================== */

.post-footer {
  margin-top: var(--space-10);
  padding-top: var(--space-6);
  border-top: 1px solid var(--border-default);
  font-size: 0.9375rem;
  color: var(--text-muted);
}

/* ==========================================================================
   CONTAINER ADJUSTMENTS
   ========================================================================== */

.container {
  max-width: 42rem;
  padding-left: var(--space-5);
  padding-right: var(--space-5);
}

@media (min-width: 56em) {
  .container {
    max-width: 46rem;
  }
}

/* ==========================================================================
   FOCUS STYLES (Accessibility)
   ========================================================================== */

:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 3px;
}

a:focus:not(:focus-visible) {
  outline: none;
}

/* ==========================================================================
   RESPONSIVE ADJUSTMENTS
   ========================================================================== */

@media (max-width: 48em) {
  :root {
    --space-6: 1.25rem;
    --space-8: 1.5rem;
    --space-10: 2rem;
  }

  pre {
    font-size: 0.8125rem;
    padding: var(--space-4);
    border-radius: var(--radius-md);
    margin-left: calc(-1 * var(--space-4));
    margin-right: calc(-1 * var(--space-4));
    border-radius: 0;
  }

  .highlight {
    margin-left: calc(-1 * var(--space-4));
    margin-right: calc(-1 * var(--space-4));
    border-radius: 0;
  }

  .highlight pre {
    border-radius: 0;
  }
}

/* ==========================================================================
   PRINT STYLES
   ========================================================================== */

@media print {
  .sidebar,
  .sidebar-toggle,
  .pagination {
    display: none !important;
  }

  body {
    background: white;
    color: black;
  }

  a {
    color: black;
    text-decoration: underline;
  }

  pre {
    box-shadow: none;
    border: 1px solid #ddd;
    background: #f5f5f5;
  }

  img {
    box-shadow: none;
  }
}
