/* Articles (hyperdesk.com/articles), written by tools/articles.mjs on top of conduit.css and samples.css.
   One template for every article: the headline beside an industry sample, the text with a call to action that
   stays beside it on wide screens (and in a bar at the bottom on phones and tablets), a table of contents,
   key takeaways first and questions last. */

.post-page .trade { display: block; }
/* No floating Made with badge on articles: it would sit on the rail's form (wide) or the bar (narrow) */
.post-page .made { display: none; }
.post-page .trade-shot { padding: 28px; }

/* Reading progress, a thin line under the header */
.read-progress { position: fixed; top: 0; left: 0; right: 0; z-index: 60; height: 2px; pointer-events: none; }
.read-progress i { display: block; height: 100%; background: linear-gradient(90deg, #85e3fc, #b7edfd 50%, #c9f1dc); transform: scaleX(0); transform-origin: 0 50%; }

/* Hero: the words on the left, the sample on the right */
.post-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 520px); gap: 64px; align-items: center; padding-top: 72px; padding-bottom: 56px; }
.post-hero .h1 { max-width: 760px; margin-top: 20px; font-size: 56px; line-height: 1.02; text-wrap: balance; }
.post-hero .lede { max-width: 620px; }
.ph-cover { margin: 0; }
.ph-cover figcaption { margin: 10px 4px 0; color: var(--ink-muted); font: 500 11px/14px var(--mono-font); letter-spacing: 0.04em; text-transform: uppercase; text-align: right; }

/* The text and the rail beside it */
.post-grid { display: grid; grid-template-columns: minmax(0, 700px) 300px; justify-content: space-between; gap: 64px; align-items: start; border-top: 1px solid var(--line); padding-top: 56px; }
.post-grid .prose { padding-bottom: 32px; }
.prose h2, .prose h3 { scroll-margin-top: 88px; }

.takeaways { margin: 0 0 40px; padding: 24px 26px 22px; border: 1px solid var(--line); border-radius: var(--radius-2xl); background: linear-gradient(135deg, #f1fbfe, #f4fbf7); }
.tk-h { margin: 0 0 12px; color: var(--ink); font: 500 12px/14px var(--mono-font); letter-spacing: 0.04em; text-transform: uppercase; }
.takeaways ul { margin: 0; padding: 0; list-style: none; font-size: 16px; line-height: 1.45; }
.takeaways li { margin: 0; padding: 7px 0 7px 26px; background: var(--check) left 10px / 16px 16px no-repeat; }
.takeaways li + li { border-top: 1px solid rgba(41, 37, 30, 0.07); }

.post-fig { margin: 36px 0; }
.post-fig .trade-shot { margin: 0; }
.post-fig > img { display: block; width: 100%; height: auto; border-radius: var(--radius-xl); border: 1px solid var(--line); }
.post-fig figcaption { margin: 12px 2px 0; color: var(--ink-muted); font-size: 14px; line-height: 1.4; }

/* The call to action in the middle of the text */
.inline-cta { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 290px); gap: 8px 24px; align-items: center; margin: 40px 0; padding: 20px 20px 20px 24px; border-radius: var(--radius-xl); background: var(--coal); color: #fff; position: relative; overflow: hidden; isolation: isolate; }
.inline-cta::before { content: ""; position: absolute; inset: -40% -10% -40% 45%; z-index: -1; background: radial-gradient(closest-side, rgba(133, 227, 252, 0.22), transparent), radial-gradient(closest-side at 70% 40%, rgba(201, 241, 220, 0.16), transparent); filter: blur(10px); }
.ic-k { margin: 0 0 6px; color: #b7edfd; font: 500 11px/13px var(--mono-font); letter-spacing: 0.04em; text-transform: uppercase; }
.ic-h { margin: 0 0 4px; color: #fff; font: 400 19px/1.2 var(--heading); letter-spacing: -0.01em; text-wrap: balance; }
.ic-p { margin: 0; color: rgba(255, 255, 255, 0.66); font-size: 14px; line-height: 1.4; }
.get.inline { max-width: none; margin: 0; }
.get.inline .get-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.get.inline .get-row { padding: 3px; border-color: transparent; border-radius: 10px; }
.get.inline input { height: 38px; padding-left: 32px; font-size: 15px; }
.get.inline .get-ic { left: 13px; }
.get.inline .btn { height: 38px; padding: 0 14px; font-size: 13px; border-radius: 7px; }
.get.inline .get-tip { margin: 6px 0 0; min-height: 0; color: #fff; }
.get.inline .get-tip:empty { display: none; }
.get.inline .btn.coal { background: #85e3fc; color: var(--coal); }
.get.inline .btn.coal:hover { background: #b7edfd; }

/* Questions */
.post-faq { margin-top: 56px; }
.post-faq details { border-top: 1px solid var(--line); }
.post-faq details:last-child { border-bottom: 1px solid var(--line); }
.post-faq summary { display: flex; justify-content: space-between; gap: 16px; padding: 18px 0; cursor: pointer; list-style: none; font-size: 18px; font-weight: 500; line-height: 1.35; }
.post-faq summary::-webkit-details-marker { display: none; }
.post-faq summary::after { content: ""; flex: none; width: 16px; height: 16px; margin-top: 4px; background: var(--plus) center / 16px no-repeat; transition: rotate 0.2s var(--ease); }
.post-faq details[open] summary::after { rotate: 45deg; }
.faq-a p { margin: 0 0 20px; color: var(--ink-muted); font-size: 17px; line-height: 1.55; }
.post-end { margin-top: 40px; color: var(--ink-muted); font-size: 14px; line-height: 1.5; }

/* The rail: the free preview, then the contents. It stays in view while the text scrolls. */
.post-rail { position: sticky; top: 88px; }
.rail-in { display: flex; flex-direction: column; gap: 28px; }
.rail-cta { padding: 22px 20px 18px; border: 1px solid var(--line); border-radius: var(--radius-2xl); background: #fff; box-shadow: 0 24px 48px -28px rgba(41, 37, 30, 0.35); }
.rail-k { display: flex; align-items: center; gap: 8px; margin: 0 0 14px; color: var(--ink-muted); font: 500 12px/14px var(--mono-font); letter-spacing: 0.04em; text-transform: uppercase; }
.rail-k img { border-radius: 5px; }
.rail-h { margin: 0 0 8px; font: 400 24px/1.08 var(--heading); letter-spacing: -0.02em; }
.rail-p { margin: 0; color: var(--ink-muted); font-size: 14px; line-height: 1.45; }
.get.rail { margin-top: 16px; }
.get.rail .get-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.get.rail .get-row { flex-direction: column; gap: 6px; padding: 0; border: 0; box-shadow: none; background: transparent; }
.get.rail .get-row:focus-within { box-shadow: none; }
.get.rail .get-ic { top: 24px; }
.get.rail input { flex: none; width: 100%; height: 46px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.get.rail input:focus { border-color: var(--ink); box-shadow: 0 0 0 3px var(--ink-faint); }
.get.rail .btn { width: 100%; height: 46px; }
.get.rail .get-tip { margin-top: 6px; min-height: 0; }
.rail-cta .checks { justify-content: flex-start; gap: 6px 14px; margin-top: 10px; font-size: 12px; }
.rail-cta .checks li { padding-left: 18px; background-size: 13px 13px; }

.toc { padding: 0 4px; }
.toc-h { margin: 0 0 10px; color: var(--ink-muted); font: 500 12px/14px var(--mono-font); letter-spacing: 0.04em; text-transform: uppercase; }
.toc ol { margin: 0; padding: 0; list-style: none; max-height: calc(100vh - 560px); min-height: 120px; overflow: auto; }
.toc a { display: block; padding: 6px 0 6px 14px; border-left: 2px solid var(--line); color: var(--ink-muted); font-size: 14px; line-height: 1.35; text-decoration: none; transition: color 0.15s, border-color 0.15s; }
.toc a:hover { color: var(--ink); }
.toc a.on { border-color: var(--ink); color: var(--ink); }

/* Article cards (Keep reading, the hub) */
.more-sec { padding: 96px 0 0; }
.more-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 32px; }
.more-head .h2 { margin: 0; font-size: 40px; }
.more-all { display: inline-flex; align-items: center; gap: 6px; color: var(--ink); font-size: 15px; font-weight: 500; text-decoration: none; }
.more-all:hover { text-decoration: underline; text-underline-offset: 3px; }
.art-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 0; padding: 0; list-style: none; }
.art-card { height: 100%; display: flex; flex-direction: column; padding: 12px 12px 18px; border: 1px solid var(--line); border-radius: var(--radius-2xl); background: #fff; color: inherit; text-decoration: none; transition: border-color 0.15s var(--ease), translate 0.2s var(--ease); }
.art-card:hover { border-color: var(--ink); }
.art-card .tag, .art-card h3, .art-card .art-desc, .art-card .post-meta { margin-left: 8px; margin-right: 8px; }
.art-card h3 { margin-top: 10px; margin-bottom: 8px; font: 400 22px/1.1 var(--heading); letter-spacing: -0.02em; }
.art-desc { margin: 0 0 16px; color: var(--ink-muted); font-size: 15px; line-height: 1.4; }
.art-card .post-meta { margin-top: auto; }
.art-shot { margin: 0 0 16px; aspect-ratio: auto; padding: 18px; pointer-events: none; }
.art-shot .trade { width: 100%; }
.art-shot .trade-shot { padding: 0; margin: 0; }
.art-shot .trade-shot::before { display: none; }
.art-shot .win { box-shadow: 0 16px 32px -18px rgba(41, 37, 30, 0.4); }

.hub-hero { padding-bottom: 40px; }
.hub-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 28px 0 0; padding: 0; list-style: none; }
.hub-tags a { display: inline-flex; padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink); font-size: 14px; line-height: 16px; text-decoration: none; }
.hub-tags a:hover { border-color: var(--ink); }
.art-feature { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 48px; align-items: center; margin-bottom: 16px; padding: 16px 16px 16px 40px; border: 1px solid var(--line); border-radius: var(--radius-2xl); color: inherit; text-decoration: none; transition: border-color 0.15s var(--ease); }
.art-feature:hover { border-color: var(--ink); }
.art-feature h2 { margin: 14px 0 12px; font: 400 40px/1.04 var(--heading); letter-spacing: -0.03em; text-wrap: balance; }
.art-feature .art-desc { font-size: 17px; }
.art-feature .btn { margin-top: 24px; }
.art-feature .art-shot { margin: 0; padding: 28px; }
.hub-grid { padding-bottom: 0; }
.final-sub { max-width: 46ch; margin: 16px 0 0; color: var(--ink-muted); font-size: 17px; line-height: 1.4; }

/* The bar at the bottom on phones and tablets: shown once the reader is past the headline, hidden while
   another form is on screen. It opens into the same form. */
.post-bar { display: none; }
@media (max-width: 1099px) {
  .post-grid { grid-template-columns: minmax(0, 1fr); }
  .post-grid .prose { max-width: 700px; }
  .post-rail { display: none; }
  .post-bar { position: fixed; left: 12px; right: 12px; bottom: max(12px, env(safe-area-inset-bottom, 0px)); z-index: 80; display: block; padding: 10px 10px 10px 16px; border-radius: 16px; background: rgba(40, 36, 30, 0.96); color: #fff; box-shadow: 0 18px 40px -12px rgba(20, 18, 14, 0.55); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); translate: 0 calc(100% + 24px); transition: translate 0.3s var(--ease); }
  .post-bar.show { translate: 0 0; }
  .pb-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
  .pb-t { display: flex; flex-direction: column; gap: 2px; margin: 0; min-width: 0; }
  .pb-t b { font-size: 15px; line-height: 1.2; font-weight: 500; }
  .pb-t span { color: rgba(255, 255, 255, 0.66); font-size: 12px; line-height: 1.3; }
  .pb-open.btn.coal { flex: none; height: 40px; background: #85e3fc; color: var(--coal); }
  .get.bar { display: none; max-width: none; margin: 0; }
  .post-bar.open .pb-row { display: none; }
  .post-bar.open .get.bar { display: block; }
  .get.bar .get-label { margin: 2px 0 8px 2px; color: rgba(255, 255, 255, 0.72); }
  .get.bar .get-row { flex-direction: row; border-color: transparent; }
  .get.bar input { flex: 1; width: auto; }
  .get.bar .btn { width: auto; flex: none; }
  .get.bar .get-ic { top: 50%; }
  .get.bar .btn.coal { background: #85e3fc; color: var(--coal); }
  .get.bar .get-tip { min-height: 0; margin: 6px 0 0; color: #fff; }
  .get.bar .get-tip:empty { display: none; }
  .post-page .ftr { padding-bottom: 96px; }
}
@media (max-width: 1000px) {
  .post-hero { grid-template-columns: minmax(0, 1fr); gap: 36px; padding-top: 56px; }
  .ph-cover { max-width: 640px; }
  .art-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .art-feature { grid-template-columns: minmax(0, 1fr); gap: 8px; padding: 12px; }
  .art-feature .af-text { order: 2; padding: 16px 12px 12px; }
  .art-feature h2 { font-size: 32px; }
}
@media (max-width: 640px) {
  .post-hero { padding-top: 40px; padding-bottom: 36px; }
  .post-hero .h1 { font-size: 36px; line-height: 1.04; }
  .post-page .trade-shot { padding: 14px; }
  .post-grid { padding-top: 36px; }
  .takeaways { padding: 18px 18px 16px; }
  .inline-cta { grid-template-columns: minmax(0, 1fr); gap: 14px; margin: 32px 0; padding: 18px 16px 16px; }
  .ic-h { font-size: 18px; }
  .get.inline .get-row { flex-direction: row; }
  .get.inline input { flex: 1; width: auto; font-size: 16px; }
  .get.inline .btn { width: auto; flex: none; }
  .art-grid { grid-template-columns: minmax(0, 1fr); }
  .more-sec { padding-top: 72px; }
  .more-head .h2 { font-size: 32px; }
  .post-faq summary { font-size: 17px; }
}
@media (prefers-reduced-motion: reduce) {
  .post-bar, .toc a, .art-card { transition: none; }
}
@media print {
  .post-rail, .post-bar, .inline-cta, .read-progress, .final, .more-sec { display: none !important; }
}
