:root {
  --bg: #f8f6f3;
  --bg-soft: #fdfcfa;
  --card: #ffffff;
  --ink: #222222;
  --muted: #5c5c5c;
  --line: #d8d2ca;
  --line-soft: #ebe6df;
  --red: #dc143c;
  --red-dark: #b0102f;
  --red-tint: #fbe9ec;
  --radius: 8px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 17px; line-height: 1.6; -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 20px; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 14px; letter-spacing: -0.02em; }
h1 { font-size: clamp(34px, 5vw, 56px); font-weight: 700; }
h2 { font-size: clamp(28px, 3.6vw, 40px); font-weight: 700; }
h3 { font-size: 21px; font-weight: 700; }
p { margin: 0 0 12px; }
.eyebrow { font-size: 13px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--red); margin-bottom: 10px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 22px; border-radius: 6px; font-weight: 700; font-size: 16px;
  text-decoration: none; border: 1.5px solid var(--red); cursor: pointer; text-align: center;
  transition: transform .15s ease, background .15s ease;
}
.btn-primary { background: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-dark); border-color: var(--red-dark); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--red); }
.btn-ghost:hover { background: var(--red-tint); }
.btn-ghost.light { color: #fff; border-color: #fff; }
.btn-ghost.light:hover { background: rgba(255,255,255,.1); }
.btn-sm { padding: 10px 18px; font-size: 15px; }
.btn-block { width: 100%; }
.ctas { display: flex; gap: 12px; flex-wrap: wrap; }
.ctas.center { justify-content: center; }

/* Nav */
header.nav { position: sticky; top: 0; z-index: 50; background: rgba(248,246,243,.94); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line-soft); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 16px; }
.logo { white-space: nowrap; display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; font-size: 18px; }
.logo-mark { width: 36px; height: 36px; border-radius: 50%; background: #fff; color: var(--red); border: 1.5px solid var(--red); display: grid; place-items: center; font-size: 14px; font-weight: 700; }
.nav-links { display: flex; gap: 26px; }
.nav-links a { text-decoration: none; color: var(--muted); font-weight: 500; font-size: 15px; white-space: nowrap; }
.nav-links a:hover { color: var(--red); }

/* Hero */
.lm-hero { padding: 56px 0 40px; }
.badge { display: inline-flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 10px; background: #fff; padding: 6px 14px 6px 6px; font-size: 14px; font-weight: 500; margin-bottom: 22px; }
.badge .dot { width: 22px; height: 22px; border-radius: 6px; background: var(--red); display: grid; place-items: center; color: #fff; font-size: 13px; font-weight: 700; }
.lm-hero h1 { max-width: 860px; }
.sub { color: var(--red); font-weight: 700; font-size: clamp(17px, 1.8vw, 20px); margin-bottom: 10px; }
.lead { color: var(--muted); font-size: 18px; max-width: 700px; margin-bottom: 26px; }
.author { display: flex; align-items: center; gap: 14px; margin-top: 30px; padding-top: 22px; border-top: 1px solid var(--line-soft); max-width: 700px; }
.author img { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; object-position: center; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line); flex: 0 0 auto; }
.author p { margin: 0; font-size: 15px; color: var(--muted); }
.author strong { color: var(--ink); }
.author a { color: var(--red); font-weight: 700; text-decoration: none; white-space: nowrap; }

/* Document + sidebar */
.lm-body { padding: 24px 0 72px; scroll-margin-top: 72px; }
.lm-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 36px; align-items: start; }
.doc { display: grid; gap: 22px; }
.doc img { width: 100%; height: auto; background: #fff; border: 1px solid var(--line); border-radius: 6px; box-shadow: 0 8px 24px rgba(0,0,0,.07); }
.doc-end { display: flex; justify-content: center; padding-top: 6px; }
.side { position: sticky; top: 92px; display: grid; gap: 18px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.side-card p { color: var(--muted); font-size: 15.5px; margin-bottom: 18px; }
.mini { list-style: none; padding: 0; margin: 0 0 14px; }
.mini li a { display: flex; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line-soft); text-decoration: none; font-size: 15px; font-weight: 500; }
.mini li a:hover span { color: var(--red); }
.mini b { color: var(--red); white-space: nowrap; }
.more { color: var(--red); font-weight: 700; font-size: 15px; text-decoration: none; }

/* Bottom CTA */
.lm-cta { padding: 0 0 72px; }
.final { background: var(--ink); color: #fff; border-radius: 26px; padding: 56px 28px; text-align: center; position: relative; overflow: hidden; }
.final::before { content: ""; position: absolute; inset: auto -120px -160px auto; width: 380px; height: 380px; border-radius: 50%; background: radial-gradient(circle, rgba(220,20,60,.55), transparent 70%); }
.final > * { position: relative; }
.final .pill { display: inline-block; background: var(--red); font-weight: 700; font-size: 12.5px; letter-spacing: .08em; text-transform: uppercase; padding: 6px 14px; border-radius: 999px; margin-bottom: 16px; }
.final p { color: #e8dede; max-width: 600px; margin: 0 auto 26px; font-size: 18px; }
.quote { text-align: center; max-width: 640px; margin: 40px auto 0; }
.quote blockquote { margin: 0 0 8px; font-size: 20px; font-weight: 700; font-style: italic; line-height: 1.45; }
.quote span { color: var(--muted); font-size: 15px; }
.quote a { color: var(--red); font-weight: 700; text-decoration: none; }

/* Footer */
footer { border-top: 1px solid var(--line-soft); padding: 36px 0 28px; font-size: 15px; }
.foot { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
.foot nav { display: flex; gap: 22px; flex-wrap: wrap; }
.foot nav a { text-decoration: none; color: var(--muted); }
.foot nav a:hover { color: var(--red); }
.copy { color: var(--muted); font-size: 14px; margin-top: 14px; }

@media (max-width: 960px) {
  .lm-grid { grid-template-columns: 1fr; }
  .side { position: static; }
  .nav-links { display: none; }
}
@media (max-width: 560px) {
  .wrap { padding: 0 16px; }
  .lm-hero { padding: 36px 0 28px; }
  .ctas .btn { width: 100%; }
  .nav .btn-sm { padding: 8px 12px; font-size: 13.5px; }
  .logo { font-size: 16px; }
  .doc { gap: 14px; }
  .final { padding: 44px 20px; border-radius: 20px; }
}
.short { display: none; }
@media (max-width: 560px) { .long { display: none; } .short { display: inline; } }

/* Calm layout: document full width, soft author note */
.lm-narrow { max-width: 900px; }
.lm-hero .wrap { max-width: 900px; }
.about-note { display: flex; gap: 26px; align-items: flex-start; border-top: 1px solid var(--line-soft); padding-top: 40px; }
.about-note img { width: 88px; height: 88px; border-radius: 50%; object-fit: cover; object-position: center; flex: 0 0 auto; }
.about-note h2 { font-size: 26px; margin-bottom: 10px; }
.about-note p { color: var(--muted); }
.about-note p a { color: var(--red); font-weight: 700; text-decoration: none; }
.about-note .btn { margin-top: 8px; }
@media (max-width: 560px) { .about-note { flex-direction: column; gap: 16px; } .about-note .btn { width: 100%; } }
.logo-img { width: 36px; height: 36px; border-radius: 8px; display: block; }

/* Email templates page */
.tpl-list { display: grid; gap: 20px; }
.tpl-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.tpl-head h3 { margin-bottom: 4px; }
.tpl-head .hint { color: var(--muted); font-size: 15px; margin: 0; }
.tpl-body { background: var(--bg-soft); border: 1px solid var(--line-soft); border-radius: 6px; padding: 18px 20px; margin-top: 16px; font-size: 16px; white-space: pre-line; }
.copy-btn { padding: 8px 14px; font-size: 14px; }

/* Article pages */
.article { max-width: 760px; padding-top: 32px; padding-bottom: 72px; }
.crumbs { font-size: 14px; color: var(--muted); margin-bottom: 20px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--red); }
.article-head h1 { margin-bottom: 10px; }
.article-head .author { margin-top: 20px; }
.article-head .author a { color: var(--ink); text-decoration: none; }
.tldr { background: #fff; border: 1px solid var(--line); border-left: 3px solid var(--red); border-radius: 6px; padding: 18px 22px; margin: 28px 0 8px; }
.tldr-label { font-weight: 700; color: var(--red); }
.tldr p:last-child { margin: 0; font-size: 17px; }
.article-body { font-size: 18px; line-height: 1.7; }
.article-body h2 { font-size: clamp(24px, 3vw, 30px); margin: 44px 0 14px; }
.article-body h3 { font-size: 20px; margin: 28px 0 10px; }
.article-body p { margin: 0 0 16px; }
.article-body ul, .article-body ol { padding-left: 24px; margin: 0 0 18px; }
.article-body li { margin-bottom: 8px; }
.article-body li::marker { color: var(--red); }
.article-body ul.checklist { list-style: none; padding-left: 0; }
.article-body ul.checklist li { position: relative; padding-left: 32px; }
.article-body ul.checklist li::before { content: ""; position: absolute; left: 0; top: 5px; width: 18px; height: 18px; border: 1.5px solid var(--red); border-radius: 4px; background: #fff; }
.article-body a { color: var(--red); font-weight: 700; }
.article-faq { margin-top: 48px; padding-top: 32px; border-top: 1px solid var(--line-soft); }
.article-faq h2 { font-size: clamp(24px, 3vw, 30px); }
.faq-item { margin-top: 20px; }
.faq-item h3 { font-size: 18px; margin-bottom: 6px; }
.faq-item p { color: var(--muted); margin: 0; }
.related { margin: 48px 0; padding: 24px 26px; background: #fff; border: 1px solid var(--line); border-radius: 8px; }
.related h2 { font-size: 20px; margin-bottom: 12px; }
.related ul { margin: 0; padding-left: 20px; columns: 2 260px; column-gap: 28px; }
.related li { margin-bottom: 8px; break-inside: avoid; }
.related a { color: var(--ink); text-decoration: none; }
.related a:hover { color: var(--red); }
.related li::marker { color: var(--red); }
@media (max-width: 560px) { .article-body { font-size: 17px; } .related { padding: 20px; } }

/* Document pages (My own application) */
.doc-page { padding-bottom: 24px; }
.doc-page h1 { margin-bottom: 10px; }
.doc-wrap { max-width: 900px; }
.doc-pages { display: grid; gap: 18px; }
.doc-pages img { width: 100%; height: auto; background: #fff; border: 1px solid var(--line); border-radius: 6px; box-shadow: 0 8px 24px rgba(0,0,0,.07); }
.embed { background: #fff; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; box-shadow: 0 8px 24px rgba(0,0,0,.07); }
.embed iframe { display: block; width: 100%; height: 80vh; min-height: 560px; border: 0; }
@media (max-width: 560px) { .embed iframe { height: 75vh; min-height: 480px; } }
