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

:root {
  --bg:          #080c10;
  --surface:     #0e1520;
  --surface-hi:  #131d2a;
  --border:      #1a2535;
  --border-hi:   #243345;
  --text:        #dce6f0;
  --text-dim:    #8a9bb0;
  --text-mute:   #4a5a6a;
  --accent:      #02efd8;
  --accent-dim:  #015a52;
  --accent-glow: rgba(2, 239, 216, 0.07);
  --font-mono:   'Courier New', Courier, monospace;
  --font-sans:   Georgia, 'Times New Roman', serif;
}

html {
  scroll-behavior: smooth;
  background: var(--bg);
  scrollbar-width: thin;
  scrollbar-color: #243040 var(--bg);
}

::-webkit-scrollbar        { width: 5px; background: var(--bg); }
::-webkit-scrollbar-track  { background: var(--bg); }
::-webkit-scrollbar-thumb  { background: #243040; }
::-webkit-scrollbar-thumb:hover { background: #4a5a6a; }

body {
  background: linear-gradient(160deg, #0a0f18 0%, #0d1825 40%, #080c14 100%);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
}

/* ── NOISE ── */
.noise {
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  background-size: 200px 200px;
  pointer-events: none;
  z-index: 0;
  opacity: 0.5;
}

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

.container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 48px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* ── HEADER ── */
header {
  padding: 52px 0 36px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 52px;
}

.breadcrumb {
  font-size: 11px;
  color: var(--text-mute);
  margin-bottom: 24px;
  letter-spacing: 0.05em;
}

.breadcrumb a       { color: var(--text-mute); }
.breadcrumb a:hover { color: var(--accent); text-decoration: none; }
.crumb-sep          { margin: 0 6px; color: var(--border-hi); }
.crumb-current      { color: var(--accent); }

.title {
  font-family: var(--font-sans);
  font-size: 44px;
  font-weight: normal;
  color: #fff;
  letter-spacing: -1.5px;
  line-height: 1.1;
  margin-bottom: 14px;
}

.title::after {
  content: '.';
  color: var(--accent);
}

.subtitle {
  font-size: 13px;
  color: var(--text-dim);
  max-width: 500px;
  line-height: 1.65;
  margin-bottom: 32px;
}

/* ── CONTROLS ── */
.controls {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

#search {
  background: var(--surface);
  border: 1px solid var(--border-hi);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 8px 14px;
  width: 280px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

#search::placeholder { color: var(--text-mute); }
#search:focus {
  border-color: var(--accent-dim);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.filter-group {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.filter-btn {
  background: none;
  border: 1px solid var(--border-hi);
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 6px 12px;
  cursor: pointer;
  transition: all 0.15s;
  text-transform: lowercase;
}

.filter-btn:hover {
  border-color: var(--accent-dim);
  color: var(--text);
}

.filter-btn.active {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-glow);
}

/* ── MAIN ── */
main { flex: 1; }

/* ── CARD GRID ── */
#card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
  margin-bottom: 64px;
  align-items: start;
}

/* ── CARD ── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 28px 24px 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-decoration: none;
  color: inherit;
  position: relative;
  overflow: hidden;
  transition: background 0.15s, border-color 0.15s;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.22s ease;
}

.card:hover {
  background: var(--surface-hi);
  border-color: var(--border-hi);
  text-decoration: none;
}

.card:hover::before {
  transform: scaleX(1);
}

.card-type {
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-mute);
  display: flex;
  align-items: center;
}

.card-title {
  font-family: var(--font-sans);
  font-size: 20px;
  font-weight: normal;
  color: #fff;
  line-height: 1.25;
  letter-spacing: -0.3px;
}

.card-desc {
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.65;
  flex: 1;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 6px;
}

.card-tags {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.tag {
  font-size: 10px;
  padding: 2px 6px;
  border: 1px solid var(--border-hi);
  color: var(--text-mute);
  letter-spacing: 0.03em;
}

.card-arrow {
  font-size: 14px;
  color: var(--accent);
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity 0.15s, transform 0.15s;
  flex-shrink: 0;
}

.card:hover .card-arrow {
  opacity: 1;
  transform: translateX(0);
}

/* ── STATUS DOT ── */
.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 6px;
  flex-shrink: 0;
}

.status-live     { background: #39ff14; box-shadow: 0 0 6px #39ff1466; }
.status-down     { background: #ff4444; }
.status-unstable { background: #f0a500; }
.status-archived { background: #4a9ebb; }

/* ── EMPTY STATE ── */
.empty-state {
  padding: 64px 0;
  color: var(--text-mute);
  font-size: 12px;
}

.hidden { display: none; }

/* ── FOOTER ── */
footer {
  padding: 20px 0 36px;
  font-size: 11px;
  color: var(--text-mute);
  border-top: 1px solid var(--border);
}

footer a       { color: var(--text-mute); }
footer a:hover { color: var(--accent); }
.fsep          { margin: 0 8px; color: var(--border-hi); }

/* ── RESPONSIVE ── */
@media (max-width: 899px) {
  .container { padding: 0 28px; }
  .title { font-size: 34px; }
  #card-grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
}

@media (max-width: 599px) {
  .container { padding: 0 16px; }
  .title { font-size: 28px; }
  #card-grid { grid-template-columns: 1fr; gap: 10px; }
  #search { width: 100%; }
  .controls { flex-direction: column; align-items: stretch; }
}