:root {
  --primary: #2c3e50;
  --primary-deep: #1a2530;
  --accent: #00d1c9;
  --accent-edge: #00a8a2;
  --soft: #f7f7f8;
  --paper: #ffffff;
  --muted: #64748b;
  --line: #e5e7eb;
  --danger: #e85d4c;
  --ok: #0f9f6e;
  --radius: 16px;
  --font-display: "Syne", "Manrope", system-ui, sans-serif;
  --font-body: "Manrope", system-ui, sans-serif;
  --font-serif: "Newsreader", Georgia, serif;
  --shadow-nav: 0 8px 30px rgba(0, 180, 216, 0.06);
  --shadow-card: 0 12px 32px rgba(44, 62, 80, 0.08);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--primary);
  background: var(--soft);
  overflow-x: hidden;
}

.page-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 70% 40% at 50% -5%, rgba(0, 209, 201, 0.12), transparent 60%),
    radial-gradient(#e5e7eb 1px, transparent 1px);
  background-size: auto, 16px 16px;
  mask-image: radial-gradient(ellipse 60% 55% at 50% 20%, #000 55%, transparent 100%);
}

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

/* ─── Nav CoreUp-style ─── */
.nav-wrap {
  position: fixed;
  top: 16px;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  justify-content: center;
  padding: 0 12px;
}

.nav {
  width: min(1120px, 100%);
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 14px 0 16px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow-nav);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--primary);
  flex-shrink: 0;
}

.brand-logo {
  height: 28px;
  width: auto;
  display: block;
}

.brand-badge {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--accent-edge);
  background: rgba(0, 209, 201, 0.12);
  border: 1px solid rgba(0, 209, 201, 0.28);
  border-radius: 999px;
  padding: 4px 10px;
}

.nav-links {
  display: none;
  align-items: center;
  gap: 4px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 4px;
  height: 44px;
}

.nav-links a {
  color: var(--primary);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 10px;
  transition: background 0.15s ease;
}

.nav-links a:hover {
  background: var(--soft);
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 42px;
  padding: 0 16px;
  border-radius: 14px;
  background: var(--primary);
  color: #fff;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  box-shadow:
    inset 0 1px 2px rgba(255, 255, 255, 0.2),
    0 1px 0 1px var(--primary-deep),
    0 2px 4px rgba(9, 9, 11, 0.16);
  transition: filter 0.15s ease;
}

.nav-cta:hover {
  filter: brightness(1.06);
}

.shell {
  position: relative;
  z-index: 1;
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 118px 0 64px;
}

/* ─── Hero ─── */
.hero {
  text-align: center;
  padding: 12px 0 36px;
}

.hero-live {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(0, 209, 201, 0.1);
  border: 1px solid rgba(0, 209, 201, 0.22);
  color: var(--accent-edge);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.live-dot {
  position: relative;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

.live-dot::before {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.35;
  animation: ping 1.6s ease-out infinite;
}

.hero h1 {
  margin: 0 auto 16px;
  max-width: 16ch;
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 6vw, 4.4rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 0.98;
  color: var(--primary);
}

.hero h1 em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 600;
  color: var(--accent);
}

.hero-lead {
  margin: 0 auto 28px;
  max-width: 46ch;
  font-size: clamp(15px, 2.2vw, 18px);
  line-height: 1.55;
  font-weight: 500;
  color: var(--muted);
}

.form-card {
  max-width: 720px;
  margin: 0 auto;
  padding: 14px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow-card);
}

.form {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.form input {
  flex: 1 1 240px;
  min-width: 0;
  height: 52px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--soft);
  color: var(--primary);
  padding: 0 16px;
  font: inherit;
  font-size: 15px;
  font-weight: 500;
}

.form input::placeholder {
  color: #94a3b8;
}

.form input:focus {
  outline: 2px solid rgba(0, 209, 201, 0.45);
  outline-offset: 1px;
  border-color: rgba(0, 209, 201, 0.55);
  background: #fff;
}

.form-hint {
  margin: 10px 2px 2px;
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
  text-align: left;
}

.btn {
  height: 52px;
  padding: 0 22px;
  border-radius: 14px;
  border: 1px solid transparent;
  font: inherit;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: filter 0.15s ease, transform 0.15s ease;
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn:not(:disabled):hover {
  filter: brightness(1.05);
}

.btn:not(:disabled):active {
  transform: translateY(1px);
}

.btn-accent {
  background: var(--accent);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow:
    inset 0 1px 2px rgba(255, 255, 255, 0.25),
    0 1px 0 1px var(--accent-edge),
    0 2px 4px rgba(9, 9, 11, 0.12);
}

.btn-primary {
  height: 40px;
  padding: 0 14px;
  border-radius: 12px;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  border: none;
  cursor: pointer;
  box-shadow:
    inset 0 1px 2px rgba(255, 255, 255, 0.2),
    0 1px 0 1px var(--primary-deep);
}

.btn-primary:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn-ghost {
  height: 40px;
  padding: 0 14px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--primary);
  font-weight: 600;
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
}

.btn-ghost:hover:not(:disabled) {
  border-color: rgba(0, 209, 201, 0.55);
}

.btn-ghost:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.status {
  margin: 0 0 16px;
  min-height: 1.4em;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  text-align: center;
}

.status.is-error {
  color: var(--danger);
}

.status.is-ok {
  color: var(--ok);
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  padding: 14px 16px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(44, 62, 80, 0.04);
}

.toolbar[hidden],
.empty[hidden] {
  display: none !important;
}

.toolbar-left,
.toolbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.toolbar input[type="search"],
.toolbar select {
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  padding: 0 12px;
  font: inherit;
  font-size: 13px;
  color: var(--primary);
}

.toolbar input[type="search"] {
  min-width: 180px;
}

.count {
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
}

.count strong {
  color: var(--primary);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(176px, 1fr));
  gap: 12px;
}

.card {
  position: relative;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 8px 22px rgba(44, 62, 80, 0.04);
  animation: rise 0.35s ease both;
}

.card.is-selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(0, 209, 201, 0.28);
}

.card-check {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
  width: 20px;
  height: 20px;
  accent-color: var(--accent);
}

.card-media {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  padding: 0;
  border: none;
  background: var(--soft);
  cursor: zoom-in;
}

.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.card-meta {
  padding: 10px 12px 12px;
}

.card-name {
  margin: 0 0 4px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-info {
  margin: 0 0 8px;
  font-size: 11px;
  color: var(--muted);
}

.card-actions {
  display: flex;
  gap: 6px;
}

.card-actions a,
.card-actions button {
  flex: 1;
  height: 30px;
  font-size: 11px;
  font-weight: 600;
  font-family: inherit;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.card-actions a:hover,
.card-actions button:hover {
  border-color: rgba(0, 209, 201, 0.55);
  color: var(--accent-edge);
}

.empty {
  padding: 56px 24px;
  text-align: center;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.9);
  border: 1px dashed var(--line);
  border-radius: 18px;
}

.empty strong {
  display: block;
  color: var(--primary);
  margin-bottom: 6px;
  font-size: 17px;
  font-family: var(--font-display);
}

/* ─── Content sections ─── */
.section {
  margin-top: 56px;
  padding-top: 8px;
}

.section h2 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  letter-spacing: -0.03em;
  color: var(--primary);
}

.section-lead {
  margin: 0 0 24px;
  color: var(--muted);
  font-weight: 500;
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.step {
  padding: 20px 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
}

.step-n {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  margin-bottom: 12px;
  border-radius: 10px;
  background: rgba(0, 209, 201, 0.12);
  color: var(--accent-edge);
  font-size: 13px;
  font-weight: 800;
}

.step h3 {
  margin: 0 0 8px;
  font-size: 16px;
  font-family: var(--font-display);
}

.step p {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
}

.seo-block p {
  margin: 0;
  max-width: 68ch;
  font-size: 15px;
  line-height: 1.65;
  color: var(--muted);
}

.seo-block a {
  color: var(--accent-edge);
  font-weight: 700;
  text-decoration: none;
}

.seo-block a:hover {
  text-decoration: underline;
}

.faq {
  display: grid;
  gap: 10px;
  max-width: 720px;
}

.faq details {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 4px 16px;
}

.faq summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 15px;
  padding: 14px 0;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq details p {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.foot {
  margin-top: 56px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 10px;
  font-size: 13px;
  color: var(--muted);
}

.foot-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.foot-brand img {
  height: 24px;
  width: auto;
}

.foot-brand span {
  font-size: 12px;
  font-weight: 800;
  color: var(--accent-edge);
}

.foot a {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
}

.foot a:hover {
  color: var(--accent-edge);
}

.foot p {
  margin: 0;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(26, 37, 48, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.lightbox[hidden] {
  display: none;
}

.lightbox img {
  max-width: min(960px, 100%);
  max-height: 88vh;
  object-fit: contain;
  border-radius: 10px;
}

.lightbox-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 22px;
  cursor: pointer;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes ping {
  0% {
    transform: scale(0.8);
    opacity: 0.5;
  }
  80%,
  100% {
    transform: scale(2.1);
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .card,
  .live-dot::before {
    animation: none;
  }
  .btn:not(:disabled):active {
    transform: none;
  }
  html {
    scroll-behavior: auto;
  }
}

@media (min-width: 860px) {
  .nav-links {
    display: flex;
  }
}

@media (max-width: 860px) {
  .steps {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .nav {
    height: 60px;
  }
  .brand-logo {
    height: 24px;
  }
  .shell {
    padding-top: 100px;
  }
  .grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  }
  .form-hint {
    text-align: center;
  }
}
