/* Stage 1 screens, on top of base.css (tokens) and app.css (the shell and the list).
   Same rules as there: type and hairlines, one accent, two durations, nothing rounder than 10px. */

/* ---- The frame: bands across the top, then the shell fills what is left. */
html, body.inapp { height: 100%; }
/* Nothing in the app may scroll sideways. "clip", unlike "hidden", cannot be scrolled by the browser
   either (focus, find-in-page), so a moment of overflow can never leave the page shifted. */
body.inapp { overflow: hidden; }
.app { position: relative; display: flex; flex-direction: column; height: 100dvh; min-height: 0; overflow: hidden; overflow: clip; }
.app > .shell { flex: 1; height: auto; min-height: 0; overflow: clip; }
.main { min-height: 0; overflow: clip; }
.band { display: flex; align-items: center; justify-content: center; gap: var(--s3); padding: 6px var(--s4); font-size: var(--t-sm); text-align: center; }
.band-as { background: var(--warn-bg); color: var(--warn); font-weight: 600; }
.band-as .btn { height: 28px; }
.band-off { background: var(--paper-3); color: var(--ink-2); }

button { font-family: var(--font); }
.btn:disabled { opacity: 0.5; cursor: default; }
.btn-quiet { border-color: transparent; background: none; color: var(--forest); }
.btn-stop { color: var(--stop); }
.btn-stop:hover { background: var(--stop-bg); }
.linkish { all: unset; color: var(--forest); font-weight: 600; cursor: pointer; }
.linkish:hover { text-decoration: underline; text-underline-offset: 2px; }
.linkish:focus-visible, .sort:focus-visible, .x:focus-visible, .tray-title:focus-visible { outline: 2px solid var(--forest); outline-offset: 2px; border-radius: 3px; }
.quiet { color: var(--ink-3); font-size: var(--t-sm); }
.note-ok { background: var(--ok-bg); color: var(--ok); }
.tag-stop { background: var(--stop-bg); color: var(--stop); }
.tag-ok { background: var(--ok-bg); color: var(--ok); }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; border: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ---- Top bar and rail additions. */
button.avatar { border: 0; padding: 0; cursor: pointer; }
button.avatar:hover { background: var(--line-strong); }
.top .state.working { color: var(--ink-2); }
.rail .co.area { height: 32px; padding-left: calc(var(--s3) + 20px); font-size: var(--t-sm); }
.rail .co.area .ic { width: 16px; height: 16px; color: var(--ink-3); }
.rail .co.area[aria-current] .ic { color: var(--ink); }
.rail-rule { margin: var(--s4) var(--s3); border: 0; border-top: 1px solid var(--line); }
.rail h3:first-child { margin-top: var(--s2); }

/* ---- The folder list. */
.head h1 { display: flex; align-items: center; gap: var(--s2); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.head .picked { margin-right: var(--s2); color: var(--ink-2); font-size: var(--t-sm); white-space: nowrap; }
.list { position: relative; }
.list:focus-visible { outline-offset: -2px; border-radius: 0; }
.list.dropping { background: var(--ok-bg); box-shadow: inset 0 0 0 2px var(--forest); }
.rows { padding-top: var(--before, 0px); padding-bottom: var(--after, 0px); }
.row { user-select: none; -webkit-user-select: none; }
.list:focus-visible .row.focus { outline: 2px solid var(--forest); outline-offset: -2px; }
.row .who { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); min-width: 0; }
.more { display: grid; place-items: center; margin-left: auto; padding: 4px; border: 0; border-radius: 4px; background: none; color: var(--ink-3); cursor: pointer; opacity: 0; }
.row:hover .more, .row[aria-selected="true"] .more, .more:focus-visible { opacity: 1; }
.more:hover { background: var(--paper-3); color: var(--ink); }
.sort { all: unset; cursor: pointer; }
.sort:hover { color: var(--ink); }
.sort.num { text-align: right; }
.sort[aria-sort="ascending"]::after { content: " \2191"; }
.sort[aria-sort="descending"]::after { content: " \2193"; }
.row .name .rename { height: 28px; padding: 0 6px; font-size: var(--t-md); }
.said { display: flex; align-items: center; justify-content: space-between; gap: var(--s4); padding: var(--s2) var(--edge); border-top: 1px solid var(--line); background: var(--paper-2); font-size: var(--t-sm); }
.said.stop { background: var(--stop-bg); color: var(--stop); }
.blank { display: grid; justify-items: center; gap: var(--s3); padding: var(--s7) var(--s5); color: var(--ink-2); text-align: center; }
.blank h1 { color: var(--ink); font-size: var(--t-lg); }
.blank p { max-width: 46ch; }
.main > .blank, .main > .quiet { margin-top: var(--s6); }
.main > .quiet { padding: 0 var(--edge); }

/* ---- Side panel and sheet additions. */
.side li .linkish, .sheet li .linkish { font-size: var(--t-sm); }
.side .quiet { margin-top: var(--s1); }
.scrim { z-index: 19; }
.sheet { z-index: 20; outline: none; }
.sheet .kind { margin-top: 2px; color: var(--ink-3); font-size: var(--t-sm); }
.sheet li { flex-wrap: wrap; }
.sheet li small { flex-basis: 100%; color: var(--ink-3); font-size: var(--t-xs); }
.sheet .openline { margin: 0 0 var(--s3); padding: var(--s3); border-radius: var(--r-control); background: var(--warn-bg); color: var(--warn); font-size: var(--t-sm); }

/* ---- Pages that are not a folder: home, people, the record, devices, access, bin. */
/* One frame for every page: full width up to --frame, then centred; head and body share the same edges,
   so buttons in the head line up with the content under them. */
.page { flex: 1; min-height: 0; overflow: auto; overflow-x: clip; padding: 0 var(--edge) var(--s7); }
.page .head, .page .crumbs { padding-left: 0; padding-right: 0; }
.page > .crumbs { padding-top: var(--s5); }
.page > .head:first-child { padding-top: var(--s5); }
.page > .crumbs + .head { padding-top: var(--s1); }
.page > p, .page > .quiet, .page > .hint, .page > .check, .page section > p, .page .lede { max-width: 75ch; }
.page > .btn { margin-top: var(--s3); }
.sect { margin-top: var(--s6); margin-bottom: var(--s2); padding-bottom: var(--s2); border-bottom: 1px solid var(--line-strong); }
.sect a { color: inherit; text-decoration: none; }
.sect a:hover { text-decoration: underline; }
.head + .places { border-top: 1px solid var(--line); }
.place { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto 14px; align-items: center; gap: var(--s3); min-height: 56px; padding: var(--s2); border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.place:hover { background: var(--paper-2); color: var(--ink); }
.place b { display: block; font-weight: 600; }
.place div span { color: var(--ink-3); font-size: var(--t-sm); }
.place .ic { color: var(--ink-3); }
.place > .ic:last-child { width: 14px; height: 14px; }

.tbl { border-top: 1px solid var(--line); color: var(--ink-2); font-size: var(--t-sm); }
.sect + .tbl, .sect + .quiet + .tbl { border-top: 0; }
.tr { display: grid; align-items: center; gap: var(--s2) var(--s4); min-height: var(--tr); padding: var(--s2) 0; border-bottom: 1px solid var(--line); }
.tr.th { min-height: 32px; color: var(--ink-3); font: 600 var(--t-xs)/1 var(--font); letter-spacing: 0.04em; text-transform: uppercase; }
.tr > span { min-width: 0; overflow-wrap: anywhere; }
.tr .name { display: flex; flex-wrap: wrap; align-items: center; gap: 2px var(--s2); color: var(--ink); font-size: var(--t-md); }
.tr .name b { max-width: 100%; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tr .name small { flex-basis: 100%; color: var(--ink-3); font-size: var(--t-xs); }
.tr .name .ic { color: var(--ink-3); }
.tr > .btn, .tr > .tag { justify-self: end; }
.tr.off .name b { color: var(--ink-3); }
.tbl.people .tr { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) 120px 40px; }
.tbl.groups .tr { grid-template-columns: minmax(0, 1fr) 120px 150px; }
.tbl.record .tr { grid-template-columns: minmax(0, 1fr) 150px 130px; }
.tbl.devices .tr { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) 150px 150px; }
.tbl.grants .tr { grid-template-columns: minmax(0, 1.5fr) 140px 130px 110px 160px; }
.tbl.hidden-from .tr { grid-template-columns: minmax(0, 1fr) 160px; }
.tbl.reach .tr { grid-template-columns: minmax(0, 1fr) 140px minmax(0, 1.4fr); }
.tbl.bin .tr { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) 170px 100px; }
.more-row { padding: var(--s4) 0; }
.roles { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: var(--s2) var(--s4); margin-top: var(--s3); margin-bottom: 0; font-size: var(--t-sm); }
.roles dt { font-weight: 600; }
.roles dd { margin: 0; color: var(--ink-2); }
.check { display: flex; align-items: flex-start; gap: var(--s2); font-size: var(--t-sm); }
.check input { flex: none; width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--forest); }
.check small { display: block; color: var(--ink-3); }
.checks { display: grid; gap: var(--s3); max-height: 50dvh; overflow: auto; }

/* ---- Dialogs, forms and menus. */
.dlg { width: min(440px, calc(100vw - 32px)); max-height: calc(100dvh - 48px); padding: 0; border: 1px solid var(--line-strong); border-radius: var(--r-panel); background: var(--paper); color: var(--ink); box-shadow: 0 12px 40px var(--shade); }
.dlg-wide { width: min(560px, calc(100vw - 32px)); }
.dlg::backdrop { background: var(--veil); }
.dlg > header { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s3); padding: var(--s4) var(--s4) 0 var(--s5); }
.dlg h2 { padding-top: 4px; overflow-wrap: anywhere; }
.x { all: unset; display: grid; flex: none; place-items: center; width: 32px; height: 32px; border-radius: var(--r-control); color: var(--ink-3); font-size: 22px; line-height: 1; cursor: pointer; }
.x:hover { background: var(--paper-2); color: var(--ink); }
.dlg-body, .form { display: grid; gap: var(--s3); }
.dlg-body { padding: var(--s3) var(--s5) var(--s5); }
.dlg .crumbs { flex-wrap: wrap; padding: 0; }
.lbl { display: grid; gap: 6px; font-size: var(--t-sm); font-weight: 600; }
.lbl small { color: var(--ink-3); font-weight: 400; }
.form-acts { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: var(--s2); margin-top: var(--s2); }
.pick { display: grid; align-content: start; min-height: 120px; max-height: 44dvh; overflow: auto; border: 1px solid var(--line); border-radius: var(--r-control); }
.pick button { all: unset; box-sizing: border-box; display: flex; align-items: center; gap: var(--s3); min-height: 44px; padding: 4px var(--s3); border-bottom: 1px solid var(--line); font-size: var(--t-md); cursor: pointer; }
.pick button > span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.pick button small { display: block; color: var(--ink-3); font-size: var(--t-xs); }
.pick button:hover, .pick button:focus-visible { background: var(--paper-2); }
.pick button[aria-selected="true"] { background: var(--ok-bg); box-shadow: inset 2px 0 0 var(--forest); }
.pick button:disabled { color: var(--ink-3); cursor: default; background: none; }
.pick .ic { color: var(--ink-3); }
.pick .ic:last-child { width: 14px; height: 14px; }
.pick p { padding: var(--s3); }
.menu { position: fixed; left: var(--x, 0); top: var(--y, 0); z-index: 50; display: grid; min-width: 200px; max-width: 280px; padding: 4px; border: 1px solid var(--line-strong); border-radius: var(--r-control); background: var(--paper); box-shadow: 0 8px 24px var(--shade); }
.menu button { all: unset; box-sizing: border-box; padding: 8px 12px; border-radius: 4px; font-size: var(--t-sm); cursor: pointer; }
.menu button:hover, .menu button:focus-visible { background: var(--paper-2); }
.menu .stop { color: var(--stop); }
.menu hr { width: 100%; margin: 4px 0; border: 0; border-top: 1px solid var(--line); }

/* ---- Uploads tray. */
.tray { position: absolute; right: var(--s4); bottom: var(--s4); z-index: 30; width: min(360px, calc(100% - 32px)); border: 1px solid var(--line-strong); border-radius: var(--r-panel); background: var(--paper); box-shadow: 0 8px 24px var(--shade); font-size: var(--t-sm); }
.tray header { display: flex; align-items: center; justify-content: space-between; padding: 4px 4px 4px var(--s4); }
.tray header .btn { height: 28px; padding: 0 var(--s3); }
.tray-title { all: unset; flex: 1; padding: 8px 0; cursor: pointer; }
.tray ul { list-style: none; max-height: 240px; margin: 0; padding: 0 var(--s4) var(--s2); overflow: auto; border-top: 1px solid var(--line); }
.tray li { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 2px var(--s3); padding: 6px 0; border-bottom: 1px solid var(--line); }
.tray li:last-child { border-bottom: 0; }
.tray li b { color: var(--ink); font-weight: 400; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tray li span { grid-row: 1; grid-column: 2; color: var(--ink-3); font-size: var(--t-xs); white-space: nowrap; }
.tray li.failed span { grid-row: 2; grid-column: 1 / -1; color: var(--stop); white-space: normal; }
.tray li.failed .btn { grid-row: 1; grid-column: 2; height: 28px; padding: 0 var(--s2); }
.tray progress { grid-column: 1 / -1; width: 100%; height: 4px; border: 0; border-radius: 2px; background: var(--paper-3); overflow: hidden; appearance: none; -webkit-appearance: none; }
.tray progress::-webkit-progress-bar { background: var(--paper-3); }
.tray progress::-webkit-progress-value { background: var(--forest); }
.tray progress::-moz-progress-bar { background: var(--forest); }

/* ---- Looking at a file. */
.viewer { position: absolute; inset: 0; z-index: 40; display: grid; grid-template-rows: 52px minmax(0, 1fr); background: var(--stage); outline: none; }
.viewer header { display: flex; align-items: center; gap: var(--s3); min-width: 0; padding: 0 var(--s4); border-bottom: 1px solid var(--line); background: var(--paper); }
.viewer header b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.viewer header > span { color: var(--ink-3); font-size: var(--t-sm); white-space: nowrap; }
.tools { display: flex; gap: var(--s2); margin-left: auto; }
.stage { display: grid; place-items: center; min-height: 0; overflow: auto; }
.stage img, .stage video { max-width: 100%; max-height: 100%; object-fit: contain; }
.stage audio { width: min(480px, 90%); }
.stage iframe { width: 100%; height: 100%; border: 0; background: #fff; }
.stage pre { align-self: stretch; justify-self: stretch; margin: 0; padding: var(--s5); overflow: auto; background: var(--paper); color: var(--ink); font: 13px/1.5 ui-monospace, Consolas, "Courier New", monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.stage .blank h1, .stage .quiet, .stage .blank p { color: #f3efe2; }

/* ---- Signing in and setting up. */
.auth { display: grid; place-items: center; min-height: 100dvh; padding: var(--s5) var(--s4); padding-bottom: max(var(--s5), env(safe-area-inset-bottom)); }
.auth main { display: grid; gap: var(--s5); width: 100%; max-width: 380px; }
.auth form, .auth section { display: grid; gap: var(--s3); }
.auth .lede { color: var(--ink-2); }
.auth .btn { height: 40px; }
.auth .btn-primary { margin-top: var(--s2); }
.auth section .btn { justify-self: start; }
.hint { color: var(--ink-3); font-size: var(--t-sm); }
.field.code { font-size: 1.25rem; letter-spacing: 0.2em; }
.steps { display: grid; gap: var(--s3); margin: 0; padding-left: 1.2em; color: var(--ink-2); }
.qr { display: block; width: 200px; height: 200px; margin: var(--s3) 0; padding: 8px; border: 1px solid var(--line); border-radius: var(--r-control); background: #fff; }
.byhand { display: block; color: var(--ink-3); font-size: var(--t-sm); }
.byhand code { display: block; margin-top: 4px; color: var(--ink); font: 600 var(--t-sm)/1.5 ui-monospace, Consolas, "Courier New", monospace; overflow-wrap: anywhere; user-select: all; -webkit-user-select: all; }


/* ---- Phone. */
@container app (max-width: 640px) {
  .tabs { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 1fr; }
  .head .picked { display: none; }
  .page .head { flex-wrap: wrap; padding-top: var(--s4); }
  .page .head h1 { flex-basis: 100%; white-space: normal; }
  .page .head .btn:not(.btn-primary) { display: inline-flex; }
  .said { padding: var(--s3) var(--s4); }
  .more { padding: 8px; opacity: 1; }
  .more .ic { width: 20px; height: 20px; }
  .tr { grid-template-columns: minmax(0, 1fr) auto !important; }
  .tr.th, .tr > span:empty { display: none; }
  .tr > .name { grid-column: 1 / -1; }
  .roles { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .roles dd { margin-bottom: var(--s2); }
  .tray { right: var(--s2); left: var(--s2); bottom: calc(64px + env(safe-area-inset-bottom)); width: auto; }
  .viewer header > span, .viewer .tools .btn .ic { display: none; }
  .viewer .tools .btn { padding: 0 var(--s3); }
  .form-acts .btn { flex: 1; height: 44px; }
}

/* Second part of stage 1: zip, roll-back, email, reach, unfinished uploads */
.acts { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: var(--s2); }
.tbl.groups .tr { grid-template-columns: minmax(0, 1fr) 140px 40px; }
.tbl.grants .tr { grid-template-columns: minmax(0, 1.5fr) 130px 120px 100px minmax(0, 230px); }
.plan { list-style: none; max-height: 220px; margin: 0; padding: 0; overflow: auto; border-top: 1px solid var(--line); }
.plan li { display: flex; justify-content: space-between; gap: var(--s3); padding: 6px 0; border-bottom: 1px solid var(--line); font-size: var(--t-sm); }
.plan li span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); }
.plan li small, .reach-list li, .mail li small { color: var(--ink-3); }
.plan li small { white-space: nowrap; }
.reach-list { max-height: 60vh; overflow: auto; }
.reach-list h3 { margin: var(--s4) 0 var(--s1); font: 600 var(--t-md)/1.3 var(--font); color: var(--ink); }
.reach-list h3:first-child { margin-top: 0; }
.reach-list ul { margin: var(--s1) 0 0; padding-left: var(--s4); }
.reach-list li { padding: 2px 0; font-size: var(--t-sm); }
.tray-note { display: flex; align-items: center; gap: var(--s3); margin: 0; padding: var(--s2) var(--s2) var(--s2) var(--s4); border-top: 1px solid var(--line); color: var(--ink-2); font-size: var(--t-sm); }
.tray-note:first-child { border-top: 0; }
.tray-note span { flex: 1; }
.mail { align-self: stretch; width: min(100%, 78ch); margin: 0 auto; padding: var(--s5); overflow: auto; background: var(--paper); outline: none; }
.mail h1 { margin: 0 0 var(--s3); font-size: 1.25rem; overflow-wrap: anywhere; }
.mail dl { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 2px var(--s3); margin: 0 0 var(--s4); padding-bottom: var(--s4); border-bottom: 1px solid var(--line); font-size: var(--t-sm); }
.mail dt { color: var(--ink-3); }
.mail dd { margin: 0; overflow-wrap: anywhere; }
.mail pre { align-self: auto; margin: 0; padding: 0; overflow: visible; background: none; white-space: pre-wrap; overflow-wrap: anywhere; font: 400 var(--t-md)/1.5 var(--font); color: var(--ink); }
.mail .quiet { color: var(--ink-3); }
.mail h2 { margin: var(--s5) 0 var(--s2); padding-top: var(--s4); border-top: 1px solid var(--line); color: var(--ink-3); font: 600 var(--t-xs)/1 var(--font); letter-spacing: 0.06em; text-transform: uppercase; }
.mail ul { list-style: none; margin: 0; padding: 0; }
.mail li { display: flex; justify-content: space-between; gap: var(--s3); padding: 4px 0; font-size: var(--t-sm); }
@container app (max-width: 640px) {
  .acts .btn { flex: 1; }
  .mail { padding: var(--s4); }
}

/* Owner feedback, 21 November: New, right-click on empty space, dragging rows, the picker */
.list { display: flex; flex-direction: column; min-height: 0; }
.rows { flex: 1 0 auto; }
.head { flex-wrap: wrap; row-gap: var(--s2); }
.head .picked { margin-right: var(--s2); color: var(--ink-2); font-size: var(--t-sm); white-space: nowrap; }
.blank-acts { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--s2); margin-top: var(--s4); }
.row[draggable="true"] { -webkit-user-drag: element; }
.drop-to, .row.drop-to:hover { background: var(--ok-bg); box-shadow: inset 0 0 0 2px var(--forest); border-radius: var(--r-control); }
.pick h3 { margin: var(--s3) var(--s2) var(--s1); color: var(--ink-3); font: 600 var(--t-xs)/1 var(--font); letter-spacing: 0.06em; text-transform: uppercase; }
.pick h3:first-child { margin-top: var(--s1); }
.pick .quiet { margin: 0 var(--s2) var(--s2); }

/* Role groups on the People screen */
.roles-pick { display: grid; gap: var(--s3); max-height: 46vh; overflow: auto; }
.roles-pick fieldset { display: flex; flex-wrap: wrap; gap: var(--s1) var(--s5); margin: 0; padding: var(--s2) 0 0; border: 0; border-top: 1px solid var(--line); }
.roles-pick legend { padding: 0 var(--s2) 0 0; color: var(--ink); font: 600 var(--t-sm)/1.2 var(--font); }
.roles-pick .check { margin: 0; }
.sub { margin: var(--s2) 0 0; color: var(--ink-3); font: 600 var(--t-xs)/1 var(--font); letter-spacing: 0.06em; text-transform: uppercase; }
.tag-role { background: var(--paper-3); color: var(--ink-2); }
.acts.start { justify-content: flex-start; margin-bottom: var(--s3); }

/* Share links and the Email screen */
.field.mono { font-family: ui-monospace, "SF Mono", Consolas, monospace; font-size: var(--t-sm); }
.tbl.links .tr { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1.2fr) 100px; }
.tbl.email .tr { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) minmax(0, 1.4fr) 100px; }
.btn.btn-on { background: var(--paper-3); color: var(--ink); }

/* The bell, notices, and the rules of an area */
.bell { position: relative; display: grid; place-items: center; width: 32px; height: 32px; border: 0; border-radius: 50%; background: transparent; color: var(--ink-2); cursor: pointer; }
.bell:hover { background: var(--paper-2); color: var(--ink); }
.bell b { position: absolute; top: 0; right: -2px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--forest); color: var(--on-accent); font: 600 10px/16px var(--font); text-align: center; }
.notices { list-style: none; margin: 0; padding: 0; }
.notices li { display: grid; gap: 2px; padding: var(--s3) 0; border-bottom: 1px solid var(--line); font-size: var(--t-sm); }
.notices li button { display: grid; gap: 2px; text-align: left; font-weight: 400; }
.notices small { color: var(--ink-3); font-size: var(--t-xs); }
.rules { list-style: none; margin: 0 0 var(--s5); padding: 0; border-top: 1px solid var(--line); }
.rules li { padding: var(--s3) 0; border-bottom: 1px solid var(--line); }
.tick { display: flex; gap: var(--s3); align-items: flex-start; cursor: pointer; }
.tick input { margin-top: 3px; }
.tick span { display: grid; gap: 2px; }
.tick small { color: var(--ink-3); font-size: var(--t-sm); }
.page.narrow > * { max-width: 720px; }

/* Protected view: pages as pictures. Not for paper. */
.pv { display: grid; justify-items: center; gap: var(--s4); padding: var(--s4); overflow: auto; max-height: 100%; background: var(--paper-3); user-select: none; -webkit-user-select: none; }
.pv img { max-width: min(100%, 1100px); height: auto; background: #fff; box-shadow: 0 0 0 1px var(--line); pointer-events: auto; -webkit-user-drag: none; }
.pv-note { margin: 0; color: var(--ink-2); font-size: var(--t-sm); text-align: center; }
@media print {
  .pv, .viewer .stage { display: none !important; }
  .viewer::after, .linkpage main::after { content: "This file is in protected view and cannot be printed."; display: block; padding: 2rem; font-size: 1rem; }
}

/* Sign-ins */
.signins .tr { grid-template-columns: minmax(0, 1.3fr) 150px 130px minmax(0, 1fr) minmax(0, 1.6fr) auto; }
.signins small { display: block; color: var(--ink-3); font-size: var(--t-xs); }
.signins b.stop { color: var(--stop); }

/* List or grid: two quiet buttons in one small control, the height of the buttons beside it. */
.viewpick { display: inline-flex; gap: 2px; height: 36px; padding: 2px; border: 1px solid var(--line); border-radius: var(--r-control); background: var(--paper-2); }
.viewpick button { display: grid; place-items: center; width: 30px; height: 30px; padding: 0; border: 0; border-radius: 4px; background: transparent; color: var(--ink-3); cursor: pointer; }
.viewpick button:hover { color: var(--ink); }
.viewpick [aria-pressed="true"] { background: var(--raised); color: var(--ink); box-shadow: 0 0 0 1px var(--line-strong); }
.viewpick .ic { width: 16px; height: 16px; }

/* An icon-only button, and the close button of the side panel. */
.btn-icon { width: 36px; padding: 0; }
.btn-icon .ic { width: 18px; height: 18px; }
.btn[aria-pressed="true"] { background: var(--paper-3); }
.side-x { position: absolute; top: var(--s3); right: var(--s3); }
.side > h2:first-of-type { padding-right: 36px; }

/* The folder's own filter: a button that opens a small field in the head. */
.head-body { display: contents; }
.ffilter { display: inline-flex; }
.ffield { width: 220px; height: 36px; font-size: var(--t-sm); }
