/* CoopCalcs — shared stylesheet
   Palette: barn red, golden yolk, sage green, parchment cream (farmhouse/poultry niche) */
:root {
  --bg: #faf6ec;
  --bg-deep: #f4ecd8;
  --card: #fffdf7;
  --ink: #33291c;
  --ink-soft: #6f6350;
  --line: #e9dfc9;
  --accent: #b23a2a;
  --accent-dark: #8f2d1f;
  --accent-tint: #f7e5e0;
  --gold: #e0a32e;
  --gold-tint: #faeed3;
  --sage: #6f7f4f;
  --sage-dark: #55633c;
  --sage-tint: #eef0e2;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(51, 41, 28, 0.06), 0 10px 28px rgba(51, 41, 28, 0.08);
  --shadow-lift: 0 4px 10px rgba(51, 41, 28, 0.10), 0 18px 40px rgba(51, 41, 28, 0.12);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.65;
  font-size: 16.5px;
}

h1, h2, h3 { font-family: Georgia, "Times New Roman", serif; line-height: 1.25; }

a { color: var(--accent); }

.container { max-width: 960px; margin: 0 auto; padding: 0 20px; }

/* Header */
header {
  background: rgba(255, 253, 247, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 50;
}
.nav {
  max-width: 960px; margin: 0 auto; padding: 12px 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}
.logo {
  font-family: Georgia, serif; font-size: 1.35rem; font-weight: 700;
  color: var(--ink); text-decoration: none; display: flex; align-items: center; gap: 8px;
}
.logo span { color: var(--accent); }
.nav-links { display: flex; gap: 4px; flex-wrap: wrap; }
.nav-links a {
  text-decoration: none; color: var(--ink-soft); font-size: 0.92rem; font-weight: 500;
  padding: 7px 13px; border-radius: 999px; transition: background 0.15s ease, color 0.15s ease;
}
.nav-links a:hover { background: var(--bg-deep); color: var(--accent-dark); }
.nav-links a.active { background: var(--accent); color: #fff; }

/* Hero */
.hero, .tool-hero {
  text-align: center;
  background:
    radial-gradient(ellipse 60% 80% at 50% -20%, var(--gold-tint) 0%, transparent 70%),
    linear-gradient(180deg, var(--bg-deep) 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--line);
}
.hero { padding: 52px 20px 44px; }
.hero .eyebrow, .tool-hero .eyebrow {
  display: inline-block; background: var(--sage-tint); color: var(--sage-dark);
  border: 1px solid #dfe3cc; border-radius: 999px; padding: 4px 14px;
  font-size: 0.82rem; font-weight: 600; letter-spacing: 0.02em; margin-bottom: 16px;
}
.hero h1 { font-size: clamp(1.9rem, 4.5vw, 2.9rem); margin-bottom: 14px; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero p.sub {
  color: var(--ink-soft); font-size: 1.12rem; max-width: 640px; margin: 0 auto;
}
.tool-hero { padding: 44px 20px 36px; }
.tool-hero h1 { font-size: clamp(1.7rem, 4vw, 2.4rem); margin-bottom: 10px; }
.tool-hero p { color: var(--ink-soft); max-width: 640px; margin: 0 auto; }

/* Tool cards grid (homepage) */
.tools-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px; padding: 24px 0 8px;
}
.tool-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; text-decoration: none; color: var(--ink);
  box-shadow: var(--shadow); transition: transform 0.15s ease, box-shadow 0.15s ease;
  display: block; position: relative; overflow: hidden;
}
.tool-card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: var(--gold);
}
.tool-card:nth-child(1)::before { background: var(--accent); }
.tool-card:nth-child(2)::before { background: var(--gold); }
.tool-card:nth-child(3)::before { background: var(--sage); }
.tool-card:nth-child(4)::before { background: #a5713c; }
.tool-card:nth-child(5)::before { background: var(--accent-dark); }
.tool-card:nth-child(6)::before { background: var(--sage-dark); }
.tool-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); }
.tool-card .emoji {
  font-size: 1.6rem; display: inline-flex; align-items: center; justify-content: center;
  width: 52px; height: 52px; border-radius: 14px; background: var(--bg-deep);
  margin-bottom: 12px;
}
.tool-card:nth-child(1) .emoji { background: var(--accent-tint); }
.tool-card:nth-child(2) .emoji { background: var(--gold-tint); }
.tool-card:nth-child(3) .emoji { background: var(--sage-tint); }
.tool-card:nth-child(4) .emoji { background: #f1e4d2; }
.tool-card:nth-child(5) .emoji { background: var(--gold-tint); }
.tool-card:nth-child(6) .emoji { background: var(--sage-tint); }
.tool-card h3 { font-size: 1.15rem; margin-bottom: 6px; }
.tool-card p { color: var(--ink-soft); font-size: 0.93rem; }

/* Calculator card */
.calc {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 28px; margin: 28px 0; position: relative; overflow: hidden;
}
.calc::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 5px;
  background: linear-gradient(90deg, var(--accent) 0%, var(--gold) 55%, var(--sage) 100%);
}
.calc h2 { font-size: 1.3rem; margin-bottom: 4px; }
.calc .calc-sub { color: var(--ink-soft); font-size: 0.93rem; margin-bottom: 20px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 600; font-size: 0.92rem; margin-bottom: 6px; }
.field .hint { font-weight: 400; color: var(--ink-soft); font-size: 0.85rem; }
.field input, .field select {
  width: 100%; padding: 11px 13px; font-size: 1rem; color: var(--ink);
  border: 1.5px solid var(--line); border-radius: 10px; background: #fffefb;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.field input:focus, .field select:focus {
  outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-tint);
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 560px) { .field-row { grid-template-columns: 1fr; } }

.btn {
  display: inline-block; color: #fff; border: none; cursor: pointer;
  background: linear-gradient(180deg, #c24534 0%, var(--accent-dark) 100%);
  font-size: 1.02rem; font-weight: 600; padding: 13px 28px; border-radius: 11px;
  box-shadow: 0 2px 6px rgba(143, 45, 31, 0.35);
  transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.12s ease;
}
.btn:hover { filter: brightness(1.07); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(143, 45, 31, 0.4); }
.btn:active { transform: translateY(0); }

/* Results */
.results { margin-top: 22px; display: none; }
.results.show { display: block; animation: fadeIn 0.3s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.result-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.result-box {
  background: linear-gradient(180deg, #fffdf7 0%, var(--bg) 100%);
  border: 1px solid var(--line); border-top: 3px solid var(--gold);
  border-radius: 12px; padding: 16px; text-align: center;
}
.result-box .num { font-size: 1.55rem; font-weight: 700; color: var(--accent); font-family: Georgia, serif; }
.result-box .lbl { font-size: 0.84rem; color: var(--ink-soft); margin-top: 2px; }
.result-note {
  margin-top: 14px; font-size: 0.92rem; color: #54491f;
  background: var(--gold-tint); border-left: 3px solid var(--gold);
  padding: 11px 14px; border-radius: 0 10px 10px 0;
}

/* Timeline (incubation) */
.timeline { margin-top: 18px; }
.timeline .t-row {
  display: flex; gap: 14px; padding: 10px 4px; border-bottom: 1px dashed var(--line);
  align-items: baseline;
}
.timeline .t-date { min-width: 130px; font-weight: 700; color: var(--sage-dark); font-size: 0.95rem; }
.timeline .t-what { font-size: 0.95rem; }
.timeline .t-what small { color: var(--ink-soft); display: block; }

/* Content sections */
.content { padding: 8px 0 40px; }
.content h2 {
  font-size: 1.5rem; margin: 40px 0 12px; padding-bottom: 8px; position: relative;
}
.content h2::after {
  content: ""; position: absolute; left: 0; bottom: 0; width: 56px; height: 3px;
  border-radius: 2px; background: linear-gradient(90deg, var(--gold), var(--accent));
}
.content h3 { font-size: 1.15rem; margin: 24px 0 8px; }
.content p { margin-bottom: 14px; }
.content ul, .content ol { margin: 0 0 14px 24px; }
.content li { margin-bottom: 6px; }
.content li strong { color: var(--accent-dark); }

table {
  width: 100%; border-collapse: collapse; margin: 16px 0 20px;
  background: var(--card); border-radius: 12px; overflow: hidden;
  box-shadow: var(--shadow); font-size: 0.95rem;
}
th, td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--line); }
th {
  background: var(--sage-tint); color: var(--sage-dark);
  font-weight: 700; font-size: 0.86rem; text-transform: uppercase; letter-spacing: 0.03em;
}
tr:nth-child(even) td { background: #fbf8ef; }
tr:last-child td { border-bottom: none; }
.table-wrap { overflow-x: auto; }

/* FAQ */
details {
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 14px 18px; margin-bottom: 10px; transition: border-color 0.15s ease;
}
details:hover { border-color: var(--gold); }
details summary { font-weight: 600; cursor: pointer; }
details summary::marker { color: var(--gold); }
details p { margin-top: 10px; color: var(--ink-soft); }

/* Footer */
footer {
  background: var(--ink); color: #cfc4b0;
  margin-top: 36px; padding: 32px 20px; text-align: center; font-size: 0.9rem;
}
footer a { color: #e8dfc9; margin: 0 8px; }
footer .disclaimer { color: #a99c85; }

.disclaimer { font-size: 0.83rem; margin-top: 10px; }

@media print {
  header, footer, .btn, .content, .hero p.sub { display: none !important; }
  .calc { box-shadow: none; border: none; }
  .calc::before { display: none; }
  body { background: #fff; }
}
