/* Pulkit Editing: the blog. Article pages and the index, on the edit-bay tokens in site.css (load after it). */

/* ---------- Article head ---------- */
.post-head { padding: 56px var(--margin) 0; }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; font-size: 15px; color: var(--muted); }
.crumbs a { text-decoration: none; transition: color 0.2s; }
.crumbs a:hover { color: var(--ink); }
.crumbs li + li::before { content: "/"; margin-right: 8px; color: var(--surface-3); }
.post-head h1 { margin-top: 22px; max-width: 17ch; font-size: clamp(40px, 5.6vw, 84px); line-height: 0.98; letter-spacing: -0.035em; }
.post-dek { margin-top: 24px; max-width: 54ch; font-size: 22px; line-height: 1.45; color: var(--muted); }
.post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 22px; margin-top: 28px; font-size: 15px; color: var(--muted); }
.post-meta b { color: var(--ink); font-weight: 600; }
.post-meta a { text-decoration: none; }
.post-hero { margin: 44px var(--margin) 0; }
.post-hero img { width: 100%; height: auto; border-radius: var(--r); background: var(--surface); }
.post-hero figcaption { margin-top: 10px; font-size: 15px; color: var(--muted); }

/* ---------- Article body: one reading column, figures break out wider ---------- */
.post-body { padding: 56px var(--margin) 0; }
.prose { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 720px) minmax(0, 1fr); font-size: 19px; line-height: 1.7; }
.prose > * { grid-column: 2; min-width: 0; }
.prose > * + * { margin-top: 1.15em; }
.prose > .wide { grid-column: 1 / -1; width: 100%; max-width: 1080px; justify-self: center; }
.prose h2 { margin-top: 2.3em; font-size: clamp(30px, 3.3vw, 46px); line-height: 1.04; scroll-margin-top: 96px; }
.prose h3 { margin-top: 1.9em; font-size: 24px; line-height: 1.18; scroll-margin-top: 96px; }
.prose h2 + *, .prose h3 + * { margin-top: 0.7em; }
.prose a { text-decoration: underline; text-decoration-color: var(--lime); text-decoration-thickness: 2px; text-underline-offset: 0.2em; transition: color 0.2s, background-color 0.2s; }
.prose a:hover { color: var(--lime); }
.prose strong { font-weight: 650; color: var(--ink); }
.prose ul, .prose ol { padding-left: 1.25em; }
.prose li + li { margin-top: 0.5em; }
.prose li::marker { color: var(--lime); font-weight: 600; }
.prose code { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 0.86em; background: var(--surface-2); padding: 0.12em 0.4em; border-radius: 5px; }
.prose pre { background: var(--surface); border-radius: var(--r); padding: 18px 20px; overflow-x: auto; font-size: 15px; line-height: 1.65; }
.prose pre code { background: none; padding: 0; font-size: inherit; }
.prose .lead { font-size: 21px; line-height: 1.6; }

/* The answer up front, for people and for AI search */
.answer { background: var(--surface); border-radius: var(--r); padding: 24px 26px; font-size: 19px; line-height: 1.6; }
.answer p + p { margin-top: 0.7em; }
.answer b:first-child { color: var(--lime); }

/* On this page */
.toc { background: var(--surface); border-radius: var(--r); padding: 20px 26px 22px; font-size: 16px; line-height: 1.45; }
.toc b { display: block; font-weight: 600; margin-bottom: 10px; }
.toc ol { padding-left: 1.3em; columns: 2; column-gap: 32px; }
.toc li { break-inside: avoid; margin: 0 0 6px; }
.toc a { text-decoration: none; color: var(--muted); transition: color 0.2s; }
.toc a:hover { color: var(--ink); }

/* Figures */
.fig img { width: 100%; height: auto; border-radius: var(--r); background: var(--surface); }
.fig figcaption { margin-top: 12px; font-size: 15px; line-height: 1.5; color: var(--muted); max-width: 72ch; }
.fig figcaption a { color: var(--ink); }
.prose > .fig { margin-top: 2em; }
.prose > .fig + * { margin-top: 2em; }

/* Tables */
.tbl { overflow-x: auto; border-radius: var(--r); }
.tbl table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: 16px; line-height: 1.45; }
.tbl th, .tbl td { padding: 13px 16px; text-align: left; vertical-align: top; }
.tbl thead th { background: var(--surface-2); font-weight: 600; color: var(--ink); }
.tbl tbody td { background: var(--surface); border-top: 1px solid var(--bg); }
.tbl tbody th { background: var(--surface); border-top: 1px solid var(--bg); font-weight: 600; }
.tbl td.num, .tbl th.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.tbl caption { caption-side: bottom; text-align: left; padding-top: 10px; font-size: 14px; color: var(--muted); }

/* Callouts */
.note { background: var(--surface-2); border-radius: var(--r); padding: 20px 24px; font-size: 18px; line-height: 1.6; }
.note--lime { background: var(--lime); color: var(--on-lime); }
.note--lime a { text-decoration-color: var(--on-lime); }
.note--lime a:hover { color: var(--on-lime); }
.dl { display: flex; flex-wrap: wrap; gap: 12px; }
.dl .btn { min-height: 50px; font-size: 16px; }

/* Real work: posters that turn into the YouTube player on click */
.watch { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); max-width: 760px; }
.watch figure { min-width: 0; }
.yt { position: relative; display: block; width: 100%; aspect-ratio: 9 / 16; border-radius: var(--r); overflow: hidden; background: var(--surface); padding: 0; }
.yt img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ease-soft); }
.yt:hover img { transform: scale(1.03); }
.yt::after { content: ""; position: absolute; left: 50%; top: 50%; width: 58px; height: 58px; margin: -29px 0 0 -29px; border-radius: 50%; background: rgba(10, 10, 11, 0.72) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 7l9 5-9 5z' fill='%23FFB000'/%3E%3C/svg%3E") center / 30px no-repeat; transition: transform 0.3s var(--ease-out); }
.yt:hover::after { transform: scale(1.08); }
.yt iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.yt.is-on::after { display: none; }
.watch figcaption { margin-top: 8px; font-size: 14px; line-height: 1.35; color: var(--muted); }
.watch figcaption b { display: block; color: var(--ink); font-weight: 600; }

/* FAQ, sources, author, the next step */
.faq { scroll-margin-top: 96px; }
.faq h3 { font-size: 21px; margin-top: 1.6em; }
.faq h3 + p { margin-top: 0.5em; }
.sources ol { padding-left: 1.3em; font-size: 15px; line-height: 1.55; color: var(--muted); }
.sources li + li { margin-top: 0.45em; }
.sources a { color: var(--ink); }
.author { display: grid; grid-template-columns: auto 1fr; gap: 18px 22px; align-items: start; background: var(--surface); border-radius: var(--r); padding: 24px 26px; font-size: 17px; line-height: 1.55; }
.author__mark { width: 64px; height: 64px; border-radius: var(--r); background: var(--lime); color: var(--on-lime); display: grid; place-items: center; font-family: var(--display); font-weight: 700; font-size: 26px; letter-spacing: -0.02em; }
.author b { display: block; font-size: 19px; margin-bottom: 4px; }
.author p { color: var(--muted); }
.author p + p { margin-top: 8px; }
.cta { background: var(--lime); color: var(--on-lime); border-radius: var(--r); padding: 30px 30px 32px; }
.cta h2 { margin-top: 0 !important; font-size: clamp(28px, 3vw, 40px); color: var(--on-lime); }
.cta p { margin-top: 10px; font-size: 18px; line-height: 1.55; max-width: 52ch; }
.cta .row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 22px; margin-top: 22px; }
.cta .btn--ink { background: var(--bg); color: var(--ink); }
.cta .btn--ink:hover { background: var(--surface-2); }
.cta .textlink { text-decoration-color: rgba(10, 10, 11, 0.35); }
.cta .textlink:hover { text-decoration-color: var(--on-lime); }
.prose .cta a:not(.btn) { color: var(--on-lime); }
.related { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); }

/* ---------- Cards: the index and related posts ---------- */
.card { display: flex; flex-direction: column; gap: 14px; text-decoration: none; min-width: 0; }
.card .pic { aspect-ratio: 16 / 10; border-radius: var(--r); overflow: hidden; background: var(--surface); }
.card .pic img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.7s var(--ease-soft); }
.card:hover .pic img { transform: scale(1.03); }
.card h3 { font-size: 24px; line-height: 1.12; letter-spacing: -0.02em; }
.card p { font-size: 16px; line-height: 1.5; color: var(--muted); }
.card .meta { font-size: 14px; color: var(--muted); }
.card .meta b { color: var(--lime); font-weight: 600; }
.related .card h3 { font-size: 20px; }

.blog-head { padding: 64px var(--margin) 0; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gap); align-items: end; }
.blog-head h1 { grid-column: 1 / 9; font-size: clamp(44px, 6.2vw, 96px); line-height: 0.96; letter-spacing: -0.04em; }
.blog-head p { grid-column: 9 / 13; font-size: 19px; line-height: 1.55; color: var(--muted); }
.blog-list { padding: 64px var(--margin) 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 56px var(--gap); }
.blog-list .card:first-child { grid-column: 1 / 3; }
.blog-list .card:first-child h3 { font-size: clamp(28px, 3vw, 40px); }
.blog-list .card:first-child p { font-size: 18px; max-width: 60ch; }
.blog-foot { padding: 96px var(--margin) 0; }
.blog-head p a { text-decoration: underline; text-decoration-color: var(--lime); text-decoration-thickness: 2px; text-underline-offset: 0.2em; color: var(--ink); }

/* Index sections: for businesses, for editors and creators */
.blog-group { padding-top: 80px; scroll-margin-top: 80px; }
.blog-group__head { padding: 0 var(--margin); display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 28px; border-top: 1px solid var(--surface-2); padding-top: 28px; margin: 0 var(--margin); padding-left: 0; padding-right: 0; }
.blog-group__head h2 { font-size: clamp(30px, 3.4vw, 48px); line-height: 1.02; letter-spacing: -0.03em; }
.blog-group__head p { font-size: 18px; color: var(--muted); max-width: 52ch; }
.blog-group .blog-list { padding-top: 40px; }

/* Rate calculator (the freelance pricing guide) */
.calc { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: var(--gap); background: var(--surface); border-radius: var(--r); padding: 24px; }
.calc__in { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; align-content: start; }
.calc label { display: flex; flex-direction: column; justify-content: space-between; gap: 6px; font-size: 15px; line-height: 1.35; color: var(--muted); }
.calc input { font: inherit; font-size: 18px; color: var(--ink); background: var(--bg); border: 1px solid var(--surface-3); border-radius: 10px; padding: 10px 12px; width: 100%; min-height: 46px; font-variant-numeric: tabular-nums; }
.calc input:focus-visible { outline: 2px solid var(--lime); outline-offset: 1px; border-color: transparent; }
.calc__out { background: var(--surface-2); border-radius: var(--r); padding: 18px 20px; display: flex; flex-direction: column; gap: 12px; align-self: start; }
.calc__out p { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 16px; line-height: 1.35; color: var(--muted); }
.calc__out b { color: var(--ink); font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.calc__out .calc__main { padding: 12px 0; border-top: 1px solid var(--surface-3); border-bottom: 1px solid var(--surface-3); }
.calc__out .calc__main b { color: var(--lime); font-family: var(--display); font-size: 32px; letter-spacing: -0.02em; }
.calc__out .calc__note { display: block; font-size: 14px; }

@media (max-width: 1023px) {
  .blog-head h1, .blog-head p { grid-column: 1 / -1; }
  .blog-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .related { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 719px) {
  .post-head { padding-top: 36px; }
  .post-dek { font-size: 19px; }
  .post-hero { margin-top: 32px; }
  .post-body { padding-top: 40px; }
  .prose { font-size: 18px; line-height: 1.68; }
  .prose > .wide { width: auto; }
  .toc ol { columns: 1; }
  .tbl table { min-width: 520px; font-size: 15px; }
  .tbl th, .tbl td { padding: 11px 12px; }
  .answer, .toc, .note, .author, .cta { padding: 20px; }
  .author { grid-template-columns: 1fr; }
  .watch { gap: 6px; }
  .yt::after { width: 44px; height: 44px; margin: -22px 0 0 -22px; background-size: 24px; }
  .blog-head { padding-top: 40px; }
  .blog-group { padding-top: 56px; }
  .blog-group__head p { font-size: 17px; }
  .calc { grid-template-columns: 1fr; padding: 18px; }
  .calc__in { grid-template-columns: 1fr 1fr; gap: 12px; }
  .calc label { font-size: 14px; }
  .blog-list { grid-template-columns: 1fr; gap: 44px; padding-top: 44px; }
  .blog-list .card:first-child { grid-column: auto; }
  .related { grid-template-columns: 1fr; }
}
