/* SizeConvertly — core styles */
:root {
  --bg: #07070b;
  --bg-2: #0b0c12;
  --panel: #101119;
  --panel-2: #14161f;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #eef0f6;
  --muted: #9aa1b4;
  --violet: #a855f7;
  --violet-soft: #c084fc;
  --green: #22d39a;
  --green-soft: #4ade9f;
  --pink: #ec4899;
  --amber: #f59e0b;
  --cyan: #22d3ee;
  --blue: #60a5fa;
  --indigo: #818cf8;
  --radius: 14px;
  --radius-lg: 20px;
  --shadow: 0 18px 50px -24px rgba(0, 0, 0, 0.9);
  --glow-violet: 0 0 0 1px rgba(168, 85, 247, 0.28), 0 12px 40px -18px rgba(168, 85, 247, 0.45);
  --max: 1240px;
  --font: "Inter", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}
[data-theme="light"] {
  --bg: #f7f7fb;
  --bg-2: #ffffff;
  --panel: #ffffff;
  --panel-2: #f2f3f8;
  --line: rgba(10, 12, 20, 0.1);
  --line-strong: rgba(10, 12, 20, 0.18);
  --text: #14161f;
  --muted: #5a6072;
  --shadow: 0 14px 40px -26px rgba(10, 12, 20, 0.45);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--violet-soft); outline-offset: 3px; border-radius: 6px; }
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--violet); color: #fff; padding: 10px 16px; border-radius: 0 0 10px 0;
}
.skip-link:focus { left: 0; }
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.grad { background: linear-gradient(100deg, var(--violet-soft), var(--violet)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.grad-g { background: linear-gradient(100deg, var(--green-soft), var(--green)); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------------------------------------------------------------- header */
.site-header {
  position: sticky; top: 0; z-index: 90;
  background: color-mix(in oklab, var(--bg) 88%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.header-row { display: flex; align-items: center; gap: 14px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.brand-mark {
  width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center;
  background: linear-gradient(140deg, var(--violet), var(--pink)); color: #fff;
  box-shadow: 0 8px 24px -10px rgba(168, 85, 247, 0.8);
}
.brand-mark svg { width: 20px; height: 20px; }
.brand-name { font-weight: 800; font-size: 1.06rem; letter-spacing: -0.02em; white-space: nowrap; }
.brand-name span { color: var(--violet-soft); }
.main-nav { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.main-nav a {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 13px; border-radius: 999px; font-size: 0.87rem; font-weight: 500;
  color: var(--muted); border: 1px solid transparent; transition: all 0.18s ease; white-space: nowrap;
}
.main-nav a svg { width: 15px; height: 15px; flex-shrink: 0; }
.main-nav a:hover { color: var(--text); background: var(--panel); border-color: var(--line); }
.main-nav a[aria-current="page"] { color: var(--text); background: var(--panel-2); border-color: var(--line-strong); }
.header-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.main-nav + .header-actions { margin-left: 10px; }
.btn-ghost-green {
  display: inline-flex; align-items: center; gap: 7px; padding: 9px 18px; border-radius: 999px;
  border: 1px solid color-mix(in oklab, var(--green) 55%, transparent); color: var(--green-soft);
  background: color-mix(in oklab, var(--green) 8%, transparent); font-size: 0.87rem; font-weight: 600;
  transition: all 0.18s ease; cursor: pointer;
}
.btn-ghost-green:hover { background: color-mix(in oklab, var(--green) 16%, transparent); box-shadow: 0 0 24px -8px var(--green); }
.icon-btn {
  width: 38px; height: 38px; display: grid; place-items: center; border-radius: 999px;
  border: 1px solid var(--line); background: var(--panel); cursor: pointer; color: var(--muted);
  transition: all 0.18s ease;
}
.icon-btn:hover { color: var(--text); border-color: var(--line-strong); }
.icon-btn svg { width: 17px; height: 17px; }
.nav-toggle { display: none; }
.mobile-nav { display: none; border-top: 1px solid var(--line); padding: 12px 0 18px; }
.mobile-nav.open { display: block; }
.mobile-nav a {
  display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-radius: 12px;
  color: var(--muted); font-weight: 500; border: 1px solid transparent;
}
.mobile-nav a svg { width: 16px; height: 16px; }
.mobile-nav a:hover, .mobile-nav a[aria-current="page"] { color: var(--text); background: var(--panel); border-color: var(--line); }

@media (max-width: 1080px) {
  .main-nav { display: none; }
  .nav-toggle { display: grid; }
  .header-actions { margin-left: auto; }
}

/* ------------------------------------------------------------------ hero */
.hero { position: relative; padding: 72px 0 26px; text-align: center; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -40% 20% auto; height: 420px;
  background: radial-gradient(closest-side, rgba(168, 85, 247, 0.16), transparent 70%);
  pointer-events: none;
}
.hero > * { position: relative; }
.badge-pill {
  display: inline-flex; align-items: center; gap: 9px; padding: 8px 18px; border-radius: 999px;
  border: 1px solid color-mix(in oklab, var(--green) 40%, transparent);
  color: var(--green-soft); font-size: 0.82rem; font-weight: 600;
  background: color-mix(in oklab, var(--green) 7%, transparent);
}
.badge-pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px var(--green); }
.hero h1 {
  margin: 26px auto 0; max-width: 15ch; font-size: clamp(2.1rem, 6.2vw, 4rem);
  line-height: 1.06; letter-spacing: -0.035em; font-weight: 800;
}
.hero .lede { margin: 20px auto 0; max-width: 660px; color: var(--muted); font-size: clamp(0.98rem, 2.2vw, 1.08rem); }
.stats { display: flex; justify-content: center; flex-wrap: wrap; gap: clamp(28px, 7vw, 72px); margin-top: 34px; }
.stat-value { font-size: clamp(1.6rem, 4vw, 2rem); font-weight: 800; letter-spacing: -0.03em; }
.stat-label { font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); font-weight: 600; }

/* ---------------------------------------------------------------- search */
.search-zone { position: relative; max-width: 640px; margin: 36px auto 0; }
.search-box {
  display: flex; align-items: center; gap: 12px; padding: 0 18px; height: 58px;
  border-radius: var(--radius-lg); border: 1px solid var(--line-strong); background: var(--panel);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.search-box:focus-within { border-color: var(--violet); box-shadow: var(--glow-violet); }
.search-box svg { width: 19px; height: 19px; color: var(--muted); flex-shrink: 0; }
.search-box input, .search-box input[type="text"] { flex: 1; min-width: 0; background: none; border: 0; padding: 0; border-radius: 0; box-shadow: none; outline: none; font-size: 1rem; }
.search-box input::placeholder { color: var(--muted); }
.search-clear { display: none; background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 1.2rem; line-height: 1; padding: 4px; }
.search-clear.show { display: block; }
.search-hint { margin-top: 12px; font-size: 0.86rem; color: var(--muted); text-align: center; }
.search-results {
  display: none; position: absolute; left: 0; right: 0; top: calc(100% + 10px); z-index: 60;
  max-height: 380px; overflow-y: auto; border-radius: var(--radius-lg);
  border: 1px solid var(--line-strong); background: var(--panel-2); box-shadow: var(--shadow);
}
.search-results.open { display: block; }
.search-results a { display: block; padding: 14px 20px; border-bottom: 1px solid var(--line); text-align: center; }
.search-results a:last-child { border-bottom: 0; }
.search-results a:hover, .search-results a:focus { background: color-mix(in oklab, var(--violet) 12%, transparent); }
.sr-title { font-weight: 700; font-size: 0.97rem; }
.sr-desc { color: var(--muted); font-size: 0.85rem; margin-top: 2px; }
.sr-cat { font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--violet-soft); margin-top: 4px; }
.search-empty { padding: 22px; text-align: center; color: var(--muted); font-size: 0.9rem; }

/* ------------------------------------------------------------ latest bar */
.latest-bar { border-block: 1px solid var(--line); background: var(--bg-2); margin-top: 44px; }
.latest-inner { display: flex; align-items: center; gap: 0; }
.latest-flag {
  display: inline-flex; align-items: center; gap: 7px; padding: 14px 18px; flex-shrink: 0;
  font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase; font-weight: 700; color: var(--green);
  border-right: 1px solid var(--line); background: var(--bg-2); z-index: 2;
}
.latest-flag .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 8px var(--green); }
.latest-track { display: flex; gap: 0; overflow-x: auto; scrollbar-width: none; }
.latest-track::-webkit-scrollbar { display: none; }
.latest-track a {
  padding: 14px 22px; white-space: nowrap; font-size: 0.9rem; color: var(--muted);
  border-right: 1px solid var(--line); transition: color 0.18s ease, background 0.18s ease;
}
.latest-track a:hover { color: var(--text); background: var(--panel); }

/* --------------------------------------------------------------- section */
.section { padding: 62px 0; }
.section-head { max-width: 720px; margin-bottom: 34px; }
.section-head.center { margin-inline: auto; text-align: center; }
.eyebrow { font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--violet-soft); font-weight: 700; }
h2 { font-size: clamp(1.5rem, 3.6vw, 2.1rem); letter-spacing: -0.028em; margin: 10px 0 0; line-height: 1.2; }
h3 { font-size: 1.16rem; letter-spacing: -0.02em; margin: 0 0 8px; }
.section-head p { color: var(--muted); margin: 12px 0 0; }

.cat-block { margin-bottom: 46px; }
.cat-head {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 14px;
  margin-bottom: 18px;
}
.cat-id { display: flex; min-width: 0; align-items: center; gap: 14px; }
.cat-icon { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; flex-shrink: 0; color: #fff; }
.cat-icon svg { width: 21px; height: 21px; }
.c-pink { background: linear-gradient(140deg, #f472b6, #db2777); }
.c-violet { background: linear-gradient(140deg, #c084fc, #7c3aed); }
.c-green { background: linear-gradient(140deg, #4ade9f, #059669); }
.c-amber { background: linear-gradient(140deg, #fbbf24, #d97706); }
.c-cyan { background: linear-gradient(140deg, #67e8f9, #0891b2); }
.c-blue { background: linear-gradient(140deg, #93c5fd, #2563eb); }
.c-indigo { background: linear-gradient(140deg, #a5b4fc, #4f46e5); }
.cat-title { font-size: clamp(1.15rem, 2.6vw, 1.45rem); font-weight: 800; letter-spacing: -0.025em; }
.cat-desc { color: var(--muted); font-size: 0.9rem; margin-top: 2px; }
.count-badge {
  flex-shrink: 0; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line-strong);
  background: var(--panel); font-size: 0.78rem; font-weight: 600; color: var(--muted);
}
.tool-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(255px, 1fr)); }
.tool-card {
  display: block; padding: 18px; border-radius: var(--radius); border: 1px solid var(--line);
  background: var(--panel); transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.tool-card:hover { transform: translateY(-3px); border-color: color-mix(in oklab, var(--violet) 45%, transparent); box-shadow: var(--glow-violet); }
.tool-card h3 { font-size: 0.99rem; font-weight: 700; margin-bottom: 6px; }
.tool-card p { margin: 0; color: var(--muted); font-size: 0.86rem; line-height: 1.55; }
.tool-card .tc-cat { margin-top: 10px; font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--violet-soft); font-weight: 600; }

.cat-tiles { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.cat-tile {
  display: flex; gap: 14px; padding: 18px; border-radius: var(--radius);
  border: 1px solid var(--line); background: var(--panel); transition: all 0.2s ease;
}
.cat-tile:hover { border-color: var(--line-strong); transform: translateY(-3px); }

/* ---------------------------------------------------------------- footer */
.site-footer { border-top: 1px solid var(--line); background: var(--bg-2); padding: 52px 0 26px; margin-top: 40px; }
.footer-grid { display: grid; gap: 32px; grid-template-columns: 1.6fr repeat(3, 1fr); }
.footer-grid h4 { font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin: 0 0 14px; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.footer-grid a { color: var(--muted); font-size: 0.9rem; }
.footer-grid a:hover { color: var(--text); }
.footer-about { color: var(--muted); font-size: 0.9rem; max-width: 34ch; margin: 14px 0 0; }
.footer-bottom {
  margin-top: 34px; padding-top: 20px; border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between;
  color: var(--muted); font-size: 0.84rem;
}
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 460px) { .footer-grid { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------- ad slots */
.ad-slot {
  margin: 40px auto; padding: 18px; min-height: 100px; display: grid; place-items: center;
  border: 1px dashed var(--line); border-radius: var(--radius); color: var(--muted);
  font-size: 0.74rem; letter-spacing: 0.14em; text-transform: uppercase; background: var(--bg-2);
}

/* ------------------------------------------------------------- articles */
.page-head { padding: 46px 0 8px; }
.breadcrumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: 0.82rem; color: var(--muted); }
.breadcrumbs a:hover { color: var(--text); }
.breadcrumbs span[aria-current] { color: var(--violet-soft); }
h1.page-title { font-size: clamp(1.8rem, 4.6vw, 2.7rem); letter-spacing: -0.032em; line-height: 1.14; margin: 16px 0 0; }
.page-lede { color: var(--muted); margin: 14px 0 0; max-width: 70ch; }
.prose { max-width: 74ch; }
.prose h2 { margin-top: 40px; }
.prose h3 { margin-top: 26px; font-size: 1.05rem; }
.prose p, .prose li { color: var(--muted); }
.prose ul, .prose ol { padding-left: 20px; }
.prose a { color: var(--violet-soft); text-decoration: underline; text-underline-offset: 3px; }
.panel { border: 1px solid var(--line); background: var(--panel); border-radius: var(--radius-lg); padding: 22px; }
.faq-item { border-bottom: 1px solid var(--line); padding: 16px 0; }
.faq-item:last-child { border-bottom: 0; }
.faq-item summary { cursor: pointer; font-weight: 650; list-style: none; display: flex; justify-content: space-between; gap: 14px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; color: var(--violet-soft); font-size: 1.2rem; line-height: 1; }
.faq-item[open] summary::after { content: "–"; }
.faq-item p { margin: 10px 0 0; color: var(--muted); }
.toc { border-left: 2px solid var(--line-strong); padding-left: 16px; }
.toc ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.toc a { color: var(--muted); font-size: 0.9rem; }
.post-meta { display: flex; flex-wrap: wrap; gap: 14px; color: var(--muted); font-size: 0.85rem; margin-top: 14px; }
.post-cover {
  height: clamp(150px, 26vw, 260px); border-radius: var(--radius-lg); margin: 26px 0;
  border: 1px solid var(--line);
  background: radial-gradient(120% 120% at 15% 15%, rgba(168, 85, 247, 0.35), transparent 60%),
    radial-gradient(120% 120% at 85% 80%, rgba(34, 211, 154, 0.28), transparent 60%), var(--panel);
}
.two-col { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 40px; align-items: start; }
@media (max-width: 900px) { .two-col { grid-template-columns: 1fr; } }
.card-list { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }

/* ------------------------------------------------------------- filters */
.filter-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0; }
.chip {
  padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--panel); color: var(--muted); font-size: 0.85rem; cursor: pointer; transition: all 0.18s ease;
}
.chip:hover { color: var(--text); border-color: var(--line-strong); }
.chip.active { color: var(--text); border-color: var(--violet); background: color-mix(in oklab, var(--violet) 16%, transparent); }
.inline-search {
  width: 100%; padding: 14px 18px; border-radius: var(--radius); border: 1px solid var(--line-strong);
  background: var(--panel); outline: none;
}
.inline-search:focus { border-color: var(--violet); box-shadow: var(--glow-violet); }
.result-count { color: var(--muted); font-size: 0.88rem; margin: 10px 0 18px; }

/* ------------------------------------------------------------- contact */
.form-grid { display: grid; gap: 16px; grid-template-columns: 1fr 1fr; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 7px; }
input[type="text"], input[type="email"], input[type="number"], select, textarea {
  width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line-strong);
  background: var(--panel); outline: none; transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
input:focus, select:focus, textarea:focus { border-color: var(--violet); box-shadow: var(--glow-violet); }
textarea { min-height: 150px; resize: vertical; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 999px; border: 1px solid transparent; cursor: pointer;
  font-weight: 650; font-size: 0.92rem; transition: all 0.18s ease;
}
.btn-primary { background: linear-gradient(120deg, var(--violet), var(--pink)); color: #fff; }
.btn-primary:hover { box-shadow: 0 12px 34px -14px var(--violet); transform: translateY(-1px); }
.btn-outline { border-color: var(--line-strong); background: var(--panel); color: var(--text); }
.btn-outline:hover { border-color: var(--violet); }
.note { font-size: 0.85rem; color: var(--muted); }
