@font-face {
  font-family: "Space Grotesk";
  src: url("/fonts/space-grotesk-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Space Grotesk";
  src: url("/fonts/space-grotesk-500.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "Space Grotesk";
  src: url("/fonts/space-grotesk-700.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

:root {
  --bg: #0b0e12;
  --surface: #11151b;
  --surface-2: #161b23;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #e8edf3;
  --muted: #8e9aa9;
  --accent: #5ab5ff;
  --accent-dim: rgba(90, 181, 255, 0.14);
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Space Grotesk", system-ui, sans-serif;
  line-height: 1.65;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--accent-dim); color: var(--text); }

/* ---------- Header ---------- */

header {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid var(--border);
  background: rgba(11, 14, 18, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.header-inner {
  max-width: 820px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

a.brand {
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

a.brand .mark {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: linear-gradient(135deg, var(--accent), #2f7fc4);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #0b0e12;
  font-weight: 700;
  font-size: 0.85rem;
}

nav {
  display: flex;
  gap: 1.5rem;
}

nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  transition: color 0.15s ease;
}

nav a:hover, nav a[aria-current="page"] { color: var(--text); }

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

main {
  max-width: 820px;
  width: 100%;
  margin: 0 auto;
  padding: 3.5rem 1.5rem 5rem;
  flex: 1;
}

h1 {
  font-size: clamp(2rem, 5vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 0.75rem;
}

h2 {
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 2.75rem 0 1rem;
}

p.lead {
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 56ch;
  margin-bottom: 2.5rem;
}

p { margin-bottom: 0.9rem; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }

ul { margin: 0 0 1rem 1.3rem; }
ul li { margin-bottom: 0.55rem; }

/* ---------- Home cards ---------- */

.card-list {
  list-style: none;
  margin: 0;
  display: grid;
  gap: 1rem;
}

.card-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.4rem 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  color: var(--text);
  text-decoration: none;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.card-list a:hover {
  border-color: var(--border-strong);
  background: var(--surface-2);
}

.card-list a:active { transform: scale(0.99); }

.card-list .title { font-weight: 700; font-size: 1.1rem; letter-spacing: -0.01em; }
.card-list .desc { display: block; color: var(--muted); font-size: 0.92rem; margin-top: 0.2rem; }
.card-list .arrow { color: var(--muted); font-size: 1.2rem; flex-shrink: 0; transition: transform 0.15s ease, color 0.15s ease; }
.card-list a:hover .arrow { transform: translateX(4px); color: var(--accent); }

/* ---------- Rules ---------- */

.rule {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.25rem 1.4rem;
  margin-bottom: 0.9rem;
}

.rule h3 {
  font-size: 1.08rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 0.4rem;
}

.rule p { color: var(--muted); font-size: 0.96rem; margin-bottom: 0.6rem; }
.rule p:last-of-type { margin-bottom: 0; }

.punish {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.85rem;
}

.punish span {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.2rem 0.7rem;
  white-space: nowrap;
}

.punish span.severe {
  color: var(--accent);
  background: var(--accent-dim);
  border-color: transparent;
}

/* ---------- Callout ---------- */

.note {
  background: var(--accent-dim);
  border: 1px solid rgba(90, 181, 255, 0.35);
  border-radius: 12px;
  padding: 0.9rem 1.2rem;
  margin: 1.5rem 0;
  font-size: 0.95rem;
}

/* ---------- Keys ---------- */

kbd {
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  border-bottom-width: 2px;
  border-radius: 6px;
  padding: 0.1rem 0.5rem;
  font-family: ui-monospace, Consolas, monospace;
  font-size: 0.88em;
  color: var(--text);
}

/* ---------- Footer ---------- */

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

.footer-inner {
  max-width: 820px;
  margin: 0 auto;
  padding: 0 0.25rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-inner a { color: var(--muted); }
.footer-inner a:hover { color: var(--text); }

/* ---------- Mobile ---------- */

@media (max-width: 640px) {
  main { padding-top: 2.5rem; }
  .rule { padding: 1.1rem 1.15rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
