/*
 * Dedicated candidate-experience stylesheet -- loaded only by
 * base_candidate.html, the standalone base every candidate-facing
 * template extends. Deliberately not shared with project.css (base.html)
 * or itesthub/static/css/industry/ (base_industry.html): a marketing-site
 * restyle must never be able to change what a candidate mid-test sees.
 * See BACKLOG.md's base-template-split entry for why this file exists.
 *
 * Moved here verbatim from the inline <style> block that used to live at
 * the end of candidate_base.html's <body> -- same rules, same selectors,
 * now a real cacheable stylesheet loaded from <head> instead.
 */

.candidate-experience {
  background: #fff;
  color: #212529;
  font-family: 'Trebuchet MS', Arial, sans-serif;
}

/* Copy protection: on by default, deters casual copy/paste of test
   content. Scoped to the main content area only -- never the header,
   footer, or form controls -- and switched off per-candidate (see
   Candidate.copy_protection_disabled) for anyone who's told us they
   need a screen reader or other assistive technology this would get
   in the way of. */
body.copy-protected main {
  -webkit-user-select: none;
  user-select: none;
}

body.copy-protected main input,
body.copy-protected main textarea,
body.copy-protected main select,
body.copy-protected main button,
body.copy-protected main a,
body.copy-protected main label {
  -webkit-user-select: auto;
  user-select: auto;
}

.candidate-page-width {
  width: 100%;
  max-width: 1600px;
  margin-inline: auto;
  padding-inline: clamp(1rem, 3vw, 3rem);
}

.candidate-header {
  padding-block: 0.75rem;
  background: #fff;
}

.candidate-brand {
  font-size: 1.125rem;
  font-weight: 600;
}

.candidate-experience main {
  font-size: 1.25rem;
  line-height: 1.5;
}

.candidate-experience .card-body {
  font-size: 1.25rem;
  line-height: 1.55;
}

.candidate-experience .response-matrix th,
.candidate-experience .response-matrix td {
  font-size: 1.25rem;
}

.candidate-experience main {
  width: 100%;
}

.candidate-experience main>.container {
  width: 100%;
  max-width: 2000px;
  padding-inline: clamp(1rem, 3vw, 3rem);
}

.candidate-experience main .w-75 {
  width: 100% !important;
  max-width: 1900px;
}

.candidate-experience main .mt-5 {
  margin-top: 1.5rem !important;
}

.candidate-footer {
  margin-top: 2rem;
  padding-block: 1rem;
  background: #f8f9fa;
}

.candidate-footer a {
  color: #0a58ca;
}

.candidate-skip-link {
  position: fixed;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 2000;
  padding: 0.75rem 1rem;
  color: #fff;
  background: #0d6efd;
  border-radius: 0.25rem;
  transform: translateY(-150%);
}

.candidate-skip-link:focus {
  transform: translateY(0);
}

.candidate-experience :focus-visible {
  outline: 3px solid #0b5ed7;
  outline-offset: 3px;
}

.candidate-experience .asteriskField {
  display: none;
}

/* Radio/checkbox answer options: make the whole row (not just the small
   input or the text itself) a single, generously-sized click/tap target,
   with hover shading so it's clear the row is selectable. Scoped to
   plain form-check rows only -- the response-matrix table (used for
   True/False/Cannot-Tell style items) already has its own full-cell
   clickable styling and isn't affected by this. */
.candidate-experience .form-check {
  padding-left: 0;
  margin-bottom: 0.5rem;
}

.candidate-experience .form-check-input {
  margin-left: 0;
  margin-top: 0;
  flex-shrink: 0;
  width: 1.35rem;
  height: 1.35rem;
}

.candidate-experience .form-check-label {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 2.75rem;
  margin-left: 0.65rem;
  padding: 0.5rem 0.75rem;
  border-radius: 0.375rem;
  cursor: pointer;
}

.candidate-experience .form-check {
  display: flex;
  align-items: center;
}

.candidate-experience .form-check-label:hover {
  background-color: #f0f4f9;
}

@media (prefers-contrast: more) {
  .candidate-experience .form-check-label:hover {
    outline: 2px solid currentColor;
  }
}

/* Fault Finding: input -> switch -> output circuit diagram. On/off
   state and switch identity are always given as text as well as shape/
   colour (WCAG 1.4.1 -- never colour/shape alone). */
.ff-diagram {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin: 1rem 0 1.5rem;
  padding: 1.5rem;
  background: #f7f9fb;
  border: 1px solid #d7dee5;
  border-radius: 0.5rem;
}

.ff-column {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.6rem;
}

.ff-column-label {
  font-weight: 700;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #1c3f60;
  margin-bottom: 0.15rem;
}

.ff-dot {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.ff-dot-circle {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  border: 2px solid #1c3f60;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  flex: none;
  font-size: 1.05rem;
}

.ff-dot--on .ff-dot-circle {
  background: #fff;
  color: #1c3f60;
}

.ff-dot--off .ff-dot-circle {
  background: #1c3f60;
  color: #fff;
}

.ff-dot-state {
  font-size: 1.05rem;
  font-weight: 600;
  color: #43536b;
  min-width: 2.6rem;
}

.ff-flow {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
  justify-content: center;
}

.ff-arrow {
  color: #1c3f60;
  font-size: 1.3rem;
}

.ff-switch {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  min-width: 4.75rem;
}

.ff-switch-label {
  font-weight: 700;
  color: #1c3f60;
  font-size: 1.1rem;
}

.ff-switch-icon {
  width: 4rem;
  height: 4rem;
  stroke: #1c3f60;
  fill: none;
  stroke-width: 6;
}

/* Fault Finding / Error Checking: response options stacked vertically, one
   per line, left-aligned. Each .form-check must NOT be individually centred
   (e.g. `margin: 0 auto`) -- centring rows independently by their own width
   gives every row a different left edge whenever option text length varies
   (obvious on Error Checking's mix of short/long options), which reads as
   misaligned rather than as a real left-aligned list. */
.ff-response-options {
  text-align: left;
}

.ff-response-options .form-check {
  display: flex;
  align-items: center;
  text-align: left;
  margin: 0 0 0.5rem;
  width: fit-content;
}

.ff-switch-name {
  font-size: 0.95rem;
  /* #43536b measured at 4.45:1 on the diagram's background -- fails
     4.5:1 by a hair (caught by axe-core). #1c3f60 passes, already
     used and verified elsewhere in this component. Kept through the
     candidate-test-revert (this file went back to base.html) because
     CLAUDE.md's standing rule is that no change to this template may
     introduce a WCAG 2.2 AA violation -- a mechanical revert would
     otherwise have silently reintroduced this one. */
  color: #1c3f60;
  text-align: center;
}

.ff-key {
  max-width: 800px;
  width: 100%;
  margin: 1rem auto 0;
  text-align: center;
}

.ff-key table {
  width: 100%;
  border-collapse: collapse;
  font-size: 1.05rem;
  text-align: left;
}

.ff-key th,
.ff-key td {
  border: 1px solid #d7dee5;
  padding: 0.4rem 0.6rem;
  text-align: left;
  vertical-align: middle;
}

.ff-key th {
  background: #eef1f4;
}

.ff-key-icon {
  width: 1.8rem;
  height: 1.8rem;
  vertical-align: middle;
  margin-right: 0.4rem;
  stroke: #1c3f60;
  fill: none;
  stroke-width: 6;
}

/* Error Checking: consignment-details / pick-manifest comparison tables. */
.ec-table-wrap {
  max-width: 880px;
  width: 100%;
  margin: 1rem auto;
  overflow-x: auto;
}

.ec-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 1.25rem;
}

.ec-table caption {
  font-weight: 700;
  color: #fff;
  background: #1c3f60;
  padding: 0.5rem 0.75rem;
  text-align: left;
  caption-side: top;
  border-radius: 0.375rem 0.375rem 0 0;
}

.ec-table th,
.ec-table td {
  border: 1px solid #d7dee5;
  padding: 0.5rem 0.75rem;
  text-align: left;
  white-space: nowrap;
}

.ec-table th {
  background: #eef1f4;
}

.ec-table--manifest caption {
  background: #43536b;
}

.ec-table--manifest td {
  background: #f7f9fb;
  font-weight: 600;
}

.ec-key {
  max-width: 880px;
  margin: 0.85rem auto;
  padding: 0.6rem 0.9rem;
  border: 1px solid #1c3f60;
  border-radius: 0.4rem;
  background: #eef4fa;
  font-size: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  row-gap: 0.35rem;
}

.ec-key strong {
  color: #1c3f60;
}

.ec-key-label {
  font-weight: 700;
  color: #1c3f60;
  margin-right: 0.75rem;
}

/* Each "CODE = Value" entry as its own pill-like chunk, separated by a
   visible divider rather than relying on raw whitespace in the source
   text -- multiple spaces in HTML collapse to one when rendered, so the
   entries used to run together with barely any visual gap at all. */
.ec-key-item {
  padding-right: 0.9rem;
  margin-right: 0.9rem;
  border-right: 1px solid #9cb7cf;
}

.ec-key-item:last-child {
  padding-right: 0;
  margin-right: 0;
  border-right: none;
}

@media (max-width: 767.98px) {
  .candidate-header {
    padding-block: 0.5rem;
  }

  .candidate-experience main .mt-5 {
    margin-top: 1rem !important;
  }
}

/*
  Numerical Analysis stem visuals (see itesthub/itembank/management/
  commands/seed_numerical_analysis.py): the source material is a set of
  chart/table screenshots. Rather than embed those as flat <img> (the
  approach the older Numerical Reasoning test uses, which fails WCAG
  1.1.1 -- the alt text can't convey a chart's actual data), each stem
  here renders a lightweight CSS/SVG visual plus a real, always-visible
  <table> of the same underlying values, so screen-reader and low-
  vision candidates get the real numbers, not a re-description of a
  picture. All colours below are checked at >= 3:1 against the white
  chart background (a non-text/graphical contrast requirement, WCAG
  1.4.11), and no data series relies on colour alone -- every bar/
  segment/cell also carries a visible number or label.
*/
.na-chart {
  margin: 0 0 1rem;
  padding: 1rem;
  border: 1px solid #d7dee5;
  border-radius: 0.375rem;
  background: #fff;
}

.na-chart-title {
  font-weight: 700;
  margin: 0 0 0.75rem;
  color: #1c3f60;
}

.na-chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  margin: 1rem 0 0;
  font-size: 1rem;
}

.na-chart-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.na-chart-swatch {
  /* 3x the original 0.85rem -- at the old size the fill patterns
     (stripes/dots/crosshatch) that tell series apart without colour
     were too small to actually distinguish from each other. */
  width: 2.55rem;
  height: 2.55rem;
  border-radius: 0.25rem;
  flex-shrink: 0;
  display: inline-block;
  border: 1px solid rgba(0, 0, 0, 0.25);
}

.na-bars {
  display: flex;
  align-items: flex-end;
  gap: 1.5rem;
  height: 17rem;
  padding-top: 2.2rem;
  border-bottom: 2px solid #495057;
}

/*
  Groups/bars share the container's width proportionally (flex: 1)
  rather than a fixed rem width -- a 5-group x 5-bar chart (e.g.
  monthly rainfall by region) previously forced a fixed ~888px total
  width that overflowed the main content column, clipping the last
  group (see .na-bars used to carry overflow-x: auto -- present but
  easy to miss, not a real fix). Flexible sizing means any number of
  groups/bars always fits the available width, on any screen size, with
  nothing to scroll to.
*/
.na-bar-group {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  min-width: 0;
  flex: 1;
}

.na-bar-group-bars {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 0.5rem;
  height: 14.7rem;
}

.na-bar-group-label {
  margin-top: 0.4rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: #1c3f60;
  text-align: center;
}

.na-bar {
  flex: 1;
  min-width: 0;
  max-width: 3.5rem;
  height: calc(var(--pct) * 1%);
  min-height: 2px;
  border-radius: 0.15rem 0.15rem 0 0;
  position: relative;
  display: flex;
  justify-content: center;
}

.na-bar-value {
  position: absolute;
  top: -1.9rem;
  font-size: 1.05rem;
  font-weight: 700;
  white-space: nowrap;
  color: #1a1a1a;
  /* A label can be wider than its own (narrow, 1.4rem) bar and spill
     into a neighbouring bar's column -- a solid background guarantees
     readable contrast regardless of what colour happens to sit behind
     it, rather than depending on precise non-overlapping layout. */
  background: #fff;
  padding: 0.05rem 0.15rem;
  border-radius: 0.2rem;
  z-index: 1;
}

.na-stack {
  width: 100%;
  max-width: 5rem;
  height: 15rem;
  display: flex;
  flex-direction: column-reverse;
  border-radius: 0.15rem 0.15rem 0 0;
  overflow: hidden;
}

.na-stack-segment {
  height: calc(var(--pct) * 1%);
  min-height: 1.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  text-align: center;
  padding: 0 0.15rem;
}

.na-donut-wrap {
  display: flex;
  justify-content: center;
}

.na-donut-wrap svg {
  /* Fills the available card width up to a sensible cap, instead of a
     small fixed pixel size regardless of how wide its container is --
     the ring used to end up visually occupying only about a quarter
     of its own card. */
  width: 100%;
  max-width: 26rem;
  height: auto;
}

.na-floorplan {
  display: grid;
  width: 100%;
  margin: 0 0 1rem;
  gap: 2px;
}

.na-floorplan-room {
  border: 2px solid #1a1a1a;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.15rem;
  text-align: center;
  padding: 1rem;
  min-height: 6rem;
  color: #1a1a1a;
}

.na-floorplan-label {
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.05rem;
  color: #1c3f60;
}

.na-floorplan-label--top {
  align-items: flex-end;
  padding-bottom: 0.35rem;
}

.na-floorplan-label--left {
  justify-content: flex-end;
  padding-right: 0.5rem;
  text-align: right;
}

.na-floorplan-label--right {
  justify-content: flex-start;
  padding-left: 0.5rem;
}

.na-data-table {
  table-layout: fixed;
  width: 100%;
}

.na-data-table caption {
  caption-side: top;
  font-weight: 700;
  color: #1c3f60;
  padding: 0;
  margin-bottom: 0.5rem;
}

.na-peak::after {
  content: " *";
  font-weight: 700;
}

.na-timetable {
  /* Overrides na-data-table's table-layout:fixed (which forces every
     column, including the stop-name column, to the same width,
     wrapping longer stop names like "London Kings Cross (Arrive)"
     across multiple lines) -- auto-sizes each column to its own
     content instead, so names fit on one line and the many narrow
     time columns stay narrow rather than being stretched to match. */
  table-layout: auto;
}

.na-timetable th[scope="row"] {
  white-space: nowrap;
  text-align: left;
}

.na-timetable td,
.na-timetable thead th[scope="col"] {
  white-space: nowrap;
  font-size: 0.85rem;
  padding-left: 0.4rem;
  padding-right: 0.4rem;
  text-align: center;
}

.na-timetable.table-bordered .na-day-boundary {
  /* Marks where one day group's columns (e.g. Saturday) end and the
     next (e.g. Sunday) begins -- thicker than the table's normal 1px
     grid so the day groupings read at a glance. */
  border-left: 3px solid #495057;
}

/* Candidate Hub components -- self-contained equivalents of a few Industry
   design-system patterns (blueprint card + corner marks, tag, kicker,
   ghost button), copied for LOOK only, at the values Industry already uses
   (#416180 is its --color-accent-700, already verified >=4.5:1 on white
   elsewhere in this app; 2-4px radii match its --radius-md). This file
   does not import or reference Industry's stylesheet or var() tokens --
   see base_candidate.html for why that dependency is exactly what this
   file exists to avoid. */
.candidate-kicker {
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #416180;
}

.candidate-card {
  position: relative;
  border: 1px solid rgba(29, 31, 32, 0.16);
  border-radius: 2px;
}

.candidate-card .corner {
  position: absolute;
  width: 11px;
  height: 11px;
  color: rgba(29, 31, 32, 0.55);
}

.candidate-card .corner::before,
.candidate-card .corner::after {
  content: "";
  position: absolute;
  background: currentColor;
}

.candidate-card .corner::before {
  left: 5px;
  top: 0;
  width: 1px;
  height: 100%;
}

.candidate-card .corner::after {
  top: 5px;
  left: 0;
  width: 100%;
  height: 1px;
}

.candidate-card .corner.tl {
  top: -6px;
  left: -6px;
}

.candidate-card .corner.tr {
  top: -6px;
  right: -6px;
}

.candidate-card .corner.bl {
  bottom: -6px;
  left: -6px;
}

.candidate-card .corner.br {
  bottom: -6px;
  right: -6px;
}

.candidate-progress-track {
  flex: 1;
  height: 6px;
  border: 1px solid rgba(29, 31, 32, 0.16);
  border-radius: 2px;
  overflow: hidden;
}

.candidate-progress-fill {
  height: 100%;
  background: #416180;
}

.candidate-tag {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  letter-spacing: 0.02em;
  padding: 3px 10px;
  border-radius: 3px;
  white-space: nowrap;
}

.candidate-tag-neutral {
  background: #f5f5f8;
  color: #424244;
}

.candidate-tag-accent {
  background: #eef6ff;
  color: #2c455d;
}

.candidate-tag-outline {
  border: 1px solid #416180;
  color: #416180;
}

.candidate-btn-ghost {
  display: inline-block;
  padding: 0.375rem 0.75rem;
  font-size: 1rem;
  border: 1px solid #416180;
  border-radius: 0.375rem;
  color: #416180;
  text-decoration: none;
  background: transparent;
}

.candidate-btn-ghost:hover {
  background: #eef6ff;
  color: #2c455d;
}

.candidate-details {
  border: 1px solid rgba(29, 31, 32, 0.16);
  border-radius: 2px;
}

.candidate-details summary {
  cursor: pointer;
  padding: 10px 14px;
  font-weight: 600;
  font-size: 15px;
}
