/* Midrasha AI — neural-network theme. Logical properties throughout so RTL/LTR
   flip automatically with <html dir>. */
:root {
  --bg: #04060b;
  --bg-2: #070b14;
  --panel: rgba(13, 19, 34, 0.72);
  --panel-solid: #0b111f;
  --line: rgba(130, 170, 255, 0.14);
  --line-2: rgba(130, 170, 255, 0.26);
  --text: #e9f0ff;
  --muted: #8d9ab8;
  --dim: #5b6784;
  --cyan: #42f0ff;
  --cyan-2: #0fc8e0;
  --violet: #9a7bff;
  --amber: #ffb547;
  --red: #ff6b7d;
  --dead: #1a2234;
  --dead-2: #2a3550;
  --radius: 18px;
  --gutter: 16px;
  --font: 'Heebo', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
  --mono: 'JetBrains Mono', 'Heebo', ui-monospace, SFMono-Regular, Menlo, monospace;
  color-scheme: dark;
}
@media (min-width: 720px) { :root { --gutter: 28px; } }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button { font: inherit; color: inherit; }
.mono { font-family: var(--mono); letter-spacing: 0.02em; }
.wrap { width: 100%; max-width: 1180px; margin-inline: auto; padding-inline: var(--gutter); }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 6px; }

.skip { position: absolute; inset-inline-start: 12px; top: -60px; z-index: 100; background: var(--cyan); color: #001318; padding: 8px 14px; border-radius: 8px; text-decoration: none; font-weight: 700; }
.skip:focus { top: 12px; }

/* ---------------------------------------------------------------- buttons */
.btn {
  --h: 46px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: var(--h); padding: 0 22px;
  border-radius: 999px; border: 1px solid transparent;
  font-weight: 700; font-size: 16px; text-decoration: none; cursor: pointer;
  transition: transform .15s ease, box-shadow .25s ease, background .25s ease, border-color .25s ease, color .25s ease;
  white-space: nowrap;
}
.btn--sm { --h: 38px; padding: 0 16px; font-size: 14.5px; }
.btn--lg { --h: 54px; padding: 0 28px; font-size: 17px; }
.btn--block { width: 100%; }
.btn--primary {
  background: linear-gradient(135deg, var(--cyan) 0%, #7fe9ff 45%, var(--violet) 130%);
  color: #021015;
  box-shadow: 0 0 0 1px rgba(66, 240, 255, .4), 0 8px 30px -8px rgba(66, 240, 255, .55);
}
.btn--primary:hover { box-shadow: 0 0 0 1px rgba(66, 240, 255, .7), 0 10px 40px -6px rgba(66, 240, 255, .75); }
.btn--primary:active { transform: translateY(1px); }
.btn--ghost { background: rgba(255, 255, 255, .03); border-color: var(--line-2); color: var(--text); }
.btn--ghost:hover { border-color: rgba(66, 240, 255, .6); color: var(--cyan); }
.btn:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }

.link { color: var(--cyan); text-decoration: none; border-bottom: 1px solid rgba(66, 240, 255, .35); padding-bottom: 1px; }
.link:hover { border-bottom-color: var(--cyan); }

/* ---------------------------------------------------------------- nav */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: linear-gradient(to bottom, rgba(4, 6, 11, .92), rgba(4, 6, 11, .7));
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav__in { display: flex; align-items: center; gap: 20px; min-height: 64px; }
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.logo__mark { width: 28px; height: 28px; color: var(--cyan); fill: var(--cyan); filter: drop-shadow(0 0 6px rgba(66, 240, 255, .6)); }
.logo__word { font-family: var(--mono); font-weight: 700; font-size: 17px; letter-spacing: .01em; direction: ltr; unicode-bidi: isolate; }
.logo__ai { color: var(--cyan); }
.nav__links { display: none; gap: 26px; margin-inline-start: auto; }
.nav__links a { color: var(--muted); text-decoration: none; font-size: 15px; font-weight: 500; transition: color .2s; }
.nav__links a:hover { color: var(--text); }
.nav__actions { display: flex; align-items: center; gap: 10px; margin-inline-start: auto; }
@media (min-width: 900px) {
  .nav__links { display: flex; }
  .nav__actions { margin-inline-start: 8px; }
}
.lang {
  min-width: 42px; height: 38px; padding: 0 10px; border-radius: 10px;
  background: transparent; border: 1px solid var(--line-2); color: var(--muted);
  font-family: var(--mono); font-size: 13.5px; font-weight: 700; cursor: pointer;
}
.lang:hover { color: var(--cyan); border-color: rgba(66, 240, 255, .5); }
@media (max-width: 380px) { .nav .btn--sm { padding: 0 12px; font-size: 13.5px; } .logo__word { font-size: 15px; } }

/* ---------------------------------------------------------------- hero */
.hero { position: relative; min-height: min(100svh, 900px); display: flex; align-items: center; overflow: hidden; isolation: isolate; }
#net { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -2; }
.hero__veil {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(60% 55% at 78% 30%, rgba(154, 123, 255, .16), transparent 70%),
    radial-gradient(50% 50% at 15% 80%, rgba(66, 240, 255, .10), transparent 70%),
    linear-gradient(to bottom, rgba(4, 6, 11, .15) 0%, rgba(4, 6, 11, .35) 55%, var(--bg) 100%);
}
.hero__in { padding-block: 72px 64px; }
.kicker {
  display: inline-flex; align-items: center; gap: 10px; margin: 0 0 22px;
  padding: 7px 14px; border-radius: 999px;
  border: 1px solid var(--line-2); background: rgba(10, 16, 30, .6);
  font-family: var(--mono); font-size: 13.5px; color: var(--muted); letter-spacing: .04em;
}
.kicker__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 10px var(--cyan); }
.hero__title {
  margin: 0; font-weight: 900; line-height: 1.02; letter-spacing: -0.02em;
  font-size: clamp(44px, 9.5vw, 104px);
  text-shadow: 0 2px 30px rgba(4, 6, 11, .8);
}
.hero__title span { display: block; }
.grad {
  background: linear-gradient(100deg, var(--cyan) 0%, #b9f6ff 40%, var(--violet) 85%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  text-shadow: none; filter: drop-shadow(0 0 24px rgba(66, 240, 255, .25));
  padding-block-end: .08em;
}
.hero__lead { max-width: 640px; margin: 26px 0 0; font-size: clamp(17px, 2.2vw, 20px); color: #c4cee6; font-weight: 300; text-shadow: 0 1px 14px rgba(4, 6, 11, .9); }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.hero__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 34px; margin-top: 46px; }
.live {
  display: inline-flex; align-items: center; gap: 12px; padding: 10px 18px 10px 16px;
  border-radius: 14px; border: 1px solid rgba(66, 240, 255, .35);
  background: linear-gradient(135deg, rgba(66, 240, 255, .10), rgba(154, 123, 255, .06));
}
.live__dot { width: 9px; height: 9px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 0 0 rgba(66, 240, 255, .7); animation: ping 2s infinite; }
.live__num { font-family: var(--mono); font-weight: 700; font-size: 26px; color: var(--cyan); line-height: 1; }
.live__txt { color: var(--muted); font-size: 14.5px; }
.stats { display: flex; gap: 28px; margin: 0; }
.stats div { display: flex; flex-direction: column; }
.stats dt { font-size: 22px; font-weight: 700; color: var(--text); line-height: 1.1; }
.stats dd { margin: 0; color: var(--dim); font-size: 13.5px; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(66, 240, 255, .6); } 70%, 100% { box-shadow: 0 0 0 12px rgba(66, 240, 255, 0); } }

/* ---------------------------------------------------------------- sections */
.sec { position: relative; padding-block: 88px; }
@media (min-width: 900px) { .sec { padding-block: 120px; } }
.sec + .sec::before {
  content: ''; position: absolute; top: 0; inset-inline: var(--gutter); height: 1px;
  background: linear-gradient(90deg, transparent, var(--line-2), transparent);
}
.eyebrow { margin: 0 0 14px; color: var(--cyan); font-size: 13.5px; letter-spacing: .12em; text-transform: uppercase; }
.sec__title { margin: 0; font-size: clamp(32px, 5.6vw, 58px); line-height: 1.08; font-weight: 800; letter-spacing: -0.015em; }
.sec__lead { margin: 18px 0 0; max-width: 680px; color: var(--muted); font-size: clamp(16.5px, 2vw, 19px); }

.reveal { transition: opacity .7s ease, transform .7s cubic-bezier(.2, .7, .2, 1); }
.reveal.is-pending { opacity: 0; transform: translateY(22px); }

/* course */
.features { display: grid; gap: 16px; margin-top: 48px; }
@media (min-width: 760px) { .features { grid-template-columns: repeat(3, 1fr); gap: 20px; } }
.feat {
  position: relative; padding: 28px 24px; border-radius: var(--radius);
  background: var(--panel); border: 1px solid var(--line);
  overflow: hidden;
}
.feat::after {
  content: ''; position: absolute; inset-inline-start: 0; top: 0; height: 2px; width: 46%;
  background: linear-gradient(90deg, var(--cyan), transparent);
}
[dir="rtl"] .feat::after { background: linear-gradient(270deg, var(--cyan), transparent); }
.feat__ico {
  display: inline-grid; place-items: center; min-width: 46px; height: 46px; padding: 0 10px; border-radius: 12px;
  background: rgba(66, 240, 255, .08); border: 1px solid rgba(66, 240, 255, .25); color: var(--cyan);
  font-weight: 700; font-size: 15px; direction: ltr;
}
.feat h3 { margin: 18px 0 6px; font-size: 21px; font-weight: 700; }
.feat p { margin: 0; color: var(--muted); font-size: 16px; }

.days { margin-top: 56px; padding: 30px 24px; border-radius: var(--radius); border: 1px solid var(--line); background: linear-gradient(180deg, rgba(13, 19, 34, .7), rgba(13, 19, 34, .3)); }
.days__title { margin: 0 0 22px; font-size: 22px; font-weight: 700; }
.days__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; position: relative; }
.day { position: relative; display: grid; grid-template-columns: 22px auto 1fr; align-items: baseline; gap: 6px 14px; padding: 12px 0; }
.day + .day { border-top: 1px dashed var(--line); }
.day__node { width: 11px; height: 11px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 12px var(--cyan); align-self: center; justify-self: center; }
.day__n { color: var(--cyan); font-size: 13.5px; letter-spacing: .08em; white-space: nowrap; }
.day__t { font-weight: 500; }
.days__note { margin: 18px 0 0; color: var(--dim); font-size: 13.5px; }
@media (min-width: 900px) {
  .days { padding: 36px; }
  .days__list { grid-template-columns: repeat(4, 1fr); gap: 18px; }
  .days__list::before { content: ''; position: absolute; top: 5px; inset-inline: 5px; height: 1px; background: linear-gradient(90deg, var(--cyan), var(--violet)); opacity: .45; }
  .day { grid-template-columns: 1fr; padding: 0; gap: 10px; }
  .day + .day { border-top: 0; }
  .day__node { justify-self: start; }
}

/* ---------------------------------------------------------------- booking */
.sec--book { background: radial-gradient(70% 60% at 50% 0%, rgba(66, 240, 255, .06), transparent 70%); }
.cohorts { display: grid; gap: 18px; margin-top: 44px; }
@media (min-width: 860px) { .cohorts { grid-template-columns: repeat(3, 1fr); gap: 20px; } }
.cohorts__msg { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin: 0; padding: 26px; border-radius: var(--radius); border: 1px dashed var(--line-2); color: var(--muted); }
.cohorts__msg p { margin: 0; }

.cohort {
  --accent: var(--cyan);
  position: relative; display: flex; flex-direction: column;
  padding: 22px 22px 22px; border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(66, 240, 255, .05), transparent 40%),
    var(--panel);
  border: 1px solid var(--line-2);
  transition: border-color .3s, transform .3s, box-shadow .3s;
}
.cohort[data-state="open"]:hover { border-color: rgba(66, 240, 255, .5); box-shadow: 0 20px 60px -30px rgba(66, 240, 255, .5); transform: translateY(-2px); }
.cohort[data-state="full"] { --accent: var(--amber); background: linear-gradient(180deg, rgba(255, 181, 71, .05), transparent 40%), var(--panel); }
.cohort[data-state="closed"] { --accent: var(--dim); opacity: .65; }
.cohort__head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.cohort__id { font-size: 12.5px; color: var(--dim); letter-spacing: .1em; direction: ltr; }
.cohort__chip { font-size: 11.5px; letter-spacing: .14em; padding: 4px 9px; border-radius: 999px; color: var(--accent); border: 1px solid currentColor; background: rgba(0, 0, 0, .25); }
.cohort__name { margin: 16px 0 2px; font-size: 16px; font-weight: 500; color: var(--muted); }
.cohort__dates { margin: 0; font-size: clamp(30px, 4.2vw, 38px); font-weight: 800; line-height: 1.15; letter-spacing: -0.01em; }
.cohort__sub { margin: 4px 0 0; color: var(--muted); font-size: 15px; }
.cohort__status { margin: 0 0 16px; color: var(--accent); font-weight: 700; font-size: 15.5px; min-height: 1.6em; }

.seats { width: 100%; height: auto; margin: 18px 0 10px; overflow: visible; }
.seats__link { stroke: rgba(66, 240, 255, .45); stroke-width: 1.5; stroke-dasharray: 3 5; animation: flow 1.4s linear infinite; }
.seats__link.is-dim { stroke: var(--dead-2); animation: none; stroke-dasharray: none; }
.cohort[data-state="full"] .seats__link, .cohort[data-state="closed"] .seats__link { stroke: var(--dead-2); animation: none; stroke-dasharray: none; }
.seat__halo { fill: rgba(66, 240, 255, .16); stroke: rgba(66, 240, 255, .5); stroke-width: 1; transform-box: fill-box; transform-origin: center; }
.seat__core { fill: var(--cyan); filter: drop-shadow(0 0 6px rgba(66, 240, 255, .9)); transition: fill .2s; }
.seat__halo, .seat__core { pointer-events: none; }
.seat__hit { fill: transparent; pointer-events: none; }
.seat.is-open .seat__hit { pointer-events: all; cursor: pointer; }
.seat.is-open .seat__halo { animation: breathe 2.4s ease-in-out infinite; animation-delay: var(--d, 0s); }
.seat.is-open:hover .seat__core, .seat.is-picked .seat__core { fill: #fff; }
.seat.is-open:hover .seat__halo { fill: rgba(66, 240, 255, .3); }
.seat.is-taken .seat__halo { fill: none; stroke: var(--dead-2); stroke-dasharray: 2 4; }
.seat.is-taken .seat__core { fill: var(--dead); stroke: var(--dead-2); stroke-width: 1.5; filter: none; }
.cohort[data-state="full"] .seat.is-taken .seat__core { stroke: rgba(255, 181, 71, .45); }
@keyframes breathe { 0%, 100% { transform: scale(.82); opacity: .55; } 50% { transform: scale(1.12); opacity: 1; } }
@keyframes flow { to { stroke-dashoffset: -16; } }

.info { display: grid; gap: 1px; margin: 28px 0 0; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--line); }
@media (min-width: 760px) { .info { grid-template-columns: repeat(3, 1fr); } }
.info__item { padding: 18px 22px; background: var(--bg-2); }
.info dt { font-family: var(--mono); font-size: 12.5px; color: var(--dim); letter-spacing: .1em; text-transform: uppercase; }
.info dd { margin: 4px 0 0; font-weight: 700; font-size: 17px; }

/* ---------------------------------------------------------------- instructor */
.ins { display: grid; gap: 40px; align-items: center; }
@media (min-width: 900px) { .ins { grid-template-columns: 5fr 7fr; gap: 72px; } }
.ins__photo { position: relative; margin: 0; max-width: 460px; border-radius: 26px; overflow: hidden; border: 1px solid var(--line-2); box-shadow: 0 40px 80px -40px rgba(66, 240, 255, .35); }
.ins__photo img { width: 100%; aspect-ratio: 976 / 1080; object-fit: cover; }
.ins__photo::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(to top, rgba(4, 6, 11, .75), transparent 40%),
    repeating-linear-gradient(0deg, rgba(66, 240, 255, .045) 0 1px, transparent 1px 4px);
}
.ins__scan { position: absolute; inset-inline: 0; top: 0; height: 30%; background: linear-gradient(to bottom, transparent, rgba(66, 240, 255, .14), transparent); animation: scan 5s ease-in-out infinite; pointer-events: none; z-index: 1; }
@keyframes scan { 0% { transform: translateY(-100%); } 60%, 100% { transform: translateY(380%); } }
.ins__photo figcaption { position: absolute; inset-inline-start: 18px; bottom: 16px; z-index: 2; font-size: 12.5px; color: var(--cyan); letter-spacing: .14em; direction: ltr; }
.ins__role { margin: 10px 0 22px; color: var(--cyan); font-weight: 500; font-size: 17px; }
.ins__bio { margin: 0 0 14px; color: #c4cee6; font-size: 17.5px; max-width: 620px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 22px 0 26px; padding: 0; }
.tags li { padding: 6px 13px; border-radius: 999px; font-size: 14px; color: var(--muted); border: 1px solid var(--line-2); background: rgba(255, 255, 255, .02); }

/* ---------------------------------------------------------------- work */
.work { display: grid; gap: 18px; margin-top: 44px; }
@media (min-width: 760px) { .work { grid-template-columns: repeat(3, 1fr); gap: 20px; } }
.wcard {
  display: flex; flex-direction: column; text-decoration: none; color: inherit;
  border-radius: 22px; overflow: hidden; border: 1px solid var(--line-2); background: var(--panel);
  transition: border-color .3s, transform .3s, box-shadow .3s;
}
a.wcard:hover { border-color: rgba(66, 240, 255, .55); transform: translateY(-3px); box-shadow: 0 24px 60px -30px rgba(66, 240, 255, .45); }
.wcard__img { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: #0d1424; }
.wcard__img img { width: 100%; height: 100%; object-fit: cover; object-position: top center; transition: transform .6s ease; }
a.wcard:hover .wcard__img img { transform: scale(1.04); }
.wcard__img::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, rgba(4, 6, 11, .55), transparent 55%); }
.wcard__body { position: relative; display: flex; flex-direction: column; flex: 1; padding: 20px 22px 22px; }
.wcard__n { color: var(--dim); font-size: 12.5px; letter-spacing: .1em; }
.wcard__title { margin: 6px 0 8px; font-size: 21px; font-weight: 700; }
.wcard__desc { margin: 0 0 18px; color: var(--muted); font-size: 15.5px; flex: 1; }
.wcard__cta { color: var(--cyan); font-size: 13.5px; letter-spacing: .06em; }
article.wcard .wcard__cta { color: var(--dim); }

/* ---------------------------------------------------------------- faq */
.faq { display: grid; gap: 34px; }
@media (min-width: 900px) { .faq { grid-template-columns: 4fr 8fr; gap: 64px; } }
.faq__list { border-top: 1px solid var(--line-2); }
.faq details { border-bottom: 1px solid var(--line-2); }
.faq summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 20px 2px; font-size: 18px; font-weight: 700;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font-family: var(--mono); color: var(--cyan); font-size: 22px; font-weight: 400; transition: transform .25s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0 0 20px; color: var(--muted); max-width: 640px; }

/* ---------------------------------------------------------------- footer */
.foot { border-top: 1px solid var(--line); padding-block: 36px 44px; background: var(--bg-2); }
.foot__in { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 22px; }
.foot__line { margin: 6px 0 0; color: var(--dim); font-size: 14px; }
.foot__links { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; }

/* ---------------------------------------------------------------- dialog */
.dlg {
  width: min(560px, calc(100% - 2 * var(--gutter))); max-height: calc(100svh - 32px);
  padding: 0; margin: auto; border: 0; background: transparent; color: var(--text);
  overflow: visible;
}
.dlg::backdrop { background: rgba(2, 4, 8, .72); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.dlg[open] { animation: rise .35s cubic-bezier(.2, .8, .2, 1); }
@keyframes rise { from { opacity: 0; transform: translateY(18px) scale(.98); } }
.dlg__panel {
  position: relative; max-height: calc(100svh - 32px); overflow-y: auto;
  padding: 26px 22px 24px; border-radius: 24px;
  background:
    radial-gradient(120% 60% at 50% 0%, rgba(66, 240, 255, .10), transparent 60%),
    var(--panel-solid);
  border: 1px solid rgba(66, 240, 255, .3);
  box-shadow: 0 40px 120px -30px rgba(66, 240, 255, .35), 0 0 0 1px rgba(0, 0, 0, .4);
}
@media (min-width: 600px) { .dlg__panel { padding: 32px 32px 30px; } }
@media (max-width: 599px) {
  .dlg { width: 100%; max-width: 100%; margin: auto 0 0; max-height: 94svh; }
  .dlg__panel { border-radius: 24px 24px 0 0; max-height: 94svh; padding-bottom: calc(24px + env(safe-area-inset-bottom)); }
  .dlg[open] { animation: sheet .35s cubic-bezier(.2, .8, .2, 1); }
  @keyframes sheet { from { transform: translateY(40px); opacity: 0; } }
}
.dlg__x {
  position: absolute; top: 14px; inset-inline-end: 14px; width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid var(--line-2); background: rgba(255, 255, 255, .03); font-size: 22px; line-height: 1; cursor: pointer; color: var(--muted);
}
.dlg__x:hover { color: var(--text); border-color: var(--cyan); }
.dlg__head { padding-inline-end: 44px; margin-bottom: 20px; }
.dlg__tag { margin: 0 0 8px; font-size: 12px; color: var(--cyan); letter-spacing: .14em; direction: ltr; text-align: start; unicode-bidi: plaintext; }
.dlg__title { margin: 0; font-size: 26px; font-weight: 800; line-height: 1.15; }
.dlg__dates { margin: 6px 0 0; color: var(--muted); font-size: 15px; }

.dlg__panel .form, .dlg__panel .term, .dlg__panel .done, .dlg__panel .fail { display: none; }
.dlg__panel[data-step="form"] .form { display: block; }
.dlg__panel[data-step="run"] .term,
.dlg__panel[data-step="done"] .term,
.dlg__panel[data-step="fail"] .term { display: block; }
.dlg__panel[data-step="done"] .done { display: block; }
.dlg__panel[data-step="fail"] .fail { display: block; }

.form__note { margin: 0 0 16px; padding: 12px 14px; border-radius: 12px; font-size: 15px; color: var(--amber); background: rgba(255, 181, 71, .08); border: 1px solid rgba(255, 181, 71, .3); }
.form__row { display: grid; gap: 0 14px; }
@media (min-width: 600px) { .form__row { grid-template-columns: 1fr 1fr; } }
.field { display: block; margin: 0 0 14px; padding: 0; border: 0; min-width: 0; }
.field > span, .field legend { display: block; margin-bottom: 7px; font-size: 14.5px; font-weight: 500; color: var(--muted); padding: 0; }
.field input[type="text"], .field input[type="tel"], .field input[type="email"] {
  width: 100%; height: 50px; padding: 0 16px; border-radius: 14px;
  background: rgba(4, 6, 11, .7); border: 1px solid var(--line-2); color: var(--text);
  font: inherit; font-size: 17px; transition: border-color .2s, box-shadow .2s;
}
.field input[dir="ltr"] { text-align: start; }
[dir="rtl"] .field input[dir="ltr"] { text-align: right; }
.field input:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(66, 240, 255, .18); }
.field.has-err input { border-color: var(--red); }
.field__err { display: block; min-height: 0; margin-top: 5px; font-style: normal; font-size: 13.5px; color: var(--red); }
.field__err:empty { display: none; }
.pills { display: grid; gap: 8px; }
@media (min-width: 600px) { .pills { grid-template-columns: repeat(3, 1fr); } }
.pill { position: relative; cursor: pointer; }
.pill input { position: absolute; opacity: 0; pointer-events: none; }
.pill span {
  display: flex; align-items: center; justify-content: center; text-align: center; min-height: 48px; padding: 8px 12px;
  border-radius: 14px; border: 1px solid var(--line-2); background: rgba(4, 6, 11, .6); font-size: 15px; line-height: 1.3; transition: all .2s;
}
.pill:hover span { border-color: rgba(66, 240, 255, .45); }
.pill input:checked + span { border-color: var(--cyan); color: var(--cyan); background: rgba(66, 240, 255, .08); box-shadow: inset 0 0 0 1px var(--cyan); }
.pill input:focus-visible + span { outline: 2px solid var(--cyan); outline-offset: 2px; }
.hp { position: absolute; inset-inline-start: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form__privacy { margin: 4px 0 18px; font-size: 13.5px; color: var(--dim); }

.term {
  margin: 0; padding: 18px; border-radius: 16px; min-height: 150px;
  background: #02040a; border: 1px solid rgba(66, 240, 255, .2);
  font-family: var(--mono); font-size: 14.5px; line-height: 1.7;
  box-shadow: inset 0 0 40px rgba(66, 240, 255, .05);
}
.term__line { display: flex; gap: 10px; margin: 0; color: #9fb3d6; }
.term__p { color: var(--cyan); flex: none; }
.term__line.is-ok { color: var(--cyan); font-weight: 700; }
.term__line.is-err, .term__line.is-err .term__p { color: var(--red); }
.dlg__panel[data-step="run"] .term__line:last-child .term__t::after { content: '▍'; margin-inline-start: 2px; color: var(--cyan); animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.done { text-align: center; padding-top: 24px; }
.done__mark { width: 64px; height: 64px; margin: 0 auto 14px; }
.done__mark svg { width: 100%; height: 100%; fill: none; stroke: var(--cyan); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 0 10px rgba(66, 240, 255, .6)); }
.done__mark circle { stroke-dasharray: 132; stroke-dashoffset: 132; animation: draw .7s ease forwards; }
.done__mark path { stroke-dasharray: 32; stroke-dashoffset: 32; animation: draw .4s .55s ease forwards; }
.dlg__panel[data-kind="wait"] .done__mark svg { stroke: var(--amber); filter: drop-shadow(0 0 10px rgba(255, 181, 71, .5)); }
@keyframes draw { to { stroke-dashoffset: 0; } }
.done__title { margin: 0; font-size: 26px; font-weight: 800; }
.done__body { margin: 8px auto 22px; max-width: 420px; color: var(--muted); }
.done__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.fail { padding-top: 18px; text-align: center; }
.fail__msg { margin: 0 0 18px; color: var(--text); }

/* ---------------------------------------------------------------- cancel page */
.solo .nav__actions { margin-inline-start: auto; }
.solo { min-height: 100svh; display: flex; flex-direction: column; }
.solo main { flex: 1; display: grid; place-items: center; padding: 48px var(--gutter); position: relative; isolation: isolate; overflow: hidden; }
.solo #net { position: fixed; }
.card {
  width: 100%; max-width: 520px; padding: 30px 26px; border-radius: 24px;
  background: var(--panel-solid); border: 1px solid var(--line-2);
  box-shadow: 0 40px 120px -40px rgba(66, 240, 255, .3);
}
.card h1 { margin: 6px 0 10px; font-size: 30px; font-weight: 800; line-height: 1.15; }
.card p { color: var(--muted); }
.card__box { margin: 18px 0 22px; padding: 16px 18px; border-radius: 14px; background: rgba(4, 6, 11, .6); border: 1px solid var(--line); }
.card__box p { margin: 0; color: var(--text); }
.card__box .mono { color: var(--cyan); font-size: 13px; letter-spacing: .1em; }
.card__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.btn--danger { background: rgba(255, 107, 125, .12); border-color: rgba(255, 107, 125, .55); color: #ffb3bd; }
.btn--danger:hover { background: rgba(255, 107, 125, .2); color: #fff; }

/* ---------------------------------------------------------------- motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal.is-pending { opacity: 1; transform: none; }
  .done__mark circle, .done__mark path { stroke-dashoffset: 0; }
}
