/* Semantic two-dimensional learning tables; no content is truncated. */
.hp-lernapp .hp-table-viewer { min-width: 0; max-width: 100%; margin-top: var(--hp-s-2, 8px); border: 1px solid var(--hp-border, #95ab90); border-radius: var(--hp-radius, 8px); background: var(--hp-surface, #fff); overflow: hidden; }
.hp-lernapp .hp-table-overview { position: relative; width: 100%; overflow: auto; -webkit-overflow-scrolling: touch; }
.hp-lernapp .hp-table-stage { width: 100%; transform-origin: top left; }
.hp-lernapp .hp-table-overview.is-fitted { overflow: hidden; }
.hp-lernapp .hp-table-overview.is-fitted .hp-table-stage { position: absolute; top: 0; left: 0; }
.hp-lernapp .hp-table-grid { display: table; width: 100%; max-width: none; min-width: 0; margin: 0; border-collapse: collapse; table-layout: fixed; color: var(--hp-text, #3f5c3b); background: var(--hp-surface, #fff); font-family: var(--hp-font-body, sans-serif); font-size: var(--hp-fs-md, 1rem); line-height: 1.5; }
.hp-lernapp .hp-table-grid thead { display: table-header-group; }
.hp-lernapp .hp-table-grid tbody { display: table-row-group; }
.hp-lernapp .hp-table-grid tr { display: table-row; }
.hp-lernapp .hp-table-grid th, .hp-lernapp .hp-table-grid td { display: table-cell; width: auto; padding: 10px 12px; text-align: left; vertical-align: top; white-space: normal; overflow-wrap: break-word; word-break: normal; hyphens: auto; border: 1px solid var(--hp-border, #95ab90); border-top: 0; border-left: 0; font-size: inherit; }
/* Word-style hierarchy: a calm dark header, banded rows and semantic row labels.
   Data columns are never recoloured based on their position or text content. */
.hp-lernapp .hp-table-grid th { font-weight: 700; text-transform: none; letter-spacing: normal; }
.hp-lernapp .hp-table-grid thead th { padding-top: 12px; padding-bottom: 12px; color: #fff; background: var(--wimmer-deep, #3f5c3b); border-color: rgba(255, 255, 255, .3); }
.hp-lernapp .hp-table-grid thead th a { color: inherit; text-decoration: underline; }
.hp-lernapp .hp-table-grid tbody tr:nth-child(even) { background: var(--hp-primary-tint, #eef3ea); }
.hp-lernapp .hp-table-grid tbody th[scope="row"] { color: var(--hp-text, #3f5c3b); background: var(--hp-primary-soft, #b9d2b2); font-weight: 650; }
.hp-lernapp .hp-table-grid tbody td:first-child { font-weight: 400; }
.hp-lernapp .hp-table-grid th:last-child, .hp-lernapp .hp-table-grid td:last-child { border-right: 0; }
.hp-lernapp .hp-table-grid tbody tr:last-child :is(th, td) { border-bottom: 0; }
.hp-lernapp .hp-table-grid :is(p, ul, ol) { margin-top: 0; margin-bottom: 8px; }
.hp-lernapp .hp-table-grid :is(p, ul, ol):last-child { margin-bottom: 0; }
.hp-lernapp .hp-table-footer { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; padding: 8px 12px; border-top: 1px solid var(--hp-border, #95ab90); }
.hp-lernapp .hp-table-description { flex: 1 1 180px; margin: 0; color: var(--hp-text-muted, #557052); font-size: var(--hp-fs-sm, .85rem); line-height: 1.5; }
.hp-lernapp .hp-table-control { display: inline-flex; align-items: center; justify-content: center; gap: 6px; flex: 0 0 auto; min-width: 44px; min-height: 44px; padding: 8px 12px; border: 1px solid var(--hp-border-strong, #7f9479); border-radius: var(--hp-radius-sm, 6px); color: var(--hp-text, #3f5c3b); background: var(--hp-surface, #fff); font: inherit; line-height: 1.25; text-align: center; touch-action: manipulation; }
.hp-lernapp .hp-table-control:hover { background: var(--hp-primary-tint, #eef3ea); }
.hp-lernapp .hp-table-control:focus-visible, .hp-lernapp .hp-table-pan:focus-visible, .hp-lernapp .hp-table-overview:focus-visible { outline: 2px solid var(--hp-primary, #3f5c3b); outline-offset: -3px; }
.hp-lernapp .hp-table-control:disabled { opacity: .45; cursor: default; }
.hp-lernapp .hp-table-control[aria-pressed="true"] { color: var(--hp-text, #3f5c3b); background: var(--hp-primary-soft, #b9d2b2); border-color: var(--hp-primary, #3f5c3b); }
.hp-lernapp .hp-table-expand { margin-left: auto; font-weight: 600; }
.hp-lernapp .hp-table-dialog { position: fixed; inset: 0; z-index: calc(var(--hp-z-modal, 1200) + 10); width: 100%; height: 100%; width: 100dvw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: max(12px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left)); border: 0; background: rgba(10, 22, 10, .65); color: var(--hp-text, #3f5c3b); box-sizing: border-box; }
.hp-lernapp .hp-table-dialog[open] { display: flex; align-items: center; justify-content: center; }
.hp-lernapp .hp-table-dialog::backdrop { background: transparent; }
.hp-lernapp .hp-table-dialog-panel { display: flex; flex-direction: column; min-width: 0; width: 100%; max-width: 1120px; height: 100%; max-height: 960px; overflow: hidden; border: 1px solid var(--hp-border, #95ab90); border-radius: var(--hp-radius-lg, 12px); background: var(--hp-surface, #fff); box-shadow: var(--hp-shadow-lg, 0 12px 32px rgba(0,0,0,.2)); }
.hp-lernapp .hp-table-dialog-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex: 0 0 auto; padding: 12px 16px 8px; }
.hp-lernapp .hp-table-dialog-title { min-width: 0; margin: 0; color: var(--hp-text, #3f5c3b); font-size: var(--hp-fs-lg, 1.12rem); overflow-wrap: break-word; }
.hp-lernapp .hp-table-close { margin-left: auto; }
.hp-lernapp .hp-table-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; flex: 0 0 auto; padding: 0 16px; }
.hp-lernapp .hp-table-zoom-status { display: inline-block; min-width: 54px; text-align: center; font-variant-numeric: tabular-nums; font-size: var(--hp-fs-sm, .85rem); }
.hp-lernapp .hp-table-help { flex: 0 0 auto; margin: 8px 16px 12px; color: var(--hp-text-muted, #557052); font-size: var(--hp-fs-sm, .85rem); line-height: 1.4; }
.hp-lernapp .hp-table-pan { position: relative; flex: 1 1 auto; min-width: 0; min-height: 0; overflow: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; border-top: 1px solid var(--hp-border, #95ab90); background: var(--hp-bg, #f7f8f4); }
.hp-lernapp .hp-table-canvas { position: relative; min-width: 0; min-height: 0; overflow: hidden; }
.hp-lernapp .hp-table-zoom-stage { position: absolute; top: 0; left: 0; transform-origin: top left; }
@media (max-width: 480px) {
    .hp-lernapp .hp-table-dialog { padding: 6px; padding-top: max(6px, env(safe-area-inset-top)); padding-bottom: max(6px, env(safe-area-inset-bottom)); }
    .hp-lernapp .hp-table-dialog-header { padding: 8px 10px; }
    .hp-lernapp .hp-table-toolbar { gap: 6px; padding: 0 10px; }
    .hp-lernapp .hp-table-help { margin: 8px 10px; }
    .hp-lernapp .hp-table-control { padding-left: 10px; padding-right: 10px; }
}
@media (max-height: 480px) and (orientation: landscape) {
    .hp-lernapp .hp-table-dialog-header { padding-top: 4px; padding-bottom: 4px; }
    .hp-lernapp .hp-table-help { margin-top: 4px; margin-bottom: 4px; }
}

/* Short browser windows and strong browser zoom keep every control and table
   region reachable. If the header consumes the viewport, the panel itself
   scrolls instead of clipping its independent, touch-scrollable table region. */
@media (max-height: 280px) {
    .hp-lernapp .hp-table-dialog { padding-top: max(4px, env(safe-area-inset-top)); padding-bottom: max(4px, env(safe-area-inset-bottom)); }
    .hp-lernapp .hp-table-dialog-panel { overflow: auto; }
    .hp-lernapp .hp-table-dialog-header { padding: 4px 8px; }
    .hp-lernapp .hp-table-toolbar { gap: 4px; padding: 0 8px 4px; }
    .hp-lernapp .hp-table-help { display: none; }
    .hp-lernapp .hp-table-pan { flex: 1 0 80px; min-height: 80px; }
}

