/* ---- Passwords (pages/passwords.js ↔ components/pages/VaultPage.tsx, components/vault/) ----
   The vault, its live 2FA codes and the email aliases, on a page of its own
   left of Drive (13 Oct 2026). The look is the Shmangus feel
   (.claude/skills/shmangus-feel/SKILL.md): Passwords' candy is tangerine
   with cocoa ink, buttons sit on a lip, everything is 44px to aim at. */
.pw-shell {
  --pw-candy: #FF8A3D; --pw-lip: #C25E1F; --pw-ink: #2B2118; --pw-alias: #2E7D4F; --pw-blue: #4A7FE0;
  display: flex; flex-direction: column; flex: 1; min-height: 0; height: 100%;
}
.panel-card { --pw-candy: #FF8A3D; --pw-lip: #C25E1F; --pw-ink: #2B2118; --pw-alias: #2E7D4F; --pw-blue: #4A7FE0; }
/* The icons are stroked paths (icons.js): every one of Passwords' own, on the page and in its sheets, is drawn so. */
.pw-shell svg, .panel-card :is(.pw-sheet-head, .pw-round, .pw-btn, .pw-sec-top, .pw-sec-list, .pw-card, .pw-alias-hero, .pw-type, .pw-tools, .pw-file,
  .pw-pick, .pw-gen, .pw-seg, .pw-editor, .pw-ai, .pw-link, .pw-mark, .pw-fields, .pw-under, .pw-row-btns) svg { stroke: currentColor; fill: none; stroke-width: 36; }

/* -- buttons -- */
.pw-round { position: relative; flex: none; min-width: 44px; height: 44px; padding: 0; border-radius: 14px; border: 1px solid var(--border);
  border-bottom-width: 3px; background: var(--surface-solid, var(--surface)); color: var(--ink); display: inline-flex; align-items: center;
  justify-content: center; gap: 4px; cursor: pointer; transition: transform 70ms ease-out; -webkit-tap-highlight-color: transparent; }
.pw-round svg { width: 20px; height: 20px; stroke-width: 36; }
.pw-round:active { transform: translateY(2px); border-bottom-width: 1px; }
.pw-round:focus-visible { outline: 3px solid var(--ink-muted); outline-offset: 2px; }
.pw-round.quiet { color: var(--ink-muted); }
.pw-round.quiet:hover { color: var(--ink); }
.pw-round.candy { background: var(--pw-candy); border-color: var(--pw-lip); color: var(--pw-ink); }
.pw-round.candy svg { stroke-width: 48; }
.pw-round.fav { color: #E0A526; }
.pw-round.fav svg { fill: currentColor; }
.pw-round.on { color: var(--accent); }
.pw-round-badge { font: 900 15px/1 var(--arc-font, system-ui); }
.pw-round:has(.pw-round-badge) { padding: 0 10px; }
.pw-round.score.good { color: var(--success); }
.pw-round.score.warn { color: #B8640E; }
.pw-round.score.bad { color: var(--danger); }
.pw-round-spacer { display: inline-block; width: 44px; }

.pw-btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 48px; padding: 0 18px; border-radius: 16px;
  border: 1px solid var(--border); border-bottom-width: 4px; background: var(--surface-solid, var(--surface)); color: var(--ink);
  font: 700 15.5px/1.1 inherit; cursor: pointer; white-space: nowrap; transition: transform 70ms ease-out; -webkit-tap-highlight-color: transparent; }
.pw-btn svg { width: 17px; height: 17px; stroke-width: 40; flex: none; }
.pw-btn.primary { background: var(--pw-candy); border-color: var(--pw-lip); color: var(--pw-ink); font-family: var(--arc-font, inherit); font-weight: 900; }
.pw-btn.danger { color: var(--danger); }
.pw-btn:active:not(:disabled) { transform: translateY(2px); border-bottom-width: 2px; }
.pw-btn:disabled { opacity: 0.45; cursor: default; }
.pw-btn.wide { width: 100%; margin-top: 6px; }
.pw-btn > span { white-space: normal; overflow-wrap: break-word; }

.pw-link { display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-height: 44px; border: none; background: none;
  color: var(--accent); font-size: 14.5px; font-weight: 700; padding: 0 4px; cursor: pointer; }
.pw-link svg { width: 17px; height: 17px; stroke-width: 44; }
.pw-link.start { align-self: flex-start; }

/* -- first run, locked -- */
.pw-center { flex: 1; overflow-y: auto; display: flex; flex-direction: column; align-items: center; justify-content: flex-start;
  padding: calc(64px + env(safe-area-inset-top)) 20px 32px; text-align: center; }
.pw-form { max-width: 420px; margin: 0 auto; width: 100%; }
.pw-form .field, .pw-form .pw-secret-field { text-align: left; }
.pw-buddy { display: flex; justify-content: center; margin-bottom: 10px; }
.pw-lock-badge { width: 68px; height: 68px; border-radius: 22px; background: var(--pw-candy); box-shadow: 0 5px 0 var(--pw-lip); color: var(--pw-ink);
  display: flex; align-items: center; justify-content: center; margin-bottom: 18px; flex: none; }
.pw-lock-badge svg { width: 32px; height: 32px; stroke-width: 40; }
.pw-back-row { display: flex; width: 100%; margin-bottom: 8px; }
.pw-h { font: 900 24px/1.2 var(--arc-font, inherit); margin: 0 0 10px; color: var(--ink); }
.pw-h.small { font-size: 19px; }
.pw-center-text { margin: 0 0 16px; line-height: 1.45; }
.pw-points { list-style: none; padding: 0; margin: 0 0 18px; text-align: left; display: flex; flex-direction: column; gap: 8px; width: 100%; }
.pw-points li { display: flex; gap: 10px; align-items: flex-start; font-size: 14.5px; line-height: 1.4; color: var(--ink-muted); }
.pw-points li svg { width: 18px; height: 18px; flex: none; stroke: var(--pw-candy); stroke-width: 56; margin-top: 1px; }
.pw-secret-field { position: relative; width: 100%; }
.pw-secret-field .field { padding-right: 50px; }
.pw-eye { position: absolute; right: 2px; top: 2px; width: 44px; height: 44px; border: none; background: none; color: var(--ink-muted);
  display: flex; align-items: center; justify-content: center; border-radius: 12px; cursor: pointer; }
.pw-eye svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 34; }
.pw-eye:hover { color: var(--ink); }
.pw-error { color: var(--danger); font-size: 13.5px; margin: 2px 0 6px; text-align: left; width: 100%; }
.pw-error:empty { margin: 0; }
.pw-fine { font-size: 12.5px; color: var(--ink-faint); margin-top: 14px; }
.pw-meter-row { display: flex; align-items: center; gap: 10px; margin: -2px 0 8px; width: 100%; }
.pw-meter { display: flex; gap: 4px; flex: 1; }
.pw-meter span { flex: 1; height: 5px; border-radius: 3px; background: var(--border); }
.pw-meter.s0 span.on, .pw-meter.s1 span.on { background: var(--danger); }
.pw-meter.s2 span.on { background: #D9962B; }
.pw-meter.s3 span.on, .pw-meter.s4 span.on { background: var(--success); }
.pw-meter-label { font-size: 12px; font-weight: 700; min-width: 64px; text-align: right; }
.pw-meter-label.s0, .pw-meter-label.s1 { color: var(--danger); }
.pw-meter-label.s2 { color: #B87818; }
.pw-meter-label.s3, .pw-meter-label.s4 { color: var(--success); }
.pw-recovery { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 19px; font-weight: 700; letter-spacing: 1px;
  background: var(--surface-solid, var(--surface)); border: 1px dashed var(--ink-faint); border-radius: 14px; padding: 16px 14px; margin: 4px 0 12px;
  width: 100%; user-select: all; color: var(--ink); }
.pw-recovery span { white-space: nowrap; display: inline-block; }
.pw-row-btns { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin: 8px 0 10px; }
.pw-row-btns.start { justify-content: flex-start; }
.pw-row-btns.end { justify-content: flex-end; }
.pw-row-btns.spaced { margin-top: 18px; }
.pw-check { display: flex; gap: 10px; align-items: center; font-size: 14.5px; min-height: 44px; margin: 4px 0; cursor: pointer; color: var(--ink); }
.pw-check input { width: 20px; height: 20px; accent-color: var(--pw-candy); }
.pw-mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }

/* -- the top: search, the security score, settings, + ; the views -- */
.pw-top { padding: calc(52px + env(safe-area-inset-top)) 12px 4px; flex: none; display: flex; flex-direction: column; gap: 10px; }
.pw-toolbar { display: flex; gap: 6px; align-items: center; }
.pw-searchrow { flex: 1; display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 12px; border-radius: 14px; border: 1px solid var(--border);
  background: var(--surface-solid, var(--surface)); min-width: 0; cursor: text; }
.pw-searchrow svg { width: 17px; height: 17px; stroke: var(--ink-faint); stroke-width: 40; flex: none; }
.pw-search { flex: 1; border: none; background: none; font-size: 15.5px; color: var(--ink); padding: 0; height: 42px; outline: none; min-width: 0; }
.pw-chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; }
.pw-chips::-webkit-scrollbar { display: none; }
.pw-chip { flex: none; display: inline-flex; align-items: center; gap: 5px; height: 36px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--surface-solid, var(--surface)); color: var(--ink-muted); font-size: 13.5px; font-weight: 700; white-space: nowrap; cursor: pointer; position: relative; }
.pw-chip::after { content: ''; position: absolute; inset: -4px 0; }
.pw-chip svg { width: 15px; height: 15px; stroke-width: 40; }
.pw-chip.icon-only { width: 44px; padding: 0; justify-content: center; }
.pw-chip.on { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.pw-chip.on svg { fill: currentColor; fill-opacity: 0.18; }
.pw-chip .n { font-size: 12px; font-weight: 800; }

/* -- the list -- */
.pw-split { flex: 1; min-height: 0; display: flex; }
.pw-list { flex: 1; min-width: 0; overflow-y: auto; padding: 4px 6px 28px; }
.pw-detail { flex: 1; min-width: 0; overflow-y: auto; padding: 16px 18px 40px; }
.pw-split:not(.wide) .pw-detail { padding-top: calc(52px + env(safe-area-inset-top)); }
.pw-split.wide .pw-list { flex: none; width: 380px; border-right: 1px solid var(--border); }
.pw-split.wide .pw-detail { max-width: 720px; }
.pw-item { display: flex; align-items: center; gap: 12px; padding: 8px 8px 8px 10px; min-height: 60px; border-radius: 16px; cursor: pointer; outline: none; }
.pw-item:hover, .pw-item:focus-visible { background: var(--surface); }
.pw-item.open { background: var(--accent-soft); }
.pw-item-body { flex: 1; min-width: 0; }
.pw-item-name { font-size: 16px; font-weight: 650; color: var(--ink); display: flex; align-items: center; gap: 5px; min-width: 0; }
.pw-item-name.muted { color: var(--ink-muted); }
.pw-item-title { min-width: 0; white-space: normal; overflow-wrap: break-word; }
.pw-item-sub { font-size: 13.5px; color: var(--ink-muted); margin-top: 2px; display: flex; align-items: center; gap: 4px; min-width: 0; }
.pw-item-sub.bad { color: var(--danger); }
.pw-item-subtext { min-width: 0; white-space: normal; overflow-wrap: break-word; }
.pw-at { display: inline-flex; color: var(--pw-alias); flex: none; }
.pw-at.off { color: var(--ink-faint); }
.pw-at svg { width: 13px; height: 13px; stroke-width: 44; }
.pw-fav { display: inline-flex; color: #E0A526; flex: none; }
.pw-fav svg { width: 13px; height: 13px; fill: currentColor; stroke-width: 20; }
.pw-tile { --s: 40px; --t: #6C8EF5; flex: none; width: var(--s); height: var(--s); border-radius: calc(var(--s) * 0.3); background: var(--t);
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.22); color: var(--ti, #fff); font: 900 calc(var(--s) * 0.42)/1 var(--arc-font, inherit);
  display: flex; align-items: center; justify-content: center; overflow: hidden; }
.pw-tile.typed svg { width: 52%; height: 52%; stroke: var(--ti, #fff); stroke-width: 36; }
.pw-alias-tile { --t: var(--pw-alias); }
.pw-alias-tile.off { --t: var(--ink-faint); }
.pw-alias-tile svg { width: 54%; height: 54%; stroke: #fff; stroke-width: 44; }
.pw-status { font-size: 12.5px; color: var(--ink-muted); padding: 4px 10px 8px; }
.pw-trash-bar { display: flex; padding: 4px 8px 10px; }
.pw-empty { text-align: center; padding: 44px 24px; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.pw-empty p { margin: 0 0 6px; max-width: 320px; }
.pw-empty-t { font: 900 18px/1.25 var(--arc-font, inherit); color: var(--ink); }
.pw-alias-row .switch { flex: none; margin-right: 6px; }
.pw-addr { display: flex; min-width: 0; }
.pw-addr-local { flex: none; max-width: 100%; white-space: normal; overflow-wrap: break-word; }
.pw-addr-domain { min-width: 0; color: var(--ink-muted); font-weight: 600; white-space: normal; overflow-wrap: break-word; }

/* -- live 2FA codes -- */
.pw-code { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 10px 0 8px; border-radius: 13px; border: 1px solid var(--border);
  background: var(--surface-solid, var(--surface)); color: var(--accent); cursor: pointer; font: 700 16px/1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: 0.5px; }
.pw-code:hover { border-color: var(--accent); }
.pw-code.low { color: var(--danger); }
.pw-code.big { height: auto; padding: 4px 0; border: none; background: none; font-size: 27px; letter-spacing: 1.5px; gap: 10px; margin-top: 2px; }
.pw-code-n { white-space: nowrap; }
.pw-ring { --p: 1; position: relative; width: 22px; height: 22px; border-radius: 50%; flex: none; font: 700 11px/1 system-ui, sans-serif; color: var(--ink-muted);
  letter-spacing: 0; display: flex; align-items: center; justify-content: center; isolation: isolate; }
.pw-ring::before { content: ''; position: absolute; inset: 0; z-index: -1; border-radius: 50%;
  background: conic-gradient(var(--accent) calc(var(--p) * 360deg), var(--border) 0);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 3px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 3px)); }
.pw-code.low .pw-ring { color: var(--danger); }
.pw-code.low .pw-ring::before { background: conic-gradient(var(--danger) calc(var(--p) * 360deg), var(--border) 0); }
.pw-code.big .pw-ring { width: 30px; height: 30px; }
.pw-code-bad { flex: none; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; color: var(--danger); }
.pw-code-bad svg { width: 18px; height: 18px; stroke-width: 40; }
.pw-code-row { display: flex; align-items: center; gap: 12px; padding: 10px 6px 10px 10px; border-radius: 16px; }
.pw-code-row.open { background: var(--accent-soft); }
.pw-ai-mark { display: inline-flex; color: var(--accent); flex: none; }
.pw-ai-mark svg { width: 13px; height: 13px; stroke-width: 34; }

/* -- one item -- */
.pw-d-actions { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.pw-d-actions .grow { flex: 1; }
.pw-d-head { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.pw-d-title { flex: 1; min-width: 0; }
.pw-d-name { font: 900 21px/1.25 var(--arc-font, inherit); color: var(--ink); display: block; overflow-wrap: anywhere; }
.pw-d-type { font-size: 13px; }
.pw-icon-btn { width: 44px; height: 44px; border: none; background: none; border-radius: 12px; color: var(--ink-muted);
  display: flex; align-items: center; justify-content: center; flex: none; cursor: pointer; }
.pw-icon-btn:hover { background: var(--bg); color: var(--ink); }
.pw-icon-btn svg { width: 19px; height: 19px; stroke-width: 34; }
.pw-fields, .pw-card { border: 1px solid var(--border); border-bottom-width: 4px; border-radius: 18px; background: var(--surface-solid, var(--surface)); overflow: hidden; }
.pw-card { padding: 14px; }
.pw-field { display: flex; align-items: center; gap: 2px; min-height: 56px; padding: 8px 4px 8px 14px; border-bottom: 1px solid var(--border); }
.pw-field:last-child { border-bottom: none; }
.pw-field-main { flex: 1; min-width: 0; }
.pw-field-l { font-size: 12px; font-weight: 700; color: var(--ink-muted); margin-bottom: 2px; }
.pw-field-v { font-size: 16px; color: var(--ink); white-space: normal; display: block; overflow-wrap: break-word; }
.pw-field-v.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 15px; }
.pw-field-v.link { color: var(--accent); text-decoration: none; }
.pw-tags { display: flex; gap: 6px; margin-top: 5px; flex-wrap: wrap; }
.pw-tag { font-size: 11.5px; font-weight: 700; border-radius: 999px; padding: 2px 8px; background: var(--bg); color: var(--ink-muted); }
.pw-tag.s0, .pw-tag.s1, .pw-tag.bad { background: rgba(179, 64, 46, 0.12); color: var(--danger); }
.pw-tag.s2, .pw-tag.warn { background: rgba(217, 150, 43, 0.16); color: #A86A12; }
.pw-tag.s3, .pw-tag.s4 { background: rgba(46, 125, 79, 0.12); color: var(--success); }
.pw-mark { position: relative; display: inline-flex; align-items: center; gap: 5px; min-height: 32px; margin-top: 6px; padding: 0 11px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface); color: var(--ink-muted); font-size: 13px; font-weight: 700; cursor: pointer; }
.pw-mark::after { content: ''; position: absolute; inset: -6px -2px; }
.pw-mark svg { width: 14px; height: 14px; stroke-width: 44; flex: none; }
.pw-mark.on { color: var(--pw-alias); border-color: rgba(46, 125, 79, 0.35); background: rgba(46, 125, 79, 0.08); }
.pw-mark.hide { color: #B85A12; border-color: rgba(255, 138, 61, 0.55); background: rgba(255, 138, 61, 0.1); min-height: 36px; }
.pw-mark.twofa.offered { color: var(--pw-blue); border-color: rgba(59, 111, 214, 0.5); background: rgba(59, 111, 214, 0.1); }
.pw-mark:disabled { opacity: 0.55; }
.pw-quick-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.pw-quick-row .pw-mark { margin-top: 0; }
.pw-notes { margin-top: 12px; border: 1px solid var(--border); border-bottom-width: 4px; border-radius: 18px; background: var(--surface-solid, var(--surface)); padding: 12px 14px; }
.pw-notes-v { white-space: pre-wrap; font-size: 15px; line-height: 1.45; color: var(--ink); word-break: break-word; }
.pw-history { margin-top: 12px; }
.pw-history summary { cursor: pointer; font-size: 14px; font-weight: 600; color: var(--ink-muted); min-height: 44px; display: flex; align-items: center; }
.pw-foot { font-size: 12px; margin: 14px 2px 8px; color: var(--ink-muted); }

/* "Let the assistant sign in with this" */
.pw-ai { border: 1px solid var(--border); border-bottom-width: 4px; border-radius: 18px; background: var(--surface-solid, var(--surface)); padding: 12px 14px 4px; margin-top: 12px; }
.pw-editor .pw-ai { margin-top: 0; }
.pw-ai-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.pw-ai-row > svg { width: 19px; height: 19px; flex: none; stroke: var(--accent); stroke-width: 32; }
.pw-ai-t { flex: 1; min-width: 0; font-size: 15px; font-weight: 600; color: var(--ink); }
.pw-ai .pw-hint { margin: 0 0 8px; }
.pw-ai .switch, .pw-grant .switch, .pw-card .switch, .pw-alias-row .switch { cursor: pointer; }
.pw-grant-intro { margin: 4px 0 12px; font-size: 13.5px; line-height: 1.45; }
.pw-grant .pw-item-name { display: block; }
.pw-grant { gap: 10px; padding-right: 12px; }
.pw-grant-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; border: none; background: none; padding: 0; text-align: left; cursor: pointer; font: inherit; min-height: 44px; }

/* -- sheets -- */
.pw-sheet-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
/* The editor's head: stuck to the top of the sheet (panel-body pads 18px), the form scrolling under it. */
.panel-body > .pw-sheet-head.pinned { position: sticky; top: -18px; z-index: 2; margin: -18px -18px 14px; padding: 18px 18px 10px; background: var(--bg); }
.pw-sheet-title { flex: 1; min-width: 0; font: 900 20px/1.2 var(--arc-font, inherit); color: var(--ink); white-space: normal; overflow-wrap: break-word; }
.pw-sheet-right { display: flex; gap: 8px; justify-content: flex-end; min-width: 44px; }
.pw-label { font-size: 12.5px; font-weight: 700; color: var(--ink-muted); margin: 8px 0 6px; }
.pw-label.spaced { margin-top: 16px; }
.pw-type-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
@media (max-width: 360px) { .pw-type-grid { grid-template-columns: 1fr 1fr; } }
.pw-type { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 16px 6px; border-radius: 18px; border: 1px solid var(--border); border-bottom-width: 4px;
  background: var(--surface-solid, var(--surface)); color: var(--ink); font-size: 14.5px; font-weight: 700; cursor: pointer; }
.pw-type:active { transform: translateY(2px); border-bottom-width: 2px; }
.pw-type.wide { flex-direction: row; width: 100%; margin-top: 10px; padding: 10px 14px 10px 12px; gap: 12px; text-align: left; }
.pw-type.wide .grow { flex: 1; }
.pw-type.wide > svg { width: 16px; height: 16px; stroke: var(--ink-faint); fill: none; stroke-width: 44; }
.pw-type-icon { width: 44px; height: 44px; border-radius: 14px; display: flex; align-items: center; justify-content: center; }
.pw-type-icon svg { width: 22px; height: 22px; stroke: #fff; fill: none; stroke-width: 40; }
.pw-editor { margin-top: 2px; }
.pw-ed-field { margin-bottom: 4px; }
.pw-with-btn { display: flex; gap: 6px; align-items: flex-start; }
.pw-with-btn > .field, .pw-with-btn > .pw-secret-field { flex: 1; min-width: 0; }
.pw-with-btn > .pw-round { height: 46px; }
.pw-under { display: flex; margin: -4px 0 8px; }
.pw-under .pw-mark { margin-top: 0; }
.pw-alias-ok { display: inline-flex; align-items: center; gap: 5px; color: var(--pw-alias); font-size: 13px; font-weight: 700; }
.pw-alias-ok svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 44; }
.pw-hint { font-size: 13px; color: var(--ink-muted); line-height: 1.4; margin: -4px 2px 8px; }
.pw-hint:empty { display: none; }
.pw-hint.bad { color: var(--danger); }
.pw-hint.good { color: var(--success); }
.pw-two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pw-custom { display: flex; gap: 6px; align-items: flex-start; }
.pw-custom .field { flex: 1; min-width: 0; }
.pw-custom .pw-round { height: 46px; }

.pw-gen-out { font-size: 20px; font-weight: 600; line-height: 1.4; word-break: break-all; background: var(--surface-solid, var(--surface)); border: 1px solid var(--border);
  border-radius: 16px; padding: 16px; margin-bottom: 10px; min-height: 64px; color: var(--ink); }
.pw-gen-out .d { color: #2F6FD6; }
.pw-gen-out .y { color: #C2461F; }
.pw-gen-controls { margin-top: 8px; display: flex; flex-direction: column; }
.pw-gen-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; padding: 0 2px; border-bottom: 1px solid var(--border); font-size: 15.5px; }
.pw-gen-slider { display: flex; align-items: center; gap: 10px; flex: 1; justify-content: flex-end; }
.pw-gen-slider input { width: min(220px, 50vw); accent-color: var(--pw-candy); height: 30px; }
.pw-gen-n { min-width: 26px; text-align: right; font: 900 16px/1 var(--arc-font, inherit); }
.pw-seg { display: flex; gap: 3px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 3px; margin-bottom: 4px; }
.pw-seg button { flex: 1; min-width: 0; display: inline-flex; align-items: center; justify-content: center; gap: 5px; height: 40px; border: none; background: none;
  border-radius: 11px; font-weight: 700; font-size: 14px; color: var(--ink-muted); cursor: pointer; }
.pw-seg button svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 36; flex: none; }
.pw-seg button span { white-space: normal; overflow-wrap: break-word; }
.pw-seg button.on { background: var(--ink); color: var(--bg); }
@media (max-width: 359px) { .pw-card .pw-seg button svg { display: none; } }

/* the security check */
.pw-sec-top { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; }
.pw-score-ring { --p: 1; --c: var(--success); position: relative; width: 96px; height: 96px; flex: none; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  isolation: isolate; font: 900 30px/1 var(--arc-font, inherit); color: var(--c); }
.pw-score-ring::before { content: ''; position: absolute; inset: 0; z-index: -1; border-radius: 50%; background: conic-gradient(var(--c) calc(var(--p) * 360deg), var(--border) 0);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 9px), #000 calc(100% - 9px)); mask: radial-gradient(farthest-side, transparent calc(100% - 9px), #000 calc(100% - 9px)); }
.pw-score-ring.mid { --c: #A86A12; }
.pw-score-ring.bad { --c: var(--danger); }
.pw-sec-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.pw-sec-text .pw-buddy { margin: 0; }
.pw-sec-text .pw-hint { margin: 0; }
.pw-sec-t { font-size: 17px; font-weight: 800; color: var(--ink); }
.pw-leak-card { margin-bottom: 12px; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.pw-leak-card .pw-hint { margin: 0; }
.pw-card-row { display: flex; align-items: center; gap: 10px; width: 100%; }
.pw-card-row > svg { width: 20px; height: 20px; flex: none; stroke-width: 36; color: var(--danger); }
.pw-card-t { flex: 1; min-width: 0; font-size: 15.5px; font-weight: 650; color: var(--ink); }
.pw-sec-list { padding: 0; }
.pw-sec-group + .pw-sec-group { border-top: 1px solid var(--border); }
.pw-sec-row { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 52px; padding: 0 14px; border: none; background: none; text-align: left; cursor: pointer; color: var(--ink); font: inherit; }
.pw-sec-row:disabled { cursor: default; }
.pw-sec-row > svg { width: 16px; height: 16px; stroke: var(--ink-faint); stroke-width: 44; flex: none; }
.pw-sec-icon { width: 32px; height: 32px; border-radius: 10px; display: flex; align-items: center; justify-content: center; flex: none; background: var(--surface); }
.pw-sec-icon svg { width: 18px; height: 18px; stroke-width: 36; }
.pw-sec-title { flex: 1; min-width: 0; font-size: 15.5px; font-weight: 600; white-space: normal; overflow-wrap: break-word; }
.pw-sec-n { font: 900 17px/1 var(--arc-font, inherit); min-width: 22px; text-align: right; }
.pw-sec-pad { width: 16px; flex: none; }
.pw-sec-group.bad .pw-sec-icon { background: rgba(179, 64, 46, 0.12); color: #B3402E; } .pw-sec-group.bad .pw-sec-n { color: #B3402E; }
.pw-sec-group.warn .pw-sec-icon { background: rgba(168, 106, 18, 0.14); color: #A86A12; } .pw-sec-group.warn .pw-sec-n { color: #A86A12; }
.pw-sec-group.info .pw-sec-icon { background: rgba(59, 111, 214, 0.12); color: var(--pw-blue); } .pw-sec-group.info .pw-sec-n { color: var(--pw-blue); }
.pw-sec-group.mute .pw-sec-icon { background: rgba(122, 140, 163, 0.15); color: #6A7B92; } .pw-sec-group.mute .pw-sec-n { color: #6A7B92; }
.pw-sec-group.clear .pw-sec-icon { background: var(--surface); color: var(--success); }
.pw-sec-group.clear .pw-sec-title, .pw-sec-group.clear .pw-sec-n { color: var(--ink-faint); }
.pw-sec-items { padding: 0 14px 10px; }
.pw-sec-items .pw-hint { margin: 0 0 6px; }
.pw-sec-item { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; text-align: left; border: none; background: none; padding: 0 4px; border-radius: 10px; color: var(--ink); font-size: 15px; cursor: pointer; }
.pw-sec-item:hover { background: var(--surface); }
.pw-sec-item > span:not(.pw-tile) { flex: 1; min-width: 0; white-space: normal; overflow-wrap: break-word; }
.pw-sec-item > .pw-sec-leak { flex: none; color: #B3402E; font-size: 12.5px; font-weight: 700; }
.pw-sec-item > svg { width: 14px; height: 14px; stroke: var(--ink-faint); stroke-width: 44; flex: none; }

/* settings, import */
.pw-tools { display: flex; flex-direction: column; }
.pw-tool-row { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 60px; text-align: left; border: none; background: none; padding: 8px 4px;
  border-bottom: 1px solid var(--border); color: var(--ink); font: inherit; cursor: pointer; }
.pw-tool-row.static { cursor: default; }
.pw-tool-row:hover:not(.static) { background: var(--surface); }
.pw-tool-row > svg { width: 16px; height: 16px; stroke: var(--ink-faint); fill: none; stroke-width: 44; flex: none; }
.pw-tool-icon { width: 38px; height: 38px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); display: flex; align-items: center; justify-content: center; flex: none; }
.pw-tool-icon svg { width: 19px; height: 19px; stroke: var(--ink); fill: none; stroke-width: 34; }
.pw-tool-row .pw-hint { margin: 2px 0 0; }
.pw-tool-t { font-size: 15.5px; font-weight: 650; }
.pw-tool-grow { flex: 1; min-width: 0; }
.pw-select { width: auto; flex: none; height: 44px; padding: 0 10px; }
.pw-tools-foot { margin-top: 14px; text-align: center; }
.pw-steps { padding-left: 20px; margin: 4px 0 14px; display: flex; flex-direction: column; gap: 6px; font-size: 14.5px; color: var(--ink); line-height: 1.4; }
.pw-file { display: flex; align-items: center; justify-content: center; gap: 8px; border: 1.5px dashed var(--ink-faint); border-radius: 18px; padding: 22px;
  color: var(--accent); font-weight: 700; cursor: pointer; margin-bottom: 12px; }
.pw-file.candy { border-color: var(--pw-candy); background: rgba(255, 138, 61, 0.08); color: #B85A12; }
.pw-file input { display: none; }
.pw-file svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 34; }
.pw-add-out { margin-top: 6px; }
.pw-add-h { margin: 10px 0 8px; text-align: left; }
.pw-add-out .pw-fields { margin-bottom: 10px; }
.pw-pick { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 56px; padding: 8px 12px; border: none; border-bottom: 1px solid var(--border);
  background: none; text-align: left; cursor: pointer; color: var(--accent); font: inherit; }
.pw-pick:last-child { border-bottom: none; }
.pw-pick:hover { background: var(--bg); }
.pw-pick > svg { width: 22px; height: 22px; flex: none; stroke: currentColor; fill: none; stroke-width: 34; }

/* one alias */
.pw-alias-hero { display: flex; flex-direction: column; align-items: center; gap: 12px; margin-bottom: 14px; }
.pw-alias-addr { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 48px; padding: 10px 14px; border-radius: 14px; border: 1px solid var(--border);
  background: var(--surface-solid, var(--surface)); color: var(--ink); font: 700 16px/1.3 inherit; cursor: pointer; text-align: center; }
.pw-alias-addr span { flex: 1; min-width: 0; overflow-wrap: break-word; }
.pw-alias-addr svg { width: 19px; height: 19px; stroke: var(--ink-muted); fill: none; stroke-width: 36; flex: none; }
.pw-card .pw-card-row { margin-bottom: 4px; }
.pw-card .pw-card-row > svg { color: var(--pw-alias); }
.pw-stat { font-size: 12.5px; color: var(--ink-faint); margin-top: 12px; }
.pw-uses { padding: 4px 6px; }
.pw-use { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 48px; border: none; background: none; padding: 0 8px; border-radius: 10px; color: var(--ink);
  font: 600 15.5px/1.2 inherit; cursor: pointer; text-align: left; }
.pw-use:hover { background: var(--surface); }
.pw-use > span:not(.pw-tile) { flex: 1; min-width: 0; white-space: normal; overflow-wrap: break-word; }
.pw-use > svg { width: 15px; height: 15px; stroke: var(--ink-faint); fill: none; stroke-width: 44; flex: none; }

/* -- the browser extension: "Connect this browser", and its sheet -- */
.pw-ext-nudge { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 10px 12px; margin: 6px 4px 8px;
  padding: 10px 10px 10px 12px; border: 1px solid var(--border); border-bottom-width: 3px; border-radius: 18px;
  background: var(--surface-solid, var(--surface)); text-align: left; width: auto; max-width: 560px; }
/* A narrow screen: the button takes its own row under the words. */
@media (max-width: 480px) {
  .pw-ext-nudge { grid-template-columns: auto minmax(0, 1fr) auto; }
  .pw-ext-nudge .pw-ext-x { grid-column: 3; grid-row: 1; }
  .pw-ext-nudge .pw-ext-go { grid-column: 1 / -1; grid-row: 2; width: 100%; }
}
.pw-center .pw-ext-nudge { margin: 22px 0 0; width: 100%; }
.pw-ext-mark { width: 40px; height: 40px; border-radius: 13px; background: var(--pw-candy); box-shadow: 0 3px 0 var(--pw-lip); color: var(--pw-ink);
  display: flex; align-items: center; justify-content: center; flex: none; }
.pw-ext-mark svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 40; }
.pw-ext-nudge .pw-tool-grow { min-width: 0; }
.pw-ext-nudge .pw-hint { margin: 1px 0 0; }
.pw-ext-nudge .pw-btn { min-height: 44px; padding: 0 16px; flex: none; }
.pw-ext { display: flex; flex-direction: column; gap: 6px; }
.pw-ext-state { display: flex; align-items: center; gap: 14px; padding: 6px 2px 14px; }
.pw-ext-state > svg { width: 30px; height: 30px; flex: none; stroke: var(--ink-muted); fill: none; stroke-width: 36; }
.pw-ext-state.good > svg { stroke: var(--success); stroke-width: 48; }
.pw-ext-state .pw-hint { margin: 2px 0 0; }
.pw-ext .pw-link { align-self: center; }
.pw-ext-fine { text-align: center; margin: 0 8px; }
a.pw-btn { text-decoration: none; box-sizing: border-box; }
.pw-ext-line { margin: -4px 2px 10px; }
.pw-ext-link { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 14px; border: 1px solid var(--border); border-radius: 16px;
  background: var(--surface-solid, var(--surface)); font-weight: 700; font-size: 16px; overflow-wrap: anywhere; }
.pw-ext-link svg { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 34; }
.pw-ext .pw-row-btns { margin: 10px 0 8px; }
.pw-ext .pw-row-btns .pw-btn { flex: 1; }
.pw-ext-wait { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; color: var(--ink-muted); font-size: 13.5px; }
.pw-ext-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--pw-candy); animation: pw-ext-pulse 1.4s ease-in-out infinite; }
@keyframes pw-ext-pulse { 0%, 100% { opacity: 0.25; transform: scale(0.8); } 50% { opacity: 1; transform: scale(1.1); } }
@media (prefers-reduced-motion: reduce) { .pw-ext-dot { animation: none; } }
.pw-ext-nudge .pw-ext-x { flex: none; }
