/* ZippyBytes / My Budget Tracker blog — mobile-first */
:root {
  --bg: #f3f5f4;
  --ink: #1a1f1c;
  --muted: #5a635c;
  --accent: #24905c;
  --accent-dark: #1b6e46;
  --card: #ffffff;
  --line: rgba(36, 144, 92, 0.14);
  --coral: #e8454f;
  --purple: #a23fb8;
  --blue: #3f5be6;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --pad: clamp(16px, 4vw, 28px);
  --measure: 42rem;
  --radius: 16px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(1100px 560px at 12% -12%, rgba(36, 144, 92, 0.14), transparent 58%),
    var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
a { color: var(--accent); font-weight: 600; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--accent-dark); }
img { max-width: 100%; height: auto; display: block; }

.site-top {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: rgba(243, 245, 244, 0.88);
  border-bottom: 1px solid var(--line);
}
.site-top-inner {
  width: min(1100px, 100%);
  margin: 0 auto;
  padding: 12px var(--pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: inherit;
  font-weight: 700;
  letter-spacing: -0.03em;
  min-height: 44px;
}
.brand img { width: 36px; height: 36px; border-radius: 12px; flex-shrink: 0; }
.top-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  justify-content: flex-end;
}
.top-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 2px;
  text-decoration: none;
  color: var(--muted);
  font-size: 0.95rem;
}
.top-nav a:hover { color: var(--ink); }
.top-nav a[aria-current="page"] {
  color: var(--accent);
  font-weight: 750;
}

.wrap {
  width: min(1100px, 100%);
  margin: 0 auto;
  padding: 24px var(--pad) 56px;
}
.article-shell {
  width: min(var(--measure), 100%);
  margin: 0 auto;
  padding: 24px var(--pad) 64px;
}

.crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.5rem;
  align-items: center;
  font-size: 0.88rem;
  color: var(--muted);
  margin: 0 0 1.25rem;
  line-height: 1.4;
}
.crumbs a { color: var(--muted); text-decoration: none; font-weight: 600; }
.crumbs a:hover { color: var(--accent); }
.crumbs span[aria-hidden="true"] { opacity: 0.55; }

.page-card, article.post {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: clamp(20px, 4vw, 36px);
  box-shadow: 0 12px 36px rgba(26, 31, 28, 0.08);
}

.kicker {
  margin: 0 0 0.5rem;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
}
h1 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.55rem, 5.2vw, 2.15rem);
  letter-spacing: -0.04em;
  line-height: 1.15;
  font-weight: 800;
  text-wrap: balance;
}
.lede {
  margin: 0 0 1.25rem;
  color: var(--muted);
  font-size: clamp(1rem, 2.8vw, 1.1rem);
}
.meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.85rem;
  color: var(--muted);
  font-size: 0.92rem;
  margin: 0 0 1.5rem;
}

h2 {
  font-size: clamp(1.1rem, 3.4vw, 1.28rem);
  margin: 1.85rem 0 0.55rem;
  letter-spacing: -0.02em;
  font-weight: 700;
  line-height: 1.25;
  text-wrap: balance;
}
h3 {
  font-size: 1.02rem;
  margin: 1.25rem 0 0.4rem;
  font-weight: 700;
}
p, li { font-size: 1.02rem; }
p { margin: 0 0 1rem; }
ul, ol { padding-left: 1.2rem; margin: 0 0 1rem; }
li { margin: 0.4rem 0; }
li::marker { color: var(--accent); }

.table-scroll {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 0 1.15rem;
  border: 1px solid var(--line);
  border-radius: 14px;
}
table {
  width: 100%;
  border-collapse: collapse;
  min-width: 480px;
  font-size: 0.95rem;
}
th, td {
  text-align: left;
  padding: 0.75rem 0.9rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
th {
  background: #eef5f1;
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.02em;
}
tr:last-child td { border-bottom: 0; }

.faq details {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.15rem 0.9rem;
  margin: 0 0 0.65rem;
  background: #fafcfb;
}
.faq summary {
  cursor: pointer;
  font-weight: 700;
  min-height: 48px;
  display: flex;
  align-items: center;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq details[open] summary { margin-bottom: 0.35rem; }
.faq details p { margin: 0 0 0.85rem; color: var(--ink); }

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin: 1.35rem 0 0.5rem;
}
.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.7rem 1.15rem;
  background: var(--accent);
  color: #fff !important;
  border-radius: 14px;
  text-decoration: none !important;
  font-weight: 700;
  box-shadow: 0 8px 18px rgba(36, 144, 92, 0.28);
}
.cta:hover { background: var(--accent-dark); color: #fff !important; }
.cta.secondary {
  background: transparent;
  color: var(--accent) !important;
  border: 1px solid var(--line);
  box-shadow: none;
}

.related {
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}
.related ul { list-style: none; padding: 0; }
.related li { margin: 0.55rem 0; }
.related a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  text-decoration: none;
}

.shot {
  margin: 1.15rem 0 1.35rem;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  max-width: min(280px, 100%);
}
.shot img { width: 100%; }

.blog-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-top: 1.25rem;
}
@media (min-width: 720px) {
  .blog-grid { grid-template-columns: 1fr 1fr; }
}
.blog-card {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 1.15rem 1.2rem 1.25rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-decoration: none;
  color: inherit;
  box-shadow: 0 8px 24px rgba(26, 31, 28, 0.05);
  transition: transform 0.2s var(--ease), box-shadow 0.2s ease;
  min-height: 44px;
}
.blog-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(26, 31, 28, 0.09);
  color: inherit;
}
.blog-card .tag {
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
}
.blog-card h2 {
  margin: 0;
  font-size: 1.12rem;
  letter-spacing: -0.03em;
}
.blog-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  flex: 1;
}

.site-foot {
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
}
.site-foot a { color: var(--muted); text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }
.site-foot a:hover { color: var(--ink); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .blog-card { transition: none; }
}
