/* Storybook palette — mirrors SoloFamily/Theme/SFTokens.swift so the
   site and the in-app screens share one visual identity. */
@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,400;0,9..144,600;0,9..144,700;1,9..144,400&family=Nunito:wght@400;600;700&family=JetBrains+Mono:wght@700&display=swap');

:root {
  --bg:        #1B1424;
  --bg-deep:   #0F0A17;
  --card:      #261B33;
  --card-alt:  #2F2340;
  --hairline:  rgba(251, 239, 228, 0.08);

  --ink:       #FBEFE4;
  --ink-soft:  rgba(251, 239, 228, 0.66);
  --ink-faint: rgba(251, 239, 228, 0.38);

  --me:        #F7B5A0;   /* peach */
  --me-end:    #F7C5B0;
  --other:     #C9A8F0;   /* lavender */
  --event:     #F5D98A;   /* butter */
  --expense:   #A8E3C5;   /* mint */
  --flag:      #F7A8C8;   /* rose */

  --radius-hero: 28px;
  --radius-card: 22px;
  --radius-row:  18px;
  --radius-pill: 999px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { background: var(--bg); }

body {
  background:
    radial-gradient(1100px 700px at 85% -10%, rgba(247, 181, 160, 0.10), transparent 60%),
    radial-gradient(900px 700px at -10% 110%, rgba(201, 168, 240, 0.08), transparent 60%),
    var(--bg);
  color: var(--ink);
  font-family: "Nunito", -apple-system, BlinkMacSystemFont, "SF Pro Text", Helvetica, Arial, sans-serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.6;
  padding: 56px 20px 72px;
  max-width: 720px;
  margin: 0 auto;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3 {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--ink);
}
h1 { font-size: 40px; line-height: 1.12; margin-bottom: 10px; }
h2 { font-size: 22px; line-height: 1.25; margin: 34px 0 12px; font-weight: 700; }
h3 { font-size: 17px; margin: 18px 0 8px; }

p { margin-bottom: 14px; color: var(--ink); }
p.lead {
  font-family: "Fraunces", Georgia, serif;
  font-size: 19px; line-height: 1.45;
  color: var(--ink-soft);
  font-style: italic;
  margin-bottom: 28px;
}
p.muted, .muted {
  color: var(--ink-faint);
  font-size: 14px;
  margin-bottom: 24px;
}

a {
  color: var(--me);
  text-decoration: none;
  border-bottom: 1px solid rgba(247, 181, 160, 0.35);
  transition: color 120ms ease, border-color 120ms ease;
}
a:hover {
  color: var(--flag);
  border-bottom-color: rgba(247, 168, 200, 0.7);
}

ul { margin: 12px 0 18px 22px; color: var(--ink); }
li { margin-bottom: 7px; }
li strong { color: var(--me); font-weight: 700; }

strong { color: var(--ink); font-weight: 700; }

/* The "sf" italic mark — same Fraunces letterform that ships as the
   app icon. Gradient matches the LinearGradient used on the home
   screen mark (me → flag). */
.mark {
  display: inline-flex;
  align-items: center; justify-content: center;
  width: 72px; height: 72px;
  background: linear-gradient(135deg, var(--me) 0%, var(--flag) 100%);
  color: #2A1530;
  font-family: "Fraunces", Georgia, serif;
  font-style: italic;
  font-weight: 600;
  font-size: 38px;
  line-height: 1;
  border-radius: 22px;
  margin-bottom: 22px;
  box-shadow:
    0 8px 30px rgba(247, 181, 160, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

/* Section micro-label — mirrors the in-app MonoLabel: uppercase,
   tight tracking, JetBrains Mono bold, faint ink. */
.micro {
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-weight: 700;
  font-size: 10.5px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--ink-faint);
  display: inline-block;
  margin-bottom: 10px;
}

/* Storybook card — same radius + hairline stroke as StorybookCard.
   Subtle tint overlay hints at the surface's role (peach for the
   "top summary" on index, neutral elsewhere). */
.card {
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-card);
  padding: 20px 22px;
  margin-bottom: 16px;
  position: relative;
  overflow: hidden;
}
.card.tinted-me::before {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(240px 240px at 0% 0%,
    rgba(247, 181, 160, 0.10), transparent 60%);
  pointer-events: none;
}

/* Pill CTAs — matches FloatingTabBar's capsule ink. */
.pill {
  display: inline-block;
  background: linear-gradient(135deg, var(--me) 0%, var(--me-end) 100%);
  color: #3A1F18;
  font-family: "Nunito", sans-serif;
  font-weight: 700;
  font-size: 14px;
  padding: 11px 20px;
  border-radius: var(--radius-pill);
  border: none;
  margin-top: 8px;
  box-shadow: 0 6px 20px rgba(247, 181, 160, 0.28);
}
.pill:hover { color: #3A1F18; border-bottom: 0; filter: brightness(1.05); }
.pill.secondary {
  background: transparent;
  color: var(--me);
  border: 1px solid rgba(247, 181, 160, 0.5);
  box-shadow: none;
}

/* Feature chip row — small colored dots + labels, matches the
   legend row on the Today hero. */
.dots { list-style: none; margin: 10px 0 16px 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px 20px; }
.dots li { display: flex; align-items: center; gap: 8px; margin: 0; color: var(--ink-soft); font-size: 14px; }
.dots li::before {
  content: "";
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--me);
  box-shadow: 0 0 8px rgba(247, 181, 160, 0.6);
}
.dots li.other::before   { background: var(--other);   box-shadow: 0 0 8px rgba(201, 168, 240, 0.6); }
.dots li.event::before   { background: var(--event);   box-shadow: 0 0 8px rgba(245, 217, 138, 0.6); }
.dots li.expense::before { background: var(--expense); box-shadow: 0 0 8px rgba(168, 227, 197, 0.55); }
.dots li.flag::before    { background: var(--flag);    box-shadow: 0 0 8px rgba(247, 168, 200, 0.55); }

/* Squiggly divider — miniature port of SquiggleDivider. */
.squiggle {
  display: block;
  width: 120px; height: 10px;
  margin: 32px 0 10px 0;
  background: none;
  opacity: 0.55;
}
.squiggle svg { width: 100%; height: 100%; }

/* Top nav + back link. */
nav.top {
  display: flex; gap: 22px; flex-wrap: wrap;
  margin: 22px 0 8px 0;
  font-family: "Nunito", sans-serif;
  font-weight: 700;
  font-size: 14px;
}
nav.top a { border-bottom: none; color: var(--ink-soft); }
nav.top a:hover { color: var(--me); }

/* App Store badge — official Apple PNG, link wraps it. Subtle drop
   shadow lifts it off the bg-deep card without competing with the sf
   mark gradient above. */
p.appstore {
  margin: 22px 0 8px 0;
}
p.appstore a {
  border-bottom: none;
  display: inline-block;
}
p.appstore img {
  filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.35));
  transition: transform 120ms ease;
}
p.appstore a:hover img {
  transform: translateY(-1px);
}

a.back {
  display: inline-block;
  margin-top: 28px;
  border-bottom: none;
  color: var(--me);
  font-weight: 700;
}

footer {
  margin-top: 56px;
  padding-top: 22px;
  border-top: 1px solid var(--hairline);
  color: var(--ink-faint);
  font-size: 13px;
}

/* Narrow screens — shrink the hero a touch so the ":sf" mark doesn't
   dominate the fold, and reflow dots vertically. */
@media (max-width: 480px) {
  body { padding: 36px 18px 60px; }
  h1   { font-size: 32px; }
  h2   { font-size: 20px; }
  .mark { width: 60px; height: 60px; font-size: 32px; border-radius: 18px; }
  .dots { flex-direction: column; gap: 8px; }
}
