:root {
  color-scheme: dark;
  --bg: #07111f;
  --surface: #111f34;
  --ink: #eef5ff;
  --muted: #aabbd0;
  --line: #2b4768;
  --blue: #2563eb;
  --teal: #20b8aa;
  --danger: #fb923c;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px clamp(18px, 5vw, 72px);
  background: rgba(7,17,31,.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 24px; color: var(--blue); }
.brand span { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--blue); color: white; }
.topbar nav { display: flex; align-items: center; gap: 14px; color: var(--muted); }
.topbar select { border: 1px solid var(--line); border-radius: 8px; padding: 9px 12px; background: var(--surface); color: var(--ink); }

.shell { max-width: 1120px; margin: 0 auto; padding: 38px 18px 64px; }
.hero {
  padding: clamp(30px, 7vw, 76px) 0 30px;
}
.eyebrow { margin: 0 0 10px; color: var(--blue); font-weight: 700; }
h1 { margin: 0; font-size: clamp(36px, 7vw, 68px); line-height: 1; letter-spacing: 0; }
h2 { margin: 0; font-size: 22px; letter-spacing: 0; }
p { line-height: 1.55; }
.hero p:not(.eyebrow) { max-width: 680px; color: var(--muted); font-size: 18px; }

.search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  max-width: 760px;
  margin-top: 24px;
}
.search input, .contact-form input, .contact-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px 16px;
  background: var(--surface);
  color: var(--ink);
}
button {
  border: 0;
  border-radius: 8px;
  padding: 13px 18px;
  background: var(--blue);
  color: white;
  font-weight: 750;
  cursor: pointer;
}
button.secondary { background: #172b49; color: #93c5fd; border: 1px solid #426fba; }
button.danger { background: #2b2113; color: var(--danger); border: 1px solid #9a5b2d; }

.grid { display: grid; gap: 18px; margin-bottom: 18px; }
.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.panel, .contact {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 12px 32px rgba(39, 80, 140, .08);
}
.panel { margin-bottom: 18px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.hidden { display: none !important; }

.article-list { display: grid; gap: 10px; }
.article-link, .category-card {
  display: block;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #14243b;
}
.article-link strong, .category-card strong { display: block; margin-bottom: 5px; }
.article-link span, .category-card span, .muted { color: var(--muted); font-size: 14px; }
.category-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.category-card { min-height: 124px; }
.category-card i { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; margin-bottom: 10px; background: #123b42; color: #5eead4; font-style: normal; font-weight: 800; }

.article-view { max-width: 860px; margin-left: auto; margin-right: auto; }
.article-view .meta { color: var(--muted); margin: 8px 0 18px; }
.article-content { line-height: 1.75; }
.article-content a { color: var(--blue); text-decoration: underline; }
.feedback { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }

.contact {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(280px, 1.1fr);
  gap: 20px;
  margin-top: 18px;
}
.contact-form { display: grid; gap: 10px; }
.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  max-width: 360px;
  padding: 12px 14px;
  border-radius: 8px;
  background: #122033;
  color: white;
  opacity: 0;
  transform: translateY(10px);
  transition: .2s ease;
}
.toast.show { opacity: 1; transform: translateY(0); }

@media (max-width: 820px) {
  .topbar { align-items: flex-start; flex-direction: column; }
  .topbar nav { width: 100%; overflow-x: auto; }
  .two, .contact { grid-template-columns: 1fr; }
  .category-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 540px) {
  .search { grid-template-columns: 1fr; }
  .category-grid { grid-template-columns: 1fr; }
}
