* {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    overflow-x: hidden;
}

.brand-identity {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    color: #0d2d75;
    line-height: 1.1;
}

.brand-identity__mark {
    width: 2.25rem;
    height: 2.25rem;
    object-fit: cover;
    border-radius: 50%;
    flex: 0 0 auto;
}

.brand-identity__name {
    font-family: Georgia, 'Times New Roman', serif;
    font-weight: 700;
    letter-spacing: .015em;
}

.brand-hero-logo {
    display: block;
    width: min(100%, 25rem);
    margin: 0 auto;
    border-radius: 1rem;
    box-shadow: 0 16px 38px rgba(10, 40, 108, .14);
}

.brand-tagline {
    color: #173f97;
}

img,
canvas,
iframe {
    max-width: 100%;
}

pre,
textarea,
input,
select {
    max-width: 100%;
}

pre {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

table {
    min-width: 720px;
}

.overflow-x-auto {
    -webkit-overflow-scrolling: touch;
}

.document-viewer canvas {
    max-width: 100%;
    height: auto;
}

@media (max-width: 1024px) {
    .sidebar {
        position: static !important;
        width: 100% !important;
        height: auto !important;
        max-height: none !important;
    }

    .content {
        margin-left: 0 !important;
        padding: 1rem !important;
    }

    body.flex.h-screen {
        display: block !important;
        height: auto !important;
        min-height: 100vh;
    }

    .document-viewer {
        height: auto !important;
        min-height: 60vh;
    }
}

@media (max-width: 768px) {
    nav .h-16 {
        height: auto !important;
        min-height: 4rem;
        padding-top: .75rem;
        padding-bottom: .75rem;
        flex-wrap: wrap;
        gap: .5rem;
    }

    nav .flex.items-center {
        min-width: 0;
        flex-wrap: wrap;
        row-gap: .25rem;
    }

    nav a,
    nav span,
    nav h1 {
        overflow-wrap: anywhere;
    }

    .brand-identity__mark {
        width: 2rem;
        height: 2rem;
    }

    .max-w-7xl,
    .max-w-6xl,
    .max-w-5xl,
    .max-w-4xl,
    .max-w-2xl {
        width: 100%;
    }

    .p-8 {
        padding: 1.25rem !important;
    }

    .p-6 {
        padding: 1rem !important;
    }

    .px-6 {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }

    .py-6 {
        padding-top: 1rem !important;
        padding-bottom: 1rem !important;
    }

    .gap-8 {
        gap: 1rem !important;
    }

    .space-x-2,
    .space-x-3,
    .space-x-4 {
        column-gap: .5rem;
    }

    .flex.justify-between,
    .flex.items-center.justify-between,
    .flex.justify-end {
        flex-wrap: wrap;
        row-gap: .75rem;
    }

    .grid {
        min-width: 0;
    }

    .text-3xl {
        font-size: 1.875rem;
        line-height: 2.25rem;
    }

    .text-2xl {
        font-size: 1.5rem;
        line-height: 2rem;
    }

    .sidebar {
        padding: 1rem;
    }

    .sidebar nav {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
        gap: .5rem;
    }

    .sidebar a {
        border-radius: .375rem;
    }

    .toolbar {
        position: static !important;
        align-items: flex-start !important;
    }

    .w-80 {
        width: 100% !important;
    }

    .h-screen {
        height: auto !important;
        min-height: 100vh;
    }
}

@media (max-width: 640px) {
    table {
        min-width: 640px;
    }

    .rounded-lg {
        border-radius: .375rem;
    }

    button,
    .button,
    a[class*="bg-"] {
        min-height: 2.5rem;
    }

    .document-viewer {
        padding: .75rem !important;
    }
}
