:root {
  --bg: #f6f7f4;
  --surface: #ffffff;
  --surface-strong: #ecf3ef;
  --text: #13201d;
  --muted: #5f706a;
  --line: #d6e0db;
  --brand: #0d8b63;
  --brand-strong: #096949;
  --accent: #d94b45;
  --accent-soft: #ffe3df;
  --online: #169b67;
  --offline: #d94b45;
  --shadow: 0 18px 40px rgba(19, 32, 29, 0.08);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

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

code {
  padding: 2px 6px;
  border-radius: 6px;
  background: #eef2f0;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.93rem;
}

.shell {
  width: min(1180px, calc(100vw - 32px));
  margin: 0 auto;
}

.narrow {
  width: min(760px, calc(100vw - 32px));
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(14px);
  background: rgba(246, 247, 244, 0.88);
  border-bottom: 1px solid rgba(214, 224, 219, 0.8);
}

.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 74px;
}

.brand {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--brand-strong);
}

.main-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 16px;
}

.main-nav a {
  color: var(--muted);
  font-weight: 600;
}

.main-nav a:hover {
  color: var(--brand-strong);
}

.hero {
  padding: 32px 0 20px;
}

.hero-grid,
.machine-hero,
.info-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 28px;
  align-items: center;
}

.hero-copy,
.hero-media,
.info-media {
  min-width: 0;
}

.hero-copy h1,
.machine-hero h1,
.section-head h2,
.narrow h1 {
  margin: 0;
  font-size: 3.25rem;
  line-height: 1.03;
}

.hero-copy p,
.machine-hero p,
.section-head p,
.legal-card p,
.text-block p,
.redirect-box p {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
}

.hero-copy p,
.machine-hero p,
.section-head p {
  max-width: 62ch;
}

.hero-media img,
.info-media img {
  width: 100%;
  aspect-ratio: 5 / 4;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.eyebrow {
  display: inline-block;
  margin-bottom: 12px;
  color: var(--brand-strong);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.hero-badges,
.machine-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.hero-badges span,
.machine-meta span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  font-weight: 600;
  color: var(--text);
}

.section {
  padding: 28px 0 22px;
}

.section-band {
  background: linear-gradient(180deg, #eff6f2 0%, #f6f7f4 100%);
  border-top: 1px solid rgba(214, 224, 219, 0.65);
  border-bottom: 1px solid rgba(214, 224, 219, 0.65);
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.service-note {
  margin: 0 0 18px;
  padding: 14px 16px;
  border-radius: 8px;
  border: 1px solid #cfe0d7;
  background: #edf6f2;
  color: var(--text);
  font-size: 0.98rem;
}

.service-note strong {
  color: var(--brand-strong);
}

.machine-grid,
.offers-grid,
.legal-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.machine-card,
.offer-card,
.legal-card,
.redirect-box {
  padding: 20px;
  border-radius: 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.machine-card__head {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 8px;
  background: var(--surface-strong);
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--muted);
}

.machine-card h3,
.offer-card h3,
.legal-card h3 {
  margin: 16px 0 8px;
  font-size: 1.28rem;
  line-height: 1.1;
}

.compact-note {
  margin-top: -2px;
  margin-bottom: 6px;
}

.muted {
  color: var(--muted);
}

.price-line,
.price-big {
  margin: 14px 0 10px;
  font-weight: 700;
}

.price-big {
  font-size: 2rem;
  line-height: 1;
}

.package-list {
  margin: 14px 0 18px;
  padding: 0;
  list-style: none;
}

.package-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.package-list li:last-child {
  border-bottom: 1px solid var(--line);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border: 0;
  border-radius: 8px;
  background: var(--brand);
  color: #fff;
  font-size: 0.98rem;
  font-weight: 800;
  cursor: pointer;
}

.button:hover {
  background: var(--brand-strong);
}

.button-secondary {
  background: transparent;
  color: var(--brand-strong);
  border: 1px solid var(--line);
}

.button-secondary:hover {
  background: #edf6f2;
}

.button-muted {
  background: #e4ebe7;
  color: var(--muted);
  cursor: default;
}

.package-form {
  margin-top: 18px;
}

.package-note {
  margin-top: 18px;
  padding: 12px 14px;
  border-radius: 8px;
  background: var(--accent-soft);
  color: #8c2f2a;
  font-weight: 600;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--offline);
  flex: 0 0 auto;
}

.status-dot.is-online {
  background: var(--online);
}

.status-dot.is-offline {
  background: var(--offline);
}

.single-card,
.text-block {
  margin-top: 18px;
}

.single-card p,
.text-block p {
  margin-bottom: 14px;
}

.back-link {
  display: inline-block;
  margin-bottom: 16px;
  color: var(--muted);
  font-weight: 700;
}

#machines,
#offers {
  scroll-margin-top: 90px;
}

.site-footer {
  margin-top: 28px;
  border-top: 1px solid var(--line);
  background: #edf3ef;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 22px;
  padding: 28px 0 22px;
}

.footer-grid h3 {
  margin: 0 0 10px;
  font-size: 1rem;
}

.footer-grid p {
  margin: 0 0 8px;
  color: var(--muted);
}

.footer-bottom {
  padding: 0 0 24px;
  color: var(--muted);
  font-size: 0.92rem;
}

.empty-state {
  margin: 0;
  padding: 18px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.7);
  color: var(--muted);
}

.redirect-box {
  margin-top: 12vh;
  text-align: center;
}

.mobile-pay-bar {
  display: none;
}

@media (max-width: 980px) {
  .hero-grid,
  .machine-hero,
  .info-grid,
  .footer-grid,
  .machine-grid,
  .offers-grid,
  .legal-grid {
    grid-template-columns: 1fr;
  }

  .header-row {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    padding: 14px 0;
  }

  .main-nav {
    justify-content: flex-start;
  }

  .hero-copy h1,
  .machine-hero h1,
  .section-head h2,
  .narrow h1 {
    font-size: 2.55rem;
  }
}

@media (max-width: 640px) {
  body.page-machine {
    padding-bottom: calc(100px + var(--safe-bottom));
  }

  .shell,
  .narrow {
    width: min(100vw - 20px, 1180px);
  }

  .hero-copy h1,
  .machine-hero h1,
  .section-head h2,
  .narrow h1 {
    font-size: 2.05rem;
  }

  .site-header {
    top: 0;
  }

  .header-row {
    gap: 12px;
    padding: 12px 0 10px;
    min-height: 0;
  }

  .brand {
    font-size: 1.05rem;
  }

  .main-nav {
    width: 100%;
    flex-wrap: nowrap;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .main-nav::-webkit-scrollbar {
    display: none;
  }

  .main-nav a {
    white-space: nowrap;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
  }

  .hero {
    padding: 18px 0 12px;
  }

  .section {
    padding: 20px 0 18px;
  }

  .hero-grid,
  .machine-hero,
  .info-grid {
    gap: 16px;
  }

  .hero-copy p,
  .machine-hero p,
  .section-head p,
  .legal-card p,
  .text-block p {
    font-size: 0.97rem;
  }

  .hero-actions {
    gap: 10px;
    margin-top: 16px;
  }

  .hero-actions .button {
    flex: 1 1 0;
    min-width: 0;
  }

  .hero-badges,
  .machine-meta {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
    margin-top: 14px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .hero-badges::-webkit-scrollbar,
  .machine-meta::-webkit-scrollbar {
    display: none;
  }

  .hero-badges span,
  .machine-meta span {
    white-space: nowrap;
    padding: 9px 12px;
    font-size: 0.94rem;
  }

  .hero-media img,
  .info-media img {
    aspect-ratio: 16 / 10;
  }

  .section-head {
    gap: 10px;
    margin-bottom: 16px;
  }

  .service-note {
    margin-bottom: 14px;
    padding: 12px 14px;
    font-size: 0.95rem;
  }

  .machine-grid,
  .offers-grid,
  .legal-grid {
    gap: 14px;
  }

  .machine-card,
  .offer-card,
  .legal-card,
  .redirect-box {
    padding: 16px;
  }

  .machine-card h3,
  .offer-card h3,
  .legal-card h3 {
    font-size: 1.18rem;
  }

  .price-line,
  .price-big {
    margin: 12px 0 8px;
  }

  .button {
    width: 100%;
    min-height: 52px;
    padding: 0 16px;
    font-size: 1rem;
  }

  .package-list li {
    align-items: baseline;
    flex-direction: column;
    gap: 6px;
    padding: 12px 0;
  }

  .footer-grid {
    padding: 22px 0 18px;
    gap: 18px;
  }

  .footer-bottom {
    padding: 0 0 calc(18px + var(--safe-bottom));
  }

  .mobile-pay-bar {
    display: block;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 30;
    padding: 10px 0 calc(10px + var(--safe-bottom));
    background: rgba(246, 247, 244, 0.96);
    backdrop-filter: blur(18px);
    border-top: 1px solid rgba(214, 224, 219, 0.95);
  }

  .mobile-pay-bar__inner {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .mobile-pay-form {
    min-width: 0;
  }

  .button-quickpay {
    min-height: 58px;
    flex-direction: column;
    gap: 2px;
    padding: 8px 6px;
    font-size: 0.82rem;
    line-height: 1.1;
  }

  .button-quickpay strong {
    font-size: 0.95rem;
  }
}
