/* system-nook - dark directory UI */

:root {
  --bg: #0e1117;
  --surface: #161b22;
  --surface-2: #1c2128;
  --border: #30363d;
  --border-muted: #21262d;
  --text: #e6edf3;
  --text-muted: #8b949e;
  --text-subtle: #6e7681;
  --accent: #58a6ff;
  --accent-hover: #79b8ff;
  --green: #3fb950;
  --gold: #d29922;
  --red: #f85149;
  --radius: 6px;
  --radius-lg: 8px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}

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

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); text-decoration: underline; }

.container {
  width: min(1200px, calc(100% - 48px));
  margin: 0 auto;
}

.muted { color: var(--text-muted); }
.label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
}

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

.skip-link {
  position: absolute; top: -40px; left: 16px; z-index: 100;
  padding: 8px 12px; background: var(--accent); color: #fff;
  border-radius: var(--radius); font-weight: 600;
}
.skip-link:focus { top: 12px; }

/* crisis */
.crisis-bar {
  padding: 8px 16px;
  font-size: 12px;
  color: var(--text-muted);
  background: var(--surface);
  border-bottom: 1px solid var(--border-muted);
  text-align: center;
}
.crisis-bar a { color: var(--text); }
.crisis-bar a:hover { color: var(--accent); text-decoration: underline; }

.prelaunch-bar {
  padding: 8px 16px;
  font-size: 12px;
  color: var(--text);
  background: rgba(210, 153, 34, 0.12);
  border-bottom: 1px solid rgba(210, 153, 34, 0.25);
  text-align: center;
}
.prelaunch-bar a { color: var(--gold); font-weight: 500; }

/* header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid var(--border-muted);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

.brand {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
}
.brand:hover { color: var(--text); text-decoration: none; }

.nav { display: flex; gap: 4px; }
.nav a {
  padding: 6px 12px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  border-radius: var(--radius);
}
.nav a:hover { color: var(--text); background: var(--surface); text-decoration: none; }
.nav a.is-active { color: var(--text); background: var(--surface-2); }

/* footer */
.site-footer {
  margin-top: 64px;
  padding: 32px 0 48px;
  border-top: 1px solid var(--border-muted);
  text-align: center;
}
.footer-inner p { margin: 0 0 8px; color: var(--text-muted); font-size: 14px; }
.footer-links { display: flex; justify-content: center; gap: 16px; margin-bottom: 12px !important; }
.footer-links a { color: var(--text-muted); text-decoration: none; }
.footer-links a:hover { color: var(--accent); text-decoration: none; }
.footer-fine { font-size: 12px !important; color: var(--text-subtle) !important; }

/* hero */
.hero {
  padding: 40px 0 32px;
}
.hero h1 {
  margin: 0 0 12px;
  font-size: clamp(28px, 5vw, 40px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
}
.hero-lead {
  margin: 0;
  max-width: 560px;
  font-size: 16px;
  color: var(--text-muted);
  line-height: 1.6;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}
.hero-note {
  margin: 12px 0 0;
  font-size: 13px;
  color: var(--text-subtle);
  max-width: 520px;
}
.panel-discord {
  border-color: rgba(88, 101, 242, 0.35);
}

.page-head {
  padding: 32px 0 24px;
  border-bottom: 1px solid var(--border-muted);
  margin-bottom: 24px;
}
.page-head h1 {
  margin: 0 0 8px;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.page-head p { margin: 0; color: var(--text-muted); font-size: 15px; }

/* toolbar */
.toolbar {
  margin-bottom: 24px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--border-muted);
  border-radius: var(--radius-lg);
}

.toolbar-form {
  display: grid;
  grid-template-columns: 1fr 180px 200px;
  gap: 16px;
  align-items: end;
}
@media (max-width: 768px) {
  .toolbar-form { grid-template-columns: 1fr; }
}

.category-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border-muted);
}
.chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--bg);
  border: 1px solid var(--border-muted);
  border-radius: 99px;
  text-decoration: none;
}
.chip:hover {
  color: var(--text);
  border-color: var(--border);
  text-decoration: none;
}
.chip.is-active {
  color: var(--text);
  border-color: var(--accent);
  background: rgba(88, 166, 255, 0.1);
}

.field-hint {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: var(--text-subtle);
}

/* Honeypot — off-screen, not display:none (some bots skip those) */
.hp-field {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.input, .select, .field input, .field textarea, .field select {
  width: 100%;
  padding: 8px 12px;
  font-family: inherit;
  font-size: 14px;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  outline: none;
}
.input::placeholder { color: var(--text-subtle); }
.input:focus, .select:focus,
.field input:focus, .field textarea:focus, .field select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(88, 166, 255, 0.15);
}
.select { cursor: pointer; }
.select option { background: var(--surface); }

/* results + cards */
.results { padding-bottom: 48px; }

.results-count {
  margin: 0 0 20px;
  font-size: 14px;
  color: var(--text-muted);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
@media (max-width: 960px) { .card-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .card-grid { grid-template-columns: 1fr; } }

.card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border-muted);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color 0.15s;
}
.card:hover { border-color: var(--border); }

.card-image {
  display: block;
  aspect-ratio: 16 / 9;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border-muted);
  overflow: hidden;
}
.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.card-image-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-height: 140px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-subtle);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.card-content {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 16px;
}

.card-title {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
}
.card-title a { color: var(--text); text-decoration: none; }
.card-title a:hover { color: var(--accent); text-decoration: none; }

.card-creator {
  margin: 0 0 8px;
  font-size: 13px;
  color: var(--text-muted);
}
.card-creator a { color: var(--text-muted); text-decoration: none; }
.card-creator a:hover { color: var(--accent); }

.card-desc {
  margin: 0 0 12px;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  flex: 1;
}

.card-labels {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}
.label-pill {
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--bg);
  border: 1px solid var(--border-muted);
  border-radius: 99px;
}
.label-pill--green { color: var(--green); border-color: rgba(63, 185, 80, 0.35); }
.label-pill--gold { color: var(--gold); border-color: rgba(210, 153, 34, 0.35); }

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--border-muted);
}

.like-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  font-family: inherit;
  font-size: 13px;
  color: var(--text-muted);
  background: none;
  border: 1px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
}
.like-btn:hover { color: var(--text); background: var(--bg); border-color: var(--border-muted); }
.like-btn.is-liked { color: var(--red); }
.like-btn.is-liked svg { fill: var(--red); }
.like-btn:disabled {
  opacity: 1;
  cursor: default;
}
.like-btn.is-liked:disabled:hover {
  color: var(--red);
  background: none;
  border-color: transparent;
}

/* buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 14px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}
.btn:hover { background: var(--border-muted); text-decoration: none; color: var(--text); }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn-primary {
  color: #fff;
  background: #238636;
  border-color: rgba(240, 246, 252, 0.1);
}
.btn-primary:hover { background: #2ea043; color: #fff; }
.btn-discord {
  color: #fff;
  background: #5865f2;
  border-color: rgba(88, 101, 242, 0.6);
}
.btn-discord:hover { background: #4752c4; color: #fff; text-decoration: none; }
.nav-discord { color: #949cf0 !important; }
.nav-discord:hover { color: #c9cdfb !important; }
.btn-danger {
  color: #fff;
  background: #da3633;
  border-color: rgba(240, 246, 252, 0.1);
}
.btn-danger:hover { background: #f85149; color: #fff; }
.btn-block { width: 100%; padding: 10px 14px; }
.btn.is-disabled { opacity: 0.4; pointer-events: none; }

.empty {
  padding: 48px 24px;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--border-muted);
  border-radius: var(--radius-lg);
}
.empty p { margin: 0 0 16px; color: var(--text-muted); }

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 32px;
}
.pagination-info { font-size: 13px; color: var(--text-muted); }

/* forms / panels */
.panel {
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border-muted);
  border-radius: var(--radius-lg);
}
.panel h2 {
  margin: 0 0 16px;
  font-size: 16px;
  font-weight: 600;
}

.field { margin-bottom: 14px; }
.field textarea { resize: vertical; min-height: 80px; }

.input-group { display: flex; }
.input-group input {
  flex: 1;
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}
.input-addon {
  padding: 0 12px;
  font-family: inherit;
  font-size: 12px;
  color: var(--text-muted);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-left: 0;
  border-radius: 0 var(--radius) var(--radius) 0;
  cursor: pointer;
}
.input-addon:hover { color: var(--text); }

.checks { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 16px; }
.check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
  cursor: pointer;
}
.check input { accent-color: var(--accent); }

.flash {
  padding: 12px 16px;
  margin-bottom: 20px;
  font-size: 14px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.flash-success { background: rgba(63, 185, 80, 0.1); border-color: rgba(63, 185, 80, 0.3); color: var(--green); }
.flash-error { background: rgba(248, 81, 73, 0.1); border-color: rgba(248, 81, 73, 0.3); color: var(--red); }

.form-msg {
  margin: 12px 0 0;
  font-size: 13px;
  color: var(--text-muted);
}
.form-msg.is-error { color: var(--red); }

.split-layout {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 20px;
  padding-bottom: 48px;
}
@media (max-width: 800px) { .split-layout { grid-template-columns: 1fr; } }

.prose p, .prose li { color: var(--text-muted); line-height: 1.65; }
.prose strong { color: var(--text); }
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  padding-bottom: 48px;
}
@media (max-width: 700px) { .about-grid { grid-template-columns: 1fr; } }

.note-box {
  padding: 12px 14px;
  font-size: 13px;
  color: var(--text-muted);
  background: var(--bg);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.tag-list { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-list a {
  padding: 4px 10px;
  font-size: 13px;
  color: var(--text-muted);
  background: var(--bg);
  border: 1px solid var(--border-muted);
  border-radius: var(--radius);
  text-decoration: none;
}
.tag-list a:hover { color: var(--text); border-color: var(--border); text-decoration: none; }

/* admin */
.admin-login {
  display: flex;
  justify-content: center;
  padding: 48px 0 64px;
}

.admin-login-box {
  width: 100%;
  max-width: 380px;
  padding: 32px;
  background: var(--surface);
  border: 1px solid var(--border-muted);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
.admin-login-box h1 {
  margin: 0 0 6px;
  font-size: 24px;
  font-weight: 700;
}
.admin-login-sub {
  margin: 0 0 24px;
  font-size: 14px;
  color: var(--text-muted);
}

.admin-dash { padding-bottom: 48px; }

.admin-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 32px 0 20px;
  border-bottom: 1px solid var(--border-muted);
  margin-bottom: 20px;
}
.admin-top h1 { margin: 0 0 4px; font-size: 24px; font-weight: 700; }
.admin-top-actions { display: flex; gap: 8px; }

.status-bar {
  margin: 0 0 16px;
  padding: 10px 14px;
  font-size: 13px;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px solid var(--border-muted);
  border-radius: var(--radius);
}
.status-bar[hidden] { display: none; }
.status-bar.is-error { color: var(--red); border-color: rgba(248, 81, 73, 0.35); background: rgba(248, 81, 73, 0.08); }

.admin-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (max-width: 860px) { .admin-layout { grid-template-columns: 1fr; } }
.panel-full { grid-column: 1 / -1; }

.badge-count {
  display: inline-block;
  min-width: 20px;
  padding: 1px 7px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg);
  border: 1px solid var(--border-muted);
  border-radius: 99px;
  vertical-align: middle;
}

.queue-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 340px;
  overflow-y: auto;
}
.queue-list--tall { max-height: 460px; }

.queue-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  background: var(--bg);
  border: 1px solid var(--border-muted);
  border-radius: var(--radius);
}
.queue-item-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 13px;
}
.queue-item-body strong { font-weight: 600; color: var(--text); }
.queue-item-body a { font-size: 12px; }
.queue-item-actions { display: flex; gap: 6px; flex-shrink: 0; flex-wrap: wrap; }

.empty-msg { margin-top: 8px; font-size: 13px; }
/* ── Contributors / corporate meet-the-team ───────────────── */
.corp-page {
  padding-bottom: 48px;
}

.corp-hero {
  padding: 40px 0 28px;
  border-bottom: 1px solid var(--border-muted);
  margin-bottom: 28px;
}

.corp-kicker {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.corp-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(28px, 5vw, 40px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.corp-lead {
  margin: 0;
  max-width: 620px;
  font-size: 16px;
  line-height: 1.65;
  color: var(--text-muted);
}

.corp-mission {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 20px;
  margin-bottom: 40px;
  align-items: start;
}
@media (max-width: 800px) {
  .corp-mission { grid-template-columns: 1fr; }
}

.corp-mission-inner {
  padding: 24px;
  background: linear-gradient(145deg, rgba(88, 166, 255, 0.08), var(--surface));
  border: 1px solid var(--border-muted);
  border-radius: var(--radius-lg);
}

.corp-mission-inner h2 {
  margin: 0 0 10px;
  font-size: 18px;
  font-weight: 600;
}

.corp-mission-inner p {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.65;
  font-size: 14px;
}

.corp-pillars {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
@media (max-width: 560px) {
  .corp-pillars { grid-template-columns: 1fr; }
}

.corp-pillars li {
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border-muted);
  border-radius: var(--radius-lg);
}

.corp-pillar-label {
  display: block;
  margin-bottom: 4px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.corp-pillar-text {
  display: block;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.45;
}

.corp-section-head {
  margin-bottom: 16px;
}

.corp-section-head h2 {
  margin: 0 0 4px;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.corp-section-head .muted {
  margin: 0;
  font-size: 14px;
}

.corp-team,
.corp-depts,
.corp-partners {
  margin-bottom: 40px;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.team-card {
  display: flex;
  gap: 16px;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border-muted);
  border-radius: var(--radius-lg);
  transition: border-color 0.15s;
}

.team-card:hover {
  border-color: var(--border);
}

.team-avatar {
  flex-shrink: 0;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(145deg, #238636, #58a6ff);
  border: 2px solid rgba(240, 246, 252, 0.08);
}

.team-card-body {
  min-width: 0;
}

.team-name {
  margin: 0 0 2px;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}

.team-role {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.02em;
}

.team-bio {
  margin: 0 0 12px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-muted);
}

.team-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.team-links a {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  padding: 4px 10px;
  border: 1px solid var(--border-muted);
  border-radius: 99px;
  background: var(--bg);
}

.team-links a:hover {
  color: var(--text);
  border-color: var(--border);
  text-decoration: none;
}

.dept-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
@media (max-width: 900px) {
  .dept-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .dept-grid { grid-template-columns: 1fr; }
}

.dept-card {
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--border-muted);
  border-radius: var(--radius-lg);
}

.dept-card h3 {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.dept-card p {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-muted);
}

.corp-cta {
  margin-top: 8px;
  padding: 20px 24px;
  background: var(--surface);
  border: 1px solid rgba(88, 101, 242, 0.35);
  border-radius: var(--radius-lg);
}

.corp-cta-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.corp-cta h2 {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 600;
}

.corp-cta .muted {
  margin: 0;
  font-size: 13px;
}

/* Contributors credit box */
.contributor-credit-box {
  margin-top: 8px;
  text-align: center;
}

.contributor-credit-text {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  line-height: 1.5;
}

.contributor-credit-text .blue-heart {
  margin-right: 6px;
  font-size: 15px;
  vertical-align: -1px;
}
