/* Tools Page — Cold Email Spam Checker
   Designed on top of site.css globals. All selectors carry .tool-* or .tools-page
   prefixes so they stay scoped to this page and never leak into the main site. */

:root {
  --ink: #152b26;
  --green: #007f5b;
  --green-dark: #006648;
  --mint: #e4f7ed;
  --muted: #5c7264;
  --line: #dce5df;
  --bg: #f7faf8;
  --warn: #c8820e;
  --bad: #b5302d;
}

body.tools-page {
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, "Inter Fallback", system-ui, sans-serif;
}

/* ── Shared tokens ─────────────────────────────────────────── */
.tools-page .tool-hero,
.tools-page .tool-section,
.tools-page .tool-cta-strip {
  position: relative;
}

/* ── Tool Hero ─────────────────────────────────────────────── */
.tool-hero {
  padding: 88px 0 56px;
  text-align: center;
  background: linear-gradient(to bottom, #fff 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--line);
}

.tool-hero-inner {
  max-width: 680px;
  margin: 0 auto;
  padding: 0 6%;
}

.tool-kicker {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--green);
  margin: 0 0 14px;
}

.tool-hero h1 {
  font-family: Manrope, "Manrope Fallback", Inter, sans-serif;
  font-size: clamp(42px, 5.5vw, 72px);
  font-weight: 550;
  letter-spacing: -0.045em;
  line-height: 1.04;
  color: var(--ink);
  margin: 0 0 20px;
}

.tool-hero-desc {
  font-size: 1.0938rem;
  line-height: 1.75;
  color: var(--muted);
  margin: 0 auto 14px;
  max-width: 520px;
}

.tool-hero-note {
  font-size: 0.8125rem;
  color: var(--muted);
  opacity: 0.7;
  margin: 0;
}

/* ── Section spacing ───────────────────────────────────────── */
.tool-section {
  padding: 64px 0;
}
.tool-section + .tool-section {
  padding-top: 0;
}

/* ── Checker Grid ──────────────────────────────────────────── */
.tool-grid {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 5%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
}

@media (max-width: 820px) {
  .tool-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

/* ── Input column ──────────────────────────────────────────── */
.tool-input-col {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.tool-input-panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.04);
}

.tool-input-header {
  display: grid;
  grid-template-columns: 88px 1fr;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border-bottom: 1px solid #f0f4f2;
}

.tool-input-header:last-of-type {
  border-bottom: none;
}

.tool-input-header span {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.tool-input-header input {
  font-size: 0.9375rem;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 10px 12px;
  width: 100%;
  outline: none;
  background: #fcfdfc;
  color: var(--ink);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.tool-input-header input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(0, 127, 91, 0.12);
}

.tool-input-header input::placeholder {
  color: #a4b4ab;
}

.tool-input-panel textarea {
  width: 100%;
  border: none;
  border-radius: 0;
  padding: 16px 18px;
  font-size: 0.9375rem;
  line-height: 1.7;
  resize: vertical;
  min-height: 190px;
  outline: none;
  background: #fff;
  font-family: inherit;
  color: var(--ink);
}

.tool-input-panel textarea:focus {
  box-shadow: inset 0 0 0 3px rgba(0, 127, 91, 0.12);
}

.tool-input-panel textarea::placeholder {
  color: #a4b4ab;
}

/* Primary action button inside input panel */
.tool-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: calc(100% - 36px);
  padding: 14px 24px;
  background: var(--ink);
  color: #fff;
  border: 1px solid var(--ink);
  border-radius: 9px;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  min-height: 48px;
  margin: 16px 18px;
  transition: background 0.2s, transform 0.15s;
}

.tool-btn-primary:hover {
  background: var(--green);
  border-color: var(--green);
  transform: translateY(-1px);
}

.tool-input-hint {
  font-size: 0.75rem;
  color: var(--muted);
  opacity: 0.65;
  padding: 0 18px 16px;
  margin: 0;
}

/* Examples collapsible */
.tool-examples {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}

.tool-examples summary {
  padding: 13px 18px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  list-style: none;
  user-select: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

.tool-examples summary::before {
  content: "▸";
  font-size: 0.65rem;
  transition: transform 0.2s;
}

.tool-examples[open] summary::before {
  transform: rotate(90deg);
}

.tool-examples-grid {
  display: grid;
  gap: 8px;
  padding: 0 18px 16px;
}

.tool-example-btn {
  text-align: left;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px 15px;
  cursor: pointer;
  min-height: 44px;
  width: 100%;
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.tool-example-btn:hover {
  border-color: var(--green);
  box-shadow: 0 2px 8px rgba(0, 127, 91, 0.1);
}

.tool-example-btn strong {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.875rem;
  margin: 0 0 4px;
}

.tool-example-btn em {
  font-style: normal;
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 3px 8px;
  border-radius: 100px;
  flex-shrink: 0;
}

.tool-example-btn[data-example="bad"] em {
  background: #fdecec;
  color: var(--bad);
}

.tool-example-btn[data-example="good"] em {
  background: var(--mint);
  color: var(--green);
}

.tool-example-btn > span {
  display: block;
  font-size: 0.75rem;
  color: var(--muted);
  line-height: 1.55;
  margin: 0;
}

/* ── Results column ────────────────────────────────────────── */
.tool-results-col {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.tool-results-empty {
  background: #fff;
  border: 2px dashed var(--line);
  border-radius: 14px;
  padding: 48px 32px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.tool-results-empty p {
  font-family: Manrope, "Manrope Fallback", Inter, sans-serif;
  font-size: 1.25rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--ink);
}

.tool-results-empty span {
  font-size: 0.875rem;
  color: var(--muted);
}

/* display:flex above overrides the UA [hidden] rule; force-hide when toggled */
#empty-state[hidden] {
  display: none;
}

.tool-results-panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 24px;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.04);
}

/* Score row */
.tool-score-row {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.tool-score-circle {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  position: relative;
  flex-shrink: 0;
  background: conic-gradient(var(--score-color, var(--line)) var(--score-pct, 0%), #edf2ee 0%);
  transition: background 0.5s ease;
}

.tool-score-circle span {
  width: 62px;
  height: 62px;
  background: #fff;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: Manrope, "Manrope Fallback", Inter, sans-serif;
  font-size: 1.5rem;
  font-weight: 550;
  letter-spacing: -0.04em;
  color: var(--ink);
}

.tool-score-circle small {
  position: absolute;
  bottom: -18px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.625rem;
  color: var(--muted);
  white-space: nowrap;
}

.tool-score-label strong {
  font-family: Manrope, "Manrope Fallback", Inter, sans-serif;
  font-size: 1.0625rem;
  font-weight: 550;
  letter-spacing: -0.02em;
  display: block;
  margin: 0 0 4px;
  color: var(--ink);
}

.tool-score-label p {
  font-size: 0.8125rem;
  line-height: 1.6;
  color: var(--muted);
  margin: 0;
  max-width: 260px;
}

/* Warning list */
.tool-warnings,
.tool-positives {
  margin-bottom: 16px;
}

.tool-warnings h3,
.tool-positives h3 {
  font-family: Manrope, "Manrope Fallback", Inter, sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin: 0 0 10px;
}

.tool-warning-item {
  padding: 13px 15px;
  border-radius: 9px;
  margin-bottom: 7px;
  border: 1px solid var(--line);
  transition: border-color 0.2s;
}

.tool-warning-item:hover {
  border-color: var(--green);
}

.tool-warning-item.severity-3 {
  background: #fdf2f2;
  border-color: #f0c4c4;
}

.tool-warning-item.severity-2 {
  background: #fff9f0;
  border-color: #f0dcc4;
}

.tool-warning-item.severity-1 {
  background: #f5f9f7;
}

.tool-warning-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 5px;
}

.tool-warning-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ink);
}

.tool-sev-tag {
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 2px 7px;
  border-radius: 100px;
  white-space: nowrap;
}

.tool-sev-tag.high {
  background: #fdecec;
  color: var(--bad);
}

.tool-sev-tag.med {
  background: #fff9f0;
  color: var(--warn);
}

.tool-sev-tag.low {
  background: var(--mint);
  color: var(--green);
}

.tool-warning-fix {
  font-size: 0.8125rem;
  line-height: 1.6;
  color: var(--muted);
  margin: 0;
}

/* Positive items */
.tool-positive-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 13px;
  background: #f5faf7;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-bottom: 5px;
  font-size: 0.8125rem;
  color: var(--ink);
}

.tool-positive-icon {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--mint);
  color: var(--green);
  display: grid;
  place-items: center;
  font-size: 0.625rem;
  flex-shrink: 0;
}

.tool-no-warnings {
  font-size: 0.8125rem;
  color: var(--muted);
  opacity: 0.6;
  padding: 6px 0;
  margin: 0;
}

/* Results CTA */
.tool-results-cta {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.tool-results-cta a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--green);
  margin-bottom: 8px;
  transition: gap 0.2s;
}

.tool-results-cta a:hover {
  gap: 14px;
  text-decoration: underline;
}

.tool-results-cta p {
  font-size: 0.75rem;
  line-height: 1.65;
  color: var(--muted);
  margin: 0;
}

/* ── How it works ───────────────────────────────────────────── */
.tool-how-inner {
  max-width: 880px;
  margin: 0 auto;
  padding: 0 5%;
  text-align: center;
}

.tool-how-inner h2 {
  font-family: Manrope, "Manrope Fallback", Inter, sans-serif;
  font-size: clamp(26px, 3.5vw, 44px);
  font-weight: 550;
  letter-spacing: -0.045em;
  color: var(--ink);
  margin: 0 0 36px;
}

.tool-how-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

@media (max-width: 768px) {
  .tool-how-grid {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
}

@media (max-width: 480px) {
  .tool-how-grid {
    grid-template-columns: 1fr;
  }
}

.tool-how-item {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 22px 18px;
  text-align: left;
}

.tool-how-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 9px;
  background: var(--mint);
  color: var(--green);
  font-size: 1.0625rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.tool-how-item h3 {
  font-family: Manrope, "Manrope Fallback", Inter, sans-serif;
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 0 0 7px;
}

.tool-how-item p {
  font-size: 0.8125rem;
  line-height: 1.7;
  color: var(--muted);
  margin: 0;
}

/* ── CTA Strip ──────────────────────────────────────────────── */
.tool-cta-strip {
  background: var(--ink);
  color: #fff;
  padding: 64px 0;
  text-align: center;
}

.tool-cta-inner {
  max-width: 580px;
  margin: 0 auto;
  padding: 0 5%;
}

.tool-cta-inner h2 {
  font-family: Manrope, "Manrope Fallback", Inter, sans-serif;
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 550;
  letter-spacing: -0.045em;
  color: #fff;
  margin: 0 0 12px;
}

.tool-cta-inner p {
  font-size: 0.9375rem;
  line-height: 1.7;
  color: #a2bfae;
  margin: 0 0 28px;
}

.tool-cta-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
}

.tool-btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 26px;
  border-radius: 100px;
  font-size: 0.9375rem;
  font-weight: 600;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: transparent;
  min-height: 50px;
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s;
}

.tool-btn-ghost:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.5);
}

/* CTA-strip variant of the primary button */
.tool-cta-strip .tool-btn-primary {
  background: #fff;
  color: var(--ink);
  border-color: #fff;
  margin: 0;
  width: auto;
  padding: 13px 26px;
  border-radius: 100px;
  font-size: 0.9375rem;
}

.tool-cta-strip .tool-btn-primary:hover {
  background: var(--mint);
  border-color: var(--mint);
}

/* ── Suppress site-wide chrome on tools page ───────────────── */
body.tools-page .site-footer {
  display: none;
}

body.tools-page .cookie-banner {
  display: none;
}

body.tools-page #reading-progress {
  display: none;
}

/* ── Help content: how to use, score meaning, checks, FAQ ─────
   Reuses the tool tokens: .tool-section spacing, .tool-kicker,
   .tool-how-item cards and the dark .tool-cta-strip band. */

.tool-help-inner {
  max-width: 880px;
  margin: 0 auto;
  padding: 0 5%;
}

.tool-help-inner > .tool-kicker {
  text-align: center;
}

.tool-help-inner > h2 {
  font-family: Manrope, "Manrope Fallback", Inter, sans-serif;
  font-size: clamp(26px, 3.5vw, 44px);
  font-weight: 550;
  letter-spacing: -0.045em;
  color: var(--ink);
  margin: 0 0 18px;
  text-align: center;
}

.tool-help-lead {
  max-width: 620px;
  margin: 0 auto 36px;
  text-align: center;
  font-size: 1rem;
  line-height: 1.75;
  color: var(--muted);
}

.tool-help-sub {
  font-family: Manrope, "Manrope Fallback", Inter, sans-serif;
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 40px 0 12px;
}

.tool-help-sub:first-of-type {
  margin-top: 0;
}

.tool-help-inner p,
.tool-help-inner li {
  font-size: 0.9375rem;
  line-height: 1.8;
  color: var(--muted);
}

.tool-help-inner p {
  margin: 0 0 16px;
}

.tool-help-steps {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
  counter-reset: help-step;
}

.tool-help-steps li {
  position: relative;
  padding: 0 0 0 44px;
  counter-increment: help-step;
}

.tool-help-steps li::before {
  content: counter(help-step, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 2px;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--mint);
  color: var(--green);
  font-size: 0.75rem;
  font-weight: 700;
}

.tool-help-scores {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin: 20px 0 8px;
}

.tool-help-score {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px;
  text-align: left;
}

.tool-help-score strong {
  display: block;
  font-family: Manrope, "Manrope Fallback", Inter, sans-serif;
  font-size: 1.125rem;
  font-weight: 650;
  color: var(--ink);
  margin-bottom: 6px;
}

.tool-help-score span {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  margin-bottom: 8px;
}

.tool-help-score .dot-clean { background: #007f5b; }
.tool-help-score .dot-work { background: var(--warn); }
.tool-help-score .dot-risk { background: var(--bad); }

.tool-help-score p {
  font-size: 0.8125rem;
  margin: 0;
}

.tool-help-hint {
  font-size: 0.75rem;
  color: var(--muted);
  opacity: 0.8;
  margin: 0 0 8px;
}

.tool-help-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  margin: 14px 0 20px;
  overscroll-behavior-x: contain;
}

body.tools-page .tool-help-table-wrap:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 3px;
}

.tool-help-table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
  font-size: 0.8125rem;
  line-height: 1.6;
  background: #fff;
}

.tool-help-table th,
.tool-help-table td {
  text-align: left;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.tool-help-table thead th {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--bg);
}

.tool-help-table tbody th {
  font-weight: 600;
  color: var(--ink);
}

.tool-help-table td {
  color: var(--muted);
}

.tool-help-table .tool-help-table-note {
  display: block;
  font-size: 0.75rem;
  color: var(--muted);
  opacity: 0.8;
  padding: 10px 16px 14px;
  background: var(--bg);
  border-top: 1px dashed var(--line);
}

/* FAQ accordion, same visual language as .tool-examples */
.tool-faq {
  max-width: 880px;
  margin: 0 auto 8px;
  padding: 0 5%;
}

.tool-faq-item {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}

.tool-faq-item + .tool-faq-item {
  margin-top: 10px;
}

.tool-faq-item summary {
  padding: 15px 18px;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
  user-select: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
}

.tool-faq-item summary::-webkit-details-marker {
  display: none;
}

.tool-faq-item summary::after {
  content: "+";
  font-size: 1.125rem;
  font-weight: 400;
  color: var(--green);
  flex-shrink: 0;
  transition: transform 0.2s;
}

.tool-faq-item[open] summary::after {
  transform: rotate(45deg);
}

.tool-faq-answer {
  padding: 0 18px 16px;
}

.tool-faq-answer p {
  margin: 0;
  font-size: 0.875rem;
}

@media (max-width: 768px) {
  .tool-help-scores {
    grid-template-columns: 1fr;
  }
}

.tool-help-inner .tool-link {
  color: var(--green);
  text-decoration: underline;
  text-underline-offset: 3px;
}
