/* =============================================================================
   blog.css — Jordensky blog CMS scoped styles (PLAN §1.4, §7.3)

   Loaded AFTER the shared Webflow stylesheet. Every rule is namespaced under
   .jsk-blog (public reader/admin chrome), .jsk-editor (write canvas), .jsk-admin
   (dashboard/media), .jsk-flash (admin flash), or a Webflow/Editor.js class we
   own — so it never fights the minified Webflow selectors and can be re-themed
   for the future redesign in isolation.

   Fonts (Thicccboi @font-face) come from the shared Webflow CSS — NOT re-declared
   here (PLAN §7.2). Body inherits Thicccboi from the mirror; we only set the
   article measure, type scale, and blog-specific components.
   ========================================================================== */

:root {
  /* Brand tokens (PLAN §7.3 + task tokens) */
  --primary-1:     #4a3aff;  /* links */
  --secondary-4:   #2417ae;  /* deep-indigo button bg (.button-primary) */
  --secondary-3:   #ff6262;  /* coral accent */
  --heading-ink:   #14142b;  /* headings (NOT a Webflow var — literal token) */
  --cfo-ink-soft:  #3a4263;  /* soft body ink */
  --cfo-muted:     #6a7193;  /* muted meta text */
  --cfo-line:      #e7e9f3;  /* hairline borders */
  --brand-tint:    #e9ebfa;  /* tag-chip / soft surface */
  --cfo-wash:      #f5f6fc;  /* page wash surface */

  --radius-button: 8px;
  --radius-card:   16px;
  --radius-chip:   999px;

  --measure:       680px;    /* article reading measure */
  --body-size:     18px;
  --body-lh:       1.67;

  --shadow-card:   0 1px 2px rgba(20,20,43,.04), 0 10px 30px rgba(20,20,43,.06);
}

/* -----------------------------------------------------------------------------
   Shared reader/admin container helpers
   -------------------------------------------------------------------------- */
.jsk-blog { color: var(--cfo-ink-soft); }

.jsk-blog a { color: var(--primary-1); text-decoration: none; }
.jsk-blog a:hover { text-decoration: underline; }

.jsk-blog h1,
.jsk-blog h2,
.jsk-blog h3 { color: var(--heading-ink); font-weight: 700; }

/* Blog buttons (deep-indigo, white, 8px) — scoped so Webflow .button-primary
   in the chrome is untouched. */
.jsk-btn {
  display: inline-block;
  background: var(--secondary-4);
  color: #fff;
  border: 0;
  border-radius: var(--radius-button);
  padding: 12px 22px;
  font-family: "700 Thicccboi", Thicccboi, sans-serif;
  font-weight: 700;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  transition: background .15s ease, transform .15s ease;
}
.jsk-btn:hover { background: var(--primary-1); color: #fff; text-decoration: none; }
.jsk-btn:disabled,
.jsk-btn[disabled] { opacity: .5; cursor: not-allowed; }
.jsk-btn--ghost {
  background: transparent;
  color: var(--secondary-4);
  box-shadow: inset 0 0 0 1px var(--cfo-line);
}
.jsk-btn--ghost:hover { background: var(--brand-tint); color: var(--secondary-4); }

/* -----------------------------------------------------------------------------
   Tag chips (brand-tint pill) — used on cards and post pages
   -------------------------------------------------------------------------- */
.jsk-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.jsk-tag {
  display: inline-flex;
  align-items: center;
  background: var(--brand-tint);
  color: var(--secondary-4);
  border-radius: var(--radius-chip);
  padding: 5px 13px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
}
a.jsk-tag:hover { background: var(--primary-1); color: #fff; text-decoration: none; }

/* -----------------------------------------------------------------------------
   Blog index / tag archive — responsive card grid (PLAN §7.5)
   -------------------------------------------------------------------------- */
.jsk-blog__header { max-width: var(--measure); margin: 0 auto 40px; text-align: center; }
.jsk-blog__title { font-size: 40px; line-height: 1.12; margin: 0 0 12px; }
.jsk-blog__lede { color: var(--cfo-muted); font-size: 19px; line-height: 1.5; margin: 0; }

.jsk-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 28px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.jsk-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--cfo-line);
  border-radius: var(--radius-card);
  overflow: hidden;
  transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease;
}
.jsk-card:hover { box-shadow: var(--shadow-card); transform: translateY(-2px); border-color: var(--brand-tint); }

.jsk-card__media { display: block; aspect-ratio: 16 / 9; background: var(--cfo-wash); overflow: hidden; }
.jsk-card__media img { width: 100%; height: 100%; object-fit: cover; display: block; }

.jsk-card__body { display: flex; flex-direction: column; gap: 12px; padding: 22px 22px 24px; flex: 1 1 auto; }
.jsk-card__title { font-size: 22px; line-height: 1.25; margin: 0; }
.jsk-card__title a { color: var(--heading-ink); }
.jsk-card__title a:hover { color: var(--primary-1); text-decoration: none; }
.jsk-card__excerpt { color: var(--cfo-muted); font-size: 15px; line-height: 1.55; margin: 0; flex: 1 1 auto; }
.jsk-card__meta {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--cfo-muted);
  font-size: 13px;
  font-weight: 600;
}
.jsk-card__meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--cfo-muted); }

/* Pagination */
.jsk-pager { display: flex; justify-content: center; align-items: center; gap: 12px; margin: 48px 0 0; }
.jsk-pager__link {
  display: inline-flex;
  align-items: center;
  padding: 10px 18px;
  border-radius: var(--radius-button);
  box-shadow: inset 0 0 0 1px var(--cfo-line);
  color: var(--secondary-4);
  font-weight: 600;
  font-size: 14px;
}
.jsk-pager__link:hover { background: var(--brand-tint); text-decoration: none; }
.jsk-pager__link[aria-disabled="true"] { opacity: .4; pointer-events: none; }
.jsk-pager__status { color: var(--cfo-muted); font-size: 14px; font-weight: 600; }

/* -----------------------------------------------------------------------------
   Single post reading layout (PLAN §7.5) — Thicccboi body, brand consistent
   (recommendation B, PLAN §5.2). Editor keeps the serif; reader uses the brand.
   -------------------------------------------------------------------------- */
.jsk-article { max-width: var(--measure); margin: 0 auto; }
.jsk-article__head { margin: 0 0 28px; }
.jsk-article__title { font-size: 40px; line-height: 1.14; margin: 0 0 16px; }
.jsk-article__byline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  color: var(--cfo-muted);
  font-size: 14px;
  font-weight: 600;
}
.jsk-article__byline .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--cfo-muted); }

/* Reader body: the cached body_html echoed inside .post-body */
.jsk-blog .post-body {
  font-family: Thicccboi, sans-serif;
  font-weight: 500;
  font-size: var(--body-size);
  line-height: var(--body-lh);
  color: var(--cfo-ink-soft);
}
.jsk-blog .post-body > * { margin-left: auto; margin-right: auto; }
.jsk-blog .post-body p { margin: 0 0 1.4em; }
.jsk-blog .post-body h2 { font-size: 30px; line-height: 1.2; margin: 1.8em 0 .4em; }
.jsk-blog .post-body h3 { font-size: 23px; line-height: 1.28; margin: 1.5em 0 .3em; }
.jsk-blog .post-body a { color: var(--primary-1); }
.jsk-blog .post-body blockquote {
  border-left: 3px solid var(--secondary-4);
  padding: 2px 0 2px 22px;
  margin: 1.6em 0;
  color: var(--heading-ink);
  font-style: italic;
}
.jsk-blog .post-body .pullquote {
  border: 0;
  text-align: center;
  font-size: 27px;
  line-height: 1.32;
  font-style: italic;
  color: var(--heading-ink);
  margin: 1.6em 0;
}
.jsk-blog .post-body figure { margin: 1.8em 0; }
.jsk-blog .post-body figure img,
.jsk-blog .post-body picture img { max-width: 100%; height: auto; border-radius: 12px; display: block; }
.jsk-blog .post-body figcaption {
  color: var(--cfo-muted);
  font-size: 14px;
  text-align: center;
  margin-top: 10px;
}
.jsk-blog .post-body .post-code {
  background: var(--heading-ink);
  color: #eef;
  border-radius: 12px;
  padding: 18px 20px;
  overflow: auto;
  font-family: Inconsolata, "SF Mono", Menlo, monospace;
  font-size: 15px;
  line-height: 1.55;
}
.jsk-blog .post-body .post-delimiter {
  border: 0;
  height: auto;
  text-align: center;
  margin: 2.2em auto;
}
.jsk-blog .post-body .post-delimiter::before { content: "* * *"; letter-spacing: .5em; color: var(--cfo-muted); }
.jsk-blog .post-body .table-wrap { overflow-x: auto; margin: 1.8em 0; }
.jsk-blog .post-body table { border-collapse: collapse; width: 100%; font-size: 15px; }
.jsk-blog .post-body th,
.jsk-blog .post-body td { border: 1px solid var(--cfo-line); padding: 10px 14px; text-align: left; }
.jsk-blog .post-body th { background: var(--cfo-wash); color: var(--heading-ink); font-weight: 700; }
.jsk-blog .post-body .embed__frame { position: relative; margin: 1.8em 0; }
.jsk-blog .post-body .embed__frame iframe { width: 100%; border: 0; display: block; border-radius: 12px; }
.jsk-blog .post-body video { max-width: 100%; height: auto; border-radius: 12px; display: block; margin: 1.8em auto; }

.jsk-article__footer { margin: 40px auto 0; padding-top: 24px; border-top: 1px solid var(--cfo-line); max-width: var(--measure); }

/* -----------------------------------------------------------------------------
   Blog index / tag additions (views/blog/index.php, tag.php) — hero feature card,
   eyebrow/empty/back helpers, cover placeholders. Namespaced under .jsk-blog.
   -------------------------------------------------------------------------- */
.jsk-blog__eyebrow {
  color: var(--primary-1);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin: 0 0 8px;
}
.jsk-blog__empty { color: var(--cfo-muted); text-align: center; font-size: 17px; margin: 40px 0; }
.jsk-blog__back { margin: 40px 0 0; text-align: center; font-weight: 600; }

/* Neutral placeholders when a card/hero has no cover image. */
.jsk-card__media--empty,
.jsk-feature__media--empty {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--cfo-wash), var(--brand-tint));
}

/* Featured hero (index page 1) */
.jsk-feature {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 0;
  align-items: stretch;
  background: #fff;
  border: 1px solid var(--cfo-line);
  border-radius: var(--radius-card);
  overflow: hidden;
  margin: 0 0 40px;
  transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease;
}
.jsk-feature:hover { box-shadow: var(--shadow-card); border-color: var(--brand-tint); text-decoration: none; }
.jsk-feature__media { position: relative; min-height: 260px; background: var(--cfo-wash); overflow: hidden; }
.jsk-feature__media img,
.jsk-feature__media picture { width: 100%; height: 100%; object-fit: cover; display: block; }
.jsk-feature__body { display: flex; flex-direction: column; gap: 14px; justify-content: center; padding: 36px 40px; }
.jsk-feature__title { font-size: 28px; line-height: 1.2; margin: 0; color: var(--heading-ink); }
.jsk-feature:hover .jsk-feature__title { color: var(--primary-1); }
.jsk-feature__excerpt { color: var(--cfo-muted); font-size: 16px; line-height: 1.55; margin: 0; }

/* -----------------------------------------------------------------------------
   Single post additions (views/blog/show.php) — full-bleed cover, author, related
   -------------------------------------------------------------------------- */
.jsk-article__tags { margin: 0 0 18px; justify-content: flex-start; }
.jsk-article__author { color: var(--heading-ink); }
.jsk-article__back { margin: 20px 0 0; font-weight: 600; }

.jsk-article__cover {
  max-width: 1100px;
  margin: 8px auto 36px;
  padding: 0 24px;
}
.jsk-article__cover img,
.jsk-article__cover picture { width: 100%; height: auto; border-radius: var(--radius-card); display: block; }
.jsk-article__cover figcaption {
  color: var(--cfo-muted);
  font-size: 14px;
  text-align: center;
  margin-top: 12px;
}

.jsk-related { border-top: 1px solid var(--cfo-line); }
.jsk-related__title { font-size: 26px; line-height: 1.2; margin: 0 0 24px; color: var(--heading-ink); }

/* -----------------------------------------------------------------------------
   Reference-inspired article structure: hero, live contents rail, reader, CTA.
   Uses the redesigned Jordensky green system while preserving the shared chrome.
   -------------------------------------------------------------------------- */
.jsk-post {
  --article-canvas: #f2f5f0;
  --article-surface: #fff;
  --article-ink: #1b221d;
  --article-body: #3d4740;
  --article-muted: #72836d;
  --article-line: #d9e1d6;
  --article-green: #034737;
  --article-green-bright: #0e7a5a;
  --article-tint: #e2ece3;
  background: var(--article-canvas);
  color: var(--article-body);
}

.jsk-article-hero {
  padding: clamp(64px, 8vw, 112px) 0 clamp(54px, 6vw, 84px);
  background:
    radial-gradient(circle at 78% 20%, rgba(14,122,90,.1), transparent 34%),
    var(--article-canvas);
}
.jsk-article-hero__inner {
  width: min(100% - 64px, 1200px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(420px, 1.1fr);
  gap: clamp(52px, 7vw, 96px);
  align-items: center;
}
.jsk-article-hero__inner--text { display: block; max-width: 820px; }
.jsk-article__head { margin: 0; }
.jsk-article__title {
  max-width: 15ch;
  margin: 0 0 24px;
  color: var(--article-ink);
  font-size: clamp(48px, 5.4vw, 76px);
  font-weight: 600;
  letter-spacing: -.045em;
  line-height: .98;
  text-wrap: balance;
}
.jsk-article__byline {
  color: var(--article-muted);
  font-size: 15px;
  font-weight: 500;
}
.jsk-article__author { color: var(--article-ink); font-weight: 600; }
.jsk-article__tags { margin-bottom: 26px; }
.jsk-post .jsk-tag {
  background: var(--article-tint);
  color: var(--article-green);
}
.jsk-post a.jsk-tag:hover { background: var(--article-green); color: #fff; }
.jsk-article__cover {
  max-width: none;
  margin: 0;
  padding: 0;
}
.jsk-article__cover picture,
.jsk-article__cover img {
  width: 100%;
  display: block;
  aspect-ratio: 16 / 10.5;
  object-fit: cover;
  border-radius: 22px;
}
.jsk-article__cover figcaption {
  margin-top: 10px;
  color: var(--article-muted);
  font-size: 13px;
  text-align: left;
}

.jsk-reader-section {
  padding: 70px 0 110px;
  background: var(--article-surface);
}
.jsk-reader-grid {
  width: min(100% - 64px, 1280px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(180px, 220px) minmax(0, 720px) minmax(220px, 260px);
  gap: clamp(32px, 4vw, 58px);
  align-items: start;
}
.jsk-reader-grid--no-toc { grid-template-columns: minmax(0, 720px) minmax(220px, 260px); justify-content: center; }
.jsk-reader-main { min-width: 0; }

.jsk-toc {
  position: sticky;
  top: 108px;
  max-height: calc(100vh - 136px);
  overflow: auto;
  scrollbar-width: thin;
}
.jsk-toc__title {
  margin: 0 0 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--article-line);
  color: var(--article-green);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
}
.jsk-toc__list,
.jsk-toc__sublist { margin: 0; padding: 0; list-style: none; }
.jsk-toc__item { margin: 0; }
.jsk-toc__list a {
  display: block;
  margin: 2px 0;
  padding: 8px 10px;
  border-left: 2px solid transparent;
  border-radius: 0 8px 8px 0;
  color: var(--article-muted);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.28;
  transition: color .2s ease, background .2s ease, border-color .2s ease;
}
.jsk-toc__sublist a { padding-left: 22px; font-size: 13px; }
.jsk-toc__list a:hover,
.jsk-toc__list a:focus-visible {
  color: var(--article-green);
  background: rgba(226,236,227,.7);
  text-decoration: none;
}
.jsk-toc__list a[data-parent-active="1"] {
  color: var(--article-green);
  background: rgba(226,236,227,.5);
  font-weight: 600;
}
.jsk-toc__list a[data-active="1"] {
  color: var(--article-green);
  border-left-color: var(--article-green-bright);
  background: var(--article-tint);
  font-weight: 700;
}

.jsk-article-summary {
  margin: 0 0 46px;
  padding: 24px 0 26px;
  border-top: 1px solid var(--article-line);
  border-bottom: 1px solid var(--article-line);
}
.jsk-article-summary__label {
  margin: 0 0 10px !important;
  color: var(--article-green);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
}
.jsk-article-summary > p:last-child {
  margin: 0;
  color: var(--article-ink);
  font-size: clamp(20px, 2vw, 24px);
  line-height: 1.45;
  text-wrap: pretty;
}
.jsk-post .post-body {
  color: var(--article-body);
  font-size: 18px;
  line-height: 1.72;
}
.jsk-post .post-body h2,
.jsk-post .post-body h3 { scroll-margin-top: 120px; color: var(--article-ink); text-wrap: balance; }
.jsk-post .post-body h2 { margin-top: 2.15em; font-size: clamp(30px, 3vw, 38px); font-weight: 600; letter-spacing: -.025em; }
.jsk-post .post-body h3 { margin-top: 1.9em; font-size: clamp(24px, 2.3vw, 29px); font-weight: 600; letter-spacing: -.018em; }
.jsk-post .post-body a { color: var(--article-green-bright); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.jsk-post .post-body blockquote { border-left-color: var(--article-green-bright); }
.jsk-post .post-body th { background: var(--article-tint); color: var(--article-ink); }
.jsk-post .post-body th,
.jsk-post .post-body td { border-color: var(--article-line); }
.jsk-post .post-body .post-code { background: #10251c; color: #edf5ef; }
.jsk-article__footer { border-top-color: var(--article-line); }
.jsk-article__back a { color: var(--article-green); }

.jsk-callout {
  position: sticky;
  top: 108px;
  overflow: hidden;
  padding: 28px 26px 26px;
  border-radius: 18px;
  background: var(--article-tint);
  color: var(--article-body);
}
.jsk-callout::after {
  content: "";
  position: absolute;
  inset: -55% -45% auto 25%;
  aspect-ratio: 1;
  border: 1px solid rgba(3,71,55,.12);
  border-radius: 50%;
  box-shadow: 0 0 0 24px rgba(3,71,55,.05), 0 0 0 48px rgba(3,71,55,.035);
  pointer-events: none;
}
.jsk-callout__mark {
  position: relative;
  z-index: 1;
  width: 34px;
  height: 3px;
  margin-bottom: 42px;
  background: var(--article-green-bright);
}
.jsk-callout__eyebrow {
  position: relative;
  z-index: 1;
  margin: 0 0 10px;
  color: var(--article-green);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.jsk-callout h2 {
  position: relative;
  z-index: 1;
  margin: 0 0 16px;
  color: var(--article-ink);
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -.025em;
  line-height: 1.08;
}
.jsk-callout > p:not(.jsk-callout__eyebrow) {
  position: relative;
  z-index: 1;
  margin: 0 0 22px;
  font-size: 15px;
  line-height: 1.45;
}
.jsk-callout__button {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 15px;
  border-radius: 8px;
  background: var(--article-green);
  color: #fff !important;
  font-size: 14px;
  font-weight: 600;
  transition: background .2s ease, transform .2s ease;
}
.jsk-callout__button:hover { background: var(--article-green-bright); text-decoration: none; transform: translateY(-1px); }
.jsk-callout__button:active { transform: translateY(1px); }
.jsk-callout__button:focus-visible { outline: 3px solid rgba(14,122,90,.3); outline-offset: 3px; }

.jsk-related {
  padding: clamp(72px, 9vw, 124px) 0 clamp(84px, 10vw, 140px);
  border-top: 0;
  background: var(--article-canvas);
}
.jsk-related__inner { width: min(100% - 64px, 1280px); margin: 0 auto; }
.jsk-related__title {
  margin: 0 0 clamp(42px, 6vw, 72px);
  color: var(--article-ink);
  font-size: clamp(44px, 5vw, 68px);
  font-weight: 500;
  letter-spacing: -.04em;
  line-height: 1;
}
.jsk-related__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(26px, 4vw, 54px);
  margin: 0;
  padding: 0;
  list-style: none;
}
.jsk-related-card { min-width: 0; }
.jsk-related-card__media {
  display: block;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  border-radius: 14px;
  background: var(--article-tint);
}
.jsk-related-card__media picture,
.jsk-related-card__media img,
.jsk-related-card__media--empty { width: 100%; height: 100%; display: block; object-fit: cover; }
.jsk-related-card__media--empty {
  background:
    radial-gradient(circle at 30% 30%, rgba(14,122,90,.2), transparent 28%),
    linear-gradient(145deg, #d9e7dc, #edf3ec);
}
.jsk-related-card__media img { transition: transform .45s cubic-bezier(.22,.8,.24,1); }
.jsk-related-card:hover .jsk-related-card__media img { transform: scale(1.035); }
.jsk-related-card__body { padding-top: 20px; }
.jsk-related-card__title { margin: 0 0 18px; font-size: clamp(22px, 2vw, 28px); font-weight: 500; line-height: 1.18; letter-spacing: -.02em; }
.jsk-related-card__title a { color: var(--article-ink); }
.jsk-related-card__title a:hover { color: var(--article-green); text-decoration: none; }
.jsk-related-card__link { display: inline-flex; gap: 10px; color: var(--article-green) !important; font-size: 14px; font-weight: 700; }
.jsk-related-card__link:hover { text-decoration: none; gap: 14px; }

@media (max-width: 1080px) {
  .jsk-article-hero__inner { grid-template-columns: minmax(0, .85fr) minmax(360px, 1.15fr); gap: 46px; }
  .jsk-reader-grid { grid-template-columns: minmax(170px, 200px) minmax(0, 680px) minmax(200px, 230px); gap: 28px; }
}

@media (max-width: 900px) {
  .jsk-article-hero { padding-top: 112px; }
  .jsk-article-hero__inner { grid-template-columns: 1fr; }
  .jsk-article__title { max-width: 18ch; }
  .jsk-article__cover { max-width: 720px; }
  .jsk-reader-grid,
  .jsk-reader-grid--no-toc { grid-template-columns: minmax(0, 720px); justify-content: center; }
  .jsk-toc { position: static; max-height: 300px; padding: 20px; border: 1px solid var(--article-line); border-radius: 14px; }
  .jsk-callout { position: static; margin-top: 10px; }
  .jsk-callout::after {
    inset: -48px 0 auto auto;
    width: 200px;
    height: 200px;
  }
}

@media (max-width: 700px) {
  .jsk-article-hero { padding: 108px 0 46px; }
  .jsk-article-hero__inner,
  .jsk-reader-grid,
  .jsk-related__inner { width: min(100% - 36px, 1280px); }
  .jsk-article__title { font-size: clamp(40px, 12vw, 56px); }
  .jsk-reader-section { padding: 42px 0 76px; }
  .jsk-article-summary { margin-bottom: 34px; }
  .jsk-post .post-body { font-size: 17px; line-height: 1.68; }
  .jsk-related__grid { grid-template-columns: 1fr; gap: 42px; }
  .jsk-related-card__media { aspect-ratio: 16 / 10; }
}

@media (prefers-reduced-motion: reduce) {
  .jsk-toc__list a,
  .jsk-callout__button,
  .jsk-related-card__media img { transition: none; }
}

@media (max-width: 767px) {
  .jsk-feature { grid-template-columns: 1fr; }
  .jsk-feature__media { min-height: 200px; aspect-ratio: 16 / 9; }
  .jsk-feature__body { padding: 24px 22px 28px; }
  .jsk-feature__title { font-size: 24px; }
  .jsk-article__cover { padding: 0; }
}

/* =============================================================================
   ADMIN — flash messages (partials/flash.php)
   ========================================================================== */
.jsk-flash { display: flex; flex-direction: column; gap: 10px; margin: 0 0 20px; }
.jsk-flash__item {
  border-radius: var(--radius-button);
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 600;
  border: 1px solid transparent;
}
.jsk-flash__item--success { background: #e9f7ef; color: #1a7a45; border-color: #bfe6cf; }
.jsk-flash__item--error   { background: #fdecec; color: #b3261e; border-color: #f5c2bf; }
.jsk-flash__item--warning { background: #fff6e6; color: #8a5a00; border-color: #f3dca6; }
.jsk-flash__item--info    { background: var(--brand-tint); color: var(--secondary-4); border-color: #cfd4f5; }

/* =============================================================================
   ADMIN — media library grid (views/admin/media.php)
   ========================================================================== */
.jsk-media {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.jsk-media__item {
  background: #fff;
  border: 1px solid var(--cfo-line);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.jsk-media__thumb { aspect-ratio: 1 / 1; background: var(--cfo-wash); overflow: hidden; }
.jsk-media__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.jsk-media__meta { padding: 8px 10px; font-size: 12px; color: var(--cfo-muted); line-height: 1.4; }
.jsk-media__meta .dim { color: var(--heading-ink); font-weight: 600; }
.jsk-media__actions { display: flex; gap: 6px; padding: 0 10px 10px; }
.jsk-media__actions button {
  flex: 1 1 auto;
  font-size: 12px;
  padding: 6px 8px;
  border-radius: 6px;
  border: 1px solid var(--cfo-line);
  background: #fff;
  color: var(--secondary-4);
  cursor: pointer;
}
.jsk-media__actions button:hover { background: var(--brand-tint); }

/* =============================================================================
   EDITOR — Medium writing canvas + inline toolbar (PLAN §5.2, §5.4)
   Scoped under .jsk-editor. The canvas uses the Medium serif for the writing
   feel; the public reader (.post-body above) uses brand Thicccboi.
   ========================================================================== */
.jsk-editor {
  --serif: Georgia, "Times New Roman", serif;
  --title-size: 42px;
  --title-lh: 1.12;
  --e-body-size: 21px;
  --e-body-lh: 1.58;
  --e-body-color: #242424;
}
.jsk-editor .write-measure { max-width: 700px; margin: 0 auto; padding: 56px 20px 40vh; }
.jsk-editor .post-title {
  width: 100%;
  border: 0;
  outline: 0;
  resize: none;
  overflow: hidden;
  font-family: var(--serif);
  font-size: var(--title-size);
  line-height: var(--title-lh);
  font-weight: 700;
  color: #111;
  background: transparent;
}
.jsk-editor .post-title::placeholder { color: #b3b3b1; }
.jsk-editor .post-body {
  font-family: var(--serif);
  font-size: var(--e-body-size);
  line-height: var(--e-body-lh);
  color: var(--e-body-color);
}
.jsk-editor .post-body h2 { font-size: 34px; line-height: 1.15; font-weight: 700; margin: 2em 0 .4em; }
.jsk-editor .post-body h3 { font-size: 26px; line-height: 1.22; font-weight: 700; margin: 1.6em 0 .3em; }
.jsk-editor .post-body blockquote { border-left: 3px solid #242424; padding-left: 20px; font-style: italic; }
.jsk-editor .post-body .pullquote {
  font-size: 30px;
  line-height: 1.3;
  font-style: italic;
  border: 0;
  text-align: center;
  margin: 1.4em 0;
}
.jsk-editor .codex-editor__redactor { padding-bottom: 0 !important; }
.jsk-editor .ce-block__content,
.jsk-editor .ce-toolbar__content { max-width: 700px; }

/* Editor top bar (status pill + Publish + ⋯) */
.jsk-editor__bar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  padding: 12px 20px;
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(180%) blur(6px);
  border-bottom: 1px solid var(--cfo-line);
}
.jsk-editor__status {
  margin-right: auto;
  font-size: 13px;
  font-weight: 600;
  color: var(--cfo-muted);
}
.jsk-editor__status[data-state="saved"]    { color: #1a7a45; }
.jsk-editor__status[data-state="saving"]   { color: var(--cfo-muted); }
.jsk-editor__status[data-state="dirty"]    { color: #8a5a00; }
.jsk-editor__status[data-state="retrying"] { color: #b3261e; }

/* Editor.js floating inline toolbar — the dark Medium bubble (PLAN §5.4) */
.ce-inline-toolbar { background: #242424; border-radius: 6px; border: 0; }
.ce-inline-tool { color: #fff; }
.ce-inline-tool:hover { background: rgba(255,255,255,.12); }
.ce-inline-tool--active { color: #57ab7d; }        /* Medium green active state */
.ce-conversion-toolbar { background: #242424; border-radius: 6px; }
.ce-conversion-tool { color: #fff; }
.ce-conversion-tool:hover { background: rgba(255,255,255,.12); }
.ce-conversion-tool__icon { background: transparent; box-shadow: none; color: inherit; }


/* Article sharing and author credibility */
.jsk-share {
  padding-bottom: 22px;
  margin-bottom: 22px;
  border-bottom: 1px solid var(--cfo-line);
}
.jsk-share__title,
.jsk-author-bio__eyebrow {
  margin: 0 0 10px;
  color: var(--cfo-muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.jsk-share__links { display: flex; gap: 8px; }
.jsk-share__links a {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--cfo-line);
  border-radius: 50%;
  background: #fff;
  color: var(--brand);
  transition: color .2s ease, background .2s ease, transform .2s ease;
}
.jsk-share__links a:hover { color: #fff; background: var(--brand); transform: translateY(-2px); }
.jsk-share__links svg { width: 17px; height: 17px; fill: currentColor; }
.jsk-author-bio {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 18px;
  align-items: start;
  margin-top: 36px;
  padding: 28px;
  border: 1px solid var(--cfo-line);
  border-radius: 18px;
  background: var(--brand-tint);
}
.jsk-author-bio__mark {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font-size: 24px;
  font-weight: 700;
}
.jsk-author-bio h2 { margin: 0 0 7px; font-size: 23px; line-height: 1.15; }
.jsk-author-bio p:last-child { margin: 0; color: var(--cfo-muted); font-size: 15px; line-height: 1.55; }
@media (max-width: 900px) {
  .jsk-share { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
  .jsk-share__title { margin: 0; }
}
@media (max-width: 520px) {
  .jsk-author-bio { grid-template-columns: 44px 1fr; padding: 22px; }
  .jsk-author-bio__mark { width: 44px; height: 44px; font-size: 19px; }
}
@media (prefers-reduced-motion: reduce) {
  .jsk-share__links a { transition: none; }
}


/* =============================================================================
   Responsive
   ========================================================================== */
@media (max-width: 767px) {
  :root { --measure: 100%; }
  .jsk-blog__title,
  .jsk-article__title { font-size: 30px; }
  .jsk-grid { grid-template-columns: 1fr; gap: 20px; }
  .jsk-editor .post-title { font-size: 32px; }
  .jsk-editor .post-body { font-size: 19px; }
}
