/* PositivePayMaker - dark editorial theme. Ivory serif display, emerald accent, hairline borders. */
:root {
  --bg: #0c0d0f;
  --bg-2: #101114;
  --card: #141519;
  --card-2: #17181d;
  --chrome: #1a1b20;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);
  --ink: #eae8e1;
  --muted: #a8a69d;
  --faint: #73726b;
  --accent: #4cc38a;
  --accent-bright: #62d49d;
  --accent-deep: #1e5e41;
  --accent-tint: rgba(76, 195, 138, 0.12);
  --danger: #e0756c;
  --danger-tint: rgba(224, 117, 108, 0.12);
  --warn: #d9a441;
  --warn-tint: rgba(217, 164, 65, 0.12);
  --radius: 14px;
  --serif: Georgia, "Times New Roman", Times, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
}

.wrap { max-width: 1100px; margin: 0 auto; padding: 0 24px; }

a { color: var(--accent); }
a:hover { color: var(--accent-bright); }

/* ---------- Header ---------- */
header.site {
  background: #0e0f12;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 40;
}
header.site .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  padding-bottom: 16px;
}
.logo {
  font-family: var(--serif);
  font-size: 1.2rem;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: 0.02em;
}
.logo .tld { color: var(--accent); font-style: italic; }
nav.main a {
  color: var(--muted);
  text-decoration: none;
  margin-left: 26px;
  font-size: 0.9rem;
}
nav.main a:hover { color: var(--ink); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 84px 0 60px;
  text-align: center;
  background:
    radial-gradient(ellipse 60% 50% at 50% 0%, rgba(76, 195, 138, 0.07), transparent 70%),
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: auto, 56px 56px, 56px 56px;
  background-position: center top;
  border-bottom: 1px solid var(--line);
}
.hero .pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(20, 21, 25, 0.8);
  color: var(--muted);
  font-size: 0.82rem;
  padding: 7px 16px;
  margin-bottom: 30px;
}
.hero .pill::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
}
.hero h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 3.4rem;
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin: 0 auto 22px;
  max-width: 850px;
  color: #f4f2ec;
}
.hero h1 .accent { color: var(--accent); font-style: italic; }
.hero p.sub {
  font-size: 1.08rem;
  color: var(--muted);
  max-width: 620px;
  margin: 0 auto 34px;
}
.hero .cta-row { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero .badges {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 38px;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(20, 21, 25, 0.7);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 15px;
  font-size: 0.82rem;
  color: var(--muted);
}
.badge::before {
  content: "";
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--accent);
  flex: none;
}
.badge a { color: var(--accent); text-decoration: none; }

/* ---------- Stat strip ---------- */
.statstrip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(16, 17, 20, 0.85);
  margin: 48px auto 0;
  max-width: 980px;
  overflow: hidden;
}
.statstrip .cell {
  padding: 26px 16px 22px;
  border-left: 1px solid var(--line);
  text-align: center;
}
.statstrip .cell:first-child { border-left: none; }
.statstrip .num {
  font-family: var(--serif);
  font-size: 2.1rem;
  color: var(--accent);
  line-height: 1.1;
}
.statstrip .lbl {
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--faint);
  margin-top: 8px;
}

/* ---------- Kickers and section headings ---------- */
.kicker {
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--faint);
  text-align: center;
  margin: 0 0 14px;
}
section.content h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 2.1rem;
  letter-spacing: -0.01em;
  text-align: center;
  margin: 0 0 14px;
  color: #f4f2ec;
}
section.content > .wrap > p, section.content p.lede {
  color: var(--muted);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  background: linear-gradient(180deg, var(--accent-bright), var(--accent));
  color: #08110c;
  font-weight: 600;
  border: none;
  border-radius: 9px;
  padding: 13px 26px;
  font-size: 0.98rem;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 0 28px rgba(76, 195, 138, 0.22);
  transition: filter 0.15s, box-shadow 0.15s;
}
.btn:hover { filter: brightness(1.07); box-shadow: 0 0 36px rgba(76, 195, 138, 0.32); color: #08110c; }
.btn.secondary {
  background: rgba(20, 21, 25, 0.8);
  border: 1px solid var(--line-strong);
  color: var(--ink);
  box-shadow: none;
}
.btn.secondary:hover { background: var(--card-2); border-color: rgba(255, 255, 255, 0.26); color: var(--ink); }
.btn.small { padding: 8px 15px; font-size: 0.85rem; }
.btn:disabled { opacity: 0.4; cursor: not-allowed; box-shadow: none; }

/* ---------- App frame (browser chrome) ---------- */
main { padding: 56px 0 80px; }
.frame {
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  background: var(--bg-2);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  margin-bottom: 60px;
}
.frame .chromebar {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--chrome);
  border-bottom: 1px solid var(--line);
  padding: 12px 18px;
}
.frame .dots { display: flex; gap: 7px; }
.frame .dots span {
  width: 11px; height: 11px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  display: block;
}
.frame .urlbar {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--faint);
  font-size: 0.78rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  padding: 5px 14px;
}
.frame .framebody { padding: 26px; }

/* ---------- Cards ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  margin-bottom: 22px;
}
.card h2 {
  margin: 0 0 6px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.45rem;
  color: #f4f2ec;
}
.step-label {
  display: inline-block;
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}

/* ---------- Tabs ---------- */
.tabs { display: flex; gap: 10px; margin-bottom: 24px; flex-wrap: wrap; }
.tabs button {
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 10px 20px;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  font-family: var(--sans);
}
.tabs button:hover { color: var(--ink); border-color: var(--line-strong); }
.tabs button.active {
  background: var(--accent-tint);
  border-color: rgba(76, 195, 138, 0.4);
  color: var(--accent-bright);
}

/* ---------- Dropzone ---------- */
.dropzone {
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background: var(--bg-2);
  padding: 42px 20px;
  text-align: center;
  color: var(--muted);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.dropzone:hover, .dropzone.drag {
  border-color: var(--accent);
  background: rgba(76, 195, 138, 0.05);
}
.dropzone strong { color: var(--ink); }
.dropzone input[type="file"] { display: none; }

textarea.paste {
  width: 100%;
  min-height: 130px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 12px;
  color: var(--ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.84rem;
}
textarea.paste:focus { outline: none; border-color: rgba(76, 195, 138, 0.5); }

/* ---------- Tables ---------- */
table.grid { border-collapse: collapse; width: 100%; font-size: 0.86rem; }
table.grid th, table.grid td {
  border: 1px solid var(--line);
  padding: 9px 12px;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 240px;
  color: var(--muted);
}
table.grid th {
  background: var(--bg-2);
  color: var(--faint);
  font-weight: 600;
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
table.grid td { background: var(--card); }
.table-scroll { overflow-x: auto; border-radius: 8px; }

/* ---------- Mapping grid and inputs ---------- */
.map-grid {
  display: grid;
  grid-template-columns: 200px 1fr 1fr;
  gap: 12px 18px;
  align-items: center;
  margin-top: 16px;
}
.map-grid .lbl { font-weight: 600; font-size: 0.92rem; color: var(--ink); }
.map-grid .hint { color: var(--faint); font-size: 0.8rem; }
select, input[type="text"], input[type="number"] {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 0.92rem;
  color: var(--ink);
  width: 100%;
  font-family: var(--sans);
}
select:focus, input:focus { outline: none; border-color: rgba(76, 195, 138, 0.5); }
select option { background: var(--card); color: var(--ink); }
.req::after { content: " *"; color: var(--accent); }

/* ---------- File preview ---------- */
pre.filepreview {
  background: #07080a;
  border: 1px solid var(--line);
  color: #c8e6d4;
  border-radius: 10px;
  padding: 18px;
  overflow-x: auto;
  font-size: 0.8rem;
  line-height: 1.55;
  max-height: 320px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

/* ---------- Validation messages ---------- */
ul.issues { list-style: none; padding: 0; margin: 14px 0; }
ul.issues li {
  padding: 9px 14px;
  border-radius: 8px;
  margin-bottom: 7px;
  font-size: 0.87rem;
  border: 1px solid transparent;
}
ul.issues li.err { background: var(--danger-tint); border-color: rgba(224, 117, 108, 0.25); color: var(--danger); }
ul.issues li.warn { background: var(--warn-tint); border-color: rgba(217, 164, 65, 0.25); color: var(--warn); }
ul.issues li.ok { background: var(--accent-tint); border-color: rgba(76, 195, 138, 0.25); color: var(--accent-bright); }

/* ---------- In-app stats row ---------- */
.stats { display: flex; gap: 0; flex-wrap: wrap; margin: 16px 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.stats .stat {
  flex: 1 1 120px;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
  padding: 16px 18px 14px;
  border-left: 1px solid var(--line);
  background: var(--bg-2);
}
.stats .stat:first-child { border-left: none; }
.stats .stat b {
  display: block;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.5rem;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink);
  margin-bottom: 4px;
}

/* ---------- Content sections ---------- */
section.content { padding: 56px 0 10px; }
.cols-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 18px; margin-top: 30px; }
.feature {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
}
.feature h3 {
  margin: 0 0 8px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.12rem;
  color: #f4f2ec;
}
.feature p { margin: 0; color: var(--muted); font-size: 0.92rem; }

/* ---------- FAQ ---------- */
details.faq {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px 20px;
  margin-bottom: 10px;
}
details.faq summary { font-weight: 600; cursor: pointer; color: var(--ink); }
details.faq summary:hover { color: var(--accent-bright); }
details.faq p { color: var(--muted); margin-bottom: 0; }

/* ---------- Confidence pills ---------- */
.pill { display: inline-block; border-radius: 999px; font-size: 0.7rem; font-weight: 600; padding: 3px 11px; letter-spacing: 0.06em; }
.pill.verified { background: var(--accent-tint); color: var(--accent-bright); border: 1px solid rgba(76, 195, 138, 0.3); }
.pill.reconstructed { background: var(--warn-tint); color: var(--warn); border: 1px solid rgba(217, 164, 65, 0.3); }
.pill.custom { background: rgba(255, 255, 255, 0.06); color: var(--muted); border: 1px solid var(--line); }

/* ---------- Modal ---------- */
.modal-back {
  position: fixed; inset: 0;
  background: rgba(5, 6, 8, 0.75);
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 48px 16px;
  overflow-y: auto;
  z-index: 50;
}
.modal-back.open { display: flex; }
.modal {
  background: var(--card);
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  max-width: 780px;
  width: 100%;
  padding: 30px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
}
.modal h3 { margin-top: 0; font-family: var(--serif); font-weight: 400; font-size: 1.4rem; }
.modal h4 { color: var(--ink); }

/* ---------- Footer ---------- */
footer.site {
  background: var(--bg-2);
  border-top: 1px solid var(--line);
  color: var(--faint);
  padding: 40px 0;
  font-size: 0.86rem;
  margin-top: 40px;
}
footer.site a { color: var(--muted); }
footer.site a:hover { color: var(--accent-bright); }
.footnote { color: var(--faint); font-size: 0.82rem; }

.hidden { display: none !important; }

/* ---------- Article pages (guides, bank pages) ---------- */
article h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 2.5rem;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: #f4f2ec;
}
article h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.6rem;
  color: #f4f2ec;
  margin-top: 38px;
}
article h3 { color: var(--ink); }
article p, article li { color: var(--muted); }
article strong { color: var(--ink); }
article code {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 1px 6px;
  font-size: 0.85em;
  color: var(--accent-bright);
}

/* ---------- Format library legend ---------- */
.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  max-width: 960px;
  margin: 0 auto 18px;
}
.legend-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 18px 8px 9px;
  font-size: 0.84rem;
  color: var(--muted);
}
.legend-item .pill { flex: none; }

/* ---------- Format library cards (masonry) ---------- */
.fmt-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 18px;
  margin-top: 12px;
}
.fmt-card {
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 24px 24px 20px;
  transition: border-color 0.15s, transform 0.15s;
}
.fmt-card:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.fmt-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.fmt-card .type { font-size: 0.62rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--faint); }
.fmt-card h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.16rem;
  color: #f4f2ec;
  margin: 0 0 12px;
  line-height: 1.3;
}
.fmt-card .notes {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0;
  line-height: 1.55;
}
.fmt-card .links {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 0.84rem;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.fmt-card .links a:first-child { font-weight: 600; }
.fmt-card .links .dot { color: var(--faint); }
.linkbtn { background: none; border: none; color: var(--danger); cursor: pointer; font: inherit; padding: 0; }
.linkbtn:hover { text-decoration: underline; }

/* ---------- Ad slots (Google AdSense) ---------- */
.ad-slot {
  margin: 34px auto;
  max-width: 980px;
  text-align: center;
  min-height: 100px;
}
.ad-slot::before {
  content: "Advertisement";
  display: block;
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 6px;
}
.ad-slot .adsbygoogle { display: block; }
.ad-slot.empty { display: none; }

/* ---------- Cookie notice ---------- */
.cookie-banner {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  max-width: 760px;
  margin: 0 auto;
  background: var(--card-2);
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.5);
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
  font-size: 0.86rem;
  color: var(--muted);
  z-index: 60;
}
.cookie-banner p { margin: 0; flex: 1 1 320px; }
.cookie-banner a { color: var(--accent); }

/* ---------- Legal / article footer cross-links ---------- */
.legal-links { font-size: 0.82rem; }

@media (max-width: 760px) {
  /* Header: logo centered on top, nav as a tidy centered row below */
  header.site .wrap { flex-direction: column; gap: 11px; padding-top: 13px; padding-bottom: 13px; }
  nav.main { display: flex; flex-wrap: wrap; justify-content: center; gap: 7px 18px; max-width: 100%; }
  nav.main a { margin-left: 0; font-size: 0.86rem; }

  /* Hero: drop the decorative badge cluster, tighten spacing */
  .hero { padding: 48px 0 40px; }
  .hero h1 { font-size: 2.1rem; }
  .hero p.sub { font-size: 1rem; }
  .hero .pill { font-size: 0.76rem; padding: 6px 13px; margin-bottom: 22px; }
  .hero .badges { display: none; }
  .hero .cta-row { flex-direction: column; align-items: stretch; gap: 10px; }
  .hero .cta-row .btn { width: 100%; text-align: center; }

  /* Stat strip a touch smaller */
  .statstrip { grid-template-columns: repeat(2, 1fr); margin-top: 36px; }
  .statstrip .cell:nth-child(3) { border-left: none; }
  .statstrip .cell:nth-child(n+3) { border-top: 1px solid var(--line); }
  .statstrip .num { font-size: 1.75rem; }
  .statstrip .cell { padding: 20px 12px 18px; }

  /* Converter + content */
  .map-grid { grid-template-columns: 1fr; gap: 8px; }
  .frame { border-radius: 12px; }
  .frame .framebody { padding: 14px; }
  .card { padding: 20px 18px; }
  section.content { padding: 40px 0 6px; }
  section.content h2 { font-size: 1.55rem; }
  .legend-item { font-size: 0.8rem; }
  .ad-slot { margin: 24px auto; }
  article h1 { font-size: 1.95rem; }
  article h2 { font-size: 1.4rem; }
}
