body {
    margin: 0;
    font-family: "Space Grotesk", sans-serif;
    color: #000000;
    background: #ffffff;
}

canvas {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    z-index: -1;
}

a {
    color: #000000;
    text-decoration: none;
}

.page {
    max-width: 1100px;
    margin: 0 auto;
    padding: 20px 24px 60px 24px;
}

nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 22px;
    background: #ffffff;
    border: 3px solid #000000;
    border-radius: 14px;
}

.name {
    font-size: 34px;
    font-weight: 700;
    line-height: 1.1;
}

.navLinks {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.navLinks a {
    padding: 5px 11px;
    font-size: 19px;
    font-weight: 500;
    border: 2px solid #000000;
    border-radius: 10px;
    background: #ffffff;
    transition-duration: 0.3s;
}

.navLinks a:hover {
    background: #f2d785;
    border-color: #6e4900;
    color: #6e4900;
}

.navLinks a.current {
    background: #025373;
    border-color: #025373;
    color: #ffffff;
}

h1 {
    display: inline-block;
    margin: 28px 0 22px 0;
    padding: 4px 16px;
    font-size: 40px;
    background: #ffffff;
    border: 3px solid #000000;
    border-radius: 10px;
}

.cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

.card {
    display: block;
    background: #ffffff;
    border: 3px solid #000000;
    border-radius: 14px;
    overflow: hidden;
    transition-duration: 0.3s;
}

.card:hover {
    background: #f2d785;
    border-color: #6e4900;
}

.card img {
    display: block;
    width: 100%;
    height: 190px;
    object-fit: cover;
    border-bottom: 3px solid #000000;
    background: #ffffff;
}

.card img.wholeImage {
    object-fit: contain;
}

.cardText {
    padding: 12px 16px 16px 16px;
}

.tag {
    font-size: 12px;
    font-weight: 600;
    color: #025373;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.cardTitle {
    margin-top: 6px;
    font-size: 20px;
    font-weight: 700;
}

.cardText p {
    margin: 6px 0 0 0;
    font-size: 14px;
    line-height: 1.45;
    color: #333333;
}

.backLink {
    display: inline-block;
    margin-top: 24px;
    padding: 4px 12px;
    background: #ffffff;
    border: 2px solid #000000;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 500;
}

.panel {
    margin-top: 22px;
    padding: 20px 26px;
    background: #ffffff;
    border: 3px solid #000000;
    border-radius: 14px;
}

.panel h1 {
    display: block;
    margin: 8px 0 8px 0;
    padding: 0;
    border: none;
    font-size: 38px;
    line-height: 1.1;
}

.panel h2 {
    margin: 0 0 12px 0;
    font-size: 24px;
}

.panel p {
    margin: 0 0 12px 0;
    font-size: 16px;
    line-height: 1.6;
    color: #222222;
}

.panel p a {
    text-decoration: underline;
}

.panel p a:hover {
    color: #6e4900;
}

.panel > *:last-child {
    margin-bottom: 0;
}

.cards,
.droneGrid {
    margin-top: 22px;
}

.team {
    color: #555555;
}

.buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 16px;
}

.button {
    padding: 10px 18px;
    font-size: 17px;
    font-family: inherit;
    font-weight: 600;
    background: #ffffff;
    border: 3px solid #000000;
    border-radius: 10px;
    cursor: pointer;
    transition-duration: 0.3s;
}

.button.main {
    background: #025373;
    border-color: #025373;
    color: #ffffff;
}

.button:hover {
    background: #f2d785;
    border-color: #6e4900;
    color: #6e4900;
}

figure {
    margin: 6px 0 16px 0;
}

figure img {
    display: block;
    width: auto;
    max-width: 100%;
    margin: 0 auto;
    max-height: 440px;
    object-fit: contain;
    background: #ffffff;
    border: 3px solid #000000;
    border-radius: 12px;
    box-sizing: border-box;
}

figure img.largePlot {
    max-height: 900px;
}

figcaption {
    margin-top: 6px;
    font-size: 14px;
    line-height: 1.4;
    color: #555555;
}

.figureRow {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 16px;
}

.figureRow figure {
    margin: 0;
}

.figureRow img {
    width: 100%;
    height: 300px;
}

.videos {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.videos video {
    max-height: 300px;
    max-width: 100%;
    border: 3px solid #000000;
    border-radius: 12px;
    background: #000000;
}

.hero {
    max-width: 640px;
    margin: 14vh auto 0 auto;
    text-align: center;
}

.hero h1 {
    font-size: 46px;
}

.hero .buttons {
    justify-content: center;
}

.backgroundButtons {
    margin-top: 22px;
}

.backgroundButtons .button {
    padding: 8px 15px;
    font-size: 16px;
}

.headline {
    font-size: 20px;
    font-weight: 700;
}

.contactButtons {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin-top: 12px;
}

.contactButtons .button {
    padding: 8px 6px;
    text-align: center;
}

.photoGrid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.photoPair {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 4px 0 4px 0;
}

.photoPair img {
    height: 300px !important;
}

.photoGrid img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border: 3px solid #000000;
    border-radius: 12px;
    box-sizing: border-box;
}

.aboutTop {
    display: flex;
    flex-wrap: wrap;
    gap: 22px;
    align-items: center;
    padding-right: 16px;
}

.aboutTop img {
    width: 320px;
    max-width: 100%;
    border: 3px solid #000000;
    border-radius: 14px;
}

.aboutTop div {
    flex: 1 1 300px;
}

.photoRow {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin: 6px 0 16px 0;
}

.photoRow img {
    width: 100%;
    height: 240px;
    object-fit: cover;
    border: 3px solid #000000;
    border-radius: 14px;
    box-sizing: border-box;
}

.droneGrid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
}

.droneGrid .panel {
    margin-top: 0;
    padding: 16px 18px;
}

.droneGrid h2 {
    font-size: 20px;
}

.droneGrid video {
    display: block;
    width: 100%;
    border: 3px solid #000000;
    border-radius: 12px;
    background: #000000;
}

@media (max-width: 1000px) {
    .cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 650px) {
    .page {
        padding: 16px 14px 40px 14px;
    }

    h1 {
        font-size: 30px;
    }

    .name {
        font-size: min(30px, 6.4vw);
        white-space: nowrap;
    }

    .aboutTop {
        justify-content: center;
        padding-right: 18px;
    }

    nav {
        padding: 12px 14px;
    }

    .navLinks {
        gap: 5px;
    }

    .navLinks a {
        padding: 4px 6px;
        font-size: 17px;
    }

    .contactButtons,
    .photoGrid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .photoGrid img {
        height: 140px;
    }

    .photoPair img {
        height: 160px !important;
    }

    .cards,
    .figureRow,
    .droneGrid {
        grid-template-columns: minmax(0, 1fr);
    }

    .figureRow img {
        height: auto;
    }

    .photoRow img {
        height: 120px;
    }

    .panel {
        padding: 16px 18px;
    }

    .panel h1 {
        font-size: 28px;
    }

    .videos video {
        max-height: 260px;
    }
}

body.applet {
    padding-bottom: 120px;
}

body.applet canvas {
    position: absolute !important;
}

#mainTitle {
    display: block;
    width: fit-content;
    max-width: 92%;
    margin: 12px auto 8px auto;
    padding: 2px 14px;
    font-size: clamp(24px, 4vw, 44px);
    text-align: center;
}

.page.appletHeader {
    padding-bottom: 0;
}

.top-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-bottom: 10px;
}

.top-buttons .button {
    padding: 5px 11px;
    font-size: 19px;
}

body.applet button {
    padding: 6px 12px;
    font-size: 15px;
    font-family: inherit;
    font-weight: 600;
    background: #ffffff;
    border: 3px solid #000000;
    border-radius: 10px;
    cursor: pointer;
    transition-duration: 0.3s;
}

body.applet button:hover {
    background: #f2d785;
    border-color: #6e4900;
    color: #6e4900;
}

.bottom-controls {
    position: fixed;
    bottom: 0;
    left: 0;
    z-index: 10;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    width: 100%;
    box-sizing: border-box;
    padding: 10px 16px;
    background: #ffffff;
    border-top: 3px solid #000000;
}

.controls-left,
.controls-right {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.filter-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}

.filter-controls label {
    font-size: 15px;
    font-weight: 600;
    white-space: nowrap;
}

body.applet input[type="number"] {
    width: 70px;
    padding: 5px;
    font-size: 15px;
    font-family: inherit;
    text-align: center;
    border: 2px solid #000000;
    border-radius: 8px;
}

.dropdown {
    padding: 5px 10px;
    font-size: 15px;
    font-family: inherit;
    background: #ffffff;
    border: 3px solid #000000;
    border-radius: 10px;
    cursor: pointer;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    min-width: 130px;
    height: 38px;
}

.toggle-switch input {
    appearance: none;
    width: 100%;
    height: 100%;
    margin: 0;
    background: #cccccc;
    border-radius: 20px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.toggle-switch input:checked {
    background: #025373;
}

.toggle-switch .labels {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 15px;
    font-weight: 600;
    color: #ffffff;
    white-space: nowrap;
    pointer-events: none;
}

.toggle-switch .labels::before {
    content: attr(data-off);
}

.toggle-switch input:checked ~ .labels::before {
    content: attr(data-on);
}

@media (max-width: 650px) {
    .bottom-controls {
        padding: 8px 10px;
    }

    body.applet button,
    .dropdown,
    .filter-controls label,
    body.applet input[type="number"],
    .toggle-switch .labels {
        font-size: 15px;
    }

    body.applet button {
        padding: 8px 12px;
    }

    .top-buttons .button {
        padding: 4px 9px;
        font-size: 17px;
    }

    .toggle-switch {
        min-width: 120px;
        height: 38px;
    }
}

@media (max-width: 400px) {
    .navLinks a {
        padding: 4px 5px;
        font-size: 15px;
    }
}

body.forecast canvas {
    position: static !important;
    display: block;
}

#editorChartHolder canvas {
    touch-action: none;
}

.forecastPage {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px 60px 24px;
}

.forecastPage [hidden] {
    display: none !important;
}

.settingsRow {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 12px 18px;
    margin-bottom: 14px;
}

.settingsRow label {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 14px;
    font-weight: 600;
}

.settingsRow input,
.settingsRow select {
    padding: 7px 9px;
    font-family: inherit;
    font-size: 16px;
    background: #ffffff;
    border: 2px solid #477a91;
    border-radius: 6px;
}

.toolRow {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.toolButton {
    padding: 8px 14px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    color: #ffffff;
    background: #025373;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

.toolButton:hover {
    background: #013a52;
}

.toolButton.light {
    color: #025373;
    background: #e1ebf0;
}

.toolButton.light:hover {
    background: #a9cdd4;
}

#summaryLine {
    font-weight: 600;
}

.secondHeading {
    margin-top: 24px !important;
}

.itemRow {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #d5dde2;
}

.itemRow:last-child {
    margin-bottom: 14px;
}

.itemButtons {
    display: flex;
    gap: 6px;
}

.incomeText {
    color: #2e8b40;
    font-weight: 600;
}

.costText {
    color: #c8372d;
    font-weight: 600;
}

.forecastTable {
    width: 100%;
    border-collapse: collapse;
    font-size: 15px;
}

.forecastTable td,
.forecastTable th {
    padding: 7px 8px;
    text-align: left;
    border-bottom: 1px solid #d5dde2;
}

@media (max-width: 650px) {
    .forecastPage {
        padding: 0 14px 40px 14px;
    }

    .itemRow {
        flex-direction: column;
        align-items: flex-start;
    }

    .forecastTable {
        font-size: 13px;
    }
}
