:root {
    --font-family-base: system-ui;
    --header-background: rgba(48, 54, 61, .85);
    --form-background: #222222;
    --form-input-background: #181818;
    --orange: #f7941c;
    --grey: #aaa;
    --white: #fff;
    --transparent-background: transparent;
}

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

html {
    color-scheme: light dark;
}

body {
    font-family: var(--font-family-base);
    font-size: 1.125rem;
    line-height: 1.5;
    margin: 0;
}

header {
    border-bottom: 1px solid var(--grey);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
    margin: 0 auto;
}
logo {
    width: 170px;
    /* margin-top: 1.2rem; */
}
nav logo {
    display: none;
}
nav ul {
    display: flex;
    list-style: none;
}
nav ul li a {
    color: var(--grey);
    display: block;
    margin: 0 0.4rem;
    font-weight: 600;
    padding: 0.6rem 2rem;
    transition: 0.2s;
    border-radius: 3rem;
    text-decoration: none;
}
nav ul li a:hover {
    background: var(--header-background);
}
.hamburger {
    display: none;
    height: fit-content;
    cursor: pointer;
    padding: .4rem .6rem;
    border-radius: 2rem;
    transition: 0.2s;
}
.hamburger:hover {
    background: var(--header-background);
}
.hamburger div {
    width: 30px;
    height: 2px;
    margin: 6px 0;
    background: var(--grey);
}
@media only screen and (max-width: 1100px) {
    header {
        /* width: 90%; */
        padding: 0 20px;
    }
    nav {
        position: absolute;
        left: -300px;
        top: 0;
        z-index: 999;
        width: 280px;
        height: 100vh;
        background-color: var(--form-background);
        transition: 0.2s;
        box-shadow: 2px 0 20px 0 rgba(0, 0, 0, 0.05);
        border-radius: 0 0 25px 0;
    }
    #nav-check:checked ~ nav {
        left: 0;
    }
    logo {
        margin: 1rem;
    }
    nav logo {
        display: block;
        height: 70px;
        display: flex;
        align-items: center;
        margin-left: 30px;
    }
    nav ul li a {
        margin-bottom: 5px;
        padding: 10px 15px;
        border-radius: 5px;
    }
    nav ul {
        display: block;
        padding: 0 20px;
        margin-top: 30px;
    }
    .hamburger {
        display: block;
    }
}
/* header logo {
    line-height: 1rem;
    margin-top: 1rem;
} */
/* header, */
footer {
    width: min(150ch, 100% - 4rem);
    margin-inline: auto;
}

main {
    width: min(120ch, 100% - 4rem);
    margin-inline: auto;
}

h2,
footer {
    border-top: 1px solid var(--grey);
    margin-top: 2rem;
}
footer p {
    text-align: center;
}

#topBtn {
    display: none;
    position: fixed;
    bottom: 0px;
    right: 0px;
    z-index: 99;
    font-size: 18px;
    border: none;
    outline: none;
    background-color: var(--form-background);
    color: var(--grey);
    cursor: pointer;
    padding: 15px;
    border-radius: 25px 0 0 0;
}
#topBtn:hover {
    background-color: var(--grey);
    color: var(--header-background);
}

img,
svg,
video {
    max-width: 100%;
    display: block;
}

form {
    background: var(--form-background);
    padding: 7px;
    margin: 28px;
    border-radius: 6px;
    border: none;
    text-align: center;
}
form input {
    padding: 7px;
    border-radius: 6px;
    font-size: 16px;
    margin-top: 7px;
    margin-bottom: 14px;
    background: var(--form-input-background);
    width: calc(100% - 28px);
    border: none;
}
form,
form input {
    box-shadow: 0 0 0 1px var(--header-background),0 2px 4px 0 rgb(0 0 0/7%),0 1px 1.5px 0 rgb(0 0 0/5%);
}
[type=submit]:hover {
    box-shadow: 0 0 0 1px var(--grey),0 2px 4px 0 rgb(0 0 0/7%),0 1px 1.5px 0 rgb(0 0 0/5%);
    cursor: pointer;
}

@media (prefers-color-scheme: light) {
    form,
    form input {
        background: var(--transparent-background);
    }
}





/* BOM Warnings Layout */
#bom-output {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-top: 2rem;
  }
  
  /* Each region */
  .bom-region {
    max-height: 460px;
    overflow-y: auto;
    border-left: 4px solid var(--orange);
    padding-left: 1rem;
  }
  
  /* Region Title */
  .bom-region h3 {
    color: var(--orange);
    margin-top: 0;
  }
  
  /* Grid of cards */
  .warning-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
  }
  
  /* Card style */
  .warning-card {
    background: #181818;
    border: 1px solid #333;
    padding: 1rem;
    border-radius: 8px;
    color: var(--grey);
    box-shadow: 0 0 6px rgba(0, 0, 0, 0.2);
  }
  
  .warning-card h4 {
    margin: 0 0 0.5rem;
    font-size: 1rem;
    color: var(--orange);
  }
  
  .warning-card a {
    color: var(--orange);
    text-decoration: underline;
    font-size: 0.95rem;
  }
  
  .warning-card small {
    display: block;
    margin-top: 0.5rem;
    color: #aaa;
    font-size: 0.8rem;
  }

  /* Severity-specific background styles */
.warning-card.sev-flood {
    border-left: 4px solid #00bfff;
    background-color: rgba(0, 191, 255, 0.1);
  }
  
  .warning-card.sev-fire {
    border-left: 4px solid #ff4500;
    background-color: rgba(255, 69, 0, 0.1);
  }
  
  .warning-card.sev-wind {
    border-left: 4px solid #8a2be2;
    background-color: rgba(138, 43, 226, 0.1);
  }
  
  .warning-card.sev-storm {
    border-left: 4px solid #ffa500;
    background-color: rgba(255, 165, 0, 0.1);
  }
  
  .warning-card.sev-severe {
    border-left: 4px solid #ff0000;
    background-color: rgba(255, 0, 0, 0.1);
  }


  .legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    align-items: center;
    margin: 0.5rem 0 1.5rem;
    font-size: 0.95rem;
  }
  
  .legend-box {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-left: 4px solid transparent;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    font-weight: 500;
  }
  
  /* Reuse severity styles for background and border */
  .legend-box.sev-flood {
    border-left-color: #00bfff;
    background-color: rgba(0, 191, 255, 0.1);
  }
  .legend-box.sev-fire {
    border-left-color: #ff4500;
    background-color: rgba(255, 69, 0, 0.1);
  }
  .legend-box.sev-wind {
    border-left-color: #8a2be2;
    background-color: rgba(138, 43, 226, 0.1);
  }
  .legend-box.sev-storm {
    border-left-color: #ffa500;
    background-color: rgba(255, 165, 0, 0.1);
  }
  .legend-box.sev-severe {
    border-left-color: #ff0000;
    background-color: rgba(255, 0, 0, 0.1);
  }