/* AiNex Edu — 약관·정책 pages (이용약관 / 개인정보처리방침 / 법적고지 / 이메일무단수집거부). 2026-10 redesign.
   Markup: include/design/legal_doc.php. Blue header with policy tabs, sticky contents + document card. */

.ld-page {
  --ld-ink: #12141a;
  --ld-text: #3b4252;
  --ld-muted: #6b7385;
  --ld-line: #e3e7ec;
  --ld-accent: #0d3f76;
  background: #f6f7fb;
  color: var(--ld-text);
}

.ld-in { width: min(1200px, calc(100% - 48px)); margin: 0 auto; }

/* header */
.ld-hero {
  position: relative;
  overflow: hidden;
  padding: 28px 0 40px;
  background:
    radial-gradient(800px 340px at 90% -30%, rgb(255 255 255 / 0.16), transparent 60%),
    var(--p);
  color: #fff;
}

.ld-tabs {
  display: inline-flex;
  gap: 4px;
  max-width: 100%;
  margin: 0 0 30px;
  padding: 4px;
  overflow-x: auto;
  border-radius: 6px;
  background: rgb(10 20 80 / 0.22);
  scrollbar-width: none;
}

.ld-tab {
  flex: none;
  padding: 9px 16px;
  border-radius: 6px;
  color: rgb(255 255 255 / 0.86);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.15s ease;
}

.ld-tab:hover { background: rgb(255 255 255 / 0.14); color: #fff; }
.ld-tab.ld-tabActive { background: #fff; color: var(--ld-ink); box-shadow: 0 6px 16px -8px rgb(0 0 0 / 0.4); }

.ld-headingRow { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.ld-kicker { margin: 0 0 8px; color: rgb(255 255 255 / 0.72); font-size: 13px; font-weight: 800; letter-spacing: 0.08em; }
.ld-title { margin: 0; color: #fff; font-size: clamp(30px, 3.4vw, 42px); font-weight: 800; letter-spacing: -0.045em; line-height: 1.2; }
.ld-desc { max-width: 640px; margin: 10px 0 0; color: rgb(255 255 255 / 0.84); font-size: 15.5px; line-height: 1.6; }

.ld-toolbar { display: flex; flex: none; align-items: center; gap: 8px; }
.ld-date { display: flex; align-items: center; gap: 8px; color: rgb(255 255 255 / 0.8); font-size: 13.5px; font-weight: 700; }

.ld-date select {
  height: 42px;
  padding: 0 34px 0 14px;
  border: 1px solid rgb(255 255 255 / 0.3);
  border-radius: 6px;
  background: rgb(255 255 255 / 0.12) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3C/svg%3E") right 10px center / 16px no-repeat;
  color: #fff;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  appearance: none;
}

.ld-date select option { color: var(--ld-ink); }

.ld-print {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 42px;
  padding: 0 16px;
  border: 0;
  border-radius: 6px;
  background: #fff;
  color: #0a3260;
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}

.ld-print svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
.ld-print:hover { background: #eef3f9; }

/* layout */
.ld-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
  padding: 32px 0 96px;
}

.ld-layout.is-single { grid-template-columns: minmax(0, 880px); justify-content: center; }

.ld-side {
  position: sticky;
  top: 92px;
  max-height: calc(100vh - 116px);
  overflow-y: auto;
  padding: 20px 14px 20px 18px;
  border: 1px solid var(--ld-line);
  border-radius: 6px;
  background: #fff;
  scrollbar-width: thin;
}

.ld-tocTitle { margin: 0 0 10px 4px; color: var(--ld-ink); font-size: 14px; font-weight: 800; }
.ld-toc ol { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; }

.ld-toc a {
  display: block;
  padding: 7px 10px;
  border-left: 2px solid transparent;
  border-radius: 0 8px 8px 0;
  color: var(--ld-muted);
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.45;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.ld-toc a:hover { background: #f5f7fb; color: var(--ld-ink); }
.ld-toc a.is-on { border-left-color: var(--ld-accent); background: #eef3f9; color: var(--ld-accent); font-weight: 800; }
.ld-toc li.is-major a { margin-top: 6px; color: var(--ld-ink); font-weight: 800; }

.ld-main { min-width: 0; }

.ld-articles {
  padding: 40px 48px 48px;
  border: 1px solid var(--ld-line);
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 1px 2px rgb(16 24 40 / 0.04), 0 30px 60px -48px rgb(16 24 60 / 0.4);
}

.ld-article + .ld-article { margin-top: 36px; padding-top: 32px; border-top: 1px solid var(--ld-line); }
.ld-article { scroll-margin-top: 104px; }
.ld-heading { margin: 0 0 14px; color: var(--ld-ink); font-size: 21px; font-weight: 800; letter-spacing: -0.035em; }
.ld-body { margin: 0 0 12px; color: var(--ld-text); font-size: 15.5px; line-height: 1.85; word-break: keep-all; }
.ld-footer { margin: 18px 4px 0; color: var(--ld-muted); font-size: 14px; }

/* platform-authored document bodies (agreement_include.html etc.) */
.ld-doc { color: #3b4252; font-size: 15.5px; line-height: 1.85; word-break: keep-all; }
.ld-doc h2, .ld-doc h3, .ld-doc strong.ld-h { display: block; margin: 28px 0 8px; color: var(--ld-ink); font-size: 17px; font-weight: 800; }
.ld-doc p { margin: 0 0 10px; }
.ld-doc a { color: var(--ld-accent); }
.ld-doc table { width: 100%; margin: 12px 0 18px; border-collapse: separate; border-spacing: 0; overflow: hidden; border: 1px solid #e4e7ec; border-radius: 6px; font-size: 14px; }
.ld-doc th, .ld-doc td { padding: 10px 12px; border-bottom: 1px solid #eef0f4; border-right: 1px solid #eef0f4; vertical-align: top; }
.ld-doc th { background: #f5f7fb; color: var(--ld-ink); font-weight: 800; }
.ld-doc tr > :last-child { border-right: 0; }
.ld-doc tr:last-child > * { border-bottom: 0; }
.ld-doc ul, .ld-doc ol { margin: 0 0 12px 20px; }

.ld-doc .etc_txt_title {
  display: block;
  margin: 36px 0 12px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--ld-ink);
  color: var(--ld-ink);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.035em;
}

.ld-doc > .etc_txt_title:first-child, .ld-doc > :first-child .etc_txt_title:first-child { margin-top: 0; }

.ld-doc .etc_txt_stitle {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 28px 0 8px;
  color: var(--ld-ink);
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.ld-doc .etc_txt_stitle::before { content: ""; flex: none; width: 5px; height: 17px; border-radius: 3px; background: var(--ld-accent); }
.ld-doc .etc_txt_contents { margin: 0 0 10px; }
.ld-doc .etc_txt_dotline { margin: 6px 0; padding-left: 14px; position: relative; }
.ld-doc .mt20 { margin-top: 8px; }
.ld-doc .mt40 { margin-top: 32px; }
.ld-doc .ml20 { margin-left: 0; }
.ld-doc .ml30, .ld-doc .ml40 { margin-left: 16px; }

@media (width <= 1023px) {
  .ld-layout { grid-template-columns: 1fr; }
  .ld-side { position: static; max-height: 260px; }
  .ld-headingRow { flex-direction: column; align-items: flex-start; }
}

@media (width <= 640px) {
  .ld-in { width: calc(100% - 32px); }
  .ld-hero { padding: 20px 0 28px; }
  .ld-tabs { margin-bottom: 22px; }
  .ld-tab { padding: 8px 12px; font-size: 13.5px; }
  .ld-toolbar { width: 100%; }
  .ld-date { flex: 1; }
  .ld-date select { flex: 1; min-width: 0; }
  .ld-articles { padding: 24px 20px 28px; border-radius: 6px; }
  .ld-doc, .ld-body { font-size: 15px; }
}

@media print {
  .ld-hero, .ld-side, .sh-chrome, .sf-footer, .pf-section { display: none !important; }
  .ld-page { background: #fff; }
  .ld-layout { display: block; padding: 0; }
  .ld-articles { padding: 0; border: 0; box-shadow: none; }
}
