/* В помощь преподавателю — страница входа и кабинет. Цвета и шрифты — только здесь.
   Та же «бумага на столе», что у «В помощь студенту», но чернила — зелёные, как мел на доске. */
:root {
  --desk: #e4e8e3;
  --paper: #ffffff;
  --text: #1a2220;
  --muted: #56625d;
  --ink: #1d6655;
  --ink-soft: #dcefe9;
  --rule: #c6cfca;
  --vk: #0077ff;
  --vk-hover: #0066dd;
  --warn: #a3361f;
  --ok: #1b7a3f;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: "Times New Roman", Times, "Liberation Serif", "PT Serif", "Noto Serif", serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --desk: #121715;
    --paper: #e8ece9;
    --text: #e2e8e5;
    --muted: #98a49f;
    --ink: #7fd1bd;
    --ink-soft: #24332e;
    --rule: #2b3531;
    --warn: #ff9a85;
    --ok: #74d39a;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: var(--desk); color: var(--text);
  font: 17px/1.5 var(--sans);
}
a { color: var(--ink); text-underline-offset: 2px; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; border-radius: 3px; }
[hidden] { display: none !important; }
.checking main, .checking .foot { visibility: hidden; }
button { font: inherit; cursor: pointer; }
button:disabled { cursor: not-allowed; }

.top, main, .foot, .notice { width: 100%; max-width: 72rem; margin: 0 auto; padding-left: 16px; padding-right: 16px; }

/* ---------------------------------------------------------------- шапка */
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 18px; padding-bottom: 6px; }
.brand { color: var(--text); text-decoration: none; white-space: nowrap; font-weight: 700; letter-spacing: -0.01em; font-size: 1.05rem; }
.who { display: flex; align-items: center; gap: 14px; min-width: 0; }
.who-name { font-weight: 600; max-width: 42vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.quiet { background: none; border: 0; padding: 6px 2px; color: var(--ink); text-decoration: underline; text-underline-offset: 2px; }

.notice { margin-top: 10px; padding: 10px 14px; border-left: 4px solid var(--warn); background: var(--paper); color: #1a2220; border-radius: 0 6px 6px 0; }
.notice.good { border-left-color: var(--ok); }

/* ---------------------------------------------------------------- первый экран */
.hero { display: grid; gap: 22px; padding-top: 18px; padding-bottom: 36px; grid-template-areas: "pitch" "desk" "signin"; }
.pitch { grid-area: pitch; }
.desk { grid-area: desk; }
.signin { grid-area: signin; }
h1 { font-size: clamp(1.9rem, 1.2rem + 3vw, 3rem); line-height: 1.08; letter-spacing: -0.025em; margin: 0 0 14px; font-weight: 800; max-width: 19ch; }
.lead { margin: 0 0 22px; color: var(--muted); max-width: 38rem; }
.hint { margin: 8px 0 0; font-size: 0.86rem; color: var(--muted); }
.facts { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; max-width: 36rem; }
.facts li { padding-left: 18px; position: relative; color: var(--muted); font-size: 0.96rem; }
.facts li::before { content: ""; position: absolute; left: 0; top: 0.62em; width: 8px; height: 8px; border-radius: 2px; background: var(--ink); }
.facts b { color: var(--text); }

.signin { max-width: 32rem; padding-top: 20px; border-top: 1px solid var(--rule); }
.agree { display: flex; gap: 10px; align-items: flex-start; font-size: 0.92rem; line-height: 1.4; margin-bottom: 12px; cursor: pointer; }
.agree input { width: 20px; height: 20px; flex: none; margin: 1px 0 0; accent-color: var(--ink); }
.vk {
  width: 100%; max-width: 360px; min-height: 50px; margin-top: 6px; border: 0; border-radius: 10px;
  background: var(--vk); color: #fff; font-weight: 600; font-size: 1rem; transition: background-color .15s, opacity .15s;
}
.vk:hover:not(:disabled) { background: var(--vk-hover); }
.vk:disabled { opacity: 0.45; }

/* ---------------------------------------------------------------- листы: лекция, конспект, слайд */
.desk { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 22px; overflow: clip; padding: 8px 0 4px; }
.desk figcaption { font-size: 0.84rem; color: var(--muted); text-align: center; max-width: 24rem; }
.stack { position: relative; width: min(60vw, 320px); container-type: inline-size; margin: 6px 0 48px; }
.sheet {
  aspect-ratio: 210 / 297; background: #fff; color: #1a2220;
  font-family: var(--serif); font-size: 3.4cqw; line-height: 1.35;
  padding: 9.5cqw 7.2cqw 9.5cqw 14.3cqw;
  box-shadow: 0 1px 2px rgba(20, 35, 30, .18), 0 10px 28px -12px rgba(20, 35, 30, .35);
}
.sheet p { margin: 0; }
.back { position: absolute; inset: 0; background: #f7f8f7; }
.b1 { transform: rotate(-6deg) translate(-18%, 3%); }
.front { position: relative; display: flex; flex-direction: column; gap: 0.35em; }
.l-h { font-weight: 700; text-align: center; margin-bottom: 0.5em !important; }
.l-p { font-weight: 700; }
.l-q { padding-left: 0.8em; }
.l-line { height: 0.42em; background: #d5dbd8; border-radius: 1px; margin-top: 0.55em !important; position: relative; }
.l-line i { position: absolute; right: -1.6em; top: -0.5em; font-style: normal; font-size: 0.8em; color: #1d6655; }
.w6 { width: 60%; } .w7 { width: 72%; } .w8 { width: 82%; } .w9 { width: 92%; } .w10 { width: 100%; }
.l-f { text-align: center; font-style: italic; margin: 0.6em 0 0.2em !important; }
.c-h { font-weight: 700; text-align: center; text-transform: uppercase; font-size: 0.9em; margin-bottom: 0.8em !important; }
.c-t { width: 100%; border-collapse: collapse; font-size: 0.85em; }
.c-t td { border: 1px solid #b9c2be; padding: 0.25em 0.35em; }
.c-t td:first-child { width: 28%; white-space: nowrap; }
.slide {
  position: absolute; right: -14%; bottom: -12%; width: 64%; aspect-ratio: 16 / 9; background: #173f36; color: #f2f6f4;
  border-radius: 4px; padding: 5cqw 5cqw 4cqw; box-shadow: 0 12px 30px -12px rgba(10, 25, 20, .6);
  font-family: var(--sans); display: flex; flex-direction: column; gap: 1.5cqw;
}
.s-h { margin: 0; font-weight: 700; font-size: 4.2cqw; line-height: 1.15; }
.s-p { margin: 0; font-size: 2.7cqw; line-height: 1.3; opacity: .85; }
.s-b { margin-top: auto; display: flex; align-items: flex-end; gap: 4%; height: 32%; }
.s-b i { flex: 1; background: #7fd1bd; border-radius: 1px; }
.s-b i:nth-child(1) { height: 45%; } .s-b i:nth-child(2) { height: 80%; } .s-b i:nth-child(3) { height: 60%; background: #f0b45a; }
@media (prefers-reduced-motion: no-preference) {
  .b1 { animation: fan1 .8s .25s cubic-bezier(.2, .7, .2, 1) both; }
  .slide { animation: rise .8s .45s cubic-bezier(.2, .7, .2, 1) both; }
}
@keyframes fan1 { from { transform: none; } }
@keyframes rise { from { transform: translateY(12%); opacity: 0; } }

/* ---------------------------------------------------------------- этапы */
.steps { padding-bottom: 48px; }
h2 { font-size: 1.35rem; letter-spacing: -0.01em; margin: 0 0 16px; }
.steps ol { list-style: none; margin: 0; padding: 0; display: grid; counter-reset: step; }
.steps li { counter-increment: step; position: relative; padding: 16px 0 16px 52px; border-top: 1px solid var(--rule); color: var(--muted); }
.steps li::before { content: counter(step); position: absolute; left: 0; top: 10px; font: 700 2rem/1 var(--serif); color: var(--ink); }
.steps b { color: var(--text); }

/* ---------------------------------------------------------------- кнопки и списки */
.primary { border: 0; border-radius: 10px; padding: 11px 18px; background: var(--ink); color: #fff; font-weight: 600; }
@media (prefers-color-scheme: dark) { .primary { color: #0e1f1a; } }
.primary:disabled { opacity: 0.45; }
a.primary { display: inline-block; text-decoration: none; text-align: center; }
.ghost { border: 1px solid var(--ink); border-radius: 10px; padding: 10px 16px; background: transparent; color: var(--ink); font-weight: 600; }
.ghost:disabled { opacity: 0.45; }
.bad { color: var(--warn); }
.small { font-size: 0.86rem; }
.block { display: block; }

.app { padding-bottom: 48px; }
.cabinet { display: grid; gap: 28px; padding-top: 22px; }
.works-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.works-head h1 { margin: 0; font-size: clamp(1.7rem, 1.3rem + 1.6vw, 2.3rem); }
h2.sub { font-size: 1.1rem; margin: 30px 0 0; }
.list { list-style: none; margin: 18px 0 0; padding: 0; }
.list li { padding: 12px 0; border-top: 1px solid var(--rule); }
.list li:last-child { border-bottom: 1px solid var(--rule); }
.job-link { display: grid; gap: 2px; color: inherit; text-decoration: none; padding: 2px 0; }
.job-link:hover .job-topic { color: var(--ink); }
.job-link:focus-visible { outline-offset: 4px; }
.job-topic { font-family: var(--serif); font-size: 1.12rem; font-weight: 700; overflow-wrap: anywhere; }
.job-meta { font-size: 0.88rem; color: var(--muted); }
.job-status { font-size: 0.92rem; font-weight: 600; }
.job-status.wait { color: var(--ink); }
.job-status.done { color: var(--ok); }
.job-status.bad { color: var(--warn); }
.empty-state { margin: 18px 0 0; padding: 22px 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); color: var(--muted); }
.balance { align-self: start; padding: 18px; background: var(--paper); color: #1a2220; border-radius: 10px; }
.balance h2 { font-size: 1.1rem; margin-bottom: 8px; }
.balance p { margin: 0; }
.balance .hint { color: #56625d; margin-top: 10px; }
.balance ul { margin: 10px 0 0; padding-left: 1.1em; }
.balance li { margin: 3px 0; }
.receipt, .payments { margin-top: 14px; padding-top: 12px; border-top: 1px solid #d3dad6; font-size: 0.92rem; }
.receipt p { margin: 0; overflow-wrap: anywhere; }
.receipt-form { display: grid; gap: 8px; margin-top: 8px; }
.receipt-form input { font: inherit; padding: 9px 11px; border: 1px solid #c6cfca; border-radius: 8px; background: #fff; color: #1a2220; }
.receipt-form .ghost { justify-self: start; color: #1d6655; border-color: #1d6655; }
.balance .quiet { color: #1d6655; }
.payments h3 { font-size: 1rem; margin: 0 0 6px; }
.pay-list { margin: 0; padding: 0; list-style: none; }
.pay-list li { margin: 0 0 6px; overflow-wrap: anywhere; }
.pay-list a { color: #1d6655; }
.pay-wait { color: #56625d; }

/* ---------------------------------------------------------------- формы */
.backlink { display: inline-block; margin: 14px 0 6px; color: var(--muted); text-decoration: none; font-size: 0.95rem; }
.backlink:hover { color: var(--ink); text-decoration: underline; }
.narrow { max-width: 44rem; }
.page-h1 { font-size: clamp(1.6rem, 1.3rem + 1.4vw, 2.2rem); margin: 6px 0 12px; max-width: none; }
.card-form { margin-top: 8px; }
.field { display: grid; gap: 6px; margin: 0 0 16px; min-width: 0; }
.field-label { font-weight: 600; font-size: 0.95rem; }
.field input[type=text], .field input[type=number], .field input[type=email], .field select, .field textarea, .file-row select {
  width: 100%; font: inherit; color: #1a2220; background: var(--paper); border: 1px solid var(--rule);
  border-radius: 8px; padding: 10px 12px; min-width: 0;
}
.file-row select { width: auto; max-width: 100%; }
.field textarea { resize: vertical; min-height: 4.5em; line-height: 1.45; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible {
  outline: 2px solid var(--ink); outline-offset: 1px; border-color: var(--ink);
}
.grid2, .grid3, .grid4, .grid5 { display: grid; gap: 0 16px; }
.grid5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
fieldset { min-width: 0; }
fieldset.hours, fieldset.plain { border: 0; padding: 0; margin: 0 0 6px; }
fieldset.hours legend, fieldset.plain legend { font-weight: 600; margin-bottom: 8px; padding: 0; }
fieldset.hours .field-label { font-weight: 400; font-size: 0.88rem; color: var(--muted); }
.choices { border: 0; padding: 0; margin: 0 0 18px; display: grid; gap: 8px; }
.choices legend, .checks legend { font-weight: 600; margin-bottom: 8px; padding: 0; }
.choice { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; background: var(--paper); color: #1a2220;
  border: 1px solid var(--rule); border-radius: 10px; cursor: pointer; }
.choice input { margin: 3px 0 0; accent-color: #1d6655; width: 18px; height: 18px; flex: none; }
.choice:has(input:checked) { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.choice-body { display: grid; gap: 2px; }
.choice-body b { font-weight: 600; }
.choice-body span { font-size: 0.9rem; color: #56625d; }
.checks { border: 0; padding: 0; margin: 0 0 18px; display: flex; flex-wrap: wrap; gap: 10px 24px; }
.checks legend { width: 100%; }
.checks label, .col label { display: inline-flex; gap: 8px; align-items: flex-start; cursor: pointer; }
.checks input, .col input { width: 20px; height: 20px; flex: none; accent-color: var(--ink); margin: 1px 0 0; }
.checks.col, .col { flex-direction: column; display: flex; gap: 10px; }
.step-error { margin: 6px 0 0; color: var(--warn); font-weight: 600; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin: 18px 0; }
details.box { margin: 18px 0 0; padding: 14px 0 0; border-top: 1px solid var(--rule); }
details.box > summary { cursor: pointer; font-weight: 600; }
details.box > .hint:first-of-type { margin-bottom: 12px; }
details.box textarea { width: 100%; margin: 10px 0; font: inherit; padding: 10px 12px; border: 1px solid var(--rule); border-radius: 8px;
  background: var(--paper); color: #1a2220; }

/* ---------------------------------------------------------------- дисциплина */
.start { display: grid; gap: 12px; margin: 4px 0 26px; }
.start-card { display: grid; gap: 4px; padding: 16px 18px; border-radius: 12px; background: var(--paper); color: #1a2220;
  text-decoration: none; border: 1px solid var(--rule); transition: border-color .15s, box-shadow .15s; }
.start-card b { font-size: 1.08rem; color: #1d6655; }
.start-card span { font-size: 0.92rem; color: #56625d; }
.start-card:hover:not(.off) { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.start-card.off { opacity: 0.55; cursor: default; }
.block { margin-top: 26px; }
section.block h2 { margin-bottom: 4px; }
.files { list-style: none; margin: 12px 0 14px; padding: 0; }
.file-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; align-items: start; padding: 10px 0; border-top: 1px solid var(--rule); }
.file-item:last-child { border-bottom: 1px solid var(--rule); }
.file-item > .bad { grid-column: 1; }
.file-item > .quiet { grid-row: 1; grid-column: 2; }
.file-title { display: block; font-weight: 600; overflow-wrap: anywhere; }
.files .empty-state { margin: 0; }
.file-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 8px 0 16px; }
.file-row .hint { margin: 0; }
.filebtn { position: relative; display: inline-block; cursor: pointer; }
.filebtn:focus-within { outline: 3px solid var(--ink); outline-offset: 2px; }
.file-input { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }

/* ---------------------------------------------------------------- задание */
.job { max-width: 48rem; }
.job-head { margin: 4px 0 20px; }
.job-h1 { font-family: var(--serif); font-weight: 700; letter-spacing: 0; font-size: clamp(1.5rem, 1.2rem + 1.5vw, 2.1rem); line-height: 1.2; max-width: none; margin: 0 0 6px; overflow-wrap: anywhere; }
.job-head .job-meta { margin: 0; }
.job-main h2 { font-size: 1.35rem; margin: 0 0 8px; }
.job-main .lead { margin: 0 0 16px; }

.progress { display: grid; grid-template-columns: 76px 1fr; gap: 18px; align-items: start; padding: 18px; background: var(--paper); color: #1a2220; border-radius: 12px; }
.progress .hint { color: #56625d; }
.progress-stage { margin: 0; font-size: 1.2rem; font-weight: 700; }
.progress-count { margin: 2px 0 0; color: #56625d; min-height: 1.2em; }
.progress-bar { height: 6px; margin: 12px 0 10px; background: #e4e8e3; border-radius: 3px; overflow: hidden; }
.progress-bar i { display: block; height: 100%; background: #1d6655; border-radius: 3px; transition: width .6s ease; }
.progress-live { margin: 0 0 6px; display: flex; gap: 8px; align-items: flex-start; font-size: 0.95rem; }
.dot { flex: none; width: 10px; height: 10px; margin-top: 6px; border-radius: 50%; background: #8a958f; }
.dot.ok { background: #1b7a3f; }
.dot.wait { background: #c58a00; }
.dot.bad { background: #a3361f; }
.writing { width: 76px; aspect-ratio: 210 / 297; background: #fff; border: 1px solid #d3dad6; border-radius: 3px; padding: 18px 9px 0 13px;
  display: grid; align-content: start; gap: 8px; box-shadow: 0 6px 16px -10px rgba(20, 35, 30, .5); }
.writing i { display: block; height: 2px; background: #1d6655; border-radius: 1px; width: 70%; }
.writing i:nth-child(2) { width: 90%; } .writing i:nth-child(3) { width: 55%; }
@media (prefers-reduced-motion: no-preference) {
  .writing i { width: 0; animation: ink 4.2s ease-in-out infinite; }
  .writing i:nth-child(1) { --w: 90%; animation-delay: 0s; }
  .writing i:nth-child(2) { --w: 100%; animation-delay: 1.1s; }
  .writing i:nth-child(3) { --w: 60%; animation-delay: 2.2s; }
  .dot.ok { animation: pulse 2s ease-in-out infinite; }
}
@keyframes ink { 0% { width: 0; } 25% { width: var(--w); } 85% { width: var(--w); opacity: 1; } 100% { width: var(--w); opacity: 0; } }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(27, 122, 63, .45); } 50% { box-shadow: 0 0 0 6px rgba(27, 122, 63, 0); } }

/* план курса */
.plan-sheet { background: #fff; color: #1a2220; font-family: var(--serif); line-height: 1.45; padding: 22px 18px 24px 22px; border-radius: 4px;
  box-shadow: 0 1px 2px rgba(20, 35, 30, .15), 0 12px 28px -16px rgba(20, 35, 30, .4); }
.plan-title { font-size: 1.2rem; text-align: center; margin: 0 0 16px; }
.lec-list { list-style: none; margin: 0; padding: 0; }
.lec { padding: 12px 0; border-top: 1px solid #e1e6e3; }
.lec:first-child { border-top: 0; padding-top: 0; }
.lec-head { display: flex; gap: 10px; align-items: flex-start; font-weight: 700; font-size: 1.05rem; cursor: pointer; }
.lec-head input { width: 20px; height: 20px; flex: none; margin: 3px 0 0; accent-color: #1d6655; }
.lec-goal { margin: 6px 0 0 30px; font-size: 0.95rem; }
.lec-q { margin: 6px 0 0 30px; padding-left: 1.2em; }
.lec-q li { margin: 2px 0; }
.lec-q li > span:first-child { margin-right: 8px; }
.lec-q .min, .lec-vis, .lec-terms { font-family: var(--sans); font-size: 0.82rem; color: #56625d; }
.lec-vis, .lec-terms { margin: 6px 0 0 30px; }
.lec-vis { color: #1d6655; }
.pay { margin: 16px 0; padding: 14px; border-left: 4px solid var(--ink); background: var(--paper); color: #1a2220; border-radius: 0 8px 8px 0; }
.pay p { margin: 0 0 6px; }
.pay .hint { color: #56625d; }
.pay .primary { background: #1d6655; color: #fff; }

/* находки переработки */
.doc-box { margin: 18px 0 0; }
.doc-box h3 { font-family: var(--serif); font-size: 1.2rem; margin: 0 0 6px; }
.doc-box > p { margin: 0 0 6px; }
.findings { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 12px; }
.finding { padding: 14px 16px; background: var(--paper); color: #1a2220; border-radius: 10px; border: 1px solid #d3dad6; }
.finding p { margin: 0 0 6px; }
.f-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.f-n { font-size: 0.8rem; color: #56625d; }
.f-quote { display: block; font-family: var(--serif); font-style: italic; margin: 0 0 8px; padding-left: 10px; border-left: 3px solid #c6cfca; color: #3b4541; overflow-wrap: anywhere; }
.f-quote::before, .f-quote::after { content: ""; }
.f-issue { font-weight: 600; }
.f-fix, .f-src { font-size: 0.95rem; }
.f-src a, .fresh a { color: #1d6655; overflow-wrap: anywhere; }
.fresh { margin: 8px 0; padding: 8px 10px; background: #f1f5f3; border-radius: 8px; font-size: 0.9rem; }
.fresh-h { font-weight: 600; margin: 0 0 4px !important; }
.fresh-h.ok, .fresh-tag.ok { color: #1b7a3f; }
.fresh-h.warn, .fresh-tag.warn { color: #9a5b00; }
.fresh ul { margin: 0; padding-left: 1.1em; }
.fresh li { margin: 3px 0; }
.fresh-tag { font-weight: 600; }
.fresh .hint { color: #56625d; margin: 2px 0 0; }
.segs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.seg { display: inline-flex; cursor: pointer; }
.seg input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.seg span { padding: 6px 12px; border: 1px solid #c6cfca; border-radius: 999px; font-size: 0.9rem; font-weight: 600; color: #3b4541; background: #fff; }
.seg input:checked + span { border-color: #1d6655; background: #1d6655; color: #fff; }
.seg input:focus-visible + span { outline: 3px solid #1d6655; outline-offset: 2px; }
.tag { display: inline-block; font-size: 0.76rem; font-weight: 700; padding: 1px 8px; border-radius: 999px; background: #e1e6e3; color: #1a2220; }
.tag.outdated, .tag.error { background: #f4dcd6; color: #7d2a17; }
.tag.check, .tag.dead_link, .tag.volume { background: #f6e3c2; color: #6b4300; }
.tag.style, .tag.structure { background: #dcefe9; color: #14473b; }

/* готовые документы */
.results { list-style: none; margin: 0 0 12px; padding: 0; }
.results > li { padding: 14px 0; border-top: 1px solid var(--rule); }
.results > li:last-child { border-bottom: 1px solid var(--rule); }
.r-title { margin: 0 0 8px; font-family: var(--serif); font-weight: 700; font-size: 1.1rem; overflow-wrap: anywhere; }
.r-links { display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: center; margin: 0; }
.results .hint { margin: 6px 0 0; }
.dl { display: inline-block; padding: 7px 13px; border: 1px solid var(--ink); border-radius: 8px; text-decoration: none; font-size: 0.92rem; font-weight: 600; }
.dl.main { background: var(--ink); color: #fff; }
@media (prefers-color-scheme: dark) { .dl.main { color: #0e1f1a; } }
.dl:hover { box-shadow: inset 0 0 0 1px var(--ink); }
.dl.slides::after { content: " ↗"; }
.flags ul { margin: 8px 0 0; padding-left: 1.1em; }
.flags li { margin: 0 0 6px; }

/* ---------------------------------------------------------------- ожидание */
.busy {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%);
  display: flex; align-items: center; gap: 12px; padding: 12px 18px; border-radius: 999px;
  background: var(--text); color: var(--desk); font-weight: 600; box-shadow: 0 8px 24px -8px rgba(0, 0, 0, .4);
  max-width: calc(100% - 32px);
}
.pen { width: 26px; height: 3px; border-radius: 2px; background: currentColor; transform-origin: left center; flex: none; }
@media (prefers-reduced-motion: no-preference) { .pen { animation: write 1.1s ease-in-out infinite; } }
@keyframes write { 0% { transform: scaleX(.15); } 60% { transform: scaleX(1); } 100% { transform: scaleX(.15); opacity: .4; } }

/* ---------------------------------------------------------------- оплата: почта для чека */
.pay-dialog { border: 0; border-radius: 14px; padding: 22px 20px 18px; width: min(26rem, calc(100% - 32px));
  background: #fff; color: #1a2220; box-shadow: 0 24px 60px -20px rgba(10, 25, 20, .5); }
.pay-dialog::backdrop { background: rgba(12, 22, 18, .45); }
.pay-dialog h2 { margin: 0 0 4px; font-size: 1.25rem; }
.pay-what { margin: 0 0 16px; font-weight: 600; }
.pay-dialog .hint { color: #56625d; }
.pay-dialog .actions { margin: 14px 0 0; }
.pay-dialog .field input { background: #fff; color: #1a2220; border: 1px solid #c6cfca; }
.pay-dialog .primary { background: #1d6655; color: #fff; }
.pay-dialog .quiet { color: #1d6655; }

/* ---------------------------------------------------------------- подвал */
.foot { margin-top: auto; padding-top: 18px; padding-bottom: 26px; border-top: 1px solid var(--rule); font-size: 0.84rem; color: var(--muted); }
.foot p { margin: 0 0 6px; max-width: 46rem; }
.legal { display: flex; flex-wrap: wrap; gap: 6px 18px; }

/* ---------------------------------------------------------------- документы (соглашение, согласие, политика) */
.doc { padding-top: 18px; padding-bottom: 40px; }
.doc > * { max-width: 46rem; }
.doc h1 { font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.2rem); max-width: none; margin-bottom: 6px; }
.doc-sub { margin: 0 0 22px; color: var(--muted); font-size: 0.92rem; }
.doc h2 { font-size: 1.12rem; margin: 26px 0 8px; }
.doc p, .doc li { line-height: 1.6; }
.doc p { margin: 0 0 10px; }
.doc ul { margin: 0 0 10px; padding-left: 1.3em; }
.doc li { margin: 0 0 6px; }

/* ---------------------------------------------------------------- шире телефона */
@media (min-width: 640px) {
  .steps ol { grid-template-columns: 1fr 1fr; column-gap: 32px; }
  .grid2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid4 { grid-template-columns: 2fr 1fr 1fr 1fr; }
  .grid5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .start { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 900px) {
  .hero { grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); grid-template-areas: "pitch desk" "signin desk";
          align-items: start; column-gap: 48px; row-gap: 26px; padding-top: 34px; padding-bottom: 56px; }
  .desk { align-self: center; padding: 16px 0; }
  .stack { width: 320px; margin-bottom: 64px; }
  .steps ol { grid-template-columns: repeat(4, 1fr); column-gap: 28px; }
  .steps li { padding: 52px 0 0; }
  .steps li::before { top: 12px; }
  .cabinet { grid-template-columns: minmax(0, 1fr) 18rem; gap: 48px; padding-top: 30px; }
}

@media print {
  body { background: #fff; }
  .top, .backlink, .job-head, .foot, .notice, .busy, .job-main > div > :not(.plan-sheet) { display: none !important; }
  .plan-sheet { box-shadow: none; padding: 0; }
  .lec-head input { display: none; }
}
