:root {
  color-scheme: light;
  --border: #d0d7de;
  --muted: #656d76;
  --soft: #f6f8fa;
  --blue: #0969da;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }

body {
  color: #1f2328;
  background: #fff;
  font: 14px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.site-header {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 56px;
  padding: 10px 18px;
  background: #f6f8fa;
  border-bottom: 1px solid var(--border);
}

.octo { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: #1f2328; color: white; font-size: 11px; }
.search { width: min(330px, 45vw); padding: 6px 10px; border: 1px solid var(--border); border-radius: 6px; color: var(--muted); background: #fff; font-size: 12px; }
kbd { float: right; padding: 0 4px; border: 1px solid var(--border); border-radius: 3px; background: var(--soft); }
.header-icons { display: flex; gap: 8px; margin-left: auto; }
.header-icons span { display: grid; place-items: center; width: 30px; height: 30px; border: 1px solid var(--border); border-radius: 6px; }

.repo-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 22px;
  background: var(--soft);
}

.repo-name { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; color: var(--blue); font-size: 15px; }
.repo-name em { margin-left: 4px; padding: 1px 7px; border: 1px solid var(--border); border-radius: 999px; color: var(--muted); font-size: 11px; font-style: normal; }
.repo-icon { color: var(--muted); }
.repo-actions { display: flex; gap: 6px; }
.repo-actions span { padding: 5px 9px; border: 1px solid var(--border); border-radius: 6px; background: white; font-size: 12px; }

.repo-nav {
  display: flex;
  gap: 7px;
  padding: 0 18px;
  border-bottom: 1px solid var(--border);
  background: var(--soft);
  overflow-x: auto;
}

.repo-nav span { flex: 0 0 auto; padding: 10px 8px 8px; border-bottom: 2px solid transparent; white-space: nowrap; }
.repo-nav .active { border-bottom-color: #fd8c73; font-weight: 600; }
.repo-nav b { display: inline-grid; place-items: center; min-width: 20px; height: 20px; border-radius: 999px; background: #afb8c133; font-size: 11px; }

main { max-width: 1120px; margin: 0 auto; padding: 24px 20px 50px; }
.issue-heading { padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.issue-heading h1 { margin: 0 0 10px; font-size: clamp(21px, 3vw, 30px); font-weight: 400; line-height: 1.25; }
.issue-heading h1 span { color: var(--muted); font-weight: 300; }
.issue-heading code { padding: 0; background: transparent; font-size: .86em; }
.issue-meta { color: var(--muted); }
.issue-meta b { color: #1f2328; }
.open { margin-right: 8px; padding: 5px 10px; border-radius: 999px; background: #1f883d; color: white; font-size: 12px; }

.issue-layout {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 215px;
  gap: 12px;
  margin-top: 18px;
}

.avatar { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: #8250df; color: white; font-weight: 700; }
.comment { min-width: 0; border: 1px solid var(--border); border-radius: 6px; overflow: hidden; }
.comment > header { display: flex; align-items: center; gap: 6px; min-height: 44px; padding: 8px 13px; border-bottom: 1px solid var(--border); background: var(--soft); color: var(--muted); }
.comment > header strong { color: #1f2328; }
.comment > header button { margin-left: auto; border: 0; background: transparent; color: var(--muted); }
.comment-body { padding: 18px 22px; }
.comment-body h2 { margin: 22px 0 8px; padding-bottom: 5px; border-bottom: 1px solid #d8dee4; font-size: 18px; }
.comment-body h2:first-child { margin-top: 0; }
.comment-body p { margin: 0 0 12px; }
.comment-body ul { padding-left: 24px; }
code { padding: 2px 5px; border-radius: 5px; background: #eff1f3; font: .88em ui-monospace, SFMono-Regular, Menlo, monospace; }
pre { margin: 12px 0 18px; padding: 14px 16px; overflow-x: auto; border-radius: 6px; background: var(--soft); color: #24292f; font: 12px/1.55 ui-monospace, SFMono-Regular, Menlo, monospace; }
pre code { padding: 0; background: transparent; font: inherit; }
.payload {
  padding: 12px 0;
  border: 1px solid var(--border);
  background: var(--soft);
}

.payload > code {
  display: block;
  padding: 0 14px;
}

.payload-action {
  display: block;
  margin: 8px -14px;
  padding: 9px 14px 9px 11px;
  border-left: 3px solid #bf8700;
  background: #fff8c5;
  cursor: help;
  transition: background .16s ease, box-shadow .16s ease;
}

.payload-action:hover,
.payload-action:focus-visible {
  background: #ffec99;
  box-shadow: inset 0 0 0 1px rgba(191, 135, 0, .28);
  outline: 0;
}
.reaction { display: inline-block; margin-top: 4px; padding: 4px 10px; border: 1px solid var(--border); border-radius: 999px; color: var(--blue); font-size: 12px; }

.sidebar { padding-left: 10px; }
.sidebar section { padding: 0 0 15px; margin-bottom: 15px; border-bottom: 1px solid var(--border); }
.sidebar strong { font-size: 12px; }
.sidebar p { margin: 6px 0 0; color: var(--muted); font-size: 12px; }
.label { display: inline-block; padding: 2px 8px; border-radius: 999px; background: #a2eeef; color: #123; font-weight: 600; }

.timeline-note { display: flex; gap: 12px; max-width: 760px; margin: 24px 0 0 54px; color: var(--muted); }
.timeline-note > span { color: #8250df; }
.timeline-note p { margin: 0; }
.timeline-note strong { color: #1f2328; }

@media (max-width: 760px) {
  .repo-actions { display: none; }
  .repo-header { padding-inline: 14px; }
  main { padding: 18px 12px 40px; }
  .issue-layout { grid-template-columns: 32px minmax(0, 1fr); gap: 8px; }
  .avatar { width: 30px; height: 30px; }
  .sidebar { grid-column: 2; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 0; }
  .sidebar section { margin: 0; }
  .comment-body { padding: 15px; }
  .timeline-note { margin-left: 38px; }
}

@media (max-width: 460px) {
  .search { display: none; }
  .repo-name { font-size: 13px; }
  .issue-heading h1 { font-size: 21px; }
  .issue-layout { grid-template-columns: 1fr; }
  .avatar { display: none; }
  .sidebar { grid-column: 1; }
  .timeline-note { margin-left: 0; }
}
