:root{
  --bg:#f6f8fc; --panel:#fff; --text:#1f2937; --muted:#6b7280;
  --accent:#2563eb; --accent2:#06b6d4; --danger:#dc2626; --line:rgba(0,0,0,.1)
}
a {color: #3470d5!important;}
body{margin:0;background:var(--bg);color:var(--text);font:16px/1.5 system-ui}
.wrap{max-width:760px;margin:20px auto;padding:5px; margin-top:0!important;}
.card{background:var(--panel);border:1px solid var(--line);box-shadow:0 12px 30px rgba(0,0,0,.08)}
.topbar{display:flex;justify-content:space-between;align-items:center;padding:14px 16px;border-bottom:1px solid var(--line)}
h1{margin:0;font-weight:700;font-size:20px!important}

/* Toggle */
.toggle{display:flex;align-items:center;gap:10px;white-space:nowrap;margin-right:4px}
.switch{position:relative;display:inline-block;width:48px;height:26px;flex:0 0 auto}
.switch input{opacity:0;width:0;height:0}
.slider{position:absolute;inset:0;display:block;background:#d1d5db;border-radius:999px;cursor:pointer;transition:background .2s;box-shadow:inset 0 0 0 1px rgba(0,0,0,.06)}
.slider:before{content:"";position:absolute;width:20px;height:20px;left:3px;top:3px;background:#fff;border-radius:50%;transition:transform .2s;box-shadow:0 1px 2px rgba(0,0,0,.2)}
.switch input:checked + .slider{background:var(--accent)}
.switch input:checked + .slider:before{transform:translateX(22px)}

/* Screen */
.screen{
  background:rgba(0,0,0,.04);border:1px solid var(--line);
  border-radius:10px;padding:12px;margin:10px;
  display:flex;flex-direction:column;gap:6px;
}
.exp{font:18px/1.3 ui-monospace;color:#343434}
.ans-row{display:flex;align-items:center;gap:8px;margin-top:10px}
.ans{font:700 36px/1 ui-monospace;text-align:right;flex:1}

/* Copy button */
.icon-btn.copy-btn{
  inline-size:34px; block-size:34px; padding:0; line-height:0;
  display:inline-flex; align-items:center; justify-content:center;
  border-radius:8px; background:rgba(255,255,255,.72);
  backdrop-filter:saturate(120%) blur(6px);
  border:1px solid var(--line); color:var(--text);
  box-shadow:0 1px 0 rgba(0,0,0,.02), inset 0 0 0 1px rgba(255,255,255,.4);
  transition:transform .08s ease, box-shadow .15s ease, background .15s ease, color .15s ease, border-color .15s ease;
  vertical-align:middle;
}
.icon-btn.copy-btn:hover{background:rgba(255,255,255,.9);box-shadow:0 6px 16px rgba(0,0,0,.08);transform:translateY(-1px)}
.icon-btn.copy-btn:active,.icon-btn.copy-btn.pressed{transform:translateY(0) scale(.98);box-shadow:inset 0 2px 6px rgba(0,0,0,.08)}
.icon-btn.copy-btn svg{display:block;inline-size:20px;block-size:20px;flex:0 0 20px}
.icon-btn.copy-btn[data-tip]{position:relative}
.icon-btn.copy-btn[data-tip]::after{
  content:attr(data-tip);
  position:absolute;bottom:calc(100% + 4px);right:0;
  background:#111827;color:#fff;font-size:12px;padding:10px 8px;border-radius:6px;
  opacity:0;transform:translateY(4px);transition:.15s;pointer-events:none;white-space:nowrap;
  box-shadow:0 6px 18px rgba(0,0,0,.18);
}
.icon-btn.copy-btn:hover[data-tip]::after{opacity:1;transform:translateY(0)}
.icon-btn.copy-btn.ok{background:#e8fff3;border-color:#b6f7cc;color:#0b4;box-shadow:0 0 0 2px rgba(11,180,80,.15)}

/* Notice on screen */
.notice{
  text-align:right;font-size:13.5px;font-weight:500;color:var(--muted);
  min-height:18px;transition:all .25s ease;opacity:0;
}
.notice.show{opacity:1}
.notice.success{color:#0b4}
.notice.error{color:#c62828}
.notice.info{color:#2563eb}

/* Pads */
.pad{display:grid;gap:8px;margin:12px}
.pad-util{grid-template-columns:repeat(8,1fr)}
.pad-basic{grid-template-columns:repeat(4,1fr)}
button{
  border:1px solid var(--line);border-radius:10px;padding:14px;
  font-weight:700;font-size:18px!important;background:#f3f3f3;cursor:pointer;
  position:relative;overflow:hidden;
  transition:transform .06s ease, background .15s ease, box-shadow .15s ease, color .15s ease;
}
button:hover{background:#f3f3f3;}
.danger{background:#fee2e2;color:#7f1d1d;border-color:#fecaca}
.eq{background:var(--accent);color:#fff;border:0}
.eq:hover{background:var(--accent);color:#fff}
.eq.wide{grid-column:span 2}

/* Science box */
.sci-box{
  margin:16px;border:1px solid var(--line);border-radius:12px;
  padding:12px;background:#f3f3f3;
}
.sci-box h3{margin:0 0 10px 0;font-size:18px;color:#000;font-weight:600}
.pad-sci{display:grid;grid-template-columns:repeat(6,1fr);gap:6px; margin: 0px;}
.pad-sci button{font-size:14px!important;padding:10px;border-radius:10px;background:#fff;font-weight:normal!important}

/* History */
.history-box{
  background:var(--panel);border:1px solid var(--line);border-radius:10px;
  padding:10px 12px;margin:16px;margin-top:12px;
  box-shadow:0 8px 20px rgba(0,0,0,.05);
}
.history-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px}
.history-head h3{margin:0;font-size:16px;font-weight:700;color:#000}
.chip{
  border:1px solid var(--line);border-radius:10px;padding:2px 10px;
  font-weight:700;background:#f3f4f6;cursor:pointer;font-size:14px!important;
}
.chip.ghost{color:var(--muted);background:transparent}
.history-list{
  list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:6px;
  max-height:200px;overflow:auto;
}
.history-list li{
  display:flex;justify-content:space-between;align-items:center;gap:8px;
  padding:6px 8px;border:1px solid var(--line);border-radius:8px;font-size:13px;cursor:pointer;background:#fff;
}
.history-list li:hover{background:#f3f4f6}
.history-list .h-expr{flex:1;text-align:left;color:var(--muted);font-family:ui-monospace,monospace}
.history-list .h-res{min-width:90px;text-align:right;font-weight:700;color:var(--accent);font-family:ui-monospace,monospace}

/* Guide */
.guide-body ul li{list-style:disc!important}
.guide{margin:16px;font-size:16px}
details{border:1px solid var(--line);border-radius:10px;background:#fff}
summary{cursor:pointer;list-style:none;padding:10px 12px;font-weight:700}
summary::-webkit-details-marker{display:none}
.guide-body{padding:10px 14px;border-top:1px solid var(--line);color:var(--text);line-height:30px}
.guide-body ul{margin:8px 0 0 18px}
.guide-body code{background:#eef2ff;padding:0 6px;border-radius:6px}

/* Footer (in-card) */
.footer{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;padding:12px 16px;border-top:1px solid var(--line)}

/* Toast */
.toast{
  position:fixed;right:16px;bottom:16px;z-index:50;
  padding:10px 12px;border-radius:10px;color:#0b4;background:#e8fff3;
  border:1px solid #b6f7cc;box-shadow:0 6px 18px rgba(0,0,0,.12);
  opacity:0;transform:translateY(6px);pointer-events:none;transition:.25s;
  font-weight:700;font-size:14px;
}
.toast.show{opacity:1;transform:translateY(0)}
.toast.err{background:#ffecec;border-color:#ffc8c8;color:#c62828}

/* Press feedback & ripple */
button:active,button.pressed{transform:translateY(1px) scale(0.98);box-shadow:inset 0 2px 8px rgba(0,0,0,.12)}
button .wave{
  position:absolute;left:0;top:0;width:12px;height:12px;border-radius:999px;
  background:rgba(0,0,0,.18);opacity:.35;transform:translate(-50%,-50%) scale(0);
  animation:wave .45s ease-out forwards;pointer-events:none;mix-blend-mode:multiply;
}
@keyframes wave{to{transform:translate(-50%,-50%) scale(12);opacity:0}}

/* Responsive */
@media(max-width:640px){
  .pad-util{grid-template-columns:repeat(4,1fr)}
  .pad-sci{grid-template-columns:repeat(4,1fr)}
  button{font-size:18px;padding:12px}
  .sci-box{margin:10px;padding:10px}
  .history-box{margin:10px}
  .guide,.intro,.seo-note{margin:10px!important}
}

/* Site footer (global) */
.site-footer-mt{background:#f1f1f1;border-top:1px solid var(--line);
  color:var(--muted);font-size:14px;padding:20px 16px;text-align:center;line-height:1.6;
}
.site-footer-mt a{color:var(--accent);text-decoration:none;font-weight:500}
.site-footer-mt a:hover{text-decoration:underline}
.site-footer-mt .credit{margin-top:8px;font-size:13px;color:var(--muted);opacity:.8}

/* Intro & SEO Note */
.intro,.seo-note{
  border-radius:16px;
  margin:16px;margin-top:20px;
}
.intro h2,.seo-note h3{
  font-size:18px;font-weight:700;margin-bottom:8px;color:#000;text-align:left;
}
.intro p,.seo-note p{
  color:var(--text);font-size:15px;line-height:1.6;margin:0;margin-top:10px;
}
.intro strong,.seo-note b{font-weight:600}
.intro em{color:#33a851;font-style:normal}


/* Mobile tap fixes & active state */
button,.btn,.eq{-webkit-tap-highlight-color:transparent;touch-action:manipulation}
button:active,.btn:active,.eq:active{
  transform:scale(0.96);
  background:var(--accent);color:#fff;
  box-shadow:0 0 10px rgba(0,0,0,0.15) inset;
  transition:background .1s ease, transform .1s ease;
}
button.active{background:var(--accent);color:#fff;transform:scale(0.95)}
button:active::after{
  content:"";position:absolute;inset:0;background:rgba(255,255,255,0.15);
  border-radius:inherit;animation:ripple .3s ease;
}
@keyframes ripple{from{opacity:1;transform:scale(0)}to{opacity:0;transform:scale(2)}}
.mauso {
    background:#8d8d8d;
    color: #fff;
}
.mc {
    color: #2c2f34!important;
}

.ghost-1 {
    font-weight: normal;
}
.mauso:hover {
    background: #363636;
}
p {
    margin: 5px;
}



/* ===== Tool Specs (scoped) ===== */
.tool-specs {
  --border:#e6edf7;
  --head:#eef6ff;
  --row:#fafcff;
  --text:#0f172a;
  --muted:#5b6b82;
  --link:#155eef;
  color:var(--text);
  margin: 16px 0 20px;
  margin: 16px;
}
.tool-specs h2{
  font: 800 20px/1.35 system-ui,-apple-system,Segoe UI,Roboto,Arial;
  margin: 0 0 10px;
}

.tool-specs__table{
  width:100%;
  border-collapse:separate;
  border-spacing:0;
  border:1px solid var(--border);
  background:#fff;
  border-radius:10px;
  overflow:hidden; /* bo góc cho phần thead */
  font:15px/1.6 system-ui,-apple-system,Segoe UI,Roboto,Arial;
}

.tool-specs__table caption{
  text-align:left;
  font-weight:800;
  padding:12px 14px;
  background:var(--head);
  color:#0b2239;
}

.tool-specs__table thead th{
  background:var(--head);
  padding:12px 14px;
  text-transform:uppercase;
  font-size:13px;
  letter-spacing:.02em;
  border-bottom:1px solid var(--border);
}

.tool-specs__table th[scope="row"]{
  width:36%;
  background:var(--row);
  color:#0b2239;
}

.tool-specs__table th,
.tool-specs__table td{
  padding:12px 14px;
  border-bottom:1px solid var(--border);
  vertical-align:top;
}

.tool-specs__table tr:last-child th,
.tool-specs__table tr:last-child td{
  border-bottom:none;
}

.tool-specs__table a{
  color:var(--link);
  text-decoration:none;
}
.tool-specs__table a:hover{ text-decoration:underline; }

/* Responsive nhỏ */
@media (max-width: 640px){
  .tool-specs__table{ font-size:14px; }
  .tool-specs__table th[scope="row"]{ width:42%; }
  .tool-specs h2{ font-size:18px; }
}
.tool-specs__table tr th {
    text-align: left;
}

 .toolhub-root, .toolhub-root *{ box-sizing:border-box }

    /* Tokens (có thể đổi nhanh 1–2 giá trị dưới đây) */
    .toolhub-root{
      --panel:#fff;
      --text:#1f2937;
      --muted:#6b7280;
      --primary:#1f5eff;         /* màu nhấn */
      --line:#e6eef9;            /* viền mảnh xanh nhạt */
      --icon-bg:#eef4ff;         /* nền icon nhạt */
      --radius:12px;
      --radius-icon:10px;
    }

    .toolhub-wrap {
    max-width: 100%;
    margin: 0 auto;
    /* padding: 0 8px; */
    margin: 16px;
}
    .toolhub-wrap h2 {
        margin-bottom: 10px;
    }
    .toolhub-grid{
      display:grid;
      grid-template-columns:repeat(2, minmax(0,1fr));
      gap:16px;
    }
    @media (max-width:640px){
      .toolhub-grid{ grid-template-columns:1fr }
    }

    .toolhub-card{
      display:flex; gap:12px; align-items:flex-start;
      background:var(--panel);
      border:1px solid var(--line);
      border-radius:var(--radius);
      padding:10px;
      text-decoration:none; color:var(--text);
      transition: border-color .12s ease, box-shadow .12s ease, transform .08s ease;
    }
    .toolhub-card:hover{
      border-color:#cfe0ff;
      box-shadow:0 6px 18px rgba(31,94,255,.08);
      transform:translateY(-1px);
    }

    .toolhub-icon{
      width:40px; height:40px; border-radius:var(--radius-icon);
      background:var(--icon-bg);
      color:var(--primary);
      display:grid; place-items:center; flex:0 0 40px;
    }
    .toolhub-icon svg{ width:20px; height:20px; fill:currentColor; display:block }

    .toolhub-title{
      margin:0 0 4px;
      font-size:16px; line-height:1.35; font-weight:700;
      color:#155eef;               /* xanh đậm đọc rõ */
    }
    .toolhub-desc{
      margin:0; font-size:14px; line-height:1.5; color:var(--muted); margin-top: 0px!important;
    }

    /* Dark (nếu site có dùng data-theme="dark") */
    [data-theme="dark"] .toolhub-root{
      --panel:#0f172a; --text:#e8edf7; --muted:#9fb2d6; --primary:#5b8cff;
      --line:#203155; --icon-bg:#122047;
    }
    [data-theme="dark"] .toolhub-card:hover{
      border-color:#2a4686; box-shadow:0 10px 22px rgba(0,0,0,.35)
    }
    [data-theme="dark"] .toolhub-title{ color:#86aaff }
    
    
    
    