:root {
  --bg: #0e0f12;
  --surface: #16181d;
  --border: #262a31;
  --text: #e7e9ee;
  --muted: #8b919c;
  --accent: #7aa2ff;
}

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

html, body { height: 100%; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

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

.wrap {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: 0 20px;
}

header.nav {
  border-bottom: 1px solid var(--border);
}
header.nav .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 64px;
}
header.nav .brand { color: var(--text); font-weight: 600; letter-spacing: -0.01em; }
header.nav nav a { color: var(--muted); margin-left: 20px; font-size: 0.95rem; }
header.nav nav a:hover { color: var(--text); text-decoration: none; }

main { flex: 1; }

.hero { padding: 96px 0 64px; }
.hero h1 {
  font-size: clamp(2.5rem, 7vw, 4rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
  font-weight: 700;
}
.hero p {
  color: var(--muted);
  font-size: 1.15rem;
  margin-top: 16px;
  max-width: 34em;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  padding-bottom: 64px;
}
.card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  color: var(--text);
  transition: border-color 0.15s, transform 0.15s;
}
.card:hover { border-color: var(--accent); transform: translateY(-2px); text-decoration: none; }
.card h2 { font-size: 1.1rem; font-weight: 600; }
.card p { color: var(--muted); font-size: 0.95rem; margin-top: 6px; }

footer {
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.85rem;
}
footer .wrap { padding-top: 24px; padding-bottom: 24px; }

/* Password gate */
#content { display: none; flex: 1; flex-direction: column; }
html.unlocked #content { display: flex; }
html.unlocked .gate { display: none; }

.gate {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.gate-box {
  width: 100%;
  max-width: 360px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px 24px;
}
.gate-box h1 { font-size: 1.4rem; letter-spacing: -0.01em; }
.gate-sub { color: var(--muted); font-size: 0.95rem; margin: 4px 0 18px; }
.gate-box input, .gate-box button {
  width: 100%;
  font: inherit;
  border-radius: 8px;
  padding: 10px 12px;
}
.gate-box input {
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
}
.gate-box input:focus { outline: none; border-color: var(--accent); }
.gate-box button {
  margin-top: 10px;
  background: var(--accent);
  color: #0e0f12;
  border: 0;
  font-weight: 600;
  cursor: pointer;
}
.gate-box input:disabled, .gate-box button:disabled { opacity: 0.5; cursor: not-allowed; }
.gate-msg { color: #ff8a8a; font-size: 0.9rem; margin-top: 12px; min-height: 1.4em; }
