/* Tool pages, second design. Loaded instead of tool-batch.css when ks_tool_design is v2;
   tool-shell.css stays underneath and every rule here outranks it through body.ks-tool-v2.

   One system with the main app and the homepage, not a design of its own:
   colours are the canonical tokens, the table/buttons/country control repeat /app/,
   the call-to-action band and the FAQ repeat the homepage (.ksl-breaker, .ksl-faq-*). */

/* ───────────── page ───────────── */
body.ks-tool-v2,
body.ks-tool-v2 #page { background: var(--ks-c-bg, #f5f7fb); }
body.ks-tool-v2 .entry-content > .ks-tool-page-content,
body.ks-tool-v2 .ks-tool-page-content {
  display: flex; flex-direction: column; max-width: none !important; width: 100%; margin: 0 !important; padding: 0 !important;
  color: var(--ks-c-text, #0f172a); font-family: Inter, system-ui, -apple-system, sans-serif;
}
/* Gutenberg puts a block gap between the sections; the sections carry their own spacing. */
body.ks-tool-v2 .ks-tool-page-content > * { margin-block: 0 !important; }
/* The document asks for: links to the other tools first, the closing call to action after them. */
body.ks-tool-v2 .ks-tool-page-content > .ks-tool-related { order: 1; }
body.ks-tool-v2 .ks-tool-page-content > .ks-tool-faq ~ .ks-tool-cta { order: 2; }

/* ───────────── title ───────────── */
body.ks-tool-v2 .ks-tool-page-content .ks-tool-intro { max-width: none; margin: 0; padding: 36px 16px 22px; text-align: center; }
@media (min-width: 900px) {
  body.ks-tool-v2 .ks-tool-page-content:has(#ks-tool-batch[data-tool="explorer"]) .ks-tool-intro { padding-block: 28px 18px; }
}
body.ks-tool-v2 .ks-tool-page-content .ks-tool-intro h1 {
  margin: 0 0 12px; font-size: clamp(30px, 3.4vw, 46px); font-weight: 800; line-height: 1.1; letter-spacing: -1px; color: var(--ks-c-text, #0f172a);
}
body.ks-tool-v2 .ks-tool-page-content .ks-tool-intro p { max-width: 900px; margin: 0 auto; font-size: 18px; line-height: 1.55; color: var(--ks-c-sub, #475569); text-align: center; }
/* Its three lines are replaced by the strip under the form. Pages without that form keep them. */
body.ks-tool-v2 .ks-tool-page-content:has(.kst-root) > .ks-tool-trust { display: none; }

/* ───────────── workspace ───────────── */
body.ks-tool-v2 .kst-root { width: 100%; max-width: 1550px; margin: 0 auto; padding: 0 14px 28px; color: var(--ks-c-text, #0f172a); font: 15px/1.5 Inter, system-ui, -apple-system, sans-serif; letter-spacing: 0; }
body.ks-tool-v2 .kst-root *, body.ks-tool-v2 .kst-root *::before, body.ks-tool-v2 .kst-root *::after { box-sizing: border-box; }
body.ks-tool-v2 .kst-root [hidden] { display: none !important; }
body.ks-tool-v2 .kst-root .kst-card,
body.ks-tool-v2 .kst-root .kst-serp-form {
  background: var(--ks-c-white, #fff); border: 1px solid var(--ks-c-border, #e5e7eb); border-radius: 16px; box-shadow: var(--ks-c-shadow, 0 1px 2px rgba(0,0,0,.04), 0 2px 8px rgba(0,0,0,.03));
}

/* Form: the input area and the control block side by side, equally tall. */
body.ks-tool-v2 .kst-root .kst-form { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: stretch; margin: 0; padding: 24px; }
body.ks-tool-v2 .kst-root .kst-main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
body.ks-tool-v2 .kst-root .kst-side { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
body.ks-tool-v2 .kst-root .kst-side .kst-field { margin-bottom: 4px; }
body.ks-tool-v2 .kst-root .kst-field { position: relative; display: flex; flex-direction: column; min-width: 0; }
body.ks-tool-v2 .kst-root .kst-keyword-field { flex: 1 1 auto; }
body.ks-tool-v2 .kst-root label,
body.ks-tool-v2 .kst-root legend { display: block; margin: 0 0 10px; padding: 0; font-size: 15px; font-weight: 700; line-height: 1.4; color: var(--ks-c-text, #0f172a); }
body.ks-tool-v2 .kst-root textarea,
body.ks-tool-v2 .kst-root select,
body.ks-tool-v2 .kst-root input[type="text"] {
  display: block; width: 100%; min-width: 0; margin: 0; padding: 14px 16px; border: 1px solid var(--ks-c-border, #e5e7eb); border-radius: 12px;
  background: var(--ks-c-white, #fff); color: var(--ks-c-text, #0f172a); font: 400 16px/1.5 Inter, system-ui, sans-serif; box-shadow: none; outline: 0;
}
body.ks-tool-v2 .kst-root textarea { flex: 1 1 auto; min-height: 172px; resize: vertical; }
body.ks-tool-v2 .kst-root select,
body.ks-tool-v2 .kst-root input[type="text"] { height: 52px; padding-top: 0; padding-bottom: 0; }
body.ks-tool-v2 .kst-root textarea::placeholder,
body.ks-tool-v2 .kst-root input::placeholder { color: var(--ks-c-muted, #94a3b8); opacity: 1; }
body.ks-tool-v2 .kst-root textarea:focus,
body.ks-tool-v2 .kst-root select:focus,
body.ks-tool-v2 .kst-root input[type="text"]:focus { border-color: var(--ks-c-blue, #2563eb); box-shadow: 0 0 0 3px rgba(37, 99, 235, .12); }
body.ks-tool-v2 .kst-root [aria-invalid="true"] { border-color: var(--ks-c-red, #dc2626); }
body.ks-tool-v2 .kst-root #kst-count { position: absolute; right: 14px; bottom: 10px; padding: 0 6px; border-radius: 6px; background: rgba(255, 255, 255, .9); color: var(--ks-c-muted, #94a3b8); font-size: 12px; line-height: 1.6; pointer-events: none; }
body.ks-tool-v2 .kst-root #kst-count.kst-over-limit { color: var(--ks-c-red, #dc2626); font-weight: 600; }
body.ks-tool-v2 .kst-root .kst-form--seed #kst-count { display: none; }

/* Buttons. Astra paints every <button>; each state is restated so its colours never show through. */
body.ks-tool-v2 .kst-root .kst-button {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; width: auto; min-height: 52px; margin: 0; padding: 0 20px;
  border: 1px solid var(--ks-c-border, #e5e7eb); border-radius: 12px; background: var(--ks-c-white, #fff); color: var(--ks-c-text, #0f172a);
  font: 600 16px/1.2 Inter, system-ui, sans-serif; letter-spacing: 0; text-transform: none; text-decoration: none; white-space: normal; box-shadow: none; cursor: pointer; transition: background-color .15s ease, border-color .15s ease;
}
body.ks-tool-v2 .kst-root .kst-button:is(:hover, :focus) { background: var(--ks-c-bg, #f5f7fb); border-color: #cbd5e1; color: var(--ks-c-text, #0f172a); }
body.ks-tool-v2 .kst-root .kst-button.kst-primary { background: var(--ks-c-blue, #2563eb); border-color: var(--ks-c-blue, #2563eb); color: #fff; }
body.ks-tool-v2 .kst-root .kst-button.kst-primary:is(:hover, :focus) { background: var(--ks-c-blue-dark, #1d4ed8); border-color: var(--ks-c-blue-dark, #1d4ed8); color: #fff; }
body.ks-tool-v2 .kst-root .kst-button.kst-stop { border-color: #fecaca; color: var(--ks-c-red, #dc2626); }
body.ks-tool-v2 .kst-root .kst-button.kst-stop:is(:hover, :focus) { background: #fef2f2; border-color: #fca5a5; color: var(--ks-c-red, #dc2626); }
body.ks-tool-v2 .kst-root .kst-side .kst-button { width: 100%; }
body.ks-tool-v2 .kst-root button:disabled,
body.ks-tool-v2 .kst-root button:disabled:hover { cursor: default; opacity: 1; background: #f8fafc; border-color: #e2e8f0; color: #94a3b8; }
body.ks-tool-v2 .kst-root :is(button, a, input, textarea, select, .kst-table-scroll):focus-visible { outline: 3px solid #93c5fd; outline-offset: 2px; }
body.ks-tool-v2 .kst-root .kst-icon { display: inline-flex; flex: 0 0 20px; width: 20px; height: 20px; }
body.ks-tool-v2 .kst-root .kst-icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Country: the app's control. A native select cannot show a flag. */
body.ks-tool-v2 .kst-root .kst-country { position: relative; }
body.ks-tool-v2 .kst-root .kst-country-trigger {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; height: 52px; margin: 0; padding: 0 16px;
  border: 1px solid var(--ks-c-border, #e5e7eb); border-radius: 12px; background: var(--ks-c-white, #fff); color: var(--ks-c-text, #0f172a);
  font: 500 16px/1.2 Inter, system-ui, sans-serif; letter-spacing: 0; text-transform: none; text-align: left; box-shadow: none; cursor: pointer;
}
body.ks-tool-v2 .kst-root .kst-country-trigger:is(:hover, :focus) { background: var(--ks-c-white, #fff); border-color: #cbd5e1; color: var(--ks-c-text, #0f172a); }
body.ks-tool-v2 .kst-root .kst-country-trigger[aria-expanded="true"] { border-color: var(--ks-c-blue, #2563eb); }
body.ks-tool-v2 .kst-root .kst-country-trigger .kst-icon { color: var(--ks-c-sub, #475569); }
body.ks-tool-v2 .kst-root .kst-country-cur { display: flex; align-items: center; gap: 10px; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
body.ks-tool-v2 .kst-root .kst-flag { flex: 0 0 auto; font-size: 20px; line-height: 1; }
body.ks-tool-v2 .kst-root .kst-flag img.emoji { border-radius: 4px; }
body.ks-tool-v2 .kst-root .kst-country-drop {
  position: absolute; z-index: 40; top: calc(100% + 6px); left: 0; right: 0; padding: 8px; border: 1px solid var(--ks-c-border, #e5e7eb); border-radius: 12px;
  background: var(--ks-c-white, #fff); box-shadow: 0 12px 32px rgba(15, 23, 42, .14);
}
body.ks-tool-v2 .kst-root .kst-country-drop .kst-country-search { height: 40px; margin: 0 0 6px; padding: 0 12px; border-radius: 8px; font-size: 14px; }
body.ks-tool-v2 .kst-root .kst-country-list { max-height: 264px; overflow-x: hidden; overflow-y: auto; }
body.ks-tool-v2 .kst-root .kst-country-opt {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 38px; margin: 0; padding: 8px 12px; border: 0; border-radius: 8px; background: transparent;
  color: var(--ks-c-text, #0f172a); font: 400 14px/1.3 Inter, system-ui, sans-serif; letter-spacing: 0; text-transform: none; text-align: left; box-shadow: none; cursor: pointer;
}
body.ks-tool-v2 .kst-root .kst-country-opt .kst-flag { font-size: 18px; }
body.ks-tool-v2 .kst-root .kst-country-opt:is(:hover, :focus, .kst-active) { background: var(--ks-c-blue-light, #eff6ff); color: var(--ks-c-blue, #2563eb); }
body.ks-tool-v2 .kst-root .kst-country-opt.kst-active { font-weight: 600; }
body.ks-tool-v2 .kst-root .kst-country-sep { height: 1px; margin: 6px 4px; background: var(--ks-c-border, #e5e7eb); }
body.ks-tool-v2 .kst-root .kst-country-empty { padding: 12px; color: var(--ks-c-muted, #94a3b8); font-size: 14px; text-align: center; }

/* Hard / Soft: a segmented control, the same shape as Keyword / Domain in the app. */
body.ks-tool-v2 .kst-root .kst-mode,
body.ks-tool-v2 .kst-root .kst-serp-engines { display: flex; flex-wrap: wrap; align-items: center; gap: 0; min-width: 0; margin: 0; padding: 0; border: 0; }
body.ks-tool-v2 .kst-root .kst-mode legend,
body.ks-tool-v2 .kst-root .kst-serp-engines legend { float: none; width: 100%; }
body.ks-tool-v2 .kst-root .kst-mode label,
body.ks-tool-v2 .kst-root .kst-serp-engines label {
  position: relative; display: flex; align-items: center; justify-content: center; min-width: 110px; min-height: 44px; margin: 0; padding: 8px 20px;
  border: 1px solid var(--ks-c-border, #e5e7eb); background: var(--ks-c-white, #fff); color: var(--ks-c-sub, #475569); font-size: 15px; font-weight: 600; cursor: pointer;
}
body.ks-tool-v2 .kst-root :is(.kst-mode, .kst-serp-engines) label:first-of-type { border-radius: 10px 0 0 10px; }
body.ks-tool-v2 .kst-root :is(.kst-mode, .kst-serp-engines) label:last-of-type { border-left: 0; border-radius: 0 10px 10px 0; }
body.ks-tool-v2 .kst-root :is(.kst-mode, .kst-serp-engines) label:has(:checked) { background: var(--ks-c-blue-light, #eff6ff); border-color: var(--ks-c-blue-mid, #dbeafe); color: var(--ks-c-blue, #2563eb); }
body.ks-tool-v2 .kst-root :is(.kst-mode, .kst-serp-engines) label:has(:focus-visible) { z-index: 1; outline: 3px solid #93c5fd; outline-offset: 2px; }
body.ks-tool-v2 .kst-root :is(.kst-mode, .kst-serp-engines) input { position: absolute; width: 1px; height: 1px; opacity: 0; }

body.ks-tool-v2 .kst-root .kst-error { margin: 12px 4px 0; color: #b91c1c; font-size: 14px; line-height: 1.5; text-align: left; }
body.ks-tool-v2 .kst-root .kst-error a { color: inherit; text-decoration: underline; }
body.ks-tool-v2 .kst-root .kst-status { min-height: 0; margin: 8px 4px 0; color: var(--ks-c-sub, #475569); font-size: 13px; text-align: left; }
body.ks-tool-v2 .kst-root .kst-status:empty { display: none; }

/* The homepage strip (.ksl-proof), under the form. */
body.ks-tool-v2 .kst-proof {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 24px; width: fit-content; max-width: 100%; margin: 20px auto 0; padding: 12px 28px;
  border-radius: 999px; background: rgba(255, 255, 255, .7); color: var(--ks-c-text, #0f172a); font: 14px/1.6 Inter, system-ui, sans-serif;
}
body.ks-tool-v2 .kst-proof strong { font-weight: 700; }
body.ks-tool-v2 .kst-proof i { width: 1px; height: 16px; background: var(--ks-c-border, #e5e7eb); }
body.ks-tool-v2 .kst-proof .kst-stars { margin-right: -12px; color: #f59e0b; letter-spacing: 1px; }
/* Local SERP renders the strip next to its form, not inside it. */
body.ks-tool-v2 .ks-tool-page-content > .kst-proof { margin: 0 auto 28px !important; }

/* ───────────── results: the app's Keyword Ideas card ───────────── */
body.ks-tool-v2 .kst-root .kst-results { margin: 20px 0 0; overflow: hidden; border-radius: 12px; }
body.ks-tool-v2 .kst-root .kst-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 16px; padding: 18px 28px 16px; }
body.ks-tool-v2 .kst-root .kst-heading { display: flex; align-items: center; gap: 12px; min-width: 0; }
body.ks-tool-v2 .kst-root .kst-heading .kst-results-label { margin: 0; font-size: 20px; font-weight: 700; line-height: 36px; letter-spacing: 0; color: var(--ks-c-text, #0f172a); }
body.ks-tool-v2 .kst-root .kst-chip { padding: 4px 12px; border-radius: 999px; background: #f1f5f9; color: var(--ks-c-sub, #475569); font-size: 13px; font-weight: 500; line-height: 1.5; white-space: nowrap; }
body.ks-tool-v2 .kst-root .kst-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
body.ks-tool-v2 .kst-root .kst-actions .kst-button { min-height: 48px; padding: 0 18px; border-radius: 8px; font-size: 15px; font-weight: 500; }
body.ks-tool-v2 .kst-root .kst-actions .kst-button.kst-quiet { border-color: transparent; background: transparent; color: var(--ks-c-blue, #2563eb); }
body.ks-tool-v2 .kst-root .kst-actions .kst-button.kst-quiet:is(:hover, :focus) { background: var(--ks-c-blue-light, #eff6ff); border-color: transparent; color: var(--ks-c-blue-dark, #1d4ed8); }
body.ks-tool-v2 .kst-root .kst-actions .kst-button.kst-quiet:disabled { background: transparent; border-color: transparent; }
body.ks-tool-v2 .kst-root .kst-meta { margin: -6px 0 0; padding: 0 28px 12px; color: #64748b; font-size: 13px; line-height: 1.5; text-align: left; }
body.ks-tool-v2 .kst-root .kst-meta:empty { display: none; }
body.ks-tool-v2 .kst-root .kst-summary { display: flex; flex-wrap: wrap; gap: 6px 22px; padding: 0 28px 14px; }
body.ks-tool-v2 .kst-root .kst-summary p { margin: 0; color: var(--ks-c-sub, #475569); font-size: 13px; line-height: 1.5; text-align: left; overflow-wrap: anywhere; }
body.ks-tool-v2 .kst-root .kst-summary strong { color: var(--ks-c-text, #0f172a); }
body.ks-tool-v2 .kst-root .kst-copy-fallback { width: calc(100% - 56px); min-height: 100px; margin: 0 28px 14px; }

body.ks-tool-v2 .kst-root .kst-table-scroll { width: 100%; max-width: 100%; overflow-x: auto; border-top: 1px solid #d1dae5; }
body.ks-tool-v2 .kst-root .kst-table { width: 100%; min-width: 560px; margin: 0; border: 0; border-collapse: collapse; table-layout: fixed; }
body.ks-tool-v2 .kst-root .kst-table th,
body.ks-tool-v2 .kst-root .kst-table td {
  height: 46px; padding: 0 28px; border: 0; border-bottom: 1px solid #d1dae5; background: transparent; color: var(--ks-c-text, #0f172a);
  font-size: 13px; font-weight: 500; line-height: 1.4; text-align: left; vertical-align: middle; overflow-wrap: anywhere;
}
body.ks-tool-v2 .kst-root .kst-table th { color: #334155; font-weight: 600; }
body.ks-tool-v2 .kst-root .kst-table :is(th, td) + :is(th, td) { border-left: 1px solid #edf1f6; }
body.ks-tool-v2 .kst-root .kst-table tbody tr { transition: background-color .15s ease; }
body.ks-tool-v2 .kst-root .kst-table tbody tr:hover { background: #f8fafc; }
body.ks-tool-v2 .kst-root .kst-table tbody tr:last-child td { border-bottom: 0; }
body.ks-tool-v2 .kst-root .kst-table [data-column="volume"] { width: 20%; }
body.ks-tool-v2 .kst-root .kst-table [data-column="kd"] { width: 15%; }
body.ks-tool-v2 .kst-root .kst-table [data-column="intent"] { width: 18%; }
body.ks-tool-v2 .kst-root .kst-table [data-column="category"],
body.ks-tool-v2 .kst-root .kst-table [data-column="group"] { width: 34%; }
body.ks-tool-v2 .kst-root .kst-table .kst-remove-col { width: 64px; padding: 0; text-align: center; }
body.ks-tool-v2 .kst-root .kst-keyword-cell { display: flex; align-items: center; gap: 12px; min-width: 0; }
body.ks-tool-v2 .kst-root .kst-table thead .kst-keyword-cell { gap: 18px; }
body.ks-tool-v2 .kst-root .kst-checkbox {
  position: relative; flex: 0 0 18px; width: 18px; height: 18px; margin: 0; padding: 0; border: 1px solid #cbd5e1; border-radius: 4px; background: #fff;
  -webkit-appearance: none; appearance: none; cursor: pointer;
}
body.ks-tool-v2 .kst-root .kst-checkbox:checked,
body.ks-tool-v2 .kst-root .kst-checkbox:indeterminate { border-color: var(--ks-c-blue, #2563eb); background: var(--ks-c-blue, #2563eb); }
body.ks-tool-v2 .kst-root .kst-checkbox:checked::after { content: ""; position: absolute; left: 5px; top: 1px; width: 5px; height: 10px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
body.ks-tool-v2 .kst-root .kst-checkbox:indeterminate::after { content: ""; position: absolute; left: 3px; top: 7px; width: 10px; height: 2px; background: #fff; }
body.ks-tool-v2 .kst-root .kst-checkbox:disabled { cursor: default; background: #f8fafc; }
body.ks-tool-v2 .kst-root .kst-kw-link { min-width: 0; color: var(--ks-c-blue, #2563eb); text-decoration: none !important; }
body.ks-tool-v2 .kst-root .kst-kw-link:hover { text-decoration: underline !important; }
body.ks-tool-v2 .kst-root .kst-sort {
  display: inline-flex; align-items: center; gap: 6px; width: auto; min-height: 36px; margin: 0; padding: 0; border: 0; border-radius: 2px; background: transparent;
  color: #334155; font: 600 13px/1.4 Inter, system-ui, sans-serif; letter-spacing: 0; text-transform: none; white-space: nowrap; box-shadow: none; cursor: pointer;
}
body.ks-tool-v2 .kst-root .kst-sort:is(:hover, :focus) { background: transparent; border: 0; color: var(--ks-c-blue, #2563eb); }
body.ks-tool-v2 .kst-root th[aria-sort="ascending"] .kst-sort,
body.ks-tool-v2 .kst-root th[aria-sort="descending"] .kst-sort { color: var(--ks-c-blue, #2563eb); }
body.ks-tool-v2 .kst-root th[aria-sort="ascending"] .kst-sort::after { content: "↑"; }
body.ks-tool-v2 .kst-root th[aria-sort="descending"] .kst-sort::after { content: "↓"; }
body.ks-tool-v2 .kst-root .kst-kd { display: inline-flex; align-items: center; gap: 10px; }
body.ks-tool-v2 .kst-root .kst-estimate-mark { color: var(--ks-c-muted, #475569); margin-inline-end: .15em; }
body.ks-tool-v2 .kst-root .kst-dot { display: inline-block; width: 10px; height: 10px; border-radius: 999px; background: #cbd5e1; }
body.ks-tool-v2 .kst-root .kst-dot-green { background: #16a34a; }
body.ks-tool-v2 .kst-root .kst-dot-orange { background: #ea580c; }
body.ks-tool-v2 .kst-root .kst-dot-red { background: #dc2626; }
body.ks-tool-v2 .kst-root .kst-intent-badges { display: inline-flex; gap: 6px; }
body.ks-tool-v2 .kst-root .kst-ib { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 6px; font-size: 12px; font-weight: 700; line-height: 1; }
body.ks-tool-v2 .kst-root .kst-ib-i { background: var(--ks-c-blue-light, #eff6ff); color: var(--ks-c-blue, #2563eb); }
body.ks-tool-v2 .kst-root .kst-ib-n { background: var(--ks-c-purple-bg, #ede9fe); color: var(--ks-c-purple, #7c3aed); }
body.ks-tool-v2 .kst-root .kst-ib-c { background: var(--ks-c-warning-bg, #ffedd5); color: var(--ks-c-warning, #d97706); }
body.ks-tool-v2 .kst-root .kst-ib-t { background: var(--ks-c-green-bg, #dcfce7); color: var(--ks-c-green, #16a34a); }
body.ks-tool-v2 .kst-root .kst-unknown { color: var(--ks-c-muted, #94a3b8); }
body.ks-tool-v2 .kst-root .kst-skeleton {
  display: inline-block; width: 52px; height: 10px; border-radius: 999px; vertical-align: middle;
  background: linear-gradient(90deg, #eef2f7 25%, #dfe6ee 37%, #eef2f7 63%); background-size: 400% 100%; animation: kst-shimmer 1.2s ease infinite;
}
@keyframes kst-shimmer { from { background-position: 100% 50%; } to { background-position: 0 50%; } }
@media (prefers-reduced-motion: reduce) { body.ks-tool-v2 .kst-root .kst-skeleton { animation: none; } }
body.ks-tool-v2 .kst-root .kst-remove {
  display: inline-flex; align-items: center; justify-content: center; width: 28px; min-height: 28px; height: 28px; margin: 0; padding: 0; border: 0; border-radius: 6px; background: transparent;
  color: #64748b; font: 600 14px/1 Inter, system-ui, sans-serif; text-transform: none; box-shadow: none; cursor: pointer;
}
body.ks-tool-v2 .kst-root .kst-remove:is(:hover, :focus) { background: #fee2e2; color: var(--ks-c-red, #dc2626); }
body.ks-tool-v2 .kst-root .kst-remove:disabled,
body.ks-tool-v2 .kst-root .kst-remove:disabled:hover { background: transparent; border: 0; color: #cbd5e1; }
body.ks-tool-v2 .kst-root .kst-row-failed { display: block; margin-left: 8px; color: #b91c1c; font-size: 12px; }
body.ks-tool-v2 .kst-root .kst-table td.kst-empty { height: 96px; color: #64748b; text-align: center; }

/* Local SERP: its own form markup, put into the same card. */
body.ks-tool-v2 .kst-root .kst-serp-form { max-width: none; margin: 0; padding: 24px; }
body.ks-tool-v2 .kst-root .kst-serp-form .kst-serp-field label { margin-bottom: 10px; }
body.ks-tool-v2 .kst-root .kst-serp-form .kst-serp-engines { margin-bottom: 20px; }
body.ks-tool-v2 .kst-root .kst-serp-form .kst-serp-actions { margin-top: 20px; }
body.ks-tool-v2 .kst-root .kst-serp-actions .kst-primary { width: auto; min-width: 200px; }
body.ks-tool-v2 .kst-root .kst-serp-source { max-width: none; margin: 16px 4px 0; padding: 0; border: 0; }
body.ks-tool-v2 .kst-root .kst-private { margin: 0 0 16px; padding: 14px 18px; border-radius: 12px; background: var(--ks-c-blue-light, #eff6ff); }
body.ks-tool-v2 .kst-root .kst-private p { margin: 4px 0 0; color: #334155; font-size: 14px; text-align: left; }

/* Daily limit dialog (mounted on <body>). */
body.ks-tool-v2 .kst-quota-dialog { width: min(480px, calc(100% - 32px)); max-height: calc(100dvh - 32px); overflow: auto; padding: 28px; border: 1px solid var(--ks-c-border, #e5e7eb); border-radius: 16px; background: #fff; color: var(--ks-c-text, #0f172a); font-family: Inter, system-ui, sans-serif; box-shadow: 0 24px 60px rgba(15, 23, 42, .22); }
body.ks-tool-v2 .kst-quota-dialog::backdrop { background: rgb(15 23 42 / 40%); }
body.ks-tool-v2 .kst-quota-dialog h2 { margin: 0 0 16px; font-size: 22px; line-height: 1.3; }
body.ks-tool-v2 .kst-quota-dialog p { margin: 10px 0; overflow-wrap: anywhere; }
body.ks-tool-v2 .kst-quota-dialog > div { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 22px; }
body.ks-tool-v2 .kst-quota-dialog a { color: var(--ks-c-blue, #2563eb); font-weight: 600; }
body.ks-tool-v2 .kst-quota-dialog button,
body.ks-tool-v2 .kst-quota-dialog button:is(:hover, :focus-visible) { padding: 10px 16px; border: 1px solid var(--ks-c-border, #e5e7eb); border-radius: 10px; background: #f8fafc; color: var(--ks-c-text, #0f172a); font: 600 14px/1.4 Inter, system-ui, sans-serif; text-transform: none; white-space: normal; }

/* ───────────── pricing: full width ───────────── */
body.ks-tool-v2 .ks-tool-pricing { background: var(--ks-c-bg, #f5f7fb); }
body.ks-tool-v2 .ks-tool-pricing .ks-pricing-wrap { max-width: 1550px; margin: 0 auto; padding: 56px 14px 64px; background: transparent; }
body.ks-tool-v2 .ks-tool-pricing .ks-pricing-head { margin-bottom: 28px; }
body.ks-tool-v2 .ks-tool-pricing .ks-hero-title { font-size: clamp(28px, 3vw, 40px); line-height: 1.15; letter-spacing: -1px; }
body.ks-tool-v2 .ks-tool-pricing .ks-hero-sub { max-width: 640px; margin-left: auto; margin-right: auto; text-align: center; }
body.ks-tool-v2 .ks-tool-pricing :is(.ks-bill-note, .ks-pnote) { text-align: center; }
body.ks-tool-v2 .ks-tool-pricing .ks-pricing-grid { max-width: none; gap: 20px; }

/* ───────────── call to action: the homepage band (.ksl-breaker) ───────────── */
body.ks-tool-v2 .ks-tool-page-content .ks-tool-cta { max-width: none; margin: 0; padding: 56px 32px; border: 0; background: var(--ks-c-blue, #2563eb); text-align: center; }
body.ks-tool-v2 .ks-tool-page-content .ks-tool-cta :is(h2, h3) { max-width: 1200px; margin: 0 auto 8px; color: #fff; font-size: 36px; font-weight: 400; line-height: 1.2; letter-spacing: -.8px; }
body.ks-tool-v2 .ks-tool-page-content .ks-tool-cta :is(h2, h3) strong { font-weight: 800; }
body.ks-tool-v2 .ks-tool-page-content .ks-tool-cta p { max-width: 560px; margin: 0 auto; color: rgba(255, 255, 255, .72); font-size: 20px; line-height: 1.6; text-align: center; }
body.ks-tool-v2 .ks-tool-page-content .ks-tool-cta .wp-block-buttons { justify-content: center; margin: 24px 0 0; }
body.ks-tool-v2 .ks-tool-page-content .ks-tool-cta .wp-block-button__link {
  display: inline-block; min-height: 0; padding: 14px 32px; border: 0; border-radius: 999px; background: #fff; color: var(--ks-c-blue, #2563eb);
  font: 650 15px/1.2 Inter, system-ui, sans-serif; text-decoration: none !important;
}
body.ks-tool-v2 .ks-tool-page-content .ks-tool-cta .wp-block-button__link:is(:hover, :focus, :focus-visible) { background: var(--ks-c-blue-mid, #dbeafe); color: var(--ks-c-blue, #2563eb); }

/* ───────────── SEO copy ───────────── */
body.ks-tool-v2 .ks-tool-page-content .ks-tool-editorial { max-width: none; margin: 0; padding: 72px max(24px, calc((100% - 1120px) / 2)); background: var(--ks-c-white, #fff); }
body.ks-tool-v2 .ks-tool-page-content .ks-tool-editorial h2 { font-size: 30px; font-weight: 700; line-height: 1.2; letter-spacing: -.6px; }
body.ks-tool-v2 .ks-tool-page-content .ks-tool-editorial a { color: var(--ks-c-blue, #2563eb); text-decoration: underline !important; text-underline-offset: 3px; }
body.ks-tool-v2 .ks-tool-page-content .ks-tool-editorial-row img { border-radius: 12px; }
body.ks-tool-v2 .ks-tool-page-content .ks-tool-editorial > :last-child { margin-bottom: 0; }

/* ───────────── FAQ: the homepage one (.ksl-faq-*) on native details blocks ───────────── */
body.ks-tool-v2 .ks-tool-page-content .ks-tool-faq { max-width: none; margin: 0; padding: 88px 32px; background: var(--ks-c-bg, #f5f7fb); }
body.ks-tool-v2 .ks-tool-page-content .ks-tool-faq > h2 { margin: 0 0 28px; font-size: 42px; font-weight: 700; line-height: 1.1; letter-spacing: -1.5px; text-align: center; }
body.ks-tool-v2 .ks-tool-page-content .ks-tool-faq > h2::before { content: "FAQ"; display: block; margin: 0 0 12px; color: var(--ks-c-blue, #2563eb); font-size: 12px; font-weight: 700; line-height: 1.6; letter-spacing: 1px; text-transform: uppercase; }
body.ks-tool-v2 .ks-tool-page-content .ks-tool-faq .wp-block-details { max-width: 740px; margin: 0 auto; padding: 0; border: 0; border-bottom: 1px solid var(--ks-c-border, #e5e7eb); }
body.ks-tool-v2 .ks-tool-page-content .ks-tool-faq .wp-block-details summary {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 0; list-style: none; color: var(--ks-c-text, #0f172a);
  font-size: 16px; font-weight: 600; line-height: 1.6; letter-spacing: -.2px; cursor: pointer;
}
body.ks-tool-v2 .ks-tool-page-content .ks-tool-faq .wp-block-details summary::-webkit-details-marker { display: none; }
body.ks-tool-v2 .ks-tool-page-content .ks-tool-faq .wp-block-details summary::marker { content: ""; }
body.ks-tool-v2 .ks-tool-page-content .ks-tool-faq .wp-block-details summary::after {
  content: "▾"; display: flex; flex: 0 0 30px; align-items: center; justify-content: center; width: 30px; height: 30px; border: 1.5px solid var(--ks-c-border, #e5e7eb); border-radius: 50%;
  color: var(--ks-c-sub, #475569); font-size: 12px; line-height: 1; transition: transform .25s ease, color .25s ease, border-color .25s ease;
}
body.ks-tool-v2 .ks-tool-page-content .ks-tool-faq .wp-block-details[open] > summary::after { border-color: var(--ks-c-blue, #2563eb); color: var(--ks-c-blue, #2563eb); transform: rotate(180deg); }
body.ks-tool-v2 .ks-tool-page-content .ks-tool-faq .wp-block-details > :not(summary) { margin: 0; padding: 0 0 20px; color: var(--ks-c-sub, #475569); font-size: 15px; line-height: 1.7; text-align: left; }

/* ───────────── other tools ───────────── */
body.ks-tool-v2 .ks-tool-page-content .ks-tool-related { max-width: 1550px; width: 100%; margin: 0 auto; padding: 8px 14px 64px; background: transparent; }
body.ks-tool-v2 .ks-tool-page-content .ks-tool-related-card { padding: 40px 48px 44px; border: 1px solid var(--ks-c-border, #e5e7eb); border-radius: 20px; background: var(--ks-c-white, #fff); box-shadow: var(--ks-c-shadow, 0 1px 2px rgba(0,0,0,.04), 0 2px 8px rgba(0,0,0,.03)); }
body.ks-tool-v2 .ks-tool-page-content .ks-tool-related h3 { margin: 0 0 28px; color: var(--ks-c-text, #0f172a); font-size: 28px; font-weight: 700; line-height: 1.25; letter-spacing: -.5px; overflow-wrap: anywhere; }
body.ks-tool-v2 .ks-tool-page-content .ks-tool-related ul { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px 32px; margin: 0; padding: 0; list-style: none; }
body.ks-tool-v2 .ks-tool-page-content .ks-tool-related li { min-width: 0; margin: 0; padding: 0; overflow-wrap: anywhere; }
body.ks-tool-v2 .ks-tool-page-content .ks-tool-related li a { color: var(--ks-c-blue, #2563eb); font-size: 18px; font-weight: 500; line-height: 1.4; text-decoration: underline !important; text-underline-offset: 4px; }
body.ks-tool-v2 .ks-tool-page-content .ks-tool-related li a:is(:hover, :focus) { color: var(--ks-c-blue-dark, #1d4ed8); }
body.ks-tool-v2 .ks-tool-page-content .ks-tool-related-all { margin: 40px 0 0; text-align: center; }
body.ks-tool-v2 .ks-tool-page-content .ks-tool-related-button {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 56px; padding: 0 44px; border-radius: 12px; background: var(--ks-c-blue, #2563eb); color: #fff;
  font: 600 17px/1.2 Inter, system-ui, sans-serif; text-decoration: none !important; transition: background-color .15s ease;
}
body.ks-tool-v2 .ks-tool-page-content .ks-tool-related-button:is(:hover, :focus) { background: var(--ks-c-blue-dark, #1d4ed8); color: #fff; }
body.ks-tool-v2 .ks-tool-page-content .ks-tool-related-button:focus-visible { outline: 3px solid #93c5fd; outline-offset: 3px; }

/* ───────────── narrow screens ───────────── */
@media (max-width: 1024px) {
  body.ks-tool-v2 .kst-root .kst-form { grid-template-columns: minmax(0, 1fr) 280px; gap: 18px; padding: 18px; }
  body.ks-tool-v2 .kst-root .kst-toolbar,
  body.ks-tool-v2 .kst-root .kst-meta,
  body.ks-tool-v2 .kst-root .kst-summary { padding-left: 18px; padding-right: 18px; }
  body.ks-tool-v2 .kst-root .kst-table th,
  body.ks-tool-v2 .kst-root .kst-table td { padding: 0 18px; }
  body.ks-tool-v2 .ks-tool-page-content .ks-tool-related-card { padding: 32px 28px 36px; }
}
@media (max-width: 782px) {
  body.ks-tool-v2 .ks-tool-page-content .ks-tool-intro { padding: 26px 16px 18px; }
  body.ks-tool-v2 .ks-tool-page-content .ks-tool-intro p { font-size: 16px; }
  body.ks-tool-v2 .kst-root { padding: 0 12px 24px; }
  body.ks-tool-v2 .kst-root .kst-form { grid-template-columns: minmax(0, 1fr); gap: 16px; padding: 16px; }
  body.ks-tool-v2 .kst-root .kst-country-drop .kst-country-search { font-size: 16px; }
  body.ks-tool-v2 .kst-root textarea { min-height: 148px; }
  body.ks-tool-v2 .kst-root .kst-toolbar { flex-direction: column; align-items: stretch; padding: 16px 14px 12px; }
  body.ks-tool-v2 .kst-root .kst-actions .kst-button { flex: 1 1 auto; min-height: 44px; max-width: 100%; padding: 8px 10px; overflow-wrap: normal; }
  body.ks-tool-v2 .kst-root .kst-meta,
  body.ks-tool-v2 .kst-root .kst-summary { padding-left: 14px; padding-right: 14px; }
  body.ks-tool-v2 .kst-root .kst-table th,
  body.ks-tool-v2 .kst-root .kst-table td { height: 44px; padding: 0 14px; }
  body.ks-tool-v2 .kst-root .kst-copy-fallback { width: calc(100% - 28px); margin: 0 14px 12px; }
  body.ks-tool-v2 .kst-proof { gap: 8px 16px; padding: 12px 18px; border-radius: 16px; }
  body.ks-tool-v2 .kst-proof i { display: none; }
  body.ks-tool-v2 .ks-tool-pricing .ks-pricing-wrap { padding: 40px 12px 48px; }
  body.ks-tool-v2 .ks-tool-page-content .ks-tool-cta { padding: 48px 20px; }
  body.ks-tool-v2 .ks-tool-page-content .ks-tool-cta :is(h2, h3) { font-size: 28px; }
  body.ks-tool-v2 .ks-tool-page-content .ks-tool-cta p { font-size: 17px; }
  body.ks-tool-v2 .ks-tool-page-content .ks-tool-editorial { padding: 48px 16px; }
  body.ks-tool-v2 .ks-tool-page-content .ks-tool-editorial h2 { font-size: 24px; }
  body.ks-tool-v2 .ks-tool-page-content .ks-tool-faq { padding: 56px 20px; }
  body.ks-tool-v2 .ks-tool-page-content .ks-tool-faq > h2 { font-size: 30px; letter-spacing: -1px; }
  body.ks-tool-v2 .ks-tool-page-content .ks-tool-related { padding: 0 12px 48px; }
  body.ks-tool-v2 .ks-tool-page-content .ks-tool-related-card { padding: 24px 18px 28px; border-radius: 16px; }
  body.ks-tool-v2 .ks-tool-page-content .ks-tool-related h3 { margin-bottom: 20px; font-size: 22px; }
  body.ks-tool-v2 .ks-tool-page-content .ks-tool-related ul { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 20px; }
  body.ks-tool-v2 .ks-tool-page-content .ks-tool-related li a { font-size: 16px; }
  body.ks-tool-v2 .ks-tool-page-content .ks-tool-related-button { width: 100%; padding: 0 20px; }
}
@media (max-width: 480px) {
  body.ks-tool-v2 .ks-tool-page-content .ks-tool-related ul { grid-template-columns: minmax(0, 1fr); }
}

/* ───────────── all tools (catalog page) ───────────── */
/* The catalog has no workspace, so the plugin does not print its full-width overrides there. */
body.ks-tool-v2 .site-content .ast-container,
body.ks-tool-v2 #primary .ast-article-single,
body.ks-tool-v2 .ast-article-single,
body.ks-tool-v2 .entry-content { max-width: none !important; width: auto !important; padding-left: 0 !important; padding-right: 0 !important; }
body.ks-tool-v2 .ast-article-single,
body.ks-tool-v2 .entry-content { background: transparent !important; }
body.ks-tool-v2 #primary { margin-top: 0; margin-bottom: 0; }
/* The theme customiser caps articles at 900px with !important; the same selector plus the body class outranks it. */
body.ks-tool-v2 .site .site-content #primary .ast-article-single { max-width: none !important; width: auto !important; margin-left: 0 !important; margin-right: 0 !important; padding: 0 !important; }
body.ks-tool-v2 .ast-article-single { padding-top: 0 !important; padding-bottom: 0 !important; }
body.ks-tool-v2 .ks-tools-hub .ks-hub-directory {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; width: 100%; max-width: 1550px; margin: 0 auto; padding: 8px 14px 64px;
}
/* Rows of two come from the editor; the grid lays the twelve cards out by itself. */
body.ks-tool-v2 .ks-tools-hub .ks-hub-row { display: contents; }
body.ks-tool-v2 .ks-tools-hub .ks-hub-row > .wp-block-column { display: flex; min-width: 0; margin: 0; }
body.ks-tool-v2 .ks-tools-hub .ks-hub-card {
  display: flex; flex-direction: column; width: 100%; padding: 22px; border: 1px solid var(--ks-c-border, #e5e7eb); border-radius: 16px; background: var(--ks-c-white, #fff);
  box-shadow: var(--ks-c-shadow, 0 1px 2px rgba(0,0,0,.04), 0 2px 8px rgba(0,0,0,.03)); transition: box-shadow .2s ease, transform .2s ease;
}
body.ks-tool-v2 .ks-tools-hub .ks-hub-card:hover { box-shadow: 0 10px 28px rgba(15, 23, 42, .09); transform: translateY(-2px); }
body.ks-tool-v2 .ks-tools-hub .ks-hub-card .wp-block-image { margin: 0 0 18px; }
body.ks-tool-v2 .ks-tools-hub .ks-hub-card img { border: 1px solid var(--ks-c-border-light, #f3f4f6); border-radius: 10px; background: var(--ks-c-bg, #f5f7fb); }
body.ks-tool-v2 .ks-tools-hub .ks-hub-card h2 { margin: 0 0 10px; font-size: 20px; font-weight: 700; line-height: 1.3; letter-spacing: -.3px; color: var(--ks-c-text, #0f172a); }
body.ks-tool-v2 .ks-tools-hub .ks-hub-card p { margin: 0 0 18px; font-size: 15px; line-height: 1.6; color: var(--ks-c-sub, #475569); text-align: left; }
body.ks-tool-v2 .ks-tools-hub .ks-tool-link { margin-top: auto; }
body.ks-tool-v2 .ks-tools-hub .ks-tool-link a {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 20px; border: 1px solid var(--ks-c-border, #e5e7eb); border-radius: 10px; background: var(--ks-c-white, #fff);
  color: var(--ks-c-blue, #2563eb); font-size: 15px; font-weight: 600; text-decoration: none !important; transition: background-color .15s ease, border-color .15s ease;
}
body.ks-tool-v2 .ks-tools-hub .ks-tool-link a:is(:hover, :focus) { background: var(--ks-c-blue-light, #eff6ff); border-color: var(--ks-c-blue-mid, #dbeafe); color: var(--ks-c-blue-dark, #1d4ed8); }
@media (max-width: 1100px) { body.ks-tool-v2 .ks-tools-hub .ks-hub-directory { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 680px) {
  body.ks-tool-v2 .ks-tools-hub .ks-hub-directory { grid-template-columns: minmax(0, 1fr); gap: 16px; padding: 4px 12px 48px; }
  body.ks-tool-v2 .ks-tools-hub .ks-hub-card { padding: 18px; }
}
