
/* ============ Vaato — shared styles ============ */
:root{
  --bg:#f6f7f9; --surface:#ffffff; --surface-2:#eef0f3;
  --text:#111318; --text-2:#5b6270; --text-3:#8b93a3;
  --border:#e4e7ec;
  --accent:#4f46e5; --accent-soft:#eceafb; --accent-text:#4f46e5;
  --green:#16a34a; --green-soft:#e7f6ec;
  --red:#dc2626; --red-soft:#fdeaea;
  --amber:#d97706; --amber-soft:#fdf2e3;
  --blue:#2563eb; --blue-soft:#e8effd;
  --teal:#0d9488; --teal-soft:#e3f5f3;
  --purple:#7c3aed; --purple-soft:#f0eafd;
  --pink:#db2777; --pink-soft:#fbe9f2;
  --radius:14px; --radius-sm:10px;
  --shadow-sm:0 1px 2px rgba(16,24,40,.06);
  --shadow-md:0 8px 24px rgba(16,24,40,.10);
  --font:"Segoe UI",system-ui,-apple-system,Roboto,"Helvetica Neue",Arial,sans-serif;
  --mono:"Cascadia Code","SF Mono",Consolas,"Roboto Mono",monospace;
}
[data-theme="dark"]{
  --bg:#0d0f14; --surface:#151821; --surface-2:#1d212c;
  --text:#e8eaf0; --text-2:#9aa3b2; --text-3:#6b7484;
  --border:#262b37;
  --accent-soft:#262442; --accent-text:#a5b4fc;
  --green-soft:#12291a; --red-soft:#2c1515; --amber-soft:#2c2113;
  --blue-soft:#152238; --teal-soft:#112826; --purple-soft:#221a33; --pink-soft:#2c1520;
  --shadow-sm:0 1px 2px rgba(0,0,0,.4); --shadow-md:0 10px 28px rgba(0,0,0,.45);
}
*{margin:0;padding:0;box-sizing:border-box}
html{scroll-behavior:smooth}
body{font-family:var(--font);background:var(--bg);color:var(--text);min-height:100vh;display:flex;flex-direction:column;transition:background .25s,color .25s}
button{font-family:inherit;cursor:pointer;border:none;background:none;color:inherit}
input,select,textarea{font-family:inherit}
a{text-decoration:none;color:inherit}
img{max-width:100%}
.wrap{max-width:1120px;margin:0 auto;padding:0 24px;width:100%}
.mono{font-family:var(--mono)}
::-webkit-scrollbar{width:10px;height:10px}
::-webkit-scrollbar-thumb{background:var(--border);border-radius:8px}
.site-header{position:sticky;top:0;z-index:50;background:color-mix(in srgb,var(--bg) 85%,transparent);backdrop-filter:blur(12px);border-bottom:1px solid var(--border)}
.header-in{display:flex;align-items:center;gap:20px;height:64px}
.logo{display:flex;align-items:center;gap:10px;font-size:19px;font-weight:800;letter-spacing:-.02em}
.logo-mark{width:34px;height:34px;border-radius:10px;background:linear-gradient(135deg,#4f46e5,#7c3aed);display:grid;place-items:center;color:#fff;box-shadow:0 4px 12px rgba(79,70,229,.35)}
.logo-mark svg{width:17px;height:17px}
.logo > span:not(.logo-mark){color:var(--accent-text)}
.main-nav{display:flex;gap:4px;margin-left:12px}
.main-nav a{font-size:13.5px;font-weight:500;color:var(--text-2);padding:8px 12px;border-radius:9px;transition:all .15s}
.main-nav a:hover{background:var(--surface-2);color:var(--text)}
.header-actions{margin-left:auto;display:flex;align-items:center;gap:10px}
.icon-btn{width:38px;height:38px;border-radius:10px;display:grid;place-items:center;border:1px solid var(--border);color:var(--text-2);transition:all .15s}
.icon-btn:hover{background:var(--surface-2);color:var(--text)}
.icon-btn svg{width:17px;height:17px}
[data-theme="dark"] .sun{display:block}[data-theme="dark"] .moon{display:none}.sun{display:none}
.hamburger{display:none}
.hamburger svg{width:20px;height:20px}
.crumbs{padding:18px 0 0;font-size:12.5px;color:var(--text-3);display:flex;gap:8px;flex-wrap:wrap;align-items:center}
.crumbs a:hover{color:var(--accent-text)}
.crumbs svg{width:12px;height:12px}
.hero{margin-top:22px;background:linear-gradient(120deg,#4f46e5 0%,#6d28d9 60%,#7c3aed 100%);border-radius:20px;padding:40px;color:#fff;position:relative;overflow:hidden;box-shadow:0 14px 34px rgba(79,70,229,.28)}
.hero::after{content:"";position:absolute;right:-60px;top:-60px;width:250px;height:250px;border-radius:50%;background:rgba(255,255,255,.10)}
.hero::before{content:"";position:absolute;right:80px;bottom:-100px;width:190px;height:190px;border-radius:50%;background:rgba(255,255,255,.07)}
.hero h1{font-size:30px;font-weight:800;letter-spacing:-.02em;margin-bottom:10px;position:relative}
.hero p{font-size:15px;opacity:.9;max-width:560px;line-height:1.6;position:relative}
.hero-badges{display:flex;gap:10px;margin-top:20px;flex-wrap:wrap;position:relative}
.hero-badge{display:inline-flex;align-items:center;gap:7px;font-size:12.5px;font-weight:600;background:rgba(255,255,255,.16);border:1px solid rgba(255,255,255,.25);padding:7px 13px;border-radius:99px}
.hero-badge svg{width:14px;height:14px}
.stats{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;margin-top:20px}
.stat{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);padding:16px 18px;display:flex;align-items:center;gap:13px;box-shadow:var(--shadow-sm)}
.stat-ic{width:42px;height:42px;border-radius:11px;display:grid;place-items:center;flex:none}
.stat-ic svg{width:20px;height:20px}
.stat b{font-size:20px;font-weight:700;display:block;line-height:1.2}
.stat span{font-size:12px;color:var(--text-3);font-weight:500}
.section-head{display:flex;align-items:end;justify-content:space-between;gap:14px;margin:36px 0 16px;flex-wrap:wrap}
.section-head h2{font-size:19px;font-weight:700}
.section-head p{font-size:13px;color:var(--text-3);margin-top:3px}
.chips{display:flex;gap:8px;flex-wrap:wrap}
.chip{font-size:12.5px;font-weight:600;color:var(--text-2);padding:8px 15px;border-radius:99px;border:1px solid var(--border);background:var(--surface);transition:all .15s}
.chip:hover{border-color:var(--accent);color:var(--accent-text)}
.chip.active{background:var(--accent);border-color:var(--accent);color:#fff;box-shadow:0 4px 12px rgba(79,70,229,.3)}
#tools,.chip{scroll-margin-top:84px}
.grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(250px,1fr));gap:16px}
.card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);padding:18px;display:flex;flex-direction:column;gap:10px;box-shadow:var(--shadow-sm);transition:transform .18s,box-shadow .18s,border-color .18s}
.card:hover{transform:translateY(-4px);box-shadow:var(--shadow-md);border-color:color-mix(in srgb,var(--accent) 40%,var(--border))}
.card-top{display:grid;grid-template-columns:auto 1fr;align-items:center;column-gap:12px;row-gap:8px}
.card-top .card-ic{grid-row:1/span 2}
.card-top h3{grid-column:2;min-width:0}
.card-top .tag{grid-column:2;justify-self:start}
.card-ic{width:42px;height:42px;border-radius:11px;display:grid;place-items:center;flex:none}
.card-ic svg{width:20px;height:20px}
.card h3{font-size:14.5px;font-weight:600}
.tag{font-size:10.5px;font-weight:700;letter-spacing:.05em;text-transform:uppercase;padding:3px 9px;border-radius:99px;flex:none}
.card p{font-size:13px;color:var(--text-2);line-height:1.5;flex:1}
.card-foot{display:flex;align-items:center;justify-content:space-between}
.open-link{display:inline-flex;align-items:center;gap:6px;font-size:12.5px;font-weight:600;color:var(--accent-text);padding:7px 13px;border-radius:9px;background:var(--accent-soft)}
.open-link svg{width:13px;height:13px;transition:transform .15s}
.card:hover .open-link svg{transform:translateX(3px)}
.offline-dot{display:inline-flex;align-items:center;gap:6px;font-size:11.5px;color:var(--text-3);font-weight:500}
.offline-dot i{width:7px;height:7px;border-radius:50%;background:var(--green);display:inline-block}
.tool-head{padding:26px 0 6px}
.tool-head h1{font-size:27px;font-weight:800;letter-spacing:-.02em;display:flex;align-items:center;gap:14px;flex-wrap:wrap}
.tool-head .h1-ic{width:46px;height:46px;border-radius:12px;display:grid;place-items:center}
.tool-head .h1-ic svg{width:22px;height:22px}
.tool-head p.lead{margin-top:10px;font-size:14.5px;color:var(--text-2);line-height:1.6;max-width:720px}
.tool-card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);box-shadow:var(--shadow-sm);padding:24px;margin-top:20px}
.tool-grid2{display:grid;grid-template-columns:1fr 1fr;gap:16px}
@media(max-width:820px){.tool-grid2{grid-template-columns:1fr}}
.field{display:flex;flex-direction:column;gap:6px;margin-bottom:14px}
.field label{font-size:12.5px;font-weight:600;color:var(--text-2)}
.field input,.field select,.field textarea{padding:11px 13px;font-size:14px;color:var(--text);background:var(--surface);border:1px solid var(--border);border-radius:11px;outline:none;transition:border-color .15s,box-shadow .15s;width:100%}
.field input:focus,.field select:focus,.field textarea:focus{border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-soft)}
.field textarea{font-family:var(--mono);font-size:13px;min-height:170px;resize:vertical;line-height:1.55}
.field .hint{font-size:11.5px;color:var(--text-3);font-weight:400}
.btn{display:inline-flex;align-items:center;gap:8px;font-size:13.5px;font-weight:600;padding:10px 16px;border-radius:11px;transition:all .15s}
.btn svg{width:15px;height:15px}
.btn-primary{background:var(--accent);color:#fff;box-shadow:0 4px 14px rgba(79,70,229,.3)}
.btn-primary:hover{filter:brightness(1.08);transform:translateY(-1px)}
.btn-ghost{border:1px solid var(--border);color:var(--text-2);background:var(--surface)}
.btn-ghost:hover{background:var(--surface-2);color:var(--text)}
.btn-row{display:flex;gap:10px;flex-wrap:wrap;margin:6px 0 14px}
.result-box{background:var(--surface-2);border-radius:12px;padding:16px 18px;margin-top:6px}
.result-big{font-size:30px;font-weight:800;letter-spacing:-.02em;color:var(--accent-text)}
.result-label{font-size:12px;font-weight:600;color:var(--text-3);text-transform:uppercase;letter-spacing:.06em}
.kv{display:flex;justify-content:space-between;padding:9px 0;border-bottom:1px dashed var(--border);font-size:13.5px}
.kv:last-child{border-bottom:none}
.kv b{font-variant-numeric:tabular-nums}
.bar-wrap{height:12px;border-radius:99px;overflow:hidden;display:flex;background:var(--surface-2);margin:10px 0 6px}
.bar-a{background:var(--accent)}
.bar-b{background:var(--green)}
.bar-legend{display:flex;gap:16px;font-size:12px;color:var(--text-2);flex-wrap:wrap}
.bar-legend i{width:9px;height:9px;border-radius:3px;display:inline-block;margin-right:5px}
.out-area{font-family:var(--mono);font-size:12.5px;background:var(--surface-2);border:1px solid var(--border);border-radius:11px;padding:14px;min-height:150px;max-height:420px;overflow:auto;white-space:pre-wrap;word-break:break-word;line-height:1.55;margin-top:8px}
.msg-ok{color:var(--green);font-size:13px;font-weight:500}
.msg-err{color:var(--red);font-size:13px;font-weight:500;font-family:var(--mono)}
.msg-info{color:var(--text-3);font-size:13px}
.diff-del{background:var(--red-soft);color:var(--red)}
.diff-add{background:var(--green-soft);color:var(--green)}
.diff-line{padding:2px 10px;font-family:var(--mono);font-size:12.5px;border-radius:6px;margin:2px 0;word-break:break-all}
table.meta{width:100%;border-collapse:collapse;font-size:13px}
table.meta td{padding:8px 10px;border-bottom:1px solid var(--border)}
table.meta td:first-child{color:var(--text-3);width:40%}
table.meta tr:last-child td{border-bottom:none}
.prose{max-width:760px}
.prose h2{font-size:20px;font-weight:700;margin:34px 0 12px;letter-spacing:-.01em}
.prose h3{font-size:16px;font-weight:600;margin:20px 0 8px}
.prose p,.prose li{font-size:14.5px;color:var(--text-2);line-height:1.7}
.prose ul,.prose ol{padding-left:22px;margin:8px 0}
.prose li{margin-bottom:6px}
.steps{counter-reset:s;display:flex;flex-direction:column;gap:12px;margin-top:14px}
.step{display:flex;gap:14px;align-items:flex-start;background:var(--surface);border:1px solid var(--border);border-radius:12px;padding:14px 16px}
.step::before{counter-increment:s;content:counter(s);width:28px;height:28px;border-radius:8px;background:var(--accent-soft);color:var(--accent-text);font-weight:700;font-size:13px;display:grid;place-items:center;flex:none}
.step p{font-size:13.5px;color:var(--text-2);line-height:1.55}
.step b{color:var(--text)}
details.faq{background:var(--surface);border:1px solid var(--border);border-radius:12px;padding:14px 18px;margin-bottom:10px}
details.faq summary{font-size:14px;font-weight:600;cursor:pointer;list-style:none;display:flex;justify-content:space-between;align-items:center}
details.faq summary::-webkit-details-marker{display:none}
details.faq summary::after{content:"+";font-size:18px;color:var(--text-3);transition:transform .15s}
details.faq[open] summary::after{transform:rotate(45deg)}
details.faq p{margin-top:10px;font-size:13.5px;color:var(--text-2);line-height:1.65}
.related{display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:12px;margin-top:14px}
.rel-card{display:flex;align-items:center;gap:11px;background:var(--surface);border:1px solid var(--border);border-radius:12px;padding:13px 15px;font-size:13.5px;font-weight:600;transition:all .15s}
.rel-card:hover{border-color:var(--accent);transform:translateY(-2px)}
.rel-card .card-ic{width:34px;height:34px;border-radius:9px}
.rel-card .card-ic svg{width:16px;height:16px}
footer{margin-top:56px;border-top:1px solid var(--border);padding:28px 0;background:var(--surface)}
.foot-grid{display:grid;grid-template-columns:2fr 1fr 1fr 1fr;gap:24px}
.foot-grid h4{font-size:12px;font-weight:700;text-transform:uppercase;letter-spacing:.07em;color:var(--text-3);margin-bottom:10px}
.foot-grid a{display:block;font-size:13px;color:var(--text-2);padding:4px 0}
.foot-grid a:hover{color:var(--accent-text)}
.foot-note{margin-top:22px;padding-top:18px;border-top:1px solid var(--border);display:flex;justify-content:space-between;gap:10px;flex-wrap:wrap;font-size:12.5px;color:var(--text-3)}
.toast{position:fixed;bottom:22px;right:22px;z-index:99;background:var(--text);color:var(--bg);font-size:13px;font-weight:500;padding:12px 17px;border-radius:12px;box-shadow:var(--shadow-md);transform:translateY(80px);opacity:0;transition:all .3s;display:flex;align-items:center;gap:9px;max-width:320px}
.toast.show{transform:translateY(0);opacity:1}
.toast svg{width:15px;height:15px;flex:none}
.empty{display:none;text-align:center;padding:50px 20px;color:var(--text-3)}
.empty.show{display:block}
@keyframes fadeUp{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:none}}
.fade{animation:fadeUp .35s ease both}
@media(max-width:900px){
  .main-nav{display:none;position:absolute;top:64px;left:0;right:0;background:var(--surface);border-bottom:1px solid var(--border);flex-direction:column;padding:10px 16px;gap:2px}
  .main-nav.open{display:flex}
  .main-nav a{padding:12px}
  .hamburger{display:grid;width:38px;height:38px;border-radius:10px;place-items:center;border:1px solid var(--border)}
  .stats{grid-template-columns:repeat(2,1fr)}
  .foot-grid{grid-template-columns:1fr 1fr}
  .hero h1{font-size:24px}
  .tool-head h1{font-size:22px}
}
@media(max-width:560px){
  .wrap{padding:0 16px}
  .stats{grid-template-columns:1fr 1fr}
  .hero{padding:26px 22px}
  .tool-card{padding:18px}
}
