/* Текст урока и статьи (.rd): одни блоки для карточек и для чтения прокруткой. Разметка из app/mdlesson.py. */
.rd { font-size: 17px; line-height: 1.62; color: #e4e3e7; }
.rd h2 { font-weight: 800; font-size: 25px; line-height: 1.12; color: var(--ink); text-transform: uppercase; letter-spacing: -.005em; margin: 34px 0 14px; }
.rd h3 { font-weight: 800; font-size: 19px; line-height: 1.25; color: var(--ink); margin: 24px 0 10px; }
.card.rd h2:first-child, .card.rd h3:first-child { margin-top: 8px; }
.rd p { margin: 0 0 14px; }
.rd p.lead { font-size: 19px; line-height: 1.5; color: var(--ink); }
.rd b { color: var(--ink); }
.rd a { color: var(--pur-hi); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(201,123,224,.45); word-break: break-word; }
.rd code { font-family: ui-monospace, Consolas, monospace; font-size: .86em; background: var(--asph2); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; word-break: break-word; }
.rd ul.list, .rd ol.list { list-style: none; margin: 0 0 16px; counter-reset: n; }
.rd ul.list li, .rd ol.list li { position: relative; padding-left: 30px; margin-bottom: 10px; }
.rd ul.list li::before { content: ""; position: absolute; left: 8px; top: 11px; width: 6px; height: 6px; border-radius: 50%; background: var(--pur-hi); }
.rd ol.list li { counter-increment: n; }
.rd ol.list li::before { content: counter(n); position: absolute; left: 0; top: 2px; width: 22px; height: 22px; border-radius: 7px;
  background: var(--asph2); border: 1px solid var(--line2); color: var(--ink); font-weight: 800; font-size: 12px; line-height: 21px; text-align: center; }
.rd .label { font-weight: 500; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--sub); margin-bottom: 8px; }

.rd .word { border-left: 2px solid var(--pur-hi); padding: 2px 0 2px 16px; margin: 6px 0 20px; }
.rd .word .label { color: var(--pur-hi); margin-bottom: 2px; }
.rd .word .t { font-weight: 800; font-size: 19px; color: var(--ink); }
.rd .word p { margin: 4px 0 0; color: var(--sub); }

.rd .step { display: grid; grid-template-columns: 40px 1fr; gap: 14px; margin: 8px 0 22px; }
.rd .step .n { width: 40px; height: 40px; border-radius: 12px; background: var(--pur); color: #fff; font-weight: 800; font-size: 18px; display: grid; place-items: center;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.2); }
.rd .step .t { font-weight: 800; font-size: 19px; line-height: 1.25; color: var(--ink); margin: 7px 0 8px; }
.rd .step p { margin: 0 0 10px; }

.rd .shot { position: relative; border: 1px solid var(--line2); border-radius: 14px; overflow: hidden; margin: 6px 0 8px; background: #fff; }
.rd .shot img { width: 100%; }
.rd .src { font-size: 13px; color: var(--dim); margin: 0 0 18px; }

.rd .prompt { position: relative; background: linear-gradient(160deg, #1c1420 0%, #141216 100%); border: 1px solid rgba(201,123,224,.28); border-radius: 16px; padding: 16px 16px 14px; margin: 8px 0 20px; }
.rd .prompt .label { color: var(--pur-hi); }
.rd .prompt p { margin: 0; white-space: pre-wrap; font-size: 15px; line-height: 1.55; color: #ecebef; }
.rd .copy { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 48px; margin-top: 14px; border-radius: 12px;
  background: var(--pur); color: #fff; font-weight: 800; font-size: 15px; box-shadow: inset 0 1px 0 rgba(255,255,255,.18); }
.rd .copy.done { background: var(--ink); color: #0b0b0c; }
.rd .cmdw { margin: 8px 0 20px; }
.rd pre.cmd { background: #0c0c0e; border: 1px solid var(--line2); border-radius: 14px; padding: 14px; font-family: ui-monospace, Consolas, monospace; font-size: 13.5px; line-height: 1.55;
  color: #e8e7ea; white-space: pre-wrap; word-break: break-all; }
.rd .cmdw .copy { background: var(--asph2); border: 1px solid var(--line2); color: var(--ink); margin-top: 8px; box-shadow: none; }
.rd .cmdw .copy.done { background: var(--ink); color: #0b0b0c; }

.rd .see { border: 1px solid var(--line2); border-radius: 16px; padding: 14px 16px; margin: 4px 0 20px; background: var(--asph); }
.rd .see p:last-child, .rd .tip p:last-child, .rd .warn p:last-child, .rd .ifnot p:last-child, .rd .next p:last-child { margin-bottom: 0; }
.rd .tip { border: 1px solid var(--line2); border-radius: 16px; padding: 14px 16px; margin: 4px 0 20px; background: var(--asph); }
.rd .tip .label { color: var(--pur-hi); }
.rd .warn { border: 1px solid rgba(255,140,120,.35); border-radius: 16px; padding: 14px 16px; margin: 4px 0 20px; background: rgba(255,110,90,.06); }
.rd .warn .label { color: #ff9c8a; }
.rd .ifnot { background: var(--asph); border: 1px solid var(--line2); border-radius: 16px; padding: 14px 16px; margin: 4px 0 20px; }
.rd .ifnot .case { margin: 0 0 12px; }
.rd .quote { border-left: 2px solid var(--dim); padding: 2px 0 2px 16px; margin: 6px 0 20px; color: var(--sub); font-style: normal; }

.rd .chat { display: flex; flex-direction: column; gap: 8px; margin: 6px 0 20px; }
.rd .chat .me, .rd .chat .ai { max-width: 88%; padding: 11px 14px; border-radius: 16px; font-size: 15px; line-height: 1.45; }
.rd .chat .me { align-self: flex-end; background: var(--pur); color: #fff; border-bottom-right-radius: 5px; }
.rd .chat .ai { align-self: flex-start; background: var(--asph2); border: 1px solid var(--line); border-bottom-left-radius: 5px; }
.rd .chat .who { font-weight: 500; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; opacity: .7; margin-bottom: 3px; }

.rd .rules { border: 1px solid var(--line2); border-radius: 16px; padding: 16px 16px 4px; margin: 4px 0 20px; background: var(--asph); }
.rd .rules h3, .rd .remember h3 { margin: 0 0 12px; font-size: 15px; letter-spacing: .12em; text-transform: uppercase; }
.rd .rules h3 { color: var(--pur-hi); }
.rd .remember { background: linear-gradient(150deg, #a33cbd 0%, #7c2593 55%, #561a68 100%); color: #fff; border-radius: 18px; padding: 18px 18px 6px; margin: 6px 0 20px; }
.rd .remember b { color: #fff; }
.rd .remember ol.list li::before, .rd .remember ul.list li::before { background: rgba(0,0,0,.25); border-color: rgba(255,255,255,.25); color: #fff; }
.rd .remember ul.list li::before { background: #fff; }
.rd .next { border: 1px dashed var(--line2); border-radius: 16px; padding: 14px 16px; color: var(--sub); margin: 0 0 18px; }
.rd .tblw { overflow-x: auto; border: 1px solid var(--line2); border-radius: 14px; margin: 6px 0 20px; }
.rd table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 1.4; }
.rd .tbl th, .rd .tbl td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.rd .tbl th { font-weight: 800; font-size: 12px; letter-spacing: .06em; color: var(--sub); text-transform: uppercase; background: var(--asph); }
.rd .tbl tr:last-child td { border-bottom: 0; }
.rd .checked { font-size: 13px; color: var(--dim); margin-top: 22px; }
.rd .checked b { color: var(--sub); }

