:root {
    --bg-color: #fcfbf9;
    --text-color: #313d33;
    --primary: #4a7c59;
    --primary-hover: #3d6649;
    --secondary: #d3e2d6;
    --accent: #f4a259;
    --border: #e2e8f0;
    --gray-light: #f7fafc;
    --full-sun: #ffd166;
    --part-sun: #8cb369;
    --shade: #436270;
    --font-sans: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

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

body {
    font-family: var(--font-sans);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    font-size: 16px;
}

h1, h2, h3 {
    color: var(--primary);
    margin-bottom: 1rem;
    line-height: 1.2;
}

p {
    margin-bottom: 1rem;
}

a {
    color: var(--primary);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.site-header {
    background-color: #fff;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 10;
}

.nav-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo-wrap {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--primary);
}

.nav-bar nav a {
    margin-left: 1.5rem;
    font-weight: 500;
    color: var(--text-color);
}

.nav-bar nav a:hover {
    color: var(--primary);
    text-decoration: none;
}

.hero {
    padding: 4rem 1.5rem;
    border-radius: 12px;
    margin-top: 2rem;
    margin-bottom: 2rem;
    background-color: var(--secondary);
    text-align: center;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.hero p {
    max-width: 800px;
    margin: 0 auto 1rem auto;
    font-size: 1.1rem;
}

.ad-container {
    text-align: center;
    margin: 2rem auto;
    min-height: 120px;
}

.tool-section {
    background: #fff;
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    margin-bottom: 3rem;
}

.tool-instructions {
    background: var(--gray-light);
    padding: 1rem;
    border-left: 4px solid var(--primary);
    border-radius: 4px;
    margin-bottom: 2rem;
}

.toolbar {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

button {
    cursor: pointer;
    padding: 0.6rem 1.2rem;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    font-family: inherit;
    transition: background-color 0.2s;
}

.btn-primary, #calculate-zones {
    background-color: var(--primary);
    color: white;
    font-size: 1.1rem;
    padding: 0.75rem 1.5rem;
    width: 100%;
    margin-top: 2rem;
}

.btn-primary:hover, #calculate-zones:hover {
    background-color: var(--primary-hover);
}

.btn-secondary, #add-row, #add-col, #reset-grid {
    background-color: var(--border);
    color: var(--text-color);
}

.btn-secondary:hover, #add-row:hover, #add-col:hover, #reset-grid:hover {
    background-color: #cbd5e1;
}

.plot-wrapper {
    overflow-x: auto;
    padding-bottom: 1rem;
}

.garden-grid {
    display: grid;
    gap: 0.5rem;
    min-width: max-content;
}

.grid-cell {
    background: var(--gray-light);
    border: 2px dashed var(--border);
    border-radius: 8px;
    padding: 0.75rem;
    min-width: 140px;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    transition: all 0.3s ease;
}

.grid-cell.analyzed {
    border-style: solid;
}

.time-toggle {
    background: white;
    border: 1px solid var(--border);
    font-size: 0.85rem;
    padding: 0.25rem;
    width: 100%;
    border-radius: 4px;
    text-align: center;
    cursor: pointer;
    user-select: none;
}

.time-toggle.is-sun {
    background: var(--full-sun);
    border-color: #eab308;
    color: #422006;
}

.time-toggle.is-shade {
    background: var(--shade);
    border-color: #1e3a8a;
    color: white;
}

.zone-label {
    font-weight: bold;
    text-align: center;
    margin-top: 0.5rem;
    font-size: 0.9rem;
}

.results-panel {
    margin-top: 2rem;
    padding: 1.5rem;
    background: var(--gray-light);
    border-radius: 8px;
}

.results-panel.hidden {
    display: none;
}

.legend {
    list-style: none;
    margin-top: 1rem;
}

.legend li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.color-box {
    display: inline-block;
    width: 16px;
    height: 16px;
    border-radius: 4px;
}

.badge-full-sun { background-color: var(--full-sun); }
.badge-part-sun { background-color: var(--part-sun); }
.badge-shade { background-color: var(--shade); }

.education-section {
    margin-bottom: 4rem;
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media(min-width: 768px) {
    .grid-2 {
        grid-template-columns: 1fr 1fr;
    }
}

.default-page {
    padding: 3rem 1.5rem;
    min-height: 60vh;
}

.content-box {
    background: #fff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.site-footer {
    background-color: var(--text-color);
    color: #fff;
    padding: 3rem 1.5rem;
    text-align: center;
}

.footer-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.footer-links a {
    color: #cbd5e1;
    font-size: 0.95rem;
}

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


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

.factory-fallback-nav {
  width: min(900px, calc(100% - 32px));
  margin: 24px auto 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
  font-size: 0.95rem;
}

.factory-fallback-nav a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}
