:root {
  --ink: #172b49;
  --muted: #6c7b91;
  --teal: #15386a;
  --teal-dark: #0a2148;
  --mint: #eff3f9;
  --line: #e1e7ef;
  --paper: #ffffff;
  --page: #f5f7fa;
  --navy: #071d42;
  --amber: #d2a624;
  --shadow: 0 20px 50px rgba(13, 35, 74, .09);
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--page); color: var(--ink); font-family: 'DM Sans', sans-serif; font-size: 15px; line-height: 1.55; }
h1, h2, h3, .brand { font-family: 'Manrope', sans-serif; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(2rem, 4vw, 2.9rem); line-height: 1.12; letter-spacing: -.045em; }
h2 { font-size: 1.35rem; letter-spacing: -.025em; }
a { color: var(--teal-dark); text-decoration: none; }
button, input { font: inherit; }
button { cursor: pointer; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 800; letter-spacing: -.03em; }
.brand-logo { display: block; flex: 0 0 auto; width: 48px; height: 48px; border: 1px solid rgba(7,29,66,.1); border-radius: 50%; object-fit: cover; }
.eyebrow { margin-bottom: 9px; color: var(--teal); font-size: 11px; font-weight: 700; letter-spacing: .14em; }
.muted { color: var(--muted); }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 14px; min-height: 47px; border: 0; border-radius: 9px; padding: 0 20px; font-weight: 700; transition: .18s ease; }
.button.primary { background: var(--teal); color: white; box-shadow: 0 7px 15px rgba(8, 127, 131, .15); }
.button.primary:hover { background: var(--teal-dark); transform: translateY(-1px); }
.button.secondary { border: 1px solid var(--line); background: white; color: var(--ink); }
.button:disabled { cursor: not-allowed; opacity: .45; }
.button.full { width: 100%; }
.text-button { border: 0; padding: 6px 0; background: transparent; color: var(--teal-dark); font-weight: 700; }
.text-button:hover, .link-arrow:hover { color: var(--navy); }
.notice { margin: 16px 0; border: 1px solid; border-radius: 9px; padding: 12px 14px; font-size: 13px; }
.notice.success { border-color: #b9e7d7; background: #effaf5; color: #287451; }
.notice.error { border-color: #f0c9c7; background: #fff4f3; color: #a53e37; }
.notice.warning { border-color: #ead8ad; background: #fff9eb; color: #775614; }
.info-icon { display: inline-grid; flex: 0 0 21px; place-items: center; width: 21px; height: 21px; border: 1px solid #a6ccca; border-radius: 50%; color: var(--teal); font-size: 12px; font-weight: 700; font-style: normal; }
.field, .stack-form { display: flex; flex-direction: column; }
.field { gap: 7px; }
.field label, .stack-form label { color: #384e5b; font-size: 13px; font-weight: 700; }
.field input, .stack-form input:not([type=hidden]) { width: 100%; height: 47px; border: 1px solid #dce6e8; border-radius: 8px; outline: none; background: #fff; padding: 0 13px; color: var(--ink); transition: border .15s, box-shadow .15s; }
.field input:focus, .stack-form input:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(21,56,106,.12); }

.portal-page { min-height: 100vh; background: white; }
.login-layout { display: grid; min-height: 100vh; grid-template-columns: minmax(350px, .9fr) 1.1fr; }
.brand-panel { position: relative; display: flex; min-height: 100vh; flex-direction: column; justify-content: space-between; overflow: hidden; padding: 44px clamp(32px, 7vw, 100px); background: radial-gradient(circle at 82% 12%, rgba(210, 166, 36, .18), transparent 31%), linear-gradient(145deg, #071d42, #163b70); color: white; }
.brand-panel::after { position: absolute; right: -125px; bottom: 2%; width: 390px; height: 390px; border: 1px solid rgba(255,255,255,.12); border-radius: 50%; box-shadow: 0 0 0 45px rgba(255,255,255,.025), 0 0 0 90px rgba(255,255,255,.02); content: ""; }
.brand-panel .brand { color: white; }
.brand-panel .brand-logo { border-color: rgba(255,255,255,.65); box-shadow: 0 4px 16px rgba(0,0,0,.2); }
.consultant-logo { width: 108px; height: 108px; }
.consultant-topbar .brand,
.brand-panel > .brand,
.mobile-brand { gap: 16px; font-size: 24px; }
.consultant-topbar { height: 124px; }
.brand-copy { position: relative; z-index: 1; max-width: 430px; margin: auto 0; }
.brand-copy .eyebrow { color: #edca5b; }
.brand-copy h1 { max-width: 380px; font-size: clamp(2.3rem, 4vw, 3.25rem); }
.brand-copy p:last-child { max-width: 380px; color: #c2d8dc; font-size: 17px; }
.brand-footer { position: relative; z-index: 1; color: #a8c4cb; font-size: 12px; }
.login-panel { display: grid; place-items: center; padding: 50px 28px; }
.login-card { width: min(100%, 390px); }
.login-card h2 { margin-bottom: 8px; font-size: 2rem; }
.login-card > .muted { margin-bottom: 28px; }
.login-card .stack-form { gap: 11px; }
.login-card .button { margin-top: 13px; }
.demo-note { display: flex; gap: 10px; margin-top: 32px; border-top: 1px solid var(--line); padding-top: 19px; color: var(--muted); font-size: 12px; }
.mobile-brand { display: none; }

.topbar { display: flex; height: 76px; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); background: white; padding: 0 max(28px, calc((100% - 1100px) / 2)); }
.topbar-right { display: flex; align-items: center; gap: 23px; }
.topbar-right form { margin: 0; }
.consultant-label { color: var(--muted); font-size: 13px; }
.dashboard { width: min(100% - 48px, 1060px); margin: 0 auto; }
.page-heading { display: flex; align-items: end; justify-content: space-between; padding: 50px 0 27px; }
.page-heading h1 { margin-bottom: 8px; font-size: 2.35rem; }
.page-heading p:last-child { margin-bottom: 0; }
.status-pill { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 8px; border: 1px solid #cfe8df; border-radius: 40px; background: #f3fbf8; padding: 7px 12px; color: #398065; font-size: 12px; font-weight: 700; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: #37a77d; }
.panel { border: 1px solid var(--line); border-radius: 13px; background: white; box-shadow: var(--shadow); }
.invite-panel { padding: 24px 28px 18px; }
.panel-heading { display: flex; align-items: flex-start; justify-content: space-between; }
.panel-heading h2, .list-heading h2 { margin-bottom: 0; font-size: 1.22rem; }
.panel-icon { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 10px; background: #fbf6e5; color: var(--amber); font-size: 24px; }
.invite-form { display: grid; grid-template-columns: 1fr 1fr auto; align-items: end; gap: 14px; margin-top: 20px; }
.invite-form .button { min-width: 177px; }
.form-hint { margin: 12px 0 0; color: var(--muted); font-size: 12px; }
.assessment-list { margin-top: 42px; }
.list-heading { display: flex; align-items: end; justify-content: space-between; margin-bottom: 17px; }
.count-badge { border-radius: 30px; background: #edf3f4; padding: 5px 10px; color: #60747c; font-size: 11px; font-weight: 700; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 11px; background: white; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th { border-bottom: 1px solid var(--line); background: #f9fbfb; padding: 12px 16px; color: #768890; font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
td { border-bottom: 1px solid #edf1f2; padding: 15px 16px; font-size: 13px; }
tbody tr:last-child td { border-bottom: 0; }
.table-secondary { display: block; margin-top: 2px; color: var(--muted); font-size: 11px; }
.status-tag { display: inline-block; border-radius: 30px; padding: 5px 9px; font-size: 11px; font-weight: 700; }
.status-tag.invited { background: #f1f4f6; color: #697982; }
.status-tag.in_progress { background: #fff6e6; color: #a06e16; }
.status-tag.completed { background: #eaf7f1; color: #3b8766; }
.status-tag.expired { background: #fff1e6; color: #a44f14; }
.link-arrow { white-space: nowrap; font-size: 12px; font-weight: 700; }
.empty-state { border: 1px dashed #cad9dc; border-radius: 11px; background: rgba(255,255,255,.7); padding: 40px 20px; text-align: center; }
.empty-icon { color: #71bdb0; font-size: 30px; }
.empty-state h3 { margin: 7px 0 3px; font-size: 16px; }
.empty-state p { margin: 0; color: var(--muted); font-size: 13px; }
.disclaimer { display: flex; align-items: flex-start; gap: 11px; margin-top: 24px; border-radius: 9px; background: #eef5f5; padding: 13px 15px; color: #5c7079; font-size: 12px; }
.disclaimer p { margin: 0; }
.page-footer { margin: 31px 0 25px; color: #91a0a5; font-size: 11px; text-align: center; }
.page-footer span { margin: 0 5px; }

.candidate-page { display: flex; min-height: 100vh; flex-direction: column; align-items: center; background: linear-gradient(180deg, #f3f9f8 0, #f7f9f9 43%); padding: 0 20px; }
.candidate-header { display: flex; width: min(100%, 1000px); height: 85px; align-items: center; justify-content: space-between; }
.secure-label { color: #70838b; font-size: 12px; }
.secure-label span { color: var(--teal); font-size: 18px; vertical-align: -1px; }
.candidate-card { width: min(100%, 500px); margin: auto 0; border: 1px solid var(--line); border-radius: 16px; background: white; padding: 38px 42px 29px; box-shadow: 0 20px 60px rgba(16,64,72,.08); }
.candidate-symbol { display: grid; width: 48px; height: 48px; place-items: center; margin-bottom: 23px; border-radius: 15px; background: var(--mint); color: var(--teal); font-size: 24px; }
.candidate-card h1 { margin-bottom: 11px; font-size: 2rem; }
.candidate-intro { margin-bottom: 24px; font-size: 14px; }
.candidate-intro strong { color: var(--ink); }
.candidate-card .stack-form { gap: 11px; }
.assessment-meta { display: flex; justify-content: center; gap: 9px; margin-top: 23px; color: #72838a; font-size: 12px; }
.candidate-note { margin-top: 25px; border-radius: 9px; background: #f4f8f8; padding: 14px 16px; font-size: 12px; }
.candidate-note strong { color: #38535d; }
.candidate-note p { margin: 4px 0 0; color: var(--muted); }
.privacy-note { margin: 16px 0 0; color: #89989d; font-size: 11px; text-align: center; }
.candidate-footer { padding: 22px 0; color: #93a2a6; font-size: 11px; }
.otp-input { font-size: 21px !important; font-weight: 700; letter-spacing: .33em; text-align: center; }
.otp-form .form-hint { margin: 0 0 3px; }
.resend-form { margin-top: 12px; text-align: center; }
.completion-card { text-align: center; }
.complete-icon { display: grid; width: 54px; height: 54px; place-items: center; margin: 0 auto 20px; border-radius: 50%; background: #e9f7f0; color: #388c65; font-size: 26px; }
.completion-card .candidate-note { text-align: left; }

.test-page { min-height: 100vh; background: #f5f8f8; }
.test-topbar { padding: 0 max(24px, calc((100% - 850px) / 2)); }
.candidate-greeting { color: var(--muted); font-size: 13px; }
.test-layout { width: min(100% - 40px, 760px); margin: 0 auto; padding: 42px 0 55px; }
.test-intro { margin-bottom: 28px; }
.test-intro h1 { margin-bottom: 8px; font-size: 2rem; }
.test-intro p:last-child { margin-bottom: 0; }
.progress-row { display: flex; justify-content: space-between; color: #617780; font-size: 12px; font-weight: 700; }
.progress-track { height: 6px; overflow: hidden; margin: 9px 0 19px; border-radius: 8px; background: #e2ebec; }
.progress-value { width: 0; height: 100%; border-radius: inherit; background: var(--teal); transition: width .25s ease; }
.question-card { border: 1px solid var(--line); border-radius: 14px; background: white; padding: 27px 30px 22px; box-shadow: var(--shadow); }
.question-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.section-chip { border-radius: 30px; background: var(--mint); padding: 6px 10px; color: var(--teal-dark); font-size: 11px; font-weight: 700; }
.time-hint { color: #91a0a5; font-size: 11px; }
.question-card h2 { margin-bottom: 13px; font-size: 1.4rem; line-height: 1.4; }
.competency-list { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 20px; }
.competency-tag { display: inline-block; border-radius: 4px; background: #f2f6f6; padding: 3px 7px; color: #6e8189; font-size: 10px; }
.choice-list { display: grid; gap: 9px; margin: 0; border: 0; padding: 0; }
.choice-option { position: relative; display: flex; min-height: 55px; align-items: center; gap: 12px; border: 1px solid #e3eaeb; border-radius: 9px; padding: 10px 13px; cursor: pointer; transition: .15s ease; }
.choice-option:hover { border-color: #9bc9c6; background: #f8fcfb; }
.choice-option:has(input:checked) { border-color: var(--teal); background: #eff9f7; box-shadow: 0 0 0 1px var(--teal); }
.choice-option input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.choice-indicator { flex: 0 0 17px; width: 17px; height: 17px; border: 1.5px solid #b7c7cb; border-radius: 50%; }
.choice-option:has(input:checked) .choice-indicator { border: 5px solid var(--teal); }
.choice-letter { display: grid; flex: 0 0 27px; width: 27px; height: 27px; place-items: center; border-radius: 7px; background: #f0f4f4; color: #596e76; font-size: 12px; font-weight: 700; }
.choice-option:has(input:checked) .choice-letter { background: var(--teal); color: white; }
.choice-text { color: #3e535c; font-size: 13px; }
.question-actions { display: flex; justify-content: space-between; margin-top: 24px; padding-top: 18px; border-top: 1px solid #edf1f2; }
.question-actions [hidden] { display: none; }
.save-message { min-height: 16px; margin-top: 9px; color: #588873; font-size: 11px; }
.assessment-reminder { display: flex; align-items: center; gap: 9px; margin-top: 16px; color: #7b8d93; font-size: 11px; }
.assessment-reminder .info-icon { flex-basis: 18px; width: 18px; height: 18px; font-size: 10px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; clip-path: inset(50%); }

.result-page { padding-top: 25px; }
.back-link { display: inline-block; margin: 6px 0 25px; color: #6b7f86; font-size: 12px; font-weight: 700; }
.result-heading { display: flex; align-items: center; justify-content: space-between; gap: 25px; margin-bottom: 23px; }
.result-heading h1 { margin-bottom: 7px; font-size: 2.15rem; }
.result-heading p:last-child { margin-bottom: 0; }
.score-card { display: grid; min-width: 190px; justify-items: center; border: 1px solid #cce6de; border-radius: 12px; background: #f1faf6; padding: 15px 24px; color: #54746a; font-size: 11px; }
.score-card strong { color: var(--teal-dark); font-family: 'Manrope', sans-serif; font-size: 2.35rem; line-height: 1.15; }
.score-card strong small { font-size: 1rem; }
.score-label { color: #87988f; }
.result-section { margin-top: 14px; overflow: hidden; border: 1px solid var(--line); border-radius: 11px; background: white; }
.result-section-summary { display: flex; min-height: 68px; align-items: center; gap: 14px; cursor: pointer; list-style: none; padding: 13px 17px; }
.result-section-summary::-webkit-details-marker { display: none; }
.result-section-summary::marker { content: ""; }
.result-section-summary:hover { background: #f8fafc; }
.section-title { flex: 1; color: var(--ink); font-family: 'Manrope', sans-serif; font-size: 16px; font-weight: 800; }
.accordion-chevron { color: var(--teal); font-size: 20px; transition: transform .18s ease; }
.result-section[open] .accordion-chevron { transform: rotate(180deg); }
.result-section-content { border-top: 1px solid var(--line); padding: 15px; }
.result-section-content .result-question:last-child { margin-bottom: 0; }
.score-value.low { color: #bd570e; }
.score-value.medium { color: #987000; }
.score-value.high { color: #277345; }
.score-badge { flex: 0 0 auto; border-radius: 30px; padding: 5px 11px; font-size: 13px; font-weight: 800; }
.score-badge.low { background: #fff0e4; color: #b34e07; }
.score-badge.medium { background: #fff7d6; color: #8a6500; }
.score-badge.high { background: #e9f6ed; color: #267044; }
.score-badge.not-applicable { background: #edf2f7; color: #63758b; font-size: 11px; }
.result-question { margin-bottom: 12px; border: 1px solid var(--line); border-radius: 10px; background: white; padding: 18px 20px; }
.result-question-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.question-number, .answer-label { color: #71838a; font-size: 10px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.result-mark { border-radius: 30px; padding: 4px 8px; font-size: 10px; font-weight: 700; }
.result-mark.match { background: #eaf7ef; color: #438364; }
.result-mark.different { background: #fff4e6; color: #9d6a19; }
.result-mark.self { background: #edf3f7; color: #668093; }
.result-mark.unanswered { background: #fff0e4; color: #a44f14; }
.result-question h3 { margin: 11px 0 15px; font-size: 14px; line-height: 1.45; }
.answer-comparison { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.answer-comparison p { margin: 5px 0 0; color: #52666f; font-size: 12px; }
.result-question .competency-list { margin-bottom: 0; }
.section-chip { background: #eef2f8; color: var(--teal-dark); }
.choice-option:has(input:checked) { border-color: var(--teal); background: #f0f4fa; box-shadow: 0 0 0 1px var(--teal); }
.choice-option:has(input:checked) .choice-letter { background: var(--teal); color: white; }
.choice-option:has(input:checked) .choice-indicator { border-color: var(--teal); }
.review-layout { width: min(100% - 40px, 760px); margin: 30px auto; }
.review-heading { border: 1px solid var(--line); border-radius: 14px; background: white; padding: 28px 30px; box-shadow: var(--shadow); }
.review-heading .complete-icon { margin: 0 0 18px; }
.review-heading h1 { margin-bottom: 9px; font-size: 2rem; }
.review-heading > .muted { margin-bottom: 16px; }
.readonly-banner { display: flex; align-items: center; gap: 9px; border-radius: 8px; background: #eff6f6; padding: 10px 12px; color: #557179; font-size: 12px; }
.review-section { margin-top: 34px; }
.review-question { margin-bottom: 11px; border: 1px solid var(--line); border-radius: 10px; background: white; padding: 17px 19px; }
.review-question h3 { margin: 8px 0 12px; font-size: 14px; line-height: 1.45; }
.review-answer { display: flex; align-items: center; gap: 10px; border-radius: 8px; background: #f3f8f7; padding: 10px; color: #405860; font-size: 13px; }
.review-answer .choice-letter { background: var(--teal); color: white; }
.review-question .competency-list { margin: 11px 0 0; }
.time-remaining { color: var(--teal-dark); font-variant-numeric: tabular-nums; font-weight: 700; }
.time-remaining.time-warning { color: #a96700; }
.time-remaining.time-expired { color: #aa352e; }

@media (max-width: 760px) {
  .login-layout { grid-template-columns: 1fr; }
  .brand-panel { display: none; }
  .login-panel { min-height: 100vh; padding: 28px; }
  .mobile-brand { display: flex; margin-bottom: 45px; }
  .topbar { height: 67px; padding: 0 18px; }
  .topbar .brand { font-size: 13px; }
  .brand-logo { width: 42px; height: 42px; }
  .consultant-logo { width: 84px; height: 84px; }
  .mobile-brand { gap: 13px; font-size: 19px; }
  .consultant-topbar { height: 100px; }
  .consultant-label { display: none; }
  .dashboard { width: min(100% - 32px, 600px); }
  .page-heading { align-items: flex-start; flex-direction: column; gap: 11px; padding: 34px 0 22px; }
  .page-heading h1 { font-size: 2rem; }
  .invite-panel { padding: 20px; }
  .invite-form { grid-template-columns: 1fr; }
  .invite-form .button { width: 100%; }
  .assessment-list { margin-top: 32px; }
  .table-wrap { margin-right: -1px; }
  table { min-width: 700px; }
  .candidate-header { height: 70px; }
  .candidate-header .brand { font-size: 13px; }
  .candidate-card { margin: 25px 0; padding: 30px 24px 24px; }
  .test-topbar { padding: 0 16px; }
  .candidate-greeting { font-size: 11px; }
  .test-layout { width: min(100% - 28px, 600px); padding-top: 30px; }
  .question-card { padding: 21px 17px 17px; }
  .question-meta { align-items: flex-start; flex-direction: column; margin-bottom: 15px; }
  .question-card h2 { font-size: 1.18rem; }
  .choice-option { gap: 9px; padding: 9px; }
  .choice-text { font-size: 12px; }
  .question-actions .button { min-height: 43px; padding: 0 13px; font-size: 12px; }
  .result-heading { align-items: flex-start; flex-direction: column; }
  .score-card { width: 100%; }
  .answer-comparison { grid-template-columns: 1fr; gap: 12px; }
  .result-section-summary { flex-wrap: wrap; gap: 8px; padding: 12px; }
  .section-title { flex-basis: calc(100% - 30px); }
  .result-section-content { padding: 10px; }
  .review-layout { width: min(100% - 28px, 600px); margin: 20px auto; }
  .review-heading { padding: 22px 18px; }
  .review-question { padding: 15px; }
}
