:root {
    color-scheme: light;
    --judiciary-navy: #102A43;
    --judiciary-burgundy: #792D32;
    --judiciary-parchment: #F4EFE5;
    --judiciary-stone: #D8D0C2;
    --judiciary-brass: #B08A45;
    --judiciary-ink: #182026;
    --judiciary-paper: #FCFBF8;
    --judiciary-link: #164E87;
    --primary: var(--judiciary-burgundy);
    --primary-dark: var(--judiciary-navy);
    --primary-soft: var(--judiciary-parchment);
    --primary-border: var(--judiciary-stone);

    --orange: var(--judiciary-brass);
    --orange-soft: #fff3df;

    --green: #168a4b;
    --green-soft: #dcf8e7;

    --red: #b5472d;
    --red-soft: #fce8e4;

    --blue-soft: #eef4fb;
    --yellow: #f5b400;
    --yellow-soft: #fff8d9;

    --page-bg: var(--judiciary-parchment);
    --card-bg: var(--judiciary-paper);
    --header-bg: #f7f3eb;

    --text: var(--judiciary-ink);
    --muted: rgb(16 42 67 / 0.78);
    --border: var(--judiciary-stone);
    --border-light: rgb(216 208 194 / 0.62);

    --radius: 8px;
    --shadow: 0 5px 18px rgb(16 42 67 / 0.09);
}

.dark {
    color-scheme: dark;
    --page-bg: var(--judiciary-ink);
    --card-bg: var(--judiciary-navy);
    --header-bg: rgb(16 42 67 / 0.72);
    --text: var(--judiciary-parchment);
    --muted: rgb(244 239 229 / 0.72);
    --border: rgb(216 208 194 / 0.24);
    --border-light: rgb(216 208 194 / 0.15);
    --primary: var(--judiciary-brass);
    --primary-dark: var(--judiciary-parchment);
    --primary-soft: rgb(176 138 69 / 0.14);
    --primary-border: rgb(216 208 194 / 0.24);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background:
        linear-gradient(rgb(252 251 248 / 0.72),
            rgb(244 239 229 / 0.84)),
        radial-gradient(circle at top right,
            rgb(176 138 69 / 0.18),
            transparent 38%),
        var(--page-bg);

    color: var(--text);
    font-family:
        "Courier New",
        Courier,
        monospace;
    font-size: 14px;
    line-height: 1.55;
}

a {
    color: inherit;
}

.page {
    width: min(1400px, calc(100% - 28px));
    margin: 0 auto;
    padding: 22px 0 45px;
}

/*
|--------------------------------------------------------------------------
| Site heading
|--------------------------------------------------------------------------
*/

.site-heading {
    margin-bottom: 18px;
    text-align: center;
}

.site-heading h1 {
    margin: 0;
    color: var(--primary-dark);
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(22px, 3vw, 34px);
    font-weight: 700;
}

.site-heading p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 13px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

/*
|--------------------------------------------------------------------------
| Main case banner
|--------------------------------------------------------------------------
*/

.case-banner {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
    min-height: 116px;
    margin-bottom: 18px;
    padding: 24px 30px;
    overflow: hidden;
    border-left: 7px solid var(--judiciary-brass);
    border-radius: var(--radius);
    background:
        linear-gradient(110deg, var(--judiciary-navy), #183e60 62%, var(--judiciary-burgundy));
    box-shadow: var(--shadow);
    color: #ffffff;
}

.case-banner::after {
    position: absolute;
    top: -90px;
    right: -60px;
    width: 260px;
    height: 260px;
    border: 45px solid rgba(255, 255, 255, 0.04);
    border-radius: 50%;
    content: "";
}

.case-banner__content,
.case-banner__badges {
    position: relative;
    z-index: 1;
}

.case-banner h2 {
    margin: 0 0 8px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(24px, 4vw, 34px);
    line-height: 1.2;
}

.cino-pill {
    display: inline-flex;
    align-items: center;
    padding: 5px 14px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.15);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.case-banner__badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 9px;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    white-space: nowrap;
}

.badge::before {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    content: "";
}

.badge-type {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
}

.status-pending {
    background: var(--orange);
    color: #ffffff;
}

.status-disposed {
    background: var(--green-soft);
    color: var(--green);
}

/*
|--------------------------------------------------------------------------
| Cards
|--------------------------------------------------------------------------
*/

.card {
    margin-bottom: 18px;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--card-bg);
    box-shadow: var(--shadow);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 15px;
    min-height: 68px;
    padding: 12px 17px;
    border-bottom: 1px solid var(--border);
    background: var(--header-bg);
}

.card-icon {
    display: grid;
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    place-items: center;
    border: 1px solid var(--primary-border);
    border-radius: 7px;
    background: var(--primary-soft);
    color: var(--primary);
    font-family: Arial, sans-serif;
    font-size: 18px;
    font-weight: 700;
}

.card-title {
    flex: 1;
}

.card-title h3 {
    margin: 0;
    color: var(--primary-dark);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 20px;
    line-height: 1.2;
}

.card-title p {
    margin: 2px 0 0;
    color: #436176;
    font-size: 11px;
    letter-spacing: 0.08em;
}

.card-chevron {
    color: var(--primary);
    font-family: Arial, sans-serif;
    font-size: 18px;
}

/*
|--------------------------------------------------------------------------
| Information grid
|--------------------------------------------------------------------------
*/

.details-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.detail-item {
    min-height: 110px;
    padding: 17px;
    border-right: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.detail-item:nth-child(3n) {
    border-right: 0;
}

.detail-item--wide {
    grid-column: span 3;
    border-right: 0;
}

.detail-label {
    display: block;
    margin-bottom: 7px;
    color: #53677e;
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.detail-value {
    color: var(--primary-dark);
    font-size: 15px;
    font-weight: 700;
    overflow-wrap: anywhere;
}

/*
|--------------------------------------------------------------------------
| Parties
|--------------------------------------------------------------------------
*/

.party-columns {
    display: grid;
    grid-template-columns: 1fr 52px 1fr;
}

.party-column {
    min-height: 230px;
    padding: 16px;
}

.party-column:first-child {
    background: #f7f3eb;
}

.party-column:last-child {
    background: #fbf4f2;
}

.party-heading {
    margin: -16px -16px 15px;
    padding: 10px 16px;
    border-bottom: 1px solid var(--border);
    color: var(--primary-dark);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.party-column:last-child .party-heading {
    color: var(--judiciary-burgundy);
}

.versus-column {
    display: flex;
    align-items: center;
    justify-content: center;
    border-right: 1px solid var(--border);
    border-left: 1px solid var(--border);
    background: #fffdf9;
}

.versus {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border: 2px solid var(--orange);
    border-radius: 50%;
    background: #ffffff;
    color: #a94f00;
    font-size: 12px;
    font-weight: 700;
}

.party-person {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 9px;
    margin-bottom: 15px;
}

.party-number {
    display: grid;
    width: 25px;
    height: 25px;
    place-items: center;
    border-radius: 4px;
    background: var(--primary-dark);
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
}

.respondent .party-number {
    background: var(--judiciary-burgundy);
}

.party-name {
    margin: 0 0 8px;
    color: var(--primary-dark);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
}

.advocate-line {
    color: var(--judiciary-burgundy);
    font-size: 12px;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.advocate-tag {
    display: inline-block;
    margin-right: 6px;
    padding: 1px 4px;
    border-radius: 3px;
    background: var(--primary);
    color: #ffffff;
    font-size: 10px;
}

.party-footer {
    display: flex;
    justify-content: space-between;
    padding: 8px 17px;
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-size: 11px;
}

/*
|--------------------------------------------------------------------------
| Orders
|--------------------------------------------------------------------------
*/

.table-wrapper {
    overflow-x: auto;
}

.orders-table {
    width: 100%;
    min-width: 720px;
    border-collapse: collapse;
}

.orders-table th {
    padding: 11px 14px;
    background: var(--primary-dark);
    color: #d8f4ef;
    font-size: 11px;
    letter-spacing: 0.07em;
    text-align: left;
    text-transform: uppercase;
}

.orders-table td {
    padding: 13px 14px;
    border-bottom: 1px solid var(--border-light);
    color: #18334a;
    vertical-align: middle;
}

.orders-table tbody tr:hover {
    background: #f8fbfb;
}

.order-number {
    display: inline-grid;
    min-width: 37px;
    height: 26px;
    place-items: center;
    border: 1px solid var(--primary-border);
    border-radius: 4px;
    background: var(--primary-soft);
    color: var(--primary-dark);
}

.order-type {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 9px;
    border-radius: 999px;
    background: #fff0ae;
    color: #945000;
    font-size: 11px;
    font-weight: 700;
}

.order-type::before {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #f09500;
    content: "";
}

.pdf-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-width: 132px;
    padding: 7px 13px;
    border: 1px solid #82c4bd;
    border-radius: 5px;
    background: #e1f2f0;
    color: var(--primary-dark);
    font-family: inherit;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    transition:
        background 0.15s ease,
        color 0.15s ease,
        transform 0.15s ease;
}

.pdf-link:hover {
    background: var(--primary);
    color: #ffffff;
    transform: translateY(-1px);
}

.pdf-link::before {
    content: "▣";
    font-size: 13px;
}

.table-footer {
    padding: 9px 17px;
    background: #f7f9fa;
    color: var(--muted);
    font-size: 11px;
}

.empty-state {
    padding: 32px !important;
    color: var(--muted) !important;
    text-align: center;
}

/*
|--------------------------------------------------------------------------
| Alert and utility sections
|--------------------------------------------------------------------------
*/

.category-note {
    padding: 11px 17px;
    border-top: 1px solid var(--border);
    background: var(--primary-soft);
    color: #405e6d;
    font-family: Arial, sans-serif;
    font-size: 13px;
}

/*
|--------------------------------------------------------------------------
| Responsive design
|--------------------------------------------------------------------------
*/

@media (max-width: 850px) {
    .case-banner {
        align-items: flex-start;
        flex-direction: column;
        padding: 22px;
    }

    .case-banner__badges {
        justify-content: flex-start;
    }

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

    .detail-item:nth-child(3n) {
        border-right: 1px solid var(--border);
    }

    .detail-item:nth-child(2n) {
        border-right: 0;
    }

    .detail-item--wide {
        grid-column: span 2;
        border-right: 0;
    }

    .party-columns {
        grid-template-columns: 1fr;
    }

    .versus-column {
        min-height: 55px;
        border-top: 1px solid var(--border);
        border-right: 0;
        border-bottom: 1px solid var(--border);
        border-left: 0;
    }
}

@media (max-width: 560px) {
    body {
        font-size: 13px;
    }

    .page {
        width: min(100% - 16px, 1400px);
        padding-top: 10px;
    }

    .site-heading {
        padding: 10px 5px;
    }

    .site-heading h1 {
        font-size: 22px;
    }

    .case-banner {
        min-height: auto;
        padding: 20px 16px;
    }

    .case-banner h2 {
        font-size: 24px;
    }

    .card-header {
        min-height: 62px;
        padding: 11px;
    }

    .card-title h3 {
        font-size: 18px;
    }

    .details-grid {
        grid-template-columns: 1fr;
    }

    .detail-item,
    .detail-item:nth-child(2n),
    .detail-item:nth-child(3n) {
        grid-column: span 1;
        min-height: auto;
        border-right: 0;
    }

    .detail-item--wide {
        grid-column: span 1;
    }

    .party-footer {
        flex-direction: column;
        gap: 5px;
    }
}

@media print {
    body {
        background: #ffffff;
    }

    .page {
        width: 100%;
        padding: 0;
    }

    .card,
    .case-banner {
        break-inside: avoid;
        box-shadow: none;
    }

    .pdf-link {
        border: 0;
        padding: 0;
        background: transparent;
    }
}
