@font-face {
    font-family: "Input";
    src: url(InputSansCompressed-Bold.ttf) format("truetype");
    font-weight: 400 700;
    font-display: fallback;
}

html {
    overflow-x: hidden;
}

body {
    font-family: "Input", Courier, Monospaced, monospace;
    min-height: 100%;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
    background-color: #f8f9f8;
    color: #1c221f;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a, a:visited {
    color: #1c221f;
    text-decoration: underline;
    text-decoration-color: rgba(46, 158, 100, 0.5);
    text-decoration-thickness: 1.5px;
    text-underline-offset: 3px;
    transition: color 0.15s ease, text-decoration-color 0.15s ease;
}

a:hover {
    color: #155736;
    text-decoration-color: #26995e;
    text-decoration-thickness: 2px;
}

.card {
    border: 1.5px solid #1e2421;
    border-radius: 3px;
    padding: 1em;
    padding-top: 1.3em;
    margin: auto;
    margin-top: 2em;
    width: 50%;
    text-align: center;
    z-index: 1;
    background-color: rgba(255, 255, 255, 0.96);
}

.banner {
    box-sizing: border-box;
    padding: 0.75rem 3rem;
    position: relative;
    z-index: 1;
    margin: 0;
    margin-top: clamp(2rem, 5.5vh, 4rem);
    background-color: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border-bottom: 1.5px solid #1e2421;
    border-top: 1.5px solid #1e2421;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
    width: 100%;
}

.home-banner {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding-top: 0.55rem;
    padding-bottom: 0.55rem;
}

.banner h1 {
    font-size: 34px;
    line-height: 1.18;
    letter-spacing: 0.01em;
    margin: 0.35em 0;
}

.home-banner h1 {
    margin: 0;
}

.profile-pic {
    flex-shrink: 0;
    margin-top: -18px;
    margin-bottom: -18px;
    width: 136px;
    height: 136px;
    border: 2px solid #1e2421;
    border-radius: 3px;
    background-color: #f6f7ef;
    z-index: 10;
    object-fit: cover;
    box-shadow: 5px 5px 0px #1e2421;
    cursor: pointer;
    transition: transform 0.1s ease, box-shadow 0.1s ease;
}

/* tactile click effect */
.profile-pic:active {
    transform: translate(2.5px, 2.5px);
    box-shadow: 2.5px 2.5px 0px #1e2421;
}

/* tape recorder pressed state */
.profile-pic.pressed-in {
    transform: translate(5px, 5px);
    box-shadow: 0px 0px 0px #1e2421;
}

.profile-pic.pressed-in:active {
    transform: translate(5px, 5px);
    box-shadow: 0px 0px 0px #1e2421;
}

@media (max-width: 1024px) {
    .banner {
        padding: 0.6rem 1.25rem;
        margin-top: 1.5rem;
    }

    .home-banner {
        gap: 1rem;
    }

    .profile-pic {
        width: 92px;
        height: 92px;
        margin-top: -12px;
        margin-bottom: -12px;
        box-shadow: 4px 4px 0px #1e2421;
    }

    .profile-pic:active {
        transform: translate(2px, 2px);
        box-shadow: 2px 2px 0px #1e2421;
    }

    .profile-pic.pressed-in,
    .profile-pic.pressed-in:active {
        transform: translate(4px, 4px);
        box-shadow: 0px 0px 0px #1e2421;
    }

    .banner h1 {
        font-size: 27px;
    }

    #com-break {
        display: none;
    }
}

@media (max-width: 520px) {
    .banner h1 {
        font-size: 25px;
    }

    #com-break {
        display: inline;
    }
}

#sws-mini-logo {
    width: 2.15em;
    height: auto;
    flex-shrink: 0;
    margin: 0;
}

.rounded-checkbox {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    margin: 0 0.11em 0 0.04em;
    vertical-align: baseline;
    border: 2px solid #5c6862;
    background-color: transparent;
    appearance: none;
    -webkit-appearance: none;
    outline: none;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.rounded-checkbox:hover {
    border-color: #26995e;
    transform: scale(1.15);
}

.rounded-checkbox:checked {
    appearance: none;
    -webkit-appearance: none;
    background-color: #28a766;
    border-color: #1f824f;
    box-shadow: 0 0 0 2px rgba(40, 167, 102, 0.2);
}

#arp_latch {
    display: none;
    cursor: pointer;
    user-select: none;
    margin-left: 0.08em;
    font-size: 0.95em;
    color: #67736d;
    transition: color 0.15s ease;
}

#arp_latch:hover {
    color: #1c221f;
}

.subcard-container {
    margin-left: 3rem;
    margin-bottom: 2.5rem;
    margin-right: 1.5rem;
    margin-top: 1.75rem;
    z-index: 2;
    width: 45%;

    /* Allow clicks to pass through the invisible boundaries of the container */
    pointer-events: none;
}

@media (max-width: 1024px) {
    .subcard-container {
        width: auto;
        margin-left: 1.25rem;
        margin-right: 1.25rem;
        margin-top: 1.35rem;
    }
}

.subcard {
    box-sizing: border-box;
    border: 1.5px solid #1e2421;
    border-radius: 3px;
    background-color: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    box-shadow: 3px 3px 0px rgba(30, 36, 33, 0.12);
    font-size: 17px;
    line-height: 1.45;
    padding: 0.8em 1.15em;
    transition: padding 0.5s;
    text-align: left;
    margin-top: 0.85em;
    max-width: 450px;

    /* Re-enable interactions (text selection, links) for the cards themselves */
    pointer-events: auto;
}

.subcard:first-child {
    margin-top: 0;
}

.subcard-tagline {
    padding: 0.65em 1.15em;
    color: #2a332f;
    letter-spacing: 0.015em;
}

.subcard-tagline .sep {
    color: #9ba7a1;
    margin: 0 0.3em;
}

.subcard-affiliation {
    display: flex;
    align-items: center;
    gap: 0.85em;
    padding: 0.75em 1.15em;
}

.affiliation-text {
    line-height: 1.35;
}

.role-label {
    color: #4a5650;
    font-size: 0.92em;
}

.org-legal {
    display: inline-block;
    font-size: 0.78em;
    color: #67736d;
}

.subcard-links {
    padding: 1.05em 1.25em 1.15em;
}

ul {
    margin: 0;
    padding-left: 1.2em;
}

ul li {
    margin-bottom: 0.38em;
    line-height: 1.4;
    overflow-wrap: break-word;
}

ul li:last-child {
    margin-bottom: 0;
}

ul li::marker {
    color: #8c9992;
    font-size: 0.85em;
}

.whirly {
    position: fixed;
    border: 1px solid rgba(30, 36, 33, 0.2);
    border-radius: 2px;
    z-index: -1;
    transition: opacity 0.6s ease, filter 0.95s ease-out, border-color 0.95s ease-out;
}

.whirly.tone-active {
    border-color: rgba(30, 36, 33, 0.42);
}

.whirly.playing {
    filter: brightness(1.07) saturate(1.18) drop-shadow(0 0 8px rgba(40, 167, 102, 0.3));
    border-color: rgba(40, 167, 102, 0.6);
    transition: opacity 0.6s ease, filter 0.14s ease-out, border-color 0.16s ease-out;
}

@keyframes rotating {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* FIXME re-enable if/when send message is fixed... */
#send_message_form {
    display: none;
}

#send_message_form > textarea, #send_message_form > input[type='text'] {
    width: 100%;
}

#send_message_form > textarea {
    padding: 0;
}

.datfontdoe {
    font-family: 'Input';
}

#sm_result {
    border-color: white;
}

#sm_result.sm_success, #sm_result.sm_failure {
    margin: 1em;
    border-style: solid;
    border-width: 3px;
    padding: 1em;
}

#sm_result.sm_success {
    border-color: green;
}

#sm_result.sm_failure {
    border-color: red;
    font-weight: bold;
}

#enable_whirl_animation {
    color: #5c6862;
    font-size: 0.88em;
}

h2 {
    font-size: 0.98em;
    letter-spacing: 0.05em;
    color: #2f3b35;
    text-decoration: none;
    border-bottom: 1px solid #dce2df;
    padding-bottom: 0.28em;
    margin: 0 0 0.65em 0;
}

ul + h2 {
    margin-top: 1.35em;
}

.deadlink {
    display: none;
}

.sim-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    image-rendering: pixelated;
    opacity: 0.22;
    filter: contrast(0.85) saturate(0.75);
    pointer-events: none;
    transition: opacity 1.5s ease, filter 1.5s ease, transform 1.5s ease;
    transform: scale(1.0);
}

@keyframes canvasBreathe {
    0% {
        transform: scale(1.0);
        opacity: 0.22;
    }
    100% {
        transform: scale(1.04);
        /* Subtle brightness bump as it expands */
        opacity: 0.36;
    }
}

.sim-background.breathing {
    animation: canvasBreathe 4s ease-in-out infinite alternate;
}
