/* Only the arithmetic operators in Challenge mode receive extra emphasis. */
.mode-challenge .equation-slot.operator-token {
  font-size: clamp(25px, 2vw, 31px);
  font-weight: 600;
}

.mode-challenge .calculation-tile.operator-token {
  font-size: 24px;
  font-weight: 600;
}

.builder-phases {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 8px;
  margin: 14px 0 -4px 72px;
}

.builder-phases span {
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line);
  color: var(--cyan);
  font: 700 9px/1.2 var(--mono);
  letter-spacing: 0.08em;
}

.builder-phases span:last-child {
  color: var(--amber);
}

/* Keep Challenge controls within a typical laptop viewport. */
.mode-challenge .app-stage {
  padding-top: 22px;
}

.mode-challenge .app-header {
  margin-bottom: 14px;
}

.mode-challenge .app-header h1 {
  margin-block: 7px 5px;
  font-size: clamp(31px, 3.4vw, 48px);
}

.mode-challenge .subtitle {
  font-size: 10px;
}

.mode-challenge .trainer-modes {
  margin-bottom: 16px;
  padding: 5px;
}

.mode-challenge .mode-btn {
  min-height: 48px;
}

.mode-challenge .scenario-panel,
.mode-challenge .answer-panel {
  padding: clamp(18px, 1.7vw, 24px);
}

.mode-challenge .challenge-layout {
  align-items: start;
}

.mode-challenge .scenario-copy {
  min-height: 0;
  margin: 16px 0;
  font-size: clamp(22px, 2vw, 28px);
  line-height: 1.2;
}

.mode-challenge .scenario-facts article {
  padding: 12px 14px;
  border-color: rgba(60, 101, 133, 0.7);
  background: rgba(7, 23, 37, 0.72);
  box-shadow: inset 0 0 18px rgba(0, 0, 0, 0.12);
}

.mode-challenge .step-progress {
  margin-bottom: 16px;
}

.mode-challenge .answer-panel h2 {
  margin: 7px 0 14px;
  font-size: clamp(28px, 2.6vw, 38px);
}

.mode-challenge .equation-options {
  gap: 8px;
}

.mode-challenge .equation-option {
  position: relative;
  min-height: 56px;
  padding: 11px 58px 11px 16px;
  border-left: 4px solid var(--cyan);
  background: linear-gradient(180deg, #0c263a, #091d2e);
  box-shadow: 0 3px 0 #03101b, inset 0 1px rgba(255, 255, 255, 0.035);
  transition: transform 140ms ease, border-color 140ms ease, background 140ms ease, box-shadow 140ms ease;
}

.mode-challenge .equation-option:not(:disabled):hover {
  border-color: var(--cyan);
  background: linear-gradient(180deg, #103049, #0b2539);
  box-shadow: 0 4px 0 #03101b, 0 0 14px rgba(49, 221, 251, 0.12);
  transform: translateY(-1px);
}

.mode-challenge .equation-option:not(:disabled):active {
  box-shadow: 0 1px 0 #03101b;
  transform: translateY(2px);
}

.mode-challenge .equation-option.correct::after,
.mode-challenge .equation-option.incorrect::after {
  position: absolute;
  top: 50%;
  right: 15px;
  display: grid;
  width: 29px;
  height: 29px;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 50%;
  font: 700 16px/1 var(--mono);
  transform: translateY(-50%);
}

.mode-challenge .equation-option.correct::after {
  content: "✓";
  color: var(--green);
  background: rgba(74, 233, 161, 0.1);
}

.mode-challenge .equation-option.incorrect::after {
  content: "×";
  color: var(--red);
  background: rgba(255, 102, 119, 0.1);
}

.mode-challenge .selected-equation {
  padding: 12px;
}

.mode-challenge .scenario-equation {
  margin-top: 14px;
}

.mode-challenge .calculation-builder {
  margin-top: 10px;
  padding: 12px;
}

.mode-challenge .builder-heading {
  justify-content: flex-end;
}

.mode-challenge .builder-heading button {
  background: rgba(49, 221, 251, 0.08);
  box-shadow: 0 2px 0 #03101b;
  transition: background 120ms ease, transform 120ms ease;
}

.mode-challenge .builder-heading button:hover {
  background: rgba(49, 221, 251, 0.16);
  transform: translateY(-1px);
}

.mode-challenge .builder-phases {
  margin-top: 10px;
}

.mode-challenge .equation-workbench {
  margin-top: 10px;
}

.mode-challenge .equation-slot {
  min-height: 50px;
}

.mode-challenge .equation-slot:disabled {
  cursor: default;
  opacity: 1;
}

.mode-challenge .equation-slot.filled {
  border-style: solid;
  box-shadow: inset 0 0 16px rgba(49, 221, 251, 0.07);
  cursor: pointer;
}

.mode-challenge .builder-instruction {
  margin: 8px 0;
  font-size: 12px;
}

.mode-challenge .tile-bank {
  min-height: 48px;
  padding: 7px;
}

.tile-bank-label {
  display: block;
  margin: 9px 0 5px;
  color: var(--muted);
  font: 700 8px/1 var(--mono);
  letter-spacing: 0.1em;
}

.mode-challenge .calculation-tile:not(:disabled) {
  border-color: #ffd16d;
  background: linear-gradient(180deg, #ffc858, #f2a116);
  color: #211500;
  box-shadow: 0 3px 0 #8d5700, 0 0 12px rgba(255, 176, 32, 0.13), inset 0 1px rgba(255, 255, 255, 0.4);
  transition: transform 120ms ease, box-shadow 120ms ease, filter 120ms ease;
}

.mode-challenge .calculation-tile:not(:disabled):hover {
  filter: brightness(1.07);
  box-shadow: 0 4px 0 #8d5700, 0 0 17px rgba(255, 176, 32, 0.25), inset 0 1px rgba(255, 255, 255, 0.45);
  transform: translateY(-1px);
}

.mode-challenge .calculation-tile:not(:disabled):active {
  box-shadow: 0 1px 0 #8d5700;
  transform: translateY(2px);
}

.mode-challenge .unit-picker {
  margin-top: 10px;
}

.mode-challenge .unit-picker legend {
  margin-bottom: 6px;
}

.mode-challenge .unit-picker button {
  position: relative;
  min-height: 42px;
  border-color: #ffd16d;
  background: linear-gradient(180deg, #ffc858, #f2a116);
  color: #211500;
  box-shadow: 0 3px 0 #8d5700, 0 0 12px rgba(255, 176, 32, 0.13), inset 0 1px rgba(255, 255, 255, 0.4);
  transition: transform 120ms ease, box-shadow 120ms ease, filter 120ms ease;
}

.mode-challenge .unit-picker button:not(:disabled):hover {
  border-color: #ffe09a;
  color: #211500;
  filter: brightness(1.07);
  box-shadow: 0 4px 0 #8d5700, 0 0 17px rgba(255, 176, 32, 0.25), inset 0 1px rgba(255, 255, 255, 0.45);
  transform: translateY(-1px);
}

.mode-challenge .unit-picker button.selected {
  z-index: 1;
  border: 3px solid var(--cyan);
  background: linear-gradient(180deg, #ffd675, #f4a817);
  color: #211500;
  box-shadow: 0 0 0 3px rgba(49, 221, 251, 0.22), 0 0 22px rgba(49, 221, 251, 0.24), inset 0 0 0 2px rgba(3, 16, 27, 0.55);
  transform: translateY(3px);
}

.mode-challenge .check-btn,
.mode-challenge .next-btn {
  min-height: 50px;
  margin-top: 10px;
  box-shadow: 0 3px 0 #8d5700, 0 0 14px rgba(255, 176, 32, 0.14), inset 0 1px rgba(255, 255, 255, 0.42);
}

.mode-challenge .check-btn:not(:disabled):hover,
.mode-challenge .next-btn:hover {
  filter: brightness(1.06);
}

.mode-challenge .check-btn:disabled {
  border-style: dashed;
  background: #0a1723;
  box-shadow: none;
  opacity: 0.68;
}

.mode-challenge.challenge-complete .step-progress,
.mode-challenge.challenge-complete .calculation-builder,
.mode-challenge.challenge-complete .unit-picker,
.mode-challenge.challenge-complete .check-btn {
  display: none;
}

.mode-challenge.challenge-complete .answer-panel h2 {
  margin-top: 0;
}

.mode-challenge.challenge-complete .feedback {
  margin-top: 8px;
}

.mode-challenge .feedback {
  position: relative;
  padding-left: 58px;
}

.mode-challenge .feedback::before {
  content: "✓";
  position: absolute;
  top: 16px;
  left: 16px;
  display: grid;
  width: 27px;
  height: 27px;
  place-items: center;
  border: 1px solid var(--green);
  border-radius: 50%;
  color: var(--green);
  background: rgba(74, 233, 161, 0.1);
  font: 700 15px/1 var(--mono);
}

.mode-challenge .feedback.wrong::before {
  content: "×";
  border-color: var(--red);
  color: var(--red);
  background: rgba(255, 102, 119, 0.1);
}

/* Let the selected and connected triangle sections fade between states. */
.mode-explore .memory-triangle {
  width: min(390px, 92%);
  height: 350px;
  margin-block: 30px 12px;
  background: linear-gradient(145deg, rgba(49, 221, 251, 0.5), rgba(255, 176, 32, 0.32));
  filter: drop-shadow(0 0 14px rgba(49, 221, 251, 0.08));
}

.mode-explore .memory-triangle::before {
  background:
    linear-gradient(rgba(49, 221, 251, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(49, 221, 251, 0.025) 1px, transparent 1px),
    #061522;
  background-size: 24px 24px;
}

/* Make each full triangle section clickable, not only its text label. */
.mode-explore .triangle-value {
  display: grid;
  place-items: center;
  padding: 8px;
}

.mode-explore .triangle-value.distance {
  top: 0;
  left: 0;
  width: 100%;
  height: 52%;
  padding-top: 44px;
}

.mode-explore .triangle-value.speed {
  top: 52%;
  bottom: 0;
  left: 0;
  width: 50%;
}

.mode-explore .triangle-value.time {
  top: 52%;
  right: 0;
  bottom: 0;
  width: 50%;
}

.mode-explore .bottom-operator,
.mode-explore .dynamic-division {
  pointer-events: none;
}

.mode-explore .triangle-link,
.mode-explore .triangle-cover {
  transition: opacity 360ms ease, filter 360ms ease;
}

.mode-explore .triangle-link {
  background:
    linear-gradient(135deg, rgba(49, 221, 251, 0.08), rgba(49, 221, 251, 0.025));
}

.mode-explore .triangle-cover {
  background:
    repeating-linear-gradient(
      135deg,
      rgba(255, 176, 32, 0.1) 0,
      rgba(255, 176, 32, 0.1) 2px,
      rgba(255, 176, 32, 0.015) 2px,
      rgba(255, 176, 32, 0.015) 13px
    );
  filter: drop-shadow(0 0 7px rgba(255, 176, 32, 0.2));
}

.mode-explore .triangle-cover span {
  display: none;
}

.mode-explore .triangle-divider.horizontal {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line-bright) 12%, var(--line-bright) 88%, transparent);
}

.mode-explore .triangle-value strong {
  margin-top: 0;
  font-size: 22px;
  letter-spacing: 0.025em;
}

.mode-explore .triangle-value strong {
  transition: color 360ms ease, text-shadow 360ms ease;
}

.mode-explore .triangle-value.active strong {
  text-shadow: 0 0 12px rgba(255, 176, 32, 0.3);
}

.mode-explore .triangle-value.active strong::before {
  content: "SOLVE FOR";
  display: block;
  margin-bottom: 5px;
  color: rgba(255, 176, 32, 0.78);
  font: 600 8px/1 var(--mono);
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.mode-explore .triangle-value.active strong::after {
  content: " =";
  color: var(--amber);
  white-space: pre;
}

.mode-explore .solve-distance .triangle-value:not(.distance) strong::before,
.mode-explore .solve-speed .triangle-value:not(.speed) strong::before,
.mode-explore .solve-time .triangle-value:not(.time) strong::before {
  content: "INPUT";
  display: block;
  margin-bottom: 8px;
  color: rgba(49, 221, 251, 0.66);
  font: 600 9px/1 var(--mono);
  letter-spacing: 0.16em;
}

.mode-explore .bottom-operator,
.mode-explore .dynamic-division {
  width: auto;
  height: auto;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--cyan);
  font-size: 29px;
  font-weight: 500;
  text-shadow: 0 0 10px rgba(49, 221, 251, 0.35);
  box-shadow: none;
}

.mode-explore .solve-distance .bottom-operator {
  opacity: 1;
}

.mode-explore .solve-distance .triangle-value:not(.distance) strong,
.mode-explore .solve-speed .triangle-value:not(.speed) strong,
.mode-explore .solve-time .triangle-value:not(.time) strong {
  text-shadow: 0 0 10px rgba(49, 221, 251, 0.2);
  animation: connected-label-in 420ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.mode-explore .solve-distance .link-speed,
.mode-explore .solve-distance .link-time,
.mode-explore .solve-speed .link-distance,
.mode-explore .solve-speed .link-time,
.mode-explore .solve-time .link-distance,
.mode-explore .solve-time .link-speed {
  animation: connected-sections-in 420ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes connected-sections-in {
  from {
    opacity: 0;
    filter: drop-shadow(0 0 0 rgba(49, 221, 251, 0));
  }

  to {
    opacity: 1;
    filter: drop-shadow(0 0 7px rgba(49, 221, 251, 0.27));
  }
}

@keyframes connected-label-in {
  from {
    color: var(--text);
    text-shadow: 0 0 0 rgba(49, 221, 251, 0);
  }

  to {
    color: var(--cyan);
    text-shadow: 0 0 10px rgba(49, 221, 251, 0.2);
  }
}

.mode-explore .target-badge {
  width: auto;
  min-width: 46px;
  padding-inline: 12px;
  font-size: 11px;
}

.brief-grid article {
  padding-left: 18px;
}

.brief-grid .conversion-cue {
  display: inline-block;
  margin-left: 3px;
  color: var(--amber);
  font-size: 1.12em;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
  text-shadow: 0 0 10px rgba(255, 176, 32, 0.24);
}

.brief-grid .conversion-symbol {
  display: inline-block;
  font-size: 1.85em;
  font-weight: 600;
  line-height: 0.55;
  vertical-align: -0.12em;
}

/* Explore is intentionally a simple top-to-bottom concept view. */
.mode-explore .explore-grid {
  width: min(940px, 100%);
  margin-inline: auto;
  grid-template-columns: 1fr;
  gap: 12px;
}

.mode-explore .triangle-panel {
  min-height: 0;
}

.mode-explore .triangle-panel .panel-heading {
  max-width: 980px;
  margin-inline: auto;
}

.triangle-workspace {
  position: relative;
}

.triangle-example-values {
  position: absolute;
  top: 30px;
  left: 16px;
  z-index: 6;
  width: 170px;
  padding: 12px 14px;
  border-left: 2px solid var(--cyan);
  background: rgba(49, 221, 251, 0.045);
}

.triangle-example-values > span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font: 700 8px/1 var(--mono);
  letter-spacing: 0.1em;
}

.triangle-example-values p {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 5px;
  margin: 5px 0 0;
  font: 700 11px/1.2 var(--mono);
}

.triangle-example-values b {
  color: var(--amber);
}

.triangle-example-values strong {
  color: var(--cyan);
}

.triangle-division-rule {
  position: absolute;
  top: 30px;
  right: 16px;
  z-index: 6;
  width: 190px;
  padding: 12px 14px;
  border-right: 2px solid var(--amber);
  background: rgba(255, 176, 32, 0.045);
  text-align: right;
}

.triangle-division-rule span,
.triangle-division-rule strong {
  display: block;
  font-family: var(--mono);
}

.triangle-division-rule span {
  color: var(--amber);
  font-size: 8px;
  letter-spacing: 0.1em;
}

.triangle-division-rule strong {
  margin-top: 7px;
  color: var(--text);
  font-size: 11px;
  line-height: 1.4;
}

.triangle-equation-readout {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 12px;
  width: fit-content;
  max-width: 100%;
  margin: 6px auto 0;
  padding: 10px 16px;
  border-top: 1px solid var(--line-bright);
}

.triangle-equation-readout span {
  color: var(--muted);
  font: 700 9px/1 var(--mono);
  letter-spacing: 0.1em;
}

.triangle-equation-readout strong {
  color: var(--amber);
  font: 700 21px/1.2 var(--display);
}

.triangle-applied-example {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 12px;
  margin: 3px auto 0;
  color: var(--text);
  font-family: var(--mono);
  text-align: center;
}

.triangle-applied-example strong {
  font-size: 14px;
}

.triangle-applied-example span {
  color: var(--green);
  font-size: 14px;
  font-weight: 700;
}

.mode-explore .formula-panel > .panel-heading,
.mode-explore .formula-panel .route-display,
.mode-explore .formula-panel .known-values,
.mode-explore .quick-brief {
  display: none;
}

.mode-explore .order-panel {
  width: min(940px, 100%);
  margin-inline: auto;
  margin-top: 12px;
  padding-block: 18px;
}

@media (min-width: 701px) {
  .mode-explore .memory-triangle {
    width: min(430px, 82%);
    height: 390px;
    margin-block: 16px 4px;
  }

  .mode-explore .formula-panel {
    display: block;
    width: min(940px, 100%);
    margin-inline: auto;
    padding: 10px;
  }

  .mode-explore .worked-example {
    min-height: 104px;
    margin: 0;
    padding: 14px;
  }

  .mode-explore .worked-details {
    display: block;
    min-width: 0;
  }

  .mode-explore .worked-details-content {
    display: block;
  }

  .mode-explore .worked-example {
    border-color: var(--line);
  }

  .mode-explore .worked-example strong {
    display: block;
    margin-top: 5px;
    font-size: 15px;
  }

  .mode-explore .worked-example span {
    margin-top: 5px;
    font-size: 18px;
  }

  .mode-explore .worked-step-label {
    margin: 12px 0 0;
    color: var(--cyan);
    font: 700 8px/1 var(--mono);
    letter-spacing: 0.08em;
  }

  .mode-explore .worked-step-label.convert-label {
    color: var(--amber);
  }

}

.worked-details > summary,
.quick-brief-summary {
  display: none;
}

.worked-details-content {
  display: contents;
}

.worked-step-label {
  margin: 10px 0 0;
  color: var(--cyan);
  font: 700 8px/1 var(--mono);
  letter-spacing: 0.08em;
}

.worked-step-label.convert-label {
  color: var(--amber);
}

@media (max-width: 700px) {
  .arcade-nav {
    min-height: 58px;
    padding: 7px 12px;
  }

  .arcade-brand {
    flex-direction: row;
    gap: 8px;
    font-size: 10px;
  }

  .arcade-brand img {
    width: 42px;
    height: 38px;
  }

  .all-missions {
    min-height: 38px;
    padding-inline: 10px;
    font-size: 9px;
  }

  .app-stage {
    padding: 14px 8px 34px;
  }

  .app-header {
    margin-bottom: 11px;
  }

  .app-header h1 {
    margin-block: 6px 3px;
    font-size: 27px;
  }

  .mission-id {
    font-size: 10px;
  }

  .trainer-modes {
    position: sticky;
    top: 0;
    z-index: 20;
    margin-bottom: 10px;
    padding: 3px;
    background: rgba(6, 21, 34, 0.96);
    backdrop-filter: blur(8px);
  }

  .mode-btn {
    min-height: 42px;
  }

  .triangle-panel,
  .formula-panel,
  .scenario-panel,
  .answer-panel,
  .quick-brief,
  .order-panel {
    padding: 12px;
  }

  .panel-heading {
    padding-bottom: 10px;
  }

  .panel-heading h2 {
    margin-top: 5px;
    font-size: 23px;
  }

  .tap-badge,
  .formula-panel > .panel-heading {
    display: none;
  }

  #explore-mode .explore-grid {
    gap: 0;
  }

  #explore-mode .triangle-panel {
    border-bottom: 0;
  }

  #explore-mode .formula-panel {
    border-top-color: var(--line-bright);
  }

  .triangle-example-values {
    position: static;
    display: grid;
    grid-template-columns: auto repeat(3, 1fr);
    align-items: center;
    gap: 8px;
    width: 100%;
    margin-top: 12px;
    padding: 9px 10px;
  }

  .triangle-example-values > span {
    margin: 0;
  }

  .triangle-example-values p {
    display: flex;
    gap: 4px;
    margin: 0;
  }

  .triangle-division-rule {
    position: static;
    width: 100%;
    margin-top: 7px;
    padding: 9px 10px;
    border-right: 0;
    border-left: 2px solid var(--amber);
    text-align: left;
  }

  .triangle-division-rule span,
  .triangle-division-rule strong {
    display: inline;
  }

  .triangle-division-rule strong {
    margin: 0 0 0 7px;
  }

  .mode-explore .memory-triangle {
    width: min(300px, 96%);
    height: 260px;
    margin-block: 14px 2px;
  }

  .mode-explore .triangle-value strong {
    font-size: 17px;
  }

  .triangle-equation-readout {
    gap: 8px;
    margin-top: 3px;
    padding: 8px 10px;
  }

  .triangle-equation-readout strong {
    font-size: 18px;
  }

  .triangle-applied-example {
    display: grid;
    gap: 4px;
  }

  .formula-display {
    margin-top: 0;
    padding: 14px;
  }

  .formula-display strong {
    margin-top: 7px;
    font-size: 25px;
  }

  .minute-formula {
    margin-top: 7px;
    font-size: 12px;
  }

  .worked-details {
    margin-top: 10px;
  }

  .worked-details > summary,
  .quick-brief-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 44px;
    cursor: pointer;
    list-style: none;
  }

  .worked-details > summary::-webkit-details-marker,
  .quick-brief-summary::-webkit-details-marker {
    display: none;
  }

  .worked-details > summary {
    padding: 0 12px;
    border: 1px solid var(--line-bright);
    color: var(--cyan);
    font: 700 10px/1 var(--mono);
    letter-spacing: 0.08em;
  }

  .worked-details summary > span,
  .quick-brief-summary > span {
    color: var(--cyan);
    font: 600 20px/1 var(--mono);
    transition: transform 180ms ease;
  }

  .worked-details[open] summary > span,
  .quick-brief[open] .quick-brief-summary > span {
    transform: rotate(45deg);
  }

  .worked-details-content {
    display: block;
    padding-top: 2px;
  }

  .route-display {
    margin-block: 16px 12px;
  }

  .known-values {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .known-values article,
  .worked-example {
    padding: 12px;
  }

  .order-panel {
    gap: 12px;
    margin-top: 10px;
  }

  .order-panel h2 {
    font-size: 24px;
  }

  .scenario-copy {
    min-height: 0;
    margin: 13px 0;
    font-size: 20px;
  }

  .scenario-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
  }

  .scenario-facts article {
    padding: 10px;
  }

  .scenario-facts strong {
    margin-top: 5px;
    font-size: 15px;
  }

  .mode-challenge.challenge-calculating .scenario-panel {
    padding: 10px 12px;
  }

  .mode-challenge.challenge-calculating .scenario-panel .panel-heading {
    align-items: center;
    padding: 0;
    border-bottom: 0;
  }

  .mode-challenge.challenge-calculating .scenario-panel .panel-kicker,
  .mode-challenge.challenge-calculating .scenario-copy,
  .mode-challenge.challenge-calculating .scenario-panel .new-btn {
    display: none;
  }

  .mode-challenge.challenge-calculating .scenario-panel h2 {
    margin: 0;
    font-size: 18px;
  }

  .mode-challenge.challenge-calculating .scenario-facts {
    margin-top: 8px;
  }

  .challenge-route {
    display: none;
  }

  .groundspeed-note {
    display: none;
  }

  .step-progress {
    margin-bottom: 14px;
  }

  .answer-panel h2 {
    margin-block: 7px 13px;
    font-size: 26px;
  }

  .equation-option {
    min-height: 58px;
    padding: 11px 13px;
  }

  .mode-challenge .check-btn,
  .mode-challenge .next-btn {
    position: sticky;
    bottom: 8px;
    z-index: 12;
    box-shadow: 0 -8px 24px rgba(3, 16, 27, 0.88), 0 0 18px rgba(255, 176, 32, 0.2);
  }

  .quick-brief {
    margin-top: 10px;
  }

  .quick-brief-title,
  .quick-brief-title > span,
  .quick-brief-title > strong {
    display: block;
  }

  .quick-brief-title > strong {
    margin-top: 4px;
    font-size: 20px;
    line-height: 1.1;
  }

  .quick-brief-content {
    padding-top: 12px;
  }

  .brief-grid {
    gap: 7px;
  }

  .brief-grid article {
    padding: 12px;
  }
}

@media (max-width: 430px) {
  .mode-challenge .equation-slot.operator-token {
    font-size: 25px;
  }

  .mode-challenge .calculation-tile.operator-token {
    font-size: 23px;
  }

  .builder-phases {
    margin-left: 0;
  }

  .mode-explore .memory-triangle {
    width: min(275px, 100%);
    height: 238px;
  }

  .mode-explore .triangle-value strong {
    font-size: 17px;
  }

  .triangle-equation-readout {
    display: grid;
    justify-items: center;
    text-align: center;
  }

  .mode-explore .triangle-value.active strong::before,
  .mode-explore .solve-distance .triangle-value:not(.distance) strong::before,
  .mode-explore .solve-speed .triangle-value:not(.speed) strong::before,
  .mode-explore .solve-time .triangle-value:not(.time) strong::before {
    margin-bottom: 5px;
    font-size: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mode-explore .triangle-link,
  .mode-explore .triangle-value strong {
    animation: none !important;
    transition: none;
  }
}
