/*
Theme Name: Slim Werk Geven
Theme URI: https://slimwerkgeven.nl
Author: Nicole Baas
Author URI: https://slimwerkgeven.nl
Description: Editoriaal magazine-thema voor slimwerkgeven.nl. Inclusief ingebouwde calculators (bruto-netto, hypotheek, vakantiedagen, zorgtoeslag) en sticky leesvoortgang-sidebar voor blog-artikelen.
Version: 1.0.4
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: slimwerkgeven
Tags: blog, editorial, two-columns, custom-menu, featured-images, sticky-post, translation-ready
*/

/* ==========================================================================
   slimwerkgeven.nl — Theme prototype
   Aesthetic: editorial magazine, warm + bookish, with a quiet confidence
   ========================================================================== */

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; }
input, select, textarea { font: inherit; color: inherit; }

/* ---- Design tokens ---- */
:root {
  /* Colors */
  --bg: #F6F1E7;
  --bg-deep: #EDE5D3;
  --bg-card: #FFFFFF;
  --ink: #1A1714;
  --ink-soft: #4F4A42;
  --ink-muted: #8A8278;
  --accent: #B8462C;            /* burnt sienna */
  --accent-deep: #8C3520;
  --accent-tint: #F0D9CE;
  --olive: #4A5530;             /* deep olive */
  --olive-soft: #6E7A52;
  --olive-tint: #D9DCC8;
  --border: #DBD0B8;
  --border-soft: #E8DFC9;
  --shadow-sm: 0 1px 2px rgba(26, 23, 20, 0.04), 0 0 0 1px rgba(26, 23, 20, 0.04);
  --shadow-md: 0 4px 24px rgba(26, 23, 20, 0.07), 0 0 0 1px rgba(26, 23, 20, 0.04);

  /* Type */
  --font-display: 'Fraunces', 'Iowan Old Style', Georgia, serif;
  --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;

  /* Layout */
  --max: 1240px;
  --max-narrow: 760px;
  --gutter: clamp(20px, 4vw, 48px);
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;
}

/* ---- Defensive reset against leftover plugin/theme CSS ----
   Forces html and body to full viewport width. Any constrained "boxed"
   layout from a previous theme or page-builder plugin will be neutralised. */
html,
body,
#page,
.site,
.site-content,
.wrapper,
.container,
.elementor,
.entry-content {
  max-width: none !important;
  width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  background-color: transparent !important;
  box-shadow: none !important;
  border: 0 !important;
}
html { background: var(--bg) !important; }

/* ---- Base ---- */
body {
  font-family: var(--font-body);
  background: var(--bg) !important;
  color: var(--ink);
  font-size: 17px;
  line-height: 1.6;
  font-feature-settings: 'ss01', 'cv11';
}

.wrap { max-width: var(--max); margin: 0 auto; padding-inline: var(--gutter); }
.wrap-narrow { max-width: var(--max-narrow); margin: 0 auto; padding-inline: var(--gutter); }

/* ---- Typography ---- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 450;
  letter-spacing: -0.02em;
  line-height: 1.05;
  color: var(--ink);
  font-variation-settings: 'opsz' 144, 'SOFT' 30;
}
h1 { font-size: clamp(2.5rem, 6vw, 5rem); }
h2 { font-size: clamp(1.9rem, 3.6vw, 3rem); }
h3 { font-size: clamp(1.3rem, 2vw, 1.8rem); line-height: 1.15; }
h4 { font-size: 1.15rem; line-height: 1.25; }

.eyebrow {
  font-family: var(--font-body);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: '';
  width: 28px;
  height: 1px;
  background: var(--accent);
}
.eyebrow.center::before, .eyebrow.center::after { content: ''; flex: 0 0 28px; height: 1px; background: var(--accent); }

.lead { font-size: 1.25rem; line-height: 1.5; color: var(--ink-soft); font-weight: 400; }

em, .italic { font-style: italic; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 24px;
  border-radius: 100px;
  font-weight: 500;
  font-size: 0.95rem;
  transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}
.btn-primary { background: var(--ink); color: var(--bg); }
.btn-primary:hover { background: var(--accent); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--bg); }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-deep); transform: translateY(-1px); }
.btn .arrow { transition: transform 0.2s ease; }
.btn:hover .arrow { transform: translateX(3px); }

/* ---- Header / Nav ---- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(246, 241, 231, 0.92);
  backdrop-filter: blur(14px) saturate(1.1);
  -webkit-backdrop-filter: blur(14px) saturate(1.1);
  border-bottom: 1px solid var(--border-soft);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0;
  gap: 32px;
}
.brand {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.4rem;
  letter-spacing: -0.02em;
  font-style: italic;
}
.brand span { color: var(--accent); }
.nav { display: flex; gap: 28px; align-items: center; }
/* Also flex inside the WP-generated <ul class="nav__menu"> wrapper */
.nav ul,
.nav .nav__menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 28px;
}
.nav li { list-style: none; }
.nav a { font-size: 0.95rem; font-weight: 500; color: var(--ink-soft); position: relative; transition: color 0.15s ease; text-decoration: none; }
.nav a:hover { color: var(--ink); }
.nav a.active,
.nav .current-menu-item > a,
.nav .current_page_item > a { color: var(--ink); }
.nav a.active::after,
.nav .current-menu-item > a::after,
.nav .current_page_item > a::after {
  content: '';
  position: absolute;
  bottom: -6px; left: 0; right: 0;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
}
.nav-cta,
.nav .menu-item-btn > a,
.nav a.btn { padding: 10px 20px; font-size: 0.9rem; }
.nav .menu-item-btn > a::after,
.nav a.btn::after { display: none; }

/* Reading progress bar (shown on blog posts) */
.read-progress {
  position: absolute;
  bottom: -1px;
  left: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--olive));
  width: 0%;
  transition: width 0.05s linear;
}

/* ---- Hero ---- */
.hero {
  position: relative;
  padding: clamp(60px, 9vw, 120px) 0 clamp(50px, 7vw, 100px);
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: 10%; right: -10%;
  width: 500px; height: 500px;
  background: radial-gradient(circle, var(--accent-tint), transparent 70%);
  opacity: 0.5;
  pointer-events: none;
  z-index: 0;
}
.hero__grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(40px, 6vw, 80px);
  align-items: center;
  position: relative;
  z-index: 1;
}
.hero__title {
  font-size: clamp(2.8rem, 7vw, 5.6rem);
  letter-spacing: -0.035em;
  font-variation-settings: 'opsz' 144, 'SOFT' 30;
  margin-top: 24px;
}
.hero__title em { color: var(--accent); font-style: italic; font-variation-settings: 'opsz' 144, 'SOFT' 100; }
.hero__sub { margin-top: 28px; font-size: 1.2rem; max-width: 520px; color: var(--ink-soft); }
.hero__ctas { display: flex; gap: 14px; margin-top: 36px; flex-wrap: wrap; }
.hero__visual {
  position: relative;
  aspect-ratio: 4 / 5;
}
.hero__portrait {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-md);
  filter: contrast(1.02) saturate(0.95);
}
.hero__badge {
  position: absolute;
  bottom: -20px;
  left: -20px;
  background: var(--bg-card);
  padding: 16px 22px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  gap: 14px;
}
.hero__badge-num {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-style: italic;
  color: var(--accent);
  line-height: 1;
}
.hero__badge-label { font-size: 0.85rem; color: var(--ink-soft); line-height: 1.3; }

@media (max-width: 880px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__visual { max-width: 440px; }
}

/* ---- Section base ---- */
section { padding-block: clamp(60px, 8vw, 110px); position: relative; }
.section-head { margin-bottom: clamp(36px, 5vw, 60px); }
.section-head.center { text-align: center; }
.section-head.center .eyebrow { display: inline-flex; }
.section-head h2 { margin-top: 18px; max-width: 740px; }
.section-head.center h2 { margin-left: auto; margin-right: auto; }
.section-head p { margin-top: 18px; color: var(--ink-soft); font-size: 1.1rem; max-width: 620px; }
.section-head.center p { margin-left: auto; margin-right: auto; }

/* ---- Tools strip ---- */
.tools-strip {
  background: var(--ink);
  color: var(--bg);
}
.tools-strip .eyebrow { color: var(--accent-tint); }
.tools-strip .eyebrow::before { background: var(--accent-tint); }
.tools-strip h2 { color: var(--bg); }
.tools-strip .section-head p { color: rgba(246, 241, 231, 0.7); }

.tool-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: rgba(246, 241, 231, 0.14);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
@media (max-width: 980px) { .tool-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 540px) { .tool-grid { grid-template-columns: 1fr; } }

.tool-card {
  background: var(--ink);
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: background 0.2s ease;
  cursor: pointer;
  position: relative;
}
.tool-card:hover { background: #2A2520; }
.tool-card__icon {
  width: 48px; height: 48px;
  border-radius: 10px;
  background: var(--accent);
  display: grid; place-items: center;
  color: var(--bg);
}
.tool-card:nth-child(2) .tool-card__icon { background: var(--olive-soft); }
.tool-card:nth-child(3) .tool-card__icon { background: #C99057; }
.tool-card:nth-child(4) .tool-card__icon { background: #7A8DA0; }
.tool-card__title { font-size: 1.15rem; font-family: var(--font-display); color: var(--bg); font-weight: 450; line-height: 1.2; }
.tool-card__desc { font-size: 0.92rem; color: rgba(246, 241, 231, 0.65); line-height: 1.5; flex-grow: 1; }
.tool-card__cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--accent-tint);
  margin-top: 6px;
}
.tool-card:hover .tool-card__cta .arrow { transform: translateX(4px); }
.tool-card__cta .arrow { transition: transform 0.2s ease; }

/* ---- Article grid (homepage feature) ---- */
.article-feature {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 48px;
}
@media (max-width: 880px) { .article-feature { grid-template-columns: 1fr; } }

.article-big { position: relative; }
.article-big__img {
  aspect-ratio: 4 / 3;
  width: 100%;
  object-fit: cover;
  border-radius: var(--radius-md);
}
.article-big__meta { margin-top: 22px; display: flex; gap: 14px; align-items: center; font-size: 0.83rem; color: var(--ink-muted); }
.article-big__cat { background: var(--accent-tint); color: var(--accent-deep); padding: 4px 12px; border-radius: 100px; font-weight: 500; letter-spacing: 0.04em; font-size: 0.75rem; text-transform: uppercase; }
.article-big__title {
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  margin-top: 16px;
  line-height: 1.1;
  letter-spacing: -0.025em;
}
.article-big__title a:hover { color: var(--accent); }
.article-big__excerpt { margin-top: 16px; color: var(--ink-soft); font-size: 1.05rem; max-width: 60ch; }

.article-list { display: flex; flex-direction: column; gap: 28px; }
.article-sm {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 18px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--border);
}
.article-sm:last-child { border-bottom: 0; padding-bottom: 0; }
.article-sm__img {
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--radius-sm);
  width: 100%;
}
.article-sm__meta { font-size: 0.78rem; color: var(--ink-muted); display: flex; gap: 8px; align-items: center; }
.article-sm__meta strong { color: var(--accent); font-weight: 500; }
.article-sm__title { font-family: var(--font-display); font-size: 1.2rem; margin-top: 8px; line-height: 1.2; font-weight: 450; }
.article-sm__title a:hover { color: var(--accent); }

/* Three-up grid */
.three-up {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
@media (max-width: 880px) { .three-up { grid-template-columns: 1fr; } }

.card-article {
  display: flex;
  flex-direction: column;
}
.card-article__img {
  aspect-ratio: 16 / 11;
  width: 100%;
  object-fit: cover;
  border-radius: var(--radius-md);
  margin-bottom: 18px;
  transition: transform 0.4s ease;
}
.card-article:hover .card-article__img { transform: scale(1.02); }
.card-article__cat { font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); font-weight: 500; }
.card-article__title { font-family: var(--font-display); font-size: 1.4rem; line-height: 1.2; margin-top: 10px; font-weight: 450; }
.card-article__title a:hover { color: var(--accent); }
.card-article__excerpt { margin-top: 10px; color: var(--ink-soft); font-size: 0.95rem; }
.card-article__meta { margin-top: 14px; font-size: 0.82rem; color: var(--ink-muted); }

/* ---- Quote interrupter ---- */
.interrupter {
  background: var(--bg-deep);
  padding-block: clamp(70px, 10vw, 130px);
}
.interrupter--olive { background: var(--olive); color: var(--bg); }
.interrupter__grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(40px, 6vw, 80px);
  align-items: center;
}
.interrupter--mirror .interrupter__grid { direction: rtl; }
.interrupter--mirror .interrupter__grid > * { direction: ltr; }
@media (max-width: 880px) {
  .interrupter__grid { grid-template-columns: 1fr; direction: ltr; }
}
.interrupter__img {
  aspect-ratio: 4 / 5;
  object-fit: cover;
  width: 100%;
  border-radius: var(--radius-md);
}
.interrupter__quote-mark {
  font-family: var(--font-display);
  font-size: 6rem;
  line-height: 0.8;
  font-style: italic;
  color: var(--accent);
  margin-bottom: 24px;
}
.interrupter--olive .interrupter__quote-mark { color: var(--olive-tint); }
.interrupter__quote {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  line-height: 1.25;
  font-weight: 400;
  letter-spacing: -0.02em;
  margin-bottom: 28px;
}
.interrupter__quote em { color: var(--accent); }
.interrupter--olive .interrupter__quote em { color: var(--olive-tint); }
.interrupter__attribution {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 0.95rem;
}
.interrupter__avatar { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; }
.interrupter__attribution strong { font-weight: 500; display: block; }
.interrupter__attribution span { color: var(--ink-muted); font-size: 0.88rem; }
.interrupter--olive .interrupter__attribution span { color: rgba(246, 241, 231, 0.7); }

/* ---- Nicole spotlight ---- */
.spotlight {
  position: relative;
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.spotlight__grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: clamp(40px, 6vw, 80px);
  align-items: center;
}
@media (max-width: 880px) { .spotlight__grid { grid-template-columns: 1fr; } }
.spotlight__portrait-wrap { position: relative; }
.spotlight__portrait {
  aspect-ratio: 4 / 5;
  object-fit: cover;
  width: 100%;
  border-radius: var(--radius-md);
}
.spotlight__stamp {
  position: absolute;
  top: -16px; right: -16px;
  width: 110px; height: 110px;
  background: var(--accent);
  color: var(--bg);
  border-radius: 50%;
  display: grid;
  place-items: center;
  text-align: center;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 0.95rem;
  line-height: 1.1;
  padding: 14px;
  transform: rotate(-8deg);
  box-shadow: var(--shadow-md);
}
.spotlight__name {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5vw, 4rem);
  font-style: italic;
  font-weight: 400;
  margin-top: 20px;
  letter-spacing: -0.02em;
}
.spotlight__role { font-size: 0.85rem; letter-spacing: 0.15em; text-transform: uppercase; color: var(--olive-soft); margin-top: 16px; }
.spotlight__bio { font-size: 1.1rem; color: var(--ink-soft); line-height: 1.6; margin-top: 24px; max-width: 60ch; }
.spotlight__bio p + p { margin-top: 14px; }
.spotlight__signature {
  font-family: 'Caveat', 'Snell Roundhand', cursive;
  font-size: 2.4rem;
  margin-top: 28px;
  color: var(--accent);
  line-height: 1;
}
.spotlight__cta { margin-top: 28px; }

/* ---- Categories cards ---- */
.cat-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 36px 32px;
  border: 1px solid var(--border-soft);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
}
.cat-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.cat-card__num {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.8rem;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 28px;
}
.cat-card h3 { font-style: italic; font-weight: 400; }
.cat-card p { margin-top: 14px; color: var(--ink-soft); font-size: 0.98rem; flex-grow: 1; }
.cat-card__link { margin-top: 22px; font-size: 0.9rem; font-weight: 500; color: var(--accent); display: inline-flex; gap: 6px; align-items: center; }

/* ---- Mentions ---- */
.mentions {
  border-top: 1px solid var(--border);
  padding-block: 60px;
}
.mentions__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}
.mentions__label { font-size: 0.78rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-muted); }
.mentions__logos { display: flex; gap: 48px; flex-wrap: wrap; align-items: center; }
.mentions__logo {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.4rem;
  color: var(--ink-soft);
  opacity: 0.7;
  transition: opacity 0.2s ease;
}
.mentions__logo:hover { opacity: 1; color: var(--ink); }

/* ---- Newsletter ---- */
.newsletter {
  background: var(--ink);
  color: var(--bg);
}
.newsletter__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}
@media (max-width: 880px) { .newsletter__grid { grid-template-columns: 1fr; } }
.newsletter h2 { color: var(--bg); }
.newsletter h2 em { color: var(--accent); }
.newsletter p { color: rgba(246, 241, 231, 0.75); margin-top: 18px; font-size: 1.05rem; }
.newsletter__form {
  display: flex;
  gap: 10px;
  background: rgba(246, 241, 231, 0.08);
  padding: 8px;
  border-radius: 100px;
  border: 1px solid rgba(246, 241, 231, 0.16);
}
.newsletter__form input {
  flex: 1;
  background: transparent;
  border: 0;
  padding: 14px 20px;
  color: var(--bg);
  font-size: 1rem;
  outline: none;
}
.newsletter__form input::placeholder { color: rgba(246, 241, 231, 0.5); }
.newsletter__form button {
  background: var(--accent);
  color: var(--bg);
  padding: 14px 28px;
  border-radius: 100px;
  font-weight: 500;
  transition: background 0.15s ease;
}
.newsletter__form button:hover { background: var(--accent-deep); }
.newsletter__small { font-size: 0.82rem; color: rgba(246, 241, 231, 0.5); margin-top: 14px; }

/* ---- Footer ---- */
.site-footer {
  padding-block: 70px 36px;
  background: var(--bg-deep);
  border-top: 1px solid var(--border);
}
.footer__grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 48px;
  margin-bottom: 48px;
}
@media (max-width: 720px) { .footer__grid { grid-template-columns: 1fr 1fr; gap: 36px; } }
.footer__brand { font-family: var(--font-display); font-style: italic; font-size: 1.6rem; font-weight: 500; margin-bottom: 16px; }
.footer__brand span { color: var(--accent); }
.footer__about { color: var(--ink-soft); font-size: 0.95rem; max-width: 320px; }
.footer__col h5 { font-family: var(--font-body); font-size: 0.78rem; letter-spacing: 0.18em; text-transform: uppercase; font-weight: 600; color: var(--ink); margin-bottom: 18px; }
.footer__col ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer__col a { font-size: 0.95rem; color: var(--ink-soft); transition: color 0.15s ease; }
.footer__col a:hover { color: var(--accent); }
.footer__bottom {
  border-top: 1px solid var(--border);
  padding-top: 28px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.85rem;
  color: var(--ink-muted);
}

/* ==========================================================================
   BLOG POST PAGE
   ========================================================================== */

.post-hero {
  padding: clamp(40px, 6vw, 80px) 0 clamp(30px, 4vw, 50px);
}
.breadcrumb { display: flex; gap: 8px; font-size: 0.85rem; color: var(--ink-muted); margin-bottom: 24px; }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb .sep { opacity: 0.5; }

.post-cat { display: inline-block; background: var(--accent-tint); color: var(--accent-deep); padding: 5px 14px; border-radius: 100px; font-weight: 500; letter-spacing: 0.04em; font-size: 0.75rem; text-transform: uppercase; margin-bottom: 22px; }

.post-title {
  font-size: clamp(2.2rem, 5vw, 4rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  max-width: 18ch;
  font-weight: 400;
}
.post-title em { color: var(--accent); }
.post-meta { display: flex; align-items: center; gap: 14px; margin-top: 32px; font-size: 0.92rem; color: var(--ink-soft); }
.post-meta__avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
.post-meta__dot { width: 3px; height: 3px; border-radius: 50%; background: var(--ink-muted); }
.post-lead { font-size: 1.3rem; line-height: 1.5; color: var(--ink-soft); margin-top: 36px; max-width: 60ch; font-weight: 400; }
.post-hero__img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--radius-md);
  margin-top: 48px;
}

.post-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: clamp(40px, 5vw, 80px);
  padding-bottom: clamp(60px, 8vw, 100px);
  align-items: start;
}
@media (max-width: 980px) { .post-layout { grid-template-columns: 1fr; } }

/* ---- Article body ---- */
.post-body {
  font-family: var(--font-display);
  font-size: 1.18rem;
  line-height: 1.7;
  color: var(--ink);
  font-variation-settings: 'opsz' 14, 'SOFT' 100;
  max-width: 65ch;
}
.post-body p { margin-bottom: 1.3em; }
.post-body p:first-child::first-letter {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  float: left;
  font-size: 4.6em;
  line-height: 0.85;
  padding-right: 14px;
  padding-top: 8px;
  color: var(--accent);
}
.post-body h2 {
  font-family: var(--font-display);
  font-size: 1.9rem;
  line-height: 1.15;
  margin-top: 2em;
  margin-bottom: 0.7em;
  font-weight: 450;
  font-variation-settings: 'opsz' 144, 'SOFT' 30;
  position: relative;
  padding-top: 28px;
}
.post-body h2::before {
  content: counter(h2);
  counter-increment: h2;
  position: absolute;
  top: 0;
  font-family: var(--font-body);
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  color: var(--accent);
  font-style: normal;
  font-weight: 600;
}
.post-body { counter-reset: h2; }
.post-body h2::before { content: "0" counter(h2); }

.post-body h3 { font-size: 1.4rem; margin-top: 1.8em; margin-bottom: 0.5em; font-weight: 450; }
.post-body a { color: var(--accent); border-bottom: 1px solid currentColor; transition: opacity 0.15s ease; }
.post-body a:hover { opacity: 0.7; }
.post-body ul, .post-body ol { margin: 1.3em 0; padding-left: 1.5em; }
.post-body li { margin-bottom: 0.6em; }
.post-body ul li::marker { color: var(--accent); }

/* Pull quote */
.pullquote {
  margin: 2.4em -10%;
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 2.6vw, 2.1rem);
  line-height: 1.25;
  letter-spacing: -0.02em;
  font-style: italic;
  font-weight: 400;
  color: var(--ink);
  border-left: 3px solid var(--accent);
  padding: 16px 0 16px 32px;
}
.pullquote cite { display: block; margin-top: 16px; font-size: 0.85rem; font-style: normal; font-family: var(--font-body); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-muted); font-weight: 500; }
@media (max-width: 980px) { .pullquote { margin: 2em 0; } }

/* In-article tool callout */
.tool-callout {
  background: var(--olive);
  color: var(--bg);
  padding: 32px;
  border-radius: var(--radius-md);
  margin: 2.4em 0;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: center;
  font-family: var(--font-body);
}
.tool-callout__eyebrow { font-size: 0.75rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--olive-tint); margin-bottom: 8px; }
.tool-callout h4 { color: var(--bg); font-family: var(--font-display); font-style: italic; font-size: 1.4rem; line-height: 1.2; }
.tool-callout p { font-size: 0.95rem; color: rgba(246, 241, 231, 0.8); margin-top: 6px; }
.tool-callout .btn { background: var(--bg); color: var(--olive); }
.tool-callout .btn:hover { background: var(--accent); color: var(--bg); }
@media (max-width: 600px) { .tool-callout { grid-template-columns: 1fr; } }

.author-card {
  margin-top: 60px;
  padding: 32px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 24px;
  align-items: center;
}
.author-card__avatar { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; }
.author-card__label { font-size: 0.78rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-muted); }
.author-card__name { font-family: var(--font-display); font-size: 1.5rem; font-style: italic; margin-top: 4px; }
.author-card__bio { font-family: var(--font-body); font-size: 0.95rem; color: var(--ink-soft); margin-top: 10px; line-height: 1.55; }

/* ---- Sidebar ---- */
.sidebar {
  position: sticky;
  top: 100px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  align-self: start;
}
.side-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 22px;
}
.side-card__label { font-size: 0.72rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-muted); font-weight: 600; }

/* Progress card */
.side-card--progress { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.side-card--progress .side-card__label { color: rgba(246, 241, 231, 0.55); }
.progress-title { font-family: var(--font-display); font-style: italic; font-size: 1.15rem; margin-top: 8px; color: var(--bg); line-height: 1.25; }
.progress-bar { height: 4px; background: rgba(246, 241, 231, 0.14); border-radius: 100px; margin-top: 16px; overflow: hidden; }
.progress-bar__fill { height: 100%; background: linear-gradient(90deg, var(--accent), var(--olive-tint)); width: 0%; transition: width 0.05s linear; border-radius: 100px; }
.progress-stats { display: flex; justify-content: space-between; margin-top: 10px; font-size: 0.82rem; color: rgba(246, 241, 231, 0.7); font-variant-numeric: tabular-nums; }
.progress-stats__pct { color: var(--bg); font-weight: 500; }
.toc { margin-top: 20px; padding-top: 18px; border-top: 1px solid rgba(246, 241, 231, 0.12); display: flex; flex-direction: column; gap: 12px; }
.toc__item {
  font-size: 0.88rem;
  color: rgba(246, 241, 231, 0.65);
  position: relative;
  padding-left: 22px;
  transition: color 0.15s ease;
  line-height: 1.35;
  cursor: pointer;
}
.toc__item::before {
  content: '';
  position: absolute;
  left: 0; top: 8px;
  width: 12px; height: 1px;
  background: rgba(246, 241, 231, 0.3);
  transition: width 0.2s ease, background 0.15s ease;
}
.toc__item:hover, .toc__item.active { color: var(--bg); }
.toc__item.active::before { width: 16px; background: var(--accent); }

/* Tools card */
.side-tools { display: flex; flex-direction: column; gap: 4px; margin-top: 16px; }
.side-tools__item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  transition: background 0.15s ease;
}
.side-tools__item:hover { background: var(--bg-deep); }
.side-tools__icon {
  width: 32px; height: 32px;
  border-radius: 8px;
  display: grid; place-items: center;
  color: var(--bg);
  flex-shrink: 0;
}
.side-tools__icon--1 { background: var(--accent); }
.side-tools__icon--2 { background: var(--olive-soft); }
.side-tools__icon--3 { background: #C99057; }
.side-tools__icon--4 { background: #7A8DA0; }
.side-tools__name { font-size: 0.92rem; font-weight: 500; line-height: 1.2; }
.side-tools__desc { font-size: 0.78rem; color: var(--ink-muted); margin-top: 2px; }

/* Related card */
.side-related { display: flex; flex-direction: column; gap: 16px; margin-top: 18px; }
.side-related__item { display: grid; grid-template-columns: 64px 1fr; gap: 12px; padding-bottom: 16px; border-bottom: 1px solid var(--border-soft); }
.side-related__item:last-child { border-bottom: 0; padding-bottom: 0; }
.side-related__img { width: 64px; height: 64px; object-fit: cover; border-radius: var(--radius-sm); }
.side-related__cat { font-size: 0.7rem; letter-spacing: 0.15em; text-transform: uppercase; color: var(--accent); font-weight: 500; }
.side-related__title { font-family: var(--font-display); font-size: 0.95rem; margin-top: 4px; line-height: 1.25; font-weight: 450; }
.side-related__title a:hover { color: var(--accent); }

/* ==========================================================================
   TOOLS PAGE
   ========================================================================== */

.tools-hero { padding-block: clamp(50px, 7vw, 90px); }
.tools-hero h1 { max-width: 16ch; }
.tools-hero h1 em { color: var(--accent); }
.tools-nav { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 32px; }
.tools-nav a {
  font-size: 0.88rem;
  padding: 8px 18px;
  border-radius: 100px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  font-weight: 500;
  transition: all 0.15s ease;
  color: var(--ink-soft);
}
.tools-nav a:hover { background: var(--ink); color: var(--bg); border-color: var(--ink); }

.tool-section {
  padding-block: clamp(50px, 6vw, 90px);
  border-top: 1px solid var(--border);
}
.tool-section:nth-child(odd) { background: var(--bg-deep); }

.tool-section__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 5vw, 70px);
  align-items: start;
}
@media (max-width: 880px) { .tool-section__grid { grid-template-columns: 1fr; } }

.tool-info__icon {
  width: 60px; height: 60px;
  border-radius: 14px;
  display: grid; place-items: center;
  color: var(--bg);
  margin-bottom: 24px;
}
.tool-info__icon--1 { background: var(--accent); }
.tool-info__icon--2 { background: var(--olive-soft); }
.tool-info__icon--3 { background: #C99057; }
.tool-info__icon--4 { background: #7A8DA0; }
.tool-info h2 em { color: var(--accent); font-style: italic; }
.tool-info p { margin-top: 18px; color: var(--ink-soft); font-size: 1.05rem; max-width: 50ch; }
.tool-info__hint { margin-top: 24px; padding: 16px 20px; background: var(--bg-card); border-radius: var(--radius-md); border-left: 3px solid var(--accent); font-size: 0.92rem; color: var(--ink-soft); }
.tool-info__hint strong { color: var(--ink); font-weight: 500; }

/* Calculator card */
.calc {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 32px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
}
.calc__row { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; }
.calc__row--inline { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.calc__label { font-size: 0.85rem; font-weight: 500; color: var(--ink); }
.calc__hint { font-size: 0.78rem; color: var(--ink-muted); }
.calc__input, .calc__select {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  transition: border 0.15s ease, box-shadow 0.15s ease;
  font-variant-numeric: tabular-nums;
}
.calc__input:focus, .calc__select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-tint);
}
.calc__input-wrap { position: relative; }
.calc__input-prefix, .calc__input-suffix {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.95rem;
  color: var(--ink-muted);
  pointer-events: none;
}
.calc__input-prefix { left: 14px; }
.calc__input-suffix { right: 14px; }
.calc__input--prefixed { padding-left: 32px; }
.calc__input--suffixed { padding-right: 50px; }

.calc__result {
  margin-top: 28px;
  padding-top: 28px;
  border-top: 1px dashed var(--border);
}
.calc__result-label { font-size: 0.78rem; letter-spacing: 0.15em; text-transform: uppercase; color: var(--ink-muted); font-weight: 600; }
.calc__result-value {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 4vw, 3.4rem);
  font-style: italic;
  font-weight: 400;
  color: var(--accent);
  margin-top: 6px;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  line-height: 1;
}
.calc__breakdown {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 0.92rem;
  color: var(--ink-soft);
}
.calc__breakdown-row { display: flex; justify-content: space-between; padding: 6px 0; }
.calc__breakdown-row--total { border-top: 1px solid var(--border); padding-top: 12px; margin-top: 4px; color: var(--ink); font-weight: 500; }
.calc__breakdown-row strong { font-variant-numeric: tabular-nums; }

.calc__disclaimer { font-size: 0.78rem; color: var(--ink-muted); margin-top: 20px; line-height: 1.5; }

/* Toggle group (for calc options) */
.calc__toggle { display: flex; background: var(--bg); border-radius: var(--radius-sm); padding: 4px; border: 1px solid var(--border); }
.calc__toggle button {
  flex: 1;
  padding: 8px 12px;
  font-size: 0.88rem;
  border-radius: 4px;
  font-weight: 500;
  color: var(--ink-soft);
  transition: all 0.15s ease;
}
.calc__toggle button.active { background: var(--ink); color: var(--bg); }

/* ---- Utility: fade in on scroll (subtle) ---- */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in { opacity: 1; transform: translateY(0); }

/* Print-y details */
::selection { background: var(--accent); color: var(--bg); }
