/*
 * legal-ethics-r16.css
 * AI Playground — §5 Legal & Ethics
 * Requires: design-system.css loaded first.
 * Last updated: 2026-05-28 — r16
 *
 * Sources:
 *   Section grid    — copied from .ug-known in ungrounded.css
 *   Stat rail       — copied from .ug-stats in ungrounded.css
 *   content-overlay — copied verbatim from ungrounded.css
 *   CTA             — copied from .ug-cta-primary in ungrounded.css
 *   .eyebrow        — from design-system.css (no override, margin-bottom added only)
 */


/* ============================================================
   §5 SECTION — copied from .ug-known
   ============================================================ */
.le-section {
  width: 100%;
  padding: 100px 7vw;
  background: var(--steel);
  border-top: 1px solid rgba(255,255,255,0.04);
}

.le-section__grid {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.le-section__copy {
  max-width: 540px;
}

/* Eyebrow: uses .eyebrow from design-system.css — add margin only */
.le-section__eyebrow {
  display: block;
  margin-bottom: 20px;
}

.le-section__headline {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: clamp(26px, 2.3vw, 36px);
  font-weight: 300;
  color: var(--white);
  line-height: 1.25;
  letter-spacing: -0.015em;
  margin-bottom: 28px;
  text-wrap: balance;
}

.le-section__body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 17px;
  font-weight: 300;
  color: var(--silver-bright);
  line-height: 1.7;
  margin-bottom: 36px;
}

/* CTA — block display, span lines guarantee left alignment */
.le-cta {
  display: block;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
  font-weight: 500;
  color: var(--chart);
  text-transform: uppercase;
  letter-spacing: .2em;
  text-align: left;
  text-decoration: none;
  min-height: 44px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 6px 0;
  transition: color 0.2s ease;
}

.le-cta__line {
  display: block;
  line-height: 1.6;
}

.le-cta:hover { color: var(--chart-hot); }

.le-cta:focus-visible {
  outline: 1px solid var(--chart);
  outline-offset: 4px;
  border-radius: 2px;
}

/* Image — overflow hidden crops white border */
.le-section__image-wrap {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 2px;
}

.le-section__image {
  width: 112%;
  margin-left: -6%;
  height: 112%;
  margin-top: -6%;
  object-fit: cover;
  display: block;
}


/* ============================================================
   STAT RAIL — copied verbatim from .ug-stats
   ============================================================ */
.le-stats {
  width: 100%;
  background: var(--steel);
  padding: 80px 4vw;
}

.le-stats__grid {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  align-items: start;
}

.le-stat {
  position: relative;
  text-align: center;
  padding: 0 32px;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.le-stat.le-stat--visible {
  opacity: 1;
  transform: translateY(0);
}

.le-stat:nth-child(1) { transition-delay: 0s; }
.le-stat:nth-child(2) { transition-delay: 0.12s; }
.le-stat:nth-child(3) { transition-delay: 0.24s; }
.le-stat:nth-child(4) { transition-delay: 0.36s; }

.le-stat + .le-stat::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 1px;
  height: 60%;
  background: rgba(255,255,255,0.07);
}

.le-stat__number {
  display: block;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 84px;
  color: var(--chart);
  line-height: 1;
  margin-bottom: 20px;
}

.le-stat__caption {
  display: block;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 14px;
  font-weight: 400;
  color: var(--silver);
  text-transform: uppercase;
  letter-spacing: .14em;
  line-height: 1.45;
}


/* ============================================================
   NEXT BAR
   ============================================================ */
.le-next {
  width: 100%;
  border-top: 1px solid rgba(255,255,255,0.06);
  background: var(--steel);
}

.le-next__inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 7vw;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.le-next__link {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  font-weight: 400;
  color: var(--silver);
  text-transform: uppercase;
  letter-spacing: .18em;
  text-decoration: none;
  padding: 28px 0;
  min-height: 44px;
  transition: color 0.2s ease;
  white-space: nowrap;
}

.le-next__link:hover { color: var(--white); }
.le-next__prefix { color: var(--silver); }
.le-next__arrow { font-size: 16px; }


/* ============================================================
   CONTENT OVERLAY — copied verbatim from ungrounded.css
   ============================================================ */
.content-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15,17,22,0.97);
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

.content-overlay.active {
  opacity: 1;
  pointer-events: all;
}


.content-overlay__inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 7vw 120px;
}

.content-overlay__header {
  margin-bottom: 64px;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.content-overlay__eyebrow {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: .25em;
  color: var(--chart);
  text-transform: uppercase;
  margin-bottom: 18px;
}

.content-overlay__headline {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: clamp(24px, 2.2vw, 32px);
  font-weight: 300;
  color: var(--white);
  line-height: 1.3;
  letter-spacing: -.01em;
  margin: 0;
  max-width: 760px;
  text-wrap: balance;
}

/* Sub-headline below overlay headline */
.le-overlay__sub {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 16px;
  font-weight: 300;
  color: var(--silver);
  line-height: 1.65;
  max-width: 680px;
  margin-top: 20px;
}


/* ============================================================
   Tab nav — anchored to top of overlay, nothing above it, no bounce
   ============================================================ */
.le-tabs {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(15,17,22,0.97);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  margin: 0 -7vw 48px;
  padding: 0 7vw;
  overflow-x: auto;
  scrollbar-width: none;
}

.le-tabs::-webkit-scrollbar { display: none; }

.le-tabs__list {
  display: flex;
  list-style: none;
  white-space: nowrap;
}

.le-tabs__tab {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--silver);
  padding: 16px 20px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: color .2s, border-color .2s;
  user-select: none;
  white-space: nowrap;
}

.le-tabs__tab:hover { color: var(--white); }
.le-tabs__tab.active { color: var(--chart); border-bottom-color: var(--chart); }

/* Close button — fixed top-right, nav height, no box */
.le-overlay-close {
  position: fixed;
  top: 0;
  right: 32px;
  height: 48px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  font-weight: 400;
  color: rgba(241,242,246,0.7);
  text-transform: uppercase;
  letter-spacing: .2em;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  z-index: 1100;
  display: flex;
  align-items: center;
  transition: color 0.2s ease;
}

.le-overlay-close:hover {
  color: var(--white);
}

.le-overlay-close:focus-visible {
  outline: 1px solid var(--chart);
  outline-offset: 4px;
}


/* ============================================================
   OVERLAY PANELS
   ============================================================ */
.le-panel { display: none; padding-bottom: 40px; }
.le-panel.active { display: block; }

.le-panel__eyebrow {
  display: block;
  margin-bottom: 20px;
}

.le-panel__headline {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: clamp(20px, 1.8vw, 28px);
  font-weight: 200;
  color: var(--white);
  line-height: 1.25;
  margin-bottom: 12px;
}

.le-panel__intro {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 16px;
  font-weight: 300;
  color: var(--silver);
  line-height: 1.65;
  max-width: 700px;
  margin-bottom: 48px;
}


/* ============================================================
   CHALLENGE CARDS
   ============================================================ */
.le-cards { display: flex; flex-direction: column; gap: 2px; }

.le-card {
  background: var(--barrel);
  position: relative;
  overflow: hidden;
}

.le-card::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--chart);
  opacity: 0;
  transition: opacity .25s ease;
}

.le-card.open::before { opacity: 1; }

.le-card__header {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  padding: 28px 32px;
  cursor: pointer;
  user-select: none;
}

.le-card__header:hover {
  background: rgba(255,255,255,0.03);
}

.le-card__header:hover .le-card__title { color: var(--white); }

.le-card__icon {
  width: 36px;
  height: 36px;
  background: rgba(184,212,0,0.1);
  border: 1px solid rgba(184,212,0,0.25);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}

.le-card__icon span {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  font-weight: 500;
  color: var(--chart);
  letter-spacing: .1em;
  text-transform: uppercase;
}

.le-card__meta { flex: 1; }

.le-card__num {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  font-weight: 400;
  color: var(--silver);
  letter-spacing: .3em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.le-card__title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 18px;
  font-weight: 300;
  color: var(--silver-bright);
  line-height: 1.3;
  transition: color .2s;
}

.le-card__title strong { font-weight: 500; color: var(--white); }

.le-card__source {
  margin-top: 8px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  color: var(--silver);
  letter-spacing: .18em;
  text-transform: uppercase;
}

.le-card__source a { color: var(--silver); text-decoration: none; transition: color .2s; }
.le-card__source a:hover { color: var(--chart); }

.le-card__toggle {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 18px;
  color: var(--chart);
  padding: 4px;
  transition: transform .3s ease, color .2s;
  flex-shrink: 0;
  margin-top: 6px;
}

.le-card.open .le-card__toggle { transform: rotate(45deg); color: var(--white); }

.le-card__body {
  max-height: 0;
  overflow: hidden;
  transition: max-height .5s cubic-bezier(0.4,0,0.2,1);
}

.le-card.open .le-card__body { max-height: 2800px; }

.le-card__inner {
  padding: 24px 32px 32px 88px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  border-top: 1px solid rgba(255,255,255,0.05);
}

.le-col-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .28em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.le-col-label--risk     { color: #E07B4A; }
.le-col-label--response { color: var(--chart); }

.le-col-body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 15px;
  font-weight: 300;
  color: var(--silver-bright);
  line-height: 1.7;
}

.le-col-body p + p { margin-top: 12px; }
.le-col-body strong { font-weight: 500; color: var(--white); }

/* Badges */
.le-badge {
  display: inline-flex;
  align-items: center;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 9px;
  font-weight: 400;
  letter-spacing: .22em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 2px;
  margin-left: 12px;
  vertical-align: middle;
}

.le-badge--high { background: rgba(224,123,74,0.12); color: #E07B4A; border: 1px solid rgba(224,123,74,0.25); }
.le-badge--med  { background: rgba(184,212,0,0.08); color: var(--chart); border: 1px solid rgba(184,212,0,0.2); }
.le-badge--nav  { background: rgba(157,162,181,0.08); color: var(--silver); border: 1px solid rgba(157,162,181,0.2); }

/* Avatar options */
.le-avatar-opts { display: flex; flex-direction: column; gap: 2px; margin-top: 20px; }

.le-avatar-opt {
  background: var(--mid);
  padding: 20px 24px;
  border-left: 2px solid transparent;
  transition: border-color .2s;
}

.le-avatar-opt:hover { border-left-color: rgba(184,212,0,0.4); }

.le-avatar-opt__num {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 9px;
  font-weight: 500;
  color: var(--chart);
  letter-spacing: .3em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.le-avatar-opt__title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 15px;
  font-weight: 500;
  color: var(--white);
  margin-bottom: 8px;
  line-height: 1.3;
}

.le-avatar-opt__body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 14px;
  font-weight: 300;
  color: var(--silver);
  line-height: 1.65;
}

.le-avatar-opt__status {
  margin-top: 10px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  font-weight: 400;
  color: var(--silver);
  letter-spacing: .2em;
  text-transform: uppercase;
}

.le-avatar-opt__status--preferred { color: rgba(184,212,0,0.6); }

/* Pills */
.le-pills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }

.le-pill {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  font-weight: 400;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--silver);
  border: 1px solid var(--barrel);
  padding: 6px 12px;
  transition: border-color .2s, color .2s;
}

.le-pill:hover { border-color: var(--silver); color: var(--white); }
.le-pill--rec { border-color: rgba(184,212,0,0.35); color: var(--chart); }

/* Label grid */
.le-label-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2px;
  margin-top: 40px;
}

.le-label-card { background: var(--barrel); padding: 28px; }

.le-label-card__type {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  font-weight: 500;
  color: var(--chart);
  letter-spacing: .28em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.le-label-card__title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 17px;
  font-weight: 300;
  color: var(--white);
  margin-bottom: 14px;
  line-height: 1.25;
}

.le-label-card__copy {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 14px;
  font-weight: 300;
  color: var(--silver);
  line-height: 1.65;
}

.le-label-card__sample {
  margin-top: 16px;
  padding: 14px 16px;
  background: var(--mid);
  border-left: 2px solid rgba(184,212,0,0.4);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  font-weight: 300;
  color: var(--silver-bright);
  line-height: 1.6;
}


/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .le-section__grid { grid-template-columns: 1fr; gap: 48px; }
  .le-section__copy { max-width: none; }
  .le-stats__grid { grid-template-columns: repeat(2, 1fr); gap: 56px 0; }
  .le-stat + .le-stat::before { display: none; }
  .le-stat:nth-child(odd)::after {
    content: '';
    position: absolute;
    right: 0; top: 50%;
    transform: translateY(-50%);
    width: 1px; height: 60%;
    background: rgba(255,255,255,0.07);
  }
  .le-card__inner { grid-template-columns: 1fr; gap: 20px; padding-left: 32px; }
  .le-card.open .le-card__body { max-height: 6000px; }
}

@media (max-width: 600px) {
  .le-section { padding: 80px 6vw; }
  .le-stats { padding: 64px 6vw; }
  .le-stats__grid { grid-template-columns: 1fr; gap: 48px; }
  .le-stat::after, .le-stat + .le-stat::before { display: none; }
  .content-overlay__inner { padding: 72px 6vw 80px; }
  .le-tabs { margin: 0 -6vw 40px; padding: 0 4vw; }
  .le-card__header { padding: 20px 16px; gap: 12px; }
  .le-card__inner { padding: 0 16px 24px; }
  .le-next__inner { padding: 0 6vw; }
}

@media (prefers-reduced-motion: reduce) {
  .le-stat { opacity: 1; transform: none; transition: none; }
  .le-card__body { transition: none; }
  .le-card.open .le-card__body { max-height: none; overflow: visible; }
  .content-overlay { transition: none; }
}
