/* Twaino URL Encoder/Decoder — Epure, above-the-fold */

.tw-ue-app{max-width:1200px;margin:0 auto;padding-top:20px;font-family:inherit;color:#1a1a2e}
.tw-ue-app *,.tw-ue-app *::before,.tw-ue-app *::after{box-sizing:border-box}

/* Header */
.tw-ue-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px;gap:10px;flex-wrap:wrap}
.tw-ue-header-left{display:flex;align-items:center;gap:14px}
.tw-ue-label{font-size:15px;font-weight:700;color:#1a1a2e}

/* Action buttons */
.tw-ue-header-actions{display:flex;gap:6px}
.tw-ue-btn-action{display:inline-flex;align-items:center;gap:5px;padding:6px 12px;font-size:12px;font-weight:500;color:#6b7280;background:#fff;border:1px solid #e5e7eb;border-radius:6px;cursor:pointer;transition:all .15s;font-family:inherit;line-height:1}
.tw-ue-btn-action:hover{background:#f3f4f6;color:#1a1a2e;border-color:#d1d5db}
.tw-ue-btn-action svg{flex-shrink:0}

/* Status bar */
.tw-ue-status{min-height:20px;margin-bottom:6px}
.tw-ue-status-msg{padding:6px 12px;border-radius:6px;font-size:12px;font-weight:500;display:inline-flex;align-items:center;gap:6px}
.tw-ue-status-ok{background:#f0fdf4;color:#16a34a;border:1px solid #bbf7d0}
.tw-ue-status-err{background:#fef2f2;color:#dc2626;border:1px solid #fecaca}

/* BLOCK 1: Input + Output — unified card, 50/50 */
.tw-ue-block1{display:grid;grid-template-columns:1fr 1fr;background:#fff;border:1px solid #e5e7eb;border-radius:10px;overflow:hidden;margin-bottom:10px}
.tw-ue-input-side{border-right:1px solid #e5e7eb;display:flex;flex-direction:column;min-width:0}
.tw-ue-output-side{display:flex;flex-direction:column;background:#fafbfc;min-width:0}
.tw-ue-pane-label{font-size:10px;font-weight:700;text-transform:uppercase;letter-spacing:.06em;color:#6b7280;padding:8px 14px 0;user-select:none}

/* Textarea input */
.tw-ue-textarea{width:100%;flex:1;min-height:340px;border:none;outline:none;padding:8px 14px 14px;font-size:13px;line-height:1.55;resize:vertical;font-family:'SF Mono','Fira Code','Consolas',monospace;color:#1a1a2e;background:transparent;display:block;tab-size:4;word-wrap:break-word;overflow-wrap:break-word;white-space:pre-wrap}
.tw-ue-textarea::placeholder{color:#b0b5c0;font-family:'SF Mono','Fira Code','Consolas',monospace}

/* Output pre */
.tw-ue-output{width:100%;flex:1;min-height:340px;margin:0;border:none;outline:none;padding:8px 14px 14px;font-size:13px;line-height:1.55;font-family:'SF Mono','Fira Code','Consolas',monospace;color:#1a1a2e;background:transparent;overflow:auto;white-space:pre-wrap;word-wrap:break-word;overflow-wrap:break-word;tab-size:4;user-select:text}
.tw-ue-empty{color:#b0b5c0}

/* Stats bar */
.tw-ue-stats{display:flex;gap:16px;padding:8px 0;flex-wrap:wrap}
.tw-ue-stat{font-size:12px;color:#6b7280}
.tw-ue-stat strong{color:#1a1a2e;font-weight:700}

/* ARTICLE TOGGLE */
.tw-ue-article-toggle{margin-top:4px;margin-bottom:12px}
.tw-ue-toggle-btn{display:flex;align-items:center;gap:8px;width:100%;padding:12px 16px;background:#fff;border:1.5px solid #56aea4;border-radius:10px;cursor:pointer;font-size:14px;font-weight:600;color:#56aea4;font-family:inherit;transition:all .15s;text-align:left}
.tw-ue-toggle-btn:hover{background:#f0fdf8;border-color:#4a9e94;color:#4a9e94}
.tw-ue-toggle-chevron{transition:transform .25s ease;flex-shrink:0;color:#56aea4}
.tw-ue-toggle-btn:hover .tw-ue-toggle-chevron{color:#4a9e94}
.tw-ue-toggle-btn.tw-ue-toggle-open .tw-ue-toggle-chevron{transform:rotate(180deg)}
.tw-ue-h1{font-size:14px;font-weight:600;margin:0;padding:0;color:inherit;font-family:inherit;line-height:1.4}

/* Responsive */
@media(max-width:880px){
  .tw-ue-block1{grid-template-columns:1fr}
  .tw-ue-input-side{border-right:none;border-bottom:1px solid #e5e7eb}
  .tw-ue-textarea,.tw-ue-output{min-height:240px}
}
@media(max-width:500px){
  .tw-ue-header{flex-direction:column;align-items:stretch}
  .tw-ue-header-actions{flex-wrap:wrap;justify-content:flex-end}
  .tw-ue-stats{flex-direction:column;gap:4px}
}
