:root {
    font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, sans-serif;
    color: #21314b;
    background: #f3f6fb;
    font-size: 16px;
    --blue: #173e78;
    --blue-dark: #102b53;
    --muted: #617089;
    --border: #dce4ef;
    --shadow: 0 8px 28px rgba(22, 47, 85, .045);
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; }
a { color: var(--blue); text-underline-offset: 4px; }
a:hover { color: #245eaf; }
p { line-height: 1.7; }
h1, h2, h3 { color: #172c4b; line-height: 1.2; }
h1 { font-size: clamp(1.9rem, 3.2vw, 2.65rem); letter-spacing: -.045em; margin: .55rem 0 1rem; font-weight: 700; }
h2 { font-size: 1.15rem; letter-spacing: -.02em; margin: 0 0 .7rem; }
h3 { font-size: 1rem; }
button, input, select { font: inherit; }
button, .button { display: inline-flex; justify-content: center; align-items: center; gap: .5rem; min-height: 44px; padding: .75rem 1.15rem; background: var(--blue); color: #fff; border: 1px solid var(--blue); border-radius: 9px; font-size: .9rem; font-weight: 650; cursor: pointer; text-decoration: none; transition: background .15s, box-shadow .15s; }
button:hover, .button:hover { background: var(--blue-dark); color: #fff; box-shadow: 0 4px 12px #173e781a; }
.secondary { background: #fff; color: var(--blue); border-color: #c9d6e8; }
.secondary:hover { background: #edf3fc; color: var(--blue-dark); }
:focus-visible { outline: 3px solid #3679d5; outline-offset: 4px; }
.skip-link { position: absolute; left: 1rem; top: -6rem; z-index: 20; padding: 1rem; background: white; border-radius: 8px; }
.skip-link:focus { top: .5rem; }
.test-banner { display: flex; justify-content: center; align-items: center; gap: .45rem; padding: .55rem 1rem; background: #e8eef8; color: #405777; font-size: .75rem; font-weight: 600; text-align: center; }
.test-indicator { width: 6px; height: 6px; border-radius: 50%; background: #406ba6; flex-shrink: 0; }
.site-header { background: #fff; border-bottom: 1px solid var(--border); }
.header-inner { max-width: 1280px; margin: auto; min-height: 88px; padding: 1rem 2rem; display: flex; align-items: center; gap: 2.75rem; }
.brand { display: inline-flex; align-items: center; gap: .75rem; text-decoration: none; color: var(--blue-dark); flex-shrink: 0; }
.brand-mark { display: grid; place-items: center; width: 43px; height: 46px; border-radius: 12px; background: var(--blue); color: white; }
.brand-mark svg { width: 29px; height: 29px; }
.brand-name { font-size: 1.4rem; line-height: 1; letter-spacing: -.04em; font-weight: 750; }
.brand-plus { margin-left: .2rem; color: #446a9f; font-size: .85rem; font-weight: 500; }
.brand-name small { display: block; margin-top: .45rem; font-size: .6rem; letter-spacing: .22em; color: var(--muted); }
.main-nav { align-self: stretch; display: flex; align-items: center; }
.main-nav a { padding: .65rem .9rem; border-radius: 8px; text-decoration: none; font-size: .88rem; font-weight: 600; }
.main-nav a.active { background: #edf3fc; color: var(--blue); }
.account-menu { display: flex; align-items: center; gap: 1rem; margin-left: auto; min-width: 0; }
.account-name { color: var(--muted); font-size: .8rem; overflow-wrap: anywhere; }
.account-menu form { margin: 0; }
.header-caption { margin-left: auto; color: var(--muted); font-size: .85rem; }
main { max-width: 1280px; min-height: calc(100vh - 250px); margin: 0 auto; padding: 3rem 2rem 2.5rem; }
main:focus { outline: none; }
.eyebrow { color: #496b9b; font-size: .7rem; font-weight: 750; letter-spacing: .15em; text-transform: uppercase; margin: 0 0 .5rem; }
.page-heading { margin-bottom: 2rem; }
.page-description { color: var(--muted); max-width: 680px; margin: 0; }
.breadcrumb { display: inline-block; font-size: .85rem; margin-bottom: 1.75rem; text-decoration: none; }
.cards, .stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1.25rem; margin: 1.75rem 0; }
.card, .panel, .auth-panel, .stat-card { background: #fff; border: 1px solid var(--border); border-radius: 16px; padding: 1.6rem; box-shadow: var(--shadow); min-width: 0; }
.card { display: block; text-decoration: none; overflow-wrap: anywhere; }
a.card { border-top: 3px solid var(--blue); transition: transform .18s, box-shadow .18s, border-color .18s; }
a.card:hover { transform: translateY(-3px); box-shadow: 0 12px 30px #173e7810; border-color: #9db9df; }
.card p { color: var(--muted); font-size: .9rem; }
.card strong, .stat-value { display: block; font-size: 2.2rem; font-weight: 700; color: var(--blue-dark); letter-spacing: -.04em; margin-top: .75rem; }
.card strong.small, .stat-value.small { font-size: 1.1rem; letter-spacing: -.015em; line-height: 1.6; }
.stat-label { color: var(--muted); font-size: .85rem; font-weight: 600; }
.panel { margin: 1.5rem 0; }
.panel-heading, .section-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.25rem; }
.panel-heading h2, .section-heading h2 { margin-bottom: .3rem; }
.panel-heading p { margin: .35rem 0 0; color: var(--muted); font-size: .9rem; }
.badge { display: inline-flex; align-items: center; padding: .3rem .65rem; border-radius: 6px; background: #edf3fc; color: #254f87; font-size: .75rem; font-weight: 650; line-height: 1.4; white-space: nowrap; }
.badge.warning { background: #fff3df; color: #80510b; }
.badge.neutral { background: #eef1f5; color: #59677b; }
.empty-state { padding: 2rem; text-align: center; color: var(--muted); background: #f8fafd; border: 1px dashed #cedaea; border-radius: 12px; }
.empty-state h2, .empty-state h3 { color: #344e71; }
.empty-state p { margin-bottom: 0; }
label { display: flex; flex-direction: column; gap: .5rem; margin: 1rem 0; font-size: .85rem; font-weight: 600; }
input, select { width: 100%; min-height: 44px; padding: .8rem .85rem; border: 1px solid #bdcbe0; background: #fff; color: #21314b; border-radius: 8px; max-width: 100%; }
input::placeholder { color: #74849b; }
input[type=file] { background: #f8fafd; padding: .65rem; }
input::file-selector-button { border: 0; border-radius: 6px; background: #e7eef9; color: var(--blue); padding: .55rem .8rem; margin-right: .85rem; cursor: pointer; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; }
.form-hint, .muted, time { color: var(--muted); font-size: .85rem; line-height: 1.6; }
.member { display: flex; align-items: end; gap: 1rem; border-top: 1px solid #e7edf5; padding: 1rem 0; }
.member > span { flex: 1; align-self: center; overflow-wrap: anywhere; min-width: 0; font-size: .9rem; }
.member label { margin: 0; }
.error, .notice, .success { padding: 1rem 1.15rem; border-radius: 10px; line-height: 1.6; font-size: .9rem; border: 1px solid transparent; }
.error { background: #fff0ef; color: #922e2a; border-color: #f5d0cd; }
.notice { background: #fff7e8; color: #79531b; border-color: #f0dfb9; }
.success { background: #eaf4ef; color: #286347; border-color: #cce4d7; }
.table-scroll { overflow: auto; border: 1px solid #e2e9f2; border-radius: 10px; }
table { width: 100%; border-collapse: collapse; font-size: .85rem; text-align: left; }
td, th { padding: 1rem; border-bottom: 1px solid #e7edf5; line-height: 1.5; }
th { background: #f5f8fc; font-size: .73rem; font-weight: 650; color: #586c87; white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #f9fbff; }
code { font-size: .8rem; overflow-wrap: anywhere; }
.auth-shell { display: grid; grid-template-columns: 1fr 1fr; max-width: 1050px; margin: 1.5rem auto 2rem; border-radius: 22px; overflow: hidden; border: 1px solid var(--border); background: white; box-shadow: 0 20px 65px #102b530c; }
.auth-intro { position: relative; padding: 3rem; background: radial-gradient(ellipse at 0% 100%, #2b5891 0%, transparent 65%), #102b53; color: #dce7f8; }
.auth-intro h1, .auth-intro h2 { color: white; }
.auth-intro h1 { font-size: clamp(2rem, 3.4vw, 2.8rem); }
.auth-intro .eyebrow { color: #afc9ec; }
.auth-intro .page-description, .auth-intro .muted { color: #c4d4e9; }
.auth-intro p { font-size: .95rem; }
.auth-panel { padding: 3rem; border: 0; border-radius: 0; box-shadow: none; }
.auth-panel > h1 { font-size: 1.8rem; }
.auth-panel form > button { width: 100%; margin-top: .5rem; }
.auth-icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 14px; background: #edf3fc; color: var(--blue); margin-bottom: 1.5rem; }
.auth-intro .auth-icon { background: #ffffff15; color: white; }
.auth-icon svg { width: 28px; height: 28px; }
.auth-steps { margin: 2rem 0 0; padding-left: 1.25rem; line-height: 1.7; }
.auth-steps li { padding: .5rem 0 .5rem .3rem; }
.setup-key { display: block; padding: 1rem; background: #f1f5fb; border-radius: 8px; overflow-wrap: anywhere; margin-top: .75rem; letter-spacing: .08em; }
.setup-qr { display: block; width: 264px; height: auto; max-width: 100%; margin: 1.25rem auto; image-rendering: pixelated; }
.skip-setup { margin-top: 1.75rem; padding-top: 1rem; border-top: 1px solid var(--border); }
.checkbox-label { flex-direction: row; align-items: flex-start; line-height: 1.5; gap: .65rem; font-weight: 400; }
.checkbox-label input { flex-shrink: 0; width: 18px; height: 18px; min-height: 0; margin-top: .2rem; accent-color: var(--blue); }
summary { cursor: pointer; color: var(--blue); font-size: .9rem; line-height: 1.6; }
.site-footer { display: flex; justify-content: space-between; gap: 1rem; max-width: 1216px; margin: 0 auto; border-top: 1px solid var(--border); padding: 1.6rem 0 2rem; color: var(--muted); font-size: .75rem; line-height: 1.6; }
@media (max-width: 900px) {
    .header-inner { gap: 1.25rem; }
    .account-name { max-width: 170px; }
    .auth-intro, .auth-panel { padding: 2rem; }
    .member { flex-wrap: wrap; }
    .member > span { flex-basis: 100%; }
    .site-footer { margin: 0 2rem; }
}
@media (max-width: 640px) {
    .test-banner { flex-wrap: wrap; gap: .2rem .4rem; }
    .test-banner-detail { width: 100%; font-weight: 400; }
    .header-inner { flex-wrap: wrap; padding: 1rem; gap: 1rem; }
    .header-caption { max-width: 125px; font-size: .75rem; text-align: right; }
    .main-nav { order: 3; width: 100%; }
    .account-menu { gap: .5rem; }
    .account-name { max-width: 105px; font-size: .7rem; }
    .account-menu button { padding: .65rem; font-size: .8rem; }
    main { padding: 2rem 1rem; }
    .cards, .stats-grid { grid-template-columns: 1fr; }
    .panel, .card, .stat-card { padding: 1.25rem; }
    .panel-heading, .section-heading { align-items: flex-start; flex-wrap: wrap; }
    .auth-shell { grid-template-columns: 1fr; margin: 0; }
    .auth-intro, .auth-panel { padding: 1.75rem; }
    .auth-intro h1 { font-size: 2rem; }
    .auth-steps { margin-top: 1rem; }
    .member label { flex: 1; min-width: 100px; }
    .site-footer { flex-direction: column; margin: 0 1rem; gap: .3rem; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}
/* Shared details for workspace cards and activity lists. */
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; }
.page-heading > .button { flex-shrink: 0; }
.breadcrumb { display: flex; flex-wrap: wrap; gap: .65rem; color: var(--muted); }
.organization-icon { display: grid; place-items: center; width: 48px; height: 48px; background: #edf3fc; color: var(--blue); border-radius: 12px; margin-bottom: 1.5rem; }
.organization-icon svg { width: 25px; height: 25px; }
.organization-card h3 { margin: 0; font-size: 1.15rem; }
.organization-card strong { display: inline; font-size: inherit; letter-spacing: normal; margin: 0 0 0 .35rem; }
.card-link { display: flex; justify-content: space-between; gap: 1rem; margin-top: 1.75rem; padding-top: 1rem; border-top: 1px solid #e7edf5; font-size: .85rem; font-weight: 650; }
.badge-warning { background: #fff3df; color: #80510b; }
.badge-neutral { background: #eef1f5; color: #59677b; }
.import-form { max-width: 640px; }
.activity-list { list-style: none; padding: 0; margin: 0; }
.activity-list li { position: relative; border-left: 2px solid #dce6f4; padding: 0 0 1.5rem 1.5rem; margin-left: .35rem; }
.activity-list li::before { content: ""; position: absolute; left: -6px; top: .35rem; width: 10px; height: 10px; border-radius: 50%; background: #547bb2; border: 2px solid white; }
.activity-list li:last-child { padding-bottom: 0; }
.activity-list p { margin: .4rem 0 0; overflow-wrap: anywhere; }
.activity-heading { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .5rem 1rem; font-size: .9rem; }
.auth-intro .form-hint { color: #bacde7; margin-top: 2rem; font-size: .8rem; }
.auth-panel > h2 { font-size: 1.7rem; margin-top: .6rem; }
.auth-icon { font-size: 1.5rem; }
@media (max-width: 640px) { .page-heading { flex-direction: column; align-items: flex-start; } }
.page-heading > div, .breadcrumb > span { min-width: 0; }
.page-heading h1, .breadcrumb { overflow-wrap: anywhere; }
h1[tabindex="-1"]:focus { outline: none; }
@media (max-width: 640px) {
    .auth-intro { padding: 1.5rem; }
    .auth-intro h1 { font-size: 1.75rem; }
    .auth-intro .auth-icon, .auth-intro .auth-steps, .auth-intro .form-hint { display: none; }
    .auth-intro .page-description { font-size: .85rem; }
}
@media (min-width: 901px) and (max-width: 1280px) { .site-footer { margin-right: 2rem; margin-left: 2rem; } }
