/* ===== RESET & BASE ===== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: #3E2C1C;
    background: #FDF8F2;
    -webkit-font-smoothing: antialiased;
}

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

/* ===== SKIP LINK ===== */
.skip-link {
    position: absolute;
    top: -100%;
    left: 0;
    background: #5C3A21;
    color: #fff;
    padding: 0.5rem 1rem;
    z-index: 1000;
    text-decoration: none;
}

.skip-link:focus {
    top: 0;
}

/* ===== CONTAINER ===== */
.container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.25rem;
}

/* ===== HEADER ===== */
.site-header {
    background: #FFF9F2;
    border-bottom: 1px solid #E8D5B7;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(6px);
    background: rgba(255, 249, 242, 0.92);
}

.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-icon {
    width: 36px;
    height: 36px;
}

.logo-text {
    font-weight: 700;
    font-size: 1.2rem;
    color: #5C3A21;
    letter-spacing: -0.01em;
}

.nav-list {
    display: flex;
    list-style: none;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.nav-list a {
    text-decoration: none;
    color: #6B4F32;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.2s;
    padding: 0.25rem 0;
    border-bottom: 2px solid transparent;
}

.nav-list a:hover,
.nav-list a:focus {
    color: #8B5E3C;
    border-bottom-color: #D4A373;
}

/* ===== HERO ===== */
.hero {
    padding: 3rem 0 2.5rem;
    background: linear-gradient(180deg, #FFF9F2 0%, #FDF8F2 100%);
}

.hero .container {
    display: flex;
    align-items: center;
    gap: 2.5rem;
    flex-wrap: wrap;
}

.hero-content {
    flex: 1 1 320px;
}

.hero-content h1 {
    font-size: clamp(2rem, 5vw, 2.8rem);
    font-weight: 800;
    line-height: 1.15;
    color: #3E2C1C;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.hero-subtitle {
    font-size: 1.15rem;
    color: #6B4F32;
    max-width: 480px;
    margin-bottom: 1.75rem;
}

.hero-visual {
    flex: 0 0 180px;
    display: flex;
    justify-content: center;
}

.hero-illustration {
    width: 180px;
    height: 180px;
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.7rem 1.5rem;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s ease;
    font-family: inherit;
}

.btn-primary {
    background: #C4956A;
    color: #fff;
    border-color: #C4956A;
    box-shadow: 0 2px 8px rgba(196, 149, 106, 0.3);
}

.btn-primary:hover,
.btn-primary:focus {
    background: #B07D52;
    border-color: #B07D52;
    box-shadow: 0 4px 14px rgba(176, 125, 82, 0.4);
    transform: translateY(-1px);
}

.btn-lg {
    padding: 0.85rem 2.2rem;
    font-size: 1.05rem;
    border-radius: 12px;
}

.btn-sm {
    padding: 0.4rem 0.9rem;
    font-size: 0.8rem;
    border-radius: 8px;
}

.btn-outline {
    background: transparent;
    color: #6B4F32;
    border-color: #D4A373;
}

.btn-outline:hover,
.btn-outline:focus {
    background: #F5E6D3;
    border-color: #C4956A;
}

.btn-outline.active {
    background: #D4A373;
    color: #fff;
    border-color: #C4956A;
}

/* ===== SECTIONS ===== */
section {
    padding: 2.5rem 0;
}

.section-intro {
    color: #6B4F32;
    margin-bottom: 1.5rem;
    max-width: 600px;
}

h2 {
    font-size: 1.8rem;
    font-weight: 700;
    color: #3E2C1C;
    margin-bottom: 0.5rem;
    letter-spacing: -0.01em;
}

/* ===== CALCULATOR ===== */
.calculator-section {
    background: #fff;
    border-top: 1px solid #F0E4D4;
    border-bottom: 1px solid #F0E4D4;
}

.calc-card {
    background: #FFF9F2;
    border: 1px solid #E8D5B7;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 6px 24px rgba(139, 94, 60, 0.06);
}

fieldset {
    border: none;
    margin-bottom: 1.5rem;
}

legend {
    font-weight: 700;
    font-size: 1.1rem;
    color: #5C3A21;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #F0E4D4;
    width: 100%;
}

.form-row {
    display: flex;
    gap: 1.25rem;
    flex-wrap: wrap;
    align-items: flex-end;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    flex: 1 1 180px;
    min-width: 150px;
}

.form-group label {
    font-weight: 600;
    font-size: 0.9rem;
    color: #5C3A21;
}

.form-group input[type="number"] {
    padding: 0.65rem 0.85rem;
    border: 2px solid #E0CFB0;
    border-radius: 10px;
    font-size: 1rem;
    background: #fff;
    color: #3E2C1C;
    transition: border-color 0.2s, box-shadow 0.2s;
    font-family: inherit;
    -moz-appearance: textfield;
}

.form-group input[type="number"]::-webkit-outer-spin-button,
.form-group input[type="number"]::-webkit-inner-spin-button {
    opacity: 1;
}

.form-group input:focus {
    outline: none;
    border-color: #C4956A;
    box-shadow: 0 0 0 3px rgba(196, 149, 106, 0.15);
}

.current-hydration-display {
    justify-content: flex-end;
    align-items: center;
    text-align: center;
}

.hydration-badge {
    display: inline-block;
    background: #F5E6D3;
    color: #5C3A21;
    font-weight: 700;
    font-size: 1.2rem;
    padding: 0.4rem 0.9rem;
    border-radius: 20px;
    min-width: 70px;
    text-align: center;
}

.quick-buttons {
    flex: 2 1 350px;
}

.quick-pick-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.target-row {
    align-items: flex-start;
}

/* ===== RESULT AREA ===== */
.result-area {
    margin-top: 2rem;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.result-area.hidden {
    display: none;
}

.result-card {
    background: #fff;
    border: 2px solid #D4A373;
    border-radius: 16px;
    padding: 1.75rem;
    text-align: center;
    animation: fadeSlideIn 0.4s ease;
}

@keyframes fadeSlideIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.result-card h3 {
    font-size: 1.3rem;
    color: #3E2C1C;
    margin-bottom: 1rem;
}

.result-visual {
    display: flex;
    justify-content: center;
    margin-bottom: 1rem;
}

.gauge {
    position: relative;
    width: 160px;
    height: 24px;
    background: #F0E4D4;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #D4A373;
}

.gauge-fill {
    height: 100%;
    background: linear-gradient(90deg, #C4956A, #D4A373);
    border-radius: 12px;
    transition: width 0.5s ease;
    width: 0%;
}

.gauge-label {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-weight: 700;
    font-size: 0.85rem;
    color: #3E2C1C;
}

.result-message {
    font-size: 1.15rem;
    font-weight: 600;
    color: #5C3A21;
    margin-bottom: 0.75rem;
}

.result-details {
    font-size: 0.95rem;
    color: #6B4F32;
}

/* ===== GUIDE GRID ===== */
.guide-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.guide-card {
    background: #fff;
    border: 1px solid #E8D5B7;
    border-radius: 14px;
    padding: 1.5rem;
    transition: box-shadow 0.2s;
}

.guide-card:hover {
    box-shadow: 0 6px 20px rgba(139, 94, 60, 0.08);
}

.guide-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #5C3A21;
    margin-bottom: 0.6rem;
}

.guide-card p {
    color: #5C3A21;
    font-size: 0.95rem;
    line-height: 1.55;
}

/* ===== REFERENCE TABLE ===== */
.reference-section {
    background: #FFF9F2;
}

.table-wrapper {
    overflow-x: auto;
    margin-top: 1rem;
    border-radius: 12px;
    border: 1px solid #E8D5B7;
}

.reference-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
    background: #fff;
}

.reference-table caption {
    caption-side: top;
    text-align: left;
    font-weight: 600;
    color: #5C3A21;
    padding: 0.75rem 1rem;
    background: #FFF9F2;
    border-bottom: 1px solid #E8D5B7;
}

.reference-table th {
    background: #F5E6D3;
    color: #3E2C1C;
    font-weight: 700;
    padding: 0.75rem 1rem;
    text-align: left;
    white-space: nowrap;
}

.reference-table td {
    padding: 0.65rem 1rem;
    border-bottom: 1px solid #F0E4D4;
    color: #5C3A21;
}

.reference-table tbody tr:hover {
    background: #FDF8F2;
}

/* ===== FAQ ===== */
.faq-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1.25rem;
}

.faq-item {
    background: #fff;
    border: 1px solid #E8D5B7;
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
}

.faq-item dt {
    font-weight: 700;
    font-size: 1.05rem;
    color: #3E2C1C;
    margin-bottom: 0.4rem;
}

.faq-item dd {
    color: #5C3A21;
    margin-left: 0;
    font-size: 0.95rem;
    line-height: 1.55;
}

/* ===== FOOTER ===== */
.site-footer {
    background: #3E2C1C;
    color: #F5E6D3;
    padding: 2rem 0;
    margin-top: 2rem;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    text-align: center;
}

.footer-tagline {
    font-weight: 500;
    font-size: 1rem;
}

.footer-nav {
    display: flex;
    list-style: none;
    gap: 1.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.footer-nav a {
    color: #D4A373;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.footer-nav a:hover {
    color: #fff;
}

.footer-copy {
    font-size: 0.8rem;
    color: #A68B6F;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .hero .container {
        flex-direction: column;
        text-align: center;
    }

    .hero-subtitle {
        max-width: 100%;
    }

    .hero-visual {
        order: -1;
    }

    .hero-illustration {
        width: 140px;
        height: 140px;
    }

    .calc-card {
        padding: 1.25rem;
    }

    .form-row {
        flex-direction: column;
        gap: 1rem;
    }

    .form-group {
        flex: 1 1 auto;
        min-width: 100%;
    }

    .nav-list {
        gap: 1rem;
    }

    .site-header .container {
        flex-direction: column;
        align-items: flex-start;
    }

    h2 {
        font-size: 1.5rem;
    }

    .reference-table {
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 1.7rem;
    }

    .quick-pick-group {
        gap: 0.3rem;
    }

    .btn-sm {
        padding: 0.35rem 0.7rem;
        font-size: 0.75rem;
    }

    .gauge {
        width: 130px;
    }
}



/* Factory-injected deployment helpers. The AI owns the site design above this block. */
.ad-unit {
  width: min(100%, 720px);
  min-height: 120px;
  margin: 24px auto;
  display: block;
}

.legal-page {
  width: min(900px, calc(100% - 32px));
  margin: 40px auto;
}

.site-utility-links {
  width: min(900px, calc(100% - 32px));
  margin: 32px auto;
  padding-top: 16px;
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  border-top: 1px solid rgba(127, 127, 127, 0.25);
  font-size: 0.9rem;
}

.site-utility-links a {
  color: inherit;
  opacity: 0.75;
}
