/* AstraLabs Dark Theme for Stagit */
:root {
  --void: #0a0909;
  --plate: #131212;
  --plate-hover: #191818;
  --rule: #2c2a29;
  --rule-subtle: #1e1d1c;
  --mark: #ffffff;
  --bone: #ede6e1;
  --ash: #8e8380;
  --red: #ff3344;
  --acid: #ff3344;
  --gold: #ffaa00;
  --green: #33cc66;
  --sans: "Archivo", "Arial Narrow", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, system-ui, sans-serif;
  --mono: "Martian Mono", ui-monospace, Menlo, Monaco, Consolas, monospace;
}

*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  background-color: var(--void);
  color: var(--bone);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--bone);
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover {
  color: var(--gold);
  text-decoration: underline;
}

.site-wrapper {
  max-width: 1120px;
  margin: 0 auto;
  padding: 24px;
}

/* Site Global Header */
.global-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  padding-bottom: 16px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--rule);
}

.brand-title {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.05em;
  color: var(--bone);
  display: flex;
  align-items: center;
  gap: 6px;
}

.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 8px var(--gold);
}

.nav-links {
  display: flex;
  gap: 18px;
  font-family: var(--mono);
  font-size: 0.85rem;
  text-transform: uppercase;
}

.nav-links a {
  color: var(--ash);
}

.nav-links a:hover, .nav-links a.active {
  color: var(--mark);
}

/* Site Notice Banner */
.site-notice {
  margin: 1rem 0 1.5rem;
  padding: 0.85rem 1.2rem;
  background: var(--plate);
  border: 1px solid var(--gold);
  border-left: 4px solid var(--gold);
  border-radius: 4px;
  font-family: var(--mono);
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--bone);
}

.site-notice-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
  color: var(--gold);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Stagit Repository Header */
.repo-header {
  background: var(--plate);
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 16px 20px;
  margin-bottom: 20px;
}

.repo-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 10px;
}

.repo-title-row h1 {
  font-family: var(--mono);
  font-size: 1.35rem;
  margin: 0;
  color: var(--mark);
  display: flex;
  align-items: center;
  gap: 10px;
}

.badge-public {
  font-size: 0.72rem;
  font-weight: 600;
  border: 1px solid var(--rule);
  color: var(--ash);
  padding: 2px 8px;
  border-radius: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.repo-desc {
  color: var(--ash);
  font-size: 0.92rem;
  margin-bottom: 12px;
}

.repo-actions-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--rule-subtle);
  font-family: var(--mono);
  font-size: 0.82rem;
}

.btn-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--plate-hover);
  border: 1px solid var(--rule);
  color: var(--bone);
  padding: 5px 12px;
  border-radius: 4px;
  font-weight: 600;
  transition: all 0.15s ease;
}

.btn-action:hover {
  background: var(--rule);
  color: var(--mark);
  text-decoration: none;
  border-color: var(--ash);
}

.btn-action.btn-accent {
  background: #1e281e;
  border-color: #2c552c;
  color: #70db70;
}

.btn-action.btn-accent:hover {
  background: #283a28;
  border-color: #387038;
  color: #a0ffa0;
}

/* Stagit Tabs */
.repo-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  font-family: var(--mono);
  font-size: 0.85rem;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 8px;
}

.repo-tabs a {
  padding: 6px 12px;
  border-radius: 4px;
  color: var(--ash);
  border: 1px solid transparent;
}

.repo-tabs a:hover {
  color: var(--bone);
  background: var(--plate);
  text-decoration: none;
}

.repo-tabs a.active {
  color: var(--mark);
  background: var(--plate);
  border-color: var(--rule);
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  font-family: var(--mono);
  margin-bottom: 24px;
}

table thead tr {
  border-bottom: 1px solid var(--rule);
  color: var(--ash);
  font-size: 0.8rem;
  text-transform: uppercase;
}

table th, table td {
  padding: 10px 14px;
  text-align: left;
}

table tbody tr {
  border-bottom: 1px solid var(--rule-subtle);
  transition: background 0.1s ease;
}

table tbody tr:hover {
  background: var(--plate);
}

table tbody tr:hover td {
  color: var(--mark);
}

.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* Code Blobs and Diff */
pre, code, #blob {
  font-family: var(--mono);
  font-size: 0.85rem;
  line-height: 1.55;
  background: var(--plate);
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 16px;
  overflow-x: auto;
  color: var(--bone);
}

pre a.line {
  display: inline-block;
  width: 48px;
  color: #55504c;
  user-select: none;
  text-align: right;
  padding-right: 14px;
  text-decoration: none !important;
}

pre a.line:hover {
  color: var(--gold);
}

/* Diff formatting */
span.i {
  color: #55dd77;
  background: rgba(51, 204, 102, 0.08);
  display: block;
}

span.d {
  color: #ff5566;
  background: rgba(255, 51, 68, 0.08);
  display: block;
}

/* Footer */
.stagit-footer {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--rule-subtle);
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--ash);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
