:root {
  --midnight: #010E21;
  --off-white: #F5FBFF;
  --cobalt: #012BFF;
  --tech-blue: #001464;
  --plasma: #01EEFF;
  --tangerine: #FF7F00;

  --bg: var(--off-white);
  --fg: var(--midnight);
  --muted: #5a6678;
  --border: #d8e1ee;
  --card-bg: #ffffff;
  --shadow-sm: 0 1px 2px rgba(1, 14, 33, 0.05);
  --shadow-md: 0 6px 24px rgba(1, 14, 33, 0.08);

  --radius: 10px;
  --radius-sm: 6px;
  --maxw: 1100px;

  --font-sans: "Host Grotesk", "Inter", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --font-mono: "Space Mono", "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

button, .btn {
  font: inherit;
  cursor: pointer;
}

/* ---------- Layout ---------- */

.site-header {
  background: var(--midnight);
  color: var(--off-white);
  border-bottom: 3px solid var(--cobalt);
}
.site-header__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 24px;
}
.site-header__logo img {
  height: 30px;
  display: block;
}
.site-header__nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 18px;
  font-family: var(--font-mono);
  font-size: 13px;
}
.site-header__nav a {
  color: var(--off-white);
  opacity: 0.85;
}
.site-header__nav a:hover { opacity: 1; text-decoration: none; }
.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border: 1px solid rgba(245, 251, 255, 0.18);
  border-radius: 999px;
  color: var(--off-white);
  font-family: var(--font-mono);
  font-size: 12px;
}
.user-chip__dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--plasma);
}

main {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 40px 24px 80px;
}

/* ---------- Page heading ---------- */

.page-header {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 28px;
}
.page-header h1 {
  margin: 0;
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.page-header h1 .accent { color: var(--cobalt); }
.page-header__meta {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ---------- Search ---------- */

.search {
  position: relative;
  margin-bottom: 28px;
}
.search input {
  width: 100%;
  padding: 14px 16px 14px 44px;
  font: inherit;
  font-size: 15px;
  color: var(--fg);
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  outline: none;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}
.search input:focus {
  border-color: var(--cobalt);
  box-shadow: 0 0 0 3px rgba(1, 43, 255, 0.12);
}
.search::before {
  content: "";
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px; height: 16px;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='%235a6678' stroke-width='2' viewBox='0 0 24 24'><circle cx='11' cy='11' r='7'/><path d='M21 21l-4.3-4.3'/></svg>") no-repeat center / contain;
}

/* ---------- Sections / Cards ---------- */

.section + .section { margin-top: 36px; }
.section__title {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin: 0 0 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--midnight);
}
.section__title .count {
  color: var(--muted);
  font-size: 12px;
}

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

.card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 20px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--fg);
  text-decoration: none;
  transition: transform 120ms ease, box-shadow 120ms ease, border-color 120ms ease;
}
.card:hover {
  transform: translateY(-2px);
  border-color: var(--cobalt);
  box-shadow: var(--shadow-md);
  text-decoration: none;
}
.card:focus-visible {
  outline: 3px solid rgba(1, 43, 255, 0.35);
  outline-offset: 2px;
}
.card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.card__tag {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--cobalt);
}
.card__arrow {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 14px;
  transition: transform 120ms ease, color 120ms ease;
}
.card:hover .card__arrow {
  transform: translateX(2px);
  color: var(--cobalt);
}
.card__title {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.3;
}
.card__desc {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
}

/* ---------- Empty state ---------- */

.empty {
  padding: 40px;
  text-align: center;
  background: var(--card-bg);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  color: var(--muted);
}

/* ---------- Login ---------- */

.auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: var(--midnight);
  color: var(--off-white);
}
.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--midnight);
  border: 1px solid rgba(245, 251, 255, 0.12);
  border-radius: var(--radius);
  padding: 40px 32px;
  text-align: center;
}
.auth-card__logo {
  height: 36px;
  margin-bottom: 24px;
}
.auth-card h1 {
  margin: 0 0 8px;
  font-size: 24px;
  font-weight: 700;
}
.auth-card h1 .accent { color: var(--plasma); }
.auth-card p {
  color: rgba(245, 251, 255, 0.7);
  font-size: 14px;
  margin: 0 0 28px;
}
.btn-google {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  padding: 14px 16px;
  background: var(--off-white);
  color: var(--midnight);
  border: 1px solid var(--off-white);
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: background 120ms ease, transform 120ms ease;
}
.btn-google:hover {
  background: #ffffff;
  transform: translateY(-1px);
  text-decoration: none;
}
.btn-google__icon {
  width: 20px;
  height: 20px;
}
.auth-footer {
  margin-top: 24px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: rgba(245, 251, 255, 0.45);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.alert {
  background: rgba(255, 127, 0, 0.12);
  color: var(--tangerine);
  border: 1px solid rgba(255, 127, 0, 0.35);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  margin-bottom: 20px;
}

/* ---------- Small screens ---------- */

@media (max-width: 640px) {
  .site-header__nav { gap: 12px; }
  .user-chip span:not(.user-chip__dot) { display: none; }
  main { padding: 24px 16px 60px; }
  .page-header h1 { font-size: 26px; }
}
