/* The designer of a face (designer.js): the toolbox, the page, the properties. Its lines, captions and small
   buttons are the frame's own (the tree's lines, the captions of a menu, the choices in Themes); the components on
   the page are UBUI's (ubui.css) and are not drawn here. */
.z { height: 100%; min-height: 460px; display: grid; grid-template-columns: 264px minmax(320px, 1fr) 288px; background: var(--ground); }
.z[data-props="off"] { grid-template-columns: 264px minmax(320px, 1fr) 40px; }
.z-cap { margin: 0; font: 500 10.5px/1.2 var(--f-ui); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); }

/* the toolbox: sections that fold, as the tree's folders do */
.z-tools { min-height: 0; overflow: auto; padding: 8px 8px 24px; border-right: 1px solid var(--rule); background: var(--sheet); }
.z-tools .z-cap { padding: 16px 8px 6px; }
/* its two tabs, lit by a line under the one in front */
.z-tabs { position: sticky; top: -8px; z-index: 1; display: flex; gap: 2px; margin: -8px -8px 8px; padding: 4px 8px 0; border-bottom: 1px solid var(--rule); background: var(--sheet); }
.z-tabs button { flex: 0 1 auto; min-width: 0; padding: 7px 8px 6px; border: 0; border-bottom: 2px solid transparent; background: none; color: var(--ink-2); font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.z-tabs button:hover { color: var(--ink); }
.z-tabs button[aria-selected="true"] { border-bottom-color: var(--accent); color: var(--ink); }
.z-fold { display: flex; align-items: center; gap: 8px; width: 100%; padding: 5px 8px; border: 0; border-radius: 7px; background: none; color: var(--ink-2); font-size: 12.5px; font-weight: 600; text-align: left; cursor: pointer; }
.z-fold:hover { background: var(--sunk); }
.z-fold .chev { flex: none; display: grid; width: 10px; height: 10px; color: var(--ink-3); transition: transform .15s; }
.z-fold .chev svg { width: 10px; height: 10px; }
.z-fold[aria-expanded="true"] .chev { transform: rotate(90deg); }
.z-fold .t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.z-fold .c { flex: none; color: var(--ink-3); font-size: 11.5px; font-weight: 400; }
.z-list { display: grid; gap: 1px; padding: 0 0 6px 18px; }
.z-sec.sub > .z-fold { padding: 3px 8px; font-size: 11.5px; }
.z-sec.sub > .z-list { padding-bottom: 2px; }
.z-cat { margin: 0; padding: 3px 8px 3px 26px; font-size: 11.5px; line-height: 1.35; color: var(--ink-3); }
.z-sec.flat .z-cat { padding-left: 8px; }
.z-item { display: flex; align-items: baseline; gap: 8px; width: 100%; min-width: 0; padding: 4px 8px; border: 0; border-radius: 7px; background: none; color: var(--ink); font-size: 12.5px; text-align: left; cursor: grab; }
.z-item:hover { background: var(--sunk); }
.z-item .t { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.z-item .code { flex: 0 20 auto; min-width: 28px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; color: var(--ink-3); }   /* the note gives way to the name */
.z-item.off { color: var(--ink-3); cursor: default; }
.z-dot { flex: none; align-self: center; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }

/* the middle: a strip of choices, and under it the page on the desk's ground */
.z-mid { min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.z-strip { flex: none; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 22px; padding: 8px 14px; border-bottom: 1px solid var(--rule); background: var(--sheet); }
.z-opts { display: flex; flex-wrap: wrap; gap: 4px; }
.z-opts button { padding: 2px 10px; border: 1px solid var(--rule-2); border-radius: 999px; background: none; color: var(--ink-2); font-size: 12.5px; cursor: pointer; }
.z-opts button:hover { border-color: var(--ink-3); }
.z-opts button[aria-pressed="true"] { border-color: var(--accent-fill); background: var(--accent-fill); color: var(--on-accent); }
.z-opts button:disabled { opacity: .45; cursor: default; border-color: var(--rule-2); }
/* where the face stands on the server, beside Save and Publish; and the server's own words when it refuses */
.z-keep { align-items: center; }
.z-state { margin-left: 4px; color: var(--ink-2); font-size: 12px; }
.z-state[data-state="published"] { color: var(--ok); }
.z-refused { flex: 1 0 100%; color: var(--due); font-size: 12px; text-align: center; }
.z-doc { flex: 1 0 100%; display: flex; justify-content: center; align-items: baseline; gap: 12px; color: var(--ink-2); font-size: 12px; }
.z-stage { flex: 1 1 0; min-height: 0; overflow: auto; padding: 22px; }

/* the page: a sheet on the desk's ground, the face's own (face.css). How its parts fill a line and wrap is UBUI's
   flow (ubui.css), the same a section has; here is only what the designer adds: room to drop on while the page is
   empty, and to a part the lines that say it is chosen */
.z-page { min-height: 240px; }
.z-stage[data-size="phone"] .z-page { max-width: 390px; padding: 16px; }
.z-part { border-radius: 8px; outline: 1px dashed transparent; outline-offset: 5px; }
.z-page[data-mode="design"] .z-part { cursor: pointer; }
.z-page[data-mode="design"] .z-part:hover:not(:has(.z-part:hover)), .z-page[data-mode="design"] .z-part.unbound { outline-color: var(--rule-2); }   /* the innermost part under the pointer */
.z-page[data-mode="design"] .z-part.on { outline: 2px solid var(--accent); }
.z-page[data-mode="design"] .z-part.hid { opacity: .4; outline-color: var(--rule-2); }   /* its visibility hides it now */
.z-page[data-mode="design"] .z-part.take { outline: 2px solid var(--accent); background: color-mix(in srgb, var(--accent-fill) 16%, transparent); }   /* it will take what is carried */
.z-mark { position: absolute; width: 3px; border-radius: 2px; background: var(--accent); pointer-events: none; }
.z-none { max-width: 300px; margin: auto; color: var(--ink-2); font-size: 13px; text-align: center; }
.u-sec .z-none, .u-tabs .z-none { padding: 12px 0; }   /* a section or a tab that holds nothing yet says where to drop */
.z-note { width: 100%; margin: 0; color: var(--ink-2); font-size: 12px; }
.z-text { width: 100%; margin: 0; color: var(--ink); font-size: 12.5px; line-height: 1.6; white-space: pre-wrap; }

/* the properties */
.z-props { min-height: 0; overflow: auto; display: grid; gap: 12px; align-content: start; padding: 14px 14px 24px; border-left: 1px solid var(--rule); background: var(--sheet); }
.z[data-props="off"] .z-props { justify-items: center; padding: 10px 6px; }
.z-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.z-icon { flex: none; display: grid; place-items: center; width: 26px; height: 26px; padding: 0; border: 0; border-radius: 6px; background: none; color: var(--ink-2); cursor: pointer; }
.z-icon:hover { background: var(--sunk); color: var(--ink); }
.z-icon svg { width: 18px; height: 18px; }
.z-icon:disabled { opacity: .35; cursor: default; background: none; }
.z-del svg { width: 16px; height: 16px; color: var(--due); }
.z-line { display: flex; align-items: center; gap: 4px; }   /* a tab's title, and the bin that takes the tab off; a state, and its tone */
.z-line > .z-small { flex: 1 1 0; min-width: 0; }
.z-line > .z-select { flex: 0 0 118px; width: auto; }
textarea.z-input { display: block; resize: vertical; line-height: 1.45; }
.z-name { margin: 0; font: 600 15px/1.3 var(--f-ui); overflow-wrap: anywhere; }
.z-row { display: grid; gap: 4px; }
.z-row > span { font-size: 12.5px; color: var(--ink-2); }
.z-select { width: 100%; padding: 5px 8px; border: 1px solid var(--rule-2); border-radius: 8px; background: var(--doc); color: var(--ink); font: inherit; font-size: 13px; }
.z-select:hover { border-color: var(--ink-3); }
.z-row-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12.5px; color: var(--ink-2); }
.z-input { width: 100%; padding: 5px 8px; border: 1px solid var(--rule-2); border-radius: 8px; background: var(--doc); color: var(--ink); font: inherit; font-size: 13px; }
.z-input:hover { border-color: var(--ink-3); }
.z-input:disabled { opacity: .45; }
.z-input::placeholder { color: var(--ink-2); }
/* the switch beside a word is UBUI's own switch, set small for this panel */
.z-props .u-inline { padding-top: 0; }
.z-props .u-pick { gap: 6px; min-height: 0; }
.z-props .u-pick-t { font-size: 11.5px; color: var(--ink-2); }
/* and smaller than on a page (the owner, 2026-11-22: "They are not main screen switches") */
.z-props .u-switch { width: 24px; height: 14px; }
.z-props .u-switch::after { top: 2px; left: 2px; width: 8px; height: 8px; }
.z-props .u-switch:checked::after { transform: translateX(10px); }
/* "New query" (docs/adr/0011): the line that opens it under the queries of the class; in its panel, the columns are
   UBUI's own checks, set small as the switches are, and the formula Studio writes is shown as it will stand */
.z-newq { margin: 2px 8px 6px; }
.z-props .u-check { width: 14px; height: 14px; border-radius: 4px; }
.z-props .u-check:checked::after { width: 7px; height: 4px; }
.z-qcode { margin: 0; padding: 6px 8px; border-radius: 8px; background: var(--sunk); font-size: 11.5px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.z-qcode:empty { display: none; }
.z-props .z-refused { text-align: left; }
/* Visibility's place: a yes/no variable is chosen in it or dropped on it */
.z-drop { display: grid; gap: 4px; padding: 6px; border: 1px dashed var(--rule-2); border-radius: 10px; }
.z-drop.take { border-color: var(--accent); background: color-mix(in srgb, var(--accent-fill) 16%, transparent); }
.z-off { display: inline-flex; align-items: center; gap: 6px; }
.z-off svg { width: 16px; height: 16px; color: var(--due); }
.z-dl { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 12px; margin: 0; font-size: 12.5px; }
.z-dl dt { color: var(--ink-2); }
.z-dl dd { margin: 0; overflow-wrap: anywhere; }
.z-small { margin: 0; color: var(--ink-2); font-size: 12px; }
.z-quiet { justify-self: start; padding: 0; border: 0; background: none; color: var(--ink-2); font-size: 12.5px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.z-quiet:hover { color: var(--ink); }
a.z-quiet { display: inline-block; }
.z-props .btn { justify-self: start; font-size: 12.5px; }
