/* =========================================================
   ARCHIVE(프로젝트 · 수업 자료실) · PROJECT 페이지 전용 스타일
   - light.css 뒤에 불러온다. 색·글꼴은 light.css :root 토큰만 쓴다 (새 색 없음).
   - 클래스는 모두 ax- 로 시작 (다른 페이지와 겹치지 않게).
   - 간격 8px 단위, 버튼·탭 44px 이상, 본문 16px 이상. 줄바꿈은 keep-all + 구절 묶음(.ax-nw).
   ========================================================= */

.ax-nw { white-space: nowrap; }
[data-archive-app] [tabindex="-1"]:focus { outline: none; }
.ax-ph { display: inline-block; max-width: 100%; }   /* 구절 묶음: 통째로 다음 줄로, 한 줄보다 길 때만 안에서 줄바꿈 */
.ax-ic { width: 20px; height: 20px; flex: none; display: block; }
.ax-eyebrow { font-size: 15px; font-weight: 600; line-height: 1.5; color: var(--brand); letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }

/* ---------- 머리말: 회차 화면에서는 큰 ARCHIVE만 남기고 짧게 ---------- */
.ax-view-project .page-hero, .ax-in-lesson .page-hero { padding-bottom: 32px; }
.ax-view-project .page-hero .page-lead, .ax-in-lesson .page-hero .page-lead { display: none; }
@media (max-width: 767px) {
  .ax-view-project .page-hero, .ax-in-lesson .page-hero { padding-top: calc(var(--header-h) + 40px); padding-bottom: 24px; }
  .ax-view-project .page-hero .page-sub, .ax-in-lesson .page-hero .page-sub { font-size: 17px; margin-top: 8px; }
}
.course-hub { padding-top: 0; }

/* ---------- 공통 조각 ---------- */
.ax-chip {
  display: inline-flex; align-items: center; gap: 4px; height: 32px; padding: 0 12px; border-radius: 8px;
  font-size: 14px; font-weight: 700; line-height: 1; white-space: nowrap; letter-spacing: -0.01em;
  background: #fff; color: var(--ink-3);
}
.ax-chip .ax-ic { width: 16px; height: 16px; stroke-width: 2.5; }
.ax-chip.is-now { background: var(--brand); color: var(--brand-on); }
.ax-chip.is-open { color: var(--brand); box-shadow: inset 0 0 0 1.5px var(--brand-tint-2); }
.ax-chip.is-done { background: var(--brand-tint-2); color: var(--brand); }
.ax-chip.is-soon { background: transparent; color: var(--ink-3); box-shadow: inset 0 0 0 1px var(--hair); font-weight: 600; }

.ax-goal { display: flex; gap: 12px; align-items: baseline; font-size: 17px; line-height: 1.6; color: var(--ink-2); max-width: 40em; text-wrap: pretty; }
.ax-goal-k { flex: none; font-size: 14px; font-weight: 700; color: var(--brand); padding: 2px 8px; border-radius: 6px; background: var(--brand-tint-2); line-height: 1.4; }
.ax-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ax-actions .btn .ax-ic { width: 18px; height: 18px; }

/* 내 진도: 회차 수만큼 칸 */
.ax-prog { display: grid; gap: 8px; }
.ax-prog-top { display: flex; justify-content: space-between; align-items: baseline; font-size: 15px; color: var(--ink-2); font-weight: 600; }
.ax-prog-top b { font-size: 17px; color: var(--ink); font-variant-numeric: tabular-nums; }
.ax-seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; }
.ax-seg li { height: 8px; border-radius: 4px; background: var(--bg-deep); }
.ax-seg li.is-done { background: var(--brand); }
.ax-seg li.is-now, .ax-seg li.is-open { background: var(--brand-tint-2); box-shadow: inset 0 0 0 1.5px rgba(var(--brand-rgb), .35); }
.ax-seg li.is-cur { box-shadow: inset 0 0 0 2px var(--brand); }
.ax-fine { font-size: 14px; color: var(--ink-3); line-height: 1.5; }

/* ---------- 프로젝트 화면 ---------- */
.ax-notice { display: flex; gap: 8px 16px; align-items: baseline; padding: 16px 20px; margin-bottom: 24px; border-radius: 16px; background: var(--brand-tint); font-size: 16px; line-height: 1.6; }
.ax-notice > b { flex: none; color: var(--brand); font-size: 15px; }
.ax-notice ul { display: grid; gap: 4px; min-width: 0; }
.ax-notice li { display: flex; gap: 12px; align-items: baseline; }
.ax-notice time { flex: none; color: var(--ink-3); font-size: 15px; font-variant-numeric: tabular-nums; }
.ax-notice span { text-wrap: pretty; }
@media (max-width: 599px) {
  .ax-notice { display: grid; gap: 4px; padding: 16px; }
  .ax-notice li { display: grid; gap: 0; }
}

/* 이번 주 수업 (코발트 카드) */
.ax-week { border-radius: 28px; background: var(--brand); color: var(--brand-on); padding: clamp(24px, 3.5vw, 40px); display: grid; gap: 32px; }
.ax-week-body { display: grid; gap: 16px; }
.ax-week .ax-eyebrow { color: var(--brand-on-2); }
.ax-week-title { font-size: clamp(28px, 3.4vw, 44px); font-weight: 800; letter-spacing: -0.045em; line-height: 1.18; text-wrap: balance; }
.ax-week .ax-goal { color: rgba(255,255,255,.9); }
.ax-week .ax-goal-k { background: rgba(255,255,255,.16); color: #fff; }
.ax-week .ax-actions { margin-top: 8px; }
.ax-week .btn-lg { height: 56px; padding: 0 24px; font-size: 17px; border-radius: 16px; }
.ax-week .btn-light { background: #fff; color: var(--brand); }
.ax-week .btn-light:hover { background: var(--brand-tint); }
.btn-ghost { background: rgba(255,255,255,.14); color: #fff; }
.btn-ghost:hover { background: rgba(255,255,255,.22); }
.ax-week-todo { display: grid; gap: 8px; padding-top: 24px; box-shadow: 0 -1px 0 rgba(255,255,255,.2); }
.ax-week-todo-h { display: flex; justify-content: space-between; align-items: baseline; font-weight: 700; font-size: 16px; }
.ax-week-todo-h b { font-weight: 600; color: var(--brand-on-2); font-variant-numeric: tabular-nums; font-size: 15px; }
.ax-mini { display: grid; gap: 8px; counter-reset: m; }
.ax-mini li { counter-increment: m; display: grid; grid-template-columns: 24px auto 1fr; gap: 12px; align-items: center; font-size: 16px; color: rgba(255,255,255,.9); }
.ax-mini li::before { content: counter(m); width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: #fff; color: var(--brand); font-size: 13px; font-weight: 800; }
.ax-mini li.is-on::before { content: "✓"; }
.ax-mini code { font: 600 14px/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; padding: 4px 8px; border-radius: 8px; background: rgba(255,255,255,.14); color: #fff; white-space: nowrap; }
.ax-mini span { min-width: 0; }
.ax-more { justify-self: start; display: inline-flex; align-items: center; gap: 4px; min-height: 44px; color: #fff; font-weight: 700; text-decoration: none; }
.ax-more:hover { text-decoration: underline; text-underline-offset: 4px; }
.ax-more .ax-ic { width: 18px; height: 18px; }
@media (min-width: 1100px) {
  .ax-week { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 40px; align-items: start; }
  .ax-week-todo { padding-top: 0; padding-left: 40px; box-shadow: -1px 0 0 rgba(255,255,255,.2); }
  .ax-week-title { font-size: clamp(28px, 2.5vw, 38px); }
}
/* 휴대폰: 행동 버튼은 한 줄을 나눠 쓰고, 안 들어가면 꽉 찬 폭으로 */
@media (max-width: 599px) {
  .ax-week .ax-actions .btn, .ax-lhead .ax-actions > * { flex: 1 1 auto; padding-inline: 16px; }
  .ax-week .btn-lg { height: 52px; font-size: 16px; }
}

/* 이어서 보기 */
.ax-resume { display: grid; grid-template-columns: 1fr auto; align-items: center; column-gap: 16px; padding: 16px 20px; min-height: 64px; border-radius: 20px; background: var(--brand-tint); color: var(--ink); text-decoration: none; transition: background-color .2s; }
.ax-resume:hover { background: var(--brand-tint-2); }
.ax-resume-k { grid-column: 1; font-size: 14px; font-weight: 700; color: var(--brand); }
.ax-resume b { grid-column: 1; font-size: 17px; letter-spacing: -0.02em; }
.ax-resume small { grid-column: 1; font-size: 14px; color: var(--ink-3); }
.ax-resume .ax-ic { grid-column: 2; grid-row: 1 / span 3; color: var(--brand); }

/* 회차 목록 */
.ax-lessons { margin-top: 32px; }
.ax-sec-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 16px; margin-bottom: 16px; }
.ax-sec-head h2 { font-size: clamp(22px, 2.2vw, 28px); letter-spacing: -0.035em; }
.ax-sec-head p { font-size: 15px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.ax-list { display: grid; gap: 8px; }
.ax-row {
  display: grid; grid-template-columns: 56px minmax(0, 1fr) auto 24px; align-items: center; gap: 4px 16px;
  min-height: 72px; padding: 16px 20px 16px 24px; border-radius: 20px; background: var(--bg-alt); color: inherit; text-decoration: none;
  transition: background-color .2s;
}
a.ax-row:hover { background: var(--brand-tint-2); }
a.ax-row:hover .ax-row-go { transform: translateX(2px); color: var(--brand); }
.ax-row-n { font-size: 20px; font-weight: 800; color: var(--brand); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.ax-row-n .ax-ic { width: 22px; height: 22px; }
.ax-row-t { display: grid; gap: 2px; min-width: 0; }
.ax-row-t b { font-size: 18px; font-weight: 700; letter-spacing: -0.025em; line-height: 1.4; text-wrap: balance; }
.ax-row-t small { font-size: 14px; color: var(--ink-3); line-height: 1.45; }
.ax-row-t .ax-row-meta { color: var(--ink-2); font-weight: 500; }
.ax-row-go { color: var(--ink-3); display: grid; place-items: center; transition: transform .2s var(--ease), color .2s; }
.ax-row.is-now { background: var(--brand-tint); box-shadow: inset 0 0 0 1.5px rgba(var(--brand-rgb), .28); }
.ax-row.is-soon { background: transparent; box-shadow: inset 0 0 0 1px var(--hair); }
.ax-row.is-soon .ax-row-n { color: var(--ink-3); }
.ax-row.is-soon .ax-row-t b { color: var(--ink-2); font-weight: 600; }
.ax-row.is-soon .ax-row-go .ax-ic { width: 16px; height: 16px; }
@media (max-width: 599px) {
  .ax-row { grid-template-columns: 40px minmax(0, 1fr) 20px; grid-template-areas: "n t g" "n c g"; padding: 16px 16px 16px 16px; gap: 8px 12px; align-items: start; }
  .ax-row-n { grid-area: n; font-size: 18px; line-height: 1.4; }
  .ax-row-t { grid-area: t; }
  .ax-row .ax-chip { grid-area: c; justify-self: start; height: 28px; padding: 0 10px; font-size: 13px; }
  .ax-row-go { grid-area: g; align-self: center; }
  .ax-row-t b { font-size: 17px; }
}

.ax-meta { display: grid; gap: 8px; }
.ax-meta div { display: grid; grid-template-columns: 4.5em 1fr; gap: 12px; align-items: baseline; }
.lang-en .ax-meta div { grid-template-columns: 5.5em 1fr; }
.ax-meta dt { font-size: 15px; color: var(--ink-3); }
.ax-meta dd { font-size: 16px; font-weight: 600; line-height: 1.55; }
/* ---------- 회차 화면 ---------- */
.ax-lesson { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; align-items: start; }
.ax-lesson-main { display: grid; gap: 32px; min-width: 0; }
.ax-outline { display: none; }

/* 위쪽 고정 회차 줄 (넓은 화면 전까지) */
.ax-strip {
  position: sticky; top: var(--hdr, var(--header-h)); z-index: 20;
  display: flex; align-items: center; gap: 8px;
  margin-inline: calc(-1 * var(--gutter)); padding: 8px var(--gutter);
  background: rgba(255,255,255,.94); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 var(--hair);
}
.ax-strip-back { flex: none; display: inline-flex; align-items: center; gap: 4px; min-height: 44px; padding: 0 12px 0 8px; border-radius: 12px; background: var(--bg-alt); color: var(--ink); font-weight: 600; font-size: 15px; text-decoration: none; }
.ax-strip-back .ax-ic { width: 18px; height: 18px; color: var(--brand); }
.ax-pills { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; min-width: 0; padding: 2px; margin: -2px; }
.ax-pills::-webkit-scrollbar { display: none; }
.ax-pill { flex: none; display: inline-flex; align-items: center; justify-content: center; gap: 2px; min-width: 44px; height: 44px; padding: 0 8px; border-radius: 12px; font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; text-decoration: none; color: var(--brand); background: var(--bg-alt); }
.ax-pill .ax-ic { width: 14px; height: 14px; stroke-width: 3; }
.ax-pill[aria-current="page"] { background: var(--brand); color: var(--brand-on); }
.ax-pill.is-soon { color: var(--ink-3); background: transparent; box-shadow: inset 0 0 0 1px var(--hair); font-weight: 600; }
@media (max-height: 520px) and (orientation: landscape) { .ax-strip { position: static; } }
/* 좁은 폰: '목록' 글자는 숨기고(읽기 프로그램에는 남김) 회차 칸이 한 줄에 다 들어가게 */
@media (max-width: 389px) {
  .ax-strip-back { padding: 0; width: 44px; justify-content: center; }
  .ax-strip-back span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}

/* 넓은 화면: 왼쪽 고정 목차 */
@media (min-width: 1100px) {
  .ax-lesson { grid-template-columns: 264px minmax(0, 1fr); gap: 48px; }
  .ax-strip { display: none; }
  .ax-outline { display: grid; gap: 16px; position: sticky; top: calc(var(--hdr, var(--header-h)) + 24px); max-height: calc(100vh - var(--hdr, var(--header-h)) - 48px); overflow-y: auto; }
}
@media (min-width: 1280px) { .ax-lesson { grid-template-columns: 288px minmax(0, 1fr); gap: 64px; } }
.ax-back { justify-self: start; display: inline-flex; align-items: center; gap: 4px; min-height: 44px; padding: 0 16px 0 8px; margin-left: -8px; border-radius: 12px; color: var(--brand); font-weight: 600; text-decoration: none; }
.ax-back:hover { background: var(--bg-alt); }
.ax-back .ax-ic { width: 18px; height: 18px; }
.ax-outline-title { font-size: 20px; font-weight: 800; letter-spacing: -0.035em; line-height: 1.3; }
.ax-outline .ax-prog { padding: 16px; border-radius: 16px; background: var(--bg-alt); }
.ax-olist { display: grid; gap: 4px; }
.ax-olist a, .ax-olist > li > span { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; gap: 8px; align-items: start; min-height: 48px; padding: 12px 12px; border-radius: 12px; font-size: 15px; line-height: 1.45; text-decoration: none; color: var(--ink); }
.ax-olist a:hover { background: var(--bg-alt); }
.ax-olist a[aria-current="page"] { background: var(--brand-tint-2); }
.ax-olist a[aria-current="page"] .ax-ot { font-weight: 700; color: var(--brand-ink); }
.ax-on { font-weight: 800; color: var(--brand); font-variant-numeric: tabular-nums; }
.ax-ot { text-wrap: pretty; }
.ax-olist .is-soon { color: var(--ink-3); }
.ax-olist .is-soon .ax-on { color: var(--ink-3); }
.ax-ost { color: var(--ink-3); padding-top: 2px; }
.ax-ost .ax-ic { width: 16px; height: 16px; }
.ax-ost.is-done { color: var(--brand); }

/* 제목 · 목표 · 행동 */
.ax-lhead { display: grid; gap: 16px; }
.ax-ltitle { font-size: clamp(30px, 4vw, 52px); font-weight: 800; letter-spacing: -0.045em; line-height: 1.15; text-wrap: balance; margin-top: -8px; }
.ax-lhead .ax-actions { margin-top: 8px; }
.ax-done { display: inline-flex; align-items: center; gap: 12px; height: 52px; padding: 0 20px 0 16px; border-radius: 14px; background: var(--bg-alt); font-weight: 600; font-size: 16px; color: var(--ink); transition: background-color .2s, color .2s; }
.ax-done:hover { background: var(--brand-tint-2); }
.ax-box { width: 22px; height: 22px; flex: none; border-radius: 6px; display: grid; place-items: center; box-shadow: inset 0 0 0 2px var(--ink-3); background: #fff; color: transparent; transition: background-color .15s, box-shadow .15s; }
.ax-box .ax-ic { width: 16px; height: 16px; stroke-width: 3; }
.ax-done[aria-pressed="true"] { background: var(--brand-tint-2); color: var(--brand); }
.ax-done[aria-pressed="true"] .ax-box { background: var(--brand); box-shadow: none; color: #fff; }

/* 슬라이드 뷰어 */
.ax-viewer { border-radius: 24px; background: var(--bg-deep); overflow: hidden; scroll-margin-top: 72px; }   /* html의 scroll-padding(헤더 높이)에 더해짐 → 회차 줄만큼 */
@media (min-width: 1100px) { .ax-viewer { scroll-margin-top: 16px; } }
.ax-vbar { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px; background: var(--bg-alt); }
.ax-vbar-r { display: flex; align-items: center; gap: 4px; }
.ax-lang { display: inline-flex; padding: 4px; border-radius: 12px; background: #fff; gap: 2px; }
.ax-lang button { min-height: 44px; padding: 0 14px; border-radius: 9px; font-size: 15px; font-weight: 600; color: var(--ink-3); }
.ax-lang button[aria-pressed="true"] { background: var(--brand); color: var(--brand-on); }
.ax-lang button:disabled { opacity: .45; cursor: not-allowed; }
.ax-ibtn { width: 44px; height: 44px; border-radius: 12px; display: inline-grid; place-items: center; color: var(--ink-2); background: transparent; transition: background-color .2s, color .2s; }
.ax-ibtn:hover:not(:disabled) { background: #fff; color: var(--brand); }
.ax-ibtn:disabled { opacity: .35; cursor: default; }
.ax-pdf { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 12px; border-radius: 12px; color: var(--brand); font-weight: 700; font-size: 15px; text-decoration: none; }
.ax-pdf:hover { background: #fff; }
.ax-pdf small { font-size: 14px; color: var(--ink-3); font-weight: 500; font-variant-numeric: tabular-nums; }
.ax-pdf .ax-ic { width: 18px; height: 18px; }
.ax-pdf .ax-ic:last-child { width: 16px; height: 16px; }

.ax-stage { position: relative; }
.ax-track {
  --ar: 1.7778;
  display: flex; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
  scrollbar-width: none; outline: none; min-height: 160px;
}
.ax-track::-webkit-scrollbar { display: none; }
.ax-track:focus-visible { box-shadow: inset 0 0 0 2px var(--brand); }
.ax-page { flex: 0 0 100%; margin: 0; padding: 24px; scroll-snap-align: center; scroll-snap-stop: always; display: grid; place-items: center; }
/* 쪽 크기: 폭에 맞추되, 화면 높이보다 커지지 않게 (헤더 · 도구 줄을 뺀 높이 × 가로세로비) */
.ax-sheet {
  width: min(100%, calc((100svh - var(--hdr, var(--header-h)) - 200px) * var(--ar)));
  min-width: min(100%, 320px);
  aspect-ratio: var(--ar); background: #fff; border-radius: 8px; overflow: hidden;
  box-shadow: 0 1px 2px rgba(25,31,40,.08), 0 8px 24px -12px rgba(25,31,40,.28);
}
.ax-sheet canvas { width: 100%; height: 100%; display: block; }
.ax-sheet:empty, .ax-sheet-msg { background: linear-gradient(90deg, #fff 0%, var(--bg-alt) 50%, #fff 100%) 0 0 / 200% 100%; }
@media (prefers-reduced-motion: no-preference) { .ax-sheet:empty, .ax-sheet-msg { animation: ax-shimmer 1.4s linear infinite; } }
@keyframes ax-shimmer { to { background-position: -200% 0; } }
.ax-sheet-msg { display: grid; place-items: center; }
.ax-sheet-msg.is-err { background: #fff; animation: none; }
.ax-vmsg { padding: 16px 24px; text-align: center; color: var(--ink-2); font-size: 16px; text-wrap: balance; }

.ax-vctl { display: flex; align-items: center; gap: 8px; padding: 0 16px 16px; }
.ax-range { flex: 1; min-width: 0; height: 44px; margin: 0; background: transparent; -webkit-appearance: none; appearance: none; cursor: pointer; --fill: 0%; }
.ax-range::-webkit-slider-runnable-track { height: 6px; border-radius: 3px; background: linear-gradient(90deg, var(--brand) var(--fill), rgba(25,31,40,.12) var(--fill)); }
.ax-range::-moz-range-track { height: 6px; border-radius: 3px; background: rgba(25,31,40,.12); }
.ax-range::-moz-range-progress { height: 6px; border-radius: 3px; background: var(--brand); }
.ax-range::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; margin-top: -7px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 2px var(--brand), 0 2px 6px rgba(25,31,40,.2); }
.ax-range::-moz-range-thumb { width: 20px; height: 20px; border: 0; border-radius: 50%; background: #fff; box-shadow: 0 0 0 2px var(--brand), 0 2px 6px rgba(25,31,40,.2); }
.ax-range:focus-visible { outline: none; }
.ax-range:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 2px var(--brand), 0 0 0 6px rgba(var(--brand-rgb), .25); }
.ax-pg { flex: none; display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--ink-2); font-variant-numeric: tabular-nums; font-size: 16px; }
.ax-pg input { width: 56px; height: 44px; border: 0; border-radius: 12px; background: #fff; text-align: center; font: inherit; font-weight: 700; color: var(--ink); -moz-appearance: textfield; }
.ax-pg input::-webkit-inner-spin-button, .ax-pg input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.ax-pg-t { white-space: nowrap; min-width: 3.2em; }

/* 전체 화면 */
.ax-viewer:fullscreen { display: flex; flex-direction: column; border-radius: 0; background: var(--bg-deep); }
.ax-viewer:fullscreen .ax-stage { flex: 1; display: flex; }
.ax-viewer:fullscreen .ax-track { flex: 1; }
.ax-viewer:fullscreen .ax-sheet { width: min(100%, calc((100vh - 172px) * var(--ar))); }

/* 오늘 할 일 · 핵심 개념 */
.ax-lgrid { display: grid; gap: 32px; }
@media (min-width: 900px) { .ax-lgrid { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 40px; } }
.ax-todo, .ax-concepts { scroll-margin-top: 76px; }
@media (min-width: 1100px) { .ax-todo { scroll-margin-top: 24px; } }
@media (max-height: 520px) and (orientation: landscape) { .ax-viewer, .ax-todo { scroll-margin-top: 8px; } }
.ax-sub-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 16px; }
.ax-sub-head h3 { font-size: 22px; letter-spacing: -0.035em; }
.ax-count { font-size: 15px; font-weight: 700; color: var(--brand); font-variant-numeric: tabular-nums; }
.ax-checks { display: grid; gap: 8px; }
.ax-check { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 16px; align-items: center; min-height: 56px; padding: 12px 16px; border-radius: 16px; background: var(--bg-alt); cursor: pointer; transition: background-color .2s; }
.ax-check:hover { background: var(--brand-tint); }
.ax-check input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.ax-check input:focus-visible + .ax-box { outline: 2px solid var(--brand); outline-offset: 3px; }
.ax-check input:checked + .ax-box { background: var(--brand); box-shadow: none; color: #fff; }
.ax-check-b { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; min-width: 0; }
.ax-check code { font: 600 15px/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; padding: 4px 8px; border-radius: 8px; background: #fff; color: var(--ink); white-space: nowrap; }
.ax-check-t { font-size: 16px; color: var(--ink-2); }
.ax-check:has(input:checked) .ax-check-t { color: var(--ink-3); text-decoration: line-through; text-decoration-color: rgba(25,31,40,.3); }
.ax-concepts ol { display: grid; gap: 0; counter-reset: c; }
.ax-concepts li { counter-increment: c; display: grid; grid-template-columns: 32px 1fr; gap: 8px; padding: 12px 0; font-size: 16px; line-height: 1.6; text-wrap: pretty; }
.ax-concepts li + li { box-shadow: 0 -1px 0 var(--hair); }
.ax-concepts li::before { content: counter(c, decimal-leading-zero); font-size: 14px; font-weight: 700; color: var(--brand); font-variant-numeric: tabular-nums; padding-top: 2px; }

.ax-pager { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ax-pager-c { display: grid; gap: 4px; align-content: start; min-height: 88px; padding: 16px 20px; border-radius: 20px; background: var(--bg-alt); text-decoration: none; color: var(--ink); transition: background-color .2s; }
a.ax-pager-c:hover { background: var(--brand-tint-2); }
.ax-pager-c.is-next { text-align: right; justify-items: end; grid-column: 2; }
.ax-pager-k { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; font-weight: 700; color: var(--brand); }
.ax-pager-k .ax-ic { width: 16px; height: 16px; }
.ax-pager-c b { font-size: 16px; line-height: 1.45; letter-spacing: -0.02em; text-wrap: balance; }
.ax-pager-c small { font-size: 14px; color: var(--ink-3); }
.ax-pager-c.is-soon { background: transparent; box-shadow: inset 0 0 0 1px var(--hair); }
.ax-pager-c.is-soon .ax-pager-k { color: var(--ink-3); }
.ax-pager-c.is-soon b { color: var(--ink-2); font-weight: 600; }
@media (max-width: 599px) { .ax-pager { grid-template-columns: 1fr; } .ax-pager-c.is-next { grid-column: auto; } .ax-pager > span:empty { display: none; } }

/* 휴대폰 하단 바: 쪽 넘김 · 코드 · 할 일 */
.ax-mbar { display: none; }
@media (max-width: 767px) {
  .ax-in-lesson .course-hub { padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px)); }
  .ax-mbar {
    display: flex; gap: 8px; position: fixed; z-index: 90; left: 0; right: 0; bottom: 0;
    padding: 8px max(16px, env(safe-area-inset-right, 0px)) calc(8px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
    background: rgba(255,255,255,.96); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); box-shadow: 0 -1px 0 var(--hair);
  }
  .ax-mbar-pg { flex: none; display: flex; align-items: center; border-radius: 14px; background: var(--brand); color: var(--brand-on); min-width: 0; }
  .ax-mbar-pg button { width: 44px; height: 52px; display: grid; place-items: center; color: inherit; flex: none; }
  .ax-mbar-pg button:disabled { opacity: .4; }
  .ax-mbar-pg a { flex: 1; min-width: 64px; padding: 0 4px; min-height: 52px; display: grid; place-items: center; color: inherit; font-weight: 700; font-size: 16px; text-decoration: none; font-variant-numeric: tabular-nums; white-space: nowrap; }
  .ax-mbar-a { flex: 1; min-height: 52px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 0 8px; border-radius: 14px; background: var(--bg-alt); color: var(--brand); font-weight: 700; font-size: 15px; text-decoration: none; white-space: nowrap; min-width: 0; }
  .ax-mbar-a .ax-ic { width: 18px; height: 18px; }
  .ax-mbar-a small { font-size: 13px; font-weight: 600; color: var(--ink-3); font-variant-numeric: tabular-nums; }
  /* 휴대폰: 쪽 넘김은 하단 바가 맡고, 뷰어 아래는 진행 막대 + 쪽 번호만 */
  .ax-vctl [data-prev], .ax-vctl [data-next] { display: none; }
  .ax-vctl { padding: 0 16px 8px; gap: 16px; }
  .ax-viewer { margin-inline: calc(-1 * var(--gutter)); border-radius: 0; }
  .ax-vbar { padding: 8px var(--gutter); }
  .ax-vctl { padding-inline: var(--gutter); }
  .ax-page { padding: 16px var(--gutter); }
  .ax-sheet { width: 100%; min-width: 0; border-radius: 6px; }
  .ax-pdf small { display: none; }
}
@media (max-width: 374px) {
  .ax-lang button { padding: 0 12px; }
  .ax-mbar-a small { display: none; }
}
/* 가로로 눕힌 휴대폰: 쪽이 화면 높이에 맞게 */
@media (max-height: 520px) and (orientation: landscape) {
  .ax-sheet { width: min(100%, calc((100svh - var(--hdr, var(--header-h)) - 32px) * var(--ar))); }
  .ax-page { padding: 16px; }
}


/* ---------- 상태 칩: 프로젝트 / 과제 ---------- */
.ax-status { display: inline-flex; align-items: center; height: 28px; padding: 0 10px; border-radius: 8px; font-size: 14px; font-weight: 700; line-height: 1; white-space: nowrap; background: var(--brand); color: var(--brand-on); }
.ax-status.is-upcoming { background: var(--brand-tint-2); color: var(--brand); }
.ax-status.is-finished { background: var(--bg-deep); color: var(--ink-2); }
.ax-status.is-planned { background: #fff; color: var(--ink-2); box-shadow: inset 0 0 0 1px rgba(25,31,40,.2); }
.ax-achip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 99px; font-size: 13px; font-weight: 700; line-height: 1; white-space: nowrap; }
.ax-achip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.ax-achip.is-before { background: #fff; color: var(--ink-2); box-shadow: inset 0 0 0 1px rgba(25,31,40,.16); }
.ax-achip.is-open { background: var(--brand-tint-2); color: var(--brand); }
.ax-achip.is-soon { background: var(--brand); color: var(--brand-on); }
.ax-achip.is-closed { background: var(--bg-deep); color: var(--ink-3); }
.ax-achip.is-closed::before { display: none; }
.ax-left { font-size: 14px; font-weight: 700; color: var(--brand); white-space: nowrap; font-variant-numeric: tabular-nums; }
.ax-empty { padding: 24px; border-radius: 20px; background: var(--bg-alt); color: var(--ink-2); font-size: 16px; }

/* ---------- 프로젝트 카드 (아카이브 첫 화면 = grid, PROJECT 페이지 = wide) ---------- */
.ax-landing { display: grid; gap: 56px; }
.ax-group .ax-sec-head { margin-bottom: 16px; }
.ax-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 16px; }
@media (min-width: 768px) { .ax-cards { gap: 24px; } }
.ax-card { position: relative; display: grid; grid-template-rows: auto 1fr; border-radius: 24px; background: var(--bg-alt); overflow: hidden; transition: background-color .2s; }
.ax-cover { aspect-ratio: 16 / 9; display: grid; place-items: center; padding: 8px 16px; background: var(--brand-tint); color: var(--brand); transition: background-color .2s; }
.ax-cover-svg { width: 100%; height: 100%; max-width: 420px; }
.ax-cv-soft { opacity: .5; }
.ax-cv-dot { fill: currentColor; stroke: none; opacity: .55; }
.ax-cv-fill { fill: currentColor; }
.ax-card-body { display: flex; flex-direction: column; gap: 12px; padding: 24px; min-width: 0; }
.ax-card-top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.ax-card-k { font-size: 15px; font-weight: 600; color: var(--ink-2); line-height: 1.45; }
.ax-card-title { font-size: clamp(24px, 2.2vw, 28px); font-weight: 800; letter-spacing: -0.04em; line-height: 1.2; text-wrap: balance; }
.ax-card-link { color: inherit; text-decoration: none; }
.ax-card-link::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.ax-card-link:focus-visible { outline: none; }
.ax-card:has(.ax-card-link:focus-visible) { outline: 2px solid var(--brand); outline-offset: 3px; }
.ax-card:has(.ax-card-link):hover { background: var(--brand-tint); }
.ax-card:has(.ax-card-link):hover .ax-cover { background: var(--brand-tint-2); }
.ax-card:has(.ax-card-link):hover .ax-card-go .ax-ic { transform: translateX(3px); }
.ax-card-sub { margin-top: -6px; font-size: 16px; font-weight: 600; color: var(--ink-3); }
.ax-card-sum { font-size: 16px; line-height: 1.65; color: var(--ink-2); text-wrap: pretty; }
.ax-cprog { display: grid; gap: 8px; }
.ax-cprog p { font-size: 15px; font-weight: 600; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.ax-card-now { display: grid; gap: 2px; padding: 12px 16px; border-radius: 14px; background: #fff; }
.ax-card-now span { font-size: 14px; font-weight: 700; color: var(--brand); }
.ax-card-now b { font-size: 16px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.45; text-wrap: pretty; }
.ax-card-go { margin-top: auto; padding-top: 4px; display: inline-flex; align-items: center; gap: 4px; min-height: 44px; color: var(--brand); font-weight: 700; font-size: 16px; }
.ax-card-go .ax-ic { width: 18px; height: 18px; transition: transform .2s var(--ease); }
/* 다음 계획: 들어갈 수 없는 카드 — 흐린 점선, 그림도 회색 */
.ax-card.is-static { background: transparent; border: 1.5px dashed rgba(25,31,40,.18); cursor: default; }
.ax-card.is-static .ax-cover { background: transparent; color: var(--ink-3); border-bottom: 1.5px dashed rgba(25,31,40,.12); }
.ax-card.is-static .ax-card-title { color: var(--ink-2); }
.ax-card.is-static .ax-card-k { color: var(--ink-3); }
.ax-cards.is-planned .ax-cover { aspect-ratio: 2 / 1; }

.ax-plist { display: grid; gap: 24px; }
@media (min-width: 900px) {
  .ax-card-wide { grid-template-rows: none; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
  .ax-card-wide .ax-cover { aspect-ratio: auto; min-height: 280px; padding: 32px; }
  .ax-card-wide.is-static .ax-cover { min-height: 200px; border-bottom: 0; border-right: 1.5px dashed rgba(25,31,40,.12); }
}
.ax-card-wide { border-radius: 28px; }
.ax-card-wide .ax-card-body { gap: 16px; padding: clamp(24px, 4vw, 48px); }
.ax-card-wide .ax-card-title { font-size: clamp(28px, 3.2vw, 40px); }
.ax-card-wide .ax-card-sum { font-size: 17px; line-height: 1.7; max-width: 40em; }
.ax-card-wide .ax-actions { margin-top: 8px; }
.ax-card-wide .btn-soft { background: #fff; }
.ax-card-wide .btn-soft:hover { background: var(--brand-tint); }
.ax-card-wide .btn .ax-ic { width: 18px; height: 18px; }
.ax-card-wide .ax-card-now { max-width: 32em; }
@media (max-width: 599px) { .ax-card-body, .ax-card-wide .ax-card-body { padding: 20px 16px; } .ax-card-wide .ax-actions .btn { flex: 1 1 auto; } }

/* ---------- 프로젝트 화면 머리말 ---------- */
.ax-project { display: grid; gap: 24px; }
.ax-project > .ax-back { margin-bottom: -8px; }
.ax-phead { display: grid; gap: 24px; margin-bottom: 8px; }
@media (min-width: 1024px) { .ax-phead { grid-template-columns: minmax(0, 1fr) 360px; gap: 48px; align-items: start; } }
@media (min-width: 1280px) { .ax-phead { grid-template-columns: minmax(0, 1fr) 384px; gap: 64px; } }
.ax-phead-main { display: grid; gap: 16px; align-content: start; min-width: 0; }
.ax-ptitle { font-size: clamp(32px, 4.2vw, 56px); font-weight: 800; letter-spacing: -0.045em; line-height: 1.12; text-wrap: balance; }
.ax-psum { font-size: 17px; line-height: 1.7; color: var(--ink-2); max-width: 40em; text-wrap: pretty; }
.ax-phead .ax-actions { margin-top: 8px; }
.ax-phead-side { display: grid; gap: 20px; padding: 24px; border-radius: 24px; background: var(--bg-alt); }
.ax-phead-side .ax-prog { padding: 16px; border-radius: 16px; background: #fff; }
@media (max-width: 599px) { .ax-phead .ax-actions .btn { flex: 1 1 auto; padding-inline: 16px; } .ax-phead-side { padding: 20px 16px; } }

/* 다가오는 과제 */
.ax-deadlines { margin-top: 16px; }
.ax-dl-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 8px; }
.ax-dl { display: grid; gap: 8px; align-content: start; height: 100%; min-height: 44px; padding: 16px 20px; border-radius: 20px; background: var(--bg-alt); color: var(--ink); text-decoration: none; transition: background-color .2s; }
.ax-dl:hover { background: var(--brand-tint); }
.ax-dl.is-soon { box-shadow: inset 0 0 0 1.5px rgba(var(--brand-rgb), .35); }
.ax-dl-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ax-dl-t { font-size: 17px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.45; text-wrap: pretty; }
.ax-dl-m { font-size: 14px; color: var(--ink-3); line-height: 1.5; font-variant-numeric: tabular-nums; }
.ax-row-t .ax-row-due { color: var(--brand); font-weight: 600; }
.ax-res { margin-top: 16px; }

/* ---------- 과제 · 자료 줄 ---------- */
.ax-items { display: grid; gap: 8px; }
.ax-asg { border-radius: 16px; background: var(--bg-alt); transition: background-color .2s; }
.ax-asg-row, .ax-mat {
  width: 100%; display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 4px 14px; align-items: center;
  min-height: 64px; padding: 12px 16px; border-radius: 16px; text-align: left; color: inherit; text-decoration: none;
}
.ax-mat { background: var(--bg-alt); transition: background-color .2s; }
a.ax-mat:hover, .ax-asg:hover { background: var(--brand-tint); }
.ax-item-ic { align-self: start; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; background: #fff; color: var(--brand); }
.ax-item-ic .ax-ic { width: 22px; height: 22px; }
.ax-item-main { display: grid; gap: 2px; min-width: 0; }
.ax-item-title { font-size: 16px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.45; color: var(--ink); text-wrap: pretty; }
.ax-item-meta { display: flex; flex-wrap: wrap; gap: 0 10px; font-size: 14px; color: var(--ink-3); line-height: 1.6; font-variant-numeric: tabular-nums; }
.ax-item-meta .is-due { color: var(--ink-2); font-weight: 600; }
.ax-item-side { display: inline-flex; align-items: center; gap: 8px; justify-self: end; }
.ax-caret { width: 18px; height: 18px; color: var(--ink-3); transition: transform .3s var(--ease); }
.ax-asg.is-open .ax-caret { transform: rotate(180deg); }
.ax-asg.is-closed .ax-item-title { color: var(--ink-2); }
.ax-asg-detail { display: grid; gap: 12px; padding: 0 16px 16px 70px; }
.ax-asg-detail[hidden] { display: none; }
.ax-asg-desc { font-size: 16px; color: var(--ink-2); line-height: 1.7; max-width: 42em; text-wrap: pretty; white-space: pre-line; }
.ax-asg-detail .btn { height: 48px; }
.ax-submit-off { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 12px; background: #fff; color: var(--ink-3); font-size: 15px; font-weight: 600; box-shadow: inset 0 0 0 1px var(--hair); }
.ax-textlink { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; color: var(--brand); font-size: 15px; font-weight: 600; text-decoration: none; }
.ax-textlink .ax-ic { width: 16px; height: 16px; }
.ax-open { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; font-weight: 700; color: var(--brand); white-space: nowrap; }
.ax-open .ax-ic { width: 16px; height: 16px; }
.ax-wait { font-size: 14px; font-weight: 600; color: var(--ink-3); white-space: nowrap; }
.ax-mat.is-pending .ax-item-ic { color: var(--ink-3); }
@media (max-width: 599px) {
  .ax-asg-row { grid-template-columns: 40px minmax(0, 1fr); gap: 8px 12px; }
  .ax-asg .ax-item-side { grid-column: 2; justify-self: start; }
  .ax-mat { gap: 4px 12px; }
  .ax-asg-detail { padding: 0 16px 16px; }
}
.ax-extras { display: grid; gap: 32px; }
.ax-extras:empty { display: none; }
.ax-asgs, .ax-mats { scroll-margin-top: 76px; }
@media (min-width: 1100px) { .ax-asgs, .ax-mats { scroll-margin-top: 24px; } }
.ax-lsum { font-size: 17px; line-height: 1.7; color: var(--ink-2); max-width: 40em; text-wrap: pretty; }

/* 휴대폰 하단 바: 칸이 4개까지 늘어나도 들어가게 아이콘 위 · 글자 아래 */
@media (max-width: 430px) {
  .ax-mbar-a { flex-direction: column; gap: 2px; font-size: 13px; padding: 4px; }
  .ax-mbar-a small { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .ax-card, .ax-cover, .ax-card-go .ax-ic, .ax-caret, .ax-asg, .ax-mat, .ax-dl, .ax-row, .ax-row-go { transition: none; }
}

/* 진행 중인 프로젝트가 하나뿐이면 넓은 화면에서 가로로 길게 (그림 왼쪽 · 글 오른쪽) */
@media (min-width: 900px) {
  .ax-cards.is-active > .ax-card:only-child { grid-column: 1 / -1; grid-template-rows: none; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); }
  .ax-cards.is-active > .ax-card:only-child .ax-cover { aspect-ratio: auto; min-height: 320px; padding: 32px; }
  .ax-cards.is-active > .ax-card:only-child .ax-card-body { padding: clamp(28px, 3.5vw, 48px); gap: 16px; }
  .ax-cards.is-active > .ax-card:only-child .ax-card-title { font-size: clamp(28px, 3vw, 40px); }
  .ax-cards.is-active > .ax-card:only-child .ax-card-sum { font-size: 17px; line-height: 1.7; max-width: 36em; }
}
