/* Zauto External Developer Docs styles - Premium Light/Dark */
:root{
  /* Light theme (default) */
  --text:#1e293b;         /* slate-800 */
  --text-strong:#0f172a;  /* slate-900 */
  --muted:#64748b;        /* slate-500 */
  --muted-light:#94a3b8;  /* slate-400 */
  --bg:#fafafa;           /* neutral-50 */
  --surface:#ffffff;      /* white */
  --surface-2:#f8fafc;    /* slate-50 */
  --surface-3:#f1f5f9;    /* slate-100 */
  --border:#e2e8f0;       /* slate-200 */
  --border-light:#f1f5f9; /* slate-100 */
  --elev-1:0 1px 3px rgba(0,0,0,.05),0 1px 2px rgba(0,0,0,.1);
  --elev-2:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -1px rgba(0,0,0,.06);
  --elev-3:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -2px rgba(0,0,0,.05);
  --brand:#3b82f6;        /* blue-500 */
  --brand-600:#2563eb;    /* blue-600 */
  --brand-700:#1d4ed8;    /* blue-700 */
  --brand-50:#eff6ff;     /* blue-50 */
  --brand-100:#dbeafe;    /* blue-100 */
  --brand-200:#bfdbfe;    /* blue-200 */
  --ok:#10b981;           /* emerald-500 */
  --warn:#f59e0b;         /* amber-500 */
  --err:#ef4444;          /* red-500 */
  --code-bg:#0f172a;      /* slate-900 */
  --code-text:#e2e8f0;    /* slate-200 */
  --search-focus:#3b82f6; /* blue-500 */
}

/* Dark theme tokens */
.theme-dark{
  --text:#e2e8f0;         /* slate-200 */
  --text-strong:#f8fafc;  /* slate-50 */
  --muted:#94a3b8;        /* slate-400 */
  --muted-light:#cbd5e1;  /* slate-300 */
  --bg:#0f172a;           /* slate-900 */
  --surface:#1e293b;      /* slate-800 */
  --surface-2:#334155;    /* slate-700 */
  --surface-3:#475569;    /* slate-600 */
  --border:#334155;       /* slate-700 */
  --border-light:#475569; /* slate-600 */
  --elev-1:0 1px 3px rgba(0,0,0,.3),0 1px 2px rgba(0,0,0,.4);
  --elev-2:0 4px 6px -1px rgba(0,0,0,.4),0 2px 4px -1px rgba(0,0,0,.3);
  --elev-3:0 10px 15px -3px rgba(0,0,0,.5),0 4px 6px -2px rgba(0,0,0,.4);
  --brand:#60a5fa;        /* blue-400 */
  --brand-600:#3b82f6;    /* blue-500 */
  --brand-700:#2563eb;    /* blue-600 */
  --brand-50:#1e293b;     /* slate-800 */
  --brand-100:#334155;    /* slate-700 */
  --brand-200:#475569;    /* slate-600 */
  --ok:#34d399;           /* emerald-400 */
  --warn:#fbbf24;         /* amber-400 */
  --err:#f87171;          /* red-400 */
  --code-bg:#0f172a;      /* slate-900 */
  --code-text:#e2e8f0;    /* slate-200 */
  --search-focus:#60a5fa; /* blue-400 */
}

/* Enhanced touch interactions for mobile */
@media (hover: none) and (pointer: coarse) {
  /* Touch device optimizations */
  button, .tab, a, [role="button"] {
    -webkit-tap-highlight-color: rgba(59, 130, 246, 0.2);
    tap-highlight-color: rgba(59, 130, 246, 0.2);
  }
  
  /* Larger touch targets */
  button, .tab, .toc a {
    min-height: 44px;
    min-width: 44px;
  }
  
  /* Smooth scrolling for touch */
  * {
    -webkit-overflow-scrolling: touch;
  }
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font:16px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color:var(--text);
  background:var(--bg);
  padding-top:72px; /* Fixed header height */
}

.container{max-width:1200px;margin:0 auto;padding:0 1rem}

.site-header{
  position:fixed;
  top:0;
  left:0;
  right:0;
  z-index:100;
  background:rgba(255,255,255,0.8);
  backdrop-filter:saturate(180%) blur(20px);
  border-bottom:1px solid var(--border);
  box-shadow:var(--elev-1);
}

.theme-dark .site-header{
  background:rgba(30,41,59,0.9);
  backdrop-filter:saturate(180%) blur(20px);
}

.site-header .container{padding:.75rem 1rem}
.site-header .bar{display:grid;grid-template-columns:auto 1fr auto;gap:1rem;align-items:center}

.site-header .brand {
  display: flex;
  align-items: center;
}

.logo-section {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo {
  height: 40px;
  width: auto;
  object-fit: contain;
  transition: transform 0.2s ease;
  border-radius: 4px;
}

.logo:hover {
  transform: scale(1.05);
}

.brand-text h1 {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-strong);
  line-height: 1.2;
}

.brand-text .subtitle {
  margin: 0.1rem 0 0;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 400;
  line-height: 1.2;
}

.search-wrapper{position:relative}
.search-wrapper input{
  width:100%;
  padding:.65rem 1rem .65rem 2.5rem;
  border:1px solid var(--border);
  border-radius:.75rem;
  background:var(--surface);
  color:var(--text);
  font-size:.9rem;
  transition:all .2s ease;
}
.search-wrapper input:focus{
  outline:none;
  border-color:var(--search-focus);
  box-shadow:0 0 0 3px rgba(59,130,246,0.1);
}
.search-icon{
  position:absolute;
  left:.75rem;
  top:50%;
  transform:translateY(-50%);
  color:var(--muted);
  font-size:.9rem;
  display: flex;
  align-items: center;
}

.search-icon svg {
  width: 16px;
  height: 16px;
}
.search-shortcut{
  position:absolute;
  right:.75rem;
  top:50%;
  transform:translateY(-50%);
  background:var(--surface-2);
  color:var(--muted);
  padding:.25rem .5rem;
  border-radius:.375rem;
  font-size:.75rem;
  font-family:ui-monospace,SFMono-Regular,monospace;
  border:1px solid var(--border-light);
}

/* Search suggestions dropdown */
.search-suggestions{
  position:absolute;
  top:calc(100% + .35rem);
  left:0;
  right:0;
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:.5rem;
  box-shadow:var(--elev-2);
  max-height:50vh;
  overflow:auto;
  display:none;
  z-index:120;
}
.search-suggestions.show{ display:block; }
.search-suggestion{
  padding:.55rem .75rem;
  cursor:pointer;
  color:var(--text);
}
.search-suggestion:hover,
.search-suggestion.active{
  background:var(--surface-2);
}

.site-header .controls{display:flex;gap:.5rem;align-items:center}
.hamburger{display:none}
.toc-overlay{display:none}

/* Desktop refinements */
@media (min-width: 1024px) {
  .site-header .container { padding: 1rem 1.5rem; }
  .logo { height: 44px; }
  .search-wrapper input { padding: 0.7rem 1rem 0.7rem 2.5rem; font-size: 1rem; }
  .site-header .bar { gap: 1.25rem; }
  .hamburger { display: none !important; }
}
.layout{display:grid;grid-template-columns:300px 1fr;gap:1.5rem;padding:0}
.toc{
  position:sticky;
  top:72px;
  height:calc(100vh - 72px);
  overflow:auto;
  background:var(--surface);
  border-right:1px solid var(--border);
  box-shadow:var(--elev-1);
}
.toc-inner{padding:1rem}
.toc h2{margin:0 0 .75rem;font-size:.9rem;color:var(--muted);text-transform:uppercase;letter-spacing:.08em;font-weight:600}
#toc-nav{display:flex;flex-direction:column;gap:.125rem}
#toc-nav a{
  padding:.5rem .75rem;
  border-radius:.5rem;
  color:var(--text);
  text-decoration:none;
  transition:all .15s ease;
  font-size:.9rem;
}
#toc-nav a:hover{background:var(--surface-2);color:var(--text-strong)}
#toc-nav a.active{
  background:var(--brand-50);
  color:var(--brand-700);
  font-weight:500;
  border-left:3px solid var(--brand);
}
.toc-actions{display:flex;gap:.5rem;margin:.75rem 0 0;padding-top:.75rem;border-top:1px solid var(--border-light)}
.content{min-width:0;padding:1rem}
.content h2{margin:2rem 0 .75rem;font-size:1.5rem;color:var(--text-strong);font-weight:600}
.content h3{margin:1.5rem 0 .5rem;font-size:1.125rem;color:var(--text-strong);font-weight:500}
.content h2, .content h3 { scroll-margin-top: 80px; }
.content section{
  border:1px solid var(--border);
  border-radius:.75rem;
  padding:1.5rem;
  margin:1.5rem 0;
  background:var(--surface);
  box-shadow:var(--elev-1);
}
.content details{
  border:1px solid var(--border-light);
  border-radius:.5rem;
  padding:.75rem 1rem;
  background:var(--surface-2);
  margin:.75rem 0;
}
.content summary{cursor:pointer;font-weight:500;color:var(--text-strong);padding:.25rem 0}
.content summary:hover{color:var(--brand)}
.content p,.content li{color:var(--text);line-height:1.7}
ul,ol{padding-left:1.5rem}
hr{border:none;border-top:1px solid var(--border-light);margin:2rem 0}
.badge{display:inline-block;padding:.125rem .5rem;border-radius:999px;font-size:.75rem;border:1px solid var(--border);color:var(--muted)}
.badge.get{border-color:var(--brand);color:var(--brand)}
.badge.post{border-color:var(--ok);color:var(--ok)}
.badge.put{border-color:var(--warn);color:var(--warn)}
.badge.delete{border-color:var(--err);color:var(--err)}
.code{
  position:relative;
  background:var(--code-bg);
  color:var(--code-text);
  border-radius:.6rem;
  border:1px solid #0b1224;
  padding:.85rem;
  overflow:auto;
  box-shadow:var(--elev-1);
}
pre{margin:0}
code{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:.9rem}
.copy-btn{position:absolute;top:.5rem;right:.5rem;background:transparent;color:var(--code-text);border:1px solid #1f2a44;border-radius:.375rem;padding:.25rem .5rem;cursor:pointer}
.copy-btn:hover{background:#111827}
.kbd{font:inherit;border:1px solid var(--border);padding:.1rem .3rem;border-radius:.375rem;background:transparent}
.callout{border-left:3px solid var(--brand);padding:.6rem .8rem;background:linear-gradient(180deg, var(--brand-50), transparent);border-radius:.5rem;box-shadow:var(--elev-1)}
.site-footer{border-top:1px solid var(--border);margin-top:1rem}
.site-footer .container{padding:1rem 1rem;color:var(--muted);font-size:.9rem}

/* Home hero */
.hero{
  background: linear-gradient(180deg, var(--surface), transparent 60%);
  border-bottom: 1px solid var(--border);
}
.hero.premium{
  background:
    radial-gradient(1200px 400px at 50% -150px, var(--brand-50), transparent),
    linear-gradient(180deg, var(--surface), transparent 60%);
}
.hero-inner{
  padding: 3rem 1rem 2rem;
  text-align: center;
}
.hero h1{ margin: 0 0 .5rem; font-size: 2rem; color: var(--text-strong); }
.hero .lead{ margin: 0 auto 1rem; max-width: 60ch; color: var(--muted); }
.hero .hero-actions{ display:flex; gap:.5rem; justify-content:center; flex-wrap:wrap; margin:.75rem 0; }
.hero .muted{ color: var(--muted); margin-top: .5rem; }

/* Small pill label */
.label{ display:inline-block; padding:.25rem .5rem; border-radius:999px; font-size:.75rem; border:1px solid var(--border); color:var(--muted); }
.label-brand{ background: var(--brand-50); border-color: var(--brand-100); color: var(--brand-700); }

/* Cards */
.card-grid{ display:grid; grid-template-columns: repeat(auto-fit, minmax(220px,1fr)); gap:.75rem; margin-top:.75rem; }
.card{ display:block; border:1px solid var(--border); background:var(--surface); border-radius:.75rem; padding:1rem; text-decoration:none; color:var(--text); box-shadow:var(--elev-1); transition:transform .15s ease, box-shadow .15s ease; }
.card:hover{ transform: translateY(-2px); box-shadow: var(--elev-2); }
.card h3{ margin:.25rem 0 .25rem; color: var(--text-strong); font-size:1.05rem; }
.card p{ margin:0; color: var(--muted); }

/* Buttons */
.btn{
  appearance:none;
  border:1px solid var(--border);
  background:var(--surface);
  color:var(--text);
  padding:.5rem .75rem;
  border-radius:.5rem;
  cursor:pointer;
  font-size:.9rem;
  font-weight:500;
  transition:all .15s ease;
  box-shadow:var(--elev-1);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.btn:hover{background:var(--surface-2);transform:translateY(-1px);box-shadow:var(--elev-2)}
.btn-ghost{background:transparent;box-shadow:none}
.btn-ghost:hover{background:var(--surface-2)}
.btn-primary{border-color:var(--brand);background:var(--brand);color:#fff}
.btn-primary:hover{background:var(--brand-600);transform:translateY(-1px)}

/* Theme toggle icons */
#theme-toggle {
  position: relative;
}

#theme-toggle svg {
  width: 16px;
  height: 16px;
}

.theme-icon-light {
  display: inline-flex;
  align-items: center;
}

.theme-icon-dark {
  display: none;
  align-items: center;
}

.theme-dark .theme-icon-light {
  display: none;
}

.theme-dark .theme-icon-dark {
  display: inline-flex;
}

/* Header dropdown */
.dropdown{ position: relative; }
.dropdown-toggle .caret{ margin-left:.35rem; }
.dropdown-menu{
  position: absolute;
  top: calc(100% + .35rem);
  right: 0;
  min-width: 180px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: .5rem;
  box-shadow: var(--elev-2);
  padding: .25rem;
  display: none;
  z-index: 120;
}
.dropdown.open .dropdown-menu{ display: block; }
.dropdown-item{
  display: block;
  padding: .5rem .6rem;
  border-radius: .375rem;
  color: var(--text);
  text-decoration: none;
}
.dropdown-item:hover{ background: var(--surface-2); }

@media (max-width: 480px){
  .dropdown-menu{ left: 0; right: auto; min-width: 60%; }
}

/* Code tabs */
.code-tabs{border:1px solid var(--border);border-radius:.75rem;margin:.9rem 0;background:rgba(0,0,0,0.03);box-shadow:var(--elev-1)}
.code-tabs .tab-bar{display:flex;gap:.25rem;padding:.25rem;border-bottom:1px solid var(--border);background:transparent}
.code-tabs .tab{appearance:none;border:none;background:transparent;padding:.45rem .7rem;border-radius:.5rem;color:var(--muted);cursor:pointer}
.code-tabs .tab:hover{background:var(--brand-50);color:var(--text)}
.code-tabs .tab.active{background:var(--brand-50);color:var(--text);font-weight:600}
.code-tabs .tab-content{padding:.5rem}
.code-tabs .code{margin:0}

@media (max-width: 980px){
  .layout{grid-template-columns:1fr}
  .toc{position:static;height:auto;border-right:none;border-bottom:1px solid var(--border)}
  .site-header .bar{grid-template-columns:1fr auto;grid-auto-rows:auto}
  .site-header .search{grid-column:1 / -1}
}

/* Additional styles for comprehensive content */
.badge {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  border-radius: 0.25rem;
  color: white;
  margin-right: 0.5rem;
  border: none;
}

.badge.get {
  background-color: #10b981;
}

.badge.post {
  background-color: #3b82f6;
}

.badge.put {
  background-color: #f59e0b;
}

.badge.delete {
  background-color: #ef4444;
}

.badge.warn {
  background-color: #f59e0b;
}

.badge.err {
  background-color: #ef4444;
}

/* Enhanced details/summary styling */
details {
  margin: 1rem 0;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  overflow: hidden;
  background: var(--surface);
}

details summary {
  padding: 1rem;
  background-color: var(--surface-2);
  cursor: pointer;
  font-weight: 600;
  border-bottom: 1px solid var(--border);
  transition: background-color 0.2s ease;
}

details summary:hover {
  background-color: var(--surface-3);
}

details[open] summary {
  border-bottom: 1px solid var(--border);
}

details > *:not(summary) {
  padding: 1rem;
}

details h4 {
  margin: 1rem 0 0.5rem 0;
  color: var(--brand);
}

/* Enhanced callout styling */
.callout {
  background-color: var(--surface-2);
  border-left: 4px solid var(--brand);
  padding: 1rem;
  margin: 1rem 0;
  border-radius: 0 0.5rem 0.5rem 0;
}

.callout ul {
  margin-bottom: 0;
}

.callout strong {
  color: var(--text-strong);
}

/* Mobile First Responsive Design - Clean Implementation */


/* Small Mobile Devices - 320px to 480px */
@media (max-width: 480px) {
  /* Reset layout for mobile */
  .layout {
    grid-template-columns: 1fr;
    min-height: 100vh;
  }
  
  /* Body should not reserve space for fixed header on mobile */
  body {
    padding-top: 0;
  }
  
  /* Header optimizations */
  .site-header {
    padding: 0.75rem 1rem;
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
  }
  
  .site-header .bar {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "brand controls"
      "search search";
    gap: 0.75rem 0.75rem;
    align-items: center;
  }
  
  .brand { grid-area: brand; }
  .search { grid-area: search; }
  .site-header .controls { grid-area: controls; justify-content: end; }
  .hamburger{display:inline-flex}

  .logo-section {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.5rem;
  }
  
  .logo {
    height: 32px;
    width: auto;
  }
  
  .brand-text h1 { display: none; }
  .brand-text:empty { display: none; }
  
  .brand-text .subtitle { display: none; }
  
  /* Search optimizations */
  .search-wrapper {
    width: 100%;
    max-width: none;
    position: relative;
  }
  
  .search-wrapper input {
    width: 100%;
    font-size: 16px; /* Prevents zoom on iOS */
    padding: 0.75rem 2.5rem 0.75rem 2.25rem; /* leave space for the icon */
    border-radius: 0.5rem;
    border: 1px solid var(--border);
    background: var(--surface);
  }
  .search-wrapper input::placeholder { color: var(--muted-light); opacity: 1; }
  /* Keep icon on the left and ensure hit area */
  .search-icon { left: 0.75rem; right: auto; width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; }
  .search-icon svg { width: 16px; height: 16px; }
  /* Hide the "/" shortcut hint on very small screens */
  .search-shortcut {
    display: none;
  }
  .search-suggestions{ top: calc(100% + .4rem); left: 0; right: 0; max-height: 60vh; }
  
  /* Controls */
  .site-header .controls {
    display: flex;
    justify-content: end;
    align-items: center;
    gap: 0.5rem;
  }
  
  #theme-toggle {
    padding: 0.6rem;
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem;
    border: 1px solid var(--border);
    background: var(--surface);
  }
  
  .theme-text {
    display: none;
  }
  .hide-sm { display: none !important; }
  
  /* Content layout */
  .content {
    padding: 0;
  }
  
  .main {
    padding: 1rem;
    max-width: 100%;
    overflow-x: hidden;
  }
  
  /* Typography */
  .main h1 {
    font-size: 1.75rem;
    line-height: 1.2;
    margin-bottom: 1rem;
  }
  
  .main h2 {
    font-size: 1.4rem;
    line-height: 1.3;
    margin: 2rem 0 1rem 0;
  }
  
  .main h3 {
    font-size: 1.2rem;
    line-height: 1.3;
    margin: 1.5rem 0 0.75rem 0;
  }
  
  .main p {
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1rem;
  }
  
  .main ul, .main ol {
    margin: 1rem 0;
    padding-left: 1.5rem;
    line-height: 1.6;
  }
  
  .main li {
    margin-bottom: 0.5rem;
  }
  
  /* Navigation */
  .toc {
    padding: 1rem;
    border-bottom: 1px solid var(--border);
    background: var(--surface-2);
    position: static;
    height: auto;
    border-right: none;
  }
  
  .toc ul {
    margin: 0;
    padding: 0;
    list-style: none;
  }
  
  .toc a {
    display: block;
    padding: 0.75rem;
    border-radius: 0.5rem;
    min-height: 44px;
    line-height: 1.4;
    transition: background-color 0.2s ease;
    text-decoration: none;
    color: var(--text);
  }
  
  .toc a:hover {
    background-color: var(--surface-3);
  }
  
  .toc a.active {
    background-color: var(--brand-50);
    color: var(--brand);
    font-weight: 600;
  }
  
  /* Code blocks */
  pre {
    font-size: 0.85rem;
    padding: 1rem;
    border-radius: 0.5rem;
    overflow-x: auto;
    margin: 1rem 0;
    line-height: 1.4;
    background: var(--code-bg);
    color: var(--code-text);
    -webkit-overflow-scrolling: touch;
  }
  
  /* Tables responsive */
  table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
    margin: 1rem 0;
    width: 100%;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Details/Summary */
  details {
    margin: 1rem 0;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    background: var(--surface);
  }
  
  details summary {
    padding: 1rem;
    font-size: 1rem;
    min-height: 44px;
    cursor: pointer;
    background: var(--surface-2);
    border-radius: 0.5rem 0.5rem 0 0;
  }
  
  details[open] summary {
    border-radius: 0.5rem 0.5rem 0 0;
    border-bottom: 1px solid var(--border);
  }
  
  details[open] > *:not(summary) {
    padding: 1rem;
  }
  
  /* Callouts */
  .callout {
    margin: 1rem 0;
    padding: 1rem;
    border-radius: 0.5rem;
    background: var(--surface-2);
    border-left: 4px solid var(--brand);
  }
  
  /* Code tabs for mobile */
  .code-tabs .tab-bar {
    flex-wrap: wrap;
    gap: 0;
  }
  
  .code-tabs .tab {
    flex: 1;
    min-width: calc(50% - 0.125rem);
    padding: 0.75rem 0.5rem;
    font-size: 0.85rem;
  }
}

/* Medium Mobile & Small Tablets - 481px to 768px */
@media (min-width: 481px) and (max-width: 768px) {
  .layout {
    grid-template-columns: 1fr;
  }
  /* Remove body offset and make header sticky on small tablets */
  body { padding-top: 0; }
  .site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 1rem;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
  }
  .search-suggestions{ top: calc(100% + .4rem); }
  
  .site-header .bar {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "brand controls"
      "search search";
    gap: 0.75rem 0.75rem;
    align-items: center;
  }
  .brand { grid-area: brand; }
  .search { grid-area: search; }
  .site-header .controls { grid-area: controls; justify-content: end; }
  .hamburger { display: inline-flex; }
  
  .search {
    grid-column: 1 / -1;
    margin-top: 1rem;
  }
  
  .logo-section {
    gap: 0.75rem;
  }
  
  .logo {
    height: 36px;
  }
  
  .brand-text h1 {
    font-size: 1.2rem;
  }
  
  .brand-text .subtitle { display: none; }
  
  .main { padding: 1.25rem; }
  
  .main h1 {
    font-size: 2rem;
  }
  
  .main h2 {
    font-size: 1.6rem;
  }
  
  .toc {
    position: static;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
}

/* Large Tablets - 769px to 980px */
@media (min-width: 769px) and (max-width: 980px) {
  .layout {
    grid-template-columns: 1fr;
  }
  
  .toc {
    position: static;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: 1.5rem;
  }
  
  .toc ul {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.5rem;
  }
}

/* Restore body top padding for fixed header on larger screens */
@media (min-width: 769px) {
  body { padding-top: 72px; }
}

/* Code tabs responsive styling - applies to all breakpoints */
.code-tabs {
  margin: 1rem 0;
  border-radius: 0.5rem;
  overflow: hidden;
  border: 1px solid var(--border);
}

.code-tabs .tab-bar {
  display: flex;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}

.code-tabs .tab {
  flex: 1;
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.2s ease;
}

.code-tabs .tab.active {
  background: var(--brand-50);
  color: var(--brand);
  font-weight: 600;
}

.code-tabs .tab:hover {
  background: var(--surface-3);
}

.code-tabs .tab-content {
  background: var(--surface);
}

.code-tabs .tab-pane {
  display: none;
}

.code-tabs .tab-pane.active {
  display: block;
}

.code-tabs pre {
  margin: 0;
  border-radius: 0;
  font-size: 0.85rem;
  padding: 1rem;
  line-height: 1.4;
}

/* Badge styling - applies to all breakpoints */
.badge {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  border-radius: 0.25rem;
  color: white;
  margin-right: 0.5rem;
  border: none;
}

/* Mobile TOC drawer and hamburger */
@media (max-width: 768px) {
  /* Optional off-canvas TOC behavior (only when .drawer class is added to .toc) */
  .toc.drawer { position: fixed; top: 56px; left: 0; bottom: 0; width: 84%; max-width: 320px; transform: translateX(-100%); transition: transform .25s ease; z-index: 90; box-shadow: var(--elev-2); }
  .toc.drawer.open { transform: translateX(0); }
  .toc-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.35); backdrop-filter: blur(2px); z-index: 80; display: none; }
  .toc-overlay.show { display: block; }
  .hamburger { appearance: none; background: var(--surface); border: 1px solid var(--border); border-radius: .5rem; padding: .5rem .6rem; display: inline-flex; align-items: center; justify-content: center; gap: .5rem; }
  .hamburger svg { width: 18px; height: 18px; }
}