:root { --bg:#f3f5f9; --card:#fff; --line:#dde2ea; --text:#18202e; --muted:#5f6b80; --accent:#4B1460; --accent-2:#f1e8f6; --on-accent:#fff; --bad:#c62f2f; --bad-bg:#fdecec; --ok:#17864b; --ok-bg:#e3f5ea; --warn:#a86b00; --warn-bg:#fff4dc; color-scheme: light; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --bg:#0f131a; --card:#171c25; --line:#2a3240; --text:#e7eaf0; --muted:#8e98aa; --accent:#b48af0; --accent-2:#2a1d33; --on-accent:#1b0f22; --bad:#f07272; --bad-bg:#3a1919; --ok:#45cf86; --ok-bg:#12301f; --warn:#f0b44c; --warn-bg:#352812; color-scheme: dark; } }
:root[data-theme="dark"] { --bg:#0f131a; --card:#171c25; --line:#2a3240; --text:#e7eaf0; --muted:#8e98aa; --accent:#b48af0; --accent-2:#2a1d33; --on-accent:#1b0f22; --bad:#f07272; --bad-bg:#3a1919; --ok:#45cf86; --ok-bg:#12301f; --warn:#f0b44c; --warn-bg:#352812; color-scheme: dark; }
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { background: var(--bg); color: var(--text); font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
body.center { display: grid; place-items: center; align-content: center; gap: 6px; min-height: 100vh; padding: 16px; }
a { color: var(--accent); }
input[type=checkbox], input[type=radio], input[type=range], progress { accent-color: var(--accent); }
h1 { font-size: 20px; margin: 4px 0 8px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 28px; width: 100%; max-width: 400px; box-shadow: 0 6px 24px rgba(16,24,40,.07); }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 650; font-size: 18px; margin-bottom: 14px; }
/* the card's brand row and title in the middle (the form fields below stay left-aligned) */
main.card > .brand { justify-content: center; }
main.card > h1, main.card > .brand-heading, main.card > .brand-intro { text-align: center; }
.logo { width: 28px; height: 28px; border-radius: 7px; background: url(/static/icon.svg) center/cover; display: inline-block; }
.brand-logo { height: 28px; width: auto; max-width: 100%; border-radius: 7px; display: block; object-fit: contain; }
.brand-heading { font-size: 22px; margin: 4px 0 6px; }
.brand-intro { color: var(--muted); margin: 0 0 14px; white-space: pre-line; }
.brand-footer { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 16px; margin: 10px auto 16px; font-size: 13px; color: var(--muted); text-align: center; }
.brand-footer a { color: var(--muted); }
.muted { color: var(--muted); }
.stack { display: grid; gap: 12px; }
label { display: grid; gap: 5px; font-size: 13px; color: var(--muted); }
input, select, textarea { font: inherit; color: var(--text); background: var(--card); border: 1px solid var(--line); border-radius: 9px; padding: 10px 12px; width: 100%; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: transparent; }
.btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; padding: 10px 14px; border-radius: 9px; border: 1px solid var(--line); background: var(--card); color: var(--text); font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; margin-top: 8px; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); margin-top: 2px; }
.btn.passkey { background: var(--accent-2); border-color: transparent; color: var(--accent); }
.btn:hover { filter: brightness(1.05); }
.or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; margin: 14px 0 6px; }
.or::before, .or::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
.alert { background: var(--bad-bg); color: var(--bad); border-radius: 9px; padding: 9px 12px; margin-bottom: 12px; font-size: 14px; }
.err { color: var(--bad); font-size: 14px; min-height: 1em; margin: 10px 0 0; }
.who { display: flex; justify-content: space-between; background: var(--bg); border-radius: 9px; padding: 9px 12px; font-weight: 600; }
.who a { font-weight: 400; font-size: 13px; }
form.inline { display: inline; margin: 0 14px 0 0; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--accent, #2563eb); font: inherit; font-size: 14px; cursor: pointer; text-decoration: underline; }
body.page { display: block; }
.bar { display: flex; justify-content: space-between; align-items: center; padding: 12px 20px; background: var(--card); border-bottom: 1px solid var(--line); }
.bar .brand { margin: 0; }
.wrap { max-width: 760px; margin: 0 auto; padding: 24px 16px 60px; display: grid; gap: 16px; }
.card.wide { max-width: none; box-shadow: none; padding: 20px; }
h2 { font-size: 16px; margin: 0 0 10px; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 0; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; }
.list { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 8px; }
.list li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.list li:last-child { border-bottom: 0; }
.row { display: flex; gap: 8px; align-items: center; }
.row input { max-width: 260px; }
.btn.small { width: auto; padding: 6px 12px; font-size: 13px; margin: 0; }
.btn.danger { color: var(--bad); }
.alert.ok { background: var(--ok-bg); color: var(--ok); }
.alert.bad { background: var(--bad-bg); color: var(--bad); }
.narrow { max-width: 360px; }
.totp { display: flex; gap: 20px; flex-wrap: wrap; align-items: flex-start; }
.qr { background: #fff; padding: 8px; border-radius: 8px; width: 200px; }
.qr svg { width: 100%; height: auto; display: block; }
code { background: var(--bg); padding: 4px 8px; border-radius: 6px; word-break: break-all; display: inline-block; margin-bottom: 10px; }
@media (max-width: 560px) { .list li { flex-direction: column; align-items: flex-start; } .row { flex-direction: column; align-items: stretch; } .row input { max-width: none; } }

/* offline codes (Windows sign-in) */
ol.codes { columns: 2; column-gap: 32px; font-size: 16px; letter-spacing: .04em; padding-left: 28px; margin: 12px 0; }
ol.codes li { padding: 3px 0; break-inside: avoid; }
@media print { header.bar, nav, form, button, .btn, .card:not(#offline), .panel:not(.print) { display: none !important; } }
/* self-registration (register.html) */
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
ul.hint { margin: 0; padding-left: 18px; font-size: 13px; color: var(--muted); }
.card .hint { font-size: 13px; color: var(--muted); margin: 0; }
.push-number { font-size: 44px; font-weight: 700; letter-spacing: .08em; text-align: center; margin: 4px 0 8px; font-variant-numeric: tabular-nums; }
.actcode { font-size: 20px; letter-spacing: .08em; }
/* the single sign-on portal (My apps) */
.portal .wrap { max-width: 1040px; }
.portal-q { max-width: 420px; padding: 10px 12px; font-size: 15px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(170px, 100%), 1fr)); gap: 14px; }
.tile { display: grid; justify-items: center; text-align: center; gap: 6px; padding: 18px 12px 16px; border-radius: 16px; border: 1px solid var(--line);
  background: var(--card); color: var(--text); text-decoration: none; transition: transform .15s, box-shadow .15s, border-color .15s; }
.tile:hover, .tile:focus-visible { transform: translateY(-2px); border-color: var(--accent); box-shadow: 0 8px 24px color-mix(in srgb, var(--accent) 18%, transparent); }
.tile[hidden] { display: none; }
.tile b { font-size: 14.5px; overflow-wrap: anywhere; }
.tile small { color: var(--muted); font-size: 12.5px; }
.tile-ico { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 14px; font-size: 26px; font-weight: 700; color: #fff; background: var(--accent); }
.tile-c0 { background: #6d28d9; } .tile-c1 { background: #2563eb; } .tile-c2 { background: #0f766e; } .tile-c3 { background: #b45309; }
.tile-c4 { background: #be185d; } .tile-c5 { background: #4338ca; } .tile-c6 { background: #15803d; } .tile-c7 { background: #9333ea; }
.portal .bar nav { gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
@media (prefers-reduced-motion: reduce) { .tile { transition: none; } .tile:hover { transform: none; } }

/* My profile (/account and /portal): brand-coloured bar, profile header, tabs, application tiles with favourites */
:root { --brand-deep: var(--accent); --on-brand: #fff; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --brand-deep: color-mix(in srgb, var(--accent) 55%, #000); } }
:root[data-theme="dark"] { --brand-deep: color-mix(in srgb, var(--accent) 55%, #000); }
.pf-bar { background: var(--brand-deep); color: var(--on-brand); border-bottom: 0; padding: 10px 20px; position: relative; z-index: 20; }
.pf-bar .brand { font-size: 17px; }
.pf-bar .bar-theme { margin-right: 6px; }
.pf-bar .theme-toggle { background: transparent; color: var(--on-brand); border-color: color-mix(in srgb, var(--on-brand) 45%, transparent); }
.pf-menu { position: relative; }
.pf-menu summary { list-style: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 9px; cursor: pointer; color: var(--on-brand); }
.pf-menu summary::-webkit-details-marker { display: none; }
.pf-menu summary:hover, .pf-menu summary:focus-visible, .pf-menu[open] summary { background: color-mix(in srgb, var(--on-brand) 16%, transparent); outline: none; }
.pf-menu summary svg, .pf-tabs svg, .pf-search svg, .pf-help svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.pf-menu-list { position: absolute; right: 0; top: calc(100% + 6px); min-width: 210px; display: grid; padding: 6px; background: var(--card); color: var(--text);
  border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 32px rgba(16,24,40,.18); }
.pf-menu-list a, .pf-menu-list button { display: block; width: 100%; text-align: left; padding: 9px 12px; border-radius: 8px; color: var(--text); text-decoration: none;
  font: inherit; font-size: 14px; background: none; border: 0; cursor: pointer; }
.pf-menu-list a:hover, .pf-menu-list button:hover, .pf-menu-list a:focus-visible, .pf-menu-list button:focus-visible { background: var(--accent-2); color: var(--accent); outline: none; }
.pf-menu-list a[aria-current] { font-weight: 650; }
.pf-menu-list form { border-top: 1px solid var(--line); margin-top: 4px; padding-top: 4px; }
.pf-wrap { max-width: 982px; gap: 18px; }
.pf-head { display: flex; align-items: center; gap: 18px; padding: 8px 0 2px; }
.pf-avatar { flex: none; width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-deep); color: var(--on-brand);
  font-size: 28px; font-weight: 650; letter-spacing: .02em; user-select: none; }
.pf-who { flex: 1; min-width: 0; }
.pf-nameline { display: flex; align-items: center; gap: 8px; }
.pf-name { font-size: 26px; font-weight: 750; margin: 0; overflow-wrap: anywhere; line-height: 1.2; }
.pf-mail { margin: 4px 0 0; color: var(--muted); overflow-wrap: anywhere; }
.pf-help { position: relative; display: inline-grid; place-items: center; color: var(--muted); cursor: help; border-radius: 50%; }
.pf-help:hover, .pf-help:focus-visible { color: var(--accent); outline: none; }
.pf-help::after { content: attr(data-tip); position: absolute; left: 50%; top: calc(100% + 8px); transform: translateX(-50%); width: max-content; max-width: min(300px, 70vw);
  padding: 8px 10px; border-radius: 8px; background: var(--text); color: var(--bg); font-size: 13px; font-weight: 400; line-height: 1.4; z-index: 10;
  display: none; pointer-events: none; }
.pf-help:hover::after, .pf-help:focus-visible::after { display: block; }
.pf-switch { flex: none; display: inline-flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--card); color: var(--text); font: inherit; font-weight: 600; font-size: 14px; cursor: pointer; }
.pf-switch[hidden] { display: none; }
.pf-switch:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.pf-track { position: relative; width: 38px; height: 22px; border-radius: 11px; background: var(--line); transition: background .15s; }
.pf-track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: transform .15s; }
.pf-switch[aria-checked="true"] .pf-track { background: var(--accent); }
.pf-switch[aria-checked="true"] .pf-track::after { transform: translateX(16px); }
.pf-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.pf-tabs a { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; color: var(--muted); text-decoration: none; font-weight: 600; white-space: nowrap;
  border-bottom: 3px solid transparent; margin-bottom: -1px; }
.pf-tabs a:hover { color: var(--text); }
.pf-tabs a:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; border-radius: 6px 6px 0 0; }
.pf-tabs a[aria-selected="true"] { color: var(--accent); border-bottom-color: var(--accent); }
.pf-panel { display: grid; gap: 16px; align-content: start; }
html.has-js .pf-panel:not(.on) { display: none; }
.pf-search { position: relative; width: 100%; max-width: 640px; margin: 6px auto 4px; color: var(--muted); }
.pf-search svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); pointer-events: none; }
.pf-search input { padding: 12px 14px 12px 42px; font-size: 15px; border-radius: 12px; }
.pf-apps[hidden] { display: none; }
.pf-label { font-size: 13px; font-weight: 650; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 6px 0 10px; }
.pf .tiles { grid-template-columns: repeat(auto-fill, minmax(min(132px, 100%), 1fr)); gap: 14px; }
.tile-w { position: relative; display: grid; }
.tile-w[hidden] { display: none; }
.pf .tile { padding: 20px 10px 14px; border-radius: 12px; align-content: start; gap: 8px; }
.pf .tile b { font-size: 14px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pf .tile small { display: block; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 12px; }
.pf .tile-ico { width: 54px; height: 54px; border-radius: 14px; }
.fav-f { position: absolute; top: 4px; right: 4px; margin: 0; }
.star { display: grid; place-items: center; width: 30px; height: 30px; padding: 0; border: 0; border-radius: 8px; background: none; color: var(--muted); cursor: pointer; }
.star svg { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linejoin: round; }
.star:hover, .star:focus-visible { color: var(--accent); background: var(--accent-2); outline: none; }
.star[aria-pressed="true"] { color: #e0a100; }
.star[aria-pressed="true"] svg { fill: currentColor; }
form.pf-ro input[readonly] { border-color: transparent; background: transparent; padding-left: 0; color: var(--text); }
form.pf-ro input[readonly]:focus { outline: none; }
form.pf-ro .pf-save, form.pf-ro .pf-edit-only { display: none; }
@media (max-width: 640px) {
  .pf-head { flex-wrap: wrap; gap: 14px; }
  .pf-avatar { width: 60px; height: 60px; font-size: 22px; }
  .pf-name { font-size: 22px; }
  .pf-switch { width: 100%; justify-content: space-between; }
  .pf-tabs a { padding: 10px 12px; }
  .pf-bar { padding: 8px 12px; }
}
@media (prefers-reduced-motion: reduce) { .pf-track, .pf-track::after { transition: none; } }

/* theme button (theme-init.js): device setting / day / night */
.theme-toggle { font: inherit; font-size: 16px; line-height: 1; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line);
  background: var(--card); color: var(--text); cursor: pointer; display: inline-grid; place-items: center; }
.theme-toggle:hover, .theme-toggle:focus-visible { border-color: var(--accent); outline: none; }
.theme-toggle.corner { position: fixed; right: 14px; bottom: 14px; z-index: 50; box-shadow: 0 2px 8px rgba(0,0,0,.12); }
.bar-theme { margin-left: auto; margin-right: 10px; }
.terms-text { white-space: pre-wrap; max-height: 46vh; overflow: auto; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); font-size: 14px; line-height: 1.55; }
.face-frame { width: 100%; min-height: 640px; border: 1px solid var(--line); border-radius: 12px; background: #fff; margin-top: 12px; }
/* passkeys with the icon of their type / provider */
.pk-line { display: inline-flex; align-items: center; gap: 10px; vertical-align: middle; }
.pk-icon { width: 28px; height: 28px; border-radius: 7px; flex: none; object-fit: contain; background: #fff; }
.pk-model { display: block; font-size: 12px; color: var(--muted); }
/* key holders (/keyholders) */
.kh { max-width: 760px; margin: 0 auto; padding: 24px 16px 48px; display: grid; gap: 16px; }
.kh-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.kh .list li { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.kh nav.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; }
.kh nav.seg a { padding: 6px 12px; font-size: 13px; color: var(--muted); text-decoration: none; }
.kh nav.seg a.on { background: var(--accent-2); color: var(--accent); font-weight: 600; }
.idle-warn { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 1000; max-width: min(92vw, 520px); padding: 12px 16px;
  border-radius: 10px; background: var(--warn-bg, #fff4d6); color: var(--text, #222); border: 1px solid var(--warn, #c88a00); box-shadow: 0 6px 24px rgba(0,0,0,.18); font-size: 14px; }
/* message of the day / application sign-in messages; the language picker */
.alert.info { background: var(--accent-2); color: var(--text); }
.alert.warn { background: var(--warn-bg); color: var(--warn); }
.notice { white-space: pre-line; text-align: left; }
.notice b { display: block; margin-bottom: 2px; }
.langbar { display: flex; justify-content: center; margin: 18px auto 8px; font-size: 13px; }
.langbar select { width: auto; padding: 4px 8px; font-size: 13px; background: transparent; color: var(--muted); border: 1px solid var(--line); border-radius: 8px; }
.langbar .sr, .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.langbar label { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }
.langbar select { min-width: 8.5em; color: var(--text); appearance: auto; }

/* an IP address with its country's flag (Geo.withFlag, flags from flag-icons, MIT) */
.ipf { white-space: nowrap; }
.flag { width: 16px; height: 12px; border-radius: 2px; vertical-align: -1px; margin-right: 5px; box-shadow: 0 0 0 1px color-mix(in srgb, var(--text) 18%, transparent);
  object-fit: cover; display: inline-block; }
.flag-private { background: repeating-linear-gradient(135deg, var(--line) 0 3px, transparent 3px 6px); }

/* an application's own logo on its sign-in page (Applications › Customize) and on its tile in the portal */
.app-logo { display: block; max-width: 180px; max-height: 64px; object-fit: contain; margin: 0 0 12px; }
.tile-img { object-fit: contain; background: #fff; padding: 6px; border: 1px solid var(--line); }
