:root {
  --blue-700: #1d4ed8;
  --blue-600: #2563eb;
  --blue-500: #3b82f6;
  --blue-100: #dbeafe;
  --blue-50: #eff6ff;
  --ink-900: #0f172a;
  --ink-700: #334155;
  --ink-500: #64748b;
  --ink-400: #94a3b8;
  --border: #e2e8f0;
  --bg-soft: #f8fafc;
  --white: #ffffff;
  --red-600: #dc2626;
  --red-50: #fef2f2;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 4px 16px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 16px 40px rgba(15, 23, 42, 0.12);
  --apply-bar-height: 110px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: "Pretendard", "Apple SD Gothic Neo", "Malgun Gothic", -apple-system, sans-serif;
  color: var(--ink-900);
  background: var(--white);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { font-family: inherit; }

.container { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: none;
  cursor: pointer;
  font-weight: 700;
  border-radius: var(--radius-sm);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  white-space: nowrap;
  font-size: 15px;
}

.btn-primary { background: var(--blue-600); color: var(--white); padding: 11px 20px; }
.btn-primary:hover { background: var(--blue-700); }

.btn-outline {
  background: var(--white);
  border: 1.5px solid var(--blue-600);
  color: var(--blue-600);
  padding: 10px 18px;
}
.btn-outline:hover { background: var(--blue-50); }

.btn-lg { padding: 15px 26px; font-size: 16px; box-shadow: var(--shadow); }
.btn-lg:hover { box-shadow: var(--shadow-lg); }
.btn-block { width: 100%; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 500;
  background: var(--white);
  border-bottom: 1px solid var(--border);
}

.site-header .container {
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 20px;
  font-weight: 800;
  color: var(--ink-900);
  letter-spacing: -0.5px;
}

.logo-img {
  height: 48px;
  width: auto;
  display: block;
}

/* ---------- Page sub header (stock.html) ---------- */
.page-subheader {
  background: var(--bg-soft);
  border-bottom: 1px solid var(--border);
}
.page-subheader .container {
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
}
.back-link { color: var(--ink-500); font-weight: 700; display: flex; align-items: center; gap: 4px; }
.back-link:hover { color: var(--blue-600); }
.page-subheader .divider { color: var(--border); }
.page-subheader .stock-title { font-weight: 800; color: var(--ink-900); }

/* ---------- Hero ---------- */
.hero { padding: 64px 0 60px; }
.hero .container { display: flex; align-items: center; gap: 56px; }

.hero-text { flex: 1; min-width: 0; }

.eyebrow-badge {
  display: inline-block;
  background: var(--blue-50);
  color: var(--blue-700);
  font-size: 13px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 18px;
}

.hero-text h1 {
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -0.8px;
  color: var(--ink-900);
  margin-bottom: 14px;
}
.hero-text h1 .accent { color: var(--blue-600); }

.hero-text p { font-size: 16px; color: var(--ink-500); max-width: 440px; }

.hero-search { flex: 1; min-width: 0; max-width: 480px; }

.search-wrap { position: relative; }

.search-box {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: 14px;
  padding: 8px;
  display: flex;
  gap: 8px;
  box-shadow: var(--shadow);
}

.search-box input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 15px;
  padding: 12px 14px;
  color: var(--ink-900);
  background: transparent;
  min-width: 0;
}
.search-box input::placeholder { color: var(--ink-400); }

.search-box button {
  background: var(--blue-600);
  color: var(--white);
  border: none;
  border-radius: 8px;
  padding: 0 20px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
}
.search-box button:hover { background: var(--blue-700); }

.search-suggestions {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  z-index: 50;
  display: none;
}
.search-suggestions.open { display: block; }

.search-suggestion-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
  background: none;
  border-left: none;
  border-right: none;
  border-top: none;
  width: 100%;
  text-align: left;
}
.search-suggestion-item:last-child { border-bottom: none; }
.search-suggestion-item:hover { background: var(--bg-soft); }

.search-suggestion-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-weight: 800;
  font-size: 11px;
  flex-shrink: 0;
}

.search-suggestion-info { flex: 1; min-width: 0; }
.search-suggestion-name { font-size: 14px; font-weight: 700; color: var(--ink-900); }
.search-suggestion-meta { font-size: 12px; color: var(--ink-500); margin-top: 2px; }

.search-suggestion-market {
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-500);
  background: var(--bg-soft);
  padding: 3px 8px;
  border-radius: 999px;
  flex-shrink: 0;
}

.search-no-result { padding: 16px; font-size: 13px; color: var(--ink-500); text-align: center; }

.popular-tags-label { font-size: 13px; color: var(--ink-500); font-weight: 600; margin: 18px 0 10px; }
.popular-tags { display: flex; flex-wrap: wrap; gap: 8px; }

.tag-chip {
  background: var(--blue-50);
  color: var(--blue-700);
  font-size: 13px;
  font-weight: 700;
  padding: 7px 14px;
  border-radius: 999px;
  cursor: pointer;
  border: none;
}
.tag-chip:hover { background: var(--blue-100); }

/* ---------- Section shell ---------- */
.section { max-width: 1120px; margin: 0 auto; padding: 72px 24px; }
.section-narrow { max-width: 1120px; margin: 0 auto; padding: 0 24px 56px; }

.section-head { text-align: center; margin-bottom: 36px; }
.section-eyebrow {
  font-size: 13px;
  font-weight: 700;
  color: var(--blue-600);
  letter-spacing: 0.6px;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.section-head h2 { font-size: 26px; font-weight: 800; color: var(--ink-900); letter-spacing: -0.5px; margin-bottom: 8px; }
.section-head p { color: var(--ink-500); font-size: 15px; }

/* ---------- Stock cards (index) ---------- */
.stock-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }

.stock-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.stock-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }

.stock-card-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 16px; }

.stock-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-weight: 800;
  font-size: 13px;
  flex-shrink: 0;
}

.stock-id { flex: 1; min-width: 0; }
.stock-name { font-weight: 800; font-size: 16px; color: var(--ink-900); }
.stock-code { font-size: 12px; color: var(--ink-500); margin-top: 2px; }
.stock-eval { font-size: 11px; color: var(--ink-500); text-align: right; line-height: 1.4; white-space: nowrap; }

.stock-change-value { display: block; font-weight: 800; font-size: 16px; color: var(--red-600); margin-bottom: 10px; }

.progress-track { width: 100%; height: 8px; background: var(--red-50); border-radius: 999px; overflow: hidden; margin-bottom: 18px; }
.progress-fill { height: 100%; background: var(--red-600); border-radius: 999px; }

/* ---------- Benefit cards (index) ---------- */
.benefit-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }

.benefit-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}
.benefit-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }

.benefit-badge {
  display: inline-block;
  align-self: flex-start;
  background: var(--blue-50);
  color: var(--blue-700);
  font-size: 12px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 999px;
}
.benefit-card h3 { font-size: 18px; font-weight: 800; color: var(--ink-900); }
.benefit-card p { font-size: 14px; color: var(--ink-500); line-height: 1.6; flex: 1; }
.benefit-link { font-size: 14px; font-weight: 700; color: var(--blue-600); }
.benefit-link:hover { color: var(--blue-700); }

/* ---------- Indicator selection grid (indicators.html) ---------- */
.indicator-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }

.indicator-card {
  position: relative;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  cursor: pointer;
  background: var(--white);
  text-align: left;
  overflow: hidden;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
.indicator-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.indicator-card.selected { border-color: var(--blue-600); box-shadow: 0 0 0 3px var(--blue-100); }

.indicator-thumb {
  margin: -22px -22px 14px;
  height: 130px;
  overflow: hidden;
  background: var(--bg-soft);
}
.indicator-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  display: block;
}

.indicator-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--blue-50);
  color: var(--blue-600);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  margin-bottom: 14px;
}
.indicator-card h3 { font-size: 15px; font-weight: 800; color: var(--ink-900); margin-bottom: 6px; }
.indicator-card p { font-size: 13px; color: var(--ink-500); line-height: 1.6; }

.indicator-check {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--blue-600);
  color: var(--white);
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 0.15s ease, transform 0.15s ease;
  z-index: 2;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.25);
}
.indicator-card.selected .indicator-check { opacity: 1; transform: scale(1); }

/* ---------- Auto-rolling sample carousel (indicators.html) ---------- */
.carousel-wrap { overflow: hidden; padding: 8px 0; }
.carousel-track {
  display: flex;
  gap: 16px;
  width: max-content;
  animation: carousel-scroll 22s linear infinite;
}
.carousel-wrap:hover .carousel-track { animation-play-state: paused; }
@keyframes carousel-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
.carousel-item { flex-shrink: 0; width: 170px; }
.carousel-thumb {
  width: 170px;
  height: 210px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.carousel-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  display: block;
}
.carousel-label { margin-top: 10px; font-size: 13px; font-weight: 700; color: var(--ink-700); text-align: center; }

/* ---------- Sector page (sector.html) ---------- */
.sector-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; flex-wrap: wrap; margin-bottom: 36px; }
.sector-top-left { flex: 1; min-width: 260px; }
.sector-top-left h1 { font-size: 26px; font-weight: 800; color: var(--ink-900); margin: 10px 0 8px; letter-spacing: -0.5px; }
.sector-date { font-size: 13px; color: var(--ink-500); }

.criteria-box { background: var(--bg-soft); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; min-width: 260px; max-width: 320px; }
.criteria-box h3 { font-size: 14px; font-weight: 800; margin-bottom: 14px; color: var(--ink-900); }
.criteria-box ul { display: flex; flex-direction: column; gap: 10px; }
.criteria-box li { font-size: 13px; color: var(--ink-700); display: flex; gap: 8px; align-items: flex-start; line-height: 1.5; }
.criteria-box li::before { content: '✓'; color: var(--blue-600); font-weight: 800; flex-shrink: 0; }

.compare-table-wrap { overflow-x: auto; margin-bottom: 44px; border: 1px solid var(--border); border-radius: var(--radius); }
table.compare-table { width: 100%; border-collapse: collapse; min-width: 680px; }
.compare-table th, .compare-table td { padding: 14px 16px; border-bottom: 1px solid var(--border); font-size: 13px; text-align: left; white-space: nowrap; }
.compare-table th { background: var(--bg-soft); color: var(--ink-700); font-weight: 700; }
.compare-table tbody tr:last-child td { border-bottom: none; }
.compare-table tr.highlight td { background: var(--blue-50); font-weight: 700; color: var(--ink-900); }
.value-up { color: var(--red-600); font-weight: 700; }
.value-down { color: var(--blue-600); font-weight: 700; }

.sector-detail-layout { display: grid; grid-template-columns: 1.6fr 1fr; gap: 28px; margin-bottom: 40px; align-items: start; }
.sector-detail-card { border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); }
.sector-detail-card h2 { font-size: 20px; font-weight: 800; color: var(--ink-900); margin-bottom: 4px; }
.sector-detail-card .sector-sub { font-size: 13px; color: var(--ink-500); margin-bottom: 20px; }

.sector-stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 24px 0; }
.sector-stat { border: 1px solid var(--border); border-radius: 10px; padding: 14px; text-align: center; }
.sector-stat .label { font-size: 12px; color: var(--ink-500); margin-bottom: 6px; }
.sector-stat .value { font-size: 16px; font-weight: 800; color: var(--ink-900); }

.per-compare { margin-top: 24px; }
.per-compare h4 { font-size: 13px; font-weight: 800; margin-bottom: 12px; color: var(--ink-900); }
.per-compare-row { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.per-compare-row .label { width: 110px; font-size: 12px; color: var(--ink-500); flex-shrink: 0; }
.per-compare-track { flex: 1; height: 10px; background: var(--bg-soft); border-radius: 999px; overflow: hidden; }
.per-compare-fill { height: 100%; border-radius: 999px; }
.per-compare-fill.sector { background: var(--blue-600); }
.per-compare-fill.market { background: var(--ink-400); }
.per-compare-value { width: 50px; text-align: right; font-size: 12px; font-weight: 700; color: var(--ink-900); flex-shrink: 0; }

.leader-cta { background: var(--blue-50); border: 1px solid var(--blue-100); border-radius: var(--radius); padding: 28px; text-align: center; margin-bottom: 48px; }
.leader-cta h3 { font-size: 17px; font-weight: 800; color: var(--ink-900); margin-bottom: 8px; }
.leader-cta p { font-size: 14px; color: var(--ink-700); margin-bottom: 18px; }

/* ---------- Apply form section (index) ---------- */
.apply-section { background: var(--bg-soft); padding: 72px 24px; scroll-margin-top: 90px; }
.apply-wrap {
  max-width: 560px;
  margin: 0 auto;
  background: var(--white);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  padding: 44px 40px;
  border: 1px solid var(--border);
}
.apply-wrap .section-head { margin-bottom: 30px; }

.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: 14px; font-weight: 700; color: var(--ink-700); margin-bottom: 8px; }
.form-group input[type="text"],
.form-group input[type="tel"],
.form-group select {
  width: 100%;
  padding: 13px 14px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 15px;
  outline: none;
  transition: border-color 0.15s ease;
  color: var(--ink-900);
  background: var(--white);
}
.form-group input:focus, .form-group select:focus { border-color: var(--blue-600); }
.form-group input::placeholder { color: var(--ink-400); }

.consent-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 22px 0;
  padding: 14px;
  background: var(--bg-soft);
  border-radius: 8px;
}
.consent-row input[type="checkbox"] { margin-top: 3px; width: 17px; height: 17px; accent-color: var(--blue-600); flex-shrink: 0; cursor: pointer; }
.consent-row label { font-size: 13px; color: var(--ink-700); line-height: 1.6; cursor: pointer; }
.consent-row a { color: var(--blue-600); font-weight: 700; text-decoration: underline; }

.form-note { text-align: center; font-size: 12px; color: var(--ink-500); margin-top: 14px; }

/* ---------- Accordion (report.html) ---------- */
.accordion { border: 1px solid var(--border); border-radius: 10px; margin-bottom: 12px; overflow: hidden; }
.accordion-header { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; cursor: pointer; background: var(--bg-soft); gap: 10px; }
.accordion-header .title { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: var(--ink-900); }
.accordion-header .title input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--blue-600); flex-shrink: 0; }
.accordion-header .chevron { transition: transform 0.2s ease; color: var(--ink-500); font-size: 12px; flex-shrink: 0; }
.accordion.open .chevron { transform: rotate(180deg); }
.accordion-body { max-height: 0; overflow: hidden; transition: max-height 0.25s ease; padding: 0 14px; }
.accordion.open .accordion-body { max-height: 240px; padding: 12px 14px; }
.accordion-body p { font-size: 12px; color: var(--ink-500); line-height: 1.7; }

/* ---------- Fixed bottom apply bar ---------- */
body.has-apply-bar { padding-bottom: var(--apply-bar-height); }

.apply-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--blue-600);
  color: var(--white);
  z-index: 900;
  box-shadow: 0 -8px 24px rgba(15, 23, 42, 0.18);
  padding: 14px 24px;
}

.apply-bar-inner {
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.apply-bar-inner::-webkit-scrollbar { height: 4px; }
.apply-bar-inner::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.3); border-radius: 4px; }

.apply-bar input[type="text"],
.apply-bar input[type="tel"] {
  background: var(--white);
  border: none;
  border-radius: 8px;
  padding: 0 12px;
  height: 40px;
  line-height: 40px;
  font-size: 13px;
  color: var(--ink-900);
  width: 118px;
  flex-shrink: 0;
  outline: none;
}
.apply-bar .consent-inline {
  display: flex;
  align-items: center;
  height: 40px;
  gap: 6px;
  font-size: 12px;
  white-space: nowrap;
  flex-shrink: 0;
}
.apply-bar .consent-inline input[type="checkbox"] { width: 15px; height: 15px; cursor: pointer; flex-shrink: 0; }
.apply-bar .consent-inline a { color: var(--white); text-decoration: underline; }

.apply-bar .apply-bar-submit {
  background: var(--white);
  color: var(--blue-700);
  font-weight: 800;
  height: 40px;
  padding: 0 22px;
  border-radius: 8px;
  border: none;
  font-size: 14px;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.apply-bar .apply-bar-submit:hover { background: var(--blue-50); }

.apply-bar-label {
  display: flex;
  align-items: center;
  height: 40px;
  font-size: 12px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.85);
  flex-shrink: 0;
}

.apply-bar.pulse { animation: apply-bar-pulse 0.9s ease; }
@keyframes apply-bar-pulse {
  0% { box-shadow: 0 -8px 24px rgba(15, 23, 42, 0.18), 0 0 0 0 rgba(37, 99, 235, 0.5); }
  60% { box-shadow: 0 -8px 24px rgba(15, 23, 42, 0.18), 0 0 0 10px rgba(37, 99, 235, 0); }
  100% { box-shadow: 0 -8px 24px rgba(15, 23, 42, 0.18), 0 0 0 0 rgba(37, 99, 235, 0); }
}

/* ---------- Stock detail layout (stock.html) ---------- */
.stock-status {
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 20px;
}
.stock-status.loading { background: var(--bg-soft); color: var(--ink-500); }
.stock-status.error { background: var(--red-50); color: var(--red-600); }
.stock-status.hidden { display: none; }

.stock-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
  padding: 32px 24px;
  max-width: 1120px;
  margin: 0 auto;
  align-items: start;
}

.stock-hero-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
}

.stock-hero-top { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.stock-hero-top h1 { font-size: 24px; font-weight: 800; color: var(--ink-900); }
.stock-hero-code { font-size: 13px; color: var(--ink-500); }

.stock-hero-price-row { display: flex; align-items: baseline; gap: 14px; margin: 16px 0 24px; flex-wrap: wrap; }
.stock-hero-price { font-size: 36px; font-weight: 800; color: var(--ink-900); }
.stock-hero-change { font-size: 16px; font-weight: 700; color: var(--red-600); }

.info-table { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--border); }
.info-cell { padding: 14px 6px; border-bottom: 1px solid var(--border); }
.info-cell:nth-child(3n+1) { padding-left: 0; }
.info-cell:nth-child(3n) { padding-right: 0; }
.info-label { font-size: 12px; color: var(--ink-500); margin-bottom: 4px; }
.info-value { font-size: 14px; font-weight: 700; color: var(--ink-900); }

.tab-menu { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-top: 8px; }
.tab-btn {
  background: none;
  border: none;
  padding: 12px 18px;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink-500);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.tab-btn.active { color: var(--blue-600); border-bottom-color: var(--blue-600); }
.tab-panel { display: none; padding: 24px 0; }
.tab-panel.active { display: block; }

.chart-placeholder {
  background: var(--bg-soft);
  border: 1px dashed var(--border);
  border-radius: 12px;
  height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-400);
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  padding: 20px;
}

.placeholder-text { color: var(--ink-500); font-size: 14px; padding: 40px 0; text-align: center; }

.chart-canvas-wrap { position: relative; height: 300px; margin-bottom: 12px; }
.chart-canvas-wrap-sm { height: 220px; margin-bottom: 20px; }
.chart-legend { font-size: 12px; color: var(--ink-500); text-align: center; }

.finance-table { width: 100%; border-collapse: collapse; }
.finance-table th, .finance-table td { padding: 12px 10px; border-bottom: 1px solid var(--border); font-size: 13px; text-align: right; }
.finance-table th:first-child, .finance-table td:first-child { text-align: left; }
.finance-table th { background: var(--bg-soft); color: var(--ink-700); font-weight: 700; }

.trade-flow-tab { margin-bottom: 0; }

.stock-side { position: sticky; top: 88px; display: flex; flex-direction: column; gap: 16px; }
.side-card { border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.side-card h3 { font-size: 14px; font-weight: 800; color: var(--ink-900); margin-bottom: 14px; }
.metric-list { display: flex; flex-direction: column; gap: 10px; }
.metric-row { display: flex; justify-content: space-between; font-size: 13px; }
.metric-row span:first-child { color: var(--ink-500); }
.metric-row span:last-child { font-weight: 700; color: var(--ink-900); }

.mini-chart-placeholder {
  height: 120px;
  background: var(--bg-soft);
  border: 1px dashed var(--border);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-400);
  font-size: 12px;
  margin-top: 12px;
  text-align: center;
  padding: 10px;
}
.mini-chart-placeholder.hidden { display: none; }

.mini-chart-wrap { position: relative; height: 120px; margin-top: 12px; }

.trade-flow { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 44px; }
.trade-flow-card { border: 1px solid var(--border); border-radius: 12px; padding: 20px; text-align: center; }
.trade-flow-label { font-size: 13px; color: var(--ink-500); margin-bottom: 8px; }
.trade-flow-value { font-size: 20px; font-weight: 800; }
.trade-flow-value.buy { color: var(--red-600); }
.trade-flow-value.sell { color: var(--blue-600); }

.bottom-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 32px; }
.bottom-grid h3 { font-size: 16px; font-weight: 800; color: var(--ink-900); margin-bottom: 16px; }

.news-list { display: flex; flex-direction: column; }
.news-item { padding: 14px 0; border-bottom: 1px solid var(--border); }
.news-item:last-child { border-bottom: none; }
.news-title { font-size: 14px; font-weight: 700; color: var(--ink-900); margin-bottom: 4px; }
.news-meta { font-size: 12px; color: var(--ink-500); }

.company-overview p { font-size: 14px; color: var(--ink-700); line-height: 1.85; }

.overview-list { display: flex; flex-direction: column; gap: 12px; }
.overview-row { display: flex; gap: 14px; font-size: 14px; align-items: baseline; }
.overview-row .label { width: 76px; flex-shrink: 0; color: var(--ink-500); font-weight: 600; }
.overview-row .value { color: var(--ink-900); word-break: break-word; }
.overview-row .value a { color: var(--blue-600); text-decoration: underline; }

.news-cta-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  text-align: center;
  background: var(--bg-soft);
}
.news-cta-text { font-size: 14px; color: var(--ink-500); margin-bottom: 16px; }

/* ---------- Report page (report.html) ---------- */
.report-layout {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 32px;
  max-width: 1120px;
  margin: 0 auto;
  padding: 40px 24px 64px;
  align-items: start;
}

.report-header { margin-bottom: 22px; }
.report-header h1 { font-size: 26px; font-weight: 800; color: var(--ink-900); margin-top: 8px; }
.report-date { font-size: 13px; color: var(--ink-500); margin: 10px 0 30px; }

.opinion-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 20px; }
.opinion-card { border: 1px solid var(--border); border-radius: 12px; padding: 18px; text-align: center; background: var(--bg-soft); }
.opinion-card .label { font-size: 12px; color: var(--ink-500); margin-bottom: 6px; }
.opinion-card .value { font-size: 18px; font-weight: 800; color: var(--ink-900); }
.opinion-card .sub { font-size: 12px; font-weight: 700; margin-top: 4px; }

.consensus-block { margin-bottom: 36px; }
.consensus-block h3 { font-size: 14px; font-weight: 800; margin-bottom: 12px; color: var(--ink-900); }
.consensus-bar-row { display: flex; align-items: center; gap: 12px; }
.consensus-track { flex: 1; height: 10px; background: var(--bg-soft); border-radius: 999px; overflow: hidden; }
.consensus-fill { height: 100%; border-radius: 999px; }
.consensus-fill.buy { background: var(--red-600); }
.consensus-fill.sell { background: var(--blue-600); }
.consensus-percent { font-weight: 800; font-size: 15px; white-space: nowrap; }
.consensus-percent.buy { color: var(--red-600); }
.consensus-percent.sell { color: var(--blue-600); }
.consensus-note { font-size: 12px; color: var(--ink-500); margin-top: 8px; }

.report-charts { display: grid; grid-template-columns: 1fr; gap: 20px; margin-bottom: 24px; }
.chart-card { border: 1px solid var(--border); border-radius: 12px; padding: 18px; }
.chart-card h4 { font-size: 13px; font-weight: 800; margin-bottom: 18px; color: var(--ink-900); }

.bar-chart { display: flex; align-items: flex-end; gap: 12px; height: 130px; }
.bar-chart .bar { flex: 1; background: var(--blue-500); border-radius: 6px 6px 0 0; position: relative; }
.bar-chart .bar span {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  color: var(--ink-700);
  font-weight: 700;
  margin-bottom: 4px;
  white-space: nowrap;
}
.chart-labels { display: flex; gap: 12px; margin-top: 8px; }
.chart-labels span { flex: 1; text-align: center; font-size: 11px; color: var(--ink-500); }

.line-chart-wrap { height: 130px; }

.blur-wrap { position: relative; margin-top: 8px; }
.blur-content { filter: blur(5px); user-select: none; pointer-events: none; opacity: 0.85; }
.blur-content h3 { font-size: 15px; font-weight: 800; margin: 20px 0 10px; color: var(--ink-900); }
.blur-content p { font-size: 13px; color: var(--ink-700); line-height: 1.8; margin-bottom: 10px; }
.blur-content ul { padding-left: 18px; }
.blur-content li { font-size: 13px; color: var(--ink-700); line-height: 1.9; list-style: disc; }

.blur-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.92) 32%, rgba(255, 255, 255, 0.98) 100%);
  padding: 20px;
}
.blur-overlay p { font-size: 15px; font-weight: 800; color: var(--ink-900); margin-bottom: 16px; max-width: 320px; }

.report-side { position: sticky; top: 88px; }
.apply-form-card {
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px;
  box-shadow: var(--shadow-lg);
  scroll-margin-top: 90px;
}
.apply-form-card h2 { font-size: 18px; font-weight: 800; color: var(--ink-900); margin-bottom: 6px; }
.apply-form-card .sub { font-size: 13px; color: var(--ink-500); margin-bottom: 24px; }

/* ---------- Duplicate-application modal ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 20px;
}
.modal-overlay.hidden { display: none; }

.modal-box {
  background: var(--white);
  border-radius: 16px;
  padding: 32px 28px;
  max-width: 360px;
  width: 100%;
  text-align: center;
  box-shadow: var(--shadow-lg);
}
.modal-box .modal-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--red-50);
  color: var(--red-600);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  font-size: 22px;
  font-weight: 800;
}
.modal-box h3 { font-size: 17px; font-weight: 800; color: var(--ink-900); margin-bottom: 12px; }
.modal-box p { font-size: 14px; color: var(--ink-700); line-height: 1.7; margin-bottom: 24px; }

/* ---------- Footer (shared) ---------- */
.site-footer { background: var(--ink-900); color: #cbd5e1; padding: 48px 24px 32px; text-align: left; }
.footer-inner { max-width: 1120px; margin: 0 auto; }
.footer-logo { height: 22px; width: auto; display: block; margin-bottom: 14px; }
.footer-company { font-size: 16px; font-weight: 800; color: var(--white); margin-bottom: 10px; }
.footer-meta { font-size: 12.5px; line-height: 1.9; color: #94a3b8; margin-bottom: 20px; }
.footer-disclaimer { font-size: 11.5px; line-height: 1.8; color: #64748b; border-top: 1px solid rgba(255, 255, 255, 0.08); padding-top: 18px; margin-bottom: 14px; }
.footer-privacy-note { font-size: 11.5px; line-height: 1.8; color: #64748b; margin-bottom: 14px; }
.footer-disclaimer a, .footer-privacy-note a { color: #94a3b8; }
.footer-copyright { font-size: 11.5px; color: #64748b; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .stock-layout { grid-template-columns: 1fr; }
  .stock-side { position: static; }
  .bottom-grid { grid-template-columns: 1fr; gap: 40px; }
  .report-layout { grid-template-columns: 1fr; }
  .report-side { position: static; }
  .sector-detail-layout { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
  .stock-grid { grid-template-columns: repeat(2, 1fr); }
  .hero .container { flex-direction: column; align-items: flex-start; gap: 32px; }
  .hero-search { max-width: 100%; width: 100%; }
  .hero-text h1 { font-size: 28px; }
  .trade-flow { grid-template-columns: 1fr; }
  .report-charts { grid-template-columns: 1fr; }
  .benefit-grid { grid-template-columns: 1fr; }
  .indicator-grid { grid-template-columns: repeat(2, 1fr); }
  .sector-stat-grid { grid-template-columns: repeat(2, 1fr); }
  .sector-top { flex-direction: column; }
  .criteria-box { max-width: 100%; }
}

@media (max-width: 520px) {
  .indicator-grid { grid-template-columns: 1fr; }
  .site-header .container { padding: 14px 16px; }
  .logo { font-size: 17px; }
  .logo-img { height: 36px; }
  .btn-primary { padding: 9px 14px; font-size: 13px; }
  .hero { padding: 44px 0 48px; }
  .hero .container { padding: 0 16px; }
  .hero-text h1 { font-size: 23px; }
  .hero-text p { font-size: 14px; }
  .section { padding: 52px 16px; }
  .section-narrow { padding: 0 16px 48px; }
  .stock-grid { grid-template-columns: 1fr; gap: 12px; }
  .stock-card { padding: 16px; }
  .apply-section { padding: 52px 16px; }
  .apply-wrap { padding: 30px 20px; }
  .stock-layout { padding: 24px 16px; }
  .info-table { grid-template-columns: repeat(2, 1fr); }
  .info-cell:nth-child(3n+1) { padding-left: 6px; }
  .info-cell:nth-child(2n+1) { padding-left: 0; }
  .opinion-cards { grid-template-columns: 1fr; }
  .report-layout { padding: 24px 16px 48px; }
  .sector-top-left h1 { font-size: 22px; }
  .compare-table th, .compare-table td { padding: 12px; }
  :root { --apply-bar-height: 210px; }

  /* 하단 고정 신청바: 한 줄에 다 안 들어가므로 여러 줄로 쌓이게 전환 */
  .apply-bar-inner { flex-wrap: wrap; overflow-x: visible; }
  .apply-bar-label { flex: 1 1 100%; height: auto; justify-content: center; text-align: center; line-height: 1.4; margin-bottom: 4px; }
  .apply-bar input[type="text"],
  .apply-bar input[type="tel"] { flex: 1 1 0; width: auto; min-width: 0; }
  .apply-bar .consent-inline { flex: 1 1 100%; justify-content: center; order: 2; }
  .apply-bar .apply-bar-submit { flex: 1 1 100%; order: 3; }
}
