/* Hallucination lesson. All rules scoped under .hl-* */

.hl-sc { width: 100%; display: flex; flex-direction: column; gap: 10px; }
.hl-note { font-size: 12px; color: var(--faint); text-align: center; }

/* chat */
.hl-chat { display: flex; flex-direction: column; gap: 8px; }
.hl-msg { padding: 10px 12px; border-radius: 14px; font-size: 14px; line-height: 1.4; max-width: 92%; }
.hl-me { align-self: flex-end; background: var(--violet-deep); color: #fff; border-bottom-right-radius: 4px; }
.hl-line.hl-fake { border-color: var(--violet-bright); }
.hl-line .hl-stamp { position: absolute; right: 10px; top: -10px; margin: 0; padding: 1px 8px; font-size: 12px; border-width: 1.5px; background: var(--bg); font-family: var(--sans); }
.hl-stamp { align-self: center; margin: 4px 0 2px; padding: 5px 12px; border-radius: 8px; border: 2px solid var(--violet-bright); color: #C9BEFF; font-weight: 800; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; transform: rotate(-3deg); animation: hlStamp .3s cubic-bezier(.34,1.56,.64,1) both; }
@keyframes hlStamp { from { transform: rotate(-3deg) scale(1.6); opacity: 0; } }

/* the sentence being written */
.hl-line { position: relative; font-family: var(--mono); font-size: 15px; line-height: 1.6; padding: 12px 14px; border-radius: 14px; background: #06080f; border: 1px solid var(--line); color: var(--text); }
.hl-blank { display: inline-block; min-width: 72px; border-bottom: 2px solid var(--violet-bright); color: var(--gold); font-weight: 600; line-height: 1.2; }
.hl-blank i { display: inline-block; width: 2px; height: 1em; background: var(--violet-bright); vertical-align: text-bottom; animation: hlCaret 1s steps(2) 8; }
@keyframes hlCaret { 50% { opacity: 0; } }
.hl-blank.set { border-color: var(--gold); animation: hlLand .25s cubic-bezier(.34,1.56,.64,1) both; }
@keyframes hlLand { from { transform: scale(.8); opacity: 0; } }

/* the pile */
.hl-pile { display: flex; align-items: stretch; gap: 6px; }
.hl-col { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: stretch; gap: 4px; padding: 0; background: none; border: 0; font: inherit; color: inherit; }
button.hl-col { cursor: pointer; min-height: 44px; border-radius: 10px; }
.hl-bw { height: 96px; display: flex; align-items: flex-end; border-bottom: 1.5px solid var(--line-strong); }
.hl-bw i { display: block; width: 100%; height: 0; border-radius: 5px 5px 0 0; background: var(--raised); border: 1px solid var(--line-strong); border-bottom: 0; transition: height .55s cubic-bezier(.2,.8,.2,1), background .15s; }
.hl-col span { font-size: 14px; font-weight: 700; text-align: center; color: var(--dim); white-space: nowrap; }
button.hl-col .hl-bw i { background: #2A2F55; border-color: rgba(169,155,255,.5); }
.hl-col.hot .hl-bw i { background: rgba(252,192,80,.55); }
.hl-col.win .hl-bw i, .hl-col.right .hl-bw i { background: var(--gold); border-color: var(--gold); box-shadow: 0 0 12px rgba(252,192,80,.5); }
.hl-col.win span, .hl-col.right span { color: var(--gold); }
.hl-col.wrong .hl-bw i { background: var(--red); border-color: var(--red); }
.hl-col.off { opacity: .45; }
.hl-pile.hl-sm .hl-bw { height: 70px; }
.hl-pile.hl-sm .hl-col span { display: none; }
.hl-pile.hl-xs { gap: 4px; }
.hl-pile.hl-xs .hl-bw { height: 34px; }
.hl-pile.hl-xs .hl-col span { font-size: 12px; font-weight: 600; }

.hl-two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.hl-side { min-width: 0; display: flex; flex-direction: column; gap: 4px; padding: 10px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); text-align: center; }
.hl-side > b { font-size: 16px; color: var(--gold); margin-top: 4px; }
.hl-side > span { font-size: 13px; color: var(--dim); }


/* the court brief */
.hl-brief { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: 14px; background: #F2EDE3; color: #1B1A18; }
.hl-brief small { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #6E6960; }
.hl-cases { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.hl-case { position: relative; min-height: 48px; padding: 6px 8px; border-radius: 10px; border: 1.5px solid #CFC6B4; background: #FBF8F2; font: inherit; font-family: var(--serif); font-style: italic; font-size: 14px; line-height: 1.2; color: #1B1A18; text-align: left; }
.hl-case em { display: none; font-family: var(--sans); font-style: normal; font-size: 12px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: #5B45C8; }
.hl-case.gone { border-color: #A99BFF; background: #EEEAF7; }
.hl-case.gone span { text-decoration: line-through; color: #8A7F74; }
.hl-case.gone em { display: block; margin-top: 2px; animation: hlLand .25s cubic-bezier(.34,1.56,.64,1) both; }

/* two tests of 100 questions */
.hl-tests { align-items: stretch; }
.hl-test { min-width: 0; display: flex; flex-direction: column; gap: 8px; padding: 10px; border-radius: 14px; background: var(--surface); border: 1.5px solid var(--line); transition: border-color .3s, box-shadow .3s; }
.hl-test.hl-win { border-color: var(--gold); box-shadow: 0 0 14px rgba(252,192,80,.3); }
.hl-th { display: flex; flex-direction: column; gap: 2px; min-height: 52px; }
.hl-th b { font-size: 15px; color: var(--text); }
.hl-th span { font-size: 12.5px; line-height: 1.25; color: var(--dim); }
.hl-dots { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 3px; }
.hl-dots i { display: block; aspect-ratio: 1; border-radius: 50%; background: var(--raised); border: 1px solid var(--line-strong); transition: background .15s; }
.hl-dots i.ok { background: var(--mint); border-color: var(--mint); }
.hl-dots i.no { background: var(--red); border-color: var(--red); }
.hl-score { font-size: 13px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--dim); text-align: center; }
.hl-score b { font-size: 20px; color: var(--gold); margin-left: 4px; }
.hl-key { display: flex; justify-content: center; gap: 14px; font-size: 12.5px; color: var(--dim); }
.hl-key span { display: flex; align-items: center; gap: 5px; }
.hl-key i { width: 10px; height: 10px; border-radius: 50%; background: var(--raised); border: 1px solid var(--line-strong); }
.hl-key i.ok { background: var(--mint); border-color: var(--mint); }
.hl-key i.no { background: var(--red); border-color: var(--red); }

/* the three questions, answered in the scene */
.choices.hl-risk { width: 100%; display: flex; flex-direction: column; gap: 8px; }
.hl-risk .choice { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: end; gap: 10px; min-height: 58px; text-transform: none; }
.hl-rq { font-size: 15px; line-height: 1.25; color: var(--text); text-align: left; }

@media (max-height: 700px) {
  .hl-sc { gap: 8px; }
  .hl-dots { gap: 2px; }
  .hl-th { min-height: 46px; }
  .hl-msg { font-size: 13px; }
  .hl-msg { padding: 8px 10px; }
  .hl-line { padding: 9px 12px; font-size: 14px; }
  .hl-bw { height: 72px; }
  .hl-pile.hl-sm .hl-bw { height: 56px; }
  .hl-pile.hl-xs .hl-bw { height: 26px; }
  .hl-case { min-height: 44px; font-size: 13px; }
}
