:root {
  --bg: #f7f2ea;
  --surface: #fffdf8;
  --ink: #1f1b16;
  --muted: #665b4c;
  --line: #e8dccb;
  --brand: #b9572c;
  --brand-dark: #8d431f;
  --shadow: 0 20px 60px rgba(61, 37, 18, 0.08);
  --radius: 22px;
  --container: 1180px;
  --font-body: Georgia, "Times New Roman", serif;
  --font-display: "Trebuchet MS", "Segoe UI", sans-serif;
}
*,
*::before,
*::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background:
    radial-gradient(circle at top right, rgba(255, 221, 181, 0.5), transparent 28%),
    linear-gradient(180deg, #fffaf3 0%, var(--bg) 100%);
  line-height: 1.7;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand-dark); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--brand); }
.container { width: min(100% - 2rem, var(--container)); margin: 0 auto; }
.section { padding: 3.5rem 0; }
.section-muted { background: rgba(255,255,255,0.45); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.site-header { position: sticky; top: 0; z-index: 20; backdrop-filter: blur(18px); background: rgba(255, 251, 244, 0.88); border-bottom: 1px solid rgba(210, 191, 166, 0.45); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 84px; }
.brand { display: inline-flex; align-items: center; gap: 0.85rem; color: var(--ink); text-decoration: none; }
.brand span { display: grid; gap: 0.15rem; }
.brand strong, .hero-copy h1, .page-heading h1, .prose h1, .prose h2, .prose h3, .tool-card h2, .sidebar-card h2, .site-footer h2, .card-content h3 { font-family: var(--font-display); line-height: 1.15; }
.brand em { font-style: normal; color: var(--muted); font-size: 0.82rem; }
.primary-nav { display: flex; gap: 1rem; align-items: center; }
.primary-nav a { text-decoration: none; font-family: var(--font-display); color: var(--ink); }
.nav-toggle { display: none; border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 0.7rem 1rem; }
.hero { padding: 4rem 0 3rem; }
.hero-grid, .two-col, .tool-layout, .footer-grid, .listing-layout { display: grid; gap: 2rem; }
.hero-copy h1 { font-size: clamp(2.5rem, 4vw, 4.4rem); margin: 0 0 1rem; }
.lede { font-size: 1.12rem; color: var(--muted); max-width: 62ch; }
.button { display: inline-flex; align-items: center; justify-content: center; padding: 0.9rem 1.2rem; border-radius: 999px; border: 0; background: linear-gradient(135deg, var(--brand), #d17246); color: white; font-weight: 700; text-decoration: none; font-family: var(--font-display); cursor: pointer; }
.button-secondary { background: transparent; border: 1px solid var(--line); color: var(--ink); }
.hero-art, .spotlight-panel, .tool-card, .sidebar-card, .tip-box, .contact-card, .legal-card, .author-card, .card, .empty-state, .toc { background: rgba(255,255,255,0.86); border: 1px solid rgba(225, 210, 191, 0.9); border-radius: var(--radius); box-shadow: var(--shadow); }
.hero-art, .spotlight-panel, .tool-card, .sidebar-card, .tip-box, .contact-card, .legal-card, .author-card, .toc { padding: 1.5rem; }
.eyebrow { margin: 0 0 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.78rem; font-family: var(--font-display); color: var(--brand); }
.inline-list, .contact-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.2rem; }
.inline-list span { padding: 0.5rem 0.85rem; border-radius: 999px; background: #fff2e6; border: 1px solid #f0dcc8; color: var(--brand-dark); }
.stats, .cards-grid, .trust-strip, .sidebar-stack { display: grid; gap: 1rem; }
.stats { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 1.5rem; }
.stats div, .trust-strip div { padding: 1rem; border-radius: 18px; background: rgba(255,255,255,0.72); border: 1px solid var(--line); }
.cards-grid { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1.5rem; }
.card { overflow: hidden; }
.card-image img { aspect-ratio: 16 / 9; object-fit: cover; }
.article-card-image img,
.article-card-media {
  aspect-ratio: 9 / 16;
  object-fit: cover;
  width: 100%;
}
.article-card .card-content {
  padding-top: 1rem;
}
.featured-image-portrait {
  max-width: 560px;
  margin: 1.25rem auto;
}
.article-featured-media {
  aspect-ratio: 9 / 16;
  object-fit: cover;
  width: 100%;
  border-radius: var(--radius);
}
.card-content { padding: 1.25rem; }
.card-content p { color: var(--muted); }
.tool-layout { grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); }
.tool-form, .contact-form { display: grid; gap: 1rem; }
label { display: grid; gap: 0.45rem; font-weight: 700; font-family: var(--font-display); }
input, select, textarea { width: 100%; padding: 0.9rem 1rem; border-radius: 16px; border: 1px solid #d8c8b4; background: white; font: inherit; color: var(--ink); }
textarea { min-height: 160px; resize: vertical; }
.tool-result { margin-top: 1.2rem; padding: 1rem; background: #fff6ea; border-radius: 18px; border: 1px solid #efd7bb; }
.breadcrumbs { padding-top: 1rem; font-size: 0.94rem; }
.breadcrumbs ol { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.breadcrumbs li:not(:last-child)::after { content: "/"; margin-left: 0.5rem; color: var(--muted); }
.page-heading { padding: 2rem 0 1rem; }
.page-heading h1 { margin: 0.2rem 0 0.8rem; font-size: clamp(2rem, 3vw, 3rem); }
.listing-layout { grid-template-columns: minmax(0, 2fr) minmax(280px, 0.9fr); }
.article { max-width: 860px; margin: 0 auto; }
.article-meta { display: flex; flex-wrap: wrap; gap: 1rem; color: var(--muted); }
.featured-image { margin: 1.25rem 0; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.toc ol, .plain-list, .prose ul, .prose ol { padding-left: 1.2rem; }
.prose p, .prose li, .prose details { color: #352c23; max-width: 70ch; }
details { padding: 1rem 1.15rem; border-radius: 16px; border: 1px solid var(--line); background: rgba(255,255,255,0.62); }
summary { cursor: pointer; font-weight: 700; font-family: var(--font-display); }
.search-form { display: flex; gap: 0.8rem; flex-wrap: wrap; margin: 1rem 0 1.5rem; }
.search-form input { flex: 1 1 260px; }
.site-footer { margin-top: 3rem; padding: 3rem 0 1rem; background: #2e241c; color: #f8efe5; }
.site-footer a { color: #ffe0bf; }
.footer-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-bottom { padding-top: 1rem; border-top: 1px solid rgba(255,255,255,0.15); margin-top: 2rem; }
@media (min-width: 860px) { .hero-grid, .two-col { grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.9fr); } }
@media (max-width: 859px) {
  .primary-nav { display: none; position: absolute; left: 1rem; right: 1rem; top: 76px; padding: 1rem; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); flex-direction: column; align-items: stretch; }
  .primary-nav.is-open { display: flex; }
  .nav-toggle { display: inline-flex; }
  .tool-layout, .listing-layout, .footer-grid, .trust-strip, .stats { grid-template-columns: 1fr; }
}