:root {
    --police-blue: #005aa0;
    --police-dark: #003f73;
    --police-yellow: #facf32;
    --ink: #111827;
    --muted: #5d6673;
    --line: #d8dde5;
    --surface: #f0f1f3;
    --white: #ffffff;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    color: var(--ink);
    background: var(--surface);
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.5;
}

a {
    color: inherit;
}

.top-line {
    height: 8px;
    background: var(--police-yellow);
}

.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    min-height: 80px;
    padding: 12px max(24px, calc((100vw - 1040px) / 2));
    background: var(--white);
    border-bottom: 1px solid var(--line);
}

.brand {
    display: flex;
    align-items: center;
    gap: 14px;
    color: var(--police-blue);
    font-size: 21px;
    font-weight: 700;
    text-decoration: none;
}

.brand img {
    width: 146px;
    height: auto;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.nav-link {
    color: var(--police-dark);
    font-weight: 700;
    text-decoration: none;
}

.leave-button,
.primary-button,
.secondary-button,
.danger-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 10px 24px;
    border: 2px solid #111;
    border-radius: 4px;
    font: inherit;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}

.leave-button,
.primary-button {
    color: #111;
    background: var(--police-yellow);
}

.secondary-button {
    width: 100%;
    color: var(--white);
    background: var(--police-blue);
    border-color: var(--police-blue);
}

.danger-button {
    width: 100%;
    color: #fff;
    background: #8b1e1e;
    border-color: #8b1e1e;
}

.notice {
    width: min(1040px, calc(100% - 32px));
    margin: 18px auto 0;
    padding: 14px 18px;
    color: #173b00;
    background: #eaf5d6;
    border: 1px solid #bcd98f;
    border-radius: 4px;
    font-weight: 700;
}

.hero {
    min-height: 430px;
    display: grid;
    place-items: center;
    padding: 48px 20px;
    background:
        linear-gradient(90deg, rgba(0, 22, 42, .86) 0%, rgba(0, 43, 78, .68) 42%, rgba(0, 0, 0, .18) 100%),
        linear-gradient(0deg, rgba(0, 0, 0, .18), rgba(0, 0, 0, .18)),
        url("assets/su-hero-background.png");
    background-position: center center;
    background-size: cover;
    background-repeat: no-repeat;
}

.hero-overlay {
    width: min(1040px, calc(100% - 16px));
    color: var(--white);
}

.hero h1 {
    max-width: 820px;
    margin: 6px 0 12px;
    padding: 8px 14px;
    display: inline-block;
    color: #fff;
    background: rgba(0, 0, 0, .78);
    font-size: clamp(32px, 5vw, 58px);
    line-height: 1.08;
}

.hero p:not(.eyebrow) {
    max-width: 650px;
    margin: 0 0 24px;
    font-size: 19px;
}

.eyebrow {
    margin: 0;
    color: var(--police-yellow);
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.quick-actions {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    width: min(1040px, calc(100% - 32px));
    margin: 40px auto 0;
}

.quick-actions a {
    min-height: 58px;
    display: flex;
    align-items: center;
    padding: 14px 24px;
    color: var(--white);
    background: var(--police-blue);
    border-radius: 4px;
    font-size: 18px;
    font-weight: 700;
    text-decoration: underline;
}

.page {
    width: min(1040px, calc(100% - 32px));
    margin: 48px auto;
}

.narrow-page {
    width: min(560px, calc(100% - 32px));
}

.section-heading {
    margin-bottom: 24px;
}

.section-heading h1,
.section-heading h2 {
    margin: 4px 0 8px;
    font-size: clamp(28px, 4vw, 40px);
    line-height: 1.15;
}

.section-heading .eyebrow {
    color: var(--police-blue);
}

.section-heading p:not(.eyebrow) {
    max-width: 720px;
    margin: 0;
    color: var(--muted);
    font-size: 18px;
}

.panel,
.report-form,
.case-card {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 6px;
    box-shadow: 0 1px 2px rgba(17, 24, 39, .05);
}

.panel,
.report-form {
    padding: 28px;
}

.narrow-panel {
    max-width: 620px;
}

.panel h1 {
    margin-top: 0;
}

.form-grid,
.report-form {
    display: grid;
    gap: 18px;
}

label,
legend {
    color: var(--ink);
    font-weight: 700;
}

input,
textarea,
select {
    width: 100%;
    margin-top: 7px;
    padding: 12px 13px;
    border: 1px solid #aeb7c2;
    border-radius: 4px;
    background: var(--white);
    color: var(--ink);
    font: inherit;
}

textarea {
    resize: vertical;
}

.radio-panel {
    display: flex;
    flex-wrap: wrap;
    gap: 16px 24px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 4px;
}

.radio-panel label {
    display: flex;
    align-items: center;
    gap: 8px;
}

.radio-panel input {
    width: auto;
    margin: 0;
}

.case-columns {
    display: grid;
    grid-template-columns: .78fr 1.22fr;
    gap: 28px;
}

.portal-grid,
.home-grid {
    display: grid;
    grid-template-columns: .9fr 1.1fr;
    gap: 28px;
    align-items: start;
}

.profile-panel {
    margin-bottom: 28px;
}

.inline-form {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 16px;
    align-items: end;
}

.case-columns h2 {
    margin: 0 0 14px;
}

.subsection-title {
    margin-top: 28px !important;
}

.case-list {
    display: grid;
    gap: 16px;
}

.case-card {
    padding: 18px;
}

.case-meta {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.case-meta strong {
    color: var(--police-blue);
    font-size: 20px;
}

.case-meta span {
    color: var(--muted);
    font-size: 14px;
    text-align: right;
}

.case-details {
    display: grid;
    gap: 7px;
    margin: 0 0 18px;
}

.case-details dt {
    color: var(--police-dark);
    font-weight: 800;
}

.case-details dd {
    margin: 0 0 10px;
}

.compact-form {
    padding-top: 18px;
    border-top: 1px solid var(--line);
}

.thread-panel {
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
}

.request-panel {
    margin: 18px 0;
    padding: 16px;
    background: #f8fafc;
    border: 1px solid var(--line);
    border-radius: 4px;
}

.request-panel h3 {
    margin: 0 0 12px;
}

.request-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    align-items: center;
    padding: 10px 0;
    border-top: 1px solid var(--line);
}

.request-row:first-of-type {
    border-top: 0;
}

.request-row .secondary-button {
    width: auto;
}

.archive-form {
    margin-top: 14px;
}

.archive-section {
    margin-top: 48px;
    padding-top: 34px;
    border-top: 4px solid var(--police-yellow);
}

.archived-card {
    background: #f8fafc;
}

.thread-panel h3,
.ai-card h3 {
    margin: 0 0 12px;
}

.message-list,
.ai-messages {
    display: grid;
    gap: 12px;
    max-height: 360px;
    overflow: auto;
    padding: 4px;
}

.message {
    padding: 12px 14px;
    background: #edf3f9;
    border-left: 4px solid var(--police-blue);
    border-radius: 4px;
}

.message-own {
    background: #fff7d8;
    border-left-color: var(--police-yellow);
}

.message strong {
    display: block;
    color: var(--police-dark);
}

.message span {
    display: block;
    margin-top: 2px;
    color: var(--muted);
    font-size: 13px;
}

.message p {
    margin: 7px 0 0;
}

.limit-note {
    padding: 12px 14px;
    color: #3a2b00;
    background: #fff2bf;
    border: 1px solid #f0ce5c;
    border-radius: 4px;
    font-weight: 700;
}

.secondary-link {
    color: var(--police-blue);
    font-weight: 700;
}

.ai-card {
    padding: 18px;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 6px;
}

.ai-form {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    margin-top: 14px;
}

.empty {
    margin: 0;
    padding: 18px;
    color: var(--muted);
    background: var(--white);
    border: 1px dashed #b8c0ca;
    border-radius: 6px;
}

.site-footer {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 24px;
    padding: 28px 20px;
    color: var(--police-dark);
    background: var(--white);
    border-top: 1px solid var(--line);
    font-weight: 700;
}

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

.site-footer img {
    width: 112px;
    height: auto;
}

.rp-disclaimer {
    padding: 14px 18px;
    color: #111;
    background: #fff2bf;
    border: 3px solid var(--police-yellow);
    border-radius: 4px;
    font-weight: 700;
}

.rp-disclaimer strong,
.rp-disclaimer span {
    display: block;
}

.rp-disclaimer span {
    margin-top: 4px;
    font-weight: 600;
}

@media (max-width: 760px) {
    .site-header,
    .header-actions,
    .case-meta {
        align-items: stretch;
        flex-direction: column;
    }

    .brand {
        font-size: 18px;
    }

    .brand img {
        width: 128px;
    }

    .header-actions {
        gap: 10px;
    }

    .leave-button,
    .primary-button,
    .secondary-button,
    .danger-button,
    .nav-link {
        width: 100%;
    }

    .quick-actions,
    .case-columns,
    .portal-grid,
    .home-grid,
    .inline-form,
    .ai-form,
    .request-row {
        grid-template-columns: 1fr;
    }

    .panel,
    .report-form {
        padding: 20px;
    }

    .hero {
        min-height: 380px;
        place-items: end start;
    }

    .site-footer {
        grid-template-columns: 1fr;
    }
}
