/* DesktopWiki. Colors come from the logo (as on desktopwiki.com): navy book cover, cream pages, amber edge, red bookmark.
   The frame is laid out like Confluence 6 (milestone 4b): a top bar, a left sidebar and the page, in DesktopWiki's
   own colors and icons (light: classic Outlook's grays). Light or dark follows the device's setting, unless the top bar's toggle chose one: then <html data-theme="light|dark">
   (from the dw_theme cookie, set by theme.js) wins. Each dark rule is written twice: for the device's setting when no
   light theme was chosen, and for a chosen dark theme.
   No inline styles anywhere: the Content Security Policy allows only this file. */

:root {
  /* Light: classic Outlook's grays, as InCloseMail's Light theme (the user, 11/18/2026: "light mode is too white"):
     a dark gray top bar and sidebar, a gray page, white boxes and inputs. The White look has the all-white colors
     DesktopWiki had before. Same values as ThemeCatalog's DesktopWiki look. */
  --bg: #d4d4d4;
  --surface: #ffffff;
  --subtle: #e6e6e6;
  --sidebar-bg: #5e5e5e;
  --hover: rgba(0, 0, 0, 0.07);
  --active-bg: #b1d6f0;
  --text: #1f1f1f;
  --muted: #4a4a4a;
  --border: #b4b4b4;
  --link: #005a9e;
  --header-bg: #444444;
  --header-text: #ffffff;
  --header-hover: rgba(255, 255, 255, 0.14);
  --create-bg: #f2a93b;
  --create-text: #1e2333;
  --accent: #f2a93b;
  --danger: #b3321b;
  --danger-bg: #fbe9e5;
  --ok: #1f7a4a;
  --ok-bg: #e4f4ea;
  --note-bg: #fff6e3;
  --mark-bg: #fbe0a1;
  --button: #0072c6;
  --button-text: #ffffff;
  --code-bg: #e6e6e6;
  --shadow: 0 6px 24px rgba(20, 24, 40, 0.18);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #141720;
    --surface: #171a24;
    --subtle: #252831;
    --sidebar-bg: #252831;
    --hover: rgba(255, 255, 255, 0.07);
    --active-bg: #232a45;
    --text: #eceef5;
    --muted: #a7adc2;
    --border: #2a2f42;
    --link: #9fb2ff;
    --header-bg: #0a0c12;
    --danger: #ff9b85;
    --danger-bg: #3a1f1a;
    --ok: #8fdcb0;
    --ok-bg: #18301f;
    --note-bg: #332a14;
    --mark-bg: #5c4614;
    --button: #6f86e8;
    --button-text: #0f1220;
    --code-bg: #262a3d;
    --shadow: 0 6px 24px rgba(0, 0, 0, 0.6);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #141720;
  --surface: #171a24;
  --subtle: #252831;
  --sidebar-bg: #252831;
  --hover: rgba(255, 255, 255, 0.07);
  --active-bg: #232a45;
  --text: #eceef5;
  --muted: #a7adc2;
  --border: #2a2f42;
  --link: #9fb2ff;
  --header-bg: #0a0c12;
  --danger: #ff9b85;
  --danger-bg: #3a1f1a;
  --ok: #8fdcb0;
  --ok-bg: #18301f;
  --note-bg: #332a14;
  --mark-bg: #5c4614;
  --button: #6f86e8;
  --button-text: #0f1220;
  --code-bg: #262a3d;
  --shadow: 0 6px 24px rgba(0, 0, 0, 0.6);
  color-scheme: dark;
}

/* DesktopWiki's own look in light (no data-look, or an empty one): its dark gray sidebar has white words, as Outlook's folders.
   Written twice: for the device's light setting when dark wasn't chosen, and for a chosen light theme. */
@media (prefers-color-scheme: light) {
  :root:not([data-look]:not([data-look=""])):not([data-theme="dark"]) .sidebar {
    --surface: #4f4f4f; --text: #ffffff; --muted: #d0d0d0; --border: #757575; --link: #ffffff;
    --hover: rgba(255, 255, 255, 0.12); --active-bg: #3c3c3c; color: var(--text);
  }
  /* What opens from the sidebar (its menus) is drawn as everywhere else. */
  :root:not([data-look]:not([data-look=""])):not([data-theme="dark"]) .sidebar .menu-panel {
    --surface: #ffffff; --text: #1f1f1f; --muted: #4a4a4a; --border: #b4b4b4; --link: #005a9e;
    --hover: rgba(0, 0, 0, 0.07); --active-bg: #b1d6f0;
  }
}
:root:not([data-look]:not([data-look=""]))[data-theme="light"] .sidebar {
  --surface: #4f4f4f; --text: #ffffff; --muted: #d0d0d0; --border: #757575; --link: #ffffff;
  --hover: rgba(255, 255, 255, 0.12); --active-bg: #3c3c3c; color: var(--text);
}
:root:not([data-look]:not([data-look=""]))[data-theme="light"] .sidebar .menu-panel {
  --surface: #ffffff; --text: #1f1f1f; --muted: #4a4a4a; --border: #b4b4b4; --link: #005a9e;
  --hover: rgba(0, 0, 0, 0.07); --active-bg: #b1d6f0;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
}
/* Japanese, Korean and Chinese draw the same characters differently, and Segoe UI has none of them: each gets
   Windows' own UI font for it first (then Apple's and Android's), by the page's language or a lang attribute. */
body:lang(ja) { font-family: "Segoe UI", "Yu Gothic UI", Meiryo, "Hiragino Sans", "Noto Sans JP", system-ui, sans-serif; }
body:lang(ko) { font-family: "Segoe UI", "Malgun Gothic", "Apple SD Gothic Neo", "Noto Sans KR", system-ui, sans-serif; }
body:lang(zh-Hans) { font-family: "Segoe UI", "Microsoft YaHei UI", "Microsoft YaHei", "PingFang SC", "Noto Sans SC", system-ui, sans-serif; }
body:lang(zh-Hant) { font-family: "Segoe UI", "Microsoft JhengHei UI", "Microsoft JhengHei", "PingFang TC", "Noto Sans TC", system-ui, sans-serif; }
:lang(ja) em, :lang(ko) em, :lang(zh-Hans) em, :lang(zh-Hant) em { font-style: normal; font-weight: 600; }

a { color: var(--link); }

code {
  font-family: Consolas, "Cascadia Mono", ui-monospace, monospace;
  background: var(--code-bg);
  padding: 0.1em 0.35em;
  border-radius: 4px;
  font-size: 0.92em;
  overflow-wrap: anywhere;
}

h1 { font-size: 1.6rem; line-height: 1.25; margin: 0 0 12px; }
h2 { font-size: 1.2rem; margin: 24px 0 8px; }

.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link { position: absolute; left: -10000px; top: 0; z-index: 50; background: var(--surface); padding: 8px 12px; }
.skip-link:focus { left: 8px; }

.icon { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vertical-align: -4px; }
.icon .fill { fill: currentColor; stroke: none; }
.icon.small { width: 16px; height: 16px; vertical-align: -3px; }

.badge {
  background: var(--accent);
  color: #1e2333;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.1em 0.6em;
  border-radius: 999px;
}

/* Demo banner */
.demo-banner { background: var(--accent); color: #1e2333; font-size: 0.92rem; }
.demo-banner-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding: 6px 16px; }
.demo-banner select { max-width: 100%; }
.notice-banner { background: var(--note-bg); border-bottom: 1px solid var(--border); font-size: 0.92rem; padding: 6px 16px; }
.notice-banner p { margin: 2px 0; }
.notice-banner.ended { background: var(--danger-bg); }
.demo-banner code { background: rgba(255, 255, 255, 0.7); color: #1e2333; padding: 1px 5px; border-radius: 4px; }
.demo-banner a.demo-homepage { color: #1e2333; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }

/* ----- The top bar ----- */
.topbar {
  display: flex; align-items: center; gap: 4px 6px; flex-wrap: wrap;
  min-height: 56px; padding: 6px 12px;
  background: var(--header-bg); color: var(--header-text);
  position: sticky; top: 0; z-index: 20;
}
@media (min-width: 800px) { .topbar { flex-wrap: nowrap; height: 56px; } }
.topbar .brand { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; min-width: 0; padding: 4px 8px 4px 4px; border-radius: 6px; }
.topbar .brand:hover { background: var(--header-hover); }
.topbar .brand img { width: 32px; height: 32px; flex: none; }
.topbar .brand img.wiki-logo { width: auto; max-width: 200px; object-fit: contain; }
@media (max-width: 600px) { .topbar .brand img.wiki-logo { max-width: 96px; } }
/* A theme's picture for today, beside the wiki's name (Themes/ThemeStore PictureOn); hidden on narrow phones. */
.topbar .brand img.theme-picture { width: auto; max-width: 160px; object-fit: contain; flex: none; }
@media (max-width: 480px) { .topbar .brand img.theme-picture { display: none; } }
.logo-preview { height: 32px; width: auto; max-width: 200px; object-fit: contain; flex: none; }
/* One line: when the top bar runs short of room (a narrow desktop window), Search gets narrower first and then
   the name ends in "…"; it used to wrap one letter per line down over the sidebar. */
.topbar .name { font-weight: 600; font-size: 1.05rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.topnav { display: flex; align-items: center; gap: 6px; margin-left: 8px; }
.topnav > .menu > summary, .topnav-link, .topbar .icon-button, .topbar .avatar-button {
  display: inline-flex; align-items: center; gap: 4px; padding: 8px 10px; border-radius: 6px;
  color: var(--header-text); background: none; border: none; cursor: pointer; font: inherit; line-height: 1.2; text-decoration: none;
}
.topnav > .menu > summary:hover, .topnav-link:hover, .topnav-link.active, .topbar .icon-button:hover, .topbar .avatar-button:hover, .topbar details[open] > summary { background: var(--header-hover); }
.topbar .avatar-button { padding: 4px; border-radius: 999px; }
.create-button { display: inline-block; padding: 7px 16px; border-radius: 6px; background: var(--create-bg); color: var(--create-text); font-weight: 600; text-decoration: none; }
.create-button:hover { filter: brightness(1.07); }
/* Create from template, Confluence's ⋯ beside Create. */
.create-more { display: inline-flex; align-items: center; margin-left: 4px; padding: 7px 8px; border-radius: 6px; background: var(--create-bg); color: var(--create-text); }
.create-more:hover { filter: brightness(1.07); }
.create-menu { display: inline-block; }
.create-menu > summary { list-style: none; cursor: pointer; }
.create-menu > summary::-webkit-details-marker { display: none; }
.create-menu > .menu-panel { min-width: 220px; }
.topbar-right { display: flex; align-items: center; gap: 4px; margin-left: auto; min-width: 0; }
/* Bookmarks on the top bar, lit while Bookmarks is open. */
.topbar .icon-button[aria-current="page"] { background: var(--header-hover); }
.topbar .icon { width: 22px; height: 22px; }
.topbar .icon.small { width: 16px; height: 16px; }

/* The theme toggle shows the icon of the theme it switches to. */
.theme-toggle[hidden] { display: none; }
.theme-toggle .when-dark { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .when-dark { display: inline; }
  :root:not([data-theme="light"]) .theme-toggle .when-light { display: none; }
}
:root[data-theme="dark"] .theme-toggle .when-dark { display: inline; }
:root[data-theme="dark"] .theme-toggle .when-light { display: none; }

/* Quick page search */
.quick-search { position: relative; display: flex; align-items: center; }
.quick-search[hidden] { display: none; }
.quick-search > .icon { position: absolute; left: 10px; color: var(--muted); width: 18px; height: 18px; pointer-events: none; }
.quick-search input {
  width: 240px; max-width: 40vw; padding: 7px 10px 7px 34px; border-radius: 6px;
  border: 1px solid transparent; background: var(--surface); color: var(--text); font: inherit; font-size: 0.95rem;
}
/* In a narrower window Search narrows with it, from 240px down to 120px, and then the name gives way ("…"). The right
   side never shrinks below what it holds, so Search can't spill over the icons beside it (flex shrinking let it). */
@media (min-width: 800px) {
  .topbar-right { flex: none; }
  .quick-search input { width: clamp(120px, calc(100vw - 820px), 240px); max-width: none; }
}
/* A narrow desktop window: the icons (light/dark, Bookmarks, Notes, Calendar, the bell, settings) sit closer, so the
   top bar still fits 800px once Search is at its narrowest (Calendar's icon made it 24px too wide). */
@media (min-width: 800px) and (max-width: 959px) {
  .topbar .icon-button { padding: 8px 6px; }
  /* The sidebar button and Help (11/21/2026) left no room: Notes and Calendar step aside here; both are in the
     sidebar on every screen (one sidebar everywhere, milestone 60). */
  .topbar .topbar-notes, .topbar .topbar-calendar { display: none; }
}
.quick-search-results {
  position: absolute; top: calc(100% + 6px); right: 0; z-index: 30; width: min(380px, 90vw);
  list-style: none; margin: 0; padding: 6px; border-radius: 8px;
  background: var(--surface); color: var(--text); border: 1px solid var(--border); box-shadow: var(--shadow);
}
.quick-search-results[hidden] { display: none; }
.quick-search-results a { display: flex; justify-content: space-between; gap: 12px; padding: 7px 10px; border-radius: 6px; color: var(--text); text-decoration: none; }
.quick-search-results a:hover, .quick-search-results a[aria-selected="true"] { background: var(--active-bg); }
.quick-search-results .where { color: var(--muted); font-size: 0.85rem; flex: none; }
.quick-search-results .none { padding: 7px 10px; color: var(--muted); }
.quick-search-results .heading { padding: 6px 10px 4px; color: var(--muted); font-size: 0.78rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.quick-search-results a { flex-direction: column; justify-content: flex-start; gap: 2px; }
.quick-search-results .line { display: flex; justify-content: space-between; gap: 12px; min-width: 0; }
.quick-search-results .title { overflow-wrap: anywhere; }
.quick-search-results .snippet {
  color: var(--muted); font-size: 0.85rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.quick-search-results a.all { color: var(--link); border-top: 1px solid var(--border); border-radius: 0 0 6px 6px; margin-top: 4px; }
mark { background: var(--mark-bg); color: inherit; border-radius: 2px; padding: 0 1px; }

/* The search page */
.search-form { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 8px; max-width: 920px; }
.search-form input[type="search"] { flex: 1 1 260px; min-width: 0; }
.search-form select { flex: 0 1 160px; min-width: 0; }
.search-form .search-archived { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.archived-mark { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); }
.archived-mark svg { width: 14px; height: 14px; }
.archived-note p { margin: 0; }
.archived-note p > svg { width: 18px; height: 18px; vertical-align: -3px; margin-right: 4px; }
.archived-note form { margin-top: 8px; }
.search-results { list-style: none; margin: 8px 0 0; padding: 0; max-width: 760px; }
.search-results > li { display: flex; align-items: flex-start; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.search-results > li > div { min-width: 0; }
.search-title { font-size: 1.08rem; font-weight: 600; text-decoration: none; overflow-wrap: anywhere; }
.search-title:hover { text-decoration: underline; }
.search-snippet { margin: 3px 0 0; overflow-wrap: anywhere; }
.search-meta { margin: 3px 0 0; color: var(--muted); font-size: 0.85rem; }
.search-files-heading { font-size: 1.1rem; margin: 24px 0 6px; }

/* Drop-down menus (<details class="menu">) */
.menu { position: relative; }
.menu > summary { list-style: none; }
.menu > summary::-webkit-details-marker { display: none; }
.menu-panel {
  position: absolute; top: calc(100% + 6px); left: 0; z-index: 30; min-width: 230px; max-width: 90vw;
  padding: 6px 0; border-radius: 8px; background: var(--surface); color: var(--text);
  border: 1px solid var(--border); box-shadow: var(--shadow);
}
.menu.align-right > .menu-panel { left: auto; right: 0; }
.menu.opens-up > .menu-panel { top: auto; bottom: calc(100% + 6px); }
.menu-panel a, .menu-panel .menu-item {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 7px 16px;
  color: var(--text); text-decoration: none; background: none; border: none; border-radius: 0; font: inherit; text-align: left; cursor: pointer;
}
.menu-panel a:hover, .menu-panel .menu-item:hover, .menu-panel a:focus-visible { background: var(--hover); }
.menu-panel .menu-item.danger, .menu-panel a.danger { color: var(--danger); }
.menu-panel hr { border: none; border-top: 1px solid var(--border); margin: 6px 0; }
.menu-panel form { margin: 0; }
.menu-heading { margin: 4px 16px 6px; color: var(--muted); font-size: 0.75rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; }

/* Avatars and space tiles: initials on one of eight colors. */
.avatar, .tile { display: inline-flex; align-items: center; justify-content: center; flex: none; color: #fff; font-weight: 600; background: var(--tint); }
.avatar { width: 32px; height: 32px; border-radius: 999px; font-size: 0.8rem; }
.avatar.large { width: 44px; height: 44px; font-size: 1rem; }
.tile { width: 40px; height: 40px; border-radius: 8px; font-size: 0.95rem; }
.tile.small { width: 22px; height: 22px; border-radius: 5px; font-size: 0.65rem; }
.tint-0 { --tint: #2a3f94; } .tint-1 { --tint: #b3321b; } .tint-2 { --tint: #1f7a4a; } .tint-3 { --tint: #8a4fb8; }
.tint-4 { --tint: #c06d0c; } .tint-5 { --tint: #1d7a8c; } .tint-6 { --tint: #a33a6e; } .tint-7 { --tint: #4f5d75; }

/* A space's own color (milestone 85, Space details → Color; Wiki/SpaceColors.cs): on the space's pages, a stripe under
   the top bar and the mark beside the current page in the tree, in the tile's color (lighter in dark, to show on the
   dark top bar). <html data-space-color> is empty when the space has none. */
:root[data-space-color="navy"] { --space-color: #2a3f94; }
:root[data-space-color="red"] { --space-color: #b3321b; }
:root[data-space-color="green"] { --space-color: #1f7a4a; }
:root[data-space-color="purple"] { --space-color: #8a4fb8; }
:root[data-space-color="orange"] { --space-color: #c06d0c; }
:root[data-space-color="teal"] { --space-color: #1d7a8c; }
:root[data-space-color="rose"] { --space-color: #a33a6e; }
:root[data-space-color="slate"] { --space-color: #4f5d75; }
@media (prefers-color-scheme: dark) {
  :root[data-space-color="navy"]:not([data-theme="light"]) { --space-color: #7d93f0; }
  :root[data-space-color="red"]:not([data-theme="light"]) { --space-color: #f0806b; }
  :root[data-space-color="green"]:not([data-theme="light"]) { --space-color: #5fcf8f; }
  :root[data-space-color="purple"]:not([data-theme="light"]) { --space-color: #b994e0; }
  :root[data-space-color="orange"]:not([data-theme="light"]) { --space-color: #f0a050; }
  :root[data-space-color="teal"]:not([data-theme="light"]) { --space-color: #5ac3d6; }
  :root[data-space-color="rose"]:not([data-theme="light"]) { --space-color: #e07fae; }
  :root[data-space-color="slate"]:not([data-theme="light"]) { --space-color: #a2b0c8; }
}
:root[data-space-color="navy"][data-theme="dark"] { --space-color: #7d93f0; }
:root[data-space-color="red"][data-theme="dark"] { --space-color: #f0806b; }
:root[data-space-color="green"][data-theme="dark"] { --space-color: #5fcf8f; }
:root[data-space-color="purple"][data-theme="dark"] { --space-color: #b994e0; }
:root[data-space-color="orange"][data-theme="dark"] { --space-color: #f0a050; }
:root[data-space-color="teal"][data-theme="dark"] { --space-color: #5ac3d6; }
:root[data-space-color="rose"][data-theme="dark"] { --space-color: #e07fae; }
:root[data-space-color="slate"][data-theme="dark"] { --space-color: #a2b0c8; }
:root[data-space-color]:not([data-space-color=""]) .topbar { box-shadow: inset 0 -4px 0 var(--space-color); }
:root[data-space-color]:not([data-space-color=""]) .page-tree a.current { box-shadow: inset 4px 0 0 var(--space-color); }

/* Space details → Color: the choices as swatches, each a radio button with the color's name beside it. */
.space-colors { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 4px 0 12px; padding: 0; border: 0; }
.space-colors label { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.space-colors .swatch { width: 22px; height: 22px; border-radius: 5px; background: var(--tint); flex: none; }
.space-colors .swatch.none { background: var(--subtle); border: 1px dashed var(--border); }

/* ----- The frame: sidebar and page ----- */
.app { min-height: calc(100vh - 56px); }
.app.has-sidebar {
  display: grid; grid-template-columns: var(--sidebar-w, 280px) minmax(0, 1fr);
  /* The sidebar's color runs the whole height of the page, however long it is. */
  background: linear-gradient(to right, var(--sidebar-bg) calc(var(--sidebar-w, 280px) - 1px), var(--border) calc(var(--sidebar-w, 280px) - 1px), var(--border) var(--sidebar-w, 280px), var(--bg) var(--sidebar-w, 280px));
}
/* Hidden by the top bar's button in the upper left (Confluence Cloud's; the user, 11/21/2026): the page takes the whole width. */
.app.has-sidebar.sidebar-collapsed { grid-template-columns: minmax(0, 1fr); background: var(--bg); }
.app.sidebar-collapsed > .sidebar { display: none; }
.sidebar-toggle { margin-right: 2px; }
.sw-200 { --sidebar-w: 200px; } .sw-220 { --sidebar-w: 220px; } .sw-240 { --sidebar-w: 240px; } .sw-260 { --sidebar-w: 260px; }
.sw-280 { --sidebar-w: 280px; } .sw-300 { --sidebar-w: 300px; } .sw-320 { --sidebar-w: 320px; } .sw-340 { --sidebar-w: 340px; }
.sw-360 { --sidebar-w: 360px; } .sw-380 { --sidebar-w: 380px; } .sw-400 { --sidebar-w: 400px; } .sw-420 { --sidebar-w: 420px; }
.sw-440 { --sidebar-w: 440px; } .sw-460 { --sidebar-w: 460px; } .sw-480 { --sidebar-w: 480px; }

.sidebar {
  position: sticky; top: 56px; height: calc(100vh - 56px); display: flex; flex-direction: column; min-width: 0;
  background: var(--sidebar-bg); border-right: 1px solid var(--border); font-size: 0.95rem;
}
.sidebar-scroll { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 16px 12px; }
.sidebar-foot { display: flex; align-items: center; gap: 6px; padding: 8px 12px; border-top: 1px solid var(--border); }
.sidebar-foot .menu { flex: 1; min-width: 0; }
.sidebar-foot .menu > summary { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 6px; cursor: pointer; color: var(--text); }
.sidebar-foot .menu > summary:hover { background: var(--hover); }
.icon-button { display: inline-flex; align-items: center; justify-content: center; padding: 6px; border: none; border-radius: 6px; background: none; color: var(--muted); cursor: pointer; }
.sidebar .icon-button:hover { background: var(--hover); color: var(--text); }

.sidebar-resize { position: absolute; top: 0; right: -4px; width: 8px; height: 100%; cursor: col-resize; z-index: 5; }
.sidebar-resize:hover, .sidebar-resize:focus-visible, .resizing .sidebar-resize { background: color-mix(in srgb, var(--link) 35%, transparent); outline: none; }
.resizing { user-select: none; cursor: col-resize; }

.side-heading { display: flex; justify-content: space-between; margin: 18px 8px 6px; color: var(--muted); font-size: 0.75rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; }
.side-heading:first-child { margin-top: 0; }
.side-heading a { text-decoration: none; }
.side-item { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 6px; color: var(--text); text-decoration: none; overflow-wrap: anywhere; }
.side-item[hidden] { display: none; }
.side-item:hover { background: var(--hover); }
.side-item.active { background: var(--active-bg); font-weight: 600; }
.side-item .icon { color: var(--muted); }
/* Someone waits for an admin's help with their vaults. */
.side-item.side-alert { font-weight: 600; }
.side-item.side-alert .icon { color: var(--danger); }

.space-head { display: flex; align-items: center; gap: 12px; padding: 4px 8px 12px; color: var(--text); text-decoration: none; }
.space-head .space-name { display: block; font-weight: 600; color: var(--link); overflow-wrap: anywhere; line-height: 1.3; }
.space-head .space-kind { display: block; color: var(--muted); font-size: 0.8rem; }

.page-tree ul { list-style: none; margin: 0; padding: 0; }
.page-tree ul ul { padding-left: 16px; }
.page-tree li { margin: 0; }
.page-tree summary { display: flex; align-items: flex-start; list-style: none; cursor: default; }
.page-tree summary::-webkit-details-marker { display: none; }
.page-tree .twisty { width: 16px; height: 16px; margin: 6px 2px 0 0; color: var(--muted); cursor: pointer; transition: transform 0.12s; }
.page-tree details[open] > summary .twisty { transform: rotate(90deg); }
.page-tree .leaf { display: inline-block; width: 18px; flex: none; }
.page-tree li > .leaf + a, .page-tree li > a { display: inline; }
.page-tree a { display: inline-block; padding: 3px 6px; border-radius: 5px; color: var(--link); text-decoration: none; overflow-wrap: anywhere; line-height: 1.4; }
.page-tree a:hover { background: var(--hover); text-decoration: underline; }
.page-tree a.current { background: var(--active-bg); color: var(--text); font-weight: 600; }
.page-tree .lock-mark { width: 14px; height: 14px; margin: 6px 0 0 4px; color: var(--muted); }
.side-create { display: inline-flex; align-items: center; gap: 6px; margin: 10px 6px 0; text-decoration: none; }

.sidebar-backdrop { display: none; }

.content { min-width: 0; }
.content-inner { max-width: 920px; padding: 24px 40px 64px; }
.content-inner.wide { max-width: 1320px; }
.content-inner.full { max-width: none; }
.app:not(.has-sidebar) .content-inner { margin: 0 auto; } /* setup and sign-in: centered, as before */
.topbar .phone-only { display: none; }

@media (max-width: 799px) {
  .topbar .phone-only { display: inline-flex; }
  .app.has-sidebar, .app.sidebar-collapsed { display: block; background: var(--bg); }
  .sidebar {
    position: fixed; top: 0; left: 0; bottom: 0; z-index: 40; width: min(320px, 86vw); height: auto;
    transform: translateX(-105%); transition: transform 0.18s ease-out; box-shadow: var(--shadow);
  }
  .sidebar-open .sidebar { transform: none; }
  .app.sidebar-collapsed > .sidebar { display: flex; }
  .sidebar-resize { display: none; }
  .sidebar-open .sidebar-backdrop { display: block; position: fixed; inset: 0; z-index: 35; background: rgba(0, 0, 0, 0.4); }
  .content-inner { padding: 16px 16px 48px; }
  .topbar .name { font-size: 0.95rem; }
  .quick-search input { width: 150px; }
}
@media (max-width: 799px) { .topbar { position: static; } }
@media (max-width: 520px) {
  .topbar { gap: 2px; padding: 6px 8px; }
  .topbar .badge, .topbar .name { display: none; }
  .topnav { margin-left: 0; }
  .topnav > .menu > summary, .topnav-link { padding: 8px 6px; }
  .create-button { padding: 7px 12px; }
  .create-more { display: none; } /* room for Search; the editor's "Start from a template" gets there too */
  /* Search takes what's left of its row, so a longer word ("Rechercher", "Pesquisar") isn't cut off. */
  .topbar-right { flex: 1 1 auto; }
  .quick-search { flex: 1 1 104px; min-width: 0; }
  .quick-search input { width: 100%; max-width: none; }
  /* The list spans the top bar instead of hanging off the box, which may sit mid-screen. */
  .topbar { position: relative; }
  .quick-search { position: static; }
  .quick-search > .icon { position: relative; left: 0; margin: 0 -28px 0 10px; z-index: 1; flex: none; }
  .quick-search-results { left: 8px; right: 8px; width: auto; top: calc(100% + 4px); }
  .topbar .icon-button { padding: 6px; }
}
@media (max-width: 520px) {
  /* The page's actions stay on one line on a phone: Bookmark and Watch show only their icons there (the words
     stay for screen readers). */
  .page-actions .action-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}

/* Cards and text */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px 24px;
  margin-bottom: 16px;
}
@media (max-width: 520px) { .card { padding: 16px; } }

.muted { color: var(--muted); }
.small-text { font-size: 0.9rem; }

.alert { border-radius: 6px; padding: 10px 14px; margin: 0 0 16px; }
.alert.error { background: var(--danger-bg); color: var(--danger); }
.alert.ok { background: var(--ok-bg); color: var(--ok); }
.alert.note { background: var(--note-bg); }

dl.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; }
dl.facts dt { color: var(--muted); }
dl.facts dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 520px) {
  dl.facts { grid-template-columns: 1fr; gap: 0; }
  dl.facts dd { margin-bottom: 8px; }
}

/* Forms */
form.inline { display: inline-flex; align-items: center; gap: 6px; margin: 0; }
.field { margin: 0 0 16px; }
.field > label, .field > .label, .field > legend { display: block; font-weight: 600; margin-bottom: 4px; }
.field .hint { color: var(--muted); font-size: 0.9rem; margin: 4px 0 0; }
.field .error-text { color: var(--danger); font-size: 0.9rem; margin: 4px 0 0; }

input[type=text], input[type=password], input[type=number], input[type=tel], input[type=email], .search-form input[type=search], .people-search input[type=search], select {
  font: inherit;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 10px;
  width: 100%;
  max-width: 420px;
}
input[type=number] { max-width: 140px; }
/* Search, date, time and web address boxes no other rule styles (Configuration → Audit log, Message for everyone's last
   day, a page's review date, page analytics, the page tree's filter, a database's search) look like the rest, not the
   browser's own gray inset box. :where() keeps it weaker than every other rule, so their widths and spacing stay. */
:where(input[type=search], input[type=date], input[type=time], input[type=datetime-local], input[type=url]) {
  font: inherit;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px 10px;
  max-width: 420px;
}
/* Show password (Ui.ShowPasswordButton): the eye sits inside the box's right end. */
.password-box { position: relative; max-width: 420px; }
.password-box input { width: 100%; max-width: none; padding-right: 44px; }
.password-box .show-password { position: absolute; top: 50%; right: 4px; transform: translateY(-50%); min-width: 36px; min-height: 36px; }
.show-password .when-shown, .show-password[aria-pressed=true] .when-hidden { display: none; }
.show-password[aria-pressed=true] .when-shown { display: inline-flex; }
.show-password .when-hidden { display: inline-flex; }
.show-password[hidden] { display: none; } /* the vault's unlock box while it takes a recovery key */
/* Configuration's pages: the section's name over its boxes (Pages/Admin/Settings.cshtml). */
.config-title { margin: 0 0 16px; }
.demo-banner select { width: auto; padding: 2px 6px; }
input:focus, select:focus, button:focus { outline: 2px solid var(--link); outline-offset: 1px; }
input:disabled, select:disabled, button:disabled { opacity: 0.6; }
button:disabled { cursor: not-allowed; }

.choice { display: flex; gap: 10px; align-items: flex-start; margin: 8px 0; }
.choice input { margin-top: 5px; flex: none; }
.choice .hint { margin: 0; display: block; color: var(--muted); font-size: 0.92rem; }
.card > h2:first-child { margin-top: 0; }
.choice.disabled { opacity: 0.6; }
/* A choice that goes with the one above it (People → a person: Disabled, then the time to take their Private vault). */
.choice.nested-choice { margin-left: 28px; }
.choice input.keep-number { width: 6.5em; margin: 0 6px; padding: 2px 6px; display: inline-block; vertical-align: baseline; }
.choice.confirm-trim { border-left: 3px solid var(--danger, #c0392b); padding-left: 10px; }

.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

button, .button {
  font: inherit;
  display: inline-block;
  border: 1px solid var(--button);
  background: var(--button);
  color: var(--button-text);
  border-radius: 6px;
  padding: 8px 18px;
  cursor: pointer;
  text-decoration: none;
}
button.secondary, .button.secondary { background: transparent; color: var(--link); }
button.danger { background: var(--danger); border-color: var(--danger); color: #fff; }
/* A button whose form is being sent (data-busy in shell.js): its new words and a small spinner. */
button.busy { cursor: progress; opacity: 0.85; }
button.busy::before {
  content: ""; display: inline-block; width: 0.9em; height: 0.9em; margin-right: 0.45em; vertical-align: -0.1em;
  border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: busy-spin 0.8s linear infinite;
}
@keyframes busy-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { button.busy::before { animation-duration: 2.4s; } }
button.small { padding: 2px 10px; font-size: 0.9rem; background: var(--surface); color: var(--text); border-color: var(--border); }
button.link { background: none; border: none; padding: 0; color: var(--link); text-decoration: underline; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
/* The editor's bottom bar: the version note and Notify watchers. */
.save-bar { border-top: 1px solid var(--border); padding-top: 14px; margin-top: 4px; }
.save-bar .field { margin-bottom: 8px; }
.save-bar .field > label .hint { font-weight: 400; }

fieldset.plain { border: none; padding: 0; margin: 0; min-width: 0; }
.field.plain > legend { padding: 0; }

/* Wizard */
.default-submit { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.steps { list-style: none; padding: 0; margin: 0 0 16px; display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 0.85rem; color: var(--muted); }
.steps li.current { color: var(--text); font-weight: 600; }
.steps li.done::before { content: "✓ "; color: var(--ok); }
/* Setup's language, on its first page: the list and its button side by side. */
.setup-language { margin: 24px 0 0; }
.inline-fields { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.inline-fields select { width: auto; min-width: 12rem; }

/* Tables */
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-size: 0.9rem; }

.qr { display: block; width: 200px; height: 200px; image-rendering: pixelated; background: #fff; padding: 8px; border-radius: 6px; }

/* The certificate page: one big button for this device's file, and links to the other devices' steps. */
a.button.big { display: block; max-width: 420px; margin: 20px 0 8px; padding: 14px 24px; font-size: 1.15rem; font-weight: 600; text-align: center; }
.device-links { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 20px 0 8px; padding-top: 14px; border-top: 1px solid var(--border); }

.platforms h2 { margin-top: 20px; }
.platforms ol { padding-left: 1.3em; }

/* Spaces and pages */
.page-body { overflow-wrap: anywhere; }
textarea {
  font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--border);
  border-radius: 6px; padding: 8px 10px; width: 100%; resize: vertical;
}
pre.conflict { white-space: pre-wrap; overflow-wrap: anywhere; background: var(--surface); color: var(--text); padding: 10px; border-radius: 6px; max-height: 300px; overflow: auto; }

.people-picks { padding-left: 28px; margin-bottom: 8px; }
fieldset.people-picks { border: 0; margin: 0 0 8px; padding: 0 0 0 28px; min-width: 0; }
fieldset.people-picks legend { padding: 0; font-weight: 600; font-size: 0.92rem; }
fieldset.people-picks[hidden] { display: none; }
#this-browser button[hidden] { display: none; } /* Your account → Notifications: one of Turn on and Turn off at a time */
.create-space .space-key { text-transform: uppercase; max-width: 16em; }
.create-space .space-key::placeholder { text-transform: uppercase; }
.create-space .key-address { font-family: var(--mono, ui-monospace, Consolas, monospace); }
.create-space [aria-invalid="true"] { border-color: var(--danger); }

/* Page content: shown pages and the editor alike. */
.page-body h1, .page-body h2, .page-body h3, .page-body h4 { margin: 1.2em 0 0.4em; line-height: 1.3; }
.page-body > :first-child { margin-top: 0; }
.page-body blockquote { margin: 1em 0; padding: 0 0 0 14px; border-left: 3px solid var(--border); color: var(--muted); }
/* A link card (Confluence Cloud's Smart Link card): the site's icon, the page's title, its description and the site. */
.page-body p.web-card { margin: 0.8em 0; max-width: 640px; }
.page-body p.web-card > a { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text); text-decoration: none; }
.page-body p.web-card > a:hover, .page-body p.web-card > a:focus-visible { border-color: var(--link); }
.web-card-icon { width: 20px; height: 20px; flex: none; margin-top: 2px; object-fit: contain; }
.web-card-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.web-card-title { font-weight: 600; color: var(--link); }
.web-card-text { color: var(--text); font-size: 0.92em; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.web-card-site { color: var(--muted); font-size: 0.85em; }
@media print { .page-body p.web-card > a::after { content: " (" attr(href) ")"; color: var(--muted); font-size: 0.85em; } }
.page-body pre { background: var(--code-bg); padding: 10px 12px; border-radius: 6px; overflow-x: auto; }
.page-body pre code { background: none; padding: 0; overflow-wrap: normal; }
.page-body hr { border: none; border-top: 1px solid var(--border); margin: 1.5em 0; }
.page-body img { max-width: 100%; height: auto; }
/* A picture's size, alignment and border (PageHtml): on the img, or on a figure when it has a caption. */
.page-body img[data-size="small"], .page-body figure[data-size="small"] img { width: 200px; }
.page-body img[data-size="medium"], .page-body figure[data-size="medium"] img { width: 400px; }
.page-body img[data-size="large"], .page-body figure[data-size="large"], .page-body figure[data-size="large"] img { width: 100%; }
.page-body img[data-align] { display: block; }
.page-body img[data-align="center"] { margin-left: auto; margin-right: auto; }
.page-body img[data-align="right"] { margin-left: auto; }
.page-body img[data-border], .page-body figure[data-border] img { border: 1px solid var(--muted); }
.page-body figure { width: fit-content; max-width: 100%; margin: 1em 0; }
.page-body figure[data-align="center"] { margin-left: auto; margin-right: auto; }
.page-body figure[data-align="right"] { margin-left: auto; margin-right: 0; }
.page-body figure img { display: block; }
.page-body figcaption { margin-top: 4px; color: var(--muted); font-size: 0.9em; text-align: center; }
/* A link to a page the reader can't see (PageHtml): plain text, never the page's title. */
.page-body .restricted-link { color: var(--muted); font-style: italic; border-bottom: 1px dashed var(--muted); cursor: help; }
.page-body table { margin: 1em 0; display: block; overflow-x: auto; }
.page-body th, .page-body td { border: 1px solid var(--border); min-width: 60px; overflow-wrap: break-word; } /* whole words; a wide table scrolls */
.page-body th { background: var(--subtle); color: var(--text); }
.page-body td p, .page-body th p { margin: 0; }
/* Numbered rows (Cloud's, milestone 129): a number before each row with cells, none before a heading row. */
.page-body table[data-numbered] { counter-reset: dw-row; }
.page-body table[data-numbered] tr:has(> td) { counter-increment: dw-row; }
.page-body table[data-numbered] tr::before {
  display: table-cell; content: ""; min-width: 2.2em; padding: 6px 8px; border: 1px solid var(--border);
  background: var(--subtle); color: var(--muted); font-size: 0.85em; text-align: right; vertical-align: top;
}
.page-body table[data-numbered] tr:has(> td)::before { content: counter(dw-row); }
/* Column widths (Cloud's, milestone 129): the page's full width, or that with every column the same width. */
.page-body table[data-widths] { display: table; width: 100%; }
.page-body table[data-widths="even"] { table-layout: fixed; }
/* Cells as compact as Confluence's (the user, 11/20/2026: "confluence is more compact"): a one-line row is about 34px.
   A list or checklist in a cell keeps only a small gap from what's beside it, not a full line above and below
   (a row with a checklist was 75px, a plain one 40px). */
.page-body th, .page-body td { padding: 6px 10px; line-height: 1.4; }
.page-body :is(td, th) :is(ul, ol, blockquote, pre, figure, [data-panel], details) { margin-top: 0.3em; margin-bottom: 0.3em; }
.page-body :is(td, th) > :first-child { margin-top: 0; }
.page-body :is(td, th) > :last-child { margin-bottom: 0; }
.page-body :is(td, th) ul[data-type="taskList"] > li { margin: 1px 0; }
.page-body :is(td, th) ul[data-type="taskList"] > li > input, .page-body :is(td, th) ul[data-type="taskList"] > li > label { margin-top: 0.15em; }
/* Panels: a colored box with its icon at the top left (a letter in a circle, so no picture files are needed). */
.page-body [data-panel] {
  position: relative; border: 1px solid color-mix(in srgb, var(--panel) 45%, transparent); background: var(--panel-bg);
  border-radius: 6px; padding: 10px 16px 10px 48px; margin: 1em 0;
}
.page-body [data-panel]::before {
  position: absolute; left: 14px; top: 14px; width: 22px; height: 22px; border-radius: 999px;
  display: flex; align-items: center; justify-content: center;
  background: var(--panel); color: var(--panel-bg); font-size: 0.8rem; font-weight: 700; line-height: 1;
}
.page-body [data-panel="info"]::before { content: "i"; font-family: Georgia, serif; font-size: 0.9rem; }
.page-body [data-panel="note"]::before { content: "\270E"; }
.page-body [data-panel="warning"]::before { content: "!"; }
.page-body [data-panel="tip"]::before { content: "\2713"; }
.page-body [data-panel="error"]::before { content: "\2715"; }
.page-body [data-panel] > p { margin: 0.4em 0; }
.page-body [data-panel="info"] { --panel: #2a6fdb; --panel-bg: #e8f0fd; }
.page-body [data-panel="note"] { --panel: #7a5bd1; --panel-bg: #f0ebfb; }
.page-body [data-panel="warning"] { --panel: #d97a1a; --panel-bg: #fdf1e3; }
.page-body [data-panel="tip"] { --panel: #2e9a5e; --panel-bg: #e6f5ec; }
.page-body [data-panel="error"] { --panel: #c9372c; --panel-bg: #fdecea; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .page-body [data-panel="info"] { --panel: #6ea2ff; --panel-bg: #1b2640; }
  :root:not([data-theme="light"]) .page-body [data-panel="note"] { --panel: #a58cf0; --panel-bg: #251f3a; }
  :root:not([data-theme="light"]) .page-body [data-panel="warning"] { --panel: #f0a050; --panel-bg: #36281a; }
  :root:not([data-theme="light"]) .page-body [data-panel="tip"] { --panel: #5fcf8f; --panel-bg: #18301f; }
  :root:not([data-theme="light"]) .page-body [data-panel="error"] { --panel: #ff8f80; --panel-bg: #3a1c19; }
}
:root[data-theme="dark"] .page-body [data-panel="info"] { --panel: #6ea2ff; --panel-bg: #1b2640; }
:root[data-theme="dark"] .page-body [data-panel="note"] { --panel: #a58cf0; --panel-bg: #251f3a; }
:root[data-theme="dark"] .page-body [data-panel="warning"] { --panel: #f0a050; --panel-bg: #36281a; }
:root[data-theme="dark"] .page-body [data-panel="tip"] { --panel: #5fcf8f; --panel-bg: #18301f; }
:root[data-theme="dark"] .page-body [data-panel="error"] { --panel: #ff8f80; --panel-bg: #3a1c19; }
/* A plain panel (Confluence's Panel): no icon, in one of the color names (data-bg), or gray lines on the page's own background. */
.page-body [data-panel="panel"] { --panel: var(--muted); --panel-bg: var(--bg); padding-left: 16px; }
.page-body [data-panel="panel"]::before { content: none; }
/* A plain panel with an emoji (Confluence Cloud's custom panel, milestone 63): the emoji where the others have their icon. */
.page-body [data-panel="panel"][data-emoji] { padding-left: 48px; }
.page-body [data-panel="panel"][data-emoji]::before {
  content: attr(data-emoji); background: none; color: inherit; font-size: 1.15rem; font-weight: 400; top: 11px; left: 13px; width: 26px; height: 26px;
}
.page-body [data-panel="panel"][data-bg="red"] { --panel: var(--c-red); --panel-bg: var(--bg-red); }
.page-body [data-panel="panel"][data-bg="orange"] { --panel: var(--c-orange); --panel-bg: var(--bg-orange); }
.page-body [data-panel="panel"][data-bg="yellow"] { --panel: var(--c-yellow); --panel-bg: var(--bg-yellow); }
.page-body [data-panel="panel"][data-bg="green"] { --panel: var(--c-green); --panel-bg: var(--bg-green); }
.page-body [data-panel="panel"][data-bg="teal"] { --panel: var(--c-teal); --panel-bg: var(--bg-teal); }
.page-body [data-panel="panel"][data-bg="blue"] { --panel: var(--c-blue); --panel-bg: var(--bg-blue); }
.page-body [data-panel="panel"][data-bg="purple"] { --panel: var(--c-purple); --panel-bg: var(--bg-purple); }
.page-body [data-panel="panel"][data-bg="pink"] { --panel: var(--c-pink); --panel-bg: var(--bg-pink); }
.page-body [data-panel="panel"][data-bg="gray"] { --panel: var(--c-gray); --panel-bg: var(--bg-gray); }
/* A panel's title (PageMacros writes it from data-title): its first line, in bold. */
.page-body [data-panel] > .panel-title { font-weight: 700; margin: 0.2em 0 0.4em; }
/* The editor's Preview and View changes (drafts.ts), in place of the editor. */
.edit-view { border: 1px solid var(--border); border-radius: 6px; padding: 12px 16px; margin: 4px 0 12px; }
.edit-view.edit-preview > .page-title { margin-top: 0; }
.draft-status { align-self: center; }
/* Another page's text or excerpt (PageIncludes): shown as part of the page, with a faint line at its left. */
.page-body .page-include { border-left: 2px solid var(--border); padding-left: 12px; margin: 1em 0; }
.page-body .page-include > :first-child { margin-top: 0; }
.page-body .page-include > :last-child { margin-bottom: 0; }

/* Mermaid diagrams (milestone 37; web/mermaid/diagrams.js): a code block in the language "mermaid", drawn as a picture
   in the light and dark themes (the one for the theme in use shows; paper gets the light one), its source folded
   under it. Mermaid draws in a hidden frame, kept off the screen but laid out, so its text is measured. */
.mermaid-frame { position: absolute; left: -10000px; top: 0; width: 1000px; height: 800px; border: 0; visibility: hidden; }
.mermaid-diagram { margin: 1em 0; }
.mermaid-pictures { overflow-x: auto; }
.mermaid-pictures img { display: block; max-width: 100%; height: auto; }
.mermaid-pictures[role="status"] { color: var(--muted); font-size: 0.9rem; padding: 8px 0; }
.mermaid-dark { display: none !important; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .mermaid-light { display: none !important; }
  :root:not([data-theme="light"]) .mermaid-dark { display: block !important; }
}
:root[data-theme="dark"] .mermaid-light { display: none !important; }
:root[data-theme="dark"] .mermaid-dark { display: block !important; }
.mermaid-source { margin-top: 4px; }
.mermaid-source > summary { cursor: pointer; color: var(--muted); font-size: 0.85rem; width: max-content; }
.mermaid-source > pre { margin-top: 6px; }
.mermaid-error { border-left: 3px solid var(--danger); padding: 4px 0 4px 12px; }
.mermaid-error > p { margin: 0 0 6px; font-weight: 600; }
.mermaid-error > pre { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 0.85rem; background: none; padding: 0; }

/* Formatting from the editor's Confluence-style toolbar (Wiki/Html/PageHtml.cs): colors are names, so each theme picks
   shades that read on its own background. Text colors (--c-*), table cell colors (--bg-*), status lozenges (--st-*). */
:root {
  --c-red: #c9372c; --c-orange: #b65000; --c-yellow: #8f6b00; --c-green: #1f845a; --c-teal: #18757f;
  --c-blue: #0c66e4; --c-purple: #6e5dc6; --c-pink: #ae4787; --c-gray: #626f86;
  --bg-red: #ffeceb; --bg-orange: #fff3eb; --bg-yellow: #fff7d6; --bg-green: #dcfff1; --bg-teal: #e7f9ff;
  --bg-blue: #e9f2ff; --bg-purple: #f3f0ff; --bg-pink: #ffecf8; --bg-gray: #f1f2f4;
  --st-gray: #42526e; --st-gray-bg: #dfe1e6; --st-red: #ae2a19; --st-red-bg: #ffebe6; --st-yellow: #5c4400; --st-yellow-bg: #fff0b3;
  --st-green: #006644; --st-green-bg: #e3fcef; --st-blue: #0747a6; --st-blue-bg: #deebff; --st-purple: #403294; --st-purple-bg: #eae6ff;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --c-red: #f87168; --c-orange: #fea362; --c-yellow: #f5cd47; --c-green: #4bce97; --c-teal: #6cc3e0;
    --c-blue: #579dff; --c-purple: #9f8fef; --c-pink: #e774bb; --c-gray: #9fadbc;
    --bg-red: #42221f; --bg-orange: #3a2c1f; --bg-yellow: #3a3420; --bg-green: #1c3329; --bg-teal: #1e3137;
    --bg-blue: #1c2b41; --bg-purple: #2b273f; --bg-pink: #3d2232; --bg-gray: #2c333a;
    --st-gray: #dee4ea; --st-gray-bg: #454f59; --st-red: #ffd2cc; --st-red-bg: #5d1f1a; --st-yellow: #f8e6a0; --st-yellow-bg: #533f04;
    --st-green: #baf3db; --st-green-bg: #164b35; --st-blue: #cce0ff; --st-blue-bg: #09326c; --st-purple: #dfd8fd; --st-purple-bg: #352c63;
  }
}
:root[data-theme="dark"] {
  --c-red: #f87168; --c-orange: #fea362; --c-yellow: #f5cd47; --c-green: #4bce97; --c-teal: #6cc3e0;
  --c-blue: #579dff; --c-purple: #9f8fef; --c-pink: #e774bb; --c-gray: #9fadbc;
  --bg-red: #42221f; --bg-orange: #3a2c1f; --bg-yellow: #3a3420; --bg-green: #1c3329; --bg-teal: #1e3137;
  --bg-blue: #1c2b41; --bg-purple: #2b273f; --bg-pink: #3d2232; --bg-gray: #2c333a;
  --st-gray: #dee4ea; --st-gray-bg: #454f59; --st-red: #ffd2cc; --st-red-bg: #5d1f1a; --st-yellow: #f8e6a0; --st-yellow-bg: #533f04;
  --st-green: #baf3db; --st-green-bg: #164b35; --st-blue: #cce0ff; --st-blue-bg: #09326c; --st-purple: #dfd8fd; --st-purple-bg: #352c63;
}
[data-color="red"] { --color: var(--c-red); --color-bg: var(--bg-red); }
[data-color="orange"] { --color: var(--c-orange); --color-bg: var(--bg-orange); }
[data-color="yellow"] { --color: var(--c-yellow); --color-bg: var(--bg-yellow); }
[data-color="green"] { --color: var(--c-green); --color-bg: var(--bg-green); }
[data-color="teal"] { --color: var(--c-teal); --color-bg: var(--bg-teal); }
[data-color="blue"] { --color: var(--c-blue); --color-bg: var(--bg-blue); }
[data-color="purple"] { --color: var(--c-purple); --color-bg: var(--bg-purple); }
[data-color="pink"] { --color: var(--c-pink); --color-bg: var(--bg-pink); }
[data-color="gray"] { --color: var(--c-gray); --color-bg: var(--bg-gray); }
.page-body span[data-color] { color: var(--color); }
/* A highlight behind text (Confluence Cloud's; parity check part 4): the cells' color names. */
.page-body span[data-bg="red"] { background: var(--bg-red); border-radius: 2px; }
.page-body span[data-bg="orange"] { background: var(--bg-orange); border-radius: 2px; }
.page-body span[data-bg="yellow"] { background: var(--bg-yellow); border-radius: 2px; }
.page-body span[data-bg="green"] { background: var(--bg-green); border-radius: 2px; }
.page-body span[data-bg="teal"] { background: var(--bg-teal); border-radius: 2px; }
.page-body span[data-bg="blue"] { background: var(--bg-blue); border-radius: 2px; }
.page-body span[data-bg="purple"] { background: var(--bg-purple); border-radius: 2px; }
.page-body span[data-bg="pink"] { background: var(--bg-pink); border-radius: 2px; }
.page-body span[data-bg="gray"] { background: var(--bg-gray); border-radius: 2px; }
.page-body td[data-bg="red"], .page-body th[data-bg="red"] { background: var(--bg-red); }
.page-body td[data-bg="orange"], .page-body th[data-bg="orange"] { background: var(--bg-orange); }
.page-body td[data-bg="yellow"], .page-body th[data-bg="yellow"] { background: var(--bg-yellow); }
.page-body td[data-bg="green"], .page-body th[data-bg="green"] { background: var(--bg-green); }
.page-body td[data-bg="teal"], .page-body th[data-bg="teal"] { background: var(--bg-teal); }
.page-body td[data-bg="blue"], .page-body th[data-bg="blue"] { background: var(--bg-blue); }
.page-body td[data-bg="purple"], .page-body th[data-bg="purple"] { background: var(--bg-purple); }
.page-body td[data-bg="pink"], .page-body th[data-bg="pink"] { background: var(--bg-pink); }
.page-body td[data-bg="gray"], .page-body th[data-bg="gray"] { background: var(--bg-gray); }
/* Cloud's shades (milestone 129): a strong and a soft one of each color, mixed from the theme's own, so they read in
   every theme and in print. Text: --c-X-bold (toward the text color), --c-X-subtle (toward the page); highlights and
   cells: --bg-X-bold (deeper), --bg-X-subtle (paler). */
:root {
  --c-red-bold: color-mix(in srgb, var(--c-red) 62%, var(--text)); --c-red-subtle: color-mix(in srgb, var(--c-red) 58%, var(--surface));
  --bg-red-bold: color-mix(in srgb, var(--c-red) 30%, var(--surface)); --bg-red-subtle: color-mix(in srgb, var(--bg-red) 45%, var(--surface));
  --c-orange-bold: color-mix(in srgb, var(--c-orange) 62%, var(--text)); --c-orange-subtle: color-mix(in srgb, var(--c-orange) 58%, var(--surface));
  --bg-orange-bold: color-mix(in srgb, var(--c-orange) 30%, var(--surface)); --bg-orange-subtle: color-mix(in srgb, var(--bg-orange) 45%, var(--surface));
  --c-yellow-bold: color-mix(in srgb, var(--c-yellow) 62%, var(--text)); --c-yellow-subtle: color-mix(in srgb, var(--c-yellow) 58%, var(--surface));
  --bg-yellow-bold: color-mix(in srgb, var(--c-yellow) 30%, var(--surface)); --bg-yellow-subtle: color-mix(in srgb, var(--bg-yellow) 45%, var(--surface));
  --c-green-bold: color-mix(in srgb, var(--c-green) 62%, var(--text)); --c-green-subtle: color-mix(in srgb, var(--c-green) 58%, var(--surface));
  --bg-green-bold: color-mix(in srgb, var(--c-green) 30%, var(--surface)); --bg-green-subtle: color-mix(in srgb, var(--bg-green) 45%, var(--surface));
  --c-teal-bold: color-mix(in srgb, var(--c-teal) 62%, var(--text)); --c-teal-subtle: color-mix(in srgb, var(--c-teal) 58%, var(--surface));
  --bg-teal-bold: color-mix(in srgb, var(--c-teal) 30%, var(--surface)); --bg-teal-subtle: color-mix(in srgb, var(--bg-teal) 45%, var(--surface));
  --c-blue-bold: color-mix(in srgb, var(--c-blue) 62%, var(--text)); --c-blue-subtle: color-mix(in srgb, var(--c-blue) 58%, var(--surface));
  --bg-blue-bold: color-mix(in srgb, var(--c-blue) 30%, var(--surface)); --bg-blue-subtle: color-mix(in srgb, var(--bg-blue) 45%, var(--surface));
  --c-purple-bold: color-mix(in srgb, var(--c-purple) 62%, var(--text)); --c-purple-subtle: color-mix(in srgb, var(--c-purple) 58%, var(--surface));
  --bg-purple-bold: color-mix(in srgb, var(--c-purple) 30%, var(--surface)); --bg-purple-subtle: color-mix(in srgb, var(--bg-purple) 45%, var(--surface));
  --c-pink-bold: color-mix(in srgb, var(--c-pink) 62%, var(--text)); --c-pink-subtle: color-mix(in srgb, var(--c-pink) 58%, var(--surface));
  --bg-pink-bold: color-mix(in srgb, var(--c-pink) 30%, var(--surface)); --bg-pink-subtle: color-mix(in srgb, var(--bg-pink) 45%, var(--surface));
  --c-gray-bold: color-mix(in srgb, var(--c-gray) 62%, var(--text)); --c-gray-subtle: color-mix(in srgb, var(--c-gray) 58%, var(--surface));
  --bg-gray-bold: color-mix(in srgb, var(--c-gray) 30%, var(--surface)); --bg-gray-subtle: color-mix(in srgb, var(--bg-gray) 45%, var(--surface));
}
[data-color="red-bold"] { --color: var(--c-red-bold); --color-bg: var(--bg-red-bold); }
[data-color="red-subtle"] { --color: var(--c-red-subtle); --color-bg: var(--bg-red-subtle); }
[data-color="orange-bold"] { --color: var(--c-orange-bold); --color-bg: var(--bg-orange-bold); }
[data-color="orange-subtle"] { --color: var(--c-orange-subtle); --color-bg: var(--bg-orange-subtle); }
[data-color="yellow-bold"] { --color: var(--c-yellow-bold); --color-bg: var(--bg-yellow-bold); }
[data-color="yellow-subtle"] { --color: var(--c-yellow-subtle); --color-bg: var(--bg-yellow-subtle); }
[data-color="green-bold"] { --color: var(--c-green-bold); --color-bg: var(--bg-green-bold); }
[data-color="green-subtle"] { --color: var(--c-green-subtle); --color-bg: var(--bg-green-subtle); }
[data-color="teal-bold"] { --color: var(--c-teal-bold); --color-bg: var(--bg-teal-bold); }
[data-color="teal-subtle"] { --color: var(--c-teal-subtle); --color-bg: var(--bg-teal-subtle); }
[data-color="blue-bold"] { --color: var(--c-blue-bold); --color-bg: var(--bg-blue-bold); }
[data-color="blue-subtle"] { --color: var(--c-blue-subtle); --color-bg: var(--bg-blue-subtle); }
[data-color="purple-bold"] { --color: var(--c-purple-bold); --color-bg: var(--bg-purple-bold); }
[data-color="purple-subtle"] { --color: var(--c-purple-subtle); --color-bg: var(--bg-purple-subtle); }
[data-color="pink-bold"] { --color: var(--c-pink-bold); --color-bg: var(--bg-pink-bold); }
[data-color="pink-subtle"] { --color: var(--c-pink-subtle); --color-bg: var(--bg-pink-subtle); }
[data-color="gray-bold"] { --color: var(--c-gray-bold); --color-bg: var(--bg-gray-bold); }
[data-color="gray-subtle"] { --color: var(--c-gray-subtle); --color-bg: var(--bg-gray-subtle); }
.page-body span[data-bg="red-bold"] { background: var(--bg-red-bold); border-radius: 2px; }
.page-body span[data-bg="red-subtle"] { background: var(--bg-red-subtle); border-radius: 2px; }
.page-body span[data-bg="orange-bold"] { background: var(--bg-orange-bold); border-radius: 2px; }
.page-body span[data-bg="orange-subtle"] { background: var(--bg-orange-subtle); border-radius: 2px; }
.page-body span[data-bg="yellow-bold"] { background: var(--bg-yellow-bold); border-radius: 2px; }
.page-body span[data-bg="yellow-subtle"] { background: var(--bg-yellow-subtle); border-radius: 2px; }
.page-body span[data-bg="green-bold"] { background: var(--bg-green-bold); border-radius: 2px; }
.page-body span[data-bg="green-subtle"] { background: var(--bg-green-subtle); border-radius: 2px; }
.page-body span[data-bg="teal-bold"] { background: var(--bg-teal-bold); border-radius: 2px; }
.page-body span[data-bg="teal-subtle"] { background: var(--bg-teal-subtle); border-radius: 2px; }
.page-body span[data-bg="blue-bold"] { background: var(--bg-blue-bold); border-radius: 2px; }
.page-body span[data-bg="blue-subtle"] { background: var(--bg-blue-subtle); border-radius: 2px; }
.page-body span[data-bg="purple-bold"] { background: var(--bg-purple-bold); border-radius: 2px; }
.page-body span[data-bg="purple-subtle"] { background: var(--bg-purple-subtle); border-radius: 2px; }
.page-body span[data-bg="pink-bold"] { background: var(--bg-pink-bold); border-radius: 2px; }
.page-body span[data-bg="pink-subtle"] { background: var(--bg-pink-subtle); border-radius: 2px; }
.page-body span[data-bg="gray-bold"] { background: var(--bg-gray-bold); border-radius: 2px; }
.page-body span[data-bg="gray-subtle"] { background: var(--bg-gray-subtle); border-radius: 2px; }
.page-body td[data-bg="red-bold"], .page-body th[data-bg="red-bold"] { background: var(--bg-red-bold); }
.page-body td[data-bg="red-subtle"], .page-body th[data-bg="red-subtle"] { background: var(--bg-red-subtle); }
.page-body td[data-bg="orange-bold"], .page-body th[data-bg="orange-bold"] { background: var(--bg-orange-bold); }
.page-body td[data-bg="orange-subtle"], .page-body th[data-bg="orange-subtle"] { background: var(--bg-orange-subtle); }
.page-body td[data-bg="yellow-bold"], .page-body th[data-bg="yellow-bold"] { background: var(--bg-yellow-bold); }
.page-body td[data-bg="yellow-subtle"], .page-body th[data-bg="yellow-subtle"] { background: var(--bg-yellow-subtle); }
.page-body td[data-bg="green-bold"], .page-body th[data-bg="green-bold"] { background: var(--bg-green-bold); }
.page-body td[data-bg="green-subtle"], .page-body th[data-bg="green-subtle"] { background: var(--bg-green-subtle); }
.page-body td[data-bg="teal-bold"], .page-body th[data-bg="teal-bold"] { background: var(--bg-teal-bold); }
.page-body td[data-bg="teal-subtle"], .page-body th[data-bg="teal-subtle"] { background: var(--bg-teal-subtle); }
.page-body td[data-bg="blue-bold"], .page-body th[data-bg="blue-bold"] { background: var(--bg-blue-bold); }
.page-body td[data-bg="blue-subtle"], .page-body th[data-bg="blue-subtle"] { background: var(--bg-blue-subtle); }
.page-body td[data-bg="purple-bold"], .page-body th[data-bg="purple-bold"] { background: var(--bg-purple-bold); }
.page-body td[data-bg="purple-subtle"], .page-body th[data-bg="purple-subtle"] { background: var(--bg-purple-subtle); }
.page-body td[data-bg="pink-bold"], .page-body th[data-bg="pink-bold"] { background: var(--bg-pink-bold); }
.page-body td[data-bg="pink-subtle"], .page-body th[data-bg="pink-subtle"] { background: var(--bg-pink-subtle); }
.page-body td[data-bg="gray-bold"], .page-body th[data-bg="gray-bold"] { background: var(--bg-gray-bold); }
.page-body td[data-bg="gray-subtle"], .page-body th[data-bg="gray-subtle"] { background: var(--bg-gray-subtle); }
.page-body [data-panel="panel"][data-bg="red-bold"] { --panel: var(--c-red); --panel-bg: var(--bg-red-bold); }
.page-body [data-panel="panel"][data-bg="red-subtle"] { --panel: var(--c-red); --panel-bg: var(--bg-red-subtle); }
.page-body [data-panel="panel"][data-bg="orange-bold"] { --panel: var(--c-orange); --panel-bg: var(--bg-orange-bold); }
.page-body [data-panel="panel"][data-bg="orange-subtle"] { --panel: var(--c-orange); --panel-bg: var(--bg-orange-subtle); }
.page-body [data-panel="panel"][data-bg="yellow-bold"] { --panel: var(--c-yellow); --panel-bg: var(--bg-yellow-bold); }
.page-body [data-panel="panel"][data-bg="yellow-subtle"] { --panel: var(--c-yellow); --panel-bg: var(--bg-yellow-subtle); }
.page-body [data-panel="panel"][data-bg="green-bold"] { --panel: var(--c-green); --panel-bg: var(--bg-green-bold); }
.page-body [data-panel="panel"][data-bg="green-subtle"] { --panel: var(--c-green); --panel-bg: var(--bg-green-subtle); }
.page-body [data-panel="panel"][data-bg="teal-bold"] { --panel: var(--c-teal); --panel-bg: var(--bg-teal-bold); }
.page-body [data-panel="panel"][data-bg="teal-subtle"] { --panel: var(--c-teal); --panel-bg: var(--bg-teal-subtle); }
.page-body [data-panel="panel"][data-bg="blue-bold"] { --panel: var(--c-blue); --panel-bg: var(--bg-blue-bold); }
.page-body [data-panel="panel"][data-bg="blue-subtle"] { --panel: var(--c-blue); --panel-bg: var(--bg-blue-subtle); }
.page-body [data-panel="panel"][data-bg="purple-bold"] { --panel: var(--c-purple); --panel-bg: var(--bg-purple-bold); }
.page-body [data-panel="panel"][data-bg="purple-subtle"] { --panel: var(--c-purple); --panel-bg: var(--bg-purple-subtle); }
.page-body [data-panel="panel"][data-bg="pink-bold"] { --panel: var(--c-pink); --panel-bg: var(--bg-pink-bold); }
.page-body [data-panel="panel"][data-bg="pink-subtle"] { --panel: var(--c-pink); --panel-bg: var(--bg-pink-subtle); }
.page-body [data-panel="panel"][data-bg="gray-bold"] { --panel: var(--c-gray); --panel-bg: var(--bg-gray-bold); }
.page-body [data-panel="panel"][data-bg="gray-subtle"] { --panel: var(--c-gray); --panel-bg: var(--bg-gray-subtle); }
/* A status lozenge: small capitals in a rounded box. */
[data-status] {
  display: inline-block; padding: 0 5px; border-radius: 3px; font-size: 0.72rem; font-weight: 700; line-height: 1.5;
  text-transform: uppercase; letter-spacing: 0.02em; vertical-align: 0.1em; white-space: nowrap;
  color: var(--status); background: var(--status-bg);
}
[data-status="gray"] { --status: var(--st-gray); --status-bg: var(--st-gray-bg); }
[data-status="red"] { --status: var(--st-red); --status-bg: var(--st-red-bg); }
[data-status="yellow"] { --status: var(--st-yellow); --status-bg: var(--st-yellow-bg); }
[data-status="green"] { --status: var(--st-green); --status-bg: var(--st-green-bg); }
[data-status="blue"] { --status: var(--st-blue); --status-bg: var(--st-blue-bg); }
[data-status="purple"] { --status: var(--st-purple); --status-bg: var(--st-purple-bg); }
/* An @mention: the person's name in a rounded box, linking to their profile (on a page link, the name alone). */
a[data-mention], .link-mention {
  padding: 0 6px; border-radius: 10px; background: var(--active-bg); color: var(--link); text-decoration: none;
  white-space: nowrap; font-weight: 500;
}
a[data-mention]:hover { text-decoration: underline; }
.editor-surface a[data-mention].ProseMirror-selectednode { outline: 2px solid var(--link); }
/* A date: a gray lozenge, as Confluence shows one. */
.page-body time[datetime] { padding: 1px 6px; border-radius: 3px; background: var(--subtle); border: 1px solid var(--border); white-space: nowrap; font-size: 0.92em; }
/* A task's date once it's past and the task isn't done (milestone 28), as Confluence's. */
.page-body time.task-late, .task-row-due.task-late { color: var(--danger); background: var(--danger-bg); border-color: var(--danger); }
.page-body [data-align="center"] { text-align: center; }
.page-body [data-align="right"] { text-align: right; }
.page-body [data-indent="1"] { margin-left: 30px; }
.page-body [data-indent="2"] { margin-left: 60px; }
.page-body [data-indent="3"] { margin-left: 90px; }
.page-body [data-indent="4"] { margin-left: 120px; }
.page-body [data-indent="5"] { margin-left: 150px; }
.page-body [data-indent="6"] { margin-left: 180px; }
.page-body h5, .page-body h6 { margin: 1em 0 0.3em; line-height: 1.3; }
.page-body h6 { font-size: 0.85rem; color: var(--muted); }

/* Page layouts (Confluence's Page layout): columns side by side, one under another on a phone. */
.page-body [data-layout] { display: grid; gap: 24px; margin: 1em 0; align-items: start; }
.page-body [data-layout="two-equal"] { grid-template-columns: 1fr 1fr; }
.page-body [data-layout="two-left-sidebar"] { grid-template-columns: 1fr 2fr; }
.page-body [data-layout="two-right-sidebar"] { grid-template-columns: 2fr 1fr; }
.page-body [data-layout="three-equal"] { grid-template-columns: 1fr 1fr 1fr; }
.page-body [data-layout="three-sidebars"] { grid-template-columns: 1fr 2fr 1fr; }
.page-body [data-layout="four-equal"] { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.page-body [data-layout="five-equal"] { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 1099px) { .page-body [data-layout="four-equal"], .page-body [data-layout="five-equal"] { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.page-body [data-column] { min-width: 0; }
/* Placeholder text (milestone 63): shown only in the editor (editor.css), never on the page. */
.page-body span[data-placeholder-text] { display: none; }
/* A template's variable (milestone 95), seen in the templates gallery's preview: its name in a chip. */
.page-body span[data-template-var]::before { content: "$" attr(data-template-var); background: var(--active-bg); border: 1px solid var(--border); border-radius: 3px; padding: 0 4px; font-family: ui-monospace, Consolas, monospace; font-size: 0.9em; }
.template-fill { max-width: 40rem; }
/* A decision list (milestone 63): each decision with a mark instead of a bullet. */
.page-body ul[data-list="decisions"] { list-style: none; padding-left: 4px; }
.page-body ul[data-list="decisions"] > li { position: relative; padding-left: 28px; margin: 4px 0; }
.page-body ul[data-list="decisions"] > li::before {
  content: "\21B3"; position: absolute; left: 0; top: 0.05em; width: 20px; height: 20px; border-radius: 4px;
  display: flex; align-items: center; justify-content: center; background: var(--ok-bg); color: var(--ok); font-weight: 700; font-size: 0.85rem;
}
/* Small text (milestone 63). */
.page-body p[data-size="small"] { font-size: 0.85em; color: var(--muted); }
.page-body [data-column] > :first-child { margin-top: 0; }
@media (max-width: 700px) {
  .page-body [data-layout] { grid-template-columns: 1fr; gap: 0; }
}

/* An import placeholder (milestone 12): what the Confluence import couldn't convert, in a dashed gray box. */
.page-body [data-panel="import"] { --panel: var(--muted); --panel-bg: var(--subtle); border-style: dashed; }
.page-body [data-panel="import"]::before { content: "\22EF"; }
.page-body [data-panel="import"] details { background: var(--bg); }

/* A table of contents (PageToc): one line per heading, indented by level. */
.page-body .page-toc { border-left: 3px solid var(--border); padding: 2px 0 2px 14px; margin: 1em 0; }
.page-body .page-toc-title { font-weight: 600; margin: 0 0 4px; }
.page-body .page-toc ul { list-style: none; margin: 0; padding: 0; }
.page-body .page-toc li { margin: 2px 0; }
.page-body .page-toc .toc-1 { padding-left: 1.2em; }
.page-body .page-toc .toc-2 { padding-left: 2.4em; }
.page-body .page-toc .toc-3 { padding-left: 3.6em; }

/* Lists drawn when the page is shown (PageMacros, MacroLists): pages under it, the page tree, files, recent changes,
   contributors. An earlier version only names them (.macro-note). Anchors are invisible marks to link to. */
.page-body .macro-empty, .page-body .macro-note { color: var(--muted); font-style: italic; }
.page-body .macro-note { border-left: 3px solid var(--border); padding-left: 14px; }
.page-body ul.macro-list.recent, .page-body ul.macro-list.contributors { list-style: none; padding-left: 0; }
.page-body ul.macro-list.recent li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; margin: 4px 0; }
.page-body ul.macro-list.contributors li { display: flex; align-items: center; gap: 10px; padding: 4px 0; margin: 0; }
.page-body .macro-tree ul { list-style: none; margin: 0; padding-left: 1.2em; }
.page-body .macro-tree > ul { padding-left: 0; }
.page-body .macro-tree li { margin: 2px 0; }
.page-body .macro-tree details { border: 0; border-radius: 0; padding: 0; margin: 0; }
.page-body .macro-tree summary { font-weight: normal; }
.page-body .macro-tree details[open] summary { margin-bottom: 2px; }
.page-body .macro-tree .leaf { padding-left: 1.1em; }
.page-body .macro-tree [aria-current="page"] { font-weight: 600; }
.page-body .macro-files td, .page-body .macro-files th { text-align: left; }
/* Page index (A to Z, a letter over each group), Change history, Space details, Spaces list. */
.page-body .macro-index { columns: 3 220px; column-gap: 24px; }
.page-body .macro-index h4 { margin: 0.6em 0 0.2em; break-after: avoid; color: var(--muted); }
.page-body .macro-index ul { margin: 0; padding-left: 1.1em; break-inside: avoid-column; }
.page-body ul.macro-list.history, .page-body ul.macro-list.spaces { list-style: none; padding-left: 0; }
.page-body ul.macro-list.history li, .page-body ul.macro-list.spaces li { margin: 4px 0; }
.page-body ul.macro-list.people { list-style: none; padding-left: 0; display: flex; flex-wrap: wrap; gap: 8px 20px; }
.page-body ul.macro-list.people li { display: flex; align-items: center; gap: 8px; }
.page-body .macro-space th { text-align: left; padding-right: 16px; white-space: nowrap; }
/* Gallery: the page's pictures as square tiles, their names under them. */
.page-body ul.macro-gallery { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.page-body ul.macro-gallery li { margin: 0; }
.page-body ul.macro-gallery a { display: block; text-align: center; font-size: 0.85em; overflow-wrap: anywhere; }
.page-body ul.macro-gallery img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 4px; background: var(--subtle); margin-bottom: 4px; }
.page-body .page-anchor { scroll-margin-top: 70px; }
/* Footnotes (milestone 53; Wiki/Html/Footnotes.cs): a raised number in the text, the notes listed at the end. */
.page-body .footnote-ref { line-height: 0; scroll-margin-top: 70px; }
.page-body .footnote-ref a { text-decoration: none; padding: 0 1px; }
.page-body .footnote-ref a::before { content: "["; }
.page-body .footnote-ref a::after { content: "]"; }
.page-body .footnotes { border-top: 1px solid var(--border); margin-top: 2em; padding-top: 0.5em; font-size: 0.9em; color: var(--muted); }
.page-body .footnotes ol { margin: 0.5em 0; padding-left: 1.8em; }
.page-body .footnotes li { scroll-margin-top: 70px; margin: 0.25em 0; overflow-wrap: anywhere; }
.page-body .footnotes li:target { background: var(--surface); border-radius: 4px; }
.page-body .footnote-back { text-decoration: none; }
@media print { .page-body .footnote-back { display: none; } }
/* Tabs (milestone 54): each tab's title is its first line (Wiki/Html/PageMacros.cs); web/touches.js makes them a row
   of tabs showing one at a time. Without it, and in print, the tabs are sections under their titles. */
.page-body [data-tabs] { margin: 1em 0; }
.page-body [data-tab] > .tab-title { font-weight: 600; margin: 0.8em 0 0.3em; }
.page-body .page-tabs > [data-tab] > .tab-title { display: none; }
.page-body .page-tabs-list { display: flex; flex-wrap: wrap; gap: 2px; border-bottom: 1px solid var(--border); }
.page-body .page-tab { font: inherit; background: none; color: var(--muted); border: 0; border-bottom: 2px solid transparent; padding: 6px 14px; margin-bottom: -1px; cursor: pointer; }
.page-body .page-tab:hover { color: var(--text); border-bottom-color: var(--border); }
.page-body .page-tab[aria-selected="true"] { color: var(--text); font-weight: 600; border-bottom-color: var(--link); }
.page-body .page-tab:focus-visible { outline: 2px solid var(--link); outline-offset: -2px; }
.page-body .page-tabs > [data-tab] { padding: 0.25em 0; }
.page-body .page-tabs > [data-tab] > :first-child:not(.tab-title), .page-body .page-tabs > [data-tab] > .tab-title + * { margin-top: 0.6em; }
@media print {
  .page-body .page-tabs-list { display: none; }
  .page-body .page-tabs > [data-tab][hidden] { display: block; }
  .page-body .page-tabs > [data-tab] > .tab-title { display: block; }
}
#support-sent { scroll-margin-top: 70px; } /* Help and feedback's redirect after Send jumps here, clear of the top bar */
/* Help and feedback's "You can also write to": the address of the kind chosen above it (support, feature or bug). */
.support .support-mail { display: none; }
.support form:has(#kind-support:checked) .support-mail-support,
.support form:has(#kind-feature:checked) .support-mail-feature,
.support form:has(#kind-bug:checked) .support-mail-bug,
.support form:not(:has(input[name="Kind"]:checked)) .support-mail-support { display: block; }
/* View file: a PDF in the browser's own viewer, the page's width and most of the window's height, with links to open
   or download it under it (what a phone that shows no PDF in a page has). */
.page-body figure.file-view { width: 100%; }
.page-body figure.file-view iframe { display: block; width: 100%; height: min(80vh, 1000px); border: 1px solid var(--border); border-radius: 4px; background: var(--subtle); }
.page-body figure.file-view figcaption { font-size: 0.9em; margin-top: 4px; overflow-wrap: anywhere; }
/* Sound and video played in the page (milestone 70): the browser's own player, as wide as the text; a video no taller than most of the window. */
.page-body figure.media-view audio { display: block; width: 100%; max-width: 640px; }
.page-body figure.media-view video { display: block; max-width: 100%; max-height: 70vh; border-radius: 4px; background: #000; }

.page-body details { border: 1px solid var(--border); border-radius: 6px; padding: 6px 12px; margin: 1em 0; }
.page-body summary { cursor: pointer; font-weight: 600; }
.page-body details[open] summary { margin-bottom: 6px; }

/* Checklists (PageHtml; TipTap's task lists): a checkbox in front of each item, its content beside it. The page view's
   boxes are bare inputs (web/shell.js saves check marks and adds Check all / Uncheck all); the editor's are in a label.
   (TipTap's editor leaves data-type off its items, so they're found by their list.) Colors are tokens only, so dark mode
   needs no rules of its own. */
.page-body ul[data-type="taskList"] { list-style: none; padding-left: 0; }
.page-body ul[data-type="taskList"] > li > div > ul[data-type="taskList"] { margin: 0; }
.page-body ul[data-type="taskList"] > li { display: flex; align-items: flex-start; gap: 8px; margin: 3px 0; }
.page-body ul[data-type="taskList"] > li > input, .page-body ul[data-type="taskList"] > li > label { flex: none; margin: 0.25em 0 0; }
.page-body ul[data-type="taskList"] > li input[type="checkbox"] { width: 1.1em; height: 1.1em; margin: 0; accent-color: var(--link); cursor: pointer; }
.page-body ul[data-type="taskList"] > li input[type="checkbox"]:disabled { cursor: default; }
.page-body ul[data-type="taskList"] > li > div { flex: 1; min-width: 0; }
.page-body ul[data-type="taskList"] > li > div > p { margin: 0; }
.page-body ul[data-type="taskList"] > li[data-checked="true"] > div > p { color: var(--muted); text-decoration: line-through; }
.page-body ul[data-type="taskList"] > li.task-blank > div > p { text-decoration: none; } /* a box with no text: no stray "_" */
.checklist-tools { display: flex; flex-wrap: wrap; gap: 6px; margin: 0.8em 0 0; }
.checklist-tools + ul[data-type="taskList"], .checklist-tools + table { margin-top: 0.4em; }
.checklist-tools .checklist-scope { align-self: center; color: var(--muted); font-size: 0.9em; }
.checklist-tools button[hidden] { display: none; } /* Undo, until there's something to undo */
.page-body > .checklist-page { margin: 0 0 1em; }
@media (max-width: 520px) {
  .page-body ul[data-type="taskList"] > li { gap: 10px; margin: 6px 0; }
  .page-body ul[data-type="taskList"] > li input[type="checkbox"] { width: 1.3em; height: 1.3em; }
}

/* ----- Screens in the frame (milestone 4b) ----- */
.page-title { font-size: 2rem; line-height: 1.2; font-weight: 600; margin: 0 0 6px; overflow-wrap: anywhere; }
.title-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.title-row .page-title { margin: 0; }
.title-row .button .icon { vertical-align: -4px; }
.section-title { font-size: 1.4rem; font-weight: 500; margin: 0 0 12px; }
.byline { color: var(--muted); font-size: 0.9rem; margin: 0 0 20px; }
/* A page's owner and review date (milestone 32): under the byline, and Needs review once it's due. */
.byline:has(+ .review-line) { margin-bottom: 6px; }
.review-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; color: var(--muted); font-size: 0.9rem; margin: 0 0 20px; }
.review-line > .icon { color: var(--ok); }
/* Approvals (milestone 72): where a page's request stands, under its title. */
.byline:has(+ .approval-line) { margin-bottom: 6px; }
.approval-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; color: var(--muted); font-size: 0.9rem; margin: 0 0 20px; }
.approval-line.approved > .icon { color: var(--ok); }
.approval-line.declined > .icon { color: var(--danger, #b3261e); }
.approval-people { list-style: none; padding: 0; margin: 0 0 16px; }
.approval-people li { padding: 6px 0; border-bottom: 1px solid var(--border); }
.approval-state.approved { color: var(--ok); font-weight: 600; }
.approval-state.declined { color: var(--danger, #b3261e); font-weight: 600; }
.approval-note { color: var(--muted); }
.review-due { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; }
.review-due p { margin: 0; }
.review-off { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--border); }
.card.narrow { max-width: 640px; margin-top: 32px; }

.page-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin-bottom: 12px; }
.breadcrumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin: 0; font-size: 0.95rem; color: var(--muted); }
.breadcrumbs a { text-decoration: none; }
.breadcrumbs a:hover { text-decoration: underline; }
.lock-badge { display: inline-flex; color: var(--muted); margin-left: 4px; }
.attach-badge { display: inline-flex; align-items: center; gap: 2px; color: var(--muted); margin-left: 4px; text-decoration: none; font-size: 0.9rem; }
.attach-badge:hover { color: var(--link); }
.page-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 4px; margin-left: auto; }
.page-actions .action {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 6px; white-space: nowrap;
  color: var(--text); text-decoration: none; cursor: pointer; background: none; border: none; font: inherit;
}
.page-actions .action:hover, .page-actions details[open] > summary { background: var(--hover); }
/* Who's here (milestone 83): the others on the page now, overlapping a little, a pencil on those editing. */
.page-here { display: inline-flex; align-items: center; margin-right: 6px; }
.page-here[hidden] { display: none; }
.page-here-person { position: relative; display: inline-flex; margin-left: -6px; }
.page-here-person:first-child { margin-left: 0; }
.page-here-person .avatar.small { width: 28px; height: 28px; font-size: 0.72rem; margin: 0; box-shadow: 0 0 0 2px var(--bg); }
.page-here-person.editing .avatar { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--accent); }
.page-here-pencil { position: absolute; right: -4px; bottom: -4px; width: 14px; height: 14px; border-radius: 999px; background: var(--accent); color: #1e2333; font-size: 0.6rem; line-height: 14px; text-align: center; }
.page-here-more { margin-left: 4px; color: var(--muted); font-size: 0.85rem; }

.dashboard { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 380px); gap: 40px; align-items: start; }
.dashboard-side { border-left: 1px solid var(--border); padding-left: 32px; }
@media (max-width: 1099px) {
  .dashboard { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .dashboard-side { border-left: none; padding-left: 0; border-top: 1px solid var(--border); padding-top: 20px; }
}
.welcome h2 { margin-top: 0; font-size: 1.4rem; font-weight: 500; }
.welcome-name { color: var(--muted); margin-top: -4px; }
.group-heading { font-size: 0.95rem; font-weight: 600; color: var(--muted); margin: 28px 0 8px; }

.content-list { list-style: none; margin: 0; padding: 0; }
.content-list > li { display: flex; align-items: flex-start; gap: 10px; padding: 6px 0; }
.content-list.tight > li { padding: 3px 0; }
.content-list a { text-decoration: none; font-size: 1.02rem; overflow-wrap: anywhere; }
.content-list a:hover { text-decoration: underline; }
.page-icon { color: var(--link); flex: none; }
.content-list .where { color: var(--muted); font-size: 0.85rem; margin-left: 8px; }
.content-list .when { display: block; color: var(--muted); font-size: 0.85rem; }
.content-list .when a { font-size: inherit; }

.activity { list-style: none; margin: 0; padding: 0; }
.activity > li { display: flex; gap: 14px; padding: 10px 0; }
.activity .who { margin: 0 0 2px; font-weight: 600; color: var(--link); }

/* Blog: a space's list of posts, and "Recent blog posts" on the dashboard */
.blog-list { list-style: none; margin: 0; padding: 0; max-width: 760px; }
.blog-list > li { display: flex; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.blog-list > li > div { min-width: 0; }
.blog-title { margin: 0 0 2px; font-size: 1.2rem; font-weight: 500; overflow-wrap: anywhere; }
.blog-title a { text-decoration: none; }
.blog-title a:hover { text-decoration: underline; }
.blog-meta { margin: 0 0 6px; color: var(--muted); font-size: 0.85rem; }
.blog-excerpt { margin: 0; overflow-wrap: anywhere; }
.recent-posts { margin: 24px 0; }
.recent-posts h2 { font-size: 1.1rem; font-weight: 500; margin: 0 0 6px; }

/* Watching and notifications: the top bar's bell, the page's Watch menu, and /notifications */
.topbar .bell { position: relative; }
.bell-count {
  position: absolute; top: 1px; right: 0; min-width: 17px; padding: 0 4px; border-radius: 999px;
  background: var(--danger); color: #fff; font-size: 0.68rem; font-weight: 700; line-height: 17px; text-align: center;
}
.menu-note { margin: 6px 16px 4px; max-width: 260px; color: var(--muted); font-size: 0.8rem; }
.notifications { list-style: none; margin: 0 0 24px; padding: 0; }
.notifications > li { display: flex; gap: 12px; padding: 10px 12px; border-bottom: 1px solid var(--border); }
.notifications > li.unread { background: var(--hover); box-shadow: inset 3px 0 var(--accent); }
.notifications p { margin: 0; overflow-wrap: anywhere; }
.notifications .when { color: var(--muted); font-size: 0.85rem; }
.notifications .share-note { margin: 4px 0 2px; padding: 4px 10px; border-left: 3px solid var(--border); white-space: pre-line; }
.watching li { align-items: center; }
.notifications .comment-note { margin: 4px 0 2px; padding: 4px 10px; border-left: 3px solid var(--border); color: var(--muted); }

.search-in { color: var(--muted); font-style: italic; }

/* Labels at the foot of a page, and the label pages */
.page-labels { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 28px; max-width: 900px; }
.page-labels .labels-icon { display: inline-flex; color: var(--muted); }
.label-list { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0; padding: 0; }
.label-list li { display: inline-flex; align-items: center; }
a.label { display: inline-block; padding: 1px 8px; border-radius: 3px; background: var(--hover); color: var(--link); font-size: 0.85rem; text-decoration: none; }
a.label:hover { text-decoration: underline; }
.label-remove { display: inline; margin: 0; }
.label-remove button { padding: 0 4px; font-size: 1rem; line-height: 1; color: var(--muted); }
.label-form { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.label-form input { width: 14em; padding: 2px 8px; font-size: 0.9rem; }
.label-hint { flex-basis: 100%; margin: 0; }
.page-labels .alert { flex-basis: 100%; margin: 0; }
.label-cloud { display: flex; flex-wrap: wrap; gap: 8px 10px; list-style: none; padding: 0; }
.search-label { display: flex; align-items: center; gap: 6px; margin: 4px 0 10px; }
.search-label .label { padding: 1px 8px; border-radius: 3px; background: var(--hover); font-size: 0.85rem; }
.label-cloud .count { color: var(--muted); font-size: 0.8rem; margin-left: 3px; }

/* Comments at the foot of a page */
.comments { margin-top: 40px; max-width: 900px; }
.comment-list, .comment-replies { list-style: none; margin: 0; padding: 0; }
.comment-list > li { border-top: 1px solid var(--border); padding: 14px 0; }
.comment-replies { margin: 10px 0 0 48px; }
.comment-replies > li { padding: 10px 0 0; }
.comment { display: flex; gap: 12px; align-items: flex-start; }
.comment:target { background: var(--hover); box-shadow: -8px 0 0 var(--hover), 8px 0 0 var(--hover); border-radius: 2px; }
.comment-main { flex: 1; min-width: 0; }
.comment-head { margin: 0 0 2px; }
.comment-body { overflow-wrap: anywhere; }
.comment-body > :first-child { margin-top: 0; }
.comment-body > :last-child { margin-bottom: 4px; }
.comment-foot { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; font-size: 0.85rem; }
.comment-foot .when { color: var(--muted); }
.comment-foot button.link { font-size: inherit; }
.comment-deleted { margin: 0; font-style: italic; }
.comment-reply-form { margin: 10px 0 0 48px; }
.comment-form { margin-top: 16px; }
.comment-form .actions { margin-top: 8px; }
@media (max-width: 600px) {
  .comment-replies, .comment-reply-form { margin-left: 20px; }
}

/* Inline comments (milestone 36; web/inline-comments.js): the threads' text marked in yellow, as Confluence did; the
   panel slides in from the right (from the bottom on a phone). Without the script it's a section under the page. */
mark.inline-mark, mark.inline-pending { background: var(--mark-bg); border-bottom: 2px solid var(--accent); border-radius: 0; padding: 0; cursor: pointer; }
mark.inline-mark.active, mark.inline-mark.hover, mark.inline-pending { background: var(--accent); color: #1e2333; }
.inline-panel { margin-top: 32px; max-width: 900px; }
.inline-panel[data-empty] { display: none; }
.inline-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.inline-panel-head .section-title { margin: 0; }
.inline-close { font-size: 1.5rem; line-height: 1; min-width: 40px; min-height: 40px; }
.inline-threads { list-style: none; margin: 0; padding: 0; }
.inline-thread { border-top: 1px solid var(--border); padding: 12px 0; }
.inline-thread.active { background: var(--hover); box-shadow: -8px 0 0 var(--hover), 8px 0 0 var(--hover); }
.inline-quote { margin: 0 0 8px; padding: 2px 10px; border-left: 3px solid var(--accent); color: var(--muted); overflow-wrap: anywhere; max-height: 7.5em; overflow: hidden; }
.inline-removed, .inline-resolved-note { margin: 0 0 8px; }
.inline-resolved-note .icon { width: 14px; height: 14px; vertical-align: -2px; }
.inline-resolve { margin-top: 8px; }
.inline-resolved { margin-top: 12px; }
.inline-resolved > summary { cursor: pointer; color: var(--link); padding: 6px 0; }
.inline-none { margin: 8px 0; }
.inline-new { margin: 12px 0; }
.inline-panel.inline-js { display: none; position: fixed; top: 0; right: 0; bottom: 0; z-index: 45; width: min(400px, 100vw); max-width: none; margin: 0;
  padding: 12px 16px 24px; overflow-y: auto; background: var(--surface); border-left: 1px solid var(--border); box-shadow: var(--shadow); }
.inline-panel.inline-js.open { display: block; }
.inline-panel.inline-js .comment-replies, .inline-panel.inline-js .comment-reply-form { margin-left: 24px; }
.inline-comment-button { position: fixed; left: var(--inline-x, 50%); top: var(--inline-y, 50%); z-index: 44; display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px; min-height: 36px; box-shadow: var(--shadow); }
.inline-comment-button[hidden] { display: none; }
/* On a phone the button sits at the bottom of the screen, big enough to tap, clear of the phone's own menu over the selection. */
.inline-comment-button.docked { left: 50%; top: auto; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); min-height: 48px; padding: 10px 22px; font-size: 1.05rem; }
@media (max-width: 700px) {
  .inline-panel.inline-js { top: auto; width: 100%; max-height: 75vh; border-left: none; border-top: 1px solid var(--border); border-radius: 12px 12px 0 0; }
}

/* Share: the page's Share panel */
.share-panel { width: 320px; padding: 10px 0 6px; }
.share-panel .share-label { display: block; margin: 6px 16px 4px; font-weight: 600; font-size: 0.85rem; }
.share-panel .share-label .muted { font-weight: 400; }
.share-link-row { display: flex; gap: 6px; margin: 0 16px 6px; }
.share-link-row input { padding: 4px 8px; font-size: 0.85rem; min-width: 0; }
/* A long message to copy (AI agents' "Paste this into Claude Code"): the whole width, its Copy button under it, not stretched beside it. */
.share-link-row:has(> textarea) { flex-direction: column; align-items: flex-start; }
.share-link-row > textarea { width: 100%; box-sizing: border-box; }
.share-filter { display: block; width: calc(100% - 32px); margin: 0 16px 6px; font: inherit; padding: 4px 8px; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: 6px; }
.share-people { list-style: none; margin: 0 0 4px; padding: 0; max-height: 220px; overflow-y: auto; }
.share-people label { display: flex; align-items: center; gap: 6px; padding: 4px 16px; cursor: pointer; }
.share-people label:hover { background: var(--hover); }
.share-panel textarea { display: block; width: calc(100% - 32px); margin: 0 16px 6px; }
.share-panel button[type=submit] { margin: 4px 16px 6px; }
.share-error { margin: 0 16px 4px; color: var(--danger); font-size: 0.85rem; }
.share-none { margin: 8px 16px; color: var(--muted); font-size: 0.9rem; }
.share-panel [hidden] { display: none; }
/* Page links for people without an account (docs/PLAN.md milestone 30): in the Share panel, and the visitor's page. */
.share-panel { max-height: calc(100vh - 140px); overflow-y: auto; }
.page-links h3, .page-links h4 { margin-top: 10px; }
.page-link-form select, .page-link-form input[type=text] { display: block; width: calc(100% - 32px); margin: 0 16px 6px; box-sizing: border-box; }
.page-link-qr { display: block; width: 160px; height: 160px; margin: 4px 16px 8px; }
.page-link-list { list-style: none; margin: 0; padding: 0; }
.page-link-list li { padding: 6px 0; border-top: 1px solid var(--border); }
.page-link-list form { margin: 0 16px; }
.page-link-facts { margin-top: 0; }
.page-links-message { color: var(--text); }

/* A homepage's Wall display page (docs/PLAN.md milestone 33; Pages/HomeDisplay.cshtml). */
.display-settings .share-link-row { margin: 6px 0; max-width: 640px; }
.display-settings .share-link-row input { flex: 1; }
.display-links { list-style: none; margin: 0 0 16px; padding: 0; }
.display-links li { padding: 10px 0; border-top: 1px solid var(--border); }
.display-links li p { margin: 0 0 6px; }
.display-made { margin: 0 0 16px; padding: 12px; border: 1px solid var(--border); border-radius: 6px; }
.display-qr { margin-top: 8px; }
.display-dark { border: 0; padding: 0; margin-left: 0; margin-right: 0; }
.display-dark-times { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 8px 0 4px; }
.display-dark-times label { margin: 0; }
.link-page .link-files { margin-top: 24px; }
.link-page .link-files ul { padding-left: 20px; }
.link-page .link-note { margin-top: 32px; }
.link-password { max-width: 420px; }
.watching li > span:nth-child(2) { flex: 1; }
.search-files .search-snippet { display: block; color: var(--muted); font-size: 0.9rem; }

.two-columns { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 32px; margin-top: 32px; }
@media (max-width: 899px) { .two-columns { grid-template-columns: minmax(0, 1fr); } }
.contributors { list-style: none; margin: 0; padding: 0; }
.contributors li { display: flex; align-items: center; gap: 10px; padding: 5px 0; }

.directory { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 32px; align-items: start; }
.directory-tabs { display: flex; flex-direction: column; gap: 2px; }
.directory-tabs a { padding: 7px 12px; border-radius: 6px; color: var(--text); text-decoration: none; overflow-wrap: anywhere; min-width: 0; }
.directory-tabs a:hover { background: var(--hover); }
.directory-tabs a.active { background: var(--active-bg); font-weight: 600; }
@media (max-width: 699px) {
  .directory { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .directory-tabs { flex-direction: row; flex-wrap: wrap; }
}
.space-table td { vertical-align: middle; }
/* Space categories (milestone 115): under the tabs, and each space's beside its name. */
.directory-heading { margin: 14px 12px 4px; font-size: 0.78rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
.space-categories { display: inline-flex; flex-wrap: wrap; gap: 4px; margin-left: 10px; vertical-align: middle; max-width: 100%; }
/* A long category with no spaces wraps rather than widening the page on a phone. */
.space-categories > * { overflow-wrap: anywhere; min-width: 0; }
.space-cell { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; font-size: 1.02rem; }
.space-cell:hover span:last-child { text-decoration: underline; }

/* People (4b phase 3): profile pictures in avatars, the directory and a profile. */
img.avatar.picture { display: inline-block; vertical-align: middle; object-fit: cover; background: var(--subtle); }
.avatar.huge { width: 96px; height: 96px; font-size: 1.8rem; }
.people-search { display: flex; gap: 8px; max-width: 560px; margin-bottom: 16px; }
.people-groups { margin: 0 0 16px; }
.people-search input { flex: 1; min-width: 0; max-width: none; }
.people-grid { list-style: none; margin: 16px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.person-card { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text); text-decoration: none; height: 100%; box-sizing: border-box; }
.person-card:hover { background: var(--hover); }
.person-card:hover .person-name { text-decoration: underline; }
.person-text { display: flex; flex-direction: column; min-width: 0; font-size: 0.9rem; }
.person-text > span { overflow-wrap: anywhere; }
.person-name { font-weight: 600; font-size: 1rem; color: var(--link); }
.profile-head { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; margin-bottom: 24px; }
.profile-head > div { flex: 1; min-width: 200px; }
.profile-head .page-title { margin-bottom: 2px; }
.profile-head p { margin: 0; }
.profile-columns { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 32px; align-items: start; }
@media (max-width: 899px) { .profile-columns { grid-template-columns: minmax(0, 1fr); } }
.profile-about { white-space: pre-line; overflow-wrap: anywhere; }
.plain-list { list-style: none; margin: 0; padding: 0; }
.plain-list li { padding: 4px 0; }

/* Milestone 4b, phase 2: space pictures, stars, Bookmarks, shortcuts. */
.tile.large { width: 96px; height: 96px; border-radius: 14px; font-size: 1.8rem; }
img.tile.picture { display: inline-block; vertical-align: middle; object-fit: cover; background: var(--subtle); }
.space-head-row { display: flex; align-items: flex-start; gap: 4px; }
.space-head-row .space-head { flex: 1; min-width: 0; }
.star-form { margin: 0; }
.star-button { color: var(--muted); }
.star-button:hover { color: var(--text); }
.star-button.on, .page-actions .action.on .icon { color: var(--accent); }
.star-button .icon { width: 20px; height: 20px; }
.page-actions button.action { font: inherit; border: none; background: none; cursor: pointer; }
.star-cell { width: 1%; text-align: center; padding-right: 0; }
/* Bookmarks: a star in front of each page there, on Recently worked on and on Recently visited (on Bookmarks, clicked
   off, the row dims until the page is left; Pages/_BookmarkStar.cshtml). */
.saved-star .star-button { margin: -4px 0 0 -6px; }
.star-button:not(.on) .icon.when-on, .star-button.on .icon.when-off { display: none; }
.content-list > li.unsaved > span { opacity: 0.5; }
.side-hint { margin: 4px 8px 8px; }
.picture-row { display: flex; align-items: center; gap: 16px; margin-bottom: 12px; }
.shortcut-list { list-style: none; padding: 0; margin: 0 0 16px; }
.shortcut-list li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.shortcut-text { overflow-wrap: anywhere; min-width: 0; }
.shortcut-buttons { display: inline-flex; gap: 6px; }

/* Milestone 13: templates (Create from template, and the lists in Space tools and Admin). */
.template-list { list-style: none; padding: 0; margin: 0 0 16px; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
#import-folder-form { margin-top: 28px; } /* Create → Import: the folder box under the file box's button */
.template-list a { display: flex; flex-direction: column; gap: 4px; height: 100%; box-sizing: border-box; padding: 10px 12px; border: 1px solid var(--border); border-radius: 6px; color: inherit; text-decoration: none; }
.template-list a:hover, .template-list a:focus-visible { background: var(--hover); border-color: var(--accent); }
.template-list strong { display: inline-flex; align-items: center; gap: 6px; }
/* The Templates gallery (milestone 65): groups | templates | a large preview, once web/templates.js runs. */
.template-gallery.ready { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 20px; align-items: start; }
.template-gallery.ready.previewing { grid-template-columns: 200px minmax(0, 1fr) minmax(0, 1.3fr); }
.template-gallery.ready .template-list { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.template-gallery.previewing .template-list { grid-template-columns: 1fr; }
.gallery-groups { display: flex; flex-direction: column; gap: 2px; position: sticky; top: 72px; }
.gallery-search { margin-bottom: 8px; max-width: none; width: 100%; box-sizing: border-box; padding: 8px 10px; border: 1px solid var(--border); border-radius: 6px; background: var(--bg); color: var(--text); font: inherit; }
.gallery-preview-head .button { white-space: nowrap; flex: none; }
.gallery-group {
  display: flex; justify-content: space-between; gap: 8px; padding: 7px 10px; border: 0; border-radius: 6px;
  background: none; color: var(--text); font: inherit; text-align: left; cursor: pointer;
}
.gallery-group:hover { background: var(--hover); }
.gallery-group.on { background: var(--active-bg); font-weight: 600; }
.gallery-heading { margin: 4px 0 8px; font-size: 1rem; }
.template-list a.on { border-color: var(--button); background: var(--active-bg); }
.gallery-preview { position: sticky; top: 72px; max-height: calc(100vh - 96px); overflow: auto; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); }
.gallery-preview-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: var(--surface); }
.gallery-preview-head h3 { margin: 0 0 4px; }
.gallery-preview-head p { margin: 0; }
.gallery-preview-page { padding: 8px 20px 20px; font-size: 0.92rem; }
@media (max-width: 899px) {
  .template-gallery.ready, .template-gallery.ready.previewing { grid-template-columns: 1fr; }
  .gallery-groups { position: static; flex-direction: row; flex-wrap: wrap; }
  .gallery-search { flex-basis: 100%; }
  .gallery-preview { position: static; max-height: none; }
}
.template-rows { list-style: none; padding: 0; margin: 0 0 16px; }
.template-rows li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.template-rows .template-text { min-width: 0; overflow-wrap: anywhere; }
.template-rows .template-buttons { display: inline-flex; flex-wrap: wrap; gap: 6px; }

/* Milestone 5: attachments. */
.attachment-name { display: inline-flex; align-items: center; gap: 10px; min-width: 12em; overflow-wrap: anywhere; }
.attachment-thumb { width: 40px; height: 40px; object-fit: cover; border-radius: 4px; background: var(--subtle); flex: none; }
.attachment-icon { display: inline-flex; width: 40px; height: 40px; align-items: center; justify-content: center; color: var(--muted); background: var(--subtle); border-radius: 4px; flex: none; }
.attachment-table td { vertical-align: middle; }
.nowrap { white-space: nowrap; }
.attachment-table .phone-only { display: none; }
/* Admin → Backups: the file name under its date, breaking anywhere on a phone; the button stays on the right. */
.backup-file { display: block; font-family: Consolas, "Cascadia Mono", ui-monospace, monospace; font-size: 0.85rem; color: var(--muted); overflow-wrap: anywhere; }
/* Admin → License: a pasted license, in lines of 64. */
.license-text { font-family: Consolas, "Cascadia Mono", ui-monospace, monospace; font-size: 0.85rem; width: 100%; }
td.backup-action { width: 1%; white-space: nowrap; text-align: right; vertical-align: middle; }
/* The recovery key: big enough to copy by hand, broken only at its dashes (anywhere on a narrow phone). */
.recovery-key code { display: inline-block; font-size: 1.1rem; letter-spacing: 0.04em; padding: 0.5rem 0.75rem; overflow-wrap: anywhere; user-select: all; }
#encryption ul.explain { padding-left: 1.2rem; }
#encryption ul.explain li { margin-bottom: 0.5rem; }
.alert.note form { margin-top: 0.5rem; }
/* Two-step sign-in (Your account): the numbered setup, and the recovery codes in two columns (one on a phone). */
ol.setup-steps { padding-left: 1.4rem; }
ol.setup-steps > li { margin-bottom: 1rem; }
ol.setup-steps .qr { margin: 0.5rem 0; }
ul.recovery-codes { list-style: none; padding: 0; margin: 0 0 1rem; display: grid; grid-template-columns: repeat(2, max-content); gap: 0.4rem 2rem; }
details.recovery-choice { margin: 1.25rem 0 1rem; }
ul.recovery-codes code { font-size: 1.1rem; letter-spacing: 0.06em; user-select: all; }
@media (max-width: 420px) { ul.recovery-codes { grid-template-columns: max-content; } }
@media (max-width: 600px) {
  .attachment-table .when { display: none; }
  .attachment-table .phone-only { display: block; margin: 2px 0 0 50px; }
  .attachment-name { min-width: 0; }
}

/* Milestone 7: history. Taken-out and put-in text use the error and ok colors, so they follow light and dark. */
.tag { display: inline-block; padding: 0 8px; border-radius: 999px; background: var(--subtle); border: 1px solid var(--border); color: var(--muted); font-size: 0.8rem; vertical-align: middle; }
.block { display: block; }
.avatar.small { display: inline-flex; width: 22px; height: 22px; font-size: 0.65rem; vertical-align: middle; margin-right: 4px; }
a.button.small { padding: 2px 10px; font-size: 0.9rem; }
.history-table td { vertical-align: middle; }
/* A version note, under "Version N": wraps, unlike the rest of its cell. */
.history-table .version-note { white-space: normal; max-width: 28em; margin-top: 2px; font-size: 0.92rem; color: var(--muted); font-style: italic; }
.history-table .pick { width: 1%; padding-right: 0; }
.history-table .row-actions { text-align: right; white-space: nowrap; }
.history-table .row-actions > * { margin-left: 6px; }
@media (max-width: 600px) {
  /* Each version becomes a small block: the two choices, then the version, who saved it, and its buttons under it. */
  .history-table thead { display: none; }
  .history-table tr { display: grid; grid-template-columns: auto auto 1fr; column-gap: 4px; padding: 8px 0; border-bottom: 1px solid var(--border); }
  .history-table td { border: none; padding: 2px 6px; }
  .history-table td:nth-child(4), .history-table .row-actions { grid-column: 3; }
  .history-table .row-actions { text-align: left; white-space: normal; }
  .history-table .row-actions > * { margin: 4px 6px 0 0; }
}
.version-note p { margin: 0; }
.version-note .actions { margin-top: 10px; align-items: center; }

.diff-heads { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 8px; }
.diff-head { margin: 0; padding: 8px 12px; border-radius: 6px; background: var(--subtle); }
.diff-head.old { border-left: 4px solid var(--danger); }
.diff-head.new { border-left: 4px solid var(--ok); }
.diff-key del, .diff-key ins { margin-right: 10px; }
.diff { border: 1px solid var(--border); border-radius: 6px; overflow: hidden; margin-bottom: 24px; }
.diff-row { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--border); }
.diff-row:first-child { border-top: none; }
.diff-cell { padding: 6px 12px; overflow-wrap: anywhere; min-width: 0; }
.diff-cell.new { border-left: 1px solid var(--border); }
.diff-row:first-child .diff-cell { font-weight: 600; } /* the title */
.diff-row.removed .diff-cell.old, .diff-row.changed .diff-cell.old { background: color-mix(in srgb, var(--danger-bg) 55%, transparent); }
.diff-row.added .diff-cell.new, .diff-row.changed .diff-cell.new { background: color-mix(in srgb, var(--ok-bg) 55%, transparent); }
.diff del, .diff-key del { background: var(--danger-bg); color: var(--danger); text-decoration: line-through; border-radius: 3px; }
.diff ins, .diff-key ins { background: var(--ok-bg); color: var(--ok); text-decoration: none; font-weight: 600; border-radius: 3px; }
.diff-row.skipped { display: block; }
.diff-skip { padding: 4px 12px; color: var(--muted); font-size: 0.85rem; background: var(--subtle); text-align: center; }
.diff-label { display: none; }
@media (max-width: 600px) {
  .diff-heads { grid-template-columns: 1fr; gap: 6px; }
  .diff-row { grid-template-columns: 1fr; }
  .diff-cell.new { border-left: none; }
  .diff-row.same .diff-cell.new { display: none; } /* the same line twice adds nothing on a phone */
  .diff-cell:empty, .diff-row.removed .diff-cell.new, .diff-row.added .diff-cell.old { display: none; }
  .diff-row.changed .diff-label { display: block; color: var(--muted); font-size: 0.75rem; font-weight: normal; }
}
.file-versions { margin: 4px 0 0 50px; font-size: 0.9rem; }
.file-versions summary { color: var(--link); cursor: pointer; }
.file-versions ul { margin: 4px 0 0; padding-left: 18px; }
@media (max-width: 600px) { .file-versions { margin-left: 0; } }

/* Your account → AI agents: the spaces AI agents may see, and the other ways to connect under the Claude Code message. */
fieldset.ai-spaces { border: 0; margin: 0 0 8px; padding: 0; min-width: 0; }
.more-ways { margin: 4px 0 12px; }
.more-ways summary { color: var(--link); cursor: pointer; margin-bottom: 8px; }

/* Admin → Confluence Import: the spaces to check, the progress bars, and what came in. */
.import-progress { display: block; width: 100%; max-width: 520px; height: 14px; margin: 12px 0 4px; accent-color: var(--link); }
.import-spaces { list-style: none; margin: 12px 0; padding: 0; }
.import-space { padding: 12px 0; border-top: 1px solid var(--border); }
.import-space:last-child { border-bottom: 1px solid var(--border); }
.import-space-head { display: flex; align-items: baseline; gap: 8px; }
.import-space-head input[type=checkbox] { flex: none; }
.import-space p { margin: 4px 0 8px; }
.import-space-fields { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 0 12px; }
.import-space-fields .field { margin-bottom: 0; }
.import-space-fields .import-into { grid-column: 1 / -1; margin-bottom: 8px; }
.import-space-fields [hidden] { display: none; }
.import-space.unpicked .import-space-fields, .import-space.unpicked p { opacity: 0.55; }
.import-pick-all { display: flex; gap: 8px; margin: 8px 0 0; }
.import-results td, .import-results thead th:not(:first-child) { text-align: right; }
@media (max-width: 520px) { .import-space-fields { grid-template-columns: 1fr; } }

/* Themes (Themes/ThemeStore). A look's colors come from /looks/KEY.css, loaded after this file, on <html data-look>.
   The picker (/account/theme) draws each look as two tiny pages, light and dark, from --s-* variables that
   /looks/swatches.css sets per look; the theme editor's preview (/account/theme/edit) gets its colors from
   theme-editor.js. */
.theme-group { margin: 24px 0 8px; font-size: 1.05rem; }
.theme-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
/* Each theme and its "(Dark)" twin side by side, never split across rows. */
.theme-grid.paired { grid-template-columns: repeat(auto-fill, minmax(min(450px, 100%), 1fr)); }
.theme-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.theme-option { position: relative; }
.theme-option input { position: absolute; top: 12px; left: 12px; margin: 0; }
.theme-option label {
  display: flex; flex-direction: column; gap: 4px; height: 100%; padding: 10px 12px 12px 36px; cursor: pointer;
  border: 1px solid var(--border); border-radius: 8px; background: var(--surface);
}
.theme-option label:hover { background: var(--hover); }
.theme-option input:checked + label { border-color: var(--link); box-shadow: 0 0 0 2px var(--link); }
.theme-option input:focus-visible + label { outline: 2px solid var(--link); outline-offset: 2px; }
.theme-option .hint { color: var(--muted); font-size: 0.88rem; }
.swatches { display: flex; gap: 6px; margin-bottom: 4px; }
.swatch {
  display: flex; flex-direction: column; width: 72px; height: 48px; border-radius: 5px; overflow: hidden;
  border: 1px solid var(--s-border, var(--border)); background: var(--s-bg, var(--bg)); flex: none;
}
.swatch .s-top { display: flex; justify-content: flex-end; align-items: center; height: 11px; padding: 0 4px; background: var(--s-header-bg, var(--header-bg)); }
.swatch .s-create { width: 14px; height: 5px; border-radius: 2px; background: var(--s-create-bg, var(--create-bg)); }
.swatch .s-body { display: flex; flex: 1; min-height: 0; }
.swatch .s-side { width: 18px; padding: 4px 2px; background: var(--s-sidebar-bg, var(--sidebar-bg)); border-right: 1px solid var(--s-border, var(--border)); }
.swatch .s-active { display: block; height: 4px; border-radius: 1px; background: var(--s-active-bg, var(--active-bg)); }
.swatch .s-main { display: flex; flex-direction: column; gap: 3px; flex: 1; padding: 4px 5px; }
.swatch .s-line { display: block; height: 3px; width: 90%; border-radius: 1px; background: var(--s-text, var(--text)); opacity: 0.7; }
.swatch .s-line.short { width: 60%; background: var(--s-muted, var(--muted)); }
.swatch .s-link { display: block; height: 3px; width: 50%; border-radius: 1px; background: var(--s-link, var(--link)); }
.swatch .s-button { display: block; height: 7px; width: 18px; margin-top: auto; border-radius: 2px; background: var(--s-button, var(--button)); }
.theme-list { list-style: none; margin: 0; padding: 0; }
.theme-list li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.theme-list li:last-child { border-bottom: none; }
.theme-list .swatches { margin: 0; }
.theme-list-name { display: flex; flex-direction: column; flex: 1; min-width: 140px; }
.theme-list-name .hint { color: var(--muted); font-size: 0.88rem; }
.theme-list form { margin: 0; }
button.secondary.danger { background: transparent; color: var(--danger); border-color: var(--border); }
.sticky-actions { position: sticky; bottom: 0; padding: 12px 0; margin-bottom: -12px; background: var(--surface); border-top: 1px solid var(--border); }

.theme-start .field { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.theme-start .field > label { margin: 0; }
.theme-start .hint { flex-basis: 100%; }
.theme-editor-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.theme-editor-preview { position: sticky; top: 72px; display: flex; flex-direction: column; gap: 12px; }
@media (max-width: 860px) {
  .theme-editor-layout { grid-template-columns: 1fr; }
  .theme-editor-preview { position: static; order: -1; }
}
.theme-pictures { border: 1px solid var(--border); border-radius: 6px; padding: 8px 12px 12px; margin: 12px 0 16px; }
.theme-pictures legend { font-weight: 600; padding: 0 4px; }
.theme-picture-row, .theme-picture-add { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 8px 0; border-top: 1px solid var(--border); }
.theme-picture-row img { height: 32px; width: auto; max-width: 160px; object-fit: contain; }
/* The built-in holiday pictures in the theme editor (ThemeEdit, Holidays/HolidayCatalog.cs): check the ones to add. */
.theme-holidays { padding: 8px 0; border-top: 1px solid var(--border); }
.theme-holidays > summary { cursor: pointer; font-weight: 600; }
.theme-holiday { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 6px 0; border-top: 1px solid var(--border); }
.theme-holiday-name { display: grid; flex: 1 1 100%; min-width: 0; }
.theme-holiday-pic { display: inline-flex; align-items: center; gap: 4px; padding: 3px 6px; border: 1px solid var(--border); border-radius: 6px; cursor: pointer; }
.theme-holiday-pic:has(input:checked) { border-color: var(--link); }
.theme-holiday-pic img { width: 40px; height: 40px; object-fit: contain; }
.theme-picture-days { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.theme-pictures .choice { margin: 0; gap: 6px; align-items: center; }
.theme-pictures .choice input { margin-top: 0; }
.theme-picture-days label[hidden] { display: none; }
.theme-picture-days select { width: auto; }
.theme-picture-days input[type="number"] { width: 4.5em; }
.theme-slots { width: 100%; border-collapse: collapse; }
.theme-slots th, .theme-slots td { padding: 5px 8px 5px 0; text-align: left; font-weight: normal; vertical-align: middle; }
.theme-slots thead th { font-weight: 600; color: var(--muted); font-size: 0.88rem; }
.theme-slots th.theme-slot-group { padding-top: 16px; font-weight: 600; }
.theme-slots td { white-space: nowrap; }
.theme-slots input[type="color"] { width: 40px; height: 28px; padding: 1px 2px; border: 1px solid var(--border); border-radius: 4px; background: var(--surface); cursor: pointer; vertical-align: middle; }
.theme-slots code.hex { font-size: 0.82rem; color: var(--muted); background: none; padding: 0; }

.theme-preview { margin: 0; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; background: var(--bg); color: var(--text); font-size: 0.85rem; }
.theme-preview figcaption { padding: 4px 10px; font-size: 0.78rem; font-weight: 600; color: var(--muted); background: var(--surface); border-bottom: 1px solid var(--border); }
.theme-preview .tp-top { display: flex; align-items: center; gap: 10px; padding: 7px 10px; background: var(--header-bg); color: var(--header-text); }
.theme-preview .tp-brand { font-weight: 700; }
.theme-preview .tp-create { margin-left: auto; padding: 2px 10px; border-radius: 4px; background: var(--create-bg); color: var(--create-text); font-weight: 600; }
.theme-preview .tp-body { display: flex; min-height: 170px; }
.theme-preview .tp-side { display: flex; flex-direction: column; gap: 2px; width: 30%; padding: 8px 6px; background: var(--sidebar-bg); border-right: 1px solid var(--border); }
.theme-preview .tp-item { padding: 3px 6px; border-radius: 4px; }
.theme-preview .tp-active { background: var(--active-bg); font-weight: 600; }
.theme-preview .tp-main { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; flex: 1; padding: 10px 12px; background: var(--surface); }
.theme-preview .tp-title { font-weight: 700; font-size: 1rem; }
.theme-preview .tp-link { color: var(--link); text-decoration: underline; }
.theme-preview .tp-mark { background: var(--mark-bg); color: inherit; }
.theme-preview .tp-muted { color: var(--muted); font-size: 0.78rem; }
.theme-preview .tp-note { padding: 3px 8px; border-radius: 4px; background: var(--note-bg); border: 1px solid var(--border); }
.theme-preview .tp-code { padding: 1px 6px; border-radius: 3px; background: var(--code-bg); color: var(--text); font-size: 0.8rem; }
.theme-preview .tp-row { display: flex; align-items: center; gap: 10px; }
.theme-preview .tp-button { padding: 3px 12px; border-radius: 4px; background: var(--button); color: var(--button-text); font-weight: 600; }
.theme-preview .tp-star { color: var(--accent); font-size: 1rem; }

/* Admin → Statistics */
.stats-periods { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 8px 0 16px; }
.stats-periods [aria-current="page"] { font-weight: 600; color: var(--text); text-decoration: none; }
.stat-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin: 0 0 12px; }
.stat-tiles > div { border: 1px solid var(--border); border-radius: 8px; padding: 10px 14px; }
.stat-tiles dt { color: var(--muted); font-size: 0.9rem; }
.stat-tiles dd { margin: 4px 0 0; font-size: 1.5rem; font-weight: 600; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px 32px; }
.stats-grid h3 { margin: 12px 0 6px; font-size: 1rem; }
.stats-list { margin: 0; padding-left: 1.6em; }
.stats-list li { padding: 3px 0; overflow-wrap: anywhere; }
.stats-count { float: right; margin-left: 12px; font-variant-numeric: tabular-nums; }
.number, .stats-weeks td { text-align: right; font-variant-numeric: tabular-nums; }
.stats-weeks td:first-child { text-align: left; white-space: nowrap; }
/* A page's analytics (Pages/Spaces/Analytics.cshtml, milestone 136): views as bars, readers as a line. */
.stat-tiles dd.analytics-change { font-size: 0.85rem; font-weight: 400; }
.analytics-up { color: var(--success, #1f7a3f); }
.analytics-down { color: var(--danger, #b3261e); }
.analytics-chart { margin: 8px 0 0; }
.analytics-chart svg { width: 100%; height: auto; display: block; }
.analytics-bar { fill: var(--accent); opacity: 0.75; }
.analytics-bar:hover { opacity: 1; }
.analytics-line { fill: none; stroke: var(--text); stroke-width: 2; stroke-linejoin: round; }
.analytics-grid { stroke: var(--border); stroke-width: 1; }
.analytics-axis { fill: var(--muted); font-size: 11px; }
.analytics-key { display: inline-block; width: 14px; height: 4px; margin: 0 4px 2px 12px; vertical-align: middle; border-radius: 2px; }
.analytics-key-bar { background: var(--accent); }
.analytics-key-line { background: var(--text); }
.analytics-filter { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; margin: 0 0 12px; }
.stats-bar { display: block; height: 6px; margin: 0 0 3px auto; border-radius: 3px; background: var(--accent); width: calc(var(--bar) * 5%); }
/* The bars' lengths in 5% steps: the CSP allows no inline styles. */
.bar-0 { --bar: 0; } .bar-1 { --bar: 1; } .bar-2 { --bar: 2; } .bar-3 { --bar: 3; } .bar-4 { --bar: 4; } .bar-5 { --bar: 5; } .bar-6 { --bar: 6; }
.bar-7 { --bar: 7; } .bar-8 { --bar: 8; } .bar-9 { --bar: 9; } .bar-10 { --bar: 10; } .bar-11 { --bar: 11; } .bar-12 { --bar: 12; } .bar-13 { --bar: 13; }
.bar-14 { --bar: 14; } .bar-15 { --bar: 15; } .bar-16 { --bar: 16; } .bar-17 { --bar: 17; } .bar-18 { --bar: 18; } .bar-19 { --bar: 19; } .bar-20 { --bar: 20; }


/* Your account → Proposals (AI agents' proposals) */
.proposal { border-top: 1px solid var(--border); padding-top: 16px; margin-top: 20px; }
.proposal h3 { margin: 0 0 2px; }
.proposal .actions { margin-top: 12px; }
.proposal-note { font-style: italic; }
.proposal .label { display: inline-block; padding: 1px 8px; margin-right: 4px; border-radius: 3px; background: var(--hover); font-size: 0.85rem; }
.proposal-changes > summary { cursor: pointer; margin: 8px 0; }
.proposal-preview { border: 1px solid var(--border); border-radius: 6px; padding: 4px 16px; max-height: 24rem; overflow: auto; }

/* A long address (a desktopwiki.net name with its port) wraps on a phone instead of running off the page. */
.address-list a { overflow-wrap: anywhere; }

/* Signed-in devices and passkeys (milestone 43; Pages/Shared/_Devices, Pages/Account/Passkeys): a row each, its button at the right. */
.device-list { list-style: none; padding: 0; margin: 0 0 16px; }
.device-list > li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.device-list > li:last-child { border-bottom: 0; }
.device-words { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.device-words .badge { margin-left: 6px; }
.device-list form { margin: 0; flex-shrink: 0; }


/* Printing and Export → PDF (milestone 22 step 1; Pages/Spaces/Print). Only the page itself goes on paper: no top bar,
   sidebar, banners, actions, labels form or comment boxes; black on white in DesktopWiki's light colors whatever the
   theme or the device's dark setting (!important beats a look's stylesheet, which loads later); links show their
   address (web links only: the wiki's own /spaces/… addresses mean nothing on paper); blocks aren't split across sheets where it can be helped. Expand sections are opened by shell.js before
   printing and by the print page itself. */
/* The page's ⋯ menu: Export, with Include comments above the formats. */
.menu-panel .export-heading { font-weight: 600; color: var(--text); }
.menu-panel .menu-check { display: flex; align-items: center; gap: 8px; padding: 2px 16px 6px; font-size: 0.9rem; cursor: pointer; }
.print-options { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; padding: 12px 16px; margin: 0 0 24px; border: 1px solid var(--border); border-radius: 6px; background: var(--subtle); }
.print-options fieldset { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.print-options label { display: inline-flex; align-items: center; gap: 6px; }
.print-options .print-note { flex-basis: 100%; margin: 0; }
.print-contents { margin: 0 0 32px; }
.print-contents ol { padding-left: 1.6em; }
.print-contents li.depth-1 { margin-left: 1.5em; } .print-contents li.depth-2 { margin-left: 3em; } .print-contents li.depth-3 { margin-left: 4.5em; }
.print-contents li.depth-4 { margin-left: 6em; } .print-contents li.depth-5 { margin-left: 7.5em; }
.print-page + .print-page { margin-top: 48px; padding-top: 32px; border-top: 1px solid var(--border); }
.print-comments { margin-top: 28px; }
.print-comments h2 { font-size: 1.1rem; }
.print-comment { border-top: 1px solid var(--border); padding: 8px 0; }
.print-comment.reply { margin-left: 32px; }
.print-comment-head { margin: 0 0 4px; font-size: 0.9rem; color: var(--muted); }
.print-comment-head strong { color: var(--text); }

@media print {
  :root {
    --bg: #ffffff !important; --surface: #ffffff !important; --subtle: #f4f4f4 !important; --text: #000000 !important;
    --muted: #444444 !important; --border: #bbbbbb !important; --link: #000000 !important; --code-bg: #f0f0f0 !important;
    --note-bg: #fff6e3 !important; --mark-bg: #fbe0a1 !important; --ok: #1f7a4a !important; --ok-bg: #e4f4ea !important;
    --danger: #b3321b !important; --danger-bg: #fbe9e5 !important;
    --c-red: #c9372c !important; --c-orange: #b65000 !important; --c-yellow: #8f6b00 !important; --c-green: #1f845a !important; --c-teal: #18757f !important;
    --c-blue: #0c66e4 !important; --c-purple: #6e5dc6 !important; --c-pink: #ae4787 !important; --c-gray: #626f86 !important;
    --bg-red: #ffeceb !important; --bg-orange: #fff3eb !important; --bg-yellow: #fff7d6 !important; --bg-green: #dcfff1 !important; --bg-teal: #e7f9ff !important;
    --bg-blue: #e9f2ff !important; --bg-purple: #f3f0ff !important; --bg-pink: #ffecf8 !important; --bg-gray: #f1f2f4 !important;
    --st-gray: #42526e !important; --st-gray-bg: #dfe1e6 !important; --st-red: #ae2a19 !important; --st-red-bg: #ffebe6 !important; --st-yellow: #5c4400 !important; --st-yellow-bg: #fff0b3 !important;
    --st-green: #006644 !important; --st-green-bg: #e3fcef !important; --st-blue: #0747a6 !important; --st-blue-bg: #deebff !important; --st-purple: #403294 !important; --st-purple-bg: #eae6ff !important;
    color-scheme: light !important;
  }
  .page-body [data-panel="info"] { --panel: #2a6fdb !important; --panel-bg: #e8f0fd !important; }
  .page-body [data-panel="note"] { --panel: #7a5bd1 !important; --panel-bg: #f0ebfb !important; }
  .page-body [data-panel="warning"] { --panel: #d97a1a !important; --panel-bg: #fdf1e3 !important; }
  .page-body [data-panel="tip"] { --panel: #2e9a5e !important; --panel-bg: #e6f5ec !important; }
  .page-body [data-panel="error"] { --panel: #c9372c !important; --panel-bg: #fdecea !important; }
  /* Mermaid diagrams on paper: the light picture, without its folded source (a diagram that failed keeps it). */
  :root:is([data-theme], :not([data-theme])) .mermaid-light { display: block !important; }
  :root:is([data-theme], :not([data-theme])) .mermaid-dark { display: none !important; }
  .mermaid-diagram[data-state="drawn"] > .mermaid-source { display: none; }
  /* Panels, table cells and lozenges keep their background colors on paper. */
  html { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  body { background: #ffffff; color: #000000; font-size: 11pt; }

  .demo-banner, .notice-banner, .topbar, .sidebar, .sidebar-backdrop, .skip-link, .page-head, .page-actions, .comments, .inline-panel, .inline-comment-button,
  .comment-form, .label-form, .page-labels a.small-text, .label-remove, .print-options, .alert, .space-extras, .no-print { display: none !important; }
  mark.inline-mark { background: none; border: none; }
  .app, .app.has-sidebar, .app.sidebar-collapsed { display: block !important; min-height: 0; background: none; }
  .content-inner, .content-inner.wide, .content-inner.full { max-width: none; padding: 0; margin: 0; }

  .page-title { font-size: 22pt; }
  .page-body { max-width: none; }
  .page-body a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 0.85em; color: #444444; overflow-wrap: anywhere; }
  .page-body figure a::after { content: none; }
  .page-body table { display: table; overflow: visible; }
  .page-body pre { overflow: visible; white-space: pre-wrap; overflow-wrap: anywhere; }
  .page-body img { max-width: 100% !important; }
  .page-body pre, .page-body figure, .page-body img, .page-body tr, .page-body [data-panel], .page-body blockquote, .print-comment { break-inside: avoid; }
  .page-body h1, .page-body h2, .page-body h3, .page-body h4, .page-body h5, .page-body h6 { break-after: avoid; }
  .page-body details summary { list-style: none; font-weight: 600; }
  .page-body details summary::-webkit-details-marker { display: none; }
  /* A PDF shown in the page (View file) can't be printed from its frame: its name and address are printed instead. */
  .page-body figure.file-view iframe, .page-body figure.media-view audio, .page-body figure.media-view video { display: none; }

  .print-contents { break-after: page; }
  .print-page + .print-page { break-before: page; margin-top: 0; padding-top: 0; border-top: 0; }
  .print-page .page-labels { margin-top: 16px; }
}
/* A box with fixed text after it (Configuration → Your desktopwiki.net address: NAME.desktopwiki.net). */
.input-with-suffix { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; margin-right: 8px; flex-wrap: wrap; }
.input-with-suffix input { width: 16em; max-width: 100%; }

/* My tasks (/tasks; Pages/Tasks.cshtml, web/tasks.js; milestone 28): the tabs use .cal-views's look. */
.task-views { margin: 0 0 1em; }
.tasks-status:empty { display: none; }
.task-group { margin: 0 0 1.4em; }
.task-group-title { font-size: 0.95em; margin: 0 0 0.4em; color: var(--muted); text-transform: none; }
.task-group-title.late { color: var(--danger); }
.task-rows { list-style: none; margin: 0; padding: 0; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); }
.task-row { display: flex; align-items: flex-start; gap: 10px; padding: 8px 12px; }
.task-row + .task-row { border-top: 1px solid var(--border); }
.task-check { display: flex; align-items: center; gap: 6px; margin: 0; flex: none; padding-top: 2px; }
.task-row-box { width: 1.1em; height: 1.1em; margin: 0; accent-color: var(--link); cursor: pointer; }
.task-row-box:disabled { cursor: default; }
.task-row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; overflow-wrap: anywhere; }
.task-row-meta { font-size: 0.88em; }
.task-row.done .task-row-text { color: var(--muted); text-decoration: line-through; }
/* The Task report in a page (Pages/TaskLists.cs) and a homepage's Tasks section. */
.task-report table { width: 100%; }
.task-report td:first-child, .task-report th:first-child { width: 1.6em; text-align: center; }
.task-report tr.done .task-report-text { color: var(--muted); text-decoration: line-through; }
.task-report .task-due, .home-task-list .task-due { white-space: nowrap; font-size: 0.92em; }
.task-report .task-due.task-late, .home-task-list .task-due.task-late { color: var(--danger); font-weight: 600; }
/* A Page Properties Report (milestone 35): a row per page, a column per property; a heading sorts by it (web/shell.js). */
.page-body .properties-report table { display: table; width: 100%; }
.page-body .properties-report th { text-align: left; white-space: nowrap; }
.page-body .properties-report .sort-button {
  background: none; border: 0; padding: 0; margin: 0; min-width: 0; color: inherit; font: inherit; font-weight: 600; cursor: pointer; text-align: left;
}
.page-body .properties-report .sort-button:hover { text-decoration: underline; }
.page-body .properties-report th[aria-sort="ascending"] .sort-button::after { content: " \25B2" / ""; font-size: 0.75em; color: var(--muted); }
.page-body .properties-report th[aria-sort="descending"] .sort-button::after { content: " \25BC" / ""; font-size: 0.75em; color: var(--muted); }
.home-task-list { list-style: none; margin: 0; padding: 0; }
.home-task-list li { display: flex; justify-content: space-between; gap: 8px; padding: 3px 0; }
.home-task-list li + li { border-top: 1px solid var(--border); }
.home-tasks-all { margin: 0.5em 0 0; font-size: 0.9em; }
/* Due for review (docs/PLAN.md milestone 39): a homepage section, Today's part and Space tools → Page reviews. */
.home-review-list { list-style: none; margin: 0; padding: 0; }
.home-review-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 10px; padding: 4px 0; }
.home-review-list li + li { border-top: 1px solid var(--border); }
.home-today-list.home-review-list li { padding: 0; border: 0; }
.home-review-page { flex: 1 1 12em; min-width: 0; }
.home-review-when { color: var(--muted); font-size: 0.92em; white-space: nowrap; }
.home-review-when.late, .home-review-list .task-due.task-late, .page-reviews .task-late { color: var(--danger); font-weight: 600; }
.home-review-list .task-due { white-space: nowrap; font-size: 0.92em; }
.home-review-mark { margin: 0; }
.page-reviews td { vertical-align: middle; }
.page-reviews .page-reviews-when { white-space: nowrap; }
.task-row-due { flex: none; padding: 1px 6px; border-radius: 3px; background: var(--subtle); border: 1px solid var(--border); white-space: nowrap; font-size: 0.88em; }

/* Notes (/notes; Pages/Notes.cshtml, web/notes.js): each person's own sticky notes, in a grid, newest first. */
.notes { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; margin-top: 8px; align-items: start; }
.notes-status:empty { display: none; }
.note { --note-text: #1f1f1f; background: var(--note-bg); color: var(--note-text); border-radius: 4px; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25); }
.note:focus-within { outline: 2px solid var(--link); outline-offset: 2px; }
.note.note-unsaved { outline: 2px dashed var(--danger); outline-offset: 2px; }
.note-form { display: flex; flex-direction: column; }
.note textarea { display: block; width: 100%; box-sizing: border-box; min-height: 150px; max-height: 480px; resize: vertical; border: 0; background: transparent; color: inherit; font: inherit; line-height: 1.45; padding: 12px 12px 4px; outline: none; }
.note textarea::placeholder { color: color-mix(in srgb, var(--note-text) 55%, transparent); }
.note-foot { display: flex; align-items: center; gap: 6px; padding: 4px 6px 6px 12px; }
.note-colors { display: flex; flex-wrap: wrap; gap: 5px; flex: 1; }
button.note-swatch { width: 18px; height: 18px; padding: 0; border-radius: 50%; border: 1px solid color-mix(in srgb, var(--note-text) 45%, transparent); background: var(--note-bg); }
button.note-swatch[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--note-text); }
.note .icon-button { color: var(--note-text); }
.notes-live .note-save { display: none; }
.note-yellow { --note-bg: #fff3a6; }
.note-green { --note-bg: #d4f3c4; }
.note-blue { --note-bg: #cfe5fb; }
.note-pink { --note-bg: #fbd3e1; }
.note-purple { --note-bg: #e3d8fa; }
.note-gray { --note-bg: #e4e4e4; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .note, :root:not([data-theme="light"]) .note-swatch { --note-text: #eceef5; }
  :root:not([data-theme="light"]) .note-yellow { --note-bg: #5a4f1c; }
  :root:not([data-theme="light"]) .note-green { --note-bg: #2a4a2a; }
  :root:not([data-theme="light"]) .note-blue { --note-bg: #213e5e; }
  :root:not([data-theme="light"]) .note-pink { --note-bg: #5a2a3e; }
  :root:not([data-theme="light"]) .note-purple { --note-bg: #3e3066; }
  :root:not([data-theme="light"]) .note-gray { --note-bg: #3a3d47; }
}
:root[data-theme="dark"] .note, :root[data-theme="dark"] .note-swatch { --note-text: #eceef5; }
:root[data-theme="dark"] .note-yellow { --note-bg: #5a4f1c; }
:root[data-theme="dark"] .note-green { --note-bg: #2a4a2a; }
:root[data-theme="dark"] .note-blue { --note-bg: #213e5e; }
:root[data-theme="dark"] .note-pink { --note-bg: #5a2a3e; }
:root[data-theme="dark"] .note-purple { --note-bg: #3e3066; }
:root[data-theme="dark"] .note-gray { --note-bg: #3a3d47; }
/* Sharing notes (milestone 108): the Notes page's Shared with you, a note's Share button, and /notes/share. */
.notes-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; }
.notes-actions form { margin: 0; }
.notes-shared-line { color: var(--muted); }
.notes-shared-line .icon { vertical-align: -4px; }
.notes-shared-heading { margin-top: 32px; }
.notes-from { margin-top: 16px; }
.notes-from h3 { margin: 0 0 2px; }
.notes-from > p { margin: 0 0 4px; }
.note a.note-share { color: var(--note-text); }
.note a.note-share.note-is-shared { box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--note-text) 55%, transparent); border-radius: 50%; }
.note.note-shared-view textarea { cursor: default; }
.note-readonly { color: color-mix(in srgb, var(--note-text) 70%, transparent); padding: 2px 0 4px; }
.note-share-card fieldset.field { border: 0; padding: 0; margin: 0 0 1em; }
.note-share-card fieldset.field .check { display: block; margin: 4px 0; font-weight: 400; }
.note-share-card .note-share-preview { margin: 0 0 12px; padding: 10px 12px; white-space: pre-wrap; max-height: 12em; overflow: auto; border-radius: 4px; }
.note-share-list form { display: inline; margin-left: 8px; }

/* The family calendar (Pages/Calendar): events are colored by the person they're for (Wiki/Calendars.cs Colors; the
   first eight are the avatars' tints), gray for everyone, the page's text color with dots for several people. */
.cal-c-blue { --cal: #2a3f94; } .cal-c-red { --cal: #b3321b; } .cal-c-green { --cal: #1f7a4a; } .cal-c-purple { --cal: #8a4fb8; }
.cal-c-orange { --cal: #c06d0c; } .cal-c-teal { --cal: #1d7a8c; } .cal-c-pink { --cal: #a33a6e; } .cal-c-slate { --cal: #4f5d75; }
.cal-c-gold { --cal: #8a6d00; } .cal-c-brown { --cal: #7a4e2d; } .cal-c-everyone { --cal: #6b6b6b; } .cal-c-several { --cal: var(--text); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .cal-c-blue { --cal: #8ea2f0; } :root:not([data-theme="light"]) .cal-c-red { --cal: #ff9b85; }
  :root:not([data-theme="light"]) .cal-c-green { --cal: #7fd6a4; } :root:not([data-theme="light"]) .cal-c-purple { --cal: #c9a2f0; }
  :root:not([data-theme="light"]) .cal-c-orange { --cal: #f2b25c; } :root:not([data-theme="light"]) .cal-c-teal { --cal: #74cddd; }
  :root:not([data-theme="light"]) .cal-c-pink { --cal: #f08cbc; } :root:not([data-theme="light"]) .cal-c-slate { --cal: #a9b5cc; }
  :root:not([data-theme="light"]) .cal-c-gold { --cal: #e6c84f; } :root:not([data-theme="light"]) .cal-c-brown { --cal: #d4a27c; }
  :root:not([data-theme="light"]) .cal-c-everyone { --cal: #a7adc2; }
}
:root[data-theme="dark"] .cal-c-blue { --cal: #8ea2f0; } :root[data-theme="dark"] .cal-c-red { --cal: #ff9b85; }
:root[data-theme="dark"] .cal-c-green { --cal: #7fd6a4; } :root[data-theme="dark"] .cal-c-purple { --cal: #c9a2f0; }
:root[data-theme="dark"] .cal-c-orange { --cal: #f2b25c; } :root[data-theme="dark"] .cal-c-teal { --cal: #74cddd; }
:root[data-theme="dark"] .cal-c-pink { --cal: #f08cbc; } :root[data-theme="dark"] .cal-c-slate { --cal: #a9b5cc; }
:root[data-theme="dark"] .cal-c-gold { --cal: #e6c84f; } :root[data-theme="dark"] .cal-c-brown { --cal: #d4a27c; }
:root[data-theme="dark"] .cal-c-everyone { --cal: #a7adc2; }

.cal-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 12px; }
.cal-title { margin: 0 8px; font-size: 1.3rem; }
.cal-views { display: inline-flex; border: 1px solid var(--border); border-radius: 6px; overflow: hidden; margin-left: auto; }
.cal-views a { padding: 4px 12px; color: var(--text); text-decoration: none; background: var(--surface); }
.cal-views a + a { border-left: 1px solid var(--border); }
.cal-views a[aria-current="page"] { background: var(--active-bg); font-weight: 600; }
.cal-add .icon { vertical-align: -4px; }
.cal-people, .cal-calendars, .cal-people-choice, .cal-color-choice { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.cal-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; color: var(--text); text-decoration: none;
  border: 1px solid color-mix(in srgb, var(--cal) 45%, var(--border)); background: color-mix(in srgb, var(--cal) 12%, var(--surface));
}
/* :has() apart, so a browser without it (Chrome 90 and older) keeps the rest of the rule. */
a.cal-chip[aria-current="page"] { box-shadow: 0 0 0 2px var(--cal); font-weight: 600; }
label.cal-chip:has(input:checked) { box-shadow: 0 0 0 2px var(--cal); font-weight: 600; }
.cal-chip input { margin: 0; }
.cal-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--cal); flex: none; }
.cal-calendars a { padding: 3px 10px; border-radius: 6px; color: var(--link); text-decoration: none; }
.cal-calendars a[aria-current="page"] { background: var(--active-bg); color: var(--text); font-weight: 600; }
.cal-empty { margin: 8px 0 16px; }
.cal-import .icon { vertical-align: -4px; }
.cal-import-menu { position: relative; }
.cal-import-menu summary { list-style: none; }
.cal-import-menu summary::-webkit-details-marker { display: none; }
.cal-import-menu ul { position: absolute; right: 0; z-index: 20; margin: 4px 0 0; padding: 4px 0; list-style: none; min-width: 200px; width: max-content; max-width: min(420px, calc(100vw - 32px)); background: var(--surface, var(--bg)); border: 1px solid var(--border); border-radius: 8px; box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15); }
.cal-import-menu li a { display: block; padding: 6px 12px; overflow-wrap: anywhere; }
.cal-empty-import p { margin: 0 0 8px; }
.cal-empty-import .row { flex-wrap: wrap; gap: 8px; }
.cal-month { width: 100%; table-layout: fixed; border-collapse: collapse; background: var(--surface); }
.cal-month th { padding: 6px; font-weight: 600; color: var(--muted); text-align: left; border-bottom: 1px solid var(--border); }
.cal-month td { vertical-align: top; height: 108px; padding: 4px; border: 1px solid var(--border); overflow: hidden; }
.cal-month td.cal-other { background: var(--subtle); }
.cal-month td.cal-other .cal-daynum { color: var(--muted); }
.cal-daynum { display: inline-block; min-width: 1.8em; padding: 1px 4px; margin-bottom: 2px; border-radius: 999px; text-align: center; color: var(--text); text-decoration: none; }
a.cal-daynum:hover { background: var(--hover); }
.cal-today .cal-daynum { background: var(--button); color: var(--button-text); font-weight: 600; }
.cal-event {
  display: block; margin: 2px 0; padding: 1px 6px; border-radius: 4px; color: var(--text); text-decoration: none; font-size: 0.88rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  border-left: 3px solid var(--cal); background: color-mix(in srgb, var(--cal) 14%, var(--surface));
}
.cal-event:hover { background: color-mix(in srgb, var(--cal) 24%, var(--surface)); }
.cal-event .cal-time { color: var(--muted); }
.cal-dots { display: inline-flex; gap: 2px; margin-right: 4px; vertical-align: 0; }
.cal-dots .cal-dot { width: 8px; height: 8px; }
.cal-list { max-width: 760px; }
.cal-list-day h3 { margin: 18px 0 6px; font-size: 1rem; }
.cal-list-day.cal-today h3 { color: var(--link); }
.cal-list-day ul { list-style: none; margin: 0; padding: 0; }
.cal-list .cal-event { white-space: normal; font-size: 1rem; padding: 6px 10px; margin: 4px 0; }
.cal-list .cal-time { display: inline-block; min-width: 9em; }
.cal-for, .cal-place { display: block; color: var(--muted); font-size: 0.9rem; }
.cal-list .cal-for, .cal-list .cal-place { margin-left: 9em; }
.cal-details { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; max-width: 760px; }
.cal-details dt { font-weight: 600; color: var(--muted); }
.cal-details dd { margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.cal-notes { white-space: pre-wrap; max-width: 760px; }
.cal-form { max-width: 760px; }
.cal-form input[type=date], .cal-form input[type=time] {
  font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: 6px; padding: 6px 8px;
}
.cal-repeat select { width: auto; }
.cal-when .row, .cal-repeat .row { margin-top: 6px; }
.cal-when .row > label:first-child { min-width: 4em; }
.cal-form:has(#cal-all-day:checked) .cal-time-input { display: none; }
.cal-delete-event { margin-top: 16px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.cal-delete-event .icon { vertical-align: -4px; }

/* The Calendar macro in a page (Pages/Calendar/CalendarAgenda.cs): this month, smaller than /calendar's, or the next days. */
.page-body .cal-macro { margin: 12px 0; }
.page-body .cal-macro-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 12px; margin: 0 0 8px; }
.page-body .cal-macro .cal-month { margin: 0; }
.page-body .cal-macro .cal-month td { height: 76px; }
.page-body .cal-macro .cal-month th { background: none; }
.page-body .cal-macro ul { list-style: none; margin: 0; padding-left: 0; }
.page-body .cal-macro li { margin: 0; }
.cal-agenda-day { margin: 12px 0 4px; font-weight: 600; }
.cal-agenda .cal-list-day:first-child .cal-agenda-day { margin-top: 0; }
.cal-agenda .cal-today .cal-agenda-day { color: var(--link); }
.cal-manage { margin-top: 32px; max-width: 760px; }
.cal-kept { list-style: none; margin: 0 0 16px; padding: 0; }
.cal-kept > li { padding: 8px 0; border-bottom: 1px solid var(--border); }
.cal-delete summary { cursor: pointer; color: var(--danger); margin-top: 6px; }
.cal-outside p { margin: 4px 0; }
.cal-source { overflow-wrap: anywhere; }
.cal-add-outside { margin-top: 16px; }
.cal-add-outside summary { cursor: pointer; color: var(--link); }
@media (max-width: 700px) {
  .cal-month td { height: 64px; padding: 2px; }
  .cal-month th { padding: 4px 2px; font-size: 0.85rem; }
  .cal-event { font-size: 0.75rem; padding: 0 3px; }
  .cal-event .cal-time, .cal-dots { display: none; }
  .cal-list .cal-time { display: block; min-width: 0; }
  .cal-list .cal-for, .cal-list .cal-place { margin-left: 0; }
  .cal-views { margin-left: 0; }
}
input.birth-day { width: 6em; }
input.birth-year { width: 10em; }
#calendar .row select { width: auto; }

/* Drawings (milestone 37; Wiki/Html/Drawings.cs, the editor's drawing.ts): SVG made from a page's shapes. Each shape has
   its color as an attribute (the light theme's shade, for exports) and as a class, so each theme gets its own shade
   (black is the text color, so it's light in dark mode). */
.drawing { margin: 1em 0; overflow-x: auto; }
/* A poll (milestone 52; Pages/Spaces/PollHtml.cs): its choices, a bar and the count for each, who picked it, and Vote. */
.poll { border: 1px solid var(--border); border-radius: 8px; background: var(--surface); padding: 12px 16px; margin: 1em 0; max-width: 640px; }
.poll fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.poll .poll-question { font-weight: 600; font-size: 1.05rem; padding: 0; margin: 0; }
.poll .poll-hint { margin: 2px 0 10px; color: var(--muted); font-size: 0.875rem; }
.poll .poll-choices { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.poll .poll-choice { display: grid; grid-template-columns: auto 1fr; column-gap: 8px; row-gap: 2px; align-items: center; margin: 0; }
.poll .poll-choice input { margin: 0; }
.poll .poll-choice .poll-text { grid-column: 1 / -1; }
.poll .poll-choice.picked label, .poll .poll-choice.picked .poll-text { font-weight: 600; }
.poll .poll-result { grid-column: 2; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 0.85rem; color: var(--muted); }
.poll .poll-choice:not(:has(input)) .poll-result { grid-column: 1 / -1; }
.poll progress { appearance: none; width: min(220px, 45vw); height: 8px; border: 0; border-radius: 4px; background: var(--subtle); overflow: hidden; }
.poll progress::-webkit-progress-bar { background: var(--subtle); border-radius: 4px; }
.poll progress::-webkit-progress-value { background: var(--link); border-radius: 4px; }
.poll progress::-moz-progress-bar { background: var(--link); border-radius: 4px; }
.poll .poll-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
.poll .poll-people { color: var(--muted); font-size: 0.875rem; margin-right: auto; }
.poll.poll-static ul { margin: 4px 0 0; }
.drawing > svg { display: block; max-width: 100%; height: auto; }
.d-black { --dc: var(--text); }
.d-red { --dc: var(--c-red); }
.d-orange { --dc: var(--c-orange); }
.d-yellow { --dc: var(--c-yellow); }
.d-green { --dc: var(--c-green); }
.d-teal { --dc: var(--c-teal); }
.d-blue { --dc: var(--c-blue); }
.d-purple { --dc: var(--c-purple); }
.d-pink { --dc: var(--c-pink); }
.d-gray { --dc: var(--c-gray); }
svg.dw-drawing .ds { stroke: var(--dc); }
svg.dw-drawing .df { fill: var(--dc); }

/* The home inventory (docs/PLAN.md milestone 40; Pages/Inventory): the list with its filters and Upkeep due, an item
   with its details, upkeep and files, and the insurance list to print. */
.inventory-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; }
.inventory-bar .page-title { margin-bottom: 4px; }
.inventory-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 16px 0; }
.inventory-filters select { width: auto; max-width: 100%; }
.inventory-filters input[type="search"], .inventory-form input[type="date"], .inventory-upkeep-form input[type="date"] {
  font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: 6px; padding: 6px 8px; max-width: 100%;
}
.inventory-filters input[type="search"] { width: 16em; padding: 8px 10px; }
.inventory-every select { width: auto; }
.inventory-list-card { padding-top: 8px; }
/* A table sorted by a click on its headings (web/shell.js; Space tools → Page reviews and the home inventory). */
table[data-sortable] th { white-space: nowrap; }
table[data-sortable] .sort-button {
  background: none; border: 0; padding: 0; margin: 0; min-width: 0; color: inherit; font: inherit; font-weight: 600; cursor: pointer; text-align: left;
}
table[data-sortable] .sort-button:hover { text-decoration: underline; }
table[data-sortable] th[aria-sort="ascending"] .sort-button::after { content: " \25B2" / ""; font-size: 0.75em; color: var(--muted); }
table[data-sortable] th[aria-sort="descending"] .sort-button::after { content: " \25BC" / ""; font-size: 0.75em; color: var(--muted); }
.inventory-upkeep h2 { margin-top: 0; }
.inventory-upkeep-list { list-style: none; margin: 0; padding: 0; }
.inventory-upkeep-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; padding: 6px 0; }
.inventory-upkeep-list li + li { border-top: 1px solid var(--border); }
.inventory-upkeep-what { flex: 1 1 14em; min-width: 0; }
.inventory-upkeep-when { white-space: nowrap; font-size: 0.92em; }
.inventory-upkeep-list .task-late, .inventory-upkeep-table .task-late, .inventory-table .task-late, .home-upkeep-list .task-due.task-late { color: var(--danger); font-weight: 600; }
.home-upkeep-list .task-due { white-space: nowrap; font-size: 0.92em; }
.inventory-summary { margin: 0 0 8px; }
.inventory-table td, .inventory-upkeep-table td { vertical-align: middle; }
.inventory-table td.number, .inventory-table th.number, .inventory-insurance-table .number { text-align: right; white-space: nowrap; }
.inventory-table .inventory-soon { color: var(--danger); }
.inventory-table td.nowrap, .inventory-table .task-due { white-space: nowrap; }
.inventory-thumb-cell { width: 48px; padding-top: 4px; padding-bottom: 4px; }
.inventory-thumb { display: block; width: 44px; height: 44px; object-fit: cover; border-radius: 4px; border: 1px solid var(--border); }
.inventory-tools { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 12px; }
.inventory-tools a { display: inline-flex; align-items: center; gap: 6px; }
.inventory-item-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 8px 16px; }
.inventory-item-head h1 { margin: 0 0 4px; }
.inventory-item-actions { display: flex; gap: 8px; align-items: center; }
.inventory-photos { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.inventory-photos img { display: block; height: 120px; max-width: 200px; object-fit: cover; border-radius: 4px; border: 1px solid var(--border); }
.inventory-details { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 12px 0 0; }
.inventory-details dt { color: var(--muted); }
.inventory-details dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.inventory-notes { white-space: pre-wrap; }
.inventory-fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0 16px; }
.inventory-upkeep-buttons { white-space: nowrap; text-align: right; }
.inventory-add-upkeep { margin-top: 12px; }
.inventory-add-upkeep summary { cursor: pointer; color: var(--link); display: inline-flex; align-items: center; gap: 6px; }
.inventory-upkeep-form { margin-top: 8px; }
.inventory-every { display: inline-flex; gap: 8px; align-items: center; }
.inventory-every input { width: 5em; }
.inventory-files { list-style: none; margin: 0 0 12px; padding: 0; }
.inventory-files li { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 6px 0; }
.inventory-files li + li { border-top: 1px solid var(--border); }
.inventory-upload { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.inventory-upload .hint { flex-basis: 100%; margin: 0; }
.inventory-insurance-table { width: 100%; border-collapse: collapse; }
.inventory-insurance-table th, .inventory-insurance-table td { padding: 6px 8px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.inventory-insurance-table tfoot th, .inventory-insurance-table tfoot td { border-top: 2px solid var(--text); border-bottom: 0; color: var(--text); font-size: inherit; }
.inventory-insurance-table .nowrap { white-space: nowrap; }
.inventory-insurance-table code { overflow-wrap: anywhere; }
@media (max-width: 600px) {
  .inventory-details { grid-template-columns: 1fr; gap: 2px; }
  .inventory-details dd { margin-bottom: 8px; }
}
@media print {
  .inventory-insurance-table { font-size: 9.5pt; }
  .inventory-insurance-table tr { break-inside: avoid; }
  .inventory-insurance .inventory-thumb { width: 56px; height: 56px; }
}

/* Recipes, the meal plan and the shopping list (docs/PLAN.md milestone 41; Pages/Recipes, web/recipes.js): the
   recipes as cards, a recipe with its ingredients beside its steps, the cooking view in large type, a week's plan,
   and a shopping list made for a phone in a store (big boxes, grouped by aisle). */
.recipe-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; }
.recipe-bar .page-title { margin-bottom: 4px; }
.recipe-tabs { margin-left: 0; }
.recipe-add { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 8px 16px; margin: 12px 0 4px; }
.recipe-import { flex: 1 1 18em; min-width: 0; }
.recipe-import summary { cursor: pointer; color: var(--link); padding: 8px 0; }
.recipe-import form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 4px; }
.recipe-import .hint { flex-basis: 100%; margin: 0; }
.recipe-import-url { flex: 1 1 16em; min-width: 0; }
.recipe-import input[type="url"], .recipe-form input[type="url"], .recipe-form input[type="number"], .plan-add-form input[type="number"],
.recipe-plan-form input[type="date"], .recipe-plan-form input[type="number"] {
  font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: 6px; padding: 8px 10px; width: 100%; max-width: 100%; box-sizing: border-box;
}
.recipe-paste-form { flex-direction: column; align-items: stretch; }
.recipe-paste-form textarea { width: 100%; box-sizing: border-box; }
.recipe-cards { list-style: none; margin: 8px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.recipe-card { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; overflow: hidden; display: flex; flex-direction: column; }
.recipe-card-link { display: flex; flex-direction: column; color: inherit; text-decoration: none; }
.recipe-card-link:hover .recipe-card-title { text-decoration: underline; color: var(--link); }
.recipe-card-photo { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--subtle); }
.recipe-card-nophoto { display: flex; align-items: center; justify-content: center; color: var(--muted); }
.recipe-card-nophoto .icon { width: 48px; height: 48px; }
.recipe-card-title { font-weight: 600; padding: 10px 12px 2px; overflow-wrap: anywhere; }
.recipe-card-meta { display: flex; flex-wrap: wrap; gap: 2px 12px; padding: 0 12px 8px; font-size: 0.9em; }
.recipe-card-meta .icon { width: 14px; height: 14px; vertical-align: -2px; }
.recipe-card-tags { display: flex; flex-wrap: wrap; gap: 4px; padding: 0 12px 12px; margin: 0; }
.recipe-head { display: flex; flex-wrap: wrap; gap: 16px 24px; align-items: flex-start; }
.recipe-head-text { flex: 1 1 20em; min-width: 0; }
.recipe-head-text .recipe-card-tags { padding: 0; margin: 0 0 8px; }
.recipe-head h1 { margin: 0 0 6px; }
.recipe-photo { width: 320px; max-width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 6px; border: 1px solid var(--border); }
.recipe-form-photo { display: block; width: 160px; max-width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 6px; margin-bottom: 8px; }
.recipe-summary { margin: 0 0 8px; }
.recipe-meta { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 0 0 8px; }
.recipe-source { margin: 4px 0 0; }
.recipe-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 12px; }
.recipe-body { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 8px 32px; margin-top: 16px; }
.recipe-body h2 { margin-top: 8px; }
.recipe-ingredient-list { padding-left: 1.2em; margin: 0 0 12px; }
.recipe-ingredient-list li, .recipe-step-list li { padding: 3px 0; }
.recipe-step-list { padding-left: 1.6em; margin: 0 0 12px; }
.recipe-step-list li + li { margin-top: 6px; }
li.recipe-heading { list-style: none; font-weight: 600; margin: 10px 0 2px -1.2em; }
.recipe-step-list li.recipe-heading { margin-left: -1.6em; }
.recipe-servings { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 0 0 8px; }
.recipe-servings .button { min-width: 2.2em; text-align: center; justify-content: center; }
.recipe-plan-form { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 0 16px; align-items: end; }
.recipe-plan-form select { width: 100%; }
.recipe-upcoming { margin: 0 0 12px; padding-left: 1.2em; }
@media (max-width: 700px) {
  .recipe-body { grid-template-columns: 1fr; }
  .recipe-photo { width: 100%; }
}

/* The meal plan: a week of days, each with its meals. */
.plan-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 12px 0; }
.plan-nav .plan-week { margin: 0; font-size: 1.15em; }
.plan-space { display: inline-flex; gap: 8px; align-items: center; margin-left: auto; }
.plan-space select { width: auto; max-width: 100%; }
.plan-add summary { cursor: pointer; color: var(--link); display: inline-flex; align-items: center; gap: 6px; }
.plan-add-form { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 0 16px; margin-top: 8px; align-items: start; }
.plan-add-form select { width: 100%; }
.plan-add-form .actions { grid-column: 1 / -1; }
.plan-days { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.plan-day { margin: 0; padding: 12px 16px; }
.plan-day.today { border-color: var(--accent); box-shadow: inset 0 3px 0 var(--accent); }
.plan-day-name { margin: 0 0 6px; font-size: 1em; }
.plan-meals { list-style: none; margin: 0; padding: 0; }
.plan-meals li { display: flex; align-items: baseline; gap: 4px 8px; padding: 4px 0; }
.plan-meals li + li { border-top: 1px solid var(--border); }
.plan-meal-name { flex: 0 0 5.5em; font-size: 0.9em; }
.plan-meal-what { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.plan-to-list { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-top: 16px; }

/* The shopping list: large, easy to tap with one hand in a store. */
.shop-space { margin: 8px 0; }
.shop-add { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 16px; }
.shop-add input[type="text"] {
  flex: 1 1 14em; min-width: 0; font: inherit; font-size: 1.1em; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: 6px; padding: 10px 12px;
}
.shop-add-aisle select { width: auto; height: 100%; }
.shop-status:empty { display: none; }
.shop-status { color: var(--danger); }
.shop-aisle h2 { font-size: 0.95em; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); margin: 18px 0 4px; }
.shop-items { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; }
.shop-item { display: flex; align-items: center; gap: 4px; padding: 0 8px 0 0; }
.shop-item + .shop-item { border-top: 1px solid var(--border); }
.shop-check { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 8px; }
.shop-label { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 14px; padding: 12px; min-height: 52px; box-sizing: border-box; cursor: pointer; }
.shop-box { flex: 0 0 auto; width: 28px; height: 28px; margin: 0; accent-color: var(--ok); cursor: pointer; }
.shop-text { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; min-width: 0; }
.shop-name { font-size: 1.15em; overflow-wrap: anywhere; }
.shop-amount { font-weight: 600; white-space: nowrap; }
.shop-note { flex-basis: 100%; color: var(--muted); font-size: 0.85em; }
.shop-item.checked .shop-name, .shop-item.checked .shop-amount { text-decoration: line-through; color: var(--muted); }
.shop-cart form { margin-top: 12px; }
.shop-offer .shop-items { margin-bottom: 8px; }
.shop-offer h2 { margin-top: 0; }
.home-shopping-list { margin: 0 0 4px; padding-left: 1.2em; }
.home-shopping-space { margin: 8px 0 2px; }

/* Cooking: large type, nothing else on the screen, and a tap checks off an ingredient or a step. */
html.cooking body { font-size: 1.25rem; }
.cook { max-width: 900px; margin: 0 auto; padding: 8px 0 48px; }
.cook-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.cook-title { font-size: 2em; margin: 16px 0 8px; }
.cook-servings { display: flex; align-items: center; gap: 12px; margin: 0 0 8px; }
.cook-servings .button { font-size: 1.2em; min-width: 2.4em; justify-content: center; }
.cook h2 { font-size: 1.3em; margin: 24px 0 8px; }
.cook-list { list-style: none; margin: 0; padding: 0; }
.cook-list li { border-bottom: 1px solid var(--border); }
.cook-list li.recipe-heading { margin: 16px 0 0; padding: 4px 0; border-bottom: 0; }
.cook-check { display: flex; align-items: flex-start; gap: 16px; padding: 14px 4px; cursor: pointer; line-height: 1.45; }
.cook-check input { flex: 0 0 auto; width: 30px; height: 30px; margin: 2px 0 0; accent-color: var(--ok); }
.cook-step-number { font-weight: 700; margin-right: 4px; }
.cook-list li.done span { color: var(--muted); text-decoration: line-through; }
.cook-step-list li.done span { text-decoration: none; opacity: 0.55; }

/* Bills (docs/PLAN.md milestone 42; Pages/Bills): this month's bills with Mark paid, the totals by category and the
   subscriptions side by side, every bill, a bill with its payments, and its form. */
.bills-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; }
.bills-bar .page-title { margin-bottom: 4px; }
.bills-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 16px 0; }
.bills-filters select { width: auto; max-width: 100%; }
.bills-month h2, .bills-categories h2, .bills-subscriptions h2, .bills-all h2, .bills-pay h2 { margin-top: 0; }
.bills-month-list { list-style: none; margin: 0; padding: 0; }
.bills-month-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; padding: 6px 0; }
.bills-month-list li + li { border-top: 1px solid var(--border); }
.bills-month-what { flex: 1 1 14em; min-width: 0; }
.bills-month-when { white-space: nowrap; font-size: 0.92em; }
.bills-month-list li.paid .bills-month-what a { color: var(--muted); }
.bills-paid { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); }
.bills-month-list .task-late, .bills-details .task-late, .bills-table .task-due.task-late, .home-bills-list .task-due.task-late { color: var(--danger); font-weight: 600; }
.bills-month-total { margin: 12px 0 0; padding-top: 8px; border-top: 2px solid var(--border); font-weight: 600; }
.bills-month-total .muted { font-weight: 400; }
.bills-columns { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 0 16px; align-items: start; }
.bills-table { width: 100%; border-collapse: collapse; }
.bills-table th, .bills-table td { padding: 6px 8px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: middle; }
.bills-table .number { text-align: right; white-space: nowrap; }
.bills-table .nowrap { white-space: nowrap; }
.bills-table tfoot th, .bills-table tfoot td { border-top: 2px solid var(--border); border-bottom: 0; }
.bills-tools { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 12px; }
.bills-bill-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 8px 16px; }
.bills-bill-head h1 { margin: 0 0 4px; }
.bills-bill-actions { display: flex; gap: 8px; align-items: center; }
.bills-details { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 12px 0 0; }
.bills-details dt { color: var(--muted); }
.bills-details dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.bills-details dd a { display: inline-flex; align-items: center; gap: 4px; }
.bills-notes { white-space: pre-wrap; }
.bills-fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0 16px; }
.bills-form input[type="date"], .bills-pay-form input[type="date"] {
  font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: 6px; padding: 6px 8px; max-width: 100%;
}
.bills-form .field > label.check, .bills-how label.check { display: flex; align-items: center; gap: 6px; font-weight: 400; margin: 6px 0 0; }
.bills-how { border: 0; padding: 0; margin: 0 0 16px; min-width: 0; }
.bills-form .bills-remind > label.check { font-weight: 600; margin: 0 0 4px; }
.bills-every { display: inline-flex; gap: 8px; align-items: center; }

/* Chores that take turns, with stars and rewards (docs/PLAN.md milestone 45). */
.chores-list { list-style: none; margin: 0; padding: 0; }
.chores-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; padding: 6px 0; }
.chores-list li + li { border-top: 1px solid var(--border); }
.chores-what { flex: 1 1 14em; min-width: 0; }
.chores-when { white-space: nowrap; font-size: 0.92em; }
.chores-buttons { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.chore-mark { display: inline-block; width: 1.2em; color: var(--muted); }
.chore-approved .chore-mark, .chore-done .chore-mark { color: var(--ok); font-weight: 700; }
.chore-approved .chores-what a, .chore-missed .chores-what { color: var(--muted); }
.chore-mine .chores-what a { font-weight: 600; }
.chore-stars { white-space: nowrap; color: #8a5a00; font-weight: 600; }
.chore-waiting { color: var(--muted); font-style: italic; }
.chores-chart th[scope="row"] { font-weight: 600; min-width: 9em; }
.chores-chart th[scope="row"] .small-text { display: block; font-weight: 400; }
.chores-chart td, .chores-chart thead th { text-align: center; white-space: nowrap; }
.chores-chart thead th .small-text { display: block; }
.chores-chart .chores-today { background: var(--subtle); }
.chore-me { font-weight: 700; }
.chores-balances { list-style: none; margin: 0; padding: 0; }
.chores-balances li { display: flex; align-items: baseline; gap: 8px; padding: 4px 0; }
.chores-balances li > span:first-child { flex: 1; }
.chores-inline-form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
.chores-inline-form input[type="number"] { width: 6em; }
.chores-inline-form .grow { flex: 1 1 12em; }
.chores-inline-form .grow input { width: 100%; }
.chores-adjust { margin-top: 12px; }
.chores-adjust summary { cursor: pointer; color: var(--link); }
.chores-asks li.ask-given, .chores-asks li.ask-declined { color: var(--muted); }
.chores-weekdays { border: 0; padding: 0; margin: 0 0 16px; min-width: 0; }
.chores-weekdays label.check { display: inline-flex; align-items: center; gap: 4px; margin: 4px 12px 0 0; font-weight: 400; }
.chores-people { border: 0; padding: 0; margin: 0 0 16px; min-width: 0; }
.chores-people ol { margin: 4px 0 0; padding-left: 1.6em; }
.chores-people li { margin: 4px 0; }
.chores-people li select { width: auto; max-width: 70%; }
.chores-people li label.check { display: inline-flex; align-items: center; gap: 4px; margin-left: 12px; font-weight: 400; }
.home-chores-today { list-style: none; margin: 0; padding: 0; }
.home-chores-today li { padding: 3px 0; }
.home-chores-today li.chore-approved a, .home-chores-today li.chore-done a { text-decoration: line-through; color: var(--muted); }
.home-chores-today .chore-mark { color: var(--muted); }
/* Allowance and Done on the homepage (milestone 92). */
.chore-money { white-space: nowrap; color: var(--muted); font-variant-numeric: tabular-nums; }
.chores-pay { margin-left: 4px; }
.chores-pay button { white-space: nowrap; }
.chores-balances li { flex-wrap: wrap; }
.home-chore-done { margin-left: 6px; }
.home-chore-done button { padding: 1px 10px; }
.chores-star-value label { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.chores-star-value input { width: 7em; }
.home-chores-stars { margin: 8px 0 0; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .chore-stars { color: #f6c453; } }
:root[data-theme="dark"] .chore-stars { color: #f6c453; }
.bills-every input { width: 5em; }
.bills-every select { width: auto; }
.bills-no-passwords { display: flex; align-items: center; gap: 6px; color: var(--muted); }
.bills-pay-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0 16px; }
.bills-pay-form .actions { margin-bottom: 16px; }
.bills-undo { text-align: right; }
@media (max-width: 600px) {
  .bills-details { grid-template-columns: 1fr; gap: 2px; }
  .bills-details dd { margin-bottom: 8px; }
}

/* ----- Offline pages (docs/PLAN.md milestone 44): Pages/Offline.cshtml, web/offline.js ----- */
.offline-list { list-style: none; padding: 0; margin: 1rem 0; max-width: 720px; }
.offline-list li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.offline-item-words { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.offline-item-words a { font-weight: 600; overflow-wrap: anywhere; }
.offline-banner { margin-bottom: 1rem; }
.offline-note:empty { display: none; }
/* A kept copy shown with no connection: forms and the editor can't reach the wiki, so they look it. */
html.dw-offline .page-actions form, html.dw-offline .page-actions a.action, html.dw-offline .comment-form { opacity: 0.5; pointer-events: none; }
html.dw-offline .page-actions a.action.offline-ok { opacity: 1; pointer-events: auto; } /* a kept editor (milestone 90) */

/* Small wiki touches (docs/PLAN.md milestone 46; web/touches.js): Copy link to a heading, the picture lightbox and
   hover previews of linked pages. */
.heading-link {
  display: inline-flex; align-items: center; justify-content: center; margin-left: 6px; padding: 2px; border: 0; border-radius: 4px;
  background: transparent; color: var(--muted); cursor: pointer; vertical-align: middle; opacity: 0;
}
.heading-link .icon { width: 0.8em; height: 0.8em; }
.page-body :is(h1, h2, h3, h4, h5, h6):hover .heading-link, .heading-link:focus-visible { opacity: 1; }
.heading-link:hover { background: var(--hover); color: var(--link); }
@media (hover: none) { .heading-link { opacity: 0.6; } }
@media print { .heading-link { display: none; } }
.heading-copied {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 1000; padding: 8px 14px; border-radius: 6px;
  background: var(--header-bg); color: var(--header-text); box-shadow: var(--shadow);
}
.page-body img.lightbox-able { cursor: zoom-in; }
/* Present (web/touches.js): the page as slides over everything, one at a time, in large type. */
html.slides-open { overflow: hidden; }
.slides { position: fixed; inset: 0; z-index: 1000; display: flex; flex-direction: column; background: var(--bg); color: var(--text); }
.slides:focus { outline: none; }
.slides-stage { flex: 1; overflow: auto; display: flex; padding: 4vh 6vw 2vh; font-size: clamp(1.1rem, 2.4vw, 1.9rem); line-height: 1.45; }
.slides-stage > .slide { margin: auto; width: 100%; max-width: 1100px; }
.slides-stage > .slide[hidden] { display: none; }
.slides-stage .slide-title { text-align: center; }
.slides-stage .slide-title h1 { font-size: 2.2em; margin: 0; }
.slides-stage h1, .slides-stage h2 { font-size: 1.6em; margin-top: 0; }
.slides-stage img { max-height: 60vh; }
.slides-stage .page-tabs-list, .slides-stage .heading-link { display: none; }
.slides-stage .page-tabs > [data-tab][hidden] { display: block; }
.slides-stage .page-tabs > [data-tab] > .tab-title { display: block; }
/* A poll keeps its own proportions at the slide's size (its rem sizes would stay small). */
.slides-stage .poll { max-width: none; }
.slides-stage .poll .poll-question { font-size: 1.05em; }
.slides-stage .poll .poll-hint, .slides-stage .poll .poll-people { font-size: 0.75em; }
.slides-stage .poll .poll-result { font-size: 0.7em; }
.slides-stage .poll progress { width: min(18em, 45vw); height: 0.5em; }
.slides-stage .poll button { font-size: 0.7em; }
/* A slide's footnotes, at its foot. */
.slides-stage .slide-notes { margin: 1.5em 0 0; padding: 0.6em 0 0 1.5em; border-top: 1px solid var(--border); font-size: 0.65em; color: var(--muted); }
.slides-bar { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 8px; color: var(--muted); }
.slides-count { min-width: 5em; text-align: center; font-variant-numeric: tabular-nums; }
.slides-button { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; padding: 0; border: 1px solid var(--border); border-radius: 50%; background: var(--surface); color: var(--text); cursor: pointer; }
.slides-button:disabled { opacity: 0.4; cursor: default; }
.slides-button .icon { width: 22px; height: 22px; }
.slides-close { margin-left: 24px; }
html.lightbox-open { overflow: hidden; }
.lightbox {
  position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center;
  background: rgba(0, 0, 0, 0.88); padding: 48px 56px;
}
.lightbox-figure { margin: 0; display: flex; flex-direction: column; align-items: center; max-width: 100%; max-height: 100%; }
.lightbox-picture { max-width: 100%; max-height: calc(100vh - 140px); object-fit: contain; background: #fff; box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5); }
.lightbox-foot { display: flex; gap: 16px; justify-content: center; margin-top: 10px; color: #f0f0f0; font-size: 0.95em; text-align: center; }
.lightbox-count { color: #c8c8c8; white-space: nowrap; }
.lightbox-button {
  position: absolute; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0;
  border: 0; border-radius: 50%; background: rgba(255, 255, 255, 0.14); color: #fff; cursor: pointer;
}
.lightbox-button:hover, .lightbox-button:focus-visible { background: rgba(255, 255, 255, 0.3); }
.lightbox-button .icon { width: 24px; height: 24px; }
.lightbox-close { top: 12px; right: 12px; }
.lightbox-prev { left: 8px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 8px; top: 50%; transform: translateY(-50%); }
@media (max-width: 600px) {
  .lightbox { padding: 56px 8px 72px; }
  .lightbox-prev, .lightbox-next { top: auto; bottom: 12px; transform: none; }
  .lightbox-prev { left: calc(50% - 56px); }
  .lightbox-next { right: calc(50% - 56px); }
}
.link-preview {
  position: absolute; z-index: 900; padding: 10px 12px; border: 1px solid var(--border); border-radius: 6px;
  background: var(--surface); color: var(--text); box-shadow: var(--shadow); font-size: 0.92em;
}
.link-preview-title { font-weight: 600; }
.link-preview-where { margin: 2px 0 0; color: var(--muted); font-size: 0.92em; }
.link-preview-text { margin: 6px 0 0; overflow-wrap: anywhere; }

/* Leaving the family (Pages/Leaving, docs/PLAN.md milestone 50): the one page someone turned off still gets. */
.leaving-card { max-width: 640px; margin: 24px auto; }
.leaving-card .leaving-wiki { margin: 0 0 4px; }
.leaving-card h2 { margin-top: 24px; font-size: 1.1rem; }
.leaving-card .actions { display: flex; flex-wrap: wrap; gap: 8px; }
.leaving-lock { max-width: 480px; }
.leaving-choice { margin: 12px 0; }
.leaving-choice .hint { margin: 4px 0 0; }
.leaving-status { min-height: 1.4em; color: var(--muted); margin: 6px 0 2px; font-size: 0.92rem; }
.leaving-status.error { color: var(--danger); }

/* Configuration → Webhooks (docs/PLAN.md milestone 56). */
.webhook-list { list-style: none; margin: 0 0 1em; padding: 0; display: grid; gap: 10px; }
.webhook-list li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.webhook-list .webhook-last { flex-basis: 100%; }
.webhook-list .webhook-last.ok-text { color: var(--ok); }
.webhook-list .webhook-last.danger-text { color: var(--danger); }
.webhooks #webhook-secret { font-family: Consolas, "Cascadia Mono", ui-monospace, monospace; width: 100%; max-width: 32em; }
.webhooks fieldset.field { border: 0; padding: 0; margin: 0 0 1em; }
.webhooks fieldset.field .check { display: block; margin: 2px 0; }

/* ----- Confluence Cloud's frame (the user, 11/21/2026) ----- */
/* The profile menu's card, its Theme ▸, and Configuration's "Jump to setting". */
.profile-menu { min-width: 270px; }
.profile-card { display: flex; align-items: center; gap: 12px; margin: 0 6px 6px; padding: 10px 10px; border-radius: 6px; background: var(--hover); }
.profile-card strong { display: block; overflow-wrap: anywhere; }
.profile-user { display: block; color: var(--muted); font-size: 0.85rem; overflow-wrap: anywhere; }
.submenu > summary { list-style: none; }
.submenu > summary::-webkit-details-marker { display: none; }
.submenu-arrow { margin-left: auto; transition: transform 0.12s; }
.submenu[open] > summary .submenu-arrow { transform: rotate(90deg); }
.submenu-panel { padding-left: 30px; }
.submenu-panel .menu-item[aria-pressed="true"] { font-weight: 600; }
.submenu-panel .menu-item[aria-pressed="true"]::after { content: "\2713"; margin-left: auto; color: var(--link); }
.topbar .icon-button.active { background: var(--hover); color: var(--text); }
/* The profile and gear menus' items carry an icon each (Confluence Cloud's cleaner lists), in the muted color. */
.topbar .menu-panel .icon { width: 18px; height: 18px; }
.profile-menu .icon, .admin-menu .icon { color: var(--muted); }
.profile-card .avatar { flex: none; }
.admin-menu { min-width: 250px; }
.config-jump { display: flex; align-items: center; gap: 6px; margin: 0 4px 12px; padding: 4px 8px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); }
.config-jump[hidden], .config-jump-none[hidden], .side-heading[hidden] { display: none; }
.config-jump input { flex: 1; min-width: 0; border: none; background: none; color: var(--text); font: inherit; padding: 4px 0; outline: none; }
.config-jump:focus-within { border-color: var(--link); }
.config-jump-none { margin: 0 8px; font-size: 0.9rem; }

/* Help: the panel on the right (Pages/Shared/_HelpPanel.cshtml, web/help.js). */
.help-panel {
  position: fixed; top: var(--help-top, 56px); right: 0; bottom: 0; z-index: 45; width: min(400px, 100vw);
  display: flex; flex-direction: column; background: var(--surface); color: var(--text);
  border-left: 1px solid var(--border); box-shadow: var(--shadow);
}
.help-panel[hidden] { display: none; }
.help-head { display: flex; align-items: center; gap: 6px; padding: 12px 12px 6px 16px; }
.help-head .icon-button[hidden] { display: inline-flex; visibility: hidden; }
.help-head h2 { flex: 1; margin: 0; font-size: 1.1rem; text-align: center; }
.help-search { display: flex; align-items: center; gap: 6px; margin: 6px 16px 10px; padding: 4px 10px; border: 1px solid var(--border); border-radius: 6px; background: var(--bg); }
.help-search:focus-within { border-color: var(--link); }
.help-search input { flex: 1; min-width: 0; border: none; background: none; color: var(--text); font: inherit; padding: 6px 0; outline: none; }
.help-body { flex: 1; overflow-y: auto; padding: 0 16px 16px; border-top: 1px solid var(--border); }
.help-list { list-style: none; margin: 0; padding: 0; }
.help-list[hidden], .help-article[hidden], .help-none[hidden] { display: none; }
.help-item { display: block; width: 100%; padding: 12px 8px; border: none; border-bottom: 1px solid var(--border); background: none; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.help-item:hover, .help-item:focus-visible { background: var(--hover); }
.help-item strong { display: block; color: var(--link); margin-bottom: 4px; }
.help-item span { display: block; color: var(--muted); font-size: 0.9rem; }
.help-none { margin: 16px 8px; }
.help-article h3 { margin: 16px 0 4px; font-size: 1.15rem; }
.help-date { margin: 0 0 12px; font-size: 0.85rem; }
.help-text h3 { font-size: 1rem; margin: 16px 0 6px; }
.help-text ul, .help-text ol { padding-left: 22px; }
.help-text li { margin: 4px 0; }
.help-text kbd { padding: 1px 5px; border: 1px solid var(--border); border-radius: 4px; font: 0.85em ui-monospace, Consolas, monospace; background: var(--bg); }
.help-foot { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; padding: 10px 16px; border-top: 1px solid var(--border); font-size: 0.85rem; }
.help-foot a { color: var(--muted); }
@media (min-width: 1500px) {
  /* On a wide screen the page makes room for the panel instead of going under it. */
  body.help-shown .app { margin-right: 400px; }
}
@media print { .help-panel { display: none !important; } }

/* ----- A page's look (milestone 59, Pages/Spaces/PageView.cshtml): cover, emoji, Add icon and Add cover, reactions, Details ----- */
.page-cover { margin: 0 0 8px; height: clamp(120px, 22vw, 260px); border-radius: 8px; overflow: hidden; background: var(--subtle); }
.page-cover img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 50%; }
.page-title-area { position: relative; }
.page-title-area.under-cover .page-emoji { font-size: 3.2rem; margin-top: -36px; }
.page-emoji { display: block; font-size: 2.6rem; line-height: 1.15; margin: 0 0 4px; }
.crumb-emoji { margin-right: 4px; }
.page-look-tools { display: flex; flex-wrap: wrap; gap: 4px; min-height: 30px; opacity: 0; transition: opacity 0.15s; }
.page-title-area:hover .page-look-tools, .page-look-tools:focus-within { opacity: 1; }
.page-look-tools:has(details[open]) { opacity: 1; }
@media (hover: none) { .page-look-tools { opacity: 1; } }
.look-tool { display: inline-flex; align-items: center; gap: 6px; padding: 4px 8px; border-radius: 6px; color: var(--muted); font-size: 0.9rem; cursor: pointer; }
.look-tool:hover, .look-menu[open] > .look-tool { background: var(--hover); color: var(--text); }
.emoji-panel, .cover-panel { width: 340px; padding: 10px 12px; }
.emoji-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px; margin: 0 0 10px; }
.emoji-choice { font-size: 1.35rem; line-height: 1; padding: 6px 0; border: none; border-radius: 6px; background: none; cursor: pointer; color: inherit; }
.emoji-choice:hover, .emoji-choice:focus-visible { background: var(--hover); }
.emoji-choice.on { background: var(--active-bg); }
.emoji-typed, .cover-upload, .cover-position { display: flex; flex-direction: column; gap: 6px; margin: 0 0 10px; }
.cover-upload input[type="file"] { max-width: 100%; }
.cover-position input[type="range"] { width: 100%; }
.cover-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 0 0 10px; }
.cover-choice { padding: 0; aspect-ratio: 16 / 9; border: 2px solid transparent; border-radius: 6px; overflow: hidden; background: var(--subtle); cursor: pointer; }
.cover-choice img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cover-choice:hover, .cover-choice:focus-visible { border-color: var(--border); }
.cover-choice.on { border-color: var(--button); }

.page-reactions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 24px; max-width: 900px; }
.page-reactions form.inline { display: inline; margin: 0; }
.reaction {
  display: inline-flex; align-items: center; gap: 4px; min-height: 30px; padding: 2px 10px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; font-size: 0.95rem; cursor: default;
}
button.reaction, summary.reaction { cursor: pointer; }
button.reaction:hover, summary.reaction:hover { background: var(--hover); }
.reaction.on { border-color: var(--button); background: var(--active-bg); }
.reaction-count { font-variant-numeric: tabular-nums; color: var(--muted); }
.reaction.on .reaction-count { color: var(--text); }
.add-reaction { color: var(--muted); }
.reaction-plus { font-weight: 600; margin-left: -2px; }
.reaction-panel { display: flex; gap: 2px; min-width: 0; padding: 6px; }

/* A page's status (milestone 62): a chip as Confluence Cloud's, colored by status with the wiki's own colors. */
.page-status {
  display: inline-block; padding: 1px 8px; border-radius: 4px; border: 1px solid var(--border);
  background: var(--subtle); color: var(--text); font-size: 0.78rem; font-weight: 600; letter-spacing: 0.02em; line-height: 1.6;
}
.byline .page-status { margin-right: 8px; vertical-align: 1px; }
/* A live doc (milestone 73): saved as it's typed. */
.page-live { display: inline-block; margin-right: 6px; padding: 0 8px; border-radius: 10px; border: 1px solid var(--ok); color: var(--ok); font-size: 0.8rem; font-weight: 600; line-height: 1.6; }
.page-status.s-in-progress { background: var(--note-bg); border-color: var(--accent); }
.page-status.s-ready-for-review { background: var(--active-bg); border-color: var(--button); }
.page-status.s-verified { background: var(--ok-bg); border-color: var(--ok); color: var(--ok); }
.status-panel { min-width: 220px; padding: 6px 0; }
.status-panel .menu-item.on { background: var(--active-bg); }
/* Drafts (milestone 64). */
.drafts-list > li { align-items: center; }
.drafts-list .draft-main { flex: 1; min-width: 0; }
.drafts-list .draft-actions { display: flex; gap: 6px; flex: none; }
.scheduled-list .schedule-failure { color: var(--danger); }
.save-panel .schedule-field .hint { display: block; margin-top: 4px; }
/* The page's foot on one line (milestone 62): reactions, labels, Add a comment. */
.page-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; margin-top: 24px; max-width: 900px; }
.content-inner.full .page-foot, .content-inner.full .comments, .content-inner.full .page-labels { max-width: none; }
.page-foot > .page-reactions, .page-foot > .page-labels { margin-top: 0; }
.page-foot-comment { display: inline-flex; align-items: center; gap: 6px; }
.comment-start {
  display: block; width: 100%; max-width: 900px; margin-top: 16px; padding: 10px 14px; border: 1px solid var(--border); border-radius: 6px;
  background: var(--surface); color: var(--muted); font: inherit; text-align: left; cursor: text;
}
.comment-start:hover { border-color: var(--muted); }
@media print { .page-foot-comment, .comment-start, [data-copy-page] { display: none !important; } }

.details-panel { width: 340px; padding: 4px 16px 16px; }
@media (min-width: 900px) {
  /* Wide: on the right, under the top bar, as Confluence Cloud's Details panel. */
  .details-menu > .details-panel { position: fixed; top: 56px; right: 0; bottom: 0; width: min(360px, 100vw); border-radius: 0; overflow-y: auto; z-index: 40; }
}
.details-head { padding: 12px 0 4px; }
.details-head .section-title { font-size: 1.1rem; margin: 0; }
.details-list { display: grid; grid-template-columns: auto 1fr; gap: 10px 16px; margin: 8px 0 0; }
.details-list dt { color: var(--muted); font-size: 0.88rem; }
.details-list dd { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; overflow-wrap: anywhere; }
.page-actions .action[data-listen].on { background: var(--active-bg); }
@media print { .page-look-tools, .page-reactions, .details-menu, [data-listen] { display: none !important; } }
/* How far down the cover is shown (the wiki's CSP allows no style attributes): PageLooks.SetCoverY's 0 to 100, by fives. */
.page-cover.y0 img { object-position: 50% 0%; }
.page-cover.y5 img { object-position: 50% 5%; }
.page-cover.y10 img { object-position: 50% 10%; }
.page-cover.y15 img { object-position: 50% 15%; }
.page-cover.y20 img { object-position: 50% 20%; }
.page-cover.y25 img { object-position: 50% 25%; }
.page-cover.y30 img { object-position: 50% 30%; }
.page-cover.y35 img { object-position: 50% 35%; }
.page-cover.y40 img { object-position: 50% 40%; }
.page-cover.y45 img { object-position: 50% 45%; }
.page-cover.y50 img { object-position: 50% 50%; }
.page-cover.y55 img { object-position: 50% 55%; }
.page-cover.y60 img { object-position: 50% 60%; }
.page-cover.y65 img { object-position: 50% 65%; }
.page-cover.y70 img { object-position: 50% 70%; }
.page-cover.y75 img { object-position: 50% 75%; }
.page-cover.y80 img { object-position: 50% 80%; }
.page-cover.y85 img { object-position: 50% 85%; }
.page-cover.y90 img { object-position: 50% 90%; }
.page-cover.y95 img { object-position: 50% 95%; }
.page-cover.y100 img { object-position: 50% 100%; }
.tree-emoji { margin-right: 5px; }
.details-list dd a { display: inline; width: auto; padding: 0; color: var(--link); text-decoration: underline; }
.details-list dd a.label { text-decoration: none; }
.details-head { display: flex; align-items: center; justify-content: space-between; }

/* ----- One sidebar everywhere (milestone 60, Pages/Shared/_Sidebar.cshtml): your places on top, the space under them ----- */
.side-top { margin-bottom: 4px; }
.side-group > summary { list-style: none; cursor: pointer; }
.side-group > summary::-webkit-details-marker { display: none; }
.side-group-name { flex: 1; }
.side-twisty { width: 14px; height: 14px; transition: transform 0.12s; }
.side-group[open] > summary .side-twisty { transform: rotate(90deg); }
.side-group-items { padding-left: 14px; }
.side-group-items .side-hint { margin: 4px 8px; }
.space-section { margin-top: 10px; padding-top: 14px; border-top: 1px solid var(--border); }
.space-tools > summary { margin-top: 4px; }
.space-tools > .menu-panel { min-width: 220px; }
.tree-heading { align-items: center; margin-bottom: 4px; }
.tree-heading .menu { margin: -4px 0; }
.tree-heading .icon-button { padding: 3px; }
.tree-create > .menu-panel { text-transform: none; letter-spacing: normal; font-weight: 400; font-size: 0.95rem; }
.tree-filter { width: 100%; margin: 2px 0 8px; padding: 5px 8px; font-size: 0.9rem; }
.tree-filter[hidden] { display: none; }
.tree-row { display: flex; align-items: flex-start; flex: 1; min-width: 0; border-radius: 5px; }
.page-tree .tree-row > a:first-of-type { flex: 0 1 auto; }
.tree-actions { display: inline-flex; gap: 0; margin-left: auto; padding-left: 2px; visibility: hidden; flex: none; }
.tree-row:hover .tree-actions, .tree-row:focus-within .tree-actions, .tree-row.menu-open .tree-actions { visibility: visible; }
@media (hover: none) { .tree-actions { visibility: visible; } }
.page-tree .tree-actions a, .tree-actions button {
  display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; padding: 0; margin-top: 2px;
  border: none; border-radius: 4px; background: none; color: var(--muted); cursor: pointer;
}
.page-tree .tree-actions a:hover, .tree-actions button:hover, .tree-actions button[aria-expanded="true"] { background: var(--hover); color: var(--text); text-decoration: none; }
.tree-actions .icon { width: 16px; height: 16px; }
.tree-actions [hidden] { display: none; }
.tree-menu { position: fixed; z-index: 50; min-width: 220px; }
.tree-menu[hidden] { display: none; }
.tree-menu [hidden] { display: none; }
.tree-none { margin: 4px 8px; }

/* ----- Editing in place (milestone 61, Pages/Spaces/Edit.cshtml): the page keeps its look under one slim bar ----- */
.edit-bar {
  position: sticky; top: 56px; z-index: 15; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px;
  margin: -24px -40px 18px; padding: 6px 40px; background: var(--surface); border-bottom: 1px solid var(--border);
  box-shadow: 0 2px 6px rgba(20, 24, 40, 0.06);
}
@media (max-width: 799px) { .edit-bar { top: 0; margin: -16px -16px 14px; padding: 6px 16px; } }
.edit-bar-tools { flex: 1 1 520px; min-width: 0; }
.edit-bar .editor-toolbar { position: static; border: none; border-radius: 0; padding: 0; background: none; gap: 4px 10px; }
.edit-bar-end { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 6px; margin-left: auto; }
.edit-bar-end .draft-status { margin-right: 4px; }
.edit-bar-end button.small { padding: 5px 12px; }
.save-split { display: inline-flex; align-items: stretch; }
.save-split .save-button { background: var(--button); color: var(--button-text); border-color: var(--button); border-radius: 6px 0 0 6px; }
.save-split .save-more > summary {
  display: inline-flex; align-items: center; height: 100%; padding: 0 6px; border-radius: 0 6px 6px 0;
  border-left-color: color-mix(in srgb, var(--button-text) 40%, var(--button)); cursor: pointer; box-sizing: border-box;
}
.save-split .save-more { display: inline-flex; }
.save-panel { width: 320px; padding: 12px 14px; }
.save-panel .field { margin: 0 0 10px; }
.save-panel .field input { width: 100%; box-sizing: border-box; }
.save-panel .choice { margin-bottom: 4px; }
.save-panel .menu-item { padding: 7px 4px; border-radius: 4px; }
.edit-page .breadcrumbs { margin-bottom: 12px; }
.edit-page .edit-what { color: var(--muted); }
.edit-in-place input.title-input {
  max-width: none;
  display: block; width: 100%; box-sizing: border-box; margin: 4px 0 12px; padding: 2px 0;
  font: inherit; font-size: 2rem; line-height: 1.2; font-weight: 600; color: var(--text);
  background: transparent; border: none; border-bottom: 1px solid transparent; border-radius: 0;
}
.edit-in-place input.title-input:hover { border-bottom-color: var(--border); }
.edit-in-place input.title-input:focus { outline: none; border-bottom-color: var(--link); }
.edit-in-place input.title-input::placeholder { color: var(--muted); font-weight: 500; }
.edit-page .page-emoji { margin-top: 4px; }
.edit-in-place .editor-frame { border: none; border-radius: 0; background: transparent; }
.edit-in-place .editor-frame:focus-within { outline: none; }
.edit-in-place .editor-surface { padding: 4px 0 40px; min-height: 50vh; }

/* ----- Folders (milestone 67, Pages/Spaces/_FolderView.cshtml): a tree item with pages and folders in it ----- */
.page-tree .tree-folder { width: 15px; height: 15px; margin-right: 5px; vertical-align: -2px; color: var(--muted); }
.folder-view { margin-top: 8px; }
.folder-title { display: flex; align-items: center; gap: 12px; margin-top: 12px; }
.folder-title h1 { margin: 0; }
.folder-mark .icon { width: 40px; height: 40px; color: var(--muted); }
.folder-emoji { font-size: 2.4rem; line-height: 1; }
.folder-kind { margin: 6px 0 16px; }
.folder-rename { margin-bottom: 16px; }
.folder-rename > summary { cursor: pointer; color: var(--muted); font-size: 0.9rem; }
.folder-rename-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 8px; }
.folder-rename-form .alert { flex-basis: 100%; }
.folder-rename-form input { flex: 1 1 240px; max-width: 420px; }
.folder-list th, .folder-list td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--border); }
.folder-list th { font-size: 0.85rem; color: var(--muted); font-weight: 600; }
.folder-list td:last-child { white-space: nowrap; width: 1%; }
.folder-item { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; }
.folder-item .icon { width: 18px; height: 18px; color: var(--muted); flex: none; }
.folder-empty { padding: 24px; border: 1px dashed var(--border); border-radius: 8px; text-align: center; }
.folder-empty .actions { justify-content: center; }
@media (max-width: 600px) {
    .folder-list td:last-child { white-space: normal; }
}

/* ----- Smart Links (milestone 68, Pages/Spaces/_LinkView.cshtml): a web address kept in the page tree ----- */
.link-card { display: flex; gap: 16px; align-items: flex-start; margin: 16px 0 20px; padding: 20px; border: 1px solid var(--border); border-radius: 10px; }
.link-card h1 { margin: 2px 0 6px; }
.link-card .folder-kind { margin: 0; }
.link-card-main { min-width: 0; flex: 1; }
.link-address { margin: 0 0 12px; overflow-wrap: anywhere; }
.link-change-form { margin-top: 8px; max-width: 560px; }

/* A space's overview (milestone 68): its large icon on the home page, over the cover (the space's banner) when there is one. */
.space-hero { margin: 4px 0 6px; }
.space-hero .tile { box-shadow: 0 0 0 4px var(--bg); }
.page-title-area.under-cover .space-hero { margin-top: -56px; position: relative; }
.page-title-area.under-cover:has(.space-hero) .page-emoji { margin-top: 0; }

/* ----- For you's cards (milestone 68, Pages/Index.cshtml): pick up where you left off, templates, get started ----- */
.for-you { margin-bottom: 20px; }
.for-you-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.for-you-card { display: flex; flex-direction: column; gap: 4px; padding: 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text); text-decoration: none; min-width: 0; }
.for-you-card:hover, .for-you-card:focus-visible { border-color: var(--link); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12); }
.for-you-card strong { overflow-wrap: anywhere; }
.for-you-card.more { justify-content: center; align-items: center; text-align: center; }
.for-you-icon { width: 24px; height: 24px; color: var(--muted); margin-bottom: 4px; }
.for-you-emoji { font-size: 1.5rem; line-height: 1; margin-bottom: 4px; }
.for-you-heading { margin-top: 8px; }
/* The sidebar tree's View (web/shell.js): the flat lists. */
.tree-view-pick { display: flex; align-items: center; gap: 6px; margin: 4px 0 6px; font-size: 0.85rem; color: var(--muted); }
.tree-view-pick select { width: auto; flex: 1; font-size: 0.85rem; padding: 2px 4px; }
.tree-flat { list-style: none; margin: 0; padding: 0; }
.tree-flat li.tree-unvisited { display: none; }
/* For you's Discover what's happening (Following and Popular, as Confluence Cloud's feed). */
.feed-cards { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 10px; }
.feed-card { padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.feed-card p { margin: 4px 0 0; }
.feed-title { font-weight: 600; overflow-wrap: anywhere; }
.feed-excerpt { overflow-wrap: anywhere; }

/* ----- Windows' high-contrast setting (forced colors; the user, 11/22/2026) -----
   The browser draws everything in the person's own few colors and drops backgrounds and shadows, so what shows only
   by a background or a shadow (the current item, a pressed button, keyboard focus, an unread line) gets a system
   color or an outline instead, and color samples (swatches, a calendar's dot) keep their real colors. */
@media (forced-colors: active) {
  .page-body p.web-card > a { border: 1px solid CanvasText; }
  :is(a, button, input, select, textarea, summary, [tabindex]):focus-visible { outline: 2px solid Highlight; outline-offset: 2px; }
  .side-item.active, .directory-tabs a.active, .topnav-link.active, .topbar .icon-button[aria-current="page"],
  .quick-search-results a[aria-selected="true"], .page-body .page-tab[aria-selected="true"],
  a.cal-chip[aria-current="page"], .theme-option input:checked + label,
  button.note-swatch[aria-pressed="true"], .help-item:focus-visible, .menu-panel a:focus-visible {
    forced-color-adjust: none; background: Highlight; color: HighlightText; border-color: Highlight;
  }
  label.cal-chip:has(input:checked) { forced-color-adjust: none; background: Highlight; color: HighlightText; border-color: Highlight; }
  .side-item.active *, .directory-tabs a.active *, .quick-search-results a[aria-selected="true"] * { color: HighlightText; }
  .menu-panel a:hover, .menu-panel .menu-item:hover, .help-item:hover, .template-list a:hover, .emoji-choice:hover,
  .quick-search-results a:hover, .topbar .icon-button:hover, .topnav-link:hover, .topnav > .menu > summary:hover {
    outline: 1px solid Highlight; outline-offset: -1px;
  }
  .sidebar-resize:hover, .sidebar-resize:focus-visible, .resizing .sidebar-resize { background: Highlight; }
  .notifications > li.unread { border-left: 4px solid Highlight; }
  mark.inline-mark.active, mark.inline-mark.hover, mark.inline-pending { forced-color-adjust: none; background: Highlight; color: HighlightText; }
  .cal-dot, .swatch, .cover-choice img, .bell-count { forced-color-adjust: none; }
  .bell-count { background: Highlight; color: HighlightText; }
}
/* A calendar reminder a custom number of days before (11/22/2026): the days box shows once that choice is picked. */
.field > label.reminder-days, .reminder-days { display: none; align-items: center; gap: 8px; margin-top: 6px; font-weight: 400; }
.reminder-days input { width: 6em; }
.field:has(option[value="days"]:checked) .reminder-days { display: flex; }

/* Whiteboards and databases as their own kinds of page (milestone 79; Wiki/Html/Databases.cs). A whiteboard is one big
   drawing, as wide as the page allows; a database is one table with a bar above it (web/database.js): Search, how many
   entries, Add an entry and Fields; headings sort, choices are lozenges, and each entry has Edit (✎) at its end. */
.whiteboard-body .drawing { margin-top: 0; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); }
.whiteboard-body .drawing svg { width: 100%; height: auto; display: block; }
.db-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 10px; }
.db-search { flex: 1 1 220px; max-width: 360px; }
.db-bar select { width: auto; min-width: 0; max-width: 14rem; padding: 4px 8px; font-size: 0.875rem; }
.db-count { margin-right: auto; }
.db-note[hidden] { display: none; }
.page-body .db-table { width: 100%; }
.db-table th.db-sortable { cursor: pointer; user-select: none; white-space: nowrap; }
.db-table th.db-sortable:hover { background: var(--hover); }
.db-table th[aria-sort="ascending"]::after { content: " ▲"; font-size: 0.7em; color: var(--muted); }
.db-table th[aria-sort="descending"]::after { content: " ▼"; font-size: 0.7em; color: var(--muted); }
.db-table td.db-check { text-align: center; }
.db-table td.db-number { text-align: right; font-variant-numeric: tabular-nums; }
.db-table td.db-edit-cell { position: relative; padding-right: 34px; }
.db-edit { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); opacity: 0.5; }
.db-table tr:hover .db-edit, .db-edit:focus-visible { opacity: 1; }
.db-choice { display: inline-block; padding: 0 8px; border-radius: 10px; font-size: 0.85rem; line-height: 1.6; white-space: nowrap; color: var(--status); background: var(--status-bg); }
.db-choice-0 { --status: var(--st-blue); --status-bg: var(--st-blue-bg); }
.db-choice-1 { --status: var(--st-yellow); --status-bg: var(--st-yellow-bg); }
.db-choice-2 { --status: var(--st-green); --status-bg: var(--st-green-bg); }
.db-choice-3 { --status: var(--st-purple); --status-bg: var(--st-purple-bg); }
.db-choice-4 { --status: var(--st-red); --status-bg: var(--st-red-bg); }
.db-choice-5 { --status: var(--st-gray); --status-bg: var(--st-gray-bg); }
.db-dialog { border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text); padding: 18px 20px; width: min(520px, calc(100vw - 32px)); max-height: calc(100vh - 48px); }
.db-dialog::backdrop { background: rgba(0, 0, 0, 0.4); }
.db-dialog h2 { margin-top: 0; font-size: 1.15rem; }
.db-dialog .field input:not([type="checkbox"]), .db-dialog .field select { width: 100%; }
.db-dialog .actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.db-dialog .db-delete { margin-left: auto; }
.db-field-line { border: 1px solid var(--border); border-radius: 8px; padding: 8px 12px; margin: 0 0 10px; }
.db-field-line .field[hidden] { display: none; }
.db-field-remove { display: inline-flex; align-items: center; gap: 4px; font-size: 0.875rem; color: var(--muted); }
.db-views { display: inline-flex; gap: 0; }
.db-views button { border-radius: 0; margin: 0; }
.db-views button:first-child { border-radius: 6px 0 0 6px; }
.db-views button:last-child { border-radius: 0 6px 6px 0; }
.db-views button + button { margin-left: -1px; }
.db-views button[aria-pressed="true"] { background: var(--hover); font-weight: 600; }
.db-group-by[hidden], .db-view[hidden] { display: none; }
.db-view-hidden { display: none !important; }
.db-board { display: flex; gap: 12px; overflow-x: auto; align-items: flex-start; padding-bottom: 8px; }
.db-column { flex: 0 0 260px; background: var(--hover); border-radius: 8px; padding: 8px; min-height: 80px; }
.db-column.db-drop { outline: 2px dashed var(--accent, var(--border)); outline-offset: -2px; }
.db-column-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 0 8px; font-size: 0.9rem; }
.db-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.db-table tr.db-target > td { background: var(--mark-bg); }
.db-table tr.db-target > td:first-child, .db-card.db-target { box-shadow: inset 3px 0 var(--accent); }
.db-card.db-target { background: var(--mark-bg); }
.db-table th.db-back { color: var(--muted); font-weight: 600; }
.db-card { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; margin: 0 0 8px; }
.db-cards .db-card { margin: 0; }
.db-card[draggable="true"] { cursor: grab; }
.db-card.db-dragging { opacity: 0.5; }
.db-card-title { display: block; width: 100%; margin: 0; padding: 0; border: 0; background: none; color: var(--text); font: inherit; font-weight: 600; text-align: left; cursor: pointer; overflow-wrap: anywhere; }
h3.db-card-title { cursor: default; font-size: 1rem; }
button.db-card-title:hover { text-decoration: underline; }
.db-card-fields { margin: 6px 0 0; display: grid; grid-template-columns: auto 1fr; gap: 2px 8px; font-size: 0.85rem; }
.db-card-fields dt { color: var(--muted); }
.db-card-fields dd { margin: 0; overflow-wrap: anywhere; }
.db-relation { border: 1px solid var(--border); border-radius: 8px; padding: 6px 12px 8px; margin: 0 0 12px; }
.db-relation legend { font-weight: 600; padding: 0 4px; }
.db-relation-list { max-height: 180px; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; }
.db-relation-entry { display: flex; align-items: center; gap: 6px; }
.db-dialog .field[hidden] { display: none; }
/* Milestone 130: the Timeline view (bars placed by --tl-left and --tl-width, set from web/database.js), people and files fields. */
.db-timeline-dates { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.db-timeline-dates[hidden] { display: none; }
.db-tl-scroll { overflow-x: auto; padding-bottom: 8px; }
.db-tl { min-width: calc(180px + var(--tl-ticks, 6) * 64px); }
.db-tl-row { display: grid; grid-template-columns: 180px 1fr; align-items: stretch; min-height: 34px; border-bottom: 1px solid var(--border); }
.db-tl-row.db-target { background: var(--mark-bg); }
.db-tl-head { min-height: 26px; color: var(--muted); }
.db-tl-label { padding: 6px 8px 6px 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.db-tl-track { position: relative; min-height: 26px; }
.db-tl-tick { position: absolute; left: var(--tl-left); top: 4px; padding-left: 4px; border-left: 1px solid var(--border); font-size: 0.8rem; white-space: nowrap; }
.db-tl-today { position: absolute; left: var(--tl-left); top: 0; bottom: 0; border-left: 2px solid var(--st-red); }
.db-tl-bar { position: absolute; left: var(--tl-left); width: calc(var(--tl-width) + var(--tl-grow, 0px)); min-width: 12px; top: 5px; bottom: 5px; margin: 0; padding: 0 6px; border: 0; border-left: 3px solid var(--status, var(--accent)); border-radius: 4px; background: var(--status-bg, var(--hover)); color: var(--text); font: inherit; font-size: 0.85rem; line-height: 1.6; text-align: left; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; transform: translateX(var(--tl-shift, 0px)); }
button.db-tl-bar { cursor: grab; touch-action: none; }
button.db-tl-bar.db-tl-edge { cursor: ew-resize; }
.db-tl-bar.db-dragging { cursor: grabbing; opacity: 0.8; z-index: 1; }
.db-tl-undated { margin: 8px 0 0; }
.db-tl-link { margin: 0; padding: 0; border: 0; background: none; color: var(--link); font: inherit; text-decoration: underline; cursor: pointer; }
.db-files { display: inline-flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.page-body .db-files img, .page-body td.db-files img { display: inline-block; max-height: 48px; max-width: 96px; margin: 0; border-radius: 4px; vertical-align: middle; }
.page-body img.db-card-cover { display: block; width: calc(100% + 20px); max-width: none; height: 120px; margin: -8px -10px 8px; object-fit: cover; border-radius: 8px 8px 0 0; }
.db-pick { border: 1px solid var(--border); border-radius: 8px; padding: 6px 12px 8px; margin: 0 0 12px; }
.db-pick legend { font-weight: 600; padding: 0 4px; }
.db-picked, .db-found { display: flex; flex-wrap: wrap; gap: 4px; margin: 4px 0; }
.db-people-search { width: 100%; }
.db-file-thumb { width: 32px; height: 32px; object-fit: cover; border-radius: 4px; }
/* A Create from template button (milestone 96) on a page; turned off where it can't be used. */
.page-body .create-from { margin: 12px 0; }
.page-body .create-from .button.disabled { opacity: 0.6; cursor: default; }
/* A search box in a page (Confluence's Live Search; parity check, 11/23/2026). */
.page-body .macro-search { display: flex; gap: 8px; max-width: 32em; margin: 12px 0; }
.page-body .macro-search input[type="search"] { flex: 1; min-width: 0; font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: 6px; padding: 7px 10px; }
/* Milestone 123: a Navigation map (labeled pages as boxes), a Content Report Table, another page's list, an RSS feed. */
.page-body .macro-navmap .navmap-title { font-weight: 600; margin: 12px 0 6px; }
.page-body .macro-navmap ul { list-style: none; padding: 0; margin: 0 0 12px; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.page-body .macro-navmap li { margin: 0; }
.page-body .macro-navmap a { display: flex; align-items: center; justify-content: center; text-align: center; min-height: 56px; padding: 8px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); overflow-wrap: anywhere; text-decoration: none; }
.page-body .macro-navmap a:hover, .page-body .macro-navmap a:focus-visible { border-color: var(--accent); background: var(--subtle); }
.page-body .macro-other { margin: 12px 0 4px; font-weight: 600; }
.page-body .macro-feed { border: 1px solid var(--border); border-radius: 6px; padding: 8px 14px; margin: 12px 0; }
.page-body .macro-feed .feed-title { margin: 4px 0 6px; font-weight: 600; }
.page-body .macro-feed ul.feed-items { margin: 0 0 6px; padding-left: 1.2em; }
.page-body .macro-feed .feed-source { margin: 4px 0; font-size: 0.85em; }
/* Milestone 124: a Spotlight panel, Cards side by side, a Decision report, Quick links. */
.page-body [data-panel="spotlight"] { --panel: var(--accent); --panel-bg: color-mix(in srgb, var(--accent) 12%, var(--bg)); border-width: 2px; border-left-width: 6px; padding: 16px 20px 16px 56px; font-size: 1.15em; }
.page-body [data-panel="spotlight"]::before { content: "\2605"; width: 28px; height: 28px; top: 16px; font-size: 1rem; }
.page-body [data-cards] { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; margin: 0.8em 0; }
.page-body [data-cards] > p { margin: 0; max-width: none; }
.page-body [data-cards] > p.web-card > a { height: 100%; box-sizing: border-box; }
.page-body .macro-decisions .decision-page { margin: 12px 0 2px; font-weight: 600; }
.page-body .macro-quick-links { display: flex; flex-wrap: wrap; gap: 8px; }
/* Milestone 125: a space's header and footer, compact text, related pages, a space's own status, its own status box. */
.page-body.space-header, .page-body.space-footer { color: var(--muted); font-size: 0.92em; border: 1px dashed var(--border); border-radius: 6px; padding: 4px 12px; margin: 0 0 12px; }
.page-body.space-footer { margin: 16px 0 0; }
.page-body.compact { font-size: 0.9em; line-height: 1.45; }
.page-body.compact p, .page-body.compact li { margin-top: 0.25em; margin-bottom: 0.25em; }
.related-pages { margin: 20px 0 0; }
.related-pages ul { list-style: none; padding: 0; margin: 6px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.related-pages a { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); text-decoration: none; height: 100%; box-sizing: border-box; }
.related-pages a:hover, .related-pages a:focus-visible { border-color: var(--link); }
.page-status.s-custom { background: var(--subtle); color: var(--text); }
.own-status { display: flex; gap: 6px; padding: 6px 10px; }
.own-status input { flex: 1; min-width: 0; }
/* Milestone 126: charts and roadmaps drawn from tables, a carousel, a Smart button, a synced block, an embedded database. */
.page-body .page-chart, .page-body .page-roadmap { margin: 1em 0; }
.page-body svg.chart { width: 100%; max-width: 640px; height: auto; display: block; font: 12px system-ui, sans-serif; }
.page-body svg.chart text { fill: var(--text); }
.page-body svg.chart .axis { fill: var(--muted); }
.page-body svg.chart .grid { stroke: var(--border); stroke-width: 1; }
.page-body svg.chart .line { fill: none; stroke-width: 2.5; }
.series-1 { fill: #2a6fdb; stroke: #2a6fdb; background: #2a6fdb; }
.series-2 { fill: #e07b39; stroke: #e07b39; background: #e07b39; }
.series-3 { fill: #2e9a5e; stroke: #2e9a5e; background: #2e9a5e; }
.series-4 { fill: #9b59d0; stroke: #9b59d0; background: #9b59d0; }
.series-5 { fill: #c9372c; stroke: #c9372c; background: #c9372c; }
.series-6 { fill: #1a9fb0; stroke: #1a9fb0; background: #1a9fb0; }
.series-7 { fill: #b08a1a; stroke: #b08a1a; background: #b08a1a; }
.series-8 { fill: #6b7a8f; stroke: #6b7a8f; background: #6b7a8f; }
.page-body svg.chart polyline.line { fill: none; }
.page-body .chart-legend { display: flex; flex-wrap: wrap; gap: 12px; font-size: 0.85em; margin: 4px 0; }
.page-body .chart-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 2px; vertical-align: -1px; }
.page-body .view-data { margin-top: 6px; font-size: 0.9em; }
.page-body .page-carousel .page-tabs-list { align-items: center; }
.page-body .carousel-step { min-width: 32px; }
.page-body .macro-button button { font: inherit; }
.page-body .macro-database .table-scroll { margin-top: 4px; }
.editor-surface .synced-edit { border-color: var(--accent); }
/* The roadmap is SVG (milestone 126): the wiki's Content Security Policy blocks inline styles. */
.page-body svg.roadmap { width: 100%; min-width: 600px; height: auto; display: block; font: 12px system-ui, sans-serif; border: 1px solid var(--border); border-radius: 6px; }
.page-body svg.roadmap .grid { stroke: var(--border); stroke-width: 1; }
.page-body svg.roadmap .axis { fill: var(--muted); }
.page-body svg.roadmap .roadmap-lane { fill: var(--text); font-weight: 600; }
.page-body svg.roadmap .roadmap-text { fill: #fff; pointer-events: none; }
.page-body .carousel-controls { display: flex; gap: 6px; margin: 4px 0 8px; }


/* Configuration → Access audit (milestone 135): each person's level in each space. */
.access-audit-table td.lvl { white-space: nowrap; }
.access-audit-table td.lvl-admin { font-weight: 600; }
.access-audit-table td.lvl-edit { color: var(--ok); }
.access-audit-table td.lvl .small-text { white-space: normal; }
.access-audit-table tr.off { opacity: .6; }

/* Slides as their own kind of page (milestone 138; web/touches.js): each slide a 16:9 card, numbered, clickable to present. */
.deck-view { list-style: none; margin: 16px 0; padding: 0; display: grid; gap: 20px; }
.deck-slide {
  display: block; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; text-align: left; padding: 4% 6%; font: inherit; color: var(--text);
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1); cursor: pointer;
}
.deck-slide:hover { border-color: var(--link); }
button.deck-go { display: block; margin: 6px auto 0; font-size: 0.85rem; }
.deck-slide h1 { font-size: 2.2rem; margin-top: 12%; }
.deck-slide h2 { font-size: 1.6rem; }
.deck-present { margin-left: 6px; vertical-align: middle; }

/* Dragged column widths (web/shell.js sets each col's width; CONFLUENCE-PARITY.md part 8). */
table.dw-col-widths, .page-body table.dw-col-widths { display: table; table-layout: fixed; max-width: none; }

/* Recently visited's filter box and Show choice (Confluence Cloud's Recent filters). */
.visited-filter { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 16px; }
.visited-filter input[type="search"] { flex: 1 1 220px; }

/* ----- Network (docs/PLAN.md milestone 146): lights, the device list, the graph ----- */
.net-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; }
.net-head h1 { margin: 0; }
.net-head h1 .icon { vertical-align: -3px; }
.net-head-actions { display: flex; flex-wrap: wrap; gap: 8px; }
#SlowMs { max-width: 220px; } /* room for its "for example 200" hint in every language */
.net-light { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--muted); vertical-align: 0; margin-right: 4px; }
.net-up { background: var(--c-green, #2e7d32); }
.net-slow { background: var(--c-yellow, #f9a825); }
.net-down { background: var(--c-red, #c62828); }
.net-unreachable { background: var(--c-orange, #ef6c00); }
.net-paused, .net-new, .net-none { background: var(--muted); }
/* A usage device (milestone 149): on is green, off an empty gray ring (off on purpose, not a problem). */
.net-on { background: var(--c-green, #2e7d32); }
.net-light.net-off { background: transparent; box-shadow: inset 0 0 0 2px var(--muted); }
.net-overall { font-size: 1.15em; margin: 16px 0; }
.net-overall .net-light { width: 14px; height: 14px; }
.net-internet { border: 1px solid var(--border); border-radius: 8px; padding: 10px 14px; margin: 0 0 16px; }
.net-internet h2 { margin: 0 0 4px; font-size: 1.05em; }
.net-internet p { margin: 4px 0; }
.net-devices td, .net-devices th { padding: 8px 10px; vertical-align: top; }
.net-devices .icon { vertical-align: -3px; color: var(--muted); }
.net-devices .num, .net-devices th.num { text-align: right; white-space: nowrap; }
.net-row-down td:first-child a { color: var(--danger); font-weight: 600; }
.net-uptimes { display: flex; flex-wrap: wrap; gap: 12px 32px; margin: 16px 0; }
.net-uptimes > div { display: flex; flex-direction: column; }
.net-big { font-size: 1.6em; font-weight: 600; }
.net-ranges { display: flex; gap: 4px; margin: 0 0 8px; border-bottom: 1px solid var(--border); }
.net-ranges a { padding: 6px 12px; border-bottom: 2px solid transparent; text-decoration: none; color: var(--text); }
.net-ranges a.active { border-bottom-color: var(--accent); font-weight: 600; }
.net-graph { margin: 0 0 16px; }
.net-graph svg { width: 100%; height: 160px; display: block; background: var(--surface, transparent); border: 1px solid var(--border); border-radius: 6px; }
.net-grid { stroke: var(--border); stroke-width: 1; vector-effect: non-scaling-stroke; }
.net-line { fill: none; stroke: var(--accent); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.net-fail { stroke: var(--danger); stroke-width: 2; vector-effect: non-scaling-stroke; }
.net-outages td, .net-outages th { padding: 6px 10px; text-align: left; }
.net-notes { white-space: pre-wrap; }
.net-hops { padding-left: 2.2em; }
.net-delete { margin-top: 24px; }
.net-inline { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 6px 0; }
.net-inline label { margin: 0; }
.net-windows { padding-left: 1.2em; }
.net-windows li { margin: 6px 0; }
.net-window-form { border-top: 1px solid var(--border); margin-top: 16px; padding-top: 8px; }
.net-months { display: flex; align-items: center; gap: 16px; margin: 8px 0 16px; }
.net-report { width: 100%; font-size: 0.9em; }
/* The family status page (milestone 147): one big plain line, then names and lights. */
.net-status { max-width: 720px; margin: 0 auto; }
.net-status-head { display: flex; align-items: center; gap: 14px; font-size: 1.9em; line-height: 1.2; margin: 8px 0 12px; }
.net-light-big { width: 28px; height: 28px; flex: none; margin: 0; }
.net-status-tip { font-size: 1.15em; margin: 0 0 16px; }
.net-status-note { white-space: pre-wrap; }
.net-status-list { list-style: none; padding: 0; margin: 16px 0; border-top: 1px solid var(--border); }
.net-status-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 10px 2px; border-bottom: 1px solid var(--border); font-size: 1.1em; }
.net-status-list .icon { color: var(--muted); }
.net-status-name { font-weight: 600; flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.net-status-state { margin-left: auto; text-align: right; }
#network-beat-examples pre { white-space: pre-wrap; overflow-wrap: anywhere; background: var(--surface, transparent); border: 1px solid var(--border); border-radius: 6px; padding: 8px 10px; }
#network-beat-url { min-width: 0; flex: 1 1 auto; }
.net-status-list .net-row-down .net-status-name, .net-status-list .net-row-down .net-status-state { color: var(--danger); }
/* The homepage's Network status widget */
.home-network-overall { font-weight: 600; margin: 0 0 6px; }
.home-network-list { list-style: none; margin: 0; padding: 0; }
.home-network-list li { padding: 3px 0; }
/* Network's On and off log (milestone 148): a bar per day, green on, red off, gray not watched. */
.net-onoff { margin: 16px 0; }
.net-onoff > summary { cursor: pointer; list-style: revert; }
.net-onoff > summary h2 { display: inline; margin: 0; font-size: 1.25rem; }
.net-onoff-last { display: flex; flex-wrap: wrap; gap: 4px 18px; font-weight: 600; margin: 10px 0 4px; }
.net-onoff-days { width: 100%; }
.net-onoff-days td { vertical-align: middle; }
.net-onoff-date, .net-onoff-days td.num, .net-onoff-days th { white-space: nowrap; }
.net-onoff-bar { display: block; width: 100%; min-width: 160px; height: 16px; border-radius: 3px; overflow: hidden; }
.net-onoff-empty { fill: transparent; }
.net-onoff-on, .net-onoff-key-on { fill: var(--ok, #16a34a); background: var(--ok, #16a34a); }
.net-onoff-off, .net-onoff-key-off { fill: var(--danger, #dc2626); background: var(--danger, #dc2626); opacity: .75; }
.net-onoff-none, .net-onoff-key-none { fill: var(--border); background: var(--border); }
.net-onoff-tick { stroke: var(--surface, #fff); stroke-width: 1; opacity: .8; }
.net-onoff-turns { min-width: 10rem; }
.net-onoff-legend { display: flex; flex-wrap: wrap; gap: 4px 16px; align-items: center; }
.net-onoff-key { display: inline-block; width: 12px; height: 12px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; }

/* Network's column headings with a tooltip on what they mean (the user, 11/24/2026). */
.net-tip { text-decoration: underline dotted; text-underline-offset: 3px; cursor: help; }

@media (max-width: 600px) {
    .net-devices .net-col-check { display: none; }
}
