/* Shared teori widgets: quiz, labs, trees, timelines */

.teori-goals {
  margin: 0 0 1rem;
  padding: 0.95rem 1.05rem;
  border-radius: 12px;
  border: 1px solid rgba(96, 165, 250, 0.28);
  background: rgba(96, 165, 250, 0.07);
}

.teori-goals h2 {
  margin: 0 0 0.45rem;
  font-size: 1rem;
}

.teori-goals ul {
  margin: 0;
}

.teori-pitfall {
  border-color: rgba(240, 160, 106, 0.4);
  background: rgba(240, 160, 106, 0.08);
}

.teori-pitfall::before {
  content: "Faldgrube";
  display: block;
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #f0a06a;
  margin-bottom: 0.35rem;
}

.teori-quiz {
  margin: 0.75rem 0 1.25rem;
  padding: 1.05rem 1.1rem 1.15rem;
  border-radius: 16px;
  border: 1px solid rgba(167, 139, 250, 0.28);
  background:
    radial-gradient(ellipse 70% 50% at 10% 0%, rgba(167, 139, 250, 0.1), transparent 55%),
    rgba(7, 16, 24, 0.85);
}

.teori-quiz h3 {
  margin: 0 0 0.35rem;
  font-size: 1.02rem;
}

.teori-quiz > p {
  margin: 0 0 0.85rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.quiz-options {
  display: grid;
  gap: 0.45rem;
}

.quiz-options button {
  text-align: left;
  font: inherit;
  font-size: 0.9rem;
  padding: 0.65rem 0.85rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(18, 32, 51, 0.8);
  color: var(--text);
  cursor: pointer;
  transition: border-color 140ms ease, background 140ms ease;
}

.quiz-options button:hover {
  border-color: rgba(167, 139, 250, 0.45);
}

.quiz-options button.is-correct {
  border-color: rgba(61, 214, 198, 0.55);
  background: rgba(61, 214, 198, 0.12);
}

.quiz-options button.is-wrong {
  border-color: rgba(244, 114, 114, 0.55);
  background: rgba(244, 114, 114, 0.1);
}

.quiz-feedback {
  margin: 0.75rem 0 0;
  min-height: 1.3em;
  font-size: 0.88rem;
  color: var(--muted);
}

.quiz-feedback.ok {
  color: #3dd6c6;
}

.quiz-feedback.bad {
  color: #f47272;
}

/* Bind lab */
.bind-lab {
  display: grid;
  gap: 0.85rem;
}

.bind-lab-row {
  display: grid;
  gap: 0.45rem;
}

.bind-lab label {
  font-size: 0.82rem;
  color: var(--muted);
}

.bind-lab input {
  font: inherit;
  font-family: var(--mono);
  font-size: 0.9rem;
  padding: 0.55rem 0.75rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #071018;
  color: var(--text);
}

.bind-preview {
  padding: 0.85rem 1rem;
  border-radius: 12px;
  border: 1px dashed rgba(61, 214, 198, 0.35);
  background: rgba(61, 214, 198, 0.06);
}

.bind-preview strong {
  color: var(--accent);
}

.bind-code {
  margin: 0;
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--muted);
  white-space: pre-wrap;
}

/* Lifecycle */
.life-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0 0 0.75rem;
  padding: 0;
  list-style: none;
}

.life-steps button,
.life-steps li {
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.4rem 0.65rem;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  cursor: default;
}

.life-steps button {
  cursor: pointer;
}

.life-steps button.active,
.life-steps button.done,
.life-steps li.active,
.life-steps li.done {
  color: var(--ink);
  background: var(--accent);
  border-color: transparent;
}

.async-steps {
  margin: 0.75rem 0 0;
  padding-left: 1.2rem;
}

.async-steps li {
  margin: 0.35rem 0;
  color: var(--muted);
  transition: color 160ms ease, transform 160ms ease;
}

.async-steps li.active {
  color: var(--accent);
  font-weight: 600;
  transform: translateX(4px);
}

.async-steps li.done {
  color: #9fd68a;
}

.file-tree-list {
  list-style: none;
  margin: 0 0 0.75rem;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.form-lab-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: end;
  margin-bottom: 0.5rem;
}

.form-lab-form label {
  display: grid;
  gap: 0.3rem;
  font-size: 0.84rem;
  color: var(--muted);
  flex: 1;
  min-width: 12rem;
}

.form-lab-form input {
  font: inherit;
  padding: 0.5rem 0.7rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #071018;
  color: var(--text);
}

.form-lab-msg {
  margin: 0;
  font-size: 0.88rem;
  color: var(--muted);
  min-height: 1.3em;
}

.xss-output {
  margin-top: 0.65rem;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #071018;
  min-height: 2.8rem;
  word-break: break-word;
}

.bind-lab-label {
  display: grid;
  gap: 0.35rem;
  font-size: 0.84rem;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.bind-lab-label input {
  font: inherit;
  padding: 0.5rem 0.7rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #071018;
  color: var(--text);
}

.life-log {
  margin: 0;
  padding: 0.75rem 0.85rem;
  border-radius: 10px;
  background: #071018;
  border: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 0.78rem;
  line-height: 1.55;
  color: #d7e6f5;
  min-height: 5.5rem;
  white-space: pre-wrap;
}

/* DI lab */
.di-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.55rem;
  margin-bottom: 0.75rem;
}

@media (max-width: 640px) {
  .di-grid {
    grid-template-columns: 1fr;
  }
}

.di-card {
  padding: 0.75rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(18, 32, 51, 0.75);
  text-align: center;
}

.di-card strong {
  display: block;
  font-size: 0.88rem;
  margin-bottom: 0.35rem;
}

.di-card .di-id {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--accent);
  min-height: 1.2em;
}

.di-log {
  margin: 0.5rem 0 0;
  font-family: var(--mono);
  font-size: 0.76rem;
  color: var(--muted);
  white-space: pre-wrap;
  min-height: 3.2em;
}

/* Form lab */
.form-lab {
  display: grid;
  gap: 0.65rem;
}

.form-lab input {
  font: inherit;
  padding: 0.55rem 0.75rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #071018;
  color: var(--text);
}

.form-lab input.is-invalid {
  border-color: #f47272;
}

.form-lab .form-err {
  color: #f47272;
  font-size: 0.82rem;
  min-height: 1.2em;
}

.form-lab .form-ok {
  color: #3dd6c6;
  font-size: 0.88rem;
}

/* Async timeline */
.async-track {
  position: relative;
  display: grid;
  gap: 0.55rem;
  margin: 0.5rem 0;
}

.async-row {
  display: grid;
  grid-template-columns: 7rem 1fr;
  gap: 0.65rem;
  align-items: center;
}

.async-row span.label {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted);
}

.async-bar {
  position: relative;
  height: 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.async-bar i {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #3dd6c6, #60a5fa);
  transition: width 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

.async-bar i.ui {
  background: linear-gradient(90deg, #a78bfa, #60a5fa);
}

.async-bar i.wait {
  background: linear-gradient(90deg, #f0a06a, #f47272);
}

.async-note {
  margin: 0.35rem 0 0;
  font-size: 0.84rem;
  color: var(--muted);
}

/* XSS lab */
.xss-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

@media (max-width: 640px) {
  .xss-split {
    grid-template-columns: 1fr;
  }
}

.xss-pane {
  padding: 0.85rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(18, 32, 51, 0.75);
  min-height: 4.5rem;
}

.xss-pane h4 {
  margin: 0 0 0.45rem;
  font-size: 0.82rem;
  color: var(--muted);
  font-weight: 600;
}

.xss-pane .xss-out {
  font-size: 0.95rem;
  word-break: break-word;
}

.xss-pane.danger {
  border-color: rgba(244, 114, 114, 0.4);
}

/* File tree */
.file-tree {
  display: grid;
  grid-template-columns: minmax(160px, 220px) 1fr;
  gap: 0.75rem;
}

@media (max-width: 640px) {
  .file-tree {
    grid-template-columns: 1fr;
  }
}

.tree-list {
  margin: 0;
  padding: 0.55rem;
  list-style: none;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #071018;
  font-family: var(--mono);
  font-size: 0.78rem;
}

.tree-list button {
  display: block;
  width: 100%;
  text-align: left;
  font: inherit;
  color: var(--muted);
  background: transparent;
  border: none;
  padding: 0.35rem 0.45rem;
  border-radius: 6px;
  cursor: pointer;
}

.tree-list button:hover,
.tree-list button.active {
  color: var(--accent);
  background: rgba(61, 214, 198, 0.08);
}

.tree-list .indent {
  padding-left: 1rem;
}

.tree-detail {
  margin: 0;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(18, 32, 51, 0.75);
  font-size: 0.9rem;
  line-height: 1.55;
}

.tree-detail strong {
  display: block;
  margin-bottom: 0.35rem;
}

/* Box model visual */
.box-model {
  display: grid;
  place-items: center;
  padding: 0.5rem;
}

.box-margin,
.box-border,
.box-padding,
.box-content {
  border-radius: 8px;
  text-align: center;
  font-family: var(--mono);
  font-size: 0.72rem;
}

.box-margin {
  padding: 1rem;
  background: rgba(240, 160, 106, 0.15);
  border: 1px dashed rgba(240, 160, 106, 0.5);
  color: #f0a06a;
}

.box-border {
  padding: 0.85rem;
  background: rgba(167, 139, 250, 0.15);
  border: 2px solid rgba(167, 139, 250, 0.55);
  color: #c4b5fd;
}

.box-padding {
  padding: 0.85rem;
  background: rgba(96, 165, 250, 0.15);
  color: #93c5fd;
}

.box-content {
  padding: 1.1rem 1.4rem;
  background: rgba(61, 214, 198, 0.2);
  color: #3dd6c6;
  font-weight: 600;
}

/* Pensum urørt — TOC får egen shell-kolonne i gutteren */
.teori-lesson {
  max-width: 880px;
}

.teori-lesson-main {
  display: grid;
  gap: 1.35rem;
  min-width: 0;
}

.teori-check {
  margin: 0 0 1.25rem;
  padding: 0.95rem 1.05rem;
  border-radius: 12px;
  border: 1px solid rgba(61, 214, 198, 0.28);
  background: rgba(61, 214, 198, 0.06);
}

.teori-check h2 {
  margin: 0 0 0.45rem;
  font-size: 1rem;
}

.teori-check ul {
  margin: 0;
}

.teori-mission {
  margin: 0.75rem 0 1.25rem;
  padding: 1.05rem 1.1rem;
  border-radius: 14px;
  border: 1px dashed rgba(96, 165, 250, 0.45);
  background: rgba(96, 165, 250, 0.06);
}

.teori-mission h2 {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
}

.teori-why {
  margin: 0.5rem 0 0.75rem;
  padding-left: 0.85rem;
  border-left: 3px solid rgba(167, 139, 250, 0.55);
  color: var(--muted);
  font-size: 0.92rem;
}

.teori-toc {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  z-index: 3;
  padding: 0.85rem 0.7rem;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(7, 16, 24, 0.94);
  backdrop-filter: blur(10px);
  scrollbar-width: thin;
}

.teori-toc::before {
  content: "P\00e5 denne side";
  display: block;
  margin: 0 0.35rem 0.55rem;
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.teori-toc a {
  display: block;
  font-size: 0.82rem;
  line-height: 1.35;
  padding: 0.42rem 0.65rem;
  border-radius: 8px;
  border: 1px solid transparent;
  border-left: 2px solid transparent;
  color: var(--muted);
  text-decoration: none;
  transition: color 140ms ease, background 140ms ease, border-color 140ms ease;
}

.teori-toc a:hover {
  color: var(--text);
  background: rgba(61, 214, 198, 0.06);
  text-decoration: none;
}

.teori-toc a.is-active {
  color: var(--accent);
  background: rgba(61, 214, 198, 0.1);
  border-left-color: var(--accent);
  font-weight: 600;
}

/* Bred skærm: shell får TOC-kolonne til venstre — pensum i højre kolonne */
@media (min-width: 1180px) {
  .demo-shell:has(.teori-toc) {
    max-width: 1280px;
    display: grid;
    grid-template-columns: 13.75rem minmax(0, 1fr);
    column-gap: 1.5rem;
    align-items: start;
  }

  .demo-shell:has(.teori-toc) > :not(.teori-toc) {
    grid-column: 2;
  }

  .teori-toc {
    grid-column: 1;
    grid-row: 1 / -1;
    position: sticky;
    top: 1.25rem;
    align-self: start;
    width: auto;
    max-height: calc(100vh - 2.5rem);
    overflow-y: auto;
    margin: 0;
  }
}

/* Smal: kompakt top-bar over pensum */
@media (max-width: 1179px) {
  .teori-toc {
    position: relative;
    width: auto;
    max-height: none;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 0.35rem;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0.55rem 0.65rem;
    margin: 0 0 0.75rem;
    -webkit-overflow-scrolling: touch;
  }

  .teori-toc::before {
    display: none;
  }

  .teori-toc a {
    flex: 0 0 auto;
    white-space: nowrap;
    font-size: 0.78rem;
    padding: 0.32rem 0.6rem;
    border-radius: 999px;
    border: 1px solid var(--line);
    border-left-width: 1px;
  }

  .teori-toc a.is-active {
    border-color: rgba(61, 214, 198, 0.45);
    border-left-color: rgba(61, 214, 198, 0.45);
  }
}

.quiz-letter {
  display: inline-grid;
  place-items: center;
  width: 1.45rem;
  height: 1.45rem;
  margin-right: 0.55rem;
  border-radius: 7px;
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 700;
  background: rgba(167, 139, 250, 0.18);
  color: #c4b5fd;
  flex-shrink: 0;
}

.quiz-options button {
  display: flex;
  align-items: flex-start;
}

.quiz-options button.is-correct .quiz-letter {
  background: rgba(61, 214, 198, 0.25);
  color: #3dd6c6;
}

.quiz-options button.is-wrong .quiz-letter {
  background: rgba(244, 114, 114, 0.25);
  color: #f47272;
}

.di-slots {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin: 0.75rem 0;
}

@media (max-width: 640px) {
  .di-slots {
    grid-template-columns: 1fr;
  }
}

.di-slot {
  padding: 0.75rem 0.65rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(18, 32, 51, 0.85);
  text-align: center;
}

.di-slot-label {
  display: block;
  font-size: 0.72rem;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

.di-slot-id {
  display: block;
  font-family: var(--mono);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  transition: transform 180ms ease, color 180ms ease;
}

.di-slot-id.pop {
  transform: scale(1.12);
}

.di-slot-id.same {
  color: #3dd6c6;
}

.di-slot-id.diff {
  color: #f0a06a;
}

.di-tip {
  margin: 0.55rem 0 0;
  font-size: 0.86rem;
  color: var(--muted);
  min-height: 2.4em;
}

.bind-code {
  margin: 0.75rem 0 0;
  padding: 0.75rem 0.85rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #071018;
  font-family: var(--mono);
  font-size: 0.76rem;
  line-height: 1.5;
  color: #9fd68a;
  white-space: pre-wrap;
}

.teori-progress,
.teori-lesson-progress {
  margin: 0 0 1.25rem;
}

.teori-progress-track,
.teori-lesson-progress {
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.teori-progress-track {
  margin-top: 0.45rem;
}

.teori-progress-fill {
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #3dd6c6, #60a5fa);
  transition: width 280ms ease;
}

.teori-progress-label {
  margin: 0;
  font-size: 0.84rem;
  color: var(--muted);
}

.teori-path-list a.is-done {
  border-color: rgba(61, 214, 198, 0.45);
  background: rgba(61, 214, 198, 0.07);
}

.teori-path-list a.is-done::before {
  background: rgba(61, 214, 198, 0.35);
}

.teori-how {
  display: grid;
  gap: 0.65rem;
  grid-template-columns: repeat(3, 1fr);
  margin: 0 0 1.5rem;
}

@media (max-width: 720px) {
  .teori-how {
    grid-template-columns: 1fr;
  }
}

.teori-how article {
  padding: 0.95rem 1rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(18, 32, 51, 0.7);
}

.teori-how .step {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--accent);
  font-weight: 700;
}

.teori-how h3 {
  margin: 0.35rem 0 0.3rem;
  font-size: 0.98rem;
}

.teori-how p {
  margin: 0;
  font-size: 0.86rem;
  color: var(--muted);
}

.teori-lesson-progress {
  position: sticky;
  top: 0;
  z-index: 5;
  margin: 0 0 0.75rem;
  background: transparent;
}

/* —— Extra interactive labs —— */
.status-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.75rem;
}

.status-grid button {
  font: inherit;
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.4rem 0.65rem;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(18, 32, 51, 0.85);
  color: var(--muted);
  cursor: pointer;
}

.status-grid button.active {
  color: var(--ink);
  background: var(--accent);
  border-color: transparent;
}

.status-detail {
  margin: 0;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #071018;
  min-height: 4.2rem;
}

.status-detail strong {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--accent);
}

.status-detail p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--muted);
}

.pkce-dots {
  display: flex;
  gap: 0.4rem;
  margin: 0.65rem 0;
}

.pkce-dots button {
  width: 0.7rem;
  height: 0.7rem;
  padding: 0;
  border-radius: 999px;
  border: none;
  background: rgba(255, 255, 255, 0.15);
  cursor: pointer;
}

.pkce-dots button.active {
  background: var(--accent);
  transform: scale(1.25);
}

.pkce-dots button.done {
  background: rgba(61, 214, 198, 0.45);
}

.pkce-step-label {
  margin: 0 0 0.35rem;
  font-weight: 600;
  font-size: 0.95rem;
}

.pkce-log {
  margin: 0.5rem 0 0;
  padding: 0.75rem 0.85rem;
  border-radius: 10px;
  background: #071018;
  border: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 0.76rem;
  line-height: 1.55;
  color: #d7e6f5;
  white-space: pre-wrap;
  min-height: 5.5rem;
}

.event-flow {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 0.65rem;
  align-items: center;
  margin: 0.75rem 0;
}

@media (max-width: 640px) {
  .event-flow {
    grid-template-columns: 1fr;
  }
}

.event-flow-box {
  padding: 0.9rem 0.85rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(18, 32, 51, 0.9);
  text-align: center;
  cursor: pointer;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.event-flow-box strong {
  display: block;
  font-size: 0.9rem;
}

.event-flow-box span {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.75rem;
  font-family: var(--mono);
  color: var(--muted);
}

.event-flow-box.flash {
  border-color: rgba(61, 214, 198, 0.55);
  box-shadow: 0 0 0 1px rgba(61, 214, 198, 0.2);
  transform: translateY(-2px);
}

.event-flow-arrow {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted);
  text-align: center;
  transition: color 200ms ease;
}

.event-flow-arrow.pulse {
  color: var(--accent);
  font-weight: 700;
}

.event-flow-log {
  margin: 0.5rem 0 0;
  font-family: var(--mono);
  font-size: 0.76rem;
  color: var(--muted);
  min-height: 1.4em;
  white-space: pre-wrap;
}

.query-lab input {
  font: inherit;
  font-family: var(--mono);
  width: 100%;
  max-width: 20rem;
  padding: 0.5rem 0.7rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #071018;
  color: var(--text);
  margin: 0.35rem 0 0.65rem;
}

.query-url {
  font-family: var(--mono);
  font-size: 0.9rem;
  color: var(--accent);
  margin: 0 0 0.55rem;
}

.query-code {
  margin: 0;
  padding: 0.75rem 0.85rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #071018;
  font-family: var(--mono);
  font-size: 0.76rem;
  line-height: 1.5;
  color: #9fd68a;
  white-space: pre-wrap;
}

.reveal-grid {
  display: grid;
  gap: 0.45rem;
}

.reveal-grid button {
  text-align: left;
  font: inherit;
  padding: 0.7rem 0.85rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(18, 32, 51, 0.85);
  color: var(--text);
  cursor: pointer;
}

.reveal-grid button .reveal-q {
  font-weight: 600;
  font-size: 0.9rem;
}

.reveal-grid button .reveal-a {
  display: none;
  margin-top: 0.4rem;
  font-size: 0.86rem;
  color: var(--muted);
}

.reveal-grid button.is-open {
  border-color: rgba(61, 214, 198, 0.4);
}

.reveal-grid button.is-open .reveal-a {
  display: block;
}

.reveal-grid button.is-open .reveal-q::after {
  content: " ▴";
  color: var(--accent);
}

.reveal-grid button:not(.is-open) .reveal-q::after {
  content: " ▾";
  color: var(--muted);
}

/* —— Scoped vs Singleton battle —— */
.scope-battle-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin: 0.75rem 0;
}

@media (max-width: 640px) {
  .scope-battle-grid {
    grid-template-columns: 1fr;
  }
}

.scope-user {
  padding: 0.9rem 0.85rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(18, 32, 51, 0.9);
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.scope-user.leaked {
  border-color: rgba(255, 120, 100, 0.55);
  box-shadow: 0 0 0 1px rgba(255, 120, 100, 0.15);
}

.scope-user strong {
  display: block;
  margin-bottom: 0.35rem;
}

.scope-pick {
  margin: 0 0 0.55rem;
  font-family: var(--mono);
  font-size: 0.88rem;
  color: var(--accent);
  min-height: 1.35em;
}

.scope-picks {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.scope-inst {
  margin: 0.55rem 0 0;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted);
}

.scope-battle-verdict {
  margin: 0.35rem 0 0;
  padding: 0.7rem 0.85rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(18, 32, 51, 0.75);
  font-size: 0.9rem;
  color: var(--muted);
  min-height: 2.8em;
}

.scope-battle-verdict.ok {
  border-color: rgba(61, 214, 198, 0.4);
  color: var(--text);
}

.scope-battle-verdict.bad {
  border-color: rgba(255, 120, 100, 0.45);
  color: var(--text);
}

.teori-inline-ol {
  margin: 0.5rem 0 0;
  padding-left: 1.2rem;
}

.teori-inline-ol li {
  margin: 0.35rem 0;
}
