/* ─── TOKENS ───────────────────────────────────────────── */
:root {
  --navy:        #0d1f3c;
  --navy-2:      #1a3358;
  --blue:        #2563eb;
  --blue-soft:   #eff6ff;
  --blue-mid:    #dbeafe;
  --green:       #16a34a;
  --green-soft:  #f0fdf4;
  --green-mid:   #dcfce7;
  --red:         #dc2626;
  --red-soft:    #fef2f2;
  --red-mid:     #fee2e2;
  --amber:       #d97706;
  --amber-soft:  #fffbeb;
  --amber-mid:   #fef3c7;
  --s900: #0f172a;
  --s700: #334155;
  --s600: #475569;
  --s500: #64748b;
  --s400: #94a3b8;
  --s300: #cbd5e1;
  --s200: #e2e8f0;
  --s100: #f1f5f9;
  --s50:  #f8fafc;
  --white: #ffffff;
  --bg:    #f3f6fb;

  --border:     1px solid rgba(15, 23, 42, 0.08);
  --border-med: 1px solid rgba(15, 23, 42, 0.14);

  --sh-xs: 0 1px 3px rgba(15,23,42,0.06);
  --sh-sm: 0 2px 8px  rgba(15,23,42,0.08);
  --sh:    0 6px 20px rgba(15,23,42,0.09);
  --sh-lg: 0 16px 48px rgba(15,23,42,0.11);

  --r-sm: 10px;
  --r:    16px;
  --r-lg: 22px;
  --r-xl: 999px;

  --font: "Apple SD Gothic Neo", "Noto Sans KR", -apple-system, BlinkMacSystemFont,
          "Helvetica Neue", sans-serif;
}

/* ─── RESET ────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--s900);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

button { font-family: inherit; cursor: pointer; }
a      { color: inherit; }

/* ─── VIEWS ────────────────────────────────────────────── */
.view        { display: none; min-height: 100vh; }
.view.active { display: block; animation: vfade 240ms ease; }

@keyframes vfade {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ─── NAV: HOME ────────────────────────────────────────── */
.nav-home {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  padding: 0 32px;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(14px);
  border-bottom: var(--border);
  position: sticky;
  top: 0;
  z-index: 200;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 0.94rem;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: -0.01em;
}

.brand-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--blue);
  flex-shrink: 0;
}

.status-indicator {
  font-size: 0.78rem;
  font-weight: 700;
  padding: 5px 13px;
  border-radius: var(--r-xl);
  background: var(--s100);
  color: var(--s500);
  transition: background 300ms, color 300ms;
}
.status-indicator.ok  { background: var(--green-mid); color: var(--green); }
.status-indicator.err { background: var(--red-mid);   color: var(--red);   }

/* ─── HERO ─────────────────────────────────────────────── */
.hero {
  max-width: 660px;
  margin: 0 auto;
  padding: 72px 24px 52px;
  text-align: center;
}

.eyebrow {
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 22px;
}

.hero h1 {
  font-size: clamp(2.6rem, 6vw, 4rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.04em;
  color: var(--navy);
}

.hero h1 strong { color: var(--blue); }

.hero-desc {
  margin-top: 18px;
  color: var(--s500);
  font-size: 1.05rem;
  line-height: 1.75;
}

/* ─── SEARCH BOX ────────────────────────────────────────── */
.search-form { margin-top: 36px; }

.search-box {
  display: flex;
  align-items: center;
  background: var(--white);
  border: 1.5px solid var(--s300);
  border-radius: 60px;
  padding: 6px 6px 6px 18px;
  box-shadow: var(--sh-lg);
  transition: border-color 180ms, box-shadow 180ms;
}
.search-box:focus-within {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.1), var(--sh-lg);
}

.search-icon {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  margin-right: 10px;
}

.search-box input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-size: 1rem;
  color: var(--s900);
  min-width: 0;
}
.search-box input::placeholder { color: var(--s300); }

.search-btn {
  flex-shrink: 0;
  padding: 11px 24px;
  border: none;
  border-radius: 52px;
  background: var(--navy);
  color: white;
  font-weight: 700;
  font-size: 0.9rem;
  transition: background 140ms;
}
.search-btn:hover { background: var(--navy-2); }

/* ─── HERO CHIPS ────────────────────────────────────────── */
.hero-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 22px;
}
.hero-chips span {
  padding: 6px 14px;
  border-radius: var(--r-xl);
  background: var(--white);
  border: var(--border);
  font-size: 0.82rem;
  color: var(--s600);
  box-shadow: var(--sh-xs);
}

/* ─── FEATURED ──────────────────────────────────────────── */
.featured-section {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px 72px;
}

.section-header {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 18px;
}
.section-header h2 { font-size: 1rem; font-weight: 700; color: var(--s700); }
.section-header p  { font-size: 0.88rem; color: var(--s500); }

.featured-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
}

.company-card {
  background: var(--white);
  border: var(--border);
  border-radius: var(--r);
  padding: 18px 16px;
  text-align: left;
  transition: border-color 160ms, box-shadow 160ms, transform 160ms;
  box-shadow: var(--sh-xs);
}
.company-card:hover {
  border-color: var(--blue);
  box-shadow: 0 0 0 2px rgba(37,99,235,0.1), var(--sh-sm);
  transform: translateY(-2px);
}
.company-card .c-name {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--s900);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.company-card .c-code {
  font-size: 0.78rem;
  color: var(--s400);
  margin-top: 5px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

/* ─── NAV: SUB ──────────────────────────────────────────── */
.nav-sub {
  display: flex;
  align-items: center;
  gap: 14px;
  height: 58px;
  padding: 0 24px;
  background: var(--white);
  border-bottom: var(--border);
  position: sticky;
  top: 0;
  z-index: 200;
  box-shadow: var(--sh-xs);
}

.back-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--r-sm);
  border: var(--border);
  background: var(--white);
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--s700);
  flex-shrink: 0;
  transition: background 140ms;
}
.back-btn:hover { background: var(--s100); }

/* ─── Favorites ──────────────────────────────────────────────────────── */
.fav-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: var(--border);
  background: var(--white);
  color: var(--s400);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-left: auto;
  transition: all 140ms;
}
.fav-btn:hover  { background: var(--s100); }
.fav-btn.active { color: #f59e0b; border-color: #f59e0b; background: #fffbeb; }

.fav-card { position: relative; }
.fav-remove {
  position: absolute;
  top: 6px; right: 6px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--s200);
  color: var(--s600);
  font-size: 0.8rem;
  font-style: normal;
  display: flex; align-items: center; justify-content: center;
  opacity: 0;
  transition: opacity 140ms;
  cursor: pointer;
  line-height: 1;
}
.fav-card:hover .fav-remove { opacity: 1; }

.search-form-mini {
  display: flex;
  flex: 1;
  max-width: 440px;
  margin: 0 auto;
  gap: 8px;
}
.search-form-mini input {
  flex: 1;
  height: 38px;
  border: var(--border);
  border-radius: var(--r-sm);
  padding: 0 14px;
  font-size: 0.9rem;
  background: var(--s50);
  outline: none;
  transition: border-color 140ms;
}
.search-form-mini input:focus { border-color: var(--blue); background: var(--white); }
.search-form-mini button {
  height: 38px;
  padding: 0 16px;
  border-radius: var(--r-sm);
  border: none;
  background: var(--navy);
  color: white;
  font-weight: 700;
  font-size: 0.86rem;
}

/* ─── RESULTS ───────────────────────────────────────────── */
.results-body {
  max-width: 700px;
  margin: 0 auto;
  padding: 28px 24px 64px;
}
.results-label {
  font-size: 0.88rem;
  color: var(--s500);
  margin-bottom: 14px;
}
.results-list { display: grid; gap: 9px; }

.result-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  background: var(--white);
  border: var(--border);
  border-radius: var(--r);
  box-shadow: var(--sh-xs);
  transition: border-color 140ms;
}
.result-row:hover { border-color: var(--s300); }
.result-row .r-name { font-weight: 700; font-size: 0.98rem; color: var(--s900); }
.result-row .r-meta { font-size: 0.82rem; color: var(--s500); margin-top: 3px; }
.result-row .r-btn {
  flex-shrink: 0;
  padding: 9px 18px;
  border: none;
  border-radius: var(--r-sm);
  background: var(--blue-soft);
  color: var(--blue);
  font-weight: 700;
  font-size: 0.86rem;
  transition: background 140ms;
}
.result-row .r-btn:hover { background: var(--blue-mid); }

/* ─── ANALYSIS TOPBAR ───────────────────────────────────── */
.analysis-topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 58px;
  padding: 0 28px;
  background: var(--white);
  border-bottom: var(--border);
  position: sticky;
  top: 0;
  z-index: 200;
  box-shadow: var(--sh-xs);
}
.at-name {
  font-size: 0.96rem;
  font-weight: 700;
  color: var(--s900);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.at-meta {
  margin-left: auto;
  font-size: 0.82rem;
  color: var(--s400);
  white-space: nowrap;
  flex-shrink: 0;
}

/* ─── ANALYSIS CONTENT ──────────────────────────────────── */
.analysis-content {
  max-width: 1060px;
  margin: 0 auto;
  padding: 32px 24px 100px;
}

/* ── Report header */
.report-header {
  padding-bottom: 24px;
  margin-bottom: 20px;
  border-bottom: var(--border);
}
.rh-top {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 8px;
}
.rh-top h2 {
  font-size: 1.7rem;
  font-weight: 800;
  letter-spacing: -0.035em;
  color: var(--navy);
}
.rh-meta { font-size: 0.86rem; color: var(--s500); margin-top: 2px; }
.rh-meta a { color: var(--blue); font-weight: 600; text-decoration: none; }
.rh-meta a:hover { text-decoration: underline; }
.rh-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.rh-chip {
  padding: 5px 12px;
  border-radius: var(--r-xl);
  background: var(--s100);
  font-size: 0.8rem;
  color: var(--s700);
  text-decoration: none;
}

/* ─── SECTOR CONTEXT ────────────────────────────────────── */
.sector-context {
  margin: 20px 0;
  background: #f0f4ff;
  border: 1px solid #c7d7fd;
  border-radius: var(--r-md);
  padding: 14px 18px;
}

.sc-header {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--blue);
  margin-bottom: 10px;
}

.sc-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--blue);
}

.sc-watch-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.sc-watch-list li {
  font-size: 0.83rem;
  color: var(--s700);
  padding-left: 14px;
  position: relative;
  line-height: 1.5;
}
.sc-watch-list li::before {
  content: '·';
  position: absolute;
  left: 4px;
  color: var(--blue);
  font-weight: 700;
}

/* ─── VERDICT ───────────────────────────────────────────── */
.verdict {
  padding: 26px 28px;
  border-radius: var(--r-lg);
  border: var(--border);
  background: var(--white);
  box-shadow: var(--sh-sm);
  margin-bottom: 16px;
}
.verdict-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 11px;
  border-radius: var(--r-xl);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.verdict-title {
  font-size: 1.18rem;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}
.verdict-body { font-size: 0.92rem; color: var(--s600); line-height: 1.75; }

.verdict.positive { background: linear-gradient(135deg,#f0fdf4 0%,var(--white) 60%); border-color: rgba(22,163,74,0.18); }
.verdict.positive  .verdict-pill { background: var(--green-mid); color: var(--green); }
.verdict.warning,
.verdict.watch     { background: linear-gradient(135deg,#fffbeb 0%,var(--white) 60%); border-color: rgba(217,119,6,0.18); }
.verdict.warning   .verdict-pill,
.verdict.watch     .verdict-pill { background: var(--amber-mid); color: var(--amber); }
.verdict.critical  { background: linear-gradient(135deg,#fef2f2 0%,var(--white) 60%); border-color: rgba(220,38,38,0.18); }
.verdict.critical  .verdict-pill { background: var(--red-mid); color: var(--red); }
.verdict.neutral   .verdict-pill { background: var(--s100); color: var(--s500); }

/* ─── METRICS ROW ───────────────────────────────────────── */
.metrics-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 36px;
}
.metric-card {
  background: var(--white);
  border: var(--border);
  border-radius: var(--r);
  padding: 20px;
  box-shadow: var(--sh-xs);
}
.mc-label { font-size: 0.8rem; font-weight: 600; color: var(--s500); margin-bottom: 8px; }
.mc-value { font-size: 1.28rem; font-weight: 800; color: var(--navy); letter-spacing: -0.03em; }
.mc-delta { margin-top: 6px; font-size: 0.79rem; color: var(--s400); line-height: 1.5; }

/* ─── SECTION LABEL ─────────────────────────────────────── */
.sec-label {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.sec-label h3 { font-size: 0.96rem; font-weight: 700; color: var(--s700); }
.sec-count {
  font-size: 0.76rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--r-xl);
  background: var(--s100);
  color: var(--s500);
}

/* ─── PRO / CON ─────────────────────────────────────────── */
.procon-wrap { margin-bottom: 40px; }

.procon-eyebrow {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--s400);
  margin-bottom: 14px;
}

.procon-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  align-items: start;
}
.procon-col { display: flex; flex-direction: column; gap: 10px; }

.col-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 16px;
  border-radius: var(--r);
  font-size: 0.88rem;
  font-weight: 700;
}
.col-header.pos {
  background: var(--green-soft);
  color: var(--green);
  border: 1px solid rgba(22,163,74,0.15);
}
.col-header.neg {
  background: var(--red-soft);
  color: var(--red);
  border: 1px solid rgba(220,38,38,0.15);
}

.insight-card {
  padding: 18px 20px;
  border-radius: var(--r);
  background: var(--white);
  border: var(--border);
  border-left-width: 3px;
  box-shadow: var(--sh-xs);
}
.insight-card.positive { border-left-color: var(--green); background: linear-gradient(to right,#f9fef9,var(--white)); }
.insight-card.warning,
.insight-card.watch    { border-left-color: var(--amber); background: linear-gradient(to right,#fffdf5,var(--white)); }
.insight-card.critical { border-left-color: var(--red);   background: linear-gradient(to right,#fff8f8,var(--white)); }
.insight-card.neutral  { border-left-color: var(--s300); }

.insight-card h4 {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--s900);
  margin-bottom: 6px;
  line-height: 1.45;
}
.insight-card p { font-size: 0.86rem; color: var(--s600); line-height: 1.7; }

/* ─── NEXT QUARTER ──────────────────────────────────────── */
.nq-wrap { margin-bottom: 40px; }

.nq-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: var(--r);
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 0.88rem;
  font-weight: 700;
  margin-bottom: 12px;
  border: 1px solid rgba(37,99,235,0.12);
}

.checklist-list { display: grid; gap: 10px; }

.checklist-card {
  display: flex;
  gap: 14px;
  padding: 18px 20px;
  background: linear-gradient(to right, #f5f9ff, var(--white));
  border: var(--border);
  border-left: 3px solid var(--blue);
  border-radius: var(--r);
  box-shadow: var(--sh-xs);
}
.ck-num {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--blue);
  color: white;
  font-size: 0.72rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
}
.ck-body h4 { font-size: 0.9rem; font-weight: 700; color: var(--s900); margin-bottom: 5px; line-height: 1.4; }
.ck-body p  { font-size: 0.84rem; color: var(--s600); line-height: 1.68; }

/* ─── TREND TABLE ───────────────────────────────────────── */
.trend-section {
  margin-bottom: 32px;
}

.trend-table {
  background: var(--white);
  border: var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
}

.trend-row {
  display: grid;
  border-bottom: var(--border);
  align-items: center;
}
.trend-row:last-child { border-bottom: none; }

.trend-head {
  background: var(--s50);
}

.tr-metric {
  padding: 12px 16px;
  font-size: 0.82rem;
  color: var(--s600);
  font-weight: 500;
  border-right: var(--border);
}

.tr-year {
  padding: 10px 14px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--s500);
  text-align: center;
  border-right: var(--border);
}
.tr-year:last-child { border-right: none; }

.tr-val {
  padding: 12px 14px;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--s800);
  text-align: center;
  border-right: var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.tr-val:last-child { border-right: none; }
.tr-val.na { color: var(--s300); font-weight: 400; }

.tr-arrow        { font-size: 0.68rem; font-weight: 700; }
.tr-arrow.up     { color: #16a34a; }
.tr-arrow.dn     { color: #dc2626; }
.tr-arrow.fl     { color: var(--s400); font-size: 0.9rem; }

/* ─── RATIO GRID ────────────────────────────────────────── */
.ratio-section { margin-bottom: 40px; }

.ratio-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.ratio-card {
  padding: 18px;
  background: var(--white);
  border: var(--border);
  border-radius: var(--r);
  box-shadow: var(--sh-xs);
}
.rc-label { font-size: 0.78rem; color: var(--s500); margin-bottom: 8px; }
.rc-value { font-size: 1.18rem; font-weight: 800; color: var(--navy); letter-spacing: -0.02em; }
.rc-note  { margin-top: 6px; font-size: 0.76rem; color: var(--s400); line-height: 1.5; }

/* ─── QUICK LINKS ───────────────────────────────────────── */
.ql-section { margin-bottom: 40px; }

.ql-list {
  display: grid;
  gap: 8px;
}

.ql-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px 18px;
  background: var(--white);
  border: var(--border);
  border-radius: var(--r);
  box-shadow: var(--sh-xs);
  text-decoration: none;
  transition: border-color 140ms, box-shadow 140ms, transform 120ms;
}

.ql-row:hover {
  border-color: var(--blue);
  box-shadow: 0 0 0 2px rgba(37,99,235,0.08), var(--sh-sm);
  transform: translateY(-1px);
}

.ql-tag {
  flex-shrink: 0;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  padding: 3px 9px;
  border-radius: var(--r-xl);
  white-space: nowrap;
}

.ql-tag-accent  { background: var(--navy); color: var(--white); }
.ql-tag-neutral { background: var(--s100); color: var(--s600); }

.ql-title {
  flex: 1;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--s900);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.ql-date {
  flex-shrink: 0;
  font-size: 0.8rem;
  color: var(--s400);
  white-space: nowrap;
}

.ql-arrow {
  flex-shrink: 0;
  color: var(--s300);
  transition: color 140ms, transform 140ms;
}

.ql-row:hover .ql-arrow {
  color: var(--blue);
  transform: translateX(2px);
}


/* ─── BADGES & PILLS ────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: var(--r-xl);
  font-size: 0.75rem;
  font-weight: 700;
  background: var(--blue-soft);
  color: var(--blue);
}
.badge.muted { background: var(--s100); color: var(--s600); }

.pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: var(--r-xl);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}
.pill.positive { background: var(--green-mid); color: var(--green); }
.pill.warning,
.pill.watch    { background: var(--amber-mid); color: var(--amber); }
.pill.critical { background: var(--red-mid);   color: var(--red);   }
.pill.neutral  { background: var(--s100);      color: var(--s500);  }

/* ─── METRIC DELTA COLORS ───────────────────────────────── */
.mc-delta.pos span { color: var(--green); font-weight: 700; }
.mc-delta.neg span { color: var(--red);   font-weight: 700; }

/* ─── COL COUNT BADGE ───────────────────────────────────── */
.col-count {
  font-size: 0.74rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: var(--r-xl);
  margin-left: auto;
}
.col-count.pos { background: rgba(22,163,74,0.12);  color: var(--green); }
.col-count.neg { background: rgba(220,38,38,0.1);   color: var(--red);   }

/* ─── CONTEXT STRIP (neutral drivers) ──────────────────── */
.context-strip {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
}

.context-card {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 16px;
  background: var(--s50);
  border: var(--border);
  border-radius: var(--r-sm);
  font-size: 0.84rem;
}

.ctx-label {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--s400);
  flex-shrink: 0;
}

.ctx-title {
  font-weight: 700;
  color: var(--s700);
  flex-shrink: 0;
}

.ctx-body { color: var(--s500); }

/* ─── RH CHIP LINK ──────────────────────────────────────── */
.rh-chip-link {
  color: var(--blue);
  background: var(--blue-soft);
}

/* ─── SKELETON LOADING ──────────────────────────────────── */
.skeleton-card {
  pointer-events: none;
}

.sk-line {
  border-radius: 6px;
  background: linear-gradient(90deg, var(--s100) 25%, var(--s50) 50%, var(--s100) 75%);
  background-size: 200% 100%;
  animation: sk-wave 1.4s infinite;
}
.sk-name { height: 14px; width: 70%; margin-bottom: 10px; }
.sk-code { height: 11px; width: 40%; }

@keyframes sk-wave {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ─── UTILITIES ─────────────────────────────────────────── */
.spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2.5px solid var(--s200);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin 0.65s linear infinite;
  flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }

.loading-state {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 48px 0;
  color: var(--s500);
  font-size: 0.9rem;
}
.empty-state {
  padding: 28px;
  text-align: center;
  color: var(--s400);
  font-size: 0.88rem;
  background: var(--white);
  border: var(--border);
  border-radius: var(--r);
}

/* ─── RESPONSIVE ─────────────────────────────────────────── */
@media (max-width: 1100px) {
  .featured-grid { grid-template-columns: repeat(5, 1fr); }
}
@media (max-width: 900px) {
  .featured-grid { grid-template-columns: repeat(4, 1fr); }
  .procon-grid   { grid-template-columns: 1fr; }
  .metrics-row   { grid-template-columns: repeat(2, 1fr); }
  .ratio-grid    { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 660px) {
  .nav-home        { padding: 0 16px; }
  .hero            { padding: 48px 20px 40px; }
  .hero h1         { font-size: clamp(2.2rem, 9vw, 3rem); }
  .featured-grid   { grid-template-columns: repeat(3, 1fr); }
  .nav-sub         { padding: 0 16px; }
  .analysis-topbar { padding: 0 16px; }
  .at-meta         { display: none; }
  .analysis-content{ padding: 24px 16px 80px; }
}
@media (max-width: 440px) {
  .featured-grid        { grid-template-columns: repeat(2, 1fr); }
  .metrics-row          { grid-template-columns: 1fr; }
  .ratio-grid           { grid-template-columns: repeat(2, 1fr); }
  .search-box           { flex-wrap: wrap; border-radius: 20px; padding: 10px; gap: 8px; }
  .search-box input     { width: 100%; min-height: 44px; font-size: 1rem; }
  .search-icon          { display: none; }
  .search-btn           { width: 100%; padding: 14px; border-radius: 12px; font-size: 1rem; }
}

/* ─── FOOTER ────────────────────────────────────────────── */
.site-footer {
  text-align: center;
  padding: 28px 24px 36px;
  font-size: 0.78rem;
  color: var(--s400);
  line-height: 1.8;
}
.site-footer a {
  color: var(--s400);
  text-decoration: none;
}
.site-footer a:hover { color: var(--s600); }
