/* Soma shared stylesheet - used by the generated /blog pages only (website/blog/*).
   The older pages (index, docs, roi-calculator, ...) keep their own inline styles.
   The nav, dropdown and burger rules below are lifted from website/docs.html so the
   blog nav looks identical; if the nav changes there, change it here too.
   No external fonts: the stack falls back to the system UI font. */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --ink: #1E1B4B; --ink-soft: #4A4869; --indigo: #312E81; --indigo-bright: #4F46E5;
  --frame: #272463; --teal: #00897B; --mist: #F5F7FA; --paper: #FFFFFF;
  --tint: #EEF2FF; --line: #E4E8F0;
}
body { font-family: 'Inter', 'SF Pro Text', -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif; -webkit-font-smoothing: antialiased; background: var(--paper); color: var(--ink); }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 28px; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--indigo-bright); outline-offset: 3px; border-radius: 4px; }

/* ---------- nav (lifted from docs.html) ---------- */
.s-nav { background: rgba(39,36,99,.97); border-bottom: 1px solid rgba(255,255,255,.1); }
.s-nav .wrap { display: flex; align-items: center; height: 66px; gap: 34px; }
.s-logo { font-weight: 800; font-size: 21px; letter-spacing: -.02em; color: #fff; display: flex; align-items: center; gap: 8px; text-decoration: none; }
.s-logo svg { width: 17px; height: 17px; fill: #fff; }
.s-nav-links { display: flex; gap: 26px; margin-left: 10px; }
.s-nav-links a { text-decoration: none; font-size: 14.5px; font-weight: 500; color: rgba(255,255,255,.72); transition: color .15s; }
.s-nav-links a:hover { color: #fff; }
.s-nav .cta { margin-left: auto; }
.s-nav .s-btn { display: inline-block; background: #fff; color: var(--indigo); text-decoration: none; font-weight: 600; font-size: 14.5px; padding: 11px 22px; border-radius: 8px; }
.s-navdrop { position: relative; }
.s-navdrop-btn { background: none; border: none; color: rgba(255,255,255,.72); font-size: 14.5px; font-weight: 500; padding: 0; display: inline-flex; align-items: center; gap: 5px; transition: color .15s; cursor: pointer; font-family: inherit; }
.s-navdrop-btn:hover, .s-navdrop.open .s-navdrop-btn, .s-navdrop:hover .s-navdrop-btn { color: #fff; }
.s-navdrop-btn .chev { font-size: 10px; transition: transform .2s; }
.s-navdrop.open .s-navdrop-btn .chev, .s-navdrop:hover .s-navdrop-btn .chev { transform: rotate(180deg); }
.s-navdrop-menu { position: absolute; top: calc(100% + 14px); left: 0; transform: translateY(-6px); background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 18px 44px -14px rgba(30,27,75,.28); padding: 8px; min-width: 230px; opacity: 0; pointer-events: none; transition: opacity .18s ease, transform .18s ease; z-index: 60; }
.s-navdrop-menu::before { content: ""; position: absolute; top: -14px; left: 0; right: 0; height: 14px; }
.s-navdrop.open .s-navdrop-menu, .s-navdrop:hover .s-navdrop-menu { opacity: 1; pointer-events: auto; transform: translateY(0); }
.s-navdrop-menu a { display: block; padding: 9px 14px; border-radius: 8px; font-size: 14px; font-weight: 500; color: var(--ink-soft); text-decoration: none; }
.s-navdrop-menu a:hover { background: var(--tint); color: var(--indigo); }
@media (max-width: 640px) { .s-nav-links { display: none; } }

/* ---------- mobile hamburger menu (lifted from docs.html; no visual change above 640px) ---------- */
.s-nav { position: relative; }
.s-nav-burger { display: none; background: none; border: 0; padding: 8px; margin-left: 12px; cursor: pointer; color: #fff; }
.s-nav-burger svg { display: block; }
@media (max-width: 640px) {
  .s-nav-burger { display: inline-flex; }
  .s-nav-burger .i-close { display: none; }
  .s-nav.menu-open .s-nav-burger .i-open { display: none; }
  .s-nav.menu-open .s-nav-burger .i-close { display: block; }
  .s-nav.menu-open .s-nav-links {
    display: flex; flex-direction: column; gap: 0;
    position: absolute; top: 66px; left: 0; right: 0;
    background: rgb(39,36,99); border-bottom: 1px solid rgba(255,255,255,.1);
    box-shadow: 0 18px 34px -12px rgba(0,0,0,.45);
    padding: 6px 22px 18px; margin-left: 0; z-index: 60;
  }
  .s-nav.menu-open .s-nav-links > a { padding: 14px 0; font-size: 17px; font-weight: 500; border-bottom: 1px solid rgba(255,255,255,.08); }
  .s-nav.menu-open .s-navdrop { padding-top: 14px; }
  .s-nav.menu-open .s-navdrop-btn { pointer-events: none; font-size: 11.5px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: rgba(255,255,255,.45); padding: 0 0 4px; }
  .s-nav.menu-open .s-navdrop-btn .chev { display: none; }
  .s-nav.menu-open .s-navdrop-menu { position: static; opacity: 1; pointer-events: auto; transform: none; box-shadow: none; border: 0; background: transparent; padding: 0; min-width: 0; }
  .s-nav.menu-open .s-nav-links .s-navdrop-menu a { color: rgba(255,255,255,.85); font-size: 17px; font-weight: 500; padding: 14px 0; border-bottom: 1px solid rgba(255,255,255,.08); }
  .s-nav.menu-open .s-nav-links .s-navdrop-menu a:last-child { border-bottom: 0; }
  .s-nav.menu-open .s-nav-links .s-navdrop-menu a:hover { background: transparent; color: #fff; }
}

/* ---------- article column (mobile first) ---------- */
.post-main { padding: 24px 0 48px; }
.post-wrap { width: 100%; max-width: calc(68ch + 40px); margin: 0 auto; padding: 0 20px; font-size: 17px; line-height: 1.7; }
.post-wrap p, .post-wrap li { overflow-wrap: break-word; }

.crumbs { font-size: 14px; line-height: 1.4; color: var(--ink-soft); margin-bottom: 18px; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--indigo-bright); text-decoration: underline; }
.crumbs span[aria-hidden] { margin: 0 4px; }

.post-head { margin-bottom: 20px; }
.post-wrap h1 { font-size: clamp(26px, 6vw, 38px); font-weight: 800; letter-spacing: -.028em; line-height: 1.15; color: var(--ink); margin-bottom: 12px; }
.byline { font-size: 14px; line-height: 1.5; color: var(--ink-soft); }
/* Under the byline: verified badge, optional reviewer line, PDF download. The badge uses a
   darker teal than --teal so the small text keeps enough contrast on white. */
.reviewer { font-size: 14px; line-height: 1.5; margin-top: 6px; }
.reviewer { color: var(--ink-soft); }
.pdf-link { color: var(--indigo-bright); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.pdf-link:hover { color: var(--indigo); }
.download { margin: 0 0 22px; }
.download-btn { display: inline-block; background: var(--indigo-bright); color: #fff; font-weight: 700; font-size: 16px; line-height: 1.3; padding: 13px 22px; border-radius: 10px; text-decoration: none; }
.download-btn:hover { background: var(--indigo); }
.post-body h2, .sources { scroll-margin-top: 16px; }

.answer { font-size: 18.5px; line-height: 1.6; font-weight: 500; color: var(--ink); border-left: 4px solid var(--teal); padding: 2px 0 2px 16px; margin: 0 0 22px; }

.box-title { font-size: 12.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; color: var(--indigo); line-height: 1.4; margin-bottom: 8px; }
.pe-scurt { background: var(--tint); border: 1px solid #D9DEFA; border-radius: 12px; padding: 16px 18px 8px; margin: 0 0 30px; }
.pe-scurt ul { list-style: none; }
.pe-scurt li { position: relative; padding-left: 20px; margin-bottom: 10px; font-size: 16px; line-height: 1.55; }
.pe-scurt li::before { content: ""; position: absolute; left: 2px; top: .62em; width: 7px; height: 7px; border-radius: 50%; background: var(--teal); }

.post-body h2 { font-size: clamp(21px, 4.4vw, 26px); font-weight: 800; letter-spacing: -.02em; line-height: 1.25; color: var(--ink); margin: 38px 0 12px; }
.post-body h3 { font-size: 18.5px; font-weight: 700; line-height: 1.3; color: var(--ink); margin: 26px 0 8px; }
.post-body p { margin: 0 0 16px; }
.post-body ul, .post-body ol { margin: 0 0 18px; padding-left: 1.4em; }
.post-body li { margin-bottom: 6px; }
.post-body li > ul, .post-body li > ol { margin: 6px 0 0; }
.post-body a, .sources a { color: var(--indigo-bright); text-decoration: underline; text-underline-offset: 2px; }
.post-body a:hover, .sources a:hover { color: var(--indigo); }
.post-body strong { font-weight: 700; }
.post-body blockquote { border-left: 4px solid var(--line); padding: 2px 0 2px 16px; margin: 0 0 18px; color: var(--ink-soft); }
.post-body code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .92em; background: var(--mist); border: 1px solid var(--line); border-radius: 4px; padding: 1px 5px; }
.post-body hr { border: 0; border-top: 1px solid var(--line); margin: 30px 0; }
.post-body table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; margin: 0 0 18px; font-size: 15.5px; line-height: 1.5; }
.post-body th, .post-body td { text-align: left; vertical-align: top; padding: 9px 12px; border: 1px solid var(--line); }
.post-body th { background: var(--mist); font-weight: 700; }

.note-box { background: var(--mist); border: 1px solid var(--line); border-left: 4px solid var(--indigo); border-radius: 12px; padding: 16px 18px; margin: 36px 0; }
.note-box p:last-child { font-size: 16px; line-height: 1.6; color: var(--ink); }

.faq, .sources, .related { margin-top: 38px; }
.faq h2, .sources h2, .related h2 { font-size: clamp(21px, 4.4vw, 26px); font-weight: 800; letter-spacing: -.02em; line-height: 1.25; color: var(--ink); margin-bottom: 14px; }
.faq details { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; margin-bottom: 10px; }
.faq summary { position: relative; cursor: pointer; list-style: none; padding: 14px 46px 14px 16px; font-size: 16.5px; font-weight: 600; line-height: 1.4; color: var(--ink); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 16px; top: 50%; transform: translateY(-50%); font-size: 22px; font-weight: 400; color: var(--indigo-bright); line-height: 1; }
.faq details[open] summary::after { content: "\2212"; }
.faq details[open] summary { border-bottom: 1px solid var(--line); }
.faq .a { padding: 14px 16px 16px; font-size: 16px; line-height: 1.65; color: var(--ink-soft); }

.sources ol { padding-left: 1.5em; }
.sources li { margin-bottom: 8px; font-size: 15.5px; line-height: 1.5; overflow-wrap: anywhere; }

.cta-box { background: var(--frame); color: #fff; border-radius: 16px; padding: 28px 22px; text-align: center; margin: 40px 0 0; }
.cta-box p { font-size: 19px; font-weight: 700; line-height: 1.35; margin-bottom: 16px; }
.cta-btn { display: inline-block; background: #fff; color: var(--indigo); text-decoration: none; font-weight: 600; font-size: 15px; padding: 12px 24px; border-radius: 8px; transition: background .15s; }
.cta-btn:hover { background: #F0F1FA; }

.related-list { display: grid; gap: 12px; }
.card { display: block; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; text-decoration: none; transition: border-color .15s, box-shadow .15s; }
.card:hover { border-color: var(--indigo-bright); box-shadow: 0 10px 28px -14px rgba(79,70,229,.35); }
.card span { display: block; }
.card-cluster { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--teal); margin-bottom: 4px; }
.card-title { font-size: 16.5px; font-weight: 700; line-height: 1.35; color: var(--ink); margin-bottom: 4px; }
.card-desc { font-size: 14.5px; line-height: 1.55; color: var(--ink-soft); }

/* ---------- blog hub ---------- */
.hub-intro { font-size: 17.5px; line-height: 1.65; color: var(--ink-soft); margin: 0 0 8px; }
.cluster { margin-top: 36px; }
.cluster h2 { font-size: 12.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; color: var(--teal); line-height: 1.4; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.post-list { list-style: none; }
.post-item { padding: 18px 0; border-bottom: 1px solid var(--line); }
.post-item:last-child { border-bottom: 0; }
.post-item h3 { font-size: 20px; font-weight: 800; letter-spacing: -.015em; line-height: 1.3; margin-bottom: 6px; }
.post-item h3 a { text-decoration: none; color: var(--ink); }
.post-item h3 a:hover { color: var(--indigo-bright); text-decoration: underline; }
.post-desc { font-size: 16px; line-height: 1.6; color: var(--ink-soft); margin-bottom: 6px; }
.post-date { font-size: 13.5px; color: var(--ink-soft); }

/* "Recomandate": up to four featured cards above the groups (two per row, one per row on phones). */
.featured { margin-top: 28px; }
.featured h2 { font-size: 12.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; color: var(--indigo-bright); line-height: 1.4; padding-bottom: 10px; }
.feat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.feat-card { display: flex; flex-direction: column; gap: 6px; background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; text-decoration: none; transition: border-color .15s, box-shadow .15s; }
.feat-card:hover { border-color: var(--indigo-bright); box-shadow: 0 10px 28px -14px rgba(79,70,229,.35); }
.feat-label { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--teal); }
.feat-title { font-size: 17px; font-weight: 800; letter-spacing: -.01em; line-height: 1.3; color: var(--ink); }
.feat-desc { font-size: 14.5px; line-height: 1.55; color: var(--ink-soft); }
.feat-more { margin-top: auto; padding-top: 4px; font-size: 13.5px; font-weight: 600; color: var(--indigo-bright); }
@media (max-width: 640px) { .feat-grid { grid-template-columns: 1fr; } }

/* ---------- side panel (wide screens) and bottom bar (narrow screens), post pages only ---------- */
/* Mobile first: the panel is hidden and a slim fixed bar carries the call to action. At 1100px
   and up the panel appears left of the article (Cuprins + call to action) and the bar goes away. */
.post-side { display: none; font-size: 15px; line-height: 1.5; overflow-wrap: break-word; }
.toc { margin-bottom: 22px; }
.toc ul { list-style: none; border-left: 2px solid var(--line); }
.toc a { display: block; margin-left: -2px; padding: 6px 0 6px 14px; border-left: 2px solid transparent; font-size: 14.5px; line-height: 1.4; color: var(--ink-soft); text-decoration: none; }
.toc a:hover { color: var(--indigo); border-left-color: var(--indigo-bright); }
/* The /blog Cuprins: larger than the article one; each group opens to show its posts; rows shade on hover. */
.hub-toc .box-title { font-size: 16px; letter-spacing: .1em; margin-bottom: 12px; }
.toc-group summary { display: block; position: relative; list-style: none; cursor: pointer; padding: 9px 12px 9px 32px; border-radius: 10px; font-size: 16px; font-weight: 600; line-height: 1.4; color: var(--ink); transition: background-color .15s, color .15s; }
.toc-group summary::-webkit-details-marker { display: none; }
.toc-group summary::before { content: ""; position: absolute; left: 13px; top: 16px; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); transition: transform .15s; }
.toc-group[open] summary::before { transform: rotate(45deg); top: 14px; }
.toc-group summary:hover { background: var(--tint); color: var(--indigo); }
.toc-group[open] summary { color: var(--indigo); }
.toc-group summary:focus-visible { outline: 2px solid var(--indigo-bright); outline-offset: 2px; }
.toc-count { font-weight: 500; color: var(--ink-soft); }
.toc-group ul { margin: 4px 0 10px 20px; }
.hub-toc a { font-size: 15.5px; line-height: 1.4; padding: 8px 10px 8px 14px; border-radius: 0 8px 8px 0; transition: background-color .15s, color .15s, border-color .15s; }
.hub-toc a:hover { background: var(--tint); color: var(--indigo); border-left-color: var(--indigo-bright); }
.side-cta { background: var(--frame); color: #fff; border-radius: 14px; padding: 20px 18px; text-align: center; }
.side-cta p { font-size: 16.5px; font-weight: 700; line-height: 1.35; margin-bottom: 14px; }
.side-cta .cta-btn { display: block; padding: 12px; }

.mobile-cta { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; background: var(--frame); padding: 10px 16px; box-shadow: 0 -6px 20px -8px rgba(30,27,75,.35); }
.mobile-cta .cta-btn { display: block; padding: 11px 16px; text-align: center; }
/* Room under the footer text so the fixed bar never covers it. */
.has-mobile-cta .post-footer { padding-bottom: 98px; }

/* ---------- compact footer ---------- */
.post-footer { border-top: 1px solid var(--line); background: var(--paper); padding: 26px 0; }
.post-footer .auth { display: block; font-size: 12.5px; line-height: 1.6; color: var(--ink-soft); }
.post-footer a { text-decoration: none; }
.post-footer a:hover { color: var(--indigo); text-decoration: underline; }

@media (min-width: 641px) {
  .post-main { padding: 40px 0 72px; }
  .post-wrap { font-size: 18px; }
  .answer { font-size: 20px; }
  .pe-scurt { padding: 18px 22px 10px; }
  .pe-scurt li { font-size: 16.5px; }
  .cta-box { padding: 34px 32px; }
  .cta-box p { font-size: 21px; }
}

@media (min-width: 1100px) {
  .post-layout { display: grid; grid-template-columns: 250px minmax(0, calc(68ch + 40px)); column-gap: 20px; justify-content: center; align-items: start; padding: 0 24px; font-size: 18px; }
  .post-layout > .post-wrap { max-width: none; margin: 0; }
  .post-layout.hub-layout { grid-template-columns: 300px minmax(0, calc(68ch + 40px)); column-gap: 32px; }
  .hub-layout .post-side { margin-top: 48px; }
  .post-side { display: flex; flex-direction: column; position: sticky; top: 24px; max-height: calc(100vh - 48px); }
  .toc { flex: 0 1 auto; min-height: 0; overflow-y: auto; }
  .side-cta { flex: none; }
  .mobile-cta { display: none; }
  .has-mobile-cta .post-footer { padding-bottom: 26px; }
}

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