:root {
  --teal: #00ffbf;
  --line2: rgba(255, 255, 255, 0.12);
}

.step-badge {
  width: 26px;
  height: 26px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-weight: 900;
  background: rgba(220, 40, 40, 0.32);
  border-color: rgba(220, 40, 40, 0.75);
  color: rgba(255, 255, 255, 0.9);
}

.tc__hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.tc__infoBtn {
  flex: 0 0 auto;
}

.tc__row {
  display: flex;
  gap: 14px;
  align-items: stretch;
  flex-wrap: nowrap;
}

.tc__col--grow {
  flex: 1 1 auto;
  min-width: 0;
}

.tc__col--side {
  flex: 0 0 360px;
  min-width: 360px;
}

.bar__col--side {
  flex: 0 0 440px;
  min-width: 440px;
}

.tc__wordPanelBd,
.tc__wordCloudBd {
  padding: 0 !important;
}

.tc__wordCloudShell {
  background: rgba(0, 0, 0, 0.18);
  border-color: rgba(255, 255, 255, 0.1);
}

/* Readability */
.tc__readBd {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tc__gradeRow {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-top: 10px;
}

.tc__gradeScore {
  font-size: 44px;
  font-weight: 900;
  line-height: 1;
}

.tc__gradeLevel {
  font-size: 14.5px;
  font-weight: 100;
  color: var(--muted);
}

.tc__gradeText {
  margin-top: 10px;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.55;
}

.tc__stats {
  display: grid;
  gap: 6px;
}

/* Named entities + highlighted */
.tc__nerBd,
.tc__hlBd {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.tc__nerHd {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.tc__nerLabel {
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 850;
  color: var(--muted2);
  letter-spacing: 0.2px;
}

/* Smaller, different icons (keep badge look but reduced size) */
.tc__nerIcon {
  width: 30px;
  height: 30px;
  border-radius: 12px;
}

.tc__nerIcon svg {
  width: 16px;
  height: 16px;
}

.ner-items {
  cursor: pointer;
}

/* Utility */
.tc__hiddenNote {
  display: none;
}

/* Responsive: stack at <= 980px */
@media (max-width: 980px) {
  .tc__row {
    flex-wrap: wrap;
  }

  .tc__col--side {
    flex: 1 1 360px;
    min-width: 300px;
  }
}

/* =========================
    Assessment overview (ao)
========================= */

.ao__row {
  display: flex;
  gap: 14px;
  align-items: stretch;
  flex-wrap: nowrap;
}

.ao__col--grow {
  flex: 1 1 auto;
  min-width: 0;
}

.ao__col--side {
  flex: 0 0 480px;
  min-width: 480px;
}

.ao__hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.ao__infoBtn {
  flex: 0 0 auto;
}

/* Left column stack */
.ao__stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* General Risk gauge layout */
.ao__gaugeRow {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px 16px;
}

.ao__gaugeLeft {
  flex: 0 0 380px;
  min-width: 260px;
}

.ao__gaugeRight {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.ao__riskInfo {
  color: rgba(255, 255, 255, 0.88);
  line-height: 1.55;
  display: flex;
  justify-content: center;
}

/* Info body spacing inside panels */
.ao__bd {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* “Assess” banner (replaces bootstrap alert) */
.ao__note {
  border-radius: 16px;
  border: 1px solid rgba(64, 255, 192, 0.22);
  background: rgba(64, 255, 192, 0.08);
  padding: 12px 12px;
  color: rgba(255, 255, 255, 0.88);
  line-height: 1.55;
}

.ao__note a {
  color: var(--teal);
  font-weight: 900;
  text-decoration: none;
}

.ao__resumeBanner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  border-radius: 16px;
  border: 1px solid rgba(255, 193, 64, 0.3);
  background: rgba(255, 193, 64, 0.1);
  padding: 12px 14px;
  color: rgba(255, 255, 255, 0.88);
  line-height: 1.55;
  margin-bottom: 14px;
}

.ao__resumeBanner a {
  color: var(--teal);
  font-weight: 900;
  text-decoration: none;
}

.ao__finalizedBanner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  border-radius: 16px;
  border: 1px solid rgba(64, 255, 192, 0.3);
  background: rgba(64, 255, 192, 0.1);
  padding: 12px 14px;
  color: rgba(255, 255, 255, 0.88);
  line-height: 1.55;
  margin-bottom: 14px;
  font-weight: 700;
}

/* Indicator list (replaces bootstrap table) */
.ao__list {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.ao__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 10px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.12);
}

.ao__left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

/* Custom checkbox */
.ao__box {
  width: 18px;
  height: 18px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.03);
  position: relative;
  flex: 0 0 auto;
}

/* Inspect link */
.ao__inspect {
  flex: 0 0 auto;
  font-weight: 100;
  color: rgba(255, 255, 255, 0.92);
  cursor: pointer;
}

.ao__inspect:hover {
  color: var(--teal);
}

/* Similarity indicator table */
.ao__simTable {
  padding: 4px 2px 0;
}

.ao__simTable-table {
  width: 100%;
  min-width: 0;
  border-collapse: collapse;
  table-layout: fixed;
}

.ao__simTable-table th,
.ao__simTable-table td {
  padding: 3px 8px;
  text-align: left;
  font-size: 12px;
}

.ao__simTable-dotCell,
.ao__simTable-colHeader {
  width: 22px;
}

.ao__simTable-colHeader,
.ao__simTable-indicatorHeader {
  color: rgba(255, 255, 255, 0.92);
  font-weight: 700;
}

.ao__simTable-indicatorHeader,
.ao__simTable-indicatorName {
  width: auto;
  word-break: break-word;
}

.ao__simTable-indicatorName {
  color: rgba(255, 255, 255, 0.85);
}

.ao__dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
}

.ao__simTable-caption {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 8px 2px 0;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.55);
}

.ao__simTable-captionLine--removable {
  cursor: pointer;
}

.ao__simTable-captionLine--removable:hover {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: line-through;
}

.user-sep {
  height: 1px;
  margin: 6px 6px;
  background: rgba(255, 255, 255, 0.08);
}

.ao__top {
  align-items: baseline;
}

.ao__titleRow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.ao__allInfo {
  margin-top: 10px;
  margin-bottom: 14px;
}

.ao__ol,
.ao__ul {
  padding-left: 18px;
}

/* ==========================
     Indicator assessment layout
  ========================== */

.ia .tc__hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.ia__panel {
  margin-bottom: 18px;
}

.ia__grid {
  display: block;
}

.ia__main {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-auto-rows: auto;
  row-gap: 14px;
}

.ia__sentPanel,
.ia__origPanel {
  width: 100%;
  max-width: 100%;
}

/* .ia__sentPanel spans the full row (see rule below); make the instructions
   card match that full width instead of being stuck in a single 1fr column. */
.ia__card {
  grid-column: 1 / -1;
}

/* Yes/No assessment card sits top-right, next to the first instruction
   paragraph; the "Your task" block below spans the full card width. */
.ia__cardRow {
  display: flex;
  align-items: flex-start;
  gap: 20px;
}

.ia__cardRow .textblock.ia__block {
  flex: 1 1 auto;
  min-width: 0;
}

.iaAss__pane {
  flex: 0 0 280px;
  padding-left: 20px;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
}

@media (max-width: 720px) {
  .ia__cardRow {
    flex-direction: column;
  }

  .iaAss__pane {
    flex: 1 1 auto;
    width: 100%;
    padding-left: 0;
    padding-top: 16px;
    border-left: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
  }
}

/* Remove any internal width constraints */
.ia__sentPanel .panel-bd,
.ia__sentBox {
  width: 100%;
  max-width: 100%;
}

@media (max-width: 980px) {
  .ia__main {
    padding-right: 0;
    max-width: 100%;
  }
}

.ia__card,
.ia__sentPanel,
.ia__origPanel {
  margin-bottom: 14px;
}

.ia__block {
  display: grid;
  gap: 10px;
}

.ia__infoBlock {
  margin-bottom: 14px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.ia__subhd {
  font-weight: 900;
  letter-spacing: 0.2px;
  opacity: 0.95;
}

.ia__list {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 6px;
}

.ia__sentBox {
  min-height: 84px;
}

.ia__uploadedText {
  white-space: pre-line;
}

/* hide helper */
.is-hidden {
  display: none !important;
}

.sentList__empty {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.82);
  font-weight: 700;
}

.ia__uploadedText .otSent {
  scroll-margin-top: 92px;
  border-radius: 8px;
  padding: 1px 2px;
}
.ia__uploadedText .otSent.is-hit {
  background: rgba(64, 255, 192, 0.14);
  box-shadow: 0 0 0 1px rgba(64, 255, 192, 0.35);
}
.sentItem {
  cursor: pointer;
}

/* persistent highlight + pulse on jump */
.iaHL {
  color: #fff;
  background: rgba(64, 255, 192, 0.22);
  border: 1px solid rgba(64, 255, 192, 0.6);
  border-radius: 6px;
  padding: 0 3px;
  box-shadow: 0 0 0 2px rgba(64, 255, 192, 0.25);
  animation: iaHLpulse 1.3s ease-out 1;
}

@keyframes iaHLpulse {
  0% {
    background: rgba(64, 255, 192, 0.55);
    box-shadow: 0 0 0 4px rgba(64, 255, 192, 0.45);
  }
  100% {
    background: rgba(64, 255, 192, 0.22);
    box-shadow: 0 0 0 2px rgba(64, 255, 192, 0.25);
  }
}

/* sentence row: text/label grows, view-in-context button pinned at the end */
.sentList__row {
  display: flex;
  align-items: stretch;
  gap: 6px;
}

.sentList__row .checkbox-item,
.sentList__row .sentList__text {
  flex: 1 1 auto;
  min-width: 0;
}

.sentList__view {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  padding: 0;
  background: transparent;
  border: 1px solid rgba(64, 255, 192, 0.25);
  border-radius: 8px;
  color: rgba(64, 255, 192, 0.7);
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.sentList__view:hover {
  background: rgba(64, 255, 192, 0.12);
  border-color: rgba(64, 255, 192, 0.6);
  color: rgba(64, 255, 192, 1);
}

.sentList__view svg {
  width: 16px;
  height: 16px;
  display: block;
}

/* Persistent original-text drawer (global view-in-context target) */
.origDrawer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  background: rgba(12, 18, 30, 0.98);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 -10px 28px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(8px);
}

.origDrawer__toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 11px 20px;
  background: transparent;
  border: 0;
  color: #e7ecf3;
  font: inherit;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
}

.origDrawer__chev {
  transition: transform 0.2s ease;
  color: rgba(64, 255, 192, 0.9);
}

.origDrawer:not(.is-collapsed) .origDrawer__chev {
  transform: rotate(180deg);
}

.origDrawer__body {
  max-height: 40vh;
  overflow: auto;
  padding: 4px 20px 20px;
}

.origDrawer.is-collapsed .origDrawer__body {
  display: none;
}

.origDrawer .ia__uploadedText {
  line-height: 1.75;
  white-space: pre-line;
  color: rgba(206, 214, 226, 0.92);
}

/* ==========================
     Progress bar
  ========================== */
.iaProg__track {
  --dot: 11px;

  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 0;
  padding: 8px 4px;
  position: relative;
  width: 100%;
  max-width: 360px; /* stay compact and clear of the fixed assessment panel */
}

/* The line behind */
.iaProg__track::before {
  content: "";
  position: absolute;
  left: calc(var(--dot) / 2);
  right: calc(var(--dot) / 2);
  top: 50%;
  transform: translateY(-50%);
  height: 3px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 999px;
}

/* Steps sit above the line */
.iaProg__step {
  position: relative;
  z-index: 1;
  display: inline-flex;
}

/* Base dot = upcoming */
.iaProg__dot {
  width: var(--dot);
  height: var(--dot);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
  border: 1.5px solid rgba(255, 255, 255, 0.22);
  padding: 0;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease,
    border-color 0.2s ease;
}

.iaProg__dot:hover {
  transform: scale(1.18);
  border-color: rgba(255, 255, 255, 0.45);
}

/* Completed */
.iaProg__step.is-done .iaProg__dot {
  background: var(--teal);
  border-color: var(--teal);
}

/* Active = subtle ring (no garish glow) */
.iaProg__step.is-current .iaProg__dot {
  background: var(--teal);
  border-color: var(--teal);
  box-shadow: 0 0 0 4px rgba(0, 255, 191, 0.16);
}

/* Responsive: keep them tappable */
@media (max-width: 520px) {
  .iaAss__nav {
    gap: 10px;
  }
  .iaAss__nav a {
    padding: 10px 12px;
    border-radius: 14px;
    font-size: 14px;
  }
}

.iaAss__q {
  margin: 0 0 12px 0;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.92);
}

.iaAss__btnRow {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.iaAss__nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 14px;
}

.link--ok {
  color: var(--info, #40ffc0);
  font-weight: 900;
}

/* First (Anger) Next button aligned right */
#anger-asses-box .iaAss__nav {
  display: flex;
  justify-content: flex-end;
}

.iaAss__nav a,
.iaAss__nav .prev-link,
.iaAss__nav .next-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;

  padding: 8px 10px;
  border-radius: 12px;

  text-decoration: none;
  font-weight: 900;
  letter-spacing: 0.2px;
  font-size: 13px;

  color: rgba(255, 255, 255, 0.92);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);

  transition: transform 120ms ease, background 120ms ease,
    border-color 120ms ease, box-shadow 120ms ease;
}

/* subtle hover */
.iaAss__nav a:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.18);
}

/* focus */
.iaAss__nav a:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px rgba(64, 255, 192, 0.18),
    0 10px 24px rgba(0, 0, 0, 0.35);
  border-color: rgba(64, 255, 192, 0.6);
}

/* active click */
.iaAss__nav a:active {
  transform: translateY(0);
  box-shadow: none;
}

/* Previous: slightly muted */
.iaAss__nav .prev-link {
  opacity: 0.9;
}

/* Responsive: stack at <= 980px */
@media (max-width: 980px) {
  .ao__row {
    flex-wrap: wrap;
  }

  .ao__col--side {
    flex: 1 1 420px;
    min-width: 300px;
  }

  .ao__gaugeRow {
    flex-wrap: wrap;
  }

  .ao__gaugeLeft {
    flex: 1 1 380px;
  }
}

/* base — matches the Previous/Next pill styling in .iaAss__nav a */
.iaAss__btnRow .iaAss__yes,
.iaAss__btnRow .iaAss__no {
  height: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;

  padding: 8px 10px;
  border-radius: 12px;

  font-weight: 900;
  letter-spacing: 0.2px;
  font-size: 13px;

  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.92);
  transition: transform 120ms ease, background 120ms ease,
    border-color 120ms ease, box-shadow 120ms ease;
}

.iaAss__btnRow .iaAss__yes:hover,
.iaAss__btnRow .iaAss__no:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.18);
}

/* YES selected */
.iaAss__yes.is-active {
  background: linear-gradient(
    135deg,
    rgba(64, 255, 192, 0.35),
    rgba(64, 255, 192, 0.12)
  );
  border-color: rgba(64, 255, 192, 0.8);
  color: #baffec;
}

/* NO selected */
.iaAss__no.is-active {
  background: linear-gradient(
    135deg,
    rgba(255, 90, 90, 0.35),
    rgba(255, 90, 90, 0.12)
  );
  border-color: rgba(255, 90, 90, 0.8);
  color: #ffd4d4;
}

/* Keep the selected hue on hover instead of falling back to the neutral
   hover state (these need to out-specificity .iaAss__btnRow .iaAss__yes:hover) */
.iaAss__btnRow .iaAss__yes.is-active:hover {
  background: linear-gradient(
    135deg,
    rgba(64, 255, 192, 0.45),
    rgba(64, 255, 192, 0.16)
  );
  border-color: rgba(64, 255, 192, 0.9);
  color: #baffec;
}

.iaAss__btnRow .iaAss__no.is-active:hover {
  background: linear-gradient(
    135deg,
    rgba(255, 90, 90, 0.45),
    rgba(255, 90, 90, 0.16)
  );
  border-color: rgba(255, 90, 90, 0.9);
  color: #ffd4d4;
}

/* Make Sentences panel full width like Original text */
.ia__sentPanel {
  grid-column: 1 / -1;
}

/* Ensure the box inside also stretches */
.ia__sentBox {
  width: 100%;
  max-width: 100%;
}
