/* yandextrtr.com — cool slate + yandex red */
:root {
  --bg0: #e8eef5;
  --bg1: #f4f7fb;
  --ink: #142033;
  --ink-soft: #3a4a63;
  --muted: #6b7c94;
  --line: rgba(20, 32, 51, 0.1);
  --brand: #e11d2e;
  --brand-deep: #b81222;
  --brand-soft: rgba(225, 29, 46, 0.12);
  --ice: #2f6fed;
  --ice-soft: rgba(47, 111, 237, 0.12);
  --ok: #0f8a4b;
  --ok-bg: rgba(15, 138, 75, 0.1);
  --warn: #b85a00;
  --warn-bg: rgba(184, 90, 0, 0.12);
  --off: #8a93a3;
  --off-bg: rgba(138, 147, 163, 0.14);
  --card: rgba(255, 255, 255, 0.72);
  --shadow: 0 18px 50px rgba(20, 32, 51, 0.08);
  --radius: 18px;
  --max: 1080px;
  --font-display: "Syne", "Noto Sans SC", sans-serif;
  --font-body: "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  background:
    radial-gradient(900px 480px at 8% -10%, rgba(225, 29, 46, 0.16), transparent 60%),
    radial-gradient(800px 520px at 92% 0%, rgba(47, 111, 237, 0.18), transparent 55%),
    linear-gradient(180deg, var(--bg1) 0%, var(--bg0) 42%, #dfe7f1 100%);
  min-height: 100vh;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--ice);
  text-decoration: none;
}

a:hover {
  color: var(--brand);
}

.container {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

/* header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(14px);
  background: rgba(244, 247, 251, 0.82);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 68px;
}

.logo {
  display: inline-flex;
  align-items: baseline;
  gap: 0.15rem;
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.03em;
}

.logo span {
  color: var(--brand);
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  justify-content: flex-end;
}

.nav a {
  color: var(--ink-soft);
  font-size: 0.92rem;
  font-weight: 500;
}

.nav a:hover,
.nav a.is-active {
  color: var(--brand);
}

.nav-toggle {
  display: none;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 10px;
  width: 42px;
  height: 42px;
  cursor: pointer;
}

/* hero */
.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(3.5rem, 8vw, 6.5rem) 0 clamp(2.5rem, 5vw, 4rem);
  isolation: isolate;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(115deg, rgba(20, 32, 51, 0.92) 0%, rgba(20, 32, 51, 0.55) 48%, rgba(225, 29, 46, 0.35) 100%),
    radial-gradient(circle at 70% 40%, rgba(47, 111, 237, 0.35), transparent 45%),
    repeating-linear-gradient(
      -18deg,
      transparent 0 14px,
      rgba(255, 255, 255, 0.03) 14px 15px
    );
  border-radius: 0 0 36px 36px;
}

.hero-inner {
  color: #fff;
  max-width: 720px;
}

.brand-mark {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 8vw, 4.8rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  margin: 0 0 1rem;
}

.brand-mark em {
  font-style: normal;
  color: #ff6b78;
}

.hero h1 {
  margin: 0 0 0.85rem;
  font-size: clamp(1.35rem, 3.4vw, 2rem);
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.02em;
}

.hero p {
  margin: 0 0 1.6rem;
  color: rgba(255, 255, 255, 0.82);
  font-size: 1.05rem;
  max-width: 36em;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 48px;
  padding: 0.75rem 1.35rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-family: inherit;
  font-size: 0.98rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--brand);
  color: #fff;
}

.btn-primary:hover {
  background: var(--brand-deep);
  color: #fff;
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.28);
}

.btn-ghost:hover {
  background: #fff;
  color: var(--ink);
}

.btn-outline {
  background: #fff;
  color: var(--brand);
  border-color: var(--brand);
}

.btn-outline:hover {
  background: var(--brand);
  color: #fff;
}

.btn-soft {
  background: #fff;
  color: var(--ink);
  border-color: var(--line);
}

.btn-soft:hover {
  border-color: var(--ink);
}

/* sections */
.section {
  padding: clamp(2.5rem, 5vw, 4rem) 0;
}

.section-head {
  margin-bottom: 1.5rem;
}

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

.section-head p {
  margin: 0;
  color: var(--muted);
  max-width: 42em;
}

/* entry grid */
.entry-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}

.entry-card {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding: 1.15rem 1.2rem 1.2rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
  transition: transform 0.2s ease, border-color 0.2s ease;
  user-select: none;
  -webkit-user-select: none;
}

.entry-card:hover {
  transform: translateY(-3px);
  border-color: rgba(225, 29, 46, 0.35);
}

.entry-card.is-featured {
  border-color: rgba(225, 29, 46, 0.45);
  background: linear-gradient(160deg, #fff 0%, #fff5f5 100%);
}

.entry-card.is-off {
  opacity: 0.72;
}

.entry-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-ok {
  color: var(--ok);
  background: var(--ok-bg);
}

.badge-off {
  color: var(--off);
  background: var(--off-bg);
}

.badge-hot {
  color: var(--brand);
  background: var(--brand-soft);
}

.entry-card h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.35rem;
  letter-spacing: -0.03em;
  user-select: none;
  -webkit-user-select: none;
}

.entry-card .url {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  user-select: none;
  -webkit-user-select: none;
}

.entry-card p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.92rem;
  flex: 1;
}

.entry-card .btn {
  align-self: flex-start;
  min-height: 40px;
  padding: 0.55rem 1rem;
  font-size: 0.9rem;
  pointer-events: auto;
}

.entry-card.is-off .btn {
  pointer-events: none;
  opacity: 0.55;
}

/* prose / page content */
.page-hero {
  padding: 2.8rem 0 1.2rem;
}

.page-hero h1 {
  margin: 0 0 0.6rem;
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 4vw, 2.4rem);
  letter-spacing: -0.03em;
}

.page-hero p {
  margin: 0;
  color: var(--muted);
  max-width: 44em;
}

.prose {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: clamp(1.25rem, 3vw, 2rem);
  box-shadow: var(--shadow);
}

.prose h2 {
  margin: 1.8rem 0 0.7rem;
  font-size: 1.25rem;
}

.prose h2:first-child {
  margin-top: 0;
}

.prose p,
.prose li {
  color: var(--ink-soft);
}

.prose ul,
.prose ol {
  padding-left: 1.2rem;
}

.timeline {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
  border-left: 2px solid rgba(225, 29, 46, 0.25);
}

.timeline li {
  position: relative;
  padding: 0 0 1.1rem 1.2rem;
}

.timeline li::before {
  content: "";
  position: absolute;
  left: -6px;
  top: 0.45rem;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--brand);
}

.timeline strong {
  display: block;
  color: var(--ink);
  margin-bottom: 0.2rem;
}

/* steps */
.steps {
  display: grid;
  gap: 1.25rem;
}

.step {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 1rem;
  align-items: start;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.65);
}

.step-num {
  width: 88px;
  height: 88px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--brand);
  background: var(--brand-soft);
}

.step h3 {
  margin: 0 0 0.35rem;
  font-size: 1.1rem;
}

.step p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.step-shot {
  margin-top: 0.85rem;
  border-radius: 14px;
  border: 1px solid var(--line);
  overflow: hidden;
  max-width: 280px;
}

.ocr-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.94rem;
  overflow: hidden;
  border-radius: 14px;
}

.ocr-table th,
.ocr-table td {
  border: 1px solid var(--line);
  padding: 0.7rem 0.8rem;
  text-align: left;
}

.ocr-table th {
  background: rgba(20, 32, 51, 0.05);
}

.ocr-table code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  background: rgba(20, 32, 51, 0.06);
  padding: 0.1rem 0.35rem;
  border-radius: 6px;
}

.faq-list details {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.7);
  padding: 0.9rem 1rem;
  margin-bottom: 0.75rem;
}

.faq-list summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--ink);
}

.faq-list p {
  margin: 0.7rem 0 0;
  color: var(--ink-soft);
}

/* go page */
.go-panel {
  max-width: 560px;
  margin: 2rem auto 3rem;
  padding: 2rem 1.5rem;
  text-align: center;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.go-panel h1 {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-size: 1.7rem;
}

.go-panel .target {
  display: inline-block;
  margin: 0.4rem 0 1rem;
  padding: 0.35rem 0.7rem;
  border-radius: 10px;
  background: rgba(20, 32, 51, 0.06);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: var(--ink-soft);
  user-select: none;
}

.go-panel p {
  color: var(--muted);
  margin: 0 0 1.4rem;
}

.go-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

/* footer */
.site-footer {
  margin-top: 2rem;
  padding: 2rem 0 5.5rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  align-items: center;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.footer-nav a {
  color: var(--ink-soft);
}

/* floating controls */
.float-must {
  position: fixed;
  left: 50%;
  bottom: 1.25rem;
  transform: translateX(-50%);
  z-index: 50;
  min-width: 148px;
  box-shadow: 0 12px 30px rgba(225, 29, 46, 0.35);
}

.back-top {
  position: fixed;
  right: 1.1rem;
  bottom: 5.2rem;
  z-index: 50;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.back-top.is-show {
  opacity: 1;
  pointer-events: auto;
}

.back-top:hover {
  transform: translateY(-2px);
  border-color: var(--brand);
  color: var(--brand);
}

/* modal */
.must-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.must-modal.is-open {
  display: flex;
}

.must-modal__mask {
  position: absolute;
  inset: 0;
  background: rgba(10, 16, 28, 0.55);
  backdrop-filter: blur(4px);
}

.must-modal__panel {
  position: relative;
  width: min(100%, 560px);
  max-height: min(88vh, 760px);
  overflow: auto;
  background: #fff;
  border-radius: 22px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
  padding: 1.1rem 1.1rem 1.3rem;
}

.must-modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.must-modal__head h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.2rem;
}

.must-close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: #fff;
  cursor: pointer;
  font-size: 1.2rem;
  line-height: 1;
}

.must-swiper {
  border-radius: 14px;
  overflow: hidden;
  background: #0f1624;
}

.must-swiper .swiper-slide img {
  width: 100%;
  height: auto;
  margin: 0 auto;
  max-height: 360px;
  object-fit: contain;
  background: #0f1624;
}

.must-swiper .swiper-pagination-bullet-active {
  background: var(--brand);
}

.must-steps {
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.55rem;
}

.must-steps li {
  padding: 0.65rem 0.75rem;
  border-radius: 12px;
  background: rgba(20, 32, 51, 0.04);
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.must-steps strong {
  color: var(--brand);
}

body.modal-open {
  overflow: hidden;
}

/* motion */
@media (prefers-reduced-motion: no-preference) {
  .hero-inner {
    animation: rise 0.7s ease both;
  }

  .entry-card {
    animation: rise 0.55s ease both;
  }

  .entry-card:nth-child(1) { animation-delay: 0.04s; }
  .entry-card:nth-child(2) { animation-delay: 0.08s; }
  .entry-card:nth-child(3) { animation-delay: 0.12s; }
  .entry-card:nth-child(4) { animation-delay: 0.16s; }
  .entry-card:nth-child(5) { animation-delay: 0.2s; }
  .entry-card:nth-child(6) { animation-delay: 0.24s; }

  .float-must {
    animation: pulse 2.8s ease-in-out infinite;
  }
}

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

@keyframes pulse {
  0%, 100% { box-shadow: 0 12px 30px rgba(225, 29, 46, 0.28); }
  50% { box-shadow: 0 14px 36px rgba(225, 29, 46, 0.48); }
}

@media (max-width: 760px) {
  .nav-toggle {
    display: inline-grid;
    place-items: center;
  }

  .nav {
    display: none;
    position: absolute;
    left: 1rem;
    right: 1rem;
    top: 68px;
    flex-direction: column;
    gap: 0;
    padding: 0.5rem;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: var(--shadow);
  }

  .nav.is-open {
    display: flex;
  }

  .nav a {
    padding: 0.75rem 0.85rem;
    border-radius: 10px;
  }

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

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

  .step-num {
    width: 56px;
    height: 56px;
    font-size: 1.3rem;
  }

  .float-must {
    bottom: 1rem;
    width: calc(100% - 2rem);
    max-width: 280px;
  }
}
