/*
 * The driver training at /driver-training/{token} - step 7 of the joining pipeline.
 *
 * Page-scoped, like how-it-works.css, because nothing else on the site looks like this: it is one
 * card holding one idea at a time, the web twin of the screen both apps draw. Every colour comes
 * from site.css's :root - there is ONE design system and this file re-declares no token.
 *
 * Everything is prefixed `dt-` so it cannot collide with the site's own classes.
 */

.dt {
  min-height: 100vh;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px;
  background:
    radial-gradient(720px 420px at 12% -8%, color-mix(in srgb, var(--brand) 12%, #fff) 0%, transparent 60%),
    radial-gradient(680px 420px at 108% 6%, color-mix(in srgb, var(--yellow) 22%, #fff) 0%, transparent 55%),
    var(--canvas);
}

.dt-frame {
  position: relative;
  width: 100%;
  max-width: 520px;
  background: #fff;
  border-radius: 30px;
  box-shadow: 0 30px 80px color-mix(in srgb, var(--brand) 18%, transparent),
              0 4px 14px color-mix(in srgb, var(--brand) 8%, transparent);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  /* A minimum, not a height: the card grows with the longest situation rather than scrolling
     inside itself, which on a laptop is what "fits" means. */
  min-height: min(760px, 92vh);
}

.dt-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 18px 22px 12px; }
.dt-brand { display: flex; align-items: center; gap: 9px; font-weight: 700; font-size: 21px; color: var(--brand-d); text-decoration: none; letter-spacing: -.5px; }
.dt-brand img { border-radius: 8px; }

.dt-langs { display: flex; gap: 4px; background: color-mix(in srgb, var(--line) 45%, #fff); padding: 4px; border-radius: 20px; }
.dt-langs a { padding: 6px 11px; border-radius: 16px; font-size: 12.5px; font-weight: 600; color: var(--muted); text-decoration: none; }
.dt-langs a.on { background: #fff; color: var(--brand-d); box-shadow: 0 2px 6px color-mix(in srgb, var(--brand) 15%, transparent); }

.dt-track { height: 7px; margin: 4px 22px 0; background: color-mix(in srgb, var(--line) 45%, #fff); border-radius: 8px; overflow: hidden; }
.dt-fill { height: 100%; width: 0; border-radius: 8px; background: linear-gradient(90deg, var(--yellow), var(--brand)); transition: width .45s cubic-bezier(.6,.2,.1,1); }

.dt-stage { flex: 1; padding: 18px 26px 6px; }
.dt-stage > * + * { margin-top: 12px; }
.dt-centre { text-align: center; }

.dt-kicker { text-transform: uppercase; letter-spacing: .16em; font-size: 11px; font-weight: 700; color: var(--brand-d); margin: 0; }
.dt-stage h1 { font-size: clamp(24px, 4vw, 28px); line-height: 1.24; margin: 0; font-weight: 600; letter-spacing: -.015em; }
.dt-stage h2 { font-size: clamp(20px, 3.4vw, 23px); line-height: 1.24; margin: 0; font-weight: 600; letter-spacing: -.015em; }
.dt-stage p { margin: 0; color: var(--ink-70); font-size: 15.5px; line-height: 1.55; }
.dt-grad { background: var(--grad-brand); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* The comic panel, with the child's line drawn over it - the same composition both apps use, which
   is why the illustrations carry a calm upper band. */
.dt-figure { position: relative; text-align: center; }
.dt-art { display: block; width: 100%; max-width: 300px; margin: 0 auto; }
.dt-art--small { max-width: 220px; }
.dt-bubble {
  position: absolute; top: 6px; left: 50%; transform: translateX(-50%);
  background: #fff; border: 3px solid var(--dark); border-radius: 18px;
  padding: 6px 14px; font-weight: 700; font-size: 15px; color: var(--dark);
  max-width: 74%; line-height: 1.2; box-shadow: 4px 4px 0 color-mix(in srgb, var(--dark) 16%, transparent);
}

/* The one part of a situation a driver has to remember, so it is a card and not another paragraph. */
.dt-do { display: flex; gap: 12px; align-items: flex-start; background: color-mix(in srgb, var(--brand) 7%, #fff); border: 1px solid color-mix(in srgb, var(--brand) 18%, #fff); border-radius: 16px; padding: 14px 16px; }
.dt-do .dt-tick { flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--brand); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 15px; }
.dt-lab { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--brand-d); margin: 0 0 3px; }
.dt-do p { color: var(--ink); }

.dt-box { border: 1.6px solid var(--line); border-radius: 20px; padding: 18px; background: #fff; transition: border-color .2s, background .2s; }
.dt-box.on { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 7%, #fff); }
.dt-chk { display: flex; gap: 13px; align-items: flex-start; cursor: pointer; font-weight: 600; color: var(--ink); font-size: 16px; }
.dt-chk input { width: 24px; height: 24px; accent-color: var(--brand); margin: 0; flex: none; }
.dt-field { margin-top: 16px; }
.dt-field label { display: block; font-size: 12px; font-weight: 700; color: var(--muted); margin-bottom: 6px; text-transform: uppercase; letter-spacing: .05em; }
.dt-field input { width: 100%; padding: 13px 15px; border: 1.6px solid var(--line-i); border-radius: 13px; font-size: 16px; font-family: inherit; }
.dt-field input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 12%, transparent); }

.dt-opt { display: flex; gap: 12px; align-items: flex-start; width: 100%; text-align: left; border: 1.6px solid var(--line); background: #fff; color: var(--ink); border-radius: 16px; padding: 14px 16px; font-size: 15.5px; font-family: inherit; cursor: pointer; transition: border-color .16s, background .16s, transform .16s; }
.dt-opt + .dt-opt { margin-top: 10px; }
.dt-opt .dt-dot { flex: none; width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line-i); display: flex; align-items: center; justify-content: center; color: #fff; font-size: 12px; }
.dt-opt:hover:enabled { border-color: var(--brand); transform: translateY(-1px); }
.dt-opt:disabled { cursor: default; }
.dt-opt.right { border-color: var(--green-t); background: color-mix(in srgb, var(--green-t) 8%, #fff); }
.dt-opt.right .dt-dot { border-color: var(--green-t); background: var(--green-t); }
.dt-opt.wrong { border-color: var(--danger); background: color-mix(in srgb, var(--danger) 7%, #fff); }
.dt-opt.wrong .dt-dot { border-color: var(--danger); background: var(--danger); }
.dt-opt.dim { color: var(--muted); }

.dt-why { border-radius: 15px; padding: 13px 16px; font-size: 15px; }
.dt-why b { display: block; margin-bottom: 2px; }
.dt-why.ok { background: color-mix(in srgb, var(--green-t) 10%, #fff); color: var(--green-t); }
.dt-why.no { background: color-mix(in srgb, var(--danger) 8%, #fff); color: var(--danger); }

.dt-contact { background: color-mix(in srgb, var(--brand) 7%, #fff); border: 1px solid color-mix(in srgb, var(--brand) 18%, #fff); border-radius: 16px; padding: 14px 16px; text-align: left; }
.dt-contact a { color: var(--brand-d); font-weight: 600; text-decoration: none; }
.dt-contact div { font-size: 15px; }
.dt-record { font-size: 13px; color: var(--muted); }
.dt-score { display: inline-block; background: color-mix(in srgb, var(--brand) 7%, #fff); color: var(--brand-d); font-weight: 600; padding: 8px 16px; border-radius: 20px; }

.dt-foot { padding: 14px 26px 24px; display: flex; gap: 10px; align-items: center; }
.dt-btn { font-family: inherit; border: none; border-radius: 15px; padding: 15px 22px; font-size: 16px; font-weight: 600; cursor: pointer; text-decoration: none; text-align: center; transition: transform .12s, box-shadow .2s; }
.dt-btn--primary { flex: 1; color: #fff; background: var(--grad-brand); box-shadow: 0 10px 22px color-mix(in srgb, var(--brand) 34%, transparent); }
.dt-btn--primary:hover { transform: translateY(-2px); }
.dt-btn--primary:disabled { background: var(--line-i); box-shadow: none; cursor: not-allowed; transform: none; }
.dt-btn--ghost { background: #fff; color: var(--brand-d); border: 1.6px solid var(--line); }
.dt-btn--ghost:hover { border-color: var(--brand); }

@media (max-width: 460px) {
  .dt { padding: 0; }
  .dt-frame { border-radius: 0; min-height: 100vh; max-width: none; }
  .dt-stage { padding: 16px 18px 4px; }
  .dt-foot { padding: 12px 18px 20px; }
}
