/* Newspaper research workspace. Scoped to the tools directory. */
/* Result focus should move immediately, not animate across form controls. */
html:has(body[class*="page-historical-newspapers-tools"]){scroll-behavior:auto;scroll-padding-top:84px}
.research-tool :is(input,select,textarea,button,summary,[tabindex]){scroll-margin-top:84px}
[class*="page-historical-newspapers-tools"] .page-layout{display:block;max-width:1000px;padding-top:0}
[class*="page-historical-newspapers-tools"] .page-hero .hero-inner{max-width:1000px}
.tool-workspace{margin:0 0 48px}
.tool-privacy{padding:16px 20px;border-left:4px solid var(--green);background:var(--mist);font-family:var(--sans);font-size:14px;line-height:1.65;margin:0 0 24px}
.research-tool{padding:28px;border:1px solid var(--line);border-radius:4px;background:var(--paper);min-width:0;overflow-wrap:anywhere;box-shadow:0 6px 24px rgba(13,47,36,.04)}
.research-tool>h2{font-size:28px;line-height:1.25;margin:0 0 14px}
.research-tool>p{margin:12px 0}
.research-tool .tool-note{color:#47534a;font-family:var(--sans);font-size:14px;line-height:1.65;margin:8px 0 16px}
.research-tool form{margin-top:24px;min-width:0}
.research-tool fieldset{border:0;border-top:1px solid #cbd2c8;margin:24px 0 0;padding:16px 0;min-width:0}
.research-tool legend{padding:0 10px 0 0;font-family:var(--sans);font-weight:700;font-size:16px;color:var(--forest)}
.research-tool label{display:block;font-family:var(--sans);font-weight:700;font-size:15px;line-height:1.5;margin:0 0 8px}
.research-tool input:not([type="checkbox"]),.research-tool textarea,.research-tool select{display:block;width:100%;min-width:0;max-width:100%;border:1px solid #8d9b8f;border-radius:3px;background:#fff;padding:12px;color:var(--ink);font-family:var(--sans);font-size:16px;line-height:1.5;min-height:48px;box-sizing:border-box}
.research-tool textarea{resize:vertical;min-height:112px}
.research-tool input[type="checkbox"]{width:20px;height:20px;vertical-align:middle;margin:0 9px 0 0;accent-color:var(--forest);cursor:pointer;flex-shrink:0}
.research-tool label:has(input[type="checkbox"]){min-height:44px;display:flex;align-items:center;cursor:pointer}
.research-tool input[type="checkbox"]+label{display:inline;cursor:pointer}
.tool-field:has(>input[type="checkbox"]){padding:12px 0}
.research-tool :is(input,select,textarea,summary):focus-visible{outline:3px solid var(--gold);outline-offset:3px}
.tool-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px 24px}
.tool-field{min-width:0;margin-bottom:8px}
.tool-field textarea+label,.tool-field input+label{margin-top:16px}
.tool-actions{display:flex;flex-wrap:wrap;gap:12px;align-items:center;margin:20px 0}
.research-tool button,.tool-card-link{font-family:var(--sans);font-size:15px;font-weight:700;line-height:1.45;border:1px solid var(--forest);padding:12px 18px;min-height:48px;border-radius:3px;background:var(--forest);color:#fff;cursor:pointer;text-decoration:none;max-width:100%;white-space:normal}
.research-tool button[type="button"]{background:#fff;color:var(--forest)}
.research-tool button:hover{background:#1d513d;color:#fff}
.research-tool button:disabled{opacity:.55;cursor:default}
.research-tool details{margin:20px 0;border:1px solid #cbd2c8;background:#fff;border-radius:3px;padding:0 16px}
.research-tool details>summary{font-family:var(--sans);font-size:15px;font-weight:700;cursor:pointer;padding:14px 0;min-height:48px;color:var(--forest)}
.tool-result{margin-top:28px;background:#fff;border:1px solid var(--green);border-top:4px solid var(--green);border-radius:3px;padding:24px;min-width:0;overflow-wrap:anywhere}
.tool-result h3{margin:0 0 12px;font-size:25px;line-height:1.3}
.tool-result h4{font-family:var(--sans);font-size:16px;margin:24px 0 8px}
.tool-result [data-aa-tool="citation-text"]{font-size:18px;line-height:1.8;padding:16px;background:var(--mist);border-left:3px solid var(--green);white-space:pre-wrap;overflow-wrap:anywhere;user-select:text}
.tool-result ul{padding-left:22px}
.tool-result li{margin-bottom:10px}
.tool-warning,.research-tool [role="alert"]{color:#752a13;background:#fff4df;border-left:4px solid #9b4c2d;padding:12px 16px}
.research-tool [role="status"]{margin-top:16px;min-height:24px}
.research-tool [hidden]{display:none!important}
.tool-explainer{max-width:760px;margin:40px auto;line-height:1.8}
.tool-explainer h2{font-size:28px;line-height:1.3;margin:36px 0 14px}
.tool-explainer details{padding:12px 0;border-bottom:1px solid var(--line)}
.tool-explainer summary{cursor:pointer;font-weight:700;min-height:44px;padding:8px 0;line-height:1.5}
.tool-explainer details p{margin:12px 0}
.tool-related{max-width:760px;margin:36px auto 52px;padding:24px;background:var(--mist);border-top:3px solid var(--forest)}
.tool-related h2{margin:0 0 14px;font-size:24px}
.tool-related>div{display:flex;flex-wrap:wrap;gap:14px 24px}
.tool-related a{font-family:var(--sans);font-size:15px;font-weight:700}
.tool-hub{margin-bottom:48px}
.tool-hub>h2{font-size:30px;margin:0 0 24px}
.tool-cards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px}
.tool-card{display:flex;flex-direction:column;padding:24px;background:var(--paper);border:1px solid var(--line);border-top:4px solid var(--green);min-width:0}
.tool-card h3{font-size:26px;line-height:1.3;margin:0 0 12px}
.tool-card p{font-size:16px;line-height:1.7;margin:0 0 20px}
.tool-card .eyebrow{font-size:11px;line-height:1.4;margin-bottom:12px}
.tool-card-link{align-self:flex-start;margin-top:auto;display:inline-block}
/* Word-level comparisons preserve the source spelling. Color is not the only cue. */
.tool-result del{color:#652013;background:#fbe5df;text-decoration-thickness:2px}
.tool-result ins{color:#163c2a;background:#dceee1;text-decoration:underline;text-decoration-thickness:2px}
.tool-result mark{background:#fff0bf;color:#493b06}
.tool-result .comparison-columns,.tool-result .clipping-columns,.tool-result .tool-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px}
.tool-result .clipping-text,.tool-result .comparison-text,.tool-result pre{font:16px/1.9 var(--serif);white-space:pre-wrap;overflow-wrap:anywhere;min-width:0;padding:16px;background:var(--paper);border:1px solid var(--line)}
.tool-result .query-row,.tool-result .search-query{padding:16px;border:1px solid var(--line);margin:12px 0;min-width:0}
.tool-result code{font-family:var(--sans);font-weight:700;background:var(--mist);padding:3px 6px;white-space:normal;overflow-wrap:anywhere}
.tool-result .clipping-transcription{font:16px/1.9 var(--serif);white-space:pre-wrap;overflow-wrap:anywhere;min-width:0;padding:16px;background:var(--paper);border:1px solid var(--line)}
.research-tool[data-tool="name-search"] [data-aa-tool="groups"] ul{list-style:none;padding:0}
.research-tool[data-tool="name-search"] [data-aa-tool="groups"] li.tool-result{padding:18px;border-top:1px solid var(--line);box-shadow:none;margin:12px 0}
.research-tool[data-tool="name-search"] [data-aa-tool="candidate"]{font-family:var(--sans);font-weight:700;font-size:18px;line-height:1.5;margin:0 0 12px}
@media(max-width:700px){
  .tool-grid,.tool-cards,.tool-result .comparison-columns,.tool-result .clipping-columns,.tool-result .tool-grid{grid-template-columns:1fr}
  .research-tool{padding:20px 16px}
  .research-tool>h2{font-size:24px}
  .tool-result{padding:20px 14px}
  .tool-result h3{font-size:23px}
  .tool-actions{gap:10px}
  .tool-actions button{flex:1 1 145px;padding:12px}
  .tool-privacy{padding:14px;font-size:14px}
  .tool-explainer{margin-top:32px}
  .tool-explainer h2{font-size:25px}
  .tool-related{padding:20px}
  .tool-card{padding:22px}
}
@media print{
 .research-tool form,.tool-actions,.tool-privacy,.research-tool [role="status"],.tool-related,.tool-explainer,.tool-hub,.site-header,.site-footer,.reader-note{display:none!important}
 .research-tool,.tool-result{border:0;box-shadow:none;padding:0;background:white}
 .research-tool>p{display:none}
 .tool-result{break-inside:auto}
 .tool-result ins{background:none;text-decoration:underline}
 .tool-result del{background:none;text-decoration:line-through}
}
