/* Layout concept: a market-stall ledger. Clean paper ground, ink type, one produce-green accent,
   with a plain savings calculator card. One sans-serif family throughout. */
/* Layout concept: clean corporate payments site. White ground, navy ink, one royal-blue accent,
   a rounded dark hero card, and the register receipt as the signature savings object. */
:root {
  --paper: #ffffff;
  --surface: #ffffff;
  --tint: #f3f6fb;
  --ink: #1b2440;
  --muted: #5a6480;
  --line: #e1e6f0;
  --accent: #1f5fd6;
  --accent-ink: #ffffff;
  --accent-soft: #eaf1fd;
  --money: #12936a;
  --flag: #d98a1c;
  --flag-soft: #fbf0dc;
  --receipt: #ffffff;
  --hero-a: #0f1830;
  --hero-b: #1c3570;
  --display: "Figtree", "Helvetica Neue", Arial, system-ui, sans-serif;
  --body: "Figtree", "Helvetica Neue", Arial, system-ui, sans-serif;
  --mono: var(--body);
  --radius: 14px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0e1424; --surface: #151d33; --tint: #121a2e; --ink: #e9edf7; --muted: #a3adc6; --line: #26304a;
    --accent: #6a9bff; --accent-ink: #0b1226; --accent-soft: #1a2747; --money: #4cd3a2; --flag: #f0aa4a; --flag-soft: #33281a;
    --receipt: #182039; --hero-a: #0a1020; --hero-b: #18306a; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #0e1424; --surface: #151d33; --tint: #121a2e; --ink: #e9edf7; --muted: #a3adc6; --line: #26304a;
  --accent: #6a9bff; --accent-ink: #0b1226; --accent-soft: #1a2747; --money: #4cd3a2; --flag: #f0aa4a; --flag-soft: #33281a;
  --receipt: #182039; --hero-a: #0a1020; --hero-b: #18306a; color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--body); font-size: 17px; line-height: 1.6;
}
a { color: var(--accent); text-underline-offset: 3px; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible {
  outline: 3px solid var(--flag); outline-offset: 2px;
}
h1, h2, h3 { font-family: var(--display); line-height: 1.12; text-wrap: balance; margin: 0; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); font-weight: 700; }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.2rem); font-weight: 650; }
h3 { font-size: 1.2rem; font-weight: 650; }
p { margin: 0; }

.wrap {
  max-width: 1120px; margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.prose { max-width: 68ch; display: grid; gap: 1rem; }
.prose h2 { margin-top: 1.4rem; }
.prose ul, .prose ol { margin: 0; padding-left: 1.3rem; display: grid; gap: .4rem; }

/* Header */
.site-header { border-bottom: 1px solid var(--line); background: var(--surface); position: sticky; top: env(safe-area-inset-top, 0px); z-index: 15; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 14px; flex-wrap: wrap; }
.brand { font-family: var(--display); font-weight: 700; font-size: 1.3rem; color: var(--ink); text-decoration: none; display: flex; align-items: center; gap: 8px; }
.brand-mark { width: 28px; height: 28px; border-radius: 8px; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-size: .85rem; font-family: var(--mono); }
.nav { display: flex; gap: 18px; flex-wrap: wrap; align-items: center; font-size: .95rem; }
.nav a { color: var(--ink); text-decoration: none; }
.nav a:hover { color: var(--accent); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--accent); color: var(--accent-ink); border: 0; border-radius: 8px;
  padding: 13px 24px; font: 600 1rem var(--body); text-decoration: none; cursor: pointer;
}
.btn:hover { filter: brightness(1.08); }
.btn.small { padding: 8px 16px; font-size: .92rem; }
.btn.ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--line); }

.label { font-size: .95rem; font-weight: 700; color: var(--ink); }
.tag { font-size: .88rem; font-weight: 600; color: var(--accent); }

/* Sections */
section { padding-block: 64px; }
section + section { border-top: 1px solid var(--line); }
#industries, #how { background: var(--tint); }
.section-head { display: grid; gap: 10px; margin-bottom: 28px; max-width: 68ch; }
.section-head p { color: var(--muted); }

/* Hero: rounded dark card, centered */
.hero { padding-block: 24px 8px; border-top: 0 !important; }
.hero-card {
  border-radius: 22px; color: #fff; text-align: center;
  background: var(--hero-a);
  padding: clamp(48px, 8vw, 96px) clamp(20px, 5vw, 64px);
  display: grid; gap: 22px; justify-items: center;
}
.hero-card h1 { max-width: 20ch; color: #fff; }
.hero-card .lede { font-size: 1.15rem; color: rgba(255,255,255,.82); max-width: 56ch; }
.hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.btn.light { background: #fff; color: #1b2440; }
.trust { display: flex; gap: 18px; flex-wrap: wrap; justify-content: center; font-size: .92rem; color: rgba(255,255,255,.78); }
.trust span::before { content: "✓ "; color: #6be0b4; font-weight: 700; }
.hl { background: linear-gradient(transparent 62%, var(--flag-soft) 62%); }

/* Savings section */
.savings .wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.savings-copy { display: grid; gap: 16px; justify-items: start; min-width: 0; }
.savings-copy p { color: var(--muted); max-width: 52ch; }

/* Receipt calculator */
.receipt {
  background: var(--receipt); border: 1px solid var(--line); border-radius: var(--radius);
  font-size: .98rem; padding: 26px; box-shadow: 0 1px 3px rgba(20, 30, 60, .08);
  font-variant-numeric: tabular-nums; min-width: 0;
}
.receipt h3 { font-size: 1.15rem; }
.receipt .sub { text-align: center; color: var(--muted); font-size: .78rem; margin-top: 2px; }
.receipt hr { border: 0; border-top: 1px solid var(--line); margin: 16px 0; }
.r-row { display: flex; justify-content: space-between; gap: 12px; }
.r-row.total { font-weight: 700; font-size: 1.05rem; }
.r-row.total span:last-child { color: var(--money); }
.receipt label { display: block; font-size: .92rem; color: var(--muted); margin: 10px 0 4px; }
.receipt input[type=range] { width: 100%; accent-color: var(--accent); }
.receipt output { font-weight: 700; }
.receipt .fine { font-size: .82rem; color: var(--muted); margin-top: 12px; line-height: 1.45; }

/* Compare table */
.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table { border-collapse: collapse; width: 100%; min-width: 620px; font-size: .95rem; }
th, td { text-align: left; padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
thead th { font-size: .9rem; color: var(--muted); font-weight: 600; background: var(--tint); }
tbody tr:last-child td { border-bottom: 0; }
td:first-child { font-weight: 600; }

/* Steps */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; counter-reset: s; }
.steps li { counter-increment: s; display: grid; gap: 10px; align-content: start; }
.steps li::before { content: counter(s); width: 32px; height: 32px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-weight: 700; display: grid; place-items: center; }
.steps p { color: var(--muted); font-size: .96rem; }

/* Guides */
.guides { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.guide-card {
  background: var(--surface); box-shadow: 0 1px 2px rgba(20,30,60,.05); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; display: grid; gap: 10px; align-content: start; text-decoration: none; color: var(--ink);
}
.guide-card:hover { border-color: var(--accent); }
.guide-card p { color: var(--muted); font-size: .96rem; }
.guide-card .go { color: var(--accent); font-weight: 600; font-size: .95rem; }

/* Callout */
.callout { background: var(--flag-soft); border-radius: var(--radius); padding: 20px 22px; display: grid; gap: 8px; }
.callout strong { font-family: var(--display); }
.rules { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 32px; list-style: none; padding: 0; margin: 0; }
.rules li { padding-left: 26px; position: relative; }
.rules li::before { content: "!"; position: absolute; left: 0; top: 2px; width: 18px; height: 18px; border-radius: 50%; background: var(--flag); color: var(--surface); font: 700 .75rem/18px var(--mono); text-align: center; }

/* Quote form */
.quote { background: var(--accent-soft); }
.quote .wrap { display: grid; grid-template-columns: .8fr 1.2fr; gap: 48px; align-items: start; }
.quote-intro { display: grid; gap: 14px; min-width: 0; }
.quote-intro ul { margin: 0; padding-left: 1.2rem; display: grid; gap: 6px; }
form.lead { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; min-width: 0; }
.field { display: grid; gap: 6px; min-width: 0; }
.field.full { grid-column: 1 / -1; }
.field label, .field legend { font-size: .9rem; font-weight: 600; }
.field input, .field select {
  font: inherit; font-size: 1rem; padding: 10px 12px; border: 1.5px solid var(--line);
  border-radius: 8px; background: var(--paper); color: var(--ink); width: 100%;
}
fieldset.field { border: 0; padding: 0; margin: 0; }
.pills { display: flex; gap: 8px; flex-wrap: wrap; }
.pills label { font-weight: 500; border: 1.5px solid var(--line); border-radius: 999px; padding: 6px 14px; cursor: pointer; background: var(--paper); }
.pills input { position: absolute; opacity: 0; pointer-events: none; }
.pills input:checked + span { color: var(--accent); font-weight: 700; }
.pills label:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.pills label:has(input:focus-visible) { outline: 3px solid var(--flag); outline-offset: 2px; }
.consent { font-size: .82rem; color: var(--muted); display: flex; gap: 10px; align-items: flex-start; }
.consent input { margin-top: 4px; accent-color: var(--accent); }
.form-error { color: #b3261e; font-size: .9rem; }
.thanks { grid-column: 1 / -1; display: grid; gap: 8px; }
.thanks h3 { color: var(--accent); }

/* Multi-step form */
.progress { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.progress span { height: 5px; border-radius: 3px; background: var(--line); }
.progress span.on { background: var(--accent); }
.step-label { margin-top: -6px; font-size: .9rem; color: var(--muted); font-weight: 600; }
.step { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.step[hidden] { display: none !important; }
.form-nav { display: flex; gap: 10px; justify-content: space-between; flex-wrap: wrap; }
.form-nav .btn:last-child, .form-nav #next { margin-left: auto; }
.opt { font-weight: 400; color: var(--muted); }
.hint { font-size: .85rem; color: var(--muted); }
.drop { display: grid; gap: 4px; place-items: center; text-align: center; border: 2px dashed var(--line); border-radius: 10px; padding: 22px 16px; cursor: pointer; background: var(--paper); font-weight: 400 !important; }
.drop:hover, .drop:focus-within { border-color: var(--accent); }
.drop input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.drop strong { color: var(--accent); }
.drop-file { font-size: .9rem; color: var(--accent); overflow-wrap: anywhere; }
.call-line { font-weight: 600; }
.phone, .nav-phone { font-weight: 700; color: var(--accent); white-space: nowrap; }
.nav-phone { text-decoration: none; }

/* Sticky mobile call bar */
.callbar { display: none; }
@media (max-width: 700px) {
  .callbar {
    display: grid; grid-template-columns: 1fr 1fr; gap: 8px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
    background: var(--surface); border-top: 1px solid var(--line);
    padding-top: 10px; padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    padding-left: max(12px, env(safe-area-inset-left, 0px)); padding-right: max(12px, env(safe-area-inset-right, 0px));
  }
  .callbar a { text-align: center; padding: 12px 8px; border-radius: 999px; font-weight: 700; text-decoration: none; font-size: .95rem; }
  .callbar-call { border: 1.5px solid var(--accent); color: var(--accent); }
  .callbar-quote { background: var(--accent); color: var(--accent-ink); }
  body { padding-bottom: 76px; }
  .nav-phone { display: none; }
}

/* FAQ */
.faq { display: grid; gap: 10px; max-width: 78ch; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 20px; }
.faq summary { font-weight: 600; cursor: pointer; font-size: 1.05rem; }
.faq details p { margin-top: 10px; color: var(--muted); }

/* Article pages */
.article-hero { padding-block: 56px 24px; }
.article-hero .wrap { display: grid; gap: 16px; }
.crumbs { font-size: .9rem; color: var(--muted); }
.crumbs a { color: var(--muted); }
.article-body { padding-block: 24px 64px; border-top: 0 !important; }
.article-body .wrap { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 56px; align-items: start; }
.aside { position: sticky; top: 24px; display: grid; gap: 16px; }
.aside .card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; display: grid; gap: 10px; }
.aside .card p { color: var(--muted); font-size: .95rem; }

/* Footer */
.site-footer { background: var(--surface); border-top: 1px solid var(--line); padding-block: 40px; font-size: .9rem; color: var(--muted); }
.site-footer .wrap { display: grid; gap: 14px; }
.foot-links { display: flex; gap: 18px; flex-wrap: wrap; }
.foot-links a { color: var(--ink); }

@media (max-width: 900px) {
  .savings .wrap, .quote .wrap, .article-body .wrap { grid-template-columns: 1fr; gap: 32px; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .guides { grid-template-columns: 1fr; }
  .aside { position: static; }
}
@media (max-width: 560px) {
  section { padding-block: 44px; }
  .steps, .rules { grid-template-columns: 1fr; }
  form.lead, .step { grid-template-columns: 1fr; } form.lead { padding: 20px; }
  .nav { gap: 12px; font-size: .9rem; }
}

/* Paint the safe-area band above the sticky header */
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 16; background: var(--surface); }
.article-hero { background: var(--tint); }
.quote h2 { color: var(--ink); }

/* Photos */
.hero-card { position: relative; overflow: hidden; isolation: isolate; }
.hero-card::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(rgba(12,20,40,.68), rgba(12,20,40,.68)), var(--hero-img, none) center / cover no-repeat;
}
.savings-photo { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: var(--radius); max-width: 100%; background: var(--line); }
.guide-card { padding: 0; overflow: hidden; gap: 0; }
.tile-photo { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; display: block; max-width: 100%; background: var(--line); }
.tile-body { padding: 20px; display: grid; gap: 8px; }
.guide-card:hover .tile-photo { filter: brightness(1.05); }
.people .wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.people-photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); max-width: 100%; display: block; background: var(--line); }
.people-copy { display: grid; gap: 16px; justify-items: start; min-width: 0; }
.people-copy p { color: var(--muted); }
.checks { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.checks li::before { content: "✓  "; color: var(--money); font-weight: 700; }
.article-photo { width: 100%; max-width: 100%; aspect-ratio: 21 / 8; object-fit: cover; border-radius: var(--radius); margin-top: 12px; background: var(--line); }
@media (max-width: 900px) {
  .guides { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .people .wrap { grid-template-columns: 1fr; gap: 28px; }
  .article-photo { aspect-ratio: 16 / 9; }
}
@media (max-width: 560px) { .guides { grid-template-columns: 1fr; } }

/* Conversion pieces */
.quick { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; width: 100%; max-width: 760px;
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.22); border-radius: 12px; padding: 10px; }
.quick select { flex: 1 1 200px; min-width: 0; font: inherit; font-size: 1rem; padding: 12px 14px; border-radius: 8px;
  border: 0; background: #fff; color: #1b2440; }
.quick .btn { flex: 0 0 auto; background: #12936a; color: #fff; }
.quick-note { font-size: .9rem; color: rgba(255,255,255,.75); }
.cta-sub { font-size: .95rem; }
.cta-sub strong { color: var(--money); font-variant-numeric: tabular-nums; }
.next-steps { list-style: none; padding: 0; margin: 4px 0; display: grid; gap: 14px; counter-reset: n; }
.next-steps li { counter-increment: n; display: grid; grid-template-columns: 34px 1fr; column-gap: 12px; }
.next-steps li::before { content: counter(n); grid-row: span 2; width: 30px; height: 30px; border-radius: 50%;
  background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-weight: 700; font-size: .9rem; }
.next-steps span { color: var(--muted); font-size: .95rem; }
@media (max-width: 560px) { .quick .btn { flex: 1 1 100%; } }

/* Legit polish: logo, footer, bylines, legal pages */
.brand { gap: 10px; }
.brand-mark { width: 34px; height: 34px; border-radius: 9px; font-size: .9rem; font-weight: 700; box-shadow: inset 0 -3px 0 rgba(0,0,0,.18); }
.brand-text { display: grid; line-height: 1.05; }
.brand-text strong { font-size: 1.2rem; font-weight: 800; letter-spacing: -.02em; }
.brand-text small { font-size: .8rem; font-weight: 500; color: var(--muted); }
.byline { font-size: .9rem; color: var(--muted); }
table.mini { min-width: 480px; }
.prose .table-scroll { margin-block: 4px; }
.article-body.single .wrap { grid-template-columns: minmax(0, 1fr); }
.contact-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.contact-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; display: grid; gap: 6px; align-content: start; min-width: 0; }
.contact-card .big { font-size: 1.15rem; font-weight: 700; overflow-wrap: anywhere; }
.contact-card p:last-child { color: var(--muted); font-size: .92rem; }
.site-footer { padding-block: 56px 40px; }
.site-footer .wrap { gap: 32px; }
.foot-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 32px; }
.foot-brand { display: grid; gap: 12px; align-content: start; min-width: 0; }
.foot-brand .brand-text strong { color: var(--ink); }
.foot-col { display: grid; gap: 10px; align-content: start; }
.foot-col a { color: var(--ink); text-decoration: none; }
.foot-col a:hover { color: var(--accent); }
.foot-contact { line-height: 1.8; }
.foot-fine { border-top: 1px solid var(--line); padding-top: 20px; display: grid; gap: 10px; font-size: .84rem; }
@media (max-width: 900px) { .foot-grid { grid-template-columns: 1fr 1fr; } .contact-cards { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .foot-grid { grid-template-columns: 1fr; } }

.receipt, table, .cta-sub strong { font-variant-numeric: tabular-nums; }
.savings-photo, .people-photo img { justify-self: stretch; height: auto; }
.savings-copy > *, .people-copy > * { max-width: 100%; }

.nav a.btn, .nav a.btn:hover { color: var(--accent-ink); }

/* Five industry tiles: 3 on top, 2 wider below */
@media (min-width: 901px) {
  #industries .guides { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  #industries .guide-card { grid-column: span 2; }
  #industries .guide-card:nth-child(n+4) { grid-column: span 3; }
  #industries .guide-card:nth-child(n+4) .tile-photo { aspect-ratio: 16 / 7; }
}
.tile-photo, .article-photo, .savings-photo, .people-photo img { height: auto; }
.guide-card { grid-template-columns: minmax(0, 1fr); }
