@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;600;700&family=Inter:wght@400;500;600;700;800&display=swap");

/* ============================================================
   ToolVault v2 — warm neo-brutalist design system
   cream base · ink borders · hard shadows · candy accents
   ============================================================ */
:root {
  --bg: #faf6ef;
  --surface: #fffdf8;
  --ink: #1b1826;
  --text: #454153;
  --text-2: #716c80;
  --border: rgba(27, 24, 38, .9);
  --border-soft: rgba(27, 24, 38, .14);
  --violet: #6c4cf1;
  --pink: #ff4d8d;
  --orange: #ff8a3c;
  --coral: #ff5436;
  --lime: #b9f24b;
  --lime-deep: #3e7a10;
  --mint: #d9f5e4;
  --mint-deep: #178a50;
  --peach: #ffe3d6;
  --peach-deep: #a03c12;
  --lavender: #e5deff;
  --lavender-deep: #5134c2;
  --sky: #dbeeff;
  --sky-deep: #0f5fa8;
  --butter: #fff0c2;
  --butter-deep: #8a6203;
  --blush: #ffdce8;
  --blush-deep: #b8245c;
  --acid: #e4f8c9;
  --acid-deep: #4c7a00;
  --lilac: #eae3ff;
  --lilac-deep: #5b3fd6;
  --grad: linear-gradient(115deg, var(--violet) 0%, var(--pink) 45%, var(--orange) 100%);
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 4px 4px 0 rgba(27, 24, 38, .9);
  --shadow-lg: 7px 7px 0 rgba(27, 24, 38, .9);
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --display: "Space Grotesk", var(--font);
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  background:
    radial-gradient(1200px 500px at 85% -100px, rgba(108, 76, 241, .08), transparent 60%),
    radial-gradient(900px 420px at -10% 120px, rgba(255, 138, 60, .09), transparent 55%),
    var(--bg);
  color: var(--ink);
  line-height: 1.7;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

.container { max-width: 1120px; margin: 0 auto; padding: 0 22px; }
a { color: var(--ink); text-decoration: none; }
a:hover { text-decoration: none; }
h1, h2, h3 { font-family: var(--display); line-height: 1.2; letter-spacing: -.02em; }
h1 { font-size: 2.3rem; margin: .2em 0; font-weight: 700; }
h2 { font-size: 1.5rem; margin: 1.8em 0 .6em; }
h3 { font-size: 1.1rem; margin: 1.4em 0 .4em; }
p { margin: .7em 0; color: var(--text); }
strong { color: var(--ink); }
code { font-family: var(--mono); background: var(--lilac); padding: .15em .45em; border-radius: 6px; font-size: .88em; color: var(--lilac-deep); }

.grad-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* ---------- header ---------- */
.site-header {
  background: rgba(250, 246, 239, .82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1.5px solid var(--border);
  position: sticky; top: 0; z-index: 50;
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand {
  font-family: var(--display);
  font-weight: 700; font-size: 1.2rem; display: flex; align-items: center; gap: 10px;
}
.brand .logo-dot {
  width: 30px; height: 30px; border-radius: 9px; background: var(--grad);
  display: inline-flex; align-items: center; justify-content: center; color: #fff; font-size: 15px;
  border: 1.5px solid var(--ink); transform: rotate(-6deg); box-shadow: 2px 2px 0 var(--ink);
}
.site-nav { display: flex; gap: 8px; align-items: center; }
.site-nav a {
  color: var(--ink); font-weight: 600; font-size: .9rem;
  padding: 7px 14px; border-radius: 999px; border: 1.5px solid transparent;
  transition: border-color .15s, background .15s;
}
.site-nav a:hover { border-color: var(--ink); background: var(--surface); }

/* ---------- footer ---------- */
.site-footer {
  border-top: 1.5px solid var(--border); margin-top: 72px; padding: 48px 0 30px;
  background: var(--ink); color: #cfc9dd; font-size: .92rem;
}
.site-footer h4 { color: #fff; font-family: var(--display); }
.site-footer a { color: #e8e3f5; }
.site-footer a:hover { color: var(--lime); text-decoration: underline; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 30px; }
.footer-grid h4 { margin: 0 0 10px; font-size: .85rem; text-transform: uppercase; letter-spacing: .07em; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin: 7px 0; }
.footer-bottom { margin-top: 30px; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.14); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }

/* ---------- hero ---------- */
.hero { padding: 64px 0 34px; text-align: center; }
.hero h1 { font-size: 3.1rem; margin-bottom: 14px; max-width: 860px; margin-left: auto; margin-right: auto; }
.hero p { color: var(--text-2); max-width: 620px; margin: 0 auto 26px; font-size: 1.1rem; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--lime); color: var(--ink); font-size: .8rem; font-weight: 700;
  padding: 6px 16px; border-radius: 999px; margin-bottom: 18px;
  border: 1.5px solid var(--ink); box-shadow: 3px 3px 0 var(--ink);
  transform: rotate(-1.5deg);
}

/* ---------- home categories ---------- */
.cat-section { margin: 44px 0; }
.cat-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 6px; flex-wrap: wrap; }
.cat-head h2 { margin: 0; }
.cat-head .count {
  font-size: .74rem; font-weight: 700; color: var(--ink);
  background: var(--butter); border: 1.5px solid var(--ink); padding: 2px 10px; border-radius: 999px;
}
.cat-desc { color: var(--text-2); font-size: .96rem; margin: 0 0 18px; max-width: 720px; }

.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(252px, 1fr)); gap: 18px; }
.tool-card {
  background: var(--surface); border: 1.5px solid var(--border); border-radius: var(--radius);
  padding: 20px; display: flex; flex-direction: column; gap: 8px;
  transition: transform .18s ease, box-shadow .18s ease;
  box-shadow: var(--shadow);
}
.tool-card:hover { transform: translate(-3px, -3px); box-shadow: var(--shadow-lg); }
.tool-card .tc-icon {
  width: 42px; height: 42px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center; font-size: 19px; font-weight: 700;
  font-family: var(--display); border: 1.5px solid var(--ink);
  transform: rotate(-4deg); margin-bottom: 4px;
}
.tool-card h3 { margin: 4px 0 0; font-size: 1.04rem; }
.tool-card p { margin: 0; font-size: .86rem; color: var(--text-2); line-height: 1.55; }
.tool-card.disabled { opacity: .45; pointer-events: none; box-shadow: none; }
.tool-card .soon {
  font-size: .72rem; font-weight: 700; color: var(--ink);
  background: var(--butter); border: 1.5px solid var(--ink);
  padding: 2px 10px; border-radius: 999px; align-self: flex-start;
}

/* per-category pastel icon tiles */
.tc-icon.cat-text-content-tools { background: var(--lavender); color: var(--lavender-deep); }
.tc-icon.cat-images-editing-tools { background: var(--peach); color: var(--peach-deep); }
.tc-icon.cat-online-calculators { background: var(--mint); color: var(--mint-deep); }
.tc-icon.cat-unit-converter-tools { background: var(--sky); color: var(--sky-deep); }
.tc-icon.cat-binary-converter-tools { background: var(--butter); color: var(--butter-deep); }
.tc-icon.cat-website-management-tools { background: var(--blush); color: var(--blush-deep); }
.tc-icon.cat-development-tools { background: var(--acid); color: var(--acid-deep); }
.tc-icon.cat-other-tools { background: var(--lilac); color: var(--lilac-deep); }

/* bento value props */
.value-props { display: grid; grid-template-columns: repeat(12, 1fr); gap: 18px; margin: 56px 0 8px; }
.value-props .vp {
  border: 1.5px solid var(--border); border-radius: var(--radius); padding: 24px;
  background: var(--surface); box-shadow: var(--shadow);
  grid-column: span 3;
}
.value-props .vp:nth-child(1) { grid-column: span 5; background: var(--lavender); }
.value-props .vp:nth-child(2) { grid-column: span 3; background: var(--peach); }
.value-props .vp:nth-child(3) { grid-column: span 4; background: var(--mint); }
.value-props .vp:nth-child(4) { grid-column: span 12; background: var(--butter); display: flex; align-items: center; gap: 20px; }
.value-props .vp:nth-child(4) p { margin: 0; }
.value-props .vp h3 { margin: 10px 0 6px; font-size: 1.05rem; }
.value-props .vp p { margin: 0; font-size: .92rem; color: var(--text); }
.value-props .vp .vp-icon { font-size: 26px; }
@media (max-width: 900px) {
  .value-props .vp, .value-props .vp:nth-child(n) { grid-column: span 12; }
}

/* ---------- tool page ---------- */
.breadcrumb { font-size: .84rem; color: var(--text-2); padding: 20px 0 8px; }
.breadcrumb a { color: var(--text-2); font-weight: 600; }
.breadcrumb a:hover { color: var(--coral); text-decoration: underline; }
.tool-header { display: flex; gap: 18px; align-items: flex-start; margin: 10px 0 22px; }
.tool-header .tc-icon {
  width: 58px; height: 58px; font-size: 26px; border-radius: 16px;
  display: flex; align-items: center; justify-content: center; font-weight: 700;
  font-family: var(--display); border: 1.5px solid var(--ink);
  transform: rotate(-4deg); box-shadow: var(--shadow); flex-shrink: 0;
}
.tool-meta-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.chip {
  font-size: .73rem; font-weight: 700; padding: 4px 12px; border-radius: 999px;
  background: var(--surface); color: var(--ink); border: 1.5px solid var(--border-soft);
}
.chip.green { background: var(--mint); border-color: var(--ink); color: var(--mint-deep); }

.tool-widget {
  background: var(--surface); border: 1.5px solid var(--border); border-radius: var(--radius);
  padding: 26px; box-shadow: var(--shadow-lg); margin: 24px 0 38px;
}

.article { max-width: 800px; }
.article h2 { border-top: 1.5px solid var(--border-soft); padding-top: 1.2em; }
.article ul, .article ol { padding-left: 1.4em; }
.article li { margin: .35em 0; }
.article table {
  width: 100%; border-collapse: separate; border-spacing: 0; margin: 1.2em 0; font-size: .92rem;
  background: var(--surface); border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  overflow: hidden;
}
.article th, .article td { border-bottom: 1px solid var(--border-soft); padding: 10px 14px; text-align: left; }
.article tr:last-child td { border-bottom: none; }
.article th { background: var(--lavender); font-family: var(--display); font-weight: 600; }

.faq-section h2 { border-top: 1.5px solid var(--border-soft); padding-top: 1.2em; }
.faq-item {
  background: var(--surface); border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  margin: 12px 0; box-shadow: var(--shadow); transition: transform .15s, box-shadow .15s;
}
.faq-item:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 rgba(27,24,38,.9); }
.faq-item summary {
  cursor: pointer; font-weight: 700; font-family: var(--display);
  padding: 15px 20px; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+"; font-size: 1.25rem; font-weight: 600; color: #fff;
  background: var(--ink); width: 26px; height: 26px; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.faq-item[open] summary::after { content: "−"; background: var(--grad); }
.faq-item .faq-a { padding: 0 20px 16px; color: var(--text-2); }

.related-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; margin-top: 16px; }
.related-grid .tool-card { padding: 16px; }
.related-grid .tool-card p { display: none; }

/* ---------- form controls ---------- */
label { display: block; font-size: .84rem; font-weight: 700; margin: 16px 0 6px; font-family: var(--display); }
input[type="text"], input[type="number"], input[type="date"], select, textarea {
  width: 100%; padding: 11px 14px; border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  font-family: var(--font); font-size: .95rem; background: #fff; color: var(--ink);
}
input:focus, select:focus, textarea:focus { outline: 3px solid var(--pink); outline-offset: 1px; border-color: var(--ink); }
textarea { resize: vertical; min-height: 120px; font-family: var(--mono); font-size: .9rem; line-height: 1.6; }
textarea.ta-lg { min-height: 180px; font-family: var(--font); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 11px 20px; border-radius: 999px; border: 1.5px solid var(--ink);
  font-size: .92rem; font-weight: 700; font-family: var(--display);
  cursor: pointer; background: var(--ink); color: #fff;
  box-shadow: 3px 3px 0 rgba(27,24,38,.25);
  transition: transform .15s, box-shadow .15s, background .15s;
}
.btn:hover { background: var(--grad); transform: translate(-2px, -2px); box-shadow: 5px 5px 0 rgba(27,24,38,.9); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn-secondary { background: var(--surface); color: var(--ink); }
.btn-secondary:hover { background: var(--lime); }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }

.field-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0 18px; }
.result-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin-top: 18px; }
.result-box {
  background: var(--butter); border: 1.5px solid var(--ink); border-radius: var(--radius-sm);
  padding: 14px; text-align: center;
}
.result-box:nth-child(4n+2) { background: var(--mint); }
.result-box:nth-child(4n+3) { background: var(--blush); }
.result-box:nth-child(4n+4) { background: var(--sky); }
.result-box .rb-num { font-size: 1.3rem; font-weight: 800; font-family: var(--display); word-break: break-all; }
.result-box .rb-label { font-size: .74rem; color: var(--text-2); text-transform: uppercase; letter-spacing: .05em; margin-top: 3px; font-weight: 600; }
.result-box.highlight { background: var(--ink); }
.result-box.highlight .rb-num { color: var(--lime); }
.result-box.highlight .rb-label { color: #b8b2c6; }

.sub-card {
  background: var(--bg); border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  padding: 18px 20px; margin-top: 18px;
}
.mini-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.mini-table th, .mini-table td { border-bottom: 1px solid var(--border-soft); padding: 8px 10px; text-align: left; }
.mini-table tr:last-child td { border-bottom: none; }
.mini-table th { color: var(--text-2); font-weight: 700; font-size: .74rem; text-transform: uppercase; letter-spacing: .05em; }

.notice { border-radius: var(--radius-sm); padding: 13px 17px; font-size: .9rem; margin-top: 14px; border: 1.5px solid; font-weight: 500; }
.notice.error { background: #ffe4de; color: #93230e; border-color: #93230e; }
.notice.success { background: var(--acid); color: var(--acid-deep); border-color: var(--acid-deep); }
.notice.info { background: var(--lavender); color: var(--lavender-deep); border-color: var(--lavender-deep); }

/* dropzone */
.dropzone {
  border: 2px dashed var(--border); border-radius: var(--radius); padding: 42px 20px;
  text-align: center; color: var(--text-2); cursor: pointer;
  transition: border-color .15s, background .15s, transform .15s;
  background: var(--surface);
}
.dropzone:hover, .dropzone.dragover { border-color: var(--coral); background: var(--peach); transform: scale(1.005); }
.dropzone .dz-icon { font-size: 36px; }
.dropzone strong { color: var(--ink); }
.preview-img {
  max-width: 100%; max-height: 320px; border-radius: var(--radius-sm);
  border: 1.5px solid var(--ink); margin-top: 16px; box-shadow: var(--shadow);
}

/* strength meter */
.strength-track { height: 12px; background: #fff; border: 1.5px solid var(--ink); border-radius: 999px; overflow: hidden; margin-top: 14px; }
.strength-fill { height: 100%; width: 0; transition: width .25s, background .25s; }

/* tabs */
.tabs { display: inline-flex; gap: 4px; margin-bottom: 16px; background: var(--bg); border: 1.5px solid var(--ink); border-radius: 999px; padding: 4px; }
.tab-btn {
  padding: 8px 20px; border: none; background: none; font-weight: 700; font-size: .9rem;
  color: var(--text-2); cursor: pointer; border-radius: 999px; font-family: var(--display);
}
.tab-btn.active { color: #fff; background: var(--ink); }

/* checkbox / range */
.check-row { display: flex; align-items: center; gap: 10px; margin: 9px 0; font-size: .92rem; }
.check-row input { width: auto; accent-color: var(--coral); }
.check-row label { margin: 0; font-weight: 600; font-size: .92rem; font-family: var(--font); }
.range-row { display: flex; align-items: center; gap: 14px; }
.range-row input[type="range"] { flex: 1; accent-color: var(--coral); }
.range-value { font-weight: 800; font-size: 1.1rem; min-width: 44px; text-align: center; font-family: var(--display); }

/* JSON tree */
.tree-view {
  font-family: var(--mono); font-size: .88rem; background: var(--ink); color: #e8e3f5;
  border-radius: var(--radius-sm); padding: 16px; overflow-x: auto; white-space: pre;
}
.tree-view details { margin-left: 14px; }
.tree-view summary { cursor: pointer; list-style: none; }
.tree-view summary::-webkit-details-marker { display: none; }
.tree-view summary::before { content: "▸ "; color: var(--lime); }
.tree-view details[open] > summary::before { content: "▾ "; }
.tv-key { color: #b9a6ff; }
.tv-str { color: #8fe388; }
.tv-num { color: #ffc866; }
.tv-bool { color: #ff8ab0; }
.tv-null { color: #948da8; }

@media (max-width: 640px) {
  .hero h1 { font-size: 2rem; }
  h1 { font-size: 1.7rem; }
  .tool-widget { padding: 20px 16px; }
  .site-nav { gap: 4px; }
  .site-nav a { padding: 6px 10px; font-size: .82rem; }
}
