.hw-library{margin-top:20px;padding-top:20px;border-top:1px solid var(--line,#ddd)}
.hw-library .hl-actions{display:flex;flex-wrap:wrap;gap:10px;align-items:center;margin:12px 0}
.hl-label{display:grid;gap:6px;max-width:420px;margin:12px 0}.hl-label input{min-width:0;width:100%}
.hl-list{display:grid;gap:8px;margin:12px 0}.hl-item{text-align:left;display:grid;gap:4px;width:100%;white-space:normal;height:auto;padding:12px;line-height:1.45}
.hl-item span{font-weight:400;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.hl-pages{display:grid;gap:14px}.hl-page{margin:0}.hl-page summary{cursor:pointer;padding:10px 0}.hl-photo{position:relative;max-width:600px}.hl-photo img{display:block;width:100%;height:auto}
.hl-box{position:absolute;background:rgb(255 255 255 / .12);border:2px solid var(--accent,#7455c4);color:#20152e;border-radius:4px;cursor:pointer;text-align:left;display:flex;align-items:flex-start;padding:2px;font:inherit}.hl-box span{background:#fff;padding:1px 6px;border-radius:3px}.hl-box:hover,.hl-box:focus-visible{background:rgb(180 150 255 / .35);outline:3px solid #fff;outline-offset:-5px}
.hl-answer{margin-top:20px;padding:16px;background:var(--tint-sky,#e8f5ff);border-radius:14px}.hl-answer form{display:grid;gap:12px}.hl-answer textarea{min-height:90px}.hl-answer .hl-field{display:grid;gap:5px}.hl-answer .hl-field input,.hl-answer textarea{width:100%;min-width:0;box-sizing:border-box}.hl-feedback{margin:4px 0;font-weight:600}.hl-retry{margin-top:8px}
.page-camera{width:min(700px,calc(100% - 20px));max-height:95dvh;padding:16px;border:0;border-radius:14px;background:#fff;color:#24202c}.page-camera::backdrop{background:rgb(0 0 0 / .7)}.camera-head,.camera-actions{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap}.camera-head{margin-bottom:12px}.page-camera video{display:block;width:100%;max-height:65dvh;object-fit:contain;background:#17151b}.camera-msg{margin:12px 0;line-height:1.4}.camera-actions button{min-height:44px}.bk-help{margin:12px 0}.bk-help>summary{cursor:pointer;font-weight:600;font-size:15px;padding:10px 0;min-height:44px;box-sizing:border-box}.su-homework{margin:14px 0;display:inline-flex}
@media(max-width:480px){.hl-actions .btn{width:100%}.page-camera{padding:12px}.hl-answer{padding:12px}.hl-item{padding:10px}}
/* Старые правила домашки не должны раскрывать старую форму и сужать новые поля. */
.hw-panel .hw-do .hw-new[hidden]{display:none}
.hw-panel .hw-do .hw-library{flex:1 1 100%;width:100%;min-width:0;margin-top:0;padding-top:0;border-top:0}
.hw-panel .hw-do .hw-library .hw-in{width:100%;max-width:100%;box-sizing:border-box;text-align:left;font:inherit}
.hw-panel .hw-do .hw-library textarea.hw-in{height:auto;padding:10px 12px}
.hw-panel .hw-do .hl-legacy{flex:1 1 100%;width:100%;min-width:0;font-size:14px}
.hl-legacy>summary,.hl-edition>summary{cursor:pointer;padding:10px 0;min-height:44px;box-sizing:border-box}
.hl-legacy .hw-row{margin-top:10px}.hl-edition{margin:8px 0;color:var(--slate,#5d5b54)}
.hl-answer p{overflow-wrap:anywhere}.hl-answer select{min-height:44px}.hl-item:focus-visible,.hl-legacy>summary:focus-visible,.hl-edition>summary:focus-visible{outline:2px solid var(--primary,#5645d4);outline-offset:3px}
.hl-diagnostic{margin-top:20px;padding-top:20px;border-top:1px solid var(--primary,#5645d4);min-width:0}
.hl-diagnostic[hidden]{display:none}.hl-diagnostic h4{margin:0 0 12px}.hl-diagnostic p{max-width:65ch;line-height:1.55}
.diag-method{margin:12px 0 6px}.diag-progress{margin:18px 0 8px;font-weight:600;font-variant-numeric:tabular-nums}
.hl-diagnostic .diag-step{display:grid;gap:10px;margin:10px 0}.diag-step .hl-field{max-width:560px}
.hw-panel .hw-do .hw-library .hw-in.diag-wrong{border-color:var(--error,#e03131);background:var(--tint-rose,#fde0ec)}
.diag-feedback{margin:0;color:var(--ink,#1a1a1a)}.diag-feedback.diag-error{padding:10px 12px;background:var(--tint-rose,#fde0ec);border-radius:12px}
.diag-done{padding:12px;background:var(--tint-mint,#d9f3e1);border-radius:12px;color:var(--ink,#1a1a1a)}
.diag-methods{margin:12px 0}.diag-methods summary{cursor:pointer;min-height:44px;box-sizing:border-box;padding:10px 0}
.diag-paths{display:grid;gap:8px}.diag-paths .chip-btn{text-align:left;white-space:normal;line-height:1.45;height:auto;padding:10px 12px}
.hl-diagnostic .chip-btn,.diag-parts button{min-height:44px;white-space:normal}.diag-parts{gap:8px}.hl-diagnostic button:focus-visible,.diag-methods summary:focus-visible{outline:2px solid var(--primary,#5645d4);outline-offset:3px}
@media(max-width:480px){.diag-step .btn,.hl-diagnostic>.btn{width:100%}.hl-diagnostic{padding-top:16px;margin-top:16px}}
.hl-work{display:flex;align-items:flex-start;gap:12px;margin:16px 0;min-width:0}
.hl-work-spinner{flex:0 0 24px;width:24px;height:24px;box-sizing:border-box;border:3px solid #bbb1ed;border-top-color:var(--primary,#5645d4);border-radius:50%;animation:hl-work-spin 1s linear infinite;margin-top:2px}
.hl-work-body{min-width:0;max-width:65ch}.hl-work .hl-work-title{font-weight:700;line-height:1.4;margin:0}
.hl-work .hl-work-timing{margin:6px 0 0;line-height:1.5;font-variant-numeric:tabular-nums}.hl-work .hl-work-note{margin:6px 0 0;line-height:1.5}
@keyframes hl-work-spin{to{transform:rotate(360deg)}}
@media(prefers-reduced-motion:reduce){.hl-work-spinner{animation:none}}
