/* ==========================================================================
   SmSt Finances landing page
   Money green on warm paper. The page reads like a statement: ruled lines,
   tabular figures, a quiet balance mark and a green handover at the end.
   ========================================================================== */

.lp--finances {
  --lp-paper: #f7f4ee;
  --lp-surface: #fffdf9;
  --lp-ink: #17130e;
  --lp-ink-soft: #3a3228;
  --lp-muted: #726657;
  --lp-rule: #e5ddcf;
  --lp-accent: #1e5a36;
  --lp-accent-deep: #0e2c1b;
  --lp-accent-soft: #dcefe3;
  --lp-on-accent: #fffdf9;
}

.lp--finances .lp-kicker {
  color: #1e5a36;
}

/* ------------------------------------------------------------------ hero */
.fn-hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(2.8rem, 6vw, 5.4rem) clamp(3.5rem, 7vw, 6rem);
  background:
    radial-gradient(ellipse 58% 52% at 92% 0%, rgba(49, 138, 85, 0.1), transparent 62%),
    linear-gradient(180deg, #f2f7f2 0%, #f8faf6 54%, #f7f4ee 100%);
}

.fn-hero::before {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 1px;
  background: var(--lp-rule);
}

.fn-hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  align-items: center;
  gap: clamp(2.5rem, 5.5vw, 5.5rem);
}

.fn-hero__copy {
  max-width: 36rem;
}

.fn-hero__title {
  margin-top: 1.1rem;
  color: #0e2c1b;
  font-size: clamp(3.1rem, 2.1rem + 5.3vw, 6.1rem);
  font-weight: 500;
  letter-spacing: -0.06em;
  line-height: 0.9;
}

.fn-hero__copy .lp-lede {
  margin-top: 1.3rem;
  max-width: 38ch;
  color: #3a3228;
}

.fn-hero__copy .lp-actions {
  margin-top: 1.8rem;
}

.fn-hero__visual {
  min-width: 0;
}

/* ------------------------------------------------------------------ board */
.fn-board {
  overflow: hidden;
  border: 1px solid #d8cdba;
  border-radius: 16px;
  background: #fffdf9;
  box-shadow:
    0 1px 2px rgba(61, 34, 9, 0.05),
    0 30px 70px -34px rgba(14, 44, 27, 0.36);
}

.fn-board__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 1.15rem 0.95rem;
  border-bottom: 1px solid #efe9de;
}

.fn-board__crumb {
  color: #7a6a55;
  font-size: 0.65rem;
  letter-spacing: 0.02em;
}

.fn-board__crumb span {
  margin-inline: 0.15rem;
  color: #7a6a55;
}

.fn-board__head h2 {
  margin-top: 0.3rem;
  font-family: var(--lp-display);
  font-size: clamp(1.25rem, 1rem + 0.9vw, 1.75rem);
  font-weight: 500;
  letter-spacing: -0.045em;
  line-height: 1.05;
}

.fn-board__stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: #efe9de;
  border-bottom: 1px solid #efe9de;
}

.fn-board__stats > div {
  padding: 0.7rem 0.75rem;
  background: #fffdf9;
}

.fn-board__stats span {
  display: block;
  color: #7a6a55;
  font-size: 0.58rem;
  line-height: 1.2;
}

.fn-board__stats strong {
  display: block;
  margin-top: 0.35rem;
  color: #17130e;
  font-size: clamp(0.82rem, 0.7rem + 0.4vw, 1rem);
  font-weight: 600;
  line-height: 1;
}

.fn-board__stats .is-up {
  color: #1e5a36;
}

.fn-board__chart {
  padding: 0.9rem 1.15rem 0.75rem;
  border-bottom: 1px solid #efe9de;
}

.fn-board__charthead,
.fn-board__entrieshead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.fn-board__charthead > span {
  color: #7a6a55;
  font-size: 0.6rem;
}

.fn-board__label {
  color: #7a6a55;
  font-family: var(--lp-mono);
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.fn-line {
  height: 94px;
  margin-top: 0.45rem;
}

.fn-line svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.fn-line__grid {
  fill: none;
  stroke: #efe9de;
  stroke-width: 1;
}

.fn-line__in,
.fn-line__out {
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.fn-line__in {
  stroke: #1e5a36;
}

.fn-line__out {
  stroke: #a65a17;
  stroke-dasharray: 3 3;
}

.fn-board__legend {
  display: flex;
  gap: 0.9rem;
  margin-top: 0.25rem;
  color: #726657;
  font-size: 0.58rem;
}

.fn-board__legend span {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.fn-board__legend i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

.fn-board__legend .is-in {
  color: #1e5a36;
}

.fn-board__legend .is-out {
  color: #a65a17;
}

.fn-board__entries {
  padding: 0.8rem 1.15rem 1rem;
}

.fn-board__agrees {
  color: #1e5a36;
  font-size: 0.62rem;
  font-weight: 600;
}

.fn-entry {
  display: grid;
  grid-template-columns: 66px minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.55rem;
  padding-block: 0.45rem;
  border-top: 1px solid #efe9de;
  font-size: 0.72rem;
}

.fn-entry__name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #3a3228;
}

.fn-entry .lp-num {
  font-size: 0.7rem;
  font-weight: 600;
}

.fn-entry .is-up,
.fn-lineitem .is-up {
  color: #1e5a36;
}

.fn-entry .is-down,
.fn-lineitem .is-down {
  color: #9c3b2e;
}

/* ------------------------------------------------------------- statements */
.fn-statements {
  background: #fffdf9;
}

.fn-statements__grid {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
  align-items: center;
  gap: clamp(2.5rem, 5vw, 5rem);
}

.fn-statements__copy .lp-title {
  margin-top: 1rem;
  max-width: 12ch;
}

.fn-statements__copy .lp-body {
  margin-top: 1.2rem;
}

.fn-checks {
  display: grid;
  gap: 0.8rem;
  margin-top: 1.6rem;
}

.fn-checks li {
  display: grid;
  grid-template-columns: 1.1rem minmax(0, 1fr);
  gap: 0.65rem;
  color: var(--lp-ink-soft);
  font-size: 0.91rem;
  line-height: 1.55;
}

.fn-checks .lp-icon {
  width: 1rem;
  height: 1rem;
  margin-top: 0.2rem;
  color: var(--lp-accent);
}

.fn-sheet {
  background: #fffdf9;
}

.fn-sheet__tabs {
  display: flex;
  gap: 0.15rem;
  padding: 0.45rem;
  border-bottom: 1px solid var(--lp-rule);
  background: #f9f7f1;
}

.fn-sheet__tabs button {
  flex: 1;
  min-height: 34px;
  border: 1px solid transparent;
  border-radius: 4px;
  background: transparent;
  color: #726657;
  font-size: 0.7rem;
  font-weight: 600;
}

.fn-sheet__tabs button.is-active {
  border-color: #d8cdba;
  background: #fffdf9;
  color: #1e5a36;
}

.fn-sheet__body {
  padding: clamp(0.9rem, 2vw, 1.25rem);
}

.fn-panel__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid #efe9de;
}

.fn-panel__head h3 {
  margin-top: 0.3rem;
  font-family: var(--lp-display);
  font-size: clamp(1.1rem, 0.95rem + 0.6vw, 1.4rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.fn-lineitem {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.5rem;
  border-bottom: 1px solid #efe9de;
  color: #3a3228;
  font-size: 0.78rem;
}

.fn-lineitem .lp-num {
  font-size: 0.75rem;
  white-space: nowrap;
}

.fn-lineitem--total {
  margin-top: 0.35rem;
  padding-top: 0.7rem;
  border-top: 2px solid #1e5a36;
  border-bottom: 0;
  color: #0e2c1b;
  font-weight: 600;
}

.fn-lineitem--total .lp-num {
  color: #1e5a36;
  font-size: 0.92rem;
  font-weight: 600;
}

/* ---------------------------------------------------------------- options */
.fn-options {
  background: #f7f4ee;
}

.fn-options__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  align-items: stretch;
  gap: 1rem;
  margin-top: clamp(2rem, 4vw, 3.2rem);
}

.fn-option-list {
  background: #fffdf9;
}

.fn-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.7rem;
  border-bottom: 1px solid #efe9de;
}

.fn-option:last-of-type {
  border-bottom: 0;
}

.fn-option strong {
  display: block;
  color: #17130e;
  font-size: 0.86rem;
  font-weight: 600;
}

.fn-option div span {
  display: block;
  margin-top: 0.15rem;
  color: #7a6a55;
  font-size: 0.72rem;
}

.fn-calc {
  display: grid;
  align-content: start;
  padding: clamp(1.2rem, 3vw, 2rem);
  border-radius: 12px;
  background: #1e5a36;
  color: #dcefe3;
  box-shadow: 0 24px 60px -40px rgba(14, 44, 27, 0.6);
}

.fn-calc__label {
  color: #b6dcc4;
  font-family: var(--lp-mono);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.fn-calc__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.75rem;
  border-bottom: 1px solid rgba(220, 239, 227, 0.18);
  font-size: 0.86rem;
}

.fn-calc__row .lp-num {
  color: #fffdf9;
  font-size: 0.82rem;
  font-weight: 600;
}

.fn-calc__row--total {
  margin-top: 0.4rem;
  border-top: 1px solid rgba(220, 239, 227, 0.42);
  border-bottom: 0;
  color: #fffdf9;
  font-weight: 600;
}

.fn-calc__row--total .lp-num {
  font-size: 1.2rem;
}

.fn-calc__note {
  margin-top: 1rem;
  color: #b6dcc4;
  font-size: 0.78rem;
  line-height: 1.55;
}

/* ---------------------------------------------------------------- budgets */
.fn-budgets {
  background: #fffdf9;
}

.fn-budgets__head {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  align-items: end;
  gap: clamp(2rem, 5vw, 5rem);
}

.fn-budgets__head .lp-title {
  margin-top: 0.8rem;
  max-width: 13ch;
}

.fn-budget-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  grid-template-rows: auto auto;
  gap: 1rem;
  margin-top: clamp(2rem, 4vw, 3.2rem);
}

.fn-budget {
  padding: clamp(1rem, 2.4vw, 1.5rem);
  border: 1px solid var(--lp-rule);
  border-radius: 10px;
  background: #fffdf9;
}

.fn-budget--wide {
  display: flex;
  flex-direction: column;
  grid-row: span 2;
  background: #f9f7f1;
}

.fn-budget__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.fn-budget__head h3 {
  margin-top: 0.3rem;
  font-family: var(--lp-display);
  font-size: clamp(1.05rem, 0.9rem + 0.6vw, 1.4rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.fn-budget__figures {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
  margin-top: 1.3rem;
}

.fn-budget--wide .fn-budget__figures {
  margin-top: 2.2rem;
}

.fn-budget__figures span {
  display: block;
  color: #7a6a55;
  font-size: 0.65rem;
}

.fn-budget__figures strong {
  display: block;
  margin-top: 0.25rem;
  color: #17130e;
  font-size: clamp(0.9rem, 0.8rem + 0.3vw, 1.05rem);
  font-weight: 600;
}

.fn-budget__figures .is-up {
  color: #1e5a36;
}

.fn-budget__track {
  position: relative;
  height: 5px;
  margin-top: 1.4rem;
  overflow: hidden;
  border-radius: 999px;
  background: #e8e1d4;
}

.fn-budget__track span {
  display: block;
  width: var(--bar);
  height: 100%;
  border-radius: inherit;
  background: #1e5a36;
}

.fn-budget__track.is-over span {
  background: #9c3b2e;
}

.fn-budget__weeks {
  display: flex;
  align-items: flex-end;
  flex: 1;
  gap: 0.45rem;
  min-height: 82px;
  margin-top: 1.6rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid #e5ddcf;
}

.fn-budget__weeks span {
  flex: 1;
  height: var(--h);
  border-radius: 3px 3px 0 0;
  background: #dcefe3;
}

.fn-budget__weeks span:last-child {
  background: #1e5a36;
}

.fn-budget__note {
  margin-top: 0.65rem;
  color: #7a6a55;
  font-size: 0.7rem;
}

.fn-budget__figures--stack {
  grid-template-columns: 1fr 1fr;
  margin-top: 1rem;
}

/* ------------------------------------------------------------------ graph */
.fn-graph-section {
  background: #f2f7f2;
}

.fn-graph-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
  align-items: center;
  gap: clamp(2.5rem, 5vw, 5rem);
}

.fn-graph-copy .lp-title {
  margin-top: 1rem;
  max-width: 12ch;
}

.fn-graph-copy .lp-body {
  margin-top: 1.2rem;
}

.fn-axes {
  display: grid;
  gap: 1rem;
  margin-top: 1.6rem;
}

.fn-axes__label {
  margin-bottom: 0.45rem;
  color: #726657;
  font-family: var(--lp-mono);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.fn-axes span {
  display: inline-block;
  margin: 0 0.25rem 0.35rem 0;
  padding: 0.25rem 0.5rem;
  border: 1px solid #d8e5d8;
  border-radius: 999px;
  background: #fffdf9;
  color: #3a3228;
  font-size: 0.7rem;
}

.fn-graph {
  background: #fffdf9;
}

.fn-graph__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.fn-graph__head h3 {
  font-family: var(--lp-display);
  font-size: 1.2rem;
  font-weight: 500;
  letter-spacing: -0.03em;
}

.fn-graph__head p {
  margin-top: 0.22rem;
  color: #7a6a55;
  font-size: 0.72rem;
}

.fn-graph__head > span {
  color: #7a6a55;
  font-size: 0.68rem;
}

.fn-bars {
  display: flex;
  align-items: flex-end;
  gap: clamp(0.35rem, 1.5vw, 0.7rem);
  height: 178px;
  margin-top: 1.3rem;
  padding-top: 0.5rem;
  border-bottom: 1px solid #e5ddcf;
  background-image: linear-gradient(180deg, #efe9de 1px, transparent 1px);
  background-size: 100% 25%;
}

.fn-bars > div {
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: flex-end;
  height: 100%;
}

.fn-bars span {
  display: block;
  height: var(--h);
  border-radius: 3px 3px 0 0;
  background: linear-gradient(180deg, #77bd8f, #1e5a36);
}

.fn-bars > div:nth-child(6) span {
  background: linear-gradient(180deg, #b6dcc4, #1e5a36);
}

.fn-bars em {
  margin-top: 0.4rem;
  color: #7a6a55;
  font-family: var(--lp-mono);
  font-size: 0.58rem;
  font-style: normal;
  text-align: center;
}

.fn-graph__foot {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 0.7rem;
  color: #726657;
  font-size: 0.72rem;
}

.fn-graph__foot strong {
  color: #1e5a36;
  font-size: 0.9rem;
  font-weight: 600;
}

/* ---------------------------------------------------------------- reports */
.fn-reports {
  background: #fffdf9;
}

.fn-reports__head {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  align-items: end;
  gap: clamp(2rem, 5vw, 5rem);
}

.fn-reports__head .lp-title {
  margin-top: 0.8rem;
  max-width: 15ch;
}

.fn-report-list {
  margin-top: clamp(1.8rem, 4vw, 2.8rem);
  border-top: 1px solid var(--lp-rule);
}

.fn-report {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 0.9rem;
  padding-block: 0.9rem;
  border-bottom: 1px solid var(--lp-rule);
}

.fn-report__icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 5px;
  background: #dcefe3;
  color: #1e5a36;
}

.fn-report__icon .lp-icon {
  width: 16px;
  height: 16px;
}

.fn-report strong {
  display: block;
  color: #17130e;
  font-size: 0.9rem;
  font-weight: 600;
}

.fn-report div span {
  display: block;
  margin-top: 0.15rem;
  color: #7a6a55;
  font-size: 0.75rem;
}

/* -------------------------------------------------------------------- cta */
.fn-cta {
  padding-block: clamp(3rem, 6vw, 5rem);
  background: #0e2c1b;
  color: #dcefe3;
}

.fn-cta__inner {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
}

.fn-cta .lp-kicker {
  color: #77bd8f;
}

.fn-cta .lp-title {
  margin-top: 0.8rem;
  max-width: 18ch;
  color: #fffdf9;
}

.fn-cta .lp-body {
  margin-top: 0.8rem;
  max-width: 50ch;
  color: #b6dcc4;
}

.fn-cta .lp-btn--solid {
  background: #dcefe3;
  color: #0e2c1b;
}

.fn-cta .lp-btn--solid:hover {
  background: #fffdf9;
}

.fn-cta .lp-btn--ghost {
  border-color: rgba(220, 239, 227, 0.28);
  background: transparent;
  color: #fffdf9;
}

.fn-cta .lp-btn--ghost:hover {
  border-color: #77bd8f;
}

/* --------------------------------------------------------------- responsive */
@media (max-width: 980px) {
  .fn-hero__grid,
  .fn-statements__grid,
  .fn-options__grid,
  .fn-graph-grid {
    grid-template-columns: 1fr;
  }

  .fn-hero__copy {
    max-width: 44rem;
  }

  .fn-budgets__head,
  .fn-reports__head {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .fn-budget-grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }

  .fn-budget--wide {
    grid-row: auto;
  }

  .fn-cta__inner {
    display: grid;
    align-items: start;
  }
}

@media (max-width: 640px) {
  .fn-hero {
    padding-top: 2rem;
  }

  .fn-hero__title {
    font-size: clamp(2.8rem, 13vw, 4.2rem);
  }

  .fn-board__stats {
    grid-template-columns: 1fr 1fr;
  }

  .fn-line {
    height: 76px;
  }

  .fn-sheet__tabs {
    flex-wrap: wrap;
  }

  .fn-sheet__tabs button {
    flex: 1 1 45%;
  }

  .fn-budget__figures {
    grid-template-columns: 1fr 1fr;
  }

  .fn-bars {
    height: 140px;
  }

  .fn-report {
    grid-template-columns: 34px minmax(0, 1fr);
  }

  .fn-report > .lp-tag {
    display: none;
  }
}

.lp-tag--muted {
  color: #5f5142;
}
