/* "It's all in the repo": a file browser on one real question, then the language ticks. */
#repo .repo-card { padding: 14px; display: flex; flex-direction: column; gap: 14px; }
#repo .repo-win { display: grid; grid-template-columns: 310px minmax(0, 1fr); gap: 8px; border-radius: 16px; padding: 8px; height: 410px; }
#repo .repo-tabs { display: none; }
#repo .repo-tree { padding: 10px 8px; overflow: hidden; display: flex; flex-direction: column; gap: 1px; }
#repo .repo-caps { padding: 0 8px 6px; }
#repo .repo-dir { display: flex; align-items: center; gap: 6px; padding: 5px 8px; font-family: var(--mono); font-size: 13px; color: var(--text-2); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#repo .repo-dir svg { width: 12px; height: 12px; flex: none; color: var(--text-3); }
#repo .repo-dir.sub { margin-left: 12px; margin-top: 4px; }
#repo .repo-f {
  display: flex; align-items: center; gap: 8px; width: 100%; min-height: 32px; padding: 0 10px 0 32px; border-radius: 8px;
  font-family: var(--mono); font-size: 13.5px; color: var(--text-2); text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  transition: background .25s, color .25s;
}
#repo .repo-f.deep { padding-left: 44px; }
#repo .repo-f.on { background: var(--raised); color: var(--text); box-shadow: inset 0 0 0 1px var(--line); }
#repo .repo-f.on::after { content: ""; margin-left: auto; width: 6px; height: 6px; border-radius: 50%; background: var(--accent-text); flex: none; }
#repo .repo-view { position: relative; overflow: hidden; min-width: 0; }
#repo .repo-vhead { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 14px 18px 12px; font-family: var(--mono); font-size: 13.5px; color: var(--text); }
#repo .repo-path { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#repo .repo-kind { color: var(--text-3); font-size: 12px; flex: none; }
#repo .repo-code { padding: 10px 0 0; -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 60px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 60px), transparent); font-size: 13.5px; line-height: 21px; }
#repo .repo-code.wrap .ln { white-space: pre-wrap; }
#repo .repo-code.wrap .tx { padding-right: 20px; }
#repo .repo-code.in { animation: repo-in .45s ease-out; }
@keyframes repo-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
#repo .repo-code .ln { min-height: 21px; padding-right: 18px; }
#repo .repo-code .tx { min-width: 0; }
#repo .repo-view::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 56px; pointer-events: none; background: linear-gradient(transparent, var(--panel) 85%); }

#repo .repo-run { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; padding: 0 6px; }
#repo .repo-run .repo-lang { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 10px 14px 10px; border-radius: 16px; background: color-mix(in srgb, var(--panel) 60%, transparent); box-shadow: inset 0 0 0 1px var(--card-rim); font-size: inherit; }
#repo .repo-run .chip { font-size: 14px; height: 30px; }
#repo .repo-ticks { display: grid; grid-template-columns: repeat(12, 1fr); gap: 4px; width: 100%; }
#repo .repo-ticks i { height: 12px; border-radius: 4px; background: var(--rim); transition: background .3s, box-shadow .3s; }
#repo .repo-ticks i.ok { background: var(--green); box-shadow: 0 0 8px -1px color-mix(in srgb, var(--green) 60%, transparent); }
#repo .repo-count { height: 16px; font-size: 13px; color: var(--green); opacity: 0; transition: opacity .4s; }
#repo .repo-count.on { opacity: 1; }
#repo .repo-run .repo-lang.run .chip { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent-text) 50%, transparent); }

#repo .repo-foot { display: flex; align-items: center; gap: 18px; padding: 0 6px 4px; }
#repo .repo-lic { font-size: 13px; letter-spacing: .08em; }

@container piece (max-width: 700px) {
  #repo .repo-card { padding: 12px; gap: 14px; border-radius: 22px; }
  #repo .repo-win { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); height: 318px; padding: 6px; }
  #repo .repo-tree { display: none; }
  #repo .repo-tabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 2px 2px 4px; scroll-snap-type: x proximity; }
  #repo .repo-tabs::-webkit-scrollbar { display: none; }
  #repo .repo-tabs button { flex: none; min-height: 44px; padding: 0 14px; border-radius: 12px; font-family: var(--mono); font-size: 13px; color: var(--text-2); background: var(--panel); box-shadow: inset 0 0 0 1px var(--line); scroll-snap-align: start; }
  #repo .repo-tabs button.on { color: var(--text); background: var(--raised); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent-text) 55%, transparent); }
  #repo .repo-code { font-size: 12.5px; line-height: 21px; }
  #repo .repo-code .ln { min-height: 21px; }
  #repo .repo-vhead { padding: 12px 14px 10px; }
  #repo .repo-run { grid-template-columns: 1fr 1fr; padding: 0; gap: 8px; }
  #repo .repo-run .repo-lang { padding: 8px 12px; gap: 6px; }
  #repo .repo-ticks i { height: 10px; border-radius: 3px; }
  #repo .repo-foot { flex-direction: column; align-items: stretch; gap: 8px; text-align: center; }
}
@media (prefers-reduced-motion: reduce) { #repo * { transition: none !important; } }
