/* ОСФ — страница персонального финансового советника */

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* Header */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  border-bottom: 1px solid transparent;
  transition: background .35s, border-color .35s, backdrop-filter .35s;
}
.nav.scrolled {
  background: rgba(11,15,19,.86); border-bottom-color: var(--line);
  backdrop-filter: blur(18px) saturate(1.2); -webkit-backdrop-filter: blur(18px) saturate(1.2);
}
.nav-in {
  max-width: var(--maxw); margin: 0 auto; padding: 0 var(--pad); height: 80px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.nav-links { display: flex; gap: 18px; align-items: center; }
.nav-links a { font-size: 13px; font-weight: 500; color: var(--text-2); transition: color .2s; position:relative; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--gold-bright); }
.nav-right { display: flex; align-items: center; gap: 20px; }
.nav-phone { font-size: 14.5px; font-weight: 600; color: var(--text); }
.nav-phone small { display: block; color: var(--muted); font-size: 10.5px; letter-spacing: .09em; text-transform: uppercase; }
.nav-burger { display: none; }

/* Hero */
.advisor-hero {
  min-height: 100vh; padding: 126px 0 78px; position: relative; overflow: hidden;
  background:
    radial-gradient(100% 75% at 78% 18%, rgba(201,162,90,.10), transparent 48%),
    radial-gradient(82% 76% at 8% 100%, rgba(31,55,78,.32), transparent 56%),
    var(--bg);
}
.advisor-atmos {
  position: absolute; inset: 0; pointer-events: none; opacity: .25;
  background-image:
    linear-gradient(rgba(201,162,90,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(201,162,90,.04) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(circle at 70% 40%, black, transparent 72%);
}
.advisor-watermark { font-size: 540px; line-height: 1; right: -70px; bottom: -130px; opacity: .022; }
.advisor-hero-grid {
  position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0,.82fr) minmax(560px,1.18fr);
  gap: clamp(46px,6vw,90px); align-items: center;
}
.advisor-intro { max-width: 540px; }
.advisor-intro .h1 { font-size: clamp(42px,4.8vw,70px); margin: 22px 0 24px; }
.advisor-intro .h1 em { color: var(--gold-bright); font-style: italic; }
.advisor-intro .lead { margin: 0; }
.advisor-topic-context {
  display: inline-flex;
  margin: 18px 0 0;
  padding: 9px 13px;
  border: 1px solid var(--gold-line);
  border-radius: 999px;
  background: var(--gold-soft);
  color: var(--gold-bright);
  font-size: 12px;
  font-weight: 600;
}
.advisor-promises {
  display: grid; grid-template-columns: repeat(3,1fr); gap: 1px; margin-top: 38px;
  border: 1px solid var(--line); background: var(--line); border-radius: var(--r-lg); overflow: hidden;
}
.advisor-promises div { padding: 18px 16px; background: rgba(13,18,24,.78); }
.advisor-promises b { display: block; color: var(--gold-bright); font-family: var(--font-display); font-size: 21px; font-weight: 500; }
.advisor-promises span { display: block; color: var(--muted); font-size: 11.5px; line-height: 1.35; margin-top: 5px; }
.privacy-note {
  display: flex; gap: 12px; margin-top: 22px; color: var(--muted); font-size: 12.5px; line-height: 1.5;
}
.privacy-note svg { width: 22px; height: 22px; flex: none; stroke: var(--gold); fill: none; stroke-width: 1.25; }

/* Advisor shell */
.advisor-shell {
  height: min(720px, calc(100vh - 150px)); min-height: 610px;
  display: flex; flex-direction: column; position: relative; overflow: hidden;
  background: linear-gradient(180deg, rgba(21,29,38,.97), rgba(10,15,20,.98));
  border: 1px solid var(--gold-line); border-radius: 24px;
  box-shadow: 0 50px 110px -45px rgba(0,0,0,.95), 0 0 60px -35px rgba(201,162,90,.28);
}
.advisor-shell::before {
  content: ""; position: absolute; top: 0; left: 34px; right: 34px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-bright), transparent); opacity: .75;
}
.advisor-shell-top {
  min-height: 74px; padding: 16px 22px; display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--line); background: rgba(255,255,255,.012);
}
.advisor-identity { display: flex; align-items: center; gap: 12px; }
.advisor-avatar {
  width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid var(--gold-line); background: var(--gold-soft); color: var(--gold-bright);
  font-family: var(--font-display); font-weight: 600; font-size: 13px;
}
.advisor-identity b { display: block; font-size: 14.5px; color: var(--text); }
.advisor-identity span { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 11.5px; }
.advisor-identity i { width: 6px; height: 6px; border-radius: 50%; background: #70b88a; box-shadow: 0 0 0 3px rgba(112,184,138,.12); }
.advisor-reset { border: 0; background: transparent; color: var(--muted); font: inherit; font-size: 12px; padding: 8px; }
.advisor-reset:hover { color: var(--gold-bright); }

.advisor-progress { padding: 13px 22px 11px; border-bottom: 1px solid var(--line); }
.advisor-progress-meta { display: flex; justify-content: space-between; gap: 16px; color: var(--muted); font-size: 11px; letter-spacing: .05em; }
.advisor-progress-meta b { color: var(--gold-bright); font-variant-numeric: tabular-nums; }
.advisor-progress-track { height: 3px; margin-top: 8px; overflow: hidden; border-radius: 9px; background: rgba(255,255,255,.06); }
.advisor-progress-track span { display: block; width: 0; height: 100%; background: linear-gradient(90deg,var(--gold-deep),var(--gold-bright)); transition: width .4s ease; }
.advisor-blocks { display: grid; grid-template-columns: repeat(6,1fr); gap: 5px; margin-top: 9px; }
.advisor-blocks i { height: 2px; border-radius: 4px; background: rgba(255,255,255,.07); }
.advisor-blocks i.done { background: var(--gold-deep); }
.advisor-blocks i.active { background: var(--gold-bright); box-shadow: 0 0 10px rgba(227,196,131,.35); }

.advisor-chat {
  flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 25px 22px;
  scrollbar-color: rgba(201,162,90,.28) transparent; scrollbar-width: thin;
}
.advisor-chat::-webkit-scrollbar { width: 5px; }
.advisor-chat::-webkit-scrollbar-thumb { background: rgba(201,162,90,.25); border-radius: 9px; }
.chat-row { display: flex; gap: 10px; margin: 0 0 18px; animation: chatIn .35s cubic-bezier(.2,.7,.3,1) both; }
.chat-row.user { justify-content: flex-end; }
.chat-bot-mark {
  width: 27px; height: 27px; flex: none; margin-top: 2px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid var(--gold-line); color: var(--gold); font-family: var(--font-display); font-size: 8px;
}
.chat-bubble {
  max-width: 83%; padding: 13px 15px; border: 1px solid var(--line); border-radius: 4px 15px 15px 15px;
  background: rgba(255,255,255,.035); color: var(--text-2); font-size: 14px; line-height: 1.55;
}
.chat-row.user .chat-bubble {
  border-radius: 15px 4px 15px 15px; border-color: rgba(201,162,90,.22);
  background: rgba(201,162,90,.11); color: var(--text);
}
.chat-bubble p { margin: 0; }
.chat-bubble p + p { margin-top: 9px; }
.chat-bubble b { color: var(--text); }
.chat-bubble .chat-kicker { display: block; color: var(--gold); font-size: 10px; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; margin-bottom: 7px; }
.chat-summary { display: grid; gap: 7px; margin-top: 11px; }
.chat-summary div { padding: 8px 10px; background: rgba(0,0,0,.16); border-radius: 7px; }
.chat-summary dt { color: var(--muted); font-size: 10.5px; }
.chat-summary dd { margin: 2px 0 0; color: var(--text-2); font-size: 12.5px; }
.chat-thinking { display: flex; gap: 5px; padding: 8px 2px; }
.chat-thinking i { width: 6px; height: 6px; border-radius: 50%; background: var(--gold); animation: think 1.1s infinite; }
.chat-thinking i:nth-child(2) { animation-delay: .16s; }.chat-thinking i:nth-child(3) { animation-delay: .32s; }

.advisor-compose { flex: none; border-top: 1px solid var(--line); background: rgba(8,12,16,.88); }
.advisor-start { padding: 20px 22px 22px; }
.advisor-start .btn { width: 100%; margin-top: 16px; }
.advisor-start > p { margin: 10px 0 0; color: var(--muted-2); font-size: 11px; text-align: center; }
.advisor-consent { display: flex; gap: 11px; align-items: flex-start; cursor: pointer; color: var(--muted); font-size: 11.5px; line-height: 1.45; }
.advisor-consent input {
  appearance: none; -webkit-appearance: none; flex: none; width: 19px; height: 19px; margin: 1px 0 0;
  border: 1px solid var(--line-2); border-radius: 5px; background: rgba(255,255,255,.03); position: relative;
}
.advisor-consent input:checked { background: var(--gold); border-color: var(--gold); }
.advisor-consent input:checked::after { content: ""; position: absolute; left: 6px; top: 2px; width: 5px; height: 10px; border: solid #0c1117; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.advisor-consent a { color: var(--gold-bright); text-decoration: underline; text-underline-offset: 2px; }
.advisor-consent.invalid input { border-color: #d9694e; box-shadow: 0 0 0 3px rgba(217,105,78,.12); }

.advisor-answer { padding: 12px 14px 13px; }
.advisor-answer textarea, .advisor-editor textarea, .advisor-editor select {
  width: 100%; border: 0; resize: none; background: transparent; color: var(--text); font: inherit; font-size: 14px; line-height: 1.5;
}
.advisor-answer textarea { min-height: 45px; max-height: 118px; padding: 6px 7px; }
.advisor-answer textarea::placeholder { color: var(--muted-2); }
.advisor-answer textarea:focus { outline: none; }
.advisor-answer-actions { display: flex; align-items: center; gap: 10px; padding: 5px 3px 0; }
.advisor-back { border: 0; background: transparent; color: var(--muted); font: inherit; font-size: 11.5px; padding: 6px 4px; }
.advisor-back:hover { color: var(--gold-bright); }
.advisor-enter-hint { margin-left: auto; color: var(--muted-2); font-size: 10px; }
.advisor-send {
  width: 36px; height: 36px; flex: none; border: 0; border-radius: 50%; display: grid; place-items: center;
  background: linear-gradient(135deg,var(--gold-bright),var(--gold)); color: #151009;
}
.advisor-send svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.advisor-error { min-height: 0; margin: 4px 7px 0; color: #ef8b72; font-size: 11.5px; }

.advisor-confirm, .advisor-finish-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 16px 18px; }
.advisor-confirm .btn, .advisor-finish-actions .btn { padding: 14px 16px; font-size: 13px; }
.advisor-finish-note { grid-column:1 / -1; margin:0 0 4px; color:var(--text-2); font-size:12px; line-height:1.45; }
.advisor-editor { padding: 15px 18px 18px; }
.advisor-editor label { display: block; color: var(--muted); font-size: 10px; letter-spacing: .11em; text-transform: uppercase; margin: 0 0 6px; }
.advisor-editor select, .advisor-editor textarea {
  border: 1px solid var(--line); background: var(--surface); border-radius: 8px; padding: 10px 12px; margin-bottom: 12px;
}
.advisor-editor select { color-scheme: dark; }
.advisor-editor > div { display: flex; gap: 9px; }

.chat-report { max-width: 100%; }
.report-head { padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.report-head h3 { font-family: var(--font-display); font-size: 23px; font-weight: 500; color: var(--text); margin: 3px 0 5px; }
.report-kpis { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; margin: 14px 0; }
.report-kpis div { padding: 11px; border: 1px solid var(--line); border-radius: 9px; background: rgba(0,0,0,.15); }
.report-kpis b { display: block; font-family: var(--font-display); font-size: 17px; color: var(--gold-bright); }
.report-kpis span { color: var(--muted); font-size: 9.5px; }
.report-models { display: grid; gap: 7px; }
.report-model { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 10px 11px; border: 1px solid var(--line); border-radius: 8px; }
.report-model strong { font-size: 12px; }
.report-model b { color: var(--gold-bright); font-size: 13px; }
.report-model span { grid-column: 1 / -1; color: var(--muted); font-size: 10px; }
.report-next { margin-top: 13px; padding: 12px; border-left: 2px solid var(--gold); background: var(--gold-soft); }

/* How it works */
.advisor-how { background: var(--bg-2); border-top: 1px solid var(--line); }
.advisor-how-head { max-width: 720px; }
.advisor-how-head .h2 { margin-top: 20px; }
.advisor-how-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 18px; margin-top: 42px; }
.advisor-how-grid article { padding: 28px; border: 1px solid var(--line); border-radius: var(--r-lg); background: linear-gradient(180deg,var(--surface),var(--bg-2)); }
.advisor-how-grid article > span { color: var(--gold); font-family: var(--font-display); font-size: 28px; }
.advisor-how-grid h3 { margin: 16px 0 9px; font-size: 18px; }
.advisor-how-grid p { margin: 0; color: var(--muted); font-size: 14px; }
.advisor-disclaimer { max-width: 900px; margin: 28px 0 0; color: var(--muted-2); font-size: 12px; }

/* Footer contacts (shared page pattern) */
.footer { padding: 58px 0 28px; background: #080b0e; border-top: 1px solid var(--line); }
.footer-contacts { display: grid; grid-template-columns: repeat(3,1fr); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.fc-item { padding: 24px 28px; transition: background .2s; }
.fc-item + .fc-item { border-left: 1px solid var(--line); }
.fc-item:hover { background: var(--gold-soft); }
.fc-label { display: block; color: var(--muted); font-size: 10px; letter-spacing: .16em; text-transform: uppercase; }
.fc-val { display: block; color: var(--text); font-size: 16px; margin-top: 4px; }
.footer-bot { display: flex; justify-content: space-between; gap: 28px; align-items: flex-start; padding-top: 30px; }
.footer-bot p { max-width: 900px; margin: 0; color: var(--muted-2); font-size: 11.5px; }

[hidden] { display: none !important; }
@keyframes chatIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes think { 0%,60%,100% { opacity: .25; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }

@media (max-width: 1180px) {
  .nav-links { display: none; }
  .nav-burger { display: inline-flex; }
  .advisor-hero-grid { grid-template-columns: .75fr minmax(520px,1.25fr); gap: 38px; }
  .advisor-promises { grid-template-columns: 1fr; }
  .advisor-promises div { display: flex; align-items: baseline; gap: 10px; padding: 11px 14px; }
}
@media (max-width: 900px) {
  .advisor-hero { padding-top: 112px; }
  .advisor-hero-grid { grid-template-columns: 1fr; }
  .advisor-intro { max-width: 680px; }
  .advisor-promises { grid-template-columns: repeat(3,1fr); }
  .advisor-promises div { display: block; padding: 15px; }
  .advisor-shell { height: 720px; min-height: 0; }
}
@media (max-width: 720px) {
  .nav-in { height: 66px; }
  .nav-phone, .nav-right > .btn-primary { display: none; }
  .advisor-hero { padding: 92px 0 46px; }
  .advisor-intro .h1 { font-size: clamp(37px,11vw,54px); }
  .advisor-intro .lead { font-size: 16px; }
  .advisor-promises { grid-template-columns: 1fr; }
  .advisor-promises div { display: flex; align-items: baseline; gap: 10px; }
  .advisor-shell { height: 690px; border-radius: 16px; }
  .advisor-shell-top { min-height: 66px; padding: 12px 15px; }
  .advisor-progress { padding-left: 15px; padding-right: 15px; }
  .advisor-chat { padding: 20px 14px; }
  .chat-bubble { max-width: calc(100% - 34px); font-size: 13.5px; }
  .advisor-enter-hint { display: none; }
  .advisor-confirm, .advisor-finish-actions { grid-template-columns: 1fr; }
  .report-kpis { grid-template-columns: 1fr; }
  .advisor-how-grid { grid-template-columns: 1fr; }
  .footer-contacts { grid-template-columns: 1fr; }
  .fc-item + .fc-item { border-left: 0; border-top: 1px solid var(--line); }
  .footer-bot { flex-direction: column; }
}

@media print {
  @page { margin: 14mm; }
  body { background: #fff !important; color: #161616 !important; }
  .nav, .advisor-intro, .advisor-shell-top, .advisor-progress, .advisor-compose, .advisor-how, .footer, .chat-row:not(.report-row) { display: none !important; }
  .advisor-hero { min-height: 0; padding: 0; background: #fff !important; }
  .advisor-hero-grid { display: block; padding: 0; }
  .advisor-shell { display: block; height: auto; min-height: 0; overflow: visible; border: 0; box-shadow: none; background: #fff !important; }
  .advisor-shell::before { display: none; }
  .advisor-chat { display: block; overflow: visible; padding: 0; }
  .report-row { display: block; margin: 0; }
  .report-row .chat-bot-mark { display: none; }
  .report-row .chat-bubble { max-width: none; border: 0; padding: 0; background: #fff !important; color: #222 !important; }
  .report-head h3, .report-kpis b, .report-model b, .chat-bubble b { color: #111 !important; }
  .report-kpis div, .report-model { border-color: #bbb; background: #fff; }
  .report-next { border-left-color: #9c7c3e; background: #f6f1e8; }
}
