
body.gated { overflow: hidden; }
.gate { position: fixed; inset: 0; z-index: 150; overflow: auto; background: var(--rail-bg); display: flex; }
.gate-inner { margin: auto; padding: 32px 16px; width: 100%; max-width: 440px; box-sizing: border-box; }
.gate-card { background: var(--surface); color: var(--text); border-radius: var(--r-card); box-shadow: var(--shadow-pop); padding: 28px 28px 24px; }
.gate-brand { display: flex; align-items: center; gap: 10px; font-size: var(--fs-lg); font-weight: 650; color: var(--text); margin-bottom: 20px; letter-spacing: .01em; }
.gate-links { margin: 16px 0 0; text-align: center; font-size: var(--fs-xs); line-height: 1.5; color: var(--rail-text); }
.gate-links p { margin: 0 0 4px; }
.gate-links a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.gate-links a:hover { color: var(--rail-text-strong); }
.gate-legal { margin: 14px 0 0; text-align: center; font-size: var(--fs-xs); color: var(--rail-text); opacity: .8; }
.gate-card h1 { font-size: var(--fs-xl); line-height: 1.25; margin: 0 0 6px; }
.gate-sub { color: var(--text-2); font-size: var(--fs-sm); line-height: 1.5; margin: 0 0 18px; }
.gate-form { margin-top: 4px; }
.gate-form .field { margin-bottom: 14px; }
.gate-form .field[hidden] { display: none; }
.gate-form .input { height: 36px; font-size: var(--fs-md); }
.gate-form .input[readonly], .input[data-ctl=pref-username][readonly] { background: var(--surface-2); color: var(--text-2); }
.gate-rule { margin: -8px 0 12px; }
.gate-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 16px; }
.gate-submit { height: 36px; padding: 0 18px; font-size: var(--fs-md); }
.gate-msg { margin: 4px 0 0; padding: 8px 10px; border-radius: var(--r-ctl); font-size: var(--fs-sm); line-height: 1.45; }
.gate-msg[hidden] { display: none; }
.gate-msg.error { background: var(--danger-bg); color: var(--danger); }
.gate-msg.ok { background: var(--ok-bg); color: var(--ok); }
.gate-msg.info { background: var(--info-bg); color: var(--info); }
.gate-extra:not(:empty) { margin-top: 10px; }
.gate-sso { display: flex; flex-direction: column; gap: 8px; margin: 2px 0 6px; }
.gate-sso-btn { height: 38px; justify-content: center; font-size: var(--fs-md); font-weight: 550; }
.gate-or { display: flex; align-items: center; gap: 10px; margin: 10px 0 2px; color: var(--text-2); font-size: var(--fs-xs); }
.gate-or::before, .gate-or::after { content: ''; flex: 1; border-top: 1px solid var(--line-2); }
.gate-alt { margin: 18px 0 0; padding-top: 14px; border-top: 1px solid var(--line-2); font-size: var(--fs-sm); }
.gate-saml { margin: 10px 0 0; font-size: var(--fs-sm); }
.gate-policy { display: flex; gap: 8px; align-items: flex-start; margin: 4px 0 8px; color: var(--text); font-size: var(--fs-sm); line-height: 1.45; cursor: pointer; }
.gate-policy input { margin-top: 3px; flex: none; }
.linkish { border: 0; background: none; padding: 0; color: var(--link); font: inherit; font-size: var(--fs-sm); cursor: pointer; }
.linkish:hover { text-decoration: underline; }

.top-share { margin-inline-start: 4px; }
.top-account { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; padding: 0; border: 0; border-radius: 50%; background: none; margin-inline-start: 2px; }
.top-account .av, .share-row .av { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 50%; background: var(--brand-800); color: #fff; font-size: 11px; font-weight: 650; letter-spacing: .02em; }
:root[data-theme=dark] .top-account .av, :root[data-theme=dark] .share-row .av { background: var(--brand-300); color: var(--brand-900); }
.top-account:hover .av, .top-account:focus-visible .av { box-shadow: 0 0 0 3px var(--focus-halo); }

.acct-page { max-width: 820px; }
.acct-page.acct-split { max-width: 1060px; display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: var(--sp-5, 24px); align-items: start; }
.acct-nav { position: sticky; top: 0; display: flex; flex-direction: column; gap: 2px; padding-top: 2px; }
.acct-nav-item { text-align: start; padding: 7px 12px; border: 0; border-radius: var(--r-ctl); background: transparent; color: var(--text-2); font: inherit; font-size: var(--fs-sm); cursor: pointer; }
.acct-nav-item:hover { background: var(--hover-bg); color: var(--text); }
.acct-nav-item[aria-current=true] { background: var(--sel-bg); color: var(--text); font-weight: 600; box-shadow: inset 3px 0 0 var(--accent); }
.acct-nav-item:focus-visible { outline: 2px solid var(--focus, var(--accent)); outline-offset: 1px; }
.acct-group[hidden] { display: none; }
@media (max-width: 760px) {
  .acct-page.acct-split { grid-template-columns: minmax(0, 1fr); gap: var(--sp-3); }
  .acct-nav { position: static; flex-direction: row; flex-wrap: wrap; }
  .acct-nav-item[aria-current=true] { box-shadow: inset 0 -3px 0 var(--accent); }
}
.acct-card { margin-bottom: 16px; }
.acct-card .card-head h2 { font-size: var(--fs-md); margin: 0; }
.acct-sub { color: var(--text-2); font-size: var(--fs-sm); margin: 0 0 12px; line-height: 1.5; }
.acct-form { max-width: 420px; }
.acct-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 4px; }
.acct-card .card-body > .acct-row { margin-top: 12px; }
.acct-msg { font-size: var(--fs-sm); }
.acct-msg[hidden] { display: none; }
.acct-msg.error { color: var(--danger); }
.acct-msg.ok { color: var(--ok); }
.acct-note { font-size: var(--fs-sm); background: var(--info-bg); color: var(--info); padding: 6px 10px; border-radius: var(--r-ctl); }
.acct-sessions { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.acct-sessions th { text-align: start; font-weight: 600; color: var(--text-2); }
.acct-sessions th, .acct-sessions td { padding: 6px 8px; border-bottom: 1px solid var(--line-2); }
.acct-act { text-align: end; white-space: nowrap; display: flex; gap: 6px; justify-content: flex-end; }
td.acct-act { display: table-cell; }
.acct-list { list-style: none; margin: 0; padding: 0; }
.acct-list li { display: flex; align-items: center; gap: 12px; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--line-2); font-size: var(--fs-sm); }
.acct-list li:last-child { border-bottom: 0; }
.acct-tokens { margin-bottom: 14px; }
.acct-token-projects { display: flex; flex-wrap: wrap; gap: 4px 14px; max-height: 160px; overflow: auto; padding: 4px 0; }
.ai-prop-row { border-bottom: 1px solid var(--line-2); padding: 8px 0; }
.ai-prop-row .field { margin-block: 4px 0; margin-inline: 24px 0; }
.ai-prop-summary { white-space: pre-wrap; margin: 8px 0; }
.top-ai-more.has-proposals::after { content: attr(data-proposals); margin-inline-start: 3px; font-size: 11px; font-weight: 700; }
pre.acct-code { white-space: pre-wrap; word-break: break-all; background: var(--chip-bg); padding: 8px; border-radius: var(--r-ctl); font-size: 12px; margin: 4px 0; }

.share { display: flex; flex-direction: column; gap: 18px; min-width: min(560px, 80vw); }
.bill-ai > h3 { font-size: 1em; }
.share-sec h3 { font-size: var(--fs-sm); margin: 0 0 8px; color: var(--text-2); text-transform: none; }
.share-invite { display: flex; gap: 8px; }
.share-invite .input[type=email] { flex: 1; }
.share-role { width: auto; min-width: 104px; }
.share-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: var(--r-card); }
.share-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-bottom: 1px solid var(--line-2); }
.share-row:last-child { border-bottom: 0; }
.share-row .av.pending { background: var(--surface-2); color: var(--text-2); }
.share-who { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.share-who strong, .share-who span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.share-more { width: 28px; flex: none; }
.share-note { margin: 0; padding: 8px 10px; background: var(--info-bg); color: var(--info); border-radius: var(--r-ctl); font-size: var(--fs-sm); }
.share-legend dl { display: grid; grid-template-columns: max-content 1fr; gap: 4px 12px; margin: 0; font-size: var(--fs-sm); }
.share-legend dt { font-weight: 600; }
.share-legend dd { margin: 0; color: var(--text-2); }

.ro-banner { display: flex; align-items: center; gap: 10px; padding: 5px 16px; background: var(--info-bg); color: var(--info); border-bottom: 1px solid var(--line); font-size: var(--fs-sm); flex: none; }
.ro-banner strong { font-weight: 650; }
.ro-banner .linkish { margin-inline-start: auto; }
[data-ro][aria-disabled=true] { pointer-events: none; opacity: .45; }
:root[data-readonly] .rt-field { cursor: default; }
#app[hidden] { display: none !important; }
:root[data-readonly] .wb-rail, :root[data-readonly] .wb-props, :root[data-readonly] .annot-pal { display: none !important; }
.top-share[hidden] { display: none; }
.acct-card .card-body > p:first-child { margin-top: 0; }
.top-ai:disabled { opacity: .45; cursor: default; filter: grayscale(.6); }
.share-row .av.pending { font-size: 14px; }
:root[data-readonly] :is(#main, #insp) :is(input:not([type=checkbox], [type=radio], [type=range], [type=color], [type=file]), textarea, select):is(:disabled, [readonly], [data-ro]) {
  border-color: transparent; background: transparent; box-shadow: none; color: var(--text); -webkit-text-fill-color: var(--text);
  opacity: 1; cursor: default; resize: none; appearance: none; -webkit-appearance: none; padding-inline-start: 0; padding-inline-end: 0; }
:root[data-readonly] :is(#main, #insp) input[type=datetime-local]:disabled::-webkit-calendar-picker-indicator { display: none; }
:root[data-readonly] :is(#main, #insp) :is(input, textarea):is(:disabled, [readonly])::placeholder { color: transparent; -webkit-text-fill-color: transparent; }
:root[data-readonly] :is(#main, #insp) :is(input, textarea):is(:disabled, [readonly])[placeholder="—"]::placeholder { color: var(--text-3); -webkit-text-fill-color: var(--text-3); }
:root[data-readonly] [data-ro]:is(input, textarea, select) { cursor: default; }
:root[data-readonly] [data-ro]:is(button, .btn):disabled { opacity: .4; }

.fs-meter { display: flex; flex-direction: column; gap: 4px; }
.fs-bar { height: 8px; background: var(--line-2); border-radius: 4px; overflow: hidden; }
.fs-bar span { display: block; height: 100%; background: var(--ok); }
.fs-bar.warn span { background: var(--warn); }
.fs-bar.full span { background: var(--danger, #d03b3b); }
.fs-table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.fs-table th, .fs-table td { text-align: start; padding: 4px 6px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.fs-table td.num { text-align: end; white-space: nowrap; }

.gate-passkey { margin: 2px 0 4px; }
.gate-passkey-btn { width: 100%; height: 38px; justify-content: center; font-size: var(--fs-md); }
.gate-mfa-alt { font-size: var(--fs-sm); }
.gate-mfa-alt p { margin: 10px 0 0; }
.sec-block { margin-top: 16px; }
.sec-block .acct-h3 { margin-top: 0; }
.sec-qr-box { display: flex; justify-content: center; margin: 4px 0 8px; }
.sec-qr { background: #fff; border-radius: var(--r-ctl); border: 1px solid var(--line-2); }
.sec-key { font-size: var(--fs-md); letter-spacing: .04em; user-select: all; }
.sec-codes { columns: 2; margin: 4px 0 12px; padding-inline-start: 22px; font-size: var(--fs-md); }
.sec-codes code { user-select: all; letter-spacing: .03em; }
.oauth-page { max-width: 720px; }
.oauth-facts { display: grid; grid-template-columns: max-content 1fr; gap: 4px 16px; margin: 12px 0; }
.oauth-facts dt { color: var(--text-2, var(--muted)); }
.oauth-facts dd { margin: 0; overflow-wrap: anywhere; }
.oauth-set { border: 0; padding: 0; margin: 0 0 12px; }
.oauth-set legend { font-weight: 600; margin-bottom: 6px; }
.oauth-choice { display: flex; gap: 8px; align-items: baseline; margin: 4px 0; }
.oauth-projects { display: grid; gap: 4px; margin-block: 6px 0; margin-inline: 24px 0; }
.oauth-warn { padding: 8px 12px; border-radius: var(--r-card, 8px); }
.acct-apps { margin-top: 20px; }

.support-form .acct-h3 { margin-top: 14px; }
.support-send { margin: 4px 0 8px; padding-inline-start: 18px; color: var(--text-2); overflow-wrap: anywhere; }
.support-send li[hidden] { display: none; }
.support-details { margin-top: 12px; }
.support-details > summary { cursor: pointer; font-size: var(--fs-sm); color: var(--text-2); }
.support-details > div { margin-top: 8px; }
.acct-note.warn { background: var(--warn-bg); color: var(--warn); }
.support-thread { list-style: none; margin: 12px 0; padding: 0; display: grid; gap: 10px; }
.support-msg { border: 1px solid var(--border); border-radius: var(--r-ctl); padding: 8px 12px; background: var(--surface); }
.support-msg.staff { border-inline-start: 3px solid var(--primary); }
.support-msg.note { background: var(--warn-bg); border-style: dashed; border-color: var(--warn); }
.support-msg.staff { background: var(--surface-2); }
.support-msg-head { margin: 0 0 4px; font-size: var(--fs-sm); color: var(--text-2); }
.support-msg-body { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.55; }
.support-msg { padding: 10px 14px; }
.support-msg-head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.support-files, .support-files-pick { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: var(--fs-sm); }
.support-files-pick li { display: inline-flex; align-items: center; gap: 4px; }
.support-files .support-file { display: inline-flex; align-items: center; gap: 2px; }
.support-file-btn { display: inline-flex; align-items: center; gap: 8px; padding: 4px 8px; border: 1px solid var(--border); border-radius: var(--r-ctl);
  background: var(--surface); color: var(--text); font: inherit; cursor: pointer; text-align: start; max-width: 32em; }
.support-file-btn:hover { background: var(--accent-2); }
.support-file-btn:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
.support-file-btn > span:first-of-type { overflow-wrap: anywhere; }
.support-thumb { width: 48px; height: 48px; object-fit: cover; border-radius: 4px; background: var(--surface-2); }
.modal.sv-modal { width: min(1400px, calc(100vw - 32px)); }
.sv-modal .modal-body { padding-bottom: 8px; }
.sv { display: flex; flex-direction: column; gap: 8px; min-height: 0; }
.sv-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.sv-group { display: inline-flex; align-items: center; gap: 4px; }
.sv-bar .grow { flex: 1; }
.sv-stage { height: min(70vh, 900px); overflow: auto; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-ctl);
  display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 12px; box-sizing: border-box; }
.sv-stage:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.sv-stage[data-kind=text], .sv-stage[data-kind=csv] { align-items: stretch; }
.sv-img { max-width: none; image-rendering: auto; background: repeating-conic-gradient(#ddd 0 25%, #fff 0 50%) 0 0 / 16px 16px; }
.sv-pages { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.sv-page { background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); }
.sv-text { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font-family: var(--mono); font-size: var(--fs-sm); background: var(--surface); padding: 12px; border-radius: var(--r-ctl); }
.sv-csv { overflow: auto; background: var(--surface); }
.sv-csv td, .sv-csv th { white-space: pre-wrap; vertical-align: top; }
.sv-note { margin: 0; align-self: center; }
.sv-info { margin: auto; text-align: center; max-width: 36em; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.sv-icon { font-size: 48px; line-height: 1; }
.sv-name { font-weight: 600; margin: 4px 0 0; overflow-wrap: anywhere; }
.support-file.blocked .support-file-btn > span:first-child { text-decoration: line-through; color: var(--text-2); }
.support-attach { display: grid; gap: 4px; justify-items: start; }
.support-suggest { margin: 4px 0 8px; padding: 6px 10px; border-radius: var(--r-ctl); background: var(--info-bg); }
.support-suggest p { margin: 0 0 4px; }
.support-suggest ul { margin: 0; padding-inline-start: 18px; }
.support-compose { margin-top: 12px; display: grid; gap: 6px; }
.support-compose textarea, .admin-support-compose textarea, .admin-support-notes textarea { width: 100%; }
.support-status { margin: 4px 0; color: var(--text-2); }
.support-text { resize: vertical; line-height: 1.5; box-sizing: border-box; }
.gate-inner:has(.ticket-area) { max-width: 920px; }
.support-page { max-width: 1100px; }
.ticket-area { display: grid; gap: 8px; text-align: start; }
.ticket-lang { justify-self: end; }
.bill-group { border: 0; padding: 0; margin: 0 0 12px; display: flex; gap: 8px; flex-wrap: wrap; }
.bill-group > legend { font-size: var(--fs-sm); color: var(--text-2); margin-bottom: 4px; padding: 0; }
.bill-choice { flex: 1 1 180px; display: flex; gap: 8px; align-items: flex-start; padding: 8px 10px; border: 1px solid var(--border); border-radius: var(--r-ctl); cursor: pointer; }
.bill-choice:has(input:checked) { border-color: var(--accent); background: var(--sel-bg); }
.bill-choice.off { opacity: .6; cursor: default; }
.bill-choice-text { display: flex; flex-direction: column; gap: 2px; }
.bill-feats { margin: 6px 0 0; padding-inline-start: 16px; font-size: var(--fs-sm); color: var(--text-2); }
.bill-feats li { margin: 2px 0; }
.bill-seats { max-width: 120px; }
.bill-team[hidden], .bill-form .field[hidden] { display: none; }
.bill-summary { font-weight: 600; margin: 10px 0 6px; }
.bill-toast-btn, .bill-offer { margin-inline-start: 6px; }
.billing-why-set { border: 0; padding: 0; margin: 0 0 10px; }
.billing-why-set > legend { font-weight: 600; margin-bottom: 4px; padding: 0; }
.billing-why-set .checkbox { display: flex; gap: 8px; align-items: center; margin: 3px 0; }
.billing-why-more { margin-block: 2px 6px; margin-inline: 24px 0; }
.billing-why-more[hidden] { display: none; }

.acct-storage-bar { display: block; width: 100%; max-width: 360px; height: 6px; margin: 6px 0 4px; accent-color: var(--primary); }
.acct-note p { margin: 0 0 6px; }

.connect-entry { margin: 0 0 14px; }
.connect-app > p:first-child { margin-top: 0; }
.connect-apps { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; margin: 8px 0 14px; }
.connect-app-choice { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: start; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-ctl); background: var(--surface); color: var(--text); cursor: pointer; font: inherit; }
.connect-app-choice:hover { background: var(--hover-bg); }
.connect-app-choice.on { border-color: var(--sel-edge); background: var(--sel-bg); box-shadow: inset 0 0 0 1px var(--sel-edge); }
.connect-pane { min-height: 220px; }
.connect-steps { margin: 8px 0 12px; padding-inline-start: 22px; line-height: 1.55; }
.connect-steps li { margin: 0 0 10px; }
.connect-copy { display: flex; align-items: flex-start; gap: 8px; margin: 6px 0; }
.connect-copy-text { flex: 1; min-width: 0; display: block; white-space: pre-wrap; word-break: break-all; background: var(--chip-bg); padding: 7px 9px; border-radius: var(--r-ctl); font-size: 12px; user-select: all; }
.connect-token { border-top: 1px solid var(--line-2); padding-top: 8px; }
.connect-token .acct-row .field { flex: 1; min-width: 130px; }
.connect-after { border-top: 1px solid var(--line-2); padding-top: 10px; margin-bottom: 0; }
.connect-token .acct-row > .input.mono { flex: 1; min-width: 0; }
.acad-other { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
