/* === Social Media Listener — дизайн-система (светлая, Claude cream) === */
@font-face { font-family: 'TT Hoves'; src: url('/fonts/TTHoves-DemiBold.otf') format('opentype'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'TT Hoves'; src: url('/fonts/TTHoves-Bold.otf') format('opentype'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Plex'; src: url('/fonts/IBMPlexSans-Light.ttf') format('truetype'); font-weight: 300; font-display: swap; }
@font-face { font-family: 'Plex'; src: url('/fonts/IBMPlexSans-Regular.ttf') format('truetype'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Plex'; src: url('/fonts/IBMPlexSans-Medium.ttf') format('truetype'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Plex'; src: url('/fonts/IBMPlexSans-SemiBold.ttf') format('truetype'); font-weight: 600; font-display: swap; }

:root {
  /* палитра подобрана в тюнере: страница тёплый серый, карточки светлее, плитки/инпуты белые */
  --bg: #ded9d3; --card: #ede8e3; --white: #ffffff;
  --tile: #ffffff; --badge: #ded9d3;
  --ink: #141413; --ink2: #262627; --muted: #696969; --muted2: #555555; --body: #3a3a38;
  --orange: #F37338; --red: #CF4500; --blue: #3860BE; --line: rgba(20,20,19,.16);
}
* { box-sizing: border-box; }
body { margin: 0; font-family: 'Plex', -apple-system, Arial, sans-serif; background: var(--bg);
  color: var(--ink); -webkit-font-smoothing: antialiased; font-weight: 400; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .3; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes riseIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
@keyframes blink { 0%,49% { opacity: 1; } 50%,100% { opacity: 0; } }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #ddd7d1; border-radius: 9999px; border: 3px solid var(--bg); }
.lift-scroll::-webkit-scrollbar-thumb, .dark-scroll::-webkit-scrollbar-thumb { border-color: var(--card); }
::-webkit-scrollbar-track { background: transparent; }
textarea:focus, input:focus { outline: none; }
.mono { font-family: 'JetBrains Mono', ui-monospace, monospace; }
.h { font-family: 'TT Hoves', 'Plex', sans-serif; letter-spacing: -0.02em; font-weight: 600; }
a { color: var(--blue); }
/* убраны декоративные цветные точки-акценты везде */
.dot, .jdot, .sdot, .tone-leg i { display: none; }

.app { min-height: 100vh; height: 100vh; display: flex; flex-direction: column; padding: 20px 24px; gap: 18px; }

/* header */
.topbar { flex-shrink: 0; display: flex; align-items: center; justify-content: space-between; gap: 20px;
  background: var(--card); border-radius: 999px; padding: 12px 14px 12px 26px; box-shadow: rgba(0,0,0,0.05) 0 6px 24px 0; }
.brand { display: flex; align-items: center; gap: 14px; }
.brand-name { font-size: 19px; letter-spacing: -0.03em; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700;
  letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.eyebrow.dark { color: #2a2a26; }
.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--orange); flex-shrink: 0; }
.dot.red { background: var(--red); }
.sources-pill { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted2);
  border: 1px solid var(--line); padding: 7px 18px; border-radius: 999px; }
.sources-pill .dot { width: 7px; height: 7px; }

/* main layout */
.main { flex: 1; display: grid; grid-template-columns: 340px 1fr; gap: 18px; min-height: 0; overflow: hidden; }
.sidebar { display: flex; flex-direction: column; gap: 18px; min-height: 0; }
.card { background: var(--card); border-radius: 20px; }

.btn-new { flex-shrink: 0; width: 100%; height: 52px; border: 1.5px solid var(--ink); border-radius: 999px;
  background: var(--ink); color: var(--bg); font-family: inherit; font-size: 16px; font-weight: 500;
  letter-spacing: -0.02em; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 10px; }
.btn-new .plus { font-size: 20px; line-height: 0; transform: translateY(-1px); }

.recents { padding: 26px 24px; flex: 1; min-height: 0; display: flex; flex-direction: column; }
.recents .eyebrow { margin-bottom: 14px; }
.jobs { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; margin: 0 -6px; padding: 0 6px; }
.job { display: flex; align-items: center; gap: 11px; padding: 12px 14px; border-radius: 999px; cursor: pointer;
  background: transparent; border: 1px solid transparent; }
.job:hover { background: var(--white); }
.job.active { background: var(--white); border-color: rgba(20,20,19,.12); }
.job .jdot { flex-shrink: 0; width: 8px; height: 8px; border-radius: 50%; }
.job .jtopic { flex: 1; font-size: 14px; color: var(--ink2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.job .jst { flex-shrink: 0; font-size: 11px; font-weight: 500; color: var(--muted); }

/* panels */
.panels { display: grid; grid-template-columns: 0.32fr 0.68fr; gap: 18px; min-height: 0; }
.panel { display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 22px 26px 16px; }
.status-pill { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; border: 1px solid rgba(20,20,19,.28);
  padding: 4px 12px; border-radius: 999px; }
.status-pill .sdot { width: 7px; height: 7px; border-radius: 50%; }

.trace { flex: 1; overflow-y: auto; padding: 8px 26px 24px; display: flex; flex-direction: column; gap: 14px; }
.tr-ev { display: flex; gap: 12px; animation: riseIn .28s ease both; }
.tr-num { flex-shrink: 0; font-size: 11px; color: #444239; padding-top: 4px; width: 20px; text-align: right; }
.tr-body { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.tr-head { display: flex; align-items: center; gap: 9px; }
.tr-agent { font-size: 12px; font-weight: 500; letter-spacing: -0.01em; padding: 2px 12px; border-radius: 999px; background: var(--badge); color: #37352f; }
.tr-kind { font-size: 10.5px; letter-spacing: .5px; text-transform: uppercase; color: #444239; }
.tr-text { font-size: 14px; line-height: 1.5; color: #1c1b18; }
.tr-thinking { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: #37352f; padding-left: 32px; }
.tr-thinking .cursor { animation: blink 1s step-end infinite; }
.tr-empty { margin: auto; text-align: center; max-width: 260px; color: #37352f; font-size: 14px; line-height: 1.6; }

/* tabs + result */
.tabs { display: flex; gap: 8px; padding: 22px 26px 16px; }
.tab { padding: 8px 22px; border-radius: 999px; background: var(--white); border: 1.5px solid var(--ink);
  color: var(--ink); font-family: inherit; font-size: 15px; font-weight: 500; letter-spacing: -0.02em; cursor: pointer; }
.tab.active { background: var(--ink); color: var(--bg); }
.result { flex: 1; overflow-y: auto; padding: 8px 30px 30px; }
.tabc { }
.placeholder { margin: 60px auto; text-align: center; max-width: 300px; color: #8e8b85; font-size: 15px; line-height: 1.6; }

/* summary */
.sum-lead { margin: 12px 0 0; font-size: 26px; line-height: 1.2; letter-spacing: -0.02em; }
.tone { margin: 26px 0; padding: 22px; background: var(--tile); border-radius: 20px; }
.tone-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.tone-top .lbl { font-size: 13px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.tone-top .val { font-size: 16px; font-weight: 500; }
.tone-bar { display: flex; height: 12px; border-radius: 999px; overflow: hidden; margin-top: 14px; background: #e2ddd7; }
.tone-bar .pos { background: var(--ink); } .tone-bar .neu { background: #b8b2ab; } .tone-bar .neg { background: var(--red); }
.tone-leg { display: flex; gap: 20px; margin-top: 12px; font-size: 13px; color: var(--muted2); }
.tone-leg span { display: inline-flex; align-items: center; gap: 7px; }
.tone-leg i { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 26px 0; }
.col { background: var(--tile); border-radius: 20px; padding: 22px; }
.col .eyebrow { margin-bottom: 14px; }
.col .items { display: flex; flex-direction: column; gap: 10px; }
.col .li { display: flex; gap: 10px; font-size: 14px; line-height: 1.45; color: var(--ink2); }
.col .li .mark { flex-shrink: 0; font-weight: 500; }
.col.pros .mark { color: var(--ink); } .col.cons .mark { color: var(--red); }
.sum-sub { margin: 22px 0 9px; }
.sum-p { margin: 0; font-size: 15px; line-height: 1.5; color: var(--body); }
.sources-list { display: flex; flex-direction: column; gap: 10px; }
.src { display: flex; align-items: baseline; gap: 9px; }
.src a { font-size: 15px; text-decoration: none; }
.src a:hover { text-decoration: underline; }
.src .host { font-size: 12.5px; color: #8e8b85; }

/* full report (markdown) */
.report-md { line-height: 1.6; color: var(--body); }
.report-md h1 { font-family: 'TT Hoves','Plex',sans-serif; font-weight: 600; font-size: 34px; letter-spacing: -0.03em; margin: 12px 0 14px; line-height: 1.05; color: var(--ink); }
.report-md h2 { font-family: 'TT Hoves','Plex',sans-serif; font-weight: 600; font-size: 24px; letter-spacing: -0.02em; margin: 28px 0 10px; line-height: 1.2; color: var(--ink); }
.report-md h3 { font-size: 18px; margin: 20px 0 8px; color: var(--ink); }
.report-md p { font-size: 15px; line-height: 1.6; margin: 0 0 12px; }
.report-md ul, .report-md ol { margin: 0 0 14px; padding-left: 22px; }
.report-md li { font-size: 15px; line-height: 1.55; margin: 5px 0; }
.report-md a { text-decoration: none; } .report-md a:hover { text-decoration: underline; }
.report-md code { background: var(--bg); padding: 1px 6px; border-radius: 5px; font-size: 13px; }

/* start screen (separate new-research page) */
.start { flex: 1; display: flex; align-items: flex-start; justify-content: center; min-height: 0; overflow-y: auto; padding: 8px 0; }
.start-inner { width: 100%; max-width: 720px; display: flex; flex-direction: column; gap: 18px; }
.btn-back { align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; background: var(--white);
  border: 1.5px solid var(--ink); border-radius: 999px; padding: 8px 20px; font-family: inherit; font-size: 15px;
  color: var(--ink); cursor: pointer; }
.start-card { padding: 44px 48px; }
.start-card .eyebrow { margin-bottom: 14px; }
.start-title { margin: 0 0 8px; font-size: 40px; line-height: 1.05; letter-spacing: -0.03em; }
.start-sub { margin: 0 0 28px; font-size: 16px; color: var(--muted2); line-height: 1.45; max-width: 520px; }
.field-label { font-size: 13px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); margin: 26px 0 8px; }
.field-label:first-of-type { margin-top: 0; }
.input { width: 100%; background: var(--white); border: 1px solid var(--line); border-radius: 12px;
  padding: 16px 18px; font-family: inherit; font-size: 16px; line-height: 1.5; color: var(--ink); resize: vertical; }
.input:focus { border-color: var(--ink); }
.topic-input { min-height: 128px; }
.context-input { min-height: 56px; }
.seg { display: flex; gap: 18px; }
.seg label { display: inline-flex; align-items: center; gap: 7px; font-size: 15px; color: var(--ink); cursor: pointer; }
.seg input { accent-color: var(--ink); }
.depth-row { display: flex; align-items: baseline; justify-content: space-between; margin: 26px 0 10px; }
.depth-val { font-size: 15px; font-weight: 500; color: var(--muted2); }
.depth-range { width: 100%; accent-color: var(--ink); }
.btn-run { width: 100%; height: 52px; margin-top: 28px; border: 1.5px solid var(--ink); border-radius: 999px;
  background: var(--ink); color: var(--bg); font-family: inherit; font-size: 16px; font-weight: 500;
  letter-spacing: -0.02em; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 10px; }
.btn-run:disabled { background: #4a4946; cursor: default; }
.spin { width: 15px; height: 15px; border-radius: 50%; border: 2px solid rgba(243,240,238,.35);
  border-top-color: var(--bg); animation: spin .7s linear infinite; display: inline-block; }
.hint-run { font-size: 13px; color: var(--red); margin-top: 11px; min-height: 15px; }
.recents-start { padding: 28px 32px; }
.recents-start .eyebrow { margin-bottom: 14px; }
.recents-start .jobs { overflow: visible; margin: 0; padding: 0; }
