@font-face {
  font-family: "Open Sans Aptimetry";
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url("/assets/opensans-latin-variable.woff2") format("woff2");
}

.drill-experience {
  --practice: #10a07d;
  --practice-bright: #3be6bd;
  --practice-deep: #08765e;
  --app-canvas: #0a0e18;
  --app-canvas-soft: #111a2a;
  --app-surface: #171f2d;
  --app-surface-high: #202b3d;
  --app-ink: #f5f7ff;
  --app-muted: #aab2c2;
  --app-rim: rgba(140, 180, 235, 0.32);
  --app-edge: rgba(0, 0, 0, 0.86);
  --success: #4fe08f;
  --error: #ff7585;
  --tutor: #57e6e0;
}

.drill-experience .story {
  align-items: center;
}

.drill-experience .story-copy {
  position: sticky;
  top: 126px;
  align-self: start;
}

.drill-experience .story-copy > p {
  color: var(--ink-soft);
  font-size: 1.08rem;
}

.drill-experience button {
  font: inherit;
}

.drill-stage {
  position: relative;
  display: grid;
  min-height: 1020px;
  padding: 34px;
  place-items: center;
  border-radius: 46px;
  background:
    radial-gradient(circle at 72% 14%, rgba(32, 212, 223, 0.58), transparent 33%),
    radial-gradient(circle at 18% 88%, rgba(118, 87, 232, 0.58), transparent 40%),
    #dbe8fa;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.drill-stage::before,
.drill-stage::after {
  position: absolute;
  border: 1px solid rgba(255,255,255,0.50);
  border-radius: 50%;
  content: "";
}

.drill-stage::before {
  top: -90px;
  right: -58px;
  width: 210px;
  height: 210px;
}

.drill-stage::after {
  bottom: -120px;
  left: -70px;
  width: 240px;
  height: 240px;
}

.device {
  position: relative;
  z-index: 2;
  width: min(100%, 438px);
  aspect-ratio: 720 / 1565;
  padding: 5px;
  border-radius: 48px;
  background: #050913 image-set(
    url("/assets/app-review.webp") type("image/webp"),
    url("/assets/app-review.jpg") type("image/jpeg")
  ) center / 100% 100% no-repeat;
  box-shadow:
    0 42px 80px rgba(4,8,19,0.38),
    0 0 0 1px rgba(164,196,239,0.13);
  font-family: "Open Sans Aptimetry", -apple-system, BlinkMacSystemFont, sans-serif;
  overflow: hidden;
}

.device-screen {
  position: relative;
  height: 100%;
  border-radius: 43px;
  color: var(--app-ink);
  background:
    radial-gradient(circle at 90% 8%, rgba(16,160,125,0.19), transparent 20rem),
    linear-gradient(145deg, #17253b 0%, #101a2b 35%, var(--app-canvas) 100%);
  clip-path: inset(0 round 43px);
  overflow: hidden;
  isolation: isolate;
}

.status-bar {
  position: absolute;
  z-index: 8;
  top: 0;
  left: 0;
  right: 0;
  display: grid;
  height: 54px;
  padding: 12px 24px 0;
  grid-template-columns: 1fr auto 1fr;
  align-items: start;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", sans-serif;
  font-size: 14px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.012em;
  line-height: 1;
  pointer-events: none;
}

.status-time {
  padding-top: 1px;
  color: #fff;
  text-shadow: 0 0.5px 0 rgba(0,0,0,0.20);
}

.status-island {
  width: 116px;
  height: 31px;
  border-radius: 20px;
  background: #000;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.02);
}

.status-icons {
  display: flex;
  justify-self: end;
  gap: 5px;
  align-items: flex-end;
  color: #fff;
  transform: translateY(1px);
}

.cellular {
  display: inline-flex;
  width: 18px;
  height: 12px;
  gap: 1.5px;
  align-items: flex-end;
}

.cellular > span {
  width: 3px;
  border-radius: 1.5px;
  background: currentColor;
}
.cellular > span:nth-child(1) { height: 3.5px; }
.cellular > span:nth-child(2) { height: 5.5px; }
.cellular > span:nth-child(3) { height: 8px; }
.cellular > span:nth-child(4) { height: 10.5px; }

.wifi {
  width: 17px;
  height: 12px;
  background:
    radial-gradient(circle at 50% 100%, currentColor 0 1.4px, transparent 1.6px),
    radial-gradient(circle at 50% 100%, transparent 0 4px, currentColor 4.2px 5.7px, transparent 5.9px),
    radial-gradient(circle at 50% 100%, transparent 0 8.2px, currentColor 8.4px 10px, transparent 10.2px);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
}

.battery {
  position: relative;
  width: 24px;
  height: 12px;
  margin-left: 1px;
  border: 1.4px solid rgba(255,255,255,0.82);
  border-radius: 3.5px;
}
.battery::before {
  position: absolute;
  top: 1.5px;
  bottom: 1.5px;
  left: 1.5px;
  width: 17px;
  border-radius: 1.5px;
  background: #fff;
  content: "";
}
.battery::after {
  position: absolute;
  top: 3.25px;
  right: -3px;
  width: 1.5px;
  height: 4.5px;
  border-radius: 0 1.5px 1.5px 0;
  background: rgba(255,255,255,0.64);
  content: "";
}

.app-header {
  position: absolute;
  z-index: 6;
  top: 51px;
  left: 0;
  right: 0;
  height: 54px;
  padding: 0 20px;
}

.app-surface {
  position: absolute;
  z-index: 2;
  top: 100px;
  right: 0;
  bottom: 0;
  left: 0;
  clip-path: polygon(
    0 64px,
    2% 55px,
    6% 46px,
    12% 38px,
    20% 34px,
    72% 34px,
    82% 30px,
    89% 23px,
    95% 12px,
    100% 0,
    100% 100%,
    0 100%
  );
  background:
    radial-gradient(circle at 8% 0%, rgba(51,73,110,0.52), transparent 17rem),
    radial-gradient(circle at 92% 16%, rgba(16,160,125,0.09), transparent 20rem),
    linear-gradient(145deg, #21304a 0%, #162238 42%, #101827 100%);
  filter: drop-shadow(0 -1px 0 rgba(161,195,235,0.20)) drop-shadow(0 -12px 18px rgba(2,7,15,0.22));
  pointer-events: none;
}

.app-header-row {
  position: relative;
  z-index: 2;
  display: grid;
  height: 54px;
  grid-template-columns: 52px 1fr 58px;
  align-items: center;
}

.close-button {
  display: grid;
  width: 44px;
  height: 44px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 14px;
  color: var(--practice-bright);
  background: transparent;
  cursor: pointer;
}

.close-glyph {
  position: relative;
  width: 25px;
  height: 25px;
  filter: drop-shadow(-1px 1.5px 1px rgba(0,0,0,0.54)) drop-shadow(1px -1px 2px rgba(59,230,189,0.18));
}

.close-glyph::before,
.close-glyph::after {
  position: absolute;
  top: 10px;
  left: 0;
  width: 25px;
  height: 5px;
  border-radius: 999px;
  background: currentColor;
  content: "";
}
.close-glyph::before { transform: rotate(45deg); }
.close-glyph::after { transform: rotate(-45deg); }

.close-button:hover { background: rgba(59,230,189,0.08); }
.close-button:focus-visible,
.choice:focus-visible,
.tutor-button:focus-visible {
  outline: 3px solid var(--practice-bright);
  outline-offset: 3px;
}

.session-title { text-align: center; }
.session-title strong {
  display: block;
  color: #f2f5fb;
  font-size: 1rem;
  font-weight: 650;
  letter-spacing: -0.015em;
  text-shadow: -0.5px 0.5px 0.5px rgba(0,0,0,0.52), 0.4px -0.4px 0 rgba(204,228,255,0.20);
}
.session-title span {
  display: block;
  margin-top: 1px;
  color: var(--app-muted);
  font-size: 0.66rem;
  font-weight: 560;
}

.progress-pill {
  display: inline-flex;
  min-width: 56px;
  min-height: 30px;
  padding: 5px 9px;
  justify-content: center;
  align-items: center;
  border: 1px solid rgba(59,230,189,0.26);
  border-radius: 19px;
  color: var(--practice-bright);
  background: rgba(16,160,125,0.10);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  font-size: 0.70rem;
  font-weight: 780;
  font-variant-numeric: tabular-nums;
}

.app-scroll {
  position: absolute;
  z-index: 3;
  inset: 0;
  padding: 184px 22px 140px;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  scroll-padding: 184px 0 140px;
  scrollbar-width: none;
  scroll-behavior: smooth;
  -webkit-mask-image: linear-gradient(
    to bottom,
    transparent 0,
    transparent 118px,
    rgba(0,0,0,0.14) 134px,
    rgba(0,0,0,0.72) 154px,
    #000 174px,
    #000 100%
  );
  mask-image: linear-gradient(
    to bottom,
    transparent 0,
    transparent 118px,
    rgba(0,0,0,0.14) 134px,
    rgba(0,0,0,0.72) 154px,
    #000 174px,
    #000 100%
  );
}
.app-scroll::-webkit-scrollbar { display: none; }

.question-card {
  min-height: 100%;
  padding: 4px 0 26px;
}

.question-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
  align-items: center;
}

.app-chip {
  display: inline-flex;
  min-height: 34px;
  padding: 7px 12px;
  align-items: center;
  gap: 7px;
  border-radius: 17px;
  font-size: 0.73rem;
  font-weight: 750;
  letter-spacing: -0.01em;
}

.app-chip.primary {
  color: #06130f;
  background: linear-gradient(145deg, var(--practice-bright), #17b991);
  box-shadow: 0 7px 16px rgba(16,160,125,0.28), inset 0 1px 0 rgba(255,255,255,0.42);
}

.app-chip.secondary {
  color: var(--practice-bright);
  border: 1px solid rgba(59,230,189,0.18);
  background: rgba(16,160,125,0.10);
}

.target-icon {
  position: relative;
  width: 15px;
  height: 15px;
  border: 1.5px solid currentColor;
  border-radius: 50%;
}
.target-icon::before,
.target-icon::after {
  position: absolute;
  background: currentColor;
  content: "";
}
.target-icon::before { top: 5px; left: -4px; width: 21px; height: 1.5px; }
.target-icon::after { top: -4px; left: 5px; width: 1.5px; height: 21px; }

.passage {
  margin: 0;
  color: var(--app-ink);
  font-size: clamp(1.12rem, 2.3vw, 1.35rem);
  font-weight: 430;
  line-height: 1.55;
  letter-spacing: -0.012em;
}

.directive {
  margin: 17px 0 0;
  color: var(--app-muted);
  font-size: 0.82rem;
  font-weight: 680;
  line-height: 1.45;
  transition: opacity 180ms ease, max-height 220ms ease, margin 220ms ease;
}

.question-card.is-answered .directive {
  max-height: 0;
  margin: 0;
  opacity: 0;
  overflow: hidden;
}

.choices {
  display: grid;
  gap: 10px;
  margin-top: 24px;
}

.choice {
  position: relative;
  display: grid;
  width: 100%;
  min-height: 68px;
  padding: 12px 16px;
  grid-template-columns: 38px 1fr 24px;
  gap: 12px;
  align-items: center;
  border: 1px solid rgba(116,137,172,0.42);
  border-radius: 18px;
  color: var(--app-ink);
  background:
    linear-gradient(145deg, rgba(37,48,67,0.98), rgba(15,20,30,0.98));
  box-shadow:
    0 9px 18px rgba(0,0,0,0.40),
    inset 0 1px 0 rgba(184,211,248,0.12),
    inset 0 -1px 0 rgba(0,0,0,0.7);
  text-align: left;
  cursor: pointer;
  transition: border-color 180ms ease, background 180ms ease, transform 150ms ease, opacity 180ms ease;
}

.choice:hover { transform: translateY(-1px); border-color: rgba(151,176,217,0.62); }
.choice:active { transform: translateY(1px) scale(0.995); }

.choice-letter {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 50%;
  color: var(--app-ink);
  background: rgba(255,255,255,0.09);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
  font-size: 0.95rem;
  font-weight: 750;
}

.choice-text {
  font-size: 1.04rem;
  font-weight: 640;
  line-height: 1.34;
}

.choice-state {
  display: none;
  width: 20px;
  height: 20px;
  place-items: center;
  border: 1.5px solid currentColor;
  border-radius: 50%;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1;
}

.question-card.is-answered .choice-state { display: grid; }
.question-card.is-answered .choice:not(.is-correct):not(.is-selected) { opacity: 0.84; }
.question-card.is-answered .choice:not(.is-correct):not(.is-selected) .choice-state::before { content: "i"; }

.choice.is-selected.is-wrong {
  color: var(--error);
  border: 2px solid rgba(255,117,133,0.78);
  background: linear-gradient(145deg, rgba(109,61,82,0.76), rgba(65,45,63,0.88));
  box-shadow: 0 8px 20px rgba(38,4,12,0.38), inset 0 1px 0 rgba(255,190,200,0.12);
}
.choice.is-selected.is-wrong .choice-letter { color: var(--error); background: rgba(255,117,133,0.15); }
.choice.is-selected.is-wrong .choice-state::before { content: "×"; }

.choice.is-correct {
  color: var(--success);
  border: 1.5px solid rgba(79,224,143,0.68);
  background: linear-gradient(145deg, rgba(31,89,76,0.73), rgba(23,63,63,0.88));
  box-shadow: 0 8px 20px rgba(3,34,24,0.35), inset 0 1px 0 rgba(185,255,219,0.11);
}
.choice.is-correct .choice-letter { color: var(--success); background: rgba(79,224,143,0.14); }
.choice.is-correct .choice-state::before { content: "✓"; }

.choice.is-inspected:not(.is-correct):not(.is-selected) {
  opacity: 1;
  border-color: rgba(87,230,224,0.68);
  box-shadow: 0 8px 20px rgba(0,0,0,0.38), 0 0 0 1px rgba(87,230,224,0.16);
}

.feedback {
  display: none;
  margin-top: 22px;
  padding: 20px;
  border: 1px solid rgba(255,117,133,0.30);
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(104,66,83,0.90), rgba(45,37,54,0.96));
  box-shadow: 0 15px 32px rgba(0,0,0,0.35), inset 0 1px 0 rgba(255,255,255,0.08);
}

.feedback.is-visible { display: block; animation: rise-in 430ms cubic-bezier(.22,.8,.3,1) both; }
.feedback.is-correct-feedback {
  border-color: rgba(79,224,143,0.27);
  background: linear-gradient(145deg, rgba(37,94,78,0.90), rgba(29,49,48,0.96));
}

@keyframes rise-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.feedback-top {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  align-items: center;
  justify-content: space-between;
}

.result-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--error);
  font-size: 0.93rem;
  font-weight: 760;
}
.feedback.is-correct-feedback .result-label { color: var(--success); }

.result-icon {
  display: grid;
  width: 21px;
  height: 21px;
  place-items: center;
  border-radius: 50%;
  background: var(--error);
}
.feedback.is-correct-feedback .result-icon { background: var(--success); }
.result-icon span { color: #18202a; font-size: 0.76rem; font-weight: 900; }

.skill-link {
  display: inline-flex;
  min-height: 34px;
  padding: 7px 11px;
  align-items: center;
  border-radius: 17px;
  color: var(--tutor);
  background: rgba(87,230,224,0.10);
  font-size: 0.69rem;
  font-weight: 730;
}

.feedback-kicker {
  margin: 20px 0 8px;
  color: var(--app-muted);
  font-size: 0.76rem;
  font-weight: 720;
}

.inspection-note {
  display: none;
  margin: -1px 0 9px;
  color: var(--app-muted);
  font-size: 0.69rem;
  line-height: 1.45;
}
.inspection-note.is-visible { display: block; }

.feedback-copy {
  margin: 0;
  color: var(--error);
  font-size: 0.91rem;
  font-weight: 620;
  line-height: 1.52;
}
.feedback-copy.is-correct-copy { color: var(--success); }

.tutor-panel {
  margin-top: 18px;
  padding: 15px;
  border: 1px solid rgba(98,129,174,0.34);
  border-radius: 17px;
  background: linear-gradient(145deg, rgba(27,38,55,0.98), rgba(12,18,28,0.98));
  box-shadow: inset 0 1px 0 rgba(172,206,249,0.10), 0 8px 18px rgba(0,0,0,0.28);
}

.tutor-title {
  display: flex;
  margin: 0;
  align-items: center;
  gap: 7px;
  color: var(--app-muted);
  font-size: 0.70rem;
  font-weight: 680;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}
.sparkles { color: var(--tutor); font-size: 1rem; }

.tutor-disclosure {
  margin: 6px 0 12px;
  color: #8f98aa;
  font-size: 0.66rem;
  line-height: 1.45;
}

.tutor-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.tutor-button {
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid rgba(87,230,224,0.23);
  border-radius: 12px;
  color: var(--tutor);
  background: rgba(87,230,224,0.08);
  font-size: 0.68rem;
  font-weight: 720;
  cursor: pointer;
}
.tutor-button:hover { background: rgba(87,230,224,0.14); }
.tutor-button:disabled { cursor: wait; opacity: 0.48; }

.tutor-output {
  display: none;
  min-height: 54px;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid rgba(87,230,224,0.22);
  border-radius: 12px;
  color: var(--app-ink);
  background: rgba(3,11,18,0.52);
  font-size: 0.76rem;
  line-height: 1.55;
}
.tutor-output.is-visible { display: block; }

.thinking {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--app-muted);
}
.spinner {
  width: 15px;
  height: 15px;
  border: 2px solid rgba(87,230,224,0.22);
  border-top-color: var(--tutor);
  border-radius: 50%;
  animation: spin 720ms linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.next-move {
  margin: 14px 0 0;
  color: var(--app-muted);
  font-size: 0.70rem;
  font-weight: 650;
  line-height: 1.45;
}

.app-dock {
  position: absolute;
  z-index: 7;
  right: 0;
  bottom: 0;
  left: 0;
  height: 132px;
  pointer-events: none;
}

.dock-plane {
  position: absolute;
  inset: 0;
  clip-path: polygon(
    0 53.03%,
    27.67% 53.03%,
    29.72% 53.79%,
    31.63% 55.87%,
    33.45% 58.92%,
    35.28% 62.63%,
    37.16% 66.67%,
    39.18% 70.70%,
    41.41% 74.41%,
    43.91% 77.47%,
    46.75% 79.54%,
    50% 80.30%,
    53.25% 79.54%,
    56.09% 77.47%,
    58.59% 74.41%,
    60.82% 70.70%,
    62.84% 66.67%,
    64.72% 62.63%,
    66.55% 58.92%,
    68.37% 55.87%,
    70.28% 53.79%,
    72.33% 53.03%,
    100% 53.03%,
    100% 100%,
    0 100%
  );
  background:
    linear-gradient(155deg, rgba(16,160,125,0.09), rgba(26,35,53,0.94) 48%, rgba(10,15,26,0.97)),
    rgba(13,18,30,0.90);
  filter: drop-shadow(0 -1px 0 rgba(184,213,246,0.24)) drop-shadow(0 -8px 14px rgba(0,0,0,0.34));
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
}

.dock-button {
  position: absolute;
  top: 0;
  left: 50%;
  display: grid;
  width: 72px;
  height: 72px;
  padding: 0;
  place-items: center;
  border: 1px solid rgba(184,213,246,0.25);
  border-radius: 50%;
  color: rgba(59,230,189,0.34);
  background: rgba(27,37,57,0.95);
  box-shadow: 0 4px 8px rgba(0,0,0,0.52), inset 1px -1px 0 rgba(0,0,0,0.40), inset -1px 1px 0 rgba(197,223,255,0.20);
  transform: translateX(-50%);
  transition: color 180ms ease, box-shadow 180ms ease;
  pointer-events: auto;
}

.dock-button::before {
  position: absolute;
  inset: 2px;
  border: 1px solid rgba(184,213,246,0.18);
  border-radius: 50%;
  background: linear-gradient(145deg, rgba(50,68,102,0.80), rgba(18,26,43,0.92));
  content: "";
}

.dock-chevron {
  position: relative;
  z-index: 2;
  width: 34px;
  height: 22px;
  filter: drop-shadow(-1px 1px 1px rgba(0,0,0,0.56)) drop-shadow(1px -1px 2px rgba(59,230,189,0.24));
}

.dock-chevron::before,
.dock-chevron::after {
  position: absolute;
  top: 8px;
  width: 22px;
  height: 6px;
  border-radius: 999px;
  background: currentColor;
  content: "";
}
.dock-chevron::before { left: 0; transform: rotate(-42deg); }
.dock-chevron::after { right: 0; transform: rotate(42deg); }

.dock-button.is-ready {
  color: var(--practice-bright);
  box-shadow: 0 12px 25px rgba(0,0,0,0.45), 0 0 22px rgba(16,160,125,0.17), inset 0 1px 0 rgba(255,255,255,0.13);
}
.dock-button:disabled { cursor: default; }
.dock-button.is-ready { cursor: pointer; }

@media (max-width: 980px) {
  .drill-experience .story-copy {
    position: static;
  }

  .drill-stage {
    width: min(700px, 100%);
    margin-inline: auto;
  }
}

@media (max-width: 620px) {
  .drill-stage {
    min-height: 0;
    padding: 10px;
    border-radius: 32px;
  }

  .device {
    width: 100%;
    padding: 4px;
    border-radius: 43px;
  }

  .device-screen {
    border-radius: 39px;
    clip-path: inset(0 round 39px);
  }

  .status-bar { padding-inline: 20px; }
  .app-header { padding-inline: 18px; }
  .app-scroll { padding: 184px 18px 140px; }
  .passage { font-size: 1.08rem; }
  .choice { min-height: 64px; padding-inline: 13px; }
  .choice-text { font-size: 0.96rem; }
  .feedback { padding: 17px; }
}

@media (prefers-reduced-motion: reduce) {
  .drill-experience *,
  .drill-experience *::before,
  .drill-experience *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
