/* Портфолио и квиз — дополнение к site.css */
.page-hero { padding: 86px 0 36px; position: relative; }
.page-hero h1 { max-width: 880px; margin: 18px 0 18px; font-size: clamp(38px, 6vw, 76px); line-height: 1.08; letter-spacing: -.008em; font-weight: 560; }
.page-hero h1 em { font-style: normal; background: linear-gradient(90deg, var(--lime), var(--cyan)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.page-hero .lead { max-width: 640px; margin: 0; color: var(--muted); font-size: 18px; line-height: 1.6; }
.page-hero .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }

.facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 46px; }
.fact { padding: 20px; border: 1px solid var(--line); border-radius: 18px; background: var(--panel); }
.fact b { display: block; font-size: 28px; font-weight: 560; letter-spacing: -.005em; }
.fact span { color: var(--muted); font-size: 15px; line-height: 1.5; }

.work-list { display: grid; gap: 18px; }
.work { display: grid; grid-template-columns: 1.05fr .95fr; gap: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); overflow: hidden; }
.work:nth-child(even) .work-shot { order: 2; }
.work-shot { position: relative; min-height: 280px; background: #0d1016; border-right: 1px solid var(--line); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.work:nth-child(even) .work-shot { border-right: 0; border-left: 1px solid var(--line); }
.work-shot img { width: 100%; height: 100%; object-fit: cover; object-position: top left; display: block; }
.work-shot .mock { display: flex; align-items: center; gap: 8px; padding: 26px; width: 100%; }
.work-shot .mock .mini-node { flex: 1; }
.work-body { padding: 30px 32px; display: flex; flex-direction: column; gap: 14px; }
.work-body h3 { margin: 0; font-size: 25px; line-height: 1.15; letter-spacing: -.005em; font-weight: 560; }
.work-body dl { display: grid; gap: 12px; margin: 0; }
.work-body dt { color: var(--cyan); font-size: 13px; text-transform: uppercase; letter-spacing: .12em; font-weight: 700; }
.work-body dd { margin: 3px 0 0; color: #c3c8d1; font-size: 16px; line-height: 1.6; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 8px; }
.chip { padding: 5px 10px; border-radius: 999px; border: 1px solid var(--line); color: #a3abb8; font-size: 13px; }
.demo-badge { position: absolute; left: 14px; top: 14px; padding: 5px 10px; border-radius: 999px; background: rgba(11,13,18,.82); border: 1px solid var(--line); color: #c9ced6; font-size: 13px; letter-spacing: .04em; }

.small-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.small { padding: 22px; border: 1px solid var(--line); border-radius: 18px; background: var(--panel); }
.small h4 { margin: 0 0 8px; font-size: 17px; font-weight: 600; }
.small p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.6; }

.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; counter-reset: s; }
.step { padding: 22px; border: 1px solid var(--line); border-radius: 18px; background: var(--panel-2); counter-increment: s; }
.step::before { content: counter(s, decimal-leading-zero); display: block; color: var(--lime); font-size: 15px; font-weight: 700; margin-bottom: 14px; }
.step h4 { margin: 0 0 8px; font-size: 17px; font-weight: 600; }
.step p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.6; }

.tech-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tech-tags span { padding: 8px 14px; border-radius: 999px; background: rgba(255,255,255,.04); border: 1px solid var(--line); font-size: 15px; color: #cfd4dc; }

/* Квиз */
.quiz { max-width: 760px; margin: 0 auto; padding: 34px; border-radius: 30px; border: 1px solid rgba(255,255,255,.13); background: radial-gradient(ellipse at 20% 0%, rgba(140,231,221,.10), transparent 42%), linear-gradient(140deg, #151b24, #10131a); }
.quiz-top { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 18px; color: var(--muted); font-size: 15px; }
.quiz-bar { height: 4px; border-radius: 4px; background: rgba(255,255,255,.08); overflow: hidden; margin-bottom: 28px; }
.quiz-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--lime), var(--cyan)); transition: width .35s ease; }
.q-step { display: none; }
.q-step.active { display: block; animation: qin .35s ease; }
@keyframes qin { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.q-step h2 { margin: 0 0 6px; font-size: clamp(24px, 3.4vw, 34px); line-height: 1.12; letter-spacing: -.005em; font-weight: 560; }
.q-step .hint { margin: 0 0 22px; color: var(--muted); font-size: 15px; }
.options { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.opt { position: relative; display: flex; align-items: flex-start; gap: 12px; padding: 15px 16px; border-radius: 14px; border: 1px solid rgba(255,255,255,.11); background: rgba(7,9,13,.4); cursor: pointer; transition: border-color .2s, background .2s; font-size: 16px; line-height: 1.4; }
.opt:hover { border-color: rgba(255,255,255,.25); }
.opt input { position: absolute; opacity: 0; pointer-events: none; }
.opt .box { flex: none; width: 18px; height: 18px; margin-top: 1px; border-radius: 6px; border: 1.5px solid #5c6573; transition: all .2s; }
.opt input[type=radio] + .box { border-radius: 50%; }
.opt input:checked + .box { border-color: var(--lime); background: var(--lime); box-shadow: inset 0 0 0 3px #151b24; }
.opt:has(input:checked) { border-color: rgba(211,251,131,.5); background: rgba(211,251,131,.06); }
.opt input:focus-visible + .box { outline: 2px solid var(--cyan); outline-offset: 2px; }
.opt small { display: block; color: var(--muted); font-size: 15px; margin-top: 3px; }
.q-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 26px; }
.q-nav .button[disabled] { opacity: .45; pointer-events: none; }
.q-error { min-height: 18px; margin-top: 10px; color: #ffb4a8; font-size: 15px; }
.result { padding: 22px; border-radius: 18px; border: 1px solid rgba(211,251,131,.3); background: rgba(211,251,131,.05); margin-bottom: 20px; }
.result h3 { margin: 6px 0 8px; font-size: 21px; font-weight: 560; }
.result p { margin: 0; color: #c3c8d1; font-size: 16px; line-height: 1.6; }
.result .meta { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 14px; color: var(--muted); font-size: 15px; }
.result .meta b { color: var(--text); font-weight: 600; }
.done { text-align: center; padding: 30px 10px; }
.done h2 { margin-bottom: 10px; }

@media (max-width: 900px) {
  .facts { grid-template-columns: 1fr 1fr; }
  .work { grid-template-columns: 1fr; }
  .work:nth-child(even) .work-shot { order: 0; border-left: 0; }
  .work-shot, .work:nth-child(even) .work-shot { border-right: 0; border-bottom: 1px solid var(--line); min-height: 210px; max-height: 300px; }
  .small-grid, .steps { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .page-hero { padding: 54px 0 24px; }
  .page-hero .lead { font-size: 17px; }
  .work-body { padding: 22px; }
  .small-grid, .steps, .options { grid-template-columns: 1fr; }
  .quiz { padding: 22px 18px; border-radius: 22px; }
  .q-nav .button { flex: 1; }
}
.work-shot .mini-node { font-size: 15px; padding: 16px 10px; line-height: 1.35; }
.work-shot::before { content: ""; position: absolute; width: 260px; height: 260px; right: -90px; top: -110px; border-radius: 50%; background: var(--glow, rgba(140,231,221,.12)); filter: blur(40px); }
.work-shot > * { position: relative; }
.work-shot > .demo-badge { position: absolute; z-index: 1; }
::selection { background: rgba(211,251,131,.9); color: #101310; -webkit-text-fill-color: #101310; }

/* Страница квиза внутри окна */
html.embed body { background: transparent; }
html.embed .topbar, html.embed .page-hero, html.embed footer, html.embed .grain, html.embed .chat-launcher, html.embed #chatRoot { display: none !important; }
html.embed main > section { padding: 0 !important; }
html.embed main .shell { width: 100%; max-width: none; padding: 0; margin: 0; }
html.embed .quiz { max-width: none; margin: 0; border: 0; border-radius: 0; padding-top: 30px; }
@media (max-width: 600px) { html.embed .quiz { padding-top: 24px; } }

/* Расчёт в итоге квиза */
.calc { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 16px; }
.calc div { padding: 14px; border-radius: 14px; background: rgba(7,9,13,.45); border: 1px solid rgba(255,255,255,.08); }
.calc b { display: block; color: var(--lime); font-size: 20px; font-weight: 600; white-space: nowrap; }
.calc span { display: block; margin-top: 4px; color: var(--muted); font-size: 14px; line-height: 1.4; }
.result .calc-note { margin-top: 10px; color: var(--muted); font-size: 14px; }
@media (max-width: 600px) { .calc { grid-template-columns: 1fr; } }

html.embed .quiz-top { padding-right: 44px; }
.result .saving { margin-top: 16px; padding: 16px 18px; border-radius: 14px; background: rgba(211,251,131,.1); border: 1px solid rgba(211,251,131,.35); font-size: 18px; line-height: 1.5; color: var(--text); }
.result .saving b { color: var(--lime); white-space: nowrap; }
