/* =========================================================================
   ChipInsight Lab — premium AI SaaS redesign (v3, bright)
   Clean & airy · crisp near-white · vivid electric blue · modern sans ·
   soft layered shadows · rounded cards · subtle light glow.
   ========================================================================= */

:root {
  /* surfaces — bright cool */
  --canvas:    #F4F7FC;
  --canvas-2:  #FFFFFF;
  --surface:   #FFFFFF;
  --surface-2: #F1F5FB;
  --surface-3: #E7EEF8;

  /* borders — cool hairlines */
  --border:    rgba(15,23,42,.07);
  --border-2:  rgba(15,23,42,.11);
  --border-3:  rgba(15,23,42,.18);

  /* ink — crisp slate */
  --ink:   #0D1526;
  --ink-2: #44506A;
  --ink-3: #64708A;
  --ink-4: #97A1B6;
  --ink-5: #C9D1E0;

  /* accent — vivid electric blue */
  --accent:        #2D6BFF;
  --accent-2:      #1B53E8;
  --accent-3:      #1543C2;
  --accent-soft:   #EAF1FF;
  --accent-soft-2: #D6E4FF;
  --accent-border: #BBD2FF;
  --accent-ink:    #1B4FD9;
  --accent-grad:   linear-gradient(135deg, #5688FF 0%, #2D6BFF 52%, #2358F0 100%);
  --accent-glow:   linear-gradient(140deg, #6E93FF, #2D6BFF);

  /* semantic */
  --success:      #12A150;
  --success-soft: #E7F8EE;
  --success-border:#A6E6C0;

  /* radii — modern friendly */
  --r-xs: 8px; --r-sm: 10px; --r-md: 12px; --r-lg: 16px;
  --r-xl: 20px; --r-2xl: 24px; --r-pill: 999px;

  /* shadows — soft, layered, bright */
  --sh-xs: 0 1px 2px rgba(13,21,38,.05);
  --sh-sm: 0 1px 2px rgba(13,21,38,.04), 0 2px 6px -1px rgba(13,21,38,.06);
  --sh-md: 0 2px 6px -1px rgba(13,21,38,.05), 0 12px 24px -8px rgba(13,21,38,.10);
  --sh-lg: 0 4px 10px -3px rgba(13,21,38,.06), 0 24px 48px -12px rgba(13,21,38,.16);
  --sh-accent: 0 2px 6px rgba(45,107,255,.30), 0 10px 22px -6px rgba(45,107,255,.42);

  /* type — modern sans */
  --font:  "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont,
           "Apple SD Gothic Neo", system-ui, sans-serif;
  --mono:  "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --nav-h: 66px;
  --rail-w: 336px;
  --ease: cubic-bezier(.22,.61,.36,1);
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--font);
  background: var(--canvas);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "cv01","ss01";
  letter-spacing: -0.011em;
}
::selection { background: var(--accent-soft-2); color: var(--accent-3); }
button { font-family: inherit; cursor: pointer; }
a { color: inherit; text-decoration: none; }
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-thumb { background: rgba(15,23,42,.13); border-radius: 999px; border: 3px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: rgba(15,23,42,.24); background-clip: content-box; }
::-webkit-scrollbar-track { background: transparent; }

/* helpers */
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.mono { font-family: var(--mono); letter-spacing: -0.02em; }

/* =========================================================================
   App shell
   ========================================================================= */
.ci-app { min-height: 100vh; display: flex; flex-direction: column; }

/* ---- top bar ---- */
.ci-nav {
  height: var(--nav-h); flex: none;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding: 0 26px;
  background: rgba(255,255,255,.78);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 40;
}
.ci-brand { display: flex; align-items: center; gap: 11px; }
.ci-logo {
  width: 32px; height: 32px; border-radius: 10px;
  background: var(--accent-grad); display: grid; place-items: center; color: #fff;
  box-shadow: var(--sh-accent);
}
.ci-brand-name { font-size: 17px; font-weight: 720; letter-spacing: -0.025em; color: var(--ink); white-space: nowrap; }

/* segmented nav */
.ci-tabs {
  justify-self: center; display: inline-flex; gap: 3px; padding: 4px;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-pill);
}
.ci-tab {
  appearance: none; border: 0; background: transparent;
  padding: 8px 17px; border-radius: var(--r-pill);
  font-size: 13.5px; font-weight: 580; color: var(--ink-3); letter-spacing: -0.01em; white-space: nowrap;
  transition: color .16s var(--ease), background .16s var(--ease), box-shadow .16s var(--ease);
}
.ci-tab:hover { color: var(--ink); }
.ci-tab.is-active { background: var(--surface); color: var(--accent); font-weight: 680; box-shadow: var(--sh-sm); }

.ci-nav-right { justify-self: end; display: flex; align-items: center; gap: 3px; }
.ci-iconbtn {
  width: 37px; height: 37px; border-radius: var(--r-md);
  border: 0; background: transparent; color: var(--ink-4);
  display: grid; place-items: center; transition: background .15s var(--ease), color .15s var(--ease);
}
.ci-iconbtn:hover { background: var(--surface-2); color: var(--ink-2); }
.ci-nav-div { width: 1px; height: 22px; background: var(--border-2); margin: 0 9px; }
.ci-lang {
  display: inline-flex; align-items: center; gap: 7px;
  height: 37px; padding: 0 11px; border-radius: var(--r-md);
  border: 1px solid var(--border-2); background: var(--surface);
  font-size: 13px; font-weight: 560; color: var(--ink-2);
  transition: all .15s var(--ease);
}
.ci-lang:hover { border-color: var(--border-3); box-shadow: var(--sh-xs); }
.ci-avatar {
  width: 33px; height: 33px; border-radius: var(--r-pill); margin-left: 9px;
  background: var(--accent-grad); color: #fff; font-size: 13.5px; font-weight: 680;
  display: grid; place-items: center; box-shadow: 0 0 0 1px rgba(15,23,42,.04), var(--sh-xs);
}

/* ---- body layouts ---- */
.ci-body { flex: 1; min-height: 0; display: flex; }
.ci-rail {
  width: var(--rail-w); flex: none;
  background: var(--surface); border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  height: calc(100vh - var(--nav-h)); position: sticky; top: var(--nav-h);
}
.ci-main { flex: 1; min-width: 0; overflow-y: auto; height: calc(100vh - var(--nav-h)); }
.ci-main.is-full { background: var(--canvas); }
.ci-wrap { max-width: 1020px; margin: 0 auto; padding: 56px 52px 96px; }
.ci-wrap.is-wide { max-width: 1300px; }
.ci-wrap.is-report { max-width: 1160px; }
.ci-wrap, .ci-rail { word-break: keep-all; }

/* =========================================================================
   Workbench rail
   ========================================================================= */
.rail-head { display: flex; align-items: center; justify-content: space-between; padding: 22px 22px 18px; flex: none; }
.rail-title { display: flex; align-items: center; gap: 9px; font-size: 15px; font-weight: 700; color: var(--ink); white-space: nowrap; letter-spacing: -0.02em; }
.rail-spark { color: var(--accent); display: grid; place-items: center; }
.rail-new {
  display: inline-flex; align-items: center; gap: 5px; height: 32px; padding: 0 13px; border-radius: var(--r-pill);
  border: 1px solid var(--border-2); background: var(--surface); font-size: 12.5px; font-weight: 580; color: var(--ink-2);
  white-space: nowrap; flex: none; transition: all .15s var(--ease);
}
.rail-new:hover { border-color: var(--accent-border); color: var(--accent); background: var(--accent-soft); }
.rail-scroll { flex: 1; min-height: 0; overflow-y: auto; padding: 8px 22px 12px; }
.rail-intro p { font-size: 14px; line-height: 1.74; color: var(--ink-3); margin: 0 0 16px; }
.rail-intro p.lead { color: var(--ink-2); }

/* composer */
.rail-foot { flex: none; padding: 14px 22px 20px; border-top: 1px solid var(--border); }
.composer {
  border: 1px solid var(--border-2); border-radius: var(--r-lg); background: var(--surface); padding: 13px 13px 11px;
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
.composer:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.composer textarea {
  width: 100%; border: 0; outline: 0; resize: none; background: transparent;
  font-family: inherit; font-size: 13.5px; line-height: 1.6; color: var(--ink); min-height: 42px; padding: 0;
}
.composer textarea::placeholder { color: var(--ink-4); }
.composer-bar { display: flex; justify-content: flex-end; margin-top: 8px; }
.send-btn {
  display: inline-flex; align-items: center; gap: 6px; height: 33px; padding: 0 14px; border: 0; border-radius: var(--r-pill);
  font-size: 12.5px; font-weight: 620; background: var(--surface-3); color: var(--ink-3); transition: all .15s var(--ease);
}
.send-btn.is-ready { background: var(--accent-grad); color: #fff; box-shadow: var(--sh-accent); }
.send-btn.is-ready:hover { filter: brightness(1.05); }
.rail-note { font-size: 11.5px; line-height: 1.55; color: var(--ink-4); margin: 13px 2px 0; }

/* conversation */
.conv-status {
  border: 1px solid var(--success-border); background: var(--success-soft); border-radius: var(--r-md);
  padding: 14px 15px; margin: 0 0 20px;
}
.conv-status-top { display: flex; align-items: center; gap: 9px; }
.conv-check { width: 19px; height: 19px; border-radius: 50%; flex: none; background: var(--success); color: #fff; display: grid; place-items: center; }
.conv-status-title { font-size: 13.5px; font-weight: 680; color: #0B7A3B; }
.conv-status-sub { font-size: 12.5px; color: #2C7A52; margin: 6px 0 0; }
.conv-relink { display: inline-block; margin-top: 9px; font-size: 12.5px; font-weight: 620; color: var(--accent); }
.conv-relink:hover { color: var(--accent-2); }

.conv-msg { font-size: 13.5px; line-height: 1.74; color: var(--ink-2); }
.conv-msg p { margin: 0 0 14px; }
.conv-list { list-style: none; margin: 0 0 14px; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.conv-list li { position: relative; padding-left: 18px; font-size: 13px; line-height: 1.66; color: var(--ink-2); }
.conv-list li::before { content: ""; position: absolute; left: 2px; top: 7px; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.conv-copy {
  display: inline-flex; align-items: center; gap: 6px; margin: 2px 0 18px; font-size: 12.5px; color: var(--ink-3);
  border: 0; background: transparent; padding: 4px 0; transition: color .15s var(--ease);
}
.conv-copy:hover { color: var(--accent); }
.conv-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 14px; border: 1px solid var(--border-2); border-radius: var(--r-pill);
  background: var(--surface); font-size: 12.5px; font-weight: 560; color: var(--ink-2); transition: all .15s var(--ease);
}
.chip:hover { border-color: var(--accent-border); background: var(--accent-soft); color: var(--accent); }

/* =========================================================================
   Buttons / tags
   ========================================================================= */
.btn {
  display: inline-flex; align-items: center; gap: 8px; height: 46px; padding: 0 22px; border-radius: var(--r-md);
  font-size: 14.5px; font-weight: 640; letter-spacing: -0.01em; border: 1px solid transparent; transition: all .16s var(--ease); white-space: nowrap;
}
.btn-primary { background: var(--accent-grad); color: #fff; box-shadow: var(--sh-accent); }
.btn-primary:hover { transform: translateY(-1px); filter: brightness(1.05); }
.btn-primary:active { transform: translateY(0); }
.btn-secondary { background: var(--surface); color: var(--ink); border-color: var(--border-2); box-shadow: var(--sh-xs); }
.btn-secondary:hover { border-color: var(--accent-border); color: var(--accent); }
.btn-ghost { background: transparent; color: var(--ink-2); border-color: transparent; }
.btn-ghost:hover { background: var(--surface-2); }
.btn-sm { height: 37px; padding: 0 14px; font-size: 13px; gap: 6px; border-radius: var(--r-sm); }

.tag { display: inline-flex; align-items: center; gap: 6px; height: 27px; padding: 0 11px; border-radius: var(--r-pill); font-size: 12px; font-weight: 640; letter-spacing: -0.005em; }
.tag-solid { background: var(--accent-grad); color: #fff; }
.tag-accent { background: var(--accent-soft); color: var(--accent); }
.tag-outline { background: var(--surface); color: var(--accent); border: 1px solid var(--accent-border); }
.tag-neutral { background: var(--surface-2); color: var(--ink-2); }
.count-pill { display: inline-flex; align-items: center; gap: 6px; height: 31px; padding: 0 13px; border-radius: var(--r-pill); background: var(--accent-soft); color: var(--accent); border: 1px solid var(--accent-border); font-size: 12.5px; font-weight: 640; }

.link-accent { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 640; color: var(--accent); transition: gap .15s var(--ease), color .15s var(--ease); }
.link-accent:hover { color: var(--accent-2); gap: 9px; }

/* =========================================================================
   Screen 1 — entry
   ========================================================================= */
.hero { position: relative; margin-bottom: 60px; }
.hero::before {
  content: ""; position: absolute; top: -90px; left: -60px; width: 620px; height: 420px; z-index: 0; pointer-events: none;
  background: radial-gradient(48% 60% at 28% 32%, rgba(45,107,255,.16), transparent 72%),
              radial-gradient(40% 50% at 66% 18%, rgba(124,108,255,.13), transparent 70%);
  filter: blur(6px);
}
.hero > * { position: relative; z-index: 1; }
.hero .eyebrow { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 20px; padding: 6px 13px 6px 11px; background: var(--accent-soft); border: 1px solid var(--accent-border); border-radius: var(--r-pill); white-space: nowrap; }
.hero .eyebrow::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px rgba(45,107,255,.18); }
.hero h1 { font-size: 52px; line-height: 1.14; font-weight: 760; letter-spacing: -0.035em; color: var(--ink); margin: 0 0 22px; max-width: 17ch; text-wrap: balance; }
.hero-sub { font-size: 18px; line-height: 1.62; color: var(--ink-3); margin: 0 0 34px; max-width: 56ch; }
.hero-cta { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.hero-cta .hint { font-size: 13.5px; color: var(--ink-3); max-width: 38ch; line-height: 1.55; }

.section { margin-bottom: 60px; }
.section-label { font-size: 22px; font-weight: 720; letter-spacing: -0.025em; color: var(--ink); margin: 0 0 22px; }

/* suggestion cards — bright rounded soft-shadow */
.sugg-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.sugg-card {
  text-align: left; position: relative; display: flex; flex-direction: column; gap: 18px; padding: 22px; min-height: 150px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--sh-sm); transition: all .18s var(--ease);
}
.sugg-card:hover { border-color: var(--accent-border); box-shadow: var(--sh-md); transform: translateY(-3px); }
.sugg-top { display: flex; align-items: center; justify-content: space-between; }
.sugg-index { font-family: var(--mono); font-size: 11.5px; font-weight: 500; color: var(--ink-4); letter-spacing: 0; }
.sugg-icon { width: 40px; height: 40px; border-radius: var(--r-md); background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; transition: all .18s var(--ease); position: absolute; top: 22px; right: 22px; }
.sugg-card:hover .sugg-icon { background: var(--accent-grad); color: #fff; box-shadow: var(--sh-accent); }
.sugg-q { font-size: 15.5px; font-weight: 640; line-height: 1.46; color: var(--ink); max-width: 20ch; margin-top: auto; }
.sugg-arrow { display: none; }

/* step flow — numbered horizontal */
.steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.step { position: relative; padding-right: 14px; }
.step:not(:last-child)::after { content: ""; position: absolute; top: 17px; right: 5px; width: 8px; height: 8px; border-top: 2px solid var(--ink-5); border-right: 2px solid var(--ink-5); transform: rotate(45deg); }
.step-num { width: 36px; height: 36px; border-radius: var(--r-md); background: var(--accent-soft); color: var(--accent); font-size: 14px; font-weight: 720; display: grid; place-items: center; margin-bottom: 15px; letter-spacing: -0.02em; }
.step-title { font-size: 15px; font-weight: 680; color: var(--ink); margin: 0 0 9px; letter-spacing: -0.015em; }
.step-desc { font-size: 12.5px; line-height: 1.62; color: var(--ink-3); margin: 0; }

.disclaimer {
  display: flex; align-items: flex-start; gap: 11px; padding: 16px 18px; border-radius: var(--r-md);
  background: var(--surface-2); border: 1px solid var(--border); font-size: 12.5px; line-height: 1.62; color: var(--ink-3); margin-top: 4px;
}
.disclaimer svg { flex: none; margin-top: 1px; color: var(--ink-4); }

/* =========================================================================
   Screen 2 — results
   ========================================================================= */
.res-head { margin-bottom: 8px; }
.res-tagrow { display: flex; align-items: center; gap: 9px; margin-bottom: 18px; }
.res-tagrow .grow { flex: 1; }
.res-title { font-size: 38px; line-height: 1.22; font-weight: 740; letter-spacing: -0.03em; color: var(--ink); margin: 0 0 20px; max-width: 22ch; text-wrap: balance; }
.res-query { display: inline-flex; align-items: stretch; margin-bottom: 20px; border: 1px solid var(--border-2); border-radius: var(--r-md); overflow: hidden; max-width: max-content; box-shadow: var(--sh-xs); }
.res-query .q-label { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); background: var(--accent-soft); padding: 0 13px; display: flex; align-items: center; white-space: nowrap; }
.res-query .q-val { font-family: var(--mono); font-size: 12.5px; line-height: 1.5; color: var(--ink-2); padding: 10px 14px; background: var(--surface); overflow-wrap: anywhere; }
.res-meta { display: flex; align-items: center; gap: 11px; font-size: 12.5px; color: var(--ink-3); margin-bottom: 20px; }
.res-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--ink-5); }
.res-meta .verify { display: inline-flex; align-items: center; gap: 8px; }
.res-meta .verify svg { color: var(--accent); }
.res-stats { display: flex; align-items: stretch; gap: 0; padding: 4px 0; border-top: 1px solid var(--border-2); border-bottom: 1px solid var(--border-2); margin-bottom: 22px; }
.res-stat { display: flex; flex-direction: column; gap: 4px; padding: 14px 28px 14px 0; margin-right: 28px; border-right: 1px solid var(--border); }
.res-stat:last-child { border-right: 0; }
.res-stat .s-num { font-size: 24px; font-weight: 740; color: var(--ink); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.res-stat .s-lab { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-3); font-weight: 520; }
.res-stat .s-lab svg { color: var(--accent); }
.res-actions { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.res-helper { font-size: 13px; line-height: 1.55; color: var(--ink-3); }

.res-grid { display: grid; grid-template-columns: 212px minmax(0,1fr) 284px; gap: 44px; margin-top: 36px; align-items: start; }

/* TOC */
.toc { position: sticky; top: 26px; }
.toc-label { font-size: 11.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-4); margin: 0 0 14px; padding-left: 14px; }
.toc-item {
  display: block; width: 100%; text-align: left; border: 0; background: transparent; position: relative;
  padding: 12px 8px 12px 14px; border-radius: var(--r-md); transition: all .15s var(--ease); margin-bottom: 3px;
}
.toc-item::before { content: ""; position: absolute; left: 0; top: 12px; bottom: 12px; width: 3px; border-radius: 3px; background: var(--accent); transform: scaleY(0); transform-origin: center; transition: transform .18s var(--ease); }
.toc-item:hover { background: var(--surface); }
.toc-item.is-active { background: var(--accent-soft); }
.toc-item.is-active::before { transform: scaleY(1); }
.toc-item .t-eyebrow { font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-4); display: block; margin-bottom: 5px; }
.toc-item.is-active .t-eyebrow { color: var(--accent); }
.toc-item .t-txt { font-size: 12.5px; line-height: 1.48; color: var(--ink-2); font-weight: 540; display: block; }
.toc-item.is-active .t-txt { color: var(--ink); }
.toc-item .t-badge { display: inline-flex; align-items: center; gap: 4px; margin-top: 7px; font-size: 10.5px; font-weight: 700; color: var(--accent); }
.toc-foot { margin-top: 14px; padding: 14px 0 0 14px; border-top: 1px solid var(--border); }
.toc-foot a { font-size: 12px; color: var(--ink-3); font-weight: 560; }
.toc-foot a:hover { color: var(--accent); }

/* article */
.art-eyebrow-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.art h2 { font-size: 26px; line-height: 1.42; font-weight: 720; letter-spacing: -0.022em; color: var(--ink); margin: 0 0 30px; text-wrap: pretty; }
.art-block { margin-bottom: 26px; }
.art-block .b-label { font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin: 0 0 11px; }
.art-block p { font-size: 15.5px; line-height: 1.84; color: var(--ink-2); margin: 0; }
.cite { font-family: var(--mono); font-size: 9.5px; font-weight: 600; color: var(--accent); background: var(--accent-soft); border-radius: 5px; padding: 1px 5px; vertical-align: super; line-height: 0; margin: 0 1px; cursor: pointer; }
.cite:hover { background: var(--accent-soft-2); }

/* source cards */
.src-col { position: sticky; top: 26px; }
.src-label { font-size: 11.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-4); margin: 0 0 14px; }
.src-card {
  position: relative; padding: 17px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--border);
  box-shadow: var(--sh-sm); margin-bottom: 14px; transition: all .16s var(--ease);
}
.src-card:hover { border-color: var(--accent-border); box-shadow: var(--sh-md); transform: translateY(-2px); }
.src-top { display: flex; align-items: center; gap: 8px; margin-bottom: 11px; }
.src-kind { font-size: 10px; font-weight: 700; letter-spacing: .03em; color: var(--accent); background: var(--accent-soft); border-radius: var(--r-xs); padding: 3px 7px; text-transform: uppercase; }
.src-co { font-size: 11px; font-weight: 680; color: var(--ink-2); letter-spacing: .01em; }
.src-year { font-family: var(--mono); font-size: 11px; font-weight: 500; color: var(--ink-4); margin-left: auto; }
.src-title { font-size: 13.5px; font-weight: 660; line-height: 1.42; color: var(--ink); margin: 0 0 9px; }
.src-abs { font-size: 11.5px; line-height: 1.58; color: var(--ink-3); margin: 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.src-trans-label { display: inline-flex; align-items: center; gap: 6px; font-size: 9.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--accent); margin: 13px 0 7px; padding-top: 12px; border-top: 1px dashed var(--border-2); width: 100%; }
.src-trans-title { font-size: 12px; font-weight: 660; color: var(--ink-2); margin: 0 0 5px; line-height: 1.4; }
.src-trans { font-size: 11px; line-height: 1.58; color: var(--ink-3); margin: 0; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.src-idx { position: absolute; top: -9px; left: -9px; width: 24px; height: 24px; border-radius: 50%; background: var(--accent-grad); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; box-shadow: var(--sh-accent); }

/* =========================================================================
   Screen 3 — report
   ========================================================================= */
.rep-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-2xl); box-shadow: var(--sh-md); padding: 38px 42px; margin-bottom: 28px; }
.rep-verify { display: inline-flex; align-items: center; gap: 9px; font-size: 13px; color: var(--ink-3); margin-bottom: 18px; }
.rep-verify svg { color: var(--accent); }
.rep-card h1 { font-size: 40px; font-weight: 760; letter-spacing: -0.035em; color: var(--ink); margin: 0 0 12px; }
.rep-sub { font-size: 16.5px; line-height: 1.58; color: var(--ink-3); margin: 0 0 26px; max-width: 56ch; }
.rep-actions { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; flex-wrap: wrap; }
.btn-danger-soft { background: var(--surface); color: #C2410C; border: 1px solid var(--border-2); }
.btn-danger-soft:hover { background: #FFF3EC; border-color: #FBC9A4; }
.rep-note { font-size: 12.5px; line-height: 1.55; color: var(--ink-3); margin: 0 0 16px; }
.rep-meta { display: flex; align-items: center; gap: 13px; font-size: 12.5px; color: var(--ink-3); flex-wrap: wrap; padding-top: 18px; border-top: 1px solid var(--border); }
.rep-meta b { color: var(--ink); font-weight: 720; font-variant-numeric: tabular-nums; }
.rep-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--ink-5); }

.rep-grid { display: grid; grid-template-columns: 232px minmax(0,1fr); gap: 40px; align-items: start; }
.rep-toc { position: sticky; top: 26px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--sh-sm); padding: 18px 14px; }
.rep-toc .toc-label { padding-left: 12px; }
.rep-toc-item {
  display: flex; align-items: center; justify-content: space-between; width: 100%; text-align: left; border: 0; background: transparent;
  position: relative; padding: 11px 10px 11px 14px; border-radius: var(--r-md); font-size: 13.5px; font-weight: 540; color: var(--ink-2);
  transition: all .15s var(--ease); margin-bottom: 2px;
}
.rep-toc-item::before { content: ""; position: absolute; left: 0; top: 11px; bottom: 11px; width: 3px; border-radius: 3px; background: var(--accent); transform: scaleY(0); transition: transform .18s var(--ease); }
.rep-toc-item:hover { background: var(--surface-2); }
.rep-toc-item.is-active { background: var(--accent-soft); color: var(--accent); font-weight: 660; }
.rep-toc-item.is-active::before { transform: scaleY(1); }
.rep-toc-item.is-sub { padding-left: 26px; font-size: 12.5px; color: var(--ink-3); }
.rep-toc-item .t-badge { font-size: 10.5px; font-weight: 700; color: var(--accent); display: inline-flex; align-items: center; gap: 3px; }

.rep-body { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-2xl); box-shadow: var(--sh-md); padding: 46px 52px 54px; }
.rep-body > .eyebrow { display: block; margin-bottom: 12px; color: var(--ink-4); }
.rep-body h2.rep-h1 { font-size: 32px; font-weight: 760; letter-spacing: -0.03em; color: var(--ink); margin: 0 0 30px; }
.rep-sec { border-left: 3px solid var(--accent); padding-left: 20px; }
.rep-sec h3 { font-size: 21px; font-weight: 720; letter-spacing: -0.02em; color: var(--ink); margin: 0 0 18px; }
.rep-lead { font-size: 18px; line-height: 1.7; color: var(--ink); margin: 0 0 30px; text-wrap: pretty; font-weight: 500; }
.rep-lead b { font-weight: 720; color: var(--accent); }
.rep-block { margin-bottom: 28px; }
.rep-block .b-label { font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-4); margin: 0 0 14px; }
.rep-ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 16px; }
.rep-ul li { position: relative; padding-left: 24px; font-size: 15.5px; line-height: 1.72; color: var(--ink-2); }
.rep-ul li::before { content: ""; position: absolute; left: 4px; top: 9px; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.rep-strat { font-size: 15.5px; line-height: 1.8; color: var(--ink-2); margin: 0; padding: 22px 24px; background: var(--accent-soft); border-radius: var(--r-md); }
.rep-strat .lead-in { font-weight: 720; color: var(--accent); }

/* empty placeholder */
.empty-state { min-height: calc(100vh - var(--nav-h)); display: grid; place-items: center; }
.empty-inner { text-align: center; color: var(--ink-4); }
.empty-inner .ei-icon { width: 58px; height: 58px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--border); display: grid; place-items: center; margin: 0 auto 20px; color: var(--accent); box-shadow: var(--sh-sm); }
.empty-inner h3 { font-size: 22px; font-weight: 720; color: var(--ink-3); margin: 0; letter-spacing: -0.02em; }

/* fade transition */
.fade-in { animation: fadeIn .4s var(--ease) both; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

@media (max-width: 1180px) {
  .res-grid { grid-template-columns: 1fr; }
  .toc, .src-col { position: static; }
  .src-col { display: grid; grid-template-columns: repeat(2,1fr); gap: 14px; }
  .rep-grid { grid-template-columns: 1fr; }
}
