/* NextAstro defaults match hubThemeOptions.js. Saved Hub themes use the same
   palette, typography and CSS variable names through help.js. */
:root {
  color-scheme: dark;
  --bg-color: #17191b;
  --text-color: #ffffff;
  --box-bg: #24272a;
  --panel-alt-bg: #636467;
  --muted-text: #c9cbcc;
  --box-border: rgba(99, 100, 103, 0.78);
  --accent-color: #17a6b1;
  --accent-soft: rgba(23, 166, 177, 0.18);
  --secondary-accent: #f8951d;
  --action-button-text: #071315;
  --app-font-family: 'Montserrat', sans-serif;
  --app-heading-font-family: 'Montserrat', sans-serif;
  --app-data-font-family: 'IBM Plex Mono', 'Cascadia Mono', Consolas, monospace;
  font-family: var(--app-font-family);
  font-size: 20px;
  line-height: 1.65;
  background: var(--bg-color);
  color: var(--text-color);
}
* { box-sizing: border-box; }
body { margin: 0; }
[hidden] { display: none !important; }
a { color: var(--accent-color); text-underline-offset: 0.2em; }
a:hover { text-decoration-thickness: 2px; }
button, input, select { font: inherit; }
button, summary, select { cursor: pointer; }
button { border: 1px solid var(--accent-color); border-radius: 6px; padding: 0.45rem 0.8rem; background: var(--accent-color); color: var(--action-button-text); font-weight: 600; }
:focus-visible { outline: 3px solid var(--secondary-accent); outline-offset: 4px; }
.skip-link { position: fixed; top: -100px; left: 1rem; z-index: 11000; padding: 0.6rem; background: var(--box-bg); }
.skip-link:focus { top: 0.5rem; }
.masthead { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem; padding: 1.1rem 2rem; border-bottom: 1px solid var(--box-border); background: var(--box-bg); }
.brand { display: flex; align-items: center; gap: 0.7rem; text-decoration: none; }
.brand img { border: 2px solid #fff; border-radius: 50%; }
.brand strong { font-size: 1.65rem; line-height: 1.2; }
.brand-next { color: #17a6b1; }
.brand-astro { color: #f8951d; }
.brand small { display: block; color: var(--muted-text); font-size: 0.9rem; }
.hub-link { font-weight: 600; }
.layout { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: clamp(1rem, 2.5vw, 3rem); padding: 1.5rem 2rem; width: 100%; align-items: start; }
.layout.with-toc { grid-template-columns: 270px minmax(0, 1fr) 230px; }
.sidebar, .toc { position: sticky; top: 1rem; max-height: calc(100dvh - 2rem); overflow-y: auto; font-size: 0.9rem; }
.sidebar summary { color: var(--secondary-accent); font-weight: 700; padding: 0.3rem 0; }
.sidebar h2 { font-size: 0.95rem; margin: 1.2rem 0 0.35rem; }
.sidebar ul, .toc ul { list-style: none; padding: 0; margin: 0; }
.sidebar a, .toc a { display: block; color: var(--muted-text); text-decoration: none; padding: 0.22rem 0.45rem; border-left: 3px solid transparent; }
.sidebar a:hover, .toc a:hover { color: var(--accent-color); }
.sidebar a[aria-current] { color: var(--accent-color); background: var(--accent-soft); border-left-color: var(--accent-color); font-weight: 600; }
.layout:has(#guide-menu:not([open])) { grid-template-columns: minmax(0, 1fr); }
.layout.with-toc:has(#guide-menu:not([open])) { grid-template-columns: minmax(0, 1fr) 230px; }
.layout:has(#guide-menu:not([open])) .sidebar { grid-column: 1 / -1; position: static; }
main { min-width: 0; }
.breadcrumbs { display: flex; flex-wrap: wrap; gap: 0.5rem; font-size: 0.9rem; margin-bottom: 1.2rem; color: var(--muted-text); }
form[role=search] { margin: 0 0 2rem; }
form label { display: block; font-size: 0.9rem; margin-bottom: 0.4rem; font-weight: 600; }
.search-field { display: flex; gap: 0.6rem; }
.search-field input { min-width: 0; width: 100%; border: 1px solid var(--box-border); background: var(--box-bg); color: var(--text-color); padding: 0.65rem 0.8rem; border-radius: 6px; }
input::placeholder { color: var(--muted-text); opacity: 1; }
h1, h2, h3, h4 { font-family: var(--app-heading-font-family); line-height: 1.25; scroll-margin-top: 1.5rem; }
h1 { font-size: clamp(1.8rem, 3vw, 2.5rem); margin: 0.5rem 0 1.4rem; }
h2 { font-size: 1.45rem; margin: 2rem 0 0.8rem; }
h3 { font-size: 1.15rem; margin: 1.6rem 0 0.65rem; }
p, ul, ol { margin: 0.8rem 0 1.1rem; }
.eyebrow { color: var(--secondary-accent); font-size: 0.9rem; font-weight: 600; margin: 0 0 0.5rem; }
.muted { color: var(--muted-text); }
.guide-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 1rem; }
.category-title { grid-column: 1 / -1; color: var(--secondary-accent); margin: 1.3rem 0 0; }
.guide-card { padding: 1.1rem 1.3rem; border: 1px solid var(--box-border); border-radius: 8px; background: var(--box-bg); }
.guide-card h3 { margin: 0 0 0.65rem; }
.guide-card p { margin: 0; color: var(--muted-text); }
.result { padding: 0.5rem 0 1rem; border-bottom: 1px solid var(--box-border); }
.result h2 { margin-top: 1rem; }
.result p { color: var(--muted-text); }
.guide li { margin: 0.4rem 0; }
.guide a { overflow-wrap: anywhere; }
code { font-family: var(--app-data-font-family); font-size: 0.95em; background: var(--box-bg); padding: 0.12em 0.3em; border-radius: 4px; overflow-wrap: anywhere; }
pre { max-width: 100%; overflow-x: auto; border: 1px solid var(--box-border); border-left: 4px solid var(--secondary-accent); border-radius: 6px; padding: 1.1rem 1.3rem; background: var(--box-bg); line-height: 1.6; tab-size: 4; }
pre code { font-size: 0.95rem; padding: 0; border: 0; background: transparent; overflow-wrap: normal; }
blockquote { border-left: 4px solid var(--accent-color); margin: 1.5rem 0; padding: 0.2rem 1rem; background: var(--accent-soft); }
.table-scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 0.95rem; }
th, td { padding: 0.65rem 0.8rem; border: 1px solid var(--box-border); text-align: left; vertical-align: top; }
th { background: var(--box-bg); }
.toc { border-left: 1px solid var(--box-border); padding-left: 0.8rem; }
.toc h2 { font-size: 0.95rem; margin: 0 0 0.6rem; }
.toc .h3 { padding-left: 0.6rem; }
.source-link, footer { color: var(--muted-text); font-size: 0.9rem; }
.source-link { border-top: 1px solid var(--box-border); padding-top: 1rem; margin-top: 2rem; }
footer { padding: 1.5rem 2rem; border-top: 1px solid var(--box-border); }
.site-menu { display: flex; gap: 0.8rem; align-items: center; flex-wrap: wrap; padding: 0.7rem 1rem; background: var(--box-bg); border: 1px solid var(--box-border); font-size: 0.9rem; }
.site-menu img { display: block; border: 2px solid #fff; border-radius: 50%; }
.site-menu a { font-weight: 600; }
.theme-control { display: flex; align-items: center; gap: 0.5rem; }
.theme-control select { min-width: 0; max-width: 14rem; padding: 0.45rem; background: var(--box-bg); color: var(--text-color); border: 1px solid var(--box-border); border-radius: 5px; }
.help-enhanced .site-menu { position: fixed; z-index: 10000; visibility: hidden; pointer-events: none; box-shadow: 0 0 25px #0006; max-height: 85dvh; overflow: auto; }
.help-enhanced[data-menu-open=true] .site-menu, .help-enhanced[data-menu-pinned=true] .site-menu { visibility: visible; pointer-events: auto; }
.menu-cue { position: fixed; z-index: 9999; font-size: 0.9rem; border-radius: 6px 6px 0 0; }
[data-menu-side=bottom] .site-menu { bottom: 0; left: 0; right: 0; }
[data-menu-side=bottom] .menu-cue { bottom: 0; right: 1rem; }
[data-menu-side=top] .site-menu { top: 0; left: 0; right: 0; }
[data-menu-side=top] .menu-cue { top: 0; right: 1rem; }
[data-menu-side=left] .site-menu, [data-menu-side=right] .site-menu { top: 0; bottom: 0; flex-direction: column; align-items: stretch; flex-wrap: nowrap; max-width: min(360px, 95vw); max-height: 100dvh; }
[data-menu-side=left] .site-menu { left: 0; }
[data-menu-side=right] .site-menu { right: 0; }
[data-menu-side=left] .menu-cue { left: 0; top: 45%; }
[data-menu-side=right] .menu-cue { right: 0; top: 45%; }
[data-menu-pinned=true] .menu-cue { visibility: hidden; }
.help-enhanced[data-menu-side=bottom] body { padding-bottom: max(2rem, var(--menu-inset)); }
.help-enhanced[data-menu-side=top] body { padding-top: var(--menu-inset); }
.help-enhanced[data-menu-side=left] body { padding-left: var(--menu-inset); }
.help-enhanced[data-menu-side=right] body { padding-right: var(--menu-inset); }
@media (max-width: 1200px) {
  .layout.with-toc { grid-template-columns: 250px minmax(0, 1fr); }
  .layout.with-toc:has(#guide-menu:not([open])) { grid-template-columns: minmax(0, 1fr); }
  .toc { display: none; }
}
@media (max-width: 800px) {
  .masthead { padding: 1rem; }
  .layout, .layout.with-toc, .layout.with-toc:has(#guide-menu:not([open])) { display: block; padding: 1rem; }
  .sidebar { position: static; max-height: none; margin-bottom: 1.3rem; }
  .sidebar nav { max-height: 65dvh; overflow: auto; }
  .brand strong { font-size: 1.4rem; }
  .brand img { width: 48px; height: 48px; }
  .hub-link { font-size: 0.9rem; }
  .search-field { flex-wrap: wrap; }
  .search-field input { flex: 1 1 200px; }
  .site-menu { gap: 0.6rem; }
  pre { padding: 0.8rem; }
  footer { padding: 1rem; }
}
@media print {
  :root { color-scheme: light; --bg-color: #fff; --text-color: #000; --box-bg: #fff; --muted-text: #222; }
  .sidebar, .toc, .site-menu, .menu-cue, form, .hub-link { display: none !important; }
  .layout, .layout.with-toc { display: block; padding: 0; }
  body { padding: 0 !important; }
}
