:root {
  --bg: #0f1419;
  --bg2: #171d25;
  --card: #1c2430;
  --line: rgba(255,255,255,.08);
  --text: #e8eef6;
  --muted: #9aa8b8;
  --accent: #3dd6c6;
  --accent2: #f0b429;
  --danger: #f07178;
  --ok: #7fd99a;
  --radius: 16px;
  --font: "Outfit", system-ui, sans-serif;
  --display: "Literata", Georgia, serif;
  --max: 1080px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  background:
    radial-gradient(900px 500px at 10% -10%, rgba(61,214,198,.18), transparent 55%),
    radial-gradient(700px 400px at 100% 0%, rgba(240,180,41,.12), transparent 50%),
    var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.55;
}
a { color: inherit; text-decoration: none; }
.wrap { width: min(100% - 2rem, var(--max)); margin-inline: auto; }

.topbar {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(15,20,25,.82);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  min-height: 68px;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.logo { display: flex; align-items: center; gap: .75rem; }
.logo-mark {
  width: 40px; height: 40px; border-radius: 12px;
  display: grid; place-items: center;
  background: linear-gradient(145deg, #1a3a3a, #0d5c56);
  color: var(--accent); font-weight: 800; font-size: .85rem;
}
.logo-text { display: flex; flex-direction: column; gap: .05rem; }
.logo-text strong { font-size: 1rem; }
.logo-text small { color: var(--muted); font-size: .72rem; }

.nav { display: flex; align-items: center; gap: .9rem; }
.nav > a { font-weight: 600; font-size: .92rem; color: var(--muted); }
.nav > a:hover { color: var(--text); }
.nav-btn {
  display: none; width: 42px; height: 42px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--card); cursor: pointer;
  flex-direction: column; justify-content: center; align-items: center; gap: 5px;
}
.nav-btn span { width: 16px; height: 2px; background: var(--text); display: block; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: .65rem 1.1rem; border-radius: 999px; font-weight: 700; font-size: .9rem;
  border: 1px solid transparent; cursor: pointer;
}
.btn-main { background: var(--accent); color: #062a28; }
.btn-ghost { border-color: var(--line); background: transparent; color: var(--text); }
.btn-warn { background: var(--accent2); color: #1a1200; }

.main { padding: 1.5rem 0 3rem; }

.hero {
  padding: 3.5rem 0 2.5rem;
}
.hero h1 {
  font-family: var(--display);
  font-size: clamp(2rem, 5vw, 3.1rem);
  line-height: 1.12; margin: 0 0 .8rem; max-width: 14ch;
}
.hero p { color: var(--muted); max-width: 36em; font-size: 1.05rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.4rem; }
.badge {
  display: inline-block; font-size: .75rem; font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase; color: var(--accent); margin-bottom: .8rem;
}

.grid { display: grid; gap: 1rem; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem 1.35rem;
}
.card h2, .card h3 { margin: 0 0 .45rem; font-size: 1.1rem; }
.card p { margin: 0; color: var(--muted); font-size: .95rem; }
.card .meta { color: var(--accent2); font-size: .78rem; font-weight: 700; margin-bottom: .5rem; }

.section { margin-top: 2.2rem; }
.section-head { margin-bottom: 1rem; }
.section-head h2 { font-family: var(--display); font-size: 1.55rem; margin: 0 0 .3rem; }
.section-head p { margin: 0; color: var(--muted); }

.form { display: grid; gap: .9rem; max-width: 420px; }
.form label { display: grid; gap: .35rem; font-weight: 600; font-size: .9rem; }
.form input, .form select, .form textarea {
  font: inherit; padding: .75rem .9rem; border-radius: 12px;
  border: 1px solid var(--line); background: var(--bg2); color: var(--text);
}
.form textarea { min-height: 110px; resize: vertical; }

.flash {
  margin: 1rem 0; padding: .85rem 1rem; border-radius: 12px; font-weight: 600;
}
.flash-ok { background: rgba(127,217,154,.15); color: var(--ok); }
.flash-err { background: rgba(240,113,120,.15); color: var(--danger); }

.quiz-q { font-size: 1.15rem; font-weight: 600; margin-bottom: 1rem; }
.opts { display: grid; gap: .65rem; }
.opt {
  display: flex; gap: .75rem; align-items: flex-start;
  padding: .9rem 1rem; border-radius: 12px; border: 1px solid var(--line);
  background: var(--bg2); cursor: pointer;
}
.opt:has(input:checked) { border-color: var(--accent); background: rgba(61,214,198,.08); }
.opt input { margin-top: .25rem; }

.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th, .table td { text-align: left; padding: .65rem .4rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { color: var(--muted); font-weight: 600; }

.footer {
  border-top: 1px solid var(--line);
  padding: 2rem 0 1.5rem;
  margin-top: 2rem;
  color: var(--muted);
}
.footer-inner { display: flex; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; margin-bottom: 1rem; }
.footer strong { color: var(--text); display: block; margin-bottom: .35rem; }
.footer-links { display: flex; flex-direction: column; gap: .35rem; }
.footer-note { font-size: .82rem; opacity: .75; }

@media (max-width: 860px) {
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .nav-btn { display: flex; }
  .nav {
    position: fixed; inset: 68px 0 auto 0;
    background: var(--bg2); border-bottom: 1px solid var(--line);
    flex-direction: column; align-items: stretch; padding: 1rem;
    transform: translateY(-120%); opacity: 0; pointer-events: none;
    transition: .2s ease;
  }
  .nav.open { transform: none; opacity: 1; pointer-events: auto; }
  .nav > a { padding: .7rem .4rem; }
}
