/* EN 60204-1 Checker — scoped styles.
 * Design tokens follow the #cpfa service-page system (CRN and IEC 61439
 * pages, 2026-11-29 rewrite, V. reference = CRN page): navy #0b2545 +
 * brass #b78a3c on warm paper #f6f3ec. Restores the 2026-11-29 16:50 PED
 * re-skin: the brand-blue batch of 18:39 was a misread — the
 * 61439 page itself carries zero brand blue and uses this navy/brass
 * system, verified by a live fetch the same evening. Fallbacks keep the
 * tool usable standalone (local test page has no site variables).
 * All selectors live under #certpi-tool-root (V1.3 §4.5), except the print
 * rules at the bottom, which must reach the page body (copy-protection
 * plugin override) and the theme chrome. Mobile-first.
 * The supplies table (.ct-supplies) follows the CRN nested-table style:
 * navy header row, white body, warm rules. */
#certpi-tool-root {
  --dark-1: #081a33; --dark-2: #0b2545; --dark-3: #11335c; --dark-4: #1d4e89;
  --accent: #b78a3c; --accent-2: #c9a35b; --accent-hover: #8f6a2a;
  --bg: #f6f3ec; --surface: #ffffff; --surface-2: #efeadf;
  --ink: #13202e; --ink-2: #46586b; --muted: #5c6b7a;
  --heading: #0b2545;
  --line: #d8d0c1; --line-strong: #c4b896;
  --accent-ink: #1a1206;
  --field: #ffffff; --chip: #efeadf;
  --cat-sep: #5b7a68; --cat-2: #b07d0a; --cat-4: #cf222e; --cat-out: #75807a;
  --shadow: 0 1px 2px rgba(11,37,69,.06), 0 8px 24px rgba(11,37,69,.08);
  box-sizing: border-box; font-family: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", "Source Han Sans SC", "Noto Sans SC", sans-serif; color: var(--ink); line-height: 1.75; max-width: 1080px; margin: 0 auto; padding: 12px; font-size: 15px; background: var(--bg); }
#certpi-tool-root *, #certpi-tool-root *::before, #certpi-tool-root *::after { box-sizing: border-box; }
@media (prefers-color-scheme: dark) {
  /* Dark mode uses literal values: a darkened warm system (navy blocks,
   * brass accents), so the tool stays readable in dark mode. */
  #certpi-tool-root {
    --dark-1: #081a33; --dark-2: #0b2545; --dark-3: #11335c; --dark-4: #1d4e89;
    --accent: #c9a35b; --accent-2: #c9a35b; --accent-hover: #d4b56e;
    --bg: #081a33; --surface: #0b2545; --surface-2: #11335c;
    --ink: #f6f3ec; --ink-2: #cdd9e8; --muted: #a9bdd6;
    --heading: #ffffff;
    --line: #1d4e89; --line-strong: #2c4d75;
    --accent-ink: #1a1206;
    --field: #0e2242; --chip: #16304d;
    --cat-sep: #7fae94; --cat-2: #e0aa2e; --cat-4: #f0564f; --cat-out: #93a198;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.35);
  }
}
#certpi-tool-root .ct-title { font-size: 1.45rem; line-height: 1.3; margin: 0 0 4px; font-weight: 700; color: #fff; }
#certpi-tool-root h2 { font-size: 1.2rem; margin: 18px 0 6px; color: var(--heading); }
#certpi-tool-root h3 { font-size: 1.05rem; margin: 20px 0 6px; border-top: 1px solid var(--line); padding-top: 14px; color: var(--heading); }
#certpi-tool-root h4 { font-size: 0.98rem; margin: 12px 0 4px; color: var(--ink-2); }
#certpi-tool-root p { margin: 6px 0; }
#certpi-tool-root a { color: var(--accent); }
#certpi-tool-root .ct-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; background: linear-gradient(155deg, var(--dark-1), var(--dark-4)); color: #fff; border: 0; border-radius: 12px; padding: 40px 32px; margin-bottom: 10px; }
#certpi-tool-root .ct-subtitle { color: #cbd5e3; margin: 0; }
#certpi-tool-root .ct-lang { flex: none; background: transparent; border: 1px solid rgba(255,255,255,.35); color: #cbd5e3; border-radius: 999px; padding: 6px 16px; cursor: pointer; font-size: 0.9rem; font-weight: 600; }
#certpi-tool-root .ct-version { font-size: 0.82rem; color: var(--ink-2); background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; }
#certpi-tool-root .ct-note { font-size: 0.88rem; color: var(--muted); }
#certpi-tool-root .ct-screen { padding: 6px 0 20px; }
#certpi-tool-root .ct-btn { display: inline-block; background: var(--surface); border: 1px solid var(--line-strong); color: var(--ink); border-radius: 6px; padding: 9px 16px; cursor: pointer; font-size: 0.95rem; font-weight: 600; text-decoration: none; margin: 4px 4px 4px 0; }
#certpi-tool-root .ct-btn:hover { border-color: var(--accent); }
#certpi-tool-root .ct-btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
#certpi-tool-root .ct-btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
#certpi-tool-root .ct-actions { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 4px; }
#certpi-tool-root .ct-field { margin: 14px 0; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: var(--shadow); }
#certpi-tool-root .ct-field > label { display: block; font-weight: 600; margin-bottom: 8px; }
#certpi-tool-root .ct-radio { display: block; padding: 5px 0; cursor: pointer; }
#certpi-tool-root .ct-check { display: block; padding: 6px 0; cursor: pointer; }
#certpi-tool-root input[type="radio"], #certpi-tool-root input[type="checkbox"] { accent-color: var(--accent); }
#certpi-tool-root .ct-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
#certpi-tool-root input[type="number"] { width: 90px; padding: 6px 8px; border: 1px solid var(--line-strong); border-radius: 6px; font-size: 1rem; background: var(--field); color: var(--ink); }
#certpi-tool-root input[type="text"] { width: 100%; padding: 8px; border: 1px solid var(--line-strong); border-radius: 6px; font-size: 1rem; margin-top: 6px; background: var(--field); color: var(--ink); }
#certpi-tool-root input:focus { outline: 2px solid var(--accent); outline-offset: -2px; }
#certpi-tool-root .ct-theme { border: 1px solid var(--line); border-radius: 12px; margin: 10px 0; padding: 4px 12px 12px; background: var(--surface-2); }
#certpi-tool-root .ct-theme > summary { cursor: pointer; font-weight: 600; padding: 8px 0; }
#certpi-tool-root .ct-rule { border-top: 1px solid var(--line); padding: 10px 0; }
#certpi-tool-root .ct-rule-head { font-size: 0.88rem; color: var(--muted); }
#certpi-tool-root .ct-rule-id { font-weight: 700; color: var(--ink); }
#certpi-tool-root .ct-prio { background: var(--chip); border: 1px solid var(--line); border-radius: 8px; padding: 0 6px; }
#certpi-tool-root .ct-pending { background: #fdecea; color: #991b1b; border-radius: 4px; padding: 0 6px; font-weight: 700; }
#certpi-tool-root .ct-rule-q { font-weight: 600; margin: 6px 0; }
#certpi-tool-root .ct-answers { display: flex; flex-wrap: wrap; gap: 4px 14px; }
#certpi-tool-root .ct-answers .ct-radio { display: inline-block; padding: 4px 0; }
#certpi-tool-root .ct-na-reason { margin-top: 6px; }
#certpi-tool-root .ct-rule-detail { margin-top: 8px; font-size: 0.9rem; color: var(--ink-2); }
#certpi-tool-root .ct-rule-detail summary { cursor: pointer; color: var(--accent); }
#certpi-tool-root .ct-live { background: var(--surface-2); border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: 0 8px 8px 0; padding: 8px 10px; }
#certpi-tool-root .ct-disclaimer { border: 1px solid var(--line); border-left: 3px solid var(--accent); background: var(--surface); border-radius: 0 10px 10px 0; padding: 12px; margin: 16px 0; font-size: 0.92rem; }
#certpi-tool-root .ct-disclaimer summary { cursor: pointer; color: var(--accent); }
#certpi-tool-root .ct-disclaimer-short { border-color: var(--line); background: var(--surface); }
#certpi-tool-root .ct-a04-box { border: 1px solid var(--line); border-left: 3px solid var(--accent); background: var(--surface); border-radius: 0 10px 10px 0; padding: 12px; margin: 12px 0; }
#certpi-tool-root .ct-state { font-size: 1.15rem; }
#certpi-tool-root .ct-gaps { list-style: none; padding-left: 0; }
#certpi-tool-root .ct-gaps li { border-left: 3px solid var(--cat-4); padding: 6px 10px; margin: 6px 0; background: #fdf0ef; border-radius: 0 6px 6px 0; }
#certpi-tool-root .ct-gaps li .ct-act { color: var(--ink-2); font-size: 0.92rem; }
#certpi-tool-root .ct-supplies { width: 100%; border-collapse: collapse; background: #fff; font-size: 14px; border: 1px solid var(--line); margin: 10px 0; }
#certpi-tool-root .ct-supplies th { background: var(--dark-2); color: #fff; text-align: left; padding: 10px 14px; font-weight: 600; font-size: 13.5px; }
#certpi-tool-root .ct-supplies td { padding: 10px 14px; border-top: 1px solid var(--line); color: var(--ink-2); vertical-align: top; line-height: 1.6; }
#certpi-tool-root .ct-supplies td:first-child { font-weight: 700; color: var(--heading); }
#certpi-tool-root .ct-plan { padding-left: 22px; }
#certpi-tool-root .ct-plan li { margin: 10px 0; }
#certpi-tool-root .ct-crit { font-size: 0.88rem; color: var(--ink-2); }
#certpi-tool-root .ct-status-included { color: var(--cat-sep); font-weight: 700; }
#certpi-tool-root .ct-status-to_confirm { color: var(--cat-2); font-weight: 700; }
#certpi-tool-root .ct-status-omitted { color: var(--cat-out); font-weight: 700; }
#certpi-tool-root .ct-status-blocked { color: var(--cat-4); font-weight: 700; }
#certpi-tool-root .ct-no-finding { background: #edf3ed; border: 1px solid #c8dcc9; border-radius: 8px; padding: 10px; }
#certpi-tool-root .ct-form-placeholder { border: 1px dashed var(--line-strong); border-radius: 8px; padding: 12px; margin: 16px 0; background: var(--bg); }
#certpi-tool-root .ct-outputs { margin: 16px 0; }
#certpi-tool-root .ct-print-only { display: none; }
#certpi-tool-root .ct-print-header { border-bottom: 2px solid var(--heading); margin-bottom: 12px; padding-bottom: 8px; }
#certpi-tool-root .ct-print-header p { margin: 2px 0; }
#certpi-tool-root .ct-print-watermark { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%) rotate(-45deg); font-size: 64pt; font-weight: 700; color: var(--heading); opacity: .05; white-space: nowrap; pointer-events: none; }
@media (max-width: 640px) {
  #certpi-tool-root .ct-header { padding: 32px 20px; }
}
@media (min-width: 900px) {
  #certpi-tool-root .ct-results { display: block; }
  #certpi-tool-root .ct-title { font-size: 1.7rem; }
}
@media print {
  /* The site copy-protection plugin (WPCopyRights protect.css) hides the
   * whole page in print (body { display: none !important }). This file
   * loads after it, so the same-specificity override below wins and the
   * results print again. Its exclusion setting and its disable_print
   * switch do not remove that rule (verified 2026-11-29). */
  body { display: block !important; }
  #cp-header, #footer, #cpfa #inquiry, details.ct-faq { display: none !important; }
  #certpi-tool-root .ct-btn, #certpi-tool-root .ct-lang, #certpi-tool-root .ct-actions, #certpi-tool-root .ct-outputs, #certpi-tool-root .ct-form-placeholder, #certpi-tool-root .ct-ctas { display: none !important; }
  #certpi-tool-root .ct-print-only { display: block !important; }
  #certpi-tool-root .ct-disclaimer details { display: none !important; }
  #certpi-tool-root { max-width: none; font-size: 11pt; background: #fff; }
}
