:root {
  --bg: #fffbf5;
  --surface: #ffffff;
  --cream: #f7efe3;
  --text: #1f1b16;
  --muted: #6b6259;
  --line: #ece3d6;
  --accent: #b4451f;
  --accent-dark: #8f3416;
  --accent-soft: #fbeee6;
  --green: #2f5d50;
  --green-soft: #e8f0ec;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(31, 27, 22, .05), 0 8px 24px rgba(31, 27, 22, .06);
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.7 var(--sans);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent-dark); }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 760px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; letter-spacing: -.01em; line-height: 1.2; }
h1 { font-size: clamp(2rem, 5vw, 3.2rem); margin: 0 0 12px; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin: 48px 0 12px; }
h3 { font-size: 1.25rem; margin: 24px 0 8px; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .75rem; font-weight: 700; color: var(--accent); margin: 0 0 8px; }
.lede { color: var(--muted); font-size: 1.15rem; margin: 0 0 24px; max-width: 640px; }

/* Header */
header.site { position: sticky; top: 0; z-index: 10; background: rgba(255, 251, 245, .92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
header.site .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; flex-wrap: wrap; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); font-family: var(--serif); font-weight: 700; font-size: 1.35rem; }
.logo img { width: 34px; height: 34px; }
.logo span { color: var(--accent); }
nav.main { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
nav.main a { text-decoration: none; color: var(--text); font-weight: 500; font-size: .95rem; }
nav.main a:hover { color: var(--accent); }
.btn {
  display: inline-block; background: var(--accent); color: #fff !important; text-decoration: none;
  padding: 11px 20px; border-radius: 999px; font-weight: 600; font-size: .95rem; border: 0; cursor: pointer;
  font-family: var(--sans); transition: background .15s;
}
.btn:hover { background: var(--accent-dark); }
.btn.ghost { background: transparent; color: var(--text) !important; border: 1.5px solid var(--text); }
.btn.ghost:hover { background: var(--text); color: #fff !important; }
@media (max-width: 760px) {
  header.site .wrap { padding-top: 10px; padding-bottom: 10px; }
  nav.main { gap: 14px; width: 100%; }
  nav.main .btn { display: none; }
}

/* Home hero */
.hero { padding: 56px 0 64px; }
.hero .wrap { display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; }
.hero h1 { font-size: clamp(2.3rem, 5.5vw, 3.8rem); }
.hero .actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-img { position: relative; }
.hero-img img { border-radius: 24px; aspect-ratio: 1 / 1; object-fit: cover; width: 100%; height: auto; box-shadow: var(--shadow); }
@media (max-width: 860px) { .hero-img img { aspect-ratio: 4 / 3; } }
.hero-badge {
  position: absolute; left: -20px; bottom: 28px; background: var(--surface); border-radius: 14px;
  padding: 12px 16px; box-shadow: var(--shadow); font-size: .9rem; max-width: 240px;
}
.hero-badge strong { display: block; font-family: var(--serif); font-size: 1.1rem; }
@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; gap: 28px; }
  .hero-badge { left: 12px; }
}

.trust { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--cream); }
.trust .wrap { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; padding-top: 20px; padding-bottom: 20px; }
.trust div { font-size: .92rem; color: var(--muted); }
.trust strong { display: block; color: var(--text); font-size: 1rem; }

section.block { padding: 64px 0 8px; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.section-head h2 { margin: 0; }

/* Cards */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 22px; }
.card {
  display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; text-decoration: none; color: var(--text);
  transition: transform .2s, box-shadow .2s;
}
a.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); color: var(--text); }
.card img { aspect-ratio: 16 / 10; object-fit: cover; width: 100%; background: var(--cream); }
.card .body { padding: 18px 20px 22px; }
.card .tag { font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--green); }
.card h3 { margin: 6px 0 6px; }
.card p { margin: 0; color: var(--muted); font-size: .95rem; line-height: 1.55; }
.card.feature { grid-column: span 2; }
@media (max-width: 600px) { .card.feature { grid-column: auto; } }

/* Page hero for tools and guides */
.page-hero { position: relative; color: #fff; background: #2a241e center / cover no-repeat; background-image: linear-gradient(90deg, rgba(25, 20, 16, .82), rgba(25, 20, 16, .45)), var(--img); }
.page-hero .wrap { padding-top: 64px; padding-bottom: 56px; }
.page-hero .lede { color: rgba(255, 255, 255, .88); }
.page-hero a { color: #fff; }
.crumbs { font-size: .85rem; opacity: .85; margin-bottom: 12px; }
.crumbs a { text-decoration: none; }
.meta { font-size: .9rem; opacity: .9; }

main > .wrap { padding-top: 40px; padding-bottom: 32px; }

/* Tools */
.tool { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); margin-top: -72px; position: relative; }
.row { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 14px; }
label { display: block; font-size: .8rem; font-weight: 600; color: var(--muted); margin-bottom: 4px; text-transform: uppercase; letter-spacing: .04em; }
input, select, textarea {
  width: 100%; padding: 11px 13px; font: inherit; font-size: 1rem; color: var(--text);
  background: var(--bg); border: 1px solid var(--line); border-radius: 10px;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
textarea { min-height: 180px; resize: vertical; }
.result { background: var(--accent-soft); border-radius: 12px; padding: 18px; margin-top: 8px; font-size: 1.05rem; }
.result strong { font-size: 1.5rem; color: var(--accent); font-family: var(--serif); }
.result pre { white-space: pre-wrap; margin: 0; font: inherit; }
table { width: 100%; border-collapse: collapse; margin-top: 8px; font-size: .97rem; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; }
.result th, .result td { border-color: rgba(180, 69, 31, .15); }

/* Article body */
.prose p, .prose li { max-width: 72ch; }
.prose img.inline { border-radius: var(--radius); margin: 24px 0 6px; aspect-ratio: 16 / 9; object-fit: cover; width: 100%; }
.prose figcaption { font-size: .85rem; color: var(--muted); margin-bottom: 18px; }
.callout { background: var(--green-soft); border-left: 4px solid var(--green); border-radius: 0 12px 12px 0; padding: 14px 18px; margin: 20px 0; }
.toc { background: var(--cream); border-radius: 12px; padding: 16px 20px; margin: 0 0 24px; }
.toc ol { margin: 6px 0 0; padding-left: 20px; }

.ad-slot {
  margin: 32px 0; min-height: 100px; border: 1px dashed var(--line); border-radius: 12px;
  display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: .75rem;
  text-transform: uppercase; letter-spacing: .1em; background: var(--surface);
}
.gear { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 22px 18px 82px; margin-top: 28px; }
.gear::before { content: "★"; position: absolute; left: 22px; top: 20px; width: 44px; height: 44px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-size: 1.2rem; }
.gear h3 { margin: 0 0 4px; }
.gear p { margin: 0; }
.faq details { border-bottom: 1px solid var(--line); padding: 14px 0; }
.faq summary { cursor: pointer; font-weight: 600; }
.faq details p { margin: 8px 0 0; color: var(--muted); }

/* Author + newsletter */
.author { display: flex; gap: 18px; align-items: center; background: var(--cream); border-radius: var(--radius); padding: 20px; margin: 40px 0 0; }
.author img { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; flex: none; }
.author p { margin: 2px 0 0; font-size: .95rem; color: var(--muted); }
.newsletter { background: var(--green); color: #fff; border-radius: 24px; padding: 40px; display: grid; grid-template-columns: 1.2fr 1fr; gap: 28px; align-items: center; margin: 64px 0 24px; }
.newsletter h2 { margin: 0 0 8px; color: #fff; }
.newsletter p { margin: 0; color: rgba(255, 255, 255, .85); }
.newsletter form { display: flex; gap: 10px; flex-wrap: wrap; }
.newsletter input { flex: 1 1 200px; background: #fff; border: 0; }
.newsletter .btn { background: #fff; color: var(--green) !important; }
.newsletter small { display: block; margin-top: 8px; color: rgba(255, 255, 255, .7); }
@media (max-width: 760px) { .newsletter { grid-template-columns: 1fr; padding: 28px 22px; } }

.related { padding-top: 8px; }

footer.site { background: #1f1b16; color: #cfc6bb; margin-top: 64px; padding: 48px 0 28px; font-size: .92rem; }
footer.site .cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 28px; }
footer.site h4 { color: #fff; font-family: var(--serif); font-size: 1rem; margin: 0 0 10px; font-weight: 600; }
footer.site a { color: #cfc6bb; text-decoration: none; display: block; margin: 4px 0; }
footer.site a:hover { color: #fff; }
footer.site .logo { color: #fff; margin-bottom: 10px; }
footer.site .legal { border-top: 1px solid #3a332b; margin-top: 32px; padding-top: 18px; font-size: .82rem; color: #9b9187; }
@media (max-width: 760px) { footer.site .cols { grid-template-columns: 1fr 1fr; } }

@media print {
  header.site, footer.site, .ad-slot, .newsletter, .no-print { display: none !important; }
  body { background: #fff; font-size: 12px; }
}
.gear .disclosure { margin-top: 8px; font-size: .78rem; color: var(--muted); }
