:root {
  color-scheme: light dark;
  --bg: var(--tg-theme-bg-color, #ffffff);
  --text: var(--tg-theme-text-color, #111111);
  --hint: var(--tg-theme-hint-color, #707579);
  --accent: var(--tg-theme-button-color, #2ea6ff);
  --accent-text: var(--tg-theme-button-text-color, #ffffff);
  --card-bg: #f4f4f2;
  --card-text: #111111;
  --card-hint: #6b6b6b;
  --dark-card-bg: #111111;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.article {
  max-width: 640px;
  margin: 0 auto;
  padding-bottom: 32px;
}

.hero {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  display: block;
  background: #d9d9d9;
}

.content {
  padding: 20px 16px 8px;
}

.title {
  font-size: 26px;
  font-weight: 800;
  line-height: 1.25;
  margin: 0 0 10px;
}

.subtitle {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--hint);
  margin: 0 0 4px;
}

.content h2 {
  font-size: 20px;
  font-weight: 800;
  line-height: 1.3;
  margin: 28px 0 12px;
}

.content p {
  font-size: 16px;
  line-height: 1.55;
  margin: 0 0 14px;
}

.content b {
  font-weight: 700;
}

blockquote {
  margin: 0 0 16px;
  padding: 14px 16px;
  background: var(--card-bg);
  color: var(--card-text);
  border-left: 3px solid var(--accent);
  border-radius: 8px;
  font-style: italic;
  font-size: 15px;
  line-height: 1.5;
}

/* case cards */
.case-card {
  border-radius: 14px;
  overflow: hidden;
  background: var(--card-bg);
  color: var(--card-text);
  margin-bottom: 16px;
}

.case-card-empty .case-card-body {
  padding-top: 16px;
}

.case-card img {
  width: 100%;
  display: block;
  object-fit: cover;
  max-height: 420px;
}

.case-card-screenshot img {
  object-fit: contain;
  background: #000;
}

.case-card-body {
  padding: 14px 16px;
}

.case-card-title {
  font-weight: 700;
  font-size: 15px;
  margin-bottom: 6px;
  color: var(--card-text);
}

.case-card-row {
  font-size: 14px;
  color: var(--card-hint);
  margin-bottom: 4px;
}

.case-card-result {
  font-size: 22px;
  font-weight: 800;
  margin-top: 6px;
  color: var(--card-text);
}

/* video */
.video-block {
  margin-bottom: 18px;
  border-radius: 14px;
  overflow: hidden;
}

.video-block video {
  width: 100%;
  display: block;
  background: #000;
}

/* before/after */
.before-after {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 16px;
}

.before-after-item {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
}

.before-after-item img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  display: block;
}

.before-after-item span {
  position: absolute;
  bottom: 8px;
  left: 8px;
  background: rgba(0,0,0,0.6);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
}

/* photo rows */
.photo-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-bottom: 16px;
}

.photo-row-2 {
  grid-template-columns: 1fr 1fr;
}

.single-photo {
  width: 100%;
  max-height: 360px;
  object-fit: cover;
  border-radius: 12px;
  display: block;
  margin-bottom: 16px;
}

.photo-row img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 8px;
  display: block;
}

/* flow chain */
.flow-chain {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.flow-chain span {
  background: var(--card-bg);
  color: var(--card-text);
  border-radius: 8px;
  padding: 8px 12px;
  font-weight: 700;
  font-size: 13px;
}

.route-chain {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.route-chain span {
  background: var(--dark-card-bg);
  color: #fff;
  border-radius: 10px;
  padding: 12px 14px;
  font-weight: 700;
  font-size: 14px;
}

/* step cards */
.step-card {
  background: var(--card-bg);
  color: var(--card-text);
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 12px;
}

.step-num {
  font-size: 13px;
  font-weight: 800;
  color: var(--accent);
  margin-bottom: 4px;
}

.step-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--card-text);
}

.step-card p {
  font-size: 14px;
  margin: 0;
  color: var(--card-text);
}

/* numbered / check lists */
.numbered-list {
  padding-left: 20px;
  margin: 0 0 16px;
}

.numbered-list li {
  font-size: 15px;
  line-height: 1.5;
  margin-bottom: 12px;
}

.check-list {
  list-style: none;
  padding: 0;
  margin: 0 0 8px;
}

.check-list li {
  font-size: 15px;
  line-height: 1.5;
  margin-bottom: 8px;
  padding-left: 24px;
  position: relative;
}

.check-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

.price {
  font-size: 15px;
  margin-bottom: 16px;
}

.fine-print {
  font-size: 13px;
  color: var(--hint);
  text-align: center;
  margin-top: 10px;
}

/* lessons */
.lesson-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.lesson {
  background: var(--dark-card-bg);
  color: #fff;
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 13px;
  font-weight: 800;
}

.lesson span {
  display: block;
  font-weight: 500;
  font-size: 14px;
  margin-top: 4px;
}

/* CTA buttons */
.cta-button {
  width: 100%;
  border: none;
  border-radius: 12px;
  padding: 16px;
  font-size: 16px;
  font-weight: 700;
  background: var(--accent);
  color: var(--accent-text);
  cursor: pointer;
}

.cta-button:active {
  opacity: 0.85;
}

.cta-button-buy {
  background: var(--dark-card-bg);
  color: #fff;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.cta {
  position: sticky;
  bottom: 0;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: linear-gradient(to top, var(--bg) 60%, transparent);
}
