:root { --bg:#f3f5f9; --card:#fff; --line:#dde2ea; --text:#18202e; --muted:#5f6b80; --accent:#723988; --accent-2:#f3ecf6; --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 { --bg:#0f131a; --card:#171c25; --line:#2a3240; --text:#e7eaf0; --muted:#8e98aa; --accent:#c39bd3; --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; 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; }
.logo { width: 28px; height: 28px; border-radius: 7px; background: url(/static/icon.svg) center/cover; display: inline-block; }
.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; }
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(170px, 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; } }
