@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700;800&family=Manrope:wght@400;500;600;700;800&display=swap');

:root {
  color-scheme: light;
  --bg: #f5f6ff;
  --bg-elevated: #ffffff;
  --panel: #ffffff;
  --ink: #0f0f1a;
  --muted: #5b5e7a;
  --line: #dde0f5;
  --brand: #4338ca;
  --brand-dark: #3730a3;
  --brand-bright: #6366f1;
  --brand-light: #818cf8;
  --brand-glow: rgba(99, 102, 241, 0.18);
  --soft: #eef0ff;
  --accent: #c03667;
  --warning: #92400e;
  --danger: #991b1b;
  --ok: #166534;
  --focus: #6366f1;
  --surface-shadow: 0 2px 16px rgba(67, 56, 202, 0.08);
  --font-body: "Manrope", "Avenir Next", "Segoe UI", sans-serif;
  --font-display: "Space Grotesk", "Avenir Next", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background:
    radial-gradient(circle at 4% 0%, rgba(99, 102, 241, 0.13) 0%, transparent 38%),
    radial-gradient(circle at 96% 8%, rgba(129, 140, 248, 0.10) 0%, transparent 32%),
    radial-gradient(circle at 50% 100%, rgba(67, 56, 202, 0.07) 0%, transparent 50%),
    var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.55;
  font-size: 15px;
}

a { color: inherit; }

.skip-link {
  position: absolute;
  left: 10px;
  top: -44px;
  z-index: 1000;
  padding: 10px 12px;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  border: 2px solid var(--focus);
  text-decoration: none;
  font-weight: 700;
}

.skip-link:focus-visible { top: 10px; }

/* ── Topbar ─────────────────────────────────────────────── */

.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 24px;
  height: 60px;
  background: rgba(11, 15, 26, 0.84);
  border-bottom: 1px solid rgba(99, 102, 241, 0.18);
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  box-shadow: 0 1px 0 rgba(99, 102, 241, 0.12), 0 4px 24px rgba(11, 15, 26, 0.22);
}

/* ── Brand ──────────────────────────────────────────────── */

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font: 800 17px/1.1 var(--font-display);
  letter-spacing: -0.03em;
  color: #ffffff;
  text-decoration: none;
}

.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: linear-gradient(145deg, #3730a3 0%, #4338ca 48%, #6366f1 100%);
  display: inline-grid;
  place-items: center;
  box-shadow: 0 0 0 1px rgba(99, 102, 241, 0.4), 0 4px 16px rgba(67, 56, 202, 0.45);
  flex-shrink: 0;
}

/* Shield + check icon via clip-path */
.brand-mark::before {
  content: "";
  display: block;
  width: 14px;
  height: 15px;
  background: rgba(255, 255, 255, 0.95);
  clip-path: polygon(
    50% 0%,
    100% 18%,
    100% 52%,
    50% 100%,
    0% 52%,
    0% 18%
  );
}

.brand-mark::after {
  content: "";
  position: absolute;
  width: 7px;
  height: 5px;
  border-left: 2px solid #4338ca;
  border-bottom: 2px solid #4338ca;
  transform: rotate(-45deg) translate(1px, -1px);
}

/* ── Lang switch & topbar buttons ───────────────────────── */

.lang-switch {
  display: flex;
  gap: 8px;
  align-items: center;
}

.lang-switch a {
  min-height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  padding: 7px 11px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.75);
  font-weight: 650;
  text-decoration: none;
  cursor: pointer;
  font-size: 14px;
  transition: border-color 140ms ease, background 140ms ease, transform 140ms ease;
}

.lang-switch a[aria-current="true"] {
  border-color: var(--brand-light);
  color: var(--brand-light);
  background: rgba(99, 102, 241, 0.14);
}

.lang-switch a:hover {
  border-color: rgba(129, 140, 248, 0.5);
  background: rgba(99, 102, 241, 0.12);
  color: #fff;
  transform: translateY(-1px);
}

/* ── Buttons ────────────────────────────────────────────── */

.button, button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 8px 14px;
  background: #ffffff;
  color: var(--ink);
  font: 650 14px/1 var(--font-body);
  text-decoration: none;
  cursor: pointer;
  transition: border-color 140ms ease, transform 140ms ease, background 140ms ease, box-shadow 140ms ease;
  box-shadow: 0 1px 3px rgba(67, 56, 202, 0.06);
}

.button:hover,
button:hover {
  border-color: #b3b8e8;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(67, 56, 202, 0.10);
}

.button.primary, button.primary {
  background: linear-gradient(135deg, #3730a3 0%, #4338ca 55%, #6366f1 100%);
  border-color: transparent;
  color: #ffffff;
  box-shadow: 0 2px 10px rgba(67, 56, 202, 0.35), 0 1px 2px rgba(67, 56, 202, 0.2);
}

.button.primary:hover, button.primary:hover {
  background: linear-gradient(135deg, #312e81 0%, #3730a3 55%, #4338ca 100%);
  box-shadow: 0 6px 20px rgba(67, 56, 202, 0.42), 0 2px 6px rgba(67, 56, 202, 0.24);
  transform: translateY(-2px);
}

.button.secondary {
  background: var(--soft);
  border-color: #c7cbf0;
  color: var(--brand-dark);
}

.button.secondary:hover {
  background: #e4e7ff;
  border-color: var(--brand-bright);
}

button:disabled,
.button[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none;
  box-shadow: none;
}

button:disabled:hover {
  transform: none;
  box-shadow: none;
}

/* ── Shell / layout ─────────────────────────────────────── */

.shell {
  display: grid;
  grid-template-columns: 252px minmax(0, 1fr);
  min-height: calc(100vh - 60px);
}

/* ── Sidebar ────────────────────────────────────────────── */

.sidebar {
  padding: 22px 14px;
  border-right: 1px solid var(--line);
  background: var(--bg-elevated);
  position: sticky;
  top: 60px;
  height: calc(100vh - 60px);
  overflow-y: auto;
}

.side-title {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.nav {
  display: grid;
  gap: 4px;
}

.nav a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 40px;
  padding: 8px 11px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--muted);
  font: 600 14px/1.2 var(--font-body);
  transition: background 120ms ease, color 120ms ease;
}

.nav a.active {
  background: var(--soft);
  color: var(--brand);
  box-shadow: inset 0 0 0 1px rgba(67, 56, 202, 0.12);
}

.nav a:hover:not(.active),
.nav a:focus-visible:not(.active) {
  background: #eef0ff;
  color: var(--brand-dark);
}

/* ── Content area ───────────────────────────────────────── */

.content {
  padding: 30px 32px;
  max-width: 1200px;
  width: 100%;
}

/* ── Hero ───────────────────────────────────────────────── */

.hero {
  display: grid;
  gap: 10px;
  padding: 4px 0 26px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 26px;
}

/* ── Typography ─────────────────────────────────────────── */

h1, h2, h3 {
  font-family: var(--font-display);
  letter-spacing: -0.025em;
}

h1 {
  margin: 0;
  font-size: clamp(28px, 4vw, 50px);
  line-height: 1.06;
  font-weight: 800;
}

h2 {
  margin: 0 0 12px;
  font-size: 22px;
  font-weight: 700;
}

h3 {
  margin: 0 0 8px;
  font-size: 17px;
  font-weight: 700;
}

p { margin: 0 0 12px; }
.muted { color: var(--muted); }

/* ── Grid ───────────────────────────────────────────────── */

.grid {
  display: grid;
  gap: 16px;
}

.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.pricing-card {
  display: grid;
  gap: 16px;
  align-content: space-between;
  min-height: 100%;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--surface-shadow);
}

.pricing-price {
  margin: 0 0 8px;
  color: var(--brand-dark);
  font: 800 25px/1.1 var(--font-display);
}

/* ── Panel / Card ───────────────────────────────────────── */

.panel, .card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px;
  box-shadow: var(--surface-shadow);
  transition: box-shadow 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.panel:hover, .card:hover {
  box-shadow: 0 6px 28px rgba(67, 56, 202, 0.13);
  border-color: rgba(99, 102, 241, 0.28);
  transform: translateY(-1px);
}

/* ── Notice ─────────────────────────────────────────────── */

.notice {
  margin-bottom: 14px;
  border-radius: 10px;
}

.notice.success {
  border-color: #a7f3d0;
  background: #f0fdf4;
}

.notice.warning {
  border-color: #fde68a;
  background: #fffbeb;
}

/* ── Stat ───────────────────────────────────────────────── */

.stat {
  display: grid;
  gap: 5px;
}

.stat strong {
  font-size: 28px;
  font-weight: 800;
  font-family: var(--font-display);
  letter-spacing: -0.03em;
}

.risk-high { color: var(--danger); }
.risk-limited { color: var(--warning); }
.risk-low { color: var(--ok); }

/* ── Forms ──────────────────────────────────────────────── */

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

label {
  display: grid;
  gap: 6px;
  font-weight: 700;
  font-size: 14px;
}

input, select, textarea {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 11px;
  font: inherit;
  background: #ffffff;
  color: var(--ink);
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

input:focus, select:focus, textarea:focus {
  border-color: var(--brand-bright);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.14);
  outline: none;
}

textarea {
  min-height: 94px;
  resize: vertical;
}

.honeypot {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* ── Focus rings ────────────────────────────────────────── */

.button:focus-visible,
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.button:focus:not(:focus-visible),
button:focus:not(:focus-visible),
a:focus:not(:focus-visible),
input:focus:not(:focus-visible),
select:focus:not(:focus-visible),
textarea:focus:not(:focus-visible) {
  outline: none;
}

/* ── Checks ─────────────────────────────────────────────── */

.checks {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin: 10px 0;
}

.checks label {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-weight: 600;
}

.checks input {
  width: auto;
  min-height: auto;
  margin-top: 4px;
  accent-color: var(--brand);
}

/* ── Actions ────────────────────────────────────────────── */

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 14px;
}

/* ── Table ──────────────────────────────────────────────── */

.table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}

.table th, .table td {
  border-bottom: 1px solid var(--line);
  padding: 11px 12px;
  text-align: left;
  vertical-align: top;
}

.table th {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: #f9faff;
}

.table tr:last-child td { border-bottom: 0; }

.table tbody tr:hover td { background: #fafbff; }

/* ── Register controls ──────────────────────────────────── */

.register-controls {
  margin-bottom: 14px;
}

.register-quick-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 14px;
}

.quick-filter {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid #d0d4f0;
  background: #fff;
  text-decoration: none;
  color: var(--muted);
  font-weight: 650;
  font-size: 13px;
  transition: border-color 120ms ease, background 120ms ease, color 120ms ease;
}

.quick-filter:hover {
  border-color: var(--brand-bright);
  color: var(--brand);
  background: var(--soft);
}

.quick-filter.active {
  border-color: var(--brand);
  color: var(--brand);
  background: var(--soft);
}

.register-active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 14px;
}

.active-filter {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--brand-dark);
  border: 1px solid #c7cbf0;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
}

.register-controls-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.register-result-count {
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
}

/* ── Pagination ─────────────────────────────────────────── */

.pagination {
  margin-top: 16px;
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: flex-end;
}

.pagination .button[aria-disabled="true"] {
  opacity: 0.42;
  pointer-events: none;
}

.pagination-pages {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.page-link {
  display: inline-grid;
  place-items: center;
  min-width: 34px;
  min-height: 34px;
  padding: 4px 8px;
  border-radius: 8px;
  border: 1px solid #d4d8f0;
  background: #fff;
  text-decoration: none;
  color: var(--muted);
  font-weight: 700;
  font-size: 14px;
  transition: border-color 120ms ease, background 120ms ease, color 120ms ease;
}

.page-link:hover {
  border-color: var(--brand-bright);
  color: var(--brand);
}

.page-link.active {
  border-color: var(--brand);
  color: var(--brand);
  background: var(--soft);
}

/* ── Badges ─────────────────────────────────────────────── */

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--brand);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.01em;
  border: 1px solid #c7cbf0;
}

.badge.high {
  background: #fef2f2;
  color: var(--danger);
  border-color: #fecaca;
}

.badge.limited {
  background: #fffbeb;
  color: var(--warning);
  border-color: #fde68a;
}

.badge.low {
  background: #f0fdf4;
  color: var(--ok);
  border-color: #bbf7d0;
}

/* ── Roadmap ────────────────────────────────────────────── */

.roadmap {
  display: grid;
  gap: 12px;
}

.roadmap-step {
  border-left: 4px solid var(--brand);
  padding: 12px 14px;
  background: #fff;
  border-radius: 0 9px 9px 0;
  box-shadow: 0 1px 6px rgba(67, 56, 202, 0.07);
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

.roadmap-step:hover {
  border-color: var(--brand-bright);
  box-shadow: 0 3px 14px rgba(67, 56, 202, 0.12);
}

/* ── Ad slot ────────────────────────────────────────────── */

.ad-slot {
  min-height: 92px;
  border: 1px dashed #c7cbf0;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: var(--muted);
  background: #fafbff;
  font-size: 13px;
}

/* ── Footer ─────────────────────────────────────────────── */

.footer {
  padding: 24px 32px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

/* ── SEO section ────────────────────────────────────────── */

.seo-section { max-width: 860px; }

/* ── Export box ─────────────────────────────────────────── */

pre.export-box {
  white-space: pre-wrap;
  overflow: auto;
  background: #0c0e1a;
  color: #e2e5ff;
  padding: 18px;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.6;
  border: 1px solid rgba(99, 102, 241, 0.2);
}

/* ── Responsive ─────────────────────────────────────────── */

@media (max-width: 840px) {
  .topbar {
    height: auto;
    padding: 12px 16px;
    align-items: center;
    flex-wrap: wrap;
  }

  .shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 14px;
  }

  .nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .content {
    padding: 18px 16px;
  }

  .grid.two,
  .grid.three,
  .pricing-grid,
  .form-grid,
  .checks,
  .register-controls-grid {
    grid-template-columns: 1fr;
  }

  .pagination {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  h1 {
    font-size: clamp(24px, 7vw, 38px);
  }
}

@media (max-width: 480px) {
  .brand span { display: none; }
  .lang-switch { gap: 6px; }
  .lang-switch a { padding: 6px 9px; font-size: 13px; }
  .content { padding: 14px 12px; }
  .panel, .card { padding: 14px; border-radius: 10px; }
  .nav { grid-template-columns: 1fr; }
}
