/* 스프쌤 — 특수교육 아틀리에
   디자인 기준: EduTeacher Atelier (warm cream / amber / stone / card UI)
   구조: /ssup/ 전용. 자동 발행·판매 기능과 무관. */

:root {
  --sp-bg: #FAF8F5;
  --sp-paper: #FFFFFF;
  --sp-paper-soft: #FFFCF8;
  --sp-ink: #1C1917;
  --sp-text: #44403C;
  --sp-muted: #78716C;
  --sp-faint: #A8A29E;
  --sp-line: #E7E5E4;
  --sp-line-strong: #D6D3D1;
  --sp-amber: #B45309;
  --sp-amber-dark: #92400E;
  --sp-amber-mid: #D97706;
  --sp-amber-soft: #FEF3C7;
  --sp-amber-pale: #FFFBEB;
  --sp-green: #047857;
  --sp-green-soft: #D1FAE5;
  --sp-blue: #1D4ED8;
  --sp-blue-soft: #DBEAFE;
  --sp-rose: #BE123C;
  --sp-rose-soft: #FFE4E6;
  --sp-violet: #6D28D9;
  --sp-violet-soft: #EDE9FE;
  --sp-radius: 18px;
  --sp-shadow: 0 8px 24px rgba(120, 53, 15, .07);
  --sp-shadow-lg: 0 18px 50px rgba(120, 53, 15, .12);
  --sp-font: "Plus Jakarta Sans", "Noto Sans KR", "Pretendard", -apple-system, BlinkMacSystemFont, system-ui, Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; max-width: 100%; overflow-x: hidden; }
body {
  margin: 0;
  max-width: 100%;
  overflow-x: hidden;
  background: var(--sp-bg);
  color: var(--sp-ink);
  font-family: var(--sp-font);
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
img { display: block; max-width: 100%; }
::selection { background: #FDE68A; color: #78350F; }

.sp-skip {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 99;
  background: var(--sp-ink);
  color: #fff;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 12px;
  transition: top .2s;
}
.sp-skip:focus { top: 12px; }

/* ── Header ───────────────────────────────────────────── */
.sp-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 248, 245, .94);
  border-bottom: 1px solid rgba(231, 229, 228, .85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.sp-header-inner {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  min-height: 72px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.sp-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}
.sp-mark {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: linear-gradient(145deg, #C2610A, #92400E);
  color: #FEF3C7;
  display: grid;
  place-items: center;
  box-shadow: 0 4px 10px rgba(146, 64, 14, .18);
}
.sp-mark svg { width: 21px; height: 21px; }
.sp-brand-copy { display: block; }
.sp-brand-copy b {
  display: block;
  font-size: 17px;
  line-height: 1.2;
  letter-spacing: -.04em;
  font-weight: 800;
  color: var(--sp-ink);
}
.sp-brand-copy small {
  display: block;
  margin-top: 1px;
  font-size: 10.5px;
  line-height: 1.4;
  color: var(--sp-muted);
  font-weight: 500;
  letter-spacing: .01em;
}
.sp-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 13px;
  font-weight: 500;
  color: #57534E;
}
.sp-nav a {
  position: relative;
  padding: 8px 0 7px;
  white-space: nowrap;
  transition: color .15s;
}
.sp-nav a:hover { color: var(--sp-ink); }
.sp-nav a[aria-current="page"] {
  color: var(--sp-amber-dark);
  font-weight: 700;
  box-shadow: inset 0 -2px 0 var(--sp-amber);
}
.sp-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}
.sp-rss {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 8px 10px;
  border: 1px solid var(--sp-line);
  border-radius: 9px;
  background: var(--sp-paper);
  color: #57534E;
  font-size: 11px;
  font-weight: 600;
  transition: border-color .15s, color .15s;
}
.sp-rss:hover { border-color: var(--sp-amber); color: var(--sp-amber-dark); }
.sp-cta, .sp-parent {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 13px;
  border-radius: 9px;
  background: var(--sp-amber-dark);
  color: #fff;
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1.3;
  white-space: nowrap;
  transition: background .15s, transform .15s;
}
.sp-cta:hover, .sp-parent:hover { background: #7C2D12; transform: translateY(-1px); }

/* ── Hero ─────────────────────────────────────────────── */
.sp-hero {
  position: relative;
  overflow: hidden;
  padding: 48px 24px 26px;
  background: linear-gradient(180deg, #F5EFE6 0%, #FAF8F5 62%, #FAF8F5 100%);
  border-bottom: 1px solid rgba(231, 229, 228, .7);
}
.sp-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .035;
  background-image: radial-gradient(circle at 1px 1px, #78350F 1px, transparent 0);
  background-size: 24px 24px;
}
.sp-hero-inner {
  position: relative;
  z-index: 1;
  max-width: 1080px;
  margin: 0 auto;
  text-align: center;
}
.sp-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  border: 1px solid #FDE68A;
  border-radius: 999px;
  background: rgba(254, 243, 199, .75);
  color: #92400E;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .01em;
}
.sp-badge svg { width: 13px; height: 13px; color: var(--sp-amber-mid); }
.sp-hero h1 {
  max-width: 900px;
  margin: 18px auto 16px;
  font-size: clamp(2rem, 4.7vw, 3.45rem);
  line-height: 1.22;
  letter-spacing: -.055em;
  font-weight: 800;
  color: var(--sp-ink);
  word-break: keep-all;
  overflow-wrap: anywhere;
}
.sp-hero h1 em {
  font-style: normal;
  color: var(--sp-amber-dark);
  text-decoration: underline;
  text-decoration-color: #FCD34D;
  text-decoration-thickness: 5px;
  text-underline-offset: 8px;
  text-decoration-skip-ink: none;
}
.sp-lead {
  max-width: 650px;
  margin: 0 auto;
  color: #57534E;
  font-size: 15.5px;
  line-height: 1.85;
  word-break: keep-all;
}
.sp-search {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 680px;
  margin: 26px auto 0;
  border: 1px solid var(--sp-line-strong);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 5px 18px rgba(120, 53, 15, .07);
  transition: border-color .15s, box-shadow .15s;
}
.sp-search:focus-within {
  border-color: var(--sp-amber);
  box-shadow: 0 0 0 3px rgba(251, 191, 36, .25);
}
.sp-search svg {
  width: 18px;
  height: 18px;
  margin-left: 16px;
  flex: 0 0 auto;
  color: #A8A29E;
}
.sp-search input {
  width: 100%;
  min-width: 0;
  padding: 14px 16px 14px 10px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--sp-ink);
  font-size: 13px;
}
.sp-search input::placeholder { color: #A8A29E; }
.sp-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 4px 8px;
  max-width: 700px;
  margin: 11px auto 0;
  color: #78716C;
  font-size: 10.5px;
}
.sp-tags > span { color: #A8A29E; font-weight: 600; }
.sp-tags a {
  padding: 3px 2px;
  color: #57534E;
  transition: color .15s;
}
.sp-tags a:hover { color: var(--sp-amber-dark); text-decoration: underline; }
.sp-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  max-width: 790px;
  margin: 28px auto 0;
  padding-top: 20px;
  border-top: 1px solid rgba(214, 211, 209, .8);
}
.sp-stat { padding: 7px 10px; }
.sp-stat b {
  display: block;
  color: var(--sp-ink);
  font-size: 1.45rem;
  line-height: 1.25;
  font-weight: 800;
  letter-spacing: -.04em;
  font-variant-numeric: tabular-nums;
}
.sp-stat span {
  display: block;
  margin-top: 2px;
  color: var(--sp-muted);
  font-size: 10.5px;
  font-weight: 500;
}
.sp-stat:last-child b { color: var(--sp-green); }

/* ── Section / notes ─────────────────────────────────── */
.sp-section {
  max-width: 1240px;
  margin: 0 auto;
  padding: 54px 24px 0;
}
.sp-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}
.sp-eyebrow {
  margin: 0 0 7px;
  color: var(--sp-amber-dark);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .13em;
  text-transform: uppercase;
}
.sp-section h2, .sp-page-head h1, .sp-about-teaser h2 {
  margin: 0;
  color: var(--sp-ink);
  font-size: clamp(1.35rem, 2.4vw, 1.85rem);
  line-height: 1.3;
  letter-spacing: -.045em;
  font-weight: 800;
  word-break: keep-all;
}
.sp-section-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.sp-count { color: var(--sp-faint); font-size: 11px; white-space: nowrap; }
.sp-section-link, .sp-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--sp-amber-dark);
  font-size: 11.5px;
  font-weight: 700;
  white-space: nowrap;
}
.sp-section-link:hover, .sp-link:hover { text-decoration: underline; }
.sp-chips {
  display: flex;
  align-items: center;
  gap: 2px;
  width: max-content;
  max-width: 100%;
  margin: 0 0 18px;
  padding: 4px;
  overflow-x: auto;
  border: 1px solid var(--sp-line);
  border-radius: 12px;
  background: #F2EFEA;
  scrollbar-width: none;
}
.sp-chips::-webkit-scrollbar { display: none; }
.sp-chip {
  flex: 0 0 auto;
  padding: 7px 11px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #57534E;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: background .15s, color .15s, box-shadow .15s;
}
.sp-chip:hover { color: var(--sp-ink); }
.sp-chip.on {
  background: #fff;
  color: var(--sp-ink);
  box-shadow: 0 1px 4px rgba(41, 37, 36, .09);
}
.sp-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.sp-latest-layout {
  display: grid;
  grid-template-columns: minmax(0, 2.1fr) minmax(260px, .9fr);
  gap: 18px;
  align-items: stretch;
}
.sp-latest-layout .sp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.sp-side-note {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
  padding: 23px;
  border: 1px solid #44403C;
  border-radius: var(--sp-radius);
  background: #292524;
  color: #FAF8F5;
  box-shadow: 0 8px 24px rgba(41, 37, 36, .12);
}
.sp-side-eyebrow {
  margin: 0 0 12px;
  color: #FCD34D;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.sp-side-note blockquote {
  margin: 0;
  color: #FAF8F5;
  font-size: 16px;
  line-height: 1.7;
  letter-spacing: -.035em;
  font-weight: 700;
  word-break: keep-all;
}
.sp-side-sign { margin: 0 0 12px; color: #A8A29E; font-size: 10.5px; }
.sp-side-link { color: #FCD34D; font-size: 10.5px; font-weight: 700; }
.sp-side-link:hover { text-decoration: underline; }
.sp-post {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--sp-line);
  border-radius: var(--sp-radius);
  background: var(--sp-paper);
  box-shadow: 0 2px 0 rgba(120, 53, 15, .02);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.sp-post:hover {
  transform: translateY(-3px);
  border-color: #FCD34D;
  box-shadow: var(--sp-shadow);
}
.sp-thumb {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 148px;
  padding: 17px 19px;
  overflow: hidden;
  background:
    radial-gradient(circle at 88% 10%, rgba(255, 255, 255, .22), transparent 34%),
    linear-gradient(135deg, #B45309, #92400E);
}
.sp-thumb::after {
  content: "";
  position: absolute;
  right: -26px;
  bottom: -38px;
  width: 128px;
  height: 128px;
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 50%;
}
.sp-thumb--1 { background: radial-gradient(circle at 88% 10%, rgba(255,255,255,.2), transparent 34%), linear-gradient(135deg, #047857, #064E3B); }
.sp-thumb--2 { background: radial-gradient(circle at 88% 10%, rgba(255,255,255,.2), transparent 34%), linear-gradient(135deg, #1D4ED8, #1E3A8A); }
.sp-thumb span {
  position: relative;
  z-index: 1;
  color: rgba(255, 255, 255, .78);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.sp-thumb b {
  position: relative;
  z-index: 1;
  max-width: 90%;
  color: #fff;
  font-size: 19px;
  line-height: 1.35;
  letter-spacing: -.035em;
  font-weight: 800;
  word-break: keep-all;
}
.sp-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.sp-post-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 7px;
  padding: 16px 19px 17px;
}
.sp-post-body h3 {
  margin: 0;
  color: var(--sp-ink);
  font-size: 15.5px;
  line-height: 1.45;
  letter-spacing: -.03em;
  font-weight: 800;
  word-break: keep-all;
}
.sp-post-body p {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: var(--sp-muted);
  font-size: 11.5px;
  line-height: 1.7;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.sp-post-meta {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  margin-top: auto;
  padding-top: 11px;
  border-top: 1px solid #F5F5F4;
  color: var(--sp-faint);
  font-size: 10px;
}
.sp-post-meta span:first-child {
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--sp-amber-pale);
  color: var(--sp-amber-dark);
  font-weight: 700;
}
.sp-post-arrow { margin-left: auto; color: var(--sp-amber); font-size: 14px; line-height: 1; }
.sp-empty {
  margin: 18px 0 0;
  padding: 30px 20px;
  border: 1px dashed var(--sp-line-strong);
  border-radius: 14px;
  background: rgba(255, 255, 255, .55);
  color: var(--sp-muted);
  font-size: 12px;
  text-align: center;
}
.sp-empty a { color: var(--sp-amber-dark); font-weight: 700; }

/* ── Topic cards ─────────────────────────────────────── */
.sp-topics {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}
.sp-topic {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-height: 132px;
  padding: 16px;
  border: 1px solid var(--sp-line);
  border-radius: 14px;
  background: var(--sp-paper);
  transition: transform .15s, border-color .15s, box-shadow .15s;
}
.sp-topic:hover { transform: translateY(-2px); border-color: #FCD34D; box-shadow: var(--sp-shadow); }
.sp-topic-icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: var(--sp-amber-pale);
  color: var(--sp-amber-dark);
  font-size: 13px;
}
.sp-topic:nth-child(2) .sp-topic-icon { background: var(--sp-green-soft); color: var(--sp-green); }
.sp-topic:nth-child(3) .sp-topic-icon { background: var(--sp-blue-soft); color: var(--sp-blue); }
.sp-topic:nth-child(4) .sp-topic-icon { background: var(--sp-rose-soft); color: var(--sp-rose); }
.sp-topic:nth-child(5) .sp-topic-icon { background: var(--sp-violet-soft); color: var(--sp-violet); }
.sp-topic b { color: var(--sp-ink); font-size: 12.5px; letter-spacing: -.02em; }
.sp-topic p { margin: 0; color: var(--sp-muted); font-size: 10.5px; line-height: 1.6; word-break: keep-all; }

/* ── Course band / cards ─────────────────────────────── */
.sp-course-band {
  margin-top: 54px;
  padding: 44px 24px 48px;
  border-top: 1px solid var(--sp-line);
  border-bottom: 1px solid var(--sp-line);
  background: rgba(255, 255, 255, .52);
}
.sp-course-inner { max-width: 1240px; margin: 0 auto; }
.sp-course-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}
.sp-course-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 20px;
  border: 1px solid var(--sp-line);
  border-radius: var(--sp-radius);
  background: var(--sp-paper);
  box-shadow: 0 2px 0 rgba(120, 53, 15, .02);
  transition: transform .16s, border-color .16s, box-shadow .16s;
}
a.sp-course-card:hover { transform: translateY(-3px); border-color: #FCD34D; box-shadow: var(--sp-shadow); }
.sp-course-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--sp-amber-pale);
  color: var(--sp-amber-dark);
  font-size: 11px;
  font-weight: 800;
}
.sp-course-card h3 {
  margin: 0;
  color: var(--sp-ink);
  font-size: 15px;
  line-height: 1.45;
  letter-spacing: -.03em;
  font-weight: 800;
  word-break: keep-all;
}
.sp-course-card p { margin: 0; color: var(--sp-muted); font-size: 11px; line-height: 1.7; }
.sp-course-meta {
  margin-top: auto;
  padding-top: 9px;
  border-top: 1px solid #F5F5F4;
  color: var(--sp-faint);
  font-size: 10px;
}
.sp-status {
  align-self: flex-start;
  padding: 3px 7px;
  border-radius: 5px;
  background: var(--sp-green-soft);
  color: #065F46;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: .02em;
}
.sp-soon { margin: 0; color: var(--sp-faint); font-size: 10.5px; }

/* ── About teaser ───────────────────────────────────── */
.sp-about-teaser {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  align-items: center;
  gap: 24px;
  max-width: 1240px;
  margin: 0 auto;
  padding: 48px 24px 52px;
}
.sp-about-mark {
  display: grid;
  place-items: center;
  width: 92px;
  height: 92px;
  border: 1px solid #FDE68A;
  border-radius: 22px;
  background: var(--sp-amber-pale);
  color: var(--sp-amber-dark);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -.06em;
}
.sp-about-teaser h2 { margin-bottom: 8px; }
.sp-about-teaser p { max-width: 700px; margin: 0 0 10px; color: var(--sp-muted); font-size: 12.5px; line-height: 1.8; word-break: keep-all; }
.sp-about-teaser .sp-link { font-size: 11px; }

/* ── Buttons / actions ────────────────────────────────── */
.sp-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.sp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 38px;
  padding: 9px 15px;
  border: 1px solid var(--sp-amber-dark);
  border-radius: 9px;
  background: var(--sp-amber-dark);
  color: #fff;
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1.2;
  transition: background .15s, transform .15s;
}
.sp-btn:hover { background: #7C2D12; transform: translateY(-1px); }
.sp-btn--primary { background: var(--sp-amber-dark); border-color: var(--sp-amber-dark); }
.sp-btn--ghost { background: #fff; border-color: var(--sp-line-strong); color: #57534E; }
.sp-btn--ghost:hover { border-color: var(--sp-amber); color: var(--sp-amber-dark); background: var(--sp-amber-pale); }

/* ── Generic pages (about / courses) ─────────────────── */
.sp-page {
  max-width: 1060px;
  margin: 0 auto;
  padding: 42px 24px 64px;
}
.sp-page-head {
  max-width: 800px;
  margin-bottom: 30px;
}
.sp-page-head h1 {
  margin: 0 0 14px;
  font-size: clamp(1.8rem, 3.5vw, 2.7rem);
  line-height: 1.25;
  letter-spacing: -.055em;
}
.sp-page-head .sp-lead { margin: 0; }
.sp-subhead {
  margin: 0 0 18px;
  color: var(--sp-ink);
  font-size: clamp(1.3rem, 2.3vw, 1.65rem);
  line-height: 1.35;
  letter-spacing: -.045em;
  font-weight: 800;
  word-break: keep-all;
}
.sp-profile {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 24px;
  padding: 25px;
  border: 1px solid var(--sp-line);
  border-radius: 20px;
  background: var(--sp-paper);
  box-shadow: var(--sp-shadow);
}
.sp-profile-mark {
  display: grid;
  place-items: center;
  width: 92px;
  height: 92px;
  border-radius: 20px;
  background: linear-gradient(145deg, #C2610A, #92400E);
  color: #FEF3C7;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -.06em;
}
.sp-profile h2 { margin: 0 0 9px; font-size: 20px; letter-spacing: -.04em; }
.sp-profile p { margin: 0 0 9px; color: #57534E; font-size: 12.5px; line-height: 1.85; word-break: keep-all; }
.sp-profile p:last-child { margin-bottom: 0; }
.sp-values {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.sp-value {
  padding: 18px;
  border: 1px solid var(--sp-line);
  border-radius: 16px;
  background: var(--sp-paper);
}
.sp-value > span { color: var(--sp-amber-dark); font-size: 9px; font-weight: 800; letter-spacing: .1em; }
.sp-value h3 { margin: 7px 0 6px; font-size: 14.5px; letter-spacing: -.03em; }
.sp-value p { margin: 0; color: var(--sp-muted); font-size: 11px; line-height: 1.75; word-break: keep-all; }
.sp-note {
  padding: 18px 20px;
  border: 1px solid #FDE68A;
  border-radius: 16px;
  background: var(--sp-amber-pale);
  color: #57534E;
  font-size: 12px;
  line-height: 1.85;
}
.sp-note b { color: var(--sp-amber-dark); }
.sp-note a { color: var(--sp-amber-dark); font-weight: 700; }
.sp-contact {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 24px;
  border: 1px solid var(--sp-line);
  border-radius: 18px;
  background: var(--sp-paper);
}
.sp-contact h2 { margin: 0 0 4px; font-size: 18px; letter-spacing: -.04em; }
.sp-contact p { margin: 0; color: var(--sp-muted); font-size: 12px; }

/* ── Courses page ────────────────────────────────────── */
.sp-course-card.sp-course-card--wide { padding: 24px; gap: 12px; }
.sp-course-card--wide h2 { margin: 0; font-size: 22px; letter-spacing: -.04em; }
.sp-course-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.sp-course-card--wide > p { font-size: 12.5px; line-height: 1.85; }
.sp-toc {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 20px;
  margin: 0;
  padding: 15px 18px;
  border: 1px solid var(--sp-line);
  border-radius: 12px;
  background: #FAFAF9;
  counter-reset: toc;
  list-style: none;
}
.sp-toc li { position: relative; padding-left: 22px; color: #57534E; font-size: 11.5px; }
.sp-toc li::before {
  counter-increment: toc;
  content: "0" counter(toc);
  position: absolute;
  left: 0;
  color: var(--sp-amber);
  font-size: 9px;
  font-weight: 800;
  top: 2px;
}
.sp-course-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.sp-course-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 16px;
  border: 1px solid var(--sp-line);
  border-radius: 11px;
  background: var(--sp-paper);
  font-size: 12px;
}
.sp-course-list b { font-size: 12.5px; letter-spacing: -.02em; }
.sp-course-list span { color: var(--sp-faint); font-size: 10.5px; text-align: right; }
.sp-course-card--wide .sp-soon { margin-top: 2px; }

/* ── Article ─────────────────────────────────────────── */
.sp-article {
  display: block;
  max-width: 900px;
  margin: 0 auto;
  padding: 36px 24px 64px;
}
.sp-back {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 20px;
  color: var(--sp-muted);
  font-size: 11px;
  font-weight: 600;
}
.sp-back:hover { color: var(--sp-amber-dark); }
.sp-article-head {
  padding: 28px 30px 26px;
  border: 1px solid var(--sp-line);
  border-bottom: 0;
  border-radius: 22px 22px 0 0;
  background: var(--sp-paper);
}
.sp-article-head h1 {
  margin: 0 0 12px;
  color: var(--sp-ink);
  font-size: clamp(1.55rem, 3.8vw, 2.3rem);
  line-height: 1.35;
  letter-spacing: -.05em;
  word-break: keep-all;
}
.sp-article-desc { margin: 0 0 15px; color: var(--sp-muted); font-size: 13px; line-height: 1.8; word-break: keep-all; }
.sp-article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  color: var(--sp-faint);
  font-size: 10.5px;
}
.sp-article-meta span:first-child { color: var(--sp-amber-dark); font-weight: 700; }
.sp-prose {
  padding: 30px;
  border: 1px solid var(--sp-line);
  border-radius: 0 0 22px 22px;
  background: var(--sp-paper);
  color: var(--sp-text);
  font-size: 14.5px;
  line-height: 1.95;
  word-break: keep-all;
}
.sp-prose > p:first-child { margin-top: 0; }
.sp-prose h2 {
  margin: 36px 0 12px;
  color: var(--sp-ink);
  font-size: 20px;
  line-height: 1.4;
  letter-spacing: -.04em;
}
.sp-prose h3 { margin: 26px 0 8px; font-size: 16px; letter-spacing: -.03em; }
.sp-prose p { margin: 0 0 16px; }
.sp-prose ul, .sp-prose ol { margin: 0 0 18px; padding-left: 22px; }
.sp-prose li { margin: 5px 0; }
.sp-prose strong { color: var(--sp-ink); font-weight: 700; }
.sp-prose a { color: var(--sp-amber-dark); text-decoration: underline; text-underline-offset: 3px; }
.sp-prose blockquote {
  margin: 26px 0;
  padding: 16px 20px;
  border-left: 3px solid #F59E0B;
  border-radius: 0 10px 10px 0;
  background: var(--sp-amber-pale);
  color: #57534E;
  font-size: 14px;
}
.sp-prose blockquote p { margin: 0; }
.sp-prose .sp-note { margin: 24px 0; }
.sp-prose code {
  padding: 2px 5px;
  border-radius: 4px;
  background: #F5F5F4;
  color: #9A3412;
  font-size: .9em;
}
.sp-prose pre {
  overflow-x: auto;
  margin: 20px 0;
  padding: 16px;
  border-radius: 10px;
  background: #1C1917;
  color: #E7E5E4;
  font-size: 12px;
  line-height: 1.7;
}
.sp-prose table { width: 100%; border-collapse: collapse; margin: 20px 0; font-size: 12px; }
.sp-prose th, .sp-prose td { padding: 9px 10px; border: 1px solid var(--sp-line); text-align: left; }
.sp-prose th { background: #FAFAF9; color: var(--sp-ink); }
.sp-author {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
  padding: 16px 18px;
  border: 1px solid var(--sp-line);
  border-radius: 14px;
  background: rgba(255, 255, 255, .6);
}
.sp-author-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border-radius: 10px;
  background: var(--sp-amber-dark);
  color: #FEF3C7;
  font-size: 10px;
  font-weight: 800;
}
.sp-author b { display: block; font-size: 12px; }
.sp-author p { margin: 2px 0 0; color: var(--sp-muted); font-size: 10.5px; }
.sp-author a { color: var(--sp-amber-dark); font-weight: 700; }
.sp-post-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--sp-line);
  font-size: 11px;
  font-weight: 600;
  color: var(--sp-muted);
}
.sp-post-nav a:hover { color: var(--sp-amber-dark); }

/* ── Footer ──────────────────────────────────────────── */
.sp-footer {
  margin-top: 20px;
  border-top: 1px solid var(--sp-line);
  background: #fff;
}
.sp-footer-top, .sp-footer > nav, .sp-footer-bottom {
  max-width: 1240px;
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}
.sp-footer-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; padding-top: 28px; padding-bottom: 20px; }
.sp-footer-top p { margin: 8px 0 0; color: var(--sp-faint); font-size: 10.5px; }
.sp-footer > nav {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  padding-top: 14px;
  padding-bottom: 14px;
  border-top: 1px solid #F5F5F4;
  color: var(--sp-muted);
  font-size: 10.5px;
  font-weight: 600;
}
.sp-footer > nav a:hover { color: var(--sp-amber-dark); }
.sp-footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-top: 12px;
  padding-bottom: 22px;
  border-top: 1px solid #F5F5F4;
  color: var(--sp-faint);
  font-size: 9.5px;
}
.sp-footer-bottom a { color: var(--sp-muted); }
.sp-footer .sp-brand-copy b { font-size: 14px; }
.sp-footer .sp-mark { width: 30px; height: 30px; border-radius: 9px; }
.sp-footer .sp-mark svg { width: 17px; height: 17px; }

/* ── Responsive ──────────────────────────────────────── */
@media (max-width: 1000px) {
  .sp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sp-topics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .sp-course-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 800px) {
  .sp-latest-layout { grid-template-columns: 1fr; }
  .sp-header-inner { min-height: 64px; padding: 10px 16px; flex-wrap: wrap; gap: 8px 14px; }
  .sp-nav { order: 3; width: 100%; gap: 18px; overflow-x: auto; padding: 7px 0 2px; border-top: 1px solid rgba(231,229,228,.75); font-size: 12px; scrollbar-width: none; }
  .sp-nav::-webkit-scrollbar { display: none; }
  .sp-header-actions .sp-rss { display: none; }
  .sp-cta, .sp-parent { padding: 8px 10px; font-size: 10.5px; }
  .sp-hero { padding: 36px 16px 22px; }
  .sp-hero h1 { font-size: clamp(1.75rem, 7.2vw, 2.7rem); }
  .sp-lead { font-size: 14px; }
  .sp-section { padding: 40px 16px 0; }
  .sp-section-head { align-items: flex-start; flex-direction: column; gap: 8px; }
  .sp-section-meta { justify-content: flex-start; }
  .sp-topics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sp-course-band { padding: 36px 16px; }
  .sp-course-grid { grid-template-columns: 1fr; }
  .sp-about-teaser { grid-template-columns: 64px minmax(0, 1fr); gap: 14px; padding: 36px 16px 42px; }
  .sp-about-mark { width: 64px; height: 64px; border-radius: 16px; font-size: 17px; }
  .sp-page { padding: 30px 16px 48px; }
  .sp-profile { grid-template-columns: 1fr; gap: 14px; padding: 20px; }
  .sp-profile-mark { width: 64px; height: 64px; border-radius: 16px; font-size: 17px; }
  .sp-values { grid-template-columns: 1fr; }
  .sp-contact { align-items: flex-start; flex-direction: column; padding: 20px; }
  .sp-toc { grid-template-columns: 1fr; }
  .sp-course-list li { align-items: flex-start; flex-direction: column; gap: 3px; }
  .sp-course-list span { text-align: left; }
  .sp-article { padding: 26px 12px 48px; }
  .sp-article-head { padding: 22px 20px 20px; border-radius: 18px 18px 0 0; }
  .sp-prose { padding: 22px 20px; border-radius: 0 0 18px 18px; font-size: 14px; }
  .sp-footer-top, .sp-footer > nav, .sp-footer-bottom { padding-left: 16px; padding-right: 16px; }
  .sp-footer-bottom { flex-direction: column; gap: 3px; }
  .sp-stats { grid-template-columns: repeat(4, 1fr); }
  .sp-stat b { font-size: 1.2rem; }
  .sp-stat span { font-size: 9.5px; }
}
@media (max-width: 640px) {
  .sp-grid, .sp-latest-layout .sp-grid { grid-template-columns: 1fr; }
  .sp-hero h1 { word-break: normal; }
  .sp-side-note { padding: 20px; }
  .sp-side-note blockquote { font-size: 15px; }
}
@media (max-width: 520px) {
  .sp-brand-copy small { display: none; }
  .sp-header-inner { min-height: 58px; }
  .sp-brand-copy b { font-size: 15px; }
  .sp-mark { width: 34px; height: 34px; border-radius: 10px; }
  .sp-badge { font-size: 9.5px; padding: 5px 9px; }
  .sp-stats { grid-template-columns: repeat(2, 1fr); gap: 0; }
  .sp-stat { padding: 9px 8px; }
  .sp-stat:nth-child(3), .sp-stat:nth-child(4) { border-top: 1px solid #F5F5F4; }
  .sp-tags { font-size: 9.5px; }
  .sp-search input { font-size: 12px; padding-right: 10px; }
  .sp-topics { grid-template-columns: 1fr; }
  .sp-topic { min-height: auto; }
  .sp-article-head h1 { font-size: 1.55rem; }
  .sp-post-body h3 { font-size: 15px; }
  .sp-section h2 { font-size: 1.45rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
