
:root {
  --primary: #126b48;
  --primary-dark: #0a4d34;
  --primary-light: #eaf6ef;
  --text: #1b2b24;
  --muted: #65746c;
  --border: #e1e9e4;
  --surface: #ffffff;
  --page: #f7faf8;
  --telegram: #1688d5;
  --radius: 16px;
  --shadow: 0 8px 28px rgba(20, 55, 38, 0.07);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 92px;
}

body {
  margin: 0;
  color: var(--text);
  background: var(--page);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: var(--primary);
  text-underline-offset: 3px;
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
summary:focus-visible {
  outline: 3px solid #71b99a;
  outline-offset: 4px;
}

.container {
  width: min(1120px, calc(100% - 36px));
  margin-inline: auto;
}

.section {
  padding: 58px 0;
}

.skip-link {
  position: absolute;
  z-index: 1000;
  top: -100px;
  left: 12px;
  padding: 10px 16px;
  background: #fff;
  border: 2px solid var(--primary);
  border-radius: 8px;
}

.skip-link:focus {
  top: 12px;
}

/* Header and navigation */

.site-header {
  position: sticky;
  z-index: 100;
  top: 0;
  background: rgba(255, 255, 255, 0.97);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
}

.header-inner {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  text-decoration: none;
  flex-shrink: 0;
}

.brand img {
  width: 44px;
  height: 44px;
  border-radius: 11px;
  object-fit: contain;
}

.main-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 19px;
}

.main-nav a {
  color: #35483d;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s ease;
}

.main-nav a:hover {
  color: var(--primary);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 10px;
  background: #f0f7f2;
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: var(--primary-dark);
  border-radius: 4px;
}

/* Hero */

.hero {
  overflow: hidden;
  background:
    radial-gradient(ellipse at 50% 0%, #e0f3e6 0%, transparent 58%),
    linear-gradient(180deg, #f1f9f3 0%, #ffffff 90%);
  border-bottom: 1px solid var(--border);
}

.hero-inner {
  max-width: 780px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.hero-logo {
  padding: 7px;
  margin-bottom: 17px;
  background: white;
  border: 1px solid #dcebe0;
  border-radius: 23px;
  box-shadow: var(--shadow);
}

.hero-logo img {
  width: 104px;
  height: 104px;
  border-radius: 17px;
  object-fit: contain;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 9px;
  color: var(--primary);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 1.7px;
}

.hero h1 {
  max-width: 760px;
  margin: 0;
  color: #163b29;
  font-size: clamp(2rem, 5vw, 3.35rem);
  font-weight: 850;
  letter-spacing: -1.6px;
  line-height: 1.16;
}

.hero-description {
  max-width: 640px;
  margin: 19px 0 24px;
  color: #53685a;
  font-size: 1.05rem;
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  width: 100%;
}

.btn {
  min-height: 49px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 12px 21px;
  border: 1px solid transparent;
  border-radius: 11px;
  font-weight: 750;
  line-height: 1.4;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  color: #fff;
  background: var(--primary);
}

.btn-primary:hover {
  background: var(--primary-dark);
}

.btn-secondary {
  color: var(--primary-dark);
  background: #fff;
  border-color: #cbded1;
}

.btn-secondary:hover {
  background: var(--primary-light);
}

.btn-dark {
  color: #fff;
  background: #18372a;
}

.btn-dark:hover {
  background: #0c281b;
}

.download-btn {
  width: min(100%, 390px);
  justify-content: flex-start;
  margin-top: 16px;
  padding: 15px 19px;
  text-align: left;
}

.download-icon {
  display: grid;
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  place-items: center;
  color: #163d2a;
  background: #dff3e6;
  border-radius: 10px;
  font-size: 1.7rem;
  line-height: 1;
}

.download-btn strong,
.download-btn small {
  display: block;
}

.download-btn small {
  margin-top: 3px;
  color: #d7e7dc;
  font-size: 0.78rem;
  font-weight: 450;
}

.refer-card {
  width: min(100%, 390px);
  display: flex;
  align-items: center;
  gap: 13px;
  margin-top: 15px;
  padding: 15px 17px;
  color: var(--text);
  background: white;
  border: 1px solid #cfe2d5;
  border-radius: 13px;
  box-shadow: 0 4px 15px rgba(18, 107, 72, 0.05);
  text-align: left;
  cursor: pointer;
}

.refer-card:hover {
  border-color: var(--primary);
  background: #fbfefc;
}

.refer-icon {
  display: grid;
  width: 43px;
  height: 43px;
  flex-shrink: 0;
  place-items: center;
  color: var(--primary);
  background: var(--primary-light);
  border-radius: 10px;
  font-size: 1.5rem;
}

.refer-copy {
  display: flex;
  flex: 1;
  flex-direction: column;
  line-height: 1.5;
}

.refer-copy strong {
  font-size: 0.84rem;
  font-weight: 650;
}

.refer-copy > span {
  color: var(--primary);
  font-size: 1.15rem;
  font-weight: 850;
  letter-spacing: 0.5px;
}

.copy-label {
  padding: 6px 9px;
  color: var(--primary);
  background: var(--primary-light);
  border-radius: 7px;
  font-size: 0.72rem;
  font-weight: 850;
}

.copy-feedback {
  min-height: 24px;
  margin: 3px 0 0;
  color: var(--primary);
  font-size: 0.83rem;
}

.telegram-card {
  width: min(100%, 390px);
  display: flex;
  align-items: center;
  gap: 13px;
  margin-top: 8px;
  padding: 15px 17px;
  color: #145a8e;
  background: #edf7ff;
  border: 1px solid #c8e5fa;
  border-radius: 13px;
  text-align: left;
  text-decoration: none;
  transition: background 0.2s ease;
}

.telegram-card:hover {
  background: #dff0ff;
}

.telegram-icon {
  display: grid;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  place-items: center;
  color: white;
  background: var(--telegram);
  border-radius: 12px;
  font-size: 1.45rem;
}

.telegram-card > span:nth-child(2) {
  flex: 1;
}

.telegram-card strong,
.telegram-card small {
  display: block;
}

.telegram-card strong {
  font-size: 0.95rem;
}

.telegram-card small {
  margin-top: 2px;
  color: #54758c;
  font-size: 0.77rem;
  line-height: 1.5;
}

.telegram-arrow {
  font-size: 1.2rem;
  font-weight: 800;
}

.independent-note {
  max-width: 520px;
  margin: 19px 0 0;
  color: #718078;
  font-size: 0.8rem;
  line-height: 1.7;
}

/* Main content */

.content-section {
  padding-top: 43px;
}

.article-layout {
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
  align-items: start;
  gap: 30px;
}

.toc-panel {
  position: sticky;
  top: 96px;
  max-height: calc(100vh - 116px);
  overflow-y: auto;
  padding: 21px;
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 4px 16px rgba(20, 55, 38, 0.035);
}

.toc-panel h2 {
  margin: 0;
  font-size: 1.16rem;
  letter-spacing: -0.3px;
}

.toc-panel > p {
  margin: 5px 0 15px;
  color: var(--muted);
  font-size: 0.82rem;
}

.toc-links {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.toc-links a {
  padding: 7px 9px;
  color: #42594a;
  border-radius: 7px;
  font-size: 0.82rem;
  line-height: 1.5;
  text-decoration: none;
}

.toc-links a:hover {
  color: var(--primary-dark);
  background: var(--primary-light);
}

.article-content {
  min-width: 0;
  padding: 29px 32px;
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.article-section {
  padding: 0 0 28px;
  margin-bottom: 27px;
  border-bottom: 1px solid var(--border);
  scroll-margin-top: 100px;
}

.article-section:last-child {
  padding-bottom: 0;
  margin-bottom: 0;
  border-bottom: 0;
}

.article-section h2 {
  margin: 0 0 13px;
  color: #173f2b;
  font-size: clamp(1.3rem, 3vw, 1.7rem);
  font-weight: 800;
  letter-spacing: -0.6px;
  line-height: 1.35;
}

.article-section p {
  margin: 0 0 13px;
  color: #435349;
}

.article-section p:last-child {
  margin-bottom: 0;
}

.article-section ul,
.article-section ol {
  padding-left: 24px;
  color: #435349;
}

.article-section li {
  padding-left: 3px;
  margin-bottom: 7px;
}

.article-section li::marker {
  color: var(--primary);
}

.text-link {
  display: inline-block;
  margin-top: 6px;
  font-weight: 750;
}

.table-wrap {
  overflow-x: auto;
  margin-top: 19px;
  border: 1px solid var(--border);
  border-radius: 11px;
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

th,
td {
  padding: 13px 15px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

tr:last-child th,
tr:last-child td {
  border-bottom: 0;
}

th {
  width: 42%;
  color: #244b35;
  background: #f3f8f4;
  font-weight: 700;
}

td {
  overflow-wrap: anywhere;
  color: #48584e;
}

/* Referral code inside the article */

.inline-code-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin: 17px 0;
  padding: 15px;
  background: var(--primary-light);
  border: 1px solid #cfe4d5;
  border-radius: 12px;
}

.inline-code-card > span {
  display: flex;
  flex-direction: column;
}

.inline-code-card small {
  color: #567361;
  font-size: 0.8rem;
}

.inline-code-card strong {
  color: var(--primary-dark);
  font-size: 1.25rem;
  letter-spacing: 0.5px;
}

/* Screenshot placeholders */

.screenshot-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 13px;
  margin: 18px 0;
}

.screenshot-placeholder {
  min-width: 0;
  overflow: hidden;
  margin: 0;
  background: #f7faf8;
  border: 1px dashed #b8d2c0;
  border-radius: 12px;
}

.placeholder-art {
  display: grid;
  min-height: 140px;
  place-items: center;
  color: #91b4a0;
  background: linear-gradient(135deg, #edf6ef, #f8fbf8);
  font-size: 3rem;
}

.screenshot-placeholder figcaption {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 11px;
  line-height: 1.5;
}

.screenshot-placeholder figcaption strong {
  font-size: 0.83rem;
}

.screenshot-placeholder figcaption span {
  color: var(--muted);
  font-size: 0.72rem;
}

/* FAQ */

.faq-item {
  padding: 15px 0;
  border-bottom: 1px solid var(--border);
}

.faq-item:last-child {
  border-bottom: 0;
}

.faq-item summary {
  position: relative;
  padding-right: 20px;
  color: #264d36;
  font-weight: 750;
  cursor: pointer;
}

.faq-item p {
  padding-top: 10px;
  margin-bottom: 0;
}

/* Final call to action and disclaimer */

.final-cta {
  padding: 43px 0;
  background: #edf7f0;
  border-top: 1px solid #deebe1;
  border-bottom: 1px solid #deebe1;
}

.final-cta-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.final-cta h2 {
  margin: 0;
  color: #173e2b;
  font-size: clamp(1.6rem, 4vw, 2.25rem);
  line-height: 1.3;
}

.final-cta p {
  max-width: 600px;
  margin: 13px 0 22px;
  color: #53685a;
}

.disclaimer-box {
  margin: 32px auto;
  padding: 23px 25px;
  background: #fffdf6;
  border: 1px solid #eee4c8;
  border-radius: 13px;
}

.disclaimer-box h2 {
  margin: 0 0 7px;
  color: #695321;
  font-size: 1.1rem;
}

.disclaimer-box p {
  margin: 0;
  color: #655d4a;
  font-size: 0.9rem;
  line-height: 1.8;
}

/* Footer */

.site-footer {
  padding: 43px 0 0;
  color: #d7e4db;
  background: #12291e;
}

.footer-main {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 45px;
  padding-bottom: 31px;
}

.footer-logo {
  color: white;
}

.footer-logo img {
  width: 38px;
  height: 38px;
  background: white;
  border-radius: 9px;
  object-fit: contain;
}

.footer-brand p {
  max-width: 330px;
  margin: 15px 0 0;
  color: #b6c8bc;
  font-size: 0.88rem;
  line-height: 1.8;
}

.footer-links {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.footer-links h2 {
  margin: 0 0 7px;
  color: white;
  font-size: 0.98rem;
}

.footer-links a {
  color: #c5d5cb;
  font-size: 0.87rem;
  text-decoration: none;
}

.footer-links a:hover {
  color: white;
  text-decoration: underline;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 20px;
  padding: 17px 0;
  border-top: 1px solid #31463a;
}

.footer-bottom p {
  margin: 0;
  color: #aabdb0;
  font-size: 0.78rem;
}

/* Responsive layout */

@media (max-width: 980px) {
  .header-inner {
    min-height: 70px;
  }

  .menu-toggle {
    display: block;
  }

  .main-nav {
    position: absolute;
    top: calc(100% + 1px);
    right: 0;
    left: 0;
    display: none;
    align-items: stretch;
    flex-direction: column;
    gap: 0;
    padding: 10px 18px 16px;
    background: white;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 12px 20px rgba(20, 55, 38, 0.08);
  }

  .main-nav.is-open {
    display: flex;
  }

  .main-nav a {
    padding: 11px 7px;
    border-bottom: 1px solid #edf1ee;
  }

  .main-nav a:last-child {
    border-bottom: 0;
  }

  .article-layout {
    grid-template-columns: 1fr;
    gap: 19px;
  }

  .toc-panel {
    position: static;
    max-height: none;
  }

  .toc-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px;
  }
}

@media (max-width: 600px) {
  body {
    font-size: 15px;
    line-height: 1.75;
  }

  .container {
    width: min(100% - 26px, 1120px);
  }

  .section {
    padding: 39px 0;
  }

  .hero {
    padding-top: 37px;
    padding-bottom: 36px;
  }

  .hero-logo img {
    width: 88px;
    height: 88px;
  }

  .hero h1 {
    font-size: clamp(1.8rem, 8vw, 2.45rem);
    letter-spacing: -0.8px;
  }

  .hero-description {
    font-size: 0.95rem;
  }

  .hero-actions {
    gap: 9px;
  }

  .hero-actions .btn {
    flex: 1 1 140px;
    padding: 12px 13px;
    font-size: 0.88rem;
  }

  .download-btn,
  .refer-card,
  .telegram-card {
    width: 100%;
  }

  .content-section {
    padding-top: 25px;
  }

  .article-content {
    padding: 22px 17px;
  }

  .toc-panel {
    padding: 17px;
  }

  .toc-links {
    grid-template-columns: 1fr;
  }

  .article-section {
    padding-bottom: 23px;
    margin-bottom: 23px;
  }

  .article-section h2 {
    font-size: 1.35rem;
  }

  .screenshot-grid {
    grid-template-columns: 1fr;
  }

  .placeholder-art {
    min-height: 155px;
  }

  .inline-code-card {
    align-items: flex-start;
    flex-direction: column;
  }

  .inline-code-card .btn {
    width: 100%;
  }

  th,
  td {
    min-width: 130px;
    padding: 11px;
    font-size: 0.86rem;
  }

  .footer-main {
    grid-template-columns: 1fr 1fr;
    gap: 26px 18px;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }

  .footer-bottom {
    flex-direction: column;
  }

  .disclaimer-box {
    padding: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
