/* Diagnostic survey: one question per screen, Typeform-style, in the Gridwerk dark look. */

body.dg { background: var(--band-dark); color: var(--off); min-height: 100vh; overflow: hidden; }
.dg-progress { position: fixed; inset: 0 0 auto 0; height: 3px; background: rgba(255, 255, 255, .12); z-index: 30; }
.dg-progress span { display: block; height: 100%; width: 0; background: var(--accent); transition: width .6s var(--ease); }
.dg-top { position: fixed; inset: 3px 0 auto 0; height: 76px; padding: 0 var(--pad); display: flex; align-items: center; justify-content: space-between; z-index: 20; }
.dg-top .gw-logo img { height: 20px; filter: brightness(0) invert(1); }
.dg-close { width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .4); display: flex; align-items: center; justify-content: center; font-size: 22px; line-height: 1; color: #fff; transition: background-color .3s var(--ease); }
.dg-close:hover { background: rgba(255, 255, 255, .1); }

.dg-stage { position: relative; height: 100vh; height: 100dvh; background: #0e0e10; isolation: isolate; }
.dg-stage::before { content: ''; position: absolute; inset: 0; z-index: 0; background: radial-gradient(50% 50% at 12% 100%, rgba(252, 118, 47, .20), transparent 62%), radial-gradient(45% 45% at 92% 8%, rgba(130, 145, 180, .16), transparent 62%); pointer-events: none; }
.dg-noscript { position: relative; z-index: 3; max-width: 640px; margin: 0 auto; padding: 160px var(--pad) 0; }
.dg-noscript a { text-decoration: underline; }

.dg-screen { position: absolute; inset: 0; z-index: 2; display: flex; align-items: center; justify-content: center; padding: 96px var(--pad) 84px; opacity: 0; visibility: hidden; transform: translateY(36px); transition: opacity .55s var(--ease), transform .55s var(--ease), visibility 0s linear .55s; overflow-y: auto; }
.dg-screen.is-active { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.dg-screen.is-leaving { opacity: 0; transform: translateY(-36px); }
.dg-inner { width: 100%; max-width: 780px; margin: auto; }

.dg-kicker { display: flex; align-items: center; gap: 12px; color: var(--accent); margin-bottom: 22px; }
.dg-kicker .gw-label { color: var(--accent); }
.dg-prompt { font-family: var(--font-head); font-weight: 300; font-size: clamp(28px, 4.2vw, 46px); line-height: 1.1; letter-spacing: -.045em; }
.dg-help { margin-top: 14px; color: var(--on-dark); font-size: 18px; letter-spacing: -.02em; line-height: 1.3; }

.dg-options { display: grid; gap: 10px; margin-top: 34px; max-width: 560px; }
.dg-opt { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; background: rgba(255, 255, 255, .03); border: 1px solid rgba(255, 255, 255, .26); border-radius: 10px; padding: 13px 18px; font-size: 18px; letter-spacing: -.02em; color: var(--off); cursor: pointer; transition: background-color .25s var(--ease), border-color .25s var(--ease), transform .25s var(--ease); }
.dg-opt:hover { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .5); transform: translateX(4px); }
.dg-opt kbd { flex: 0 0 auto; width: 28px; height: 28px; border-radius: 6px; border: 1px solid rgba(255, 255, 255, .4); display: inline-flex; align-items: center; justify-content: center; font-family: var(--font-mono); font-size: 12px; color: var(--on-dark); transition: all .25s var(--ease); }
.dg-opt.is-selected { border-color: var(--accent); background: rgba(252, 118, 47, .12); }
.dg-opt.is-selected kbd { background: var(--accent); border-color: var(--accent); color: #fff; }

.dg-field { margin-top: 34px; max-width: 640px; }
.dg-input { width: 100%; background: transparent; border: 0; border-bottom: 1px solid rgba(255, 255, 255, .4); color: #fff; font-family: var(--font-head); font-weight: 300; font-size: clamp(22px, 3vw, 32px); letter-spacing: -.04em; padding: 8px 0 12px; border-radius: 0; resize: none; transition: border-color .3s var(--ease); }
.dg-input::placeholder { color: rgba(255, 255, 255, .28); }
.dg-input:focus { outline: none; border-bottom-color: var(--accent); }
.dg-money { display: flex; align-items: baseline; gap: 14px; }
.dg-money span { font-family: var(--font-mono); font-size: 14px; letter-spacing: .06em; color: var(--on-dark); }

.dg-actions { display: flex; align-items: center; gap: 18px; margin-top: 30px; flex-wrap: wrap; }
.dg-hint { font-family: var(--font-mono); font-size: 12px; letter-spacing: .04em; color: var(--on-dark-soft); }
.dg-skip { background: none; border: 0; color: var(--on-dark); font-size: 15px; text-decoration: underline; text-underline-offset: 4px; cursor: pointer; padding: 6px 2px; }
.dg-skip:hover { color: #fff; }
.dg-error { margin-top: 16px; color: var(--accent); font-size: 15px; min-height: 22px; }

.dg-intro .dg-prompt { font-size: clamp(34px, 6vw, 68px); max-width: 14ch; }
.dg-intro .dg-help { font-size: clamp(18px, 2vw, 24px); color: #fff; margin-top: 22px; max-width: 26ch; }
.dg-note { margin-top: 18px; color: var(--on-dark-soft); font-size: 15px; max-width: 42ch; }
.dg-interlude .dg-prompt { font-size: clamp(26px, 3.8vw, 44px); max-width: 22ch; }

.dg-contact-grid { display: grid; gap: 22px; margin-top: 30px; max-width: 560px; }
.dg-contact-grid label { display: block; font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--on-dark-soft); margin-bottom: 4px; }
.dg-contact-grid .dg-input { font-size: clamp(20px, 2.4vw, 26px); }
.dg-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.dg-consent { display: flex; align-items: flex-start; gap: 12px; margin-top: 8px; font-size: 15px; color: var(--on-dark); cursor: pointer; line-height: 1.35; }
.dg-consent input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--accent); flex: 0 0 auto; }
.dg-consent a { text-decoration: underline; text-underline-offset: 3px; }

.dg-loading { display: flex; gap: 8px; }
.dg-loading i { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); animation: dgPulse 1s var(--ease) infinite; }
.dg-loading i:nth-child(2) { animation-delay: .15s; }
.dg-loading i:nth-child(3) { animation-delay: .3s; }
@keyframes dgPulse { 0%, 100% { opacity: .25; transform: scale(.8); } 50% { opacity: 1; transform: scale(1.15); } }

/* Readout */
.dg-screen--readout { align-items: flex-start; padding-top: 110px; padding-bottom: 120px; }
.dg-readout { max-width: 860px; }
.dg-readout h1 { font-size: clamp(34px, 5vw, 58px); }
.dg-area { display: grid; grid-template-columns: 140px 180px 1fr; gap: 16px 24px; align-items: baseline; padding: 20px 0; border-top: 1px solid var(--line-dark); }
.dg-area:last-of-type { border-bottom: 1px solid var(--line-dark); }
.dg-area__name { font-family: var(--font-head); font-weight: 300; font-size: 26px; letter-spacing: -.04em; }
.dg-area__level { display: flex; align-items: center; gap: 10px; font-family: var(--font-mono); font-size: 12px; letter-spacing: .04em; text-transform: uppercase; color: var(--on-dark); white-space: nowrap; }
.dg-dots { display: inline-flex; gap: 4px; }
.dg-dots i { width: 8px; height: 8px; border-radius: 50%; border: 1px solid var(--accent); }
.dg-dots i.on { background: var(--accent); }
.dg-area__text { font-size: 18px; letter-spacing: -.02em; line-height: 1.35; color: var(--off); }
.dg-meta { margin-top: 36px; display: grid; gap: 18px; }
.dg-meta p { font-size: 18px; letter-spacing: -.02em; line-height: 1.35; }
.dg-meta .gw-label { color: var(--on-dark-soft); display: block; margin-bottom: 6px; }
.dg-disclaimer { margin-top: 26px; color: var(--on-dark-soft); font-size: 14px; }
.dg-words { margin-top: 44px; }
.dg-words h2 { font-size: 26px; letter-spacing: -.04em; margin-bottom: 14px; }
.dg-words dl { margin: 0; display: grid; grid-template-columns: 150px 1fr; gap: 12px 24px; font-size: 17px; letter-spacing: -.02em; line-height: 1.35; }
.dg-words dt { font-family: var(--font-mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--on-dark-soft); padding-top: 3px; }
.dg-words dd { margin: 0; color: var(--off); }
.dg-words dd.is-empty { color: var(--on-dark-soft); }
.dg-band { margin-top: 52px; padding: 30px; border-radius: var(--radius-lg); background: #fff; color: var(--ink); }
.dg-band .gw-label { color: var(--g1); }
.dg-band__price { font-family: var(--font-head); font-weight: 300; font-size: clamp(36px, 5vw, 52px); letter-spacing: -.05em; line-height: 1.05; margin-top: 14px; }
.dg-band__sub { color: var(--g1); margin-top: 6px; }
.dg-band p.dg-band__note { margin-top: 18px; color: var(--g2); font-size: 16px; max-width: 52ch; line-height: 1.4; }
.dg-band .gw-actions { margin-top: 24px; }
.dg-status { margin-top: 22px; color: var(--on-dark-soft); font-size: 14px; }

.dg-bottom { position: fixed; inset: auto 0 0 0; height: 68px; padding: 0 var(--pad); display: flex; align-items: center; justify-content: space-between; z-index: 20; pointer-events: none; }
.dg-bottom > * { pointer-events: auto; }
.dg-bottom .gw-label { color: var(--on-dark-soft); }
.dg-nav { display: flex; gap: 8px; }
.dg-nav button { width: 40px; height: 40px; border-radius: 8px; border: 1px solid rgba(255, 255, 255, .3); background: rgba(255, 255, 255, .04); color: #fff; font-size: 16px; cursor: pointer; transition: background-color .25s var(--ease), opacity .25s; }
.dg-nav button:hover:not(:disabled) { background: rgba(255, 255, 255, .14); }
.dg-nav button:disabled { opacity: .3; cursor: default; }
body.dg-readout-on .dg-bottom { display: none; }

@media (hover: none) { .dg-hint { display: none; } .dg-opt kbd { display: none; } .dg-opt { padding: 16px 18px; } }
@media (max-width: 760px) {
  .dg-area { grid-template-columns: 1fr; gap: 6px; }
  .dg-words dl { grid-template-columns: 1fr; gap: 2px; }
  .dg-words dd { margin-bottom: 14px; }
  .dg-screen { padding-top: 88px; }
}
@media (prefers-reduced-motion: reduce) { .dg-screen, .dg-progress span { transition: none !important; } .dg-loading i { animation: none; opacity: 1; } }

.dg-screen:focus { outline: none; }

/* Browser autofill paints its own light box and dark text over filled fields.
   Keep the underline-only look: the long background transition stops Chrome and
   Safari ever showing their fill colour, and the text stays white. */
.dg-input:-webkit-autofill,
.dg-input:-webkit-autofill:hover,
.dg-input:-webkit-autofill:focus,
.dg-input:-webkit-autofill:active {
  -webkit-text-fill-color: #fff;
  caret-color: #fff;
  -webkit-box-shadow: 0 0 0 1000px transparent inset;
  box-shadow: 0 0 0 1000px transparent inset;
  transition: background-color 600000s 0s, color 600000s 0s;
  font-family: var(--font-head);
}
.dg-input:autofill { background: transparent; color: #fff; }

/* Thank-you screen (used when the readout goes to Gridwerk instead of the respondent) */
.dg-thanks h1 { font-size: clamp(34px, 5.4vw, 60px); max-width: 16ch; }
.dg-thanks .dg-help { max-width: 34ch; color: #fff; font-size: clamp(18px, 2vw, 22px); }
.dg-thanks .dg-note { margin-top: 16px; }

/* Emblem in the survey: intro mark, pulsing loader, thank-you mark */
.dg-mark { display: block; width: 44px; height: auto; margin-bottom: 30px; }
.dg-thanks .dg-mark { width: 52px; }
.dg-pulse { width: 46px; height: auto; animation: dgEmblem 1.4s var(--ease) infinite; }
@keyframes dgEmblem { 0%, 100% { opacity: .35; transform: scale(.92); } 50% { opacity: 1; transform: scale(1.04); } }
@media (prefers-reduced-motion: reduce) { .dg-pulse { animation: none; opacity: 1; } }

/* Multi-select options: a tick box on the right that fills when chosen */
.dg-opt .dg-tick { margin-left: auto; flex: 0 0 auto; width: 20px; height: 20px; border-radius: 5px; border: 1px solid rgba(255, 255, 255, .45); position: relative; transition: all .25s var(--ease); }
.dg-opt.is-selected .dg-tick { background: var(--accent); border-color: var(--accent); }
.dg-opt.is-selected .dg-tick::after { content: ''; position: absolute; left: 6px; top: 2px; width: 5px; height: 10px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
