/*
 * Phase 4: the sheets and dialogs of the real editor in the prototype's look (DESIGN.md 5, 7b, 9).
 * Projects and Guide (#projects_view), the Tutorial list and step card (#tutorial_panel), the Autokit gallery
 * (#kit_gallery) and the report dialog (#bug_report). Drawing only: the markup and its behaviour stay the app's.
 */

/* ---- shared sheet frame: paper over the viewport only, mono kicker, 92px title, "Close x" ---- */
body.ui.editor #projects_view {
  position: absolute;
  inset: 0;
  z-index: 30;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.35 var(--f-sans);
}
/* the right side keeps clear of the thin scrollbar (.pv-sb, 18px) so Close and the cards never sit under it */
body.ui.editor #projects_view .pv-scroll { padding: 0 calc(var(--gut) + 18px) 60px var(--gut); }
body.ui.editor #projects_view .pv-head {
  position: sticky;
  top: 0;
  z-index: 3;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  margin: 0 calc(-1 * var(--gut) - 18px) 0 calc(-1 * var(--gut));
  padding: 18px calc(var(--gut) + 18px) 16px var(--gut);
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
}
body.ui.editor #projects_view .pv-id { display: none; }
body.ui.editor #projects_view .pv-titles { grid-column: 1; }
body.ui.editor #projects_view .pv-kicker {
  margin: 0 0 4px;
  font: 400 12.5px/1.25 var(--f-mono);
  letter-spacing: .02em;
  text-transform: uppercase;
}
body.ui.editor #projects_view .pv-title,
body.ui.editor #projects_view .docs-title {
  margin: 0;
  font: 500 92px/.95 var(--f-display);
  letter-spacing: -.045em;
  color: var(--ink);
}
body.ui.editor #projects_view .pv-for-projects,
body.ui.editor #projects_view .pv-for-guide { display: none; }
body.ui.editor #projects_view:has(#pv_projects_panel:not([hidden])) .pv-for-projects { display: block; }
body.ui.editor #projects_view:has(#pv_documentation_panel:not([hidden])) .pv-for-guide { display: block; }
body.ui.editor #projects_view .pv-head .docs-title { grid-column: 1; }
body.ui.editor #projects_view .pv-close,
body.ui.editor #kit_gallery .kg-close,
body.ui.editor #tutorial_panel .tutorial-close {
  all: unset;
  grid-column: 2;
  grid-row: 1;
  align-self: end;
  cursor: pointer;
  font: 500 18px var(--f-display);
  letter-spacing: -.03em;
  color: var(--ink);
  white-space: nowrap;
}
body.ui.editor #projects_view .pv-close::before,
body.ui.editor #kit_gallery .kg-close::before,
body.ui.editor #tutorial_panel .tutorial-close::before { content: "Close " / ""; }
body.ui.editor #projects_view .pv-close:hover,
body.ui.editor #kit_gallery .kg-close:hover,
body.ui.editor #tutorial_panel .tutorial-close:hover { color: var(--ember); }
body.ui.editor #projects_view .pv-close:focus-visible,
body.ui.editor #kit_gallery .kg-close:focus-visible,
body.ui.editor #tutorial_panel .tutorial-close:focus-visible { outline: 2px solid var(--ember); outline-offset: 3px; }

/* the thin custom scrollbar of DESIGN 9 on the old square track */
body.ui.editor .pv-sb { width: 18px; background: transparent; }
body.ui.editor .pv-sb-btn { display: none; }
body.ui.editor .pv-sb-track { position: relative; flex: 1; margin: 8px 0; background: transparent; }
body.ui.editor .pv-sb-track::before { content: ""; position: absolute; top: 0; bottom: 0; right: 8px; width: 1px; background: rgba(14,14,14,.28); }
body.ui.editor .pv-sb-thumb {
  position: absolute;
  right: 6px;
  width: 5px;
  min-height: 32px;
  background: var(--ink);
  border: 0;
  border-radius: 0;
  transition: width .2s var(--snap), right .2s var(--snap);
}
body.ui.editor .pv-sb:hover .pv-sb-thumb,
body.ui.editor .pv-sb-thumb:active { width: 9px; right: 4px; }

/* ---- Store: the same paper sheet and specimen catalogue as Projects ---- */
body.ui.editor #projects_view[data-section="store"] {
  position: fixed;
  inset: var(--nav) 0 0;
  z-index: 40;
}
body.ui.editor:has(#projects_view[data-section="store"]:not([hidden])) :is(#rail, #panel, .menu-export) { display: none; }
body.ui.editor:has(#projects_view[data-section="store"]:not([hidden])) #app { grid-template-columns: minmax(0, 1fr); }
body.ui.editor:has(#projects_view[data-section="store"]:not([hidden])) #viewport { grid-column: 1; }
@media (max-width: 760px) {
  body.ui.editor:has(#projects_view[data-section="store"]:not([hidden])) .editor-nav .menu-btn { padding-inline: 10px; font-size: 16px; }
  body.ui.editor:has(#projects_view[data-section="store"]:not([hidden])) .editor-nav .nav-mark { font-size: 20px; }
  body.ui.editor:has(#projects_view[data-section="store"]:not([hidden])) :is(.menu:has(#editor_help), #rail_auth_label, #rail_auth_tier) { display: none; }
}
body.ui.editor #pv_store_panel {
  --d-text: var(--ink);
  --d-muted: var(--soft);
  --d-line: var(--rule);
  --bg: var(--paper);
  --viewer-0: var(--paper);
  --accent: var(--ink);
  container-type: inline-size;
  padding-top: 18px;
}
body.ui.editor #pv_store_panel .store-heading {
  padding-bottom: 24px;
  margin: 0 0 24px;
  border-bottom: 1px solid var(--rule);
}
body.ui.editor #pv_store_panel .store-eyebrow {
  color: var(--ink);
  font: 400 12.5px/1.25 var(--f-mono);
  letter-spacing: .02em;
}
body.ui.editor #pv_store_panel h1 {
  color: var(--ink);
  font: 500 clamp(44px, 6vw, 92px)/.95 var(--f-display);
  letter-spacing: -.045em;
}
body.ui.editor #pv_store_panel :is(h2, h3) { font-weight: 500; letter-spacing: -.03em; }
body.ui.editor #pv_store_panel .store-published-count { background: var(--lilac); border: 0; }
body.ui.editor #pv_store_panel .store-published-count strong { color: var(--ink); }
body.ui.editor #pv_store_panel .store-kit-tags { color: var(--ember); }
body.ui.editor #pv_store_panel .store-kit-price { color: var(--ink); font: 500 20px/1.2 var(--f-display); }
body.ui.editor #pv_store_panel .store-kit {
  background: var(--paper);
  border: 0;
  border-radius: 0;
  border-bottom: 1px solid var(--rule);
}
body.ui.editor #pv_store_panel .store-kit-image { border-bottom: 6px solid var(--lilac); background: #161616; }
body.ui.editor #pv_store_panel .store-kit h3 { font-size: 24px; }
body.ui.editor #pv_store_panel .store-empty { border: 0; border-top: 1px solid var(--rule); background: var(--lilac); }
body.ui.editor #pv_store_panel .store-filters { padding-block: 18px; border-block: 1px solid var(--rule); }
body.ui.editor #pv_store_panel .store-filters label { font: 400 12px/1.25 var(--f-mono); text-transform: uppercase; color: var(--ink); }
body.ui.editor #pv_store_panel :is(input, select, textarea) {
  color-scheme: light;
  background: var(--paper);
  color: var(--ink);
  border: 0;
  border-bottom: 1px solid var(--rule);
  border-radius: 0;
  font: 400 17px/1.35 var(--f-sans);
}
body.ui.editor #pv_store_panel option { background: var(--paper); color: var(--ink); }
/* Keep the project picker in the modal's top layer and paper palette.
   Browsers without customizable selects retain their native control. */
body.ui.editor #pv_store_panel .store-publish-dialog { color-scheme: light; }
body.ui.editor #pv_store_panel .store-publish-dialog select {
  appearance: auto;
  background-image: none;
  padding-right: 12px;
}
@supports (appearance: base-select) {
  body.ui.editor #pv_store_panel .store-publish-dialog select,
  body.ui.editor #pv_store_panel .store-publish-dialog select::picker(select) { appearance: base-select; }
  body.ui.editor #pv_store_panel .store-publish-dialog select { display: flex; align-items: center; gap: 12px; min-height: 46px; padding: 10px 12px; }
  body.ui.editor #pv_store_panel .store-publish-dialog select::picker-icon { margin-left: auto; color: var(--ink); }
  body.ui.editor #pv_store_panel .store-publish-dialog select::picker(select) {
    background: var(--paper);
    color: var(--ink);
    color-scheme: light;
    border: 1px solid var(--rule);
    border-radius: 0;
    max-height: min(320px, 45dvh);
    overflow-y: auto;
    font: 400 17px/1.35 var(--f-sans);
  }
  body.ui.editor #pv_store_panel .store-publish-dialog option { min-height: 40px; padding: 10px 12px; white-space: normal; }
  body.ui.editor #pv_store_panel .store-publish-dialog option:checked { background: var(--lilac); }
  body.ui.editor #pv_store_panel .store-publish-dialog option:hover { background: var(--primer); }
}
body.ui.editor #pv_store_panel .pv-btn {
  min-height: 44px;
  background: var(--ink);
  color: var(--paper);
  border: 1px solid var(--ink);
  border-radius: 0;
  font: 500 18px/1.15 var(--f-display);
  letter-spacing: -.03em;
  text-transform: none;
}
body.ui.editor #pv_store_panel .pv-btn.store-publish,
body.ui.editor #pv_store_panel .store-kit-actions .store-download { background: var(--lilac); color: var(--ink); }
body.ui.editor #pv_store_panel .pv-btn:hover:not(:disabled) { background: var(--primer); color: var(--ink); filter: none; }
body.ui.editor #pv_store_panel .store-creator-contact { background: var(--ink); color: var(--paper); border-color: var(--ink); }
body.ui.editor #pv_store_panel .store-creator-contact svg { color: var(--paper); }
body.ui.editor #pv_store_panel .store-creator-contact:hover { background: var(--lilac); color: var(--ink); }
body.ui.editor #pv_store_panel .store-creator-contact:hover svg { color: var(--ink); }
body.ui.editor #pv_store_panel .store-publish-dialog,
body.ui.editor .store-preview {
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--rule);
  border-radius: 0;
}
body.ui.editor .store-preview h2 { color: var(--ink); font: 500 32px/1.05 var(--f-display); letter-spacing: -.03em; }
body.ui.editor .store-preview p,
body.ui.editor .store-preview-label { color: var(--soft); }
body.ui.editor .store-preview .pv-btn { background: var(--ink); color: var(--paper); border: 0; border-radius: 0; padding: 12px 18px; font: 500 18px var(--f-display); text-transform: none; }
body.ui.editor .store-preview :focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
body.ui.editor #pv_store_panel :focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
@container (max-width: 640px) {
  body.ui.editor #pv_store_panel .store-heading { padding-right: 0; }
  body.ui.editor #pv_store_panel .store-creator-tools { position: static; justify-items: start; margin-top: 18px; }
  body.ui.editor #pv_store_panel .store-filters { grid-template-columns: 1fr; }
}

/* Compact Store card controls and catalogue views. */
body.ui.editor #pv_store_panel .store-kit-actions { gap: 6px; align-items: center; margin: 12px; }
body.ui.editor #pv_store_panel .store-kit-actions .pv-btn { min-height: 30px; padding: 4px 6px; font-size: 14px; line-height: 20px; }
body.ui.editor #pv_store_panel .store-kit-actions :is(.store-add-cart, .store-remove) { display: inline-flex; align-items: center; justify-content: center; width: 30px; padding: 4px; }
body.ui.editor #pv_store_panel .store-kit-actions svg { display: block; width: 18px; height: 18px; }
body.ui.editor #pv_store_panel .store-kit-actions .store-add-cart[aria-pressed="true"] { background: var(--lilac); color: var(--ink); }
body.ui.editor #pv_store_panel .store-kit-actions .store-remove { margin-left: auto; color: #c62828; background: transparent; border-color: transparent; }
body.ui.editor #pv_store_panel .store-kit-actions .store-remove:hover:not(:disabled) { color: #c62828; background: #fff0f0; }
body.ui.editor #pv_store_panel .store-views { display: flex; flex-wrap: wrap; gap: 0; margin-top: 24px; border-block: 1px solid var(--rule); }
body.ui.editor #pv_store_panel .store-view { padding: 14px 20px; border: 0; border-right: 1px solid var(--rule); border-radius: 0; background: var(--paper); color: var(--ink); font: 500 18px/1.2 var(--f-display); letter-spacing: -.03em; text-transform: none; cursor: pointer; }
body.ui.editor #pv_store_panel .store-view[aria-pressed="true"] { background: var(--lilac); }
body.ui.editor #pv_store_panel .store-view:hover { background: var(--primer); }
body.ui.editor #pv_store_panel .store-views + h2 { margin-top: 24px; }
@container (max-width: 640px) {
  body.ui.editor #pv_store_panel .store-views { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body.ui.editor #pv_store_panel .store-view { padding: 12px; font-size: 16px; border-bottom: 1px solid var(--rule); }
}

/* Account cart: a bound server list, shown above the Store and editor. */
body.ui.editor .editor-nav #rail_cart { display: flex; align-items: center; gap: 6px; background: var(--lilac); color: var(--ink); }
/* the Store's entries stay out of sight until it works online (owner 2026-11-08) */
body.ui.editor [data-store-entry][hidden] { display: none; }
body.ui.editor #rail_cart svg { width: 22px; height: 22px; flex: none; }
body.ui.editor .store-cart-count { font: 400 12px var(--f-mono); }
body.ui.editor .store-cart-dialog { box-sizing: border-box; width: min(640px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); margin: auto; padding: 24px; overflow: auto; background: var(--paper); color: var(--ink); border: 1px solid var(--rule); border-radius: 0; font: 400 17px/1.35 var(--f-sans); }
body.ui.editor .store-cart-dialog::backdrop { background: #0009; }
body.ui.editor .store-cart-dialog h2 { margin: 0; font: 500 44px/1 var(--f-display); letter-spacing: -.045em; }
body.ui.editor .store-cart-dialog .pv-btn { width: auto; flex: none; padding: 10px 14px; border: 0; border-radius: 0; background: var(--ink); color: var(--paper); font: 500 16px var(--f-display); text-transform: none; cursor: pointer; }
body.ui.editor .store-cart-items { margin-top: 24px; border-top: 1px solid var(--rule); }
body.ui.editor .store-cart-item { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--rule); overflow-wrap: anywhere; }
body.ui.editor .store-cart-item-info { display: grid; gap: 4px; flex: 1; min-width: 0; }
body.ui.editor .store-cart-creator { color: var(--soft); font-size: 14px; }
body.ui.editor .store-cart-price { font: 400 15px var(--f-mono); white-space: nowrap; }
body.ui.editor .store-account-dialog h2 { font-size: 36px; }
body.ui.editor .store-account-dialog p { margin-block: 20px; }
body.ui.editor .store-account-actions { display: flex; gap: 10px; flex-wrap: wrap; }
body.ui.editor .store-account-actions a { text-decoration: none; }
body.ui.editor .store-cart-dialog .store-remove { display: flex; align-items: center; justify-content: center; flex: none; width: 32px; height: 32px; padding: 5px; border: 0; border-radius: 0; background: transparent; color: #c62828; cursor: pointer; }
body.ui.editor .store-cart-dialog .store-remove svg { width: 20px; height: 20px; }
body.ui.editor .store-cart-dialog .store-remove:hover:not(:disabled) { background: #fff0f0; }
body.ui.editor .store-cart-dialog :focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
@media (max-width: 400px) {
  body.ui.editor:has(#projects_view[data-section="store"]:not([hidden])) .menu:has(#rail_projects) { display: none; }
}

/* ---- Projects ---- */
body.ui.editor #pv_projects_panel { padding-top: 18px; }
body.ui.editor #pv_projects_panel .pv-search {
  display: grid;
  gap: 6px;
  max-width: calc(50% - var(--gut));
  margin: 0 0 22px;
  font: 400 12.5px/1.25 var(--f-mono);
  letter-spacing: .02em;
  text-transform: uppercase;
  color: var(--ink);
}
body.ui.editor #pv_projects_panel .pv-search input {
  all: unset;
  box-sizing: border-box;
  width: 100%;
  border-bottom: 1px solid var(--rule);
  padding: 10px 0 9px;
  font: 400 18px var(--f-sans);
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink);
}
body.ui.editor #pv_projects_panel .pv-search input::placeholder { color: rgba(14,14,14,.35); }
body.ui.editor #pv_projects_panel .pv-search input:focus-visible { border-bottom: 2px solid var(--ember); padding-bottom: 8px; }
body.ui.editor #pv_grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gut); }
body.ui.editor #pv_grid .pv-saveloc {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--gut);
  margin: 0 0 8px;
  padding: 14px 16px;
  background: var(--primer);
  border: 0;
  color: var(--ink);
}
body.ui.editor #pv_grid .pv-saveloc.warn { background: var(--ember); }
body.ui.editor #pv_grid .pv-saveloc-kicker { margin: 0 0 4px; font: 400 12.5px/1.25 var(--f-mono); letter-spacing: .02em; text-transform: uppercase; color: var(--ink); }
body.ui.editor #pv_grid .pv-saveloc-title { display: block; font: 500 26px/1.05 var(--f-display); letter-spacing: -.04em; color: var(--ink); }
body.ui.editor #pv_grid .pv-saveloc-body { max-width: 62ch; margin: 6px 0 0; font: 400 15px/1.35 var(--f-sans); color: var(--ink); }
body.ui.editor #pv_grid .pv-saveloc-btn {
  all: unset;
  box-sizing: border-box;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  height: 52px;
  padding: 0 18px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--ink);
  font: 500 18px var(--f-display);
  letter-spacing: -.03em;
  white-space: nowrap;
}
body.ui.editor #pv_grid .pv-saveloc-btn:hover { background: var(--ink); color: var(--paper); }
body.ui.editor #pv_grid .pv-new {
  all: unset;
  box-sizing: border-box;
  cursor: pointer;
  display: grid;
  place-content: center;
  aspect-ratio: 1;
  padding: 20px;
  background: var(--ink);
  color: var(--paper);
  border-bottom: 6px solid var(--ink);
  font: 500 26px/1.05 var(--f-display);
  letter-spacing: -.04em;
  text-align: center;
}
body.ui.editor #pv_grid .pv-new::before {
  content: "New" / "";
  display: block;
  margin-bottom: 10px;
  font: 400 12px var(--f-mono);
  letter-spacing: .02em;
  text-transform: uppercase;
  color: var(--ember);
}
body.ui.editor #pv_grid .pv-new:hover { color: var(--ember); }
body.ui.editor #pv_grid .pv-card {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  align-content: start;
  gap: 0 10px;
  padding: 0;
  background: transparent;
  border: 0;
  color: var(--ink);
}
body.ui.editor #pv_grid .pv-thumb {
  grid-column: 1 / -1;
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  background: #161616;
  border-bottom: 6px solid var(--primer);
}
body.ui.editor #pv_grid .pv-card.active .pv-thumb { border-color: var(--ember); }
body.ui.editor #pv_grid .pv-card.active .pv-thumb::after {
  content: "Open now";
  position: absolute;
  left: 0;
  top: 0;
  padding: 3px 6px 2px;
  background: var(--ember);
  font: 400 10px var(--f-mono);
  letter-spacing: .02em;
  text-transform: uppercase;
  color: var(--ink);
}
body.ui.editor #pv_grid .pv-img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.1s var(--snap); }
body.ui.editor #pv_grid .pv-card:hover .pv-img { transform: scale(1.05); }
body.ui.editor #pv_grid .pv-cardname {
  all: unset;
  box-sizing: border-box;
  grid-column: 1;
  min-width: 0;
  margin-top: 10px;
  font: 500 20px var(--f-display);
  letter-spacing: -.035em;
  color: var(--ink);
  text-overflow: ellipsis;
}
body.ui.editor #pv_grid .pv-cardname:focus-visible { box-shadow: inset 0 -2px 0 var(--ember); }
body.ui.editor #pv_grid .pv-community-badge {
  grid-column: 1;
  position: static;
  padding: 0;
  background: none;
  border: 0;
  font: 400 14px var(--f-sans);
  letter-spacing: 0;
  text-transform: none;
  color: var(--soft);
}
body.ui.editor #pv_grid .pv-actions {
  grid-column: 2;
  grid-row: 2 / span 2;
  display: flex;
  gap: 6px;
  align-self: start;
  margin-top: 14px;
  padding: 0;
  border: 0;
}
body.ui.editor #pv_grid .pv-btn {
  all: unset;
  cursor: pointer;
  padding: 4px 7px 3px;
  font: 400 10.5px var(--f-mono);
  letter-spacing: .02em;
  text-transform: uppercase;
  color: var(--soft);
  box-shadow: inset 0 0 0 1px var(--rule);
  white-space: nowrap;
}
body.ui.editor #pv_grid .pv-btn:hover { color: var(--ink); background: var(--primer); }
body.ui.editor #pv_grid .pv-btn.danger:hover,
body.ui.editor #pv_grid .pv-btn.danger.armed,
body.ui.editor #pv_grid .pv-btn.danger[data-armed] { background: var(--ember); color: var(--ink); box-shadow: none; }

/* ---- Guide ---- */
body.ui.editor #pv_documentation_panel { color: var(--ink); background: transparent; }
body.ui.editor #pv_documentation_panel .gd-lead { max-width: 58ch; margin: 18px 0 0; font: 400 21px/1.15 var(--f-sans); letter-spacing: -.03em; color: var(--soft); }
body.ui.editor #pv_documentation_panel .gd-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 0; margin-top: 18px; }
body.ui.editor #pv_documentation_panel .gd-nav {
  position: sticky;
  top: 180px;
  align-self: start;
  max-height: calc(100vh - 260px);
  overflow: auto;
  padding: 0 var(--gut) 40px 0;
  border-right: 1px solid var(--rule);
  scrollbar-width: none;
}
body.ui.editor #pv_documentation_panel .gd-nav-group { margin: 18px 0 6px; font: 400 12px var(--f-mono); letter-spacing: .02em; text-transform: uppercase; color: var(--soft); }
body.ui.editor #pv_documentation_panel .gd-nav-group:first-child { margin-top: 0; }
body.ui.editor #pv_documentation_panel .gd-nav ul { margin: 0; padding: 0; list-style: none; border: 0; }
body.ui.editor #pv_documentation_panel .gd-nav li { margin: 0; padding: 0; border: 0; }
body.ui.editor #pv_documentation_panel .gd-nav a {
  display: block;
  padding: 5px 0;
  border: 0;
  font: 400 16px var(--f-sans);
  color: var(--ink);
  text-decoration: none;
  transition: padding .3s var(--snap);
}
body.ui.editor #pv_documentation_panel .gd-nav a:hover { color: var(--ember); }
body.ui.editor #pv_documentation_panel .gd-nav a[aria-current="true"] { box-shadow: inset 3px 0 0 var(--ember); padding-left: 10px; color: var(--ink); background: none; }
/* room after the last sections, so the contents can bring any of them under the header */
body.ui.editor #pv_documentation_panel .gd-body { min-width: 0; padding: 0 0 60vh 28px; }
body.ui.editor #pv_documentation_panel .gd-group {
  margin: 0;
  padding: 0;
  border: 0;
  font: 400 12.5px var(--f-mono);
  letter-spacing: .02em;
  text-transform: uppercase;
  color: var(--soft);
}
body.ui.editor #pv_documentation_panel .gd-section {
  max-width: 980px;
  scroll-margin-top: 150px; /* the sticky sheet header stays over the top of the scroller */
  margin: 10px 0 0;
  padding: 6px 0 46px;
  border: 0;
  border-top: 1px solid var(--rule);
  background: none;
}
body.ui.editor #pv_documentation_panel .gd-head { display: flex; flex-direction: column-reverse; align-items: flex-start; gap: 0; margin: 0; padding: 0; border: 0; }
body.ui.editor #pv_documentation_panel .gd-where {
  display: block;
  margin: 12px 0 14px;
  font: 400 12.5px var(--f-mono);
  letter-spacing: .02em;
  text-transform: uppercase;
  color: var(--ink);
}
body.ui.editor #pv_documentation_panel .gd-head h3 {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  font: 500 clamp(32px, 2.9vw, 44px)/1.02 var(--f-display);
  letter-spacing: -.045em;
  color: var(--ink);
}
body.ui.editor #pv_documentation_panel .gd-head h3 svg { display: none; }
body.ui.editor #pv_documentation_panel .gd-patreon {
  order: -1;
  margin: 12px 0 0;
  padding: 2px 5px;
  background: var(--ember);
  border: 0;
  font: 400 11px var(--f-mono);
  letter-spacing: .02em;
  text-transform: uppercase;
  color: var(--ink);
}
body.ui.editor #pv_documentation_panel strong { font-weight: 400; color: var(--ink); }
body.ui.editor #pv_documentation_panel code,
body.ui.editor #pv_documentation_panel kbd { font: 400 13px var(--f-mono); background: var(--ui-control-bg); padding: 1px 4px; border: 0; color: var(--ink); }
body.ui.editor #pv_documentation_panel .gd-keys { display: grid; grid-template-columns: max-content 1fr; gap: 0 18px; margin: 18px 0 0; }
body.ui.editor #pv_documentation_panel .gd-keys dt,
body.ui.editor #pv_documentation_panel .gd-keys dd { margin: 0; padding: 10px 0 9px; border-bottom: 1px solid var(--rule); font: 400 16px/1.35 var(--f-sans); color: var(--ink); }
body.ui.editor #pv_documentation_panel .gd-keys dt { font: 400 12.5px/1.8 var(--f-mono); text-transform: uppercase; }
body.ui.editor #pv_documentation_panel .gd-practice {
  all: unset;
  box-sizing: border-box;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  height: 48px;
  margin-top: 22px;
  padding: 0 18px;
  box-shadow: inset 0 0 0 1px var(--ink);
  font: 500 18px var(--f-display);
  letter-spacing: -.03em;
  color: var(--ink);
}
body.ui.editor #pv_documentation_panel .gd-practice > span { font: 400 12.5px var(--f-mono); letter-spacing: .02em; text-transform: uppercase; color: var(--ink); }
body.ui.editor #pv_documentation_panel .gd-practice:hover { background: var(--ink); color: var(--paper); }
body.ui.editor #pv_documentation_panel .gd-practice:hover > span { color: var(--paper); }


/* narrow windows: the columns stack (DESIGN 12), nothing scrolls sideways */
body.ui.editor #projects_view .pv-scroll > * { min-width: 0; }
body.ui.editor #pv_documentation_panel { overflow-wrap: anywhere; }
@media (max-width: 1200px) {
  body.ui.editor #projects_view .pv-title,
  body.ui.editor #projects_view .docs-title { font-size: 64px; }
  body.ui.editor #pv_documentation_panel .gd-layout { grid-template-columns: minmax(0, 1fr); }
  body.ui.editor #pv_documentation_panel .gd-nav { position: static; max-height: none; padding: 0 0 18px; border-right: 0; border-bottom: 1px solid var(--rule); }
  body.ui.editor #pv_documentation_panel .gd-body { padding-left: 0; }
  body.ui.editor #pv_grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body.ui.editor #pv_grid .pv-saveloc { flex-wrap: wrap; }
  body.ui.editor #pv_projects_panel .pv-search { max-width: none; }
}
@media (max-width: 860px) {
  body.ui.editor #projects_view .pv-title,
  body.ui.editor #projects_view .docs-title { font-size: 44px; }
  body.ui.editor #pv_grid { grid-template-columns: minmax(0, 1fr); }
  body.ui.editor #pv_documentation_panel .gd-keys { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 760px) {
  /* no room for the middle column: the sheets take the whole window under the top bar */
  body.ui.editor #projects_view,
  body.ui.editor #kit_gallery { position: fixed; inset: var(--nav) 0 0 0; }
}

