/* Goat Farm — site styles. Light theme only, no build step, no third-party
   requests. Colours and type are the app's own (lib/app/theme/tokens.dart,
   the "Saaf" look): white, one green, thin grey lines, no shadows. Red and
   green on a number only ever mean money out and money in. */

@font-face { font-family: "Bricolage Grotesque"; font-weight: 600; font-display: swap; src: url("../fonts/Bricolage-600.woff2") format("woff2"); }
@font-face { font-family: "Bricolage Grotesque"; font-weight: 700; font-display: swap; src: url("../fonts/Bricolage-700.woff2") format("woff2"); }
@font-face { font-family: "Bricolage Grotesque"; font-weight: 800; font-display: swap; src: url("../fonts/Bricolage-800.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 400; font-display: swap; src: url("../fonts/Inter-400.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 500; font-display: swap; src: url("../fonts/Inter-500.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 600; font-display: swap; src: url("../fonts/Inter-600.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 700; font-display: swap; src: url("../fonts/Inter-700.woff2") format("woff2"); }

:root {
  color-scheme: only light;
  --paper: #FFFFFF;
  --field: #F6F7F4;
  --green: #17633A;
  --green-press: #0F4A2B;
  --green-deep: #06401D;
  --green-soft: #E4F1E8;
  --ochre: #E09332;
  --cream: #FAE9C8;
  --ink: #14201A;
  --ink-2: #55635B;
  --line: #DDE3DC;
  --in: #15803D;
  --in-soft: #E3F3E8;
  --out: #C2362B;
  --out-soft: #FBE9E7;
  --warn: #B45309;
  --warn-soft: #FDF0DC;

  --display: "Bricolage Grotesque", "Inter", system-ui, sans-serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --wrap: 1140px;
  --gutter: clamp(20px, 4vw, 40px);
  --section: clamp(64px, 9vw, 120px);
  --r-card: 16px;
  --r-btn: 14px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--green); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
a:hover { color: var(--green-press); }
:focus-visible { outline: 3px solid var(--ochre); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { font-family: var(--display); color: var(--ink); margin: 0; text-wrap: balance; }
h1 { font-weight: 800; font-size: clamp(2.75rem, 6.4vw, 4.75rem); line-height: 1; letter-spacing: -0.025em; }
h2 { font-weight: 700; font-size: clamp(1.9rem, 3.8vw, 2.9rem); line-height: 1.08; letter-spacing: -0.02em; }
h3 { font-weight: 700; font-size: 1.25rem; line-height: 1.25; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }
.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, 0.94); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid transparent; }
.site-header.scrolled { border-bottom-color: var(--line); }
.nav { display: flex; align-items: center; gap: 24px; min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font: 800 1.2rem/1 var(--display); letter-spacing: -0.01em; color: var(--ink); text-decoration: none; }
.brand img { width: 36px; height: 36px; border-radius: 9px; }
.nav-links { display: flex; align-items: center; gap: 4px; margin: 0 0 0 auto; padding: 0; list-style: none; }
.nav-links a { display: block; padding: 10px 14px; border-radius: 10px; color: var(--ink); font-weight: 500; font-size: 0.98rem; text-decoration: none; }
.nav-links a:hover, .nav-links a[aria-current="page"] { background: var(--green-soft); color: var(--green-press); }
.nav-links a.btn { display: inline-flex; padding: 0 18px; margin-left: 8px; color: #fff; font-weight: 600; border-radius: var(--r-btn); }
.nav-links a.btn:hover { background: var(--green-press); color: #fff; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px; border-radius: var(--r-btn); border: 1.5px solid var(--green); background: var(--green); color: #fff; font: 600 1rem/1 var(--body); text-decoration: none; cursor: pointer; }
.btn:hover { background: var(--green-press); border-color: var(--green-press); color: #fff; }
.btn.quiet { background: var(--paper); color: var(--green); border-color: var(--line); }
.btn.quiet:hover { background: var(--green-soft); color: var(--green-press); border-color: var(--green-soft); }
.btn.small { min-height: 42px; padding: 0 16px; font-size: 0.95rem; }
.menu-toggle { display: none; margin-left: auto; width: 46px; height: 46px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); cursor: pointer; }
.menu-toggle span { display: block; width: 20px; height: 2px; margin: 4px auto; background: var(--ink); border-radius: 2px; }

@media (max-width: 860px) {
  .menu-toggle { display: block; }
  .nav-links { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch; gap: 0; margin: 0; padding: 8px var(--gutter) 20px; background: var(--paper); border-bottom: 1px solid var(--line); }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 14px 8px; font-size: 1.05rem; border-bottom: 1px solid var(--line); border-radius: 0; }
  .nav-links li:last-child a { border-bottom: 0; }
  .nav-links a.btn { display: flex; margin: 14px 0 0; min-height: 50px; border-bottom: 1.5px solid var(--green); }
}

/* ---------- Hero ---------- */
.hero { padding-top: clamp(28px, 5vw, 64px); overflow: hidden; }
.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr); gap: clamp(24px, 5vw, 72px); align-items: center; }
.lede { font-size: clamp(1.1rem, 1.5vw, 1.25rem); line-height: 1.55; color: var(--ink-2); max-width: 33em; }
.hero h1 + .lede { margin-top: 22px; }
.get { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px; margin-top: 26px; }
.play-badge { display: inline-block; line-height: 0; border-radius: 10px; }
.play-badge img { height: 58px; width: auto; }
.get-note { margin: 0; font-size: 0.95rem; color: var(--ink-2); max-width: 17em; line-height: 1.4; }
.facts { display: flex; flex-wrap: wrap; gap: 10px 22px; margin: 30px 0 0; padding: 0; list-style: none; font-weight: 500; font-size: 0.98rem; }
.facts li { display: inline-flex; align-items: center; gap: 8px; }
.facts img { width: 30px; height: 30px; }

.phones { position: relative; display: flex; justify-content: center; padding: 6px 0 0; }
.phone { margin: 0; width: min(100%, 290px); border: 9px solid var(--ink); border-radius: 42px; background: var(--ink); overflow: hidden; line-height: 0; }
.phone img { width: 100%; border-radius: 33px; background: var(--field); }
.phones .phone.back { position: absolute; right: 0; top: 46px; width: min(62%, 236px); border-width: 8px; border-radius: 36px; }
.phones .phone.back img { border-radius: 28px; }
.phones.pair { justify-content: flex-start; padding-right: 22%; }
.phones.pair .phone.front { position: relative; z-index: 1; }
.pasture { margin-top: clamp(-56px, -4vw, -16px); pointer-events: none; }
.pasture img { width: 100%; max-width: 1180px; margin-inline: auto; mix-blend-mode: multiply; }

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .phones { margin-top: 12px; }
  .phones.pair { padding-right: 20%; max-width: 420px; margin-inline: auto; }
  .pasture { margin-top: -10px; }
}

/* ---------- Sections ---------- */
.section { padding-block: var(--section); }
.section.field { background: var(--field); }
.section-head { max-width: 46rem; margin-bottom: clamp(28px, 4vw, 48px); }
.section-head p { margin: 16px 0 0; font-size: 1.15rem; color: var(--ink-2); line-height: 1.55; }

/* A feature row: text on one side, a phone on the other. */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.78fr); gap: clamp(28px, 6vw, 88px); align-items: center; }
.split.flip > .split-media { order: -1; }
@media (min-width: 861px) { .split:has(.split-media.two) { grid-template-columns: minmax(0, 0.92fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 64px); } }
.split h2 + .lede { margin-top: 18px; }
.split-media { display: flex; justify-content: center; align-items: flex-start; gap: 18px; }
.split-media .phone { width: min(100%, 270px); }
.split-media.two .phone { width: min(48%, 256px); border-width: 8px; border-radius: 36px; }
.split-media.two .phone img { border-radius: 28px; }
.split-media.two .phone:nth-child(2) { margin-top: 44px; }
@media (max-width: 860px) {
  .split { grid-template-columns: 1fr; }
  .split.flip > .split-media { order: 0; }
}

/* Icon rows, like the app's own list rows: picture, words, a thin line. */
.rows { margin: 28px 0 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.rows li { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 16px; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--line); }
.rows .pill { width: 52px; height: 52px; border-radius: 50%; background: var(--green-soft); display: grid; place-items: center; }
.rows .pill img { width: 34px; height: 34px; }
.rows strong { display: block; font-weight: 600; }
.rows span { display: block; color: var(--ink-2); font-size: 0.98rem; line-height: 1.5; }
.section.field .rows .pill { background: var(--paper); border: 1px solid var(--line); }

/* ---------- The khata (worked example) ---------- */
.khata { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(20px, 3vw, 36px); align-items: start; }
.khata-panel { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-card); padding: clamp(18px, 2.4vw, 28px); }
.khata-panel h3 { margin-bottom: 4px; }
.khata-panel > p { color: var(--ink-2); font-size: 0.98rem; margin-bottom: 14px; }
.entries { margin: 0; padding: 0; list-style: none; }
.entry { width: 100%; display: grid; grid-template-columns: 26px 44px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 14px 0; border: 0; border-top: 1px solid var(--line); background: none; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.entry:disabled { cursor: not-allowed; opacity: 0.45; }
.entry .tick { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; background: var(--paper); }
.entry .tick::after { content: ""; width: 11px; height: 6px; border-left: 2.5px solid #fff; border-bottom: 2.5px solid #fff; transform: rotate(-45deg) translate(1px, -1px); opacity: 0; }
.entry[aria-pressed="true"] .tick { background: var(--green); border-color: var(--green); }
.entry[aria-pressed="true"] .tick::after { opacity: 1; }
.entry img { width: 44px; height: 44px; }
.entry b { display: block; font-weight: 600; line-height: 1.3; }
.entry small { display: block; color: var(--ink-2); font-size: 0.9rem; line-height: 1.35; margin-top: 2px; }
.entry .amt { font: 700 1.15rem/1 var(--display); white-space: nowrap; }
.entry[aria-pressed="false"] b, .entry[aria-pressed="false"] .amt { color: var(--ink-2); }
.amt.in, .val.in { color: var(--in); }
.amt.out, .val.out { color: var(--out); }
.totals { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 18px; }
.total { border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; }
.total span { display: block; color: var(--ink-2); font-size: 0.92rem; }
.total output { display: block; font: 800 clamp(1.6rem, 3.2vw, 2.2rem)/1.15 var(--display); letter-spacing: -0.02em; }
.partners { width: 100%; border-collapse: collapse; font-size: 0.98rem; }
.partners caption { text-align: left; font-weight: 600; padding-bottom: 6px; }
.partners th, .partners td { padding: 11px 8px 11px 0; border-top: 1px solid var(--line); text-align: right; vertical-align: baseline; }
.partners th:first-child, .partners td:first-child { text-align: left; }
.partners thead th { color: var(--ink-2); font-weight: 500; font-size: 0.86rem; line-height: 1.25; border-top: 0; vertical-align: bottom; }
.partners tbody th { font-weight: 600; }
.partners tbody th small { display: block; font-weight: 400; color: var(--ink-2); font-size: 0.86rem; }
.partners td { font-weight: 600; }
.khata-say { margin: 16px 0 0; padding: 12px 14px; background: var(--green-soft); border-radius: 12px; font-size: 0.98rem; line-height: 1.45; min-height: 3.4em; }
.khata-note { margin-top: 18px; color: var(--ink-2); font-size: 0.92rem; }
@media (max-width: 860px) { .khata { grid-template-columns: 1fr; } }
@media (max-width: 420px) {
  .entry { grid-template-columns: 26px minmax(0, 1fr) auto; }
  .entry img { display: none; }
  .partners { font-size: 0.9rem; }
}

/* ---------- Roles table ---------- */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.roles { width: 100%; min-width: 560px; border-collapse: collapse; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-card); overflow: hidden; border-spacing: 0; }
.roles th, .roles td { padding: 14px 16px; border-bottom: 1px solid var(--line); text-align: center; }
.roles tr:last-child th, .roles tr:last-child td { border-bottom: 0; }
.roles thead th { font: 700 1rem/1.2 var(--display); background: var(--field); }
.roles tbody th { text-align: left; font-weight: 500; }
.roles .yes { color: var(--in); font-weight: 700; }
.roles .no { color: var(--ink-2); }
.roles .some { color: var(--ink-2); font-size: 0.9rem; line-height: 1.3; }

/* ---------- Free / demo band ---------- */
.band { background: var(--green-deep); color: var(--cream); border-radius: 28px; padding: clamp(28px, 5vw, 64px); display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 32px; align-items: center; }
.band h2 { color: #fff; }
.band p { color: var(--cream); margin: 14px 0 0; font-size: 1.12rem; max-width: 34em; }
.band .play-badge img { height: 62px; }
.band-side { display: grid; justify-items: center; gap: 12px; text-align: center; }
.band-side img.icon { width: 96px; height: 96px; border-radius: 22px; border: 1px solid rgba(250, 233, 200, 0.25); }
.band-side small { color: var(--cream); opacity: 0.85; font-size: 0.9rem; }
@media (max-width: 760px) { .band { grid-template-columns: 1fr; } .band-side { justify-items: start; text-align: left; } }

/* ---------- FAQ ---------- */
.faq { max-width: 50rem; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 20px; align-items: center; padding: 20px 0; font: 600 1.12rem/1.35 var(--body); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; flex: none; width: 11px; height: 11px; border-right: 2.5px solid var(--green); border-bottom: 2.5px solid var(--green); transform: rotate(45deg) translate(-3px, -3px); transition: transform 0.18s ease; }
.faq details[open] summary::after { transform: rotate(-135deg) translate(-3px, -3px); }
.faq details > div { padding: 0 0 22px; color: var(--ink-2); max-width: 44rem; }
.faq details > div > :last-child { margin-bottom: 0; }

/* ---------- Footer ---------- */
.site-footer { background: var(--green-deep); color: var(--cream); padding: clamp(44px, 6vw, 72px) 0 28px; margin-top: var(--section); }
.section + .site-footer, .section.field + .site-footer { margin-top: 0; }
.site-footer a { color: var(--cream); text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-grid { display: grid; grid-template-columns: 1.5fr repeat(3, 1fr); gap: 32px; }
.footer-about .brand { color: #fff; }
.footer-about p { margin: 14px 0 0; max-width: 26em; opacity: 0.9; font-size: 0.98rem; }
.site-footer h2 { font: 700 1rem/1.2 var(--display); color: #fff; letter-spacing: 0; margin-bottom: 12px; }
.site-footer ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 9px; font-size: 0.98rem; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; margin-top: 40px; padding-top: 20px; border-top: 1px solid rgba(250, 233, 200, 0.22); font-size: 0.88rem; opacity: 0.85; }
.footer-bottom p { margin: 0; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-about { grid-column: 1 / -1; } }

/* ---------- Inner pages (support, legal) ---------- */
.page-head { padding-block: clamp(28px, 5vw, 56px) clamp(24px, 4vw, 40px); }
.page-head h1 { font-size: clamp(2.3rem, 5vw, 3.5rem); line-height: 1.04; }
.page-head p { color: var(--ink-2); font-size: 1.15rem; max-width: 44rem; margin: 16px 0 0; }
.page-head .meta { font-size: 0.95rem; margin-top: 12px; }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 18px; padding: 0; list-style: none; font-size: 0.92rem; color: var(--ink-2); }
.crumbs li + li::before { content: "/"; margin-right: 6px; color: var(--line); }
.crumbs a { color: var(--ink-2); }
.doc-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); align-items: start; padding-bottom: var(--section); }
.toc { position: sticky; top: 92px; font-size: 0.95rem; border-left: 2px solid var(--line); padding-left: 16px; }
.toc strong { display: block; margin-bottom: 8px; font-family: var(--display); }
.toc ol { margin: 0; padding: 0; list-style: none; display: grid; gap: 7px; }
.toc a { color: var(--ink-2); text-decoration: none; }
.toc a:hover { color: var(--green); text-decoration: underline; }
@media (max-width: 860px) { .doc-layout { grid-template-columns: 1fr; } .toc { position: static; } .toc ol { grid-template-columns: 1fr 1fr; } }
.prose { max-width: 46rem; }
.prose h2 { font-size: 1.55rem; line-height: 1.2; letter-spacing: -0.01em; margin: 2.2em 0 0.6em; scroll-margin-top: 92px; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 1.12rem; margin: 1.6em 0 0.4em; }
.prose ul, .prose ol { padding-left: 1.25em; margin: 0 0 1em; }
.prose li { margin: 0.35em 0; }
.prose table { width: 100%; border-collapse: collapse; font-size: 0.97rem; margin: 0 0 1em; }
.prose th, .prose td { text-align: left; vertical-align: top; padding: 11px 14px 11px 0; border-bottom: 1px solid var(--line); }
.prose thead th { font-weight: 600; color: var(--ink-2); font-size: 0.9rem; }
.prose tbody th { font-weight: 600; white-space: nowrap; }
.prose .table-scroll table { min-width: 560px; }
.summary-box { background: var(--green-soft); border-radius: var(--r-card); padding: clamp(18px, 3vw, 28px); margin-bottom: 2em; }
.summary-box h2 { margin-top: 0; font-size: 1.3rem; }
.summary-box ul { margin-bottom: 0; }
.note { background: var(--warn-soft); color: #5B3A06; border-radius: 12px; padding: 14px 16px; font-size: 0.98rem; }
.note a { color: inherit; font-weight: 600; }

/* Numbered steps: only where the order matters (how to delete, how to join). */
.steps { counter-reset: step; margin: 0 0 1em; padding: 0; list-style: none; }
.steps li { counter-increment: step; position: relative; padding: 12px 0 12px 50px; border-bottom: 1px solid var(--line); margin: 0; }
.steps li:first-child { border-top: 1px solid var(--line); }
.steps li::before { content: counter(step); position: absolute; left: 0; top: 10px; width: 34px; height: 34px; border-radius: 50%; background: var(--green); color: #fff; display: grid; place-items: center; font: 700 1rem/1 var(--display); }

.cards-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 8px; }
@media (max-width: 760px) { .cards-2 { grid-template-columns: 1fr; } }
.card { border: 1px solid var(--line); border-radius: var(--r-card); padding: clamp(18px, 3vw, 28px); background: var(--paper); }
.card h2 { font-size: 1.4rem; margin: 0 0 10px; display: flex; align-items: center; gap: 12px; }
.card h2 img { width: 40px; height: 40px; }
.card > :last-child { margin-bottom: 0; }
.kept-list { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin: 0 0 1em; }
@media (max-width: 760px) { .kept-list { grid-template-columns: 1fr; } }
.kept-list > div { border-radius: var(--r-card); padding: 20px 22px; }
.kept-list .gone { background: var(--out-soft); }
.kept-list .stays { background: var(--field); border: 1px solid var(--line); }
.kept-list h3 { margin: 0 0 8px; }
.kept-list ul { margin: 0; padding-left: 1.2em; }

.contact-line { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin: 6px 0 0; }
.contact-line .email { font: 700 clamp(1.2rem, 3vw, 1.6rem)/1.2 var(--display); color: var(--ink); text-decoration: none; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 12px; font-size: 0.95rem; opacity: 0; pointer-events: none; transition: opacity 0.2s, transform 0.2s; z-index: 60; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
@media print {
  .site-header, .site-footer, .toc, .menu-toggle { display: none; }
  .doc-layout { display: block; }
}
