html, body {
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: #0f172a;
}

a, .btn-link {
    color: #006bb7;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-top: 1.25rem;
    padding-bottom: 2rem;
}

.current-user {
    align-items: flex-end;
    color: #475569;
    display: flex;
    flex-direction: column;
    font-size: 0.78rem;
    line-height: 1.25;
}

.current-user strong {
    color: #0f172a;
    font-size: 0.86rem;
}

.auth-warning {
    background: #fef3c7;
    border-bottom: 1px solid #f59e0b;
    color: #92400e;
    font-size: 0.9rem;
    font-weight: 600;
    padding-bottom: 0.65rem;
    padding-top: 0.65rem;
}

.page-header {
    align-items: flex-start;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    margin-bottom: 1.25rem;
}

.page-header h1 {
    font-size: 1.65rem;
    font-weight: 700;
    margin: 0;
}

.page-header p {
    color: #64748b;
    margin: 0.3rem 0 0;
}

.toolbar {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.section-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.hero-panel {
    background: #ffffff;
    border: 1px solid #dbeafe;
    border-radius: 8px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    margin-bottom: 1rem;
    padding: 1.1rem;
}

.hero-panel h2 {
    font-size: 1.45rem;
    font-weight: 750;
    margin: 0;
}

.hero-panel p {
    color: #475569;
    margin: 0.35rem 0 0;
    max-width: 74rem;
}

.demo-step-links,
.quick-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.8rem;
}

.flow-strip {
    align-items: stretch;
    display: grid;
    gap: 0.5rem;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    margin: 0.75rem 0 1rem;
}

.flow-step {
    background: #f8fafc;
    border: 1px solid #dbeafe;
    border-radius: 8px;
    color: #1e3a8a;
    font-size: 0.86rem;
    font-weight: 700;
    padding: 0.65rem 0.75rem;
    text-align: center;
}

.info-note {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    color: #1e3a8a;
    margin-bottom: 1rem;
    padding: 0.8rem 1rem;
}

.warning-note {
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 8px;
    color: #92400e;
    margin-bottom: 1rem;
    padding: 0.8rem 1rem;
}

.group-board {
    display: grid;
    gap: 1rem;
}

.group-board-card {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 1rem;
}

.group-transcript {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    display: grid;
    gap: 0.35rem;
    max-height: 18rem;
    overflow: auto;
    padding: 0.65rem;
}

.group-transcript-row {
    align-items: flex-start;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    display: grid;
    gap: 0.45rem;
    grid-template-columns: auto minmax(8rem, 14rem) 1fr;
    padding: 0.45rem 0.55rem;
}

.group-transcript-meta {
    color: #475569;
    font-size: 0.82rem;
    font-weight: 700;
}

.group-transcript-text {
    color: #0f172a;
    font-size: 0.9rem;
}

.feature-help-panel {
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.feature-help-panel summary {
    align-items: center;
    cursor: pointer;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-weight: 750;
    list-style-position: inside;
    padding: 0.85rem 1rem;
}

.feature-help-body {
    border-top: 1px solid #e2e8f0;
    padding: 0 1rem 1rem;
}

.feature-help-body p {
    color: #475569;
    margin: 0.85rem 0;
}

.feature-help-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.feature-help-grid h3 {
    color: #334155;
    font-size: 0.88rem;
    font-weight: 750;
    margin-bottom: 0.35rem;
}

.feature-help-grid li {
    color: #475569;
    font-size: 0.9rem;
    margin-bottom: 0.28rem;
}

.compact-links {
    margin-top: 0;
}

.product-guide-group h2 {
    margin-bottom: 0;
}

.product-guide-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.product-guide-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    min-height: 16rem;
    padding: 1rem;
}

.product-guide-card-header {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.product-guide-card h3 {
    font-size: 1.02rem;
    font-weight: 750;
    margin: 0;
}

.status-badge-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.guide-definition-list {
    display: grid;
    gap: 0.35rem;
    margin: 0;
}

.guide-definition-list dt {
    color: #64748b;
    font-size: 0.75rem;
    font-weight: 750;
    text-transform: uppercase;
}

.guide-definition-list dd {
    color: #334155;
    margin: 0 0 0.35rem;
}

.guide-safety-note {
    background: #f8fafc;
    border-left: 3px solid #2563eb;
    color: #475569;
    font-size: 0.88rem;
    margin-top: auto;
    padding: 0.55rem 0.7rem;
}

.workflow-map-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: 1fr;
}

.workflow-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    padding: 1rem;
}

.workflow-card-header {
    align-items: flex-start;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.workflow-card-header h2 {
    font-size: 1.12rem;
    font-weight: 750;
    margin: 0;
}

.workflow-card-header p {
    color: #64748b;
    margin: 0.35rem 0 0;
}

.workflow-step-list {
    counter-reset: workflow-step;
    display: grid;
    gap: 0.65rem;
    list-style: none;
    margin: 0 0 1rem;
    padding: 0;
}

.workflow-step-list li {
    align-items: flex-start;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    display: flex;
    gap: 0.75rem;
    padding: 0.65rem 0.75rem;
}

.workflow-step-marker {
    align-items: center;
    background: #dbeafe;
    border-radius: 999px;
    color: #1e40af;
    display: inline-flex;
    flex: 0 0 auto;
    font-size: 0.78rem;
    font-weight: 750;
    height: 1.6rem;
    justify-content: center;
    width: 1.6rem;
}

.workflow-step-list p {
    color: #64748b;
    font-size: 0.88rem;
    margin: 0.15rem 0 0;
}

.workflow-card-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.workflow-card-grid h3 {
    color: #334155;
    font-size: 0.9rem;
    font-weight: 750;
    margin-bottom: 0.4rem;
}

.workflow-card-grid li {
    color: #475569;
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.metric-card,
.panel,
.table-panel {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.metric-card {
    border-left: 4px solid #2563eb;
    min-height: 8rem;
    padding: 1rem;
}

.metric-label {
    color: #64748b;
    font-size: 0.82rem;
    font-weight: 600;
    text-transform: uppercase;
}

.metric-value {
    font-size: 1.65rem;
    font-weight: 750;
    margin-top: 0.6rem;
}

.metric-note {
    color: #64748b;
    font-size: 0.9rem;
    margin-top: 0.4rem;
}

.panel {
    margin-bottom: 1rem;
    padding: 1rem;
}

.panel h2,
.panel h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.status-pill {
    border-radius: 999px;
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 0.25rem 0.6rem;
}

.status-ok {
    background: #dcfce7;
    color: #166534;
}

.status-muted {
    background: #f1f5f9;
    color: #475569;
}

.status-warn,
.status-warning {
    background: #fef3c7;
    color: #92400e;
}

.status-danger {
    background: #fee2e2;
    color: #991b1b;
}

.status-info {
    background: #dbeafe;
    color: #1e40af;
}

.review-list {
    max-height: 52rem;
    overflow: auto;
}

.review-list-item {
    align-items: center;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    color: #0f172a;
    display: grid;
    gap: 0.45rem;
    grid-template-columns: auto auto minmax(0, 1fr) auto;
    margin-bottom: 0.45rem;
    padding: 0.55rem 0.65rem;
    text-align: left;
    width: 100%;
}

.review-list-item.active {
    border-color: #2563eb;
    box-shadow: 0 0 0 2px #dbeafe;
}

.review-list-item small {
    color: #64748b;
    grid-column: 3 / 5;
    overflow-wrap: anywhere;
}

.review-list-item strong {
    grid-column: 2 / 5;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.review-list-index {
    font-weight: 700;
}

.reading-summary,
.business-explanation {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 0.9rem;
}

.conversation-toolbar {
    align-items: center;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
}

.conversation-view {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    max-height: 46rem;
    overflow-y: auto;
    padding: 0.9rem;
}

.conversation-section {
    display: grid;
    gap: 0.45rem;
    margin-bottom: 0.9rem;
}

.conversation-section:last-child {
    margin-bottom: 0;
}

.conversation-section-label {
    color: #64748b;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0;
    text-align: center;
}

.conversation-bubble {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-left: 4px solid transparent;
    border-radius: 8px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
    max-width: min(44rem, 100%);
    padding: 0.65rem 0.75rem;
}

.conversation-bubble.review-message-included {
    border-left-color: #2563eb;
}

.conversation-bubble.review-message-context {
    background: #f8fafc;
    color: #64748b;
    opacity: 0.82;
}

.conversation-bubble.review-message-excluded {
    background: #fffbeb;
    border-left-color: #f59e0b;
    opacity: 0.78;
}

.conversation-bubble-meta {
    align-items: center;
    color: #64748b;
    display: flex;
    flex-wrap: wrap;
    font-size: 0.8rem;
    gap: 0.45rem;
    margin-bottom: 0.25rem;
}

.conversation-bubble-meta strong {
    color: #0f172a;
}

.conversation-bubble-text {
    color: #0f172a;
    line-height: 1.45;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
}

.conversation-badge {
    background: #dbeafe;
    border-radius: 999px;
    color: #1d4ed8;
    font-size: 0.72rem;
    padding: 0.12rem 0.45rem;
}

.conversation-badge.muted {
    background: #e2e8f0;
    color: #475569;
}

.conversation-paragraph-summary {
    background: #f8fbff;
    border: 1px solid #d7e3f0;
    border-radius: 8px;
    line-height: 1.65;
    padding: 1rem;
}

.status-dot {
    border-radius: 999px;
    display: inline-block;
    height: 0.65rem;
    width: 0.65rem;
}

.dot-ok {
    background: #16a34a;
}

.dot-danger {
    background: #dc2626;
}

.dot-warning {
    background: #f59e0b;
}

.dot-muted {
    background: #94a3b8;
}

.message-summary-box,
.review-message {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 0.65rem;
}

.review-message {
    margin-top: 0.55rem;
}

.review-message-included {
    background: #eff6ff;
    border-color: #93c5fd;
}

.review-message-excluded {
    background: #fffbeb;
    border-color: #fde68a;
}

.review-message-context {
    background: #f8fafc;
}

.review-message-meta {
    align-items: center;
    color: #475569;
    display: flex;
    flex-wrap: wrap;
    font-size: 0.82rem;
    gap: 0.45rem;
    margin-bottom: 0.35rem;
}

.review-message-text {
    color: #0f172a;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
}

.context-select {
    max-width: 14rem;
}

.provider-list {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.provider-row,
.settings-row,
.template-row {
    align-items: center;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    display: flex;
    gap: 0.75rem;
    justify-content: space-between;
    padding: 0.75rem;
}

.provider-row strong,
.settings-row strong,
.template-row strong {
    display: block;
}

.provider-row span,
.settings-row span,
.template-row span {
    color: #64748b;
    display: block;
    font-size: 0.86rem;
}

.admin-table {
    margin: 0;
}

.admin-table th {
    color: #64748b;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
}

.tab-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 1rem;
}

.tab-pill {
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    color: #334155;
    padding: 0.4rem 0.75rem;
}

.mock-result-grid {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.result-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 0.75rem;
}

.decision-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    margin-top: 1rem;
}

.decision-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 0.9rem;
}

.decision-card h3 {
    font-size: 0.98rem;
    margin-bottom: 0.35rem;
}

.decision-card p {
    color: #64748b;
    font-size: 0.88rem;
    margin-bottom: 0.75rem;
}

.review-message {
    max-width: 34rem;
    white-space: normal;
}

.modal-backdrop-custom {
    align-items: flex-start;
    background: rgba(15, 23, 42, 0.45);
    bottom: 0;
    display: flex;
    justify-content: center;
    left: 0;
    overflow-y: auto;
    padding: 2rem 1rem;
    position: fixed;
    right: 0;
    top: 0;
    z-index: 1050;
}

.group-editor-panel {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.25);
    max-width: 1100px;
    padding: 1rem;
    width: min(1100px, 100%);
}

.group-editor-timeline {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    display: grid;
    gap: 0.4rem;
    max-height: 65vh;
    overflow-y: auto;
    padding: 0.6rem;
}

.timeline-row {
    align-items: flex-start;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    display: grid;
    gap: 0.65rem;
    grid-template-columns: auto 1fr;
    padding: 0.65rem;
}

.timeline-row.current-group {
    border-color: #2563eb;
}

.timeline-row.selected {
    background: #eff6ff;
    border-color: #1d4ed8;
}

.timeline-meta {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    font-size: 0.78rem;
    margin-bottom: 0.25rem;
}

.timeline-body {
    color: #0f172a;
    font-size: 0.92rem;
    white-space: pre-wrap;
}

.voice-recording-panel {
    align-items: center;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: space-between;
    padding: 0.85rem;
}

.voice-waveform {
    align-items: center;
    display: inline-flex;
    gap: 0.22rem;
    height: 2.2rem;
}

.voice-waveform span {
    animation: voice-wave 0.9s ease-in-out infinite;
    background: #2563eb;
    border-radius: 999px;
    display: inline-block;
    height: 0.55rem;
    width: 0.28rem;
}

.voice-waveform span:nth-child(2) {
    animation-delay: 0.1s;
}

.voice-waveform span:nth-child(3) {
    animation-delay: 0.2s;
}

.voice-waveform span:nth-child(4) {
    animation-delay: 0.3s;
}

.voice-waveform span:nth-child(5) {
    animation-delay: 0.4s;
}

.voice-waveform span:nth-child(6) {
    animation-delay: 0.5s;
}

.voice-waveform span:nth-child(7) {
    animation-delay: 0.6s;
}

@keyframes voice-wave {
    0%, 100% {
        height: 0.55rem;
        opacity: 0.55;
    }

    50% {
        height: 2rem;
        opacity: 1;
    }
}

.result-box label {
    color: #64748b;
    display: block;
    font-size: 0.78rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    text-transform: uppercase;
}

.code-block {
    background: #0f172a;
    border-radius: 8px;
    color: #e2e8f0;
    font-size: 0.82rem;
    max-width: 100%;
    overflow-x: auto;
    padding: 0.75rem;
    white-space: pre-wrap;
}

.btn-primary {
    background: #2563eb;
    border-color: #2563eb;
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    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IDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}
