/* "Try the wallet": the simulation of the agent wallet on the home page (markup is built by /js/wallet-sim.js).
   It uses the tokens of the home page (index.html :root) and the visitor's-screen vocabulary of the first viewport:
   wallpaper, windows with ring-and-drop shadows, a taskbar with the tray. See DESIGN.md, "The wallet simulation".
   The notice (.ws-toast) and the short consent window (.ws-consent, .wc-*) are also drawn in the first viewport. */

/* the figure: a site card on the left, joined by a thread to the visitor's screen on the right */
.ws { position: relative; display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 32px 64px; align-items: start; }
.ws:not(.on) { display: block; }
.ws [hidden] { display: none !important; }
.ws-side { position: relative; z-index: 2; display: grid; align-content: start; gap: 18px; min-width: 0; container: wsside / inline-size; }
.ws-right { min-width: 0; }
.ws-screen { position: relative; z-index: 1; min-width: 0; container: wsscreen / inline-size; }
.ws-noscript { padding: 20px; border: 1px dashed var(--rule); border-radius: 10px; color: var(--muted); }

/* picking a site: five tiles, the chosen one in exit orange */
.ws-pick { margin: 0; padding: 0; border: 0; min-width: 0; }
.ws-pick legend { margin: 0 0 8px; padding: 0; }
.ws-pick-row { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 2px; }
.ws-pk { display: grid; justify-items: center; align-content: start; gap: 7px; padding: 8px 2px 9px; border-radius: 8px; cursor: pointer; text-align: center; }
.ws-pk:hover { background: var(--field); }
.ws-pk-l { font: 600 14px/1.15 var(--f-sign); letter-spacing: 0.01em; color: var(--ink-2); }
@container wsside (max-width: 340px) { .ws-pk { padding-inline: 0; } .ws-pk-l { font-size: 12.5px; letter-spacing: 0; } }
.ws-pk input:checked ~ .tile { background: var(--signal-deep); }
.ws-pk input:checked ~ .ws-pk-l { color: var(--ink); }
.ws-pk input:focus-visible ~ .tile { outline: 3px solid var(--signal); outline-offset: 3px; }

/* the site card: an enamel plate with a picture, what the site is, and its manifest in short */
.ws-card { position: relative; container-type: inline-size; background: var(--enamel); border-radius: 10px; box-shadow: 0 0 0 1px var(--rule), 0 24px 48px -40px rgba(19, 21, 27, 0.4); }
.ws-pic { overflow: hidden; border-radius: 10px 10px 0 0; border-bottom: 1px solid var(--rule); }
.ws-pic svg { display: block; width: 100%; height: auto; }
.ws-cb { padding: 16px 18px 18px; }
.ws-host { display: flex; align-items: center; gap: 9px; font: 600 14.5px/1.2 var(--f-text); color: var(--ink-2); }
.ws-host .ws-chip { margin-left: auto; }
.ws-fav { display: inline-grid; place-items: center; flex: none; width: 26px; height: 26px; border-radius: 5px; background: var(--sign); color: #fff; }
.ws-fav svg { width: 16px; height: 16px; }
.ws-card .ws-ct { margin-top: 8px; font: 700 24px/1.12 var(--f-sign); }
.ws-cd { margin-top: 6px; font-size: 15.5px; line-height: 1.5; color: var(--ink-2); }
.ws-facts { list-style: none; margin: 14px 0 0; padding: 12px 0 0; display: grid; gap: 7px; border-top: 1px solid var(--rule); font-size: 14px; line-height: 1.45; color: var(--ink-2); }
.ws-facts li { display: grid; grid-template-columns: 16px minmax(0, 1fr); gap: 9px; }
.ws-facts svg { width: 16px; height: 16px; margin-top: 2px; color: var(--sign); }
/* the host line under the picture carries a second "Open the site" button, so it is there without scrolling */
.ws-hostrow { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; }
.ws-cacts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-top: 16px; }
.ws-man { margin-top: 12px; }
.ws-tag { margin-bottom: 6px; font-size: 12.5px; color: var(--muted); }
.ws-man pre { padding: 14px 16px; font-size: 11.5px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
.ws-rec { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin-top: 6px; font-size: 12.5px; color: var(--muted); }

/* the thread: a route line from the site's station on the card into the screen; dashed at rest, solid to the open
   browser window */
.ws-thread { --len: 84px; position: absolute; left: 100%; top: calc(40cqw + 26px); width: var(--len); height: 0; margin-top: -1px; border-top: 2px dashed #9aa1af; pointer-events: none; }
.ws-thread::before { content: ""; position: absolute; left: -9px; top: -10px; width: 18px; height: 18px; box-sizing: border-box; border-radius: 50%; background: #fff; border: 4px solid var(--sign); }
.ws-thread::after { content: ""; position: absolute; right: -10px; top: -11px; width: 20px; height: 20px; box-sizing: border-box; border-radius: 50%; background: #fff; border: 5px solid #9aa1af; z-index: 1; }
.is-open .ws-thread { --len: 108px; height: 6px; margin-top: -3px; border: 0; border-radius: 3px; background: var(--sign); }
.is-open .ws-thread::before { top: -6px; }
.is-open .ws-thread::after { top: -7px; border-color: var(--ink); }

/* the visitor's screen: a desktop with wallpaper, a taskbar and the wallet's icon in the tray */
.ws-screen.screen { padding: 16px 20px 0; }
.ws-desk { position: relative; height: 600px; }
.ws-rest { position: absolute; left: 22px; top: calc(40% - 20px); display: flex; align-items: center; gap: 10px; max-width: 46%; padding: 10px 14px; border-radius: 10px; background: rgba(255, 255, 255, 0.55); font: 600 15px/1.3 var(--f-text); color: var(--ink-2); }
.ws-rest svg { width: 20px; height: 20px; flex: none; color: var(--sign); }
.ws-fly { position: absolute; left: 0; top: 0; z-index: 9; padding: 4px 10px; border-radius: 999px; background: var(--signal-deep); color: #fff; font: 600 12px/1.2 var(--f-text); white-space: nowrap; box-shadow: 0 0 0 2px #fff, 0 6px 14px -6px rgba(19, 21, 27, 0.5); pointer-events: none; }
.ws-fly.back { background: var(--sign); }
.ws-fly.stop { background: var(--ink); }
/* the tray icon is a real button: it opens the wallet app; it pulses on each call and wears a quiet dot after a request without a click */
.tray .ws-tray { padding: 0; border: 0; cursor: pointer; }
.tray .ws-tray:hover { background: rgba(255, 255, 255, 0.26); }
.tray .ws-tray:focus-visible { outline: 3px solid var(--signal); outline-offset: 1px; }
.ws-tray.pulse { background: var(--signal-deep); }
.tray .ws-badge-n { position: absolute; right: 1px; top: 2px; width: 10px; height: 10px; border-radius: 50%; background: var(--signal); box-shadow: 0 0 0 2px var(--taskbar); }

/* panel vocabulary */
.ws-ph { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 10px 16px; margin-bottom: 14px; }
.ws-app .ws-pt { font: 600 23px/1.15 var(--f-sign); color: var(--ink); }
.ws-ps { margin-top: 3px; font-size: 13.5px; line-height: 1.45; color: var(--muted); max-width: 62ch; }
.ws-lab { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 2px 10px; margin: 12px 0 6px; padding: 0; font: 600 13.5px/1.25 var(--f-text); color: var(--ink-2); }
.ws-lab small { font-weight: 500; font-size: 12px; color: var(--muted); }
.ws-h4 { margin: 18px 0 8px; font: 600 15px/1.2 var(--f-text); color: var(--ink); }
.ws-part { padding: 14px 0 16px; border-top: 1px solid var(--win-rule); }
.ws-part > .ws-h4:first-child { margin-top: 0; }
.ws-part-h { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.ws-part-h > b, .ws-ask-h > b { font-weight: 600; font-size: 15.5px; color: var(--ink); }
.ws-app code { padding: 2px 6px; border-radius: 4px; background: var(--field); font: 400 11.5px/1.4 var(--f-code); color: var(--sign); }
.ws-badge { margin-left: auto; padding: 5px 7px; border-radius: 999px; background: #eceef2; font: 600 11.5px/1 var(--f-text); font-style: normal; color: var(--ink-2); white-space: nowrap; }
.ws-quote { padding: 8px 11px; border-radius: 8px; background: var(--field); border: 1px solid var(--win-rule); font-weight: 500; color: var(--ink); }
.ws-note { display: flex; gap: 8px; align-items: flex-start; margin: 8px 0 12px; font-size: 13px; line-height: 1.45; color: var(--muted); }
.ws-note svg, .ws-alert svg, .ws-hint svg, .ws-tight svg, .ws-check svg { width: 15px; height: 15px; flex: none; margin-top: 2px; }
.ws-note svg, .ws-hint svg, .ws-tight svg { color: var(--sign); }
.ws-alert { display: flex; gap: 8px; align-items: flex-start; margin-top: 10px; padding: 9px 11px; border-radius: 8px; background: var(--field); box-shadow: inset 3px 0 0 var(--signal); font-size: 13.5px; line-height: 1.45; color: var(--ink-2); }
.ws-alert svg { color: var(--signal-deep); }
.ws-hint { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-top: 8px; padding: 6px 10px; border-radius: 8px; background: var(--field); box-shadow: inset 3px 0 0 var(--sign); font-size: 13.5px; color: var(--ink-2); }
.ws-hint svg { margin-top: 0; }
.ws-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
.ws-where { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 500; color: var(--muted); white-space: nowrap; }
.ws-where svg { width: 13px; height: 13px; flex: none; }
/* requirement tags show whether the chosen model meets them */
.cond .ws-m { width: 11px; height: 11px; flex: none; align-self: center; }
.cond.ok { background: var(--enamel); border-color: #c9ced8; }
.cond.no { background: var(--enamel); border-style: dashed; border-color: var(--signal); }
.cond.no .ws-m { color: var(--signal-deep); }
.cond.unk { border-style: dashed; }

/* buttons inside the app: the same window buttons as the first viewport, smaller */
.ws-btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 8px 13px; border-radius: 7px; border: 1px solid #c3c8d2; background: var(--enamel); color: var(--ink); font: 600 14px/1.1 var(--f-text); cursor: pointer; white-space: nowrap; }
.ws-btn:hover { border-color: var(--ink-2); }
.ws-btn svg { width: 14px; height: 14px; flex: none; }
.ws-btn.pri { background: var(--signal-deep); border-color: var(--signal-deep); color: #fff; }
.ws-btn.pri:hover { background: var(--signal-dark); border-color: var(--signal-dark); }
.ws-btn.blue { background: var(--sign); border-color: var(--sign); color: #fff; }
.ws-btn.blue:hover { background: #142359; border-color: #142359; }
.ws-btn.link { padding: 4px 2px; border: 0; background: none; color: var(--sign); }
.ws-btn.link:hover { color: var(--signal-dark); }
.ws-btn.sm { padding: 6px 10px; font-size: 13px; }
.ws-btn.ico { width: 30px; height: 30px; padding: 0; }
.ws-btn:disabled { opacity: 0.42; cursor: default; }
.ws-btn:disabled:hover { border-color: #c3c8d2; }
.ws-btn.pri:disabled:hover { border-color: var(--signal-deep); background: var(--signal-deep); }
.ws-select { max-width: 100%; padding: 7px 10px; border: 1px solid #c3c8d2; border-radius: 7px; background: var(--enamel); font: 500 14px/1.2 var(--f-text); color: var(--ink); }
.ws .p-input { width: 100%; padding: 8px 10px; border: 1px solid #c9ced8; border-radius: 7px; background: var(--enamel); font: 400 14.5px/1.3 var(--f-text); color: var(--ink); }
.ws .p-input:focus { outline: 2px solid var(--signal); outline-offset: 0; border-color: transparent; }
/* outcome chips keep the four fixed request words */
.ws-chip { display: inline-flex; align-items: center; padding: 5px 9px; border-radius: 999px; border: 1px solid transparent; font: 600 12px/1 var(--f-text); white-space: nowrap; }
.ws-chip.allowed { background: #e6e8ed; color: var(--ink); }
.ws-chip.granted { background: #e2f2e7; color: #1d6b3a; }
.ws-chip.warn { background: var(--enamel); border-color: #9aa1af; color: var(--ink); }
.ws-chip.ask { background: var(--signal-deep); color: #fff; }
.ws-chip.blocked { background: var(--ink); color: #fff; }
.ws-chip.later { border: 1px dashed #b9bfcb; color: var(--muted); }

/* Sites */
.ws-req { padding: 14px; border: 1px solid var(--win-rule); border-radius: 10px; }
.ws-req-h { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.ws-req-h > b { font: 700 20px/1.1 var(--f-sign); }
.ws-req-h .ws-chip { margin-left: auto; }
.ws-lvl { display: inline-block; padding: 2px 7px; border-radius: 5px; border: 1px solid var(--win-rule); font-size: 12px; color: var(--ink-2); }
.ws-asks { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; }
.ws-asks li { padding: 8px 10px; border: 1px solid var(--win-rule); border-radius: 8px; }
.ws-card .ws-asks li { border-color: #d7dbe3; }
.ws-card .ws-quote { font-size: 15px; line-height: 1.45; }
.ws-card .ws-lab { margin-top: 14px; }
.ws-ask-h { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.ws-conds2 .ws-lab { margin-top: 10px; }
.ws-agent { margin-top: 14px; padding: 12px 14px; border: 1px dashed #aab0bd; border-radius: 10px; font-size: 13.5px; line-height: 1.45; color: var(--ink-2); }
.ws-agent-h { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-bottom: 4px; color: var(--ink); }
.ws-agent-h svg { width: 18px; height: 18px; color: var(--sign); }
.ws-agent-h .ws-chip { margin-left: auto; }
.ws-may { margin: 8px 0 0; padding: 0; border: 0; display: grid; gap: 6px; opacity: 0.75; }
.ws-may legend { margin-top: 0; }
.ws-may .p-tick { font-weight: 500; }
.ws-may .box:disabled:not(:checked) { background: var(--enamel); border-color: #aab0bd; }
.ws-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--win-rule); }
.ws-row { display: grid; grid-template-columns: 10px 26px minmax(0, 1fr) auto 52px; gap: 10px; align-items: center; width: 100%; padding: 8px 6px; border: 0; border-bottom: 1px solid var(--win-rule); background: none; text-align: left; font: 500 14px/1.2 var(--f-text); color: var(--ink); cursor: pointer; }
.ws-row:hover { background: var(--field); }
.ws-row[aria-current] { background: var(--field); box-shadow: inset 3px 0 0 var(--signal-deep); }
.ws-row b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.ws-row-n { display: grid; gap: 2px; min-width: 0; }
.ws-row-n small { font-size: 12px; font-weight: 500; color: var(--muted); }
.ws-row-s { font-size: 12.5px; color: var(--muted); }
.ws-row-c { text-align: right; font-size: 13px; font-variant-numeric: tabular-nums; }
.ws-row.past { cursor: default; }
.ws-row.past:hover { background: none; }
/* the wallet's own activity dot (as in the wallet 0.1): green when the site used it in the last 3 minutes, yellow within
   a day, grey before that; always next to the words "used just now", "last used … ago" */
.ws-dot { flex: none; width: 10px; height: 10px; border-radius: 50%; background: #b5bac4; }
.ws-dot.now { background: #2e9d57; }
.ws-dot.today { background: #e0a100; }
.ws-used { font-size: 12.5px; color: var(--muted); }
.ws-pauseset { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-bottom: 14px; }
.ws-pauselab { font: 600 14px/1.25 var(--f-text); color: var(--ink); }
.ws-pauseset .ws-select { padding: 6px 9px; font-size: 13.5px; }
.ws-pauseset .ws-ps { flex-basis: 100%; margin-top: 0; font-size: 12.5px; }

/* Skills & sources */
.ws-groups { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.ws-groups li { display: inline-flex; align-items: center; gap: 7px; padding: 6px 10px 6px 8px; border: 1px solid var(--win-rule); border-radius: 8px; font-size: 13px; }
.ws-groups svg { width: 15px; height: 15px; color: var(--ink-2); }
.ws-groups b { font-weight: 600; }
.ws-groups small { font-size: 12px; color: var(--muted); }
.ws-groups li.off { border-style: dashed; border-color: #aab0bd; color: var(--muted); cursor: not-allowed; }
.ws-groups li.off svg { color: var(--muted); }
.ws-srcs { margin: 4px 0 0; padding: 0; border: 0; min-width: 0; display: grid; gap: 5px; }
.ws-src { position: relative; border: 1px solid var(--win-rule); border-radius: 8px; }
.ws-src input { position: absolute; left: 11px; top: 12px; margin: 0; accent-color: var(--signal-deep); cursor: pointer; }
.ws-src label { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; padding: 8px 10px 8px 34px; cursor: pointer; }
.ws-src-n { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; min-width: 0; }
.ws-src-n b { font-weight: 600; }
.ws-src-f { grid-column: 1; font-size: 12.5px; color: var(--muted); }
.ws-src-q { grid-column: 2; grid-row: 1 / span 2; align-self: center; font-size: 12.5px; color: var(--ink-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ws-src.on { border-color: transparent; box-shadow: 0 0 0 1px var(--win-rule), 0 1px 4px rgba(19, 21, 27, 0.16), inset 3px 0 0 var(--signal-deep); }
.ws-src.weak .ws-src-f { color: var(--signal-dark); }
.ws-src.off { border-style: dashed; border-color: #aab0bd; }
.ws-src.off label { cursor: not-allowed; color: var(--muted); }
.ws-src.off input { cursor: not-allowed; }
.ws-props { margin: 0 10px 10px 34px; padding: 8px 10px; border-radius: 8px; background: var(--field); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 3px 18px; font-size: 13px; line-height: 1.35; }
.ws-props div { display: flex; flex-wrap: wrap; gap: 0 8px; align-items: baseline; min-width: 0; }
.ws-props dt code { padding: 0; background: none; }
.ws-props dd { margin: 0; min-width: 0; color: var(--ink); }
.ws-props small { margin-left: 5px; font-size: 11px; color: var(--muted); }
.ws-props .ext dt code { color: var(--signal-dark); }

/* Sources: every model and key by kind */
.ws-srclist { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--win-rule); }
.ws-srclist li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; align-items: center; padding: 7px 2px; border-bottom: 1px solid var(--win-rule); }
.ws-srclist .ws-src-f { grid-column: 1; }
.ws-srclist .ws-chip { grid-column: 2; grid-row: 1 / span 2; }
/* a screen the wallet 0.1 does not have yet: a dashed box (the Later vocabulary) says so */
.ws-planned { display: flex; gap: 8px; align-items: flex-start; margin: 0 0 14px; padding: 9px 11px; border-radius: 8px; border: 1px dashed #aab0bd; font-size: 13.5px; line-height: 1.45; color: var(--ink-2); }
.ws-planned svg { width: 15px; height: 15px; flex: none; margin-top: 2px; color: var(--sign); }

/* Fallbacks: a route of stops for each skill, on the roadmap's progress line, inside Skills & fallbacks */
.ws-fb { margin-top: 12px; }
.ws-fb > .ws-lab { justify-content: flex-start; margin-bottom: 0; }
.ws-route { list-style: none; margin: 10px 0 0; padding: 0; }
.ws-route li { position: relative; display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; gap: 12px; align-items: start; padding: 7px 0; }
.ws-route li:not(:last-child)::before { content: ""; position: absolute; left: 12px; top: 30px; bottom: -9px; width: 2px; background: var(--rule); }
.ws-stop { position: relative; z-index: 1; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--sign); background: var(--enamel); font: 700 14px/1 var(--f-sign); color: var(--sign); }
.ws-route .first .ws-stop { background: var(--signal-deep); border-color: var(--signal-deep); color: #fff; }
.ws-route .cost .ws-stop { border-style: dashed; border-color: #8c95ad; color: var(--ink-2); }
.ws-stop-b { min-width: 0; padding-top: 3px; }
.ws-stop-b > p:first-child { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; }
.ws-stop-b b { font-weight: 600; }
.ws-st8 { padding: 3px 8px; border-radius: 999px; background: #eceef2; font-size: 12px; font-weight: 600; color: var(--ink-2); }
.ws-route li.busy .ws-st8, .ws-route li.offline .ws-st8, .ws-route li.paid .ws-st8, .ws-route li.blocked .ws-st8 { background: var(--ink); color: #fff; }
.ws-route li.busy .ws-stop, .ws-route li.offline .ws-stop, .ws-route li.paid .ws-stop, .ws-route li.blocked .ws-stop { opacity: 0.45; }
.ws-route li.ans .ws-st8 { background: var(--signal-deep); color: #fff; }
.ws-route li.ans .ws-stop { box-shadow: 0 0 0 5px rgba(200, 64, 28, 0.16); }
.ws-paid { margin-top: 5px; font-size: 13px; align-items: flex-start; }
.ws-mv { display: flex; gap: 4px; }
.ws-addrow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; }
.ws-result { margin-top: 10px; padding: 9px 11px; border-radius: 8px; background: var(--field); box-shadow: inset 3px 0 0 var(--signal-deep); font-size: 13.5px; line-height: 1.45; color: var(--ink-2); }

/* Limits */
.ws-lim { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(70px, 1fr) auto; gap: 6px 14px; align-items: center; padding: 6px 0; }
.ws-lim-l { display: grid; font-weight: 600; font-size: 14px; }
.ws-lim-l small, .ws-lim2-r small { font-weight: 500; font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.ws-meter { display: block; height: 8px; border-radius: 4px; background: #e3e6ec; overflow: hidden; }
.ws-meter > span { display: block; height: 100%; border-radius: 4px; background: var(--sign); }
.ws-step { display: inline-flex; align-items: center; gap: 4px; }
.ws-step output { min-width: 58px; text-align: center; font: 700 16px/1 var(--f-sign); font-variant-numeric: tabular-nums; color: var(--ink); }
.ws-lim2 { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px 16px; align-items: center; padding: 6px 0; }
.ws-lim2 > b { font-weight: 600; font-size: 14px; }
.ws-lim2-r { display: inline-flex; align-items: center; gap: 6px; }
.ws-tight { display: flex; gap: 8px; align-items: flex-start; margin-top: 4px; padding: 10px 12px; border-radius: 8px; background: var(--field); font-size: 13.5px; font-weight: 500; color: var(--ink); }

/* Tests */
.seg { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; margin-top: 8px; padding: 4px; border-radius: 9px; background: #e8eaef; }
.seg label { position: relative; display: grid; }
.seg input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
.seg span { display: grid; place-content: center; text-align: center; min-height: 40px; padding: 4px; border-radius: 6px; font: 600 13.5px/1.15 var(--f-text); color: var(--ink-2); }
.seg small { display: block; margin-top: 2px; font-weight: 500; font-size: 11.5px; color: var(--muted); }
.seg input:checked + span { background: var(--enamel); color: var(--ink); box-shadow: 0 0 0 1px var(--win-rule), 0 1px 3px rgba(19, 21, 27, 0.18); }
.seg input:focus-visible + span { outline: 3px solid var(--signal); outline-offset: 1px; }
.ws-re { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-2); }
.ws-re .ws-select { padding: 5px 8px; font-size: 13px; }
.ws-modes-help { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 18px; margin-bottom: 4px; font-size: 13px; line-height: 1.45; color: var(--ink-2); }
.ws-modes-help b { color: var(--ink); }
.ws-segs { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; margin-top: 8px; }
.ws-segs .seg { margin-top: 0; }
.seg.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ws .seg input:disabled { cursor: not-allowed; }
.ws .seg input:disabled:not(:checked) + span { color: var(--muted); outline: 1px dashed #aab0bd; outline-offset: -1px; }
.ws-tests { list-style: none; margin: 10px 0 0; padding: 0; border-top: 1px solid var(--win-rule); }
.ws-tests li { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(96px, 1fr) auto; grid-template-areas: "n s b" "n m b"; gap: 2px 14px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--win-rule); }
.ws-tests .ws-src-n { grid-area: n; display: grid; gap: 1px; }
.ws-tests .ws-score, .ws-tests .ws-ticks { grid-area: s; }
.ws-tests .ws-tmeta { grid-area: m; }
.ws-tests .ws-btn { grid-area: b; }
.ws-score { display: flex; align-items: center; gap: 8px; }
.ws-score b { min-width: 40px; text-align: right; font: 700 16px/1 var(--f-sign); font-variant-numeric: tabular-nums; }
.ws-bar { position: relative; flex: 1; height: 8px; border-radius: 4px; background: #e3e6ec; }
.ws-bar > span { display: block; height: 100%; border-radius: 4px; background: var(--sign); }
.ws-bar > i { position: absolute; top: -3px; bottom: -3px; width: 2px; margin-left: -1px; border-radius: 1px; background: var(--signal-deep); }
.ws-score.stale .ws-bar > span { opacity: 0.5; }
.ws-score.none b { color: var(--muted); }
.ws-tmeta { font-size: 12px; color: var(--muted); }
.ws-due { display: inline-block; margin-left: 6px; padding: 1px 6px; border-radius: 999px; border: 1px dashed var(--signal); color: var(--signal-dark); font-weight: 600; }
.ws-ticks { display: flex; flex-wrap: wrap; gap: 3px; }
.ws-ticks i { width: 9px; height: 9px; border-radius: 2px; background: #e3e6ec; }
.ws-ticks i.y { background: var(--sign); }
.ws-ticks i.n { background: var(--enamel); box-shadow: inset 0 0 0 2px var(--signal); }

/* Manager */
.mgr-av { display: grid; place-items: center; flex: none; border-radius: 6px; background: var(--signal-deep); color: #fff; }
.ws-mgr { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 12px; align-items: start; padding: 12px 14px; border-radius: 10px; background: var(--field); box-shadow: inset 3px 0 0 var(--sign); }
.ws-mgr .mgr-av { width: 44px; height: 44px; border-radius: 8px; }
.ws-mgr .mgr-av svg { width: 32px; height: 32px; }
.ws-mgr b { font-size: 15.5px; }
.ws-mgr-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
.ws-auto { margin: 4px 0 8px; font-size: 13.5px; align-items: flex-start; }
.ws-auto .box { margin-top: 1px; }
.ws-sug-h { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.ws-sug-h > span:first-child { font-size: 13px; color: var(--muted); }
.ws-sug-h b { font: 700 20px/1.1 var(--f-sign); color: var(--ink); }
.ws-why { margin: 0; padding-left: 18px; font-size: 13.5px; line-height: 1.5; color: var(--ink-2); }
.ws-why li::marker { color: var(--sign); }
.ws-done { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--ink); }
.ws-done svg { width: 22px; height: 22px; padding: 4px; border-radius: 50%; background: var(--ink); color: #fff; }

/* Activity: receipts that open to show the site's prompt, the answer and the receipt the site got; grouped by day,
   50, 100 or 200 a page */
.ws-sum { margin: -6px 0 10px; font-size: 13.5px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.ws-pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 14px; margin: 4px 0 6px; }
.ws-pg-size { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-2); }
.ws-pg-size .ws-select { padding: 5px 8px; font-size: 13px; }
.ws-pg-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.ws-pg-at { padding: 0 4px; font-size: 13px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.ws-day { margin: 14px 0 0; padding: 0 2px 6px; font: 600 13.5px/1.2 var(--f-text); color: var(--ink); }
.ws-r-m .ws-r-host { color: var(--ink-2); }
.ws-log { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--win-rule); }
.ws-r summary { list-style: none; display: grid; grid-template-columns: 58px minmax(0, 1fr) auto auto 14px; grid-template-areas: "t m c chip x" "t route route route x"; gap: 3px 10px; align-items: center; padding: 8px 2px; border-bottom: 1px solid var(--win-rule); cursor: pointer; }
.ws-r summary::-webkit-details-marker { display: none; }
.ws-r summary:hover { background: var(--field); }
.ws-r-t { grid-area: t; align-self: start; padding-top: 2px; font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.ws-r-m { grid-area: m; display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 8px; min-width: 0; }
.ws-r-m b { font-weight: 600; }
.ws-r-m small { font-size: 12.5px; color: var(--muted); }
.ws-r-route { grid-area: route; display: flex; flex-wrap: wrap; align-items: center; row-gap: 2px; font-size: 12.5px; color: var(--muted); }
.ws-r-route:empty { display: none; }
.ws-hop { display: inline-flex; align-items: baseline; gap: 4px; }
.ws-hop + .ws-hop::before { content: ""; align-self: center; width: 16px; height: 10px; margin: 0 5px; background: #8c95ad; -webkit-mask: var(--arr) center / contain no-repeat; mask: var(--arr) center / contain no-repeat; }
.ws-hop.ok { font-weight: 600; color: var(--ink); }
.ws-hop.none { font-weight: 600; color: var(--signal-dark); }
.ws-flag { display: inline-flex; align-items: center; gap: 4px; margin-left: 10px; font-weight: 600; color: var(--signal-dark); }
.ws-flag svg { width: 12px; height: 12px; }
.ws-r-c { grid-area: c; font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.ws-r .ws-chip { grid-area: chip; justify-self: end; }
.ws-r-x { grid-area: x; width: 14px; height: 14px; color: var(--muted); }
.ws-r details[open] .ws-r-x { transform: rotate(180deg); }
.ws-r-d { padding: 6px 4px 14px 70px; border-bottom: 1px solid var(--win-rule); font-size: 13.5px; }
.ws-r-d .ws-lab:first-child { margin-top: 4px; }
.ws-r-note { color: var(--ink); font-weight: 500; }
.ws-ans { padding: 8px 11px; border-radius: 8px; border: 1px solid var(--win-rule); color: var(--ink); }
.ws-ans.wrong { border-style: dashed; border-color: var(--signal); }
.ws-check { display: flex; align-items: flex-start; gap: 7px; margin-top: 8px; color: var(--ink-2); }
.ws-check svg { color: var(--sign); }
.ws-empty { padding: 28px 0 22px; color: var(--muted); }

/* Sites screen: the answer you gave each site */
.ws-asks li.off { border-style: dashed; color: var(--muted); }
.ws-sauto { margin-top: 12px; font-size: 13.5px; align-items: flex-start; }
.ws-sauto .box { margin-top: 1px; }

/* the browser window: not maximized, with a tab, an address bar and window buttons; the site's page inside */
.ws-browser { position: absolute; z-index: 1; left: 24px; top: 18px; bottom: 56px; width: calc(100% - 172px); max-width: 640px; display: flex; flex-direction: column; background: var(--enamel); border-radius: 10px; overflow: hidden;
              box-shadow: 0 0 0 1px rgba(19, 21, 27, 0.1), 0 26px 50px -26px rgba(19, 21, 27, 0.55), 0 6px 14px -8px rgba(19, 21, 27, 0.25); }
.wb-top { display: flex; align-items: flex-end; gap: 4px; padding: 6px 4px 0 8px; background: #e2e5eb; }
.wb-tab { display: flex; align-items: center; gap: 8px; min-width: 0; max-width: 62%; padding: 7px 14px 8px 10px; border-radius: 8px 8px 0 0; background: var(--win-bar); font: 500 13px/1 var(--f-text); color: var(--ink); white-space: nowrap; }
.wb-tab-t { overflow: hidden; text-overflow: ellipsis; }
.wb-fav { display: inline-grid; place-items: center; flex: none; width: 16px; height: 16px; border-radius: 4px; background: var(--sign); color: #fff; }
.wb-fav svg { width: 11px; height: 11px; }
.wb-plus { align-self: center; display: grid; place-items: center; width: 24px; height: 24px; color: #6b7282; }
.wb-plus svg { width: 12px; height: 12px; }
.wb-ctl { margin-left: auto; align-self: start; display: flex; align-items: center; }
.wb-ctl i { position: relative; width: 34px; height: 28px; }
.wb-ctl i::before { content: ""; position: absolute; left: 12px; top: 13px; width: 10px; height: 1.6px; background: #5a6070; }
.wb-ctl i.max::before { top: 9px; height: 10px; box-sizing: border-box; border: 1.6px solid #5a6070; border-radius: 2px; background: none; }
.wb-close { display: grid; place-items: center; width: 38px; height: 28px; padding: 0; border: 0; border-radius: 6px; background: none; color: var(--ink-2); cursor: pointer; }
.wb-close svg { width: 13px; height: 13px; }
.wb-close:hover { background: var(--signal-deep); color: #fff; }
.ws-browser .b-bar { flex: none; }
.wb-page { flex: 1; min-height: 0; overflow: auto; padding: 14px 20px 18px; color: var(--ink); scrollbar-width: thin; scrollbar-color: #b9bfcb transparent; }
.wp-head { display: flex; align-items: center; gap: 10px; padding-bottom: 12px; margin-bottom: 16px; border-bottom: 1px solid var(--win-rule); font: 700 15px/1.2 var(--f-sign); letter-spacing: 0.01em; }
.wp-logo { display: inline-grid; place-items: center; flex: none; width: 28px; height: 28px; border-radius: 6px; background: var(--sign); color: #fff; }
.wp-logo svg { width: 18px; height: 18px; }
.wp-nav { display: flex; gap: 8px; margin-left: auto; }
.wp-nav i { width: 34px; height: 7px; border-radius: 4px; background: #e1e5ec; }
.wp-new { display: inline-block; margin-bottom: 8px; padding: 4px 9px; border-radius: 999px; border: 1px solid var(--signal); font: 600 12.5px/1 var(--f-text); color: var(--signal-dark); }
.wp-h { font: 700 25px/1.12 var(--f-sign); }
.wp-p { margin-top: 6px; max-width: 46ch; font-size: 15px; line-height: 1.5; color: var(--ink-2); }
.wp-act { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-top: 16px; }
.wp-cta { display: inline-flex; align-items: center; gap: 10px; padding: 7px 18px 7px 7px; border: 0; border-radius: 999px; background: var(--ink); color: #fff; font: 700 17px/1 var(--f-sign); letter-spacing: 0.02em; cursor: pointer; box-shadow: 0 8px 18px -12px rgba(19, 21, 27, 0.8); }
.wp-cta svg { width: 32px; height: 32px; padding: 7px; border-radius: 50%; background: rgba(255, 255, 255, 0.16); }
.wp-cta:hover { background: #2a2e38; }
.wp-cta:focus-visible { outline: 3px solid var(--signal); outline-offset: 3px; }
.wp-cta:disabled { cursor: default; opacity: 0.6; }
.wp-cta.on:disabled { opacity: 1; }
.wp-cta.on svg { background: var(--signal-deep); }
.wp-status { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); }
.wp-status.live { color: var(--ink); font-weight: 600; }
.wp-status.live::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--signal); }
.wp-on { flex: none; white-space: nowrap; padding: 4px 9px; border-radius: 999px; background: var(--ink); color: #fff; font: 600 12px/1 var(--f-text); letter-spacing: 0; }
.wp-case { display: inline-block; margin: 0 7px 2px 0; padding: 2px 7px; border-radius: 999px; border: 1px dashed var(--signal); font: 600 11.5px/1.3 var(--f-text); font-style: normal; color: var(--signal-dark); }
.wp-off { margin-top: 16px; padding: 12px 14px; border-radius: 8px; border: 1px dashed #aab0bd; font-size: 14px; line-height: 1.45; color: var(--ink-2); }
.wp-off b { color: var(--ink); }
.wp-input { display: block; margin-top: 8px; padding: 8px 11px; border-radius: 7px; border: 1px solid #c9ced8; background: var(--enamel); color: var(--muted); }
.wp-idle { margin-top: 18px; font-size: 14px; color: var(--muted); }
.wp-lines { list-style: none; margin: 18px 0 0; padding: 12px 0 0; border-top: 1px solid var(--win-rule); display: grid; gap: 7px; font-size: 14.5px; line-height: 1.4; }
.wp-lines li { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 9px; align-items: start; }
.wp-lines svg { width: 18px; height: 18px; padding: 3px; border-radius: 50%; background: var(--ink); color: #fff; }
.wp-lines li.bad svg { background: var(--enamel); color: var(--signal-deep); box-shadow: inset 0 0 0 1.5px var(--signal); }
.wp-lines li.none { color: var(--muted); }
.wp-lines li.new { margin: -4px -8px; padding: 4px 8px; border-radius: 8px; background: var(--field); color: var(--ink); }
.wp-lines li:not(.new) { opacity: 0.72; }
.wp-lines li.none i { width: 18px; height: 18px; border-radius: 50%; border: 1.5px dashed #9aa1af; box-sizing: border-box; }

/* the wallet app: an ordinary window, opened from the tray or "Detailed settings…" and closable */
.ws-app { position: absolute; z-index: 4; inset: 8px; display: flex; flex-direction: column; background: var(--enamel); border-radius: 12px; overflow: hidden; color: var(--ink); font-size: 14.5px; line-height: 1.4;
          box-shadow: 0 0 0 1px rgba(19, 21, 27, 0.1), 0 30px 60px -22px rgba(19, 21, 27, 0.55), 0 8px 18px -10px rgba(19, 21, 27, 0.3); }
.ws-app:focus { outline: none; }
.ws-app:focus-visible { outline: 3px solid var(--signal); outline-offset: 2px; }
.ws-title { display: flex; align-items: center; gap: 9px; flex: none; padding: 6px 6px 6px 14px; border-bottom: 1px solid var(--win-rule); background: var(--win-bar); font: 600 14px/1.1 var(--f-text); color: var(--ink-2); white-space: nowrap; }
.ws-title img { width: 18px; height: 18px; border-radius: 4px; }
.ws-thost { min-width: 0; overflow: hidden; text-overflow: ellipsis; padding-left: 9px; border-left: 1px solid var(--win-rule); font-weight: 500; color: var(--muted); }
.ws-simtag { padding: 4px 9px; border-radius: 999px; border: 1px dashed #9aa1af; font: 600 12px/1 var(--f-text); color: var(--ink-2); white-space: nowrap; }
.ws-title .ws-simtag { margin-left: auto; }
.ws-wclose, .wc-x { display: grid; place-items: center; flex: none; width: 32px; height: 28px; padding: 0; border: 0; border-radius: 6px; background: none; color: var(--ink-2); cursor: pointer; }
.ws-wclose svg, .wc-x svg { width: 13px; height: 13px; }
.ws-wclose:hover, .wc-x:hover { background: #e3e6ec; color: var(--ink); }
.ws-main { flex: 1; min-height: 0; display: grid; grid-template-columns: 184px minmax(0, 1fr); }
.ws-side-nav { display: flex; flex-direction: column; justify-content: space-between; gap: 10px; min-height: 0; padding: 10px 8px 8px; background: var(--field); border-right: 1px solid var(--win-rule); }
.ws-tabs { display: flex; flex-direction: column; gap: 2px; }
/* the side menu answers the pointer and marks the open screen with a light sign-blue tint, as the wallet 0.1 does */
.ws-tab { position: relative; display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border: 0; border-radius: 7px; background: none; color: var(--ink-2); font: 500 14.5px/1.15 var(--f-text); text-align: left; cursor: pointer; }
.ws-tab:hover { background: #e1e5ee; color: var(--ink); }
.ws-tab:active { background: #d3d8e4; }
.ws-tab svg { width: 18px; height: 18px; flex: none; color: var(--muted); }
.ws-tab[aria-selected="true"] { background: #dbe2f7; color: var(--sign); font-weight: 600; }
.ws-tab[aria-selected="true"]:hover { background: #cdd7f4; }
.ws-tab[aria-selected="true"] svg { color: var(--sign); }
.ws-tab:focus-visible { outline-offset: 0; }
.ws-tab.later:not([aria-selected="true"]) { color: var(--muted); }
.ws-tabsep { display: block; margin: 10px 10px 2px; padding-top: 10px; border-top: 1px dashed #c3c8d2; font: 600 12px/1 var(--f-text); color: var(--muted); }
@media (prefers-reduced-motion: no-preference) { .ws-tab { transition: background-color 0.12s; } }
.ws-count { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--signal-deep); color: #fff; font: 600 12px/20px var(--f-text); font-style: normal; text-align: center; }
.ws-today { display: grid; gap: 5px; padding: 10px 10px 6px; border-top: 1px solid var(--win-rule); font-size: 12.5px; color: var(--muted); }
.ws-today b { font: 700 17px/1 var(--f-sign); color: var(--ink); font-variant-numeric: tabular-nums; }
.ws-panel { min-width: 0; min-height: 0; overflow: auto; padding: 18px 22px 26px; scrollbar-width: thin; scrollbar-color: #b9bfcb transparent; }
.ws-panel:focus-visible { outline-offset: -3px; }

/* a notice above the tray (Windows-toast style): the site's request, and later only what needs you.
   Its notch points at the wallet's icon in the tray. The first viewport draws the same notice. */
.ws-toast { position: relative; padding: 11px 12px 13px 14px; border-radius: 10px; background: var(--enamel); font-size: 13.5px; line-height: 1.45; color: var(--ink-2);
            box-shadow: 0 0 0 1px rgba(19, 21, 27, 0.12), 0 30px 60px -22px rgba(19, 21, 27, 0.6), 0 8px 18px -10px rgba(19, 21, 27, 0.35); }
.ws-toast::after { content: ""; position: absolute; right: var(--notch, 104px); bottom: -8px; width: 16px; height: 16px; background: var(--enamel); transform: rotate(45deg); box-shadow: 1px 1px 0 rgba(19, 21, 27, 0.12); }
.ws-toast:focus { outline: none; }
.ws-toast-h { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: start; }
.ws-toast-h > img { width: 18px; height: 18px; margin-top: 2px; border-radius: 4px; }
.ws-toast-h .ws-fav { width: 24px; height: 24px; }
.ws-toast-h p { min-width: 0; padding-top: 2px; font-size: 14.5px; line-height: 1.3; color: var(--ink); }
.ws-toast-h b { font-weight: 700; }
.ws-toast-h small { display: block; margin-top: 2px; font-size: 12px; color: var(--muted); }
.ws-toast-h .wc-x { margin: -4px -4px 0 0; }
.ws-toast-t { margin-top: 6px; }
.ws-toast .ws-acts { margin-top: 11px; }
.ws-toast-l { margin-left: auto; }
.ws-toast.rq .ws-toast-h p { font-size: 15px; }

/* the short consent window: one compact window above the tray, no side menu; the first viewport draws it too */
.ws-consent { display: flex; flex-direction: column; background: var(--enamel); border-radius: 12px; font-size: 14px; line-height: 1.4; color: var(--ink);
              box-shadow: 0 0 0 1px rgba(19, 21, 27, 0.1), 0 30px 60px -22px rgba(19, 21, 27, 0.55), 0 8px 18px -10px rgba(19, 21, 27, 0.3); }
.ws-consent::after { content: ""; position: absolute; right: var(--notch, 106px); bottom: -8px; width: 16px; height: 16px; background: var(--win-bar); transform: rotate(45deg); box-shadow: 1px 1px 0 rgba(19, 21, 27, 0.1); }
.ws-consent:focus { outline: none; }
.ws-consent:focus-visible { outline: 3px solid var(--signal); outline-offset: 2px; }
.wc-title { display: flex; align-items: center; gap: 8px; flex: none; padding: 5px 5px 5px 12px; border-bottom: 1px solid var(--win-rule); font: 600 13.5px/1 var(--f-text); color: var(--ink-2); white-space: nowrap; }
.wc-title img { width: 18px; height: 18px; border-radius: 4px; }
.wc-title .wc-x { margin-left: auto; }
.wc-body { flex: 1; min-height: 0; overflow: auto; display: grid; align-content: start; gap: 9px; padding: 12px 14px 12px; scrollbar-width: thin; scrollbar-color: #b9bfcb transparent; }
.wc-site { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 9px; }
.wc-site > b { font: 700 19px/1.15 var(--f-sign); letter-spacing: 0.01em; color: var(--ink); }
.wc-ver { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; font-weight: 600; color: var(--sign); }
.wc-ver svg { width: 14px; height: 14px; padding: 2px; border-radius: 50%; background: var(--sign); color: #fff; }
.wc-site .ws-chip { margin-left: auto; }
.wc-does { font-size: 13.5px; line-height: 1.4; color: var(--ink-2); }
.wc-more { padding: 8px 10px; border-radius: 8px; background: var(--field); box-shadow: inset 3px 0 0 var(--signal); font-size: 13.5px; color: var(--ink-2); }
.wc-paused { font-weight: 600; color: var(--ink); }
.wc-purpose { padding: 6px 10px 7px; border-radius: 8px; background: var(--field); border: 1px solid var(--win-rule); }
.wc-purpose span { font-weight: 500; color: var(--ink); }
.wc-purpose small { margin-left: 6px; font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.ws-consent .ws-lab { margin: 2px 0 -3px; }
.wc-rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.wc-row { padding: 7px 10px 8px; border: 1px solid var(--win-rule); border-radius: 8px; }
.wc-r1 { display: flex; align-items: center; gap: 8px; }
.wc-r1 > b { font-weight: 600; }
.wc-r1 .ws-badge { margin-left: 0; padding: 4px 6px; font-size: 11px; }
.wc-why { display: inline-flex; align-items: center; gap: 2px; margin-left: auto; padding: 2px 2px 2px 6px; border: 0; border-radius: 5px; background: none; font: 600 12.5px/1.2 var(--f-text); color: var(--sign); cursor: pointer; }
.wc-why svg { width: 13px; height: 13px; }
.wc-why[aria-expanded="true"] svg { transform: rotate(180deg); }
.wc-why:hover { color: var(--signal-dark); }
.wc-r2 { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; margin-top: 3px; font-size: 13px; color: var(--muted); }
.wc-r2::before { content: ""; width: 16px; height: 10px; background: #8c95ad; -webkit-mask: var(--arr) center / contain no-repeat; mask: var(--arr) center / contain no-repeat; }
.wc-r2 > svg { width: 14px; height: 14px; flex: none; color: var(--ink-2); }
.wc-r2 > b { font-weight: 600; color: var(--ink); }
.wc-r2 .wc-ok { width: 16px; height: 16px; padding: 3px; border-radius: 50%; background: var(--ink); color: #fff; }
.wc-r2.none { display: block; padding-left: 22px; position: relative; color: var(--ink-2); }
.wc-r2.none::before { position: absolute; left: 0; top: 4px; }
.wc-r2.none .ws-btn { margin-top: 2px; }
.wc-row.none { border-style: dashed; border-color: #aab0bd; }
.wc-row.off .wc-r2 { opacity: 0.5; }
.wc-whybox { margin-top: 6px; padding-top: 7px; border-top: 1px dashed var(--win-rule); }
.wc-whybox .conds { margin-top: 0; }
.wc-whybox p { margin-top: 5px; font-size: 12.5px; line-height: 1.4; color: var(--ink-2); }
.wc-limit { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; font-weight: 500; color: var(--ink); }
.wc-limit .ws-step { flex-basis: 100%; }
.wc-auto { font-size: 13.5px; align-items: flex-start; }
.wc-auto .box { margin-top: 1px; }
.wc-quiet { font-size: 12.5px; color: var(--muted); }
.wc-foot { display: flex; align-items: center; gap: 8px; flex: none; padding: 10px 12px; border-top: 1px solid var(--win-rule); background: var(--win-bar); border-radius: 0 0 12px 12px; }
.wc-foot .link { flex: 1 1 auto; min-width: 0; margin-right: auto; justify-content: flex-start; text-align: left; white-space: normal; line-height: 1.2; }
.wc-foot .ws-btn:not(.link) { padding: 9px 16px; font-size: 14.5px; }

/* the simulation's own frame: where the windows sit on the desk */
.ws-desk > .ws-toast { position: absolute; z-index: 5; right: 12px; bottom: 10px; width: min(352px, calc(100% - 24px)); }
.ws-desk > .ws-consent { position: absolute; z-index: 3; right: 10px; bottom: 10px; width: min(400px, calc(100% - 20px)); max-height: calc(100% - 20px); --notch: 106px; }

/* under the screen: the label, the five steps of the flow, a note on the rule just shown, and a few extra tries */
.ws-under { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-top: 14px; }
.ws-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 4px; font-size: 13.5px; color: var(--muted); counter-reset: none; }
.ws-steps li { display: inline-flex; align-items: center; gap: 7px; }
.ws-steps li:not(:last-child)::after { content: ""; width: 18px; height: 1.5px; margin: 0 2px 0 3px; background: #b9bfcb; }
.ws-sn { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid #aab0bd; font: 700 12.5px/1 var(--f-sign); color: var(--muted); }
.ws-sn svg { width: 12px; height: 12px; }
.ws-steps .done .ws-sn { border-color: var(--ink); background: var(--ink); color: #fff; }
.ws-steps .done { color: var(--ink-2); }
.ws-steps .now .ws-sn { border-color: var(--signal-deep); background: var(--signal-deep); color: #fff; }
.ws-steps .now { color: var(--ink); font-weight: 600; }
.ws-rule { display: flex; gap: 9px; align-items: flex-start; margin-top: 12px; padding: 10px 13px; border-radius: 8px; background: var(--field); box-shadow: inset 3px 0 0 var(--sign); font-size: 14px; line-height: 1.45; color: var(--ink); }
.ws-rule svg { width: 15px; height: 15px; flex: none; margin-top: 2px; color: var(--sign); }
.ws-also { display: grid; gap: 14px; margin-top: 14px; }
.ws-cases .ws-lab { justify-content: flex-start; margin: 0 0 6px; }
.ws-cases ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: max-content minmax(0, 1fr); align-items: center; gap: 6px 12px; }
.ws-cases li { display: contents; }
.ws-cases li .ws-btn { justify-self: start; }
.ws-cases li small { font-size: 13px; line-height: 1.35; color: var(--muted); }

@media (prefers-reduced-motion: no-preference) {
  .ws-desk > .ws-toast:not([hidden]) { animation: ws-pop 0.45s cubic-bezier(0.16, 1, 0.3, 1); transform-origin: calc(100% - 112px) 100%; }
  .ws-desk > .ws-consent:not([hidden]) { animation: ws-pop 0.5s cubic-bezier(0.16, 1, 0.3, 1); transform-origin: calc(100% - 114px) 100%; }
  .ws-app:not([hidden]) { animation: ws-pop 0.45s cubic-bezier(0.16, 1, 0.3, 1); transform-origin: calc(100% - 124px) 100%; }
  .ws-browser:not([hidden]) { animation: ws-open 0.4s cubic-bezier(0.16, 1, 0.3, 1); transform-origin: 0 40%; }
  @keyframes ws-pop { from { opacity: 0; transform: translateY(12px) scale(0.97); } }
  @keyframes ws-open { from { opacity: 0; transform: scale(0.94); } }
  .ws-tray.pulse { animation: ws-pulse 0.65s ease-out; }
  @keyframes ws-pulse { from { box-shadow: 0 0 0 0 rgba(232, 85, 46, 0.85); } to { box-shadow: 0 0 0 12px rgba(232, 85, 46, 0); } }
  .wp-cta.on svg { animation: ws-live 1.4s ease-in-out infinite; }
  @keyframes ws-live { 50% { box-shadow: 0 0 0 5px rgba(232, 85, 46, 0.3); } }
  .ws-meter > span, .ws-bar > span { transition: width 0.35s cubic-bezier(0.16, 1, 0.3, 1); }
  .ws-r-x, .wc-why svg { transition: transform 0.2s; }
}

/* a narrow screen (tablets, phones): the windows stack in one cell of the desk, so it grows to fit them;
   the browser fills the width, the notice and the consent window overlay it from the bottom, the app's tabs go on top */
@container wsscreen (max-width: 700px) {
  .ws-desk { height: auto; min-height: 300px; display: grid; }
  .ws-desk > * { grid-area: 1 / 1; }
  .ws-desk > .ws-rest { position: static; align-self: center; justify-self: start; max-width: none; margin: 20px 0; }
  .ws-browser { position: relative; inset: auto; width: 100%; max-width: none; align-self: start; margin: 10px 0 56px; min-height: 380px; }
  .ws-desk > .ws-toast, .ws-desk > .ws-consent { position: relative; right: auto; bottom: auto; align-self: end; justify-self: end; margin: 0 4px 10px; max-height: none; --notch: 112px; }
  .ws-desk > .ws-toast { width: min(352px, calc(100% - 8px)); }
  .ws-desk > .ws-consent { width: min(420px, calc(100% - 8px)); margin-top: 10px; }
  .ws-desk > .ws-consent .wc-body { overflow: visible; }
  .ws-app { position: relative; inset: auto; align-self: start; margin: 8px 0 10px; }
  .ws-main { grid-template-columns: minmax(0, 1fr); }
  .ws-side-nav { padding: 8px; border-right: 0; border-bottom: 1px solid var(--win-rule); }
  .ws-tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 3px; }
  .ws-tab { flex-direction: column; justify-content: center; gap: 4px; padding: 8px 2px 7px; font-size: 12.5px; text-align: center; }
  .ws-tabsep { display: none; }
  .ws-tab.later { outline: 1px dashed #b9bfcb; outline-offset: -1px; }
  .ws-count { position: absolute; top: 3px; right: 6px; margin: 0; min-width: 18px; height: 18px; line-height: 18px; font-size: 11px; }
  .ws-today { grid-template-columns: auto auto minmax(60px, 1fr); align-items: center; gap: 10px; padding: 8px 4px 2px; }
  .ws-panel { overflow: visible; padding: 16px 14px 22px; }
  .ws-modes-help, .ws-segs { grid-template-columns: minmax(0, 1fr); }
  .ws-props { grid-template-columns: minmax(0, 1fr); margin-left: 10px; }
  .ws-lim { grid-template-columns: minmax(0, 1fr) auto; }
  .ws-lim .ws-meter { grid-column: 1 / -1; grid-row: 2; }
  .ws-lim2 { grid-template-columns: minmax(0, 1fr) auto; }
  .ws-lim2 > b { grid-column: 1 / -1; }
  .ws-lim2-r { justify-content: space-between; }
  .ws-tests li { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "n b" "s s" "m m"; }
  .ws-r summary { grid-template-columns: minmax(0, 1fr) auto 14px; grid-template-areas: "m chip x" "route route x" "t c x"; }
  .ws-r-t { padding-top: 0; }
  .ws-r-c { justify-self: end; }
  .ws-r-d { padding-left: 4px; }
  .ws-row { grid-template-columns: 10px 26px minmax(0, 1fr) auto; }
  .ws-row-c { display: none; }
  .ws-pager { justify-content: flex-start; }
  /* a page of the log is up to 200 entries: on a phone it scrolls in its own box instead of making the page endless */
  .ws-acts { max-height: min(560px, 72vh); overflow: auto; margin-inline: -4px; padding-inline: 4px; border-block: 1px solid var(--win-rule); scrollbar-width: thin; scrollbar-color: #b9bfcb transparent; }
  .ws-simtag { padding: 3px 7px; }
  .wb-page { padding: 12px 14px 16px; }
  .wp-h { font-size: 22px; }
  .wp-nav { display: none; }
}
@container wsscreen (max-width: 420px) {
  .ws-thost { display: none; }
  .wb-plus { display: none; }
  .wc-foot { flex-wrap: wrap; }
  .wc-foot .link { flex-basis: 100%; }
  .wc-foot .ws-btn:not(.link) { flex: 1; }
}

/* below 1000px the site card goes on top and the thread runs down into the screen */
@media (max-width: 1000px) {
  .ws { grid-template-columns: minmax(0, 1fr); }
  .ws-side { max-width: 560px; }
  .ws-thread { --len: 48px; left: 46px; top: 100%; width: 0; height: var(--len); margin: 0 0 0 -1px; border-top: 0; border-left: 2px dashed #9aa1af; }
  .ws-thread::before { left: -10px; top: -9px; }
  .ws-thread::after { left: -11px; right: auto; top: auto; bottom: -10px; }
  .is-open .ws-thread { --len: 58px; width: 6px; height: var(--len); margin: 0 0 0 -3px; }
  .is-open .ws-thread::before { left: -6px; top: -9px; }
  .is-open .ws-thread::after { left: -7px; top: auto; }
  .ws-rest svg { transform: rotate(90deg); }
}
@media (max-width: 600px) {
  .ws-screen.screen { padding: 16px 10px 0; }
  .ws-screen .taskbar { margin-inline: -10px; }
  .ws-desk > .ws-toast, .ws-desk > .ws-consent { --notch: 122px; }
  .ws-cb { padding: 14px 14px 16px; }
  .ws-cases ul { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .ws-cases li small { margin-bottom: 8px; }
  .ws-cases .ws-btn { white-space: normal; text-align: left; }
  .ws-steps li:not(.now) > span:last-child { display: none; }
  .ws-steps li:not(:last-child)::after { width: 10px; }
}

/* wide screens: the card and the visitor's screen share one grid row, so they always have the same height
   (the desk grows to fill it); the step strip sits above the screen, beside the site picker; notes and cases below it */
@media (min-width: 1001px) {
  .ws.on { grid-template-areas: "pick under" "card screen" ". after"; row-gap: 0; align-items: stretch; }
  .ws.on > .ws-side, .ws.on > .ws-right { display: contents; }
  .ws.on .ws-pick { grid-area: pick; margin-bottom: 18px; container: wsside / inline-size; }
  .ws.on .ws-card { grid-area: card; z-index: 2; }
  .ws.on .ws-screen { grid-area: screen; }
  .ws.on .ws-desk { flex: 1; height: auto; min-height: 600px; }
  .ws.on .ws-under { grid-area: under; align-self: end; margin: 0 0 18px; }
  .ws.on .ws-after { grid-area: after; }
}
