/*! VisiGrab, visigrab.com. (c) 2026 VisiGrab. All rights reserved. */
.topic-hero .problem-meta { color: var(--ink-muted); font-size: 0.98rem; }
.problem-level {
  display: inline-block;
  margin-right: 6px;
  padding: 1px 9px;
  border-radius: var(--radius-pill);
  font: 600 0.7rem/1.6 'JetBrains Mono', monospace;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  vertical-align: 1px;
  white-space: nowrap;
}
.problem-level--easy { background: #d6efda; color: #0f6a26; }
.problem-level--medium { background: #fbe3ad; color: #6e4600; }
.problem-level--hard { background: var(--coral-bg); color: #b3261e; }
.guide .problem-run { margin: 20px 0 0; display: grid; gap: 22px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) {
  .guide .problem-run {
    width: calc(min(1100px, 100vw) - 64px);
    margin-left: calc((100% - min(1100px, 100vw) + 64px) / 2);
    grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
    align-items: start;
  }
  .guide .problem-run__code { position: sticky; top: 84px; }
}
.guide .problem-run__player { margin: 0; }
.guide .problem-run__bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 8px; }
.guide .problem-run__label {
  margin: 0;
  font: 500 0.72rem/1.2 'JetBrains Mono', monospace;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.guide pre.problem-code {
  position: relative;
  margin: 0;
  padding: 12px 0;
  background: var(--cream-dark);
  border-radius: var(--radius-sm);
  overflow: auto;
  font: 0.88rem/1.65 'JetBrains Mono', monospace;
  font-variant-ligatures: none;
}
.guide pre.problem-code code { display: block; font-size: inherit; }
.guide .problem-code .ln { display: block; position: relative; padding: 0 16px; white-space: pre; min-height: 1.65em; }
.guide .problem-code__light {
  position: absolute; top: 0; left: 0; right: 0; height: 0;
  background: rgba(232, 160, 18, .3);
  pointer-events: none;
}
.guide .problem-code .ln { white-space: pre-wrap; overflow-wrap: anywhere; }
.guide .problem-code .ln.i0 { padding-left: calc(16px + 8ch); text-indent: -8ch; }
.guide .problem-code .ln.i4 { padding-left: calc(16px + 12ch); text-indent: -12ch; }
.guide .problem-code .ln.i8 { padding-left: calc(16px + 16ch); text-indent: -16ch; }
.guide .problem-code .ln.i12 { padding-left: calc(16px + 20ch); text-indent: -20ch; }
.guide .problem-code .ln.i16 { padding-left: calc(16px + 24ch); text-indent: -24ch; }
.guide .problem-code .ln.i20 { padding-left: calc(16px + 28ch); text-indent: -28ch; }
.guide .problem-code .ln.i24 { padding-left: calc(16px + 32ch); text-indent: -32ch; }
.guide .problem-code .k0 { color: #aa0d91; }
.guide .problem-code .k1, .guide .problem-code .k3 { color: #1c00cf; }
.guide .problem-code .k2 { color: #007400; }
.guide pre.problem-code:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
@media (max-width: 899px) {
  .guide pre.problem-code { max-height: 38vh; font-size: 0.8rem; }
  .guide .problem-code .ln { padding-right: 12px; }
  .guide .problem-code .ln.i0 { padding-left: calc(12px + 8ch); }
  .guide .problem-code .ln.i4 { padding-left: calc(12px + 12ch); }
  .guide .problem-code .ln.i8 { padding-left: calc(12px + 16ch); }
  .guide .problem-code .ln.i12 { padding-left: calc(12px + 20ch); }
  .guide .problem-code .ln.i16 { padding-left: calc(12px + 24ch); }
  .guide .problem-code .ln.i20 { padding-left: calc(12px + 28ch); }
  .guide .problem-code .ln.i24 { padding-left: calc(12px + 32ch); }
}
@media (prefers-reduced-motion: reduce) {
  .guide .problem-code__light { transition: none !important; }
}
.problem-run__full {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 0 13px;
  border: 2px solid var(--ink);
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--ink);
  font: 600 0.7rem/1 'JetBrains Mono', monospace;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background-color .15s;
}
.problem-run__full svg { display: block; flex: none; }
@media (hover: hover) { .problem-run__full:hover { background: var(--cream-dark); } }
.problem-run__full:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(28, 165, 194, .35); }
.guide .problem-run.is-full {
  position: fixed;
  inset: 0;
  z-index: 1000;
  box-sizing: border-box;
  width: auto;
  height: 100%;
  margin: 0;
  padding: var(--full-pad, 24px);
  padding-left: max(var(--full-pad, 24px), env(safe-area-inset-left, 0px));
  padding-right: max(var(--full-pad, 24px), env(safe-area-inset-right, 0px));
  overflow: auto;
  background: var(--cream);
  grid-template-columns: var(--full-player, minmax(0, 1.45fr)) var(--full-code, minmax(0, 1fr));
  justify-content: center;
  align-content: center;
  align-content: safe center;
  align-items: start;
  gap: var(--full-gap, 32px);
}
.guide .problem-run.is-full::backdrop { background: #faf7f2; }
.guide .problem-run.is-full.is-full--stack { grid-template-columns: var(--full-player, minmax(0, 1fr)); gap: 16px; }
.guide .problem-run.is-full .problem-run__player { padding: 14px 18px; }
@media (max-width: 899px) { .guide .problem-run.is-full .problem-run__player { padding: 8px 10px; } }
.guide .problem-run.is-full .problem-run__code {
  position: static;
  display: flex;
  flex-direction: column;
  min-height: 0;
  max-height: var(--full-code-h, none);
}
.guide .problem-run.is-full pre.problem-code {
  flex: 0 1 auto;
  min-height: 0;
  max-height: none;
  font-size: calc(0.88rem * var(--full-k, 1));
}
@media (max-width: 899px) {
  .guide .problem-run.is-full pre.problem-code { font-size: calc(0.8rem * var(--full-k, 1)); }
}
.guide .problem-run.is-full .svg-steps__caption { font-size: calc(var(--svg-steps-caption-size) * var(--full-k, 1)); }
.guide .problem-run.is-full .example-steps { display: none; }
html.problem-full-open, html.problem-full-open body { overflow: hidden; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.guide .problem-try { margin-top: 18px; font-weight: 600; }
.guide .problem-related { margin-top: 14px; }
.guide .problem-legal { margin-top: 22px; font-size: 0.82rem; color: var(--ink-muted); }
.guide .problem-run__next, .guide .problem-assemble__next {
  margin: 12px 0 0;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: var(--gold-bg);
  font-weight: 600;
}
.guide .problem-phone-full { display: none; }
@media (max-width: 899px) {
  .guide .problem-phone-full:not([hidden]) { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 10px 0 0; font-size: 0.92rem; color: var(--ink-muted); }
}
.guide .example-steps .problem-step {
  display: block;
  width: 100%;
  margin: 0;
  padding: 4px 8px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
@media (hover: hover) { .guide .example-steps .problem-step:hover { background: var(--cream-dark); } }
.guide .example-steps .problem-step:focus-visible { outline: 2px solid var(--gold); outline-offset: 1px; }
.guide .example-steps li[aria-current="step"] .problem-step { background: var(--gold-bg); }
.guide .example-steps .problem-step__runs { display: block; margin-top: 2px; font-size: 0.85em; color: var(--ink-muted); }
.guide .example-steps .problem-step__runs code { font-size: 0.95em; }
.guide .topic-hub-list li.problem-hub-item { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 18px; align-items: center; }
.guide .problem-hub-thumb {
  display: block;
  width: 150px;
  height: 84px;
  object-fit: contain;
  padding: 6px;
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.guide .problem-hub-steps {
  display: inline-block;
  margin-left: 4px;
  font: 500 0.72rem/1.4 'JetBrains Mono', monospace;
  letter-spacing: 0.06em;
  color: var(--ink-muted);
  white-space: nowrap;
}
@media (max-width: 560px) {
  .guide .topic-hub-list li.problem-hub-item { grid-template-columns: 96px minmax(0, 1fr); gap: 12px; }
  .guide .problem-hub-thumb { width: 96px; height: 56px; padding: 4px; }
}
.problem-walked {
  display: inline-block;
  margin-left: 8px;
  font: 600 0.7rem/1.4 'JetBrains Mono', monospace;
  letter-spacing: 0.04em;
  color: #0f6a26;
  white-space: nowrap;
}
.guide .problem-pager__link .problem-walked { margin: 2px 0 0; }
.guide .assemble__run .problem-answer {
  display: inline-block;
  justify-self: start;
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: white;
  font: 0.92rem/1.4 'JetBrains Mono', monospace;
  overflow-wrap: anywhere;
}
.guide .assemble__run .problem-answer.wrong { background: var(--coral-bg); border-color: var(--coral); color: #b3261e; }
.guide .assemble__run .problem-answer.right { background: var(--cyan-bg); border-color: var(--cyan); }
.guide .assemble__code { font-variant-ligatures: none; }
.guide .assemble .blk--used code { background: transparent; border-color: transparent; color: transparent; }
.guide .assemble__code code { width: auto; }
.guide .assemble__code .ln { white-space: pre-wrap; overflow-wrap: anywhere; }
.guide .assemble__code .ln.i0 { padding-left: calc(16px + 8ch); text-indent: -8ch; }
.guide .assemble__code .ln.i4 { padding-left: calc(16px + 12ch); text-indent: -12ch; }
.guide .assemble__code .ln.i8 { padding-left: calc(16px + 16ch); text-indent: -16ch; }
.guide .assemble__code .ln.i12 { padding-left: calc(16px + 20ch); text-indent: -20ch; }
.guide .assemble__code .ln.i16 { padding-left: calc(16px + 24ch); text-indent: -24ch; }
.guide .assemble__code .ln.i20 { padding-left: calc(16px + 28ch); text-indent: -28ch; }
.guide .assemble__code .ln.i24 { padding-left: calc(16px + 32ch); text-indent: -32ch; }
@media (max-width: 760px) {
  .guide .assemble__code .ln.i0 { padding-left: calc(12px + 8ch); }
  .guide .assemble__code .ln.i4 { padding-left: calc(12px + 12ch); }
  .guide .assemble__code .ln.i8 { padding-left: calc(12px + 16ch); }
  .guide .assemble__code .ln.i12 { padding-left: calc(12px + 20ch); }
  .guide .assemble__code .ln.i16 { padding-left: calc(12px + 24ch); }
  .guide .assemble__code .ln.i20 { padding-left: calc(12px + 28ch); }
  .guide .assemble__code .ln.i24 { padding-left: calc(12px + 32ch); }
  .guide .assemble__cols.solved .assemble__left { position: sticky; top: 72px; z-index: 1; background: #fff; }
}
.guide .problem-run.is-full .problem-run__next[hidden] { display: block; visibility: hidden; }
.guide .problem-run.is-full.is-full--small .problem-run__next { display: none; }
.problem-run__code .example-steps { margin-top: 14px; }
.guide .problem-facts { margin: 14px 0 0; padding-left: 20px; }
.guide .problem-facts li + li { margin-top: 10px; }
.guide .problem-app { margin-top: 40px; }
.guide .problem-pager { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 28px; }
.guide .problem-pager__link {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  padding: 12px 16px;
  border: 2px solid var(--ink);
  border-radius: var(--radius-sm);
  background: white;
  color: var(--ink);
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
}
.guide .problem-pager__link--next { text-align: right; }
.guide .problem-pager__link--hub { background: var(--cream-dark); }
.guide .problem-pager__dir { font-family: 'JetBrains Mono', monospace; font-size: 0.75rem; color: var(--ink-muted); }
.guide .problem-pager__name { font-weight: 700; }
.guide .problem-pager__all { grid-column: 1 / -1; justify-self: center; font-weight: 700; }
@media (hover: hover) {
  :root:not(.hover-paused) .guide a.problem-pager__link:hover { transform: translateY(-2px); box-shadow: 3px 3px 0 var(--ink); }
}
@media (max-width: 560px) {
  .guide .problem-pager { grid-template-columns: 1fr; }
  .guide .problem-pager__link--next { order: -1; text-align: left; }
}
.guide .problem-example { margin: 24px 0; }
.guide .problem-example__row { display: flex; flex-wrap: wrap; justify-content: center; align-items: flex-end; gap: 20px 40px; }
.guide .problem-example__row .figure-art { margin: 0; }
.guide .problem-approaches { width: 100%; margin: 16px 0 0; }
.guide .problem-approaches th:first-child,
.guide .problem-approaches td:first-child { padding-left: 10px; }
.guide .problem-approaches td { font-size: 0.98rem; vertical-align: top; }
.guide .problem-approaches__this { background: var(--gold-bg); }
.guide .problem-approaches__tag {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 8px;
  border-radius: var(--radius-pill);
  background: var(--gold);
  color: var(--ink);
  font: 600 0.68rem/1.5 'JetBrains Mono', monospace;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  vertical-align: 2px;
}
.guide .problem-approaches__key { margin: 8px 0 0; font-size: 0.9rem; color: var(--ink-muted); }
.guide .problem-approaches + .problem-facts,
.guide .problem-approaches__key + .problem-facts { margin-top: 18px; }
@media (max-width: 640px) {
  .guide .problem-approaches,
  .guide .problem-approaches tbody,
  .guide .problem-approaches tr,
  .guide .problem-approaches td { display: block; width: auto; overflow: visible; }
  .guide .problem-approaches { border-top: 2px solid var(--border-thick); }
  .guide .problem-approaches thead { display: none; }
  .guide .problem-approaches tr { padding: 10px; border-bottom: 1px solid var(--border); }
  .guide .problem-approaches td { padding: 0; border: 0; }
  .guide .problem-approaches td:first-child { padding: 0 0 6px; }
  .guide .problem-approaches td[data-label] { display: inline-block; margin-right: 18px; }
  .guide .problem-approaches td[data-label]::before {
    content: attr(data-label);
    margin-right: 6px;
    font: 500 0.72rem/1 'JetBrains Mono', monospace;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink-muted);
  }
}
