/* treelace.com — self-hosted, no web fonts, no third-party anything */
:root {
  --bg: #f7faf9;
  --surface: #ffffff;
  --text: #13201d;
  --muted: #4d5e59;
  --border: #d7e2df;
  --brand: #0e2a26;
  --accent: #0f7a5c;
  --accent-text: #ffffff;
  --gold: #a86b00;
  --focus: #1f6feb;
  --notice: #eef6f3;
  --error: #b42318;
  --error-bg: #fdf0ef;
  --radius: 10px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1614;
    --surface: #10201d;
    --text: #e6efec;
    --muted: #a3b5b0;
    --border: #22403a;
    --brand: #0e2a26;
    --accent: #2dd4a0;
    --accent-text: #06231c;
    --gold: #f5b83d;
    --focus: #6cb6ff;
    --notice: #12302a;
    --error: #ff8a80;
    --error-bg: #3a1714;
  }
}
* { box-sizing: border-box; }
html { font-size: 16px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, Cantarell, "Noto Sans", sans-serif;
  line-height: 1.6;
}
a { color: var(--accent); }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}
code { font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: 0.92em; background: var(--notice); padding: 0.05em 0.3em; border-radius: 4px; }
.skip { position: absolute; left: -9999px; top: 0; }
.skip:focus { left: 1rem; top: 1rem; background: var(--surface); padding: 0.5rem 1rem; z-index: 10; }

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding: 0.9rem clamp(1rem, 4vw, 3rem);
  background: var(--brand);
  color: #e6efec;
}
.site-header a { color: #e6efec; text-decoration: none; }
.site-header a:hover { text-decoration: underline; }
.brand { display: flex; align-items: center; gap: 0.6rem; font-weight: 700; font-size: 1.15rem; }
.site-header ul { list-style: none; display: flex; flex-wrap: wrap; gap: 1.2rem; margin: 0; padding: 0; }

main { padding: 2rem clamp(1rem, 4vw, 3rem) 3rem; max-width: 1100px; margin: 0 auto; }
.narrow { max-width: 760px; margin: 0 auto; }
h1 { font-size: clamp(1.8rem, 4vw, 2.5rem); line-height: 1.2; margin: 0.5rem 0 1rem; }
h2 { font-size: 1.35rem; margin: 2rem 0 0.75rem; }
h3 { font-size: 1.1rem; margin: 1.4rem 0 0.5rem; }

.hero { text-align: center; padding: 1.5rem 0 1rem; }
.hero-logo { border-radius: 22px; }
.hero h1 .sub { color: var(--muted); font-weight: 500; }
.lead { font-size: 1.3rem; font-weight: 600; margin: 0.25rem 0 0.75rem; }
.cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.75rem; margin-top: 1.25rem; }

.button {
  display: inline-block;
  padding: 0.65rem 1.2rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
.button:hover { border-color: var(--accent); }
.button.primary { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }
.button.ghost { background: transparent; }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem 1.5rem; margin: 1.5rem 0; }
.card h2 { margin-top: 0.25rem; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.5rem; }
.grid2 .card { margin: 0; }
.ticks { padding-left: 1.2rem; }
.ticks li { margin: 0.35rem 0; }
.privacy-claim { border-left: 5px solid var(--accent); }

.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 0.95rem; }
caption { text-align: left; color: var(--muted); padding-bottom: 0.5rem; }
th, td { border-bottom: 1px solid var(--border); padding: 0.55rem 0.6rem; text-align: left; vertical-align: top; }
thead th { font-weight: 700; }
.sources { color: var(--muted); }
.small { font-size: 0.88rem; color: var(--muted); }

details { border-top: 1px solid var(--border); padding: 0.6rem 0; }
summary { cursor: pointer; font-weight: 600; }

.notice { background: var(--notice); border-radius: 8px; padding: 0.75rem 1rem; }
.notice.error { background: var(--error-bg); color: var(--error); }
.notice.success { border-left: 5px solid var(--accent); }

.buy-form fieldset { border: none; padding: 0; margin: 0; }
.buy-form legend { font-weight: 700; margin-bottom: 0.5rem; }
.plans { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.8rem; }
@media (max-width: 560px) { .plans { grid-template-columns: 1fr; } }
.plan {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto auto;
  column-gap: 0.6rem;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 0.8rem 1rem;
  background: var(--surface);
  cursor: pointer;
}
.plan:has(input:checked) { border-color: var(--accent); }
.plan input { grid-row: 1 / span 3; margin-top: 0.35rem; accent-color: var(--accent); width: 1.1rem; height: 1.1rem; }
.plan-name { font-weight: 700; }
.plan-price { font-size: 1.35rem; font-weight: 800; }
.plan-price small { font-size: 0.9rem; font-weight: 500; color: var(--muted); }
.plan-desc { color: var(--muted); font-size: 0.92rem; }
.consent { margin: 1.2rem 0; padding: 0.9rem 1rem; border: 2px solid var(--gold); border-radius: var(--radius); background: var(--surface); }
.consent label { display: flex; gap: 0.7rem; align-items: flex-start; cursor: pointer; }
.consent input { margin-top: 0.35rem; width: 1.2rem; height: 1.2rem; accent-color: var(--accent); flex: none; }

.stack { display: flex; flex-direction: column; gap: 0.4rem; max-width: 520px; }
.stack label { font-weight: 600; margin-top: 0.6rem; }
input[type="email"], input[type="text"], textarea {
  font: inherit;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.55rem 0.7rem;
}
.stack .button { margin-top: 1rem; align-self: flex-start; }

.key-box { background: var(--surface); border: 2px solid var(--accent); border-radius: var(--radius); padding: 1rem 1.2rem; margin: 1.2rem 0; }
.key-box label { font-weight: 700; display: block; margin-bottom: 0.4rem; }
textarea.key { width: 100%; font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: 0.85rem; word-break: break-all; resize: vertical; }
.key-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; }

.legal h2 { border-top: 1px solid var(--border); padding-top: 1.2rem; }
.legal .meta { color: var(--muted); }
.legal .summary { background: var(--notice); padding: 0.8rem 1rem; border-radius: 8px; }
.facts dt { font-weight: 700; margin-top: 0.6rem; }
.facts dd { margin: 0; }
pre.licence { white-space: pre-wrap; font-size: 0.85rem; background: var(--notice); padding: 1rem; border-radius: 8px; }

.site-footer { border-top: 1px solid var(--border); padding: 1.5rem clamp(1rem, 4vw, 3rem) 2.5rem; background: var(--surface); }
.site-footer ul { list-style: none; display: flex; flex-wrap: wrap; gap: 0.4rem 1.2rem; padding: 0; margin: 0 0 1rem; }
.site-footer .company { font-size: 0.9rem; }

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