/* Free-tools suite (/tools/). Loaded only on tool pages, after landing.css +
   app.css, so all :root tokens and .btn / .field / .kicker exist. Statuses and
   verdicts are plain text with a color class - never badges. */

.nn-hidden { display: none !important; }

/* ─── Page scaffolding ─── */
.tools-page { min-height: calc(100vh - 76px - 84px); }
.tool-hero { padding: 84px 0 10px; }
.tool-hero-intro { margin-bottom: 24px; }
.tool-hero-intro h1 { margin-inline: auto; font-size: clamp(38px, 4.4vw, 60px); }
.tool-hero-intro .lead { max-width: 720px; margin-inline: auto; }
.tool-section { padding: 56px 0; }
.tool-section.alt { background: var(--paper); }
.tool-section-intro { margin-bottom: 42px; }
.tool-section-intro h2 { font-size: clamp(28px, 3.4vw, 44px); }
.tool-section-intro .lead { max-width: 680px; margin-inline: auto; font-size: clamp(16px, 1.5vw, 19px); }
.tool-form-section { padding-top: 22px; }

/* ─── Tool panel (form card) ─── */
.tool-panel {
  width: min(calc(100% - 48px), 640px);
  margin-inline: auto;
}
.tool-shell {
  padding: 34px 32px;
  border: 1px solid var(--ink);
  border-radius: var(--r);
  background: #fff;
  box-shadow: var(--shadow);
}
.tool-shell .field:last-of-type { margin-bottom: 20px; }
.field .field-label { display: block; margin-bottom: 8px; font-size: 13px; font-weight: 850; letter-spacing: -0.01em; }
.field select,
.field textarea,
.field input[type="tel"],
.field input[type="time"] {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  font: inherit;
  font-size: 15px;
  color: var(--ink);
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}
.field select { min-height: 52px; padding-block: 0; }
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--ink);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(255, 201, 0, 0.35);
}
.field textarea { resize: vertical; }
.tool-field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.tool-field-grid .field.span-2 { grid-column: 1 / -1; }

/* Consent + honeypot */
.tool-consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 20px;
  font-size: 13.5px;
  line-height: 1.55;
  color: #4f4f49;
  cursor: pointer;
}
.tool-consent input { margin-top: 3px; accent-color: var(--yellow); }
.ts-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Status area (analyzing rotator / errors / success) */
.tool-status {
  margin-bottom: 18px;
  padding: 13px 16px;
  border-radius: 12px;
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.5;
}
.tool-status.is-ok { color: var(--green); background: #e9f6ee; border: 1px solid #bfe3cd; }
.tool-status.is-bad { color: #c0392b; background: #fbeae8; border: 1px solid #f1c9c3; }
.tool-status.is-busy { color: var(--grey); background: var(--paper); border: 1px solid var(--line); }

/* Buttons */
.tool-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.tool-actions > .btn { flex: 1 1 0; min-width: 0; }
.tools-page .btn { cursor: pointer; font-family: inherit; }
.tools-page .btn:disabled { opacity: 0.65; pointer-events: none; }
.tools-page .btn.small { min-height: 40px; padding: 0 16px; font-size: 13px; border-radius: 10px; }

/* Mode toggle (keyword-ideas) */
.tool-mode-group { display: flex; flex-wrap: wrap; gap: 8px; }
.tool-mode-btn {
  padding: 9px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 13.5px;
  font-weight: 800;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}
.tool-mode-btn:hover { border-color: var(--ink); }
.tool-mode-btn.is-active { background: var(--ink); border-color: var(--ink); color: #fff; }

/* ─── Results ─── */
.tool-result {
  margin-top: 22px;
  padding: 24px 24px 22px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
}
.tool-result-headline { margin: 0 0 4px; font-size: 16px; font-weight: 850; letter-spacing: -0.01em; }
.tool-result-list { margin: 12px 0 0; padding-left: 20px; }
.tool-result-list li { margin-bottom: 7px; font-size: 14px; line-height: 1.55; color: #33332c; }
.tool-note { margin: 14px 0 0; font-size: 13.5px; line-height: 1.55; color: var(--grey); }
.tool-eyebrow {
  margin: 0 0 10px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--grey);
}
.tool-center { text-align: center; }
.tool-bignum { margin: 0; font-size: 52px; font-weight: 850; letter-spacing: -0.04em; line-height: 1; }
.tool-attribution { margin: 14px 0 0; font-size: 12px; color: var(--grey); }
.tool-attribution a { text-decoration: underline; color: inherit; }
.tool-attribution a:hover { color: var(--ink); }

/* Result rows (checks, metrics, facts, examples) */
.tool-rows { margin-top: 14px; }
.tool-row { display: flex; align-items: flex-start; gap: 16px; padding: 12px 0; border-top: 1px solid var(--line); }
.tool-row:first-child { border-top: 0; }
.tool-row-status { flex: 0 0 96px; font-size: 13.5px; font-weight: 850; }
.tool-row-status.wide { flex-basis: 110px; }
.tool-row-body { min-width: 0; flex: 1; }
.tool-row-label { margin: 0; font-size: 14px; font-weight: 700; color: var(--ink); }
.tool-row-detail { margin: 2px 0 0; font-size: 12.5px; line-height: 1.5; color: var(--grey); overflow-wrap: anywhere; }
.tool-kv { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 11px 0; border-top: 1px solid var(--line); margin: 0; }
.tool-kv:first-child { border-top: 0; }
.tool-kv dt, .tool-kv .kv-label { margin: 0; font-size: 14px; color: #4f4f49; }
.tool-kv dd, .tool-kv .kv-value { margin: 0; font-size: 14px; font-weight: 800; color: var(--ink); text-align: right; }
.tool-kv .kv-value.dim { color: var(--grey); font-weight: 700; }

/* Keyword-ideas rows + intent word (plain text, never a badge) */
.ki-row { padding: 12px 0; border-top: 1px solid var(--line); }
.ki-row:first-child { border-top: 0; }
.tool-row-intent { margin: 3px 0 0; font-size: 12px; font-weight: 850; }

/* Competitor-gap example rows + AI-visibility samples */
.kv-keyword { font-size: 14px; font-weight: 800; color: var(--ink); }
.kv-vol { font-size: 14px; color: #4f4f49; text-align: right; }
.av-sample { display: block; padding: 10px 0; border-top: 1px solid var(--line); font-size: 14px; font-weight: 800; color: var(--ink); }
.av-sample:first-child { border-top: 0; }
#cg-examples, #av-samples { list-style: none; margin: 14px 0 0; padding: 0; }

/* Plain-text status colors (never badges) */
.t-ok { color: #188038; }
.t-bad { color: #c0392b; }
.t-warn { color: #b45309; }
.t-dim { color: var(--grey); }
.t-info { color: #2b6cb0; }

/* Blog health / AI visibility verdicts */
.bh-verdict { margin: 0 0 6px; font-size: 30px; font-weight: 850; letter-spacing: -0.02em; }
.bh-sentence { margin: 4px 0 0; font-size: 14px; line-height: 1.6; color: #33332c; }
.bh-sentence.strong { font-weight: 800; color: var(--ink); }
.av-verdict { margin: 0; font-size: 18px; font-weight: 850; line-height: 1.4; }

/* Domain rating score */
.dr-score-line { margin: 10px 0 0; }
.dr-score { font-size: 60px; font-weight: 850; letter-spacing: -0.04em; line-height: 1; }
.dr-score-max { font-size: 24px; font-weight: 800; color: rgba(18, 18, 15, 0.35); }
.dr-band { margin: 8px 0 0; font-size: 18px; font-weight: 850; }

/* ─── SERP preview mock (meta-grader) - mimics Google's result typography ─── */
.serp-card { background: #fff; }
.serp-mock { font-family: Arial, Helvetica, sans-serif; }
.serp-head { display: flex; align-items: center; gap: 8px; }
.serp-favicon {
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--paper);
  border: 1px solid var(--line);
  font-size: 12px;
  font-weight: 800;
  color: #4f4f49;
}
.serp-url { font-size: 13px; color: #4d5156; overflow-wrap: anywhere; }
.serp-title { margin: 7px 0 0; font-size: 20px; line-height: 1.3; color: #1a0dab; overflow-wrap: anywhere; }
.serp-meta { margin: 4px 0 0; font-size: 14px; line-height: 1.45; color: #4d5156; overflow-wrap: anywhere; }
.serp-missing { font-style: italic; opacity: 0.6; }

/* Rewrite block (meta-grader) + JSON-LD result head (schema-generator) */
.tool-rewrite-block { margin-top: 16px; }
.tool-rewrite-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.tool-rewrite-row p { margin: 4px 0 0; font-size: 14px; line-height: 1.55; color: var(--ink); flex: 1; }
.tool-rewrite-row .tool-result-headline { margin: 0; }

/* ─── PageSpeed dials: pure CSS conic-gradient ring, no chart lib ─── */
.ps-dials { margin-top: 18px; display: flex; flex-wrap: wrap; justify-content: center; gap: 32px 56px; }
.ps-dial-wrap { display: flex; flex-direction: column; align-items: center; }
.ps-dial {
  width: 136px;
  height: 136px;
  border-radius: 50%;
  background: conic-gradient(var(--dial-color) var(--dial-angle), #e8eaed 0deg);
  display: flex;
  align-items: center;
  justify-content: center;
}
.ps-dial-inner {
  width: 108px;
  height: 108px;
  border-radius: 50%;
  background: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.ps-dial-value { font-size: 30px; font-weight: 850; letter-spacing: -0.02em; }
.ps-dial-outof { font-size: 11px; color: var(--grey); }
.ps-dial-label { margin: 10px 0 0; font-size: 14px; font-weight: 800; }
.ps-verdict { margin: 18px 0 0; font-size: 14px; font-weight: 700; text-align: center; color: var(--ink); }

/* ─── Schema generator dynamic rows ─── */
.sg-rows { display: grid; gap: 12px; margin-bottom: 12px; }
.sg-row { padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.sg-days { display: flex; flex-wrap: wrap; gap: 6px; }
.sg-day {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}
.sg-day input { accent-color: var(--yellow); }
.sg-times { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 12px; font-size: 14px; }
.sg-times input[type="time"] {
  width: auto;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  font: inherit;
  font-size: 14px;
}
.sg-remove { margin-left: auto; border: 0; background: none; padding: 0; font: inherit; font-size: 12px; font-weight: 850; color: #c0392b; cursor: pointer; }
.sg-row .sg-input {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
  font: inherit;
  font-size: 14px;
  margin-bottom: 8px;
}
.sg-row .sg-input:focus { outline: none; border-color: var(--ink); background: #fff; }
.sg-code {
  margin: 14px 0 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  font-size: 12px;
  line-height: 1.6;
  overflow-x: auto;
  white-space: pre;
  color: var(--ink);
}

/* ─── Explainer cards + hub cards ─── */
.tool-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.tool-card {
  display: flex;
  flex-direction: column;
  padding: 26px 24px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}
.tool-card h2, .tool-card h3 { margin: 0 0 8px; font-size: 19px; line-height: 1.3; letter-spacing: -0.02em; }
.tool-card p { margin: 0; font-size: 14px; line-height: 1.6; color: #565650; flex: 1; }
.tool-card-link { color: inherit; text-decoration: none; transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease; }
.tool-card-link:hover { transform: translateY(-3px); border-color: var(--ink); box-shadow: 0 14px 30px rgba(18, 18, 15, 0.1); }
.tool-card-cta { margin-top: 16px; font-size: 13.5px; font-weight: 850; color: var(--ink); }

/* Shared "what you get" card */
.tool-deliverables-section { padding-top: 34px; padding-bottom: 56px; }
.tool-deliverables-card {
  display: grid;
  grid-template-columns: minmax(220px, .72fr) minmax(0, 1.28fr);
  align-items: start;
  gap: clamp(34px, 6vw, 84px);
  padding: clamp(36px, 5vw, 64px);
  border-radius: 28px;
  background: var(--ink);
  color: #fff;
}
.tool-deliverables-heading h2 { margin: 0; max-width: 360px; font-size: clamp(32px, 4vw, 52px); line-height: 1.04; }
.tool-checklist { margin: 0; padding: 0; list-style: none; }
.tool-checklist li {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 15px 0;
  border-bottom: 1px solid rgba(255,255,255,.16);
  font-size: 15.5px;
  line-height: 1.55;
  color: #fff;
}
.tool-checklist li:first-child { padding-top: 3px; }
.tool-checklist li:last-child { padding-bottom: 0; border-bottom: 0; }
.tool-checklist .tick {
  flex: 0 0 10px;
  width: 10px;
  height: 10px;
  margin-top: .48em;
  border-radius: 50%;
  background: var(--yellow);
}

/* ─── Responsive ─── */
@media (max-width: 1000px) {
  .tool-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 680px) {
  .tool-hero { padding-top: 56px; }
  .tool-section { padding: 42px 0; }
  .tool-panel { width: calc(100% - 28px); }
  .tool-shell { padding: 26px 20px; }
  .tool-grid { grid-template-columns: 1fr; }
	.tool-deliverables-section { padding-top: 24px; }
	.tool-deliverables-card { grid-template-columns: 1fr; gap: 30px; padding: 34px 24px; border-radius: 22px; }
  .tool-field-grid { grid-template-columns: 1fr; }
  .tool-actions > .btn { flex-basis: 100%; width: 100%; }
  .ps-dials { gap: 24px; }
  .tool-row-status { flex-basis: 84px; }
}
