/* KynWorks blog: article and index pages (built by tools/blog/build_blog.py) */
:root {
  --red: #E30000;
  --red-d: #B80000;
  --ink: #111111;
  --paper: #F7F4EF;
  --sand: #EDE6DA;
  --muted: #6E6862;
  --line: rgba(17, 17, 17, .1);
  --ease: cubic-bezier(.22, 1, .36, 1);
  --font: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
  --gutter: clamp(16px, 4vw, 40px);
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 90px; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--paper); line-height: 1.6; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -.02em; margin: 0; }
.wrap { width: 100%; max-width: 1240px; margin: 0 auto; padding-inline: var(--gutter); }

/* header */
.bh { position: sticky; top: 0; z-index: 20; background: rgba(247, 244, 239, .9); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.bh__in { display: flex; align-items: center; gap: 28px; height: 70px; }
.bh__logo img { width: 104px; height: auto; }
.bh__nav { display: flex; gap: 24px; margin-inline-start: auto; font-size: 15px; font-weight: 500; }
.bh__nav a { text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.bh__nav a:hover, .bh__nav a[aria-current] { color: var(--red); }
.bh__nav b { font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #fff; background: var(--red); padding: 2px 7px; border-radius: 999px; }
.bh__cta { text-decoration: none; font-weight: 700; font-size: 14.5px; padding: 10px 18px; border-radius: 999px; border: 2px solid var(--red); color: var(--red); background: #fff; white-space: nowrap; transition: background .3s, color .3s; }
.bh__cta b { background: var(--red); color: #fff; padding: 1px 8px; border-radius: 8px; margin-inline-start: 2px; }
.bh__cta:hover { background: var(--red); color: #fff; }
.bh__cta:hover b { background: #fff; color: var(--red); }

/* shared bits */
.crumbs { font-size: 13.5px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 22px; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--red); }
.crumbs [aria-current] { color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 46ch; }
.tag { display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--red); }

/* article */
.post__head { max-width: 900px; padding-top: clamp(32px, 6vw, 64px); }
.post__head h1 { font-size: clamp(32px, 5vw, 56px); font-weight: 800; margin-top: 10px; }
.post__lead { font-size: clamp(17px, 1.6vw, 20px); color: var(--muted); margin: 18px 0 0; max-width: 760px; }
.post__meta { font-size: 14px; color: var(--muted); margin: 14px 0 0; }
.post__hero { margin-top: clamp(28px, 4vw, 44px); }
.shot { margin: 0; }
.shot__win { border-radius: 16px; overflow: hidden; background: #fff; box-shadow: 0 0 0 1px var(--line), 0 40px 80px -40px rgba(17, 17, 17, .45); }
.shot__bar { height: 30px; display: flex; align-items: center; gap: 7px; padding: 0 14px; background: #F3F1EE; border-bottom: 1px solid var(--line); }
.shot__bar i { width: 10px; height: 10px; border-radius: 50%; background: #E2DED8; }
.shot__bar i:first-child { background: #FF5F57; } .shot__bar i:nth-child(2) { background: #FEBC2E; } .shot__bar i:nth-child(3) { background: #28C840; }
.shot figcaption { font-size: 14px; color: var(--muted); text-align: center; margin-top: 12px; }
.post__hero .shot__win { max-width: 1100px; margin: 0 auto; }
.photo { margin: 0 auto; max-width: 1100px; }
.photo img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 20px; background: var(--sand); box-shadow: 0 40px 80px -40px rgba(17, 17, 17, .45); }
.photo__credit { font-size: 12.5px; color: var(--muted); text-align: end; margin-top: 8px; }
.photo__credit a { color: inherit; }

.post__grid { display: grid; grid-template-columns: 240px minmax(0, 720px); gap: clamp(32px, 5vw, 72px); justify-content: center; margin-top: clamp(36px, 5vw, 60px); }
.toc { position: sticky; top: 96px; align-self: start; font-size: 14px; }
.toc p { font-weight: 700; margin: 0 0 10px; }
.toc ol { list-style: none; padding: 0; margin: 0; border-inline-start: 2px solid var(--line); }
.toc li a { display: block; padding: 6px 0 6px 14px; padding-inline: 14px 0; margin-inline-start: -2px; border-inline-start: 2px solid transparent; text-decoration: none; color: var(--muted); line-height: 1.4; }
.toc li a:hover, .toc li a.on { color: var(--ink); border-color: var(--red); }
.toc__cta { display: block; margin-top: 22px; text-decoration: none; text-align: center; font-weight: 700; padding: 12px 14px; border-radius: 14px; border: 2px solid var(--red); color: var(--red); background: #fff; }
.toc__cta b { background: var(--red); color: #fff; padding: 1px 8px; border-radius: 8px; }
.toc__cta:hover { background: var(--red); color: #fff; }

.prose { font-size: 17.5px; line-height: 1.75; min-width: 0; }
.prose > :first-child { margin-top: 0; }
.prose p { margin: 0 0 1.2em; }
.prose h2 { font-size: clamp(25px, 2.6vw, 32px); font-weight: 800; margin: 2em 0 .7em; }
.prose h3 { font-size: 20px; font-weight: 700; margin: 1.6em 0 .5em; }
.prose ul, .prose ol { padding-inline-start: 1.3em; margin: 0 0 1.3em; }
.prose li { margin: .35em 0; }
.prose li::marker { color: var(--red); font-weight: 700; }
.prose a { color: var(--red); text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
.prose a:hover { color: var(--red-d); }
.prose strong { font-weight: 700; }
.prose .shot { margin: 2em 0; }

/* call to action box */
.cta { display: flex; align-items: center; gap: 20px; margin: 2.6em 0 0; padding: 24px; background: #fff; border: 2px solid var(--red); border-radius: 24px; box-shadow: 0 0 0 6px rgba(227, 0, 0, .08), 0 26px 60px -30px rgba(227, 0, 0, .5); }
.wrap > .cta { margin: 36px 0 12px; }
.cta__ic { flex: none; width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center; background: var(--red); color: #fff; }
.cta__txt { flex: 1; min-width: 0; }
.cta__txt p { margin: 0; font-size: 15px; color: var(--muted); line-height: 1.5; }
.cta__txt .cta__t { font-size: clamp(19px, 2vw, 24px); font-weight: 800; color: var(--ink); line-height: 1.2; margin-bottom: 6px; letter-spacing: -.01em; }
.cta__t b { color: #fff; background: var(--red); padding: 0 9px 2px; border-radius: 9px; white-space: nowrap; }
.cta__btn { flex: none; display: inline-flex; align-items: center; gap: 10px; padding: 15px 24px; border-radius: 999px; background: var(--red); color: #fff !important; font-weight: 700; font-size: 16px; text-decoration: none !important; box-shadow: 0 10px 30px -10px rgba(227, 0, 0, .6); transition: background .3s, transform .3s var(--ease); }
.cta__btn:hover { background: var(--ink); transform: translateY(-2px); }

/* cards */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.card { display: flex; flex-direction: column; text-decoration: none; background: #fff; border-radius: 20px; overflow: hidden; box-shadow: 0 0 0 1px var(--line); transition: transform .4s var(--ease), box-shadow .4s var(--ease); }
.card:hover { transform: translateY(-4px); box-shadow: 0 0 0 1px var(--line), 0 24px 50px -28px rgba(17, 17, 17, .4); }
.card__img { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: #F3F1EE; border-bottom: 1px solid var(--line); }
.card__img img { width: 100%; height: 100%; object-fit: cover; object-position: 72% 0; transition: transform .8s var(--ease); }
.card__img--photo img { object-position: 50% 50%; }
.card:hover .card__img img { transform: scale(1.04); }
.card__body { display: flex; flex-direction: column; gap: 8px; padding: 18px 20px 20px; flex: 1; }
.card__t { font-size: 18px; font-weight: 700; line-height: 1.3; }
.card__d { font-size: 14.5px; color: var(--muted); line-height: 1.55; }
.card__more { margin-top: auto; padding-top: 6px; display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 14px; color: var(--red); }
.cards--lead { grid-template-columns: 1fr; margin-bottom: 18px; }
.card--big { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); }
.card--big .card__img { aspect-ratio: auto; height: 100%; min-height: 260px; border-bottom: 0; border-inline-end: 1px solid var(--line); }
.card--big .card__body { justify-content: center; padding: clamp(22px, 3vw, 40px); }
.card--big .card__t { font-size: clamp(22px, 2.4vw, 30px); font-weight: 800; }
.card--big .card__d { font-size: 16px; }

.more { padding-block: clamp(56px, 8vw, 96px); }
.more h2 { font-size: clamp(26px, 3vw, 36px); font-weight: 800; margin-bottom: 24px; }
.more__all { margin: 26px 0 0; }
.more__all a { color: var(--red); font-weight: 600; }

/* index */
.bhero { padding: clamp(36px, 7vw, 80px) 0 clamp(28px, 4vw, 40px); }
.bhero h1 { font-size: clamp(36px, 6vw, 72px); font-weight: 800; letter-spacing: -.03em; max-width: 900px; }
.bhero h1 span { color: var(--red); }
.bhero__lead { font-size: clamp(17px, 1.6vw, 20px); color: var(--muted); max-width: 720px; margin: 18px 0 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.chips a { text-decoration: none; padding: 9px 16px; border-radius: 999px; background: #fff; box-shadow: inset 0 0 0 1px var(--line); font-size: 14px; font-weight: 600; transition: background .3s, color .3s; }
.chips a:hover { background: var(--ink); color: #fff; }
.grp { padding-top: clamp(48px, 7vw, 80px); }
.grp h2 { font-size: clamp(28px, 3.4vw, 42px); font-weight: 800; margin-bottom: 8px; }
.grp__d { color: var(--muted); margin: 0 0 20px; }
.grp h2 + .cards, .grp h2 + .cards--lead { margin-top: 20px; }
main > .wrap:last-child { padding-bottom: clamp(56px, 8vw, 100px); }

/* footer */
.bf { background: var(--ink); color: rgba(255, 255, 255, .72); padding: 56px 0 32px; font-size: 14.5px; }
.bf__cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; }
.bf__cols img { width: 110px; margin-bottom: 14px; }
.bf__cols p { margin: 0; max-width: 360px; }
.bf nav { display: grid; gap: 8px; align-content: start; }
.bf nav strong { color: #fff; margin-bottom: 4px; }
.bf nav a { text-decoration: none; }
.bf nav a:hover { color: #fff; }
.bf__copy { margin: 40px 0 0; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, .12); font-size: 13px; }

@media (max-width: 960px) {
  .post__grid { grid-template-columns: minmax(0, 1fr); }
  .toc { display: none; }
  .card--big { grid-template-columns: 1fr; }
  .card--big .card__img { aspect-ratio: 16 / 9; min-height: 0; border-inline-end: 0; border-bottom: 1px solid var(--line); }
  .bf__cols { grid-template-columns: 1fr 1fr; }
  .bf__cols > div { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .bh__in { height: 60px; gap: 12px; }
  .bh__logo img { width: 92px; }
  .bh__nav { gap: 14px; font-size: 14px; }
  .bh__nav a:not(:last-child) { display: none; }
  .bh__cta { padding: 7px 10px 7px 12px; font-size: 13px; }
  .bh__cta b { padding: 1px 6px; }
  .prose { font-size: 16.5px; }
  .cta { flex-direction: column; align-items: flex-start; padding: 20px; }
  .cta__btn { width: 100%; justify-content: center; }
  .shot__win { border-radius: 12px; }
  .photo img { border-radius: 14px; }
  .shot__bar { height: 22px; } .shot__bar i { width: 8px; height: 8px; }
  .cards { grid-template-columns: 1fr; }
}
@media (max-width: 370px) { .bh__nav { display: none; } .bh__cta { margin-inline-start: auto; } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .card, .card__img img, .cta__btn { transition: none; } }
