/*
 * Fastpage blog stylesheet.
 *
 * The tokens and the shared chrome (nav, buttons, footer, CTA) reproduce
 * landing-page/index.php on purpose: the blog is not under /en/ and must not
 * depend on that page's inline CSS. If a token changes on the landing page,
 * change it here too.
 */

:root {
  --black: #080808;
  --white: #f7f7f5;
  --gray: #a4a4a0;
  --line: #d8d8d4;
  --darkline: #30302e;
  --ink: #111110;
  --body: #2a2a28;
  --muted: #67675f;
  --faint: #8a8a84;
  --serif: 'Instrument Serif', Georgia, serif;
  --sans: 'DM Sans', Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body {
  margin: 0;
  background: var(--white);
  color: var(--black);
  font: 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.03;
  letter-spacing: -.035em;
}
p { max-width: 590px; }

.wrap { width: min(1280px, calc(100% - 96px)); margin: auto; }
.dark { background: var(--black); color: var(--white); }
.section { padding: 112px 0; }
.muted { color: var(--muted); }
.dark .muted { color: var(--gray); }

.eyebrow {
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 30px;
}
.eyebrow:before {
  content: '';
  width: 4px;
  height: 4px;
  background: currentColor;
  border-radius: 50%;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  border: 1px solid var(--black);
  background: var(--black);
  color: #fff;
  border-radius: 99px;
  padding: 12px 23px;
  font-size: 14px;
  line-height: 1.4;
  transition: background .2s, color .2s, border-color .2s;
}
.btn:hover { background: #333; }
.dark .btn { background: var(--white); color: var(--black); border-color: var(--white); }
.dark .btn:hover { background: #ddd; }
.btn.secondary { background: transparent; border-color: #555; color: inherit; }
.btn.secondary:hover { background: #252525; }
.dark .btn.secondary { background: transparent; color: var(--white); border-color: #555; }
.dark .btn.secondary:hover { background: #202020; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 30px; }

/* ---------- navigation (same as the landing page) ---------- */
.nav { border-bottom: 1px solid #292927; }
.nav-inner { height: 86px; display: flex; align-items: center; gap: 32px; }
.wordmark {
  font: 32px var(--sans);
  letter-spacing: -1.8px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 9px;
}
.wordmark .brand-symbol {
  width: 44px;
  height: 44px;
  object-fit: contain;
  filter: brightness(0) invert(1);
  margin: -5px -4px -5px -7px;
  flex-shrink: 0;
}
.nav-links { display: flex; gap: 28px; margin: auto; font-size: 13px; color: #c9c9c6; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: #fff; }
.login { font-size: 13px; }
.nav .btn { padding: 10px 20px; }
.menu {
  display: none;
  color: #fff;
  background: transparent;
  border: 1px solid #444;
  border-radius: 20px;
  padding: 6px 14px;
}

/* ---------- index hero ---------- */
.blog-hero { padding: 66px 0 76px; }
.blog-hero h1 { font-size: clamp(48px, 6.2vw, 92px); max-width: 900px; }
.blog-hero h1 span { color: #94948e; }
.blog-hero p.muted { margin-top: 24px; font-size: 16px; max-width: 520px; line-height: 1.55; }
.blog-hero .eyebrow { margin-bottom: 26px; color: #b6b6b0; }

.category-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 34px;
  font-size: 12px;
}
.category-nav a {
  border: 1px solid #3a3a36;
  border-radius: 99px;
  padding: 7px 14px;
  color: #b6b6b0;
  transition: border-color .2s, color .2s, background-color .2s;
}
.category-nav a:hover { border-color: #6f6f68; color: #fff; }
.category-nav a[aria-current="page"] { background: var(--white); border-color: var(--white); color: var(--black); }
.category-nav span { opacity: .55; margin-left: 3px; }

/* ---------- post list ---------- */
.posts-section { padding-top: 26px; padding-bottom: 22px; }
.post-list { border-top: 1px solid var(--line); }
.post-row { border-bottom: 1px solid var(--line); padding: 40px 0 42px; }
.post-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 11px;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--faint);
}
.post-meta time { font-variant-numeric: tabular-nums; }
.post-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: #c6c6c0; }
.post-meta a { color: var(--faint); border-bottom: 1px solid transparent; }
.post-meta a:hover { color: var(--ink); border-color: currentColor; }
.post-row h2 { font-size: clamp(26px, 3vw, 38px); margin-top: 16px; max-width: 780px; }
.post-row h2 a { transition: color .2s; }
.post-row h2 a:hover { color: #4a4a45; }
.post-row p { font-size: 15px; color: var(--muted); margin-top: 14px; max-width: 620px; line-height: 1.6; }
.post-more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  font-size: 12px;
  letter-spacing: .02em;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 3px;
  width: max-content;
}
.post-more:hover { color: #4a4a45; border-color: #4a4a45; }

.empty-state { padding: 40px 0 20px; }
.empty-state h2 { font-size: clamp(30px, 4vw, 46px); }
.empty-state p { margin-top: 18px; }
.empty-state a { border-bottom: 1px solid var(--ink); }

/* ---------- pagination ---------- */
.pagination {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 54px;
  font-size: 13px;
}
.pagination a, .pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 99px;
  color: var(--muted);
  transition: border-color .2s, color .2s, background-color .2s;
}
.pagination a:hover { border-color: var(--ink); color: var(--ink); }
.pagination .page-number[aria-current="page"] { background: var(--black); border-color: var(--black); color: var(--white); }
.pagination .page-gap { border: 0; min-width: 18px; padding: 0; color: var(--faint); }
.pagination .page-step { letter-spacing: .02em; }

/* ---------- article header ---------- */
.crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 12px;
  color: var(--faint);
  padding: 34px 0 0;
}
.crumbs a:hover { color: var(--ink); border-bottom: 1px solid currentColor; }

.article-head > .wrap {
  display: grid;
  grid-template-columns: 200px minmax(0, 720px);
  justify-content: center;
  gap: 0 64px;
}
.article-head > .wrap > * { grid-column: 2; min-width: 0; }
.article-head { padding-bottom: 6px; }
.article-head .eyebrow { margin: 34px 0 22px; color: var(--muted); }
.article-head .eyebrow a:hover { color: var(--ink); }
.article-head h1 { font-size: clamp(38px, 4.8vw, 64px); max-width: 900px; }
.standfirst {
  font-size: clamp(17px, 1.6vw, 21px);
  line-height: 1.5;
  color: #5c5c55;
  margin-top: 22px;
  max-width: 700px;
}
.article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 20px;
  margin-top: 28px;
  padding-bottom: 30px;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  color: var(--faint);
}
.article-meta time { font-variant-numeric: tabular-nums; }
.tag-list { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.article-meta .tag {
  border: 1px solid var(--line);
  border-radius: 99px;
  padding: 3px 10px;
  font-size: 11px;
  color: var(--muted);
}

/* ---------- article body ---------- */
.article-body {
  display: grid;
  grid-template-columns: 200px minmax(0, 720px);
  justify-content: center;
  gap: 64px;
  padding: 52px 0 8px;
}
.toc {
  align-self: start;
  position: sticky;
  top: 28px;
  border-left: 1px solid var(--line);
  padding: 2px 0 2px 18px;
  font-size: 12.5px;
  color: var(--muted);
}
.toc summary {
  cursor: pointer;
  list-style: none;
  font-size: 10px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 12px;
}
.toc summary::-webkit-details-marker { display: none; }
.toc nav { display: flex; flex-direction: column; }
.toc a { display: block; padding: 5px 0; line-height: 1.4; color: #6f6f68; }
.toc a:hover { color: var(--ink); }
.toc a.lvl3 { padding-left: 12px; font-size: 12px; color: var(--faint); }

.prose { font-size: 16.5px; line-height: 1.75; color: var(--body); min-width: 0; }
.prose > * + * { margin-top: 22px; }
.prose p { max-width: none; }
.prose h2 {
  font-size: clamp(26px, 2.8vw, 34px);
  line-height: 1.12;
  color: var(--ink);
  margin-top: 48px;
  scroll-margin-top: 100px;
}
.prose h3 {
  font-family: var(--sans);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -.01em;
  line-height: 1.35;
  color: var(--ink);
  margin-top: 34px;
  scroll-margin-top: 100px;
}
.prose h2 + *, .prose h3 + * { margin-top: 14px; }
.prose ul, .prose ol { padding-left: 22px; }
.prose li + li { margin-top: 9px; }
.prose a { border-bottom: 1px solid #b9b9b2; }
.prose a:hover { border-color: var(--ink); }
.prose strong, .prose b { color: var(--ink); font-weight: 600; }
.prose blockquote {
  border-left: 2px solid var(--black);
  padding-left: 22px;
  font-family: var(--serif);
  font-size: 24px;
  line-height: 1.28;
  letter-spacing: -.02em;
  color: var(--ink);
}
.prose code {
  font-size: .88em;
  background: #ecece6;
  border-radius: 3px;
  padding: 2px 5px;
}
.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  text-align: left;
}
.prose th {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 10.5px;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--faint);
  padding: 10px 12px;
  border-bottom: 1px solid var(--black);
  vertical-align: bottom;
}
.prose td {
  padding: 13px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  line-height: 1.55;
}
.prose figure { margin: 0; }
.prose figcaption { font-size: 12px; color: var(--faint); margin-top: 10px; }

.key-answer {
  border-left: 3px solid var(--black);
  background: #efefe9;
  padding: 22px 24px;
}
.key-answer .label {
  display: block;
  font-size: 10px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 9px;
}
.key-answer p { font-size: 15.5px; line-height: 1.6; color: #2f2f2c; }

/* ---------- FAQ ---------- */
.faq-block { margin-top: 58px; border-top: 1px solid var(--line); padding-top: 8px; }
.faq-block h2 { margin-top: 34px; }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item summary {
  padding: 20px 32px 20px 0;
  cursor: pointer;
  list-style: none;
  position: relative;
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:after {
  content: '+';
  position: absolute;
  right: 0;
  top: 18px;
  color: var(--faint);
  font-weight: 400;
}
.faq-item[open] summary:after { content: '\2212'; }
.faq-answer { padding-bottom: 22px; font-size: 15px; color: var(--muted); line-height: 1.65; max-width: 660px; }

/* ---------- related ---------- */
.related {
  max-width: 984px;
  margin: 70px auto 0;
  border-top: 1px solid var(--line);
  padding-top: 30px;
}
.related h2 { font-size: clamp(24px, 2.4vw, 32px); }
.related-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 34px;
  margin-top: 28px;
}
.related-card h3 { font-size: 22px; line-height: 1.12; margin-top: 12px; }
.related-card h3 a:hover { color: #4a4a45; }
.related-card p:not(.post-meta) { font-size: 13px; color: var(--muted); margin-top: 10px; line-height: 1.55; }

/* ---------- 404 ---------- */
.not-found { padding: 70px 0 40px; }
.not-found h1 { font-size: clamp(48px, 6vw, 84px); }
.not-found h1 span { color: #9c9c96; }
.not-found > .wrap > p.muted { margin-top: 24px; font-size: 16px; max-width: 520px; }

/* ---------- final CTA and footer ---------- */
.final-wrap { padding: 64px 0 0; background: var(--white); }
.final { padding: 55px; background: #1c1c1a; color: var(--white); }
.final h2 { font-size: clamp(34px, 4vw, 50px); max-width: 650px; }
.final p { margin: 22px 0; color: #aaa; font-size: 14px; }
.final .btn { background: var(--white); color: var(--ink); border-color: var(--white); }
.final .btn:hover { background: #ddd; }

footer { padding: 0 0 30px; }
.foot {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
  padding: 64px 0 50px;
}
.foot p { font-size: 12px; max-width: 210px; color: #888; margin-top: 16px; }
.foot h4 { font-size: 11px; color: #777; font-weight: 400; margin: 0 0 15px; }
.foot a:not(.wordmark) { display: block; font-size: 12px; color: #b9b9b3; padding: 4px 0; }
.foot a:not(.wordmark):hover { color: #fff; }
.copy {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid #292927;
  padding-top: 22px;
  font-size: 10px;
  color: #777;
}
.copy a { color: #b9b9b3; }
.copy a:hover { color: #fff; }
.footer-word {
  font: clamp(90px, 20vw, 270px)/1 var(--sans);
  font-weight: 500;
  letter-spacing: -.07em;
  color: #242422;
  margin: 35px 0 -5px;
  overflow: hidden;
}

a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 2px solid #a68952;
  outline-offset: 6px;
}

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .article-body { grid-template-columns: minmax(0, 760px); gap: 34px; padding-top: 36px; }
  .article-body > * { grid-column: 1; }
  .article-head > .wrap { grid-template-columns: minmax(0, 760px); gap: 0; }
  .article-head > .wrap > * { grid-column: 1; }
  .toc {
    position: static;
    border: 1px solid var(--line);
    border-left: 2px solid var(--black);
    border-radius: 0;
    padding: 16px 18px;
    background: #f1f1eb;
  }
  .toc summary { margin-bottom: 8px; }
}

@media (max-width: 1000px) {
  .wrap { width: calc(100% - 56px); }
  .nav-inner { gap: 20px; }
  .nav-links { gap: 18px; }
  .post-row { padding: 34px 0 36px; }
  .related-grid { gap: 24px; }
  .final { padding: 42px; }
  .foot { gap: 24px; }
}

@media (max-width: 700px) {
  .wrap { width: calc(100% - 40px); }
  .section { padding: 75px 0; }
  .nav-inner { height: 74px; gap: 15px; flex-wrap: wrap; position: relative; }
  .wordmark { font-size: 27px; }
  .wordmark .brand-symbol { width: 38px; height: 38px; }
  .login { margin-left: auto; }
  .nav .btn { display: none; }
  .menu { display: block; }
  .nav-links {
    display: none;
    position: absolute;
    top: 74px;
    left: -20px;
    right: -20px;
    background: #111;
    padding: 22px;
    z-index: 5;
    border-bottom: 1px solid #444;
    flex-direction: column;
    gap: 20px;
    margin: 0;
  }
  .nav-links.open { display: flex; }

  .blog-hero { padding: 44px 0 50px; }
  .blog-hero p.muted { font-size: 15px; margin-top: 18px; }
  .category-nav { margin-top: 26px; }
  .posts-section { padding-top: 14px; }
  .post-row { padding: 28px 0 30px; }
  .post-row p { font-size: 14px; }
  .post-more { margin-top: 16px; }
  .pagination { gap: 5px; margin-top: 40px; }
  .pagination a, .pagination span { min-width: 34px; height: 34px; padding: 0 10px; font-size: 12px; }

  .crumbs { padding-top: 24px; font-size: 11px; }
  .article-head .eyebrow { margin: 24px 0 16px; }
  .article-head h1 { font-size: clamp(34px, 9vw, 44px); }
  .standfirst { font-size: 16px; margin-top: 18px; }
  .article-meta { margin-top: 22px; padding-bottom: 24px; gap: 8px 16px; }
  .article-body { padding-top: 26px; }
  .prose { font-size: 16px; }
  .prose h2 { margin-top: 38px; }
  .prose table { font-size: 12.5px; }
  .prose th, .prose td { padding: 9px 7px; }
  .key-answer { padding: 18px 18px; }
  .related-grid { grid-template-columns: 1fr; gap: 26px; }
  .related { margin-top: 48px; }

  .final-wrap { padding-top: 54px; }
  .final { padding: 30px 24px; }
  .final h2 { font-size: 33px; }
  .foot { grid-template-columns: 1fr 1fr; gap: 32px; padding: 46px 0 36px; }
  .copy { font-size: 9px; }
  .footer-word { margin-top: 25px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
