/* ===== App Flow page ===== */

.subnav { display: flex; align-items: center; gap: 10px; }
.subnav .back {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 16px; border-radius: 999px;
  border: 1px solid var(--border-strong); color: var(--text);
  transition: transform 180ms ease, background-color 180ms ease, border-color 180ms ease;
}
.subnav .back:hover, .subnav .back:focus-visible { transform: translateY(-1px); background: rgba(255,255,255,0.04); outline: none; }

.flow-hero { text-align: left; }
.flow-hero .lede { margin-bottom: 4px; }

/* Steps */
.flow-steps { display: grid; gap: 24px; margin-top: 24px; }

.flow-row {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 40px;
  align-items: center;
  padding: 34px;
}
.flow-row:nth-child(even) { grid-template-columns: 360px 1fr; }
.flow-row:nth-child(even) .flow-row-copy { order: 2; }
.flow-row:nth-child(even) .flow-row-phone { order: 1; }

.flow-row-copy .step-badge {
  display: inline-flex; align-items: center; gap: 10px;
  margin-bottom: 18px;
}
.step-num {
  display: inline-grid; place-items: center;
  width: 34px; height: 34px; border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), var(--accent-3));
  color: #10151d; font-weight: 800; font-size: 0.95rem;
}
.step-badge .step-ic { width: 30px; height: 30px; }
.step-badge .step-ic img { width: 100%; height: 100%; display: block; }

.flow-row-copy h2 { font-size: clamp(1.9rem, 3.2vw, 2.7rem); line-height: 1.03; margin-bottom: 12px; }
.flow-row-copy p { color: var(--muted); margin: 0 0 16px; max-width: 46ch; }
.flow-row-copy .mini-list { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.flow-row-copy .mini-list li { position: relative; padding-left: 24px; color: rgba(244,239,230,0.9); font-size: 0.98rem; }
.flow-row-copy .mini-list li::before {
  content: ""; position: absolute; left: 0; top: 0.5em; width: 11px; height: 11px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); box-shadow: 0 0 0 4px rgba(255,255,255,0.04);
}

.flow-row-phone { display: grid; place-items: center; }

/* ===== Phone mockup ===== */
.phone {
  width: 300px; max-width: 100%;
  border-radius: 42px; padding: 12px;
  background: #05070c;
  box-shadow: 0 40px 80px -30px rgba(0,0,0,0.85), 0 0 0 1px rgba(255,255,255,0.06);
}
.phone-screen {
  position: relative; overflow: hidden;
  border-radius: 32px; min-height: 600px; padding: 22px 18px;
  background:
    radial-gradient(circle at 20% 0%, rgba(247,178,103,0.12), transparent 42%),
    radial-gradient(circle at 90% 8%, rgba(140,168,255,0.14), transparent 40%),
    linear-gradient(180deg, #101827, #0b111d);
  color: var(--text);
}
.scr-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.scr-kicker { font-size: 0.66rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.scr-title { font-family: "Fraunces", Georgia, serif; font-size: 1.45rem; letter-spacing: -0.02em; margin: 0 0 14px; line-height: 1.05; }
.scr-dot { width: 30px; height: 30px; border-radius: 10px; background: rgba(255,255,255,0.06); border: 1px solid var(--border); display: grid; place-items: center; }
.scr-dot img { width: 18px; height: 18px; }

/* chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: 8px 12px; border-radius: 999px; font-size: 0.82rem; font-weight: 600;
  border: 1px solid var(--border); background: rgba(255,255,255,0.04); color: rgba(244,239,230,0.9);
}
.chip--on { background: linear-gradient(135deg, rgba(247,178,103,0.9), rgba(140,168,255,0.9)); color: #10151d; border-color: transparent; }
.seg { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.seg .chip { white-space: nowrap; }

.scr-label { font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); font-weight: 700; margin: 20px 0 10px; }

/* story cards */
.story-card {
  position: relative; overflow: hidden;
  border-radius: 18px; padding: 16px; border: 1px solid var(--border);
  background: linear-gradient(150deg, rgba(247,178,103,0.16), rgba(140,168,255,0.14) 60%, rgba(17,24,34,0.7));
}
.story-card + .story-card { margin-top: 10px; }
.story-card.small { background: rgba(255,255,255,0.03); }
.story-card .meta { display: flex; gap: 6px; margin-bottom: 8px; }
.tag { font-size: 0.64rem; letter-spacing: 0.08em; text-transform: uppercase; font-weight: 700; padding: 4px 8px; border-radius: 999px; background: rgba(255,255,255,0.1); color: rgba(244,239,230,0.9); }
.story-card h4 { font-family: "Fraunces", Georgia, serif; font-size: 1.15rem; margin: 0 0 4px; }
.story-card p { font-size: 0.82rem; color: var(--muted); margin: 0; }

/* reading view */
.read-lines { display: grid; gap: 9px; margin-top: 4px; }
.read-lines .ln { height: 9px; border-radius: 5px; background: rgba(244,239,230,0.16); }
.read-lines .ln.w1 { width: 100%; } .read-lines .ln.w2 { width: 92%; } .read-lines .ln.w3 { width: 80%; } .read-lines .ln.w4 { width: 96%; }
.read-para p { font-size: 0.92rem; line-height: 1.55; color: rgba(244,239,230,0.92); margin: 0 0 12px; }
.word { position: relative; color: #10151d; background: linear-gradient(135deg, var(--accent), var(--accent-2)); border-radius: 6px; padding: 1px 5px; font-weight: 700; }
.popover {
  margin-top: 12px; display: inline-flex; flex-direction: column; gap: 2px;
  padding: 10px 14px; border-radius: 14px; border: 1px solid var(--border-strong);
  background: rgba(9,12,17,0.9); backdrop-filter: blur(8px);
}
.popover b { font-size: 0.95rem; } .popover span { font-size: 0.78rem; color: var(--muted); }

/* quiz */
.quiz-q { font-size: 1rem; font-weight: 600; margin: 4px 0 14px; }
.opts { display: grid; gap: 10px; }
.opt {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 13px 14px; border-radius: 14px; font-size: 0.9rem; font-weight: 500;
  border: 1px solid var(--border); background: rgba(255,255,255,0.03); color: rgba(244,239,230,0.92);
}
.opt.correct { border-color: rgba(120,220,160,0.55); background: rgba(80,180,120,0.14); }
.opt .mark { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; flex: none; }
.opt.correct .mark { background: #3fbf7a; color: #05130b; font-weight: 800; font-size: 0.8rem; }
.dots { display: flex; gap: 6px; justify-content: center; margin-top: 18px; }
.dots i { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,0.16); }
.dots i.on { background: linear-gradient(135deg, var(--accent), var(--accent-3)); width: 22px; border-radius: 999px; }

/* progress */
.streak { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 16px; border: 1px solid var(--border); background: rgba(255,255,255,0.03); }
.streak .big { font-family: "Fraunces", Georgia, serif; font-size: 2rem; line-height: 1; background: linear-gradient(135deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.streak span { font-size: 0.82rem; color: var(--muted); }
.chart { display: flex; align-items: flex-end; gap: 8px; height: 92px; margin-top: 16px; padding: 12px; border-radius: 16px; border: 1px solid var(--border); background: rgba(255,255,255,0.02); }
.chart .bar { flex: 1; border-radius: 6px 6px 3px 3px; background: linear-gradient(180deg, var(--accent-3), rgba(140,168,255,0.25)); }
.chart .bar.hot { background: linear-gradient(180deg, var(--accent), var(--accent-2)); }
.mini-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.mini-stats div { padding: 12px; border-radius: 14px; border: 1px solid var(--border); background: rgba(255,255,255,0.03); }
.mini-stats b { display: block; font-size: 1.2rem; } .mini-stats span { font-size: 0.74rem; color: var(--muted); }

.flow-note { margin-top: 6px; color: var(--muted); font-size: 0.85rem; }

@media (max-width: 900px) {
  .flow-row, .flow-row:nth-child(even) { grid-template-columns: 1fr; gap: 26px; }
  .flow-row:nth-child(even) .flow-row-copy { order: 1; }
  .flow-row:nth-child(even) .flow-row-phone { order: 2; }
  .flow-row-phone { order: 2; }
}
