/* ---------- tokens ---------- */
:root {
  --ink: #16213a;
  --ink-2: #3b4660;
  --muted: #6b7384;
  --line: #e4e6ec;
  --line-2: #cfd3dc;
  --paper: #f6f6f3;
  --white: #fff;
  --accent: #d9452b;        /* 수능 D-day 레드 */
  --accent-ink: #b7361f;
  --brand: #0b45e6;         /* 셀렉티 블루 (로고 그라데이션 중간값) */
  --brand-dark: #0037e5;
  --brand-light: #277aff;
  --brand-pale: #eef3ff;
  --brand-tint: #d9e4ff;
  --blue: var(--brand);
  --c-common: #24456e;      /* 표지 색: 공통수학 */
  --c-algebra: #2f6b4f;     /* 대수·수학I/II */
  --c-calculus: #8a3b2c;    /* 미적분 */
  --c-stat: #9a6a1c;        /* 확률과 통계 */
  --c-geometry: #4f3a6e;    /* 기하 */
  --sans: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, system-ui, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  --container: 1160px;
  --radius: 6px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--sans); color: var(--ink); background: var(--white);
  font-size: 16px; line-height: 1.6; letter-spacing: -0.01em; word-break: keep-all;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; }
h1, h2, h3 { margin: 0; line-height: 1.3; letter-spacing: -0.02em; }
p { margin: 0; }
.container { max-width: var(--container); margin: 0 auto; padding: 0 20px; }
button { font: inherit; }

/* ---------- util bar + header + gnb ---------- */
.utilbar { background: var(--paper); border-bottom: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.utilbar__inner { display: flex; justify-content: space-between; align-items: center; height: 34px; }
.dday { color: var(--ink-2); }
.dday strong { color: var(--accent); margin-left: 6px; font-variant-numeric: tabular-nums; }
.utilbar__links a { margin-left: 18px; }
.utilbar__links a:hover { color: var(--ink); }

.site-header { background: var(--white); }
.site-header__inner { display: flex; align-items: center; height: 82px; gap: 24px; }
.logo { display: flex; align-items: center; }
.logo img { height: 40px; width: auto; display: block; }
.site-header__tag { font-size: 14px; color: var(--muted); padding-left: 24px; border-left: 1px solid var(--line-2); line-height: 1.2; }
.site-header__mine { margin-left: auto; height: 40px; padding: 0 18px; font-size: 14px; }
.btn--outline { border-color: var(--brand); color: var(--brand); background: #fff; }
.btn--outline:hover { background: var(--brand-pale); }

.gnb { background: var(--brand); position: sticky; top: 0; z-index: 50; }
.gnb__inner { display: flex; gap: 0; overflow-x: auto; scrollbar-width: none; }
.gnb__inner::-webkit-scrollbar { display: none; }
.gnb a { color: rgba(255,255,255,.88); font-size: 15.5px; font-weight: 700; padding: 15px 22px; white-space: nowrap; position: relative; }
.gnb a:first-child { padding-left: 0; }
.gnb a:hover { color: #fff; }
.gnb a.is-current { color: #fff; }
.gnb a.is-current::after { content: ""; position: absolute; left: 22px; right: 22px; bottom: 0; height: 3px; background: #fff; }
.gnb a.is-current:first-child::after { left: 0; }

/* ---------- hero ---------- */
.hero { background: linear-gradient(180deg, #f3f6ff 0%, #e6edff 100%); border-bottom: 1px solid var(--brand-tint); }
.hero__inner { display: grid; grid-template-columns: 1.4fr 1fr; gap: 48px; align-items: end; padding: 72px 20px 56px; }
.hero__eyebrow { font-size: 13px; font-weight: 700; color: var(--brand); letter-spacing: .04em; margin-bottom: 18px; }
.hero__title { font-weight: 800; font-size: 44px; line-height: 1.22; letter-spacing: -0.03em; }
.hero__lead { margin-top: 20px; font-size: 17px; color: var(--ink-2); max-width: 540px; }
.hero__actions { display: flex; gap: 10px; margin-top: 32px; }
.btn { display: inline-flex; align-items: center; justify-content: center; height: 48px; padding: 0 22px; border-radius: var(--radius); font-weight: 700; font-size: 15px; border: 1px solid transparent; }
.btn--primary { background: var(--brand); color: #fff; }
.btn--primary:hover { background: var(--brand-dark); }
.btn--ghost { border-color: var(--line-2); background: #fff; }
.btn--ghost:hover { border-color: var(--ink); }
.hero__stats { display: grid; grid-template-columns: 1fr 1fr; margin: 0; background: #fff; border: 1px solid var(--brand-tint); border-right: 0; border-bottom: 0; border-radius: 8px; overflow: hidden; }
.hero__stats div { padding: 18px 20px; border-right: 1px solid var(--brand-tint); border-bottom: 1px solid var(--brand-tint); }
.hero__stats dt { font-size: 13px; color: var(--muted); }
.hero__stats dd { margin: 4px 0 0; font-size: 28px; font-weight: 800; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; color: var(--brand); }
.hero__stats small { font-size: 14px; font-weight: 600; color: var(--muted); margin-left: 3px; }

/* ---------- sections ---------- */
.section { padding: 64px 0; }
.section--tight { padding-top: 24px; }
.section--paper { background: var(--paper); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section__head { display: flex; align-items: baseline; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; padding-bottom: 12px; border-bottom: 2px solid var(--ink); }
.section__head h2 { font-size: 26px; font-weight: 800; }
.section__sub { color: var(--muted); font-size: 15px; }
.more { margin-left: auto; font-size: 14px; font-weight: 600; color: var(--ink-2); border-bottom: 1px solid var(--line-2); }
.more:hover { color: var(--ink); border-color: var(--ink); }

.page-head { padding: 44px 0 20px; border-bottom: 1px solid var(--line); }
.page-head h1 { font-size: 30px; font-weight: 800; }
.page-head__eyebrow { font-size: 13px; font-weight: 700; color: var(--brand); margin-bottom: 8px; }
.page-head__count { font-size: 18px; color: var(--muted); margin-left: 6px; font-weight: 600; }

/* ---------- tabs ---------- */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 24px; }
.tab { height: 38px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line-2); background: #fff; color: var(--ink-2); font-weight: 600; font-size: 14px; cursor: pointer; }
.tab:hover { border-color: var(--brand); color: var(--brand); }
.tab.is-active { background: var(--brand); border-color: var(--brand); color: #fff; }

/* ---------- course cards ---------- */
.course-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 28px 20px; }
.course-card { display: block; }
.course-card[hidden] { display: none; }
.cover {
  position: relative; aspect-ratio: 3 / 4; border-radius: 4px 10px 10px 4px; color: #fff; padding: 16px 16px 14px;
  display: flex; flex-direction: column; background: var(--ink);
  box-shadow: inset 6px 0 0 rgba(0,0,0,.18), 0 1px 2px rgba(0,0,0,.08), 0 8px 20px -10px rgba(0,0,0,.35);
  transition: transform .2s, box-shadow .2s;
}
.course-card:hover .cover { transform: translateY(-3px); box-shadow: inset 6px 0 0 rgba(0,0,0,.18), 0 2px 4px rgba(0,0,0,.08), 0 16px 28px -12px rgba(0,0,0,.4); }
.cover--common { background: var(--c-common); }
.cover--algebra { background: var(--c-algebra); }
.cover--calculus { background: var(--c-calculus); }
.cover--stat { background: var(--c-stat); }
.cover--geometry { background: var(--c-geometry); }
.cover__no { font-size: 13px; font-weight: 700; opacity: .7; letter-spacing: .08em; font-variant-numeric: tabular-nums; }
.cover__series { margin-top: auto; font-size: 11px; opacity: .75; letter-spacing: .02em; }
.cover__name { font-size: 24px; font-weight: 800; line-height: 1.2; margin-top: 4px; letter-spacing: -0.03em; }
.cover__count { position: absolute; top: 14px; right: 14px; font-size: 12px; font-weight: 700; padding: 2px 8px; border: 1px solid rgba(255,255,255,.5); border-radius: 999px; }
.course-card__body { padding: 14px 2px 0; }
.course-card__tag { font-size: 12px; color: var(--muted); }
.course-card__title { font-size: 15px; font-weight: 700; margin-top: 4px; line-height: 1.4; }
.course-card__meta { font-size: 13px; color: var(--muted); margin-top: 4px; }
.course-card__price { margin-top: 8px; font-size: 18px; font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; color: var(--brand); }
.course-card__price span { font-size: 14px; font-weight: 600; margin-left: 1px; }

/* ---------- steps ---------- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; counter-reset: s; }
.steps li { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 22px 22px 24px; }
.steps__no { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--brand); color: #fff; font-size: 13px; font-weight: 800; }
.steps h3 { font-size: 17px; font-weight: 800; margin-top: 16px; }
.steps p { margin-top: 8px; font-size: 14px; color: var(--ink-2); }

/* ---------- fee table ---------- */
.selectedu-fee { overflow-x: auto; }
.selectedu-fee table { width: 100%; border-collapse: collapse; font-size: 14.5px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.selectedu-fee th, .selectedu-fee td { padding: 13px 14px; text-align: center; border-bottom: 1px solid var(--line); }
.selectedu-fee th { background: var(--brand-pale); font-weight: 700; color: var(--ink-2); border-top: 2px solid var(--brand); font-size: 13.5px; }
.selectedu-fee td:nth-child(2) { text-align: left; font-weight: 600; }
.selectedu-fee td:nth-child(2) a:hover { text-decoration: underline; }
.selectedu-fee td:last-child { font-weight: 800; }
.selectedu-note { font-size: 13.5px; color: var(--muted); margin-top: 12px; }

/* ---------- faq ---------- */
.faq details { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 0 22px; margin-bottom: 10px; }
.faq summary { cursor: pointer; list-style: none; padding: 18px 0; font-weight: 700; font-size: 16px; position: relative; padding-right: 32px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0; top: 14px; font-size: 22px; font-weight: 300; color: var(--muted); }
.faq details[open] summary::after { content: "−"; }
.faq details p { padding: 0 0 20px; color: var(--ink-2); font-size: 15px; }
.faq a { text-decoration: underline; }

/* ---------- generic page / prose ---------- */
.prose { padding: 32px 20px 72px; max-width: 820px; font-size: 16px; }
.prose h2 { font-size: 22px; font-weight: 800; margin: 40px 0 12px; }
.prose h3 { font-size: 18px; font-weight: 700; margin: 28px 0 8px; }
.prose p { margin: 0 0 14px; color: var(--ink-2); }
.prose ul, .prose ol { padding-left: 22px; color: var(--ink-2); }
.prose li { margin-bottom: 6px; }
.prose table { width: 100%; border-collapse: collapse; }
.prose .selectedu-fee { margin-top: 20px; }
.prose--wide { max-width: var(--container); }

/* ---------- footer ---------- */
.site-footer { background: var(--paper); border-top: 1px solid var(--line); padding: 40px 0 48px; font-size: 13px; color: var(--muted); }
.site-footer__links { display: flex; flex-wrap: wrap; gap: 20px; font-size: 14px; color: var(--ink-2); margin-bottom: 20px; }
.site-footer__company { font-weight: 700; color: var(--ink); font-size: 14px; margin-bottom: 8px; }
.site-footer__company a:hover { text-decoration: underline; text-underline-offset: 3px; }
.site-footer__info { display: flex; flex-wrap: wrap; gap: 6px 24px; margin: 0; }
.site-footer__info div { display: flex; gap: 6px; }
.site-footer__info dt::after { content: ":"; }
.site-footer__info dd { margin: 0; color: var(--ink-2); }
.site-footer__note { margin-top: 16px; }
.site-footer__copy { margin-top: 8px; }

/* ---------- Tutor 영역 보정 ---------- */
.tutor-wrap, .tutor-course-details-page, .tutor-frontend-dashboard { font-family: var(--sans) !important; }
.tutor-course-details-page { padding-top: 32px; }
.selectedu-course-fee { border: 1px solid var(--brand-tint); border-radius: 8px; padding: 18px 22px; margin: 0 0 24px; background: var(--brand-pale); }
.selectedu-course-fee dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin: 0; }
.selectedu-course-fee dt { font-size: 12.5px; color: var(--muted); }
.selectedu-course-fee dd { margin: 2px 0 0; font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; }
:root { --tutor-color-primary: #0b45e6; --tutor-color-primary-hover: #0037e5; --tutor-body-color: #16213a; }

/* ---------- responsive ---------- */
@media (max-width: 1024px) {
  .course-grid { grid-template-columns: repeat(4, 1fr); }
  .hero__title { font-size: 38px; }
  .steps { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .site-header__inner { height: 64px; gap: 12px; }
  .logo img { height: 32px; }
  .site-header__tag { display: none; }
  .site-header__mine { height: 34px; padding: 0 12px; font-size: 13px; }
  .gnb a { font-size: 14.5px; padding: 13px 16px; }
  .gnb a.is-current::after { left: 16px; right: 16px; }
  .hero__inner { grid-template-columns: 1fr; gap: 32px; padding: 44px 20px 40px; }
  .hero__title { font-size: 31px; }
  .hero__lead { font-size: 15.5px; }
  .hero__stats dd { font-size: 24px; }
  .section { padding: 44px 0; }
  .section__head h2 { font-size: 22px; }
  .course-grid { grid-template-columns: repeat(2, 1fr); gap: 24px 14px; }
  .cover__name { font-size: 20px; }
  .steps { grid-template-columns: 1fr; }
  .utilbar__links a { margin-left: 14px; }
}

/* ---------- 강좌 상세 (Tutor) 정리 ---------- */
.tutor-course-details-page .tutor-course-thumbnail,
.tutor-course-details-page .tutor-course-details-top,
.tutor-course-details-page .tutor-single-course-sidebar-more { display: none !important; }
.tutor-course-details-page .tutor-course-details-header { margin-bottom: 28px !important; }
.tutor-course-details-page .tutor-course-details-title { font-size: 28px !important; letter-spacing: -0.02em; }
.cover--wide { aspect-ratio: 16 / 7; border-radius: 10px; padding: 26px 30px 24px; box-shadow: none; }
.cover--wide .cover__name { font-size: 40px; }
.cover--wide .cover__no { font-size: 15px; }
.cover--wide .cover__count { top: 22px; right: 24px; font-size: 13px; }
.course-card:hover .cover--wide { transform: none; }
.course-meta { margin-top: 14px; font-size: 14px; color: var(--muted); }
@media (max-width: 768px) { .cover--wide { aspect-ratio: 16 / 9; } .cover--wide .cover__name { font-size: 28px; } }
.tutor-course-details-page .tutor-single-course-sidebar .tutor-card-footer { display: none !important; }

/* ---------- Tutor 대시보드/학습 화면 브랜드 변수 ---------- */
:root, [data-tutor-theme=light], [data-tutor-theme=dark], [data-tutor-theme=system] {
  --tutor-color-primary: #0b45e6; --tutor-color-primary-hover: #0037e5; --tutor-color-primary-rgb: 11, 69, 230;
  --tutor-text-brand: #0b45e6; --tutor-text-brand-hover: #0037e5; --tutor-brand-450: #0b45e6;
  --tutor-actions-brand-primary: #0b45e6; --tutor-actions-brand-tertiary: #eef3ff;
  --tutor-border-brand: #0b45e6; --tutor-border-brand-secondary: #d9e4ff;
  --tutor-icon-brand: #0b45e6; --tutor-icon-brand-hover: #0037e5;
  --tutor-surface-brand-secondary: #d9e4ff; --tutor-surface-brand-tertiary: #eef3ff; --tutor-surface-brand-quaternary: #f3f6ff;
  --tutor-font-family-body: "Pretendard Variable", Pretendard, -apple-system, system-ui, sans-serif;
  --tutor-font-family-heading: "Pretendard Variable", Pretendard, -apple-system, system-ui, sans-serif;
  --tutor-button-radius: 6px;
}
.tutor-dashboard-sidebar-logo img { max-height: 36px; width: auto; }
.tutor-reg-form .tutor-form-group label, .tutor-login-form-wrapper label { font-weight: 600; }
.selectedu-billing .tutor-col-6 { flex: 0 0 50%; max-width: 50%; }

/* ---------- login ---------- */
.login-page { background: var(--paper); padding: 56px 20px 72px; }
.login-box { background: #fff; border: 1px solid var(--line); border-radius: 8px; max-width: 420px; margin: 0 auto; padding: 32px 32px 28px; }
.login-box h1 { font-size: 22px; font-weight: 800; text-align: center; margin-bottom: 22px; }
.login-form .tutor-form-control { width: 100%; height: 48px; border: 1px solid var(--line-2); border-radius: 6px; background: #fff; font-size: 15px; padding: 0 14px; margin-bottom: 10px; }
.login-form .tutor-form-control:focus { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand-tint); outline: 0; }
.login-form__row { display: flex; justify-content: space-between; align-items: center; font-size: 13.5px; color: var(--ink-2); margin: 2px 0 16px; }
.login-form__row label { display: flex; gap: 6px; align-items: center; cursor: pointer; }
.login-form__row a { color: var(--ink-2); text-decoration: underline; text-underline-offset: 3px; }
.login-form__submit { width: 100%; height: 50px; font-size: 16px; }
.login-form a.btn--outline { display: flex; border: 1px solid var(--brand); }
.login-form__divider { display: flex; align-items: center; gap: 12px; margin: 22px 0 14px; color: var(--muted); font-size: 13px; }
.login-form__divider::before, .login-form__divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.login-page__note { text-align: center; font-size: 13.5px; color: var(--muted); margin-top: 18px; }
.login-page__note a { text-decoration: underline; text-underline-offset: 3px; }
.login-page .tutor-login-error:empty { display: none; }

/* ---------- register ---------- */
.reg { max-width: 780px; padding-top: 28px; padding-bottom: 80px; }
.steps-bar { list-style: none; display: flex; margin: 0 0 36px; padding: 0; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.steps-bar li { flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 12px; font-size: 14px; color: var(--muted); background: var(--paper); border-right: 1px solid var(--line); }
.steps-bar li:last-child { border-right: 0; }
.steps-bar li b { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--line-2); color: #fff; font-size: 12px; }
.steps-bar li.is-current { color: var(--ink); background: #fff; font-weight: 700; }
.steps-bar li.is-current b { background: var(--brand); }
.reg__section { font-size: 18px; font-weight: 800; padding-bottom: 10px; border-bottom: 2px solid var(--ink); margin: 36px 0 16px; display: flex; justify-content: space-between; align-items: baseline; }
.reg__section small { font-size: 12.5px; font-weight: 500; color: var(--accent); }
.consent__all { display: grid; grid-template-columns: auto 1fr; column-gap: 10px; align-items: center; padding: 14px 16px; border: 1px solid var(--brand); background: var(--brand-pale); border-radius: 6px; font-weight: 700; cursor: pointer; }
.consent__all small { grid-column: 2; font-size: 12.5px; font-weight: 400; color: var(--muted); }
.consent__item { margin-top: 14px; }
.consent__item label { display: flex; gap: 8px; align-items: center; font-size: 14.5px; cursor: pointer; }
.consent__item em { font-style: normal; color: var(--accent); font-weight: 700; }
.consent__text { margin-top: 8px; height: 120px; overflow-y: auto; border: 1px solid var(--line); border-radius: 4px; padding: 10px 14px; font-size: 12.5px; line-height: 1.6; color: var(--ink-2); background: #fafafa; }
.consent__text h2, .consent__text h3 { font-size: 13px; margin: 10px 0 4px; }
.consent__text p, .consent__text li { margin: 0 0 6px; }
.consent__note { margin-top: 12px; font-size: 12.5px; color: var(--muted); }
.form-table { width: 100%; border-collapse: collapse; border-top: 1px solid var(--line-2); }
.form-table th, .form-table td { border-bottom: 1px solid var(--line); padding: 12px 14px; text-align: left; vertical-align: middle; }
.form-table th { width: 160px; background: var(--paper); font-size: 14px; font-weight: 600; color: var(--ink-2); }
.form-table th i { color: var(--accent); font-style: normal; }
.form-table .tutor-form-control { width: 100%; max-width: 360px; height: 44px; border: 1px solid var(--line-2); border-radius: 4px; background: #fff; font-size: 15px; padding: 0 12px; }
.form-table .tutor-form-control:focus { border-color: var(--brand); outline: 0; box-shadow: 0 0 0 2px var(--brand-tint); }
.form-table select.tutor-form-control { appearance: auto; }
.form-table .inline { display: flex; gap: 8px; max-width: 360px; }
.form-table .hint { margin-top: 6px; font-size: 12.5px; color: var(--muted); }
.reg__actions { display: flex; gap: 10px; justify-content: center; margin-top: 32px; }
.reg__actions .btn { min-width: 180px; height: 50px; font-size: 16px; }
.reg__login { text-align: center; font-size: 14px; color: var(--muted); margin-top: 18px; }
.reg__login a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 640px) {
  .steps-bar li { font-size: 12.5px; padding: 10px 6px; gap: 5px; }
  .form-table th, .form-table td { display: block; width: auto; }
  .form-table th { border-bottom: 0; padding-bottom: 4px; background: none; }
  .form-table td { padding-top: 0; }
  .reg__actions { flex-direction: column; }
  .login-box { padding: 24px 18px; }
}
