/*
  Guide page. Loaded after style.css and ui.css.
  Layout: hero → format switch → one block: coach card (step text, live "What you'll get" summary, prev/next)
  beside an interactive copy of the Mini App inside a phone. On phones the coach sits above the phone.
  Both formats share one grid cell so switching never moves the page.
*/

.guide-toggle2 { display: flex; justify-content: center; margin-bottom: 36px; }

.guide-panels { display: grid; }
.guide-panels > .guide-panel { display: block; grid-area: 1 / 1; visibility: hidden; opacity: 0; transition: opacity .3s ease, visibility 0s linear .3s; }
.guide-panels > .guide-panel.active { visibility: visible; opacity: 1; transition: opacity .3s ease, visibility 0s; }
.guide-panels > #panelVideo { align-self: center; }

/* ---------- block: coach + phone ---------- */
.sim { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 48px; align-items: center; max-width: 1000px; margin-inline: auto; }

.coach { padding: 28px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; align-content: start; }
.coach:hover { transform: none; }
.coach-steps { display: grid; }
.coach-step { grid-area: 1 / 1; min-width: 0; display: grid; gap: 10px; align-content: start; visibility: hidden; opacity: 0; transform: translateY(8px); transition: opacity .3s, transform .3s, visibility 0s linear .3s; }
.coach-step.on { visibility: visible; opacity: 1; transform: none; transition: opacity .3s, transform .3s, visibility 0s; }
.coach-badge { justify-self: start; font-size: 11px; font-weight: 800; letter-spacing: .1em; color: var(--h-blue); background: color-mix(in srgb, var(--h-blue) 12%, transparent); padding: 5px 12px; border-radius: 999px; }
.coach-title { font-family: var(--font-display); font-weight: 800; font-size: clamp(24px, 3vw, 32px); line-height: 1.1; letter-spacing: -0.02em; }
.coach-body { color: var(--h-muted); font-size: 15.5px; line-height: 1.65; }
.coach-body strong, .coach-body em { color: var(--h-fg); }
.coach-body code { font-size: .92em; background: color-mix(in srgb, var(--h-blue) 12%, transparent); padding: 1px 6px; border-radius: 6px; }
.coach-tip { display: grid; grid-template-columns: auto 1fr; gap: 10px; font-size: 14px; color: var(--h-muted); line-height: 1.55; background: color-mix(in srgb, var(--h-blue) 7%, transparent); border-radius: 12px; padding: 12px 14px; }
.tip-i { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 800; font-style: italic; color: var(--h-blue); background: color-mix(in srgb, var(--h-blue) 18%, transparent); }

/* live summary of the filters */
.sim-summary { border: 1.5px solid color-mix(in srgb, var(--h-ok) 55%, var(--h-line)); background: color-mix(in srgb, var(--h-ok) 7%, var(--h-surface)); border-radius: 16px; padding: 16px 18px; display: grid; gap: 8px; transition: border-color .3s, background .3s; }
.sim-summary.warn { border-color: color-mix(in srgb, #e0861f 70%, var(--h-line)); background: color-mix(in srgb, #e0861f 8%, var(--h-surface)); }
.sim-summary.bad { border-color: color-mix(in srgb, #e5484d 70%, var(--h-line)); background: color-mix(in srgb, #e5484d 8%, var(--h-surface)); }
.sim-summary.info { border-color: color-mix(in srgb, var(--h-blue) 50%, var(--h-line)); background: color-mix(in srgb, var(--h-blue) 7%, var(--h-surface)); }
.sim-summary.info .sim-sentence { font-size: 17px; color: var(--h-muted); }
.sim-summary[hidden] { display: none; }
.sim-summary-head { display: flex; align-items: center; gap: 10px; font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--h-muted); }
.sim-sentence { font-family: var(--font-display); font-weight: 600; font-size: 19px; line-height: 1.35; }
.sim-sentence mark { background: none; color: var(--h-blue); }
.sim-sentence.flash { animation: sim-flash .5s ease; }
@keyframes sim-flash { from { opacity: .35; transform: translateY(3px); } to { opacity: 1; transform: none; } }
.sim-notes { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 14px; line-height: 1.5; }
.sim-notes li { display: grid; grid-template-columns: 18px 1fr; gap: 6px; }
.sim-notes li::before { content: "✓"; font-weight: 800; color: var(--h-ok); }
.sim-notes li.warn::before { content: "!"; color: #e0861f; }
.sim-notes li.bad::before { content: "✕"; color: #e5484d; }
.sim-notes li.info::before { content: "i"; font-style: italic; color: var(--h-blue); }

.coach-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.coach-nav .btn { white-space: nowrap; }
.coach-nav .btn:disabled { opacity: .35; cursor: default; }
body.sr .coach-nav .btn-outline { color: var(--h-blue); border-color: var(--h-line); }
.coach-dots { display: flex; gap: 6px; }
.coach-dots button { width: 8px; height: 8px; border-radius: 999px; border: 0; padding: 0; background: color-mix(in srgb, var(--h-fg) 22%, transparent); cursor: pointer; transition: width .3s, background .3s; }
.coach-dots button.on { width: 22px; background: var(--h-blue); }

/* ---------- phone ---------- */
.phone { width: 340px; height: 660px; border-radius: 48px; padding: 11px; background: #0b1220; box-shadow: 0 0 0 2px #2a3550, 0 40px 80px -30px rgba(8,18,31,.6); position: relative; }
.phone::before { content: ""; position: absolute; top: 18px; left: 50%; width: 92px; height: 24px; margin-left: -46px; border-radius: 14px; background: #0b1220; z-index: 5; }
.phone-screen {
  position: relative; height: 100%; border-radius: 38px; overflow: hidden;
  /* the Mini App's own palette (spotrent-app/src/index.css), following the site theme */
  --ma-body: #e5e5ea; --ma-card: #ffffff; --ma-section: #f2f2f7; --ma-input: #e8e8ed; --ma-text: #1c1c1e; --ma-muted: #8e8e93;
  --ma-accent: #007aff; --ma-border: rgba(0,0,0,.08); --ma-tab: #e5e5ea; --ma-tab-on: #ffffff; --ma-off: rgba(0,0,0,.12);
  --tg-bg: #dfe8f0; --tg-bubble: #ffffff; --tg-out: #d9f7c6; --tg-bar: #ffffff;
  background: var(--ma-card); color: var(--ma-text); font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Inter, sans-serif;
}
:root[data-theme="dark"] .phone-screen {
  --ma-body: #0f0f18; --ma-card: #18181f; --ma-section: #23232d; --ma-input: #2c2c3a; --ma-text: #e8e8f0; --ma-muted: #8080a0;
  --ma-accent: #4a9eff; --ma-border: rgba(255,255,255,.07); --ma-tab: #0f0f18; --ma-tab-on: #2c2c3a; --ma-off: rgba(255,255,255,.15);
  --tg-bg: #0e1621; --tg-bubble: #182533; --tg-out: #2b5278; --tg-bar: #17212b;
}

/* Telegram chat (step 1) */
.tg { position: absolute; inset: 0; display: flex; flex-direction: column; background: var(--tg-bg); transition: transform .45s cubic-bezier(.2,.8,.2,1); }
.tg.away { transform: translateY(-6%) scale(.96); }
.tg-top { display: flex; align-items: center; gap: 10px; padding: 50px 16px 12px; background: var(--tg-bar); border-bottom: 1px solid var(--ma-border); }
.tg-top img { width: 34px; height: 34px; border-radius: 50%; }
.tg-top b { display: block; font-size: 15px; line-height: 1.2; }
.tg-top small { font-size: 12px; color: var(--ma-accent); }
.tg-msgs { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; gap: 8px; padding: 14px 12px; }
.tg-msg { align-self: flex-start; max-width: 86%; background: var(--tg-bubble); border-radius: 16px 16px 16px 4px; padding: 9px 12px; font-size: 14px; line-height: 1.45; box-shadow: 0 1px 1px rgba(0,0,0,.08); }
.tg-msg.out { align-self: flex-end; background: var(--tg-out); border-radius: 16px 16px 4px 16px; }
.tg-bar { display: flex; align-items: center; gap: 10px; padding: 10px 12px 22px; background: var(--tg-bar); }
.tg-menu { background: var(--ma-accent); color: #fff; border: 0; border-radius: 999px; padding: 8px 14px; font: 600 14px inherit; font-family: inherit; cursor: pointer; white-space: nowrap; }
.tg-input { color: var(--ma-muted); font-size: 14px; }

/* Mini App */
.ma { position: absolute; inset: 0; display: flex; flex-direction: column; background: var(--ma-card); padding-top: 40px; animation: ma-open .45s cubic-bezier(.2,.8,.2,1); }
.ma[hidden] { display: none; }
@keyframes ma-open { from { transform: translateY(100%); } to { transform: none; } }
.ma-tabs { display: flex; gap: 2px; margin: 8px 10px 0; padding: 3px; background: var(--ma-tab); border-radius: 12px; flex: none; }
.ma-tabs button { flex: 1; min-width: 0; display: flex; align-items: center; justify-content: center; gap: 4px; padding: 8px 4px; border: 0; background: none; color: var(--ma-muted); font: 500 11px inherit; font-family: inherit; border-radius: 9px; cursor: pointer; white-space: nowrap; transition: background .18s, color .18s; }
.ma-tabs button span:first-child { font-size: 13px; }
.ma-tabs button.icon-only { flex: 0 0 auto; padding: 8px 8px; }
.ma-tabs button.active { background: var(--ma-tab-on); color: var(--ma-accent); font-weight: 600; box-shadow: 0 1px 4px rgba(0,0,0,.25); }
/* the phone is narrower than the real Mini App card: inactive tabs show only their icon */
.ma-tabs button:not(.active) span + span { display: none; }
.ma-tabs button.active { flex: 2.4; }
.ma-content { flex: 1; overflow-y: auto; padding: 12px 12px 18px; scrollbar-width: thin; }
.ma-page { display: none; }
.ma-page.on { display: block; animation: ma-fade .25s ease; }
@keyframes ma-fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.ma-section { background: var(--ma-section); border-radius: 14px; padding: 12px; margin-bottom: 9px; font-size: 14px; }
.ma-section p { line-height: 1.5; }
.ma-section p + p { margin-top: 6px; }
.ma-title { font-size: 10.5px; font-weight: 600; color: var(--ma-muted); text-transform: uppercase; letter-spacing: .7px; margin-bottom: 9px; }
.ma-field { display: grid; gap: 5px; font-size: 12.5px; color: var(--ma-muted); margin-bottom: 9px; }
.ma-field:last-child { margin-bottom: 0; }
.ma-field input, .ma-field select, .ma-kw-row input { width: 100%; background: var(--ma-input); border: 1px solid var(--ma-border); border-radius: 10px; padding: 9px 11px; font: 15px inherit; font-family: inherit; color: var(--ma-text); outline: none; appearance: none; -moz-appearance: textfield; }
.ma-field input:focus, .ma-kw-row input:focus, .ma-field select:focus { border-color: var(--ma-accent); }
.ma-field input::-webkit-outer-spin-button, .ma-field input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.ma-field input.flag { border-color: #e0861f; box-shadow: 0 0 0 3px rgba(224,134,31,.18); }
.ma-hint { font-size: 12.5px; color: var(--ma-muted); margin-bottom: 8px; line-height: 1.45; }
.ma-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.ma-chip { padding: 5px 10px; border-radius: 18px; border: 1.5px solid var(--ma-border); background: var(--ma-input); color: var(--ma-text); font: 12.5px inherit; font-family: inherit; cursor: pointer; white-space: nowrap; transition: background .15s, color .15s, border-color .15s; }
.ma-chip.selected { background: var(--ma-accent); border-color: var(--ma-accent); color: #fff; }
.ma-toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--ma-text); font-size: 13.5px; line-height: 1.35; cursor: pointer; position: relative; margin-top: 4px; }
.ma-toggle-row input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.ma-toggle { flex: none; width: 46px; height: 27px; border-radius: 999px; background: var(--ma-off); position: relative; transition: background .2s; }
.ma-toggle::before { content: ""; position: absolute; top: 3px; left: 3px; width: 21px; height: 21px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: transform .2s; }
.ma-toggle-row input:checked + .ma-toggle { background: var(--ma-accent); }
.ma-toggle-row input:checked + .ma-toggle::before { transform: translateX(19px); }
.ma-toggle-row input:focus-visible + .ma-toggle { outline: 2px solid var(--ma-accent); outline-offset: 2px; }
.ma-save { width: 100%; margin-top: 4px; padding: 12px; border: 0; border-radius: 12px; background: var(--ma-accent); color: #fff; font: 600 15px inherit; font-family: inherit; cursor: pointer; }
.ma-kws { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 8px; }
.ma-kws:empty { display: none; }
.ma-kw { display: inline-flex; align-items: center; gap: 4px; padding: 4px 9px; border-radius: 14px; background: var(--ma-accent); color: #fff; font-size: 12.5px; animation: ma-fade .2s ease; }
.ma-kw button { background: none; border: 0; color: inherit; opacity: .75; cursor: pointer; font-size: 15px; line-height: 1; padding: 0; }
.ma-kw-row { display: flex; gap: 6px; }
.ma-add { flex: none; border: 0; border-radius: 10px; padding: 0 14px; background: var(--ma-accent); color: #fff; font: 600 13px inherit; font-family: inherit; cursor: pointer; }
.ma-add:disabled, .ma-kw-row input:disabled { opacity: .5; cursor: default; }
.ma-row { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding: 3px 0; }
.ma-row .ma-title { margin-bottom: 0; }
.ma-muted { color: var(--ma-muted); font-size: 12.5px; }
.ma-badge { display: inline-block; margin: 8px 0 6px; background: #f59e0b; color: #fff; font-size: 11px; font-weight: 700; letter-spacing: .5px; padding: 4px 10px; border-radius: 8px; }
.ma-countdown { font-size: 13px; color: #f59e0b; font-weight: 600; }
.ma-features { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 4px; font-size: 13px; }
.ma-features li::before { content: "✓ "; color: #22c55e; font-weight: 700; }
.ma-plan { border: 1.5px solid var(--ma-border); border-radius: 14px; padding: 12px; margin-bottom: 9px; background: var(--ma-section); font-size: 14px; }
.ma-plan .ma-row b { font-size: 15px; color: #3b82f6; }
.ma-plan.premium .ma-row b { color: #8b5cf6; }
.ma-durs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; margin-top: 10px; }
.ma-durs button { display: grid; gap: 2px; padding: 7px 4px; border-radius: 10px; border: 1.5px solid var(--ma-border); background: var(--ma-input); color: var(--ma-muted); font: 11.5px inherit; font-family: inherit; cursor: pointer; }
.ma-durs button b { font-size: 14px; color: var(--ma-text); }
.ma-durs button.on { border-color: var(--ma-accent); box-shadow: inset 0 0 0 1px var(--ma-accent); }
.ma-ol { padding-left: 18px; display: grid; gap: 5px; font-size: 13px; line-height: 1.45; }
.ma-link { color: var(--ma-accent); text-decoration: none; font-size: 14px; }

/* hotspot: "tap here" pulse over the element the current step is about */
.hotspot { position: absolute; z-index: 6; pointer-events: none; border-radius: 14px; box-shadow: 0 0 0 2px var(--h-blue); opacity: 0; transition: left .35s ease, top .35s ease, width .35s ease, height .35s ease, opacity .25s; }
.hotspot.on { opacity: 1; animation: hs-pulse 1.6s ease-out infinite; }
@keyframes hs-pulse { 0% { box-shadow: 0 0 0 2px var(--h-blue), 0 0 0 0 color-mix(in srgb, var(--h-blue) 55%, transparent); } 100% { box-shadow: 0 0 0 2px var(--h-blue), 0 0 0 14px transparent; } }

.ma-toast { position: absolute; z-index: 7; left: 50%; bottom: 26px; transform: translateX(-50%); max-width: 86%; background: rgba(20,24,32,.94); color: #fff; font-size: 13px; line-height: 1.4; text-align: center; padding: 10px 14px; border-radius: 12px; box-shadow: 0 10px 30px -10px rgba(0,0,0,.6); animation: ma-fade .2s ease; }

/* ---------- video ---------- */
.video2 { max-width: 720px; margin-inline: auto; aspect-ratio: 16 / 9; display: grid; place-content: center; justify-items: center; gap: 10px; text-align: center; padding: 24px; }
.video2:hover { transform: none; }
.video2-play { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--h-blue) 15%, transparent); color: var(--h-blue); font-size: 22px; padding-left: 4px; margin-bottom: 6px; }
.video2 b { font-family: var(--font-display); font-size: 22px; }
.video2 p { color: var(--h-muted); max-width: 46ch; }

@media (max-width: 900px) {
  .sim { grid-template-columns: 1fr; gap: 20px; max-width: 520px; }
  .phone { justify-self: center; }
}
@media (max-width: 640px) {
  .coach { padding: 20px; gap: 14px; border-radius: 20px; }
  .coach-title { font-size: 24px; }
  .coach-body { font-size: 14.5px; }
  .coach-tip { display: none; }
  /* dots get their own row; the two buttons share the next one */
  .coach-nav { flex-wrap: wrap; row-gap: 14px; }
  .coach-dots { order: -1; width: 100%; justify-content: center; }
  .coach-nav .btn { flex: 1 1 0; justify-content: center; padding: 11px 12px; }
  .sim-sentence { font-size: 17px; }
  .phone { width: min(340px, 100%); height: 620px; border-radius: 42px; padding: 9px; }
  .phone-screen { border-radius: 34px; }
  .video2 { aspect-ratio: 4 / 3; }
}
@media (prefers-reduced-motion: reduce) {
  .guide-panels > .guide-panel, .coach-step, .tg { transition: none; }
  .ma, .ma-page.on, .hotspot.on, .sim-sentence.flash, .ma-kw { animation: none; }
}
