/* Mai blog — shared stylesheet. Brand tokens verbatim from the marketing site.
   At launch this file lives at /blog/blog.css; both EN (/blog/…) and SV (/sv/blogg/…)
   pages reference it by the absolute path /blog/blog.css. See content/blog/VISUAL.md. */

:root {
  --white: #FFFFFF;
  --ink: #111111;
  --soft: #5A5A58;
  --mute: #9A9A96;
  --line: #E4E2DC;
  --faint: #F1EFEA;
  --bg2: #FAFAF7;
  --signal: #E2541B;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-font-smoothing: antialiased; scroll-behavior: smooth; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--white);
  color: var(--ink);
  font-size: 17px;
  line-height: 1.6;
}

a { color: inherit; }
:focus-visible { outline: 2px solid var(--signal); outline-offset: 3px; }

/* Type roles */
.voice { font-family: 'Fraunces', Georgia, serif; font-style: italic; font-weight: 400; }
.mono  { font-family: 'IBM Plex Mono', monospace; }
.eyebrow {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--signal);
}

/* Masthead */
.nav { border-bottom: 1px solid var(--line); }
.nav-inner {
  max-width: 880px; margin: 0 auto; padding: 0 32px; height: 72px;
  display: flex; align-items: center; justify-content: space-between;
}
.wordmark {
  font-size: 21px; font-weight: 600; letter-spacing: -0.02em;
  color: var(--ink); text-decoration: none;
}
.wordmark .i { position: relative; display: inline-block; }
.wordmark .dot {
  position: absolute; top: 1px; left: 50%; transform: translateX(-50%);
  width: 5px; height: 5px; border-radius: 50%; background: var(--signal);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.32; } }
.nav-right {
  display: flex; align-items: center; gap: 20px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--mute);
}
.nav-right a { text-decoration: none; color: var(--mute); }
.nav-right a.active { color: var(--ink); }
.nav-right a.cta { color: var(--ink); border-bottom: 1px solid var(--ink); padding-bottom: 3px; }
.nav-right a.cta:hover { color: var(--signal); border-color: var(--signal); }

/* Layout */
.wrap { max-width: 640px; margin: 0 auto; padding: 42px 32px 56px; }

/* Post header */
.post-eyebrow { margin-bottom: 18px; }
.post-title {
  font-family: 'Fraunces', Georgia, serif; font-weight: 400;
  font-size: 38px; line-height: 1.18; letter-spacing: -0.01em; margin-bottom: 16px;
}
.post-deck { font-size: 18px; line-height: 1.5; color: var(--soft); margin-bottom: 22px; }
.dateline {
  display: flex; gap: 16px; font-family: 'IBM Plex Mono', monospace;
  font-size: 12px; color: var(--mute);
  padding-bottom: 26px; margin-bottom: 30px; border-bottom: 1px solid var(--line);
}

/* Body */
.post-body > p { font-size: 17px; line-height: 1.65; margin-bottom: 24px; }
.post-body h2 {
  font-family: 'Fraunces', Georgia, serif; font-weight: 500;
  font-size: 25px; line-height: 1.25; margin: 38px 0 14px;
}
.lead.voice { font-size: 23px; line-height: 1.45; margin-bottom: 30px; }
.period { color: var(--signal); }      /* static voice period — never animated */
.post-body ul { margin: 0 0 24px 1.1em; }
.post-body li { font-size: 17px; line-height: 1.6; margin-bottom: 8px; }
.cite { font-size: 13px; line-height: 1.5; color: var(--mute); margin: -14px 0 24px; }

/* Fact strip — the key-facts / AEO block. Hairlines, not a card. */
.facts { border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); margin: 6px 0 30px; }
.facts-label {
  font-family: 'IBM Plex Mono', monospace; font-size: 11px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--mute); padding: 12px 0 10px;
}
.fact {
  display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
  padding: 11px 0; border-top: 1px solid var(--faint);
}
.fact .label { font-size: 15px; color: var(--soft); }
.fact .num { font-family: 'IBM Plex Mono', monospace; font-size: 16px; white-space: nowrap; }

/* FAQ + sources */
.faq h3 { font-family: 'Fraunces', Georgia, serif; font-weight: 500; font-size: 18px; margin: 22px 0 6px; }
.faq p { font-size: 16px; line-height: 1.6; color: var(--soft); }
.sources { font-size: 14px; line-height: 1.7; color: var(--soft); }
.sources a { color: var(--soft); }
.related { font-family: 'IBM Plex Mono', monospace; font-size: 12px; color: var(--mute); line-height: 1.9; }

/* Index list */
.index-head { margin-bottom: 8px; }
.index-title { font-family: 'Fraunces', Georgia, serif; font-weight: 400; font-size: 36px; line-height: 1.18; letter-spacing: -0.01em; margin: 14px 0; }
.index-deck { font-size: 17px; line-height: 1.55; color: var(--soft); margin-bottom: 14px; }
.entry { padding: 28px 0; border-bottom: 1px solid var(--line); display: block; text-decoration: none; color: inherit; }
.entry:first-of-type { border-top: 1px solid var(--ink); }
.entry h3 { font-family: 'Fraunces', Georgia, serif; font-weight: 400; font-size: 24px; line-height: 1.22; margin: 12px 0 8px; }
.entry .dek { font-size: 16px; line-height: 1.55; color: var(--soft); }
.entry .meta { font-family: 'IBM Plex Mono', monospace; font-size: 12px; color: var(--mute); margin-top: 12px; display: flex; gap: 14px; }
.entry:hover h3 { color: var(--signal); }

/* Subscribe strip (cookieless) */
.subscribe {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  margin-top: 34px; padding-top: 26px; border-top: 1px solid var(--ink);
}
.subscribe .label { font-family: 'Fraunces', Georgia, serif; font-size: 18px; margin-bottom: 4px; }
.subscribe .fine { font-family: 'IBM Plex Mono', monospace; font-size: 11px; color: var(--mute); }
.subscribe form { display: flex; flex-wrap: wrap; }
.subscribe form .cf-turnstile { flex-basis: 100%; margin-top: 10px; }
.subscribe input { border: 1px solid var(--line); border-right: none; padding: 10px 14px; font: inherit; font-size: 13px; }
.subscribe button { background: var(--ink); color: #fff; border: none; padding: 11px 18px; font: inherit; font-size: 13px; font-weight: 500; cursor: pointer; }
.subscribe button:hover { background: var(--signal); }

footer.blog { border-top: 1px solid var(--line); margin-top: 8px; }
footer.blog .wrap { padding-top: 28px; padding-bottom: 40px; color: var(--mute); font-size: 13px; }

/* Byline link in the dateline */
.dateline .byline a { color: var(--mute); text-decoration: none; border-bottom: 1px solid var(--line); padding-bottom: 1px; }
.dateline .byline a:hover { color: var(--signal); border-color: var(--signal); }
.index-identity { font-family: 'IBM Plex Mono', monospace; font-size: 11px; letter-spacing: 0.04em; color: var(--mute); margin-top: 10px; }

/* End-of-post CTAs to public freebies — soft, hairline list (no filled buttons) */
.endcta { border-top: 1px solid var(--ink); margin-top: 44px; }
.endcta .k { font-family: 'IBM Plex Mono', monospace; font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--mute); padding: 12px 0 4px; }
.endcta a { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 14px 0; border-top: 1px solid var(--faint); text-decoration: none; color: var(--ink); }
.endcta a .t { display: flex; flex-direction: column; gap: 3px; }
.endcta a strong { font-weight: 500; }
.endcta a .desc { font-size: 14px; color: var(--soft); }
.endcta a .arr { color: var(--mute); }
.endcta a:hover strong, .endcta a:hover .arr { color: var(--signal); }

/* "How Mai writes" — the transparency / authorship note */
.mai-note { border-top: 1px solid var(--line); margin-top: 40px; padding-top: 22px; }
.mai-note h2 { font-family: 'Fraunces', Georgia, serif; font-weight: 500; font-size: 18px; margin-bottom: 8px; }
.mai-note p { font-size: 14px; line-height: 1.65; color: var(--soft); }

@media (max-width: 640px) {
  .wrap { padding: 30px 22px 44px; }
  .post-title { font-size: 30px; }
  .index-title { font-size: 28px; }
  .lead.voice { font-size: 20px; }
  .subscribe { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  .wordmark .dot { animation: none; }
  html { scroll-behavior: auto; }
}
