/* 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(--red); }
.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(--red); color: #FF8A8A; 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 reading slice */
.hl-read { display: flex; flex-direction: column; gap: 6px; }
.hl-snip { text-align: left; min-height: 44px; padding: 8px 12px; border-radius: 10px; border: 1.5px solid var(--line); background: var(--surface); font: inherit; font-family: var(--serif); font-style: italic; font-size: 15px; line-height: 1.3; color: var(--dim); cursor: pointer; transition: background .2s, border-color .2s, color .2s; }
.hl-snip.on { border-color: var(--gold); background: rgba(252,192,80,.12); color: var(--text); }

/* 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); }

.hl-risk { display: flex; flex-direction: column; gap: 8px; }
.hl-rrow { display: grid; grid-template-columns: 104px 1fr; align-items: end; gap: 10px; padding: 8px 10px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); transition: border-color .3s; }
.hl-rrow > b { font-size: 13px; line-height: 1.25; color: var(--text); align-self: center; }
.hl-rrow.flat { border-color: var(--gold); }

/* the test paper */
.hl-paper { display: flex; flex-direction: column; gap: 8px; padding: 14px; border-radius: 14px; background: #F2EDE3; color: #1B1A18; }
.hl-paper small { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #6E6960; }
.hl-paper p { margin: 0; font-family: var(--serif); font-size: 18px; line-height: 1.35; }
.hl-paper .hl-rule { background: #E4DDCF; color: #3A3732; border: 0; opacity: 1; }
.hl-paper .hl-rule b { color: #1B1A18; }
.hl-ans { min-height: 26px; border-bottom: 1.5px solid #B8B09A; font-family: var(--serif); font-style: italic; font-size: 16px; color: #5B45C8; }

/* the scoreboards */
.hl-rule { text-align: center; font-size: 13px; font-weight: 700; color: var(--dim); padding: 6px 10px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); }
.hl-rule b { font-family: var(--mono); color: var(--text); }
.hl-rule b.neg { color: #FF8A8A; }
.hl-rule.on { animation: hlLand .3s cubic-bezier(.34,1.56,.64,1) both; }
.hl-exam { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.hl-exam .hl-rule { grid-column: 1 / -1; }
.hl-sheet { display: flex; flex-direction: column; gap: 5px; padding: 10px; border-radius: 14px; background: var(--surface); border: 2px solid var(--line); transition: border-color .3s; align-items: flex-start; }
.hl-sheet.lead { border-color: var(--gold); }
.hl-hd { display: flex; justify-content: space-between; align-items: baseline; width: 100%; }
.hl-nm { font-weight: 800; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--dim); }
.hl-sheet small { font-size: 12px; color: var(--faint); margin-top: -4px; }
.hl-score { font-family: var(--mono); font-size: 22px; font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; line-height: 1; }
.hl-sheet.lead .hl-nm, .hl-sheet.lead .hl-score { color: var(--gold); }
.hl-grid { display: grid; grid-template-columns: repeat(10, minmax(0, 11px)); gap: 2px; }
.hl-grid i { aspect-ratio: 1; border-radius: 2px; background: var(--raised); }
.hl-grid i.r, .hl-leg i.r { background: var(--mint); }
.hl-grid i.w, .hl-leg i.w { background: var(--red); }
.hl-leg { display: flex; flex-direction: column; gap: 1px; font-size: 12px; font-weight: 700; color: var(--dim); }
.hl-leg i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 5px; background: var(--raised); border: 1px solid var(--line-strong); }

/* 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: #B03A3A; }
.hl-case.gone { border-color: #D85555; background: #FBE9E7; }
.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; }

@media (max-height: 700px) {
  .hl-sc { gap: 8px; }
  .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-rrow { padding: 6px 10px; }
  .hl-sheet { padding: 7px; gap: 4px; }
  .hl-grid { grid-template-columns: repeat(10, minmax(0, 8px)); }
  .hl-score { font-size: 19px; }
  .hl-paper { padding: 11px; }
  .hl-paper p { font-size: 16px; }
  .hl-case { min-height: 44px; font-size: 13px; }
  .hl-read { gap: 4px; }
  .hl-snip { min-height: 44px; padding: 5px 10px; font-size: 14px; line-height: 1.25; }
}
