/* Pareto site styles: the iOS app's design system (Utils/AppColors.swift).
   Follows the device theme like the app: pastel + beige in light, the board's
   jewel-tone mesh (ReceiptWorkspaceBackground.dark) in dark.
   Pastel mesh background from the receipt board, liquid-glass cards with a
   light top edge, pastel card tints from History, round pastel toolbar
   buttons, and the app's brand green for actions. */
:root {
  --ink: #4D5B6B;            /* AppColors.text */
  --muted: #7A8A9A;          /* AppColors.textSecondary */
  --on-pastel: #404047;      /* textOnColoredBackground */
  --accent: #33B366;         /* greenAccent */
  --accent-vivid: #0DB34F;   /* greenAccent.moreVibrant(1.3) */
  --accent-ink: #1F8A4C;
  --pink: #F5B5C0; --yellow: #F9F3B8; --green: #CFF6D6; --blue: #BEE8F7; --purple: #D6C5F0; --gray: #949AA1;
  /* Guest-card pastels, nearly solid like in the app. */
  --tint-pink: rgba(245,181,192,0.82); --tint-yellow: rgba(249,243,184,0.88); --tint-green: rgba(207,246,214,0.88);
  --tint-blue: rgba(190,232,247,0.86); --tint-purple: rgba(214,197,240,0.84);
  --base: #FBF6EC;           /* warm beige under the pastel mesh */
  --mesh-a: 1;
  --glass: rgba(255,253,248,0.62);
  --glass-strong: rgba(255,255,255,0.72);
  --edge-top: rgba(255,255,255,0.80);
  --edge-bottom: rgba(0,0,0,0.10);
  --field: rgba(255,255,255,0.85);
  --border: rgba(77,91,107,0.14);
  --shadow: 0 10px 30px rgba(77,91,107,0.12);
  --heading-font: ui-rounded, "SF Pro Rounded", "Arial Rounded MT Bold", -apple-system, system-ui, sans-serif;
  color-scheme: light dark;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  color: var(--ink); background: var(--base);
  line-height: 1.6; -webkit-font-smoothing: antialiased; overflow-x: hidden;
}

/* The receipt board's slowly morphing pastel mesh. */
body::before, body::after {
  content: ""; position: fixed; inset: -20%; z-index: -2; pointer-events: none; opacity: var(--mesh-a);
}
body::before {
  background:
    radial-gradient(46% 40% at 16% 14%, #CCF5DB 0%, transparent 72%),
    radial-gradient(48% 42% at 86% 20%, #C7E8FA 0%, transparent 72%),
    radial-gradient(50% 44% at 78% 80%, #FCF2C7 0%, transparent 72%),
    radial-gradient(48% 42% at 18% 84%, #FAD6DE 0%, transparent 72%);
  animation: drift-a 38s ease-in-out infinite alternate;
}
body::after {
  background: radial-gradient(40% 36% at 52% 50%, #E3DBFA 0%, transparent 72%);
  animation: drift-b 46s ease-in-out infinite alternate;
}
@keyframes drift-a { from { transform: translate3d(-3%, -2%, 0) rotate(0deg); } to { transform: translate3d(3%, 3%, 0) rotate(8deg); } }
@keyframes drift-b { from { transform: translate3d(-8%, 6%, 0); } to { transform: translate3d(8%, -6%, 0); } }
@media (prefers-reduced-motion: reduce) { body::before, body::after { animation: none; } }

h1, h2, h3, h4 { font-family: var(--heading-font); font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; color: var(--ink); }
a { color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Liquid-glass card: translucent fill, blur, light top edge fading out. */
.glass, .card, .guides a, .faq, .feature {
  position: relative; background: var(--glass); border-radius: 20px; box-shadow: var(--shadow);
  -webkit-backdrop-filter: blur(20px) saturate(180%); backdrop-filter: blur(20px) saturate(180%);
}
.glass::before, .card::before, .guides a::before, .faq::before, .feature::before, .tinted::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none;
  background: linear-gradient(180deg, var(--edge-top), var(--edge-bottom));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
}
/* Pastel cards, like History rows. */
.tinted { position: relative; border-radius: 20px; box-shadow: var(--shadow); -webkit-backdrop-filter: blur(20px) saturate(180%); backdrop-filter: blur(20px) saturate(180%); }
.tint-pink { background: var(--tint-pink); } .tint-yellow { background: var(--tint-yellow); } .tint-green { background: var(--tint-green); }
.tint-blue { background: var(--tint-blue); } .tint-purple { background: var(--tint-purple); }

/* Round pastel buttons from the bottom toolbar. */
.dot { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; color: var(--on-pastel); box-shadow: 0 4px 12px rgba(77,91,107,0.14), inset 0 1px 0 rgba(255,255,255,0.7); }
.dot svg { width: 22px; height: 22px; }
.dot.pink { background: var(--pink); } .dot.yellow { background: var(--yellow); } .dot.green { background: var(--green); }
.dot.blue { background: var(--blue); } .dot.purple { background: var(--purple); } .dot.gray { background: var(--gray); color: #2b2f35; }

/* Raised glass button in the brand green. */
.btn, .app-store, .topbar .get {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  background: rgba(13,179,79,0.88); color: #fff; text-decoration: none; border: 0; cursor: pointer;
  font-family: var(--heading-font); font-weight: 700; font-size: 17px;
  padding: 14px 24px; border-radius: 14px;
  box-shadow: 0 10px 24px rgba(13,179,79,0.30), inset 0 1px 0 rgba(255,255,255,0.55);
  transition: transform .15s ease, box-shadow .15s ease;
}
.btn:hover, .app-store:hover { transform: translateY(-1px); box-shadow: 0 14px 30px rgba(13,179,79,0.38), inset 0 1px 0 rgba(255,255,255,0.55); }
.app-store svg { width: 20px; height: 20px; }

/* Header / footer */
.topbar { max-width: 960px; margin: 0 auto; padding: 16px 20px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-family: var(--heading-font); font-weight: 800; font-size: 19px; }
.brand img { width: 34px; height: 34px; border-radius: 9px; }
.topbar .get { font-size: 14px; padding: 9px 14px; border-radius: 12px; white-space: nowrap; }
footer { text-align: center; color: var(--muted); font-size: 13px; padding: 36px 20px; margin-top: 24px; }
footer nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 16px; margin-bottom: 10px; }
footer a { color: var(--muted); }

/* Article pages */
article, .page { max-width: 760px; margin: 0 auto; padding: 8px 20px 40px; }
.crumbs { font-size: 13px; color: var(--muted); margin-bottom: 14px; }
.crumbs a { color: var(--muted); }
h1 { font-size: clamp(30px, 5.5vw, 46px); margin-bottom: 14px; }
.lede { font-size: 18px; color: var(--muted); margin-bottom: 28px; }
article h2 { font-size: clamp(22px, 3.6vw, 28px); margin: 38px 0 12px; }
article h3 { font-size: 19px; margin: 26px 0 8px; }
article p, article li { font-size: 17px; }
article p { margin-bottom: 14px; }
article ul, article ol { padding-left: 22px; margin-bottom: 16px; }
article li { margin-bottom: 6px; }
.note { font-size: 14px; color: var(--muted); }
.card { padding: 22px; margin: 18px 0; }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { font-family: var(--heading-font); font-size: 14px; color: var(--muted); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table-wrap { overflow-x: auto; }

.app-cta { margin: 34px 0; padding: 28px 24px; text-align: center; }
.app-cta h2 { margin: 0 0 8px; font-size: 24px; color: var(--on-pastel); }
.app-cta p { color: var(--on-pastel); opacity: .85; margin-bottom: 18px; font-size: 16px; }

.guides { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 14px 0 0; }
@media (max-width: 600px) { .guides { grid-template-columns: 1fr; } }
.guides a { display: flex; gap: 14px; align-items: center; padding: 16px 18px; text-decoration: none; color: var(--ink); }
.guides a strong { display: block; font-family: var(--heading-font); font-size: 16px; margin-bottom: 2px; }
.guides a span span { display: block; font-size: 14px; color: var(--muted); }
.guides .dot { width: 40px; height: 40px; }
.guides .dot svg { width: 19px; height: 19px; }

/* Homepage */
.hero { text-align: center; padding: 56px 20px 40px; }
.hero .logo { width: 88px; height: 88px; border-radius: 22px; object-fit: cover; box-shadow: 0 12px 34px rgba(77,91,107,0.22); margin-bottom: 24px; }
.hero h1 { font-size: clamp(34px, 6vw, 56px); line-height: 1.06; margin: 0 auto 16px; max-width: 760px; }
.hero .sub { font-size: clamp(17px, 2.4vw, 20px); color: var(--muted); max-width: 560px; margin: 0 auto 30px; }
.rating { margin-top: 14px; font-size: 14px; color: var(--muted); }
.rating strong { color: var(--ink); }
.hero-shot { margin: 44px auto 0; max-width: 320px; padding: 12px; border-radius: 38px; }
.hero-shot img { display: block; width: 100%; height: auto; border-radius: 28px; }
.toolbar { display: flex; justify-content: center; gap: 12px; margin-top: 22px; }
main.wrap { max-width: 960px; margin: 0 auto; padding: 0 20px; }
section { padding: 44px 0; }
.section-head { text-align: center; margin-bottom: 26px; }
.section-head h2 { font-size: clamp(26px, 4vw, 36px); }
.section-head p { color: var(--muted); margin-top: 6px; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 720px) { .steps { grid-template-columns: 1fr; } }
.step { padding: 24px; color: var(--on-pastel); }
.step h3 { font-size: 19px; margin: 14px 0 6px; color: var(--on-pastel); }
.step p { font-size: 15px; color: var(--on-pastel); opacity: .82; }
.features { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 640px) { .features { grid-template-columns: 1fr; } }
.feature { display: flex; gap: 14px; align-items: flex-start; padding: 20px; }
.feature h3 { font-size: 16px; margin-bottom: 3px; }
.feature p { color: var(--muted); font-size: 14px; }
.faq { max-width: 720px; margin: 0 auto; padding: 6px 24px; }
.faq-item { padding: 18px 0; border-bottom: 1px solid var(--border); }
.faq-item:last-child { border-bottom: none; }
.faq-item h3 { font-size: 17px; margin-bottom: 6px; }
.faq-item p { color: var(--muted); font-size: 15px; }
.cta { text-align: center; padding: 48px 24px; }
.cta h2 { font-size: clamp(24px, 4vw, 34px); margin-bottom: 20px; color: var(--on-pastel); }

/* Form fields (calculator) */
input[type="text"], input[type="number"] {
  width: 100%; font: 17px -apple-system, system-ui, sans-serif; color: var(--ink);
  background: var(--field); border: 1px solid var(--border); border-radius: 12px; padding: 11px 12px;
}

/* Dark: the app's own dark mode. Near-black centre (0.06,0.08,0.12) under the
   board's dark mesh palette, dark glass item cards, and richer pastel guest cards. */
@media (prefers-color-scheme: dark) {
  :root {
    --ink: #EEF0F3; --muted: #A3ABB5; --on-pastel: #F3F3F6; --accent-ink: #6FDD9E;
    --tint-pink: rgba(245,136,155,0.52); --tint-yellow: rgba(249,239,139,0.30); --tint-green: rgba(180,246,192,0.34);
    --tint-blue: rgba(150,221,247,0.36); --tint-purple: rgba(196,167,240,0.44);
    --pink: #C27E8B; --yellow: #C9C27C; --green: #86B890; --blue: #6FA6BD; --purple: #8F85B8; --gray: #6E7379;
    --base: #0F141F; --mesh-a: 1;
    --glass: rgba(255,255,255,0.06); --glass-strong: rgba(255,255,255,0.10);
    --edge-top: rgba(255,255,255,0.38); --edge-bottom: rgba(255,255,255,0.10);
    --field: rgba(255,255,255,0.07); --border: rgba(255,255,255,0.14);
    --shadow: 0 10px 30px rgba(0,0,0,0.35);
  }
  body::before {
    background:
      radial-gradient(46% 40% at 16% 14%, #12382E 0%, transparent 72%),
      radial-gradient(48% 42% at 86% 20%, #122645 0%, transparent 72%),
      radial-gradient(50% 44% at 78% 80%, #362E14 0%, transparent 72%),
      radial-gradient(48% 42% at 18% 84%, #3D1A29 0%, transparent 72%);
  }
  body::after { background: radial-gradient(40% 36% at 52% 50%, #261C42 0%, transparent 72%); }
  .dot { color: #1E2127; box-shadow: 0 4px 12px rgba(0,0,0,0.35), inset 0 1px 0 rgba(255,255,255,0.25); }
  .hero .logo { box-shadow: 0 12px 34px rgba(0,0,0,0.45); }
}
