/* growty.ai — the only stylesheet. No external fonts, no scripts.
   The Content-Security-Policy in /_headers allows same-origin styles only:
   never add style attributes or <style> blocks to the HTML. */

/* ---------- Tokens ---------- */

:root {
  color-scheme: light dark;

  --bg: #f6f5f0;
  --surface: #ffffff;
  --surface-muted: #ecebe4;
  --text: #18221e;
  --text-muted: #4b5852;
  --accent: #14603f;
  --accent-hover: #0f4d32;
  --on-accent: #ffffff;
  --link: #14603f;
  --rule: #d6d8cf;
  --rule-strong: #8d9690;
  --focus: #14603f;
  --code-bg: #e7e7df;

  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --font-serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", "URW Palladio L", P052, Georgia, serif;
  --font-mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;

  --gutter: 1rem;
  --measure: 44rem;
  --radius: 0.625rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1512;
    --surface: #151d19;
    --surface-muted: #19221e;
    --text: #e5ebe7;
    --text-muted: #a9b5ae;
    --accent: #7bd3a5;
    --accent-hover: #9be0bb;
    --on-accent: #0b1a12;
    --link: #8fdcb3;
    --rule: #2b3631;
    --rule-strong: #5b6a62;
    --focus: #8fdcb3;
    --code-bg: #1f2a25;
  }
}

@media (min-width: 48rem) {
  :root { --gutter: 2rem; }
}

/* ---------- Base ---------- */

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

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

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.45;
  font-kerning: normal;
  text-rendering: optimizeLegibility;
  overflow-wrap: break-word;
}

img { max-width: 100%; height: auto; }

h1, h2, h3 {
  line-height: 1.2;
  hyphens: none;
  text-wrap: balance;
}

h1, h2 {
  font-family: var(--font-serif);
  font-weight: 700;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2rem, 1.55rem + 1.8vw, 2.75rem); margin: 0 0 0.75rem; }
h2 { font-size: 1.5rem; margin: 2.75rem 0 0.75rem; }
h3 { font-size: 1.0625rem; font-weight: 600; margin: 1.75rem 0 0.5rem; }

p, ul, ol, address, table { margin: 0 0 1rem; }
p { text-wrap: pretty; }

ul, ol { padding-left: 1.375rem; }
ul { list-style-type: circle; }
li::marker { color: var(--text-muted); }
li + li { margin-top: 0.375rem; }
li > ul, li > ol { margin: 0.375rem 0 0; }

strong { font-weight: 600; }
address { font-style: normal; }

code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  background: var(--code-bg);
  padding: 0.05em 0.3em;
  border-radius: 0.25rem;
}

a {
  color: var(--link);
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover { text-decoration-thickness: 2px; }

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

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -10rem;
  z-index: 10;
  padding: 0.625rem 1rem;
  background: var(--surface);
  color: var(--text);
  border-radius: var(--radius);
  box-shadow: 0 0 0 2px var(--focus);
}

.skip-link:focus { top: 0.75rem; }

.wrap {
  width: 100%;
  max-width: 72rem;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- Site header ---------- */

.site-header { border-bottom: 1px solid var(--rule); }

.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  padding-block: 0.875rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text);
  text-decoration: none;
  font-family: var(--font-serif);
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: -0.005em;
}

.brand img { display: block; width: 1.75rem; height: 1.75rem; }

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav li + li { margin-top: 0; }

.site-nav a {
  display: inline-block;
  padding-block: 0.375rem;
  color: var(--text);
  font-size: 0.9375rem;
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  text-decoration-line: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.35em;
}

/* ---------- Landing page ---------- */

.hero { padding-block: clamp(3rem, 2rem + 5vw, 6rem) clamp(2.5rem, 2rem + 3vw, 4.5rem); }

.eyebrow {
  margin: 0 0 1rem;
  color: var(--accent);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 16em;
  font-size: clamp(2.25rem, 1.45rem + 3.4vw, 3.75rem);
  line-height: 1.08;
  letter-spacing: -0.015em;
}

.hero .lede {
  max-width: 36rem;
  margin-top: 1.5rem;
  color: var(--text-muted);
  font-size: clamp(1.125rem, 1.05rem + 0.4vw, 1.3125rem);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.25rem;
  margin-top: 2rem;
}

.actions p { margin: 0; color: var(--text-muted); }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.875rem;
  padding: 0.625rem 1.375rem;
  border: 1px solid transparent;
  border-radius: 0.5rem;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 600;
  text-decoration: none;
}

.button:hover { background: var(--accent-hover); }

.section {
  padding-block: clamp(2.5rem, 2rem + 3vw, 4rem);
  border-top: 1px solid var(--rule);
}

.section h2 { margin-top: 0; }

.section .intro {
  max-width: var(--measure);
  color: var(--text-muted);
}

.prose { max-width: var(--measure); }

.feature-list {
  display: grid;
  gap: 1rem;
  margin: 2rem 0 0;
  padding: 0;
  list-style: none;
  counter-reset: feature;
}

@media (min-width: 40rem) {
  .feature-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 64rem) {
  .feature-list { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; }
}

.feature-list > li {
  margin: 0;
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  counter-increment: feature;
}

.feature-list > li::before {
  content: counter(feature, decimal-leading-zero);
  display: block;
  margin-bottom: 0.75rem;
  color: var(--accent);
  font-family: var(--font-serif);
  font-size: 1.125rem;
  font-weight: 700;
  font-variant-numeric: lining-nums tabular-nums;
}

.feature-list h3 { margin: 0 0 0.5rem; font-size: 1.125rem; }
.feature-list p { margin: 0; color: var(--text-muted); }

/* ---------- Legal pages ---------- */

.legal { padding-block: 2.5rem 4rem; }

.doc-header,
.doc-body { max-width: var(--measure); min-width: 0; }

.doc-header h1 { margin-bottom: 0.5rem; }

.effective {
  margin: 0 0 1.25rem;
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.lede { font-size: 1.1875rem; }

.toc {
  max-width: var(--measure);
  margin: 1.5rem 0 0.5rem;
  padding: 1.25rem 1.25rem 1rem;
  background: var(--surface-muted);
  border-radius: var(--radius);
}

.toc h2 {
  margin: 0 0 0.75rem;
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.toc ol { margin: 0; padding-left: 1.75rem; }
.toc li { font-variant-numeric: tabular-nums; }
.toc li + li { margin-top: 0.25rem; }
.toc a { color: var(--text); text-decoration: none; }
.toc a:hover { color: var(--link); text-decoration-line: underline; }

.doc-body h2,
.doc-body h3 { scroll-margin-top: 1.5rem; }

.num {
  margin-right: 0.3em;
  color: var(--accent);
  font-variant-numeric: lining-nums tabular-nums;
}

.clause {
  margin-right: 0.35em;
  font-weight: 600;
  font-variant-numeric: lining-nums tabular-nums;
}

.lettered {
  padding-left: 0;
  list-style: none;
}

.lettered > li { padding-left: 2rem; text-indent: -2rem; }

.steps { padding-left: 1.5rem; }
.steps > li::marker { color: var(--accent); font-weight: 700; }
.steps h3 { margin-top: 0; }
.steps > li + li { margin-top: 1.25rem; }

.note {
  padding: 1rem 1.25rem;
  background: var(--surface-muted);
  border-radius: var(--radius);
}

/* Tables: a single thin rule under the header row, padding instead of borders. */

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.96875rem;
}

th, td {
  padding: 0.625rem 1rem 0.625rem 0;
  text-align: left;
  vertical-align: top;
}

th:last-child, td:last-child { padding-right: 0; }

thead th {
  border-bottom: 1px solid var(--rule-strong);
  font-weight: 600;
}

tbody th { width: 34%; font-weight: 600; }

/* Two columns from 64rem: sticky contents on the left, text on the right. */

@media (min-width: 64rem) {
  .legal-grid {
    display: grid;
    grid-template-columns: 15rem minmax(0, var(--measure));
    justify-content: center;
    align-items: start;
    column-gap: 4rem;
  }

  .doc-header { grid-column: 2; grid-row: 1; }
  .doc-body { grid-column: 2; grid-row: 2; }

  .toc {
    grid-column: 1;
    grid-row: 1 / span 2;
    position: sticky;
    top: 1.5rem;
    max-height: calc(100vh - 3rem);
    overflow-y: auto;
    margin: 0.5rem 0 0;
    padding: 0 0.25rem 0 0;
    background: transparent;
    border-radius: 0;
    font-size: 0.9375rem;
  }
}

/* ---------- Site footer ---------- */

.site-footer {
  border-top: 1px solid var(--rule);
  background: var(--surface-muted);
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.site-footer .wrap {
  display: grid;
  gap: 1.5rem 3rem;
  padding-block: 2.5rem;
}

@media (min-width: 48rem) {
  .site-footer .wrap { grid-template-columns: minmax(0, 1fr) auto; }
}

.site-footer p,
.site-footer address { margin: 0 0 0.5rem; }

.site-footer a { color: var(--text); }

.footer-nav ul {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-nav li + li { margin-top: 0; }

.footer-meta {
  grid-column: 1 / -1;
  margin: 0;
  font-size: 0.875rem;
}

.footer-meta p { margin: 0 0 0.25rem; }

/* ---------- Not found ---------- */

.not-found { padding-block: clamp(3rem, 2rem + 5vw, 6rem); }
.not-found ul { padding-left: 1.375rem; }

/* ---------- Forced colours and print ---------- */

@media (forced-colors: active) {
  .button { border-color: ButtonText; }
  .feature-list > li, .toc { border: 1px solid CanvasText; }
}

@media print {
  :root {
    --bg: #ffffff;
    --surface: #ffffff;
    --surface-muted: #ffffff;
    --text: #000000;
    --text-muted: #333333;
    --link: #000000;
    --accent: #000000;
  }

  body { font-size: 11pt; }
  .skip-link, .site-nav, .toc, .footer-nav, .actions { display: none; }
  .site-footer { border-top: 1px solid #000000; }
  h2, h3 { break-after: avoid; }
  p, li { orphans: 2; widows: 2; }
}
