/* Stepikin Studio — "Start a project" panel (shared by the homepage and every kit page). Behaviour: start.js.
   Opens from any [data-start] trigger. Right-side sheet on desktop, bottom sheet on phones.
   Every selector is scoped under .k-start (plus the .k-start-btn trigger and html.k-start-lock) so it never leaks. */
html.k-start-lock,html.k-start-lock body{overflow:hidden!important}

/* header trigger: icon-only (+) on very narrow phones. Background image, not ::before: the homepage nav kills pseudo-elements */
@media(max-width:359px){
  .k-start-btn{font-size:0!important;width:36px;min-width:36px;padding:0!important;gap:0!important;
    background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round'%3E%3Cpath d='M8 3v10M3 8h10'/%3E%3C/svg%3E")!important;
    background-position:center!important;background-size:16px!important;background-repeat:no-repeat!important}
  html.light .k-start-btn{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23fff' stroke-width='1.7' stroke-linecap='round'%3E%3Cpath d='M8 3v10M3 8h10'/%3E%3C/svg%3E")!important}
  .k-start-btn>*{display:none!important}
}

/* the longer RU label ("Обсудить проект") needs the icon a bit earlier */
@media(min-width:360px) and (max-width:374px){
  html[lang="ru"] .k-start-btn{font-size:0!important;width:36px;min-width:36px;padding:0!important;gap:0!important;
    background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round'%3E%3Cpath d='M8 3v10M3 8h10'/%3E%3C/svg%3E")!important;
    background-position:center!important;background-size:16px!important;background-repeat:no-repeat!important}
  html.light[lang="ru"] .k-start-btn{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23fff' stroke-width='1.7' stroke-linecap='round'%3E%3Cpath d='M8 3v10M3 8h10'/%3E%3C/svg%3E")!important}
  html[lang="ru"] .k-start-btn>*{display:none!important}
}

.k-start{
  --ks-bg:rgba(14,15,18,.78);--ks-solid:#0d0e11;--ks-fg:#fff;--ks-fg2:rgba(255,255,255,.72);--ks-fg3:rgba(255,255,255,.5);--ks-fg4:rgba(255,255,255,.3);
  --ks-line:rgba(255,255,255,.1);--ks-line2:rgba(255,255,255,.2);--ks-fill:rgba(255,255,255,.04);--ks-fill2:rgba(255,255,255,.08);
  --ks-acc:#3b82ff;--ks-acc-soft:rgba(59,130,255,.14);--ks-pill:#fff;--ks-pill-fg:#000;--ks-err:#ff8a8a;--ks-ok:#7fd8a6;
  --ks-ease:cubic-bezier(.16,1,.3,1);
  position:fixed;inset:0;z-index:10001;font-family:'Figtree',system-ui,-apple-system,'Segoe UI',sans-serif;color:var(--ks-fg);
  -webkit-font-smoothing:antialiased;visibility:hidden;pointer-events:none;transition:visibility 0s linear .4s;
  font-size:15px;line-height:1.5;text-align:left;letter-spacing:0;cursor:auto
}
html.light .k-start{
  --ks-bg:rgba(255,255,255,.84);--ks-solid:#fff;--ks-fg:#0a0a0a;--ks-fg2:rgba(0,0,0,.68);--ks-fg3:rgba(0,0,0,.5);--ks-fg4:rgba(0,0,0,.3);
  --ks-line:rgba(0,0,0,.1);--ks-line2:rgba(0,0,0,.2);--ks-fill:rgba(0,0,0,.03);--ks-fill2:rgba(0,0,0,.06);
  --ks-acc:#1f5fe0;--ks-acc-soft:rgba(31,95,224,.1);--ks-pill:#0a0a0a;--ks-pill-fg:#fff;--ks-err:#c43131;--ks-ok:#1d8a52
}
.k-start.open{visibility:visible;pointer-events:auto;transition:none}
.k-start *,.k-start *::before,.k-start *::after{box-sizing:border-box;margin:0;padding:0}
:where(.k-start) a{color:inherit;text-decoration:none;-webkit-tap-highlight-color:transparent}
:where(.k-start) :where(button,input,textarea){font:inherit;color:inherit;-webkit-tap-highlight-color:transparent}
:where(.k-start) button{background:none;border:0;cursor:pointer}
.k-start [hidden]{display:none!important}
.k-start :focus{outline:none}
.k-start :focus-visible{outline:2px solid var(--ks-acc);outline-offset:2px;border-radius:10px}

.k-start-scrim{position:absolute;inset:0;background:rgba(0,0,0,.5);-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px);opacity:0;transition:opacity .35s var(--ks-ease)}
html.light .k-start-scrim{background:rgba(10,12,20,.22)}
.k-start.open .k-start-scrim{opacity:1}

.k-start-sheet{position:absolute;top:12px;right:12px;bottom:12px;width:min(492px,calc(100vw - 24px));display:flex;flex-direction:column;
  background:var(--ks-bg);-webkit-backdrop-filter:blur(28px) saturate(1.5);backdrop-filter:blur(28px) saturate(1.5);
  border:1px solid var(--ks-line);border-radius:24px;box-shadow:0 30px 80px -20px rgba(0,0,0,.6),inset 0 1px 0 rgba(255,255,255,.06);
  transform:translateX(calc(100% + 24px));transition:transform .5s var(--ks-ease);overflow:hidden}
html.light .k-start-sheet{border-color:rgba(255,255,255,.8);box-shadow:0 30px 80px -24px rgba(10,20,50,.28),inset 0 1px 0 #fff}
.k-start.open .k-start-sheet{transform:none}
@supports not ((-webkit-backdrop-filter:blur(1px)) or (backdrop-filter:blur(1px))){.k-start-sheet{background:var(--ks-solid)}}
.k-start-grab{display:none}

.k-start-head{display:flex;align-items:flex-start;gap:16px;padding:26px 26px 18px}
.k-start-ht{flex:1;min-width:0}
.k-start-title{font-size:28px;font-weight:500;letter-spacing:-.035em;line-height:1.1}
.k-start-sub{margin-top:8px;color:var(--ks-fg2);font-size:15px}
.k-start-x{flex:none;width:40px;height:40px;display:grid;place-items:center;border-radius:50%!important;border:1px solid var(--ks-line)!important;color:var(--ks-fg2);transition:color .2s,border-color .2s,background .2s}
.k-start-x:hover{color:var(--ks-fg);border-color:var(--ks-line2)!important;background:var(--ks-fill)}
.k-start-x svg{width:14px;height:14px}

.k-start-body{flex:1;overflow-y:auto;overscroll-behavior:contain;padding:0 26px 26px;-webkit-overflow-scrolling:touch}

/* option tabs */
.k-start-tabs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-bottom:22px}
.k-start-tabs.two{grid-template-columns:repeat(2,minmax(0,1fr))}
.k-start-tab{position:relative;display:flex;flex-direction:column;align-items:flex-start;gap:12px;padding:14px 14px 15px;text-align:left;
  border:1px solid var(--ks-line)!important;border-radius:16px;background:var(--ks-fill)!important;color:var(--ks-fg2);
  font-size:14px;font-weight:500;line-height:1.25;letter-spacing:-.005em;transition:border-color .2s,background .2s,color .2s}
.k-start-tab:hover{border-color:var(--ks-line2)!important;color:var(--ks-fg)}
.k-start-tab[aria-selected="true"]{border-color:var(--ks-acc)!important;background:var(--ks-acc-soft)!important;color:var(--ks-fg)}
.k-start-ti{width:32px;height:32px;border-radius:50%;display:grid;place-items:center;background:var(--ks-fill2);color:var(--ks-fg)}
.k-start-tab[aria-selected="true"] .k-start-ti{background:var(--ks-acc);color:#fff}
.k-start-ti svg{width:16px;height:16px}
.k-start-badge{position:absolute;top:10px;right:10px;font-size:11px;font-weight:600;letter-spacing:.02em;color:var(--ks-acc);line-height:1}

.k-start-lead{font-size:17px;line-height:1.45;letter-spacing:-.01em;color:var(--ks-fg)}
.k-start-hint{margin-top:4px;color:var(--ks-fg3);font-size:14px}
.k-start-note{display:flex;gap:10px;align-items:flex-start;padding:12px 14px;margin-bottom:16px;border-radius:14px;background:var(--ks-acc-soft);color:var(--ks-fg);font-size:14px}
.k-start-note svg{flex:none;width:16px;height:16px;margin-top:2px;color:var(--ks-acc)}

/* recorder */
.k-start-rec{margin-top:18px;border:1px solid var(--ks-line);border-radius:20px;background:var(--ks-fill);padding:22px 18px 18px;text-align:center}
.k-start-live{display:flex;flex-direction:column;align-items:center}
.k-start-mic{--lv:0;position:relative;width:84px;height:84px;border-radius:50%!important;background:var(--ks-acc)!important;color:#fff;display:grid;place-items:center;
  box-shadow:0 10px 30px -8px rgba(59,130,255,.6);transition:transform .25s var(--ks-ease),box-shadow .25s}
.k-start-mic:hover{transform:scale(1.04)}
.k-start-mic:active{transform:scale(.97)}
.k-start-mic::before{content:"";position:absolute;inset:-8px;border-radius:50%;border:2px solid var(--ks-acc);opacity:0;transform:scale(calc(1 + var(--lv) * .32));transition:transform .08s linear,opacity .2s}
.k-start-mic svg{width:28px;height:28px;position:relative}
.k-start-mic .k-start-stopi{display:none}
.k-start-rec[data-state="on"] .k-start-mic::before{opacity:.55}
.k-start-rec[data-state="on"] .k-start-mic .k-start-mici{display:none}
.k-start-rec[data-state="on"] .k-start-mic .k-start-stopi{display:block;width:24px;height:24px}
.k-start-rec[data-state="ask"] .k-start-mic{opacity:.6;pointer-events:none}
.k-start-time{margin-top:16px;font-size:30px;font-weight:500;letter-spacing:-.03em;font-variant-numeric:tabular-nums;line-height:1}
.k-start-state{margin-top:8px;color:var(--ks-fg3);font-size:14px;min-height:21px}
.k-start-wave{display:block;width:100%;height:40px;margin-top:14px}
.k-start-nw{white-space:nowrap}

.k-start-review{display:flex;align-items:center;gap:12px}
.k-start-play{flex:none;width:48px;height:48px;border-radius:50%!important;display:grid;place-items:center;background:var(--ks-pill)!important;color:var(--ks-pill-fg)}
.k-start-play svg{width:18px;height:18px}
.k-start-play .k-start-pausei{display:none}
.k-start-play.playing .k-start-playi{display:none}.k-start-play.playing .k-start-pausei{display:block}
.k-start-review .k-start-wave{flex:1;min-width:0;margin:0;cursor:pointer}
.k-start-dur{flex:none;min-width:38px;text-align:right;font-variant-numeric:tabular-nums;color:var(--ks-fg2);font-size:14px}
.k-start-redo{display:inline-flex;align-items:center;gap:6px;margin-top:14px;padding:6px 10px;border-radius:999px;color:var(--ks-fg2);font-size:14px;font-weight:500}
.k-start-redo:hover{color:var(--ks-fg);background:var(--ks-fill2)}
.k-start-redo svg{width:14px;height:14px}

/* fields */
.k-start-form{margin-top:18px;display:grid;gap:10px}
.k-start-row{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.k-start-f{display:block;position:relative}
.k-start-f>span{display:block;font-size:13px;color:var(--ks-fg3);margin:0 0 6px 2px}
.k-start-f input,.k-start-f textarea{display:block;width:100%;min-height:48px;padding:12px 14px;border-radius:14px;border:1px solid var(--ks-line);background:var(--ks-fill);
  font-size:16px;line-height:1.4;transition:border-color .2s,background .2s;-webkit-appearance:none;appearance:none}
.k-start-f textarea{min-height:120px;resize:vertical}
.k-start-f input::placeholder,.k-start-f textarea::placeholder{color:var(--ks-fg4)}
.k-start-f input:focus,.k-start-f textarea:focus{border-color:var(--ks-acc);background:var(--ks-fill2);outline:none}
.k-start-f input[aria-invalid="true"],.k-start-f textarea[aria-invalid="true"]{border-color:var(--ks-err)}
.k-start-hp{position:absolute!important;left:-9999px!important;width:1px;height:1px;overflow:hidden}
.k-start-consent{font-size:13px;line-height:1.5;color:var(--ks-fg3)}
.k-start-consent a{color:var(--ks-fg2);text-decoration:underline;text-underline-offset:2px}
.k-start-err{font-size:14px;color:var(--ks-err);min-height:0}
.k-start-err:empty{display:none}

.k-start-cta{display:inline-flex;align-items:center;justify-content:center;gap:8px;width:100%;min-height:52px;padding:0 24px;border-radius:999px!important;
  background:var(--ks-pill)!important;color:var(--ks-pill-fg)!important;font-size:16px;font-weight:500;letter-spacing:-.005em;transition:opacity .2s,transform .3s var(--ks-ease)}
.k-start-cta:hover{transform:translateY(-1px)}
.k-start-cta[disabled]{opacity:.45;cursor:default;transform:none}
.k-start-cta svg{width:16px;height:16px}
.k-start-ghost{display:inline-flex;align-items:center;justify-content:center;min-height:46px;padding:0 20px;border-radius:999px!important;border:1px solid var(--ks-line2)!important;color:var(--ks-fg)}
.k-start-ghost:hover{border-color:var(--ks-fg)!important}

/* call option */
.k-start-call{margin-top:18px;display:grid;gap:10px}
.k-start-list{list-style:none;display:grid;gap:8px;margin:16px 0 20px}
.k-start-list li{display:flex;gap:10px;color:var(--ks-fg2);font-size:15px}
.k-start-list li::before{content:"";flex:none;width:6px;height:6px;margin-top:9px;border-radius:50%;background:var(--ks-acc)}

/* success */
.k-start-done{padding:40px 4px 8px;text-align:left}
.k-start-ok{width:56px;height:56px;border-radius:50%;display:grid;place-items:center;background:var(--ks-acc);color:#fff;margin-bottom:22px}
.k-start-ok svg{width:24px;height:24px}
.k-start-done h3{font-size:26px;font-weight:500;letter-spacing:-.03em;line-height:1.15}
.k-start-done p{margin-top:10px;color:var(--ks-fg2)}
.k-start-acts{display:flex;flex-wrap:wrap;gap:10px;margin-top:24px}
.k-start-acts .k-start-cta{width:auto}

/* phones: bottom sheet */
@media(max-width:640px){
  .k-start-sheet{top:auto;left:0;right:0;bottom:0;width:auto;max-height:calc(100dvh - 28px);max-height:calc(100vh - 28px);border-radius:24px 24px 0 0;border-bottom:0;transform:translateY(105%)}
  @supports (height:100dvh){.k-start-sheet{max-height:calc(100dvh - 28px)}}
  .k-start-grab{display:block;width:40px;height:4px;border-radius:4px;background:var(--ks-line2);margin:8px auto 0;flex:none}
  .k-start-head{padding:14px 18px 14px}
  .k-start-title{font-size:24px}
  .k-start-sub{font-size:14px;margin-top:6px}
  .k-start-body{padding:0 18px max(20px,env(safe-area-inset-bottom))}
  .k-start-tabs{gap:6px;margin-bottom:18px}
  .k-start-tab{padding:11px 10px 12px;gap:10px;font-size:13px;border-radius:14px}
  .k-start-ti{width:28px;height:28px}.k-start-ti svg{width:14px;height:14px}
  .k-start-badge{display:none}
  .k-start-row{grid-template-columns:1fr}
  .k-start-rec{padding:18px 14px 14px}
}
@media(prefers-reduced-motion:reduce){.k-start-sheet,.k-start-scrim{transition:none}}
