/* ── RESET ── */
*,
*::before,
*::after {
    box-sizing: border-box; 
    margin: 0;
    padding: 0;
}
 
html {
    height: 100%; 
}
 
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: #fff;
    color: #222;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-wrap: break-word;
}

/* ── NAV ── */
.nav {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    padding: .75rem 2rem;
    background: #fff;
    border-bottom: 1px solid #e8f0e4;
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-logo {
    justify-self: start;
}

.nav-logo a {
    display: block;
}

.nav-logo svg {
    display: block;
}

.nav-r {
    justify-self: end;
    display: flex;
    gap: .75rem;
    align-items: center;
}

.btn {
    font-size: 13px;
    padding: .35rem .9rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: background .15s, color .15s;
    text-decoration: none;
    display: inline-block;
}

.btn-outline {
    border: 1px solid #ddd;
    color: #222;
    background: #fff;
}

.btn-outline:hover {
    background: #f5f5f5;
    border-color: #bbb;
}

.btn-filled {
    background: #fff;
    color: #222;
    border: 1px solid #ddd;
}

.btn-filled.active {
    background: #1a2e14;
    color: #fff;
    border-color: #1a2e14;
}

.btn-filled:hover {
    background: #f5f5f5;
    border-color: #bbb;
}

.btn-filled.active:hover {
    background: #2a4520;
    border-color: #2a4520;
}

/* ── FOOTER ── */
.footer {
    padding: 1rem 2rem;
    background: #F2F8EF;
    border-top: 1px solid #e8f0e4;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: .5rem;
    /* body is a flex column at least 100vh tall; an auto top margin soaks up
       any leftover height so the footer always sits at the bottom of the window */
    margin-top: auto;
}

.footer-links {
    display: flex;
    gap: 1.25rem;
}

.footer-links a {
    font-size: 12px;
    color: #7a8f73;
    text-decoration: none;
}

.footer-links a:hover {
    color: #3B6D11;
}

.footer-copy {
    font-size: 12px;
    color: #aaa;
}

/* ── VOICE SEARCH ── */
/* js/voice-search.js disables the mic in browsers without speech support (e.g. Firefox).
   Extra-specific so the pages' own .voice-btn:hover styles can't make it look clickable. */
button[data-voice-search]:disabled,
button[data-voice-search]:disabled:hover {
    opacity: .4;
    cursor: not-allowed;
    background: #fff;
    border-color: #e0e0e0;
    color: #888;
}

/* ── BACK TO TOP ── */
/* Hidden until js/back-to-top.js adds .visible (after scrolling past one screen) */
.back-to-top {
    position: fixed;
    right: 1.5rem;
    bottom: 2.5rem;
    z-index: 90; /* above page content, below the sticky nav (100) */
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid #e8f0e4;
    background: #fff;
    color: #474747;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .12);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity .2s, transform .2s, visibility .2s, background .15s, color .15s;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: #E8001D;
    border-color: #E8001D;
    color: #fff;
}

.back-to-top:focus-visible {
    outline: 2px solid #E8001D;
    outline-offset: 2px;
}

/* Visitors who asked their system for less motion: fade only, no slide */
@media (prefers-reduced-motion: reduce) {
    .back-to-top { 
        transform: none;
        transition: opacity .2s, visibility .2s;
    }
}
 
/* ── AUTH PAGE WRAPPER (login / sign-up) ── */
.page { 
    flex: 1;
    background: #F2F8EF;
    padding: 2.5rem 1.5rem 3rem;
    display: flex;
    align-items: center;
    justify-content: center;    
}

.layout {
    width: 100%; 
    max-width: 1000px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
    align-items: center;
}

/* ── AUTH PAGE: COPY SIDE ── */
.side {
    padding: 1rem .5rem;
}

.side-eyebrow {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #62A946;
    margin-bottom: .55rem;
}

.side-h1 {
    font-size: 2rem;
    font-weight: 500;
    color: #1a2e14;
    line-height: 1.25;
    margin-bottom: .75rem;
}

.side-h1 em {
    font-style: normal;
    color: #62A946;
}

.side-tagline {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 1.25rem;
    background: rgba(255, 255, 255, .7);
    border: 1px solid #c5ddb8;
    border-radius: 20px;
    padding: .3rem .9rem;
    font-size: 12px;
    color: #3B6D11;
    font-weight: 500;
}

.perks {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: .65rem;
    margin-top: 1.25rem;
}

.perk {
    display: flex;
    align-items: flex-start;
    gap: .65rem;
    font-size: 13px;
    color: #3B6D11;
    line-height: 1.5;
}

.perk-icon {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    background: #fff;
    border: 1px solid #c5ddb8;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #62A946;
}

.perk strong {
    color: #1a2e14;
    font-weight: 600;
}

/* ── AUTH PAGE: FORM CARD ── */
.card {
    background: #fff;
    border-radius: 16px;
    border: 1px solid #c5ddb8;
    box-shadow: 0 2px 16px rgba(98, 169, 70, .12);
    padding: 1.75rem 1.75rem 1.5rem;
}

.card-h {
    font-size: 1.4rem;
    font-weight: 500;
    color: #1a2e14;
    margin-bottom: .25rem;
    line-height: 1.3;
}

.card-sub {
    font-size: 13px;
    color: #7a8f73;
    margin-bottom: 1.25rem;
}

form {
    display: flex;
    flex-direction: column;
    gap: .85rem;
}

.field {
    display: flex;
    flex-direction: column;
    gap: .35rem;
}

label {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #62A946;
}

.input-wrap {
    border: 1px solid #c5ddb8;
    border-radius: 10px;
    background: #fff;
    display: flex;
    align-items: center;
    padding: 0 .85rem;
    min-height: 44px;
    transition: background .15s, border-color .15s;
}

.input-wrap:focus-within {
    background: #fafff9;
    border-color: #a8cc8a;
    box-shadow: 0 0 0 3px rgba(98, 169, 70, .10);
}

.input-wrap input {
    flex: 1;
    border: none;
    outline: none;
    /* keep >=16px: iOS Safari auto-zooms the page on focus below that */
    font-size: 16px;
    background: transparent;
    color: #222;
    font-family: inherit;
    padding: .55rem 0;
    min-width: 0;
}

.input-wrap input::placeholder {
    color: #b0b0b0;
}

.pw-toggle {
    background: none;
    border: none;
    cursor: pointer;
    color: #7a8f73;
    padding: 10px;
    margin: -10px -6px -10px 0;
    display: flex;
    align-items: center;
    border-radius: 6px;
    transition: color .15s, background .15s;
    min-width: 44px;
    min-height: 44px;
    justify-content: center;
}

.pw-toggle:hover {
    color: #3B6D11;
    background: #f2f8ef;
}

.submit {
    margin-top: .35rem;
    background: #E8001D;
    color: #fff;
    border: 1px solid #E8001D;
    border-radius: 10px;
    padding: .8rem 1rem;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: .04em;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background .15s, transform .05s;
    font-family: inherit;
}

.submit:hover {
    background: #c70019;
    border-color: #c70019;
}

.submit:active {
    transform: translateY(1px);
}

.submit svg {
    transition: transform .2s;
}

.submit:hover svg {
    transform: translateX(3px);
}

.divider-or {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin: .35rem 0 .15rem;
    font-size: 11px;
    color: #aaa;
}

.divider-or::before,
.divider-or::after {
    content: "";
    flex: 1;
    height: 1px;
    background: #e8f0e4;
}

.auth-line {
    text-align: center;
    font-size: 13px;
    color: #7a8f73;
    margin-top: .15rem;
}

.auth-line a {
    color: #3B6D11;
    font-weight: 600;
    text-decoration: none;
}

.auth-line a:hover {
    text-decoration: underline;
}

/* ── LEGAL DOCUMENT PAGES (terms / privacy) ── */
.doc-layout {
    width: 100%;
    max-width: 860px;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.header {
    text-align: center;
    padding: 0 .5rem;
}

.header-h1 {
    font-size: 2.25rem;
    font-weight: 500;
    color: #1a2e14;
    line-height: 1.2;
}

.doc-layout .card {
    padding: 2.5rem 2.5rem 2rem;
}

.doc-layout .card h2 {
    font-size: 1.15rem;
    font-weight: 600;
    color: #1a2e14;
    letter-spacing: .04em;
    text-transform: uppercase;
    margin-top: 2rem;
    margin-bottom: .85rem;
    padding-bottom: .55rem;
    border-bottom: 1px solid #e8f0e4;
}

.doc-layout .card h2:first-child {
    margin-top: 0;
}

.doc-layout .card h3 {
    font-size: 14px;
    font-weight: 600;
    color: #3B6D11;
    letter-spacing: .03em;
    margin-top: 1.5rem;
    margin-bottom: .65rem;
}

.doc-layout .card p {
    font-size: 14px;
    color: #444;
    line-height: 1.7;
    margin-bottom: 1rem;
}

.doc-layout .card ul {
    list-style: none;
    margin: 0 0 1.15rem 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: .55rem;
}

.doc-layout .card li {
    position: relative;
    padding-left: 1.65rem;
    font-size: 14px;
    color: #444;
    line-height: 1.65;
}

.doc-layout .card li::before {
    content: "";
    position: absolute;
    left: 0;
    top: .55rem;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #62A946;
}

.doc-layout .card li strong {
    color: #1a2e14;
    font-weight: 600;
}

.doc-layout .card a {
    color: #3B6D11;
    text-decoration: none;
    font-weight: 500;
    border-bottom: 1px solid rgba(59, 109, 17, .25);
    transition: border-color .15s, color .15s;
}

.doc-layout .card a:hover {
    color: #62A946;
    border-bottom-color: #62A946;
}

.updated {
    font-size: 12px;
    color: #7a8f73;
    font-style: italic;
    margin-bottom: 1.75rem;
    padding: .65rem .9rem;
    background: #F2F8EF;
    border-radius: 8px;
    border-left: 3px solid #62A946;
}

.notice {
    background: #fdf5e6;
    border: 1px solid #f0d9a8;
    border-radius: 10px;
    padding: 1rem 1.15rem;
    font-size: 13px;
    color: #5a4818;
    line-height: 1.65;
    margin: 1.25rem 0;
    font-weight: 500;
}

.contact-box {
    background: #F2F8EF;
    border: 1px solid #c5ddb8;
    border-radius: 12px;
    padding: 1.25rem 1.4rem;
    margin-top: 1rem;
    font-size: 14px;
    line-height: 1.7;
    color: #1a2e14;
}

.contact-box strong {
    color: #3B6D11;
}

/* ── Responsive (shared nav/footer/auth-page rules) ── */
@media (max-width: 860px) {
    .layout {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        max-width: 460px;
    }

    .side {
        text-align: center;
        padding: 0;
    }

    .side-h1 {
        font-size: 1.65rem;
    }

    .perks {
        max-width: 380px;
        margin-left: auto;
        margin-right: auto;
        text-align: left;
    }
}

@media (max-width: 768px) {
    .nav {
        padding: .65rem 1.25rem;
    }

    .nav-logo svg {
        width: 90px;
    }
}

@media (max-width: 720px) {
    .doc-layout .card {
        padding: 1.75rem 1.4rem 1.5rem;
    }

    .header-h1 {
        font-size: 1.75rem;
    }
}

@media (max-width: 480px) {
    .nav {
        padding: .6rem .85rem;
        gap: .35rem;
    }

    .nav-logo svg {
        width: 76px;
    }

    .btn {
        font-size: 12px;
        padding: .35rem .6rem;
    }

    .nav-r {
        gap: .4rem;
    }

    .footer {
        padding: .85rem 1rem;
        flex-direction: column;
        gap: .35rem;
        text-align: center;
    }

    .footer-links {
        gap: .85rem;
        justify-content: center;
    }

    .footer-links a {
        font-size: 11px;
    }

    .footer-copy {
        font-size: 11px;
    }

    .page {
        padding: 1.5rem .85rem 2rem;
    }

    .card {
        padding: 1.4rem 1.15rem 1.3rem;
        border-radius: 12px;
    }

    .card-h {
        font-size: 1.2rem;
    }

    .input-wrap {
        min-height: 48px;
    }

    .side-h1 {
        font-size: 1.4rem;
    }

    .doc-layout .card h2 {
        font-size: 1rem;
    }

    .doc-layout .card h3 {
        font-size: 13px;
    }

    .doc-layout .card p,
    .doc-layout .card li {
        font-size: 13.5px;
    }

    .header-h1 {
        font-size: 1.5rem;
    }

    .notice {
        font-size: 12px;
        padding: .85rem .95rem;
        line-height: 1.6;
    }

    .contact-box {
        padding: 1rem 1.1rem;
        font-size: 13.5px;
    }
}

@media (max-width: 360px) {
    .nav-logo svg {
        width: 72px;
    }

    .btn {
        font-size: 11px;
        padding: .28rem .55rem;
    }
}
