/* Thinking Process templates (tp-tools.js) */
.tp-tool { margin: 24px 0; font-size: 15px; }
.tp-wrap { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; }
.tp-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 10px; }
.tp-title { font: 600 19px var(--serif); margin: 0; }
.tp-saved { font-size: 12px; color: var(--ink-2); }
.tp-hint { font-size: 14px; color: var(--ink-2); margin: 6px 0 10px; }
.tp-h { font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); margin: 22px 0 6px; }
.tp-f { display: flex; flex-direction: column; gap: 4px; margin: 0 0 12px; font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
.tp-tool input:not([type="checkbox"]), .tp-tool textarea, .tp-tool select { font: 15px/1.4 var(--sans); color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; width: 100%; box-sizing: border-box; }
.tp-tool textarea { resize: vertical; }
.tp-tool input:focus, .tp-tool textarea:focus, .tp-tool select:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.tp-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.tp-list { list-style: none; padding: 0; margin: 0 0 8px; display: grid; gap: 6px; counter-reset: tp; }
.tp-list li { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; align-items: center; }
.tp-ents li { grid-template-columns: 28px 1fr auto auto; }
.tp-num { font-weight: 700; color: var(--accent); text-align: right; }
.tp-tag { font-size: 11px; font-weight: 600; color: var(--ink-2); white-space: nowrap; min-width: 0; }
.tp-x { border: 0; background: none; font-size: 20px; line-height: 1; color: var(--ink-2); cursor: pointer; padding: 4px 6px; border-radius: 6px; }
.tp-x:hover { background: var(--paper); color: #c23b2b; }
.tp-ck { font-size: 13px; display: flex; gap: 4px; align-items: center; white-space: nowrap; }
.tp-cloud { position: relative; display: grid; grid-template-columns: 1fr 1fr 1fr; grid-template-rows: auto auto; gap: 18px 40px; margin: 10px 0 6px; padding: 8px 0; }
.tp-box { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; font-weight: 700; color: var(--ink); z-index: 1; }
.tp-box em { font-style: normal; font-weight: 600; color: var(--accent); margin-left: 4px; }
.tp-box textarea { background: #fff; }
.tp-A { grid-column: 1; grid-row: 1 / span 2; align-self: center; }
.tp-B { grid-column: 2; grid-row: 1; } .tp-C { grid-column: 2; grid-row: 2; }
.tp-D { grid-column: 3; grid-row: 1; } .tp-Dp { grid-column: 3; grid-row: 2; }
.tp-D textarea, .tp-Dp textarea { border-color: #e8b4ab; background: #fff8f6; }
.tp-ar { position: absolute; height: 2px; background: #9aa3ab; }
.tp-ar1, .tp-ar2 { left: calc(33.3% - 26px); width: 26px; } .tp-ar1 { top: 30%; } .tp-ar2 { top: 75%; }
.tp-ar3, .tp-ar4 { left: calc(66.6% - 26px); width: 26px; } .tp-ar3 { top: 30%; } .tp-ar4 { top: 75%; }
.tp-zap { position: absolute; right: 50%; right: calc(16.6% - 10px); top: 50%; transform: translateY(-50%); font-style: normal; font-size: 20px; color: #c23b2b; z-index: 2; }
.tp-as { border-left: 3px solid var(--line); padding: 4px 0 6px 12px; margin: 10px 0; }
.tp-as p { margin: 0 0 6px; font-size: 14px; }
.tp-asrow { display: grid; grid-template-columns: 1fr auto; gap: 6px; margin-bottom: 6px; }
.tp-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }
.tp-clear { margin-left: auto; }
.tp-btnrow { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 8px 0; }
.tp-scroll { overflow-x: auto; }
.tp-grid { border-collapse: collapse; width: 100%; min-width: 760px; }
.tp-grid th, .tp-grid td { padding: 4px; vertical-align: top; text-align: left; font-size: 13px; }
.tp-grid thead th { color: var(--ink-2); }
.tp-grid tbody th { font-weight: 700; color: var(--accent); width: 40px; }
.tp-links { display: grid; gap: 8px; margin-bottom: 8px; }
.tp-link { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-weight: 600; font-size: 14px; }
.tp-link select { width: auto; flex: 1 1 200px; }
.tp-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.tp-chip { border: 1px solid var(--line); border-radius: 7px; padding: 3px 9px; cursor: pointer; font-size: 13px; background: #fff; }
.tp-chip input { position: absolute; opacity: 0; pointer-events: none; }
.tp-chip.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.tp-chip:focus-within { outline: 2px solid var(--accent); }
.tp-tree { display: block; margin: 6px auto; font-family: var(--sans); }
.tp-node rect { fill: #fff; stroke: #9aa3ab; stroke-width: 1.5; }
.tp-node.ude rect { fill: #fdf0ea; stroke: var(--accent); }
.tp-node.root rect { stroke: var(--ink); stroke-width: 2.5; }
.tp-node text { font-size: 11.5px; fill: var(--ink); }
.tp-node .tp-nid { font-weight: 700; fill: var(--accent); font-size: 11px; }
.tp-arr { stroke: #4a525a; stroke-width: 1.6; fill: none; }
.tp-ell { fill: none; stroke: #4a525a; stroke-width: 1.6; }
.tp-fb { margin-top: 16px; }
.tp-fbsum { font-size: 14px; color: var(--ink-2); }
.tp-fb ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.tp-fb li { display: grid; grid-template-columns: 52px 1fr; gap: 10px; padding: 9px 12px; border-radius: 9px; background: var(--paper); font-size: 14.5px; line-height: 1.45; }
.tp-fb small { display: block; margin-top: 3px; color: var(--ink-2); font-size: 12px; }
.tp-lvl { font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; padding-top: 2px; }
.tp-err { border-left: 3px solid #c23b2b; } .tp-err .tp-lvl { color: #c23b2b; }
.tp-warn { border-left: 3px solid #d39b12; } .tp-warn .tp-lvl { color: #a47400; }
.tp-tip { border-left: 3px solid #7d8a96; } .tp-tip .tp-lvl { color: #4a525a; }
.tp-ok { border-left: 3px solid #3f8f55; } .tp-ok .tp-lvl { color: #2f7a45; }
.tpl-index { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; margin: 18px 0 8px; }
.tpl-index a { display: block; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); text-decoration: none; color: var(--ink); }
.tpl-index a:hover { border-color: var(--accent); }
.tpl-index b { display: block; }
.tpl-index span { font-size: 13.5px; color: var(--ink-2); }
@media (max-width: 680px) {
  .tp-wrap { padding: 16px; }
  .tp-row2 { grid-template-columns: 1fr; }
  .tp-cloud { grid-template-columns: 1fr; gap: 10px; }
  .tp-A, .tp-B, .tp-C, .tp-D, .tp-Dp { grid-column: 1; grid-row: auto; }
  .tp-ar, .tp-zap { display: none; }
}
@media print { .tp-actions, .tp-x, .cc-btn { display: none !important; } }
