:root {
  --paper: #f7f0e3;
  --surface: #fffaf1;
  --soft: #eddfca;
  --ink: #2f241f;
  --muted: #74665c;
  --clay: #c96f4a;
  --clay-deep: #914932;
  --gold: #e9ae55;
  --sage: #7d8a6a;
  --line: #dcc8a9;
  --shadow: 0 24px 70px rgba(65, 43, 29, .14);
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { background: var(--paper); }
body { margin: 0; min-height: 100vh; color: var(--ink); background: var(--paper); }
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: var(--clay-deep); }
[hidden] { display: none !important; }

.ffapp { min-height: 100vh; padding-bottom: calc(82px + env(safe-area-inset-bottom)); }
.ffapp-topbar {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  padding: calc(10px + env(safe-area-inset-top)) clamp(18px, 4vw, 42px) 10px;
  border-bottom: 1px solid rgba(145, 73, 50, .12);
  background: rgba(247, 240, 227, .92);
  backdrop-filter: blur(18px);
}

.ffapp-brand { display: flex; gap: 10px; align-items: center; color: var(--ink); text-decoration: none; }
.ffapp-brand img { width: 42px; height: 42px; border-radius: 13px; box-shadow: 0 8px 22px rgba(145, 73, 50, .2); }
.ffapp-brand span { display: grid; line-height: 1.08; }
.ffapp-brand strong { font-family: Georgia, serif; font-size: 17px; }
.ffapp-brand small { margin-top: 5px; color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .08em; }
.ffapp-trial-pill { padding: 8px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--clay-deep); font-size: 12px; font-weight: 800; }

.ffapp-main { width: min(820px, 100%); margin: 0 auto; padding: 28px clamp(18px, 5vw, 48px) 52px; }
.ffapp-view { display: none; animation: ffapp-in .25s ease; }
.ffapp-view.is-active { display: block; }
@keyframes ffapp-in { from { opacity: 0; transform: translateY(5px); } }

.ffapp-greeting, .ffapp-section-heading, .ffapp-page-title { display: flex; align-items: end; justify-content: space-between; gap: 16px; }
.ffapp-greeting { margin: 8px 0 24px; }
.ffapp-page-title { display: block; margin: 10px 0 24px; }
.ffapp h1, .ffapp h2, .ffapp h3 { margin: 0; font-family: Georgia, "Times New Roman", serif; letter-spacing: -.035em; }
.ffapp h1 { font-size: clamp(29px, 7vw, 46px); line-height: 1.04; }
.ffapp h2 { font-size: clamp(22px, 5vw, 30px); line-height: 1.12; }
.ffapp p { line-height: 1.6; }
.ffapp-eyebrow { margin: 0 0 7px; color: var(--clay-deep); font-size: 11px; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; }
.ffapp-icon-button {
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 50%;
  background: var(--clay-deep);
  color: white;
  font-size: 28px;
  line-height: 1;
  box-shadow: 0 10px 24px rgba(145, 73, 50, .25);
}

.ffapp-focus-card {
  position: relative;
  overflow: hidden;
  min-height: 250px;
  padding: clamp(26px, 6vw, 42px);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 30px;
  background:
    linear-gradient(135deg, rgba(58,35,27,.86), rgba(145,73,50,.75)),
    url("../images/focused-full-hero.webp") center/cover;
  color: white;
  box-shadow: var(--shadow);
}
.ffapp-focus-card .ffapp-eyebrow { color: #ffd99b; }
.ffapp-focus-card h2 { max-width: 550px; font-size: clamp(29px, 7vw, 45px); }
.ffapp-focus-card p:not(.ffapp-eyebrow) { max-width: 580px; color: rgba(255,255,255,.82); }
.ffapp-focus-card__sun { position: absolute; right: -42px; top: -42px; width: 160px; height: 160px; border-radius: 50%; background: rgba(233,174,85,.32); filter: blur(1px); }
.ffapp-progress { height: 7px; margin-top: 24px; overflow: hidden; border-radius: 20px; background: rgba(255,255,255,.22); }
.ffapp-progress span { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--gold); transition: width .25s ease; }
.ffapp-progress-label { margin: 7px 0 0; font-size: 12px; }

.ffapp-section-heading { margin: 34px 0 14px; }
.ffapp-section-heading button, .ffapp-tabs button, .ffapp-paywall button {
  border: 0;
  background: transparent;
  color: var(--clay-deep);
  font-size: 13px;
  font-weight: 800;
}
.ffapp-task-list, .ffapp-bill-list, .ffapp-segment-list, .ffapp-grow-list, .ffapp-event-list, .ffapp-asset-list, .ffapp-opportunity-list { display: grid; gap: 11px; }
.ffapp-empty { padding: 26px; border: 1px dashed var(--line); border-radius: 20px; text-align: center; color: var(--muted); background: rgba(255,250,241,.55); }
.ffapp-task {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 13px;
  align-items: center;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 19px;
  background: var(--surface);
  box-shadow: 0 7px 24px rgba(65,43,29,.06);
}
.ffapp-task input { width: 20px; height: 20px; accent-color: var(--clay-deep); }
.ffapp-task strong { display: block; font-size: 15px; }
.ffapp-task small { color: var(--muted); }
.ffapp-task.is-done strong { color: var(--muted); text-decoration: line-through; }
.ffapp-task button { border: 0; background: transparent; color: var(--muted); font-size: 18px; }

.ffapp-seo-intro { margin: 36px 0 0; padding: 26px; border-radius: 24px; background: var(--soft); }
.ffapp-seo-intro p { color: var(--muted); }
.ffapp-seo-intro a { font-weight: 800; }

.ffapp-install-banner {
  position: sticky;
  z-index: 19;
  top: calc(72px + env(safe-area-inset-top));
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  gap: 11px;
  align-items: center;
  width: min(760px, calc(100% - 24px));
  margin: 10px auto 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: 0 14px 40px rgba(65,43,29,.14);
}
.ffapp-install-banner img { width: 42px; height: 42px; border-radius: 12px; }
.ffapp-install-banner strong, .ffapp-install-banner small { display: block; }
.ffapp-install-banner small { margin-top: 2px; color: var(--muted); }
.ffapp-install-banner button { padding: 9px 12px; border: 0; border-radius: 12px; background: var(--clay-deep); color: white; font-weight: 800; }
.ffapp-install-banner button:last-child { padding: 7px; background: transparent; color: var(--muted); font-size: 20px; }

.ffapp-plan-card, .ffapp-tool-card, .ffapp-reflection-card {
  margin-top: 18px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface);
}
.ffapp-plan-card { display: grid; gap: 10px; }
.ffapp-plan-card small { color: var(--muted); }
.ffapp-inline-action { width: auto; justify-self: start; margin: 0; }

.ffapp-tabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 18px; padding: 5px; border-radius: 16px; background: var(--soft); }
.ffapp-tabs button { padding: 10px 4px; border-radius: 12px; color: var(--muted); }
.ffapp-tabs button.is-active { background: var(--surface); color: var(--clay-deep); box-shadow: 0 5px 16px rgba(65,43,29,.08); }
.ffapp-segment { padding: 20px; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); }
.ffapp-segment header { display: flex; justify-content: space-between; gap: 16px; }
.ffapp-segment p { margin: 6px 0 0; color: var(--muted); }
.ffapp-segment span { align-self: start; padding: 5px 9px; border-radius: 999px; background: var(--soft); color: var(--clay-deep); font-size: 11px; font-weight: 800; }

.ffapp-money-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 11px; }
.ffapp-money-grid article { min-height: 112px; padding: 19px; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); }
.ffapp-money-grid small { display: block; margin-bottom: 14px; color: var(--muted); }
.ffapp-money-grid strong { font-family: Georgia, serif; font-size: clamp(22px, 6vw, 32px); }
.ffapp-bill { display: grid; grid-template-columns: 1fr auto; gap: 10px; padding: 17px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); }
.ffapp-bill strong, .ffapp-bill small { display: block; }
.ffapp-bill small { margin-top: 3px; color: var(--muted); }
.ffapp-bill b { color: var(--clay-deep); }

.ffapp-event, .ffapp-asset {
  display: grid;
  gap: 4px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
}
.ffapp-event small, .ffapp-asset small { display: block; margin-top: 4px; color: var(--muted); }
.ffapp-asset { grid-template-columns: 1fr auto auto; align-items: center; gap: 12px; }
.ffapp-asset b { color: var(--clay-deep); }
.ffapp-asset button { border: 0; background: transparent; color: var(--muted); font-size: 18px; }

.ffapp-goal-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 12px; }
.ffapp-goal-grid article { padding: 16px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); }
.ffapp-goal-grid small, .ffapp-goal-grid strong { display: block; }
.ffapp-goal-grid strong { margin-top: 8px; font-family: Georgia, serif; font-size: 19px; }
.ffapp-goal-grid p { margin: 5px 0 0; color: var(--muted); font-size: 11px; }

.ffapp-opportunity { padding: 23px; border: 1px solid var(--line); border-radius: 22px; background: var(--surface); }
.ffapp-opportunity > small { color: var(--clay-deep); font-weight: 900; text-transform: uppercase; letter-spacing: .08em; }
.ffapp-opportunity h2 { margin-top: 8px; }
.ffapp-opportunity p { color: var(--muted); }
.ffapp-opportunity .ffapp-first-action { padding: 13px; border-radius: 13px; background: var(--soft); color: var(--ink); }
.ffapp-opportunity button, .ffapp-action-row button, .ffapp-file-button {
  display: inline-block;
  padding: 11px 14px;
  border: 0;
  border-radius: 13px;
  background: var(--clay-deep);
  color: white;
  font-weight: 800;
  text-align: center;
}
.ffapp-opportunity button:disabled, .ffapp-opportunity.is-accepted { opacity: .68; }

.ffapp-intro-copy { margin-top: -12px; color: var(--muted); }
.ffapp-grow-item { display: grid; grid-template-columns: 92px 1fr; gap: 15px; overflow: hidden; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); color: var(--ink); text-decoration: none; }
.ffapp-grow-item img { width: 92px; height: 100%; min-height: 92px; object-fit: cover; background: var(--soft); }
.ffapp-grow-item div { align-self: center; padding: 13px 14px 13px 0; }
.ffapp-grow-item strong { display: block; font-family: Georgia, serif; font-size: 18px; line-height: 1.15; }
.ffapp-grow-item small { display: block; margin-top: 7px; color: var(--muted); }

.ffapp-tool-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 11px; }
.ffapp-tool-grid button { min-height: 150px; padding: 20px; border: 1px solid var(--line); border-radius: 22px; background: var(--surface); text-align: left; box-shadow: 0 6px 20px rgba(65,43,29,.05); }
.ffapp-tool-grid span { display: block; margin-bottom: 20px; color: var(--clay-deep); font-size: 26px; }
.ffapp-tool-grid strong, .ffapp-tool-grid small { display: block; }
.ffapp-tool-grid small { margin-top: 6px; color: var(--muted); line-height: 1.35; }
.ffapp-pair-card, .ffapp-about-card { margin-top: 16px; padding: 24px; border-radius: 24px; background: var(--soft); }
.ffapp-pair-card span { color: var(--clay-deep); letter-spacing: .08em; }
.ffapp-pair-card p:last-child, .ffapp-about-card p { color: var(--muted); }
.ffapp-tool-card > p, .ffapp-reflection-card > p { color: var(--muted); }
.ffapp-reflection-card { background: linear-gradient(145deg, #382a24, #704332); color: white; }
.ffapp-reflection-card .ffapp-eyebrow { color: #ffd99b; }
.ffapp-reflection-card blockquote { margin: 18px 0 8px; font-family: Georgia, serif; font-size: clamp(21px, 5vw, 29px); line-height: 1.3; }
.ffapp-reflection-card > p { color: rgba(255,255,255,.76); }
.ffapp-reflection-card small { display: block; margin-top: 12px; color: rgba(255,255,255,.65); }
.ffapp-action-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.ffapp-reflection-card .ffapp-action-row button { background: var(--gold); color: var(--ink); }
.ffapp-file-button { cursor: pointer; background: var(--sage); }
.ffapp-file-button input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.ffapp-status-line { display: flex; justify-content: space-between; gap: 12px; align-items: center; margin: 12px 0 0; padding: 10px 12px; border-radius: 12px; background: var(--soft); }
.ffapp-status-line button { border: 0; background: transparent; color: var(--clay-deep); font-weight: 800; }

.ffapp-primary-action, .ffapp-secondary-action {
  display: block;
  width: 100%;
  margin-top: 12px;
  padding: 14px 18px;
  border: 0;
  border-radius: 16px;
  text-align: center;
  text-decoration: none;
  font-weight: 900;
}
.ffapp-primary-action { background: var(--clay-deep); color: white; }
.ffapp-secondary-action { border: 1px solid var(--line); background: var(--surface); color: var(--clay-deep); }

.ffapp-nav {
  position: fixed;
  z-index: 30;
  left: 50%;
  bottom: max(10px, env(safe-area-inset-bottom));
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  width: min(620px, calc(100% - 20px));
  padding: 7px;
  border: 1px solid rgba(220,200,169,.85);
  border-radius: 23px;
  background: rgba(255,250,241,.94);
  box-shadow: 0 15px 50px rgba(65,43,29,.18);
  backdrop-filter: blur(18px);
  transform: translateX(-50%);
}
.ffapp-nav button { padding: 7px 2px; border: 0; border-radius: 16px; background: transparent; color: var(--muted); font-size: 10px; font-weight: 800; }
.ffapp-nav span { display: block; margin-bottom: 2px; font-size: 18px; }
.ffapp-nav button.is-active { background: var(--soft); color: var(--clay-deep); }

.ffapp-modal, .ffapp-paywall {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: grid;
  align-items: end;
  overflow-y: auto;
  padding: 18px;
  background: rgba(47,36,31,.58);
  backdrop-filter: blur(9px);
}
.ffapp-modal-card, .ffapp-paywall-card {
  position: relative;
  width: min(560px, 100%);
  max-height: calc(100vh - 36px);
  margin: auto auto 0;
  overflow-y: auto;
  padding: clamp(24px, 6vw, 38px);
  border: 1px solid var(--line);
  border-radius: 29px 29px 20px 20px;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.ffapp-modal-card > p, .ffapp-paywall-card > p { color: var(--muted); }
.ffapp-modal-card label { display: block; margin-top: 15px; color: var(--ink); font-size: 12px; font-weight: 800; }
.ffapp-modal-card .ffapp-check-label { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: start; color: var(--muted); font-weight: 600; line-height: 1.45; }
.ffapp-modal-card .ffapp-check-label input { width: 18px; height: 18px; margin: 1px 0 0; padding: 0; accent-color: var(--clay-deep); }
.ffapp-modal-card input, .ffapp-modal-card textarea, .ffapp-modal-card select {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 13px;
  outline: none;
  background: white;
  color: var(--ink);
}
.ffapp-modal-card textarea { min-height: 84px; resize: vertical; }
.ffapp-modal-card input:focus, .ffapp-modal-card textarea:focus, .ffapp-modal-card select:focus { border-color: var(--clay); box-shadow: 0 0 0 3px rgba(201,111,74,.13); }
.ffapp-form-row { display: grid; grid-template-columns: 2fr 1fr; gap: 10px; }
.ffapp-modal-close { position: absolute; top: 16px; right: 16px; width: 38px; height: 38px; border: 0; border-radius: 50%; background: var(--soft); font-size: 24px; }
.ffapp-onboarding-icon { width: 72px; height: 72px; margin-bottom: 22px; border-radius: 22px; box-shadow: 0 12px 30px rgba(145,73,50,.2); }

.ffapp-paywall { z-index: 200; align-items: center; }
.ffapp-paywall-card { margin: auto; border-radius: 30px; text-align: center; }
.ffapp-paywall-card img { width: 82px; height: 82px; margin-bottom: 20px; border-radius: 24px; }
.ffapp-paywall-card > button { margin: 20px 0 10px; }
.ffapp.is-locked .ffapp-main, .ffapp.is-locked .ffapp-nav { filter: grayscale(1); pointer-events: none; user-select: none; }

@media (min-width: 700px) {
  .ffapp-modal { align-items: center; }
  .ffapp-modal-card { margin: auto; border-radius: 29px; }
}

@media (max-width: 430px) {
  .ffapp-topbar { padding-inline: 14px; }
  .ffapp-brand small { display: none; }
  .ffapp-trial-pill { max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .ffapp-main { padding-inline: 14px; }
  .ffapp-money-grid, .ffapp-tool-grid { grid-template-columns: 1fr 1fr; }
  .ffapp-tool-grid button { min-height: 132px; padding: 16px; }
  .ffapp-tabs button { font-size: 11px; }
  .ffapp-install-banner { grid-template-columns: auto 1fr auto; }
  .ffapp-install-banner button:last-child { display: none; }
  .ffapp-goal-grid { grid-template-columns: 1fr; }
  .ffapp-nav button { font-size: 8.5px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}
