/* The public website: home page, guides and information pages (src/Pages/PublicSite.php). The budgeting app has its
   own styles (app.css). */

:root {
  --ink: #1c1d33;
  --ink-2: #3a3c58;
  --muted: #5f6280;
  --line: #e3e5f0;
  --bg: #f5f6fb;
  --card: #ffffff;
  --brand: #4b55d8;
  --brand-dark: #3740b8;
  --brand-soft: #eef0ff;
  --navy: #1e2044;
  --indigo: #2e3383;
  --lime: #c3ec95;
  --danger: #c4314b;
  --danger-soft: #fdf0f2;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(30, 32, 68, .06), 0 6px 20px rgba(30, 32, 68, .06);
  --shadow-lift: 0 2px 4px rgba(30, 32, 68, .08), 0 14px 32px rgba(30, 32, 68, .12);
  --header-h: 68px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 17px/1.7 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; }
a { color: var(--brand); text-underline-offset: 2px; }
a:hover { color: var(--brand-dark); }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; border-radius: 6px; }
h1, h2, h3 { line-height: 1.2; color: var(--ink); font-weight: 800; }
h1 { font-size: clamp(32px, 5vw, 48px); margin: 0 0 .75rem; letter-spacing: -.025em; }
h2 { font-size: clamp(23px, 3vw, 30px); margin: 2.75rem 0 .85rem; letter-spacing: -.015em; }
h3 { font-size: 19px; margin: 1.75rem 0 .5rem; font-weight: 700; }
p { margin: 0 0 1.05rem; }
ul, ol { padding-left: 1.4rem; margin: 0 0 1.1rem; }
li { margin: .4rem 0; }
b, strong { color: var(--ink); }
.muted { color: var(--muted); }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 1.5rem; }
.skip { position: absolute; left: -9999px; top: 0; background: #fff; padding: .5rem 1rem; z-index: 100; }
.skip:focus { left: 1rem; top: .75rem; }

/* ---------------------------------------------------------------- header */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(30, 32, 68, .96); color: #fff;
  backdrop-filter: saturate(160%) blur(10px); -webkit-backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, .06); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; height: var(--header-h); }
.brand { display: flex; align-items: center; gap: .6rem; color: #fff; text-decoration: none; font-weight: 800; font-size: 20px;
  letter-spacing: -.01em; }
.brand:hover { color: #fff; }
.brand img { border-radius: 9px; }
.site-header nav { display: flex; align-items: center; gap: 1.6rem; }
.site-header nav a { color: #cfd2f2; text-decoration: none; font-weight: 600; font-size: 15.5px; }
.site-header nav a:hover, .site-header nav a[aria-current] { color: #fff; }
.site-header nav a[aria-current]:not(.btn) { box-shadow: inset 0 -2px 0 var(--lime); padding-bottom: 2px; }
.site-header .nav-actions { display: flex; align-items: center; gap: .6rem; margin-left: .4rem; }
.site-header .btn { padding: .5rem 1rem; font-size: 15px; border-radius: 10px; }

/* ---------------------------------------------------------------- footer */
.site-footer { background: var(--navy); color: #b9bce3; margin-top: 5rem; padding: 3.5rem 0 2rem; font-size: 15px; }
.site-footer .cols { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 2rem; }
.site-footer .brand, .site-footer .brand:hover { margin-bottom: .75rem; color: #fff; text-decoration: none; }
.site-footer .about { max-width: 24em; margin: 0 0 1.25rem; line-height: 1.6; }
.site-footer h2 { color: #fff; font-size: 14px; text-transform: uppercase; letter-spacing: .08em; margin: .35rem 0 .9rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin: .5rem 0; }
.site-footer a { color: #b9bce3; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer .bottom { border-top: 1px solid rgba(255, 255, 255, .1); margin-top: 2.5rem; padding-top: 1.5rem;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: .5rem 1.5rem; color: #9093c4; font-size: 14px; }
.site-footer .bottom a { color: #9093c4; }

/* ---------------------------------------------------------------- buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; background: var(--brand); color: #fff;
  text-decoration: none; font-weight: 700; padding: .75rem 1.4rem; border-radius: 12px; border: 1.5px solid transparent;
  font-size: 16px; line-height: 1.3; transition: background-color .15s, transform .15s, box-shadow .15s; }
.btn:hover { background: var(--brand-dark); color: #fff; }
.btn:active { transform: translateY(1px); }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn.lime { background: var(--lime); color: var(--navy); }
.btn.lime:hover { background: #b2e47b; color: var(--navy); }
.btn.ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .45); }
.btn.ghost:hover { background: rgba(255, 255, 255, .1); }
.btn.outline { background: #fff; color: var(--brand-dark); border-color: var(--line); }
.btn.outline:hover { border-color: var(--brand); background: var(--brand-soft); }
.btn.danger { background: var(--danger); }
.btn.danger:hover { background: #a82840; }
.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; margin: 1.75rem 0 .75rem; }

/* ---------------------------------------------------------------- home: hero */
.hero { background: radial-gradient(900px 520px at 12% -10%, #5058c4 0%, transparent 62%),
  radial-gradient(700px 500px at 95% 110%, #3b3f9e 0%, transparent 60%),
  linear-gradient(165deg, var(--indigo) 0%, var(--navy) 75%); color: #fff; overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: 1.15fr .85fr; gap: 3rem; align-items: end; padding-top: 4.5rem; }
.hero-text { padding-bottom: 4.5rem; }
.eyebrow { display: inline-block; font-size: 13.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--lime); margin-bottom: 1rem; }
.hero h1 { color: #fff; font-size: clamp(40px, 6.2vw, 66px); line-height: 1.04; margin-bottom: 1.25rem; }
.hero h1 em { font-style: normal; color: var(--lime); white-space: nowrap; }
.hero .lede { font-size: clamp(18px, 2vw, 20.5px); color: #d4d7f5; max-width: 33em; line-height: 1.6; }
.hero .small { color: #aeb2e3; font-size: 15px; margin: 0; }
.hero .shot { justify-self: center; width: 100%; max-width: 400px; }
.hero .shot img { display: block; width: 100%; filter: drop-shadow(0 24px 50px rgba(0, 0, 0, .4)); }
.trust { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; margin-top: 1.5rem; padding: 0; list-style: none; color: #c4c7ef; font-size: 15px; }
.trust li { margin: 0; display: flex; align-items: center; gap: .45rem; }
.trust li::before { content: ""; width: 18px; height: 18px; flex: none; border-radius: 50%; background: var(--lime)
  url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.5 2.5L12 5.5' fill='none' stroke='%231e2044' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/12px no-repeat; }

/* ---------------------------------------------------------------- home: sections */
.section { padding: 5rem 0 0; }
.section-head { max-width: 46rem; margin-bottom: 2rem; }
.section-head h2 { margin: 0 0 .6rem; }
.section-head p { color: var(--muted); font-size: 18.5px; margin: 0; }
.kicker { font-size: 13.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--brand); margin-bottom: .5rem; display: block; }

.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.1rem; counter-reset: step; padding: 0; margin: 0; }
.steps li { list-style: none; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.5rem; margin: 0;
  border-top: 3px solid var(--brand); }
.steps li::before { counter-increment: step; content: counter(step); display: inline-grid; place-items: center; width: 36px; height: 36px;
  border-radius: 10px; background: var(--navy); color: var(--lime); font-weight: 800; margin-bottom: .85rem; }
.steps h3 { margin: 0 0 .4rem; font-size: 18px; }
.steps p { margin: 0; color: var(--muted); font-size: 16px; line-height: 1.6; }

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.1rem; }
.feature { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.5rem; }
.feature .icon { width: 44px; height: 44px; border-radius: 12px; background: var(--brand-soft); color: var(--brand);
  display: grid; place-items: center; margin-bottom: 1rem; }
.feature .icon svg { width: 24px; height: 24px; }
.feature h3 { margin: 0 0 .4rem; font-size: 18px; }
.feature p { margin: 0; color: var(--muted); font-size: 16px; line-height: 1.6; }

.gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem; }
.gallery figure { margin: 0; min-width: 0; }
.gallery .frame { border-radius: 18px; overflow: hidden; padding: 1.75rem 1.25rem 0; box-shadow: var(--shadow-lift);
  background: radial-gradient(400px 260px at 20% 0%, #5058c4 0%, transparent 65%), linear-gradient(165deg, var(--indigo), var(--navy) 80%); }
.gallery .frame img { display: block; width: 100%; margin-bottom: -2px; filter: drop-shadow(0 10px 24px rgba(0, 0, 0, .35)); }
.gallery figcaption { font-size: 15px; color: var(--muted); margin-top: .75rem; text-align: center; }
.gallery figcaption b { display: block; color: var(--ink); }

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.1rem; }
.steps > *, .features > *, .cards > * { min-width: 0; }
.card { display: flex; flex-direction: column; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 1.5rem; color: var(--ink); text-decoration: none; border: 1.5px solid transparent;
  transition: border-color .15s, box-shadow .15s, transform .15s; }
.card:hover { border-color: var(--brand); color: var(--ink); box-shadow: var(--shadow-lift); transform: translateY(-2px); }
.card .tag { align-self: flex-start; font-size: 12.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
  color: var(--brand); background: var(--brand-soft); border-radius: 999px; padding: .2rem .65rem; margin-bottom: .85rem; }
.card h3 { margin: 0 0 .5rem; font-size: 19px; color: var(--ink); }
.card p { margin: 0 0 1rem; color: var(--muted); font-size: 16px; line-height: 1.6; flex: 1; }
.card .meta { font-size: 14px; color: var(--muted); display: flex; justify-content: space-between; align-items: center; }
.card .meta .go { color: var(--brand); font-weight: 700; }

.faq-list { max-width: 52rem; }
details.qa { background: var(--card); border-radius: 12px; box-shadow: var(--shadow); margin: 0 0 .75rem; border: 1px solid transparent; }
details.qa[open] { border-color: var(--line); }
details.qa summary { list-style: none; cursor: pointer; padding: 1.1rem 3rem 1.1rem 1.35rem; font-weight: 700; position: relative;
  color: var(--ink); line-height: 1.45; }
details.qa summary::-webkit-details-marker { display: none; }
details.qa summary::after { content: ""; position: absolute; right: 1.3rem; top: 50%; width: 10px; height: 10px; margin-top: -7px;
  border-right: 2.5px solid var(--muted); border-bottom: 2.5px solid var(--muted); transform: rotate(45deg); transition: transform .2s; }
details.qa[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
details.qa summary:hover { color: var(--brand-dark); }
details.qa .a { padding: 0 1.35rem 1.15rem; color: var(--ink-2); }
details.qa .a > :last-child { margin-bottom: 0; }

.cta { position: relative; overflow: hidden; background: linear-gradient(135deg, var(--indigo), var(--navy)); color: #fff;
  border-radius: 24px; padding: 2.75rem; margin-top: 5rem; display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem 2.5rem; flex-wrap: wrap; }
.cta h2 { color: #fff; margin: 0 0 .4rem; }
.cta p { color: #d4d7f5; margin: 0; font-size: 18px; }
.cta .btn-row { margin: 0; }

/* ---------------------------------------------------------------- inner pages */
.page-head { background: linear-gradient(165deg, var(--indigo) 0%, var(--navy) 80%); color: #fff; padding: 3.25rem 0 3.5rem; }
.page-head .inner { max-width: 760px; }
.page-head.wide .inner { max-width: 900px; }
.page-head h1 { color: #fff; margin-bottom: .6rem; }
.page-head .lede { color: #d4d7f5; font-size: clamp(18px, 2vw, 20px); margin: 0; max-width: 40em; line-height: 1.6; }
.page-head .meta { color: #aeb2e3; font-size: 15px; margin: 1rem 0 0; display: flex; gap: .4rem 1.25rem; flex-wrap: wrap; }
.crumbs { font-size: 14.5px; margin-bottom: 1rem; color: #aeb2e3; }
.crumbs a { color: #cfd2f2; text-decoration: none; }
.crumbs a:hover { color: #fff; text-decoration: underline; }
.crumbs span { margin: 0 .4rem; opacity: .6; }

/* One readable column, or a column with an "On this page" menu beside it. */
.page-body { padding-top: 3rem; }
.prose { max-width: 760px; }
.prose > h2:first-child, .prose > section:first-child > h2:first-child { margin-top: 0; }
.prose h2 { padding-top: .25rem; }
.doc { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 3.5rem; align-items: start; }
.doc .prose { max-width: 780px; }
.toc { position: sticky; top: calc(var(--header-h) + 1.5rem); font-size: 15px; }
.toc h2 { font-size: 12.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 0 0 .75rem; }
.toc ol { list-style: none; padding: 0; margin: 0; border-left: 2px solid var(--line); }
.toc li { margin: 0; }
.toc a { display: block; padding: .35rem 0 .35rem 1rem; margin-left: -2px; border-left: 2px solid transparent; color: var(--ink-2);
  text-decoration: none; line-height: 1.4; }
.toc a:hover { color: var(--brand); border-left-color: var(--brand); }
.toc .toc-help { margin-top: 1.5rem; padding: 1rem; background: var(--card); border-radius: 12px; box-shadow: var(--shadow); font-size: 14.5px; }
.toc .toc-help p { margin: 0 0 .4rem; color: var(--muted); }
.toc .toc-help a { overflow-wrap: anywhere; font-weight: 600; }

.section-group { margin-top: 3rem; }
.section-group:first-child { margin-top: 0; }
.section-group > h2 { margin: 0 0 1rem; display: flex; align-items: center; gap: .65rem; }
.section-group > h2 .icon { width: 36px; height: 36px; border-radius: 10px; background: var(--brand-soft); color: var(--brand);
  display: inline-grid; place-items: center; flex: none; }
.section-group > h2 .icon svg { width: 20px; height: 20px; }

.callout { background: var(--brand-soft); border-left: 4px solid var(--brand); border-radius: 12px; padding: 1.1rem 1.35rem; margin: 1.75rem 0; }
.callout.warn { background: var(--danger-soft); border-left-color: var(--danger); }
.callout > :last-child { margin-bottom: 0; }
.callout h2, .callout h3 { margin: 0 0 .4rem; font-size: 18px; }

.example { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: .75rem 1.35rem; margin: 1.5rem 0 1.75rem; overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 16px; }
th, td { text-align: left; padding: .6rem .5rem; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: .05em; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
tr.total td { font-weight: 800; border-bottom: 0; color: var(--ink); }

.contact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin: 0 0 3rem; }
.contact-card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.35rem 1.5rem;
  display: flex; flex-direction: column; }
.contact-card.primary { border-top: 3px solid var(--brand); }
.contact-card h2 { font-size: 18px; margin: 0 0 .4rem; }
.contact-card p { color: var(--muted); font-size: 15.5px; line-height: 1.55; flex: 1; margin-bottom: 1rem; }
.contact-card .btn { align-self: flex-start; padding: .6rem 1.1rem; font-size: 15px; }

.step-cards { list-style: none; padding: 0; margin: 1.25rem 0 1.5rem; counter-reset: step; }
.step-cards li { position: relative; background: var(--card); border-radius: 12px; box-shadow: var(--shadow); padding: 1.1rem 1.35rem 1.1rem 4.1rem;
  margin: 0 0 .75rem; }
.step-cards li::before { counter-increment: step; content: counter(step); position: absolute; left: 1.2rem; top: 1rem; width: 32px; height: 32px;
  border-radius: 9px; background: var(--navy); color: var(--lime); display: grid; place-items: center; font-weight: 800; }

.signed-in { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.25rem 1.5rem; margin: 0 0 2rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; border-left: 4px solid var(--danger); }
.signed-in p { margin: 0; }

.related { margin-top: 3.5rem; }
.related h2 { font-size: 22px; margin: 0 0 1rem; }
.related .cards { grid-template-columns: repeat(2, 1fr); }
.related .card { padding: 1.15rem 1.35rem; }
.related .card h3 { font-size: 17px; margin: 0; }
.disclaimer { font-size: 14px; color: var(--muted); margin-top: 2.5rem; padding-top: 1.25rem; border-top: 1px solid var(--line); }
.updated { font-size: 15px; color: #aeb2e3; margin: .9rem 0 0; }

.guide-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.1rem; }
.guide-list .card { padding: 1.6rem 1.75rem; }
.guide-list .num { font-size: 14px; font-weight: 800; color: var(--muted); margin-bottom: .6rem; }
.start-here { margin-top: 3rem; display: grid; grid-template-columns: 1fr auto; gap: 1.5rem; align-items: center;
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.75rem 2rem; }
.start-here h2 { margin: 0 0 .35rem; font-size: 22px; }
.start-here p { margin: 0; color: var(--muted); }

.notfound { text-align: center; padding: 5rem 0 2rem; }
.notfound .code { font-size: clamp(72px, 12vw, 120px); font-weight: 900; line-height: 1; letter-spacing: -.04em;
  background: linear-gradient(135deg, var(--brand), var(--indigo)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.notfound h1 { margin-top: .75rem; }
.notfound .lede { color: var(--muted); font-size: 19px; max-width: 32em; margin: 0 auto; }
.notfound .btn-row { justify-content: center; }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 1000px) {
  .doc { grid-template-columns: 1fr; gap: 0; }
  .toc { position: static; margin-bottom: 2rem; }
  .toc ol { display: flex; flex-wrap: wrap; gap: .5rem; border: 0; }
  .toc a { border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: .35rem .9rem; margin: 0; font-size: 14.5px; }
  .toc a:hover { border-color: var(--brand); }
  .toc .toc-help { display: none; }
}
@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; gap: 0; padding-top: 3rem; }
  .hero-text { padding-bottom: 2.5rem; }
  .hero .shot { max-width: 320px; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .features, .cards, .contact-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .site-footer .cols { grid-template-columns: 1fr 1fr; }
  .site-footer .cols > :first-child { grid-column: 1 / -1; }
  .site-header .nav-link-support { display: none; }
}
@media (max-width: 640px) {
  :root { --header-h: 60px; }
  body { font-size: 16.5px; }
  .wrap { padding: 0 1.15rem; }
  .site-header nav { gap: 1rem; }
  .site-header .nav-get { display: none; }
  .steps, .features, .cards, .contact-grid, .guide-list, .related .cards { grid-template-columns: 1fr; }
  .section { padding-top: 3.75rem; }
  .page-head { padding: 2.25rem 0 2.5rem; }
  .page-body { padding-top: 2rem; }
  .cta { padding: 1.75rem; border-radius: 18px; margin-top: 3.75rem; }
  .start-here { grid-template-columns: 1fr; padding: 1.5rem; }
  .btn-row .btn { flex: 1 1 auto; }
  .step-cards li { padding-left: 3.6rem; }
  .step-cards li::before { left: .9rem; }
}
