/* Varo Foundation brand (varofoundation.org): deep green, light green, gold, charcoal. */
:root {
  --deep-green: #003F2C;
  --light-green: #B8DA94;
  --light-gray: #F3F3EF;
  --deep-gold: #CB9C20;
  --light-gold: #F3E0A4;
  --charcoal: #33383A;
  --muted: #5C6366;
  --line: #DCDDD5;
  --tint: #EEF5E6;
  --error-bg: #FBEAEA;
  --error-text: #A12A2A;
  --font-brand: "Be Vietnam Pro", system-ui, sans-serif;
  --font-content: "Inter", system-ui, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --radius: 8px;
  --shadow-sm: 0 1px 2px rgba(0, 63, 44, 0.1);
  --shadow-md: 0 4px 6px rgba(0, 63, 44, 0.1);
  --shadow-lg: 0 10px 24px rgba(0, 63, 44, 0.12);
  color-scheme: light;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: #FFFFFF;
  color: var(--charcoal);
  font: 400 16px/1.6 var(--font-content);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--deep-green); text-underline-offset: 2px; }
h1, h2, h3 { font-family: var(--font-brand); font-weight: 700; line-height: 1.2; color: var(--deep-green); margin: 0 0 0.6em; }
h2 { font-size: clamp(1.5rem, 3vw, 1.9rem); }
h3 { font-size: 1.05rem; }
code, pre { font-family: var(--mono); font-size: 0.86rem; }
[hidden] { display: none !important; }

.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 16px; }
main > section.wrap { margin-top: 3.5rem; }

/* Header, as on varofoundation.org: white, logo left. */
.bar { background: #FFFFFF; box-shadow: var(--shadow-sm); position: sticky; top: 0; z-index: 10; }
.bar-inner { display: flex; align-items: center; justify-content: space-between; min-height: 64px; }
.brand { display: flex; align-items: center; }
.brand img { display: block; height: 34px; width: auto; }
.bar-link { color: var(--deep-green); text-decoration: none; font: 600 0.95rem var(--font-brand); }
.bar-link:hover { text-decoration: underline; }

/* Hero: the site's soft green/gold glow on light gray. */
.hero {
  padding: 3rem 0 4.5rem;
  background:
    radial-gradient(60% 70% at 85% 30%, rgba(184, 218, 148, 0.35), transparent 70%),
    radial-gradient(40% 50% at 5% 100%, rgba(243, 224, 164, 0.4), transparent 70%),
    linear-gradient(180deg, #FBFBF7 0%, var(--light-gray) 100%);
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 0.6rem;
  padding: 0.35rem 0.9rem 0.35rem 0.75rem; margin: 0 0 1.25rem;
  font: 600 0.875rem var(--font-brand); color: var(--deep-green);
  background: rgba(255, 255, 255, 0.75); border: 1px solid rgba(0, 63, 44, 0.12); border-radius: 999px; box-shadow: var(--shadow-sm);
}
.eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #2E9E5B; }
.hero h1 { font-size: clamp(2rem, 4.4vw, 3.2rem); line-height: 1.08; letter-spacing: -0.02em; max-width: 20ch; text-wrap: balance; }
.lede { font-size: 1.15rem; max-width: 60ch; margin: 0; }
.facts { list-style: none; padding: 0; margin: 2rem 0 0; display: grid; gap: 0.75rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.facts li { background: rgba(255, 255, 255, 0.8); border: 1px solid rgba(0, 63, 44, 0.12); border-radius: var(--radius); padding: 0.8rem 1rem; box-shadow: var(--shadow-sm); }
.facts strong { color: var(--deep-green); display: block; font-family: var(--font-brand); }

/* The generator panel overlaps the hero's bottom edge. */
.panel { margin-top: -2.5rem !important; }
#generate { margin-bottom: 1rem; position: relative; background: #FFFFFF; border: 1px solid var(--line); border-radius: 12px; padding: 1.5rem 16px; box-shadow: var(--shadow-lg); }
@media (min-width: 720px) { #generate { padding: 2rem; } }

fieldset { border: 0; padding: 0; margin: 0 0 1.75rem; min-width: 0; }
legend { font: 700 1rem var(--font-brand); color: var(--deep-green); margin-bottom: 0.75rem; display: flex; align-items: center; gap: 0.5rem; }
.step { display: inline-grid; place-items: center; width: 1.6rem; height: 1.6rem; border-radius: 50%; background: var(--deep-green); color: var(--light-green); font-size: 0.85rem; }

.choices { display: grid; gap: 0.6rem; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.scenarios { display: grid; gap: 0.5rem; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.choice, .scenario { display: flex; gap: 0.6rem; align-items: flex-start; border: 1px solid var(--line); border-radius: var(--radius); padding: 0.7rem 0.8rem; cursor: pointer; background: #FFFFFF; transition: border-color 0.15s, background 0.15s; }
.choice:hover, .scenario:hover { border-color: var(--light-green); }
.choice:has(input:checked), .scenario:has(input:checked) { border-color: var(--deep-green); background: var(--tint); box-shadow: inset 0 0 0 1px var(--deep-green); }
.choice input, .scenario input { margin-top: 0.3rem; accent-color: var(--deep-green); }
.choice span, .scenario span { display: block; }
.choice strong, .scenario strong { display: block; font-weight: 600; color: var(--deep-green); }
.choice span span, .scenario span span { color: var(--muted); font-size: 0.9rem; }
.scenario strong { font-family: var(--mono); font-size: 0.88rem; }

.options { display: flex; flex-wrap: wrap; gap: 1rem 1.5rem; }
.options legend { width: 100%; }
.field { display: grid; gap: 0.35rem; font-weight: 500; }
.seed { display: flex; gap: 0.5rem; }
input[type="number"], select { font: inherit; color: var(--charcoal); background: #FFFFFF; border: 1px solid var(--line); border-radius: var(--radius); padding: 0.5rem 0.65rem; min-height: 44px; }
input[type="number"]:focus, select:focus { outline: 2px solid var(--light-green); border-color: var(--deep-green); }
input[type="number"] { width: 8.5rem; }

/* Buttons, as on varofoundation.org: solid deep green, or outlined. */
button, .button {
  display: inline-flex; align-items: center; justify-content: center; text-decoration: none;
  font: 600 0.95rem var(--font-brand); border-radius: var(--radius); padding: 0.6rem 1.1rem; min-height: 44px;
  cursor: pointer; border: 2px solid var(--deep-green); transition: all 0.2s ease;
}
button:disabled { opacity: 0.55; cursor: progress; }
.primary { background: var(--deep-green); color: #FFFFFF; padding: 0.75rem 1.5rem; font-size: 1rem; min-height: 48px; }
.primary:hover:not(:disabled) { background: var(--charcoal); border-color: var(--charcoal); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.ghost { background: transparent; color: var(--deep-green); }
.ghost:hover:not(:disabled), a.ghost:hover { background: var(--deep-green); color: #FFFFFF; }

.status { display: flex; align-items: center; gap: 0.6rem; padding: 0.75rem 0.9rem; border-radius: var(--radius); background: var(--tint); color: var(--deep-green); margin-bottom: 1rem; }
.status.error { background: var(--error-bg); color: var(--error-text); }
.status.error .spinner { display: none; }
.spinner { width: 1rem; height: 1rem; border-radius: 50%; border: 2px solid var(--light-green); border-top-color: var(--deep-green); animation: spin 0.8s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation: none; } button, .button { transition: none; } }

.result { margin-top: 1.5rem; border-top: 1px solid var(--line); padding-top: 1.25rem; }
.result h3 code { font-size: 0.95rem; word-break: break-all; }
.result pre { background: var(--light-gray); border: 1px solid var(--line); border-radius: var(--radius); padding: 0.75rem; overflow-x: auto; white-space: pre-wrap; margin: 0; }
.hint { color: var(--muted); font-size: 0.9rem; margin: 0.9rem 0 0.4rem; }
.command { display: flex; gap: 0.5rem; align-items: stretch; }
.command code { flex: 1; min-width: 0; background: var(--light-gray); border: 1px solid var(--line); border-radius: var(--radius); padding: 0.6rem 0.75rem; overflow-x: auto; white-space: nowrap; }

.sets { display: grid; gap: 0.75rem; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.set { background: #FFFFFF; border: 1px solid var(--line); border-top: 4px solid var(--light-green); border-radius: var(--radius); padding: 1rem; display: flex; flex-direction: column; box-shadow: var(--shadow-sm); }
.set p { color: var(--muted); font-size: 0.92rem; flex: 1; }
.set .button { align-self: flex-start; }
.set code { color: var(--muted); font-size: 0.75rem; margin-bottom: 0.9rem; overflow-wrap: anywhere; }

.two { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.two p { max-width: 62ch; }
.callout { background: var(--light-gray); border-left: 4px solid var(--deep-gold); border-radius: var(--radius); padding: 1.25rem 1.5rem; }

/* Footer, as on varofoundation.org: deep green with the light logo. */
.foot { margin-top: 4rem; background: var(--deep-green); color: rgba(255, 255, 255, 0.85); font-size: 0.9rem; }
.foot-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem; padding-top: 2rem; padding-bottom: 2rem; }
.foot img { display: block; height: 30px; width: auto; }
.foot a { color: var(--light-green); }
.foot-meta { display: flex; gap: 1.25rem; flex-wrap: wrap; }
.two > div:not(.callout) { padding-top: 1.25rem; }

/* Chart of the generated data (chart.js). */
.chart { margin: 1rem 0 0.5rem; }
.chart-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.5rem 1.5rem; margin-bottom: 0.5rem; }
.chart-head h4 { font: 700 1rem var(--font-brand); color: var(--deep-green); margin: 0; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 0.35rem 1rem; color: var(--muted); font-size: 0.85rem; }
.chart-key { display: inline-flex; align-items: center; gap: 0.4rem; }
.key-line { width: 16px; height: 2px; border-radius: 1px; background: var(--c); }
.key-wash { width: 14px; height: 10px; border-radius: 2px; background: var(--c); }
.key-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 2px #FFFFFF; }
.chart-frame { position: relative; width: 100%; min-height: 320px; }
.chart-frame .u-select { background: rgba(0, 63, 44, 0.08); }
.chart-tip { position: absolute; z-index: 5; pointer-events: none; background: #FFFFFF; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-md); padding: 0.5rem 0.65rem; font-size: 0.82rem; min-width: 11rem; }
.tip-time { color: var(--muted); margin-bottom: 0.25rem; font-variant-numeric: tabular-nums; }
.tip-row { display: grid; grid-template-columns: 12px auto 1fr; align-items: center; gap: 0.45rem; white-space: nowrap; }
.tip-row strong { color: var(--charcoal); font-variant-numeric: tabular-nums; }
.tip-row span:last-child { color: var(--muted); }
.tip-key { width: 12px; height: 2px; border-radius: 1px; background: var(--c, var(--muted)); }
.chart-note { margin: 0 0 0.5rem; padding: 0.5rem 0.75rem; border-radius: var(--radius); background: var(--light-gold); color: var(--charcoal); font-size: 0.88rem; }
.chart-details { margin: 0.75rem 0; }
.chart-details summary { cursor: pointer; color: var(--deep-green); font-weight: 600; font-size: 0.92rem; }
.chart-details pre { margin-top: 0.5rem; }
.chart-table { border-collapse: collapse; margin-top: 0.5rem; font-size: 0.85rem; font-variant-numeric: tabular-nums; }
.chart-table th, .chart-table td { padding: 0.25rem 0.9rem 0.25rem 0; text-align: right; border-bottom: 1px solid var(--line); }
.chart-table th:first-child, .chart-table td:first-child { text-align: left; }
.chart-table th { color: var(--muted); font-weight: 600; }
