/* My Wife's Plants — the app's own visual language, on the web.
   Colours are lifted verbatim from lib/theme.dart so the site and the app are
   recognisably the same object. Soft green surfaces, soft purple accent, soft
   orange secondary; deliberately low-contrast and calm.
   No external fonts, no scripts, no third-party requests — the Content-Security
   Policy in _headers forbids them, and a privacy page that phoned home would be
   its own contradiction. */

:root {
  --canvas: #ebf2e7;
  --surface: #fafcf8;
  --surface-sunk: #e5efe0;
  --ink: #1e2a1c;
  --ink-muted: #55654f;
  --line: #cedcc8;
  --purple: #7a68b8;
  --purple-soft: #e8e2f7;
  --purple-ink: #2c2247;
  --orange: #b96f3d;
  --orange-soft: #fbe6d6;
  --green: #6e9b72;
  --green-deep: #3f6243;
  --green-soft: #d9e8d8;
  --cream: #fbf8f1;

  --r-lg: 28px;
  --r-md: 20px;
  --r-sm: 14px;

  --shadow: 0 1px 2px rgba(30, 42, 28, .05), 0 8px 24px -12px rgba(30, 42, 28, .18);
  --measure: 68ch;

  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: ui-serif, Georgia, "Iowan Old Style", "Palatino Linotype", "Times New Roman", serif;

  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --canvas: #121a11;
    --surface: #1b241a;
    --surface-sunk: #212c20;
    --ink: #e7efe4;
    --ink-muted: #a4b49f;
    --line: #2f3e2d;
    --purple: #b3a4e0;
    --purple-soft: #2b2440;
    --purple-ink: #ded5f7;
    --orange: #e0a97f;
    --orange-soft: #3a2a1c;
    --green: #8fbc93;
    --green-deep: #a9d0ac;
    --green-soft: #24331f;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px -12px rgba(0, 0, 0, .6);
  }
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--canvas);
  -webkit-font-smoothing: antialiased;
}

/* Softly lit from the top, the way the app's canvas reads behind a photo. */
body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto 0;
  height: 60vh;
  background: radial-gradient(90% 70% at 50% 0%, var(--green-soft), transparent 70%);
  opacity: .7;
  pointer-events: none;
  z-index: -1;
}

img, svg { max-width: 100%; height: auto; display: block; }

a { color: var(--purple); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--ink); }

:focus-visible {
  outline: 2px solid var(--purple);
  outline-offset: 3px;
  border-radius: 4px;
}

h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.2; letter-spacing: -.01em; }
h1 { font-size: clamp(2.1rem, 6vw, 3.4rem); margin: 0 0 .5rem; }
h2 { font-size: clamp(1.5rem, 3.4vw, 2.1rem); margin: 0 0 .9rem; }
h3 { font-size: 1.15rem; font-family: var(--sans); font-weight: 700; margin: 0 0 .35rem; letter-spacing: 0; }
p { margin: 0 0 1rem; }
strong { font-weight: 650; }

.wrap { width: 100%; max-width: 1060px; margin: 0 auto; padding: 0 24px; }
.narrow { max-width: var(--measure); }

.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: 24px;
  top: 12px;
  z-index: 10;
  background: var(--surface);
  padding: 10px 16px;
  border-radius: var(--r-sm);
  box-shadow: var(--shadow);
}

/* ---------- Header ---------- */

.site-head {
  padding: 22px 0;
}
.site-head .wrap {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  font-family: var(--serif);
  font-size: 1.08rem;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  margin-right: auto;
}
.brand img { width: 34px; height: 34px; border-radius: 9px; }

.site-nav {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}
.site-nav a {
  color: var(--ink-muted);
  text-decoration: none;
  font-size: .95rem;
  padding: 6px 12px;
  border-radius: 999px;
}
.site-nav a:hover { color: var(--ink); background: var(--surface-sunk); }
.site-nav a[aria-current="page"] { color: var(--ink); background: var(--surface-sunk); }

/* ---------- Hero ---------- */

.hero {
  text-align: center;
  padding: 40px 0 8px;
}
.hero .mark {
  width: 108px;
  height: 108px;
  border-radius: 26px;
  margin: 0 auto 26px;
  box-shadow: var(--shadow);
}
.lede {
  font-size: clamp(1.05rem, 2.2vw, 1.22rem);
  color: var(--ink-muted);
  max-width: 56ch;
  margin: 0 auto 1.6rem;
}

.cta-row {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: .9rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform .12s ease, background-color .12s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--purple); color: #fff; }
.btn-primary:hover { background: var(--purple-ink); color: #fff; }
@media (prefers-color-scheme: dark) {
  .btn-primary { color: #1a1430; }
  .btn-primary:hover { background: #cdc0f0; color: #1a1430; }
}
.btn-quiet {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--line);
}
.btn-quiet:hover { background: var(--surface-sunk); color: var(--ink); }

.fineprint {
  font-size: .9rem;
  color: var(--ink-muted);
  margin: 0;
}

/* ---------- Sections ---------- */

section { padding: 40px 0; }
section h2 { margin-bottom: 1.1rem; }
section p { color: var(--ink-muted); }

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: clamp(24px, 4vw, 40px);
  box-shadow: var(--shadow);
}

/* ---------- The story ---------- */
/* Set a notch larger than the rest and hung off a soft green rule, because it
   is the bit worth reading and the only bit nobody else could have written. */

.story {
  padding: 44px 0 34px;
  border-left: 3px solid var(--green-soft);
  padding-left: clamp(20px, 4vw, 34px);
  margin: 8px 0 12px;
}
.story p {
  font-size: 1.1rem;
  line-height: 1.72;
  color: var(--ink);
  margin-bottom: 1.15rem;
}
.story p:last-child {
  margin-bottom: 0;
  font-family: var(--serif);
  font-size: 1.22rem;
  color: var(--green-deep);
}

/* ---------- What it does: a list, not a wall of cards ---------- */

.things { margin: 0; }
.things dt {
  font-weight: 650;
  font-size: 1.05rem;
  margin-top: 1.6rem;
  display: flex;
  align-items: baseline;
  gap: 11px;
}
.things dt::before {
  content: "";
  width: 8px;
  height: 8px;
  flex: none;
  border-radius: 50% 50% 50% 2px;
  background: var(--green);
  transform: rotate(-45deg);
}
.things dt:first-child { margin-top: 0; }
.things dd {
  margin: .3rem 0 0 19px;
  color: var(--ink-muted);
}
.things em { font-style: normal; font-weight: 600; color: var(--ink); }

/* ---------- Sign-off ---------- */

.signature {
  text-align: center;
  border-top: 1px solid var(--line);
  margin-top: 40px;
  padding: 44px 0 8px;
}
.signature img {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  margin: 0 auto 20px;
  opacity: .92;
}
.dedication {
  font-family: var(--serif);
  font-size: 1.3rem;
  color: var(--ink);
  margin-bottom: 1rem;
}
.aside {
  max-width: 46ch;
  margin: 0 auto 1.4rem;
  font-size: .95rem;
  color: var(--ink-muted);
}
.aside em { color: var(--green-deep); font-style: italic; }

/* ---------- Long-form legal / support pages ---------- */

.doc { padding: 8px 0 24px; }
.doc h1 { margin-bottom: .35rem; }
.doc .updated {
  color: var(--ink-muted);
  font-size: .92rem;
  margin-bottom: 2.2rem;
}
/* The plain-English summary above the legal text. Anyone who reads only this
   should still come away with an accurate picture. */
.standfirst {
  font-size: 1.08rem;
  line-height: 1.7;
  color: var(--ink);
  padding-left: 18px;
  border-left: 3px solid var(--green-soft);
  margin-bottom: 2.2rem;
}

.doc h2 {
  font-size: 1.4rem;
  margin-top: 2.6rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--line);
}
.doc h2:first-of-type { border-top: 0; padding-top: 0; }
.doc h3 { margin-top: 1.7rem; font-size: 1.03rem; }
.doc ul, .doc ol { padding-left: 1.3rem; margin: 0 0 1rem; }
.doc li { margin-bottom: .5rem; }
.doc dt { font-weight: 650; margin-top: 1.2rem; }
.doc dd { margin: .25rem 0 0; color: var(--ink-muted); }

.toc {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 20px 24px;
  margin-bottom: 2.4rem;
}
.toc h2 {
  font-family: var(--sans);
  font-size: .78rem;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--ink-muted);
  border: 0;
  margin: 0 0 .7rem;
  padding: 0;
}
.toc ol { margin: 0; padding-left: 1.2rem; }
.toc li { margin-bottom: .3rem; }
.toc a { color: var(--ink); text-decoration: none; }
.toc a:hover { color: var(--purple); text-decoration: underline; }

/* Tables scroll on their own rather than making the page scroll sideways. */
.table-scroll { overflow-x: auto; margin-bottom: 1.4rem; }
table {
  border-collapse: collapse;
  width: 100%;
  min-width: 380px;
  font-size: .95rem;
}
th, td {
  text-align: left;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
th { font-weight: 650; color: var(--ink); }
td { color: var(--ink-muted); }

/* ---------- FAQ ---------- */

.faq { border-top: 1px solid var(--line); }
.faq details {
  border-bottom: 1px solid var(--line);
}
.faq summary {
  cursor: pointer;
  padding: 17px 4px;
  font-weight: 600;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 12px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before {
  content: "+";
  font-family: var(--sans);
  font-size: 1.25rem;
  line-height: 1;
  color: var(--green-deep);
  width: 16px;
  flex: none;
}
.faq details[open] summary::before { content: "\2013"; }
.faq details > div {
  padding: 0 4px 18px 32px;
  color: var(--ink-muted);
  font-size: .96rem;
}
.faq details > div p:last-child { margin-bottom: 0; }

/* ---------- Footer ---------- */

.site-foot {
  border-top: 1px solid var(--line);
  margin-top: 60px;
  padding: 34px 0 56px;
  font-size: .92rem;
  color: var(--ink-muted);
}
.site-foot .wrap {
  display: flex;
  gap: 10px 28px;
  flex-wrap: wrap;
  align-items: center;
}
.site-foot nav { display: flex; gap: 10px 20px; flex-wrap: wrap; margin-left: auto; }
.site-foot a { color: var(--ink-muted); text-decoration: none; }
.site-foot a:hover { color: var(--ink); text-decoration: underline; }

/* ---------- 404 ---------- */

.centered {
  min-height: 58vh;
  display: grid;
  place-content: center;
  text-align: center;
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
