/* Structured product technical table — frontend layout and scroll hardening. */

#morgen-v6-root .mg6-technical-panel {
  display: grid;
  min-width: 0;
  grid-template-columns: minmax(0, 1.65fr) minmax(320px, 0.65fr);
  gap: clamp(22px, 2.2vw, 34px);
  align-items: start;
}

#morgen-v6-root .mg6-technical-panel--full {
  width: 100%;
  min-width: 0;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
}

#morgen-v6-root .mg6-evidence-panel__head--single {
  grid-template-columns: minmax(0, 1fr);
}

#morgen-v6-root .mg6-technical-panel--full > .mg6-structured-tech {
  width: auto;
  min-width: 0;
  justify-self: stretch;
  margin: 20px;
}

#morgen-v6-root .mg6-technical-panel--full .mg6-technical-list {
  border-right: 0;
}

#morgen-v6-root .mg6-structured-tech {
  min-width: 0;
  width: auto;
  align-self: start;
  justify-self: stretch;
  overflow: hidden;
  margin: 20px;
  border: 1px solid rgba(19, 34, 44, 0.12);
  border-radius: 12px;
  background: #fff;
}

#morgen-v6-root .mg6-structured-tech .table-container {
  display: block;
  box-sizing: border-box;
  width: 100%;
  min-width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0;
}

#morgen-v6-root .mg6-structured-tech__scroll {
  position: relative;
  isolation: isolate;
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-inline: contain;
  scroll-padding-inline-start: 0;
  background: #fff;
  scrollbar-width: thin;
  scrollbar-color: rgba(46, 122, 163, 0.82) rgba(19, 34, 44, 0.08);
  -webkit-overflow-scrolling: touch;
}

#morgen-v6-root .mg6-structured-tech__scroll::-webkit-scrollbar {
  height: 10px;
}

#morgen-v6-root .mg6-structured-tech__scroll::-webkit-scrollbar-track {
  background: rgba(19, 34, 44, 0.07);
}

#morgen-v6-root .mg6-structured-tech__scroll::-webkit-scrollbar-thumb {
  border: 2px solid #fff;
  border-radius: 999px;
  background: rgba(46, 122, 163, 0.82);
}

#morgen-v6-root .mg6-structured-tech__scroll:focus-visible {
  outline: 3px solid currentColor;
  outline-offset: -3px;
}

#morgen-v6-root .mg6-structured-tech__table {
  width: 100%;
  min-width: 100%;
  max-width: none;
  margin: 0;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: auto;
  font-variant-numeric: tabular-nums;
}

#morgen-v6-root .mg6-structured-tech__table th,
#morgen-v6-root .mg6-structured-tech__table td {
  min-width: 108px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(19, 34, 44, 0.1);
  background-clip: padding-box;
  text-align: left;
  vertical-align: middle;
  white-space: nowrap;
  font-size: 0.8rem;
  line-height: 1.3;
}

#morgen-v6-root .mg6-structured-tech__table thead th {
  position: sticky;
  top: 0;
  z-index: 3;
  padding: 13px 16px;
  border-bottom-color: var(--mg6-amber-deep, #1a5c7a);
  background: var(--mg6-amber, #2E7AA3);
  color: var(--mg6-on-accent, var(--mg6-surface, #FFFFFF));
  font-size: 0.73rem;
  font-weight: var(--mg6-weight-bold, 700);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

#morgen-v6-root .mg6-structured-tech__table thead th span {
  display: block;
  color: inherit;
  font-weight: inherit;
}

#morgen-v6-root .mg6-structured-tech__table thead th small {
  display: block;
  margin-top: 3px;
  color: inherit;
  font-size: 0.68rem;
  font-weight: var(--mg6-weight-semibold, 600);
  letter-spacing: 0;
  line-height: 1.2;
  text-transform: none;
  opacity: 0.82;
}

#morgen-v6-root .mg6-structured-tech__table tbody th {
  font-weight: 700;
}

#morgen-v6-root .mg6-structured-tech__table tbody tr:last-child th,
#morgen-v6-root .mg6-structured-tech__table tbody tr:last-child td {
  border-bottom: 0;
}

#morgen-v6-root .mg6-structured-tech__table tbody tr:focus-within td,
#morgen-v6-root .mg6-structured-tech__table tbody tr:focus-within th,
#morgen-v6-root .mg6-structured-tech__table tbody tr:hover td,
#morgen-v6-root .mg6-structured-tech__table tbody tr:hover th {
  background-color: rgba(234, 164, 0, 0.06);
}

/*
 * The first column is the scroll anchor. Keep its physical and logical inset
 * at exactly zero so scrolled columns can never bleed into a left-side gap.
 */
#morgen-v6-root .mg6-structured-tech__table tr > :first-child,
#morgen-v6-root .mg6-structured-tech__identifier {
  position: sticky !important;
  left: 0 !important;
  inset-inline-start: 0 !important;
  z-index: 4;
  min-width: 72px;
  width: 72px;
  margin-left: 0 !important;
  background: #fff;
  box-shadow: 1px 0 0 rgba(19, 34, 44, 0.14), 6px 0 12px -12px rgba(19, 34, 44, 0.7);
}

#morgen-v6-root .mg6-structured-tech__table thead tr > :first-child,
#morgen-v6-root .mg6-structured-tech__table thead .mg6-structured-tech__identifier {
  z-index: 6;
  background: var(--mg6-amber-deep, #1a5c7a);
  color: var(--mg6-on-accent-deep, var(--mg6-surface, #FFFFFF));
  font-weight: var(--mg6-weight-bold, 700);
}

#morgen-v6-root .mg6-structured-tech__notes {
  box-sizing: border-box;
  display: grid;
  gap: 6px;
  width: 100%;
  padding: 12px 16px 14px;
  border-top: 1px solid rgba(19, 34, 44, 0.1);
  background: #fff;
  color: var(--mg6-ink-mid, #364650);
  overflow-wrap: anywhere;
}

#morgen-v6-root .mg6-structured-tech__notes p {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.5;
}

#morgen-v6-root .mg6-structured-tech__source {
  display: none;
}

/* Legacy fallback technical rows remain product-owned; kept for non-structured products. */
#morgen-v6-root .mg6-technical-list {
  display: grid;
  align-content: start;
  min-width: 0;
  margin: 0;
  border-right: 1px solid var(--mg6-surface-line);
  background: var(--mg6-surface);
}

#morgen-v6-root .mg6-technical-row {
  display: grid;
  grid-template-columns: 48px minmax(150px, .55fr) minmax(0, 1.45fr);
  gap: clamp(16px, 2.5vw, 32px);
  align-items: center;
  min-width: 0;
  padding: clamp(20px, 2.5vw, 30px) clamp(24px, 3vw, 42px);
  border-bottom: 1px solid var(--mg6-surface-line);
  transition: background var(--mg6-duration-base) var(--mg6-ease);
}

#morgen-v6-root .mg6-technical-row:last-child {
  border-bottom: 0;
}

#morgen-v6-root .mg6-technical-row:nth-child(even) {
  background: rgba(249, 249, 249, .72);
}

#morgen-v6-root .mg6-technical-row:hover {
  background: var(--mg6-amber-soft);
}

#morgen-v6-root .mg6-technical-row__index {
  color: var(--mg6-amber-deep);
  font-size: var(--mg6-text-xs);
  font-weight: var(--mg6-weight-black);
  letter-spacing: .08em;
}

#morgen-v6-root .mg6-technical-row dt {
  color: var(--mg6-ink);
  font-size: var(--mg6-text-sm);
  font-weight: var(--mg6-weight-bold);
  line-height: 1.45;
}

#morgen-v6-root .mg6-technical-row dd {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 18px;
  margin: 0;
}

#morgen-v6-root .mg6-technical-row__value {
  min-width: 0;
  flex: 1 1 280px;
  color: var(--mg6-ink-mid);
  font-size: var(--mg6-text-md);
  line-height: var(--mg6-leading-base);
  overflow-wrap: anywhere;
}

#morgen-v6-root .mg6-technical-row__status {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  min-height: 28px;
  padding: 6px 10px;
  border: 1px solid var(--mg6-surface-line);
  border-radius: var(--mg6-radius-pill);
  background: var(--mg6-surface);
  color: var(--mg6-ink-muted);
  font-size: 10px;
  font-weight: var(--mg6-weight-bold);
  letter-spacing: .06em;
  line-height: 1;
  text-transform: uppercase;
}

#morgen-v6-root .mg6-technical-panel__rail {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
  padding: clamp(28px, 4vw, 52px);
  background: radial-gradient(circle at 100% 0, rgba(var(--mg6-amber-rgb), .16), transparent 42%),
    var(--mg6-surface-warm);
}

#morgen-v6-root .mg6-technical-panel__rail h3 {
  max-width: 360px;
  margin-bottom: var(--mg6-space-md);
  font-size: clamp(24px, 2.2vw, 34px);
}

#morgen-v6-root .mg6-technical-panel__rail>p:not(.mg6-eyebrow) {
  max-width: 450px;
  margin-bottom: var(--mg6-space-xl);
}

#morgen-v6-root .mg6-technical-panel__actions {
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  gap: 16px;
  margin-top: var(--mg6-space-xl);
}

@media (max-width: 1100px) {
  #morgen-v6-root .mg6-technical-panel {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1100px) {
  #morgen-v6-root .mg6-technical-list {
    border-right: 0;
    border-bottom: 1px solid var(--mg6-surface-line);
  }
}

@media (max-width: 1100px) {
  #morgen-v6-root .mg6-technical-panel__rail {
    justify-content: start;
  }
}

@media (max-width: 900px) {
  #morgen-v6-root .mg6-technical-row {
    grid-template-columns: 38px minmax(130px, .45fr) minmax(0, 1.55fr);
  }
}

@media (max-width: 720px) {
  #morgen-v6-root .mg6-technical-panel__rail {
    padding: var(--mg6-space-xl) var(--mg6-space-lg);
  }
}

@media (max-width: 720px) {
  #morgen-v6-root .mg6-technical-row {
    grid-template-columns: 32px minmax(0, 1fr);
    gap: 10px 14px;
    padding: 20px var(--mg6-space-lg);
  }
}

@media (max-width: 720px) {
  #morgen-v6-root .mg6-technical-row dt {
    align-self: center;
  }
}

@media (max-width: 720px) {
  #morgen-v6-root .mg6-technical-row dd {
    grid-column: 2;
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 720px) {
  #morgen-v6-root .mg6-technical-row__value {
    flex-basis: auto;
    font-size: var(--mg6-text-base);
  }
}

@media (max-width: 720px) {
  #morgen-v6-root .mg6-technical-panel__actions {
    align-items: stretch;
  }
}

@media (max-width: 720px) {
  #morgen-v6-root .mg6-technical-panel__actions .mg6-btn {
    width: 100%;
  }
}

@media (max-width: 1100px) {
  #morgen-v6-root .mg6-technical-panel {
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
  }

  #morgen-v6-root .mg6-technical-panel__rail {
    width: 100%;
  }
}

@media (max-width: 720px) {
  #morgen-v6-root .mg6-technical-panel {
    gap: 16px;
  }

  #morgen-v6-root .mg6-technical-panel--full > .mg6-structured-tech,
  #morgen-v6-root .mg6-structured-tech {
    width: auto;
    margin: 12px;
    border-radius: 8px;
  }

  #morgen-v6-root .mg6-structured-tech__table th,
  #morgen-v6-root .mg6-structured-tech__table td {
    min-width: 96px;
    padding: 10px 12px;
  }

  #morgen-v6-root .mg6-structured-tech__table thead th {
    padding: 11px 12px;
  }

  #morgen-v6-root .mg6-structured-tech__table tr > :first-child,
  #morgen-v6-root .mg6-structured-tech__identifier {
    min-width: 64px;
    width: 64px;
  }
}
