/* Interscale Tools — Design System */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

:root{
  --bg:#fcfcfe;
  --bg-2:#f8f9ff;
  --surface:#ffffff;
  --border:#ececf1;
  --border-strong:#e2e2ea;
  --text:#0f111a;
  --muted:#6b6f7e;
  --muted-2:#8b8fa3;
  --radius-xl:22px;
  --radius-lg:16px;
  --radius-md:12px;
  --radius-pill:999px;
  --shadow-soft:0 8px 32px rgba(15,17,26,0.06), 0 1px 3px rgba(15,17,26,0.05);
  --shadow-hover:0 16px 48px rgba(15,17,26,0.10), 0 4px 12px rgba(15,17,26,0.06);
  --green:#0ea15a;
  --green-bg:#eaf7ee;
  --green-border:#cfe9d6;
  --blue:#2563eb;
  --blue-bg:#eef2ff;
  --blue-border:#dde4ff;
  --purple:#7c3aed;
  --purple-bg:#f3efff;
  --purple-border:#e5deff;
  --max:1120px;
  --tool-max:1060px;
}

*{box-sizing:border-box;margin:0;padding:0}
html{scroll-behavior:smooth}
body{
  font-family:'Inter',-apple-system,BlinkMacSystemFont,'Segoe UI',Helvetica,Arial,sans-serif;
  background:var(--bg);
  color:var(--text);
  line-height:1.5;
  -webkit-font-smoothing:antialiased;
  position:relative;
  min-height:100vh;
  overflow-x:hidden;
}

/* Ambient gradients */
body::before{
  content:"";
  position:fixed;
  inset:0;
  z-index:-1;
  background:
    radial-gradient(800px 600px at 18% -8%, rgba(99,102,241,0.08) 0%, transparent 62%),
    radial-gradient(700px 500px at 85% -6%, rgba(168,85,247,0.07) 0%, transparent 60%),
    radial-gradient(600px 400px at 50% 38%, rgba(59,130,246,0.05) 0%, transparent 70%),
    linear-gradient(180deg, #fcfcfe 0%, #f9f9ff 28%, #fcfcfe 100%);
  pointer-events:none;
}

/* Header */
.header{
  position:sticky;
  top:0;
  z-index:40;
  background:rgba(255,255,255,0.82);
  backdrop-filter: blur(14px) saturate(180%);
  -webkit-backdrop-filter: blur(14px) saturate(180%);
  border-bottom:1px solid rgba(236,236,241,0.9);
}
.header-inner{
  max-width:var(--max);
  margin:0 auto;
  padding:14px 28px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
}
.brand{
  display:flex;
  align-items:center;
  gap:12px;
  text-decoration:none;
}
.brand-logo{
  width:40px;
  height:40px;
  border-radius:11px;
  object-fit:contain;
  background:#fff;
  border:1px solid var(--border);
  padding:4px;
  box-shadow:0 1px 6px rgba(15,17,26,0.06);
}
.brand-name{
  font-size:17px;
  font-weight:700;
  letter-spacing:-0.03em;
  color:var(--text);
}
.brand-sub{
  font-size:11px;
  font-weight:500;
  letter-spacing:0.08em;
  text-transform:uppercase;
  color:var(--muted-2);
  margin-top:-2px;
}
.badge-pill{
  display:inline-flex;
  align-items:center;
  gap:7px;
  padding:7px 13px;
  border-radius:var(--radius-pill);
  background:#fff;
  border:1px solid var(--border);
  box-shadow:0 1px 6px rgba(15,17,26,0.04);
  font-size:12.5px;
  font-weight:600;
  letter-spacing:0.02em;
  color:#2f3342;
  white-space:nowrap;
}
.badge-dot{
  width:7px;
  height:7px;
  border-radius:50%;
  background:#10b981;
  box-shadow:0 0 0 5px rgba(16,185,129,0.12);
  flex-shrink:0;
}

/* Hero */
.hero{
  max-width:var(--max);
  margin:0 auto;
  padding:56px 28px 28px;
  text-align:center;
}
.eyebrow{
  display:inline-flex;
  align-items:center;
  gap:8px;
  font-size:11px;
  font-weight:600;
  letter-spacing:0.14em;
  text-transform:uppercase;
  color:var(--muted-2);
  margin-bottom:18px;
}
.eyebrow::before,
.eyebrow::after{
  content:"";
  width:18px;
  height:1px;
  background: linear-gradient(90deg, transparent, #d9d9e6);
}
.eyebrow::after{ background: linear-gradient(90deg, #d9d9e6, transparent);}
.hero h1{
  font-size:46px;
  font-weight:800;
  letter-spacing:-0.045em;
  line-height:0.95;
  color:var(--text);
  margin-bottom:14px;
}
.hero-sub{
  font-size:16.5px;
  color:var(--muted);
  max-width:520px;
  margin:0 auto;
  line-height:1.6;
  font-weight:400;
}

/* Tools Section */
.tools-section{
  max-width:var(--max);
  margin:0 auto;
  padding:24px 28px 56px;
}
.section-head{
  margin-bottom:22px;
}
.section-head h2{
  font-size:18px;
  font-weight:700;
  letter-spacing:-0.02em;
  color:var(--text);
  margin-bottom:4px;
}
.section-head p{
  font-size:14px;
  color:var(--muted);
}

/* Cards Grid */
.cards{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap:18px;
}

.tool-card{
  position:relative;
  display:flex;
  flex-direction:column;
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:var(--radius-xl);
  padding:22px 22px 18px;
  text-decoration:none;
  color:inherit;
  box-shadow: var(--shadow-soft);
  transform: scale(1);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
  overflow:hidden;
  min-height:248px;
}
.tool-card::before{
  content:"";
  position:absolute;
  inset:0;
  border-radius:inherit;
  opacity:0;
  transition: opacity 180ms ease;
  pointer-events:none;
}
.tool-card:hover{
  transform: scale(1.01);
  box-shadow: var(--shadow-hover);
  border-color: var(--border-strong);
}
.tool-card:hover .card-arrow{
  transform: translate(2px, -2px);
  background:#f4f4f8;
  border-color:#e4e4ea;
}
.tool-card:focus-visible{
  outline:2px solid var(--blue);
  outline-offset:2px;
}

.card-top{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  margin-bottom:18px;
}
.icon-box{
  width:44px;
  height:44px;
  border-radius:12px;
  display:grid;
  place-items:center;
  border:1px solid transparent;
  flex-shrink:0;
}
.icon-box.green{ background:var(--green-bg); border-color:var(--green-border); color:var(--green);}
.icon-box.blue{ background:var(--blue-bg); border-color:var(--blue-border); color:var(--blue);}
.icon-box.purple{ background:var(--purple-bg); border-color:var(--purple-border); color:var(--purple);}
.icon-box svg{ width:22px; height:22px; }

.card-arrow{
  width:32px;
  height:32px;
  border-radius:50%;
  display:grid;
  place-items:center;
  background:#fafafc;
  border:1px solid var(--border);
  color:#8b8fa3;
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease;
  flex-shrink:0;
}
.card-arrow svg{ width:14px; height:14px; }

.card-title{
  font-size:15.5px;
  font-weight:700;
  letter-spacing:-0.02em;
  line-height:1.3;
  margin-bottom:8px;
  color:var(--text);
}
.card-desc{
  font-size:13.6px;
  line-height:1.55;
  color:var(--muted);
  flex:1;
  margin-bottom:18px;
}
.card-footer{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-top:auto;
  padding-top:14px;
  border-top:1px solid #f0f0f4;
}
.status{
  display:inline-flex;
  align-items:center;
  gap:6px;
  font-size:11px;
  font-weight:600;
  letter-spacing:0.06em;
  text-transform:uppercase;
}
.status::before{
  content:"";
  width:6px;
  height:6px;
  border-radius:50%;
  background:currentColor;
  opacity:0.9;
}
.status.green{ color:var(--green);}
.status.blue{ color:var(--blue);}
.status.purple{ color:var(--purple);}
.status-pill{
  font-size:11px;
  font-weight:500;
  color:var(--muted-2);
  letter-spacing:0.01em;
}

/* Footer */
.footer{
  border-top:1px solid var(--border);
  background:rgba(255,255,255,0.6);
  backdrop-filter: blur(8px);
}
.footer-inner{
  max-width:var(--max);
  margin:0 auto;
  padding:18px 28px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  font-size:13px;
  color:var(--muted-2);
}
.footer-left{ font-weight:400; }
.footer-right{
  font-weight:600;
  letter-spacing:0.08em;
  text-transform:uppercase;
  font-size:11px;
  color:#9aa0b6;
}

/* ========== Tool Pages ========== */
.page-wrap{
  max-width:var(--tool-max);
  margin:0 auto;
  padding:28px 28px 56px;
}
.back-link{
  display:inline-flex;
  align-items:center;
  gap:7px;
  font-size:13.5px;
  font-weight:500;
  color:var(--muted);
  text-decoration:none;
  margin-bottom:22px;
  padding:8px 12px 8px 10px;
  border-radius:var(--radius-pill);
  border:1px solid transparent;
  transition: background 150ms ease, border-color 150ms ease, color 150ms ease;
}
.back-link:hover{
  background:#fff;
  border-color:var(--border);
  color:var(--text);
}
.back-link svg{ width:16px; height:16px; }

.tool-header{
  display:flex;
  gap:16px;
  align-items:flex-start;
  margin-bottom:28px;
  padding-bottom:28px;
  border-bottom:1px solid var(--border);
}
.tool-header .icon-box{
  width:52px;
  height:52px;
  border-radius:14px;
}
.tool-header .icon-box svg{ width:26px; height:26px; }
.tool-head-text h1{
  font-size:26px;
  font-weight:800;
  letter-spacing:-0.03em;
  line-height:1.1;
  margin-bottom:6px;
}
.tool-head-text p{
  font-size:14.5px;
  color:var(--muted);
  line-height:1.5;
  max-width:560px;
}

.tool-layout{
  display:grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap:22px;
  align-items:start;
}

/* Form Card */
.form-card, .info-card{
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:var(--radius-xl);
  box-shadow: var(--shadow-soft);
}
.form-card{
  padding:22px 22px 20px;
}
.info-card{
  padding:22px;
  background: linear-gradient(180deg, #ffffff 0%, #fcfcff 100%);
}
.form-card h3, .info-card h3{
  font-size:13px;
  font-weight:700;
  letter-spacing:0.04em;
  text-transform:uppercase;
  color:#3a3d4a;
  margin-bottom:16px;
  display:flex;
  align-items:center;
  gap:8px;
}
.form-card h3::before{
  content:"";
  width:3px;
  height:14px;
  border-radius:999px;
  background:var(--blue);
}
.info-card h3::before{
  content:"";
  width:3px;
  height:14px;
  border-radius:999px;
  background:var(--purple);
}

.field{
  margin-bottom:16px;
}
.field:last-of-type{ margin-bottom:18px; }
.label{
  display:block;
  font-size:12.5px;
  font-weight:600;
  letter-spacing:0.02em;
  color:#2f3342;
  margin-bottom:7px;
}
.label span{ color:#d14343; margin-left:2px; }
.input-wrap{ position:relative; }
.input{
  width:100%;
  height:44px;
  padding:0 42px 0 14px;
  border:1px solid var(--border);
  border-radius:11px;
  font-size:14px;
  font-family:inherit;
  color:var(--text);
  background:#fbfbfc;
  outline:none;
  transition: border-color 150ms ease, background 150ms ease, box-shadow 150ms ease;
}
.input:focus{
  background:#fff;
  border-color:#c4cfff;
  box-shadow:0 0 0 4px rgba(37,99,235,0.08);
}
.input::placeholder{ color:#a9adc0; }
.toggle-btn{
  position:absolute;
  right:6px;
  top:50%;
  transform:translateY(-50%);
  width:32px;
  height:32px;
  border-radius:8px;
  border:1px solid transparent;
  background:transparent;
  color:#8b8fa3;
  display:grid;
  place-items:center;
  cursor:pointer;
  transition: background 150ms ease, color 150ms ease;
}
.toggle-btn:hover{ background:#f2f2f6; color:#2f3342; }
.toggle-btn svg{ width:16px; height:16px; }

.btn-primary{
  width:100%;
  height:44px;
  border:none;
  border-radius:11px;
  background:#0f111a;
  color:#fff;
  font-size:14px;
  font-weight:600;
  letter-spacing:0.01em;
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  transition: background 150ms ease, transform 100ms ease, opacity 150ms ease;
  box-shadow:0 6px 20px rgba(15,17,26,0.12);
}
.btn-primary:hover{ background:#1a1d2e; }
.btn-primary:active{ transform:scale(0.99); }
.btn-primary:disabled{ opacity:0.55; cursor:not-allowed; transform:none; }
.btn-primary svg{ width:16px; height:16px; }

.hint{
  font-size:12px;
  color:var(--muted-2);
  margin-top:8px;
  line-height:1.5;
}

.info-card p{
  font-size:13.5px;
  color:var(--muted);
  line-height:1.65;
  margin-bottom:12px;
}
.info-card p:last-child{ margin-bottom:0; }
.info-list{
  list-style:none;
  display:flex;
  flex-direction:column;
  gap:10px;
  margin:14px 0 0;
}
.info-list li{
  display:flex;
  gap:10px;
  font-size:13px;
  color:#3a3d4a;
  line-height:1.5;
}
.info-list li::before{
  content:"";
  width:6px;
  height:6px;
  border-radius:50%;
  background:#c7d2fe;
  margin-top:7px;
  flex-shrink:0;
}
.code-inline{
  font-family:'JetBrains Mono', ui-monospace, monospace;
  font-size:12px;
  background:#f4f4f8;
  border:1px solid var(--border);
  padding:2px 6px;
  border-radius:6px;
  color:#2f3342;
  word-break:break-all;
}
.endpoint-box{
  margin-top:14px;
  background:#0f111a;
  color:#e8e8f0;
  border-radius:12px;
  padding:14px 16px;
  font-family:'JetBrains Mono', monospace;
  font-size:12px;
  line-height:1.6;
  overflow:auto;
  border:1px solid #1e2230;
}
.endpoint-box .dim{ color:#8b8fa3; }
.endpoint-box .accent{ color:#a5b4fc; }
.endpoint-box .green-t{ color:#86efac; }

/* Result */
.result{
  margin-top:18px;
  border-radius:var(--radius-lg);
  border:1px solid var(--border);
  overflow:hidden;
  display:none;
}
.result.visible{ display:block; }
.result-head{
  padding:12px 14px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  border-bottom:1px solid var(--border);
  background:#fcfcff;
}
.result-head strong{
  font-size:13px;
  font-weight:700;
  letter-spacing:-0.01em;
  display:flex;
  align-items:center;
  gap:8px;
}
.result-head .dot{
  width:8px; height:8px; border-radius:50%;
}
.result-head.success .dot{ background:#10b981; }
.result-head.error .dot{ background:#ef4444; }
.result-head.loading .dot{ background:#f59e0b; animation: pulse 1.2s infinite; }
@keyframes pulse{0%,100%{opacity:1}50%{opacity:0.4}}
.result-meta{
  font-size:12px;
  color:var(--muted-2);
  font-weight:500;
}
.result-body{ padding:14px; background:#fff; }
.result-body pre{
  margin:0;
  font-family:'JetBrains Mono', monospace;
  font-size:12.5px;
  line-height:1.6;
  white-space:pre-wrap;
  word-break:break-word;
  background:#0f111a;
  color:#e8e8f0;
  border-radius:10px;
  padding:14px 16px;
  overflow:auto;
  max-height:420px;
  border:1px solid #1e2230;
}
.kv{
  display:grid;
  grid-template-columns: 110px 1fr;
  gap:8px 14px;
  font-size:13px;
  margin-top:12px;
  padding-top:12px;
  border-top:1px solid #f0f0f4;
}
.kv dt{ color:var(--muted-2); font-weight:500; }
.kv dd{ color:#2f3342; font-weight:500; word-break:break-word; }

/* Alert */
.alert{
  margin-top:14px;
  padding:11px 13px;
  border-radius:10px;
  font-size:13px;
  line-height:1.5;
  border:1px solid transparent;
  display:none;
}
.alert.visible{ display:block; }
.alert.error{ background:#fef2f2; border-color:#fecaca; color:#991b1b; }
.alert.success{ background:#effaf2; border-color:#bbf7d0; color:#14532d; }
.alert.info{ background:#eef2ff; border-color:#c7d2fe; color:#1e3a8a; }

/* Responsive */
@media (max-width: 960px){
  .cards{ grid-template-columns: repeat(2, 1fr); }
  .tool-layout{ grid-template-columns: 1fr; }
  .hero h1{ font-size:40px; }
}
@media (max-width: 640px){
  .header-inner{ padding:12px 18px; }
  .brand-logo{ width:36px; height:36px; }
  .brand-name{ font-size:15.5px; }
  .hero{ padding:36px 18px 20px; }
  .hero h1{ font-size:32px; }
  .hero-sub{ font-size:15px; }
  .tools-section{ padding:16px 18px 40px; }
  .cards{ grid-template-columns: 1fr; gap:14px; }
  .tool-card{ min-height:auto; }
  .footer-inner{ flex-direction:column; align-items:center; text-align:center; padding:16px 18px; gap:6px; }
  .page-wrap{ padding:18px 18px 40px; }
  .tool-header{ gap:12px; }
  .tool-head-text h1{ font-size:22px; }
  .form-card, .info-card{ padding:18px; }
}

/* Subtle selection */
::selection{ background:rgba(99,102,241,0.15); }

/* ========== Homepage — Minimal Premium ========== */
.home-body{
  background:#fcfcfe;
  min-height:100vh;
  display:flex;
  flex-direction:column;
}
.home-body::before{
  background:
    radial-gradient(560px 380px at 22% 42%, rgba(16,185,129,0.05) 0%, transparent 68%),
    radial-gradient(560px 380px at 50% 46%, rgba(59,130,246,0.045) 0%, transparent 68%),
    radial-gradient(560px 380px at 78% 42%, rgba(124,58,237,0.05) 0%, transparent 68%),
    linear-gradient(180deg, #fcfcfe 0%, #fbfcff 100%);
}
.home{
  flex:1;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:flex-start;
  padding:48px 24px 64px;
  max-width:1160px;
  margin:0 auto;
  width:100%;
}
.home-header{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:12px;
  margin-bottom:44px;
}
.home-logo{
  width:72px;
  height:72px;
  object-fit:contain;
  display:block;
}
.home-title{
  font-size:15px;
  font-weight:600;
  letter-spacing:-0.025em;
  color:#0f111a;
}
.home-main{
  width:100%;
  display:flex;
  justify-content:center;
}
.home-cards{
  display:grid;
  grid-template-columns: repeat(3, minmax(0, 360px));
  gap:22px;
  width:100%;
  max-width:1120px;
  justify-content:center;
  align-items:start;
}
.tool-card--home{
  width:100%;
  max-width:360px;
  min-height:272px;
  height:272px;
  padding:28px 24px 26px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  text-align:center;
  border-radius:22px;
  overflow:visible;
  background:#fff;
  border:1px solid #ececf1;
  box-shadow:0 8px 32px rgba(15,17,26,0.06), 0 1px 3px rgba(15,17,26,0.04);
  transform:scale(1);
  transition: transform 200ms ease, box-shadow 200ms ease, border-color 200ms ease;
  position:relative;
  justify-self:center;
}
.tool-card--home:hover{
  transform:scale(1.015);
  box-shadow:0 18px 45px rgba(15,17,26,0.10), 0 4px 14px rgba(15,17,26,0.06);
  border-color:#e2e2ea;
}
.tool-card--home > svg{
  width:64px;
  height:64px;
  flex-shrink:0;
  margin-bottom:18px;
}
.tool-icon{
  width:64px;
  height:64px;
  object-fit:contain;
  flex-shrink:0;
  margin-bottom:18px;
  display:block;
}
.card-glow{
  position:absolute;
  inset:-10px;
  border-radius:28px;
  z-index:-1;
  pointer-events:none;
  opacity:0.55;
  filter:blur(18px);
}
.card-glow--green{ background:radial-gradient(420px 220px at 50% 35%, rgba(16,185,129,0.08), transparent 72%); }
.card-glow--blue{ background:radial-gradient(420px 220px at 50% 35%, rgba(37,99,235,0.07), transparent 72%); }
.card-glow--purple{ background:radial-gradient(420px 220px at 50% 35%, rgba(124,58,237,0.08), transparent 72%); }

.tool-card--home .icon-box--large{
  width:64px;
  height:64px;
  border-radius:16px;
  display:grid;
  place-items:center;
  border:1px solid transparent;
  margin-bottom:18px;
}
.tool-card--home .icon-box--large svg{ width:26px; height:26px; }
.tool-card--home .icon-box--large.green{ background:#eaf7ee; border-color:#cfe9d6; color:#0ea15a; }
.tool-card--home .icon-box--large.blue{ background:#eef2ff; border-color:#dde4ff; color:#2563eb; }
.tool-card--home .icon-box--large.purple{ background:#f3efff; border-color:#e5deff; color:#7c3aed; }

.tool-card--home .card-title{
  font-size:18px;
  font-weight:700;
  letter-spacing:-0.03em;
  line-height:1.25;
  color:#0f111a;
  margin:0;
}

@media (max-width: 1020px){
  .home-cards{ grid-template-columns: repeat(2, minmax(0, 360px)); }
}
@media (max-width: 640px){
  .home{ padding:36px 16px 40px; }
  .home-header{ margin-bottom:28px; }
  .home-logo{ width:72px; height:72px; }
  .home-cards{ grid-template-columns: 1fr; gap:16px; max-width:360px; }
  .tool-card--home{ height:248px; min-height:248px; max-width:none; }
  .card-glow{ display:none; }
}


