:root {
  color-scheme: light;
  --paper: #f5f1e8;
  --ink: #171c24;
  --muted: #657080;
  --line: #d9cfbf;
  --card: #fffaf1;
  --accent: #0f6b5f;
  --accent-strong: #09493f;
  --signal: #d55326;
  --shadow: 0 20px 60px rgba(42, 32, 20, 0.12);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(135deg, rgba(15, 107, 95, 0.08), transparent 36%),
    linear-gradient(315deg, rgba(213, 83, 38, 0.1), transparent 34%),
    var(--paper);
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
}

body::before {
  position: fixed;
  inset: 0;
  pointer-events: none;
  content: "";
  opacity: 0.38;
  background-image:
    linear-gradient(rgba(23, 28, 36, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23, 28, 36, 0.04) 1px, transparent 1px);
  background-size: 28px 28px;
}

a {
  color: inherit;
}

.shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 40px 0 56px;
}

.masthead {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 24px;
  align-items: end;
  margin-bottom: 24px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  font: 700 13px/1.2 ui-monospace, "SFMono-Regular", Menlo, monospace;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(48px, 9vw, 112px);
  line-height: 0.88;
  letter-spacing: 0;
}

.lede {
  max-width: 620px;
  margin: 18px 0 0;
  color: var(--muted);
  font: 18px/1.7 ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.status-card,
.notice,
.toolbar,
.fallback,
.repo-card {
  border: 1px solid var(--line);
  background: rgba(255, 250, 241, 0.86);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.status-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: center;
  min-height: 92px;
  padding: 18px;
}

.status-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: var(--signal);
  box-shadow: 0 0 0 8px rgba(213, 83, 38, 0.12);
}

.status-dot.ok {
  background: var(--accent);
  box-shadow: 0 0 0 8px rgba(15, 107, 95, 0.12);
}

.status-dot.warn {
  background: #b7791f;
  box-shadow: 0 0 0 8px rgba(183, 121, 31, 0.12);
}

.status-label {
  margin: 0;
  font: 800 15px/1.2 ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.status-meta {
  margin: 4px 0 0;
  color: var(--muted);
  font: 13px/1.4 ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.icon-button {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fffdf8;
  color: var(--accent-strong);
  cursor: pointer;
}

.icon-button:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}

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

.notice {
  margin-bottom: 18px;
  padding: 14px 16px;
  color: #433c32;
  font: 14px/1.6 ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.toolbar {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  padding: 16px;
}

.search-box {
  display: grid;
  grid-template-columns: auto minmax(180px, 420px);
  gap: 12px;
  align-items: center;
  width: 100%;
  color: var(--muted);
  font: 700 13px/1 ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  text-transform: uppercase;
}

.search-box input {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 0;
  padding: 0 14px;
  background: #fffdf8;
  color: var(--ink);
  font: 15px/1.2 ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.search-box input:focus {
  outline: 2px solid rgba(15, 107, 95, 0.28);
  border-color: var(--accent);
}

.counter {
  white-space: nowrap;
  color: var(--accent-strong);
  font: 700 14px/1 ui-monospace, "SFMono-Regular", Menlo, monospace;
}

.fallback {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
  padding: 16px;
}

.fallback-title {
  margin: 0;
  font: 800 16px/1.3 ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.fallback-copy {
  margin: 4px 0 0;
  color: var(--muted);
  font: 14px/1.4 ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.primary-link,
.repo-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 1px solid var(--accent);
  padding: 0 14px;
  color: var(--accent-strong);
  font: 800 14px/1 ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  text-decoration: none;
}

.primary-link:hover,
.repo-link:hover {
  background: var(--accent);
  color: #fffdf8;
}

.repo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 18px;
}

.repo-card {
  display: flex;
  flex-direction: column;
  min-height: 260px;
  padding: 20px;
}

.repo-card-head {
  display: flex;
  gap: 12px;
  align-items: start;
  justify-content: space-between;
}

.repo-name {
  margin: 0;
  overflow-wrap: anywhere;
  font-size: 30px;
  line-height: 1;
  letter-spacing: 0;
}

.repo-description {
  min-height: 44px;
  margin: 12px 0 0;
  color: var(--muted);
  font: 14px/1.55 ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.repo-language {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  padding: 7px 9px;
  color: var(--signal);
  font: 800 11px/1 ui-monospace, "SFMono-Regular", Menlo, monospace;
  text-transform: uppercase;
}

.repo-meta {
  margin: auto 0 18px;
  padding: 16px 0 0;
  border-top: 1px solid var(--line);
}

.repo-meta div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.repo-meta dt,
.repo-meta dd {
  margin: 0;
  font: 13px/1.3 ui-monospace, "SFMono-Regular", Menlo, monospace;
}

.repo-meta dt {
  color: var(--muted);
}

.repo-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.empty-state {
  grid-column: 1 / -1;
  border: 1px dashed var(--line);
  padding: 36px;
  text-align: center;
  color: var(--muted);
  font: 15px/1.6 ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

@media (max-width: 760px) {
  .shell {
    width: min(100% - 24px, 1180px);
    padding-top: 24px;
  }

  .masthead {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .toolbar,
  .fallback {
    align-items: stretch;
    flex-direction: column;
  }

  .search-box {
    grid-template-columns: 1fr;
  }

  .counter {
    white-space: normal;
  }
}
