/* chugli.app — same look as the app: warm off-white, white cards with hairlines, near-black ink, flat colour
   only where it means something. No gradients, no blobs. Tokens match packages/shared/src/theme.ts. */

@font-face { font-family: "Jakarta"; src: url("/fonts/PlusJakartaSans_500Medium.ttf") format("truetype"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Jakarta"; src: url("/fonts/PlusJakartaSans_700Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Jakarta"; src: url("/fonts/PlusJakartaSans_800ExtraBold.ttf") format("truetype"); font-weight: 800; font-display: swap; }

:root {
  --bg: #f5f4f0;
  --surface: #ffffff;
  --surface2: #ecebe5;
  --hair: rgba(16, 19, 31, 0.09);
  --text: #14161c;
  --text2: #3f424c;
  --text3: #62656f;
  --ink: #14161c;
  --on-ink: #ffffff;
  --track: #e7e6e0;

  --orange: #ff8a3d; --orange-tint: #fff0e6; --orange-text: #a8430a;
  --green: #2bc48a;  --green-tint: #e3f7ee;  --green-text: #13744c;
  --blue: #4d7cfe;   --blue-tint: #e9efff;   --blue-text: #2648b8;
  --red: #f2476a;    --red-tint: #ffe8ee;    --red-text: #a8213d;
  --purple: #a55cf5; --purple-tint: #f3e9ff; --purple-text: #6e2dba;
  --yellow: #ffc53d; --yellow-tint: #fff6db; --yellow-text: #8a5a00;

  --radius: 22px;
  --wrap: 1080px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1014;
    --surface: #1a1b21;
    --surface2: #24252c;
    --hair: rgba(255, 255, 255, 0.09);
    --text: #f3f3f5;
    --text2: #c4c6ce;
    --text3: #9a9da8;
    --ink: #f3f3f5;
    --on-ink: #14161c;
    --track: #2b2c33;
    --orange-tint: rgba(255, 138, 61, 0.16); --orange-text: #ffb385;
    --green-tint: rgba(43, 196, 138, 0.16);  --green-text: #7be6bd;
    --blue-tint: rgba(77, 124, 254, 0.18);   --blue-text: #a6bdff;
    --red-tint: rgba(242, 71, 106, 0.18);    --red-text: #ff9eb1;
    --purple-tint: rgba(165, 92, 245, 0.2);  --purple-text: #d3b0ff;
    --yellow-tint: rgba(255, 197, 61, 0.16); --yellow-text: #ffd98a;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text2);
  font-family: "Jakarta", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-weight: 500;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--text); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 8px; }
img { max-width: 100%; display: block; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }

/* ---------- header ---------- */
.site-header { padding: 22px 0; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.wordmark {
  display: inline-flex; align-items: baseline; gap: 3px;
  font-weight: 800; font-size: 28px; letter-spacing: -1px; color: var(--text); text-decoration: none;
}
.wordmark .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--orange); display: inline-block; transform: translateY(-2px); }
.nav { display: flex; align-items: center; gap: 22px; }
.nav a { font-weight: 700; font-size: 15px; color: var(--text2); text-decoration: none; }
.nav a:hover { color: var(--text); }
.nav a.btn-ink, .nav a.btn-ink:hover { color: var(--on-ink); }
@media (max-width: 640px) { .nav .hide-sm { display: none; } }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 54px; padding: 0 24px; border-radius: 999px;
  font: inherit; font-weight: 700; font-size: 16px; text-decoration: none; cursor: pointer;
  border: 1px solid transparent;
}
.btn-ink { background: var(--ink); color: var(--on-ink); }
.btn-ink:hover { opacity: 0.88; text-decoration: none; }
.btn-line { background: var(--surface); color: var(--text); border-color: var(--hair); }
.btn-sm { height: 42px; padding: 0 18px; font-size: 14.5px; }
.store-row { display: flex; flex-wrap: wrap; gap: 10px; }
.store {
  display: inline-flex; align-items: center; gap: 12px; height: 58px; padding: 0 20px 0 16px;
  border-radius: 18px; background: var(--ink); color: var(--on-ink); text-decoration: none;
}
.store svg { width: 26px; height: 26px; flex: none; }
.store small { display: block; font-size: 11.5px; opacity: 0.7; line-height: 1.2; font-weight: 700; }
.store b { display: block; font-size: 17px; line-height: 1.2; font-weight: 800; letter-spacing: -0.2px; }
.store[aria-disabled="true"] { cursor: default; }
.note { font-size: 14px; color: var(--text3); margin: 12px 0 0; }

/* ---------- type ---------- */
h1, h2, h3 { color: var(--text); font-weight: 800; margin: 0; }
h1 { font-size: clamp(40px, 6.4vw, 68px); line-height: 1.02; letter-spacing: -2.2px; }
h2 { font-size: clamp(30px, 4vw, 42px); line-height: 1.08; letter-spacing: -1.2px; }
h3 { font-size: 19px; line-height: 1.3; letter-spacing: -0.3px; }
.lede { font-size: 20px; line-height: 1.55; color: var(--text2); max-width: 30em; }
.eyebrow { font-size: 13px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text3); margin: 0 0 12px; }

/* ---------- hero ---------- */
.hero { padding: 40px 0 72px; }
.hero .wrap { display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; }
.hero .lede { margin: 22px 0 30px; }
@media (max-width: 880px) { .hero .wrap { grid-template-columns: 1fr; } .hero { padding-top: 16px; } }

.stack { position: relative; height: 470px; }
.chip-card {
  position: absolute; background: var(--surface); border: 1px solid var(--hair); border-radius: var(--radius);
  padding: 16px; width: min(330px, 86%); box-shadow: 0 1px 0 rgba(16, 19, 31, 0.03);
}
.chip-card .row { display: flex; gap: 13px; align-items: center; }
.tile { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; font-size: 25px; flex: none; }
.title { font-weight: 800; color: var(--text); font-size: 16.5px; letter-spacing: -0.2px; line-height: 1.25; }
.meta { font-size: 13.5px; color: var(--text3); font-weight: 700; }
.meta i { font-style: normal; margin: 0 6px; opacity: 0.6; }
.bar { height: 6px; border-radius: 99px; background: var(--track); flex: 1; overflow: hidden; }
.bar span { display: block; height: 100%; border-radius: 99px; }
.progress { display: flex; align-items: center; gap: 10px; margin-top: 14px; }
.progress .meta { color: var(--text2); }
.tag { font-size: 11.5px; font-weight: 800; padding: 4px 9px; border-radius: 99px; margin-left: auto; align-self: flex-start; white-space: nowrap; flex: none; }
.last-call { border: 2px solid var(--orange); }

.bubbles { position: absolute; right: 0; bottom: 0; width: min(300px, 80%); display: grid; gap: 8px; }
.bubble { background: var(--surface); border: 1px solid var(--hair); border-radius: 19px 19px 19px 6px; padding: 9px 13px; font-size: 14.5px; color: var(--text); }
.bubble b { display: block; font-size: 12px; font-weight: 800; }
.bubble.mine { background: var(--ink); color: var(--on-ink); border-color: transparent; border-radius: 19px 19px 6px 19px; justify-self: end; }
.reacts { display: flex; gap: 6px; }
.react { font-size: 12.5px; font-weight: 800; padding: 4px 9px; border-radius: 99px; display: inline-flex; align-items: center; gap: 4px; }

/* ---------- sections ---------- */
section { padding: 72px 0; }
section.alt { background: var(--surface); border-top: 1px solid var(--hair); border-bottom: 1px solid var(--hair); }
.section-head { max-width: 640px; margin-bottom: 36px; }
.section-head p { margin: 14px 0 0; font-size: 18px; }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
@media (max-width: 880px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } }

.card { background: var(--surface); border: 1px solid var(--hair); border-radius: var(--radius); padding: 24px; }
section.alt .card { background: var(--bg); }
.card p { margin: 8px 0 0; font-size: 16px; }
.step { font-size: 13px; font-weight: 800; color: var(--text3); margin-bottom: 18px; display: block; }
.icon {
  width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; font-size: 22px; margin-bottom: 16px;
}

.safety-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.safety-list li { display: flex; gap: 14px; align-items: flex-start; background: var(--surface); border: 1px solid var(--hair); border-radius: 18px; padding: 16px 18px; }
.safety-list .tick { width: 26px; height: 26px; border-radius: 50%; background: var(--green-tint); color: var(--green-text); display: grid; place-items: center; flex: none; font-weight: 800; font-size: 14px; margin-top: 1px; }
.safety-list strong { color: var(--text); }

.cta { text-align: center; padding: 88px 0; }
.cta h2 { max-width: 14em; margin: 0 auto; }
.cta p { margin: 16px auto 28px; max-width: 32em; font-size: 18px; }
.cta .store-row { justify-content: center; }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--hair); padding: 36px 0 48px; font-size: 14.5px; color: var(--text3); }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 18px 32px; align-items: center; justify-content: space-between; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.site-footer a { color: var(--text2); text-decoration: none; font-weight: 700; }
.site-footer a:hover { color: var(--text); text-decoration: underline; }

/* ---------- legal / document pages ---------- */
.doc { padding: 24px 0 80px; }
.doc .wrap { max-width: 760px; }
.doc h1 { font-size: clamp(36px, 5vw, 48px); letter-spacing: -1.4px; }
.doc .updated { margin: 12px 0 0; font-size: 14.5px; color: var(--text3); font-weight: 700; }
.doc .summary { background: var(--surface); border: 1px solid var(--hair); border-radius: var(--radius); padding: 22px 24px; margin: 28px 0 8px; }
.doc .summary h2 { font-size: 18px; letter-spacing: -0.2px; margin-bottom: 6px; }
.doc .summary ul { margin: 8px 0 0; padding-left: 20px; }
.doc .summary li { margin: 6px 0; }
.doc h2 { font-size: 24px; letter-spacing: -0.5px; margin: 44px 0 10px; }
.doc h3 { font-size: 18px; margin: 26px 0 6px; }
.doc p, .doc li { font-size: 16.5px; }
.doc ul { padding-left: 22px; }
.doc li { margin: 6px 0; }
.doc strong { color: var(--text); }
.doc table { width: 100%; border-collapse: collapse; margin: 14px 0; font-size: 15px; background: var(--surface); border: 1px solid var(--hair); border-radius: 16px; overflow: hidden; }
.doc th, .doc td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--hair); vertical-align: top; }
.doc th { color: var(--text); font-weight: 800; background: var(--surface2); }
.doc tr:last-child td { border-bottom: 0; }
.doc .toc { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0 0; padding: 0; list-style: none; }
.doc .toc a { display: inline-block; font-size: 14px; font-weight: 700; padding: 6px 12px; border-radius: 99px; background: var(--surface); border: 1px solid var(--hair); text-decoration: none; color: var(--text2); }

/* ---------- small centred pages (share link, 404) ---------- */
.center-page { min-height: 70vh; display: grid; place-items: center; padding: 24px 0 64px; }
.center-page .panel { max-width: 520px; text-align: center; }
.center-page .panel .app-icon { width: 96px; height: 96px; border-radius: 22px; margin: 0 auto 22px; }
.center-page h1 { font-size: clamp(34px, 5vw, 44px); letter-spacing: -1.3px; }
.center-page p { margin: 14px 0 0; font-size: 18px; }
.center-page .store-row { justify-content: center; margin-top: 28px; }
.steps-inline { text-align: left; margin: 26px auto 0; display: grid; gap: 10px; max-width: 420px; }
.steps-inline div { display: flex; gap: 12px; align-items: flex-start; background: var(--surface); border: 1px solid var(--hair); border-radius: 16px; padding: 13px 15px; font-size: 15.5px; }
.steps-inline span { width: 24px; height: 24px; border-radius: 50%; background: var(--ink); color: var(--on-ink); font-size: 13px; font-weight: 800; display: grid; place-items: center; flex: none; margin-top: 1px; }
