@font-face {
    font-family: Inter;
    font-style: normal;
    font-weight: 400 600;
    font-display: swap;
    src: url("/fonts/Inter-400-latin-ext.woff2") format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: Inter;
    font-style: normal;
    font-weight: 400 600;
    font-display: swap;
    src: url("/fonts/Inter-400-latin.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: "DM Sans";
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url("/fonts/DMSans-latin-ext.woff2") format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: "DM Sans";
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url("/fonts/DMSans-latin.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
    --bg: #f7f7f5;
    --sidebar: #f7f7f5;
    --card: #ffffff;
    --ink: #242c2b;
    --muted: #77827d;
    --faint: #8a918b;
    --line: #e5e8e2;
    --line-strong: #dcdcd8;
    --green: #164e43;
    --green-2: #2f7d65;
    --mint: #eaf2ed;
    --mint-2: #eef6f1;
    --sand: #f6f1e6;
    --sand-ink: #6d5833;
    --danger: #8d3b3b;
    --shadow: 0 1px 2px rgba(28, 33, 30, 0.04);
    --sans: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
    min-height: 100vh;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--sans);
    font-size: 14px;
    line-height: 1.5;
    font-feature-settings: "ss01" off;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }

.shell { width: 100%; display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
@media (min-width: 1101px) {
    .shell { height: 100vh; height: 100dvh; overflow: hidden; }
    .sidebar, .main { height: 100%; min-height: 0; overflow: auto; }
}
.sidebar {
    border-right: 1px solid var(--line);
    padding: 18px 16px 22px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    background: var(--sidebar);
}
.logo { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 20px; letter-spacing: -0.045em; padding: 2px 6px 6px; }
.mark {
    width: 32px; height: 32px; border-radius: 99px; background: #164e43;
    display: grid; place-items: center; flex: none;
}
.mark svg { width: 18px; height: 18px; display: block; }
.who strong { display: block; font-size: 14px; font-weight: 600; }
.who span, .crumb-muted { color: var(--muted); font-size: 12px; line-height: 1.3; display: block; }
.side-label {
    margin: 8px 8px 6px; color: var(--faint); font-size: 11px; letter-spacing: 0.08em; font-weight: 600;
}
.field input, .field textarea, .search {
    width: 100%; background: white; border: 1px solid var(--line-strong); border-radius: 12px; padding: 10px 12px;
}
select {
    width: 100%;
    appearance: none;
    background-color: #fff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2377827d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 14px;
    border: 1px solid var(--line-strong);
    border-radius: 12px;
    padding: 10px 36px 10px 12px;
    cursor: pointer;
}
select:disabled { color: var(--muted); cursor: default; }
.nav { display: flex; flex-direction: column; gap: 4px; }
.nav a, .spec-link {
    display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; color: #314038;
}
.nav a.active { background: #eaf2ed; color: #17382c; font-weight: 550; }
.icon { width: 18px; height: 18px; flex: none; }
.nav .icon, .spec-link .icon { color: #617067; }
.sidebar-foot {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
}
.sidebar-foot form { margin: 0; }
.org-list { list-style: none; margin: 0 0 16px; padding: 0; }
.org-list li { padding: 8px 0; border-bottom: 1px solid var(--line); }

.main { min-width: 0; background: var(--bg); }
.top {
    height: 78px;
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    padding: 0 32px;
    background: #fff;
    border-bottom: 1px solid var(--line);
}
.crumbs { color: var(--muted); font-size: 13px; line-height: 1.4; }
.crumbs b { color: var(--ink); font-weight: 560; }
.who, .logout {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-width: 0;
    padding: 10px 12px;
    border-radius: 12px;
    text-align: left;
}
.who { color: #314038; }
.who .icon { color: #617067; }
.who strong { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.2; font-size: 14px; font-weight: 550; }
.logout { border: 0; background: none; color: #c0392b; font-size: 14px; line-height: 1.4; }
.logout .icon { color: currentColor; }
.logout:hover { color: #9b2c2c; }
.avatar, .person-avatar {
    width: 36px; height: 36px; border-radius: 99px; display: grid; place-items: center;
    font-size: 12px; font-weight: 650; flex: none;
}
.content { padding: 22px 32px 48px; }
.eyebrow {
    margin: 0 0 6px; color: var(--faint); font-size: 11px; letter-spacing: 0.14em; font-weight: 600;
}
h1, .serif, .stat .v, .nums b, .pair b, .course-card h2, .steps h2, .spec-card h2, .panel h2 {
    font-family: var(--sans);
    font-weight: 550;
    font-variant-numeric: tabular-nums;
}
.stat .v, .nums b, .pair b { letter-spacing: -1px; }
h1 { font-size: 20px; font-weight: 600; letter-spacing: -0.045em; line-height: 1.25; margin: 0 0 6px; }
.lede { margin: 0; color: var(--muted); max-width: 720px; font-size: 14px; }
.page-head, .split-head { display: flex; justify-content: space-between; gap: 24px; align-items: flex-end; }
.course-head, .course-head > div { display: contents; }
.course-title-row {
    display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; flex-wrap: wrap;
    position: sticky; top: 0; z-index: 15; background: var(--bg);
    margin-left: -32px; margin-right: -32px; padding: 8px 32px 12px;
}
.course-title-main { display: flex; align-items: center; gap: 12px; flex: 0 1 auto; min-width: 0; }
.course-title-main .badge { flex: none; }
.course-title-row h1 { margin: 0; min-width: 0; }
.course-head .lede { margin-top: 18px; margin-bottom: 36px; }
.head-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.course-title-row .head-actions { flex: 1 1 280px; min-width: 0; margin-left: auto; justify-content: flex-end; }
.head-actions form { display: inline-flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.participant-groups { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.participant-group { display: flex; align-items: flex-end; gap: 8px; }
.participant-group .field { flex: 1; min-width: 0; margin: 0; }
.participant-group .btn-primary { flex: none; white-space: nowrap; }
.participant-note { margin: 10px 0 0; }
#participants-modal .modal-card { width: min(680px, 100%); }
.participant-list { display: flex; flex-direction: column; gap: 10px; max-height: 280px; overflow: auto; margin: 8px 0 14px; }
.page-head { margin-bottom: 18px; }

.stats, .cards, .spec-grid { display: grid; gap: 14px; }
.stats { grid-template-columns: repeat(4, 1fr); margin: 0 0 22px; }
.cards, .spec-grid { grid-template-columns: 1fr 1fr; }
.card, .stat, .panel, .lesson-card, .diff-card {
    background: #fff; border: 1px solid var(--line); border-radius: 18px;
}
.stat {
    display: grid;
    grid-template-columns: 1fr auto;
    align-content: start;
    padding: 17px 20px;
    min-height: 118px;
}
.stat .k { grid-column: 1; grid-row: 1; color: var(--muted); font-size: 13px; line-height: 1.27; }
.stat .ico { grid-column: 2; grid-row: 1; justify-self: end; align-self: center; color: #8b948d; }
.stat .v { grid-column: 1 / -1; font-size: 30px; line-height: 1; margin: 10px 0 0; color: var(--ink); }
.stat .s { grid-column: 1 / -1; color: var(--muted); font-size: 13px; line-height: 1.15; margin-top: 6px; }
.stat .ico .icon { width: 16px; height: 16px; }
#course-stats .stat { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: stretch; padding: 0; min-height: 0; overflow: hidden; }
#course-stats .stat-copy { min-width: 0; padding: 12px 14px; }
#course-stats .stat .k, #course-stats .stat .s, #course-stats .stat .v { grid-column: auto; grid-row: auto; }
#course-stats .stat .k { color: var(--ink); font-size: 16px; font-weight: 550; line-height: 1.2; }
#course-stats .stat .s { margin-top: 3px; font-size: 10px; line-height: 1.25; letter-spacing: 0.04em; text-transform: uppercase; }
#course-stats .stat .v {
    margin: 0;
    aspect-ratio: 1;
    height: 100%;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    border-left: 1px solid var(--line);
    font-size: 24px;
}
.book {
    width: 40px; height: 40px; border-radius: 12px; background: #f3f7f3; border: 1px solid #e6eee8;
    display: grid; place-items: center; color: #5d7468;
}
.book .icon { width: 20px; height: 20px; }

.toolbar { display: flex; gap: 12px; align-items: center; margin-bottom: 16px; }
.toolbar.with-action .search { flex: 1; min-width: 0; }
.toolbar.with-action .btn-primary { flex: none; height: 44px; white-space: nowrap; }
.search { max-width: none; height: 44px; }
.segment { display: flex; background: #e9eee8; border-radius: 12px; padding: 4px; gap: 2px; }
.segment a { padding: 8px 12px; border-radius: 9px; color: #415047; font-size: 14px; white-space: nowrap; }
.segment a.on { background: white; box-shadow: var(--shadow); color: var(--ink); }

.course-card, .spec-card { padding: 20px 22px; }
.course-card { display: flex; flex-direction: column; gap: 16px; }
.course-card > .btn, .course-card > .btn-ghost, .course-card > .btn-primary { align-self: flex-start; }
.card-top, .metric-row, .link-row, .actions { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.badge { border-radius: 999px; padding: 4px 10px; font-size: 12.5px; background: var(--mint); color: #246b45; }
.badge.draft, .pill.warn { background: #f7f1e4; color: #8a6232; }
.course-card h2, .spec-card h2 { margin: 0 0 4px; font-size: 22px; line-height: 1.25; letter-spacing: -0.3px; }
.panel h2 { margin: 0 0 4px; font-size: 18px; line-height: 1.3; letter-spacing: -0.3px; }
.course-card p, .spec-card p, .quiet { color: #7b867c; margin: 0; font-size: 13px; }
.nums { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding-top: 8px; border-top: 1px solid var(--line); }
.nums b, .pair b { display: block; font-size: 30px; line-height: 1.2; }
.nums span, .mini span, .hint { color: var(--muted); font-size: 13px; }
.btn, .btn-primary, .btn-ghost, .btn-danger {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    border-radius: 12px; padding: 11px 16px; border: 1px solid transparent; background: white; line-height: 1;
    font-size: 14.5px;
}
.btn-ghost .icon, .btn-primary .icon { width: 16px; height: 16px; }
.btn-primary { background: var(--green); color: white; }
.btn-ghost { border-color: var(--line-strong); }
.btn-danger { color: var(--danger); border-color: #eadfdf; background: #fff; }
.btn.small, .btn-ghost.small, .btn-primary.small, .btn-danger.small { padding: 7px 10px; border-radius: 10px; font-size: 13.5px; }

.panel { padding: 8px 8px 18px; }
.panel-head, .table-foot { padding: 18px 16px 8px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 980px; }
tr.is-inactive:not(.is-pending) { opacity: 0.42; }
tr.is-inactive:not(.is-pending) td,
tr.is-inactive:not(.is-pending) td strong,
tr.is-inactive:not(.is-pending) td a,
tr.is-inactive:not(.is-pending) td button,
tr.is-inactive:not(.is-pending) td select { color: #9aa19c; }
tr.is-pending td,
tr.is-pending td strong { color: #9aa19c; }
tr.is-pending .btn-ghost { color: var(--ink); }
#course-list table, .course-table table, #company-list table { min-width: 0; }
#course-list tbody tr, .course-table tbody tr, #company-list tbody tr[data-href], #user-rows tr[data-href], #account-rows tr[data-href], #employee-rows tr[data-href] { cursor: pointer; }
#course-list tbody tr:hover td, .course-table tbody tr:hover td, #company-list tbody tr[data-href]:hover td, #user-rows tr[data-href]:hover td, #account-rows tr[data-href]:hover td, #employee-rows tr[data-href]:hover td { background: #f6f8f6; }
.participant-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.participant-row .participant-name { flex: 1; min-width: 0; }
.participant-row .participant-name small { display: block; color: var(--muted); }
.notify-count { color: var(--muted); font-size: 13px; white-space: nowrap; }
.participant-row .btn-ghost, .participant-row .btn-danger { flex: none; }
#remove-participant { z-index: 45; }
.publish-choices { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; }
.publish-choices .btn-primary, .publish-choices .btn-ghost { width: 100%; justify-content: center; }
#add-participant-modal { z-index: 35; }
#add-participant-modal .modal-card { width: min(680px, 100%); }
#add-people-list { display: flex; flex-direction: column; max-height: 280px; overflow: auto; margin: 0 0 4px; }
.picker-person { padding: 8px 2px; border-bottom: 1px solid var(--line); cursor: pointer; }
#add-people-list .quiet { margin: 0 0 8px; }
#notify-confirm { z-index: 40; }
.row-actions { display: inline-flex; align-items: center; gap: 14px; }
.row-go { display: inline-flex; align-items: center; gap: 2px; color: var(--green); font-weight: 550; white-space: nowrap; }
.row-go .icon { width: 16px; height: 16px; }
a.company-link { color: var(--green); font-weight: 550; }
a.company-link:hover { text-decoration: underline; }
.tabs { width: 100%; margin: 18px 0; }
.tabs a { flex: 1; text-align: center; }
.company-info, .company-people { margin-bottom: 28px; }
.company-info h2, .company-people > h2, .structure-grid h2 {
    margin: 0 0 8px;
    font-size: 16px;
    font-weight: 550;
    letter-spacing: -0.2px;
}
.company-info .facts { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 16px; }
.company-info .fact { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: stretch; padding: 0; min-height: 0; }
.company-info .fact span { display: flex; align-items: center; min-width: 0; margin: 0; padding: 12px 14px; color: var(--ink); font-size: 16px; font-weight: 550; line-height: 1.2; }
.company-info .fact strong { display: flex; align-items: center; justify-content: center; margin: 0; padding: 8px 16px; border-left: 1px solid var(--line); font-size: 24px; font-weight: 550; letter-spacing: -0.04em; line-height: 1; text-align: center; white-space: nowrap; min-width: 4.5rem; }
#employee-rows select.assign { width: 100%; min-width: 0; height: 36px; padding: 4px 32px 4px 10px; }
.band-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; flex: none; }
.band-head h2 { margin: 0; flex: none; }
.band-head .search { flex: 1; min-width: 0; height: 40px; }
.band-head .btn-primary { flex: none; height: 40px; padding: 0 12px; white-space: nowrap; }
.band-scroll { min-height: 0; overflow: auto; flex: 1; }
.company-people .lede { margin-bottom: 14px; }
.company-people .toolbar.with-action { flex-wrap: wrap; }
.company-people .toolbar select {
    width: auto;
    flex: none;
    min-width: 180px;
    height: 44px;
}
.structure-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 22px;
    align-items: start;
}
.section-title { margin: 22px 0 12px; font-size: 16px; font-weight: 550; letter-spacing: -0.2px; }
.structure-grid > section > h2 {
    margin: 0 0 10px;
    font-size: 16px;
    font-weight: 550;
    letter-spacing: -0.2px;
}
.structure-grid table { min-width: 0; }
.org-panel { padding: 8px 16px 14px; }
.org-tree, .org-tree ul { list-style: none; margin: 0; padding: 0; }
.org-tree ul { margin-left: 14px; padding-left: 12px; border-left: 1px solid var(--line); }
.tree-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 28px 28px 28px;
    align-items: center;
    column-gap: 8px;
    min-height: 36px;
}
.tree-name { font-weight: 550; }
.tree-actions { display: contents; }
.tree-plus, .tree-minus {
    width: 28px; height: 28px; padding: 0; border: 1px solid var(--line); border-radius: 8px;
    background: #fff; color: var(--green-2); font-size: 18px; line-height: 1;
}
.tree-edit { grid-column: 2; }
.tree-minus { grid-column: 3; color: var(--danger); }
.tree-plus { grid-column: 4; }
.tree-add { margin: 0 0 8px; }
.tree-add-line { display: flex; gap: 8px; align-items: center; }
.tree-add input[name="name"] {
    flex: 1; min-width: 0; height: 36px; border: 1px solid var(--line-strong); border-radius: 10px; padding: 0 10px; background: #fff;
}
.tree-add .errors { margin: 6px 0 0; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 16px; }
.fact { padding: 16px 18px; }
.fact span { display: block; color: var(--muted); font-size: 13px; }
.fact strong { display: block; margin-top: 6px; font-size: 20px; font-weight: 550; letter-spacing: -0.5px; }
.contact-cell { display: flex; align-items: center; gap: 8px; }
.phone-row { display: flex; align-items: stretch; gap: 8px; }
.phone-prefix { position: relative; flex: none; }
.phone-prefix-toggle {
    display: flex; align-items: center; gap: 6px; height: 44px; padding: 0 12px;
    border: 1px solid var(--line-strong); border-radius: 12px; background: #fff; cursor: pointer;
}
.phone-flag { font-size: 18px; line-height: 1; }
.phone-dial { font-variant-numeric: tabular-nums; }
.phone-row .phone-national { width: auto; flex: 1; min-width: 0; }
.phone-menu {
    position: fixed; z-index: 80; width: min(320px, calc(100vw - 32px));
    display: flex; flex-direction: column; gap: 8px; padding: 8px;
    background: #fff; border: 1px solid var(--line); border-radius: 12px;
    box-shadow: 0 16px 32px rgba(28, 33, 30, 0.12);
}
.phone-menu[hidden] { display: none; }
.phone-search { width: 100%; background: #fff; border: 1px solid var(--line-strong); border-radius: 12px; padding: 10px 12px; }
.phone-options { list-style: none; margin: 0; padding: 0; max-height: 220px; overflow: auto; }
.phone-options button {
    width: 100%; display: flex; align-items: center; gap: 8px;
    border: 0; background: #fff; text-align: left; padding: 8px 10px; border-radius: 8px; cursor: pointer;
}
.phone-options button[aria-selected="true"], .phone-options button:hover { background: #f6f8f6; }
.phone-options .phone-option-dial { margin-left: auto; color: var(--muted); font-variant-numeric: tabular-nums; }
.pencil {
    width: 28px; height: 28px; padding: 0; border: 1px solid var(--line-strong); border-radius: 8px;
    background: #fff; color: #617067; display: grid; place-items: center; flex: none;
}
.pencil .icon { width: 15px; height: 15px; }
.status-cell, .row-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.status-select { width: auto; min-width: 150px; height: 36px; padding: 4px 32px 4px 10px; }
.status-expired { color: #8a6232; }
button.badge { border: 0; cursor: pointer; font-weight: 550; }
.sms-code { font-variant-numeric: tabular-nums; letter-spacing: 0.12em; font-weight: 600; }
#edit-password[hidden], #question-add-another[hidden] { display: none !important; }
#company-field[hidden] { display: none; }
.toasts {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 60;
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: min(360px, calc(100vw - 32px));
    pointer-events: none;
}
.toast {
    background: #e7f3ea;
    color: #1e4d36;
    border-radius: 14px;
    padding: 12px 14px;
    box-shadow: 0 8px 24px rgba(28, 33, 30, 0.12);
}
button.badge:disabled { opacity: 0.55; cursor: default; }
.modal { position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; padding: 24px; background: rgba(36, 44, 43, 0.38); }
.modal[hidden] { display: none; }
.modal-card { width: min(520px, 100%); max-height: calc(100vh - 48px); overflow: auto; background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 22px 22px 18px; }
.modal-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.modal-head h2 { flex: 1; line-height: 1.5; }
.modal-card h2 { margin: 0; font-size: 14px; font-weight: 400; letter-spacing: 0; line-height: 1.5; }
.modal-card .lede { margin: 12px 0 0; font-size: 14px; font-weight: 400; line-height: 1.5; }
.modal-card .modal-list { margin: 12px 0 0; padding-left: 18px; font-size: 14px; font-weight: 400; line-height: 1.5; }
.modal-close { border: 0; background: transparent; color: var(--muted); padding: 4px; }
.modal-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 20px; flex-wrap: wrap; }
.modal-actions-end { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin-left: auto; flex-wrap: wrap; }
.choice-row { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-bottom: 14px; }
.company-assign {
    max-width: 100%; border: 0; background: #eaf2ed; color: #17382c; border-radius: 999px;
    padding: 6px 10px; font: inherit; font-size: 13.5px; cursor: pointer; text-align: left;
}
.company-assign:hover { background: #dceadf; }
.company-suggest { list-style: none; margin: 0 0 14px; padding: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.company-name { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.company-alert { display: inline-flex; color: #a15c12; }
.company-alert .icon { width: 18px; height: 18px; }
.company-suggest button { width: 100%; border: 0; background: #fff; text-align: left; padding: 10px 12px; }
.owner-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 12px; max-height: 280px; overflow: auto; }
.owner-list button { width: 100%; border: 0; border-top: 1px solid var(--line); background: #fff; text-align: left; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; cursor: pointer; }
.owner-list li:first-child button { border-top: 0; }
.owner-list button:hover { background: #f6f8f6; }
.owner-list small, .owner-empty { color: var(--muted); }
.owner-empty { margin: 8px 0 0; }
.company-suggest button[aria-selected="true"], .company-suggest button:hover { background: #f6f8f6; }
th { text-align: left; font-size: 12.5px; color: var(--muted); font-weight: 500; padding: 8px 12px; }
td { padding: 14px 12px; border-top: 1px solid #eef1ec; vertical-align: middle; }
.person { display: flex; gap: 10px; align-items: center; }
.person small, .muted { color: var(--muted); }
.person small { display: block; }
.bar { height: 6px; background: #e5eee8; border-radius: 99px; overflow: hidden; width: 92px; display: inline-block; vertical-align: middle; }
.bar span { display: block; height: 100%; background: #2f7d56; }
.bar-label { color: var(--muted); font-size: 12.5px; margin-left: 6px; }
.pill { display: inline-flex; align-items: center; border-radius: 999px; background: var(--sand); color: var(--sand-ink); padding: 3px 8px; font-size: 13px; }
.stack { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.links { display: flex; flex-direction: column; justify-content: center; gap: 6px; align-items: flex-end; white-space: nowrap; }
.links a { color: #2a4036; font-size: 13.5px; }
.resource-links { white-space: nowrap; }
.resource-links a { color: var(--green); font-weight: 550; }
.resource-links a + a { margin-left: 16px; }
.resource-links a:hover { text-decoration: underline; }
.note, .banner, .flash {
    border-radius: 14px; padding: 12px 14px; margin: 12px 16px 0;
}
.note { background: #f3f8f3; color: #3d5348; font-size: 13.5px; }
.banner { background: var(--mint); color: #24543a; }
.banner.bad, .flash.bad { background: #fbf1f1; color: #7c3535; }
.flash { background: #e7f3ea; color: #1e4d36; margin: 0 0 16px; }
.table-foot { display: flex; justify-content: space-between; gap: 12px; color: var(--faint); font-size: 12.5px; }

.diff-list { display: flex; flex-direction: column; gap: 12px; margin-top: 12px; }
.diff-card { padding: 16px 18px; }
.diff-person { display: grid; grid-template-columns: 180px 90px 1fr; gap: 12px; align-items: start; padding-top: 12px; }
.diff-person p { margin: 0; color: #3c4842; }

.editor { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 18px; align-items: start; margin-top: 18px; }
.editor-side {
    display: flex;
    flex-direction: column;
    gap: 18px;
    min-width: 0;
    position: sticky;
    top: var(--course-bar, 72px);
    max-height: calc(100dvh - var(--course-bar, 72px) - 16px);
    overflow: auto;
}
.lesson-nav, .lesson-card, .course-about { padding: 0 16px 16px; }
.main:has(.company-setup) { display: flex; flex-direction: column; min-height: 100%; }
.main:has(.company-setup) .content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}
.company-setup { width: min(560px, 100%); }
.company-setup .lede { max-width: none; }
.company-setup form { margin-top: 18px; padding-top: 20px; }
.lesson-nav, .course-about { overflow: hidden; }
.section-head {
    background: #fff;
    margin: 0 -16px 14px;
    padding: 8px 16px;
    border-bottom: 1px solid #eef1ec;
}
.lesson-card .section-head {
    position: sticky;
    top: calc(var(--course-bar, 72px) + 1px);
    z-index: 12;
    border-radius: 17px 17px 0 0;
    box-shadow: 0 14px 0 #fff;
}
.lesson-nav h2, #lesson-heading, .course-about h2 { font-family: var(--sans); font-size: 16px; font-weight: 450; margin: 0 0 2px; }
.section-head .quiet { font-size: 10px; font-weight: 400; }
#course-question-count { text-transform: uppercase; }
#lesson-question-fields[hidden] { display: none !important; }
#lesson-question-fields { display: flex; flex-direction: column; gap: 6px; }
.lesson-nav .section-head { display: flex; align-items: center; gap: 12px; }
.section-head-main { min-width: 0; flex: 1; }
.lesson-nav .section-head h2 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.add-question-bar {
    position: sticky;
    bottom: 0;
    z-index: 13;
    display: flex;
    justify-content: flex-end;
    margin: 18px -32px 0;
    padding: 12px 32px;
    background: var(--bg);
    border-top: 1px solid var(--line);
}
.content:has(.add-question-bar) { padding-bottom: 0; }
.add-lesson { display: flex; flex: none; margin: 0; }
.add-lesson .btn-primary { white-space: nowrap; }
.lesson-card .card-top { align-items: center; }
.lesson-link, .lesson-actions form { display: flex; }
.lesson-item { display: flex; align-items: center; gap: 4px; }
.lesson-item form { display: flex; }
.lesson-link {
    width: 100%; align-items: center; text-align: left; gap: 8px; padding: 10px; border-radius: 12px; border: 0; background: transparent; margin-top: 4px;
}
.lesson-item .lesson-link { flex: 1; min-width: 0; width: auto; }
.lesson-shift { width: 28px; height: 28px; padding: 0; border-radius: 8px; }
.lesson-shift:disabled { opacity: 0.35; }
.lesson-link.on { background: #e7f3ea; }
.lesson-link em, #lesson-heading em { color: var(--faint); font-style: normal; font-variant-numeric: tabular-nums; min-width: 22px; }
#lesson-heading em { display: inline-block; margin-right: 8px; }
.lesson-link-title { min-width: 0; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lesson-link-meta { margin-left: auto; flex: none; font-size: 10px; font-weight: 400; text-transform: uppercase; white-space: nowrap; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
#company-pick[hidden], #company-create[hidden], .field[hidden] { display: none !important; }
.field span, .q-label { font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--faint); font-weight: 650; }
.readout { margin: 0; white-space: pre-wrap; line-height: 1.55; }
textarea { min-height: 92px; resize: vertical; background: #f8f9f6; }
.question { border-top: 1px solid var(--line); padding-top: 14px; margin-top: 8px; }
.question-points { margin: 0; text-align: right; }
.q-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 8px; }
.q-tools { display: flex; align-items: center; gap: 10px; flex: none; }
.inline { display: flex; gap: 8px; flex-wrap: wrap; }
.back { color: var(--muted); font-size: 14px; display: inline-flex; margin-bottom: 10px; }
.employee-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 8px; }
.employee-head h1 { margin: 0; min-width: 0; }
.employee-head .btn-ghost { flex: none; }
.progress-wide { height: 6px; background: #e4eee7; border-radius: 99px; overflow: hidden; }
.progress-wide span { display: block; height: 100%; background: var(--green-2); }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 18px; }
.pair span { color: var(--muted); font-size: 13px; }
.realize-head { display: flex; justify-content: space-between; color: var(--muted); font-size: 13px; margin: 14px 0 10px; }
.mini-metrics { display: flex; gap: 18px; flex-wrap: wrap; color: #5c675f; font-size: 13px; padding-top: 4px; border-top: 1px solid var(--line); }
.mini-metrics strong { font-weight: 600; color: var(--ink); }
.toolbar-note { white-space: nowrap; }
.footnote { color: var(--muted); font-size: 13px; text-align: center; margin: 18px 12px 0; line-height: 1.45; }
.result-card .top-metrics { display: flex; justify-content: space-between; gap: 12px; }
.span-2 { grid-column: 1 / -1; }
.empty { padding: 28px; text-align: center; color: var(--muted); }
.steps {
    list-style: none;
    margin: 22px 0 0;
    padding: 0;
    max-width: 640px;
}
.steps li { padding: 14px 0 16px; border-top: 1px solid var(--line); }
.steps li:last-child { border-bottom: 1px solid var(--line); }
.steps h2 {
    margin: 0 0 4px;
    font-size: 16px;
    line-height: 1.35;
    letter-spacing: -0.2px;
    display: flex;
    gap: 12px;
    align-items: baseline;
}
.steps h2 span {
    color: var(--green-2);
    font-variant-numeric: tabular-nums;
    min-width: 22px;
}
.steps p { margin: 0 0 0 34px; color: var(--muted); font-size: 14px; line-height: 1.5; max-width: none; }
.endpoint { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-top: 1px solid var(--line); }
.code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; color: #1d3b31; }
.history { background: #f8faf7; border-radius: 12px; padding: 12px; margin-top: 8px; }
.errors { color: var(--danger); font-size: 13px; margin: 4px 0 0; }

.mobile-bar { display: none; }
.menu-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    border: 1px solid var(--line-strong);
    background: #fff;
    border-radius: 12px;
    padding: 8px 12px;
}
@media (max-width: 1100px) {
    .stats { grid-template-columns: 1fr 1fr; }
    .editor, .shell { grid-template-columns: 1fr; }
    .diff-person, .structure-grid { grid-template-columns: 1fr; }
    .company-info .facts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .mobile-bar {
        display: flex;
        align-items: center;
        gap: 12px;
        position: sticky;
        top: 0;
        z-index: 40;
        height: 60px;
        padding: 0 14px;
        background: #fff;
        border-bottom: 1px solid var(--line);
    }
    .course-title-row { top: 60px; }
    .main:has(.company-setup) { min-height: 100dvh; }
    .sidebar {
        display: none;
        position: fixed;
        z-index: 35;
        top: 60px;
        left: 0;
        right: 0;
        max-height: calc(100dvh - 60px);
        overflow: auto;
        border-right: 0;
        border-bottom: 1px solid var(--line);
        box-shadow: 0 16px 32px rgba(28, 33, 30, 0.08);
    }
    body.menu-open .sidebar { display: flex; }
    .table-wrap { overflow-x: visible; }
    table { min-width: 0; display: block; }
    thead { display: none; }
    tbody { display: block; }
    .table-wrap tr {
        display: block;
        margin: 0 8px 12px;
        border: 1px solid var(--line);
        border-radius: 14px;
        overflow: hidden;
        background: #fff;
    }
    .table-wrap tr:last-child { margin-bottom: 4px; }
    .table-wrap td {
        display: grid;
        grid-template-columns: 7.2rem minmax(0, 1fr);
        gap: 8px 10px;
        align-items: center;
        min-width: 0;
        padding: 10px 12px;
        border-top: 1px solid #eef1ec;
    }
    .table-wrap tr td:first-child { border-top: 0; }
    .table-wrap td::before {
        content: attr(data-label);
        color: var(--faint);
        font-size: 11px;
        font-weight: 650;
        letter-spacing: 0.04em;
        text-transform: uppercase;
    }
    .table-wrap td.cell-main {
        display: block;
        padding-top: 14px;
        padding-bottom: 14px;
        background: #f7faf8;
    }
    .table-wrap td.cell-main::before { content: none; }
    .table-wrap td.cell-actions { grid-template-columns: 1fr; }
    .table-wrap td.cell-actions::before { content: none; }
    .table-wrap td.cell-actions:not(:has(a, button)) { display: none; }
    .table-wrap td.cell-actions .links,
    .table-wrap td.cell-actions .row-actions {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        justify-content: flex-start;
        white-space: normal;
    }
    .table-wrap td[colspan] { display: block; }
    .table-wrap td[colspan]::before { content: none; }
    .table-wrap tr:has(td[colspan]) {
        margin: 0;
        border: 0;
        background: transparent;
    }
    .table-wrap .status-select,
    .table-wrap select.assign,
    .table-wrap .status-cell,
    .table-wrap .company-assign { width: 100%; min-width: 0; max-width: 100%; }
    .table-wrap .status-cell { display: flex; flex-wrap: wrap; }
    .contact-cell, .contact-cell > div, .cell-main, .cell-main .hint { min-width: 0; overflow-wrap: break-word; }
    .bar { width: 100%; max-width: 140px; }
}
@media (max-width: 760px) {
    .band-scroll { overflow: visible; }
    .cards, .spec-grid, .stats, .page-head, .split-head, .toolbar, .structure-grid, .company-info .facts { grid-template-columns: 1fr; display: grid; }
    .toolbar, .page-head, .split-head, .toolbar.with-action, .band-head { display: flex; flex-direction: column; align-items: stretch; }
    .course-title-row { flex-direction: column; align-items: stretch; margin-left: -14px; margin-right: -14px; padding-left: 14px; padding-right: 14px; }
    .course-title-row .head-actions { flex-wrap: wrap; justify-content: flex-start; }
    .company-people .toolbar select, .toolbar .search, .band-head .search, .toolbar.with-action .btn-primary { width: 100%; min-width: 0; }
    .segment { flex-wrap: wrap; }
    .table-wrap td { grid-template-columns: 1fr; gap: 4px; }
    .content { padding-left: 14px; padding-right: 14px; }
    .add-question-bar { margin-left: -14px; margin-right: -14px; padding-left: 14px; padding-right: 14px; }
}

.login-screen {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 16px;
}
.login-card {
    width: min(400px, 100%);
    margin: 0 auto;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 32px 28px 26px;
}
.login-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 22px;
}
.login-brand strong { font-size: 20px; font-weight: 600; letter-spacing: -0.045em; }
.login-card h1 {
    margin: 0 0 6px;
    font-size: 22px;
    line-height: 1.25;
    letter-spacing: -0.3px;
    text-align: center;
}
.login-card .lede {
    margin: 0 0 22px;
    max-width: none;
    font-size: 13px;
    text-align: center;
}
.login-card .field { margin-bottom: 12px; }
.login-card .field span {
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0;
    text-transform: none;
    color: var(--muted);
}
.login-card .errors { margin: 0 0 12px; }
.login-card .remember {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 2px 0 16px;
    color: var(--muted);
    font-size: 13px;
}
.login-card .remember input { width: 16px; height: 16px; margin: 0; }
.login-card .btn-primary { width: 100%; }
