:root {
    --bg: #f4f7fb;
    --surface: #ffffff;
    --surface-soft: #f8fafc;
    --text: #102a43;
    --muted: #627d98;
    --line: #d9e2ec;
    --primary: #3157d5;
    --primary-dark: #2442aa;
    --primary-soft: #e8edff;
    --success: #14866d;
    --success-soft: #e1f5ef;
    --danger: #c94646;
    --danger-soft: #fff0f0;
    --shadow: 0 12px 35px rgba(16, 42, 67, 0.08);
    --radius: 18px;
}

.workspace-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 24px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.workspace-tabs a { padding: 10px 16px; border-radius: 10px; font-weight: 700; font-size: 14px; color: var(--muted); }
.workspace-tabs a[aria-current="page"] { background: var(--primary-soft); color: var(--primary-dark); }
.workspace-tabs a:hover { color: var(--primary); }
.team-layout { display: grid; grid-template-columns: minmax(280px, 340px) minmax(0, 1fr); gap: 24px; align-items: start; }
.team-layout .section-card { margin-bottom: 0; }
.team-layout .help-text { margin-top: 16px; }
.team-layout a:not(.button) { color: var(--primary); }
.team-layout table { font-size: 13px; }
.resource-list { display: grid; gap: 16px; min-width: 0; }
.resource-heading { display: flex; align-items: start; justify-content: space-between; gap: 16px; }
.resource-heading .competency-badge { margin-top: 8px; }
.resource-hours { text-align: right; white-space: nowrap; }
.resource-hours strong { display: block; font-size: 28px; }
.resource-hours span { font-size: 12px; color: var(--muted); }
.resource-list article > p { margin-top: 16px; margin-bottom: 12px; font-size: 13px; }
.resource-list details > summary { cursor: pointer; color: var(--primary); font-size: 14px; font-weight: 700; }
.resource-edit-form { margin-top: 16px; }
.resource-remove-form { margin-top: 12px; }
.resource-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.resource-add-form { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; margin-top: 20px; }
.resource-add-form .field { flex: 1 1 100%; font-size: 13px; font-weight: 700; }
.resource-facts { display: grid; gap: 6px; margin: 0; }
.resource-facts dt { color: var(--muted); font-size: 13px; margin-top: 8px; }
.resource-facts dd { margin: 0; }
@media (max-width: 850px) { .team-layout { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 480px) { .resource-fields { grid-template-columns: minmax(0, 1fr); } .workspace-tabs a { padding: 9px 10px; } }

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { min-height: 100%; background: var(--bg); }
body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background:
        radial-gradient(circle at 8% 4%, rgba(49, 87, 213, 0.08), transparent 26rem),
        var(--bg);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
.container { width: min(1180px, calc(100% - 40px)); margin-inline: auto; }
.page-shell { padding-block: 36px 64px; }

.topbar { background: rgba(255,255,255,.9); border-bottom: 1px solid rgba(217,226,236,.8); backdrop-filter: blur(14px); position: sticky; top: 0; z-index: 20; }
.topbar__inner { min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: inline-flex; align-items: center; gap: 11px; font-weight: 800; letter-spacing: -.02em; font-size: 19px; }
.brand__mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; color: white; background: linear-gradient(145deg, #4569e8, #294ab8); box-shadow: 0 7px 18px rgba(49,87,213,.25); }
.topbar__actions { display: flex; align-items: center; gap: 14px; }
.user-label { color: var(--muted); font-size: 14px; }

h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 10px; font-size: clamp(30px, 4vw, 46px); line-height: 1.08; letter-spacing: -.04em; }
h2 { margin-bottom: 7px; font-size: 21px; letter-spacing: -.02em; }
h3 { font-size: 17px; }
p { color: var(--muted); line-height: 1.55; }
.muted { color: var(--muted); }
.eyebrow { display: inline-block; margin-bottom: 10px; color: var(--primary); font-size: 11px; font-weight: 800; letter-spacing: .14em; }
.centered { text-align: center; }
.visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }

.card { background: var(--surface); border: 1px solid rgba(217,226,236,.9); border-radius: var(--radius); box-shadow: var(--shadow); }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 43px; padding: 0 18px; border: 1px solid transparent; border-radius: 11px; font-weight: 750; color: var(--text); background: white; transition: .18s ease; }
.button:hover { transform: translateY(-1px); }
.button:disabled { cursor: not-allowed; opacity: .48; transform: none; box-shadow: none; }
.button--primary { color: white; background: var(--primary); box-shadow: 0 8px 20px rgba(49,87,213,.2); }
.button--primary:hover { background: var(--primary-dark); }
.button--secondary { border-color: var(--line); background: var(--surface); }
.button--secondary:hover { border-color: #aabbd0; background: var(--surface-soft); }
.button--ghost { min-height: 38px; border-color: transparent; background: transparent; }
.button--danger-soft { color: var(--danger); background: var(--danger-soft); border-color: #f3caca; }
.button--small { min-height: 36px; padding-inline: 13px; font-size: 13px; }
.button--large { min-height: 50px; padding-inline: 28px; }
.button--wide { width: 100%; }
.button-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.button-row--center, .centered-actions { display: flex; justify-content: center; margin-top: 24px; }

.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 30px; }
.page-heading p { margin-bottom: 0; }
.page-heading--compact h1 { font-size: clamp(28px, 4vw, 40px); }
.page-heading__actions { display: flex; align-items: center; justify-content: flex-end; gap: 9px; flex-wrap: wrap; }
.breadcrumbs { display: flex; align-items: center; gap: 9px; margin-bottom: 24px; color: var(--muted); font-size: 14px; }
.breadcrumbs a:hover { color: var(--primary); }

.messages { display: grid; gap: 8px; margin-bottom: 22px; }
.message { padding: 13px 16px; border-radius: 11px; color: #28536b; background: #e8f4fb; border: 1px solid #cce8f6; }
.message--success { color: #176b59; background: var(--success-soft); border-color: #bee7db; }
.message--error { color: #9b3232; background: var(--danger-soft); border-color: #f3caca; }

.stack-form { display: grid; gap: 16px; }
.field { display: grid; gap: 7px; }
.field label { font-size: 13px; font-weight: 700; }
.field--compact { gap: 5px; }
input[type="text"], input[type="search"], input[type="password"], input[type="number"], input[type="date"], textarea, select, .form-control {
    width: 100%; min-height: 45px; padding: 11px 13px; color: var(--text); background: white; border: 1px solid var(--line); border-radius: 10px; outline: none; transition: .15s ease;
}
textarea { resize: vertical; line-height: 1.5; }
input:focus, textarea:focus, select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(49,87,213,.12); }
.form-error { color: var(--danger); font-size: 13px; }
.help-text { color: var(--muted); font-size: 12px; line-height: 1.4; }
.task-file-import p { margin: 0; }
.task-file-import input[type="file"] { min-width: 0; padding: 10px; font-size: 13px; }
.text-task-import { margin-top: 20px; border-top: 1px solid var(--line); padding-top: 16px; }
.text-task-import > summary { cursor: pointer; font-size: 14px; font-weight: 750; }

.auth-layout, .join-layout { min-height: calc(100vh - 170px); display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(320px, .7fr); align-items: center; gap: clamp(35px, 8vw, 100px); }
.auth-intro h1, .join-hero h1 { max-width: 720px; }
.auth-intro p, .join-hero p { max-width: 620px; font-size: 18px; }
.auth-card, .join-card { padding: 34px; }
.scale-preview { display: flex; gap: 8px; margin-top: 30px; flex-wrap: wrap; }
.scale-preview span { display: grid; place-items: center; width: 43px; height: 55px; color: var(--primary); font-weight: 800; background: white; border: 1px solid #cbd6f4; border-radius: 9px; box-shadow: 0 5px 14px rgba(31,63,140,.08); transform: rotate(-2deg); }
.scale-preview span:nth-child(even) { transform: translateY(6px) rotate(2deg); }
.scale-preview--large span { width: 50px; height: 68px; }
.organizer-capabilities { display: flex; gap: 8px; margin-top: 26px; flex-wrap: wrap; }
.organizer-capabilities span { padding: 8px 11px; color: var(--primary); background: white; border: 1px solid #d3dcf2; border-radius: 999px; font-size: 12px; font-weight: 750; }
.invitation-expiry { margin: 17px 0 0; color: var(--muted); font-size: 12px; text-align: center; }
.login-invitation-note { margin: 17px 0 0; color: var(--muted); font-size: 12px; text-align: center; }
.invitation-unavailable { text-align: center; }
.invitation-unavailable p { margin-bottom: 22px; }
.invitation-unavailable .button { margin-top: 4px; }

.dashboard-grid { display: grid; grid-template-columns: minmax(260px, .38fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.workspace-metrics { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-bottom: 22px; }
.workspace-metric { display: grid; gap: 7px; padding: 17px 18px; background: white; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); }
.workspace-metric span { color: var(--muted); font-size: 12px; }
.workspace-metric strong { font-size: 27px; }
.dashboard-overview { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 24px; }
.overview-card { min-width: 0; padding: 20px; }
.overview-card .section-heading { margin-bottom: 10px; }
.overview-list { display: grid; }
.overview-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-top: 1px solid #e7edf3; }
.overview-item:first-child { border-top: 0; }
.overview-item strong, .overview-item small { display: block; }
.overview-item small { margin-top: 4px; color: var(--muted); }
.overview-item > span { flex: 0 0 auto; color: var(--primary); font-size: 12px; font-weight: 800; text-align: right; }
.text-danger { color: var(--danger) !important; }
.dashboard-grid > .card { padding: 25px; position: sticky; top: 100px; }
.project-list { display: grid; gap: 14px; }
.project-card { position: relative; display: grid; grid-template-columns: 1fr auto; gap: 16px; padding: 24px 58px 24px 24px; transition: .18s ease; }
.project-card:hover { transform: translateY(-2px); border-color: #b9c7e9; box-shadow: 0 16px 40px rgba(16,42,67,.11); }
.project-card h2 { display: inline; margin-left: 6px; }
.project-card p { margin: 8px 0 0; font-size: 13px; }
.project-card__arrow { position: absolute; right: 23px; top: 50%; transform: translateY(-50%); color: var(--primary); font-size: 25px; }
.metric-row { display: flex; gap: 17px; align-items: center; color: var(--muted); font-size: 13px; }
.metric-row strong { color: var(--text); font-size: 17px; }

.status-dot { display: inline-block; width: 8px; height: 8px; margin-right: 4px; border-radius: 50%; background: #9fb3c8; }
.status-dot--active { background: #27ad87; box-shadow: 0 0 0 4px rgba(39,173,135,.12); }
.pill { display: inline-grid; place-items: center; min-width: 30px; height: 30px; padding: 0 9px; color: var(--primary); background: var(--primary-soft); border-radius: 999px; font-size: 13px; font-weight: 800; }
.badge { display: inline-flex; padding: 5px 9px; color: #526d82; background: #edf2f7; border-radius: 999px; font-size: 12px; font-weight: 700; }
.badge--success { color: var(--success); background: var(--success-soft); }

.three-column-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; margin-bottom: 24px; align-items: start; }
.action-card { overflow: hidden; }
.action-card > summary { display: flex; align-items: center; gap: 12px; min-height: 84px; padding: 18px; list-style: none; cursor: pointer; }
.action-card > summary::-webkit-details-marker { display: none; }
.action-card > summary strong, .action-card > summary small { display: block; }
.action-card > summary small { margin-top: 3px; color: var(--muted); }
.action-card .text-task-import > summary { padding: 0 18px 16px; }
.task-file-import { max-width: 720px; }
#room-file-import { scroll-margin-top: 90px; }
.action-card__number { display: grid; place-items: center; flex: 0 0 34px; height: 34px; color: var(--primary); background: var(--primary-soft); border-radius: 10px; font-weight: 800; }
.details-form { padding: 0 18px 18px; }
.capacity-inputs { display: grid; gap: 9px; min-width: 0; margin: 0; padding: 14px; background: var(--surface-soft); border: 1px solid var(--line); border-radius: 12px; }
.capacity-inputs legend { padding: 0 5px; color: var(--text); font-size: 13px; font-weight: 800; }
.capacity-inputs > p { margin: -2px 0 3px; font-size: 11px; line-height: 1.4; }
.capacity-input { display: grid; grid-template-columns: minmax(112px, 1fr) minmax(100px, .7fr); align-items: center; gap: 9px; }
.capacity-input label { color: var(--muted); font-size: 12px; font-weight: 750; }
.capacity-input input { min-height: 40px; }
.capacity-input--analysis_capacity input { border-left: 4px solid #7653c6; }
.capacity-input--development_capacity input { border-left: 4px solid #3157d5; }
.capacity-input--testing_capacity input { border-left: 4px solid #14866d; }
.capacity-input .form-error { grid-column: 1 / -1; }
.competency-picker { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.competency-option { position: relative; min-width: 0; cursor: pointer; }
.competency-option input { position: absolute; opacity: 0; pointer-events: none; }
.competency-option span { display: flex; align-items: center; justify-content: center; min-height: 42px; padding: 7px 9px; color: var(--muted); background: white; border: 1px solid var(--line); border-radius: 10px; font-size: 12px; font-weight: 750; text-align: center; transition: .15s ease; }
.competency-option input:focus-visible + span { outline: 3px solid rgba(49,87,213,.2); outline-offset: 1px; }
.competency-option input:checked + span { color: white; border-color: transparent; box-shadow: 0 7px 16px rgba(16,42,67,.12); }
.competency-option--none input:checked + span { background: #627d98; }
.competency-option--analysis input:checked + span { background: #7653c6; }
.competency-option--development input:checked + span { background: #3157d5; }
.competency-option--testing input:checked + span { background: #14866d; }
.picker-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 13px; }
.picker-heading strong { color: var(--primary); font-size: 12px; }
.picker-tools { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px; }
.picker-tools input { min-height: 40px; }
.queue-picker { display: grid; gap: 6px; max-height: 310px; padding: 4px; overflow-y: auto; border: 1px solid var(--line); border-radius: 11px; background: var(--surface-soft); }
.queue-picker__item { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: start; gap: 10px; padding: 10px; border-radius: 8px; color: #36536d; font-size: 12px; line-height: 1.4; cursor: pointer; }
.queue-picker__item:hover { background: white; }
.queue-picker__item input { width: 18px; height: 18px; margin: 0; accent-color: var(--primary); }
.queue-picker__item span { min-width: 0; overflow-wrap: anywhere; }

.section-card { margin-top: 22px; padding: 24px; }
.section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 19px; }
.section-heading h2 { margin-bottom: 4px; }
.section-heading p { margin: 0; font-size: 13px; }
.filter-bar { display: flex; gap: 8px; margin: -3px 0 19px; padding-bottom: 3px; overflow-x: auto; }
.filter-chip { display: inline-flex; align-items: center; gap: 7px; flex: 0 0 auto; min-height: 36px; padding: 0 12px; color: var(--muted); background: var(--surface-soft); border: 1px solid var(--line); border-radius: 999px; font-size: 12px; font-weight: 750; }
.filter-chip span { display: grid; place-items: center; min-width: 21px; height: 21px; padding-inline: 5px; color: var(--muted); background: white; border-radius: 999px; font-size: 11px; }
.filter-chip--active { color: white; background: var(--primary); border-color: var(--primary); }
.filter-chip--active span { color: var(--primary); }
.filter-bar--competency { margin-top: -11px; }
.competency-filter--analysis.filter-chip--active { background: #7653c6; border-color: #7653c6; }
.competency-filter--development.filter-chip--active { background: #3157d5; border-color: #3157d5; }
.competency-filter--testing.filter-chip--active { background: #14866d; border-color: #14866d; }
.competency-filter--untyped.filter-chip--active { background: #627d98; border-color: #627d98; }
.table-wrap { overflow-x: auto; margin-inline: -24px; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 14px 24px; border-top: 1px solid #e7edf3; text-align: left; vertical-align: middle; }
th { color: var(--muted); background: var(--surface-soft); font-size: 11px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
td { font-size: 14px; }
.align-right { text-align: right; }
.task-number { display: inline-flex; padding: 5px 8px; color: #294e9f; background: #edf2ff; border-radius: 7px; font-size: 12px; font-weight: 800; white-space: nowrap; }
.competency-badge { display: inline-flex; align-items: center; min-height: 23px; margin-left: 5px; padding: 3px 8px; border-radius: 999px; font-size: 10px; font-weight: 800; white-space: nowrap; }
.competency-badge--analysis { color: #6543af; background: #f0eaff; }
.competency-badge--development { color: #294eaf; background: #e9eeff; }
.competency-badge--testing { color: #11715d; background: #e3f6f0; }
.task-title-cell { margin-bottom: 7px; }
.task-competency-form { width: max-content; max-width: 100%; }
select.competency-select { width: auto; min-height: 29px; padding: 4px 27px 4px 9px; border-radius: 999px; font-size: 11px; font-weight: 750; }
.competency-select--analysis { color: #6543af; background-color: #f7f3ff; border-color: #d8caf5; }
.competency-select--development { color: #294eaf; background-color: #f3f6ff; border-color: #ced8fa; }
.competency-select--testing { color: #11715d; background-color: #f0fbf7; border-color: #c5e8dd; }
.competency-select--none { color: var(--muted); background-color: var(--surface-soft); }
.inline-form { display: inline; }
.task-jump { border: 0; cursor: pointer; }
.task-jump:hover { color: white; background: var(--primary); }
.task-title-secondary { display: inline; margin-left: 8px; }
.estimate-value { font-size: 17px; }
.table-empty, .compact-empty { color: var(--muted); text-align: center; padding: 28px; }

.split-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.item-list { display: grid; }
.list-item { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 14px 2px; border-top: 1px solid #e7edf3; }
.list-item:first-child { border-top: 0; }
.list-item strong, .list-item small { display: block; }
.list-item small { margin-top: 5px; color: var(--muted); }
.list-item > span { color: var(--primary); font-size: 22px; }

.invite-card { display: grid; grid-template-columns: minmax(220px,.6fr) minmax(340px,1fr); align-items: center; gap: 25px; padding: 22px 24px; margin-bottom: 22px; }
.invite-card p { margin: 0; font-size: 13px; }
.session-meta { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.session-meta span { padding: 6px 9px; color: var(--muted); background: rgba(255,255,255,.7); border: 1px solid var(--line); border-radius: 999px; font-size: 12px; }
.session-meta strong { color: var(--text); }
.copy-control { display: grid; grid-template-columns: 1fr auto; gap: 9px; }
.copy-control input { color: #36536d; background: var(--surface-soft); }
.voting-layout { display: grid; grid-template-columns: minmax(0,1fr) 310px; gap: 22px; align-items: start; }
.voting-stage { min-height: 430px; padding: 34px; display: grid; align-content: center; }
.participants-card { padding: 22px; }
.task-focus { text-align: center; max-width: 720px; margin: 0 auto 26px; }
.task-focus h2 { margin: 14px 0 7px; font-size: clamp(22px,4vw,32px); }
.task-focus p { margin-bottom: 0; }
.task-focus--participant { margin-bottom: 35px; }
.task-focus h2 { overflow-wrap: anywhere; }
.task-description { margin-top: 20px; padding: 16px 18px; text-align: left; background: var(--surface-soft); border: 1px solid var(--line); border-radius: 12px; }
.task-description > strong { font-size: 13px; color: var(--muted); }
.task-description__text { margin-top: 8px; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 15px; line-height: 1.6; max-height: 320px; overflow-y: auto; }
.task-external-link { margin-top: 14px; }
.organizer-task-navigation { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; max-width: 620px; width: 100%; margin: -10px auto 28px; }
.organizer-task-navigation span { color: var(--muted); text-align: center; font-size: 12px; font-weight: 700; }
.participant-list { display: grid; gap: 7px; }
.participant { display: grid; grid-template-columns: 34px minmax(0, 1fr); align-items: center; gap: 9px; padding: 8px; background: var(--surface-soft); border-radius: 10px; }
.participant strong { overflow: hidden; text-overflow: ellipsis; font-size: 13px; }
.participant__main { display: grid; min-width: 0; gap: 2px; }
.participant__actions { grid-column: 1 / -1; display: flex; gap: 5px; margin-left: 43px; }
.participant__action { min-height: 28px; padding: 0 8px; color: var(--primary); background: white; border: 1px solid var(--line); border-radius: 8px; font-size: 10px; font-weight: 750; }
.participant__action:hover { border-color: #aabbd0; background: var(--primary-soft); }
.participant__action:disabled { cursor: wait; opacity: .55; }
.participant__action--rotate { color: var(--muted); }
.avatar { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; color: var(--primary); background: var(--primary-soft); font-weight: 800; }
.participant__state { color: var(--muted); font-size: 11px; }
.participant__state--ready { color: var(--success); font-weight: 800; }
.participant__state--completed, .participant__state--all_voted { color: var(--success); font-weight: 800; }
.participant__state--in_progress { color: #9a6a20; font-weight: 800; }
.participant__state--not_started { color: var(--muted); }
.threshold-hint { margin: 7px 0 0; color: #9a6a20; font-size: 13px; font-weight: 700; }
.threshold-hint--ready { color: var(--success); }

.waiting-visual { display: flex; justify-content: center; gap: 8px; margin-bottom: 22px; }
.waiting-visual span { width: 13px; height: 18px; border-radius: 4px; background: #b8c6ec; animation: thinking 1.2s ease-in-out infinite; }
.waiting-visual span:nth-child(2) { animation-delay: .14s; }
.waiting-visual span:nth-child(3) { animation-delay: .28s; }
@keyframes thinking { 0%,100% { transform: translateY(0); background:#b8c6ec; } 50% { transform: translateY(-8px); background:var(--primary); } }

.average-panel { display: grid; justify-items: center; gap: 4px; margin: 4px auto 24px; padding: 20px 40px; color: #173e35; background: var(--success-soft); border: 1px solid #bfe7dc; border-radius: 16px; text-align: center; }
.average-panel span { color: #397767; font-size: 13px; font-weight: 700; }
.average-panel strong { font-size: 48px; line-height: 1; letter-spacing: -.05em; }
.average-panel small { color: #4c806f; }
.average-panel--large { max-width: 360px; padding: 28px 45px; }
.average-panel--large strong { font-size: 62px; }
.revealed-votes { display: flex; justify-content: center; flex-wrap: wrap; gap: 9px; }
.revealed-votes > div { display: inline-flex; align-items: center; gap: 13px; padding: 9px 12px; background: var(--surface-soft); border: 1px solid var(--line); border-radius: 10px; }
.revealed-votes strong { display: grid; place-items: center; min-width: 30px; height: 30px; color: var(--primary); background: var(--primary-soft); border-radius: 7px; }
.revealed-votes--grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(145px,1fr)); max-width: 720px; margin-inline: auto; }

.room-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.room-header h1 { font-size: clamp(28px,4vw,40px); }
.room-header p { margin: 0; }
.room-header__actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.connection-state { display: inline-flex; align-items: center; gap: 7px; padding: 7px 11px; color: var(--success); background: var(--success-soft); border-radius: 999px; font-size: 12px; font-weight: 800; }
.connection-state span { width: 7px; height: 7px; background: var(--success); border-radius: 50%; }
.connection-state--offline { color: var(--danger); background: var(--danger-soft); }
.participant-stage { min-height: 520px; padding: clamp(24px,5vw,52px); display: grid; align-content: center; }
.vote-prompt { margin-bottom: 17px; text-align: center; color: var(--muted); font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .09em; }
.card-grid { display: grid; grid-template-columns: repeat(9, minmax(60px,1fr)); gap: 11px; max-width: 1000px; margin-inline: auto; }
.poker-card { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; aspect-ratio: .72; min-height: 105px; padding: 20px 5px 16px; color: var(--primary); background: white; border: 2px solid #c8d3ee; border-radius: 13px; box-shadow: 0 7px 16px rgba(31,63,140,.08); transition: .17s ease; }
.poker-card::before, .poker-card::after { content: attr(data-value); position: absolute; color: #8fa3d4; font-size: 11px; font-weight: 800; }
.poker-card::before { top: 7px; left: 8px; }
.poker-card::after { right: 8px; bottom: 7px; transform: rotate(180deg); }
.poker-card__value { font-size: clamp(22px,3vw,34px); font-weight: 850; line-height: 1; }
.poker-card__label { max-width: 100%; color: var(--muted); font-size: 10px; font-weight: 750; line-height: 1.15; overflow-wrap: anywhere; }
.poker-card:hover { transform: translateY(-7px); border-color: var(--primary); box-shadow: 0 13px 24px rgba(49,87,213,.16); }
.poker-card--selected { transform: translateY(-10px); color: white; background: var(--primary); border-color: var(--primary); box-shadow: 0 16px 30px rgba(49,87,213,.26); }
.poker-card--selected::before, .poker-card--selected::after { color: #d8e0ff; }
.poker-card--selected .poker-card__label { color: #e3e8ff; }
.poker-card:disabled { cursor: wait; opacity: .65; }
.vote-feedback { margin: 20px 0 0; text-align: center; color: var(--muted); font-size: 13px; }
.estimation-guide { width: min(900px, 100%); margin: 16px auto 0; border: 1px solid var(--line); border-radius: 13px; background: var(--surface-soft); }
.estimation-guide summary { display: flex; align-items: center; justify-content: center; min-height: 45px; padding: 10px 16px; color: var(--primary); list-style: none; cursor: pointer; font-size: 13px; font-weight: 800; }
.estimation-guide summary::-webkit-details-marker { display: none; }
.estimation-guide summary::after { content: "+"; margin-left: 8px; font-size: 18px; line-height: 1; }
.estimation-guide[open] summary::after { content: "−"; }
.estimation-guide__content { padding: 0 16px 16px; border-top: 1px solid var(--line); }
.estimation-guide__content > p { margin: 14px 0; font-size: 13px; }
.estimation-guide__list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.estimation-guide__item { display: grid; grid-template-columns: 34px minmax(0, 1fr); align-items: start; gap: 10px; padding: 10px; background: white; border: 1px solid #e4eaf2; border-radius: 10px; }
.estimation-guide__item > strong { display: grid; place-items: center; min-height: 34px; color: var(--primary); background: var(--primary-soft); border-radius: 8px; }
.estimation-guide__item b, .estimation-guide__item small { display: block; }
.estimation-guide__item b { font-size: 12px; }
.estimation-guide__item small { margin-top: 3px; color: var(--muted); font-size: 11px; line-height: 1.35; }
.estimation-guide__note { padding: 10px 12px; color: #775a1e; background: #fff8e8; border: 1px solid #f2dfad; border-radius: 9px; }
.estimation-guide__note strong { color: #775a1e; }
.participant-task-navigation { position: sticky; bottom: 12px; z-index: 12; display: grid; grid-template-columns: minmax(105px, auto) 1fr minmax(105px, auto); align-items: center; gap: 12px; width: min(760px, 100%); margin: 28px auto 0; padding: 10px; background: rgba(255,255,255,.96); border: 1px solid var(--line); border-radius: 15px; box-shadow: 0 12px 32px rgba(16,42,67,.16); backdrop-filter: blur(12px); }
.participant-task-navigation span { color: var(--muted); text-align: center; font-size: 12px; font-weight: 750; }

.completion-page { display: grid; place-items: center; padding: 24px; }
.completion-message { width: min(520px, 100%); text-align: center; }
.completion-message__icon { display: grid; place-items: center; width: 72px; height: 72px; margin: 0 auto 24px; color: white; background: var(--success); border-radius: 50%; box-shadow: 0 14px 32px rgba(20,134,109,.22); font-size: 34px; font-weight: 850; }
.completion-message h1 { margin-bottom: 12px; }
.completion-message p { margin-bottom: 0; font-size: 17px; }

.queue-progress { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 14px; margin-bottom: 15px; color: var(--muted); font-size: 12px; }
.queue-progress progress { width: 100%; height: 9px; overflow: hidden; border: 0; border-radius: 999px; background: var(--primary-soft); }
.queue-progress progress::-webkit-progress-bar { background: var(--primary-soft); border-radius: 999px; }
.queue-progress progress::-webkit-progress-value { background: var(--success); border-radius: 999px; }
.queue-progress progress::-moz-progress-bar { background: var(--success); border-radius: 999px; }
.queue-list { display: grid; gap: 7px; }
.queue-row { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto auto minmax(88px, auto); align-items: center; gap: 12px; padding: 12px; border: 1px solid #e7edf3; border-radius: 11px; background: var(--surface-soft); }
.queue-row--active { border-color: #d8e1f2; }
.queue-row--current { box-shadow: inset 4px 0 0 var(--primary), 0 6px 16px rgba(49,87,213,.1); }
.queue-row--completed { opacity: .72; }
.queue-row__position { display: grid; place-items: center; width: 30px; height: 30px; color: var(--muted); background: white; border: 1px solid var(--line); border-radius: 8px; font-size: 12px; font-weight: 800; }
.queue-row__task { min-width: 0; }
.queue-row__task strong { display: inline; margin-left: 8px; font-size: 13px; overflow-wrap: anywhere; }
.queue-row__estimate { display: grid; justify-items: end; gap: 2px; text-align: right; }
.queue-row__estimate small { max-width: 90px; color: var(--muted); font-size: 9px; line-height: 1.15; }
.queue-row__estimate strong { color: var(--text); font-size: 14px; }
.queue-row__votes { color: var(--muted); font-size: 12px; white-space: nowrap; }
.queue-row__votes--ready { color: var(--success); font-weight: 800; }
.badge--active { color: var(--primary); background: var(--primary-soft); }
.badge--new { color: #8a5b18; background: #fff4d7; }
.table-actions { display: flex; align-items: center; justify-content: flex-end; gap: 5px; }
.table-actions form { flex: 0 0 auto; }
.archive-notice { margin: -10px 0 22px; padding: 13px 16px; color: #72551b; background: #fff8e7; border: 1px solid #f0dda9; border-radius: 11px; font-size: 13px; }
.add-queue-card summary { margin-bottom: 0; cursor: pointer; list-style: none; }
.add-queue-card summary::-webkit-details-marker { display: none; }
.add-queue-card[open] summary { margin-bottom: 16px; }

.sprint-metrics { display: grid; grid-template-columns: repeat(3,1fr); gap: 15px; margin-bottom: 22px; }
.capacity-panel { display: grid; gap: 13px; margin-bottom: 22px; padding: 20px 22px; }
.capacity-panel__heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; }
.capacity-panel__heading strong, .capacity-panel__heading small { display: block; }
.capacity-panel__heading small { margin-top: 4px; color: var(--muted); }
.capacity-panel__heading > span { color: var(--success); font-size: 13px; font-weight: 800; }
.capacity-track { height: 11px; overflow: hidden; background: var(--primary-soft); border-radius: 999px; }
.capacity-track span { display: block; height: 100%; background: var(--success); border-radius: inherit; transition: width .25s ease; }
.capacity-panel p { margin: 0; font-size: 13px; }
.capacity-panel--over { border-color: #f0b9b9; background: #fffafa; }
.capacity-panel--over .capacity-panel__heading > span, .capacity-panel--over p { color: var(--danger); }
.capacity-panel--over .capacity-track span { background: var(--danger); }
.capacity-editor { margin-bottom: 22px; padding: 20px 22px; }
.capacity-editor summary { margin-bottom: 0; cursor: pointer; list-style: none; }
.capacity-editor summary::-webkit-details-marker { display: none; }
.capacity-editor[open] summary { margin-bottom: 16px; }
.capacity-editor__form { display: flex; align-items: flex-end; gap: 12px; }
.capacity-editor__form .capacity-inputs { flex: 1 1 auto; }
.capacity-inputs--horizontal { grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 0; background: transparent; border: 0; }
.capacity-inputs--horizontal .capacity-input { grid-template-columns: 1fr; gap: 6px; }
.capacity-breakdown { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; margin-bottom: 22px; }
.capacity-panel--competency { min-width: 0; margin-bottom: 0; padding: 18px; }
.capacity-panel--competency .capacity-panel__heading { align-items: flex-start; flex-direction: column; gap: 10px; }
.capacity-panel--competency .capacity-panel__heading > span { align-self: flex-start; }
.capacity-panel--competency .competency-badge { margin: 0 0 9px; }
.capacity-panel--analysis .capacity-track span { background: #7653c6; }
.capacity-panel--development .capacity-track span { background: #3157d5; }
.capacity-panel--testing .capacity-track span { background: #14866d; }
.capacity-panel--unset { background: var(--surface-soft); border-style: dashed; box-shadow: none; }
.capacity-panel--unset .capacity-panel__heading > span { color: var(--muted); }
.capacity-panel--competency.capacity-panel--over .capacity-track span { background: var(--danger); }
.capacity-untyped-warning { margin: -7px 0 22px; padding: 13px 16px; color: #76531a; background: #fff8e7; border: 1px solid #f0dda9; border-radius: 11px; font-size: 13px; }
.status-panel { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 22px; padding: 18px 22px; }
.status-panel strong, .status-panel small { display: block; }
.status-panel small { margin-top: 4px; color: var(--muted); }
.status-switcher { display: flex; align-items: center; justify-content: flex-end; gap: 7px; flex-wrap: wrap; }
.status-switcher .button--primary:disabled { cursor: default; opacity: 1; }
.metric-card { display: flex; align-items: baseline; gap: 8px; padding: 20px 22px; background: white; border: 1px solid var(--line); border-radius: 15px; box-shadow: var(--shadow); }
.metric-card span { margin-right: auto; color: var(--muted); font-size: 13px; }
.metric-card strong { font-size: 27px; }
.metric-card small { color: var(--muted); }
.check-list { display: grid; gap: 8px; }
.check-item { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 13px; padding: 13px 15px; border: 1px solid var(--line); border-radius: 11px; cursor: pointer; }
.check-item:hover { background: var(--surface-soft); border-color: #b7c5de; }
.check-item input { width: 18px; height: 18px; accent-color: var(--primary); }
.check-item strong, .check-item small { display: block; }
.check-item small { margin-top: 3px; color: var(--muted); }
.check-item b { font-size: 17px; }
.section-footer { display: flex; justify-content: flex-end; padding-top: 18px; }
.icon-button { width: 33px; height: 33px; padding: 0; color: var(--danger); background: var(--danger-soft); border: 0; border-radius: 9px; font-size: 21px; }
.sprint-task--transferred { opacity: .62; }
.transfer-card summary { margin-bottom: 0; cursor: pointer; list-style: none; }
.transfer-card summary::-webkit-details-marker { display: none; }
.transfer-card[open] summary { margin-bottom: 16px; }

.empty-state { padding: 35px; text-align: center; }
.empty-state__icon { display: grid; place-items: center; width: 54px; height: 54px; margin: 0 auto 16px; color: var(--primary); background: var(--primary-soft); border-radius: 16px; font-size: 24px; font-weight: 800; }
.empty-state p { margin-bottom: 0; }
.empty-state--stage { align-self: center; box-shadow: none; border: 0; }

@media (max-width: 980px) {
    .three-column-actions { grid-template-columns: 1fr; }
    .dashboard-grid, .voting-layout { grid-template-columns: 1fr; }
    .workspace-metrics { grid-template-columns: repeat(3, 1fr); }
    .dashboard-overview { grid-template-columns: 1fr; }
    .dashboard-grid > .card { position: static; }
    .participant-list { grid-template-columns: repeat(auto-fit,minmax(190px,1fr)); }
    .card-grid { grid-template-columns: repeat(3,1fr); }
    .capacity-breakdown { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
    .container { width: min(100% - 24px, 1180px); }
    .page-shell { padding-block: 24px 45px; }
    .user-label { display: none; }
    .auth-layout, .join-layout { grid-template-columns: 1fr; gap: 30px; padding-block: 22px; }
    .auth-intro { order: 2; }
    .page-heading, .room-header { align-items: flex-start; flex-direction: column; }
    .page-heading__actions { width: 100%; justify-content: flex-start; }
    .status-panel { align-items: flex-start; flex-direction: column; }
    .status-switcher { width: 100%; justify-content: flex-start; }
    .capacity-panel__heading { align-items: flex-start; flex-direction: column; }
    .capacity-editor__form { align-items: stretch; flex-direction: column; }
    .capacity-editor__form .button { width: 100%; }
    .capacity-inputs--horizontal { grid-template-columns: 1fr; width: 100%; }
    .invite-card { grid-template-columns: 1fr; }
    .copy-control { grid-template-columns: 1fr; }
    .picker-tools { grid-template-columns: 1fr; }
    .split-grid, .sprint-metrics { grid-template-columns: 1fr; }
    .workspace-metrics { grid-template-columns: repeat(2, 1fr); }
    .project-card { grid-template-columns: 1fr; }
    .metric-row { flex-wrap: wrap; }
    .section-card { padding: 18px; }
    .table-wrap { margin-inline: -18px; }
    th, td { padding-inline: 18px; }
    .participant-stage, .voting-stage { min-height: 440px; padding: 24px 16px; }
    .card-grid { gap: 8px; }
    .poker-card { min-height: 92px; }
    .estimation-guide__list { grid-template-columns: 1fr; }
    .task-title-secondary { display: block; margin: 6px 0 0; min-width: 260px; }
    .mobile-action-bar { position: sticky; bottom: 10px; z-index: 10; padding: 9px; background: rgba(255,255,255,.94); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 10px 30px rgba(16,42,67,.16); backdrop-filter: blur(10px); }
    .mobile-action-bar .button { min-height: 50px; }
    .queue-row { grid-template-columns: 32px minmax(0, 1fr) auto; }
    .queue-row__task strong { display: block; margin: 6px 0 0; }
    .queue-row .badge { grid-column: 2; justify-self: start; }
    .queue-row__votes { grid-column: 2; }
    .queue-row__estimate { grid-column: 3; grid-row: 1 / span 3; }
}

@media (max-width: 440px) {
    .brand span:last-child { display: none; }
    .auth-card, .join-card { padding: 24px; }
    .scale-preview span { width: 38px; height: 50px; }
    .page-heading h1 { overflow-wrap: anywhere; }
    .card-grid { grid-template-columns: repeat(3, minmax(48px,1fr)); }
    .poker-card { min-height: 92px; padding: 16px 3px 12px; border-radius: 10px; }
    .poker-card__value { font-size: 23px; }
    .poker-card__label { font-size: 9px; }
    .button-row--center { align-items: stretch; flex-direction: column; }
    .button-row--center form, .button-row--center button { width: 100%; }
    .queue-progress { grid-template-columns: 1fr; gap: 7px; }
    .queue-picker { max-height: 45vh; }
    .organizer-task-navigation { grid-template-columns: 1fr 1fr; }
    .organizer-task-navigation span { display: none; }
    .organizer-task-navigation form, .organizer-task-navigation button { width: 100%; }
    .participant-task-navigation { grid-template-columns: 1fr 1fr; }
    .participant-task-navigation span { grid-column: 1 / -1; grid-row: 1; }
}

/* Sprint planning from EVA */
.planning-filters { display: flex; align-items: end; flex-wrap: wrap; gap: 12px; padding: 20px; }
.planning-filters label { flex: 1 1 220px; display: grid; gap: 6px; }
.selection-capacity { display: grid; gap: 7px; padding: 16px 20px; background: #f5f8fc; font-size: .9rem; }
.selection-capacity--over { color: #b54708; font-weight: 700; }
.check-item[hidden] { display: none; }

/* Additional EVA task types share the existing badge rhythm. */
.competency-badge--development_abs, .competency-badge--development_be,
.competency-badge--development_fe { background: #eaf1ff; color: #2456a6; }
.competency-badge--defect { background: #fff0ee; color: #a83426; }
