/* ===== Giao diện dùng chung cho mọi trang công cụ văn bản =====
   Bố cục bám thói quen người dùng wordcounter.net: số đếm to ở đầu,
   thanh nút trên ô soạn, bảng Details cột phải. */
body{margin:0;background:#fff;color:#2a2140;font:16px/1.7 system-ui,Segoe UI,Roboto,sans-serif}
.wrap{max-width:940px;margin:0 auto;padding:22px 18px 70px}
a{color:#c81d77;text-decoration:none} a:hover{text-decoration:underline}
h1{font-size:27px;line-height:1.25;margin:12px 0 4px;color:#231b3a;letter-spacing:-.2px}
h2{font-size:20px;margin:34px 0 10px;color:#b5179e}
h3{font-size:16.5px;margin:20px 0 6px;color:#231b3a}
p,li,td{color:#3a3350}
.meta{color:#8b83a3;font-size:13px;margin:0 0 12px}
.logo{display:inline-flex;align-items:center;gap:9px;font-weight:800;font-size:17px;color:#231b3a}

/* thanh điều hướng giữa các công cụ */
.ccNav{display:flex;flex-wrap:wrap;gap:7px;align-items:center;margin:0 0 16px;
  padding:11px 13px;background:#faf7fd;border:1px solid #ebe3f6;border-radius:13px;font-size:13.5px}
.ccNav b{color:#231b3a;margin-right:3px}
.ccNav a{background:#fff;border:1px solid #e5dcf3;border-radius:20px;padding:5px 12px;
  color:#8b2fb8;font-weight:600;white-space:nowrap}
.ccNav a:hover{background:#f1e8fd;text-decoration:none}
.ccNav a[aria-current=page]{background:#f1e8fd;border-color:#ddcbf6}

/* dòng đếm lớn đầu trang */
.tong{font-size:34px;line-height:1.2;font-weight:800;color:#231b3a;margin:6px 0 12px;
  font-variant-numeric:tabular-nums}
.tong em{font-style:normal;color:#b5179e}
@media(max-width:560px){.tong{font-size:25px}}

/* hai cột: ô soạn | bảng Details */
.khu{display:grid;grid-template-columns:minmax(0,1fr) 268px;gap:16px;align-items:start}
@media(max-width:820px){.khu{grid-template-columns:1fr}}

#vb{width:100%;box-sizing:border-box;min-height:300px;resize:vertical;
  font:16.5px/1.65 system-ui,Segoe UI,Roboto,sans-serif;padding:15px 17px;
  border:2px solid #e0cff2;border-radius:14px;color:#2a2140;background:#fbfaff}
#vb:focus{outline:none;border-color:#b5179e;background:#fff}

.ben{background:#fbfaff;border:1px solid #eae3f5;border-radius:14px;overflow:hidden}
.ben h4{margin:0;padding:11px 14px;font-size:13px;letter-spacing:.5px;text-transform:uppercase;
  color:#8b2fb8;background:#f4eefb;border-bottom:1px solid #eae3f5}
.ben .d{display:flex;justify-content:space-between;align-items:baseline;gap:10px;
  padding:9px 14px;border-bottom:1px solid #f2edf9;font-size:14.5px}
.ben .d:last-child{border-bottom:0}
.ben .d b{font-size:17px;color:#231b3a;font-variant-numeric:tabular-nums}
.ben .d span{color:#6b6480}
.ben + .ben{margin-top:14px}

/* thanh nút công cụ */
.cong{display:flex;flex-wrap:wrap;gap:8px;margin:12px 0 6px}
.cong button{background:#f1e8fd;border:1px solid #ddcbf6;color:#8b2fb8;border-radius:9px;
  padding:8px 13px;font-size:13.5px;font-weight:600;cursor:pointer}
.cong button:hover{background:#e7d8fb}
.cong button.ok{background:#e3f8ea;border-color:#a8e6bd;color:#1a9b52}
.cong .ngan{display:flex;gap:6px;align-items:center}
.cong input[type=text]{border:1px solid #ddcbf6;border-radius:9px;padding:8px 11px;
  font-size:13.5px;width:120px;color:#2a2140;background:#fbfaff}

/* giới hạn nền tảng */
.gh{display:grid;grid-template-columns:repeat(auto-fill,minmax(228px,1fr));gap:10px;margin:14px 0}
.ghO{box-sizing:border-box;background:#fbfaff;border:1px solid #eae3f5;border-radius:12px;padding:11px 13px}
.ghO .ten{display:flex;justify-content:space-between;gap:8px;font-size:13.5px;
  color:#231b3a;font-weight:700;margin-bottom:7px}
.ghO .con{font-weight:800;font-variant-numeric:tabular-nums}
.thanh{height:8px;background:#efe9f7;border-radius:6px;overflow:hidden}
.thanh i{display:block;height:100%;background:#8b2fb8;border-radius:6px;transition:width .18s}
.ghO.gan .thanh i{background:#e0a127} .ghO.gan .con{color:#b5760f}
.ghO.qua .thanh i{background:#d2453c} .ghO.qua .con{color:#c0392b}
.ghO.qua{border-color:#f0c6c2;background:#fff7f6}

/* mật độ từ khoá — danh sách dọc */
.tk{margin:9px 0 0;min-width:0}
.tk .r{display:flex;gap:9px;align-items:baseline;padding:5px 0;font-size:14px;
  border-bottom:1px solid #f2edf9;min-width:0}
.tk .r:last-child{border-bottom:0}
.tk .r b{flex:0 0 auto;color:#8b2fb8;font-variant-numeric:tabular-nums;font-size:13px}
.tk .r span{flex:1;min-width:0;color:#3a3350;overflow-wrap:anywhere;word-break:break-word}
.tk .trong{color:#8b83a3;font-size:13.5px;padding:6px 0}
.tabs{display:flex;gap:5px;margin:2px 0 0}
.tabs button{flex:1;background:#fff;border:1px solid #e5dcf3;color:#6b6480;border-radius:8px;
  padding:6px 4px;font-size:12.5px;font-weight:700;cursor:pointer}
.tabs button[aria-pressed=true]{background:#f1e8fd;border-color:#ddcbf6;color:#8b2fb8}

/* kết quả đổi hoa thường */
.kqDs{display:flex;flex-direction:column;gap:10px;margin:16px 0}
.kqO{background:#fbfaff;border:1px solid #eae3f5;border-radius:14px;padding:12px 14px;
  display:flex;gap:12px;align-items:flex-start;justify-content:space-between}
.kqO .noi{flex:1;min-width:0}
.kqO .ten{font-size:12px;color:#8b83a3;font-weight:700;letter-spacing:.4px;text-transform:uppercase}
.kqO .ra{font-size:16px;line-height:1.55;color:#231b3a;margin-top:3px;
  overflow-wrap:anywhere;word-break:break-word;max-height:6.5em;overflow:auto}
.kqO button{flex:0 0 auto;background:#f1e8fd;border:1px solid #ddcbf6;color:#8b2fb8;
  border-radius:9px;padding:8px 14px;font-size:13.5px;font-weight:600;cursor:pointer;white-space:nowrap}
.kqO button:hover{background:#e7d8fb}
.kqO button.ok{background:#e3f8ea;border-color:#a8e6bd;color:#1a9b52}
@media(max-width:520px){.kqO{flex-direction:column;align-items:stretch;gap:9px}
  .kqO button{align-self:flex-end}}

/* thanh trượt tốc độ đọc */
.toc{background:#fbfaff;border:1px solid #eae3f5;border-radius:14px;padding:14px 16px;margin:14px 0}
.toc label{display:flex;justify-content:space-between;font-weight:700;color:#231b3a;
  font-size:14.5px;margin-bottom:9px}
.toc input[type=range]{width:100%;accent-color:#b5179e}
.toc .ghi{font-size:13px;color:#8b83a3;margin-top:7px}

.cta{background:linear-gradient(135deg,#fff2fb,#f3ecff);border:1px solid #ecd9f4;
  border-radius:14px;padding:16px 19px;margin:26px 0;font-size:16px}
.cta a{font-weight:800}
.tlnhanh{background:linear-gradient(135deg,#fff6fb,#f4efff);border:1px solid #ecd9f4;
  border-left:5px solid #b5179e;border-radius:14px;padding:15px 19px;margin:12px 0 20px}
.tlnhanh p{margin:0;font-size:17px;line-height:1.65;font-weight:500}
table{border-collapse:collapse;width:100%;font-size:14.5px;margin:12px 0}
td,th{border:1px solid #e7e0f2;padding:8px 11px;text-align:left}
th{background:#f7f3fc;color:#231b3a}
.bangCuon{overflow-x:auto;margin:12px 0}
ul,ol{padding-left:24px} li{margin:6px 0}
footer{border-top:1px solid #eee6f3;margin-top:34px;padding-top:16px;color:#8b83a3;font-size:13px}
footer a{color:#6b6480}

/* vùng tải tệp lên — nút phải nhìn ra ngay là nút */
.tha{border:2px dashed #cbb4ee;border-radius:18px;padding:26px 20px 22px;text-align:center;
  background:#faf7fd;margin:0 0 10px;transition:border-color .15s,background .15s,transform .15s}
.tha.keo{border-color:#b5179e;background:#fdf0f9;border-style:solid;transform:scale(1.008)}
.tha p{margin:0}
.tha .thaIcon{font-size:34px;line-height:1;margin-bottom:10px}
.tha.keo .thaIcon{transform:scale(1.15)}
/* nút chính: to, đặc, có bóng — không thể nhầm với chữ thường */
.nutTai{display:inline-block;background:linear-gradient(135deg,#b5179e,#8b2fb8);color:#fff;
  border:0;border-radius:11px;padding:13px 30px;font-size:16.5px;font-weight:800;cursor:pointer;
  box-shadow:0 3px 12px rgba(160,40,170,.32);transition:transform .12s,box-shadow .12s}
.nutTai:hover{transform:translateY(-1px);box-shadow:0 6px 18px rgba(160,40,170,.42)}
.nutTai:active{transform:translateY(1px)}
.anTep{position:absolute;width:1px;height:1px;opacity:0;pointer-events:none}
/* bàn phím: phải thấy được viền khi tab tới ô nhập ẩn */
.anTep:focus + .thaKeo, .anTep:focus-visible + .thaKeo{outline:none}
.tha:focus-within .nutTai{outline:3px solid #231b3a;outline-offset:3px}
.tha .thaKeo{font-size:14.5px;color:#6b6480;margin-top:11px}
.tha .thaDinh{font-size:13.5px;color:#3a3350;margin-top:9px}
.tha .thaDinh b{color:#8b2fb8;background:#f1e8fd;border:1px solid #e0cff2;
  border-radius:6px;padding:2px 8px;font-size:12.5px;letter-spacing:.3px}
.tha .ghi{font-size:12.5px;color:#8b83a3;margin-top:12px}
@media(max-width:480px){.tha{padding:20px 14px 18px}
  .nutTai{width:100%;box-sizing:border-box;padding:14px 16px}
  .tha .thaDinh b{display:inline-block;margin:2px 0}}
.tt{font-size:13.5px;color:#6b6480;margin:0 0 12px;min-height:1.3em}
.tt.loi{color:#c0392b;font-weight:600}

.ghiNut{font-size:12.5px;color:#8b83a3;margin:2px 0 0}
