/* tools.css — shared stylesheet for the jamesross.ai free tools.
   Palette, type scale and component patterns extracted verbatim from
   ../index.html so these pages read as the same site, not a bolted-on app.
   Shared by every /tools/*.html page — keep additions generic. */

:root {
  --paper:   #FBFAF7;
  --card:    #FFFFFF;
  --ink:     #1B1A17;
  --muted:   #5B574F;
  --faint:   #8A857B;
  --accent:  #8F6414;   /* bronze amber — text accents */
  --amber:   #E2A83E;   /* brand amber — decorative marks only */
  --rule:    #E6E1D8;
  --rule-2:  #D9D3C7;
  --maxw:    760px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 18px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

h1, h2, h3 { font-weight: 700; letter-spacing: -0.02em; margin: 0 0 1rem; color: var(--ink); }
h1 { font-size: clamp(1.9rem, 5vw, 2.6rem); line-height: 1.12; letter-spacing: -0.03em; }
h2 { font-size: clamp(1.3rem, 3.4vw, 1.6rem); line-height: 1.2; }
h3 { font-size: 1.04rem; margin: 0 0 0.3rem; letter-spacing: -0.01em; }

p { margin: 0 0 1.1rem; color: var(--ink); }

button {
  font-family: inherit;
  cursor: pointer;
  display: inline-block;
  padding: 0.78rem 1.4rem;
  min-height: 44px;
  font-size: 0.96rem;
  font-weight: 600;
  border: none;
  border-radius: 6px;
  background: var(--ink);
  color: #fff;
  transition: transform .08s ease, opacity .15s ease;
}
button:hover { opacity: 0.88; }
button:active { transform: translateY(1px); }
button:disabled { background: var(--rule-2); color: var(--faint); cursor: not-allowed; opacity: 1; }

input[type=email], textarea {
  font-family: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: var(--card);
  border: 1px solid var(--rule-2);
  border-radius: 6px;
  padding: 0.7rem 0.85rem;
  width: 100%;
  min-height: 44px;
}
input[type=email]:focus, textarea:focus { border-color: var(--accent); }
textarea { min-height: 160px; resize: vertical; line-height: 1.5; }

/* ── Top nav ───────────────────────────────────────────── */
.tool-nav {
  position: sticky; top: 0; z-index: 10;
  background: rgba(251, 250, 247, 0.88);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--rule);
}
.tool-nav-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 0 1.5rem;
  display: flex; align-items: center; gap: 0.8rem; height: 60px;
}
.tool-nav-mark { font-weight: 700; letter-spacing: -0.01em; font-size: 1.02rem; color: var(--ink); flex-shrink: 0; }
.tool-nav-mark .dot { color: var(--amber); }
.tool-nav-sep { color: var(--rule-2); }
.tool-nav-title {
  color: var(--muted); font-size: 0.92rem; font-weight: 500;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
@media (max-width: 480px) { .tool-nav-title { display: none; } }

/* ── Page shell ────────────────────────────────────────── */
.tool-page {
  max-width: var(--maxw); margin: 0 auto; padding: clamp(2.5rem, 6vw, 4rem) 1.5rem 4rem;
}
.tool-title { margin-bottom: 0.9rem; }
.tool-intro { color: var(--muted); font-size: clamp(1rem, 2.2vw, 1.1rem); max-width: 60ch; margin-bottom: 2.4rem; }

/* ── Progress ──────────────────────────────────────────── */
.progress {
  font-size: 0.82rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--faint); margin: 0 0 1.8rem; padding-bottom: 0.7rem;
  border-bottom: 1px solid var(--rule);
}

/* ── Questions ─────────────────────────────────────────── */
.q-block { border: none; min-width: 0; padding: 1.6rem 0; margin: 0; border-top: 1px solid var(--rule); }
.q-block:first-of-type { border-top: none; padding-top: 0; }
.q-block legend { padding: 0; font-weight: 600; font-size: 1.02rem; color: var(--ink); margin: 0 0 0.9rem; }
.q-opts { display: flex; flex-direction: column; gap: 0.55rem; }

.opt {
  display: flex; align-items: flex-start; gap: 0.7rem;
  padding: 0.75rem 0.9rem; border: 1px solid var(--rule-2); border-radius: 8px;
  background: var(--card); cursor: pointer; font-size: 0.96rem; color: var(--ink);
  transition: border-color .12s ease, background .12s ease;
}
.opt:hover { border-color: var(--accent); }
.opt input { margin-top: 0.2rem; accent-color: var(--accent); flex-shrink: 0; }
.opt:has(input:checked) { border-color: var(--accent); background: color-mix(in srgb, var(--amber) 14%, var(--card)); }

/* ── Results ───────────────────────────────────────────── */
.results { border-top: 1px solid var(--rule); margin-top: 2.4rem; padding-top: 2.4rem; }
.results[hidden] { display: none; }

.band { margin-bottom: 2.2rem; }
.band-eyebrow {
  display: block; font-size: 0.74rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--accent); margin: 0 0 0.5rem;
}
.band-name { margin-bottom: 0.7rem; }
.band-copy { color: var(--muted); }

.section-label {
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--faint); margin: 0 0 1rem;
}

.dims { margin: 0 0 2.2rem; }
.dim-bar { margin-bottom: 1.1rem; }
.dim-bar-label { display: flex; justify-content: space-between; gap: 0.6rem; font-size: 0.9rem; margin-bottom: 0.35rem; }
.dim-bar-name { color: var(--ink); font-weight: 600; }
.dim-bar-pct { color: var(--faint); font-variant-numeric: tabular-nums; flex-shrink: 0; }
.dim-bar-track { height: 8px; border-radius: 4px; background: var(--rule-2); overflow: hidden; }
.dim-bar-fill { height: 100%; background: var(--accent); border-radius: 4px; }

.gap { padding: 1.3rem 0; border-top: 1px solid var(--rule); }
.gap:first-of-type { border-top: none; padding-top: 0; }
.gap p { color: var(--muted); margin-bottom: 0.8rem; }
.pattern-links { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.4rem; }
.pattern-links li { font-size: 0.92rem; padding-left: 1.1rem; position: relative; }
.pattern-links li::before { content: "–"; position: absolute; left: 0; color: var(--amber); }
.dim-bar .pattern-links { margin-top: 0.5rem; }

.advisory { border-left: 2px solid var(--amber); padding-left: 1rem; color: var(--ink); font-size: 0.97rem; margin: 1.6rem 0 0; }

/* ── Capture block ─────────────────────────────────────── */
.capture { border-top: 1px solid var(--rule); margin-top: 2.4rem; padding-top: 2.4rem; }
.capture .opt { align-items: center; margin-bottom: 1.8rem; }
.report-form { display: flex; flex-wrap: wrap; gap: 0.7rem; align-items: flex-start; margin-bottom: 0.6rem; }
.report-label { flex-basis: 100%; font-size: 0.88rem; font-weight: 600; color: var(--muted); margin-bottom: 0.1rem; }
.report-form input[type=email] { flex: 1 1 220px; }
.hp-field { position: absolute !important; left: -9999px !important; top: auto; width: 1px; height: 1px; overflow: hidden; }
.report-status { font-size: 0.9rem; color: var(--muted); min-height: 1.3em; margin: 0.5rem 0 1.2rem; }
.report-status.ok { color: var(--accent); }
.privacy-note { font-size: 0.84rem; color: var(--faint); max-width: 56ch; }

/* ── Footer ────────────────────────────────────────────── */
.tool-foot { max-width: var(--maxw); margin: 0 auto; padding: 2.4rem 1.5rem 3.2rem; border-top: 1px solid var(--rule); }
.tool-foot p { font-size: 0.84rem; color: var(--faint); margin: 0 0 0.7rem; }
.tool-foot .sibling-link { font-size: 0.92rem; }
.tool-foot .sibling-link a { color: var(--accent); font-weight: 600; }

/* ── Responsive ────────────────────────────────────────── */
@media (max-width: 560px) {
  body { font-size: 17px; }
  .report-form input[type=email] { flex-basis: 100%; }
}

/* ── Print ─────────────────────────────────────────────── */
@media print {
  .tool-nav, .capture, form button { display: none !important; }
}
