:root{
  --navy:#0F1F5C;--blue:#1A6FBF;--teal:#00B8C8;--cyan:#6EE7F0;
  --orange:#FF6B35;--bg:#F2F6FF;--bg2:#E8EFFC;--white:#FFFFFF;
  --text:#1C2340;--muted:#5B6680;--border:#D0DAEA;
  --grad:linear-gradient(135deg,#1A2E6B 0%,#1A6FBF 50%,#00B8C8 100%);
  --grad2:linear-gradient(135deg,#1A6FBF,#00B8C8);
  --shadow:0 4px 24px rgba(26,46,107,0.10);
  --shadow-md:0 8px 40px rgba(26,46,107,0.14);
}
html{scroll-behavior:smooth}

/* ── TOOL HERO ───────────────────────────────────────── */
.tool-hero{
  background:linear-gradient(135deg,#0B1845 0%,#122272 55%,#0A3570 100%);
  padding:48px 5% 60px;position:relative;overflow:hidden;
}
.tool-hero::before{
  content:'';position:absolute;inset:0;
  background:
    radial-gradient(ellipse 55% 70% at 85% 50%,rgba(0,184,200,0.14),transparent 65%),
    radial-gradient(ellipse 35% 50% at 5% 60%,rgba(110,231,240,0.07),transparent 60%);
}
.tool-hero-inner{
  position:relative;z-index:1;
  display:flex;align-items:center;justify-content:space-between;
  gap:40px;flex-wrap:wrap;
}
.tool-hero-text{flex:1;min-width:280px}
.tool-breadcrumb{
  display:flex;align-items:center;gap:6px;
  font-size:12.5px;color:rgba(255,255,255,0.5);
  margin-bottom:18px;flex-wrap:wrap;
}
.tool-breadcrumb a{color:rgba(255,255,255,0.6);text-decoration:none;transition:color .2s}
.tool-breadcrumb a:hover{color:var(--cyan)}
.tool-breadcrumb span{opacity:0.4}
.tool-eyebrow{
  display:inline-flex;align-items:center;gap:8px;
  background:rgba(0,184,200,0.15);border:1px solid rgba(0,184,200,0.3);
  color:var(--cyan);font-size:11px;font-weight:700;
  text-transform:uppercase;letter-spacing:1.2px;
  padding:5px 14px;border-radius:50px;margin-bottom:18px;
}
.tool-hero h1{
  font-size:clamp(1.9rem,4vw,2.9rem);font-weight:800;
  color:#fff;line-height:1.15;margin-bottom:14px;
}
.tool-hero-desc{
  font-size:16px;color:rgba(255,255,255,0.65);
  line-height:1.75;max-width:520px;margin-bottom:24px;
}
.tool-badges{display:flex;flex-wrap:wrap;gap:10px}
.tool-badge{
  display:inline-flex;align-items:center;gap:6px;
  background:rgba(255,255,255,0.08);border:1px solid rgba(255,255,255,0.15);
  color:rgba(255,255,255,0.75);font-size:12px;font-weight:600;
  padding:5px 12px;border-radius:50px;
}
.tool-badge svg{width:12px;height:12px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round}
.tool-hero-visual{
  flex-shrink:0;
  background:rgba(255,255,255,0.05);border:1px solid rgba(255,255,255,0.1);
  border-radius:20px;padding:22px 26px;
  font-family:'Courier New',monospace;font-size:12px;
  color:rgba(255,255,255,0.7);line-height:1.8;
  backdrop-filter:blur(8px);min-width:240px;
}
.tool-hero-visual .code-label{font-size:10px;color:rgba(255,255,255,0.35);letter-spacing:1px;text-transform:uppercase;margin-bottom:10px}
.tool-hero-visual .code-in{color:#6EE7F0}
.tool-hero-visual .code-out{color:#FF8B55}
.tool-hero-visual .code-arrow{color:rgba(255,255,255,0.3)}

/* ── MAIN TOOL SECTION ───────────────────────────────── */
.tool-main{padding:56px 5%;background:var(--bg)}
.tool-container{max-width:1100px;margin:0 auto}

/* Mode tabs */
.tool-tabs{
  display:flex;gap:0;background:var(--white);
  border:1.5px solid var(--border);border-radius:14px;
  padding:5px;margin-bottom:28px;width:fit-content;
}
.tool-tab{
  padding:10px 28px;border-radius:10px;
  font-size:14px;font-weight:700;cursor:pointer;
  border:none;background:transparent;color:var(--muted);
  font-family:inherit;transition:all .2s;
}
.tool-tab.active{
  background:var(--grad);color:#fff;
  box-shadow:0 2px 12px rgba(26,111,191,0.3);
}

/* Tool card */
.tool-card{
  background:var(--white);border:1.5px solid var(--border);
  border-radius:20px;padding:32px;
  box-shadow:var(--shadow);
}

/* Textarea areas */
.io-grid{display:grid;grid-template-columns:1fr 1fr;gap:20px}
.io-box{}
.io-label{
  display:flex;align-items:center;justify-content:space-between;
  margin-bottom:8px;
}
.io-label-text{font-size:13px;font-weight:700;color:var(--navy)}
.io-actions{display:flex;gap:8px}
.io-btn{
  display:inline-flex;align-items:center;gap:5px;
  padding:5px 12px;border-radius:7px;font-size:12px;font-weight:600;
  cursor:pointer;font-family:inherit;border:1.5px solid var(--border);
  background:var(--bg);color:var(--muted);transition:all .18s;
}
.io-btn:hover{border-color:var(--blue);color:var(--blue);background:rgba(26,111,191,0.05)}
.io-btn svg{width:12px;height:12px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.io-btn.danger:hover{border-color:#DC2626;color:#DC2626;background:rgba(220,38,38,0.05)}
textarea.io-textarea{
  width:100%;height:200px;resize:vertical;
  border:1.5px solid var(--border);border-radius:12px;
  padding:14px 16px;font-size:13.5px;font-family:'Courier New',monospace;
  color:var(--text);background:var(--bg);outline:none;
  transition:border-color .2s,box-shadow .2s;line-height:1.6;
}
textarea.io-textarea:focus{
  border-color:var(--teal);
  box-shadow:0 0 0 3px rgba(0,184,200,0.12);
  background:#fff;
}
textarea.io-textarea::placeholder{color:var(--muted);opacity:0.6}
textarea.io-textarea.output{
  background:var(--bg2);color:var(--text);
}

/* Convert button row */
.convert-row{
  display:flex;align-items:center;justify-content:center;
  gap:14px;padding:20px 0;
  position:relative;
}
.convert-row::before{
  content:'';position:absolute;top:50%;left:0;right:0;
  height:1px;background:var(--border);z-index:0;
}
.btn-convert{
  position:relative;z-index:1;
  background:var(--grad);color:#fff;border:none;
  padding:13px 36px;border-radius:50px;
  font-size:15px;font-weight:700;cursor:pointer;
  font-family:inherit;transition:all .2s;
  box-shadow:0 4px 18px rgba(26,111,191,0.3);
  display:flex;align-items:center;gap:8px;
}
.btn-convert:hover{transform:translateY(-2px);box-shadow:0 8px 28px rgba(26,111,191,0.4)}
.btn-convert svg{width:16px;height:16px;fill:none;stroke:#fff;stroke-width:2.5;stroke-linecap:round;stroke-linejoin:round}
.btn-convert-clear{
  position:relative;z-index:1;
  background:#fff;color:var(--muted);
  border:1.5px solid var(--border);
  padding:12px 22px;border-radius:50px;
  font-size:13px;font-weight:600;cursor:pointer;
  font-family:inherit;transition:all .2s;
}
.btn-convert-clear:hover{border-color:var(--blue);color:var(--blue)}

/* Status / error */
.tool-status{
  margin-top:12px;padding:10px 16px;
  border-radius:10px;font-size:13px;font-weight:600;
  display:none;
}
.tool-status.success{background:rgba(22,163,74,0.1);color:#16A34A;border:1px solid rgba(22,163,74,0.2)}
.tool-status.error{background:rgba(220,38,38,0.08);color:#DC2626;border:1px solid rgba(220,38,38,0.15)}
.tool-status.show{display:block}

/* Char count */
.char-count{font-size:11.5px;color:var(--muted);margin-top:6px;text-align:right}

/* File upload row */
.file-row{
  display:flex;align-items:center;gap:12px;
  padding:14px 18px;
  background:var(--bg2);border:1.5px dashed var(--border);
  border-radius:12px;margin-top:16px;cursor:pointer;
  transition:all .2s;
}
.file-row:hover{border-color:var(--teal);background:rgba(0,184,200,0.05)}
.file-row input[type=file]{display:none}
.file-row-icon{font-size:20px}
.file-row-text{font-size:13px;color:var(--muted);font-weight:600}
.file-row-text strong{color:var(--blue)}

/* ── INFO SECTIONS ───────────────────────────────────── */
.tool-info{padding:0 5% 64px;background:var(--bg)}
.tool-info-grid{
  max-width:1100px;margin:0 auto;
  display:grid;grid-template-columns:1fr 1fr;gap:24px;
}
.info-card{
  background:var(--white);border:1.5px solid var(--border);
  border-radius:20px;padding:32px;
}
.info-card-icon{
  width:48px;height:48px;border-radius:14px;
  display:flex;align-items:center;justify-content:center;
  font-size:22px;margin-bottom:18px;
}
.info-card h3{font-size:17px;font-weight:800;color:var(--navy);margin-bottom:10px}
.info-card p{font-size:14px;color:var(--muted);line-height:1.75}

/* How to use steps */
.steps-section{padding:0 5% 64px;background:var(--bg2)}
.steps-inner{max-width:840px;margin:0 auto;padding-top:64px}
.steps-header{text-align:center;margin-bottom:48px}
.steps-header h2{font-size:clamp(1.6rem,3vw,2.2rem);font-weight:800;color:var(--navy);margin-bottom:10px}
.steps-header p{font-size:15px;color:var(--muted)}
.steps-list{display:flex;flex-direction:column;gap:0}
.step{display:flex;gap:24px;padding:28px 0;border-bottom:1px solid var(--border)}
.step:last-child{border-bottom:none}
.step-num{
  flex-shrink:0;width:44px;height:44px;border-radius:50%;
  background:var(--grad);color:#fff;font-size:16px;font-weight:800;
  display:flex;align-items:center;justify-content:center;
  box-shadow:0 3px 12px rgba(26,111,191,0.25);
}
.step-body h4{font-size:15px;font-weight:700;color:var(--navy);margin-bottom:6px}
.step-body p{font-size:14px;color:var(--muted);line-height:1.7}

/* Use cases */
.usecases-section{padding:64px 5%;background:var(--white)}
.usecases-inner{max-width:1100px;margin:0 auto}
.usecases-header{text-align:center;margin-bottom:48px}
.usecases-header h2{font-size:clamp(1.6rem,3vw,2.2rem);font-weight:800;color:var(--navy);margin-bottom:10px}
.usecases-header p{font-size:15px;color:var(--muted)}
.usecases-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:18px}
.usecase-card{
  background:var(--bg);border:1.5px solid var(--border);
  border-radius:16px;padding:24px;
}
.usecase-card:hover{border-color:var(--teal);box-shadow:0 4px 20px rgba(0,184,200,0.12)}
.usecase-icon{font-size:28px;margin-bottom:12px}
.usecase-card h4{font-size:14px;font-weight:700;color:var(--navy);margin-bottom:8px}
.usecase-card p{font-size:13px;color:var(--muted);line-height:1.65}

/* FAQ */
.faq-section{padding:64px 5%;background:var(--bg)}
.faq-inner{max-width:760px;margin:0 auto}
.faq-header{text-align:center;margin-bottom:48px}
.faq-header h2{font-size:clamp(1.6rem,3vw,2.2rem);font-weight:800;color:var(--navy);margin-bottom:10px}
.faq-header p{font-size:15px;color:var(--muted)}
.faq-item{
  background:var(--white);border:1.5px solid var(--border);
  border-radius:14px;margin-bottom:10px;overflow:hidden;
}
.faq-q{
  display:flex;align-items:center;justify-content:space-between;
  padding:18px 22px;cursor:pointer;
  font-size:14.5px;font-weight:700;color:var(--navy);
  user-select:none;gap:16px;
}
.faq-q:hover{color:var(--blue)}
.faq-arrow{
  font-size:18px;color:var(--muted);flex-shrink:0;
  transition:transform .25s;
}
.faq-item.open .faq-arrow{transform:rotate(45deg);color:var(--teal)}
.faq-a{
  max-height:0;overflow:hidden;
  transition:max-height .3s ease,padding .3s;
  font-size:14px;color:var(--muted);line-height:1.75;
  padding:0 22px;
}
.faq-item.open .faq-a{max-height:300px;padding:0 22px 20px}
.faq-a code{
  background:var(--bg2);border:1px solid var(--border);
  padding:1px 6px;border-radius:5px;font-size:12.5px;
  font-family:'Courier New',monospace;color:var(--navy);
}

/* Related tools */
.related-section{padding:64px 5%;background:var(--bg2)}
.related-inner{max-width:1100px;margin:0 auto}
.related-header{text-align:center;margin-bottom:40px}
.related-header h2{font-size:clamp(1.4rem,2.5vw,1.9rem);font-weight:800;color:var(--navy);margin-bottom:8px}
.related-header p{font-size:14px;color:var(--muted)}
.related-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:16px}
.related-card{
  background:var(--white);border:1.5px solid var(--border);
  border-radius:16px;padding:20px;
  text-decoration:none;display:block;
  transition:all .2s;
}
.related-card:hover{border-color:var(--teal);transform:translateY(-3px);box-shadow:0 6px 24px rgba(0,184,200,0.15)}
.related-card-icon{font-size:26px;margin-bottom:10px}
.related-card h4{font-size:13.5px;font-weight:700;color:var(--navy);margin-bottom:5px}
.related-card p{font-size:12px;color:var(--muted);line-height:1.55}
.related-card-tag{display:inline-block;font-size:10px;font-weight:700;text-transform:uppercase;letter-spacing:.7px;color:var(--teal);background:rgba(0,184,200,0.1);padding:2px 8px;border-radius:50px;margin-top:10px}


.reveal{opacity:0;transform:translateY(24px);transition:opacity .5s ease,transform .5s ease}
.reveal.visible{opacity:1;transform:translateY(0)}
.section-eyebrow{display:inline-block;font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:1.5px;color:var(--blue);background:rgba(26,111,191,0.1);padding:5px 14px;border-radius:50px;margin-bottom:14px}

/* ── RESPONSIVE ──────────────────────────────────────── */
@media(max-width:1000px){
  .nav-menu,.nav-auth,.nav-search{display:none}
  .hamburger{display:flex}
  .mobile-nav{display:block}
  .logo-wrap .logo-img{display:none}
  .logo-icon-only{display:block;height:40px;width:40px}
  .io-grid{grid-template-columns:1fr}
  .tool-info-grid{grid-template-columns:1fr}
  .usecases-grid{grid-template-columns:1fr 1fr}
  .related-grid{grid-template-columns:1fr 1fr}
  .footer-top{grid-template-columns:1fr 1fr}
}
@media(max-width:600px){
  .usecases-grid,.related-grid{grid-template-columns:1fr}
  .footer-top{grid-template-columns:1fr}
  .tool-hero{padding:36px 5% 48px}
  .tool-tabs{width:100%}
  .tool-tab{flex:1;text-align:center}
  .convert-row{flex-direction:column}
  .convert-row::before{display:none}
  .tool-hero-visual{display:none}
}
