/* Tipbit's site, in the app's look: the hero's aurora (the Emerald theme's own nine colors, Theme.swift), the money
   font (the system's rounded face, heavy), the ink (#232830) on a light page, white on a dark one. No scripts, no
   web fonts, nothing from another site. */

:root {
  color-scheme: light dark;
  --page: #f2f2f7;
  --card: #ffffff;
  --ink: #232830;
  --ink-2: rgba(35, 40, 48, 0.68);
  --ink-3: rgba(35, 40, 48, 0.36);
  --line: rgba(35, 40, 48, 0.12);
  --accent: #059669;
  --link: #047857;
  --rounded: ui-rounded, "SF Pro Rounded", "SF Pro Display", -apple-system, BlinkMacSystemFont, system-ui, "Segoe UI",
    Roboto, sans-serif;
  --text: -apple-system, BlinkMacSystemFont, system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --page: #000000;
    --card: #1c1c1e;
    --ink: #ffffff;
    --ink-2: rgba(235, 235, 245, 0.66);
    --ink-3: rgba(235, 235, 245, 0.32);
    --line: rgba(255, 255, 255, 0.12);
    --accent: #34d399;
    --link: #34d399;
  }
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--text);
  background: var(--page);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--link); text-underline-offset: 3px; }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
img { max-width: 100%; }

/* The aurora: deep emerald with mint and teal glows drifting slowly, as the app's hero does; still under Reduce Motion. */
.aurora {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  color: #ffffff;
  background: linear-gradient(160deg, #065f46 0%, #064e3b 45%, #0f766e 80%, #134e4a 100%);
  border-radius: 0 0 36px 36px;
}
.aurora::before {
  content: "";
  position: absolute;
  inset: -25%;
  z-index: -2;
  background:
    radial-gradient(38% 42% at 88% 12%, rgba(52, 211, 153, 0.85) 0%, rgba(52, 211, 153, 0) 70%),
    radial-gradient(40% 45% at 100% 62%, rgba(13, 148, 136, 0.75) 0%, rgba(13, 148, 136, 0) 70%),
    radial-gradient(45% 40% at 52% 48%, rgba(5, 150, 105, 0.55) 0%, rgba(5, 150, 105, 0) 72%),
    radial-gradient(40% 40% at 8% 92%, rgba(15, 118, 110, 0.7) 0%, rgba(15, 118, 110, 0) 70%),
    radial-gradient(36% 36% at 30% 8%, rgba(4, 120, 87, 0.7) 0%, rgba(4, 120, 87, 0) 70%);
  animation: drift 28s ease-in-out infinite alternate;
}
/* A whisper of grain, so the glows never band. */
.aurora::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.07;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
@keyframes drift {
  0% { transform: translate3d(-4%, -2%, 0) rotate(0deg) scale(1); }
  50% { transform: translate3d(3%, 3%, 0) rotate(4deg) scale(1.06); }
  100% { transform: translate3d(5%, -3%, 0) rotate(-3deg) scale(1.03); }
}
@media (prefers-reduced-motion: reduce) {
  .aurora::before { animation: none; }
}

.wrap { max-width: 1040px; margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 680px; margin: 0 auto; padding: 0 24px; }

/* The small caps label above a big line, as the app writes "THIS WEEK". */
.label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.aurora .label { color: rgba(209, 250, 229, 0.92); }

.home {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #ffffff;
  text-decoration: none;
  font-family: var(--rounded);
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
}
.home img { width: 34px; height: 34px; border-radius: 8px; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.18); }
.home:hover span { text-decoration: underline; text-underline-offset: 4px; }
.home:focus-visible { outline: 2px solid #ffffff; outline-offset: 4px; border-radius: 10px; }

/* The front page's hero. */
.hero { padding-top: 28px; padding-bottom: 56px; }
.hero nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.hero nav .links { display: flex; gap: 20px; font-weight: 600; font-size: 0.95rem; }
.hero nav .links a { color: rgba(255, 255, 255, 0.88); text-decoration: none; }
.hero nav .links a:hover { color: #ffffff; text-decoration: underline; }
.hero nav .links a:focus-visible { outline-color: #ffffff; }
.hero .intro { display: grid; gap: 40px; align-items: center; margin-top: 52px; }
@media (min-width: 860px) { .hero .intro { grid-template-columns: 1.15fr 0.85fr; } }
.hero h1 {
  font-family: var(--rounded);
  font-weight: 900;
  font-size: clamp(2.7rem, 8.4vw, 4.6rem);
  line-height: 1.02;
  letter-spacing: -0.035em;
  margin-top: 12px;
  text-shadow: 0 2px 24px rgba(2, 44, 34, 0.35);
}
.hero .line {
  font-size: clamp(1.08rem, 2.6vw, 1.3rem);
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.86);
  max-width: 32em;
  margin-top: 18px;
}
.soon {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 30px;
  padding: 12px 20px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 1rem;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.3);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
.soon svg { width: 18px; height: 18px; flex: none; }

/* The week's total, the way Home's hero shows it: a sample, made up. */
.glance {
  justify-self: center;
  width: min(100%, 340px);
  padding: 22px 24px 24px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.24);
  box-shadow: 0 24px 60px rgba(2, 44, 34, 0.35);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}
.glance .total {
  font-family: var(--rounded);
  font-weight: 900;
  font-size: 3.4rem;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-top: 6px;
  font-variant-numeric: tabular-nums;
}
.glance .total small { font-size: 0.5em; letter-spacing: -0.01em; }
.glance .bar { height: 10px; border-radius: 999px; background: rgba(255, 255, 255, 0.22); margin-top: 18px; overflow: hidden; }
.glance .bar span { display: block; height: 100%; width: 74%; border-radius: inherit; background: #ffffff; }
.glance .goal { display: flex; justify-content: space-between; font-size: 0.92rem; color: rgba(255, 255, 255, 0.86); margin-top: 8px; }
.glance .rows { margin-top: 18px; display: grid; gap: 10px; }
.glance .row { display: flex; justify-content: space-between; gap: 12px; font-size: 0.95rem; }
.glance .row b { font-family: var(--rounded); font-weight: 800; font-variant-numeric: tabular-nums; }
.glance .note { margin-top: 14px; font-size: 0.78rem; color: rgba(255, 255, 255, 0.7); }

/* The store's pictures as one strip, sideways on a phone. */
.strip { margin-top: 56px; }
.strip .scroller {
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  border-radius: 28px;
  background: linear-gradient(160deg, #065f46, #0f766e);
  box-shadow: 0 1px 0 var(--line);
}
.strip img {
  display: block;
  height: clamp(360px, 62vh, 620px);
  width: auto;
  max-width: none;
}
.strip figcaption { color: var(--ink-2); font-size: 0.92rem; margin-top: 10px; text-align: center; }

/* Cards: the app's own, plain on the page. */
.section { padding: 64px 0 8px; }
.section h2 {
  font-family: var(--rounded);
  font-weight: 800;
  font-size: clamp(1.7rem, 4.6vw, 2.3rem);
  letter-spacing: -0.025em;
  line-height: 1.12;
  margin-top: 8px;
}
.section .label { color: var(--accent); }
.section > .wrap > p { color: var(--ink-2); font-size: 1.08rem; margin-top: 10px; max-width: 40em; }
.cards { display: grid; gap: 16px; margin-top: 28px; }
@media (min-width: 720px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .cards.four { grid-template-columns: repeat(4, 1fr); } }
.card { background: var(--card); border-radius: 24px; padding: 22px; }
.card .icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  color: var(--accent);
}
.card .icon svg { width: 24px; height: 24px; }
.card h3 { font-size: 1.08rem; letter-spacing: -0.01em; margin-top: 14px; }
.card p { color: var(--ink-2); font-size: 0.97rem; margin-top: 6px; }

.pro { display: grid; gap: 16px; margin-top: 28px; }
@media (min-width: 720px) { .pro { grid-template-columns: 1fr 1fr; } }
.pro ul { list-style: none; margin-top: 12px; display: grid; gap: 8px; }
.pro li { padding-left: 26px; position: relative; color: var(--ink); }
.pro li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.48em;
  width: 12px;
  height: 7px;
  border-left: 2.5px solid var(--accent);
  border-bottom: 2.5px solid var(--accent);
  transform: rotate(-45deg);
}
.pro .card h3 { margin-top: 2px; }
.pro .card .label { color: var(--ink-2); }

/* The help and privacy pages: a band of aurora on top, then the words. */
.band { padding-top: 24px; padding-bottom: 40px; }
.band h1 {
  font-family: var(--rounded);
  font-weight: 900;
  font-size: clamp(2.2rem, 7vw, 3.1rem);
  letter-spacing: -0.03em;
  line-height: 1.08;
  margin-top: 40px;
}
.band .line { color: rgba(255, 255, 255, 0.86); margin-top: 10px; font-size: 1.05rem; }
.page { padding-top: 36px; padding-bottom: 24px; }
.page h2 { font-size: 1.25rem; letter-spacing: -0.01em; margin: 40px 0 8px; line-height: 1.3; }
.page h3 { font-size: 1.04rem; margin: 26px 0 6px; line-height: 1.35; }
.page p, .page li { font-size: 1rem; }
.page p + p { margin-top: 12px; }
.page ul { padding-left: 22px; margin: 10px 0; }
.page li { margin: 8px 0; }
.page li::marker { color: var(--accent); }
.page .card { margin: 4px 0 8px; }
.page .card h2 { margin: 0 0 6px; font-size: 1.05rem; }
.page .card ul { margin-bottom: 0; }
.page .card p { color: var(--ink); }
.muted { color: var(--ink-2); }

footer { padding: 48px 0 56px; }
footer nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 28px; font-weight: 600; }
footer .tm { color: var(--ink-2); font-size: 0.8rem; line-height: 1.6; text-align: center; margin-top: 22px; }

@media (forced-colors: active) {
  .aurora { border: 1px solid CanvasText; }
  .card, .glance, .soon { border: 1px solid CanvasText; }
}
