:root {
    color-scheme: light;
    --ink: #10202c;
    --muted: #60717a;
    --surface: #ffffff;
    --surface-raised: #fbfcf8;
    --surface-soft: #f3f6f3;
    --line: #d8e1dc;
    --navy: #15375a;
    --navy-dark: #0c1f33;
    --navy-soft: #e9f0f4;
    --accent: #1d6a5d;
    --accent-strong: #145247;
    --gold: #b0883b;
    --gold-soft: #f2e7cf;
    --danger: #9d2f2f;
    --shadow-soft: 0 16px 38px rgba(12, 31, 51, .12);
    --shadow-card: 0 8px 22px rgba(12, 31, 51, .08);
    font-family: "Public Sans", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background: var(--navy-dark);
}

body {
    margin: 0;
    min-width: 320px;
    min-height: 100vh;
    min-height: 100dvh;
    background: var(--navy-dark);
    color: var(--ink);
    font-size: 16px;
    line-height: 1.45;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input {
    font: inherit;
}

.auth-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
    background: linear-gradient(180deg, var(--navy-dark), var(--navy) 48%, var(--surface-soft) 48%);
}

.auth-card {
    width: min(100%, 380px);
    padding: 28px;
    background: var(--surface);
    border: 1px solid rgba(176, 136, 59, .32);
    border-radius: 8px;
    box-shadow: var(--shadow-soft);
}

.brand-mark,
.admin-brand span {
    width: 42px;
    height: 42px;
    display: inline-grid;
    place-items: center;
    border-radius: 8px;
    background: var(--navy);
    color: #fff;
    font-weight: 900;
    box-shadow: inset 0 0 0 1px rgba(176, 136, 59, .55);
}

.eyebrow {
    margin: 0 0 6px;
    color: var(--muted);
    font-size: .75rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.auth-card h1,
.mobile-topbar h1,
.welcome-panel h2,
.module-list h2,
.screen-heading h2,
.detail-panel h2 {
    font-family: "Spectral", Georgia, "Times New Roman", serif;
    letter-spacing: 0;
}

.auth-card h1,
.mobile-topbar h1 {
    margin: 0;
}

.auth-card h1 {
    color: var(--navy-dark);
    font-size: 2rem;
}

.auth-form {
    display: grid;
    gap: 10px;
    margin-top: 22px;
}

.auth-form label {
    color: var(--muted);
    font-size: .9rem;
    font-weight: 800;
}

.auth-form input {
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--ink);
}

.auth-form input:focus {
    border-color: var(--gold);
    outline: 2px solid rgba(176, 136, 59, .18);
}

.auth-form button {
    min-height: 46px;
    margin-top: 8px;
    border: 0;
    border-radius: 8px;
    background: var(--navy);
    color: #fff;
    font-weight: 900;
    cursor: pointer;
}

.auth-form button:hover {
    background: var(--navy-dark);
}

.form-error {
    margin: 18px 0 0;
    padding: 10px 12px;
    border-radius: 8px;
    background: #fff1f1;
    color: var(--danger);
    font-weight: 800;
}

.demo-hint {
    margin: 18px 0 0;
    color: var(--muted);
    font-size: .85rem;
}

.auth-link-button {
    min-height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 16px;
    border-radius: 8px;
    background: var(--accent);
    color: #fff;
    font-weight: 900;
}

.auth-secondary-link {
    margin: 18px 0 0;
    color: var(--muted);
    font-size: .9rem;
    text-align: center;
}

.auth-secondary-link a {
    color: var(--navy);
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.mobile-shell {
    min-height: 100vh;
}

.mobile-frame {
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    margin: 0 auto;
    display: grid;
    grid-template-rows: auto 1fr auto;
    background: var(--surface-soft);
}

.mobile-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: calc(14px + env(safe-area-inset-top)) 12px 18px;
    background: linear-gradient(180deg, var(--navy) 0%, var(--navy-dark) 100%);
    color: #fff;
    border-bottom: 1px solid rgba(176, 136, 59, .42);
}

.mobile-topbar .eyebrow {
    color: var(--gold-soft);
}

.mobile-topbar h1 {
    color: #fff;
    font-size: 1.65rem;
    line-height: 1.05;
    overflow-wrap: anywhere;
}

.mobile-title-lockup {
    min-width: 0;
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    gap: 10px;
}

.mobile-title-lockup > div:last-child {
    min-width: 0;
}

.mobile-brand-mark {
    width: 48px;
    height: 48px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border: 1px solid rgba(176, 136, 59, .62);
    border-radius: 8px;
    background: rgba(255, 255, 255, .06);
    color: #fff;
    line-height: 1;
}

.mobile-brand-mark span {
    font-size: .92rem;
    font-weight: 900;
}

.mobile-brand-mark strong {
    color: var(--gold-soft);
    font-family: "Spectral", Georgia, "Times New Roman", serif;
    font-size: 1.1rem;
}

.mobile-topbar-actions {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 8px;
}

.icon-button {
    width: 42px;
    height: 42px;
    flex: 0 0 auto;
    display: inline-grid;
    place-items: center;
    border: 1px solid rgba(176, 136, 59, .48);
    border-radius: 8px;
    background: rgba(255, 255, 255, .08);
    color: #fff;
    font-size: .78rem;
    font-weight: 900;
    text-decoration: none;
    cursor: pointer;
}

.icon-button:hover {
    background: rgba(176, 136, 59, .18);
}

.record-button {
    position: relative;
}

.record-dot {
    width: 13px;
    height: 13px;
    display: block;
    border-radius: 50%;
    background: #d54040;
    box-shadow: 0 0 0 4px rgba(213, 64, 64, .14);
}

.record-button.is-recording {
    border-color: rgba(213, 64, 64, .86);
    background: rgba(213, 64, 64, .16);
}

.record-button.is-recording .record-dot {
    animation: record-pulse 1s ease-in-out infinite;
}

.record-button.is-processing {
    cursor: wait;
    opacity: .86;
}

.record-button.is-processing .record-dot {
    width: 17px;
    height: 17px;
    border: 2px solid rgba(255, 255, 255, .34);
    border-top-color: #ffffff;
    background: transparent;
    box-shadow: none;
    animation: record-spin .75s linear infinite;
}

@keyframes record-pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 4px rgba(213, 64, 64, .14);
    }

    50% {
        transform: scale(.78);
        box-shadow: 0 0 0 8px rgba(213, 64, 64, .24);
    }
}

@keyframes record-spin {
    to {
        transform: rotate(360deg);
    }
}

.mobile-content {
    display: grid;
    align-content: start;
    gap: 14px;
    padding: 14px 14px calc(96px + env(safe-area-inset-bottom));
}

.mobile-shell[data-mobile-route="assistant"] .mobile-frame {
    background: #f4f1ea;
}

.mobile-shell[data-mobile-route="assistant"] .mobile-topbar {
    display: none;
}

.mobile-shell[data-mobile-route="assistant"] .mobile-content {
    min-height: 100vh;
    min-height: 100dvh;
    padding: calc(20px + env(safe-area-inset-top)) 14px calc(88px + env(safe-area-inset-bottom));
    background: #f4f1ea;
}

.mobile-shell[data-mobile-route="agenda"][data-mobile-child="capture"][data-mobile-variant="loge"] .mobile-topbar,
.mobile-shell[data-mobile-route="agenda"][data-mobile-child="capture"][data-mobile-variant="degre"] .mobile-topbar,
.mobile-shell[data-mobile-route="agenda"][data-mobile-child="capture"][data-mobile-variant="loge"] .mobile-tabbar,
.mobile-shell[data-mobile-route="agenda"][data-mobile-child="capture"][data-mobile-variant="degre"] .mobile-tabbar {
    display: none;
}

.mobile-shell[data-mobile-route="agenda"][data-mobile-child="capture"][data-mobile-variant="loge"],
.mobile-shell[data-mobile-route="agenda"][data-mobile-child="capture"][data-mobile-variant="degre"] {
    padding: 0;
    background: #fff;
}

.mobile-shell[data-mobile-route="agenda"][data-mobile-child="capture"][data-mobile-variant="loge"] .mobile-frame,
.mobile-shell[data-mobile-route="agenda"][data-mobile-child="capture"][data-mobile-variant="degre"] .mobile-frame {
    min-height: 100vh;
    min-height: 100dvh;
    border-radius: 0;
    background: #fff;
    box-shadow: none;
    overflow: visible;
}

.mobile-shell[data-mobile-route="agenda"][data-mobile-child="capture"][data-mobile-variant="loge"] .mobile-content,
.mobile-shell[data-mobile-route="agenda"][data-mobile-child="capture"][data-mobile-variant="degre"] .mobile-content {
    min-height: 100vh;
    min-height: 100dvh;
    padding: 0;
    background: #fff;
}

.mobile-shell[data-mobile-route="agenda"][data-mobile-child="capture"][data-mobile-variant="loge"] .mobile-view,
.mobile-shell[data-mobile-route="agenda"][data-mobile-child="capture"][data-mobile-variant="degre"] .mobile-view {
    gap: 0;
}

.welcome-panel,
.summary-tile,
.module-list,
.record-link,
.college-card,
.empty-state,
.detail-panel,
.assistant-panel {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow-card);
}

.welcome-panel {
    padding: 18px;
    border-top: 4px solid var(--gold);
}

.welcome-panel h2,
.module-list h2 {
    margin: 0 0 8px;
    color: var(--navy-dark);
    font-size: 1.4rem;
    line-height: 1.15;
}

.welcome-office {
    margin: -2px 0 10px;
    color: var(--gold);
    font-size: .9rem;
    font-weight: 900;
}

.welcome-panel p:last-child {
    margin-bottom: 0;
    color: var(--muted);
}

.quick-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.summary-tile {
    min-height: 88px;
    padding: 14px;
    display: grid;
    align-content: space-between;
    gap: 8px;
}

.tile-label {
    color: var(--muted);
    font-size: .82rem;
    font-weight: 700;
}

.summary-tile strong {
    color: var(--navy-dark);
    font-family: "Spectral", Georgia, "Times New Roman", serif;
    font-size: 1.25rem;
    line-height: 1.1;
    overflow-wrap: anywhere;
}

.summary-tile small {
    color: var(--muted);
    font-weight: 800;
}

.module-list {
    padding: 14px;
    display: grid;
    gap: 8px;
}

.module-list a {
    min-height: 52px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-raised);
    color: var(--navy-dark);
    font-size: 1rem;
    font-weight: 800;
}

.module-list a::after {
    content: ">";
    color: var(--gold);
    font-weight: 900;
}

.module-install {
    min-height: 52px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid var(--navy);
    border-radius: 8px;
    background: var(--navy);
    color: #fff;
    font-size: 1rem;
    font-weight: 800;
}

.install-hint {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: .85rem;
    line-height: 1.4;
}

.app-version {
    margin: 4px 0 0;
    text-align: center;
    color: var(--muted);
    font-size: .78rem;
    font-weight: 600;
}

.mobile-tabbar {
    position: fixed;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 100%;
    min-height: 78px;
    padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
    display: grid;
    grid-template-columns: repeat(var(--tab-count, 5), minmax(0, 1fr));
    gap: 4px;
    background: rgba(12, 31, 51, .97);
    border-top: 1px solid rgba(176, 136, 59, .45);
    box-shadow: 0 -10px 24px rgba(12, 31, 51, .18);
    backdrop-filter: blur(10px);
}

.mobile-tabbar a {
    min-width: 0;
    display: grid;
    place-items: center;
    padding: 9px 2px;
    border: 1px solid transparent;
    border-radius: 8px;
    color: #d7e0e6;
    font-size: .78rem;
    font-weight: 900;
    line-height: 1.15;
    text-align: center;
}

.mobile-tabbar a.is-active {
    background: rgba(176, 136, 59, .18);
    border-color: rgba(176, 136, 59, .52);
    color: var(--gold-soft);
}

.mobile-app,
.mobile-view {
    display: grid;
    gap: 14px;
}

.screen-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 4px 2px 0;
}

.screen-heading h2 {
    margin: 0;
    color: var(--navy-dark);
    font-size: 1.55rem;
    line-height: 1.1;
}

.screen-heading span {
    min-width: 36px;
    min-height: 34px;
    display: inline-grid;
    place-items: center;
    padding: 0 9px;
    border: 1px solid rgba(176, 136, 59, .34);
    border-radius: 8px;
    background: var(--gold-soft);
    color: var(--navy-dark);
    font-weight: 900;
}

.record-list {
    display: grid;
    gap: 10px;
}

.record-link,
.summary-link {
    color: inherit;
}

.record-link {
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 15px 14px;
}

.record-link::after {
    content: ">";
    color: var(--gold);
    font-weight: 900;
}

.record-link span {
    min-width: 0;
    display: grid;
    gap: 4px;
}

.record-link strong {
    color: var(--navy-dark);
    font-size: 1rem;
    overflow-wrap: anywhere;
}

.record-link small {
    color: var(--muted);
    font-weight: 800;
}

.priority-badge {
    width: fit-content;
    flex: 0 0 auto;
    min-height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 5px 8px;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: #f0f3f1;
    color: var(--muted);
    font-size: .76rem;
    font-weight: 900;
}

.priority-basse {
    background: #edf5ef;
    color: #3f6f4a;
    border-color: #cfe2d3;
}

.priority-normale {
    background: var(--navy-soft);
    color: #42566a;
    border-color: #d5dde6;
}

.priority-haute {
    background: #fff6dc;
    color: #856414;
    border-color: #ead596;
}

.priority-urgente {
    background: #fff1f1;
    color: var(--danger);
    border-color: #f1c7c7;
}

.college-card {
    display: grid;
    gap: 12px;
    padding: 14px;
}

.college-card-main {
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 4px;
    color: inherit;
}

.college-card-main::after {
    content: ">";
    grid-column: 2;
    grid-row: 1 / span 3;
    align-self: center;
    color: var(--gold);
    font-weight: 900;
}

.college-card-main strong,
.college-card-main span,
.college-card-main small {
    grid-column: 1;
}

.college-card strong,
.college-card span,
.college-card small {
    overflow-wrap: anywhere;
}

.college-card strong,
.college-card span {
    color: var(--navy-dark);
    font-weight: 900;
}

.college-card small {
    color: var(--muted);
    font-weight: 800;
}

.contact-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.contact-actions a {
    flex: 1 1 auto;
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 12px;
    border: 1px solid rgba(29, 106, 93, .18);
    border-radius: 8px;
    background: #e6f0ec;
    color: var(--accent-strong);
    font-weight: 900;
}

@media (max-width: 360px) {
    .mobile-topbar h1 {
        font-size: 1.42rem;
    }

    .mobile-brand-mark {
        width: 42px;
        height: 42px;
    }

    .mobile-brand-mark span {
        font-size: .78rem;
    }

    .mobile-brand-mark strong {
        font-size: .95rem;
    }

    .icon-button {
        width: 38px;
        height: 38px;
        font-size: .7rem;
    }
}

.detail-actions {
    padding-bottom: 4px;
}

.empty-state {
    padding: 18px;
    color: var(--muted);
    font-weight: 800;
}

.detail-panel {
    padding: 18px;
    display: grid;
    gap: 12px;
}

.detail-panel h2 {
    margin: 0;
    color: var(--navy-dark);
    font-size: 1.55rem;
    line-height: 1.12;
}

.restricted-head {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.restricted-date {
    font-family: "Spectral", Georgia, "Times New Roman", serif;
    font-size: 1.1rem;
    color: var(--navy-dark);
}

.restricted-notice {
    display: grid;
    gap: 6px;
    justify-items: center;
    text-align: center;
    padding: 22px 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    color: var(--navy-dark);
    font-weight: 700;
}

.restricted-notice-icon {
    margin: 0;
    font-size: 1.8rem;
}

.detail-top-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

.detail-action-group {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
    margin-left: auto;
}

.back-link {
    width: fit-content;
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    padding: 8px 10px;
    border-radius: 8px;
    background: var(--navy-soft);
    color: var(--navy);
    font-weight: 900;
}

.copy-agenda-button {
    width: fit-content;
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    border: 0;
    border-radius: 8px;
    background: var(--accent);
    color: #fff;
    font-weight: 900;
}

.copy-agenda-icon-button {
    width: 36px;
    min-width: 36px;
    padding: 0;
}

.capture-agenda-button {
    background: #1d4ed8;
}

.copy-agenda-button:disabled {
    opacity: .74;
}

.detail-row {
    display: grid;
    gap: 4px;
    padding-top: 10px;
    border-top: 1px solid var(--line);
}

.detail-row span {
    color: var(--muted);
    font-size: .82rem;
    font-weight: 900;
    text-transform: uppercase;
}

.detail-row strong {
    color: var(--navy-dark);
    font-size: .98rem;
    overflow-wrap: anywhere;
}

/* Texte libre (resume, note) : poids normal + retours a la ligne conserves. */
.detail-multiline {
    margin: 0;
    color: var(--navy-dark);
    font-size: .98rem;
    font-weight: 400;
    line-height: 1.5;
    white-space: pre-line;
    overflow-wrap: anywhere;
}

.detail-chip-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    min-width: 0;
}

.todo-description-detail {
    display: grid;
    gap: 12px;
    color: var(--navy-dark);
    font-size: .98rem;
    line-height: 1.55;
    overflow-wrap: anywhere;
}

.todo-description-detail h3 {
    margin: 0;
    color: var(--navy-dark);
    font-size: .98rem;
    line-height: 1.2;
}

.todo-actions-block {
    display: grid;
    gap: 8px;
}

.todo-actions-block p {
    margin: 0;
    white-space: normal;
}

.todo-actions-block strong {
    font-weight: 800;
}

.todo-action-list {
    margin: 0;
    padding-left: 18px;
    display: grid;
    gap: 7px;
}

.todo-action-list li {
    padding-left: 2px;
}

.todo-transcription {
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-raised);
}

.todo-transcription summary {
    color: var(--muted);
    font-size: .84rem;
    font-weight: 800;
    cursor: pointer;
}

.todo-transcription p {
    margin: 10px 0 0;
    padding-top: 10px;
    border-top: 1px solid var(--line);
    color: var(--ink);
    white-space: pre-line;
}

.detail-list {
    margin: 0;
    padding-left: 18px;
    display: grid;
    gap: 6px;
    color: var(--navy-dark);
    font-weight: 800;
}

.agenda-driver-detail {
    align-content: start;
}

.agenda-driver-event-meta {
    margin: -4px 0 4px;
    color: var(--muted);
    font-size: .9rem;
    font-weight: 800;
}

.mobile-driver-list {
    display: grid;
    gap: 12px;
}

.mobile-driver-item {
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow-card);
}

.mobile-driver-item[open] {
    border-color: rgba(176, 136, 59, .55);
}

.mobile-driver-item summary {
    display: grid;
    gap: 9px;
    cursor: pointer;
    list-style: none;
}

.mobile-driver-item summary::-webkit-details-marker {
    display: none;
}

.mobile-driver-summary-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.mobile-driver-type,
.mobile-driver-order {
    min-height: 26px;
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: 8px;
    font-size: .76rem;
    font-weight: 900;
}

.mobile-driver-type {
    border: 1px solid #e2d2ae;
    background: var(--gold-soft);
    color: #735821;
}

.mobile-driver-order {
    border: 1px solid #cfe0ec;
    background: var(--navy-soft);
    color: var(--navy);
}

.mobile-driver-title {
    display: block;
    color: var(--navy-dark);
    font-size: 1.08rem;
    line-height: 1.24;
    overflow-wrap: anywhere;
}

.mobile-driver-meta {
    display: block;
    color: var(--muted);
    font-size: .82rem;
    font-weight: 800;
    overflow-wrap: anywhere;
}

.mobile-driver-content {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--line);
    color: var(--ink);
    font-size: 1rem;
    line-height: 1.62;
    overflow-wrap: anywhere;
}

.mobile-driver-content > :first-child {
    margin-top: 0;
}

.mobile-driver-content > :last-child {
    margin-bottom: 0;
}

.mobile-driver-content p,
.mobile-driver-content h3,
.mobile-driver-content h4 {
    margin: 0 0 .85em;
}

.mobile-driver-content ul,
.mobile-driver-content ol,
.mobile-driver-content blockquote {
    margin-top: 0;
    margin-bottom: .85em;
}

.agenda-capture-choice {
    align-content: start;
}

.agenda-capture-options {
    display: grid;
    gap: 10px;
}

.agenda-capture-option {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow-card);
}

.agenda-capture-option-icon {
    width: 42px;
    height: 42px;
    display: inline-grid;
    place-items: center;
    border-radius: 8px;
    background: #1d4ed8;
    color: #fff;
}

.agenda-capture-option strong,
.agenda-capture-option small {
    display: block;
    overflow-wrap: anywhere;
}

.agenda-capture-option strong {
    color: var(--navy-dark);
    font-size: 1rem;
    line-height: 1.2;
}

.agenda-capture-option small {
    margin-top: 3px;
    color: var(--muted);
    font-size: .82rem;
    font-weight: 800;
}

.agenda-capture-page {
    min-height: 100vh;
    min-height: 100dvh;
    display: grid;
    align-content: start;
    background: #fff;
    color: var(--ink);
}

.agenda-capture-hero {
    padding: calc(18px + env(safe-area-inset-top)) 18px 22px;
    background: linear-gradient(180deg, var(--navy) 0%, var(--navy-dark) 100%);
    color: #fff;
    border-bottom: 7px solid #edf0ed;
}

.agenda-capture-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.agenda-capture-brand > span:last-child {
    display: grid;
    gap: 0;
}

.agenda-capture-brand small {
    color: var(--gold-soft);
    font-size: .8rem;
    font-weight: 900;
    line-height: 1.1;
}

.agenda-capture-brand > span:last-child > strong {
    font-family: "Spectral", Georgia, "Times New Roman", serif;
    font-size: 1.82rem;
    line-height: 1.04;
}

.agenda-capture-mark {
    width: 58px;
    height: 58px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border: 1px solid rgba(176, 136, 59, .62);
    border-radius: 8px;
    background: rgba(255, 255, 255, .06);
    line-height: 1;
}

.agenda-capture-mark span {
    font-size: 1rem;
    font-weight: 900;
}

.agenda-capture-mark strong {
    color: var(--gold-soft);
    font-family: "Spectral", Georgia, "Times New Roman", serif;
    font-size: 1.25rem;
}

.agenda-capture-hero p {
    margin: 16px 0 0;
    color: rgba(255, 255, 255, .88);
    font-size: 1.05rem;
    font-weight: 800;
}

.agenda-capture-card {
    display: grid;
    gap: 18px;
    margin: 18px;
    padding: 18px;
    border: 1px solid #e3d7bf;
    border-radius: 8px;
    background: #fbf6e8;
}

.agenda-capture-head {
    display: grid;
    grid-template-columns: 74px minmax(0, 1fr);
    align-items: start;
    gap: 14px;
}

.agenda-capture-date {
    width: 74px;
    min-height: 86px;
    display: grid;
    align-content: center;
    justify-items: center;
    gap: 2px;
    border-radius: 8px;
    background: var(--navy);
    color: #fff;
    box-shadow: inset 0 0 0 1px rgba(176, 136, 59, .28);
}

.agenda-capture-date small {
    color: rgba(255, 255, 255, .84);
    font-size: .74rem;
    font-weight: 900;
    text-transform: uppercase;
}

.agenda-capture-date strong {
    font-family: "Spectral", Georgia, "Times New Roman", serif;
    font-size: 2.05rem;
    line-height: .95;
}

.agenda-capture-title-block {
    min-width: 0;
    display: grid;
    gap: 8px;
}

.agenda-capture-title-block h1 {
    margin: 0;
    color: var(--navy-dark);
    font-family: "Spectral", Georgia, "Times New Roman", serif;
    font-size: 1.43rem;
    font-weight: 400;
    line-height: 1.13;
    overflow-wrap: anywhere;
}

.agenda-capture-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 12px;
}

.agenda-capture-meta span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--muted);
    font-size: .9rem;
    font-weight: 800;
}

.agenda-capture-speaker,
.agenda-capture-summary {
    margin: 0;
    color: var(--muted);
    font-size: .98rem;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.agenda-capture-speaker {
    color: var(--navy-dark);
    font-weight: 800;
}

.agenda-capture-odj,
.agenda-capture-restricted {
    display: grid;
    gap: 9px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
}

.agenda-capture-odj h2 {
    margin: 0;
    color: var(--muted);
    font-size: .78rem;
    font-weight: 900;
    text-transform: uppercase;
}

.agenda-capture-odj ul {
    margin: 0;
    padding-left: 20px;
    display: grid;
    gap: 8px;
    color: var(--navy-dark);
    font-size: .98rem;
    font-weight: 400;
    line-height: 1.42;
}

.agenda-capture-odj p {
    margin: 0;
    color: var(--muted);
    font-weight: 800;
}

.agenda-capture-restricted {
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-soft);
    text-align: center;
}

.agenda-capture-restricted strong {
    color: var(--navy-dark);
    font-size: 1.05rem;
}

.agenda-capture-restricted p {
    margin: 0;
    color: var(--ink);
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.45;
}

.agenda-capture-tone-special .agenda-capture-date {
    background: #dce6f1;
    color: #1f4e79;
    box-shadow: inset 0 0 0 1px rgba(31, 78, 121, .28);
}

.agenda-capture-tone-special .agenda-capture-date small {
    color: rgba(31, 78, 121, .72);
}

.agenda-capture-tone-degree .agenda-capture-date {
    background: #ffd966;
    color: #7f6000;
}

.agenda-capture-tone-degree .agenda-capture-date small,
.agenda-capture-tone-exam .agenda-capture-date small {
    color: rgba(127, 96, 0, .72);
}

.agenda-capture-tone-exam .agenda-capture-date {
    background: #fff2cc;
    color: #7f6000;
}

.agenda-capture-tone-white .agenda-capture-date {
    background: #e2f0d9;
    color: #375623;
}

.agenda-capture-tone-white .agenda-capture-date small {
    color: rgba(55, 86, 35, .72);
}

.agenda-capture-tone-funeral .agenda-capture-date {
    background: #e7e6e6;
    color: #404040;
}

.agenda-capture-tone-funeral .agenda-capture-date small {
    color: rgba(64, 64, 64, .72);
}

.assistant-screen {
    min-height: calc(100vh - 108px);
    min-height: calc(100dvh - 108px);
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr) auto;
    gap: 12px;
}

.assistant-header {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 2px;
}

.assistant-header p {
    margin: 0;
    color: #8c98aa;
    font-size: .78rem;
    font-weight: 900;
    letter-spacing: 0;
    text-transform: uppercase;
}

.assistant-header h2,
.assistant-intro h3 {
    margin: 0;
    color: var(--navy-dark);
    font-family: "Spectral", Georgia, "Times New Roman", serif;
    line-height: 1.1;
}

.assistant-header h2 {
    font-size: 1.7rem;
}

.assistant-reset {
    min-height: 32px;
    padding: 6px 10px;
    border: 1px solid #ded8cc;
    border-radius: 8px;
    background: rgba(255, 255, 255, .62);
    color: #647182;
    font-size: .76rem;
    font-weight: 900;
    cursor: pointer;
}

.assistant-reset:hover {
    border-color: rgba(176, 136, 59, .6);
    color: var(--navy);
}

.assistant-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px;
    padding: 4px;
    border: 1px solid #e5dfd2;
    border-radius: 8px;
    background: #eeeae1;
}

.assistant-tabs button {
    min-width: 0;
    min-height: 38px;
    padding: 8px 10px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: #647182;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: .86rem;
    font-weight: 900;
    cursor: pointer;
}

.assistant-tabs button.is-active {
    background: #ffffff;
    color: var(--navy);
    box-shadow: 0 4px 12px rgba(12, 31, 51, .08);
}

.assistant-demo-note {
    margin: 0;
    color: #8a96a7;
    font-size: .76rem;
    font-weight: 800;
}

.assistant-intro {
    align-self: start;
    padding: 30px 12px 10px;
    display: grid;
    justify-items: center;
    gap: 12px;
    text-align: center;
}

.assistant-hero-icon {
    width: 52px;
    height: 52px;
    position: relative;
    border-radius: 14px;
    background: var(--navy);
    box-shadow: 0 10px 22px rgba(12, 31, 51, .16);
}

.assistant-hero-icon::before,
.assistant-hero-icon::after {
    content: "";
    position: absolute;
    border: 2px solid #ffffff;
}

.assistant-hero-icon::before {
    width: 22px;
    height: 14px;
    top: 18px;
    left: 14px;
    border-radius: 3px;
}

.assistant-hero-icon::after {
    width: 7px;
    height: 7px;
    top: 29px;
    left: 20px;
    border-top: 0;
    border-right: 0;
    transform: skewX(-25deg);
}

.assistant-intro h3 {
    font-size: 1.24rem;
}

.assistant-intro p {
    max-width: 290px;
    margin: 0;
    color: #536174;
    line-height: 1.58;
}

.assistant-chat {
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow-y: auto;
    padding: 4px 0 10px;
    scroll-behavior: smooth;
}

.assistant-empty {
    min-height: 100%;
    display: grid;
    align-content: center;
    justify-items: center;
    gap: 12px;
    padding: 18px 14px;
    text-align: center;
}

.assistant-empty h3 {
    margin: 0;
    color: var(--navy-dark);
    font-family: "Spectral", Georgia, "Times New Roman", serif;
    font-size: 1.24rem;
    line-height: 1.1;
}

.assistant-empty p {
    max-width: 292px;
    margin: 0;
    color: #536174;
    line-height: 1.58;
}

.assistant-message {
    display: flex;
}

.assistant-message-user {
    justify-content: flex-end;
}

.assistant-message-assistant {
    justify-content: flex-start;
}

.assistant-bubble {
    max-width: 88%;
    display: grid;
    gap: 8px;
    padding: 11px 12px;
    border: 1px solid #ded8cc;
    border-radius: 14px;
    background: #ffffff;
    color: var(--navy-dark);
    box-shadow: 0 5px 16px rgba(12, 31, 51, .07);
}

.assistant-message-user .assistant-bubble {
    border-color: var(--navy);
    background: var(--navy);
    color: #ffffff;
}

.assistant-message.is-error .assistant-bubble {
    border-color: rgba(157, 47, 47, .32);
    background: #fff1f1;
    color: var(--danger);
}

.assistant-message.is-pending .assistant-bubble {
    color: var(--muted);
}

.assistant-message-text {
    white-space: pre-line;
    overflow-wrap: anywhere;
    font-size: .96rem;
    font-weight: 400;
    line-height: 1.55;
}

.assistant-message-user .assistant-message-text {
    font-weight: 500;
}

.assistant-answer {
    max-height: 210px;
    overflow: auto;
    align-self: end;
    display: grid;
    gap: 8px;
    align-content: start;
    padding: 14px;
    border: 1px solid #ded8cc;
    border-radius: 8px;
    background: #ffffff;
    color: var(--ink);
    box-shadow: var(--shadow-card);
}

.assistant-answer[hidden] {
    display: none;
}

.assistant-answer strong {
    white-space: pre-line;
}

.assistant-answer small {
    color: var(--muted);
    font-weight: 800;
}

.assistant-source-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.assistant-source-list small {
    min-height: 28px;
    display: inline-flex;
    align-items: center;
    padding: 5px 8px;
    border: 1px solid rgba(176, 136, 59, .32);
    border-radius: 8px;
    background: #fff9eb;
    color: #735821;
}

.assistant-limit {
    display: block;
    padding-top: 4px;
    border-top: 1px solid var(--line);
}

.assistant-bottom {
    align-self: end;
    display: grid;
    margin: 0 -14px;
    padding: 10px 14px 0;
    border-top: 1px solid #e5dfd2;
    background: rgba(244, 241, 234, .97);
}

.assistant-groups {
    min-width: 0;
    overflow: hidden;
}

.assistant-questions {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
}

.assistant-questions::-webkit-scrollbar {
    display: none;
}

.assistant-questions button {
    flex: 0 0 auto;
    max-width: 245px;
    min-height: 36px;
    padding: 7px 12px;
    border: 1px solid #ded8cc;
    border-radius: 999px;
    background: #ffffff;
    color: var(--navy-dark);
    overflow: hidden;
    text-align: left;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(12, 31, 51, .06);
}

.assistant-questions button.is-active,
.assistant-questions button:hover {
    border-color: rgba(176, 136, 59, .6);
    background: #fffaf0;
}

.assistant-query-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 42px;
    gap: 8px;
    padding: 6px;
    border: 1px solid #ded8cc;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 6px 18px rgba(12, 31, 51, .08);
}

.assistant-query-form input {
    min-width: 0;
    border: 0;
    outline: 0;
    padding: 0 8px;
    color: var(--navy-dark);
}

.assistant-query-form input::placeholder {
    color: #7d8796;
}

.assistant-query-form button {
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 8px;
    background: var(--navy);
    color: #ffffff;
    font-weight: 900;
    cursor: pointer;
}

.page-heading {
    padding: 4px 2px 0;
}

.page-heading h2 {
    margin: 0;
    color: var(--navy-dark);
    font-family: "Spectral", Georgia, "Times New Roman", serif;
    font-size: 1.9rem;
    line-height: 1.1;
}

.agenda-month {
    display: grid;
    gap: 10px;
}

.agenda-month + .agenda-month {
    margin-top: 6px;
}

.agenda-month > h3 {
    margin: 0;
    padding: 2px 2px 0;
    color: var(--navy);
    font-family: "Spectral", Georgia, "Times New Roman", serif;
    font-size: 1.22rem;
    font-weight: 700;
}

.agenda-list {
    display: grid;
    gap: 10px;
}

.agenda-card {
    position: relative;
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr);
    align-items: center;
    gap: 14px;
    padding: 14px 30px 14px 14px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow-card);
    color: inherit;
}

.agenda-card::after {
    content: ">";
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    color: var(--gold);
    font-weight: 900;
}

.agenda-date {
    width: 58px;
    height: 62px;
    display: grid;
    align-content: center;
    justify-items: center;
    gap: 1px;
    border-radius: 8px;
    background: var(--navy);
    color: #fff;
    box-shadow: inset 0 0 0 1px rgba(176, 136, 59, .28);
}

.agenda-date small {
    font-size: .62rem;
    font-weight: 900;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .82);
}

.agenda-date strong {
    font-family: "Spectral", Georgia, "Times New Roman", serif;
    font-size: 1.55rem;
    line-height: 1;
}

.agenda-date-gold {
    background: var(--gold-soft);
    color: var(--navy-dark);
    box-shadow: inset 0 0 0 1px rgba(176, 136, 59, .5);
}

.agenda-date-gold small {
    color: rgba(12, 31, 51, .6);
}

.agenda-body {
    min-width: 0;
    display: grid;
    gap: 7px;
}

.agenda-tags {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.event-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--muted);
    font-size: .8rem;
    font-weight: 800;
}

.event-dot {
    width: 8px;
    height: 8px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: #9aa6b0;
}

.event-chip-navy .event-dot {
    background: var(--navy);
}

.event-chip-gold .event-dot {
    background: var(--gold);
}

.event-chip-green .event-dot {
    background: var(--accent);
}

.event-chip-sand .event-dot {
    background: #c9a86a;
}

.degree-pill {
    min-height: 22px;
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border: 1px solid rgba(176, 136, 59, .55);
    border-radius: 999px;
    color: var(--gold);
    font-size: .68rem;
    font-weight: 900;
    letter-spacing: 0;
}

.agenda-type-pill {
    min-height: 22px;
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border: 1px solid rgba(21, 55, 90, .16);
    border-radius: 999px;
    background: rgba(21, 55, 90, .06);
    color: var(--navy);
    font-size: .68rem;
    font-weight: 900;
    letter-spacing: 0;
    line-height: 1.15;
    white-space: normal;
    overflow-wrap: anywhere;
}

.agenda-type-pill-gold {
    border-color: rgba(176, 136, 59, .38);
    background: rgba(176, 136, 59, .12);
    color: var(--gold);
}

.agenda-type-pill-blue {
    border-color: rgba(37, 99, 235, .28);
    background: rgba(37, 99, 235, .1);
    color: #1d4ed8;
}

.agenda-type-pill-red {
    border-color: rgba(185, 28, 28, .3);
    background: rgba(185, 28, 28, .1);
    color: #b91c1c;
}

.agenda-type-pill-green {
    border-color: rgba(63, 139, 122, .34);
    background: rgba(63, 139, 122, .11);
    color: var(--accent);
}

.agenda-type-pill-soft {
    border-color: rgba(79, 70, 229, .22);
    background: rgba(79, 70, 229, .08);
    color: #4338ca;
}

.agenda-type-pill-gray {
    border-color: rgba(105, 117, 130, .22);
    background: rgba(105, 117, 130, .08);
    color: var(--muted);
}

.agenda-type-pill-muted {
    border-color: rgba(75, 85, 99, .22);
    background: rgba(75, 85, 99, .08);
    color: #4b5563;
}

.agenda-type-pill-sand {
    border-color: rgba(201, 168, 106, .42);
    background: rgba(201, 168, 106, .13);
    color: #8a6a30;
}

.agenda-spark {
    color: var(--gold);
    font-size: .9rem;
    line-height: 1;
}

.agenda-title {
    color: var(--navy-dark);
    font-size: 1.05rem;
    font-weight: 800;
    line-height: 1.2;
    overflow-wrap: anywhere;
}

.agenda-speaker {
    color: var(--muted);
    font-size: .86rem;
    font-weight: 700;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.agenda-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 14px;
}

.agenda-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--muted);
    font-size: .84rem;
    font-weight: 700;
}

.agenda-meta-item .meta-ico {
    flex: 0 0 auto;
}

.next-event {
    position: relative;
    overflow: hidden;
    display: grid;
    gap: 11px;
    padding: 18px;
    border-radius: 8px;
    background: linear-gradient(150deg, var(--navy) 0%, var(--navy-dark) 100%);
    border: 1px solid rgba(176, 136, 59, .42);
    box-shadow: var(--shadow-soft);
    color: #fff;
}

.next-event-deco {
    position: absolute;
    top: -58px;
    right: -46px;
    width: 172px;
    height: 172px;
    border-radius: 50%;
    border: 1px solid rgba(176, 136, 59, .2);
    pointer-events: none;
}

.next-event-deco::after {
    content: "";
    position: absolute;
    inset: 26px;
    border-radius: 50%;
    border: 1px solid rgba(176, 136, 59, .14);
}

.next-event-top {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.next-event .eyebrow {
    margin: 0;
    color: #c8a662;
}

.next-event-count {
    flex: 0 0 auto;
    min-height: 26px;
    display: inline-flex;
    align-items: center;
    padding: 4px 11px;
    border: 1px solid rgba(176, 136, 59, .5);
    border-radius: 999px;
    background: rgba(176, 136, 59, .16);
    color: var(--gold-soft);
    font-size: .74rem;
    font-weight: 900;
    white-space: nowrap;
}

.next-event-head {
    position: relative;
    display: grid;
    gap: 3px;
}

.next-event-date {
    font-family: "Spectral", Georgia, "Times New Roman", serif;
    font-size: 1.52rem;
    line-height: 1.12;
    color: #fff;
    overflow-wrap: anywhere;
}

.next-event-title {
    color: rgba(255, 255, 255, .82);
    font-size: 1rem;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.next-event-speaker {
    color: rgba(255, 255, 255, .72);
    font-size: .9rem;
    font-weight: 700;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.next-event .agenda-tags,
.next-event .agenda-meta {
    position: relative;
}

.next-event .degree-pill {
    border-color: rgba(176, 136, 59, .58);
    background: rgba(176, 136, 59, .16);
    color: var(--gold-soft);
}

.next-event .agenda-type-pill {
    border-color: rgba(255, 255, 255, .2);
    background: rgba(255, 255, 255, .1);
    color: #dde6f0;
}

.next-event .agenda-type-pill-gold {
    border-color: rgba(176, 136, 59, .55);
    background: rgba(176, 136, 59, .18);
    color: var(--gold-soft);
}

.next-event .agenda-type-pill-blue {
    border-color: rgba(147, 197, 253, .42);
    background: rgba(37, 99, 235, .22);
    color: #dbeafe;
}

.next-event .agenda-type-pill-red {
    border-color: rgba(252, 165, 165, .42);
    background: rgba(185, 28, 28, .22);
    color: #fee2e2;
}

.next-event .agenda-type-pill-green {
    border-color: rgba(134, 239, 172, .38);
    background: rgba(22, 101, 52, .22);
    color: #dcfce7;
}

.next-event .agenda-type-pill-soft {
    border-color: rgba(199, 210, 254, .34);
    background: rgba(79, 70, 229, .18);
    color: #eef2ff;
}

.next-event .event-chip {
    color: #dde6f0;
}

.next-event .event-dot {
    background: #9fb4cb;
}

.next-event .event-chip-gold .event-dot {
    background: var(--gold);
}

.next-event .event-chip-green .event-dot {
    background: #5bbf8f;
}

.next-event .event-chip-sand .event-dot {
    background: #d8b878;
}

.next-event .agenda-meta-item {
    color: var(--gold-soft);
}

.hl-list {
    display: grid;
    gap: 10px;
}

.hl-tile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow-card);
    color: inherit;
}

.hl-tile::after {
    content: ">";
    flex: 0 0 auto;
    color: var(--gold);
    font-weight: 900;
}

.hl-icon {
    width: 40px;
    height: 40px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border-radius: 50%;
}

.hl-icon svg {
    display: block;
}

.hl-icon-danger {
    background: #fbe7e3;
    color: #bb442c;
}

.hl-icon-gold {
    background: var(--gold-soft);
    color: #8a6a23;
}

.hl-icon-navy {
    background: var(--navy-soft);
    color: var(--navy);
}

.hl-body {
    min-width: 0;
    flex: 1 1 auto;
    display: grid;
    gap: 2px;
}

.hl-eyebrow {
    color: var(--muted);
    font-size: .68rem;
    font-weight: 900;
    letter-spacing: .03em;
    line-height: 1.2;
    text-transform: uppercase;
}

.hl-title {
    color: var(--navy-dark);
    font-size: .98rem;
    font-weight: 800;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hl-meta {
    flex: 0 0 auto;
    color: var(--muted);
    font-size: .82rem;
    font-weight: 700;
    white-space: nowrap;
}

.hl-more {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px dashed var(--line);
    border-radius: 8px;
    color: var(--navy);
    font-size: .86rem;
    font-weight: 800;
}

.todo-tabs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 2px 2px 4px;
    scrollbar-width: none;
}

.todo-tabs::-webkit-scrollbar {
    display: none;
}

.todo-tabs button {
    flex: 0 0 auto;
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
    color: var(--muted);
    font-size: .9rem;
    font-weight: 800;
    white-space: nowrap;
    cursor: pointer;
}

.todo-tabs button.is-active {
    background: var(--navy);
    border-color: var(--navy);
    color: #fff;
}

.todo-tab-count {
    min-width: 20px;
    height: 20px;
    display: inline-grid;
    place-items: center;
    padding: 0 5px;
    border-radius: 999px;
    background: var(--navy-soft);
    color: var(--navy);
    font-size: .72rem;
    font-weight: 900;
}

.todo-tabs button.is-active .todo-tab-count {
    background: rgba(255, 255, 255, .22);
    color: #fff;
}

.todo-new {
    width: 100%;
    min-height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    color: var(--navy-dark);
    font-size: 1rem;
    font-weight: 800;
    box-shadow: var(--shadow-card);
    cursor: pointer;
}

.todo-new-plus {
    font-size: 1.2rem;
    font-weight: 900;
    color: var(--gold);
}

.todo-voice {
    width: 100%;
    min-height: 52px;
    margin-top: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px;
    border: 1px solid var(--gold);
    border-radius: 8px;
    background: var(--surface);
    color: var(--navy-dark);
    font-size: 1rem;
    font-weight: 800;
    box-shadow: var(--shadow-card);
}

.todo-voice-dot {
    width: 12px;
    height: 12px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: var(--gold);
}

.todo-voice.is-recording {
    border-color: var(--danger);
    color: var(--danger);
}

.todo-voice.is-recording .todo-voice-dot {
    background: var(--danger);
    animation: todo-voice-pulse 1s ease-in-out infinite;
}

.todo-voice.is-processing {
    opacity: .7;
}

@keyframes todo-voice-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: .25; }
}

.todo-list {
    display: grid;
    gap: 10px;
}

.todo-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 12px;
    padding: 15px 14px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow-card);
    color: inherit;
}

.todo-check {
    width: 22px;
    height: 22px;
    margin-top: 2px;
    flex: 0 0 auto;
    padding: 0;
    border: 2px solid #c4cfd6;
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
}

button.todo-check:hover {
    border-color: var(--navy);
}

.todo-check.is-readonly {
    border-style: dashed;
    border-color: #d3dbe1;
    cursor: default;
}

.todo-check.is-done {
    position: relative;
    border-color: var(--navy);
    background: var(--navy);
}

.todo-check.is-done::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 6px;
    width: 5px;
    height: 9px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.todo-card-body {
    min-width: 0;
    display: grid;
    gap: 8px;
    color: inherit;
}

.todo-card.is-done .todo-card-title {
    color: var(--muted);
    text-decoration: line-through;
}

.todo-card-title {
    color: var(--navy-dark);
    font-size: 1.02rem;
    font-weight: 800;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.todo-meta-line {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px 12px;
    color: var(--muted);
    font-size: .84rem;
    font-weight: 700;
}

.todo-due {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.todo-due.is-overdue {
    color: #bb442c;
}

.todo-college {
    min-height: 26px;
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid #d5dde6;
    background: var(--navy-soft);
    color: #42566a;
    font-size: .76rem;
    font-weight: 800;
}

.todo-mine {
    min-height: 26px;
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid var(--navy);
    background: var(--navy);
    color: #fff;
    font-size: .76rem;
    font-weight: 800;
}

.todo-card.is-leaving {
    pointer-events: none;
    animation: todo-leave .4s ease forwards;
}

.todo-card.is-leaving .todo-card-title {
    color: var(--muted);
    text-decoration: line-through;
}

.todo-card.is-leaving .todo-check {
    position: relative;
    border-color: var(--navy);
    background: var(--navy);
}

.todo-card.is-leaving .todo-check::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 6px;
    width: 5px;
    height: 9px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

@keyframes todo-leave {
    0% {
        opacity: 1;
        transform: translateX(0) scale(1);
    }

    30% {
        opacity: 1;
        transform: translateX(-2px) scale(.99);
    }

    100% {
        opacity: 0;
        transform: translateX(22px) scale(.96);
    }
}

@media (prefers-reduced-motion: reduce) {
    .todo-card.is-leaving {
        animation-duration: .01s;
    }
}

.todo-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.todo-status {
    min-height: 26px;
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: #eef1ee;
    color: #51606b;
    font-size: .78rem;
    font-weight: 800;
}

.todo-status-en_cours {
    background: var(--navy-soft);
    color: #2f5277;
    border-color: #cfe0ec;
}

.todo-status-en_attente {
    background: #f6edd9;
    color: #8a6a23;
    border-color: #ead7a8;
}

.todo-status-termine {
    background: #e7f1e9;
    color: #3f6f4a;
    border-color: #cfe2d3;
}

.todo-status-annule {
    background: #f0f1f2;
    color: #7a828a;
    border-color: var(--line);
}

.todo-prio {
    min-height: 26px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-size: .78rem;
    font-weight: 800;
}

.todo-prio svg {
    width: 13px;
    height: 13px;
}

.todo-prio-urgente {
    background: #fbe7e3;
    color: #bb442c;
    border-color: #f1c9c0;
}

.todo-prio-haute {
    background: #fdf2da;
    color: #8a6414;
    border-color: #ecd9a0;
}

.todo-form {
    display: grid;
    gap: 14px;
    padding: 16px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow-card);
}

.todo-field {
    display: grid;
    gap: 6px;
}

.todo-field > span {
    color: var(--muted);
    font-size: .82rem;
    font-weight: 800;
}

.todo-field input,
.todo-field select,
.todo-field textarea {
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--ink);
    font: inherit;
}

.todo-field textarea {
    min-height: 84px;
    resize: vertical;
}

.todo-field input:focus,
.todo-field select:focus,
.todo-field textarea:focus {
    border-color: var(--gold);
    outline: 2px solid rgba(176, 136, 59, .18);
}

.md-editor {
    display: grid;
    gap: 6px;
}

.md-toolbar {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.md-btn {
    border: 1px solid var(--line);
    background: var(--surface-raised);
    color: var(--navy-dark);
    border-radius: 7px;
    padding: 4px 10px;
    font-size: .9rem;
    line-height: 1.2;
    cursor: pointer;
}

.md-btn:hover {
    border-color: var(--muted);
}

.md-hint {
    margin: 0;
    color: var(--muted);
    font-size: .76rem;
}

.todo-form-error {
    margin: 0;
    padding: 10px 12px;
    border-radius: 8px;
    background: #fff1f1;
    color: var(--danger);
    font-weight: 800;
}

.todo-form-error[hidden] {
    display: none;
}

.todo-form-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.todo-form-actions button {
    min-height: 46px;
    border: 1px solid transparent;
    border-radius: 8px;
    font-weight: 900;
    cursor: pointer;
}

.todo-form-actions button[type="submit"] {
    background: var(--navy);
    color: #fff;
}

.todo-form-actions .todo-form-cancel {
    background: var(--surface-soft);
    border-color: var(--line);
    color: var(--navy-dark);
}

.todo-detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.todo-detail-actions button {
    flex: 1 1 auto;
    min-height: 42px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-raised);
    color: var(--navy-dark);
    font-weight: 900;
    cursor: pointer;
}

.todo-detail-actions button.is-danger {
    background: #fff1f1;
    border-color: #f1c7c7;
    color: var(--danger);
}

/* Global mobile type tuning: keep structure clear without the heavy all-bold feel. */
.auth-page,
.mobile-frame {
    font-weight: 400;
}

.auth-card h1,
.mobile-frame .mobile-topbar h1,
.mobile-frame .welcome-panel h2,
.mobile-frame .module-list h2,
.mobile-frame .screen-heading h2,
.mobile-frame .detail-panel h2,
.mobile-frame .page-heading h2,
.mobile-frame .assistant-header h2,
.mobile-frame .assistant-intro h3,
.mobile-frame .assistant-empty h3,
.mobile-frame .agenda-month > h3,
.mobile-frame .next-event-date {
    font-weight: 600;
}

.auth-page .brand-mark,
.mobile-frame .mobile-brand-mark span,
.mobile-frame .mobile-brand-mark strong,
.mobile-frame .summary-tile strong,
.mobile-frame .record-link strong,
.mobile-frame .college-card strong,
.mobile-frame .agenda-title,
.mobile-frame .hl-title,
.mobile-frame .todo-card-title {
    font-weight: 600;
}

.auth-page .eyebrow,
.auth-page .auth-form label,
.mobile-frame .eyebrow,
.mobile-frame .welcome-office,
.mobile-frame .tile-label,
.mobile-frame .summary-tile small,
.mobile-frame .module-list a,
.mobile-frame .mobile-tabbar a,
.mobile-frame .screen-heading span,
.mobile-frame .record-link small,
.mobile-frame .priority-badge,
.mobile-frame .college-card span,
.mobile-frame .college-card small,
.mobile-frame .empty-state,
.mobile-frame .back-link,
.mobile-frame .detail-row span,
.mobile-frame .detail-list,
.mobile-frame .assistant-header p,
.mobile-frame .assistant-demo-note,
.mobile-frame .assistant-answer small,
.mobile-frame .assistant-source-list small,
.mobile-frame .assistant-questions button,
.mobile-frame .event-chip,
.mobile-frame .degree-pill,
.mobile-frame .agenda-type-pill,
.mobile-frame .next-event-count,
.mobile-frame .hl-eyebrow,
.mobile-frame .hl-more,
.mobile-frame .todo-tabs button,
.mobile-frame .todo-tab-count,
.mobile-frame .todo-new,
.mobile-frame .todo-college,
.mobile-frame .todo-mine,
.mobile-frame .todo-status,
.mobile-frame .todo-prio,
.mobile-frame .todo-field > span,
.mobile-frame .todo-form-error {
    font-weight: 500;
}

.auth-page .form-error,
.auth-page .auth-form button,
.auth-page .auth-link-button,
.mobile-frame .icon-button,
.mobile-frame .contact-actions a,
.mobile-frame .assistant-reset,
.mobile-frame .assistant-tabs button,
.mobile-frame .assistant-query-form button,
.mobile-frame .agenda-date small,
.mobile-frame .agenda-card::after,
.mobile-frame .module-list a::after,
.mobile-frame .record-link::after,
.mobile-frame .college-card-main::after,
.mobile-frame .hl-tile::after,
.mobile-frame .todo-new-plus,
.mobile-frame .todo-form-actions button,
.mobile-frame .todo-detail-actions button {
    font-weight: 700;
}

.mobile-frame .welcome-panel p,
.mobile-frame .assistant-intro p,
.mobile-frame .assistant-empty p,
.mobile-frame .next-event-title,
.mobile-frame .next-event-speaker,
.mobile-frame .agenda-speaker,
.mobile-frame .agenda-meta-item,
.mobile-frame .hl-meta,
.mobile-frame .todo-meta-line {
    font-weight: 400;
}

@media (hover: hover) and (pointer: fine) and (min-width: 720px) {
    body.mobile-shell {
        padding: 20px 0;
    }

    .mobile-frame {
        width: min(100%, 430px);
        min-height: calc(100vh - 40px);
        min-height: calc(100dvh - 40px);
        border-radius: 16px;
        overflow: hidden;
        box-shadow: 0 24px 70px rgba(12, 31, 51, .32);
    }

    .mobile-topbar {
        padding-right: 20px;
        padding-left: 20px;
    }

    .mobile-content {
        padding: 18px 20px 104px;
    }

    .mobile-tabbar {
        width: min(100%, 430px);
        bottom: 20px;
        border-radius: 0 0 16px 16px;
    }
}

/* Politique de confidentialite (page /confidentialite + bloc depliable invitation) */
.legal-card {
    width: min(100%, 640px);
    text-align: left;
}

.legal-content {
    text-align: left;
    font-size: .9rem;
    line-height: 1.5;
    color: var(--navy-dark);
}

.legal-content h2 {
    font-size: 1rem;
    margin: 18px 0 6px;
}

.legal-content ul {
    margin: 6px 0;
    padding-left: 20px;
}

.legal-disclosure {
    margin: 16px 0;
    text-align: left;
}

.legal-disclosure summary {
    cursor: pointer;
    font-weight: 600;
    color: var(--navy-dark);
    padding: 8px 0;
}

.auth-decline {
    margin-top: 14px;
}

.link-button-danger {
    background: none;
    border: none;
    color: var(--danger);
    font-size: .85rem;
    text-decoration: underline;
    cursor: pointer;
    padding: 6px 0;
}
