/* Watercolour on cotton paper. Painted effects rely on the SVG filters (#wet, #wet2, #bleed, #ink)
   defined inline at the top of every page; Chrome can't reference filters from an external file. */
:root {
  color-scheme: light;
  --paper: #f6efe3;
  --card: #fffdf8;
  --ink: #2b2f38;
  --muted: #4a4e56;
  --faint: #6a6e74;
  --rule: rgba(43, 47, 56, 0.3);
  --tomato: #b04a28;
  --tomato-deep: #8a3a1f;
  --sage-ink: #3f6e4a;
  --max: 1200px;
  --serif: "Fraunces", Georgia, serif;
  --sans: "Karla", system-ui, -apple-system, "Segoe UI", sans-serif;
  --hand: "Caveat", "Bradley Hand", cursive;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overflow-x: clip; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 18px/1.6 var(--sans);
  overflow-x: clip;
}
/* Paper grain over everything */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 100;
  opacity: 0.5;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='300' height='300'><filter id='g'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' seed='9' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.42  0 0 0 0 0.36  0 0 0 0 0.28  0 0 0 -1.6 1.05'/></filter><rect width='300' height='300' filter='url(%23g)'/></svg>");
}
img { max-width: 100%; display: block; }
a { color: var(--tomato-deep); text-underline-offset: 3px; }
a:hover { color: #5e2512; }
h1, h2, h3 { font-family: var(--serif); line-height: 1.05; letter-spacing: -0.02em; margin: 0 0 12px; font-variation-settings: "SOFT" 100; }
h1 { font-size: clamp(50px, 7.2vw, 92px); font-weight: 750; letter-spacing: -0.025em; line-height: 0.98; }
h2 { font-size: clamp(34px, 4.4vw, 56px); font-weight: 700; }
h3 { font-size: clamp(22px, 2.2vw, 28px); font-weight: 650; }
p { margin: 0 0 16px; }
.muted { color: var(--muted); }
.hand { font-family: var(--hand); font-weight: 600; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; position: relative; }
@media (min-width: 900px) { .wrap { padding: 0 48px; } }

/* ---------- Paint ---------- */
.wash { position: absolute; border-radius: 50%; mix-blend-mode: multiply; pointer-events: none; filter: url(#wet); }
.wash.w2 { filter: url(#wet2); }
.wash.bleed { filter: url(#bleed); }
.p-tomato { background: radial-gradient(closest-side, rgba(214,92,56,.35), rgba(200,80,44,.55) 78%, rgba(160,52,24,.75) 94%, rgba(160,52,24,0) 100%); }
.p-saffron { background: radial-gradient(closest-side, rgba(244,196,96,.45), rgba(232,164,58,.6) 78%, rgba(196,118,30,.75) 94%, rgba(196,118,30,0) 100%); }
.p-sage { background: radial-gradient(closest-side, rgba(127,163,122,.45), rgba(104,146,100,.6) 78%, rgba(70,112,70,.75) 94%, rgba(70,112,70,0) 100%); }
.p-slate { background: radial-gradient(closest-side, rgba(96,120,140,.18), rgba(96,120,140,.26) 70%, rgba(96,120,140,0) 100%); }
.p-sand { background: radial-gradient(closest-side, rgba(236,206,150,.3), rgba(232,196,130,.38) 80%, rgba(232,196,130,0) 100%); }
.p-green-mist { background: radial-gradient(closest-side, rgba(127,163,122,.22), rgba(127,163,122,.34) 75%, rgba(127,163,122,0) 100%); }
.p-blush { background: radial-gradient(closest-side, rgba(214,92,56,.16), rgba(214,92,56,.28) 76%, rgba(190,72,40,.38) 92%, rgba(190,72,40,0) 100%); }

/* Highlighted word: a brush stroke behind it */
.stroke { position: relative; display: inline-block; z-index: 0; }
.stroke::before {
  content: ""; position: absolute; z-index: -1; left: -0.2em; right: -0.28em; top: 0.36em; height: 0.76em;
  border-radius: 46% 54% 50% 50% / 60% 55% 45% 40%; mix-blend-mode: multiply; filter: url(#wet);
  background: radial-gradient(closest-side, rgba(224,166,60,.34), rgba(224,166,60,.5) 78%, rgba(224,166,60,.7) 94%, rgba(224,166,60,0) 100%);
}

/* ---------- Header ---------- */
.site-header { position: relative; z-index: 5; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 88px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 12px; font-family: var(--serif); font-weight: 700; font-size: 24px; color: var(--ink); text-decoration: none; }
.brand-mark { position: relative; width: 36px; height: 36px; flex: none; }
.brand-mark .wash { inset: 0; background: radial-gradient(closest-side, rgba(214,92,56,.6), rgba(196,74,40,.85) 78%, rgba(160,52,24,.95) 92%, rgba(160,52,24,0) 100%); }
.brand-mark .wash.yolk { background: radial-gradient(closest-side, rgba(240,182,76,.85), rgba(222,150,40,.95) 85%, rgba(222,150,40,0) 100%); }
.brand-mark .yolk { left: 26%; top: 24%; width: 42%; height: 42%; inset: auto; }
.nav { display: flex; gap: 32px; align-items: center; }
.nav a { color: var(--ink); text-decoration: none; font-size: 17px; }
.nav a:hover { color: var(--tomato); }
.nav .btn-primary, .nav .btn-primary:hover { color: #fffaf2; }
@media (max-width: 700px) { .nav a:not(.btn) { display: none; } .brand { font-size: 21px; } }

/* ---------- Buttons ---------- */
.btn { position: relative; z-index: 0; display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 14px 30px; font: 700 18px var(--sans); text-decoration: none; cursor: pointer; border: 0; background: none; }
.btn-primary { color: #fffaf2; }
.btn-primary::before {
  content: ""; position: absolute; z-index: -1; inset: -3px -8px; border-radius: 50px; filter: url(#wet2);
  background: radial-gradient(closest-side, rgba(190,72,40,.85), rgba(170,58,28,.95) 80%, rgba(140,44,18,1) 96%, rgba(140,44,18,0) 100%);
}
.btn-primary:hover { color: #fff; }
.btn-primary:hover::before { background: radial-gradient(closest-side, rgba(176,62,32,.92), rgba(156,50,22,1) 80%, rgba(126,38,14,1) 96%, rgba(126,38,14,0) 100%); }
.btn-ghost { color: var(--ink); border: 2px solid rgba(43,47,56,.7); border-radius: 44px 38px 46px 40px / 40px 46px 38px 44px; padding: 12px 26px; }
.btn-ghost:hover { color: var(--tomato-deep); border-color: var(--tomato-deep); }
.nav .btn { min-height: 44px; padding: 10px 22px; font-size: 16px; }
.btn:focus-visible, a:focus-visible, button:focus-visible, summary:focus-visible { outline: 3px solid #2f6b8a; outline-offset: 4px; border-radius: 8px; }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 24px 0 40px; }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; align-items: center; }
.hero .lead { font-size: clamp(19px, 1.7vw, 23px); line-height: 1.5; color: var(--muted); max-width: 30ch; margin-top: 28px; }
.hero .actions { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 32px; align-items: center; }
.hero .kicker { font-size: clamp(24px, 2.2vw, 30px); color: #4d7a57; transform: rotate(-3deg); transform-origin: left; margin-bottom: 14px; }
@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: minmax(0, 1fr); }
  .hero .actions .btn { flex: 1 1 100%; }
}

/* Painted plate: drawn on a fixed 640×720 stage, zoomed down on small screens */
.plate-stage { position: relative; width: 640px; height: 720px; margin: 0 auto; }
/* site.js sets the exact zoom; these are fallbacks if scripts are off */
.plate-stage { zoom: 0.82; }
@media (max-width: 900px) { .plate-stage { zoom: 0.9; } }
@media (max-width: 680px) { .plate-stage { zoom: 0.55; } }
.plate-stage .plate-note { position: absolute; left: 450px; top: 58px; font-size: 28px; line-height: 1.1; color: var(--tomato-deep); transform: rotate(4deg); }
.chat {
  position: absolute; left: 0; top: 470px; width: 410px; padding: 22px 24px; background: var(--card);
  border-radius: 6px 10px 8px 12px; box-shadow: 0 1px 0 rgba(43,47,56,.06), 0 18px 40px rgba(80,60,30,.14);
  transform: rotate(-2.2deg); font-size: 16px; line-height: 1.5; z-index: 2;
}
.chat-mobile { display: none; }
@media (max-width: 680px) {
  .plate-stage { height: 560px; }
  .plate-stage .chat { display: none; }
  .chat.chat-mobile { display: block; position: relative; left: auto; top: auto; width: auto; margin: -12px 4px 0; transform: rotate(-1.6deg); }
}
.bubble-user { display: flex; justify-content: flex-end; }
.bubble-user span { background: #f1e9da; padding: 8px 14px; border-radius: 16px 16px 4px 16px; }
.tool-chip { display: inline-block; margin-top: 14px; font: 12px ui-monospace, "SF Mono", Menlo, monospace; color: var(--sage-ink); background: #e8efe2; padding: 2px 8px; border-radius: 6px; }
.logged { margin-top: 10px; padding-top: 8px; border-top: 1px dashed #d8ccb6; display: grid; gap: 2px; font-size: 15px; color: var(--muted); }
.logged div { display: flex; justify-content: space-between; gap: 12px; }

/* ---------- Sections ---------- */
section { position: relative; padding: 64px 0; }
.section-head { position: relative; max-width: 680px; margin-bottom: 48px; }
.section-head p { font-size: 20px; color: var(--muted); margin-top: 14px; }
.steps { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 48px; }
.step p { color: var(--muted); margin: 0; }
.step h3 { margin: 22px 0 8px; }
.step-num { position: relative; width: 96px; height: 96px; display: grid; place-items: center; }
.step-num .wash { inset: 0; }
.step-num b { position: relative; font: 700 44px var(--serif); }
.step:nth-child(1) b { color: #6e2a14; }
.step:nth-child(2) b { color: #6e4210; }
.step:nth-child(3) b { color: #2f5234; }
@media (max-width: 860px) {
  .steps { grid-template-columns: 1fr; gap: 32px; }
  .step { display: grid; grid-template-columns: 64px 1fr; column-gap: 18px; }
  .step-num { width: 64px; height: 64px; grid-row: span 2; }
  .step-num b { font-size: 30px; }
  .step h3 { margin: 4px 0 4px; }
}

.features { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 72px; align-items: start; }
@media (max-width: 900px) { .features { grid-template-columns: 1fr; gap: 40px; } }
.feature-list { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 22px; font-size: 19px; }
.feature-list li { display: flex; gap: 18px; }
.feature-list .dot { position: relative; flex: none; width: 22px; height: 22px; margin-top: 4px; }
.feature-list .dot .wash { inset: 0; }

/* Painted week */
.week { position: relative; max-width: 520px; margin-top: 8px; }
.week .bars { display: flex; align-items: flex-end; justify-content: space-between; height: 180px; padding: 0 4px; }
.week .bar { width: 12%; border-radius: 45% 55% 30% 30%; mix-blend-mode: multiply; filter: url(#wet); }
.week .bar:nth-child(even) { filter: url(#wet2); border-radius: 55% 45% 30% 30%; }
.bar.t { background: linear-gradient(rgba(214,92,56,.35), rgba(200,80,44,.6)); }
.bar.s { background: linear-gradient(rgba(127,163,122,.4), rgba(90,134,88,.65)); }
.bar.y { background: linear-gradient(rgba(244,196,96,.45), rgba(222,150,40,.7)); }
.week .days { display: flex; justify-content: space-between; padding: 8px 4px 0; font-size: 14px; color: var(--faint); }
.week .days span { width: 12%; text-align: center; }
.week .goal-line { position: absolute; left: 0; right: 0; top: 28px; width: 100%; height: 20px; }
.week .goal { position: absolute; right: -4px; top: -10px; font-size: 24px; color: #4d7a57; }

/* FAQ */
.faq { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 56px; }
@media (max-width: 860px) { .faq { grid-template-columns: 1fr; gap: 16px; } }
.faq-list { border-top: 1.5px solid var(--rule); }
details { border-bottom: 1.5px solid var(--rule); padding: 20px 0; }
details summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 16px; font: 650 clamp(19px, 1.8vw, 23px)/1.3 var(--serif); }
details summary::-webkit-details-marker { display: none; }
details summary::after { content: "+"; color: var(--tomato); font-size: 26px; line-height: 1; }
details[open] summary::after { content: "–"; }
details p { margin: 12px 0 0; color: var(--muted); max-width: 62ch; }

/* CTA */
.cta { text-align: center; padding: 96px 0; }
.cta h2, .cta p, .cta .copy { position: relative; }
.cta p { font-size: 20px; color: var(--muted); margin: 14px 0 30px; }
.copy { display: inline-flex; align-items: stretch; max-width: 100%; background: var(--card); border-radius: 10px 14px 12px 8px; box-shadow: 0 12px 30px rgba(80,60,30,.12); overflow: hidden; text-align: left; }
.copy code { flex: 1; padding: 16px 20px; font: 16px ui-monospace, "SF Mono", Menlo, monospace; overflow-x: auto; white-space: nowrap; color: var(--ink); }
.copy button { border: 0; min-width: 88px; padding: 0 22px; background: var(--tomato); color: #fffaf2; font: 700 16px var(--sans); cursor: pointer; }
.copy button:hover { background: var(--tomato-deep); }
@media (max-width: 560px) { .copy { display: flex; flex-direction: column; } .copy button { min-height: 48px; } }

/* ---------- Docs / legal pages ---------- */
.doc { position: relative; padding: 32px 0 80px; }
.doc .wrap { max-width: 800px; }
.doc h1 { font-size: clamp(42px, 6vw, 64px); margin-bottom: 16px; }
.doc h2 { font-size: clamp(26px, 3vw, 32px); margin-top: 48px; }
.doc h3 { font-size: 22px; margin-top: 28px; }
.doc ul, .doc ol { padding-left: 22px; }
.doc li { margin-bottom: 8px; }
.doc table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 16px; background: rgba(255,253,248,.6); }
.doc th, .doc td { text-align: left; padding: 12px; border-bottom: 1.5px solid var(--rule); vertical-align: top; }
.doc th { font-family: var(--serif); font-weight: 650; }
.table-scroll { overflow-x: auto; }
.note { position: relative; background: rgba(255,253,248,.75); border-radius: 6px 10px 8px 12px; padding: 16px 18px; font-size: 16px; box-shadow: 0 8px 22px rgba(80,60,30,.08); }
.tabs { display: flex; gap: 10px; margin: 24px 0 8px; flex-wrap: wrap; }
.tabs a { padding: 8px 18px; min-height: 44px; display: inline-flex; align-items: center; border: 1.5px solid rgba(43,47,56,.5); border-radius: 30px 26px 32px 28px / 26px 32px 26px 30px; text-decoration: none; color: var(--ink); font-size: 16px; }
.tabs a:hover { border-color: var(--tomato-deep); color: var(--tomato-deep); }
.doc .copy { margin: 8px 0 8px; }

/* ---------- Footer ---------- */
.site-footer { position: relative; border-top: 1.5px solid rgba(43,47,56,.2); padding: 36px 0 48px; font-size: 16px; color: #5a5e66; }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.site-footer nav { display: flex; gap: 24px; flex-wrap: wrap; }
.site-footer a { color: #5a5e66; }

@media (prefers-reduced-transparency: reduce) { body::after { display: none; } }

/* App comparison on /connect */
.apps { display: grid; gap: 14px; margin: 16px 0 8px; }
@media (min-width: 760px) { .apps { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.app-card { background: rgba(255,253,248,.8); border-radius: 8px 12px 10px 14px; padding: 18px 20px; box-shadow: 0 8px 22px rgba(80,60,30,.08); }
.app-card h3 { margin: 0 0 8px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 22px; }
.app-card p { margin: 0; font-size: 16px; color: var(--muted); }
.badge { font: 700 13px var(--sans); letter-spacing: .02em; padding: 3px 10px; border-radius: 20px; background: #efe6d6; color: var(--ink); }
.badge.ok { background: #e3eddd; color: var(--sage-ink); }

/* Short symbols in painted step markers (e.g. "kg", "28") */
.step-num b { font-size: 34px; }
@media (max-width: 860px) { .step-num b { font-size: 24px; } }
