/* Coach AI — оформление по гайду SuperJob:
   только цвета палитры, Akzidenz-Grotesk Pro (запасной Arial), без теней и градиентов,
   скругления: текстовые карточки 24, акцентные карточки — крупные, теги и кнопки — пилюли. */

:root {
  --white: #ffffff;
  --text: #3e3e3e;
  --line: #e3e7eb;
  --red: #d40e1e;
  --green: #00aa6d;
  --green-dark: #00744a;
  --mint: #d1fff1;
  --c3: #29cc92;
  --c5: #dcede9;
  --c6: #8cfb88;
  --soft: #f5f6f7;
  --table: #4a4a4a;

  --font: 'Akzidenz-Grotesk Pro', 'AkzidenzGroteskPro', Arial, Helvetica, sans-serif;
  --font-ext: 'Akzidenz-Grotesk Pro Ext', 'AkzidenzGroteskPro-BoldEx', 'Akzidenz-Grotesk Pro', 'Arial Black', Arial, sans-serif;
  --font-num: Roboto, 'Akzidenz-Grotesk Pro', Arial, sans-serif;

  --r-sm: 16px;
  --r: 24px;
  --r-lg: 40px;
  --pill: 999px;
  --gap: 24px;
  --wrap: 1200px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  color: var(--text);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; }
a { color: var(--green-dark); }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; line-height: 1.15; font-weight: 700; }
p { margin: 0; }
.muted { color: var(--table); }
.small { font-size: 14px; }
.ext { font-family: var(--font-ext); font-weight: 900; font-stretch: expanded; letter-spacing: -0.01em; }
.accent { color: var(--green); }
.neg { color: var(--red); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 32px; }

/* ---------- Шапка ---------- */
.top {
  position: sticky; top: 0; z-index: 20;
  background: var(--white);
  border-bottom: 1px solid var(--line);
}
.top .wrap { display: flex; align-items: center; gap: 24px; height: 72px; }
.brand { display: flex; align-items: center; gap: 16px; text-decoration: none; color: var(--text); }
.brand .logo { width: 116px; height: auto; color: var(--green); }
.brand .divider { width: 1px; height: 28px; background: var(--line); }
.brand b { font-size: 18px; display: block; line-height: 1.1; }
.brand small { font-size: 13px; color: var(--table); display: block; }
.nav { display: flex; gap: 4px; margin-left: auto; }
.nav a {
  text-decoration: none; color: var(--text);
  padding: 8px 16px; border-radius: var(--pill); font-weight: 500;
}
.nav a:hover { background: var(--soft); }
.nav a.on { background: var(--mint); color: var(--green-dark); }
.nav .short { display: none; }
.who {
  display: inline-flex; align-items: center; gap: 8px;
  border: 2px solid var(--line); background: var(--white);
  border-radius: var(--pill); padding: 6px 14px 6px 8px; cursor: pointer;
}
.who:hover { border-color: var(--green); }
.who .ava {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--green); color: var(--white);
  display: grid; place-items: center; font-weight: 700; font-size: 13px;
}

main.wrap { padding-top: 32px; padding-bottom: 80px; min-height: calc(100vh - 140px); }
.foot { border-top: 1px solid var(--line); padding: 20px 0; font-size: 13px; color: var(--table); }
.foot .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* ---------- Кнопки, теги ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 24px;
  border-radius: var(--pill); border: 2px solid transparent;
  font-weight: 700; font-size: 16px; line-height: 1;
  cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background .15s, color .15s, border-color .15s;
}
.btn:focus-visible, .chip:focus-visible, .card:focus-visible, .seg button:focus-visible { outline: 3px solid var(--c6); outline-offset: 2px; }
.btn-primary { background: var(--green); color: var(--white); }
.btn-primary:hover { background: var(--green-dark); }
.btn-outline { border-color: var(--green); color: var(--green-dark); background: var(--white); }
.btn-outline:hover { background: var(--mint); }
.btn-ghost { background: transparent; color: var(--text); }
.btn-ghost:hover { background: var(--soft); }
.btn-white { background: var(--white); color: var(--green-dark); }
.btn-white:hover { background: var(--mint); }
.btn-line-white { border-color: var(--white); color: var(--white); background: transparent; }
.btn-line-white:hover { background: var(--white); color: var(--green-dark); }
.btn-lg { min-height: 60px; padding: 0 32px; font-size: 18px; }
.btn-sm { min-height: 40px; padding: 0 18px; font-size: 15px; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }

.tag {
  display: inline-flex; align-items: center; gap: 6px;
  height: 30px; padding: 0 14px;
  border-radius: var(--pill); border: 2px solid var(--green);
  font-size: 13px; font-weight: 500; color: var(--text); white-space: nowrap;
}
.tag-fill { background: var(--green); color: var(--white); }
.tag-mint { border-color: var(--mint); background: var(--mint); color: var(--green-dark); }
.tag-red { border-color: var(--red); color: var(--red); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  height: 40px; padding: 0 18px; border-radius: var(--pill);
  border: 2px solid var(--green); background: var(--white); color: var(--text);
  cursor: pointer; font-weight: 500;
}
.chip.on, .chip:hover { background: var(--green); color: var(--white); }

/* ---------- Главная ---------- */
.hero {
  background: var(--green); color: var(--white);
  border-radius: var(--r-lg);
  padding: 56px;
  display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 40px; align-items: end;
}
.hero .eyebrow { font-size: 14px; letter-spacing: .08em; text-transform: uppercase; font-weight: 700; opacity: .95; }
.hero h1 { font-size: clamp(36px, 5vw, 64px); margin: 14px 0 18px; line-height: 1.02; }
.hero p.lead { font-size: 19px; max-width: 560px; }
.hero .actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.kpis { display: grid; gap: 12px; }
.kpi {
  background: var(--mint); color: var(--green-dark);
  border-radius: var(--r-lg); padding: 18px 28px;
  display: flex; align-items: baseline; gap: 16px;
}
.kpi b { font-size: 44px; line-height: 1; }
.kpi span { font-size: 15px; line-height: 1.3; }

.section { margin-top: 56px; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 24px; flex-wrap: wrap; }
.section-head h2 { font-size: 32px; }
.section-head p { margin-top: 6px; }

.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); }
.step {
  border: 2px solid var(--line); border-radius: var(--r);
  padding: 24px; display: flex; gap: 16px; align-items: flex-start;
}
.num {
  flex: none; width: 44px; height: 44px; border-radius: 50%;
  background: var(--green); color: var(--white);
  display: grid; place-items: center;
  font-family: var(--font-num); font-weight: 700; font-size: 20px;
}
.step h3 { font-size: 18px; margin-bottom: 4px; }

.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); }
.card {
  position: relative;
  display: flex; flex-direction: column; gap: 14px;
  border: 2px solid var(--line); border-radius: var(--r);
  padding: 24px; background: var(--white);
  text-align: left; cursor: pointer; text-decoration: none; color: inherit;
  transition: border-color .15s;
}
.card:hover { border-color: var(--green); }
.card .row { display: flex; justify-content: space-between; align-items: center; gap: 8px 12px; flex-wrap: wrap; }
.card .share { font-family: var(--font-ext); font-weight: 900; color: var(--green-dark); font-size: 15px; white-space: nowrap; }
.card h3 { font-size: 22px; }
.card .q { display: flex; gap: 10px; color: var(--table); font-size: 15px; flex: 1; }
.card .q .ic { flex: none; color: var(--green); margin-top: 2px; }
.card .meta { display: flex; justify-content: space-between; align-items: center; gap: 12px; border-top: 1px solid var(--line); padding-top: 14px; font-size: 14px; color: var(--table); }
.card .go { display: inline-flex; align-items: center; gap: 6px; color: var(--green-dark); font-weight: 700; }
.card.random { background: var(--mint); border-color: var(--mint); }
.card.random:hover { border-color: var(--green); }

.note {
  display: flex; gap: 14px; align-items: flex-start;
  border-radius: var(--r); padding: 20px 24px;
  border: 2px solid var(--green); background: var(--white);
}
.note .ic { flex: none; color: var(--green-dark); margin-top: 1px; }
.note.mint { background: var(--mint); border-color: var(--mint); }

/* ---------- Бриф ---------- */
.back { display: inline-flex; align-items: center; gap: 6px; color: var(--text); text-decoration: none; font-weight: 500; margin-bottom: 20px; }
.back:hover { color: var(--green-dark); }
.brief { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 40px; align-items: start; }
.brief h1 { font-size: clamp(32px, 4vw, 48px); margin: 14px 0 8px; }
.brief .sub { font-size: 18px; }
.block { margin-top: 28px; }
.block h3 { font-size: 15px; letter-spacing: .06em; text-transform: uppercase; color: var(--green-dark); margin-bottom: 8px; }
.block p { font-size: 18px; }
.lineup { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.lineup li { position: relative; padding-left: 34px; }
.lineup li::before {
  content: ''; position: absolute; left: 0; top: 3px;
  width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--green);
}
.lineup li::after {
  content: ''; position: absolute; left: 6px; top: 9px;
  width: 8px; height: 8px; border-radius: 50%; background: var(--green);
}
.lineup b { display: block; }
.lineup span { color: var(--table); font-size: 15px; }
.quote-card { background: var(--mint); color: var(--green-dark); border-radius: var(--r-lg); padding: 28px 32px; }
.quote-card p { font-size: 20px; font-weight: 500; color: var(--text); margin-top: 8px; }
.quote-card small { display: block; margin-top: 10px; font-size: 14px; }

.panel {
  position: sticky; top: 96px;
  border: 2px solid var(--green); border-radius: var(--r);
  padding: 28px; display: grid; gap: 22px; background: var(--white);
}
.panel h2 { font-size: 22px; }
.field { display: grid; gap: 8px; }
.field > span { font-weight: 700; font-size: 15px; }
.seg { display: flex; gap: 6px; flex-wrap: wrap; }
.seg button {
  flex: 1; min-width: 90px; height: 44px; border-radius: var(--pill);
  border: 2px solid var(--green); background: var(--white); cursor: pointer; font-weight: 500;
}
.seg button.on { background: var(--green); color: var(--white); }
.hint { font-size: 14px; color: var(--table); }
.meter { height: 10px; border-radius: var(--pill); background: var(--line); overflow: hidden; }
.meter i { display: block; height: 100%; width: 0; background: var(--green); border-radius: var(--pill); transition: width .08s; }
.miccheck { display: flex; align-items: center; gap: 12px; }
.miccheck .meter { flex: 1; }
.tips { display: grid; gap: 10px; font-size: 14px; color: var(--table); }
.tips div { display: flex; gap: 10px; align-items: flex-start; }
.tips .ic { flex: none; color: var(--green-dark); }
input[type=text], input[type=password], textarea {
  width: 100%; border: 2px solid var(--line); border-radius: var(--r-sm);
  padding: 12px 16px; background: var(--white); outline: none;
}
input:focus, textarea:focus { border-color: var(--green); }

/* ---------- Звонок ---------- */
.call { max-width: 760px; margin: 0 auto; text-align: center; }
.call-top { display: flex; justify-content: space-between; align-items: center; gap: 16px; text-align: left; }
.call-top h1 { font-size: 22px; }
.timer { font-size: 40px; line-height: 1; color: var(--text); }
.stage { position: relative; height: 300px; display: grid; place-items: center; margin: 24px 0 8px; }
.ring {
  position: absolute; width: 190px; height: 190px; border-radius: 50%;
  border: 2px solid var(--green); opacity: 0; transform: scale(1);
  transition: transform .09s linear, opacity .2s;
}
.ring.r2 { border-color: var(--c3); }
.avatar {
  position: relative; width: 190px; height: 190px; border-radius: 50%;
  background: var(--mint); color: var(--green-dark);
  display: grid; place-items: center; text-align: center;
}
.avatar .ic { margin: 0 auto 6px; }
.avatar b { font-size: 15px; display: block; line-height: 1.25; padding: 0 22px; }
.status { font-size: 18px; font-weight: 500; min-height: 28px; }
.status.err { color: var(--red); }
.you { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 14px; color: var(--table); font-size: 14px; }
.you .meter { width: 180px; }
.controls { display: flex; justify-content: center; gap: 20px; margin-top: 32px; }
.round {
  width: 68px; height: 68px; border-radius: 50%; display: grid; place-items: center;
  border: 2px solid var(--green); background: var(--white); color: var(--green-dark); cursor: pointer;
}
.round:hover { background: var(--mint); }
.round.on { background: var(--green); color: var(--white); }
.round.hang { width: 84px; height: 84px; border-color: var(--red); background: var(--red); color: var(--white); }
.round.hang:hover { background: #b10b19; border-color: #b10b19; }
.round[disabled] { opacity: .45; cursor: not-allowed; }
.round-label { display: block; font-size: 13px; color: var(--table); margin-top: 8px; }
.ctl { display: flex; flex-direction: column; align-items: center; }
.subs {
  margin-top: 32px; text-align: left;
  border: 2px solid var(--line); border-radius: var(--r);
  padding: 20px; max-height: 340px; overflow: auto;
}
.subs:empty::before { content: 'Здесь появится текст разговора.'; color: var(--table); }
.line { display: grid; grid-template-columns: 96px 1fr; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.line:last-child { border-bottom: 0; }
.line .who-l { font-size: 13px; font-weight: 700; color: var(--green-dark); text-transform: uppercase; letter-spacing: .04em; padding-top: 2px; }
.line.mgr .who-l { color: var(--text); }
.line .t { font-size: 12px; color: var(--table); display: block; font-weight: 400; }
.line.pending p { color: var(--table); }
.composer { display: flex; gap: 10px; margin-top: 14px; }
.composer textarea { resize: none; height: 56px; }
.call .tipline { margin-top: 18px; font-size: 14px; color: var(--table); }
.call.is-text .stage { height: 150px; margin: 12px 0 0; }
.call.is-text .avatar, .call.is-text .ring { width: 120px; height: 120px; }
.call.is-text .avatar b { font-size: 13px; padding: 0 12px; }
.call.is-text .controls { margin-top: 16px; }
.call.is-text .subs { margin-top: 20px; max-height: 46vh; }
.call.is-text .round.hang { width: 64px; height: 64px; }

/* ---------- Разбор ---------- */
.result-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: var(--gap); align-items: stretch; }
.score {
  background: var(--mint); color: var(--green-dark);
  border-radius: var(--r-lg); padding: 32px 40px;
  display: flex; flex-direction: column; justify-content: center;
}
.score .big { font-size: 96px; line-height: .95; }
.score .big small { font-size: 44px; }
.score .lbl { font-size: 18px; margin-top: 8px; }
.summary-card { border: 2px solid var(--green); border-radius: var(--r-lg); padding: 32px 40px; display: grid; gap: 14px; align-content: center; }
.summary-card h1 { font-size: 30px; }
.summary-card .tags { display: flex; gap: 8px; flex-wrap: wrap; }
.crit { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap); }
.crit-card { border: 2px solid var(--line); border-radius: var(--r); padding: 22px 24px; display: grid; gap: 8px; align-content: start; }
.crit-card.ok { border-color: var(--green); }
.crit-card .hd { display: flex; align-items: center; gap: 12px; }
.mark { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; flex: none; }
.mark.ok { background: var(--green); color: var(--white); }
.mark.no { border: 2px solid var(--red); color: var(--red); }
.crit-card h3 { font-size: 18px; }
.crit-card .cq { color: var(--table); font-size: 15px; border-left: 3px solid var(--c5); padding-left: 12px; }
.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap); }
.err-card { border: 2px solid var(--red); border-radius: var(--r); padding: 22px 24px; }
.err-card h3 { color: var(--red); font-size: 15px; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 6px; }
.err-card p { font-size: 20px; font-weight: 700; }
.howto { background: var(--mint); border-radius: var(--r); padding: 22px 24px; }
.howto h3 { color: var(--green-dark); font-size: 15px; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 6px; }
.howto p { font-size: 18px; }
.box { border: 2px solid var(--line); border-radius: var(--r); padding: 24px; }
.box h2 { font-size: 22px; margin-bottom: 16px; }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.metric { border: 2px solid var(--green); border-radius: var(--r-lg); padding: 18px 22px; text-align: center; }
.metric b { font-size: 34px; line-height: 1.05; display: block; color: var(--text); }
.metric span { font-size: 14px; color: var(--table); }
.metric.warn b { color: var(--red); }
details.tr summary { cursor: pointer; font-weight: 700; list-style: none; display: flex; align-items: center; gap: 8px; }
details.tr summary::-webkit-details-marker { display: none; }
details.tr summary::after { content: '+'; margin-left: auto; font-size: 22px; color: var(--green-dark); }
details.tr[open] summary::after { content: '−'; }
details.tr .subs { margin-top: 16px; max-height: none; }
.actions-row { display: flex; gap: 12px; flex-wrap: wrap; }
.loader { text-align: center; padding: 80px 0; }
.dots { display: inline-flex; gap: 8px; margin-top: 18px; }
.dots i { width: 12px; height: 12px; border-radius: 50%; background: var(--green); animation: pulse 1s infinite ease-in-out; }
.dots i:nth-child(2) { animation-delay: .15s; }
.dots i:nth-child(3) { animation-delay: .3s; }
@keyframes pulse { 0%, 100% { opacity: .25; transform: scale(.8); } 50% { opacity: 1; transform: scale(1); } }

/* ---------- Мои результаты ---------- */
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.bars { display: grid; gap: 14px; }
.bar-row { display: grid; grid-template-columns: 220px 1fr 64px; gap: 16px; align-items: center; }
.bar-track { height: 36px; border-radius: var(--pill); background: var(--white); border: 2px solid var(--green); overflow: hidden; }
.bar-track i { display: block; height: 100%; background: var(--green); border-radius: var(--pill); min-width: 0; }
.bar-row b { font-family: var(--font-ext); font-weight: 900; font-size: 18px; text-align: right; }
table { width: 100%; border-collapse: collapse; font-size: 15px; color: var(--table); }
th { text-align: left; font-weight: 500; color: var(--text); padding: 10px 12px; border-bottom: 2px solid var(--line); }
td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
tr.click { cursor: pointer; }
tr.click:hover td { background: var(--soft); }
.table-wrap { overflow-x: auto; border: 2px solid var(--line); border-radius: var(--r-sm); }
.empty { text-align: center; padding: 48px 24px; }
.empty h2 { font-size: 24px; margin-bottom: 8px; }

/* ---------- Модальное окно и уведомления ---------- */
.modal-wrap { position: fixed; inset: 0; background: rgba(62, 62, 62, .45); display: grid; place-items: center; z-index: 50; padding: 20px; }
.modal { background: var(--white); border-radius: var(--r); padding: 32px; width: min(460px, 100%); display: grid; gap: 16px; }
.modal h2 { font-size: 24px; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; }
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px);
  background: var(--white); border: 2px solid var(--green); color: var(--text);
  border-radius: var(--r-sm); padding: 14px 20px; max-width: min(560px, calc(100% - 32px));
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 60; font-weight: 500;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast-error { border-color: var(--red); }

/* ---------- Адаптив ---------- */
@media (max-width: 1024px) {
  .hero { grid-template-columns: minmax(0, 1fr); padding: 40px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .brief { grid-template-columns: minmax(0, 1fr); }
  .panel { position: static; }
  .result-head { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 720px) {
  .wrap { padding-left: 18px; padding-right: 18px; }
  main.wrap { padding-top: 20px; }
  .brand > span:last-child { display: none; }
  .top .wrap { height: 64px; gap: 12px; }
  .brand .logo { width: 92px; }
  .brand small, .brand .divider { display: none; }
  .nav a { padding: 8px 10px; font-size: 14px; white-space: nowrap; }
  .nav .long { display: none; }
  .nav .short { display: inline; }
  .who span:not(.ava) { display: none; }
  .who { padding: 4px; }
  .hero { padding: 28px; border-radius: var(--r); }
  .kpi { border-radius: var(--r); }
  .steps, .grid, .crit, .two, .stats { grid-template-columns: minmax(0, 1fr); }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero h1 { font-size: 34px; }
  .section-head h2 { font-size: 26px; }
  .call-top h1 { font-size: 18px; }
  .timer { font-size: 30px; }
  .bar-row { grid-template-columns: 1fr 52px; }
  .bar-row span { grid-column: 1 / -1; }
  .score .big { font-size: 72px; }
  .stage { height: 250px; }
  .avatar, .ring { width: 160px; height: 160px; }
  .line { grid-template-columns: 1fr; gap: 2px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
