/* ══════════════════════════════════════════
   FREE TOOLS — .tool-* prefix
   Loaded by /tools/ and every tool page.

   ⚠ DOES NOT FOLLOW THE THEME RULE — see CLAUDE.md. Pages should be
   light-majority (~60–75% light) with dark reserved for the hero, one or two
   dividers, and the footer. These pages measure ~93% dark. That predates the
   rule being written down (2026-08-19). When next touched, convert: keep
   .tool-hero dark, move the form and result panels onto a light ground.

   Brand orange #ff9200 clears 8:1 on the near-black used here, so it is safe
   for text on these dark sections. On any light ground it drops to 2.15:1 —
   orange TEXT on light must switch to #9c4f00.
   ══════════════════════════════════════════ */

.tool-scope {
  --t-header: 77px;

  --t-bg: #f7f4ee;
  --t-surface: #ffffff;
  --t-surface-2: #eee7dc;
  --t-raised: #fbfaf7;

  --t-ink: #191714;
  --t-ink-2: #3d3832;
  --t-ink-3: #665f57;
  --t-ink-4: #81776d;

  --t-line: rgba(38, 31, 24, 0.12);
  --t-line-2: rgba(38, 31, 24, 0.22);

  --t-accent: #9c4f00;
  --t-accent-fill: #ff9200;
  --t-accent-soft: rgba(255, 146, 0, 0.11);
  --t-accent-line: rgba(156, 79, 0, 0.34);

  --t-good: #4ade80;

  --t-ease: cubic-bezier(0.16, 1, 0.3, 1);
  --t-measure: 68ch;

  background: var(--t-bg);
  color: var(--t-ink-2);
}
@media only screen and (min-width: 1200px) {
  .tool-scope { --t-header: 122px; }
}

/* ── Hero ── */
.tool-hero {
  padding: calc(var(--t-header) + 72px) 0 54px;
  background:
    radial-gradient(circle at 88% 24%, rgba(255, 146, 0, .14), transparent 30%),
    linear-gradient(145deg, #fffdf9 0%, #f4eee4 100%);
  border-bottom: 1px solid var(--t-line);
}
@media only screen and (max-width: 991px) {
  .tool-hero { padding: calc(var(--t-header) + 36px) 0 30px; }
}

.tool-crumbs {
  font-family: var(--font-body, "DM Sans", sans-serif);
  font-size: 13px;
  color: var(--t-ink-4);
  display: flex;
  gap: 9px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 22px;
}
.tool-crumbs a { color: var(--t-ink-3); text-decoration: none; transition: color .24s var(--t-ease); }
.tool-crumbs a:hover { color: var(--t-accent); }

.tool-h1 {
  font-family: var(--font-heading, "Inter", sans-serif) !important;
  font-size: clamp(2.1rem, 5.2vw, 3.7rem);
  line-height: 1.02;
  letter-spacing: -0.03em;
  font-weight: 400;
  color: var(--t-ink);
  margin: 0 0 18px;
  /* No hard <br>: the template hides every <br> under 767px without leaving
     a space behind it, which welds the words on either side together. */
  overflow-wrap: break-word;
}

.tool-dek {
  font-family: var(--font-body, "DM Sans", sans-serif);
  font-size: clamp(1rem, 1.4vw, 1.2rem);
  line-height: 1.55;
  color: var(--t-ink-3);
  max-width: 60ch;
  margin: 0 0 24px;
}

.tool-badges { display: flex; gap: 10px; flex-wrap: wrap; margin: 0; }
.tool-badge {
  font-family: var(--font-body, "DM Sans", sans-serif);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--t-ink-3);
  background: var(--t-surface);
  border: 1px solid var(--t-line);
  border-radius: 100px;
  padding: 6px 13px;
}
.tool-badge--free {
  color: var(--t-accent);
  background: var(--t-accent-soft);
  border-color: var(--t-accent-line);
}

/* ── Body ── */
.tool-body { padding: 58px 0 96px; }

/* ── Form ── */
.tool-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  margin-bottom: 34px;
}
@media only screen and (max-width: 767px) {
  .tool-form { grid-template-columns: 1fr; gap: 18px; }
}

.tool-field {
  background: var(--t-surface);
  border: 1px solid var(--t-line);
  border-radius: 16px;
  padding: 24px;
  margin: 0;
  min-width: 0;
}
/* The "what do you need" field carries six options, so it spans the row. */
.tool-field:nth-child(2) { grid-column: 1 / -1; }

.tool-legend {
  font-family: var(--font-body, "DM Sans", sans-serif);
  font-size: 15px;
  font-weight: 600;
  color: var(--t-ink);
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 15px;
  padding: 0;
  float: none;
  width: auto;
}
.tool-qnum {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--t-accent-soft);
  border: 1px solid var(--t-accent-line);
  color: var(--t-accent);
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}

.tool-select {
  width: 100%;
  min-height: 48px;
  background: var(--t-raised);
  border: 1px solid var(--t-line-2);
  border-radius: 8px;
  color: var(--t-ink);
  font-family: var(--font-body, "DM Sans", sans-serif);
  font-size: 15px;
  padding: 0 14px;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' fill='none'%3E%3Cpath d='M2.5 4.5 6 8l3.5-3.5' stroke='%23ff9200' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 38px;
}
.tool-select:focus-visible { outline: 2px solid var(--t-accent); outline-offset: 2px; }

.tool-checks {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 9px;
}
.tool-check, .tool-radio {
  display: flex;
  align-items: center;
  gap: 11px;
  /* 48px minimum touch target — the audience is on a phone, on a jobsite. */
  min-height: 48px;
  padding: 6px 12px;
  background: var(--t-raised);
  border: 1px solid var(--t-line);
  border-radius: 8px;
  cursor: pointer;
  font-family: var(--font-body, "DM Sans", sans-serif);
  font-size: 14.5px;
  color: var(--t-ink-2);
  transition: border-color .2s var(--t-ease), background .2s var(--t-ease);
}
.tool-check:hover, .tool-radio:hover { border-color: var(--t-line-2); }
.tool-check input, .tool-radio input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.tool-check-box, .tool-radio-dot {
  width: 19px;
  height: 19px;
  border: 1.5px solid var(--t-line-2);
  border-radius: 5px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  transition: all .2s var(--t-ease);
}
.tool-radio-dot { border-radius: 50%; }

.tool-check input:checked ~ .tool-check-box,
.tool-radio input:checked ~ .tool-radio-dot {
  background: var(--t-accent-fill);
  border-color: var(--t-accent-fill);
}
.tool-check input:checked ~ .tool-check-box::after {
  content: "";
  width: 9px;
  height: 5px;
  border-left: 2px solid #000;
  border-bottom: 2px solid #000;
  transform: rotate(-45deg) translate(1px, -1px);
}
.tool-radio input:checked ~ .tool-radio-dot::after {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #000;
}
.tool-check:has(input:checked), .tool-radio:has(input:checked) {
  border-color: var(--t-accent-line);
  background: var(--t-accent-soft);
}
.tool-check input:focus-visible ~ .tool-check-box,
.tool-radio input:focus-visible ~ .tool-radio-dot {
  outline: 2px solid var(--t-accent);
  outline-offset: 2px;
}

.tool-radios { display: flex; flex-wrap: wrap; gap: 9px; }
.tool-radios .tool-radio { flex: 1 1 auto; }

.tool-hint {
  font-family: var(--font-body, "DM Sans", sans-serif);
  font-size: 14px;
  color: var(--t-ink-4);
  margin: 0;
  grid-column: 1 / -1;
}

/* The header is fixed, so anything scrolled to needs to clear it or the
   panel labels end up hidden behind the bar. */
.tool-result { scroll-margin-top: calc(var(--t-header) + 24px); }

/* ── Result panels ── */
.tool-panels {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}
@media only screen and (max-width: 991px) {
  .tool-panels { grid-template-columns: 1fr; }
}

.tool-panel {
  background: var(--t-surface);
  border: 1px solid var(--t-line);
  border-radius: 16px;
  padding: 26px;
  min-width: 0;
}
.tool-panel--ours {
  background: linear-gradient(180deg, #fff8ed 0%, var(--t-surface) 100%);
  border-color: var(--t-accent-line);
}

.tool-panel-label {
  font-family: var(--font-body, "DM Sans", sans-serif);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--t-ink-4);
  margin: 0 0 12px;
}
.tool-panel--ours .tool-panel-label { color: var(--t-accent); }

.tool-panel-figure {
  font-family: var(--font-heading, "Inter", sans-serif);
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  line-height: 1.1;
  color: var(--t-ink);
  margin: 0 0 5px;
  overflow-wrap: break-word;
}
.tool-panel-sub {
  font-family: var(--font-body, "DM Sans", sans-serif);
  font-size: 13.5px;
  color: var(--t-ink-3);
  margin: 0 0 15px;
}

.tool-breakdown { list-style: none; margin: 0 0 14px; padding: 0; }
.tool-breakdown li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-family: var(--font-body, "DM Sans", sans-serif);
  font-size: 13.5px;
  color: var(--t-ink-3);
  padding: 7px 0;
  border-bottom: 1px solid var(--t-line);
}
.tool-breakdown li:last-child { border-bottom: 0; }
.tool-breakdown li span:last-child { color: var(--t-ink-2); white-space: nowrap; }

.tool-panel-note {
  font-family: var(--font-body, "DM Sans", sans-serif);
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--t-ink-4);
  margin: 0;
}
/* The "what this does not include" line. Deliberately not hidden in small
   grey text — an unfair comparison the reader sees through costs more trust
   than it wins, so the limits get a visible border. */
.tool-panel-note--caveat {
  color: var(--t-ink-3);
  border-left: 2px solid var(--t-accent);
  padding-left: 11px;
  margin-top: 12px;
}

/* ── The difference ── */
.tool-delta {
  background: var(--t-surface-2);
  border: 1px solid var(--t-line);
  border-radius: 16px;
  padding: 28px;
  text-align: left;
  margin-bottom: 18px;
}
.tool-delta-label {
  font-family: var(--font-body, "DM Sans", sans-serif);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--t-ink-4);
  margin: 0 0 8px;
}
.tool-delta-figure {
  font-family: var(--font-heading, "Inter", sans-serif);
  font-size: clamp(1.7rem, 4vw, 2.6rem);
  line-height: 1.05;
  color: var(--t-accent);
  margin: 0 0 10px;
  overflow-wrap: break-word;
}
.tool-delta-note {
  font-family: var(--font-body, "DM Sans", sans-serif);
  font-size: 13px;
  line-height: 1.6;
  color: var(--t-ink-4);
  margin: 0 auto;
  max-width: 62ch;
}

/* ── Share ── */
.tool-share {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 26px;
}
.tool-copy {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 16px;
  background: var(--t-surface);
  border: 1px solid var(--t-line-2);
  border-radius: 8px;
  color: var(--t-ink-2);
  font-family: var(--font-body, "DM Sans", sans-serif);
  font-size: 14px;
  cursor: pointer;
  transition: border-color .2s var(--t-ease), color .2s var(--t-ease);
}
.tool-copy:hover { border-color: var(--t-accent); color: var(--t-accent); }
.tool-share-note {
  font-family: var(--font-body, "DM Sans", sans-serif);
  font-size: 13px;
  color: var(--t-ink-4);
}

/* ── CTAs ── */
.tool-ctas { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 40px; }
.tool-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 20px;
  border-radius: 100px;
  border: 1px solid var(--t-line-2);
  background: var(--t-surface);
  color: var(--t-ink-2);
  font-family: var(--font-body, "DM Sans", sans-serif);
  font-size: 14.5px;
  font-weight: 500;
  text-decoration: none;
  transition: all .22s var(--t-ease);
}
.tool-cta:hover { border-color: var(--t-accent); color: var(--t-accent); }
.tool-cta--primary {
  background: var(--t-accent-fill);
  border-color: var(--t-accent-fill);
  color: #000;
  font-weight: 600;
}
.tool-cta--primary:hover { background: #ffa42b; border-color: #ffa42b; color: #000; }

/* ── Sources ── */
.tool-sources {
  background: var(--t-surface);
  border: 1px solid var(--t-line);
  border-radius: 12px;
  margin-bottom: 46px;
}
.tool-sources > summary {
  cursor: pointer;
  padding: 16px 20px;
  font-family: var(--font-body, "DM Sans", sans-serif);
  font-size: 14.5px;
  font-weight: 600;
  color: var(--t-ink);
  list-style: none;
  min-height: 48px;
  display: flex;
  align-items: center;
}
.tool-sources > summary::-webkit-details-marker { display: none; }
.tool-sources > summary::after {
  content: "+";
  margin-left: auto;
  color: var(--t-accent);
  font-size: 18px;
}
.tool-sources[open] > summary::after { content: "\2212"; }
.tool-sources-body { padding: 0 20px 20px; }
.tool-sources-body p,
.tool-sources-body li {
  font-family: var(--font-body, "DM Sans", sans-serif);
  font-size: 14px;
  line-height: 1.65;
  color: var(--t-ink-3);
}
.tool-sources-body ul { padding-left: 18px; margin: 14px 0; }
.tool-sources-body li { margin-bottom: 8px; }
.tool-sources-body strong { color: var(--t-ink-2); }
.tool-src { color: var(--t-ink-4); font-size: 13px; }
.tool-review-note { color: var(--t-ink-4) !important; font-size: 13px !important; }
.tool-sources-body a { color: var(--t-accent); }

/* ── Prose ── */
.tool-prose { max-width: var(--t-measure); margin-bottom: 46px; }
.tool-prose h2 {
  font-family: var(--font-heading, "Inter", sans-serif);
  font-size: clamp(1.35rem, 2.4vw, 1.8rem);
  line-height: 1.2;
  color: var(--t-ink);
  margin: 34px 0 14px;
}
.tool-prose h2:first-child { margin-top: 0; }
.tool-prose p {
  font-family: var(--font-body, "DM Sans", sans-serif);
  font-size: 16px;
  line-height: 1.72;
  color: var(--t-ink-2);
  margin: 0 0 16px;
}
.tool-prose a {
  color: var(--t-accent);
  text-decoration: underline;
  text-decoration-color: var(--t-accent-line);
  text-underline-offset: 3px;
}
.tool-serving { font-size: 14px !important; color: var(--t-ink-4) !important; }

/* ── FAQ ── */
.tool-faq { max-width: var(--t-measure); margin-bottom: 34px; }
.tool-faq h2 {
  font-family: var(--font-heading, "Inter", sans-serif);
  font-size: clamp(1.35rem, 2.4vw, 1.8rem);
  color: var(--t-ink);
  margin: 0 0 18px;
}
.tool-faq-item { border-bottom: 1px solid var(--t-line); }
.tool-faq-item > summary {
  cursor: pointer;
  padding: 16px 30px 16px 0;
  position: relative;
  font-family: var(--font-body, "DM Sans", sans-serif);
  font-size: 15.5px;
  font-weight: 600;
  color: var(--t-ink);
  list-style: none;
  min-height: 48px;
  display: flex;
  align-items: center;
}
.tool-faq-item > summary::-webkit-details-marker { display: none; }
.tool-faq-item > summary::after {
  content: "+";
  position: absolute;
  right: 4px;
  color: var(--t-accent);
  font-size: 18px;
}
.tool-faq-item[open] > summary::after { content: "\2212"; }
.tool-faq-item p {
  font-family: var(--font-body, "DM Sans", sans-serif);
  font-size: 15px;
  line-height: 1.68;
  color: var(--t-ink-3);
  margin: 0 0 18px;
  max-width: 64ch;
}

/* ── Related ── */
.tool-related {
  font-family: var(--font-body, "DM Sans", sans-serif);
  font-size: 14px;
  color: var(--t-ink-4);
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
  align-items: center;
  margin: 0;
  padding-top: 22px;
  border-top: 1px solid var(--t-line);
}
.tool-related-label { color: var(--t-ink-4); }
.tool-related a { color: var(--t-ink-2); text-decoration: none; transition: color .2s var(--t-ease); }
.tool-related a:hover { color: var(--t-accent); }

/* ── Tools hub ── */
.tool-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  grid-template-rows: repeat(2, minmax(150px, auto));
  gap: 16px;
  margin-bottom: 64px;
}
.tool-card {
  display: flex;
  flex-direction: column;
  background: var(--t-surface);
  border: 1px solid var(--t-line);
  border-radius: 18px;
  padding: 28px;
  text-decoration: none;
  transition: border-color .24s var(--t-ease), transform .24s var(--t-ease);
}
.tool-card:first-child {
  grid-row: 1 / 3;
  padding: clamp(30px, 4vw, 48px);
  background: linear-gradient(145deg, #fff 0%, #fff7ec 100%);
  border-color: var(--t-accent-line);
}
.tool-card:first-child .tool-card-title { font-size: clamp(1.7rem, 3vw, 2.45rem); max-width: 16ch; }
.tool-card:first-child .tool-card-desc { font-size: 16px; max-width: 48ch; }
.tool-card:hover { border-color: var(--t-accent-line); transform: translateY(-3px); }
.tool-card--soon { opacity: .72; pointer-events: none; background: rgba(255,255,255,.56); }
.tool-card-tag {
  font-family: var(--font-body, "DM Sans", sans-serif);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--t-accent);
  margin: 0 0 10px;
}
.tool-card-title {
  font-family: var(--font-heading, "Inter", sans-serif);
  font-size: 1.28rem;
  line-height: 1.22;
  color: var(--t-ink);
  margin: 0 0 10px;
}
.tool-card-desc {
  font-family: var(--font-body, "DM Sans", sans-serif);
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--t-ink-3);
  margin: 0 0 18px;
  flex: 1;
}
.tool-card-go {
  font-family: var(--font-body, "DM Sans", sans-serif);
  font-size: 14px;
  font-weight: 600;
  color: var(--t-accent);
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.tool-select option { background: #fff; color: var(--t-ink); }

@media only screen and (max-width: 767px) {
  .tool-grid { grid-template-columns: 1fr; grid-template-rows: auto; }
  .tool-card:first-child { grid-row: auto; }
  .tool-hero { padding-bottom: 42px; }
  .tool-body { padding: 42px 0 72px; }
}

@media print {
  .tool-form, .tool-ctas, .tool-share, .tool-sources { display: none !important; }
}
