/*
 * Genius HBDI: the site's styles, from Genius DISC's (Roboto, Mission navy), its own so a change to one never breaks the
 * other. Quadrant colours as content/hbdi.json: A blue, B green, C coral red, D ochre (dataviz-validated), with their tints.
 */

@font-face { font-family: "Roboto"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/roboto-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Roboto"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/roboto-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Roboto"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/roboto-latin-700-normal.woff2") format("woff2"); }

:root {
  --navy: #003764;
  --gold: #ffc451;
  --blue: #0093d0;
  --link: #006ba6;
  --ink: #1d1d1b;
  --muted: #5f6b76;
  --line: #d9dee5;
  --tint: #eef6fb;
  --offwhite: #f4f6f9;
  --qa: #1f6fc2; --qb: #166b34; --qc: #f2707a; --qd: #a87e00;   /* as hbdi.json: the quadrants */
  --ta: #d6e5f6; --tb: #d4e8da; --tc: #fde0e2; --td: #f8edc4;
  --radius: 10px;
  --radius-lg: 16px;
  --shadow: 0 1px 2px rgba(0, 55, 100, .08), 0 6px 20px rgba(0, 55, 100, .08);
  --font: "Roboto", "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 1.0625rem; line-height: 1.6; color: var(--ink); background: #fff;
       -webkit-font-smoothing: antialiased; text-wrap: pretty; }
a { color: var(--link); }
a:focus-visible, button:focus-visible, input:focus-visible + .gh-scale__box, input:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
h1, h2, h3 { color: var(--navy); line-height: 1.2; text-wrap: balance; }
h1 { font-size: clamp(1.8rem, 5vw, 2.6rem); margin: 0 0 .4rem; }
h2 { font-size: 1.35rem; margin: 0 0 .6rem; }
p { margin: 0 0 .9rem; }

.gh-wrap { max-width: 1100px; margin: 0 auto; padding: 0 16px; }
.gh-narrow { max-width: 760px; }

/* Header and footer */
.gh-header { background: var(--navy); color: #fff; }
.gh-header__inner { max-width: 1100px; margin: 0 auto; padding: 12px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.gh-brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; }
.gh-brand img { border-radius: 6px; }
a.gh-brand { color: #fff; text-decoration: none; }
.gh-product { font-weight: 700; letter-spacing: .02em; padding: 4px 12px; border: 2px solid rgba(255, 255, 255, .5); border-radius: 999px; font-size: .95rem; }
.gh-stripe { display: grid; grid-template-columns: repeat(4, 1fr); height: 5px; }
.gh-stripe span:nth-child(1) { background: var(--qa); } .gh-stripe span:nth-child(2) { background: var(--qb); }
.gh-stripe span:nth-child(3) { background: var(--qc); } .gh-stripe span:nth-child(4) { background: var(--qd); }
.gh-main { padding-bottom: 48px; }
.gh-footer { background: var(--offwhite); color: var(--muted); font-size: .9rem; }
.gh-footer__inner { max-width: 1100px; margin: 0 auto; padding: 20px 16px; }
.gh-footer p { margin: 0; }

/* Shared pieces */
.gh-eyebrow { font-weight: 700; text-transform: uppercase; letter-spacing: .08em; font-size: .8rem; color: var(--blue); margin: 0 0 .4rem; }
.gh-lead { font-size: 1.2rem; color: var(--navy); max-width: 46rem; }
.gh-hint { color: var(--muted); font-size: .95rem; }
.gh-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: 22px 20px; margin: 0 0 22px; }
.gh-card--resume { border-left: 6px solid var(--blue); }
.gh-pilot { background: var(--tint); border-left: 4px solid var(--blue); border-radius: 0 var(--radius) var(--radius) 0; padding: 12px 16px; margin: 22px 0; font-size: .97rem; }
.gh-button { display: inline-flex; align-items: center; gap: .5em; background: var(--navy); color: #fff; border: 2px solid var(--navy);
             border-radius: 999px; padding: .7em 1.5em; font: 700 1rem var(--font); text-decoration: none; cursor: pointer; }
.gh-button:hover { background: #00284a; }
.gh-button--ghost { background: #fff; color: var(--navy); }
.gh-button--ghost:hover { background: var(--tint); }
.gh-error { color: #b3283a; font-weight: 500; margin: 0 0 .5rem; }

/* Start page */
.gh-hero { background: linear-gradient(180deg, var(--tint), #fff); padding: 36px 0 12px; }
.gh-facts { list-style: none; padding: 0; margin: 14px 0 0; display: flex; flex-wrap: wrap; gap: 8px 22px; color: var(--navy); }
.gh-facts li::before { content: "\2713"; color: var(--qa); font-weight: 700; margin-right: .4em; }
.gh-field { border: 0; padding: 0; margin: 0 0 20px; min-width: 0; }
.gh-field > label, .gh-field legend { display: block; font-weight: 700; color: var(--navy); margin-bottom: .35rem; padding: 0; }
.gh-field input[type="text"], .gh-field input[type="email"] { width: 100%; font: inherit; padding: .7em .8em; border: 2px solid #8a97a5; border-radius: var(--radius); }
.gh-field.has-error input[type="text"], .gh-field.has-error input[type="email"] { border-color: #b3283a; }
.gh-optional { font-weight: 400; color: var(--muted); }
.gh-choices { display: flex; flex-wrap: wrap; gap: 8px; }
.gh-choice { display: inline-flex; align-items: center; gap: .4em; border: 1px solid var(--line); border-radius: 999px; padding: .4em .9em; cursor: pointer; }
.gh-field > label.gh-check { display: flex; gap: .7em; align-items: flex-start; cursor: pointer; font-weight: 400; color: var(--ink); }
.gh-check input { width: 1.3em; height: 1.3em; margin-top: .15em; flex: none; }
.gh-hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* The questionnaire */
.gh-progress { background: var(--offwhite); border-bottom: 1px solid var(--line); padding: 10px 0; margin-bottom: 22px; }
.gh-progress__text { margin: 0 0 6px; font-size: .9rem; color: var(--muted); }
.gh-progress__bar { height: 8px; background: #dfe5ec; border-radius: 999px; overflow: hidden; }
.gh-progress__bar span { display: block; height: 100%; background: var(--navy); border-radius: 999px; }
.gh-intro { background: var(--tint); border-radius: var(--radius-lg); padding: 16px 18px; margin-bottom: 20px; color: var(--navy); font-size: 1.05rem; }
.gh-intro p { margin: 0; }
/* min-width: 0: a fieldset won't otherwise shrink below its widest content, and would push the page wider than a phone. */
.gh-statement { border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 16px 14px 14px; margin: 0 0 14px; background: #fff; min-width: 0; }
.gh-statement.has-error { border-color: #b3283a; box-shadow: 0 0 0 2px rgba(179, 40, 58, .15); }
.gh-statement legend { font-weight: 500; font-size: 1.08rem; color: var(--ink); padding: 0 4px; margin-bottom: 10px; float: left; width: 100%; }
.gh-statement > legend ~ * { clear: both; }
.gh-statement__num { display: inline-block; min-width: 1.9em; color: var(--muted); font-weight: 400; font-size: .9rem; }
.gh-scale { clear: both; display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.gh-scale__option { position: relative; cursor: pointer; display: flex; }
.gh-scale__option input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.gh-scale__box { flex: 1; display: flex; align-items: center; justify-content: center; text-align: center; min-height: 58px; padding: 6px 4px;
                 border: 2px solid var(--line); border-radius: var(--radius); background: var(--offwhite); transition: background .12s, border-color .12s; }
.gh-scale__label { font-size: .78rem; line-height: 1.2; color: var(--navy); font-weight: 500; hyphens: auto; }
.gh-scale__option:hover .gh-scale__box { border-color: var(--blue); }
.gh-scale__option input:checked + .gh-scale__box { background: var(--navy); border-color: var(--navy); }
.gh-scale__option input:checked + .gh-scale__box .gh-scale__label { color: #fff; }
@media (min-width: 640px) { .gh-scale__label { font-size: .86rem; } .gh-statement { padding: 18px 18px 16px; } }
/* The feedback page (feedback.php): a choice of four, two by two on a phone; comment boxes. */
.gh-scale--choice { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 640px) { .gh-scale--choice { grid-template-columns: repeat(4, 1fr); } }
.gh-feedback__label { display: block; font-weight: 500; font-size: 1.08rem; color: var(--ink); margin-bottom: 4px; }
.gh-feedback__text .gh-hint { margin: 0 0 8px; }
.gh-feedback .gh-main > .gh-wrap { padding-top: 28px; }
.gh-feedback .gh-intro h1 { margin: 0 0 8px; font-size: 1.5rem; }
.gh-feedback .gh-intro p + p { margin-top: 10px; }
.gh-feedback__text textarea { width: 100%; font: inherit; padding: .7em .8em; border: 2px solid #8a97a5; border-radius: var(--radius); resize: vertical; }
/* The top-three screen: the eight, each a box to tick (take.php). */
.gh-pick__option { clear: both; display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; margin-top: 8px; cursor: pointer;
                   border: 2px solid var(--line); border-radius: var(--radius); background: var(--offwhite); color: var(--navy); font-weight: 500; }
.gh-pick__option:hover { border-color: var(--blue); }
.gh-pick__option input { width: 20px; height: 20px; margin: 1px 0 0; flex: none; accent-color: var(--navy); }
.gh-pick__option:has(input:checked) { background: var(--tint); border-color: var(--navy); }
.gh-pick__option:has(input:disabled) { opacity: .55; cursor: default; }
.gh-nav { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 22px 0; }
.gh-nav__back { order: -1; }
.gh-later { margin-top: 26px; color: var(--muted); font-size: .95rem; }
.gh-later summary { cursor: pointer; color: var(--link); font-weight: 500; }
.gh-link { word-break: break-all; background: var(--offwhite); border-radius: var(--radius); padding: 8px 10px; font-family: ui-monospace, Consolas, monospace; font-size: .85rem; color: var(--ink); }


/* The questionnaire's sections (take.php) */
.gh-section { margin: 0 0 22px; }
.gh-section > h2 { margin-top: 6px; }
.gh-section .gh-intro { font-size: 1rem; }
.gh-section.has-error .gh-section__error { display: block; }
.gh-tally { position: sticky; top: 0; z-index: 2; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 12px;
            margin: 0 0 12px; font-size: .92rem; color: var(--navy); box-shadow: var(--shadow); }
.gh-tally strong { font-variant-numeric: tabular-nums; }
.gh-tally .is-over { color: #b3283a; }
.gh-row { display: grid; grid-template-columns: 1fr; gap: 6px 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.gh-row__label { font-weight: 500; }
.gh-row__num { color: var(--muted); font-size: .85rem; display: inline-block; min-width: 2.2em; }
@media (min-width: 720px) { .gh-row { grid-template-columns: 240px 1fr; } }
.gh-scale--5 { grid-template-columns: repeat(5, 1fr); }
.gh-scale--3 { grid-template-columns: repeat(3, 1fr); }
.gh-scale--4 { grid-template-columns: repeat(4, 1fr); }
.gh-scale--9 { grid-template-columns: repeat(9, 1fr); }
.gh-scale--2 { grid-template-columns: repeat(2, 1fr); }
.gh-scale .gh-scale__box { min-height: 44px; }
.gh-ends { display: flex; justify-content: space-between; color: var(--muted); font-size: .9rem; margin-top: 4px; }
.gh-grid-pick { clear: both; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.gh-grid-pick .gh-pick__option > span { min-width: 0; display: flex; gap: .35em; align-items: baseline; }
.gh-grid-pick .gh-row__num { min-width: 0; flex: none; }
.gh-grid-pick .gh-pick__option { margin: 0; align-items: center; }
.gh-best { margin-top: 18px; }
.gh-best[hidden] { display: none; }
.gh-grip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.gh-grip .gh-scale__box { flex-direction: column; min-height: 120px; }
.gh-grip svg { width: 90px; height: 90px; }
.gh-input, .gh-field select, .gh-field textarea { width: 100%; font: inherit; padding: .55em .7em; border: 2px solid #8a97a5; border-radius: var(--radius); background: #fff; }
.gh-input--num { width: 6em; }
.gh-select { font: inherit; padding: .4em .5em; border: 2px solid #8a97a5; border-radius: var(--radius); background: #fff; min-width: 9em; }
.gh-pair { display: grid; grid-template-columns: 2.4em 1fr 1fr; gap: 8px; align-items: stretch; padding: 6px 0; }
.gh-pair .gh-row__num { align-self: center; }
.gh-glossary { margin: 0 0 18px; }
.gh-glossary summary { cursor: pointer; color: var(--link); font-weight: 500; }
.gh-glossary dl { columns: 2 260px; column-gap: 28px; font-size: .9rem; }
.gh-glossary dt { font-weight: 700; color: var(--navy); break-after: avoid; }
.gh-glossary dd { margin: 0 0 8px; break-inside: avoid; }

/* The report (report.php) */
.gh-report { padding: 26px 0 40px; }
.gh-report-nav { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 0 0 18px; font-size: .95rem; }
.gh-page { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: 24px 22px; margin: 0 0 22px; }
.gh-page > h2 { font-size: 1.5rem; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; border-bottom: 1px solid var(--line); padding-bottom: 10px; }
.gh-page > h2 small { font-size: 1rem; color: var(--ink); font-weight: 700; }
.gh-qtable { border-collapse: separate; border-spacing: 3px; margin: 0 auto 14px; font-variant-numeric: tabular-nums; }
.gh-qtable th { text-align: right; font-weight: 400; padding-right: 8px; }
.gh-qtable thead th { text-align: center; font-weight: 700; }
.gh-qtable td { min-width: 3.2em; text-align: center; font-weight: 700; padding: 4px 6px; border-bottom: 3px solid; }
.gh-q-A { background: var(--ta); border-color: var(--qa) !important; } .gh-q-B { background: var(--tb); border-color: var(--qb) !important; }
.gh-q-C { background: var(--tc); border-color: var(--qc) !important; } .gh-q-D { background: var(--td); border-color: var(--qd) !important; }
.gh-qtext-A { color: var(--qa); } .gh-qtext-B { color: var(--qb); } .gh-qtext-C { color: #c2404b; } .gh-qtext-D { color: #8a6800; }
.gh-figure { max-width: 640px; margin: 0 auto; }
.gh-figure svg { display: block; width: 100%; height: auto; }
.gh-figure--key { max-width: 360px; }
.gh-summary-grid { display: grid; grid-template-columns: 150px repeat(4, 1fr); gap: 4px; font-size: .9rem; overflow-x: auto; }
.gh-summary-grid > div { padding: 6px 8px; border-radius: 4px; }
.gh-summary-grid .gh-sum-label { background: var(--offwhite); font-weight: 700; color: var(--navy); font-size: .8rem; text-transform: uppercase; }
.gh-summary-grid .gh-sum-head { color: #fff; text-align: center; font-weight: 700; }
.gh-sum-head.gh-q-A { background: var(--qa); } .gh-sum-head.gh-q-B { background: var(--qb); } .gh-sum-head.gh-q-C { background: #c2404b; } .gh-sum-head.gh-q-D { background: #8a6800; }
.gh-sum-list { list-style: none; margin: 0; padding: 0; }
.gh-sum-list li { display: flex; justify-content: space-between; gap: 6px; }
.gh-sum-list li.is-chosen { font-weight: 700; }
.gh-sum-big { font-size: 1.4rem; font-weight: 700; text-align: center; }
.gh-sum-rows { margin-top: 14px; display: grid; grid-template-columns: 150px 1fr; gap: 4px; font-size: .9rem; }
.gh-sum-rows dt { background: var(--offwhite); font-weight: 700; color: var(--navy); font-size: .8rem; text-transform: uppercase; padding: 6px 8px; border-radius: 4px; }
.gh-sum-rows dd { margin: 0; padding: 6px 8px; border-bottom: 1px solid var(--line); }
@media (max-width: 720px) { .gh-summary-grid { grid-template-columns: 110px repeat(4, minmax(110px, 1fr)); } }
.gh-order { text-align: center; font-size: 1.4rem; font-weight: 700; color: var(--navy); letter-spacing: .05em; }
.gh-narrative p.gh-q { border-left: 4px solid; padding-left: 12px; }
.gh-sheet { display: grid; grid-template-columns: 1fr; gap: 20px; }
@media (min-width: 860px) { .gh-sheet { grid-template-columns: 1.2fr 1fr; } }
.gh-quads { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.gh-quad { border-radius: var(--radius); padding: 10px 12px; border-left: 4px solid; }
.gh-quad h3 { margin: 0 0 4px; font-size: 1rem; }
.gh-quad ul { margin: 0; padding-left: 1.1em; font-size: .92rem; }
.gh-quad p { margin: 0; font-size: .92rem; }
.gh-mini-row { display: flex; gap: 18px; align-items: center; justify-content: center; flex-wrap: wrap; }
.gh-mini-row .gh-figure { width: 180px; margin: 0; }
.gh-self { font-size: .95rem; color: var(--muted); }
.gh-report-pdf { margin: 0 0 18px; }
@media print { .gh-header, .gh-stripe, .gh-footer, .gh-report-nav, .gh-report-pdf { display: none; } .gh-page { box-shadow: none; break-after: page; } }

[hidden] { display: none !important; }
