:root {
  --bg: #f3f5f8;
  --panel: #ffffff;
  --panel-soft: #eef3f8;
  --text: #172535;
  --muted: #506177;
  --line: #d4dde8;
  --accent: #0f6a8c;
  --accent-2: #1f7a5a;
  --radius: 16px;
  --radius-sm: 12px;
  --shadow: 0 14px 30px rgba(17, 27, 44, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scrollbar-gutter: stable;
}

:where(a, button, [role="button"], .btn, input, select, textarea, summary) {
  touch-action: manipulation;
}

body {
  margin: 0;
  color: var(--text);
  line-height: 1.58;
  font-family: "Segoe UI", "Inter", "Poppins", system-ui, -apple-system, sans-serif;
  background:
    radial-gradient(circle at 0% 0%, #ffffff 0%, transparent 40%),
    radial-gradient(circle at 100% 0%, #e5eef8 0%, transparent 35%),
    var(--bg);
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.container {
  width: min(1080px, 92vw);
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--line);
  background: rgba(243, 245, 248, 0.9);
  backdrop-filter: blur(8px);
}

.header-inner {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text);
}

.menu-toggle {
  display: none;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  border-radius: 10px;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.menu-toggle-bars {
  position: relative;
  width: 20px;
  height: 14px;
  display: inline-block;
}

.menu-toggle-bars span {
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transition: transform 0.18s ease, opacity 0.18s ease, top 0.18s ease;
}

.menu-toggle-bars span:nth-child(1) {
  top: 0;
}

.menu-toggle-bars span:nth-child(2) {
  top: 6px;
}

.menu-toggle-bars span:nth-child(3) {
  top: 12px;
}

.nav {
  display: flex;
  gap: 0.9rem;
  flex-wrap: nowrap;
  align-items: center;
  font-size: 0.92rem;
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-bottom: 2px;
}

.nav::-webkit-scrollbar {
  display: none;
}

.nav a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
}

.page {
  padding: 2.1rem 0 2.7rem;
}

.section {
  margin: 0 0 1rem;
  content-visibility: auto;
  contain-intrinsic-size: 1px 520px;
}

h1 {
  margin: 0 0 0.45rem;
  font-size: clamp(1.8rem, 4.4vw, 2.9rem);
  line-height: 1.12;
}

h2 {
  margin: 1rem 0 0.4rem;
  font-size: clamp(1.22rem, 2.8vw, 1.75rem);
}

h3 {
  margin: 0.7rem 0 0.35rem;
  font-size: 1.05rem;
}

p,
li {
  color: #24364a;
}

.lead,
.muted {
  color: var(--muted);
}

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.1rem;
}

img,
video {
  max-width: 100%;
  height: auto;
}

.cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
  margin: 1rem 0 1.6rem;
}

label {
  display: grid;
  gap: 0.3rem;
  margin-bottom: 0.6rem;
  font-weight: 700;
  font-size: 0.9rem;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.58rem 0.65rem;
  font: inherit;
  background: #fff;
  color: var(--text);
}

input:focus,
textarea:focus,
select:focus {
  outline: 2px solid color-mix(in oklab, var(--accent) 20%, #fff);
  outline-offset: 1px;
  border-color: var(--accent);
}

button,
.btn {
  border: 0;
  border-radius: 999px;
  padding: 0.65rem 0.98rem;
  font-weight: 700;
  cursor: pointer;
  color: #fff;
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  transition: transform 0.18s ease;
}

button:hover,
.btn:hover {
  transform: translateY(-1px);
  text-decoration: none;
}

output.result,
.result {
  display: block;
  width: 100%;
}

.site-footer,
.footer {
  border-top: 1px solid var(--line);
  margin-top: 1.4rem;
  padding: 1rem 0 1.7rem;
  color: var(--muted);
}

.footer-grid {
  max-width: 1080px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
}

.conversion-bar {
  margin: 0 0 1rem;
  padding: 1rem;
  border-radius: var(--radius);
  border: 1px solid color-mix(in oklab, var(--accent) 28%, #fff);
  background: linear-gradient(120deg, #eff7fc, #eef9f2);
  box-shadow: var(--shadow);
}

.conversion-kicker {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.76rem;
  color: #3a546b;
  font-weight: 800;
}

.conversion-bar h2 {
  margin: 0.2rem 0 0.4rem;
  font-size: clamp(1.15rem, 2.2vw, 1.45rem);
}

.conversion-bar p {
  margin: 0;
}

.conversion-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 0.75rem;
}

.btn.btn-ghost {
  color: var(--text);
  border: 1px solid var(--line);
  background: #fff;
}

.sticky-mobile-cta {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 120;
  display: flex;
  justify-content: center;
  padding: 0.6rem 0.8rem calc(0.6rem + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, rgba(243, 245, 248, 0), rgba(243, 245, 248, 0.95) 45%);
}

@media (pointer: coarse) {
  :where(button, [role="button"], .btn, .header-cta, .chip) {
    min-height: 44px !important;
    padding-block: 0.62rem !important;
    padding-inline: 0.95rem !important;
  }

  :where(.nav a, header nav a) {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding-inline: 0.32rem;
  }

  input,
  textarea,
  select {
    min-height: 44px;
    font-size: 16px;
  }

  .nav,
  header nav {
    gap: 0.62rem 0.75rem;
  }
}

@media (min-width: 900px) {
  .sticky-mobile-cta {
    display: none;
  }
}

@media (min-width: 780px) {
  .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .header-inner {
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding-top: 0.46rem;
    padding-bottom: 0.46rem;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .site-header .nav {
    display: none !important;
    width: 100%;
    margin-top: 0.12rem;
    padding: 0.55rem;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    box-shadow: var(--shadow);
    overflow: visible;
    white-space: normal;
    gap: 0.08rem;
    flex-direction: column;
    align-items: stretch;
  }

  .site-header .nav a {
    min-height: 44px;
    width: 100%;
    padding: 0.45rem 0.55rem;
    border-radius: 8px;
  }

  .site-header .nav a:hover {
    text-decoration: none;
    background: var(--panel-soft);
  }

  .site-header.is-menu-open .nav {
    display: flex !important;
  }

  .site-header.is-menu-open .menu-toggle-bars span:nth-child(1) {
    top: 6px;
    transform: rotate(45deg);
  }

  .site-header.is-menu-open .menu-toggle-bars span:nth-child(2) {
    opacity: 0;
  }

  .site-header.is-menu-open .menu-toggle-bars span:nth-child(3) {
    top: 6px;
    transform: rotate(-45deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }

  html {
    scroll-behavior: auto;
  }
}
