.neg-topic .gt-nav,
.neg-topic-layout .gt-nav {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.neg-lab {
  grid-template-columns: minmax(270px, 360px) minmax(0, 1fr);
}

.neg-select-label {
  display: grid;
  gap: 8px;
  color: #334155;
  font-weight: 900;
}

.neg-select-label select {
  min-height: 40px;
  border: 1px solid rgba(148, 163, 184, 0.42);
  border-radius: 12px;
  padding: 0 10px;
  color: #0f172a;
  font-weight: 900;
  background: #fff;
}

.neg-model-visual,
.neg-exp-visual {
  display: grid;
  place-items: center;
  min-height: 330px;
  padding: 16px;
  border: 1px solid rgba(190, 202, 222, 0.82);
  border-radius: 16px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.94), rgba(255, 255, 255, 0.94)),
    repeating-linear-gradient(0deg, rgba(14, 165, 233, 0.055) 0 1px, transparent 1px 30px),
    repeating-linear-gradient(90deg, rgba(245, 158, 11, 0.05) 0 1px, transparent 1px 30px);
  overflow: hidden;
}

.neg-exp-workbench {
  display: grid;
  grid-template-columns: minmax(260px, 340px) minmax(0, 1fr);
  gap: 16px;
  border-top: 1px solid rgba(148, 163, 184, 0.24);
  padding-top: 16px;
}

.neg-exp-story {
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 16px;
  border: 1px solid rgba(190, 202, 222, 0.82);
  border-radius: 16px;
  background: #fff;
}

.neg-exp-story > span {
  width: fit-content;
  padding: 5px 10px;
  border-radius: 999px;
  color: #075985;
  background: #e0f2fe;
  font-size: 0.78rem;
  font-weight: 950;
}

.neg-exp-story > strong {
  color: #0f172a;
  font-size: 1.12rem;
  line-height: 1.25;
}

.neg-exp-story p {
  margin: 0;
  color: #475569;
  line-height: 1.55;
}

.neg-exp-board {
  display: grid;
  gap: 12px;
}

.neg-case-grid {
  grid-template-columns: repeat(3, minmax(270px, 1fr));
}

.neg-case {
  display: grid;
  gap: 12px;
  min-height: 610px;
  padding: 14px;
  border: 1px solid rgba(190, 202, 222, 0.76);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 10px 24px rgba(30, 41, 59, 0.05);
}

.neg-case-head {
  display: grid;
  gap: 4px;
}

.neg-case-head span {
  width: fit-content;
  color: #2563eb;
  font-size: 0.78rem;
  font-weight: 950;
}

.neg-case-head strong {
  color: #0f172a;
  font-size: 1.12rem;
  line-height: 1.22;
}

.neg-case p {
  margin: 0;
  color: #64748b;
  line-height: 1.5;
}

.neg-case-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.neg-case-controls label {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: #334155;
  font-weight: 900;
}

.neg-case-controls output {
  color: #0f172a;
  font-weight: 950;
}

.neg-case-controls input {
  width: 100%;
}

.neg-case-scene {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 260px;
  padding: 12px;
  border-radius: 16px;
  background:
    linear-gradient(145deg, rgba(248, 250, 252, 0.96), rgba(239, 246, 255, 0.92)),
    repeating-linear-gradient(0deg, rgba(15, 23, 42, 0.036) 0 1px, transparent 1px 24px),
    repeating-linear-gradient(90deg, rgba(15, 23, 42, 0.032) 0 1px, transparent 1px 24px);
  overflow: hidden;
}

.neg-case-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.neg-case-metrics span {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 10px;
  border-radius: 12px;
  color: #64748b;
  background: #f8fafc;
  font-size: 0.74rem;
  font-weight: 900;
}

.neg-case-metrics b {
  color: #0f172a;
  font-size: 0.88rem;
  overflow-wrap: anywhere;
}

.neg-case-result {
  min-height: 108px;
  padding: 12px;
  border-radius: 14px;
  color: #254155;
  background: rgba(236, 253, 245, 0.9);
  font-weight: 850;
  line-height: 1.45;
}

.neg-object {
  position: relative;
  width: min(100%, 300px);
  height: 176px;
  isolation: isolate;
}

.neg-axis,
.neg-exp-line,
.neg-model-line {
  position: relative;
  width: min(100%, 560px);
  height: 86px;
  margin: 8px auto 0;
}

.neg-axis::before,
.neg-exp-line::before,
.neg-model-line::before {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  top: 42px;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, #ef4444, #f59e0b 49%, #0f172a 50%, #14b8a6);
}

.neg-axis i,
.neg-exp-line i,
.neg-model-line i {
  position: absolute;
  left: min(var(--start), var(--result));
  top: 32px;
  width: max(12px, calc(max(var(--start), var(--result)) - min(var(--start), var(--result))));
  height: 24px;
  border-top: 3px solid #2563eb;
  border-radius: 999px 999px 0 0;
  opacity: 0.86;
}

.neg-axis .zero,
.neg-axis .start,
.neg-axis .result,
.neg-exp-line .zero,
.neg-exp-line .start,
.neg-exp-line .result,
.neg-model-line .zero,
.neg-model-line .start,
.neg-model-line .result {
  position: absolute;
  z-index: 1;
  transform: translateX(-50%);
  padding: 4px 7px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 950;
  white-space: nowrap;
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.12);
}

.neg-axis .zero,
.neg-exp-line .zero,
.neg-model-line .zero {
  left: var(--zero);
  top: 8px;
  color: #fff;
  background: #0f172a;
}

.neg-axis .start,
.neg-exp-line .start,
.neg-model-line .start {
  left: var(--start);
  top: 56px;
  color: #1e40af;
  background: #dbeafe;
}

.neg-axis .result,
.neg-exp-line .result,
.neg-model-line .result {
  left: var(--result);
  top: 14px;
  color: #065f46;
  background: #ccfbf1;
}

.neg-axis.is-compact {
  height: 64px;
  margin-top: 2px;
}

.neg-axis.is-compact::before {
  top: 32px;
}

.neg-axis.is-compact i {
  top: 23px;
}

.neg-axis.is-compact .zero,
.neg-axis.is-compact .result {
  top: 2px;
}

.neg-axis.is-compact .start {
  top: 40px;
}

.neg-model-card {
  width: min(100%, 560px);
  padding: 18px;
  border: 1px solid rgba(148, 163, 184, 0.32);
  border-radius: 18px;
  background: linear-gradient(145deg, #ffffff, #eef6ff);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
}

.neg-model-card.negative {
  background: linear-gradient(145deg, #ffffff, #fff7ed);
}

.neg-model-equation {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
  color: #475569;
  font-size: 1.08rem;
  font-weight: 900;
}

.neg-model-equation b {
  min-width: 44px;
  padding: 8px 10px;
  border-radius: 12px;
  color: #0f172a;
  background: #f8fafc;
  text-align: center;
}

.neg-model-compare {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 900;
}

.neg-elevator,
.neg-parking {
  border: 2px solid rgba(30, 64, 175, 0.25);
  border-radius: 18px;
  background:
    linear-gradient(90deg, rgba(219, 234, 254, 0.9), rgba(241, 245, 249, 0.92)),
    repeating-linear-gradient(0deg, rgba(30, 64, 175, 0.13) 0 2px, transparent 2px 28px);
  box-shadow: inset 42px 0 0 rgba(15, 23, 42, 0.06);
}

.neg-parking {
  background:
    linear-gradient(90deg, rgba(226, 232, 240, 0.96), rgba(255, 247, 237, 0.92)),
    repeating-linear-gradient(0deg, rgba(15, 23, 42, 0.12) 0 2px, transparent 2px 28px);
}

.neg-elevator b,
.neg-parking b {
  position: absolute;
  left: 0;
  right: 0;
  bottom: clamp(18px, var(--zero), calc(100% - 18px));
  border-top: 3px solid rgba(15, 23, 42, 0.58);
}

.neg-elevator .car,
.neg-parking .car,
.neg-exp-elevator .car {
  position: absolute;
  width: 52px;
  height: 38px;
  border: 3px solid #1d4ed8;
  border-radius: 9px;
  background:
    linear-gradient(90deg, transparent 48%, rgba(29, 78, 216, 0.35) 49% 51%, transparent 52%),
    #bfdbfe;
  box-shadow: 0 10px 18px rgba(30, 64, 175, 0.2);
}

.neg-elevator .car.start,
.neg-parking .car.start,
.neg-exp-elevator .car.start {
  left: 62px;
  bottom: clamp(18px, var(--start), calc(100% - 50px));
  opacity: 0.56;
}

.neg-elevator .car.result,
.neg-parking .car.result,
.neg-exp-elevator .car.result {
  right: 36px;
  bottom: clamp(18px, var(--result), calc(100% - 50px));
  border-color: #0f766e;
  background:
    linear-gradient(90deg, transparent 48%, rgba(15, 118, 110, 0.32) 49% 51%, transparent 52%),
    #99f6e4;
}

.neg-elevator em,
.neg-parking em,
.neg-exp-elevator em {
  position: absolute;
  left: 12px;
  bottom: clamp(16px, var(--zero), calc(100% - 28px));
  transform: translateY(50%);
  color: #0f172a;
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 950;
}

.neg-temperature,
.neg-freezer,
.neg-exp-thermo {
  display: grid;
  place-items: center;
}

.neg-temperature b,
.neg-freezer b,
.neg-exp-thermo b {
  position: relative;
  width: 42px;
  height: 148px;
  border: 4px solid #334155;
  border-radius: 999px;
  background: #eff6ff;
  overflow: hidden;
}

.neg-temperature b::after,
.neg-freezer b::after,
.neg-exp-thermo b::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 6px;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  transform: translateX(-50%);
  background: #ef4444;
}

.neg-temperature b i,
.neg-freezer b i,
.neg-exp-thermo b i {
  position: absolute;
  left: 11px;
  bottom: 0;
  width: 12px;
  height: clamp(8%, var(--level), 92%);
  border-radius: 999px 999px 0 0;
  background: linear-gradient(#f97316, #ef4444);
}

.neg-freezer b i {
  background: linear-gradient(#60a5fa, #2563eb);
}

.neg-temperature span,
.neg-freezer span,
.neg-exp-thermo span {
  position: absolute;
  left: 55%;
  bottom: clamp(18px, var(--zero), calc(100% - 24px));
  padding: 4px 8px;
  border-radius: 999px;
  color: #0f172a;
  background: #e2e8f0;
  font-weight: 950;
}

.neg-temperature em,
.neg-freezer em {
  position: absolute;
  right: 18px;
  top: 22px;
  padding: 8px 11px;
  border-radius: 12px;
  color: #fff;
  background: #0f172a;
  font-style: normal;
  font-weight: 950;
}

.neg-bank,
.neg-debt,
.neg-exp-account {
  display: grid;
  align-content: center;
  gap: 12px;
  padding: 22px;
  border: 2px solid rgba(148, 163, 184, 0.32);
  border-radius: 18px;
  background:
    linear-gradient(180deg, #ffffff 0 35%, #f8fafc 36% 100%),
    repeating-linear-gradient(0deg, transparent 0 18px, rgba(15, 23, 42, 0.05) 18px 19px);
}

.neg-bank b,
.neg-debt b,
.neg-exp-account b {
  color: #0f172a;
  font-size: 1.55rem;
  font-weight: 950;
}

.neg-bank span,
.neg-debt span {
  height: 18px;
  border-radius: 999px;
  background: linear-gradient(90deg, #fecaca 0 50%, #ccfbf1 50% 100%);
}

.neg-bank i,
.neg-debt i {
  position: absolute;
  left: var(--result);
  bottom: 44px;
  width: 12px;
  height: 34px;
  border-radius: 999px;
  background: #0f172a;
  transform: translateX(-50%);
}

.neg-bank em,
.neg-debt em,
.neg-exp-account span {
  color: #64748b;
  font-size: 0.78rem;
  font-style: normal;
  font-weight: 900;
}

.neg-bank.is-negative b,
.neg-debt.is-negative b,
.neg-exp-account.is-negative b {
  color: #b91c1c;
}

.neg-bank.is-positive b,
.neg-debt.is-positive b,
.neg-exp-account.is-positive b {
  color: #047857;
}

.neg-sea {
  border-radius: 18px;
  background: linear-gradient(#dbeafe 0 46%, #7dd3fc 47% 52%, #bae6fd 53% 100%);
  overflow: hidden;
}

.neg-sea b,
.neg-mountain b {
  position: absolute;
  left: 0;
  right: 0;
  bottom: clamp(18px, var(--zero), calc(100% - 18px));
  border-top: 3px dashed rgba(15, 23, 42, 0.58);
}

.neg-sea span {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: clamp(24px, var(--zero), 75%);
  background:
    radial-gradient(circle at 18px 12px, rgba(255, 255, 255, 0.65) 0 8px, transparent 9px),
    linear-gradient(#38bdf8, #0ea5e9);
  opacity: 0.86;
}

.neg-sea i,
.neg-mountain i {
  position: absolute;
  left: 58%;
  bottom: clamp(18px, var(--result), calc(100% - 26px));
  width: 22px;
  height: 22px;
  border: 4px solid #0f766e;
  border-radius: 999px 999px 999px 2px;
  background: #ccfbf1;
  transform: rotate(-45deg);
}

.neg-sea em,
.neg-mountain em {
  position: absolute;
  left: 12px;
  top: 12px;
  padding: 5px 9px;
  border-radius: 999px;
  color: #0f172a;
  background: rgba(255, 255, 255, 0.82);
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 950;
}

.neg-score {
  display: grid;
  place-items: center;
  border-radius: 18px;
  background:
    linear-gradient(180deg, #0f172a 0 42%, #1e293b 43% 100%),
    repeating-linear-gradient(90deg, transparent 0 22px, rgba(255, 255, 255, 0.08) 22px 23px);
}

.neg-score b {
  min-width: 96px;
  padding: 12px;
  border-radius: 14px;
  color: #fef2f2;
  background: #991b1b;
  font-size: 2rem;
  font-weight: 950;
  text-align: center;
}

.neg-score.is-positive b {
  color: #ecfdf5;
  background: #047857;
}

.neg-score span,
.neg-score em {
  color: #dbeafe;
  font-style: normal;
  font-weight: 900;
}

.neg-map {
  border-radius: 18px;
  background:
    linear-gradient(#dcfce7, #bbf7d0),
    repeating-linear-gradient(90deg, rgba(15, 23, 42, 0.08) 0 1px, transparent 1px 34px);
  overflow: hidden;
}

.neg-map b {
  position: absolute;
  left: 18px;
  right: 18px;
  top: 84px;
  height: 34px;
  border-radius: 999px;
  background: linear-gradient(90deg, #94a3b8, #64748b);
  box-shadow: inset 0 12px 0 rgba(255, 255, 255, 0.16);
}

.neg-map span,
.neg-timeline span {
  position: absolute;
  left: var(--zero);
  top: 44px;
  width: 4px;
  height: 94px;
  border-radius: 999px;
  background: #0f172a;
  transform: translateX(-50%);
}

.neg-map i,
.neg-timeline i {
  position: absolute;
  left: var(--result);
  top: 72px;
  width: 28px;
  height: 28px;
  border: 5px solid #0f766e;
  border-radius: 999px 999px 999px 2px;
  background: #ccfbf1;
  transform: translateX(-50%) rotate(-45deg);
}

.neg-map em,
.neg-timeline em {
  position: absolute;
  left: 12px;
  bottom: 12px;
  color: #334155;
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 950;
}

.neg-freezer {
  border: 2px solid rgba(59, 130, 246, 0.28);
  border-radius: 22px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.82) 0 48%, rgba(191, 219, 254, 0.72) 49% 100%),
    linear-gradient(#f8fafc, #dbeafe);
}

.neg-freezer::before {
  content: "";
  position: absolute;
  top: 18px;
  bottom: 18px;
  left: 50%;
  border-left: 3px solid rgba(59, 130, 246, 0.28);
}

.neg-mountain {
  border-radius: 18px;
  background: linear-gradient(#dbeafe 0 56%, #bbf7d0 57% 100%);
  overflow: hidden;
}

.neg-mountain span {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 20px;
  height: 122px;
  clip-path: polygon(0 100%, 28% 44%, 48% 70%, 72% 18%, 100% 100%);
  background: linear-gradient(135deg, #94a3b8, #475569);
}

.neg-inventory {
  display: grid;
  align-content: center;
  border: 2px solid rgba(148, 163, 184, 0.32);
  border-radius: 18px;
  background: #fff7ed;
  overflow: hidden;
}

.neg-inventory b {
  position: absolute;
  left: 20px;
  right: 20px;
  top: 40px;
  bottom: 32px;
  border-top: 8px solid #a16207;
  border-bottom: 8px solid #a16207;
  background:
    linear-gradient(90deg, transparent 0 31%, rgba(161, 98, 7, 0.6) 31% 34%, transparent 34% 65%, rgba(161, 98, 7, 0.6) 65% 68%, transparent 68%),
    repeating-linear-gradient(0deg, rgba(245, 158, 11, 0.22) 0 30px, transparent 30px 42px);
}

.neg-inventory span {
  position: relative;
  z-index: 1;
  justify-self: center;
  padding: 9px 12px;
  border-radius: 13px;
  color: #92400e;
  background: #ffedd5;
  font-size: 1.24rem;
  font-weight: 950;
}

.neg-inventory.is-negative span {
  color: #b91c1c;
  background: #fee2e2;
}

.neg-inventory i {
  position: absolute;
  left: var(--result);
  bottom: 22px;
  width: 16px;
  height: 72px;
  border-radius: 999px;
  background: #0f172a;
  transform: translateX(-50%);
}

.neg-inventory em {
  position: absolute;
  left: 12px;
  top: 12px;
  color: #334155;
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 950;
}

.neg-timeline {
  border-radius: 18px;
  background:
    linear-gradient(#f8fafc, #eef2ff),
    repeating-linear-gradient(90deg, rgba(99, 102, 241, 0.1) 0 2px, transparent 2px 28px);
}

.neg-timeline b {
  position: absolute;
  left: 16px;
  right: 16px;
  top: 88px;
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, #f97316, #0f172a 50%, #14b8a6);
}

.neg-exp-scene {
  display: grid;
  align-items: center;
  gap: 10px;
  width: min(100%, 620px);
}

.neg-exp-prop {
  position: relative;
  justify-self: center;
  width: min(100%, 300px);
  height: 184px;
  isolation: isolate;
}

.neg-exp-elevator {
  border: 2px solid rgba(30, 64, 175, 0.25);
  border-radius: 18px;
  background:
    linear-gradient(90deg, rgba(219, 234, 254, 0.9), rgba(241, 245, 249, 0.92)),
    repeating-linear-gradient(0deg, rgba(30, 64, 175, 0.13) 0 2px, transparent 2px 28px);
}

.neg-exp-elevator b {
  position: absolute;
  left: 0;
  right: 0;
  bottom: clamp(18px, var(--zero), calc(100% - 18px));
  border-top: 3px solid rgba(15, 23, 42, 0.58);
}

.neg-exp-thermo span {
  left: 58%;
}

.neg-exp-account {
  height: 144px;
}

.neg-exp-line .start,
.neg-exp-line .result,
.neg-exp-line i {
  opacity: 0;
}

.neg-exp-line.show-start .start,
.neg-exp-line.show-move i,
.neg-exp-line.show-result .result {
  opacity: 1;
}

.neg-quiz-list article {
  border-radius: 14px;
}

html[lang="en"] .neg-case {
  min-height: 650px;
}

html[lang="en"] .neg-case-result {
  font-size: 0.92rem;
}

html[lang="en"] .neg-case-metrics b {
  font-size: 0.82rem;
}

@media (max-width: 980px) {
  .neg-lab,
  .neg-exp-workbench {
    grid-template-columns: 1fr;
  }

  .neg-case-grid {
    grid-template-columns: repeat(auto-fit, minmax(255px, 1fr));
  }
}

@media (max-width: 680px) {
  .neg-topic .gt-nav,
  .neg-topic-layout .gt-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .neg-case {
    min-height: auto;
  }

  .neg-case-controls,
  .neg-case-metrics {
    grid-template-columns: 1fr;
  }

  .neg-model-visual,
  .neg-exp-visual {
    min-height: 300px;
    padding: 10px;
  }

  .neg-object,
  .neg-exp-prop {
    width: 100%;
  }

  .neg-axis .start,
  .neg-axis .result,
  .neg-exp-line .start,
  .neg-exp-line .result,
  .neg-model-line .start,
  .neg-model-line .result {
    max-width: 92px;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}
