/* Public tool routes — mist/forest brand continuity and readability (spec docs/tasks/2026-10-25_tool-routes-brand-continuity.md;
   brand map production-adoption/r8-preparation/brand-continuity-map.md; founder register :130).
   Consumers: exactly the six pages that carry body.public-tool-surface with body.public-tool-scan or body.public-tool-jobs
   (scan.html and jobs.html in en, zh, zh-hk). Every selector starts with one of those body scopes; no global selector and no
   !important. Colours come only from the public-tool aliases in tokens.css (the paper/ink/accent aliases name the home palette
   tokens; --mode-public-tool-selected-shadow is the existing --elevation-1 plus a 1px inset of --ink-public-tool); semantic colours
   (risk, proof, safe, coverage, error, verdict, score, CV document), focus and selection rings, upload boundaries, lifecycle and
   handoff tones, result and purchase controls are not touched (tests/public_tool_surfaces.roles.json, roles RETAIN-*). */

/* ===== 1. Ground and chrome ===================================================================== */
body.public-tool-surface { background-color: var(--paper-public-tool-base); }
body.public-tool-surface .site-header { background-color: var(--paper-public-tool-base); }
body.public-tool-jobs .hero-strip { background-color: var(--paper-public-tool-base); border-bottom-width: 0; }
body.public-tool-surface .brand,
body.public-tool-surface .brand-mark,
body.public-tool-surface .footer-brand { color: var(--ink-public-tool); }
body.public-tool-surface footer.site,
body.public-tool-surface .nav-signin,
body.public-tool-surface .language-switcher,
body.public-tool-surface .nav-menu-dialog.is-modal .nav-menu-sheet,
body.public-tool-surface .nav-menu-dialog.is-modal .nav-menu-close { background-color: var(--paper-public-tool-surface); }
body.public-tool-surface .nav-signin,
body.public-tool-surface .nav-menu-dialog.is-modal .nav-menu-close { color: var(--ink-public-tool); }
body.public-tool-surface .menu-glyph,
body.public-tool-surface .language-switcher a[aria-current="page"],
body.public-tool-surface .scan-pill { background-color: var(--ink-public-tool); color: var(--paper-public-tool-surface); }
/* the shared header pill's border is painted context-free by tokens.css (.nav-links .scan-pill, .scan-pill.scan-pill), so its
   forest border is context-free here too (design review 6, P1) */
body.public-tool-surface .scan-pill { border-color: var(--ink-public-tool); }
body.public-tool-surface .nav-links a[aria-current="page"]::after { background-color: var(--ink-public-tool); }
/* jobs.html paints the current-page link's border and colour only in the narrow header (@media (max-width: 760px)); the sheet's
   reach is bounded to that context so the desktop current-page link keeps its ink colour (design review 5, F2-1; invariant I8) */
@media (max-width: 760px) {
  body.public-tool-jobs .nav-links a[aria-current="page"] { border-color: var(--ink-public-tool); color: var(--ink-public-tool); }
}
@media (hover: hover) and (pointer: fine) {
  /* the base paints the language and footer link hovers only for hover-capable pointers; the sheet stays within that reach (I8) */
  /* the current-locale link keeps its ink fill and paper text under hover (slice 2 CODE review P1-1, reproduced live on the six
     tool routes by the hover sweep): the hover excludes it, otherwise this rule ties with the aria-current rule and wins by source order */
  body.public-tool-surface .language-switcher a:not([aria-current="page"]):hover,
  body.public-tool-surface .footer-links a:hover { color: var(--ink-public-tool); }
  body.public-tool-surface .scan-pill:hover,
  body.public-tool-surface .menu-glyph:hover { background-color: var(--accent-public-tool-hover); color: var(--paper-public-tool-surface); }
}

/* ===== 2. Titles, labels, surfaces ============================================================== */
body.public-tool-scan #scan-title,
body.public-tool-scan .hero-swap,
body.public-tool-jobs #jobs-title,
body.public-tool-jobs .kicker,
body.public-tool-jobs .filter-label { color: var(--ink-public-tool); }
body.public-tool-scan .scan-form { background-color: var(--paper-public-tool-surface); box-shadow: none; }
body.public-tool-jobs .match-panel,
body.public-tool-jobs .hero-note { background-color: var(--paper-public-tool-surface); }
body.public-tool-jobs .hero-note { border-left-color: var(--ink-public-tool); }
body.public-tool-scan .mode-picker { background-color: var(--paper-public-tool-wash); }

/* ===== 3. Selected ordinary controls (selected-state ring, not a focus ring) ===================== */
body.public-tool-scan .mode-tab.is-active { background-color: var(--paper-public-tool-surface); color: var(--ink-public-tool); box-shadow: var(--mode-public-tool-selected-shadow); }
body.public-tool-jobs .mode-tab { background-color: var(--paper-public-tool-surface); border-color: var(--ink-public-tool); color: var(--ink-public-tool); }
body.public-tool-jobs .mode-tab.is-active { background-color: var(--ink-public-tool); color: var(--paper-public-tool-surface); }
body.public-tool-jobs .filter-chip,
body.public-tool-jobs .match-chip { background-color: var(--paper-public-tool-surface); }
body.public-tool-jobs .filter-chip[aria-pressed="true"],
body.public-tool-jobs .match-chip[aria-pressed="true"] { background-color: var(--ink-public-tool); border-color: var(--ink-public-tool); color: var(--paper-public-tool-surface); }
@media (hover: hover) and (pointer: fine) {
  body.public-tool-jobs .filter-chip:not([aria-pressed="true"]):not(:disabled):hover,
  body.public-tool-jobs .match-chip:not([aria-pressed="true"]):not(:disabled):hover { border-color: var(--ink-public-tool); color: var(--ink-public-tool); }
  body.public-tool-jobs .filter-chip[aria-pressed="true"]:not(:disabled):hover,
  body.public-tool-jobs .match-chip[aria-pressed="true"]:not(:disabled):hover { background-color: var(--accent-public-tool-hover); color: var(--paper-public-tool-surface); }
}

/* ===== 4. Primary actions (enabled only; disabled and pending styles untouched) ================= */
body.public-tool-scan #submit-button:not(:disabled):not([aria-disabled="true"]),
body.public-tool-jobs .job-action.primary:not(:disabled):not([aria-disabled="true"]),
body.public-tool-jobs .load-more-button:not(:disabled):not([aria-disabled="true"]),
body.public-tool-jobs .retry-button:not(:disabled):not([aria-disabled="true"]) { background-color: var(--ink-public-tool); border-color: var(--ink-public-tool); color: var(--paper-public-tool-surface); }
@media (hover: hover) and (pointer: fine) {
  body.public-tool-scan #submit-button:not(:disabled):not([aria-disabled="true"]):hover,
  body.public-tool-jobs .job-action.primary:not(:disabled):not([aria-disabled="true"]):hover,
  body.public-tool-jobs .load-more-button:not(:disabled):not([aria-disabled="true"]):hover,
  body.public-tool-jobs .retry-button:not(:disabled):not([aria-disabled="true"]):hover { background-color: var(--accent-public-tool-hover); color: var(--paper-public-tool-surface); }
}

/* ===== 5. Metadata and intake links ============================================================= */
body.public-tool-surface .file-meta,
body.public-tool-scan .file-icon,
body.public-tool-scan #jd-escape-link,
body.public-tool-scan .scan-form .linklike:not(:disabled):not([aria-disabled="true"]),
body.public-tool-scan .scan-form .rctl-help > summary { color: var(--ink-public-tool); }

/* ===== 6. Readability: 16px floor for ordinary labels, help and metadata (implementation-spec.md) */
body.public-tool-surface .mode-tab { font-size: var(--text-public-tool-ui); line-height: 1.4; padding-top: 8px; padding-bottom: 8px; min-height: 44px; }
body.public-tool-scan .dropzone strong,
body.public-tool-surface .dropzone .hint { font-size: var(--text-public-tool-ui); line-height: var(--leading-legacy-07); }
body.public-tool-surface .file-meta { font-size: var(--text-public-tool-ui); line-height: var(--leading-legacy-07); font-family: var(--font-body); overflow-wrap: anywhere; }
body.public-tool-surface .site-header .nav-links a,
body.public-tool-surface .site-header .nav-signin,
body.public-tool-surface .site-header .language-switcher a,
body.public-tool-surface .nav-menu-dialog.is-modal .nav-links a,
body.public-tool-surface .nav-menu-dialog.is-modal .language-switcher a { font-size: var(--text-public-tool-ui); font-family: var(--font-body); line-height: var(--leading-legacy-09); }
body.public-tool-surface .footer-tagline,
body.public-tool-surface .footer-meta,
body.public-tool-surface .footer-links a { font-size: var(--text-public-tool-ui); line-height: var(--leading-legacy-09); }
body.public-tool-scan .scan-form label,
body.public-tool-scan .scan-form .field-label,
body.public-tool-scan .scan-options > summary,
body.public-tool-scan .rctl-field > .rctl-field-summary,
body.public-tool-scan .rctl-group > legend,
body.public-tool-scan .rctl-opt span { font-size: var(--text-public-tool-ui); line-height: var(--leading-legacy-09); }
body.public-tool-scan .scan-form .hint,
body.public-tool-scan .scan-form .error,
body.public-tool-scan .scan-form .form-status,
body.public-tool-scan .scan-form .rctl-help,
body.public-tool-scan .scan-form .rctl-preview,
body.public-tool-scan .scan-form .rctl-promise { font-size: var(--text-public-tool-ui); line-height: var(--leading-legacy-07); }
body.public-tool-scan .scan-form .linklike { font-size: var(--text-public-tool-ui); }
body.public-tool-scan .survey-block .survey-lead { font-size: var(--text-public-tool-ui); line-height: var(--leading-legacy-07); }
body.public-tool-scan .survey-block .survey-q > span { font-size: var(--text-public-tool-ui); line-height: var(--leading-legacy-09); font-family: var(--font-body); letter-spacing: normal; text-transform: none; }
body.public-tool-scan .survey-block .survey-opt { font-size: var(--text-public-tool-ui); line-height: 1.4; min-height: 44px; padding-top: 8px; padding-bottom: 8px; }
body.public-tool-jobs .lens-note,
body.public-tool-jobs .lens-switch,
body.public-tool-jobs .loading-state,
body.public-tool-jobs .empty-state,
body.public-tool-jobs .error-state,
body.public-tool-jobs .list-hint,
body.public-tool-jobs .match-sub,
body.public-tool-jobs .match-status,
body.public-tool-jobs .match-privacy,
body.public-tool-jobs .match-cv-error { font-size: var(--text-public-tool-ui); line-height: var(--leading-legacy-07); font-family: var(--font-body); }
body.public-tool-jobs .filter-label,
body.public-tool-jobs .match-results-label,
body.public-tool-jobs .match-filters-label,
body.public-tool-jobs .match-clarify-group legend { font-size: var(--text-public-tool-ui); line-height: var(--leading-legacy-09); font-family: var(--font-body); font-weight: 500; letter-spacing: normal; text-transform: none; }
body.public-tool-jobs .filter-chip,
body.public-tool-jobs .match-clarify-option,
body.public-tool-jobs .match-chip { font-size: var(--text-public-tool-ui); line-height: 1.4; min-height: 44px; padding-top: 8px; padding-bottom: 8px; }
body.public-tool-jobs .job-employer,
body.public-tool-jobs .job-dates,
body.public-tool-jobs .meta-chip,
body.public-tool-jobs .handoff-notice-text,
body.public-tool-jobs .match-card-meta,
body.public-tool-jobs .match-ev { font-size: var(--text-public-tool-ui); line-height: var(--leading-legacy-09); font-family: var(--font-body); overflow-wrap: anywhere; }

/* ===== 7. Broad decorative boundaries softened (functional borders, focus rings and row rules stay) */
body.public-tool-jobs .filter-panel { border-bottom-width: 0; }
body.public-tool-scan .scan-options { border-top-width: 0; }
body.public-tool-scan .survey-block { border-bottom-width: 0; }
body.public-tool-scan .scan-form { padding: 24px; }
@media (max-width: 700px) {
  body.public-tool-scan .scan-form { padding: 16px; }
}
