/* study-tool.css: shared styles for every Study Tool page (/study-tools/*.html).
   Matches the Study Tools hub. Colours come from the theme variables so colour modes work.
   The four "part" colours mark the parts of a built answer (e.g. P, E, E, L). */

:root {
  --tl-line: color-mix(in srgb, var(--default-color), transparent 86%);
  --tl-muted: color-mix(in srgb, var(--default-color), transparent 35%);
  --tl-tint: color-mix(in srgb, var(--accent-color), transparent 91%);
  --tl-part-1: var(--accent-color);
  --tl-part-2: #1f8a70;
  --tl-part-3: #c27a12;
  --tl-part-4: #3b6fd6;
}

.tl-root { color: var(--default-color); }
.tl-root h1, .tl-root h2, .tl-root h3 { font-family: var(--heading-font); color: var(--heading-color); }
.tl-root a { color: var(--accent-color); }
.tl-root a.tl-btn, .tl-root a.tl-btn:hover { color: #fff; }
.tl-root a.tl-btn.is-quiet, .tl-root a.tl-btn.is-quiet:hover { color: var(--accent-color); }

/* ── Intro ── */
.tl-hero { padding: 140px 0 30px; }
.tl-crumbs { font-size: 0.88rem; margin-bottom: 1.4rem; color: var(--tl-muted); }
.tl-crumbs a { text-decoration: none; }
.tl-crumbs a:hover { text-decoration: underline; }
.tl-crumbs span { margin: 0 0.4rem; }
.tl-title { display: flex; align-items: center; gap: 1rem; margin-bottom: 0.9rem; }
.tl-title-ico { flex: none; width: 56px; height: 56px; border-radius: 14px; display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem; color: var(--accent-color); background: var(--tl-tint); }
.tl-hero h1 { font-weight: 800; font-size: clamp(2rem, 4.5vw, 3rem); letter-spacing: -0.035em; line-height: 1.08; margin: 0; }
.tl-summary { max-width: 640px; font-size: 1.1rem; line-height: 1.65; margin-bottom: 1.1rem; }
.tl-meta { display: flex; flex-wrap: wrap; gap: 0.4rem 1.5rem; list-style: none; padding: 0; margin: 0; font-size: 0.9rem; color: var(--tl-muted); }
.tl-meta i { color: var(--accent-color); margin-right: 0.35rem; }

/* ── Builder: steps on the left, the current step on the right ── */
.tl-builder { padding: 20px 0 70px; }
.tl-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 2rem; align-items: start; }

.tl-steps { position: sticky; top: 110px; list-style: none; padding: 0; margin: 0; }
.tl-steps li { position: relative; }
.tl-steps li:not(:last-child)::after { content: ''; position: absolute; left: 21px; top: 42px; bottom: -6px; width: 2px; background: var(--tl-line); }
.tl-steps button { display: flex; align-items: center; gap: 0.8rem; width: 100%; padding: 0.45rem 0.5rem 0.45rem 0.25rem; margin-bottom: 0.5rem;
  background: none; border: 0; border-radius: 12px; text-align: left; cursor: pointer; color: var(--default-color); font-size: 0.95rem; }
.tl-steps button:hover { background: var(--tl-tint); }
.tl-step-dot { position: relative; z-index: 1; flex: none; width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-family: var(--heading-font); font-weight: 800; font-size: 0.95rem; background: var(--surface-color); border: 2px solid var(--tl-line); color: var(--tl-muted); margin-left: 3px; }
.tl-steps .is-done .tl-step-dot { border-color: var(--accent-color); color: var(--accent-color); }
.tl-steps button[aria-current="step"] { font-weight: 600; color: var(--heading-color); }
.tl-steps button[aria-current="step"] .tl-step-dot { background: var(--accent-color); border-color: var(--accent-color); color: #fff; }

.tl-panel { background: var(--surface-color); border: 1px solid var(--tl-line); border-radius: 20px; padding: 2.2rem 2.4rem; min-width: 0; }
.tl-panel:focus { outline: none; }
.tl-kicker { font-size: 0.85rem; font-weight: 600; color: var(--accent-color); margin-bottom: 0.35rem; }
.tl-panel h2 { font-weight: 800; font-size: 1.6rem; letter-spacing: -0.02em; margin-bottom: 0.7rem; }
.tl-panel h2:focus { outline: none; }
.tl-help { font-size: 1rem; line-height: 1.65; margin-bottom: 1.2rem; max-width: 640px; }
.tl-reminder { font-size: 0.9rem; padding: 0.7rem 1rem; border-radius: 10px; background: var(--tl-tint); margin-bottom: 1.2rem; }
.tl-reminder strong { color: var(--heading-color); }

.tl-ask { margin-bottom: 1.2rem; }
.tl-ask h3, .tl-starters h3 { font-family: var(--default-font); font-size: 0.85rem; font-weight: 600; color: var(--tl-muted); margin-bottom: 0.4rem; }
.tl-ask ul { margin: 0; padding-left: 1.2rem; }
.tl-ask li { margin-bottom: 0.2rem; }

.tl-field label { display: block; font-weight: 600; margin-bottom: 0.4rem; color: var(--heading-color); }
.tl-field textarea, .tl-field input {
  width: 100%; padding: 0.9rem 1rem; border-radius: 12px; font: inherit; font-size: 1.02rem; line-height: 1.6; resize: vertical;
  border: 1px solid color-mix(in srgb, var(--default-color), transparent 78%); background: var(--surface-color); color: var(--default-color); }
.tl-field textarea:focus, .tl-field input:focus { outline: none; border-color: var(--accent-color); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-color), transparent 85%); }
.tl-count { display: flex; justify-content: space-between; gap: 1rem; margin-top: 0.4rem; font-size: 0.85rem; color: var(--tl-muted); min-height: 1.3em; }
.tl-count .tl-nudge { color: var(--accent-color); text-align: right; }

.tl-starters { margin-top: 1.1rem; }
.tl-chips { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.tl-chips button { padding: 0.4rem 0.85rem; border-radius: 100px; font-size: 0.88rem; cursor: pointer;
  border: 1px solid color-mix(in srgb, var(--default-color), transparent 80%); background: var(--surface-color); color: var(--default-color); transition: border-color .15s, color .15s; }
.tl-chips button:hover { border-color: var(--accent-color); color: var(--accent-color); }

.tl-notes { display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem; margin-top: 1.4rem; }
.tl-note { padding: 0.9rem 1rem; border-radius: 12px; border: 1px solid var(--tl-line); font-size: 0.92rem; line-height: 1.55; }
.tl-note strong { display: flex; align-items: center; gap: 0.4rem; margin-bottom: 0.25rem; color: var(--heading-color); }
.tl-note i { color: var(--accent-color); }

.tl-peek { margin-top: 1rem; border-top: 1px solid var(--tl-line); padding-top: 0.9rem; }
.tl-peek summary { cursor: pointer; font-weight: 600; font-size: 0.92rem; color: var(--accent-color); }
.tl-peek p { margin: 0.6rem 0 0; font-size: 0.95rem; line-height: 1.6; font-style: italic; }
.tl-peek .tl-outline p { margin: 0 0 0.3rem; font-style: normal; }

.tl-nav { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-top: 1.8rem; padding-top: 1.4rem; border-top: 1px solid var(--tl-line); }
.tl-btn { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.75rem 1.4rem; border-radius: 100px; font-weight: 600; font-size: 0.95rem; cursor: pointer;
  border: 1px solid var(--accent-color); background: var(--accent-color); color: #fff; text-decoration: none; transition: filter .2s, background .2s; }
.tl-btn:hover { filter: brightness(0.92); color: #fff; }
.tl-btn.is-quiet { background: transparent; color: var(--accent-color); }
.tl-btn.is-quiet:hover { filter: none; background: var(--tl-tint); color: var(--accent-color); }
.tl-btn.is-plain { border-color: transparent; background: transparent; color: var(--tl-muted); padding-left: 0.4rem; padding-right: 0.4rem; }
.tl-btn.is-plain:hover { filter: none; color: var(--accent-color); }

/* Steps with several boxes, and lists you can add to (e.g. slides) */
.tl-subfield { margin-bottom: 1.1rem; }
.tl-subfield:last-child { margin-bottom: 0; }
.tl-field-help { font-size: 0.88rem; color: var(--tl-muted); margin: -0.2rem 0 0.45rem; line-height: 1.5; }
.tl-field input.is-short { max-width: 160px; }
.tl-items { display: flex; flex-direction: column; gap: 0.9rem; }
.tl-item { padding: 1.1rem 1.2rem 1.2rem; border-radius: 14px; border: 1px solid var(--tl-line); background: color-mix(in srgb, var(--accent-color), transparent 97%); }
.tl-item-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.7rem; }
.tl-item-head strong { font-family: var(--heading-font); font-weight: 800; color: var(--heading-color); }
.tl-item-remove { border: 0; background: none; padding: 0; font-size: 0.85rem; color: var(--tl-muted); text-decoration: underline; cursor: pointer; }
.tl-item-remove:hover { color: #c0392b; }
.tl-item .tl-subfield { margin-bottom: 0.8rem; }
.tl-item .tl-subfield label { font-size: 0.9rem; }
.tl-add { align-self: flex-start; }

/* Card layout for lists (e.g. slides): a grid of 16:9 cards, the chosen one edited beside it */
.tl-deck-wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(250px, 300px); gap: 1.25rem; align-items: start; }
.tl-deck-wrap.is-narrow { grid-template-columns: 1fr; }
.tl-deck { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0.8rem; }
.tl-slide { position: relative; display: flex; flex-direction: column; gap: 0.25rem; width: 100%; aspect-ratio: 16 / 9; padding: 0.55rem 0.7rem 0.6rem;
  border: 1px solid color-mix(in srgb, var(--default-color), transparent 80%); border-radius: 10px; background: var(--surface-color);
  box-shadow: 0 2px 8px rgba(0,0,0,0.05); text-align: left; overflow: hidden; cursor: pointer; color: var(--default-color);
  transition: border-color .15s, box-shadow .15s, transform .15s; }
.tl-slide:hover { border-color: var(--accent-color); transform: translateY(-1px); }
.tl-slide.is-selected { border-color: var(--accent-color); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-color), transparent 80%); }
.tl-slide-num { font-family: var(--heading-font); font-size: 0.7rem; font-weight: 800; color: var(--accent-color); }
.tl-slide-title { font-family: var(--heading-font); font-weight: 800; font-size: 0.85rem; line-height: 1.25; color: var(--heading-color);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tl-slide-body { font-size: 0.72rem; line-height: 1.35; color: var(--tl-muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tl-slide-empty { margin: auto; font-size: 0.78rem; color: var(--tl-muted); }
.tl-slide-note { position: absolute; right: 0.55rem; bottom: 0.45rem; font-size: 0.75rem; color: var(--tl-muted); }
.tl-slide.is-add { align-items: center; justify-content: center; gap: 0.35rem; border-style: dashed; box-shadow: none; background: transparent;
  color: var(--accent-color); font-weight: 600; font-size: 0.85rem; text-align: center; }
.tl-slide.is-add i { font-size: 1.2rem; }
.tl-deck-editor { position: sticky; top: 110px; padding: 1rem 1.1rem 1.1rem; border-radius: 14px; border: 1px solid var(--tl-line);
  background: color-mix(in srgb, var(--accent-color), transparent 97%); }
.tl-deck-head { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; margin-bottom: 0.8rem; }
.tl-deck-head strong { font-family: var(--heading-font); font-weight: 800; font-size: 1.05rem; color: var(--heading-color); }
.tl-deck-tools { display: flex; gap: 0.25rem; }
.tl-icon-btn { width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; padding: 0; border-radius: 8px; cursor: pointer;
  border: 1px solid var(--tl-line); background: var(--surface-color); color: var(--default-color); }
.tl-icon-btn:hover:not(:disabled) { border-color: var(--accent-color); color: var(--accent-color); }
.tl-icon-btn.is-danger:hover:not(:disabled) { border-color: #c0392b; color: #c0392b; }
.tl-icon-btn:disabled { opacity: 0.35; cursor: default; }
.tl-icon-btn:focus-visible { outline: 2px solid var(--accent-color); outline-offset: 2px; }
.tl-deck-editor .tl-subfield, .tl-slide-dialog .tl-subfield { margin-bottom: 0.8rem; }
.tl-deck-editor .tl-subfield label, .tl-slide-dialog .tl-subfield label { font-size: 0.9rem; }
.tl-slide-dialog .tl-field label { display: block; font-weight: 600; margin-bottom: 0.4rem; color: var(--heading-color); }
.tl-slide-dialog .tl-field textarea, .tl-slide-dialog .tl-field input { width: 100%; padding: 0.75rem 0.9rem; border-radius: 10px; font: inherit; font-size: 1rem; line-height: 1.5;
  border: 1px solid color-mix(in srgb, var(--default-color), transparent 78%); background: var(--surface-color); color: var(--default-color); }
.tl-slide-dialog .tl-field textarea:focus, .tl-slide-dialog .tl-field input:focus { outline: none; border-color: var(--accent-color); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-color), transparent 85%); }
@media (max-width: 991px) and (min-width: 768px) { .tl-deck { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); } }
@media (max-width: 767px) { .tl-deck { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.6rem; } }
@media (prefers-reduced-motion: reduce) { .tl-slide { transition: none; } }

/* Outline results (plans) */
.tl-outline { line-height: 1.6; }
.tl-outline h3 { font-family: var(--heading-font); font-size: 1.25rem; font-weight: 800; letter-spacing: -0.01em; color: var(--heading-color); margin: 1.5rem 0 0.5rem; padding-bottom: 0.35rem; border-bottom: 1px solid var(--tl-line); }
.tl-outline h3:first-child { margin-top: 0; }
.tl-outline p { margin: 0 0 0.35rem; }
.tl-outline p strong { color: var(--heading-color); font-weight: 600; }
.tl-outline.is-small h3 { font-size: 1rem; border: 0; padding: 0; }
.tl-outline .tl-target { font-family: var(--default-font); font-weight: 400; font-size: 0.85rem; color: var(--accent-color); }
.tl-outline.is-small { font-size: 0.93rem; margin-top: 0.6rem; font-style: normal; }
.tl-outline.is-small p { font-style: normal; margin: 0 0 0.3rem; }
.tl-pace { display: flex; gap: 0.5rem; align-items: flex-start; padding: 0.75rem 1rem; border-radius: 10px; background: var(--tl-tint); font-size: 0.93rem; margin-bottom: 1rem; }
.tl-pace i { color: var(--accent-color); margin-top: 0.1rem; }

/* Start screen */
.tl-howlist { display: flex; flex-wrap: wrap; gap: 0.6rem; list-style: none; padding: 0; margin: 0 0 1.5rem; }
.tl-howlist li { display: flex; align-items: center; gap: 0.5rem; padding: 0.45rem 0.9rem 0.45rem 0.45rem; border-radius: 100px; border: 1px solid var(--tl-line); font-size: 0.92rem; }
.tl-howlist b { width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.8rem; color: #fff; }

/* Result */
.tl-legend { display: flex; flex-wrap: wrap; gap: 0.4rem 1.1rem; font-size: 0.85rem; margin-bottom: 0.7rem; color: var(--tl-muted); }
.tl-legend span { display: inline-flex; align-items: center; gap: 0.4rem; }
.tl-legend i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.tl-result { padding: 1.3rem 1.4rem; border-radius: 14px; border: 1px solid var(--tl-line); font-size: 1.05rem; line-height: 1.85; }
.tl-result.is-plain .tl-part { background: none !important; box-shadow: none !important; }
.tl-part { border-radius: 4px; padding: 0.1em 0.15em; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.tl-part[data-n="1"] { background: color-mix(in srgb, var(--tl-part-1), transparent 86%); box-shadow: inset 0 -2px 0 var(--tl-part-1); }
.tl-part[data-n="2"] { background: color-mix(in srgb, var(--tl-part-2), transparent 86%); box-shadow: inset 0 -2px 0 var(--tl-part-2); }
.tl-part[data-n="3"] { background: color-mix(in srgb, var(--tl-part-3), transparent 86%); box-shadow: inset 0 -2px 0 var(--tl-part-3); }
.tl-part[data-n="4"] { background: color-mix(in srgb, var(--tl-part-4), transparent 86%); box-shadow: inset 0 -2px 0 var(--tl-part-4); }
.tl-swatch[data-n="1"] { background: var(--tl-part-1); } .tl-swatch[data-n="2"] { background: var(--tl-part-2); }
.tl-swatch[data-n="3"] { background: var(--tl-part-3); } .tl-swatch[data-n="4"] { background: var(--tl-part-4); }
.tl-howlist b[data-n="1"] { background: var(--tl-part-1); } .tl-howlist b[data-n="2"] { background: var(--tl-part-2); }
.tl-howlist b[data-n="3"] { background: var(--tl-part-3); } .tl-howlist b[data-n="4"] { background: var(--tl-part-4); }
.tl-result-foot { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem 1rem; margin-top: 0.6rem; font-size: 0.85rem; color: var(--tl-muted); }
.tl-toggle { border: 0; background: none; padding: 0; color: var(--accent-color); font-size: 0.85rem; cursor: pointer; }
.tl-missing { margin-top: 1rem; padding: 0.8rem 1rem; border-radius: 10px; background: var(--tl-tint); font-size: 0.92rem; }
.tl-missing button { border: 0; background: none; padding: 0; color: var(--accent-color); font-weight: 600; text-decoration: underline; cursor: pointer; }
.tl-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.3rem; }

.tl-check { margin-top: 1.8rem; }
.tl-check h3 { font-size: 1.1rem; font-weight: 800; margin-bottom: 0.7rem; }
.tl-check label { display: flex; align-items: flex-start; gap: 0.7rem; padding: 0.55rem 0; cursor: pointer; line-height: 1.5; border-bottom: 1px solid var(--tl-line); }
.tl-check input { flex: none; width: 18px; height: 18px; margin-top: 0.15rem; accent-color: var(--accent-color); }
.tl-check-done { margin-top: 0.7rem; font-weight: 600; color: var(--accent-color); }

.tl-save { margin-top: 1.8rem; padding: 1.2rem 1.3rem; border-radius: 14px; background: var(--tl-tint); display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem; }
.tl-save p { margin: 0; max-width: 460px; line-height: 1.55; }

/* ── Account: where the work is saved, and the "Save to my account" dialog ── */
.tl-account { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 0.75rem 1.25rem;
  padding: 0.85rem 1rem 0.85rem 1.2rem; margin-bottom: 1.4rem; border-radius: 14px; border: 1px solid var(--tl-line); background: var(--surface-color); }
.tl-account[hidden] { display: none; }
.tl-account p { margin: 0; line-height: 1.5; font-size: 0.95rem; }
.tl-account p > i { color: var(--accent-color); margin-right: 0.35rem; }
.tl-account .tl-btn { padding: 0.55rem 1.1rem; font-size: 0.9rem; }
.tl-status { display: inline-block; margin-left: 0.6rem; font-size: 0.82rem; color: var(--tl-muted); }
.tl-status.is-error { color: #c0392b; font-weight: 600; }
.tl-status button { border: 0; background: none; padding: 0; color: var(--accent-color); text-decoration: underline; cursor: pointer; font: inherit; }

.tl-dialog { border: 0; padding: 0; border-radius: 20px; width: min(480px, calc(100% - 2rem)); background: var(--surface-color); color: var(--default-color);
  box-shadow: 0 24px 70px rgba(0,0,0,0.25); }
.tl-dialog::backdrop { background: rgba(20, 16, 30, 0.45); }
.tl-dialog-box { padding: 1.8rem 1.8rem 1.4rem; }
.tl-dialog h2 { font-family: var(--heading-font); font-weight: 800; font-size: 1.4rem; letter-spacing: -0.02em; color: var(--heading-color); margin-bottom: 0.5rem; }
.tl-dialog-help { font-size: 0.93rem; line-height: 1.55; margin-bottom: 1rem; }
.tl-dialog-help a { color: var(--accent-color); }
.tl-dialog-body label { display: block; font-weight: 600; font-size: 0.9rem; margin: 0.9rem 0 0.35rem; color: var(--heading-color); }
.tl-dialog-body label span { font-weight: 400; color: var(--tl-muted); }
.tl-dialog-body select, .tl-dialog-body input { width: 100%; padding: 0.7rem 0.85rem; border-radius: 10px; font: inherit; font-size: 0.95rem;
  border: 1px solid color-mix(in srgb, var(--default-color), transparent 78%); background: var(--surface-color); color: var(--default-color); }
.tl-dialog-body select:focus, .tl-dialog-body input:focus { outline: none; border-color: var(--accent-color); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-color), transparent 85%); }
.tl-dialog-error { color: #c0392b; font-size: 0.9rem; min-height: 1.2em; margin: 0.8rem 0 0; }
.tl-dialog-actions { display: flex; justify-content: flex-end; gap: 0.5rem; margin-top: 0.8rem; }
.tl-dialog .tl-btn:disabled { opacity: 0.55; cursor: default; filter: none; }
.tl-dialog button:focus-visible { outline: 2px solid var(--accent-color); outline-offset: 2px; }

/* ── About and example ── */
.tl-about { padding: 70px 0; }
.tl-about-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 3rem; align-items: start; }
.tl-about h2 { font-weight: 800; font-size: clamp(1.5rem, 3vw, 2rem); letter-spacing: -0.03em; margin-bottom: 1rem; }
.tl-about p { line-height: 1.7; }
.tl-example { background: var(--surface-color); border: 1px solid var(--tl-line); border-radius: 18px; padding: 1.6rem 1.7rem; }
.tl-example h3 { font-size: 1.1rem; font-weight: 800; margin-bottom: 0.4rem; }
.tl-example-q { font-size: 0.92rem; color: var(--tl-muted); margin-bottom: 0.9rem; }
.tl-example .tl-result { border: 0; padding: 0; font-size: 1rem; }
.tl-example-note { font-size: 0.82rem; color: var(--tl-muted); margin: 0.9rem 0 0; }

/* ── Questions and related tools ── */
.tl-faq { padding: 70px 0 30px; }
.tl-faq .container { max-width: 780px; }
.tl-faq h2, .tl-related h2 { font-weight: 800; font-size: clamp(1.5rem, 3vw, 2rem); letter-spacing: -0.03em; margin-bottom: 1.5rem; }
.tl-faq details { border-bottom: 1px solid var(--tl-line); }
.tl-faq summary { list-style: none; cursor: pointer; padding: 1.1rem 2rem 1.1rem 0; position: relative; font-weight: 600; color: var(--heading-color); }
.tl-faq summary::-webkit-details-marker { display: none; }
.tl-faq summary::after { content: '+'; position: absolute; right: 0.25rem; top: 50%; transform: translateY(-50%); font-size: 1.3rem; font-weight: 400; color: var(--accent-color); }
.tl-faq details[open] summary::after { content: '−'; }
.tl-faq details p { padding: 0 0 1.1rem; margin: 0; line-height: 1.65; }

.tl-related { padding: 50px 0 80px; }
.tl-related-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1rem; }
.tl-related a { display: flex; align-items: center; gap: 0.9rem; padding: 1rem 1.1rem; border-radius: 16px; border: 1px solid var(--tl-line); background: var(--surface-color);
  text-decoration: none; color: var(--heading-color); font-weight: 600; transition: border-color .2s; }
.tl-related a:hover { border-color: var(--accent-color); }
.tl-related .tl-title-ico { width: 42px; height: 42px; font-size: 1.15rem; border-radius: 11px; }
.tl-related small { display: block; font-weight: 400; font-size: 0.8rem; color: var(--tl-muted); }

.tl-loading, .tl-error { padding: 170px 0 120px; text-align: center; color: var(--tl-muted); }

.tl-root button:focus-visible, .tl-root a:focus-visible, .tl-root summary:focus-visible { outline: 2px solid var(--accent-color); outline-offset: 2px; }
.tl-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ── Smaller screens: steps become a row of letters above the panel ── */
@media (max-width: 991px) {
  .tl-hero { padding-top: 115px; }
  .tl-layout { grid-template-columns: 1fr; gap: 1rem; }
  .tl-steps { position: static; display: flex; gap: 0.2rem; }
  .tl-steps li { flex: 1 1 0; min-width: 0; }
  .tl-steps li::after { display: none; }
  .tl-steps button { flex-direction: column; gap: 0.25rem; padding: 0.4rem 0.1rem; margin: 0; font-size: 0.72rem; line-height: 1.2; text-align: center; height: 100%; }
  .tl-step-dot { margin: 0; }
  .tl-about-grid { grid-template-columns: 1fr; gap: 2rem; }
}
@media (max-width: 575px) {
  .tl-step-dot { width: 32px; height: 32px; font-size: 0.85rem; }
  .tl-panel { padding: 1.5rem 1.2rem; border-radius: 16px; }
  .tl-notes { grid-template-columns: 1fr; }
  .tl-nav { flex-wrap: wrap-reverse; }
  .tl-nav .tl-btn:not(.is-plain) { flex: 1; justify-content: center; }
}

/* ── Printing: just the finished work ── */
.tl-print { display: none; }
@media print {
  body.tl-printing > *:not(.tl-print) { display: none !important; }
  body.tl-printing .tl-print { display: block; font-family: Georgia, serif; color: #000; }
  .tl-print h1 { font-size: 18pt; margin-bottom: 4pt; }
  .tl-print .tl-print-q { font-style: italic; margin-bottom: 14pt; }
  .tl-print p { font-size: 12pt; line-height: 1.7; }
}