/* Self-hosted variable fonts (latin subset): no third-party font requests. */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("fonts/inter-var-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Inter Tight";
  font-style: normal;
  font-weight: 500 800;
  font-display: swap;
  src: url("fonts/inter-tight-var-latin.woff2") format("woff2");
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 500 700;
  font-display: swap;
  src: url("fonts/jetbrains-mono-var-latin.woff2") format("woff2");
}

/* ============================================================
   Emberly: shared article/guide stylesheet
   Brand tokens mirror landing/index.html (v1).
   ============================================================ */

:root {
  /* Brand */
  --brand:            #159A82;
  --brand-dark:       #0E7A67;
  --brand-soft:       #DCF2EC;
  --brand-secondary:  #FF8A4C;
  --brand-secondary-soft: #FFE7D6;

  /* Semantic */
  --positive:  #2E9E6B;
  --info:      #3B7FC4;
  --caution:   #D9932A;
  --negative:  #D2544B;

  /* Surface */
  --surface-base:     #F6FAF8;
  --surface-raised:   #FFFFFF;
  --surface-draft:    #EDF4F1;

  /* Text */
  --ink:      #102420;
  --ink-2:    #46554F;
  --ink-3:    #7C8A84;

  /* Rules */
  --rule:     #E6EEEA;
  --rule-2:   #CBD8D3;

  /* Type */
  --font-display: "Inter Tight", "Inter", system-ui, sans-serif;
  --font-sans:    "Inter", system-ui, sans-serif;
  --font-mono:    "JetBrains Mono", ui-monospace, monospace;

  /* Cues */
  --radius:       14px;
  --radius-lg:    22px;
  --radius-pill:  999px;
  --shadow-card:  0 1px 2px rgba(16,36,32,0.04), 0 12px 32px -20px rgba(16,36,32,0.20);
  --teal-grad:    linear-gradient(135deg, #159A82, #0E7A67);

  --maxw: 1120px;
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--surface-base);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-display);
  font-weight: 700; font-size: 15.5px; letter-spacing: 0.2px;
  padding: 13px 22px; border-radius: var(--radius);
  border: none; cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease, color .15s ease;
  white-space: nowrap;
}
.btn-primary {
  background: var(--teal-grad); color: #fff;
  box-shadow: 0 10px 24px -10px rgba(14,122,103,0.6);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 14px 30px -10px rgba(14,122,103,0.7); }
.btn-primary:active { transform: translateY(1px); }

/* ============================================================
   Nav
   ============================================================ */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(246,250,248,0.82);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border-bottom: 1px solid var(--rule);
}
.nav-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 14px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
}
.lockup { display: flex; align-items: center; gap: 11px; }
.mark {
  width: 34px; height: 34px; border-radius: 10px;
  background: var(--teal-grad);
  display: grid; place-items: center; flex-shrink: 0;
  box-shadow: 0 6px 16px -8px rgba(14,122,103,0.7);
}
.mark span {
  width: 15px; height: 15px; border-radius: 50%;
  border: 2.5px solid #fff; position: relative;
}
.mark span::after {
  content: ""; position: absolute; top: 50%; left: 50%;
  transform: translate(-50%,-50%);
  width: 4px; height: 4px; border-radius: 50%;
  background: var(--brand-secondary);
}
.lockup .name {
  font-family: var(--font-display); font-weight: 700;
  font-size: 16.5px; letter-spacing: -0.01em; color: var(--ink);
}
.nav-cta { display: flex; align-items: center; gap: 12px; }

/* ============================================================
   Policy content
   ============================================================ */
.policy, .article { padding: 64px 0 88px; }
.policy-inner, .article-inner { max-width: 720px; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--brand-soft); color: var(--brand-dark);
  font-family: var(--font-mono); font-size: 12px; font-weight: 600;
  letter-spacing: 0.02em;
  padding: 7px 13px; border-radius: var(--radius-pill);
  margin-bottom: 22px;
}

h1 {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(34px, 4.6vw, 48px); line-height: 1.06;
  letter-spacing: -0.03em; color: var(--ink);
}
.policy-meta {
  margin-top: 16px; font-size: 14px; color: var(--ink-3);
  font-family: var(--font-mono);
}
.policy-lede {
  margin-top: 22px; font-size: 17px; line-height: 1.6; color: var(--ink-2);
}

.policy h2, .article h2 {
  font-family: var(--font-display); font-weight: 700;
  font-size: 23px; letter-spacing: -0.02em; color: var(--ink);
  margin-top: 48px; margin-bottom: 14px;
  padding-top: 32px; border-top: 1px solid var(--rule);
}
.policy h3, .article h3 {
  font-family: var(--font-display); font-weight: 700;
  font-size: 17px; letter-spacing: -0.01em; color: var(--ink);
  margin-top: 26px; margin-bottom: 10px;
}
.policy p, .article p { margin-bottom: 14px; font-size: 15.5px; line-height: 1.65; color: var(--ink-2); }
.policy ul, .article ul { margin: 0 0 14px 0; padding-left: 22px; }
.policy li, .article li { margin-bottom: 8px; font-size: 15.5px; line-height: 1.6; color: var(--ink-2); }
.policy strong, .article strong { color: var(--ink); font-weight: 600; }
.policy a.inline, .article a.inline { color: var(--brand-dark); font-weight: 600; border-bottom: 1px solid var(--brand-soft); }
.policy a.inline, .article a.inline:hover { border-bottom-color: var(--brand); }

.callout {
  background: var(--surface-raised);
  border: 1px solid var(--rule-2);
  border-left: 3px solid var(--brand);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin: 18px 0;
  box-shadow: var(--shadow-card);
}
.callout p { margin: 0; font-size: 14.5px; }

/* ============================================================
   Footer
   ============================================================ */
footer { border-top: 1px solid var(--rule); background: var(--surface-raised); padding: 44px 0 34px; }
.footer-inner { display: flex; align-items: flex-start; justify-content: space-between; gap: 40px; flex-wrap: wrap; }
.footer-brand { max-width: 300px; }
.footer-brand p { margin-top: 14px; font-size: 13.5px; color: var(--ink-3); line-height: 1.55; }
.footer-cols { display: flex; gap: 56px; flex-wrap: wrap; }
.footer-col h5 {
  font-family: var(--font-mono); font-size: 11.5px; font-weight: 600; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--ink-3); margin-bottom: 14px;
}
.footer-col a { display: block; font-size: 14px; color: var(--ink-2); margin-bottom: 10px; }
.footer-col a:hover { color: var(--brand-dark); }
.footer-bottom {
  margin-top: 36px; padding-top: 22px; border-top: 1px solid var(--rule);
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  font-size: 13px; color: var(--ink-3);
}

@media (max-width: 720px) {
  .policy, .article { padding: 44px 0 64px; }
  .footer-cols { gap: 36px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; scroll-behavior: auto !important; }
}

/* ============================================================
   Guide / article extras
   ============================================================ */
.breadcrumb {
  font-family: var(--font-mono); font-size: 12.5px; color: var(--ink-3);
  margin-bottom: 18px;
}
.breadcrumb a { color: var(--brand-dark); font-weight: 600; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb span { margin: 0 7px; opacity: .6; }

.article h4 {
  font-family: var(--font-display); font-weight: 700; font-size: 15.5px;
  color: var(--ink); margin-top: 20px; margin-bottom: 8px;
}
.article ol { margin: 0 0 14px 0; padding-left: 22px; }
.article ol li { margin-bottom: 8px; font-size: 15.5px; line-height: 1.6; color: var(--ink-2); }

/* Table of contents */
.toc {
  background: var(--surface-draft); border: 1px solid var(--rule);
  border-radius: var(--radius); padding: 18px 20px; margin: 26px 0 34px;
}
.toc h2 {
  font-family: var(--font-mono); font-size: 11.5px; font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3);
  margin: 0 0 12px; padding: 0; border: none;
}
.toc ol { margin: 0; padding-left: 20px; }
.toc li { margin-bottom: 7px; font-size: 14.5px; }
.toc a { color: var(--brand-dark); font-weight: 600; }
.toc a:hover { text-decoration: underline; }

/* Comparison table */
.cmp-wrap { overflow-x: auto; margin: 22px 0; }
table.cmp {
  width: 100%; border-collapse: collapse; font-size: 14.5px;
  background: var(--surface-raised); border: 1px solid var(--rule-2);
  border-radius: var(--radius); overflow: hidden;
}
table.cmp th, table.cmp td {
  text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--rule);
  vertical-align: top; color: var(--ink-2); line-height: 1.5;
}
table.cmp thead th {
  font-family: var(--font-display); font-weight: 700; font-size: 13.5px;
  color: var(--ink); background: var(--surface-draft); white-space: nowrap;
}
table.cmp tbody tr:last-child td { border-bottom: none; }
table.cmp td:first-child, table.cmp th:first-child { font-weight: 600; color: var(--ink); }

/* Key-point cards */
.points { display: grid; gap: 14px; margin: 22px 0; }
@media (min-width: 620px) { .points.two { grid-template-columns: 1fr 1fr; } }
.point {
  background: var(--surface-raised); border: 1px solid var(--rule-2);
  border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow-card);
}
.point h3 {
  margin: 0 0 7px; font-family: var(--font-display); font-weight: 700;
  font-size: 15.5px; color: var(--ink);
}
.point p { margin: 0; font-size: 14.5px; line-height: 1.6; color: var(--ink-2); }

/* Inline CTA band */
.cta-band {
  background: var(--teal-grad); color: #fff; border-radius: var(--radius-lg);
  padding: 30px 28px; margin: 40px 0; text-align: center;
  box-shadow: 0 20px 44px -26px rgba(14,122,103,0.9);
}
.cta-band h2 {
  margin: 0 0 10px; padding: 0; border: none; color: #fff;
  font-family: var(--font-display); font-weight: 800; font-size: 24px;
  letter-spacing: -0.02em; line-height: 1.2;
}
.cta-band p { margin: 0 auto 20px; color: rgba(255,255,255,0.9); font-size: 15px; max-width: 46ch; }
.cta-band .btn { background: #fff; color: var(--brand-dark); }
.cta-band .btn:hover { transform: translateY(-1px); }
.cta-band .btn svg { width: 18px; height: 18px; fill: currentColor; }
.cta-band .note { margin: 14px 0 0; font-size: 12.5px; color: rgba(255,255,255,0.78); }

/* FAQ */
.faq-block { margin-top: 34px; }
.faq-block .qa { border-top: 1px solid var(--rule); padding: 18px 0; }
.faq-block .qa h3 {
  margin: 0 0 8px; font-family: var(--font-display); font-weight: 700;
  font-size: 16px; color: var(--ink);
}
.faq-block .qa p { margin: 0; font-size: 15px; }

/* Related guides */
.related { margin-top: 48px; padding-top: 32px; border-top: 1px solid var(--rule); }
.related h2 {
  margin: 0 0 16px; padding: 0; border: none;
  font-family: var(--font-display); font-weight: 700; font-size: 20px; color: var(--ink);
}
.related-grid { display: grid; gap: 12px; }
@media (min-width: 620px) { .related-grid { grid-template-columns: 1fr 1fr; } }
.related-card {
  display: block; background: var(--surface-raised); border: 1px solid var(--rule-2);
  border-radius: var(--radius); padding: 15px 17px; transition: border-color .15s ease, transform .15s ease;
}
.related-card:hover { border-color: var(--brand); transform: translateY(-1px); }
.related-card .rc-title {
  font-family: var(--font-display); font-weight: 700; font-size: 15px; color: var(--ink); margin-bottom: 5px;
}
.related-card .rc-desc { font-size: 13.5px; color: var(--ink-3); line-height: 1.5; }
