:root {
    --primary: #B71418;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body>header, body>main {
    padding-block: 0.5rem;
}

body>main {
    padding-block: 2.5rem;
}

body>footer{
    padding-block: 1rem;
}

html {
    height: 100%;
    height: -webkit-fill-available;
}

body {
    min-height: 100vh;
    min-height: 100dvh;
    min-height: -webkit-fill-available;
    display: flex;
    flex-direction: column;
    background-color: #ffffff;
    color: #272728;
    font-family: system-ui, -apple-system, sans-serif;
    line-height: 1.6;
}

@supports (-webkit-touch-callout: none) {
    html { height: -webkit-fill-available; }
    body { min-height: -webkit-fill-available; }
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
    padding-left: 3rem;
    padding-right: 3rem;
}

header, footer {
    background-color: #B71418;
    color: white;
}

header {
    padding: 1.3rem 0;
    position: relative;
    z-index: 1000;
}

footer {
    padding: 2rem 1.5rem;
    text-align: center;
    font-size: 0.95rem;
    margin-top: auto;
    width: 100%;
    flex-shrink: 0;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.site-title a {
    color: #ffffff;
    text-decoration: none;
    font-size: 1.9rem;
    font-weight: 700;
}
.site-title a:hover { text-decoration: underline; }

nav ul {
    list-style: none;
    display: flex;
    gap: 2.5rem;
    flex-wrap: wrap;
    margin: 0;
    padding: 0;
}
nav a {
    color: #ffffff;
    text-decoration: none;
    font-weight: 500;
}
nav a:hover, nav a.active { text-decoration: underline; }

.hamburger {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.8rem;
    cursor: pointer;
    padding: 0.5rem;
}

main {
    flex: 1;
    padding-top: 7rem;
    padding-left: 3rem;
    padding-right: 3rem;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

.home-h1 {
    text-align: center;
    font-size: 3rem;
    margin: 5rem 0;
    color: #272728;
    line-height: 1.25;
    font-weight: 700;
}
.home-h1 span { display: block; }

h2 {
    color: #272728;
    padding-bottom: 0.5rem;
    margin: 2rem 0 1.5rem 0;
    font-size: 2.1rem;
}
h3 {
    font-size: 1.2rem;
    font-weight: 600;
}

main ul {
    padding-left: 1.5rem;
    margin: 1rem 0;
    list-style-position: inside;
}

.button-group {
    margin: 1.5rem 0 3rem;
    display: flex;
    justify-content: flex-end;
    gap: 1.2rem;
    flex-wrap: wrap;
    box-shadow: none;
}

.button-group a[role="button"] {
    background-color: #272728 !important;
    color: #ffffff !important;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.1rem;
    padding: 0.75rem 1.1rem;
    text-align: center;
    min-width: 180px;
    outline: none !important;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.2s ease;
}

button:focus:focus
 {
    --pico-box-shadow: none;
}

.button-group a[role="button"]:focus-visible {
    outline: 3px solid #B71418;
    outline-offset: 2px;
}

.button-group i { font-size: 1.1em; }

/* ACTIVE BUTTON = GREEN */
.button-group a[role="button"].active {
    background-color: #16a34a !important;
    border-color: #15803d;
    color: white !important;
}

.tool-content.hidden, .subpage.hidden { display: none; }

@media (max-width: 1400px) {
    .container, main { padding-left: 2.5rem; padding-right: 2.5rem; }
}
@media (max-width: 1100px) {
    .container, main { padding-left: 2rem; padding-right: 2rem; }
}

/* MOBILE */
@media (max-width: 768px) {
    .hamburger { display: block; }
    header { padding: 0.7rem 0; }
    .site-title a { font-size: 1.7rem; }

    nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #B71418;
        border-top: 1px solid rgba(255,255,255,0.25);
        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px);
        transition: opacity 0.18s ease, transform 0.18s ease, visibility 0s 0.18s;
        z-index: 999;
    }
    nav.open {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
        transition: opacity 0.18s ease, transform 0.18s ease, visibility 0s 0s;
    }

    nav ul { margin: 0; padding: 0; gap: 0 !important; }
    nav li {
        width: 100%;
        height: 64px;
        border-bottom: 1px solid rgba(255,255,255,0.25);
        display: flex;
        align-items: center;
        justify-content: center;
    }
    nav a {
        width: 100%;
        height: 100%;
        padding: 0 1.5rem;
        display: flex;
        align-items: center;
        justify-content: flex-start;
        color: white;
        text-decoration: none;
        font-weight: 500;
        font-size: 1.1rem;
        margin: 0 !important;
        box-shadow: none !important;
        border-radius: 0 !important;
    }
    nav a.active { text-decoration: underline; background: transparent !important; }

    h2 { font-size: 1.65rem; margin: 1rem 0rem; padding-bottom: 0.4rem; }

    .container, main { padding-left: 1.5rem; padding-right: 1.5rem; }
    main { padding-top: 4rem; }
    .home-h1 { font-size: 2.3rem; line-height: 1.3; margin: 3rem 0; }
    .button-group { justify-content: center; gap: 1rem; }
    .button-group a[role="button"] { flex: 1; min-width: 200px; }
    main ul { padding-left: 1.5rem; }
}