/* =========================================================
   ЦСЛ «ТЕСТИНГ» — дополнения к макету: прайс и смета, аттестат,
   направления, ситуации, карта Крыма, окна, тост, прокрутка
   ========================================================= */

/* тонкая полупрозрачная прокрутка без стрелок и дорожки */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(236, 235, 230, .16); border-radius: 8px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: rgba(236, 235, 230, .3); background-clip: padding-box; }
::-webkit-scrollbar-button { display: none; }
::-webkit-scrollbar-corner { background: transparent; }
@supports not selector(::-webkit-scrollbar) { html { scrollbar-width: thin; scrollbar-color: rgba(236, 235, 230, .2) transparent; } }

[hidden] { display: none !important; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.linklike { display: inline; padding: 0; font: inherit; color: inherit; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(127, 127, 127, .5); cursor: pointer; }
.logo img { height: 34px; width: auto; }
.nav.scrolled .logo img { height: 30px; }

.demo-ribbon { position: fixed; z-index: 95; left: 14px; bottom: 14px; padding: 8px 14px; border-radius: 99px; background: var(--accent); color: #140700; font: 600 11.5px/1 var(--f-mono); letter-spacing: .02em; pointer-events: none; }

.toast { position: fixed; z-index: 400; left: 50%; top: 18px; max-width: calc(100vw - 32px); padding: 12px 18px; border-radius: 12px; background: var(--text); color: var(--ink); font-weight: 700; font-size: 14px; box-shadow: 0 10px 40px rgba(0, 0, 0, .45);
  transform: translate(-50%, calc(-100% - 40px)); visibility: hidden; transition: transform .45s var(--ease), visibility 0s linear .45s; }
.toast.show { transform: translate(-50%, 0); visibility: visible; transition: transform .45s var(--ease), visibility 0s; }

/* ---------- аттестат ---------- */
.acc { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 26px; align-items: center; margin-top: clamp(40px, 5vw, 70px); padding: 22px 26px; border: 1px solid var(--line-2); border-radius: 22px; background: linear-gradient(120deg, rgba(243, 146, 0, .07), rgba(255, 255, 255, .01) 60%); }
.acc-seal { width: 84px; height: 84px; color: var(--text); animation: seal 30s linear infinite; }
.acc-seal svg { width: 100%; height: 100%; }
@keyframes seal { to { transform: rotate(360deg); } }
.acc-l { display: block; font-family: var(--f-mono); font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.acc b { display: block; margin: 6px 0 4px; font-family: var(--f-display); font-weight: 600; font-size: clamp(18px, 1.8vw, 26px); letter-spacing: -.01em; }
.acc small { color: var(--muted); font-size: 13.5px; }
.stat-num span { display: inline-block; }

/* ---------- прайс ---------- */
.t-tools { display: flex; gap: 14px; align-items: center; margin-bottom: 18px; }
.t-search { position: relative; flex: 1; max-width: 560px; }
.t-search svg { position: absolute; left: 18px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); color: var(--ink-muted); }
.t-search input { width: 100%; height: 52px; padding: 0 18px 0 48px; border-radius: 999px; border: 1px solid var(--ink-line); background: rgba(255, 255, 255, .55); color: var(--ink); font: inherit; font-size: 15px; outline: none; transition: border-color .3s, background .3s, box-shadow .3s; }
.t-search input:focus { border-color: var(--accent); background: #fff; box-shadow: 0 0 0 4px rgba(243, 146, 0, .14); }
.t-search input::-webkit-search-cancel-button { -webkit-appearance: none; }
.t-pdf { font-family: var(--f-mono); font-size: 13px; color: var(--ink); border-bottom: 1px solid var(--ink-line); padding-bottom: 2px; white-space: nowrap; transition: color .3s, border-color .3s; }
.t-pdf:hover { color: var(--accent-deep); border-color: currentColor; }
.tests .t-row { grid-template-columns: 34px minmax(0, 1fr) auto 118px 104px; gap: 16px; padding: 15px 8px; }
.tests .t-row:hover { padding-left: 16px; padding-right: 16px; }
.t-n small { display: block; margin-bottom: 2px; font-family: var(--f-mono); font-weight: 500; font-size: 10.5px; letter-spacing: .05em; text-transform: uppercase; opacity: .55; }
.tests .t-d { font-size: 14px; font-weight: 500; color: inherit; }
.tests .t-a { opacity: 1; transform: none; color: inherit; display: flex; justify-content: flex-end; }
.t-add { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--ink-line); font-size: 20px; line-height: 1; display: grid; place-items: center; transition: background .3s, color .3s, border-color .3s, transform .3s var(--ease); }
.t-row:hover .t-add { border-color: var(--accent); color: var(--accent); }
.t-add:hover { background: var(--accent) !important; color: #140700 !important; transform: rotate(90deg); }
.qty { display: inline-flex; align-items: center; gap: 2px; height: 38px; padding: 0 4px; border-radius: 999px; background: var(--accent); color: #140700; }
.qty button { width: 30px; height: 30px; border-radius: 50%; font-size: 17px; line-height: 1; display: grid; place-items: center; }
.qty button:hover { background: rgba(0, 0, 0, .12); }
.qty b { min-width: 20px; text-align: center; font-family: var(--f-mono); font-size: 14px; }
.t-row.in .t-n { color: inherit; }
.t-row.in .t-i { color: var(--accent-deep); opacity: 1; }
.t-cat { padding: 24px 8px 8px; font-family: var(--f-mono); font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-deep); border-bottom: 1px solid var(--ink-line); }
.t-cat:first-child { padding-top: 6px; }
.t-found { padding: 6px 8px 10px; font-family: var(--f-mono); font-size: 12px; color: var(--ink-muted); border-bottom: 1px solid var(--ink-line); }
.t-empty { padding: 30px 8px; color: var(--ink-muted); }
.t-more { width: 100%; margin-top: 16px; height: 52px; border-radius: 999px; border: 1px dashed var(--ink-line); font-weight: 600; font-size: 14.5px; transition: border-color .3s, background .3s; }
.t-more:hover { border-style: solid; border-color: var(--ink); background: rgba(255, 255, 255, .4); }
.tv-est { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin: 18px 0 14px; padding: 14px 16px; border-radius: 14px; background: rgba(232, 229, 221, .06); font-size: 13.5px; color: rgba(232, 229, 221, .7); }
.tv-est b { font-family: var(--f-display); font-weight: 600; font-size: 20px; color: var(--accent); white-space: nowrap; }
.t-vis .tv-meta { margin-top: auto; }

/* плавающая смета */
.est-bar { position: fixed; z-index: 96; left: 50%; bottom: 18px; transform: translateX(-50%); }
.est-bar button { display: flex; align-items: center; gap: 12px; height: 52px; padding: 0 22px 0 8px; border-radius: 999px; background: var(--text); color: var(--ink); font-weight: 600; font-size: 14.5px; white-space: nowrap; box-shadow: 0 16px 40px -12px rgba(0, 0, 0, .6); transition: transform .3s var(--ease); }
.est-bar button:hover { transform: translateY(-2px); }
.est-bar b { color: var(--accent-deep); }
.eb-ic { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: #140700; font-family: var(--f-mono); font-size: 17px; }

/* ---------- направления ---------- */
.w-info { display: flex; flex-direction: column; flex: 1; }
.w-meta { line-height: 1.5; }
.w-m b { font-size: 19px; }
.w-go { align-self: flex-start; margin-top: 18px; font-weight: 600; font-size: 14px; color: var(--accent); border-bottom: 1px solid rgba(243, 146, 0, .35); padding-bottom: 2px; transition: border-color .3s; }
.w-go:hover { border-color: var(--accent); }
.w-m { margin-top: auto; }
.w-info h3 + .w-meta { margin-bottom: 20px; }

/* ---------- ситуации ---------- */
.cases-sec { padding-top: clamp(70px, 9vw, 130px); padding-bottom: clamp(70px, 9vw, 130px); border-top: 1px solid var(--line); }
.cases { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.case { position: relative; display: flex; flex-direction: column; padding: 28px 26px 26px; border-radius: 22px; background: var(--panel); border: 1px solid var(--line); overflow: hidden; transition: border-color .4s, transform .6s var(--ease); }
.case::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .7s var(--ease); }
.case:hover { border-color: rgba(243, 146, 0, .4); transform: translateY(-4px); }
.case:hover::after { transform: scaleX(1); }
.case-n { font-family: var(--f-mono); font-size: 12px; color: var(--accent); }
.case h3 { margin: 40px 0 12px; font-family: var(--f-display); font-weight: 500; font-size: clamp(20px, 1.8vw, 26px); letter-spacing: -.02em; }
.case p { margin: 0 0 24px; color: var(--muted); font-size: 15px; }
.case-go { margin-top: auto; font-weight: 600; font-size: 14px; }
.case-go:hover { color: var(--accent); }

/* ---------- формы ---------- */
.form .consent { cursor: pointer; }
.form .consent .linklike { color: var(--ink); }
.m-ok { margin: 10px 0 0; padding: 16px 18px; border-radius: 14px; background: rgba(95, 224, 160, .14); color: var(--ink); font-weight: 600; }

/* ---------- контакты ---------- */
.c-addr label { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.st { display: inline-flex; align-items: center; gap: 6px; text-transform: none; letter-spacing: 0; color: var(--muted); }
.st i { width: 7px; height: 7px; border-radius: 50%; background: #e5484d; }
.st.on { color: var(--ok); }
.st.on i { background: var(--ok); box-shadow: 0 0 0 4px rgba(95, 224, 160, .16); }
.c-route { display: inline-block; margin-top: 10px; font-size: 13.5px; font-weight: 600; color: var(--accent); }
.c-route:hover { text-decoration: underline; text-underline-offset: 3px; }
.c-list { grid-template-columns: 1fr; }
.c-item:nth-child(even) { padding-left: 0; border-left: 0; }
.c-map { min-height: 460px; }
.c-map .pin text { paint-order: stroke; stroke: #0f1114; stroke-width: 4px; stroke-linejoin: round; }
.f-contact .linklike { width: fit-content; font-family: var(--f-body); font-size: 13px; color: var(--muted); }

/* ---------- окна ---------- */
.modal { width: min(640px, calc(100vw - 24px)); max-height: calc(100dvh - 32px); padding: clamp(22px, 3vw, 34px); border: 1px solid var(--line-2); border-radius: 26px; background: var(--paper); color: var(--ink); overflow: auto; overscroll-behavior: contain; }
.modal::backdrop { background: rgba(5, 6, 8, .72); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.modal[open] { animation: mIn .5s var(--ease); }
@keyframes mIn { from { opacity: 0; transform: translateY(24px) scale(.98); } }
.modal .kicker { color: var(--accent-deep); margin-bottom: 12px; }
.modal-x { position: absolute; right: 16px; top: 16px; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--ink-line); font-size: 22px; line-height: 1; display: grid; place-items: center; transition: background .3s; }
.modal-x:hover { background: rgba(0, 0, 0, .06); }
.m-h { margin: 0 0 20px; font-family: var(--f-display); font-weight: 600; font-size: clamp(22px, 2.4vw, 30px); letter-spacing: -.02em; padding-right: 44px; }
.est-list { list-style: none; margin: 0 0 6px; padding: 0; border-top: 1px solid var(--ink-line); }
.est-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto 110px; gap: 14px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--ink-line); font-size: 14.5px; }
.est-list li > b { text-align: right; font-family: var(--f-mono); font-weight: 500; font-size: 13.5px; }
.est-list .est-empty { display: block; color: var(--ink-muted); }
.est-tot { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin: 14px 0 20px; }
.est-tot b { font-family: var(--f-display); font-weight: 600; font-size: 24px; color: var(--accent-deep); }
.m-form { padding: 0; background: none; box-shadow: none; border-radius: 0; overflow: visible; }
.m-form .field input, .m-form .field textarea { background: #fff; }
.m-form .field textarea { height: 96px; }
.modal-text { width: min(760px, calc(100vw - 24px)); }
.privacy-text { font-size: 14.5px; line-height: 1.6; color: var(--ink-muted); }
.privacy-text h4, .privacy-text b { color: var(--ink); }
.modal::-webkit-scrollbar-thumb { background: rgba(18, 19, 20, .2); background-clip: padding-box; }

/* ---------- адаптив ---------- */
@media (max-width: 1100px) {
  .tests .t-row { grid-template-columns: 30px minmax(0, 1fr) 104px; gap: 4px 12px; }
  .tests .t-g { grid-column: 2; grid-row: 2; margin-top: 0; }
  .tests .t-d { grid-column: 2; grid-row: 3; text-align: left; }
  .tests .t-a { grid-column: 3; grid-row: 1 / span 3; display: flex; align-self: center; }
  .tests .t-g:empty { display: none; }
}
@media (max-width: 980px) {
  .cases { grid-template-columns: 1fr; }
  .case h3 { margin-top: 22px; }
}
@media (max-width: 820px) {
  .logo img { height: 28px; }
  .acc { grid-template-columns: auto minmax(0, 1fr); gap: 16px; padding: 18px; }
  .acc .btn { grid-column: 1 / -1; width: 100%; }
  .acc-seal { width: 64px; height: 64px; }
  .t-tools { flex-direction: column; align-items: stretch; }
  .t-search { max-width: none; }
  .t-pdf { align-self: flex-start; }
  .tests .t-row { padding: 14px 2px; }
  .tests .t-row:hover { padding-left: 2px; padding-right: 2px; color: inherit; }
  .tests .t-row:hover::before { transform: scaleY(0); }
  .t-vis { min-height: 0; }
  .t-vis .t-art { max-width: 180px; margin: 10px auto 14px; }
  .c-map { min-height: 300px; }
  .est-list li { grid-template-columns: minmax(0, 1fr) auto; }
  .est-list li > b { grid-column: 1 / -1; text-align: left; margin-top: -6px; }
  .est-bar { bottom: 12px; left: 16px; right: 80px; transform: none; }
  .est-bar button { width: 100%; font-size: 13.5px; padding-right: 14px; }
  .demo-ribbon { bottom: auto; top: auto; left: 10px; bottom: 76px; font-size: 10.5px; }
  .w-card { flex-basis: 84vw; }
}
@media (prefers-reduced-motion: reduce) { .acc-seal { animation: none; } }

/* первый экран: .stage p в макете перебивал отступ подзаголовка */
.s1 .lead { font-size: clamp(15px, 1.15vw, 18px); max-width: 520px; margin: 0 0 34px; }
@media (max-width: 820px) { .s1 .lead { font-size: 14.5px; margin-bottom: 20px; max-width: 420px; } }

/* карта: не растягивается по высоте списка адресов */
.contacts-grid { align-items: start; }
.c-map { min-height: 0; aspect-ratio: 600 / 440; position: sticky; top: 96px; }
@media (max-width: 980px) { .c-map { position: relative; top: 0; } }
@media (max-width: 820px) { .c-map { aspect-ratio: 330 / 240; } }
/* сцена проявляется, когда 3D готово (страница не ждёт её дольше 2 с) */
#scene { opacity: 0; transition: opacity .9s ease; }
html.scene-on #scene, html.no-webgl #scene { opacity: 1; }

/* телефон: подписи не мельче 11 px */
@media (max-width: 600px) { .tv-meta span, .w-tag { font-size: 11px !important; } }
