/* wepanel.css - Workstation (knackly.si/app): the side panel on every view, the Vault (the home), Workspace, Preferences
   and Trusted people beside it, with their dialogs. The owner-approved mockups (2026-11-06): the Vault's cards inside the
   side-panel shell. Task chats, Teams, shared tasks, uploads and the live browser view were removed (owner, 2026-11-12).

   The same system as the rest of knackly.si, without the marketing page's section machinery: the palette and dark mode
   come from theme.css (linked after this file), the faces Host Grotesk and JetBrains Mono, the radius family 8/12/20
   (controls / panels / cards), 44px buttons (36 small), 48px fields with 13px labels. One button pair: the filled
   orange primary (the view's main action: Save, Continue) and the outlined secondary; small text actions
   (Edit, Copy, Delete) are text links. Cyan marks state (a selected row, a switch that is on). */

:root {
  --bg: var(--p-bg); --surface: var(--p-surface); --ink: var(--p-ink); --muted: var(--p-muted);
  --accent: var(--p-accent); --action: var(--p-action); --action-ink: var(--p-action-ink);
  --line: color-mix(in oklab, var(--ink) 11%, transparent); --line-strong: color-mix(in oklab, var(--ink) 20%, transparent);
  --r-sm: 8px; --r-md: 12px; --r-lg: 20px; --r-btn: 8px; --btn-h: 44px; --btn-h-sm: 36px;
  --ease: cubic-bezier(.2, .8, .2, 1); --dur: 160ms;
  /* the side panel's names (kept from the first build), mapped onto the one palette */
  --ws-bg: var(--bg); --ws-ink: var(--ink); --ws-muted: var(--muted); --ws-accent: var(--accent); --ws-action: var(--action); --ws-action-ink: var(--action-ink);
  --ws-bad: var(--kp-bad); --ws-font: var(--font-text);
  --ws-line: var(--line); --ws-line-strong: var(--line-strong);
  --ws-pane: color-mix(in oklab, var(--ink) 2.5%, var(--bg)); --ws-sel: color-mix(in oklab, var(--ink) 6%, var(--bg));
}
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
body { font: 400 16px/1.5 var(--font-text); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
[hidden] { display: none !important; }
img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--font-display); font-weight: var(--display-weight); letter-spacing: -.02em; margin: 0; }
:focus-visible { outline: 2px solid var(--action); outline-offset: 2px; }
::selection { background: color-mix(in oklab, var(--accent) 30%, transparent); }

/* the shell: one screen, the side panel left, the view right */
/* the shell is pinned to the window, so it is exactly as tall as what the browser shows whatever its bars or zoom do
   (owner, 2026-11-06: at ~1280 wide the side panel's Sign out and the composer were cut off); inner areas scroll */
.wp-body { height: 100vh; height: 100dvh; overflow: hidden; }
.wp { position: fixed; inset: 0; display: grid; grid-template-columns: 248px minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); }
.brand { display: inline-flex; align-items: center; height: 40px; border-radius: 4px; }
.brand img { height: 40px; width: auto; }
.wp-top-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.wp-burger { display: none; flex-direction: column; justify-content: center; align-items: center; gap: 5px; width: 44px; height: 44px; padding: 0;
  border: 1px solid var(--line-strong); border-radius: var(--r-btn); background: transparent; cursor: pointer; }
.wp-burger span { display: block; width: 18px; height: 2px; border-radius: 2px; background: var(--ink); transition: transform var(--dur) var(--ease), opacity var(--dur) var(--ease); }
.wp-side.is-open .wp-burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.wp-side.is-open .wp-burger span:nth-child(2) { opacity: 0; }
.wp-side.is-open .wp-burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.ws-theme.kp-theme { width: 40px; height: 40px; }
.ws-theme svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* the loader while the session is checked: the mascot hops */
.kp-loader { position: fixed; inset: 0; display: grid; place-items: center; pointer-events: none; z-index: 50; }
.kp-loader svg { display: block; width: 96px; height: auto; }   /* the mascot's Hop (inline .km svg; motion in theme.css) */

/* Knack's avatar in the side panel's foot: the mascot's drawing, the dark-ground drawing in dark. Static. */
.ws-agent { position: relative; display: block; flex: none; width: 28px; height: 28px; background: transparent }   /* the mascot itself, never a disc (owner, 2026-11-06) */
.ws-agent::after { content: ""; position: absolute; inset: -4%; background: url("/assets/brand/knack-turn-mark.svg") center / contain no-repeat }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .ws-agent::after { background-image: url("/assets/brand/knack-turn-mark-dark.svg") } }
:root[data-theme="dark"] .ws-agent::after { background-image: url("/assets/brand/knack-turn-mark-dark.svg") }

/* the side panel: the mockup's rail, holding the whole menu */
.wp-side { position: relative; top: auto; z-index: 20; align-self: stretch; display: flex; flex-direction: column; gap: 20px; min-height: 0;
  margin: 0; padding: 22px 16px 16px; background: var(--ws-pane); color: var(--ws-ink); border-right: 1px solid var(--ws-line); overflow: auto }
.wp-top-row { padding: 0 8px }
.wp-side-menu { flex: 1; display: flex; flex-direction: column; gap: 14px; min-height: 0 }
.wp-side-menu svg { fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round }
.wp-nav { display: flex; flex-direction: column; gap: 2px }
/* the side panel's links scroll in a short window; the account foot stays at the bottom */
@media (min-width: 1024px) { .wp-side-menu > .wp-nav { flex: 0 1 auto; min-height: 0; overflow-y: auto; scrollbar-width: thin; margin-right: -6px; padding-right: 6px } }
.wp-nav a, .wp-nav > button { display: flex; align-items: center; gap: 10px; width: 100%; height: 40px; padding: 0 12px; border: 0; border-radius: 8px;
  background: transparent; color: var(--ws-muted); font: 400 15px var(--ws-font); text-align: left; text-decoration: none; cursor: pointer }
.wp-nav svg { width: 16px; height: 16px; flex: none }
.wp-nav em { margin-left: auto; font-style: normal; font-size: 13px; font-variant-numeric: tabular-nums }
.wp-nav a:hover, .wp-nav > button:hover, .wp-nav a.is-on, .wp-nav a[aria-current=page] { color: var(--ws-ink); background: var(--ws-sel); text-decoration: none }
.ws-foot { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: auto; padding: 14px 4px 0; border-top: 1px solid var(--ws-line) }
.ws-theme { display: inline-grid; place-items: center; width: 40px; height: 40px; flex: none; padding: 0; border-radius: 8px; border: 1px solid var(--ws-line-strong);
  background: transparent; color: var(--ws-ink); cursor: pointer }
.ws-theme:hover { border-color: color-mix(in oklab, var(--ws-ink) 48%, transparent) }
.ws-theme svg { width: 18px; height: 18px; stroke-width: 1.8 }
.ws-whoami { display: inline-flex; align-items: center; gap: 8px; min-width: 0; font-size: 13px; color: var(--ws-muted); white-space: nowrap }
.ws-whoami .ws-agent { width: 22px; height: 22px }
.ws-whoami:has(#me-ending:empty) { display: none }
.ws-signout { margin-left: auto; height: 36px; padding: 0 4px; border: 0; background: transparent; color: var(--ws-ink); font: 500 14px var(--ws-font); cursor: pointer;
  text-decoration: underline; text-decoration-color: var(--ws-line-strong); text-underline-offset: 4px }
.wp-me { display: none }

/* right of the side panel: the vault and settings scroll in it */
.wp-main { display: block; min-height: 0; min-width: 0; height: 100%; padding: 0; overflow: auto; overscroll-behavior: contain }

@media (max-width: 1279px) { .wp { grid-template-columns: 224px minmax(0, 1fr) } }
/* a phone or a narrow window: the side panel becomes a bar with the menu button, opening as a sheet */
@media (max-width: 759px) {
  .wp { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr) }
  .wp-side { flex-direction: row; align-items: center; height: 60px; padding: 0 12px 0 16px; overflow: visible; border-right: 0; border-bottom: 1px solid var(--ws-line) }
  .wp-top-row { flex: 1; padding: 0 }
  .wp-burger { display: flex; width: 44px; height: 44px; margin-right: 0; border: 1px solid var(--ws-line-strong); border-radius: 8px }
  .wp-burger span { width: 18px; background: var(--ws-ink) }
  .wp-side-menu { display: none; position: fixed; top: 60px; left: 0; right: 0; bottom: 0; z-index: 30; padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
    background: var(--ws-pane); overflow: auto }
  .wp-side.is-open .wp-side-menu { display: flex }
  .wp-nav a, .wp-nav > button { height: 48px; font-size: 17px }
  .wp-main > .wp-page { padding: 24px 16px 56px }
}

/* ---------------------------------------------------------------- the Vault, Workspace and Preferences
   The mockup's Vault: a head (the view's name, one line, its action), then cards on a 7 + 5 grid. */
.wp-page { padding: 48px clamp(20px, 4vw, 56px) 72px; max-width: 1240px; }
.wp-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: 32px; }
.wp-head h1 { margin: 0 0 8px; font-size: clamp(32px, 1.6vw + 18px, 44px); line-height: 1.08; letter-spacing: -.035em; }
.wp-head p { margin: 0; max-width: 56ch; font-size: 18px; line-height: 1.5; color: var(--ink); }
.wp-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 24px; align-items: start; }
.wp-span-7 { grid-column: span 7; } .wp-span-5 { grid-column: span 5; } .wp-span-12 { grid-column: 1 / -1; }
.wp-stack { display: grid; gap: 24px; }
@media (max-width: 1199px) { .wp-grid > * { grid-column: 1 / -1; } }
.wp-card { background: var(--kp-elev); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 24px 28px 12px; min-width: 0; }
.wp-section > header { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 40px; margin-bottom: 4px; }
.wp-section h2 { font-size: 24px; line-height: 1.2; letter-spacing: -.025em; }
.wp-section h2 span { font-family: var(--font-text); font-size: 16px; letter-spacing: 0; color: var(--muted); }
.wp-sub { margin: 6px 0 0; font-size: 14px; line-height: 1.55; color: var(--muted); max-width: 64ch; }
.wp-section-lede { margin: 0 0 8px; }
.wp-note { margin: 24px 0 0; max-width: 64ch; font-size: 14px; line-height: 1.6; color: var(--muted); }
.wp-empty { margin: 0; padding: 16px 0 14px; font-size: 15px; color: var(--muted); }
.wp-collapsible > header { align-items: flex-start; }
.wp-collapsible { padding-bottom: 20px; }
.wp-collapsible:has(#list-agent:not([hidden])) { padding-bottom: 12px; }

/* the rows: a 36px tile (the site's own icon, else a drawn glyph), the name and its line, the row's action */
.wp-list { list-style: none; margin: 0; padding: 0; }
.wp-list > li { display: flex; align-items: center; gap: 16px; min-height: 64px; padding: 14px 0; border-top: 1px solid var(--line); }
.wp-list > li:first-child { border-top: 0; }
.wp-list > li > .wp-item { flex: 1; }
.wp-item { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.wp-item b { font-weight: 500; font-size: 16px; line-height: 1.35; overflow-wrap: anywhere; }
.wp-item small { font-size: 14px; line-height: 1.45; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wp-item small.wp-wrap { white-space: normal; }
.wp-site { align-self: flex-start; margin: 2px 0; padding: 2px 8px; border-radius: 6px; background: color-mix(in oklab, var(--ink) 6%, var(--kp-elev)); font: 400 13px/1.5 var(--font-mono); color: var(--ink); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wp-item-logo { width: 36px; height: 36px; flex: none; padding: 6px; border-radius: 9px; object-fit: contain; background: #ffffff; box-shadow: inset 0 0 0 1px var(--line); }
#list-logins > li::before, #list-agent > li::before, #list-cards > li::before, #list-personal > li::before, #list-contact > li::before {
  content: ""; flex: none; width: 36px; height: 36px; border-radius: 9px; background-color: color-mix(in oklab, var(--ink) 6%, var(--kp-elev));
  background-image: var(--glyph); background-repeat: no-repeat; background-position: center; background-size: 18px; }
#list-logins > li:has(> .wp-item-logo:not([hidden]))::before, #list-agent > li:has(> .wp-item-logo:not([hidden]))::before { display: none; }
#list-logins, #list-agent { --glyph: var(--g-globe); } #list-cards { --glyph: var(--g-card); } #list-personal { --glyph: var(--g-pin); } #list-contact { --glyph: var(--g-chat); } #list-contact > li:nth-child(2) { --glyph: var(--g-mail); }
:root {
  --g-globe: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230c1114' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M12 2a14.5 14.5 0 0 0 0 20a14.5 14.5 0 0 0 0-20M2 12h20'/%3E%3C/svg%3E");
  --g-card: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230c1114' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2' y='5' width='20' height='14' rx='2'/%3E%3Cpath d='M2 10h20'/%3E%3C/svg%3E");
  --g-pin: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230c1114' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 10c0 6-8 12-8 12s-8-6-8-12a8 8 0 0 1 16 0z'/%3E%3Ccircle cx='12' cy='10' r='3'/%3E%3C/svg%3E");
  --g-mail: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230c1114' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='14' rx='2'/%3E%3Cpath d='m3 7 9 6 9-6'/%3E%3C/svg%3E");
  --g-chat: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230c1114' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z'/%3E%3C/svg%3E");
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --g-globe: var(--g-globe-d); --g-card: var(--g-card-d); --g-pin: var(--g-pin-d); --g-chat: var(--g-chat-d); --g-mail: var(--g-mail-d); } }
:root[data-theme="dark"] { --g-globe: var(--g-globe-d); --g-card: var(--g-card-d); --g-pin: var(--g-pin-d); --g-chat: var(--g-chat-d); --g-mail: var(--g-mail-d); }
:root {
  --g-globe-d: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f2f4f5' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M12 2a14.5 14.5 0 0 0 0 20a14.5 14.5 0 0 0 0-20M2 12h20'/%3E%3C/svg%3E");
  --g-card-d: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f2f4f5' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2' y='5' width='20' height='14' rx='2'/%3E%3Cpath d='M2 10h20'/%3E%3C/svg%3E");
  --g-pin-d: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f2f4f5' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 10c0 6-8 12-8 12s-8-6-8-12a8 8 0 0 1 16 0z'/%3E%3Ccircle cx='12' cy='10' r='3'/%3E%3C/svg%3E");
  --g-mail-d: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f2f4f5' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='14' rx='2'/%3E%3Cpath d='m3 7 9 6 9-6'/%3E%3C/svg%3E");
  --g-chat-d: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f2f4f5' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z'/%3E%3C/svg%3E");
}

/* text actions (Edit, Copy, Delete, Add, Revoke link): one link look, the system's faint underline */
.link { flex: none; padding: 4px 0; border: 0; background: none; font: 500 14px/1.4 var(--font-text); color: var(--ink); cursor: pointer; white-space: nowrap;
  text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 4px; transition: text-decoration-color var(--dur) var(--ease); }
.link:hover { text-decoration-color: currentColor; }
a.link { display: inline-block; }
.wp-danger { color: var(--kp-bad); text-decoration-color: color-mix(in oklab, var(--kp-bad) 45%, transparent); }

/* the one button pair */
.wp-btn, .wp-btn-ghost { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: var(--btn-h); padding: 0 20px; border-radius: var(--r-btn);
  font: 500 16px/1 var(--font-text); white-space: nowrap; cursor: pointer; border: 1px solid transparent;
  transition: background-color var(--dur) var(--ease), border-color var(--dur) var(--ease), transform 90ms var(--ease); }
.wp-btn { background: var(--action); color: var(--action-ink); }
.wp-btn:hover { background: color-mix(in oklab, var(--action) 86%, var(--ink)); }
.wp-btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.wp-btn-ghost:hover { border-color: color-mix(in oklab, var(--ink) 40%, transparent); background: color-mix(in oklab, var(--ink) 4%, transparent); }
.wp-btn-ghost svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.wp-btn:active, .wp-btn-ghost:active { transform: translateY(1px) scale(.985); }
.wp-btn-small { height: var(--btn-h-sm); padding: 0 14px; font-size: 14px; }
.wp-btn.is-busy, .wp-btn:disabled, .wp-btn-ghost:disabled, .wp-btn-ghost.is-busy { opacity: .5; cursor: default; }
.wp-btn-danger { background: var(--kp-bad); color: #ffffff; }
.wp-btn-danger:hover { background: color-mix(in oklab, var(--kp-bad) 85%, var(--ink)); }
:root[data-theme="dark"] .wp-btn-danger { color: #0c1114; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .wp-btn-danger { color: #0c1114; } }
/* the card heads' small square action (+ and the agent items' chevron) */
.wp-plus { display: inline-grid; place-items: center; width: 40px; height: 40px; flex: none; padding: 0; border-radius: var(--r-btn); border: 1px solid var(--line-strong);
  background: transparent; color: var(--ink); cursor: pointer; transition: border-color var(--dur) var(--ease); }
.wp-plus:hover { border-color: color-mix(in oklab, var(--ink) 40%, transparent); }
.wp-plus svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.wp-chevron svg { transition: transform var(--dur) var(--ease); }
.wp-chevron.is-open svg { transform: rotate(180deg); }
.wp-menu-wrap { position: relative; }
.wp-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 5; min-width: 180px; padding: 4px; border-radius: var(--r-md);
  background: var(--kp-elev); border: 1px solid var(--line-strong); box-shadow: 0 12px 32px rgb(0 0 0 / .14); }
.wp-menu button { display: block; width: 100%; padding: 10px 12px; border: 0; border-radius: var(--r-sm); background: none; text-align: left; font-size: 15px; cursor: pointer; }
.wp-menu button:hover { background: color-mix(in oklab, var(--ink) 6%, var(--kp-elev)); }

/* fields: 48px, labels above at 13px, the action colour and a soft ring on focus */
.wp-input { width: 100%; height: 48px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: var(--r-sm); background: var(--bg); color: var(--ink);
  font: 400 16px/1.4 var(--font-text); -webkit-appearance: none; appearance: none; transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease); }
.wp-input::placeholder { color: var(--muted); }
textarea.wp-input { height: auto; min-height: 92px; padding: 11px 14px; line-height: 1.45; resize: vertical; }   /* a routine's words (Reminders & watches) */
.wp-input:focus { outline: none; border-color: var(--action); box-shadow: 0 0 0 3px color-mix(in oklab, var(--action) 22%, transparent); }
.wp-mono { font-family: var(--font-mono); letter-spacing: .02em; }
.wp-time { width: auto; min-width: 120px; }
.wp-selectwrap { position: relative; flex: none; }
.wp-select { width: auto; max-width: 240px; padding-right: 36px; cursor: pointer; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 4.5 6 8l3.5-3.5' fill='none' stroke='%23616568' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; background-size: 12px; }
.wp-select:disabled { opacity: .6; cursor: default; }
.wp-list > li.wp-times { justify-content: flex-start; flex-wrap: wrap; gap: 12px; min-height: 0; padding-top: 0; border-top: 0; }
.wp-times label { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); }

/* the switch: cyan when on (a state, not an action) */
.wp-switch { position: relative; display: inline-flex; align-items: center; gap: 8px; flex: none; font-size: 13px; font-weight: 500; color: var(--muted); cursor: pointer; user-select: none; }
.wp-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.wp-switch i { position: relative; width: 40px; height: 24px; flex: none; border-radius: 12px; background: var(--line-strong); transition: background-color var(--dur) var(--ease); }
.wp-switch i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #ffffff; box-shadow: 0 1px 2px rgb(0 0 0 / .25); transition: transform 180ms var(--ease); }
.wp-switch input:checked + i { background: var(--accent); }
.wp-switch input:checked + i::after { transform: translateX(16px); }
.wp-switch input:focus-visible + i { outline: 2px solid var(--action); outline-offset: 2px; }
.wp-switch input:disabled + i { opacity: .6; }

/* a line the page says after a change, and the connectors' bits */
.wp-flash { margin: 0 0 24px; padding: 12px 16px; border-radius: var(--r-md); background: color-mix(in oklab, var(--accent) 14%, var(--bg)); font-size: 15px; line-height: 1.5; }
.wp-flash.bad { background: color-mix(in oklab, var(--kp-bad) 14%, var(--bg)); }
.wp-conn-actions { display: flex; align-items: center; gap: 16px; flex: none; }
.wp-conn-sub { display: inline-flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.wp-badge { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 99px; font-size: 13px; font-weight: 500; box-shadow: inset 0 0 0 1px var(--line-strong); color: var(--muted); }
.wp-badge.on { color: var(--ink); background: color-mix(in oklab, var(--accent) 16%, var(--kp-elev)); box-shadow: none; }
.wp-badge.bad { color: var(--kp-bad); box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--kp-bad) 55%, transparent); }
.wp-li-select { flex-wrap: wrap; }

/* ---------------------------------------------------------------- dialogs: a card on the dimmed page */
.wp-dialog { width: min(520px, calc(100vw - 32px)); max-height: calc(100svh - 32px); padding: 0; border: 1px solid var(--line); border-radius: var(--r-lg);
  background: var(--kp-elev); color: var(--ink); box-shadow: 0 30px 80px rgb(0 0 0 / .28); overflow: auto; }
.wp-dialog::backdrop { background: rgb(5 8 10 / .55); }
.wp-dialog form { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 32px 32px 24px; }
.wp-dialog h3 { margin: 0 48px 12px 0; font-size: 28px; line-height: 1.15; letter-spacing: -.03em; }
.wp-close { position: absolute; top: 20px; right: 20px; display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 0; border-radius: var(--r-sm);
  background: transparent; color: var(--muted); font-size: 26px; line-height: 1; cursor: pointer; }
.wp-close:hover { color: var(--ink); background: color-mix(in oklab, var(--ink) 6%, transparent); }
.wp-lede { margin: 0 0 4px; font-size: 16px; line-height: 1.55; color: var(--ink); }
.wp-label { display: flex; align-items: center; gap: 6px; margin: 10px 0 0; font-size: 13px; font-weight: 500; color: var(--ink); }
.wp-label span { color: var(--muted); font-weight: 400; }
.wp-label svg { flex: none; }
.wp-dialog .wp-input { background: var(--bg); }
.wp-row2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.wp-row2 > div { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.fine { margin: 2px 0 0; font-size: 14px; line-height: 1.55; color: var(--muted); }
.err { margin: 4px 0 0; font-size: 14px; line-height: 1.5; color: var(--kp-bad); }
.err:empty { display: none; }
.wp-pw { position: relative; }
.wp-pw .wp-input { padding-right: 52px; }
.wp-eye { position: absolute; right: 4px; top: 4px; display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 0; border-radius: var(--r-sm); background: none; color: var(--muted); cursor: pointer; }
.wp-eye:hover { color: var(--ink); }
.wp-check { display: flex; align-items: center; gap: 10px; min-height: 44px; margin: 4px 0 0; font-size: 15px; color: var(--ink); cursor: pointer; }
.wp-check input, .wp-choice input { width: 18px; height: 18px; flex: none; accent-color: var(--accent); }
.wp-addrow { display: flex; justify-content: space-between; align-items: center; min-height: 48px; margin-top: 4px; padding: 0 14px; border: 1px dashed var(--line-strong); border-radius: var(--r-sm); font-size: 15px; color: var(--muted); }
.wp-choice { display: grid; gap: 8px; margin-top: 8px; }
.wp-choice label, .wp-choice-one { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border: 1px solid var(--line-strong); border-radius: var(--r-md); cursor: pointer; transition: border-color var(--dur) var(--ease); }
.wp-choice label:has(input:checked), .wp-choice-one:has(input:checked) { border-color: var(--accent); background: color-mix(in oklab, var(--accent) 7%, transparent); }
.wp-choice input { margin-top: 2px; }
.wp-choice span { display: flex; flex-direction: column; gap: 2px; }
.wp-choice b { font-weight: 500; font-size: 16px; }
.wp-choice small { font-size: 14px; line-height: 1.5; color: var(--muted); }
.wp-actions { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--line); }
.wp-actions-right { display: flex; gap: 12px; margin-left: auto; }
.wp-confirm { width: min(440px, calc(100vw - 32px)); }
.wp-confirm h3 { margin-right: 0; }
.wp-links { list-style: none; margin: 4px 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.wp-links li { min-width: 0; }
.wp-links li { padding-top: 12px; border-top: 1px solid var(--line); }
.wp-linkrow { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.wp-url { min-width: 0; font: 400 14px/1.5 var(--font-mono); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wp-linkmeta { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 4px; font-size: 14px; color: var(--muted); }

/* ---------------------------------------------------------------- reduced motion: every change jumps */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 1ms !important; animation-duration: 1ms !important; animation-iteration-count: 1 !important; }
}

/* ---------------------------------------------------------------- a phone or a narrow window */
@media (max-width: 759px) {
  .wp-page { padding: 24px 16px 56px; }
  .wp-head { margin-bottom: 24px; }
  .wp-head .wp-btn-ghost { width: 100%; }
  .wp-head p { font-size: 17px; }
  .wp-card { padding: 20px 16px 8px; border-radius: var(--r-md); }
  .wp-grid, .wp-stack { gap: 16px; }
  .wp-list > li { gap: 12px; }
  .wp-list > li.wp-conn, .wp-li-select { flex-wrap: wrap; }
  .wp-conn-actions { width: 100%; justify-content: flex-end; padding-left: 48px; }
  .wp-li-select .wp-selectwrap { width: 100%; padding-left: 0; }
  .wp-li-select .wp-select { width: 100%; max-width: none; }
  .wp-dialog { width: calc(100vw - 16px); max-height: calc(100svh - 16px); border-radius: var(--r-md); }
  .wp-dialog form { padding: 24px 16px 16px; }
  .wp-dialog h3 { font-size: 24px; }
  .wp-close { top: 14px; right: 10px; }
  .wp-actions { flex-wrap: wrap; }
  .wp-actions-right { width: 100%; flex-wrap: wrap; }
  .wp-actions-right > * { flex: 1 1 auto; }
}

/* the menus' rows (the personal info menu) */
.wp-menu button { display: flex; align-items: center; gap: 10px; color: var(--ink) }
.wp-menu button svg { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round }
.wp-menu button:disabled { color: var(--muted); cursor: default; background: none }
.wp-menu button.wp-danger { color: var(--kp-bad) }
.wp-menu button[hidden] { display: none }

/* Trusted people: one row a person (initials, name or "Number ending 210", where it stands, its actions) */
#list-trusted > li { flex-wrap: wrap }
.wp-face { display: grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 50%; background: color-mix(in oklab, var(--accent) 18%, var(--kp-elev));
  color: var(--ink); font: 600 13px/1 var(--font-text) }
.wp-face.is-pending { background: color-mix(in oklab, var(--ink) 6%, var(--kp-elev)); color: var(--muted) }
.wp-row-actions { display: flex; align-items: center; gap: 16px; flex: none; margin-left: auto }
.wp-nav em[data-trust-count] { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; display: inline-grid; place-items: center; background: var(--action); color: var(--action-ink); font-weight: 600; font-size: 12px }
.wp-nav em[data-trust-count]:empty { display: none }
/* the phone field: a country picker like sign-in's */
.wp-phone { display: flex; align-items: center; gap: 12px; height: 48px; padding: 0 14px 0 0; border: 1px solid var(--line-strong); border-radius: var(--r-sm); background: var(--bg);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease) }
.wp-phone:focus-within { border-color: var(--action); box-shadow: 0 0 0 3px color-mix(in oklab, var(--action) 22%, transparent) }
.wp-phone input { flex: 1; min-width: 0; height: 100%; border: 0; outline: none; background: transparent; color: var(--ink); font: 400 16px/1 var(--font-text) }
.wp-cc { position: relative; display: flex; align-items: center; gap: 6px; height: 100%; padding: 0 12px; border-right: 1px solid var(--line); color: var(--muted); cursor: pointer }
.wp-cc__flag { font-size: 20px; line-height: 1 }
.wp-cc select { position: absolute; inset: 0; width: 100%; opacity: 0; cursor: pointer; font-size: 16px }
.wp-cc:focus-within { box-shadow: inset 0 0 0 2px var(--action); border-radius: var(--r-sm) 0 0 var(--r-sm) }
.wp-cc__dial { font-size: 16px; color: var(--muted); font-variant-numeric: tabular-nums }
.wp-sent { display: flex; align-items: center; gap: 8px; margin: 8px 0 0; padding: 10px 14px; border-radius: var(--r-md); background: color-mix(in oklab, var(--accent) 14%, var(--bg)); font-size: 15px }
.wp-sent svg { width: 16px; height: 16px; fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round }
.wp-sent[hidden] { display: none }
@media (max-width: 759px) {
  .wp-row-actions { width: 100%; justify-content: flex-end; padding-left: 52px }
}
/* Reminders & watches: one row a job (its title, when, where it stands, its actions); the actions go below when narrow.
   A routine from before titles shows its instruction clamped to two lines; the full instruction sits behind Details. */
.wp-routines > li { flex-wrap: wrap; align-items: flex-start }
.wp-routines > li > .wp-item { flex: 1 1 220px }
.wp-routines .wp-row-actions { margin-top: -7px }      /* the 36px buttons centred on the title's first line */
.wp-item b.wp-clamp { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; }
.wp-details { margin: 4px 0 0; min-width: 0; }
.wp-details summary { display: inline-block; cursor: pointer; list-style: none; padding: 4px 0; font: 500 14px/1.4 var(--font-text); color: var(--ink);
  text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 4px; transition: text-decoration-color var(--dur) var(--ease); }   /* the .link look */
.wp-details summary::-webkit-details-marker { display: none; }
.wp-details summary:hover { text-decoration-color: currentColor; }
.wp-details-text { margin: 4px 0 2px; padding: 10px 14px; border-radius: var(--r-md); background: var(--ws-pane); font-size: 14px; line-height: 1.55; color: var(--muted); overflow-wrap: anywhere; white-space: pre-wrap; }
@media (max-width: 759px) {
  .wp-routines .wp-row-actions { padding-left: 0; margin-top: 0 }
}

/* keyboard focus inside the side panel and the menus: the ring sits inside the row, never clipped */
.wp-nav a:focus-visible, .wp-nav > button:focus-visible, .wp-menu button:focus-visible { outline-offset: -2px; }

/* Trusted people: what my Knack may share with each person */
.wp-scope { margin: 0 0 16px; padding: 0; border: 0; min-width: 0 }
.wp-scope legend { margin-bottom: 8px; padding: 0; font-size: 14px; font-weight: 500 }
.wp-seg { display: flex; flex-wrap: wrap; gap: 6px }
.wp-seg label { position: relative; cursor: pointer }
.wp-seg input { position: absolute; opacity: 0; width: 1px; height: 1px }
.wp-seg span { display: inline-flex; align-items: center; height: 36px; padding: 0 14px; border-radius: 99px; border: 1px solid var(--line-strong); font-size: 14px;
  transition: border-color var(--dur) var(--ease), background-color var(--dur) var(--ease) }
.wp-seg input:checked + span { border-color: var(--accent); background: color-mix(in oklab, var(--accent) 14%, transparent) }
.wp-seg input:focus-visible + span { outline: 2px solid var(--action); outline-offset: 2px }
.wp-never { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 4px; padding: 0; list-style: none }
.wp-never li { display: inline-flex; gap: 6px; align-items: center; height: 30px; padding: 0 12px; border-radius: 99px; background: color-mix(in oklab, var(--ink) 6%, var(--kp-elev)); font-size: 13px; color: var(--muted) }
.wp-never b { font-weight: 500; color: var(--ink) }

/* App Store (docs/APP_STORE.md; the approved library mockup, 2026-11-13): search on top, categories down the side, a
   section of tiles per category, a page per app. The panel's own variables only. */
.lib-search { position: relative; display: block; margin: 0 0 28px; }
.lib-search .wp-input { height: 52px; padding-left: 48px; font-size: 16px; }
.lib-search svg { position: absolute; left: 16px; top: 50%; margin-top: -10px; width: 20px; height: 20px; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; }
.lib { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 40px; align-items: start; }
.lib-cats { position: sticky; top: 24px; display: grid; gap: 2px; }
.lib-cats h3 { margin: 0 0 8px; font-size: 13px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.lib-cats button { display: flex; justify-content: space-between; gap: 8px; width: 100%; padding: 8px 10px; border: 0; border-radius: var(--r-sm);
  background: transparent; color: var(--ink); font: 400 15px/1.3 var(--font-text); text-align: left; cursor: pointer; }
.lib-cats button span { color: var(--muted); font-variant-numeric: tabular-nums; }
.lib-cats button:hover, .lib-cats button.is-on { background: var(--ws-sel); }
.lib-cats button.is-on { font-weight: 600; }
.lib-select { display: none; }
.lib-sec { margin: 0 0 36px; }
.lib-sec header { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin: 0 0 14px; }
.lib-sec h2 { margin: 0; font-size: 20px; letter-spacing: -.01em; }
.lib-sec header button { border: 0; background: none; padding: 0; color: var(--ink); font: 500 14px/1 var(--font-text); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.lib-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.lib-tile { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 4px 14px; align-items: center; padding: 16px; border-radius: var(--r-md);
  background: var(--kp-elev); border: 1px solid var(--line); text-align: left; color: var(--ink); cursor: pointer; font: inherit; min-width: 0; text-decoration: none; }
.lib-tile:hover { border-color: var(--line-strong); text-decoration: none; }
.lib-logo { grid-row: span 2; display: grid; place-items: center; width: 40px; height: 40px; padding: 6px; border-radius: 10px; object-fit: contain; background: #fff;
  box-shadow: inset 0 0 0 1px var(--line); color: #0c1114; font-weight: 600; font-size: 17px; }
.lib-tile b { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lib-tile b i { font-style: normal; color: var(--accent); margin-left: 6px; }
.lib-tile small { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lib-count { margin: 0 0 14px; color: var(--muted); font-size: 15px; }
.lib-more { display: block; margin: 18px auto 0; }
.lib-empty { color: var(--muted); }
.lib-app { max-width: 640px; }
.lib-back { border: 0; background: none; padding: 0; margin: 0 0 24px; color: var(--muted); font: 500 14px/1 var(--font-text); cursor: pointer; }
.lib-app-head { display: flex; align-items: center; gap: 18px; margin: 0 0 18px; }
.lib-app-head .lib-logo { grid-row: auto; width: 64px; height: 64px; padding: 10px; border-radius: 16px; font-size: 26px; }
.lib-app-head h2 { margin: 0; font-size: 28px; letter-spacing: -.02em; }
.lib-app p { margin: 0 0 18px; line-height: 1.55; }
.lib-actions { display: flex; gap: 12px; flex-wrap: wrap; margin: 6px 0 14px; }
.lib-actions a.wp-btn, .lib-actions a.wp-btn:hover { text-decoration: none; }
.lib-app small { color: var(--muted); }
.lib-can { margin: 30px 0 0; padding: 24px 0 0; border-top: 1px solid var(--line); }
.lib-can h3 { margin: 0 0 8px; font-size: 18px; letter-spacing: -.01em; }
.lib-can p.lib-can-sum { margin: 0 0 6px; color: var(--muted); font-size: 15px; }
.lib-can p.lib-can-note { margin: 0 0 16px; color: var(--muted); font-size: 14px; }
.lib-can-top { list-style: none; margin: 14px 0 18px; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 24px; }
.lib-can-top li { position: relative; padding-left: 22px; font-size: 15px; line-height: 1.4; }
.lib-can-top li::before { content: ""; position: absolute; left: 2px; top: .45em; width: 9px; height: 5px; border: solid var(--accent); border-width: 0 0 2px 2px; transform: rotate(-45deg); }
.lib-can-all summary { cursor: pointer; color: var(--ink); font: 500 15px/1.4 var(--font-text); }
.lib-can-all h4 { margin: 18px 0 6px; font-size: 14px; color: var(--muted); font-weight: 600; }
.lib-can-all ul { margin: 0; padding: 0; list-style: none; columns: 2; column-gap: 24px; font-size: 14px; line-height: 1.7; }
.lib-can-all ul li { break-inside: avoid; }
@media (max-width: 560px) { .lib-can-top, .lib-can-all ul { grid-template-columns: minmax(0, 1fr); columns: 1; } }
@media (max-width: 860px) {
  .lib { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .lib-cats { display: none; }
  .lib-select { display: block; margin: -12px 0 24px; }
  .lib-grid { grid-template-columns: minmax(0, 1fr); }
}
