:root {
  --bg: #fbfaf7;
  --card: #ffffff;
  --surface: #f5f6f7;
  --surface-2: #f0f2f3;
  --text: #171816;
  --muted: #6f746f;
  --border: #e4e4df;
  --primary: #c2410c;
  --primary-2: #e65f0e;
  --primary-soft: #fff0e6;
  --primary-soft-2: #fff7f1;
  --warning-soft: #fff4dc;
  --shadow: 0 14px 40px rgba(145, 61, 16, 0.08);
  --radius: 18px;
  --max: 1180px;
  --read: 768px;
}

.dark {
  --bg: #0f1412;
  --card: #151b18;
  --surface: #1a211e;
  --surface-2: #202925;
  --text: #f3f6f4;
  --muted: #a6b0aa;
  --border: #29332f;
  --primary: #ff9a4d;
  --primary-2: #ffb477;
  --primary-soft: #4a2414;
  --primary-soft-2: #321c12;
  --warning-soft: #3c3118;
  --shadow: none;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
img { max-width: 100%; display: block; }
code, pre { font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; }

.container { width: min(var(--max), calc(100% - 40px)); margin: 0 auto; }

/* Header */
.header {
  position: sticky; top: 0; z-index: 50;
  border-bottom: 1px solid color-mix(in srgb, var(--border), transparent 15%);
  background: color-mix(in srgb, var(--bg), transparent 10%);
  backdrop-filter: blur(14px);
}
.header-inner { height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: flex; align-items: center; gap: 11px; font-weight: 760; letter-spacing: -0.02em; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
  background: var(--primary); color: var(--bg); font-weight: 800; font-size: 15px;
}
.dark .brand-mark { color: #2b1308; }
.brand-copy { display: flex; flex-direction: column; line-height: 1.05; }
.brand-copy small { color: var(--muted); font-size: 11px; font-weight: 600; margin-top: 4px; letter-spacing: 0; }
.nav { display: flex; align-items: center; gap: 26px; color: var(--muted); font-size: 14px; }
.nav a:hover { color: var(--text); }
.nav a[aria-current="page"] { color: var(--text); font-weight: 700; }
.actions { display: flex; align-items: center; gap: 10px; }
.icon-btn, .btn {
  border: 1px solid var(--border); background: var(--card); color: var(--text);
  border-radius: 11px; min-height: 40px; display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; transition: .18s ease;
}
.icon-btn { width: 40px; padding: 0; font-size: 18px; }
.btn { padding: 0 16px; font-weight: 700; font-size: 14px; gap: 8px; }
.btn:hover, .icon-btn:hover { transform: translateY(-1px); border-color: color-mix(in srgb, var(--primary), var(--border) 55%); }
.btn-primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.dark .btn-primary { color: #2b1308; }
.btn-ghost { background: transparent; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--primary), #ffbf47 55%); outline-offset: 3px; }

.desktop-only { display: inline-flex; }
.menu-btn { display: none; }
.mobile-nav { display: none; border-top: 1px solid var(--border); background: var(--card); }
.mobile-nav.open { display: block; }
.mobile-nav .container { display: flex; flex-direction: column; padding: 6px 0 16px; }
.mobile-nav a { padding: 13px 2px; color: var(--text); font-weight: 650; font-size: 15px; border-bottom: 1px solid var(--border); }
.mobile-nav a:last-child { border-bottom: 0; }
.mobile-nav .btn { margin-top: 12px; padding: 0 16px; }

/* Breadcrumb */
.breadcrumb { font-size: 13px; color: var(--muted); margin-bottom: 20px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.breadcrumb a:hover { color: var(--text); }
.breadcrumb span[aria-hidden] { opacity: .6; }

/* Page hero (compact) */
.page-hero { border-bottom: 1px solid var(--border); position: relative; overflow: hidden; }
.page-hero:before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 260px; z-index: -1;
  background: radial-gradient(circle at 16% 0%, color-mix(in srgb, var(--primary-soft), transparent 8%), transparent 60%);
}
.page-hero-inner { padding: 44px 0 46px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 999px;
  background: var(--primary-soft); color: var(--primary-2); font-size: 12px; font-weight: 750; margin-bottom: 18px;
}
.page-hero h1 { margin: 0; max-width: 820px; font-size: clamp(34px, 4.6vw, 54px); line-height: 1.02; letter-spacing: -0.045em; font-weight: 780; }
.page-lead { margin: 20px 0 0; max-width: 720px; color: var(--muted); font-size: 18px; line-height: 1.55; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }

/* Sections */
section.block { padding: 64px 0; border-bottom: 1px solid var(--border); }
section.block:last-of-type { border-bottom: 0; }
.section-head { max-width: 780px; margin-bottom: 30px; }
.section-head h2 { font-size: clamp(28px, 3.4vw, 40px); line-height: 1.08; letter-spacing: -0.035em; margin: 0; }
.section-head p { color: var(--muted); font-size: 17px; line-height: 1.6; margin: 14px 0 0; }

/* Reading column */
.prose { max-width: var(--read); }
.prose.wide { max-width: 860px; }
.prose > * + * { margin-top: 18px; }
.prose h2 { font-size: clamp(25px, 3vw, 33px); line-height: 1.15; letter-spacing: -0.03em; margin: 42px 0 0; }
.prose h3 { font-size: 20px; line-height: 1.25; letter-spacing: -0.02em; margin: 30px 0 0; }
.prose p { color: var(--text); line-height: 1.7; }
.prose p.muted, .prose .muted { color: var(--muted); }
.prose ul, .prose ol { padding-left: 22px; color: var(--text); line-height: 1.7; }
.prose li + li { margin-top: 6px; }
.prose a.inline { color: var(--primary-2); font-weight: 650; text-decoration: underline; text-underline-offset: 3px; }
.prose code { background: var(--surface-2); border: 1px solid var(--border); border-radius: 6px; padding: 2px 6px; font-size: 13px; }
.prose blockquote {
  margin: 24px 0; padding: 16px 18px; border-left: 3px solid var(--primary-2);
  background: var(--primary-soft-2); border-radius: 0 12px 12px 0; color: var(--text);
}
.prose hr { border: 0; border-top: 1px solid var(--border); margin: 34px 0; }

/* Direct answer */
.answer {
  border: 1px solid var(--border); border-left: 4px solid var(--primary);
  background: var(--card); border-radius: 14px; padding: 20px 22px; box-shadow: var(--shadow);
}
.answer p { margin: 0; font-size: 17px; line-height: 1.65; }
.answer strong { color: var(--text); }

/* Callout */
.callout {
  border: 1px solid var(--border); border-left: 3px solid var(--primary-2);
  background: var(--primary-soft-2); border-radius: 0 12px 12px 0;
  padding: 15px 17px; font-size: 14.5px; line-height: 1.6;
}
.callout strong { color: var(--text); }

/* Cards grid */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.cards.two { grid-template-columns: repeat(2, 1fr); }
.card {
  border: 1px solid var(--border); background: var(--card); border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow); display: flex; flex-direction: column;
}
.card h3 { margin: 0 0 8px; font-size: 18px; letter-spacing: -0.02em; }
.card p { margin: 0; color: var(--muted); line-height: 1.6; font-size: 15px; }
.card .card-link { margin-top: 14px; color: var(--primary-2); font-weight: 700; font-size: 14px; }
.card .card-link:hover { text-decoration: underline; }
.card-link-block { display: block; }
.feature-icon { width: 42px; height: 42px; border-radius: 12px; background: var(--primary-soft); display: grid; place-items: center; color: var(--primary-2); font-size: 19px; font-weight: 800; margin-bottom: 14px; }
.badge { display: inline-flex; align-items: center; border-radius: 999px; padding: 5px 9px; font-size: 11px; font-weight: 800; white-space: nowrap; background: var(--surface-2); color: var(--muted); }
.badge.write { background: var(--warning-soft); color: #9c6815; }
.badge.free { background: var(--primary-soft); color: var(--primary-2); }

/* Steps */
.steps { counter-reset: step; display: grid; gap: 12px; max-width: 860px; }
.step {
  border: 1px solid var(--border); background: var(--card); border-radius: 14px;
  padding: 18px 20px 18px 62px; position: relative;
}
.step:before {
  counter-increment: step; content: counter(step);
  position: absolute; left: 18px; top: 18px;
  width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center;
  background: var(--primary); color: #fff; font-weight: 800; font-size: 14px;
}
.dark .step:before { color: #2b1308; }
.step h3 { margin: 0 0 4px; font-size: 16px; }
.step p { margin: 0; color: var(--muted); font-size: 14.5px; line-height: 1.6; }

/* Flow diagram */
.flow { display: flex; flex-wrap: wrap; align-items: stretch; gap: 10px; margin: 26px 0; }
.flow-node {
  flex: 1 1 150px; border: 1px solid var(--border); background: var(--card); border-radius: 14px;
  padding: 16px; text-align: center; box-shadow: var(--shadow);
}
.flow-node strong { display: block; font-size: 15px; }
.flow-node small { color: var(--muted); font-size: 12.5px; }
.flow-arrow { align-self: center; color: var(--primary-2); font-weight: 800; font-size: 20px; }
.flow.horizontal { flex-wrap: nowrap; overflow-x: auto; }

/* Checklist */
.checklist { list-style: none; padding: 0; display: grid; gap: 8px; }
.checklist li { position: relative; padding-left: 30px; line-height: 1.6; }
.checklist li:before { content: "✓"; position: absolute; left: 0; top: 0; color: var(--primary-2); font-weight: 900; }

/* Code block */
.code {
  border: 1px solid var(--border); background: var(--surface); border-radius: 12px;
  padding: 14px 16px; overflow-x: auto; font-size: 13px; color: var(--text); line-height: 1.55;
}
.code-row { display: flex; align-items: stretch; gap: 9px; }
.code-row .code { flex: 1; white-space: nowrap; }
.copy-btn {
  min-width: 92px; border: 1px solid var(--border); background: var(--card); color: var(--text);
  border-radius: 12px; padding: 0 14px; font-weight: 700; cursor: pointer;
}
.copy-btn:hover { border-color: var(--primary); color: var(--primary); }

/* Table */
.table-wrap { overflow-x: auto; }
.compare {
  width: 100%; border-collapse: separate; border-spacing: 0; border: 1px solid var(--border);
  border-radius: 16px; background: var(--card); min-width: 560px;
}
.compare th, .compare td { padding: 14px 16px; border-bottom: 1px solid var(--border); text-align: left; font-size: 14px; vertical-align: top; }
.compare th { background: var(--surface); font-size: 13px; color: var(--muted); }
.compare td:first-child { font-weight: 700; color: var(--text); }
.compare tr:last-child td { border-bottom: 0; }

/* FAQ */
.faq { display: grid; gap: 10px; max-width: 860px; }
details { border: 1px solid var(--border); background: var(--card); border-radius: 14px; padding: 0 18px; }
summary { cursor: pointer; list-style: none; font-weight: 750; padding: 17px 0; display: flex; justify-content: space-between; gap: 14px; }
summary::-webkit-details-marker { display: none; }
summary:after { content: "+"; color: var(--muted); font-size: 20px; font-weight: 500; }
details[open] summary:after { content: "–"; }
details p { color: var(--muted); line-height: 1.65; margin: -2px 0 18px; }

/* Related links */
.related { display: grid; gap: 10px; max-width: 860px; }
.related a {
  border: 1px solid var(--border); background: var(--card); border-radius: 12px;
  padding: 15px 18px; display: flex; justify-content: space-between; gap: 14px; align-items: center; font-weight: 650;
}
.related a:hover { border-color: color-mix(in srgb, var(--primary), var(--border) 55%); }
.related a span.go { color: var(--primary-2); font-weight: 800; }
.related a small { display: block; color: var(--muted); font-weight: 500; font-size: 13px; margin-top: 3px; }

/* CTA */
.cta-box { background: var(--primary); color: #fff; border-radius: 24px; padding: 42px; display: flex; justify-content: space-between; gap: 28px; align-items: center; }
.dark .cta-box { color: #2b1308; }
.cta-box h2 { margin: 0; font-size: clamp(26px, 3.4vw, 40px); letter-spacing: -0.04em; }
.cta-box p { margin: 10px 0 0; opacity: .85; max-width: 620px; line-height: 1.55; }
.cta-box .btn { background: #fff; color: #c2410c; border-color: #fff; flex: 0 0 auto; }
.dark .cta-box .btn { color: #2b1308; }

/* Footer */
footer { padding: 56px 0 36px; }
.footer-grid { display: grid; grid-template-columns: 1.5fr repeat(4, minmax(130px, 1fr)); gap: 30px 26px; }
.footer-brand p { color: var(--muted); line-height: 1.6; font-size: 14px; max-width: 320px; margin: 14px 0 0; }
.footer-col h4 { margin: 0 0 10px; font-size: 13px; letter-spacing: 0.02em; text-transform: uppercase; color: var(--text); }
.footer-col a { display: block; color: var(--muted); font-size: 14px; padding: 5px 0; }
.footer-col a:hover { color: var(--text); }
.footer-bottom { margin-top: 36px; padding-top: 22px; border-top: 1px solid var(--border); display: flex; justify-content: space-between; gap: 20px; color: var(--muted); font-size: 13px; }
.wordmark { margin-top: 38px; overflow: hidden; opacity: .045; font-weight: 900; letter-spacing: -0.065em; font-size: clamp(40px, 8vw, 96px); line-height: .9; white-space: nowrap; text-align: center; }

/* WhatsApp help (shared identity) */
.whatsapp-help {
  position: fixed; right: clamp(16px, 4vw, 52px); bottom: clamp(18px, 5vh, 42px); z-index: 80;
  display: flex; align-items: flex-end; gap: 12px; opacity: 0; visibility: hidden;
  transform: translateY(18px) scale(.96);
  transition: opacity .25s ease, transform .25s ease, visibility .25s ease;
}
.whatsapp-help.is-visible { opacity: 1; visibility: visible; transform: translateY(0) scale(1); }
.whatsapp-help.is-dismissed { display: none; }
.whatsapp-bubble {
  position: relative; max-width: 188px; padding: 11px 14px; border: 2px solid #262626;
  border-radius: 24px 24px 24px 8px; background: #fff; color: #262626;
  box-shadow: 0 8px 0 #00d084, 0 16px 34px rgba(0,0,0,.13); font-size: 14px; font-weight: 700; line-height: 1.25;
}
.whatsapp-bubble:hover { transform: translateY(-2px); }
.whatsapp-bubble:after {
  content: ""; position: absolute; right: -11px; bottom: 11px; width: 18px; height: 18px;
  border-top: 2px solid #262626; border-right: 2px solid #262626; background: #fff; transform: rotate(45deg);
}
.whatsapp-close {
  position: absolute; top: -13px; right: -12px; width: 30px; height: 30px; display: grid; place-items: center;
  border: 0; border-radius: 50%; background: #111; color: #fff; font-size: 20px; line-height: 1; cursor: pointer;
  box-shadow: 0 5px 15px rgba(0,0,0,.16);
}
.whatsapp-link {
  width: 72px; height: 72px; display: grid; place-items: center; border-radius: 50%;
  background: #00d084; color: #fff; box-shadow: 0 14px 28px rgba(0,0,0,.2); transition: transform .18s ease, box-shadow .18s ease;
}
.whatsapp-link:hover { transform: translateY(-4px) rotate(-3deg); box-shadow: 0 18px 34px rgba(0,0,0,.24); }
.whatsapp-link svg { width: 44px; height: 44px; }

.skip-link {
  position: absolute; left: -9999px; top: 0; background: var(--primary); color: #fff;
  padding: 10px 16px; border-radius: 0 0 10px 0; z-index: 100;
}
.skip-link:focus { left: 0; }

/* Responsive */
@media (max-width: 980px) {
  .nav { display: none; }
  .menu-btn { display: inline-flex; }
  .cards, .cards.two { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-brand { grid-column: 1 / -1; }
  .cta-box { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 680px) {
  .container { width: min(var(--max), calc(100% - 28px)); }
  .header-inner { height: 66px; }
  .brand-copy > span { font-size: 14px; }
  .brand-copy small { display: none; }
  .page-hero h1 { font-size: 34px; }
  .page-lead { font-size: 17px; }
  section.block { padding: 48px 0; }
  .card { padding: 20px; }
  .cta-box { padding: 28px; }
  .footer-grid { grid-template-columns: 1fr; gap: 22px; }
  .footer-bottom { flex-direction: column; }
  .code-row { flex-direction: column; }
  .copy-btn { min-height: 42px; }
  .step { padding: 16px 18px 16px 56px; }
  .whatsapp-help { right: 16px; bottom: 18px; gap: 8px; }
  .whatsapp-bubble { max-width: 162px; padding: 10px 12px; font-size: 13px; }
  .whatsapp-link { width: 62px; height: 62px; }
  .whatsapp-link svg { width: 38px; height: 38px; }
  .whatsapp-close { width: 28px; height: 28px; top: -9px; right: -7px; font-size: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
