:root {
    --bg-primary: #eef3f8;
    --bg-secondary: rgba(255, 255, 255, 0.94);
    --bg-muted: #f7f9fc;
    --surface-strong: #ffffff;
    --text-primary: #102033;
    --text-secondary: #526173;
    --text-tertiary: #718198;
    --accent-color: #0f4c81;
    --accent-strong: #0b3558;
    --accent-soft: rgba(15, 76, 129, 0.12);
    --accent-glow: rgba(15, 76, 129, 0.2);
    --border-color: rgba(135, 148, 166, 0.26);
    --border-strong: rgba(71, 88, 114, 0.2);
    --highlight-bg: #f8e3a1;
    --highlight-text: #3e2f0f;
    --desk-bg: rgba(11, 24, 39, 0.9);
    --desk-text: #dce7f5;
    --shadow-sm: 0 10px 24px rgba(16, 32, 51, 0.07);
    --shadow-md: 0 18px 44px rgba(16, 32, 51, 0.12);
    --shadow-lg: 0 28px 70px rgba(9, 20, 34, 0.15);
    --radius-md: 18px;
    --radius-lg: 28px;
    --radius-xl: 34px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(15, 76, 129, 0.12), transparent 32%),
        radial-gradient(circle at top right, rgba(180, 198, 219, 0.52), transparent 30%),
        linear-gradient(180deg, #f5f8fb 0%, #eef3f8 48%, #e8eef5 100%);
    color: var(--text-primary);
    line-height: 1.65;
    font-family: "Public Sans", system-ui, sans-serif;
    display: flex;
    justify-content: center;
    word-wrap: break-word;
    overflow-x: hidden;
}

body::before,
body::after {
    content: "";
    position: fixed;
    inset: auto;
    pointer-events: none;
    z-index: -1;
    filter: blur(10px);
}

body::before {
    width: 22rem;
    height: 22rem;
    top: 6rem;
    left: -5rem;
    background: rgba(15, 76, 129, 0.08);
    border-radius: 50%;
}

body::after {
    width: 18rem;
    height: 18rem;
    right: -4rem;
    bottom: 5rem;
    background: rgba(250, 213, 124, 0.12);
    border-radius: 50%;
}

button,
input,
select {
    font: inherit;
}

img {
    display: block;
    max-width: 100%;
}

[hidden] {
    display: none !important;
}

.container {
    width: min(1100px, 100%);
    padding: 2rem 1.5rem 5rem;
    transition: width 0.35s ease;
}

.container.archive-wide {
    width: min(1240px, 100%);
}

.container.split-mode {
    width: min(1520px, 96vw);
}

.hero-header {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(260px, 0.95fr);
    gap: 1.5rem;
    padding: 2rem;
    margin: 1.25rem 0 1.75rem;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(246, 249, 252, 0.94)),
        linear-gradient(135deg, rgba(15, 76, 129, 0.04), transparent 70%);
    border: 1px solid rgba(135, 148, 166, 0.22);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    animation: fadeInDown 0.65s ease;
}

.hero-header::after {
    content: "";
    position: absolute;
    inset: auto 0 0 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-strong), rgba(15, 76, 129, 0.14));
}

.hero-heading {
    position: relative;
    z-index: 1;
}

.eyebrow-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.9rem;
}

.eyebrow,
.status-chip,
.hint-chip,
.article-meta,
.toolbar-label {
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.eyebrow {
    color: var(--accent-strong);
    font-size: 0.76rem;
    font-weight: 800;
}

.status-chip {
    display: inline-flex;
    align-items: center;
    min-height: 2rem;
    padding: 0.35rem 0.8rem;
    background: rgba(15, 76, 129, 0.08);
    border: 1px solid rgba(15, 76, 129, 0.12);
    border-radius: 999px;
    color: var(--accent-strong);
    font-size: 0.72rem;
    font-weight: 700;
}

h1 {
    font-family: "Source Serif 4", Georgia, serif;
    font-size: clamp(2.4rem, 4vw, 3.7rem);
    line-height: 1.02;
    margin-bottom: 0.8rem;
    color: var(--text-primary);
}

.subtitle {
    max-width: 70ch;
    color: var(--text-secondary);
    font-size: 1rem;
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.25rem;
    margin-top: 1.15rem;
}

.date,
.view-description {
    display: inline-flex;
    align-items: center;
    min-height: 2.4rem;
    padding: 0.6rem 0.95rem;
    border-radius: 999px;
    background: rgba(16, 32, 51, 0.05);
    color: var(--text-secondary);
    font-size: 0.92rem;
}

.date {
    color: var(--accent-strong);
    font-weight: 700;
}

.view-description {
    max-width: 38rem;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 0.9rem;
    align-self: stretch;
}

.stat-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 0.5rem;
    min-height: 8rem;
    padding: 1.2rem;
    background: linear-gradient(180deg, rgba(11, 53, 88, 0.98), rgba(16, 32, 51, 0.96));
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.stat-label {
    color: rgba(220, 231, 245, 0.72);
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.stat-value {
    color: #f8fbff;
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    line-height: 1;
    font-weight: 800;
}

.contract-toolbar {
    position: sticky;
    top: 1rem;
    z-index: 90;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1.2rem;
    margin-bottom: 1.6rem;
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(135, 148, 166, 0.2);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    animation: fadeInUp 0.65s ease 0.1s both;
}

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

.toolbar-label {
    display: block;
    margin-bottom: 0.35rem;
    color: var(--accent-strong);
    font-size: 0.72rem;
    font-weight: 800;
}

.toolbar-description {
    color: var(--text-secondary);
    font-size: 0.94rem;
}

.toolbar-hints {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.hint-chip {
    padding: 0.45rem 0.8rem;
    background: var(--bg-muted);
    border: 1px solid rgba(135, 148, 166, 0.18);
    border-radius: 999px;
    color: var(--text-secondary);
    font-size: 0.68rem;
    font-weight: 800;
}

.search-container {
    position: relative;
}

#search-input {
    width: 100%;
    min-height: 3.85rem;
    padding: 1rem 5.5rem 1rem 3.2rem;
    font-size: 1rem;
    background: var(--surface-strong);
    border: 1px solid rgba(135, 148, 166, 0.24);
    border-radius: 20px;
    color: var(--text-primary);
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

#search-input::placeholder {
    color: var(--text-tertiary);
}

#search-input:focus {
    border-color: rgba(15, 76, 129, 0.45);
    box-shadow: 0 0 0 4px var(--accent-soft), 0 10px 20px rgba(16, 32, 51, 0.08);
}

.search-icon {
    position: absolute;
    left: 1.15rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-tertiary);
    pointer-events: none;
}

.clear-search-btn {
    position: absolute;
    right: 0.85rem;
    top: 50%;
    transform: translateY(-50%);
    min-height: 2.45rem;
    padding: 0.45rem 0.85rem;
    border: none;
    border-radius: 999px;
    background: rgba(15, 76, 129, 0.09);
    color: var(--accent-strong);
    font-size: 0.84rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.clear-search-btn:hover {
    background: rgba(15, 76, 129, 0.16);
    transform: translateY(-50%) translateY(-1px);
}

.quick-jump-container {
    flex: 0 0 min(300px, 100%);
}

.quick-jump-select {
    width: 100%;
    min-height: 3.2rem;
    padding: 0.85rem 3rem 0.85rem 1rem;
    border-radius: 18px;
    border: 1px solid rgba(135, 148, 166, 0.24);
    background-color: var(--surface-strong);
    color: var(--text-primary);
    font-size: 0.96rem;
    font-weight: 600;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23526173' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1.2rem;
    cursor: pointer;
}

.quick-jump-select:focus {
    outline: none;
    border-color: rgba(15, 76, 129, 0.45);
    box-shadow: 0 0 0 4px var(--accent-soft);
}

.toolbar-status {
    flex: 1;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    min-height: 3.2rem;
    padding: 0.8rem 1rem;
    background: rgba(248, 250, 252, 0.78);
    border: 1px solid rgba(135, 148, 166, 0.18);
    border-radius: 18px;
}

.results-info,
.current-article-label {
    color: var(--text-secondary);
    font-size: 0.93rem;
}

.results-info {
    font-weight: 700;
}

.current-article-label {
    color: var(--text-tertiary);
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.split-view-wrapper {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    width: 100%;
}

.contract-container {
    display: flex;
    flex-direction: column;
    gap: 1.15rem;
}

.secondary-pane {
    display: none;
}

.split-view-wrapper.is-split {
    flex-direction: row;
    gap: 1.6rem;
    align-items: flex-start;
}

.split-view-wrapper.is-split .contract-container {
    flex: 1;
    max-height: 70vh;
    padding-right: 0.75rem;
    padding-bottom: 1rem;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(15, 76, 129, 0.28) transparent;
}

.split-view-wrapper.is-split .contract-container::-webkit-scrollbar {
    width: 8px;
}

.split-view-wrapper.is-split .contract-container::-webkit-scrollbar-thumb {
    background: rgba(15, 76, 129, 0.25);
    border-radius: 999px;
}

.split-view-wrapper.is-split .secondary-pane {
    display: flex;
}

.article-card {
    position: relative;
    padding: 1.5rem 1.5rem 1.45rem;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(250, 252, 255, 0.94));
    border: 1px solid rgba(135, 148, 166, 0.18);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    animation: fadeInUp 0.45s ease both;
    overflow: hidden;
    scroll-margin-top: 10rem;
}

.article-card::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: linear-gradient(180deg, var(--accent-strong), rgba(15, 76, 129, 0.18));
    opacity: 0.7;
}

.article-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: rgba(15, 76, 129, 0.22);
}

.article-card.active-article {
    border-color: rgba(15, 76, 129, 0.42);
    box-shadow: 0 0 0 4px rgba(15, 76, 129, 0.08), var(--shadow-md);
}

.article-meta {
    display: inline-flex;
    align-items: center;
    margin-bottom: 0.85rem;
    color: var(--accent-strong);
    font-size: 0.72rem;
    font-weight: 800;
}

.article-title {
    font-family: "Source Serif 4", Georgia, serif;
    font-size: 1.5rem;
    line-height: 1.15;
    margin-bottom: 0.95rem;
    color: var(--text-primary);
}

.article-content {
    color: var(--text-secondary);
    font-size: 0.98rem;
}

mark {
    background-color: var(--highlight-bg);
    color: var(--highlight-text);
    border-radius: 0.3rem;
    padding: 0 0.18rem;
}

.no-results {
    text-align: center;
    color: var(--text-secondary);
    padding: 2.8rem 2rem;
    background: rgba(255, 255, 255, 0.9);
    border-radius: var(--radius-md);
    border: 1px dashed rgba(135, 148, 166, 0.34);
    box-shadow: var(--shadow-sm);
    display: none;
}

.menu-btn,
.split-view-btn {
    position: fixed;
    z-index: 1000;
    border: 1px solid rgba(135, 148, 166, 0.26);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.menu-btn {
    top: 1.4rem;
    left: 1.4rem;
    width: 3rem;
    height: 3rem;
    background: rgba(255, 255, 255, 0.88);
    border-radius: 16px;
    color: var(--text-primary);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.menu-btn:hover,
.split-view-btn:hover {
    transform: translateY(-2px);
}

.menu-btn:hover {
    background: var(--surface-strong);
    border-color: rgba(15, 76, 129, 0.25);
    color: var(--accent-strong);
}

.side-panel {
    position: fixed;
    top: 0;
    left: 0;
    width: min(320px, 86vw);
    height: 100vh;
    background: linear-gradient(180deg, rgba(11, 24, 39, 0.98), rgba(16, 32, 51, 0.98));
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    z-index: 1001;
    transform: translateX(-100%);
    transition: transform 0.28s ease;
    display: flex;
    flex-direction: column;
    color: #e5eef9;
}

.side-panel.open {
    transform: translateX(0);
}

.panel-overlay {
    position: fixed;
    inset: 0;
    background: rgba(8, 18, 29, 0.48);
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.panel-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.panel-header {
    padding: 1.4rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.panel-header h2 {
    font-family: "Source Serif 4", Georgia, serif;
    font-size: 1.4rem;
}

.close-btn {
    width: 2.5rem;
    height: 2.5rem;
    background: rgba(255, 255, 255, 0.06);
    border: none;
    border-radius: 999px;
    font-size: 1.5rem;
    cursor: pointer;
    color: #dce7f5;
    transition: background 0.2s ease;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.14);
}

.nav-links {
    list-style: none;
    padding: 1rem;
}

.nav-links li + li {
    margin-top: 0.45rem;
}

.nav-links a {
    display: block;
    padding: 0.9rem 1rem;
    color: rgba(220, 231, 245, 0.82);
    text-decoration: none;
    border: 1px solid transparent;
    border-radius: 14px;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
    font-weight: 600;
}

.nav-links a:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
}

.nav-links a.active {
    background: rgba(255, 255, 255, 0.09);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.08);
}

.nav-item-muted {
    list-style: none;
}

.nav-link.nav-link--disabled {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.9rem 1rem;
    color: rgba(220, 231, 245, 0.35);
    border: 1px dashed rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    font-weight: 600;
    cursor: not-allowed;
    user-select: none;
    pointer-events: none;
}

.nav-soon {
    font-size: 0.64rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(220, 231, 245, 0.28);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    padding: 0.15rem 0.35rem;
}

.split-view-btn {
    right: 2rem;
    bottom: 2rem;
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(11, 53, 88, 0.98), rgba(16, 32, 51, 0.98));
    color: #ffffff;
}

.split-view-btn.active {
    background: linear-gradient(180deg, rgba(15, 76, 129, 0.98), rgba(11, 53, 88, 0.98));
    border-color: rgba(255, 255, 255, 0.18);
}

.employees-container,
.stewards-container,
.gallery-container {
    display: flex;
    flex-direction: column;
}

.employees-container {
    gap: 0.95rem;
}

.employee-card,
.steward-card {
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(135, 148, 166, 0.18);
    border-radius: 24px;
    box-shadow: var(--shadow-sm);
    animation: fadeInUp 0.45s ease both;
}

.employee-card {
    padding: 1.25rem 1.4rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.employee-name {
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--text-primary);
    text-transform: capitalize;
}

.employee-location {
    font-size: 0.84rem;
    color: var(--accent-strong);
    background: rgba(15, 76, 129, 0.08);
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    border: 1px solid rgba(15, 76, 129, 0.12);
}

.stewards-container {
    gap: 1.4rem;
}

.steward-card {
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.steward-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.steward-img {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
}

.steward-info {
    padding: 1.5rem;
}

.steward-name {
    font-family: "Source Serif 4", Georgia, serif;
    font-size: 1.9rem;
    color: var(--text-primary);
    margin-bottom: 0.2rem;
}

.steward-role {
    font-size: 0.9rem;
    color: var(--accent-strong);
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.steward-tagline {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.55;
    padding: 0.95rem 1rem;
    background: var(--bg-muted);
    border-radius: 18px;
}

.gallery-container {
    gap: 0;
}

.scan-root {
    width: 100%;
}

.scan-archive {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
}

.scan-toolbar {
    position: sticky;
    top: 0.6rem;
    z-index: 5;
    padding: 0.15rem 0;
}

.scan-filter {
    width: 100%;
    min-height: 2.75rem;
    padding: 0.55rem 1rem 0.55rem 2.4rem;
    border: 1px solid rgba(135, 148, 166, 0.28);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.96) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23526173' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E") no-repeat 0.85rem center;
    box-shadow: var(--shadow-sm);
    color: var(--text-primary);
}

.scan-filter::placeholder {
    color: var(--text-tertiary);
}

.scan-filter:focus {
    outline: 2px solid rgba(15, 76, 129, 0.28);
    border-color: rgba(15, 76, 129, 0.35);
}

.scan-panels {
    display: grid;
    grid-template-columns: minmax(220px, 300px) minmax(0, 1fr);
    gap: 1.2rem 1.35rem;
    align-items: start;
    min-height: 320px;
}

.scan-rail {
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(135, 148, 166, 0.2);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    min-height: 0;
    max-height: min(70vh, 52rem);
    display: flex;
    flex-direction: column;
}

.scan-rail-scroll {
    padding: 0.6rem 0.45rem 0.75rem 0.6rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.scan-rail-section {
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-tertiary);
    padding: 0.5rem 0.45rem 0.15rem 0.35rem;
    margin-top: 0.25rem;
    border-top: 1px solid rgba(15, 76, 129, 0.08);
}

.scan-rail-section:first-child {
    border-top: 0;
    margin-top: 0;
    padding-top: 0.15rem;
}

.scan-rail-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.2rem;
    text-align: left;
    width: 100%;
    padding: 0.65rem 0.7rem 0.7rem 0.75rem;
    border: 1px solid transparent;
    border-radius: 14px;
    background: rgba(247, 249, 252, 0.65);
    color: var(--text-primary);
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    animation: fadeInUp 0.4s ease both;
    font: inherit;
}

.scan-rail-item:hover {
    background: rgba(15, 76, 129, 0.06);
    border-color: rgba(15, 76, 129, 0.12);
}

.scan-rail-item.is-active {
    background: #fff;
    border-color: rgba(15, 76, 129, 0.28);
    box-shadow: 0 0 0 1px rgba(15, 76, 129, 0.08);
}

.scan-rail-label {
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent-strong);
}

.scan-rail-sub {
    font-size: 0.9rem;
    line-height: 1.4;
    color: var(--text-primary);
    font-weight: 600;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    line-clamp: 3;
    overflow: hidden;
}

.scan-detail {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(135, 148, 166, 0.2);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 1.2rem 1.35rem 1.4rem;
    min-width: 0;
}

.scan-detail-title {
    font-family: "Source Serif 4", Georgia, serif;
    font-size: 1.35rem;
    color: var(--text-primary);
    line-height: 1.3;
    margin-bottom: 0.75rem;
    font-weight: 700;
}

.scan-detail-body {
    color: var(--text-secondary);
    font-size: 0.98rem;
    line-height: 1.6;
    margin-bottom: 1.1rem;
}

.scan-detail-body p + p {
    margin-top: 0.6rem;
}

.scan-detail-figure {
    margin: 0;
    padding: 0;
    border: 0;
    border-top: 1px solid rgba(15, 76, 129, 0.1);
    padding-top: 1rem;
}

.scan-detail-img {
    width: 100%;
    border-radius: 16px;
    border: 1px solid rgba(135, 148, 166, 0.22);
    cursor: zoom-in;
    transition: transform 0.2s ease;
    background: var(--bg-muted);
}

.scan-detail-img:hover {
    transform: scale(1.005);
}

.scan-detail-actions {
    margin-top: 0.75rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.scan-open-full {
    padding: 0.5rem 1rem;
    font-size: 0.88rem;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(180deg, rgba(15, 76, 129, 0.98), rgba(11, 53, 88, 0.96));
    border: 1px solid rgba(11, 53, 88, 0.35);
    border-radius: 12px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(11, 53, 88, 0.15);
}

.scan-open-full:hover {
    filter: brightness(1.04);
}

.scan-open-full:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    filter: none;
}

.scan-empty-msg {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

@media (max-width: 900px) {
    .scan-panels {
        grid-template-columns: 1fr;
    }

    .scan-rail {
        max-height: 42vh;
    }
}

.floating-desk {
    position: fixed;
    right: 1.6rem;
    top: 52%;
    transform: translateY(-50%);
    width: 240px;
    background: var(--desk-bg);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    box-shadow: var(--shadow-lg);
    z-index: 100;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.floating-desk.visible {
    opacity: 1;
    pointer-events: auto;
}

.desk-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 0.7rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.desk-title {
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    color: rgba(220, 231, 245, 0.76);
    text-transform: uppercase;
}

.desk-indicator {
    width: 0.55rem;
    height: 0.55rem;
    background: #8fc1ef;
    border-radius: 50%;
    box-shadow: 0 0 14px rgba(143, 193, 239, 0.8);
}

.desk-list {
    list-style: none;
    max-height: 430px;
    overflow-y: auto;
    scrollbar-width: none;
}

.desk-list::-webkit-scrollbar {
    display: none;
}

.desk-item {
    padding: 0.68rem 0.82rem;
    font-size: 0.86rem;
    color: rgba(220, 231, 245, 0.82);
    cursor: pointer;
    border-radius: 12px;
    transition: background 0.2s ease, color 0.2s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.desk-item + .desk-item {
    margin-top: 0.2rem;
}

.desk-item:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}

.desk-item.active {
    background: rgba(143, 193, 239, 0.16);
    color: #ffffff;
    font-weight: 700;
}

.image-modal {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: rgba(6, 14, 24, 0.82);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 1200;
}

.image-modal.is-open {
    opacity: 1;
    pointer-events: auto;
}

.image-modal-body {
    position: relative;
    width: min(1000px, 100%);
    max-height: 92vh;
    padding: 1rem;
    background: rgba(12, 23, 36, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 28px;
    box-shadow: var(--shadow-lg);
}

.image-modal-img {
    max-height: calc(92vh - 5.5rem);
    margin: 0 auto;
    border-radius: 18px;
}

.image-modal-caption {
    margin-top: 0.9rem;
    color: rgba(229, 238, 249, 0.9);
    text-align: center;
    font-weight: 600;
}

.image-modal-close {
    position: absolute;
    top: 1.2rem;
    right: 1.2rem;
    width: 3rem;
    height: 3rem;
    border: none;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    font-size: 1.8rem;
    cursor: pointer;
    z-index: 1;
}

.image-modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 1200px) {
    .floating-desk {
        display: none;
    }
}

@media (max-width: 1024px) {
    .hero-header {
        grid-template-columns: 1fr;
    }

    .toolbar-topline,
    .toolbar-secondary {
        flex-direction: column;
        align-items: stretch;
    }

    .quick-jump-container {
        flex-basis: auto;
    }

    .split-view-btn {
        display: none;
    }

    .split-view-wrapper.is-split {
        flex-direction: column;
    }

    .split-view-wrapper.is-split .contract-container {
        max-height: none;
        overflow: visible;
        padding-right: 0;
    }

    .secondary-pane {
        display: none !important;
    }
}

@media (min-width: 768px) {
    .steward-card {
        flex-direction: row;
    }

    .steward-img {
        width: 40%;
        max-height: none;
    }

    .steward-info {
        width: 60%;
        padding: 2rem;
    }
}

@media (max-width: 767px) {
    .container {
        padding: 1rem 1rem 4rem;
    }

    .hero-header {
        padding: 1.35rem;
        margin-top: 4.4rem;
    }

    h1 {
        font-size: 2.2rem;
    }

    .hero-meta {
        flex-direction: column;
        align-items: stretch;
    }

    .hero-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .contract-toolbar {
        top: 0.7rem;
        padding: 1rem;
    }

    #search-input {
        min-height: 3.45rem;
        padding-right: 4.9rem;
    }

    .toolbar-status {
        align-items: flex-start;
    }

    .current-article-label {
        white-space: normal;
    }

    .employee-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .image-modal {
        padding: 1rem;
    }
}

@media (max-width: 560px) {
    .menu-btn {
        top: 0.9rem;
        left: 0.9rem;
        width: 2.8rem;
        height: 2.8rem;
    }

    .hero-header {
        border-radius: 24px;
    }

    .hero-stats {
        grid-template-columns: 1fr;
    }

    .article-card {
        padding: 1.2rem 1.1rem 1.15rem;
    }

    .article-title {
        font-size: 1.28rem;
    }
}

.article-separate-paper-banner {
    margin: 0 0 1.25rem;
    padding: 1rem 1.15rem 1.1rem;
    background: linear-gradient(135deg, rgba(15, 76, 129, 0.09), rgba(250, 213, 124, 0.12));
    border: 1px solid rgba(15, 76, 129, 0.2);
    border-radius: var(--radius-lg);
    color: var(--text-primary);
    font-size: 0.95rem;
    line-height: 1.6;
    animation: fadeInUp 0.4s ease both;
}

.article-card--separate-paper {
    border-left: 4px solid rgba(15, 76, 129, 0.45);
    background: rgba(255, 255, 255, 0.99);
    box-shadow: 0 8px 28px rgba(11, 53, 88, 0.06);
}

.article-card--separate-paper .article-meta {
    color: var(--accent-strong);
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: none;
    font-size: 0.72rem;
}

/* --- Document gateway (index) --- */
.hero-header.gateway-hero {
    grid-template-columns: 1fr;
    margin-bottom: 1.25rem;
}

.gateway-lead {
    max-width: 48rem;
    line-height: 1.55;
    margin-top: 0.5rem;
}

.portal-section {
    width: 100%;
}

.portal-intro {
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent-strong);
    margin-bottom: 1rem;
}

.portal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.1rem;
    padding-bottom: 1rem;
}

a.portal-card,
div.portal-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
    padding: 1.35rem 1.4rem 1.5rem;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(135, 148, 166, 0.2);
    border-radius: var(--radius-lg);
    text-decoration: none;
    color: inherit;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    animation: fadeInUp 0.5s ease both;
}

a.portal-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: rgba(15, 76, 129, 0.2);
}

.portal-kicker {
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent-color);
}

.portal-title {
    font-family: "Source Serif 4", Georgia, serif;
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-primary);
    margin: 0;
}

.portal-desc {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.5;
    flex: 1;
    margin: 0;
}

.portal-cta {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    font-weight: 800;
    color: var(--accent-color);
}

.portal-card--disabled {
    cursor: not-allowed;
    opacity: 0.6;
    pointer-events: none;
    background: rgba(255, 255, 255, 0.6);
    border-style: dashed;
}

.hero-header.doc-hero {
    margin-bottom: 1.25rem;
}

.hero-stats--compact {
    max-width: 220px;
    grid-template-columns: 1fr;
    justify-self: end;
    align-self: start;
}

@media (max-width: 1024px) {
    .hero-stats--compact {
        max-width: none;
        width: 100%;
    }
}

/* Employee Grouping Styles */
.location-group {
    margin-bottom: 3rem;
}

.location-heading {
    font-family: "Source Serif 4", Georgia, serif;
    font-size: 1.6rem;
    color: var(--accent-strong);
    border-bottom: 2px solid rgba(15, 76, 129, 0.1);
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
    font-weight: 800;
}

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

.employee-card {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(135, 148, 166, 0.2);
    border-radius: 16px;
    padding: 1rem 1.25rem;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.employee-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: rgba(15, 76, 129, 0.2);
}

.employee-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    text-transform: capitalize;
}

.employee-role {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 600;
}

@media (min-width: 1200px) {
    #employees-container {
        max-width: 1200px;
        margin: 0 auto;
    }
}
.scan-detail-divider {
    margin: 2rem 0;
    border: 0;
    border-top: 1px solid rgba(135, 148, 166, 0.2);
    opacity: 0.5;
}

.scan-detail-transcription-title {
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--accent-strong);
    margin-bottom: 0.75rem;
}

.scan-detail-transcription {
    font-family: var(--font-mono, 'JetBrains Mono', monospace);
    font-size: 0.92rem;
    line-height: 1.6;
    background: rgba(15, 76, 129, 0.03);
    padding: 1.25rem;
    border-radius: 12px;
    border: 1px solid rgba(15, 76, 129, 0.08);
    white-space: pre-wrap;
    color: var(--text-primary);
    max-height: 500px;
    overflow-y: auto;
}

:root {
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
}
