/* egoapp.fit — shared styles for guides, tools, pricing, about, policies, ru/fr homes.
   Tokens follow the iOS app and home.css: #111111 / #191919 surfaces, copper accent, hairlines.
   The English home page uses home.css. */

:root {
  color-scheme: dark;
  --bg: #111111;
  --panel: #191919;
  --card: #191919;
  --raised: #232323;
  --text: #f1f1f1;
  --text-2: rgba(241, 241, 241, 0.64);
  --muted: #9a9a9a;
  --line: rgba(255, 255, 255, 0.08);
  --hair: rgba(255, 255, 255, 0.08);
  --accent: #de9a69;
  --ok: #4cc38a;
  --danger: #e06a5a;
  /* legacy names still referenced by a few pages: all resolve to the one accent */
  --green: #de9a69;
  --coral: #de9a69;
  --blue: #de9a69;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", "Segoe UI", system-ui, sans-serif;
  --font-display: "Bricolage Grotesque", -apple-system, "Helvetica Neue", sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0;
}

body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }

a { color: inherit; }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: 0; text-wrap: balance; }

a:focus-visible, button:focus-visible, select:focus-visible, input:focus-visible, summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* ---------- header (guides, tools, policies) ---------- */

.policy-header {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  padding: 0 clamp(16px, 4vw, 48px);
  background: rgba(17, 17, 17, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--hair);
}

.policy-logo-link { display: inline-flex; align-items: center; }
.policy-logo-link img { width: 64px; height: auto; }

.policy-nav { display: flex; align-items: center; gap: clamp(16px, 3vw, 28px); }

.policy-nav a,
.policy-support-link {
  color: var(--text-2);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  transition: color 160ms var(--ease);
}

.policy-nav a:hover,
.policy-support-link:hover,
.policy-nav a[aria-current="page"] { color: var(--text); }

/* auth-nav.js appends the Sign in / Account link to .policy-nav */
.policy-nav .auth-login-button,
.auth-login-button {
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 0 16px;
  border-radius: 18px;
  background: var(--text);
  color: var(--bg);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 160ms var(--ease), transform 160ms var(--ease);
}

.auth-login-button:hover { background: #ffffff; color: var(--bg); }
.auth-login-button:active { transform: scale(0.97); }

/* the English home (ru/fr still use this markup) */
.global-auth-header {
  position: relative;
  z-index: 5;
  display: flex;
  justify-content: flex-end;
  width: min(1240px, 100%);
  margin: 0 auto;
}

/* ---------- guide pages ---------- */

.guide-page { background: var(--bg); }

.guide-content {
  width: min(720px, calc(100% - 32px));
  margin: 0 auto;
  padding: clamp(32px, 6vw, 56px) 0 64px;
}

.guide-breadcrumbs { margin: 0 0 24px; color: var(--muted); font-size: 14px; }
.guide-breadcrumbs a { color: var(--muted); text-decoration: none; }
.guide-breadcrumbs a:hover { color: var(--text); }

.guide-content h1 {
  font-family: var(--font-display);
  font-size: clamp(32px, 4.6vw, 44px);
  line-height: 1.08;
  letter-spacing: -0.01em;
}

.guide-byline { margin: 14px 0 0; color: var(--muted); font-size: 14px; }
.guide-byline a { color: var(--text-2); }

.guide-lede { margin: 20px 0 0; color: var(--text-2); font-size: 18px; line-height: 1.55; }

.guide-content h2 {
  margin: 48px 0 12px;
  font-family: var(--font-display);
  font-size: 28px;
  line-height: 1.15;
}

.guide-content h3 { margin: 28px 0 8px; font-size: 18px; line-height: 1.3; }

.guide-content p,
.guide-content li { color: var(--text-2); font-size: 17px; line-height: 1.6; }
.guide-content p { margin: 0 0 16px; }
.guide-content strong { color: var(--text); font-weight: 600; }
.guide-content ul, .guide-content ol { margin: 0 0 16px; padding-left: 24px; }
.guide-content li { margin-bottom: 8px; }

.guide-content a {
  color: var(--text);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-decoration-color: rgba(241, 241, 241, 0.3);
  text-underline-offset: 4px;
  transition: text-decoration-color 160ms var(--ease);
}
.guide-content a:hover { text-decoration-color: var(--accent); }

.guide-feature { margin: 28px 0 8px; }
.guide-feature img { width: 100%; border: 1px solid var(--hair); border-radius: 16px; }

.guide-shot { margin: 28px 0; }
.guide-shot img { width: min(300px, 70%); margin: 0 auto; border: 1px solid var(--hair); border-radius: 28px; }
.guide-shot figcaption { margin-top: 10px; color: var(--muted); font-size: 14px; text-align: center; }

/* numbered steps: the number is information here, so it stays */
.guide-steps {
  counter-reset: gstep;
  list-style: none;
  padding: 0;
  margin: 20px 0 24px;
  display: grid;
  gap: 0;
}

.guide-steps li {
  position: relative;
  padding: 20px 0 20px 56px;
  margin: 0;
  border-top: 1px solid var(--hair);
}
.guide-steps li:last-child { border-bottom: 1px solid var(--hair); }

.guide-steps li::before {
  counter-increment: gstep;
  content: counter(gstep, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 22px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.guide-steps strong { display: block; margin-bottom: 4px; color: var(--text); font-weight: 600; font-size: 17px; }
.guide-steps p { margin: 0; font-size: 16px; }

.guide-table-wrap { overflow-x: auto; margin: 16px 0 8px; border: 1px solid var(--hair); border-radius: 12px; }
.guide-content table { width: 100%; min-width: 520px; border-collapse: collapse; font-size: 15px; line-height: 1.45; }
.guide-content th, .guide-content td { padding: 12px 14px; border-top: 1px solid var(--hair); text-align: left; vertical-align: top; color: var(--text-2); }
.guide-content thead th { border-top: 0; color: var(--muted); font-size: 13px; font-weight: 500; }
.guide-content td:first-child { color: var(--text); font-weight: 500; }

/* FAQ as hairline rows */
.faq-list { display: grid; gap: 0; margin-top: 24px; }
.faq-list details { border-top: 1px solid var(--hair); }
.faq-list details:last-child { border-bottom: 1px solid var(--hair); }

.faq-list summary {
  position: relative;
  padding: 16px 40px 16px 0;
  color: var(--text);
  font-size: 17px;
  font-weight: 500;
  line-height: 1.4;
  cursor: pointer;
  list-style: none;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: "+";
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 20px;
  font-weight: 400;
}
.faq-list details[open] summary::after { content: "\2212"; }
.faq-list .faq-a { padding: 0 0 20px; max-width: 68ch; color: var(--text-2); font-size: 16px; line-height: 1.6; }
.faq-list .faq-a a { color: var(--text); }

/* CTA: a quiet card, one action */
.guide-cta {
  display: grid;
  justify-items: start;
  gap: 12px;
  margin: 48px 0 0;
  padding: 28px;
  border: 1px solid var(--hair);
  border-radius: 20px;
  background: var(--card);
}

.guide-cta h2 { margin: 0; font-size: 26px; }
.guide-cta p { margin: 0; }
.guide-cta-alt { color: var(--muted); font-size: 15px; }
.guide-cta-alt a { color: var(--text-2); }

.app-store-button { display: inline-flex; width: 160px; border-radius: 8px; text-decoration: none; }
.app-store-button img { width: 100%; height: auto; }

.guide-related { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--hair); }
.guide-related h2 { margin: 0 0 12px; font-size: 20px; }
.guide-related ul { padding: 0; list-style: none; }
.guide-related li { margin: 0; padding: 8px 0; border-top: 1px solid var(--hair); font-size: 16px; }
.guide-related li:first-child { border-top: 0; }
.guide-related a { text-decoration: none; color: var(--text-2); }
.guide-related a:hover { color: var(--text); }

/* ---------- guides hub ---------- */

.guides-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 40px;
  margin: 32px 0 0;
  padding: 0;
  list-style: none;
}

.guides-grid li { margin: 0; border-top: 1px solid var(--hair); }
.guides-grid li:nth-last-child(-n + 2) { border-bottom: 1px solid var(--hair); }
.guides-grid li.guide-featured { grid-column: 1 / -1; }
.guides-grid li.guide-featured + li + li { border-top: 1px solid var(--hair); }

.guides-grid a { display: grid; gap: 4px; padding: 16px 0; text-decoration: none; }
.guides-grid h3 { margin: 0; color: var(--text); font-size: 17px; line-height: 1.35; }
.guides-grid p { margin: 0; color: var(--text-2); font-size: 15px; line-height: 1.5; }
.guides-grid a:hover p { color: var(--text); }
.guides-grid .guide-more { margin-top: 4px; color: var(--accent); font-size: 14px; font-weight: 500; }

/* ---------- policy pages ---------- */

.policy-page { background: var(--bg); }
.policy-content { width: min(760px, calc(100% - 32px)); margin: 0 auto; padding: clamp(32px, 6vw, 56px) 0 80px; }
.policy-content h1 { font-family: var(--font-display); font-size: clamp(32px, 4.6vw, 44px); line-height: 1.08; }
.policy-updated { margin-top: 12px; color: var(--muted); font-size: 14px; }
.policy-content section { margin-top: 32px; }
.policy-content h2 { margin: 0 0 12px; font-family: var(--font-display); font-size: 26px; line-height: 1.15; }
.policy-content h3 { margin: 24px 0 8px; font-size: 18px; line-height: 1.3; }
.policy-content p, .policy-content li { color: var(--text-2); font-size: 17px; line-height: 1.6; }
.policy-content p { margin: 0 0 16px; }
.policy-content a { color: var(--text); text-decoration-thickness: 1px; text-underline-offset: 4px; }

/* ---------- tools: workout plan generator (.wpg-*) and goal date calculator (.gfc-*) ---------- */

.wpg-tool, .gfc-tool {
  margin: 28px 0 8px;
  padding: 24px;
  border: 1px solid var(--hair);
  border-radius: 20px;
  background: var(--card);
}

.wpg-grid, .gfc-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }

.wpg-field label, .gfc-field label, .gfc-field legend {
  display: block;
  margin-bottom: 6px;
  padding: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
}

.gfc-field fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
.gfc-unit { color: var(--muted); font-weight: 400; }

.wpg-field select, .gfc-field select, .gfc-field input {
  width: 100%;
  height: 44px;
  padding: 0 12px;
  border: 1px solid var(--hair);
  border-radius: 10px;
  background: var(--raised);
  color: var(--text);
  font: inherit;
  font-size: 16px;
}

/* one chevron on every platform: 16px, 1.5 stroke, muted, 12px from the edge */
.wpg-field select, .gfc-field select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%239a9a9a' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px 16px;
}

.wpg-field select:hover, .gfc-field select:hover { border-color: rgba(255, 255, 255, 0.16); }

/* number inputs: no spinner buttons, the steppers are the page's own +/- in the app, not here */
.gfc-field input[type="number"] { -moz-appearance: textfield; appearance: textfield; }
.gfc-field input[type="number"]::-webkit-outer-spin-button,
.gfc-field input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.gfc-pair { display: flex; gap: 8px; }
.gfc-pair[hidden] { display: none; }
.gfc-wide { grid-column: 1 / -1; }

.wpg-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 20px; }

.wpg-btn, .gfc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 0 20px;
  border: 0;
  border-radius: 10px;
  background: var(--text);
  color: var(--bg);
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 160ms var(--ease), transform 160ms var(--ease);
}
.gfc-btn { margin-top: 20px; }
.wpg-btn:hover, .gfc-btn:hover { background: #ffffff; }
.wpg-btn:active, .gfc-btn:active { transform: scale(0.97); }
.wpg-btn-ghost { background: var(--raised); color: var(--text); border: 1px solid var(--hair); }
.wpg-btn-ghost:hover { background: #2a2a2a; }

.wpg-split-line { margin: 28px 0 4px; color: var(--text); font-size: 22px; font-weight: 600; font-family: var(--font-display); }
.wpg-source-line { margin: 0 0 12px; color: var(--muted); font-size: 14px; }

/* a day of the plan: the app's exercise rows, quiet */
.wpg-day { margin: 12px 0 0; padding: 16px 20px; border-radius: 16px; background: var(--card); border: 1px solid var(--hair); }
.wpg-day h3 { margin: 0 0 8px; font-size: 17px; color: var(--text); }
.wpg-day h3 span { color: var(--muted); font-weight: 500; margin-right: 8px; font-variant-numeric: tabular-nums; }

.wpg-ex { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 10px 0; border-top: 1px solid var(--hair); }
.wpg-ex:first-of-type { border-top: 0; }
.wpg-ex .n { font-size: 15px; color: var(--text); }
.wpg-ex .s { flex-shrink: 0; font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; }

.wpg-note, .gfc-note { margin: 16px 0 0; padding: 0 0 0 16px; border-left: 2px solid var(--hair); color: var(--text-2); font-size: 15px; line-height: 1.55; }

.wpg-upsell, .gfc-upsell {
  display: grid;
  justify-items: start;
  gap: 12px;
  margin-top: 20px;
  padding: 20px;
  border: 1px solid var(--hair);
  border-radius: 16px;
  background: var(--card);
}
.wpg-upsell p, .gfc-upsell p { margin: 0; color: var(--text-2); font-size: 15px; }

.gfc-result { margin-top: 24px; }
.gfc-date { margin: 0 0 6px; color: var(--text); font-family: var(--font-display); font-size: 28px; font-weight: 600; line-height: 1.15; }
.gfc-date strong { color: var(--accent); font-weight: 600; }
.gfc-sub { margin: 0; color: var(--text-2); font-size: 16px; }

.gfc-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin: 20px 0 0; padding: 16px 0; border-top: 1px solid var(--hair); border-bottom: 1px solid var(--hair); }
.gfc-stat { padding: 0; border: 0; background: none; }
.gfc-stat span { display: block; color: var(--muted); font-size: 13px; }
.gfc-stat b { font-size: 22px; font-weight: 600; font-variant-numeric: tabular-nums; }

/* ---------- footer ---------- */

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 24px;
  width: min(1120px, calc(100% - 32px));
  margin: 48px auto 0;
  padding: 24px 0 40px;
  border-top: 1px solid var(--hair);
  color: var(--muted);
  font-size: 14px;
}
.site-footer a { padding: 4px 0; text-decoration: none; }
.site-footer a:hover { color: var(--text); }

/* ---------- ru / fr home (old markup, quiet) ---------- */

.home-page { overflow-x: hidden; }
.home-shell { position: relative; display: grid; min-height: 100svh; padding: clamp(16px, 4vw, 48px) clamp(16px, 4vw, 64px) 24px; }
.site-main { display: grid; gap: clamp(64px, 8vw, 96px); width: 100%; }
.site-main > * { min-width: 0; max-width: 100%; }

.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(360px, 0.8fr); align-items: center; gap: clamp(32px, 5vw, 64px); width: min(1120px, 100%); margin: 0 auto; }
.hero-copy { display: grid; justify-items: start; gap: 20px; }
.hero-logo { width: 64px; height: auto; }
.hero-kicker { margin: 0; color: var(--muted); font-size: 15px; font-weight: 500; }
.hero h1 { max-width: 14ch; font-family: var(--font-display); font-size: clamp(36px, 4.6vw, 56px); line-height: 1.06; letter-spacing: -0.01em; }
.hero-subtitle { max-width: 44ch; margin: 0; color: var(--text-2); font-size: 19px; font-weight: 400; line-height: 1.5; }
.hero-note { max-width: 44ch; margin: 0; color: var(--muted); font-size: 16px; line-height: 1.5; }
.hero-cta-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.cta-band .hero-cta-row { justify-content: center; }

.web-subscribe-cta, .secondary-cta { display: inline-flex; align-items: center; height: 40px; padding: 0 16px; border: 1px solid var(--hair); border-radius: 10px; background: var(--raised); color: var(--text); font-size: 15px; font-weight: 500; text-decoration: none; white-space: nowrap; }
.web-subscribe-cta:hover, .secondary-cta:hover { background: #2a2a2a; }

.hero-visual { position: relative; justify-self: center; width: min(360px, 100%); }
.hero-visual::before { display: none; }
.phone-mockups { width: 100%; height: auto; }
.wearable-system { display: none; }
.hero-proof { display: none; }

.feature-band, .workflow-band, .integration-band, .shots-band, .faq-band, .guides-band, .cta-band { width: min(1120px, 100%); margin: 0 auto; }
.section-copy { display: grid; gap: 12px; max-width: 640px; }
.section-kicker { margin: 0; color: var(--muted); font-size: 15px; font-weight: 500; }
.section-copy h2 { margin: 0; font-family: var(--font-display); font-size: clamp(28px, 3.4vw, 40px); line-height: 1.08; }
.section-copy p { margin: 0; color: var(--text-2); font-size: 17px; line-height: 1.55; }

.feature-grid, .workflow-list { list-style: none; padding: 0; }
.feature-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 32px 0 0; }
.feature-grid li { padding: 24px; border: 1px solid var(--hair); border-radius: 16px; background: var(--card); }
.feature-grid h3, .workflow-list h3 { margin: 0; color: var(--text); font-size: 18px; line-height: 1.3; }
.feature-grid p, .workflow-list p { margin: 8px 0 0; color: var(--text-2); font-size: 15px; line-height: 1.5; }

.workflow-band { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 48px; align-items: start; }
.workflow-list { display: grid; gap: 0; margin: 0; }
.workflow-list li { position: relative; padding: 20px 0 20px 56px; border-top: 1px solid var(--hair); }
.workflow-list li:last-child { border-bottom: 1px solid var(--hair); }
.workflow-list span { position: absolute; left: 0; top: 22px; color: var(--muted); font-size: 15px; font-weight: 500; font-variant-numeric: tabular-nums; }

.integration-band { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 32px; padding: 32px; border: 1px solid var(--hair); border-radius: 20px; background: var(--card); }

.shots-scroller { display: grid; grid-auto-flow: column; grid-auto-columns: 220px; gap: 16px; margin-top: 32px; padding-bottom: 16px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: thin; scrollbar-color: var(--hair) transparent; }
.shots-scroller figure { margin: 0; scroll-snap-align: start; }
.shots-scroller img { width: 100%; border: 1px solid var(--hair); border-radius: 20px; background: var(--card); }
.shots-scroller figcaption { margin-top: 10px; color: var(--muted); font-size: 14px; }

.cta-band { display: grid; justify-items: center; gap: 16px; padding: 56px 32px; border: 1px solid var(--hair); border-radius: 20px; background: var(--card); text-align: center; }
.cta-band h2 { margin: 0; font-family: var(--font-display); font-size: clamp(28px, 3.4vw, 40px); line-height: 1.08; }
.cta-band p { margin: 0; max-width: 48ch; color: var(--text-2); font-size: 17px; }
.cta-icon { width: 72px; height: 72px; border-radius: 16px; }

/* ---------- responsive ---------- */

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; }
  .hero-visual { display: none; }
  .feature-grid { grid-template-columns: 1fr 1fr; }
  .workflow-band, .integration-band { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .policy-header { height: 64px; }
  .policy-logo-link img { width: 56px; }
  .policy-nav { gap: 14px; }
  .policy-nav a, .policy-support-link { font-size: 14px; }
  .guide-content h1, .policy-content h1 { font-size: 32px; }
  .guide-content h2, .policy-content h2 { font-size: 24px; }
  .guide-content p, .guide-content li { font-size: 16px; }
  .guides-grid { grid-template-columns: 1fr; }
  .guides-grid li:nth-last-child(-n + 2) { border-bottom: 0; }
  .guides-grid li:last-child { border-bottom: 1px solid var(--hair); }
  .guide-cta { padding: 20px; }
  .wpg-grid, .gfc-grid { grid-template-columns: 1fr; }
  .wpg-tool, .gfc-tool { padding: 16px; }
  .wpg-ex { flex-direction: column; gap: 2px; align-items: flex-start; }
  .gfc-stats { grid-template-columns: 1fr; gap: 12px; }
  .feature-grid { grid-template-columns: 1fr; }
  .shots-scroller { grid-auto-columns: 180px; }
  .cta-band { padding: 40px 20px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
