/* report-card.css
   The report card (js/report-card.js): the SPPI report's look (css/sppi.css .sppi-r, whose colour
   variables these use) plus what only the report card has: expandable survey rows, the DDI curve,
   the at-a-glance range chart, plain-language "learn" notes, goal callouts, and greyed-out sections
   for what hasn't been taken yet. */

/* in the timeline view's stage: full width, top-aligned, the page scrolls */
.timeline-main-stage:has(.rc-view){display:block;}
.rc-view{display:block;width:100%;max-width:900px;min-width:0;margin:0 auto;}
/* never wider than the screen: wide tables scroll inside their own box (.sppi-r-scroll) instead */
.rc{max-width:none;width:100%;min-width:0;}
.rc .sppi-r-page{scroll-margin-top:72px;}

/* the cover: the institute's seal (stamped on, at a slight angle), whose report card this is, and its
   date, all centred; then one paragraph of what this is and how to read it */
.rc .rc-cover{text-align:center;margin:0 0 30px;}
.rc .rc-seal{display:inline-block;width:150px;transform:rotate(-8deg);filter:drop-shadow(0 2px 2px rgba(15,26,23,.25)) drop-shadow(0 6px 14px rgba(138,94,14,.18));}
.rc .rc-seal svg{display:block;width:100%;height:auto;}
.rc .rc-owner{font-family:var(--r-serif);font-size:28px;line-height:1.2;color:var(--r-ink);margin:20px 0 4px;overflow-wrap:anywhere;}
.rc .rc-date{font-size:12px;font-weight:700;letter-spacing:.1em;text-transform:uppercase;color:var(--r-muted);margin:0;}
@media (max-width:600px){ .rc .rc-seal{width:120px;} .rc .rc-owner{font-size:22px;} }
.rc .rc-intro{font-size:15.5px;line-height:1.6;margin:0 0 6px;max-width:720px;}
.rc .rc-key{padding:1px 6px;color:var(--r-ink);white-space:nowrap;}
.rc .rc-key.good{background:var(--r-good);} .rc .rc-key.fair{background:var(--r-fair);} .rc .rc-key.low{background:var(--r-low);}
.rc .sppi-r-head h2{margin-top:2px;}

.rc .rc-small{font-size:12.5px;color:var(--r-muted);margin:10px 0 0;max-width:680px;}
.rc .rc-muted{color:var(--r-muted);}
.rc .rc-change{font-weight:700;}
.rc .rc-change.better{color:var(--r-good-ink);}
.rc .rc-change.worse{color:var(--r-low-ink);}
.rc .sppi-r-t td small{display:block;font-size:10.5px;color:var(--r-muted);font-weight:600;}

/* a change as a pill (rcChangeText): the arrow is which way the score moved, the color whether that's
   good (green) or not (amber); grey for no change. The scores it's between sit under it */
.rc .rc-pill{display:inline-block;padding:4px 11px;border-radius:999px;font-weight:700;font-size:12.5px;white-space:nowrap;line-height:1.3;}
.rc .rc-pill.good{background:#dbeadf;color:#1d6e55;}
.rc .rc-pill.worse{background:#f8e3b8;color:#7a5a0c;}
.rc .rc-pill.none{background:#eceeec;color:#55625c;}
.rc .rc-pill + small{display:block;margin-top:3px;font-size:11px;color:var(--r-muted);font-weight:600;}
/* a table's group heading: which way is good for the measures under it (rcGroupRow) */
.rc .sppi-r-t tr.rc-group th{background:#eff4f0;text-align:left;font-weight:700;font-size:13px;padding:8px 14px;}

/* a link-style button */
.rc .rc-link{background:none;border:0;padding:0;font:inherit;color:var(--r-green);font-weight:700;cursor:pointer;text-decoration:underline;text-underline-offset:3px;}
.rc .rc-link:hover{color:var(--r-ink);}
.rc .rc-actions{margin:14px 0 0;}

/* table of contents: what hasn't been taken is marked */
.rc .rc-toc li{margin:7px 0;}
.rc .rc-toc-todo .rc-link{color:var(--r-muted);}
.rc .rc-toc-flag{font-size:10px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--r-muted);background:var(--r-panel);padding:1px 6px;border-radius:3px;}

/* plain-language notes */
.rc .rc-learn{margin:16px 0 0;padding:12px 16px;border-left:3px solid var(--r-line);background:var(--r-panel);}
.rc .rc-learn p{margin:0;}
.rc .rc-learn p + p{margin-top:4px;}
.rc .rc-learn-h{font-size:11.5px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--r-green);margin-bottom:4px!important;}

/* set-a-goal: a prominent callout when a score needs attention, a quiet link otherwise */
.rc .rc-goal{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap;margin:20px 0 0;padding:16px 20px;
  border:1px solid var(--r-line);border-left:4px solid var(--r-marigold);background:#fffaf0;}
.rc .rc-goal p{margin:0;}
.rc .rc-goal-title{font-family:var(--r-serif);font-size:20px;color:var(--r-ink);margin-bottom:2px!important;}
.rc .rc-goal .btn{white-space:nowrap;}
.rc .rc-goal .btn span{margin-left:6px;}
.rc .rc-goal-quiet{margin:16px 0 0;}

/* not taken yet: greyed out with a question mark, what it would tell you, and a way to take it */
.rc .rc-todo{display:flex;align-items:center;gap:16px;flex-wrap:wrap;margin:18px 0 0;padding:18px 20px;border:1px dashed #b9c4bd;background:#f6f7f5;color:#6d7a74;}
.rc .rc-todo > div{flex:1;min-width:220px;}
.rc .rc-todo h3{color:#55625c;font-size:20px;}
.rc .rc-todo p{margin:4px 0 0;}
.rc .rc-todo-note{font-size:12.5px;font-weight:700;}
.rc .rc-q{flex:none;display:grid;place-items:center;width:44px;height:44px;border-radius:50%;background:#dfe4e0;color:#6d7a74;font-family:var(--r-serif);font-size:24px;font-weight:600;}
.rc .rc-held{border-style:solid;background:var(--r-good);color:var(--r-ink);}
.rc .rc-held .rc-q{background:#fff;color:var(--r-good-ink);}
.rc .rc-held h3{color:var(--r-ink);}

/* the surveys table: rows open to their details */
.rc .rc-surveys tbody th{min-width:150px;}
.rc .rc-row{cursor:pointer;}
.rc .rc-row:hover th,.rc .rc-row:focus-visible th{background:var(--r-panel);}
.rc .rc-row:focus-visible{outline:2px solid var(--r-green);outline-offset:-2px;}
.rc .rc-caret{display:inline-block;width:0;height:0;margin-right:8px;vertical-align:middle;border-left:6px solid var(--r-ink);border-top:5px solid transparent;border-bottom:5px solid transparent;transition:transform .15s;}
.rc .rc-row.is-open .rc-caret{transform:rotate(90deg);}
.rc .rc-row-todo th,.rc .rc-row-todo td{color:#7d8a84;background:#f6f7f5;}
.rc .rc-q-sm{display:inline-grid;place-items:center;width:20px;height:20px;margin-right:8px;border-radius:50%;background:#dfe4e0;color:#6d7a74;font-size:12px;font-weight:700;vertical-align:middle;}
.rc .rc-todo-cell{text-align:left!important;}
.rc .rc-todo-cell > span{font-style:italic;margin-right:12px;}
.rc .rc-todo-cell .btn{vertical-align:middle;margin:2px 0;}
.rc .rc-row-todo .btn{min-height:32px;padding:4px 14px;font-size:13px;white-space:nowrap;min-width:0;}
.rc .rc-detail > td{text-align:left!important;background:#fff;padding:6px 18px 20px!important;}
.rc .rc-detail-in{max-width:700px;}

/* the DDI curve */
.rc .rc-curve{display:block;width:100%;max-width:560px;height:auto;margin:2px 0 0;}
.rc .rc-curve .grid{stroke:var(--r-line-2);stroke-width:1;}
.rc .rc-curve .ax{font-size:11px;fill:var(--r-muted);}
.rc .rc-curve .ax-title{font-size:11.5px;font-weight:700;fill:var(--r-muted);letter-spacing:.04em;}
.rc .rc-curve .band{fill:rgba(29,110,85,.12);}
.rc .rc-curve .fit{stroke:#6f8d80;stroke-width:2;stroke-dasharray:5 4;}
.rc .rc-curve .you-ddi{stroke:var(--r-line);stroke-width:1;}
.rc .rc-curve .pred{fill:#fff;stroke:#6f8d80;stroke-width:2;}
.rc .rc-curve .you{fill:var(--r-marigold);stroke:var(--r-ink);stroke-width:2;}
.rc .rc-legend{display:flex;flex-wrap:wrap;gap:4px 16px;font-size:12px;color:var(--r-muted);margin:4px 0 0;}
.rc .rc-legend i{display:inline-block;vertical-align:middle;margin-right:6px;}
.rc .k-you{width:11px;height:11px;border-radius:50%;background:var(--r-marigold);border:2px solid var(--r-ink);}
.rc .k-pred{width:10px;height:10px;border-radius:50%;background:#fff;border:2px solid #6f8d80;}
.rc .k-band{width:16px;height:10px;background:rgba(29,110,85,.18);}

/* at a glance: each survey's typical range for your DDI, and your score */
.rc .rc-db{max-width:680px;}
.rc .rc-db-row{display:grid;grid-template-columns:130px minmax(0,1fr) 34px;align-items:center;gap:12px;margin:9px 0;}
.rc .rc-db-label{font-weight:700;font-size:13.5px;}
.rc .rc-db-row b{text-align:right;font-size:13.5px;}
.rc .rc-db-track{position:relative;height:18px;border-radius:9px;background:var(--r-panel);border:1px solid var(--r-line-2);}
.rc .rc-db-band{position:absolute;top:2px;bottom:2px;border-radius:7px;background:rgba(29,110,85,.22);}
.rc .rc-db-you{position:absolute;top:50%;width:14px;height:14px;margin:-7px 0 0 -7px;border-radius:50%;background:var(--r-green);border:2px solid #fff;box-shadow:0 0 0 1px var(--r-ink);}
.rc .rc-db-you.off{background:var(--r-marigold);}
.rc .rc-db-axis{display:flex;justify-content:space-between;margin:2px 46px 0 142px;font-size:11px;color:var(--r-muted);}

/* what the DDI goes with */
.rc .rc-links{max-width:620px;}
.rc .rc-link-row{display:grid;grid-template-columns:150px minmax(0,1fr) 74px;align-items:center;gap:12px;margin:7px 0;font-size:13.5px;}
.rc .rc-link-row span:first-child{font-weight:700;}
.rc .rc-link-bar{height:12px;background:var(--r-panel);border:1px solid var(--r-line-2);}
.rc .rc-link-bar i{display:block;height:100%;background:#6f8d80;}
.rc .rc-link-row b{font-size:12.5px;color:var(--r-muted);text-align:right;}

/* a test's detailed results, each with what it means */
.rc .rc-dl{margin:6px 0 0;}
.rc .rc-dl > div{display:grid;grid-template-columns:170px minmax(0,1fr);gap:4px 18px;padding:10px 0;border-top:1px solid var(--r-line-2);}
.rc .rc-dl > div:first-child{border-top:0;}
.rc .rc-dl dt{font-weight:700;}
.rc .rc-dl dd{margin:0;}
.rc .rc-dl dd b{display:block;font-size:18px;font-family:var(--r-serif);font-weight:500;}
.rc .rc-dl dd span{color:var(--r-muted);font-size:13.5px;}

/* the distribution bars carry their share on hover */
.rc .rc-dist .bar{cursor:default;}

/* phones: tables keep their essential columns (the surveys table: Survey, Your score, Against your
   DDI; the rest is in each row's details) */
@media (max-width:600px){
  .rc .rc-c-more{display:none;}
  .rc .sppi-r-t th,.rc .sppi-r-t td{min-width:0;padding:7px 8px;}
  .rc .sppi-r-t tbody th{min-width:0;}
  .rc .rc-row-todo .rc-todo-cell{font-size:12.5px;}
}
@media (max-width:720px){
  .rc .sppi-r-page{padding:22px 14px;}
  .rc .rc-db-row{grid-template-columns:96px minmax(0,1fr) 30px;gap:8px;}
  .rc .rc-db-axis{margin:2px 38px 0 104px;}
  .rc .rc-link-row{grid-template-columns:110px minmax(0,1fr) 64px;gap:8px;}
  .rc .rc-dl > div{grid-template-columns:1fr;}
  .rc .rc-goal{padding:14px 16px;}
  .rc .rc-detail > td{padding:6px 10px 16px!important;}
}
