/* ============================================================
   Money Parler — styles.css
   One stylesheet for every page. ALL colors come from the
   CSS variables in :root — re-skinning the site is a
   variable-value swap only. No color literals outside :root.

   *** MONEY PARLER BRAND PALETTE — EMERALD + CREAM ***
   Locked by Kevon 2026-10-21. Deliberately distinct from
   Tokrah's dark + gold branding. To re-skin, swap the
   values in :root; nothing else in this file — or any
   page — needs to change.
   ============================================================ */

:root {
  /* --- MONEY PARLER: EMERALD + CREAM (locked 2026-10-21) --- */
  --bg: #FAF6EE;
  --bg-raised: #F3EDDD;
  --surface: #FFFDF8;
  --surface-2: #F5EFE0;
  --line: #E4DCC6;
  --text: #0E2A21;
  --text-soft: #33544A;
  --muted: #5F7A6E;
  --faint: #93A89D;
  --accent: #0B8A5F;
  --accent-bright: #10A96F;
  --accent-deep: #06402C;
  --positive: #0B8A5F;
  --on-accent: #ffffff;

  /* Derived from the palette — also swap-safe */
  --accent-dim: color-mix(in srgb, var(--accent) 10%, transparent);
  --line-accent: color-mix(in srgb, var(--accent) 35%, transparent);
  --header-bg: color-mix(in srgb, var(--bg) 88%, transparent);
  --shadow: 0 18px 50px rgba(15, 15, 20, 0.14);
  --shadow-accent: 0 8px 24px color-mix(in srgb, var(--accent) 30%, transparent);

  /* Type */
  --font-display: "Fraunces", "Georgia", serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif;

  /* Shape & space */
  --radius: 16px;
  --radius-sm: 10px;
  --wrap: 1120px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: var(--accent-bright);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

::selection {
  background: var(--accent);
  color: var(--on-accent);
}

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding-left: 20px;
  padding-right: 20px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: var(--on-accent);
  padding: 10px 16px;
  font-weight: 600;
  z-index: 100;
}

.skip-link:focus {
  left: 12px;
  top: 12px;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--header-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 14px;
  padding-bottom: 14px;
  flex-wrap: wrap;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.brand:hover {
  text-decoration: none;
}

.brand .brand-mark {
  flex: none;
  color: var(--accent);
}

.brand em {
  font-style: normal;
  color: var(--accent);
}

.site-nav {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.site-nav a {
  color: var(--text-soft);
  font-size: 0.95rem;
  font-weight: 500;
  padding: 8px 13px;
  border-radius: 999px;
}

.site-nav a:hover {
  color: var(--accent-bright);
  background: var(--accent-dim);
  text-decoration: none;
}

.site-nav a[aria-current="page"] {
  color: var(--accent-bright);
  background: var(--accent-dim);
}

/* ---------- Hero ---------- */

.hero {
  padding: 64px 0 56px;
  background:
    radial-gradient(640px 340px at 85% -60px, var(--accent-dim), transparent 70%),
    var(--bg);
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  display: inline-block;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin: 0 0 16px;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: 2.6rem;
  line-height: 1.08;
  font-weight: 700;
  margin: 0 0 18px;
  max-width: 15ch;
}

.hero h1 .accent {
  color: var(--accent);
}

.hero .lede {
  color: var(--muted);
  font-size: 1.13rem;
  line-height: 1.65;
  max-width: 56ch;
  margin: 0 0 28px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  padding: 13px 24px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.98rem;
  border: 1px solid transparent;
  cursor: pointer;
}

.btn:hover {
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(180deg, var(--accent-bright), var(--accent));
  color: var(--on-accent);
  box-shadow: var(--shadow-accent);
}

.btn-primary:hover {
  filter: brightness(1.08);
}

.btn-ghost {
  border-color: var(--line-accent);
  color: var(--accent-bright);
  background: transparent;
}

.btn-ghost:hover {
  background: var(--accent-dim);
}

/* Hero visual: the 50/30/20 split card */
.hero-card {
  margin-top: 44px;
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  max-width: 640px;
}

.hero-card h2 {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 14px;
}

.split-bar {
  display: flex;
  height: 18px;
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 14px;
}

.split-bar .seg-needs {
  flex: 50;
  background: var(--accent);
}

.split-bar .seg-wants {
  flex: 30;
  background: var(--accent-deep);
}

.split-bar .seg-save {
  flex: 20;
  background: var(--positive);
}

.split-legend {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.9rem;
  color: var(--text-soft);
}

.split-legend .dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  margin-right: 7px;
}

.dot-accent { background: var(--accent); }
.dot-deep { background: var(--accent-deep); }
.dot-positive { background: var(--positive); }

.hero-card p {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 0.94rem;
}

/* ---------- Sections ---------- */

.section {
  padding: 60px 0;
}

.section + .section {
  border-top: 1px solid var(--line);
}

.section-head {
  max-width: 640px;
  margin-bottom: 34px;
}

.section-head h2 {
  font-family: var(--font-display);
  font-size: 1.9rem;
  line-height: 1.15;
  margin: 0 0 10px;
}

.section-head p {
  color: var(--muted);
  margin: 0;
  font-size: 1.02rem;
}

/* ---------- Article cards ---------- */

.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

.card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  transition: border-color 0.18s ease, transform 0.18s ease;
}

.card:hover {
  border-color: var(--line-accent);
  transform: translateY(-3px);
}

.card .tag {
  align-self: flex-start;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-dim);
  border: 1px solid var(--line-accent);
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 16px;
}

.card h3 {
  font-family: var(--font-display);
  font-size: 1.32rem;
  line-height: 1.25;
  margin: 0 0 10px;
}

.card h3 a {
  color: var(--text);
}

.card h3 a:hover {
  color: var(--accent-bright);
  text-decoration: none;
}

.card p {
  color: var(--muted);
  margin: 0 0 18px;
  font-size: 0.97rem;
  flex: 1;
}

.card .meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--faint);
  font-size: 0.85rem;
  border-top: 1px solid var(--line);
  padding-top: 15px;
}

.card .read-more {
  font-weight: 600;
  font-size: 0.9rem;
  white-space: nowrap;
}

/* ---------- Topic tiles ---------- */

.tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(168px, 1fr));
  gap: 14px;
}

.tile {
  display: block;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 20px;
  color: var(--text);
  transition: border-color 0.18s ease, transform 0.18s ease;
}

.tile:hover {
  border-color: var(--line-accent);
  transform: translateY(-3px);
  text-decoration: none;
}

.tile .tile-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--line-accent);
  background: var(--accent-dim);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}

.tile h3 {
  font-family: var(--font-display);
  font-size: 1.08rem;
  margin: 0 0 5px;
}

.tile p {
  color: var(--muted);
  font-size: 0.88rem;
  margin: 0;
  line-height: 1.5;
}

/* ---------- About blurb / two-column ---------- */

.two-col {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
}

.two-col p {
  color: var(--text-soft);
  margin: 0 0 14px;
  font-size: 1.02rem;
}

.stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.stat {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 18px 14px;
  text-align: center;
}

.stat .stat-num {
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--accent);
  display: block;
}

.stat .stat-label {
  color: var(--muted);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
}

/* ---------- Newsletter ---------- */

.newsletter {
  background:
    radial-gradient(520px 260px at 90% -40px, var(--accent-dim), transparent 70%),
    var(--bg-raised);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.newsletter-inner {
  max-width: 620px;
}

.newsletter h2 {
  font-family: var(--font-display);
  font-size: 1.8rem;
  margin: 0 0 10px;
}

.newsletter p {
  color: var(--muted);
  margin: 0 0 22px;
}

.signup-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.signup-form label {
  font-weight: 600;
  font-size: 0.92rem;
}

.signup-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.signup-form input[type="email"] {
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 13px 20px;
  color: var(--text);
  font: inherit;
  font-size: 0.98rem;
}

.signup-form input[type="email"]::placeholder {
  color: var(--faint);
}

.signup-form input[type="email"]:focus {
  border-color: var(--accent);
  outline: none;
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.form-note {
  color: var(--faint);
  font-size: 0.85rem;
  margin: 4px 0 0;
}

/* ---------- Article pages ---------- */

.article-hero {
  padding: 56px 0 8px;
}

.article-hero .tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-dim);
  border: 1px solid var(--line-accent);
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 18px;
}

.article-hero h1 {
  font-family: var(--font-display);
  font-size: 2.3rem;
  line-height: 1.12;
  margin: 0 0 14px;
  max-width: 22ch;
}

.article-hero .standfirst {
  color: var(--muted);
  font-size: 1.12rem;
  line-height: 1.65;
  max-width: 60ch;
  margin: 0 0 18px;
}

.article-meta {
  color: var(--faint);
  font-size: 0.9rem;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.prose {
  max-width: 720px;
  padding-bottom: 12px;
}

.prose p {
  color: var(--text-soft);
  font-size: 1.05rem;
  line-height: 1.78;
  margin: 0 0 20px;
}

.prose h2 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  line-height: 1.2;
  margin: 42px 0 14px;
  color: var(--text);
}

.prose h3 {
  font-family: var(--font-display);
  font-size: 1.22rem;
  margin: 30px 0 10px;
  color: var(--text);
}

.prose ul,
.prose ol {
  color: var(--text-soft);
  font-size: 1.03rem;
  line-height: 1.7;
  margin: 0 0 20px;
  padding-left: 24px;
}

.prose li {
  margin-bottom: 8px;
}

.prose strong {
  color: var(--text);
}

.prose a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.callout {
  background: var(--accent-dim);
  border: 1px solid var(--line-accent);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 20px 22px;
  margin: 28px 0;
}

.callout h3,
.callout h4 {
  font-family: var(--font-display);
  margin: 0 0 10px;
  font-size: 1.08rem;
  color: var(--accent-bright);
}

.callout p,
.callout li {
  color: var(--text-soft);
}

.callout p:last-child,
.callout ul:last-child {
  margin-bottom: 0;
}

.callout ul {
  margin-bottom: 0;
}

.table-scroll {
  overflow-x: auto;
  margin: 24px 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.97rem;
  min-width: 480px;
}

.prose th,
.prose td {
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  color: var(--text-soft);
  vertical-align: top;
}

.prose thead th {
  color: var(--accent-bright);
  font-size: 0.8rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  background: var(--surface);
  border-bottom: 1px solid var(--line-accent);
}

.prose tbody tr:last-child th,
.prose tbody tr:last-child td {
  border-bottom: none;
}

.prose tr.total th,
.prose tr.total td {
  color: var(--text);
  font-weight: 700;
  background: var(--surface);
}

.num {
  text-align: right !important;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.related {
  border-top: 1px solid var(--line);
  margin-top: 48px;
}

.article-cta {
  margin: 36px 0 8px;
  background: var(--surface);
  border: 1px solid var(--line-accent);
  border-radius: var(--radius);
  padding: 26px;
}

.article-cta h3 {
  font-family: var(--font-display);
  margin: 0 0 8px;
  font-size: 1.25rem;
}

.article-cta p {
  color: var(--muted);
  margin: 0 0 16px;
  font-size: 0.98rem;
}

/* ---------- About page ---------- */

.page-hero {
  padding: 56px 0 10px;
}

.page-hero h1 {
  font-family: var(--font-display);
  font-size: 2.4rem;
  line-height: 1.12;
  margin: 0 0 14px;
}

.page-hero .lede {
  color: var(--muted);
  font-size: 1.12rem;
  max-width: 60ch;
  margin: 0;
}

.values-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.value-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
}

.value-card h3 {
  font-family: var(--font-display);
  margin: 0 0 8px;
  font-size: 1.15rem;
  color: var(--accent-bright);
}

.value-card p {
  color: var(--muted);
  margin: 0;
  font-size: 0.97rem;
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--bg-raised);
  padding: 46px 0 34px;
  margin-top: 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
  margin-bottom: 34px;
}

.footer-brand p {
  color: var(--muted);
  font-size: 0.94rem;
  max-width: 38ch;
  margin: 12px 0 0;
}

.footer-col h4 {
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
  margin: 0 0 14px;
}

.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-col li {
  margin-bottom: 9px;
}

.footer-col a {
  color: var(--text-soft);
  font-size: 0.95rem;
}

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

.footer-bottom {
  border-top: 1px solid var(--line);
  padding-top: 22px;
}

.footer-disclaimer {
  color: var(--muted);
  font-size: 0.88rem;
  margin: 0 0 8px;
}

.footer-copy {
  color: var(--faint);
  font-size: 0.88rem;
  margin: 0;
}

/* ---------- Responsive ---------- */

@media (min-width: 640px) {
  .signup-row {
    flex-direction: row;
  }

  .hero h1 {
    font-size: 3.2rem;
  }

  .article-hero h1 {
    font-size: 2.7rem;
  }
}

@media (min-width: 820px) {
  .wrap {
    padding-left: 32px;
    padding-right: 32px;
  }

  .hero {
    padding: 84px 0 68px;
  }

  .card-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .values-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .two-col {
    grid-template-columns: 1.2fr 0.8fr;
    gap: 48px;
    align-items: start;
  }

  .footer-grid {
    grid-template-columns: 1.4fr 1fr 1fr;
  }

  .section {
    padding: 72px 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .card,
  .tile {
    transition: none;
  }
}
