/* styles.css — 걸프 AX 전환 (라이트 테마 리디자인)
   High-fidelity 재구현. 토큰 시스템 + 컴포넌트 스타일. */

:root {
  /* Accent — LG 레드 계열 (JS로 rgba 파생) */
  --ax-accent: #C1121F;
  --ax-accent-deep: #A50034;
  --ax-accent-soft: rgba(193, 18, 31, 0.08);
  --ax-line: rgba(193, 18, 31, 0.35);

  /* Surface / border / text */
  --bg: #F6F7F9;
  --card: #FFFFFF;
  --border: #E4E8EE;
  --border-strong: #CFD6DE;
  --sunken: #EEF1F5;
  --ink: #16181D;
  --ink-2: #4E5A66;
  --ink-3: #8B95A1;

  /* Maturity tones (light) */
  --m-green: #5AAF00; --m-green-bg: rgba(90, 175, 0, 0.12);
  --m-blue:  #1668DC; --m-blue-bg:  rgba(22, 104, 220, 0.10);
  --m-amber: #A85B00; --m-amber-bg: rgba(168, 91, 0, 0.1);

  /* Fonts */
  --font-serif: "Noto Serif KR", serif;
  --font-sans: "Noto Sans KR", "Apple SD Gothic Neo", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Layout */
  --maxw: 1200px;
  --pad: 28px;
  --header-h: 62px;
}

* { box-sizing: border-box; }

html { overflow-x: hidden; }

body {
  margin: 0;
  overflow-x: hidden;
  word-break: keep-all;
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  background-image: radial-gradient(rgba(193, 18, 31, 0.05) 1px, transparent 1px);
  background-size: 26px 26px;
}

a { color: var(--ax-accent); text-decoration: none; }
a:hover { color: var(--ax-accent-deep); text-decoration: underline; }
img { max-width: 100%; display: block; }
button { font-family: inherit; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--pad); }

/* 줄바꿈 다듬기 — 마지막 줄에 한 단어만 남는 어색함 방지 (word-break:keep-all과 함께) */
p, li, .blurb, .benefit, .foundation, .ov-tag { text-wrap: pretty; }
h1, h2, h3, h4, .bridge, .ov-title { text-wrap: balance; }

/* ---------- keyframes ---------- */
@keyframes axReveal { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
@keyframes axPulse  { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }
@keyframes axSlideIn { from { opacity: 0; transform: translateY(34px); } to { opacity: 1; transform: none; } }
@keyframes axProgress { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* ---------- scroll progress bar ---------- */
#scroll-progress {
  position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 70;
  background: linear-gradient(90deg, var(--ax-accent), var(--ax-accent-deep));
  transform-origin: 0 50%; transform: scaleX(0);
  animation: axProgress linear both;
  animation-timeline: scroll();
}

/* ---------- fixed header ---------- */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 60;
  background: rgba(246, 247, 249, .85);
  backdrop-filter: blur(12px) saturate(1.3);
  -webkit-backdrop-filter: blur(12px) saturate(1.3);
  border-bottom: 1px solid var(--border);
}
.topbar .wrap { display: flex; align-items: center; gap: 16px; height: var(--header-h); }
.topbar .t-title { font-weight: 700; font-size: 15px; white-space: nowrap; letter-spacing: -.01em; flex: none; }
.topbar .t-sub {
  color: var(--ink-3); font-size: 13px;
  border-left: 1px solid var(--border); padding-left: 16px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0;
}
.topbar nav { margin-left: auto; display: flex; gap: 4px; align-items: center; flex: none; }
.topbar nav button {
  background: none; border: 0; color: var(--ink-2);
  font-size: 13px; font-weight: 500; padding: 8px 12px;
  border-radius: 8px; cursor: pointer; white-space: nowrap;
}
.topbar nav button:hover { color: var(--ink); background: var(--sunken); }

main { padding-top: var(--header-h); }

/* ---------- section shells ---------- */
.section { padding: clamp(56px, 7vw, 96px) 0; border-top: 1px solid var(--border); }
.kicker {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: .22em;
  text-transform: uppercase; color: var(--ax-accent); margin: 0 0 14px;
}
.sec-title {
  font-family: var(--font-serif); font-weight: 700;
  font-size: clamp(26px, 3.2vw, 38px); line-height: 1.25;
  margin: 0 0 10px; letter-spacing: -.01em;
}
.sec-note { color: var(--ink-2); max-width: 62ch; margin: 0 0 30px; white-space: pre-line; }

/* view()-timeline reveal — 미지원 브라우저에서는 1ms 재생 후 보임으로 무해하게 종료 */
.axview {
  animation: axReveal 1ms linear both;
  animation-timeline: view();
  animation-range: entry 0% entry 28%;
}

/* ---------- hero ---------- */
.hero {
  padding: clamp(72px, 9vw, 130px) 0 clamp(48px, 6vw, 80px);
  position: relative; overflow: hidden;
}
#hero-glow {
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(640px circle at 30% 20%, var(--ax-accent-soft), transparent 70%);
}
.hero .wrap { position: relative; }
.hero-kicker {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: .22em;
  text-transform: uppercase; color: var(--ax-accent); margin: 0 0 18px;
  display: flex; align-items: center; gap: 10px;
  animation: axReveal .6s cubic-bezier(.2, .8, .2, 1) both;
}
.hero-kicker .rule { width: 26px; height: 1px; background: var(--ax-line); display: inline-block; }
.hero-title {
  font-family: var(--font-serif); font-weight: 700;
  font-size: clamp(34px, 5.6vw, 64px); line-height: 1.18; letter-spacing: -.02em;
  margin: 0 0 24px; max-width: 21ch; text-wrap: balance;
  animation: axReveal .7s cubic-bezier(.2, .8, .2, 1) .08s both;
}
.hero-title .hi { color: var(--ax-accent); }
.hero-sub {
  font-size: clamp(16px, 1.5vw, 19px); color: var(--ink-2); max-width: 58ch; margin: 0 0 52px;
  animation: axReveal .7s cubic-bezier(.2, .8, .2, 1) .18s both;
}
.overview-label {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: .22em;
  text-transform: uppercase; color: var(--ink-3); margin: 0 0 14px;
  animation: axReveal .7s cubic-bezier(.2, .8, .2, 1) .28s both;
}
/* ---------- Overview: 컴팩트 phase journey 스트립 ---------- */
/* 로드맵(상세 타임라인)보다 확연히 가벼운, 한눈에 보는 진행 맵.
   데스크톱: 가로 4스텝 진행선 / 모바일: 세로 스텝퍼로 자연스럽게 전환. */
.ov-strip {
  position: relative;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 0;
  margin-top: 2px;
  animation: axReveal .7s cubic-bezier(.2, .8, .2, 1) .36s both;
}
.ov-step {
  position: relative; z-index: 1; background: none; border: 0; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 6px 10px; text-align: center; color: inherit; font: inherit;
  border-radius: 12px; transition: transform .18s ease;
}
/* 노드 중심을 잇는 진행선 */
.ov-step:not(:last-child)::before {
  content: ''; position: absolute; z-index: 0;
  top: 22px; left: 50%; right: -50%; height: 2px;
  background: linear-gradient(90deg, var(--ax-accent), var(--ax-line));
}
/* 좌 → 우로 계속 이동하는 진행 펄스 (노드 라인을 따라 흐름) */
@keyframes axFlowDot {
  0%   { left: 12.5%; opacity: 0; }
  10%  { opacity: 1; }
  85%  { opacity: 1; }
  100% { left: 87.5%; opacity: 0; }
}
.ov-strip::after {
  content: ''; position: absolute; z-index: 2; top: 18.5px; left: 12.5%;
  width: 10px; height: 10px; margin-left: -5px; border-radius: 50%;
  background: var(--ax-accent);
  box-shadow: 0 0 0 4px rgba(193, 18, 31, .14), 0 0 14px 3px rgba(193, 18, 31, .55);
  animation: axFlowDot 5.2s cubic-bezier(.45, 0, .55, 1) infinite;
}
.ov-node {
  position: relative; z-index: 1; flex: none;
  width: 34px; height: 34px; border-radius: 50%;
  background: #fff; border: 1px solid var(--ax-line);
  display: grid; place-items: center;
  font-family: var(--font-mono); font-size: 14px; font-weight: 600; color: var(--ax-accent);
  box-shadow: 0 3px 10px var(--ax-accent-soft);
  transition: background .18s ease, color .18s ease, box-shadow .18s ease;
}
.ov-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; align-items: center; }
.ov-title { font-size: 15px; font-weight: 700; color: var(--ink); line-height: 1.3; letter-spacing: -.01em; }
.ov-tag { font-size: 12px; color: var(--ink-3); line-height: 1.45; }
.ov-step:hover { transform: translateY(-2px); }
.ov-step:hover .ov-node { background: var(--ax-accent); color: #fff; box-shadow: 0 6px 16px var(--ax-accent-soft); }
.ov-step:hover .ov-title { color: var(--ax-accent-deep); }
.ov-step:focus-visible { outline: 2px solid var(--ax-accent); outline-offset: 3px; }

/* ---------- AI capability (problem) ---------- */
.pain-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.pain-card {
  background: var(--card); border: 1px solid var(--border); border-radius: 14px;
  padding: 20px; position: relative; box-shadow: 0 2px 10px rgba(20, 28, 40, .04);
  transition: border-color .2s ease;
}
.pain-card:hover { border-color: var(--border-strong); }
.pain-card .bar {
  position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--ax-accent); border-radius: 14px 0 0 14px; opacity: .85;
}
.pain-card h3 { margin: 0 0 8px; font-size: 15px; font-weight: 700; }
.pain-card p { margin: 0; color: var(--ink-2); font-size: 13.5px; }
.bridge {
  margin: 40px auto 0; font-family: var(--font-serif);
  font-size: clamp(18px, 2vw, 24px); line-height: 1.5; color: var(--ink);
  max-width: 60ch; text-align: center; padding: 0;
}

/* ---------- roadmap ---------- */
.roadmap-lead { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; margin: 0 0 34px; }
.roadmap-lead p { color: var(--ink-2); margin: 0; }
.legend { display: flex; gap: 14px; align-items: center; margin-left: auto; }
.legend span { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-2); }
.legend .d { width: 8px; height: 8px; border-radius: 50%; }

.timeline { display: grid; gap: 14px; position: relative; }
.timeline .spine {
  position: absolute; left: 31px; top: 20px; bottom: 20px; width: 1px;
  background: linear-gradient(180deg, var(--ax-line), var(--border));
}
.phase-card {
  display: grid; grid-template-columns: 64px 1fr auto; gap: 20px; align-items: center;
  background: var(--card); border: 1px solid var(--border); border-radius: 16px;
  padding: 24px 26px; cursor: pointer; position: relative; text-align: left; width: 100%;
  transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease;
  box-shadow: 0 2px 10px rgba(20, 28, 40, .04);
}
.phase-card:hover { border-color: var(--ax-line); transform: translateY(-2px); box-shadow: 0 14px 34px rgba(20, 28, 40, .1); }
.phase-card:focus-visible { outline: 2px solid var(--ax-accent); outline-offset: 2px; }
.phase-num {
  width: 46px; height: 46px; border-radius: 50%; background: #FFFFFF;
  border: 1px solid var(--ax-line); display: grid; place-items: center;
  font-family: var(--font-mono); font-size: 15px; font-weight: 600; color: var(--ax-accent);
  position: relative; z-index: 1; box-shadow: 0 4px 14px var(--ax-accent-soft);
}
.phase-body { min-width: 0; }
.phase-body .no {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: .14em;
  color: var(--ax-accent); font-weight: 600; margin: 0 0 4px; text-transform: uppercase;
}
.phase-body h3 {
  font-family: var(--font-serif); font-size: clamp(19px, 2vw, 24px); font-weight: 700;
  margin: 0 0 6px; letter-spacing: -.01em;
}
.phase-body .story { margin: 0; color: var(--ink-2); font-size: 14px; max-width: 64ch; }
.chips { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 500;
  padding: 3px 10px; border-radius: 10px; background: var(--sunken); color: var(--ink-2);
}
.chip .d { width: 6px; height: 6px; border-radius: 50%; flex: none; }
.phase-aside { display: flex; align-items: center; gap: 18px; }
.thumbs { display: flex; gap: 10px; }
.thumb {
  width: 150px; height: 94px; border-radius: 10px; overflow: hidden;
  border: 1px solid var(--border-strong); background: var(--sunken);
  box-shadow: 0 6px 16px rgba(20, 28, 40, .12);
}
.thumb img, .shot img, .thumb-img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.arrow {
  width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--border-strong);
  display: grid; place-items: center; color: var(--ax-accent); font-size: 17px; flex: none; background: #FFFFFF;
}

/* ---------- deep-dive overlay ---------- */
.dive-backdrop { position: fixed; inset: 0; z-index: 100; background: rgba(23, 28, 36, .45); backdrop-filter: blur(6px); }
.dive-sheet {
  position: fixed; z-index: 101; inset: 4vh 0 0 0; margin: 0 auto; max-width: 1080px;
  background: var(--bg); border: 1px solid var(--border-strong); border-bottom: 0;
  border-radius: 20px 20px 0 0; overflow-y: auto;
  animation: axSlideIn .35s cubic-bezier(.2, .8, .2, 1) both;
  box-shadow: 0 -20px 80px rgba(20, 28, 40, .3);
}
.dive-head {
  position: sticky; top: 0; z-index: 5; background: rgba(246, 247, 249, .93);
  backdrop-filter: blur(10px); border-bottom: 1px solid var(--border);
  padding: 22px 36px; display: flex; align-items: center; gap: 18px;
}
.dive-num {
  width: 44px; height: 44px; border-radius: 50%; background: #FFFFFF; border: 1px solid var(--ax-line);
  display: grid; place-items: center; font-family: var(--font-mono); font-size: 14px; font-weight: 600;
  color: var(--ax-accent); flex: none;
}
.dive-head .meta { min-width: 0; flex: 1; }
.dive-head .no {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .16em;
  color: var(--ax-accent); font-weight: 600; margin: 0; text-transform: uppercase;
}
.dive-head h2 {
  font-family: var(--font-serif); font-size: 22px; font-weight: 700; margin: 2px 0 0;
  letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.dive-close {
  width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--border-strong);
  background: #FFFFFF; color: var(--ink-2); font-size: 16px; cursor: pointer; flex: none;
}
.dive-close:hover { color: var(--ink); border-color: var(--ink-3); }
.dive-body { padding: 30px 36px 40px; }
.dive-story { color: var(--ink-2); font-size: 15px; margin: 0 0 8px; max-width: 70ch; }
.dive-note {
  margin: 12px 0 0; color: var(--m-amber); font-size: 13px; background: rgba(168, 91, 0, 0.08);
  border: 1px solid rgba(168, 91, 0, 0.25); border-radius: 10px; padding: 10px 14px; display: inline-block;
}
.dive-groups { display: grid; gap: 24px; margin-top: 30px; }
.dive-group {
  border: 1px solid var(--border); border-left: 4px solid var(--ax-accent);
  border-radius: 16px; background: var(--sunken); padding: 20px 20px 22px;
}
.group-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.group-id {
  font-family: var(--font-mono); font-size: 13px; font-weight: 700; color: #fff;
  background: var(--ax-accent); padding: 4px 12px; border-radius: 8px; flex: none;
  letter-spacing: .04em;
}
.group-head h3 { margin: 0; font-size: 17px; font-weight: 800; letter-spacing: .01em; }
.group-head .fade { flex: 1; height: 1px; background: linear-gradient(90deg, var(--border-strong), transparent); }
.feat-list { display: grid; gap: 14px; }
.feature {
  display: grid; grid-template-columns: 1fr .92fr; gap: 24px; align-items: start;
  padding: 22px; border: 1px solid var(--border); border-radius: 14px; background: var(--card);
  box-shadow: 0 2px 10px rgba(20, 28, 40, .04);
}
.feature .f-body { min-width: 0; }
.badge {
  display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700;
  padding: 3px 10px; border-radius: 10px; margin-bottom: 10px;
}
.badge .d { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.green { background: var(--m-green-bg); color: var(--m-green); }
.badge.blue  { background: var(--m-blue-bg);  color: var(--m-blue); }
.badge.amber { background: var(--m-amber-bg); color: var(--m-amber); }
.feature h4 { margin: 0 0 8px; font-size: 17px; font-family: var(--font-serif); font-weight: 700; }
.feature .blurb { margin: 0 0 12px; color: var(--ink-2); font-size: 13.5px; }
.benefit {
  margin: 0; font-weight: 600; color: var(--ink); background: var(--ax-accent-soft);
  border-radius: 10px; padding: 10px 13px; border-left: 3px solid var(--ax-accent); font-size: 13.5px;
}
.kpi-list { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.kpi-list li {
  font-size: 11.5px; color: var(--ink-2); background: var(--sunken); border: 1px solid var(--border);
  padding: 4px 10px; border-radius: 999px; font-family: var(--font-mono);
}
.foundation { margin: 12px 0 0; font-size: 12.5px; color: var(--ink-3); }
.foundation b { color: var(--ink-2); font-weight: 600; }
.shot {
  border: 1px solid var(--border-strong); border-radius: 12px; overflow: hidden;
  background: var(--sunken); aspect-ratio: 16 / 10; box-shadow: 0 10px 26px rgba(20, 28, 40, .12);
}
.shot.concept {
  border: 1px dashed var(--border-strong); background: var(--bg);
  display: grid; place-items: center; color: var(--ink-3);
  font-family: var(--font-mono); font-size: 12px; letter-spacing: .14em; box-shadow: none;
}
/* 사내방송: 클릭 시 영상으로 이어지는 썸네일 */
.shot.video { position: relative; display: block; cursor: pointer; text-decoration: none; }
.shot.video .play {
  position: absolute; inset: 0; display: grid; place-items: center;
  background: rgba(12, 16, 24, .18); transition: background .18s ease;
}
.shot.video:hover .play { background: rgba(12, 16, 24, .30); }
.shot.video .tri {
  width: 62px; height: 62px; border-radius: 999px; display: grid; place-items: center;
  background: var(--ax-accent); box-shadow: 0 6px 20px rgba(193, 18, 31, .45);
  transition: transform .18s ease;
}
.shot.video:hover .tri { transform: scale(1.08); }
.shot.video .tri::after {
  content: ''; width: 0; height: 0; margin-left: 4px;
  border-style: solid; border-width: 11px 0 11px 19px; border-color: transparent transparent transparent #fff;
}
/* 클릭 확대 가능한 스크린샷 */
.shot.zoomable { cursor: zoom-in; position: relative; }
.shot.zoomable .zoom-hint {
  position: absolute; right: 8px; bottom: 8px; width: 26px; height: 26px;
  display: grid; place-items: center; border-radius: 7px; font-size: 14px; color: #fff;
  background: rgba(12, 16, 24, .55); opacity: 0; transition: opacity .16s ease; pointer-events: none;
}
.shot.zoomable:hover { border-color: var(--ax-line); }
.shot.zoomable:hover .zoom-hint { opacity: 1; }
/* 라이트박스 오버레이 */
.lightbox {
  position: fixed; inset: 0; z-index: 120; background: rgba(10, 12, 18, .82);
  backdrop-filter: blur(4px); display: flex; cursor: zoom-out;
}
.lightbox .lb-scroll {
  margin: auto; max-width: 94vw; max-height: 94vh; overflow: auto; border-radius: 12px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .5); -webkit-overflow-scrolling: touch;
}
.lightbox .lb-img { display: block; width: min(1100px, 94vw); height: auto; cursor: default; }
.lightbox .lb-close {
  position: fixed; top: 18px; right: 22px; width: 42px; height: 42px; border-radius: 999px;
  border: none; background: rgba(255, 255, 255, .14); color: #fff; font-size: 18px; cursor: pointer;
  display: grid; place-items: center; transition: background .16s ease;
}
.lightbox .lb-close:hover { background: rgba(255, 255, 255, .28); }
@media (prefers-reduced-motion: reduce) { .lightbox { backdrop-filter: none; } }
.dive-nav {
  display: flex; justify-content: space-between; gap: 14px; margin-top: 38px;
  border-top: 1px solid var(--border); padding-top: 22px;
}
.dive-nav button { font-size: 13px; font-weight: 600; padding: 10px 18px; border-radius: 999px; cursor: pointer; }
.dive-nav .prev { background: #FFFFFF; border: 1px solid var(--border-strong); color: var(--ink-2); }
.dive-nav .prev:hover { color: var(--ink); border-color: var(--ink-3); }
.dive-nav .next { background: #FFFFFF; border: 1px solid var(--ax-line); color: var(--ax-accent); }
.dive-nav .next:hover { background: var(--ax-accent-soft); }

/* ---------- closing / footer ---------- */
.closing { padding: clamp(56px, 7vw, 96px) 0; border-top: 1px solid var(--border); }
.contact-note {
  font-family: var(--font-serif); font-size: clamp(20px, 2.4vw, 28px); line-height: 1.5;
  color: var(--ink); max-width: 60ch; margin: 0; letter-spacing: -.01em;
}
footer.foot { padding: 36px 0 60px; color: var(--ink-3); font-size: 13px; border-top: 1px solid var(--border); }

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .axview, .hero-kicker, .hero-title, .hero-sub, .overview-label, .ov-strip, .dive-sheet {
    animation: none !important;
  }
  .ov-step { transition: none; }
  .ov-strip::after { display: none !important; }
  #scroll-progress { display: none; }
}

/* ---------- 단일 그룹(하위페이즈 없음) ---------- */
.dive-group.solo { border: none; background: transparent; padding: 0; border-radius: 0; }

/* ---------- 과제별 조회 ---------- */
.browse-filters { display: flex; flex-wrap: wrap; gap: 10px; margin: 22px 0 26px; }
.filter-chip {
  font-size: 13px; font-weight: 600; padding: 8px 15px; border-radius: 999px;
  border: 1px solid var(--border-strong); background: var(--card); color: var(--ink-2); cursor: pointer;
  display: inline-flex; align-items: center; gap: 7px; transition: all .15s ease;
}
.filter-chip:hover { border-color: var(--ax-line); color: var(--ink); }
.filter-chip.active { background: var(--ax-accent); border-color: var(--ax-accent); color: #fff; }
.filter-chip .cnt { font-family: var(--font-mono); font-size: 11px; opacity: .7; }
.browse-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(258px, 1fr)); gap: 14px; }
.task-card {
  text-align: left; border: 1px solid var(--border); border-radius: 14px; background: var(--card);
  padding: 0; overflow: hidden; cursor: pointer; display: flex; flex-direction: column;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.task-thumb { aspect-ratio: 16 / 10; background: var(--sunken); overflow: hidden; border-bottom: 1px solid var(--border); }
.task-thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.task-thumb.none {
  display: grid; place-items: center; color: var(--ink-3);
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .14em;
}
.task-info { padding: 13px 15px 16px; display: flex; flex-direction: column; gap: 8px; }
.task-card:hover { border-color: var(--ax-line); transform: translateY(-2px); box-shadow: 0 10px 24px rgba(20, 28, 40, .08); }
.task-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.dept-tag {
  font-size: 11px; font-weight: 700; padding: 2px 9px; border-radius: 999px; color: var(--dc);
  background: color-mix(in srgb, var(--dc) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--dc) 26%, transparent);
}
.task-meta { display: flex; align-items: center; gap: 7px; margin: 0; font-family: var(--font-mono); font-size: 11.5px; color: var(--ink-3); }
.task-meta .d { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.task-card h4 { margin: 0; font-size: 15px; font-weight: 700; line-height: 1.4; color: var(--ink); }

/* 카드 hover 글로우 — 커서 따라 붉게 물듦 (--mx/--my는 JS가 설정) */
.glow-card { position: relative; }
.glow-card::before {
  content: ''; position: absolute; inset: 0; border-radius: inherit; z-index: 0;
  background: radial-gradient(220px circle at var(--mx, 50%) var(--my, 50%), var(--ax-accent-soft), transparent 66%);
  opacity: 0; transition: opacity .25s ease; pointer-events: none;
}
.glow-card:hover::before { opacity: 1; }
.glow-card > * { position: relative; z-index: 1; }
@media (prefers-reduced-motion: reduce) { .glow-card::before { display: none; } }

/* ---------- HTML 리포트 오버레이 ---------- */
/* 리포트 카드: 스크린샷과 구분되게 상시 배지 표시 */
.shot.zoomable.has-report .zoom-hint {
  opacity: 1; left: 8px; right: auto; top: 8px; bottom: auto; width: auto; height: auto;
  padding: 4px 11px; font-size: 11px; font-weight: 700; border-radius: 999px;
  background: var(--ax-accent); box-shadow: 0 2px 8px rgba(193, 18, 31, .35);
}
.lightbox.report .report-frame {
  margin: auto; width: min(1280px, 96vw); height: 95vh; background: #fff; border-radius: 12px;
  overflow: hidden; box-shadow: 0 30px 80px rgba(0, 0, 0, .5); cursor: default;
}
.lightbox.report .report-frame iframe { width: 100%; height: 100%; border: 0; display: block; }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .pain-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .pain-grid { grid-template-columns: 1fr; }
  .phase-card { grid-template-columns: 46px 1fr; padding: 20px; gap: 16px; }
  .phase-aside { display: none; }
  .feature { grid-template-columns: 1fr; padding: 18px; gap: 16px; }
  .feature .shot { order: -1; }
  .topbar .t-sub { display: none; }
  .dive-body, .dive-head { padding-left: 18px; padding-right: 18px; }

  /* Overview 스트립: 세로 스텝퍼로 전환 (한눈에 보이는 가벼운 진행 맵 유지) */
  .ov-strip { grid-template-columns: 1fr; }
  .ov-strip::after { display: none; }
  .ov-step {
    flex-direction: row; align-items: flex-start; gap: 14px;
    padding: 11px 0; min-height: 44px; text-align: left;
  }
  .ov-step:last-child { padding-right: 0; }
  .ov-step:not(:last-child)::before {
    top: 34px; left: 16px; right: auto; bottom: -18px; width: 2px; height: auto;
    background: linear-gradient(180deg, var(--ax-line), var(--border));
    animation: none; transform: none;
  }
  .ov-text { padding-top: 1px; align-items: flex-start; }
  .ov-title { font-size: 15.5px; }
  .ov-tag { font-size: 12.5px; }

  /* 딥다이브 헤더/그룹 여백 압축 + ✕ 접근성 */
  .dive-head { padding-top: 16px; padding-bottom: 16px; gap: 12px; }
  .dive-num { width: 40px; height: 40px; }
  .dive-head h2 { font-size: 18px; }
  .dive-close { width: 40px; height: 40px; }
  .dive-group { padding: 16px 14px 18px; }
  .dive-group.solo { padding: 0; }
  .dive-body { padding-top: 22px; padding-bottom: 32px; }
  .dive-groups { gap: 16px; margin-top: 22px; }
  .dive-nav button { min-height: 44px; padding: 11px 18px; }

  /* 브라우즈: 1열로 (좁은 폭에서 넘침 방지) + 탭 타깃 확대 */
  .browse-grid { grid-template-columns: 1fr; }
  .filter-chip { padding: 9px 15px; min-height: 40px; }
  .topbar nav button { min-height: 40px; }

  /* 라이트박스/리포트: 작은 화면에 맞춤 + 닫기 버튼 위치 안전화 */
  .lightbox.report .report-frame { width: 94vw; height: 88vh; }
  .lightbox .lb-close { top: 12px; right: 12px; }
}
@media (max-width: 430px) {
  /* 헤더가 390px에서 넘치지 않도록 워드마크·네비 압축 */
  .topbar .wrap { gap: 8px; padding: 0 16px; }
  .topbar .t-title { font-size: 14px; }
  .topbar nav { gap: 2px; }
  .topbar nav button { padding: 8px 8px; font-size: 12.5px; }
  .wrap { padding: 0 18px; }
  .dive-nav { gap: 10px; }
  .dive-nav button { padding: 11px 14px; }
}
