* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

:root {
    /* Academic blue/gray palette */
    --bg: #eef2f7;                 /* blue-gray 50 */
    --panel: #ffffff;
    --panel-2: #f5f7fb;
    --border: rgba(15, 50, 90, 0.18);
    --border-2: rgba(15, 50, 90, 0.10);
    --accent: #1f5fa8;             /* academic blue */
    --accent-2: #2a79c7;
    --text: #0b1a2b;               /* deep navy */
    --muted: rgba(11, 26, 43, 0.68);
    --shadow: 0 18px 48px rgba(12, 30, 55, 0.10);
    --shadow-2: 0 10px 28px rgba(12, 30, 55, 0.08);
    --next-action: #ea580c;
    --next-action-strong: #dc2626;
    --next-action-ring: rgba(220, 38, 38, 0.5);
    --next-action-ring-soft: rgba(220, 38, 38, 0.2);
    --next-action-bg: rgba(220, 38, 38, 0.07);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
}

#app {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Hero Section */
.hero {
    background: radial-gradient(1200px 500px at 50% -120px, rgba(255,255,255,0.25), rgba(255,255,255,0) 60%),
                linear-gradient(135deg, #0b2d4f 0%, #143e6a 45%, #1f5fa8 100%);
    padding: 80px 20px;
    text-align: center;
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-content {
    max-width: 700px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: #ffffff;
    text-shadow: 0 2px 18px rgba(0, 0, 0, 0.18);
}

.hero-subtitle {
    font-size: 1.2rem;
    margin-bottom: 40px;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.8;
}

.email-field {
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--panel);
    color: var(--text);
    font-size: 1rem;
    transition: all 0.3s ease;
    width: 100%;
}

.email-field:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(0, 229, 255, 0.15);
    background: rgba(0, 229, 255, 0.06);
}

.captcha-container {
    display: flex;
    justify-content: center;
    margin: 10px 0;
}

.anti-abuse-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 46px;
    padding: 10px 12px;
    border: 1px solid var(--border-2);
    border-radius: 10px;
    background: var(--panel-2);
    color: var(--muted);
    font-weight: 600;
}

.anti-abuse-status.is-working {
    color: var(--text);
}

.hp {
    position: absolute;
    left: -10000px;
    top: -10000px;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.hero-hint {
    color: var(--muted);
    font-size: 0.95rem;
}

.submit-button {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    background: #00e5ff;
    color: #121212;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.submit-button:hover:not(:disabled) {
    background: #00d4e8;
    box-shadow: 0 0 20px rgba(0, 229, 255, 0.5);
}

.submit-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Features Section */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    padding: 80px 20px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.feature-card {
    background: var(--panel);
    border: 1px solid var(--border-2);
    border-radius: 8px;
    padding: 30px;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-2);
}

.feature-card:hover {
    border-color: #00e5ff;
    box-shadow: 0 0 20px rgba(0, 229, 255, 0.2);
}

.feature-card h3 {
    color: var(--accent);
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.feature-card p {
    color: var(--muted);
    line-height: 1.8;
}

/* Tool Section */
.tool {
    padding: 60px clamp(16px, 3vw, 36px);
    max-width: min(1760px, 100%);
    margin: 0 auto;
    width: 100%;
}

.tool h2 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 2rem;
    color: var(--text);
}

.tool-wrapper {
    position: relative;
}

.tool-flow-panel {
    padding: 22px 22px 26px;
}

.flow-step {
    position: relative;
    padding-bottom: 4px;
}

.flow-step + .flow-step {
    margin-top: 22px;
    padding-top: 22px;
    border-top: 1px solid var(--border-2);
}

.flow-step-head {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 14px;
}

.flow-step-head--compact {
    margin-bottom: 12px;
}

.flow-badge {
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    border-radius: 11px;
    background: rgba(31, 95, 168, 0.12);
    border: 1px solid rgba(31, 95, 168, 0.22);
    color: var(--accent);
    font-weight: 800;
    font-size: 1rem;
    display: grid;
    place-items: center;
    line-height: 1;
}

.flow-step-titles {
    flex: 1;
    min-width: 0;
}

.flow-step-titles .panel-title {
    margin-bottom: 8px;
}

.action-guideline {
    margin: 0;
    font-size: 0.92rem;
    color: var(--muted);
    line-height: 1.55;
}

.action-guideline a {
    color: var(--accent-2);
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.action-guideline a:hover {
    color: var(--accent);
}

.ref-source-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0 0 16px;
    padding: 6px;
    border: 1px solid var(--border-2);
    border-radius: 12px;
    background: var(--panel-2);
}

.ref-source-tab {
    padding: 8px 14px 10px;
    border: none;
    border-bottom: 3px solid rgba(15, 45, 82, 0.14);
    border-radius: 8px 8px 0 0;
    background: transparent;
    font: inherit;
    font-size: 0.92rem;
    cursor: pointer;
    color: var(--muted);
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.ref-source-tab:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.55);
    border-bottom-color: rgba(15, 45, 82, 0.28);
}

.ref-source-tab.is-active {
    color: var(--accent);
    font-weight: 700;
    background: var(--panel);
    border-bottom: 3px solid var(--accent);
    box-shadow: var(--shadow-2);
}

.ref-source-panel {
    padding-top: 2px;
}

.ref-source-panel[hidden] {
    display: none !important;
}

.ref-panel-intro {
    margin-bottom: 14px;
}

.url-fetch-box {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.url-fetch-label {
    font-weight: 700;
    font-size: 0.92rem;
}

.url-fetch-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: stretch;
}

.url-fetch-input {
    flex: 1 1 280px;
    min-width: 0;
}

.url-fetch-status {
    margin: 0;
    font-size: 0.88rem;
}

.flow-step--next {
    margin-left: -8px;
    margin-right: -8px;
    padding: 18px 18px 20px;
    border: 2px solid var(--accent);
    border-radius: 14px;
    background: linear-gradient(165deg, #ffffff 0%, #f3f7fc 100%);
    box-shadow: 0 0 0 4px rgba(31, 95, 168, 0.1), var(--shadow-2);
}

/* Step 1: highlight the control only (red ring), not the whole panel in blue */
#flow-step-input.flow-step--next.flow-step--inner-target {
    margin-left: 0;
    margin-right: 0;
    padding-bottom: 4px;
    border: none;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.flow-step--next + .flow-step {
    border-top-color: transparent;
}

.flow-step--next .flow-badge {
    background: linear-gradient(180deg, var(--accent-2), var(--accent));
    color: #ffffff;
    border-color: transparent;
    box-shadow: 0 6px 16px rgba(31, 95, 168, 0.25);
}

.upload-box--flush {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

.action-bullets {
    margin: 12px 0 0;
    padding-left: 1.25rem;
    color: var(--muted);
    font-size: 0.88rem;
    line-height: 1.5;
}

.action-bullets li {
    margin: 5px 0;
}

.next-step-label {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--accent);
    margin: 0 0 12px;
    min-height: 1.45em;
}

.next-step-label.is-ready {
    color: #0f6b45;
}

.secondary-button--wide {
    width: 100%;
    max-width: 400px;
}

/* Next-action highlight — warm orange/red so the target control stands out */

.secondary-button.is-next-action:not(:disabled),
#extract-btn.is-next-action:not(:disabled),
#url-extract-btn.is-next-action:not(:disabled) {
    border: 3px solid var(--next-action-strong) !important;
    box-shadow: 0 0 0 3px var(--next-action-ring);
    animation: next-action-ring 2.2s ease-in-out infinite;
}

.flow-action-hint {
    margin: 0 0 12px;
    padding: 10px 12px;
    border-left: 3px solid var(--next-action-strong);
    border-radius: 0 8px 8px 0;
    background: var(--next-action-bg);
    color: #9a3412;
    font-size: 0.92rem;
    font-weight: 600;
    line-height: 1.45;
}

.file-pill.is-next-action {
    border: 3px solid var(--next-action-strong) !important;
    box-shadow: 0 0 0 3px var(--next-action-ring);
    animation: next-action-ring 2.2s ease-in-out infinite;
}

.email-field.is-next-action,
.url-fetch-input.is-next-action {
    box-shadow: 0 0 0 3px var(--next-action-ring);
    border-color: var(--next-action-strong);
}

@keyframes next-action-ring {
    0%,
    100% {
        box-shadow: 0 0 0 3px var(--next-action-ring);
    }
    50% {
        box-shadow: 0 0 0 6px var(--next-action-ring-soft);
    }
}

.references-textarea.is-next-action {
    box-shadow: 0 0 0 3px var(--next-action-ring);
    border-color: var(--next-action-strong);
    animation: next-action-ring 2.2s ease-in-out infinite;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@keyframes flow-cta-pulse {
    0%,
    100% {
        box-shadow: 0 0 0 3px var(--next-action-ring), 0 12px 28px rgba(232, 89, 12, 0.22);
    }
    50% {
        box-shadow: 0 0 0 6px var(--next-action-ring-soft), 0 16px 32px rgba(232, 89, 12, 0.28);
    }
}

.live-next-coach {
    display: none !important;
}

.live-next-coach-kicker {
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    opacity: 0.85;
    margin-bottom: 4px;
}

.live-next-coach-text {
    display: block;
    font-weight: 600;
}

.live-next-coach-pointer {
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 14px;
    line-height: 1;
    color: #0f2d52;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.2);
}

.validate-button.is-next-action:not(:disabled) {
    box-shadow: 0 0 0 3px var(--next-action-ring);
    border: 2px solid var(--next-action-strong);
    animation: flow-cta-pulse 2.4s ease-in-out infinite;
}

.doi-save-tick.is-next-action:not(:disabled) {
    border-color: var(--next-action-strong) !important;
    box-shadow: 0 0 0 3px var(--next-action-ring);
    animation: next-action-ring 2.2s ease-in-out infinite;
}

.flow-step-validate .validate-button {
    margin-top: 0;
    max-width: 420px;
}

@media (max-width: 640px) {
    .flow-step-head {
        flex-direction: column;
        gap: 10px;
    }

    .tool-flow-panel {
        padding: 16px 14px 20px;
    }
}

.tool h2 {
    letter-spacing: -0.02em;
}

.panel-title {
    letter-spacing: -0.01em;
}

.references-textarea {
    line-height: 1.5;
}

.reference-counter {
    display: flex;
    justify-content: flex-end;
}

.anti-abuse-status {
    font-weight: 700;
}

.panel {
    background: var(--panel);
    border: 1px solid var(--border-2);
    border-radius: 12px;
    padding: 18px;
    box-shadow: var(--shadow);
}

.upload-box {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border-2);
}

.file-pill {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-2);
    border-radius: 12px;
    background: var(--panel);
    box-shadow: var(--shadow-2);
    cursor: pointer;
    user-select: none;
}

.file-input {
    position: absolute;
    left: -10000px;
    top: -10000px;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.file-btn {
    flex: 0 0 auto;
    padding: 8px 10px;
    border-radius: 10px;
    background: rgba(31, 95, 168, 0.10);
    border: 1px solid rgba(31, 95, 168, 0.22);
    color: var(--text);
    font-weight: 700;
    font-size: 0.95rem;
}

.file-name {
    flex: 1 1 auto;
    min-width: 0;
    color: var(--muted);
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.panel-title {
    margin-bottom: 12px;
    font-size: 1.05rem;
    color: var(--text);
}

.label {
    display: block;
    margin: 6px 0 8px;
    color: var(--muted);
    font-size: 0.95rem;
}

.hint {
    margin-top: 8px;
    color: var(--muted);
    font-size: 0.92rem;
}

.segmented {
    display: inline-flex;
    border: 1px solid var(--border-2);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 12px;
    background: rgba(255, 255, 255, 0.03);
}

.segmented-btn {
    border: none;
    background: transparent;
    color: var(--muted);
    padding: 10px 12px;
    cursor: pointer;
    font-weight: 600;
}

.segmented-btn.is-active {
    color: #ffffff;
    background: var(--accent);
}

.pane {
    display: none;
}

.pane.is-active {
    display: block;
}

.upload-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.review-box {
    margin-top: 14px;
    padding: 14px;
    border: 1px solid var(--border-2);
    border-radius: 12px;
    background: linear-gradient(180deg, #fbfdff 0%, #f4f8fd 100%);
}

.flow-step.review-box {
    margin-top: 0;
}

.flow-action-hint--warn {
    border-left-color: #b91c1c;
    background: rgba(220, 38, 38, 0.1);
    color: #991b1b;
}

.paste-fallback-notice {
    margin: 0 0 12px;
    padding: 12px 14px;
    border: 1px solid rgba(220, 38, 38, 0.35);
    border-left: 4px solid #dc2626;
    border-radius: 0 10px 10px 0;
    background: rgba(220, 38, 38, 0.08);
    color: #991b1b;
    font-size: 0.92rem;
    font-weight: 600;
    line-height: 1.5;
}

.review-status--warn {
    color: #991b1b;
    font-weight: 600;
}

.review-status {
    margin-top: 10px;
    font-size: 0.9rem;
}

.review-card {
    margin-top: 10px;
    padding: 12px;
    border: 1px solid var(--border-2);
    border-radius: 12px;
    background: var(--panel-2);
}

.review-label {
    margin-bottom: 6px;
    color: var(--muted);
    font-size: 0.85rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.review-text {
    color: var(--text);
    white-space: pre-wrap;
    word-break: break-word;
}

.review-doi {
    color: var(--accent-2);
    font-weight: 800;
    word-break: break-word;
}

.status-note {
    margin-top: 6px;
    color: #9a6700;
    font-size: 0.82rem;
    font-weight: 700;
}

.doi-note {
    margin-top: 6px;
    display: inline-block;
    padding: 3px 8px;
    border-radius: 999px;
    background: #fff1d6;
    color: #8a5a00;
    font-size: 0.78rem;
    font-weight: 800;
    border: 1px solid rgba(138, 90, 0, 0.25);
    cursor: pointer;
    font-family: inherit;
    line-height: 1.35;
    text-decoration: underline;
    text-underline-offset: 2px;
}

button.doi-note:hover,
button.doi-note:focus-visible {
    background: #ffe8b8;
    color: #6b4500;
    outline: 2px solid rgba(138, 90, 0, 0.35);
    outline-offset: 2px;
}

.status-note-link {
    padding: 0;
    border: none;
    background: none;
    color: inherit;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.status-note-link:hover,
.status-note-link:focus-visible {
    color: #7c4a00;
    outline: 2px solid rgba(154, 103, 0, 0.35);
    outline-offset: 2px;
}

.status-note-label {
    font-weight: 700;
    text-decoration: none;
    cursor: default;
}

.verify-instruction {
    margin-top: 4px;
    font-size: 0.78rem;
    font-weight: 400;
    color: #6b7280;
    line-height: 1.4;
}

/* UNCERTAIN row DOI cell */
.doi-cell--unverified {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.doi-hidden-notice {
    font-size: 0.78rem;
    color: #6b7280;
    font-style: italic;
}

.doi-open-link {
    font-size: 0.82rem;
    color: #2563eb;
    text-decoration: underline;
    text-underline-offset: 2px;
    white-space: nowrap;
}

.doi-open-link:hover {
    color: #1d4ed8;
}

/* Inline paste flow for UNCERTAIN rows */
.verify-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.btn-open-article,
.btn-found-it,
.btn-confirm-doi,
.btn-cancel-paste {
    font-size: 0.78rem;
    padding: 3px 8px;
    border-radius: 5px;
    border: 1px solid #d1d5db;
    background: #f9fafb;
    color: #374151;
    cursor: pointer;
    font-family: inherit;
    line-height: 1.4;
    white-space: nowrap;
}

.btn-open-article:hover,
.btn-found-it:hover {
    background: #e5e7eb;
    border-color: #9ca3af;
}

.btn-confirm-doi {
    background: #dcfce7;
    border-color: #86efac;
    color: #166534;
}

.btn-confirm-doi:hover:not(:disabled) {
    background: #bbf7d0;
    border-color: #4ade80;
}

.btn-confirm-doi:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-cancel-paste {
    color: #6b7280;
}

.btn-cancel-paste:hover {
    background: #fee2e2;
    border-color: #fca5a5;
    color: #991b1b;
}

.doi-paste-wrap {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 4px;
}

.doi-paste-input {
    width: 100%;
    max-width: 260px;
    padding: 4px 8px;
    border: 1px solid #d1d5db;
    border-radius: 5px;
    font-size: 0.82rem;
    font-family: monospace;
    background: #fff;
    color: #111827;
    outline: none;
}

.doi-paste-input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59,130,246,0.15);
}

.doi-paste-row {
    display: flex;
    gap: 4px;
}

.doi-paste-error {
    font-size: 0.78rem;
    color: #dc2626;
    margin: 0;
    line-height: 1.4;
}

/* Inline DOI verification cell (UNCERTAIN rows) */
.doi-unverified-cell {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.doi-open-source-link {
    font-size: 0.82rem;
    color: #2563eb;
    text-decoration: underline;
    text-underline-offset: 2px;
    white-space: nowrap;
}

.doi-open-source-link:hover {
    color: #1d4ed8;
}

.doi-save-tick {
    flex-shrink: 0;
    min-width: 28px;
    height: 28px;
    background: #dcfce7;
    border: 1px solid #86efac;
    border-radius: 5px;
    color: #166534;
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
    font-family: inherit;
    padding: 0 6px;
}

.doi-save-tick:hover:not(:disabled) {
    background: #bbf7d0;
    border-color: #4ade80;
}

.doi-save-tick:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.doi-not-shown-hint {
    font-size: 0.75rem;
    color: #9ca3af;
    margin: 0;
    font-style: italic;
}

/* Export uncertain warning banner */
.export-uncertain-warning {
    margin: 6px 0 0;
    padding: 8px 12px;
    background: #fef3c7;
    border: 1px solid #fbbf24;
    border-radius: 6px;
    font-size: 0.82rem;
    color: #92400e;
    line-height: 1.5;
}

/* Author-confirmed badge */
.status-badge--confirmed {
    display: inline-block;
    margin-left: 6px;
    padding: 1px 7px;
    border-radius: 999px;
    background: #dcfce7;
    color: #166534;
    font-size: 0.74rem;
    font-weight: 700;
    border: 1px solid #86efac;
    vertical-align: middle;
}

.results-table tbody tr.is-doi-review-active td {
    background: #fff7e6;
}

.results-table tbody tr.is-doi-review-active:hover td {
    background: #fff1d6;
}

.results-table tbody tr.is-doi-review-active.results-row:hover td {
    background: #ffedd0;
}

.results-table tbody tr.is-doi-review-active.results-row.is-row-expanded:hover td {
    background: #fff3e0;
}

.doi-verify-fullpage {
    position: fixed;
    inset: 0;
    z-index: 1250;
    display: none;
    flex-direction: column;
    background: var(--bg);
}

body.doi-verify-open,
body.crossref-link-open {
    overflow: hidden;
}

.doi-verify-topbar {
    flex-shrink: 0;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    padding: 10px 16px;
    border-bottom: 1px solid var(--border-2);
    background: #fff;
    box-shadow: var(--shadow-2);
    max-height: min(32vh, 220px);
    overflow-y: auto;
}

.doi-verify-topbar-main {
    flex: 1;
    min-width: 0;
}

.doi-verify-topbar-title {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.doi-verify-topbar-title h3 {
    margin: 0;
    font-size: 1.05rem;
    color: var(--text);
}

.doi-verify-topbar-hint {
    margin: 4px 0 8px;
    font-size: 0.88rem;
}

.doi-verify-topbar-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    flex-shrink: 0;
}

.doi-verify-ref-strip {
    padding: 8px 10px;
    border-radius: 8px;
    background: var(--panel-2);
    border: 1px solid var(--border-2);
}

.doi-verify-ref-label {
    display: block;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 4px;
}

.doi-verify-meta-strip {
    margin-top: 8px;
    padding: 8px 10px;
    border-radius: 8px;
    background: rgba(31, 95, 168, 0.06);
    border: 1px solid rgba(31, 95, 168, 0.14);
    font-size: 0.88rem;
    line-height: 1.45;
    max-height: 72px;
    overflow-y: auto;
}

.doi-verify-meta-strip .doi-preview-meta-title {
    font-size: 0.92rem;
    margin-bottom: 2px;
}

.doi-verify-stage {
    flex: 1;
    min-height: 0;
    display: flex;
    background: #fff;
}

.doi-verify-frame {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
    background: #fff;
}

.doi-verify-foot--fixed {
    flex-shrink: 0;
    margin-top: 0;
    padding: 10px 16px 14px;
    border-top: 1px solid var(--border-2);
    background: #fff;
    box-shadow: 0 -4px 20px rgba(12, 30, 55, 0.08);
}

.doi-verify-foot--fixed .doi-verify-question {
    margin: 0;
    font-size: 0.95rem;
    white-space: nowrap;
}

.doi-verify-foot--fixed .doi-verify-actions {
    align-items: center;
}

.doi-verify-foot--fixed .doi-verify-nav {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.doi-verify-panel {
    margin-top: 18px;
    padding: 16px 18px;
    border: 1px solid rgba(31, 95, 168, 0.22);
    border-radius: 14px;
    background: linear-gradient(180deg, #fbfdff 0%, #f7faff 100%);
    box-shadow: var(--shadow-2);
}

.doi-verify-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 14px;
}

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

.doi-verify-head h3 {
    margin: 0;
    color: var(--text);
    font-size: 1.1rem;
}

.doi-verify-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(31, 95, 168, 0.12);
    color: var(--accent);
    font-size: 0.82rem;
    font-weight: 800;
    white-space: nowrap;
}

.doi-verify-compare {
    display: grid;
    gap: 12px;
}

@media (min-width: 820px) {
    .doi-verify-compare {
        grid-template-columns: 1fr 1fr;
        align-items: start;
    }
}

.doi-verify-col {
    border: 1px solid var(--border-2);
    border-radius: 12px;
    background: #fff;
    padding: 12px 14px;
    min-height: 120px;
}

.doi-verify-col-title {
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 8px;
}

.doi-verify-ref-text {
    font-size: 0.95rem;
    line-height: 1.55;
    color: var(--text);
    white-space: pre-wrap;
    word-break: break-word;
}

.doi-verify-doi-line {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.doi-verify-doi {
    font-size: 0.88rem;
    padding: 4px 8px;
    border-radius: 6px;
    background: rgba(31, 95, 168, 0.08);
    color: var(--accent);
    word-break: break-all;
}

.doi-verify-foot {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--border-2);
}

.doi-verify-question {
    margin: 0 0 12px;
    font-size: 1rem;
    font-weight: 800;
    color: var(--text);
}

.doi-verify-helper {
    margin: -6px 0 12px;
    font-size: 0.9rem;
}

.doi-verify-feedback {
    margin: 0 0 12px;
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid rgba(15, 107, 69, 0.28);
    background: rgba(15, 107, 69, 0.08);
    color: #0f6b45;
    font-size: 0.88rem;
    font-weight: 700;
}

.doi-verify-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.doi-verify-nav {
    border: none;
    background: transparent;
    padding: 0;
}

.doi-verify-decide {
    margin-left: auto;
}

.doi-lab {
    margin-top: 18px;
    padding: 16px 18px;
    border: 1px solid var(--border-2);
    border-radius: 14px;
    background: linear-gradient(180deg, #fbfdff 0%, #f7faff 100%);
    box-shadow: var(--shadow-2);
}

.doi-lab-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 14px;
}

.doi-lab-head h3 {
    margin: 0 0 4px;
    color: var(--text);
    font-size: 1.1rem;
}

.doi-lab-body {
    display: grid;
    gap: 14px;
}

.doi-lab-reference-panel {
    padding: 12px 14px;
}

.doi-lab-preview-panel {
    margin-top: 14px;
    border: 1px solid var(--border-2);
    border-radius: 12px;
    background: #fff;
    padding: 12px 14px;
}

.doi-lab-publisher-link {
    display: inline-block;
    margin-top: 8px;
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--accent);
    text-decoration: none;
}

.doi-lab-publisher-link:hover {
    text-decoration: underline;
}

.doi-lab-foot {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid var(--border-2);
    display: grid;
    gap: 12px;
}

.doi-lab-foot[hidden],
.doi-verify-foot[hidden] {
    display: none !important;
}

.doi-review-section {
    margin-top: 18px;
    padding: 16px;
    border: 1px solid var(--border-2);
    border-radius: 14px;
    background: linear-gradient(180deg, #fbfdff 0%, #f7faff 100%);
    box-shadow: var(--shadow-2);
}

.doi-review-header h3 {
    margin-bottom: 4px;
    color: var(--text);
    font-size: 1.05rem;
}

.doi-review-list {
    display: grid;
    gap: 12px;
    margin-top: 12px;
}

.doi-review-card {
    border: 1px solid var(--border-2);
    border-radius: 14px;
    background: var(--panel);
    padding: 14px;
}

.doi-review-card.is-active {
    outline: 2px solid rgba(31, 95, 168, 0.22);
    background: #fffdf3;
}

.doi-review-card-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.doi-review-card-title {
    font-size: 1rem;
    font-weight: 900;
    color: var(--text);
}

.doi-review-card-subtitle {
    margin-top: 2px;
    color: var(--muted);
    font-size: 0.9rem;
}

.doi-review-chip {
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(31, 95, 168, 0.10);
    color: var(--accent);
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
}

.doi-review-card-body {
    display: grid;
    gap: 8px;
    margin-top: 12px;
}

.doi-review-card-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.secondary-button {
    padding: 10px 14px;
    border: 1px solid rgba(31, 95, 168, 0.28);
    border-radius: 6px;
    background: rgba(31, 95, 168, 0.08);
    color: var(--text);
    cursor: pointer;
    transition: all 0.2s ease;
}

.secondary-button:hover:not(:disabled) {
    background: rgba(31, 95, 168, 0.14);
    border-color: rgba(31, 95, 168, 0.45);
}

.secondary-button:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.bulk-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 14px 0 14px;
    padding: 12px 12px;
    border: 1px solid var(--border-2);
    border-radius: 12px;
    background: var(--panel);
    box-shadow: var(--shadow-2);
}

.bulk-bar--bottom {
    position: sticky;
    bottom: 12px;
}

.bulk-bar .bulk-primary {
    padding: 10px 14px;
    font-size: 0.92rem;
    white-space: nowrap;
}

.cite-output--list {
    min-height: min(58vh, 520px);
    white-space: pre-wrap;
    word-break: break-word;
    overflow-wrap: anywhere;
}

.formatted-list-meta {
    margin: 0 0 10px;
    font-size: 0.9rem;
}

.formatted-list-doi-review {
    margin: 0 0 12px;
    padding: 12px 14px;
    border: 1px solid rgba(217, 119, 6, 0.4);
    border-left: 4px solid #d97706;
    border-radius: 0 10px 10px 0;
    background: rgba(217, 119, 6, 0.1);
}

.formatted-list-doi-review--pending {
    border-left-color: #dc2626;
    border-color: rgba(220, 38, 38, 0.35);
    background: rgba(220, 38, 38, 0.08);
}

.formatted-list-doi-review-text {
    margin: 0;
    color: #92400e;
    font-size: 0.92rem;
    font-weight: 600;
    line-height: 1.5;
}

.formatted-list-doi-review--pending .formatted-list-doi-review-text {
    color: #991b1b;
}

.formatted-list-doi-review-action {
    margin-top: 10px;
    padding: 8px 12px;
    border: 1px solid rgba(217, 119, 6, 0.45);
    border-radius: 8px;
    background: #fff;
    color: #92400e;
    font-size: 0.88rem;
    font-weight: 800;
    cursor: pointer;
    font-family: inherit;
}

.formatted-list-doi-review--pending .formatted-list-doi-review-action {
    border-color: rgba(220, 38, 38, 0.45);
    color: #991b1b;
}

.formatted-list-doi-review-action:hover,
.formatted-list-doi-review-action:focus-visible {
    background: #fff7ed;
    outline: 2px solid rgba(217, 119, 6, 0.35);
    outline-offset: 2px;
}

.formatted-list-doi-review--pending .formatted-list-doi-review-action:hover,
.formatted-list-doi-review--pending .formatted-list-doi-review-action:focus-visible {
    background: #fef2f2;
    outline-color: rgba(220, 38, 38, 0.35);
}

.formatted-list-alert {
    margin: 0 0 12px;
    padding: 12px 14px;
    border: 1px solid rgba(220, 38, 38, 0.35);
    border-left: 4px solid #dc2626;
    border-radius: 0 10px 10px 0;
    background: rgba(220, 38, 38, 0.08);
    color: #991b1b;
    font-size: 0.92rem;
    font-weight: 600;
    line-height: 1.5;
}

.formatted-list-alert--partial {
    border-left-color: #d97706;
    border-color: rgba(217, 119, 6, 0.35);
    background: rgba(217, 119, 6, 0.08);
    color: #92400e;
}

.modal-card--wide {
    width: min(920px, calc(100vw - 32px));
}

.results-table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 30px;
    border-radius: 14px;
    border: 1px solid var(--border-2);
    box-shadow: var(--shadow-2);
    background: var(--panel);
}

.results-table-hint {
    font-size: 0.88rem;
    margin: -12px 0 14px;
}

.results-toolbar {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0 0 16px;
    padding: 12px 14px;
    border: 1px solid var(--border-2);
    border-radius: 12px;
    background: var(--panel-2);
}

.results-toolbar-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

.crossref-link-layer-badge {
    background: rgba(31, 95, 168, 0.12);
    color: var(--primary);
    border: 1px solid rgba(31, 95, 168, 0.22);
}

.crossref-link-fullpage {
    z-index: 1240;
}

.crossref-link-foot-actions {
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 12px;
}

button.search-link {
    background: none;
    border: none;
    padding: 0;
    font: inherit;
    color: var(--primary);
    text-decoration: underline;
    cursor: pointer;
}

button.search-link:hover {
    color: var(--primary-dark, #174a82);
}

.check--filter {
    font-size: 0.92rem;
}

.results-hidden-count {
    margin: 0;
    font-size: 0.86rem;
    line-height: 1.45;
}

.results-table {
    width: 100%;
    min-width: 960px;
    border-collapse: separate;
    border-spacing: 0;
    background: var(--panel);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: none;
    table-layout: fixed;
    font-size: 0.95rem;
}

.results-table thead {
    position: sticky;
    top: 0;
    z-index: 1;
}

.results-table th {
    padding: 11px 10px;
    text-align: left;
    color: var(--accent);
    font-weight: 800;
    font-size: 0.88rem;
    background: linear-gradient(180deg, #f9fbff 0%, #eef4fb 100%);
    border-bottom: 1px solid var(--border-2);
}

.results-table td {
    padding: 11px 10px;
    vertical-align: top;
    color: var(--text);
    border-bottom: 1px solid rgba(15, 50, 90, 0.08);
    background: var(--panel);
    word-break: break-word;
    overflow-wrap: anywhere;
    line-height: 1.45;
}

.results-table tbody tr:nth-child(even) td {
    background: #f8fbff;
}

.results-table tbody tr.results-row {
    cursor: pointer;
}

.results-table tbody tr.results-row td.col-checkbox {
    cursor: default;
}

.results-table tbody tr.results-row:hover td {
    background: #eef5ff;
}

.results-table tbody tr.results-row.is-row-expanded {
    cursor: default;
}

.results-table tbody tr.results-row.is-row-expanded:hover td {
    background: #f0f6ff;
}

.results-table .col-reference .ref-text-wrap {
    white-space: normal;
    word-break: break-word;
    overflow-wrap: anywhere;
    line-height: 1.45;
    overflow: hidden;
    max-height: 1.5cm;
    transition: max-height 0.2s ease;
}

.results-table tbody tr.results-row.is-row-expanded .col-reference .ref-text-wrap {
    max-height: none;
    overflow: visible;
}

.results-table .col-source {
    min-width: 8.5rem;
    white-space: normal;
}

.crossref-integration-notice {
    margin: 0 0 1rem;
    padding: 0.85rem 1rem;
    border: 1px solid rgba(59, 130, 246, 0.35);
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.08), rgba(15, 23, 42, 0.04));
}

.crossref-integration-notice--compact {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    padding: 0.65rem 0.85rem;
    margin-bottom: 0.75rem;
}

.crossref-integration-notice__head {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.35rem;
}

.crossref-integration-notice__badge {
    display: inline-flex;
    align-items: center;
    padding: 0.12rem 0.45rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: #1d4ed8;
    background: rgba(59, 130, 246, 0.15);
    border: 1px solid rgba(59, 130, 246, 0.35);
    flex: 0 0 auto;
}

.crossref-integration-notice__body {
    margin: 0;
    font-size: 0.92rem;
    line-height: 1.45;
}

.crossref-integration-notice__foot {
    margin: 0.45rem 0 0;
    font-size: 0.82rem;
}

.crossref-integration-notice__inline {
    font-size: 0.88rem;
    line-height: 1.4;
}

.source-meta-hint {
    margin-top: 0.25rem;
    font-size: 0.78rem;
    line-height: 1.35;
    color: var(--muted, #64748b);
}

/* Link column: plain links; LTR + nowrap so Arabic rows never force letter-stacking in this cell. */
.results-table td.col-links {
    direction: ltr;
    text-align: left;
    word-break: normal !important;
    overflow-wrap: normal !important;
    hyphens: manual;
    min-width: 200px;
    vertical-align: top;
}

.results-table td.col-links .search-links {
    display: flex;
    flex-flow: row wrap;
    align-items: center;
    justify-content: flex-start;
    gap: 8px 12px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.results-table td.col-links .search-links li {
    flex: 0 0 auto;
    margin: 0;
    padding: 0;
    list-style: none;
    max-width: 100%;
}

.results-table td.col-links a {
    white-space: nowrap !important;
    word-break: normal !important;
    overflow-wrap: normal !important;
    writing-mode: horizontal-tb !important;
}

.results-table td.col-links a.search-link {
    display: inline-block;
    width: max-content;
    max-width: 100%;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--accent-2);
    text-decoration: underline;
    text-underline-offset: 2px;
    line-height: 1.45;
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    cursor: pointer;
}

.results-table td.col-links a.search-link:hover {
    color: var(--accent);
}

.results-table td.col-links a.link-open {
    display: inline-block;
    width: max-content;
    max-width: 100%;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--accent-2);
    text-decoration: underline;
    text-underline-offset: 2px;
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

.results-table td.col-links a.link-open:hover {
    color: var(--accent);
}

/* Legacy/cached markup: <a class="mini-btn"> search links — force horizontal text, not pill squeeze */
.results-table td.col-links a.mini-btn {
    display: inline-block !important;
    width: max-content !important;
    max-width: 100%;
    white-space: nowrap !important;
    word-break: normal !important;
    overflow-wrap: normal !important;
    padding: 0 !important;
    border: none !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    font-weight: 600;
    text-decoration: underline;
    color: var(--accent-2);
}

.results-table td.col-links .row-actions {
    display: flex;
    flex-flow: row wrap;
    gap: 8px 12px;
    align-items: center;
    justify-content: flex-start;
}

.results-table .col-actions .row-actions {
    justify-content: flex-end;
    flex-wrap: wrap;
}

.results-table tbody tr:last-child td {
    border-bottom: none;
}

.results-table .col-select {
    width: 42px;
}

.results-table th:nth-child(2),
.results-table td:nth-child(2) {
    width: 40%;
}

.results-table th:nth-child(3),
.results-table td:nth-child(3) {
    width: 16%;
}

.results-table th:nth-child(4),
.results-table td:nth-child(4) {
    width: 11%;
}

.results-table th:nth-child(5),
.results-table td:nth-child(5) {
    width: 13%;
}

.results-table th:nth-child(6),
.results-table td:nth-child(6) {
    width: 12%;
}

.results-table th:nth-child(7),
.results-table td:nth-child(7) {
    width: 8%;
}

.bulk-left,
.bulk-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text);
    font-weight: 700;
}

.muted {
    color: var(--muted);
}

.select {
    padding: 10px 12px;
    border: 1px solid var(--border-2);
    border-radius: 10px;
    background: var(--panel);
    color: var(--text);
    font-weight: 700;
}

.col-select {
    width: 44px;
}

.col-cite {
    width: 86px;
}

.row-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: flex-end;
}

.mini-btn {
    padding: 5px 9px;
    border: 1px solid rgba(31, 95, 168, 0.28);
    border-radius: 10px;
    background: rgba(31, 95, 168, 0.08);
    color: var(--text);
    font-weight: 700;
    font-size: 0.88rem;
    cursor: pointer;
}

.mini-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.modal {
    position: fixed;
    inset: 0;
    z-index: 1400;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(11, 26, 43, 0.35);
}

.modal-card {
    position: relative;
    max-width: 920px;
    width: calc(100% - 28px);
    margin: 60px auto;
    background: var(--panel);
    border: 1px solid var(--border-2);
    border-radius: 16px;
    box-shadow: var(--shadow);
    padding: 14px;
    z-index: 1401;
}

.modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.modal-title {
    font-size: 1.15rem;
    font-weight: 900;
    color: var(--text);
}

.icon-btn {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    border: 1px solid var(--border-2);
    background: var(--panel-2);
    cursor: pointer;
    font-size: 22px;
    line-height: 1;
    font-weight: 900;
    color: var(--text);
}

.icon-btn:disabled {
    opacity: 0.38;
    cursor: not-allowed;
}

.doi-review-foot-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 14px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border-2);
}

.doi-review-step-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 10px;
    border: 1px solid rgba(31, 95, 168, 0.35);
    background: rgba(31, 95, 168, 0.08);
    color: var(--accent);
    font-weight: 800;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.doi-review-step-btn:hover:not(:disabled) {
    background: rgba(31, 95, 168, 0.14);
    border-color: rgba(31, 95, 168, 0.55);
}

.doi-review-step-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.doi-review-chevron {
    flex-shrink: 0;
    display: block;
}

.doi-review-position {
    font-size: 0.88rem;
    font-weight: 800;
    color: var(--muted);
    min-width: 6.5rem;
    text-align: center;
}

.modal-foot--doi-review {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
}

.doi-review-foot-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.doi-review-foot-actions .row-actions {
    margin-left: auto;
}

.modal-card--doi-review {
    max-height: calc(100vh - 40px);
    overflow-y: auto;
}

.doi-review-inline-preview {
    margin: 12px 0 4px;
}

.doi-preview-frame-wrap--inline {
    min-height: 280px;
}

.doi-preview-frame--inline {
    height: min(52vh, 480px);
}

.modal-card--doi-review:focus {
    outline: none;
}

.modal-card--doi-review:focus-visible {
    outline: 2px solid rgba(31, 95, 168, 0.45);
    outline-offset: 2px;
}

.doi-preview-modal {
    z-index: 1100;
}

.modal-card--doi-preview {
    max-width: min(960px, calc(100vw - 24px));
    max-height: calc(100vh - 48px);
    display: flex;
    flex-direction: column;
    margin: 24px auto;
    padding: 16px 18px 14px;
}

.doi-preview-head-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.secondary-button--sm {
    padding: 6px 12px;
    font-size: 0.85rem;
}

.doi-preview-doi-line {
    margin: 8px 0 10px;
    font-size: 0.9rem;
    word-break: break-all;
}

.doi-preview-meta {
    margin-bottom: 12px;
    padding: 12px 14px;
    border-radius: 10px;
    background: var(--panel-2);
    border: 1px solid var(--border-2);
    font-size: 0.92rem;
    line-height: 1.5;
    max-height: 180px;
    overflow-y: auto;
}

.doi-preview-meta-title {
    font-weight: 800;
    font-size: 1rem;
    margin-bottom: 8px;
    color: var(--text);
}

.doi-preview-frame-wrap {
    flex: 1;
    min-height: 280px;
    border: 1px solid var(--border-2);
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
}

.doi-preview-frame {
    width: 100%;
    height: min(52vh, 420px);
    border: none;
    display: block;
    background: #fff;
}

.doi-preview-frame-note {
    margin: 10px 0 0;
    font-size: 0.82rem;
}

.review-doi-hint {
    margin: 6px 0 0;
    font-size: 0.82rem;
}

.doi-link-btn,
button.review-doi {
    border: none;
    background: none;
    padding: 0;
    font: inherit;
    cursor: pointer;
    text-align: left;
}

button.doi-review-chip {
    cursor: pointer;
    text-align: center;
    font: inherit;
}

.doi-link-btn {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.doi-link-btn:hover,
button.review-doi:hover,
button.doi-review-chip:hover {
    color: var(--accent-2);
}

button.review-doi {
    color: var(--accent);
    font-weight: 700;
    word-break: break-all;
}

.modal-subtitle {
    margin: 8px 0 10px;
    color: var(--muted);
    font-size: 0.95rem;
}

.modal-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.tab {
    padding: 8px 10px;
    border-radius: 999px;
    border: 1px solid var(--border-2);
    background: var(--panel);
    color: var(--text);
    font-weight: 800;
    cursor: pointer;
}

.tab.is-active {
    background: rgba(31, 95, 168, 0.12);
    border-color: rgba(31, 95, 168, 0.30);
}

.cite-output {
    width: 100%;
    min-height: 240px;
    border: 1px solid var(--border-2);
    border-radius: 12px;
    padding: 12px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
    background: var(--panel-2);
    color: var(--text);
    resize: vertical;
}

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

@media (max-width: 768px) {
    .bulk-bar {
        flex-direction: column;
        align-items: stretch;
    }
    .modal-card {
        margin: 18px auto;
    }

    .results-table {
        font-size: 0.88rem;
    }

    .results-table th,
    .results-table td {
        padding: 8px 8px;
    }
}

.tour-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    pointer-events: none;
}

.tour-cutout {
    position: fixed;
    border-radius: 14px;
    box-shadow: 0 0 0 9999px rgba(11, 26, 43, 0.45);
    outline: 2px solid rgba(255, 255, 255, 0.75);
    background: rgba(255, 255, 255, 0.02);
    pointer-events: none;
}

.tour-target {
    outline: 3px solid rgba(255, 255, 255, 0.0);
    box-shadow: 0 0 0 0 rgba(31, 95, 168, 0);
    border-radius: 14px;
}

.tour-target.is-tour-active {
    outline: 3px solid rgba(31, 95, 168, 0.35);
    box-shadow: 0 0 0 6px rgba(31, 95, 168, 0.10);
    animation: tourPulse 1.6s ease-in-out infinite;
}

@keyframes tourPulse {
    0%, 100% {
        box-shadow: 0 0 0 6px rgba(31, 95, 168, 0.10);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(31, 95, 168, 0.14);
    }
}

.tour-tooltip {
    position: fixed;
    max-width: 360px;
    background: var(--panel);
    border: 1px solid var(--border-2);
    border-radius: 14px;
    box-shadow: var(--shadow);
    padding: 12px 12px;
    color: var(--text);
    pointer-events: auto;
}

.tour-title {
    font-weight: 900;
    margin-bottom: 6px;
}

.tour-body {
    color: var(--muted);
    font-size: 0.95rem;
    line-height: 1.4;
}

.tour-actions {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.tour-btn {
    padding: 8px 10px;
    border-radius: 10px;
    border: 1px solid rgba(31, 95, 168, 0.28);
    background: rgba(31, 95, 168, 0.08);
    color: var(--text);
    font-weight: 900;
    cursor: pointer;
}

.tour-btn.primary {
    background: linear-gradient(180deg, var(--accent-2), var(--accent));
    color: #ffffff;
    border-color: rgba(31, 95, 168, 0.35);
}

.tour-btn.ghost {
    background: var(--panel);
}

.references-textarea {
    width: 100%;
    min-height: 300px;
    height: 320px;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--panel);
    color: var(--text);
    font-family: 'Courier New', monospace;
    font-size: 0.95rem;
    resize: vertical;
    transition: all 0.3s ease;
}

.references-textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(31, 95, 168, 0.16);
    background: var(--panel);
}

.reference-counter {
    margin-top: 12px;
    text-align: right;
    color: var(--accent);
    font-size: 0.9rem;
}

.validate-button {
    margin-top: 20px;
    width: 100%;
    max-width: 420px;
    padding: 14px 24px;
    border: none;
    border-radius: 6px;
    background: linear-gradient(180deg, var(--accent-2), var(--accent));
    color: #ffffff;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 14px 32px rgba(31, 95, 168, 0.22);
}

.validate-button:hover:not(:disabled) {
    background: linear-gradient(180deg, #2f86d8, #1f5fa8);
    box-shadow: 0 18px 42px rgba(31, 95, 168, 0.26);
    transform: translateY(-2px);
}

.validate-button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    box-shadow: none;
}

/* Results Section */
.results-section {
    padding: 60px clamp(16px, 3vw, 36px);
    max-width: min(1760px, 100%);
    margin: 0 auto;
    width: 100%;
}

.job-meta {
    display: grid;
    grid-template-columns: 1fr;
    gap: 6px;
    margin-bottom: 18px;
    padding: 14px 16px;
    border: 1px solid var(--border-2);
    border-radius: 12px;
    background: var(--panel);
    box-shadow: var(--shadow-2);
    color: var(--text);
}

.job-summary {
    margin-top: 8px;
    color: var(--muted);
    font-size: 0.95rem;
}

.progress-container {
    margin-bottom: 40px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 15px;
}

.progress-fill {
    height: 100%;
    background: var(--accent);
    width: 0%;
    transition: width 0.3s ease;
}

#progress-text {
    text-align: center;
    color: var(--accent);
    font-weight: 500;
}

.logs-container {
    margin: 20px 0 40px;
    padding: 16px;
    border: 1px solid rgba(0, 229, 255, 0.2);
    border-radius: 8px;
    background: var(--panel);
}

.logs-container h3 {
    margin-bottom: 10px;
    color: var(--accent);
    font-size: 1.1rem;
}

.logs-output {
    max-height: 260px;
    overflow: auto;
    white-space: pre-wrap;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
    font-size: 0.85rem;
    color: var(--text);
}

@media (max-width: 980px) {
    .tool-grid {
        grid-template-columns: 1fr;
    }
    .references-textarea {
        height: 260px;
    }
}

.results-container h2 {
    margin-bottom: 30px;
    font-size: 2rem;
    color: var(--text);
}

.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 500;
}

.status-active {
    background: rgba(76, 175, 80, 0.2);
    color: #4caf50;
}

.status-invalid {
    background: rgba(244, 67, 54, 0.2);
    color: #f44336;
}

.status-not-found {
    background: rgba(255, 193, 7, 0.2);
    color: #ffc107;
}

.status-found-no-doi {
    background: rgba(33, 150, 243, 0.2);
    color: #2196f3;
}

.export-button {
    padding: 12px 24px;
    border: 2px solid #00e5ff;
    border-radius: 6px;
    background: transparent;
    color: #00e5ff;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.export-button:hover {
    background: #00e5ff;
    color: #121212;
}

/* How It Works */
.how-it-works {
    padding: 80px 20px;
    background: transparent;
    text-align: center;
}

.how-it-works h2 {
    margin-bottom: 50px;
    font-size: 2rem;
    color: var(--text);
}

.process-flow {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
    max-width: 900px;
    margin: 0 auto;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.step-number {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent);
    color: #ffffff;
    border-radius: 50%;
    font-size: 1.5rem;
    font-weight: 700;
}

.step h4 {
    color: var(--text);
    font-size: 0.95rem;
    font-weight: 700;
}

.arrow {
    color: var(--accent);
    font-size: 1.5rem;
    font-weight: bold;
}

@media (max-width: 600px) {
    .arrow {
        display: none;
    }

    .process-flow {
        flex-direction: column;
        gap: 10px;
    }

    .hero h1 {
        font-size: 2rem;
    }
}

/* Guidelines & policy */
.policy-section {
    padding: 56px 20px 48px;
    background: linear-gradient(180deg, #e8eef6 0%, var(--bg) 55%);
    border-top: 1px solid var(--border-2);
    scroll-margin-top: 80px;
}

.policy-inner {
    max-width: min(1100px, 100%);
    margin: 0 auto;
}

.policy-section h2 {
    font-size: 1.75rem;
    color: var(--text);
    margin-bottom: 12px;
    font-weight: 800;
}

.policy-lead {
    margin-bottom: 28px;
    max-width: 860px;
    line-height: 1.65;
    font-size: 0.98rem;
}

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

.policy-card {
    background: var(--panel);
    border: 1px solid var(--border-2);
    border-radius: 14px;
    padding: 22px 20px;
    box-shadow: var(--shadow-2);
}

.policy-card h3 {
    font-size: 1.08rem;
    color: var(--accent);
    margin-bottom: 14px;
    font-weight: 800;
}

.policy-list {
    margin: 0;
    padding-left: 1.2rem;
    line-height: 1.62;
    color: var(--text);
    font-size: 0.92rem;
}

.policy-list li {
    margin-bottom: 11px;
}

.policy-list li:last-child {
    margin-bottom: 0;
}

.policy-list--ol {
    list-style: decimal;
}

.jats-ai-checklist code {
    font-size: 0.86em;
    background: var(--panel-2);
    padding: 0.1rem 0.32rem;
    border-radius: 4px;
    border: 1px solid var(--border-2);
}

.nav-link--muted {
    font-weight: 600;
    color: var(--muted);
    font-size: 0.88rem;
    margin-right: 4px;
}

.nav-link--muted:hover {
    color: var(--accent);
}

@media (max-width: 720px) {
    .header-container {
        flex-wrap: wrap;
        gap: 12px;
    }

    .nav {
        flex-wrap: wrap;
        justify-content: flex-end;
    }
}

/* Footer */
.footer {
    background: rgba(0, 0, 0, 0.5);
    border-top: 1px solid rgba(0, 229, 255, 0.2);
    padding: 40px 20px;
    text-align: center;
    color: #888;
    margin-top: auto;
}

.footer-links {
    margin: 15px 0;
}

.footer-links a {
    color: #00e5ff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #00d4e8;
}

.footer-credit {
    font-size: 0.85rem;
    margin-top: 15px;
    color: #666;
    white-space: nowrap;
}

/* Responsive */
@media (max-width: 768px) {
    .hero {
        padding: 40px 20px;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .tool {
        padding: 40px 20px;
    }

    .references-textarea {
        height: 200px;
    }

    .results-table {
        font-size: 0.9rem;
    }

    .results-table th,
    .results-table td {
        padding: 8px;
    }
}

/* Header Styles */
.header {
    background: var(--panel);
    border-bottom: 1px solid var(--border-2);
    padding: 15px 0;
    box-shadow: var(--shadow-2);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    max-width: min(1760px, 100%);
    margin: 0 auto;
    padding: 0 clamp(16px, 3vw, 28px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--accent);
    text-decoration: none;
    letter-spacing: -1px;
}

.nav {
    display: flex;
    gap: 20px;
    align-items: center;
}

.nav-link {
    text-decoration: none;
    color: var(--text);
    font-weight: 600;
    font-size: 0.95rem;
    transition: color 0.2s;
}

.nav-link:hover {
    color: var(--accent);
}

.nav-btn {
    background: var(--accent);
    color: #fff;
    padding: 8px 16px;
    border-radius: 6px;
}

.nav-btn:hover {
    background: var(--accent-2);
    color: #fff;
}

#user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

#user-name {
    font-weight: 700;
    color: var(--accent);
}

/* Auth View Styles */
.auth-view {
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.auth-card {
    background: var(--panel);
    border: 1px solid var(--border-2);
    border-radius: 12px;
    padding: 30px;
    width: 100%;
    max-width: 450px;
    box-shadow: var(--shadow);
}

.auth-card h2 {
    margin-bottom: 25px;
    text-align: center;
    color: var(--text);
}

.auth-note {
    padding: 10px 12px;
    margin-bottom: 18px;
    border-radius: 10px;
    background: rgba(240, 170, 35, 0.12);
    border: 1px solid rgba(240, 170, 35, 0.45);
    color: var(--text);
    font-size: 0.92rem;
    line-height: 1.45;
}

.auth-note strong {
    color: #fbbf24;
}

.auth-note--dev {
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.35);
}

.local-dev-login-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 10px 0 6px;
}

.local-dev-login-links .secondary-button {
    display: inline-block;
    padding: 6px 12px;
    font-size: 0.88rem;
    text-decoration: none;
}

.auth-note-sub {
    display: block;
    margin-top: 6px;
    font-size: 0.85rem;
    opacity: 0.9;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--muted);
}

.form-group input, .form-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--panel-2);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.primary-button {
    width: 100%;
    padding: 14px;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
}

.primary-button:hover {
    background: var(--accent-2);
}

.auth-footer {
    margin-top: 20px;
    text-align: center;
    font-size: 0.9rem;
    color: var(--muted);
}

.auth-footer a {
    color: var(--accent);
    font-weight: 700;
    text-decoration: none;
}

/* Tool Header & Credit Badge */
.tool-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.credit-badge {
    background: rgba(31, 95, 168, 0.1);
    color: var(--accent);
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 700;
    border: 1px solid rgba(31, 95, 168, 0.2);
}

/* ── Trust Level System ── */

/* Status badge for uncertain results */
.status-uncertain {
  background: rgba(255, 152, 0, 0.15);
  color: #e65100;
}

/* Row-level trust signal: colored left border on reference cell */
.results-row[data-trust-level="CONFIRMED"] .col-reference {
  border-left: 3px solid #4caf50;
  padding-left: calc(var(--col-ref-pad, 0.75rem) - 1px);
}
.results-row[data-trust-level="UNCERTAIN"] .col-reference {
  border-left: 3px solid #ff9800;
  padding-left: calc(var(--col-ref-pad, 0.75rem) - 1px);
}
.results-row[data-trust-level="NOT_FOUND"] .col-reference {
  border-left: 3px solid #ef5350;
  padding-left: calc(var(--col-ref-pad, 0.75rem) - 1px);
}

/* Candidate cards shown inside the reference cell for UNCERTAIN rows */
.trust-candidates {
  margin-top: 0.6rem;
  padding: 0.6rem 0.75rem;
  background: rgba(255, 152, 0, 0.06);
  border: 1px solid rgba(255, 152, 0, 0.25);
  border-radius: 8px;
  font-size: 0.78rem;
}
.trust-candidates-label {
  font-size: 0.73rem;
  font-weight: 600;
  color: #c45200;
  margin: 0 0 0.5rem 0;
  letter-spacing: 0.01em;
}
.trust-candidate-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.trust-candidate-card {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 0.55rem 0.65rem;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,152,0,0.18);
  border-radius: 6px;
}
.trust-candidate-main {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}
.trust-candidate-summary {
  min-width: 0;
  flex: 1;
}
.trust-candidate-title {
  margin: 0;
  font-weight: 600;
  color: var(--text-primary, #e2e8f0);
  line-height: 1.35;
}
.trust-candidate-facts {
  margin: 0.25rem 0 0;
  color: var(--text-muted, #94a3b8);
  line-height: 1.35;
}
.trust-candidate-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.35rem;
  flex-shrink: 0;
}
.trust-candidate-signals {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-top: 0.35rem;
}
.trust-signal {
  display: inline-flex;
  align-items: center;
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.15);
  color: var(--text-muted, #94a3b8);
  font-size: 0.68rem;
  font-weight: 600;
}
.trust-signal--ok {
  background: rgba(34, 197, 94, 0.15);
  color: #86efac;
}
.trust-signal--bad {
  background: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
}
.trust-signal--match {
  background: rgba(34, 197, 94, 0.15);
  color: #86efac;
}
.trust-signal--partial {
  background: rgba(251, 191, 36, 0.15);
  color: #fcd34d;
}
.trust-signal--mismatch {
  background: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
}
.trust-candidate-details {
  padding: 0.55rem 0.65rem;
  border-top: 1px solid rgba(255,152,0,0.15);
  background: rgba(0,0,0,0.12);
  border-radius: 0 0 6px 6px;
}
.trust-candidate-detail-grid {
  display: grid;
  gap: 0.35rem 0.75rem;
  margin: 0;
}
.trust-candidate-detail-row {
  display: grid;
  grid-template-columns: minmax(6rem, 8rem) minmax(0, 1fr);
  gap: 0.5rem;
  align-items: start;
}
.trust-candidate-detail-row dt {
  margin: 0;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted, #94a3b8);
}
.trust-candidate-detail-row dd {
  margin: 0;
  color: var(--text-primary, #e2e8f0);
  line-height: 1.4;
  word-break: break-word;
}
.trust-candidate-detail-row dd a {
  color: #60a5fa;
  text-decoration: none;
}
.trust-candidate-detail-row dd a:hover {
  text-decoration: underline;
}
.trust-candidate-card.is-expanded {
  border-color: rgba(255,152,0,0.35);
}
.trust-candidate-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.3rem 0.55rem;
  min-width: 0;
  flex: 1;
}
.trust-candidate-meta .trust-candidate-title {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 28ch;
}
.trust-candidate-authors {
  color: var(--text-muted, #94a3b8);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 22ch;
}
.trust-candidate-year {
  color: var(--text-muted, #94a3b8);
  white-space: nowrap;
}
.trust-candidate-doi {
  display: inline-block;
  margin-top: 0.35rem;
  color: #60a5fa;
  font-size: 0.72rem;
  word-break: break-all;
  text-decoration: none;
}
.trust-candidate-doi:hover { text-decoration: underline; }

.use-doi-btn {
  flex-shrink: 0;
  padding: 0.25rem 0.6rem;
  border: 1px solid #ff9800;
  border-radius: 5px;
  background: transparent;
  color: #ff9800;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}
.use-doi-btn:hover, .use-doi-btn:focus-visible {
  background: #ff9800;
  color: #121212;
}

/* Best-guess hints for NOT_FOUND rows */
.trust-guesses {
  margin-top: 0.5rem;
  padding: 0.5rem 0.65rem;
  background: rgba(239, 83, 80, 0.05);
  border: 1px solid rgba(239, 83, 80, 0.2);
  border-radius: 7px;
  font-size: 0.78rem;
}
.trust-guesses-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: #c62828;
  margin: 0 0 0.4rem 0;
}
.trust-guess-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.trust-guess-link {
  color: #60a5fa;
  text-decoration: none;
  font-size: 0.75rem;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.trust-guess-link:hover { text-decoration: underline; }

/* ── Trust Level — DOI mismatch warning variant ── */
.trust-candidates--warn {
  background: rgba(239, 83, 80, 0.07);
  border-color: rgba(239, 83, 80, 0.35);
}
.trust-candidates-label--warn {
  color: #c62828;
}
.trust-candidate-card--warn {
  border-color: rgba(239, 83, 80, 0.3);
}

/* ── Google OAuth button ── */
.google-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 0.6rem 1rem;
  border: 1px solid #dadce0;
  border-radius: 6px;
  background: #fff;
  color: #3c4043;
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s, box-shadow 0.15s;
  box-sizing: border-box;
  margin-bottom: 0.25rem;
}
.google-btn:hover {
  background: #f8f9fa;
  box-shadow: 0 1px 3px rgba(0,0,0,0.12);
}

.auth-divider {
  display: flex;
  align-items: center;
  text-align: center;
  color: #aaa;
  font-size: 0.8rem;
  margin: 0.85rem 0;
  gap: 0.5rem;
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  border-top: 1px solid #e2e8f0;
}

/* ── Pending approval view ── */
.pending-view {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  background: #f8fafc;
}
.pending-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  padding: 48px 44px;
  max-width: 520px;
  width: 100%;
  text-align: center;
  box-shadow: 0 8px 40px rgba(15,23,42,.07);
}
.pending-logo {
  font-size: 1.1rem;
  font-weight: 700;
  color: #1e40af;
  letter-spacing: -.01em;
  margin-bottom: 28px;
}
.pending-icon {
  color: #f59e0b;
  margin-bottom: 20px;
  display: flex;
  justify-content: center;
}
.pending-title {
  font-size: 1.55rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 14px;
  letter-spacing: -.02em;
}
.pending-body {
  font-size: .97rem;
  color: #475569;
  line-height: 1.75;
  margin: 0 0 28px;
}
.pending-email-highlight {
  color: #1e40af;
  word-break: break-all;
}
.pending-steps {
  list-style: none;
  padding: 0;
  margin: 0 0 28px;
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  text-align: left;
}
.pending-step {
  padding: 11px 18px;
  font-size: .9rem;
  font-weight: 500;
  color: #94a3b8;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  gap: 10px;
  background: #f8fafc;
}
.pending-step:last-child { border-bottom: none; }
.pending-step::before { content: '○'; font-size: .8rem; }
.pending-step--done { color: #16a34a; background: #f0fdf4; }
.pending-step--done::before { content: '✓'; color: #16a34a; }
.pending-step--active { color: #0f172a; background: #fff; font-weight: 600; }
.pending-step--active::before { content: ''; width: 10px; height: 10px; border-radius: 50%; background: #f59e0b; flex-shrink: 0; animation: pulse-dot 1.8s ease-in-out infinite; }
.pending-step--future::before { content: '○'; color: #cbd5e1; }
@keyframes pulse-dot { 0%,100%{opacity:1} 50%{opacity:.4} }
.pending-note {
  font-size: .84rem;
  color: #94a3b8;
  margin: 0 0 28px;
  line-height: 1.6;
}
.btn-pending-logout {
  display: inline-block;
  padding: 10px 28px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: transparent;
  color: #475569;
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s, border-color .2s, color .2s;
  margin-bottom: 20px;
}
.btn-pending-logout:hover { background: #f1f5f9; border-color: #cbd5e1; color: #0f172a; }
.pending-support {
  font-size: .84rem;
  color: #94a3b8;
  margin: 0;
}
.pending-support a { color: #3b82f6; text-decoration: none; }
.pending-support a:hover { text-decoration: underline; }

/* ── Cookie consent banner ── */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  background: #1e293b;
  color: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.5rem;
  box-shadow: 0 -2px 12px rgba(0,0,0,0.25);
  flex-wrap: wrap;
}
.cookie-banner__text {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.5;
  flex: 1;
  min-width: 200px;
}
.cookie-banner__link {
  color: #93c5fd;
  text-decoration: underline;
  white-space: nowrap;
}
.cookie-banner__btn {
  background: #3b82f6;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 0.5rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s;
  flex-shrink: 0;
}
.cookie-banner__btn:hover {
  background: #2563eb;
}
