/* Bread Dough Hydration Fixer — Styles */

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

:root {
    --cream: #FFF8EC;
    --warm-white: #FDF6EC;
    --flour: #F0D9B5;
    --crust: #8B5E3C;
    --crust-dark: #5C3D2E;
    --golden: #D4A373;
    --golden-light: #E8C8A0;
    --text: #3A2C24;
    --text-light: #6B5748;
    --border: #E0D0B8;
    --shadow-sm: 0 2px 8px rgba(92, 61, 46, 0.08);
    --shadow-md: 0 6px 24px rgba(92, 61, 46, 0.12);
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --font-sans: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --transition: 0.2s ease;
}

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

body {
    font-family: var(--font-sans);
    background-color: var(--cream);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow-x: hidden;
}

/* Subtle flour-dust texture overlay */
.flour-bg {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background:
        radial-gradient(ellipse at 20% 20%, rgba(240, 217, 181, 0.25) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 60%, rgba(212, 163, 115, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 40% 80%, rgba(240, 217, 181, 0.2) 0%, transparent 50%);
}

.container {
    width: 100%;
    max-width: 960px;
    margin: 0 auto;
    padding: 0 1.25rem;
    position: relative;
    z-index: 1;
}

/* Header */
.site-header {
    background: var(--warm-white);
    border-bottom: 1px solid var(--border);
    padding: 0.75rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--crust-dark);
    font-weight: 700;
    font-size: 1.15rem;
    letter-spacing: -0.01em;
}

.logo svg {
    flex-shrink: 0;
}

.site-nav {
    display: flex;
    gap: 1.25rem;
}

.site-nav a {
    text-decoration: none;
    color: var(--text-light);
    font-size: 0.9rem;
    font-weight: 500;
    transition: color var(--transition);
}

.site-nav a:hover {
    color: var(--crust);
}

/* Hero */
.hero {
    padding: 3rem 0 2rem;
    text-align: center;
}

.hero h1 {
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    font-weight: 800;
    color: var(--crust-dark);
    letter-spacing: -0.02em;
    line-height: 1.2;
    margin-bottom: 0.75rem;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--text-light);
    max-width: 620px;
    margin: 0 auto;
    line-height: 1.5;
}

/* Calculator Section */
.calculator-section {
    padding: 1.5rem 0 2.5rem;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--crust-dark);
    margin-bottom: 1.25rem;
    text-align: center;
}

.calculator-card {
    background: var(--warm-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    box-shadow: var(--shadow-md);
}

.form-row {
    display: flex;
    gap: 1.25rem;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}

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

.form-group label {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text);
}

.label-hint {
    font-weight: 400;
    font-size: 0.8rem;
    color: var(--text-light);
}

.input-with-suffix {
    display: flex;
    align-items: center;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    background: #fff;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.input-with-suffix:focus-within {
    border-color: var(--golden);
    box-shadow: 0 0 0 3px rgba(212, 163, 115, 0.2);
}

.input-with-suffix input {
    flex: 1;
    border: none;
    outline: none;
    padding: 0.7rem 0.85rem;
    font-size: 1rem;
    font-family: inherit;
    background: transparent;
    color: var(--text);
    min-width: 0;
}

.input-with-suffix input[readonly] {
    background: #F9F4EC;
    color: var(--text-light);
    cursor: default;
}

.suffix {
    padding: 0.7rem 0.85rem 0.7rem 0;
    font-weight: 600;
    color: var(--text-light);
    font-size: 0.95rem;
    user-select: none;
}

/* Adjust options */
.adjust-options fieldset {
    border: none;
    width: 100%;
}

.adjust-options legend {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text);
    margin-bottom: 0.5rem;
}

.radio-group {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text);
    user-select: none;
}

.radio-label input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.radio-custom {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: border-color var(--transition), background var(--transition);
}

.radio-label input[type="radio"]:checked + .radio-custom {
    border-color: var(--golden);
    background: var(--golden);
}

.radio-label input[type="radio"]:checked + .radio-custom::after {
    content: '';
    width: 8px;
    height: 8px;
    background: #fff;
    border-radius: 50%;
}

.radio-label:hover .radio-custom {
    border-color: var(--golden-light);
}

/* Button */
.btn-calculate {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    justify-content: center;
    padding: 0.85rem 1.5rem;
    background: var(--crust);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 1.05rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: background var(--transition), transform var(--transition);
    margin-top: 0.5rem;
}

.btn-calculate:hover {
    background: var(--crust-dark);
    transform: translateY(-1px);
}

.btn-calculate:active {
    transform: translateY(0);
}

.btn-calculate svg {
    flex-shrink: 0;
}

/* Results */
.results-panel {
    margin-top: 1.75rem;
    padding: 1.5rem;
    background: #F9F4EC;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    animation: fadeIn 0.3s ease;
}

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

.results-panel h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--crust-dark);
    margin-bottom: 1rem;
    text-align: center;
}

.result-metrics {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.metric {
    flex: 1;
    min-width: 130px;
    text-align: center;
    background: #fff;
    border-radius: var(--radius-sm);
    padding: 1rem 0.75rem;
    border: 1px solid var(--border);
}

.metric-value {
    display: block;
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--crust);
    line-height: 1.2;
}

.metric-label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-light);
    margin-top: 0.25rem;
    font-weight: 500;
}

.result-note {
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-light);
    margin-top: 1rem;
    font-style: italic;
}

/* Info Section */
.info-section {
    padding: 2.5rem 0;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
}

.info-card {
    background: var(--warm-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: box-shadow var(--transition);
}

.info-card:hover {
    box-shadow: var(--shadow-md);
}

.info-card svg {
    margin-bottom: 0.75rem;
}

.info-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--crust-dark);
    margin-bottom: 0.5rem;
}

.info-card p {
    font-size: 0.9rem;
    color: var(--text-light);
    line-height: 1.5;
}

/* How-to Section */
.how-to-section {
    padding: 2rem 0 3rem;
}

.steps-list {
    list-style: none;
    counter-reset: step;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    max-width: 680px;
    margin: 0 auto;
}

.steps-list li {
    counter-increment: step;
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.steps-list li::before {
    content: counter(step);
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    background: var(--golden);
    color: #fff;
    font-weight: 800;
    font-size: 1rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 0.1rem;
}

.steps-list li strong {
    display: block;
    font-size: 1rem;
    color: var(--crust-dark);
    margin-bottom: 0.15rem;
}

.steps-list li span {
    font-size: 0.9rem;
    color: var(--text-light);
    line-height: 1.5;
}

/* Footer */
.site-footer {
    margin-top: auto;
    background: var(--warm-white);
    border-top: 1px solid var(--border);
    padding: 1.25rem 0;
    text-align: center;
}

.site-footer .container {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: center;
}

.site-footer p {
    font-size: 0.85rem;
    color: var(--text-light);
}

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

.site-footer nav a {
    font-size: 0.85rem;
    color: var(--text-light);
    text-decoration: none;
    transition: color var(--transition);
}

.site-footer nav a:hover {
    color: var(--crust);
}

/* Responsive */
@media (max-width: 640px) {
    .hero {
        padding: 2rem 0 1.5rem;
    }

    .calculator-card {
        padding: 1.25rem;
    }

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

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

    .radio-group {
        flex-direction: column;
        gap: 0.75rem;
    }

    .result-metrics {
        flex-direction: column;
    }

    .metric {
        min-width: 100%;
    }

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

    .steps-list li {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }

    .steps-list li::before {
        margin: 0 auto;
    }

    .site-header .container {
        flex-direction: column;
        gap: 0.5rem;
    }
}

@media (min-width: 641px) and (max-width: 900px) {
    .info-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}



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