/* ==========================================================================
   EVARCELL — Bio Patient Acquisition System (BPAS)
   Premium White Theme  ·  main.css
   ========================================================================== */

:root {
  /* Palette — bio / medical premium */
  --navy: #0b1f3a;
  --navy-2: #13294b;
  --ink: #0f172a;
  --slate: #475569;
  --slate-2: #64748b;
  --muted: #64748b;
  --line: #e6ebf2;
  --line-2: #eef2f7;
  --bg: #ffffff;
  --bg-soft: #f7f9fc;
  --bg-soft-2: #f1f5fb;

  --teal: #0ea5a4;
  --teal-2: #0d9488;
  --emerald: #10b981;
  --sky: #0284c7;
  --gold: #b8893a;

  --grad-hero: linear-gradient(135deg, #0b1f3a 0%, #123a5f 55%, #0d6d6b 100%);
  --grad-accent: linear-gradient(135deg, #0ea5a4 0%, #0284c7 100%);
  --grad-soft: linear-gradient(180deg, #ffffff 0%, #f7f9fc 100%);

  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06), 0 1px 3px rgba(15, 23, 42, .05);
  --shadow-md: 0 10px 30px rgba(15, 23, 42, .08);
  --shadow-lg: 0 24px 60px rgba(11, 31, 58, .14);
  /* 프리미엄 호버 — 테두리 색까지 링으로 번지게 해서 카드가 들리는 느낌을 준다 */
  --shadow-hover: 0 18px 44px rgba(11, 31, 58, .13), 0 2px 8px rgba(14, 165, 164, .10);
  --ring-teal: 0 0 0 3px rgba(14, 165, 164, .12);

  /* 카드 배경 틴트 (흰색 → 아주 옅은 색) */
  --tint-teal: linear-gradient(180deg, #ffffff 0%, #f4fbfb 100%);
  --tint-sky: linear-gradient(180deg, #ffffff 0%, #f4f9fe 100%);
  --tint-pink: linear-gradient(180deg, #ffffff 0%, #fff5fa 100%);
  --tint-amber: linear-gradient(180deg, #ffffff 0%, #fffaf3 100%);
  --line-hi: #cfe0ea;

  --radius: 16px;
  --radius-sm: 12px;
  --radius-lg: 24px;
  --maxw: 1180px;
  --nav-h: 72px;

  --font: "Pretendard", -apple-system, BlinkMacSystemFont, "Segoe UI", "Malgun Gothic", system-ui, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 { line-height: 1.2; letter-spacing: -0.02em; margin: 0; color: var(--ink); }
p { margin: 0; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ---------- Header / Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 100;
  height: var(--nav-h);
  /* 브랜드 톤 틴트 배경 — 스크롤 시 뒤 콘텐츠가 비치지 않도록 불투명하게 채운다 */
  background:
    linear-gradient(90deg, rgba(14, 165, 164, .07) 0%, rgba(2, 132, 199, .05) 52%, rgba(14, 165, 164, .07) 100%),
    linear-gradient(180deg, #ffffff 0%, #f7fbfc 100%);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid #dceaee;
  box-shadow: 0 1px 3px rgba(11, 31, 58, .05);
}
/* 아래로 스크롤하면 살짝 진해지며 경계가 또렷해진다 (components.js 가 클래스 토글) */
.nav.is-stuck {
  background:
    linear-gradient(90deg, rgba(14, 165, 164, .1) 0%, rgba(2, 132, 199, .07) 52%, rgba(14, 165, 164, .1) 100%),
    linear-gradient(180deg, #ffffff 0%, #f2f8fa 100%);
  border-bottom-color: #cfe2e7;
  box-shadow: 0 6px 20px rgba(11, 31, 58, .09);
}
.nav__inner {
  max-width: var(--maxw); margin: 0 auto; height: 100%;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px;
}
.brand { display: flex; align-items: center; gap: 11px; font-weight: 800; letter-spacing: -0.02em; }
.brand__mark {
  width: 38px; height: 38px; flex: 0 0 38px; border-radius: 50%;
  filter: drop-shadow(0 6px 16px rgba(14, 165, 164, .35));
}
.brand__name { font-size: 18px; color: var(--navy); }
.brand__ev { background: var(--grad-accent); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent; }
.brand__name small { display: block; font-size: 10.5px; font-weight: 600; letter-spacing: .14em; color: var(--teal-2); }

.nav__menu { display: flex; align-items: center; gap: 4px; }
.nav__menu a {
  padding: 9px 14px; border-radius: 10px; font-size: 14.5px; font-weight: 600; color: var(--slate);
  transition: all .16s ease;
}
.nav__menu a:hover { color: var(--navy); background: var(--bg-soft-2); }
.nav__menu a.active { color: var(--teal-2); background: rgba(14, 165, 164, .09); }

.nav__cta {
  padding: 10px 18px !important; border-radius: 11px; color: #fff !important;
  background: var(--navy); font-weight: 700 !important;
  box-shadow: var(--shadow-sm);
}
.nav__cta:hover { background: var(--navy-2) !important; transform: translateY(-1px); }

.nav__burger { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav__burger span { display: block; width: 22px; height: 2px; background: var(--ink); margin: 5px 0; border-radius: 2px; transition: .2s; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background: var(--grad-hero); color: #fff;
  padding: 96px 0 108px;
  --hero-img: url("https://images.unsplash.com/photo-1628595351029-c2bf17511435?auto=format&fit=crop&w=1600&q=80");
}
/* Bio/DNA image layer — crisp, light blur (falls back to gradient if image fails) */
.hero::before {
  content: ""; position: absolute; inset: -12px;
  background-image: var(--hero-img);
  background-size: cover; background-position: center;
  filter: blur(2px) saturate(1.1); opacity: .5; transform: scale(1.03);
  pointer-events: none; z-index: 0;
}
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: 0;
  background:
    linear-gradient(100deg, rgba(11, 31, 58, .82) 0%, rgba(18, 41, 75, .55) 48%, rgba(13, 109, 107, .32) 100%),
    radial-gradient(600px 320px at 82% 8%, rgba(14, 165, 164, .3), transparent 60%);
  pointer-events: none;
}
.hero .container { position: relative; z-index: 1; }
.hero__eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 15px; border-radius: 999px; font-size: 13px; font-weight: 700; letter-spacing: .04em;
  background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .22);
  color: #dbeafe; margin-bottom: 22px;
}
.hero h1 { font-size: clamp(30px, 5vw, 52px); font-weight: 800; color: #fff; max-width: 20ch; }
.hero__lead { margin-top: 20px; font-size: clamp(16px, 2vw, 19px); color: #c7d6ea; max-width: 60ch; }
.hero__actions { margin-top: 34px; display: flex; gap: 14px; flex-wrap: wrap; }

/* 모든 버튼은 테두리를 가진 "박스"로 보이게 한다.
   투명 테두리를 쓰면 밝은 배경에서 버튼 경계가 사라져 클릭 가능성이 안 읽힌다. */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 14px 26px; border-radius: 12px; font-weight: 700; font-size: 15px; cursor: pointer;
  border: 1.5px solid var(--line); background: var(--tint-teal); color: var(--navy);
  transition: all .18s ease;
}
.btn--primary {
  background: var(--grad-accent); color: #fff;
  border-color: rgba(13, 148, 136, .55);
  box-shadow: 0 12px 30px rgba(14, 165, 164, .4), inset 0 1px 0 rgba(255, 255, 255, .3);
}
.btn--primary:hover {
  transform: translateY(-2px); border-color: rgba(13, 148, 136, .8);
  box-shadow: 0 18px 40px rgba(14, 165, 164, .5), inset 0 1px 0 rgba(255, 255, 255, .35);
}
.btn--ghost {
  background: rgba(255, 255, 255, .1); color: #fff;
  border-color: rgba(255, 255, 255, .38);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18);
}
.btn--ghost:hover { background: rgba(255, 255, 255, .2); border-color: rgba(255, 255, 255, .62); }
.btn--dark {
  background: var(--navy); color: #fff; border-color: #1c3557;
  box-shadow: 0 10px 26px rgba(11, 31, 58, .28);
}
.btn--dark:hover { background: var(--navy-2); border-color: #2b4a75; transform: translateY(-2px); }
.btn--outline {
  background: var(--tint-teal); color: var(--navy);
  border-color: var(--line-hi); box-shadow: var(--shadow-sm);
}
.btn--outline:hover {
  border-color: var(--teal); color: var(--teal-2);
  background: linear-gradient(180deg, #f0fdfa 0%, #e4f6f5 100%);
}

/* ---------- Sections ---------- */
.section { padding: 88px 0; }
.section--soft { background: var(--bg-soft); }
.section--navy { background: var(--grad-hero); color: #fff; }
.section--navy h2, .section--navy h3 { color: #fff; }

/* navy 섹션 안에 놓이는 "밝은 배경" 컴포넌트는 글자색을 되돌린다.
   섹션의 color:#fff 가 상속되면 흰 카드 위 흰 글자가 되어 내용이 사라진다. */
.section--navy .card,
.section--navy .flow-h__node,
.section--navy .flow__step,
.section--navy .axis,
.section--navy .callout { color: var(--slate); }
.section--navy .card h3,
.section--navy .flow-h__node .t,
.section--navy .flow__step h4,
.section--navy .axis h3,
.section--navy .callout strong { color: var(--navy); }

.section__head { max-width: 720px; margin: 0 auto 54px; text-align: center; }
.section__head--left { margin-left: 0; text-align: left; }
.eyebrow {
  display: inline-block; font-size: 13px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase;
  color: var(--teal-2); margin-bottom: 14px;
}
.section h2 { font-size: clamp(26px, 3.4vw, 38px); font-weight: 800; }
.section__sub { margin-top: 16px; font-size: 17px; color: var(--slate); }
.section--navy .section__sub { color: #c7d6ea; }

/* ---------- Cards / Grid ---------- */
.grid { display: grid; gap: 22px; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
.grid--5 { grid-template-columns: repeat(5, 1fr); }

.card {
  position: relative; overflow: hidden;
  background: var(--tint-teal); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px; box-shadow: var(--shadow-sm);
  transition: box-shadow .24s var(--ease), transform .24s var(--ease), border-color .24s ease;
}
/* 상단 액센트 라인 — 평소엔 숨고 호버에서 좌→우로 그려진다 */
.card::before {
  content: ""; position: absolute; inset: 0 0 auto; height: 3px;
  background: var(--grad-accent); transform: scaleX(0); transform-origin: left;
  transition: transform .32s var(--ease);
}
.card:hover {
  box-shadow: var(--shadow-hover), var(--ring-teal);
  transform: translateY(-4px); border-color: var(--line-hi);
}
.card:hover::before { transform: scaleX(1); }
.card:hover .card__icon { background: var(--grad-accent); color: #fff; transform: scale(1.05) rotate(-3deg); }
.card__icon {
  width: 50px; height: 50px; border-radius: 13px; display: grid; place-items: center;
  font-size: 22px; margin-bottom: 18px;
  background: rgba(14, 165, 164, .1); color: var(--teal-2);
  transition: background .24s ease, color .24s ease, transform .24s var(--ease);
}
.card h3 { font-size: 18.5px; font-weight: 800; margin-bottom: 9px; }
.card p { color: var(--slate); font-size: 14.5px; }
.card__num { font-size: 13px; font-weight: 800; color: var(--muted); letter-spacing: .1em; }

/* Feature chip list */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.chip {
  font-size: 13px; font-weight: 600; padding: 6px 13px; border-radius: 999px;
  background: var(--bg-soft-2); color: var(--slate); border: 1px solid var(--line);
}

/* ---------- Flow / Pipeline ---------- */
.flow { display: flex; flex-direction: column; gap: 14px; max-width: 560px; margin: 0 auto; }
.flow__step {
  display: flex; align-items: center; gap: 16px;
  background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 18px 22px;
  box-shadow: var(--shadow-sm);
}
.flow__badge {
  flex: 0 0 auto; width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center;
  background: var(--grad-accent); color: #fff; font-weight: 800; font-size: 16px;
}
.flow__arrow { text-align: center; color: var(--teal); font-size: 20px; line-height: 1; }

/* Horizontal flow (steps in a row) */
.flow-h { display: flex; flex-wrap: wrap; align-items: stretch; gap: 0; justify-content: center; }
.flow-h__node {
  flex: 1 1 0; min-width: 130px; text-align: center; background: #fff;
  border: 1px solid var(--line); border-radius: 14px; padding: 20px 14px; box-shadow: var(--shadow-sm);
}
.flow-h__node .n { font-size: 22px; margin-bottom: 8px; }
.flow-h__node .t { font-weight: 700; font-size: 14.5px; }
.flow-h__sep { display: grid; place-items: center; color: var(--teal); font-size: 22px; padding: 0 6px; }

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.stat { text-align: center; }
.stat__num { font-size: clamp(30px, 4vw, 46px); font-weight: 800; color: var(--teal-2); letter-spacing: -0.03em; }
.section--navy .stat__num { color: #5eead4; }
.stat__label { margin-top: 6px; font-size: 14.5px; color: var(--slate); font-weight: 600; }
.section--navy .stat__label { color: #c7d6ea; }

/* ---------- Table ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
table.premium { width: 100%; border-collapse: collapse; background: #fff; min-width: 640px; }
table.premium th, table.premium td { padding: 15px 18px; text-align: left; border-bottom: 1px solid var(--line-2); font-size: 14.5px; }
table.premium thead th { background: var(--bg-soft-2); color: var(--navy); font-weight: 800; font-size: 13.5px; letter-spacing: .02em; }
table.premium tbody tr:last-child td { border-bottom: 0; }
table.premium tbody tr:hover { background: var(--bg-soft); }

/* ---------- Grade badges ---------- */
.grade { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; font-weight: 800; color: #fff; font-size: 14px; }
.grade--a { background: #059669; }
.grade--b { background: #0ea5a4; }
.grade--c { background: #0284c7; }
.grade--d { background: #7c3aed; }
.grade--e { background: #94a3b8; }
.grade--f { background: #ea580c; }   /* 주사 중 · 증상·반응 확인 */
.grade--g { background: #0f766e; }   /* 주사 완료 · 사후관리 */
.grade--h { background: #db2777; }   /* 추천·소개 — 최우선 */

/* ---------- Split / Two-col ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.split__media {
  background: var(--grad-soft); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 34px; box-shadow: var(--shadow-md); min-height: 260px;
}

/* ---------- CTA band ---------- */
.cta-band { background: var(--grad-hero); color: #fff; border-radius: var(--radius-lg); padding: 56px; text-align: center; position: relative; overflow: hidden; }
.cta-band::after { content: ""; position: absolute; inset: 0; background: radial-gradient(500px 260px at 85% 15%, rgba(14, 165, 164, .4), transparent 60%); }
.cta-band > * { position: relative; z-index: 1; }
.cta-band h2 { color: #fff; font-size: clamp(24px, 3.4vw, 34px); }
.cta-band p { color: #c7d6ea; margin-top: 14px; font-size: 17px; }
.cta-band .btn { margin-top: 28px; }

/* ---------- Page hero (interior) ---------- */
.page-hero {
  background: var(--grad-hero); color: #fff; padding: 76px 0 66px; position: relative; overflow: hidden;
  --hero-img: url("https://images.unsplash.com/photo-1628595351029-c2bf17511435?auto=format&fit=crop&w=1600&q=80");
}
/* Bio/DNA image layer — crisp, light blur (falls back to gradient if image fails) */
.page-hero::before {
  content: ""; position: absolute; inset: -12px; z-index: 0;
  background-image: var(--hero-img);
  background-size: cover; background-position: center;
  filter: blur(2px) saturate(1.1); opacity: .48; transform: scale(1.03);
  pointer-events: none;
}
.page-hero::after {
  content: ""; position: absolute; inset: 0; z-index: 0;
  background:
    linear-gradient(100deg, rgba(11, 31, 58, .84) 0%, rgba(18, 41, 75, .58) 52%, rgba(13, 109, 107, .34) 100%),
    radial-gradient(520px 280px at 88% 12%, rgba(14, 165, 164, .28), transparent 60%);
}
.page-hero .container { position: relative; z-index: 1; }
/* Per-page hero imagery */
.page-hero--pipeline { --hero-img: url("https://images.unsplash.com/photo-1655720828018-edd2daec9349?auto=format&fit=crop&w=1600&q=80"); }
.page-hero--channels { --hero-img: url("https://images.unsplash.com/photo-1633167606207-d840b5070fc2?auto=format&fit=crop&w=1600&q=80"); }
.page-hero--crm       { --hero-img: url("https://images.unsplash.com/photo-1614308457932-e16d85c5d053?auto=format&fit=crop&w=1600&q=80"); }
.page-hero--ai        { --hero-img: url("https://images.unsplash.com/photo-1554475900-0a0350e3fc7b?auto=format&fit=crop&w=1600&q=80"); }
.page-hero--proposal  { --hero-img: url("https://images.unsplash.com/photo-1530026405186-ed1f139313f8?auto=format&fit=crop&w=1600&q=80"); }
.page-hero--contact   { --hero-img: url("https://images.unsplash.com/photo-1628595351029-c2bf17511435?auto=format&fit=crop&w=1600&q=80"); }
.page-hero h1 { font-size: clamp(28px, 4.4vw, 44px); font-weight: 800; color: #fff; }
.page-hero p { margin-top: 16px; color: #c7d6ea; font-size: 18px; max-width: 58ch; }
.breadcrumb { font-size: 13.5px; color: #93b4d8; margin-bottom: 16px; font-weight: 600; }
.breadcrumb a:hover { color: #fff; }

/* ---------- Callout ---------- */
.callout { border-left: 4px solid var(--teal); background: var(--bg-soft); border-radius: 0 14px 14px 0; padding: 22px 26px; }
.callout strong { color: var(--navy); }

/* ---------- Numbered list ---------- */
.axis-list { display: grid; gap: 18px; }
.axis {
  display: grid; grid-template-columns: 56px 1fr; gap: 20px; align-items: start;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow-sm);
}
.axis__no { width: 56px; height: 56px; border-radius: 14px; background: var(--grad-accent); color: #fff; display: grid; place-items: center; font-size: 22px; font-weight: 800; }
.axis h3 { font-size: 19px; font-weight: 800; margin-bottom: 7px; }
.axis p { color: var(--slate); font-size: 15px; }

/* ---------- Form ---------- */
.form { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 40px; box-shadow: var(--shadow-md); }
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 14px; font-weight: 700; color: var(--navy); margin-bottom: 7px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 13px 15px; border: 1px solid var(--line); border-radius: 11px;
  font-family: inherit; font-size: 15px; color: var(--ink); background: #fff; transition: border .15s;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(14, 165, 164, .12); }
.field textarea { min-height: 120px; resize: vertical; }

/* ---------- Footer ---------- */
.footer { background: var(--navy); color: #cbd5e1; padding: 64px 0 32px; }
.footer__top { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; padding-bottom: 44px; border-bottom: 1px solid rgba(255, 255, 255, .1); }
.footer__brand .brand__name { color: #fff; }
.footer__brand p { margin-top: 16px; color: #c2cfdd; font-size: 14px; max-width: 34ch; }
.footer__col h4 { color: #fff; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 18px; }
.footer__col a { display: block; color: #c2cfdd; font-size: 14.5px; padding: 6px 0; transition: color .15s; }
.footer__col a:hover { color: var(--teal); }
.footer__bottom { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 14px; padding-top: 28px; font-size: 13px; color: #97a7ba; }
.footer__badge { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; color: #c2cfdd; }

/* ---------- Utilities ---------- */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; } .mt-8 { margin-top: 8px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; } .mt-40 { margin-top: 40px; }
.mb-0 { margin-bottom: 0; }
.lead { font-size: 18px; color: var(--slate); }
.divider { height: 1px; background: var(--line); border: 0; margin: 0; }
.tag { display: inline-block; font-size: 12px; font-weight: 800; letter-spacing: .08em; padding: 5px 11px; border-radius: 999px; background: rgba(14,165,164,.1); color: var(--teal-2); }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
/* 메뉴 항목이 7개 — 데스크톱 하단 구간에서 폭을 살짝 좁혀 한 줄을 유지한다 */
@media (max-width: 1180px) {
  .nav__menu { gap: 1px; }
  .nav__menu a { padding: 9px 10px; font-size: 13.5px; }
  .brand__name { font-size: 16.5px; }
}
@media (max-width: 960px) {
  .grid--4, .grid--5 { grid-template-columns: repeat(2, 1fr); }
  .footer__top { grid-template-columns: 1fr 1fr; }
  .split { grid-template-columns: 1fr; gap: 30px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  .nav__menu { position: fixed; inset: var(--nav-h) 0 auto 0; flex-direction: column; align-items: stretch; gap: 0;
    background: linear-gradient(180deg, #f7fbfc 0%, #ffffff 100%);
    border-bottom: 1px solid #dceaee; padding: 10px 16px 18px; box-shadow: var(--shadow-md);
    transform: translateY(-140%); transition: transform .25s ease; }
  .nav__menu.open { transform: translateY(0); }
  .nav__menu a { padding: 13px 12px; border-radius: 10px; }
  .nav__burger { display: block; }
  .grid--2, .grid--3, .grid--4, .grid--5 { grid-template-columns: 1fr; }
  .section { padding: 60px 0; }
  .hero { padding: 70px 0 78px; }
  .cta-band { padding: 40px 24px; }
  .form { padding: 26px; }
  .flow-h__sep { transform: rotate(90deg); }
}

/* ==========================================================================
   PREMIUM THEME LAYER — refined gradients, depth & rich hover interactions
   (additive; overrides base where intentional)
   ========================================================================== */

/* Global easing + subtle body texture */
:root { --ease: cubic-bezier(.22, 1, .36, .58); --ring: 0 0 0 3px rgba(14,165,164,.16); }
body {
  background:
    radial-gradient(720px 480px at 88% -8%, rgba(14,165,164,.05), transparent 60%),
    radial-gradient(680px 460px at -6% 4%, rgba(2,132,199,.045), transparent 60%),
    var(--bg);
}

/* Gradient text accent for headings */
.grad-text {
  background: linear-gradient(100deg, #0ea5a4 0%, #0284c7 55%, #13294b 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent;
}

/* ---- Brand ---- */
.brand { transition: transform .25s var(--ease); }
.brand:hover { transform: translateY(-1px); }
.brand:hover .brand__mark { box-shadow: 0 8px 22px rgba(14,165,164,.55); transform: rotate(-4deg) scale(1.05); }
.brand__mark { transition: transform .3s var(--ease), box-shadow .3s var(--ease); }

/* ---- Nav: animated underline ---- */
.nav__menu a:not(.nav__cta) { position: relative; }
.nav__menu a:not(.nav__cta)::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 5px; height: 2px; border-radius: 2px;
  background: var(--grad-accent); transform: scaleX(0); transform-origin: left; transition: transform .28s var(--ease);
}
.nav__menu a:not(.nav__cta):hover::after,
.nav__menu a.active:not(.nav__cta)::after { transform: scaleX(1); }
.nav__cta { position: relative; overflow: hidden; }
.nav__cta::after {
  content: ""; position: absolute; top: 0; left: -80%; width: 60%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.35), transparent); transform: skewX(-20deg);
  transition: left .55s var(--ease);
}
.nav__cta:hover::after { left: 130%; }

/* ---- Buttons: shine sweep + deeper lift ---- */
.btn { position: relative; overflow: hidden; will-change: transform; }
.btn::before {
  content: ""; position: absolute; top: 0; left: -85%; width: 55%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.4), transparent); transform: skewX(-20deg);
  transition: left .6s var(--ease); pointer-events: none;
}
.btn:hover::before { left: 135%; }
.btn:active { transform: translateY(0) scale(.985); }
.btn--outline:hover { box-shadow: 0 10px 26px rgba(14,165,164,.18); transform: translateY(-2px); }

/* ---- Cards: gradient top bar + glow lift + icon pop ---- */
.card { position: relative; overflow: hidden; transition: transform .32s var(--ease), box-shadow .32s var(--ease), border-color .32s var(--ease); }
.card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--grad-accent); transform: scaleX(0); transform-origin: left; transition: transform .4s var(--ease);
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: transparent; }
.card:hover::before { transform: scaleX(1); }
.card__icon { transition: transform .35s var(--ease), background .35s var(--ease), color .35s var(--ease); }
.card:hover .card__icon { transform: translateY(-2px) scale(1.08); background: var(--grad-accent); color: #fff; box-shadow: 0 10px 24px rgba(14,165,164,.4); }

/* ---- Flow steps ---- */
.flow__step, .flow-h__node { transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease); }
.flow__step:hover { transform: translateX(4px); box-shadow: var(--shadow-md); border-color: #cfe0ea; }
.flow__step:hover .flow__badge { transform: scale(1.1) rotate(-5deg); }
.flow__badge { transition: transform .3s var(--ease); }
.flow-h__node:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); border-color: transparent; }

/* ---- Axis rows ---- */
.axis { transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease); }
.axis:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: #cfe0ea; }
.axis:hover .axis__no { transform: rotate(-4deg) scale(1.06); box-shadow: 0 12px 26px rgba(14,165,164,.42); }
.axis__no { transition: transform .3s var(--ease), box-shadow .3s var(--ease); }

/* ---- Stats pop ---- */
.stat { transition: transform .3s var(--ease); }
.stat:hover { transform: translateY(-4px); }
.stat:hover .stat__num { text-shadow: 0 8px 26px rgba(14,165,164,.35); }
.stat__num { transition: text-shadow .3s var(--ease); }

/* ---- Grade badges ---- */
.grade { transition: transform .25s var(--ease), box-shadow .25s var(--ease); }
tr:hover .grade, .grade:hover { transform: scale(1.12); box-shadow: 0 8px 18px rgba(15,23,42,.22); }

/* ---- Chips / tags ---- */
.chip, .tag { transition: all .22s var(--ease); }
.chip:hover { background: var(--grad-accent); color: #fff; border-color: transparent; transform: translateY(-2px); }
.tag:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(14,165,164,.28); }

/* ---- Split media ---- */
.split__media { transition: transform .4s var(--ease), box-shadow .4s var(--ease); }
.split__media:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }

/* ---- Table rows ---- */
table.premium tbody tr { transition: background .2s ease, box-shadow .2s ease; }
table.premium tbody tr:hover { background: var(--bg-soft-2); box-shadow: inset 3px 0 0 var(--teal); }

/* ---- Callout hover sheen ---- */
.callout { transition: transform .3s var(--ease), box-shadow .3s var(--ease); }
.callout:hover { transform: translateX(3px); box-shadow: var(--shadow-sm); }

/* ---- CTA band shimmer ---- */
.cta-band .btn { box-shadow: 0 14px 34px rgba(0,0,0,.28); }
.cta-band .btn:hover { transform: translateY(-3px); }

/* ---- Footer links slide ---- */
.footer__col a { position: relative; transition: color .2s ease, padding-left .25s var(--ease); }
.footer__col a:hover { padding-left: 8px; }
.footer__col a::before {
  content: ""; position: absolute; left: 0; top: 50%; width: 0; height: 1.5px; background: var(--teal);
  transform: translateY(-50%); transition: width .25s var(--ease);
}
.footer__col a:hover::before { width: 5px; }

/* ---- Hero interior image gentle zoom ---- */
.page-hero::before, .hero::before { transition: transform 1.2s var(--ease), opacity .6s ease; }
.page-hero:hover::before, .hero:hover::before { transform: scale(1.07); }

/* ---- Focus visibility (a11y) ---- */
a:focus-visible, button:focus-visible, .btn:focus-visible, input:focus-visible { outline: none; box-shadow: var(--ring); border-radius: 8px; }

/* ---- Form field lift ---- */
.field input, .field select, .field textarea { transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: #cfe0ea; }

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ==========================================================================
   AI 상담관리 (consult.html) — 탭 / 질문 타임라인 / 필터
   ========================================================================== */
.page-hero--consult { --hero-img: url("https://images.unsplash.com/photo-1587560699334-cc4ff634909a?auto=format&fit=crop&w=1600&q=80"); }

/* ---------- Source badge (실데이터 / 샘플 표시) ---------- */
.srcbar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  margin-bottom: 22px; font-size: 13.5px; color: var(--slate);
}
.srcbadge {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 13px; border-radius: 999px; font-size: 12.5px; font-weight: 700;
  border: 1px solid var(--line);
}
.srcbadge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.srcbadge--live { color: #047857; background: rgba(16, 185, 129, .1); border-color: rgba(16, 185, 129, .3); }
.srcbadge--seed { color: #92400e; background: rgba(245, 158, 11, .1); border-color: rgba(245, 158, 11, .32); }
.srcbadge--load { color: var(--slate-2); background: var(--bg-soft-2); }

/* ---------- Tabs ----------
   밑줄형 대신 박스 세그먼트형. 탭 묶음 자체를 하나의 트랙(테두리+틴트 배경)으로
   감싸고 각 탭에도 테두리를 줘서 "누를 수 있는 것"이 분명히 보이게 한다. */
.tabs {
  display: flex; flex-wrap: wrap; gap: 7px;
  padding: 8px; margin-bottom: 30px;
  background: var(--tint-teal);
  border: 1px solid var(--line); border-radius: 18px;
  box-shadow: var(--shadow-sm), inset 0 1px 0 #fff;
  transition: border-color .22s var(--ease), box-shadow .22s var(--ease);
}
.tabs:hover { border-color: var(--line-hi); box-shadow: var(--shadow-md), inset 0 1px 0 #fff; }
.tab {
  appearance: none; cursor: pointer;
  padding: 12px 20px; font-family: var(--font); font-size: 15px; font-weight: 700;
  color: var(--slate-2); border-radius: 12px;
  background: #fff; border: 1.5px solid var(--line);
  transition: color .2s ease, background .2s ease, border-color .2s ease,
              box-shadow .2s ease, transform .2s ease;
  display: inline-flex; align-items: center; gap: 9px;
}
.tab:hover {
  color: var(--navy); background: var(--bg-soft-2);
  border-color: var(--line-hi); transform: translateY(-1px); box-shadow: var(--shadow-sm);
}
.tab[aria-selected="true"] {
  color: var(--teal-2);
  background: linear-gradient(180deg, #f0fdfa 0%, #e4f6f5 100%);
  border-color: rgba(14, 165, 164, .45);
  box-shadow: 0 6px 18px rgba(14, 165, 164, .18), inset 0 1px 0 rgba(255, 255, 255, .8);
}
.tab[aria-selected="true"]:hover { transform: none; }
.tab__ico { font-size: 17px; }
.tab__cnt {
  font-size: 11.5px; font-weight: 800; padding: 2px 8px; border-radius: 999px;
  background: var(--bg-soft-2); color: var(--slate-2); border: 1px solid var(--line);
}
.tab[aria-selected="true"] .tab__cnt { background: var(--grad-accent); color: #fff; border-color: transparent; }

.tabpanel[hidden] { display: none; }

/* ---------- Platform meta strip ---------- */
.pmeta {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 16px; padding: 20px 24px; margin-bottom: 24px;
  background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius);
}
.pmeta__t { font-weight: 800; font-size: 16.5px; color: var(--navy); }
.pmeta__d { font-size: 14px; color: var(--slate); margin-top: 4px; }
.pmeta__link {
  font-size: 13.5px; font-weight: 700; color: var(--teal-2);
  padding: 9px 16px; border-radius: 10px; border: 1px solid rgba(14, 165, 164, .32);
  background: rgba(14, 165, 164, .07); white-space: nowrap;
}
.pmeta__link:hover { background: var(--grad-accent); color: #fff; border-color: transparent; }

/* ---------- Filter toolbar ---------- */
.qfilter {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 20px;
}
.qfilter input[type="search"], .qfilter select {
  font-family: var(--font); font-size: 14px; color: var(--ink);
  padding: 10px 14px; border: 1px solid var(--line); border-radius: 10px; background: #fff;
  transition: border-color .18s ease, box-shadow .18s ease;
}
.qfilter input[type="search"] { flex: 1 1 240px; min-width: 200px; }
.qfilter input:focus, .qfilter select:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(14, 165, 164, .15); }
.qfilter__spacer { flex: 1 1 auto; }
.btn-ghost {
  appearance: none; cursor: pointer; font-family: var(--font); font-size: 13.5px; font-weight: 700;
  padding: 10px 16px; border-radius: 10px; border: 1.5px solid var(--line-hi);
  background: var(--tint-teal); color: var(--slate);
  box-shadow: var(--shadow-sm);
  transition: all .18s ease;
}
.btn-ghost:hover {
  border-color: var(--teal); color: var(--teal-2);
  background: linear-gradient(180deg, #f0fdfa 0%, #e4f6f5 100%);
  transform: translateY(-1px); box-shadow: var(--shadow-md);
}
.btn-ghost:active { transform: translateY(0) scale(.985); }

/* ---------- 계약 단계 칩 (계약 전 · 주사 중 · 주사 완료) ---------- */
.qchips { display: flex; flex-wrap: wrap; gap: 9px; margin-bottom: 20px; }
.qchip {
  display: inline-flex; align-items: center; gap: 7px; cursor: pointer;
  padding: 9px 15px; border-radius: 999px; font-size: 13.5px; font-weight: 700;
  background: #fff; color: var(--slate); border: 1.5px solid var(--line);
  transition: border-color .18s ease, color .18s ease, background .18s ease, box-shadow .18s ease;
}
.qchip:hover { border-color: #c6d6e4; color: var(--navy); background: var(--bg-soft); transform: translateY(-1px); }
.qchip.is-on:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }
.qchip__c {
  font-size: 11.5px; font-weight: 800; padding: 1px 7px; border-radius: 999px;
  background: var(--bg-soft-2); color: var(--slate-2); font-variant-numeric: tabular-nums;
}
.qchip.is-on { color: #fff; border-color: transparent; box-shadow: var(--shadow-sm); }
.qchip.is-on .qchip__c { background: rgba(255, 255, 255, .24); color: #fff; }
.qchip.is-on[data-stage=""]      { background: var(--navy); }
.qchip--pre.is-on                { background: #64748b; }
.qchip--ing.is-on                { background: #ea580c; }
.qchip--done.is-on               { background: #0f766e; }

/* 단계 태그 (질문 카드 · 범례 공용) */
.qtag--st { font-weight: 800; }
.qtag--pre  { background: #f1f5f9; color: #475569; border-color: #dbe4ec; }
.qtag--ing  { background: #fff4ec; color: #c2410c; border-color: #fbd8bf; }
.qtag--done { background: #ecfdf7; color: #0f766e; border-color: #c3e9de; }

/* ---------- 언어 필터 바 (외국어 상담) ---------- */
.qlangbar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  flex-wrap: wrap; margin-bottom: 20px; padding: 14px 18px;
  background: var(--tint-sky); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: var(--shadow-sm);
  transition: border-color .22s ease, box-shadow .22s ease;
}
.qlangbar:hover { border-color: var(--line-hi); box-shadow: var(--shadow-md); }
.qchips--lg { margin-bottom: 0; }
.qlangbar__r { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.qlangbar__n {
  font-size: 12.5px; font-weight: 800; color: var(--sky);
  font-variant-numeric: tabular-nums; white-space: nowrap;
}

/* 언어 칩 — is-on 시 해당 언어 고유색(--lgc)으로 채운다 */
.qchip--lg.is-on { background: var(--lgc, var(--navy)); }
.qchip--lg:hover { border-color: var(--lgc, #c6d6e4); }

/* 국문 번역 병기 토글 */
.qtoggle {
  display: inline-flex; align-items: center; gap: 9px; cursor: pointer;
  padding: 8px 15px 8px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 700;
  background: #fff; color: var(--slate); border: 1.5px solid var(--line);
  transition: all .18s ease;
}
.qtoggle:hover { border-color: var(--sky); color: var(--sky); }
.qtoggle__d {
  width: 30px; height: 17px; border-radius: 999px; background: #dbe4ec;
  position: relative; flex: 0 0 auto; transition: background .2s ease;
}
.qtoggle__d::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 13px; height: 13px;
  border-radius: 50%; background: #fff; box-shadow: var(--shadow-sm);
  transition: transform .22s var(--ease);
}
.qtoggle.is-on { border-color: var(--sky); color: var(--sky); background: rgba(2, 132, 199, .06); }
.qtoggle.is-on .qtoggle__d { background: var(--sky); }
.qtoggle.is-on .qtoggle__d::after { transform: translateX(13px); }

/* 언어 태그 (질문 카드 · 범례 공용) */
.qtag--lg {
  font-weight: 800; color: var(--lgc, var(--slate));
  background: color-mix(in srgb, var(--lgc, #64748b) 8%, #fff);
  border-color: color-mix(in srgb, var(--lgc, #64748b) 26%, #fff);
}
/* 국기 이모지 — Windows 는 flag 글리프가 없어 "KR"·"US" 두 글자로 표시된다.
   깨져 보이지 않게 국가코드 배지처럼 보이도록 스타일을 잡는다. */
.lgflag {
  display: inline-grid; place-items: center; min-width: 20px; height: 15px;
  padding: 0 3px; border-radius: 3px; font-size: 9.5px; font-weight: 800;
  letter-spacing: .02em; line-height: 1; color: var(--slate-2);
  background: var(--bg-soft-2); border: 1px solid var(--line);
}
.qtag--lg .lgflag, .qchip .lgflag { border: 0; background: none; }

/* ---------- Stat row (compact) ---------- */
.qstats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; margin-bottom: 26px; }
.qstat {
  position: relative; overflow: hidden;
  background: var(--tint-teal); border: 1px solid var(--line); border-radius: 14px;
  padding: 18px 20px; box-shadow: var(--shadow-sm);
  transition: box-shadow .22s var(--ease), transform .22s var(--ease), border-color .22s ease;
}
.qstat::before {
  content: ""; position: absolute; inset: 0 auto 0 0; width: 3px;
  background: var(--grad-accent); transform: scaleY(0); transform-origin: top;
  transition: transform .28s var(--ease);
}
.qstat:hover {
  box-shadow: var(--shadow-hover), var(--ring-teal);
  transform: translateY(-3px); border-color: var(--line-hi);
}
.qstat:hover::before { transform: scaleY(1); }
.qstat__n { font-size: 28px; font-weight: 800; color: var(--teal-2); letter-spacing: -.02em; line-height: 1.1; }
.qstat__l { margin-top: 5px; font-size: 13px; font-weight: 600; color: var(--slate-2); }
/* 추천 의향은 계약 전환 가치가 가장 높아 시각적으로 분리한다 */
.qstat--ref { border-color: #f9c3dc; background: var(--tint-pink); }
.qstat--ref::before { background: linear-gradient(180deg, #db2777, #f472b6); }
.qstat--ref .qstat__n { color: #db2777; }
.qstat--ref:hover { border-color: #f2a3c8; box-shadow: var(--shadow-hover), 0 0 0 3px rgba(219, 39, 119, .12); }

/* ==========================================================================
   질문 분포 차트 (외부 라이브러리 없음 — CSS 막대 + conic-gradient)
   ========================================================================== */
.chartbox { margin-bottom: 26px; }
.chartbox__t {
  display: flex; align-items: center; gap: 10px; width: 100%; cursor: pointer;
  padding: 13px 18px; border-radius: 12px; font-size: 14px; font-weight: 800;
  color: var(--navy); background: var(--bg-soft-2); border: 1px solid var(--line);
  transition: background .18s ease, border-color .18s ease;
}
.chartbox__t:hover { background: #eaf4f6; border-color: var(--line-hi); box-shadow: var(--shadow-sm); }
.chartbox__i { margin-left: auto; font-size: 12.5px; font-weight: 700; color: var(--slate-2); }

.chartgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 16px; }
.chart {
  position: relative; overflow: hidden;
  background: var(--tint-teal); border: 1px solid var(--line); border-radius: 14px;
  padding: 20px 22px; box-shadow: var(--shadow-sm);
  transition: box-shadow .24s var(--ease), transform .24s var(--ease), border-color .24s ease;
}
.chart::before {
  content: ""; position: absolute; inset: 0 0 auto; height: 3px;
  background: var(--grad-accent); transform: scaleX(0); transform-origin: left;
  transition: transform .34s var(--ease);
}
.chart:hover {
  box-shadow: var(--shadow-hover), var(--ring-teal);
  transform: translateY(-3px); border-color: var(--line-hi);
}
.chart:hover::before { transform: scaleX(1); }
.chart--wide { grid-column: 1 / -1; }
.chart__h {
  font-size: 14.5px; font-weight: 800; color: var(--navy); margin-bottom: 18px;
  display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap;
}
.chart__h small { font-size: 12px; font-weight: 600; color: var(--slate-2); }
.chart__note {
  margin-top: 18px; padding-top: 14px; border-top: 1px dashed var(--line);
  font-size: 12.5px; font-weight: 600; color: var(--slate-2);
}
.chart__note b { color: var(--navy); font-weight: 800; }

/* ---------- (1) 2축 히트맵 ---------- */
.hm { display: grid; gap: 4px; overflow-x: auto; }
.hm__r { display: grid; grid-template-columns: 108px repeat(8, minmax(34px, 1fr)) 46px; gap: 4px; }
.hm__c {
  display: grid; place-items: center; min-height: 36px; border-radius: 7px;
  font-size: 13px; font-weight: 800; color: #fff; font-variant-numeric: tabular-nums;
}
.hm__c--lbl { justify-content: flex-start; color: var(--slate); font-weight: 700; font-size: 12px; }
.hm__c--ax { font-size: 11px; font-weight: 800; color: var(--muted); letter-spacing: -.01em; }
.hm__c--h, .hm__c--t { background: none; color: var(--slate-2); font-size: 12px; font-weight: 800; }
.hm__c--h .grade { width: 24px; height: 24px; font-size: 11.5px; border-radius: 6px; }
.hm__c.is-0 { background: #f6f8fa; }
.hm__c.is-v {
  text-shadow: 0 1px 2px rgba(0, 0, 0, .25); cursor: default;
  transition: transform .18s var(--ease), box-shadow .18s ease, opacity .18s ease;
}
/* 값 칸 호버 — 살짝 커지고 불투명도를 끌어올려 지금 보는 칸을 확실히 구분한다 */
.hm__c.is-v:hover { transform: scale(1.09); opacity: 1 !important; box-shadow: var(--shadow-md); z-index: 2; }
.hm__r--f .hm__c--lbl { color: var(--navy); font-weight: 800; }
.hm__r--f { border-top: 1px solid var(--line); padding-top: 4px; }

/* ---------- (2) 도넛 ---------- */
.donutwrap { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.donut {
  width: 132px; height: 132px; border-radius: 50%; flex: 0 0 auto;
  display: grid; place-items: center; position: relative;
}
.donut::after {
  content: ""; position: absolute; inset: 26px; background: #fff; border-radius: 50%;
}
.donut__c { position: relative; z-index: 1; text-align: center; line-height: 1.15; }
.donut__c b { display: block; font-size: 24px; font-weight: 800; color: var(--navy); }
.donut__c small { font-size: 11.5px; font-weight: 700; color: var(--slate-2); }
.dleg { display: grid; gap: 10px; flex: 1 1 170px; }
.dleg--row { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 14px; font-size: 12.5px; font-weight: 700; color: var(--slate-2); }
.dleg__i { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.dleg__l { font-weight: 700; color: var(--navy); }
.dleg__v { margin-left: auto; font-weight: 700; color: var(--slate-2); font-variant-numeric: tabular-nums; }
.dot { width: 11px; height: 11px; border-radius: 50%; flex: 0 0 auto; }

/* ---------- (3) 가로 막대 ---------- */
.hbars { display: grid; gap: 9px; }
.hbar {
  display: grid; grid-template-columns: 24px 96px 1fr 30px; gap: 10px; align-items: center;
  padding: 2px 6px; margin: 0 -6px; border-radius: 8px;
  transition: background .18s ease;
}
.hbar:hover { background: rgba(14, 165, 164, .07); }
.hbar:hover .hbar__f { filter: saturate(1.25) brightness(1.04); }
.hbar .grade { width: 22px; height: 22px; font-size: 11px; border-radius: 6px; }
.hbar__l { font-size: 12.5px; font-weight: 700; color: var(--slate); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hbar__t { height: 11px; background: #f1f5f9; border-radius: 999px; overflow: hidden; }
.hbar__f { display: block; height: 100%; border-radius: 999px; transition: width .5s var(--ease), filter .18s ease; }
.hbar__v { font-size: 12.5px; font-weight: 800; color: var(--navy); text-align: right; font-variant-numeric: tabular-nums; }
.hbar__v small { display: block; font-size: 10px; font-weight: 700; color: var(--muted); margin-top: 1px; }

/* (5) 언어 막대 — 국기 자리를 두고 값 열을 넓힌다 */
.hbar--lg { grid-template-columns: 20px 78px 1fr 40px; }
.hbar--lg.is-intl .hbar__l { color: var(--navy); }

/* (6) 언어 × 단계 100% 누적 막대 */
.sbars { display: grid; gap: 9px; }
.sbar {
  display: grid; grid-template-columns: 20px 78px 1fr 34px; gap: 10px; align-items: center;
  padding: 2px 6px; margin: 0 -6px; border-radius: 8px; transition: background .18s ease;
}
.sbar:hover { background: rgba(14, 165, 164, .07); }
.sbar__l { font-size: 12.5px; font-weight: 700; color: var(--navy); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sbar__t {
  display: flex; height: 20px; border-radius: 7px; overflow: hidden;
  background: #f1f5f9; box-shadow: inset 0 0 0 1px rgba(15, 23, 42, .04);
}
.sbar__s {
  display: grid; place-items: center; font-size: 11px; font-weight: 800; color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .28); min-width: 0;
  transition: width .5s var(--ease), filter .18s ease;
}
.sbar__s:hover { filter: brightness(1.12); }
.sbar__v { font-size: 12.5px; font-weight: 800; color: var(--navy); text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- (4) 일별 누적 막대 ---------- */
.vbars {
  display: flex; align-items: flex-end; gap: 10px; height: 172px;
  padding-bottom: 2px; overflow-x: auto;
}
.vcol {
  flex: 1 1 0; min-width: 34px; display: flex; flex-direction: column;
  justify-content: flex-end; height: 100%; border-radius: 8px 8px 0 0;
  transition: background .18s ease;
}
.vcol:hover { background: rgba(14, 165, 164, .08); }
.vcol:hover .vbar { filter: saturate(1.2) brightness(1.05); }
.vcol:hover .vcol__n { color: var(--teal-2); }
.vcol__n { text-align: center; font-size: 11.5px; font-weight: 800; color: var(--slate-2); margin-bottom: 4px; font-variant-numeric: tabular-nums; transition: color .18s ease; }
.vbar {
  display: flex; flex-direction: column; border-radius: 6px 6px 0 0; overflow: hidden;
  min-height: 4px; transition: height .5s var(--ease), filter .18s ease;
}
.vbar__s { display: block; width: 100%; }
.vcol__x { text-align: center; font-size: 11px; font-weight: 700; color: var(--muted); margin-top: 7px; font-variant-numeric: tabular-nums; }

/* ---------- 차트 등장 애니메이션 ----------
   렌더 직후 .is-pre 를 붙였다 떼서 막대가 0에서 자라 보이게 한다.
   막대의 최종 크기는 인라인 style 로 들어오므로 CSS 는 시작값만 덮어쓴다. */
.hbar__f.is-pre, .fnl__b.is-pre, .sbar__s.is-pre { width: 0 !important; }
.vbar.is-pre { height: 0 !important; }
/* 도넛은 크기가 아니라 회전으로 채워지는 느낌을 준다 */
.donut { animation: donutIn .7s var(--ease) both; }
@keyframes donutIn {
  from { transform: rotate(-90deg) scale(.86); opacity: 0; }
  to { transform: rotate(0) scale(1); opacity: 1; }
}

/* ---------- Question timeline ---------- */
.qday {
  display: flex; align-items: center; gap: 12px; margin: 30px 0 14px;
  font-size: 13.5px; font-weight: 800; color: var(--navy); letter-spacing: .01em;
}
.qday::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.qday__c { font-weight: 700; color: var(--slate-2); font-size: 12.5px; }

.qlist { display: grid; gap: 10px; }
.qitem {
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: 66px 1fr auto; gap: 16px; align-items: start;
  background: var(--tint-teal); border: 1px solid var(--line); border-radius: 13px;
  padding: 16px 18px; box-shadow: var(--shadow-sm);
  transition: box-shadow .22s var(--ease), transform .22s var(--ease), border-color .22s ease;
}
.qitem::before {
  content: ""; position: absolute; inset: 0 auto 0 0; width: 3px;
  background: var(--grad-accent); transform: scaleY(0); transform-origin: top;
  transition: transform .26s var(--ease);
}
.qitem:hover {
  box-shadow: var(--shadow-hover), var(--ring-teal);
  transform: translateY(-3px); border-color: var(--line-hi);
}
.qitem:hover::before { transform: scaleY(1); }
.qitem:hover .qitem__time { color: var(--navy); }
.qitem__time {
  font-size: 13px; font-weight: 800; color: var(--teal-2);
  font-variant-numeric: tabular-nums; padding-top: 2px; transition: color .2s ease;
}
.qitem__q { font-size: 15px; color: var(--ink); font-weight: 600; line-height: 1.5; }
/* 외국어 원문 — 라틴·키릴·아랍 문자에서도 읽히도록 자간·행간을 조정한다 */
.qitem__q--intl { letter-spacing: 0; line-height: 1.55; word-break: break-word; }
.qitem__q--intl[dir="rtl"] { text-align: right; }
/* 국문 번역 — 원문 아래 보조 표시. 원문을 대체하지 않는다는 걸 위치로도 드러낸다 */
.qitem__ko {
  margin-top: 8px; padding: 8px 12px; border-radius: 9px;
  background: rgba(2, 132, 199, .055); border-left: 2px solid rgba(2, 132, 199, .34);
  font-size: 13.5px; font-weight: 500; color: var(--slate); line-height: 1.55;
}
.qitem__ko__b {
  display: inline-block; margin-right: 8px; padding: 1px 7px; border-radius: 5px;
  background: rgba(2, 132, 199, .13); color: var(--sky);
  font-size: 10.5px; font-weight: 800; letter-spacing: .04em; vertical-align: 1px;
}
.qitem__tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 9px; }
.qtag {
  font-size: 11.5px; font-weight: 700; padding: 3px 10px; border-radius: 999px;
  background: var(--bg-soft-2); color: var(--slate-2); border: 1px solid var(--line);
  transition: border-color .18s ease, background .18s ease;
}
.qitem:hover .qtag { border-color: var(--line-hi); }
.qtag--s { font-variant-numeric: tabular-nums; color: var(--slate); }
.qitem__g { display: flex; align-items: center; gap: 8px; padding-top: 1px; }
.qitem__g .grade { width: 27px; height: 27px; font-size: 12.5px; border-radius: 8px; }
.qitem__g .t { font-size: 12px; font-weight: 700; color: var(--slate-2); white-space: nowrap; }

.qitem--risk { border-left: 3px solid #dc2626; background: linear-gradient(100deg, #fff6f6 0%, #fff 40%); }
.qitem--risk::before { background: linear-gradient(180deg, #dc2626, #f87171); }
.qitem--risk:hover { border-color: #f0b4b4; box-shadow: var(--shadow-hover), 0 0 0 3px rgba(220, 38, 38, .12); }
.qitem--risk .qitem__q::before {
  content: "⚠ "; color: #dc2626; font-weight: 800;
}

/* 추천·소개 질문 — 놓치면 안 되는 계약 기회 */
.qitem--ref { border-left: 3px solid #db2777; background: linear-gradient(100deg, #fff8fb 0%, #fff 40%); }
.qitem--ref::before { background: linear-gradient(180deg, #db2777, #f472b6); }
.qitem--ref:hover { border-color: #f2a3c8; box-shadow: var(--shadow-hover), 0 0 0 3px rgba(219, 39, 119, .12); }
.qitem--ref .qitem__q::after { content: " ★"; color: #db2777; font-weight: 800; }

/* 외국어 질문 — 원어 그대로 표시 중임을 배경으로 알린다 */
.qitem--intl { background: linear-gradient(100deg, #f5faff 0%, #fff 46%); }
.qitem--intl::before { background: linear-gradient(180deg, #0284c7, #38bdf8); }
.qitem--intl:hover { border-color: #b6d8ee; box-shadow: var(--shadow-hover), 0 0 0 3px rgba(2, 132, 199, .12); }
.qitem--intl .qitem__time { color: var(--sky); }

.qempty {
  text-align: center; padding: 56px 24px; color: var(--slate-2); font-size: 15px;
  background: var(--bg-soft); border: 1px dashed var(--line); border-radius: var(--radius);
}

/* ---------- Legend (2축) ---------- */
.qlegend { margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--line); }
.qlegend__h {
  font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
  color: var(--teal-2); margin: 0 0 12px;
}
.qlegend__h small { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: none; letter-spacing: 0; }
.qlegend__g { display: flex; flex-wrap: wrap; gap: 14px 22px; margin-bottom: 22px; }
.qlegend__g:last-child { margin-bottom: 0; }
.qlegend__g--lg { gap: 12px 18px; }
.qlegend__i { display: flex; align-items: center; gap: 9px; font-size: 13px; color: var(--slate); }
.qlegend__i .grade { width: 25px; height: 25px; font-size: 12px; border-radius: 7px; }
.qlegend__i b { color: var(--navy); font-weight: 700; }

/* ---------- 추천 보상 프로그램 ---------- */
.card--ref { border-top: 3px solid #db2777; background: var(--tint-pink); }
.card--ref::before { background: linear-gradient(90deg, #db2777, #f472b6); }
.card--ref:hover {
  border-color: #f2c3da; border-top-color: #db2777;
  box-shadow: var(--shadow-hover), 0 0 0 3px rgba(219, 39, 119, .1);
}
.card--ref .card__num { color: #db2777; }
.card__foot {
  margin-top: 16px; padding-top: 13px; border-top: 1px dashed var(--line);
  font-size: 12.5px; font-weight: 700; color: var(--slate-2);
}
.refops { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 22px; }
.refops__c {
  position: relative; overflow: hidden;
  background: var(--tint-pink); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px 26px; box-shadow: var(--shadow-sm);
  transition: box-shadow .24s var(--ease), transform .24s var(--ease), border-color .24s ease;
}
.refops__c::before {
  content: ""; position: absolute; inset: 0 0 auto; height: 3px;
  background: linear-gradient(90deg, #db2777, #f472b6);
  transform: scaleX(0); transform-origin: left; transition: transform .32s var(--ease);
}
.refops__c:hover {
  box-shadow: var(--shadow-hover), 0 0 0 3px rgba(219, 39, 119, .1);
  transform: translateY(-3px); border-color: #f2c3da;
}
.refops__c:hover::before { transform: scaleX(1); }
.refops__c h4 { font-size: 15.5px; font-weight: 800; color: var(--navy); margin-bottom: 13px; }
.ticks { list-style: none; display: grid; gap: 9px; margin-top: 14px; }
.ticks li {
  position: relative; padding-left: 24px; font-size: 14.5px; line-height: 1.6; color: var(--slate);
}
.ticks li::before {
  content: "✓"; position: absolute; left: 0; top: 0;
  color: var(--teal); font-weight: 800; font-size: 13.5px;
}
.card--ref .ticks li::before { color: #db2777; }
.callout--warn { border-left-color: #db2777; background: #fff5fa; }

/* ==========================================================================
   우선 대응 배너 · SLA · 증감 · 퍼널 · 커버리지 · 키워드
   ========================================================================== */

/* ---------- 우선 대응 배너 ----------
   화면 최상단에서 "지금 전화할 건"을 먼저 알린다. */
.alertbar {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 16px 20px; margin-bottom: 18px; border-radius: 14px;
  border: 1px solid #fcd9b6; background: var(--tint-amber);
  box-shadow: var(--shadow-sm);
}
.alertbar__ico { font-size: 20px; line-height: 1; flex: 0 0 auto; }
.alertbar__t { font-size: 15px; font-weight: 800; color: var(--navy); }
.alertbar__d { font-size: 12.5px; font-weight: 600; color: var(--slate-2); flex: 1 1 240px; min-width: 0; }
.alertbar__b { display: flex; gap: 8px; flex-wrap: wrap; margin-left: auto; }
.alertbar--hot {
  border-color: #f6bcbc;
  background: linear-gradient(180deg, #fff 0%, #fff4f4 100%);
  box-shadow: var(--shadow-sm), 0 0 0 3px rgba(220, 38, 38, .09);
}
.alertbar--hot .alertbar__t { color: #b91c1c; }
.alertbar--ok { border-color: #bfe9e0; background: var(--tint-teal); box-shadow: var(--shadow-sm); }
.alertbar--ok .alertbar__t { color: var(--teal-2); }

.alertbtn {
  appearance: none; cursor: pointer; font-family: var(--font);
  font-size: 12.5px; font-weight: 700; padding: 9px 15px; border-radius: 10px;
  border: 1.5px solid var(--line-hi); background: #fff; color: var(--slate);
  box-shadow: var(--shadow-sm);
  transition: all .18s ease;
}
.alertbtn b { font-weight: 800; margin-right: 4px; }
.alertbtn:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }
.alertbtn--risk { border-color: #f3b4b4; color: #b91c1c; }
.alertbtn--risk:hover, .alertbtn--risk.is-on { background: #dc2626; border-color: #b91c1c; color: #fff; }
.alertbtn--sla { border-color: #f6cf9d; color: #b45309; }
.alertbtn--sla:hover, .alertbtn--sla.is-on { background: #ea580c; border-color: #c2410c; color: #fff; }
.alertbtn.is-on { box-shadow: var(--shadow-md); }

/* ---------- SLA 배지 ---------- */
.sla {
  font-size: 11.5px; font-weight: 700; padding: 3px 10px; border-radius: 999px;
  background: var(--bg-soft-2); color: var(--slate-2); border: 1px solid var(--line);
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
.sla--warn { background: #fff7ed; border-color: #fcd9b6; color: #b45309; }
.sla--over { background: #fef2f2; border-color: #f6bcbc; color: #b91c1c; font-weight: 800; }
/* 대기 창을 지난 건 — 응대 여부를 모르므로 경고색을 쓰지 않는다 */
.sla--closed { background: none; border-color: var(--line-2); color: var(--muted); font-weight: 600; }
.qitem__age {
  display: block; margin-top: 3px; font-size: 10.5px; font-weight: 700;
  color: var(--muted); letter-spacing: -.01em;
}
.qitem__age.is-over { color: #b91c1c; }
/* 기한 초과 건은 목록에서 훑기만 해도 걸리게 한다 */
.qitem--late { border-left: 3px solid #ea580c; }
.qitem--late::before { background: linear-gradient(180deg, #ea580c, #fb923c); }
.qitem--late:hover { border-color: #f6cf9d; box-shadow: var(--shadow-hover), 0 0 0 3px rgba(234, 88, 12, .12); }
/* 응급 표시가 기한 표시보다 우선한다 */
.qitem--risk.qitem--late { border-left-color: #dc2626; }

/* ---------- 주간 대비 증감 ---------- */
.qdelta {
  display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 6px;
  font-size: 10.5px; font-weight: 800; letter-spacing: -.01em;
  font-variant-numeric: tabular-nums; vertical-align: 1px;
}
.qdelta--up { background: rgba(220, 38, 38, .1); color: #b91c1c; }
.qdelta--down { background: rgba(2, 132, 199, .1); color: #0369a1; }
.qdelta--flat { background: var(--bg-soft-2); color: var(--muted); }

/* ---------- 전환 퍼널 ---------- */
.fnls { display: grid; gap: 16px; }
.fnl { display: grid; gap: 6px; }
.fnl__h {
  display: flex; align-items: baseline; gap: 10px;
  font-size: 13px; font-weight: 800; color: var(--navy);
}
.fnl__r { margin-left: auto; font-size: 12px; font-weight: 700; color: var(--slate-2); font-variant-numeric: tabular-nums; }
.fnl__b {
  display: flex; align-items: center; justify-content: flex-end;
  min-width: 60px; height: 40px; padding: 0 14px; border-radius: 10px;
  font-size: 14px; font-weight: 800; color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .24); font-variant-numeric: tabular-nums;
  box-shadow: var(--shadow-sm);
  transition: width .6s var(--ease), filter .18s ease;
}
.fnl:hover .fnl__b { filter: saturate(1.2) brightness(1.05); }
.fnl__d { font-size: 11.5px; font-weight: 600; color: var(--slate-2); }

/* ---------- 언어별 응대 커버리지 ---------- */
.covs { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
/* 왼쪽 띠는 "응대 가능 여부"를 뜻한다. 언어 고유색(--lgc)을 쓰면
   일본어·중국어처럼 색이 빨간 언어가 '응대 불가'처럼 읽혀 의미가 뒤집힌다.
   언어 식별은 국가코드 배지가 담당한다. */
.cov {
  display: grid; grid-template-columns: 22px 1fr auto auto; gap: 10px; align-items: center;
  padding: 10px 13px; border-radius: 11px;
  border: 1px solid var(--line); background: #fff;
  border-left: 3px solid var(--teal);
  transition: box-shadow .18s ease, transform .18s var(--ease);
}
.cov:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.cov .lgflag { color: var(--lgc, var(--slate-2)); border-color: color-mix(in srgb, var(--lgc, #64748b) 34%, #fff); }
.cov__l { font-size: 13px; font-weight: 800; color: var(--navy); min-width: 0; }
.cov__l small { display: block; font-size: 11px; font-weight: 600; color: var(--slate-2); }
.cov__q { font-size: 12.5px; font-weight: 800; color: var(--slate); font-variant-numeric: tabular-nums; }
.cov__s {
  font-size: 11px; font-weight: 800; padding: 3px 9px; border-radius: 999px;
  background: rgba(14, 165, 164, .12); color: var(--teal-2); white-space: nowrap;
}
/* 응대 인력이 없는 언어 = 놓치고 있는 계약. 시각적으로 확실히 분리한다 */
.cov--gap { border-color: #f6bcbc; background: #fff6f6; border-left-color: #dc2626; }
.cov--gap .cov__s { background: rgba(220, 38, 38, .12); color: #b91c1c; }
.chart__note--warn { color: #b91c1c; border-top-color: #f6bcbc; }
.chart__note--warn b { color: #991b1b; }

/* ---------- 질문 키워드 (워드클라우드) ---------- */
.wcloud {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: 7px 12px; padding: 10px 4px 4px; line-height: 1.25;
}
.wcw {
  appearance: none; cursor: pointer; font-family: var(--font); font-weight: 800;
  padding: 3px 9px; border-radius: 9px; letter-spacing: -.02em;
  border: 1px solid transparent; background: none; color: var(--slate-2);
  transition: color .18s ease, background .18s ease, border-color .18s ease, transform .18s var(--ease), opacity .4s var(--ease);
}
.wcw sup { font-size: 9px; font-weight: 700; opacity: .55; margin-left: 2px; }
.wcw--1 { color: var(--slate-2); }
.wcw--2 { color: var(--sky); }
.wcw--3 { color: var(--teal-2); }
.wcw:hover {
  background: var(--bg-soft-2); border-color: var(--line-hi);
  color: var(--navy); transform: translateY(-2px) scale(1.04);
}
.wcw.is-pre { opacity: 0; transform: scale(.9); }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .qstats { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 980px) {
  .chartgrid { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .qstats { grid-template-columns: repeat(2, 1fr); }
  .covs { grid-template-columns: 1fr; }
  .alertbar__b { margin-left: 0; width: 100%; }
  .alertbtn { flex: 1 1 auto; justify-content: center; }
  .tabs { padding: 6px; gap: 6px; border-radius: 15px; }
  .tab { padding: 11px 14px; font-size: 14px; border-radius: 10px; }
  .refops { grid-template-columns: 1fr; }
  .qchip { padding: 8px 13px; font-size: 12.5px; }
  .hm { min-width: 520px; }
  .hbar { grid-template-columns: 22px 76px 1fr 28px; }
  .hbar--lg { grid-template-columns: 18px 62px 1fr 38px; }
  .sbar { grid-template-columns: 18px 62px 1fr 32px; }
  .qlangbar { padding: 12px 14px; }
  .qlangbar__r { width: 100%; justify-content: space-between; }
}
@media (max-width: 640px) {
  .qitem { grid-template-columns: 1fr; gap: 9px; }
  .qitem__time { padding-top: 0; }
  .qitem__g { padding-top: 0; }
  .pmeta { flex-direction: column; align-items: flex-start; }
}

/* ==========================================================================
   스크롤 진행 바 — 문서가 길어 "어디까지 읽었는지" 감각이 필요하다
   ========================================================================== */
.scrollbarx {
  position: fixed; top: var(--nav-h); left: 0; z-index: 90;
  height: 2px; width: 100%; transform: scaleX(0); transform-origin: left;
  background: var(--grad-accent);
  box-shadow: 0 0 8px rgba(14, 165, 164, .5);
  pointer-events: none;
}

/* ==========================================================================
   인쇄 최적화 — 이 화면은 제안서 부록으로 그대로 출력되는 경우가 많다
   ========================================================================== */
@media print {
  @page { size: A4; margin: 12mm 10mm; }

  html { scroll-behavior: auto; }
  body { background: #fff; line-height: 1.5; }

  /* 조작용 UI 는 종이에서 의미가 없다 */
  .nav, .footer, .qfilter, .cta-band, .page-hero::before, .page-hero::after,
  .chartbox__t, .qtoggle, .scrollbarx, .nav__burger, .alertbar__b,
  .pmeta__link, .wcw sup { display: none !important; }

  /* 애니메이션 잔여 상태로 빈 칸이 인쇄되는 것을 막는다 */
  .reveal, .reveal.in { opacity: 1 !important; transform: none !important; }
  .donut { animation: none !important; }
  .is-pre { width: auto !important; height: auto !important; opacity: 1 !important; transform: none !important; }

  /* 카드·항목이 페이지 경계에서 잘리지 않게 한다 */
  .qitem, .chart, .card, .qstat, .cov, .fnl, .refops__c, .qlegend__g {
    break-inside: avoid; page-break-inside: avoid; box-shadow: none !important;
  }
  .qday { break-after: avoid; page-break-after: avoid; }
  .section, .qlegend { break-before: auto; }
  .chartbox { break-before: page; page-break-before: always; }
  .chartgrid { grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 0; }
  .chart--wide { grid-column: 1 / -1; }

  /* 배경 그라데이션은 잉크만 먹고 가독성을 떨어뜨린다 */
  .qitem, .chart, .qstat, .alertbar, .cov { background: #fff !important; }
  .section--navy, .page-hero { background: #fff !important; color: var(--ink) !important; }
  .section--navy h2, .section--navy h3, .page-hero h1 { color: var(--navy) !important; }

  /* 경계는 색이 아니라 선으로 남긴다 */
  .qitem--risk { border-left: 3px solid #000 !important; }
  .qitem--late { border-left: 3px solid #666 !important; }
  .sla--over { border: 1px solid #000; font-weight: 800; }

  /* 인쇄본에서는 원문·번역 모두 남아야 한다 */
  .qitem__ko { background: none; border-left: 2px solid #94a3b8; }
  .qlangbar { box-shadow: none; }

  /* 링크 주소를 본문에 노출해 종이에서도 추적 가능하게 한다 */
  .pmeta__d { font-size: 11px; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 9.5px; color: #64748b; }
  .brand::after, .nav a::after { content: none !important; }
}

/* ==========================================================================
   다크 모드 — OS 설정을 따른다. 토큰만 바꿔 컴포넌트 규칙은 그대로 쓴다.
   진단 색(응급 빨강 / 기한 주황)은 어두운 배경에서 채도를 낮춰 눈을 덜 때리게 한다.
   ========================================================================== */
@media (prefers-color-scheme: dark) {
  :root {
    --navy: #e2e8f0;
    --navy-2: #cbd5e1;
    --ink: #e8eef6;
    --slate: #b4c0d0;
    --slate-2: #94a3b8;
    --muted: #7d8ca1;
    --line: #26313f;
    --line-2: #1e2733;
    --line-hi: #35465a;
    --bg: #0c1219;
    --bg-soft: #111925;
    --bg-soft-2: #16202c;

    --teal: #2dd4bf;
    --teal-2: #5eead4;
    --sky: #38bdf8;

    --grad-soft: linear-gradient(180deg, #0c1219 0%, #111925 100%);
    --tint-teal: linear-gradient(180deg, #111a24 0%, #0f1d21 100%);
    --tint-sky: linear-gradient(180deg, #111a24 0%, #101c26 100%);
    --tint-pink: linear-gradient(180deg, #111a24 0%, #1d1420 100%);
    --tint-amber: linear-gradient(180deg, #111a24 0%, #1e1a14 100%);

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .5), 0 1px 3px rgba(0, 0, 0, .4);
    --shadow-md: 0 10px 30px rgba(0, 0, 0, .5);
    --shadow-lg: 0 24px 60px rgba(0, 0, 0, .6);
    --shadow-hover: 0 18px 44px rgba(0, 0, 0, .55), 0 2px 8px rgba(45, 212, 191, .16);
    --ring-teal: 0 0 0 3px rgba(45, 212, 191, .16);
  }

  /* 흰색으로 하드코딩된 표면들을 되돌린다 */
  .tab, .cov, .alertbtn, .btn-ghost, .qchip, .qtoggle { background: var(--bg-soft) !important; }
  .donut::after { background: var(--bg-soft); }
  .hbar__t, .sbar__t, .hm__c.is-0, .qtoggle__d { background: #1b2530; }
  .tabs:hover, .chartbox__t:hover { background: var(--bg-soft-2); }
  .tabs { box-shadow: var(--shadow-sm); }
  .tab[aria-selected="true"] {
    background: linear-gradient(180deg, #12312f 0%, #0f2a29 100%);
    border-color: rgba(45, 212, 191, .45); color: var(--teal-2);
  }
  .qchip:hover { background: var(--bg-soft-2) !important; border-color: var(--line-hi); }
  .qtoggle__d::after { background: #64748b; }
  .qtoggle.is-on { background: rgba(56, 189, 248, .12) !important; }
  .qtoggle.is-on .qtoggle__d { background: var(--sky); }
  .qtoggle.is-on .qtoggle__d::after { background: #0c1219; }

  /* 선택된 칩 — 흰 글자를 유지해야 하므로 배경을 어두운 채도색으로 다시 잡는다.
     라이트 모드에서 --navy 를 쓰던 자리는 다크에서 밝은 색이 되어 흰 글자가 사라진다. */
  .qchip.is-on { color: #fff !important; }
  .qchip.is-on[data-stage=""] { background: #1d4ed8 !important; }
  .qchip--pre.is-on  { background: #475569 !important; }
  .qchip--ing.is-on  { background: #c2410c !important; }
  .qchip--done.is-on { background: #0f766e !important; }
  .qchip--lg.is-on   { background: var(--lgc, #1d4ed8) !important; filter: brightness(.85); }
  .qchip__c { background: rgba(255, 255, 255, .08); color: var(--slate-2); }

  /* 단계·언어 태그 — 밝은 파스텔 배경을 어두운 톤으로 교체 */
  .qtag--pre  { background: #1b2530; color: #b4c0d0; border-color: #2d3a49; }
  .qtag--ing  { background: #2a1c12; color: #fdba74; border-color: #5c3a1e; }
  .qtag--done { background: #10241f; color: #5eead4; border-color: #1f4a44; }
  .qtag--lg {
    background: color-mix(in srgb, var(--lgc, #64748b) 22%, #0c1219);
    border-color: color-mix(in srgb, var(--lgc, #64748b) 42%, #0c1219);
    color: color-mix(in srgb, var(--lgc, #94a3b8) 62%, #ffffff);
  }
  .lgflag { background: #1b2530; border-color: #2d3a49; color: var(--slate-2); }

  /* 진단 색 — 어두운 배경용으로 다시 잡는다 */
  .qitem--risk { background: linear-gradient(100deg, #241417 0%, var(--bg-soft) 42%); }
  .qitem--ref { background: linear-gradient(100deg, #221420 0%, var(--bg-soft) 42%); }
  .qitem--intl { background: linear-gradient(100deg, #101f2b 0%, var(--bg-soft) 46%); }
  .alertbar--hot { background: linear-gradient(180deg, #131b25 0%, #251518 100%); border-color: #5c2626; }
  .alertbar--hot .alertbar__t { color: #fca5a5; }
  .alertbar { border-color: #4a3a1e; }
  .alertbar--ok { border-color: #1f4a44; }
  .sla--over { background: #2a1416; border-color: #6b2b2b; color: #fca5a5; }
  .sla--warn { background: #2a2113; border-color: #6b4d21; color: #fcd34d; }
  .qitem__age.is-over { color: #fca5a5; }
  .cov--gap { background: #22151a !important; border-color: #5c2626; }
  .cov--gap .cov__s { background: rgba(248, 113, 113, .16); color: #fca5a5; }
  .chart__note--warn { color: #fca5a5; border-top-color: #4a2323; }
  .chart__note--warn b { color: #fecaca; }
  .qdelta--up { background: rgba(248, 113, 113, .16); color: #fca5a5; }
  .qdelta--down { background: rgba(56, 189, 248, .16); color: #7dd3fc; }
  .qitem__ko { background: rgba(56, 189, 248, .08); border-left-color: rgba(56, 189, 248, .4); }
  .qitem__ko__b { background: rgba(56, 189, 248, .18); color: #7dd3fc; }

  .qempty, .callout--warn { background: var(--bg-soft); }
  .srcbadge--seed { filter: brightness(1.05); }
  img, .donut { filter: brightness(.94); }
}

/* 애니메이션 최소화 설정 존중 — 호버 효과는 색만 남긴다 */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .card, .qitem, .chart, .qstat, .refops__c { transition: border-color .01s, box-shadow .01s; }
  .card:hover, .qitem:hover, .chart:hover, .qstat:hover, .refops__c:hover,
  .qchip:hover, .qchip.is-on:hover, .cov:hover, .wcw:hover,
  .alertbtn:hover, .tab:hover, .btn:hover, .btn-ghost:hover { transform: none; }
  .card::before, .qitem::before, .chart::before, .qstat::before, .refops__c::before { transition: none; }
  /* 막대·도넛 등장 연출은 끈다 (최종 상태만 보여준다) */
  .hbar__f, .fnl__b, .sbar__s, .vbar, .wcw { transition: none; }
  .donut { animation: none; }
  .scrollbarx { transition: none; }
}
