/*
 * K-Content theme: light lavender cards under a purple > pink > orange header.
 *
 * Everything lives under the wrapper class `.kc`, so it cannot leak into the
 * dark site chrome. Used by blog posts with `theme: kcontent` (the blog adds the
 * wrapper) and meant for reuse on the Dev Plans feature tab.
 *
 *   <div class="kc">                      block embedded in a page (centered, max 980px)
 *   <div class="kc kc-page">              whole-page variant (full width, children centered)
 *
 * Markup, inside the wrapper:
 *   header.kc-header > p.kc-title + p.kc-lead + .kc-date
 *   section.kc-section > h2.kc-section-title + .kc-card*
 *   .kc-card > .kc-tag + h3 + p* + .kc-highlight
 *   footer.kc-footer
 *
 * No CSS imports and no web fonts: only the system font stack below.
 */
.kc {
  /* Colors */
  --kc-bg: #f8f7fc;
  --kc-text: #1a1a1a;
  --kc-body: #374151;
  --kc-heading: #1f2937;
  --kc-muted: #6b7280;
  --kc-line: #e5e7eb;
  --kc-surface: #ffffff;
  --kc-purple: #7c3aed;
  --kc-purple-deep: #4c1d95;
  --kc-pink: #ec4899;
  --kc-pink-deep: #be185d;
  --kc-orange: #f97316;
  --kc-tag-bg: #f3e8ff;
  --kc-gradient: linear-gradient(135deg, var(--kc-purple) 0%, var(--kc-pink) 50%, var(--kc-orange) 100%);
  --kc-highlight-bg: linear-gradient(120deg, #fdf2f8 0%, #faf5ff 100%);
  /* Shape and depth */
  --kc-radius-hero: 20px;
  --kc-radius-card: 16px;
  --kc-radius-note: 10px;
  --kc-radius-pill: 12px;
  --kc-max: 980px;
  --kc-shadow-hero: 0 10px 30px rgba(124, 58, 237, 0.25);
  --kc-shadow-card: 0 4px 20px rgba(0, 0, 0, 0.06);
  --kc-shadow-card-hover: 0 12px 30px rgba(124, 58, 237, 0.12);
  /* Type */
  --kc-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans KR", sans-serif;

  box-sizing: border-box;
  max-width: var(--kc-max);
  margin: 0 auto;
  padding: 20px;
  border-radius: 24px;
  background: var(--kc-bg);
  color: var(--kc-text);
  font-family: var(--kc-font);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.7;
  letter-spacing: normal;
  text-align: left;
  overflow-wrap: break-word;
}

/* The `*` reset from the original page, scoped to the wrapper. */
.kc *, .kc *::before, .kc *::after { box-sizing: border-box; }
.kc :where(h1, h2, h3, h4, p, ul, ol, figure, blockquote) { margin: 0; padding: 0; }
.kc :where(header, section, footer, div, span, em, strong) { margin: 0; padding: 0; }
.kc a { color: var(--kc-purple); }

/* Whole-page variant: the wrapper fills the page, its children stay centered. */
.kc.kc-page { max-width: none; min-height: 100vh; border-radius: 0; }
.kc.kc-page > * { max-width: var(--kc-max); margin-left: auto; margin-right: auto; }

/* Hero header */
.kc .kc-header {
  text-align: center;
  padding: 48px 20px 32px;
  margin-bottom: 36px;
  background: var(--kc-gradient);
  color: #fff;
  border-radius: var(--kc-radius-hero);
  box-shadow: var(--kc-shadow-hero);
}
.kc .kc-header p { font-size: 1.05rem; font-weight: 400; opacity: 0.95; }
.kc .kc-header .kc-title, .kc .kc-header h1 { margin-bottom: 8px; font-size: 2.4rem; font-weight: 800; letter-spacing: -0.5px; line-height: 1.7; opacity: 1; }
.kc .kc-date {
  display: inline-block;
  margin-top: 12px;
  padding: 4px 14px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  font-size: 0.85rem;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

/* Sections */
.kc .kc-section { margin-bottom: 48px; }
.kc .kc-section-title {
  margin-bottom: 20px;
  padding-left: 12px;
  border-left: 5px solid var(--kc-pink);
  color: var(--kc-purple-deep);
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: normal;
  line-height: 1.7;
}

/* Cards */
.kc .kc-card {
  margin-bottom: 20px;
  padding: 28px;
  background: var(--kc-surface);
  border-radius: var(--kc-radius-card);
  box-shadow: var(--kc-shadow-card);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.kc .kc-card:hover { transform: translateY(-3px); box-shadow: var(--kc-shadow-card-hover); }
.kc .kc-card h3 { margin-bottom: 12px; color: var(--kc-heading); font-size: 1.25rem; font-weight: 700; letter-spacing: normal; line-height: 1.4; }
.kc .kc-card p { margin-bottom: 12px; color: var(--kc-body); font-size: 0.98rem; }
.kc .kc-card .kc-tag {
  display: inline-block;
  margin-bottom: 10px;
  padding: 3px 10px;
  background: var(--kc-tag-bg);
  color: var(--kc-purple);
  border-radius: var(--kc-radius-pill);
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.7;
}

/* Callout */
.kc .kc-highlight {
  margin-top: 8px;
  padding: 14px 16px;
  background: var(--kc-highlight-bg);
  border-left: 4px solid var(--kc-pink);
  border-radius: var(--kc-radius-note);
  font-size: 0.95rem;
}
.kc .kc-highlight strong { color: var(--kc-pink-deep); }

/* Footer */
.kc .kc-footer {
  margin-top: 20px;
  padding: 32px 20px;
  border-top: 1px solid var(--kc-line);
  color: var(--kc-muted);
  font-size: 0.85rem;
  text-align: center;
}

@media (max-width: 640px) {
  .kc { padding: 12px; border-radius: 16px; }
  .kc.kc-page { padding: 20px; border-radius: 0; }
  .kc .kc-header .kc-title, .kc .kc-header h1 { font-size: 1.8rem; }
  .kc .kc-card { padding: 22px 18px; }
  .kc .kc-section-title { font-size: 1.35rem; }
}

@media (prefers-reduced-motion: reduce) {
  .kc .kc-card { transition: none; }
  .kc .kc-card:hover { transform: none; }
}

/*
 * Additions (v2) for the Dev Plans feature tab. Rules only; nothing above changes.
 *   ul.kc-grid > li > a.kc-card.kc-card-link > .kc-media + .kc-tags + h3 + p + .kc-highlight
 *   .kc-body        rendered text blocks (p, ul, ol, h3) inside a card
 *   nav.kc-chips    anchor links as pills
 */
.kc .kc-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin: 0; padding: 0; list-style: none; }
.kc .kc-grid > li { margin: 0; padding: 0; min-width: 0; }
.kc .kc-grid .kc-card { margin-bottom: 0; }
.kc .kc-card.kc-card-link { display: block; height: 100%; overflow: hidden; color: inherit; text-decoration: none; }
.kc .kc-card.kc-card-link:hover { color: inherit; }
.kc .kc-card.kc-card-link:hover h3 { color: var(--kc-purple-deep); }
.kc .kc-card-link .kc-highlight { color: var(--kc-body); }
.kc .kc-card-link:focus-visible, .kc .kc-chips a:focus-visible { outline: 3px solid var(--kc-purple); outline-offset: 3px; }

/* Card header image: bleeds to the card edge. Without an image it is a soft gradient from --h. */
.kc .kc-media {
  position: relative;
  margin: -28px -28px 20px;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: linear-gradient(135deg, hsl(var(--h, 270) 70% 30%), hsl(var(--h, 270) 60% 14%));
}
.kc .kc-media img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; }

.kc .kc-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.kc .kc-card .kc-tags .kc-tag, .kc .kc-header .kc-tag { margin-bottom: 0; }
.kc .kc-card .kc-tag.kc-tag-status { background: #fce7f3; color: #9d174d; }
.kc .kc-header .kc-tags { justify-content: center; margin: 0 0 14px; }
.kc .kc-header .kc-tag { padding: 3px 12px; background: #fff; color: var(--kc-purple-deep); border-radius: var(--kc-radius-pill); font-size: 0.78rem; font-weight: 600; line-height: 1.7; }
.kc .kc-header .kc-tag.kc-tag-status { color: #9d174d; }
.kc .kc-header .kc-lead { max-width: 40em; margin-left: auto; margin-right: auto; }
.kc .kc-section-lead { margin: -8px 0 20px; color: var(--kc-muted); font-size: 0.92rem; }

.kc .kc-body { color: var(--kc-body); font-size: 0.98rem; }
.kc .kc-body > * { margin-bottom: 12px; }
.kc .kc-body > :last-child { margin-bottom: 0; }
.kc .kc-body ul, .kc .kc-body ol { padding-left: 1.3em; }
.kc .kc-body li { margin-bottom: 6px; }
.kc .kc-body li:last-child { margin-bottom: 0; }
.kc .kc-body h3 { margin: 16px 0 8px; color: var(--kc-heading); font-size: 1.1rem; font-weight: 700; line-height: 1.4; }
.kc .kc-body strong { color: var(--kc-heading); }
.kc .kc-body code { padding: 1px 5px; background: var(--kc-tag-bg); color: var(--kc-purple-deep); border-radius: 4px; font-size: 0.92em; }
.kc .kc-highlight .kc-body { font-size: 0.95rem; }

.kc .kc-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 32px; }
.kc .kc-chips a { display: inline-block; padding: 6px 14px; background: var(--kc-surface); border: 1px solid var(--kc-line); border-radius: 999px; color: var(--kc-purple-deep); font-size: 0.85rem; font-weight: 600; line-height: 1.5; text-decoration: none; }
.kc .kc-chips a:hover { border-color: var(--kc-purple); color: var(--kc-purple); }

.kc .kc-links { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.kc .kc-links a { display: block; padding: 16px 20px; background: var(--kc-surface); border-radius: var(--kc-radius-card); box-shadow: var(--kc-shadow-card); color: var(--kc-body); text-decoration: none; transition: transform 0.2s ease, box-shadow 0.2s ease; }
.kc .kc-links a:hover { transform: translateY(-2px); box-shadow: var(--kc-shadow-card-hover); color: var(--kc-body); }
.kc .kc-links a:focus-visible { outline: 3px solid var(--kc-purple); outline-offset: 3px; }
.kc .kc-links b { display: block; color: var(--kc-heading); font-size: 1.05rem; line-height: 1.4; }
.kc .kc-links span { display: block; margin-top: 2px; font-size: 0.92rem; }

@media (max-width: 760px) {
  .kc .kc-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .kc .kc-media { margin: -22px -18px 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .kc .kc-links a { transition: none; }
  .kc .kc-links a:hover { transform: none; }
}

/* Photos inside a post card. Scoped so .kc-media images on other pages stay untouched. */
.kc .kc-card > figure,
.kc .kc-img-row { margin: 16px 0; }
.kc .kc-card > figure img,
.kc .kc-img-row img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: 14px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}
.kc .kc-card > figure figcaption,
.kc .kc-img-row figcaption {
  margin-top: 8px;
  color: var(--kc-muted);
  font-size: 0.85rem;
  line-height: 1.5;
  text-align: center;
}
.kc .kc-img-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.kc .kc-img-row figure { margin: 0; }
@media (max-width: 640px) {
  .kc .kc-img-row { grid-template-columns: 1fr; }
}

.kc .kc-cover { margin: 0 0 32px; aspect-ratio: 16 / 9; overflow: hidden; border-radius: var(--kc-radius-card); background: #12110f; }
.kc .kc-cover img { display: block; width: 100%; height: 100%; object-fit: cover; }
