/* Шрифты с кириллицей лежат локально (OFL, файлы из Google Fonts). Знак ₽ — в отдельном файле, грузится только там, где есть цена. */
@font-face { font-family:'Golos Text'; font-style:normal; font-weight:400 900; font-display:swap; src:url('../fonts/golos-text-cyrillic.woff2') format('woff2'); unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family:'Golos Text'; font-style:normal; font-weight:400 900; font-display:swap; src:url('../fonts/golos-text-latin.woff2') format('woff2'); unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family:'Golos Text'; font-style:normal; font-weight:400 900; font-display:swap; src:url('../fonts/golos-text-ruble.woff2') format('woff2'); unicode-range:U+20BD; }
@font-face { font-family:'Manrope'; font-style:normal; font-weight:400 800; font-display:swap; src:url('../fonts/manrope-cyrillic.woff2') format('woff2'); unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family:'Manrope'; font-style:normal; font-weight:400 800; font-display:swap; src:url('../fonts/manrope-latin.woff2') format('woff2'); unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family:'Manrope'; font-style:normal; font-weight:400 800; font-display:swap; src:url('../fonts/manrope-ruble.woff2') format('woff2'); unicode-range:U+20BD; }
/* Токены темы (DESIGN.md → Colors). Светлая — «тетрадь наставника»; тёмная — тот же оттенок чернил (213°),
   глубина от более светлых поверхностей, бирюза светлее и спокойнее, текст на ней тёмный.
   Выбор темы: data-theme на <html> (скрипт в <head> base.html); без выбора — как в системе. */
:root { --icon-chevron:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9.5 6 6 6-6'/%3E%3C/svg%3E");
  --bg:#f5f4ef; --surface:#ffffff; --surface-2:#f3f6f4; --surface-3:#e9eeea; --tint:#e1efe8; --tint-soft:#eef5f1;
  --line:#e3e7e4; --line-strong:#d3dcdb; --line-teal:#a9cfc8; --ink:#122338; --muted:#5b6c7f;
  --teal:#147d73; --teal-dark:#0b625e; --on-accent:#ffffff; --navy:#172b3d; --on-navy:#ffffff;
  --fact:#12685b; --fact-bg:#e7f5ef; --warn:#825b17; --warn-bg:#fff2d7; --danger:#ad4e48; --danger-bg:#fbeceb;
  --info:#2f5d8a; --info-bg:#e5eef8; --cocoa:#8a5a2c; --cream:#fdf1e6; --orange:#eea273;
  --shadow-pop:0 12px 32px rgba(18,35,56,.14); --focus-ring:rgba(20,125,115,.25); color-scheme:light;
  --white:var(--surface); }
@media (prefers-color-scheme:dark) { :root:not([data-theme="light"]) {
  --bg:#131920; --surface:#1c2229; --surface-2:#222931; --surface-3:#29313a; --tint:#203c39; --tint-soft:#1b2d2c;
  --line:#2c343e; --line-strong:#3a4450; --line-teal:#39605c; --ink:#f1f0e9; --muted:#a0adba;
  --teal:#36ab9f; --teal-dark:#6ecfc5; --on-accent:#131920; --navy:#2b3a4b; --on-navy:#f1f0e9;
  --fact:#7ecebe; --fact-bg:#17362f; --warn:#e0be7b; --warn-bg:#372c15; --danger:#e69189; --danger-bg:#3d1d1a;
  --info:#8db7e6; --info-bg:#1c2a3b; --cocoa:#f0c08f; --cream:#3a2a1c; --orange:#eea273;
  --shadow-pop:0 12px 32px rgba(0,0,0,.45); --focus-ring:rgba(54,171,159,.35); color-scheme:dark; } }
:root[data-theme="dark"] {
  --bg:#131920; --surface:#1c2229; --surface-2:#222931; --surface-3:#29313a; --tint:#203c39; --tint-soft:#1b2d2c;
  --line:#2c343e; --line-strong:#3a4450; --line-teal:#39605c; --ink:#f1f0e9; --muted:#a0adba;
  --teal:#36ab9f; --teal-dark:#6ecfc5; --on-accent:#131920; --navy:#2b3a4b; --on-navy:#f1f0e9;
  --fact:#7ecebe; --fact-bg:#17362f; --warn:#e0be7b; --warn-bg:#372c15; --danger:#e69189; --danger-bg:#3d1d1a;
  --info:#8db7e6; --info-bg:#1c2a3b; --cocoa:#f0c08f; --cream:#3a2a1c; --orange:#eea273;
  --shadow-pop:0 12px 32px rgba(0,0,0,.45); --focus-ring:rgba(54,171,159,.35); color-scheme:dark; }
/* Лаборатория (Bruno Forge) остаётся светлой: в ней показываются сгенерированные сайты. */
body.lab-shell {
  --bg:#f5f4ef; --surface:#ffffff; --surface-2:#f3f6f4; --surface-3:#e9eeea; --tint:#e1efe8; --tint-soft:#eef5f1;
  --line:#e3e7e4; --line-strong:#d3dcdb; --line-teal:#a9cfc8; --ink:#122338; --muted:#5b6c7f;
  --teal:#147d73; --teal-dark:#0b625e; --on-accent:#ffffff; --navy:#172b3d; --on-navy:#ffffff;
  --fact:#12685b; --fact-bg:#e7f5ef; --warn:#825b17; --warn-bg:#fff2d7; --danger:#ad4e48; --danger-bg:#fbeceb;
  --info:#2f5d8a; --info-bg:#e5eef8; --cocoa:#8a5a2c; --cream:#fdf1e6; --orange:#eea273;
  --shadow-pop:0 12px 32px rgba(18,35,56,.14); --focus-ring:rgba(20,125,115,.25); color-scheme:light;
  --white:var(--surface); }
* { box-sizing:border-box; }
@media (prefers-reduced-motion:no-preference) { html { scroll-behavior:smooth; } }
body { margin:0; min-height:100vh; background:var(--bg); color:var(--ink); font-family:'Golos Text',system-ui,-apple-system,'Segoe UI',Roboto,sans-serif; caret-color:var(--teal); }
::selection { background:var(--tint); color:var(--ink); }
::placeholder { color:var(--muted); opacity:1; }
button,input,textarea,select { font:inherit; }
/* Общее кольцо фокуса с клавиатуры. :where() не добавляет специфичности, поэтому собственный фокус компонентов сильнее. */
:where(a,button,summary,[role="button"],[tabindex]):focus-visible { outline:3px solid var(--teal); outline-offset:2px; }
a { color:inherit; text-decoration:none; }
button { cursor:pointer; }
.app-shell { min-height:100vh; display:flex; flex-direction:column; }
.topbar { height:76px; padding:0 clamp(22px,5vw,78px); display:flex; align-items:center; justify-content:space-between; background:var(--white); border-bottom:1px solid var(--line); }
.brand { display:inline-flex; gap:10px; align-items:center; font-family:Manrope,sans-serif; font-size:20px; font-weight:800; letter-spacing:-.8px; }
.brand-mark { display:block; flex-shrink:0; width:35px; height:35px; object-fit:contain; }
.brand-dot { color:var(--teal); }
.topnav { display:flex; align-items:center; gap:26px; font-size:16px; font-weight:700; }
.topnav a:hover,.link-button:hover { color:var(--teal); }
.topnav .nav-cta { color:var(--on-accent); background:var(--teal); padding:11px 17px; border-radius:8px; }
.topnav .nav-cta:hover { color:var(--on-accent); background:var(--teal-dark); }
.topnav .wallet-chip { display:inline-flex; align-items:center; border:1px solid var(--line); border-radius:999px; padding:8px 14px; color:var(--ink); background:var(--white); white-space:nowrap; }
.topnav .wallet-chip:hover { color:var(--teal); border-color:var(--teal); }
.topnav .pro-badge { color:var(--teal-dark); background:var(--tint); padding:6px 11px; border-radius:999px; font-size:13px; font-weight:800; }
.topnav .pro-badge:hover { color:var(--teal-dark); }
.topnav a[aria-current="page"] { color:var(--teal-dark); }
.user-pill { color:var(--muted); font-size:13px; }
.inline-form { display:inline; }
.link-button { border:0; background:none; padding:0; color:var(--ink); font-weight:700; }
.startup-strip { display:flex; align-items:center; flex-wrap:wrap; gap:10px; padding:13px clamp(22px,5vw,78px); background:var(--tint); border-bottom:1px solid var(--line); }
.startup-strip .eyebrow { margin-right:9px; }
.startup-chip { border:1px solid var(--line-strong); border-radius:999px; padding:6px 13px; font-size:13px; font-weight:700; color:var(--muted); background:var(--surface); }
.startup-chip.selected { color:var(--on-accent); background:var(--teal); border-color:var(--teal); }
.main-content { width:min(1260px,calc(100% - 44px)); margin:0 auto; padding:42px 0 75px; flex:1; }
.site-footer { padding:25px clamp(22px,5vw,78px); display:flex; justify-content:space-between; gap:15px; color:var(--muted); border-top:1px solid var(--line); font-size:13px; }
.axis-reason { margin:0 0 12px; }
.evidence-box { margin:10px 0; font-size:13px; }
.evidence-status { display:inline-block; padding:4px 8px; border-radius:8px; background:var(--surface-2); color:var(--muted); font-weight:700; }
.evidence-stated { background:var(--tint); color:var(--teal-dark); }
.evidence-assumption { background:var(--warn-bg); color:var(--warn); }
.evidence-manual { background:var(--info-bg); color:var(--info); }
.evidence-box blockquote { border-left:3px solid var(--line-strong); padding:4px 12px; margin:10px 0; color:var(--ink); overflow-wrap:anywhere; }
.evidence-link { color:var(--teal-dark); text-decoration:underline; text-underline-offset:3px; }
.refine-form { margin-top:12px; }
.button.refine-button { font-size:13px; min-height:40px; padding:8px 12px; }
.focus-banner { display:flex; flex-wrap:wrap; gap:8px 20px; padding:15px 20px; margin-bottom:20px; border-radius:10px; background:var(--tint); font-size:13px; }
.focus-banner span { color:var(--muted); }
.message:target .message-body { outline:3px solid #e2ac60; outline-offset:3px; }
.achievements-card,.radar-history-card { padding:26px 28px; margin-top:20px; }
.achievements-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; margin-top:20px; }
.achievement { padding:18px; border-radius:10px; background:var(--surface-2); border:1px dashed var(--line-strong); }
.achievement.earned { background:var(--tint-soft); border:1px solid var(--line-strong); }
.achievement-icon { display:block; color:var(--muted); font-size:25px; margin-bottom:10px; }
.earned .achievement-icon { color:var(--teal); }
.achievement h3 { font-size:16px; margin:0 0 8px; }
.achievement p { font-size:13px; color:var(--muted); margin:0 0 13px; }
.achievement-status { font-size:13px; font-weight:800; color:var(--muted); }
.earned .achievement-status { color:var(--teal-dark); }
.snapshot-list { display:flex; flex-wrap:wrap; gap:8px; margin:20px 0; }
.snapshot-chip { padding:9px 12px; border:1px solid var(--line); border-radius:8px; font-size:13px; }
.snapshot-chip.selected { color:var(--on-accent); background:var(--teal); border-color:var(--teal); }
.history-comparison { display:grid; grid-template-columns:minmax(220px,1fr) 2fr; gap:26px; align-items:start; }
.radar-previous { fill:none; stroke:var(--muted); stroke-width:2; stroke-dasharray:4 3; }
.legend-current,.score-change.positive { color:var(--teal); }
.legend-previous { color:var(--cocoa); }
.history-direction { padding:14px 0; border-bottom:1px solid var(--line); font-size:13px; }
.history-direction summary { display:flex; gap:15px; align-items:center; cursor:pointer; }
.history-direction summary > span:first-child { flex:1; }
.history-direction summary:after { content:'＋'; color:var(--muted); }
.history-direction[open] summary:after { content:'−'; }
.history-direction strong { font-weight:800; }
.score-change { min-width:32px; text-align:right; color:var(--muted); }
.score-change.negative { color:var(--danger); }
.history-explanation { margin:14px 0 0; color:var(--muted); }
.history-pagination { display:flex; align-items:center; flex-wrap:wrap; gap:12px; margin-bottom:18px; font-size:13px; }
@media (max-width:900px) { .achievements-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (max-width:680px) {
  .achievements-card,.radar-history-card { padding:20px; }
  .history-comparison { grid-template-columns:1fr; gap:5px; }
  .profile-table thead { display:none; }
  .profile-table tr { display:grid; grid-template-columns:1fr auto; padding:15px 0; border-bottom:1px solid var(--line); }
  .profile-table th,.profile-table td { border:0; padding:4px 0; width:auto !important; }
  .profile-table tr td:last-child { grid-column:1/-1; margin-top:8px; }
}
.eyebrow { display:block; color:var(--muted); font-size:13px; line-height:1.4; letter-spacing:0; font-weight:600; }
h1,h2,h3,p { margin-top:0; }
h1,h2,h3 { font-family:Manrope,sans-serif; letter-spacing:-.02em; }
h1 { font-size:clamp(25px,2.4vw,31px); line-height:1.2; margin-bottom:12px; }
h2 { font-size:20px; line-height:1.3; margin-bottom:0; }
h3 { font-size:16px; }
p { line-height:1.6; }
.muted { color:var(--muted); }
.small { font-size:13px; }
.card { background:var(--white); border:1px solid var(--line); border-radius:16px;  }
.button { display:inline-flex; align-items:center; justify-content:center; gap:8px; min-height:44px; padding:10px 16px; border-radius:8px; border:1px solid transparent; font-size:16px; font-weight:700; line-height:1.2; text-align:center; transition:transform .18s ease-out,background-color .18s ease-out,border-color .18s ease-out,color .18s ease-out,box-shadow .18s ease-out; }
.button.primary { color:var(--on-accent); background:var(--teal); }
.button.primary:hover { background:var(--teal-dark); }
.button.dark { color:var(--on-navy); background:var(--navy); }
.button.dark:hover { background:color-mix(in srgb,var(--navy) 82%,var(--ink)); }
.button.ghost { color:var(--ink); background:var(--surface); border-color:var(--line-strong); }
.button.ghost:hover { border-color:var(--teal); color:var(--teal-dark); }
.button.wide { width:100%; }
.button:disabled { opacity:.55; cursor:wait; transform:none; }
.button:active:not(:disabled) { transform:scale(.98); transition-duration:.06s; }
@media (prefers-reduced-motion:reduce) { .button,.bruno-greet { transition-property:background-color,border-color,color,box-shadow; } .button:hover,.button:active,.bruno-greeting .bruno-greet { transform:none; } }
.flash-stack { display:grid; gap:8px; margin-bottom:20px; }
.flash { padding:12px 17px; border-radius:8px; background:var(--tint); color:var(--teal-dark); font-size:13px; font-weight:700; }
.flash-error { color:var(--danger); background:var(--danger-bg); }
.page-heading { display:flex; align-items:end; justify-content:space-between; gap:20px; margin-bottom:28px; }
.page-heading .eyebrow { margin-bottom:12px; }
.page-heading p { color:var(--muted); margin-bottom:0; }
.page-heading .account-link { display:inline-block; margin-top:8px; color:var(--teal-dark); font-size:13px; font-weight:700; text-decoration:underline; text-underline-offset:3px; }
.page-heading.narrow { display:block; max-width:690px; }
.about-page { max-width:1080px; margin:0 auto; }
.about-intro { padding:clamp(26px,4vw,46px); }
.about-intro h2 { max-width:760px; margin:0 0 18px; font-size:clamp(25px,2.4vw,31px); line-height:1.2; }
.about-intro p { max-width:780px; color:var(--muted); line-height:1.7; margin:0 0 13px; }
.about-intro p:last-child { margin-bottom:0; }
.about-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:16px; margin-top:18px; }
.about-feature { padding:27px; }
.about-feature h3 { margin:11px 0; font-size:20px; }
.about-feature p { margin:0; color:var(--muted); font-size:16px; line-height:1.65; }
.about-outro { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:20px; margin-top:24px; }
.about-outro p { max-width:650px; color:var(--muted); line-height:1.65; }
.profile-table-card { padding:26px 28px; margin-bottom:20px; }
.profile-table-card > p { margin:12px 0 17px; }
.profile-table-wrap { overflow-x:auto; }
.profile-table { width:100%; border-collapse:collapse; font-size:13px; }
.profile-table th,.profile-table td { padding:14px 12px; border-bottom:1px solid var(--line); text-align:left; vertical-align:top; }
.profile-table thead th { color:var(--muted); font-size:13px; font-weight:800; }
.profile-table tbody th { width:150px; }
.profile-table tbody td:nth-child(2) { width:95px; color:var(--teal); white-space:nowrap; }
.profile-table tbody td:last-child { color:var(--muted); line-height:1.55; }
.table-meta { margin-top:13px !important; }
.table-actions { display:flex; align-items:center; flex-wrap:wrap; gap:11px; margin-top:17px; }
.table-actions form { display:flex; align-items:center; flex-wrap:wrap; gap:10px; }
.dashboard-grid { display:grid; grid-template-columns:minmax(0,1.65fr) minmax(290px,1fr); gap:20px; }
.radar-card,.bruno-card { padding:26px 28px; min-height:352px; }
.section-top { display:flex; align-items:center; justify-content:space-between; gap:16px; }
.section-top .eyebrow { margin-bottom:7px; }
.score-badge { padding:8px 13px; border-radius:999px; color:var(--teal-dark); background:var(--tint); font-size:13px; font-weight:800; white-space:nowrap; }
.radar-layout { display:grid; grid-template-columns:minmax(230px,1fr) minmax(165px,.85fr); align-items:center; gap:20px; margin:8px 0 10px; }
.radar-wrap { max-width:265px; margin:auto; width:100%; }
.radar-svg { width:100%; overflow:visible; }
.radar-grid { fill:none; stroke:var(--line); stroke-width:1.1; }
.radar-axis { stroke:var(--line); stroke-width:1; }
.radar-value { fill:color-mix(in srgb,var(--teal) 22%,transparent); stroke:var(--teal); stroke-width:2.5; stroke-linejoin:round; }
.radar-source { margin:5px 0 0; font-weight:700; }
.radar-summary { margin-top:15px; padding:12px 14px; border-radius:8px; background:var(--tint-soft); color:var(--ink); font-size:13px; line-height:1.5; }
.radar-explanations { margin-top:14px; font-size:13px; line-height:1.5; }
.radar-explanations summary { color:var(--teal); font-weight:800; cursor:pointer; }
.radar-explanations ul { margin:10px 0 0; padding-left:18px; }
.radar-explanations li { margin:7px 0; }
.metric-list { display:grid; gap:10px; }
.metric-row { display:grid; grid-template-columns:1fr auto; gap:3px 10px; align-items:center; font-size:13px; font-weight:700; }
.metric-row strong { color:var(--teal); font-size:13px; }
.metric-bar { grid-column:1/-1; height:5px; border-radius:16px; background:var(--tint); overflow:hidden; }
.metric-bar i { display:block; height:100%; border-radius:16px; background:var(--teal); }
.bruno-card { position:relative; overflow:hidden; background:var(--surface); }
.bruno-card:after { content:''; position:absolute; right:-55px; bottom:-95px; width:230px; height:230px; border-radius:50%; background:var(--warn-bg); z-index:0; }
.bruno-card > * { position:relative; z-index:1; }
.status-dot { width:9px; height:9px; border-radius:50%; background:#78c5a7; box-shadow:0 0 0 6px #e6f5ec; }
/* The reference sheet stays untouched; nested SVG viewports select each pose. */
.bruno-art { position:relative; width:235px; max-width:100%; margin:8px auto 0; }
.bruno-stage { display:block; width:100%; overflow:visible; }
.bruno-stage svg { overflow:hidden; }
.bruno-character { transform-origin:150px 285px; animation:bruno-breathe 4.8s ease-in-out infinite; }
.bruno-sleepy .bruno-character { animation:bruno-sleep 6s ease-in-out infinite; }
.bruno-confident .bruno-character { animation:bruno-bounce 4s ease-in-out infinite; }
.bruno-investor .bruno-character { animation-duration:7s; }
.bruno-greet { position:absolute; bottom:5px; right:0; width:36px; height:36px; border-radius:50%; border:1px solid var(--line-strong); background:var(--surface); color:var(--teal); box-shadow:0 3px 10px #163a2910; font-size:20px; transition:transform .2s ease-out; }
.bruno-greet:hover,.bruno-greet:focus-visible { background:var(--tint); outline:2px solid var(--teal); outline-offset:3px; }
.bruno-greeting .bruno-character { animation:bruno-hello 1.4s ease-in-out; }
.bruno-greeting .bruno-greet { background:var(--tint); transform:scale(1.12); }
.bruno-art[data-paused] * { animation-play-state:paused !important; }
@keyframes bruno-breathe { 0%,100% { transform:translateY(0) rotate(0); } 50% { transform:translateY(-3px) rotate(-1deg); } }
@keyframes bruno-sleep { 0%,100% { transform:scaleY(1); } 50% { transform:scaleY(1.035); } }
@keyframes bruno-bounce { 0%,65%,100% { transform:translateY(0); } 75% { transform:translateY(-9px) rotate(-2deg); } 87% { transform:translateY(-3px) rotate(2deg); } }
@keyframes bruno-hello { 0%,100% { transform:rotate(0); } 20%,55% { transform:translateY(-5px) rotate(5deg); } 38%,74% { transform:translateY(-3px) rotate(-4deg); } }
@media (prefers-reduced-motion:reduce) { .bruno-art * { animation:none !important; transition:none !important; } }
.bruno-mood { display:flex; align-items:baseline; justify-content:center; gap:7px; font-size:16px; }
.bruno-mood strong { font-size:16px; }
.bruno-mood span { color:var(--muted); }
.bruno-reason { text-align:center; max-width:310px; margin:6px auto 0; color:var(--muted); font-size:13px; }
.actions-grid { display:grid; grid-template-columns:1fr; gap:20px; margin-top:20px; }
.action-card { padding:27px 28px; }
.action-card .eyebrow { margin-bottom:15px; }
.action-card h2 { margin-bottom:9px; }
.action-card p { color:var(--muted); max-width:430px; font-size:13px; min-height:62px; }
.action-card.accent { background:var(--tint); border-color:var(--line); }
.lower-grid { display:grid; grid-template-columns:1.15fr .85fr; gap:20px; margin-top:20px; align-items:start; }
.score-form-card,.history-card { padding:27px 28px; }
.ai-assessment { padding:18px; margin:18px 0 22px; border:1px solid var(--line-strong); border-radius:10px; background:var(--tint-soft); }
.ai-assessment h3,.manual-assessment-title { font-size:16px; font-weight:800; }
.ai-assessment p { margin:8px 0 14px; font-size:13px; line-height:1.5; }
.ai-assessment form { display:flex; align-items:center; flex-wrap:wrap; gap:12px; }
.manual-assessment-title { margin:0 0 5px; }
.score-form-card > p { margin:10px 0 18px; font-size:13px; }
.metrics-form { display:grid; grid-template-columns:1fr 1fr; gap:15px; }
.metrics-form .field:last-of-type { grid-column:1/-1; }
.metrics-form .button { justify-self:start; }
.metric-edit { grid-column:1/-1; display:grid; grid-template-columns:125px 1fr 2fr; align-items:center; gap:13px; padding:12px 0; border-bottom:1px solid var(--line); }
.metric-edit h3 { margin:0; font-size:16px; }
.metric-edit .field { min-width:0; }
.metric-notes { grid-column:1/-1; }
.field { display:grid; gap:7px; color:var(--ink); font-size:13px; font-weight:700; }
.field input,.field textarea,.field select { width:100%; border:1px solid var(--line-strong); border-radius:8px; background:var(--surface); color:var(--ink); padding:11px 12px; outline:none; font-weight:500; }
.field input:focus,.field textarea:focus,.field select:focus,.chat-composer textarea:focus { border-color:var(--teal); box-shadow:0 0 0 3px var(--focus-ring); }
.field textarea { resize:vertical; min-height:80px; }
.field-help { color:var(--muted); font-weight:400; }
.field-error,.form-error { color:var(--danger); font-size:13px; }
.score-history { margin-top:24px; padding-top:19px; border-top:1px solid var(--line); }
.score-history h3 { font-size:16px; margin-bottom:8px; }
.score-history-row { display:flex; justify-content:space-between; padding:8px 0; color:var(--muted); font-size:13px; border-bottom:1px solid var(--line); }
.score-history-row strong { color:var(--teal); }
.history-row { display:grid; grid-template-columns:35px 1fr auto; align-items:center; gap:11px; padding:16px 0; border-bottom:1px solid var(--line); }
.history-row:hover strong { color:var(--teal); }
.history-row:last-child { border-bottom:0; }
.history-icon { display:grid; place-items:center; width:34px; height:34px; border-radius:8px; background:var(--tint); color:var(--teal-dark); }
.history-row strong { display:block; font-size:13px; }
.history-row small { display:block; margin-top:4px; color:var(--muted); font-size:13px; }
.auth-wrap { display:grid; grid-template-columns:1fr 420px; gap:70px; align-items:center; max-width:1070px; margin:70px auto; }
.auth-intro h1 { margin:16px 0; }
.auth-intro em { color:var(--teal); font-style:normal; }
.auth-intro p { color:var(--muted); max-width:410px; }
.auth-card { padding:32px; }
.auth-card h2 { margin-bottom:22px; }
.form-stack { display:grid; gap:16px; }
.auth-bottom { color:var(--muted); font-size:13px; text-align:center; margin:20px 0 0; }
.auth-bottom a { color:var(--teal); font-weight:800; }
.startup-form { max-width:760px; padding:32px; display:grid; gap:20px; }
.form-actions { display:flex; gap:10px; margin-top:5px; }
.chat-heading { display:flex; justify-content:space-between; gap:20px; align-items:end; margin-bottom:25px; }
.chat-heading .eyebrow { margin-top:15px; margin-bottom:8px; }
.chat-heading h1 { font-size:31px; margin-bottom:6px; }
.chat-heading p { margin:0; color:var(--muted); font-size:13px; }
.back-link { color:var(--muted); font-size:13px; font-weight:700; }
.back-link:hover { color:var(--teal); }
.chat-layout { display:grid; grid-template-columns:minmax(0,1fr) 280px; gap:20px; align-items:start; }
.conversation-card { overflow:hidden; }
/* Лента подстраивается под высоту экрана, чтобы поле ввода было видно без прокрутки страницы. */
.message-list { height:clamp(240px,calc(100dvh - 522px),680px); overflow-y:auto; overscroll-behavior:contain; padding:24px; display:flex; flex-direction:column; gap:21px; }
.message { display:flex; align-items:flex-start; gap:11px; max-width:85%; }
.message-user { align-self:flex-end; flex-direction:row-reverse; }
.message-avatar { width:32px; height:32px; flex:none; display:grid; place-items:center; border-radius:8px; color:var(--cocoa); background:var(--cream); font-weight:800; font-size:13px; }
.message-user .message-avatar { background:var(--navy); color:var(--on-navy); }
.message-body { background:var(--surface-2); border-radius:3px 10px 10px 10px; padding:13px 16px; min-width:140px; }
.message-user .message-body { background:var(--tint); border-radius:10px 3px 10px 10px; }
.message-meta { display:flex; justify-content:space-between; gap:25px; color:var(--teal-dark); font-size:13px; font-weight:800; margin-bottom:7px; }
.message-meta span { color:var(--muted); font-weight:500; }
.message-text { font-size:16px; line-height:1.6; white-space:pre-wrap; overflow-wrap:anywhere; }
/* Новое сообщение проявляется и чуть поднимается; пока Бруно готовит ответ, подпись «думает…» мягко пульсирует (chat.js). */
.message.is-new { animation:message-in .22s cubic-bezier(.16,1,.3,1) both; }
@keyframes message-in { from { opacity:0; transform:translateY(6px); } }
.message-text[data-state="thinking"] { color:var(--muted); animation:bruno-thinking 1.2s ease-in-out infinite alternate; }
@keyframes bruno-thinking { to { opacity:.45; } }
@media (prefers-reduced-motion:reduce) {
  .message.is-new { animation-name:message-fade; }
  @keyframes message-fade { from { opacity:0; } }
  .message-text[data-state="thinking"] { animation:none; }
}
.attachment-label { display:inline-flex; align-items:center; gap:6px; margin-top:9px; padding:5px 8px; border-radius:8px; background:var(--surface); color:var(--muted); font-size:13px; }
.chat-composer { border-top:1px solid var(--line); padding:15px; }
.chat-composer:focus-within { box-shadow:inset 0 0 0 2px var(--teal); }
/* Быстрые ответы — одна строка с прокруткой, чтобы поле ввода оставалось на первом экране. */
.chat-composer .quick-replies { flex-wrap:nowrap; overflow-x:auto; overscroll-behavior-x:contain; scrollbar-width:thin; scrollbar-color:#cfe3dc transparent; padding-bottom:4px; }
.chat-composer .quick-reply { flex:none; white-space:nowrap; }
.chat-composer textarea { display:block; border:0; outline:none; width:100%; resize:vertical; min-height:72px; padding:10px; color:var(--ink); }
.composer-bottom { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:5px 4px 0; }
.file-button { position:relative; display:inline-flex; align-items:center; gap:6px; min-height:44px; color:var(--muted); font-size:13px; font-weight:700; cursor:pointer; max-width:60%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.file-button:hover { color:var(--teal-dark); }
.file-button:focus-within { outline:3px solid var(--teal); outline-offset:2px; border-radius:8px; }
.file-button input { position:absolute; width:1px; height:1px; opacity:0; }
.companion-card,.finish-card { padding:21px; text-align:center; }
.companion-card .bruno-art { width:180px; margin:0 auto; }
.companion-card h2 { font-size:16px; margin:0 0 6px; }
.companion-card p,.finish-card p { color:var(--muted); font-size:13px; margin:0; }
.finish-card { margin-top:17px; text-align:left; }
.finish-card .eyebrow { margin-bottom:10px; }
.finish-card h3 { margin-bottom:5px; }
.finish-card p { margin-bottom:15px; }
.ended-note { padding:16px; text-align:center; color:var(--muted); background:var(--surface-2); font-size:13px; }
.stream-error { color:var(--danger); }
.report-card { margin-top:22px; padding:28px; }
.report-summary { max-width:770px; margin:18px 0 22px; color:var(--muted); font-size:16px; }
.mistake-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(210px,1fr)); gap:12px; }
.mistake-card { padding:17px; border-radius:10px; border:1px solid var(--line); background:var(--surface); }
.mistake-number { color:var(--teal); font-size:13px; font-weight:800; }
.mistake-card h3 { margin:7px 0; font-size:16px; }
.mistake-card p { color:var(--muted); font-size:13px; margin:0 0 9px; }
.mistake-card strong { font-size:13px; color:var(--teal); }
@media (max-width:950px) { .dashboard-grid,.lower-grid,.auth-wrap { grid-template-columns:1fr; } .auth-wrap { gap:25px; margin:35px auto; max-width:600px; } .chat-layout { grid-template-columns:1fr; } .chat-aside { display:grid; grid-template-columns:1fr 1fr; gap:15px; } .finish-card { margin-top:0; } }
@media (max-width:680px) { .main-content { width:calc(100% - 28px); padding:25px 0 50px; } .topbar { height:66px; padding:0 14px; } .brand { font-size:16px; } .brand-mark { width:30px; height:30px; } .topnav { gap:11px; font-size:13px; } .topnav .user-pill,.topnav a[href$='new/'] { display:none; } .startup-strip { padding:11px 14px; } .page-heading,.chat-heading { align-items:start; flex-direction:column; } .radar-layout { grid-template-columns:1fr; } .metric-list { grid-template-columns:1fr 1fr; } .actions-grid { grid-template-columns:1fr; } .metrics-form { grid-template-columns:1fr; } .metric-edit { grid-template-columns:1fr; } .profile-table-card,.radar-card,.bruno-card,.action-card,.score-form-card,.history-card { padding:20px; } .chat-aside { grid-template-columns:1fr; } .message-list { height:max(220px,calc(100dvh - 425px)); padding:15px; } .message { max-width:95%; } .site-footer { padding:18px; flex-direction:column; } }

/* Чат на телефоне: заголовок компактнее, быстрые ответы — одна строка с прокруткой пальцем. */
@media(max-width:680px) {
  .chat-heading { gap:0; margin-bottom:14px; }
  .chat-heading .eyebrow { margin-top:10px; margin-bottom:4px; }
  .chat-heading h1 { font-size:25px; margin-bottom:0; }
  .chat-heading p { display:none; }
  .chat-composer .quick-replies { scrollbar-width:none; margin:0 -15px 8px; padding:0 15px; }
  .chat-composer .quick-replies::-webkit-scrollbar { display:none; }
  .chat-composer .quick-reply { min-height:44px; }
  .chat-composer textarea { height:64px; min-height:56px; }
}

/* Small, collapsible companion; the bear itself is a regular project link. */
.bruno-pet { position:fixed; right:max(22px,env(safe-area-inset-right)); bottom:max(18px,env(safe-area-inset-bottom)); width:158px; z-index:40; }
.bruno-pet .pet-project { cursor:grab; touch-action:none; user-select:none; -webkit-user-select:none; }
.bruno-pet.is-dragging .pet-project { cursor:grabbing; }
.pet-project { display:flex; flex-direction:column; align-items:center; text-decoration:none; color:var(--ink); border-radius:16px; }
.pet-project:focus-visible { outline:3px solid var(--teal); outline-offset:4px; }
.pet-bubble { display:block; width:100%; padding:10px 12px; border:1px solid var(--line-strong); border-radius:10px 10px 6px 10px; background:var(--surface); box-shadow:0 5px 22px #243d3212; font-size:13px; line-height:1.45; }
.pet-bubble strong { display:block; font-size:13px; }
.pet-bubble span { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:var(--muted); }
.bruno-pet .bruno-art { width:108px; margin:0; pointer-events:none; }
.bruno-pet .bruno-sleepy { margin-top:-30px; }
.pet-actions { display:flex; justify-content:center; gap:4px; }
.pet-actions a,.pet-actions button { display:block; border:1px solid var(--line-strong); border-radius:16px; background:var(--surface); color:var(--teal-dark); font-size:13px; font-weight:700; padding:7px 8px; text-decoration:none; }
.pet-actions a:hover,.pet-actions button:hover { background:var(--tint); }
.pet-toggle { position:absolute; right:-8px; top:-13px; z-index:2; width:30px; height:30px; border-radius:50%; background:var(--surface); color:var(--muted); border:1px solid var(--line-strong); box-shadow:0 3px 12px #20392c12; cursor:pointer; }
.bruno-pet.is-collapsed { width:54px; height:44px; }
.bruno-pet.is-collapsed .pet-body { display:none; }
.bruno-pet.is-collapsed .pet-toggle { inset:0; width:54px; height:44px; border-radius:16px; font-size:13px; font-weight:700; }
@media(max-width:680px) {
  .bruno-pet { right:12px; bottom:max(12px,env(safe-area-inset-bottom)); width:134px; }
  .bruno-pet .bruno-art { width:82px; }
  .pet-bubble { padding:7px 9px; }
  .pet-bubble strong { font-size:13px; }
  .pet-bubble span { font-size:13px; }
  .bruno-pet:not(.is-collapsed) { width:168px; }
  .pet-actions a,.pet-actions button { display:flex; align-items:center; min-height:44px; padding:0 10px; font-size:13px; }
  body:has(#chat-form:focus-within) .bruno-pet { visibility:hidden; }
  body:has(.bruno-pet) .main-content { padding-bottom:72px; }
}
/* Зона касания у кнопки «−» больше самой кнопки. */
.pet-toggle::before { content:""; position:absolute; inset:-7px; }
/* На компьютере последний блок страницы можно выкрутить из-под Бруно. */
@media(min-width:681px) { body:has(.bruno-pet) .main-content { padding-bottom:200px; } }

.workspace-nav { display:flex; flex-wrap:wrap; gap:8px; margin:0 0 25px; }
.workspace-nav a { padding:10px 15px; border:1px solid var(--line-strong); border-radius:16px; color:var(--teal); font-size:13px; font-weight:700; background:var(--surface); text-decoration:none; }
.workspace-nav a[aria-current="page"],.workspace-nav a:hover { background:var(--teal); color:var(--on-accent); border-color:var(--teal); }
.work-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:20px; margin:20px 0; }
.work-card { padding:28px; margin-bottom:20px; min-width:0; overflow-wrap:anywhere; }
.work-grid .work-card { margin-bottom:0; }
.work-card h2 { font-size:20px; line-height:1.3; margin:14px 0; }
.work-card p { line-height:1.65; margin:12px 0 18px; }
.work-empty { grid-column:1/-1; }
.task-criterion { padding:14px 16px; background:var(--tint-soft); border-radius:10px; margin:20px 0; font-size:13px; }
.task-criterion p { margin:6px 0 0; }
.work-actions { display:flex; align-items:center; flex-wrap:wrap; gap:10px; margin-top:18px; }
.work-actions .button { padding:11px 14px; font-size:13px; }
.work-notice { padding:14px 18px; border-radius:10px; background:var(--tint-soft); color:var(--muted); font-size:13px; line-height:1.6; margin:20px 0; }
.work-history-row { display:flex; justify-content:space-between; align-items:center; gap:20px; padding:16px 0; border-bottom:1px solid var(--line); }
.work-history-row p { margin:5px 0 0; }
.work-history-row a { color:var(--teal); font-size:13px; }
.work-filter { display:flex; align-items:center; flex-wrap:wrap; gap:12px; margin-bottom:22px; }
.work-filter select { padding:11px 15px; border:1px solid var(--line-strong); border-radius:8px; background:var(--surface); }
.evidence-form { max-width:800px; }
.evidence-form .field { margin-bottom:20px; }
.evidence-form select,.evidence-form input,.evidence-form textarea { width:100%; padding:12px 14px; border:1px solid var(--line-strong); border-radius:8px; background:var(--surface); font:inherit; }
.evidence-observation { white-space:normal; }
.outcome { padding:6px 12px; border-radius:16px; font-size:13px; background:var(--surface-3); color:var(--muted); }
.outcome-supported { background:var(--tint); color:var(--ink); }
.outcome-refuted { background:var(--cream); color:var(--cocoa); }
.investor-intro { grid-template-columns:minmax(0,1.6fr) minmax(0,1fr); }
.investor-topics { padding-left:20px; line-height:1.9; }
.investor-companion { text-align:center; background:var(--surface); }
.work-card form [role="status"] { display:block; margin-top:10px; }
@media(max-width:900px) { .work-grid { grid-template-columns:1fr; } }
@media(max-width:680px) { .work-card { padding:20px; } .workspace-nav a { font-size:13px; padding:9px 11px; } .work-history-row { align-items:start; flex-direction:column; gap:10px; } .evidence-list .section-top { align-items:start; flex-direction:column; gap:10px; } }
@media(max-width:950px) {
  .topbar { height:auto; min-height:76px; flex-wrap:wrap; gap:6px 16px; padding-top:11px; padding-bottom:11px; }
  .topnav { flex:1 1 100%; flex-wrap:wrap; justify-content:flex-start; gap:10px 18px; }
  .topnav .account-profile-link { margin-left:auto; }
}
@media(max-width:680px) {
  .topbar { height:auto; padding:11px 14px; }
  .topnav { gap:9px 14px; }
  .about-grid { grid-template-columns:1fr; }
  .about-feature { padding:23px; }
  .about-outro { align-items:flex-start; }
}

.work-heading h1 { font-size:clamp(25px,2.4vw,31px); line-height:1.2; margin:10px 0; }
.lab-layout { display:grid; grid-template-columns:minmax(280px,.75fr) minmax(0,1.5fr); gap:20px; align-items:start; }
.lab-editor,.lab-preview-card,.lab-versions { padding:28px; }
.lab-editor h2,.lab-preview-card h2,.lab-versions h2 { margin:10px 0 12px; font-size:20px; }
.lab-editor p,.lab-preview-card p { line-height:1.55; }
.lab-field { display:grid; gap:10px; margin:18px 0 12px; }
.lab-field textarea { display:block; width:100%; min-height:160px; padding:14px; border:1px solid var(--line-strong); border-radius:10px; background:var(--surface); resize:vertical; }
.lab-new-option { display:flex; align-items:flex-start; gap:8px; margin:10px 0; color:var(--muted); font-size:13px; }
.lab-new-option input { margin-top:2px; }
.lab-privacy { margin-top:22px; }
.lab-sharing,.lab-results,.lab-card-link,.lab-test-intro,.lab-test-review,.lab-test-thanks { padding:28px; margin-top:22px; }
.lab-sharing h2,.lab-results h2,.lab-card-link h2 { margin:10px 0 12px; }
.lab-sharing p,.lab-test-intro p,.lab-card-link p { line-height:1.6; }
.lab-inline-form { display:inline-block; margin:0 0 14px 8px; }
.lab-stats { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; margin:20px 0; }
.lab-stats div { display:grid; gap:6px; padding:18px; background:var(--tint-soft); border-radius:10px; }
.lab-stats strong { font-size:25px; color:var(--teal); }
.lab-stats span { font-size:13px; color:var(--muted); }
.lab-targets { list-style:none; padding:0; }
.lab-targets li { display:flex; justify-content:space-between; gap:16px; padding:12px 0; border-bottom:1px solid var(--line); overflow-wrap:anywhere; }
.lab-feedback-list { display:grid; gap:12px; }
.lab-feedback-list article { padding:16px; border:1px solid var(--line); border-radius:10px; overflow-wrap:anywhere; }
.lab-feedback-list small { color:var(--muted); }
.lab-public-prototype { margin:24px 0; padding-top:22px; border-top:1px solid var(--line); }
.lab-public-prototype h2 { margin:8px 0; }
.lab-public-prototype .button { margin-top:16px; }
.lab-card-frame { height:360px !important; }
.lab-test-toolbar { display:flex; align-items:center; justify-content:space-between; gap:12px; margin:16px 0; }
.lab-test-frame { height:70dvh !important; min-height:420px; }
.lab-test-review .field { display:grid; gap:8px; margin:18px 0; }
.lab-test-review textarea,.lab-test-review select { width:100%; padding:12px; border:1px solid var(--line-strong); border-radius:8px; font:inherit; }
body:has(#lab-start-form) .bruno-pet { display:none; }
@media(max-width:680px) { .lab-stats { grid-template-columns:repeat(2,minmax(0,1fr)); } .lab-sharing,.lab-results,.lab-card-link,.lab-test-intro,.lab-test-review,.lab-test-thanks { padding:20px; } .lab-test-toolbar { align-items:flex-start; flex-direction:column; } .lab-inline-form { margin-left:0; } }
.lab-browser { overflow:hidden; border:1px solid var(--line-strong); border-radius:10px; background:var(--surface); }
.lab-browser-bar { display:flex; align-items:center; gap:6px; height:38px; padding:0 13px; background:var(--tint-soft); border-bottom:1px solid var(--line-strong); }
.lab-browser-bar span { width:8px; height:8px; border-radius:50%; background:#a8c9bb; }
.lab-browser-bar strong { margin-left:8px; color:var(--muted); font-size:13px; font-weight:600; }
.lab-frame { display:block; width:100%; height:620px; border:0; background:var(--surface); }
.lab-empty { display:grid; justify-items:center; align-content:center; min-height:400px; padding:30px; border:1px dashed var(--line-strong); border-radius:10px; text-align:center; background:var(--surface); }
.lab-empty span { font-size:31px; color:var(--teal); }
.lab-empty h3 { margin:10px 0 0; }
.lab-empty p { max-width:360px; }
.lab-versions { margin-top:20px; }
.lab-backend { margin-top:20px; padding:28px; }
.lab-features { display:flex; flex-wrap:wrap; gap:8px; margin:14px 0; }
.lab-features span { padding:8px 12px; border-radius:10px; background:var(--tint-soft); color:var(--teal-dark); font-size:13px; }
.lab-runtime { display:flex; flex-wrap:wrap; align-items:center; gap:14px; margin-top:18px; padding-top:18px; border-top:1px solid var(--line-strong); }
.lab-run-form { margin:0; }
.lab-version-list { display:grid; grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); gap:10px; }
.lab-version-list a { display:grid; gap:8px; padding:14px; border:1px solid var(--line-strong); border-radius:10px; text-decoration:none; color:var(--ink); overflow-wrap:anywhere; }
.lab-version-list a[aria-current="page"],.lab-version-list a:hover { border-color:var(--teal); background:var(--tint-soft); }
.lab-version-list small { color:var(--muted); }
@media(max-width:950px) { .lab-layout { grid-template-columns:1fr; } }
@media(max-width:680px) { .lab-editor,.lab-preview-card,.lab-versions,.lab-backend { padding:20px; } .lab-frame { height:540px; } }
@media(max-width:680px) { body:has(.lab-field textarea:focus) .bruno-pet { visibility:hidden; } }
.work-heading p { max-width:680px; }

.investor-quote { border-left:3px solid var(--line-teal); padding:10px 14px; margin:16px 0; background:var(--tint-soft); font-size:13px; line-height:1.6; }
/* Разбор и план */
.work-grid.review-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
.review-summary h2 { font-size:25px; }
.review-risk { padding:12px 0; border-top:1px solid var(--line); }
.review-risk:first-of-type { border-top:0; }
.review-risk p { margin:6px 0 0; }
.review-step { display:grid; grid-template-columns:110px minmax(0,1fr); gap:18px; padding:18px 0; border-top:1px solid var(--line); }
.review-step:first-of-type { border-top:0; }
.review-week { color:var(--teal); font-size:13px; font-weight:800; padding-top:2px; }
.review-step-body p { margin:8px 0 12px; }
.review-step .task-criterion { margin:10px 0 14px; }
@media(max-width:900px) { .work-grid.review-grid { grid-template-columns:1fr; } }
@media(max-width:680px) { .review-step { grid-template-columns:1fr; gap:6px; } }
/* Оценка ответа Бруно и запись результата в дневник */
.feedback-form { display:flex; flex-wrap:wrap; align-items:center; gap:6px; margin-top:6px; }
.feedback-button { border:1px solid var(--line-strong); background:var(--surface); border-radius:10px; padding:2px 9px; font-size:13px; cursor:pointer; opacity:.55; }
.feedback-button:hover, .feedback-button.is-active { opacity:1; border-color:var(--teal); }
.feedback-comment { flex:1 1 180px; min-width:0; border:1px solid var(--line-strong); border-radius:8px; padding:5px 9px; font-size:13px; }
.feedback-save { border:0; background:var(--teal); color:var(--on-accent); border-radius:8px; padding:5px 10px; font-size:13px; cursor:pointer; }
.evidence-link { display:inline-block; margin-top:6px; font-size:13px; font-weight:700; color:var(--teal-dark); }

/* Панель акул: у каждой акулы свой цвет. Тимур бирюзовый, Вадим синий, Маргарита коралловая; фиолетовый остался за Олегом из старых панелей. */
.shark-timur { --shark:var(--teal); --on-shark:var(--on-accent); }
.shark-vadim { --shark:#2f63c0; }
.shark-margarita { --shark:#b9481f; }
.shark-oleg { --shark:#534ab7; }
.shark-timur,.shark-vadim,.shark-margarita,.shark-oleg { --shark-soft:color-mix(in srgb,var(--shark) 14%,var(--surface)); }
.message-assistant[class*="shark-"] .message-avatar { background:var(--shark); color:var(--on-shark,#fff); }
.message-assistant[class*="shark-"] .message-meta { color:var(--shark); }
.shark-avatar { display:grid; place-items:center; flex:none; width:36px; height:36px; border-radius:50%; color:var(--on-accent); background:var(--shark,var(--teal)); font-weight:800; font-size:16px; transition:background .3s; }
/* Стол панели над разговором: три места по порядку. Говорящая акула подсвечена её цветом, точки под именем — заданные главные вопросы. */
.conversation-toolbar:has(.panel-bench) { padding:10px 12px 10px 14px; }
.panel-bench { list-style:none; margin:0 auto 0 0; padding:0; display:flex; gap:4px; min-width:0; }
.bench-seat { display:flex; align-items:center; gap:10px; padding:5px 12px 5px 5px; border-radius:999px; transition:background .3s; }
.bench-seat .shark-avatar { position:relative; width:32px; height:32px; font-size:13px; }
.bench-seat.is-current { background:var(--shark-soft); }
.bench-seat.is-current .shark-avatar { box-shadow:0 0 0 2px var(--shark-soft),0 0 0 4px var(--shark); }
/* Короткая волна вокруг аватара, когда слово переходит к акуле: три раза, потом тихо. */
.bench-seat.is-current .shark-avatar::after { content:""; position:absolute; inset:-4px; border-radius:50%; border:2px solid var(--shark); opacity:0; animation:bench-speak 1.8s ease-out 3; }
@keyframes bench-speak { from { opacity:.8; transform:scale(1); } to { opacity:0; transform:scale(1.35); } }
.bench-seat.is-waiting .shark-avatar { background:#c3cdd4; }
.bench-seat.is-waiting strong { color:var(--muted); }
.bench-text { display:grid; min-width:0; line-height:1.25; }
.bench-text strong { font-size:13px; }
.bench-text small { color:var(--muted); font-size:13px; white-space:nowrap; }
.bench-seat.is-current .bench-text small { color:var(--ink); font-weight:700; }
.bench-pips { display:flex; gap:3px; }
.bench-pips i { width:6px; height:6px; border-radius:50%; background:var(--surface-3); }
.bench-pips i.is-on { background:var(--shark); }
.chat-layout.is-panel { grid-template-columns:minmax(0,1fr); max-width:1000px; }
/* Вопросы кончились: на месте поля ввода остаётся одна кнопка. */
.panel-finish { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:12px 18px; padding:16px 18px; border-top:1px solid var(--line); background:var(--surface-2); }
.panel-finish strong { display:block; font-size:16px; }
.panel-finish span { display:block; max-width:46ch; color:var(--muted); font-size:13px; line-height:1.5; }
.chat-composer.is-panel .file-button { display:none; }
.chat-composer.is-panel .composer-bottom { justify-content:flex-end; }
/* Оценки под репликами акул не отвлекают от разговора: всплывают на краю реплики при наведении, поставленная оценка видна всегда. */
@media (hover:hover) {
  .message-assistant[class*="shark-"] .message-body { position:relative; }
  .message-assistant[class*="shark-"] .feedback-form:not(:has(.is-active)) { position:absolute; right:12px; bottom:-14px; margin:0; opacity:0; transition:opacity .2s; }
  .message-assistant[class*="shark-"]:hover .feedback-form,.message-assistant[class*="shark-"]:focus-within .feedback-form { opacity:1; }
}
/* Картина проекта: четыре части модели заработка, неназванные приглушены. */
.revenue-card { margin-top:16px; padding-top:14px; border-top:1px solid var(--line); }
.revenue-card > strong { display:block; font-size:13px; }
.revenue-card > small { display:block; color:var(--muted); font-size:13px; }
.revenue-card ul { list-style:none; margin:10px 0 0; padding:0; display:grid; gap:8px; }
.revenue-card span { display:block; font-size:13px; font-weight:800; color:var(--teal-dark); }
.revenue-card p { margin:2px 0 0; font-size:13px; line-height:1.45; overflow-wrap:anywhere; }
.revenue-card .is-missing span,.revenue-card .is-missing p { color:var(--muted); }
/* Бруно передаёт акулам, откуда основатель ждёт деньги. */
.funding-note { margin:10px 0 0; padding:9px 12px; border:1px dashed var(--line-strong); border-radius:8px; background:var(--surface); font-size:13px; line-height:1.5; }
.funding-note a { color:var(--teal-dark); font-weight:700; }
/* Итог голосования: решение каждой акулы, её довод и условие. */
.panel-verdict { margin-top:20px; padding:26px; }
.verdict-head { display:flex; flex-wrap:wrap; align-items:flex-start; justify-content:space-between; gap:12px 20px; }
.verdict-head h2 { margin:0; font-size:25px; }
.verdict-actions { display:flex; flex-wrap:wrap; gap:8px; }
.verdict-actions .button,.small-button { min-height:38px; padding:8px 14px; font-size:13px; }
.panel-reveal-status { min-height:1.4em; margin:4px 0 0; color:var(--muted); font-size:13px; font-weight:700; }
.panel-verdict .vote-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(240px,1fr)); gap:14px; margin-top:16px; }
.vote-card { display:flex; flex-direction:column; gap:12px; padding:18px; border:1px solid var(--line); border-radius:10px; background:var(--surface); box-shadow:inset 0 3px 0 var(--shark); font-size:13px; line-height:1.6; transition:opacity .5s,translate .5s; }
.vote-card.is-pending { opacity:.08; translate:0 8px; }
.vote-head { display:flex; align-items:center; gap:10px; }
.vote-head strong { display:block; font-size:16px; }
.vote-head small { display:block; color:var(--muted); font-size:13px; }
.vote-badge { margin-left:auto; padding:4px 10px; border-radius:999px; font-size:13px; font-weight:800; white-space:nowrap; }
.vote-invest { color:var(--teal-dark); background:var(--tint); }
.vote-pass { color:var(--danger); background:var(--danger-bg); }
.vote-reason,.vote-quote { margin:0; }
.vote-quote { color:var(--muted); font-size:13px; }
.vote-condition { padding:10px 12px; border-left:3px solid var(--shark); border-radius:0 8px 8px 0; background:var(--surface-2); }
.vote-condition strong { display:block; font-size:13px; }
.vote-condition p { margin:2px 0 0; }
.vote-card > form,.vote-card > .evidence-link,.vote-card > .muted { margin-top:auto; }
.verdict-note { margin:16px 0 0; color:var(--muted); font-size:13px; }
.investor-history .history-row { grid-template-columns:1fr auto; }
/* Старт панели: три аватара вместо номера, выбор того, кто решает о деньгах. */
.panel-trio { display:flex; }
.panel-trio i { display:grid; place-items:center; width:30px; height:30px; border:2px solid var(--line); border-radius:50%; color:var(--on-shark,#fff); background:var(--shark); font-style:normal; font-size:13px; font-weight:800; }
.panel-trio i + i { margin-left:-9px; }
.panel-start-form { display:grid; gap:14px; margin-top:16px; }
.panel-start-form .button { justify-self:start; margin-top:2px; }
.panel-audience { min-width:0; margin:0; padding:0; border:0; }
.panel-audience legend { margin-bottom:8px; padding:0; color:var(--muted); font-size:13px; font-weight:700; }
.panel-audience-options { display:flex; flex-wrap:wrap; gap:6px; }
.panel-audience label { position:relative; }
.panel-audience input { position:absolute; inset:0; width:100%; height:100%; margin:0; opacity:0; cursor:pointer; }
.panel-audience span { display:block; padding:8px 14px; border:1px solid var(--line-strong); border-radius:999px; background:var(--surface); font-size:13px; font-weight:600; transition:background .15s,border-color .15s,color .15s; }
.panel-audience input:checked + span { color:#fff; background:var(--navy); border-color:var(--navy); }
.panel-audience input:focus-visible + span { outline:3px solid var(--teal); outline-offset:2px; }
.panel-funder { display:grid; gap:6px; color:var(--muted); font-size:13px; font-weight:700; }
.panel-funder small { font-weight:400; }
.panel-funder input { width:100%; padding:10px 12px; border:1px solid var(--line-strong); border-radius:8px; background:var(--surface); color:var(--ink); font:inherit; font-size:16px; font-weight:500; }
.panel-funder input:focus { outline:none; border-color:var(--teal); box-shadow:0 0 0 3px rgba(22,135,125,.11); }
.panel-heard { margin:0; padding:10px 12px; border-radius:10px; background:var(--tint-soft); font-size:13px; line-height:1.5; }
.panel-sharks { list-style:none; margin:0; padding:0; display:grid; gap:12px; }
.panel-sharks li { display:flex; align-items:flex-start; gap:12px; }
.panel-sharks .shark-avatar { width:32px; height:32px; font-size:13px; }
.panel-sharks strong { display:block; font-size:13px; }
.panel-sharks small { display:block; color:var(--muted); font-size:13px; line-height:1.5; }
@supports selector(:has(*)) {
  .panel-start:not(:has(input[value="institution"]:checked,input[value="company"]:checked)) .panel-funder,
  .panel-start:has(input[value="institution"]:checked,input[value="company"]:checked) .panel-sharks[data-audience="investors"],
  .panel-sharks[data-audience="institution"],.panel-sharks[data-audience="company"] { display:none; }
  .panel-start:has(input[value="institution"]:checked) .panel-sharks[data-audience="institution"],
  .panel-start:has(input[value="company"]:checked) .panel-sharks[data-audience="company"] { display:grid; }
}
@media (prefers-reduced-motion:reduce) {
  .vote-card,.bench-seat,.shark-avatar,.panel-audience span { transition:none; }
  .bench-seat.is-current .shark-avatar::after { animation:none; }
}
@media (max-width:680px) {
  .panel-bench { gap:2px; }
  .bench-seat { gap:6px; padding:4px 8px 4px 4px; }
  .bench-seat:not(.is-current) .bench-text,.bench-text small { display:none; }
  .panel-verdict { padding:18px; }
  .verdict-head h2 { font-size:20px; }
}
/* Free lab controls and private usage summary. */
.lab-customize{margin-top:24px;padding:28px}
.lab-settings-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;margin:20px 0}
.lab-settings-grid input,.lab-settings-grid select,.lab-field select{width:100%;min-width:0}
.lab-usage{margin-top:24px;border-top:1px solid var(--border,var(--line));padding-top:18px}
.lab-usage p{margin:8px 0}
@media(max-width:900px){.lab-settings-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:520px){.lab-customize{padding:20px}.lab-settings-grid{grid-template-columns:1fr}}

/* Reviewed backend modules in the laboratory. */
.lab-module-form{margin-top:24px;padding-top:20px;border-top:1px solid var(--line)}
.lab-module-form fieldset{border:1px solid var(--line);border-radius:10px;padding:18px;margin:18px 0}
.lab-module-form legend{padding:0 8px;font-weight:700}
.lab-module-form #id_modules{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.lab-module-form input[type=checkbox]{width:auto;accent-color:var(--accent);margin-right:8px}
@media(max-width:600px){.lab-module-form #id_modules{grid-template-columns:1fr}}

/* Full-window laboratory viewer. Native dialog keeps background controls inert. */
body.lab-viewer-open { overflow:hidden; }
.lab-expand { margin-top:16px; }
.lab-viewer { display:block; position:static; width:100%; max-width:none; max-height:none; margin:0; padding:0; border:0; background:var(--surface); color:var(--ink); }
.lab-viewer[open] { display:flex; flex-direction:column; position:fixed; inset:0; width:100vw; height:100dvh; border-radius:0; }
.lab-viewer::backdrop { background:var(--navy); }
.lab-viewer-toolbar { display:none; flex-shrink:0; align-items:center; justify-content:space-between; gap:16px; padding:12px max(18px,env(safe-area-inset-right)) 12px max(18px,env(safe-area-inset-left)); background:var(--tint-soft); border-bottom:1px solid var(--line-strong); }
.lab-viewer[open] .lab-viewer-toolbar { display:flex; }
.lab-viewer-toolbar>div { display:grid; gap:3px; min-width:0; }
.lab-viewer-toolbar strong { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.lab-viewer-hint { font-size:13px; color:var(--muted); }
.lab-viewer-close { display:flex; align-items:center; gap:14px; flex-shrink:0; padding:9px 14px; border:1px solid var(--line-strong); border-radius:10px; background:var(--surface); color:var(--ink); font:inherit; font-size:13px; font-weight:700; cursor:pointer; }
.lab-viewer-close>span:last-child { font-size:25px; line-height:1; }
.lab-viewer-close:hover { background:var(--tint); }
.lab-viewer-close:focus-visible { outline:3px solid var(--teal); outline-offset:3px; }
.lab-viewer-content { position:relative; }
.lab-viewer[open] .lab-viewer-content { flex:1; min-height:0; border:0; border-radius:0; overflow:hidden; }
.lab-viewer[open] .lab-browser-bar { display:none; }
.lab-viewer[open] .lab-frame { height:100%; }
.lab-frame[hidden],.lab-preview-status[hidden] { display:none; }
.lab-preview-status { display:grid; align-content:center; justify-items:start; min-height:620px; padding:28px; color:var(--muted); }
.lab-preview-status p { margin:0 0 16px; }
.lab-viewer[open] .lab-preview-status { height:100%; min-height:0; }
@media(max-width:540px) { .lab-viewer-toolbar { gap:10px; padding-top:max(10px,env(safe-area-inset-top)); } .lab-viewer-close { padding:8px 12px; } .lab-viewer-close>span:first-child { display:none; } .lab-viewer-hint { font-size:13px; } }

/* Compact laboratory: two sections, tools and history revealed on demand. */
.lab-heading { margin-bottom:18px; }
.lab-heading h1 { margin-top:0; }
.lab-heading p { margin:0; }
.lab-section-tabs { display:flex; gap:6px; width:fit-content; max-width:100%; padding:5px; margin:0 0 22px; border:1px solid var(--line); border-radius:10px; background:var(--tint); }
.lab-section-tabs a { padding:11px 18px; border-radius:8px; color:var(--muted); font-size:16px; font-weight:700; text-decoration:none; }
.lab-section-tabs a[aria-current=page] { background:var(--surface); color:var(--teal);  }
.lab-section-panel[hidden] { display:none; }
.lab-compact-layout { grid-template-columns:minmax(310px,.9fr) minmax(0,1.4fr); }
.lab-compact-layout .lab-editor h2,.lab-compact-layout .lab-preview-card h2 { margin-top:0; }
.lab-compact-layout .lab-preview-card .section-top { gap:12px; flex-wrap:wrap; }
.lab-compact-layout .lab-preview-card .section-top h2 { margin-bottom:0; }
.lab-tools,.lab-history { border:1px solid var(--line); border-radius:10px; background:var(--surface); }
.lab-tools>summary,.lab-history>summary { display:flex; align-items:center; gap:10px; padding:14px 16px; cursor:pointer; font-weight:700; list-style:none; }
.lab-tools>summary::-webkit-details-marker,.lab-history>summary::-webkit-details-marker { display:none; }
.lab-tools>summary:after,.lab-history>summary:after { content:'⌄'; margin-left:auto; color:var(--teal); transition:transform .15s; }
.lab-tools[open]>summary:after,.lab-history[open]>summary:after { transform:rotate(180deg); }
.lab-tools>summary small,.lab-history>summary small { font-size:13px; color:var(--muted); font-weight:500; }
.lab-tool-panels { display:grid; gap:12px; padding:0 12px 12px; }
.lab-tool-card { padding:16px; border:1px solid var(--line); border-radius:8px; background:var(--surface); min-width:0; }
.lab-tool-card h3 { margin:0 0 12px; font-size:16px; }
.lab-tool-card p { margin:0 0 12px; }
.lab-tool-card .lab-settings-grid { grid-template-columns:repeat(2,minmax(0,1fr)); margin:0 0 14px; gap:12px; }
.lab-tool-card .field { gap:7px; font-size:13px; }
.lab-tool-card .field input,.lab-tool-card .field select { font-size:13px; }
.lab-tool-card .button { padding:10px 13px; font-size:13px; }
.lab-grouped-modules { margin:0; padding:0; border:0; }
.lab-grouped-modules fieldset { border:0; padding:0; margin:0 0 14px; }
.lab-grouped-modules legend { padding:0; margin-bottom:8px; font-size:13px; color:var(--muted); }
.lab-module-options { display:grid; gap:6px; }
.lab-module-option { display:flex; align-items:flex-start; gap:9px; padding:8px 9px; border-radius:8px; background:var(--tint-soft); font-size:13px; line-height:1.4; cursor:pointer; }
.lab-module-option:hover { background:var(--tint); }
.lab-grouped-modules .lab-module-option input { margin:2px 0 0; width:15px; height:15px; flex-shrink:0; accent-color:var(--teal); }
.lab-editor-actions { margin-top:18px; }
.lab-status:empty { display:none; }
.lab-cost-details { margin-top:18px; padding-top:14px; border-top:1px solid var(--line); font-size:13px; }
.lab-cost-details summary { display:flex; justify-content:space-between; gap:12px; color:var(--muted); cursor:pointer; }
.lab-cost-details strong { color:var(--ink); }
.lab-cost-details p { margin:10px 0 0; }
.lab-preview-actions { margin-top:16px; }
.lab-publish-compact { margin-top:18px; padding-top:18px; border-top:1px solid var(--line); }
.lab-publish-row { display:flex; align-items:center; flex-wrap:wrap; gap:12px; }
.lab-publish-row>.button { font-size:13px; }
.lab-audience { display:flex; gap:3px; min-width:0; margin:0; padding:4px; border:1px solid var(--line); border-radius:8px; background:var(--tint-soft); }
.lab-audience label { position:relative; display:flex; cursor:pointer; font-size:13px; font-weight:600; }
.lab-audience input { position:absolute; opacity:0; width:1px; height:1px; }
.lab-audience span { padding:9px 11px; border-radius:8px; color:var(--muted); }
.lab-audience input:checked+span { color:var(--teal); background:var(--surface); box-shadow:0 1px 4px #20392c14; }
.lab-audience input:focus-visible+span { outline:2px solid var(--teal); outline-offset:2px; }
.lab-publish-help,.lab-site-details { font-size:13px; color:var(--muted); }
.lab-publish-help summary,.lab-site-details summary { cursor:pointer; }
.lab-publish-help p { margin:10px 0 0; }
.lab-site-details { margin-top:18px; }
.lab-site-details .button { font-size:13px; padding:10px 13px; }
.lab-globalization-heading { display:flex; justify-content:space-between; gap:20px; flex-wrap:wrap; align-items:flex-start; }
.lab-globalization-heading h2 { font-size:25px; margin:0 0 8px; }
.lab-globalization-heading p { margin:0; }
.lab-feedback-version { display:grid; gap:6px; font-size:13px; min-width:0; max-width:100%; }
.lab-feedback-version>div { display:flex; gap:8px; }
.lab-feedback-version select { min-width:0; max-width:320px; padding:9px; border:1px solid var(--line-strong); border-radius:8px; background:var(--surface); color:var(--ink); font:inherit; }
.lab-feedback-version .button { padding:9px 12px; font-size:13px; }
.lab-feedback-actions { display:flex; flex-wrap:wrap; gap:10px; align-items:center; margin-top:16px; }
.lab-feedback-actions form { margin:0; }
.lab-feedback-actions .button { padding:10px 13px; font-size:13px; }
.lab-history { margin-top:22px; background:var(--surface); }
.lab-history-list { display:grid; max-height:360px; overflow-y:auto; padding:0 12px 12px; }
.lab-history-entry { border-bottom:1px solid var(--line); padding-bottom:10px; }
.lab-history-list a { display:flex; justify-content:space-between; align-items:center; gap:12px; padding:13px 12px; color:var(--ink); text-decoration:none; border-radius:8px; }
.lab-history-list a>span:first-child { display:grid; gap:6px; min-width:0; }
.lab-history-list strong { font-size:13px; overflow-wrap:anywhere; }
.lab-history-list small { color:var(--muted); font-size:13px; }
.lab-history-list a[aria-current=page],.lab-history-list a:hover { background:var(--tint-soft); }
.lab-current-version { font-size:13px; color:var(--teal); flex-shrink:0; }
.lab-history-report { margin:0 12px; font-size:13px; }
.lab-history-report>summary { cursor:pointer; padding:5px 0; color:var(--teal); }
.lab-history-report-content { margin-top:8px; padding:14px; background:var(--tint-soft); border-radius:8px; overflow-wrap:anywhere; }
.lab-history-prompt { display:grid; gap:6px; margin:0 0 14px; }
.lab-history-prompt span { white-space:pre-wrap; }
.lab-history-report-title { font-weight:700; margin:0 0 8px; }
.lab-history-report ul { margin:0; padding-left:17px; line-height:1.6; color:var(--muted); }
@media(max-width:950px) { .lab-compact-layout { grid-template-columns:1fr; } }
@media(max-width:540px) {
  .lab-section-tabs { width:100%; }
  .lab-section-tabs a { flex:1; padding:10px 9px; text-align:center; font-size:13px; }
  .lab-tool-panels { padding:0 8px 8px; }
  .lab-tool-card { padding:13px; }
  .lab-tools>summary,.lab-history>summary { padding:13px; font-size:13px; }
  .lab-tools>summary small { font-size:13px; }
  .lab-publish-row { gap:6px; }
  .lab-publish-row>.button { padding:11px 10px; font-size:13px; }
  .lab-audience label { font-size:13px; }
  .lab-audience span { padding:9px 8px; }
  .lab-feedback-version { width:100%; }
  .lab-feedback-version select { flex:1; width:0; max-width:none; }
}

/* Bruno's workshop covers the prototype for the entire generation request. */
.lab-empty-wrapper { position:relative; }
.lab-forge[hidden] { display:none; }
.lab-forge { position:absolute; inset:38px 0 0; z-index:5; display:flex; flex-direction:column; align-items:center; justify-content:center; padding:24px 18px; overflow:hidden; border-radius:0 0 10px 10px; background:radial-gradient(ellipse at 55% 45%,var(--cream) 0,var(--tint-soft) 55%,var(--tint-soft) 100%); text-align:center; color:var(--ink); cursor:wait; }
.lab-empty-wrapper .lab-forge,.lab-viewer[open] .lab-forge { inset:0; border-radius:10px; }

/* A temporary report below the preview; the saved copy stays in history. */
.lab-reply{display:flex;align-items:center;gap:14px;margin:18px 0 20px;min-width:0}
.lab-reply[hidden]{display:none}
.lab-reply-archive{display:block;width:fit-content;margin:8px 0 18px;font-size:13px;color:var(--teal);text-decoration:none}
.lab-reply-archive:hover{text-decoration:underline}
.lab-reply-mascot{flex:0 0 82px;align-self:flex-start;padding-top:18px}
.lab-reply-mascot .bruno-art{width:82px;margin:0;pointer-events:none}
.lab-reply-bubble{position:relative;flex:1;min-width:0;padding:15px 18px;border:1px solid var(--line-strong);border-radius:16px;background:var(--tint-soft);overflow-wrap:anywhere}
.lab-reply-bubble:before{content:"";position:absolute;left:-6px;top:38px;width:10px;height:10px;background:var(--tint-soft);border-left:1px solid var(--line-strong);border-bottom:1px solid var(--line-strong);transform:rotate(45deg)}
.lab-reply-heading{display:flex;justify-content:space-between;align-items:center;gap:10px;color:var(--teal);font-size:13px}
.lab-reply-heading small{color:var(--muted);font-size:13px}
.lab-preview-card .lab-reply #lab-reply-title{margin:6px 0 8px;font-size:16px;font-weight:700;line-height:1.4}
.lab-reply ul{margin:0;padding-left:17px;font-size:13px;line-height:1.55;color:var(--muted)}
.lab-reply li+li{margin-top:4px}
.lab-reply details{margin-top:8px;font-size:13px}.lab-reply summary{cursor:pointer;color:var(--teal)}
.lab-reply-usage{display:block;margin-top:10px;color:var(--muted);font-size:13px}
.lab-reply-error .lab-reply-bubble{border-color:var(--line-strong);background:var(--cream)}
.lab-reply-error .lab-reply-bubble:before{border-color:var(--line-strong);background:var(--cream)}
@media(max-width:500px){.lab-reply{gap:10px}.lab-reply-mascot{flex-basis:58px}.lab-reply-mascot .bruno-art{width:58px}.lab-reply-bubble{padding:12px 14px}.lab-reply-heading small{font-size:13px}}
/* Бруно-наставник: подсказки-ответы, картина проекта и идеи под сообщением. */
.quick-replies{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:8px}
.quick-reply{min-height:36px;border:1px solid var(--line-strong);background:var(--tint-soft);color:var(--teal-dark);border-radius:999px;padding:5px 12px;font-size:13px;font-weight:600;cursor:pointer}
.quick-reply:hover,.quick-reply:focus-visible{background:var(--tint);border-color:var(--teal)}
.picture-card h3{margin:4px 0 10px}
.picture-list{list-style:none;margin:0;padding:0;display:grid;gap:8px}
.picture-list li{padding:2px 0}
.picture-list li.picture-fact .picture-label em{color:var(--fact)}
.picture-list li.picture-guess .picture-label em{color:var(--warn)}
.picture-list p{margin:2px 0 0;font-size:13px;line-height:1.4;overflow-wrap:anywhere}
.picture-list li.picture-unknown p{color:var(--muted)}
.picture-label{font-size:13px;font-weight:700;color:var(--ink)}
.picture-label em{font-style:normal;font-weight:600;color:var(--muted);margin-left:4px}
.picture-edit{margin-top:12px;font-size:13px}
.picture-edit summary{cursor:pointer;color:var(--teal);font-weight:700}
.picture-edit form{display:grid;gap:6px;margin-top:8px}
.picture-edit label{display:grid;gap:3px;font-size:13px;font-weight:700}
.picture-edit textarea,.picture-edit select{width:100%;border:1px solid var(--line-strong);border-radius:8px;padding:5px 8px;font:inherit;font-size:13px}
.idea-list{margin-top:10px;display:grid;gap:8px}
.idea-row{display:flex;gap:10px;align-items:center;justify-content:space-between;border:1px solid var(--line-strong);border-radius:10px;padding:8px 10px;background:var(--surface)}
.idea-row strong{display:block;font-size:13px}
.idea-row small{display:block;font-size:13px;color:var(--muted);margin-top:2px}
.idea-row form{flex:none}
@media(max-width:600px){.idea-row{flex-direction:column;align-items:stretch}}
/* Chat search (Bruno and direct messages): magnifier in the header, bar, results list. */
.conversation-toolbar { display:flex; align-items:center; justify-content:flex-end; gap:12px; min-height:52px; padding:7px 12px 7px 24px; border-bottom:1px solid var(--line); }
.conversation-toolbar .community-pagination { margin:0 auto 0 0; justify-content:flex-start; flex-wrap:wrap; gap:6px 16px; }
.direct-chat-header > .direct-chat-actions { display:flex; align-items:center; gap:8px; flex:0 0 auto; }
.chat-search-toggle { flex:none; display:inline-grid; place-items:center; width:38px; height:38px; padding:0; border:0; border-radius:50%; background:transparent; color:var(--muted); cursor:pointer; transition:background-color .15s, color .15s; }
.chat-search-toggle:hover,.chat-search-toggle[aria-expanded="true"] { background:var(--tint); color:var(--teal-dark); }
.chat-search-toggle:focus-visible,.chat-search-bar button:focus-visible,.chat-search-result:focus-visible { outline:2px solid var(--teal); outline-offset:2px; }
.chat-search { position:relative; z-index:3; background:var(--surface); border-bottom:1px solid var(--line); }
.chat-search-bar { display:flex; align-items:center; gap:4px; padding:6px 10px 6px 16px; }
.chat-search-bar > svg { flex:none; color:var(--muted); }
.chat-search-input { flex:1; min-width:0; padding:9px 6px; border:0; background:transparent; color:var(--ink); font-size:16px; outline:none; }
.chat-search-input::-webkit-search-cancel-button { display:none; }
.chat-search-count { padding:0 6px; color:var(--muted); font-size:13px; white-space:nowrap; font-variant-numeric:tabular-nums; }
.chat-search-bar button { flex:none; display:inline-grid; place-items:center; width:34px; height:34px; padding:0; border:0; border-radius:50%; background:transparent; color:var(--ink); cursor:pointer; }
.chat-search-bar button:hover:not(:disabled) { background:var(--surface-3); }
.chat-search-bar button:disabled { opacity:.3; cursor:default; }
.chat-search-results { position:absolute; top:100%; left:0; right:0; max-height:min(330px, 50vh); margin:0; padding:6px; overflow-y:auto; list-style:none; background:var(--surface); border-bottom:1px solid var(--line); box-shadow:var(--shadow-pop); }
.chat-search-result { display:block; width:100%; padding:9px 12px; border:0; border-radius:8px; background:transparent; color:var(--ink); text-align:left; cursor:pointer; }
.chat-search-result:hover,.chat-search-result.is-active { background:var(--tint-soft); }
.chat-search-result-meta { display:flex; justify-content:space-between; gap:12px; margin-bottom:3px; color:var(--muted); font-size:13px; }
.chat-search-result-meta strong { color:var(--ink); font-weight:600; }
.chat-search-result-text { display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; font-size:13px; line-height:1.45; overflow-wrap:anywhere; }
.chat-search-empty { padding:12px; color:var(--muted); font-size:13px; line-height:1.5; }
mark.chat-search-hit { padding:0 1px; border-radius:3px; background:var(--warn-bg); color:var(--ink); }
mark.chat-search-hit.is-current { background:color-mix(in srgb,var(--warn) 35%,var(--surface)); }
.is-search-current { border-radius:10px; animation:chat-search-flash 1.8s ease-out; }
@keyframes chat-search-flash { 0%, 35% { outline:3px solid #f5b544; outline-offset:4px; } 100% { outline:3px solid transparent; outline-offset:4px; } }
@media (max-width:680px) { .conversation-toolbar { padding:6px 8px 6px 15px; } .chat-search-bar { padding:4px 4px 4px 12px; } .chat-search-bar button { width:32px; height:32px; } .chat-search-count { padding:0 2px; font-size:13px; } }
@media (prefers-reduced-motion:reduce) { .is-search-current { animation:none; outline:3px solid #f5b544; outline-offset:4px; } }

/* «Клиент и ценность»: ABCDX → брейншторм по сегменту A → ценностное предложение */
.picture-value { margin-top:16px; padding:14px 16px; border-radius:10px; background:var(--cream); font-size:13px; display:grid; gap:8px; }
.picture-value p { margin:0; line-height:1.5; }
.picture-value form { margin:0; }
.value-current { padding:22px 28px; margin-bottom:20px; border-color:var(--line-teal); }
.value-current p { margin:8px 0 0; font-size:20px; line-height:1.5; font-weight:600; }
.value-steps { list-style:none; margin:0; padding:0; }
.value-step-head { display:flex; justify-content:space-between; align-items:flex-start; gap:16px; margin-bottom:14px; }
.value-step-head h2 { display:inline; font-size:20px; margin:0; }
.value-step-head p { margin:8px 0 0; max-width:620px; }
.value-step-head form { flex-shrink:0; display:grid; gap:6px; justify-items:end; }
.value-step-number { display:inline-grid; place-items:center; width:30px; height:30px; margin-right:10px; border-radius:50%; background:var(--teal); color:var(--on-accent); font-weight:800; font-size:16px; vertical-align:2px; }
.value-grade-help { list-style:none; margin:10px 0 0; padding:0; display:grid; gap:6px; font-size:13px; }
.value-grade { display:inline-grid; place-items:center; width:26px; height:26px; border-radius:8px; font-weight:800; margin-right:8px; }
.grade-A { background:var(--tint); color:var(--teal-dark); } .grade-B { background:var(--info-bg); color:var(--info); } .grade-C { background:var(--warn-bg); color:var(--warn); }
.grade-D { background:var(--danger-bg); color:var(--danger); } .grade-X { background:var(--info-bg); color:var(--muted); }
.value-segments { display:grid; gap:10px; margin:16px 0; }
.value-segment { display:grid; grid-template-columns:auto 1fr auto; gap:14px; align-items:start; padding:14px 16px; border:1px solid var(--line); border-radius:10px; background:var(--surface); }
.value-segment.grade-row-A { border-color:var(--line-teal); background:var(--tint-soft); }
.value-segment.grade-row-D { opacity:.7; }
.value-segment-grade select { font-weight:800; padding:6px 8px; border-radius:8px; border:1px solid var(--line-strong); background:var(--surface); }
.value-segment-body h3 { margin:2px 0 6px; font-size:16px; }
.value-segment-body p { margin:0 0 6px; font-size:13px; line-height:1.5; }
.value-segment-body dl { display:grid; grid-template-columns:repeat(auto-fit,minmax(200px,1fr)); gap:6px 16px; margin:6px 0; font-size:13px; }
.value-segment-body dt { color:var(--muted); font-size:13px; }
.value-segment-body dd { margin:2px 0 0; }
.value-delete { font-size:13px; color:var(--muted); white-space:nowrap; display:flex; gap:6px; align-items:center; }
.value-add { margin:14px 0; }
.value-add summary { cursor:pointer; font-weight:700; font-size:13px; color:var(--teal-dark); }
.value-add-fields { display:grid; grid-template-columns:1fr 1fr; gap:12px; margin-top:12px; }
.value-add-fields label, .value-final { display:grid; gap:6px; font-size:13px; font-weight:700; }
.value-add-fields input, .value-add-fields textarea, .value-add-fields select, .value-final textarea { width:100%; padding:10px 12px; border:1px solid var(--line-strong); border-radius:8px; background:var(--surface); font-weight:400; font-size:16px; }
.value-subtitle { font-size:16px; margin:18px 0 8px; }
.value-table { display:grid; border:1px solid var(--line); border-radius:10px; overflow:hidden; margin-bottom:12px; }
.value-table-row { display:grid; grid-template-columns:36px 1fr 1fr 1fr; gap:12px; padding:11px 14px; border-top:1px solid var(--line); font-size:13px; line-height:1.45; cursor:pointer; }
.value-table-row:first-child { border-top:0; }
.value-table-row:hover:not(.value-table-head) { background:var(--tint-soft); }
.value-table-row:has(input:checked) { background:var(--tint-soft); }
.value-table-head { background:var(--tint-soft); color:var(--muted); font-size:13px; font-weight:700; cursor:default; }
.value-table-jobs .value-table-row { grid-template-columns:36px 150px 1fr 1fr; }
.value-kind { display:inline-block; padding:3px 8px; border-radius:16px; font-size:13px; font-weight:700; background:var(--surface-3); }
.kind-functional { background:var(--info-bg); color:var(--info); } .kind-social { background:var(--info-bg); color:var(--info); } .kind-emotional { background:var(--cream); color:var(--cocoa); }
.value-options { border:0; padding:0; margin:0 0 14px; display:grid; gap:8px; }
.value-option { display:flex; gap:12px; align-items:flex-start; padding:12px 14px; border:1px solid var(--line); border-radius:10px; cursor:pointer; font-size:16px; line-height:1.5; }
.value-option:has(input:checked) { border-color:var(--teal); background:var(--tint-soft); }
.value-option input { margin-top:4px; }
.value-option small { display:block; color:var(--muted); font-size:13px; font-weight:700; margin-bottom:2px; }
.value-choose .button { margin-top:12px; }
@media (max-width:720px) {
  .value-step-head { flex-direction:column; }
  .value-step-head form { justify-items:start; }
  .value-segment { grid-template-columns:auto 1fr; }
  .value-delete { grid-column:2; }
  .value-add-fields { grid-template-columns:1fr; }
  .value-table-row, .value-table-jobs .value-table-row { grid-template-columns:28px 1fr; }
  .value-table-row > span:nth-child(n+3) { grid-column:2; }
  .value-table-head { display:none; }
}
.value-insights { display:grid; grid-template-columns:1fr 1fr; gap:14px; margin:4px 0 18px; }
.value-insight { padding:16px 18px; border-radius:10px; background:var(--tint-soft); display:grid; gap:10px; align-content:start; }
.value-insight form { margin:0; }
.value-problem { margin:0; font-size:16px; line-height:1.55; font-weight:600; }
.value-harm { margin:0; font-size:13px; color:var(--muted); line-height:1.5; }
.value-harm-tag { display:inline-block; margin-right:6px; padding:2px 9px; border-radius:16px; background:var(--danger-bg); color:var(--danger); font-size:13px; font-weight:700; }
.value-jobs { list-style:none; margin:0; padding:0; display:grid; gap:8px; font-size:13px; line-height:1.5; }
.value-jobs .value-kind { margin-right:6px; }
.value-options-title { font-size:16px; font-weight:700; margin-bottom:6px; padding:0; }
@media (max-width:720px) { .value-insights { grid-template-columns:1fr; } }
.value-question { margin:0 0 16px; padding:16px 18px; border-radius:10px; border:1px solid var(--line-strong); background:var(--warn-bg); display:grid; gap:8px; }
.value-question p { margin:0; }
.value-question-text { font-size:16px; font-weight:600; line-height:1.5; }
.value-answer { display:flex; gap:10px; align-items:flex-start; }
.value-answer textarea { flex:1; padding:10px 12px; border:1px solid var(--line-strong); border-radius:8px; background:var(--surface); font-size:16px; }
.value-option.is-incomplete { cursor:default; background:var(--bg); }
.value-option.is-incomplete small { color:var(--cocoa); }
@media (max-width:720px) { .value-answer { flex-direction:column; align-items:stretch; } }

/* Мастерская идей */
.idea-seed-card form { display:grid; gap:16px; }
.idea-seed-card .field-help { font-size:13px; }
.idea-seed-actions { display:flex; align-items:center; gap:14px; flex-wrap:wrap; }
.idea-directions { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,330px),1fr)); gap:20px; margin-bottom:20px; align-items:start; }
.idea-directions .idea-direction { margin-bottom:0; display:flex; flex-direction:column; }
.idea-direction.is-pick { border:2px solid var(--teal); }
.idea-direction-head { display:flex; align-items:center; justify-content:space-between; gap:10px; flex-wrap:wrap; }
.idea-pick { font-size:13px; font-weight:700; color:var(--on-accent); background:var(--teal); border-radius:999px; padding:4px 10px; }
.idea-insight { background:var(--cream); }
.idea-warning { background:var(--cream); }
.idea-facts { display:grid; gap:10px; margin:0; font-size:16px; line-height:1.55; }
.idea-facts dt { font-size:13px; font-weight:700;; color:var(--muted); }
.idea-facts dd { margin:2px 0 0; }
.idea-sources { display:flex; flex-wrap:wrap; gap:8px; margin:0 0 12px; }
.idea-actions { display:flex; flex-wrap:wrap; align-items:flex-start; gap:10px; margin-top:auto; padding-top:8px; }
.idea-develop { flex:1 1 100%; }
.idea-develop > summary { list-style:none; display:inline-flex; }
.idea-develop > summary::-webkit-details-marker { display:none; }
.idea-develop[open] > summary { margin-bottom:12px; }
.idea-develop form { display:grid; gap:12px; }
.idea-raw { padding-left:20px; line-height:1.6; }
.idea-raw li { margin-bottom:8px; }
/* Новый проект: два способа */
.create-ways { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,300px),1fr)); gap:16px; max-width:760px; margin:0 0 24px; }
.create-way { display:grid; gap:8px; padding:22px 24px; border:2px solid transparent; color:var(--ink); }
.create-way strong { font-family:Manrope,sans-serif; font-size:20px; }
.create-way span:last-child { color:var(--muted); font-size:16px; line-height:1.55; }
.create-way:hover { border-color:var(--line-strong); }
.create-way[aria-current="page"] { border-color:var(--teal); background:var(--tint-soft); }
@media(max-width:680px) { .create-ways { gap:10px; margin-bottom:16px; } .create-way { gap:6px; padding:16px 18px; } .create-way strong { font-size:16px; } .startup-form { padding:20px; gap:16px; } }
.create-workshop { max-width:1100px; }
.idea-card-form .idea-card-refine { display:grid; gap:12px; padding-top:18px; margin-top:6px; border-top:1px solid var(--line); }
.idea-card-form .idea-card-refine .button { justify-self:start; }
/* Мастерская идей: переключатель идей */
.idea-picker { display:grid; gap:16px; margin-bottom:20px; }
.idea-tabs { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,220px),1fr)); gap:12px; }
.idea-tab { display:grid; gap:6px; align-content:start; text-align:left; padding:16px 18px; border:2px solid var(--line); border-radius:16px; background:var(--white); color:var(--ink); transition:border-color .25s ease, box-shadow .25s ease, transform .25s ease; }
.idea-tab:hover { border-color:var(--line-strong); }
.idea-tab strong { font-family:Manrope,sans-serif; font-size:16px; line-height:1.35; }
.idea-tab-number { font-size:13px; font-weight:700;; color:var(--muted); }
.idea-tab .idea-pick { justify-self:start; }
.idea-tab.is-active, .idea-picker .idea-panel.is-active { border:2px solid var(--teal); box-shadow:0 0 0 3px rgba(22,135,125,.11); }
.idea-tab:focus-visible { outline:3px solid rgba(22,135,125,.35); outline-offset:2px; }
.idea-picker .idea-panel { margin-bottom:0; }
.idea-picker.is-enhanced .idea-panel, .idea-picker.is-enhanced .idea-panel-actions { display:none; }
.idea-picker.is-enhanced .idea-panel.is-active { display:block; animation:idea-in .24s cubic-bezier(.16,1,.3,1) both; }
.idea-picker.is-enhanced .idea-panel-actions.is-active { display:flex; animation:idea-in .24s cubic-bezier(.16,1,.3,1) both; }
.idea-advice { margin-bottom:0; background:var(--tint-soft); }
.idea-advice p { margin:8px 0 0; }
.idea-advice.is-updating { animation:idea-fade .35s ease both; }
.idea-competitors { display:flex; flex-wrap:wrap; align-items:center; gap:8px 12px; margin:4px 0 12px; font-size:13px; }
.idea-competitors > span { font-size:13px; font-weight:700;; color:var(--muted); }
.idea-competitors .evidence-link { margin-top:0; }
@keyframes idea-in { from { opacity:0; transform:translateY(10px); } to { opacity:1; transform:none; } }
@keyframes idea-fade { from { opacity:.25; } to { opacity:1; } }
@media (prefers-reduced-motion: reduce) { .idea-tab, .idea-picker.is-enhanced .idea-panel.is-active, .idea-picker.is-enhanced .idea-panel-actions.is-active, .idea-advice.is-updating { animation:none; transition:none; } }
/* «Бруно сейчас работает» */
.bruno-job { display:flex; align-items:center; gap:12px; margin:0 0 20px; padding:14px 18px; border-radius:10px; background:var(--tint); border:1px solid var(--line-strong); color:var(--teal-dark); font-size:16px; font-weight:600; }
.bruno-job-wait { display:flex; align-items:center; gap:10px; }
.bruno-job-dot { flex:none; width:10px; height:10px; border-radius:50%; background:var(--teal); animation:bruno-pulse 1.4s ease-in-out infinite; }
@keyframes bruno-pulse { 0%,100% { opacity:.35; transform:scale(.85); } 50% { opacity:1; transform:scale(1.15); } }
@media (prefers-reduced-motion: reduce) { .bruno-job-dot { animation:none; } }
/* Экономика на странице рынка */
.economics-form { display:grid; gap:14px; margin-top:12px; }
.economics-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,240px),1fr)); gap:14px; align-items:start; }
.economics-form > .button { justify-self:start; }
.economics-block { min-width:0; margin:0; padding:0; border:0; display:grid; gap:10px; }
.economics-block legend { margin-bottom:8px; padding:0; color:var(--ink); font-size:13px; font-weight:700; }
.expense-rows { display:grid; gap:8px; max-width:560px; }
.expense-row { display:grid; grid-template-columns:minmax(0,1fr) 150px; gap:8px; }
.expense-row input { width:100%; border:1px solid var(--line-strong); border-radius:8px; background:var(--surface); color:var(--ink); padding:10px 12px; font:inherit; font-size:16px; outline:none; }
.expense-row input:focus { border-color:var(--teal); box-shadow:0 0 0 3px rgba(22,135,125,.11); }
.expense-foot { display:flex; flex-wrap:wrap; align-items:center; gap:12px; }
.expense-foot .button { padding:7px 12px; font-size:13px; }
.economics-pricing { display:flex; flex-wrap:wrap; gap:6px; }
.economics-pricing label { position:relative; }
.economics-pricing input { position:absolute; inset:0; width:100%; height:100%; margin:0; opacity:0; cursor:pointer; }
.economics-pricing span { display:block; padding:7px 13px; border:1px solid var(--line-strong); border-radius:999px; background:var(--surface); font-size:13px; font-weight:600; }
.economics-pricing input:checked + span { color:#fff; background:var(--navy); border-color:var(--navy); }
.economics-pricing input:focus-visible + span { outline:3px solid var(--teal); outline-offset:2px; }
.economics-form .cost-month { display:none; }
@supports selector(:has(*)) {
  .economics-form:not(:has(input[name="pricing"][value="commission"]:checked)) .economics-commission { display:none; }
  .economics-form:has(input[name="pricing"][value="month"]:checked) .cost-sale { display:none; }
  .economics-form:has(input[name="pricing"][value="month"]:checked) .cost-month { display:inline; }
}
@media (max-width:560px) { .expense-row { grid-template-columns:minmax(0,1fr) 110px; } }

/* iOS увеличивает страницу при фокусе на поле с текстом мельче 16 px — на телефоне поля 16 px. */
@media(max-width:680px) { body:not(.lab-shell) :is(input:not([type=checkbox],[type=radio],[type=file]),textarea,select) { font-size:16px; } }

/* Иконки из founder/_icon.html. */
.icon { display:inline-block; flex:none; width:1.15em; height:1.15em; vertical-align:-.2em; }
.coin-chip .icon { width:16px; height:16px; color:var(--cocoa); }

/* Шапка. На компьютере ссылки стоят в строку, как раньше; обёртка .topnav-links не участвует в раскладке. */
.topnav-links { display:contents; }
.topnav-profile-item,.account-menu-toggle { display:none; }
.topnav .coin-chip { order:1; }
.topnav .wallet-chip,.topnav .pro-badge { order:2; }
.topnav .account-profile-link { order:3; }
.topnav a:not([class]),.topnav .topnav-about { padding-block:13px; }
.site-footer a { color:inherit; text-decoration:underline; text-underline-offset:3px; }
.site-footer a:hover { color:var(--teal-dark); }

/* Телефон: шапка в одну строку. Гостю — логотип, «Войти» и «Создать аккаунт» («О проекте» есть в подвале).
   Вошедшему — логотип, проект, монеты и аватар; аватар открывает меню с остальными ссылками (project-workspace.js). */
@media(max-width:680px) {
  .topbar { position:relative; }
  .topnav .topnav-about { display:none; }
  .topbar:has(.nav-cta) { flex-wrap:nowrap; min-height:64px; padding:10px 14px; }
  .topbar:has(.nav-cta) .topnav { flex:0 0 auto; flex-wrap:nowrap; gap:12px; }
  .topnav .coin-chip { min-height:44px; }
  .js-topnav .topbar { flex-wrap:nowrap; min-height:64px; padding:10px 14px; gap:8px; }
  .js-topnav .topnav { flex:0 0 auto; flex-wrap:nowrap; gap:8px; }
  .js-topnav .account-profile-link { display:none; }
  .js-topnav .account-menu-toggle { position:relative; display:grid; place-items:center; width:44px; height:44px; padding:0; border:0; border-radius:50%; background:none; }
  .js-topnav .topnav:has(.topnav-links .unread-badge:not([hidden])) .account-menu-toggle::after { content:""; position:absolute; top:3px; right:3px; width:11px; height:11px; border:2px solid var(--line); border-radius:50%; background:#c8372d; }
  .js-topnav .topnav-links { position:absolute; top:calc(100% + 6px); right:14px; z-index:70; display:grid; gap:2px; width:min(280px,calc(100vw - 28px)); padding:8px; border:1px solid var(--line); border-radius:10px; background:var(--surface); box-shadow:var(--shadow-pop); opacity:0; visibility:hidden; transform:translateY(-4px); transition:opacity .15s ease-out,transform .15s ease-out,visibility 0s linear .15s; }
  .js-topnav .topnav.is-open .topnav-links { opacity:1; visibility:visible; transform:none; transition-delay:0s; }
  .js-topnav .topnav-links>a,.js-topnav .topnav-links>a.wallet-chip,.js-topnav .topnav-links>a.pro-badge { display:flex; align-items:center; justify-content:space-between; gap:10px; min-height:48px; padding:0 12px; border:0; border-radius:8px; background:transparent; color:var(--ink); font-size:16px; font-weight:600; letter-spacing:0; }
  .js-topnav .topnav-links>a:hover,.js-topnav .topnav-links>a[aria-current] { background:var(--tint-soft); color:var(--teal-dark); }
  .js-topnav .topnav-links>.topnav-profile-item { margin-top:4px; border-top:1px solid var(--line); border-radius:0 0 8px 8px; }
}
@media(max-width:680px) and (prefers-reduced-motion:reduce) { .js-topnav .topnav-links { transform:none; transition:none; } }

/* Смена страницы (вкладки, разделы, карточки — обычные ссылки). Шапка и меню проекта остаются на месте.
   Уход: по клику на ссылку внутри сайта содержимое сразу гаснет, пока грузится новая страница (page-leaving).
   Появление: новое содержимое проявляется и поднимается уже после того, как страница нарисована (page-enter → page-entered),
   поэтому анимацию видно целиком. Классы ставит скрипт в <head> base.html; при обновлении той же страницы анимации нет. */
@media (prefers-reduced-motion:no-preference) {
  .page-enter body:not(.lab-shell) .main-content { opacity:0; transform:translateY(10px); }
  .page-enter.page-entered body:not(.lab-shell) .main-content { opacity:1; transform:none; transition:opacity .38s cubic-bezier(.22,1,.36,1),transform .38s cubic-bezier(.22,1,.36,1); }
  .page-leaving body:not(.lab-shell) .main-content { opacity:0; transform:translateY(-4px); transition:opacity .16s ease-in,transform .16s ease-in; }
  .page-entered .member-profile .avatar-xl { animation:avatar-in .46s cubic-bezier(.22,1,.36,1) .08s backwards; }
}
@keyframes avatar-in { from { opacity:0; transform:scale(.82); } }

/* Карточки-свёртки (<details>) раскрываются и сворачиваются плавно по высоте, содержимое проявляется.
   Выпадающие меню на <details> (переключатель проекта, фильтр, назначение) и лаборатория сюда не входят:
   анимация высоты обрезала бы их списки. Браузеры без ::details-content — проявление содержимого (project-workspace.js). */
@supports selector(::details-content) {
  @media (prefers-reduced-motion:no-preference) {
    :is(.project-card-fold,.project-fold:not(.lab-generation-help),.work-secondary,.priority-help,.mvp-help,.work-proposals,.work-done-when,.history-revisions,.history-direction,.history-details,.readiness-details,.radar-summary-details,.radar-history-switch,.radar-fold,.bruno-recent-conversations,.bruno-hub-tasks,.bruno-hub-achievements,.picture-edit) { interpolate-size:allow-keywords; }
    :is(.project-card-fold,.project-fold:not(.lab-generation-help),.work-secondary,.priority-help,.mvp-help,.work-proposals,.work-done-when,.history-revisions,.history-direction,.history-details,.readiness-details,.radar-summary-details,.radar-history-switch,.radar-fold,.bruno-recent-conversations,.bruno-hub-tasks,.bruno-hub-achievements,.picture-edit)::details-content { height:0; opacity:0; overflow:clip; overflow-clip-margin:8px; transition:height .3s cubic-bezier(.22,1,.36,1),opacity .22s ease-out,content-visibility .3s; transition-behavior:allow-discrete; }
    :is(.project-card-fold,.project-fold:not(.lab-generation-help),.work-secondary,.priority-help,.mvp-help,.work-proposals,.work-done-when,.history-revisions,.history-direction,.history-details,.readiness-details,.radar-summary-details,.radar-history-switch,.radar-fold,.bruno-recent-conversations,.bruno-hub-tasks,.bruno-hub-achievements,.picture-edit)[open]::details-content { height:auto; opacity:1; }
  }
}
details.is-opening>:not(summary) { animation:fold-in .24s cubic-bezier(.22,1,.36,1) both; }
@keyframes fold-in { from { opacity:0; transform:translateY(-4px); } }
@media (prefers-reduced-motion:reduce) { details.is-opening>:not(summary) { animation-name:fold-fade; } @keyframes fold-fade { from { opacity:0; } } }

/* Плавные состояния: у ссылок, кнопок, полей, вкладок и карточек цвет, фон, рамка и тень меняются за 180 мс, а не скачком.
   :where() без специфичности, поэтому собственные переходы компонентов сильнее. Лаборатория не затронута. */
:where(body:not(.lab-shell)) :where(a,button,summary,label,input,select,textarea,[role="tab"],[role="button"],.card,.unread-badge) {
  transition-property:color,background-color,border-color,box-shadow,outline-color,opacity,transform;
  transition-duration:.18s;
  transition-timing-function:ease-out;
}
@media (prefers-reduced-motion:reduce) {
  :where(body:not(.lab-shell)) :where(a,button,summary,label,input,select,textarea,[role="tab"],[role="button"],.card,.unread-badge) { transition-property:color,background-color,border-color,box-shadow,outline-color,opacity; }
}

/* Появление элементов, которые показываются и прячутся: уведомления, поиск по чату, выпадающий список, подсказка радара,
   список акул панели, плавающий Бруно при раскрытии. Анимация запускается каждый раз, когда элемент становится видимым. */
@media (prefers-reduced-motion:no-preference) {
  .flash { animation:pop-down .3s cubic-bezier(.22,1,.36,1) backwards; }
  .chat-search:not([hidden]),.chat-search-results:not([hidden]) { animation:pop-down .22s cubic-bezier(.22,1,.36,1); }
  .custom-select-menu:not([hidden]) { animation:pop-down .18s cubic-bezier(.22,1,.36,1); }
  .radar-tooltip:not([hidden]) { animation:fade-in .15s ease-out; }
  .panel-sharks { animation:fade-up .26s cubic-bezier(.22,1,.36,1); }
  .bruno-pet.is-toggling:not(.is-collapsed) .pet-body { animation:pet-in .28s cubic-bezier(.22,1,.36,1); transform-origin:bottom right; }
  .bruno-pet.is-toggling.is-collapsed .pet-toggle { animation:fade-in .2s ease-out; }
  .coin-chip.is-earning { animation:coin-pulse .5s cubic-bezier(.22,1,.36,1); }
}
@keyframes pop-down { from { opacity:0; transform:translateY(-6px); } }
@keyframes fade-in { from { opacity:0; } }
@keyframes fade-up { from { opacity:0; transform:translateY(6px); } }
@keyframes pet-in { from { opacity:0; transform:translateY(8px) scale(.96); } }
@keyframes coin-pulse { 40% { transform:scale(1.08); } }
.coin-toast.is-leaving { opacity:0; transform:translate(-50%,-6px); transition:opacity .25s ease-in,transform .25s ease-in; }
.coin-toast .icon { width:18px; height:18px; margin-right:6px; vertical-align:-.25em; }

/* Круглая кнопка-иконка: копирование ответа Бруно, ссылки на карточку, сброс поиска. */
.icon-button { display:inline-grid; place-items:center; width:40px; height:40px; padding:0; border:0; border-radius:50%; background:transparent; color:var(--muted); cursor:pointer; flex-shrink:0; transition:background-color .18s ease-out,color .18s ease-out; }
.icon-button .icon { width:20px; height:20px; }
.icon-button:hover { background:var(--tint); color:var(--teal-dark); }
.icon-button.is-copied { color:var(--teal); }
.button:has(> .icon) { gap:8px; }
.button > .icon { width:18px; height:18px; }

/* Ответ Бруно: время и кнопка копирования справа в строке автора. Зона касания 44 px, сам кружок 32 px. */
.message-meta { align-items:center; }
.message-meta-end { display:inline-flex; align-items:center; gap:2px; }
.message-copy { position:relative; width:32px; height:32px; margin:-8px -10px -8px 0; }
.message-copy::after { content:""; position:absolute; inset:-6px; }
.message-copy .icon { width:17px; height:17px; }
.message-assistant .message-copy:hover { background:var(--tint); }

/* Поиск среди своих проектов в панели карусели. */
.project-search { position:relative; display:flex; align-items:center; flex:1 1 240px; max-width:380px; }
.project-search > .icon { position:absolute; left:13px; width:18px; height:18px; color:var(--muted); pointer-events:none; }
.project-search input { width:100%; min-height:46px; padding:10px 46px 10px 40px; border:1px solid var(--line-strong); border-radius:8px; background:var(--surface); color:var(--ink); font-size:16px; }
.project-search input::-webkit-search-cancel-button { appearance:none; }
.project-search input:focus { outline:none; border-color:var(--teal); box-shadow:0 0 0 3px var(--focus-ring); }
.project-search-clear { position:absolute; right:3px; }
.project-search-clear[hidden] { display:none; }
.project-search-empty { padding:30px; text-align:left; }
.project-search-empty h2 { margin:0 0 8px; font-size:20px; }
.project-search-empty p { max-width:60ch; margin:0 0 18px; overflow-wrap:anywhere; }
@media (max-width:680px) {
  .project-search { flex-basis:100%; max-width:none; }
  .project-search input { font-size:16px; }
  .project-search-empty { padding:20px; }
}

/* Короткое уведомление «Текст скопирован» / «Ссылка скопирована». */
.toast-region { position:fixed; top:88px; left:50%; z-index:70; transform:translateX(-50%); width:max-content; max-width:calc(100% - 28px); pointer-events:none; }
.toast { display:flex; align-items:center; gap:8px; padding:11px 16px; border-radius:8px; background:var(--navy); color:#fff; font-size:16px; font-weight:700; line-height:1.4; box-shadow:0 12px 34px rgba(18,35,56,.22); overflow-wrap:anywhere; transition:opacity .2s ease-in,transform .2s ease-in; }
.toast .icon { width:18px; height:18px; color:#8fd8c8; }
.toast.is-error { background:#7a2f2a; }
.toast.is-leaving { opacity:0; transform:translateY(-6px); }
@media (prefers-reduced-motion:no-preference) { .toast { animation:pop-down .22s cubic-bezier(.22,1,.36,1); } }
@media (prefers-reduced-motion:reduce) { .toast { animation:fade-in .15s ease-out; } .toast.is-leaving { transform:none; } }
@media (max-width:680px) { .toast-region { top:76px; } }

/* Бруно оживает (bruno.js): смена позы, моргание, реакции, дремота плавающего Бруно, взгляд на вводе. */
/* rotate только по запросу: любое значение, кроме none, отделяет слой, и белый фон PNG перестаёт растворяться (multiply). */
.bruno-art { rotate:var(--bruno-look,none); transform-origin:50% 90%; transition:rotate .3s ease-out; }
.bruno-stage { transform-origin:50% 95%; transition:opacity .11s ease-in,transform .11s ease-in; }
.bruno-art.is-swapping .bruno-stage { opacity:0; transform:scale(.94); }
.bruno-art.is-popping .bruno-stage { animation:bruno-pop .34s cubic-bezier(.2,.9,.3,1.15); }
.bruno-lid { transform-box:fill-box; transform-origin:50% 0; transform:scaleY(0); }
.bruno-lash { opacity:0; }
.bruno-art.is-blinking .bruno-lid { animation:bruno-blink .24s ease-in-out; }
.bruno-art.is-blinking .bruno-lash { animation:bruno-lash .24s ease-in-out; }
.bruno-art.eyes-closed .bruno-lid { transform:scaleY(1); transition:transform .16s ease-out; }
.bruno-art.eyes-closed .bruno-lash { opacity:1; transition:opacity .08s ease-out .1s; }
.bruno-art[data-pose-temp] .bruno-accessories { opacity:0; }
.bruno-art.is-thinking .bruno-character { animation:bruno-read 1.8s ease-in-out infinite; }
.bruno-art.is-talking .bruno-character { animation:bruno-talk .42s ease-in-out infinite alternate; }
.bruno-art.is-waking .bruno-character { animation:bruno-stretch .8s ease-out; }
.pet-project:hover .bruno-stage,.bruno-art:has(.bruno-greet:not([hidden])):hover .bruno-stage { animation:bruno-hop .5s cubic-bezier(.3,.7,.4,1); }
.bruno-greet .icon { width:20px; height:20px; margin:auto; }
@keyframes bruno-pop { from { opacity:.3; transform:scale(.92,1.05); } 60% { transform:scale(1.02,.98); } }
@keyframes bruno-blink { 35%,60% { transform:scaleY(1); } }
@keyframes bruno-lash { 35%,60% { opacity:1; } }
@keyframes bruno-read { 0%,100% { transform:rotate(-1.2deg); } 50% { transform:translateY(-2px) rotate(1.2deg); } }
@keyframes bruno-talk { to { transform:translateY(-3px) rotate(.8deg); } }
@keyframes bruno-stretch { 35% { transform:scale(1.05,.95); } 65% { transform:scale(.98,1.03); } }
@keyframes bruno-hop { 40% { translate:0 -8px; } 70% { translate:0 1px; } }
/* Плавающий Бруно качается на «загривке», пока его несут, и успокаивается после броска. */
.bruno-pet .bruno-art { --swing:0deg; rotate:var(--swing); transform-origin:50% 0; transition:rotate .7s cubic-bezier(.25,1.6,.45,1); }
.bruno-pet.is-dragging .bruno-art { transition-duration:.12s; }
.bruno-pet.is-dozing .pet-bubble { opacity:0; }
.pet-bubble { transition:opacity .3s ease-out; }
.pet-zzz { position:absolute; top:46px; right:14px; width:30px; height:40px; pointer-events:none; display:none; }
.bruno-pet.is-dozing .pet-zzz { display:block; }
.pet-zzz i { position:absolute; left:0; bottom:0; font:800 16px/1 Manrope,sans-serif; font-style:normal; color:var(--teal-dark); opacity:0; animation:bruno-z 2.4s ease-out infinite; }
.pet-zzz i:nth-child(2) { animation-delay:.8s; }
.pet-zzz i:nth-child(3) { animation-delay:1.6s; }
@keyframes bruno-z { 25% { opacity:1; } to { opacity:0; transform:translate(16px,-30px) scale(1.25); } }
@media (prefers-reduced-motion:reduce) {
  .bruno-art,.bruno-pet .bruno-art { transition:none; }
  .pet-zzz i { animation:none; opacity:1; }
  .pet-zzz i:nth-child(2) { transform:translate(8px,-14px); }
  .pet-zzz i:nth-child(3) { transform:translate(16px,-28px); }
}
.pet-project { position:relative; }
/* Бруно на входе и регистрации: смотрит на ввод и закрывает глаза на пароле. */
.auth-bruno { width:150px; margin:0 0 12px -10px; }
.auth-bruno .bruno-art { width:100%; margin:0; }
@media (max-width:950px) { .auth-bruno { width:112px; } }

/* Выбор темы: подвал и меню аватара на телефоне (theme.js). */
.site-footer { align-items:center; flex-wrap:wrap; }
.theme-switch { display:flex; align-items:center; gap:12px; }
.theme-switch-label { color:var(--muted); font-size:13px; }
.theme-switch-options { display:inline-flex; gap:4px; padding:4px; border:1px solid var(--line); border-radius:10px; background:var(--surface); }
.theme-switch-options button { min-height:36px; padding:0 12px; border:0; border-radius:8px; background:transparent; color:var(--muted); font-size:13px; font-weight:600; }
.theme-switch-options button:hover { color:var(--ink); }
.theme-switch-options button[aria-pressed="true"] { background:var(--tint); color:var(--teal-dark); }
.topnav-links .theme-switch { display:none; }
@media (max-width:680px) {
  .site-footer .theme-switch { width:100%; justify-content:space-between; }
  .js-topnav .topnav-links .theme-switch { display:flex; flex-direction:column; align-items:stretch; gap:8px; padding:12px; border-top:1px solid var(--line); }
  .js-topnav .topnav-links .theme-switch-options { justify-content:space-between; }
  .js-topnav .topnav-links .theme-switch-options button { flex:1; min-height:40px; padding:0 6px; }
}
/* Смена темы: цвета перетекают за 250 мс (класс ставит theme.js на время переключения). */
html.theme-switching *, html.theme-switching *::before, html.theme-switching *::after { transition:background-color .25s ease-out,color .25s ease-out,border-color .25s ease-out,fill .25s ease-out,stroke .25s ease-out !important; }

/* «Мои проекты»: список с мини-радаром и заметкой Бруно на полях — мотив «поля тетради» (DESIGN.md). */
.projects { display:grid; gap:16px; }
.projects-toolbar { display:flex; align-items:center; gap:16px; flex-wrap:wrap; }
.projects-count { margin:0; color:var(--muted); font-size:13px; }
.project-list { list-style:none; margin:0; padding:0; display:grid; gap:16px; }
.project-list[hidden],.project-row[hidden] { display:none; }
.project-row { display:grid; grid-template-columns:88px minmax(0,1fr) minmax(220px,300px); gap:24px; padding:24px; background:var(--surface); border:1px solid var(--line); border-radius:16px; }
.project-row-radar { display:block; width:88px; align-self:start; }
.project-row-radar .radar-svg { display:block; width:100%; height:auto; }
.project-row-main { display:flex; flex-direction:column; gap:8px; min-width:0; }
.project-row-meta { display:flex; flex-wrap:wrap; align-items:center; gap:8px; margin:0; color:var(--muted); font-size:13px; }
.project-row h2 { margin:0; font-size:20px; overflow-wrap:anywhere; }
.project-row h2 a:hover { color:var(--teal-dark); }
.project-row-pitch { margin:0; max-width:62ch; color:var(--muted); line-height:1.6; overflow-wrap:anywhere; }
.project-row-actions { display:flex; flex-wrap:wrap; align-items:center; gap:8px; margin-top:8px; }
.project-row-note { display:flex; flex-direction:column; gap:8px; padding-left:24px; border-left:1px solid var(--line-teal); }
.project-row-note p { margin:0; line-height:1.6; }
.project-note-author { display:flex; align-items:center; gap:8px; color:var(--muted); font-size:13px; }
.project-note-author img { display:block; }
.project-note-author span { color:var(--cocoa); font-weight:600; }
.tag { display:inline-flex; align-items:center; min-height:24px; padding:0 10px; border:1px solid var(--line); border-radius:999px; background:var(--bg); color:var(--muted); font-size:13px; font-weight:500; }
.invites-title { margin:0 0 4px; font-size:16px; }
@media (max-width:760px) {
  .project-row { grid-template-columns:64px minmax(0,1fr); gap:16px; padding:20px; }
  .project-row-radar { width:64px; }
  .project-row-note { grid-column:1/-1; padding:16px 0 0; border-left:0; border-top:1px solid var(--line-teal); }
}
.project-row-radar .radar-grid,.project-row-radar .radar-axis { stroke:var(--line-strong); }
/* Иконки вместо эмодзи: оценка ответа Бруно, галочки, монеты в тексте. */
.feedback-button { display:inline-grid; place-items:center; min-width:36px; min-height:32px; color:var(--muted); }
.feedback-button .icon { width:18px; height:18px; }
.feedback-button.is-active,.feedback-button:hover { color:var(--teal-dark); }
.work-strength,.work-saved-label { display:flex; align-items:flex-start; gap:6px; }
.work-strength .icon,.work-saved-label .icon { width:18px; height:18px; margin-top:2px; color:var(--teal); }

/* Разбор встречи: список, а не сетка одинаковых карточек. */
.mistake-grid { grid-template-columns:1fr; gap:0; }
.mistake-card { padding:16px 0; border:0; border-top:1px solid var(--line); border-radius:0; background:none; }
/* Навигация-таблетки — элементы управления: скругление 8 px. */
.workspace-nav a,.pet-actions a,.pet-actions button,.task-filter a { border-radius:8px; }
/* Зоны касания на сенсорных экранах не меньше 44 px. */
@media (pointer:coarse) {
  .icon-button,.report-button { width:44px; height:44px; }
  .radar-compare button,.theme-switch-options button { min-height:44px; }
  .feedback-button { min-width:44px; min-height:44px; }
}

/* Заставка при заходе на сайт (вошедший пользователь, _intro.html, intro.js): 0–0,8 с Бруно идёт
   по линейке, 0,8 с машет, 0,9 с здоровается, с 1,9 с заставка растворяется и открывает страницу. */
.intro { display:none; }
html.intro-on .intro { position:fixed; inset:0; z-index:100; display:grid; place-items:center; background:var(--bg); animation:intro-out .35s ease-in 1.9s forwards; }
html.intro-skip .intro { animation:intro-out .2s ease-in forwards; }
.intro-scene { position:relative; width:min(520px,calc(100% - 32px)); height:250px; display:flex; align-items:flex-end; justify-content:center; }
.intro-ground { position:absolute; left:-16px; right:-16px; bottom:12px; height:1px; background:var(--line-teal); transform-origin:0 50%; animation:intro-rule .6s cubic-bezier(.2,.7,.2,1) both; }
.intro-bear { position:relative; width:220px; animation:intro-walk .8s cubic-bezier(.22,.61,.36,1) both; }
.intro-bear .bruno-art { width:100%; margin:0; transform-origin:50% 100%; animation:intro-step .2s ease-in-out 4 alternate both; }
.intro-bubble { position:absolute; top:14px; left:calc(50% + 64px); margin:0; padding:10px 14px; border:1px solid var(--line); border-radius:10px 10px 10px 4px; background:var(--surface); color:var(--ink); font-size:16px; font-weight:600; line-height:1.35; white-space:nowrap; transform-origin:0 100%; animation:intro-bubble .32s cubic-bezier(.2,.8,.2,1) .9s both; }
@media (max-width:480px) {
  .intro-scene { height:210px; }
  .intro-bear { width:170px; }
  .intro-bubble { top:0; left:calc(50% + 34px); max-width:calc(50% - 20px); white-space:normal; }
}
@keyframes intro-rule { from { transform:scaleX(0); } }
@keyframes intro-walk { from { transform:translateX(calc(-50vw - 150px)); } }
@keyframes intro-step { from { translate:0 0; rotate:-3deg; } to { translate:0 -7px; rotate:3deg; } }
@keyframes intro-bubble { from { opacity:0; transform:scale(.5); } }
@keyframes intro-out { to { opacity:0; visibility:hidden; } }
