/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.4;
    color: #1f2937;
    background-color: #ffffff;
    font-size: 0.875rem;
}

/* Container utilities */
.max-w-4xl {
    max-width: 42rem;
}

.mx-auto {
    margin-left: auto;
    margin-right: auto;
}

.py-4 {
    padding-top: 1.25rem;
    padding-bottom: 1.25rem;
}

.px-6 {
    padding-left: 1.75rem;
    padding-right: 1.75rem;
}

/* Smaller padding for compact layout */
.py-2 {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

.px-4 {
    padding-left: 1rem;
    padding-right: 1rem;
}

/* Flexbox utilities */
.flex {
    display: flex;
}

.flex-1 {
    flex: 1 1 0%;
}

.justify-between {
    justify-content: space-between;
}

.items-center {
    align-items: center !important;
    justify-content: flex-start;
}

/* Spacing utilities */
.mb-4 {
    margin-bottom: 1rem;
}

.mb-2 {
    margin-bottom: 0.5rem;
}

.ml-4 {
    margin-left: 1rem;
}

.p-3 {
    padding: 0.75rem;
}

.p-2 {
    padding: 0.5rem;
}

.pb-6 {
    padding-bottom: 1.5rem;
}

.space-x-4 > * + * {
    margin-left: 1rem;
}

/* Text utilities */
.text-right {
    text-align: right;
}

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

.font-bold {
    font-weight: 700;
}

.flex-center {
    display: flex;
    justify-content: center;
}

/* Table styles */
.table-fixed {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
    background-color: transparent;
}

.table-fixed tbody {
    background-color: transparent;
}

.table-fixed thead th {
    text-align: left;
    font-weight: 600;
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid #e5e7eb;
    font-size: 0.875rem;
}

.table-fixed tbody tr {
    border-bottom: 1px solid #e5e7eb;
}

.table-fixed tbody tr td {
    vertical-align: middle;
}

.table-fixed tbody td {
    padding: 0.5rem 0.75rem;
    vertical-align: middle !important;
    font-size: 0.875rem;
    line-height: 1.4;
}

/* Ensure proper alignment for company names */
.table-fixed tbody td:first-child {
    vertical-align: middle !important;
    padding: 0.5rem 0.75rem;
}

.table-fixed tbody td:first-child .flex {
    align-items: center;
    display: flex;
    line-height: 1.2;
    margin: 0;
    padding: 0;
}

.table-fixed tbody td:first-child .flex img {
    display: block;
    flex-shrink: 0;
    margin: 0;
    margin-right: 0.5rem !important;
    padding: 0;
}

.table-fixed tbody td:first-child .flex strong {
    display: flex;
    align-items: center;
    line-height: 1.2;
    margin: 0;
    padding: 0;
}

.table-fixed tbody td:first-child a {
    display: flex;
    align-items: center;
    height: 100%;
    vertical-align: middle;
}

/* Ensure proper alignment for company names */
.table-fixed tbody td:first-child {
    vertical-align: middle;
}

.table-fixed tbody td:first-child .flex {
    align-items: center;
    vertical-align: middle;
}

/* Table row background colors - must come after general tr rule */
.table-fixed tbody tr.bg-gray-100 {
    background-color: #f3f4f6 !important;
}

.table-fixed tbody tr.bg-gray-100 td {
    background-color: #f3f4f6 !important;
}

.table-fixed tbody tr.bg-white {
    background-color: #ffffff !important;
}

.table-fixed tbody tr.bg-white td {
    background-color: #ffffff !important;
}

/* General background color classes */
.bg-gray-100 {
    background-color: #f3f4f6;
}

.bg-white {
    background-color: #ffffff;
}

/* Width utilities */
.w-80 {
    width: 16rem;
}

.w-64 {
    width: 12rem;
}

/* Make table columns more compact */
.table-fixed {
    font-size: 0.8125rem;
}

.w-96 {
    width: 24rem;
}

.w-10 {
    width: 2.5rem;
}

.h-10 {
    height: 2.5rem;
}

/* Logo sizes */
.w-8 {
    width: 2rem;
}

.h-8 {
    height: 2rem;
}

/* Remove width constraint for company name container */
.flex.items-center {
    width: auto;
}

.w-1\/2 {
    width: 50%;
}

/* Image utilities */
.object-scale-down {
    object-fit: scale-down;
}

img {
    max-width: 100%;
    height: auto;
}

.flex-shrink-0 {
    flex-shrink: 0;
}

.mr-2 {
    margin-right: 0.5rem;
}

/* Ensure proper spacing between logo and company name */
.table-fixed tbody td:first-child .flex img {
    margin-right: 0.5rem !important;
}

.mr-1 {
    margin-right: 0.25rem;
}

/* Link styles */
a {
    color: #2563eb;
    text-decoration: none;
}

a:hover {
    text-decoration: none;
}

/* Company name links should be black */
.table-fixed tbody td:first-child a {
    color: #1f2937 !important;
}

.table-fixed tbody td:first-child a:hover {
    color: #1f2937 !important;
    text-decoration: none;
}

/* Navigation links should be black */
.text-right a,
.space-x-4 a,
div.text-right a,
div.space-x-4 a {
    color: #1f2937 !important;
}

.text-right a:hover,
.space-x-4 a:hover,
div.text-right a:hover,
div.space-x-4 a:hover {
    color: #1f2937 !important;
    text-decoration: none;
}

/* Form styles */
form {
    display: block;
}

form p {
    margin: 0;
}

select {
    /* Form controls don't inherit these; iOS Safari would show the text in its blue accent color */
    color: inherit;
    font-family: inherit;
    padding: 0.375rem 1.5rem 0.375rem 0.5rem;
    font-size: 0.875rem;
    line-height: 1.25;
    border: 1px solid #d1d5db;
    border-radius: 0.25rem;
    background-color: #ffffff;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.25rem center;
    background-repeat: no-repeat;
    background-size: 1em 1em;
    appearance: none;
    cursor: pointer;
    height: auto;
}

select:hover {
    border-color: #9ca3af;
}

select:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Button styles (for about page) */
button {
    background-color: #3b82f6;
    color: #ffffff;
    font-weight: 700;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

button:hover {
    background-color: #2563eb;
}

button a {
    color: #ffffff;
    text-decoration: none;
}

button:hover a {
    text-decoration: none;
}

/* About page styles */
.about-content {
    max-width: 42rem;
    margin: 0 auto;
}

.about-content h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: #1f2937;
}

.about-section {
    margin-bottom: 1.5rem;
}

.about-section p {
    font-size: 0.875rem;
    line-height: 1.6;
    color: #374151;
    margin-bottom: 0.75rem;
}

.about-subtitle {
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.75rem !important;
}

.criteria-list {
    margin-left: 1.5rem;
    margin-top: 0.5rem;
    padding-left: 0.5rem;
}

.criteria-list li {
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    line-height: 1.6;
    color: #374151;
}

.criteria-list li::marker {
    color: #6b7280;
    font-weight: 600;
}

.about-actions {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e5e7eb;
}

.back-button {
    display: inline-flex;
    align-items: center;
    color: #1f2937;
    font-weight: 500;
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
    text-decoration: none;
    font-size: 0.875rem;
    transition: all 0.2s;
    border: 1px solid #e5e7eb;
    background-color: #ffffff;
}

.back-button:hover {
    background-color: #f9fafb;
    border-color: #d1d5db;
    text-decoration: none;
    color: #1f2937;
    transform: translateX(-2px);
}

/* Heading styles */
h1 {
    font-size: 1.875rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

/* List styles */
ol {
    margin-left: 1.5rem;
    margin-top: 0.5rem;
}

ol li {
    margin-bottom: 0.5rem;
}

/* Div spacing */
div {
    margin-bottom: 1rem;
}


/* Links inside tables and the nav row are black, like the original site */
.table-fixed a,
.table-fixed a:hover,
.nav-links a,
.nav-links a:hover {
    color: #1f2937;
    text-decoration: none;
}


.nav-links > div {
    margin-bottom: 0;
}

/* Phones: let tables size to their content instead of fixed column widths */
@media (max-width: 640px) {
    .px-6 {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .table-fixed {
        table-layout: auto;
    }

    .table-fixed .w-80,
    .table-fixed .w-64,
    .table-fixed .w-96 {
        width: auto;
    }

    .table-fixed thead th,
    .table-fixed tbody td,
    .table-fixed tbody td:first-child {
        padding: 0.5rem 0.375rem;
    }

    /* Only split a word when it can't fit on a line by itself */
    .table-fixed tbody td {
        overflow-wrap: break-word;
    }

    .table-fixed tbody td:first-child .flex img {
        width: 1.5rem;
        height: 1.5rem;
    }

    .text-3xl {
        font-size: 1.375rem;
        line-height: 1.75rem;
    }

    h1.flex-center {
        display: block;
        text-align: center;
    }
}
