/* Embers HR: People & Performance Health Check */
:root {
  --green: #4A5D4C;
  --green-dark: #3D4A3D;
  --terra: #C67B4E;
  --terra-dark: #A9633A;
  --cream: #F5F2ED;
  --cream-dark: #EDE8E1;
  --ink: #2F3A30;
  --muted: #5A6B5A;
  --line: #DDD6CB;
  --white: #fff;
  --amber: #B58A3C;
  --radius: 12px;
  --shadow: 0 6px 28px rgba(61, 74, 61, .08);
  --serif: 'Cormorant Garamond', Georgia, serif;
  --sans: 'Outfit', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--cream); color: var(--ink); font: 400 17px/1.6 var(--sans); min-height: 100vh; display: flex; flex-direction: column; }
[hidden] { display: none !important; }
img { max-width: 100%; height: auto; }
a { color: var(--green); }
:focus-visible { outline: 3px solid var(--terra); outline-offset: 3px; border-radius: 4px; }
h1:focus, h2:focus, .cta-done:focus { outline: none; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--green); color: #fff; padding: 10px 14px; border-radius: 6px; z-index: 100; }
.skip:focus { left: 8px; }

/* Header / footer */
.top { background: var(--cream); border-bottom: 1px solid rgba(74, 93, 76, .12); }
.top-inner { max-width: 760px; margin: 0 auto; padding: 10px 20px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand img { display: block; height: 60px; width: auto; }
.top-tag { font: 500 12px/1 var(--sans); letter-spacing: 1.6px; text-transform: uppercase; color: var(--terra); }
.foot { margin-top: auto; padding: 28px 20px 40px; text-align: center; font-size: 14px; color: var(--muted); }
.foot a { color: var(--muted); }

/* Layout */
.wrap { width: 100%; max-width: 760px; margin: 0 auto; padding: 28px 20px 48px; flex: 1; }
.step { animation: rise .45s ease both; }
.center { text-align: center; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* Type */
.eyebrow { margin: 0 0 10px; font: 500 12.5px/1.4 var(--sans); letter-spacing: 1.8px; text-transform: uppercase; color: var(--terra); }
.eyebrow-light { color: #F0C8AE; }
h1, .h1 { margin: 0 0 14px; font: 600 clamp(34px, 7.4vw, 50px)/1.08 var(--serif); color: var(--green); letter-spacing: -.3px; }
.h2 { margin: 40px 0 12px; font: 600 clamp(26px, 5vw, 32px)/1.15 var(--serif); color: var(--green); }
.h3 { margin: 0 0 12px; font: 600 24px/1.2 var(--serif); color: var(--green); }
.lede { margin: 0 0 22px; font-size: 18.5px; color: var(--ink); max-width: 60ch; }
.fine { margin: 14px 0 0; font-size: 13.5px; line-height: 1.55; color: var(--muted); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 12px 24px; border: 0; border-radius: 6px; font: 500 16px/1 var(--sans); letter-spacing: .3px; cursor: pointer; text-decoration: none; transition: transform .2s, box-shadow .2s, background .2s; -webkit-tap-highlight-color: transparent; }
.btn-primary { background: var(--terra); color: #fff; box-shadow: 0 4px 18px rgba(198, 123, 78, .32); }
.btn-primary:hover { background: var(--terra-dark); transform: translateY(-1px); }
.btn-primary:disabled { opacity: .65; cursor: progress; transform: none; }
.btn-lg { min-height: 58px; padding: 16px 34px; font-size: 17.5px; }
.btn-block { width: 100%; }
.btn-ghost { background: transparent; color: var(--green); padding-left: 4px; padding-right: 12px; min-height: 44px; }
.btn-ghost:hover { text-decoration: underline; }
.btn-light { background: #fff; color: var(--green-dark); }

/* Intro */
.gets { list-style: none; margin: 0 0 28px; padding: 0; display: grid; gap: 14px; }
.gets li { display: flex; gap: 14px; align-items: flex-start; background: #fff; border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); font-size: 16.5px; line-height: 1.5; }
.tick { flex: none; width: 24px; height: 24px; margin-top: 1px; border-radius: 50%; background: var(--green); position: relative; }
.tick::after { content: ''; position: absolute; left: 8px; top: 4.5px; width: 6px; height: 11px; border: solid #fff; border-width: 0 2.5px 2.5px 0; transform: rotate(45deg); }
.byline { display: flex; gap: 14px; align-items: center; margin-top: 34px; padding-top: 22px; border-top: 1px solid var(--line); font-size: 14.5px; color: var(--muted); }
.byline p { margin: 0; }
.byline-photo { flex: none; width: 64px; height: 64px; border-radius: 50%; object-fit: cover; object-position: top; border: 2px solid #fff; box-shadow: var(--shadow); }

/* Quiz */
.progress { height: 6px; border-radius: 3px; background: var(--cream-dark); overflow: hidden; margin-bottom: 22px; }
.progress-bar { height: 100%; width: 0; background: linear-gradient(90deg, var(--terra), #D9966D); transition: width .35s ease; }
.q-meta { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 10px; }
.q-area { font: 500 12.5px/1.3 var(--sans); letter-spacing: 1.6px; text-transform: uppercase; color: var(--terra); }
.q-count { font-size: 14px; color: var(--muted); }
.q-text { margin: 0 0 24px; font: 500 clamp(24px, 5.6vw, 32px)/1.28 var(--serif); color: var(--ink); min-height: 4.2em; }
.options { display: grid; gap: 10px; }
.opt { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 58px; padding: 12px 18px; text-align: left; background: #fff; color: var(--ink); border: 2px solid var(--line); border-radius: 10px; font: 500 17px/1.3 var(--sans); cursor: pointer; transition: border-color .15s, background .15s, transform .15s; -webkit-tap-highlight-color: transparent; }
.opt:hover { border-color: var(--green); }
.opt-dot { flex: none; width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line); background: #fff; transition: .15s; }
.opt[aria-checked="true"] { border-color: var(--green); background: var(--green); color: #fff; }
.opt[aria-checked="true"] .opt-dot { border-color: #fff; background: radial-gradient(circle, #fff 0 38%, transparent 42%); }
.opt-key { margin-left: auto; font: 500 13px/1 var(--sans); opacity: .45; }
.q-nav { display: flex; align-items: center; justify-content: space-between; margin-top: 18px; }
.hint { font-size: 13px; color: var(--muted); }
@media (hover: none) { .hint { display: none; } .opt-key { display: none; } }

/* Forms */
.field { margin-bottom: 18px; }
label { display: block; margin-bottom: 6px; font-weight: 500; font-size: 15.5px; }
label em { font-style: normal; font-weight: 400; color: var(--muted); }
input[type=text], input[type=email], input[type=tel], select, textarea { width: 100%; min-height: 54px; padding: 13px 15px; background: #fff; color: var(--ink); border: 2px solid var(--line); border-radius: 8px; font: 400 17px/1.3 var(--sans); appearance: none; -webkit-appearance: none; }
select { background-image: linear-gradient(45deg, transparent 50%, var(--green) 50%), linear-gradient(135deg, var(--green) 50%, transparent 50%); background-position: calc(100% - 22px) 52%, calc(100% - 16px) 52%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 42px; }
textarea { resize: vertical; min-height: 88px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 4px rgba(74, 93, 76, .16); }
input[aria-invalid=true], select[aria-invalid=true] { border-color: #B3412B; }
.err { min-height: 0; margin: 6px 0 0; font-size: 14px; color: #B3412B; }
.err:empty { display: none; }
.err-form { margin: 0 0 14px; font-size: 15px; }
.err-light { color: #FFD9C7; }
.check { display: flex; gap: 12px; align-items: flex-start; margin: 4px 0 20px; font-weight: 400; font-size: 15.5px; line-height: 1.45; cursor: pointer; }
.check input { flex: none; width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--green); }
.check em { font-style: normal; color: var(--muted); font-size: 14px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
#details .btn-ghost { margin-top: 10px; }

/* Loading */
.ember { width: 64px; height: 84px; margin: 40px auto 20px; background: linear-gradient(180deg, #E09A6E, var(--terra)); border-radius: 50% 50% 50% 50% / 62% 62% 38% 38%; clip-path: polygon(50% 0, 88% 40%, 100% 68%, 82% 100%, 18% 100%, 0 68%, 14% 40%); animation: flicker 1.3s ease-in-out infinite alternate; transform-origin: 50% 100%; }
@keyframes flicker { from { transform: scale(1, .94) rotate(-2deg); opacity: .85; } to { transform: scale(1.05, 1.04) rotate(2deg); opacity: 1; } }
.load-steps { list-style: none; margin: 18px auto 0; padding: 0; display: inline-grid; gap: 10px; text-align: left; }
.load-steps li { display: flex; align-items: center; gap: 12px; color: var(--muted); opacity: .4; transition: opacity .4s, color .4s; }
.load-steps li::before { content: ''; width: 10px; height: 10px; border-radius: 50%; background: var(--line); transition: background .4s; }
.load-steps li.on { opacity: 1; color: var(--ink); }
.load-steps li.on::before { background: var(--terra); }
.load-steps li.done::before { background: var(--green); }

/* Results */
.score-card { display: flex; gap: 26px; align-items: center; margin: 8px 0 18px; padding: 24px; background: #fff; border-radius: 16px; box-shadow: var(--shadow); }
.ring { position: relative; flex: none; width: 140px; height: 140px; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 10; }
.ring-bg { stroke: var(--cream-dark); }
.ring-fg { stroke: var(--green); stroke-linecap: round; stroke-dasharray: 0 327; transition: stroke-dasharray 1.3s cubic-bezier(.2, .8, .2, 1); }
.ring-text { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.ring-num { font: 600 42px/1 var(--serif); color: var(--ink); }
.ring-lbl { margin-top: 4px; font: 500 12px/1.2 var(--sans); letter-spacing: .4px; color: var(--muted); text-align: center; }
.headline { margin: 0 0 8px; font: 600 clamp(22px, 4.4vw, 27px)/1.25 var(--serif); color: var(--ink); }
.score-copy p { margin: 0 0 8px; }
.score-copy p:last-child { margin-bottom: 0; }
.notice { margin: 0 0 6px; padding: 12px 16px; background: var(--cream-dark); border-radius: 8px; font-size: 15px; color: var(--muted); }
.notice:empty { display: none; }

.areas { display: grid; gap: 14px; }
.area { padding: 16px 18px 18px; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); }
.area-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 8px; }
.area-name { font-weight: 600; font-size: 17px; }
.area-pct { font: 600 24px/1 var(--serif); }
.bar { height: 10px; background: var(--cream-dark); border-radius: 5px; overflow: hidden; }
.bar > i { display: block; height: 100%; width: 0; border-radius: 5px; transition: width 1s cubic-bezier(.2, .8, .2, 1); }
.area-note { margin: 10px 0 0; font-size: 15.5px; color: var(--muted); }
.chip { display: inline-block; margin-left: 8px; padding: 2px 9px; border-radius: 99px; font: 500 12px/1.5 var(--sans); vertical-align: 2px; color: #fff; }
.band-strong { --c: var(--green); }
.band-developing { --c: var(--amber); }
.band-priority { --c: var(--terra); }
.bar > i, .chip { background: var(--c); }
.area-pct { color: var(--c); }

.two-col { display: grid; gap: 16px; margin-top: 40px; }
.panel { padding: 22px; border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); }
.panel-good { border-top: 4px solid var(--green); }
.panel-watch { border-top: 4px solid var(--terra); }
.panel p { margin: 0 0 12px; font-size: 16px; }
.panel p:last-child { margin-bottom: 0; }
.panel strong { color: var(--ink); }
.steps-list { list-style: none; counter-reset: s; margin: 0; padding: 0; display: grid; gap: 12px; }
.steps-list li { counter-increment: s; position: relative; padding: 16px 18px 16px 62px; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); }
.steps-list li::before { content: counter(s); position: absolute; left: 16px; top: 13px; width: 32px; height: 32px; border-radius: 50%; background: var(--terra); color: #fff; font: 600 18px/32px var(--serif); text-align: center; }
.thinker { margin: 32px 0 0; padding: 22px 24px; border-left: 4px solid var(--terra); background: var(--cream-dark); border-radius: 0 var(--radius) var(--radius) 0; }
.thinker-lbl { display: block; margin-bottom: 6px; font: 500 12.5px/1.4 var(--sans); letter-spacing: 1.4px; text-transform: uppercase; color: var(--muted); }
.thinker p { margin: 0; font: italic 500 clamp(21px, 4.6vw, 26px)/1.35 var(--serif); color: var(--ink); }

/* Conversion card */
.cta { margin: 44px 0 10px; padding: 34px 26px; border-radius: 18px; background: linear-gradient(160deg, var(--green) 0%, var(--green-dark) 100%); color: #fff; text-align: center; box-shadow: 0 14px 40px rgba(61, 74, 61, .28); }
.cta-title { margin: 0 0 12px; font: 600 clamp(30px, 6vw, 40px)/1.1 var(--serif); color: #fff; }
.cta-copy { margin: 0 auto 22px; max-width: 52ch; font-size: 17px; color: #E8EDE8; }
.cta-copy strong { color: #fff; }
.cta-fine { margin: 12px 0 0; font-size: 14px; color: #C9D4C9; }
.review-form { max-width: 440px; margin: 6px auto 0; text-align: left; }
.review-form label { color: #fff; }
.review-form label em { color: #C9D4C9; }
.review-form input, .review-form textarea { border-color: transparent; }
.cta-done { max-width: 480px; margin: 0 auto; padding: 18px 20px; background: rgba(255, 255, 255, .1); border-radius: 12px; }
.cta-done h3 { margin: 0 0 8px; font: 600 26px/1.2 var(--serif); }
.cta-done p { margin: 0 0 14px; color: #E8EDE8; }
.cta-done .btn { margin-top: 2px; }

.actions { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 22px; }

.sticky-cta { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: #fff; box-shadow: 0 -4px 20px rgba(0, 0, 0, .12); font-weight: 500; color: var(--green-dark); animation: rise .3s ease both; }
.sticky-cta .btn { min-height: 44px; padding: 10px 20px; }
@media (min-width: 760px) { .sticky-cta { display: none !important; } }

@media (min-width: 640px) {
  body { font-size: 18px; }
  .two-col { grid-template-columns: 1fr 1fr; }
  .wrap { padding-top: 44px; }
}
@media (max-width: 520px) {
  .score-card { flex-direction: column; text-align: center; padding: 22px 18px; }
  .top-tag { display: none; }
  .brand img { height: 52px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* Print / save as PDF */
@media print {
  body { background: #fff; font-size: 12pt; }
  .top-tag, .sticky-cta, .actions, .cta, .notice, .skip, .foot, #intro, #quiz, #details, #loading { display: none !important; }
  .wrap { max-width: none; padding: 0; }
  .score-card, .area, .panel, .steps-list li { box-shadow: none; border: 1px solid #ccc; break-inside: avoid; }
  .ring-fg { transition: none; }
  .step { animation: none; }
}
