/* =========================================================
   TOOLSMITH — design tokens
   Palette: workshop-at-dusk (graphite, brass, rust, slate-teal)
   Type: Space Grotesk (display) / IBM Plex Sans (body) / IBM Plex Mono (data)
   ========================================================= */
:root{
  --ink:        #14181F;
  --ink-soft:   #191E27;
  --panel:      #1C222C;
  --panel-hi:   #232A35;
  --line:       #2C3441;
  --chalk:      #EDEAE3;
  --chalk-dim:  #A7ADB8;
  --brass:      #C89B3C;
  --brass-hi:   #E0B75A;
  --rust:       #B5533C;
  --teal:       #4C8880;
  --color1:     #121a2b;
  --color2:     #1c1a27;
  --color3:     #475569;

  --radius: 10px;
  --radius-sm: 6px;
  --shadow-tray: 0 1px 2px rgba(15,23,42,.04), 0 8px 24px -8px rgba(15,23,42,.10);
  --font-display: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-body:  "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono:  "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

html[data-theme="dark"] {
      --color1:     #ffffff;
      --color2:     #ffffff;
      --color3:     #ffffff;
}

*{ box-sizing:border-box; }
html{ scroll-behavior:smooth; }
body{
  margin:0;
  background:
    radial-gradient(circle at 12% 0%, rgba(200,155,60,0.06), transparent 45%),
    var(--ink);
  color:var(--chalk);
  font-family:var(--font-body);
  font-size:16px;
  line-height:1.55;
  -webkit-font-smoothing:antialiased;
}
@media (prefers-reduced-motion: reduce){
  *{ animation-duration:0.001ms !important; transition-duration:0.001ms !important; }
}
h1,h2,h3,h4{ font-family:var(--font-display); font-weight:800; letter-spacing:-0.01em; margin:0 0 .5em; color:var(--color1); }
p{ margin:0 0 1em; color:#475569; }
a{ color: var(--brand-600); text-decoration:none; }
a:hover{ text-decoration:underline; }
code, .mono{ font-family:var(--font-mono); }
:focus-visible{ outline:2px solid var(--brass-hi); outline-offset:2px; }

.wrap{ max-width:1180px; margin:0 auto; padding:0 24px; }

/* ---------- Top nav (drawer-label strip) ---------- */
.topnav{
  position:sticky; top:0; z-index:50;
  background:rgba(20,24,31,0.92);
  backdrop-filter:blur(8px);
  border-bottom:1px solid var(--line);
}
.topnav .wrap{ display:flex; align-items:center; gap:28px; height:64px; }
.brand{ display:flex; align-items:center; gap:10px; font-family:var(--font-display); font-weight:700; font-size:19px; color:var(--chalk); flex-shrink:0; }
.brand .peg{
  width:11px; height:11px; border-radius:50%;
  background:var(--brass); box-shadow:0 0 0 3px rgba(200,155,60,0.18);
}
.topnav nav{ display:flex; gap:22px; flex:1; }
.topnav nav a{ color:var(--chalk-dim); font-size:14.5px; font-weight:500; }
.topnav nav a:hover, .topnav nav a.active{ color:var(--chalk); text-decoration:none; }
.nav-search{ margin-left:auto; }
.nav-toggle{ display:none; background:none; border:1px solid var(--line); color:var(--chalk); border-radius:var(--radius-sm); padding:8px 10px; font-size:18px; }

@media (max-width:840px){
  .topnav nav{ position:absolute; top:64px; left:0; right:0; background:var(--ink-soft); flex-direction:column; padding:12px 24px 20px; border-bottom:1px solid var(--line); display:none; gap:14px; }
  .topnav nav.open{ display:flex; }
  .nav-toggle{ display:inline-flex; margin-left:auto; }
  .nav-search{ display:none; }
}

/* ---------- Label-maker search ---------- */
.labelmaker{
  display:flex; align-items:center; gap:8px;
  background:#0F1319; border:1px solid var(--line); border-radius:4px;
  padding:8px 12px; min-width:230px;
}
.labelmaker svg{ flex-shrink:0; color:var(--chalk-dim); }
.labelmaker input{
  background:none; border:none; outline:none; color:var(--brass-hi);
  font-family:var(--font-mono); letter-spacing:.06em; font-size:13px; width:100%;
  text-transform:uppercase;
}
.labelmaker input::placeholder{ color:#5b6270; text-transform:none; letter-spacing:0; }

/* ---------- Hero ---------- */
.hero{ padding:76px 0 56px; border-bottom:1px solid var(--line); }
.hero .eyebrow{
  font-family:var(--font-mono); font-size:12.5px; letter-spacing:.14em; text-transform:uppercase;
  color:var(--brass-hi); margin-bottom:14px; display:flex; align-items:center; gap:10px;
}
.hero .eyebrow::before{ content:""; width:22px; height:1px; background:var(--brass-hi); }
.hero h1{ font-size:clamp(34px,5vw,54px); max-width:820px; line-height:1.08; }
.hero h1 .accent{ color:var(--brass-hi); }
.hero .lede{ max-width:600px; font-size:17.5px; margin-top:14px; }
.hero-search{ margin-top:32px; max-width:560px; }
.hero-search .labelmaker{ min-width:0; width:100%; padding:14px 16px; border-radius:6px; }
.hero-search .labelmaker input{ font-size:14.5px; }
.hero-stats{ display:flex; gap:36px; margin-top:38px; flex-wrap:wrap; }
.hero-stats div{ font-family:var(--font-mono); }
.hero-stats .num{ color:var(--brass-hi); font-size:26px; font-weight:600; display:block; }
.hero-stats .lbl{ color:var(--chalk-dim); font-size:12.5px; text-transform:uppercase; letter-spacing:.08em; }

/* ---------- Pegboard category grid ---------- */
.section-head{ display:flex; align-items:baseline; justify-content:space-between; margin-bottom:22px; gap:16px; flex-wrap:wrap; }
.section-head h2{ font-size:24px; }
.section-head { font-family:var(--font-mono); font-size:13px; color:var(--chalk-dim); }

.pegboard{
  display:grid; grid-template-columns:repeat(4,1fr); gap:14px;
  padding:26px 22px 18px;
  background:
    linear-gradient(var(--panel), var(--panel)) padding-box,
    radial-gradient(circle, #0D1015 1.6px, transparent 1.6px);
  background-size: auto, 26px 26px;
  border:1px solid var(--line); border-radius:var(--radius);
}
@media (max-width:900px){ .pegboard{ grid-template-columns:repeat(2,1fr); } }
@media (max-width:520px){ .pegboard{ grid-template-columns:1fr; } }

.peg-card{
  position:relative;
  background:var(--panel-hi); border:1px solid var(--line); border-radius:var(--radius-sm);
  padding:20px 16px 16px; text-align:left; transition:transform .15s ease, border-color .15s ease;
}
.peg-card::before{
  content:""; position:absolute; top:-6px; left:50%; transform:translateX(-50%);
  width:10px; height:10px; border-radius:50%; background:var(--brass);
  box-shadow:0 3px 0 0 rgba(0,0,0,0.3);
}
.peg-card:hover{ transform:translateY(-3px); border-color:var(--brass); }
.peg-card .icon{ font-size:22px; margin-bottom:10px; display:block; }
.peg-card h3{ font-size:15.5px; margin-bottom:4px; }
.peg-card p{ font-size:13px; margin:0; color:var(--chalk-dim); }
.peg-card .count{ position:absolute; top:14px; right:14px; font-family:var(--font-mono); font-size:11px; color:var(--chalk-dim); }

/* ---------- Tool card grid ---------- */
.tool-grid{ display:grid; grid-template-columns:repeat(3,1fr); gap:14px; }
@media (max-width:900px){ .tool-grid{ grid-template-columns:repeat(2,1fr); } }
@media (max-width:600px){ .tool-grid{ grid-template-columns:1fr; } }

.tool-card{
  position:relative;
  display:block; background:#ffffff; border:1px solid #e2e8f0; border-radius:var(--radius-sm);
  padding:18px 16px; transition:border-color .15s ease, transform .15s ease;
}
.tool-card:hover{ border-color:#93c5fd; transform:translateY(-2px); text-decoration:none; }
.tool-card .rivet{ position:absolute; top:10px; right:10px; width:5px; height:5px; border-radius:50%; background:var(--sx-blue); opacity:.7; }
.tool-card .cat{ font-family:var(--font-mono); font-size:10.5px; letter-spacing:.08em; text-transform:uppercase; color:var(--teal); margin-bottom:8px; display:block; }
.tool-card h3{ font-size:15px; margin-bottom:6px; color:#121a2b; }
.tool-card p{ font-size:12.8px; margin:0; color:#475569; }

/* ---------- Buttons ---------- */
.btn{
  display:inline-flex; align-items:center; gap:8px; justify-content:center;
  font-family:var(--font-body); font-weight:600; font-size:14px;
  padding:11px 18px; border-radius:var(--radius-sm); border:1px solid transparent; cursor:pointer;
  transition:filter .12s ease, transform .12s ease;
}
.btn:active{ transform:translateY(1px); }
.btn-brass{ background:var(--brass); color:#1A1305; }
.btn-brass:hover{ filter:brightness(1.08); }
.btn-ghost{ background: linear-gradient(135deg, #2563eb, #1a3be2);
    color: #fff;
    border-color: transparent!important;    padding: 11px 18px!important; }
.btn-ghost:hover{ border-color:var(--brass); }
.btn-sm{ padding:7px 12px; font-size:12.5px; }
.btn:disabled{ opacity:.5; cursor:not-allowed; }

/* ---------- Workbench (tool page panel) ---------- */
.tool-header{ padding:18px 0 22px;}
.breadcrumb{ font-family:var(--font-mono); font-size:12px; color:var(--chalk-dim); margin-bottom:14px; }
.breadcrumb a{ color:var(--chalk-dim); }
.tool-header h1{ font-size:clamp(26px,3.4vw,36px); }
.tool-header .desc{ max-width:760px; font-size:16px; }

.workbench{
  margin:30px 0 50px;
  background:#ffffff;
  border:1px solid #e2e8f0; border-radius:var(--radius);
  box-shadow:var(--shadow-tray);
  padding:22px;
}
.workbench-row{ display:grid; grid-template-columns:1fr 1fr; gap:16px; }
@media (max-width:760px){ .workbench-row{ grid-template-columns:1fr; } }
.wb-field label, .field-label{
  display:block; font-family:var(--font-mono); font-size:.86rem; font-weight: 600; letter-spacing:.06em; text-transform:capitalize;
  color:#121a2b; margin-bottom:8px;
}
textarea, input[type=text], input[type=number], input[type=password], input[type=date], input[type=datetime-local], select{
  width:100%; background:#f6f8fb; border:1px solid #e2e8f0; border-radius:var(--radius-sm);
  color:#121a2b; font-family:var(--font-mono); font-size:13.5px; padding:12px; resize:vertical;
}
textarea{ min-height:200px; line-height:1.5; }
input[type=color]{ width:52px; height:38px; border:1px solid #e2e8f0; border-radius:var(--radius-sm); background:#f6f8fb; padding:2px; }
select{ cursor:pointer; }
input:focus, textarea:focus, select:focus{ border-color:var(--brass); }
.controls-row{ display:flex; gap:10px; flex-wrap:wrap; margin:16px 0; align-items:center; }
.controls-row .spacer{ flex:1; }
.opt-group{ display:flex; gap:14px; flex-wrap:wrap; align-items:center; font-size:13.5px; color:var(--chalk-dim); }
.opt-group label{ display:flex; align-items:center; gap:6px; cursor:pointer; }
.opt-group input[type=checkbox], .opt-group input[type=radio]{ accent-color:var(--brass); width:15px; height:15px; }
.opt-group input[type=range]{ accent-color:var(--brass); }
.stat-line{ font-family:var(--font-mono); font-size:12.5px; color:var(--chalk-dim); margin-top:10px; }
.stat-line b{ color:var(--brass-hi); }
.result-panel{
  margin-top:16px; background:#f6f8fb; border:1px solid #e2e8f0; border-radius:var(--radius-sm); color: var(--panel);
  padding:16px; font-family:var(--font-mono); font-size:13.5px; word-break:break-all; white-space:pre-wrap; min-height:44px;
}
.result-panel.empty{ color:#121a2b; }
.swatch-row{ display:flex; gap:10px; flex-wrap:wrap; margin-top:14px; }
.swatch{ width:64px; }
.swatch .box{ height:64px; border-radius:var(--radius-sm); border:1px solid var(--line); }
.swatch .lbl{ font-family:var(--font-mono); font-size:10.5px; color:var(--chalk-dim); text-align:center; margin-top:5px; }
table.data-table{ width:100%; border-collapse:collapse; font-size:13px; font-family:var(--font-mono); }
table.data-table th, table.data-table td{ border:1px solid var(--line); padding:7px 10px; text-align:left; }
table.data-table th{ background:var(--ink-soft); color:var(--brass-hi); }
.error-text{ color:var(--rust); font-family:var(--font-mono); font-size:13px; margin-top:8px; }
.help-note{ font-size:12.8px; color:var(--chalk-dim); margin-top:14px; border-top:1px dashed var(--line); padding-top:14px; }
.drop-zone{
  border:1.5px dashed var(--line); border-radius:var(--radius-sm); padding:34px 20px; text-align:center;
  color:var(--chalk-dim); font-size:13.5px; cursor:pointer; transition:border-color .15s ease;
}
.drop-zone:hover, .drop-zone.drag{ border-color:var(--sx-accent-2); color:var(--sx-text); }
canvas{ max-width:100%; border-radius:var(--radius-sm); }
.preview-frame{ margin-top:14px; border:1px solid var(--line); border-radius:var(--radius-sm); background:#0F1319; padding:16px; max-height:340px; overflow:auto; }

/* ---------- Related tools / footer ---------- */
.related{ padding:30px 24px 60px; }
footer{ border-top:1px solid var(--line); padding:44px 0 34px; margin-top:20px; }
.foot-grid{ display:grid; grid-template-columns:1.4fr 1fr 1fr 1fr; gap:28px; }
@media (max-width:760px){ .foot-grid{ grid-template-columns:1fr 1fr; } }
.foot-col h4{ font-family:var(--font-mono); font-size:11.5px; letter-spacing:.08em; text-transform:uppercase; color:var(--chalk-dim); margin-bottom:12px; }
.foot-col a{ display:block; color:var(--chalk-dim); font-size:13.5px; margin-bottom:8px; }
.foot-col a:hover{ color:var(--brass-hi); }
.foot-bottom{ margin-top:34px; padding-top:22px; border-top:1px solid var(--line); font-size:12.5px; color:var(--chalk-dim); display:flex; justify-content:space-between; flex-wrap:wrap; gap:8px; }

.badge{ display:inline-block; font-family:var(--font-mono); font-size:10.5px; letter-spacing:.06em; text-transform:uppercase; padding:3px 8px; border-radius:20px; border:1px solid var(--line); color:var(--chalk-dim); }
.badge.privacy{ color:var(--teal); border-color:rgba(76,136,128,0.4); }

.category-header{ padding:44px 0 30px; border-bottom:1px solid var(--line); }
.category-header .icon-big{ font-size:34px; }

/* ---------- search dropdown ---------- */
[data-role="tool-search"]{ position:relative; }
.search-results{
  display:none; position:absolute; top:calc(100% + 8px); left:0; right:0;
  background:var(--panel-hi); border:1px solid var(--line); border-radius:var(--radius-sm);
  box-shadow:0 12px 28px rgba(0,0,0,0.45); overflow:hidden; z-index:60; max-height:360px; overflow-y:auto;
}
.search-hit{ display:flex; justify-content:space-between; gap:10px; padding:11px 14px; border-bottom:1px solid var(--line); color:var(--chalk); font-size:13.5px; }
.search-hit:last-child{ border-bottom:none; }
.search-hit:hover{ background:var(--ink-soft); text-decoration:none; }
.search-hit span{ color:var(--chalk-dim); font-family:var(--font-mono); font-size:11.5px; text-transform:uppercase; letter-spacing:.05em; white-space:nowrap; }

/* ---------- language picker ---------- */
.lang-picker select{
  background:#0F1319; border:1px solid var(--line); color:var(--chalk-dim);
  font-family:var(--font-mono); font-size:12px; padding:8px 10px; border-radius:6px; cursor:pointer;
}
.lang-picker select:hover{ border-color:var(--brass); color:var(--chalk); }
@media (max-width:840px){ .lang-picker{ margin-left:auto; } }

/* ---------- breadcrumb (semantic) ---------- */
.breadcrumb-nav{ margin-bottom:14px; }
.breadcrumb-nav ol{ list-style:none; display:flex; flex-wrap:wrap; gap:6px; margin:0; padding:0; font-family:var(--font-mono); font-size:12px; color:#475569; }
.breadcrumb-nav li{ display:flex; align-items:center; gap:6px; }
.breadcrumb-nav li:not(:last-child)::after{ content:"/"; color:var(--line); margin-left:6px; }
.breadcrumb-nav a{ color:#475569; }
.breadcrumb-nav a:hover{ color:#475569; }
.breadcrumb-nav li[aria-current]{ color:#475569; }

/* ---------- share bar ---------- */
.share-bar{ display:flex; gap:8px; flex-wrap:wrap; align-items:center; margin-top:18px; }
.share-bar .share-label{ font-family:var(--font-mono); font-size:.82rem; text-transform:uppercase;font-weight: 700; letter-spacing:.04em; color:#475569; margin-right:4px; }
.share-btn{
  display:inline-flex; align-items:center; gap:6px; padding:7px 12px; border-radius:20px;    font-weight: 600;
  border:1px solid #e2e8f0; background:#ffffff; color:#121a2b; font-size:12.5px; cursor:pointer;
  transition:border-color .15s, color .15s;
}
.share-btn:hover{ border-color:var(--brass); color:#121a2b; text-decoration:none; }
.share-btn svg{ width:13px; height:13px; }

/* ---------- how-to / FAQ content sections ---------- */
.content-section{ padding:10px 24px 8px; }
.content-section h2{ font-size:20px; margin-bottom:14px; }
.howto-steps{ list-style:none; margin:0; padding:0; display:grid; gap:10px; }
.howto-steps li{ display:flex; gap:12px; align-items:flex-start; font-size:14.5px; color:var(--color2); }
.howto-steps .step-num{
  flex-shrink:0; width:24px; height:24px; border-radius:50%; background:#ffffff; border:1px solid #1c1a27;
  color:#1c1a27; font-family:var(--font-mono); font-size:12px; display:flex; align-items:center; justify-content:center;
}
.faq-item{ border-bottom:1px solid #e2e8f0; }
.faq-item:first-child{ border-top:1px solid #e2e8f0; }
.faq-q{ padding:15px 4px; cursor:pointer; display:flex; justify-content:space-between; align-items:center; font-size:16px; color:var(--color2); font-weight:700; }
.faq-q::after{ content:"+"; color:var(--color2); font-family:var(--font-mono); font-size:16px; }
.faq-item.open .faq-q::after{ content:"−"; }
.faq-a{ display:none; padding:0 4px 16px; color:var(--color3); font-size:16px; max-width:100%; }
.faq-item.open .faq-a{ display:block; }

/* ---------- legal / sitemap pages ---------- */
.legal-body{ max-width:680px; }
.legal-body h2{ font-size:19px; margin-top:32px; }
.legal-body p, .legal-body li{ font-size:14.5px; }
.legal-body .updated{ font-family:var(--font-mono); font-size:12px; color:var(--chalk-dim); margin-bottom:30px; }
.sitemap-grid{ display:grid; grid-template-columns:repeat(3,1fr); gap:30px; }
@media (max-width:760px){ .sitemap-grid{ grid-template-columns:1fr 1fr; } }
@media (max-width:520px){ .sitemap-grid{ grid-template-columns:1fr; } }
.sitemap-col h3{ font-size:14px; color:var(--brass-hi); font-family:var(--font-mono); text-transform:uppercase; letter-spacing:.05em; margin-bottom:12px; }
.sitemap-col a{ display:block; color:var(--chalk-dim); font-size:13.5px; margin-bottom:8px; }
.sitemap-col a:hover{ color:var(--chalk); }



/* ---------- new pages ---------- */
:root {
    --brand-50: #eff5ff;
    --brand-100: #dbe9fe;
    --brand-200: #bfdbfe;
    --brand-300: #93c5fd;
    --brand-400: #60a5fa;
    --brand-500: #3b82f6;
    --brand-600: #2743e3;
    --brand-700: #1d4ed8;
    --accent-500: #14b8a6;
    --accent-600: #2743e3;
    --ink-900: #0b1220;
    --ink-800: #121a2b;
    --ink-700: #1e293b;
    --ink-600: #334155;
    --ink-500: #475569;
    --ink-400: #64748b;
    --ink-300: #94a3b8;
    --ink-200: #cbd5e1;
    --ink-100: #e2e8f0;
    --ink-50: #f1f5f9;
    --bg: #ffffff;
    --bg-alt: #f6f8fb;
    --surface: #ffffff;
    --text: var(--ink-800);
    --text-soft: var(--ink-500);
    --border: var(--ink-100);
    --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 8px 24px -8px rgba(15, 23, 42, .10);
    --shadow-lg: 0 20px 45px -15px rgba(15, 23, 42, .25);
    --radius: 14px;
    --radius-sm: 8px;
    --maxw: 1240px;
    --header-h: 72px;
}
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.section { padding: 56px 0; }
.section-tight { padding: 32px 0; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; } .gap-3 { gap: 12px; } .gap-4 { gap: 16px; } .gap-6 { gap: 24px; }
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-6 { grid-template-columns: repeat(6, 1fr); }
@media (max-width: 980px) { .grid-3, .grid-4, .grid-6 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .grid-2, .grid-3, .grid-4, .grid-6 { grid-template-columns: 1fr; } }
.muted { color: var(--text-soft); }
.center { text-align: center; }
.w-full { width: 100%; }
.mt-0{margin-top:0} .mb-0{margin-bottom:0}
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--brand-50); color: var(--brand-700);
  border: 1px solid var(--brand-100);
  font-size: .78rem; font-weight: 700; letter-spacing: .02em;
  padding: 5px 12px; border-radius: 999px; text-transform: uppercase;
}
[data-theme="dark"] .badge { background: rgba(59,130,246,.12); color: var(--brand-300); border-color: rgba(59,130,246,.25); }

/* ---------- Buttons / inputs ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid transparent; border-radius: var(--radius-sm);
  padding: 11px 18px; font-weight: 600; font-size: .94rem; cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease, background .15s ease, border-color .15s ease;
  background: var(--surface); color: var(--text); border-color: var(--border);
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.btn:active { transform: translateY(0); }
.btn-primary { background: linear-gradient(135deg, var(--brand-600), var(--accent-600)); color: #fff; border-color: transparent; }
.btn-primary:hover { box-shadow: 0 10px 24px -8px rgba(39,67,227,.55); }
.btn-outline { background: transparent; border-color: var(--border); color: var(--text); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--brand-600); }
.btn-sm { padding: 7px 12px; font-size: .82rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; transform: none; }

.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 600; font-size: .86rem; margin-bottom: 6px; color: var(--text); }
.field .hint { font-size: .78rem; color: var(--text-soft); margin-top: 4px; }
.input, .select, .textarea {
  width: 100%; padding: 11px 13px; border-radius: var(--radius-sm);
  border: 1.5px solid var(--border); background: var(--bg-alt); color: var(--text);
  font-size: .95rem; font-family: inherit; transition: border-color .15s ease, box-shadow .15s ease;
}
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--brand-500); box-shadow: 0 0 0 3px rgba(59,130,246,.18); }
.textarea { min-height: 180px; resize: vertical; line-height: 1.55; }
.input-row { display: flex; gap: 10px; flex-wrap: wrap; }
.input-row > * { flex: 1; min-width: 140px; }
.field-inline { margin-bottom: 8px; }
.field-inline label { display: flex; align-items: center; gap: 8px; font-weight: 500; cursor: pointer; }
.field-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 4px 16px; margin-bottom: 16px; }
.field-row { display: flex; gap: 10px; margin-bottom: 10px; }
.field-row > .field { flex: 1; margin-bottom: 0; }
.checkbox-row { display: flex; align-items: center; gap: 8px; font-size: .9rem; }

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 60; height: var(--header-h);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px); border-bottom: 1px solid var(--border);
}
.site-header .container { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.2rem; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand .mark { width: 34px; height: 34px; border-radius: 10px; background: linear-gradient(135deg,var(--brand-600),var(--accent-500)); display:flex; align-items:center; justify-content:center; color:#fff; font-weight:900; }
.nav { display: flex; align-items: center; gap: 6px; }
.nav-link { padding: 10px 12px; border-radius: var(--radius-sm); font-weight: 600; font-size: .92rem; color: var(--text); position: relative; }
.nav-link:hover { background: var(--bg-alt); text-decoration: none; }
.has-mega { position: relative; }
.mega {
  position: absolute; top: calc(100% + 10px); left: 50%; transform: translateX(-50%);
  width: min(880px, 92vw); background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 22px;
  display: none; grid-template-columns: repeat(3, 1fr); gap: 18px 26px;
}
.has-mega:hover .mega, .has-mega:focus-within .mega { display: grid; }
.mega h4 { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--text-soft); margin-bottom: 8px; }
.mega a { display: block; padding: 5px 0; font-size: .88rem; color: var(--text); font-weight: 500; }
.mega a:hover { color: var(--brand-600); text-decoration: none; }
.header-actions { display: flex; align-items: center; gap: 10px; }
.theme-toggle { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--border); background: var(--bg-alt); display: flex; align-items: center; justify-content: center; cursor: pointer; }
.menu-btn { display: none; }
.search-box { position: relative; }
.search-box input { width: 230px; }
.search-results { position: absolute; top: calc(100% + 8px); left: 0; right: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); box-shadow: var(--shadow-lg); max-height: 340px; overflow: auto; display: none; z-index: 80; }
.search-results.show { display: block; }
.search-results a { display: block; padding: 9px 12px; font-size: .88rem; color: var(--text); border-bottom: 1px solid var(--border); }
.search-results a:last-child { border-bottom: none; }
.search-results a:hover { background: var(--bg-alt); text-decoration:none; }
.search-results .sr-cat { font-size: .72rem; color: var(--text-soft); }

@media (max-width: 980px) {
  .nav, .search-box { display: none; }
  .menu-btn { display: inline-flex; }
}

.mobile-nav { position: fixed; inset: 0; z-index: 90; display: none; }
body.mobile-nav-open .mobile-nav { display: block; }
.mobile-nav-backdrop { position: absolute; inset: 0; background: rgba(11,18,32,.55); }
.mobile-nav-panel { position: absolute; top: 0; right: 0; bottom: 0; width: min(320px, 86vw); background: var(--surface); padding: 22px 20px; overflow-y: auto; box-shadow: var(--shadow-lg); }
.mobile-nav-panel .mn-search { margin-bottom: 16px; }
.mobile-nav-panel .mn-search input { width: 100%; }
.mobile-nav-panel a { display: block; padding: 11px 2px; font-weight: 600; font-size: .92rem; border-bottom: 1px solid var(--border); color: var(--text); }
.mobile-nav-panel h4 { font-size: .76rem; text-transform: uppercase; letter-spacing: .05em; color: var(--text-soft); margin: 20px 0 6px; }
.mobile-nav-panel .mn-close { display: flex; justify-content: flex-end; margin-bottom: 6px; }
.mobile-nav-panel .mn-close button { background: none; border: none; font-size: 1.4rem; cursor: pointer; color: var(--text-soft); line-height: 1; }


/* ---------- Hero ---------- */
.hero { padding: 64px 0 40px; background: radial-gradient(1100px 420px at 80% -10%, var(--brand-100), transparent), radial-gradient(900px 380px at 0% 0%, rgba(20,184,166,.10), transparent); }
[data-theme="dark"] .hero { background: radial-gradient(1100px 420px at 80% -10%, rgba(59,130,246,.14), transparent), radial-gradient(900px 380px at 0% 0%, rgba(20,184,166,.10), transparent); }
.hero h1 { max-width: 820px; }
.hero .lead { font-size: 1.12rem; color: var(--text-soft); max-width: 680px; }
.hero-search { max-width: 680px; margin-top: 26px; position: relative; }
.hero-search input { padding: 16px 18px; font-size: 1rem; border-radius: 14px; box-shadow: var(--shadow); }
.stat-row { display: flex; gap: 28px; margin-top: 28px; flex-wrap: wrap; }
.stat b { display: block; font-size: 1.5rem; font-weight: 800; color: var(--brand-700); }
[data-theme="dark"] .stat b { color: var(--brand-300); }
.stat span { font-size: .82rem; color: var(--text-soft); }

/* ---------- Cards ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.cat-card { display: block; padding: 22px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); transition: transform .15s ease, box-shadow .15s ease; }
.cat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); text-decoration: none; }
.cat-card .icon { width: 46px; height: 46px; border-radius: 12px; display:flex; align-items:center; justify-content:center; background: var(--brand-50); color: var(--brand-700); margin-bottom: 14px; }
[data-theme="dark"] .cat-card .icon { background: rgba(59,130,246,.14); color: var(--brand-300); }
.cat-card h3 { margin-bottom: 6px; }
.cat-card p { color: var(--text-soft); font-size: .9rem; margin-bottom: 0; }
.cat-card .count { font-size: .78rem; color: var(--brand-600); font-weight: 700; margin-top: 10px; display:block; }

.tool-card { display: block; padding: 16px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--surface); font-weight: 600; font-size: .92rem; color: var(--text); transition: border-color .15s ease, transform .15s ease; }
.tool-card:hover { border-color: var(--brand-300); transform: translateY(-2px); text-decoration: none; }
.tool-card .sub { display:block; font-size: .76rem; color: var(--text-soft); font-weight: 500; margin-top: 4px; }

.tool-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
@media (max-width: 980px) { .tool-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .tool-grid { grid-template-columns: 1fr; } }

/* ---------- Tool page layout ---------- */
.breadcrumbs { font-size: .82rem; color: var(--text-soft); margin-bottom: 14px; }
.breadcrumbs a { color: var(--text-soft); }
.breadcrumbs .sep { margin: 0 6px; }
.tool-hero { padding: 36px 0 8px; }
.tool-hero h1 { margin-bottom: 8px; }
.tool-hero .lead { color: var(--text-soft); max-width: 760px; }
.tool-layout { display: grid; grid-template-columns: 1fr 300px; gap: 28px; align-items: start; }
@media (max-width: 980px) { .tool-layout { grid-template-columns: 1fr; } }
.widget { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.widget-toolbar { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.output-box { margin-top: 16px; }
.output-box .textarea, .output-box pre { background: var(--bg-alt); }
.swap-btn { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--border); background: var(--bg-alt); cursor: pointer; display: flex; align-items: center; justify-content: center; }
.result-panel { margin-top: 18px; padding: 18px; border-radius: var(--radius-sm); background: var(--bg-alt); border: 1px dashed var(--border); }
.result-panel .big { font-size: 1.7rem; font-weight: 800; color: var(--brand-700); }
[data-theme="dark"] .result-panel .big { color: var(--brand-300); }
.result-table { width: 100%; border-collapse: collapse; margin-top: 10px; }
.result-table td, .result-table th { padding: 8px 10px; border-bottom: 1px solid var(--border); font-size: .88rem; text-align: left; }
.dropzone { border: 2px dashed var(--border); border-radius: var(--radius); padding: 34px 18px; text-align: center; cursor: pointer; background: var(--bg-alt); }
.dropzone.drag { border-color: var(--brand-500); background: var(--brand-50); }
.preview-canvas-wrap { margin-top: 16px; text-align: center; background: repeating-conic-gradient(var(--bg-alt) 0% 25%, var(--bg) 0% 50%) 50% / 18px 18px; border-radius: var(--radius-sm); border: 1px solid var(--border); padding: 12px; overflow: auto; }
.preview-canvas-wrap canvas, .preview-canvas-wrap img { margin: 0 auto; max-height: 420px; }
.toast { position: fixed; bottom: 22px; right: 22px; background: var(--ink-900); color: #fff; padding: 12px 18px; border-radius: 10px; font-size: .88rem; box-shadow: var(--shadow-lg); z-index: 200; opacity: 0; transform: translateY(12px); transition: all .25s ease; }
.toast.show { opacity: 1; transform: translateY(0); }
.color-swatch { width: 44px; height: 44px; border-radius: 10px; border: 1px solid var(--border); display:inline-block; vertical-align: middle; }

.side-card { margin-bottom: 18px; }
.side-card h4 { font-size: .85rem; text-transform: uppercase; letter-spacing: .04em; color: var(--text-soft); margin-bottom: 12px; }
.related-list a { display: block; padding: 9px 0; border-bottom: 1px solid var(--border); font-size: .9rem; font-weight: 600; }
.related-list a:last-child { border-bottom: none; }
.ad-slot { border: 1px dashed var(--border); border-radius: var(--radius-sm); padding: 18px; text-align: center; color: var(--text-soft); font-size: .78rem; background: var(--bg-alt); }

/* ---------- Article / content blocks ---------- */
.article { max-width: 1240px; margin: 0 auto; }
.article h2 { margin-top: 2.2em; }
.article ul, .article ol { padding-left: 1.3em; }
.article li { margin-bottom: .5em; }
.faq-item { border-bottom: 1px solid var(--border); padding: 16px 0; }
.faq-item summary { cursor: pointer; font-weight: 700; list-style: none; display:flex; align-items:center; justify-content:space-between; }
.faq-item summary::-webkit-details-marker { display:none; }
.faq-item summary:after { content: "+"; font-size: 1.3rem; color: var(--text-soft); }
.faq-item[open] summary:after { content: "â€“"; }
.faq-item p { margin-top: 10px; color: var(--text-soft); }
.feature-list { list-style:none; padding:0; margin:0; display:grid; gap:10px; grid-template-columns: repeat(2,1fr); }
@media (max-width:620px){ .feature-list{grid-template-columns:1fr;} }
.feature-list li { display:flex; gap:10px; align-items:flex-start; font-size:.92rem; }
.feature-list li:before { content:"âœ“"; color: var(--accent-600); font-weight:900; }
.toc { background: var(--bg-alt); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 16px 20px; font-size: .9rem; }
.toc a { display:block; padding: 4px 0; }


/* ================= Share bar + Embed ================= */
.share-bar { width: 1200px;
  margin: 0 auto; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 18px 0 26px; padding: 14px 16px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-alt); }
.share-label { font-size: .82rem; font-weight: 700; color: var(--text-soft); text-transform: uppercase; letter-spacing: .04em; }
.share-icons { display: flex; gap: 8px; }
.share-icon { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface); color: var(--text); display: flex; align-items: center; justify-content: center; cursor: pointer; transition: transform .15s ease, color .15s ease, border-color .15s ease; }
.share-icon:hover { color: var(--brand-600); border-color: var(--brand-300); transform: translateY(-1px); }
.embed-panel { flex-basis: 100%; margin-top: 10px; padding-top: 12px; border-top: 1px dashed var(--border); }
.embed-panel[hidden] { display: none; }
.embed-hint { font-size: .82rem; color: var(--text-soft); margin-bottom: 8px; }
.embed-code { font-size: .8rem; margin-bottom: 8px; }
.faq-item[open] summary::after {
    content: "–";
}
.feature-list li::before {
    content: "✓";
    color: var(--accent-600);
    font-weight: 900;
}
/* ================= On-this-page TOC ================= */
.page-toc { display: flex; gap: 8px 18px; flex-wrap: wrap; margin: 18px 0 0; }
.page-toc a { font-size: .84rem; font-weight: 600; color: var(--brand-600); padding: 6px 0; }














