/* «Для родителей», блок «Как OmniStudy помогает» (templates/public/parents/how.html).
   «Две дорожки»: белая полоса во всю ширину окна; по центру на пунктирной
   оси — четыре опоры, слева кусок приложения ребёнка, справа кусок кабинета
   родителя за тот же день. Каждая опора — своя строка из трёх колонок
   (опора в разметке первая: так её читает диктор и так она стоит на
   телефоне — опора → ребёнок → кабинет). Куски интерфейса — шрифтом
   сайта, вес до 800 (как parts/app_shot.html). */

.ph2 {
  --ph2-ink: #1e1c3d; --ph2-mut: #7a7799; --ph2-soft: #f5f3fc; --ph2-line: #efedf7;
  --ph2-green: #22c997; --ph2-blue: #2f6bff;
  --ph2-shadow: 0 30px 60px -30px rgba(25, 30, 80, .28), 0 2px 6px rgba(25, 30, 80, .05);
  margin-inline: calc(50% - 50vw);
  padding: clamp(64px, 8vw, 104px) calc(50vw - 50%);
  overflow: clip;
  background: var(--surface);
}

/* ── заголовок ── */
.ph2-top { display: grid; justify-items: center; gap: 18px; max-width: 820px; margin: 0 auto 56px; text-align: center; }
.ph2-top .kicker { margin: 0; }
.ph2-top h2 { margin: 0; font-size: clamp(32px, 4.2vw, 48px); line-height: 1.06; font-weight: 800; letter-spacing: -.035em; text-wrap: balance; }
.ph2-grad { color: transparent; background: linear-gradient(95deg, #1f7bff 0%, #17bfe0 55%, #2ee59d 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.ph2-lead { margin: 0; font-size: 18px; line-height: 1.55; color: var(--ink-2); text-wrap: pretty; }

/* ── дорожки ── */
.ph2-lanes { position: relative; isolation: isolate; display: grid; row-gap: 34px; max-width: 1200px; margin: 0 auto; }
.ph2-lanes::before { content: ""; position: absolute; z-index: -1; left: 50%; top: 70px; bottom: 30px; width: 2px; margin-left: -1px; background: repeating-linear-gradient(180deg, #d9dcea 0 6px, transparent 6px 12px); }
.ph2-row { display: grid; grid-template-columns: minmax(0, 1fr) 300px minmax(0, 1fr); column-gap: 36px; }
.ph2-row > * { grid-row: 1; }
.ph2-node { grid-column: 2; }
.ph2-k { grid-column: 1; }
.ph2-p { grid-column: 3; }

.ph2-lh { display: flex; align-items: center; gap: 12px; padding: 10px 18px 10px 10px; border-radius: var(--pill); font-size: 15px; font-weight: 600; line-height: 1.3; background: var(--page); }
.ph2-lh img { width: 40px; height: 40px; padding: 6px; border-radius: 50%; background: var(--surface); box-shadow: var(--ph2-shadow); }
.ph2-lh small { display: block; font-size: 12.5px; font-weight: 400; color: var(--muted); }
.ph2-l { justify-self: end; }
.ph2-r { justify-self: start; }
.ph2-mid { display: grid; place-items: center; }
.ph2-mid span { padding: 8px 16px; border-radius: var(--pill); font-size: 13px; font-weight: 600; color: var(--muted); background: var(--surface); box-shadow: inset 0 0 0 1px var(--border); }

.ph2-node { align-self: center; display: grid; justify-items: center; gap: 10px; padding: 22px 20px; border-radius: 26px; text-align: center; background: var(--surface); box-shadow: var(--ph2-shadow); }
.ph2-node h3 { margin: 0; font-size: 22px; line-height: 1.2; font-weight: 700; letter-spacing: -.015em; }
.ph2-node p { margin: 0; font-size: 14px; line-height: 1.5; color: var(--muted); text-wrap: pretty; }
.ph2-pic { flex: none; width: 52px; height: 52px; padding: 7px; border-radius: 15px; background: var(--ph2-pt); }
.ph2-pic img { display: block; width: 100%; height: 100%; object-fit: contain; }

.ph2-cell { display: grid; align-content: center; gap: 12px; min-width: 0; padding: 22px; border-radius: 28px; background: var(--ph2-t); }
.ph2-k { justify-items: end; }
.ph2-k > * { width: min(100%, 380px); }
.ph2-p > * { width: min(100%, 420px); }

.ph2-ex { display: flex; justify-content: center; margin: 36px 0 0; }
.ph2-ex span { display: inline-flex; align-items: center; gap: 7px; padding: 5px 12px 5px 9px; border-radius: var(--pill); font-size: 12.5px; font-weight: 500; color: var(--muted); background: rgba(255, 255, 255, .9); box-shadow: inset 0 0 0 1px var(--border); }
.ph2-ex span::before { content: "i"; display: grid; place-items: center; flex: none; width: 16px; height: 16px; border-radius: 50%; font-size: 10.5px; font-weight: 800; font-style: italic; color: #fff; background: #a3a6bd; }

/* ───────── куски приложения и кабинета ───────── */
.ph2-cell { font-family: var(--font); line-height: 1.3; color: var(--ph2-ink); }
.ph2-cell img { display: block; }
.ph2-fc { border-radius: 22px; background: var(--surface); box-shadow: var(--ph2-shadow); }
.ph2-box { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; padding: 14px 16px; }
.ph2-fh { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; font-size: 16px; font-weight: 800; }
.ph2-fh small { font-size: 11.5px; font-weight: 700; color: var(--ph2-mut); }

/* «Сегодня» — приложение ребёнка */
.ph2-today { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; padding: 16px 18px; }
.ph2-td-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ph2-td-h b { font-size: 17px; font-weight: 800; }
.ph2-td-h span { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px 3px 5px; border-radius: var(--pill); font-size: 12px; font-weight: 800; color: #b25a00; background: #fff1dc; }
.ph2-td-h span img { width: 20px; height: 20px; }
.ph2-td-n { display: flex; align-items: baseline; gap: 6px; }
.ph2-td-n b { font-size: 34px; font-weight: 800; line-height: 1; letter-spacing: -.02em; }
.ph2-td-n small { font-size: 15px; font-weight: 700; color: var(--ph2-mut); }
.ph2-td-n em { margin-left: auto; padding: 3px 9px; border-radius: 8px; font-style: normal; font-size: 11.5px; font-weight: 800; color: #0d9466; background: #dcfaee; }
.ph2-td-line { display: block; height: 8px; border-radius: 8px; background: var(--ph2-green); }
.ph2-td-week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; font-size: 10.5px; font-weight: 700; color: var(--ph2-mut); }
.ph2-td-week span { display: grid; justify-items: center; gap: 4px; }
.ph2-td-week i { width: 22px; height: 22px; border-radius: 50%; background: var(--ph2-line); }
.ph2-td-week i.d { background: var(--ph2-green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 8.2l2.2 2.2 4.8-4.8' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 15px no-repeat; }
.ph2-td-week .t { color: var(--ph2-ink); }
.ph2-td-week .t i { box-shadow: 0 0 0 2px #fff, 0 0 0 3.5px var(--ph2-green); }

/* цель дня и неделя (кабинет, «Обзор») */
.ph2-goal { display: flex; align-items: center; gap: 14px; }
.ph2-ring { flex: none; display: grid; place-items: center; width: 76px; height: 76px; border-radius: 50%; background: var(--ph2-green); }
.ph2-ring > span { display: grid; place-content: center; width: 62px; height: 62px; border-radius: 50%; text-align: center; line-height: 1; background: #fff; }
.ph2-ring b { font-size: 23px; font-weight: 800; }
.ph2-ring small { margin-top: 2px; font-size: 10px; font-weight: 700; color: var(--ph2-mut); }
.ph2-goal h5 { margin: 0 0 4px; font-size: 15px; font-weight: 800; }
.ph2-goal p { margin: 0; font-size: 12.5px; line-height: 1.4; font-weight: 600; color: #6f6c90; }
.ph2-week { display: grid; gap: 7px; }
.ph2-wh { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-size: 10.5px; font-weight: 800; letter-spacing: .06em; color: var(--ph2-mut); }
.ph2-wh b { font-size: 14px; letter-spacing: 0; color: var(--ph2-ink); white-space: nowrap; }
.ph2-bars { position: relative; display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; align-items: end; height: 56px; }
.ph2-bars::after { content: ""; position: absolute; left: 0; right: 0; bottom: var(--ph2-goal, 62.5%); border-top: 1.5px dashed #c9c5dd; }
.ph2-bars i { height: var(--h); border-radius: 6px 6px 3px 3px; background: var(--ph2-green); }
.ph2-bars i.no { height: 4px; background: #e2def0; }
.ph2-wd { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; text-align: center; font-size: 10.5px; font-weight: 700; color: var(--ph2-mut); }
.ph2-wd .t { color: var(--ph2-ink); }

/* задача, подсказка, разбор (приложение ребёнка) */
.ph2-fr { display: grid; grid-template-columns: minmax(0, 1fr); gap: 11px; padding: 16px; border-radius: 20px; background: var(--surface); box-shadow: 0 24px 44px -26px rgba(25, 30, 80, .38), 0 0 0 1px rgba(25, 30, 80, .05); }
.ph2-fr-hd { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; color: #8a87a8; }
.ph2-fr-hd img { flex: none; width: 34px; height: 22px; border-radius: 6px; object-fit: cover; }
.ph2-fr-hd span { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.ph2-fr-hd i { margin-left: auto; padding: 3px 8px; border-radius: 8px; font-style: normal; white-space: nowrap; color: #3a3d5c; background: #f3f4f9; }
.ph2-fr-q { margin: 0; font-size: 13.5px; font-weight: 600; line-height: 1.4; color: #5d5a82; }
.ph2-fr-q b { display: block; margin-top: 3px; font-size: 26px; font-weight: 800; letter-spacing: -.01em; color: var(--ph2-ink); }
.ph2-fr-in { display: flex; gap: 8px; }
.ph2-fr-in i { flex: 1; display: flex; align-items: center; min-width: 0; height: 42px; padding: 0 16px; border-radius: var(--pill); font-style: normal; font-size: 17px; font-weight: 800; color: #b4b1cc; background: #fff; box-shadow: inset 0 0 0 1.5px #e3e4ef; }
.ph2-fr-in i.bad { color: #ef4b5b; background: #fff1f2; box-shadow: inset 0 0 0 1.5px #ffc7cd; }
.ph2-fr-in i.good { color: #0d9466; background: #e9fbf3; box-shadow: inset 0 0 0 1.5px #a6ecd0; }
.ph2-fr-in i small { margin-left: auto; font-size: 11.5px; font-weight: 700; }
.ph2-fr-in > span { display: grid; place-items: center; padding: 0 15px; border-radius: var(--pill); font-size: 13px; font-weight: 800; white-space: nowrap; color: #8a5a00; background: #fff1d2; }
.ph2-caret { display: inline-block; width: 2px; height: 18px; border-radius: 2px; background: #1f7bff; }
.ph2-fr-hint { display: grid; grid-template-columns: 34px 1fr; gap: 10px; align-items: start; padding: 11px 13px 11px 11px; border-radius: 16px; font-size: 13px; font-weight: 600; line-height: 1.42; color: #5c3d00; background: #fff6e3; }
.ph2-fr-hint img { width: 34px; height: 34px; object-fit: contain; }
.ph2-fr-hint b { display: block; margin-bottom: 2px; font-size: 10.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #d48a00; }
.ph2-fr-steps { display: grid; gap: 7px; padding: 12px 14px; border-radius: 16px; background: #f1f6ff; }
.ph2-fr-steps > b { font-size: 10.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--ph2-blue); }
.ph2-fr-steps div { display: grid; grid-template-columns: 22px 1fr; align-items: center; gap: 9px; font-size: 13px; font-weight: 600; color: #3a3d5c; }
.ph2-fr-steps i { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; font-style: normal; font-size: 11px; font-weight: 800; color: var(--ph2-blue); background: #fff; }
.ph2-fr-steps .ok i { color: #fff; background: #22c97e; }
.ph2-fr-steps .ok span b { color: #14a86e; }
.ph2-fr-next { display: flex; align-items: center; gap: 10px; padding: 9px 9px 9px 14px; border-radius: 16px; box-shadow: inset 0 0 0 1.5px #e7e8f1; }
.ph2-fr-next small { display: block; font-size: 11px; font-weight: 700; color: #8a87a8; }
.ph2-fr-next b { font-size: 15px; font-weight: 800; white-space: nowrap; }
.ph2-fr-next em { margin-left: auto; padding: 8px 14px; border-radius: var(--pill); font-style: normal; font-size: 13px; font-weight: 800; white-space: nowrap; color: #fff; background: #15172e; }

/* лента событий (кабинет, «Обзор») */
.ph2-feed { display: grid; }
.ph2-day { padding-bottom: 2px; font-size: 10.5px; font-weight: 800; letter-spacing: .08em; color: var(--ph2-mut); }
.ph2-ev { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 0; border-top: 1px solid var(--ph2-line); }
.ph2-day + .ph2-ev { border-top: 0; }
.ph2-ev img { width: 34px; height: 34px; padding: 5px; border-radius: 11px; background: #e9f9f2; }
.ph2-ev.info img { background: #eef3ff; }
.ph2-ev b { display: block; font-size: 12.5px; font-weight: 800; line-height: 1.25; }
.ph2-ev small { display: block; font-size: 11px; font-weight: 600; line-height: 1.3; color: var(--ph2-mut); }
.ph2-ev time { font-size: 11.5px; font-weight: 800; color: #8a87a8; }

/* по предметам: темы и доля верных (кабинет, «Отчёт об успехах») */
.ph2-topics { display: grid; }
.ph2-subhd { display: flex; align-items: center; gap: 8px; margin: 6px 0 2px; font-size: 12px; font-weight: 800; color: #6f6c90; }
.ph2-subhd:first-child { margin-top: 0; }
.ph2-subhd img { width: 22px; height: 22px; padding: 3px; border-radius: 7px; background: var(--surface-2); }
.ph2-s-math img, .ph2-s-alg img, .ph2-s-geo img { background: #dbeaff; }
.ph2-s-bio img { background: #dcf7e4; }
.ph2-tr { display: grid; grid-template-columns: minmax(0, 1fr) auto 48px; gap: 10px; align-items: center; padding: 8px 0; border-top: 1px solid var(--ph2-line); }
.ph2-subhd + .ph2-tr { border-top: 0; }
.ph2-tr b { display: block; font-size: 13px; font-weight: 800; line-height: 1.25; }
.ph2-tr small { display: block; font-size: 11px; font-weight: 600; color: var(--ph2-mut); }
.ph2-st { padding: 3px 8px; border-radius: 8px; font-size: 11px; font-weight: 700; white-space: nowrap; color: #6f6c90; background: var(--ph2-soft); }
.ph2-st.done { color: #0d9466; background: #e3f8ef; }
.ph2-pc { padding: 4px 0; border-radius: var(--pill); font-size: 12px; font-weight: 800; text-align: center; }
.ph2-pc.g { color: #0d9466; background: #dcfaee; }
.ph2-pc.m { color: #b26b00; background: #fff0d4; }
.ph2-pc.l { color: #d23a4c; background: #ffe3e6; }
.ph2-help { display: grid; grid-template-columns: 36px 1fr; gap: 12px; align-items: start; padding: 12px 14px; border-radius: 16px; font-size: 12.5px; font-weight: 600; line-height: 1.45; color: #6b4300; background: #fff4dc; }
.ph2-help img { width: 36px; height: 36px; }
.ph2-help b { font-weight: 800; color: #4a2e00; }

/* итоги месяца и полоска дней */
.ph2-kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ph2-kpis div { display: grid; align-content: start; gap: 2px; padding: 11px 12px; border-radius: 14px; background: var(--ph2-soft); }
.ph2-kpis b { font-size: 20px; font-weight: 800; white-space: nowrap; }
.ph2-kpis small { font-size: 11px; font-weight: 600; line-height: 1.3; color: var(--ph2-mut); }
.ph2-kpis .hl { background: #f2ecff; box-shadow: inset 0 0 0 1.5px #d9c8ff; }
.ph2-strip { display: grid; grid-template-columns: repeat(23, 1fr); gap: 3px; }
.ph2-strip i { height: 18px; border-radius: 4px; background: #f1eff8; }
.ph2-strip i.met { background: var(--ph2-green); }
.ph2-strip i.part { background: #c4f1de; }

/* ───────── планшет: колонки уже ───────── */
@media (max-width: 1100px) {
  .ph2-row { grid-template-columns: minmax(0, 1fr) 240px minmax(0, 1fr); column-gap: 20px; }
  .ph2-cell { padding: 16px; }
}

/* ───────── телефон: опора → ребёнок → кабинет ───────── */
@media (max-width: 980px) {
  .ph2-top { justify-items: start; margin-bottom: 32px; text-align: left; }
  .ph2-top h2 { font-size: 34px; }
  .ph2-lead { font-size: 16.5px; }
  .ph2-lanes { row-gap: 40px; }
  .ph2-lanes::before, .ph2-heads { display: none; }
  .ph2-row { grid-template-columns: minmax(0, 1fr); row-gap: 14px; }
  .ph2-row > * { grid-row: auto; grid-column: auto; }
  .ph2-node { grid-template-columns: auto 1fr; justify-items: start; align-items: center; gap: 8px 14px; padding: 18px; text-align: left; }
  .ph2-node .ph2-pic { width: 46px; height: 46px; }
  .ph2-node h3 { font-size: 20px; }
  .ph2-node p { grid-column: 1 / -1; font-size: 15px; }
  .ph2-cell { padding: 14px; border-radius: 24px; }
  .ph2-k { justify-items: stretch; }
  .ph2-k > *, .ph2-p > * { width: auto; }
  .ph2-cell::before { content: attr(data-who); font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
  .ph2-fr-q b { font-size: 23px; }
  .ph2-ex { justify-content: flex-start; }
  .ph2-ex span { max-width: 100%; }
}
