/* ResearchProspect citation engine (3 Nov 2026). Sits on top of /rp-tools/rp-shell.css; every class here starts with cite-.
   The block lives inside old theme pages (Bootstrap 4 + theme CSS), so form controls are reset inside .cite-app. */
.cite-app { container-type:inline-size; container-name:cite; background:none; padding:0 0 28px; margin:0 auto; max-width:1180px; color:var(--rps-ink); font-size:16px; line-height:1.5; text-align:left; }
.cite-app *, .cite-app *::before, .cite-app *::after { box-sizing:border-box; }
.cite-app button { font-family:inherit; line-height:1.3; text-transform:none; letter-spacing:normal; box-shadow:none; }
.cite-app input, .cite-app select { font:inherit; font-size:15px; color:var(--rps-ink); background:#fff; border:1px solid var(--rps-line); border-radius:8px; padding:9px 11px; height:auto; min-height:42px; width:100%; margin:0; box-shadow:none; outline:0; }
.cite-app input:focus, .cite-app select:focus { border-color:var(--rps-navy); box-shadow:0 0 0 3px rgba(0,33,71,.12); }
.cite-app label { margin:0; font-weight:inherit; display:block; }
.cite-app p { margin:0; }
.cite-sr { position:absolute !important; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; }
.cite-rail-ic { width:24px; height:24px; fill:var(--rps-navy); }
.cite-card { margin-top:8px; }

/* style tabs + source type */
.cite-bar { gap:10px 18px; }
.cite-kind { display:flex !important; align-items:center; gap:8px; margin-left:auto !important; padding:8px 0; font-size:14px; color:var(--rps-muted); font-weight:600; }
.cite-kind select { width:auto; min-width:220px; max-width:100%; min-height:38px; padding:6px 30px 6px 10px; font-weight:500; color:var(--rps-navy); }

/* smart search */
.cite-search { display:flex; gap:10px; padding:16px 18px 6px; margin:0; }
.cite-search input { flex:1; min-width:0; min-height:48px; font-size:16px; padding:11px 14px; border-radius:24px; border-width:1.5px; }
.cite-search .rps-go { margin-left:0; flex:0 0 auto; }
.cite-sub { display:flex; flex-wrap:wrap; align-items:center; gap:4px 14px; padding:2px 22px 12px; font-size:13.5px; color:var(--rps-muted); }
.cite-eg { overflow-wrap:anywhere; }

/* title-search candidates */
.cite-cands { margin:0 18px 14px; border:1px solid var(--rps-line); border-radius:12px; overflow:hidden; }
.cite-cands[hidden] { display:none; }
.cite-cands-h { padding:10px 14px; background:var(--rps-bg); font-size:14px; color:#374151; font-weight:600; }
.cite-cand { display:flex; gap:12px; align-items:flex-start; padding:12px 14px; border-top:1px solid var(--rps-line); }
.cite-cand-ref { flex:1; min-width:0; font-size:14.5px; line-height:1.5; overflow-wrap:anywhere; }
.cite-cand-meta { display:block; margin-top:3px; font-size:12.5px; color:var(--rps-muted); }
.cite-cand .rps-pill { padding:6px 14px; font-size:13.5px; flex:0 0 auto; }
.cite-cands-foot { padding:10px 14px; border-top:1px solid var(--rps-line); font-size:13.5px; }

/* form + result */
.cite-panes { display:grid; grid-template-columns:1fr; border-top:1px solid var(--rps-line); }
.cite-pane { min-width:0; padding:14px 18px 6px; }
.cite-out-pane { background:#FBFCFE; border-bottom:1px solid var(--rps-line); display:flex; flex-direction:column; order:-1; } /* stacked: the citation first, the editable details below */
.cite-pane-h { display:flex; align-items:center; justify-content:space-between; gap:10px; margin:2px 0 10px; font-size:13px; font-weight:700; letter-spacing:.4px; text-transform:uppercase; color:var(--rps-navy); }
.cite-src { font-size:12px; font-weight:600; letter-spacing:0; text-transform:none; color:#1b6b35; background:#ECFDF3; border-radius:12px; padding:2px 9px; }
.cite-src:empty { display:none; }
.cite-fields { display:grid; grid-template-columns:1fr 1fr; gap:10px 12px; }
.cite-f { min-width:0; position:relative; }
.cite-f.wide { grid-column:1 / -1; }
.cite-f > label, .cite-f > .cite-fl { font-size:13px; font-weight:600; color:#374151; margin:0 0 4px; display:flex; align-items:center; gap:6px; }
.cite-f.cite-need > label::after, .cite-f.cite-need > .cite-fl::after { content:"Missing"; font-size:11px; font-weight:700; color:#B54708; background:#FEF0C7; border-radius:10px; padding:1px 7px; }
.cite-f.cite-need input, .cite-f.cite-need select { border-color:#F5B65C; background:#FFFCF5; }
.cite-hint { font-size:12px; color:var(--rps-muted); margin-top:3px; }
.cite-date { display:grid; grid-template-columns:72px 1fr 92px; gap:6px; }
.cite-date.range { grid-template-columns:72px 1fr 84px 84px; }
.cite-names { display:flex; flex-direction:column; gap:8px; }
.cite-name { display:grid; grid-template-columns:1fr 1fr 34px; gap:6px; align-items:center; }
.cite-name.org { grid-template-columns:1fr 34px; }
.cite-name-x { width:34px; height:34px; border:1px solid var(--rps-line); border-radius:8px; background:#fff; color:#6b7280; cursor:pointer; font-size:18px; padding:0; }
.cite-name-x:hover { color:#B42318; border-color:#B42318; }
.cite-name-tools { display:flex; flex-wrap:wrap; gap:4px 14px; font-size:13px; }
.cite-name-tools .rps-link { font-size:13px; padding:2px 0; }
.cite-check { display:flex !important; gap:8px; align-items:flex-start; font-size:13.5px; color:#374151; }
.cite-check input { width:auto; min-height:0; margin-top:3px; accent-color:var(--rps-orange); }
.cite-ref { font-family:Georgia,"Times New Roman",serif; font-size:16.5px; line-height:1.65; padding:12px 14px 12px 44px; text-indent:-30px; background:#fff; border:1px solid var(--rps-line); border-radius:10px; min-height:64px; overflow-wrap:anywhere; }
.cite-ref .cite-ph, .cite-ref:empty::before { color:#9ca3af; font-family:inherit; }
.cite-miss { color:#B54708; background:#FEF0C7; border-radius:4px; padding:0 3px; font-style:normal; font-family:system-ui,sans-serif; font-size:.82em; }
.cite-loc { display:flex !important; align-items:center; gap:6px; font-size:12.5px; text-transform:none; letter-spacing:0; color:var(--rps-muted); font-weight:600; }
.cite-loc input { width:84px; min-height:32px; padding:4px 8px; font-size:14px; }
.cite-intext { display:flex; flex-direction:column; gap:8px; }
.cite-it { display:grid; grid-template-columns:96px 1fr auto; gap:8px; align-items:center; background:#fff; border:1px solid var(--rps-line); border-radius:10px; padding:8px 10px; }
.cite-it-l { font-size:12.5px; color:var(--rps-muted); font-weight:600; }
.cite-it-v { font-family:Georgia,"Times New Roman",serif; font-size:16px; overflow-wrap:anywhere; }
.cite-missing { margin-top:10px; font-size:13.5px; color:#7A2E0E; background:#FFFAEB; border:1px solid #FEDF89; border-radius:10px; padding:9px 12px; }
.cite-missing[hidden] { display:none; }
.cite-out-pane .rps-foot { border-top:0; padding:12px 0 8px; margin-top:auto; }
.cite-note { font-size:13px; color:var(--rps-muted); }

/* reference list */
.cite-list { max-width:1180px; margin:14px auto 0; background:#fff; border:1px solid var(--rps-line); border-radius:14px; box-shadow:0 4px 18px rgba(0,33,71,.05); }
.cite-list-h { display:flex; flex-wrap:wrap; align-items:center; gap:10px; padding:12px 16px; border-bottom:1px solid var(--rps-line); }
.cite-list-t { font-weight:700; color:var(--rps-navy); font-size:16px; margin-right:auto !important; }
.cite-count { font-weight:500; color:var(--rps-muted); font-size:14px; }
.cite-list-btns { display:flex; flex-wrap:wrap; gap:6px; position:relative; }
.cite-dl { position:relative; display:inline-block; }
.cite-dl .rps-menu { top:40px; bottom:auto; }
.cite-entries { list-style:none; margin:0; padding:0; }
.cite-entries li { display:flex; gap:12px; align-items:flex-start; padding:12px 16px; border-top:1px solid #EEF2F7; }
.cite-entries li:first-child { border-top:0; }
.cite-entries li.editing { background:#FFF8F2; }
.cite-e-ref { flex:1; min-width:0; font-family:Georgia,"Times New Roman",serif; font-size:15.5px; line-height:1.6; padding-left:30px; text-indent:-30px; overflow-wrap:anywhere; }
.cite-e-btns { display:flex; gap:4px; flex:0 0 auto; }
.cite-e-btns .rps-link { font-size:13px; }
.cite-empty { padding:16px; font-size:14px; color:var(--rps-muted); }
.cite-empty[hidden] { display:none; }
.cite-app .rps-offer { margin-top:14px; }

/* two columns once the card is wide enough (the block also sits in the narrow 8/12 column on source-type pages) */
@container cite (min-width: 860px) {
  .cite-panes { grid-template-columns:1.1fr 1fr; }
  .cite-out-pane { order:0; border-bottom:0; border-left:1px solid var(--rps-line); }
}
@container cite (max-width: 640px) {
  .cite-card .rps-rail { display:none; }
}
@container cite (max-width: 520px) {
  .cite-fields { grid-template-columns:1fr; }
  .cite-bar { padding:0; gap:0; }
  .cite-bar .rps-tabs { width:100%; padding:0 6px; }
  .cite-bar .rps-tabs-label { display:none; }
  .cite-kind { width:100%; margin:0 !important; padding:8px 12px 10px; border-top:1px solid var(--rps-line); }
  .cite-kind select { flex:1; min-width:0; }
  .cite-search { padding:12px 12px 4px; }
  .cite-search .rps-go { padding:11px 18px; }
  .cite-sub { padding:2px 14px 10px; }
  .cite-cands { margin:0 12px 12px; }
  .cite-cand { flex-direction:column; gap:8px; }
  .cite-pane { padding:12px 12px 4px; }
  .cite-it { grid-template-columns:1fr auto; }
  .cite-it-l { grid-column:1 / -1; }
  .cite-ref { font-size:16px; }
  .cite-out-pane .rps-foot { display:none; } /* the sticky phone bar has the same buttons */
  .cite-list-h { padding:10px 12px; }
  .cite-entries li { flex-direction:column; gap:6px; padding:12px; }
}
/* phone bar from rp-shell.css is position:fixed; on these pages it carries Copy + Add */
.cite-mbar .rps-ic { padding:10px 12px; font-size:14px; }
@media (max-width:700px) { .cite-app { padding-bottom:16px; } .cite-mbar .rps-go { margin-left:auto; } }
@media (min-width:701px) { .cite-mbar { display:none !important; } }

/* /citation/apa/: the old hidden "Cite manually" link grid to every source-type page, kept as a collapsed list */
.cite-more { max-width:1180px; margin:14px auto 0; text-align:left; border:1px solid var(--rps-line); border-radius:12px; background:#fff; padding:0 16px; }
.cite-more > summary { cursor:pointer; padding:12px 0; font-weight:600; color:var(--rps-navy); font-size:15px; }
.cite-more[open] > summary { border-bottom:1px solid var(--rps-line); margin-bottom:10px; }
.cite-more .row { margin:0 0 8px; }
@media (max-width:700px) { .cite-app .rps-offer .t { flex-basis:100%; } }

/* 3 Nov 2026: the theme phone menu is 405px wide; keep it inside small screens (no sideways scroll) */
.offcanvas.offcanvas-end, .offcanvas.offcanvas-start { max-width: 100vw; }
/* 3 Nov 2026: the theme reviews carousel spilled past the screen edge on phones */
.a-testimonial-2, .owl-carousel { overflow: hidden; }
/* 3 Nov 2026: theme phone header bar and menus were 405px wide (sideways scroll on 390px phones) */
@media (max-width: 480px) { .header-bar, .offcanvas { max-width: 100vw !important; box-sizing: border-box; } }
/* 3 Nov 2026: the theme "why choose our guarantee" section was 15px wider than phones */
.why_choose_our_gurantee { overflow-x: hidden; }
