/*
 * Shared stylesheet for the public commercial surfaces served off the
 * dashboard origin: /pricing, /terms, /privacy, /support.
 *
 * Two layouts share one set of tokens:
 *   .wrap    landing layout with a topbar and cards (pricing, support)
 *   article  long-form document layout (terms, privacy)
 */

:root {
  color-scheme: light;
  --ground: #f6f2ea;
  --surface: #fffdf8;
  --primary: #211d18;
  --muted: #756d64;
  --faint: #a39a8e;
  --hairline: #ddd6ca;
  --accent: #e2ad38;
  --accent-text: #8d6100;
  --notice-border: #dec991;
  --notice-ground: #fff8e8;
  --notice-text: #5e4b22;
  --th-ground: #f4eee3;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 12% -8%, rgb(255 214 183 / 0.65), transparent 30rem),
    radial-gradient(circle at 91% 4%, rgb(248 223 151 / 0.45), transparent 26rem),
    var(--ground);
  color: var(--primary);
  font: 16px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* ---------- shared chrome ---------- */

.wrap {
  width: min(820px, calc(100% - 40px));
  margin: 0 auto;
  padding: 32px 0 56px;
}

.wrap.document { width: min(980px, calc(100% - 40px)); }

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 70px;
}

.brand {
  font-family: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1.2rem;
  font-weight: 750;
  letter-spacing: -0.04em;
  color: var(--primary);
  text-decoration: none;
}

.topbar a:not(.brand) {
  padding: 9px 13px;
  border: 1px solid var(--hairline);
  border-radius: 12px;
  background: rgb(255 253 248 / 0.6);
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent-text);
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-family: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: clamp(2.6rem, 8vw, 4.6rem);
  font-weight: 730;
  letter-spacing: -0.065em;
  line-height: 0.95;
}

.lede {
  max-width: 37rem;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 1.08rem;
}

h2 {
  margin: 0 0 18px;
  font-family: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

h3 { margin: 0; font-size: 1.04rem; font-weight: 680; letter-spacing: -0.015em; }
p { margin: 0 0 13px; }
p:last-child { margin-bottom: 0; }
ul { margin: 0 0 13px; padding-left: 1.25rem; }
li { margin: 6px 0; }
.quiet { color: var(--muted); }
.meta { color: var(--muted); font-size: 0.9rem; }
a { color: var(--accent-text); text-underline-offset: 3px; }
a:hover { color: var(--primary); }
a:focus-visible { outline: 3px solid rgb(226 173 56 / 0.3); outline-offset: 3px; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.92em; }

/* ---------- landing layout ---------- */

.wrap > main > section {
  margin-top: 54px;
  padding-top: 30px;
  border-top: 1px solid rgb(221 214 202 / 0.8);
}

.platforms { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.card {
  padding: 22px;
  border: 1px solid rgb(209 200 188 / 0.85);
  border-radius: 22px;
  background: rgb(255 253 248 / 0.88);
  box-shadow: 0 16px 40px rgb(78 58 35 / 0.06);
}

.platforms .card { min-height: 190px; }
.platform-heading { display: flex; align-items: center; gap: 11px; margin-bottom: 18px; }

.platform-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: #e7ecf4;
  color: #52647d;
  font-size: 0.66rem;
  font-weight: 800;
}

.platform-icon.android { background: #e6f0df; color: #587145; }

.download-link {
  display: inline-flex;
  padding: 10px 14px;
  border: 1px solid #c9982f;
  border-radius: 12px;
  background: rgb(226 173 56 / 0.16);
  font-weight: 700;
  text-decoration: none;
}

/* ---------- price cards ---------- */

.prices { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.price {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 0 0 6px;
  font-family: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 2.3rem;
  font-weight: 730;
  letter-spacing: -0.05em;
}

.price .cadence {
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--muted);
}

.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgb(226 173 56 / 0.16);
  color: var(--accent-text);
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* ---------- document layout ---------- */

article {
  padding: clamp(24px, 6vw, 64px);
  border: 1px solid rgb(209 200 188 / 0.85);
  border-radius: 26px;
  background: rgb(255 253 248 / 0.9);
  box-shadow: 0 20px 60px rgb(78 58 35 / 0.07);
}

article { line-height: 1.65; }
article h1 { max-width: 16ch; margin-bottom: 12px; font-size: clamp(2.1rem, 6vw, 3.5rem); letter-spacing: -0.055em; line-height: 1; }
article h2 { margin: 42px 0 12px; font-size: 1.3rem; letter-spacing: -0.025em; line-height: 1.3; }
article h3 { margin: 24px 0 8px; line-height: 1.35; }
article p { margin: 11px 0; }

.notice {
  margin: 26px 0;
  padding: 16px 18px;
  border: 1px solid var(--notice-border);
  border-radius: 16px;
  background: var(--notice-ground);
  color: var(--notice-text);
}

table {
  width: 100%;
  display: block;
  margin: 18px 0;
  overflow-x: auto;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid var(--hairline);
  border-radius: 14px;
}

th,
td {
  min-width: 150px;
  padding: 11px 12px;
  border-right: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
  text-align: left;
  vertical-align: top;
}

tr:last-child td { border-bottom: 0; }
th:last-child, td:last-child { border-right: 0; }
th { background: var(--th-ground); font-weight: 680; }

/* ---------- footer ---------- */

footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 16px;
  margin-top: 52px;
  padding-top: 20px;
  border-top: 1px solid rgb(221 214 202 / 0.8);
}

footer a { color: var(--muted); font-size: 0.82rem; text-decoration: none; }
footer a:hover { color: var(--primary); }
article > footer { display: block; margin-top: 34px; color: var(--muted); font-size: 0.88rem; }

@media (max-width: 640px) {
  .wrap { width: min(100% - 34px, 820px); padding-top: 20px; }
  .wrap.document { width: min(100% - 26px, 980px); }
  .topbar { margin-bottom: 52px; }
  .platforms, .prices { grid-template-columns: 1fr; }
  .platforms .card { min-height: 0; }
  .wrap > main > section { margin-top: 42px; }
  article { border-radius: 20px; }
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --ground: #12100e;
    --surface: #1b1815;
    --primary: #f3eee7;
    --muted: #aaa198;
    --faint: #7b736b;
    --hairline: #3b3530;
    --accent: #e2ad38;
    --accent-text: #f0c866;
    --notice-border: #68582e;
    --notice-ground: #2b2518;
    --notice-text: #dec78f;
    --th-ground: #26211c;
  }

  body {
    background:
      radial-gradient(circle at 12% -8%, rgb(144 67 50 / 0.2), transparent 30rem),
      radial-gradient(circle at 91% 4%, rgb(154 112 28 / 0.15), transparent 26rem),
      var(--ground);
  }

  .topbar a:not(.brand) { background: rgb(27 24 21 / 0.68); }
  .wrap > main > section, footer { border-color: rgb(59 53 48 / 0.8); }

  .card, article {
    border-color: rgb(62 56 50 / 0.95);
    background: rgb(27 24 21 / 0.9);
    box-shadow: 0 18px 48px rgb(0 0 0 / 0.24);
  }

  .platform-icon { background: #222a35; color: #9aacc2; }
  .platform-icon.android { background: #243022; color: #9bb58b; }
  .badge { background: rgb(240 200 102 / 0.14); }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto; }
}
