/* The headset's windows as HTML (htmlrender.js paints them into the scene). 1 CSS px = 1 visionOS point; the
   painter draws them at twice that. Measurements from the simulator captures (dist/shots/wf-*.png) and the
   wireframe (docs/wireframe/visionos-screens.md); colours from visionOS's glass and system colours. */
/* off screen, fixed so the windows stacked in it never make the page taller (a tall page tiled the whole view) */
#html-windows { position: fixed; left: -30000px; top: 0; width: 4000px; height: 0; overflow: visible; pointer-events: none; }
.vwin {
  position: relative; box-sizing: border-box; overflow: hidden;
  font-family: -apple-system, "SF Pro Text", "SF Pro", system-ui, "Helvetica Neue", Arial, sans-serif;
  color: #fff; -webkit-font-smoothing: antialiased;
  background: rgba(96, 96, 102, 0.62);   /* visionOS glass over a light room */
  border-radius: 46px;
  pointer-events: auto;   /* the holder is inert; the window takes the pointer the scene routes to it */
}
.vwin * { box-sizing: border-box; }
.vwin button { font: inherit; color: inherit; border: 0; background: none; padding: 0; margin: 0; }

/* the navigation bar: the title and the toolbar in one row */
.vwin .navbar { display: flex; align-items: center; gap: 16px; padding: 22px 24px 10px 28px; height: 76px; }
.vwin .navtitle { flex: 1; font-size: 29px; font-weight: 700; letter-spacing: -0.3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vwin .tb { width: 44px; height: 44px; border-radius: 22px; background: rgba(255,255,255,0.12); display: flex; align-items: center; justify-content: center; flex: none; }
.vwin .tb img { width: 22px; height: 22px; }
.vwin .tb.hover { background: rgba(255,255,255,0.26); }
.vwin .tb.pressed { background: rgba(255,255,255,0.08); }
.vwin .tb[disabled] { opacity: 0.35; }

/* a list's section: a header, then its rows grouped on a lighter glass */
.vwin .scroll { position: absolute; left: 0; right: 0; top: 76px; bottom: 0; overflow: hidden; padding: 6px 24px 24px; }
.vwin .sechead { display: flex; align-items: center; gap: 8px; padding: 10px 6px 8px 6px; min-height: 52px; }
.vwin .sechead img.big { width: 24px; height: 24px; opacity: 0.6; }
.vwin .sechead .names { display: flex; flex-direction: column; min-width: 0; }
.vwin .sechead .name { font-size: 17px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vwin .sechead .sub { font-size: 12px; color: rgba(255,255,255,0.55); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vwin .sechead .link { display: flex; align-items: center; gap: 5px; font-size: 13px; color: #ff9f0a; margin-left: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 1; }
.vwin .sechead .link img { width: 15px; height: 15px; }
.vwin .sechead .spacer { flex: 1; }
.vwin .sechead .menu-btn { width: 44px; height: 32px; border-radius: 16px; background: rgba(255,255,255,0.12); display: flex; align-items: center; justify-content: center; flex: none; }
.vwin .sechead .menu-btn img { width: 20px; height: 20px; }
.vwin .sechead .menu-btn.hover { background: rgba(255,255,255,0.26); }
.vwin .sectitle { font-size: 13px; font-weight: 600; color: rgba(255,255,255,0.55); text-transform: uppercase; padding: 14px 8px 6px; letter-spacing: 0.3px; }

.vwin .macsec.paused .sechead .names, .vwin .macsec.paused .sechead img.big, .vwin .macsec.paused .group { opacity: 0.45; }
.vwin .sechead .resume { display: flex; align-items: center; gap: 6px; height: 32px; padding: 0 14px; border-radius: 16px; background: rgba(255,255,255,0.16); font-size: 14px; font-weight: 600; flex: none; margin-right: 6px; }
.vwin .sechead .resume img { width: 15px; height: 15px; }
.vwin .sechead .resume.hover { background: rgba(255,255,255,0.28); }
.vwin .relaycard { display: flex; align-items: center; gap: 12px; padding: 12px 14px; margin: 0 0 10px; border-radius: 18px; background: rgba(255,159,10,0.14); }
.vwin .relaycard > img { width: 22px; height: 22px; flex: none; }
.vwin .relaycard .texts { flex: 1; min-width: 0; }
.vwin .relaycard .t { font-size: 15px; font-weight: 600; }
.vwin .relaycard .c { font-size: 12.5px; color: rgba(255,255,255,0.6); line-height: 1.3; margin-top: 2px; }
.vwin .relaycard .go { flex: none; padding: 8px 16px; border-radius: 18px; background: rgba(255,255,255,0.16); font-size: 14px; font-weight: 600; }
.vwin .relaycard .go.hover { background: rgba(255,255,255,0.28); }
/* Home: a Mac's route chip (Relay / Direct) and its popover */
.vwin .routechip { display: inline-block; vertical-align: middle; margin: -2px 0 0 8px; padding: 2px 9px; border-radius: 10px; font-size: 12px; font-weight: 600; line-height: 16px; }
.vwin .routechip.relay { background: rgba(255,159,10,0.22); color: #ff9f0a; }
.vwin .routechip.direct { background: rgba(48,209,88,0.20); color: #30d158; }
.vwin .routechip.hover { filter: brightness(1.25); }
.vwin .routechip.upd { background: rgba(10,132,255,0.22); color: #0a84ff; }   /* a newer Mac app on its feed (home.js updateBadge) */
.vwin .menu.routepop { padding: 8px 14px 12px; min-width: 330px; }
.vwin .routepop .rhead { display: flex; align-items: center; gap: 4px; font-size: 16px; font-weight: 600; padding: 4px 0 8px; }
.vwin .routepop .rhead .routechip { margin: 0 6px 0 0; }
.vwin .routepop .rline { display: flex; justify-content: space-between; gap: 16px; font-size: 14px; padding: 3px 0; color: rgba(255,255,255,0.6); }
.vwin .routepop .rline span:last-child { color: #fff; text-align: right; }
/* Home: a list's header, a row's trailing action, a card under a row */
.vwin .cchead { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 600; color: rgba(255,255,255,0.55); padding: 2px 8px 8px; }
.vwin .cchead img { width: 18px; height: 18px; }
.vwin .ccact { flex: none; font-size: 13px; color: rgba(255,255,255,0.55); }
.vwin .ccact.live { color: #30d158; font-weight: 600; }
.vwin .ccnote { display: flex; align-items: center; gap: 12px; padding: 10px 14px; margin: 0 12px 10px 42px; border-radius: 14px; background: rgba(255,159,10,0.14); }
.vwin .ccnote > img { width: 20px; height: 20px; flex: none; }
.vwin .ccnote .texts { flex: 1; min-width: 0; }
.vwin .ccnote .t { font-size: 14px; font-weight: 600; white-space: normal; }
.vwin .ccnote .c { font-size: 12.5px; color: rgba(255,255,255,0.6); line-height: 1.3; margin-top: 2px; white-space: normal; }
.vwin .ccnote .go { flex: none; padding: 6px 14px; border-radius: 16px; background: rgba(255,255,255,0.16); font-size: 14px; font-weight: 600; }
.vwin .ccnote .go.hover { background: rgba(255,255,255,0.28); }
.vwin .group { background: rgba(255,255,255,0.10); border-radius: 18px; overflow: hidden; margin-bottom: 14px; }
.vwin .row { display: flex; align-items: center; gap: 14px; padding: 0 18px; min-height: 58px; }
.vwin .row.hover { background: rgba(255,255,255,0.10); }
.vwin .row.pressed { background: rgba(255,255,255,0.05); }
.vwin .sep { height: 1px; background: rgba(255,255,255,0.10); margin-left: 42px; }
.vwin .dot { width: 10px; height: 10px; border-radius: 5px; background: rgba(255,255,255,0.4); flex: none; }
.vwin .dot.working { background: #0a84ff; }
.vwin .dot.attention { background: #ff9f0a; }
.vwin .row .check { width: 24px; height: 24px; flex: none; }
.vwin .row .texts { display: flex; flex-direction: column; min-width: 0; flex: 1; padding: 8px 0; }
.vwin .row .t { font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vwin .row .c { font-size: 13px; color: rgba(255,255,255,0.55); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vwin .row.quiet { min-height: 48px; }
.vwin .row.quiet .t { font-size: 15px; color: rgba(255,255,255,0.55); }
.vwin .row.more { min-height: 46px; gap: 8px; }
.vwin .row.more .t { font-size: 15px; color: #fff; }
.vwin .row.more img { width: 16px; height: 16px; opacity: 0.8; }

/* select mode's bar (callout type) */
.vwin .selbar { display: flex; align-items: center; gap: 18px; padding: 10px 18px; font-size: 15px; }
.vwin .selbar button { color: #fff; padding: 6px 2px; }
.vwin .selbar button.hover { color: rgba(255,255,255,0.7); }
.vwin .selbar .spacer { flex: 1; }
.vwin .selbar .danger { color: #ff453a; display: flex; align-items: center; gap: 6px; }
.vwin .selbar .danger img { width: 16px; height: 16px; }
.vwin .selbar .danger[disabled] { opacity: 0.35; }

/* an empty window: ContentUnavailableView */
.vwin .unavailable { position: absolute; left: 40px; right: 40px; top: 190px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; }
.vwin .unavailable img { width: 56px; height: 56px; opacity: 0.6; margin-bottom: 6px; }
.vwin .unavailable .h { font-size: 22px; font-weight: 700; }
.vwin .unavailable .d { font-size: 15px; color: rgba(255,255,255,0.6); line-height: 1.35; }
.vwin .unavailable .go { margin-top: 12px; padding: 10px 22px; border-radius: 22px; background: rgba(255,255,255,0.16); font-size: 17px; font-weight: 600; }
.vwin .unavailable .go.hover { background: rgba(255,255,255,0.28); }

/* a Menu, opened as a glass popover beside its button */
.vwin .menu { position: absolute; min-width: 290px; padding: 8px; border-radius: 24px; background: rgb(58, 58, 64); border: 1px solid rgba(255,255,255,0.14); z-index: 5; }
.vwin .menu .mi { display: flex; align-items: center; gap: 14px; padding: 0 16px; height: 46px; border-radius: 14px; font-size: 17px; white-space: nowrap; }
.vwin .menu .mi img { width: 20px; height: 20px; }
.vwin .menu .mi.hover { background: rgba(255,255,255,0.14); }
.vwin .menu .mi.danger { color: #ff453a; }
.vwin .menu .mi[disabled] { opacity: 0.35; }
.vwin .menu .div { height: 1px; background: rgba(255,255,255,0.12); margin: 6px 10px; }

/* ── the kit (windows/kit.js): what visionOS draws the same in every window ── */
.vplain { position: relative; box-sizing: border-box; overflow: visible; pointer-events: auto;
  font-family: -apple-system, "SF Pro Text", "SF Pro", system-ui, "Helvetica Neue", Arial, sans-serif; color: #fff; -webkit-font-smoothing: antialiased; }
.vplain * { box-sizing: border-box; }
.vplain button { font: inherit; color: inherit; border: 0; background: none; padding: 0; margin: 0; }
.vwin .spacer, .vplain .spacer, .vwin .grow, .vplain .grow { flex: 1; }
.vwin img.sym, .vplain img.sym { width: 18px; height: 18px; flex: none; }
.vwin span.sym, .vplain span.sym { width: 18px; flex: none; }
.vwin .menu .mi span.sym, .vplain .menu .mi span.sym { width: 20px; }
.vwin .secondary, .vplain .secondary { color: rgba(255,255,255,0.55); }
.vwin .caption, .vplain .caption { font-size: 12px; color: rgba(255,255,255,0.55); }

/* buttons: bordered (glass capsule), prominent (blue), plain (text), icon (circle) */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 40px; padding: 0 18px; border-radius: 20px; font-size: 16px; font-weight: 500; white-space: nowrap; flex: none; }
.btn.bordered { background: rgba(255,255,255,0.14); }
.btn.bordered.hover { background: rgba(255,255,255,0.26); }
.btn.prominent { background: #0a84ff; color: #fff; font-weight: 600; }
.btn.prominent.hover { background: #3395ff; }
.btn.plain { background: none; padding: 0 8px; }
.btn.plain.hover { background: rgba(255,255,255,0.10); }
.btn.icon { width: 40px; padding: 0; }
.btn.icon.hover { background: rgba(255,255,255,0.18); }
.btn.small { height: 30px; padding: 0 12px; font-size: 13px; border-radius: 15px; }
.btn.small img.sym { width: 14px; height: 14px; }
.btn.pressed, .tb.pressed, .mi.pressed, .row.pressed { opacity: 0.7; }
.btn[disabled] { opacity: 0.35; }
/* the windows' button reset (padding 0) outranks .btn: the kit's buttons keep their own padding */
.vwin .btn, .vplain .btn { padding: 0 18px; }
.vwin .btn.plain, .vplain .btn.plain { padding: 0 8px; }
.vwin .btn.icon, .vplain .btn.icon { padding: 0; }
.vwin .btn.small, .vplain .btn.small { padding: 0 12px; }
.vwin .btn.small.icon, .vplain .btn.small.icon { padding: 0; width: 30px; }

/* menus: sections and trailing symbols */
.vwin .menu .msec, .vplain .menu .msec { font-size: 12px; font-weight: 600; color: rgba(255,255,255,0.5); padding: 8px 16px 4px; text-transform: uppercase; letter-spacing: 0.3px; }
.vwin .menu .mi .spacer, .vplain .menu .mi .spacer { flex: 1; }
.vwin .menu .mi { width: 100%; }
.vplain .menu { position: absolute; min-width: 290px; padding: 8px; border-radius: 24px; background: rgb(58, 58, 64); border: 1px solid rgba(255,255,255,0.14); z-index: 5; }
.vplain .menu .mi { display: flex; align-items: center; gap: 14px; padding: 0 16px; height: 46px; border-radius: 14px; font-size: 17px; white-space: nowrap; width: 100%; }
.vplain .menu .mi.hover { background: rgba(255,255,255,0.14); }
.vplain .menu .mi img { width: 20px; height: 20px; }
.vplain .menu .div { height: 1px; background: rgba(255,255,255,0.12); margin: 6px 10px; }

/* segmented picker */
.seg { display: flex; height: 34px; padding: 3px; border-radius: 17px; background: rgba(0,0,0,0.22); gap: 2px; }
.seg button { flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px; border-radius: 14px; font-size: 14px; font-weight: 500; padding: 0 12px; white-space: nowrap; }
.seg button.on { background: rgba(255,255,255,0.92); color: #1c1c1e; font-weight: 600; }   /* tokens: controlOn, its label inkOnLight */
.seg button.hover { background: rgba(255,255,255,0.14); }
.seg button img { width: 15px; height: 15px; }

/* a switch in a row */
.toggle-row { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 48px; padding: 0 16px; font-size: 17px; text-align: left; }
.toggle-row img.sym { width: 20px; height: 20px; }
.switch { width: 51px; height: 31px; border-radius: 16px; background: rgba(255,255,255,0.18); position: relative; flex: none; }
.switch.on { background: #30d158; }
.switch .knob { position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 14px; background: #fff; }
.switch.on .knob { left: 22px; }

/* text fields */
.field { display: block; width: 100%; height: 44px; padding: 0 16px; border-radius: 22px; border: 1px solid rgba(255,255,255,0.12); background: rgba(0,0,0,0.28); color: #fff; font: inherit; font-size: 17px; outline: none; }
textarea.field { height: auto; min-height: 44px; padding: 11px 16px; resize: none; line-height: 22px; }
.field.hover { background: rgba(0,0,0,0.36); }
/* a field inside a grouped row (a Form's TextField): no box of its own */
.plainfield { display: block; min-width: 0; height: 44px; padding: 0; border: 0; background: transparent; color: #fff; font: inherit; font-size: 17px; outline: none; }
.plainfield.grow { flex: 1; }

.spin { width: 18px; height: 18px; opacity: 0.7; flex: none; }

/* sheets and alerts (centred with negative margins set from their size: no transforms in the painter) */
.scrim { position: absolute; left: 0; top: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.30); z-index: 8; }
.sheet { position: absolute; z-index: 9; border-radius: 40px; background: rgb(70, 70, 76); border: 1px solid rgba(255,255,255,0.14); overflow: hidden; display: flex; flex-direction: column; }
.sheetbar { display: flex; align-items: center; height: 72px; padding: 0 20px; flex: none; }
.sheetbar .lead, .sheetbar .trail { flex: 1; display: flex; gap: 8px; }
.sheetbar .trail { justify-content: flex-end; }
.sheetbar .title { font-size: 19px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sheetbody { flex: 1; overflow-y: auto; padding: 0 24px 24px; position: relative; }
.alert { position: absolute; left: 50%; top: 50%; width: 360px; margin-left: -180px; margin-top: -120px; z-index: 9; border-radius: 32px; background: rgb(70, 70, 76); border: 1px solid rgba(255,255,255,0.14); padding: 26px 22px 18px; display: flex; flex-direction: column; gap: 10px; text-align: center; }
.alert .at { font-size: 18px; font-weight: 700; }
.alert .am { font-size: 14px; color: rgba(255,255,255,0.7); line-height: 1.35; }
.alert .field { margin-top: 6px; text-align: left; }
.alert .abtns { display: flex; gap: 10px; margin-top: 8px; }
.alert .ab { flex: 1; height: 44px; border-radius: 22px; background: rgba(255,255,255,0.14); font-size: 16px; font-weight: 600; }
.alert .ab.hover { background: rgba(255,255,255,0.24); }
.alert .ab.destructive { color: #ff453a; }
.alert .ab.cancel { font-weight: 500; }
