* {
    transition: opacity var(--ani-time), visibility var(--ani-time);
    font-family: "Orbitron", sans-serif;

    color: var(--text-color);
    fill: var(--text-color);
    margin: 0;
    padding: 0;
}

body {
    min-height: 100vh;
}

.nav-links a,
.sidebar a {
    white-space: nowrap;
}

.nav-links {
    display: contents;
}

nav {
    z-index: 9999;
    border-bottom: 2px solid var(--border-color);
}

nav ul {
    width: 100%;
    list-style: none;

    display: flex;
    align-items: center;
    margin: 0;
    padding: 0;
}

.nav-logo {
    height: 100%;
    width: auto;
    aspect-ratio: 749 / 242;
}

.logo {
    margin-left: 0.5vw !important;
    margin-right: auto;
}

.nav-links {
    margin-left: auto !important;
}

nav li {
    height: var(--nav-height);
}

a, button {
    font-family: "combine-readable";
    height: 100%;
    padding: 0 2vw;
    display: flex;
    align-items: center;
    text-decoration: none;
    position: relative;
    isolation: isolate;
}

button[title="Click to enable"], button:hover[title="Click to enable"] {
    border-color: var(--combine-red);
    color: var(--combine-red);

    background-color: var(--combine-red);

}

button[title="Click to enable"]::before, button:hover[title="Click to enable"]::before {


    background: url("/images/combine-screen-red.gif");
}


u {
    font-family: "Combine";
    text-decoration: none;
}

table, td, th {
    border: 2px solid var(--border-color);
}

table {
  border-collapse: collapse;

  padding-top: 50vh;
}

.qr-wrap {
    position: relative;
    width: 6vw;
    min-width: 12vh;
}

.qr-code {
    display: block;
    width: 100%;
    aspect-ratio: 1;
    image-rendering: pixelated;
}

.spacing {
    border-right: none;
    border-left: none;
    margin-bottom: 5vh;
    
}

textarea {
    resize: vertical;

}


a::before, button::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: url("/images/combine-screen.gif");
    background-repeat: no-repeat;
    background-size: 10%;
    opacity: 0;
    transition: all calc(var(--ani-time) / 2) ease-in-out;
}

a:hover, button:hover {
    transition: all calc(var(--ani-time) / 2) ease-in-out;
    color: var(--heading-color);
    animation: glitch-text 2.5s steps(1) infinite;
}

a::after, button::after {
    content: attr(data-text);
    position: absolute;
    inset: 0;
    padding: inherit;
    display: flex;
    align-items: center;
    font-family: inherit;
    color: var(--highlight-color);
    opacity: 0;
    pointer-events: none;
}


a:hover::after, button:hover::after {
    opacity: 0.8;
    animation: glitch-slice 9s steps(10) infinite;
}

a:hover::before, button:hover::before {
    opacity: 1;
    background-size: 1000%;

    background-position: center;
    animation: glitch-bg 8s steps(1) infinite;
}

nav .logo a:hover {
    animation: none;
}

nav .logo a:hover .nav-logo {
    animation: glitch-svg 1.2s steps(1) infinite;
}

nav .logo a::after {
    content: "";
    background-color: var(--highlight-color);
    -webkit-mask: url("/images/CMB.svg") center / contain no-repeat;
    mask: url("/images/CMB.svg") center / contain no-repeat;
}

@media (prefers-reduced-motion: reduce) {
    a:hover,
    a:hover::before,
    a:hover::after,
    nav .logo a:hover .nav-logo {
        animation: none;
    }
}

a:not(:hover) {
    transition: all calc(var(--ani-time) / 2) ease-in-out;
}


.link-highlighted,
.tabs li.is-active a {
    color: var(--heading-color);
}

.tabs ul {
    list-style: none;
    display: flex;
    align-items: center;
    margin: 0;
    padding: 0;
}

.tabs li {
    height: var(--nav-height);
}

.hamburger {
    margin-left: auto;
}

.sidebar {
    transition: all var(--ani-time) ease-out;
    border: 2px solid var(--border-color);
    position: fixed;
    right: 0;
    width: 50vw;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    flex-direction: column;
    justify-content: flex-start;
}

.sidebar li a {
    padding-left: 1vw;
}

.lower-nav {
    height: var(--lower-nav-height);
    border-top: 2px solid var(--border-color);
    z-index: 998;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    position: fixed;
    bottom: 0;
    list-style: none;

}

.page-id {
    margin-left: 0.5vw;
    font-size: 100%;
}

.cmb-main {
    height: 100%;
    width: auto;
    aspect-ratio: 1;
    margin-left: auto;
}

@media screen and (max-width: 1069px) {
    nav {
        width: 100vw;
        position: fixed;
    }
}








:root {
    --border-color: #20666B;
    --text-color: #1882A1;
    --ani-time: 0.25s;
    --heading-color: #3BC2B7;
    --combine-red: #E53523;
    --background-color: #072734;
    --highlight-color: #3ED2E1; 

    --nav-height: 6vh;
    --lower-nav-height: 6vh;
}

@font-face {
    font-family: 'Combine';
    src: url('/fonts/Combine_Alphabet.otf');
}

@font-face {
    font-family: "BoxedRSB";
    src: url('/fonts/BoxedRoundSemibold.ttf');
}


@font-face {
    font-family: "combine-readable";
    src: url('/fonts/fs-terran.otf');
}

.BoxedRSB {
    font-family: "BoxedRSB";
}

.combine-font {
    font-family: "Combine";
}

.combine-readable {
    font-family: "combine-readable";
}

b {

    font-weight: bold;
    color: #E53523;
}

.combine-red {
    color: #E53523;
}

.highlight {
    color: var(--highlight-color);
}

.mobile-only {
    display: none;
}

.desktop-only {
    display: block;
}

.fabricator-background {
    background: var(--background-color) url("/images/combine-screen.gif");
    background-attachment: fixed;
    background-repeat: no-repeat;
    background-size: cover;
}

.content {
    display: flex;
    flex-direction: column;
    padding-top: 1vh;
    padding-bottom: calc(var(--lower-nav-height) + 1vh);

    font-size: 1em;
    margin-left: 2vw;
    margin-right: 2vw;
}

.dead-center {
    height: 100vh;
    justify-content: center;
    align-items: center;
}

button {
    background-color: transparent;
    transition: all var(--ani-time) ease-out;
    border-radius: 0;
    color: #3CAFB3;
    border: 2px solid #3CAFB3;
}

button:hover {
    background-image: none;
    background-color: #25B6CE60;
    color: #3ED2E1;
    border: 2px solid #3ED2E1;

}

button:not(:hover) {
    transition: background-color var(--ani-time) ease-out;
    background-color: transparent;
}


input[type="file"] {
    font-family: "combine-readable";
    color: #3CAFB3;
    cursor: pointer;
}

input[type="file"]:hover {
    background-color: #25B6CE60;
    color: #3ED2E1;
}

input[type="file"]::file-selector-button {
    font: inherit;
    color: inherit;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    margin-right: 1vw;
}

input[type="text"],
input[type="password"],
input[type="file"],
textarea {
    transition: all var(--ani-time) ease-out;
    background-color: transparent;
    border: 2px solid #3CAFB3;
    padding: 0.5vh 0.5vw;
    margin: 0.5vh 0;
}

.create-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 2vw;
    row-gap: 1vh;
    align-items: start;
}

.create-form > .notification,
.create-form > button {
    grid-column: 1 / -1;
}

.create-form > button {
    justify-content: center;
    padding: 1vh 2vw;
}

.create-form .has-addons {
    display: flex;
    align-items: center;
}

.create-form .is-expanded {
    flex: 1;
}

.create-form input:not([type="hidden"]),
.create-form textarea {
    width: 100%;
    box-sizing: border-box;
}


.create-form :required:user-invalid,
.create-form :required:user-invalid:hover {
    border-color: var(--combine-red);
    color: var(--combine-red);
}

.create-form .field:has(:required:user-invalid) .label {
    color: var(--combine-red);
}

input[type="text"]:hover,
input[type="password"]:hover,
input[type="file"]:hover,
textarea:hover {
    border: 2px solid #3ED2E1;
}

h1 {
    color: var(--heading-color);
}

h2 {
    color: var(--heading-color);
}

h3 {
    color: var(--heading-color);
}

.barcode {
    height: 60%;
    aspect-ratio: 1604 / 590;
    margin-left: 0.5vw;
    object-fit: none;
    object-position: 100vw 0;
    background-color: var(--text-color);
    -webkit-mask: url("/images/barcode.png") center / contain no-repeat;
    mask: url("/images/barcode.png") center / contain no-repeat;
}




/* Landing page */
.landing {
    max-width: 60rem;
    width: 100%;
    margin: 4vh auto;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.landing-kicker {
    font-family: "combine-readable";
    letter-spacing: 0.3em;
    font-size: 0.85em;
}

.landing-title {
    color: var(--heading-color);
    font-size: clamp(1.8rem, 5vw, 3.5rem);
    font-weight: 800;
    letter-spacing: 0.08em;
    line-height: 1.1;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 1rem;
}

.landing-greeting {
    font-size: 1.25em;
    color: var(--highlight-color);
}

.landing-panel,
.landing-feature {
    border: 2px solid var(--border-color);
    border-left: 6px solid var(--heading-color);
    background-color: #07273499;
    padding: 1.5rem;
    line-height: 1.8;
}

.landing-panel p + p {
    margin-top: 1rem;
}

.landing-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
    gap: 1.5rem;
}

.landing-feature h2 {
    color: var(--heading-color);
    font-weight: 700;
    letter-spacing: 0.15em;
    margin-bottom: 0.75rem;
}

.landing-signoff {
    font-style: italic;
    text-align: center;
    line-height: 1.8;
}

.landing-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
}

.auth {
    width: min(92vw, max(36vw, 60vh));
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 2vh;
}

.auth-field {
    display: flex;
    flex-direction: column;
}

.auth-label {
    font-family: "combine-readable";
    color: var(--heading-color);
    letter-spacing: 0.15em;
}

.auth-form input {
    width: 100%;
    box-sizing: border-box;
    padding: 1vh 1vw;
    font-size: 1em;
}

.auth-form input:focus {
    outline: none;
    border-color: var(--highlight-color);
    background-color: #25B6CE30;
}

.auth-form input:user-invalid,
.auth-form input:user-invalid:hover {
    border-color: var(--combine-red);
    color: var(--combine-red);
}

.auth-field:has(input:user-invalid) .auth-label,
.auth-error {
    color: var(--combine-red);
}

.auth-error {
    font-family: "combine-readable";
    letter-spacing: 0.1em;
}

.auth-form button {
    justify-content: center;
    padding: 1.5vh 2vw;
}

.auth-switch {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 1vw;
}

.auth-switch a {
    padding: 1vh 1vw;
}

/* Long URLs in the dashboard: one truncated line by default, wraps downward when expanded */
.long-value {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    max-width: 30vw;
}

.long-value-text {
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.long-value.is-expanded .long-value-text {
    white-space: normal;
    overflow-wrap: anywhere;
}

.long-value-toggle {
    flex-shrink: 0;
    transition: transform var(--ani-time) ease-out;
}

.long-value.is-expanded .long-value-toggle {
    transform: rotate(180deg);
}

@media screen and (max-width: 1069px) {
    .long-value {
        max-width: 60vw;
    }
}
