/* ============================================================
   verified.fyi — blog layer (on top of shared.css)
   "Clarity v2" long-form article design: centered hero, sticky
   TOC with scroll-spy, reading progress, editorial typography.
   Tokens come from shared.css; --read is the body-text colour.
   ============================================================ */

:root { --read: color-mix(in srgb, var(--ink) 62%, var(--ink-2)) }

/* reading progress bar */
.progress { position: fixed; top: 0; left: 0; height: 3px; width: 0; background: linear-gradient(90deg, var(--brand), var(--coral)); z-index: 60 }

/* ---- article hero ------------------------------------------ */
.ahero { padding: 54px 0 10px; text-align: center }
.ahero-in { max-width: 760px; margin: 0 auto }
.ahero .crumb { justify-content: center; padding: 0; margin-bottom: 22px }
.ahero .tag { display: inline-block; font-size: 13px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; color: var(--brand); background: #EAF1FD; padding: 7px 15px; border-radius: 999px; margin-bottom: 18px }
.ahero h1 { font-size: 46px; letter-spacing: -.03em; margin-bottom: 18px; text-wrap: balance }
.ahero .dek { font-size: 19px; color: var(--ink-2); font-weight: 500; line-height: 1.6; max-width: 620px; margin: 0 auto 26px; text-wrap: pretty }
.ameta { display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap }
.ameta .av { width: 42px; height: 42px; border-radius: 50%; background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 16px }
.ameta .who { text-align: left }
.ameta .who .nm { font-size: 14.5px; font-weight: 700 }
.ameta .who .dt { font-size: 13px; color: var(--ink-3); font-weight: 600 }
.ameta .rt { font-family: var(--mono); font-size: 12px; font-weight: 700; color: var(--ink-3); background: var(--card); border: 1px solid var(--line); padding: 6px 13px; border-radius: 999px }

/* ---- layout: toc + article ---------------------------------- */
.layout { display: grid; grid-template-columns: 210px minmax(0, 720px); gap: 56px; justify-content: center; margin-top: 44px }
.layout.no-toc { grid-template-columns: minmax(0, 720px) }
.toc { position: sticky; top: 104px; align-self: start }
.toc .tl { font-size: 11.5px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 14px }
.toc a { display: block; font-size: 13.5px; font-weight: 600; color: var(--ink-3); padding: 7px 0 7px 14px; border-left: 2px solid var(--line); line-height: 1.4; transition: .15s }
.toc a:hover { color: var(--ink) }
.toc a.on { color: var(--brand); border-left-color: var(--brand); font-weight: 700 }
.toc-mob { display: none }

/* ---- article body -------------------------------------------- */
.article-col, .article { min-width: 0 }
.article > p { font-size: 17.5px; line-height: 1.8; color: var(--read); font-weight: 500; margin-bottom: 22px; text-wrap: pretty }
.article > p:first-of-type, .article .lede { font-size: 19.5px; line-height: 1.75; color: var(--ink); font-weight: 500 }
.article h2 { font-size: 29px; margin: 52px 0 18px; scroll-margin-top: 104px }
.article > h2:first-child { margin-top: 0 }
.article h3 { font-size: 20px; margin: 36px 0 12px; scroll-margin-top: 104px }
.article h3 .n { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 10px; background: var(--coral); color: #fff; font-size: 15px; margin-right: 11px; vertical-align: -5px }
.article a { color: var(--brand); font-weight: 700; text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--brand) 35%, transparent); text-underline-offset: 3px }
.article a:hover { text-decoration-color: var(--brand) }
.article b, .article strong { color: var(--ink) }
.article ul { margin: 0 0 22px 4px; list-style: none; display: flex; flex-direction: column; gap: 11px }
.article ul li { position: relative; padding-left: 30px; font-size: 17px; line-height: 1.7; color: var(--read); font-weight: 500 }
.article ul li::before { content: ""; position: absolute; left: 2px; top: 9px; width: 14px; height: 14px; border-radius: 50%; background: color-mix(in srgb, var(--brand) 16%, transparent) }
.article ul li::after { content: ""; position: absolute; left: 6px; top: 13px; width: 6px; height: 6px; border-radius: 50%; background: var(--brand) }
.article ol { margin: 0 0 22px; padding-left: 26px; display: flex; flex-direction: column; gap: 11px }
.article ol li { font-size: 17px; line-height: 1.7; color: var(--read); font-weight: 500 }
.article img { max-width: 100%; height: auto; border-radius: 14px; margin: 30px 0 }
.article code { background: var(--cream-2); padding: 2px 6px; border-radius: 5px; font-size: .9em; font-family: var(--mono) }
.article pre { background: var(--cream-2); border: 1px solid var(--line); border-radius: 14px; padding: 16px 20px; overflow-x: auto; margin: 0 0 22px }
.article pre code { background: none; padding: 0 }

/* pull quote (markdown blockquotes get the same treatment) */
.article blockquote, .pull { margin: 38px 0; padding: 6px 0 6px 28px; border-left: 4px solid var(--coral) }
.article blockquote p, .pull p { font-family: var(--display); font-size: 23px; font-weight: 700; letter-spacing: -.015em; line-height: 1.45; color: var(--ink); margin: 0 }
.article blockquote cite, .pull cite { display: block; margin-top: 12px; font-style: normal; font-size: 13.5px; font-weight: 700; color: var(--ink-3) }

/* comparison-style tables */
.article table { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--card); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; box-shadow: var(--shadow-soft); margin: 30px 0 }
.article th { font-size: 13px; font-weight: 800; letter-spacing: .03em; text-transform: uppercase; text-align: left; padding: 14px 20px; background: var(--cream-2); color: var(--ink-2) }
.article td { font-size: 15px; font-weight: 500; color: var(--read); padding: 14px 20px; border-top: 1px solid var(--line-2); vertical-align: top; line-height: 1.55 }
.article td:first-child { font-weight: 700; color: var(--ink) }
.article table .y { color: var(--trusted); font-weight: 700 }
.article table .n { color: var(--danger); font-weight: 700 }

/* tip callout (raw HTML block available to authors) */
.callout { display: flex; gap: 16px; background: var(--coral-soft); border: 1px solid var(--coral-line); border-radius: 18px; padding: 20px 22px; margin: 30px 0 }
.callout .ci { width: 40px; height: 40px; border-radius: 12px; background: var(--coral); display: flex; align-items: center; justify-content: center; flex-shrink: 0 }
.callout .ci svg { width: 20px; height: 20px; color: #fff }
.callout h4 { font-size: 15px; margin-bottom: 5px }
.callout p { font-size: 15px; color: var(--read); font-weight: 500; line-height: 1.65; margin: 0 }

/* checklist card (raw HTML block available to authors) */
.checks { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 26px 28px; margin: 30px 0; box-shadow: var(--shadow-soft) }
.checks h4 { font-size: 16px; margin-bottom: 16px; display: flex; align-items: center; gap: 9px }
.checks h4 svg { width: 19px; height: 19px; color: var(--trusted) }
.checks ul { margin: 0; gap: 12px }
.checks li { padding-left: 30px; font-size: 15.5px }
.checks li::before, .checks li::after { display: none }
.checks li .km { position: absolute; left: 0; top: 3px; width: 20px; height: 20px; border-radius: 7px; display: inline-flex; align-items: center; justify-content: center }
.checks li.good .km { background: color-mix(in srgb, var(--trusted) 14%, transparent); color: var(--trusted) }
.checks li.bad .km { background: color-mix(in srgb, var(--danger) 12%, transparent); color: var(--danger) }
.checks li .km svg { width: 12px; height: 12px }

/* figure placeholder (raw HTML block available to authors) */
.fig { margin: 34px 0 }
.fig .ph { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; background: var(--cream-2); border: 2px dashed var(--line); border-radius: 20px; min-height: 240px; color: var(--ink-3) }
.fig .ph svg { width: 34px; height: 34px }
.fig .ph span { font-size: 13.5px; font-weight: 700 }
.fig figcaption { font-size: 13.5px; color: var(--ink-3); font-weight: 600; text-align: center; margin-top: 12px }

/* ---- in-article scan CTA -------------------------------------- */
.tryit { background: var(--card); border: 1px solid var(--line); border-radius: 24px; padding: 30px 32px; margin: 40px 0 0; box-shadow: var(--shadow-soft); text-align: center }
.tryit h4 { font-size: 20px; margin-bottom: 8px }
.tryit p { font-size: 15px; color: var(--ink-2); font-weight: 500; margin-bottom: 18px }
.tryit .scanbox { max-width: 440px; margin: 0 auto; padding: 7px 7px 7px 22px; box-shadow: none }
.tryit .scanbox input { font-size: 15.5px }
.tryit .scanbox .btn { padding: 10px 20px; font-size: 14px }

/* ---- FAQ -------------------------------------------------------- */
.blog-faq { margin: 48px 0 0 }
.blog-faq h2 { font-size: 26px; margin-bottom: 18px }
.faq-item { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 16px 20px; margin-bottom: 10px }
.faq-item summary { font-weight: 700; cursor: pointer; list-style: none; color: var(--ink) }
.faq-item summary::-webkit-details-marker { display: none }
.faq-item summary::after { content: "+"; float: right; color: var(--brand); font-weight: 700; margin-left: 12px }
.faq-item[open] summary::after { content: "−" }
.faq-item p { margin: 12px 0 0; color: var(--read); font-weight: 500; line-height: 1.65 }

/* ---- author box ------------------------------------------------- */
.authbox { display: flex; gap: 18px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 24px 26px; margin: 56px 0 0; box-shadow: var(--shadow-soft) }
.authbox .av { width: 56px; height: 56px; border-radius: 50%; background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 21px; flex-shrink: 0 }
.authbox .nm { font-size: 16px; font-weight: 800 }
.authbox p { font-size: 14px; color: var(--ink-2); font-weight: 500; line-height: 1.6; margin-top: 3px }

/* ---- more from the blog ----------------------------------------- */
.morehead { display: flex; align-items: baseline; justify-content: space-between; margin: 64px 0 22px }
.morehead h2 { font-size: 28px }
.morehead a { font-size: 14.5px; font-weight: 700; color: var(--brand); white-space: nowrap }
.more { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px }
.mcard { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 24px; display: flex; flex-direction: column; transition: .16s }
.mcard:hover { transform: translateY(-3px); box-shadow: var(--shadow-soft) }
.mcard .mtag { font-size: 11.5px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; margin-bottom: 12px }
.mcard h3, .mcard h2 { font-size: 17.5px; line-height: 1.35; margin-bottom: 10px; flex: 1; text-wrap: pretty }
.mcard p { font-size: 14px; color: var(--ink-2); font-weight: 500; line-height: 1.55; margin-bottom: 14px }
.mcard .mmeta { font-size: 13px; color: var(--ink-3); font-weight: 600 }
.mtag-0 { color: var(--brand) }
.mtag-1 { color: var(--coral) }
.mtag-2 { color: var(--trusted) }

/* ---- end CTA ------------------------------------------------------ */
.endcta { text-align: center; background: linear-gradient(160deg, var(--card), var(--cream-2)); border: 1px solid var(--line); border-radius: 32px; padding: 52px 40px; box-shadow: var(--shadow-soft); margin-top: 64px }
.endcta h2 { font-size: 32px; margin-bottom: 12px }
.endcta p { font-size: 16.5px; color: var(--ink-2); font-weight: 500; margin-bottom: 24px }

/* ---- index / category listing ------------------------------------ */
.blog-cat-bar { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; padding-top: 24px }
.chip-tag { display: inline-flex; align-items: center; padding: 7px 15px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink-2); font-size: 13.5px; font-weight: 700; background: var(--card); transition: .15s }
.chip-tag:hover { border-color: var(--brand); color: var(--brand) }
.chip-tag.active { background: var(--ink); border-color: var(--ink); color: var(--cream) }
.blog-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; padding: 28px 36px 0 }
.blog-empty { padding: 48px 36px; text-align: center; color: var(--ink-2); font-size: 16px }
.blog-empty a { color: var(--brand); font-weight: 700 }

/* ---- responsive ---------------------------------------------------- */
@media (max-width: 1100px) {
  .layout { grid-template-columns: minmax(0, 720px); margin-top: 0 }
  .toc { display: none }
  .toc-mob { display: block; margin-top: 36px; background: var(--card); border: 1px solid var(--line); border-radius: 18px; overflow: hidden }
  .toc-mob summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; padding: 16px 20px; font-size: 14px; font-weight: 800 }
  .toc-mob summary::-webkit-details-marker { display: none }
  .toc-mob summary svg { width: 17px; height: 17px; color: var(--brand); transition: .2s }
  .toc-mob[open] summary svg { transform: rotate(90deg) }
  .toc-mob a { display: block; font-size: 14.5px; font-weight: 600; color: var(--ink-2); padding: 11px 20px; border-top: 1px solid var(--line-2) }
}
@media (max-width: 760px) {
  .more { grid-template-columns: 1fr }
}
@media (max-width: 640px) {
  .ahero { padding: 38px 0 6px }
  .ahero h1 { font-size: 30px }
  .ahero .dek { font-size: 16.5px }
  .article > p { font-size: 16.5px }
  .article > p:first-of-type, .article .lede { font-size: 18px }
  .article h2 { font-size: 24px; margin: 42px 0 14px }
  .article h3 { font-size: 18px }
  .article blockquote p, .pull p { font-size: 19.5px }
  .tryit { padding: 24px 18px }
  .tryit .scanbox { flex-direction: column; border-radius: 22px; padding: 10px }
  .tryit .scanbox input { width: 100%; text-align: center; padding: 6px 0 }
  .tryit .scanbox .btn { width: 100% }
  .authbox { flex-direction: column; text-align: center }
  .endcta { padding: 36px 22px; border-radius: 24px; margin-top: 42px }
  .endcta h2 { font-size: 25px }
  .blog-list { padding: 24px 20px 0 }
}

/* ---- dark mode (follows the system setting, same as shared.css) ---- */
@media (prefers-color-scheme: dark) {
  .ahero .tag { background: rgba(86,148,246,.16) }
}
