:root {
    --page-bg: #f5f7fa;
    --surface: #ffffff;
    --surface-soft: #f8fafc;
    --border: #dfe3e8;
    --border-strong: #c8ced6;

    --text: #1d2733;
    --text-secondary: #52606d;
    --muted: #75808f;

    --primary: #2457a6;
    --primary-hover: #1d4788;
    --primary-soft: #eef4ff;

    --success: #18794e;
    --success-soft: #edf8f2;

    --warning: #946200;
    --warning-soft: #fff8e5;

    --danger: #b42318;
    --danger-soft: #fff1f0;

    --radius: 8px;
    --shadow:
        0 1px 2px rgba(16, 24, 40, .04),
        0 2px 8px rgba(16, 24, 40, .05);
}

* {
    box-sizing: border-box;
}

html {
    color-scheme: light;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--page-bg);
    color: var(--text);
    font-family:
        "Segoe UI",
        Arial,
        Helvetica,
        sans-serif;
    font-size: 14px;
    line-height: 1.5;
}

a {
    color: var(--primary);
    text-decoration: none;
}

a:hover {
    color: var(--primary-hover);
}

button,
input,
textarea,
select {
    font: inherit;
}


/* ======================================================
   APPLICATION HEADER
   ====================================================== */

.topbar {
    min-height: 62px;
    background: #ffffff;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    padding: 0 30px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.brand-inline {
    color: var(--text);
    font-size: 17px;
    font-weight: 700;
    white-space: nowrap;
}

.brand-inline:hover {
    color: var(--primary);
}

.compact-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.compact-nav a {
    color: #4b5563;
    font-size: 13px;
    font-weight: 500;
    padding: 8px 10px;
    border-radius: 6px;
}

.compact-nav a:hover {
    color: var(--primary);
    background: #f4f6f8;
}


/* ======================================================
   MAIN APPLICATION LAYOUT
   ====================================================== */

.container {
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
    padding: 28px 0 70px;
}

.compact-container {
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
}


/* ======================================================
   PAGE TITLES
   ====================================================== */

.page-heading,
.page-title-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 20px;
}

.page-heading h1,
.page-title-row h1 {
    margin: 0 0 5px;
    color: var(--text);
    font-size: 25px;
    line-height: 1.25;
}

.page-heading p,
.page-title-row p {
    margin: 0;
    color: var(--text-secondary);
}


/* ======================================================
   BUTTONS
   ====================================================== */

.button {
    appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0 15px;
    border-radius: 6px;
    border: 1px solid transparent;
    cursor: pointer;
    font-weight: 600;
    font-size: 13px;
    transition:
        background .15s ease,
        border .15s ease,
        color .15s ease;
}

.button-primary {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.button-primary:hover {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
    color: white;
}

.button-secondary {
    background: #ffffff;
    color: #344054;
    border-color: var(--border-strong);
}

.button-secondary:hover {
    background: #f8fafc;
    color: var(--primary);
    border-color: #aab2bd;
}

.button-danger {
    background: var(--danger);
    color: white;
    border-color: var(--danger);
}

.button-danger:hover {
    background: #912018;
    color: white;
}

.button-warning {
    color: #815600;
    background: var(--warning-soft);
    border-color: #e8c66b;
}

.button-block {
    width: 100%;
}


/* ======================================================
   GENERAL PANELS
   ====================================================== */

.panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 18px;
    box-shadow: var(--shadow);
}

.panel h2 {
    margin: 0 0 12px;
    font-size: 18px;
}

.panel h3 {
    font-size: 15px;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 18px;
}

.panel-header h2 {
    margin: 0 0 4px;
}

.panel-header p {
    margin: 0;
    color: var(--text-secondary);
}

.section-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 12px;
}

.section-title h2 {
    margin: 0;
}

.section-title span {
    color: var(--muted);
    font-size: 12px;
}


/* ======================================================
   HOMEPAGE
   ====================================================== */

.home-hero {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(280px, .8fr);
    gap: 42px;
    align-items: center;

    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 42px;
    margin-bottom: 22px;
    box-shadow: var(--shadow);
}

.home-hero-copy {
    max-width: 760px;
}

.home-eyebrow,
.home-section-heading > span {
    display: block;
    color: var(--primary);
    font-size: 11px;
    line-height: 1;
    font-weight: 700;
    letter-spacing: .7px;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.home-hero h1 {
    margin: 0 0 15px;
    font-size: 37px;
    line-height: 1.15;
    letter-spacing: -.5px;
    color: #17202b;
}

.home-hero-copy > p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 16px;
    line-height: 1.7;
}

.home-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 24px;
}

.home-privacy-line {
    background: var(--primary-soft);
    border: 1px solid #cfddf4;
    border-radius: 8px;
    padding: 22px;
    color: #455468;
    line-height: 1.6;
}

.home-privacy-line strong {
    display: block;
    color: #1f4d91;
    font-size: 16px;
    margin-bottom: 5px;
}

.home-section {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 30px;
    margin-bottom: 22px;
    box-shadow: var(--shadow);
}

.home-section-heading {
    margin-bottom: 18px;
}

.home-section-heading h2 {
    margin: 0;
    font-size: 23px;
}

.home-lead {
    color: var(--text-secondary);
    line-height: 1.7;
    max-width: 850px;
    margin-bottom: 24px;
}

.home-info-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.home-info-item {
    background: var(--surface-soft);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 20px;
}

.home-info-item h3 {
    margin: 0 0 7px;
    font-size: 15px;
}

.home-info-item p {
    margin: 0;
    color: var(--text-secondary);
    line-height: 1.6;
}

.concern-list {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.concern-list span {
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 11px 12px;
    color: #344054;
    font-weight: 500;
}

.home-steps {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.home-steps > div {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 18px;
}

.home-steps > div > strong {
    width: 31px;
    height: 31px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-soft);
    color: var(--primary);
    border-radius: 50%;
    margin-bottom: 10px;
}

.home-steps h3 {
    margin: 0 0 6px;
    font-size: 15px;
}

.home-steps p {
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.55;
}

.home-split {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px;
}

.home-split > div {
    border-left: 3px solid var(--primary);
    padding-left: 18px;
}

.home-split h2 {
    margin: 0 0 8px;
    font-size: 20px;
}

.home-split p {
    color: var(--text-secondary);
    line-height: 1.65;
}

.text-link {
    display: inline-block;
    margin-top: 5px;
    font-weight: 600;
}

.home-admin-links,
.quick-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.home-admin-links a,
.quick-links a {
    background: #ffffff;
    border: 1px solid var(--border-strong);
    border-radius: 6px;
    padding: 8px 11px;
    color: #344054;
    font-size: 12px;
    font-weight: 600;
}

.home-admin-links a:hover,
.quick-links a:hover {
    background: var(--primary-soft);
    border-color: #b7cae8;
    color: var(--primary);
}


/* ======================================================
   WORKERS
   ====================================================== */

.worker-table {
    display: flex;
    flex-direction: column;
}

.worker-row {
    display: grid;
    grid-template-columns:
        minmax(260px, 1fr)
        100px
        150px
        auto;
    gap: 18px;
    align-items: center;
    padding: 14px 8px;
    border-top: 1px solid var(--border);
}

.worker-row:first-child {
    border-top: 0;
}

.worker-row-active {
    background: #f5f8fd;
}

.worker-name {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.worker-name strong {
    color: var(--text);
}

.worker-name span {
    color: var(--muted);
    font-size: 12px;
}

.worker-stat {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.worker-stat span {
    color: var(--muted);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .3px;
}

.worker-stat strong {
    font-size: 13px;
}


/* ======================================================
   STATS
   ====================================================== */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.stat-card {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 18px;
    box-shadow: var(--shadow);
}

.stat-card span {
    display: block;
    color: var(--muted);
    font-size: 12px;
    margin-bottom: 7px;
}

.stat-card strong {
    font-size: 26px;
}


/* ======================================================
   FORMS
   ====================================================== */

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 15px;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 14px;
}

.field label {
    color: #344054;
    font-size: 12px;
    font-weight: 600;
}

input,
textarea,
select {
    width: 100%;
    color: var(--text);
    background: #ffffff;
    border: 1px solid var(--border-strong);
    border-radius: 6px;
    padding: 10px 11px;
    outline: none;
}

input:focus,
textarea:focus,
select:focus {
    border-color: #6691cf;
    box-shadow: 0 0 0 3px rgba(36, 87, 166, .10);
}

textarea {
    resize: vertical;
    line-height: 1.55;
}

.help-text,
.muted {
    color: var(--muted);
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 9px;
}


/* ======================================================
   TABLES
   ====================================================== */

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th {
    background: #f8fafc;
    color: #667085;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .3px;
    text-align: left;
    padding: 10px;
    border-bottom: 1px solid var(--border);
}

.data-table td {
    padding: 11px 10px;
    border-bottom: 1px solid var(--border);
}

.data-table tr:hover td {
    background: #fbfcfd;
}


/* ======================================================
   REPORT LISTS
   ====================================================== */

.report-list {
    display: flex;
    flex-direction: column;
}

.report-row {
    display: grid;
    grid-template-columns: 160px 1fr auto;
    gap: 18px;
    align-items: center;
    padding: 14px 6px;
    border-top: 1px solid var(--border);
}

.report-row:hover {
    background: #fbfcfd;
}

.report-date,
.report-main span {
    color: var(--muted);
    font-size: 12px;
}

.report-main {
    display: flex;
    flex-direction: column;
    gap: 4px;
}


/* ======================================================
   STATUS / TAGS
   ====================================================== */

.status,
.tag,
.count-badge {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    border-radius: 20px;
    font-size: 11px;
    padding: 4px 8px;
}

.status-draft {
    color: #805600;
    background: var(--warning-soft);
    border: 1px solid #efd488;
}

.status-finalized {
    color: var(--success);
    background: var(--success-soft);
    border: 1px solid #b8dfc9;
}

.tag,
.count-badge {
    color: var(--primary);
    background: var(--primary-soft);
    border: 1px solid #cbdaf1;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}


/* ======================================================
   REPORT DETAILS
   ====================================================== */

.report-meta {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-bottom: 18px;
    overflow: hidden;
}

.report-meta > div {
    padding: 15px;
    border-right: 1px solid var(--border);
}

.report-meta > div:last-child {
    border-right: 0;
}

.report-meta span {
    display: block;
    color: var(--muted);
    font-size: 11px;
    margin-bottom: 5px;
}

.report-text {
    font-size: 14px;
    line-height: 1.75;
}

.details-list {
    margin: 0;
}

.details-list > div {
    display: grid;
    grid-template-columns: 180px 1fr;
    border-bottom: 1px solid var(--border);
    padding: 10px 0;
}

.details-list dt {
    color: var(--muted);
}

.details-list dd {
    margin: 0;
}


/* ======================================================
   TIMELINE
   ====================================================== */

.timeline {
    position: relative;
    padding-left: 25px;
}

.timeline::before {
    content: "";
    position: absolute;
    left: 6px;
    top: 10px;
    bottom: 10px;
    width: 2px;
    background: #d7dde5;
}

.timeline-entry {
    position: relative;
    margin-bottom: 18px;
}

.timeline-marker {
    position: absolute;
    left: -24px;
    top: 6px;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-soft);
}

.timeline-date {
    color: var(--primary);
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 7px;
}

.timeline-card {
    display: block;
    color: var(--text);
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 17px;
    box-shadow: var(--shadow);
}

.timeline-card:hover {
    border-color: #a9bfdc;
    color: var(--text);
}

.timeline-card-top {
    display: flex;
    justify-content: space-between;
    gap: 20px;
}

.timeline-card h2 {
    margin: 0 0 5px;
    font-size: 16px;
}

.timeline-card p,
.timeline-preview {
    color: var(--text-secondary);
}

.timeline-preview {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}


/* ======================================================
   SEARCH
   ====================================================== */

.search-form {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 9px;
}

.search-result {
    display: block;
    padding: 15px 2px;
    border-top: 1px solid var(--border);
    color: var(--text);
}

.search-result:hover {
    background: #fbfcfd;
}

.search-result-top {
    display: flex;
    justify-content: space-between;
    gap: 18px;
}

.search-result-top span,
.search-result p {
    color: var(--muted);
}


/* ======================================================
   ANALYSIS
   ====================================================== */

.analysis-columns,
.analysis-dashboard-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.analysis-dashboard-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.check-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 9px;
}

.check-card {
    display: flex;
    align-items: center;
    gap: 9px;
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 11px;
}

.check-card input {
    width: auto;
}

.event-review {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.event-review-row {
    display: grid;
    grid-template-columns:
        28px
        120px
        200px
        minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 7px;
    padding: 10px;
}

.event-review-row > input[type="checkbox"] {
    width: auto;
    margin-top: 10px;
}

.event-item {
    display: grid;
    grid-template-columns: 130px 1fr;
    gap: 18px;
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
}

.event-item-time {
    color: var(--primary);
    font-size: 12px;
    font-weight: 700;
}

.stat-table-row {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: center;
    padding: 11px 0;
    border-bottom: 1px solid var(--border);
}

.case-event-row {
    display: grid;
    grid-template-columns: 170px 1fr;
    gap: 20px;
    padding: 15px 0;
    border-bottom: 1px solid var(--border);
}

.case-event-date span,
.case-event-source {
    color: var(--muted);
    font-size: 11px;
}


/* ======================================================
   EVIDENCE
   ====================================================== */

.evidence-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.evidence-card {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
}

.evidence-preview {
    display: block;
    background: #f4f6f8;
    aspect-ratio: 16 / 10;
    overflow: hidden;
}

.evidence-preview img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
}

.evidence-document-preview {
    min-height: 160px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: #f8fafc;
    color: var(--primary);
}

.document-icon {
    border: 2px solid var(--border-strong);
    border-radius: 7px;
    padding: 15px;
    font-weight: 700;
}

.evidence-card-body {
    padding: 16px;
}

.evidence-card-body p {
    color: var(--text-secondary);
}

.evidence-card-top {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
}

.evidence-size {
    color: var(--muted);
    font-size: 11px;
}

.evidence-meta > div {
    padding: 8px 0;
    border-top: 1px solid var(--border);
}

.evidence-meta dt {
    color: var(--muted);
    font-size: 10px;
    text-transform: uppercase;
}

.evidence-meta dd {
    margin: 2px 0 0;
}

.evidence-meta code {
    color: #475467;
    overflow-wrap: anywhere;
}


/* ======================================================
   LEGAL / COMPLIANCE
   ====================================================== */

.legal-alert-panel {
    border-left: 4px solid #a46a00;
}

.legal-flag-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.legal-flag {
    background: #fffaf0;
    border: 1px solid #ead29b;
    border-radius: 7px;
    padding: 15px;
}

.legal-flag-heading {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
}

.legal-flag p {
    color: #5c4a2e;
}

.legal-match {
    margin-top: 10px;
}

.legal-match > span {
    color: var(--muted);
    font-size: 11px;
}

.legal-match blockquote {
    margin: 7px 0 0;
    padding: 10px 12px;
    border-left: 3px solid #cf9e45;
    background: white;
}

.legal-resources {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
}

.legal-resource {
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}

.legal-resource span {
    display: block;
    color: var(--muted);
    font-size: 11px;
}


/* ======================================================
   RIGHTS PAGE
   ====================================================== */

.home-rights-bar,
.info-callout,
.lawyer-callout,
.rights-notice {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 8px;
}

.home-rights-bar {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: center;
    padding: 14px 16px;
    margin-bottom: 15px;
}

.rights-notice {
    padding: 12px 14px;
    margin-bottom: 15px;
    background: #fffaf0;
}

.rights-row {
    display: grid;
    grid-template-columns:
        130px
        minmax(0, 1fr)
        auto;
    gap: 15px;
    align-items: center;
    padding: 13px 4px;
    border-top: 1px solid var(--border);
}

.rights-topic {
    color: var(--primary);
    font-weight: 700;
    font-size: 11px;
    text-transform: uppercase;
}

.rights-content p,
.rights-content span {
    color: var(--text-secondary);
}

.info-callout,
.lawyer-callout {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: center;
    padding: 18px;
    margin-bottom: 15px;
}

.lawyer-callout {
    border-left: 4px solid var(--success);
}

.lawyer-eyebrow {
    color: var(--success);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
}


/* ======================================================
   MANAGEMENT
   ====================================================== */

.manage-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.manage-summary > div {
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 7px;
    padding: 14px;
}

.manage-summary span {
    display: block;
    color: var(--muted);
    font-size: 11px;
    margin-bottom: 5px;
}

.manage-evidence-row {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    padding: 13px 0;
    border-top: 1px solid var(--border);
}

.danger-zone {
    border-left: 4px solid var(--danger);
}


/* ======================================================
   FINAL REPORT
   ====================================================== */

.final-report-filters {
    display: grid;
    grid-template-columns:
        repeat(5, minmax(0, 1fr))
        auto;
    gap: 12px;
    align-items: end;
}

.final-report-document {
    background: white;
}

.final-report-heading {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--border);
}

.generated-report-entry {
    padding: 22px 0;
    border-bottom: 1px solid var(--border);
}

.generated-original {
    background: #f8fafc;
    border-left: 3px solid var(--primary);
    padding: 15px;
    margin: 15px 0;
}

.generated-event {
    background: #f8fafc;
    border: 1px solid var(--border);
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 8px;
}

.pattern-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.pattern-grid > div {
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 7px;
    padding: 14px;
}


/* ======================================================
   AUTH
   ====================================================== */

.auth-body {
    background: #f3f5f8;
}

.auth-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 20px;
}

.auth-box {
    width: 100%;
    max-width: 410px;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 9px;
    padding: 26px;
    box-shadow: var(--shadow);
}

.auth-box h1 {
    margin: 0 0 5px;
}

.auth-box > p {
    color: var(--muted);
}


/* ======================================================
   FLASH MESSAGES
   ====================================================== */

.flash {
    border-radius: 7px;
    padding: 12px 14px;
    margin-bottom: 18px;
}

.flash-success {
    color: #146c43;
    background: var(--success-soft);
    border: 1px solid #b8dfc9;
}

.flash-error {
    color: var(--danger);
    background: var(--danger-soft);
    border: 1px solid #efc0bc;
}


/* ======================================================
   EMPTY STATE / FOOTER
   ====================================================== */

.empty-state {
    text-align: center;
    padding: 40px 20px;
}

.empty-state p {
    color: var(--muted);
}

.footer {
    border-top: 1px solid var(--border);
    background: #ffffff;
    color: var(--muted);
    text-align: center;
    padding: 25px;
    font-size: 11px;
}


/* ======================================================
   RESPONSIVE
   ====================================================== */

@media (max-width: 1000px) {

    .home-hero {
        grid-template-columns: 1fr;
    }

    .concern-list,
    .home-steps {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .final-report-filters {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

}

@media (max-width: 820px) {

    .topbar {
        align-items: flex-start;
        flex-direction: column;
        padding: 14px 18px;
        gap: 8px;
    }

    .compact-nav {
        width: 100%;
        justify-content: flex-start;
        overflow-x: auto;
        flex-wrap: nowrap;
    }

    .container,
    .compact-container {
        width: min(100% - 24px, 1180px);
    }

    .home-hero {
        padding: 26px;
    }

    .home-hero h1 {
        font-size: 29px;
    }

    .home-info-grid,
    .home-split,
    .analysis-columns,
    .analysis-dashboard-grid,
    .evidence-grid,
    .pattern-grid,
    .form-grid {
        grid-template-columns: 1fr;
    }

    .concern-list,
    .home-steps {
        grid-template-columns: 1fr;
    }

    .worker-row,
    .report-row,
    .event-review-row,
    .event-item,
    .case-event-row,
    .rights-row {
        grid-template-columns: 1fr;
    }

    .stats-grid,
    .manage-summary,
    .report-meta {
        grid-template-columns: 1fr;
    }

    .report-meta > div {
        border-right: 0;
        border-bottom: 1px solid var(--border);
    }

    .page-heading,
    .page-title-row,
    .panel-header {
        flex-direction: column;
    }

    .search-form {
        grid-template-columns: 1fr;
    }

}


/* ======================================================
   PRINT
   ====================================================== */

@media print {

    .topbar,
    .footer,
    .final-report-filters,
    .final-report-actions {
        display: none !important;
    }

    body {
        background: white !important;
        color: black !important;
    }

    .container {
        width: 100%;
        padding: 0;
    }

    .panel,
    .timeline-card,
    .final-report-document {
        border: 0;
        box-shadow: none;
    }

}
/* ======================================================
   REFINED ENTERPRISE / EDITORIAL UI
   Removes Bootstrap-style boxiness
   ====================================================== */

:root {
    --radius: 3px;
}


/* ---------- PAGE ---------- */

body {
    background: #f7f8fa;
}

.container,
.compact-container {
    width: min(1220px, calc(100% - 56px));
}


/* ---------- HEADER ---------- */

.topbar {
    min-height: 64px;
    padding: 0 34px;
    box-shadow: none;
    border-bottom: 1px solid #e2e5e9;
}

.brand-inline {
    font-size: 18px;
    letter-spacing: -.2px;
}

.compact-nav a {
    border-radius: 2px;
    padding: 9px 11px;
}

.compact-nav a:hover {
    background: transparent;
    color: var(--primary);
}


/* ======================================================
   HOMEPAGE
   ====================================================== */

.home-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.8fr) minmax(260px, .7fr);
    gap: 70px;
    align-items: center;

    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;

    padding: 64px 10px 58px;
    margin: 0;
    border-bottom: 1px solid #dde2e7;
}

.home-hero-copy {
    max-width: 760px;
}

.home-hero h1 {
    font-size: 43px;
    line-height: 1.08;
    letter-spacing: -1.2px;
    margin-bottom: 20px;
}

.home-hero-copy > p {
    max-width: 720px;
    font-size: 17px;
    line-height: 1.7;
    color: #596575;
}

.home-eyebrow,
.home-section-heading > span {
    color: #315f9c;
    letter-spacing: 1.1px;
    font-size: 10px;
}

.home-hero-actions {
    margin-top: 28px;
}

.home-privacy-line {
    background: transparent;
    border: 0;
    border-left: 3px solid var(--primary);
    border-radius: 0;

    padding: 8px 0 8px 20px;

    color: #647181;
    font-size: 13px;
}

.home-privacy-line strong {
    font-size: 14px;
    color: #25364b;
}


/* ---------- CONTENT SECTIONS ---------- */

.home-section {
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;

    padding: 48px 10px;
    margin: 0;

    border-bottom: 1px solid #e1e5ea;
}

.home-section-heading {
    margin-bottom: 25px;
}

.home-section-heading h2 {
    font-size: 27px;
    letter-spacing: -.4px;
}


/* ---------- WHY DOCUMENT ---------- */

.home-info-grid {
    gap: 0;
    border-top: 1px solid #dde2e7;
}

.home-info-item {
    background: transparent;
    border: 0;
    border-radius: 0;

    padding: 25px 30px 20px 0;
}

.home-info-item + .home-info-item {
    padding-left: 30px;
    border-left: 1px solid #dde2e7;
}

.home-info-item h3 {
    font-size: 16px;
    margin-bottom: 8px;
}

.home-info-item p {
    max-width: 320px;
}


/* ---------- CONCERNS ---------- */

.concern-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    border-top: 1px solid #dde2e7;
}

.concern-list span {
    background: transparent;
    border: 0;
    border-radius: 0;

    padding: 13px 26px 13px 0;
    margin-right: 26px;

    font-size: 13px;
    font-weight: 600;

    border-bottom: 1px solid #edf0f2;
}


/* ---------- STEPS ---------- */

.home-steps {
    gap: 0;
    border-top: 1px solid #dde2e7;
}

.home-steps > div {
    border: 0;
    border-radius: 0;
    padding: 25px 28px 10px 0;
}

.home-steps > div + div {
    padding-left: 28px;
    border-left: 1px solid #dde2e7;
}

.home-steps > div > strong {
    background: transparent;
    color: var(--primary);

    border: 1px solid #aabbd2;

    width: 30px;
    height: 30px;

    font-size: 12px;
}

.home-steps h3 {
    font-size: 16px;
}


/* ---------- RIGHTS / NEUTRAL REVIEW ---------- */

.home-split {
    gap: 70px;
}

.home-split > div {
    border-left: 0;
    padding-left: 0;
}

.home-split > div + div {
    border-left: 1px solid #dde2e7;
    padding-left: 50px;
}

.home-split h2 {
    font-size: 23px;
}


/* ---------- ADMIN HOME LINKS ---------- */

.home-admin-links {
    gap: 24px;
    border-top: 1px solid #dde2e7;
    padding-top: 18px;
}

.home-admin-links a {
    border: 0;
    border-radius: 0;
    background: transparent;

    padding: 0;

    color: var(--primary);
    font-size: 13px;
}

.home-admin-links a:hover {
    background: transparent;
    text-decoration: underline;
}


/* ======================================================
   INTERNAL APPLICATION PAGES
   ====================================================== */

.panel {
    background: #ffffff;

    border: 0;
    border-top: 1px solid #d9dee5;

    border-radius: 0;
    box-shadow: none;

    padding: 22px 0 26px;
    margin-bottom: 24px;
}

.panel:first-of-type {
    border-top: 0;
}


/* ---------- STATS ---------- */

.stats-grid {
    gap: 1px;
    background: #dde2e7;
    border-top: 1px solid #dde2e7;
    border-bottom: 1px solid #dde2e7;
}

.stat-card {
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: #ffffff;

    padding: 20px;
}


/* ---------- WORKER FILES ---------- */

.worker-row {
    padding: 15px 5px;
}

.worker-row-active {
    background: #f1f5fa;
}


/* ---------- FORMS ---------- */

input,
textarea,
select {
    border-radius: 2px;
    background: white;
}

.button {
    border-radius: 3px;
}

.button-secondary {
    box-shadow: none;
}


/* ---------- TIMELINE ---------- */

.timeline-card {
    border: 0;
    border-top: 1px solid #dde2e7;
    border-radius: 0;
    box-shadow: none;

    padding: 18px 4px;
    background: transparent;
}

.timeline-card:hover {
    background: #fafbfc;
    border-color: #bcc6d2;
}


/* ---------- EVIDENCE ---------- */

.evidence-card {
    border-radius: 2px;
    box-shadow: none;
}


/* ---------- LEGAL FLAG ---------- */

.legal-alert-panel {
    border-left: 0;
    border-top: 3px solid #a46a00;
}

.legal-flag {
    border-radius: 2px;
}


/* ---------- RIGHTS ---------- */

.info-callout,
.lawyer-callout,
.home-rights-bar,
.rights-notice {
    border-radius: 2px;
}


/* ---------- MOBILE ---------- */

@media (max-width: 820px) {

    .container,
    .compact-container {
        width: min(100% - 28px, 1220px);
    }

    .home-hero {
        padding: 38px 0;
        gap: 30px;
    }

    .home-hero h1 {
        font-size: 34px;
    }

    .home-section {
        padding: 35px 0;
    }

    .home-info-item,
    .home-info-item + .home-info-item,
    .home-steps > div,
    .home-steps > div + div,
    .home-split > div,
    .home-split > div + div {
        padding-left: 0;
        border-left: 0;
    }

    .home-info-item + .home-info-item,
    .home-steps > div + div {
        border-top: 1px solid #dde2e7;
    }

}


/* ======================================================
   HOMEPAGE PHOTOGRAPHY
   ====================================================== */

.home-hero-visual {
    position: relative;
    min-height: 390px;
    overflow: hidden;
}

.home-hero-visual img {
    width: 100%;
    height: 390px;
    display: block;
    object-fit: cover;
    object-position: center;
}

.home-image-note {
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 18px;

    padding: 14px 16px;

    background: rgba(255, 255, 255, .94);
    border-left: 3px solid var(--primary);

    color: #536071;
    font-size: 12px;
}

.home-image-note strong {
    display: block;
    color: #1d2733;
    font-size: 14px;
    margin-bottom: 2px;
}


/* ---------- EDITORIAL IMAGE STRIP ---------- */

.home-photo-band {
    display: grid;
    grid-template-columns: 1.55fr 1fr;
    gap: 10px;

    margin: 38px 0;
}

.home-photo-large,
.home-photo-small {
    position: relative;
    overflow: hidden;
    min-height: 280px;
}

.home-photo-band img {
    width: 100%;
    height: 100%;
    min-height: 280px;

    display: block;
    object-fit: cover;

    transition: transform .35s ease;
}

.home-photo-band > div:hover img {
    transform: scale(1.025);
}

.home-photo-caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;

    padding: 36px 22px 18px;

    background:
        linear-gradient(
            to top,
            rgba(13, 24, 38, .82),
            rgba(13, 24, 38, 0)
        );

    color: white;
}

.home-photo-caption span {
    display: block;
    opacity: .8;
    font-size: 11px;
    margin-bottom: 3px;
}

.home-photo-caption strong {
    display: block;
    font-size: 17px;
    font-weight: 600;
}


/* ---------- RESPONSIVE IMAGES ---------- */

@media (max-width: 900px) {

    .home-photo-band {
        grid-template-columns: 1fr;
    }

    .home-hero-visual {
        min-height: 300px;
    }

    .home-hero-visual img {
        height: 300px;
    }

}


/* ======================================================
   WORKER CONTEXT NAVIGATION
   ====================================================== */

.worker-context-bar {
    background: #ffffff;
    border-bottom: 1px solid #dfe3e8;
}

.worker-context-inner {
    width: min(1220px, calc(100% - 56px));
    margin: 0 auto;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;

    min-height: 54px;
}

.worker-context-identity {
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.worker-context-identity span {
    color: #75808f;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .8px;
    text-transform: uppercase;
}

.worker-context-identity strong {
    color: #1d2733;
    font-size: 14px;
}

.worker-context-nav {
    display: flex;
    align-items: center;
    gap: 2px;
}

.worker-context-nav a {
    color: #52606d;
    font-size: 12px;
    font-weight: 600;
    padding: 8px 9px;
}

.worker-context-nav a:hover {
    color: var(--primary);
}

@media (max-width: 820px) {

    .worker-context-inner {
        width: min(100% - 28px, 1220px);
        flex-direction: column;
        align-items: flex-start;
        padding: 10px 0;
        gap: 6px;
    }

    .worker-context-nav {
        width: 100%;
        overflow-x: auto;
        white-space: nowrap;
    }

}


/* ======================================================
   DATABASE / WORKBENCH UI
   ====================================================== */

.db-page-header {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 20px;

    margin-bottom: 15px;
    padding-bottom: 12px;

    border-bottom: 1px solid #d5dae0;
}

.db-page-header h1 {
    margin: 0 0 2px;
    font-size: 22px;
}

.db-page-header p {
    margin: 0;
    color: #75808f;
    font-size: 11px;
}

.db-add-link {
    color: #ffffff;
    background: #2457a6;

    padding: 7px 11px;

    font-size: 11px;
    font-weight: 700;

    border-radius: 2px;
}

.db-add-link:hover {
    color: white;
    background: #1d4788;
}

.db-table-wrap {
    width: 100%;
    overflow-x: auto;

    background: #ffffff;
    border-top: 1px solid #cfd5dc;
    border-bottom: 1px solid #cfd5dc;
}

.db-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.db-table thead {
    background: #eef1f4;
}

.db-table th {
    text-align: left;

    padding: 8px 10px;

    color: #596575;

    font-size: 9px;
    font-weight: 700;

    letter-spacing: .55px;
    text-transform: uppercase;

    border-bottom: 1px solid #cfd5dc;
}

.db-table td {
    padding: 9px 10px;

    border-bottom: 1px solid #e3e7eb;

    vertical-align: middle;
}

.db-table tbody tr:nth-child(odd) {
    background: #ffffff;
}

.db-table tbody tr:nth-child(even) {
    background: #f6f8fa;
}

.db-table tbody tr:hover {
    background: #edf4fc;
}

.db-worker-name strong {
    display: block;
    color: #17202b;
    font-size: 12px;
}

.db-worker-name small {
    color: #84909e;
    font-size: 9px;
}

.db-number {
    font-weight: 700;
    text-align: center;
}

.db-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.db-link {
    display: inline-flex;
    align-items: center;

    padding: 4px 7px;

    border-radius: 2px;

    font-size: 10px;
    font-weight: 700;

    white-space: nowrap;
}

.db-link-blue {
    background: #eaf2ff;
    color: #2457a6;
}

.db-link-blue:hover {
    background: #d9e7fb;
}

.db-link-green {
    background: #e8f6ee;
    color: #18794e;
}

.db-link-green:hover {
    background: #d5ecdf;
}

.db-link-purple {
    background: #f0ebfa;
    color: #6941a5;
}

.db-link-purple:hover {
    background: #e3d9f5;
}

.db-link-teal {
    background: #e5f5f4;
    color: #14756f;
}

.db-link-teal:hover {
    background: #d3ecea;
}

.db-empty {
    background: white;
    border-top: 1px solid #d5dae0;
    border-bottom: 1px solid #d5dae0;

    padding: 20px;

    color: #75808f;
}

@media (max-width: 800px) {

    .db-page-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .db-table {
        min-width: 820px;
    }

}


/* ======================================================
   FINAL REPORT CASE SUMMARY
   ====================================================== */

.case-summary-section {
    border-top: 2px solid #2457a6;
}

.case-summary-narrative {
    max-width: 1000px;
    font-size: 14px;
    line-height: 1.75;
    color: #344054;
}

.case-summary-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    border-top: 1px solid #d8dde3;
    border-bottom: 1px solid #d8dde3;
    margin: 20px 0 24px;
}

.case-summary-stats > div {
    padding: 13px 16px;
    border-right: 1px solid #d8dde3;
}

.case-summary-stats > div:last-child {
    border-right: 0;
}

.case-summary-stats span {
    display: block;
    color: #75808f;
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-bottom: 4px;
}

.case-summary-stats strong {
    font-size: 18px;
}

.case-summary-columns {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 45px;
}

.case-summary-columns h3,
.case-observed-patterns h3 {
    margin: 0 0 10px;
    font-size: 14px;
}

.case-summary-row,
.case-summary-legal,
.case-pattern-line {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 8px 0;
    border-bottom: 1px solid #e4e7eb;
}

.case-summary-row strong {
    color: #2457a6;
}

.case-summary-legal {
    flex-direction: column;
    gap: 2px;
}

.case-summary-legal > strong {
    color: #7a5200;
}

.case-summary-legal > span {
    color: #75808f;
    font-size: 10px;
}

.case-summary-disclaimer {
    color: #667085;
    font-size: 10px;
    line-height: 1.5;
    margin-top: 12px;
}

.case-observed-patterns {
    margin-top: 25px;
    padding-top: 18px;
    border-top: 1px solid #d8dde3;
}

.case-pattern-line {
    font-size: 12px;
}

.case-pattern-line > span:last-child {
    color: #75808f;
}

@media (max-width: 800px) {

    .case-summary-stats,
    .case-summary-columns {
        grid-template-columns: 1fr;
    }

    .case-summary-stats > div {
        border-right: 0;
        border-bottom: 1px solid #d8dde3;
    }

}



/* ======================================================
   OPERATIONAL ANALYSIS REVIEW
   ====================================================== */

.operational-finding-review {
    border: 1px solid #d8dde3;
    margin: 12px 0;
    background: #fff;
}

.operational-finding-review > summary {
    cursor: pointer;
    padding: 12px 14px;
    font-weight: 700;
    background: #f6f8fa;
    border-bottom: 1px solid #d8dde3;
}

.operational-finding-review[open] > .field,
.operational-finding-review[open] > .form-grid {
    margin-left: 14px;
    margin-right: 14px;
}

.operational-finding-review[open] > .field:last-child {
    margin-bottom: 14px;
}


/* ======================================================
   WORKER PROFILE / CASE FILE
   ====================================================== */

.worker-profile-header {
    display: grid;
    grid-template-columns: 110px minmax(0, 1fr);
    gap: 20px;
    align-items: start;
    padding: 18px 0;
    border-top: 2px solid #1f4f8f;
    border-bottom: 1px solid #d8dde3;
}

.worker-profile-photo {
    width: 96px;
    height: 96px;
}

.worker-profile-photo img,
.worker-profile-initials {
    width: 96px;
    height: 96px;
    border-radius: 8px;
    border: 1px solid #cfd6df;
    object-fit: cover;
    background: #f3f5f7;
}

.worker-profile-initials {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    font-weight: 800;
    color: #475467;
}

.worker-profile-name-row {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: flex-start;
}

.worker-profile-name-row h1 {
    margin: 0;
    font-size: 25px;
}

.worker-profile-name-row p {
    margin: 3px 0 0;
    color: #667085;
    font-size: 13px;
}

.worker-profile-facts {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-top: 16px;
    border-top: 1px solid #e4e7eb;
}

.worker-profile-facts > div {
    padding: 9px 12px 9px 0;
}

.worker-profile-facts span,
.worker-profile-stats span {
    display: block;
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: .45px;
    color: #667085;
    margin-bottom: 2px;
}

.worker-profile-facts strong {
    font-size: 12px;
}

.worker-profile-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    padding: 11px 0;
    border-bottom: 1px solid #d8dde3;
    font-size: 12px;
}

.worker-profile-actions a,
.worker-report-actions a {
    text-decoration: none;
    font-weight: 700;
}

.worker-profile-stats {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    margin: 14px 0 18px;
    border: 1px solid #d8dde3;
    background: #fff;
}

.worker-profile-stats > div {
    padding: 10px 12px;
    border-right: 1px solid #e4e7eb;
}

.worker-profile-stats > div:last-child {
    border-right: 0;
}

.worker-profile-stats strong {
    font-size: 17px;
}

.worker-profile-report-section {
    margin-top: 12px;
}

.worker-profile-report-table {
    min-width: 900px;
}

.worker-report-title {
    font-weight: 700;
    text-decoration: none;
}

.worker-report-actions {
    display: flex;
    gap: 10px;
    white-space: nowrap;
}

.worker-signal {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 9px;
    font-weight: 700;
}

.worker-signal-review {
    background: #fff4d6;
    color: #7a5200;
}

.worker-signal-legal {
    background: #fff0ee;
    color: #9f2d20;
}

.worker-signal-clear {
    color: #667085;
}

@media (max-width: 900px) {

    .worker-profile-header {
        grid-template-columns: 86px minmax(0, 1fr);
    }

    .worker-profile-photo,
    .worker-profile-photo img,
    .worker-profile-initials {
        width: 76px;
        height: 76px;
    }

    .worker-profile-facts {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .worker-profile-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .worker-profile-stats > div {
        border-bottom: 1px solid #e4e7eb;
    }

}

@media (max-width: 600px) {

    .worker-profile-header {
        grid-template-columns: 1fr;
    }

    .worker-profile-name-row {
        flex-direction: column;
    }

    .worker-profile-facts {
        grid-template-columns: 1fr 1fr;
    }

}


/* ======================================================
   WORK JOURNAL - SOURCE RECORD WORKBENCH
   ====================================================== */

.journal-page {
    background: #f4f6f8;
    color: #1f2933;
    border: 1px solid #cfd6dd;
    padding: 16px;
}

.journal-header {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: flex-start;
    padding-bottom: 14px;
    border-bottom: 2px solid #26384a;
}

.journal-header h1 {
    margin: 2px 0 4px;
    font-size: 24px;
    color: #18212b;
}

.journal-header p {
    margin: 0;
    color: #5d6875;
    font-size: 12px;
}

.journal-eyebrow {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .75px;
    color: #345b7e;
}

.journal-header-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.journal-header-actions form {
    margin: 0;
}

.journal-integrity-bar {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    padding: 9px 10px;
    background: #e9edf1;
    border-left: 4px solid #345b7e;
    border-bottom: 1px solid #cfd6dd;
    font-size: 11px;
}

.journal-integrity-bar strong {
    margin-right: 10px;
}

.journal-integrity-status {
    white-space: nowrap;
}

.journal-integrity-ok {
    color: #176b3a;
    font-weight: 800;
}

.journal-integrity-bad {
    color: #a12622;
    font-weight: 800;
}

.journal-workbench {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 220px;
    gap: 14px;
    margin-top: 14px;
}

.journal-conversation {
    background: #ffffff;
    border: 1px solid #cfd6dd;
}

.journal-message {
    padding: 12px 14px;
    border-bottom: 1px solid #dde2e7;
}

.journal-message-system {
    background: #f0f4f7;
}

.journal-message-worker {
    background: #ffffff;
}

.journal-message-meta {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 6px;
    font-size: 10px;
    color: #68737f;
}

.journal-message-meta strong {
    color: #26384a;
}

.journal-message-text {
    font-size: 13px;
    line-height: 1.55;
    color: #202830;
}

.journal-compose {
    padding: 14px;
    background: #f8fafb;
    border-top: 2px solid #345b7e;
}

.journal-compose label {
    display: block;
    margin-bottom: 6px;
    font-size: 12px;
    font-weight: 800;
    color: #26384a;
}

.journal-compose textarea {
    width: 100%;
    resize: vertical;
    background: #ffffff !important;
    color: #202830 !important;
    border: 1px solid #aeb8c2 !important;
    border-radius: 2px !important;
}

.journal-compose-actions {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    margin-top: 8px;
}

.journal-compose-actions span {
    color: #68737f;
    font-size: 10px;
}

.journal-close-form {
    margin: 0;
    padding: 8px 14px 12px;
    background: #f8fafb;
}

.journal-close-link {
    border: 0;
    background: transparent;
    padding: 0;
    color: #6b4f00;
    font-size: 10px;
    font-weight: 700;
    text-decoration: underline;
    cursor: pointer;
}

.journal-closed-notice {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    background: #eef4ee;
    border-top: 1px solid #c7d8c7;
    font-size: 11px;
}

.journal-history {
    background: #ffffff;
    border: 1px solid #cfd6dd;
    align-self: start;
}

.journal-history-title {
    padding: 8px 10px;
    background: #26384a;
    color: #ffffff;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .65px;
}

.journal-history-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2px;
    padding: 8px 10px;
    border-bottom: 1px solid #dde2e7;
    color: #26384a;
    text-decoration: none;
    font-size: 10px;
}

.journal-history-row:hover,
.journal-history-row-active {
    background: #eaf0f5;
}

.journal-history-row span {
    color: #68737f;
}

.journal-proof-note {
    margin-top: 14px;
    padding: 10px 12px;
    background: #fffdf4;
    border: 1px solid #ddd3a8;
    font-size: 11px;
}

.journal-proof-note strong {
    display: block;
    margin-bottom: 3px;
    color: #594700;
}

.journal-proof-note p {
    margin: 0;
    color: #665b35;
    line-height: 1.45;
}

@media (max-width: 800px) {
    .journal-workbench {
        grid-template-columns: 1fr;
    }

    .journal-header {
        flex-direction: column;
    }

    .journal-compose-actions {
        align-items: flex-start;
        flex-direction: column;
    }
}


/* ======================================================
   CURRENT WORKER NAVIGATION
   ====================================================== */

a.current-worker {
    text-decoration: none;
    cursor: pointer;
}

a.current-worker:hover strong {
    text-decoration: underline;
}


/* ======================================================
   HISTORICAL INTAKE
   ====================================================== */

.historical-page {
    width: 100%;
}

.historical-principle {
    display: flex;
    gap: 14px;
    align-items: center;
    padding: 10px 12px;
    margin-bottom: 12px;
    border: 1px solid #cfd7df;
    background: #f7f9fb;
    color: #2a3440;
}

.historical-principle strong {
    white-space: nowrap;
}

.historical-principle span {
    color: #5e6873;
    font-size: 11px;
}

.historical-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 12px;
    align-items: start;
}

.historical-import-panel textarea[name="original_text"] {
    font-family: Consolas, "Courier New", monospace;
    font-size: 12px;
    line-height: 1.45;
}

.historical-batch-list {
    position: sticky;
    top: 8px;
    max-height: 78vh;
    overflow: auto;
}

.historical-batch-row {
    display: grid;
    gap: 3px;
    padding: 9px 8px;
    border-bottom: 1px solid #e1e6ea;
    text-decoration: none;
    color: #28323c;
}

.historical-batch-row:hover,
.historical-batch-row-active {
    background: #eef4f8;
}

.historical-batch-row span {
    color: #68737f;
    font-size: 10px;
}

.historical-record-view {
    margin-top: 12px;
}

.historical-meta-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border: 1px solid #d7dde3;
    margin-bottom: 12px;
}

.historical-meta-grid > div {
    padding: 8px 10px;
    border-right: 1px solid #e1e6ea;
    border-bottom: 1px solid #e1e6ea;
}

.historical-meta-grid span {
    display: block;
    margin-bottom: 2px;
    color: #68737f;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
}

.historical-meta-grid strong {
    color: #202a34;
    font-size: 11px;
}

.historical-source-text {
    border: 1px solid #d7dde3;
    background: #fff;
}

.historical-source-heading {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 10px;
    border-bottom: 1px solid #d7dde3;
    background: #f5f7f9;
    font-size: 10px;
}

.historical-source-heading span {
    color: #68737f;
}

.historical-source-text pre {
    margin: 0;
    padding: 12px;
    max-height: 520px;
    overflow: auto;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    color: #202830;
    background: #fff;
    font-family: Consolas, "Courier New", monospace;
    font-size: 11px;
    line-height: 1.5;
}

.historical-file-list {
    margin-top: 14px;
}

.historical-file-row {
    display: grid;
    grid-template-columns: minmax(200px, 1fr) auto;
    gap: 3px 12px;
    padding: 8px 0;
    border-bottom: 1px solid #e1e6ea;
    font-size: 10px;
}

.historical-file-row a {
    color: #285f8f;
    font-weight: 700;
    text-decoration: none;
}

.historical-file-row span,
.historical-file-row small {
    color: #68737f;
}

.historical-file-row small {
    grid-column: 1 / -1;
}

.historical-notes,
.historical-void-note {
    margin-top: 14px;
    padding: 10px 12px;
    border-left: 3px solid #4a6b85;
    background: #f7f9fb;
}

.historical-void-note {
    border-left-color: #a14b43;
    background: #fff7f6;
}

.historical-void-control {
    margin-top: 16px;
    border-top: 1px solid #dde3e8;
    padding-top: 10px;
}

.historical-void-control summary {
    cursor: pointer;
    color: #6a4240;
    font-size: 10px;
    font-weight: 700;
}

@media (max-width: 900px) {
    .historical-grid {
        grid-template-columns: 1fr;
    }

    .historical-batch-list {
        position: static;
        max-height: none;
    }

    .historical-meta-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 600px) {
    .historical-principle {
        align-items: flex-start;
        flex-direction: column;
    }

    .historical-meta-grid {
        grid-template-columns: 1fr;
    }

    .historical-file-row {
        grid-template-columns: 1fr;
    }
}


/* ======================================================
   USER ADMINISTRATION
   ====================================================== */

.user-admin-note {
    display: flex;
    gap: 16px;
    align-items: center;
    padding: 10px 12px;
    margin-bottom: 12px;
    border: 1px solid #cfd7df;
    background: #f7f9fb;
}

.user-admin-note strong {
    white-space: nowrap;
    color: #25313b;
}

.user-admin-note span {
    color: #5e6873;
    font-size: 11px;
}

.user-admin-table {
    width: 100%;
    overflow-x: auto;
}

.user-admin-head,
.user-admin-row {
    display: grid;
    grid-template-columns:
        minmax(170px, 1.3fr)
        minmax(200px, 1.5fr)
        90px
        90px
        minmax(120px, 1fr)
        minmax(220px, 1.5fr);
    gap: 10px;
    align-items: center;
}

.user-admin-head {
    padding: 7px 8px;
    border-bottom: 2px solid #cdd5dc;
    background: #f1f4f6;
    color: #58636d;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
}

.user-admin-row {
    padding: 9px 8px;
    border-bottom: 1px solid #e1e6ea;
    color: #26323c;
    font-size: 11px;
}

.user-admin-identity {
    display: grid;
    gap: 2px;
}

.user-admin-identity span {
    color: #69747f;
    font-size: 10px;
}

.user-self-badge {
    display: inline-block;
    margin-left: 5px;
    padding: 1px 4px;
    border: 1px solid #aab7c2;
    background: #f6f8fa;
    color: #52606c !important;
    font-size: 8px !important;
    font-weight: 700;
}

.user-role-form {
    display: flex;
    gap: 6px;
    align-items: center;
}

.user-role-form select {
    min-width: 110px;
}

.user-admin-actions {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: wrap;
}

.user-status {
    display: inline-block;
    padding: 2px 6px;
    border: 1px solid;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
}

.user-status-active {
    border-color: #87aa95;
    background: #f1f8f3;
    color: #386848;
}

.user-status-inactive {
    border-color: #c8a4a0;
    background: #fff5f4;
    color: #8b443e;
}

.user-audit-protected,
.user-self-note {
    color: #747e87;
    font-size: 9px;
    font-weight: 700;
}

.user-role-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    border: 1px solid #d7dde3;
}

.user-role-grid > div {
    padding: 10px 12px;
    border-right: 1px solid #d7dde3;
}

.user-role-grid > div:last-child {
    border-right: 0;
}

.user-role-grid strong {
    display: block;
    margin-bottom: 4px;
    color: #26323c;
}

.user-role-grid span {
    color: #68737f;
    font-size: 10px;
    line-height: 1.45;
}

@media (max-width: 900px) {
    .user-admin-head {
        display: none;
    }

    .user-admin-row {
        grid-template-columns: 1fr;
        border: 1px solid #dde3e8;
        margin-bottom: 8px;
    }

    .user-role-grid {
        grid-template-columns: 1fr;
    }

    .user-role-grid > div {
        border-right: 0;
        border-bottom: 1px solid #d7dde3;
    }

    .user-role-grid > div:last-child {
        border-bottom: 0;
    }

    .user-admin-note {
        align-items: flex-start;
        flex-direction: column;
    }
}

/* ======================================================
   JOURNAL INTELLIGENCE ENGINE
   ====================================================== */

.journal-intelligence-panel {
    margin: 12px 0;
    padding: 12px 14px;
    border: 1px solid #cfd7df;
    background: #f8fafb;
    color: #25313b;
}

.journal-intelligence-panel-error {
    border-left: 3px solid #a14b43;
    background: #fff7f6;
}

.journal-intelligence-head {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: flex-start;
}

.journal-intelligence-head > div {
    min-width: 0;
}

.journal-intelligence-eyebrow {
    display: block;
    margin-bottom: 4px;
    color: #64717c;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .7px;
}

.journal-intelligence-head strong {
    display: block;
    color: #202b34;
    font-size: 12px;
    line-height: 1.45;
}

.journal-intelligence-stats {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid #dde3e8;
    color: #66727d;
    font-size: 10px;
}

.journal-intelligence-stats strong {
    color: #24323d;
}

.journal-intelligence-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 9px;
}

.journal-intelligence-tag {
    display: inline-block;
    padding: 3px 6px;
    border: 1px solid #ccd5dc;
    background: #fff;
    color: #495762;
    font-size: 9px;
    font-weight: 700;
}

.journal-intelligence-tag-concern {
    border-color: #d8bc82;
    background: #fffaf0;
    color: #775a1f;
}

.journal-intelligence-tag-high,
.journal-intelligence-tag-critical {
    border-color: #c99c98;
    background: #fff5f4;
    color: #883e38;
}

.journal-intelligence-tag-critical {
    font-weight: 800;
}

.journal-intelligence-context,
.journal-intelligence-questions,
.journal-intelligence-footnote {
    margin-top: 9px;
    font-size: 10px;
    line-height: 1.45;
}

.journal-intelligence-context {
    color: #53616c;
}

.journal-intelligence-questions {
    display: grid;
    gap: 4px;
    padding: 8px 10px;
    border-left: 3px solid #657f94;
    background: #fff;
}

.journal-intelligence-questions > span::before {
    content: "- ";
}

.journal-intelligence-questions small,
.journal-intelligence-footnote {
    color: #6c7781;
}

.journal-intelligence-footnote {
    padding-top: 8px;
    border-top: 1px solid #e1e6ea;
}

.journal-intel-disclaimer {
    display: flex;
    gap: 14px;
    align-items: center;
    margin-bottom: 12px;
    padding: 10px 12px;
    border: 1px solid #cfd7df;
    background: #f7f9fb;
}

.journal-intel-disclaimer strong {
    white-space: nowrap;
    color: #25313b;
}

.journal-intel-disclaimer span {
    color: #606c77;
    font-size: 10px;
    line-height: 1.4;
}

.journal-intel-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    border: 1px solid #d7dde3;
}

.journal-intel-stats > div {
    padding: 9px 10px;
    border-right: 1px solid #d7dde3;
}

.journal-intel-stats > div:last-child {
    border-right: 0;
}

.journal-intel-stats span,
.journal-intel-memory-grid span {
    display: block;
    color: #697580;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
}

.journal-intel-stats strong {
    display: block;
    margin-top: 3px;
    color: #24313b;
    font-size: 14px;
}

.journal-intel-question-list,
.journal-intel-event-list,
.journal-intel-related-list,
.journal-intel-facts {
    display: grid;
    gap: 8px;
}

.journal-intel-question {
    display: grid;
    gap: 2px;
    padding: 8px 10px;
    border-left: 3px solid #657f94;
    background: #f8fafb;
}

.journal-intel-question span {
    color: #6c7781;
    font-size: 9px;
}

.journal-intel-event {
    border: 1px solid #d7dde3;
    background: #fff;
}

.journal-intel-event-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    padding: 8px 10px;
    border-bottom: 1px solid #dde3e8;
    background: #f5f7f9;
}

.journal-intel-event-head > div {
    display: grid;
    gap: 2px;
}

.journal-intel-event-head span {
    color: #6b7680;
    font-size: 9px;
}

.journal-intel-severity {
    padding: 2px 6px;
    border: 1px solid #c8d0d7;
    background: #fff;
    color: #57636e !important;
    font-size: 8px !important;
    font-weight: 800;
}

.journal-intel-severity-concern {
    border-color: #d8bc82;
    color: #775a1f !important;
}

.journal-intel-severity-high,
.journal-intel-severity-critical {
    border-color: #c99c98;
    color: #883e38 !important;
}

.journal-intel-event-meta {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    padding: 7px 10px;
    border-bottom: 1px solid #edf0f2;
    color: #67727d;
    font-size: 9px;
}

.journal-intel-source-excerpt,
.journal-intel-section {
    padding: 9px 10px;
    border-bottom: 1px solid #edf0f2;
}

.journal-intel-source-excerpt p {
    margin: 5px 0 0;
    color: #28333d;
    line-height: 1.5;
    white-space: normal;
}

.journal-intel-tags {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
    margin-top: 6px;
}

.journal-intel-tags > span {
    padding: 3px 6px;
    border: 1px solid #d4dbe1;
    background: #f8fafb;
    color: #4d5a65;
    font-size: 9px;
    font-weight: 700;
}

.journal-intel-tags small {
    margin-left: 3px;
    color: #7b858d;
    font-weight: 400;
}

.journal-intel-facts > div,
.journal-intel-related-list > div {
    padding: 7px 8px;
    border: 1px solid #e1e6ea;
    background: #fafbfc;
    font-size: 10px;
}

.journal-intel-fact-type {
    display: inline-block;
    min-width: 100px;
    margin-right: 6px;
    color: #5c6872;
    font-size: 8px;
    font-weight: 800;
    text-transform: uppercase;
}

.journal-intel-related-list p {
    margin: 4px 0;
}

.journal-intel-related-list small {
    color: #707b84;
}

.journal-intel-memory-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border: 1px solid #d7dde3;
}

.journal-intel-memory-grid > div {
    padding: 8px 10px;
    border-right: 1px solid #e1e6ea;
    border-bottom: 1px solid #e1e6ea;
}

.journal-intel-memory-grid strong {
    display: block;
    margin: 3px 0;
    color: #28333d;
}

.journal-intel-memory-grid small {
    color: #6d7882;
    font-size: 9px;
}

@media (max-width: 800px) {
    .journal-intelligence-head,
    .journal-intel-disclaimer {
        flex-direction: column;
        align-items: flex-start;
    }

    .journal-intel-stats,
    .journal-intel-memory-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 520px) {
    .journal-intel-stats,
    .journal-intel-memory-grid {
        grid-template-columns: 1fr;
    }
}
/* WORKREPORT MEDIA EVIDENCE UPGRADE */
.media-evidence-intro {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
}

.media-limit-box {
    min-width: 260px;
    padding: 12px 14px;
    border: 1px solid #d7dde5;
    background: #f7f9fb;
}

.media-limit-box strong,
.media-limit-box span,
.media-limit-box small {
    display: block;
}

.media-limit-box span {
    margin-top: 4px;
    font-size: 18px;
    font-weight: 700;
    color: #1f2937;
}

.media-limit-box small {
    margin-top: 6px;
    color: #667085;
    line-height: 1.35;
}

.media-evidence-grid {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.media-preview {
    border-bottom: 1px solid #e1e6ec;
    background: #f8fafc;
}

.media-player-block {
    padding: 14px;
}

.media-player-block strong {
    display: block;
    margin-bottom: 10px;
    color: #344054;
    font-size: 11px;
    letter-spacing: .08em;
}

.media-player-block audio,
.media-player-block video {
    display: block;
    width: 100%;
    max-height: 420px;
}

.media-class-tag {
    background: #eef4ff;
    color: #244a7c;
}

.media-void-tag {
    background: #fff3e8;
    color: #8a3b12;
}

.evidence-card-voided {
    opacity: .78;
    border-style: dashed;
}

.media-hash {
    word-break: break-all;
    font-size: 10px;
}

.media-evidence-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-top: 14px;
}

.media-evidence-actions form {
    margin: 0;
}

@media (max-width: 760px) {
    .media-evidence-intro {
        flex-direction: column;
    }

    .media-limit-box {
        width: 100%;
        min-width: 0;
    }
}
/* END WORKREPORT MEDIA EVIDENCE UPGRADE */

/* ============================================================
   WORKREPORT_COMPACT_MOBILE_V1
   Dense report/timeline reading + phone usability
   ============================================================ */

html {
    -webkit-text-size-adjust: 100%;
}

body {
    overflow-x: hidden;
}

img,
video,
audio,
canvas,
svg {
    max-width: 100%;
}

input,
select,
textarea,
button {
    max-width: 100%;
    font: inherit;
}

/* Long narrative text should read like a record, not a giant card stack. */
.generated-events,
.case-event-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.generated-event,
.case-event-row {
    min-height: 0;
    padding: 9px 12px;
    margin: 0;
    border-radius: 5px;
    line-height: 1.38;
}

.generated-event-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 4px;
    font-size: 12px;
}

.generated-event p,
.case-event-body p {
    margin: 4px 0 0;
    line-height: 1.42;
}

.case-event-row {
    display: grid;
    grid-template-columns: 145px minmax(0, 1fr);
    gap: 12px;
    align-items: start;
}

.case-event-date {
    min-width: 0;
}

.case-event-date strong,
.case-event-date span {
    display: block;
}

.case-event-body {
    min-width: 0;
}

.case-event-body > div {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}

.tag {
    white-space: nowrap;
}

/* Clamp long event previews in browsing views.
   Full source/report pages remain available for complete wording. */
.case-event-body p {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

.generated-report-entry {
    padding-top: 12px;
    padding-bottom: 12px;
}

.generated-report-entry h3,
.generated-events h4 {
    margin-top: 6px;
    margin-bottom: 8px;
}

/* Keep filters, forms and summary blocks usable on narrow screens. */
.form-grid,
.stats-grid,
.pattern-grid,
.manage-summary,
.scope-list {
    min-width: 0;
}

textarea {
    width: 100%;
    resize: vertical;
}

table {
    max-width: 100%;
}

/* Header/navigation: stay usable instead of crushing every link. */
.compact-topbar {
    gap: 12px;
}

.compact-nav {
    min-width: 0;
}

/* Better tap targets without giant visual blocks. */
.button,
button,
.compact-nav a {
    min-height: 40px;
}

/* ------------------------------------------------------------
   Mobile
   ------------------------------------------------------------ */
@media (max-width: 760px) {

    .compact-container,
    .container {
        width: 100%;
        padding-left: 10px;
        padding-right: 10px;
        padding-bottom: 48px;
    }

    .compact-topbar,
    .topbar {
        position: relative;
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        padding: 8px 10px;
        min-height: 0;
    }

    .brand-inline,
    .brand {
        flex: 0 0 auto;
    }

    .current-worker {
        flex: 1 1 auto;
        min-width: 120px;
        font-size: 12px;
    }

    .compact-nav,
    nav {
        order: 3;
        width: 100%;
        overflow-x: auto;
        overflow-y: hidden;
        flex-wrap: nowrap;
        gap: 2px;
        padding: 4px 0 2px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
    }

    .compact-nav a,
    nav a {
        flex: 0 0 auto;
        padding: 8px 10px;
        min-height: 38px;
        display: inline-flex;
        align-items: center;
        white-space: nowrap;
        font-size: 12px;
    }

    .page-heading,
    .panel-header,
    .section-title,
    .final-report-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }

    .panel {
        padding: 10px;
        margin-bottom: 10px;
    }

    .page-heading {
        margin-bottom: 12px;
    }

    .page-heading h1 {
        font-size: 21px;
        line-height: 1.2;
        margin-bottom: 3px;
    }

    .generated-event,
    .case-event-row {
        padding: 8px 9px;
        border-radius: 4px;
    }

    .case-event-row {
        grid-template-columns: 1fr;
        gap: 3px;
    }

    .case-event-date {
        display: flex;
        align-items: center;
        flex-wrap: wrap;
        gap: 7px;
        font-size: 11px;
    }

    .case-event-date strong,
    .case-event-date span {
        display: inline;
    }

    .case-event-body p,
    .generated-event p {
        font-size: 13px;
        line-height: 1.38;
    }

    .generated-event-meta {
        font-size: 11px;
    }

    .generated-summary,
    .generated-original p {
        font-size: 13px;
        line-height: 1.45;
    }

    .form-grid,
    .stats-grid,
    .pattern-grid,
    .manage-summary {
        grid-template-columns: 1fr !important;
    }

    .scope-list {
        display: grid;
        grid-template-columns: 1fr;
    }

    .form-actions {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
    }

    .form-actions .button,
    .form-actions button {
        flex: 1 1 150px;
    }

    input,
    select,
    textarea {
        width: 100%;
        min-height: 42px;
    }

    textarea {
        min-height: 130px;
    }

    .worker-row,
    .stat-table-row {
        gap: 8px;
    }

    /* Avoid 350-500 word source statements turning the phone into
       an endless wall while browsing generated reports. */
    .generated-original {
        max-height: 340px;
        overflow: auto;
        overscroll-behavior: contain;
        padding-right: 4px;
    }
}

/* Extra-small phones */
@media (max-width: 420px) {

    .container,
    .compact-container {
        padding-left: 7px;
        padding-right: 7px;
    }

    .panel {
        padding: 8px;
    }

    .tag {
        font-size: 10px;
    }

    .generated-event,
    .case-event-row {
        padding: 7px 8px;
    }
}

/* Printing/export should never clamp or hide source text. */
@media print {
    .case-event-body p {
        display: block !important;
        overflow: visible !important;
    }

    .generated-original {
        max-height: none !important;
        overflow: visible !important;
    }

    .compact-nav,
    nav {
        display: none !important;
    }
}

/* ============================================================
   WORKREPORT_REPORT_SIDEBAR_CSS_V1
   Desktop: report left / structured analysis right
   Mobile: stacked, report first / analysis below
   ============================================================ */

.report-review-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 340px);
    gap: 14px;
    align-items: start;
}

.report-review-main,
.report-review-sidebar {
    min-width: 0;
}

.report-review-sidebar {
    position: sticky;
    top: 84px;
}

.report-review-sidebar > .panel {
    margin-bottom: 0;
}

.report-review-sidebar .analysis-columns {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.report-review-sidebar .analysis-columns > div {
    min-width: 0;
}

.report-review-sidebar h2 {
    margin-bottom: 4px;
}

.report-review-sidebar h3 {
    margin: 0 0 6px;
    font-size: 13px;
}

.report-review-sidebar .panel-header {
    margin-bottom: 12px;
}

.report-review-sidebar .panel-header p {
    margin: 2px 0 0;
    font-size: 11px;
}

.report-review-sidebar .tag-list {
    gap: 5px;
}

.report-review-sidebar .tag {
    font-size: 11px;
}

@media (max-width: 900px) {

    .report-review-layout {
        grid-template-columns: 1fr;
    }

    .report-review-sidebar {
        position: static;
        order: 2;
    }

    .report-review-main {
        order: 1;
    }
}

@media (max-width: 760px) {

    .report-review-layout {
        gap: 10px;
    }

    .report-review-sidebar .panel {
        padding: 10px;
    }

    .report-review-sidebar .analysis-columns {
        gap: 9px;
    }
}

@media print {

    .report-review-layout {
        display: block;
    }

    .report-review-sidebar {
        position: static;
        margin-top: 12px;
    }
}

/* ============================================================
   WORKREPORT_PRO_REPORT_SOURCE_CSS_V1
   Professional source-record presentation
   ============================================================ */

.report-source-panel {
    padding: 0;
    overflow: hidden;
}

.report-source-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 18px;
    padding: 16px 18px 14px;
    border-bottom: 1px solid var(--border);
    background: #f8fafc;
}

.report-source-eyebrow {
    display: block;
    margin-bottom: 4px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #475569;
}

.report-source-heading h2 {
    margin: 0;
    font-size: 18px;
    line-height: 1.25;
    color: #0f172a;
}

.report-source-heading p {
    margin: 4px 0 0;
    font-size: 12px;
    color: #64748b;
}

.report-source-status {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px;
}

.report-source-status span {
    padding: 5px 8px;
    border: 1px solid #dbe3ec;
    border-radius: 4px;
    background: #fff;
    color: #475569;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

.report-source-meta {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    border-bottom: 1px solid var(--border);
    background: #fff;
}

.report-source-meta > div {
    min-width: 0;
    padding: 10px 14px;
    border-right: 1px solid #e5e7eb;
}

.report-source-meta > div:last-child {
    border-right: 0;
}

.report-source-meta span {
    display: block;
    margin-bottom: 2px;
    color: #64748b;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.report-source-meta strong {
    display: block;
    color: #111827;
    font-size: 12px;
    font-weight: 600;
    overflow-wrap: anywhere;
}

.report-document {
    background: #f3f4f6;
    padding: 16px;
}

.report-document-label {
    margin: 0 auto 6px;
    max-width: 880px;
    color: #64748b;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
}

.report-document-body {
    max-width: 880px;
    margin: 0 auto;
    padding: 22px 24px;
    border: 1px solid #dfe3e8;
    border-radius: 3px;
    background: #fff;
    color: #172033;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 15px;
    line-height: 1.72;
    letter-spacing: .002em;
    white-space: normal;
    overflow-wrap: anywhere;
}

.report-document-body br + br {
    line-height: 2.2;
}

.report-review-main .report-source-panel {
    margin-bottom: 12px;
}

/* Make the structured sidebar visually complement the source document. */
.report-review-sidebar > .panel {
    border-top: 3px solid #334155;
}

.report-review-sidebar .panel-header h2 {
    color: #0f172a;
}

@media (max-width: 900px) {

    .report-source-meta {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .report-source-meta > div:nth-child(2) {
        border-right: 0;
    }

    .report-source-meta > div:nth-child(-n+2) {
        border-bottom: 1px solid #e5e7eb;
    }
}

@media (max-width: 760px) {

    .report-source-heading {
        padding: 12px;
        flex-direction: column;
        gap: 9px;
    }

    .report-source-status {
        justify-content: flex-start;
    }

    .report-document {
        padding: 8px;
    }

    .report-document-body {
        padding: 15px 14px;
        font-size: 14px;
        line-height: 1.65;
    }

    .report-source-meta {
        grid-template-columns: 1fr 1fr;
    }

    .report-source-meta > div {
        padding: 8px 10px;
    }
}

@media (max-width: 430px) {

    .report-source-meta {
        grid-template-columns: 1fr;
    }

    .report-source-meta > div {
        border-right: 0;
        border-bottom: 1px solid #e5e7eb;
    }

    .report-source-meta > div:last-child {
        border-bottom: 0;
    }

    .report-document-body {
        padding: 13px 12px;
    }
}

@media print {

    .report-source-panel {
        border: 0;
    }

    .report-source-heading,
    .report-source-meta,
    .report-document {
        background: #fff !important;
    }

    .report-document {
        padding: 0;
    }

    .report-document-body {
        max-width: none;
        border: 0;
        padding: 0;
        font-size: 11pt;
        line-height: 1.55;
    }
}

/* ============================================================
   WORKREPORT_REPORT_EVENTS_POLISH_V1
   Refined sidebar spacing + compact professional event ledger
   ============================================================ */

/* Structured Analysis sidebar */
.report-review-sidebar > .panel {
    padding: 16px 16px 18px !important;
    border: 1px solid #d9e1e8;
    border-top: 3px solid #334155;
    background: #ffffff;
}

.report-review-sidebar .panel-header {
    margin: 0 0 14px;
    padding: 0 0 10px;
    border-bottom: 1px solid #e7ebef;
}

.report-review-sidebar .panel-header h2 {
    margin: 0;
    font-size: 17px;
    line-height: 1.25;
}

.report-review-sidebar .panel-header p {
    margin: 4px 0 0;
    color: #667085;
    font-size: 11px;
    line-height: 1.35;
}

.report-review-sidebar .analysis-columns {
    gap: 14px;
}

.report-review-sidebar .analysis-columns > div {
    padding: 0;
}

.report-review-sidebar .analysis-columns h3 {
    margin: 0 0 7px;
    font-size: 12px;
    font-weight: 700;
    color: #111827;
}

.report-review-sidebar .tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.report-review-sidebar .tag {
    padding: 4px 7px;
    border-radius: 999px;
    font-size: 10px;
    line-height: 1.2;
}

/* Extracted Events: professional chronological ledger */
.report-review-main > .panel:has(> h2:first-child) {
    overflow: hidden;
}

.report-review-main .event-list {
    display: block;
    margin-top: 10px;
    border: 1px solid #dde3ea;
    border-radius: 4px;
    background: #fff;
    overflow: hidden;
}

.report-review-main .event-item {
    display: grid;
    grid-template-columns: 118px minmax(0, 1fr);
    gap: 0;
    min-height: 0;
    margin: 0;
    padding: 0;
    border: 0;
    border-bottom: 1px solid #e6ebf0;
    background: #fff;
}

.report-review-main .event-item:last-child {
    border-bottom: 0;
}

.report-review-main .event-item:hover {
    background: #fafbfc;
}

.report-review-main .event-item-time {
    padding: 11px 12px;
    border-right: 1px solid #e6ebf0;
    background: #f8fafc;
    color: #475467;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.35;
    white-space: normal;
}

.report-review-main .event-item-body {
    min-width: 0;
    padding: 10px 13px 11px;
}

.report-review-main .event-item-body .tag {
    display: inline-block;
    margin: 0 0 5px;
    padding: 3px 7px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 600;
    line-height: 1.2;
}

.report-review-main .event-item-body p {
    margin: 0;
    color: #202939;
    font-size: 13px;
    line-height: 1.48;
}

/* Give the section itself a cleaner document-review look */
.report-review-main .panel:has(.event-list) {
    padding: 14px 16px 16px;
    background: #f8fafc;
}

.report-review-main .panel:has(.event-list) > h2 {
    margin: 0 0 8px;
    font-size: 17px;
    color: #111827;
}

/* Mobile: analysis stacks below and events become compact cards */
@media (max-width: 900px) {

    .report-review-sidebar > .panel {
        padding: 13px !important;
    }
}

@media (max-width: 760px) {

    .report-review-main .event-list {
        border-radius: 3px;
    }

    .report-review-main .event-item {
        grid-template-columns: 1fr;
    }

    .report-review-main .event-item-time {
        padding: 7px 9px 5px;
        border-right: 0;
        border-bottom: 0;
        background: #fff;
        color: #667085;
        font-size: 10px;
    }

    .report-review-main .event-item-body {
        padding: 3px 9px 9px;
    }

    .report-review-main .event-item-body .tag {
        margin-bottom: 4px;
    }

    .report-review-main .event-item-body p {
        font-size: 13px;
        line-height: 1.42;
    }

    .report-review-main .panel:has(.event-list) {
        padding: 10px;
    }

    .report-review-sidebar .analysis-columns {
        gap: 11px;
    }
}

@media print {

    .report-review-main .event-list {
        border: 1px solid #bbb;
    }

    .report-review-main .event-item {
        break-inside: avoid;
    }

    .report-review-main .event-item-time {
        background: #fff !important;
    }
}

/* ============================================================
   WORKREPORT_PUBLIC_LANDING_V1
   Public WorkReport landing page
   ============================================================ */

.public-site {
    margin: 0;
    background: #f5f7fa;
    color: #1b2430;
}

.public-site *,
.public-site *::before,
.public-site *::after {
    box-sizing: border-box;
}

.public-topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid #dce2e8;
    background: rgba(255,255,255,.97);
}

.public-nav-shell {
    width: min(1180px, calc(100% - 32px));
    min-height: 62px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
}

.public-brand {
    color: #1d5f93;
    font-size: 21px;
    font-weight: 800;
    text-decoration: none;
    letter-spacing: -.025em;
}

.public-nav {
    display: flex;
    align-items: center;
    gap: 6px;
}

.public-nav a {
    padding: 8px 10px;
    color: #475467;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 4px;
}

.public-nav a:hover {
    color: #173d5d;
    background: #f3f6f8;
}

.public-nav .public-nav-portal {
    margin-left: 5px;
    padding: 9px 14px;
    border: 1px solid #236ea5;
    background: #236ea5;
    color: #fff;
}

.public-nav .public-nav-portal:hover {
    background: #1b5b8a;
    color: #fff;
}

.public-main {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.public-hero {
    min-height: 530px;
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(330px, .75fr);
    gap: 70px;
    align-items: center;
    padding: 70px 0 58px;
}

.public-eyebrow,
.public-section-heading > span {
    display: block;
    margin-bottom: 10px;
    color: #1d5f93;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.public-hero h1 {
    max-width: 780px;
    margin: 0;
    color: #152333;
    font-size: clamp(42px, 5vw, 68px);
    line-height: 1.02;
    letter-spacing: -.045em;
}

.public-hero h1 span {
    display: block;
    color: #236ea5;
}

.public-hero-lead {
    max-width: 720px;
    margin: 24px 0 0;
    color: #536170;
    font-size: 17px;
    line-height: 1.7;
}

.public-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 28px;
}

.public-button-large {
    min-height: 42px;
    padding: 11px 17px !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.public-invite-note {
    margin: 12px 0 0;
    color: #748091;
    font-size: 11px;
}

.public-hero-record {
    border: 1px solid #ced7df;
    border-top: 4px solid #2b6f9f;
    background: #fff;
}

.public-record-topline,
.public-record-row,
.public-record-status {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    padding: 15px 17px;
    border-bottom: 1px solid #e5e9ed;
}

.public-record-topline {
    background: #f5f8fa;
}

.public-record-topline span {
    color: #667383;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .08em;
}

.public-record-topline strong,
.public-record-status strong {
    color: #276740;
    font-size: 11px;
}

.public-record-row span,
.public-record-status span {
    color: #667383;
    font-size: 11px;
}

.public-record-row strong {
    text-align: right;
    color: #273444;
    font-size: 11px;
}

.public-record-status {
    border-bottom: 0;
    background: #f7faf8;
}

.public-trust-strip {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    margin-bottom: 18px;
    border: 1px solid #d9e0e6;
    background: #fff;
}

.public-trust-strip > div {
    padding: 17px;
    border-right: 1px solid #e2e7eb;
}

.public-trust-strip > div:last-child {
    border-right: 0;
}

.public-trust-strip strong {
    display: block;
    margin-bottom: 4px;
    color: #1d3448;
    font-size: 12px;
}

.public-trust-strip span {
    display: block;
    color: #697586;
    font-size: 11px;
    line-height: 1.45;
}

.public-section {
    padding: 74px 0;
}

.public-section-alt {
    width: calc(100% + 64px);
    margin-left: -32px;
    padding-left: 32px;
    padding-right: 32px;
    border-top: 1px solid #e0e5e9;
    border-bottom: 1px solid #e0e5e9;
    background: #fff;
}

.public-section-heading {
    max-width: 720px;
    margin-bottom: 30px;
}

.public-section-heading h2,
.public-split h2,
.public-portal-callout h2 {
    margin: 0;
    color: #172737;
    font-size: clamp(28px, 3.4vw, 42px);
    line-height: 1.12;
    letter-spacing: -.025em;
}

.public-section-heading p,
.public-split p,
.public-portal-callout p {
    color: #5c6877;
    font-size: 14px;
    line-height: 1.7;
}

.public-feature-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0,1fr));
    border-top: 1px solid #dce2e8;
    border-left: 1px solid #dce2e8;
}

.public-feature {
    min-height: 190px;
    padding: 23px;
    border-right: 1px solid #dce2e8;
    border-bottom: 1px solid #dce2e8;
    background: #fff;
}

.public-feature > span {
    color: #34739f;
    font-size: 10px;
    font-weight: 800;
}

.public-feature h3 {
    margin: 15px 0 8px;
    color: #223245;
    font-size: 16px;
}

.public-feature p {
    margin: 0;
    color: #687586;
    font-size: 12px;
    line-height: 1.65;
}

.public-split {
    display: grid;
    grid-template-columns: minmax(0,.85fr) minmax(0,1.15fr);
    gap: 70px;
    align-items: start;
}

.public-principles {
    border-top: 1px solid #dce2e8;
}

.public-principles > div {
    display: grid;
    grid-template-columns: 180px minmax(0,1fr);
    gap: 24px;
    padding: 17px 0;
    border-bottom: 1px solid #dce2e8;
}

.public-principles strong {
    color: #243547;
    font-size: 12px;
}

.public-principles span {
    color: #667586;
    font-size: 12px;
    line-height: 1.55;
}

.public-security-grid {
    display: grid;
    grid-template-columns: repeat(4,minmax(0,1fr));
    border: 1px solid #dce2e8;
    background: #fff;
}

.public-security-grid > div {
    padding: 20px;
    border-right: 1px solid #dce2e8;
}

.public-security-grid > div:last-child {
    border-right: 0;
}

.public-security-grid strong {
    color: #223548;
    font-size: 12px;
}

.public-security-grid p {
    margin: 7px 0 0;
    color: #687586;
    font-size: 11px;
    line-height: 1.55;
}

.public-security-note {
    margin: 14px 0 0;
    color: #778392;
    font-size: 10px;
}

.public-about-split {
    align-items: center;
}

.public-faq {
    border-top: 1px solid #d9e0e6;
}

.public-faq details {
    border-bottom: 1px solid #d9e0e6;
    background: #fff;
}

.public-faq summary {
    padding: 16px 4px;
    cursor: pointer;
    color: #243548;
    font-size: 13px;
    font-weight: 700;
}

.public-faq details p {
    max-width: 800px;
    margin: 0;
    padding: 0 4px 17px;
    color: #647283;
    font-size: 12px;
    line-height: 1.6;
}

.public-portal-callout {
    margin: 22px 0 72px;
    padding: 28px 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 35px;
    border: 1px solid #cfd8e0;
    border-left: 4px solid #246b9f;
    background: #fff;
}

.public-portal-callout h2 {
    font-size: 27px;
}

.public-portal-callout p {
    margin-bottom: 0;
    font-size: 12px;
}

.public-footer {
    border-top: 1px solid #d7dde3;
    background: #eef2f5;
}

.public-footer-grid,
.public-footer-bottom {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.public-footer-grid {
    display: grid;
    grid-template-columns: 1.2fr .6fr 1fr;
    gap: 50px;
    padding: 34px 0;
}

.public-footer strong {
    color: #26384a;
    font-size: 12px;
}

.public-footer p,
.public-footer a,
.public-footer-bottom {
    color: #6d7885;
    font-size: 10px;
    line-height: 1.55;
}

.public-footer-links {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.public-footer-links a {
    text-decoration: none;
}

.public-footer-bottom {
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    border-top: 1px solid #d9dfe4;
}

@media (max-width: 900px) {

    .public-nav-shell {
        align-items: flex-start;
        padding: 12px 0;
        flex-direction: column;
        gap: 8px;
    }

    .public-nav {
        width: 100%;
        overflow-x: auto;
        white-space: nowrap;
        padding-bottom: 3px;
    }

    .public-hero {
        min-height: 0;
        grid-template-columns: 1fr;
        gap: 32px;
        padding: 48px 0;
    }

    .public-trust-strip {
        grid-template-columns: repeat(2,1fr);
    }

    .public-trust-strip > div:nth-child(2) {
        border-right: 0;
    }

    .public-trust-strip > div:nth-child(-n+2) {
        border-bottom: 1px solid #e2e7eb;
    }

    .public-feature-grid {
        grid-template-columns: repeat(2,minmax(0,1fr));
    }

    .public-split {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .public-security-grid {
        grid-template-columns: repeat(2,minmax(0,1fr));
    }

    .public-security-grid > div:nth-child(2) {
        border-right: 0;
    }

    .public-security-grid > div:nth-child(-n+2) {
        border-bottom: 1px solid #dce2e8;
    }

    .public-footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 620px) {

    .public-main,
    .public-nav-shell,
    .public-footer-grid,
    .public-footer-bottom {
        width: min(100% - 20px, 1180px);
    }

    .public-hero {
        padding: 38px 0;
    }

    .public-hero h1 {
        font-size: 40px;
    }

    .public-hero-lead {
        font-size: 14px;
    }

    .public-hero-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .public-hero-actions .button {
        width: 100%;
    }

    .public-trust-strip,
    .public-feature-grid,
    .public-security-grid {
        grid-template-columns: 1fr;
    }

    .public-trust-strip > div,
    .public-security-grid > div {
        border-right: 0;
        border-bottom: 1px solid #e2e7eb;
    }

    .public-trust-strip > div:last-child,
    .public-security-grid > div:last-child {
        border-bottom: 0;
    }

    .public-section {
        padding: 48px 0;
    }

    .public-section-alt {
        width: calc(100% + 20px);
        margin-left: -10px;
        padding-left: 10px;
        padding-right: 10px;
    }

    .public-feature {
        min-height: 0;
    }

    .public-principles > div {
        grid-template-columns: 1fr;
        gap: 5px;
    }

    .public-portal-callout {
        align-items: flex-start;
        flex-direction: column;
        padding: 20px;
    }

    .public-portal-callout .button {
        width: 100%;
    }

    .public-footer-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .public-footer-bottom {
        align-items: flex-start;
        flex-direction: column;
        justify-content: center;
        padding: 12px 0;
    }
}

@media print {

    .public-topbar,
    .public-hero-actions,
    .public-portal-callout,
    .public-footer {
        display: none !important;
    }

    .public-main {
        width: 100%;
    }
}

/* ============================================================
   WORKREPORT_LANDING_IMAGES_ACCESS_V1
   How It Works images, security protocol, access requests
   ============================================================ */

.public-feature {
    padding: 0;
    overflow: hidden;
}

.public-feature > span,
.public-feature > h3,
.public-feature > p {
    display: block;
    margin-left: 20px;
    margin-right: 20px;
}

.public-feature > span {
    margin-top: 18px;
}

.public-feature > p {
    margin-bottom: 21px;
}

.public-feature-image {
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-bottom: 1px solid #dfe5ea;
    background: #f6f8fa;
    order: -1;
}

.public-feature-image img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.public-feature {
    display: flex;
    flex-direction: column;
}

.public-security-protocol {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border-top: 1px solid #dce2e8;
    border-left: 1px solid #dce2e8;
    background: #fff;
}

.public-security-protocol article {
    min-height: 190px;
    padding: 21px;
    border-right: 1px solid #dce2e8;
    border-bottom: 1px solid #dce2e8;
}

.public-security-protocol article > span {
    color: #34739f;
    font-size: 10px;
    font-weight: 800;
}

.public-security-protocol h3 {
    margin: 14px 0 7px;
    color: #223548;
    font-size: 15px;
}

.public-security-protocol p {
    margin: 0;
    color: #687586;
    font-size: 11px;
    line-height: 1.6;
}

.public-security-boundary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0,1fr));
    margin-top: 18px;
    border: 1px solid #dce2e8;
    background: #fff;
}

.public-security-boundary > div {
    padding: 17px 19px;
}

.public-security-boundary > div + div {
    border-left: 1px solid #dce2e8;
}

.public-security-boundary strong {
    color: #243548;
    font-size: 12px;
}

.public-security-boundary p {
    margin: 5px 0 0;
    color: #687586;
    font-size: 11px;
    line-height: 1.55;
}

.public-access-cta {
    margin: 16px 0 38px;
    padding: 27px 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 38px;
    border: 1px solid #cfd8e0;
    border-left: 4px solid #246b9f;
    background: #fff;
}

.public-access-cta h2 {
    margin: 0;
    color: #172737;
    font-size: 25px;
    letter-spacing: -.02em;
}

.public-access-cta p {
    max-width: 720px;
    margin: 8px 0 0;
    color: #667586;
    font-size: 12px;
    line-height: 1.6;
}

.public-access-cta-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
    flex: 0 0 auto;
}

.public-request-page {
    min-height: calc(100vh - 180px);
    display: grid;
    grid-template-columns: minmax(0,.85fr) minmax(420px,1.15fr);
    gap: 70px;
    align-items: start;
    padding: 70px 0;
}

.public-request-intro h1 {
    margin: 0;
    color: #172737;
    font-size: clamp(38px,5vw,58px);
    line-height: 1.04;
    letter-spacing: -.04em;
}

.public-request-intro > p {
    color: #5f6c7b;
    font-size: 15px;
    line-height: 1.7;
}

.public-request-note {
    margin-top: 25px;
    padding: 15px 17px;
    border-left: 3px solid #b67a24;
    background: #fffaf1;
}

.public-request-note strong,
.public-request-note span {
    display: block;
}

.public-request-note strong {
    color: #704b17;
    font-size: 11px;
}

.public-request-note span {
    margin-top: 4px;
    color: #7b6547;
    font-size: 11px;
    line-height: 1.55;
}

.public-request-card {
    padding: 24px;
    border: 1px solid #d7dfe6;
    background: #fff;
}

.public-request-form {
    display: grid;
    gap: 15px;
}

.public-request-form .field {
    margin: 0;
}

.public-request-form label {
    color: #263747;
    font-size: 11px;
    font-weight: 700;
}

.public-request-form input,
.public-request-form textarea {
    width: 100%;
    margin-top: 6px;
    border: 1px solid #cfd8e0;
    border-radius: 3px;
    background: #fff;
    color: #1c2936;
}

.public-request-form input {
    min-height: 42px;
    padding: 9px 10px;
}

.public-request-form textarea {
    padding: 10px;
    resize: vertical;
}

.public-request-form small {
    display: block;
    margin-top: 5px;
    color: #7b8794;
    font-size: 10px;
    line-height: 1.45;
}

.public-optional {
    color: #89939e;
    font-weight: 400;
}

.public-request-success,
.public-request-errors {
    margin-bottom: 18px;
    padding: 14px;
}

.public-request-success {
    border: 1px solid #b9dec8;
    background: #f2faf5;
}

.public-request-success strong {
    color: #26633f;
}

.public-request-success p {
    margin: 4px 0 0;
    color: #50725e;
    font-size: 11px;
    line-height: 1.5;
}

.public-request-errors {
    border: 1px solid #ebc3c3;
    background: #fff6f6;
    color: #8a3030;
    font-size: 11px;
}

.public-request-errors ul {
    margin: 6px 0 0;
    padding-left: 18px;
}

.public-request-honeypot {
    position: absolute !important;
    left: -10000px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}

.access-request-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}

.access-request-tabs a {
    padding: 7px 10px;
    border: 1px solid #d5dde5;
    background: #fff;
    color: #475467;
    font-size: 11px;
    font-weight: 600;
    text-decoration: none;
}

.access-request-tabs a.active {
    border-color: #245f8f;
    background: #eef5fa;
    color: #194d75;
}

.access-request-tabs span {
    margin-left: 5px;
    color: #718096;
}

.access-request-list {
    display: grid;
}

.access-request-row {
    display: grid;
    grid-template-columns: minmax(0,1fr) 280px;
    gap: 24px;
    padding: 18px 0;
    border-top: 1px solid var(--border);
}

.access-request-row:first-child {
    border-top: 0;
}

.access-request-heading {
    display: flex;
    justify-content: space-between;
    gap: 16px;
}

.access-request-heading strong {
    display: block;
    color: #1d2939;
    font-size: 14px;
}

.access-request-heading a {
    display: inline-block;
    margin-top: 3px;
    color: #245f8f;
    font-size: 11px;
}

.access-request-org {
    margin-top: 7px;
    color: #596778;
    font-size: 11px;
    font-weight: 600;
}

.access-request-reason {
    max-width: 800px;
    margin: 12px 0;
    color: #344054;
    font-size: 12px;
    line-height: 1.55;
}

.access-request-meta {
    color: #7a8694;
    font-size: 10px;
}

.access-request-actions {
    display: grid;
    gap: 9px;
    align-content: start;
}

.access-request-actions label {
    color: #475467;
    font-size: 10px;
    font-weight: 700;
}

.access-request-actions select,
.access-request-actions textarea {
    width: 100%;
    margin-top: 4px;
    border: 1px solid #cfd8e0;
    background: #fff;
    color: #1c2936;
}

.access-request-actions select {
    min-height: 36px;
}

.access-request-actions textarea {
    padding: 7px;
    resize: vertical;
}

@media (max-width: 900px) {

    .public-security-protocol {
        grid-template-columns: repeat(2,minmax(0,1fr));
    }

    .public-request-page {
        grid-template-columns: 1fr;
        gap: 30px;
        padding: 48px 0;
    }

    .access-request-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 620px) {

    .public-security-protocol,
    .public-security-boundary {
        grid-template-columns: 1fr;
    }

    .public-security-boundary > div + div {
        border-left: 0;
        border-top: 1px solid #dce2e8;
    }

    .public-access-cta {
        align-items: flex-start;
        flex-direction: column;
        padding: 20px;
    }

    .public-access-cta-actions {
        width: 100%;
        justify-content: stretch;
        flex-direction: column;
    }

    .public-access-cta-actions .button {
        width: 100%;
    }

    .public-request-card {
        padding: 16px;
    }
}

/* ============================================================
   WORKREPORT_INVITE_LIFECYCLE_V1
   Secure invite + activation + usage tracking
   ============================================================ */

.invite-preview-panel {
    max-width: 900px;
}

.invite-preview-grid {
    display: grid;
    grid-template-columns: repeat(4,minmax(0,1fr));
    border: 1px solid #d9e1e8;
    background: #fff;
}

.invite-preview-grid > div {
    padding: 12px;
    border-right: 1px solid #e4e9ee;
}

.invite-preview-grid > div:last-child {
    border-right: 0;
}

.invite-preview-grid span,
.access-account-line span {
    display: block;
    color: #748091;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.invite-preview-grid strong,
.access-account-line strong {
    display: block;
    margin-top: 3px;
    color: #1f3041;
    font-size: 12px;
}

.invite-preview-email {
    display: grid;
    gap: 6px;
    margin-top: 18px;
}

.invite-preview-email label {
    color: #344054;
    font-size: 10px;
    font-weight: 700;
}

.invite-preview-email input,
.invite-preview-email textarea {
    width: 100%;
    border: 1px solid #cfd8e0;
    background: #fff;
    color: #253444;
}

.invite-preview-email input {
    min-height: 38px;
    padding: 8px 9px;
}

.invite-preview-email textarea {
    padding: 10px;
    resize: vertical;
    line-height: 1.5;
}

.access-request-lifecycle-row {
    grid-template-columns: minmax(0,1fr) 300px;
}

.access-lifecycle {
    display: grid;
    grid-template-columns: repeat(6,minmax(0,1fr));
    margin-top: 14px;
    border: 1px solid #dce3e9;
    background: #f8fafc;
}

.access-lifecycle > div {
    min-width: 0;
    padding: 9px;
    border-right: 1px solid #e3e8ed;
}

.access-lifecycle > div:last-child {
    border-right: 0;
}

.access-lifecycle span {
    display: block;
    color: #818c99;
    font-size: 8px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.access-lifecycle strong {
    display: block;
    margin-top: 3px;
    color: #667383;
    font-size: 9px;
    line-height: 1.3;
    overflow-wrap: anywhere;
}

.access-lifecycle > div.complete {
    background: #f3faf6;
}

.access-lifecycle > div.complete span {
    color: #3f7353;
}

.access-lifecycle > div.complete strong {
    color: #28563a;
}

.access-account-line {
    margin-top: 10px;
}

.access-request-actions > form {
    display: grid;
    gap: 8px;
}

@media (max-width: 1000px) {

    .access-lifecycle {
        grid-template-columns: repeat(3,minmax(0,1fr));
    }

    .access-lifecycle > div:nth-child(3n) {
        border-right: 0;
    }

    .access-lifecycle > div:nth-child(-n+3) {
        border-bottom: 1px solid #e3e8ed;
    }
}

@media (max-width: 760px) {

    .invite-preview-grid {
        grid-template-columns: repeat(2,minmax(0,1fr));
    }

    .invite-preview-grid > div:nth-child(2) {
        border-right: 0;
    }

    .invite-preview-grid > div:nth-child(-n+2) {
        border-bottom: 1px solid #e4e9ee;
    }

    .access-request-lifecycle-row {
        grid-template-columns: 1fr;
    }

    .access-lifecycle {
        grid-template-columns: repeat(2,minmax(0,1fr));
    }

    .access-lifecycle > div {
        border-bottom: 1px solid #e3e8ed;
    }

    .access-lifecycle > div:nth-child(2n) {
        border-right: 0;
    }

    .access-lifecycle > div:nth-last-child(-n+2) {
        border-bottom: 0;
    }
}

/* ============================================================
   WORKREPORT_PUBLIC_FOOTER_PRO_V3
   Public marketing footer only
   ============================================================ */

footer.wr-public-footer-v3 {
    position: static !important;
    inset: auto !important;
    width: 100% !important;
    margin: 56px 0 0 !important;
    padding: 0 !important;
    display: block !important;
    border-top: 1px solid #d9e1e8 !important;
    background: #172838 !important;
    color: #eaf0f5 !important;
    box-shadow: none !important;
}

.wr-public-footer-v3 .wr-footer-shell {
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 24px;
}

.wr-public-footer-v3 .wr-footer-grid {
    display: grid !important;
    grid-template-columns: 1.35fr .8fr 1fr !important;
    gap: 0 !important;
    padding: 42px 0 34px !important;
}

.wr-public-footer-v3 .wr-footer-panel {
    min-width: 0;
    padding: 0 30px;
    border-left: 1px solid rgba(255,255,255,.11);
}

.wr-public-footer-v3 .wr-footer-panel:first-child {
    padding-left: 0;
    border-left: 0;
}

.wr-public-footer-v3 .wr-footer-panel:last-child {
    padding-right: 0;
}

.wr-footer-brand-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.wr-footer-brand-mark {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 38px;
    border: 1px solid rgba(255,255,255,.20);
    background: rgba(255,255,255,.06);
    color: #ffffff;
    font-size: 18px;
    font-weight: 800;
}

.wr-footer-brand-name {
    color: #ffffff;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -.025em;
}

.wr-footer-brand-byline {
    margin-top: 2px;
    color: #8fa4b7;
    font-size: 10px;
    font-weight: 600;
}

.wr-footer-description {
    max-width: 470px;
    margin: 16px 0 0;
    color: #b8c5d0;
    font-size: 11px;
    line-height: 1.7;
}

.wr-footer-slogan {
    margin: 15px 0 0;
    color: #e5edf3;
    font-size: 11px;
    font-weight: 700;
}

.wr-footer-access-note {
    width: fit-content;
    margin-top: 18px;
    padding: 5px 8px;
    border: 1px solid rgba(255,255,255,.14);
    background: rgba(255,255,255,.04);
    color: #aabac7;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
}

.wr-public-footer-v3 h3 {
    margin: 3px 0 15px;
    color: #ffffff;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.wr-footer-company-copy {
    max-width: 320px;
    margin: 0 0 14px;
    color: #aebdca;
    font-size: 10px;
    line-height: 1.55;
}

.wr-public-footer-v3 .wr-footer-nav {
    display: grid !important;
    align-content: start !important;
    gap: 9px !important;
}

.wr-public-footer-v3 .wr-footer-nav a,
.wr-public-footer-v3 .wr-footer-nav span {
    width: fit-content;
    margin: 0;
    padding: 0 !important;
    background: transparent !important;
    color: #b5c3cf !important;
    font-size: 10px !important;
    line-height: 1.45 !important;
    text-decoration: none !important;
    border-radius: 0 !important;
}

.wr-public-footer-v3 .wr-footer-nav a:hover {
    color: #ffffff !important;
    text-decoration: underline !important;
    text-underline-offset: 3px !important;
}

.wr-footer-coming {
    display: grid;
    gap: 1px;
    color: #7f94a5 !important;
}

.wr-footer-coming small {
    color: #607587;
    font-size: 8px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.wr-public-footer-v3 .wr-footer-bottom {
    min-height: 48px;
    padding: 14px 0 17px;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 20px;
    border-top: 1px solid rgba(255,255,255,.11);
    color: #879aab;
    font-size: 9px;
    line-height: 1.45;
}

.wr-footer-bottom-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 7px;
    text-align: right;
}

.wr-footer-bottom-right span {
    color: #52697c;
}

@media (max-width: 820px) {

    .wr-public-footer-v3 .wr-footer-grid {
        grid-template-columns: 1fr 1fr !important;
    }

    .wr-public-footer-v3 .wr-footer-panel {
        padding: 24px 0 !important;
        border-left: 0;
        border-top: 1px solid rgba(255,255,255,.11);
    }

    .wr-public-footer-v3 .wr-footer-panel:first-child {
        grid-column: 1 / -1;
        padding-top: 0 !important;
        border-top: 0;
    }

    .wr-public-footer-v3 .wr-footer-panel:nth-child(2) {
        padding-right: 22px !important;
    }

    .wr-public-footer-v3 .wr-footer-panel:nth-child(3) {
        padding-left: 22px !important;
        border-left: 1px solid rgba(255,255,255,.11);
    }
}

@media (max-width: 600px) {

    .wr-public-footer-v3 .wr-footer-shell {
        padding: 0 18px;
    }

    .wr-public-footer-v3 .wr-footer-grid {
        grid-template-columns: 1fr !important;
        padding-top: 30px !important;
    }

    .wr-public-footer-v3 .wr-footer-panel {
        grid-column: auto !important;
        padding: 22px 0 !important;
        border-left: 0 !important;
        border-top: 1px solid rgba(255,255,255,.11);
    }

    .wr-public-footer-v3 .wr-footer-panel:first-child {
        padding-top: 0 !important;
        border-top: 0 !important;
    }

    .wr-public-footer-v3 .wr-footer-bottom {
        align-items: flex-start !important;
        flex-direction: column !important;
        gap: 7px;
    }

    .wr-footer-bottom-right {
        flex-wrap: wrap;
        justify-content: flex-start;
        text-align: left;
    }
}

/* ============================================================
   WORKREPORT SEO RESOURCE LIBRARY V1
   ============================================================ */

.seo-resource-hero {
    border-bottom: 1px solid #dce3e9;
    background: #ffffff;
}

.seo-resource-hero-inner {
    max-width: 1180px;
    margin: 0 auto;
    padding: 58px 24px 52px;
}

.seo-resource-hero h1 {
    max-width: 850px;
    margin: 10px 0 18px;
    color: #122536;
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1.03;
    letter-spacing: -.045em;
}

.seo-resource-lead {
    max-width: 790px;
    margin: 0;
    color: #536575;
    font-size: 16px;
    line-height: 1.75;
}

.seo-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 28px;
    color: #778795;
    font-size: 10px;
}

.seo-breadcrumb a {
    color: #315f85;
    text-decoration: none;
}

.seo-breadcrumb a:hover {
    text-decoration: underline;
}

.seo-resource-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 26px;
}

.seo-resource-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.8fr) minmax(260px, .72fr);
    gap: 46px;
    align-items: start;
}

.seo-content-section {
    padding: 0 0 30px;
    margin: 0 0 30px;
    border-bottom: 1px solid #e1e7ec;
}

.seo-content-section:last-child {
    border-bottom: 0;
}

.seo-content-section h2 {
    margin: 0 0 14px;
    color: #172b3c;
    font-size: 25px;
    line-height: 1.25;
}

.seo-content-section p {
    margin: 0 0 14px;
    color: #475a69;
    font-size: 14px;
    line-height: 1.8;
}

.seo-detail-list,
.seo-sidebar-card ul {
    margin: 16px 0 0;
    padding-left: 20px;
    color: #445868;
    font-size: 13px;
    line-height: 1.75;
}

.seo-resource-sidebar {
    display: grid;
    gap: 18px;
    position: sticky;
    top: 88px;
}

.seo-sidebar-card {
    padding: 22px;
    border: 1px solid #d8e1e8;
    background: #ffffff;
}

.seo-sidebar-label {
    display: block;
    margin-bottom: 8px;
    color: #2d6b99;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .09em;
}

.seo-sidebar-card h2 {
    margin: 0 0 10px;
    color: #172b3c;
    font-size: 18px;
}

.seo-sidebar-card p {
    margin: 0;
    color: #586b7a;
    font-size: 12px;
    line-height: 1.7;
}

.seo-sidebar-record {
    border-left: 3px solid #2b78ad;
}

.seo-official-links {
    display: grid;
    gap: 9px;
}

.seo-official-links a {
    color: #245f8b;
    font-size: 11px;
    line-height: 1.45;
    text-decoration: none;
}

.seo-official-links a:hover {
    text-decoration: underline;
}

.seo-related-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.seo-related-card {
    display: grid;
    align-content: start;
    gap: 8px;
    min-height: 165px;
    padding: 20px;
    border: 1px solid #d8e1e8;
    background: #ffffff;
    color: inherit;
    text-decoration: none;
}

.seo-related-card:hover {
    border-color: #9db6c9;
}

.seo-related-card strong {
    color: #172b3c;
    font-size: 16px;
}

.seo-related-card span {
    color: #617483;
    font-size: 11px;
    line-height: 1.6;
}

.seo-related-card em {
    margin-top: auto;
    color: #2b6f9e;
    font-size: 10px;
    font-style: normal;
    font-weight: 700;
}

.seo-resource-disclaimer {
    max-width: 1132px;
    margin: 0 auto 48px;
    padding: 18px 22px;
    border: 1px solid #d8e1e8;
    background: #f6f8fa;
    display: grid;
    gap: 5px;
}

.seo-resource-disclaimer strong {
    color: #273b4b;
    font-size: 11px;
}

.seo-resource-disclaimer span {
    color: #667886;
    font-size: 10px;
    line-height: 1.55;
}

@media (max-width: 900px) {
    .seo-resource-layout {
        grid-template-columns: 1fr;
    }

    .seo-resource-sidebar {
        position: static;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

@media (max-width: 620px) {
    .seo-resource-hero-inner {
        padding: 38px 18px;
    }

    .seo-resource-layout {
        padding-left: 18px;
        padding-right: 18px;
    }

    .seo-resource-sidebar,
    .seo-related-grid {
        grid-template-columns: 1fr;
    }

    .seo-resource-disclaimer {
        margin-left: 18px;
        margin-right: 18px;
    }
}
