:root {
  --bg: #0d0d0d;
  --panel: #141414;
  --panel-2: #1a1a1a;
  --panel-3: #202020;
  --text: #f5f5f5;
  --muted: #a3a3a3;
  --muted-2: #737373;
  --border: #2d2d2d;
  --green: #22c55e;
  --green-dark: #166534;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at top center, rgba(34, 197, 94, 0.12), transparent 38%),
    linear-gradient(180deg, #0b120d 0%, var(--bg) 32%);
  color: var(--text);
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.5;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select {
  font: inherit;
}

img {
  max-width: 100%;
}

.container {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(8, 12, 9, 0.9);
  backdrop-filter: blur(16px);
}

.site-header .container,
.site-footer .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.site-header .container {
  min-height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand-logo {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  object-fit: cover;
  border: 1px solid rgba(34, 197, 94, 0.22);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav-links a {
  font-size: 14px;
  color: var(--muted);
  transition: color 0.18s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
}

.hero {
  padding: 56px 0 34px;
}

.hero-card {
  padding: 36px;
  border: 1px solid rgba(34, 197, 94, 0.14);
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(22, 101, 52, 0.14), rgba(20, 20, 20, 0.92) 36%),
    rgba(20, 20, 20, 0.95);
  box-shadow: var(--shadow);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid rgba(34, 197, 94, 0.18);
  border-radius: 999px;
  color: #86efac;
  background: rgba(34, 197, 94, 0.08);
  font-size: 13px;
}

.hero h1,
.section-title h2,
.page-intro h1 {
  margin: 18px 0 0;
  letter-spacing: -0.04em;
}

.hero h1 {
  font-size: clamp(2.4rem, 6vw, 4.5rem);
  line-height: 0.98;
}

.hero h1 span,
.accent {
  color: var(--green);
}

.hero p,
.section-title p,
.page-intro p,
.seo-copy p,
.faq-answer,
.guide-card p,
.footer-note,
.footer-meta,
.empty-state {
  color: var(--muted);
}

.hero p {
  max-width: 720px;
  margin: 18px 0 0;
  font-size: 1.06rem;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 26px;
}

.btn,
.chip,
.tab,
.filter-btn,
.mini-action {
  border: 1px solid transparent;
  border-radius: 14px;
  transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  font-weight: 600;
  cursor: pointer;
}

.btn-primary {
  background: linear-gradient(180deg, #22c55e, #16a34a);
  color: #06100a;
  box-shadow: 0 14px 28px rgba(34, 197, 94, 0.2);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

.btn:hover,
.chip:hover,
.tab:hover,
.filter-btn:hover,
.mini-action:hover {
  transform: translateY(-1px);
}

.stats-grid,
.summary-grid,
.guide-grid,
.faq-grid,
.value-grid,
.mutation-grid {
  display: grid;
  gap: 16px;
}

.stats-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 28px;
}

.stat-card,
.summary-card,
.guide-card,
.faq-card,
.seo-card,
.list-card,
.calc-panel,
.breakdown,
.result-card {
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(20, 20, 20, 0.92);
  border-radius: var(--radius);
}

.stat-card,
.summary-card {
  padding: 18px;
}

.stat-value,
.summary-value {
  font-size: clamp(1.6rem, 4vw, 2.1rem);
  font-weight: 700;
  letter-spacing: -0.04em;
}

.stat-label,
.summary-label {
  margin-top: 5px;
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.content-section,
.seo-section,
.list-section {
  padding: 26px 0 0;
}

.section-title,
.page-intro {
  margin-bottom: 18px;
}

.section-title h2,
.page-intro h1 {
  font-size: clamp(1.55rem, 4vw, 2.2rem);
}

.layout-split {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(300px, 360px);
  gap: 22px;
  align-items: start;
}

.calc-panel,
.list-card,
.seo-card {
  padding: 18px;
}

.panel-title {
  margin: 0 0 14px;
  font-size: 15px;
  color: #e7e7e7;
}

.search-wrap {
  position: relative;
}

.search-wrap::before {
  content: "";
  position: absolute;
  left: 14px;
  top: 50%;
  width: 14px;
  height: 14px;
  border: 2px solid #525252;
  border-radius: 50%;
  transform: translateY(-50%);
}

.search-wrap::after {
  content: "";
  position: absolute;
  left: 27px;
  top: calc(50% + 4px);
  width: 7px;
  height: 2px;
  background: #525252;
  transform: rotate(45deg);
  transform-origin: left center;
}

.field,
.select,
.number-field {
  width: 100%;
  min-height: 46px;
  padding: 0 14px 0 42px;
  color: var(--text);
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 14px;
  outline: none;
}

.select,
.number-field {
  padding-left: 14px;
}

.field:focus,
.select:focus,
.number-field:focus {
  border-color: rgba(34, 197, 94, 0.55);
}

.crop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(86px, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.crop-btn,
.chip,
.tab,
.filter-btn,
.mini-action {
  cursor: pointer;
  background: var(--panel-2);
  border-color: rgba(255, 255, 255, 0.06);
  color: var(--muted);
}

.crop-btn {
  min-height: 86px;
  padding: 10px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.crop-btn .emoji {
  font-size: 26px;
}

.crop-btn .name {
  font-size: 11px;
  line-height: 1.18;
  text-align: center;
}

.chip-row,
.filter-row,
.tabs,
.mutations-list,
.active-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip,
.filter-btn,
.mini-action {
  min-height: 34px;
  padding: 0 12px;
  font-size: 12px;
  font-weight: 600;
}

.tab {
  min-height: 38px;
  padding: 0 14px;
  font-size: 13px;
  font-weight: 600;
}

.toolbar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.toolbar > * {
  flex: 1 1 160px;
}

.mutations-scroll {
  max-height: 180px;
  overflow-y: auto;
}

.helper-row,
.field-grid,
.breakdown-row,
.table-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.helper-row {
  margin-bottom: 10px;
}

.helper-row .label,
.small-label,
.sort-note,
.list-note {
  font-size: 12px;
  color: var(--muted);
}

.clear-btn {
  background: none;
  border: 0;
  color: var(--muted);
  cursor: pointer;
  padding: 0;
}

.field-grid {
  margin-top: 16px;
  align-items: end;
}

.field-col {
  flex: 1 1 0;
}

.field-col label {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  color: var(--muted);
}

.selected-crop {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border-radius: 16px;
  margin-bottom: 16px;
}

.selected-crop .icon {
  font-size: 36px;
}

.placeholder-box {
  min-height: 88px;
  border: 1px dashed rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted-2);
  margin-bottom: 16px;
}

.breakdown {
  padding: 14px;
  margin-top: 16px;
  background: var(--panel-2);
}

.breakdown-row {
  padding: 7px 0;
  font-size: 13px;
}

.breakdown-row.total {
  margin-top: 5px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-weight: 700;
}

.result-card {
  margin-top: 16px;
  padding: 20px;
  text-align: center;
  background: linear-gradient(180deg, rgba(22, 101, 52, 0.18), rgba(20, 20, 20, 0.96));
}

.result-card .label {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.result-card .value {
  margin-top: 8px;
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.05em;
  color: var(--green);
}

.result-card .meta {
  color: var(--muted);
  font-size: 12px;
}

.guide-grid,
.faq-grid,
.summary-grid,
.value-grid,
.mutation-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.guide-card,
.faq-card {
  padding: 18px;
  position: relative;
}

.step-badge {
  position: absolute;
  top: -10px;
  left: 16px;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: var(--green);
  color: #041008;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
}

.faq-question,
.guide-card h3,
.summary-title,
.table-name,
.pill {
  color: var(--text);
}

.seo-card {
  margin-top: 18px;
}

.seo-card strong {
  color: #ededed;
}

.table {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.table-row {
  padding: 14px;
  border-radius: 16px;
  background: var(--panel-2);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.table-row .left {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.table-icon {
  display: inline-flex;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  font-size: 22px;
  flex: 0 0 auto;
}

.table-name {
  font-weight: 700;
}

.table-sub,
.table-meta,
.category-note {
  font-size: 12px;
  color: var(--muted);
}

.table-right {
  text-align: right;
  flex: 0 0 auto;
}

.table-value {
  font-weight: 800;
  color: var(--green);
}

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}

.site-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  margin-top: 44px;
  padding: 24px 0 28px;
}

.footer-copy {
  max-width: 360px;
}

.footer-links {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-block h4 {
  margin: 0 0 8px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}

.footer-block a {
  display: block;
  margin-bottom: 5px;
  color: #d4d4d4;
  font-size: 13px;
}

.footer-meta {
  margin-top: 20px;
  text-align: center;
  font-size: 12px;
}

.hidden {
  display: none !important;
}

@media (max-width: 940px) {
  .layout-split {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .site-header .container,
  .site-footer .container,
  .table-row,
  .field-grid {
    flex-direction: column;
    align-items: stretch;
  }

  .nav-links {
    gap: 12px;
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .hero-card,
  .calc-panel,
  .list-card,
  .seo-card {
    padding: 16px;
  }

  .stats-grid,
  .summary-grid {
    grid-template-columns: 1fr;
  }

  .table-right {
    text-align: left;
  }
}

@media (max-width: 520px) {
  .container {
    width: min(100% - 20px, 1120px);
  }

  .hero {
    padding-top: 32px;
  }

  .hero-card {
    border-radius: 22px;
  }

  .crop-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}