/* Planet42 Wiki — tokens taken from planet42.com (DM Sans, brand blue, 1.5rem radius, pill buttons). */
:root {
  --primary: #0087e6;
  --primary-hover: #0074c7;
  --primary-soft: #e6f3fd;
  --ink: #0a0a0a;
  --ink-2: #404040;
  --muted: #737373;
  --bg: #ffffff;
  --bg-soft: #f7f7f8;
  --card: #ffffff;
  --border: #e5e5e5;
  --code-bg: #f5f5f5;
  --success: #16a34a;
  --danger: #e40014;
  --warn-bg: #fffbeb;
  --radius: 1.5rem;
  --radius-sm: .75rem;
  --shadow: 0 1px 2px rgb(0 0 0 / .04), 0 8px 24px -12px rgb(0 0 0 / .12);
  --font: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --primary: #2b9cf0; --primary-hover: #52b0f5; --primary-soft: #0c2a42;
    --ink: #fafafa; --ink-2: #d4d4d4; --muted: #a1a1a1;
    --bg: #0a0a0a; --bg-soft: #121212; --card: #171717; --border: #262626; --code-bg: #1f1f1f;
    --warn-bg: #2a2205; --shadow: 0 1px 2px rgb(0 0 0 / .4);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --primary: #2b9cf0; --primary-hover: #52b0f5; --primary-soft: #0c2a42;
  --ink: #fafafa; --ink-2: #d4d4d4; --muted: #a1a1a1;
  --bg: #0a0a0a; --bg-soft: #121212; --card: #171717; --border: #262626; --code-bg: #1f1f1f;
  --warn-bg: #2a2205; --shadow: 0 1px 2px rgb(0 0 0 / .4);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg); line-height: 1.6; font-size: 16px; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
h1, h2, h3, h4 { line-height: 1.2; letter-spacing: -.02em; margin: 0 0 .5em; font-weight: 700; }
.icon { width: 1.1em; height: 1.1em; flex: none; vertical-align: -.15em; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- Top bar ---------- */
.topbar { position: sticky; top: 0; z-index: 40; background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid var(--border); }
.topbar-inner { max-width: 1440px; margin: 0 auto; height: 64px; display: flex; align-items: center; gap: 1.25rem; padding: 0 1.5rem; }
.brand { display: flex; align-items: center; gap: .6rem; color: var(--ink); font-weight: 700; flex: none; }
.brand:hover { text-decoration: none; }
.brand img { height: 22px; width: auto; display: block; }
.brand .tag { font-size: .75rem; font-weight: 600; color: var(--primary); background: var(--primary-soft); padding: .15rem .55rem; border-radius: 999px; }
.mainnav { display: flex; gap: .25rem; }
.mainnav a { color: var(--ink-2); font-weight: 500; padding: .45rem .8rem; border-radius: 999px; font-size: .95rem; }
.mainnav a:hover, .mainnav a.active { background: var(--bg-soft); color: var(--ink); text-decoration: none; }
.topsearch { flex: 1; max-width: 420px; margin-left: auto; position: relative; }
.topsearch input { width: 100%; height: 40px; border-radius: 999px; border: 1px solid var(--border); background: var(--bg-soft);
  padding: 0 1rem 0 2.4rem; font: inherit; font-size: .95rem; color: var(--ink); }
.topsearch input:focus { outline: 2px solid var(--primary); outline-offset: 0; background: var(--card); }
.topsearch .icon { position: absolute; left: .9rem; top: 50%; transform: translateY(-50%); color: var(--muted); }
.topsearch kbd { position: absolute; right: .75rem; top: 50%; transform: translateY(-50%); font: 600 .7rem var(--font); color: var(--muted);
  border: 1px solid var(--border); border-radius: 6px; padding: .05rem .4rem; background: var(--card); }
.useractions { display: flex; align-items: center; gap: .5rem; flex: none; }
.btn.menu-toggle { display: none; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; height: 40px; padding: 0 1.1rem; border-radius: 999px;
  font: 600 .95rem var(--font); border: 1px solid transparent; cursor: pointer; white-space: nowrap; text-decoration: none !important; transition: background .15s, transform .05s; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-dark { background: var(--ink); color: var(--bg); }
.btn-dark:hover { opacity: .88; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--border); }
.btn-ghost:hover { background: var(--bg-soft); }
.btn-danger { background: transparent; color: var(--danger); border-color: color-mix(in srgb, var(--danger) 35%, transparent); }
.btn-danger:hover { background: color-mix(in srgb, var(--danger) 8%, transparent); }
.btn-sm { height: 34px; padding: 0 .85rem; font-size: .875rem; }
.btn-lg { height: 52px; padding: 0 1.6rem; font-size: 1.05rem; }
.icon-btn { width: 40px; padding: 0; }
.avatar-btn { width: 36px; height: 36px; border-radius: 50%; background: var(--primary); color: #fff; display: grid; place-items: center;
  font-weight: 700; font-size: .85rem; border: none; cursor: pointer; }
.dropdown { position: relative; }
.dropdown-menu { position: absolute; right: 0; top: calc(100% + .5rem); background: var(--card); border: 1px solid var(--border); border-radius: 1rem;
  box-shadow: var(--shadow); min-width: 220px; padding: .5rem; display: none; }
.dropdown.open .dropdown-menu { display: block; }
.dropdown-menu .who { padding: .5rem .75rem .75rem; border-bottom: 1px solid var(--border); margin-bottom: .35rem; }
.dropdown-menu a, .dropdown-menu button { display: flex; gap: .6rem; align-items: center; width: 100%; padding: .55rem .75rem; border-radius: .6rem;
  color: var(--ink); background: none; border: none; font: inherit; font-size: .925rem; cursor: pointer; text-align: left; }
.dropdown-menu a:hover, .dropdown-menu button:hover { background: var(--bg-soft); text-decoration: none; }

/* ---------- Layout ---------- */
.container { max-width: 1240px; margin: 0 auto; padding: 0 1.5rem; }
.flashes { max-width: 1240px; margin: 1rem auto 0; padding: 0 1.5rem; display: grid; gap: .5rem; }
.flash { border-radius: 1rem; padding: .8rem 1.1rem; font-weight: 500; border: 1px solid var(--border); background: var(--card); }
.flash-success { border-color: color-mix(in srgb, var(--success) 40%, transparent); color: var(--success); }
.flash-error { border-color: color-mix(in srgb, var(--danger) 40%, transparent); color: var(--danger); }
.flash-info { border-color: color-mix(in srgb, var(--primary) 40%, transparent); color: var(--primary); }

.doc-layout { max-width: 1440px; margin: 0 auto; display: grid; grid-template-columns: 280px minmax(0, 1fr) 220px; gap: 2.5rem; padding: 0 1.5rem; }
.doc-layout.no-toc { grid-template-columns: 280px minmax(0, 1fr); }
.sidebar { position: sticky; top: 64px; align-self: start; height: calc(100vh - 64px); overflow-y: auto; padding: 1.75rem 0 2rem; }
.sidebar-space { display: flex; align-items: center; gap: .7rem; padding: .25rem .5rem 1rem; color: var(--ink); font-weight: 700; }
.sidebar-space:hover { text-decoration: none; }
.space-badge { width: 36px; height: 36px; border-radius: .8rem; display: grid; place-items: center; color: #fff; flex: none; }
.space-badge .icon { width: 18px; height: 18px; }
.tree { list-style: none; margin: 0; padding: 0; font-size: .925rem; }
.tree ul { list-style: none; margin: 0; padding-left: .9rem; border-left: 1px solid var(--border); margin-left: .9rem; }
.tree details > summary { list-style: none; }
.tree details > summary::-webkit-details-marker { display: none; }
.tree-row { display: flex; align-items: center; gap: .15rem; border-radius: .6rem; }
.tree-row:hover { background: var(--bg-soft); }
.tree-row a { flex: 1; color: var(--ink-2); padding: .35rem .5rem; border-radius: .6rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tree-row a:hover { text-decoration: none; color: var(--ink); }
.tree-row.current { background: var(--primary-soft); }
.tree-row.current a { color: var(--primary); font-weight: 600; }
.tree-caret { width: 22px; height: 22px; display: grid; place-items: center; color: var(--muted); cursor: pointer; border-radius: .4rem; flex: none; transition: transform .15s; }
.tree details[open] > summary .tree-caret { transform: rotate(90deg); }
.tree-spacer { width: 22px; flex: none; }
.tree-count { font-size: .72rem; color: var(--muted); background: var(--bg-soft); border: 1px solid var(--border); border-radius: 999px; padding: 0 .45rem; margin-right: .4rem; flex: none; }
.link-columns { columns: 3 220px; column-gap: 1.5rem; padding: 0; list-style: none; font-size: .92rem; }
.link-columns li { break-inside: avoid; padding: .15rem 0; }
.sidebar-actions { padding: 1rem .5rem 0; }

.content { padding: 2rem 0 5rem; min-width: 0; }
.toc { position: sticky; top: 64px; align-self: start; padding: 2.25rem 0; font-size: .85rem; max-height: calc(100vh - 64px); overflow-y: auto; }
.toc h4 { font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: .75rem; }
.toc a { display: block; color: var(--muted); padding: .25rem 0 .25rem .75rem; border-left: 2px solid var(--border); }
.toc a.lvl-3 { padding-left: 1.5rem; }
.toc a:hover, .toc a.active { color: var(--primary); border-left-color: var(--primary); text-decoration: none; }

/* ---------- Page ---------- */
.crumbs { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; font-size: .875rem; color: var(--muted); margin-bottom: 1rem; }
.crumbs a { color: var(--muted); }
.crumbs .sep { opacity: .5; }
.page-head { display: flex; gap: 1rem; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; margin-bottom: .5rem; }
.page-head h1 { font-size: clamp(1.9rem, 3vw, 2.6rem); margin: 0; }
.page-tools { display: flex; gap: .5rem; flex-wrap: wrap; }
.page-meta { display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: center; color: var(--muted); font-size: .875rem; margin: .75rem 0 2rem;
  padding-bottom: 1.25rem; border-bottom: 1px solid var(--border); }
.pill { display: inline-flex; align-items: center; gap: .35rem; font-size: .78rem; font-weight: 600; padding: .2rem .65rem; border-radius: 999px;
  background: var(--bg-soft); color: var(--ink-2); border: 1px solid var(--border); }
.pill-gdocs { background: #e8f5ec; color: #137333; border-color: #c7e8d1; }
.pill-confluence { background: #e9f0fe; color: #1d4ed8; border-color: #cbdafc; }
.pill-snowflake { background: #e0f2fe; color: #0369a1; border-color: #bae6fd; }
.pill-tableau { background: #fff1e6; color: #c2410c; border-color: #fed7aa; }
.pill-repo { background: #f1ecfd; color: #6d28d9; border-color: #ddd0fb; }
.pill-guide { background: #fdf2e3; color: #9a5b00; border-color: #f7dcb4; }
:root[data-theme="dark"] .pill-gdocs, :root[data-theme="dark"] .pill-confluence, :root[data-theme="dark"] .pill-guide, :root[data-theme="dark"] .pill-repo, :root[data-theme="dark"] .pill-tableau, :root[data-theme="dark"] .pill-snowflake { background: var(--bg-soft); border-color: var(--border); }

.prose { font-size: 1.02rem; color: var(--ink-2); max-width: 80ch; }
.prose h2 { font-size: 1.55rem; color: var(--ink); margin: 2.2rem 0 .8rem; scroll-margin-top: 84px; }
.prose h3 { font-size: 1.2rem; color: var(--ink); margin: 1.8rem 0 .6rem; scroll-margin-top: 84px; }
.prose h4 { font-size: 1.05rem; color: var(--ink); margin: 1.4rem 0 .5rem; }
.prose p, .prose ul, .prose ol, .prose table, .prose pre, .prose blockquote { margin: 0 0 1.1rem; }
.prose li { margin: .25rem 0; }
.prose code { font-family: var(--mono); font-size: .86em; background: var(--code-bg); padding: .12em .4em; border-radius: .4rem; color: var(--ink); }
.prose pre { background: #0b1220; color: #e2e8f0; padding: 1.1rem 1.25rem; border-radius: 1rem; overflow-x: auto; font-size: .85rem; line-height: 1.55; }
.prose pre code { background: none; padding: 0; color: inherit; font-size: inherit; }
.prose blockquote { border-left: 4px solid var(--primary); background: var(--primary-soft); margin-left: 0; padding: .8rem 1.1rem; border-radius: 0 1rem 1rem 0; color: var(--ink); }
.prose blockquote p:last-child { margin: 0; }
.prose table { border-collapse: separate; border-spacing: 0; width: 100%; font-size: .93rem; border: 1px solid var(--border); border-radius: 1rem; display: block; overflow-x: auto; width: max-content; max-width: 100%; }
.prose th, .prose td { padding: .6rem .9rem; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.prose th { background: var(--bg-soft); color: var(--ink); font-weight: 600; }
.prose tr:last-child td { border-bottom: none; }
.prose hr { border: none; border-top: 1px solid var(--border); margin: 2rem 0; }
.prose img { border-radius: 1rem; }
.prose a.mention { background: var(--primary-soft); padding: 0 .35em; border-radius: .4rem; font-weight: 600; }
.prose mark { background: #fff1a8; color: inherit; padding: 0 .15em; border-radius: .2em; }
.task { display: inline-grid; place-items: center; width: 1.05em; height: 1.05em; border: 2px solid var(--muted); border-radius: .3em; margin-right: .45em; vertical-align: -.15em; font-size: .8em; }
.task.done { background: var(--success); border-color: var(--success); color: #fff; }
.prose li:has(> .task) { list-style: none; margin-left: -1.3em; }

.section-title { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin: 3rem 0 1rem; }
.section-title h2 { font-size: 1.35rem; margin: 0; }

/* ---------- Cards ---------- */
.grid { display: grid; gap: 1rem; }
.grid-2 { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.4rem; transition: border-color .15s, box-shadow .15s, transform .15s; }
a.card { color: inherit; display: block; }
a.card:hover { text-decoration: none; border-color: color-mix(in srgb, var(--primary) 45%, var(--border)); box-shadow: var(--shadow); transform: translateY(-2px); }
.card h3 { font-size: 1.08rem; margin: 0 0 .35rem; color: var(--ink); }
.card p { margin: 0; color: var(--muted); font-size: .92rem; }
.card .meta { margin-top: .9rem; font-size: .8rem; color: var(--muted); display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.space-card { display: flex; flex-direction: column; gap: .9rem; min-height: 190px; }
.space-card .space-badge { width: 48px; height: 48px; border-radius: 1rem; }
.space-card .space-badge .icon { width: 24px; height: 24px; }
.space-card .count { margin-top: auto; font-size: .85rem; font-weight: 600; color: var(--ink-2); }

.list { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.list-item { display: flex; gap: 1rem; align-items: center; padding: 1rem 1.25rem; border-bottom: 1px solid var(--border); color: inherit; }
.list-item:last-child { border-bottom: none; }
a.list-item:hover { background: var(--bg-soft); text-decoration: none; }
.list-item .grow { flex: 1; min-width: 0; }
.list-item .title { font-weight: 600; color: var(--ink); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-item .sub { font-size: .85rem; color: var(--muted); }
.dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }

/* ---------- Hero ---------- */
.hero { position: relative; margin: 1.5rem auto 0; max-width: 1240px; border-radius: 2rem; overflow: hidden; color: #fff; min-height: 340px;
  background: #111 url("../img/hero.jpg") center/cover no-repeat; }
.hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, rgb(0 0 0 / .88) 0%, rgb(0 0 0 / .62) 45%, rgb(0 0 0 / .15) 100%); }
.hero-inner { position: relative; padding: 3.25rem 3rem; max-width: 680px; }
.hero .eyebrow { display: inline-flex; gap: .5rem; align-items: center; font-weight: 600; font-size: .85rem; background: rgb(255 255 255 / .12);
  border: 1px solid rgb(255 255 255 / .2); padding: .3rem .8rem; border-radius: 999px; margin-bottom: 1.25rem; }
.hero h1 { font-size: clamp(2.1rem, 4.4vw, 3.4rem); margin-bottom: .75rem; }
.hero h1 span { color: #5cb8ff; }
.hero p { font-size: 1.1rem; color: rgb(255 255 255 / .82); margin: 0 0 1.75rem; }
.hero-search { display: flex; gap: .5rem; background: #fff; border-radius: 999px; padding: .4rem; max-width: 560px; }
.hero-search input { flex: 1; border: none; background: none; font: inherit; font-size: 1.02rem; padding: 0 1rem; color: #0a0a0a; min-width: 0; }
.hero-search input:focus { outline: none; }
.hero-stats { display: flex; gap: 2rem; margin-top: 2rem; flex-wrap: wrap; }
.hero-stats b { display: block; font-size: 1.6rem; }
.hero-stats span { font-size: .85rem; color: rgb(255 255 255 / .7); }

/* ---------- People ---------- */
.avatar { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; flex: none; background: var(--primary-soft); color: var(--primary);
  display: grid; place-items: center; font-weight: 700; font-size: .95rem; overflow: hidden; }
.avatar-lg { width: 112px; height: 112px; font-size: 2.2rem; }
.avatar-md { width: 64px; height: 64px; font-size: 1.3rem; }
.person-card { text-align: center; display: flex; flex-direction: column; align-items: center; gap: .3rem; padding: 1.6rem 1.2rem; }
.person-card .avatar { margin-bottom: .6rem; }
.person-card h3 { margin: 0; }
.person-card .team { margin-top: .5rem; }
.people-strip { display: flex; gap: .75rem; flex-wrap: wrap; }
.people-strip a { display: flex; align-items: center; gap: .6rem; padding: .4rem .9rem .4rem .4rem; border: 1px solid var(--border); border-radius: 999px; color: var(--ink); font-weight: 500; font-size: .92rem; background: var(--card); }
.people-strip a:hover { border-color: var(--primary); text-decoration: none; }
.people-strip .avatar { width: 32px; height: 32px; font-size: .75rem; }
.filters { display: flex; gap: .5rem; flex-wrap: wrap; margin: 1.25rem 0 1.5rem; align-items: center; }
.chip { padding: .4rem .9rem; border-radius: 999px; border: 1px solid var(--border); color: var(--ink-2); font-size: .88rem; font-weight: 500; background: var(--card); }
.chip:hover { text-decoration: none; border-color: var(--ink-2); }
.chip.active { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.profile-head { display: flex; gap: 2rem; align-items: center; flex-wrap: wrap; padding: 2rem; border-radius: 2rem; background: var(--bg-soft); border: 1px solid var(--border); margin: 2rem 0; }
.profile-head h1 { margin: 0 0 .25rem; font-size: 2.2rem; }
.kv { display: grid; grid-template-columns: 140px 1fr; gap: .6rem 1rem; font-size: .95rem; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
.tags { display: flex; flex-wrap: wrap; gap: .4rem; }

/* ---------- Forms ---------- */
.field { display: grid; gap: .4rem; margin-bottom: 1.1rem; }
.field label { font-weight: 600; font-size: .9rem; }
.input, select.input, textarea.input { width: 100%; font: inherit; color: var(--ink); background: var(--card); border: 1px solid var(--border); border-radius: .9rem; padding: .7rem 1rem; }
.input:focus { outline: 2px solid var(--primary); outline-offset: -1px; border-color: transparent; }
.title-input { font-size: 2rem; font-weight: 700; border: none; padding: .25rem 0; background: transparent; border-radius: 0; letter-spacing: -.02em; }
.title-input:focus { outline: none; border-bottom: 2px solid var(--primary); }
.editor-bar { display: flex; gap: .75rem; align-items: center; justify-content: space-between; flex-wrap: wrap; position: sticky; top: 64px; z-index: 5;
  background: var(--bg); padding: 1rem 0; border-bottom: 1px solid var(--border); margin-bottom: 1.25rem; }
.editor-wrap .EasyMDEContainer .CodeMirror { border-radius: 0 0 1rem 1rem; border-color: var(--border); font-family: var(--mono); font-size: .92rem; min-height: 460px; background: var(--card); color: var(--ink); }
.editor-wrap .EasyMDEContainer .editor-toolbar { border-radius: 1rem 1rem 0 0; border-color: var(--border); background: var(--bg-soft); }
.editor-wrap .editor-toolbar button { color: var(--ink-2) !important; }
.editor-wrap .editor-preview { background: var(--card); }
.editor-wrap .CodeMirror-cursor { border-color: var(--ink); }

/* ---------- Auth ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.auth-art { position: relative; background: #111 url("../img/hero.jpg") center/cover; color: #fff; display: flex; align-items: flex-end; padding: 3rem; }
.auth-art::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgb(0 0 0 / .1), rgb(0 0 0 / .85)); }
.auth-art > * { position: relative; }
.auth-art h2 { font-size: 2.6rem; margin: 0 0 .5rem; }
.auth-art p { color: rgb(255 255 255 / .8); margin: 0; font-size: 1.1rem; }
.auth-form { display: flex; align-items: center; justify-content: center; padding: 2rem 1.5rem; background: var(--bg); }
.auth-box { width: 100%; max-width: 400px; }
.auth-box img { height: 30px; margin-bottom: 2.5rem; }
.auth-box h1 { font-size: 2rem; }

/* ---------- Comments ---------- */
.comments { margin-top: 3.5rem; max-width: 80ch; }
.comment { display: flex; gap: .9rem; padding: 1rem 0; border-bottom: 1px solid var(--border); }
.comment .avatar { width: 36px; height: 36px; font-size: .8rem; }
.comment-body { white-space: pre-wrap; color: var(--ink-2); margin-top: .2rem; }
.empty { text-align: center; padding: 3rem 1rem; color: var(--muted); border: 1px dashed var(--border); border-radius: var(--radius); }
.search-hit .snippet { color: var(--muted); font-size: .92rem; margin-top: .3rem; }
.search-hit mark { background: #fff1a8; color: inherit; border-radius: .2em; padding: 0 .1em; }
:root[data-theme="dark"] .search-hit mark, :root[data-theme="dark"] .prose mark { background: #5c4b00; }
.notice { background: var(--warn-bg); border: 1px solid color-mix(in srgb, #f59e0b 40%, transparent); border-radius: 1rem; padding: .9rem 1.1rem; font-size: .92rem; }

.footer { border-top: 1px solid var(--border); margin-top: 4rem; padding: 2rem 1.5rem; text-align: center; color: var(--muted); font-size: .85rem; }

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  .doc-layout { grid-template-columns: 260px minmax(0, 1fr); }
  .toc { display: none; }
}
@media (max-width: 860px) {
  .topbar-inner { padding: 0 1rem; gap: .75rem; }
  .mainnav { display: none; position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; background: var(--bg); border-bottom: 1px solid var(--border); padding: .75rem 1rem; }
  .mainnav.open { display: flex; }
  .btn.menu-toggle { display: inline-flex; }
  .topsearch kbd, .brand .tag, .new-page-label { display: none; }
  .doc-layout, .doc-layout.no-toc { grid-template-columns: minmax(0, 1fr); padding: 0 1rem; gap: 0; }
  .sidebar { position: static; height: auto; padding: 1rem 0 0; border-bottom: 1px solid var(--border); }
  .sidebar .tree { max-height: 260px; overflow-y: auto; }
  .container, .flashes { padding: 0 1rem; }
  .hero { margin: 1rem 1rem 0; border-radius: 1.5rem; }
  .hero-inner { padding: 2.25rem 1.5rem; }
  .auth { grid-template-columns: 1fr; }
  .auth-art { display: none; }
  .kv { grid-template-columns: 1fr; gap: .1rem; }
  .kv dd { margin-bottom: .6rem; }
  .profile-head { padding: 1.5rem; }
}

.slack-btn { width: 100%; background: #fff; color: #1d1c1d; border: 1px solid #ddd; box-shadow: 0 1px 2px rgb(0 0 0 / .06); }
.slack-btn:hover { background: #f8f8f8; }
