html,body{height:100%}
body{min-height:100vh;display:flex;flex-direction:column;margin:0;padding:0;background:var(--bg);color:var(--text);
  font-family:Inter,system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial,sans-serif;line-height:1.45}
:root{--bg:#0f1115;--card:#141822;--ring:#2b3140;--text:#e7ebf3;--muted:#9eabc0;--brand:#7c5cff;--brand2:#b79c5a;--input:#192033;--btn:#1b2332;--btn-hover:#232d40;--shadow:0 10px 24px rgba(0,0,0,.35);--title:800}
html[data-theme="light"]{--bg:#f7f8fb;--card:#ffffff;--ring:#e6eaf0;--text:#0f1623;--muted:#5a6576;--brand:#5b6cff;--brand2:#b79c5a;--input:#eef2f8;--btn:#f3f6fb;--btn-hover:#e9edf6;--shadow:0 8px 20px rgba(0,0,0,.06)}
a{color:inherit;text-decoration:none}.wrap{max-width:1120px;margin:0 auto;padding:0 14px}.muted{color:var(--muted)}h1{font-weight:var(--title)}
.site-header{border-bottom:1px solid var(--ring);position:sticky;top:0;background:color-mix(in oklab,var(--bg) 85%,transparent);backdrop-filter:blur(8px);z-index:10}
.site-header .wrap{display:flex;justify-content:space-between;align-items:center;height:64px}.brand a{display:inline-flex;align-items:center;gap:10px}
.logo-img{width:26px;height:26px}.brand-title{font-weight:800}.brand-sub{opacity:.9}.top-links{display:flex;align-items:center;gap:12px}
.theme-toggle{display:inline-flex;align-items:center;gap:8px;border:1px solid var(--ring);background:var(--btn);padding:8px 10px;border-radius:999px;cursor:pointer;box-shadow:var(--shadow)}
.theme-toggle:hover{background:var(--btn-hover)}.theme-toggle .dot{width:10px;height:10px;border-radius:50%;background:linear-gradient(135deg,var(--brand),var(--brand2))}
main{flex:1 0 auto}.site-footer{flex-shrink:0;border-top:1px solid var(--ring);padding:12px 0;color:var(--muted);font-size:14px}
.hero{padding:24px 0;border-bottom:1px solid var(--ring)}.hero h1{margin:0 0 12px;font-size:28px}
.search-row{display:grid;grid-template-columns:1fr auto;gap:12px;align-items:center}.search-shell{display:flex;align-items:center;gap:10px;border:1px solid var(--ring);background:var(--card);border-radius:14px;padding:8px 10px;box-shadow:var(--shadow)}
.search-icon{font-size:18px;opacity:.85}.search-input{flex:1;display:flex;align-items:center;gap:8px}
.search-input input{width:100%;background:var(--input);border:1px solid var(--ring);color:var(--text);padding:12px;border-radius:10px;font-size:16px}
.search-clear{border:1px solid var(--ring);background:var(--btn);color:var(--muted);height:40px;width:40px;border-radius:10px;cursor:pointer}
.search-clear:hover{color:var(--text);background:var(--btn-hover)}.filters{display:flex;gap:8px}
.filters select{height:40px;border-radius:10px;border:1px solid var(--ring);background:var(--card);color:var(--text);padding:0 10px}
.tools-grid{display:grid;gap:14px;grid-template-columns:repeat(4,1fr);padding:22px 0 32px}
@media (max-width:1100px){.tools-grid{grid-template-columns:repeat(3,1fr)}}
@media (max-width:760px){.search-row{grid-template-columns:1fr}.tools-grid{grid-template-columns:repeat(2,1fr)}}
@media (max-width:480px){.tools-grid{grid-template-columns:1fr}}
.card{background:var(--card);border:1px solid var(--ring);border-radius:16px;padding:14px;display:flex;flex-direction:column;gap:8px;transition:transform .08s,border-color .12s, box-shadow .12s;position:relative;box-shadow:var(--shadow)}
.card:hover{transform:translateY(-2px);border-color:var(--brand);box-shadow:0 16px 30px rgba(0,0,0,.18)}.card .top{display:flex;align-items:center;gap:10px}
.card .icon{font-size:22px}.card .title{font-weight:800}.card .desc{color:var(--muted);font-size:14px}.badges{display:flex;flex-wrap:wrap;gap:6px;margin-top:6px}
.badge{font-size:11px;color:color-mix(in oklab,var(--text) 85%, #cfd8e3);background:var(--btn);border:1px solid var(--ring);padding:4px 8px;border-radius:999px}
.card .btn{position:absolute;inset:0;display:block}
.palette-0{border-image:linear-gradient(120deg,#7c5cff,#b79c5a) 1;border-width:1px;border-style:solid}
.palette-1{border-image:linear-gradient(120deg,#5b6cff,#58b3ff) 1;border-width:1px;border-style:solid}
.palette-2{border-image:linear-gradient(120deg,#ff7ac3,#ffd166) 1;border-width:1px;border-style:solid}
.palette-3{border-image:linear-gradient(120deg,#67e8f9,#7c5cff) 1;border-width:1px;border-style:solid}
.palette-4{border-image:linear-gradient(120deg,#a3e635,#34d399) 1;border-width:1px;border-style:solid}
html[data-theme="light"] .palette-0{background:#fff;border-color:#e6eaf0}
html[data-theme="light"] .palette-1{background:#fcfdff;border-color:#e6eaf0}
html[data-theme="light"] .palette-2{background:#fffdfa;border-color:#e6eaf0}
html[data-theme="light"] .palette-3{background:#f8fbff;border-color:#e6eaf0}
html[data-theme="light"] .palette-4{background:#f9fffb;border-color:#e6eaf0}
button,input,select,textarea{font:inherit}
button{background:var(--btn);border:1px solid var(--ring);color:var(--text);padding:10px 12px;border-radius:10px;cursor:pointer}
button:hover{background:var(--btn-hover)}
textarea,input[type="number"],input[type="date"],input[type="datetime-local"],input[type="search"],input[type="text"]{width:100%;background:var(--card);border:1px solid var(--ring);border-radius:12px;color:var(--text);padding:10px}
label{display:flex;gap:8px;align-items:center}
.chat-launcher{position:fixed;right:18px;bottom:18px;z-index:20;background:linear-gradient(135deg,var(--brand),var(--brand2));color:#fff;border:none;border-radius:999px;padding:12px 14px;box-shadow:var(--shadow);cursor:pointer;display:flex;align-items:center;gap:8px;font-weight:700}
.chat-panel{position:fixed;right:18px;bottom:78px;z-index:20;width:360px;max-width:92vw;background:var(--card);border:1px solid var(--ring);border-radius:14px;box-shadow:var(--shadow);display:none;flex-direction:column;overflow:hidden}
.chat-header{display:flex;align-items:center;justify-content:space-between;padding:10px 12px;border-bottom:1px solid var(--ring);font-weight:800}
.chat-body{padding:12px;display:flex;flex-direction:column;gap:10px;max-height:50vh;overflow:auto}
.msg{display:flex;gap:8px}.msg .bubble{padding:10px 12px;border-radius:12px;border:1px solid var(--ring);max-width:80%}
.msg.user{justify-content:flex-end}.msg.user .bubble{background:var(--btn)}.msg.bot .bubble{background:transparent}
.chat-input{display:flex;gap:8px;padding:10px;border-top:1px solid var(--ring);background:var(--card)}.chat-input input{flex:1;background:var(--input);border:1px solid var(--ring);border-radius:10px;color:var(--text);padding:10px}
