/* T.I.P. and curriculum pages (loaded only on those pages) */
.tp-sum { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px 16px; margin: 14px 0; }
.tp-sum dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px 18px; margin: 0; }
.tp-sum dt { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.tp-sum dd { margin: 2px 0 0; font-weight: 600; overflow-wrap: anywhere; }
.tp-note { border-left: 4px solid var(--brand); padding: 4px 0 4px 12px; max-width: 78ch; }
.tp-src, .tp-fn { font-size: .88rem; color: var(--muted); }
.tp-fn { display: block; }
.tp-bar { position: sticky; top: 0; z-index: 5; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 8px 12px; margin: 14px 0; box-shadow: 0 4px 14px rgba(0,0,0,.06); }
.tp-bar .privacy { margin: 0 0 6px; }
.tp-bar .row-btns { display: flex; flex-wrap: wrap; gap: 6px; }
.tp-stage { margin-top: 10px; }
.tp-stage > h2 small, .tp-stage > h3 small, .tp-unit h4 small { font-weight: 400; color: var(--muted); font-size: .8em; }
.tp-unit { border-top: 1px solid var(--line); padding-top: 6px; margin-top: 14px; }
.tp-unit h4 { margin: 8px 0; font-size: 1.05rem; }
.tp-stem { font-style: italic; margin: 4px 0; }
.tp-list, .tp-list ul { list-style: none; padding-left: 0; margin: 6px 0; }
.tp-list ul { padding-left: 22px; }
.tp-list li { position: relative; padding: 5px 4px 5px 30px; border-radius: 8px; overflow-wrap: anywhere; }
.tp-list li.cl { padding-left: 4px; margin-top: 6px; }
.tp-list li.on { background: var(--brand-soft); }
.tp-list li.ph, .tp-list li.nt { color: var(--muted); padding-left: 4px; }
.tp-list li.nt { color: inherit; }
.tp-cb { position: absolute; left: 6px; top: 8px; width: 18px; height: 18px; margin: 0; accent-color: var(--brand); }
.tp-plan { margin-left: 6px; font: inherit; font-size: .8rem; padding: 1px 8px; border-radius: 999px; border: 1px solid var(--line-2); background: transparent; color: var(--brand); cursor: pointer; }
.tp-plan:hover, .tp-plan:focus-visible { background: var(--brand-soft); }
.tp-code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .85em; white-space: nowrap; }
.tp-mk { margin-left: 4px; color: var(--brand); text-decoration: none; font-weight: 600; }
.tp-ft { margin: 4px 0 0; font-style: italic; }
.tp-guid { margin: 8px 0 4px; padding: 6px 10px; border: 1px dashed var(--line-2); border-radius: 10px; }
.tp-lab { margin: 0 0 4px; font-size: .9rem; color: var(--muted); }
.pill.tp-stat { background: var(--brand-soft); color: var(--brand); }
.pill.tp-ns { background: var(--surface-2); color: var(--muted); }
.tp-intro { margin: 6px 0 10px; }
.tp-intro summary, .tp-states summary { cursor: pointer; font-weight: 600; }
.tp-states { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 10px 14px; margin: 12px 0; }
.tp-ass { border: 1px solid var(--line); border-radius: 14px; padding: 4px 14px 8px; margin: 10px 0; background: var(--surface); }
.tp-ass h3 { margin: 10px 0 6px; font-size: 1.05rem; }
.tp-links li { margin: 4px 0; overflow-wrap: anywhere; }
.tp-toc { margin: 10px 0; line-height: 1.9; }
.tp-browse { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 4px 18px; }
.tp-browse h3 { margin: 10px 0 4px; font-size: 1rem; }
.tp-browse p { margin: 0; line-height: 2; }
.tp-browse a { margin-right: 6px; white-space: nowrap; }
.tp-search { padding: 16px; }
.tp-search label { display: block; font-size: 1.15rem; margin-bottom: 6px; }
.tp-qrow { display: flex; gap: 8px; flex-wrap: wrap; }
.tp-qrow input { flex: 1 1 240px; min-width: 0; font-size: 1.2rem; padding: 12px 14px; border-radius: 12px; border: 2px solid var(--brand); background: var(--bg); color: var(--ink); }
.tp-results { list-style: none; padding: 0; margin: 8px 0 0; }
.tp-results a { display: block; padding: 8px 12px; border-radius: 10px; text-decoration: none; border: 1px solid transparent; }
.tp-results a:hover, .tp-results a:focus-visible, .tp-results a.best { border-color: var(--line); background: var(--surface-2); }
.tp-results span { display: block; font-size: .85rem; color: var(--muted); }
.tp-msg { margin: 8px 0 0; color: var(--muted); min-height: 1.2em; }
.tp-statetab td { vertical-align: top; }
.tp-papers td, .tp-papers th { font-size: .92rem; }
@media print {
  .tp-bar, .tp-plan, .tp-states, .tp-search, .tp-toc { display: none !important; }
  .tp-list li { padding-left: 4px; break-inside: avoid; }
  .tp-cb { position: static; margin-right: 6px; }
  .tp-intro { display: none; }
  .tp-unit h4 { break-after: avoid; }
}
@media (max-width: 640px) { .tp-bar { position: static; box-shadow: none; } }
