:root {
  color-scheme: light;
  --background: #ffffff;
  --foreground: #171717;
  --muted: #737373;
  --subtle: #a3a3a3;
  --border: #e5e5e5;
  --surface: #f5f5f5;
  --surface-hover: #eeeeee;
}

:root[data-theme='dark'] {
  color-scheme: dark;
  --background: #0a0a0a;
  --foreground: #fafafa;
  --muted: #a3a3a3;
  --subtle: #737373;
  --border: #262626;
  --surface: #171717;
  --surface-hover: #262626;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--background);
}

body {
  margin: 0;
  color: var(--foreground);
  background: var(--background);
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    sans-serif;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  color: var(--foreground);
}

button {
  color: inherit;
  font: inherit;
}

.container {
  width: min(100%, 768px);
  margin: 0 auto;
  padding: 40px 32px 32px;
}

.profile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
}

.avatar-link {
  line-height: 0;
}

.avatar {
  width: 80px;
  height: 80px;
  border: 1px solid var(--border);
  border-radius: 50%;
  box-shadow: 0 2px 8px rgb(0 0 0 / 8%);
}

h1 {
  margin: 0;
  font-size: clamp(1.5rem, 5vw, 1.875rem);
  font-weight: 400;
  letter-spacing: -0.025em;
}

h1 span {
  animation: pulse 2s ease-in-out infinite;
}

.subtitle {
  margin: 0;
  color: var(--muted);
  font-size: 0.9375rem;
}

.subtitle a:hover,
.repo-name:hover,
.pull-request-meta a:hover,
footer a:hover {
  text-decoration: underline;
}

.actions {
  display: flex;
  align-items: center;
  gap: 2px;
}

.actions a,
.actions button {
  display: grid;
  width: 36px;
  height: 36px;
  padding: 8px;
  place-items: center;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
}

.actions a:hover,
.actions button:hover {
  color: var(--foreground);
  background: var(--surface);
}

.actions svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.actions a svg {
  fill: currentColor;
  stroke: none;
}

.moon {
  display: none;
}

[data-theme='dark'] .sun {
  display: none;
}

[data-theme='dark'] .moon {
  display: block;
}

.divider {
  width: 50%;
  height: 1px;
  margin: 20px 0 30px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
}

.list-heading {
  display: flex;
  min-height: 32px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
  color: var(--muted);
  font-size: 0.75rem;
}

.status {
  display: flex;
  min-height: 160px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--muted);
  font-size: 0.875rem;
}

.status.error {
  flex-direction: column;
  text-align: center;
}

.status[hidden] {
  display: none;
}

.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid var(--border);
  border-top-color: var(--muted);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.pull-requests {
  display: flex;
  flex-direction: column;
  gap: 38px;
}

.pull-request {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 16px;
}

.repo-avatar-link {
  flex: 0 0 auto;
  line-height: 0;
}

.repo-avatar {
  width: 48px;
  height: 48px;
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 1px 3px rgb(0 0 0 / 6%);
}

.pull-request-main {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  gap: 5px;
}

.pull-request-title {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 6px;
  font-size: 0.9375rem;
}

.pull-request-title:hover span {
  text-decoration: underline;
}

.pull-request-title span,
.repo-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.repo-details {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
}

.repo-stars {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 3px;
  color: var(--muted);
  font-size: 0.75rem;
}

.repo-stars svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-linejoin: round;
  stroke-width: 2;
}

.state-icon {
  width: 19px;
  height: 19px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.state-open {
  color: #22c55e;
}

.state-merged {
  color: #a855f7;
}

.state-closed {
  color: #ef4444;
}

.state-draft {
  color: var(--muted);
}

.repo-name {
  width: fit-content;
  max-width: 100%;
  color: var(--muted);
  font-size: 0.875rem;
}

.pull-request-meta {
  display: flex;
  min-width: 76px;
  flex: 0 0 auto;
  align-self: stretch;
  flex-direction: column;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.75rem;
  text-align: right;
}

.pull-request-number {
  color: var(--foreground);
}

footer {
  margin-top: 64px;
  color: var(--subtle);
  font-size: 0.75rem;
  text-align: center;
}

footer a {
  color: var(--muted);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.icon-library {
  display: none;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes pulse {
  50% {
    opacity: 0.5;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

@media (max-width: 560px) {
  .container {
    padding: 28px 20px 24px;
  }

  .avatar {
    width: 64px;
    height: 64px;
  }

  .divider {
    margin-bottom: 24px;
  }

  .pull-requests {
    gap: 28px;
  }

  .pull-request {
    gap: 10px;
  }

  .repo-avatar {
    width: 40px;
    height: 40px;
    border-radius: 8px;
  }

  .pull-request-title {
    font-size: 0.875rem;
  }

  .pull-request-meta {
    min-width: 58px;
  }
}
