/* Declarant AI: public landing + privacy pages (step 53b).
   Tokens come from the Mini App (static/css/app.css, body[data-tg="light"/"dark"]): Inter, the accent
   #b68235 ramp, bg #f3f2f2 / text #201f1d / hint #605d5d. One change: the filled button uses a slightly
   darker accent (#93641d) than the app's #a06f24 so white text passes WCAG AA (5.2:1 instead of 4.4:1).
   Mobile-first, one column; two columns from 900px. No JS. */

:root {
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --bg: #f3f2f2;
  --surface: #ffffff;
  --surface-2: #eae9e9;
  --text: #201f1d;
  --hint: #605d5d;
  --muted: #6f6b6b;
  --divider: rgba(32, 31, 29, .12);
  --accent: #b68235;
  --accent-100: #fff3e4;
  --accent-200: #f8e2c3;
  --accent-400: #e1ad66;
  --accent-700: #7d5411;
  --accent-800: #5a3b0a;
  --btn: #93641d;
  --btn-hover: #85591a;
  --btn-text: #ffffff;
  --ok: #2f6b3a;
  --shadow: 0 1px 2px rgba(45, 43, 43, .06), 0 8px 24px rgba(45, 43, 43, .08);
  --shadow-lg: 0 2px 4px rgba(45, 43, 43, .05), 0 18px 48px rgba(90, 59, 10, .14);
  --r-sm: 6px;
  --r-md: 8px;
  --r-lg: 14px;
  --wrap: 1120px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1b1a1a;
    --surface: #262424;
    --surface-2: #2d2b2b;
    --text: #f3f2f2;
    --hint: #bab6b6;
    --muted: #a8a3a3;
    --divider: rgba(243, 242, 242, .12);
    --accent: #e1ad66;
    --accent-100: rgba(225, 173, 102, .12);
    --accent-200: rgba(225, 173, 102, .22);
    --accent-400: #a06f24;
    --accent-700: #e1ad66;
    --accent-800: #facb8d;
    --btn: #e1ad66;
    --btn-hover: #ecbd7c;
    --btn-text: #201f1d;
    --ok: #8fd19e;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .3);
    --shadow-lg: 0 2px 4px rgba(0, 0, 0, .3), 0 18px 48px rgba(0, 0, 0, .45);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--accent-700); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { margin: 0; font-weight: 700; letter-spacing: -.025em; line-height: 1.15; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; white-space: nowrap; }

.skip { position: absolute; left: 16px; top: -60px; z-index: 10; padding: 10px 14px; background: var(--surface); border-radius: var(--r-md); box-shadow: var(--shadow); }
.skip:focus { top: 12px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
@media (min-width: 720px) { .wrap { padding: 0 32px; } }

.ico { flex: none; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- header ---------- */
.top { position: relative; z-index: 2; }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; border-radius: var(--r-md); }
.logo-mark { width: 34px; height: 34px; }
.logo-mark .bg { fill: var(--btn); }
.logo-mark .bar { fill: var(--btn-text); }
.wm { display: inline-flex; align-items: baseline; gap: 5px; font-size: 18px; font-weight: 700; letter-spacing: -.02em; line-height: 1; }
.wm .ai { color: var(--accent-700); }
.lang-link {
  display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 12px;
  border: 1px solid var(--divider); border-radius: var(--r-md); color: var(--text); font-size: 14px; font-weight: 500; text-decoration: none;
}
.lang-link:hover { background: var(--accent-100); text-decoration: none; }
.lang-link .ico { width: 16px; height: 16px; color: var(--hint); }

/* ---------- hero ---------- */
.hero { position: relative; padding: 20px 0 64px; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -40% -30% auto auto; width: 820px; height: 820px; z-index: -1; pointer-events: none;
  background: radial-gradient(closest-side, var(--accent-200), transparent 70%); opacity: .9;
}
.hero-grid { display: grid; gap: 44px; align-items: center; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--divider); color: var(--hint); font-size: 13px; font-weight: 500; line-height: 1.3;
}
.chip .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px var(--accent-200); }
.hero h1 { margin-top: 18px; font-size: clamp(2.05rem, 1.35rem + 3.6vw, 3.6rem); letter-spacing: -.035em; line-height: 1.07; }
.hero h1 em { font-style: normal; color: var(--accent-700); }
.lead { margin-top: 18px; max-width: 34em; font-size: 1.08rem; line-height: 1.6; color: var(--hint); }
@media (min-width: 720px) { .lead { font-size: 1.18rem; } }
.who { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 6px 16px; color: var(--hint); font-size: 14px; }
.who span { display: inline-flex; align-items: center; gap: 6px; }
.who .ico { width: 16px; height: 16px; color: var(--ok); stroke-width: 2.2; }

.cta { margin-top: 28px; display: flex; flex-direction: column; gap: 12px; max-width: 420px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 54px; padding: 0 22px;
  border-radius: var(--r-md); font-size: 16px; font-weight: 600; letter-spacing: -.005em; line-height: 1.2; text-align: center; text-decoration: none;
  transition: background-color .15s, box-shadow .15s, transform .15s;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--btn); color: var(--btn-text); box-shadow: 0 6px 18px -6px rgba(147, 100, 29, .55); }
.btn-primary:hover { background: var(--btn-hover); }
.btn-ghost { border: 1.5px solid var(--accent); color: var(--accent-700); background: transparent; }
.btn-ghost:hover { background: var(--accent-100); }
.btn .ico { width: 19px; height: 19px; }
.cta-note { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; line-height: 1.5; color: var(--hint); }
.cta-note .ico { width: 16px; height: 16px; margin-top: 3px; color: var(--accent-700); }
.chan-link { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 500; }
.chan-link .ico { width: 16px; height: 16px; }

/* hero visual: a small result card in the app's style (sample) */
.peek {
  position: relative; width: 100%; max-width: 420px; justify-self: center;
  background: var(--surface); border: 1px solid var(--divider); border-radius: 18px; box-shadow: var(--shadow-lg); padding: 22px 22px 18px;
}
.peek::after {
  content: ""; position: absolute; inset: auto 16px -10px 16px; height: 22px; z-index: -1; border-radius: 0 0 18px 18px;
  background: var(--surface); border: 1px solid var(--divider); opacity: .6;
}
.peek-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.peek-item { font-size: 14px; font-weight: 600; }
.peek-item small { display: block; font-size: 13px; font-weight: 400; color: var(--hint); }
.tag { flex: none; padding: 3px 8px; border-radius: 999px; background: var(--accent-100); color: var(--accent-700); font-size: 12px; font-weight: 600; letter-spacing: .02em; }
.peek-kick { margin-top: 18px; font-size: 13px; color: var(--hint); }
.peek-sum { margin-top: 2px; font-size: 30px; font-weight: 700; letter-spacing: -.03em; line-height: 1.15; }
.peek-sum span { font-size: 17px; font-weight: 600; color: var(--hint); letter-spacing: -.01em; }
.peek-why { margin-top: 4px; font-size: 13px; color: var(--hint); }
.peek-rows { margin: 16px 0 0; padding: 0; list-style: none; border-top: 1px solid var(--divider); }
.peek-rows li { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--divider); font-size: 14px; }
.peek-rows li:last-child { border-bottom: 0; }
.peek-rows .ico { width: 18px; height: 18px; color: var(--accent-700); }
.peek-rows b { font-weight: 600; white-space: nowrap; }
.peek-rows .r { margin-left: auto; color: var(--hint); text-align: right; }
.peek-rows .save { color: var(--ok); font-weight: 600; }
.peek-more { display: inline-flex; margin-top: 8px; font-size: 13px; font-weight: 500; }

@media (min-width: 900px) {
  .hero { padding: 40px 0 104px; }
  .hero-grid { grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 64px; }
  .peek { justify-self: end; transform: rotate(1.2deg); }
}

/* ---------- sections ---------- */
.sec { padding: 64px 0; }
@media (min-width: 900px) { .sec { padding: 96px 0; } }
.sec-alt { background: var(--surface); border-top: 1px solid var(--divider); border-bottom: 1px solid var(--divider); }
.eyebrow { display: block; margin-bottom: 10px; color: var(--accent-700); font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.sec h2 { font-size: clamp(1.65rem, 1.2rem + 2vw, 2.4rem); }
.sec-lead { margin-top: 12px; max-width: 40em; color: var(--hint); font-size: 1.04rem; }
.sec-head { margin-bottom: 36px; }

/* what you get */
.cards { display: grid; gap: 14px; }
@media (min-width: 720px) { .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; } }
.card {
  position: relative; padding: 24px; border-radius: var(--r-lg); background: var(--bg); border: 1px solid var(--divider);
}
.card-ico {
  display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 11px;
  background: var(--accent-100); color: var(--accent-700); border: 1px solid var(--accent-200);
}
.card-ico .ico { width: 22px; height: 22px; }
.card h3 { margin-top: 16px; font-size: 1.15rem; letter-spacing: -.015em; }
.card p { margin-top: 8px; color: var(--hint); font-size: 15px; line-height: 1.6; }
.card .n { position: absolute; top: 22px; right: 24px; color: var(--muted); font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }

/* how it works */
.steps { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; counter-reset: step; }
@media (min-width: 900px) { .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; } }
.step { position: relative; padding: 24px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--divider); }
.step::before {
  counter-increment: step; content: counter(step);
  display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%;
  background: var(--btn); color: var(--btn-text); font-weight: 700; font-size: 15px;
}
.step h3 { margin-top: 16px; font-size: 1.1rem; letter-spacing: -.015em; }
.step p { margin-top: 8px; color: var(--hint); font-size: 15px; }
.step .eg { margin-top: 12px; padding: 10px 12px; border-radius: var(--r-sm); background: var(--bg); border: 1px dashed var(--divider); color: var(--text); font-size: 14px; }

/* example estimate */
.ex { display: grid; gap: 20px; align-items: start; }
@media (min-width: 900px) { .ex { grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 48px; } }
.ex-note { margin-top: 16px; display: flex; gap: 10px; padding: 14px 16px; border-radius: var(--r-md); background: var(--accent-100); border: 1px solid var(--accent-200); color: var(--text); font-size: 14px; line-height: 1.55; }
.ex-note .ico { width: 18px; height: 18px; margin-top: 2px; color: var(--accent-700); }
.ex-card { background: var(--surface); border: 1px solid var(--divider); border-radius: 16px; box-shadow: var(--shadow); overflow: hidden; }
.ex-in { padding: 18px 20px; border-bottom: 1px solid var(--divider); display: flex; flex-direction: column; gap: 10px; }
.ex-in-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.ex-in h3 { font-size: 1.05rem; letter-spacing: -.01em; }
.ex-meta { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.ex-meta li { padding: 3px 10px; border-radius: 999px; background: var(--bg); border: 1px solid var(--divider); color: var(--hint); font-size: 13px; }
.ex-block { padding: 18px 20px; border-bottom: 1px solid var(--divider); }
.ex-block:last-child { border-bottom: 0; }
.ex-label { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; color: var(--hint); font-size: 13px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.ex-label .ico { width: 16px; height: 16px; color: var(--accent-700); }
.codes { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.codes li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border-radius: var(--r-md); background: var(--bg); font-size: 14px; }
.codes li b { font-weight: 600; }
.codes .r { color: var(--hint); white-space: nowrap; }
.codes .main { box-shadow: inset 3px 0 0 var(--accent); }
.ex-q { margin-top: 10px; font-size: 13px; color: var(--hint); }
.pay { width: 100%; border-collapse: collapse; font-size: 14px; }
.pay th, .pay td { padding: 9px 0; text-align: right; border-bottom: 1px solid var(--divider); font-variant-numeric: tabular-nums; white-space: nowrap; }
.pay th:first-child, .pay td:first-child { text-align: left; white-space: normal; padding-right: 8px; }
.pay td + td, .pay th + th { padding-left: 10px; }
.pay thead th { color: var(--hint); font-size: 12px; font-weight: 600; padding-top: 0; }
.pay tfoot td { border-bottom: 0; padding-top: 12px; font-weight: 700; font-size: 15px; }
.total { margin-top: 14px; padding: 14px 16px; border-radius: var(--r-md); background: var(--bg); }
.total small { display: block; color: var(--hint); font-size: 13px; }
.total b { display: block; white-space: normal; margin-top: 2px; font-size: clamp(1.25rem, 1rem + 1.2vw, 1.6rem); letter-spacing: -.02em; line-height: 1.25; }
.total p { margin-top: 4px; color: var(--hint); font-size: 13px; }
.save-box { display: flex; gap: 12px; }
.save-box .ico { width: 20px; height: 20px; margin-top: 2px; color: var(--ok); }
.save-box b { font-weight: 600; }
.save-box p { font-size: 14px; color: var(--hint); }
.save-box p + p { margin-top: 4px; }
.save-box .amt { color: var(--ok); font-weight: 600; }
.ex-docs { margin: 0; padding: 0 0 0 20px; font-size: 14px; color: var(--hint); }
.ex-docs li + li { margin-top: 4px; }
.src { font-size: 12px; color: var(--muted); }
@media (max-width: 380px) {
  .ex-in, .ex-block { padding-left: 16px; padding-right: 16px; }
  .pay { font-size: 13px; }
  .pay td + td, .pay th + th { padding-left: 6px; }
}

/* honest notes */
.notes { display: grid; gap: 14px; }
@media (min-width: 720px) { .notes { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; } }
.note { display: flex; gap: 14px; padding: 20px; border-radius: var(--r-lg); background: var(--bg); border: 1px solid var(--divider); }
.note .card-ico { width: 40px; height: 40px; border-radius: 10px; flex: none; }
.note .card-ico .ico { width: 20px; height: 20px; }
@media (max-width: 479px) { .note { flex-direction: column; gap: 12px; } }
.note h3 { font-size: 1.05rem; letter-spacing: -.01em; }
.note p { margin-top: 6px; color: var(--hint); font-size: 15px; }

/* FAQ */
.faq { max-width: 820px; }
.faq details { border-bottom: 1px solid var(--divider); }
.faq details:first-of-type { border-top: 1px solid var(--divider); }
.faq summary {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 0; cursor: pointer; list-style: none;
  font-size: 1.05rem; font-weight: 600; letter-spacing: -.01em; line-height: 1.4;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--accent-100);
  background-image: linear-gradient(var(--accent-700), var(--accent-700)), linear-gradient(var(--accent-700), var(--accent-700));
  background-size: 12px 2px, 2px 12px; background-position: center; background-repeat: no-repeat;
  transition: transform .2s;
}
.faq details[open] summary::after { background-size: 12px 2px, 0 0; transform: rotate(180deg); }
.faq summary:hover { color: var(--accent-700); }
.faq .a { padding: 0 0 22px; color: var(--hint); max-width: 44em; }
.faq .a p + p { margin-top: 10px; }

/* closing CTA */
.final { padding: 56px 0 72px; }
.final-box {
  position: relative; overflow: hidden; display: grid; gap: 24px; padding: 30px 18px; border-radius: 20px;
  background: var(--accent-800); color: #fff8ee;
}
.final-box::before {
  content: ""; position: absolute; right: -120px; top: -160px; width: 420px; height: 420px; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(225, 173, 102, .45), transparent);
}
.final-box > * { position: relative; }
.final-box h2 { font-size: clamp(1.55rem, 1.2rem + 1.6vw, 2.2rem); color: #fff8ee; }
.final-box p { margin-top: 10px; color: rgba(255, 248, 238, .78); }
.final-box .cta { margin-top: 0; }
.final-box .btn { padding: 0 14px; }
@media (max-width: 479px) {
  .final .wrap { padding: 0 12px; }
  .final-box { padding: 28px 16px; }
  .final-box > div:first-child { padding: 0 4px; }
  .final-box .btn { font-size: 15px; gap: 8px; }
}
.final-box .btn-primary { background: #fff8ee; color: var(--accent-800); box-shadow: none; }
.final-box .btn-primary:hover { background: #ffffff; }
.final-box .btn-ghost { border-color: rgba(255, 248, 238, .45); color: #fff8ee; }
.final-box .btn-ghost:hover { background: rgba(255, 248, 238, .08); }
@media (prefers-color-scheme: dark) {
  .final-box { background: #3a2a12; border: 1px solid rgba(225, 173, 102, .25); }
  .final-box .btn-primary { color: #3a2a12; }
}
@media (min-width: 900px) {
  .final { padding: 96px 0; }
  .final-box { grid-template-columns: minmax(0, 1fr) auto; align-items: center; padding: 48px 56px; gap: 48px; }
  .final-box .cta { min-width: 340px; }
}

/* footer */
.foot { padding: 36px 0 44px; border-top: 1px solid var(--divider); color: var(--hint); font-size: 14px; }
.foot-grid { display: grid; gap: 20px; }
.foot .brand .wm { font-size: 16px; }
.foot .logo-mark { width: 28px; height: 28px; }
.foot-note { margin-top: 10px; max-width: 34em; }
.foot-links { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 0; padding: 0; list-style: none; }
.foot-links a { color: var(--text); text-decoration: none; font-weight: 500; }
.foot-links a:hover { color: var(--accent-700); text-decoration: underline; }
.copy { margin-top: 4px; font-size: 13px; color: var(--muted); }
@media (min-width: 900px) {
  .foot-grid { grid-template-columns: 1fr auto; align-items: start; }
  .foot-right { text-align: right; }
  .foot-links { justify-content: flex-end; }
}

/* ---------- privacy page ---------- */
.doc { padding: 24px 0 72px; }
.doc .wrap { max-width: 780px; }
.back { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 500; text-decoration: none; }
.back:hover { text-decoration: underline; }
.back .ico { width: 16px; height: 16px; }
.doc h1 { margin-top: 20px; font-size: clamp(1.7rem, 1.3rem + 2.2vw, 2.7rem); overflow-wrap: break-word; hyphens: auto; letter-spacing: -.03em; }
.doc .meta { margin-top: 10px; color: var(--muted); font-size: 14px; }
.summary { margin-top: 28px; padding: 20px 22px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--divider); }
.summary h2 { font-size: 1rem; letter-spacing: -.005em; }
.summary ul { margin: 12px 0 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.summary li { display: flex; gap: 10px; font-size: 15px; line-height: 1.5; }
.summary li .ico { width: 18px; height: 18px; margin-top: 2px; color: var(--ok); stroke-width: 2.2; }
.doc section { margin-top: 40px; }
.doc section h2 { font-size: 1.35rem; letter-spacing: -.02em; }
.doc section p, .doc section li { color: var(--hint); }
.doc section p { margin-top: 12px; }
.doc section ul, .doc section ol { margin: 12px 0 0; padding-left: 22px; }
.doc section li + li { margin-top: 8px; }
.doc section strong { color: var(--text); font-weight: 600; }
.ph {
  padding: 1px 6px; border-radius: 4px; background: #fff1b8; color: #5a3b0a; font-weight: 600;
  outline: 1px dashed #c99a2e; outline-offset: 0;
}
@media (prefers-color-scheme: dark) { .ph { background: #4a3a10; color: #ffe08a; outline-color: #b08a2a; } }
