.trle-app {
  --trle-pink: #be006e;
  --trle-pink-dark: #9d005b;
  --trle-ink: #4d5c6d;
  --trle-muted: #6b7786;
  --trle-line: #e5e7eb;
  --trle-cream: #fff2dc;
  --trle-peach: #ffdfa9;
  --trle-green: #68d600;
  box-sizing: border-box;
  width: min(100% - 32px, 980px);
  margin: 34px auto 60px;
  padding: 30px 38px 42px;
  scroll-margin-top: 110px;
  color: var(--trle-ink);
  background: #fff;
  font-family: Quicksand, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.65;
}
.trle-app *, .trle-lesson-link * { box-sizing: border-box; }
.trle-app button, .trle-app textarea { font: inherit; }
.trle-header { padding: 12px 0 28px; border-bottom: 1px solid var(--trle-line); }
.trle-eyebrow {
  color: var(--trle-muted);
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
}
.trle-app .trle-header h1 {
  max-width: 750px;
  margin: 26px 0 12px;
  color: var(--trle-pink);
  font-family: Quicksand, Arial, sans-serif;
  font-size: clamp(1.7rem, 4vw, 2.45rem);
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: .015em;
  text-transform: uppercase;
}
.trle-header h1 span { display: block; }
.trle-header p { max-width: 690px; margin: 0; color: var(--trle-muted); }
.trle-progress-label {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 32px;
  color: var(--trle-muted);
  font-size: .8rem;
  font-weight: 700;
  text-transform: uppercase;
}
.trle-progress { height: 5px; margin-top: 8px; background: var(--trle-line); overflow: hidden; }
.trle-progress span { display: block; height: 100%; background: var(--trle-green); transition: width .2s; }
.trle-panel { padding: 35px 0 10px; }
.trle-app .trle-panel h2, .trle-app .trle-history h2 {
  margin: 15px 0;
  color: var(--trle-pink);
  font-family: Quicksand, Arial, sans-serif;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 400;
  line-height: 1.3;
}
.trle-panel p { color: var(--trle-muted); }
.trle-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 99px;
  padding: 7px 13px;
  background: var(--trle-pink);
  color: #fff;
  font-size: .71rem;
  font-weight: 700;
  letter-spacing: .02em;
}
.trle-part-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px 16px; margin: 22px 0; padding: 0; list-style: none; counter-reset: trle-part; }
.trle-part-list li { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 12px; background: var(--trle-cream); color: var(--trle-ink); }
.trle-part-list li::before { counter-increment: trle-part; content: counter(trle-part); display: inline-flex; flex: none; align-items: center; justify-content: center; width: 27px; height: 27px; border-radius: 50%; background: #fff; color: var(--trle-pink); font-size: .85rem; font-weight: 700; }
.trle-duration { margin: 18px 0 26px; font-weight: 700; }
.trle-profiles { padding: 21px 24px; border: 1px solid var(--trle-line); border-radius: 16px; }
.trle-app .trle-profiles h3 { margin: 0 0 13px; color: var(--trle-pink); font-size: 1.12rem; }
.trle-profile-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.trle-profile-grid > div { padding: 15px 17px; border-radius: 12px; background: var(--trle-cream); }
.trle-profile-grid strong, .trle-profile-grid span { display: block; }
.trle-profile-grid strong { color: var(--trle-pink); }
.trle-profiles p { margin: 13px 0 0; }
.trle-note { margin: 22px 0; padding: 20px 24px; border-radius: 17px; background: var(--trle-cream); }
.trle-phase { padding: 0; margin: 28px 0; border: 0; }
.trle-phase legend { margin-bottom: 10px; color: var(--trle-ink); font-weight: 700; }
.trle-phase label { display: flex; align-items: flex-start; gap: 12px; max-width: 680px; margin: 0 0 10px; padding: 14px 17px; border: 1px solid var(--trle-line); border-radius: 12px; cursor: pointer; }
.trle-phase label:has(input:checked) { border-color: var(--trle-pink); background: #fff4fa; }
.trle-phase label:focus-within { outline: 3px solid #384d69; outline-offset: 2px; }
.trle-phase label strong, .trle-phase label small { display: block; }
.trle-phase label small { margin-top: 3px; color: var(--trle-muted); font-size: .86rem; line-height: 1.45; }
.trle-phase-help { max-width: 680px; margin: 12px 0 0; font-size: .87rem; }
.trle-app input[type=radio] { width: 18px; height: 18px; flex: none; accent-color: var(--trle-pink); }
.trle-phase input[type=radio] { margin-top: 4px; }
.trle-button {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  padding: 10px 25px;
  border: 2px solid var(--trle-pink);
  border-radius: 999px;
  background: var(--trle-pink);
  color: #fff !important;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s, transform .15s;
}
.trle-button:hover { background: var(--trle-pink-dark); transform: translateY(-1px); }
.trle-button-secondary { background: #fff; color: var(--trle-pink) !important; }
.trle-button-secondary:hover { background: #fff4fa; }
.trle-button:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.trle-button:focus-visible, .trle-option:focus-within, .trle-review-row:focus-visible,
.trle-app textarea:focus-visible, .trle-lesson-link-button:focus-visible { outline: 3px solid #384d69; outline-offset: 3px; }
.trle-block-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; color: var(--trle-muted); font-size: .82rem; }
.trle-intro { padding-bottom: 22px; border-bottom: 1px solid var(--trle-line); }
.trle-reading { margin: 34px 0 12px; padding: 25px 28px; border-radius: 18px; background: var(--trle-cream); }
.trle-app .trle-reading h3 { margin: 0 0 11px; color: var(--trle-pink); font-size: 1.05rem; font-weight: 700; }
.trle-reading p { margin: 0; color: var(--trle-ink); line-height: 1.85; }
.trle-question { min-width: 0; margin: 0; padding: 25px 0; border: 0; border-bottom: 1px solid var(--trle-line); }
.trle-question legend, .trle-question > label {
  display: block;
  width: 100%;
  margin-bottom: 15px;
  color: var(--trle-ink);
  font-size: 1.04rem;
  font-weight: 700;
  line-height: 1.55;
}
.trle-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 29px;
  height: 29px;
  margin-right: 10px;
  border-radius: 50%;
  background: var(--trle-cream);
  color: var(--trle-pink);
  font-size: .9rem;
  font-weight: 700;
  vertical-align: middle;
}
.trle-options { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.trle-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-height: 50px;
  padding: 12px 15px;
  border: 1px solid #f1dfca;
  border-radius: 12px;
  background: #fffaf3;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.trle-option:hover { border-color: var(--trle-pink); }
.trle-option.is-selected { border-color: var(--trle-pink); background: #fff1f8; }
.trle-option span { color: var(--trle-ink); font-weight: 400; }
.trle-recognition legend strong { font-size: 1.15rem; }
.trle-options-inline { grid-template-columns: repeat(3, 1fr); }
.trle-app textarea { display: block; width: 100%; min-height: 110px; padding: 14px 16px; border: 1px solid #cdd2d9; border-radius: 12px; background: #fff; color: var(--trle-ink); resize: vertical; }
.trle-hint { margin: 8px 0 0; font-size: .85rem; }
.trle-actions { display: flex; justify-content: space-between; gap: 14px; margin-top: 30px; }
.trle-return-review { display: inline-block; margin: 0 0 12px; padding: 4px 0; border: 0; background: none; color: var(--trle-pink); font-weight: 700; text-decoration: underline; cursor: pointer; }
.trle-return-review:focus-visible { outline: 3px solid #384d69; outline-offset: 3px; }
.trle-error { margin-top: 20px; padding: 14px 18px; border: 1px solid #e9bbbb; border-radius: 12px; background: #fff0f0; color: #9e2121; }
.trle-error[hidden] { display: none; }
.trle-review-list { margin: 26px 0; border: 1px solid var(--trle-line); border-radius: 14px; overflow: hidden; }
.trle-review-row { display: flex; justify-content: space-between; gap: 12px; width: 100%; padding: 15px 20px; border: 0; border-bottom: 1px solid var(--trle-line); background: #fff; color: var(--trle-ink); text-align: left; cursor: pointer; }
.trle-review-row:last-child { border-bottom: 0; }
.trle-review-row:hover { background: #fff8ee; }
.trle-review-row strong { white-space: nowrap; color: var(--trle-pink); }
.trle-review-detail { display: flex; align-items: center; gap: 18px; }
.trle-review-edit { color: var(--trle-pink); font-weight: 700; white-space: nowrap; }
.trle-score-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin: 24px 0; }
.trle-score-grid > div { padding: 17px; border-radius: 13px; background: var(--trle-cream); }
.trle-score-grid span { display: block; color: var(--trle-muted); }
.trle-score-grid strong { color: var(--trle-pink); font-size: 1.2rem; }
.trle-history { margin-top: 42px; padding-top: 20px; border-top: 1px solid var(--trle-line); }
.trle-app .trle-history h2 { font-size: 1.25rem; }
.trle-history-intro { margin: 0 0 18px; color: var(--trle-muted); }
.trle-history-entry { margin: 11px 0; border: 1px solid var(--trle-line); border-radius: 14px; background: #fff; overflow: hidden; }
.trle-history-entry summary { display: flex; justify-content: space-between; align-items: center; gap: 18px; padding: 17px 20px; list-style: none; cursor: pointer; }
.trle-history-entry summary::-webkit-details-marker { display: none; }
.trle-history-entry summary:hover, .trle-history-entry[open] summary { background: #fff8ee; }
.trle-history-entry summary:focus-visible { outline: 3px solid #384d69; outline-offset: -3px; }
.trle-history-main { display: flex; flex-direction: column; min-width: 0; }
.trle-history-title { color: var(--trle-ink); font-size: 1.03rem; }
.trle-history-meta { color: var(--trle-muted); font-size: .87rem; }
.trle-history-action { display: inline-flex; align-items: center; gap: 8px; flex: none; color: var(--trle-pink); font-weight: 700; text-decoration: underline; }
.trle-history-close-text, .trle-history-entry[open] .trle-history-open-text { display: none; }
.trle-history-entry[open] .trle-history-close-text { display: inline; }
.trle-history-chevron { display: inline-block; font-size: 1.35rem; line-height: 1; text-decoration: none; transition: transform .15s; }
.trle-history-entry[open] .trle-history-chevron { transform: rotate(180deg); }
.trle-history-body { padding: 0 20px 20px; border-top: 1px solid var(--trle-line); }
.trle-history-body > p { margin: 12px 0 0; color: var(--trle-muted); }
.trle-comparison { display: flex; flex-direction: column; gap: 4px; margin: 12px 0 18px; padding: 17px 20px; border-radius: 14px; background: var(--trle-cream); }
.trle-comparison strong { color: var(--trle-pink); }
.trle-access { max-width: 900px; margin: 25px auto; padding: 22px; border-radius: 14px; background: #fff2dc; color: #34465d; }
.trle-lesson-link {
  display: flex;
  align-items: center;
  gap: 15px;
  width: 100%;
  padding: 17px 20px;
  border-radius: 18px;
  background: #fff2dc;
  color: #4d5c6d;
  font-family: Quicksand, Arial, sans-serif;
  line-height: 1.5;
}
.trle-lesson-link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  max-width: 250px;
  min-height: 38px;
  padding: 7px 17px;
  border-radius: 999px;
  background: #be006e;
  color: #fff !important;
  font-size: .86rem;
  font-weight: 700;
  text-align: center;
  text-decoration: none !important;
}
.trle-lesson-link-button:hover { background: #9d005b; color: #fff !important; }
@media (max-width: 700px) {
  .trle-app { width: min(100% - 20px, 980px); margin: 20px auto 44px; padding: 20px 18px 28px; }
  .trle-part-list, .trle-profile-grid, .trle-options, .trle-options-inline, .trle-score-grid { grid-template-columns: 1fr; }
  .trle-actions { flex-direction: column-reverse; }
  .trle-actions .trle-button { width: 100%; }
  .trle-reading { padding: 20px; }
  .trle-history-entry summary, .trle-lesson-link { flex-direction: column; align-items: flex-start; }
  .trle-review-row, .trle-review-detail { flex-direction: column; align-items: flex-start; gap: 2px; }
}
