/* Calm layer: softer colors, a flat sidebar, page tabs and the configuration file browser.
   Loaded after docs.css and experience.css, so it only overrides what it names. */
:root {
  --bg: #1e2022;
  --sidebar: #1b1d1f;
  --surface: #26292c;
  --border: #33373a;
  --text: #e4e6e5;
  --muted: #a3a8ab;
  --accent: #d6bd84;
  --hover: #2c3033;
  --code: #222528;
  --soft-accent: color-mix(in srgb, var(--accent) 14%, transparent);
}
:root[data-theme="light"] {
  --bg: #faf9f6;
  --sidebar: #f3f2ee;
  --surface: #f0efea;
  --border: #e0ded7;
  --text: #2a2d30;
  --muted: #62686d;
  --accent: #8a6a28;
  --hover: #e9e7e0;
  --code: #f3f2ee;
}
body {
  background: var(--bg);
}
.ambient-background,
button[data-ambient] {
  display: none !important;
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
header {
  background: color-mix(in srgb, var(--bg) 96%, transparent);
  border-bottom-color: var(--border);
}
main {
  max-width: 920px;
}
.prose {
  font-size: 1rem;
  line-height: 1.8;
  color: color-mix(in srgb, var(--text) 92%, var(--muted));
}
.prose h2 {
  margin-top: 2.2em;
  font-size: 1.3rem;
}

/* Sidebar: one flat list of plugins with their version. */
#sidebar {
  padding: 20px 14px 24px;
  font-size: 14px;
}
#sidebar .nav-home {
  display: block;
  padding: 8px 10px;
  border-radius: 8px;
  color: var(--text);
  font-weight: 600;
}
#sidebar .nav-filter input {
  width: 100%;
  margin: 10px 0 6px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
}
#sidebar .nav-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 18px 10px 6px;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
#sidebar .category-count {
  font-size: 11px;
  color: var(--muted);
}
#sidebar .plugin-entry {
  margin: 1px 0;
}
#sidebar .plugin-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 8px;
  color: var(--text);
  text-decoration: none;
}
#sidebar .plugin-link:hover,
#sidebar .nav-page:hover,
#sidebar .nav-home:hover {
  background: var(--hover);
  text-decoration: none;
}
#sidebar .plugin-link-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.plugin-version {
  flex: none;
  padding: 1px 7px;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-size: 11px;
  font-weight: 500;
  line-height: 1.6;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
#sidebar .active-plugin > .plugin-link {
  background: var(--soft-accent);
  font-weight: 650;
}
#sidebar .active-plugin .plugin-version {
  border-color: color-mix(in srgb, var(--accent) 45%, transparent);
  color: var(--accent);
}
#sidebar .plugin-pages {
  margin: 4px 0 8px 12px;
  padding-inline-start: 10px;
  border-inline-start: 2px solid var(--border);
}
#sidebar .nav-page {
  display: block;
  padding: 5px 10px;
  border-radius: 6px;
  color: var(--muted);
  box-shadow: none;
}
#sidebar .nav-page[aria-current="page"] {
  color: var(--accent);
  background: transparent;
  font-weight: 650;
}
#sidebar .guide-list .nav-page {
  padding-inline-start: 10px;
}

/* Page heading, breadcrumbs and tabs. */
.breadcrumbs {
  font-size: 13px;
  color: var(--muted);
}
.breadcrumbs [aria-current] {
  color: var(--text);
}
.article-heading .eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
}
.article-heading .version {
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--soft-accent);
  color: var(--accent);
  font-size: 12px;
}
.article-heading .lede {
  margin-top: -4px;
  color: var(--muted);
}
.page-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 22px 0 28px;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
}
.page-tabs a {
  flex: 1 1 auto;
  padding: 8px 14px;
  border-radius: 7px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  text-decoration: none;
}
.page-tabs a:hover {
  color: var(--text);
  background: var(--hover);
}
.page-tabs a[aria-current="page"] {
  background: var(--bg);
  color: var(--text);
  font-weight: 650;
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.18);
}
.store-link {
  display: inline-block;
  margin-top: 6px;
}

/* Configuration file browser. */
.file-browser {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 18px;
  margin-top: 24px;
  scroll-margin-top: 90px;
}
.file-list {
  position: sticky;
  top: 92px;
  align-self: start;
  max-height: calc(100vh - 120px);
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  overflow: hidden;
}
.file-filter input {
  width: 100%;
  padding: 9px 12px;
  border: 0;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  background: transparent;
  color: var(--text);
}
.file-entries {
  overflow-y: auto;
  padding: 6px;
  scrollbar-width: thin;
}
.file-folder {
  margin: 10px 8px 4px;
  font-size: 11px;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.file-group a {
  display: block;
  padding: 4px 10px;
  border-radius: 6px;
  color: var(--text);
  font-size: 13px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-decoration: none;
}
.file-group a:hover {
  background: var(--hover);
}
.file-group a[aria-current="true"] {
  background: var(--soft-accent);
  color: var(--accent);
  font-weight: 600;
}
[data-file-empty] {
  padding: 0 12px;
  color: var(--muted);
}
.file-view {
  min-width: 0;
}
.file-path {
  margin: 0 0 8px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  word-break: break-all;
}
.file-path span {
  color: var(--muted);
}
.file-view .code-block {
  margin-top: 0;
}
.file-view pre {
  max-height: 75vh;
}

/* Home. */
.home-hero {
  padding: 18px 0 8px;
  text-align: center;
}
.home-hero .home-search {
  max-width: 560px;
  width: 100%;
  margin: 18px auto 0;
}
.plugin-grid {
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}
.plugin-card {
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
}
.plugin-card h3 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.plugin-card small {
  color: var(--muted);
}
.update-row span {
  color: var(--muted);
}

@media (max-width: 900px) {
  .file-browser {
    grid-template-columns: 1fr;
  }
  .file-list {
    position: static;
    max-height: 260px;
  }
}
@media (max-width: 760px) {
  .page-tabs a {
    flex: 1 1 45%;
  }
}

/* Administration. */
.admin-layout main {
  max-width: 1100px;
}
.passkey-list {
  display: grid;
  gap: 8px;
  margin: 12px 0 20px;
}
.passkey-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
}
.passkey-row small {
  display: block;
  color: var(--muted);
}
.auth-panel .passkey-button {
  width: 100%;
  margin: 8px 0 4px;
  padding: 11px 14px;
}
.auth-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 18px 0 12px;
  color: var(--muted);
  font-size: 13px;
}
.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}
[data-passkey-status] {
  min-height: 1.4em;
  color: var(--muted);
  font-size: 14px;
}
.quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0 8px;
}
.admin-plugin {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 16px;
}
.admin-plugin > span {
  font-size: 14px;
  color: var(--muted);
}
/* Pages without an "On this page" list (such as Configuration) use the full width. */
@media (min-width: 1151px) {
  .layout:has(> .toc:empty) {
    grid-template-columns: 265px minmax(0, 1fr);
  }
  .layout > .toc:empty {
    display: none;
  }
  main:has(.file-browser) {
    max-width: 1240px;
  }
}
.guide-media {
  max-width: 640px;
}
