/* FinFlow Help (website/help, generated from the app's Help topics). Same colors, type and header as the legal pages. */
@font-face { font-family: "Plus Jakarta Sans"; src: url("../fonts/plus_jakarta_sans_regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Plus Jakarta Sans"; src: url("../fonts/plus_jakarta_sans_medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Plus Jakarta Sans"; src: url("../fonts/plus_jakarta_sans_semi_bold.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Plus Jakarta Sans"; src: url("../fonts/plus_jakarta_sans_bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --bg: #f5f1e8; --surface: #fcfaf5; --text: #10231c; --muted: #5f6b65;
  --line: #e5ddcb; --accent: #0f4a37; --accent-soft: #e2ebe3;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #06100d; --surface: #0d1a15; --text: #f1eee6; --muted: #94a19a;
    --line: #1e322a; --accent: #4cc495; --accent-soft: #11261e;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 24px; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 1.0625rem/1.7 "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
/* The underline sits below the descenders (p, y, g) and stays one unbroken line. */
a { color: var(--accent); text-underline-offset: 0.24em; text-decoration-skip-ink: none; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible, input:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 12px; z-index: 2; background: var(--surface); padding: 8px 12px; }

/* Header: same width, height and logo spot as the home page and legal pages. */
.site-bar { border-bottom: 1px solid var(--line); background: var(--surface); }
.site-bar .bar { max-width: 1280px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 40px); min-height: 68px; display: flex; align-items: center; gap: 16px; }
.wordmark { display: inline-flex; padding: 10px 0; border-radius: 4px; }
.wordmark img { display: block; }
.site-bar nav { margin-left: auto; display: flex; gap: 4px; }
.site-bar nav a { color: var(--muted); text-decoration: none; font-weight: 600; font-size: 0.95rem; padding: 10px 14px; border-radius: 999px; }
.site-bar nav a:hover { color: var(--text); }
.site-bar nav a[aria-current="page"] { color: var(--accent); background: var(--accent-soft); }

/* One reading column. */
main { max-width: 760px; margin: 0 auto; padding: 48px 20px 64px; }
/* Page titles use the same serif as the home page headings and the Privacy and Terms pages. */
h1 {
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", "Noto Serif", Georgia, serif;
  font-size: clamp(2.25rem, 6vw, 3.25rem); line-height: 1.08; letter-spacing: -0.015em; margin: 0 0 12px; font-weight: 400;
}
h2 { font-size: 1.15rem; line-height: 1.3; letter-spacing: -0.01em; margin: 40px 0 10px; font-weight: 700; }
p { margin: 0 0 16px; }
.lede { color: var(--muted); font-size: 1.125rem; margin-bottom: 28px; }

/* Topic lists: rows with a hairline between and a drawn chevron that nudges toward the topic on hover. */
.topic-list { list-style: none; margin: 0; padding: 0; }
.topic-list li + li { border-top: 1px solid var(--line); }
.topic-list a {
  display: flex; justify-content: space-between; gap: 16px; align-items: center; min-height: 48px; padding: 11px 0;
  color: var(--text); text-decoration: none; font-weight: 500; transition: color .2s ease;
}
.topic-list a::after {
  content: ""; flex: none; width: 18px; height: 18px; background: var(--muted); opacity: .65;
  -webkit-mask: var(--i-chevron) center / contain no-repeat; mask: var(--i-chevron) center / contain no-repeat;
  transition: transform .25s cubic-bezier(.2, 0, 0, 1), background-color .2s ease, opacity .2s ease;
}
.topic-list a:hover, .topic-list a:focus-visible { color: var(--accent); }
.topic-list a:hover::after, .topic-list a:focus-visible::after { background: var(--accent); opacity: 1; transform: translateX(3px); }
.topic-list .area-name { display: block; color: var(--muted); font-size: 0.85rem; font-weight: 400; }
.topic-list .hit-summary { display: block; color: var(--muted); font-size: 0.9rem; font-weight: 400; line-height: 1.5; margin-top: 2px; }

/* Cards: each Help area, the search results, and a topic's Related and More lists. */
.areas section, .topic-list.results, .related, .more {
  background: var(--surface); border: 1px solid var(--line); border-radius: 20px;
  box-shadow: 0 1px 2px rgb(16 35 28 / .04), 0 14px 32px -22px rgb(16 35 28 / .22);
}
.areas section { padding: 22px 22px 8px; }
.topic-list.results { padding: 4px 22px; }
.related, .more { padding: 20px 22px 6px; margin-top: 28px; }
.related h2, .more h2 { margin: 0 0 4px; font-size: 1rem; }

/* Each area's heading carries its own icon in a tinted badge (icons at the end of this file). */
.areas h2 { position: relative; display: flex; align-items: center; min-height: 40px; padding-left: 54px; margin: 0 0 8px; font-size: 1.05rem; }
.areas h2::before { content: ""; position: absolute; left: 0; top: 50%; width: 40px; height: 40px; margin-top: -20px; border-radius: 12px; background: var(--accent-soft); }
.areas h2::after {
  content: ""; position: absolute; left: 10px; top: 50%; width: 20px; height: 20px; margin-top: -10px; background: var(--accent);
  -webkit-mask: var(--i-area) center / contain no-repeat; mask: var(--i-area) center / contain no-repeat;
}

/* Index: one card per area; on wide screens its topics sit in two columns inside the card. */
.areas { display: grid; gap: 20px; margin-top: 8px; }
@media (min-width: 900px) {
  .help-index { max-width: 1040px; }
  .help-index h1, .help-index .lede, .help-index .search { max-width: 680px; }
  /* Full-width cards, so neither side can run out early; topics fill two even columns with rows lined up. */
  .areas section .topic-list { display: grid; grid-template-columns: 1fr 1fr; column-gap: 40px; }
  .areas section .topic-list li { border-top: 1px solid var(--line); }
  .areas section .topic-list li:nth-child(-n+2) { border-top: 0; }
}

/* Search (shown once help.js is ready; without it, the areas still list everything). */
.search { margin: 0 0 8px; }
.search label { display: block; font-weight: 600; font-size: 0.95rem; margin-bottom: 8px; }
.search input {
  width: 100%; min-height: 52px; padding: 12px 16px 12px 48px; font: inherit; color: var(--text);
  background: var(--surface) var(--search-icon) 16px center / 20px no-repeat; border: 1px solid var(--line); border-radius: 16px;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.search input::placeholder { color: var(--muted); }
.search input:focus-visible { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
/* The magnifier in the muted text colour of each theme (a background image can't use currentColor). */
:root { --search-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235f6b65' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E"); }
@media (prefers-color-scheme: dark) {
  :root { --search-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394a19a' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E"); }
}
.search-status { color: var(--muted); font-size: 0.95rem; margin: 10px 0 8px; min-height: 1.5em; }
.searching .areas { display: none; }

/* Topic page. */
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 0.95rem; margin-bottom: 18px; }
.crumbs a { color: var(--muted); text-decoration: none; font-weight: 500; }
.crumbs a:hover { color: var(--accent); text-decoration: underline; }
/* The separator is the same drawn chevron as the lists (the "›" in the page is hidden). */
.crumbs span {
  font-size: 0; width: 14px; height: 14px; background: var(--muted); opacity: .6;
  -webkit-mask: var(--i-chevron) center / contain no-repeat; mask: var(--i-chevron) center / contain no-repeat;
}
.steps { margin: 24px 0; padding: 0; list-style: none; counter-reset: step; }
.steps li { counter-increment: step; position: relative; padding: 0 0 18px 48px; }
.steps li::before {
  content: counter(step); position: absolute; left: 0; top: 0; width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: 0.95rem;
}
.step { margin: 24px 0; }
/* A soft tinted panel, in the same family as the step numbers. */
.tip { margin: 8px 0 24px; padding: 16px 20px; background: var(--accent-soft); border-radius: 16px; }
.tip strong { display: block; font-size: 0.8125rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); margin-bottom: 2px; }
.tip p { margin: 0; color: var(--text); }
.in-app { color: var(--muted); font-size: 0.95rem; }
.in-app strong { color: var(--text); font-weight: 600; }

.help-footer { max-width: 1040px; margin: 0 auto; padding: 24px 20px 48px; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.9rem; }
.help-footer p { margin-bottom: 10px; }
.help-footer nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.help-footer a { color: var(--muted); }
.help-footer a:hover { color: var(--text); }

@media (max-width: 600px) {
  main { padding-top: 32px; }
  .site-bar nav a { padding: 8px 10px; }
  .areas section { padding: 18px 16px 6px; }
  .topic-list.results, .related, .more { padding-left: 16px; padding-right: 16px; }
}
/* Motion in the home page's style (same easing, rise and timing), only when motion is allowed. */
@media (prefers-reduced-motion: no-preference) {
  /* Moving between pages: a quick cross-fade (every page of the site has this). */
  @view-transition { navigation: auto; }
  ::view-transition-old(root) { animation: ff-page-out 160ms cubic-bezier(0.2, 0.7, 0.2, 1) both; }
  ::view-transition-new(root) { animation: ff-page-in 260ms cubic-bezier(0.2, 0.7, 0.2, 1) both; }
  @keyframes ff-page-out { to { opacity: 0; } }
  @keyframes ff-page-in { from { opacity: 0; } }
  /* The page rises in piece by piece, like the home page's sections. */
  main > * { animation: ff-rise 700ms cubic-bezier(0.2, 0.7, 0.2, 1) backwards; }
  main > *:nth-child(2) { animation-delay: 60ms; }
  main > *:nth-child(3) { animation-delay: 120ms; }
  main > *:nth-child(4) { animation-delay: 180ms; }
  main > *:nth-child(n+5) { animation-delay: 240ms; }
  @keyframes ff-rise { from { opacity: 0; transform: translateY(18px); } }
  /* Help home: each area card fades up as it scrolls into view (browsers without scroll timelines just show them). */
  @supports (animation-timeline: view()) {
    .areas section { animation: ff-rise linear both; animation-timeline: view(); animation-range: entry 0% entry 35%; }
  }
}
@media (prefers-reduced-motion: reduce) {
  .topic-list a, .topic-list a::after, .search input { transition: none; }
  .topic-list a:hover::after, .topic-list a:focus-visible::after { transform: none; }
}


/* Icons (Lucide-style, 1.75 stroke), as masks so they take the theme colour. Generated once; one per Help area. */
:root {
  --i-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m9 6 6 6-6 6'/%3E%3C/svg%3E");
  --i-search: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E");
  --i-area: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 4 3 6v14l6-2 6 2 6-2V4l-6 2z'/%3E%3Cpath d='M9 4v14M15 6v14'/%3E%3C/svg%3E");
}
#area-start { --i-area: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 4 3 6v14l6-2 6 2 6-2V4l-6 2z'/%3E%3Cpath d='M9 4v14M15 6v14'/%3E%3C/svg%3E"); }
#area-transactions { --i-area: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 7h13l-4-4M17 17H4l4 4'/%3E%3C/svg%3E"); }
#area-accounts { --i-area: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2.5' y='5' width='19' height='14' rx='2.5'/%3E%3Cpath d='M2.5 10h19M6.5 15h4'/%3E%3C/svg%3E"); }
#area-bills { --i-area: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m17 2 4 4-4 4'/%3E%3Cpath d='M3 11v-1a4 4 0 0 1 4-4h14'/%3E%3Cpath d='m7 22-4-4 4-4'/%3E%3Cpath d='M21 13v1a4 4 0 0 1-4 4H3'/%3E%3C/svg%3E"); }
#area-split { --i-area: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='17' rx='2'/%3E%3Cpath d='M16 2v4M8 2v4M3 10h18M8 15h2M14 15h2'/%3E%3C/svg%3E"); }
#area-people { --i-area: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='9' cy='8' r='3.5'/%3E%3Cpath d='M2.5 20c0-3.5 3-5.5 6.5-5.5s6.5 2 6.5 5.5'/%3E%3Cpath d='M16 4.5a3.5 3.5 0 0 1 0 7M18 14.8c2 .7 3.5 2.4 3.5 5.2'/%3E%3C/svg%3E"); }
#area-budgets { --i-area: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21.2 15.9A10 10 0 1 1 8 2.8'/%3E%3Cpath d='M22 12A10 10 0 0 0 12 2v10z'/%3E%3C/svg%3E"); }
#area-reports { --i-area: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 3v18h18'/%3E%3Cpath d='m19 9-5 5-4-4-3 3'/%3E%3C/svg%3E"); }
#area-assistant { --i-area: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3l1.8 4.6L18 9.4l-4.2 1.8L12 16l-1.8-4.8L6 9.4l4.2-1.8z'/%3E%3Cpath d='M19 15l.8 2 2 .8-2 .8-.8 2-.8-2-2-.8 2-.8z'/%3E%3C/svg%3E"); }
#area-alerts { --i-area: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 8a6 6 0 0 1 12 0c0 7 3 9 3 9H3s3-2 3-9'/%3E%3Cpath d='M10.3 21a1.9 1.9 0 0 0 3.4 0'/%3E%3C/svg%3E"); }
#area-security { --i-area: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3l8 3v6c0 4.5-3.4 8.3-8 9-4.6-.7-8-4.5-8-9V6z'/%3E%3Cpath d='m9 12 2 2 4-4'/%3E%3C/svg%3E"); }
#area-personalize { --i-area: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 21v-7M4 10V3M12 21v-9M12 8V3M20 21v-5M20 12V3M1 14h6M9 8h6M17 16h6'/%3E%3C/svg%3E"); }
#area-pc { --i-area: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2' y='4' width='20' height='13' rx='2'/%3E%3Cpath d='M8 21h8M12 17v4'/%3E%3C/svg%3E"); }
