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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #2C3E2D;
    background-color: #F9FBF7;
    -webkit-font-smoothing: antialiased;
}

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

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

/* === Typography === */
h1, h2, h3, h4 {
    line-height: 1.3;
    color: #1B3B1E;
}

h1 {
    font-size: clamp(1.8rem, 5vw, 2.8rem);
    font-weight: 800;
    letter-spacing: -0.02em;
}

h2 {
    font-size: clamp(1.5rem, 4vw, 2.2rem);
    font-weight: 700;
    margin-bottom: 0.5rem;
}

h3 {
    font-size: 1.15rem;
    font-weight: 600;
}

p {
    margin-bottom: 1rem;
    color: #4A5B4B;
}

/* === Header === */
.site-header {
    background: #ffffff;
    border-bottom: 1px solid #E0E8DC;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 4px rgba(0,0,0,0.03);
}

.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: #2E7D32;
    font-weight: 700;
    font-size: 1.2rem;
}

.logo svg {
    flex-shrink: 0;
}

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

.site-nav a {
    text-decoration: none;
    color: #4A5B4B;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.2s;
}

.site-nav a:hover {
    color: #2E7D32;
}

/* === Hero === */
.hero {
    background: linear-gradient(135deg, #E8F5E9 0%, #F1F8E9 100%);
    padding: 3rem 0;
}

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

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

.hero-subtitle {
    font-size: 1.15rem;
    color: #3A5A3C;
    margin: 1rem 0 1.5rem;
    max-width: 500px;
}

.hero-stats {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.stat {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-size: 1.6rem;
    font-weight: 800;
    color: #2E7D32;
}

.stat-label {
    font-size: 0.85rem;
    color: #5A6B5B;
}

.hero-illustration {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* === Calculator Section === */
.calculator-section {
    padding: 3rem 0;
    background: #ffffff;
}

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

.calculator-card {
    background: #F9FBF7;
    border: 1px solid #DCE5D5;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.04);
}

.dose-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.25rem;
    align-items: end;
}

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

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

.input-with-unit {
    display: flex;
    border: 1.5px solid #C5D3BB;
    border-radius: 8px;
    overflow: hidden;
    background: #ffffff;
    transition: border-color 0.2s;
}

.input-with-unit:focus-within {
    border-color: #2E7D32;
    box-shadow: 0 0 0 3px rgba(46,125,50,0.1);
}

.input-with-unit input,
.input-with-unit select {
    border: none;
    padding: 0.65rem 0.75rem;
    font-size: 1rem;
    outline: none;
    background: transparent;
    color: #2C3E2D;
}

.input-with-unit input {
    flex: 1;
    min-width: 0;
}

.input-with-unit select {
    background: #F1F4EC;
    border-left: 1px solid #DCE5D5;
    cursor: pointer;
    font-weight: 500;
}

.unit-label {
    display: flex;
    align-items: center;
    padding: 0 0.75rem;
    background: #F1F4EC;
    border-left: 1px solid #DCE5D5;
    font-size: 0.9rem;
    color: #4A5B4B;
    white-space: nowrap;
}

.form-hint {
    font-size: 0.8rem;
    color: #7A8B7B;
    margin: 0;
}

select {
    border: 1.5px solid #C5D3BB;
    border-radius: 8px;
    padding: 0.65rem 0.75rem;
    font-size: 1rem;
    background: #ffffff;
    color: #2C3E2D;
    outline: none;
    cursor: pointer;
}

select:focus {
    border-color: #2E7D32;
    box-shadow: 0 0 0 3px rgba(46,125,50,0.1);
}

.preset-buttons {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.preset-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #4A5B4B;
}

.preset-btn {
    background: #E8F5E9;
    border: 1px solid #A5D6A7;
    color: #2E7D32;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
}

.preset-btn:hover {
    background: #C8E6C9;
    border-color: #66BB6A;
}

.calculate-btn {
    grid-column: 1 / -1;
    background: #2E7D32;
    color: #ffffff;
    border: none;
    padding: 0.85rem 2rem;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    letter-spacing: 0.01em;
}

.calculate-btn:hover {
    background: #1B5E20;
}

.calculate-btn:active {
    transform: scale(0.98);
}

/* === Result Panel === */
.result-panel {
    margin-top: 2rem;
    padding: 1.5rem;
    background: #E8F5E9;
    border: 1px solid #A5D6A7;
    border-radius: 12px;
    text-align: center;
}

.result-icon {
    margin-bottom: 0.5rem;
}

.result-dose {
    font-size: 2.5rem;
    font-weight: 800;
    color: #1B5E20;
    margin: 0.5rem 0;
}

.result-detail {
    font-size: 1rem;
    color: #3A5A3C;
}

.result-warning {
    margin-top: 1rem;
    padding: 0.75rem;
    background: #FFF3E0;
    border-radius: 8px;
    font-size: 0.9rem;
    color: #E65100;
}

.error-message {
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    background: #FFEBEE;
    border: 1px solid #EF9A9A;
    border-radius: 8px;
    color: #B71C1C;
    font-weight: 500;
}

/* === Guide Section === */
.guide-section {
    padding: 3rem 0;
    background: #F1F4EC;
}

.guide-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.guide-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    border: 1px solid #E0E8DC;
}

.guide-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: #2E7D32;
    color: #ffffff;
    border-radius: 50%;
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
}

.guide-card h3 {
    margin-bottom: 0.5rem;
}

.guide-card p {
    font-size: 0.9rem;
    color: #5A6B5B;
    margin: 0;
}

/* === Tips Section === */
.tips-section {
    padding: 3rem 0;
    background: #ffffff;
}

.tips-list {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    margin-top: 1.5rem;
}

.tip-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    padding: 1rem;
    background: #F9FBF7;
    border-radius: 10px;
    border: 1px solid #E0E8DC;
}

.tip-item svg {
    flex-shrink: 0;
    margin-top: 2px;
}

.tip-item h3 {
    margin-bottom: 0.25rem;
}

.tip-item p {
    font-size: 0.9rem;
    margin: 0;
}

/* === FAQ Section === */
.faq-section {
    padding: 3rem 0;
    background: #F1F4EC;
}

.faq-list {
    margin-top: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.faq-item {
    background: #ffffff;
    border: 1px solid #DCE5D5;
    border-radius: 10px;
    overflow: hidden;
}

.faq-item summary {
    padding: 1rem 1.25rem;
    font-weight: 600;
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #2C3E2D;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::after {
    content: "+";
    font-size: 1.3rem;
    font-weight: 400;
    color: #2E7D32;
    transition: transform 0.2s;
}

.faq-item[open] summary::after {
    content: "−";
}

.faq-item p {
    padding: 0 1.25rem 1rem;
    font-size: 0.9rem;
    color: #5A6B5B;
    margin: 0;
}

/* === Footer === */
.site-footer {
    background: #1B3B1E;
    color: #B0C5B2;
    padding: 2rem 0;
    font-size: 0.9rem;
}

.footer-disclaimer {
    margin-bottom: 1rem;
    color: #8FA890;
    font-size: 0.85rem;
    line-height: 1.5;
}

.footer-nav ul {
    list-style: none;
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.footer-nav a {
    color: #C8E6C9;
    text-decoration: none;
    font-weight: 500;
}

.footer-nav a:hover {
    text-decoration: underline;
}

.footer-copy {
    color: #6B7F6C;
    font-size: 0.8rem;
    margin: 0;
}

/* === Responsive === */
@media (max-width: 768px) {
    .site-header .container {
        flex-wrap: wrap;
        height: auto;
        padding: 0.75rem 1.5rem;
    }

    .site-nav ul {
        gap: 1rem;
        flex-wrap: wrap;
    }

    .hero .container {
        flex-direction: column;
        text-align: center;
    }

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

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

    .hero-illustration {
        order: -1;
    }

    .dose-form {
        grid-template-columns: 1fr;
    }

    .calculator-card {
        padding: 1.25rem;
    }

    .guide-grid {
        grid-template-columns: 1fr;
    }

    .footer-nav ul {
        flex-direction: column;
        gap: 0.5rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }

    h1 {
        font-size: 1.5rem;
    }

    .result-dose {
        font-size: 2rem;
    }

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



/* 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;
}
