.text-shell { width: 100%; max-width: none; }
.text-layout { grid-template-columns: minmax(0, 1fr) 300px; align-items: start; }
.editor-column { min-width: 0; }
.stats-column { position: sticky; top: 92px; }
.textarea-wrap { display: flex; min-height: 390px; overflow: hidden; border: 1px solid var(--border-strong); border-radius: 15px; background: #fff; }
.gutter { min-width: 48px; margin: 0; padding: 13px 9px; overflow: hidden; color: #94a3b8; background: var(--surface-soft); border-right: 1px solid var(--border); font: 13px/1.55 var(--mono); text-align: right; user-select: none; }
.gutter span { display: block; }
.textarea.editor { min-height: 390px; padding: 13px; border: 0; border-radius: 0; resize: vertical; font: 14px/1.55 var(--mono); box-shadow: none; }
.action-bar { padding-bottom: 2px; }
.text-tabs { display: flex; flex-wrap: wrap; gap: 7px; padding: 0; margin: 0; list-style: none; }
.text-tabs a { min-height: 36px; padding: 0 12px; display: inline-flex; align-items: center; border: 1px solid var(--border-strong); border-radius: 999px; color: var(--muted); background: #fff; font-size: 12px; font-weight: 780; text-decoration: none; }
.text-tabs li.active a { color: #fff; border-color: transparent; background: linear-gradient(135deg, var(--accent), var(--accent-2)); }
.text-tab-content { padding: 14px; border: 1px solid var(--border); border-radius: 15px; background: var(--surface-soft); }
.tab-pane { display: none; }
.tab-pane.active { display: grid; gap: 13px; }
.button-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.button-grid .btn { width: 100%; }
.slug-row, .find-actions { margin-top: 4px; }
.select.compact { width: 76px; }
.text-metrics { grid-template-columns: 1fr 1fr; }
.cp-backdrop { position: fixed; inset: 0; z-index: 100; display: none; align-items: flex-start; justify-content: center; padding: 10vh 16px 16px; background: rgba(15,23,42,.48); backdrop-filter: blur(4px); }
.cp-panel { width: min(640px, 100%); overflow: hidden; border: 1px solid var(--border); border-radius: 18px; background: #fff; box-shadow: 0 30px 80px rgba(15,23,42,.25); }
.cp-header { padding: 12px; border-bottom: 1px solid var(--border); }
.cp-body { max-height: 50vh; overflow: auto; }
.cp-item { padding: 11px 13px; border-bottom: 1px solid var(--border); cursor: pointer; font-size: 13px; }
.cp-item:last-child { border-bottom: 0; }
.cp-item:hover, .cp-item.active { background: var(--accent-soft); }
.text-muted { color: var(--muted); }
@media (max-width: 900px) { .text-layout { grid-template-columns: 1fr; } .stats-column { position: static; } }

.text-tabs .fa-icon { width: 13px; height: 13px; margin-right: 6px; }
.action-bar .btn, .button-grid .btn { justify-content: flex-start; }
