/* Documents tab */
.dm-title { position: absolute; width: 900px; }
.dm-title h1 { font-size: 30px; margin: 0 0 8px; letter-spacing: -.01em; }
.dm-title p { margin: 0; font-size: 15px; color: var(--ink-2); max-width: 820px; }
[dir="rtl"] .dm-title { text-align: right; direction: rtl; }

.dm-group {
  position: absolute; width: 264px; font-size: 12px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase;
  color: var(--ink-3); padding-bottom: 8px; border-bottom: 2px solid var(--ink);
}
[dir="rtl"] .dm-group, [dir="rtl"] .dm-card { direction: rtl; text-align: right; }

.dm-links { position: absolute; left: 0; top: 0; overflow: visible; pointer-events: none; }
.dm-links path { fill: none; stroke: #b9b5ab; stroke-width: 1.5; stroke-dasharray: 4 4; }
.dm-links circle { fill: #b9b5ab; }

.dm-card {
  position: absolute; display: flex; flex-direction: column; gap: 6px; text-align: start; padding: 14px 16px 12px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  cursor: pointer; color: var(--ink); text-decoration: none; transition: border-color .15s, box-shadow .15s, opacity .15s;
}
.dm-card:hover { border-color: var(--ink-3); box-shadow: var(--shadow-lg); }
.dm-card.is-open { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft), var(--shadow); }
.dm-card.is-hit { border-color: #c79a00; box-shadow: 0 0 0 3px #fff2a8, var(--shadow); }
.dm-card.is-dim { opacity: .35; }
.dm-card__id { font-size: 11px; font-weight: 700; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.dm-card__title { font-weight: 650; font-size: 15px; line-height: 1.3; }
.dm-card__sum { font-size: 12.5px; color: var(--ink-2); line-height: 1.45; }
.dm-card__langs { display: flex; gap: 4px; margin-top: 2px; }
.dm-card__langs i { font-style: normal; font-size: 10.5px; font-weight: 700; padding: 0 5px; border-radius: 4px; border: 1px solid var(--line); color: var(--ink-3); }
.dm-card__langs i.ok { color: var(--st-decided); border-color: #b9dcc3; }
.dm-card__langs i.no { text-decoration: line-through; opacity: .6; }
.dm-card--proto { background: var(--dark); color: #fff; border-color: var(--dark); }
.dm-card--proto .dm-card__sum, .dm-card--proto .dm-card__id { color: #c9c7c0; }
.dm-card--live { background: var(--accent-soft); border-color: #c4d6ef; }

.dm-win .bk-win__head { gap: 6px; }
[dir="rtl"] .bk-win__head { direction: rtl; padding: 9px 14px 9px 10px; }
.dm-winlang button { padding: 2px 8px; font-size: 12px; }
.dm-winlang button:disabled { opacity: .35; cursor: not-allowed; }

/* catalog */
.dm-cat__group { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); margin: 14px 8px 4px; }
.dm-cat__item {
  display: block; width: 100%; text-align: start; border: 0; background: none; padding: 7px 8px; border-radius: 8px; cursor: pointer;
  line-height: 1.35;
}
.dm-cat__item:hover { background: var(--surface-2); }
.dm-cat__item > span { display: inline-block; min-width: 24px; color: var(--ink-3); font-size: 12px; font-variant-numeric: tabular-nums; }
.dm-cat__item small { display: block; color: var(--ink-3); font-size: 12px; margin-top: 3px; padding-inline-start: 24px; }
.dm-cat__item em { font-style: normal; font-size: 11px; background: var(--surface-2); border: 1px solid var(--line); padding: 0 5px; border-radius: 999px; color: var(--ink-2); }
.dm-cat__item mark { background: #fff2a8; }
.dm-small { color: var(--ink-3); font-size: 12.5px; margin: 6px 8px; }
mark.dm-hl { background: #fff2a8; padding: 0; }

/* notes */
.dm-notes-doc small { display: block; color: var(--ink-3); font-size: 12px; }
.dm-notes-doc strong { display: block; font-size: 14px; }
.dm-notes-doc { color: var(--ink-2); font-size: 13px; }
#notes .bk-panel__body { padding: 12px 14px 16px; }
.dm-gap { margin-top: 22px !important; }
.dm-io { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }

/* reader */
.dm-reader { position: fixed; inset: 0; background: rgba(20, 20, 18, .45); z-index: 50; display: grid; place-items: center; padding: 24px; }
.dm-reader[hidden] { display: none; }
.dm-reader__inner {
  background: var(--surface); border-radius: 14px; width: min(980px, 100%); height: 100%; display: flex; flex-direction: column;
  box-shadow: var(--shadow-lg); overflow: hidden;
}
.dm-reader__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 18px; border-bottom: 1px solid var(--line); }
.dm-reader__body { flex: 1; overflow: auto; }
.dm-reader__body .bk-doc { margin-inline: auto; padding: 28px 40px 60px; font-size: 15.5px; }
