:root {
  --brand: #4338ca;
  --brand-2: #6366f1;
  --accent: #f59e0b;
  --ink: #111827;
  --ink-2: #374151;
  --muted: #6b7280;
  --line: #e5e7eb;
  --bg: #f6f7fb;
  --card: #ffffff;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(17, 24, 39, .05), 0 4px 16px rgba(17, 24, 39, .06);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 16px/1.65 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; color: var(--ink); background: var(--bg); }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
img, svg { vertical-align: middle; }
h1, h2, h3 { line-height: 1.25; letter-spacing: -.01em; }
h2 { font-size: 1.5rem; margin: 2.2rem 0 1rem; }
h3 { font-size: 1.1rem; }
code { background: #eef2ff; padding: .1em .35em; border-radius: 5px; font-size: .92em; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 820px; }
.center { text-align: center; }
.muted { color: var(--muted); }

/* header */
.site-header { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.25rem; color: var(--ink); letter-spacing: -.02em; }
.logo:hover { text-decoration: none; }
.main-nav { display: flex; align-items: center; gap: 4px; }
.main-nav > a, .dropdown-btn { color: var(--ink-2); font-weight: 600; font-size: .95rem; padding: 8px 12px; border-radius: 8px; background: none; border: 0; cursor: pointer; font-family: inherit; }
.main-nav > a:hover, .dropdown-btn:hover { background: #eef2ff; color: var(--brand); text-decoration: none; }
.dropdown { position: relative; }
.dropdown-menu { display: none; position: absolute; right: 0; top: 100%; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 12px 40px rgba(17,24,39,.14); padding: 20px; grid-template-columns: repeat(3, 210px); gap: 18px 24px; }
.dropdown:hover .dropdown-menu, .dropdown:focus-within .dropdown-menu { display: grid; }
.dd-title { font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; margin-bottom: 6px; }
.dd-col a { display: flex; align-items: center; gap: 8px; color: var(--ink-2); padding: 5px 6px; border-radius: 6px; font-size: .93rem; }
.dd-col a:hover { background: #f3f4f6; text-decoration: none; }
.menu-btn { display: none; background: none; border: 0; padding: 8px; cursor: pointer; }
.menu-btn span { display: block; width: 22px; height: 2px; background: var(--ink); margin: 5px 0; border-radius: 2px; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: var(--brand); color: #fff; font-weight: 700; border: 0; border-radius: 10px; padding: 11px 20px; cursor: pointer; font-size: 1rem; font-family: inherit; transition: background .15s, transform .05s; }
.btn:hover { background: #3730a3; text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-big { padding: 15px 34px; font-size: 1.1rem; border-radius: 12px; box-shadow: 0 6px 18px rgba(67, 56, 202, .3); }
.btn-small { padding: 6px 14px; font-size: .9rem; }
.btn-ghost { background: #fff; color: var(--brand); border: 1.5px solid #c7d2fe; }
.btn-ghost:hover { background: #eef2ff; }
.btn.disabled { opacity: .4; pointer-events: none; }
.link-btn { background: none; border: 0; color: var(--muted); cursor: pointer; font: inherit; font-size: .9rem; text-decoration: underline; }

/* hero */
.hero { background: radial-gradient(1200px 400px at 50% -50px, #e0e7ff, transparent), var(--bg); text-align: center; padding: 56px 0 24px; }
.hero h1 { font-size: clamp(1.9rem, 4.5vw, 3rem); margin: 0 0 14px; font-weight: 800; }
.hl { background: linear-gradient(90deg, var(--brand), #7c3aed); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { font-size: 1.15rem; color: var(--ink-2); max-width: 660px; margin: 0 auto; }

/* tool grid */
.tools-section { padding-bottom: 20px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 26px 0 22px; }
.chip { border: 1px solid var(--line); background: #fff; color: var(--ink-2); font: inherit; font-weight: 600; font-size: .92rem; padding: 8px 16px; border-radius: 99px; cursor: pointer; }
.chip:hover { border-color: #c7d2fe; color: var(--brand); }
.chip.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.cat-title { font-size: 1rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); margin: 32px 0 12px; }
.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.tool-cell { display: flex; }
.tool-cell > .tool-card { flex: 1; }
.tool-card { display: flex; flex-direction: column; gap: 6px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; color: var(--ink); transition: transform .15s, box-shadow .15s, border-color .15s; }
.tool-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--c) 40%, white); text-decoration: none; }
.tool-icon { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; color: var(--c); background: color-mix(in srgb, var(--c) 12%, white); margin-bottom: 6px; }
.tool-name { font-weight: 700; font-size: 1.08rem; }
.tool-short { color: var(--muted); font-size: .93rem; line-height: 1.45; }

/* why */
.why { background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-top: 48px; padding: 20px 0 40px; }
.why h2 { text-align: center; }
.why-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 28px; }
.why-ico { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: #eef2ff; color: var(--brand); }
.why-item h3 { margin: 12px 0 6px; }
.why-item p { margin: 0; color: var(--ink-2); font-size: .96rem; }
.home-guide .guide-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.home-guide li { margin-bottom: 6px; }

/* blog cards */
.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.post-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; color: var(--ink); }
.post-card:hover { box-shadow: var(--shadow); text-decoration: none; }
.post-card h2, .post-card h3 { font-size: 1.15rem; margin: 6px 0 8px; }
.post-card p { color: var(--muted); margin: 0; font-size: .95rem; }
.post-meta { color: var(--muted); font-size: .85rem; }

/* tool page */
.tool-hero { text-align: center; padding: 44px 0 30px; background: radial-gradient(900px 340px at 50% -40px, color-mix(in srgb, var(--c) 14%, white), transparent), var(--bg); }
.tool-hero-ico { width: 64px; height: 64px; border-radius: 16px; display: inline-grid; place-items: center; color: var(--c); background: color-mix(in srgb, var(--c) 14%, white); }
.tool-hero h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin: 14px 0 8px; font-weight: 800; }
.tool-box { background: #fff; border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); padding: 26px; margin-top: 26px; text-align: left; }
.drop { border: 2px dashed #c7d2fe; border-radius: 14px; padding: 40px 20px; text-align: center; transition: background .15s, border-color .15s; }
.drop.over { background: #eef2ff; border-color: var(--brand); }
.drop.compact { padding: 16px; }
.drop.compact .btn-big { padding: 10px 20px; font-size: 1rem; box-shadow: none; }
.drop-hint { color: var(--muted); font-size: .88rem; margin: 12px 0 0; }
.file-list { list-style: none; padding: 0; margin: 16px 0 0; }
.file-list li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 8px; background: #fafafa; }
.fname { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; font-size: .95rem; }
.fsize { color: var(--muted); font-size: .85rem; }
.factions { display: flex; gap: 4px; }
.factions button { width: 30px; height: 30px; border: 1px solid var(--line); background: #fff; border-radius: 8px; cursor: pointer; font-size: .9rem; }
.factions button:hover:not(:disabled) { background: #eef2ff; }
.factions button:disabled { opacity: .35; cursor: default; }
.options { margin-top: 18px; display: grid; gap: 16px; }
.opt label { display: block; font-weight: 700; font-size: .93rem; margin-bottom: 6px; }
.opt select, .opt input[type=text], .opt input[type=password], .opt input[type=number] { width: 100%; padding: 11px 12px; border: 1px solid #d1d5db; border-radius: 10px; font: inherit; background: #fff; }
.opt input[type=color] { width: 60px; height: 40px; border: 1px solid #d1d5db; border-radius: 8px; padding: 2px; background: #fff; }
.opt input[type=range] { width: 100%; accent-color: var(--brand); }
.opt small { color: var(--muted); }
.radios { display: grid; gap: 8px; }
.radio { display: flex !important; align-items: center; gap: 8px; font-weight: 500 !important; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; cursor: pointer; }
.radio input { accent-color: var(--brand); }
.options .btn-big { justify-self: center; margin-top: 6px; }
.progress { text-align: center; padding: 20px 0; }
.bar { height: 10px; background: #eef2ff; border-radius: 99px; overflow: hidden; }
.bar span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--brand-2), var(--brand)); transition: width .2s; }
.result { text-align: center; padding: 10px 0; }
.result-title { font-size: 1.4rem; font-weight: 800; margin: 0; }
.result-meta { color: var(--muted); margin: 4px 0 18px; }
.result-actions { display: flex; justify-content: center; gap: 20px; margin-top: 16px; }
.error { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; border-radius: 10px; padding: 10px 14px; margin: 14px 0 0; }
.privacy-note { color: var(--muted); font-size: .88rem; margin-top: 14px; display: flex; gap: 6px; align-items: center; justify-content: center; }

/* content */
.content { padding: 30px 20px 10px; }
.intro { font-size: 1.1rem; color: var(--ink-2); }
.steps { counter-reset: s; list-style: none; padding: 0; }
.steps li { counter-increment: s; position: relative; padding: 4px 0 14px 48px; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 32px; height: 32px; border-radius: 50%; background: var(--brand); color: #fff; font-weight: 700; display: grid; place-items: center; }
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.feature { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.feature h3 { margin: 0 0 6px; }
.feature p { margin: 0; color: var(--ink-2); font-size: .95rem; }
.faq { background: #fff; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 10px; padding: 0 18px; }
.faq summary { cursor: pointer; font-weight: 700; padding: 14px 0; list-style: none; position: relative; padding-right: 24px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0; top: 12px; font-size: 1.3rem; color: var(--brand); }
.faq[open] summary::after { content: "–"; }
.faq p { margin: 0 0 16px; color: var(--ink-2); }
.related { padding-bottom: 20px; }

/* pages */
.page { padding: 40px 20px 30px; }
.page h1 { font-size: clamp(1.8rem, 4vw, 2.4rem); margin-top: 0; }
.legal h2 { font-size: 1.2rem; margin-top: 1.8rem; }
.contact-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 22px; }
.contact-card p { margin: 6px 0; }
.crumbs { margin: 0 0 6px; font-size: .9rem; }
.post-body { font-size: 1.06rem; }
.post-body h2 { font-size: 1.35rem; }
.post-body li { margin-bottom: 6px; }

/* footer */
.site-footer { background: #111827; color: #d1d5db; margin-top: 60px; padding: 44px 0 20px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 30px; }
.site-footer h4 { color: #fff; margin: 4px 0 12px; font-size: .95rem; }
.site-footer a { display: block; color: #d1d5db; font-size: .93rem; padding: 3px 0; }
.site-footer a:hover { color: #fff; }
.logo-light, .logo-light span { color: #fff !important; }
.muted-light { color: #9ca3af; font-size: .92rem; max-width: 320px; }
.footer-bottom { border-top: 1px solid #1f2937; margin-top: 30px; padding-top: 18px; font-size: .85rem; color: #9ca3af; }

.cookie-bar { position: fixed; left: 16px; right: 16px; bottom: 16px; max-width: 560px; margin: 0 auto; background: #111827; color: #e5e7eb; border-radius: 12px; padding: 12px 16px; display: flex; gap: 14px; align-items: center; z-index: 100; box-shadow: 0 10px 30px rgba(0,0,0,.25); font-size: .92rem; }
.cookie-bar[hidden] { display: none; }
.cookie-bar p { margin: 0; flex: 1; }
.cookie-bar a { color: #a5b4fc; }

@media (max-width: 860px) {
  .menu-btn { display: block; }
  .main-nav { display: none; position: absolute; top: 64px; left: 0; right: 0; background: #fff; flex-direction: column; align-items: stretch; padding: 10px 16px 16px; border-bottom: 1px solid var(--line); box-shadow: 0 10px 20px rgba(0,0,0,.06); max-height: calc(100vh - 64px); overflow: auto; }
  .nav-open .main-nav { display: flex; }
  .dropdown-btn { width: 100%; text-align: left; }
  .dropdown-menu { position: static; display: grid; grid-template-columns: 1fr; box-shadow: none; border: 0; padding: 6px 12px; }
  .home-guide .guide-cols { grid-template-columns: 1fr; gap: 0; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .tool-box { padding: 18px; }
}
@media (max-width: 520px) {
  .tool-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .tool-card { padding: 14px; }
  .tool-short { display: none; }
  .footer-grid { grid-template-columns: 1fr; }
}
