:root {
  --purple: #7f4989;
  --purple-light: #b383bd;
  --bg: #1d1629;
  --card: #2a2139;
  --card-hover: #33284a;
  --ink: #2a2140;
  --text: #f3eef8;
  --muted: #b3a9c4;
  --line: #3d3152;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.5 system-ui, "Segoe UI", Roboto, sans-serif; }
a { color: var(--purple-light); }

.hero {
  text-align: center; padding: 48px 16px 72px; color: var(--ink);
  background:
    linear-gradient(to bottom, rgba(29, 22, 41, 0) 70%, var(--bg) 100%),
    #9ec4e8 url("/background.jpg") center / cover no-repeat;
}
.logo { width: min(360px, 80vw); height: auto; }
h1 {
  font: 900 clamp(32px, 6vw, 60px)/1.1 "Arial Black", Arial, sans-serif; color: #fff; margin: 18px 0 8px;
  text-shadow: 4px 4px 0 var(--purple);
}
.tag { font-size: clamp(16px, 2.4vw, 20px); margin: 0 auto 24px; max-width: 560px; font-weight: 500; }
.cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.btn {
  display: inline-block; padding: 12px 22px; border-radius: 999px; text-decoration: none; font-weight: 700;
  background: rgba(255, 255, 255, .88); color: var(--purple); border: 2px solid var(--purple);
}
.btn.primary { background: var(--purple); color: #fff; }
.btn:hover { transform: translateY(-1px); box-shadow: 0 4px 14px rgba(94, 52, 102, .35); }

main { max-width: 1180px; margin: 0 auto; padding: 8px 16px 40px; }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
h2 { margin: 0; font-size: 24px; color: #fff; }
h2 span { font-size: 15px; color: var(--muted); font-weight: 500; }
.tools { display: flex; gap: 8px; flex-wrap: wrap; flex: 1; justify-content: flex-end; }
.tools input, .tools select {
  font: inherit; padding: 10px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--text);
}
.tools input::placeholder { color: var(--muted); }
.tools input:focus, .tools select:focus { outline: 2px solid var(--purple-light); outline-offset: 1px; }
.tools input { flex: 1; min-width: 200px; max-width: 380px; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; }
.card {
  display: block; background: var(--card); border-radius: 14px; overflow: hidden; text-decoration: none; color: var(--text);
  border: 1px solid var(--line); transition: transform .15s, background .15s, border-color .15s;
}
.card:hover { transform: translateY(-3px); background: var(--card-hover); border-color: var(--purple); }
.card img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; background: #3a3050; }
.card .meta { padding: 10px 12px 12px; }
.card b { display: block; font-size: 15px; line-height: 1.3; }
.card small { color: var(--muted); font-size: 13px; }
.card .pill { display: inline-block; margin-left: 6px; font-size: 11px; color: #fff; background: var(--purple); border-radius: 999px; padding: 1px 8px; vertical-align: 1px; }
.none { background: var(--card); border: 1px solid var(--line); padding: 16px; border-radius: 12px; text-align: center; }

.hero-small { padding: 24px 16px 40px; }
.hero-small .logo { width: min(220px, 60vw); }
.doc { max-width: 760px; }
.doc-title { font-size: clamp(28px, 5vw, 40px); margin-top: 0; }
.doc h2 { font-size: 20px; margin: 28px 0 8px; }
.doc p, .doc li { color: var(--text); }
.doc .muted { color: var(--muted); }
.doc .nl { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; }
.doc code { background: var(--card); padding: 1px 6px; border-radius: 4px; }
.doc .btn { margin-top: 16px; }

footer { text-align: center; padding: 28px 16px 44px; color: var(--muted); border-top: 1px solid var(--line); margin-top: 16px; }
footer .small { font-size: 12px; max-width: 640px; margin: 8px auto 0; }

@media (max-width: 600px) {
  .hero { padding: 28px 16px 56px; }
  .tools input { max-width: none; }
}
