html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

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.1rem;
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) 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;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

/* Author Submission Editor — 3-column layout */
.editor-layout {
    display: grid;
    --editor-viewport-offset: clamp(7.5rem, 10vh, 12rem);
    --outline-width: 320px;
    --sidebar-width: 360px;
    grid-template-columns: var(--outline-width) 4px 1fr 4px var(--sidebar-width);
    gap: 0;
    min-height: calc(100dvh - var(--editor-viewport-offset));
    border: 1px solid var(--bs-border-color);
    border-radius: 6px;
    overflow: hidden;
}

.editor-layout.print-mode {
    grid-template-columns: 1fr;
    min-height: auto;
}

.editor-outline {
    border-right: 1px solid var(--bs-border-color);
    background-color: #ffffff;
    overflow-y: auto;
    max-height: calc(100dvh - var(--editor-viewport-offset));
}

.outline-header {
    border-bottom: 1px solid #e5e7eb;
    background-color: #ffffff;
}

.editor-main {
    padding: 1rem 1.5rem;
    overflow-y: auto;
    max-height: calc(100dvh - var(--editor-viewport-offset));
}

.editor-layout.print-mode .editor-main {
    overflow: visible;
    max-height: none;
}

.print-document-view {
    max-width: 86rem;
    margin: 0 auto;
}

.print-document-header {
    border-bottom: 3px solid #0d6efd;
    padding-bottom: 1rem;
}

.print-document-title {
    font-size: 2.1rem;
    font-weight: 700;
    color: #1f2937;
}

.print-document-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    font-size: 0.95rem;
    color: #6b7280;
}

.print-summary-panel {
    padding: 1.25rem 0 1rem;
    border-bottom: 1px solid #e5e7eb;
}

.print-summary-value {
    font-size: 1rem;
    color: #111827;
}

.print-section-title {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.print-document-view .form-control {
    min-height: 2.75rem;
    background-color: #eef2f7;
    border-color: #d9e0ea;
    color: #1f2937;
    display: flex;
    align-items: center;
}

.print-actions {
    padding-bottom: 1rem;
}

.print-preview-transition-hidden {
    visibility: hidden;
}

@media print {
    .document-header,
    .alert,
    .print-actions {
        display: none !important;
    }

    .editor-layout.print-mode {
        display: block;
        border: none;
    }

    .editor-layout.print-mode .editor-main {
        padding: 0;
    }

    .print-document-view {
        max-width: none;
    }

    .print-document-title {
        font-size: 1.8rem;
    }
}

.editor-sidebar {
    border-left: 1px solid var(--bs-border-color);
    background-color: #fdfdfe;
    overflow-y: auto;
    max-height: calc(100dvh - var(--editor-viewport-offset));
}

@supports not (height: 100dvh) {
    .editor-layout {
        min-height: calc(100vh - var(--editor-viewport-offset));
    }

    .editor-outline,
    .editor-main,
    .editor-sidebar {
        max-height: calc(100vh - var(--editor-viewport-offset));
    }
}

.sidebar-header {
    border-bottom: 1px solid #e5e7eb;
    background-color: #ffffff;
}

/* Editor sections */
.editor-section {
    padding-bottom: 1rem;
    border-bottom: 1px solid #e5e7eb;
    scroll-margin-top: 0.5rem;
}

.editor-section:last-child {
    border-bottom: none;
}

.editor-section.active-section > h2 {
    color: #0d6efd;
}

.section-comment-badges {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.section-comment-bubble {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.5rem;
    height: 1.25rem;
    padding: 0 0.4rem;
    border-radius: 0.55rem;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1;
    color: #fff;
    background-color: #6b7280;
}

.section-comment-bubble::after {
    content: "";
    position: absolute;
    left: 0.3rem;
    bottom: -0.2rem;
    width: 0.35rem;
    height: 0.35rem;
    border-bottom-left-radius: 0.35rem;
    transform: rotate(35deg);
    background: inherit;
}

/* Generated by GitHub Copilot */
.outline-comment-bubble {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.25rem;
    height: 1.1rem;
    padding: 0 0.35rem;
    border-radius: 0.55rem;
    font-size: 0.68rem;
    font-weight: 700;
    line-height: 1;
    color: #fff;
    margin-left: 0.25rem;
}

.outline-comment-bubble-unresolved {
    background-color: #f59f0a;
}

.outline-comment-bubble-resolved {
    background-color: #22c55e;
}

/* Generated by GitHub Copilot */
.field-comment-icon {
    color: #6b7280;
    line-height: 1;
    position: relative;
}
.field-comment-icon:hover {
    color: #374151;
}

.field-comment-create-button {
    color: #64748b;
    line-height: 1;
}

.field-comment-create-button:hover {
    color: #0f766e;
}

/* Generated by GitHub Copilot */
.field-comment-activity-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 0.95rem;
    height: 0.95rem;
    padding: 0 0.25rem;
    border-radius: 0.5rem;
    font-size: 0.6rem;
    font-weight: 700;
    line-height: 1;
    color: #fff;
    margin-left: 0.1rem;
    vertical-align: top;
}

.field-comment-activity-unresolved {
    background-color: #ea580c;
}

.field-comment-activity-resolved {
    background-color: #16a34a;
}

.section-comment-bubble-unresolved {
    background-color: #f59f0a;
}

.section-comment-bubble-resolved {
    background-color: #22c55e;
}

.comment-badge-unresolved {
    background-color: #fff7ed;
    color: #9a3412;
    border: 1px solid #f59f0a;
}

.comment-badge-resolved {
    background-color: #f0fdf4;
    color: #166534;
    border: 1px solid #22c55e;
}

/* Generated by GitHub Copilot */
.comment-section-highlight {
    animation: commentSectionFlash 1.5s ease-in-out forwards;
}

@keyframes commentSectionFlash {
    0% { background-color: transparent; }
    15% { background-color: #dbeafe; }
    50% { background-color: #dbeafe; }
    100% { background-color: transparent; }
}

/* Generated by GitHub Copilot */
@keyframes fieldHighlightFlash {
    0% {
        background-color: transparent;
    }
    20% {
        background-color: #fef08a;
    }
    50% {
        background-color: #fef08a;
    }
    100% {
        background-color: transparent;
    }
}

.field-highlight-flash {
    animation: fieldHighlightFlash 1s ease-in-out forwards;
}

/* Generated by GitHub Copilot */
.btn-link-small {
    font-size: inherit;
    color: #6b7280;
}
.btn-link-small:hover {
    color: #0d6efd;
    text-decoration: underline;
}

/* Outline section group */
.outline-section-group {
    margin: 0;
}

.outline-item {
    cursor: pointer;
    transition: background-color 0.15s;
    display: flex;
    align-items: center;
    padding: 0.6rem 0.75rem;
    margin: 2px 6px;
    border-radius: 8px;
    gap: 0.35rem;
    min-height: 40px;
}

.outline-item:hover {
    background-color: #f0f4ff;
}

.outline-item.active {
    background-color: #dbeafe;
    font-weight: 600;
    color: #2563eb;
}

.outline-item.active .outline-title {
    color: #2563eb;
}

.outline-item.active .outline-chevron {
    color: #2563eb;
}

/* Chevron */
.outline-chevron {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    font-size: 1rem;
    color: #6b7280;
    transition: transform 0.2s ease;
    transform: rotate(0deg);
    flex-shrink: 0;
}

.outline-chevron.expanded {
    transform: rotate(90deg);
}

/* Completion status icons */
.completion-status {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
}

/* Sub-item fields */
.outline-fields {
    padding-left: 1.5rem;
}

.outline-field {
    padding: 0.4rem 0.75rem 0.4rem 1rem;
    margin: 1px 6px 1px 12px;
    font-size: 0.875rem;
    color: #374151;
    border-radius: 6px;
    gap: 0.25rem;
    cursor: pointer;
    transition: background-color 0.15s, color 0.15s;
}

.outline-field:hover {
    background-color: #f0f4ff;
}

.outline-field.active {
    color: #2563eb;
    font-weight: 600;
    background-color: #eff6ff;
}

.outline-field.active .field-title {
    color: #2563eb;
}

/* Generated by GitHub Copilot */
.outline-field-comment-marker {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #f59f0a;
    border: 1px solid #ea580c;
    margin-right: 0.35rem;
    flex-shrink: 0;
}

.field-icon {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
}

.field-title {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.outline-title {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.status-badge {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.avatar-initials {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: #0d6efd;
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    flex-shrink: 0;
}

.comment-card {
    background-color: #f8f9fa;
}

.comment-section-group {
    padding: 0.75rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    background: #ffffff;
}

.comment-section-header {
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #eef2f7;
}

.comment-section-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #1f2937;
}

.comment-section-subtitle {
    font-size: 0.78rem;
    color: #6b7280;
}

.comment-thread {
    border-left-width: 4px !important;
    border-left-style: solid !important;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    border-right: 1px solid rgba(0, 0, 0, 0.06);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.comment-thread-unresolved {
    border-left-color: #f59f0a !important;
    background-color: #fff7ed;
}

.comment-thread-resolved {
    border-left-color: #22c55e !important;
    background-color: #f0fdf4;
}

.comment-thread-unresolved .comment-card,
.comment-thread-resolved .comment-card {
    background-color: rgba(255, 255, 255, 0.85);
}

.mention-highlight {
    border-left-color: #3b82f6 !important;
    background-color: #eff6ff;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.3);
}

.mention-chip {
    color: #1d4ed8;
    background-color: #dbeafe;
    padding: 0.1rem 0.3rem;
    border-radius: 0.25rem;
    font-weight: 600;
}

/* Rich text editor */
.rich-text-editor {
    overflow: hidden;
}

.rich-text-toolbar .btn-sm {
    padding: 0.15rem 0.4rem;
    font-size: 0.8rem;
    line-height: 1.2;
}

.rich-text-select {
    width: auto;
    max-width: 130px;
    font-size: 0.8rem;
}

.rich-text-content {
    min-height: 120px;
    outline: none;
}

.rich-text-content:focus {
    box-shadow: inset 0 0 0 1px #0d6efd;
}

.rich-text-content[contenteditable="false"] {
    background-color: #e9ecef;
    cursor: not-allowed;
}

/* Outline resize handle */
.outline-resize-handle {
    width: 4px;
    cursor: col-resize;
    background-color: transparent;
    transition: background-color 0.15s;
    position: relative;
    z-index: 2;
    flex-shrink: 0;
}

.outline-resize-handle:hover,
.outline-resize-handle.dragging {
    background-color: #0d6efd;
}

/* Sidebar resize handle */
.sidebar-resize-handle {
    width: 4px;
    cursor: col-resize;
    background-color: transparent;
    transition: background-color 0.15s;
    position: relative;
    z-index: 2;
    flex-shrink: 0;
}

.sidebar-resize-handle:hover,
.sidebar-resize-handle.dragging {
    background-color: #0d6efd;
}

/* Collapsed outline sidebar */
.editor-layout.outline-collapsed {
    --outline-width: 60px !important;
}

.editor-layout.sidebar-collapsed {
    --sidebar-width: 60px !important;
}

.editor-outline.collapsed {
    width: 60px;
    min-width: 60px;
    overflow: hidden;
}

.editor-sidebar.collapsed {
    width: 60px;
    min-width: 60px;
    overflow: hidden;
}

/* Comment author truncation */
.comment-author {
    display: block;
    flex: 1 1 auto;
    min-width: 0;
    max-width: none;
    vertical-align: bottom;
    font-size: 0.82rem;
    line-height: 1.15;
    white-space: normal;
    overflow-wrap: anywhere;
}

/* Comment text truncation (3 lines) */
.comment-text {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}