@font-face {
    font-family: "Inter";
    src: url("/static/Inter-VariableFont_opsz,wght.ttf")
        format("truetype-variations");
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

:root {
    --max-width: 85rem;

    --oc-blue-0: #e7f5ff;
    --oc-blue-1: #d0ebff;
    --oc-blue-2: #a5d8ff;
    --oc-blue-3: #74c0fc;
    --oc-blue-4: #4dabf7;
    --oc-blue-5: #339af0;
    --oc-blue-6: #228be6;
    --oc-blue-7: #1c7ed6;
    --oc-blue-8: #1971c2;
    --oc-blue-9: #1864ab;

    --oc-gray-0: #f8f9fa;
    --oc-gray-1: #f1f3f5;
    --oc-gray-2: #e9ecef;
    --oc-gray-3: #dee2e6;
    --oc-gray-4: #ced4da;
    --oc-gray-5: #adb5bd;
    --oc-gray-6: #868e96;
    --oc-gray-7: #495057;
    --oc-gray-8: #343a40;
    --oc-gray-9: #212529;

    --primary-color: var(--oc-blue-9);
    --secondary-color: var(--oc-gray-0);
    --accent-color: var(--oc-blue-6);
    --neutral-color: var(--oc-gray-9);
    --background-color: var(--oc-gray-0);

    --form-background-color: var(--oc-gray-1);
    --form-focus-background-color: var(--oc-gray-2);
    --form-border-color: var(--oc-gray-4);
    --form-accent-color: var(--oc-blue-6);
    --button-color: var(--oc-gray-0);
    --button-background-color: var(--oc-blue-9);
    --security-badges-background-color: var(--oc-gray-2);
    --security-badge-description: var(--oc-gray-6);

    --text-shadow: rgba(0, 0, 0, 0.1);

    --header-footer-box-shadow: rgba(0, 0, 0, 0.1);
    --focus-glow: rgba(25, 113, 194, 0.25);
    --shadow-subtle: rgba(0, 0, 0, 0.05);
}

body[data-theme="dark"] {
    --primary-color: var(--oc-gray-9);
    --secondary-color: var(--oc-gray-8);
    --accent-color: var(--oc-blue-2);
    --neutral-color: var(--oc-gray-0);
    --background-color: var(--oc-gray-8);

    --form-background-color: var(--oc-gray-7);
    --form-focus-background-color: var(--oc-gray-8);
    --form-border-color: var(--oc-gray-5);
    --form-accent-color: var(--oc-gray-3);
    --button-color: var(--oc-gray-0);
    --button-background-color: var(--oc-blue-9);
    --text-shadow: rgba(0, 0, 0, 0.3);
    --security-badges-background-color: var(--oc-gray-7);
    --security-badge-description: var(--oc-gray-5);

    --header-footer-box-shadow: rgba(0, 0, 0, 0.2);
    --focus-glow: rgba(0, 0, 0, 0);
    --shadow-subtle: rgba(0, 0, 0, 0.05);
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    direction: ltr;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-size-adjust: 100%;
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    -moz-text-size-adjust: 100%;
}

@media (max-width: 900px) {
    html {
        font-size: 14px;
    }
}

@media (max-width: 600px) {
    html {
        font-size: 12px;
    }
}

body,
header,
nav,
nav > section,
nav h2 a,
nav ul,
nav li,
nav li a,
main,
main > section,
form,
main form > div,
footer,
footer > section {
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
}

body {
    min-height: 100vh;
    background-color: var(--background-color);
    color: var(--neutral-color);
    font-family: "Inter", sans-serif;
    font-weight: 400;
    line-height: 1;
    flex-direction: column;
    justify-content: flex-start;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--neutral-color);
    font-weight: 600;
    text-shadow: 0.0625rem 0.0625rem 0.125rem var(--text-shadow);
}

h1 {
    font-size: 1.5rem;
    margin-bottom: 0;
}

h2 {
    font-size: 1.5rem;
    margin-bottom: 1.25rem;
}

h3 {
    font-size: 1.25rem;
    margin-bottom: 1.17rem;
}

h4 {
    margin-bottom: 1rem;
}

h5 {
    margin-bottom: 0.83rem;
}

h6 {
    margin-bottom: 0.67rem;
}

p {
    margin-bottom: 1rem;
    line-height: 1.5;
}

svg {
    width: 1.25rem;
    height: 1.25rem;
    fill: currentColor;
}

header {
    position: fixed;
    z-index: 1000;
    width: 100%;
    background-color: var(--primary-color);
    margin-bottom: 1rem;
    box-shadow: 0 0.5rem 1rem 0 var(--header-footer-box-shadow);
}

nav,
nav > section {
    width: 100%;
    max-width: var(--max-width);
    height: 2.5rem;
}

@media (max-width: 900px) {
    nav,
    nav > section {
        height: 4rem;
    }
}

@media (max-width: 600px) {
    nav,
    nav > section {
        height: 3.5rem;
    }
}

nav > section > div {
    width: 100%;
}

nav h1 a {
    font-size: 1.25rem !important;
    font-weight: 700 !important;
    letter-spacing: -0.0625rem !important;
    text-transform: none !important;
}

nav h1 a:link,
nav h1 a:visited,
nav li a:link,
nav li a:visited {
    color: var(--button-color);
    text-decoration: none;
    text-transform: uppercase;
    text-shadow: 0.0625rem 0.0625rem 0.125rem var(--text-shadow);
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
    height: 1.75rem;
    padding: 0.5rem 0.75rem;
    list-style-type: none;
}

@media (max-width: 900px) {
    nav h1 a:link,
    nav h1 a:visited,
    nav li a:link,
    nav li a:visited {
        height: 3rem;
    }
}

@media (max-width: 600px) {
    nav h1 a:link,
    nav h1 a:visited,
    nav li a:link,
    nav li a:visited {
        height: 2.5rem;
    }
}

nav h1 a:hover,
nav h1 a:active,
nav li a:hover,
nav li a:active {
    background-color: var(--accent-color);
    color: var(--secondary-color);
    border-radius: 0.25rem;
}

main {
    width: 100%;
    max-width: var(--max-width);
    margin: 4.5rem 0 0 0;
    padding: 0 1rem;
    flex-grow: 1;
    flex-direction: column;
    justify-content: flex-start;
}

main > section {
    width: 100%;
    flex-direction: column;
    justify-content: flex-start;
    margin-bottom: 1.5rem;
}

.left {
    width: 100%;
    max-width: var(--max-width);
    padding: 0 1rem;
    text-align: left;
    align-items: flex-start;
}

.paragraph-left {
    text-align: left;
    max-width: 100%;
}

main form {
    flex-direction: column;
    justify-content: flex-start;
    gap: 1rem;
}

main .data_uploads {
    width: 25rem !important;
}

main form > div {
    width: 100%;
}

main input,
main select,
main textarea {
    background-color: var(--form-background-color);
    color: var(--neutral-color);
    border: 0.0625rem solid var(--form-border-color);
    padding: 0.5rem 0.75rem;
    font-size: 1rem;
    border-radius: 0.375rem;
    width: 100%;
    max-width: 30rem;
    transition:
        border-color 0.3s,
        box-shadow 0.3s;
}

main input:focus,
main select:focus,
main textarea:focus {
    outline: none;
    background-color: var(--form-focus-background-color);
    border-color: var(--form-accent-color);
    box-shadow: 0 0 0 0.1875rem var(--focus-glow);
}

main textarea {
    min-height: 8rem;
    resize: vertical;
}

main select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url('data:image/svg+xml;utf8,<svg fill="%23999" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1rem;
    padding-right: 2.5rem;
    cursor: pointer;
}

main input[type="checkbox"],
main input[type="radio"] {
    accent-color: var(--accent-color);
    width: 1.25rem;
    height: 1.25rem;
}

button {
    background-color: var(--button-background-color);
    color: var(--button-color);
    border: none;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 0.5rem;
    cursor: pointer;
    box-shadow: 0 0.125rem 0.25rem 0 rgba(0, 0, 0, 0.2);
    width: auto;
    max-width: 100%;
}

button:hover {
    background-color: var(--button-background-color);
    color: var(--button-color);
    box-shadow: 0 0.25rem 0.5rem 0 rgba(0, 0, 0, 0.3);
    transform: translateY(-0.125rem);
    transition:
        background-color 0.3s,
        box-shadow 0.3s,
        transform 0.2s;
}

button:disabled {
    background-color: var(--oc-gray-4);
    color: var(--oc-gray-5);
    cursor: not-allowed;
    opacity: 0.6;
}

a:not(nav a, nav h2 a) {
    color: var(--accent-color);
    text-decoration: underline;
    cursor: pointer;
    transition:
        color 0.2s,
        background-color 0.2s;
}

a:not(nav a, nav h2 a):visited {
    color: var(--accent-color);
}

a:not(nav a, nav h2 a):hover,
a:not(nav a, nav h2 a):active {
    color: var(--primary-color);
    text-decoration-thickness: 0.125rem;
}

footer {
    width: 100%;
    height: 1.5rem;
    position: fixed;
    bottom: 0;
    z-index: 1000;
    background-color: var(--primary-color);
    color: var(--button-color);
    color: var(--button-color);
    font-size: 0.625rem;
    box-shadow: 0rem -0.5rem 1rem 0 var(--header-footer-box-shadow);
}

footer > section {
    width: 100%;
    max-width: var(--max-width);
    height: 100%;
    gap: 1rem;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: var(--primary-color);
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 2px 12px var(--shadow-subtle);
    margin-bottom: 2rem;
    font-size: 1rem;
}

th,
td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--neutral-color);
    text-align: center;
    vertical-align: middle;
}

th {
    background: var(--secondary-color);
    color: var(--primary-color);
    font-weight: 700;
    letter-spacing: 0.05em;
    border-bottom: 2px solid var(--accent-color);
    text-shadow: 0 1px 0 var(--secondary-color);
}

tbody tr:nth-child(odd) {
    background: var(--secondary-color);
}

tbody tr:nth-child(even) {
    background: var(--primary-color);
}

tbody tr:hover {
    background: var(--secondary-color);
    transition: background 0.2s;
}

tbody td {
    white-space: nowrap;
}

td {
    color: var(--text-color);
    font-size: 0.98rem;
}

td:first-child {
    font-weight: 600;
    color: var(--accent-color);
}

.dropdown {
    position: relative;
}

.dropdown > a {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    background-color: var(--primary-color);
    border: 0.0625rem solid var(--primary-color);
    border-radius: 0.25rem;
    list-style: none;
    padding: 0.5rem 0 0 0;
    margin: 0;
    box-shadow: 0 0.125rem 0.5rem rgba(0, 0, 0, 0.1);
    z-index: 1000;
    flex-direction: column;
}

.dropdown-menu-left {
    left: 0;
}

.dropdown-menu-right {
    right: 0;
}

#weldsMenu a,
#themeMenu a {
    text-transform: capitalize;
    justify-content: flex-start;
}

.dropdown:hover .dropdown-menu {
    display: flex;
}

.dropdown-menu li {
    margin: 0;
    width: 100%;
    cursor: pointer;
}

.dropdown-menu a {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    color: inherit;
    text-decoration: none;
    transition: background-color 0.2s;
}

.dropdown-menu a:hover {
    background-color: var(--accent-color, rgba(0, 0, 0, 0.05));
    border-radius: 0.25rem;
}

.dropdown-menu a.active {
    background-color: var(--accent-color, rgba(0, 0, 0, 0.08));
    color: var(--secondary-color);
    border-radius: 0.25rem;
    font-weight: bold;
}

.security-badges {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    background-color: var(--security-badges-background-color);
    border-radius: 0.5rem;
    padding: 1.25rem;
    gap: 1.25rem;
    margin: 1rem 0;
}

.security-badges .badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
}

.security-badges img {
    max-width: 100%;
    height: auto;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

.security-badge-text {
    margin: 0;
}

.security-badge-score {
    width: 100%;
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
    color: var(--accent-color);
    margin-bottom: 0.5rem;
}

.security-badge-label {
    width: 100%;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--neutral-color);
    display: inline-block;
    margin-bottom: 0.5rem;
}

.security-badge-description {
    width: 100%;
    font-size: 0.75rem;
    color: var(--security-badge-description);
    display: inline-block;
}

.security-badges a {
    display: inline-block;
    text-decoration: none;
    transition:
        transform 0.2s,
        filter 0.2s;
}

.security-badges a:hover {
    transform: scale(1.05);
    filter: brightness(1.1);
}

.security-badges a:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 0.25rem;
    border-radius: 0.25rem;
}

[role="alert"] {
    margin-bottom: 1rem;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        transition: none !important;
    }
}
