* { box-sizing: border-box; }
body {
    font-family: "Segoe UI", Tahoma, Arial, sans-serif;
    margin: 0;
    background: linear-gradient(180deg, #eef3f9 0%, #f8fafc 380px, #f8fafc 100%);
    color: #0f172a;
    line-height: 1.55;
}
a { color: #0b4f8a; }
a:hover { color: #083b67; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
    outline: 3px solid #ffbf47;
    outline-offset: 2px;
}
.container { max-width: 1080px; margin: 0 auto; padding: 1.25rem; }
.container.narrow { max-width: 760px; }
.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    background: #111827;
    color: #fff;
    padding: .7rem 1rem;
    border-radius: 0 0 8px 0;
    z-index: 1000;
}
.skip-link:focus { left: 0; }
.hero {
    background: #0b3d68;
    color: #fff;
    border-radius: 14px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1rem;
    box-shadow: 0 8px 30px rgba(9, 37, 61, .24);
}
.hero h1 { margin: 0 0 .4rem; font-size: 1.85rem; }
.hero p { margin: .2rem 0; color: #dbe8f5; }
.hero-top { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
.hero img { max-height: 105px; background: transparent; border-radius: 0; padding: 0; }
.hero-copy { display: flex; flex-direction: column; gap: .15rem; flex: 1 1 320px; min-width: 0; }
.hero-title-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: baseline;
    column-gap: .75rem;
    width: 100%;
}
.hero-title-row h1 { margin: 0; }
.hero-subtitle {
    margin: 0;
    font-weight: 700;
    color: #dbe8f5;
    text-align: right;
    padding-right: 10px;
    white-space: nowrap;
}
.hero-contact {
    margin: .2rem 0 0;
    display: flex;
    flex-wrap: wrap;
    gap: .65rem;
    color: #dbe8f5;
}
.hero-contact span { display: inline-block; }
.hero.small { padding: 1rem 1.1rem; border-radius: 12px; margin-bottom: .85rem; }
.hero.small h1 { font-size: 1.35rem; }
.brand-strip { display: flex; align-items: center; gap: .8rem; margin-bottom: .5rem; }
.brand-strip img { max-height: 52px; background: #fff; border-radius: 8px; padding: .2rem; }
.card {
    background: #fff;
    border: 1px solid #d8e1ea;
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: 0 6px 20px rgba(18, 42, 66, .06);
}
.card h2 { margin-top: 0; }
.grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.feature-card { border-top: 4px solid #0b4f8a; }
.tools-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.1rem;
}
.tools-grid .feature-card {
    min-height: 250px;
    padding: 1.1rem 1.15rem;
}
.tool-icon {
    margin: .15rem 0 .5rem;
    font-size: 1.7rem;
    line-height: 1;
}
.tool-description {
    margin: .25rem 0 .95rem;
    color: #334155;
}
.tools-panel-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: .8rem;
}
.tool-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .45rem;
}
.tool-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2rem;
    height: 2rem;
    padding: 0 .45rem;
    border-radius: 999px;
    font-size: .8rem;
    font-weight: 800;
    letter-spacing: .03em;
    color: #1e3a8a;
    background: #e8efff;
    border: 1px solid #c7d7ff;
}
.actions { display: flex; flex-wrap: wrap; gap: .6rem; }
a.button, button {
    display: inline-block;
    border: 1px solid #0b3d68;
    background: #0b3d68;
    color: #fff;
    padding: .62rem 1rem;
    border-radius: 8px;
    text-decoration: none;
    cursor: pointer;
    font-weight: 600;
}
a.button.secondary {
    background: #fff;
    color: #0b4f8a;
}
a.button:focus, button:focus, input:focus, textarea:focus, select:focus {
    outline: 3px solid #ffbf47;
    outline-offset: 2px;
}
label { display: block; font-weight: 700; margin-top: .85rem; color: #1e293b; }
input, textarea, select {
    width: 100%;
    padding: .62rem;
    border: 1px solid #94a3b8;
    border-radius: 8px;
    background: #fff;
}
input[type="checkbox"],
input[type="radio"] {
    width: auto;
    display: inline-block;
    vertical-align: middle;
    margin: 0 .45rem 0 0;
    padding: 0;
}
label input[type="checkbox"],
label input[type="radio"] {
    margin-top: .18rem;
}
input[aria-invalid="true"], textarea[aria-invalid="true"], select[aria-invalid="true"] {
    border-width: 2px;
    border-color: #8a1111;
}
input:hover, textarea:hover, select:hover { border-color: #64748b; }
small, .hint { color: #334155; }
.error { color: #8a1111; font-weight: 700; }
.success { color: #155d27; font-weight: 700; }
.muted { color: #475569; }
.required-marker { font-size: .9rem; color: #334155; font-weight: 600; }
fieldset { border: 1px solid #c7d2e0; border-radius: 10px; padding: .8rem; margin: 1rem 0; }
legend { font-weight: 700; color: #1e293b; padding: 0 .35rem; }
.checkbox-inline {
    display: flex;
    align-items: flex-start;
    gap: .55rem;
    margin-top: .45rem;
    font-weight: 600;
}
.checkbox-inline input[type="checkbox"] {
    width: auto;
    margin: .15rem 0 0;
    flex: 0 0 auto;
}
.error-summary {
    border: 2px solid #8a1111;
    background: #fff4f4;
    padding: .8rem;
    border-radius: 10px;
    margin: .8rem 0;
}
.error-summary h2 { margin: 0 0 .45rem; font-size: 1.05rem; }
.error-summary ul { margin: 0; padding-left: 1.2rem; }
table { width: 100%; border-collapse: collapse; background: #fff; }
th, td { border: 1px solid #d5dde7; padding: .55rem; text-align: left; }
th { background: #f0f5fb; color: #0f2741; }
.panel-title { margin: 0 0 .35rem; }
.kicker { text-transform: uppercase; letter-spacing: .06em; font-size: .78rem; font-weight: 700; color: #6b7280; margin: 0 0 .35rem; }
.form-actions { margin-top: 1rem; display: flex; gap: .5rem; flex-wrap: wrap; }
.search-row {
    display: grid;
    grid-template-columns: 1fr 1fr auto auto;
    gap: .5rem;
    margin: .75rem 0 1rem;
}
.open-alert-banner {
    margin-top: .8rem;
    background: #fff3cd;
    color: #4b3b00;
    border: 2px solid #f2c94c;
    border-radius: 10px;
    padding: .65rem .8rem;
    font-weight: 700;
}
.open-indicator-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: .65rem;
    margin-bottom: .8rem;
}
.open-indicator-card {
    display: block;
    text-decoration: none;
    border: 2px solid #c8d5e6;
    border-radius: 10px;
    padding: .65rem;
    background: #f8fbff;
}
.open-indicator-card.has-open {
    border-color: #c62828;
    background: #fff2f2;
    box-shadow: inset 0 0 0 1px #e57373;
}
.indicator-title { display: block; font-weight: 700; color: #0f2741; }
.indicator-count { display: block; font-size: 1.45rem; font-weight: 800; color: #c62828; line-height: 1.1; }
.indicator-sub { display: block; font-size: .86rem; color: #334155; }
.status-badge {
    display: inline-block;
    padding: .15rem .55rem;
    border-radius: 999px;
    font-size: .82rem;
    font-weight: 700;
    border: 1px solid #94a3b8;
    background: #f1f5f9;
    color: #0f2741;
}
.status-open {
    background: #fff4d6;
    color: #5b4200;
    border-color: #f2c94c;
}
.status-closed {
    background: #e8f8ef;
    color: #0f5132;
    border-color: #83d6ab;
}
.case-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: .55rem;
    margin-bottom: .9rem;
}
.summary-item {
    border: 1px solid #d5dde7;
    border-radius: 8px;
    padding: .55rem .65rem;
    background: #f9fbfd;
}
.summary-label {
    display: block;
    font-size: .78rem;
    color: #526273;
    text-transform: uppercase;
    letter-spacing: .04em;
    font-weight: 700;
}
.summary-value {
    display: block;
    margin-top: .1rem;
    font-weight: 700;
    color: #0f2741;
}
.details-table td:nth-child(1) {
    width: 32%;
    font-weight: 700;
    color: #21384f;
    background: #f8fbff;
}
.summary-lines {
    border: 1px solid #d5dde7;
    border-radius: 8px;
    padding: .65rem .75rem;
    background: #f9fbfd;
    margin-bottom: .9rem;
}
.summary-lines p {
    margin: .2rem 0;
    color: #102a43;
}
.submission-image-preview {
    display: block;
    margin-top: .45rem;
    max-width: min(420px, 100%);
    max-height: 320px;
    border: 1px solid #d5dde7;
    border-radius: 8px;
    background: #fff;
    padding: .2rem;
}
.site-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
    margin: 1.4rem auto .4rem;
    padding-top: .9rem;
    border-top: 1px solid #d5dde7;
}
.site-footer img {
    display: block;
    margin: 0 auto .45rem;
    max-width: 10% !important;
    width: 100%;
    height: auto;
}
.site-footer p {
    margin: 0;
    color: #334155;
    font-size: .95rem;
    text-align: center;
}
.sr-only {
    border: 0 !important;
    clip: rect(1px, 1px, 1px, 1px) !important;
    clip-path: inset(50%) !important;
    height: 1px !important;
    margin: -1px !important;
    overflow: hidden !important;
    padding: 0 !important;
    position: absolute !important;
    width: 1px !important;
    white-space: nowrap !important;
}
@media (max-width: 760px) {
    .container { padding: .9rem; }
    .hero h1 { font-size: 1.45rem; }
    .hero-top { align-items: flex-start; }
    .hero-copy { flex-basis: 100%; }
    .hero-title-row { display: flex; flex-direction: column; gap: .15rem; align-items: flex-start; }
    .hero-subtitle { text-align: left; padding-right: 0; }
    .hero-contact { gap: .35rem; }
    .hero-contact span { width: 100%; }
    .actions, .form-actions { flex-direction: column; align-items: stretch; }
    a.button, button { width: 100%; text-align: center; }
    .search-row { grid-template-columns: 1fr; }
    .tools-grid { grid-template-columns: 1fr; }
    .tools-panel-header { flex-direction: column; }
}

/* Public portal optional "modern" preview mode */
.portal-modern {
    background:
        radial-gradient(1200px 520px at -10% -20%, rgba(99, 102, 241, .20), transparent 55%),
        radial-gradient(1000px 500px at 110% -25%, rgba(14, 165, 233, .22), transparent 52%),
        radial-gradient(900px 420px at 50% 120%, rgba(168, 85, 247, .18), transparent 54%),
        linear-gradient(180deg, #eef4ff 0%, #f5f8ff 45%, #f8fbff 100%);
}
.portal-modern body,
.portal-modern {
    font-family: Inter, "Segoe UI", Tahoma, Arial, sans-serif;
}
.portal-modern .container {
    max-width: 1180px;
}
.portal-modern .hero {
    position: relative;
    overflow: hidden;
    background: #0b3d68;
    border: 1px solid rgba(255, 255, 255, .25);
    box-shadow: 0 18px 42px rgba(34, 53, 93, .24);
    padding: 1.55rem 1.75rem;
    backdrop-filter: blur(7px);
}
.portal-modern .hero::before {
    content: "";
    position: absolute;
    inset: -20% auto auto -8%;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, .24) 0%, rgba(255, 255, 255, 0) 68%);
    pointer-events: none;
}
.portal-modern .hero::after {
    content: "";
    position: absolute;
    right: -70px;
    bottom: -95px;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(148, 163, 255, .16) 0%, rgba(148, 163, 255, 0) 70%);
    pointer-events: none;
}
.portal-modern .hero-title-row h1 {
    font-size: 2.05rem;
    font-weight: 700;
    letter-spacing: .01em;
    line-height: 1.1;
    text-wrap: balance;
}
.portal-modern .hero-subtitle {
    background: rgba(255, 255, 255, .18);
    padding: .36rem .72rem;
    border-radius: 999px;
    letter-spacing: .01em;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22);
    font-weight: 400;
}
.portal-modern .hero-contact {
    gap: .55rem;
    opacity: .98;
}
.portal-modern .hero-contact span {
    background: transparent;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
}
.portal-modern .tools-panel {
    border-radius: 16px;
    border: 1px solid #cfdcf0;
    background: linear-gradient(180deg, #f8fbff 0%, #f1f6ff 100%);
}
.portal-modern .tools-panel-header {
    border-bottom: 1px solid #d9e4f5;
    padding-bottom: .7rem;
}
.portal-modern .tools-panel .hint {
    color: #4e6584;
    font-weight: 600;
}
.portal-modern .feature-card {
    position: relative;
    border: 1px solid rgba(194, 210, 234, .92);
    border-radius: 16px;
    box-shadow: 0 14px 34px rgba(18, 38, 70, .09);
    transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
    background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
}
.portal-modern .feature-card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 16px;
    pointer-events: none;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .85);
}
.portal-modern .feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 42px rgba(18, 38, 70, .17);
    border-color: #a8c0e6;
}
.portal-modern .tool-icon {
    font-size: 2.05rem;
    filter: saturate(1.05);
}
.portal-modern .tool-badge {
    color: #334155;
    background: #eef2ff;
    border-color: #d2ddff;
}
.portal-modern .tool-description {
    color: #324a66;
    line-height: 1.5;
}
.portal-modern .feature-card h2 {
    font-size: 1.23rem;
    letter-spacing: .01em;
    margin-bottom: .35rem;
}
.portal-modern .feature-card .kicker {
    color: #5f7493;
}
.portal-modern .feature-card .button {
    width: 100%;
    text-align: center;
    border-radius: 10px;
    background: #0b3d68;
    border-color: #0b3d68;
}
.portal-modern .feature-card .button:hover {
    background: #082f51;
}
.portal-modern .site-footer {
    border-top-color: #cad7ea;
}
.portal-modern .site-footer p {
    color: #3b4d66;
}
