/* /solutions/finance: "The ledger". Ruled, tabular, calm and exact. Scoped under .pg-finance. */
.pg-finance {
  --fn-amber: #a8550a;
  --fn-amber-bg: rgba(217, 119, 6, 0.12);
  --fn-amber-line: rgba(217, 119, 6, 0.55);
  --fn-ok: #0d7a4b;
  --fn-rule: rgba(var(--ink-rgb), 0.14);
  --fn-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --fn-gutter: clamp(20px, 5vw, 48px);
  background: var(--bg);
  color: var(--ink);
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: clamp(15px, 0.5vw + 13.8px, 17px);
  line-height: 1.6;
  padding-top: 104px;
  padding-bottom: clamp(56px, 8vw, 104px);
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}
html[data-theme="dark"] .pg-finance {
  --fn-amber: #fbbf24;
  --fn-amber-bg: rgba(251, 191, 36, 0.12);
  --fn-amber-line: rgba(251, 191, 36, 0.6);
  --fn-ok: #5fd6a0;
}
:where(.pg-finance) *, :where(.pg-finance) *::before, :where(.pg-finance) *::after { box-sizing: border-box; }
:where(.pg-finance) p, :where(.pg-finance) h1, :where(.pg-finance) h2, :where(.pg-finance) h3, :where(.pg-finance) ul, :where(.pg-finance) ol, :where(.pg-finance) dl, :where(.pg-finance) dd, :where(.pg-finance) figure { margin: 0; padding: 0; }
:where(.pg-finance) ul, :where(.pg-finance) ol { list-style: none; }
:where(.pg-finance) a { color: inherit; text-decoration: none; }
:where(.pg-finance) a:focus-visible, .pg-finance .fn-btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.fn-wrap { width: 100%; max-width: 1180px; margin-inline: auto; padding-inline: var(--fn-gutter); }
.fn-mono { font-family: var(--fn-mono); font-size: 0.74rem; letter-spacing: 0.08em; text-transform: uppercase; }
.fn-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.fn-label { font-family: var(--fn-mono); font-size: 0.74rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); margin-bottom: 14px; display: flex; align-items: center; gap: 12px; }
.fn-label::after { content: ""; flex: 1; max-width: 120px; height: 1px; background: var(--fn-rule); }
.fn-h2 { font-size: clamp(1.6rem, 2.6vw + 0.6rem, 2.5rem); font-weight: 600; letter-spacing: -0.02em; line-height: 1.15; max-width: 22ch; }
.fn-h3 { font-size: 1.06rem; font-weight: 600; letter-spacing: -0.005em; line-height: 1.3; }

/* ---------- 1. Hero ---------- */
.fn-hero { padding-block: clamp(24px, 4vw, 56px) clamp(48px, 6vw, 88px); }
.fn-hero__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(28px, 5vw, 72px); align-items: center; }
.fn-crumb { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-family: var(--fn-mono); font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-bottom: 26px; }
.fn-crumb a:hover { color: var(--accent); }
.fn-crumb [aria-current] { color: var(--ink); }
.fn-h1 { font-size: clamp(2rem, 3.2vw + 0.8rem, 3.3rem); font-weight: 600; letter-spacing: -0.03em; line-height: 1.08; }
.fn-lede { margin-top: 20px; color: var(--muted); max-width: 46ch; }
.fn-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.fn-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 18px; border-radius: 10px; font-weight: 600; font-size: 0.92rem; border: 1.5px solid transparent; transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.2s; }
.pg-finance .fn-btn--solid { background: var(--accent-fill, var(--accent)); color: #fff; }
.pg-finance .fn-btn--solid:hover { background: var(--navy); color: #fff; transform: translateY(-1px); }
.pg-finance .fn-btn--line { border-color: var(--fn-rule); background: var(--card); }
.pg-finance .fn-btn--line:hover { border-color: var(--accent); color: var(--accent); }

/* the invoice sheet */
.fn-sheet { background: var(--card); border: 1px solid var(--fn-rule); border-radius: 14px; overflow: hidden; box-shadow: 0 1px 0 rgba(var(--ink-rgb), 0.04), 0 24px 48px -28px rgba(var(--ink-rgb), 0.35); }
.fn-sheet__bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 20px; color: #fff; background: var(--navy); }
.fn-example { padding: 3px 8px; border: 1px solid rgba(255, 255, 255, 0.4); border-radius: 999px; font-size: 0.64rem; }
.fn-table { width: 100%; border-collapse: collapse; }
.fn-table__cap { text-align: left; font-size: 1.2rem; font-weight: 600; letter-spacing: -0.01em; padding: 22px 24px 14px; }
.fn-table thead th { font-family: var(--fn-mono); font-size: 0.68rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); font-weight: 500; text-align: left; padding: 10px 12px; border-block: 1px solid var(--fn-rule); background: rgba(var(--ink-rgb), 0.03); }
.fn-table tbody th { text-align: left; font-weight: 500; padding: 17px 12px; }
.fn-table td { padding: 17px 24px 17px 12px; }
.fn-table tbody td:last-child { text-align: left; }
.fn-table tbody tr { border-bottom: 1px solid var(--fn-rule); background-image: linear-gradient(transparent, transparent); }
.fn-col-no { width: 64px; padding-left: 24px !important; color: var(--muted); }
.fn-table thead th.fn-col-no { padding-left: 24px; padding-right: 0; }
.fn-table tfoot td { padding: 16px 24px; font-size: 0.9rem; color: var(--muted); background: rgba(var(--ink-rgb), 0.03); border-top: 2px solid var(--fn-rule); }
.fn-tag { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px; border-radius: 999px; font-size: 0.84rem; font-weight: 600; white-space: nowrap; }
.fn-tag--ok { color: var(--fn-ok); background: rgba(13, 122, 75, 0.1); }
html[data-theme="dark"] .fn-tag--ok { background: rgba(95, 214, 160, 0.12); }
.fn-tag--warn { color: var(--fn-amber); background: var(--fn-amber-bg); box-shadow: inset 0 0 0 1px var(--fn-amber-line); }
.fn-tag--wait { color: var(--muted); background: rgba(var(--ink-rgb), 0.06); }
.fn-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--fn-amber); flex: none; }
.fn-row--exception { background: var(--fn-amber-bg); box-shadow: inset 4px 0 0 var(--fn-amber); }

/* rows tick into place, then the amber row pulses once (motion allowed only) */
@media (prefers-reduced-motion: no-preference) {
  .fn-table tbody tr { animation: fn-tick 0.55s cubic-bezier(0.2, 0.7, 0.2, 1) both; animation-delay: calc(0.25s + var(--i, 0) * 0.14s); }
  .fn-row--exception .fn-tag { animation: fn-pulse 1.2s ease-out 1.1s 1 both; }
  @keyframes fn-tick { from { opacity: 0; transform: translateX(-14px); } to { opacity: 1; transform: none; } }
  @keyframes fn-pulse { 0% { box-shadow: inset 0 0 0 1px var(--fn-amber-line), 0 0 0 0 rgba(217, 119, 6, 0.5); } 100% { box-shadow: inset 0 0 0 1px var(--fn-amber-line), 0 0 0 14px rgba(217, 119, 6, 0); } }
}

/* ---------- 2. Problem: notes clipped to a ruler ---------- */
.fn-problem { padding-block: clamp(48px, 7vw, 96px); background: var(--surface); border-block: 1px solid var(--fn-rule); }
.fn-ruler { position: relative; height: 22px; margin-top: 44px; border-top: 2px solid var(--ink); background:
  repeating-linear-gradient(90deg, rgba(var(--ink-rgb), 0.55) 0 1.5px, transparent 1.5px 14px) 0 0 / 100% 10px no-repeat,
  repeating-linear-gradient(90deg, rgba(var(--ink-rgb), 0.9) 0 2px, transparent 2px 70px) 0 0 / 100% 18px no-repeat; }
.fn-notes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(16px, 3vw, 36px); margin-top: -8px; padding-top: 4px; }
.fn-note { position: relative; padding: 38px 24px 26px; background: var(--card); border: 1px solid var(--fn-rule); border-radius: 4px 4px 10px 10px; box-shadow: 0 14px 24px -16px rgba(var(--ink-rgb), 0.35); transform: rotate(var(--tilt, 0deg)); transform-origin: 50% 0; }
.fn-note::after { content: ""; position: absolute; inset: auto 0 0 0; height: 5px; border-radius: 0 0 10px 10px; background: var(--accent-soft); }
.fn-clip { position: absolute; top: -14px; left: 50%; width: 22px; height: 30px; margin-left: -11px; border-radius: 4px; background: var(--navy); box-shadow: 0 3px 6px rgba(0, 0, 0, 0.25); }
.fn-clip::after { content: ""; position: absolute; inset: 7px 5px auto; height: 2px; background: rgba(255, 255, 255, 0.45); border-radius: 1px; }
.fn-note__no { display: block; color: var(--accent); margin-bottom: 10px; font-weight: 600; }
.fn-note p { font-size: 1.04rem; font-weight: 500; line-height: 1.45; }

/* ---------- 3. Build: ledger legend ---------- */
.fn-build { padding-block: clamp(56px, 8vw, 104px) clamp(40px, 6vw, 72px); }
.fn-legend { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: clamp(28px, 5vw, 72px); margin-top: 36px; border-top: 2px solid var(--ink); }
.fn-legend__row { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 18px; padding: 22px 0; border-bottom: 1px solid var(--fn-rule); align-items: baseline; }
.fn-legend dt { display: flex; align-items: baseline; gap: 14px; }
.fn-legend__no { color: var(--accent); font-weight: 700; width: 1.4em; flex: none; }
.fn-legend dd { color: var(--muted); }

/* ---------- 4. Swimlane ---------- */
.fn-flow { padding-block: clamp(40px, 6vw, 72px) clamp(56px, 8vw, 104px); }
.fn-lanes { position: relative; margin-top: 40px; display: grid; grid-template-columns: 88px 28fr 8fr 28fr 8fr 28fr; grid-template-rows: repeat(3, 1fr); min-height: 480px; background:
  linear-gradient(var(--fn-rule), var(--fn-rule)) 0 33.333% / 100% 1px no-repeat,
  linear-gradient(var(--fn-rule), var(--fn-rule)) 0 66.666% / 100% 1px no-repeat; border: 1px solid var(--fn-rule); border-radius: 14px; background-color: var(--card); }
.fn-lane { grid-column: 1; align-self: center; padding-left: 16px; color: var(--muted); }
.fn-lane--1 { grid-row: 1; } .fn-lane--2 { grid-row: 2; } .fn-lane--3 { grid-row: 3; }
.fn-lanes__lines { position: absolute; top: 0; bottom: 0; left: 88px; width: calc(100% - 88px); height: 100%; pointer-events: none; overflow: visible; }
.fn-line { fill: none; stroke: var(--accent); stroke-width: 2; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.fn-line--warn { stroke: var(--fn-amber); stroke-dasharray: 6 5; }
.fn-step { position: relative; align-self: center; margin-block: 14px; padding: 18px 20px; background: var(--surface); border: 1px solid var(--fn-rule); border-radius: 12px; z-index: 1; }
.fn-step--1 { grid-column: 2; grid-row: 1; }
.fn-step--2 { grid-column: 4; grid-row: 2; }
.fn-step--3 { grid-column: 6; grid-row: 3; border-color: var(--accent); background: var(--accent-soft); }
.fn-step__no { display: block; color: var(--accent); margin-bottom: 6px; font-weight: 600; }
.fn-step p { margin-top: 6px; color: var(--muted); font-size: 0.94rem; line-height: 1.5; }
.fn-step::before { content: ""; position: absolute; top: 50%; left: -7px; width: 12px; height: 12px; background: var(--accent); transform: translateY(-50%) rotate(45deg); border-radius: 2px; display: none; }
.fn-step--2::before, .fn-step--3::before { display: block; }
.fn-exception { grid-column: 4; grid-row: 3; align-self: center; justify-self: center; display: inline-flex; align-items: center; gap: 9px; padding: 8px 16px; border-radius: 999px; font-size: 0.86rem; font-weight: 600; color: var(--fn-amber); background: var(--fn-amber-bg); box-shadow: inset 0 0 0 1px var(--fn-amber-line); z-index: 1; }

/* ---------- 5. People: the stamp ---------- */
.fn-people { padding-block: clamp(48px, 7vw, 96px); background: var(--surface); border-block: 1px solid var(--fn-rule); }
.fn-people__grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(28px, 5vw, 64px); align-items: start; }
.fn-stamp { position: relative; padding: clamp(28px, 4vw, 48px); border: 2px solid var(--ink); border-radius: 6px; background: var(--card); outline: 1px solid var(--fn-rule); outline-offset: 5px; }
.fn-stamp__mark { position: absolute; top: 22px; right: 22px; transform: rotate(6deg); padding: 6px 12px; border: 2px solid var(--fn-ok); color: var(--fn-ok); border-radius: 4px; font-weight: 700; }
.fn-stamp .fn-h2 { max-width: 18ch; margin-top: 4px; }
.fn-big { margin-top: 22px; font-size: clamp(1.1rem, 1vw + 0.9rem, 1.35rem); font-weight: 500; line-height: 1.45; letter-spacing: -0.01em; max-width: 34ch; }
.fn-benefit { margin-top: 26px; padding-top: 18px; border-top: 1px dashed var(--fn-rule); color: var(--muted); }
.fn-benefit .fn-mono { display: block; color: var(--accent); margin-bottom: 6px; }
.fn-checks { display: grid; gap: 0; border-top: 2px solid var(--ink); }
.fn-checks li { position: relative; padding: 16px 0 16px 34px; border-bottom: 1px solid var(--fn-rule); color: var(--ink); }
.fn-checks li::before { content: ""; position: absolute; left: 4px; top: 22px; width: 14px; height: 8px; border-left: 2.5px solid var(--fn-ok); border-bottom: 2.5px solid var(--fn-ok); transform: rotate(-45deg); }

/* ---------- 6. Related: table of links, ends in the call to action row ---------- */
.fn-related { padding-block: clamp(56px, 8vw, 104px) 0; }
.fn-links { margin-top: 32px; border-top: 2px solid var(--ink); }
.fn-links li { border-bottom: 1px solid var(--fn-rule); }
.fn-links a { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 22px 12px; transition: background 0.2s, padding 0.2s; }
.fn-links a:hover { background: rgba(var(--accent-rgb), 0.06); padding-inline: 20px; }
.fn-links__t { display: grid; gap: 4px; max-width: 62ch; }
.fn-links__t span:not(.fn-mono) { color: var(--muted); font-size: 0.94rem; }
.fn-links__go { white-space: nowrap; font-weight: 600; color: var(--accent); }
.pg-finance .fn-links__last a { background: var(--navy); color: #fff; border-radius: 0 0 12px 12px; padding: 26px 24px; }
.pg-finance .fn-links__last a:hover { background: var(--accent-fill, var(--accent)); padding-inline: 24px; }
.fn-links__last .fn-mono { color: rgba(255, 255, 255, 0.75); }
.fn-links__last .fn-h3 { font-size: clamp(1.2rem, 1.4vw + 0.9rem, 1.7rem); }
.fn-links__last .fn-links__go { color: #fff; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .fn-hero__grid { grid-template-columns: 1fr; }
  .fn-legend { grid-template-columns: 1fr; }
  .fn-people__grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .fn-notes { grid-template-columns: 1fr; gap: 28px; margin-top: 0; }
  .fn-ruler { margin-top: 36px; }
  .fn-legend__row { grid-template-columns: 1fr; gap: 6px; }
  .fn-table__cap, .fn-table thead th, .fn-table tfoot td { padding-inline: 16px; }
  .fn-col-no { width: 44px; padding-left: 16px !important; }
  .fn-table td { padding-right: 14px; }
  .fn-table tbody th { padding-right: 6px; }
  .fn-tag { white-space: normal; padding: 4px 10px; font-size: 0.8rem; }
  /* swimlane becomes a vertical path */
  .fn-lanes { display: block; padding: 8px 0 8px 22px; background: var(--card); border-radius: 14px; }
  .fn-lanes::before { content: ""; position: absolute; left: 33px; top: 30px; bottom: 30px; width: 2px; background: var(--accent); opacity: 0.4; }
  .fn-lanes__lines { display: none; }
  .fn-lane { display: none; }
  .fn-step { margin: 14px 14px 14px 22px; }
  .fn-step::before { display: block !important; left: -20px; top: 28px; transform: rotate(45deg); }
  .fn-exception { display: inline-flex; margin: 0 14px 14px 22px; }
  .fn-links a { flex-direction: column; align-items: flex-start; gap: 8px; }
  .fn-links__last a { flex-direction: row; align-items: center; }
}
@media (max-width: 760px) {
  .fn-stamp__mark { position: static; display: inline-block; transform: rotate(-2deg); margin-bottom: 18px; }
}
@media (max-width: 420px) {
  .fn-actions .fn-btn { width: 100%; }
}
