/* The Sleek Docs app around the page: the list of pages on the left, the bar across the top, the
   format bar, the menus, and the editor's own touches on the page (prompts on empty lines, the
   controls on a picture). How the page itself looks is doc.css. Colours are doc.css's tokens, so
   the whole app follows the page's light or dark mode. */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--d-bg); color: var(--d-fg); font: 14px/1.45 var(--d-ff); -webkit-font-smoothing: antialiased; overflow: hidden; }
html.booting body { opacity: 0; }
body { transition: opacity .2s ease; }
[hidden] { display: none !important; }
button { font: inherit; color: inherit; }
.boot-fail { max-width: 560px; margin: 18vh auto; padding: 0 max(16px, env(safe-area-inset-left, 0px)); font: 15px/1.5 var(--d-ff); }
.boot-fail h1 { font-size: 30px; letter-spacing: -0.02em; margin: 0 0 8px; }
.boot-fail p { color: var(--d-muted); } .boot-fail a { color: var(--d-accent); }
.ico { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
:is(button, input, select, a, [tabindex]):focus-visible { outline: 2px solid var(--d-accent); outline-offset: 2px; }

.app { display: flex; height: 100vh; height: 100dvh; padding-top: env(safe-area-inset-top, 0px); }

/* ---------- the list of pages ---------- */
.side { width: 272px; flex: none; display: flex; flex-direction: column; gap: 10px; padding: 12px 10px calc(10px + env(safe-area-inset-bottom, 0px)) max(10px, env(safe-area-inset-left, 0px)); border-right: 1px solid var(--d-line); background: var(--d-app); min-height: 0; }
/* hidden, the list slides away to the left and the page takes its room; shown, it slides back */
.app.no-side .side { margin-left: -272px; visibility: hidden; pointer-events: none; }
.app.live .side { transition: margin-left .34s cubic-bezier(.2, .8, .2, 1), transform .3s cubic-bezier(.2, .8, .2, 1), visibility 0s; }
.app.live.no-side .side { transition: margin-left .34s cubic-bezier(.2, .8, .2, 1), transform .3s cubic-bezier(.2, .8, .2, 1), visibility 0s .34s; }
/* a page opened in place of another: the old page fades as the new one rises (doc/editor.js: open) */
.pagebox { view-transition-name: dpage; }
html[data-shift="page"]::view-transition-old(dpage) { animation: .16s ease both sk-page-out; }
html[data-shift="page"]::view-transition-new(dpage) { animation: .42s cubic-bezier(.2, .8, .2, 1) .04s both sk-page-in; }
html[data-shift="page"]::view-transition-old(root) { animation: .2s ease both sk-page-out; } html[data-shift="page"]::view-transition-new(root) { animation: none; }
@media (prefers-reduced-motion: reduce) { .app.live .side, .app.live.no-side .side { transition: none; } }
.brand { display: flex; align-items: center; gap: 9px; padding: 3px 6px; font-weight: 700; font-size: 16px; letter-spacing: -0.03em; color: var(--d-fg); text-decoration: none; border-radius: 8px; }
.brand img { display: block; width: 22px; height: auto; }
.brand a { display: inline-flex; align-items: center; gap: 9px; color: var(--d-muted); text-decoration: none; border-radius: 6px; transition: color .15s ease; } .brand a:last-child { color: var(--d-fg); } .brand a:hover, .brand a:focus-visible { color: var(--d-fg); }
.brand a:last-child:hover { text-decoration: underline; text-underline-offset: 3px; } .brand i { font-style: normal; font-weight: 400; color: var(--d-faint); margin: 0 -3px; }
.search { display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 10px; border-radius: 10px; background: var(--d-hover); color: var(--d-muted); }
.search input { flex: 1; min-width: 0; border: 0; background: none; outline: none; font: inherit; color: var(--d-fg); }
.side-new { display: flex; gap: 6px; }
.side-new button { flex: 1; height: 32px; border-radius: 9px; border: 1px solid var(--d-line2); background: none; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px; font-weight: 500; font-size: 13px; }
.side-new button:hover { background: var(--d-hover); }
.tree { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 1px; margin: 0 -4px; padding: 0 4px; }
.row { position: relative; display: flex; align-items: center; gap: 7px; width: 100%; min-height: 32px; padding: 4px 30px 4px calc(8px + var(--in, 0) * 16px); border: 0; border-radius: 8px; background: none; text-align: left; cursor: pointer; flex: none; }
.row:hover, .row:focus-within { background: var(--d-hover); }
.row.cur { background: var(--d-soft); font-weight: 500; }
.row.over { box-shadow: inset 0 0 0 2px var(--d-accent); }
.row .ico { width: 16px; height: 16px; color: var(--d-muted); }
.row .chev { width: 12px; height: 12px; transition: transform .15s ease; }
.row.open .chev { transform: rotate(90deg); }
.row > span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row > em { font-style: normal; font-size: 12px; color: var(--d-faint); }
.row input { flex: 1; min-width: 0; height: 24px; border: 1px solid var(--d-accent); border-radius: 6px; background: var(--d-bg); color: var(--d-fg); font: inherit; padding: 0 6px; }
.row-more { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 24px; height: 24px; display: grid; place-items: center; border: 0; border-radius: 6px; background: none; cursor: pointer; color: var(--d-muted); opacity: 0; }
.row:hover .row-more, .row:focus-within .row-more, .row-more:focus-visible, .row-more[aria-expanded="true"] { opacity: 1; }
.row-more:hover { background: var(--d-hover); color: var(--d-fg); }
.row:hover > em, .row:focus-within > em { visibility: hidden; }
.tree-none { padding: 10px 8px; color: var(--d-muted); font-size: 13px; }
.side-foot { font-size: 12px; color: var(--d-faint); padding: 0 6px; }

/* ---------- the bars and the page ---------- */
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; position: relative; background: var(--d-bg); }
.top { display: flex; align-items: center; gap: 8px; height: 48px; padding: 0 max(10px, env(safe-area-inset-right, 0px)) 0 10px; border-bottom: 1px solid var(--d-line); flex: none; }
.ib { width: 34px; height: 34px; flex: none; display: inline-grid; place-items: center; border: 0; border-radius: 9px; background: none; cursor: pointer; color: var(--d-muted); }
.ib:hover, .ib[aria-expanded="true"] { background: var(--d-hover); color: var(--d-fg); }
.crumb { flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; color: var(--d-muted); white-space: nowrap; overflow: hidden; }
.crumb b { color: var(--d-fg); font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.saved { color: var(--d-faint); font-size: 12.5px; white-space: nowrap; }
.btn { height: 32px; padding: 0 14px; border-radius: 999px; border: 0; background: var(--d-accent); color: var(--d-on-accent); font-weight: 600; font-size: 13px; cursor: pointer; white-space: nowrap; }
.fmt { display: flex; align-items: center; gap: 2px; padding: 6px 10px; border-bottom: 1px solid var(--d-line); overflow-x: auto; flex: none; scrollbar-width: none; }
.fmt::-webkit-scrollbar { display: none; }
.fmt select { height: 32px; border-radius: 9px; border: 1px solid var(--d-line2); color: var(--d-fg); font: inherit; padding: 0 32px 0 12px; margin-right: 4px; flex: none; cursor: pointer;
  -webkit-appearance: none; appearance: none; transition: background-color .15s ease, border-color .15s ease;
  background: var(--d-bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='%238E8E93' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2.5 4.5 6 8l3.5-3.5'/%3E%3C/svg%3E") no-repeat right 11px center / 12px 12px; }
.fmt select:hover { background-color: var(--d-hover); border-color: var(--d-muted); }
.fb { min-width: 32px; height: 32px; padding: 0 8px; flex: none; display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 0; border-radius: 8px; background: none; cursor: pointer; font-size: 14px; }
.fb:hover { background: var(--d-hover); }
.fb.on { background: var(--d-soft); color: var(--d-accent); }
.fb.w { font-weight: 500; font-size: 13px; padding: 0 10px; border: 1px solid var(--d-line2); margin-left: 4px; }
.sep { width: 1px; height: 20px; background: var(--d-line); margin: 0 6px; flex: none; }
.scroll { flex: 1; min-height: 0; overflow-y: auto; container-type: inline-size; position: relative; }
.pagebox { position: relative; padding: 32px max(24px, env(safe-area-inset-right, 0px)) 40vh 24px; min-height: 100%; cursor: text; }
.locked { max-width: 680px; margin: 0 auto 18px; padding: 12px 16px; border-radius: 12px; background: var(--d-soft); border: 1px solid color-mix(in srgb, var(--d-accent) 30%, transparent); }

/* ---------- menus, all one look ---------- */
.pop { position: absolute; z-index: 30; min-width: 250px; max-width: min(340px, calc(100% - 16px)); max-height: min(640px, calc(100% - 96px)); overflow-y: auto; padding: 6px; border-radius: 14px; background: var(--d-raise); border: 1px solid var(--d-line2); box-shadow: var(--d-shadow); display: flex; flex-direction: column; gap: 1px; animation: pop .18s cubic-bezier(.16,1,.3,1); }
@keyframes pop { from { opacity: 0; transform: translateY(4px) scale(.98); } }
.pop h4 { margin: 0; padding: 8px 10px 4px; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--d-faint); font-weight: 600; }
.mi { display: flex; align-items: center; gap: 10px; width: 100%; padding: 7px 10px; border: 0; border-radius: 9px; background: none; text-align: left; cursor: pointer; flex: none; }
.mi:hover, .mi.sel { background: var(--d-hover); }
.mi .ico { color: var(--d-muted); }
.mi span { display: flex; flex-direction: column; min-width: 0; }
.mi b { font-weight: 500; } .mi i { font-style: normal; font-size: 12.5px; color: var(--d-muted); }
.mi.warn b { color: var(--d-warn); }
.pop .line { height: 1px; background: var(--d-line); margin: 5px 4px; flex: none; }
.pop p { margin: 0; padding: 4px 10px 8px; font-size: 12.5px; color: var(--d-muted); }
.linkpop { flex-direction: row; align-items: center; gap: 6px; padding: 8px; }
.linkpop input { flex: 1; min-width: 0; height: 32px; border-radius: 8px; border: 1px solid var(--d-line2); background: var(--d-bg); color: var(--d-fg); font: inherit; padding: 0 10px; }
.sws { display: flex; gap: 8px; padding: 6px 10px 8px; }
.sws button { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--d-raise); box-shadow: 0 0 0 1px var(--d-line2); background: var(--c); cursor: pointer; padding: 0; }
.sws button.on { box-shadow: 0 0 0 2px var(--d-fg); }
.seg { display: flex; gap: 4px; padding: 4px 10px 8px; }
.seg button { flex: 1; height: 30px; border-radius: 8px; border: 1px solid var(--d-line2); background: none; cursor: pointer; font-size: 13px; }
.seg button.on { background: var(--d-fg); color: var(--d-bg); border-color: var(--d-fg); }
.toast { position: fixed; left: 50%; bottom: calc(22px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 60; max-width: calc(100% - 32px); padding: 10px 16px; border-radius: 12px; background: #1C1C21; color: #F2F2F5; font-size: 13.5px; box-shadow: 0 16px 40px -12px rgba(0,0,0,.6); animation: pop .2s ease; }

/* the switch under Publish, and the readers chip in the bar */
.opt { display: flex; gap: 10px; align-items: center; padding: 6px 10px 8px 38px; }
.opt span { flex: 1; display: flex; flex-direction: column; min-width: 0; } .opt b { font-weight: 500; } .opt i { font-style: normal; font-size: 12.5px; color: var(--d-muted); }
.sw { flex: none; width: 40px; height: 24px; border-radius: 999px; border: 0; padding: 0; background: var(--d-line2); position: relative; cursor: pointer; transition: background .2s ease; }
.sw::after { content: ""; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .2s ease; }
.sw[aria-checked="true"] { background: var(--d-accent); } .sw[aria-checked="true"]::after { transform: translateX(16px); }
.chip { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 12px 0 10px; border-radius: 999px; border: 1px solid var(--d-line2); background: none; cursor: pointer; font-weight: 500; font-size: 13px; white-space: nowrap; flex: none; }
.chip:hover, .chip[aria-expanded="true"] { background: var(--d-hover); }
.chip.live { border-color: color-mix(in srgb, var(--d-live) 55%, transparent); }
.chip .ico { width: 16px; height: 16px; color: var(--d-muted); }
.vw-pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--d-live); animation: vw-pulse 2s ease-out infinite; flex: none; }
@keyframes vw-pulse { from { box-shadow: 0 0 0 0 color-mix(in srgb, var(--d-live) 60%, transparent); } to { box-shadow: 0 0 0 8px transparent; } }
.vw-who { display: flex; flex-direction: column; }
.vw-who .mi i.c { width: 10px; height: 10px; border-radius: 50%; background: var(--c); flex: none; }
.vw-who .mi em { margin-left: auto; font-style: normal; font-size: 12.5px; color: var(--d-faint); white-space: nowrap; padding-left: 8px; }
.vw-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 4px 6px 6px; }
.vw-stats div { padding: 9px 10px; border-radius: 10px; background: var(--d-hover); display: flex; flex-direction: column; min-width: 0; }
.vw-stats b { font-size: 18px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .vw-stats span { font-size: 12px; color: var(--d-muted); }
.vw-foot { display: flex; flex-wrap: wrap; gap: 4px 14px; padding: 6px 10px 8px; border-top: 1px solid var(--d-line); margin-top: 4px; }
.vw-foot button { border: 0; background: none; padding: 4px 0; font-size: 13px; color: var(--d-muted); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.vw-foot button:hover { color: var(--d-fg); } .vw-foot button.warn { color: var(--d-warn); }
/* how far readers got: a bar down the right edge of the page, stronger where more people read, with a dot for each reader here now */
.vw-rail { position: absolute; top: 0; right: 10px; width: 8px; pointer-events: none; }
.vw-rail i { position: absolute; left: 2px; width: 4px; border-radius: 3px; background: var(--d-accent); min-height: 3px; transition: opacity .4s ease; }
.vw-rail b { position: absolute; left: -1px; width: 10px; height: 10px; border-radius: 50%; background: var(--c); border: 2px solid var(--d-bg); transition: top .6s cubic-bezier(.2,.8,.2,1); }

/* ---------- the editor's own touches on the page ---------- */
/* a chart, big numbers, or a before and after: its controls, and what it looks like while empty or chosen */
.dk-data { cursor: pointer; }
.dk-data:hover .dk-fig-tools, .dk-data.ProseMirror-selectednode .dk-fig-tools, .dk-compare:hover .dk-fig-tools, .dk-compare.ProseMirror-selectednode .dk-fig-tools { opacity: 1; }
.dk-compare .dk-fig-tools { z-index: 3; }
.dk-compare.cmp-empty { cursor: default; }
.cmp-slot { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; width: 100%; aspect-ratio: 4 / 3; border: 1.5px dashed var(--d-line2); border-radius: 14px; background: var(--d-hover); color: var(--d-muted); cursor: pointer; padding: 12px; text-align: center; }
.cmp-slot b { color: var(--d-fg); font-weight: 600; font-size: 15px; } .cmp-slot span { font-size: 12.5px; }
.cmp-slot:hover, .cmp-slot.over { border-color: var(--d-accent); background: var(--d-soft); }
.dk-compare.busy { opacity: .6; }
/* Edit data: a panel along the bottom of the window */
.de { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 35; width: min(760px, calc(100% - 24px)); max-height: min(46%, 420px); display: flex; flex-direction: column; gap: 10px; padding: 14px;
  border-radius: 16px; background: var(--d-raise); border: 1px solid var(--d-line2); box-shadow: var(--d-shadow); animation: pop .2s cubic-bezier(.16,1,.3,1); }
.de-top, .de-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.de-top b { font-size: 15px; font-weight: 600; }
.de-grow { flex: 1 1 auto; }
.de-seg { display: inline-flex; padding: 2px; border-radius: 9px; background: var(--d-hover); }
.de-seg button { height: 28px; padding: 0 12px; border: 0; border-radius: 7px; background: none; cursor: pointer; font-size: 13px; color: var(--d-muted); }
.de-seg button.on { background: var(--d-bg); color: var(--d-fg); box-shadow: 0 1px 3px rgba(0,0,0,0.18); font-weight: 500; }
.de-rows { overflow: auto; min-height: 0; display: flex; flex-direction: column; gap: 5px; margin: 0 -4px; padding: 0 4px 2px; }
.de-row { display: grid; grid-template-columns: 110px minmax(120px, 1.4fr) minmax(110px, 1fr) 124px 30px; gap: 6px; align-items: center; min-width: 560px; }
.de-row.de-chart { grid-template-columns: 76px minmax(140px, 1.6fr) minmax(90px, 1fr) 30px; min-width: 380px; }
.de-head span { font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--d-faint); font-weight: 600; white-space: nowrap; }
.de input:not([type=radio]):not([type=checkbox]), .de select { height: 32px; min-width: 0; width: 100%; border-radius: 8px; border: 1px solid var(--d-line2); background: var(--d-bg); color: var(--d-fg); font: inherit; padding: 0 9px; }
.de input:focus, .de select:focus { outline: 2px solid var(--d-accent); outline-offset: -1px; }
.de-hi { display: grid; place-items: center; height: 32px; cursor: pointer; } .de-hi input { accent-color: var(--d-accent); width: 16px; height: 16px; }
.de-row button { width: 30px; height: 30px; border: 0; border-radius: 8px; background: none; color: var(--d-muted); font-size: 18px; line-height: 1; cursor: pointer; }
.de-row button:hover:not(:disabled) { background: var(--d-hover); color: var(--d-warn); } .de-row button:disabled { opacity: .3; cursor: default; }
.de-foot { font-size: 13px; color: var(--d-muted); }
.de-foot label { display: inline-flex; align-items: center; gap: 6px; } .de .de-short { width: 58px !important; }
.de-check input { accent-color: var(--d-accent); }
.de-note { font-size: 12.5px; color: var(--d-faint); }
.de .fb.w { margin-left: 0; } .de .fb.w:disabled { opacity: .4; cursor: default; }
/* Make a deck: the list of slides the page will become */
.td { position: absolute; inset: 0; z-index: 45; display: grid; place-items: center; padding: 16px; background: color-mix(in srgb, var(--d-bg) 55%, transparent); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); animation: pop .2s ease; }
.td-panel { width: min(520px, 100%); max-height: 100%; display: flex; flex-direction: column; gap: 10px; padding: 20px; border-radius: 18px; background: var(--d-raise); border: 1px solid var(--d-line2); box-shadow: var(--d-shadow); }
.td-panel h2 { margin: 0; font-size: 19px; letter-spacing: -0.02em; font-weight: 650; }
.td-panel p { margin: 0; color: var(--d-muted); font-size: 13.5px; }
.td-list { list-style: none; margin: 4px -6px; padding: 0 6px; overflow-y: auto; min-height: 0; display: flex; flex-direction: column; gap: 2px; }
.td-list li { display: flex; align-items: baseline; gap: 10px; padding: 7px 8px; border-radius: 9px; background: var(--d-hover); }
.td-n { flex: none; width: 22px; text-align: right; font-size: 12.5px; color: var(--d-faint); font-variant-numeric: tabular-nums; }
.td-k { flex: none; width: 118px; font-size: 12px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--d-accent); }
.td-t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.td-t em { font-style: normal; color: var(--d-faint); font-size: 12.5px; margin-left: 8px; }
.td-foot { display: flex; justify-content: flex-end; gap: 8px; padding-top: 4px; }
.td-foot .btn { height: 34px; } .td-foot .fb.w { height: 34px; margin: 0; }
@media (max-width: 560px) { .td-k { width: 76px; font-size: 10.5px; } }
/* the controls above the table the cursor is in */
.tb-bar { position: absolute; z-index: 6; display: flex; gap: 2px; padding: 3px; border-radius: 10px; background: var(--d-raise); border: 1px solid var(--d-line2); box-shadow: 0 8px 24px -10px rgba(0,0,0,0.4); max-width: calc(100% - 8px); overflow-x: auto; scrollbar-width: none; }
.tb-bar::-webkit-scrollbar { display: none; }
.tb-bar button { height: 26px; padding: 0 9px; border: 0; border-radius: 7px; background: none; cursor: pointer; font-size: 12.5px; white-space: nowrap; color: var(--d-fg); }
.tb-bar button:hover { background: var(--d-hover); }
.tb-bar button[data-a="del"] { color: var(--d-warn); }
.dk-doc .tableWrapper { overflow-x: auto; padding-top: 2px; }
.dk-doc .tableWrapper table { margin-bottom: 4px; }
.dk-doc .column-resize-handle { position: absolute; right: -2px; top: 0; bottom: -2px; width: 4px; z-index: 4; background: var(--d-accent); pointer-events: none; }
.dk-doc.resize-cursor { cursor: col-resize; }

.dk-empty::before { content: attr(data-ph); color: var(--d-faint); float: left; height: 0; pointer-events: none; }
.dk-cover .dk-empty::before { color: rgba(255,255,255,0.45); }
.dk-toggle.dk-empty::before { float: none; height: auto; position: absolute; }
.ProseMirror-selectednode { outline: 2px solid var(--d-accent); outline-offset: 3px; border-radius: 10px; }
.dk-doc .selectedCell { background: var(--d-soft); }
.dk-fig-tools { position: absolute; top: 8px; right: 8px; display: flex; gap: 4px; opacity: 0; transition: opacity .15s ease; }
.dk-fig:hover .dk-fig-tools, .dk-fig.ProseMirror-selectednode .dk-fig-tools, .dk-fig-tools:focus-within { opacity: 1; }
.dk-fig-tools button { height: 28px; padding: 0 10px; border-radius: 8px; border: 0; background: rgba(20,20,24,0.78); color: #fff; font-size: 12.5px; cursor: pointer; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.dk-fig.nocap figcaption::before { content: "Add a caption"; color: var(--d-faint); pointer-events: none; }
.dk-fig.nocap:not(:hover):not(:focus-within):not(.ProseMirror-selectednode) figcaption { display: none; }
.dk-fig img { cursor: default; }
.dk-fig.busy img { opacity: .5; }

/* ---------- a phone: the list slides over the page ---------- */
@media (max-width: 760px) {
  .side { position: fixed; z-index: 40; top: 0; bottom: 0; left: 0; width: min(300px, 86%); padding-top: calc(12px + env(safe-area-inset-top, 0px)); box-shadow: 20px 0 50px -20px rgba(0,0,0,.5); }
  .app.no-side .side { margin-left: 0; transform: translateX(-106%); box-shadow: none; }
  .saved { display: none; }
  .crumb em { display: none; }
  .pagebox { padding: 20px max(16px, env(safe-area-inset-right, 0px)) 40vh max(16px, env(safe-area-inset-left, 0px)); }
  .row-more { opacity: 1; }
  .vw-rail { right: 3px; }
}
/* ---------- tasks in a page, while editing (doc/blocks-tasks.js) ---------- */
.dk-tchip { cursor: pointer; user-select: none; -webkit-user-select: none; transition: border-color .15s, background .15s; }
.dk-tchip:hover, .dk-tchip[aria-expanded="true"] { border-color: var(--d-accent); }
.dk-tchip.gone, div.dk-tasks.gone { opacity: .6; } .dk-tchip.gone { border-style: dashed; }
/* (div.dk-tasks is the block of tasks from Sleek Tasks; a checklist written in the page is ul.dk-tasks, and none of this is for it) */
div.dk-tasks { user-select: none; -webkit-user-select: none; }
.tk-tools { margin-left: auto; display: flex; gap: 2px; opacity: 0; transition: opacity .15s; }
div.dk-tasks:hover .tk-tools, div.dk-tasks:focus-within .tk-tools, div.dk-tasks.ProseMirror-selectednode .tk-tools { opacity: 1; }
.tk-tools button { height: 26px; padding: 0 9px; border: 0; border-radius: 8px; background: none; color: var(--d-muted); font: 500 12.5px var(--d-ff); cursor: pointer; white-space: nowrap; }
.tk-tools button:hover, .tk-tools button:focus-visible { background: var(--d-hover); color: var(--d-fg); outline: none; }
.tk-add { margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--d-line); }
div.dk-tasks[data-view="board"] .tk-add { border-top: 0; }
.tk-add input { width: 100%; height: 32px; padding: 0 6px; border: 0; border-radius: 8px; background: none; color: var(--d-fg); font: 15px var(--d-ff); outline: none; }
.tk-add input::placeholder { color: var(--d-faint); } .tk-add input:focus { background: var(--d-hover); }
.tk-card { cursor: grab; transition: border-color .15s, box-shadow .15s; }
.tk-card:hover, .tk-card:focus-visible, .tk-card[aria-expanded="true"] { border-color: var(--d-accent); outline: none; }
.tk-col { transition: background .15s, box-shadow .15s; } .tk-col.over { background: var(--d-soft); box-shadow: inset 0 0 0 1.5px var(--d-accent); }
.tk-pick { width: 320px; } .tk-pick input { width: 100%; height: 36px; padding: 0 10px; margin-bottom: 4px; border: 1px solid var(--d-line2); border-radius: 9px; background: var(--d-bg); color: var(--d-fg); font: 15px var(--d-ff); outline: none; }
.tk-pick input:focus { border-color: var(--d-accent); } .tk-struck { text-decoration: line-through; color: var(--d-faint); }
.tk-found .mi b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 640px) { .tk-h { flex-wrap: wrap; } .tk-tools { opacity: 1; width: 100%; margin-left: -8px; } }
@media (prefers-reduced-motion: reduce) { .pop, .toast, .vw-pulse { animation: none; } .vw-rail b, .vw-rail i { transition: none; } }
@media print { .side, .top, .fmt, .pop, .toast, .tk-tools, .tk-add, .dk-fig-tools, .locked, .vw-rail, .de, .tb-bar, .cmp-slot, .td { display: none !important; } .app, .main, .scroll { display: block; height: auto; overflow: visible; } .pagebox { padding: 0; min-height: 0; } .dk-empty::before, .dk-fig.nocap figcaption, .dk-cover .dk-empty { display: none; } }
