/* Diagnostika firmy: one centred column, one question per screen, big one-tap answers.
   Colours and pills come from ../styles.css (the Rempace look); only the quiz's own pieces live here. */

.dg-page { min-height: 100svh; overflow-x: hidden; }

/* a slow violet light behind the column, the same family as the hero metaballs */
.dg-glow {
  position: fixed;
  inset: -20vmax;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(40vmax 30vmax at 30% 20%, rgba(98, 0, 255, .22), transparent 70%),
    radial-gradient(36vmax 28vmax at 75% 80%, rgba(178, 102, 255, .14), transparent 70%);
  animation: dg-drift 22s ease-in-out infinite alternate;
}
@keyframes dg-drift { to { transform: translate(4vmax, -3vmax) scale(1.08); } }
@media (prefers-reduced-motion: reduce) { .dg-glow { animation: none; } }

.dg-top {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px max(var(--gutter), calc((100% - 760px) / 2 + var(--gutter))) 12px;
  background: linear-gradient(rgba(0, 0, 0, .92) 55%, transparent);
}
.dg-progress { flex: 1; height: 4px; border-radius: 4px; background: var(--line); overflow: hidden; }
.dg-progress span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--violet-2));
  transition: width .45s var(--ease-out);
}

.dg {
  max-width: 760px;
  margin: 0 auto;
  padding: 24px var(--gutter) 96px;
}
@media (min-width: 768px) { .dg { padding-top: 56px; } }

.dg-screen { display: grid; gap: 20px; }
.dg-in { animation: dg-in .45s var(--ease-out) both; }
@keyframes dg-in { from { opacity: 0; transform: translateY(14px); filter: blur(6px); } }
@media (prefers-reduced-motion: reduce) { .dg-in { animation: none; } }

.dg-title { font-size: clamp(34px, 7vw, 60px); line-height: 1.08; letter-spacing: -.02em; }
.dg-q { font-size: clamp(24px, 4.6vw, 34px); line-height: 1.2; letter-spacing: -.01em; }
.dg-title:focus, .dg-q:focus { outline: none; }
.dg-lead { font-size: 18px; color: var(--soft); max-width: 600px; }
.dg-sub { font-size: 15px; color: var(--muted); }
.dg-fine { font-size: 13px; color: var(--muted); }
.dg-fine a { text-decoration: underline; text-underline-offset: 2px; }
.dg-label { font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }

/* intro */
.dg-intro { padding-top: 8vh; gap: 24px; }
.dg-points { display: grid; gap: 10px; }
.dg-points li { position: relative; padding-left: 28px; font-size: 16px; color: var(--soft); }
.dg-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .55em;
  width: 14px;
  height: 2px;
  background: linear-gradient(90deg, var(--violet-2), var(--accent));
}
.dg-start { justify-self: start; margin-top: 8px; padding: 16px 36px; font-size: 17px; }

/* answers: big, one tap, the whole width */
.dg-options { display: grid; gap: 10px; margin-top: 4px; }
@media (min-width: 640px) { .dg-options { grid-template-columns: 1fr 1fr; } }
.dg-option {
  min-height: 64px;
  padding: 16px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .02);
  text-align: left;
  font-size: 17px;
  line-height: 1.3;
  transition: border-color .2s, background-color .2s, transform .25s var(--ease-back);
}
@media (hover: hover) { .dg-option:hover { border-color: #52525b; background: rgba(255, 255, 255, .05); } }
.dg-option:active { transform: scale(.98); }
.dg-option.is-picked { border-color: var(--violet-2); background: rgba(98, 0, 255, .22); }

.dg-back { justify-self: start; margin-top: 8px; font-size: 14px; color: var(--muted); padding: 10px 0; }
@media (hover: hover) { .dg-back:hover { color: #fff; } }

.dg-proof { padding-top: 4vh; }
.dg-proof .pill, .dg-screen > .pill { justify-self: start; }

.dg-text, .dg-form input {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #0a0a0a;
  color: #fff;
  font: inherit;
  font-size: 16px;
}
.dg-text { resize: vertical; min-height: 96px; }
.dg-text:focus, .dg-form input:focus { outline: none; border-color: var(--violet-2); box-shadow: 0 0 0 3px rgba(178, 102, 255, .2); }
.dg-form { display: grid; gap: 14px; }
@media (min-width: 640px) { .dg-form { grid-template-columns: 1fr 1fr; } .dg-form .pill, .dg-form .dg-fine { grid-column: 1 / -1; } }
.dg-form .pill { justify-self: start; margin-top: 6px; }
.dg-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.field__error { font-size: 13px; color: #ff8fab; }

/* result */
.dg-result { gap: 28px; }
.dg-guess { font-size: 16px; color: var(--soft); padding: 12px 16px; border-left: 2px solid var(--violet-2); background: rgba(98, 0, 255, .08); border-radius: 0 8px 8px 0; }
.dg-top-area { display: grid; gap: 16px; align-items: end; }
@media (min-width: 640px) { .dg-top-area { grid-template-columns: 1fr auto; } }
.dg-score { display: flex; align-items: baseline; gap: 6px; }
.dg-score__n { font-size: 72px; line-height: 1; letter-spacing: -.03em; background: linear-gradient(to bottom right, #fff, var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.dg-score__of { font-size: 18px; color: var(--muted); }

.dg-why { display: grid; gap: 8px; }
.dg-why li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 15px; color: var(--muted); }
.dg-why strong { font-weight: 500; color: #fff; }

.dg-est { display: grid; gap: 12px; }
@media (min-width: 640px) { .dg-est { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); } }
.dg-est__card { gap: 6px; }
.dg-est__card.is-top { border-color: rgba(178, 102, 255, .6); }
.dg-est__n { font-size: 40px; line-height: 1.1; letter-spacing: -.02em; }
.dg-est__math { font-size: 13px; color: var(--muted); }

.dg-bars { display: grid; gap: 12px; }
.dg-bar { display: grid; grid-template-columns: minmax(0, 1fr) 40px; gap: 6px 12px; align-items: center; font-size: 15px; color: var(--soft); }
.dg-bar__name { grid-column: 1 / -1; }
.dg-bar__track { height: 8px; border-radius: 8px; background: var(--line); overflow: hidden; }
.dg-bar__fill { display: block; height: 100%; width: var(--w); border-radius: inherit; background: #52525b; animation: dg-grow 1s var(--ease-out) both; }
.dg-bar.is-top .dg-bar__fill { background: linear-gradient(90deg, var(--accent), var(--violet-2)); }
.dg-bar.is-top { color: #fff; }
.dg-bar__n { text-align: right; font-variant-numeric: tabular-nums; }
@media (min-width: 640px) { .dg-bar { grid-template-columns: 220px minmax(0, 1fr) 40px; } .dg-bar__name { grid-column: auto; } }
@keyframes dg-grow { from { width: 0; } }

.dg-steps ol { display: grid; gap: 12px; counter-reset: dg; }
.dg-steps li { position: relative; padding-left: 40px; font-size: 16px; color: var(--soft); counter-increment: dg; }
.dg-steps li::before {
  content: counter(dg);
  position: absolute;
  left: 0;
  top: -2px;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border: 1px solid var(--violet-2);
  border-radius: 50%;
  font-size: 13px;
  color: #fff;
}

.dg-offer { gap: 14px; border-color: rgba(178, 102, 255, .45); background: linear-gradient(160deg, rgba(98, 0, 255, .16), #000 60%); }
.dg-offer__name { font-size: 28px; line-height: 1.2; }
.dg-offer__text { font-size: 16px; color: var(--soft); }
.dg-offer .pill { justify-self: start; }
.dg-more { font-size: 14px; color: var(--violet-2); }

/* the call, booked right on the result */
.dg-cal__lead { font-size: 16px; color: #fff; margin-top: 6px; }
.dg-cal__lead--later { color: var(--soft); }   /* no calendar without the investment: where to write when the time comes */
.dg-cal__lead a { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.dg-cal { display: grid; gap: 14px; }
.dg-cal__days { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.dg-cal__day, .dg-cal__time {
  min-height: 48px;
  padding: 10px 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, .02);
  font-size: 15px;
  transition: border-color .2s, background-color .2s;
}
.dg-cal__times { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 8px; max-height: 232px; overflow-y: auto; padding-right: 2px; }
.dg-cal__time { min-height: 44px; font-variant-numeric: tabular-nums; }
@media (hover: hover) { .dg-cal__day:hover, .dg-cal__time:hover { border-color: #52525b; } }
.dg-cal__day.is-picked, .dg-cal__time.is-picked { border-color: var(--violet-2); background: rgba(98, 0, 255, .25); }
.dg-cal__ok { justify-self: start; }
.dg-cal.is-done { gap: 10px; }
.dg-cal__check { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; background: var(--accent); font-size: 22px; }
.dg-cal__done { font-size: 22px; line-height: 1.3; }
.dg-again { justify-self: start; }
.dg-options--multi .dg-option.is-picked::after { content: " ✓"; color: var(--violet-2); }
.pill:disabled { opacity: .45; cursor: default; }
