/* Electric Web - site styles.  Design canvas is 1386 x 1015 px (the Access form size); it is scaled to fit the window. */

@font-face { font-family: "Carlito"; src: url("../fonts/Carlito-Regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Carlito"; src: url("../fonts/Carlito-Bold.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Carlito"; src: url("../fonts/Carlito-Italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Carlito"; src: url("../fonts/Carlito-BoldItalic.woff2") format("woff2"); font-weight: 700; font-style: italic; font-display: swap; }

:root {
  /* button colours: the Access colours with the saturation raised one small step (10 points); red and yellow were already fully saturated, so they are deepened by 2.5 points instead. Then all button colours brightened by 3 points; then saturation +10 and lightness +3 again, with a slightly stronger shadow so the buttons stand out from the background; then lightness -3 twice; then red +3; then all -3 twice; red +1.5 on 22 Nov 2026. */
  --header: #afabab;
  --green: #87d756;
  --green2: #a1ee1c;
  --red: #ff5151;
  --yellow: #ffd318;
  --orange: #ff7503;
  --label: #f59d56;
  --panel: #e7e6e6;
  --grey-btn: #b1abab;
  --row-alt: #b9d1ea;
  --font: Calibri, Carlito, "Segoe UI", Arial, sans-serif;
}

html, body { margin: 0; padding: 0; background: #ffffff; font-family: var(--font); color: #000; }
body { overflow-x: hidden; }

/* ---------- scaled canvas ---------- */
#stage { position: relative; width: 100%; }
#canvas { position: absolute; left: 0; top: 0; width: 1455px; height: 1040px; transform-origin: 0 0; overflow: hidden; }
#canvas .bg { position: absolute; left: 0; top: 70px; width: 1455px; height: 970px; background: url("../img/background.jpg") no-repeat; background-size: 100% 100%; }
.header { position: absolute; left: 0; top: 0; width: 1455px; height: 70px; background: var(--header); }
#hdr { position: fixed; z-index: 10; transform-origin: 0 0; box-shadow: 0 1px 4px rgba(0,0,0,.35); }
.abs { position: absolute; }

/* ---------- buttons ---------- */
.btn { position: absolute; box-sizing: border-box; border: 1px solid #555; border-radius: 3px; font-family: var(--font); font-weight: 700; color: #000; cursor: pointer; display: flex; align-items: center; justify-content: center; text-align: center; padding: 0 6px; line-height: 1.1; user-select: none; box-shadow: 1px 1px 3px rgba(0,0,0,.5); }
.btn:hover { filter: brightness(1.06); }
.btn:active { box-shadow: none; transform: translate(1px,1px); }
.btn.green { background: var(--green); }
.btn.green2 { background: var(--green2); }
.btn.red { background: var(--red); }
.btn.yellow { background: var(--yellow); }
.btn.orange { background: var(--orange); }
.btn.grey { background: var(--grey-btn); }
.btn.disabled { opacity: .55; cursor: default; }
.btn.flat { position: static; box-shadow: none; }

/* ---------- header controls ---------- */
.hlabel { position: absolute; font-weight: 700; font-size: 19px; white-space: nowrap; }
.hselect { position: absolute; height: 23px; font-family: var(--font); font-size: 14.5px; border: 1px solid #888; background: #fff; padding: 0 2px; }
#name { position: absolute; left: 0; top: 5px; width: 215px; text-align: center; font-weight: 700; font-size: 32px; line-height: 1; white-space: nowrap; overflow: hidden; }
#count { position: absolute; left: 0; top: 42px; width: 215px; text-align: center; font-weight: 700; font-size: 18px; white-space: nowrap; }

.combo { position: absolute; height: 23px; }
.combo input { width: 100%; height: 23px; box-sizing: border-box; border: 1px solid #888; background: #fff; font-family: var(--font); font-size: 14.5px; padding: 0 20px 0 3px; }
.combo .arrow { position: absolute; right: 1px; top: 1px; width: 17px; height: 21px; background: #e4e4e4; border-left: 1px solid #aaa; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 10px; }
.combo .list { display: none; position: absolute; left: 0; top: 23px; min-width: 100%; max-height: 300px; overflow-y: auto; background: #fff; border: 1px solid #888; box-shadow: 2px 2px 4px rgba(0,0,0,.3); z-index: 30; font-size: 14.5px; }
.combo .list div { padding: 2px 5px; cursor: pointer; white-space: nowrap; }
.combo .list div.hi { background: #0078d7; color: #fff; }
.combo .list div.none { color: #666; font-style: italic; }

/* ---------- graph ---------- */
#graphTitle { position: absolute; left: 38px; top: 80px; height: 32px; padding: 0 8px; background: var(--label); font-weight: 700; font-size: 24px; line-height: 32px; white-space: nowrap; }
#graph { position: absolute; left: 20px; top: 70px; width: 970px; height: 620px; }
#graph svg { position: absolute; left: 0; top: 0; width: 970px; height: 620px; pointer-events: none; }
#graph svg line, #graph svg polyline { stroke: #000; stroke-width: 3.2; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.node, a.node { color: #000; text-decoration: none; position: absolute; box-sizing: border-box; border: 1px solid #333; border-radius: 3px; font-weight: 700; font-size: 16.5px; line-height: 1.12; display: flex; align-items: center; justify-content: center; text-align: center; padding: 2px 6px; box-shadow: 1px 1px 3px rgba(0,0,0,.55); }
.node.link { cursor: pointer; }
.node.link:hover { filter: brightness(1.06); outline: 2px solid #333; }
.node.center { background: var(--red); font-size: 23px; min-height: 48px; padding: 4px 14px; }
.node.quote { display: block; font-size: 16px; line-height: 1.2; background: var(--yellow); padding: 5px 9px; }
#printer { font-size: 17.5px; }
#instr { position: absolute; left: 55px; top: 686px; width: 900px; height: 44px; background: var(--panel); border: 1px solid #999; font-weight: 700; font-size: 15px; line-height: 1.25; display: flex; align-items: center; justify-content: center; text-align: center; padding: 0 8px; box-sizing: border-box; }

#graph .node.inf { white-space: nowrap; height: 36px; padding: 2px 10px; font-size: 18px; }
#graph .node { z-index: 3; }   /* a ring button that reaches the Compare / See All Questions row sits on top of it */

/* ---------- right column ---------- */
#portrait { position: absolute; left: 1129px; top: 84px; max-height: 200px; max-width: 268px; width: auto; height: auto; border: 1px solid #666; background: transparent; }
#textPanel, #textPanel2 { position: absolute; left: 1005px; top: 338px; width: 422px; height: 690px; background: var(--panel); border: 2px solid #777; box-sizing: border-box; overflow-y: auto; padding: 6px 9px 10px 9px; font-size: 17px; line-height: 1.3; }
#textPanel2 { display: none; top: 790px; height: 238px; font-size: 15.5px; }
#textPanel.two, #textPanel2 { width: 408px; }
#textPanel.two { height: 440px; }
/* the large windows use the same bold 16.5 px text as the buttons in the Similar/Opposing graph; the two Summary windows keep their own size */
#textPanel:not(.two) { font-size: 16.5px; font-weight: 700; line-height: 1.28; }
#textPanel div, #textPanel2 div { min-height: 1em; }
#textPanel a, #textPanel2 a { color: #0645ad; }

/* ---------- chronological list ---------- */
#chron { position: absolute; left: 55px; top: 742px; width: 900px; height: 286px; background: var(--panel); border: 1px solid #999; box-sizing: border-box; padding: 4px 6px 0 6px; }
#chron h3 { position: absolute; left: 6px; top: 4px; width: 660px; margin: 0; text-align: center; font-size: 18px; line-height: 1.1; z-index: 2; }   /* its top is level with the top of the note in the header row */
#chronScroll { position: absolute; left: 0; right: 0; top: 2px; bottom: 0; overflow-y: scroll; padding: 0 6px; }
#chron table { border-collapse: collapse; width: 100%; table-layout: fixed; font-size: 15px; }
#chron col.era { width: 120px; } #chron col.name { width: 150px; } #chron col.yr { width: 72px; } #chron col.country { width: 130px; } #chron col.infl { width: 96px; } #chron col.cmp { width: 106px; } #chron col.go { width: 98px; }
#chron td.r { text-align: right; padding-right: 4px; } #chron td.l { text-align: left; padding-left: 8px; }
#chron th { text-align: left; font-weight: 700; padding: 2px 6px; position: sticky; top: 0; background: var(--panel); vertical-align: bottom; }
#chron th.note { text-align: center; font-size: 14.5px; line-height: 1.12; padding: 2px 4px 3px 4px; white-space: nowrap; }
#chron td { padding: 1px 6px; white-space: nowrap; }
#chron tr.alt td { background: var(--row-alt); }
#chron tr.era td { font-weight: 700; padding-top: 4px; }
#chron tr.cur td { background: #ffb3b3 !important; }
#chron tr.alt.cur td { background: #ff9d9d !important; }
#chron .btn { position: static; display: inline-block; width: 84px; height: 21px; line-height: 19px; font-size: 14.5px; padding: 0; box-shadow: 1px 1px 1px rgba(0,0,0,.3); }
#chron .btn.sel { background: var(--yellow); }

/* ---------- home ---------- */
#homeTitle { position: absolute; left: 0; top: 250px; width: 1455px; text-align: center; font-weight: 700; font-size: 112px; line-height: 1.0; color: #000; letter-spacing: -1px; text-shadow: 0 0 6px rgba(255,255,255,.6); }
#homeTitle small { display: block; font-size: 84px; line-height: 1.12; margin-top: 10px; }
#homeIntro a.plain { color: #0645ad; font-weight: 400; white-space: nowrap; }
#homeIntro { position: absolute; left: 200px; top: 735px; width: 1055px; margin: 0; padding: 12px 24px; box-sizing: border-box; text-align: center; font-weight: 700; font-size: 24px; line-height: 1.3; color: #000; background: rgba(255,255,255,.78); border-radius: 10px; box-shadow: 0 1px 4px rgba(0,0,0,.25); }

/* ---------- about ---------- */
#aboutPanel { position: absolute; left: 215px; top: 112px; width: 1026px; height: 860px; background: #e9e9e9; border: 3px solid #888; box-sizing: border-box; overflow-y: auto; padding: 14px 20px; font-family: Verdana, Geneva, sans-serif; font-size: 17px; line-height: 1.32; }
#aboutPanel div { min-height: 1em; }
#aboutPanel a { color: #0645ad; }

/* ---------- misc ---------- */
#toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: #333; color: #fff; padding: 10px 18px; border-radius: 6px; font-size: 15px; opacity: 0; transition: opacity .25s; pointer-events: none; z-index: 50; max-width: 80%; text-align: center; }
#toast.show { opacity: .95; }
#small { display: none; position: fixed; inset: 0; background: #fff; z-index: 100; padding: 28px 22px; font-size: 18px; line-height: 1.45; overflow: auto; }
#small h1 { font-size: 26px; margin: 0 0 12px 0; }
#small a { color: #0645ad; }
body.small-screen #small { display: block; }

/* ===================== report pages (report.html) ===================== */
body.report { background: #ffffff; }
#rhdr { position: fixed; left: 0; top: 0; right: 0; height: 52px; background: var(--header); display: flex; align-items: center; gap: 24px; padding: 0 40px; box-shadow: 0 1px 4px rgba(0,0,0,.35); z-index: 10; }
#rhdr .btn { position: static; height: 30px; padding: 0 14px; font-size: 17px; }
#rtitle { flex: 1; text-align: center; font-weight: 700; font-size: 28px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#rpage { max-width: 1100px; margin: 72px auto 40px auto; padding: 0 18px; }
#rbar { background: var(--header); font-weight: 700; font-size: 22px; padding: 7px 14px; margin: 0 0 10px 0; }
#rbody { font-size: 15px; line-height: 1.3; }
#rbody h2 { font-size: 17px; margin: 14px 0 4px 0; text-align: center; }
#rbody h3 { font-size: 15.5px; margin: 10px 0 2px 0; }
#rbody .q { background: #e9e9e9; font-weight: 700; padding: 3px 8px; margin-top: 6px; }
#rbody .a { padding: 2px 8px 2px 40px; }
#rbody .a b { font-weight: 700; }
#rbody table { border-collapse: collapse; width: auto; min-width: 45%; }
#rbody table.wide { width: 100%; }
#rbody th { text-align: left; font-weight: 700; padding: 3px 14px 3px 8px; border-bottom: 1px solid #999; white-space: nowrap; }
#rbody td { padding: 2px 14px 2px 8px; vertical-align: top; }
#rbody tr.alt td { background: #e9e9e9; }
#rbody tr.grp td { font-weight: 700; padding-top: 10px; background: #fff; }
#rbody td.num, #rbody th.num { text-align: right; }
#rbody td.yr { white-space: nowrap; }
#rbody a { color: #000; text-decoration: none; border-bottom: 1px dotted #666; }
#rbody a:hover { background: var(--yellow); }
#rbody .note { color: #444; font-style: italic; margin: 6px 0; }
#rbody .total { font-weight: 700; padding: 8px; border-top: 2px solid #777; }
#rbody .cols2 { column-count: 2; column-gap: 30px; }
#rbody .cols2 > div { break-inside: avoid; }
#rbody .sel { margin: 10px 0 14px 0; padding: 8px 10px; background: #f3f3f3; border: 1px solid #bbb; }
#rbody .sel .btn { position: static; display: inline-block; height: 26px; line-height: 24px; padding: 0 10px; font-size: 15px; margin: 2px 6px 2px 0; }
#rbody .sel .btn.yellow { background: var(--yellow); }
@media print {
  @page { size: portrait; }
  #rhdr { display: none; }
  #rpage { margin: 0; max-width: none; padding: 0; }
  #rbody tr.alt td { background: #e9e9e9 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  #rbody .q { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  #rbar { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  #rbody a { border-bottom: none; }
  #rbody .sel { display: none; }
}

/* ---------- scroll bars: a little wider than the browser default, on every page and in every scrolling window ---------- */
/* Firefox only (it cannot set an exact width). Chrome and Edge ignore the pixel widths below when these two
   properties are present, so they are applied only where the ::-webkit-scrollbar styles are not supported. */
@supports not selector(::-webkit-scrollbar) { * { scrollbar-width: auto; scrollbar-color: #8a8a8a #e0e0e0; } }
::-webkit-scrollbar { width: 20px; height: 20px; }                        /* Chrome, Edge, Safari */
::-webkit-scrollbar-track { background: #e0e0e0; }
::-webkit-scrollbar-thumb { background: #8a8a8a; border: 3px solid #e0e0e0; border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: #6e6e6e; }
