/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:          #0a0a0a;
  --surface:     #111111;
  --surface2:    #1a1a1a;
  --border:      #2a2a2a;
  --border-hi:   #3a3a3a;
  --accent:      #F5C518;
  --accent-hov:  #FFD740;
  --accent-dim:  rgba(245, 197, 24, 0.13);
  --accent-dim2: rgba(245, 197, 24, 0.06);
  --text:        #F0F0F0;
  --text-2:      #CCCCCC;
  --text-muted:  #777777;
  --danger:      #FF4444;
  --success:     #22C55E;
  --radius:      8px;
  --radius-sm:   5px;
  --font:        'Pretendard Variable', 'Pretendard', -apple-system, BlinkMacSystemFont, sans-serif;
}

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 18px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ===== Layout ===== */
.app-layout {
  display: grid;
  grid-template-columns: 320px 1fr 360px;
  height: 100vh;
  overflow: hidden;
}

/* ===== Sidebar ===== */
.sidebar {
  background: var(--surface);
  border-right: 2px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.sidebar-header {
  padding: 24px 20px 20px;
  border-bottom: 2px solid var(--border);
}

.logo {
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 10px;
  letter-spacing: -0.02em;
}

.logo i { color: var(--accent); }

.logo-sub {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 5px;
  font-weight: 500;
}

.nav-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.topic-nav {
  padding: 20px;
  border-bottom: 2px solid var(--border);
}

.topic-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 12px 16px;
  background: transparent;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  font-family: var(--font);
  margin-bottom: 8px;
  transition: all 0.15s;
  text-align: left;
}

.topic-btn:hover {
  border-color: var(--accent);
  color: var(--text);
  background: var(--accent-dim2);
}

.topic-btn.active {
  border-color: var(--accent);
  border-left: 4px solid var(--accent);
  background: var(--accent-dim);
  color: var(--accent);
  font-weight: 700;
}

.sidebar-section {
  padding: 20px;
  border-bottom: 2px solid var(--border);
  flex: 1;
}

.section-copy {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 14px;
}

/* ===== Upload ===== */
.upload-area {
  border: 2px dashed var(--border-hi);
  border-radius: var(--radius);
  padding: 24px 16px;
  text-align: center;
  cursor: pointer;
  transition: all 0.15s;
  background: var(--surface2);
}

.upload-area:hover, .upload-area.drag-over {
  border-color: var(--accent);
  background: var(--accent-dim);
}

.upload-icon {
  font-size: 30px;
  margin-bottom: 10px;
  color: var(--accent);
}

.upload-area p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
}

.upload-link {
  color: var(--accent);
  text-decoration: underline;
  cursor: pointer;
  font-weight: 600;
}

.upload-status {
  margin-top: 10px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  background: var(--surface2);
  border-left: 3px solid var(--border);
}

.upload-status.success { color: var(--success); border-left-color: var(--success); }
.upload-status.error   { color: var(--danger);  border-left-color: var(--danger); }
.upload-status.loading { color: var(--accent);  border-left-color: var(--accent); }
.hidden { display: none !important; }

/* ===== Form inputs ===== */
.input-field, .textarea-field {
  width: 100%;
  padding: 10px 14px;
  background: var(--surface2);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 15px;
  font-family: var(--font);
  margin-bottom: 8px;
  outline: none;
  transition: border-color 0.15s;
}

.input-field:focus, .textarea-field:focus {
  border-color: var(--accent);
}

.input-field::placeholder, .textarea-field::placeholder {
  color: var(--text-muted);
}

.textarea-field { resize: vertical; min-height: 80px; }

.btn-primary {
  width: 100%;
  padding: 11px 16px;
  background: var(--accent);
  border: none;
  border-radius: var(--radius-sm);
  color: #000;
  font-size: 15px;
  font-weight: 700;
  font-family: var(--font);
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

.btn-primary:hover  { background: var(--accent-hov); }
.btn-primary:active { transform: scale(0.98); }
.btn-primary:disabled { opacity: 0.4; cursor: not-allowed; }

.sidebar-footer {
  padding: 16px 20px;
  border-top: 2px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.docs-link {
  font-size: 14px;
  color: var(--text-muted);
  text-decoration: none;
  padding: 6px 0;
  display: flex;
  align-items: center;
  gap: 9px;
  transition: color 0.15s;
  font-weight: 500;
}

.docs-link:hover { color: var(--accent); }

/* ===== Chat area ===== */
.chat-area {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--bg);
}

.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-bottom: 2px solid var(--border);
  background: var(--surface);
}

.brand-nav,
.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-nav-btn {
  padding: 8px 11px;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font: 700 14px var(--font);
  cursor: pointer;
}

.brand-nav-btn:hover,
.brand-nav-btn.active {
  color: var(--accent);
  border-color: var(--border-hi);
  background: var(--accent-dim2);
}

.domain-badge {
  font-size: 15px;
  font-weight: 700;
  padding: 7px 18px;
  border-radius: 4px;
  background: var(--accent-dim);
  color: var(--accent);
  border: 1.5px solid var(--accent);
  letter-spacing: -0.01em;
}

.btn-ghost {
  padding: 8px 14px;
  background: transparent;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  cursor: pointer;
  font-size: 14px;
  font-family: var(--font);
  font-weight: 600;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  gap: 7px;
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ===== Messages ===== */
.messages {
  flex: 1;
  overflow-y: auto;
  padding: 28px 28px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.welcome-msg {
  text-align: center;
  padding: 70px 20px;
}

.welcome-icon {
  font-size: 52px;
  margin-bottom: 20px;
  color: var(--accent);
}

.welcome-msg h2 {
  font-size: 26px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

.welcome-msg > p {
  font-size: 17px;
  color: var(--text-muted);
}

/* ===== Content hub / markdown-style pages ===== */
.content-page {
  width: min(940px, 100%);
  margin: 0 auto;
  padding: 40px 28px 70px;
}

.content-kicker {
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .11em;
  margin-bottom: 16px;
}

.content-page h1 {
  font-size: clamp(30px, 4vw, 52px);
  line-height: 1.18;
  letter-spacing: -.045em;
  margin-bottom: 18px;
}

.content-page h1 mark {
  color: var(--accent);
  background: transparent;
}

.content-lead {
  max-width: 740px;
  color: var(--text-2);
  font-size: 18px;
  line-height: 1.8;
}

.home-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 28px 0; }
.content-cta, .content-secondary {
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font: 800 15px var(--font);
  cursor: pointer;
}
.content-cta { border: 0; color: #000; background: var(--accent); }
.content-secondary { border: 1.5px solid var(--border-hi); color: var(--text-2); background: var(--surface2); }
.content-cta:hover { background: var(--accent-hov); }
.content-secondary:hover { color: var(--accent); border-color: var(--accent); }

.home-stats { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; margin: 38px 0 58px; }
.home-stats div { min-height: 100px; padding: 20px; border-right: 1px solid var(--border); background: var(--surface); }
.home-stats div:last-child { border-right: 0; }
.home-stats strong { display: block; color: var(--accent); font-size: 32px; line-height: 1; margin-bottom: 9px; }
.home-stats span { color: var(--text-muted); font-size: 13px; line-height: 1.45; }

.content-section { margin: 46px 0; }
.section-heading { display: flex; align-items: baseline; gap: 12px; margin-bottom: 18px; }
.section-heading span { color: var(--accent); font-weight: 800; font-size: 14px; }
.section-heading h2 { font-size: 25px; }
.home-module-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.home-module { min-height: 220px; text-align: left; padding: 20px; background: var(--surface2); border: 1.5px solid var(--border); border-radius: var(--radius); color: var(--text); cursor: pointer; transition: .15s; }
.home-module:hover { border-color: var(--accent); transform: translateY(-2px); }
.home-module > i { color: var(--accent); font-size: 24px; margin-bottom: 20px; }
.home-module strong, .home-module span, .home-module em { display: block; }
.home-module strong { font-size: 17px; margin-bottom: 8px; }
.home-module span { color: var(--text-muted); font-size: 14px; line-height: 1.6; }
.home-module em { color: var(--accent); font-size: 13px; font-style: normal; font-weight: 700; margin-top: 18px; }
.section-intro { max-width: 760px; margin: -4px 0 20px; color: var(--text-2); font-size: 16px; }
.section-intro strong { color: var(--accent); }
.product-explainer-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.product-explainer { padding: 20px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.product-explainer > i { color: var(--accent); font-size: 22px; margin-bottom: 13px; }
.product-explainer h3 { font-size: 18px; margin-bottom: 7px; }
.product-explainer > p { min-height: 66px; color: var(--text-2); font-size: 14px; line-height: 1.65; }
.product-explainer > div { margin-top: 11px; padding-top: 10px; border-top: 1px solid var(--border); display: grid; gap: 3px; }
.product-explainer strong { color: var(--accent); font-size: 12px; }
.product-explainer span { color: var(--text-muted); font-size: 13px; line-height: 1.55; }

.markdown-card { padding: 28px; background: var(--surface2); border: 1.5px solid var(--border); border-radius: var(--radius); }
.markdown-label { color: var(--accent); font-size: 11px; font-weight: 800; letter-spacing: .1em; }
.markdown-card h2 { font-size: 26px; line-height: 1.35; margin: 10px 0 20px; }
.markdown-card blockquote { padding: 14px 18px; color: var(--text-2); background: var(--accent-dim2); border-left: 3px solid var(--accent); }
.markdown-columns { display: grid; grid-template-columns: repeat(2, 1fr); gap: 30px; margin-top: 26px; }
.markdown-columns h3 { margin-bottom: 8px; font-size: 16px; }
.markdown-columns ul { padding-left: 19px; color: var(--text-muted); font-size: 14px; }
.content-disclaimer { margin-top: 28px; color: var(--text-muted); font-size: 12px; }

/* ===== Quiz ===== */
.quiz-page { max-width: 780px; padding-top: 75px; }
.quiz-topline { display: flex; justify-content: space-between; align-items: center; color: var(--text-muted); font-size: 14px; }
.quiz-topline .content-kicker { margin: 0; }
.quiz-progress { height: 6px; overflow: hidden; background: var(--surface2); border-radius: 999px; margin: 18px 0 45px; }
.quiz-progress i { display: block; height: 100%; background: var(--accent); border-radius: inherit; transition: width .2s; }
.quiz-choices { display: grid; gap: 10px; margin-top: 30px; }
.quiz-choice { display: flex; align-items: center; gap: 14px; padding: 17px; text-align: left; color: var(--text-2); background: var(--surface2); border: 1.5px solid var(--border); border-radius: var(--radius); cursor: pointer; font: 600 16px var(--font); transition: .15s; }
.quiz-choice:hover:not(:disabled) { border-color: var(--accent); color: var(--text); }
.quiz-choice span { display: inline-flex; width: 28px; height: 28px; justify-content: center; align-items: center; color: var(--accent); background: var(--accent-dim); border-radius: 50%; font-size: 13px; }
.quiz-choice.correct { color: #a7f3d0; border-color: var(--success); background: rgba(34,197,94,.1); }
.quiz-choice.incorrect { color: #fecaca; border-color: var(--danger); background: rgba(255,68,68,.1); }
.quiz-feedback { margin-top: 20px; padding: 18px; border: 1px solid var(--border); border-radius: var(--radius); }
.quiz-feedback.correct { border-left: 4px solid var(--success); }
.quiz-feedback.incorrect { border-left: 4px solid var(--danger); }
.quiz-feedback p { color: var(--text-muted); margin: 7px 0 16px; font-size: 15px; }
.result-ring { display: flex; justify-content: center; align-items: baseline; width: 150px; height: 150px; margin: 28px 0; border: 8px solid var(--accent); border-radius: 50%; }
.result-ring strong { color: var(--accent); font-size: 54px; line-height: 140px; }.result-ring span { color: var(--text-muted); }
.quiz-review { display: grid; gap: 10px; margin: 26px 0; }.review-row { display: flex; gap: 12px; padding: 14px; background: var(--surface2); border: 1px solid var(--border); border-radius: var(--radius-sm); }.review-row > span { color: var(--accent); font-weight: 800; }.review-row strong { font-size: 14px; }.review-row p { color: var(--text-muted); font-size: 13px; margin-top: 4px; }

/* ===== Simulation guide ===== */
.simulation-page { max-width: 850px; }.simulation-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 38px 0; }.simulation-steps div { padding: 18px; border: 1.5px solid var(--border); background: var(--surface2); border-radius: var(--radius); }.simulation-steps span { color: var(--accent); font-size: 13px; font-weight: 800; }.simulation-steps h3 { margin: 10px 0 5px; font-size: 17px; }.simulation-steps p, .warning-card p { color: var(--text-muted); font-size: 14px; }.warning-card h2 { font-size: 19px; }.warning-card h2 i { color: var(--accent); }

.hero-layout {
  margin-top: 28px;
  display: grid;
  grid-template-columns: minmax(280px, 1.1fr) minmax(360px, 1fr);
  gap: 18px;
  text-align: left;
}

.hero-focus,
.course-card {
  background: var(--surface2);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
}

.hero-focus {
  padding: 22px;
}

.hero-focus-badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-dim);
  border: 1px solid var(--accent);
  border-radius: 999px;
  padding: 4px 10px;
  margin-bottom: 14px;
}

.hero-focus h3 {
  font-size: 22px;
  margin-bottom: 10px;
}

.hero-focus p {
  color: var(--text-2);
  font-size: 16px;
}

.hero-bullets {
  margin-top: 16px;
  padding-left: 18px;
  display: grid;
  gap: 10px;
}

.hero-bullets li {
  color: var(--text-2);
  font-size: 15px;
}

.course-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.course-card {
  text-align: left;
  padding: 18px;
  cursor: pointer;
  transition: border-color 0.15s, transform 0.1s;
}

.course-card:hover,
.course-card.active {
  border-color: var(--accent);
  transform: translateY(-1px);
}

.course-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.course-card-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-dim);
  color: var(--accent);
}

.course-card p {
  color: var(--text-muted);
  font-size: 14px;
}

.quick-examples { margin-top: 30px; }

.examples-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.example-chip {
  display: inline-block;
  margin: 5px;
  padding: 8px 18px;
  background: var(--surface2);
  border: 1.5px solid var(--border);
  border-radius: 4px;
  color: var(--text-muted);
  font-size: 15px;
  font-family: var(--font);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}

.example-chip:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-dim);
}

/* Message bubbles */
.msg { display: flex; gap: 12px; align-items: flex-start; }
.msg.user { flex-direction: row-reverse; }

.msg-avatar {
  width: 38px; height: 38px;
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 17px;
  flex-shrink: 0;
  background: var(--surface2);
  border: 1.5px solid var(--border);
  color: var(--accent);
}

.msg.user .msg-avatar { border-color: var(--accent); }

.msg-bubble {
  max-width: 72%;
  padding: 14px 20px;
  border-radius: var(--radius);
  line-height: 1.8;
  font-size: 17px;
}

.msg.user .msg-bubble {
  background: var(--accent-dim);
  border: 1.5px solid var(--accent);
  border-radius: var(--radius) 4px var(--radius) var(--radius);
  color: var(--text);
}

.msg.bot .msg-bubble {
  background: var(--surface2);
  border: 1.5px solid var(--border);
  border-radius: 4px var(--radius) var(--radius) var(--radius);
}

.msg-meta {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 7px;
  display: flex;
  gap: 10px;
  align-items: center;
}

.ref-btn {
  font-size: 12px;
  padding: 3px 10px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--accent);
  cursor: pointer;
  font-family: var(--font);
  font-weight: 600;
  transition: all 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.ref-btn:hover {
  border-color: var(--accent);
  background: var(--accent-dim);
}

/* Typing indicator */
.typing-dots { display: flex; gap: 5px; align-items: center; padding: 4px 0; }
.typing-dots span {
  width: 7px; height: 7px;
  background: var(--accent);
  border-radius: 50%;
  animation: bounce 1.2s infinite;
  opacity: 0.5;
}
.typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.typing-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes bounce {
  0%, 80%, 100% { transform: translateY(0); opacity: 0.4; }
  40% { transform: translateY(-7px); opacity: 1; }
}

/* ===== Input area ===== */
.chat-input-area {
  padding: 16px 24px;
  border-top: 2px solid var(--border);
  background: var(--surface);
}

.input-row { display: flex; gap: 10px; align-items: flex-end; }

.question-input {
  flex: 1;
  padding: 13px 18px;
  background: var(--surface2);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 18px;
  font-family: var(--font);
  resize: none;
  outline: none;
  max-height: 140px;
  transition: border-color 0.15s;
  line-height: 1.5;
}

.question-input:focus { border-color: var(--accent); }
.question-input::placeholder { color: var(--text-muted); font-size: 16px; }

.send-btn {
  width: 50px; height: 50px;
  background: var(--accent);
  border: none;
  border-radius: var(--radius-sm);
  color: #000;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  font-size: 19px;
  transition: background 0.15s, transform 0.1s;
}

.send-btn:hover  { background: var(--accent-hov); }
.send-btn:active { transform: scale(0.95); }
.send-btn:disabled { opacity: 0.4; cursor: not-allowed; }

.input-hint {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 9px;
}

.input-hint span { color: var(--accent); font-weight: 700; }

/* ===== Reference panel ===== */
.ref-panel {
  background: var(--surface);
  border-left: 2px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.ref-header {
  padding: 16px 20px;
  border-bottom: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ref-header h3 {
  font-size: 16px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.ref-header h3 i { color: var(--accent); }

.ref-list {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.simulation-panel {
  border-top: 2px solid var(--border);
  background: var(--surface);
}

.simulation-header {
  border-top: none;
}

.sim-body {
  padding: 16px 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.sim-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.sim-select {
  width: 100%;
  padding: 11px 12px;
  background: var(--surface2);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 15px;
  font-family: var(--font);
}

.preset-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.sim-preset {
  padding: 9px 8px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  background: var(--surface2);
  color: var(--text-2);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.sim-preset:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.sim-control {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sim-control-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 14px;
}

.sim-control-head strong {
  color: var(--accent);
}

.sim-control input[type="range"] {
  width: 100%;
}

.sim-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.sim-metric {
  background: var(--surface2);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
}

.sim-metric span {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.sim-metric strong {
  font-size: 18px;
  color: var(--accent);
}

.sim-allocation,
.sim-note {
  background: var(--surface2);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 14px;
  line-height: 1.7;
}

.sim-allocation {
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: var(--text-2);
}

.sim-note {
  color: var(--text-2);
}

.sim-ask-btn {
  margin-top: 2px;
}

.ref-empty {
  font-size: 15px;
  color: var(--text-muted);
  text-align: center;
  padding: 30px 0;
}

.ref-card {
  background: var(--surface2);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  cursor: pointer;
  transition: border-color 0.15s;
}

.ref-card:hover { border-color: var(--accent); }

.ref-card-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}

.ref-card-score {
  font-size: 12px;
  color: #000;
  background: var(--accent);
  padding: 2px 8px;
  border-radius: 3px;
  display: inline-block;
  margin-bottom: 8px;
  font-weight: 700;
}

.ref-card-content {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* ===== Responsive ===== */
@media (max-width: 960px) {
  .app-layout { grid-template-columns: 260px 1fr; }
  .ref-panel { display: none; }
  .hero-layout,
  .course-grid,
  .home-module-grid,
  .product-explainer-grid,
  .simulation-steps { grid-template-columns: 1fr; }
  .chat-header { align-items: flex-start; gap: 12px; }
  .brand-nav { flex-wrap: wrap; }
  .header-actions .domain-badge { display: none; }
}
@media (max-width: 640px) {
  .app-layout { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .chat-header { padding: 10px 12px; }
  .brand-nav-btn { padding: 7px; font-size: 12px; }
  .content-page { padding: 30px 16px 55px; }
  .home-stats, .markdown-columns { grid-template-columns: 1fr; }
  .home-stats div { border-right: 0; border-bottom: 1px solid var(--border); }
  .home-stats div:last-child { border-bottom: 0; }
}

/* ===== Light theme & off-canvas panels ===== */
:root {
  --bg: #f6f8fc;
  --surface: #ffffff;
  --surface2: #f8fafc;
  --border: #e2e8f0;
  --border-hi: #cbd5e1;
  --accent: #2563eb;
  --accent-hov: #1d4ed8;
  --accent-dim: rgba(37, 99, 235, 0.12);
  --accent-dim2: rgba(37, 99, 235, 0.05);
  --text: #14213d;
  --text-2: #3e4c63;
  --text-muted: #6b7a90;
  --danger: #dc2626;
  --success: #16a34a;
}

html, body { background: var(--bg); }
body { overflow: hidden; }
.app-layout { display: block; height: 100vh; }

.sidebar,
.ref-panel {
  position: fixed;
  inset-block: 0;
  z-index: 30;
  width: min(360px, calc(100vw - 32px));
  box-shadow: 0 20px 48px rgba(15, 23, 42, 0.18);
  transition: transform 0.24s ease;
}

.sidebar {
  left: 0;
  border-right: 1px solid var(--border);
  transform: translateX(-105%);
}

.ref-panel {
  right: 0;
  border-left: 1px solid var(--border);
  transform: translateX(105%);
}

body.left-panel-open .sidebar { transform: translateX(0); }
body.right-panel-open .ref-panel { transform: translateX(0); }

.offcanvas-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  background: rgba(15, 23, 42, 0.34);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.offcanvas-backdrop.visible { opacity: 1; pointer-events: auto; }

.chat-area { min-height: 100vh; background: var(--bg); }
.chat-header { padding: 13px 22px; border-bottom: 1px solid var(--border); box-shadow: 0 2px 8px rgba(15, 23, 42, 0.03); }
.panel-title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.panel-close,
.panel-toggle {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-2);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font: 700 14px var(--font);
}
.panel-close { width: 34px; height: 34px; flex: 0 0 auto; }
.panel-toggle { display: inline-flex; align-items: center; gap: 7px; padding: 8px 11px; }
.panel-close:hover,
.panel-toggle:hover { color: var(--accent); border-color: var(--accent); background: var(--accent-dim2); }
.panel-toggle-right { margin-left: 2px; }

.topic-nav .nav-label:not(:first-child) { margin-top: 22px; }
.theory-menu-btn { align-items: center; gap: 9px; font-size: 13px; }
.day-menu-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 39px;
  padding: 3px 5px;
  border-radius: 5px;
  background: var(--accent-dim);
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
}
.topic-btn.theory-menu-btn.active .day-menu-number { background: var(--accent); color: #fff; }

/* 좌측: 학습과 계산 실습 / 우측: RAG 자료와 답변 근거 */
.sidebar .simulation-panel { border-top: 1px solid var(--border); }
.sidebar .simulation-panel .sim-body { padding-bottom: 26px; }
.ref-panel .rag-panel {
  flex: 0 0 auto;
  padding: 20px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.ref-panel .rag-panel .section-copy { margin-bottom: 14px; }
.ref-panel .rag-panel .text-ingest { margin-top: 4px; }
.ref-panel .ref-list { min-height: 180px; }

.theory-overview {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 30px 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.theory-overview div { padding: 20px; border-right: 1px solid var(--border); }
.theory-overview div:last-child { border-right: 0; }
.theory-overview strong { display: block; color: var(--accent); font-size: 17px; margin-bottom: 6px; }
.theory-overview span { color: var(--text-muted); font-size: 14px; line-height: 1.5; }
.theory-index-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.theory-day-card {
  position: relative;
  text-align: left;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  cursor: pointer;
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}
.theory-day-card:hover { transform: translateY(-3px); border-color: var(--accent); box-shadow: 0 12px 24px rgba(37, 99, 235, .1); }
.theory-day-card > .fa-solid { color: var(--accent); font-size: 22px; margin: 19px 0 13px; }
.theory-day-card h2 { margin: 0 0 9px; font-size: 20px; }
.theory-day-card p { color: var(--text-2); line-height: 1.65; margin: 0 0 14px; }
.theory-day-card small { display: block; color: var(--text-muted); line-height: 1.55; }
.theory-day-card em { display: block; margin-top: 18px; color: var(--accent); font-style: normal; font-weight: 750; font-size: 14px; }
.theory-day-number { color: var(--accent); font-size: 12px; font-weight: 800; letter-spacing: .08em; }
.glossary-hint { margin: 18px 0; color: var(--text-muted); font-size: 14px; line-height: 1.6; }
.glossary-hint i { color: var(--accent); margin-right: 4px; }

.theory-back { padding: 0; border: 0; background: none; color: var(--text-muted); font: 700 14px var(--font); cursor: pointer; }
.theory-back:hover { color: var(--accent); }
.theory-detail-heading { padding: 8px 0 10px; }
.theory-detail-heading > .fa-solid { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; margin: 9px 0 2px; border-radius: 50%; background: var(--accent-dim); color: var(--accent); font-size: 18px; }
.theory-detail-heading h1 { margin: 7px 0 6px; }
.theory-detail-heading p { max-width: 760px; color: var(--text-2); font-size: 16px; line-height: 1.58; }

/* 2일차 한국시장 매거진 섹션 */
.theory-day-2 .theory-lesson:nth-child(n+4) { position: relative; overflow: hidden; border-color: #bfdbfe; background: linear-gradient(135deg, #ffffff 0%, #f8fbff 100%); }
.theory-day-2 .theory-lesson:nth-child(n+4)::after { content: 'KOREA MARKET MAGAZINE'; position: absolute; top: 16px; right: 18px; color: rgba(37, 99, 235, .16); font-size: 10px; font-weight: 900; letter-spacing: .09em; }
.theory-day-2 .theory-lesson:nth-child(n+4) h2 { padding-right: 146px; }
.theory-progress { display: grid; grid-template-columns: repeat(5, 1fr); gap: 7px; margin: 10px 0 24px; }
.theory-progress i { height: 7px; border-radius: 99px; background: var(--border); }
.theory-progress i.done { background: var(--accent); }
.theory-goal, .theory-check, .theory-keywords { border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); }
.theory-goal { padding: 20px 22px; border-left: 4px solid var(--accent); }
.theory-goal strong, .theory-check strong, .theory-keywords > strong { color: var(--accent); font-size: 14px; }
.theory-goal p { margin: 8px 0 0; color: var(--text-2); line-height: 1.7; }
.theory-lesson-list { margin: 18px 0; display: flex; flex-direction: column; gap: 14px; }
.theory-lesson { display: grid; grid-template-columns: 44px 1fr; gap: 16px; padding: 24px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.theory-lesson > span { color: var(--accent); font-size: 13px; font-weight: 800; letter-spacing: .08em; }
.theory-lesson h2 { margin: 0 0 12px; font-size: 21px; }
.theory-lesson p { margin: 0 0 10px; color: var(--text-2); line-height: 1.8; }
.theory-lesson p:last-child { margin-bottom: 0; }
.theory-check { display: flex; gap: 14px; padding: 20px 22px; background: #f8fbff; }
.theory-check > i { color: var(--accent); padding-top: 2px; }
.theory-check p { margin: 7px 0 0; color: var(--text-2); line-height: 1.7; }
.theory-keywords { display: flex; align-items: center; gap: 18px; margin-top: 14px; padding: 16px 20px; }
.theory-keywords > div { display: flex; flex-wrap: wrap; gap: 7px; }
.theory-keywords span { padding: 5px 9px; border-radius: 99px; background: var(--accent-dim); color: var(--accent); font-size: 13px; font-weight: 700; }
.theory-actions { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 10px; align-items: center; margin: 28px 0 10px; }
.theory-actions .content-secondary { white-space: nowrap; }

/* ===== Interactive glossary ===== */
.glossary-term {
  display: inline;
  padding: 0 2px;
  border: 0;
  border-bottom: 2px dotted var(--accent);
  background: var(--accent-dim2);
  color: inherit;
  font: inherit;
  font-weight: 750;
  cursor: pointer;
}
.glossary-term:hover, .glossary-term:focus-visible { color: var(--accent); background: var(--accent-dim); outline: none; }
.glossary-modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; opacity: 0; pointer-events: none; transition: opacity .18s ease; }
.glossary-modal.open { opacity: 1; pointer-events: auto; }
.glossary-modal-backdrop { position: absolute; inset: 0; background: rgba(15, 23, 42, .48); }
.glossary-dialog { position: relative; width: min(620px, 100%); max-height: min(720px, calc(100vh - 40px)); overflow-y: auto; padding: 32px; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); box-shadow: 0 28px 80px rgba(15, 23, 42, .28); }
.glossary-close { position: absolute; top: 16px; right: 16px; display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid var(--border); border-radius: 7px; background: var(--surface2); color: var(--text-2); cursor: pointer; }
.glossary-close:hover { color: var(--accent); border-color: var(--accent); }
.glossary-label { color: var(--accent); font-size: 12px; font-weight: 800; letter-spacing: .1em; }
.glossary-dialog h2 { margin: 8px 42px 18px 0; font-size: 30px; line-height: 1.25; }
.glossary-names { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.glossary-names span { display: flex; flex-direction: column; gap: 4px; padding: 11px; border-radius: 8px; background: var(--surface2); color: var(--text-2); font-size: 13px; word-break: break-word; }
.glossary-names b { color: var(--text-muted); font-size: 11px; }
.glossary-summary { margin: 22px 0 12px; color: var(--text); font-size: 18px; font-weight: 700; line-height: 1.65; }
.glossary-detail { color: var(--text-2); line-height: 1.8; }
.glossary-note { margin-top: 22px; padding-top: 14px; border-top: 1px solid var(--border); color: var(--text-muted); font-size: 12px; line-height: 1.6; }
body.modal-open { overflow: hidden; }

.btn-primary,
.send-btn,
.content-cta { color: #fff; }
.ref-card-score { color: #fff; }
.msg.user .msg-bubble { color: var(--text); }
.domain-badge { border-color: #bfdbfe; }
.chat-area {
  height: 100vh;
  min-height: 0;
}

/* 본문은 중앙의 좁은 컬럼이 아니라, 헤더 아래 사용 가능한 전체 폭을 사용합니다. */
.messages {
  min-height: 0;
  flex: 1 1 auto;
  padding: 0;
  overscroll-behavior: contain;
}

.chat-header,
.chat-input-area,
.app-footer { flex: 0 0 auto; }
.app-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 34px; padding: 8px clamp(16px, 2.5vw, 32px); border-top: 1px solid var(--border); background: var(--surface); color: var(--text-muted); font-size: 11px; line-height: 1.35; }
.app-footer span:first-child { color: var(--text-2); font-weight: 750; }

.content-page {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 36px clamp(20px, 2.5vw, 48px) 72px;
}

.theory-detail-page { padding-top: 18px; }
.msg.bot .msg-bubble,
.course-card,
.hero-focus,
.home-module,
.markdown-card,
.quiz-choice,
.simulation-steps div,
.sim-metric,
.sim-allocation,
.sim-note,
.ref-card { box-shadow: 0 2px 7px rgba(15, 23, 42, 0.03); }

@media (max-width: 700px) {
  .chat-header { padding: 10px 12px; gap: 8px; }
  .panel-toggle span { display: none; }
  .panel-toggle { padding: 8px 10px; }
  .brand-nav { gap: 2px; }
  .brand-nav-btn { padding: 7px 6px; }
  .header-actions { gap: 5px; }
  .content-page { padding: 28px 16px 52px; }
  .theory-detail-page { padding-top: 34px; }
  .theory-overview, .theory-index-grid { grid-template-columns: 1fr; }
  .theory-overview div { border-right: 0; border-bottom: 1px solid var(--border); }
  .theory-overview div:last-child { border-bottom: 0; }
  .theory-actions { grid-template-columns: 1fr 1fr; }
  .theory-actions .content-cta { grid-column: 1 / -1; }
  .theory-lesson { grid-template-columns: 1fr; gap: 7px; padding: 20px; }
  .theory-keywords { align-items: flex-start; flex-direction: column; gap: 9px; }
  .glossary-dialog { padding: 26px 20px; }
  .glossary-names { grid-template-columns: 1fr; }
  .app-footer { align-items: flex-start; flex-direction: column; gap: 2px; padding: 7px 16px; }
}

/* ===== Allocation workbench ===== */
.simulation-page { max-width: 1240px; }
.simulation-workbench { margin-top: 28px; }
.simulation-workbench .simulation-panel {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: 0 14px 34px rgba(15, 23, 42, .08);
}
.simulation-header { padding: 22px 26px; background: linear-gradient(115deg, #eff6ff, #fff); }
.simulation-header > div { display: flex; flex-direction: column; gap: 3px; }
.simulation-header h3 { font-size: 21px; }
.simulation-eyebrow { color: var(--accent); font-size: 11px; font-weight: 800; letter-spacing: .11em; }
.simulation-live { display: inline-flex; align-items: center; gap: 6px; color: var(--success); font-size: 12px; font-weight: 750; }
.simulation-live i { font-size: 8px; }
.simulation-workbench .sim-body { display: grid; grid-template-columns: minmax(280px, .85fr) minmax(0, 1.15fr); gap: 24px; padding: 24px 26px; }
.sim-settings { display: flex; flex-direction: column; gap: 14px; padding: 20px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface2); }
.sim-settings .section-copy { margin: 0 0 2px; }
.sim-settings .sim-control { gap: 6px; }
.sim-settings .sim-select { background: var(--surface); }
.sim-settings input[type="range"] { accent-color: var(--accent); }
.sim-save-btn { margin-top: 4px; padding: 11px 13px; border: 1px solid #bfdbfe; border-radius: 8px; background: #eff6ff; color: var(--accent); font: 750 14px var(--font); cursor: pointer; }
.sim-save-btn:hover { border-color: var(--accent); background: var(--accent-dim); }
.sim-results { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.simulation-workbench .sim-metrics { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; }
.simulation-workbench .sim-metric { padding: 14px; background: #fff; }
.simulation-workbench .sim-metric strong { font-size: clamp(17px, 1.7vw, 23px); }
.simulation-workbench .sim-allocation { padding: 18px; background: #fff; }
.allocation-bar { display: flex; height: 12px; overflow: hidden; border-radius: 999px; background: #e2e8f0; }
.allocation-bar i { display: block; min-width: 0; transition: width .2s ease; }
.allocation-bar i:nth-child(1) { background: #2563eb; }
.allocation-bar i:nth-child(2) { background: #14b8a6; }
.allocation-bar i:nth-child(3) { background: #f59e0b; }
.allocation-legend { display: flex; flex-wrap: wrap; gap: 10px 16px; margin-top: 12px; color: var(--text-2); font-size: 13px; }
.allocation-legend span { display: inline-flex; align-items: center; gap: 5px; }
.allocation-legend b { width: 8px; height: 8px; border-radius: 50%; background: #2563eb; }
.allocation-legend span:nth-child(2) b { background: #14b8a6; }
.allocation-legend span:nth-child(3) b { background: #f59e0b; }
.sim-allocation small { margin-top: 10px; color: var(--text-muted); font-size: 12px; }
.simulation-workbench .sim-note { padding: 17px 18px; background: #f8fbff; border-color: #dbeafe; }
.sim-compare { min-height: 48px; padding: 13px 16px; border: 1px dashed var(--border-hi); border-radius: 9px; color: var(--text-muted); font-size: 13px; line-height: 1.6; }
.sim-compare strong { display: block; color: var(--text); margin-bottom: 7px; }
.sim-compare > div { display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--accent); font-weight: 700; }
.sim-compare small { display: block; margin-top: 7px; color: var(--text-muted); }
.sim-scenario-lab { margin: 0 26px; padding: 20px 0 22px; border-top: 1px solid var(--border); }
.scenario-lab-heading { display: flex; justify-content: space-between; gap: 20px; align-items: end; }
.scenario-lab-heading h4 { font-size: 18px; }
.scenario-lab-heading > p { color: var(--text-muted); font-size: 12px; }
.scenario-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 15px 0 12px; }
.sim-scenario { padding: 9px 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface2); color: var(--text-2); font: 700 13px var(--font); cursor: pointer; }
.sim-scenario:hover, .sim-scenario.active { border-color: var(--accent); background: var(--accent-dim); color: var(--accent); }
.scenario-result { display: grid; grid-template-columns: minmax(145px, .35fr) 1fr; gap: 18px; align-items: center; padding: 16px; border-radius: 10px; background: #fff7ed; color: var(--text-2); }
.scenario-result div { display: flex; flex-direction: column; gap: 2px; }
.scenario-result span { color: var(--text-muted); font-size: 12px; }
.scenario-result strong { color: #c2410c; font-size: 24px; }
.scenario-result p { font-size: 13px; line-height: 1.65; }
.sim-footer { display: flex; justify-content: space-between; align-items: center; gap: 18px; padding: 18px 26px; background: var(--surface2); }
.sim-footer p { color: var(--text-muted); font-size: 12px; line-height: 1.55; }
.sim-footer p i { color: var(--accent); margin-right: 4px; }
.sim-footer .sim-ask-btn { flex: 0 0 auto; margin: 0; }

/* ===== Learning infographics ===== */
.learning-map { margin: -24px 0 46px; padding: 20px 22px; border: 1px solid #bfdbfe; border-radius: 14px; background: linear-gradient(110deg, #eff6ff, #fff); }
.map-heading, .roadmap-label { display: flex; align-items: baseline; gap: 10px; margin-bottom: 16px; }
.map-heading span, .roadmap-label span { color: var(--accent); font-size: 11px; font-weight: 850; letter-spacing: .1em; }
.map-heading strong, .roadmap-label strong { font-size: 15px; }
.map-steps, .rag-flow { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.map-steps > div, .rag-flow > div { flex: 1; min-width: 0; display: grid; justify-items: center; gap: 5px; text-align: center; }
.map-steps > div > i, .rag-flow > div > i { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--accent); color: #fff; font-size: 15px; }
.map-steps b, .rag-flow b { font-size: 13px; }
.map-steps small, .rag-flow span { color: var(--text-muted); font-size: 11px; line-height: 1.4; }
.map-steps > i, .rag-flow > i { color: #93c5fd; font-size: 12px; }
.rag-flow { margin: 26px 0 22px; padding: 19px 16px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface2); }
.rag-flow > div > i { background: #0f766e; }

.theory-roadmap { margin: 25px 0; padding: 19px 21px; border: 1px solid var(--border); border-radius: 13px; background: var(--surface2); }
.theory-roadmap > div:last-child { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.theory-roadmap button { min-height: 104px; padding: 12px; border: 1px solid var(--border); border-radius: 9px; background: #fff; color: var(--text); text-align: left; font: inherit; cursor: pointer; }
.theory-roadmap button:hover { border-color: var(--accent); box-shadow: 0 6px 14px rgba(37,99,235,.08); }
.theory-roadmap b, .theory-roadmap i, .theory-roadmap span { display: block; }
.theory-roadmap b { color: var(--accent); font-size: 11px; letter-spacing: .08em; }
.theory-roadmap i { margin: 10px 0 6px; color: var(--accent); font-size: 17px; }
.theory-roadmap span { color: var(--text-2); font-size: 12px; font-weight: 700; line-height: 1.4; }
.lesson-dashboard { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); overflow: hidden; margin: 15px 0 18px; border: 1px solid var(--border); border-radius: 10px; }
.lesson-dashboard div { padding: 14px 16px; border-right: 1px solid var(--border); background: var(--surface2); }
.lesson-dashboard div:last-child { border-right: 0; }
.lesson-dashboard span, .lesson-dashboard strong, .lesson-dashboard small { display: block; }
.lesson-dashboard span { color: var(--text-muted); font-size: 10px; font-weight: 800; letter-spacing: .09em; }
.lesson-dashboard strong { margin: 3px 0; color: var(--accent); font-size: 24px; line-height: 1.2; }
.lesson-dashboard strong i { font-size: 17px; }
.lesson-dashboard small { color: var(--text-2); font-size: 12px; }
.quiz-dot-map { display: flex; gap: 7px; margin: -28px 0 32px; }
.quiz-dot-map i { width: 100%; height: 7px; border-radius: 99px; background: var(--border); }
.quiz-dot-map i.done { background: #60a5fa; }
.quiz-dot-map i.current { background: var(--accent); box-shadow: 0 0 0 3px var(--accent-dim); }
.quiz-skill-map { display: grid; gap: 9px; margin: 26px 0; padding: 16px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface2); }
.quiz-skill-map > div { display: grid; grid-template-columns: 116px 1fr 68px; gap: 10px; align-items: center; font-size: 12px; }
.quiz-skill-map span { color: var(--text-2); font-weight: 700; }
.quiz-skill-map i { display: block; height: 8px; border-radius: 99px; background: var(--success); }
.quiz-skill-map .needs i { background: #f59e0b; }
.quiz-skill-map b { color: var(--text-muted); font-size: 11px; text-align: right; }

/* 모든 일차에 표시되는 한국시장 학습 인포그래픽 */
.day-infographic { margin: 18px 0 26px; padding: 24px; border: 1px solid #bfdbfe; border-radius: 15px; background: linear-gradient(135deg, #f8fbff, #eff6ff); }
.info-heading { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.info-heading > span { color: var(--accent); font-size: 10px; font-weight: 850; letter-spacing: .11em; }
.info-heading h2 { margin: 0; color: #172554; font-size: 22px; line-height: 1.3; }
.institution-grid, .derivative-grid, .risk-four { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.institution-grid article, .derivative-grid article, .risk-four article { display: flex; flex-direction: column; gap: 5px; min-height: 134px; padding: 16px; border: 1px solid rgba(191,219,254,.8); border-radius: 10px; background: #fff; }
.institution-grid i, .derivative-grid i, .risk-four i { color: var(--accent); font-size: 20px; }
.institution-grid b, .derivative-grid b, .risk-four b { color: #172554; font-size: 15px; }.institution-grid span, .derivative-grid span, .risk-four span { color: var(--text-2); font-size: 12px; line-height: 1.5; }.institution-grid small, .derivative-grid small { margin-top: auto; color: var(--text-muted); font-size: 11px; }
.money-flow, .rebalancing-line { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 18px; padding: 12px; border-radius: 8px; background: rgba(255,255,255,.72); color: #1d4ed8; font-size: 12px; font-weight: 750; }.money-flow i { color: #93c5fd; }
.company-strip > div { display: grid; gap: 10px; }.company-strip article { display: grid; grid-template-columns: 110px 1fr; gap: 8px 12px; align-items: center; padding: 12px 14px; border-radius: 8px; background: #fff; }.company-strip b { color: #1d4ed8; font-size: 12px; }.company-strip span { color: var(--text-2); font-size: 13px; }.company-strip i { grid-column: 1 / -1; display: block; height: 8px; border-radius: 999px; background: linear-gradient(90deg, #2563eb, #38bdf8); }
.rate-meter { display: grid; grid-template-columns: 155px 1fr 230px; gap: 14px; align-items: center; margin-top: 16px; padding: 14px; border-radius: 10px; background: #fff; }.rate-meter span { color: var(--text-muted); font-size: 11px; }.rate-meter span b { display: block; color: #1d4ed8; font-size: 26px; }.rate-meter span small { font-size: 10px; }.rate-meter > i, .concentration-meter > i { display: block; height: 12px; border-radius: 999px; background: #dbeafe; overflow: hidden; }.rate-meter > i b, .concentration-meter > i b { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #14b8a6, #2563eb); }.rate-meter em { color: var(--text-2); font-size: 11px; font-style: normal; line-height: 1.5; }
.risk-four { grid-template-columns: repeat(4, minmax(0, 1fr)); }.risk-four article { min-height: 110px; }.concentration-meter { display: grid; grid-template-columns: 250px 1fr 180px; gap: 12px; align-items: center; margin-top: 16px; padding: 13px; border-radius: 8px; background: #fff; }.concentration-meter span, .concentration-meter strong { color: var(--text-2); font-size: 12px; }.concentration-meter strong { color: #b45309; text-align: right; }.concentration-meter > i b { background: linear-gradient(90deg, #f59e0b, #ef4444); }
.allocation-pyramid { display: grid; gap: 6px; max-width: 760px; margin: 0 auto; }.allocation-pyramid article { display: flex; align-items: center; justify-content: space-between; padding: 13px 18px; border-radius: 8px; color: #fff; }.allocation-pyramid article:nth-child(1) { width: 64%; justify-self: center; background: #2563eb; }.allocation-pyramid article:nth-child(2) { width: 82%; justify-self: center; background: #0f766e; }.allocation-pyramid article:nth-child(3) { width: 100%; background: #64748b; }.allocation-pyramid b { font-size: 13px; }.allocation-pyramid span { font-size: 12px; }.rebalancing-line i { width: 52px; height: 2px; background: #93c5fd; }

/* ===== Korea market magazine ===== */
.daily-market-magazine { margin: 28px 0 34px; overflow: hidden; border: 1px solid #172554; border-radius: 20px; background: #fff; box-shadow: 0 16px 38px rgba(15, 23, 42, .08); }
.daily-magazine-hero { display: grid; grid-template-columns: 1.34fr .66fr; gap: 30px; padding: clamp(28px, 5vw, 56px); color: #e2e8f0; background: radial-gradient(circle at 84% 10%, #0ea5e9 0, #1d4ed8 23%, #172554 59%, #0f172a 100%); }
.daily-hero-copy { position: relative; }.daily-hero-copy::after { position: absolute; right: 7%; top: 36px; width: 82px; height: 82px; border: 1px solid rgba(125,211,252,.5); border-radius: 50%; content: ''; }.daily-hero-copy::before { position: absolute; right: 12%; top: 62px; width: 9px; height: 9px; border-radius: 50%; background: #7dd3fc; box-shadow: -88px 80px 0 #38bdf8, 26px 113px 0 #fbbf24; content: ''; }
.daily-magazine-hero > div > span, .daily-magazine-story > article > span, .daily-checklist span, .market-comparison > div > span { display: block; color: #93c5fd; font-size: 10px; font-weight: 900; letter-spacing: .14em; }
.daily-magazine-hero h2 { margin: 14px 0; color: #fff; font-size: clamp(34px, 4.6vw, 58px); line-height: 1.04; letter-spacing: -.055em; }.daily-magazine-hero h2 em { color: #7dd3fc; font-style: normal; }.daily-magazine-hero p { max-width: 700px; color: #cbd5e1; font-size: 15px; line-height: 1.78; }
.hero-orbit { position: absolute; top: 19px; right: 0; display: grid; place-items: center; width: 104px; height: 104px; border: 1px dashed rgba(186,230,253,.6); border-radius: 50%; transform: rotate(12deg); }.hero-orbit b { color: #fff; font-size: 29px; line-height: 1; }.hero-orbit i { position: absolute; right: 11px; bottom: 20px; color: #7dd3fc; font-size: 14px; }.hero-orbit em { position: absolute; left: -29px; bottom: -11px; color: #bae6fd; font-size: 8px; font-style: normal; font-weight: 900; letter-spacing: .12em; line-height: 1.3; transform: rotate(-12deg); }
.hero-signal { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 22px; }.hero-signal span { display: inline-flex; align-items: center; gap: 6px; padding: 8px 10px; border: 1px solid rgba(186,230,253,.28); border-radius: 99px; color: #e0f2fe; font-size: 11px; font-weight: 750; }.hero-signal span i { color: #7dd3fc; font-size: 8px; }.hero-signal span:nth-of-type(2) i { color: #fbbf24; }.hero-signal span:nth-of-type(3) i { color: #5eead4; }.hero-signal b { color: #7dd3fc; font-size: 10px; }
.daily-pulse { display: grid; grid-template-columns: repeat(4, 1fr); align-items: end; gap: 7px; min-height: 258px; padding: 16px; border: 1px solid rgba(186,230,253,.25); border-radius: 14px; background: rgba(15,23,42,.36); }.daily-pulse > span, .daily-pulse > p { grid-column: 1 / -1; margin: 0; color: #bae6fd; font-size: 10px; font-weight: 850; letter-spacing: .1em; }.daily-pulse > p { color: #94a3b8; font-weight: 500; letter-spacing: 0; line-height: 1.45; }
.daily-pulse > div { display: grid; grid-template-rows: 27px 138px 17px; align-items: end; justify-items: center; gap: 7px; min-width: 0; }.daily-pulse b { color: #e0f2fe; font-size: 10px; text-align: center; word-break: keep-all; }.daily-pulse i { display: flex; align-items: end; width: 100%; max-width: 33px; height: 138px; overflow: hidden; border-radius: 7px 7px 2px 2px; background: rgba(255,255,255,.1); }.daily-pulse em { width: 100%; border-radius: inherit; background: linear-gradient(#7dd3fc, #2563eb); }.daily-pulse small { color: #7dd3fc; font: 800 10px var(--font); }
.daily-magazine-story { display: grid; grid-template-columns: 1.5fr .75fr; gap: 1px; background: #bfdbfe; }.daily-magazine-story > article, .daily-magazine-story > aside { padding: 30px; background: #fff; }.daily-magazine-story h3 { margin: 12px 0; color: #172554; font-size: 26px; line-height: 1.3; }.daily-magazine-story p { color: var(--text-2); font-size: 14px; line-height: 1.8; }.daily-magazine-story aside { color: #dbeafe; background: #0f766e; }.daily-magazine-story aside > i { display: block; margin-bottom: 16px; color: #99f6e4; font-size: 28px; }.daily-magazine-story aside > b { color: #fff; font-size: 17px; }.daily-magazine-story aside ol { margin: 12px 0; padding-left: 18px; color: #d1fae5; font-size: 13px; line-height: 1.9; }.daily-magazine-story aside p { color: #ccfbf1; font-size: 12px; line-height: 1.65; }
.market-file-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: #cbd5e1; }.market-file { position: relative; min-height: 262px; padding: 27px; background: #fff; }.market-file > span { color: #2563eb; font-size: 10px; font-weight: 900; letter-spacing: .1em; }.market-file h3 { margin: 9px 0 4px; color: #172554; font-size: 24px; }.market-file > b { color: #0f766e; font-size: 12px; }.market-file > p { margin: 16px 0 20px; color: var(--text-2); font-size: 13px; line-height: 1.75; }.market-file > div { display: flex; gap: 8px; align-items: flex-start; margin-top: auto; color: #1d4ed8; }.market-file > div i { margin-top: 2px; }.market-file > div small { color: #1e40af; font-size: 11px; font-weight: 750; line-height: 1.5; }.market-file:hover { background: #f0f9ff; }
.market-file:nth-child(4n + 1)::after { position: absolute; right: 21px; top: 23px; width: 20px; height: 20px; border: 3px solid #38bdf8; border-radius: 50%; content: ''; }.market-file:nth-child(4n + 2)::after { position: absolute; right: 24px; top: 28px; width: 24px; height: 24px; border-radius: 4px; background: #fef3c7; transform: rotate(16deg); content: ''; }.market-file:nth-child(4n + 3)::after { position: absolute; right: 22px; top: 26px; border-top: 12px solid transparent; border-bottom: 12px solid transparent; border-left: 22px solid #5eead4; content: ''; }.market-file:nth-child(4n)::after { position: absolute; right: 23px; top: 26px; color: #f59e0b; content: '✦'; font-size: 28px; }
.market-comparison { display: grid; grid-template-columns: .72fr 1.28fr; gap: 26px; padding: 31px; background: #eff6ff; }.market-comparison h3 { margin-top: 8px; color: #172554; font-size: 24px; line-height: 1.3; }.comparison-table { display: grid; gap: 7px; }.comparison-table p { display: grid; grid-template-columns: .8fr 1fr 1.15fr; gap: 10px; margin: 0; padding: 11px 13px; border-radius: 7px; background: #fff; font-size: 12px; }.comparison-table b { color: #1d4ed8; }.comparison-table span { color: var(--text-2); }.comparison-table em { color: #0f766e; font-style: normal; font-weight: 750; }
.daily-checklist { display: grid; grid-template-columns: .66fr 1.34fr; gap: 25px; align-items: center; padding: 25px 31px; color: #fff; background: #172554; }.daily-checklist strong { display: block; margin-top: 7px; font-size: 20px; }.daily-checklist ol { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; margin: 0; padding: 0; list-style: none; counter-reset: daily-check; }.daily-checklist li { position: relative; min-height: 58px; padding: 12px 10px 10px 38px; border: 1px solid rgba(191,219,254,.25); border-radius: 8px; color: #dbeafe; font-size: 12px; line-height: 1.5; counter-increment: daily-check; }.daily-checklist li::before { position: absolute; left: 12px; top: 11px; color: #7dd3fc; content: '0' counter(daily-check); font-size: 11px; font-weight: 900; }.market-source-note { margin: 0; padding: 15px 28px; color: #64748b; background: #f8fafc; font-size: 11px; line-height: 1.65; }.market-source-note i { margin-right: 4px; color: #2563eb; }

/* ===== 200 company atlas ===== */
.company-atlas { margin: 34px 0; overflow: hidden; border: 1px solid #1e3a8a; border-radius: 20px; background: #f8fafc; box-shadow: 0 18px 46px rgba(15,23,42,.09); }
.atlas-header { position: relative; display: grid; grid-template-columns: 1.35fr .65fr; gap: 26px; padding: clamp(28px, 5vw, 54px); overflow: hidden; color: #e0f2fe; background: linear-gradient(120deg, #020617, #172554 54%, #1d4ed8); }.atlas-header::after { position: absolute; right: -100px; bottom: -110px; width: 310px; height: 310px; border: 1px solid rgba(186,230,253,.25); border-radius: 50%; box-shadow: 0 0 0 35px rgba(125,211,252,.05), 0 0 0 70px rgba(125,211,252,.04); content: ''; }
.atlas-header > div:first-child { position: relative; z-index: 1; }.atlas-header > div:first-child > span { color: #7dd3fc; font-size: 10px; font-weight: 900; letter-spacing: .15em; }.atlas-header h2 { margin: 13px 0; color: #fff; font-size: clamp(32px, 4.5vw, 56px); line-height: 1.04; letter-spacing: -.055em; }.atlas-header h2 em { color: #fbbf24; font-style: normal; }.atlas-header p { max-width: 690px; color: #cbd5e1; font-size: 14px; line-height: 1.75; }
.atlas-number-board { position: relative; z-index: 1; display: grid; place-items: center; align-content: center; justify-self: end; width: 198px; height: 198px; border: 1px solid rgba(186,230,253,.5); border-radius: 50%; background: rgba(15,23,42,.24); transform: rotate(-8deg); }.atlas-number-board b { color: #fff; font-size: 78px; line-height: .85; letter-spacing: -.08em; }.atlas-number-board span { position: absolute; right: 26px; bottom: 30px; color: #7dd3fc; font-size: 10px; font-weight: 900; letter-spacing: .12em; line-height: 1.25; text-align: right; }.atlas-number-board i { position: absolute; left: 25px; top: 28px; color: #fbbf24; font-size: 22px; }
.atlas-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 16px 24px; border-bottom: 1px solid #bfdbfe; background: #eff6ff; }.atlas-count, .atlas-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }.atlas-count { color: #1e40af; font-size: 11px; font-weight: 800; letter-spacing: .06em; }.atlas-count b { color: #1d4ed8; font-size: 15px; }.atlas-count i { width: 4px; height: 4px; border-radius: 50%; background: #60a5fa; }.atlas-filters button { padding: 8px 11px; border: 1px solid #bfdbfe; border-radius: 999px; background: #fff; color: #1e40af; font: 800 11px var(--font); cursor: pointer; }.atlas-filters button:hover, .atlas-filters button.active { border-color: #1d4ed8; background: #1d4ed8; color: #fff; }
.atlas-arrow-line { display: flex; align-items: center; justify-content: center; gap: 11px; padding: 13px; color: #1d4ed8; background: #fff; font-size: 11px; font-weight: 850; }.atlas-arrow-line i { position: relative; width: 50px; height: 1px; background: #93c5fd; }.atlas-arrow-line i::after { position: absolute; right: 0; top: -3px; border-top: 3px solid transparent; border-bottom: 3px solid transparent; border-left: 6px solid #60a5fa; content: ''; }
.atlas-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: #cbd5e1; }.atlas-card { min-height: 260px; padding: 20px; background: #fff; transition: background .15s ease, transform .15s ease; }.atlas-card:hover { position: relative; z-index: 1; background: #f0f9ff; box-shadow: 0 5px 18px rgba(15,23,42,.1); transform: translateY(-2px); }.atlas-card[hidden] { display: none; }.atlas-card-top { display: flex; align-items: center; justify-content: space-between; }.atlas-card-top span { padding: 4px 7px; border-radius: 4px; background: #dbeafe; color: #1d4ed8; font-size: 9px; font-weight: 900; letter-spacing: .08em; }.atlas-card[data-atlas-market="KOSDAQ"] .atlas-card-top span { background: #ccfbf1; color: #0f766e; }.atlas-card-top b { color: #94a3b8; font-size: 11px; letter-spacing: .08em; }.atlas-card h3 { margin: 16px 0 4px; color: #172554; font-size: 20px; line-height: 1.2; }.atlas-sector { margin: 0; color: #0f766e; font-size: 11px; font-weight: 800; }.atlas-summary { margin: 14px 0; color: #334155; font-size: 12px; line-height: 1.68; }.atlas-watch, .atlas-risk { display: flex; gap: 7px; align-items: flex-start; margin-top: 8px; font-size: 10px; line-height: 1.45; }.atlas-watch i { color: #2563eb; }.atlas-risk i { color: #d97706; }.atlas-watch span, .atlas-risk span { color: #475569; }.atlas-watch b, .atlas-risk b { display: inline-block; margin-right: 4px; color: #172554; }.atlas-risk { padding-top: 8px; border-top: 1px dashed #cbd5e1; }
.atlas-footer { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: #1e3a8a; }.atlas-footer > div { display: grid; grid-template-columns: 30px 1fr; gap: 3px 10px; padding: 22px; background: #172554; }.atlas-footer i { grid-row: 1 / span 2; color: #7dd3fc; font-size: 20px; }.atlas-footer strong { color: #fff; font-size: 13px; }.atlas-footer span { color: #bfdbfe; font-size: 11px; line-height: 1.6; }
/* Readability pass: corporate names, codes, and explanatory text stay legible. */
.market-source-note { color: #475569; font-size: 13px; line-height: 1.7; }
.atlas-count { font-size: 13px; }.atlas-count b { font-size: 17px; }.atlas-filters button { padding: 9px 13px; font-size: 13px; }
.atlas-arrow-line { padding: 15px; font-size: 13px; }.atlas-card { min-height: 290px; padding: 22px; }.atlas-card-top span { padding: 5px 8px; font-size: 11px; }.atlas-card-top b { font-size: 13px; }
.atlas-card h3 { margin: 17px 0 5px; font-size: 23px; line-height: 1.25; }.atlas-ticker, .company-ticker { display: inline-block; margin-left: 3px; padding: 3px 6px; border: 1px solid #bfdbfe; border-radius: 4px; background: #eff6ff; color: #1d4ed8; font-size: 12px; font-weight: 850; letter-spacing: .04em; vertical-align: 2px; }.atlas-sector { font-size: 13px; }.atlas-summary { margin: 15px 0; font-size: 14px; line-height: 1.72; }.atlas-watch, .atlas-risk { gap: 8px; margin-top: 9px; font-size: 12px; line-height: 1.55; }.atlas-risk { padding-top: 9px; }
.atlas-footer i { font-size: 22px; }.atlas-footer strong { font-size: 15px; }.atlas-footer span { font-size: 13px; line-height: 1.65; }
.daily-pulse > span, .daily-pulse > p, .daily-pulse b, .daily-pulse small { font-size: 12px; }.daily-magazine-story p { font-size: 15px; }.daily-magazine-story aside p { font-size: 13px; }.market-file > span { font-size: 12px; }.market-file > b { font-size: 13px; }.market-file > p { font-size: 14px; }.market-file > div small { font-size: 13px; }.comparison-table p { font-size: 13px; }.daily-checklist li { font-size: 13px; }.daily-checklist li::before { font-size: 12px; }
.market-magazine { margin: 28px 0 34px; border: 1px solid #172554; border-radius: 18px; overflow: hidden; background: #f8fbff; }
.magazine-hero { display: grid; grid-template-columns: 1.35fr .65fr; gap: 28px; padding: clamp(28px, 5vw, 56px); color: #eff6ff; background: radial-gradient(circle at 88% 15%, #1d4ed8 0, #172554 38%, #0f172a 100%); }
.magazine-hero > div > span, .lead-story > span, .market-check > span, .sector-lens > div > span { display: block; color: #93c5fd; font-size: 11px; font-weight: 850; letter-spacing: .12em; }
.magazine-hero h2 { margin: 13px 0; font-size: clamp(36px, 5vw, 62px); line-height: 1.05; letter-spacing: -.05em; }
.magazine-hero h2 em { color: #60a5fa; font-style: normal; }
.magazine-hero p { max-width: 640px; color: #cbd5e1; font-size: 16px; line-height: 1.7; }
.market-pulse { display: grid; grid-template-columns: repeat(4, 1fr); align-items: end; min-height: 230px; gap: 9px; padding: 16px; border: 1px solid rgba(191,219,254,.25); border-radius: 14px; background: rgba(15,23,42,.34); }
.market-pulse > span, .market-pulse small { grid-column: 1 / -1; color: #bfdbfe; font-size: 10px; font-weight: 800; letter-spacing: .1em; }
.market-pulse > div { display: flex; flex-direction: column; justify-content: end; align-items: center; gap: 7px; height: 155px; }
.market-pulse b { color: #cbd5e1; font-size: 10px; text-align: center; word-break: keep-all; }
.market-pulse i { width: 100%; max-width: 34px; border-radius: 6px 6px 2px 2px; background: linear-gradient(#60a5fa, #2563eb); }
.market-pulse small { color: #94a3b8; font-weight: 500; letter-spacing: 0; line-height: 1.45; }
.magazine-lead-grid { display: grid; grid-template-columns: 1.5fr .75fr; gap: 16px; padding: 22px; }
.lead-story, .market-check { min-height: 244px; padding: 26px; border-radius: 13px; background: #fff; }
.lead-story { border: 1px solid #bfdbfe; }
.lead-story h3, .market-check strong { display: block; margin: 10px 0; color: #172554; font-size: 26px; line-height: 1.25; }
.lead-story p { color: var(--text-2); font-size: 14px; line-height: 1.75; }
.mini-compare { display: flex; align-items: center; gap: 8px; margin-top: 20px; color: #1d4ed8; font-size: 11px; font-weight: 800; }
.mini-compare i { flex: 1; height: 3px; background: #bfdbfe; }
.market-check { color: #e2e8f0; background: #0f766e; }
.market-check > span { color: #99f6e4; }
.market-check strong { color: #fff; }
.market-check ol { padding-left: 20px; color: #d1fae5; font-size: 13px; line-height: 2.05; }
.company-card-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: #cbd5e1; border-top: 1px solid #cbd5e1; }
.company-feature { position: relative; min-height: 210px; padding: 22px; overflow: hidden; background: #fff; }
.company-feature > span { color: #60a5fa; font-size: 11px; font-weight: 900; letter-spacing: .09em; }
.company-feature h3 { margin: 10px 0 3px; color: #172554; font-size: 21px; }
.company-feature b { display: block; color: #0f766e; font-size: 11px; }
.company-feature p { margin-top: 17px; color: var(--text-2); font-size: 13px; line-height: 1.65; }
.company-feature > i { position: absolute; right: -10px; bottom: -18px; color: rgba(37,99,235,.09); font-size: 78px; transform: rotate(-10deg); }
.company-feature:hover { background: #eff6ff; }
.sector-lens { display: grid; grid-template-columns: .65fr 1.35fr; gap: 20px; padding: 27px; background: #e0f2fe; }
.sector-lens h3 { margin-top: 8px; color: #172554; font-size: 24px; line-height: 1.3; }
.sector-lens-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.sector-lens-grid p { display: flex; justify-content: space-between; gap: 10px; padding: 10px 12px; border-radius: 7px; background: rgba(255,255,255,.7); font-size: 12px; }
.sector-lens-grid b { color: #1d4ed8; }.sector-lens-grid span { color: var(--text-muted); text-align: right; }

/* ===== Expanded allocation dashboard ===== */
.simulation-page { max-width: 1440px; }
.simulation-workbench { margin-top: 34px; }
.simulation-workbench .simulation-panel { border-radius: 22px; }
.simulation-workbench .sim-body { grid-template-columns: minmax(330px, .72fr) minmax(540px, 1.28fr); gap: 30px; padding: 32px; }
.simulation-workbench .sim-settings { padding: 24px; }
.simulation-workbench .sim-metric { min-height: 112px; padding: 19px; }
.simulation-workbench .sim-metric strong { font-size: clamp(23px, 2.2vw, 33px); }
.sim-visual-stage { display: grid; grid-template-columns: 205px 1fr; gap: 28px; align-items: center; padding: 23px; border: 1px solid #bfdbfe; border-radius: 13px; background: linear-gradient(135deg, #eff6ff, #fff); }
.allocation-donut { display: grid; place-items: center; width: 190px; height: 190px; border-radius: 50%; transition: background .2s ease; }
.allocation-donut > div { display: grid; place-items: center; width: 126px; height: 126px; border-radius: 50%; background: #fff; box-shadow: 0 2px 10px rgba(15,23,42,.08); }
.allocation-donut strong { color: #1d4ed8; font-size: 28px; line-height: 1; }.allocation-donut span { color: var(--text-muted); font-size: 11px; }
.risk-bar-chart { display: grid; gap: 17px; }
.risk-bar-chart > div { display: grid; grid-template-columns: 95px 1fr 62px; gap: 10px; align-items: center; }
.risk-bar-chart span { color: var(--text-2); font-size: 12px; font-weight: 750; }.risk-bar-chart i { height: 13px; overflow: hidden; border-radius: 999px; background: #dbeafe; }.risk-bar-chart b { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #2563eb, #38bdf8); }.risk-bar-chart strong { color: #1d4ed8; font-size: 13px; text-align: right; }.risk-bar-chart .loss b { background: linear-gradient(90deg, #f59e0b, #ef4444); }.risk-bar-chart .loss strong { color: #dc2626; }

@media (max-width: 900px) {
  .simulation-workbench .sim-body { grid-template-columns: 1fr; }
  .simulation-workbench .sim-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .magazine-hero, .magazine-lead-grid, .sector-lens, .daily-magazine-hero, .daily-magazine-story, .market-comparison, .daily-checklist { grid-template-columns: 1fr; }
  .company-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .atlas-header { grid-template-columns: 1fr; }.atlas-number-board { justify-self: start; width: 150px; height: 150px; }.atlas-number-board b { font-size: 58px; }.atlas-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .risk-four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rate-meter, .concentration-meter { grid-template-columns: 1fr; }
  .rate-meter em, .concentration-meter strong { text-align: left; }
}
@media (max-width: 620px) {
  .simulation-header, .simulation-workbench .sim-body { padding: 18px; }
  .simulation-header { align-items: flex-start; }
  .simulation-live { display: none; }
  .sim-scenario-lab { margin: 0 18px; }
  .scenario-lab-heading, .sim-footer { align-items: flex-start; flex-direction: column; }
  .scenario-result { grid-template-columns: 1fr; gap: 8px; }
  .sim-footer { padding: 18px; }
  .sim-footer .sim-ask-btn { width: 100%; }
  .map-steps > i, .rag-flow > i { display: none; }
  .map-steps, .rag-flow { gap: 5px; }
  .map-steps small, .rag-flow span { font-size: 10px; }
  .theory-roadmap > div:last-child { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .theory-roadmap button:last-child { grid-column: 1 / -1; min-height: auto; }
  .quiz-skill-map > div { grid-template-columns: 88px 1fr 58px; gap: 7px; }
  .market-magazine { margin-inline: -2px; }
  .daily-market-magazine { margin-inline: -2px; }.daily-magazine-hero { padding: 28px 22px; }.daily-magazine-hero h2 { font-size: 37px; }.daily-pulse { min-height: 215px; }.daily-pulse > div { grid-template-rows: 25px 106px 17px; }.daily-pulse i { height: 106px; }.daily-magazine-story > article, .daily-magazine-story > aside { padding: 21px; }.daily-magazine-story h3 { font-size: 22px; }.market-file-grid { grid-template-columns: 1fr; }.market-file { min-height: 0; padding: 22px; }.market-comparison { gap: 16px; padding: 22px; }.comparison-table p { grid-template-columns: 1fr; gap: 4px; }.daily-checklist { gap: 15px; padding: 22px; }.daily-checklist ol { grid-template-columns: 1fr; }.market-source-note { padding: 14px 20px; }
  .company-atlas { margin-inline: -2px; }.atlas-header { padding: 28px 22px; }.atlas-header h2 { font-size: 36px; }.atlas-number-board { display: none; }.atlas-toolbar { align-items: flex-start; flex-direction: column; padding: 15px 18px; }.atlas-arrow-line { justify-content: flex-start; overflow-x: auto; padding-inline: 18px; white-space: nowrap; }.atlas-arrow-line i { min-width: 24px; }.atlas-grid { grid-template-columns: 1fr; }.atlas-card { min-height: 0; padding: 19px; }.atlas-footer { grid-template-columns: 1fr; }
  .hero-orbit, .daily-hero-copy::before, .daily-hero-copy::after { display: none; }.hero-signal { gap: 5px; }.hero-signal b { display: none; }.hero-signal span { padding: 7px 8px; font-size: 10px; }
  .magazine-hero { padding: 28px 22px; }.magazine-hero h2 { font-size: 38px; }
  .market-pulse { min-height: 190px; }.market-pulse > div { height: 118px; }
  .company-card-grid, .sector-lens-grid { grid-template-columns: 1fr; }
  .magazine-lead-grid { padding: 14px; }.lead-story, .market-check { min-height: auto; padding: 20px; }
  .simulation-workbench .sim-body { padding: 18px; }.simulation-workbench .sim-settings { padding: 18px; }
  .sim-visual-stage { grid-template-columns: 1fr; justify-items: center; padding: 20px; }
  .risk-bar-chart { width: 100%; }.risk-bar-chart > div { grid-template-columns: 82px 1fr 55px; gap: 7px; }
  .day-infographic { padding: 18px; }.info-heading { align-items: flex-start; flex-direction: column; gap: 5px; }
  .institution-grid, .derivative-grid, .risk-four { grid-template-columns: 1fr; }
  .institution-grid article, .derivative-grid article { min-height: 104px; }
  .money-flow, .rebalancing-line { flex-wrap: wrap; gap: 8px; }.money-flow i, .rebalancing-line i { display: none; }
  .company-strip article { grid-template-columns: 1fr; gap: 4px; }
  .allocation-pyramid article:nth-child(n) { width: 100%; }
}

@media (max-width: 700px) {
  .theory-day-2 .theory-lesson:nth-child(n+4)::after { position: static; display: block; margin-bottom: 8px; }
  .theory-day-2 .theory-lesson:nth-child(n+4) h2 { padding-right: 0; }
}
