/* 배움결 아카데미 — Korean Financial Learning Academy
   Visual system: bright classroom, sage + terracotta, LMS syllabus
   Not a broker, news portal, magazine, or hero+4-card landing. */

:root {
  --bg: #f4f1ea;
  --bg-2: #ebe6db;
  --paper: #fffcf7;
  --ink: #1a211c;
  --ink-2: #3e4a44;
  --muted: #6b756f;
  --line: #d6dcd6;
  --brand: #1f6f5b;
  --brand-2: #155647;
  --brand-soft: #dce8e3;
  --accent: #c45c26;
  --accent-soft: #f6e6dc;
  --sky: #e4eef2;
  --ok: #1f6f5b;
  --warn: #b42318;
  --shadow: 0 10px 30px rgba(26, 33, 28, 0.06);
  --r: 22px;
  --r-lg: 32px;
  --wrap: 1120px;
  --header-h: 64px;
  --font: "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  --en: "DM Sans", "Noto Sans KR", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.7;
  font-size: 16px;
  letter-spacing: -0.01em;
}
img { max-width: 100%; height: auto; display: block; }
.board-visual img { width: 100%; aspect-ratio: 640 / 520; }
a { color: var(--brand-2); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--brand); }
button, input, textarea, select { font-family: inherit; }
h1, h2, h3 { line-height: 1.28; letter-spacing: -0.03em; margin: 0 0 0.6em; }
p { margin: 0 0 1em; }
ul { margin: 0; }

.skip {
  position: absolute;
  left: 12px;
  top: -48px;
  background: var(--brand);
  color: #fff;
  padding: 8px 14px;
  border-radius: 10px;
  z-index: 80;
}
.skip:focus { top: 12px; }

.wrap {
  width: min(100% - 32px, var(--wrap));
  margin-inline: auto;
}

/* Header — slim academy bar, not a dark finance nav */
.mast {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(244, 241, 234, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.mast-row {
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  min-width: 0;
}
.logo-mark {
  width: 36px;
  height: 36px;
  flex: none;
  display: block;
}
.logo-mark svg {
  display: block;
  width: 36px;
  height: 36px;
}
.logo strong {
  display: block;
  font-size: 18px;
  letter-spacing: -0.04em;
}
.logo em {
  display: block;
  font-style: normal;
  font-family: var(--en);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.menu-btn {
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: 12px;
  display: none;
  place-items: center;
  gap: 5px;
  flex-direction: column;
  cursor: pointer;
}
.menu-btn span {
  display: block;
  width: 16px;
  height: 1.5px;
  background: var(--ink);
}
.nav {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav a {
  text-decoration: none;
  color: var(--ink-2);
  font-size: 14.5px;
  padding: 8px 10px;
  border-radius: 10px;
}
.nav a:hover, .nav a.is-on { background: var(--brand-soft); color: var(--brand-2); }
.nav .nav-letter {
  margin-left: 6px;
  background: var(--brand);
  color: #fff !important;
  padding: 10px 14px;
}

/* Classroom gate — first screen, not a generic hero */
.gate {
  padding: 28px 0 12px;
}
.gate-board {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 28px 22px 24px;
  box-shadow: var(--shadow);
}
.en-label {
  font-family: var(--en);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brand);
  font-weight: 600;
  margin: 0 0 10px;
}
.gate h1 {
  font-size: clamp(1.7rem, 6.4vw, 2.7rem);
  font-weight: 700;
  margin-bottom: 14px;
}
.gate .lede {
  color: var(--ink-2);
  font-size: 1.05rem;
  margin-bottom: 18px;
}
.subject-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--brand-soft);
  color: var(--brand-2);
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 13.5px;
  text-decoration: none;
}
.chip:hover { background: #cfe0d9; color: var(--brand-2); }
.actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 18px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 12px 18px;
  border-radius: 16px;
  text-decoration: none;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  font-size: 16px;
}
.btn-fill { background: var(--brand); color: #fff !important; }
.btn-fill:hover { background: var(--brand-2); }
.btn-line { background: transparent; color: var(--ink) !important; border-color: var(--line); }
.btn-line:hover { background: var(--bg-2); }
.btn-accent { background: var(--accent); color: #fff !important; }
.btn-accent:hover { background: #a84b1d; }
.btn[disabled], .btn.is-wait { opacity: 0.7; pointer-events: none; }
.note-line {
  font-size: 13.5px;
  color: var(--muted);
  margin: 0;
}

.today-strip {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}
.today-card {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 12px;
  align-items: center;
  background: var(--bg);
  border-radius: 18px;
  padding: 14px;
  text-decoration: none;
  color: inherit;
  border: 1px solid transparent;
}
.today-card:hover { border-color: var(--brand-soft); }
.today-card .n {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-family: var(--en);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  background: var(--brand-soft);
  color: var(--brand-2);
  text-align: center;
  line-height: 1.2;
}
.today-card.alt .n { background: var(--accent-soft); color: var(--accent); }
.today-card b { display: block; font-size: 15px; }
.today-card span { color: var(--muted); font-size: 13px; }
.today-card small {
  font-family: var(--en);
  font-size: 12px;
  color: var(--brand);
}

/* Syllabus track */
.block { padding: 42px 0; }
.block h2 { font-size: clamp(1.4rem, 4.5vw, 1.9rem); }
.block .sub {
  color: var(--ink-2);
  margin-bottom: 22px;
  max-width: 40em;
}
.path-rail {
  position: relative;
  display: grid;
  gap: 14px;
}
.path-rail::before {
  content: "";
  position: absolute;
  left: 27px;
  top: 24px;
  bottom: 24px;
  width: 2px;
  background: repeating-linear-gradient(to bottom, var(--line) 0 8px, transparent 8px 14px);
}
.step {
  position: relative;
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}
.step-no {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  background: var(--paper);
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  font-family: var(--en);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--brand);
  z-index: 1;
}
.step-body {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 16px 16px 14px;
  min-height: 56px;
}
.step:hover .step-body { border-color: var(--brand); }
.step-body h3 { font-size: 1.08rem; margin-bottom: 6px; }
.step-body p { font-size: 14.5px; color: var(--ink-2); margin-bottom: 10px; }
.meta-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.pill {
  font-size: 12.5px;
  background: var(--bg);
  border-radius: 999px;
  padding: 4px 10px;
  color: var(--ink-2);
}
.pill.lv { background: var(--brand-soft); color: var(--brand-2); }

/* 5-minute lesson ticket */
.five {
  background: linear-gradient(180deg, #1f6f5b 0%, #155647 100%);
  color: #f7fffb;
  border-radius: var(--r-lg);
  padding: 26px 22px;
}
.five .en-label { color: #d7efe6; }
.five h2 { color: #fff; }
.five p { color: #d7efe6; }
.five-q {
  font-size: clamp(1.25rem, 4.2vw, 1.7rem);
  font-weight: 700;
  line-height: 1.35;
  margin: 10px 0 18px;
}
.five .btn-fill { background: #fff; color: var(--brand-2) !important; }
.five .mins {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,.14);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 13px;
  margin-bottom: 14px;
}

/* Quiz lab */
.lab {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 22px;
  box-shadow: var(--shadow);
}
.q-card { display: none; }
.q-card.is-on { display: block; }
.q-progress {
  height: 8px;
  background: var(--bg-2);
  border-radius: 99px;
  overflow: hidden;
  margin: 8px 0 18px;
}
.q-progress > span {
  display: block;
  height: 100%;
  width: 20%;
  background: var(--brand);
  border-radius: 99px;
  transition: width .25s ease;
}
.choices { display: grid; gap: 8px; }
.choice {
  text-align: left;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 14px;
  min-height: 52px;
  cursor: pointer;
  color: var(--ink);
}
.choice:hover, .choice.is-pick { border-color: var(--brand); background: var(--brand-soft); }
.lab-result { display: none; }
.lab-result.is-on { display: block; }
.result-badge {
  display: inline-block;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 999px;
  padding: 8px 14px;
  font-weight: 700;
  margin-bottom: 10px;
}

/* Indicator wall */
.wall { display: grid; gap: 12px; }
.entry {
  background: var(--paper);
  border-radius: var(--r);
  padding: 18px 16px;
  border: 1px solid var(--line);
}
.entry h3 { font-size: 1.1rem; margin-bottom: 8px; }
.entry .code {
  font-family: var(--en);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.facts { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.facts li {
  background: var(--bg);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 14.5px;
}
.facts b { display: block; font-size: 12px; color: var(--brand); margin-bottom: 2px; }

/* Company study flow */
.flow {
  background: var(--paper);
  border-radius: var(--r-lg);
  padding: 8px 18px 22px;
  border: 1px solid var(--line);
}
.flow-item {
  padding: 16px 4px;
  border-bottom: 1px dashed var(--line);
}
.flow-item:last-of-type { border-bottom: 0; }
.flow-item .en {
  font-family: var(--en);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}
.flow-item h3 { font-size: 1.05rem; margin: 4px 0; }
.flow-item p { margin: 0; color: var(--ink-2); font-size: 14.5px; }
.flow-arrow {
  text-align: center;
  color: var(--brand);
  font-size: 18px;
  line-height: 1;
  margin: -6px 0;
}

/* Topic board */
.board {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.topic {
  flex: 1 1 140px;
  min-width: 140px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px;
  text-decoration: none;
  color: inherit;
}
.topic:hover { border-color: var(--brand); }
.topic b { display: block; margin-bottom: 4px; }
.topic span { color: var(--muted); font-size: 13px; }

/* Letter desk form */
.desk {
  background: var(--paper);
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  overflow: hidden;
}
.desk-head {
  background: var(--sky);
  padding: 22px 20px 16px;
}
.desk-head h2 { margin-bottom: 8px; }
.desk-body { padding: 20px; }
.field { margin-bottom: 14px; }
.field label {
  display: block;
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 6px;
}
.field .req { color: var(--accent); }
.field input, .field textarea, .field select {
  width: 100%;
  min-height: 52px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  background: #fff;
  font-size: 16px; /* iOS zoom prevent */
  color: var(--ink);
}
.field textarea { min-height: 120px; resize: vertical; }
.field input:focus, .field textarea:focus {
  outline: 2px solid var(--brand);
  outline-offset: 1px;
  border-color: var(--brand);
}
.field .err {
  display: none;
  color: var(--warn);
  font-size: 13px;
  margin-top: 6px;
}
.field.is-bad input, .field.is-bad textarea { border-color: var(--warn); }
.field.is-bad .err { display: block; }
.check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 14px;
  color: var(--ink-2);
  margin: 8px 0 16px;
}
.check input {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  flex: none;
  accent-color: var(--brand);
}
.form-status {
  display: none;
  border-radius: 14px;
  padding: 12px 14px;
  margin-bottom: 12px;
  font-size: 14.5px;
}
.form-status.is-ok { display: block; background: var(--brand-soft); color: var(--brand-2); }
.form-status.is-bad { display: block; background: #fde8e6; color: var(--warn); }
.form-status.is-info { display: block; background: var(--accent-soft); color: #7a3512; }

/* Article / inner pages */
.crumb {
  font-size: 13px;
  color: var(--muted);
  padding: 18px 0 0;
}
.crumb a { color: var(--muted); text-decoration: none; }
.page-head { padding: 12px 0 8px; }
.page-head h1 { font-size: clamp(1.6rem, 5vw, 2.2rem); }
.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted);
  font-size: 13.5px;
  margin-bottom: 16px;
}
.prose {
  background: var(--paper);
  border-radius: var(--r-lg);
  padding: 22px 18px 28px;
  border: 1px solid var(--line);
}
.prose h2 { font-size: 1.25rem; margin-top: 1.4em; }
.prose h3 { font-size: 1.05rem; margin-top: 1.1em; }
.prose p, .prose li { color: var(--ink-2); }
.prose ul, .prose ol { padding-left: 1.2em; margin-bottom: 1em; }
.toc {
  background: var(--bg);
  border-radius: 16px;
  padding: 14px 16px;
  margin: 0 0 20px;
}
.toc strong { display: block; margin-bottom: 8px; }
.toc a { display: block; text-decoration: none; padding: 4px 0; color: var(--ink-2); }
.take {
  background: var(--brand-soft);
  border-radius: 16px;
  padding: 16px;
  margin-top: 24px;
}
.take h2 { margin-top: 0; }
.related { display: grid; gap: 10px; margin-top: 12px; }
.related a {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
  text-decoration: none;
  color: inherit;
}
.related a:hover { border-color: var(--brand); }

.course-lessons { display: grid; gap: 10px; }
.lesson-row {
  display: grid;
  grid-template-columns: 42px 1fr auto;
  gap: 10px;
  align-items: center;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px 14px;
  text-decoration: none;
  color: inherit;
}
.lesson-row:hover { border-color: var(--brand); }
.lesson-row .i {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--brand-soft);
  color: var(--brand-2);
  display: grid;
  place-items: center;
  font-family: var(--en);
  font-weight: 700;
  font-size: 13px;
}
.lesson-row b { display: block; }
.lesson-row span { font-size: 13px; color: var(--muted); }

.dict-list { display: grid; gap: 10px; }
.dict-item {
  background: var(--paper);
  border-radius: 16px;
  padding: 14px 16px;
  border: 1px solid var(--line);
}
.dict-item h2 { font-size: 1.05rem; margin: 0 0 6px; }
.dict-item p { margin: 0; color: var(--ink-2); font-size: 14.5px; }

.card-list { display: grid; gap: 12px; }
.art-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 16px;
  text-decoration: none;
  color: inherit;
}
.art-card:hover { border-color: var(--brand); }
.art-card h2 { font-size: 1.08rem; margin-bottom: 6px; }
.art-card p { font-size: 14.5px; color: var(--ink-2); margin: 0; }

.callout {
  background: var(--accent-soft);
  border-radius: 16px;
  padding: 14px 16px;
  font-size: 14.5px;
  color: #5c2e14;
  margin: 16px 0;
}

/* Footer */
.end {
  margin-top: 48px;
  background: #1a211c;
  color: #d7ddd8;
  padding: 36px 0 24px;
}
.end a { color: #eef6f2; text-decoration: none; }
.end a:hover { text-decoration: underline; }
.end-grid {
  display: grid;
  gap: 22px;
}
.end strong { color: #fff; display: block; margin-bottom: 8px; }
.end ul { list-style: none; padding: 0; }
.end li { margin: 6px 0; font-size: 14.5px; }
.end .tiny {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid #334038;
  font-size: 13px;
  color: #a7b0aa;
}
.end .tiny p { margin-bottom: 8px; }

.legal p { color: var(--ink-2); }

@media (min-width: 720px) {
  .actions { flex-direction: row; }
  .actions .btn { min-width: 180px; }
  .today-strip { grid-template-columns: 1fr 1fr; }
  .wall { grid-template-columns: 1fr 1fr; }
  .end-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; }
  .gate-board { padding: 40px 40px 32px; }
  .prose { padding: 32px 36px 40px; }
  .desk { display: grid; grid-template-columns: 0.9fr 1.1fr; }
  .desk-head { padding: 36px 32px; }
  .desk-body { padding: 32px; }
}

@media (min-width: 900px) {
  .menu-btn { display: none !important; }
  .gate-board {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 28px;
    align-items: center;
  }
  .board-visual { display: block; }
  .path-rail { gap: 16px; }
  .step { grid-template-columns: 64px 1fr; }
}

@media (max-width: 899px) {
  .menu-btn { display: grid; }
  .nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: stretch;
    padding: 10px 16px 16px;
  }
  .nav.is-open { display: flex; }
  .nav a { padding: 12px 10px; min-height: 44px; }
  .nav .nav-letter { margin: 8px 0 0; text-align: center; }
  .board-visual { display: none; }
}

@media (max-width: 430px) {
  .wrap { width: min(100% - 24px, var(--wrap)); }
  .gate { padding-top: 18px; }
  .step-body { padding: 14px; }
  .today-card small { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .q-progress > span { transition: none; }
}
