/* ============================================================
   Shared design tokens & components for tools/*.html
   Mirrors redesign/preview.html palette
   ============================================================ */
:root {
  --bg: #f6f3ec;
  --cream: #fff8eb;
  --sky: #cfe7e8;
  --ink: #1a1a1a;
  --ink-2: #3a3a3a;
  --muted: #6b6b6b;
  --line: #1a1a1a14;
  --orange-1: #f06e1d;
  --orange-2: #f58b44;
  --orange-soft: #fde2cf;
  --yellow: #ffd64a;
  --pink: #ff8aa8;
  --green: #4fb471;
  --red: #e2533c;
  --card: #ffffff;
  --shadow-sm: 0 4px 14px rgba(0,0,0,.06);
  --shadow-md: 0 8px 24px rgba(0,0,0,.10);
  --shadow-lg: 0 16px 48px rgba(0,0,0,.14);
  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 28px;
  --radius-xl: 40px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4 { letter-spacing: -0.03em; line-height: 1.05; margin: 0; font-weight: 800; }
h1 { font-size: clamp(36px, 5vw, 64px); font-weight: 900; letter-spacing: -0.04em; }
h2 { font-size: clamp(26px, 3vw, 38px); }
h3 { font-size: 20px; }
p  { margin: 0; }
a  { color: inherit; }
button { font-family: inherit; cursor: pointer; }

.tool-shell {
  max-width: 1080px;
  margin: 0 auto;
  padding: 32px 24px 96px;
}
.tool-back {
  display: inline-flex; align-items: center; gap: 8px;
  text-decoration: none; color: var(--muted); font-weight: 600;
  padding: 8px 14px; border-radius: 999px; background: rgba(0,0,0,0.04);
  transition: background .2s;
}
.tool-back:hover { background: rgba(0,0,0,0.08); }
.tool-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--ink); color: #fff;
  padding: 8px 14px; border-radius: 999px;
  font-size: 13px; font-weight: 700; letter-spacing: 0.02em;
  text-transform: uppercase;
}
.tool-eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--yellow); }
.tool-header { margin: 28px 0 40px; }
.tool-header p.lede {
  margin-top: 16px; max-width: 640px; color: var(--ink-2); font-size: 19px; line-height: 1.5;
}

.card {
  background: var(--card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 28px;
}

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 22px; border-radius: 999px;
  font-weight: 700; font-size: 16px;
  border: none; text-decoration: none;
  transition: transform .15s, box-shadow .2s;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { box-shadow: 0 8px 20px rgba(0,0,0,0.25); }
.btn-orange { background: var(--orange-1); color: #fff; }
.btn-ghost { background: transparent; color: var(--ink); border: 1.5px solid rgba(0,0,0,0.18); }

.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px; font-size: 13px; font-weight: 600; }
.pill-yellow { background: var(--yellow); color: var(--ink); }
.pill-orange { background: var(--orange-soft); color: var(--orange-1); }
.pill-green  { background: #d8efdd; color: #1f6b35; }
.pill-red    { background: #fadbd4; color: #a02a17; }
.pill-sky    { background: var(--sky); color: #114448; }

.field-label { font-size: 13px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 6px; }

input[type="text"], input[type="number"], input[type="date"], select, textarea {
  width: 100%; padding: 12px 14px;
  border-radius: 12px; border: 1.5px solid rgba(0,0,0,0.12);
  font-family: inherit; font-size: 16px; background: #fff; color: var(--ink);
  transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--orange-1);
  box-shadow: 0 0 0 4px rgba(240,110,29,0.15);
}

.range-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.range-row .v { font-weight: 800; font-size: 22px; }
input[type="range"] {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 8px; border-radius: 999px;
  background: linear-gradient(to right, var(--orange-1) 0%, var(--orange-1) var(--p,50%), rgba(0,0,0,0.08) var(--p,50%), rgba(0,0,0,0.08) 100%);
  outline: none;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 24px; height: 24px; border-radius: 50%;
  background: #fff; border: 3px solid var(--ink);
  cursor: pointer; box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}
input[type="range"]::-moz-range-thumb {
  width: 24px; height: 24px; border-radius: 50%;
  background: #fff; border: 3px solid var(--ink);
  cursor: pointer;
}

.disclaimer {
  margin-top: 22px; font-size: 13px; color: var(--muted); line-height: 1.5;
  padding: 14px 18px; background: rgba(0,0,0,0.03); border-radius: 14px;
}
.source { font-size: 12px; color: var(--muted); }
.source b { color: var(--ink); font-weight: 700; }

@media (max-width: 640px) {
  .tool-shell { padding: 20px 16px 64px; }
  .card { padding: 20px; border-radius: 22px; }
}
