/* The RBL Group — 2026 HR Audit
   Fonts: Open Sans only. Colors: RBL palette only (see :root). */

/* Open Sans (variable, self-hosted from @fontsource-variable/open-sans, SIL OFL 1.1) */
@font-face {
  font-family: 'Open Sans';
  font-style: normal;
  font-display: swap;
  font-weight: 300 800;
  src: url('../fonts/open-sans-latin-ext-wght-normal.woff2') format('woff2-variations');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
  font-family: 'Open Sans';
  font-style: italic;
  font-display: swap;
  font-weight: 300 800;
  src: url('../fonts/open-sans-latin-ext-wght-italic.woff2') format('woff2-variations');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
  font-family: 'Open Sans';
  font-style: normal;
  font-display: swap;
  font-weight: 300 800;
  src: url('../fonts/open-sans-latin-wght-normal.woff2') format('woff2-variations');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: 'Open Sans';
  font-style: italic;
  font-display: swap;
  font-weight: 300 800;
  src: url('../fonts/open-sans-latin-wght-italic.woff2') format('woff2-variations');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

:root {
  /* RBL palette */
  --navy: #071d49;
  --rbl-blue: #0086d6;
  --bright-blue: #19a9ff;
  --green: #008884;
  --bright-green: #5ec4b6;
  --red: #ed1b34;
  --yellow: #e8b70b;
  --panel: #efefef;        /* light gray panel used in the RBL slide boxes */

  /* Derived neutrals (navy tints) */
  --ink: var(--navy);
  --ink-2: rgb(7 29 73 / 72%);
  --ink-3: rgb(7 29 73 / 55%);
  --line: rgb(7 29 73 / 14%);
  --line-2: rgb(7 29 73 / 24%);
  --tint: rgb(0 134 214 / 7%);
  --bg: #ffffff;
  --surface: #ffffff;

  --radius: 6px;
  --corner: 18px;          /* RBL clipped-corner motif */
  --shadow: 0 1px 2px rgb(7 29 73 / 6%), 0 4px 16px rgb(7 29 73 / 6%);
  --max: 920px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  font-family: 'Open Sans', sans-serif;
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
}
h1, h2, h3, h4 { margin: 0; line-height: 1.2; font-weight: 700; }
p { margin: 0 0 1em; }
a { color: var(--rbl-blue); }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 16px; }

/* ---------- Header / brand ---------- */
.site-header {
  position: relative;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--navy); }
.brand-logo { display: block; height: 30px; width: auto; }
/* Chevron stripes + navy block echoing the RBL slide corner */
.header-art { position: absolute; top: 0; right: 0; width: 280px; height: 64px; pointer-events: none; }
.header-art svg { display: block; width: 100%; height: 100%; }
.header-label {
  position: absolute; top: 0; right: 20px; line-height: 64px;
  color: #fff; font-size: 14px; font-weight: 700; letter-spacing: .5px;
}
@media (max-width: 640px) {
  .brand-logo { height: 24px; }
  .header-art { width: 34vw; }
  .header-label { right: 12px; font-size: 13px; }
}

/* ---------- Hero ---------- */
.hero { background: var(--navy); color: #fff; padding: 56px 0 64px; position: relative; overflow: hidden; }
.hero-art {
  position: absolute; right: 48px; top: 50%; width: 250px; height: 250px;
  transform: translateY(-50%); opacity: .9; pointer-events: none;
}
@media (max-width: 1119px) { .hero-art { display: none; } }
.eyebrow {
  display: inline-block; font-size: 13px; font-weight: 700; letter-spacing: 2.5px;
  text-transform: uppercase; color: var(--bright-blue); margin-bottom: 14px;
}
.hero h1 { font-size: clamp(30px, 5vw, 44px); letter-spacing: -0.5px; max-width: 700px; }
.hero p.lead { font-size: 18px; color: rgb(255 255 255 / 82%); max-width: 640px; margin: 18px 0 0; }

/* ---------- Layout blocks ---------- */
main { flex: 1 0 auto; width: 100%; padding-bottom: 48px; }
.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
  margin-top: 24px;
}
.card.lifted { margin-top: -32px; }
.card h2 { font-size: 22px; margin-bottom: 12px; }
.card > p:last-child { margin-bottom: 0; }
.muted { color: var(--ink-2); }
.small { font-size: 14px; }

/* Slide-style clipped panel */
.panel {
  background: var(--panel);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--corner)), calc(100% - var(--corner)) 100%, 0 100%);
  padding: 20px 22px;
}

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
@media (max-width: 720px) { .two-col { grid-template-columns: 1fr; } }

.steps { margin: 0; padding-left: 20px; }
.steps li { margin-bottom: 6px; }

/* ---------- Forms ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 20px; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
.field label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.field .opt { font-weight: 400; color: var(--ink-3); }
.input, select.input, textarea.input {
  width: 100%; padding: 11px 12px; border: 1px solid var(--line-2); border-radius: var(--radius);
  background: #fff; transition: border-color .15s, box-shadow .15s;
}
textarea.input { min-height: 96px; resize: vertical; }
.input:focus { outline: none; border-color: var(--rbl-blue); box-shadow: 0 0 0 3px rgb(0 134 214 / 20%); }
.input[readonly] { background: var(--panel); }
.field.invalid .input { border-color: var(--red); }
.field .err { color: var(--red); font-size: 13px; margin-top: 4px; display: none; }
.field.invalid .err { display: block; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: var(--radius); border: 1px solid transparent;
  font-weight: 700; font-size: 15px; cursor: pointer; text-decoration: none;
  background: var(--rbl-blue); color: #fff; transition: background .15s, box-shadow .15s;
}
.btn:hover { background: var(--navy); }
.btn:focus-visible { outline: none; box-shadow: 0 0 0 3px rgb(25 169 255 / 45%); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.navy { background: var(--navy); }
.btn.navy:hover { background: var(--rbl-blue); }
.btn.ghost { background: transparent; color: var(--navy); border-color: var(--line-2); }
.btn.ghost:hover { background: var(--tint); }
.btn.danger { background: transparent; color: var(--red); border-color: rgb(237 27 52 / 35%); }
.btn.danger:hover { background: rgb(237 27 52 / 6%); }
.btn.sm { padding: 7px 12px; font-size: 13px; }
.btn.lg { padding: 15px 30px; font-size: 16px; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-top: 24px; }

.alert {
  border-left: 4px solid var(--rbl-blue); background: var(--tint);
  padding: 14px 16px; border-radius: 0 var(--radius) var(--radius) 0; margin-top: 16px;
}
.alert.error { border-color: var(--red); background: rgb(237 27 52 / 6%); }
.alert.warn { border-color: var(--yellow); background: rgb(232 183 11 / 10%); }
.alert.ok { border-color: var(--green); background: rgb(0 136 132 / 8%); }

/* ---------- Participant summary (after step 1) ---------- */
.who {
  display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
}
.who dl { display: flex; flex-wrap: wrap; gap: 6px 28px; margin: 0; }
.who dt { font-size: 12px; text-transform: uppercase; letter-spacing: 1px; color: var(--ink-3); font-weight: 600; }
.who dd { margin: 0; font-weight: 600; }

/* ---------- Rating scale legend ---------- */
.scale-legend { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-top: 12px; }
.scale-legend div {
  background: var(--panel); border-radius: var(--radius); padding: 10px 6px; text-align: center; font-size: 12px; line-height: 1.3;
}
.scale-legend b { display: block; font-size: 18px; color: var(--rbl-blue); margin-bottom: 2px; }
@media (max-width: 640px) {
  .scale-legend { grid-template-columns: 1fr; }
  .scale-legend div { display: flex; gap: 12px; align-items: center; text-align: left; padding: 6px 12px; }
  .scale-legend b { margin: 0; width: 18px; }
}
.scale-bands { font-size: 13px; color: var(--ink-2); margin-top: 10px; text-align: center; }

/* ---------- Sections & items ---------- */
.section { margin-top: 40px; }
.section-head { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 8px; }
.section-letter {
  flex: none; width: 44px; height: 44px; display: grid; place-items: center;
  background: var(--navy); color: #fff; font-weight: 800; font-size: 20px;
  clip-path: polygon(0 0, 100% 0, 100% 70%, 70% 100%, 0 100%);
}
.section-head h2 { font-size: 24px; }
.section-head p { margin: 4px 0 0; color: var(--ink-2); }
.stem { font-weight: 600; font-style: italic; color: var(--ink-2); margin: 18px 0 4px; font-size: 15px; }

.item {
  border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-top: 12px;
  background: #fff; transition: border-color .15s, background .15s;
}
.item.answered { border-color: rgb(0 134 214 / 35%); }
.item.missing { border-color: var(--red); background: rgb(237 27 52 / 4%); }
.item-q { display: flex; gap: 14px; }
.item-num {
  flex: none; font-weight: 800; color: var(--rbl-blue); font-size: 15px; min-width: 24px; padding-top: 1px;
}
.item-q p { margin: 0; }
.item-q strong { font-weight: 700; }
.rating { display: grid; grid-template-columns: repeat(7, 1fr) 30px 1.3fr; gap: 6px; margin-top: 16px; padding-left: 38px; }
.rating label { position: relative; cursor: pointer; }
.rating input { position: absolute; opacity: 0; pointer-events: none; }
.rating label span {
  display: grid; place-items: center; height: 42px; border: 1px solid var(--line-2); border-radius: var(--radius);
  font-weight: 700; font-size: 15px; background: #fff; transition: all .12s; user-select: none;
}
.rating label:hover span { border-color: var(--rbl-blue); background: var(--tint); }
.rating input:focus-visible + span { box-shadow: 0 0 0 3px rgb(25 169 255 / 45%); }
.rating input:checked + span { background: var(--rbl-blue); border-color: var(--rbl-blue); color: #fff; }
/* N/A is set apart from the 1–7 scale so it can't be mistaken for its top end */
.rating .na { grid-column: 9; }
.rating .na::before {
  content: ''; position: absolute; left: -18px; top: 6px; bottom: 6px;
  border-left: 1px solid var(--line-2);
}
.rating .na span {
  font-size: 13px; font-weight: 600; letter-spacing: .5px; color: var(--ink-3);
  background: var(--panel); border-style: dashed;
}
.rating .na:hover span { border-color: var(--navy); background: var(--panel); color: var(--navy); }
.rating .na input:checked + span { background: var(--navy); border: 1px solid var(--navy); color: #fff; }
.rating-end { grid-row: 2; font-size: 11.5px; color: var(--ink-3); margin-top: -2px; }
.rating-end.lo { grid-column: 1 / 3; }
.rating-end.hi { grid-column: 6 / 8; text-align: right; }
.rating .na { grid-row: 1; }
@media (max-width: 640px) {
  .rating { padding-left: 0; grid-template-columns: repeat(7, 1fr); }
  .rating-end.lo { grid-column: 1 / 4; }
  .rating-end.hi { grid-column: 4 / 8; }
  .rating .na { grid-row: 3; grid-column: 1 / -1; margin-top: 8px; }
  .rating .na::before { display: none; }
}

.reflection { margin-top: 18px; }
.reflection label { font-weight: 600; display: block; margin-bottom: 8px; }

/* ---------- Progress bar ---------- */
.progress {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 16px; height: 48px; margin-top: 16px;
  padding: 0 4px; font-size: 14px; font-weight: 600;
  background: rgb(255 255 255 / 72%); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.progress-track { flex: 1; height: 6px; background: var(--panel); border-radius: 3px; overflow: hidden; }
.progress-fill { height: 100%; width: 0; background: var(--rbl-blue); transition: width .25s; }

/* ---------- Results ---------- */
.overall {
  display: flex; align-items: center; gap: 28px; flex-wrap: wrap;
}
.overall-score {
  background: var(--navy); color: #fff; padding: 22px 28px; min-width: 170px; text-align: center;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 22px), calc(100% - 22px) 100%, 0 100%);
}
.overall-score .num { font-size: 48px; font-weight: 800; line-height: 1; }
.overall-score .of { font-size: 13px; opacity: .75; margin-top: 6px; }

.band-chip {
  display: inline-block; font-size: 12px; font-weight: 700; line-height: 1.4;
  padding: 3px 10px; border-radius: 999px; white-space: nowrap;
}
.tone-signature { background: var(--green); color: #fff; }
.tone-strength { background: var(--bright-green); color: var(--navy); }
.tone-developing { background: var(--yellow); color: var(--navy); }
.tone-priority { background: var(--red); color: #fff; }
.bg-signature { background: var(--green); }
.bg-strength { background: var(--bright-green); }
.bg-developing { background: var(--yellow); }
.bg-priority { background: var(--red); }

.bars { margin-top: 12px; }
.bar-row {
  display: grid; grid-template-columns: 220px 1fr 44px 180px; grid-template-areas: "label bar num chip";
  gap: 14px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line);
}
.bar-row:last-child { border-bottom: 0; }
.bar-label { grid-area: label; font-weight: 600; font-size: 14px; }
.bar-label small { display: block; font-weight: 400; color: var(--ink-3); font-size: 12px; }
.bar-track { grid-area: bar; position: relative; height: 12px; background: var(--panel); border-radius: 0 4px 4px 0; }
.bar-fill { height: 100%; border-radius: 0 4px 4px 0; background: var(--rbl-blue); }
.bar-num { grid-area: num; text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.bar-chip { grid-area: chip; justify-self: start; }
@media (max-width: 640px) {
  .bar-row { grid-template-columns: 1fr auto; grid-template-areas: "label num" "bar bar" "chip chip"; row-gap: 8px; }
}

.interp { width: 100%; border-collapse: collapse; font-size: 14px; margin-top: 8px; }
.interp th, .interp td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.interp th { font-size: 12px; text-transform: uppercase; letter-spacing: 1px; color: var(--ink-3); }
@media (max-width: 640px) {
  .interp thead { display: none; }
  .interp tr { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
  .interp td { border: 0; padding: 0; }
  .interp td:nth-child(3) { grid-column: 1 / -1; }
}

/* ---------- Report: expandable domains ---------- */
.section-avg-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.link-btn {
  background: none; border: 0; padding: 4px 0; color: var(--rbl-blue); font-weight: 600; font-size: 14px; cursor: pointer;
}
.link-btn:hover { text-decoration: underline; }
details.domain { border-bottom: 1px solid var(--line); }
details.domain:last-of-type { border-bottom: 0; }
details.domain > summary { list-style: none; cursor: pointer; padding-bottom: 12px; }
details.domain > summary::-webkit-details-marker { display: none; }
details.domain > summary:focus-visible { outline: 3px solid rgb(25 169 255 / 45%); outline-offset: 2px; border-radius: var(--radius); }
details.domain .bars { margin-top: 4px; }
details.domain .bar-row { border-bottom: 0; padding-bottom: 4px; }
.domain-toggle {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 600; color: var(--rbl-blue);
}
.domain-toggle::after {
  content: ''; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: translateY(-2px) rotate(45deg); transition: transform .15s;
}
details.domain[open] .domain-toggle::after { transform: translateY(1px) rotate(-135deg); }
details.domain > summary:hover .domain-toggle { text-decoration: underline; }
.domain-toggle .when-open, details.domain[open] .domain-toggle .when-closed { display: none; }
details.domain[open] .domain-toggle .when-open { display: inline; }
.domain-body {
  margin: 4px 0 24px; padding: 20px 24px 8px; background: var(--panel); border-radius: var(--radius);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--corner)), calc(100% - var(--corner)) 100%, 0 100%);
}
.domain-intro { font-size: 14.5px; line-height: 1.7; color: var(--ink-2); max-width: 68ch; margin: 0 0 20px; }
.domain-figure {
  font-size: 12px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--ink-3);
  margin: 0 0 4px; padding-top: 16px; border-top: 1px solid var(--line);
}
.criteria { list-style: none; margin: 0; padding: 0; }
.criterion { padding: 14px 0; border-bottom: 1px solid var(--line); }
.criterion:last-child { border-bottom: 0; }
.criterion-head { display: flex; align-items: baseline; gap: 10px; }
.criterion-num { flex: none; min-width: 22px; font-weight: 800; font-size: 14px; color: var(--rbl-blue); }
.criterion-name { flex: 1; font-weight: 700; font-size: 15px; }
.your-score {
  flex: none; display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 600; color: var(--ink-2); white-space: nowrap;
  background: #fff; border: 1px solid var(--line-2); border-radius: 999px; padding: 3px 10px 3px 10px;
}
.your-score b {
  display: inline-block; min-width: 34px; padding: 1px 8px; text-align: center;
  border-radius: 999px; font-size: 13px; color: #fff; background: var(--ink-3);
}
.your-score b small { font-size: 10.5px; font-weight: 600; opacity: .85; margin-left: 1px; }
.scale-steps { display: inline-flex; gap: 2px; margin-left: 2px; }
.scale-steps i { width: 6px; height: 12px; border-radius: 1.5px; background: var(--panel); box-shadow: inset 0 0 0 1px var(--line-2); }
/* RAG, from the RBL palette */
.rag-green b, .rag-green .scale-steps i.on { background: var(--green); box-shadow: none; }
.rag-amber b, .rag-amber .scale-steps i.on { background: var(--yellow); box-shadow: none; }
.rag-amber b { color: var(--navy); }
.rag-red b, .rag-red .scale-steps i.on { background: var(--red); box-shadow: none; }
.rag-na b { background: var(--panel); color: var(--ink-3); box-shadow: inset 0 0 0 1px var(--line-2); }
.rag-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12px; color: var(--ink-3); margin: 0 0 4px; }
.rag-legend span { display: inline-flex; align-items: center; gap: 6px; }
.rag-legend i { width: 10px; height: 10px; border-radius: 2px; }
.criterion-text { margin: 6px 0 0 32px; font-size: 14px; line-height: 1.65; color: var(--ink-2); max-width: 68ch; }
@media (max-width: 640px) {
  .domain-body { padding: 16px 16px 4px; }
  .criterion-head { flex-wrap: wrap; row-gap: 8px; }
  .criterion-name { flex-basis: calc(100% - 32px); }
  .your-score { margin-left: 32px; }
  .domain-intro { font-size: 14px; line-height: 1.65; }
  .criterion-text { font-size: 13.5px; }
  .criterion-text { margin-left: 32px; }
}

/* ---------- Footer ---------- */
.site-footer { flex-shrink: 0; margin-top: 32px; border-top: 1px solid var(--line); padding: 24px 0 32px; font-size: 13px; color: var(--ink-3); }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: center; }
.admin-link {
  color: var(--ink-3); text-decoration: none; opacity: .6; font-size: 12px;
}
.admin-link:hover { opacity: 1; text-decoration: underline; }

/* ---------- Misc ---------- */
.center { text-align: center; }
.spinner {
  width: 28px; height: 28px; border: 3px solid var(--panel); border-top-color: var(--rbl-blue);
  border-radius: 50%; animation: spin .8s linear infinite; margin: 40px auto;
}
@keyframes spin { to { transform: rotate(360deg); } }
@media print {
  .site-header, .progress, .site-footer, .actions, .no-print { display: none !important; }
  .hero { padding: 24px 0; }
  .card { box-shadow: none; }
}
fieldset.item { min-width: 0; margin-inline: 0; }
