/* Self-hosted fonts (latin subset, variable weight). */
@font-face { font-family: "Baloo 2"; src: url("baloo2.woff2") format("woff2"); font-weight: 600 800; font-style: normal; font-display: swap; }
@font-face { font-family: "Nunito Sans"; src: url("nunitosans.woff2") format("woff2"); font-weight: 400 700; font-style: normal; font-display: swap; }

/* Karmanaut: shared styles for every page.
   Colours are all defined here, so the scheme can be changed in one place. */
:root {
  color-scheme: light;
  --ink: #17424F;        /* deep teal: text */
  --ink-soft: #4A6B74;   /* secondary text */
  --teal: #0E7C7B;       /* links, orbit in the logo */
  --teal-dark: #0A5F5E;
  --marigold: #F9B233;   /* main buttons, planet in the logo */
  --marigold-dark: #E89D14;
  --coral: #D2452E;      /* heart in the logo, small accents */
  --leaf: #4F9A4A;
  --paper: #FFFDF8;      /* page background */
  --sun-wash: #FFF3D1;   /* warm section background */
  --sky-wash: #DDF3EF;   /* cool section background */
  --coral-wash: #FCE6DF;
  --line: #DCE7E2;
  --radius: 18px;
  --shadow: 0 2px 4px rgba(23, 66, 79, .06), 0 10px 28px rgba(23, 66, 79, .09);
  --heading: "Baloo 2", "Trebuchet MS", system-ui, sans-serif;
  --body: "Nunito Sans", "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.65 var(--body);
}

h1, h2, h3, h4 { font-family: var(--heading); line-height: 1.15; margin: 0 0 .5em; font-weight: 700; }
h1 { font-size: clamp(2.4rem, 6vw, 4rem); font-weight: 800; letter-spacing: -.01em; }
h2 { font-size: clamp(1.75rem, 3.6vw, 2.5rem); }
h3 { font-size: 1.35rem; }
p { margin: 0 0 1em; }
a { color: var(--teal); text-underline-offset: 2px; }
a:hover { color: var(--teal-dark); }
img, svg { max-width: 100%; }
:focus-visible { outline: 3px solid var(--coral); outline-offset: 2px; border-radius: 4px; }

.wrap { width: min(1120px, 100% - 40px); margin-inline: auto; }
.narrow { width: min(760px, 100% - 40px); margin-inline: auto; }
.section { padding: clamp(48px, 7vw, 88px) 0; }
.section-sun { background: var(--sun-wash); }
.section-sky { background: var(--sky-wash); }
.lede { font-size: clamp(1.15rem, 2vw, 1.35rem); line-height: 1.5; color: var(--ink-soft); }
.section-head { max-width: 680px; margin-bottom: 36px; }
.kicker { font: 700 .95rem var(--heading); color: var(--coral); margin-bottom: .4em; }
.muted { color: var(--ink-soft); }
.small { font-size: .9rem; }

/* Work-in-progress ribbon */
.ribbon { background: var(--ink); color: #fff; font-size: .92rem; text-align: center; padding: 7px 16px; }
.ribbon a { color: var(--marigold); }
.ribbon a:hover { color: #fff; }

/* Header */
.site-header { background: var(--paper); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font: 800 1.6rem/1 var(--heading); }
.brand:hover { color: var(--ink); }
.brand img { width: 46px; height: 46px; display: block; }
.site-nav ul { display: flex; flex-wrap: wrap; gap: 2px; list-style: none; margin: 0; padding: 0; }
.site-nav a { display: block; padding: 7px 11px; border-radius: 999px; color: var(--ink); text-decoration: none; font-weight: 600; font-size: .96rem; }
.site-nav a:hover { background: var(--sky-wash); color: var(--ink); }
.site-nav a[aria-current="page"] { background: var(--sun-wash); box-shadow: inset 0 0 0 1.5px var(--marigold); }
.nav-toggle { display: none; background: none; border: 2px solid var(--ink); border-radius: 10px; color: var(--ink); font: 700 1rem var(--heading); padding: 6px 14px; cursor: pointer; }

@media (max-width: 1140px) {
  .nav-toggle { display: block; }
  .site-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--paper); border-bottom: 1px solid var(--line); box-shadow: var(--shadow); padding: 10px 20px 16px; }
  .site-nav.open { display: block; }
  .site-nav ul { flex-direction: column; }
  .site-nav a { padding: 11px 14px; font-size: 1.05rem; }
  .site-header .wrap { position: static; }
}

/* Buttons */
.btn { display: inline-block; padding: 12px 24px; border-radius: 999px; font: 700 1.08rem/1.2 var(--heading); text-decoration: none; cursor: pointer; border: 2px solid transparent; background: var(--marigold); color: var(--ink); }
.btn:hover { background: var(--marigold-dark); color: var(--ink); }
.btn-outline { background: transparent; border-color: var(--teal); color: var(--teal-dark); }
.btn-outline:hover { background: var(--sky-wash); color: var(--teal-dark); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }

/* Page hero (inner pages) */
.page-hero { background: var(--sun-wash); padding: clamp(44px, 6vw, 72px) 0; }
.page-hero h1 { font-size: clamp(2.2rem, 5vw, 3.3rem); max-width: 18em; }
.page-hero .lede { max-width: 44em; margin: 0; }

/* Home hero */
.hero { background: linear-gradient(180deg, var(--sun-wash), var(--paper)); padding: clamp(36px, 6vw, 72px) 0 clamp(28px, 4vw, 48px); }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; }
.hero-art { width: 100%; height: auto; display: block; }
@media (max-width: 820px) { .hero-grid { grid-template-columns: 1fr; } .hero-art { max-width: 400px; margin-inline: auto; } }

/* Grids and cards */
.grid { display: grid; gap: 22px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.card > :last-child { margin-bottom: 0; }

.fact { text-align: center; }
.fact-num { font: 800 clamp(2.4rem, 5vw, 3.2rem)/1 var(--heading); color: var(--teal); margin-bottom: 6px; }
.fact:nth-child(2) .fact-num { color: var(--coral); }
.fact:nth-child(3) .fact-num { color: var(--marigold-dark); }

/* Sneak peek of the app */
.peek { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 24px; align-items: start; }
@media (max-width: 820px) { .peek { grid-template-columns: minmax(0, 1fr); } }
.tag-sample { display: inline-block; background: var(--coral-wash); color: #93301F; font-weight: 700; font-size: .82rem; border-radius: 999px; padding: 3px 12px; }
.post { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.post-top { display: flex; align-items: center; gap: 12px; padding: 16px 20px 8px; }
.avatar { flex: none; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; font: 700 1rem var(--heading); background: var(--sky-wash); color: var(--teal-dark); }
.avatar.warm { background: var(--sun-wash); color: #8A5A00; }
.avatar.rose { background: var(--coral-wash); color: #93301F; }
.post-who { line-height: 1.3; }
.post-who strong { display: block; }
.post-body { padding: 4px 20px 14px; }
.post-body h3 { margin-bottom: .3em; }
.progress { height: 12px; border-radius: 999px; background: var(--sky-wash); overflow: hidden; margin: 14px 0 6px; }
.progress span { display: block; height: 100%; background: var(--teal); border-radius: 999px; }
.post-stats { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; font-size: .92rem; color: var(--ink-soft); }
.post-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 12px 20px; border-top: 1px solid var(--line); }
.pill { font: 700 .95rem var(--heading); padding: 7px 16px; border-radius: 999px; background: var(--marigold); color: var(--ink); }
.pill.plain { background: var(--sky-wash); color: var(--teal-dark); }
.thread { background: #F6FAF8; padding: 14px 20px 18px; border-top: 1px solid var(--line); }
.comment { display: flex; gap: 10px; margin-top: 12px; font-size: .96rem; line-height: 1.45; }
.comment:first-child { margin-top: 0; }
.comment .avatar { width: 34px; height: 34px; font-size: .85rem; }
.comment-bubble { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 8px 12px; }
.comment-bubble strong { display: block; font-size: .9rem; }

.board { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; }
.board h3 { margin-bottom: 10px; }
.board table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.board th { text-align: left; font-size: .8rem; color: var(--ink-soft); font-weight: 700; padding: 4px 4px 6px; }
.board td { padding: 9px 4px; border-top: 1px solid var(--line); vertical-align: middle; line-height: 1.25; }
.board .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.board td small { display: block; color: var(--ink-soft); }

/* Project types */
.type-card svg { width: 54px; height: 54px; display: block; margin-bottom: 10px; }

/* Two-up split */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 56px); align-items: center; }
@media (max-width: 820px) { .split { grid-template-columns: 1fr; } }

/* Compare two ladders */
.versus { display: grid; gap: 14px; }
.versus-row { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 14px 18px; }
.versus-row strong { display: block; font-family: var(--heading); font-size: 1.1rem; }

/* Steps */
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 18px; counter-reset: step; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 56px 1fr; gap: 16px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.steps li::before { content: counter(step); width: 52px; height: 52px; border-radius: 50%; background: var(--marigold); display: grid; place-items: center; font: 800 1.5rem var(--heading); }
.steps h3 { margin-bottom: .25em; }
.steps p { margin: 0; }

/* Tables */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; background: #fff; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.table th, .table td { text-align: left; padding: 13px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table thead th { background: var(--sky-wash); font-family: var(--heading); font-size: 1.02rem; }
.table tr:last-child td { border-bottom: 0; }
.table .big { font: 800 1.3rem var(--heading); white-space: nowrap; }

/* Karma simulator */
.sim { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: clamp(18px, 3vw, 30px); }
.sim-total { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 6px 16px; margin-bottom: 16px; font: 700 1.1rem var(--heading); }
.sim-project { border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; margin-bottom: 14px; }
.sim-project h3 { margin-bottom: .2em; }
.sim-project ul { margin: 6px 0 10px; padding-left: 1.2em; font-size: .96rem; color: var(--ink-soft); }
.sim-slider { display: flex; align-items: center; gap: 14px; }
.sim-slider input { flex: 1; min-width: 0; accent-color: var(--teal); height: 28px; }
.sim-slider output { font: 700 1.15rem var(--heading); min-width: 3.4em; text-align: right; }
.sim-result { margin-top: 10px; padding: 10px 14px; border-radius: 10px; font-size: .98rem; }
.sim-result.bad { background: var(--coral-wash); }
.sim-result.ok { background: var(--sky-wash); }
.sim-result.great { background: var(--sun-wash); }
.sim-summary { margin-top: 18px; padding: 18px 20px; border-radius: 14px; background: var(--ink); color: #fff; }
.sim-summary strong { font: 800 1.7rem var(--heading); color: var(--marigold); }
[hidden] { display: none !important; }

/* Badges */
.badge { text-align: center; }
.coin { width: 74px; height: 74px; margin: 0 auto 10px; border-radius: 50%; display: grid; place-items: center; font: 800 1.5rem var(--heading); background: var(--marigold); box-shadow: inset 0 0 0 4px var(--paper), 0 0 0 3px var(--marigold-dark); }
.coin.teal { background: var(--teal); color: #fff; box-shadow: inset 0 0 0 4px var(--paper), 0 0 0 3px var(--teal-dark); }
.coin.red { background: var(--coral); color: #fff; box-shadow: inset 0 0 0 4px var(--paper), 0 0 0 3px #A83422; }
.coin.green { background: var(--leaf); color: #fff; box-shadow: inset 0 0 0 4px var(--paper), 0 0 0 3px #3B7A37; }
.badge h3 { font-size: 1.12rem; margin-bottom: .2em; }
.badge p { font-size: .94rem; color: var(--ink-soft); margin: 0; }

/* Question lists */
.question-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 40px; align-items: start; }
.toc { position: sticky; top: 92px; }
.toc ul { list-style: none; padding: 0; margin: 0; }
.toc a { display: block; padding: 6px 0; text-decoration: none; font-weight: 600; }
@media (max-width: 860px) { .question-layout { grid-template-columns: minmax(0, 1fr); } .toc { position: static; } .toc ul { display: flex; flex-wrap: wrap; gap: 4px 16px; } }
.q-group { margin-bottom: 44px; scroll-margin-top: 92px; }
.q-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.q-list li { background: #fff; border: 1px solid var(--line); border-left: 5px solid var(--marigold); border-radius: 12px; padding: 14px 18px; }
.q-list strong { display: block; font-size: 1.06rem; }
.q-list span { color: var(--ink-soft); font-size: .97rem; }
.flags { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.flags li { padding-left: 30px; position: relative; }
.flags li::before { content: ""; position: absolute; left: 4px; top: .4em; width: 14px; height: 14px; border-radius: 3px; background: var(--coral); transform: rotate(45deg) scale(.8); }
.flags.good li::before { background: var(--leaf); border-radius: 50%; transform: none; }

/* Pledge bar */
.pledge-bar { display: flex; height: 62px; border-radius: 14px; overflow: hidden; font: 700 1.1rem var(--heading); }
.pledge-bar .to-projects { flex: 195; background: var(--teal); color: #fff; display: flex; align-items: center; padding-left: 20px; }
.pledge-bar .to-running { flex: 5; min-width: 14px; background: var(--marigold); }
.pledge-key { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 4px 20px; margin-top: 10px; font-size: .96rem; }
.pledge-key b { color: var(--marigold-dark); }

/* Forms */
.form { display: grid; gap: 18px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(20px, 3vw, 30px); }
.form label, .form legend { display: block; font-weight: 700; margin-bottom: 5px; padding: 0; }
.form fieldset { border: 0; margin: 0; padding: 0; }
.form input[type="text"], .form input[type="email"], .form select, .form textarea {
  width: 100%; padding: 11px 14px; border: 1.5px solid #A9C2BC; border-radius: 10px; font: inherit; color: inherit; background: var(--paper);
}
.form input:focus, .form select:focus, .form textarea:focus { outline: 3px solid var(--marigold); outline-offset: 0; border-color: var(--teal); }
.form textarea { min-height: 150px; resize: vertical; }
.choice-row { display: flex; flex-wrap: wrap; gap: 8px; }
.choice { position: relative; }
.form .choice label { font-weight: 600; margin: 0; padding: 7px 15px; border: 1.5px solid #A9C2BC; border-radius: 999px; cursor: pointer; }
.choice input { position: absolute; opacity: 0; inset: 0; }
.choice input:checked + label { background: var(--sun-wash); border-color: var(--marigold-dark); }
.choice input:focus-visible + label { outline: 3px solid var(--coral); outline-offset: 2px; }
.form-note { font-size: .92rem; color: var(--ink-soft); margin: 0; }
.form-sent { background: var(--sky-wash); padding: 12px 16px; border-radius: 10px; margin: 0; }

/* Call to action */
.cta { background: var(--teal); color: #fff; text-align: center; padding: clamp(48px, 7vw, 76px) 0; }
.cta h2 { max-width: 20em; margin-inline: auto; }
.cta p { max-width: 38em; margin-inline: auto; }
.cta .btn-row { justify-content: center; }
.cta .btn-outline { border-color: #fff; color: #fff; }
.cta .btn-outline:hover { background: var(--teal-dark); color: #fff; }

/* Footer */
.site-footer { background: var(--sky-wash); padding: 40px 0 28px; font-size: .95rem; }
.footer-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 22px 48px; }
.footer-row .brand { font-size: 1.3rem; margin-bottom: 8px; }
.footer-row .brand img { width: 36px; height: 36px; }
.footer-blurb { max-width: 30em; margin: 0; }
.footer-links { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: 32px; }
.footer-links li { margin-bottom: 4px; }
.footer-legal { margin: 26px 0 0; padding-top: 16px; border-top: 1px solid #BEDDD6; color: var(--ink-soft); font-size: .88rem; }

@media print {
  .ribbon, .site-header, .site-footer, .cta, .toc { display: none; }
  .question-layout { display: block; }
}

/* One-off adjustments. The Content-Security-Policy forbids style attributes. */
.section.pt-24 { padding-top: 24px; }
.progress span.w-62 { width: 62%; }
p.mt-12-only { margin: 12px 0 0; }
p.mt-14 { margin-top: 14px; }
p.mt-18 { margin-top: 18px; }
p.mt-22 { margin-top: 22px; }
p.mt-24 { margin-top: 24px; }
p.m-0 { margin: 0; }
.wrap.align-start { align-items: start; }
.card.card-sun { background: var(--sun-wash); border-color: #F2DFA6; }
.section.scroll-offset { scroll-margin-top: 80px; }
