/* Wi Тендеры — в стиле сайта Workintelligence: угольный фон, серебро, Inter + Cormorant Garamond. */
:root {
  --bg: #080808;
  --panel: rgba(255, 255, 255, 0.025);
  --panel-2: rgba(255, 255, 255, 0.045);
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.14);
  --text: #f5f5f5;
  --muted: #9a9a9a;
  --mist: #c9c9c9;
  --high: #ff8a80;
  --high-bg: rgba(255, 82, 82, 0.1);
  --mid: #ffd27a;
  --mid-bg: rgba(255, 196, 0, 0.08);
  --low: #8fd3ff;
  --low-bg: rgba(64, 170, 255, 0.08);
  --ok: #8ee6b0;
  --ok-bg: rgba(60, 220, 130, 0.08);
  --radius: 16px;
  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { overflow-x: clip; }
body {
  margin: 0;
  background: var(--bg);
  background-image: radial-gradient(1200px 600px at 15% -10%, rgba(255, 255, 255, 0.045), transparent 60%), radial-gradient(900px 500px at 100% 0%, rgba(255, 255, 255, 0.03), transparent 55%);
  background-attachment: fixed;
  color: var(--text);
  font: 14px/1.55 Inter, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
::selection { background: rgba(255, 255, 255, 0.85); color: #000; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 500; }
.display { font-family: 'Cormorant Garamond', Georgia, serif; font-weight: 500; letter-spacing: 0.01em; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.mono { font-family: 'JetBrains Mono', ui-monospace, Consolas, monospace; }
.hidden { display: none !important; }

/* ---------- Кнопки и поля ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid var(--line-2); background: transparent; color: var(--text);
  padding: 11px 20px; border-radius: 12px; font: inherit; font-weight: 500; letter-spacing: 0.02em; cursor: pointer; text-decoration: none;
  transition: background 0.25s, border-color 0.25s, box-shadow 0.25s, opacity 0.2s;
}
.btn:hover { background: rgba(255, 255, 255, 0.06); border-color: rgba(255, 255, 255, 0.25); }
.btn-primary { background: #fff; color: #000; border-color: #fff; }
.btn-primary:hover { background: #fff; box-shadow: 0 0 24px rgba(255, 255, 255, 0.16), 0 0 60px rgba(255, 255, 255, 0.06); transform: translateY(-1px); }
.btn-mini { padding: 6px 12px; font-size: 12px; border-radius: 8px; }
.btn[disabled] { opacity: 0.45; pointer-events: none; }
.btn-ghost { border-color: transparent; color: var(--muted); }
.btn-ghost:hover { color: var(--text); }

input, textarea, select {
  width: 100%; background: rgba(255, 255, 255, 0.03); border: 1px solid var(--line); border-radius: 10px;
  padding: 11px 14px; color: var(--text); font: inherit; outline: none; transition: border-color 0.25s, background 0.25s;
}
input:focus, textarea:focus { border-color: rgba(255, 255, 255, 0.3); background: rgba(255, 255, 255, 0.05); }
::placeholder { color: rgba(255, 255, 255, 0.28); }
label.field { display: block; }
label.field > span { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; }

/* ---------- Каркас ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 14px;
  min-height: 64px; padding: 10px 24px; border-bottom: 1px solid rgba(255, 255, 255, 0.05); background: rgba(8, 8, 8, 0.82); backdrop-filter: blur(14px);
}
/* Знак и надпись — как в шапке workintelligence.ru: крыло в кольце с бегущим бликом, курсивное «Wi» и разреженная подпись. */
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-ring { position: relative; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0; }
.brand-ring img { width: 68%; height: 68%; object-fit: contain; transition: transform 0.7s; }
.brand:hover .brand-ring img { transform: rotate(-8deg) scale(1.1); }
.brand-ring::before {
  content: ''; position: absolute; inset: 0; border-radius: 50%; padding: 1px;
  background: conic-gradient(from var(--ring-a, 0deg), rgba(255, 255, 255, 0.08) 0deg, rgba(255, 255, 255, 0.08) 250deg, rgba(255, 255, 255, 0.9) 320deg, rgba(255, 255, 255, 0.08) 360deg);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); mask-composite: exclude;
  animation: ringSpin 7s linear infinite;
}
.brand-ring::after { content: ''; position: absolute; inset: 3px; border-radius: 50%; background: radial-gradient(circle at 50% 35%, rgba(255, 255, 255, 0.07), transparent 70%); }
.brand:hover .brand-ring::before { animation-duration: 2.4s; }
@property --ring-a { syntax: '<angle>'; initial-value: 0deg; inherits: false; }
@keyframes ringSpin { to { --ring-a: 360deg; } }
@media (prefers-reduced-motion: reduce) { .brand-ring::before { animation: none; } }
.wordmark { display: inline-flex; flex-direction: column; justify-content: center; line-height: 1; white-space: nowrap; font-size: 17px; }
.wordmark b { font-family: 'Cormorant Garamond', Georgia, serif; font-style: italic; font-weight: 600; font-size: 1.55em; line-height: 0.85; letter-spacing: 0.01em; color: #fff; }
.wordmark span {
  margin-top: 0.3em; padding-left: 0.06em; font-size: 0.56em; font-weight: 600; text-transform: uppercase; letter-spacing: 0.46em;
  background: linear-gradient(110deg, #c9c9d2 25%, #ffffff 50%, #c9c9d2 75%); background-size: 260% 100%; background-position: 100% 0;
  -webkit-background-clip: text; background-clip: text; color: transparent; transition: background-position 1.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.brand:hover .wordmark span { background-position: 0 0; }
.topbar .spacer { flex: 1; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px; font-size: 12px; color: var(--mist); white-space: nowrap; }
.chip .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 8px var(--ok); }
.chip.warn .dot { background: var(--mid); box-shadow: 0 0 8px var(--mid); }

.layout { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 24px; max-width: 1360px; margin: 0 auto; padding: 24px; }
.sidebar { position: sticky; top: 84px; align-self: start; max-height: calc(100vh - 100px); display: flex; flex-direction: column; gap: 12px; }
.sidebar .list { overflow: auto; display: flex; flex-direction: column; gap: 8px; padding-right: 2px; }
.titem { text-align: left; width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel); color: var(--text); cursor: pointer; font: inherit; transition: border-color 0.2s, background 0.2s; }
.titem:hover { border-color: var(--line-2); }
.titem.active { border-color: rgba(255, 255, 255, 0.35); background: var(--panel-2); }
.titem .t { font-weight: 500; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.titem .m { display: flex; gap: 8px; align-items: center; margin-top: 6px; font-size: 12px; color: var(--muted); flex-wrap: wrap; }

.panel { border: 1px solid var(--line); background: var(--panel); border-radius: var(--radius); padding: 22px; box-shadow: 0 24px 80px -32px rgba(0, 0, 0, 0.9); }
.panel + .panel { margin-top: 16px; }
.panel h2 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.14em; color: var(--muted); margin-bottom: 14px; font-weight: 500; }
.panel.narrow { max-width: 460px; }
.center-page { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.center-page h1 { font-size: 34px; margin-bottom: 8px; }

.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }

/* ---------- Новый разбор ---------- */
.hero h1 { font-size: 40px; line-height: 1.1; margin-bottom: 8px; }
.hero p { margin: 0 0 18px; color: var(--mist); max-width: 720px; }
.drop {
  border: 1.5px dashed var(--line-2); border-radius: var(--radius); padding: 34px 20px; text-align: center; cursor: pointer;
  transition: border-color 0.25s, background 0.25s; background: rgba(255, 255, 255, 0.015);
}
.drop:hover, .drop.over { border-color: rgba(255, 255, 255, 0.45); background: rgba(255, 255, 255, 0.04); }
.drop .big { font-size: 16px; font-weight: 500; }
.files { margin-top: 14px; display: flex; flex-direction: column; gap: 6px; }
.file { display: flex; gap: 10px; align-items: center; padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; font-size: 13px; }
.file .n { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file.bad { border-color: rgba(255, 138, 128, 0.35); }
.file.bad .s { color: var(--high); }
.file .x { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 16px; padding: 0 4px; }
details.paste summary { cursor: pointer; color: var(--muted); margin-top: 14px; }
details.paste textarea { margin-top: 10px; min-height: 140px; }
.feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
.feature { border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
.feature b { display: block; margin-bottom: 4px; font-weight: 500; }

/* ---------- Прогресс ---------- */
.progress { height: 6px; border-radius: 99px; background: rgba(255, 255, 255, 0.06); overflow: hidden; margin: 14px 0 8px; }
.progress > i { display: block; height: 100%; background: linear-gradient(90deg, #fff, #9a9a9a); border-radius: 99px; transition: width 0.6s; }
.shimmer { background: linear-gradient(90deg, rgba(255,255,255,0.03), rgba(255,255,255,0.09), rgba(255,255,255,0.03)); background-size: 200% 100%; animation: sh 1.8s linear infinite; border-radius: 10px; height: 14px; margin: 10px 0; }
@keyframes sh { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* ---------- Разбор ---------- */
.head { display: flex; gap: 16px; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; margin-bottom: 16px; }
.head h1 { font-size: 30px; line-height: 1.15; max-width: 820px; word-break: break-word; }
.verdict { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 22px; align-items: center; }
.ring { width: 112px; height: 112px; position: relative; }
.ring svg { transform: rotate(-90deg); }
.ring .v { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; }
.ring .v b { font-size: 30px; font-weight: 500; display: block; line-height: 1; }
.ring .v span { font-size: 11px; color: var(--muted); }
.decision { font-family: 'Cormorant Garamond', Georgia, serif; font-size: 28px; line-height: 1.15; margin-bottom: 8px; }
.decision.go { color: var(--ok); } .decision.care { color: var(--mid); } .decision.no { color: var(--high); }
.summary { color: var(--mist); margin: 0 0 8px; }
.reasons { margin: 0; padding-left: 18px; color: var(--muted); }

.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
.kpi { border: 1px solid var(--line); border-radius: 12px; padding: 14px; background: var(--panel); min-width: 0; }
.kpi span { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); margin-bottom: 6px; }
.kpi b { font-weight: 500; font-size: 17px; word-break: break-word; }
.kpi i { display: block; font-style: normal; font-size: 12px; color: var(--muted); margin-top: 4px; }
.kpi.alert b { color: var(--mid); }

.facts { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 0; }
.facts div { padding: 9px 0; border-bottom: 1px solid var(--line); }
.facts div:nth-child(odd) { color: var(--muted); padding-right: 12px; }
.facts div:nth-last-child(-n + 2) { border-bottom: 0; }

.risk { border: 1px solid var(--line); border-left: 3px solid var(--low); border-radius: 12px; padding: 14px 16px; background: var(--low-bg); }
.risk + .risk { margin-top: 10px; }
.risk.high { border-left-color: var(--high); background: var(--high-bg); }
.risk.medium { border-left-color: var(--mid); background: var(--mid-bg); }
.risk .rt { display: flex; gap: 10px; align-items: baseline; justify-content: space-between; }
.risk .rt b { font-weight: 500; font-size: 15px; }
.sev { font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; padding: 2px 8px; border-radius: 99px; border: 1px solid currentColor; white-space: nowrap; }
.sev.high { color: var(--high); } .sev.medium { color: var(--mid); } .sev.low { color: var(--low); }
.risk p { margin: 6px 0 0; color: var(--mist); }
.quote { margin: 10px 0 0; padding: 8px 12px; border-left: 2px solid var(--line-2); color: var(--muted); font-size: 13px; background: rgba(0, 0, 0, 0.25); border-radius: 0 8px 8px 0; }
.quote cite { display: block; font-style: normal; font-size: 11px; margin-top: 4px; opacity: 0.8; }
.filters { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.filters button.on { background: #fff; color: #000; border-color: #fff; }

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.timeline li:last-child { border-bottom: 0; }
.timeline .d { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 13px; }
.timeline .past { opacity: 0.5; }
.timeline .soon .d { color: var(--mid); }

.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.tabs button.on { background: #fff; color: #000; border-color: #fff; }
ul.clean { margin: 0; padding-left: 18px; }
ul.clean li { margin: 5px 0; }
.check { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.check:last-child { border-bottom: 0; }
.check input { width: 18px; height: 18px; margin-top: 1px; accent-color: #fff; flex: none; }
.check.done .cn { text-decoration: line-through; color: var(--muted); }
.tag { font-size: 11px; color: var(--muted); border: 1px solid var(--line); border-radius: 99px; padding: 1px 8px; margin-left: 6px; white-space: nowrap; }

.chat { display: flex; flex-direction: column; gap: 12px; margin-bottom: 12px; }
.msg { padding: 12px 14px; border-radius: 12px; white-space: pre-wrap; word-break: break-word; }
.msg.q { align-self: flex-end; background: #fff; color: #000; max-width: 85%; }
.msg.a { border: 1px solid var(--line); background: var(--panel); }
.msg .src { font-size: 11px; color: var(--muted); margin-top: 6px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.ask { display: flex; gap: 8px; }
.ask input { flex: 1; }

.modal { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.7); backdrop-filter: blur(6px); display: grid; place-items: center; z-index: 50; padding: 16px; }
.modal .panel { width: min(760px, 100%); max-height: 90vh; display: flex; flex-direction: column; }
.modal textarea { min-height: 360px; flex: 1; font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 13px; }
#profileForm textarea { min-height: 64px; flex: none; font-family: inherit; font-size: 14px; }
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: #fff; color: #000; padding: 10px 18px; border-radius: 99px; z-index: 60; box-shadow: 0 10px 40px rgba(0,0,0,0.6); max-width: calc(100% - 32px); }
.toast.err { background: var(--high); }
.empty { text-align: center; padding: 36px 12px; color: var(--muted); }
.banner { border: 1px solid rgba(255, 210, 122, 0.35); background: var(--mid-bg); border-radius: 12px; padding: 12px 14px; margin-bottom: 16px; color: var(--mist); }

/* ---------- Проверка под компанию и расчёт выгоды ---------- */
.pcheck { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; border-bottom: 1px solid var(--line); }
.pcheck:last-child { border-bottom: 0; }
.pcheck i { flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 12px; font-weight: 600; }
.pcheck.ok i { background: var(--ok-bg); color: var(--ok); border: 1px solid var(--ok); }
.pcheck.warn i { background: var(--mid-bg); color: var(--mid); border: 1px solid var(--mid); }
.pcheck.fail i { background: var(--high-bg); color: var(--high); border: 1px solid var(--high); }
.fin { display: grid; grid-template-columns: 2fr repeat(3, 1fr) 1.6fr; gap: 12px; align-items: end; }
.fin-out { margin-top: 14px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; }
.kv { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.kv span { color: var(--muted); }
.kv b { font-weight: 500; text-align: right; }
.kv.big b { font-size: 17px; }
.kv.good b { color: var(--ok); }
.kv.bad b { color: var(--high); }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, #9a9a9a 50%), linear-gradient(135deg, #9a9a9a 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 30px; }
select option { background: #121212; }
.banner a, .muted a { color: var(--text); }

/* ---------- Адаптив ---------- */
@media (max-width: 1000px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fin { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fin-out { grid-template-columns: 1fr; }
  .feature-grid { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .layout { grid-template-columns: minmax(0, 1fr); padding: 16px; gap: 16px; }
  .sidebar { position: static; max-height: none; }
  .sidebar .list { max-height: 260px; }
  .grid2 { grid-template-columns: 1fr; }
  .topbar { padding: 10px 16px; gap: 8px; }
  .topbar .hide-sm { display: none; }
  .fin { grid-template-columns: 1fr; }
  .hero h1 { font-size: 30px; }
  .head h1 { font-size: 24px; }
  .verdict { grid-template-columns: 1fr; }
  .facts { grid-template-columns: 1fr; }
  .facts div:nth-child(odd) { border-bottom: 0; padding-bottom: 0; font-size: 12px; }
  .timeline li { grid-template-columns: 1fr; gap: 2px; }
  .panel { padding: 16px; }
}

/* ---------- Печать (Сохранить как PDF) ---------- */
@media print {
  body { background: #fff; color: #000; }
  .topbar, .sidebar, .no-print, .ask, .chips, .filters, .tabs { display: none !important; }
  .layout { display: block; padding: 0; }
  .panel, .kpi, .risk { background: #fff !important; border-color: #ccc; box-shadow: none; break-inside: avoid; }
  .muted, .summary, .risk p, .quote, .kpi span, .facts div:nth-child(odd) { color: #333 !important; }
  .decision.go, .decision.care, .decision.no, .sev { color: #000 !important; }
  [data-tabpane] { display: block !important; }
}

/* ---------- Удобство: экран загрузки ---------- */
.callout { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px 16px; margin: 0 0 16px; border: 1px solid var(--line-2); border-radius: var(--radius); background: var(--panel-2); }
.callout > div { flex: 1; min-width: 220px; display: flex; flex-direction: column; gap: 2px; }
.callout > div span { color: var(--mist); font-size: 13px; }
.callout.warn { border-color: rgba(255, 196, 0, 0.35); background: var(--mid-bg); }
.hero + .callout { margin-top: 16px; }
.steps { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 20px; padding: 0; margin: 0 0 18px; color: var(--mist); font-size: 13px; }
.steps li { display: flex; align-items: center; gap: 8px; }
.steps b { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--line-2); font-size: 12px; color: var(--text); }
.drop { padding: 34px 20px; }
.drop .drop-ico { font-size: 28px; line-height: 1; margin-bottom: 10px; opacity: 0.8; }
.drop u { text-underline-offset: 3px; }
.opts { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: end; margin-top: 16px; }
.toggle { display: flex; align-items: center; gap: 12px; cursor: pointer; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; min-height: 44px; }
.toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.toggle .sw { flex: none; width: 36px; height: 20px; border-radius: 99px; background: var(--line-2); position: relative; transition: background .15s; }
.toggle .sw::after { content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; }
.toggle input:checked + .sw { background: var(--ok); }
.toggle input:checked + .sw::after { transform: translateX(16px); }
.toggle input:focus-visible + .sw { outline: 2px solid #fff; outline-offset: 2px; }
.toggle > span:last-child { display: flex; flex-direction: column; gap: 1px; font-size: 14px; }
.actionbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.actionbar > div { flex: 1; min-width: 180px; }
.btn-lg { padding: 13px 26px; font-size: 15px; }
.btn-link { border-color: transparent; color: var(--mist); text-decoration: underline; text-underline-offset: 3px; }
.btn-link:hover { color: var(--text); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; box-shadow: none; }
.empty-side { display: flex; flex-direction: column; gap: 4px; padding: 14px; border: 1px dashed var(--line-2); border-radius: 12px; font-size: 13px; }
.empty-side span { color: var(--muted); }

/* ---------- Удобство: отчёт ---------- */
.secnav { position: sticky; top: 64px; z-index: 20; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 14px 0 0; padding: 8px 0; background: var(--bg); border-bottom: 1px solid var(--line); }
.secnav::-webkit-scrollbar { display: none; }
.secnav a { flex: none; padding: 6px 12px; border-radius: 99px; font-size: 13px; color: var(--mist); text-decoration: none; border: 1px solid transparent; white-space: nowrap; }
.secnav a:hover { color: var(--text); border-color: var(--line-2); }
.secnav a.on { background: #fff; color: #000; }
main section[id], main div[id^="sec-"] { scroll-margin-top: 130px; }
details.more { position: relative; }
details.more > summary { list-style: none; }
details.more > summary::-webkit-details-marker { display: none; }
details.more .menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; min-width: 200px; display: flex; flex-direction: column; padding: 6px; background: #121212; border: 1px solid var(--line-2); border-radius: 12px; box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6); }
details.more .menu > * { all: unset; box-sizing: border-box; padding: 9px 12px; border-radius: 8px; font-size: 13px; cursor: pointer; color: var(--text); }
details.more .menu > *:hover, details.more .menu > *:focus-visible { background: var(--panel-2); }
details.more .menu .danger { color: var(--high); }

@media (max-width: 860px) {
  .opts { grid-template-columns: 1fr; }
  .actionbar { flex-direction: column; align-items: stretch; }
  .actionbar .btn { width: 100%; }
  .secnav { top: 57px; }
}

/* ---------- Помощь ---------- */
.drawer-wrap { position: fixed; inset: 0; z-index: 50; background: rgba(0, 0, 0, 0.5); display: flex; justify-content: flex-end; }
.drawer { width: min(460px, 100%); height: 100%; background: #0e0e0e; border-left: 1px solid var(--line-2); display: flex; flex-direction: column; }
.drawer-head { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.drawer-head > div { flex: 1; display: flex; flex-direction: column; }
.drawer-body { flex: 1; overflow: auto; padding: 16px 18px; display: flex; flex-direction: column; gap: 14px; }
.hchat { display: flex; flex-direction: column; gap: 8px; max-height: 42vh; overflow: auto; }
.hchat .msg { font-size: 14px; }
.hrel { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.hcats { border-top: 1px solid var(--line); padding-top: 8px; }
.hcat > summary { cursor: pointer; padding: 10px 0; font-weight: 500; }
.hq { margin: 0 0 6px 12px; }
.hq > summary { cursor: pointer; color: var(--mist); font-size: 14px; padding: 4px 0; }
.hq p { margin: 4px 0 10px; font-size: 14px; color: var(--text); line-height: 1.5; }
.hsupport { display: flex; flex-direction: column; gap: 8px; border-top: 1px solid var(--line); padding-top: 14px; }
.hsupport textarea { min-height: 70px; font-family: inherit; font-size: 14px; }
@media (max-width: 860px) { #helpBtn { order: -1; } }
.hlink { margin-left: 8px; font-size: 12px; letter-spacing: 0; text-transform: none; font-weight: 400; color: var(--muted); }
.hsupport.hl { border-top-color: rgba(255, 196, 0, 0.5); }
.hsupport.hl textarea { border-color: rgba(255, 196, 0, 0.5); }

/* ---------- Строгий вид: плоские панели, тонкие линии, малые скругления, табличные цифры ---------- */
:root { --radius: 6px; --panel: #0d0d0d; --panel-2: #141414; --line: #1f1f1f; --line-2: #2c2c2c; --mist: #b8b8b8; }
body { background-image: none; font-size: 14px; font-feature-settings: 'tnum' 1, 'cv11' 1; }
.panel { box-shadow: none; padding: 20px 22px; border-radius: var(--radius); }
.panel h2 { font-size: 11px; letter-spacing: 0.16em; margin-bottom: 12px; }
.btn { border-radius: 4px; padding: 9px 16px; letter-spacing: 0; transition: background 0.15s, border-color 0.15s; }
.btn-mini { border-radius: 4px; }
.btn-primary:hover { box-shadow: none; transform: none; background: #e6e6e6; }
input, textarea, select { border-radius: 4px; background: #0a0a0a; }
.titem { border-radius: 4px; padding: 10px 12px; }
.titem.active { border-color: #4a4a4a; }
.kpi, .risk, .file, .banner, .callout { border-radius: 4px; }
.risk { background: transparent; border-left-width: 2px; }
.risk.high, .risk.medium { background: transparent; }
.sev, .tag { border-radius: 3px; }
.secnav a { border-radius: 3px; }
.head h1, .hero h1 { font-family: Inter, system-ui, sans-serif; font-weight: 600; letter-spacing: -0.01em; }
.hero h1 { font-size: 26px; }
.head h1 { font-size: 22px; line-height: 1.3; }
.decision { font-family: Inter, system-ui, sans-serif; font-weight: 600; font-size: 20px; }
.kpi b { font-size: 16px; font-weight: 600; }
.head .meta { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 8px; font-size: 12px; color: var(--muted); }
.head .meta a { color: var(--mist); text-underline-offset: 3px; }

.eis { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: end; margin-top: 16px; }
.eis .btn { height: 42px; }
.or { display: flex; align-items: center; gap: 12px; margin: 18px 0 12px; color: var(--muted); font-size: 12px; }
.or::before, .or::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.drop { padding: 22px 16px; border-radius: 4px; }
.drop .big { font-size: 14px; margin-bottom: 4px; }
.fi { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--muted); }
.fi.ok { background: var(--ok); } .fi.bad { background: var(--high); }
.fi.wait { background: transparent; border: 1px solid var(--muted); animation: fiPulse 1s ease-in-out infinite alternate; }
@keyframes fiPulse { to { opacity: 0.3; } }
.warn-text { color: var(--mid); }

.facts div { padding: 8px 0; }
.ev { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 8px; vertical-align: 1px; background: var(--muted); flex: none; }
.ev.high { background: var(--ok); } .ev.medium { background: var(--low); } .ev.conflict { background: var(--high); } .ev.low { background: transparent; border: 1px solid var(--muted); }
.ev-src summary { cursor: pointer; list-style: none; }
.ev-src summary::-webkit-details-marker { display: none; }
.ev-src summary:hover { text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; }
.ev-src .quote { margin-top: 6px; }
.legend { margin: 12px 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.legend .ev { margin: 0 2px 0 8px; } .legend .ev:first-child { margin-left: 0; }
@media (max-width: 640px) { .eis { grid-template-columns: 1fr; } .facts { grid-template-columns: 1fr; } .facts div:nth-child(odd) { padding-bottom: 0; border-bottom: 0; } }
#sec-facts { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
@media (max-width: 1100px) { #sec-facts { grid-template-columns: 1fr; } }
.facts { grid-template-columns: minmax(140px, 200px) minmax(0, 1fr); }
.head h1 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------- Поддержка: кнопка и окно в правом нижнем углу ---------- */
.help-fab { position: fixed; right: 20px; bottom: 20px; z-index: 60; width: 52px; height: 52px; border-radius: 50%; border: 1px solid #fff; background: #fff; color: #000; display: grid; place-items: center; cursor: pointer; box-shadow: 0 8px 28px rgba(0, 0, 0, 0.5); transition: transform 0.15s; }
.help-fab:hover { transform: translateY(-1px); }
.help-fab .i-close { display: none; }
.help-fab.open .i-open { display: none; }
.help-fab.open .i-close { display: block; }
.hw { position: fixed; right: 20px; bottom: 84px; z-index: 60; width: min(380px, calc(100vw - 32px)); height: min(580px, calc(100vh - 120px)); }
.hw-panel { height: 100%; display: flex; flex-direction: column; background: #0e0e0e; border: 1px solid var(--line-2); border-radius: 8px; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6); overflow: hidden; animation: hwIn 0.16s ease-out; }
@keyframes hwIn { from { opacity: 0; transform: translateY(8px); } }
.hw-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.hw-head > div { flex: 1; display: flex; flex-direction: column; }
.hw-tabs { display: flex; border-bottom: 1px solid var(--line); }
.hw-tabs button { flex: 1; padding: 10px 0; background: none; border: 0; border-bottom: 2px solid transparent; color: var(--muted); font: inherit; font-size: 13px; cursor: pointer; }
.hw-tabs button.on { color: var(--text); border-bottom-color: #fff; }
.hw-body { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.hw-body > [data-hwpane] { flex: 1; min-height: 0; overflow: auto; padding: 14px 16px; display: flex; flex-direction: column; gap: 12px; }
.hw-body > [data-hwpane][hidden] { display: none; }
.hw-body .hchat { flex: 1; overflow: auto; max-height: none; }
.hw-body .ask { position: sticky; bottom: 0; }
@media (max-width: 520px) { .hw { right: 8px; left: 8px; width: auto; bottom: 80px; } .help-fab { right: 14px; bottom: 14px; } }
@media print { .help-fab, .hw { display: none !important; } }

/* --- Окно поддержки как на сайте Workintelligence (общий вид всех систем) --- */
.hw-panel { width: min(400px, calc(100vw - 32px)); height: min(600px, calc(100vh - 120px)); border-radius: 18px; background: rgba(13,13,13,0.96); border: 1px solid rgba(255,255,255,0.1); box-shadow: 0 24px 80px -24px rgba(0,0,0,0.9); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); overflow: hidden; }
.hw-head { padding: 14px 16px; gap: 12px; border-bottom: 1px solid rgba(255,255,255,0.06); }
.hw-head b { font-size: 14px; font-weight: 600; }
.hwu-on { color: #34d399 !important; font-size: 11.5px; }
.hwu-ava { width: 36px; height: 36px; flex: none; border-radius: 50%; border: 1px solid rgba(255,255,255,0.16); display: grid; place-items: center; }
.hwu-ava i { width: 9px; height: 9px; border-radius: 50%; background: #34d399; box-shadow: 0 0 10px rgba(52,211,153,0.7); }
.hwu-x { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 8px; border: 0; background: none; color: #9a9a9a; cursor: pointer; padding: 0; }
.hwu-x:hover { background: rgba(255,255,255,0.05); color: #fff; }
.hw-tabs { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; margin: 10px 12px 4px; border-bottom: 0; }
.hw-tabs button { border: 0 !important; border-radius: 10px; padding: 9px 10px; font-size: 13px; font-weight: 500; color: #9a9a9a; background: transparent; }
.hw-tabs button.on { background: rgba(255,255,255,0.06); color: #fff; }
.hw-body > [data-hwpane] { padding: 8px 16px 14px; }
.hw .msg.a { border-radius: 16px; padding: 12px 14px; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.06); font-size: 14px; line-height: 1.5; }
.hw .msg.q { border-radius: 16px; padding: 10px 14px; background: #fff; color: #000; border-color: #fff; }
.hw .ask input, .hw textarea { border-radius: 12px !important; padding: 12px 14px !important; background: rgba(255,255,255,0.03) !important; border: 1px solid rgba(255,255,255,0.12) !important; font-size: 14px; }
.hw .ask .btn, .hw #tsend { border-radius: 12px !important; min-width: 46px; background: #fff !important; color: #000 !important; border-color: #fff !important; }
.help-fab { width: 56px; height: 56px; box-shadow: 0 0 24px rgba(255,255,255,0.16), 0 0 60px rgba(255,255,255,0.06); transition: transform 0.3s; }
.help-fab:hover { transform: scale(1.05); }
.hw { width: min(400px, calc(100vw - 32px)); height: min(600px, calc(100vh - 120px)); }
.hw-panel { width: 100%; height: 100%; }
@media (max-width: 520px) { .hw { right: 8px; left: 8px; width: auto; } }

/* ---------- Вид как у сайта Workintelligence: фон «нейросеть» (wi-neural.js), стекло, скругления, свечение ---------- */
html{background-color:#080808;background-image:radial-gradient(1200px 600px at 15% -10%,rgba(255,255,255,.045),transparent 60%),radial-gradient(900px 500px at 100% 0%,rgba(255,255,255,.03),transparent 55%);background-attachment:fixed}
body { background: transparent !important; }
:root { --radius: 16px; --panel: rgba(18, 18, 18, 0.72); --panel-2: rgba(255, 255, 255, 0.05); --line: rgba(255, 255, 255, 0.07); --line-2: rgba(255, 255, 255, 0.12); }
.panel { border-radius: 18px; border-color: rgba(255, 255, 255, 0.06); background: rgba(18, 18, 18, 0.72); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); box-shadow: 0 24px 80px -40px rgba(0, 0, 0, 0.95); }
.panel h2 { font-size: 11px; letter-spacing: 0.16em; }
.btn { border-radius: 12px; padding: 10px 18px; transition: background 0.3s, border-color 0.3s, box-shadow 0.3s, transform 0.3s; }
.btn-mini { border-radius: 10px; }
.btn-primary:hover { background: #fff; box-shadow: 0 0 24px rgba(255, 255, 255, 0.16), 0 0 60px rgba(255, 255, 255, 0.06); transform: translateY(-1px); }
.btn-ghost:hover { border-color: rgba(255, 255, 255, 0.25); background: rgba(255, 255, 255, 0.05); }
input, textarea, select { border-radius: 12px; background: rgba(255, 255, 255, 0.03); }
input:focus, textarea:focus, select:focus { border-color: rgba(255, 255, 255, 0.35); box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.06); }
.titem { border-radius: 12px; }
.secnav { background: rgba(8, 8, 8, 0.82); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.secnav a.on { border-radius: 99px; }
.topbar, header.topbar { background: rgba(8, 8, 8, 0.72); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }

/* ---------- Wi Документы: разделы и отчёты договоров, КП, протоколов ---------- */
.kinds { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 0 0 22px; }
.kind { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 10px; row-gap: 3px; align-items: center; text-align: left; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.02); color: var(--mist); cursor: pointer; transition: border-color .25s, background .25s, color .25s; font: inherit; }
.kind svg { grid-row: span 2; opacity: .75; }
.kind b { font-weight: 500; color: var(--text, #f2f2f2); font-size: 14px; }
.kind span { font-size: 12px; color: var(--muted); line-height: 1.35; }
.kind:hover { border-color: rgba(255, 255, 255, 0.18); background: rgba(255, 255, 255, 0.04); }
.kind.on { border-color: rgba(255, 255, 255, 0.5); background: rgba(255, 255, 255, 0.07); box-shadow: 0 0 24px rgba(255, 255, 255, 0.06); }
.kind.on svg { opacity: 1; }
@media (max-width: 900px) { .kinds { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .kinds { grid-template-columns: 1fr; } .kind span { display: none; } .kind svg { grid-row: auto; } }
.kindtag { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.kmini { display: inline-flex; align-items: center; gap: 4px; }
.topics { display: grid; gap: 8px; }
.topic { border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; background: rgba(255, 255, 255, 0.02); }
.topic summary { display: flex; align-items: center; gap: 10px; cursor: pointer; list-style: none; flex-wrap: wrap; }
.topic summary::-webkit-details-marker { display: none; }
.topic summary i { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 12px; flex: none; }
.topic summary b { font-weight: 500; flex: 1; min-width: 160px; }
.topic summary span { font-size: 12px; color: var(--muted); }
.topic.ok summary i { background: var(--ok-bg); color: var(--ok); }
.topic.warn summary i { background: var(--mid-bg); color: var(--mid); }
.topic.fail summary i { background: var(--high-bg); color: var(--high); }
.topic.absent summary i { background: rgba(255, 255, 255, 0.05); color: var(--muted); }
.topic.fail { border-color: rgba(255, 138, 128, 0.25); }
.topic p { margin: 8px 0 0; color: var(--mist); }
.fix { margin-top: 10px; padding: 10px 12px; border-radius: 10px; border: 1px dashed rgba(142, 230, 176, 0.35); background: var(--ok-bg); }
.fix p { margin: 6px 0 0; }
.stage { padding: 12px 0; border-bottom: 1px solid var(--line); }
.stage:last-child { border-bottom: 0; }
.tbl { width: 100%; border-collapse: collapse; margin-top: 8px; font-size: 14px; }
.tbl th { text-align: left; font-weight: 500; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding: 6px 8px; border-bottom: 1px solid var(--line); }
.tbl td { padding: 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl .num { text-align: right; white-space: nowrap; }
.tbl tr.sub td { color: var(--mist); }
.tbl tr.total td { font-weight: 600; font-size: 16px; border-bottom: 0; }
.tbl .hrs { width: 72px; text-align: right; padding: 4px 8px; }
.tag.ok { color: var(--ok); border-color: rgba(142, 230, 176, .3); }
.tag.bad { color: var(--high); border-color: rgba(255, 138, 128, .3); }
#mailText { width: 100%; min-height: 240px; }
@media (max-width: 640px) { .tbl { font-size: 13px; } .tbl td, .tbl th { padding: 6px 4px; } }
@media (max-width: 640px) { .tbl.price th:nth-child(3), .tbl.price td:nth-child(3) { display: none; } .tbl { table-layout: auto; word-break: break-word; } .row { flex-wrap: wrap; } }
main { min-width: 0; }
