/* =========================================================
   HTML Entities – Styles (Basis: assets/css/tool-ui.css)
   ========================================================= */
.he-toolbar { display: grid; gap: 12px; margin-bottom: 18px; padding: 14px 18px; }
.he-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }
.he-toolbar__end { margin-left: auto; }
.he-mode span { min-width: 92px; text-align: center; }
.he-toolbar code, .he-status code, .he-ref code { font-family: var(--mono); font-size: .9em; }
.he-toolbar .tu-segment code { color: var(--violet); font-weight: 500; }
.he-encopt, .he-decopt { transition: opacity .2s; }
.he.is-dec .he-encopt, .he:not(.is-dec) .he-decopt { opacity: .4; pointer-events: none; }

.he-panes { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.he-pane { display: flex; flex-direction: column; min-width: 0; }
.he-pane + .he-pane { margin-top: 0; }
.he-meta { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.he-area {
  display: block; width: 100%; height: 300px; padding: 14px 16px; border-radius: 14px; resize: vertical;
  font-family: var(--mono); font-size: 14px; line-height: 1.6; color: var(--ink); overflow-wrap: anywhere;
  background: #fff; border: 1.5px solid rgba(15,19,48,.12); outline: 0; transition: border-color .25s, box-shadow .25s;
}
.he-area:focus { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(91,140,255,.15); }
.he-area--out { background: #f7f8fc; }
.he-area::placeholder { color: #9aa0bd; font-family: Inter, sans-serif; }

.he-status { margin-top: 14px; }
.he-status:empty { display: none; }
.he-link { font-size: 12.5px; font-weight: 600; color: var(--blue); text-decoration: underline; text-underline-offset: 2px; }
.he-stats { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 12px; font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.he-stats b { color: var(--ink); }

/* Zeichentabelle */
.he-ref { margin-top: 18px; }
.he-ref .tu-card__head { flex-wrap: wrap; }
.he-ref__bar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin-bottom: 16px; }
.he-ref__search { position: relative; flex: 1 1 280px; max-width: 420px; }
.he-ref__search .i { position: absolute; left: 14px; top: 50%; width: 17px; height: 17px; margin-top: -8.5px; color: var(--muted); pointer-events: none; }
.he-ref__search .tu-input { padding-left: 42px; }
.he-ref__chips { display: flex; flex-wrap: wrap; gap: 6px; }
.he-chip { padding: 7px 13px; border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--muted); background: rgba(15,19,48,.05); transition: background .2s, color .2s; }
.he-chip:hover { color: var(--ink); }
.he-chip.is-active { color: #fff; background: var(--ink); }
.he-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 8px; max-height: 560px; overflow: auto; padding: 2px; }
.he-cell {
  display: grid; justify-items: center; gap: 3px; padding: 12px 6px 10px; border-radius: 12px; text-align: center;
  background: #fff; border: 1px solid rgba(15,19,48,.08); transition: border-color .2s, transform .2s var(--ease), box-shadow .2s;
}
.he-cell:hover, .he-cell:focus-visible { border-color: var(--blue); transform: translateY(-2px); box-shadow: 0 10px 20px -14px rgba(15,19,48,.5); }
.he-cell__ch { display: grid; place-items: center; height: 38px; font-size: 26px; line-height: 1; color: var(--ink); }
.he-cell__ch.is-label { font-size: 11px; font-weight: 700; letter-spacing: .06em; color: var(--violet); }
.he-cell code { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; color: #3b5bdb; }
.he-cell small { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.he-ref__empty { padding: 20px 0; text-align: center; font-size: 14px; color: var(--muted); }

@media (max-width: 1000px) {
  .he-panes { grid-template-columns: minmax(0, 1fr); }
  .he-area { height: 220px; }
  .he-toolbar__end { margin-left: 0; }
}
@media (max-width: 560px) {
  .he-grid { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); max-height: 460px; }
}
