/* Procedūras — the playbooks app (playbooks.js). The desk shape of the records apps (toolbar + strip on top, the list lane and
   the open item beside it, the shared rail to the right) with the desk's own places; the shared pieces are packages/ui/desk.css.
   Narrow widths follow the app's own column (a container), not the viewport. Four meanings only: plum the one primary action,
   sage done, peach needs a person, cream a question or a wait; red ink only for "irreversible" and "no written rule". */
.page--data:has(.pw) { padding: 14px 18px 40px; }
.pw { container: pw dk / inline-size; display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.pw-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.pw-title { display: flex; align-items: baseline; gap: 10px; min-width: 0; margin-right: 4px; }
.pw-title h2 { margin: 0; font: 700 22px/1.1 var(--bc-display); letter-spacing: -.01em; }
.pw-title > span { font-size: 14px; color: var(--bc-ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pw-up { align-self: center; padding: 6px 10px; border: 0; border-radius: 10px; background: rgba(31, 16, 38, .05); font: 600 13px/1 var(--bc-text); color: var(--bc-ink-2); cursor: pointer; }
.pw-segs { flex: 0 1 auto; overflow-x: auto; scrollbar-width: none; }
.pw-segs::-webkit-scrollbar { display: none; }
.pw-search { flex: 1 1 160px; max-width: 240px; }
.pw-new { position: relative; margin-left: auto; }
.pw-new .bc-btn { white-space: nowrap; }
.pw-new-m { left: auto; right: 0; min-width: 250px; }
.pw-new-m .bc-icon, .pw-more-m .bc-icon { width: 16px; height: 16px; color: var(--bc-plum); }
.pw-more { position: relative; display: inline-block; }
.pw-more-m { left: auto; right: 0; min-width: 230px; }
.pw-mi { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 10px; font: 500 14px/1.2 var(--bc-text); color: var(--bc-ink); text-decoration: none; }
.pw-mi:hover { background: var(--bc-plum-tint); }
.pw-strip.is-stale, .pw-rows.is-busy { opacity: .55; }

/* the desk: list lane · open item */
.pw-desk { display: grid; grid-template-columns: minmax(320px, 420px) minmax(0, 1fr); gap: 16px; align-items: start; }
.pw--table .pw-desk { grid-template-columns: minmax(0, 1fr); }
.pw-lane { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; align-content: start; }
.pw-lane--list { overflow-x: clip; overflow-clip-margin: 6px; }
.pw-lane--det { container: pwdet / inline-size; position: sticky; top: calc(var(--pw-top, 0px) + 4px); max-height: calc(100vh - var(--pw-top, 0px) - 40px); overflow-y: auto; border-radius: 22px; scrollbar-width: thin; }
.pw-lh { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.pw-count { margin-left: auto; font-size: 12.5px; color: var(--bc-ink-3); white-space: nowrap; }
.pw-rows { display: grid; gap: 3px; }
.pw-row { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 10px; width: 100%; min-height: 60px; padding: 9px 12px; border: 0; border-radius: 14px; background: rgba(255, 255, 255, .82); text-align: left; font: inherit; color: inherit; cursor: pointer; }
.pw-row:hover { background: #fff; }
.pw-row.on { background: var(--bc-plum-tint); box-shadow: inset 0 0 0 1.5px #D8CBEA; }
.pw-row.is-grey { background: rgba(255, 255, 255, .5); }
.pw-row.is-grey .pw-ico { opacity: .7; }
.pw-row:focus-visible, .pw-tt:focus-visible, .pw-ci:focus-visible, .pw-rl-b:focus-visible { outline: 2px solid var(--bc-focus); outline-offset: 2px; }
.pw-ico { width: 40px; height: 40px; border-radius: 12px; object-fit: cover; background: #EFEAF6; }
.pw-glyph { display: grid; place-items: center; color: var(--bc-plum); }
.pw-glyph .bc-icon { width: 20px; height: 20px; }
.pw-row-b { min-width: 0; display: grid; gap: 3px; }
.pw-row-b b { font-size: 14.5px; font-weight: 600; line-height: 1.25; }
.pw-row-b b small { font-size: 12.5px; font-weight: 400; color: var(--bc-ink-3); margin-left: 4px; overflow-wrap: anywhere; }
.pw-row-b > small { font-size: 12.5px; line-height: 1.35; color: var(--bc-ink-2); }
.pw-row-r { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.pw-face { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 2px #fff; }
.pw-have { font-style: normal; color: var(--bc-sage); font-weight: 600; }
.pw-verify { font-style: normal; font-weight: 600; color: #7A5A16; }
.pw .da-day { margin: 12px 4px 4px; }
.pw-gh { display: flex; align-items: baseline; gap: 8px; }
.pw-gh small { font-weight: 500; color: var(--bc-ink-3); }
.pw-empty { display: grid; justify-items: center; gap: 10px; padding: 32px 16px; text-align: center; color: var(--bc-ink-3); }
.pw-empty p { margin: 0; max-width: 36ch; }
.pw-empty-art { width: 72px; height: 72px; border-radius: 20px; opacity: .9; }
.pw-row--due { grid-template-columns: 44px minmax(0, 1fr) auto; }
.pw-date { display: grid; place-items: center; align-content: center; width: 44px; height: 44px; border-radius: 12px; background: #F4EDDD; color: #6B4F12; }
.pw-date b { font: 700 17px/1 var(--bc-display); }
.pw-date small { font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }
.pw-filters { display: flex; flex-wrap: wrap; gap: 6px; }
.pw-f select { min-height: 34px; max-width: 100%; padding: 0 28px 0 10px; border: 0; border-radius: 10px; background: #fff; box-shadow: inset 0 0 0 1px rgba(31, 16, 38, .1); font: 500 13px/1 var(--bc-text); color: var(--bc-ink); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* "Gaida tevi": only what blocks work, at the top of the list */
.pw-card { display: grid; gap: 6px; padding: 12px; border-radius: 20px; background: #FBE7DC; }
.pw-card header { display: flex; justify-content: space-between; align-items: baseline; padding: 0 4px; }
.pw-card h3 { margin: 0; font: 700 14px/1 var(--bc-display); color: #9A4B22; }
.pw-card header span { font-size: 12.5px; font-weight: 600; color: #9A4B22; }
.pw-card > .dk-link { justify-self: start; color: #9A4B22; }
.pw-w { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 12px; background: rgba(255, 255, 255, .8); }
.pw-wl { display: grid; gap: 6px; }
.pw-wl .pw-w { background: #fff; box-shadow: 0 0 0 1px rgba(31, 16, 38, .05); }
.pw-w-ic { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 10px; background: #FBE7DC; color: #9A4B22; font-weight: 700; }
.pw-w-ic .bc-icon { width: 16px; height: 16px; }
.pw-w-b { min-width: 0; display: grid; gap: 2px; }
.pw-w-b b { font-size: 13.5px; font-weight: 600; line-height: 1.3; }
.pw-w-b small { font-size: 12.5px; line-height: 1.35; color: var(--bc-ink-2); }
.pw-w-go { min-height: 34px; padding: 7px 12px; border: 0; border-radius: 10px; background: #FBE7DC; font: 600 12.5px/1 var(--bc-text); color: #9A4B22; cursor: pointer; }
.pw-w--q { grid-template-columns: 30px minmax(0, 1fr); }
.pw-w--q .pw-w-opts { grid-column: 2; display: flex; flex-wrap: wrap; gap: 6px; }
.pw-w--q .pw-w-ic { background: #F4EDDD; color: #7A5A16; }
.pw-opt { min-height: 34px; padding: 6px 12px; border: 0; border-radius: 999px; background: #F4EDDD; font: 600 12.5px/1 var(--bc-text); color: #6B4F12; cursor: pointer; }
.pw-opt:hover { background: #EFE2C4; }

/* the setup block: what the law and the apps ask of this company */
.pw-setup { display: grid; gap: 4px; margin-top: 10px; padding: 14px; border-radius: 20px; background: #fff; box-shadow: 0 0 0 1px rgba(31, 16, 38, .06); }
.pw-setup header h3 { margin: 0; font: 700 15px/1.2 var(--bc-display); }
.pw-setup header p { margin: 4px 0 6px; font-size: 12.5px; line-height: 1.45; color: var(--bc-ink-2); }
.pw-setup .pw-row { background: var(--bc-canvas); }
.pw-setup-note { display: flex; gap: 8px; align-items: flex-start; margin: 4px 0; padding: 8px 10px; border-radius: 12px; background: var(--bc-sage-tint); font-size: 13px; line-height: 1.45; color: var(--bc-ink); }
.pw-setup-note.is-q { background: #F4EDDD; color: #6B4F12; }
.pw-setup-note .bc-icon { width: 16px; height: 16px; flex: none; margin-top: 2px; }
.pw-batch { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; margin: 6px 0; padding: 12px; border-radius: 14px; background: #FBE7DC; }
.pw-batch b { display: block; font-size: 14px; color: #6d3414; }
.pw-batch small { font-size: 12px; color: #9A4B22; }
.pw-plain { list-style: none; margin: 0; padding: 0 4px; display: grid; gap: 4px; font-size: 13px; line-height: 1.45; color: var(--bc-ink-2); }
.pw-plain .dk-link { padding: 0; }
.pw-kv li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 10px; align-items: baseline; padding: 6px 0; border-bottom: 1px solid var(--bc-line); }
.pw-kv li:last-child { border-bottom: 0; }
.pw-kv time { color: var(--bc-ink-3); font-variant-numeric: tabular-nums; }
.pw-kv b { font-variant-numeric: tabular-nums; white-space: nowrap; }
.pw-kv b.is-done { color: var(--bc-sage); }
.pw-kv b.is-was { color: #9A4B22; }

/* the table */
.pw-table { display: grid; gap: 2px; font-size: 13px; overflow-x: auto; padding-bottom: 4px; }
.pw-tt { display: grid; grid-template-columns: minmax(150px, 1fr) minmax(170px, 1.4fr) 90px 100px 90px 90px 90px minmax(150px, 1.2fr) 70px 80px 90px; gap: 8px; align-items: center; min-width: 1200px; min-height: 40px; padding: 6px 10px; border: 0; border-radius: 10px; background: rgba(255, 255, 255, .82); text-align: left; font: inherit; color: inherit; cursor: pointer; }
.pw-tt > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pw-tt:hover { background: #fff; }
.pw-tt.on { background: var(--bc-plum-tint); }
.pw-tt--h { min-height: 30px; background: none; cursor: default; font-size: 11.5px; font-weight: 600; color: var(--bc-ink-3); }

/* the open item */
.pw-det { display: grid; gap: 14px; padding: 16px 18px 20px; border-radius: 22px; background: #fff; box-shadow: 0 0 0 1px rgba(31, 16, 38, .06), 0 24px 50px -34px rgba(74, 29, 87, .45); }
.pw-det--empty { justify-items: center; align-content: center; min-height: 360px; text-align: center; color: var(--bc-ink-3); background: rgba(255, 255, 255, .6); box-shadow: 0 0 0 1px rgba(31, 16, 38, .05); }
.pw-det--empty p { margin: 0; max-width: 32ch; }
.pw-dh { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 14px; align-items: start; }
.pw-dh.sk, .pw-card2.sk { min-height: 64px; border-radius: 14px; background: linear-gradient(90deg, #F1EEF4, #FBFAFC, #F1EEF4); background-size: 200% 100%; animation: dk-sk 1.2s linear infinite; box-shadow: none; }
.pw-card2.sk { min-height: 120px; }
.pw-dh .pw-back { grid-column: 1 / -1; }
.pw-dh-t { display: flex; gap: 12px; align-items: flex-start; min-width: 0; }
.pw-dh-ic { width: 52px; height: 52px; flex: none; border-radius: 16px; object-fit: cover; background: #EFEAF6; }
.pw-dh-t h3 { margin: 0; font: 700 20px/1.2 var(--bc-display); overflow-wrap: anywhere; }
.pw-dh-t > div { min-width: 0; }
.pw-id { font: 500 13px/1 var(--bc-text); color: var(--bc-ink-3); }
.pw-dh-m { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 6px 0 0; font-size: 12.5px; line-height: 1.45; color: var(--bc-ink-2); }
.pw-dh-a { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 6px; }
.pw-dh-a .pw-primary { background: rgba(74, 29, 87, .12) !important; color: var(--bc-plum) !important; }
.pw-dh-a .pw-refuse, .pw-refuse { color: #a3223b !important; background: rgba(214, 69, 95, .08) !important; }
.pw-spent { display: grid; justify-items: end; margin-right: 6px; }
.pw-spent small { font-size: 11.5px; color: var(--bc-ink-3); }
.pw-spent b { font: 700 16px/1.1 var(--bc-display); font-variant-numeric: tabular-nums; }
.pw-back { display: inline-flex; align-items: center; gap: 6px; justify-self: start; padding: 6px 10px 6px 6px; border: 0; border-radius: 10px; background: rgba(31, 16, 38, .05); font: 600 13px/1 var(--bc-text); color: var(--bc-ink-2); cursor: pointer; }
.pw-back .bc-icon { width: 15px; height: 15px; }
.pw-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(290px, 380px); gap: 18px; align-items: start; }
.pw-left { display: grid; gap: 12px; min-width: 0; }
.pw-sum { margin: 0; font-size: 14.5px; line-height: 1.5; color: var(--bc-ink); }
.pw-trig { display: flex; gap: 8px; align-items: flex-start; margin: 0; padding: 10px 12px; border-radius: 14px; background: var(--bc-canvas); font-size: 13px; line-height: 1.45; color: var(--bc-ink-2); }
.pw-trig .bc-icon { width: 15px; height: 15px; flex: none; margin-top: 2px; color: var(--bc-plum); }
.pw-note { margin: 0; font-size: 12.5px; line-height: 1.45; color: var(--bc-ink-3); }
.pw-lead { padding: 10px 12px; border-radius: 12px; background: var(--bc-canvas); }
.pw-no { margin: 0; font-size: 13px; font-weight: 600; color: #a3223b; }
.pw-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }

/* the steps as a timeline: stones on a line */
.pw-tl { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.pw-st { position: relative; display: grid; grid-template-columns: 38px minmax(0, 1fr); gap: 12px; padding-bottom: 16px; }
.pw-st::before { content: ""; position: absolute; left: 18px; top: 36px; bottom: 0; width: 2px; background: #E6E0EE; }
.pw-st:last-child::before { display: none; }
.pw-stone { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: #fff; box-shadow: inset 0 0 0 2px #DCD2EA; font: 700 12px/1 var(--bc-display); color: var(--bc-plum); z-index: 1; }
.pw-stone .bc-icon { width: 16px; height: 16px; }
.pw-st.is-d .pw-stone { background: var(--bc-sage-tint); box-shadow: none; color: var(--bc-sage); }
.pw-st.is-c .pw-stone { box-shadow: inset 0 0 0 3px var(--bc-plum); }
.pw-st.is-w .pw-stone { background: #FBE7DC; box-shadow: none; color: #9A4B22; }
.pw-st-b { min-width: 0; display: grid; gap: 4px; padding-top: 2px; }
.pw-st-h { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; margin: 0; }
.pw-st-h b { font-size: 14.5px; font-weight: 600; line-height: 1.3; }
.pw-st-h small { font-size: 12px; color: var(--bc-ink-3); }
.pw-who { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: #EFEAF6; color: var(--bc-plum); flex: none; overflow: hidden; }
.pw-who .bc-icon { width: 13px; height: 13px; }
.pw-who--p { background: #FBE7DC; color: #9A4B22; }
.pw-who--both { width: auto; padding: 0 3px; gap: 1px; grid-auto-flow: column; border-radius: 999px; }
.pw-who-f { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; }
.pw-who--both .pw-who-f { width: 18px; height: 18px; }
.pw-st-d { margin: 0; font-size: 13px; line-height: 1.45; color: var(--bc-ink-2); }
.pw-st-d em { font-style: normal; font-weight: 600; color: var(--bc-ink-3); }
.pw-rib { display: flex; flex-wrap: wrap; gap: 4px; margin: 2px 0 0; }
.pw-rib:empty { display: none; }
.pw-r { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border: 0; border-radius: 999px; background: #EEECF1; font: 600 11.5px/1.2 var(--bc-text); color: var(--bc-ink-2); }
.pw-r--ap { background: #EFEAF6; color: var(--bc-plum); }
.pw-r--irr { background: rgba(214, 69, 95, .1); color: #a3223b; }
.pw-r--vf { background: #F4EDDD; color: #7A5A16; }
.pw-r--use { cursor: pointer; background: var(--bc-canvas); color: var(--bc-plum); text-decoration: underline; text-decoration-color: rgba(74, 29, 87, .25); text-underline-offset: 2px; }
.pw-about { border-radius: 14px; background: var(--bc-canvas); padding: 10px 12px; font-size: 13px; line-height: 1.5; color: var(--bc-ink-2); }
.pw-about summary { cursor: pointer; font-weight: 600; color: var(--bc-ink); }
.pw-about ul { margin: 6px 0 0; padding-left: 18px; }

/* the cards on the right */
.pw-cards { container: pwcards / inline-size; display: grid; gap: 12px; min-width: 0; }
.pw-card2 { display: grid; gap: 10px; padding: 14px 16px; border-radius: 20px; background: #fff; box-shadow: 0 1px 0 rgba(255, 255, 255, .9) inset, 0 10px 24px -14px rgba(31, 16, 38, .28), 0 1px 2px rgba(31, 16, 38, .06), 0 0 0 1px rgba(31, 16, 38, .04); min-width: 0; }
.pw-card2 h4 { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0; font: 700 13px/1.2 var(--bc-display); color: var(--bc-ink-2); }
.pw-card2 h4 small { font-weight: 500; color: var(--bc-ink-3); }
.pw-card2 > p { margin: 0; font-size: 13.5px; line-height: 1.5; }
.pw-card2--no { background: #FFF6F7; box-shadow: inset 0 0 0 1px rgba(214, 69, 95, .18); }
.pw-why { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; font-size: 13px; line-height: 1.45; }
.pw-why li { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px; align-items: start; }
.pw-why li > .bc-icon { width: 15px; height: 15px; margin-top: 2px; color: var(--bc-plum); }
.pw-why-a > .bc-icon { color: var(--bc-sage) !important; }
.pw-why-no > .bc-icon { color: var(--bc-ink-3) !important; }
.pw-why-r { grid-template-columns: minmax(0, 1fr) !important; }
.pw-why-q { color: #6B4F12; }
.pw-why span small { display: block; margin-top: 4px; font-size: 12px; color: var(--bc-ink-3); }
.pw-facts { display: flex !important; flex-wrap: wrap; gap: 4px; }
.pw-facts i { font-style: normal; padding: 2px 8px; border-radius: 999px; background: var(--bc-sage-tint); color: var(--bc-sage); font-weight: 600; }
.pw-basis { font-size: 11.5px !important; }
.pw-ex { display: grid; gap: 2px; font-size: 13px; }
.pw-ex-h, .pw-ex-r { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1fr); gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--bc-line); }
.pw-ex-h { padding-top: 0; font-size: 11.5px; font-weight: 600; color: var(--bc-ink-3); }
.pw-ex-h i, .pw-ex-r i { font-style: normal; }
.pw-ex-r:last-child { border-bottom: 0; }
.pw-dl, .pw-vl, .pw-rl, .pw-sl, .pw-jl, .pw-links, .pw-ag { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 13px; }
.pw-dl li { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 2px 10px; }
.pw-dl time { color: var(--bc-ink-3); font-variant-numeric: tabular-nums; }
.pw-dl li > small { grid-column: 2; font-size: 12px; color: var(--bc-ink-2); }
.pw-dl span small { display: block; font-size: 11.5px; color: var(--bc-ink-3); }
.pw-vl li { display: grid; gap: 3px; padding: 8px 10px; border-radius: 12px; background: var(--bc-canvas); }
.pw-vl li.is-old { opacity: .7; }
.pw-vl li.sk { min-height: 40px; }
.pw-vl small { font-size: 12px; color: var(--bc-ink-3); }
.pw-vl q { font-size: 12.5px; line-height: 1.45; color: var(--bc-ink-2); quotes: "„" "”"; }
.pw-vl .dk-link { justify-self: start; padding: 0; }
.pw-rl-b { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px; align-items: start; width: 100%; padding: 8px 10px; border: 0; border-radius: 12px; background: var(--bc-canvas); text-align: left; font: inherit; color: inherit; cursor: pointer; }
.pw-rl-b:hover { background: var(--bc-plum-tint); }
.pw-rl-b span { display: grid; gap: 2px; min-width: 0; }
.pw-rl-b small { font-size: 12px; color: var(--bc-ink-3); }
.pw-oc { color: var(--bc-ink-2) !important; }
.pw-sg { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px; padding: 8px 10px; border-radius: 12px; background: var(--bc-canvas); }
.pw-sg.is-rejected { opacity: .65; }
.pw-sg-k { align-self: start; padding: 3px 8px; border-radius: 999px; background: #FBE7DC; color: #9A4B22; font: 600 11px/1.2 var(--bc-text); white-space: nowrap; }
.pw-sg > div { display: grid; gap: 3px; min-width: 0; }
.pw-sg b { font-size: 13.5px; line-height: 1.35; }
.pw-sg small { font-size: 12px; line-height: 1.4; color: var(--bc-ink-3); }
.pw-sg .dk-link { padding: 0 4px 0 0; }

/* a run: the step log */
.pw-log { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.pw-lg { display: grid; gap: 6px; padding: 10px 12px; border-radius: 14px; background: var(--bc-canvas); border-left: 3px solid #E6E0EE; }
.pw-lg.is-done { border-left-color: var(--bc-sage); }
.pw-lg.is-blocked { border-left-color: #C9A227; }
.pw-lg.is-failed { border-left-color: #a3223b; }
.pw-lg.is-mine { border-left-color: #E8A07E; background: #FFF8F3; }
.pw-lg-h { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 2px 10px; align-items: center; }
.pw-lg-h > b { font: 700 13px/1 var(--bc-display); color: var(--bc-plum); }
.pw-lg-t { font-size: 14px; font-weight: 600; line-height: 1.3; }
.pw-lg-h > small { grid-column: 2; font-size: 12px; color: var(--bc-ink-3); }
.pw-lg-h > .pw-lg-why { grid-column: 2 / -1; color: var(--bc-ink-2); font-style: italic; }
.pw-lg-h > .dk-pill { grid-column: 3; grid-row: 1 / span 2; }
.pw-lg-h > .dk-pill { white-space: normal; max-width: 260px; }
@container pwdet (max-width: 560px) { .pw-lg-h { grid-template-columns: auto minmax(0, 1fr); } .pw-lg-h > .dk-pill { grid-column: 1 / -1; grid-row: auto; justify-self: start; max-width: 100%; } }
.pw-evr { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 8px; margin: 0; font-size: 12.5px; line-height: 1.45; color: var(--bc-ink-2); overflow-wrap: anywhere; }
.pw-evr small { display: block; color: var(--bc-ink-3); }
.pw-evr.is-held { color: #9A4B22; }
.pw-evk { align-self: start; justify-self: start; padding: 2px 7px; border-radius: 6px; background: #EFEAF6; color: var(--bc-plum); font: 600 11px/1.3 var(--bc-text); }
.pw-arch { display: flex !important; align-items: center; gap: 4px; margin-top: 2px; }
.pw-arch .bc-icon { width: 13px; height: 13px; }
.pw-acts--mine .pw-primary, .pw-acts--mine .pw-primary-on { min-height: 40px; }
.pw-primary-on { background: var(--bc-plum) !important; color: #fff !important; }
.pw-links li, .pw-jl li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px; align-items: baseline; padding: 5px 0; border-bottom: 1px solid var(--bc-line); }
.pw-jl time { color: var(--bc-ink-3); font-variant-numeric: tabular-nums; white-space: nowrap; }
.pw-jl b { font-variant-numeric: tabular-nums; color: var(--bc-ink-2); white-space: nowrap; }

/* the editor */
.pw-esl { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; min-width: 0; }
.pw-es { display: grid; gap: 8px; padding: 12px; border-radius: 16px; background: var(--bc-canvas); }
.pw-es-h { display: flex; justify-content: space-between; align-items: center; }
.pw-es-h b { font: 700 13px/1 var(--bc-display); color: var(--bc-plum); }
.pw-es-mv { display: flex; gap: 4px; }
.pw-es-mv button { width: 32px; height: 32px; border: 0; border-radius: 9px; background: #fff; font-size: 15px; cursor: pointer; color: var(--bc-ink-2); }
.pw-es-mv button:disabled { opacity: .35; cursor: default; }
.pw-es label, .pw-card2 label { display: grid; gap: 3px; font-size: 12px; color: var(--bc-ink-3); }
.pw-es input:not([type=checkbox]), .pw-es textarea, .pw-es select, .pw-card2 textarea, .pw-card2 select, .pw-exe select { width: 100%; min-width: 0; padding: 8px 10px; border: 1px solid var(--bc-line); border-radius: 10px; background: #fff; font: inherit; font-size: 13.5px; color: var(--bc-ink); }
.pw-es-g { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; align-items: end; }
.pw-es-irr { display: flex !important; align-items: center; gap: 6px; min-height: 38px; }
.pw-es-add { justify-self: start; padding: 0; }
.pw-exe { display: grid; gap: 6px; }
.pw-exe-r { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1fr) 32px; gap: 6px; }
.pw-exe-r button { border: 0; border-radius: 9px; background: var(--bc-canvas); cursor: pointer; }
.pw-exe .dk-link { justify-self: start; padding: 0; }
.pw-same { display: flex; align-items: center; gap: 6px; margin: 0; font-size: 13.5px; font-weight: 600; color: var(--bc-sage); }
.pw-same .bc-icon { width: 16px; height: 16px; }
.pw-diff { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: 13px; }
.pw-diff li { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 2px 8px; padding: 6px 8px; border-radius: 10px; }
.pw-diff li small { grid-column: 2; color: var(--bc-ink-3); }
.pw-diff .is-added, .pw-dc .is-added { background: var(--bc-sage-tint); }
.pw-diff .is-removed, .pw-dc .is-removed { background: #F3EFF5; text-decoration: line-through; color: var(--bc-ink-3); }
.pw-diff .is-changed span, .pw-dc .is-changed span { text-decoration: underline; text-decoration-color: var(--bc-plum); text-underline-offset: 3px; }
.pw-dcols { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pw-dcols h4 { margin: 0 0 6px; font: 700 13px/1.2 var(--bc-display); color: var(--bc-ink-2); }
.pw-dc { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: 13px; }
.pw-dc li { min-height: 36px; padding: 6px 8px; border-radius: 10px; background: var(--bc-canvas); }
.pw-dc small { display: block; font-size: 11.5px; color: var(--bc-plum); }

/* the calendar and the year */
.pw--page { gap: 16px; }
.pw-cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.pw-cal-wd { padding: 4px 6px; font-size: 11.5px; font-weight: 600; color: var(--bc-ink-3); }
.pw-cal-d { display: grid; align-content: start; gap: 4px; min-height: 92px; padding: 6px; border-radius: 12px; background: rgba(255, 255, 255, .8); font-size: 12px; }
.pw-cal-d > span { font-weight: 600; color: var(--bc-ink-3); }
.pw-cal-d.is-pad { background: none; }
.pw-cal-d.is-today { box-shadow: inset 0 0 0 2px var(--bc-plum); }
.pw-cal-d.has { background: #fff; }
.pw-ci { display: grid; gap: 2px; width: 100%; padding: 5px 7px; border: 0; border-radius: 8px; background: #F4EDDD; text-align: left; font: inherit; font-size: 11.5px; line-height: 1.3; color: #6B4F12; cursor: pointer; }
.pw-ci b { font-weight: 600; overflow-wrap: anywhere; }
.pw-ci small { color: inherit; opacity: .85; }
.pw-ci.is-done { background: var(--bc-sage-tint); color: var(--bc-sage); }
.pw-ci.is-was { background: #FBE7DC; color: #9A4B22; }
.pw-ci.is-running { background: #EFEAF6; color: var(--bc-plum); }
.pw-ag li { display: grid; grid-template-columns: 90px minmax(0, 1fr); gap: 10px; align-items: start; }
.pw-ag time { padding-top: 6px; color: var(--bc-ink-3); font-variant-numeric: tabular-nums; }
.pw-ag .pw-ci { font-size: 13px; padding: 8px 10px; }
.pw-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.pw-tile { display: grid; gap: 4px; padding: 14px 16px; border-radius: 18px; background: #fff; box-shadow: 0 0 0 1px rgba(31, 16, 38, .05); }
.pw-tile small { font-size: 12px; color: var(--bc-ink-3); }
.pw-tile b { font: 700 clamp(20px, 2.2vw, 26px)/1.1 var(--bc-display); font-variant-numeric: tabular-nums; }
.pw-cols { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.pw-bars { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 6px; align-items: end; height: 170px; }
.pw-bar-c { display: grid; grid-template-rows: auto 1fr auto; justify-items: center; gap: 4px; height: 100%; }
.pw-bar-c em { font-style: normal; font-size: 11px; color: var(--bc-ink-3); }
.pw-bar-c span { align-self: end; display: flex; flex-direction: column-reverse; width: 100%; max-width: 28px; min-height: 2px; border-radius: 6px 6px 2px 2px; overflow: hidden; background: #EEECF1; }
.pw-bar-c small { font-size: 11px; color: var(--bc-ink-3); }
.pw-legend { display: flex; flex-wrap: wrap; gap: 4px 12px; margin: 0; font-size: 12px; color: var(--bc-ink-2); }
.pw-legend span { display: inline-flex; align-items: center; gap: 5px; }
.pw-legend i { width: 8px; height: 8px; border-radius: 50%; }

/* narrower: the list shrinks, then the open item becomes its own screen */
@container pw (min-width: 1061px) { .pw-top { position: sticky; top: -14px; } }
@container pw (max-width: 1060px) { .pw-desk { grid-template-columns: minmax(280px, 360px) minmax(0, 1fr); } .pw-title > span, .pw-bar .dk-per-l small { display: none; } }
@container pwdet (max-width: 720px) { .pw-body { grid-template-columns: minmax(0, 1fr); } .pw-dh { grid-template-columns: minmax(0, 1fr); } .pw-dh-a { justify-content: flex-start; } .pw-dcols { grid-template-columns: minmax(0, 1fr); } }
@container pw (max-width: 900px) { .pw-cols { grid-template-columns: minmax(0, 1fr); } .pw-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } .pw-cal { display: none; } }
@container pw (max-width: 760px) { .pw-desk { grid-template-columns: minmax(0, 1fr); } .pw--open .pw-lane--det { position: static; max-height: none; overflow: visible; } .pw-lane--det:has(> .pw-det--empty) { display: none; } }

/* the phone: a + button and a bottom bar, only when the app's column is phone-narrow */
.pw-fab, .pw-pnav { display: none; }
@container pw (max-width: 700px) {
  .pw-fab { position: sticky; bottom: 84px; justify-self: end; margin: -56px 6px 0 0; z-index: 30; display: grid; place-items: center; width: 56px; height: 56px; border: 0; border-radius: 18px; background: var(--bc-plum); color: #fff; font: 600 28px/1 var(--bc-text); box-shadow: var(--bc-float); cursor: pointer; }
  .pw-pnav { position: sticky; bottom: 10px; z-index: 29; display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; padding: 6px; border-radius: 20px; background: rgba(255, 255, 255, .96); box-shadow: var(--bc-float); }
  .pw-pnav > button { display: grid; justify-items: center; gap: 3px; min-height: 48px; padding: 6px 2px; border: 0; border-radius: 14px; background: none; font: 600 11px/1.1 var(--bc-text); color: var(--bc-ink-2); cursor: pointer; }
  .pw-pnav > button.on { background: var(--bc-plum-tint); color: var(--bc-plum); }
  .pw-pnav .bc-icon { width: 20px; height: 20px; }
  .pw-pnav b { padding: 0 5px; border-radius: 999px; background: #FBE7DC; color: #9A4B22; }
  .pw-pnav-m { top: auto; bottom: calc(100% + 8px); left: auto; right: 0; }
  .pw--open .pw-fab, .pw--page .pw-fab { display: none; }
  .pw-lane--list { padding-bottom: 72px; }
  .pw-search { max-width: none; }
  .pw-row { min-height: 60px; }
  .pw-w-go, .pw-opt, .pw-es-mv button { min-height: 44px; min-width: 44px; }
  .pw-acts--mine { position: sticky; bottom: 76px; z-index: 5; padding: 8px; margin: 0 -8px; border-radius: 14px; background: rgba(255, 248, 243, .96); }
  .pw-acts--mine .bc-btn, .pw-acts--mine .dk-held { min-height: 44px; }
  .pw-det { padding: 14px 14px 18px; }
  .pw-es-g { grid-template-columns: 1fr 1fr; }
  .pw-strip .dk-pin { display: none; }   /* the calendar and the year live in the bottom bar's "Vairāk" on the phone */
  .pw .dk-chip, .pw .dk-seg button, .pw-f select { min-height: 44px; }
  .pw-exe-r { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) { .app.has-rail.rail-min:has(.pw-pnav) .rail { display: none; } }
@media (max-width: 820px) { .page--data:has(.pw) { padding: 10px 16px 24px; } .pw-top { top: -10px; margin: -10px -16px 0; padding: 10px 16px 10px; } }
@container pwcards (max-width: 340px) { .pw-ex-h, .pw-ex-r { grid-template-columns: minmax(0, 1fr) minmax(0, .8fr) minmax(0, .8fr); } }
