/* Help centre editor components: the diff view (hcx-diff), the Google result preview (hcx-serp) and the length
   hints (hcx-len). Built on /ds/tokens.css; flat: 1 px lines, no gradients, no glows. The one exception is the
   Google preview: it keeps Google's own light look in both themes, with Google's colours named once below. */

/* ---------- diff view ---------- */
/* Ligatures off: Manrope draws "--" as one dash, "->" as an arrow and "|---|" as "|--|", and a diff of raw
   Markdown must show every character as typed. */
.hcx-diff { container: hcx-diff / inline-size; display: flex; flex-direction: column; gap: 24px; min-width: 0; font-variant-ligatures: none; font-feature-settings: "calt" 0, "liga" 0; }
.hcx-sum { display: flex; align-items: center; gap: 8px; font-size: var(--fs-base); font-weight: 800; line-height: 1.35; }
.hcx-sum svg { flex: none; color: var(--muted); }
.hcx-sum--none svg { color: var(--success); }
.hcx-h { margin-bottom: 10px; color: var(--muted); font-size: var(--fs-sm); font-weight: 700; text-align: left; }

/* Changed settings. The value columns share the width; a long value wraps. */
.hcx-ftbl { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: var(--fs-md); }
.hcx-ftbl th, .hcx-ftbl td { padding: 10px 16px 10px 0; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; line-height: 1.5; }
.hcx-ftbl thead th { padding-top: 0; color: var(--muted); font-size: var(--fs-xs); font-weight: 700; }
.hcx-ftbl tbody tr:last-child > * { border-bottom: 0; }
.hcx-ftbl th:last-child, .hcx-ftbl td:last-child { padding-right: 0; }
.hcx-ftbl .hcx-fk { width: 22%; font-weight: 700; }
.hcx-v { white-space: pre-wrap; overflow-wrap: anywhere; }
.hcx-unset { color: var(--muted); }
.hcx-cl { display: none; }

/* Words and blocks. Removed: struck through. Added: underlined and bold. Never colour alone. */
.hcx-del { color: var(--error); text-decoration: line-through; text-decoration-thickness: 1.5px; }
.hcx-ins { color: var(--success); font-weight: 800; text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
.hcx-gap { margin-left: .3em; }
.hcx-blocks { display: flex; flex-direction: column; gap: 8px; }
.hcx-blk { min-width: 0; padding: 10px 14px 12px; border: 1px solid var(--line); border-left: 3px solid var(--info); border-radius: var(--r-md); }
.hcx-blk--add { border-left-color: var(--success); }
.hcx-blk--del { border-left-color: var(--error); }
.hcx-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; margin-bottom: 4px; color: var(--muted); font-size: var(--fs-xs); font-weight: 600; line-height: 1.4; }
.hcx-kind { display: inline-flex; align-items: center; gap: 4px; color: var(--text); font-weight: 800; }
.hcx-blk--add .hcx-kind { color: var(--success); }
.hcx-blk--del .hcx-kind { color: var(--error); }
.hcx-where { overflow-wrap: anywhere; }
.hcx-txt { font-size: var(--fs-md); line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
.hcx-note { margin-top: 6px; color: var(--muted); font-size: var(--fs-xs); font-weight: 600; }

/* A run of unchanged paragraphs, folded behind one button. */
.hcx-fold { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 36px; padding: 6px 12px; border: 1px dashed var(--line-strong); border-radius: var(--r-md); background: none; color: var(--muted); font-size: var(--fs-sm); font-weight: 700; text-align: left; transition: background-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease); }
.hcx-fold:hover { background: var(--panel-2); color: var(--text); }
.hcx-fold svg { flex: none; transition: transform var(--t-fast) var(--ease); }
.hcx-fold[aria-expanded="true"] svg { transform: rotate(180deg); }
.hcx-fold-p { margin-top: 8px; padding: 10px 14px 12px; border: 1px solid var(--line); border-left-width: 3px; border-radius: var(--r-md); color: var(--muted); }
.hcx-fold-p .hcx-txt + .hcx-txt { margin-top: 8px; }

/* Narrow view: each setting stacks, with the column names shown next to the values. */
@container hcx-diff (max-width: 599.98px) {
  .hcx-ftbl, .hcx-ftbl tbody, .hcx-ftbl tr, .hcx-ftbl th, .hcx-ftbl td { display: block; width: auto; }
  .hcx-ftbl caption { display: block; }
  .hcx-ftbl thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .hcx-ftbl tbody tr { padding: 12px 0; border-bottom: 1px solid var(--line); }
  .hcx-ftbl tbody tr:first-child { padding-top: 2px; }
  .hcx-ftbl tbody tr:last-child { border-bottom: 0; padding-bottom: 0; }
  .hcx-ftbl th, .hcx-ftbl td, .hcx-ftbl .hcx-fk { padding: 0; border: 0; width: auto; }
  .hcx-ftbl td { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 12px; margin-top: 6px; }
  .hcx-cl { display: block; color: var(--muted); font-size: var(--fs-xs); font-weight: 700; line-height: 21px; overflow-wrap: anywhere; }
}

/* ---------- Google result preview ---------- */
.hcx-serp {
  /* Google's own colours (light results page). On #FFFFFF: text 16:1, grey 7.9:1, blue 12:1. */
  --hcx-g-page: #FFFFFF; --hcx-g-text: #202124; --hcx-g-grey: #4D5156; --hcx-g-blue: #1A0DAB; --hcx-g-chip: #F1F3F4; --hcx-g-line: #DADCE0;
  max-width: 652px; margin: 0; padding: 16px 20px 18px; background: var(--hcx-g-page); border: 1px solid var(--line); border-radius: var(--r-lg);
  color: var(--hcx-g-text); font-family: Arial, sans-serif; font-weight: 400; line-height: 1.3;
}
.hcx-serp-top { display: flex; align-items: center; gap: 12px; min-width: 0; }
.hcx-serp-ic { display: grid; place-items: center; flex: none; width: 28px; height: 28px; border: 1px solid var(--hcx-g-line); border-radius: 50%; background: var(--hcx-g-chip); color: var(--hcx-g-text); }
.hcx-serp-site { display: flex; flex-direction: column; min-width: 0; }
.hcx-serp-name { overflow: hidden; font-size: 14px; line-height: 20px; text-overflow: ellipsis; white-space: nowrap; }
.hcx-serp-url { overflow: hidden; color: var(--hcx-g-grey); font-size: 12px; line-height: 18px; text-overflow: ellipsis; white-space: nowrap; }
.hcx-serp-title { margin: 8px 0 4px; color: var(--hcx-g-blue); font-size: 20px; line-height: 26px; overflow-wrap: anywhere; }
.hcx-serp-desc { color: var(--hcx-g-grey); font-size: 14px; line-height: 22px; overflow-wrap: anywhere; }
.hcx-serp .hcx-empty { color: var(--hcx-g-grey); }

/* ---------- length hints ---------- */
.hcx-len { display: flex; align-items: flex-start; gap: 6px; color: var(--muted); font-size: var(--fs-sm); font-weight: 600; line-height: 20px; }
.hcx-len svg { flex: none; margin-top: 2px; }
.hcx-len--ok svg { color: var(--success); }
.hcx-len--warn { color: var(--warning); }
.hcx-len--bad { color: var(--error); }
