:root {
  --bg: #eef2f7;
  --card: #ffffff;
  --ink: #16324f;
  --muted: #5a6b7d;
  --line: #dbe4ee;
  --accent: #2f5d8a;
  --accent-2: #c07a1e;
  --ok: #1c7c4a;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font: 16px/1.6 -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: 1040px; margin: 0 auto; padding: 0 20px; }

header.site {
  background: linear-gradient(160deg, #16324f, #24507a 60%, #2f5d8a);
  color: #fff;
  padding: 18px 0;
}

header.site .wrap { display: flex; align-items: center; gap: 18px; }

.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 20px; }
.brand .logo {
  width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center;
  background: #f2c14e; color: #16324f; font-weight: 800; font-size: 15px;
}

nav.top { margin-left: auto; display: flex; gap: 18px; font-size: 15px; }
nav.top a { color: #dbe7f3; }
nav.top a:hover { color: #fff; }

.hero { padding: 56px 0 56px; background: linear-gradient(160deg, #16324f, #24507a 60%, #2f5d8a); }
.hero .wrap { display: grid; grid-template-columns: 1.1fr .9fr; gap: 34px; align-items: center; }
.hero h1 { color: #fff; font-size: 40px; line-height: 1.15; margin: 0 0 14px; }
.hero p.lead { color: #d6e6f5; font-size: 18px; margin: 0 0 22px; max-width: 520px; }
.hero .actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero .shot {
  background: #fff; border-radius: 18px; padding: 10px; box-shadow: 0 20px 50px rgba(8, 20, 34, .35);
  transform: rotate(-1.5deg);
}
.hero .shot img { width: 100%; display: block; border-radius: 12px; }

.btn {
  display: inline-block; padding: 12px 20px; border-radius: 12px; font-weight: 600; font-size: 15px;
}
.btn.primary { background: #f2c14e; color: #16324f; }
.btn.primary:hover { background: #f7d27a; text-decoration: none; }
.btn.ghost { border: 1px solid #7ba0c4; color: #eaf3fb; }
.btn.ghost:hover { background: rgba(255, 255, 255, .08); text-decoration: none; }

section { padding: 40px 0; }
h2 { font-size: 28px; margin: 0 0 8px; }
.sub { color: var(--muted); margin: 0 0 24px; }

.grid { display: grid; gap: 16px; }
.grid.c3 { grid-template-columns: repeat(3, 1fr); }
.grid.c2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: var(--card); border-radius: 16px; padding: 20px 22px;
  box-shadow: 0 6px 22px rgba(16, 32, 48, .07); border: 1px solid #eef2f7;
}
.card h3 { margin: 0 0 6px; font-size: 18px; }
.card p { margin: 0; color: var(--muted); font-size: 15px; }
.card .ico { font-size: 22px; margin-bottom: 8px; }

.roles .card { border-top: 4px solid var(--accent); }
.roles .card.student { border-top-color: var(--accent-2); }
.roles .card.teacher { border-top-color: var(--ok); }

.shots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.shots figure { margin: 0; background: #fff; border-radius: 14px; padding: 8px; box-shadow: 0 8px 24px rgba(16, 32, 48, .08); }
.shots img { width: 100%; display: block; border-radius: 10px; }
.shots figcaption { font-size: 13px; color: var(--muted); padding: 8px 4px 2px; }

.steps { counter-reset: s; display: grid; gap: 12px; }
.steps .step {
  background: #fff; border-radius: 14px; padding: 16px 18px 16px 58px; position: relative;
  border: 1px solid #eef2f7;
}
.steps .step::before {
  counter-increment: s; content: counter(s);
  position: absolute; left: 16px; top: 14px; width: 30px; height: 30px; border-radius: 50%;
  background: var(--accent); color: #fff; display: grid; place-items: center; font-weight: 700;
}

table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 14px; overflow: hidden; font-size: 15px; }
th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: #f4f7fa; font-size: 13px; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); }
tr:last-child td { border-bottom: none; }

code { background: #f1f5f9; padding: 2px 6px; border-radius: 6px; font-size: 14px; }

footer.site { padding: 30px 0 40px; color: var(--muted); font-size: 14px; }
footer.site .wrap { border-top: 1px solid var(--line); padding-top: 18px; display: flex; gap: 12px; flex-wrap: wrap; }

.note { background: #fff8e6; border-left: 4px solid var(--accent-2); padding: 12px 16px; border-radius: 10px; font-size: 15px; }

@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .grid.c3, .grid.c2, .shots { grid-template-columns: 1fr; }
  .hero h1 { font-size: 30px; }
}

/* --- вход на сайт, форум, история --- */
.site-head { display:flex; align-items:center; gap:14px; padding:10px 0; }
.site-head .who { margin-left:auto; display:flex; align-items:center; gap:10px; font-size:14px; color:#dbe7f3; }
.site-head .who b { color:#fff; }
.chip-btn { border:1px solid #7ba0c4; color:#eaf3fb; background:transparent; border-radius:10px;
  padding:6px 12px; font:inherit; font-size:14px; cursor:pointer; }
.chip-btn:hover { background:rgba(255,255,255,.08); }

.auth-wrap { min-height:60vh; display:grid; place-items:center; padding:30px 0; }
.auth-card { width:min(420px, 100%); background:#fff; border-radius:18px; padding:26px 26px 22px;
  box-shadow:0 14px 40px rgba(16,32,48,.14); }
.auth-card h1 { margin:0 0 4px; font-size:22px; }
.auth-card p { margin:0 0 18px; color:var(--muted); font-size:14px; }
.field { margin-bottom:12px; }
.field label { display:block; font-size:13px; color:var(--muted); margin-bottom:4px; }
.field input, .field select, .field textarea { width:100%; padding:10px 12px; border:1px solid var(--line);
  border-radius:10px; font:inherit; background:#fff; }
.field textarea { min-height:96px; resize:vertical; }
.form-error { color:#b42318; font-size:14px; margin:8px 0 0; min-height:18px; }
.form-ok { color:var(--ok); font-size:14px; }

.filters { display:flex; gap:8px; flex-wrap:wrap; margin:0 0 16px; }
.filter { border:1px solid var(--line); background:#fff; border-radius:999px; padding:7px 14px;
  font:inherit; font-size:14px; cursor:pointer; color:var(--muted); }
.filter.active { background:var(--accent); border-color:var(--accent); color:#fff; }

.post { background:#fff; border-radius:14px; padding:16px 18px; margin-bottom:12px;
  border:1px solid #eef2f7; box-shadow:0 4px 14px rgba(16,32,48,.05); cursor:pointer; }
.post:hover { border-color:#c9d8e8; }
.post h3 { margin:0 0 6px; font-size:17px; }
.post .meta { display:flex; gap:10px; flex-wrap:wrap; align-items:center; font-size:13px; color:var(--muted); }
.post .preview { margin-top:8px; color:var(--muted); font-size:14px; }
.badge { display:inline-block; padding:2px 9px; border-radius:999px; font-size:12px; font-weight:600; }
.badge.bug { background:#fde8e6; color:#b42318; }
.badge.idea { background:#e8f0fb; color:#1d4f8f; }
.badge.s-new { background:#eef2f7; color:#41556b; }
.badge.s-planned { background:#fff4d6; color:#8a6100; }
.badge.s-in_work { background:#e5f0ff; color:#1652a0; }
.badge.s-done { background:#e3f5ea; color:#1c7c4a; }
.badge.s-rejected { background:#f2f2f2; color:#777; }

.post-detail { background:#fff; border-radius:16px; padding:20px 22px; border:1px solid #eef2f7; }
.post-detail h2 { margin:0 0 8px; font-size:20px; }
.reply { border-top:1px solid var(--line); padding:12px 0; font-size:15px; }
.reply .who { font-size:13px; color:var(--muted); margin-bottom:4px; }
.status-row { display:flex; gap:8px; flex-wrap:wrap; align-items:center; margin:14px 0 0; }

.timeline { position:relative; margin:0; padding:0 0 0 22px; list-style:none; }
.timeline::before { content:""; position:absolute; left:6px; top:4px; bottom:4px; width:2px; background:var(--line); }
.timeline li { position:relative; margin-bottom:16px; }
.timeline li::before { content:""; position:absolute; left:-21px; top:6px; width:10px; height:10px;
  border-radius:50%; background:var(--accent); box-shadow:0 0 0 3px #e7eef7; }
.timeline .ver { font-weight:700; }
.timeline .date { color:var(--muted); font-size:13px; margin-left:8px; }
.timeline .tl-note { font-size:14.5px; color:#3c4d5f; margin-top:3px; }
.tabs { display:flex; gap:8px; margin-bottom:16px; }

/* кнопки сайта */
.btn { display:inline-block; border:1px solid transparent; border-radius:12px; padding:11px 18px;
  font:inherit; font-weight:600; font-size:15px; cursor:pointer; text-align:center; }
.btn-primary { background:#16324f; color:#fff; border-color:#16324f; }
.btn-primary:hover { background:#1d4067; }
.btn-ghost { background:#fff; color:var(--ink); border-color:var(--line); }
.btn-ghost:hover { border-color:#b9cbdd; }
