:root {
  --bg: #0f1419;
  --card: #1a2332;
  --border: #2e3d52;
  --text: #e8ecf1;
  --muted: #8b9cb3;
  --accent: #4da3ff;
  --green: #4caf50;
  --red: #e94560;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

@font-face {
  font-family: 'ABAT';
  src: url('../fonts/ABAT.ttf?v=6') format('truetype');
  font-display: swap;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: 920px; margin: 0 auto; padding: 0 16px 32px; }

.site-header {
  background: #141c28;
  border-bottom: 1px solid var(--border);
  padding: 12px 0;
  margin-bottom: 20px;
}

.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 0;
}

.site-logo {
  font-weight: 800;
  font-size: 1.35rem;
  color: var(--text);
  letter-spacing: 0.02em;
}

.site-logo span { color: var(--accent); }

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  font-size: 0.9rem;
}

.site-nav a { color: var(--muted); }
.site-nav a.active { color: var(--text); font-weight: 600; }

.hero {
  text-align: center;
  padding: 8px 0 24px;
}

.hero h1 {
  margin: 0 0 8px;
  font-size: clamp(1.5rem, 4vw, 2rem);
}

.hero p { color: var(--muted); margin: 0; max-width: 560px; margin-inline: auto; }

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 18px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 10px;
  border: none;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}

.btn-primary { background: var(--accent); color: #071018; }
.btn-green { background: var(--green); color: #fff; }
.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn:hover { filter: brightness(1.08); text-decoration: none; }

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}

@media (max-width: 700px) {
  .grid-2 { grid-template-columns: 1fr; }
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
}

.card h2 {
  margin: 0 0 8px;
  font-size: 1.1rem;
}

.card p { margin: 0 0 12px; color: var(--muted); font-size: 0.9rem; }

.card.featured {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(77, 163, 255, 0.2);
}

.editor-card { margin-bottom: 20px; }

.toolbar-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.toolbar-row .btn { padding: 8px 14px; font-size: 0.85rem; }

#editor {
  width: 100%;
  min-height: 160px;
  padding: 14px;
  font-family: 'ABAT', 'Segoe UI', sans-serif;
  font-size: 1.35rem;
  line-height: 1.55;
  background: #0d1218;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 12px;
  resize: vertical;
}

#status {
  margin-top: 8px;
  font-size: 0.85rem;
  color: var(--muted);
  min-height: 1.2em;
}

.links-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.links-row a {
  padding: 8px 12px;
  background: #243044;
  border-radius: 8px;
  font-size: 0.85rem;
}

.foot {
  text-align: center;
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 3px 8px;
  border-radius: 6px;
  background: #243044;
  color: var(--accent);
  margin-bottom: 8px;
}

.badge.desktop { color: #81c784; }
