:root{
  --bg:#f6f8fc;
  --surface:rgba(255,255,255,.88);
  --surface-solid:#fff;
  --text:#0f172a;
  --muted:#64748b;
  --line:#dfe8f5;
  --line-strong:#c8d8f0;
  --blue:#2563eb;
  --blue2:#1d4ed8;
  --cyan:#38bdf8;
  --soft:#eef5ff;
  --ok:#16a34a;
  --danger:#dc2626;
  --shadow:0 14px 34px rgba(15,23,42,.075);
  --shadow2:0 10px 22px rgba(37,99,235,.18);
  --r:18px;
  --card-gradient:linear-gradient(145deg,#ffffff 0%,#f8fbff 100%);
  --glass-border:rgba(184,205,235,.76);
}

*{box-sizing:border-box}
html,body{height:100%;margin:0}
body{
  font-family:IRANSans,"IRANSansX","Vazirmatn","Segoe UI",Tahoma,Arial,sans-serif;
  background:
    radial-gradient(circle at 78% -22%,rgba(56,189,248,.20),transparent 34%),
    radial-gradient(circle at 18% -8%,rgba(37,99,235,.17),transparent 36%),
    linear-gradient(180deg,#f4f8ff 0,#f8fafc 48%,#f6f8fc 100%);
  color:var(--text);
  overflow:hidden;
}
a{text-decoration:none;color:inherit}
button,input,select,textarea{font:inherit}
button{appearance:none;-webkit-appearance:none;border:0;cursor:pointer}
input,select,textarea{font-size:13px}
::placeholder{color:#9aa7bb;opacity:1}
.page-shell{height:100dvh;display:flex;flex-direction:column;padding:10px 22px 14px;gap:8px;max-width:1680px;margin:0 auto;width:100%}
.site-header{height:48px;display:flex;align-items:center;justify-content:space-between;gap:12px;flex:0 0 auto}
.brand{display:flex;align-items:center;gap:9px;min-width:0}
.brand-mark{width:36px;height:36px;border-radius:13px;background:linear-gradient(135deg,var(--blue),#67b7ff);color:white;display:grid;place-items:center;font-weight:900;font-size:22px;box-shadow:var(--shadow2)}
.brand-text{display:flex;flex-direction:column;gap:0;min-width:0}.brand-text strong{font-size:17px;line-height:1.4}.brand-text small{font-size:10.5px;color:var(--muted);white-space:nowrap}
.top-nav{display:flex;gap:7px;align-items:center}.top-nav a,.back-link,.pager-btn,.section-heading button,.ghost{border:1px solid var(--line);background:rgba(255,255,255,.82);border-radius:999px;padding:7px 13px;color:#334155;font-size:12.5px;box-shadow:0 3px 12px rgba(15,23,42,.035);transition:.16s ease}.top-nav a:hover,.back-link:hover,.pager-btn:hover,.section-heading button:hover,.ghost:hover{border-color:#adc5fa;background:#f2f7ff;color:var(--blue2);transform:translateY(-1px)}
.app-root{min-height:0;flex:1}.view{height:100%;min-height:0}.hidden{display:none!important}
.home-view{display:flex;flex-direction:column;gap:10px}.hero-section{height:132px;border:1px solid var(--line);border-radius:22px;background:linear-gradient(135deg,rgba(255,255,255,.94),rgba(244,249,255,.88));box-shadow:var(--shadow);display:grid;grid-template-columns:minmax(0,1fr) minmax(300px,500px);align-items:center;gap:18px;padding:18px 30px}.hero-section h1{margin:0 0 6px;font-size:32px;letter-spacing:-.8px;line-height:1.25}.hero-section h1 span{color:var(--blue)}.hero-text{margin:0;color:var(--muted);font-size:13.5px;line-height:1.8;max-width:740px}.search-wrap{height:46px;border:1px solid #bfd1f2;background:#fff;border-radius:16px;display:flex;align-items:center;gap:8px;padding:0 14px;box-shadow:0 10px 24px rgba(37,99,235,.10)}.search-wrap span{font-size:20px;color:#64748b}.search-wrap input,.category-controls input{border:0;outline:0;background:transparent;width:100%;height:100%;color:var(--text)}
.home-categories,.search-results{min-height:0;border:1px solid var(--line);background:var(--surface);border-radius:20px;padding:12px;box-shadow:var(--shadow);backdrop-filter:blur(12px)}.home-categories{flex:1}.search-results{height:244px}.section-heading{height:28px;display:flex;align-items:center;justify-content:space-between;margin-bottom:9px;gap:10px}.section-heading h2{margin:0;font-size:18px}.section-heading span,.meta-pill{font-size:11.5px;color:var(--muted);background:#f2f6fb;border:1px solid var(--line);border-radius:999px;padding:4px 9px;white-space:nowrap}
.category-grid{height:calc(100% - 37px);display:grid;grid-template-columns:repeat(6,minmax(0,1fr));grid-auto-rows:minmax(84px,1fr);gap:10px}.category-card,.tool-card{border:1px solid var(--line);background:var(--card-gradient);border-radius:18px;padding:10px;box-shadow:0 4px 14px rgba(15,23,42,.035);transition:transform .16s ease,border-color .16s ease,box-shadow .16s ease,background .16s ease;overflow:hidden}.category-card{display:grid;grid-template-rows:52px auto auto;align-items:center;justify-items:center;text-align:center;gap:4px;position:relative}.category-card:before{content:"";position:absolute;inset:8px;border-radius:15px;background:linear-gradient(135deg,rgba(37,99,235,.055),rgba(56,189,248,.035));opacity:0;transition:.16s ease;pointer-events:none}.category-card:hover:before{opacity:1}.category-card:hover,.tool-card:hover{transform:translateY(-2px);border-color:#aac4fa;box-shadow:0 13px 26px rgba(37,99,235,.12)}.icon,.big-icon{display:grid;place-items:center;background:linear-gradient(135deg,#eef5ff,#f8fbff);border:1px solid #edf3ff;border-radius:15px}.category-card .icon{width:50px;height:50px;font-size:28px;border-radius:17px;box-shadow:inset 0 1px 0 rgba(255,255,255,.8),0 8px 18px rgba(37,99,235,.10)}.category-card strong{font-size:15.2px;line-height:1.45;font-weight:900}.category-card small{font-size:11.2px;color:var(--muted);font-weight:700}
.category-view{display:flex;flex-direction:column;gap:9px}.category-head{border:1px solid var(--line);background:var(--surface);border-radius:20px;padding:10px 13px;box-shadow:var(--shadow);display:grid;grid-template-columns:auto minmax(0,1fr) minmax(280px,410px);align-items:center;gap:12px}.category-title-row{display:flex;align-items:center;gap:10px;min-width:0}.big-icon{width:44px;height:44px;font-size:25px;flex:0 0 auto}.category-title-row h1,.tool-title-card h1{margin:0;font-size:22px;line-height:1.45}.category-title-row p,.tool-title-card p{margin:2px 0 0;color:var(--muted);font-size:12.5px;line-height:1.65}.category-controls{height:39px;border:1px solid var(--line);border-radius:15px;background:#fff;display:flex;align-items:center;gap:8px;padding:0 11px}.tool-grid{display:grid;gap:9px}.category-grid-tools{flex:1;min-height:0;grid-template-columns:repeat(5,minmax(0,1fr));grid-template-rows:repeat(4,minmax(0,1fr))}.compact-grid{height:calc(100% - 37px);grid-template-columns:repeat(4,minmax(0,1fr));grid-template-rows:repeat(2,minmax(0,1fr))}.tool-card{display:flex;flex-direction:column;min-height:0}.tool-card-top{display:flex;align-items:center;justify-content:space-between;gap:8px}.tool-card .icon{width:34px;height:34px;font-size:18px}.tag{font-size:10.5px;color:var(--blue);background:#eff6ff;border:1px solid #dbeafe;border-radius:999px;padding:3px 8px;white-space:nowrap;max-width:110px;overflow:hidden;text-overflow:ellipsis}.tool-card h3{font-size:13.2px;margin:7px 0 4px;line-height:1.45}.tool-card p{font-size:11px;color:var(--muted);line-height:1.6;margin:0;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.open-label{margin-top:auto;color:var(--blue2);font-size:11px;padding-top:4px}.pagination{height:36px;display:flex;align-items:center;justify-content:center;gap:6px}.pager-btn{padding:6px 11px}.pager-btn.active{background:linear-gradient(135deg,var(--blue),#60a5fa);border-color:transparent;color:#fff;box-shadow:var(--shadow2)}
.tool-layout{height:100%;display:grid;grid-template-columns:220px minmax(380px,1fr) 330px;gap:10px}.tool-side,.tool-main,.result-box{min-height:0;border:1px solid var(--line);background:var(--surface);border-radius:20px;box-shadow:var(--shadow);backdrop-filter:blur(12px)}.tool-side{padding:12px;display:flex;flex-direction:column;gap:10px;overflow:hidden}.tool-title-card{display:flex;flex-direction:column;gap:8px;min-height:0}.tool-title-card .big-icon{width:50px;height:50px}.tool-title-card h1{font-size:20px}.tool-main{padding:12px;display:flex;flex-direction:column;gap:9px}.tool-form{min-height:0;flex:1;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-content:start;gap:9px;overflow:auto;padding-left:2px}.field{display:flex;flex-direction:column;gap:5px;min-width:0}.field.wide{grid-column:1/-1}.field label{font-size:11.7px;color:#334155;font-weight:850}.input-wrap{height:39px;display:flex;align-items:center;border:1px solid var(--line);background:#fff;border-radius:14px;overflow:hidden;transition:border-color .15s ease,box-shadow .15s ease,background .15s ease}.input-wrap.money-wrap{background:linear-gradient(180deg,#fff,#fbfdff)}.input-wrap:focus-within{border-color:#a9c3fa;box-shadow:0 0 0 3px rgba(37,99,235,.08)}.input-wrap input,.field textarea,.field select{border:0;outline:0;width:100%;background:transparent;color:var(--text)}.input-wrap input{height:100%;padding:0 11px}.numeric-input{direction:ltr;text-align:right;font-weight:760;letter-spacing:.1px}.field textarea{height:78px;resize:none;border:1px solid var(--line);border-radius:14px;padding:9px 11px;line-height:1.75;background:#fff}.field textarea:focus,.field select:focus{border-color:#a9c3fa;box-shadow:0 0 0 3px rgba(37,99,235,.08)}.field select{height:39px;border:1px solid var(--line);border-radius:14px;padding:0 10px;background:#fff}.unit-badge{height:100%;display:grid;place-items:center;min-width:54px;padding:0 10px;background:linear-gradient(180deg,#f1f6ff,#eaf2ff);color:#28569b;border-right:1px solid #d7e5fb;font-size:11.5px;font-weight:850;white-space:nowrap}.quick-fill{display:flex;flex-wrap:wrap;gap:7px;min-height:28px;align-items:center}.tool-form .quick-fill .quick-chip{appearance:none!important;-webkit-appearance:none!important;border:0!important;background:linear-gradient(135deg,#eff6ff,#ffffff)!important;color:#1d4ed8!important;border-radius:999px!important;padding:6px 11px!important;font-size:11px!important;font-weight:850!important;line-height:1.2!important;box-shadow:inset 0 0 0 1px #cfe0ff,0 7px 16px rgba(37,99,235,.10)!important;transition:transform .14s ease,box-shadow .14s ease,background .14s ease!important;min-height:27px!important}.tool-form .quick-fill .quick-chip:hover{background:linear-gradient(135deg,#dbeafe,#fff)!important;box-shadow:inset 0 0 0 1px #9ec0ff,0 10px 20px rgba(37,99,235,.15)!important;transform:translateY(-1px)!important}.tool-form .quick-fill .quick-chip:active{transform:translateY(0) scale(.98)!important}.hint{font-size:10.2px;color:#7c8798}.date-control{display:grid;grid-template-columns:78px 1fr;gap:6px}.date-mode,.date-combo{display:flex;gap:5px;align-items:center}.date-mode span{display:none}.date-mode select,.date-combo select{height:34px;border-radius:12px;border:1px solid var(--line);background:#fff;padding:0 8px;font-size:11.5px}.date-combo{display:grid;grid-template-columns:1fr .8fr .8fr}.form-actions{height:44px;display:flex;align-items:flex-end;gap:9px;flex:0 0 auto}.form-actions button{height:39px;border-radius:15px;font-weight:900;padding:0 20px;transition:.15s ease;letter-spacing:-.1px}#calculateButton{background:linear-gradient(135deg,#2563eb,#38bdf8);color:#fff;box-shadow:0 12px 24px rgba(37,99,235,.24),inset 0 1px 0 rgba(255,255,255,.25)}#calculateButton:hover{filter:brightness(1.04);transform:translateY(-1px)}#resetButton{border:1px solid #cfdcf1;background:linear-gradient(180deg,#fff,#f8fbff);color:#475569;box-shadow:0 8px 18px rgba(15,23,42,.06)}#resetButton:hover{background:#f3f7ff;border-color:#b8cefb;color:var(--blue2);transform:translateY(-1px)}
.result-box{padding:12px;overflow:hidden}.result-box.empty{display:grid;place-items:center;color:var(--muted)}.result-summary{font-size:16.5px;font-weight:900;line-height:1.75;background:linear-gradient(135deg,#f1f6ff,#f8fbff);border:1px solid #dce9ff;border-radius:17px;padding:11px;margin-bottom:9px}.result-items{display:grid;gap:7px;max-height:calc(100dvh - 225px);overflow:auto;padding-left:3px}.result-item{display:flex;align-items:center;justify-content:space-between;gap:8px;border:1px solid var(--line);border-radius:14px;background:#fff;padding:8px 10px}.result-item span:first-child{font-size:11.5px;color:var(--muted)}.result-item strong{font-size:13.2px;text-align:left;direction:ltr}.result-note{margin-top:9px;font-size:11.5px;color:#64748b;line-height:1.75}.result-html{margin-top:9px;max-height:160px;overflow:auto}.result-html pre{white-space:pre-wrap;direction:rtl;text-align:right;background:#f8fafc;border:1px solid var(--line);border-radius:14px;padding:10px}.error-box{border:1px solid #fecaca;background:#fff1f2;color:#be123c;border-radius:16px;padding:11px;line-height:1.75}.empty-state,.empty-result{border:1px dashed #cbd5e1;background:#f8fafc;border-radius:17px;padding:16px;text-align:center;color:var(--muted);grid-column:1/-1}
@media(max-width:1366px){
  .page-shell{padding:8px 16px 12px;gap:7px}.site-header{height:44px}.hero-section{height:118px;padding:14px 24px}.hero-section h1{font-size:28px}.hero-text{font-size:12.8px}.search-wrap{height:42px}.category-grid{gap:8px}.category-card{padding:8px}.category-card .icon{width:34px;height:34px;font-size:19px}.category-card strong{font-size:13px}.category-card small{font-size:10px}.category-grid-tools{gap:8px}.tool-card{padding:9px}.tool-card h3{font-size:12.6px}.tool-card p{font-size:10.6px}.tool-layout{grid-template-columns:200px minmax(360px,1fr) 310px}.tool-side,.tool-main,.result-box{border-radius:18px}.tool-title-card h1{font-size:18px}.tool-form{gap:8px}.input-wrap,.field select{height:37px}.form-actions{height:41px}.form-actions button{height:37px}.tool-form .quick-fill .quick-chip{padding:5px 10px!important;font-size:10.8px!important}
}
@media(max-width:1180px){.category-grid{grid-template-columns:repeat(5,minmax(0,1fr))}.category-grid-tools{grid-template-columns:repeat(4,minmax(0,1fr));grid-template-rows:repeat(5,minmax(0,1fr))}.tool-layout{grid-template-columns:190px minmax(330px,1fr) 290px}.category-head{grid-template-columns:auto 1fr;align-items:start}.category-controls{grid-column:1/-1}}
@media(max-width:920px){
  body{overflow:auto}.page-shell{height:auto;min-height:100dvh;padding:10px 10px 16px}.site-header{height:auto;align-items:flex-start}.brand-text small{display:none}.top-nav a{padding:7px 10px}.view{height:auto;min-height:0}.hero-section{height:auto;grid-template-columns:1fr;padding:16px;border-radius:20px}.hero-section h1{font-size:24px}.hero-text{font-size:12.5px}.search-wrap{height:44px}.home-categories,.search-results{height:auto;overflow:visible}.category-grid,.category-grid-tools,.compact-grid{height:auto;grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:auto;grid-auto-rows:auto}.category-card{min-height:92px}.category-head{grid-template-columns:1fr;padding:11px}.category-title-row{align-items:flex-start}.tool-layout{height:auto;grid-template-columns:1fr}.tool-side,.tool-main,.result-box{overflow:visible}.tool-title-card{display:grid;grid-template-columns:auto 1fr;align-items:center}.tool-title-card .meta-pill{grid-column:1/-1;width:max-content}.tool-title-card p{grid-column:1/-1}.tool-form{grid-template-columns:1fr;overflow:visible}.date-control{grid-template-columns:1fr}.date-combo{grid-template-columns:1fr 1fr 1fr}.result-items{max-height:none}.form-actions{position:sticky;bottom:8px;background:rgba(246,248,252,.86);backdrop-filter:blur(10px);padding:7px;border-radius:17px;height:auto;box-shadow:0 10px 28px rgba(15,23,42,.10)}.form-actions button{flex:1}.pagination{flex-wrap:wrap;height:auto;min-height:36px}.search-results .compact-grid{grid-template-columns:1fr}.quick-fill{gap:6px}.tool-form .quick-fill .quick-chip{font-size:11px!important;padding:6px 10px!important}
}
@media(max-width:520px){.page-shell{padding:8px}.site-header{gap:8px}.brand-mark{width:34px;height:34px}.brand-text strong{font-size:15px}.top-nav{gap:5px}.top-nav a{font-size:11.5px;padding:6px 8px}.category-grid,.category-grid-tools{grid-template-columns:1fr}.hero-section h1{font-size:21px}.section-heading h2{font-size:16px}.category-title-row h1,.tool-title-card h1{font-size:18px}.big-icon{width:40px;height:40px}.tool-main,.tool-side,.result-box{padding:10px}.result-summary{font-size:15px}.input-wrap,.field select{height:40px}.unit-badge{min-width:50px;font-size:11px}.tool-form .quick-fill .quick-chip{min-height:29px!important}.form-actions{gap:7px}.form-actions button{height:40px;padding:0 12px}}


/* v1.5 refinement: responsive cards, modern inputs and clearer date picker */
.category-card .icon,.tool-card .icon,.brand-mark{user-select:none}
.tool-card{border-radius:18px;background:linear-gradient(145deg,#fff,#f9fcff)}
.tool-card .icon{width:38px;height:38px;font-size:20px;border-radius:15px}
.tool-card h3{font-weight:900}
.input-wrap,.field select,.field textarea{border-color:#d6e3f7;background:linear-gradient(180deg,#fff,#fbfdff)}
.input-wrap input::placeholder,.field textarea::placeholder{color:#9aa8bd}
.unit-badge{background:linear-gradient(180deg,#eaf2ff,#dfeaff);color:#1e4f92;border-right:1px solid #cbdcf7;min-width:64px;font-weight:900}
.quick-fill{gap:8px;min-height:31px}
.tool-form .quick-fill .quick-chip{appearance:none!important;-webkit-appearance:none!important;border:0!important;background:linear-gradient(135deg,#ffffff,#eef5ff)!important;color:#1e40af!important;border-radius:14px!important;padding:7px 12px!important;font-size:11.5px!important;font-weight:900!important;line-height:1.15!important;box-shadow:inset 0 0 0 1px #c8dcff,0 8px 18px rgba(37,99,235,.12)!important;transition:transform .14s ease,box-shadow .14s ease,background .14s ease,color .14s ease!important;min-height:31px!important;letter-spacing:-.1px!important}.tool-form .quick-fill .quick-chip:hover{background:linear-gradient(135deg,#2563eb,#60a5fa)!important;color:#fff!important;box-shadow:0 10px 22px rgba(37,99,235,.22)!important;transform:translateY(-1px)!important}.tool-form .quick-fill .quick-chip:active{transform:translateY(0) scale(.98)!important}
.date-control{display:grid;grid-template-columns:92px 1fr;gap:7px;padding:7px;border:1px solid #d6e3f7;border-radius:15px;background:linear-gradient(135deg,#f9fcff,#eff6ff);box-shadow:inset 0 1px 0 rgba(255,255,255,.82)}.date-mode,.date-combo{display:flex;gap:6px;align-items:center}.date-mode:before{content:"تقویم";font-size:10.6px;color:#64748b;font-weight:850;margin-left:3px}.date-mode select,.date-combo select{height:36px;border-radius:12px;border:1px solid #cadbf4;background:#fff;padding:0 9px;font-size:12px;font-weight:850;color:#334155;box-shadow:0 3px 9px rgba(15,23,42,.035)}.date-combo{display:grid;grid-template-columns:1fr .86fr .86fr}.date-control + .input-wrap{margin-top:6px}
.form-actions{gap:10px}.form-actions button{border-radius:16px;font-size:13px}#calculateButton{background:linear-gradient(135deg,#1d4ed8,#38bdf8);box-shadow:0 14px 25px rgba(37,99,235,.25),inset 0 1px 0 rgba(255,255,255,.22)}#resetButton{background:linear-gradient(180deg,#fff,#f4f8ff);border:1px solid #c7d8f3;color:#334155}
@media(max-width:1366px){.category-grid{grid-auto-rows:minmax(78px,1fr);gap:8px}.category-card{grid-template-rows:46px auto auto;padding:8px}.category-card .icon{width:44px;height:44px;font-size:25px}.category-card strong{font-size:14.2px}.category-card small{font-size:10.8px}.tool-card .icon{width:35px;height:35px;font-size:18px}.quick-fill{min-height:29px}.date-control{padding:6px}.date-mode select,.date-combo select{height:34px}.unit-badge{min-width:58px}}
@media(max-width:920px){.category-grid,.category-grid-tools,.compact-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.category-card{min-height:108px;grid-template-rows:54px auto auto}.category-card .icon{width:52px;height:52px;font-size:29px}.category-card strong{font-size:15px}.date-control{grid-template-columns:1fr}.date-mode{justify-content:space-between}.date-mode:before{font-size:11px}.date-combo{grid-template-columns:1fr 1fr 1fr}.tool-main,.tool-side,.result-box{border-radius:18px}.tool-form .quick-fill .quick-chip{min-height:32px!important;font-size:11.5px!important}}
@media(max-width:520px){.category-grid,.category-grid-tools{grid-template-columns:1fr}.category-card{min-height:92px;grid-template-columns:56px 1fr auto;grid-template-rows:auto;text-align:right;justify-items:stretch;gap:10px;padding:12px}.category-card .icon{width:52px;height:52px}.category-card strong{align-self:end;font-size:15.3px}.category-card small{align-self:center;justify-self:end;background:#f1f6ff;border:1px solid #dbeafe;border-radius:999px;padding:4px 8px}.date-combo{grid-template-columns:1fr;gap:6px}.unit-badge{min-width:54px;font-size:10.8px}.tool-form .quick-fill .quick-chip{flex:1 1 auto}}

/* v1.6 refinement: live calculation, balanced cards, formula panel, and bidirectional converters */
*{font-family:inherit}
.category-card{padding:14px 12px;gap:7px;background:linear-gradient(145deg,#ffffff,#f7fbff);border-radius:20px}
.category-card .icon{width:58px!important;height:58px!important;font-size:32px!important;border-radius:20px!important;box-shadow:0 12px 24px rgba(37,99,235,.13),inset 0 1px 0 rgba(255,255,255,.9)}
.category-card strong{font-size:16.2px!important;line-height:1.45;letter-spacing:-.2px}
.category-card small{font-size:12px!important;color:#52647a}
.tool-card{padding:13px;border-radius:20px;min-height:118px}
.tool-card .icon{width:44px!important;height:44px!important;font-size:22px!important;border-radius:17px!important}
.tool-card h3{font-size:14.6px!important;line-height:1.5;margin-top:10px}
.tool-card p{font-size:12px!important;line-height:1.75}
.open-label{font-size:12px;font-weight:900}
.tool-layout{grid-template-columns:240px minmax(420px,1fr) 360px;align-items:start}
.tool-side,.tool-main,.result-box{border-radius:24px}
.tool-side{padding:16px}.tool-title-card h1{font-size:23px!important}.tool-title-card p{font-size:13.3px;line-height:1.85}.tool-title-card .big-icon{width:58px!important;height:58px!important;font-size:30px!important}
.tool-main{padding:18px;gap:14px;align-self:start}
.tool-form{flex:0 0 auto;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;overflow:visible;align-content:start}
.field{gap:7px}.field label{font-size:13.2px;color:#12213a;font-weight:950;letter-spacing:-.1px}.input-wrap,.field select{height:50px;border-radius:18px;background:linear-gradient(180deg,#fff,#fbfdff);border-color:#d3e0f3;box-shadow:0 5px 15px rgba(15,23,42,.04)}
.input-wrap input,.field select{font-size:19px;font-weight:900}.input-wrap input{padding:0 15px}.field select{padding:0 14px}.field textarea{min-height:110px;font-size:15px;font-weight:800;border-radius:18px;padding:12px 14px}
.numeric-input{font-size:22px!important;font-weight:950!important;letter-spacing:-.2px}.unit-badge{min-width:76px;font-size:12.5px;background:linear-gradient(180deg,#edf5ff,#e2edff);color:#174985}
.quick-fill{min-height:35px;gap:8px}.tool-form .quick-fill .quick-chip{border-radius:16px!important;min-height:34px!important;padding:8px 13px!important;font-size:12.3px!important;background:linear-gradient(135deg,#ffffff,#edf5ff)!important;box-shadow:inset 0 0 0 1px #bed5ff,0 8px 18px rgba(37,99,235,.11)!important}
.form-actions{display:none!important}.result-box{padding:16px;align-self:start}.result-summary{font-size:19px;padding:15px;border-radius:20px}.result-item{padding:11px 13px;border-radius:17px}.result-item span:first-child{font-size:13px}.result-item strong{font-size:15px}.empty-result{font-size:14px;line-height:1.9}
.formula-box{border:1px solid #d9e6f7;background:linear-gradient(145deg,#f8fbff,#eef6ff);border-radius:20px;padding:14px;box-shadow:inset 0 1px 0 rgba(255,255,255,.8)}
.formula-title{display:flex;align-items:center;gap:7px;margin-bottom:9px;color:#10203c}.formula-title span{color:#2563eb}.formula-title strong{font-size:14.2px;font-weight:950}.formula-content{direction:rtl;text-align:right;border:1px solid #dce7f7;background:#fff;border-radius:15px;padding:12px 13px;color:#1d4ed8;line-height:1.9;font-size:13.2px;font-weight:850;overflow:auto}
.converter-form{display:block!important}.converter-panel{display:grid;grid-template-columns:minmax(0,1fr) 52px minmax(0,1fr);align-items:end;gap:16px;border:1px dashed #cbdcf3;border-radius:22px;padding:18px;background:linear-gradient(145deg,#ffffff,#f7fbff)}.converter-side{display:flex;flex-direction:column;gap:9px}.converter-side label{font-size:13.2px;font-weight:950;color:#12213a}.converter-side select{height:50px;border-radius:17px;border:1px solid #d3e0f3;background:#fff;padding:0 14px;font-size:14px;font-weight:900;box-shadow:0 5px 15px rgba(15,23,42,.04)}.result-input{background:linear-gradient(180deg,#f4f8ff,#fff)}.swap-units{height:50px;width:50px;border-radius:50%;border:1px solid #bcd2f6;background:linear-gradient(135deg,#fff,#eaf3ff);color:#10203c;font-size:25px;font-weight:950;box-shadow:0 10px 22px rgba(37,99,235,.15);transition:.15s ease}.swap-units:hover{transform:rotate(180deg);background:linear-gradient(135deg,#2563eb,#60a5fa);color:white;border-color:transparent}
.date-control{padding:10px;border-radius:18px}.date-mode select,.date-combo select{height:42px;font-size:13px}.date-control + .input-wrap{margin-top:8px}
@media(max-width:1366px){.page-shell{padding:8px 14px 12px}.category-card .icon{width:52px!important;height:52px!important;font-size:29px!important}.category-card strong{font-size:15.4px!important}.tool-layout{grid-template-columns:215px minmax(390px,1fr) 330px;gap:9px}.tool-main{padding:14px}.tool-form{gap:11px}.input-wrap,.field select{height:46px}.numeric-input{font-size:20px!important}.tool-title-card h1{font-size:21px!important}.result-summary{font-size:17px}.converter-panel{gap:12px;padding:14px}.converter-side select{height:46px}.swap-units{width:46px;height:46px}.formula-box{padding:12px}.formula-content{font-size:12.8px;padding:10px 12px}}
@media(max-width:1020px){body{overflow:auto}.tool-layout{height:auto;grid-template-columns:1fr}.tool-side{display:block}.tool-title-card{display:grid;grid-template-columns:auto 1fr;gap:10px;align-items:center}.tool-title-card .meta-pill{width:max-content}.tool-title-card p{grid-column:1/-1}.tool-main,.result-box{align-self:stretch}.tool-form{grid-template-columns:1fr 1fr}.result-box{order:3}.formula-box{order:2}.category-grid,.category-grid-tools,.compact-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:620px){.page-shell{padding:8px}.site-header{align-items:center}.brand-text strong{font-size:15.5px}.top-nav a{font-size:11.5px;padding:6px 9px}.hero-section h1{font-size:24px}.hero-text{font-size:13px}.category-card{min-height:94px;grid-template-columns:62px 1fr auto;grid-template-rows:auto;text-align:right;justify-items:stretch;padding:13px}.category-card .icon{width:56px!important;height:56px!important;font-size:30px!important}.category-card strong{align-self:end;font-size:15.8px!important}.category-card small{align-self:center;justify-self:end}.tool-form{grid-template-columns:1fr}.input-wrap,.field select{height:48px}.input-wrap input,.field select{font-size:18px}.numeric-input{font-size:21px!important}.converter-panel{grid-template-columns:1fr;gap:12px}.swap-units{justify-self:center;transform:rotate(90deg)}.swap-units:hover{transform:rotate(270deg)}.result-summary{font-size:16.5px}.result-items{max-height:none}.formula-content{font-size:12.8px}.date-combo{grid-template-columns:1fr 1fr 1fr!important}}

/* v1.7: SEO, embed, article linking, and compact content sections */
.info-panel{max-width:1160px;margin:16px auto 0;background:linear-gradient(145deg,#ffffff,#f7fbff);border:1px solid #d9e6f7;border-radius:24px;padding:18px 20px;box-shadow:0 10px 28px rgba(15,23,42,.055)}
.panel-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:10px}.panel-head h2{font-size:21px;line-height:1.45;margin:0;color:#071a36;font-weight:950;letter-spacing:-.4px}.soft-text{margin:0;color:#53677f;font-size:13.5px;line-height:2}.soft-text.small{font-size:12.6px;color:#64748b}.more-details{margin-top:8px;border-top:1px solid #e5eefb;padding-top:8px}.more-details summary{cursor:pointer;color:#2563eb;font-weight:900;font-size:13px}.more-details p{color:#53677f;line-height:2;font-size:13px;margin:8px 0 0}.embed-code{width:100%;min-height:92px;resize:vertical;border:1px solid #d7e5f7;border-radius:18px;background:#fff;color:#1d4ed8;font-size:12.2px;line-height:1.9;direction:ltr;text-align:left;padding:12px 14px;box-shadow:inset 0 1px 2px rgba(15,23,42,.03)}.copy-embed{border:0;border-radius:14px;background:linear-gradient(135deg,#2563eb,#60a5fa);color:#fff;font-weight:950;padding:9px 14px;box-shadow:0 12px 22px rgba(37,99,235,.20);cursor:pointer;white-space:nowrap}.copy-embed:hover{transform:translateY(-1px)}.faq-list{display:grid;gap:8px}.faq-list details{border:1px solid #e2ebf8;background:#fff;border-radius:16px;padding:12px 14px}.faq-list summary{cursor:pointer;font-weight:950;color:#10203c}.faq-list p{color:#53677f;font-size:13px;line-height:2;margin:9px 0 0}.related-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}.related-grid .tool-card{min-height:116px}.tool-view{padding-bottom:28px}
.embed-mode{background:#f7fbff;overflow:auto}.embed-mode .embed-shell{max-width:820px;margin:0 auto;padding:14px}.embed-head{display:flex;align-items:center;gap:12px;margin-bottom:12px;background:linear-gradient(145deg,#fff,#f3f8ff);border:1px solid #dce7f7;border-radius:22px;padding:14px 16px;box-shadow:0 8px 24px rgba(15,23,42,.05)}.embed-head h1{font-size:23px;margin:0 0 6px;color:#061834;font-weight:950}.embed-head p{font-size:13px;line-height:1.8;margin:0;color:#5c7089}.embed-mode .tool-form{background:#fff;border:1px solid #dce7f7;border-radius:22px;padding:16px;box-shadow:0 8px 22px rgba(15,23,42,.04);margin-bottom:12px}.embed-mode .result-box,.embed-mode .formula-box{margin-top:12px}.embed-mode .tool-form{grid-template-columns:repeat(2,minmax(0,1fr))}.embed-mode .converter-form{display:block!important}.embed-mode .converter-panel{grid-template-columns:minmax(0,1fr) 50px minmax(0,1fr)}
@media(max-width:900px){.info-panel{margin-top:12px;border-radius:20px;padding:15px}.panel-head h2{font-size:18px}.related-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.embed-mode .tool-form{grid-template-columns:1fr}.embed-mode .converter-panel{grid-template-columns:1fr}.embed-mode .swap-units{justify-self:center;transform:rotate(90deg)}}
@media(max-width:560px){.info-panel{padding:13px;border-radius:18px}.panel-head{align-items:flex-start}.panel-head h2{font-size:16.5px}.soft-text{font-size:12.8px}.copy-embed{padding:8px 10px;font-size:12px}.related-grid{grid-template-columns:1fr}.embed-head{padding:12px}.embed-head h1{font-size:19px}.embed-mode .embed-shell{padding:8px}.embed-mode .tool-form{padding:12px;border-radius:18px}.embed-code{font-size:11px;min-height:112px}}

/* v1.8: global search, cleaner empty state, and improved content panels */
.site-header{position:relative;z-index:50}
.header-search{position:relative;flex:1;max-width:520px;height:42px;border:1px solid #cfe0f6;background:rgba(255,255,255,.92);border-radius:16px;display:flex;align-items:center;gap:8px;padding:0 13px;box-shadow:0 8px 22px rgba(37,99,235,.08);margin-inline:auto}
.header-search > span{font-size:19px;color:#64748b;line-height:1}.header-search input{border:0;outline:0;background:transparent;width:100%;height:100%;font-weight:800;color:#071a36}.header-search input::placeholder{color:#8ca0ba;font-weight:700}
.search-suggest{position:absolute;top:calc(100% + 8px);right:0;left:0;background:#fff;border:1px solid #d8e6f8;border-radius:18px;box-shadow:0 18px 45px rgba(15,23,42,.15);padding:7px;max-height:390px;overflow:auto;z-index:1000}.suggest-item{display:grid;grid-template-columns:38px 1fr;gap:9px;align-items:center;padding:9px 10px;border-radius:14px;text-decoration:none;color:#0f172a}.suggest-item:hover{background:linear-gradient(135deg,#eff6ff,#ffffff)}.suggest-icon{width:38px;height:38px;display:grid;place-items:center;border-radius:14px;background:#f1f6ff;font-size:20px}.suggest-item strong{display:block;font-size:13.5px;line-height:1.5}.suggest-item small{display:block;font-size:11px;color:#64748b;margin-top:1px}.suggest-empty{padding:13px;text-align:center;color:#64748b;font-size:13px}
.tool-layout.no-result{grid-template-columns:240px minmax(420px,1fr)}.tool-layout.no-result .result-box{display:none!important}.result-box.hidden{display:none!important}.lead-text{font-weight:800;color:#334155!important}.more-details[open]{background:rgba(255,255,255,.55);border:1px solid #e3edf9;border-radius:18px;padding:12px 14px;margin-top:10px}.more-details[open] summary{margin-bottom:4px}.more-details summary{list-style:none}.more-details summary::-webkit-details-marker{display:none}.more-details summary::before{content:'+';display:inline-grid;place-items:center;width:20px;height:20px;margin-left:7px;border-radius:8px;background:#eaf2ff;color:#2563eb;font-weight:950}.more-details[open] summary::before{content:'−'}
@media(max-width:1366px){.header-search{max-width:430px;height:39px}.tool-layout.no-result{grid-template-columns:215px minmax(390px,1fr)}}
@media(max-width:1020px){.site-header{position:sticky;top:0;background:rgba(246,248,252,.88);backdrop-filter:blur(12px);border-bottom:1px solid rgba(216,230,248,.75);padding-bottom:8px}.header-search{order:3;max-width:none;width:100%;flex-basis:100%;margin-top:8px}.tool-layout.no-result{grid-template-columns:1fr}.search-suggest{max-height:55dvh}}
@media(max-width:620px){.header-search{height:42px;border-radius:15px}.search-suggest{border-radius:16px}.suggest-item{grid-template-columns:34px 1fr;padding:8px}.suggest-icon{width:34px;height:34px;font-size:18px}.suggest-item strong{font-size:13px}.info-panel{margin-top:10px}.more-details[open]{padding:10px 12px}}

/* v1.9: single polished global search in the header */
.site-header{
  height:56px;
  display:flex;
  align-items:center;
  gap:18px;
  justify-content:space-between;
}
.brand{flex:0 0 auto;transition:transform .16s ease,opacity .16s ease}.brand:hover{transform:translateY(-1px)}
.header-search{
  flex:0 1 600px;
  width:min(600px,48vw);
  max-width:600px;
  height:46px;
  margin-inline-start:auto;
  margin-inline-end:0;
  border:1px solid rgba(157,180,217,.85);
  background:linear-gradient(180deg,rgba(255,255,255,.98),rgba(247,251,255,.96));
  border-radius:18px;
  box-shadow:0 12px 28px rgba(37,99,235,.10), inset 0 1px 0 rgba(255,255,255,.85);
  padding:0 14px;
}
.header-search:focus-within{
  border-color:#8fb3ff;
  box-shadow:0 14px 34px rgba(37,99,235,.15),0 0 0 4px rgba(37,99,235,.08), inset 0 1px 0 rgba(255,255,255,.9);
}
.header-search > span{
  width:28px;
  height:28px;
  display:grid;
  place-items:center;
  border-radius:11px;
  background:#eef5ff;
  color:#2563eb;
  font-size:18px;
  font-weight:950;
}
.header-search input{
  font-size:13.4px;
  font-weight:850;
  color:#071a36;
}
.header-search input::placeholder{color:#7f91aa;font-weight:750}
.search-suggest{
  top:calc(100% + 10px);
  right:0;
  left:0;
  border-radius:20px;
  border:1px solid rgba(194,211,237,.95);
  background:rgba(255,255,255,.98);
  box-shadow:0 22px 55px rgba(15,23,42,.17);
  padding:8px;
}
.suggest-item{
  grid-template-columns:42px 1fr;
  gap:10px;
  padding:10px 11px;
  border-radius:16px;
}
.suggest-item:hover{background:linear-gradient(135deg,#eef6ff,#ffffff);box-shadow:inset 0 0 0 1px #dbeafe}
.suggest-icon{width:42px;height:42px;border-radius:16px;font-size:22px;background:linear-gradient(135deg,#edf5ff,#ffffff);border:1px solid #e5efff}
.suggest-item strong{font-size:14px;font-weight:950}.suggest-item small{font-size:11.5px}
.hero-section{grid-template-columns:1fr;height:112px;padding:18px 26px}.hero-section h1{font-size:30px}.hero-text{max-width:900px}
.category-controls.category-meta-only{justify-content:flex-end;background:transparent;border:0;padding:0;height:auto}.category-controls.category-meta-only .meta-pill{font-size:12px;padding:6px 12px}
@media(max-width:1020px){
  .site-header{height:auto;min-height:56px;flex-wrap:wrap;padding-bottom:10px}
  .header-search{order:2;flex-basis:100%;width:100%;max-width:none;margin-top:4px}
  .hero-section{height:auto;min-height:108px}
}
@media(max-width:620px){
  .site-header{gap:10px;padding-bottom:8px}
  .brand-mark{width:34px;height:34px;border-radius:12px;font-size:20px}
  .brand-text strong{font-size:16px}.brand-text small{font-size:10px}
  .header-search{height:44px;border-radius:17px;padding:0 12px}
  .header-search input{font-size:12.8px}
  .search-suggest{max-height:58dvh;border-radius:18px}
  .hero-section{padding:15px 16px;border-radius:18px}.hero-section h1{font-size:24px}.hero-text{font-size:12.8px}
  .category-head{grid-template-columns:1fr;align-items:start}.category-controls.category-meta-only{justify-content:flex-start}
}


/* v2.0: search suggestions fixed on v1.9 base - no span inheritance, full usable width */
.header-search{overflow:visible;isolation:isolate}
.header-search > span{
  flex:0 0 auto!important;
}
.search-suggest{
  direction:rtl!important;
  box-sizing:border-box!important;
  width:min(760px, calc(100vw - 28px))!important;
  max-width:calc(100vw - 28px)!important;
  min-width:min(420px, calc(100vw - 28px))!important;
  right:50%!important;
  left:auto!important;
  transform:translateX(50%)!important;
  z-index:9999!important;
  overflow-x:hidden!important;
  padding:8px!important;
}
.search-suggest .suggest-item{
  box-sizing:border-box!important;
  width:100%!important;
  min-width:0!important;
  display:grid!important;
  grid-template-columns:46px minmax(0,1fr)!important;
  align-items:center!important;
  gap:12px!important;
  padding:10px 12px!important;
  text-align:right!important;
  white-space:normal!important;
}
.search-suggest .suggest-icon{
  width:46px!important;
  height:46px!important;
  min-width:46px!important;
  flex:none!important;
  display:grid!important;
  place-items:center!important;
  border-radius:16px!important;
  padding:0!important;
  line-height:1!important;
  box-sizing:border-box!important;
}
.search-suggest .suggest-item > span:not(.suggest-icon){
  width:auto!important;
  height:auto!important;
  min-width:0!important;
  max-width:100%!important;
  display:block!important;
  place-items:normal!important;
  border-radius:0!important;
  background:transparent!important;
  border:0!important;
  box-shadow:none!important;
  padding:0!important;
  color:inherit!important;
  line-height:normal!important;
  font-size:inherit!important;
  text-align:right!important;
  overflow:visible!important;
}
.search-suggest .suggest-item strong,
.search-suggest .suggest-item small{
  display:block!important;
  min-width:0!important;
  max-width:100%!important;
  width:100%!important;
  text-align:right!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
}
.search-suggest .suggest-item strong{
  color:#0f172a!important;
  font-size:14.2px!important;
  font-weight:950!important;
  line-height:1.75!important;
  white-space:normal!important;
}
.search-suggest .suggest-item small{
  color:#64748b!important;
  font-size:11.5px!important;
  line-height:1.7!important;
  white-space:nowrap!important;
}
@media(max-width:620px){
  .header-search{width:100%!important;max-width:none!important}
  .search-suggest{
    width:calc(100vw - 16px)!important;
    max-width:calc(100vw - 16px)!important;
    min-width:0!important;
    right:50%!important;
    transform:translateX(50%)!important;
    max-height:60dvh!important;
    border-radius:18px!important;
  }
  .search-suggest .suggest-item{
    grid-template-columns:42px minmax(0,1fr)!important;
    gap:10px!important;
    padding:10px!important;
  }
  .search-suggest .suggest-icon{
    width:42px!important;
    height:42px!important;
    min-width:42px!important;
    font-size:20px!important;
  }
  .search-suggest .suggest-item strong{font-size:13.8px!important;line-height:1.8!important;white-space:normal!important}
  .search-suggest .suggest-item small{font-size:11.2px!important}
}

/* v2.1: Fra Tools, formula explanation, geometry preview, embed footer */
.formula-explain{margin:9px 0 0;color:#50647e;font-size:13px;line-height:1.9}
.shape-preview{margin-top:14px;border:1px solid #dbe8f7;border-radius:20px;background:linear-gradient(145deg,#ffffff,#f5f9ff);padding:12px;box-shadow:0 10px 24px rgba(15,23,42,.05)}
.shape-preview svg{display:block;width:100%;max-height:230px;direction:ltr}
.shape-preview svg polygon,.shape-preview svg rect,.shape-preview svg circle,.shape-preview svg ellipse{fill:#eaf2ff;stroke:#2563eb;stroke-width:3;filter:drop-shadow(0 8px 16px rgba(37,99,235,.13))}
.shape-preview svg path{fill:none;stroke:#2563eb;stroke-width:3;stroke-linecap:round;stroke-linejoin:round;filter:drop-shadow(0 8px 16px rgba(37,99,235,.13))}
.shape-preview svg text{fill:#1e3a8a;font-size:13px;font-weight:900;font-family:inherit;direction:rtl}
.shape-caption{margin-top:8px;color:#53677f;font-size:12.5px;line-height:1.8;text-align:center}
.embed-footer{margin:14px auto 4px;text-align:center;font-size:12.8px;color:#64748b}
.embed-footer a{display:inline-flex;align-items:center;justify-content:center;gap:6px;color:#2563eb;text-decoration:none;font-weight:900;border:1px solid #dbe8f7;background:#fff;border-radius:999px;padding:9px 14px;box-shadow:0 8px 18px rgba(15,23,42,.04)}
.embed-footer a:hover{background:#eff6ff;border-color:#bfdbfe}
@media(max-width:560px){.formula-explain{font-size:12.5px}.shape-preview{padding:10px;border-radius:16px}.shape-caption{font-size:12px}.embed-footer a{width:100%}}


/* v2.2: visible embed panel on every tool page and full geometry previews */
.tool-view{overflow:auto!important;padding-bottom:34px!important}
.tool-view .info-panel{display:block}
.embed-panel .embed-code{min-height:118px}
.result-box{overflow:visible!important}
.result-html{max-height:none!important;overflow:visible!important}
.shape-preview{overflow:hidden!important;max-width:100%;padding:10px 12px!important}
.shape-preview svg{display:block;width:100%;height:auto;max-height:210px!important;aspect-ratio:320/190;overflow:visible}
.embed-mode .result-html{max-height:none!important;overflow:visible!important}
.embed-mode .shape-preview svg{max-height:200px!important}
.embed-mode .embed-shell{padding-bottom:18px}
@media(max-width:1020px){.tool-layout{height:auto!important}.tool-view{height:auto!important;min-height:0!important}.shape-preview svg{max-height:190px!important}}
@media(max-width:620px){.shape-preview{padding:9px!important;border-radius:16px!important}.shape-preview svg{max-height:170px!important}.embed-panel .embed-code{min-height:132px}.tool-view .info-panel{margin-top:12px}}

/* v2.3: keep tool content, explanations, embed code and related panels close together */
.tool-view{
  display:flex!important;
  flex-direction:column!important;
  gap:10px!important;
  overflow:auto!important;
  padding-bottom:24px!important;
}
.tool-layout{
  height:auto!important;
  min-height:0!important;
  align-items:start!important;
  grid-template-columns:220px minmax(380px,1fr) 330px;
}
.tool-layout.no-result{
  grid-template-columns:220px minmax(380px,1fr)!important;
}
.tool-side,.tool-main,.result-box{
  align-self:start!important;
  width:100%;
}
.tool-main{
  min-height:0!important;
}
.tool-form{
  flex:0 0 auto!important;
  overflow:visible!important;
  max-height:none!important;
}
.formula-box{
  margin-top:0!important;
}
.result-box{
  min-height:0!important;
}
.result-box.empty{min-height:0!important}
.tool-view .info-panel{
  width:100%;
  max-width:none;
  margin:0!important;
}
.tool-view .info-panel:first-of-type{
  margin-top:0!important;
}
.tool-layout + .info-panel{
  margin-top:0!important;
}
.embed-panel .embed-code{
  min-height:86px!important;
}
.panel-head{margin-bottom:7px!important}
.soft-text{line-height:1.85!important}
.more-details{margin-top:6px!important;padding-top:6px!important}

@media(max-width:1366px){
  .tool-layout{grid-template-columns:215px minmax(390px,1fr) 330px!important;gap:9px!important}
  .tool-layout.no-result{grid-template-columns:215px minmax(390px,1fr)!important}
}
@media(max-width:1020px){
  .tool-layout,.tool-layout.no-result{grid-template-columns:1fr!important;gap:10px!important}
  .tool-side,.tool-main,.result-box{align-self:stretch!important}
  .tool-view{gap:9px!important;padding-bottom:18px!important}
  .tool-view .info-panel{border-radius:19px!important}
}
@media(max-width:620px){
  .tool-view{gap:8px!important;padding-bottom:14px!important}
  .tool-layout{gap:8px!important}
  .tool-side,.tool-main,.result-box,.tool-view .info-panel{border-radius:17px!important}
  .tool-view .info-panel{padding:12px!important}
  .embed-panel .embed-code{min-height:100px!important}
}


/* v2.4: restore and compact the tool explanation / embed / FAQ panels */
.tool-info-stack{
  display:grid!important;
  grid-template-columns:minmax(0,1.05fr) minmax(0,.95fr)!important;
  gap:10px!important;
  align-items:start!important;
  width:100%!important;
}
.tool-info-stack .info-panel{
  display:block!important;
  max-width:none!important;
  width:100%!important;
  margin:0!important;
  padding:14px 16px!important;
  min-height:0!important;
}
.tool-info-stack .related-panel{
  grid-column:1 / -1!important;
}
.tool-info-stack .panel-head{
  margin-bottom:6px!important;
}
.tool-info-stack .panel-head h2{
  font-size:17px!important;
  line-height:1.55!important;
}
.tool-info-stack .soft-text{
  font-size:12.8px!important;
  line-height:1.8!important;
}
.tool-info-stack .more-details[open]{
  margin-top:7px!important;
  padding:9px 12px!important;
}
.tool-info-stack .more-details p,
.tool-info-stack .faq-list p{
  font-size:12.7px!important;
  line-height:1.85!important;
}
.tool-info-stack .faq-list{
  gap:7px!important;
}
.tool-info-stack .faq-list details{
  padding:10px 12px!important;
}
.tool-info-stack .embed-code{
  min-height:78px!important;
  max-height:130px!important;
}
.tool-info-stack .related-grid{
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
}
.tool-view{
  gap:10px!important;
}
@media(max-width:1020px){
  .tool-info-stack{grid-template-columns:1fr!important;gap:9px!important}
  .tool-info-stack .related-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}
@media(max-width:620px){
  .tool-info-stack{gap:8px!important}
  .tool-info-stack .info-panel{padding:12px!important;border-radius:17px!important}
  .tool-info-stack .panel-head{align-items:center!important}
  .tool-info-stack .panel-head h2{font-size:15.8px!important}
  .tool-info-stack .related-grid{grid-template-columns:1fr!important}
  .tool-info-stack .embed-code{min-height:92px!important;max-height:160px!important}
}


/* v2.5: stable tool-page layout, no FAQ, and clean non-overlapping panels */
.faq-panel,#faqBox{display:none!important}
.tool-view{
  height:100%!important;
  min-height:0!important;
  overflow-y:auto!important;
  overflow-x:hidden!important;
  display:block!important;
  padding-bottom:26px!important;
  scroll-padding-top:70px;
}
.tool-layout{
  position:relative!important;
  z-index:2!important;
  display:grid!important;
  grid-template-columns:220px minmax(0,1fr) 330px!important;
  gap:12px!important;
  align-items:start!important;
  height:auto!important;
  min-height:0!important;
  margin:0 0 12px 0!important;
  overflow:visible!important;
}
.tool-layout.no-result{
  grid-template-columns:220px minmax(0,1fr)!important;
}
.tool-side,.tool-main,.result-box{
  position:relative!important;
  z-index:1!important;
  align-self:start!important;
  width:100%!important;
  height:auto!important;
  min-height:0!important;
  overflow:visible!important;
}
.tool-main{display:flex!important;flex-direction:column!important;gap:10px!important}
.tool-form{
  flex:0 0 auto!important;
  max-height:none!important;
  overflow:visible!important;
  align-content:start!important;
}
.result-box{max-height:none!important;overflow:visible!important}
.result-items{max-height:none!important;overflow:visible!important}
.result-html{max-height:none!important;overflow:visible!important}
.formula-box{margin:0!important;position:relative!important;z-index:1!important;overflow:visible!important}
.tool-info-stack{
  position:relative!important;
  z-index:1!important;
  clear:both!important;
  display:grid!important;
  grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;
  gap:12px!important;
  align-items:start!important;
  width:100%!important;
  margin:0!important;
  padding:0!important;
}
.tool-info-stack .info-panel{
  display:block!important;
  position:relative!important;
  z-index:1!important;
  width:100%!important;
  max-width:none!important;
  min-width:0!important;
  margin:0!important;
  padding:15px 17px!important;
  overflow:hidden!important;
  border-radius:20px!important;
}
.tool-info-stack .content-panel,
.tool-info-stack .embed-panel{grid-column:auto!important}
.tool-info-stack .related-panel{
  grid-column:1 / -1!important;
  margin-top:0!important;
}
.tool-info-stack .panel-head{margin-bottom:7px!important}
.tool-info-stack .panel-head h2{font-size:17px!important;line-height:1.55!important;margin:0!important}
.tool-info-stack .soft-text{font-size:12.8px!important;line-height:1.85!important;margin:0!important}
.tool-info-stack .more-details{margin-top:8px!important;padding-top:8px!important}
.tool-info-stack .more-details[open]{margin-top:8px!important;padding:10px 12px!important}
.tool-info-stack .more-details p{font-size:12.7px!important;line-height:1.85!important;margin-top:7px!important}
.tool-info-stack .embed-code{
  min-height:82px!important;
  max-height:150px!important;
  resize:vertical!important;
  overflow:auto!important;
}
.tool-info-stack .related-grid{
  display:grid!important;
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:12px!important;
}
@media(max-width:1366px){
  .tool-layout{grid-template-columns:210px minmax(0,1fr) 315px!important;gap:10px!important;margin-bottom:10px!important}
  .tool-layout.no-result{grid-template-columns:210px minmax(0,1fr)!important}
  .tool-info-stack{gap:10px!important}
}
@media(max-width:1020px){
  .tool-view{height:auto!important;overflow:visible!important;padding-bottom:18px!important}
  .tool-layout,.tool-layout.no-result{grid-template-columns:1fr!important;gap:10px!important;margin-bottom:10px!important}
  .tool-side,.tool-main,.result-box{align-self:stretch!important}
  .tool-info-stack{grid-template-columns:1fr!important;gap:10px!important}
  .tool-info-stack .related-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}
@media(max-width:620px){
  .tool-layout{gap:8px!important;margin-bottom:8px!important}
  .tool-info-stack{gap:8px!important}
  .tool-info-stack .info-panel{padding:12px!important;border-radius:17px!important}
  .tool-info-stack .panel-head{align-items:center!important}
  .tool-info-stack .panel-head h2{font-size:15.8px!important}
  .tool-info-stack .related-grid{grid-template-columns:1fr!important}
  .tool-info-stack .embed-code{min-height:94px!important;max-height:170px!important}
}
