/* onbleu web: passkeys and "Keep me signed in" (claude-web-passkeys-20261118).
   Presentation only. Colours come from the shell's own tokens (and the
   first-impression card's when that layer is present); no new colour, no
   overshoot, 150 ms fades, 44 px touch targets on touch screens. */

/* Sign-in card: Keep me signed in, after the password field. */
#login .okeep{margin:-4px 0 12px}
#login .okeep-box{display:inline-flex;align-items:center;gap:10px;min-height:36px;margin:0;padding:0;font-size:14px;line-height:1.3;
  color:var(--fi-ink,var(--ink));cursor:pointer;text-transform:none;letter-spacing:0;font-weight:400}
#login .okeep-box input{flex:0 0 18px;width:18px;height:18px;min-height:0;margin:0;padding:0;accent-color:var(--fi-primary,var(--ink));cursor:pointer}
/* Above the first-impression layer's 22% ring (html.fi-auth #login input:focus), which is too faint on a checkbox. */
html.fi-auth #login .okeep-box input[type=checkbox]:focus-visible,#login .okeep-box input[type=checkbox]:focus-visible{outline:2px solid var(--fi-accent,var(--bleu,var(--miami)));outline-offset:2px;box-shadow:none}
#login #keepRow p.okeep-note{text-wrap:balance;margin:2px 0 0 28px;font-size:12.5px;line-height:1.45;color:var(--fi-mut,var(--stone,var(--mut)))}
@media (pointer:coarse){#login .okeep-box{min-height:44px}}

/* Sign-in card: the passkey button and its device note. */
#login .opk-row-signin{margin:0 0 12px;animation:opk-fade 150ms var(--fi-ease,ease-out) both}
#login .opk-row-signin[hidden]{display:none}
/* Pending (the gate was on last time in this browser, or has never answered here): the row keeps its place, unseen and inert (no layout shift, nothing to press). */
#login .opk-row-signin[data-gate="pending"]{visibility:hidden;pointer-events:none;animation:none}
#login .opk-row-plain{margin-top:10px}
#login .opk-btn{width:100%;justify-content:center;gap:8px;min-height:48px}
/* The same height as "Email me a sign-in link" (the first-impression layer sets #magicSend from --fi-control), at its
   final 48px from the first frame: --fi-control starts at 44px and becomes 48px when the shell's late stylesheet lands,
   and the row must not grow then (a layout shift of its own). */
html.fi-auth #login #passkeyBtn.opk-btn{min-height:max(48px,var(--fi-control,48px))!important}
#login .opk-btn .opk-ic{flex:0 0 18px;color:currentColor}
#login .opk-btn[aria-busy="true"]{opacity:.72;cursor:progress}
#login #passkeyRow p.opk-note{text-wrap:balance;margin:8px 0 0;font-size:12.5px;line-height:1.45;color:var(--fi-mut,var(--stone,var(--mut)));text-align:center}
@keyframes opk-fade{from{opacity:0}to{opacity:1}}

/* Account & security: the Passkeys card. */
.opk-card .opk-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}
.opk-card .opk-head h2{margin:0}
.opk-card .opk-intro{margin:4px 0 0;max-width:46ch}
.opk-card .opk-add{flex:0 0 auto;display:inline-flex;align-items:center;gap:8px;white-space:nowrap}
.opk-card .opk-list{list-style:none;margin:14px 0 0;padding:0;border-top:1px solid var(--hairline,var(--line))}
.opk-card .opk-row,.opk-card .opk-empty,.opk-card .opk-failed{display:flex;flex-wrap:wrap;align-items:center;gap:10px 12px;min-height:56px;padding:10px 0;
  border-bottom:1px solid var(--hairline,var(--line))}
.opk-card .opk-empty{min-height:48px}
.opk-card .opk-failed{justify-content:space-between;color:var(--ink)}
.opk-card .opk-badge{flex:0 0 32px;display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:8px;
  background:color-mix(in srgb,var(--ink) 6%,transparent);color:var(--ink)}
.opk-card .opk-main{flex:1 1 180px;min-width:0;display:flex;flex-direction:column;gap:2px}
.opk-card .opk-main[hidden]{display:none}
.opk-card .opk-name,.opk-card .opk-confirm bdi{unicode-bidi:isolate}
.opk-card .opk-name{font-weight:600;color:var(--ink);overflow-wrap:anywhere}
.opk-card .opk-meta{display:block;white-space:normal}
.opk-card .opk-actions,.opk-card .opk-edit-actions{display:inline-flex;flex-wrap:wrap;gap:8px}
.opk-card .opk-actions[hidden]{display:none}
.opk-card .opk-edit{flex:1 1 260px;display:flex;flex-wrap:wrap;align-items:center;gap:8px}
.opk-card .opk-label{flex:0 0 100%;font-size:12.5px;color:var(--stone,var(--mut))}
.opk-card .opk-input{flex:1 1 180px;min-width:0;width:auto}
.opk-card .opk-confirm{flex:0 0 100%;display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px 12px;padding:10px 12px;
  border:1px solid var(--hairline,var(--line));border-radius:8px;background:color-mix(in srgb,var(--carmine) 5%,transparent)}
.opk-card .opk-confirm p{margin:0;flex:1 1 220px}
/* Remove passkey: the shell's .btn.danger look (its own values and tokens), restated here because the Security panel's button rules are more specific. */
#accountPasskeys .opk-confirm .btn.danger{background:var(--card);border-color:color-mix(in srgb,var(--alert,var(--carmine)) 45%,var(--hairline,var(--line)));color:var(--alert,var(--carmine))}
#accountPasskeys .opk-confirm .btn.danger:hover{background:color-mix(in srgb,var(--alert,var(--carmine)) 8%,var(--card))}
.opk-card .opk-field-err{flex:0 0 100%;margin:0;font-size:12.5px;color:var(--carmine)}
/* Empty: out of sight but still in the accessibility tree, so its role=alert is read when words arrive. */
.opk-card .opk-field-err:empty:not(.opk-hold){position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.opk-card .opk-input[aria-invalid="true"]{border-color:var(--carmine)}
.opk-card .btn[aria-disabled="true"],.opk-offer .btn[aria-disabled="true"]{opacity:.6;cursor:progress}
.opk-card .opk-add[hidden],.opk-card .opk-synced[hidden],.opk-offer .opk-offer-actions .opk-offer-add[hidden]{display:none}
.opk-card .opk-status{margin:10px 0 0;font-size:13px}
.opk-card .opk-status:not(:empty)+.opk-list{margin-top:10px}
.opk-card .opk-status:empty{margin:0}
/* Scoped by id: the shell's settings rules for card paragraphs are more specific than a class pair and turned these grey. */
#accountPasskeys .opk-status[data-tone="error"],.opk-offer .opk-status[data-tone="error"]{color:var(--carmine)}
#accountPasskeys .opk-status[data-tone="ok"],.opk-offer .opk-status[data-tone="ok"]{color:var(--racing,var(--forest))}
.opk-card .opk-synced{margin:6px 0 0}
@media (pointer:coarse){.opk-card .btn.sm{min-height:44px}}
@media (max-width:640px){
  .opk-card .opk-head{flex-direction:column;align-items:stretch}
  .opk-card .opk-add{justify-content:center;min-height:44px}
}

/* After a password or code sign-in on an iPhone, iPad or Mac: a dismissible offer. */
/* Placed above the tab bar, the Chat dock and any [data-dock] wherever they show (passkeys.js sets --opk-offer-bottom), and hidden while a modal is open. */
/* On the shell's page gutter: 24px from 834px, 20px on phones. */
.opk-offer{position:fixed;z-index:70;right:24px;bottom:var(--opk-offer-bottom,16px);width:min(360px,calc(100vw - 48px));box-sizing:border-box;padding:18px;
  background:var(--card,var(--surface));color:var(--ink);border:1px solid var(--hairline,var(--line));border-radius:12px;
  box-shadow:0 8px 28px color-mix(in srgb,#000 14%,transparent);animation:opk-fade 150ms ease-out both}
.opk-offer h2{margin:0 0 6px;font-size:16px;font-weight:600;line-height:1.3}
.opk-offer .opk-offer-body{margin:0 0 14px;font-size:13.5px;line-height:1.45;color:var(--stone,var(--mut))}
.opk-offer .opk-offer-actions{display:flex;flex-wrap:wrap;gap:8px}
.opk-offer .opk-offer-actions .btn{display:inline-flex;align-items:center;gap:8px;min-height:40px}
.opk-offer .opk-status{margin:10px 0 0;font-size:13px}
.opk-offer .opk-status:empty{display:none}
@media (pointer:coarse){.opk-offer .opk-offer-actions .btn{min-height:44px}}
.opk-offer[hidden]{display:none}
@media (max-width:833px){.opk-offer{right:20px;width:min(360px,calc(100vw - 40px))}}
@media (max-width:640px){.opk-offer{left:20px;right:20px;width:auto;bottom:var(--opk-offer-bottom,calc(84px + env(safe-area-inset-bottom)))}}
/* In Chat with a conversation open: docked to the composer's own box (passkeys.js sets the three values). */
.opk-offer[data-dock="compose"]{left:var(--opk-offer-left);right:auto;width:var(--opk-offer-width)}
.opk-offer-host{display:contents}
/* While it shows, and only when the page already scrolls or a control sits under it, room at the end of the page so the last controls can scroll clear of it (passkeys.js sets the height, the class and scroll-padding). */
html.opk-offer-room body::after{content:"";display:block;height:var(--opk-offer-clearance,0px)}
.opk-sr{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
@media (prefers-reduced-motion:reduce){#login .opk-row-signin,.opk-offer{animation:none}}
